@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.
- package/CHANGELOG.md +40 -0
- package/assets/images/components/audio.png +0 -0
- package/assets/images/components/both-arrow.png +0 -0
- package/assets/images/components/color-image.png +0 -0
- package/assets/images/components/container.png +0 -0
- package/assets/images/components/dash.png +0 -0
- package/assets/images/components/donut.png +0 -0
- package/assets/images/components/ellipse.png +0 -0
- package/assets/images/components/forklift.png +0 -0
- package/assets/images/components/gif-image.png +0 -0
- package/assets/images/components/global-reference.png +0 -0
- package/assets/images/components/gray-image.png +0 -0
- package/assets/images/components/humidity-sensor.png +0 -0
- package/assets/images/components/info-window.png +0 -0
- package/assets/images/components/line.png +0 -0
- package/assets/images/components/local-reference.png +0 -0
- package/assets/images/components/person.png +0 -0
- package/assets/images/components/polygon.png +0 -0
- package/assets/images/components/polyline.png +0 -0
- package/assets/images/components/popup.png +0 -0
- package/assets/images/components/rect.png +0 -0
- package/assets/images/components/single-arrow.png +0 -0
- package/assets/images/components/star.png +0 -0
- package/assets/images/components/text.png +0 -0
- package/assets/images/components/triangle.png +0 -0
- package/assets/images/icon-vtoolbar.png +0 -0
- package/custom-elements.json +1900 -743
- package/dist/src/component/3d.d.ts +2 -0
- package/dist/src/component/3d.js +27 -0
- package/dist/src/component/3d.js.map +1 -0
- package/dist/src/component/chart-and-gauge.d.ts +2 -0
- package/dist/src/component/chart-and-gauge.js +26 -0
- package/dist/src/component/chart-and-gauge.js.map +1 -0
- package/dist/src/component/container.d.ts +2 -0
- package/dist/src/component/container.js +60 -0
- package/dist/src/component/container.js.map +1 -0
- package/dist/src/component/data-source.d.ts +2 -0
- package/dist/src/component/data-source.js +28 -0
- package/dist/src/component/data-source.js.map +1 -0
- package/dist/src/component/etc.d.ts +2 -0
- package/dist/src/component/etc.js +82 -0
- package/dist/src/component/etc.js.map +1 -0
- package/dist/src/component/form.d.ts +2 -0
- package/dist/src/component/form.js +40 -0
- package/dist/src/component/form.js.map +1 -0
- package/dist/src/component/index.d.ts +12 -0
- package/dist/src/component/index.js +13 -0
- package/dist/src/component/index.js.map +1 -0
- package/dist/src/component/iot.d.ts +2 -0
- package/dist/src/component/iot.js +50 -0
- package/dist/src/component/iot.js.map +1 -0
- package/dist/src/component/line.d.ts +2 -0
- package/dist/src/component/line.js +130 -0
- package/dist/src/component/line.js.map +1 -0
- package/dist/src/component/register-default-groups.d.ts +1 -0
- package/dist/src/component/register-default-groups.js +28 -0
- package/dist/src/component/register-default-groups.js.map +1 -0
- package/dist/src/component/shape.d.ts +2 -0
- package/dist/src/component/shape.js +152 -0
- package/dist/src/component/shape.js.map +1 -0
- package/dist/src/component/table.d.ts +2 -0
- package/dist/src/component/table.js +26 -0
- package/dist/src/component/table.js.map +1 -0
- package/dist/src/component/text-and-media.d.ts +2 -0
- package/dist/src/component/text-and-media.js +122 -0
- package/dist/src/component/text-and-media.js.map +1 -0
- package/dist/src/component/warehouse.d.ts +2 -0
- package/dist/src/component/warehouse.js +24 -0
- package/dist/src/component/warehouse.js.map +1 -0
- package/dist/src/graphql/board.d.ts +6 -0
- package/dist/src/graphql/board.js +130 -0
- package/dist/src/graphql/board.js.map +1 -0
- package/dist/src/graphql/favorite-board.d.ts +1 -0
- package/dist/src/graphql/favorite-board.js +23 -0
- package/dist/src/graphql/favorite-board.js.map +1 -0
- package/dist/src/graphql/group.d.ts +7 -0
- package/dist/src/graphql/group.js +125 -0
- package/dist/src/graphql/group.js.map +1 -0
- package/dist/src/graphql/index.d.ts +4 -0
- package/dist/src/graphql/index.js +5 -0
- package/dist/src/graphql/index.js.map +1 -0
- package/dist/src/graphql/play-group.d.ts +8 -0
- package/dist/src/graphql/play-group.js +173 -0
- package/dist/src/graphql/play-group.js.map +1 -0
- package/dist/src/modeller/component-toolbar/component-detail.d.ts +1 -1
- package/dist/src/modeller/component-toolbar/component-detail.js +6 -6
- package/dist/src/modeller/component-toolbar/component-detail.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +1 -2
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js +26 -65
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/ox-board-list.d.ts +2 -0
- package/dist/src/ox-board-list.js +427 -0
- package/dist/src/ox-board-list.js.map +1 -0
- package/dist/src/ox-board-modeller.d.ts +6 -1
- package/dist/src/ox-board-modeller.js +35 -3
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/types.d.ts +30 -0
- package/dist/src/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +12 -6
- package/src/component/3d.ts +29 -0
- package/src/component/chart-and-gauge.ts +28 -0
- package/src/component/container.ts +62 -0
- package/src/component/data-source.ts +30 -0
- package/src/component/etc.ts +87 -0
- package/src/component/form.ts +42 -0
- package/src/component/index.ts +12 -0
- package/src/component/iot.ts +52 -0
- package/src/component/line.ts +132 -0
- package/src/component/register-default-groups.ts +28 -0
- package/src/component/shape.ts +154 -0
- package/src/component/table.ts +28 -0
- package/src/component/text-and-media.ts +124 -0
- package/src/component/warehouse.ts +26 -0
- package/src/graphql/board.ts +144 -0
- package/src/graphql/favorite-board.ts +25 -0
- package/src/graphql/group.ts +138 -0
- package/src/graphql/index.ts +4 -0
- package/src/graphql/play-group.ts +189 -0
- package/src/modeller/component-toolbar/component-detail.ts +7 -7
- package/src/modeller/component-toolbar/component-menu.ts +2 -5
- package/src/modeller/component-toolbar/component-toolbar.ts +35 -67
- package/src/ox-board-list.ts +459 -0
- package/src/ox-board-modeller.ts +44 -5
- package/src/types.ts +48 -0
- package/yarn-error.log +0 -18355
|
@@ -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
|
+
export function registerDefaultGroups() {
|
|
15
|
+
BoardModeller.registerGroup(line);
|
|
16
|
+
BoardModeller.registerGroup(shape);
|
|
17
|
+
BoardModeller.registerGroup(textAndMedia);
|
|
18
|
+
BoardModeller.registerGroup(chartAndGauge);
|
|
19
|
+
BoardModeller.registerGroup(table);
|
|
20
|
+
BoardModeller.registerGroup(container);
|
|
21
|
+
BoardModeller.registerGroup(dataSource);
|
|
22
|
+
BoardModeller.registerGroup(iot);
|
|
23
|
+
BoardModeller.registerGroup(threed);
|
|
24
|
+
BoardModeller.registerGroup(warehouse);
|
|
25
|
+
BoardModeller.registerGroup(form);
|
|
26
|
+
BoardModeller.registerGroup(etc);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=register-default-groups.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-default-groups.js","sourceRoot":"","sources":["../../../src/component/register-default-groups.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,UAAU,qBAAqB;IACnC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;IACjC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAClC,aAAa,CAAC,aAAa,CAAC,YAAY,CAAC,CAAA;IACzC,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,CAAA;IAC1C,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAClC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;IACtC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IACvC,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;IAChC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;IACnC,aAAa,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;IACtC,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;IACjC,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;AAClC,CAAC","sourcesContent":["import { BoardModeller } from '../ox-board-modeller'\nimport { chartAndGauge } from './chart-and-gauge'\nimport { container } from './container'\nimport { dataSource } from './data-source'\nimport { etc } from './etc'\nimport { form } from './form'\nimport { iot } from './iot'\nimport { line } from './line'\nimport { shape } from './shape'\nimport { table } from './table'\nimport { textAndMedia } from './text-and-media'\nimport { threed } from './3d'\nimport { warehouse } from './warehouse'\n\nexport function registerDefaultGroups() {\n BoardModeller.registerGroup(line)\n BoardModeller.registerGroup(shape)\n BoardModeller.registerGroup(textAndMedia)\n BoardModeller.registerGroup(chartAndGauge)\n BoardModeller.registerGroup(table)\n BoardModeller.registerGroup(container)\n BoardModeller.registerGroup(dataSource)\n BoardModeller.registerGroup(iot)\n BoardModeller.registerGroup(threed)\n BoardModeller.registerGroup(warehouse)\n BoardModeller.registerGroup(form)\n BoardModeller.registerGroup(etc)\n}\n"]}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import donut from '../../../assets/images/components/donut.png';
|
|
2
|
+
import ellipse from '../../../assets/images/components/ellipse.png';
|
|
3
|
+
import polygon from '../../../assets/images/components/polygon.png';
|
|
4
|
+
import rect from '../../../assets/images/components/rect.png';
|
|
5
|
+
import star from '../../../assets/images/components/star.png';
|
|
6
|
+
import triangle from '../../../assets/images/components/triangle.png';
|
|
7
|
+
const icon = `
|
|
8
|
+
<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">
|
|
9
|
+
<style type="text/css">
|
|
10
|
+
.st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}
|
|
11
|
+
</style>
|
|
12
|
+
<g>
|
|
13
|
+
<polyline class="st0" points="21.6,9.4 21.6,4.6 1.6,4.6 1.6,17.7 12.5,17.7 "/>
|
|
14
|
+
<circle class="st0" cx="21.3" cy="18.3" r="7"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
17
|
+
`;
|
|
18
|
+
export const shape = {
|
|
19
|
+
name: 'shape',
|
|
20
|
+
description: 'a group of simple basic shapes',
|
|
21
|
+
icon,
|
|
22
|
+
templates: [
|
|
23
|
+
{
|
|
24
|
+
type: 'rect',
|
|
25
|
+
description: 'rectangle shape',
|
|
26
|
+
icon: rect,
|
|
27
|
+
group: 'shape',
|
|
28
|
+
model: {
|
|
29
|
+
type: 'rect',
|
|
30
|
+
left: 100,
|
|
31
|
+
top: 100,
|
|
32
|
+
width: 100,
|
|
33
|
+
height: 100,
|
|
34
|
+
fillStyle: '#fff',
|
|
35
|
+
strokeStyle: '#000',
|
|
36
|
+
alpha: 1,
|
|
37
|
+
hidden: false,
|
|
38
|
+
lineWidth: 1,
|
|
39
|
+
lineDash: 'solid',
|
|
40
|
+
lineCap: 'butt'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: 'ellipse',
|
|
45
|
+
description: 'ellipse shape',
|
|
46
|
+
icon: ellipse,
|
|
47
|
+
group: 'shape',
|
|
48
|
+
model: {
|
|
49
|
+
type: 'ellipse',
|
|
50
|
+
rx: 50,
|
|
51
|
+
ry: 50,
|
|
52
|
+
cx: 150,
|
|
53
|
+
cy: 150,
|
|
54
|
+
fillStyle: '#fff',
|
|
55
|
+
strokeStyle: '#000',
|
|
56
|
+
alpha: 1,
|
|
57
|
+
hidden: false,
|
|
58
|
+
lineWidth: 1,
|
|
59
|
+
lineDash: 'solid',
|
|
60
|
+
lineCap: 'butt'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'donut',
|
|
65
|
+
description: 'donut shape',
|
|
66
|
+
icon: donut,
|
|
67
|
+
group: 'shape',
|
|
68
|
+
model: {
|
|
69
|
+
type: 'donut',
|
|
70
|
+
rx: 50,
|
|
71
|
+
ry: 50,
|
|
72
|
+
cx: 150,
|
|
73
|
+
cy: 150,
|
|
74
|
+
ratio: 30,
|
|
75
|
+
fillStyle: '#fff',
|
|
76
|
+
strokeStyle: '#000',
|
|
77
|
+
alpha: 1,
|
|
78
|
+
hidden: false,
|
|
79
|
+
lineWidth: 1,
|
|
80
|
+
lineDash: 'solid',
|
|
81
|
+
lineCap: 'butt'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: 'triangle',
|
|
86
|
+
description: 'triangle shape',
|
|
87
|
+
icon: triangle,
|
|
88
|
+
group: 'shape',
|
|
89
|
+
model: {
|
|
90
|
+
type: 'triangle',
|
|
91
|
+
x1: 150,
|
|
92
|
+
y1: 100,
|
|
93
|
+
x2: 100,
|
|
94
|
+
y2: 200,
|
|
95
|
+
x3: 200,
|
|
96
|
+
y3: 200,
|
|
97
|
+
fillStyle: '#fff',
|
|
98
|
+
strokeStyle: '#000',
|
|
99
|
+
alpha: 1,
|
|
100
|
+
hidden: false,
|
|
101
|
+
lineWidth: 1,
|
|
102
|
+
lineDash: 'solid',
|
|
103
|
+
lineCap: 'butt'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: 'polygon',
|
|
108
|
+
description: 'polygon shape',
|
|
109
|
+
icon: polygon,
|
|
110
|
+
group: 'shape',
|
|
111
|
+
model: {
|
|
112
|
+
type: 'polygon',
|
|
113
|
+
path: [
|
|
114
|
+
{ x: 100, y: 100 },
|
|
115
|
+
{ x: 200, y: 100 },
|
|
116
|
+
{ x: 200, y: 200 },
|
|
117
|
+
{ x: 100, y: 200 }
|
|
118
|
+
],
|
|
119
|
+
fillStyle: '#fff',
|
|
120
|
+
strokeStyle: '#000',
|
|
121
|
+
alpha: 1,
|
|
122
|
+
hidden: false,
|
|
123
|
+
lineWidth: 1,
|
|
124
|
+
lineDash: 'solid',
|
|
125
|
+
lineCap: 'butt'
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'star',
|
|
130
|
+
description: 'star shape',
|
|
131
|
+
icon: star,
|
|
132
|
+
group: 'shape',
|
|
133
|
+
model: {
|
|
134
|
+
type: 'star',
|
|
135
|
+
rx: 50,
|
|
136
|
+
ry: 50,
|
|
137
|
+
cx: 150,
|
|
138
|
+
cy: 150,
|
|
139
|
+
ratio: 30,
|
|
140
|
+
wing: 5,
|
|
141
|
+
fillStyle: '#fff',
|
|
142
|
+
strokeStyle: '#000',
|
|
143
|
+
alpha: 1,
|
|
144
|
+
hidden: false,
|
|
145
|
+
lineWidth: 1,
|
|
146
|
+
lineDash: 'solid',
|
|
147
|
+
lineCap: 'butt'
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../../src/component/shape.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,6CAA6C,CAAA;AAC/D,OAAO,OAAO,MAAM,+CAA+C,CAAA;AACnE,OAAO,OAAO,MAAM,+CAA+C,CAAA;AACnE,OAAO,IAAI,MAAM,4CAA4C,CAAA;AAC7D,OAAO,IAAI,MAAM,4CAA4C,CAAA;AAC7D,OAAO,QAAQ,MAAM,gDAAgD,CAAA;AAErE,MAAM,IAAI,GAAG;;;;;;;;;;CAUZ,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAmB;IACnC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,gCAAgC;IAC7C,IAAI;IACJ,SAAS,EAAE;QACT;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,OAAO;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;gBACX,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,EAAE,EAAE,EAAE;gBACN,EAAE,EAAE,EAAE;gBACN,EAAE,EAAE,GAAG;gBACP,EAAE,EAAE,GAAG;gBACP,S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SAAS;gBACf,IAAI,EAAE;oBACJ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;oBAClB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;oBAClB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;oBAClB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE;iBACnB;gBACD,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,YAAY;YACzB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,OAAO;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,EAAE,EAAE,EAAE;gBACN,EAAE,EAAE,EAAE;gBACN,EAAE,EAAE,GAAG;gBACP,EAAE,EAAE,GAAG;gBACP,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,CAAC;gBACP,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;aAChB;SACF;KACF;CACF,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\nimport donut from '../../../assets/images/components/donut.png'\nimport ellipse from '../../../assets/images/components/ellipse.png'\nimport polygon from '../../../assets/images/components/polygon.png'\nimport rect from '../../../assets/images/components/rect.png'\nimport star from '../../../assets/images/components/star.png'\nimport triangle from '../../../assets/images/components/triangle.png'\n\nconst icon = `\n<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\">\n <style type=\"text/css\">\n .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}\n </style>\n <g>\n <polyline class=\"st0\" points=\"21.6,9.4 21.6,4.6 1.6,4.6 1.6,17.7 12.5,17.7 \t\"/>\n <circle class=\"st0\" cx=\"21.3\" cy=\"18.3\" r=\"7\"/>\n </g>\n</svg>\n`\n\nexport const shape: ComponentGroup = {\n name: 'shape',\n description: 'a group of simple basic shapes',\n icon,\n templates: [\n {\n type: 'rect',\n description: 'rectangle shape',\n icon: rect,\n group: 'shape',\n model: {\n type: 'rect',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'ellipse',\n description: 'ellipse shape',\n icon: ellipse,\n group: 'shape',\n model: {\n type: 'ellipse',\n rx: 50,\n ry: 50,\n cx: 150,\n cy: 150,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'donut',\n description: 'donut shape',\n icon: donut,\n group: 'shape',\n model: {\n type: 'donut',\n rx: 50,\n ry: 50,\n cx: 150,\n cy: 150,\n ratio: 30,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'triangle',\n description: 'triangle shape',\n icon: triangle,\n group: 'shape',\n model: {\n type: 'triangle',\n x1: 150,\n y1: 100,\n x2: 100,\n y2: 200,\n x3: 200,\n y3: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'polygon',\n description: 'polygon shape',\n icon: polygon,\n group: 'shape',\n model: {\n type: 'polygon',\n path: [\n { x: 100, y: 100 },\n { x: 200, y: 100 },\n { x: 200, y: 200 },\n { x: 100, y: 200 }\n ],\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'star',\n description: 'star shape',\n icon: star,\n group: 'shape',\n model: {\n type: 'star',\n rx: 50,\n ry: 50,\n cx: 150,\n cy: 150,\n ratio: 30,\n wing: 5,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n }\n ]\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const icon = `
|
|
2
|
+
<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">
|
|
3
|
+
<style type="text/css">
|
|
4
|
+
.st5{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}
|
|
5
|
+
.st9{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}
|
|
6
|
+
.st10{fill:none;stroke:{{strokeColor}};stroke-width:0.5;stroke-miterlimit:10;}
|
|
7
|
+
</style>
|
|
8
|
+
<g>
|
|
9
|
+
<rect x="2.4" y="6" class="st9" width="25.2" height="18"/>
|
|
10
|
+
<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"/>
|
|
11
|
+
<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"/>
|
|
12
|
+
<line class="st5" x1="2" y1="7.5" x2="28" y2="7.5"/>
|
|
13
|
+
<line class="st10" x1="2" y1="11.6" x2="28" y2="11.6"/>
|
|
14
|
+
<line class="st10" x1="2" y1="14.8" x2="28" y2="14.8"/>
|
|
15
|
+
<line class="st10" x1="2" y1="18.1" x2="28" y2="18.1"/>
|
|
16
|
+
<line class="st10" x1="2" y1="21.3" x2="28" y2="21.3"/>
|
|
17
|
+
</g>
|
|
18
|
+
</svg>
|
|
19
|
+
`;
|
|
20
|
+
export const table = {
|
|
21
|
+
name: 'table',
|
|
22
|
+
description: 'a group of various tables',
|
|
23
|
+
icon,
|
|
24
|
+
templates: []
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../src/component/table.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;CAkBZ,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAmB;IACnC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,2BAA2B;IACxC,IAAI;IACJ,SAAS,EAAE,EAAE;CACd,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\n\nconst icon = `\n<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\">\n <style type=\"text/css\">\n .st5{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}\n .st9{fill:none;stroke:{{strokeColor}};stroke-miterlimit:10;}\n .st10{fill:none;stroke:{{strokeColor}};stroke-width:0.5;stroke-miterlimit:10;}\n </style>\n <g>\n <rect x=\"2.4\" y=\"6\" class=\"st9\" width=\"25.2\" height=\"18\"/>\n <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\"/>\n <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\"/>\n <line class=\"st5\" x1=\"2\" y1=\"7.5\" x2=\"28\" y2=\"7.5\"/>\n <line class=\"st10\" x1=\"2\" y1=\"11.6\" x2=\"28\" y2=\"11.6\"/>\n <line class=\"st10\" x1=\"2\" y1=\"14.8\" x2=\"28\" y2=\"14.8\"/>\n <line class=\"st10\" x1=\"2\" y1=\"18.1\" x2=\"28\" y2=\"18.1\"/>\n <line class=\"st10\" x1=\"2\" y1=\"21.3\" x2=\"28\" y2=\"21.3\"/>\n </g>\n</svg>\n`\n\nexport const table: ComponentGroup = {\n name: 'table',\n description: 'a group of various tables',\n icon,\n templates: []\n}\n"]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import audio from '../../../assets/images/components/audio.png';
|
|
2
|
+
import colorImage from '../../../assets/images/components/color-image.png';
|
|
3
|
+
import gifImage from '../../../assets/images/components/gif-image.png';
|
|
4
|
+
import grayImage from '../../../assets/images/components/gray-image.png';
|
|
5
|
+
import text from '../../../assets/images/components/text.png';
|
|
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:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}
|
|
10
|
+
.st1{fill:{{strokeColor}};}
|
|
11
|
+
</style>
|
|
12
|
+
<g>
|
|
13
|
+
<polyline class="st0" points="20.6,12.8 20.6,5.1 1.6,5.1 1.6,18 15,18"/>
|
|
14
|
+
<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"/>
|
|
15
|
+
<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"/>
|
|
16
|
+
<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
|
|
17
|
+
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"/>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
20
|
+
`;
|
|
21
|
+
export const textAndMedia = {
|
|
22
|
+
name: 'textAndMedia',
|
|
23
|
+
description: 'a group of text and various media components',
|
|
24
|
+
icon,
|
|
25
|
+
templates: [
|
|
26
|
+
{
|
|
27
|
+
type: 'text',
|
|
28
|
+
description: 'text',
|
|
29
|
+
icon: text,
|
|
30
|
+
group: 'textAndMedia',
|
|
31
|
+
model: {
|
|
32
|
+
type: 'text',
|
|
33
|
+
left: 100,
|
|
34
|
+
top: 100,
|
|
35
|
+
width: 200,
|
|
36
|
+
height: 50,
|
|
37
|
+
text: 'Text',
|
|
38
|
+
fillStyle: '#fff',
|
|
39
|
+
strokeStyle: '#000',
|
|
40
|
+
alpha: 1,
|
|
41
|
+
hidden: false,
|
|
42
|
+
lineWidth: 5,
|
|
43
|
+
lineDash: 'solid',
|
|
44
|
+
lineCap: 'butt',
|
|
45
|
+
textAlign: 'left',
|
|
46
|
+
textBaseline: 'top',
|
|
47
|
+
textWrap: false,
|
|
48
|
+
fontFamily: 'serif',
|
|
49
|
+
fontSize: 30
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'color image',
|
|
54
|
+
description: 'color image',
|
|
55
|
+
icon: colorImage,
|
|
56
|
+
group: 'textAndMedia',
|
|
57
|
+
model: {
|
|
58
|
+
type: 'image-view',
|
|
59
|
+
left: 100,
|
|
60
|
+
top: 100,
|
|
61
|
+
width: 100,
|
|
62
|
+
height: 100,
|
|
63
|
+
isGray: false,
|
|
64
|
+
fillStyle: '#fff',
|
|
65
|
+
strokeStyle: '#000',
|
|
66
|
+
alpha: 1,
|
|
67
|
+
hidden: false,
|
|
68
|
+
lineWidth: 1,
|
|
69
|
+
lineDash: 'solid',
|
|
70
|
+
lineCap: 'butt'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'gray image',
|
|
75
|
+
description: 'gray image',
|
|
76
|
+
icon: grayImage,
|
|
77
|
+
group: 'textAndMedia',
|
|
78
|
+
model: {
|
|
79
|
+
type: 'image-view',
|
|
80
|
+
left: 100,
|
|
81
|
+
top: 100,
|
|
82
|
+
width: 100,
|
|
83
|
+
height: 100,
|
|
84
|
+
isGray: true,
|
|
85
|
+
fillStyle: '#fff',
|
|
86
|
+
strokeStyle: '#000',
|
|
87
|
+
alpha: 1,
|
|
88
|
+
hidden: false,
|
|
89
|
+
lineWidth: 1,
|
|
90
|
+
lineDash: 'solid',
|
|
91
|
+
lineCap: 'butt'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'gif image',
|
|
96
|
+
description: 'gif image',
|
|
97
|
+
icon: gifImage,
|
|
98
|
+
group: 'textAndMedia',
|
|
99
|
+
model: {
|
|
100
|
+
type: 'gif-view',
|
|
101
|
+
left: 100,
|
|
102
|
+
top: 100,
|
|
103
|
+
width: 100,
|
|
104
|
+
height: 100
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: 'audio',
|
|
109
|
+
description: 'audio',
|
|
110
|
+
icon: audio,
|
|
111
|
+
group: 'textAndMedia',
|
|
112
|
+
model: {
|
|
113
|
+
type: 'audio',
|
|
114
|
+
left: 100,
|
|
115
|
+
top: 100,
|
|
116
|
+
width: 100,
|
|
117
|
+
height: 100
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=text-and-media.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-and-media.js","sourceRoot":"","sources":["../../../src/component/text-and-media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,6CAA6C,CAAA;AAC/D,OAAO,UAAU,MAAM,mDAAmD,CAAA;AAC1E,OAAO,QAAQ,MAAM,iDAAiD,CAAA;AACtE,OAAO,SAAS,MAAM,kDAAkD,CAAA;AACxE,OAAO,IAAI,MAAM,4CAA4C,CAAA;AAE7D,MAAM,IAAI,GAAG;;;;;;;;;;;;;;CAcZ,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAmB;IAC1C,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,8CAA8C;IAC3D,IAAI;IACJ,SAAS,EAAE;QACT;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,MAAM;YACnB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,cAAc;YACrB,KAAK,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,EAAE;gBACV,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,MAAM;gBACjB,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,KAAK;gBACb,SAAS,EAAE,CAAC;gBACZ,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,MAAM;gBACf,SAAS,EAAE,MAAM;gBACjB,YAAY,EAAE,KAAK;gBACnB,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,OAAO;gBACnB,QAAQ,EAAE,EAAE;aACb;SACF;QACD;YACE,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,aAAa;YAC1B,IAAI,EAAE,UAAU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AAG;gBACT,GAAG,EAAE,GAAG;gBACR,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;aACZ;SACF;KACF;CACF,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\nimport audio from '../../../assets/images/components/audio.png'\nimport colorImage from '../../../assets/images/components/color-image.png'\nimport gifImage from '../../../assets/images/components/gif-image.png'\nimport grayImage from '../../../assets/images/components/gray-image.png'\nimport text from '../../../assets/images/components/text.png'\n\nconst icon = `\n<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\">\n <style type=\"text/css\">\n\t .st0{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-miterlimit:10;}\n\t .st1{fill:{{strokeColor}};}\n </style>\n <g>\n\t <polyline class=\"st0\" points=\"20.6,12.8 20.6,5.1 1.6,5.1 1.6,18 15,18\"/>\n\t <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\"/>\n\t <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\"/>\n\t <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\n\t\t 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\"/>\n </g>\n</svg>\n`\n\nexport const textAndMedia: ComponentGroup = {\n name: 'textAndMedia',\n description: 'a group of text and various media components',\n icon,\n templates: [\n {\n type: 'text',\n description: 'text',\n icon: text,\n group: 'textAndMedia',\n model: {\n type: 'text',\n left: 100,\n top: 100,\n width: 200,\n height: 50,\n text: 'Text',\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 5,\n lineDash: 'solid',\n lineCap: 'butt',\n textAlign: 'left',\n textBaseline: 'top',\n textWrap: false,\n fontFamily: 'serif',\n fontSize: 30\n }\n },\n {\n type: 'color image',\n description: 'color image',\n icon: colorImage,\n group: 'textAndMedia',\n model: {\n type: 'image-view',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n isGray: false,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'gray image',\n description: 'gray image',\n icon: grayImage,\n group: 'textAndMedia',\n model: {\n type: 'image-view',\n left: 100,\n top: 100,\n width: 100,\n height: 100,\n isGray: true,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 1,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'gif image',\n description: 'gif image',\n icon: gifImage,\n group: 'textAndMedia',\n model: {\n type: 'gif-view',\n left: 100,\n top: 100,\n width: 100,\n height: 100\n }\n },\n {\n type: 'audio',\n description: 'audio',\n icon: audio,\n group: 'textAndMedia',\n model: {\n type: 'audio',\n left: 100,\n top: 100,\n width: 100,\n height: 100\n }\n }\n ]\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const icon = `
|
|
2
|
+
<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">
|
|
3
|
+
<style type="text/css">
|
|
4
|
+
.st0{fill:{{strokeColor}};}
|
|
5
|
+
.st14{fill:none;stroke:{{strokeColor}};stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:10;}
|
|
6
|
+
.st15{fill:none;stroke:{{strokeColor}};stroke-linecap:round;stroke-miterlimit:10;}
|
|
7
|
+
</style>
|
|
8
|
+
<g>
|
|
9
|
+
<polyline class="st14" points="1.5,11.2 15,5.2 28.5,11 "/>
|
|
10
|
+
<line class="st15" x1="3.2" y1="11.6" x2="3.2" y2="23.8"/>
|
|
11
|
+
<line class="st15" x1="26.9" y1="11.6" x2="26.9" y2="23.8"/>
|
|
12
|
+
<line class="st5" x1="1.7" y1="24.8" x2="28.3" y2="24.8"/>
|
|
13
|
+
<rect x="21.1" y="18.3" class="st0" width="3.4" height="5.5"/>
|
|
14
|
+
<path class="st0" d="M5.9,13.6v10.2h13.8V13.6H5.9z M18.7,17.3H6.8v-2.4h11.9V17.3z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
17
|
+
`;
|
|
18
|
+
export const warehouse = {
|
|
19
|
+
name: 'warehouse',
|
|
20
|
+
description: 'a group of various components used in a warehouse depiction',
|
|
21
|
+
icon,
|
|
22
|
+
templates: []
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=warehouse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"warehouse.js","sourceRoot":"","sources":["../../../src/component/warehouse.ts"],"names":[],"mappings":"AAEA,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;CAgBZ,CAAA;AAED,MAAM,CAAC,MAAM,SAAS,GAAmB;IACvC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,6DAA6D;IAC1E,IAAI;IACJ,SAAS,EAAE,EAAE;CACd,CAAA","sourcesContent":["import { ComponentGroup } from '../types'\n\nconst icon = `\n<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\">\n <style type=\"text/css\">\n .st0{fill:{{strokeColor}};}\n .st14{fill:none;stroke:{{strokeColor}};stroke-width:2.5;stroke-linecap:round;stroke-miterlimit:10;}\n .st15{fill:none;stroke:{{strokeColor}};stroke-linecap:round;stroke-miterlimit:10;}\n </style>\n <g>\n <polyline class=\"st14\" points=\"1.5,11.2 15,5.2 28.5,11 \t\"/>\n <line class=\"st15\" x1=\"3.2\" y1=\"11.6\" x2=\"3.2\" y2=\"23.8\"/>\n <line class=\"st15\" x1=\"26.9\" y1=\"11.6\" x2=\"26.9\" y2=\"23.8\"/>\n <line class=\"st5\" x1=\"1.7\" y1=\"24.8\" x2=\"28.3\" y2=\"24.8\"/>\n <rect x=\"21.1\" y=\"18.3\" class=\"st0\" width=\"3.4\" height=\"5.5\"/>\n <path class=\"st0\" d=\"M5.9,13.6v10.2h13.8V13.6H5.9z M18.7,17.3H6.8v-2.4h11.9V17.3z\"/>\n </g>\n</svg>\n`\n\nexport const warehouse: ComponentGroup = {\n name: 'warehouse',\n description: 'a group of various components used in a warehouse depiction',\n icon,\n templates: []\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Board } from '../types';
|
|
2
|
+
export declare function fetchBoardList(listParam?: {}): Promise<any>;
|
|
3
|
+
export declare function fetchBoard(id: string): Promise<any>;
|
|
4
|
+
export declare function createBoard(board: Board): Promise<any>;
|
|
5
|
+
export declare function updateBoard(board: Board): Promise<any>;
|
|
6
|
+
export declare function deleteBoard(id: string): Promise<any>;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { buildArgs, client } from '@operato/graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export async function fetchBoardList(listParam = {}) {
|
|
4
|
+
const response = await client.query({
|
|
5
|
+
query: gql `
|
|
6
|
+
{
|
|
7
|
+
boards(${buildArgs(listParam)}) {
|
|
8
|
+
items {
|
|
9
|
+
id
|
|
10
|
+
name
|
|
11
|
+
description
|
|
12
|
+
thumbnail
|
|
13
|
+
createdAt
|
|
14
|
+
updatedAt
|
|
15
|
+
}
|
|
16
|
+
total
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`
|
|
20
|
+
});
|
|
21
|
+
return response.data;
|
|
22
|
+
}
|
|
23
|
+
export async function fetchBoard(id) {
|
|
24
|
+
const response = await client.query({
|
|
25
|
+
query: gql `
|
|
26
|
+
query FetchBoardById($id: String!) {
|
|
27
|
+
board(id: $id) {
|
|
28
|
+
id
|
|
29
|
+
name
|
|
30
|
+
description
|
|
31
|
+
group {
|
|
32
|
+
id
|
|
33
|
+
name
|
|
34
|
+
}
|
|
35
|
+
thumbnail
|
|
36
|
+
model
|
|
37
|
+
createdAt
|
|
38
|
+
creator {
|
|
39
|
+
id
|
|
40
|
+
name
|
|
41
|
+
}
|
|
42
|
+
updatedAt
|
|
43
|
+
updater {
|
|
44
|
+
id
|
|
45
|
+
name
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`,
|
|
50
|
+
variables: { id }
|
|
51
|
+
});
|
|
52
|
+
return response.data;
|
|
53
|
+
}
|
|
54
|
+
export async function createBoard(board) {
|
|
55
|
+
/*
|
|
56
|
+
input NewBoard {
|
|
57
|
+
name : String!
|
|
58
|
+
description : String
|
|
59
|
+
model : String!
|
|
60
|
+
groupId : String!
|
|
61
|
+
}
|
|
62
|
+
*/
|
|
63
|
+
board.model = JSON.stringify(board.model);
|
|
64
|
+
const response = await client.mutate({
|
|
65
|
+
mutation: gql `
|
|
66
|
+
mutation CreateBoard($board: NewBoard!) {
|
|
67
|
+
createBoard(board: $board) {
|
|
68
|
+
id
|
|
69
|
+
name
|
|
70
|
+
description
|
|
71
|
+
model
|
|
72
|
+
createdAt
|
|
73
|
+
updatedAt
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
`,
|
|
77
|
+
variables: {
|
|
78
|
+
board
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
return response.data;
|
|
82
|
+
}
|
|
83
|
+
export async function updateBoard(board) {
|
|
84
|
+
/*
|
|
85
|
+
input BoardPatch {
|
|
86
|
+
name : String
|
|
87
|
+
description : String
|
|
88
|
+
model : String
|
|
89
|
+
}
|
|
90
|
+
*/
|
|
91
|
+
var { id, name, description, model, groupId } = board;
|
|
92
|
+
model = JSON.stringify(model);
|
|
93
|
+
const response = await client.mutate({
|
|
94
|
+
mutation: gql `
|
|
95
|
+
mutation UpdateBoard($id: String!, $patch: BoardPatch!) {
|
|
96
|
+
updateBoard(id: $id, patch: $patch) {
|
|
97
|
+
id
|
|
98
|
+
name
|
|
99
|
+
description
|
|
100
|
+
model
|
|
101
|
+
group {
|
|
102
|
+
id
|
|
103
|
+
name
|
|
104
|
+
}
|
|
105
|
+
createdAt
|
|
106
|
+
updatedAt
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
`,
|
|
110
|
+
variables: {
|
|
111
|
+
id,
|
|
112
|
+
patch: { name, description, model, groupId }
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
return response.data;
|
|
116
|
+
}
|
|
117
|
+
export async function deleteBoard(id) {
|
|
118
|
+
const response = await client.mutate({
|
|
119
|
+
mutation: gql `
|
|
120
|
+
mutation ($id: String!) {
|
|
121
|
+
deleteBoard(id: $id)
|
|
122
|
+
}
|
|
123
|
+
`,
|
|
124
|
+
variables: {
|
|
125
|
+
id
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return response.data;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"board.js","sourceRoot":"","sources":["../../../src/graphql/board.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAGpD,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,SAAS,GAAG,EAAE;IACjD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK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O,QAAQ,CAAC,IAAI,CAAA;AACtB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAU;IAC1C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;QACnC,QAAQ,EAAE,GAAG,CAAA;;;;KAIZ;QACD,SAAS,EAAE;YACT,EAAE;SACH;KACF,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAA;AACtB,CAAC","sourcesContent":["import { buildArgs, client } from '@operato/graphql'\n\nimport { Board } from '../types'\nimport gql from 'graphql-tag'\n\nexport async function fetchBoardList(listParam = {}) {\n const response = await client.query({\n query: gql`\n {\n boards(${buildArgs(listParam)}) {\n items {\n id\n name\n description\n thumbnail\n createdAt\n updatedAt\n }\n total\n }\n }\n `\n })\n\n return response.data\n}\n\nexport async function fetchBoard(id: string) {\n const response = await client.query({\n query: gql`\n query FetchBoardById($id: String!) {\n board(id: $id) {\n id\n name\n description\n group {\n id\n name\n }\n thumbnail\n model\n createdAt\n creator {\n id\n name\n }\n updatedAt\n updater {\n id\n name\n }\n }\n }\n `,\n variables: { id }\n })\n\n return response.data\n}\n\nexport async function createBoard(board: Board) {\n /*\n input NewBoard {\n name : String!\n description : String\n model : String!\n groupId : String!\n }\n */\n\n board.model = JSON.stringify(board.model)\n\n const response = await client.mutate({\n mutation: gql`\n mutation CreateBoard($board: NewBoard!) {\n createBoard(board: $board) {\n id\n name\n description\n model\n createdAt\n updatedAt\n }\n }\n `,\n variables: {\n board\n }\n })\n\n return response.data\n}\n\nexport async function updateBoard(board: Board) {\n /*\n input BoardPatch {\n name : String\n description : String\n model : String\n }\n */\n var { id, name, description, model, groupId } = board\n model = JSON.stringify(model)\n\n const response = await client.mutate({\n mutation: gql`\n mutation UpdateBoard($id: String!, $patch: BoardPatch!) {\n updateBoard(id: $id, patch: $patch) {\n id\n name\n description\n model\n group {\n id\n name\n }\n createdAt\n updatedAt\n }\n }\n `,\n variables: {\n id,\n patch: { name, description, model, groupId }\n }\n })\n\n return response.data\n}\n\nexport async function deleteBoard(id: string) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!) {\n deleteBoard(id: $id)\n }\n `,\n variables: {\n id\n }\n })\n\n return response.data\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fetchFavoriteBoardList(listParam?: {}): Promise<any>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { buildArgs, client } from '@operato/graphql';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
export async function fetchFavoriteBoardList(listParam = {}) {
|
|
4
|
+
const response = await client.query({
|
|
5
|
+
query: gql `
|
|
6
|
+
{
|
|
7
|
+
favoriteBoards(${buildArgs(listParam)}) {
|
|
8
|
+
items {
|
|
9
|
+
id
|
|
10
|
+
name
|
|
11
|
+
description
|
|
12
|
+
thumbnail
|
|
13
|
+
createdAt
|
|
14
|
+
updatedAt
|
|
15
|
+
}
|
|
16
|
+
total
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`
|
|
20
|
+
});
|
|
21
|
+
return response.data;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=favorite-board.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favorite-board.js","sourceRoot":"","sources":["../../../src/graphql/favorite-board.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEpD,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,SAAS,GAAG,EAAE;IACzD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;QAClC,KAAK,EAAE,GAAG,CAAA;;yBAEW,SAAS,CAAC,SAAS,CAAC;;;;;;;;;;;;KAYxC;KACF,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAA;AACtB,CAAC","sourcesContent":["import { buildArgs, client } from '@operato/graphql'\n\nimport gql from 'graphql-tag'\n\nexport async function fetchFavoriteBoardList(listParam = {}) {\n const response = await client.query({\n query: gql`\n {\n favoriteBoards(${buildArgs(listParam)}) {\n items {\n id\n name\n description\n thumbnail\n createdAt\n updatedAt\n }\n total\n }\n }\n `\n })\n\n return response.data\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoardGroup } from '../types';
|
|
2
|
+
export declare function fetchGroup(id: string): Promise<any>;
|
|
3
|
+
export declare function updateGroup(group: BoardGroup): Promise<any>;
|
|
4
|
+
export declare function deleteGroup(id: string): Promise<any>;
|
|
5
|
+
export declare function fetchGroupList(): Promise<any>;
|
|
6
|
+
export declare function createGroup(group: BoardGroup): Promise<any>;
|
|
7
|
+
export declare function joinGroup(boardId: string, groupId: string): Promise<any>;
|