Sidebar-ER.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. (function()
  2. {
  3. // Adds ER shapes
  4. Sidebar.prototype.addErPalette = function()
  5. {
  6. // Avoids having to bind all functions to "this"
  7. var sb = this;
  8. // Reusable cells
  9. var row = new mxCell('Item', new mxGeometry(0, 0, 40, 30), 'text;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fontSize=12;whiteSpace=wrap;html=1;');
  10. row.vertex = true;
  11. // Predefined dimensions
  12. var w = 100;
  13. var h = 100;
  14. // Default tags
  15. var dt = 'db database schema er entity relation table ';
  16. function createEdge(style, m, n)
  17. {
  18. var edge = new mxCell('', new mxGeometry(0, 0, 0, 0), style);
  19. edge.geometry.setTerminalPoint(new mxPoint(0, 0), true);
  20. edge.geometry.setTerminalPoint(new mxPoint(160, 0), false);
  21. edge.geometry.relative = true;
  22. edge.edge = true;
  23. if (m != null)
  24. {
  25. var cell1 = new mxCell(m, new mxGeometry(-1, 0, 0, 0), 'resizable=0;html=1;whiteSpace=wrap;align=left;verticalAlign=bottom;');
  26. cell1.geometry.relative = true;
  27. cell1.setConnectable(false);
  28. cell1.vertex = true;
  29. edge.insert(cell1);
  30. }
  31. if (n != null)
  32. {
  33. var cell2 = new mxCell(n, new mxGeometry(1, 0, 0, 0), 'resizable=0;html=1;whiteSpace=wrap;align=right;verticalAlign=bottom;');
  34. cell2.geometry.relative = true;
  35. cell2.setConnectable(false);
  36. cell2.vertex = true;
  37. edge.insert(cell2);
  38. }
  39. return edge;
  40. };
  41. this.setCurrentSearchEntryLibrary('er');
  42. var fns = [
  43. this.addDataEntry(dt, 180, 160, 'Table 1', '7ZnfbpswFMafhtuJPyNrbqFbNy2TpqZ7ADc+AUvGZsYZSZ9+x9gkVQhtMqVkopGIZB8fn9jfz/4uwIvSYn2nSJn/kBS4F332olRJqW2rWKfAuRf6jHrRrReGPv688EvPaNCM+iVRIPQxE0I74Q/hK7CRB/LIwUYrveEuWuWkNE3djEZJpYnSc/ZkYpGPgYUUmjABCgNB0+eclBVr0m0kZ5zOyEaudFuo7SVLtgZ6L+vK5SpZz7CY6ZriSyw+d4sxw4SzTGB7gbs0/5goqHAtM1Jpl5Hrgrum2yEoDetelZqQk+gOZAFabTClZlTnLuPGKunnwLK8nRa7IKlsINvO3YmODaf7YQZRh8HL8qNOZodSsScjOnciPUfS9GtWcCLgKxC6F0ok3bTSMs5TyaXhJqSADjqTRJUsH4jKQLtAKZnQzZbjBB8UIfU/xF6Ma02xH+z6+Jh0pVMpKq3wiJgagKRqMLQSLUtXlMOyra+cxKb9KLWWxSkww8MwN05uh+w1ttEZ0H7soP35vRcubkEzwu9hoYnIuEUhhOnuUBzgdVDBrWr7cu7fJYliLrk5Urc5oxTwXiV1zjTMS7IwSTWa0z/cqOjVGxWdKLorttPn5GqEo10IovECrAStOiS36zwKbtyB+0uw3yv4dnthxK092tykQpBMZDM7c7J3BuLhz8C6/yLGZz0TR5U776GYXM38KDP3z2PmkwHN/NPxaIe550BZW+8tnXwyeie/6ZA11zL0g//dyAdGPmbjnl6Ne0jjng5o3IH/Tp17OnrnDoIe67404YtZdw/zMVt30H2LdfXuN/TuIBzSvE94PTYq8w56IIzJvbvvx6x7R+/Vvfugj8i+sbv7vmHTn3/++As='),
  44. this.addDataEntry(dt, 180, 160, 'Table 2', '7Zlvb9owEMY/Td5O+VNYeZt07aQyaSr9Ai4+EkuOHTlmgX76nWOnUELWINFQZUgg+S7nI35+9gMKXpTkmwdFiuyXpMC96IcXJUpKbUf5JgHOvdBn1IvuvDD08e2F9x1Xg/qqXxAFQveZENo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LxX3tiEt0/NQWH+1s8pB9e8n8A'),
  47. this.addDataEntry(dt + ' fk pk foreign key primary', 180, 30, 'Table Row 3', 'xVXbjpswEP0aXisCpeozpN2tmkrVpv0AbzwBa42H2pNC9us7xs5lc9EStepKIHkO48P4nLGd5FU73FnRNd9Qgk7yT0leWUQKo3aoQOskS5VM8nmSZSm/Sfb5ytfZ+DXthAVDUyZkYcJvoTcQkAA42uoIuEZ0fkji0UOlI2FpqZ49lnK8QkNCGbAcz8ZYa9E5NWYHpFFaLsQWN7Tj2UXlWg0gH7B3Mddiv2AyF8nXTL6MtfhYaFUbHq94ff6PpQXHpSyEo0jgyOITVKjRF2TQwPgXrU+gl2V67igFWILhqpwjFLW8A2yB7JZTeiWpiRkfg+RpA6pu4rQ8YsKFuN5PPZjDg+jPZa/yG71iVXlVDVr17C3ScZmn/rletVoYuAchT6AS5XZnxBQFpcXuh7A1UAQ6VIbGJRclPyxClb4rkoJrrTieHWJ+fLqlCg1byA3lOYB97cF7WxJ2kVTDesdvo8J+/IhE2MYumORl9nZevj/z8vvXq25yzaSEfoAVCVProL0xPjxof8Ggi5LtZTrV73ireQmR1Vtr30PzRkkJvO3KvlEEy06sfFLPp5ZvMGr1Larnr6qe3yh6JDvoczOb0HyaGEHc8Rsj3ZmT+zonmVucmfvTqF8b+DJ/Y4t3p2fILR0bqUy9CDM/nPRA8f97YHjpzvFGLP5pT0yi+6um4PBwi4f040v+Dw=='),
  48. this.addEntry(dt + ' list', function()
  49. {
  50. var cell = new mxCell('List', new mxGeometry(0, 0, 160, 110),
  51. 'swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;align=center;fontSize=14;');
  52. cell.vertex = true;
  53. cell.insert(sb.cloneCell(row, 'Item 1'));
  54. cell.insert(sb.cloneCell(row, 'Item 2'));
  55. cell.insert(sb.cloneCell(row, 'Item 3'));
  56. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'List');
  57. }),
  58. this.addEntry(dt + ' list', function()
  59. {
  60. return sb.createVertexTemplateFromCells([row.clone()], row.geometry.width, row.geometry.height, 'List Item 1');
  61. }),
  62. this.addEntry(dt + 'table row', function()
  63. {
  64. var cell = new mxCell(row.value, new mxGeometry(0, 0, 90, row.geometry.height), 'shape=partialRectangle;fillColor=none;align=left;verticalAlign=middle;strokeColor=none;spacingLeft=34;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;');
  65. cell.vertex = true;
  66. var cell1 = sb.cloneCell(row, '');
  67. cell1.connectable = false;
  68. cell1.style = 'shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;stokeWidth=1;dashed=1;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;'
  69. cell1.geometry.width = 30;
  70. cell.insert(cell1);
  71. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'List Item 2');
  72. }),
  73. this.addEntry(dt + 'table row divider hline line separator', function()
  74. {
  75. var divider = new mxCell('', new mxGeometry(0, 0, 60, 10), 'line;strokeWidth=1;rotatable=0;dashed=0;labelPosition=right;align=left;verticalAlign=middle;spacingTop=0;spacingLeft=6;points=[];portConstraint=eastwest;');
  76. divider.vertex = true;
  77. return sb.createVertexTemplateFromCells([divider], divider.geometry.width, divider.geometry.height, 'List Item 3');
  78. }),
  79. this.addEntry(dt + 'table', function()
  80. {
  81. var cell = new mxCell('Entity', new mxGeometry(0, 0, 160, 120),
  82. 'swimlane;childLayout=stackLayout;horizontal=1;startSize=50;horizontalStack=0;rounded=1;fontSize=14;fontStyle=0;strokeWidth=2;resizeParent=0;resizeLast=1;shadow=0;dashed=0;align=center;arcSize=4;whiteSpace=wrap;html=1;');
  83. cell.vertex = true;
  84. var cell1 = new mxCell('+Attribute1\n+Attribute2\n+Attribute3', new mxGeometry(0, 30, 160, 90),
  85. 'align=left;strokeColor=none;fillColor=none;spacingLeft=4;fontSize=12;verticalAlign=top;resizable=0;rotatable=0;part=1;html=1;');
  86. cell1.vertex = true;
  87. cell.insert(cell1);
  88. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Entity');
  89. }),
  90. this.createVertexTemplateEntry('whiteSpace=wrap;html=1;align=center;', 100, 40, 'Entity', 'Entity', null, null, dt),
  91. this.createVertexTemplateEntry('rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;', 100, 40, 'Entity', 'Entity (Rounded)', null, null, dt + 'chen'),
  92. this.createVertexTemplateEntry('shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;', 100, 40, 'Entity', 'Weak Entity', null, null, dt + 'chen'),
  93. this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;',
  94. 100, 40, 'Attribute', 'Attribute', null, null, dt + 'attribute chen'),
  95. this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;',
  96. 100, 40, 'Attribute', 'Key Attribute', null, null, dt + 'attribute key chen'),
  97. this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;',
  98. 100, 40, '<span style="border-bottom: 1px dotted">Attribute</span>', 'Weak Key Attribute', null, null, dt + 'attribute key weak chen'),
  99. this.createVertexTemplateEntry('ellipse;whiteSpace=wrap;html=1;align=center;dashed=1;',
  100. 100, 40, 'Attribute', 'Derived Attribute', null, null, dt + 'attribute derived chen'),
  101. this.createVertexTemplateEntry('ellipse;shape=doubleEllipse;margin=3;whiteSpace=wrap;html=1;align=center;',
  102. 100, 40, 'Attribute', 'Multivalue Attribute', null, null, dt + 'attribute multivalue chen'),
  103. this.createVertexTemplateEntry('shape=associativeEntity;whiteSpace=wrap;html=1;align=center;',
  104. 140, 60, 'Associative\nEntity', 'Associative Entity', null, null, dt + 'associative entity chen'),
  105. this.createVertexTemplateEntry('shape=rhombus;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;',
  106. 120, 60, 'Relationship', 'Relationship', null, null, dt + 'chen'),
  107. this.createVertexTemplateEntry('shape=rhombus;double=1;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;',
  108. 120, 60, 'Relationship', 'Identifying Relationship', null, null, dt + 'chen'),
  109. this.createVertexTemplateEntry('ellipse;shape=cloud;whiteSpace=wrap;html=1;align=center;', 100, 60, 'Cloud', 'Cloud', null, null, dt + 'cloud'),
  110. this.addEntry(dt + 'hierarchy', function()
  111. {
  112. var cell = new mxCell('', new mxGeometry(0, 0, 100, 100), 'rounded=1;absoluteArcSize=1;html=1;arcSize=10;');
  113. cell.vertex = true;
  114. var cell1 = new mxCell('main', new mxGeometry(0, 0, 50, 100), 'html=1;shape=mxgraph.er.anchor;whiteSpace=wrap;');
  115. cell1.vertex = true;
  116. cell.insert(cell1);
  117. var cell2 = new mxCell('sub', new mxGeometry(50, 5, 45, 90), 'rounded=1;absoluteArcSize=1;html=1;arcSize=10;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;');
  118. cell2.vertex = true;
  119. cell.insert(cell2);
  120. return sb.createVertexTemplateFromCells([cell], cell.geometry.width, cell.geometry.height, 'Hierarchy');
  121. }),
  122. this.createVertexTemplateEntry('shape=note;size=20;whiteSpace=wrap;html=1;', w, h, 'Note', 'Note', null, null, dt + 'note'),
  123. this.addEntry(dt + 'relation chen', function()
  124. {
  125. return sb.createEdgeTemplateFromCells(
  126. [createEdge('endArrow=none;html=1;rounded=0;')],
  127. 160, 0, 'Untitled Relation');
  128. }),
  129. this.addEntry(dt + 'mandatory participation chen', function()
  130. {
  131. return sb.createEdgeTemplateFromCells(
  132. [createEdge('endArrow=none;html=1;rounded=0;', null, '1')],
  133. 160, 0, 'Mandatory Participation (0:1)');
  134. }),
  135. this.addEntry(dt + 'mandatory participation chen', function()
  136. {
  137. return sb.createEdgeTemplateFromCells(
  138. [createEdge('endArrow=none;html=1;rounded=0;', null, 'N')],
  139. 160, 0, 'Mandatory Participation (0:N)');
  140. }),
  141. this.addEntry(dt + 'mandatory participation chen', function()
  142. {
  143. return sb.createEdgeTemplateFromCells(
  144. [createEdge('endArrow=none;html=1;rounded=0;', 'M', 'N')],
  145. 160, 0, 'Mandatory Participation (M:N)');
  146. }),
  147. this.addEntry(dt + 'optional participation chen', function()
  148. {
  149. return sb.createEdgeTemplateFromCells(
  150. [createEdge('endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;', null, '1')],
  151. 160, 0, 'Optional Participation (0:1)');
  152. }),
  153. this.addEntry(dt + 'optional participation chen', function()
  154. {
  155. return sb.createEdgeTemplateFromCells(
  156. [createEdge('endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;', null, 'N')],
  157. 160, 0, 'Optional Participation (0:N)');
  158. }),
  159. this.addEntry(dt + 'optional participation chen', function()
  160. {
  161. return sb.createEdgeTemplateFromCells(
  162. [createEdge('endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;', 'M', 'N')],
  163. 160, 0, 'Optional Participation (M:N)');
  164. }),
  165. this.addEntry(dt + 'recursive relationship chen', function()
  166. {
  167. return sb.createEdgeTemplateFromCells(
  168. [createEdge('shape=link;html=1;rounded=0;', null, '1')],
  169. 160, 0, 'Recursive Relationship (0:1)');
  170. }),
  171. this.addEntry(dt + 'recursive relationship chen', function()
  172. {
  173. return sb.createEdgeTemplateFromCells(
  174. [createEdge('shape=link;html=1;rounded=0;', null, 'N')],
  175. 160, 0, 'Recursive Relationship (0:N)');
  176. }),
  177. this.addEntry(dt + 'recursive relationship chen', function()
  178. {
  179. return sb.createEdgeTemplateFromCells(
  180. [createEdge('shape=link;html=1;rounded=0;', 'M', 'N')],
  181. 160, 0, 'Recursive Relationship (M:N)');
  182. }),
  183. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;', w, h, '', '0 to Many Optional', null, dt + 'zero many optional'),
  184. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;', w, h, '', '1 to Many', null, dt + 'one many'),
  185. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;', w, h, '', '1 Mandatory', null, dt + 'one mandatory'),
  186. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;startArrow=ERmandOne;', w, h, '', '1 to 1', null, dt + 'one'),
  187. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERone;endFill=1;', w, h, '', '1', null, dt + 'one'),
  188. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;endFill=1;', w, h, '', '0 to 1', null, dt + 'zero one'),
  189. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmany;', w, h, '', 'Many', null, dt + 'many'),
  190. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmany;startArrow=ERmany;', w, h, '', 'Many to Many', null, dt + 'many'),
  191. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;', w, h, '', '1 Optional to Many Optional', null, dt + 'one optional many'),
  192. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERmandOne;', w, h, '', '1 Mandatory to Many Optional', null, dt + 'one mandatory many optional'),
  193. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;startArrow=ERmandOne;', w, h, '', '1 Mandatory to 1 Optional', null, dt + 'one mandatory optional'),
  194. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERmandOne;', w, h, '', '1 Mandatory to Many Mandatory', null, dt + 'one mandatory many'),
  195. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERzeroToOne;', w, h, '', '1 Optional to Many Mandatory', null, dt + 'one optional mandatory many'),
  196. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERoneToMany;', w, h, '', 'Many Mandatory to Many Mandatory', null, dt + 'mandatory many'),
  197. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;startArrow=ERzeroToMany;', w, h, '', 'Many Optional to Many Mandatory', null, dt + 'mandatory many optional'),
  198. this.createEdgeTemplateEntry('edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;startArrow=ERzeroToMany;', w, h, '', 'Many Optional to Many Optional', null, dt + 'many optional')
  199. ];
  200. this.addPaletteFunctions('er', mxResources.get('entityRelation'), false, fns);
  201. this.setCurrentSearchEntryLibrary();
  202. };
  203. })();