@operato/board 9.0.0-beta.19 → 9.0.0-beta.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/tsconfig.tsbuildinfo +1 -1
  3. package/package.json +15 -15
  4. package/dist/src/modeller/property-sidebar/abstract-property.d.ts +0 -10
  5. package/dist/src/modeller/property-sidebar/abstract-property.js +0 -55
  6. package/dist/src/modeller/property-sidebar/abstract-property.js.map +0 -1
  7. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.d.ts +0 -58
  8. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js +0 -443
  9. package/dist/src/modeller/property-sidebar/data-binding/data-binding-mapper.js.map +0 -1
  10. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.d.ts +0 -6
  11. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js +0 -20
  12. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-map.js.map +0 -1
  13. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.d.ts +0 -6
  14. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js +0 -20
  15. package/dist/src/modeller/property-sidebar/data-binding/data-binding-value-range.js.map +0 -1
  16. package/dist/src/modeller/property-sidebar/data-binding/data-binding.d.ts +0 -44
  17. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js +0 -458
  18. package/dist/src/modeller/property-sidebar/data-binding/data-binding.js.map +0 -1
  19. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.d.ts +0 -4
  20. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js +0 -61
  21. package/dist/src/modeller/property-sidebar/effects/effects-shared-style.js.map +0 -1
  22. package/dist/src/modeller/property-sidebar/effects/effects.d.ts +0 -24
  23. package/dist/src/modeller/property-sidebar/effects/effects.js +0 -64
  24. package/dist/src/modeller/property-sidebar/effects/effects.js.map +0 -1
  25. package/dist/src/modeller/property-sidebar/effects/property-animation.d.ts +0 -23
  26. package/dist/src/modeller/property-sidebar/effects/property-animation.js +0 -138
  27. package/dist/src/modeller/property-sidebar/effects/property-animation.js.map +0 -1
  28. package/dist/src/modeller/property-sidebar/effects/property-animations.d.ts +0 -22
  29. package/dist/src/modeller/property-sidebar/effects/property-animations.js +0 -89
  30. package/dist/src/modeller/property-sidebar/effects/property-animations.js.map +0 -1
  31. package/dist/src/modeller/property-sidebar/effects/property-event-hover.d.ts +0 -21
  32. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js +0 -182
  33. package/dist/src/modeller/property-sidebar/effects/property-event-hover.js.map +0 -1
  34. package/dist/src/modeller/property-sidebar/effects/property-event-tap.d.ts +0 -36
  35. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js +0 -244
  36. package/dist/src/modeller/property-sidebar/effects/property-event-tap.js.map +0 -1
  37. package/dist/src/modeller/property-sidebar/effects/property-event.d.ts +0 -22
  38. package/dist/src/modeller/property-sidebar/effects/property-event.js +0 -64
  39. package/dist/src/modeller/property-sidebar/effects/property-event.js.map +0 -1
  40. package/dist/src/modeller/property-sidebar/effects/property-shadow.d.ts +0 -23
  41. package/dist/src/modeller/property-sidebar/effects/property-shadow.js +0 -103
  42. package/dist/src/modeller/property-sidebar/effects/property-shadow.js.map +0 -1
  43. package/dist/src/modeller/property-sidebar/effects/value-converter.d.ts +0 -1
  44. package/dist/src/modeller/property-sidebar/effects/value-converter.js +0 -21
  45. package/dist/src/modeller/property-sidebar/effects/value-converter.js.map +0 -1
  46. package/dist/src/modeller/property-sidebar/inspector/inspector.d.ts +0 -27
  47. package/dist/src/modeller/property-sidebar/inspector/inspector.js +0 -355
  48. package/dist/src/modeller/property-sidebar/inspector/inspector.js.map +0 -1
  49. package/dist/src/modeller/property-sidebar/property-shared-style.d.ts +0 -4
  50. package/dist/src/modeller/property-sidebar/property-shared-style.js +0 -146
  51. package/dist/src/modeller/property-sidebar/property-shared-style.js.map +0 -1
  52. package/dist/src/modeller/property-sidebar/property-sidebar.d.ts +0 -48
  53. package/dist/src/modeller/property-sidebar/property-sidebar.js +0 -342
  54. package/dist/src/modeller/property-sidebar/property-sidebar.js.map +0 -1
  55. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.d.ts +0 -1
  56. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js +0 -94
  57. package/dist/src/modeller/property-sidebar/shapes/box-padding-editor-styles.js.map +0 -1
  58. package/dist/src/modeller/property-sidebar/shapes/shapes.d.ts +0 -26
  59. package/dist/src/modeller/property-sidebar/shapes/shapes.js +0 -430
  60. package/dist/src/modeller/property-sidebar/shapes/shapes.js.map +0 -1
  61. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.d.ts +0 -16
  62. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js +0 -138
  63. package/dist/src/modeller/property-sidebar/specifics/specific-properties-builder.js.map +0 -1
  64. package/dist/src/modeller/property-sidebar/specifics/specifics.d.ts +0 -25
  65. package/dist/src/modeller/property-sidebar/specifics/specifics.js +0 -84
  66. package/dist/src/modeller/property-sidebar/specifics/specifics.js.map +0 -1
  67. package/dist/src/modeller/property-sidebar/styles/styles.d.ts +0 -21
  68. package/dist/src/modeller/property-sidebar/styles/styles.js +0 -562
  69. package/dist/src/modeller/property-sidebar/styles/styles.js.map +0 -1
  70. package/dist/stories/property-data-binding.stories.d.ts +0 -20
  71. package/dist/stories/property-data-binding.stories.js +0 -19
  72. package/dist/stories/property-data-binding.stories.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"box-padding-editor-styles.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/shapes/box-padding-editor-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FxC,CAAA","sourcesContent":["import { css } from 'lit'\n\nexport const BoxPaddingEditorStyles = css`\n .box-padding {\n width: 100%;\n }\n\n .box-padding td {\n background: var(--url-icon-properties-padding) 50% 0 no-repeat;\n }\n\n .box-padding tr:nth-child(1),\n .box-padding tr:nth-child(3) {\n height: 20px;\n }\n\n .box-padding tr td:nth-child(1),\n .box-padding tr td:nth-child(3) {\n width: 18px;\n }\n\n .box-padding .slide1 {\n background-position: 0 0;\n }\n\n .box-padding .slide2 {\n background-position: 50% -40px;\n background-color: rgba(69, 46, 41, 0.2);\n }\n\n .box-padding .slide3 {\n background-position: 100% -440px;\n }\n\n .box-padding .slide4 {\n background-position: 0 -360px;\n background-color: rgba(69, 46, 41, 0.2);\n }\n\n .box-padding .slide5 {\n background: none;\n text-align: center;\n }\n\n .box-padding .slide6 {\n background-position: 100% -160px;\n background-color: rgba(69, 46, 41, 0.2);\n }\n\n .box-padding .slide7 {\n background-position: 0 100%;\n }\n\n .box-padding .slide8 {\n background-position: 50% -320px;\n background-color: rgba(69, 46, 41, 0.2);\n }\n\n .box-padding .slide9 {\n background-position: 0 0px;\n }\n\n .box-padding input {\n background-color: transparent;\n width: 35px;\n margin: 0px;\n padding: 0px;\n clear: both;\n float: initial;\n border: 1px solid #fff;\n border-width: 0 0 1px 0;\n text-align: right;\n font-size: 14px;\n }\n\n .slide5 input:nth-child(1),\n .slide5 input:nth-child(4) {\n display: block;\n margin: auto;\n }\n\n .slide5 input:nth-child(2) {\n float: left;\n }\n\n .slide5 input:nth-child(3) {\n float: right;\n margin-top: -25px;\n }\n\n .slide5 input:nth-child(4) {\n margin-top: -5px;\n }\n`\n"]}
@@ -1,26 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
- import '@operato/input/ox-input-angle.js';
5
- import '@operato/input/ox-buttons-radio.js';
6
- import '@material/web/icon/icon.js';
7
- import '@operato/i18n/ox-i18n.js';
8
- import '@operato/help/ox-title-with-help.js';
9
- import { BOUNDS, Component, Properties } from '@hatiolab/things-scene';
10
- import { AbstractProperty } from '../abstract-property.js';
11
- export declare class PropertyShapes extends AbstractProperty {
12
- static styles: import("lit").CSSResult[];
13
- value?: Properties;
14
- bounds: BOUNDS | null;
15
- selected: Component[];
16
- private _3dExpanded;
17
- firstUpdated(): void;
18
- render(): import("lit-html").TemplateResult<1>;
19
- _onValueChange(e: Event): void;
20
- _hasTextProperty(selected: Component[]): boolean;
21
- _hasProperties(selected: Component[]): boolean;
22
- _isIdentifiable(selected: Component[]): boolean;
23
- _isClassIdentifiable(selected: Component[]): boolean;
24
- _isLine(selected: Component[]): boolean;
25
- _is3dish(selected: Component[]): boolean;
26
- }
@@ -1,430 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
- import { __decorate } from "tslib";
5
- import '@operato/input/ox-input-angle.js';
6
- import '@operato/input/ox-buttons-radio.js';
7
- import '@material/web/icon/icon.js';
8
- import '@operato/i18n/ox-i18n.js';
9
- import '@operato/help/ox-title-with-help.js';
10
- import { css, html } from 'lit';
11
- import { property, state } from 'lit/decorators.js';
12
- import { keyed } from 'lit/directives/keyed.js';
13
- import { AbstractProperty } from '../abstract-property.js';
14
- import { PropertySharedStyle } from '../property-shared-style.js';
15
- import { BoxPaddingEditorStyles } from './box-padding-editor-styles.js';
16
- export class PropertyShapes extends AbstractProperty {
17
- constructor() {
18
- super(...arguments);
19
- this.bounds = null;
20
- this.selected = [];
21
- this._3dExpanded = false;
22
- }
23
- firstUpdated() {
24
- this.renderRoot.addEventListener('change', this._onValueChange.bind(this));
25
- }
26
- render() {
27
- const value = this.value || {};
28
- const { width, height } = this.bounds || {};
29
- return html `
30
- <fieldset>
31
- <div class="property-grid">
32
- ${this._isIdentifiable(this.selected)
33
- ? html `
34
- <label> <ox-i18n msgid="label.id">ID</ox-i18n> </label>
35
- <input value-key="id" .value=${value.id || ''} />
36
- `
37
- : html ``}
38
- ${this._isClassIdentifiable(this.selected)
39
- ? html `
40
- <label> <ox-i18n msgid="label.class">Class</ox-i18n> </label>
41
- <input value-key="class" .value=${value.class || ''} />
42
- `
43
- : html ``}
44
- ${this._hasTextProperty(this.selected)
45
- ? html `
46
- <label> <ox-i18n msgid="label.text">Text</ox-i18n> </label>
47
- <input value-key="text" .value=${value.text || ''} />
48
- <label> <ox-i18n msgid="label.text-format">Text Format</ox-i18n> </label>
49
- <input value-key="textFormat" .value=${value.textFormat || ''} list="format-list" />
50
- <datalist id="format-list">
51
- <option value="#,###."></option>
52
- <option value="#,###.#"></option>
53
- <option value="#,###.0"></option>
54
- <option value="#,##0.#"></option>
55
- <option value="#,##0.0"></option>
56
- <option value="#,##0.0%"></option>
57
- </datalist>
58
- `
59
- : html ``}
60
- ${this._hasProperties(this.selected)
61
- ? html `
62
- <div class="checkbox-row">
63
- <input id="checkbox-hidden" value-key="hidden" type="checkbox" .checked=${value.hidden} />
64
- <label for="checkbox-hidden"> <ox-i18n msgid="label.item-hidden">Item Hidden</ox-i18n> </label>
65
-
66
- <input id="checkbox-locked" value-key="locked" type="checkbox" .checked=${value.locked} />
67
- <label for="checkbox-locked"> <ox-i18n msgid="label.locked">Locked</ox-i18n> </label>
68
- </div>
69
- `
70
- : html ``}
71
- </div>
72
- </fieldset>
73
-
74
- ${!this._isLine(this.selected)
75
- ? keyed(this.selected, html `
76
- <fieldset class="icon-label unit ratio">
77
- <legend>
78
- <ox-title-with-help topic="board-modeller/shapes/size" msgid="label.size">size</ox-title-with-help>
79
- </legend>
80
-
81
- <div class="property-grid">
82
- <label class="width"> <ox-i18n msgid="label.width">width</ox-i18n> </label>
83
- <input type="number" value-key="bounds.width" .value=${String(width)} />
84
- <label class="height"> <ox-i18n msgid="label.height">height</ox-i18n> </label>
85
- <input type="number" value-key="bounds.height" .value=${String(height)} />
86
-
87
- ${this.selected.length && this.selected[0].isRootModel()
88
- ? html ``
89
- : html `
90
- <label class="rotate"> <ox-i18n msgid="label.rotate">rotate</ox-i18n> </label>
91
- <ox-input-angle value-key="rotation" .value=${value.rotation}> </ox-input-angle>
92
- `}
93
- </div>
94
- </fieldset>
95
- `)
96
- : html ``}
97
- ${this._is3dish(this.selected)
98
- ? html `
99
- <fieldset class="icon-label unit ratio" collapsable ?collapsed=${!this._3dExpanded}>
100
- <legend>
101
- <ox-title-with-help topic="board-modeller/shapes/3dish" msgid="label.3dish">3D</ox-title-with-help>
102
- <md-icon
103
- @click=${(e) => {
104
- this._3dExpanded = !this._3dExpanded;
105
- }}
106
- >${this._3dExpanded ? 'expand_less' : 'expand_more'}</md-icon
107
- >
108
- </legend>
109
-
110
- <div class="property-grid">
111
- <label class="zPos"> <ox-i18n msgid="label.z-pos">pos. Z</ox-i18n> </label>
112
- <input type="number" value-key="zPos" .value=${value.zPos} />
113
- <label class="depth"> <ox-i18n msgid="label.depth">depth</ox-i18n> </label>
114
- <input type="number" value-key="depth" .value=${value.depth} />
115
-
116
- <label class="rotationX"> <ox-i18n msgid="label.rotation-x">rot. X</ox-i18n> </label>
117
- <ox-input-angle value-key="rotationX" .value=${value.rotationX}> </ox-input-angle>
118
-
119
- <label class="rotationY"> <ox-i18n msgid="label.rotation-y">rot. Y</ox-i18n> </label>
120
- <ox-input-angle value-key="rotationY" .value=${value.rotationY}> </ox-input-angle>
121
-
122
- <label class="rotationZ"> <ox-i18n msgid="label.rotation-z">rot. Z</ox-i18n> </label>
123
- <ox-input-angle value-key="rotation" .value=${value.rotation}> </ox-input-angle>
124
- </div>
125
- </fieldset>
126
- `
127
- : html ``}
128
- ${this._hasTextProperty(this.selected)
129
- ? html `
130
- <fieldset>
131
- <legend>
132
- <ox-title-with-help topic="board-modeller/shapes/text-box" msgid="label.text-box"
133
- >text box</ox-title-with-help
134
- >
135
- </legend>
136
-
137
- <div class="property-grid">
138
- <label> <ox-i18n msgid="label.horizontal">horizontal</ox-i18n> </label>
139
- <ox-buttons-radio value-key="textAlign" .value=${value.textAlign}>
140
- <div data-value="left"></div>
141
- <div data-value="center"></div>
142
- <div data-value="right"></div>
143
- <div data-value="justify"></div>
144
- </ox-buttons-radio>
145
-
146
- <label> <ox-i18n msgid="label.vertical">vertical</ox-i18n> </label>
147
- <ox-buttons-radio value-key="textBaseline" .value=${value.textBaseline}>
148
- <div data-value="top"></div>
149
- <div data-value="middle"></div>
150
- <div data-value="bottom"></div>
151
- </ox-buttons-radio>
152
-
153
- <div class="checkbox-row">
154
- <input
155
- id="checkbox-support-markdown"
156
- type="checkbox"
157
- value-key="supportMarkdown"
158
- .checked=${value.supportMarkdown}
159
- />
160
- <label for="checkbox-support-markdown">
161
- <ox-i18n msgid="label.support-markdown">Support Markdown</ox-i18n>
162
- </label>
163
- </div>
164
-
165
- <div class="checkbox-row">
166
- <input id="checkbox-textwrap" type="checkbox" value-key="textWrap" .checked=${value.textWrap} />
167
- <label for="checkbox-textwrap"> <ox-i18n msgid="label.text-wrap">Text Wrap</ox-i18n> </label>
168
- </div>
169
-
170
- ${!value.textWrap
171
- ? html ` <label for="checkbox-textOverflow">
172
- <ox-i18n msgid="label.text-overflow">Text Overflow</ox-i18n>
173
- </label>
174
- <select value-key="textOverflow" .value=${value.textOverflow || ''}>
175
- <option value="" selected>none</option>
176
- <option value="ellipsis">ellipsis</option>
177
- <option value="clip">clip</option>
178
- </select>`
179
- : ''}
180
-
181
- <label> <ox-i18n msgid="label.padding">padding</ox-i18n> </label>
182
- <table class="box-padding">
183
- <tr>
184
- <td class="slide1"></td>
185
- <td class="slide2"></td>
186
- <td class="slide3"></td>
187
- </tr>
188
- <tr>
189
- <td class="slide4"></td>
190
- <td class="slide5">
191
- <input type="number" value-key="paddingTop" .value=${value.paddingTop || 0} />
192
- <input type="number" value-key="paddingLeft" .value=${value.paddingLeft || 0} />
193
- <input type="number" value-key="paddingRight" .value=${value.paddingRight || 0} />
194
- <input type="number" value-key="paddingBottom" .value=${value.paddingBottom || 0} />
195
- </td>
196
- <td class="slide6"></td>
197
- </tr>
198
- <tr>
199
- <td class="slide7"></td>
200
- <td class="slide8"></td>
201
- <td class="slide9"></td>
202
- </tr>
203
- </table>
204
- </div>
205
- </fieldset>
206
- `
207
- : html ``}
208
- ${this.selected.length && this.selected[0].isRootModel()
209
- ? html `
210
- <fieldset class="icon-label">
211
- <legend>
212
- <ox-title-with-help topic="board-modeller/shapes/viewer-option" msgid="label.viewer-option"
213
- >Viewer Option</ox-title-with-help
214
- >
215
- </legend>
216
-
217
- <div class="property-grid">
218
- <label><ox-i18n msgid="label.fit">Fit</ox-i18n></label>
219
- <select value-key="fitMode" .value=${value.fitMode || 'ratio'}>
220
- <option value="none">none</option>
221
- <option value="center">center</option>
222
- <option value="ratio" selected>ratio</option>
223
- <option value="both">both</option>
224
- <option value="width">width</option>
225
- <option value="height">height</option>
226
- </select>
227
- </div>
228
- </fieldset>
229
- <fieldset class="icon-label">
230
- <legend>
231
- <ox-title-with-help topic="board-modeller/shapes/print-option" msgid="label.label-print"
232
- >Print Option</ox-title-with-help
233
- >
234
- </legend>
235
-
236
- <div class="property-grid">
237
- <label class="rotate"><ox-i18n msgid="label.label-rotation">Label Rotation</ox-i18n></label>
238
- <select value-key="labelRotation" .value=${value.labelRotation || 'N'}>
239
- <option value="N" selected>0°</option>
240
- <option value="B">90°</option>
241
- <option value="I">180°</option>
242
- <option value="R">270°</option>
243
- </select>
244
- </div>
245
- </fieldset>
246
- `
247
- : html ``}
248
- `;
249
- }
250
- _onValueChange(e) {
251
- var element = e.target;
252
- var key = element.getAttribute('value-key');
253
- if (!key) {
254
- return;
255
- }
256
- var value = this._getValueFromEventTarget(element);
257
- if (key.indexOf('bounds.') == 0) {
258
- if (isNaN(value))
259
- return;
260
- this.dispatchEvent(new CustomEvent('bounds-change', {
261
- bubbles: true,
262
- composed: true,
263
- detail: {
264
- [key.substr(7)]: value
265
- }
266
- }));
267
- }
268
- else {
269
- this._onAfterValueChange(key, value);
270
- }
271
- }
272
- _hasTextProperty(selected) {
273
- for (let i = 0; i < selected.length; i++) {
274
- if (!selected[i].hasTextProperty)
275
- return false;
276
- }
277
- return true;
278
- }
279
- _hasProperties(selected) {
280
- if (!selected || selected.length == 0 || (selected[0] && selected[0].isLayer && selected[0].isLayer()))
281
- return false;
282
- return true;
283
- }
284
- _isIdentifiable(selected) {
285
- if (!selected || selected.length == 0 || selected.length > 1 || (selected[0].isLayer && selected[0].isLayer()))
286
- return false;
287
- return true;
288
- }
289
- _isClassIdentifiable(selected) {
290
- if (!selected || (selected[0] && selected[0].isLayer()))
291
- return false;
292
- return true;
293
- }
294
- _isLine(selected) {
295
- if (!selected || !(selected[0] && selected[0].isLine()))
296
- return false;
297
- return true;
298
- }
299
- _is3dish(selected) {
300
- if (!selected || !(selected[0] && selected[0].is3dish()))
301
- return false;
302
- return true;
303
- }
304
- }
305
- PropertyShapes.styles = [
306
- PropertySharedStyle,
307
- BoxPaddingEditorStyles,
308
- css `
309
- fieldset[collapsable] legend {
310
- box-sizing: border-box;
311
- width: 100%;
312
- }
313
-
314
- fieldset[collapsable] legend md-icon {
315
- float: right;
316
- font-size: medium;
317
- margin: 0;
318
- cursor: pointer;
319
- }
320
-
321
- fieldset[collapsable][collapsed] > :not(legend) {
322
- display: none;
323
- }
324
- `,
325
- css `
326
- .icon-label label {
327
- background: var(--url-icon-properties-label) 7px -900px no-repeat;
328
- }
329
-
330
- .icon-label label.width {
331
- background-position: 7px -96px;
332
- }
333
-
334
- .icon-label label.height {
335
- background-position: 7px 4px;
336
- }
337
-
338
- .icon-label label.rotate {
339
- background-position: 7px -198px;
340
- }
341
-
342
- .icon-label label.twidth {
343
- background-position: 7px -296px;
344
- }
345
-
346
- .icon-label label.theight {
347
- background-position: 7px -396px;
348
- }
349
-
350
- .icon-label label.zPos {
351
- background-position: 5px -1098px;
352
- }
353
-
354
- .icon-label label.depth {
355
- background-position: 5px -1198px;
356
- }
357
-
358
- .icon-label label.rotationX {
359
- background-position: 5px -1296px;
360
- }
361
-
362
- .icon-label label.rotationY {
363
- background-position: 5px -1396px;
364
- }
365
-
366
- .icon-label label.rotationZ {
367
- background-position: 5px -1496px;
368
- }
369
-
370
- ox-buttons-radio > * {
371
- width: 30px;
372
- height: 25px;
373
- min-width: initial;
374
- margin: 0 4px 0 0;
375
- padding: 0;
376
- border-radius: 0;
377
- display: inline-block;
378
- border-bottom: 2px solid #fff;
379
- }
380
-
381
- ox-buttons-radio div {
382
- background: var(--url-icon-properties) no-repeat;
383
- }
384
-
385
- ox-buttons-radio div[data-value='left'] {
386
- background-position: 50% 3px;
387
- }
388
-
389
- ox-buttons-radio div[data-value='center'] {
390
- background-position: 50% -47px;
391
- }
392
-
393
- ox-buttons-radio div[data-value='right'] {
394
- background-position: 50% -97px;
395
- }
396
-
397
- ox-buttons-radio div[data-value='justify'] {
398
- background-position: 50% -147px;
399
- }
400
-
401
- ox-buttons-radio div[data-value='top'] {
402
- background-position: 50% -197px;
403
- }
404
-
405
- ox-buttons-radio div[data-value='middle'] {
406
- background-position: 50% -193px;
407
- }
408
-
409
- ox-buttons-radio div[data-value='bottom'] {
410
- background-position: 50% -188px;
411
- }
412
-
413
- ox-buttons-radio div[active] {
414
- border-color: #f2471c;
415
- }
416
- `
417
- ];
418
- __decorate([
419
- property({ type: Object })
420
- ], PropertyShapes.prototype, "value", void 0);
421
- __decorate([
422
- property({ type: Object })
423
- ], PropertyShapes.prototype, "bounds", void 0);
424
- __decorate([
425
- property({ type: Array })
426
- ], PropertyShapes.prototype, "selected", void 0);
427
- __decorate([
428
- state()
429
- ], PropertyShapes.prototype, "_3dExpanded", void 0);
430
- //# sourceMappingURL=shapes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shapes.js","sourceRoot":"","sources":["../../../../../src/modeller/property-sidebar/shapes/shapes.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,kCAAkC,CAAA;AACzC,OAAO,oCAAoC,CAAA;AAC3C,OAAO,4BAA4B,CAAA;AACnC,OAAO,0BAA0B,CAAA;AACjC,OAAO,qCA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input/ox-input-angle.js'\nimport '@operato/input/ox-buttons-radio.js'\nimport '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/help/ox-title-with-help.js'\n\nimport { css, html } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { keyed } from 'lit/directives/keyed.js'\n\nimport { BOUNDS, Component, Properties } from '@hatiolab/things-scene'\n\nimport { AbstractProperty } from '../abstract-property.js'\nimport { PropertySharedStyle } from '../property-shared-style.js'\nimport { BoxPaddingEditorStyles } from './box-padding-editor-styles.js'\n\nexport class PropertyShapes extends AbstractProperty {\n static styles = [\n PropertySharedStyle,\n BoxPaddingEditorStyles,\n css`\n fieldset[collapsable] legend {\n box-sizing: border-box;\n width: 100%;\n }\n\n fieldset[collapsable] legend md-icon {\n float: right;\n font-size: medium;\n margin: 0;\n cursor: pointer;\n }\n\n fieldset[collapsable][collapsed] > :not(legend) {\n display: none;\n }\n `,\n css`\n .icon-label label {\n background: var(--url-icon-properties-label) 7px -900px no-repeat;\n }\n\n .icon-label label.width {\n background-position: 7px -96px;\n }\n\n .icon-label label.height {\n background-position: 7px 4px;\n }\n\n .icon-label label.rotate {\n background-position: 7px -198px;\n }\n\n .icon-label label.twidth {\n background-position: 7px -296px;\n }\n\n .icon-label label.theight {\n background-position: 7px -396px;\n }\n\n .icon-label label.zPos {\n background-position: 5px -1098px;\n }\n\n .icon-label label.depth {\n background-position: 5px -1198px;\n }\n\n .icon-label label.rotationX {\n background-position: 5px -1296px;\n }\n\n .icon-label label.rotationY {\n background-position: 5px -1396px;\n }\n\n .icon-label label.rotationZ {\n background-position: 5px -1496px;\n }\n\n ox-buttons-radio > * {\n width: 30px;\n height: 25px;\n min-width: initial;\n margin: 0 4px 0 0;\n padding: 0;\n border-radius: 0;\n display: inline-block;\n border-bottom: 2px solid #fff;\n }\n\n ox-buttons-radio div {\n background: var(--url-icon-properties) no-repeat;\n }\n\n ox-buttons-radio div[data-value='left'] {\n background-position: 50% 3px;\n }\n\n ox-buttons-radio div[data-value='center'] {\n background-position: 50% -47px;\n }\n\n ox-buttons-radio div[data-value='right'] {\n background-position: 50% -97px;\n }\n\n ox-buttons-radio div[data-value='justify'] {\n background-position: 50% -147px;\n }\n\n ox-buttons-radio div[data-value='top'] {\n background-position: 50% -197px;\n }\n\n ox-buttons-radio div[data-value='middle'] {\n background-position: 50% -193px;\n }\n\n ox-buttons-radio div[data-value='bottom'] {\n background-position: 50% -188px;\n }\n\n ox-buttons-radio div[active] {\n border-color: #f2471c;\n }\n `\n ]\n\n @property({ type: Object }) value?: Properties\n @property({ type: Object }) bounds: BOUNDS | null = null\n @property({ type: Array }) selected: Component[] = []\n\n @state() private _3dExpanded: boolean = false\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onValueChange.bind(this))\n }\n\n render() {\n const value = this.value || {}\n const { width, height } = this.bounds || {}\n\n return html`\n <fieldset>\n <div class=\"property-grid\">\n ${this._isIdentifiable(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.id\">ID</ox-i18n> </label>\n <input value-key=\"id\" .value=${value.id || ''} />\n `\n : html``}\n ${this._isClassIdentifiable(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.class\">Class</ox-i18n> </label>\n <input value-key=\"class\" .value=${value.class || ''} />\n `\n : html``}\n ${this._hasTextProperty(this.selected)\n ? html`\n <label> <ox-i18n msgid=\"label.text\">Text</ox-i18n> </label>\n <input value-key=\"text\" .value=${value.text || ''} />\n <label> <ox-i18n msgid=\"label.text-format\">Text Format</ox-i18n> </label>\n <input value-key=\"textFormat\" .value=${value.textFormat || ''} list=\"format-list\" />\n <datalist id=\"format-list\">\n <option value=\"#,###.\"></option>\n <option value=\"#,###.#\"></option>\n <option value=\"#,###.0\"></option>\n <option value=\"#,##0.#\"></option>\n <option value=\"#,##0.0\"></option>\n <option value=\"#,##0.0%\"></option>\n </datalist>\n `\n : html``}\n ${this._hasProperties(this.selected)\n ? html`\n <div class=\"checkbox-row\">\n <input id=\"checkbox-hidden\" value-key=\"hidden\" type=\"checkbox\" .checked=${value.hidden} />\n <label for=\"checkbox-hidden\"> <ox-i18n msgid=\"label.item-hidden\">Item Hidden</ox-i18n> </label>\n\n <input id=\"checkbox-locked\" value-key=\"locked\" type=\"checkbox\" .checked=${value.locked} />\n <label for=\"checkbox-locked\"> <ox-i18n msgid=\"label.locked\">Locked</ox-i18n> </label>\n </div>\n `\n : html``}\n </div>\n </fieldset>\n\n ${!this._isLine(this.selected)\n ? keyed(\n this.selected,\n html`\n <fieldset class=\"icon-label unit ratio\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/size\" msgid=\"label.size\">size</ox-title-with-help>\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"width\"> <ox-i18n msgid=\"label.width\">width</ox-i18n> </label>\n <input type=\"number\" value-key=\"bounds.width\" .value=${String(width)} />\n <label class=\"height\"> <ox-i18n msgid=\"label.height\">height</ox-i18n> </label>\n <input type=\"number\" value-key=\"bounds.height\" .value=${String(height)} />\n\n ${this.selected.length && this.selected[0].isRootModel()\n ? html``\n : html`\n <label class=\"rotate\"> <ox-i18n msgid=\"label.rotate\">rotate</ox-i18n> </label>\n <ox-input-angle value-key=\"rotation\" .value=${value.rotation}> </ox-input-angle>\n `}\n </div>\n </fieldset>\n `\n )\n : html``}\n ${this._is3dish(this.selected)\n ? html`\n <fieldset class=\"icon-label unit ratio\" collapsable ?collapsed=${!this._3dExpanded}>\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/3dish\" msgid=\"label.3dish\">3D</ox-title-with-help>\n <md-icon\n @click=${(e: Event) => {\n this._3dExpanded = !this._3dExpanded\n }}\n >${this._3dExpanded ? 'expand_less' : 'expand_more'}</md-icon\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"zPos\"> <ox-i18n msgid=\"label.z-pos\">pos. Z</ox-i18n> </label>\n <input type=\"number\" value-key=\"zPos\" .value=${value.zPos} />\n <label class=\"depth\"> <ox-i18n msgid=\"label.depth\">depth</ox-i18n> </label>\n <input type=\"number\" value-key=\"depth\" .value=${value.depth} />\n\n <label class=\"rotationX\"> <ox-i18n msgid=\"label.rotation-x\">rot. X</ox-i18n> </label>\n <ox-input-angle value-key=\"rotationX\" .value=${value.rotationX}> </ox-input-angle>\n\n <label class=\"rotationY\"> <ox-i18n msgid=\"label.rotation-y\">rot. Y</ox-i18n> </label>\n <ox-input-angle value-key=\"rotationY\" .value=${value.rotationY}> </ox-input-angle>\n\n <label class=\"rotationZ\"> <ox-i18n msgid=\"label.rotation-z\">rot. Z</ox-i18n> </label>\n <ox-input-angle value-key=\"rotation\" .value=${value.rotation}> </ox-input-angle>\n </div>\n </fieldset>\n `\n : html``}\n ${this._hasTextProperty(this.selected)\n ? html`\n <fieldset>\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/text-box\" msgid=\"label.text-box\"\n >text box</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label> <ox-i18n msgid=\"label.horizontal\">horizontal</ox-i18n> </label>\n <ox-buttons-radio value-key=\"textAlign\" .value=${value.textAlign}>\n <div data-value=\"left\"></div>\n <div data-value=\"center\"></div>\n <div data-value=\"right\"></div>\n <div data-value=\"justify\"></div>\n </ox-buttons-radio>\n\n <label> <ox-i18n msgid=\"label.vertical\">vertical</ox-i18n> </label>\n <ox-buttons-radio value-key=\"textBaseline\" .value=${value.textBaseline}>\n <div data-value=\"top\"></div>\n <div data-value=\"middle\"></div>\n <div data-value=\"bottom\"></div>\n </ox-buttons-radio>\n\n <div class=\"checkbox-row\">\n <input\n id=\"checkbox-support-markdown\"\n type=\"checkbox\"\n value-key=\"supportMarkdown\"\n .checked=${value.supportMarkdown}\n />\n <label for=\"checkbox-support-markdown\">\n <ox-i18n msgid=\"label.support-markdown\">Support Markdown</ox-i18n>\n </label>\n </div>\n\n <div class=\"checkbox-row\">\n <input id=\"checkbox-textwrap\" type=\"checkbox\" value-key=\"textWrap\" .checked=${value.textWrap} />\n <label for=\"checkbox-textwrap\"> <ox-i18n msgid=\"label.text-wrap\">Text Wrap</ox-i18n> </label>\n </div>\n\n ${!value.textWrap\n ? html` <label for=\"checkbox-textOverflow\">\n <ox-i18n msgid=\"label.text-overflow\">Text Overflow</ox-i18n>\n </label>\n <select value-key=\"textOverflow\" .value=${value.textOverflow || ''}>\n <option value=\"\" selected>none</option>\n <option value=\"ellipsis\">ellipsis</option>\n <option value=\"clip\">clip</option>\n </select>`\n : ''}\n\n <label> <ox-i18n msgid=\"label.padding\">padding</ox-i18n> </label>\n <table class=\"box-padding\">\n <tr>\n <td class=\"slide1\"></td>\n <td class=\"slide2\"></td>\n <td class=\"slide3\"></td>\n </tr>\n <tr>\n <td class=\"slide4\"></td>\n <td class=\"slide5\">\n <input type=\"number\" value-key=\"paddingTop\" .value=${value.paddingTop || 0} />\n <input type=\"number\" value-key=\"paddingLeft\" .value=${value.paddingLeft || 0} />\n <input type=\"number\" value-key=\"paddingRight\" .value=${value.paddingRight || 0} />\n <input type=\"number\" value-key=\"paddingBottom\" .value=${value.paddingBottom || 0} />\n </td>\n <td class=\"slide6\"></td>\n </tr>\n <tr>\n <td class=\"slide7\"></td>\n <td class=\"slide8\"></td>\n <td class=\"slide9\"></td>\n </tr>\n </table>\n </div>\n </fieldset>\n `\n : html``}\n ${this.selected.length && this.selected[0].isRootModel()\n ? html`\n <fieldset class=\"icon-label\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/viewer-option\" msgid=\"label.viewer-option\"\n >Viewer Option</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label><ox-i18n msgid=\"label.fit\">Fit</ox-i18n></label>\n <select value-key=\"fitMode\" .value=${value.fitMode || 'ratio'}>\n <option value=\"none\">none</option>\n <option value=\"center\">center</option>\n <option value=\"ratio\" selected>ratio</option>\n <option value=\"both\">both</option>\n <option value=\"width\">width</option>\n <option value=\"height\">height</option>\n </select>\n </div>\n </fieldset>\n <fieldset class=\"icon-label\">\n <legend>\n <ox-title-with-help topic=\"board-modeller/shapes/print-option\" msgid=\"label.label-print\"\n >Print Option</ox-title-with-help\n >\n </legend>\n\n <div class=\"property-grid\">\n <label class=\"rotate\"><ox-i18n msgid=\"label.label-rotation\">Label Rotation</ox-i18n></label>\n <select value-key=\"labelRotation\" .value=${value.labelRotation || 'N'}>\n <option value=\"N\" selected>0°</option>\n <option value=\"B\">90°</option>\n <option value=\"I\">180°</option>\n <option value=\"R\">270°</option>\n </select>\n </div>\n </fieldset>\n `\n : html``}\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 var value = this._getValueFromEventTarget(element)\n\n if (key.indexOf('bounds.') == 0) {\n if (isNaN(value)) return\n this.dispatchEvent(\n new CustomEvent('bounds-change', {\n bubbles: true,\n composed: true,\n detail: {\n [key.substr(7)]: value\n }\n })\n )\n } else {\n this._onAfterValueChange(key, value)\n }\n }\n\n _hasTextProperty(selected: Component[]) {\n for (let i = 0; i < selected.length; i++) {\n if (!selected[i].hasTextProperty) return false\n }\n\n return true\n }\n\n _hasProperties(selected: Component[]) {\n if (!selected || selected.length == 0 || (selected[0] && selected[0].isLayer && selected[0].isLayer())) return false\n\n return true\n }\n\n _isIdentifiable(selected: Component[]) {\n if (!selected || selected.length == 0 || selected.length > 1 || (selected[0].isLayer && selected[0].isLayer()))\n return false\n\n return true\n }\n\n _isClassIdentifiable(selected: Component[]) {\n if (!selected || (selected[0] && selected[0].isLayer())) return false\n\n return true\n }\n\n _isLine(selected: Component[]) {\n if (!selected || !(selected[0] && selected[0].isLine())) return false\n\n return true\n }\n\n _is3dish(selected: Component[]) {\n if (!selected || !(selected[0] && selected[0].is3dish())) return false\n\n return true\n }\n}\n"]}
@@ -1,16 +0,0 @@
1
- /**
2
- * @license Copyright © HatioLab Inc. All rights reserved.
3
- */
4
- import '@operato/app/property-editor.js';
5
- import { LitElement, PropertyValues } from 'lit';
6
- export declare class SpecificPropertiesBuilder extends LitElement {
7
- value: any;
8
- props: any[];
9
- propertyEditor: any;
10
- render(): import("lit-html").TemplateResult<1>;
11
- firstUpdated(): void;
12
- updated(changes: PropertyValues<this>): void;
13
- _onPropsChanged(props: any[]): void;
14
- _setValues(): void;
15
- _onValueChanged(e: Event): void;
16
- }