@operato/board 9.0.0-beta.5 → 9.0.0-beta.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 +333 -0
- package/dist/src/component/etc.js +17 -0
- package/dist/src/component/etc.js.map +1 -1
- package/dist/src/modeller/component-toolbar/component-menu.d.ts +1 -1
- package/dist/src/modeller/component-toolbar/component-toolbar.d.ts +1 -1
- package/dist/src/modeller/edit-toolbar.js +21 -19
- package/dist/src/modeller/edit-toolbar.js.map +1 -1
- package/dist/src/modeller/{property-sidebar/property-sidebar.d.ts → property-sidebar.d.ts} +18 -17
- package/dist/src/modeller/{property-sidebar/property-sidebar.js → property-sidebar.js} +46 -31
- package/dist/src/modeller/property-sidebar.js.map +1 -0
- package/dist/src/ox-board-component-info.js +1 -1
- package/dist/src/ox-board-component-info.js.map +1 -1
- package/dist/src/ox-board-modeller.d.ts +2 -2
- package/dist/src/ox-board-modeller.js +1 -13
- package/dist/src/ox-board-modeller.js.map +1 -1
- package/dist/src/ox-board-viewer.js +17 -5
- package/dist/src/ox-board-viewer.js.map +1 -1
- package/dist/src/player/ox-board-wrapper.js +2 -1
- package/dist/src/player/ox-board-wrapper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/icons/components/pdf-page.png +0 -0
- package/package.json +15 -16
- package/dist/src/modeller/property-sidebar/abstract-property.d.ts +0 -10
- package/dist/src/modeller/property-sidebar/abstract-property.js +0 -55
- package/dist/src/modeller/property-sidebar/abstract-property.js.map +0 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +0 -58
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +0 -443
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +0 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.d.ts +0 -6
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js +0 -20
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js.map +0 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.d.ts +0 -6
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js +0 -20
- package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js.map +0 -1
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +0 -44
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +0 -458
- package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.d.ts +0 -4
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +0 -61
- package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/effects.d.ts +0 -24
- package/dist/src/modeller/property-sidebar/effects/effects.js +0 -64
- package/dist/src/modeller/property-sidebar/effects/effects.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/property-animation.d.ts +0 -23
- package/dist/src/modeller/property-sidebar/effects/property-animation.js +0 -138
- package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +0 -22
- package/dist/src/modeller/property-sidebar/effects/property-animations.js +0 -89
- package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +0 -21
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +0 -182
- package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +0 -36
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +0 -244
- package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +0 -22
- package/dist/src/modeller/property-sidebar/effects/property-event.js +0 -64
- package/dist/src/modeller/property-sidebar/effects/property-event.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/property-shadow.d.ts +0 -23
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js +0 -103
- package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +0 -1
- package/dist/src/modeller/property-sidebar/effects/value-converter.d.ts +0 -1
- package/dist/src/modeller/property-sidebar/effects/value-converter.js +0 -21
- package/dist/src/modeller/property-sidebar/effects/value-converter.js.map +0 -1
- package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +0 -27
- package/dist/src/modeller/property-sidebar/inspector/inspector.js +0 -355
- package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +0 -1
- package/dist/src/modeller/property-sidebar/property-shared-style.d.ts +0 -4
- package/dist/src/modeller/property-sidebar/property-shared-style.js +0 -135
- package/dist/src/modeller/property-sidebar/property-shared-style.js.map +0 -1
- package/dist/src/modeller/property-sidebar/property-sidebar.js.map +0 -1
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.d.ts +0 -1
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +0 -94
- package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +0 -1
- package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +0 -26
- package/dist/src/modeller/property-sidebar/shapes/shapes.js +0 -430
- package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +0 -1
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.d.ts +0 -16
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +0 -138
- package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +0 -1
- package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +0 -25
- package/dist/src/modeller/property-sidebar/specifics/specifics.js +0 -84
- package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +0 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +0 -21
- package/dist/src/modeller/property-sidebar/styles/styles.js +0 -559
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +0 -1
- package/dist/stories/property-data-binding.stories.d.ts +0 -20
- package/dist/stories/property-data-binding.stories.js +0 -19
- package/dist/stories/property-data-binding.stories.js.map +0 -1
- package/icons/icon-properties-arrow-type.png +0 -0
- package/icons/icon-properties-gradient-direction.png +0 -0
- package/icons/icon-properties-label.png +0 -0
- package/icons/icon-properties-line-type.png +0 -0
- package/icons/icon-properties-padding.png +0 -0
- package/icons/icon-properties-ratio.png +0 -0
- package/icons/icon-properties-table.png +0 -0
- package/icons/icon-shell-inspector.png +0 -0
@@ -1,182 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
-
*/
|
4
|
-
import { __decorate } from "tslib";
|
5
|
-
import '@operato/input/ox-input-data.js';
|
6
|
-
import '@operato/i18n/ox-i18n.js';
|
7
|
-
import { css, html, LitElement } from 'lit';
|
8
|
-
import { property } from 'lit/decorators.js';
|
9
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
10
|
-
import { EffectsSharedStyle } from './effects-shared-style.js';
|
11
|
-
import { convert } from './value-converter.js';
|
12
|
-
const SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set'];
|
13
|
-
export class PropertyEventHover extends LitElement {
|
14
|
-
firstUpdated() {
|
15
|
-
this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
|
16
|
-
}
|
17
|
-
render() {
|
18
|
-
var { action, value = '', target = '', emphasize, restore } = this.value || {};
|
19
|
-
return html `
|
20
|
-
<input id="checkbox-emphasize" type="checkbox" value-key="emphasize" .checked=${emphasize} />
|
21
|
-
<label for="checkbox-emphasize" class="checkbox-label">
|
22
|
-
<ox-i18n msgid="label.emphasize">emphasize</ox-i18n>
|
23
|
-
</label>
|
24
|
-
|
25
|
-
<label> <ox-i18n msgid="label.action">action</ox-i18n> </label>
|
26
|
-
<select id="tap-select" value-key="action" .value=${action || ''}>
|
27
|
-
<option value=""></option>
|
28
|
-
<option value="popup">popup target board</option>
|
29
|
-
<option value="info-window">open infowindow</option>
|
30
|
-
<option value="data-toggle">toggle(true/false) target component data</option>
|
31
|
-
<option value="data-tristate">tristate(0/1/2) target component data</option>
|
32
|
-
<option value="data-set">set value to target component data</option>
|
33
|
-
<option value="value-set">set value to target component value</option>
|
34
|
-
<option value="mouse-cursor">change mouse cursor to target style</option>
|
35
|
-
</select>
|
36
|
-
|
37
|
-
<label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
|
38
|
-
|
39
|
-
${action == 'popup'
|
40
|
-
? html `
|
41
|
-
<ox-editor-board-selector value-key="target" .value=${target} custom-editor></ox-editor-board-selector>
|
42
|
-
`
|
43
|
-
: html `
|
44
|
-
<input
|
45
|
-
value-key="target"
|
46
|
-
.value=${target || ''}
|
47
|
-
list="target-list"
|
48
|
-
.placeholder="${this._getPlaceHoder(action)}"
|
49
|
-
/>
|
50
|
-
|
51
|
-
<datalist id="target-list">
|
52
|
-
${this._getTargetList(action).map(({ value, description, class: clazz }) => html `
|
53
|
-
<option .value=${value} class=${ifDefined(clazz)}>${description}</option>
|
54
|
-
`)}
|
55
|
-
</datalist>
|
56
|
-
`}
|
57
|
-
${SETS_ACTION.indexOf(action) != -1
|
58
|
-
? html `
|
59
|
-
<label> <ox-i18n msgid="label.value">value</ox-i18n> </label>
|
60
|
-
<ox-input-data value-key="value" .value=${value} custom-editor fullwidth></ox-input-data>
|
61
|
-
`
|
62
|
-
: html ``}
|
63
|
-
|
64
|
-
<input id="checkbox-restore" type="checkbox" value-key="restore" .checked=${restore} />
|
65
|
-
<label for="checkbox-restore" class="checkbox-label">
|
66
|
-
<ox-i18n msgid="label.restore-on-leave">restore on leave</ox-i18n>
|
67
|
-
</label>
|
68
|
-
`;
|
69
|
-
}
|
70
|
-
_getPlaceHoder(action) {
|
71
|
-
switch (action) {
|
72
|
-
case 'popup':
|
73
|
-
case 'goto':
|
74
|
-
return 'SCENE-100';
|
75
|
-
case 'link-open':
|
76
|
-
case 'link-move':
|
77
|
-
return 'http://www.hatiolab.com/';
|
78
|
-
default:
|
79
|
-
return '';
|
80
|
-
}
|
81
|
-
}
|
82
|
-
_getTargetList(action) {
|
83
|
-
switch (action) {
|
84
|
-
case 'data-toggle':
|
85
|
-
case 'data-tristate':
|
86
|
-
case 'data-set':
|
87
|
-
case 'value-set':
|
88
|
-
case 'partial-data-set':
|
89
|
-
case 'partial-value-set':
|
90
|
-
let ids = (this.scene &&
|
91
|
-
this.scene.ids.map(i => {
|
92
|
-
var _a;
|
93
|
-
const id = i.key;
|
94
|
-
return { value: `#${id}`, description: (_a = this.scene.findById(id)) === null || _a === void 0 ? void 0 : _a.get('type') };
|
95
|
-
})) ||
|
96
|
-
[];
|
97
|
-
ids.unshift({ value: '(self)', description: 'self component' });
|
98
|
-
return ids;
|
99
|
-
case 'info-window':
|
100
|
-
return ((this.scene &&
|
101
|
-
this.scene.ids
|
102
|
-
.filter(i => {
|
103
|
-
return this.scene.findById(i.key).get('type') == 'info-window';
|
104
|
-
})
|
105
|
-
.map(i => {
|
106
|
-
var _a;
|
107
|
-
const id = i.key;
|
108
|
-
return { value: `#${id}`, description: (_a = this.scene.findById(id)) === null || _a === void 0 ? void 0 : _a.get('type') };
|
109
|
-
})) ||
|
110
|
-
[]);
|
111
|
-
case 'mouse-cursor':
|
112
|
-
return ['auto', 'pointer', 'default', 'move', 'text', 'wait', 'help', 'crosshair', 'not-allowed', 'grab'].map(style => {
|
113
|
-
return { value: style, class: `cursor-${style}` };
|
114
|
-
});
|
115
|
-
default:
|
116
|
-
return [];
|
117
|
-
}
|
118
|
-
}
|
119
|
-
_onValueChange(e) {
|
120
|
-
var element = e.target;
|
121
|
-
var key = element.getAttribute('value-key');
|
122
|
-
if (!key) {
|
123
|
-
return;
|
124
|
-
}
|
125
|
-
this.value = {
|
126
|
-
...this.value,
|
127
|
-
[key]: convert(element)
|
128
|
-
};
|
129
|
-
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
|
130
|
-
}
|
131
|
-
}
|
132
|
-
PropertyEventHover.styles = [
|
133
|
-
EffectsSharedStyle,
|
134
|
-
css `
|
135
|
-
datalist option.cursor-auto {
|
136
|
-
cursor: auto;
|
137
|
-
}
|
138
|
-
|
139
|
-
datalist option.cursor-pointer {
|
140
|
-
cursor: pointer;
|
141
|
-
}
|
142
|
-
|
143
|
-
datalist option.cursor-default {
|
144
|
-
cursor: default;
|
145
|
-
}
|
146
|
-
|
147
|
-
datalist option.cursor-move {
|
148
|
-
cursor: move;
|
149
|
-
}
|
150
|
-
|
151
|
-
datalist option.cursor-text {
|
152
|
-
cursor: text;
|
153
|
-
}
|
154
|
-
|
155
|
-
datalist option.cursor-wait {
|
156
|
-
cursor: wait;
|
157
|
-
}
|
158
|
-
|
159
|
-
datalist option.cursor-help {
|
160
|
-
cursor: help;
|
161
|
-
}
|
162
|
-
|
163
|
-
datalist option.cursor-crosshair {
|
164
|
-
cursor: crosshair;
|
165
|
-
}
|
166
|
-
|
167
|
-
datalist option.cursor-not-allowed {
|
168
|
-
cursor: not-allowed;
|
169
|
-
}
|
170
|
-
|
171
|
-
datalist option.cursor-grab {
|
172
|
-
cursor: grab;
|
173
|
-
}
|
174
|
-
`
|
175
|
-
];
|
176
|
-
__decorate([
|
177
|
-
property({ type: Object })
|
178
|
-
], PropertyEventHover.prototype, "value", void 0);
|
179
|
-
__decorate([
|
180
|
-
property({ type: Object })
|
181
|
-
], PropertyEventHover.prototype, "scene", void 0);
|
182
|
-
//# sourceMappingURL=property-event-hover.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"property-event-hover.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-hover.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;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;;;;;;;;;;;;;;KAwCF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAc","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-data.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { EffectsSharedStyle } from './effects-shared-style.js'\nimport { convert } from './value-converter.js'\n\nconst SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set']\n\nexport class PropertyEventHover extends LitElement {\n static styles = [\n EffectsSharedStyle,\n css`\n datalist option.cursor-auto {\n cursor: auto;\n }\n\n datalist option.cursor-pointer {\n cursor: pointer;\n }\n\n datalist option.cursor-default {\n cursor: default;\n }\n\n datalist option.cursor-move {\n cursor: move;\n }\n\n datalist option.cursor-text {\n cursor: text;\n }\n\n datalist option.cursor-wait {\n cursor: wait;\n }\n\n datalist option.cursor-help {\n cursor: help;\n }\n\n datalist option.cursor-crosshair {\n cursor: crosshair;\n }\n\n datalist option.cursor-not-allowed {\n cursor: not-allowed;\n }\n\n datalist option.cursor-grab {\n cursor: grab;\n }\n `\n ]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var { action, value = '', target = '', emphasize, restore } = this.value || {}\n\n return html`\n <input id=\"checkbox-emphasize\" type=\"checkbox\" value-key=\"emphasize\" .checked=${emphasize} />\n <label for=\"checkbox-emphasize\" class=\"checkbox-label\">\n <ox-i18n msgid=\"label.emphasize\">emphasize</ox-i18n>\n </label>\n\n <label> <ox-i18n msgid=\"label.action\">action</ox-i18n> </label>\n <select id=\"tap-select\" value-key=\"action\" .value=${action || ''}>\n <option value=\"\"></option>\n <option value=\"popup\">popup target board</option>\n <option value=\"info-window\">open infowindow</option>\n <option value=\"data-toggle\">toggle(true/false) target component data</option>\n <option value=\"data-tristate\">tristate(0/1/2) target component data</option>\n <option value=\"data-set\">set value to target component data</option>\n <option value=\"value-set\">set value to target component value</option>\n <option value=\"mouse-cursor\">change mouse cursor to target style</option>\n </select>\n\n <label> <ox-i18n msgid=\"label.target\">target</ox-i18n> </label>\n\n ${action == 'popup'\n ? html`\n <ox-editor-board-selector value-key=\"target\" .value=${target} custom-editor></ox-editor-board-selector>\n `\n : html`\n <input\n value-key=\"target\"\n .value=${target || ''}\n list=\"target-list\"\n .placeholder=\"${this._getPlaceHoder(action)}\"\n />\n\n <datalist id=\"target-list\">\n ${this._getTargetList(action).map(\n ({ value, description, class: clazz }) => html`\n <option .value=${value} class=${ifDefined(clazz)}>${description}</option>\n `\n )}\n </datalist>\n `}\n ${SETS_ACTION.indexOf(action) != -1\n ? html`\n <label> <ox-i18n msgid=\"label.value\">value</ox-i18n> </label>\n <ox-input-data value-key=\"value\" .value=${value} custom-editor fullwidth></ox-input-data>\n `\n : html``}\n\n <input id=\"checkbox-restore\" type=\"checkbox\" value-key=\"restore\" .checked=${restore} />\n <label for=\"checkbox-restore\" class=\"checkbox-label\">\n <ox-i18n msgid=\"label.restore-on-leave\">restore on leave</ox-i18n>\n </label>\n `\n }\n\n _getPlaceHoder(action: string) {\n switch (action) {\n case 'popup':\n case 'goto':\n return 'SCENE-100'\n case 'link-open':\n case 'link-move':\n return 'http://www.hatiolab.com/'\n default:\n return ''\n }\n }\n\n _getTargetList(action: string): { value: string; description?: string; class?: string }[] {\n switch (action) {\n case 'data-toggle':\n case 'data-tristate':\n case 'data-set':\n case 'value-set':\n case 'partial-data-set':\n case 'partial-value-set':\n let ids =\n (this.scene &&\n this.scene.ids.map(i => {\n const id = i.key\n return { value: `#${id}`, description: this.scene!.findById(id)?.get('type') }\n })) ||\n []\n ids.unshift({ value: '(self)', description: 'self component' })\n return ids\n\n case 'info-window':\n return (\n (this.scene &&\n this.scene.ids\n .filter(i => {\n return this.scene!.findById(i.key).get('type') == 'info-window'\n })\n .map(i => {\n const id = i.key\n return { value: `#${id}`, description: this.scene!.findById(id)?.get('type') }\n })) ||\n []\n )\n\n case 'mouse-cursor':\n return ['auto', 'pointer', 'default', 'move', 'text', 'wait', 'help', 'crosshair', 'not-allowed', 'grab'].map(\n style => {\n return { value: style, class: `cursor-${style}` }\n }\n )\n\n default:\n return []\n }\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n this.value = {\n ...this.value,\n [key]: convert(element)\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
-
*/
|
4
|
-
import '@operato/input/ox-input-data.js';
|
5
|
-
import '@operato/i18n/ox-i18n.js';
|
6
|
-
import { LitElement } from 'lit';
|
7
|
-
import { Properties, Scene } from '@hatiolab/things-scene';
|
8
|
-
export declare class PropertyEventTap extends LitElement {
|
9
|
-
static styles: import("lit").CSSResult[];
|
10
|
-
value?: Properties;
|
11
|
-
scene?: Scene;
|
12
|
-
scenarios: {
|
13
|
-
value: string;
|
14
|
-
description: string;
|
15
|
-
}[];
|
16
|
-
playlists: {
|
17
|
-
value: string;
|
18
|
-
description: string;
|
19
|
-
}[];
|
20
|
-
targetList: {
|
21
|
-
value: string;
|
22
|
-
description: string;
|
23
|
-
}[];
|
24
|
-
firstUpdated(): Promise<void>;
|
25
|
-
render(): import("lit-html").TemplateResult<1>;
|
26
|
-
_getPlaceHoder(action: string): "" | "http://www.hatiolab.com/" | "abc.xlsx";
|
27
|
-
_getTargetList(action: string): {
|
28
|
-
value: string;
|
29
|
-
description: string;
|
30
|
-
}[];
|
31
|
-
_getInputList(action: string): {
|
32
|
-
value: string;
|
33
|
-
description: string;
|
34
|
-
}[];
|
35
|
-
_onValueChange(e: Event): void;
|
36
|
-
}
|
@@ -1,244 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
-
*/
|
4
|
-
import { __decorate } from "tslib";
|
5
|
-
import '@operato/input/ox-input-data.js';
|
6
|
-
import '@operato/i18n/ox-i18n.js';
|
7
|
-
import { html, LitElement } from 'lit';
|
8
|
-
import { property, state } from 'lit/decorators.js';
|
9
|
-
import { scenarios } from '../../../graphql/scenario.js';
|
10
|
-
import { playlists } from '../../../graphql/play-group.js';
|
11
|
-
import { EffectsSharedStyle } from './effects-shared-style.js';
|
12
|
-
import { convert } from './value-converter.js';
|
13
|
-
const SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set', 'start-scenario', 'run-scenario'];
|
14
|
-
export class PropertyEventTap extends LitElement {
|
15
|
-
constructor() {
|
16
|
-
super(...arguments);
|
17
|
-
this.scenarios = [];
|
18
|
-
this.playlists = [];
|
19
|
-
this.targetList = [];
|
20
|
-
}
|
21
|
-
async firstUpdated() {
|
22
|
-
this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
|
23
|
-
}
|
24
|
-
render() {
|
25
|
-
var { action, value = '', target = '', pressed, options } = this.value || {};
|
26
|
-
var { input = '(self)', output = true } = options || {};
|
27
|
-
return html `
|
28
|
-
<input id="checkbox-pressed" type="checkbox" value-key="pressed" .checked=${pressed} />
|
29
|
-
<label for="checkbox-pressed" class="checkbox-label"> <ox-i18n msgid="label.pressed">pressed</ox-i18n> </label>
|
30
|
-
|
31
|
-
<label> <ox-i18n msgid="label.action">action</ox-i18n> </label>
|
32
|
-
<select
|
33
|
-
id="tap-select"
|
34
|
-
value-key="action"
|
35
|
-
.value=${action || ''}
|
36
|
-
@change=${async (e) => {
|
37
|
-
if (e.target.value.includes('scenario')) {
|
38
|
-
this.scenarios = (await scenarios()).map(({ name, description }) => {
|
39
|
-
return { value: name, description };
|
40
|
-
});
|
41
|
-
}
|
42
|
-
else if (e.target.value == 'goto-playlist') {
|
43
|
-
this.playlists = (await playlists()).map(({ name, description }) => {
|
44
|
-
return { value: name, description };
|
45
|
-
});
|
46
|
-
}
|
47
|
-
}}
|
48
|
-
>
|
49
|
-
<option value=""></option>
|
50
|
-
<option value="goto">go to target board</option>
|
51
|
-
<option value="goto-playlist">go to target playlist</option>
|
52
|
-
<option value="link-open">open new window for target link</option>
|
53
|
-
<option value="link-move">move to target link</option>
|
54
|
-
<option value="route-page">route to page</option>
|
55
|
-
<option value="popup">popup target board</option>
|
56
|
-
<option value="modal-popup">modal popup target board</option>
|
57
|
-
<option value="close-scene">close current board</option>
|
58
|
-
<option value="infoWindow">open infowindow</option>
|
59
|
-
<option value="toggle-info-window">toggle infowindow</option>
|
60
|
-
<option value="data-toggle">toggle(true/false) target component data</option>
|
61
|
-
<option value="data-tristate">tristate(0/1/2) target component data</option>
|
62
|
-
<option value="data-spreading">forcely execute data spreading of target component</option>
|
63
|
-
<option value="data-set">set value to target component data</option>
|
64
|
-
<option value="partial-data-set">set partial value to target component data</option>
|
65
|
-
<option value="value-set">set value to target component value</option>
|
66
|
-
<option value="partial-value-set">set partial value to target component value</option>
|
67
|
-
<option value="start-scenario">start the given scenario</option>
|
68
|
-
<option value="run-scenario">run the given scenario</option>
|
69
|
-
<option value="export-data">export data</option>
|
70
|
-
<option value="import-data">import data</option>
|
71
|
-
</select>
|
72
|
-
|
73
|
-
<label> <ox-i18n msgid="label.target">target</ox-i18n> </label>
|
74
|
-
|
75
|
-
${action === 'goto' || (action === null || action === void 0 ? void 0 : action.includes('popup'))
|
76
|
-
? html `
|
77
|
-
<ox-editor-board-selector value-key="target" .value=${target} custom-editor></ox-editor-board-selector>
|
78
|
-
`
|
79
|
-
: html `
|
80
|
-
<input
|
81
|
-
value-key="target"
|
82
|
-
.value=${target}
|
83
|
-
list="target-list"
|
84
|
-
.placeholder=${this._getPlaceHoder(action)}
|
85
|
-
@focusin=${() => {
|
86
|
-
this.targetList = this._getTargetList(action);
|
87
|
-
}}
|
88
|
-
/>
|
89
|
-
|
90
|
-
<datalist id="target-list">
|
91
|
-
${this.targetList.map(({ value, description }) => html ` <option .value=${value}>${description}</option> `)}
|
92
|
-
</datalist>
|
93
|
-
`}
|
94
|
-
${action === 'goto' || action === 'goto-playlist' || (action === null || action === void 0 ? void 0 : action.includes('popup'))
|
95
|
-
? html `
|
96
|
-
<label for="input"> <ox-i18n msgid="label.input-data">input</ox-i18n> </label>
|
97
|
-
<input
|
98
|
-
id="input"
|
99
|
-
value-key="input"
|
100
|
-
.value=${input}
|
101
|
-
list="input-list"
|
102
|
-
@focusin=${() => {
|
103
|
-
this.targetList = this._getInputList(action);
|
104
|
-
}}
|
105
|
-
/>
|
106
|
-
<datalist id="input-list">
|
107
|
-
${this.targetList.map(({ value, description }) => html ` <option .value=${value}>${description}</option> `)}
|
108
|
-
</datalist>
|
109
|
-
${
|
110
|
-
/* currently 'goto' does not support returning result */
|
111
|
-
(action === null || action === void 0 ? void 0 : action.includes('popup'))
|
112
|
-
? html ` <input id="checkbox-output" type="checkbox" value-key="output" .checked=${output} />
|
113
|
-
<label for="checkbox-output" class="checkbox-label">
|
114
|
-
<ox-i18n msgid="label.will-get-return">will-get-return</ox-i18n>
|
115
|
-
</label>`
|
116
|
-
: html ``}
|
117
|
-
`
|
118
|
-
: SETS_ACTION.indexOf(action) != -1
|
119
|
-
? html `
|
120
|
-
<label> <ox-i18n msgid="label.value">value</ox-i18n> </label>
|
121
|
-
<ox-input-data value-key="value" .value=${value} custom-editor fullwidth></ox-input-data>
|
122
|
-
`
|
123
|
-
: html ``}
|
124
|
-
`;
|
125
|
-
}
|
126
|
-
_getPlaceHoder(action) {
|
127
|
-
switch (action) {
|
128
|
-
case 'link-open':
|
129
|
-
case 'link-move':
|
130
|
-
return 'http://www.hatiolab.com/';
|
131
|
-
case 'export-data':
|
132
|
-
return 'abc.xlsx';
|
133
|
-
default:
|
134
|
-
return '';
|
135
|
-
}
|
136
|
-
}
|
137
|
-
_getTargetList(action) {
|
138
|
-
switch (action) {
|
139
|
-
case 'data-toggle':
|
140
|
-
case 'data-tristate':
|
141
|
-
case 'data-set':
|
142
|
-
case 'value-set':
|
143
|
-
case 'popup':
|
144
|
-
case 'modal-popup':
|
145
|
-
case 'data-spreading':
|
146
|
-
let ids = (this.scene &&
|
147
|
-
this.scene.ids.map(i => {
|
148
|
-
var _a;
|
149
|
-
const id = i.key;
|
150
|
-
return { value: `#${id}`, description: (_a = this.scene.findById(id)) === null || _a === void 0 ? void 0 : _a.get('type') };
|
151
|
-
})) ||
|
152
|
-
[];
|
153
|
-
ids.unshift({ value: '(self)', description: 'self component' });
|
154
|
-
return ids;
|
155
|
-
case 'infoWindow':
|
156
|
-
case 'toggle-info-window':
|
157
|
-
return ((this.scene &&
|
158
|
-
this.scene.ids
|
159
|
-
.filter(i => {
|
160
|
-
return this.scene.findById(i.key).get('type') == 'info-window';
|
161
|
-
})
|
162
|
-
.map(i => {
|
163
|
-
var _a;
|
164
|
-
const id = i.key;
|
165
|
-
return { value: `#${id}`, description: (_a = this.scene.findById(id)) === null || _a === void 0 ? void 0 : _a.get('type') };
|
166
|
-
})) ||
|
167
|
-
[]);
|
168
|
-
case 'start-scenario':
|
169
|
-
case 'run-scenario':
|
170
|
-
return this.scenarios;
|
171
|
-
case 'goto-playlist':
|
172
|
-
return this.playlists;
|
173
|
-
case 'export-data':
|
174
|
-
default:
|
175
|
-
return [];
|
176
|
-
}
|
177
|
-
}
|
178
|
-
_getInputList(action) {
|
179
|
-
switch (action) {
|
180
|
-
case 'popup':
|
181
|
-
case 'modal-popup':
|
182
|
-
case 'data-spreading':
|
183
|
-
case 'goto':
|
184
|
-
case 'goto-playlist':
|
185
|
-
let ids = (this.scene &&
|
186
|
-
this.scene.ids.map(i => {
|
187
|
-
var _a;
|
188
|
-
const id = i.key;
|
189
|
-
return { value: `#${id}`, description: (_a = this.scene.findById(id)) === null || _a === void 0 ? void 0 : _a.get('type') };
|
190
|
-
})) ||
|
191
|
-
[];
|
192
|
-
ids.unshift({ value: '(self)', description: 'self component' });
|
193
|
-
return ids;
|
194
|
-
default:
|
195
|
-
return [];
|
196
|
-
}
|
197
|
-
}
|
198
|
-
_onValueChange(e) {
|
199
|
-
var element = e.target;
|
200
|
-
var key = element.getAttribute('value-key');
|
201
|
-
if (!key) {
|
202
|
-
return;
|
203
|
-
}
|
204
|
-
if (key === 'input' || key === 'output') {
|
205
|
-
var { options = {} } = this.value || {};
|
206
|
-
this.value = {
|
207
|
-
...this.value,
|
208
|
-
options: {
|
209
|
-
...options,
|
210
|
-
[key]: convert(element)
|
211
|
-
}
|
212
|
-
};
|
213
|
-
}
|
214
|
-
else {
|
215
|
-
this.value = {
|
216
|
-
...this.value,
|
217
|
-
[key]: convert(element)
|
218
|
-
};
|
219
|
-
}
|
220
|
-
var { action } = this.value;
|
221
|
-
if (action !== 'goto' && action !== 'goto-playlist' && !(action === null || action === void 0 ? void 0 : action.includes('popup'))) {
|
222
|
-
/* clear unused options */
|
223
|
-
delete this.value.options;
|
224
|
-
}
|
225
|
-
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
|
226
|
-
}
|
227
|
-
}
|
228
|
-
PropertyEventTap.styles = [EffectsSharedStyle];
|
229
|
-
__decorate([
|
230
|
-
property({ type: Object })
|
231
|
-
], PropertyEventTap.prototype, "value", void 0);
|
232
|
-
__decorate([
|
233
|
-
property({ type: Object })
|
234
|
-
], PropertyEventTap.prototype, "scene", void 0);
|
235
|
-
__decorate([
|
236
|
-
state()
|
237
|
-
], PropertyEventTap.prototype, "scenarios", void 0);
|
238
|
-
__decorate([
|
239
|
-
state()
|
240
|
-
], PropertyEventTap.prototype, "playlists", void 0);
|
241
|
-
__decorate([
|
242
|
-
state()
|
243
|
-
], PropertyEventTap.prototype, "targetList", void 0);
|
244
|
-
//# sourceMappingURL=property-event-tap.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"property-event-tap.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event-tap.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAInD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,CAAC,CAAA;AAExH,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAMW,cAAS,GAA6C,EAAE,CAAA;QACxD,cAAS,GAA6C,EAAE,CAAA;QACxD,eAAU,GAA6C,EAAE,CAAA;IA+NpE,CAAC;IA7NC,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IAC5E,CAAC;IAED,MAAM;QACJ,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAA;QAC5E,IAAI,EAAE,KAAK,GAAG,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE,CAA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GAAG;gBACX,GAAG,IAAI,CAAC,KAAK;gBACb,OAAO,EAAE;oBACP,GAAG,OAAO;oBACV,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;iBACxB;aACF,CAAA;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,KAAK,GAAG;gBACX,GAAG,IAAI,CAAC,KAAK;gBACb,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;aACxB,CAAA;QACH,CAAC;QAED,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAC3B,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,KAAK,eAAe,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAC,OAAO,CAAC,CAAA,EAAE,CAAC;YAClF,0BAA0B;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAA;QAC3B,CAAC;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;;AArOM,uBAAM,GAAG,CAAC,kBAAkB,CAAC,AAAvB,CAAuB;AAER;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAc;AAEhC;IAAR,KAAK,EAAE;mDAAyD;AACxD;IAAR,KAAK,EAAE;mDAAyD;AACxD;IAAR,KAAK,EAAE;oDAA0D","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/input/ox-input-data.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { html, LitElement } from 'lit'\nimport { property, state } from 'lit/decorators.js'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\n\nimport { scenarios } from '../../../graphql/scenario.js'\nimport { playlists } from '../../../graphql/play-group.js'\nimport { EffectsSharedStyle } from './effects-shared-style.js'\nimport { convert } from './value-converter.js'\n\nconst SETS_ACTION = ['data-set', 'partial-data-set', 'value-set', 'partial-value-set', 'start-scenario', 'run-scenario']\n\nexport class PropertyEventTap extends LitElement {\n static styles = [EffectsSharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n @state() scenarios: { value: string; description: string }[] = []\n @state() playlists: { value: string; description: string }[] = []\n @state() targetList: { value: string; description: string }[] = []\n\n async firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n var { action, value = '', target = '', pressed, options } = this.value || {}\n var { input = '(self)', output = true } = options || {}\n\n return html`\n <input id=\"checkbox-pressed\" type=\"checkbox\" value-key=\"pressed\" .checked=${pressed} />\n <label for=\"checkbox-pressed\" class=\"checkbox-label\"> <ox-i18n msgid=\"label.pressed\">pressed</ox-i18n> </label>\n\n <label> <ox-i18n msgid=\"label.action\">action</ox-i18n> </label>\n <select\n id=\"tap-select\"\n value-key=\"action\"\n .value=${action || ''}\n @change=${async (e: Event) => {\n if ((e.target as HTMLSelectElement).value.includes('scenario')) {\n this.scenarios = (await scenarios()).map(({ name, description }) => {\n return { value: name, description }\n })\n } else if ((e.target as HTMLSelectElement).value == 'goto-playlist') {\n this.playlists = (await playlists()).map(({ name, description }) => {\n return { value: name, description }\n })\n }\n }}\n >\n <option value=\"\"></option>\n <option value=\"goto\">go to target board</option>\n <option value=\"goto-playlist\">go to target playlist</option>\n <option value=\"link-open\">open new window for target link</option>\n <option value=\"link-move\">move to target link</option>\n <option value=\"route-page\">route to page</option>\n <option value=\"popup\">popup target board</option>\n <option value=\"modal-popup\">modal popup target board</option>\n <option value=\"close-scene\">close current board</option>\n <option value=\"infoWindow\">open infowindow</option>\n <option value=\"toggle-info-window\">toggle infowindow</option>\n <option value=\"data-toggle\">toggle(true/false) target component data</option>\n <option value=\"data-tristate\">tristate(0/1/2) target component data</option>\n <option value=\"data-spreading\">forcely execute data spreading of target component</option>\n <option value=\"data-set\">set value to target component data</option>\n <option value=\"partial-data-set\">set partial value to target component data</option>\n <option value=\"value-set\">set value to target component value</option>\n <option value=\"partial-value-set\">set partial value to target component value</option>\n <option value=\"start-scenario\">start the given scenario</option>\n <option value=\"run-scenario\">run the given scenario</option>\n <option value=\"export-data\">export data</option>\n <option value=\"import-data\">import data</option>\n </select>\n\n <label> <ox-i18n msgid=\"label.target\">target</ox-i18n> </label>\n\n ${action === 'goto' || action?.includes('popup')\n ? html`\n <ox-editor-board-selector value-key=\"target\" .value=${target} custom-editor></ox-editor-board-selector>\n `\n : html`\n <input\n value-key=\"target\"\n .value=${target}\n list=\"target-list\"\n .placeholder=${this._getPlaceHoder(action)}\n @focusin=${() => {\n this.targetList = this._getTargetList(action)\n }}\n />\n\n <datalist id=\"target-list\">\n ${this.targetList.map(\n ({ value, description }) => html` <option .value=${value}>${description}</option> `\n )}\n </datalist>\n `}\n ${action === 'goto' || action === 'goto-playlist' || action?.includes('popup')\n ? html`\n <label for=\"input\"> <ox-i18n msgid=\"label.input-data\">input</ox-i18n> </label>\n <input\n id=\"input\"\n value-key=\"input\"\n .value=${input}\n list=\"input-list\"\n @focusin=${() => {\n this.targetList = this._getInputList(action)\n }}\n />\n <datalist id=\"input-list\">\n ${this.targetList.map(\n ({ value, description }) => html` <option .value=${value}>${description}</option> `\n )}\n </datalist>\n ${\n /* currently 'goto' does not support returning result */\n action?.includes('popup')\n ? html` <input id=\"checkbox-output\" type=\"checkbox\" value-key=\"output\" .checked=${output} />\n <label for=\"checkbox-output\" class=\"checkbox-label\">\n <ox-i18n msgid=\"label.will-get-return\">will-get-return</ox-i18n>\n </label>`\n : html``\n }\n `\n : SETS_ACTION.indexOf(action) != -1\n ? html`\n <label> <ox-i18n msgid=\"label.value\">value</ox-i18n> </label>\n <ox-input-data value-key=\"value\" .value=${value} custom-editor fullwidth></ox-input-data>\n `\n : html``}\n `\n }\n\n _getPlaceHoder(action: string) {\n switch (action) {\n case 'link-open':\n case 'link-move':\n return 'http://www.hatiolab.com/'\n case 'export-data':\n return 'abc.xlsx'\n default:\n return ''\n }\n }\n\n _getTargetList(action: string): { value: string; description: string }[] {\n switch (action) {\n case 'data-toggle':\n case 'data-tristate':\n case 'data-set':\n case 'value-set':\n case 'popup':\n case 'modal-popup':\n case 'data-spreading':\n let ids =\n (this.scene &&\n this.scene.ids.map(i => {\n const id = i.key\n return { value: `#${id}`, description: this.scene!.findById(id)?.get('type') }\n })) ||\n []\n ids.unshift({ value: '(self)', description: 'self component' })\n return ids\n case 'infoWindow':\n case 'toggle-info-window':\n return (\n (this.scene &&\n this.scene.ids\n .filter(i => {\n return this.scene!.findById(i.key).get('type') == 'info-window'\n })\n .map(i => {\n const id = i.key\n return { value: `#${id}`, description: this.scene!.findById(id)?.get('type') }\n })) ||\n []\n )\n case 'start-scenario':\n case 'run-scenario':\n return this.scenarios\n case 'goto-playlist':\n return this.playlists\n case 'export-data':\n default:\n return []\n }\n }\n\n _getInputList(action: string): { value: string; description: string }[] {\n switch (action) {\n case 'popup':\n case 'modal-popup':\n case 'data-spreading':\n case 'goto':\n case 'goto-playlist':\n let ids =\n (this.scene &&\n this.scene.ids.map(i => {\n const id = i.key\n return { value: `#${id}`, description: this.scene!.findById(id)?.get('type') }\n })) ||\n []\n ids.unshift({ value: '(self)', description: 'self component' })\n return ids\n default:\n return []\n }\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n if (key === 'input' || key === 'output') {\n var { options = {} } = this.value || {}\n\n this.value = {\n ...this.value,\n options: {\n ...options,\n [key]: convert(element)\n }\n }\n } else {\n this.value = {\n ...this.value,\n [key]: convert(element)\n }\n }\n\n var { action } = this.value\n if (action !== 'goto' && action !== 'goto-playlist' && !action?.includes('popup')) {\n /* clear unused options */\n delete this.value.options\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
|
@@ -1,22 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
-
*/
|
4
|
-
import '@operato/help/ox-title-with-help.js';
|
5
|
-
import { LitElement } from 'lit';
|
6
|
-
import { Properties, Scene } from '@hatiolab/things-scene';
|
7
|
-
import { PropertyEventHover } from './property-event-hover.js';
|
8
|
-
import { PropertyEventTap } from './property-event-tap.js';
|
9
|
-
declare const PropertyEvent_base: typeof LitElement & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/types/src/types.js").ScopedElementsHost>;
|
10
|
-
export declare class PropertyEvent extends PropertyEvent_base {
|
11
|
-
static styles: import("lit").CSSResult[];
|
12
|
-
value?: Properties;
|
13
|
-
scene?: Scene;
|
14
|
-
firstUpdated(): void;
|
15
|
-
static get scopedElements(): {
|
16
|
-
'property-event-hover': typeof PropertyEventHover;
|
17
|
-
'property-event-tap': typeof PropertyEventTap;
|
18
|
-
};
|
19
|
-
render(): import("lit-html").TemplateResult<1>;
|
20
|
-
_onValueChange(e: Event): void;
|
21
|
-
}
|
22
|
-
export {};
|
@@ -1,64 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
-
*/
|
4
|
-
import { __decorate } from "tslib";
|
5
|
-
import '@operato/help/ox-title-with-help.js';
|
6
|
-
import { html, LitElement } from 'lit';
|
7
|
-
import { property } from 'lit/decorators.js';
|
8
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
9
|
-
import { PropertySharedStyle } from '../property-shared-style.js';
|
10
|
-
import { PropertyEventHover } from './property-event-hover.js';
|
11
|
-
import { PropertyEventTap } from './property-event-tap.js';
|
12
|
-
import { convert } from './value-converter.js';
|
13
|
-
export class PropertyEvent extends ScopedElementsMixin(LitElement) {
|
14
|
-
firstUpdated() {
|
15
|
-
this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
|
16
|
-
}
|
17
|
-
static get scopedElements() {
|
18
|
-
return {
|
19
|
-
'property-event-hover': PropertyEventHover,
|
20
|
-
'property-event-tap': PropertyEventTap
|
21
|
-
};
|
22
|
-
}
|
23
|
-
render() {
|
24
|
-
const value = this.value || {};
|
25
|
-
return html `
|
26
|
-
<fieldset>
|
27
|
-
<legend>
|
28
|
-
<ox-title-with-help msgid="label.hover-event" topic="board-modeller/effects/hover-event"></ox-title-with-help>
|
29
|
-
</legend>
|
30
|
-
|
31
|
-
<property-event-hover value-key="hover" .scene=${this.scene} .value=${value.hover || {}}>
|
32
|
-
</property-event-hover>
|
33
|
-
</fieldset>
|
34
|
-
|
35
|
-
<fieldset>
|
36
|
-
<legend>
|
37
|
-
<ox-title-with-help msgid="label.tap-event" topic="board-modeller/effects/tap-event"></ox-title-with-help>
|
38
|
-
</legend>
|
39
|
-
|
40
|
-
<property-event-tap value-key="tap" .scene=${this.scene} .value=${value.tap || {}}> </property-event-tap>
|
41
|
-
</fieldset>
|
42
|
-
`;
|
43
|
-
}
|
44
|
-
_onValueChange(e) {
|
45
|
-
var element = e.target;
|
46
|
-
var key = element.getAttribute('value-key');
|
47
|
-
if (!key) {
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
this.value = {
|
51
|
-
...this.value,
|
52
|
-
[key]: convert(element)
|
53
|
-
};
|
54
|
-
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
|
55
|
-
}
|
56
|
-
}
|
57
|
-
PropertyEvent.styles = [PropertySharedStyle];
|
58
|
-
__decorate([
|
59
|
-
property({ type: Object })
|
60
|
-
], PropertyEvent.prototype, "value", void 0);
|
61
|
-
__decorate([
|
62
|
-
property({ type: Object })
|
63
|
-
], PropertyEvent.prototype, "scene", void 0);
|
64
|
-
//# sourceMappingURL=property-event.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"property-event.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/effects/property-event.ts"],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AK,GAAG;YACX,GAAG,IAAI,CAAC,KAAK;YACb,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;SACxB,CAAA;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;;AArDM,oBAAM,GAAG,CAAC,mBAAmB,CAAC,CAAA;AAET;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CAAc","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/help/ox-title-with-help.js'\n\nimport { html, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\n\nimport { Properties, Scene } from '@hatiolab/things-scene'\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements'\n\nimport { PropertySharedStyle } from '../property-shared-style.js'\nimport { PropertyEventHover } from './property-event-hover.js'\nimport { PropertyEventTap } from './property-event-tap.js'\nimport { convert } from './value-converter.js'\n\nexport class PropertyEvent extends ScopedElementsMixin(LitElement) {\n static styles = [PropertySharedStyle]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) scene?: Scene\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n static get scopedElements() {\n return {\n 'property-event-hover': PropertyEventHover,\n 'property-event-tap': PropertyEventTap\n }\n }\n\n render() {\n const value = this.value || {}\n\n return html`\n <fieldset>\n <legend>\n <ox-title-with-help msgid=\"label.hover-event\" topic=\"board-modeller/effects/hover-event\"></ox-title-with-help>\n </legend>\n\n <property-event-hover value-key=\"hover\" .scene=${this.scene} .value=${value.hover || {}}>\n </property-event-hover>\n </fieldset>\n\n <fieldset>\n <legend>\n <ox-title-with-help msgid=\"label.tap-event\" topic=\"board-modeller/effects/tap-event\"></ox-title-with-help>\n </legend>\n\n <property-event-tap value-key=\"tap\" .scene=${this.scene} .value=${value.tap || {}}> </property-event-tap>\n </fieldset>\n `\n }\n\n _onValueChange(e: Event) {\n var element = e.target as HTMLElement\n var key = element.getAttribute('value-key')\n\n if (!key) {\n return\n }\n\n this.value = {\n ...this.value,\n [key]: convert(element)\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
|
-
*/
|
4
|
-
import '@operato/i18n/ox-i18n.js';
|
5
|
-
import '@operato/input/ox-input-color.js';
|
6
|
-
import { LitElement } from 'lit';
|
7
|
-
import { Properties } from '@hatiolab/things-scene';
|
8
|
-
/**
|
9
|
-
* 컴포넌트의 그림자 속성을 편집하는 element
|
10
|
-
*
|
11
|
-
* Example:
|
12
|
-
* <property-shadow
|
13
|
-
* @change="${e => { this.shadow = e.target.value }}"
|
14
|
-
* value="${this.shadow}"
|
15
|
-
* ></property-shadow>
|
16
|
-
*/
|
17
|
-
export declare class PropertyShadow extends LitElement {
|
18
|
-
static styles: import("lit").CSSResult[];
|
19
|
-
value?: Properties;
|
20
|
-
firstUpdated(): void;
|
21
|
-
render(): import("lit-html").TemplateResult<1>;
|
22
|
-
_onValueChange(e: Event): void;
|
23
|
-
}
|