@operato/board 0.2.47 → 0.2.51
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 +48 -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 +2453 -1920
- 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/init-groups.d.ts +1 -0
- package/dist/src/component/init-groups.js +28 -0
- package/dist/src/component/init-groups.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/modeller/component-toolbar/component-detail.d.ts +4 -0
- package/dist/src/modeller/component-toolbar/component-detail.js +56 -0
- package/dist/src/modeller/component-toolbar/component-detail.js.map +1 -0
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.js +55 -10
- package/dist/src/modeller/component-toolbar/component-menu.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.js +44 -89
- package/dist/src/modeller/component-toolbar/component-toolbar.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +6 -5
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +1 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +1 -0
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +2 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +3 -2
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +1 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +3 -2
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +1 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +1 -1
- package/dist/src/ox-board-modeller.d.ts +5 -0
- package/dist/src/ox-board-modeller.js +33 -0
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/types.d.ts +13 -0
- package/dist/src/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -5
- 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/modeller/component-toolbar/component-detail.ts +53 -0
- package/src/modeller/component-toolbar/component-menu.ts +56 -11
- package/src/modeller/component-toolbar/component-toolbar.ts +54 -94
- package/src/modeller/property-sidebar/data-binding/data-binding-mapper.ts +7 -7
- package/src/modeller/property-sidebar/data-binding/data-binding.ts +4 -4
- package/src/modeller/property-sidebar/effects/property-event-hover.ts +4 -3
- package/src/modeller/property-sidebar/effects/property-event-tap.ts +4 -3
- package/src/ox-board-modeller.ts +46 -6
- package/src/types.ts +28 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line.js","sourceRoot":"","sources":["../../../src/component/line.ts"],"names":[],"mappings":"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","sourcesContent":["import { Group } from '../types'\nimport bothArrow from '../../../assets/images/components/both-arrow.png'\nimport dash from '../../../assets/images/components/dash.png'\nimport lineIcon from '../../../assets/images/components/line.png'\nimport polyline from '../../../assets/images/components/polyline.png'\nimport singleArrow from '../../../assets/images/components/single-arrow.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 .st3{fill:none;stroke:{{strokeColor}};stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}\n\t .st4{fill:none;stroke:{{strokeColor}};stroke-width:1.5;stroke-miterlimit:10;stroke-dasharray:3,1.5;}\n </style>\n <g>\n\t <line class=\"st3\" x1=\"1.7\" y1=\"18.9\" x2=\"26.3\" y2=\"6.2\"/>\n\t <line class=\"st4\" x1=\"1.7\" y1=\"23.8\" x2=\"28.3\" y2=\"10.1\"/>\n </g>\n</svg>\n`\n\nexport const line: Group = {\n name: 'line',\n description: 'a group of various lines',\n icon,\n templates: [\n {\n type: 'line',\n description: 'simple line',\n icon: lineIcon,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 3,\n lineDash: 'solid',\n lineCap: 'butt'\n }\n },\n {\n type: 'dash',\n description: 'dash line',\n icon: dash,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 3,\n lineDash: 'round-dot',\n lineCap: 'butt'\n }\n },\n {\n type: 'single arrow',\n description: 'single arrow tip line',\n icon: singleArrow,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 3,\n hidden: false,\n lineWidth: 3,\n lineDash: 'solid',\n begin: 'arrow',\n lineCap: 'butt'\n }\n },\n {\n type: 'both arrow',\n description: 'both arrow tip line',\n icon: bothArrow,\n group: 'line',\n model: {\n type: 'line',\n x1: 100,\n y1: 100,\n x2: 200,\n y2: 200,\n fillStyle: '#fff',\n strokeStyle: '#000',\n alpha: 1,\n hidden: false,\n lineWidth: 3,\n lineDash: 'solid',\n begin: 'arrow',\n end: 'arrow',\n lineCap: 'butt'\n }\n },\n {\n type: 'polyline',\n description: 'polyline',\n icon: polyline,\n group: 'line',\n model: {\n type: 'polyline',\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}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerDefaultGroups(): void;
|
|
@@ -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":"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","sourcesContent":["import { Group } 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: Group = {\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,GAAU;IAC1B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,2BAA2B;IACxC,IAAI;IACJ,SAAS,EAAE,EAAE;CACd,CAAA","sourcesContent":["import { Group } 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: Group = {\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":"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","sourcesContent":["import { Group } 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: Group = {\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,GAAU;IAC9B,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,6DAA6D;IAC1E,IAAI;IACJ,SAAS,EAAE,EAAE;CACd,CAAA","sourcesContent":["import { Group } 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: Group = {\n name: 'warehouse',\n description: 'a group of various components used in a warehouse depiction',\n icon,\n templates: []\n}\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
import { __decorate } from "tslib";
|
|
5
|
+
import '@operato/markdown';
|
|
6
|
+
import { LitElement, css, html } from 'lit';
|
|
7
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
8
|
+
import { ScrollbarStyles } from '@operato/styles';
|
|
9
|
+
let ComponentDetail = class ComponentDetail extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.template = null;
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const { about } = this.template || {};
|
|
16
|
+
return html ` <ox-markdown .src=${about}></ox-markdown> `;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
ComponentDetail.styles = [
|
|
20
|
+
ScrollbarStyles,
|
|
21
|
+
css `
|
|
22
|
+
:host {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-content: stretch;
|
|
26
|
+
|
|
27
|
+
background-color: var(--component-detail-background-color, white);
|
|
28
|
+
margin: 0px;
|
|
29
|
+
padding: 10px;
|
|
30
|
+
|
|
31
|
+
width: 360px;
|
|
32
|
+
height: 100%;
|
|
33
|
+
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
|
|
36
|
+
border: 2px solid var(--component-detail-border-color);
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
|
|
39
|
+
position: absolute;
|
|
40
|
+
top: 0px;
|
|
41
|
+
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ox-markdown {
|
|
46
|
+
flex: 1;
|
|
47
|
+
}
|
|
48
|
+
`
|
|
49
|
+
];
|
|
50
|
+
__decorate([
|
|
51
|
+
property({ type: Object })
|
|
52
|
+
], ComponentDetail.prototype, "template", void 0);
|
|
53
|
+
ComponentDetail = __decorate([
|
|
54
|
+
customElement('component-detail')
|
|
55
|
+
], ComponentDetail);
|
|
56
|
+
//# sourceMappingURL=component-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-detail.js","sourceRoot":"","sources":["../../../../src/modeller/component-toolbar/component-detail.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,mBAAmB,CAAA;AAE1B,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAiC8B,aAAQ,GAA6B,IAAI,CAAA;IAOvE,CAAC;IALC,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAErC,OAAO,IAAI,CAAA,sBAAsB,KAAK,kBAAkB,CAAA;IAC1D,CAAC;CACF,CAAA;AAvCQ,sBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAA0C;AAjCjE,eAAe;IADpB,aAAa,CAAC,kBAAkB,CAAC;GAC5B,eAAe,CAwCpB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/markdown'\n\nimport { LitElement, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('component-detail')\nclass ComponentDetail extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n align-content: stretch;\n\n background-color: var(--component-detail-background-color, white);\n margin: 0px;\n padding: 10px;\n\n width: 360px;\n height: 100%;\n\n overflow: hidden;\n\n border: 2px solid var(--component-detail-border-color);\n box-sizing: border-box;\n\n position: absolute;\n top: 0px;\n\n z-index: 1;\n }\n\n ox-markdown {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) template: { about: string } | null = null\n\n render() {\n const { about } = this.template || {}\n\n return html` <ox-markdown .src=${about}></ox-markdown> `\n }\n}\n"]}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import { __decorate } from "tslib";
|
|
5
|
+
import './component-detail';
|
|
5
6
|
import { LitElement, css, html } from 'lit';
|
|
6
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
7
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
7
8
|
import { ScrollbarStyles } from '@operato/styles';
|
|
8
9
|
import noImage from '../../../../assets/images/components/no-image.png';
|
|
9
10
|
let ComponentMenu = class ComponentMenu extends LitElement {
|
|
@@ -19,13 +20,27 @@ let ComponentMenu = class ComponentMenu extends LitElement {
|
|
|
19
20
|
? html `
|
|
20
21
|
<h2 onclick=${(e) => e.stopPropagation()}>${this.group} list</h2>
|
|
21
22
|
|
|
22
|
-
<div
|
|
23
|
+
<div
|
|
24
|
+
templates
|
|
25
|
+
@mouseover=${(e) => this.onHoverComponent(e)}
|
|
26
|
+
@mouseout=${(e) => (this.template = null)}
|
|
27
|
+
>
|
|
23
28
|
${(this.templates || []).map(template => html `
|
|
24
29
|
<div @click=${this.onClickTemplate} data-type=${template.type} template>
|
|
25
30
|
<img src=${this.templateIcon(template)} />${template.type}
|
|
26
31
|
</div>
|
|
27
32
|
`)}
|
|
28
33
|
</div>
|
|
34
|
+
|
|
35
|
+
<component-detail
|
|
36
|
+
tabindex="-1"
|
|
37
|
+
@focusout=${() => {
|
|
38
|
+
this.template = null;
|
|
39
|
+
}}
|
|
40
|
+
.template=${this.template}
|
|
41
|
+
hidden
|
|
42
|
+
>
|
|
43
|
+
</component-detail>
|
|
29
44
|
`
|
|
30
45
|
: html ``;
|
|
31
46
|
}
|
|
@@ -33,14 +48,27 @@ let ComponentMenu = class ComponentMenu extends LitElement {
|
|
|
33
48
|
var _a;
|
|
34
49
|
if (changes.has('group')) {
|
|
35
50
|
if (!this.group) {
|
|
36
|
-
this.style.display = 'none';
|
|
37
51
|
this.templates = [];
|
|
52
|
+
this.setAttribute('hidden', '');
|
|
38
53
|
}
|
|
39
54
|
else {
|
|
40
|
-
this.style.display = 'flex';
|
|
41
55
|
this.templates = ((_a = this.groups.find((g) => g.name === this.group)) === null || _a === void 0 ? void 0 : _a.templates) || [];
|
|
56
|
+
this.removeAttribute('active');
|
|
42
57
|
}
|
|
43
58
|
}
|
|
59
|
+
if (changes.has('template')) {
|
|
60
|
+
this.template && this.template.about
|
|
61
|
+
? this.detail.removeAttribute('hidden')
|
|
62
|
+
: this.detail.setAttribute('hidden', '');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
findTemplate(type) {
|
|
66
|
+
this.template = type && this.templates.find(template => template.type == type);
|
|
67
|
+
}
|
|
68
|
+
onHoverComponent(e) {
|
|
69
|
+
var _a;
|
|
70
|
+
const button = e.target;
|
|
71
|
+
this.findTemplate((_a = button.closest('[data-type]')) === null || _a === void 0 ? void 0 : _a.getAttribute('data-type'));
|
|
44
72
|
}
|
|
45
73
|
onClickTemplate(e) {
|
|
46
74
|
var _a;
|
|
@@ -49,10 +77,9 @@ let ComponentMenu = class ComponentMenu extends LitElement {
|
|
|
49
77
|
if (!type) {
|
|
50
78
|
return;
|
|
51
79
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
template && this.scene.add(JSON.parse(JSON.stringify(template.model)), { cx: 200, cy: 200 });
|
|
80
|
+
if (this.scene) {
|
|
81
|
+
this.template = this.templates.find(template => template.type == type);
|
|
82
|
+
this.template && this.scene.add(JSON.parse(JSON.stringify(this.template.model)), { cx: 200, cy: 200 });
|
|
56
83
|
}
|
|
57
84
|
this.group = null;
|
|
58
85
|
}
|
|
@@ -75,7 +102,7 @@ ComponentMenu.styles = [
|
|
|
75
102
|
width: 180px;
|
|
76
103
|
height: 100%;
|
|
77
104
|
|
|
78
|
-
overflow:
|
|
105
|
+
overflow: visible;
|
|
79
106
|
|
|
80
107
|
border: 2px solid var(--component-menu-border-color);
|
|
81
108
|
box-sizing: border-box;
|
|
@@ -128,6 +155,18 @@ ComponentMenu.styles = [
|
|
|
128
155
|
width: var(--component-menu-item-icon-size);
|
|
129
156
|
height: var(--component-menu-item-icon-size);
|
|
130
157
|
}
|
|
158
|
+
|
|
159
|
+
component-detail {
|
|
160
|
+
position: absolute;
|
|
161
|
+
top: 0;
|
|
162
|
+
left: 180px;
|
|
163
|
+
height: 100%;
|
|
164
|
+
outline: none;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
component-detail[hidden] {
|
|
168
|
+
display: none;
|
|
169
|
+
}
|
|
131
170
|
`
|
|
132
171
|
];
|
|
133
172
|
__decorate([
|
|
@@ -140,8 +179,14 @@ __decorate([
|
|
|
140
179
|
property({ type: String })
|
|
141
180
|
], ComponentMenu.prototype, "group", void 0);
|
|
142
181
|
__decorate([
|
|
143
|
-
|
|
182
|
+
state()
|
|
144
183
|
], ComponentMenu.prototype, "templates", void 0);
|
|
184
|
+
__decorate([
|
|
185
|
+
state()
|
|
186
|
+
], ComponentMenu.prototype, "template", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
query('component-detail')
|
|
189
|
+
], ComponentMenu.prototype, "detail", void 0);
|
|
145
190
|
ComponentMenu = __decorate([
|
|
146
191
|
customElement('component-menu')
|
|
147
192
|
], ComponentMenu);
|