@operato/board 0.2.48 → 0.2.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/assets/images/components/audio.png +0 -0
  3. package/assets/images/components/both-arrow.png +0 -0
  4. package/assets/images/components/color-image.png +0 -0
  5. package/assets/images/components/container.png +0 -0
  6. package/assets/images/components/dash.png +0 -0
  7. package/assets/images/components/donut.png +0 -0
  8. package/assets/images/components/ellipse.png +0 -0
  9. package/assets/images/components/forklift.png +0 -0
  10. package/assets/images/components/gif-image.png +0 -0
  11. package/assets/images/components/global-reference.png +0 -0
  12. package/assets/images/components/gray-image.png +0 -0
  13. package/assets/images/components/humidity-sensor.png +0 -0
  14. package/assets/images/components/info-window.png +0 -0
  15. package/assets/images/components/line.png +0 -0
  16. package/assets/images/components/local-reference.png +0 -0
  17. package/assets/images/components/person.png +0 -0
  18. package/assets/images/components/polygon.png +0 -0
  19. package/assets/images/components/polyline.png +0 -0
  20. package/assets/images/components/popup.png +0 -0
  21. package/assets/images/components/rect.png +0 -0
  22. package/assets/images/components/single-arrow.png +0 -0
  23. package/assets/images/components/star.png +0 -0
  24. package/assets/images/components/text.png +0 -0
  25. package/assets/images/components/triangle.png +0 -0
  26. package/assets/images/icon-vtoolbar.png +0 -0
  27. package/custom-elements.json +1900 -743
  28. package/dist/src/component/3d.d.ts +2 -0
  29. package/dist/src/component/3d.js +27 -0
  30. package/dist/src/component/3d.js.map +1 -0
  31. package/dist/src/component/chart-and-gauge.d.ts +2 -0
  32. package/dist/src/component/chart-and-gauge.js +26 -0
  33. package/dist/src/component/chart-and-gauge.js.map +1 -0
  34. package/dist/src/component/container.d.ts +2 -0
  35. package/dist/src/component/container.js +60 -0
  36. package/dist/src/component/container.js.map +1 -0
  37. package/dist/src/component/data-source.d.ts +2 -0
  38. package/dist/src/component/data-source.js +28 -0
  39. package/dist/src/component/data-source.js.map +1 -0
  40. package/dist/src/component/etc.d.ts +2 -0
  41. package/dist/src/component/etc.js +82 -0
  42. package/dist/src/component/etc.js.map +1 -0
  43. package/dist/src/component/form.d.ts +2 -0
  44. package/dist/src/component/form.js +40 -0
  45. package/dist/src/component/form.js.map +1 -0
  46. package/dist/src/component/index.d.ts +12 -0
  47. package/dist/src/component/index.js +13 -0
  48. package/dist/src/component/index.js.map +1 -0
  49. package/dist/src/component/iot.d.ts +2 -0
  50. package/dist/src/component/iot.js +50 -0
  51. package/dist/src/component/iot.js.map +1 -0
  52. package/dist/src/component/line.d.ts +2 -0
  53. package/dist/src/component/line.js +130 -0
  54. package/dist/src/component/line.js.map +1 -0
  55. package/dist/src/component/register-default-groups.d.ts +1 -0
  56. package/dist/src/component/register-default-groups.js +28 -0
  57. package/dist/src/component/register-default-groups.js.map +1 -0
  58. package/dist/src/component/shape.d.ts +2 -0
  59. package/dist/src/component/shape.js +152 -0
  60. package/dist/src/component/shape.js.map +1 -0
  61. package/dist/src/component/table.d.ts +2 -0
  62. package/dist/src/component/table.js +26 -0
  63. package/dist/src/component/table.js.map +1 -0
  64. package/dist/src/component/text-and-media.d.ts +2 -0
  65. package/dist/src/component/text-and-media.js +122 -0
  66. package/dist/src/component/text-and-media.js.map +1 -0
  67. package/dist/src/component/warehouse.d.ts +2 -0
  68. package/dist/src/component/warehouse.js +24 -0
  69. package/dist/src/component/warehouse.js.map +1 -0
  70. package/dist/src/graphql/board.d.ts +6 -0
  71. package/dist/src/graphql/board.js +130 -0
  72. package/dist/src/graphql/board.js.map +1 -0
  73. package/dist/src/graphql/favorite-board.d.ts +1 -0
  74. package/dist/src/graphql/favorite-board.js +23 -0
  75. package/dist/src/graphql/favorite-board.js.map +1 -0
  76. package/dist/src/graphql/group.d.ts +7 -0
  77. package/dist/src/graphql/group.js +125 -0
  78. package/dist/src/graphql/group.js.map +1 -0
  79. package/dist/src/graphql/index.d.ts +4 -0
  80. package/dist/src/graphql/index.js +5 -0
  81. package/dist/src/graphql/index.js.map +1 -0
  82. package/dist/src/graphql/play-group.d.ts +8 -0
  83. package/dist/src/graphql/play-group.js +173 -0
  84. package/dist/src/graphql/play-group.js.map +1 -0
  85. package/dist/src/modeller/component-toolbar/component-detail.d.ts +1 -1
  86. package/dist/src/modeller/component-toolbar/component-detail.js +6 -6
  87. package/dist/src/modeller/component-toolbar/component-detail.js.map +1 -1
  88. package/dist/src/modeller/component-toolbar/component-menu.js +1 -2
  89. package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
  90. package/dist/src/modeller/component-toolbar/component-toolbar.js +26 -65
  91. package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
  92. package/dist/src/ox-board-list.d.ts +2 -0
  93. package/dist/src/ox-board-list.js +427 -0
  94. package/dist/src/ox-board-list.js.map +1 -0
  95. package/dist/src/ox-board-modeller.d.ts +6 -1
  96. package/dist/src/ox-board-modeller.js +35 -3
  97. package/dist/src/ox-board-modeller.js.map +1 -1
  98. package/dist/src/types.d.ts +30 -0
  99. package/dist/src/types.js.map +1 -1
  100. package/dist/tsconfig.tsbuildinfo +1 -1
  101. package/package.json +12 -6
  102. package/src/component/3d.ts +29 -0
  103. package/src/component/chart-and-gauge.ts +28 -0
  104. package/src/component/container.ts +62 -0
  105. package/src/component/data-source.ts +30 -0
  106. package/src/component/etc.ts +87 -0
  107. package/src/component/form.ts +42 -0
  108. package/src/component/index.ts +12 -0
  109. package/src/component/iot.ts +52 -0
  110. package/src/component/line.ts +132 -0
  111. package/src/component/register-default-groups.ts +28 -0
  112. package/src/component/shape.ts +154 -0
  113. package/src/component/table.ts +28 -0
  114. package/src/component/text-and-media.ts +124 -0
  115. package/src/component/warehouse.ts +26 -0
  116. package/src/graphql/board.ts +144 -0
  117. package/src/graphql/favorite-board.ts +25 -0
  118. package/src/graphql/group.ts +138 -0
  119. package/src/graphql/index.ts +4 -0
  120. package/src/graphql/play-group.ts +189 -0
  121. package/src/modeller/component-toolbar/component-detail.ts +7 -7
  122. package/src/modeller/component-toolbar/component-menu.ts +2 -5
  123. package/src/modeller/component-toolbar/component-toolbar.ts +35 -67
  124. package/src/ox-board-list.ts +459 -0
  125. package/src/ox-board-modeller.ts +44 -5
  126. package/src/types.ts +48 -0
  127. package/yarn-error.log +0 -18355
@@ -0,0 +1,87 @@
1
+ import { ComponentGroup } from '../types'
2
+ import globalReference from '../../../assets/images/components/global-reference.png'
3
+ import infoWindow from '../../../assets/images/components/info-window.png'
4
+ import localReference from '../../../assets/images/components/local-reference.png'
5
+
6
+ const icon = `
7
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
8
+ <style type="text/css">
9
+ .st0{fill:{{strokeColor}};}
10
+ </style>
11
+ <g>
12
+ <circle class="st0" cx="7.1" cy="15" r="2"/>
13
+ <circle class="st0" cx="15" cy="15" r="2"/>
14
+ <circle class="st0" cx="22.9" cy="15" r="2"/>
15
+ </g>
16
+ </svg>
17
+ `
18
+
19
+ export const etc: ComponentGroup = {
20
+ name: 'etc',
21
+ description: 'a group of components that have not yet been defined.',
22
+ icon,
23
+ templates: [
24
+ {
25
+ type: 'info-window',
26
+ description: 'information window',
27
+ icon: infoWindow,
28
+ group: 'etc',
29
+ model: {
30
+ type: 'info-window',
31
+ left: 10,
32
+ top: 10,
33
+ width: 50,
34
+ height: 50,
35
+ fillStyle: '#fff',
36
+ strokeStyle: 'DarkGoldenRod',
37
+ hidden: true,
38
+ frontSideTemplate:
39
+ "<h2 id='xxx'>\n\t<%= text %>\n</h2>\n<img src='https://www.tutorialspoint.com/images/html.gif' alt='HTML Tutorial' height='150' width='140' />",
40
+ backSideTemplate:
41
+ "<h2 id='yyy'>\n\t<%= text %>\n</h2>\n<img src='https://www.tutorialspoint.com/images/html.gif' alt='HTML Tutorial' height='150' width='140' />",
42
+ style:
43
+ '#yyy {\n\tbackground-color:navy;\n\tcolor:white\n}\n#xxx, #yyy {\n\twhite-space:nowrap;\n\tmin-width:200px;\n}'
44
+ }
45
+ },
46
+ {
47
+ type: 'local reference',
48
+ description: 'local reference',
49
+ icon: localReference,
50
+ group: 'etc',
51
+ model: {
52
+ type: 'local-ref',
53
+ left: 100,
54
+ top: 100,
55
+ width: 100,
56
+ height: 100,
57
+ fillStyle: '#fff',
58
+ strokeStyle: '#000',
59
+ alpha: 1,
60
+ hidden: false,
61
+ lineWidth: 1,
62
+ lineDash: 'solid',
63
+ lineCap: 'butt'
64
+ }
65
+ },
66
+ {
67
+ type: 'global reference',
68
+ description: 'global reference',
69
+ icon: globalReference,
70
+ group: 'etc',
71
+ model: {
72
+ type: 'global-ref',
73
+ left: 100,
74
+ top: 100,
75
+ width: 100,
76
+ height: 100,
77
+ fillStyle: '#fff',
78
+ strokeStyle: '#000',
79
+ alpha: 1,
80
+ hidden: false,
81
+ lineWidth: 1,
82
+ lineDash: 'solid',
83
+ lineCap: 'butt'
84
+ }
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,42 @@
1
+ import { ComponentGroup } from '../types'
2
+
3
+ const icon = `
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:{{strokeColor}};}
7
+ .st7{fill:none;stroke:{{strokeColor}};stroke-width:1.5;stroke-miterlimit:10;}
8
+ .st9{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}
9
+ </style>
10
+ <g>
11
+ <rect x="3.1" y="5.5" class="st7" width="23.9" height="19"/>
12
+ <rect x="11.3" y="8.3" class="st9" width="12.5" height="3.3"/>
13
+ <rect x="5.5" y="8.8" class="st0" width="4.1" height="2.2"/>
14
+ <rect x="5.5" y="14.5" class="st0" width="4.1" height="2.2"/>
15
+ <rect x="10.7" y="19.4" class="st0" width="6.5" height="2.2"/>
16
+ <rect x="17.8" y="19.4" class="st0" width="6.3" height="2.2"/>
17
+ <rect x="11.3" y="13.8" class="st9" width="12.5" height="3.3"/>
18
+ <path class="st0" d="M15,14.7c0,0.1,0,0.3-0.1,0.5l0,0.2l0.2-0.1c0.3-0.2,0.5-0.3,0.6-0.3c0.1,0,0.3,0.1,0.3,0.3
19
+ c0,0.2-0.3,0.3-0.7,0.3l-0.2,0l0.1,0.1c0.3,0.2,0.5,0.4,0.5,0.5c0,0.1-0.1,0.2-0.3,0.2c-0.2,0-0.3-0.2-0.5-0.6l-0.1-0.2l-0.1,0.2
20
+ c-0.2,0.4-0.3,0.6-0.5,0.6c-0.2,0-0.3-0.1-0.3-0.2c0-0.2,0.2-0.3,0.5-0.5l0.1-0.1l-0.2,0c-0.5,0-0.7-0.1-0.7-0.3
21
+ c0-0.2,0.1-0.3,0.3-0.3c0.2,0,0.3,0.1,0.6,0.3l0.2,0.1l0-0.2c-0.1-0.2-0.1-0.4-0.1-0.5c0-0.2,0.1-0.3,0.3-0.3
22
+ C14.9,14.4,15,14.5,15,14.7z"/>
23
+ <path class="st0" d="M17.5,14.7c0,0.1,0,0.3-0.1,0.5l0,0.2l0.2-0.1c0.3-0.2,0.5-0.3,0.6-0.3c0.1,0,0.3,0.1,0.3,0.3
24
+ c0,0.2-0.3,0.3-0.7,0.3l-0.2,0l0.1,0.1c0.3,0.2,0.5,0.4,0.5,0.5c0,0.1-0.1,0.2-0.3,0.2c-0.2,0-0.3-0.2-0.5-0.6l-0.1-0.2l-0.1,0.2
25
+ c-0.2,0.4-0.3,0.6-0.5,0.6c-0.2,0-0.3-0.1-0.3-0.2c0-0.2,0.2-0.3,0.5-0.5l0.1-0.1l-0.2,0c-0.5,0-0.7-0.1-0.7-0.3
26
+ c0-0.2,0.1-0.3,0.3-0.3c0.2,0,0.3,0.1,0.6,0.3l0.2,0.1l0-0.2c-0.1-0.2-0.1-0.4-0.1-0.5c0-0.2,0.1-0.3,0.3-0.3
27
+ C17.4,14.4,17.5,14.5,17.5,14.7z"/>
28
+ <path class="st0" d="M19.9,14.7c0,0.1,0,0.3-0.1,0.5l0,0.2l0.2-0.1c0.3-0.2,0.5-0.3,0.6-0.3c0.1,0,0.3,0.1,0.3,0.3
29
+ c0,0.2-0.3,0.3-0.7,0.3l-0.2,0l0.1,0.1c0.3,0.2,0.5,0.4,0.5,0.5c0,0.1-0.1,0.2-0.3,0.2c-0.2,0-0.3-0.2-0.5-0.6l-0.1-0.2l-0.1,0.2
30
+ c-0.2,0.4-0.3,0.6-0.5,0.6c-0.2,0-0.3-0.1-0.3-0.2c0-0.2,0.2-0.3,0.5-0.5l0.1-0.1l-0.2,0c-0.5,0-0.7-0.1-0.7-0.3
31
+ c0-0.2,0.1-0.3,0.3-0.3c0.2,0,0.3,0.1,0.6,0.3l0.2,0.1l0-0.2c-0.1-0.2-0.1-0.4-0.1-0.5c0-0.2,0.1-0.3,0.3-0.3
32
+ C19.8,14.4,19.9,14.5,19.9,14.7z"/>
33
+ </g>
34
+ </svg>
35
+ `
36
+
37
+ export const form: ComponentGroup = {
38
+ name: 'form',
39
+ description: 'a group of various input components that make up a data entry form',
40
+ icon,
41
+ templates: []
42
+ }
@@ -0,0 +1,12 @@
1
+ export * from './shape'
2
+ export * from './line'
3
+ export * from './text-and-media'
4
+ export * from './chart-and-gauge'
5
+ export * from './table'
6
+ export * from './data-source'
7
+ export * from './3d'
8
+ export * from './iot'
9
+ export * from './form'
10
+ export * from './warehouse'
11
+ export * from './container'
12
+ export * from './etc'
@@ -0,0 +1,52 @@
1
+ import { ComponentGroup } from '../types'
2
+
3
+ const icon = `
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st9{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}
7
+ .st12{fill:#232020;stroke:{{strokeColor}};stroke-width:0.5;stroke-miterlimit:10;}
8
+ .st13{fill:#232020;stroke:{{strokeColor}};stroke-width:0.25;stroke-miterlimit:10;}
9
+ </style>
10
+ <g>
11
+ <path class="st12" d="M11.2,14.6c0,0-0.1,0.1-0.1,0.1c-0.1,0-0.2-0.1-0.2-0.2c0-0.9,0.3-1.8,1-2.5c0.6-0.7,1.5-1.1,2.4-1.2
12
+ c0.1,0,0.2,0.1,0.2,0.2c0,0.1-0.1,0.2-0.2,0.2c-0.8,0.1-1.6,0.5-2.2,1.1c-0.6,0.6-0.9,1.5-0.9,2.3C11.2,14.5,11.2,14.6,11.2,14.6z"
13
+ />
14
+ <path class="st12" d="M8.8,14.7c0,0-0.1,0.1-0.1,0.1c-0.1,0-0.2-0.1-0.2-0.2c0-1.5,0.6-3,1.6-4.2c1-1.1,2.5-1.9,4-2
15
+ c0.1,0,0.2,0.1,0.2,0.2c0,0.1-0.1,0.2-0.2,0.2c-1.4,0.1-2.8,0.8-3.8,1.9c-1,1.1-1.5,2.5-1.5,3.9C8.9,14.6,8.9,14.6,8.8,14.7z"/>
16
+ <path class="st12" d="M18.6,15.2c0,0,0.1-0.1,0.1-0.1c0.1,0,0.2,0.1,0.2,0.2c-0.1,0.9-0.5,1.8-1.1,2.5c-0.7,0.7-1.6,1-2.5,1.1
17
+ c-0.1,0-0.2-0.1-0.2-0.2c0-0.1,0.1-0.2,0.2-0.2c0.8,0,1.6-0.4,2.3-1c0.6-0.6,1-1.4,1-2.2C18.5,15.2,18.5,15.2,18.6,15.2z"/>
18
+ <path class="st12" d="M20.9,15.3c0,0,0.1-0.1,0.1-0.1c0.1,0,0.2,0.1,0.2,0.2c-0.1,1.5-0.8,3-1.9,4.1c-1.1,1.1-2.6,1.7-4.1,1.7
19
+ c-0.1,0-0.2-0.1-0.2-0.2c0-0.1,0.1-0.2,0.2-0.2c1.4,0,2.8-0.6,3.9-1.6c1.1-1,1.7-2.4,1.8-3.8C20.9,15.3,20.9,15.3,20.9,15.3z"/>
20
+ <path class="st13" d="M8.8,6.7C7.9,6.7,7.2,6,7.2,5c0-0.9,0.7-1.7,1.6-1.7c0.9,0,1.7,0.7,1.7,1.7C10.5,6,9.8,6.7,8.8,6.7z M8.8,3.9
21
+ C8.2,3.9,7.7,4.4,7.7,5c0,0.6,0.5,1.2,1.2,1.2C9.5,6.2,10,5.7,10,5C10,4.4,9.5,3.9,8.8,3.9z"/>
22
+ <path class="st13" d="M20.9,6.7C20,6.7,19.3,6,19.3,5c0-0.9,0.7-1.7,1.6-1.7c0.9,0,1.7,0.7,1.7,1.7C22.6,6,21.8,6.7,20.9,6.7z
23
+ M20.9,3.9c-0.6,0-1.2,0.5-1.2,1.2c0,0.6,0.5,1.2,1.2,1.2c0.6,0,1.2-0.5,1.2-1.2C22.1,4.4,21.6,3.9,20.9,3.9z"/>
24
+ <path class="st13" d="M14.9,16.5c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.7,1.6-1.7c0.9,0,1.7,0.7,1.7,1.7
25
+ C16.6,15.7,15.9,16.5,14.9,16.5z M14.9,13.6c-0.6,0-1.2,0.5-1.2,1.2c0,0.6,0.5,1.2,1.2,1.2c0.6,0,1.2-0.5,1.2-1.2
26
+ C16.1,14.2,15.6,13.6,14.9,13.6z"/>
27
+ <path class="st13" d="M8.8,26.6c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.7,1.6-1.7c0.9,0,1.7,0.7,1.7,1.7C10.5,25.9,9.8,26.6,8.8,26.6z
28
+ M8.8,23.8c-0.6,0-1.2,0.5-1.2,1.2c0,0.6,0.5,1.2,1.2,1.2c0.6,0,1.2-0.5,1.2-1.2C10,24.3,9.5,23.8,8.8,23.8z"/>
29
+ <path class="st13" d="M20.9,26.6c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.7,1.6-1.7c0.9,0,1.7,0.7,1.7,1.7
30
+ C22.6,25.9,21.8,26.6,20.9,26.6z M20.9,23.8c-0.6,0-1.2,0.5-1.2,1.2c0,0.6,0.5,1.2,1.2,1.2c0.6,0,1.2-0.5,1.2-1.2
31
+ C22.1,24.3,21.6,23.8,20.9,23.8z"/>
32
+ <path class="st13" d="M3.1,16.6c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.7,1.6-1.7c0.9,0,1.7,0.7,1.7,1.7C4.7,15.9,4,16.6,3.1,16.6z
33
+ M3.1,13.8c-0.6,0-1.2,0.5-1.2,1.2c0,0.6,0.5,1.2,1.2,1.2c0.6,0,1.2-0.5,1.2-1.2C4.2,14.3,3.7,13.8,3.1,13.8z"/>
34
+ <path class="st13" d="M26.9,16.6c-0.9,0-1.6-0.7-1.6-1.6c0-0.9,0.7-1.7,1.6-1.7c0.9,0,1.7,0.7,1.7,1.7
35
+ C28.6,15.9,27.8,16.6,26.9,16.6z M26.9,13.8c-0.6,0-1.2,0.5-1.2,1.2c0,0.6,0.5,1.2,1.2,1.2c0.6,0,1.2-0.5,1.2-1.2
36
+ C28.1,14.3,27.6,13.8,26.9,13.8z"/>
37
+ <line class="st9" x1="10.2" y1="4.9" x2="18.2" y2="4.9"/>
38
+ <line class="st9" x1="22" y1="6.2" x2="26.1" y2="12.3"/>
39
+ <line class="st9" x1="4" y1="17.7" x2="7.7" y2="24"/>
40
+ <line class="st9" x1="23" y1="22.7" x2="26.8" y2="16.4"/>
41
+ <line class="st9" x1="3.7" y1="13.5" x2="7.5" y2="7.2"/>
42
+ <line class="st9" x1="11.7" y1="25.1" x2="19.7" y2="25.1"/>
43
+ </g>
44
+ </svg>
45
+ `
46
+
47
+ export const iot: ComponentGroup = {
48
+ name: 'IoT',
49
+ description: 'a group of various IoT protocols',
50
+ icon,
51
+ templates: []
52
+ }
@@ -0,0 +1,132 @@
1
+ import { ComponentGroup } from '../types'
2
+ import bothArrow from '../../../assets/images/components/both-arrow.png'
3
+ import dash from '../../../assets/images/components/dash.png'
4
+ import lineIcon from '../../../assets/images/components/line.png'
5
+ import polyline from '../../../assets/images/components/polyline.png'
6
+ import singleArrow from '../../../assets/images/components/single-arrow.png'
7
+
8
+ const icon = `
9
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
10
+ <style type="text/css">
11
+ .st3{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}
12
+ .st4{fill:none;stroke:{{strokeColor}};stroke-width:1.5;stroke-miterlimit:10;stroke-dasharray:3,1.5;}
13
+ </style>
14
+ <g>
15
+ <line class="st3" x1="1.7" y1="18.9" x2="26.3" y2="6.2"/>
16
+ <line class="st4" x1="1.7" y1="23.8" x2="28.3" y2="10.1"/>
17
+ </g>
18
+ </svg>
19
+ `
20
+
21
+ export const line: ComponentGroup = {
22
+ name: 'line',
23
+ description: 'a group of various lines',
24
+ icon,
25
+ templates: [
26
+ {
27
+ type: 'line',
28
+ description: 'simple line',
29
+ icon: lineIcon,
30
+ group: 'line',
31
+ model: {
32
+ type: 'line',
33
+ x1: 100,
34
+ y1: 100,
35
+ x2: 200,
36
+ y2: 200,
37
+ fillStyle: '#fff',
38
+ strokeStyle: '#000',
39
+ alpha: 1,
40
+ hidden: false,
41
+ lineWidth: 3,
42
+ lineDash: 'solid',
43
+ lineCap: 'butt'
44
+ }
45
+ },
46
+ {
47
+ type: 'dash',
48
+ description: 'dash line',
49
+ icon: dash,
50
+ group: 'line',
51
+ model: {
52
+ type: 'line',
53
+ x1: 100,
54
+ y1: 100,
55
+ x2: 200,
56
+ y2: 200,
57
+ fillStyle: '#fff',
58
+ strokeStyle: '#000',
59
+ alpha: 1,
60
+ hidden: false,
61
+ lineWidth: 3,
62
+ lineDash: 'round-dot',
63
+ lineCap: 'butt'
64
+ }
65
+ },
66
+ {
67
+ type: 'single arrow',
68
+ description: 'single arrow tip line',
69
+ icon: singleArrow,
70
+ group: 'line',
71
+ model: {
72
+ type: 'line',
73
+ x1: 100,
74
+ y1: 100,
75
+ x2: 200,
76
+ y2: 200,
77
+ fillStyle: '#fff',
78
+ strokeStyle: '#000',
79
+ alpha: 3,
80
+ hidden: false,
81
+ lineWidth: 3,
82
+ lineDash: 'solid',
83
+ begin: 'arrow',
84
+ lineCap: 'butt'
85
+ }
86
+ },
87
+ {
88
+ type: 'both arrow',
89
+ description: 'both arrow tip line',
90
+ icon: bothArrow,
91
+ group: 'line',
92
+ model: {
93
+ type: 'line',
94
+ x1: 100,
95
+ y1: 100,
96
+ x2: 200,
97
+ y2: 200,
98
+ fillStyle: '#fff',
99
+ strokeStyle: '#000',
100
+ alpha: 1,
101
+ hidden: false,
102
+ lineWidth: 3,
103
+ lineDash: 'solid',
104
+ begin: 'arrow',
105
+ end: 'arrow',
106
+ lineCap: 'butt'
107
+ }
108
+ },
109
+ {
110
+ type: 'polyline',
111
+ description: 'polyline',
112
+ icon: polyline,
113
+ group: 'line',
114
+ model: {
115
+ type: 'polyline',
116
+ path: [
117
+ { x: 100, y: 100 },
118
+ { x: 200, y: 100 },
119
+ { x: 200, y: 200 },
120
+ { x: 100, y: 200 }
121
+ ],
122
+ fillStyle: '#fff',
123
+ strokeStyle: '#000',
124
+ alpha: 1,
125
+ hidden: false,
126
+ lineWidth: 1,
127
+ lineDash: 'solid',
128
+ lineCap: 'butt'
129
+ }
130
+ }
131
+ ]
132
+ }
@@ -0,0 +1,28 @@
1
+ import { BoardModeller } from '../ox-board-modeller'
2
+ import { chartAndGauge } from './chart-and-gauge'
3
+ import { container } from './container'
4
+ import { dataSource } from './data-source'
5
+ import { etc } from './etc'
6
+ import { form } from './form'
7
+ import { iot } from './iot'
8
+ import { line } from './line'
9
+ import { shape } from './shape'
10
+ import { table } from './table'
11
+ import { textAndMedia } from './text-and-media'
12
+ import { threed } from './3d'
13
+ import { warehouse } from './warehouse'
14
+
15
+ export function registerDefaultGroups() {
16
+ BoardModeller.registerGroup(line)
17
+ BoardModeller.registerGroup(shape)
18
+ BoardModeller.registerGroup(textAndMedia)
19
+ BoardModeller.registerGroup(chartAndGauge)
20
+ BoardModeller.registerGroup(table)
21
+ BoardModeller.registerGroup(container)
22
+ BoardModeller.registerGroup(dataSource)
23
+ BoardModeller.registerGroup(iot)
24
+ BoardModeller.registerGroup(threed)
25
+ BoardModeller.registerGroup(warehouse)
26
+ BoardModeller.registerGroup(form)
27
+ BoardModeller.registerGroup(etc)
28
+ }
@@ -0,0 +1,154 @@
1
+ import { ComponentGroup } from '../types'
2
+ import donut from '../../../assets/images/components/donut.png'
3
+ import ellipse from '../../../assets/images/components/ellipse.png'
4
+ import polygon from '../../../assets/images/components/polygon.png'
5
+ import rect from '../../../assets/images/components/rect.png'
6
+ import star from '../../../assets/images/components/star.png'
7
+ import triangle from '../../../assets/images/components/triangle.png'
8
+
9
+ const icon = `
10
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
11
+ <style type="text/css">
12
+ .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}
13
+ </style>
14
+ <g>
15
+ <polyline class="st0" points="21.6,9.4 21.6,4.6 1.6,4.6 1.6,17.7 12.5,17.7 "/>
16
+ <circle class="st0" cx="21.3" cy="18.3" r="7"/>
17
+ </g>
18
+ </svg>
19
+ `
20
+
21
+ export const shape: ComponentGroup = {
22
+ name: 'shape',
23
+ description: 'a group of simple basic shapes',
24
+ icon,
25
+ templates: [
26
+ {
27
+ type: 'rect',
28
+ description: 'rectangle shape',
29
+ icon: rect,
30
+ group: 'shape',
31
+ model: {
32
+ type: 'rect',
33
+ left: 100,
34
+ top: 100,
35
+ width: 100,
36
+ height: 100,
37
+ fillStyle: '#fff',
38
+ strokeStyle: '#000',
39
+ alpha: 1,
40
+ hidden: false,
41
+ lineWidth: 1,
42
+ lineDash: 'solid',
43
+ lineCap: 'butt'
44
+ }
45
+ },
46
+ {
47
+ type: 'ellipse',
48
+ description: 'ellipse shape',
49
+ icon: ellipse,
50
+ group: 'shape',
51
+ model: {
52
+ type: 'ellipse',
53
+ rx: 50,
54
+ ry: 50,
55
+ cx: 150,
56
+ cy: 150,
57
+ fillStyle: '#fff',
58
+ strokeStyle: '#000',
59
+ alpha: 1,
60
+ hidden: false,
61
+ lineWidth: 1,
62
+ lineDash: 'solid',
63
+ lineCap: 'butt'
64
+ }
65
+ },
66
+ {
67
+ type: 'donut',
68
+ description: 'donut shape',
69
+ icon: donut,
70
+ group: 'shape',
71
+ model: {
72
+ type: 'donut',
73
+ rx: 50,
74
+ ry: 50,
75
+ cx: 150,
76
+ cy: 150,
77
+ ratio: 30,
78
+ fillStyle: '#fff',
79
+ strokeStyle: '#000',
80
+ alpha: 1,
81
+ hidden: false,
82
+ lineWidth: 1,
83
+ lineDash: 'solid',
84
+ lineCap: 'butt'
85
+ }
86
+ },
87
+ {
88
+ type: 'triangle',
89
+ description: 'triangle shape',
90
+ icon: triangle,
91
+ group: 'shape',
92
+ model: {
93
+ type: 'triangle',
94
+ x1: 150,
95
+ y1: 100,
96
+ x2: 100,
97
+ y2: 200,
98
+ x3: 200,
99
+ y3: 200,
100
+ fillStyle: '#fff',
101
+ strokeStyle: '#000',
102
+ alpha: 1,
103
+ hidden: false,
104
+ lineWidth: 1,
105
+ lineDash: 'solid',
106
+ lineCap: 'butt'
107
+ }
108
+ },
109
+ {
110
+ type: 'polygon',
111
+ description: 'polygon shape',
112
+ icon: polygon,
113
+ group: 'shape',
114
+ model: {
115
+ type: 'polygon',
116
+ path: [
117
+ { x: 100, y: 100 },
118
+ { x: 200, y: 100 },
119
+ { x: 200, y: 200 },
120
+ { x: 100, y: 200 }
121
+ ],
122
+ fillStyle: '#fff',
123
+ strokeStyle: '#000',
124
+ alpha: 1,
125
+ hidden: false,
126
+ lineWidth: 1,
127
+ lineDash: 'solid',
128
+ lineCap: 'butt'
129
+ }
130
+ },
131
+ {
132
+ type: 'star',
133
+ description: 'star shape',
134
+ icon: star,
135
+ group: 'shape',
136
+ model: {
137
+ type: 'star',
138
+ rx: 50,
139
+ ry: 50,
140
+ cx: 150,
141
+ cy: 150,
142
+ ratio: 30,
143
+ wing: 5,
144
+ fillStyle: '#fff',
145
+ strokeStyle: '#000',
146
+ alpha: 1,
147
+ hidden: false,
148
+ lineWidth: 1,
149
+ lineDash: 'solid',
150
+ lineCap: 'butt'
151
+ }
152
+ }
153
+ ]
154
+ }
@@ -0,0 +1,28 @@
1
+ import { ComponentGroup } from '../types'
2
+
3
+ const icon = `
4
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st5{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}
7
+ .st9{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}
8
+ .st10{fill:none;stroke:{{strokeColor}};stroke-width:0.5;stroke-miterlimit:10;}
9
+ </style>
10
+ <g>
11
+ <rect x="2.4" y="6" class="st9" width="25.2" height="18"/>
12
+ <rect x="11" y="12.5" transform="matrix(-1.742238e-05 1 -1 -1.742238e-05 35.0187 -4.9804)" class="st10" width="17.9" height="5.1"/>
13
+ <rect x="5.9" y="12.5" transform="matrix(-1.742238e-05 1 -1 -1.742238e-05 29.8973 0.1408)" class="st10" width="17.9" height="5.1"/>
14
+ <line class="st5" x1="2" y1="7.5" x2="28" y2="7.5"/>
15
+ <line class="st10" x1="2" y1="11.6" x2="28" y2="11.6"/>
16
+ <line class="st10" x1="2" y1="14.8" x2="28" y2="14.8"/>
17
+ <line class="st10" x1="2" y1="18.1" x2="28" y2="18.1"/>
18
+ <line class="st10" x1="2" y1="21.3" x2="28" y2="21.3"/>
19
+ </g>
20
+ </svg>
21
+ `
22
+
23
+ export const table: ComponentGroup = {
24
+ name: 'table',
25
+ description: 'a group of various tables',
26
+ icon,
27
+ templates: []
28
+ }
@@ -0,0 +1,124 @@
1
+ import { ComponentGroup } from '../types'
2
+ import audio from '../../../assets/images/components/audio.png'
3
+ import colorImage from '../../../assets/images/components/color-image.png'
4
+ import gifImage from '../../../assets/images/components/gif-image.png'
5
+ import grayImage from '../../../assets/images/components/gray-image.png'
6
+ import text from '../../../assets/images/components/text.png'
7
+
8
+ const icon = `
9
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" xml:space="preserve">
10
+ <style type="text/css">
11
+ .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}
12
+ .st1{fill:{{strokeColor}};}
13
+ </style>
14
+ <g>
15
+ <polyline class="st0" points="20.6,12.8 20.6,5.1 1.6,5.1 1.6,18 15,18"/>
16
+ <path class="st1" d="M5.7,7.9c-0.9,0-1.6,0.7-1.6,1.6s0.7,1.6,1.6,1.6s1.6-0.7,1.6-1.6S6.6,7.9,5.7,7.9z"/>
17
+ <polygon class="st1" points="12.8,8.6 8.5,14.7 5.9,12.7 3.2,16.1 15.1,16.1 15.2,13.7"/>
18
+ <path class="st1" d="M24.1,15.1h2.1l0.6,2.8h1.7l-0.1-3.8H16.5l-0.1,3.8h1.7l0.4-2.8h2.1c0.1,2,0.1,3.1,0.1,5.2V21
19
+ c0,1.6,0,1.9,0,2.7l-1.8,0.2V25h6.9v-1.1L24,23.7c0-0.9,0-1.1,0-2.7v-0.7C24,18.1,24,17,24.1,15.1z"/>
20
+ </g>
21
+ </svg>
22
+ `
23
+
24
+ export const textAndMedia: ComponentGroup = {
25
+ name: 'textAndMedia',
26
+ description: 'a group of text and various media components',
27
+ icon,
28
+ templates: [
29
+ {
30
+ type: 'text',
31
+ description: 'text',
32
+ icon: text,
33
+ group: 'textAndMedia',
34
+ model: {
35
+ type: 'text',
36
+ left: 100,
37
+ top: 100,
38
+ width: 200,
39
+ height: 50,
40
+ text: 'Text',
41
+ fillStyle: '#fff',
42
+ strokeStyle: '#000',
43
+ alpha: 1,
44
+ hidden: false,
45
+ lineWidth: 5,
46
+ lineDash: 'solid',
47
+ lineCap: 'butt',
48
+ textAlign: 'left',
49
+ textBaseline: 'top',
50
+ textWrap: false,
51
+ fontFamily: 'serif',
52
+ fontSize: 30
53
+ }
54
+ },
55
+ {
56
+ type: 'color image',
57
+ description: 'color image',
58
+ icon: colorImage,
59
+ group: 'textAndMedia',
60
+ model: {
61
+ type: 'image-view',
62
+ left: 100,
63
+ top: 100,
64
+ width: 100,
65
+ height: 100,
66
+ isGray: false,
67
+ fillStyle: '#fff',
68
+ strokeStyle: '#000',
69
+ alpha: 1,
70
+ hidden: false,
71
+ lineWidth: 1,
72
+ lineDash: 'solid',
73
+ lineCap: 'butt'
74
+ }
75
+ },
76
+ {
77
+ type: 'gray image',
78
+ description: 'gray image',
79
+ icon: grayImage,
80
+ group: 'textAndMedia',
81
+ model: {
82
+ type: 'image-view',
83
+ left: 100,
84
+ top: 100,
85
+ width: 100,
86
+ height: 100,
87
+ isGray: true,
88
+ fillStyle: '#fff',
89
+ strokeStyle: '#000',
90
+ alpha: 1,
91
+ hidden: false,
92
+ lineWidth: 1,
93
+ lineDash: 'solid',
94
+ lineCap: 'butt'
95
+ }
96
+ },
97
+ {
98
+ type: 'gif image',
99
+ description: 'gif image',
100
+ icon: gifImage,
101
+ group: 'textAndMedia',
102
+ model: {
103
+ type: 'gif-view',
104
+ left: 100,
105
+ top: 100,
106
+ width: 100,
107
+ height: 100
108
+ }
109
+ },
110
+ {
111
+ type: 'audio',
112
+ description: 'audio',
113
+ icon: audio,
114
+ group: 'textAndMedia',
115
+ model: {
116
+ type: 'audio',
117
+ left: 100,
118
+ top: 100,
119
+ width: 100,
120
+ height: 100
121
+ }
122
+ }
123
+ ]
124
+ }