Sidebar.js 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152
  1. (function()
  2. {
  3. /**
  4. * Download from following URL as TSV and convert using https://jgraph.github.io/drawio-tools/tools/convert.html:
  5. * https://docs.google.com/spreadsheets/d/1sAL1zn-UtmJtKPH4cLApGjRX-TRSJa5dYdfZ9NKYfRs
  6. * Maps package and stencil names to additional tags.
  7. */
  8. Sidebar.prototype.tagIndex = 'vX3ZcttI0vXTTPz/XIihlrvb31xqt2YsWy3K9tw5QBISMSIBNhbL6qefczKrsJBYCosmgkGCJPJUoZasrNxq+/M69nbrmRfH0Uvyt+N/yAU+D16n1VtnZ36Y/u3k+KP/yI9TQ+aFTxt/hYs0i0NXjPvgaT0a5MuuhJDt2mH2Mc69zSbKCHMRZYuNX4JKXyJ8e/FeXRqlwPkj81YllMcoi3vArP0fcRSW6MMoXa7lYZLgKfQ2+CvobprzIF5mG48lW6AlftoE4ZNLNf6ZbXdHKMZSnxz/gvtif7fhUyy85TObOlxF8qt8uEOdDIUyI84L2b6VXo/idB09RWwex7HzyTTryfFcmrVcRbSV6QaHphrV3fONH658EuzNpuQ5CENChHZaJptg6wr2ICP3G+pQg7jScd4M3Yz7LVhxgjx4AafXuNo+xEGl4dJ17BPcseUOH/Hk+EMUB39FYSqjYF3+Mgjuqx+nwVLofxSXLVB/ZbE/O10u/SQB+TkKjyOSJP4yi4OUz/Xs8/3ghyasLI22XhrISPTwBR9PPmb18T825JyhTudlxPfHjZesW4DmqD+7Xe82MO2Pwnc2yAaPzxqAobBXwZKCRzSHqZgTxrmHObVXb1vjlZd6Cy/h36tFN9StFz/76W7jLUmxlW/CSoiZrCOuAN0o84t/8fboMX3x5IeV/8PfRLutLirPATGTZey/rOIA/e/6oPNsAapgZxpniVWBzHvnh8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AKZkesDTXrM2pLxBpU5kScwqWh8TSaOuGxBWXvMDg9IxLv+QGS1WMXcas9lK4R090+f0B6P+dhQTQBcQ4EmqhUpS8cQwD3ybKrZh3AQ/70pjtaTp9pJZbuGEosCY6GEksuo6HEkrbIlZhRjhyHpQkNr3694Cm2/QBmsH6LvGKbXq77VqOMIn0wGkU6YzSK9MpoFOme0SiSSWo0yvvhKDgT2HYydP4yUPI7BkFJT08DJd09DZT0+VgoeJnb5N3YzDl4fbegyMk3o1EkAfhoFDbOGBQe1whjpXhKPuJamli/9oG5hrOgqN8kC/geN2vosE7QuVpjEScsIhS+LfSyJ44xOcHVXn2B+Cn6eUeJbh8OFmi7fxk9Li3YJFPPgk0y+QDGWPSpnpJYEz0kh6dWbMTgsjCs0wQwbPIJYDidJ4DhAjcBDFe4CWC4xPWEMQJQgxGgiWSmzrXI78wzgHGsTLo+8jXmVr6Y615I33KkF+jo7Rdz3QdpzjohJK+ok3wZUKc566RIph7ypUedkK/hSTcDm8xeOZPGC3HFYQiX6FQQn9CRT64KwNQNcNKU5QJZbOAxKf6aBo8pHfJEEriE9sOFQRNZQ0kQ31d48GiOODcjgUGBgx/Cf/Qo3EDiNhwJJTJYvYBtuJYjpeiL7pDHQve7fTROBuHOhHqql5+EONacaFZPy4YXjZG2ep8W/7LDnjRQrxh7sff6Lw==';
  9. /**
  10. * See etc/build/README on how to update this file
  11. */
  12. Sidebar.prototype.searchFileUrl = 'search.xml';
  13. /**
  14. * Overrides gear image URL.
  15. */
  16. Sidebar.prototype.gearImage = GRAPH_IMAGE_PATH + '/clipart/Gear_128x128.png';
  17. /**
  18. *
  19. */
  20. Sidebar.prototype.defaultEntries = 'general;images;uml;er;bpmn;flowchart;basic;arrows2';
  21. /**
  22. *
  23. */
  24. Sidebar.prototype.signs = ['Animals', 'Food', 'Healthcare', 'Nature', 'People', 'Safety', 'Science', 'Sports', 'Tech', 'Transportation', 'Travel'];
  25. /**
  26. *
  27. */
  28. Sidebar.prototype.gcp = ['Big Data', 'Compute', 'Developer Tools', 'Extras', 'Identity and Security', 'Machine Learning', 'Management Tools', 'Networking', 'Storage Databases'];
  29. /**
  30. *
  31. */
  32. Sidebar.prototype.rack = ['General', 'APC', 'Cisco', 'Dell', 'F5', 'HP', 'IBM', 'Oracle'];
  33. /**
  34. *
  35. */
  36. Sidebar.prototype.pids = ['Agitators', 'Apparatus Elements', 'Centrifuges', 'Compressors', 'Compressors ISO', 'Crushers Grinding',
  37. 'Driers', 'Engines', 'Feeders', 'Filters', 'Fittings', 'Flow Sensors', 'Heat Exchangers', 'Instruments', 'Misc',
  38. 'Mixers', 'Piping', 'Pumps', 'Pumps DIN', 'Pumps ISO', 'Separators', 'Shaping Machines', 'Valves', 'Vessels'];
  39. /**
  40. *
  41. */
  42. Sidebar.prototype.cisco = ['Buildings', 'Computers and Peripherals', 'Controllers and Modules', 'Directors', 'Hubs and Gateways', 'Misc',
  43. 'Modems and Phones', 'People', 'Routers', 'Security', 'Servers', 'Storage', 'Switches', 'Wireless'];
  44. /**
  45. *
  46. */
  47. Sidebar.prototype.sysml = ['Model Elements', 'Blocks', 'Ports and Flows', 'Constraint Blocks', 'Activities', 'Interactions', 'State Machines',
  48. 'Use Cases', 'Allocations', 'Requirements', 'Profiles', 'Stereotypes'];
  49. /**
  50. *
  51. */
  52. Sidebar.prototype.eip = ['Message Construction', 'Message Routing', 'Message Transformation', 'Messaging Channels', 'Messaging Endpoints',
  53. 'Messaging Systems', 'System Management'];
  54. /**
  55. *
  56. */
  57. Sidebar.prototype.gmdl = ['Bottom Navigation', 'Bottom Sheets', 'Buttons', 'Cards', 'Chips', 'Dialogs', 'Dividers', 'Grid Lists', 'Icons', 'Lists', 'Menus', 'Misc', 'Pickers',
  58. 'Selection Controls', 'Sliders', 'Steppers', 'Tabs', 'Text Fields'];
  59. /**
  60. *
  61. */
  62. Sidebar.prototype.aws2 = ['Analytics', 'Application Services', 'Compute', 'Database', 'Developer Tools', 'Enterprise Applications', 'Game Development', 'General', 'Internet of Things',
  63. 'Management Tools', 'Mobile Services', 'Networking', 'On-Demand Workforce', 'SDKs', 'Security and Identity', 'Storage and Content Delivery', 'Groups'];
  64. /**
  65. *
  66. */
  67. Sidebar.prototype.aws3 = ['Analytics', 'Application Services', 'Artificial Intelligence', 'Business Productivity', 'Compute', 'Database', 'Desktop and App Streaming', 'Developer Tools',
  68. 'Game Development', 'General', 'Groups', 'Internet of Things',
  69. 'Management Tools', 'Messaging', 'Migration', 'Mobile Services', 'Networking and Content Delivery', 'On Demand Workforce', 'SDKs', 'Security Identity and Compliance', 'Storage'];
  70. /**
  71. *
  72. */
  73. Sidebar.prototype.office = ['Clouds', 'Communications', 'Concepts', 'Databases', 'Devices', 'Security', 'Servers', 'Services', 'Sites', 'Users'];
  74. /**
  75. *
  76. */
  77. Sidebar.prototype.veeam = ['2D', '3D'];
  78. /**
  79. *
  80. */
  81. Sidebar.prototype.archimate3 = ['Application', 'Business', 'Composite', 'Implementation and Migration', 'Motivation', 'Physical', 'Relationships', 'Strategy', 'Technology'];
  82. /**
  83. *
  84. */
  85. Sidebar.prototype.electrical = ['LogicGates', 'Resistors', 'Capacitors', 'Inductors', 'SwitchesRelays', 'Diodes', 'Sources', 'Transistors', 'Misc', 'Audio', 'PlcLadder', 'Abstract', 'Optical', 'VacuumTubes', 'Waveforms', 'Instruments', 'RotMech', 'Transmission'];
  86. /**
  87. *
  88. */
  89. Sidebar.prototype.configuration = [{id: 'general', libs: ['general', 'misc', 'advanced']}, {id: 'uml'}, {id: 'search'}, {id: 'er'},
  90. {id: 'ios', prefix: 'ios', libs: [''/*prefix is library*/, '7icons', '7ui']},
  91. {id: 'android', prefix: 'android', libs: [''/*prefix is library*/]}, {id: 'aws3d'},
  92. {id: 'flowchart'}, {id: 'basic'}, {id: 'arrows'}, {id: 'arrows2'}, {id: 'lean_mapping'}, {id: 'citrix'}, {id: 'azure'}, {id: 'network'},
  93. {id: 'mscae', prefix: 'mscae', libs: ['Cloud', 'Enterprise', 'General', 'Intune', 'Other', 'System Center', 'Deprecated']},
  94. {id: 'bpmn', prefix: 'bpmn', libs: [''/*prefix is library*/, 'Gateways', 'Events']},
  95. {id: 'clipart', prefix: null, libs: ['computer', 'finance', 'clipart', 'networking', 'people', 'telco']},
  96. {id: 'eip', prefix: 'eip', libs: Sidebar.prototype.eip},
  97. {id: 'mockups', prefix: 'mockup', libs: ['Buttons', 'Containers', 'Forms', 'Graphics', 'Markup', 'Misc', 'Navigation', 'Text']},
  98. {id: 'pid2', prefix: 'pid2', libs: ['Agitators', 'Apparatus Elements', 'Centrifuges', 'Compressors', 'Compressors ISO', 'Crushers Grinding',
  99. 'Driers', 'Engines', 'Feeders', 'Filters', 'Fittings', 'Flow Sensors', 'Heat Exchangers', 'Instruments', 'Misc',
  100. 'Mixers', 'Piping', 'Pumps', 'Pumps DIN', 'Pumps ISO', 'Separators', 'Shaping Machines', 'Valves', 'Vessels']},
  101. {id: 'signs', prefix: 'signs', libs: Sidebar.prototype.signs},
  102. {id: 'gcp', prefix: 'gcp', libs: Sidebar.prototype.gcp},
  103. {id: 'rack', prefix: 'rack', libs: Sidebar.prototype.rack},
  104. {id: 'electrical', prefix: 'electrical', libs: Sidebar.prototype.electrical},
  105. {id: 'aws2', prefix: 'aws2', libs: Sidebar.prototype.aws2},
  106. {id: 'aws3', prefix: 'aws3', libs: Sidebar.prototype.aws3},
  107. {id: 'pid', prefix: 'pid', libs: Sidebar.prototype.pids},
  108. {id: 'cisco', prefix: 'cisco', libs: Sidebar.prototype.cisco},
  109. {id: 'office', prefix: 'office', libs: Sidebar.prototype.office},
  110. {id: 'veeam', prefix: 'veeam', libs: Sidebar.prototype.veeam},
  111. {id: 'cabinets', libs: ['cabinets']},
  112. {id: 'floorplan', libs: ['floorplan']},
  113. {id: 'bootstrap', libs: ['bootstrap']},
  114. {id: 'gmdl', prefix: 'gmdl', libs: Sidebar.prototype.gmdl},
  115. {id: 'archimate3', prefix: 'archimate3', libs: Sidebar.prototype.archimate3},
  116. {id: 'archimate', libs: ['archimate']},
  117. {id: 'webicons', libs: ['webicons', 'weblogos']},
  118. {id: 'sysml', prefix: 'sysml', libs: Sidebar.prototype.sysml}];
  119. /**
  120. * Adds hint for quick tutorial video for certain search terms.
  121. */
  122. var siderbarInsertSearchHint = Sidebar.prototype.insertSearchHint;
  123. Sidebar.prototype.insertSearchHint = function(div, searchTerm, count, page, results, len, more, terms)
  124. {
  125. if (terms != null && page == 1)
  126. {
  127. var hintText = null;
  128. // Adds hint for text inserts
  129. if (mxUtils.indexOf(terms, 'text') >= 0)
  130. {
  131. hintText = 'Double click anywhere in the diagram to insert text.';
  132. }
  133. else
  134. {
  135. // Checks if any of the following keywords are in the search terms
  136. var words = ['line', 'lines', 'arrow', 'arrows', 'connect', 'connection', 'connections',
  137. 'connector', 'connectors', 'curve', 'curves', 'link', 'links'];
  138. for (var i = 0; i < words.length; i++)
  139. {
  140. if (mxUtils.indexOf(terms, words[i]) >= 0)
  141. {
  142. hintText = 'Need help with connections?';
  143. break;
  144. }
  145. }
  146. }
  147. if (hintText != null)
  148. {
  149. var link = document.createElement('a');
  150. link.setAttribute('href', 'https://www.youtube.com/watch?v=8OaMWa4R1SE&t=1');
  151. link.setAttribute('target', '_blank');
  152. link.className = 'geTitle';
  153. link.style.cssText = 'background-color:#ffd350;border-radius:6px;color:black;' +
  154. 'border:1px solid black !important;text-align:center;white-space:normal;' +
  155. 'padding:6px 0px 6px 0px !important;margin:4px 4px 8px 2px;';
  156. mxUtils.write(link, hintText);
  157. div.appendChild(link);
  158. }
  159. }
  160. siderbarInsertSearchHint.apply(this, arguments);
  161. };
  162. /**
  163. * Toggle palette.
  164. */
  165. Sidebar.prototype.togglePalettes = function(prefix, ids)
  166. {
  167. this.showPalettes(prefix, ids);
  168. };
  169. /**
  170. * Toggle palette.
  171. */
  172. Sidebar.prototype.togglePalette = function(id)
  173. {
  174. this.showPalette(id);
  175. };
  176. /**
  177. * Shows or hides palettes.
  178. */
  179. Sidebar.prototype.showPalettes = function(prefix, ids, visible)
  180. {
  181. for (var i = 0; i < ids.length; i++)
  182. {
  183. this.showPalette(prefix + ids[i], visible);
  184. }
  185. };
  186. /**
  187. * Shows or hides a palette.
  188. */
  189. Sidebar.prototype.showPalette = function(id, visible)
  190. {
  191. var elts = this.palettes[id];
  192. if (elts != null)
  193. {
  194. var vis = (visible != null) ? ((visible) ? 'block' : 'none') : (elts[0].style.display == 'none') ? 'block' : 'none';
  195. for (var i = 0; i < elts.length; i++)
  196. {
  197. elts[i].style.display = vis;
  198. }
  199. }
  200. };
  201. /**
  202. *
  203. */
  204. Sidebar.prototype.isEntryVisible = function(key)
  205. {
  206. for (var i = 0; i < this.configuration.length; i++)
  207. {
  208. if (this.configuration[i].id == key)
  209. {
  210. var id = (this.configuration[i].libs != null) ? ((this.configuration[i].prefix || '') + this.configuration[i].libs[0]) : key;
  211. var elts = this.palettes[id];
  212. if (elts != null)
  213. {
  214. return elts[0].style.display != 'none';
  215. }
  216. }
  217. }
  218. return false;
  219. };
  220. /**
  221. *
  222. */
  223. Sidebar.prototype.showEntries = function(stc, remember, force)
  224. {
  225. this.libs = (stc != null && (force || stc.length > 0)) ? stc : ((urlParams['libs'] != null &&
  226. urlParams['libs'].length > 0) ? decodeURIComponent(urlParams['libs']) : mxSettings.getLibraries());
  227. var tmp = this.libs.split(';');
  228. for (var i = 0; i < this.configuration.length; i++)
  229. {
  230. // Search has separate switch in Extras menu
  231. if (this.configuration[i].id != 'search')
  232. {
  233. this.showPalettes(this.configuration[i].prefix || '', this.configuration[i].libs || [this.configuration[i].id], mxUtils.indexOf(tmp, this.configuration[i].id) >= 0);
  234. }
  235. }
  236. if (remember)
  237. {
  238. mxSettings.setLibraries(stc);
  239. mxSettings.save();
  240. }
  241. };
  242. /**
  243. * Overrides the sidebar init.
  244. */
  245. Sidebar.prototype.init = function()
  246. {
  247. // Defines all entries for the sidebar. This is used in the MoreShapes dialog. Create screenshots using the savesidebar URL parameter and
  248. // http://www.alderg.com/merge.html for creating a vertical stack of PNG images if multiple sidebars are part of an entry.
  249. this.entries = [{title: mxResources.get('standard'),
  250. entries: [{title: mxResources.get('general'), id: 'general', image: IMAGE_PATH + '/sidebar-general.png'},
  251. {title: mxResources.get('arrows'), id: 'arrows2', image: IMAGE_PATH + '/sidebar-arrows2.png'},
  252. {title: mxResources.get('basic'), id: 'basic', image: IMAGE_PATH + '/sidebar-basic.png'},
  253. {title: mxResources.get('clipart'), id: 'clipart', image: IMAGE_PATH + '/sidebar-clipart.jpg'},
  254. {title: mxResources.get('flowchart'), id: 'flowchart', image: IMAGE_PATH + '/sidebar-flowchart.png'}]},
  255. {title: mxResources.get('software'),
  256. entries: [{title: mxResources.get('android'), id: 'android', image: IMAGE_PATH + '/sidebar-android.png'},
  257. {title: mxResources.get('bootstrap'), id: 'bootstrap', image: IMAGE_PATH + '/sidebar-bootstrap.png'},
  258. {title: mxResources.get('entityRelation'), id: 'er', image: IMAGE_PATH + '/sidebar-er.png'},
  259. {title: mxResources.get('ios'), id: 'ios', image: IMAGE_PATH + '/sidebar-ios.png'},
  260. {title: mxResources.get('mockups'), id: 'mockups', image: IMAGE_PATH + '/sidebar-mockups.png'},
  261. {title: mxResources.get('uml'), id: 'uml', image: IMAGE_PATH + '/sidebar-uml.png'}]},
  262. {title: mxResources.get('networking'),
  263. entries: [{title: mxResources.get('aws'), id: 'aws3', image: IMAGE_PATH + '/sidebar-aws3.png'},
  264. // TODO: Add isometric containers
  265. {title: mxResources.get('aws3d'), id: 'aws3d', image: IMAGE_PATH + '/sidebar-aws3d.png'},
  266. {title: mxResources.get('azure'), id: 'azure', image: IMAGE_PATH + '/sidebar-azure.png'},
  267. {title: 'Cloud & Enterprise', id: 'mscae', image: IMAGE_PATH + '/sidebar-mscae.png'},
  268. {title: mxResources.get('cisco'), id: 'cisco', image: IMAGE_PATH + '/sidebar-cisco.png'},
  269. {title: 'Citrix', id: 'citrix', image: IMAGE_PATH + '/sidebar-citrix.png'},
  270. {title: 'Google Cloud Platform', id: 'gcp', image: IMAGE_PATH + '/sidebar-gcp.png'},
  271. {title: 'Network', id: 'network', image: IMAGE_PATH + '/sidebar-network.png'},
  272. {title: 'Office', id: 'office', image: IMAGE_PATH + '/sidebar-office.png'},
  273. {title: mxResources.get('rack'), id: 'rack', image: IMAGE_PATH + '/sidebar-rack.png'},
  274. {title: 'Veeam', id: 'veeam', image: IMAGE_PATH + '/sidebar-veeam.png'}]},
  275. {title: mxResources.get('business'),
  276. entries: [{title: 'ArchiMate 3.0', id: 'archimate3', image: IMAGE_PATH + '/sidebar-archimate3.png'},
  277. {title: mxResources.get('archiMate21'), id: 'archimate', image: IMAGE_PATH + '/sidebar-archimate.png'},
  278. {title: mxResources.get('bpmn'), id: 'bpmn', image: IMAGE_PATH + '/sidebar-bpmn.png'},
  279. {title: mxResources.get('leanMapping'), id: 'lean_mapping', image: IMAGE_PATH + '/sidebar-leanmapping.png'},
  280. {title: mxResources.get('sysml'), id: 'sysml', image: IMAGE_PATH + '/sidebar-sysml.png'}]},
  281. {title: mxResources.get('other'),
  282. entries: [{title: mxResources.get('cabinets'), id: 'cabinets', image: IMAGE_PATH + '/sidebar-cabinets.png'},
  283. {title: mxResources.get('eip'), id: 'eip', image: IMAGE_PATH + '/sidebar-eip.png'},
  284. {title: mxResources.get('electrical'), id: 'electrical', image: IMAGE_PATH + '/sidebar-electrical.png'},
  285. {title: mxResources.get('floorplans'), id: 'floorplan', image: IMAGE_PATH + '/sidebar-floorplans.png'},
  286. {title: mxResources.get('gmdl'), id: 'gmdl', image: IMAGE_PATH + '/sidebar-gmdl.png'},
  287. {title: mxResources.get('procEng'), id: 'pid', image: IMAGE_PATH + '/sidebar-pid.png'},
  288. // TODO add to mxResources
  289. {title: 'Web Icons', id: 'webicons', image: IMAGE_PATH + '/sidebar-webIcons.png'},
  290. {title: mxResources.get('signs'), id: 'signs', image: IMAGE_PATH + '/sidebar-signs.png'}]}];
  291. // Uses server-side stencil search if online
  292. this.addStencilsToIndex = this.editorUi.isOffline();
  293. // Contains additional tags for shapes
  294. this.shapetags = {};
  295. // Adds tags from compressed text file for improved searches.
  296. if (this.tagIndex != null)
  297. {
  298. var text = this.editorUi.editor.graph.decompress(this.tagIndex);
  299. var lines = text.split('\n');
  300. for (var i = 0; i < lines.length; i++)
  301. {
  302. if (lines[i] != null)
  303. {
  304. var tags = lines[i].split('\t');
  305. if (tags.length > 1)
  306. {
  307. var key = tags[0].toLowerCase().replace(' ', '_');
  308. var value = mxUtils.trim(tags.slice(1, tags.length).join(' ').toLowerCase());
  309. if (value.length > 0)
  310. {
  311. this.shapetags[key] = value;
  312. }
  313. }
  314. }
  315. }
  316. }
  317. this.initPalettes();
  318. // Loads search index to avoid having to pre-parse the stencil files
  319. // before they are used for stencils that are not programmatically added
  320. if (!this.editorUi.isOffline())
  321. {
  322. mxUtils.get(this.searchFileUrl, mxUtils.bind(this, function(req)
  323. {
  324. var node = req.getDocumentElement();
  325. if (node != null)
  326. {
  327. var shapes = node.getElementsByTagName('shape');
  328. for (var i = 0; i < shapes.length; i++)
  329. {
  330. var style = shapes[i].getAttribute('style');
  331. var shapeStyle = this.extractShapeStyle(style);
  332. if (style != null && shapeStyle != null)
  333. {
  334. var lastDot = shapeStyle.lastIndexOf('.');
  335. if (lastDot > 0)
  336. {
  337. var pkg = shapeStyle.substring(0, lastDot);
  338. var stc = shapeStyle.substring(lastDot + 1, shapeStyle.length);
  339. var tags = this.getTagsForStencil(pkg, stc, shapes[i].getAttribute('tags'));
  340. // TODO: Use shapetags for programmatic stencils
  341. if (tags != null)
  342. {
  343. // Converts stencil name to lowercase
  344. var semi = style.indexOf(';');
  345. style = 'shape=' + pkg + '.' + stc.toLowerCase() + ';' +
  346. ((semi < 0) ? '' : style.substring(semi + 1));
  347. this.createVertexTemplateEntry(style, parseInt(shapes[i].getAttribute('w')),
  348. parseInt(shapes[i].getAttribute('h')), '', stc.replace(/_/g, ' '),
  349. null, null, this.filterTags(tags.join(' ')));
  350. }
  351. }
  352. }
  353. }
  354. }
  355. }));
  356. }
  357. }
  358. /**
  359. * Overridden to add image export via servlet
  360. */
  361. if (urlParams['savesidebar'] == '1')
  362. {
  363. Sidebar.prototype.addFoldingHandler = function(title, content, funct)
  364. {
  365. var initialized = false;
  366. // Avoids mixed content warning in IE6-8
  367. if (!mxClient.IS_IE || document.documentMode >= 8)
  368. {
  369. title.style.backgroundImage = (content.style.display == 'none') ?
  370. 'url(\'' + this.collapsedImage + '\')' : 'url(\'' + this.expandedImage + '\')';
  371. }
  372. title.style.backgroundRepeat = 'no-repeat';
  373. title.style.backgroundPosition = '0% 50%';
  374. var btn = document.createElement('button');
  375. btn.style.marginLeft = '4px';
  376. mxUtils.write(btn, 'Save');
  377. mxEvent.addListener(title, 'click', mxUtils.bind(this, function(evt)
  378. {
  379. if (mxEvent.getSource(evt).nodeName == 'BUTTON')
  380. {
  381. var title2 = title.cloneNode(true);
  382. title2.style.backgroundImage = '';
  383. title2.style.textDecoration = 'none';
  384. title2.style.fontWeight = 'bold';
  385. title2.style.fontSize = '14px';
  386. title2.style.color = 'rgb(80, 80, 80)';
  387. title2.style.width = '456px';
  388. title2.style.backgroundColor = '#ffffff';
  389. title2.style.paddingLeft = '6px';
  390. var btn2 = title2.getElementsByTagName('button')[0];
  391. btn2.parentNode.removeChild(btn2);
  392. var clone = content.cloneNode(true);
  393. clone.style.backgroundColor = '#ffffff';
  394. clone.style.borderColor = 'transparent';
  395. clone.style.width = '456px';
  396. var html = '<!DOCTYPE html><html><head><link rel="stylesheet" type="text/css" href="https://www.draw.io/styles/grapheditor.css">' +
  397. '</head><body style="background:#ffffff;font-family:Helvetica,Arial;">' +
  398. title2.outerHTML + clone.outerHTML + '</body></html>';
  399. clone.style.position = 'absolute';
  400. window.document.body.appendChild(clone);
  401. var h = clone.clientHeight + 18;
  402. clone.parentNode.removeChild(clone);
  403. new mxXmlRequest(EXPORT_URL, 'w=456&h=' + h + '&html=' + encodeURIComponent(
  404. this.editorUi.editor.graph.compress(html))).simulate(document, '_blank');
  405. return;
  406. }
  407. if (content.style.display == 'none')
  408. {
  409. if (!initialized)
  410. {
  411. initialized = true;
  412. if (funct != null)
  413. {
  414. if (btn.parentNode != null)
  415. {
  416. btn.parentNode.removeChild(btn);
  417. }
  418. // Wait cursor does not show up on Mac
  419. title.style.cursor = 'wait';
  420. var prev = title.innerHTML;
  421. title.innerHTML = mxResources.get('loading') + '...';
  422. window.setTimeout(function()
  423. {
  424. funct(content);
  425. title.style.cursor = '';
  426. title.innerHTML = prev;
  427. title.appendChild(btn);
  428. }, 0);
  429. }
  430. else
  431. {
  432. title.appendChild(btn);
  433. }
  434. }
  435. else
  436. {
  437. title.appendChild(btn);
  438. }
  439. title.style.backgroundImage = 'url(\'' + this.expandedImage + '\')';
  440. content.style.display = 'block';
  441. }
  442. else
  443. {
  444. title.style.backgroundImage = 'url(\'' + this.collapsedImage + '\')';
  445. content.style.display = 'none';
  446. if (btn.parentNode != null)
  447. {
  448. btn.parentNode.removeChild(btn);
  449. }
  450. }
  451. mxEvent.consume(evt);
  452. }));
  453. };
  454. }
  455. /**
  456. * Overridden to use shapetags to improve search results.
  457. */
  458. Sidebar.prototype.extractShapeStyle = function(style)
  459. {
  460. if (style != null && style.substring(0, 6) == 'shape=')
  461. {
  462. var semi = style.indexOf(';');
  463. if (semi < 0)
  464. {
  465. semi = style.length;
  466. }
  467. return style.substring(6, semi);
  468. }
  469. return null;
  470. };
  471. /**
  472. * Overridden to use shapetags to improve search results.
  473. */
  474. var sidebarGetTagsForStencil = Sidebar.prototype.getTagsForStencil;
  475. Sidebar.prototype.getTagsForStencil = function(pkg, stc, moreTags)
  476. {
  477. var tags = sidebarGetTagsForStencil.apply(this, arguments);
  478. // Adds tags from tags file
  479. if (this.shapetags != null)
  480. {
  481. pkg = pkg.toLowerCase();
  482. stc = stc.toLowerCase();
  483. if (this.shapetags[pkg] != null)
  484. {
  485. tags.push(this.shapetags[pkg]);
  486. }
  487. stc = pkg + '.' + stc;
  488. if (this.shapetags[stc] != null)
  489. {
  490. tags.push(this.shapetags[stc]);
  491. }
  492. }
  493. return tags;
  494. };
  495. /**
  496. * Overrides the sidebar init.
  497. */
  498. Sidebar.prototype.initPalettes = function()
  499. {
  500. var imgDir = GRAPH_IMAGE_PATH;
  501. var dir = STENCIL_PATH;
  502. var signs = this.signs;
  503. var gcp = this.gcp;
  504. var rack = this.rack;
  505. var pids = this.pids;
  506. var cisco = this.cisco;
  507. var sysml = this.sysml;
  508. var eip = this.eip;
  509. var gmdl = this.gmdl;
  510. var office = this.office;
  511. var veeam = this.veeam;
  512. var archimate3 = this.archimate3;
  513. var electrical = this.electrical;
  514. if (urlParams['createindex'] == '1')
  515. {
  516. mxLog.show();
  517. mxLog.textarea.value = '';
  518. }
  519. this.addSearchPalette(true);
  520. this.addGeneralPalette(true);
  521. this.addMiscPalette(false);
  522. this.addAdvancedPalette(false);
  523. this.addUmlPalette(false);
  524. this.addErPalette();
  525. this.addBasicPalette();
  526. this.addFlowchartPalette();
  527. this.addNetworkPalette();
  528. this.addAzurePalette();
  529. this.addCitrixPalette();
  530. this.addMSCAEPalette();
  531. this.addBpmnPalette(dir, false);
  532. this.addAWS3Palette();
  533. this.addAWS3DPalette();
  534. this.addLeanMappingPalette();
  535. this.addIos7Palette();
  536. this.addIosPalette();
  537. this.addAndroidPalette();
  538. this.addMockupPalette();
  539. this.addElectricalPalette();
  540. this.addOfficePalette();
  541. this.addVeeamPalette();
  542. this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',
  543. ';html=1;' + mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;' + mxConstants.STYLE_STROKEWIDTH + '=2;strokeColor=#000000;');
  544. this.addArrows2Palette();
  545. this.addImagePalette('computer', 'Clipart / Computer', imgDir
  546. + '/lib/clip_art/computers/', '_128x128.png', ['Antivirus',
  547. 'Data_Filtering', 'Database', 'Database_Add', 'Database_Minus',
  548. 'Database_Move_Stack', 'Database_Remove', 'Fujitsu_Tablet',
  549. 'Harddrive', 'IBM_Tablet', 'iMac', 'iPad', 'Laptop', 'MacBook',
  550. 'Mainframe', 'Monitor', 'Monitor_Tower',
  551. 'Monitor_Tower_Behind', 'Netbook', 'Network', 'Network_2',
  552. 'Printer', 'Printer_Commercial', 'Secure_System', 'Server',
  553. 'Server_Rack', 'Server_Rack_Empty', 'Server_Rack_Partial',
  554. 'Server_Tower', 'Software', 'Stylus', 'Touch', 'USB_Hub',
  555. 'Virtual_Application', 'Virtual_Machine', 'Virus',
  556. 'Workstation' ], [ 'Antivirus', 'Data Filtering', 'Database',
  557. 'Database Add', 'Database Minus', 'Database Move Stack',
  558. 'Database Remove', 'Fujitsu Tablet', 'Harddrive', 'IBMTablet',
  559. 'iMac', 'iPad', 'Laptop', 'MacBook', 'Mainframe', 'Monitor',
  560. 'Monitor Tower', 'Monitor Tower Behind', 'Netbook', 'Network',
  561. 'Network 2', 'Printer', 'Printer Commercial', 'Secure System',
  562. 'Server', 'Server Rack', 'Server Rack Empty', 'Server Rack Partial',
  563. 'Server Tower', 'Software', 'Stylus', 'Touch', 'USB Hub',
  564. 'Virtual Application', 'Virtual Machine', 'Virus', 'Workstation']);
  565. this.addImagePalette('finance', 'Clipart / Finance', imgDir
  566. + '/lib/clip_art/finance/', '_128x128.png', [ 'Arrow_Down',
  567. 'Arrow_Up', 'Coins', 'Credit_Card', 'Dollar', 'Graph',
  568. 'Pie_Chart', 'Piggy_Bank', 'Safe', 'Shopping_Cart',
  569. 'Stock_Down', 'Stock_Up'], ['Arrow_Down', 'Arrow Up',
  570. 'Coins', 'Credit Card', 'Dollar', 'Graph', 'Pie Chart',
  571. 'Piggy Bank', 'Safe', 'Shopping Basket', 'Stock Down', 'Stock Up']);
  572. this.addImagePalette('clipart', 'Clipart / Various', imgDir
  573. + '/lib/clip_art/general/', '_128x128.png', [ 'Battery_0',
  574. 'Battery_100', 'Battery_50', 'Battery_75', 'Battery_allstates',
  575. 'Bluetooth', 'Earth_globe', 'Empty_Folder', 'Full_Folder',
  576. 'Gear', 'Keys', 'Lock', 'Mouse_Pointer', 'Plug', 'Ships_Wheel',
  577. 'Star', 'Tire' ], [ 'Battery 0%', 'Battery 100%', 'Battery 50%',
  578. 'Battery 75%', 'Battery', 'Bluetooth', 'Globe',
  579. 'Empty Folder', 'Full Folder', 'Gear', 'Keys', 'Lock', 'Mousepointer',
  580. 'Plug', 'Ships Wheel', 'Star', 'Tire']);
  581. this.addImagePalette('networking', 'Clipart / Networking', imgDir
  582. + '/lib/clip_art/networking/', '_128x128.png', ['Bridge',
  583. 'Certificate', 'Certificate_Off', 'Cloud', 'Cloud_Computer',
  584. 'Cloud_Computer_Private', 'Cloud_Rack', 'Cloud_Rack_Private',
  585. 'Cloud_Server', 'Cloud_Server_Private', 'Cloud_Storage',
  586. 'Concentrator', 'Email', 'Firewall_02', 'Firewall',
  587. 'Firewall-page1', 'Ip_Camera', 'Modem',
  588. 'power_distribution_unit', 'Print_Server',
  589. 'Print_Server_Wireless', 'Repeater', 'Router', 'Router_Icon',
  590. 'Switch', 'UPS', 'Wireless_Router', 'Wireless_Router_N'],
  591. ['Bridge', 'Certificate', 'Certificate Off', 'Cloud', 'Cloud Computer',
  592. 'Cloud Computer Private', 'Cloud Rack', 'Cloud Rack Private',
  593. 'Cloud Server', 'Cloud Server Private', 'Cloud Storage',
  594. 'Concentrator', 'Email', 'Firewall 1', 'Firewall 2',
  595. 'Firewall', 'Camera', 'Modem',
  596. 'Power Distribution Unit', 'Print Server',
  597. 'Print Server Wireless', 'Repeater', 'Router', 'Router Icon',
  598. 'Switch', 'UPS', 'Wireless Router', 'Wireless Router N'],
  599. {'Wireless_Router': 'wireless router switch wap wifi access point wlan',
  600. 'Wireless_Router_N': 'wireless router switch wap wifi access point wlan',
  601. 'Router': 'router switch',
  602. 'Router_Icon': 'router switch'});
  603. this.addImagePalette('people', 'Clipart / People', imgDir
  604. + '/lib/clip_art/people/', '_128x128.png', ['Suit_Man',
  605. 'Suit_Man_Black', 'Suit_Man_Blue', 'Suit_Man_Green',
  606. 'Suit_Man_Green_Black', 'Suit_Woman', 'Suit_Woman_Black',
  607. 'Suit_Woman_Blue', 'Suit_Woman_Green',
  608. 'Suit_Woman_Green_Black', 'Construction_Worker_Man',
  609. 'Construction_Worker_Man_Black', 'Construction_Worker_Woman',
  610. 'Construction_Worker_Woman_Black', 'Doctor_Man',
  611. 'Doctor_Man_Black', 'Doctor_Woman', 'Doctor_Woman_Black',
  612. 'Farmer_Man', 'Farmer_Man_Black', 'Farmer_Woman',
  613. 'Farmer_Woman_Black', 'Nurse_Man', 'Nurse_Man_Black',
  614. 'Nurse_Man_Green', 'Nurse_Man_Red', 'Nurse_Woman',
  615. 'Nurse_Woman_Black', 'Nurse_Woman_Green', 'Nurse_Woman_Red',
  616. 'Military_Officer', 'Military_Officer_Black',
  617. 'Military_Officer_Woman', 'Military_Officer_Woman_Black',
  618. 'Pilot_Man', 'Pilot_Man_Black', 'Pilot_Woman',
  619. 'Pilot_Woman_Black', 'Scientist_Man', 'Scientist_Man_Black',
  620. 'Scientist_Woman', 'Scientist_Woman_Black', 'Security_Man',
  621. 'Security_Man_Black', 'Security_Woman', 'Security_Woman_Black',
  622. 'Soldier', 'Soldier_Black', 'Tech_Man', 'Tech_Man_Black',
  623. 'Telesales_Man', 'Telesales_Man_Black', 'Telesales_Woman',
  624. 'Telesales_Woman_Black', 'Waiter', 'Waiter_Black',
  625. 'Waiter_Woman', 'Waiter_Woman_Black', 'Worker_Black',
  626. 'Worker_Man', 'Worker_Woman', 'Worker_Woman_Black']);
  627. this.addImagePalette('telco', 'Clipart / Telecommunication', imgDir
  628. + '/lib/clip_art/telecommunication/', '_128x128.png', [
  629. 'BlackBerry', 'Cellphone', 'HTC_smartphone', 'iPhone',
  630. 'Palm_Treo', 'Signal_tower_off', 'Signal_tower_on' ],
  631. ['BlackBerry', 'Cellphone', 'HTC smartphone', 'iPhone',
  632. 'Palm Treo', 'Signaltower off', 'Signaltower on']);
  633. for (var i = 0; i < signs.length; i++)
  634. {
  635. this.addStencilPalette('signs' + signs[i], 'Signs / ' + signs[i],
  636. dir + '/signs/' + signs[i].toLowerCase() + '.xml',
  637. ';html=1;fillColor=#000000;strokeColor=none;verticalLabelPosition=bottom;verticalAlign=top;align=center;');
  638. }
  639. for (var i = 0; i < gcp.length; i++)
  640. {
  641. this.addStencilPalette('gcp' + gcp[i], 'GCP / ' + gcp[i],
  642. dir + '/gcp/' + gcp[i].toLowerCase().replace(/ /g, '_') + '.xml',
  643. ';html=1;fillColor=#4387FD;gradientColor=#4683EA;strokeColor=none;verticalLabelPosition=bottom;verticalAlign=top;align=center;');
  644. }
  645. for (var i = 0; i < rack.length; i++)
  646. {
  647. if (rack[i].toLowerCase() === 'general')
  648. {
  649. this.addRackGeneralPalette();
  650. }
  651. else if (rack[i].toLowerCase() === 'f5')
  652. {
  653. this.addRackF5Palette();
  654. }
  655. else
  656. {
  657. this.addStencilPalette('rack' + rack[i], 'Rack / ' + rack[i],
  658. dir + '/rack/' + rack[i].toLowerCase() + '.xml',
  659. ';html=1;labelPosition=right;align=left;spacingLeft=15;dashed=0;shadow=0;fillColor=#ffffff;');
  660. }
  661. }
  662. for (var i = 0; i < pids.length; i++)
  663. {
  664. if (pids[i] == 'Instruments')
  665. {
  666. this.addPidInstrumentsPalette();
  667. }
  668. else if (pids[i] == 'Misc')
  669. {
  670. this.addPidMiscPalette();
  671. }
  672. else if (pids[i] == 'Valves')
  673. {
  674. this.addPidValvesPalette();
  675. }
  676. else if (pids[i] == 'Compressors')
  677. {
  678. this.addPidCompressorsPalette();
  679. }
  680. else if (pids[i] == 'Engines')
  681. {
  682. this.addPidEnginesPalette();
  683. }
  684. else if (pids[i] == 'Filters')
  685. {
  686. this.addPidFiltersPalette();
  687. }
  688. else if (pids[i] == 'Flow Sensors')
  689. {
  690. this.addPidFlowSensorsPalette();
  691. }
  692. else if (pids[i] == 'Piping')
  693. {
  694. this.addPidPipingPalette();
  695. }
  696. else
  697. {
  698. this.addStencilPalette('pid' + pids[i], 'Proc. Eng. / ' + pids[i],
  699. dir + '/pid/' + pids[i].toLowerCase().replace(' ', '_') + '.xml',
  700. ';html=1;align=center;' + mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;dashed=0;');
  701. }
  702. }
  703. for (var i = 0; i < sysml.length; i++)
  704. {
  705. if (sysml[i] == 'Model Elements')
  706. {
  707. this.addSysMLModelElementsPalette();
  708. }
  709. else if (sysml[i] == 'Blocks')
  710. {
  711. this.addSysMLBlocksPalette();
  712. }
  713. else if (sysml[i] == 'Ports and Flows')
  714. {
  715. this.addSysMLPortsAndFlowsPalette();
  716. }
  717. else if (sysml[i] == 'Constraint Blocks')
  718. {
  719. this.addSysMLConstraintBlocksPalette();
  720. }
  721. else if (sysml[i] == 'Activities')
  722. {
  723. this.addSysMLActivitiesPalette();
  724. }
  725. else if (sysml[i] == 'Interactions')
  726. {
  727. this.addSysMLInteractionsPalette();
  728. }
  729. else if (sysml[i] == 'State Machines')
  730. {
  731. this.addSysMLStateMachinesPalette();
  732. }
  733. else if (sysml[i] == 'Use Cases')
  734. {
  735. this.addSysMLUseCasesPalette();
  736. }
  737. else if (sysml[i] == 'Allocations')
  738. {
  739. this.addSysMLAllocationsPalette();
  740. }
  741. else if (sysml[i] == 'Requirements')
  742. {
  743. this.addSysMLRequirementsPalette();
  744. }
  745. else if (sysml[i] == 'Profiles')
  746. {
  747. this.addSysMLProfilesPalette();
  748. }
  749. else if (sysml[i] == 'Stereotypes')
  750. {
  751. this.addSysMLStereotypesPalette();
  752. }
  753. }
  754. for (var i = 0; i < eip.length; i++)
  755. {
  756. if (eip[i] == 'Message Construction')
  757. {
  758. this.addEipMessageConstructionPalette();
  759. }
  760. else if (eip[i] == 'Message Routing')
  761. {
  762. this.addEipMessageRoutingPalette();
  763. }
  764. else if (eip[i] == 'Message Transformation')
  765. {
  766. this.addEipMessageTransformationPalette();
  767. }
  768. else if (eip[i] == 'Messaging Channels')
  769. {
  770. this.addEipMessagingChannelsPalette();
  771. }
  772. else if (eip[i] == 'Messaging Endpoints')
  773. {
  774. this.addEipMessagingEndpointsPalette();
  775. }
  776. else if (eip[i] == 'Messaging Systems')
  777. {
  778. this.addEipMessagingSystemsPalette();
  779. }
  780. else if (eip[i] == 'System Management')
  781. {
  782. this.addEipSystemManagementPalette();
  783. }
  784. }
  785. for (var i = 0; i < cisco.length; i++)
  786. {
  787. this.addStencilPalette('cisco' + cisco[i], 'Cisco / ' + cisco[i],
  788. dir + '/cisco/' + cisco[i].toLowerCase().replace(/ /g, '_') + '.xml',
  789. ';html=1;dashed=0;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top', null, null, 1.6);
  790. }
  791. this.addFloorplanPalette();
  792. this.addBootstrapPalette();
  793. for (var i = 0; i < gmdl.length; i++)
  794. {
  795. if (gmdl[i] == 'Bottom Navigation')
  796. {
  797. this.addGMDLBottomNavigationPalette();
  798. }
  799. else if (gmdl[i] == 'Bottom Sheets')
  800. {
  801. this.addGMDLBottomSheetsPalette();
  802. }
  803. else if (gmdl[i] == 'Buttons')
  804. {
  805. this.addGMDLButtonsPalette();
  806. }
  807. else if (gmdl[i] == 'Cards')
  808. {
  809. this.addGMDLCardsPalette();
  810. }
  811. else if (gmdl[i] == 'Chips')
  812. {
  813. this.addGMDLChipsPalette();
  814. }
  815. else if (gmdl[i] == 'Dialogs')
  816. {
  817. this.addGMDLDialogsPalette();
  818. }
  819. else if (gmdl[i] == 'Dividers')
  820. {
  821. this.addGMDLDividersPalette();
  822. }
  823. else if (gmdl[i] == 'Grid Lists')
  824. {
  825. this.addGMDLGridListsPalette();
  826. }
  827. else if (gmdl[i] == 'Icons')
  828. {
  829. this.addGMDLIconsPalette();
  830. }
  831. else if (gmdl[i] == 'Lists')
  832. {
  833. this.addGMDLListsPalette();
  834. }
  835. else if (gmdl[i] == 'Menus')
  836. {
  837. this.addGMDLMenusPalette();
  838. }
  839. else if (gmdl[i] == 'Misc')
  840. {
  841. this.addGMDLMiscPalette();
  842. }
  843. else if (gmdl[i] == 'Pickers')
  844. {
  845. this.addGMDLPickersPalette();
  846. }
  847. else if (gmdl[i] == 'Selection Controls')
  848. {
  849. this.addGMDLSelectionControlsPalette();
  850. }
  851. else if (gmdl[i] == 'Sliders')
  852. {
  853. this.addGMDLSlidersPalette();
  854. }
  855. else if (gmdl[i] == 'Steppers')
  856. {
  857. this.addGMDLSteppersPalette();
  858. }
  859. else if (gmdl[i] == 'Tabs')
  860. {
  861. this.addGMDLTabsPalette();
  862. }
  863. else if (gmdl[i] == 'Text Fields')
  864. {
  865. this.addGMDLTextFieldsPalette();
  866. }
  867. }
  868. this.addCabinetsPalette();
  869. this.addArchimate3Palette();
  870. this.addArchiMatePalette();
  871. this.addWebIconsPalette();
  872. this.addWebLogosPalette();
  873. // LATER: Check if conflicts with restore libs after loading file
  874. this.showEntries();
  875. };
  876. /**
  877. * Overridden to manually create search index for stencil files which are not pre-loaded
  878. * and no entries are created programmatically.
  879. */
  880. if (urlParams['createindex'] == '1')
  881. {
  882. var sidebarAddStencilPalette = Sidebar.prototype.addStencilPalette;
  883. Sidebar.prototype.addStencilPalette = function(id, title, stencilFile, style, ignore, onInit, scale, tags)
  884. {
  885. sidebarAddStencilPalette.apply(this, arguments);
  886. scale = (scale != null) ? scale : 1;
  887. // Used for creating index
  888. mxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)
  889. {
  890. if (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)
  891. {
  892. var tmpTags = (tags != null) ? tags[stencilName] : null;
  893. mxLog.debug('<shape style="shape=' + packageName + stencilName + style + '" ' +
  894. 'w="' + Math.round(w * scale) + '" h="' + Math.round(h * scale) + '"' +
  895. ((tmpTags != null) ? ' tags="' + tmpTags + '"' : '') + '/>');
  896. }
  897. }), true);
  898. };
  899. }
  900. /**
  901. * Adds server icon results to local search results
  902. */
  903. var sidebarSearchEntries = Sidebar.prototype.searchEntries;
  904. Sidebar.prototype.searchEntries = function(searchTerms, count, page, success, error)
  905. {
  906. var succ = success;
  907. // Logs search terms for improving search results
  908. if (this.editorUi.enableLogging && !this.editorUi.isOffline() && page == 0)
  909. {
  910. try
  911. {
  912. var img = new Image();
  913. var logDomain = window.DRAWIO_LOG_URL != null ? window.DRAWIO_LOG_URL : '';
  914. img.src = logDomain + '/log?severity=CONFIG&msg=shapesearch:' + encodeURIComponent(searchTerms) + '&v=' + encodeURIComponent(EditorUi.VERSION);
  915. }
  916. catch (e)
  917. {
  918. // ignore
  919. }
  920. }
  921. success = mxUtils.bind(this, function(results, len, more, terms)
  922. {
  923. if (!this.editorUi.isOffline() && results.length <= count / 4)
  924. {
  925. var pg = page - Math.ceil((len - count / 4) / count);
  926. mxUtils.get(ICONSEARCH_PATH + '?v=2&q=' + encodeURIComponent(searchTerms) +
  927. '&p=' + pg + '&c=' + count, mxUtils.bind(this, function(req)
  928. {
  929. try
  930. {
  931. if (req.getStatus() >= 200 && req.getStatus() <= 299)
  932. {
  933. var res = JSON.parse(req.getText());
  934. for (var i = 0; i < res.icons.length; i++)
  935. {
  936. var sizes = res.icons[i].raster_sizes;
  937. var index = sizes.length - 1;
  938. while (index > 0 && sizes[index].size > 128)
  939. {
  940. index--;
  941. }
  942. var size = sizes[index].size;
  943. var url = sizes[index].formats[0].preview_url;
  944. if (size != null && url != null)
  945. {
  946. (mxUtils.bind(this, function(s, u)
  947. {
  948. results.push(mxUtils.bind(this, function()
  949. {
  950. return this.createVertexTemplate('shape=image;html=1;verticalAlign=top;' +
  951. 'verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;' +
  952. 'aspect=fixed;image=' + u, s, s, '');
  953. }));
  954. }))(size, url);
  955. }
  956. }
  957. succ(results, (page - 1) * count + results.length, res.icons.length == count, terms);
  958. }
  959. else
  960. {
  961. succ(results, len, false, terms);
  962. this.editorUi.handleError({message: mxResources.get('unknownError')});
  963. }
  964. }
  965. catch (e)
  966. {
  967. succ(results, len, false, terms);
  968. this.editorUi.handleError(e);
  969. }
  970. },
  971. function()
  972. {
  973. succ(results, len, false, terms);
  974. }));
  975. }
  976. else
  977. {
  978. succ(results, len, more || !this.editorUi.isOffline(), terms);
  979. }
  980. });
  981. sidebarSearchEntries.apply(this, arguments);
  982. };
  983. /**
  984. * Adds a click handler for inserting the cell as target for dangling edge.
  985. */
  986. var sidebarItemClicked = Sidebar.prototype.itemClicked;
  987. Sidebar.prototype.itemClicked = function(cells, ds, evt)
  988. {
  989. var graph = this.editorUi.editor.graph;
  990. var handled = false;
  991. if (cells != null && graph.getSelectionCount() == 1 && graph.getModel().isVertex(cells[0]))
  992. {
  993. var target = graph.cloneCells(cells)[0];
  994. // Inserts cell as target of selected edge if not connected
  995. if (graph.getModel().isEdge(graph.getSelectionCell()) && graph.getModel().getTerminal(graph.getSelectionCell(), false) == null &&
  996. graph.getModel().isVertex(target))
  997. {
  998. graph.getModel().beginUpdate();
  999. try
  1000. {
  1001. var edgeState = graph.view.getState(graph.getSelectionCell());
  1002. if (edgeState != null)
  1003. {
  1004. var tr = graph.view.translate;
  1005. var s = graph.view.scale;
  1006. var pt = edgeState.absolutePoints[edgeState.absolutePoints.length - 1];
  1007. target.geometry.x = pt.x / s - tr.x - target.geometry.width / 2;
  1008. target.geometry.y = pt.y / s - tr.y - target.geometry.height / 2;
  1009. }
  1010. graph.addCell(target);
  1011. graph.getModel().setTerminal(graph.getSelectionCell(), target, false);
  1012. }
  1013. finally
  1014. {
  1015. graph.getModel().endUpdate();
  1016. }
  1017. graph.scrollCellToVisible(target);
  1018. graph.setSelectionCell(target);
  1019. handled = true;
  1020. }
  1021. }
  1022. if (!handled)
  1023. {
  1024. sidebarItemClicked.apply(this, arguments);
  1025. }
  1026. };
  1027. })();