Sidebar.js 51 KB

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