@operato/property-editor 1.11.16 → 1.11.18
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 +18 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-properties-dynamic-view.d.ts +14 -1
- package/dist/src/ox-properties-dynamic-view.js +3 -2
- package/dist/src/ox-properties-dynamic-view.js.map +1 -1
- package/dist/src/ox-property-editor-3axis.js +3 -1
- package/dist/src/ox-property-editor-3axis.js.map +1 -1
- package/dist/src/ox-property-editor-3dish.js +1 -0
- package/dist/src/ox-property-editor-3dish.js.map +1 -1
- package/dist/src/ox-property-editor-action.js +1 -0
- package/dist/src/ox-property-editor-action.js.map +1 -1
- package/dist/src/ox-property-editor-angle.js +8 -1
- package/dist/src/ox-property-editor-angle.js.map +1 -1
- package/dist/src/ox-property-editor-checkbox.js +1 -1
- package/dist/src/ox-property-editor-checkbox.js.map +1 -1
- package/dist/src/ox-property-editor-color.js +7 -1
- package/dist/src/ox-property-editor-color.js.map +1 -1
- package/dist/src/ox-property-editor-crontab.js +4 -1
- package/dist/src/ox-property-editor-crontab.js.map +1 -1
- package/dist/src/ox-property-editor-data.js +8 -1
- package/dist/src/ox-property-editor-data.js.map +1 -1
- package/dist/src/ox-property-editor-date.js +1 -1
- package/dist/src/ox-property-editor-date.js.map +1 -1
- package/dist/src/ox-property-editor-duration.js +4 -1
- package/dist/src/ox-property-editor-duration.js.map +1 -1
- package/dist/src/ox-property-editor-file.js +7 -1
- package/dist/src/ox-property-editor-file.js.map +1 -1
- package/dist/src/ox-property-editor-gradient-colorstops.js +1 -0
- package/dist/src/ox-property-editor-gradient-colorstops.js.map +1 -1
- package/dist/src/ox-property-editor-hashtags.js +7 -1
- package/dist/src/ox-property-editor-hashtags.js.map +1 -1
- package/dist/src/ox-property-editor-image.js +3 -1
- package/dist/src/ox-property-editor-image.js.map +1 -1
- package/dist/src/ox-property-editor-key-values.js +1 -0
- package/dist/src/ox-property-editor-key-values.js.map +1 -1
- package/dist/src/ox-property-editor-mass-fraction.js +1 -0
- package/dist/src/ox-property-editor-mass-fraction.js.map +1 -1
- package/dist/src/ox-property-editor-month.js +1 -1
- package/dist/src/ox-property-editor-month.js.map +1 -1
- package/dist/src/ox-property-editor-multiple-colors.js +3 -1
- package/dist/src/ox-property-editor-multiple-colors.js.map +1 -1
- package/dist/src/ox-property-editor-number.js +1 -0
- package/dist/src/ox-property-editor-number.js.map +1 -1
- package/dist/src/ox-property-editor-options.js +8 -1
- package/dist/src/ox-property-editor-options.js.map +1 -1
- package/dist/src/ox-property-editor-partition-keys.js +6 -1
- package/dist/src/ox-property-editor-partition-keys.js.map +1 -1
- package/dist/src/ox-property-editor-password.js +9 -1
- package/dist/src/ox-property-editor-password.js.map +1 -1
- package/dist/src/ox-property-editor-range.js +1 -0
- package/dist/src/ox-property-editor-range.js.map +1 -1
- package/dist/src/ox-property-editor-scene-component-id.js +6 -1
- package/dist/src/ox-property-editor-scene-component-id.js.map +1 -1
- package/dist/src/ox-property-editor-select.js +7 -1
- package/dist/src/ox-property-editor-select.js.map +1 -1
- package/dist/src/ox-property-editor-solid-colorstops.js +1 -0
- package/dist/src/ox-property-editor-solid-colorstops.js.map +1 -1
- package/dist/src/ox-property-editor-string.js +9 -1
- package/dist/src/ox-property-editor-string.js.map +1 -1
- package/dist/src/ox-property-editor-table.js +8 -1
- package/dist/src/ox-property-editor-table.js.map +1 -1
- package/dist/src/ox-property-editor-textarea.js +1 -0
- package/dist/src/ox-property-editor-textarea.js.map +1 -1
- package/dist/src/ox-property-editor-time.js +1 -1
- package/dist/src/ox-property-editor-time.js.map +1 -1
- package/dist/src/ox-property-editor-unit-number.js +1 -0
- package/dist/src/ox-property-editor-unit-number.js.map +1 -1
- package/dist/src/ox-property-editor-value-map.js +1 -0
- package/dist/src/ox-property-editor-value-map.js.map +1 -1
- package/dist/src/ox-property-editor-value-ranges.js +1 -0
- package/dist/src/ox-property-editor-value-ranges.js.map +1 -1
- package/dist/src/ox-property-editor-work-shift.js +8 -1
- package/dist/src/ox-property-editor-work-shift.js.map +1 -1
- package/dist/src/ox-property-editor.d.ts +4 -1
- package/dist/src/ox-property-editor.js +13 -4
- package/dist/src/ox-property-editor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/src/index.ts +1 -0
- package/src/ox-properties-dynamic-view.ts +3 -3
- package/src/ox-property-editor-3axis.ts +3 -1
- package/src/ox-property-editor-3dish.ts +1 -0
- package/src/ox-property-editor-action.ts +1 -0
- package/src/ox-property-editor-angle.ts +8 -1
- package/src/ox-property-editor-checkbox.ts +1 -1
- package/src/ox-property-editor-color.ts +7 -1
- package/src/ox-property-editor-crontab.ts +4 -1
- package/src/ox-property-editor-data.ts +8 -1
- package/src/ox-property-editor-date.ts +1 -1
- package/src/ox-property-editor-duration.ts +4 -1
- package/src/ox-property-editor-file.ts +7 -1
- package/src/ox-property-editor-gradient-colorstops.ts +1 -0
- package/src/ox-property-editor-hashtags.ts +7 -1
- package/src/ox-property-editor-image.ts +3 -1
- package/src/ox-property-editor-key-values.ts +1 -0
- package/src/ox-property-editor-mass-fraction.ts +1 -0
- package/src/ox-property-editor-month.ts +1 -1
- package/src/ox-property-editor-multiple-colors.ts +3 -1
- package/src/ox-property-editor-number.ts +1 -0
- package/src/ox-property-editor-options.ts +8 -1
- package/src/ox-property-editor-partition-keys.ts +6 -1
- package/src/ox-property-editor-password.ts +9 -1
- package/src/ox-property-editor-range.ts +1 -0
- package/src/ox-property-editor-scene-component-id.ts +6 -1
- package/src/ox-property-editor-select.ts +7 -1
- package/src/ox-property-editor-solid-colorstops.ts +1 -0
- package/src/ox-property-editor-string.ts +9 -1
- package/src/ox-property-editor-table.ts +8 -1
- package/src/ox-property-editor-textarea.ts +1 -0
- package/src/ox-property-editor-time.ts +1 -1
- package/src/ox-property-editor-unit-number.ts +1 -0
- package/src/ox-property-editor-value-map.ts +1 -0
- package/src/ox-property-editor-value-ranges.ts +1 -0
- package/src/ox-property-editor-work-shift.ts +8 -1
- package/src/ox-property-editor.ts +13 -3
|
@@ -7,6 +7,14 @@ import { PropertySpec } from './types.js'
|
|
|
7
7
|
@customElement('ox-property-editor-string')
|
|
8
8
|
export class OxPropertyEditorString extends OxPropertyEditor {
|
|
9
9
|
editorTemplate(value: any, spec: PropertySpec): TemplateResult {
|
|
10
|
-
return html`
|
|
10
|
+
return html`
|
|
11
|
+
<input
|
|
12
|
+
type="text"
|
|
13
|
+
id="editor"
|
|
14
|
+
.value=${value || ''}
|
|
15
|
+
placeholder=${spec.placeholder || ''}
|
|
16
|
+
?disabled=${this.disabled}
|
|
17
|
+
/>
|
|
18
|
+
`
|
|
11
19
|
}
|
|
12
20
|
}
|
|
@@ -11,6 +11,13 @@ export class OxPropertyEditorString extends OxPropertyEditor {
|
|
|
11
11
|
editorTemplate(value: any, spec: PropertySpec): TemplateResult {
|
|
12
12
|
const { fullwidth = true } = spec.editor || {}
|
|
13
13
|
|
|
14
|
-
return html`
|
|
14
|
+
return html`
|
|
15
|
+
<ox-input-table
|
|
16
|
+
id="editor"
|
|
17
|
+
.property=${spec.property}
|
|
18
|
+
?fullwidth=${fullwidth}
|
|
19
|
+
?disabled=${this.disabled}
|
|
20
|
+
></ox-input-table>
|
|
21
|
+
`
|
|
15
22
|
}
|
|
16
23
|
}
|
|
@@ -19,6 +19,7 @@ export class OxPropertyEditorTextArea extends OxPropertyEditor {
|
|
|
19
19
|
tab-as-space=${spec.property?.tabAsSpace || 'false'}
|
|
20
20
|
?fullwidth=${fullwidth}
|
|
21
21
|
language=${spec.property?.language || 'javascript'}
|
|
22
|
+
?disabled=${this.disabled}
|
|
22
23
|
>
|
|
23
24
|
</ox-input-code>
|
|
24
25
|
`
|
|
@@ -7,6 +7,6 @@ import { PropertySpec } from './types.js'
|
|
|
7
7
|
@customElement('ox-property-editor-time')
|
|
8
8
|
export class OxPropertyEditorTime extends OxPropertyEditor {
|
|
9
9
|
editorTemplate(value: any, spec: PropertySpec): TemplateResult {
|
|
10
|
-
return html` <input type="time" id="editor" .value=${value} /> `
|
|
10
|
+
return html` <input type="time" id="editor" .value=${value} ?disabled=${this.disabled} /> `
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -12,6 +12,13 @@ export class OxPropertyEditorWorkShift extends OxPropertyEditor {
|
|
|
12
12
|
const { editor } = spec
|
|
13
13
|
const { fullwidth = true } = editor || {}
|
|
14
14
|
|
|
15
|
-
return html`
|
|
15
|
+
return html`
|
|
16
|
+
<ox-input-work-shift
|
|
17
|
+
id="editor"
|
|
18
|
+
.value=${value}
|
|
19
|
+
?fullwidth=${fullwidth}
|
|
20
|
+
?disabled=${this.disabled}
|
|
21
|
+
></ox-input-work-shift>
|
|
22
|
+
`
|
|
16
23
|
}
|
|
17
24
|
}
|
|
@@ -124,9 +124,12 @@ export class OxPropertyEditor extends LitElement {
|
|
|
124
124
|
@property({ type: Object }) editor?: EditorProperty
|
|
125
125
|
@property({ type: Object }) host: any
|
|
126
126
|
@property({ type: Array }) quantifier?: [min: number, max: number] = [1, 1]
|
|
127
|
-
@property({ type: Object })
|
|
127
|
+
@property({ type: Object }) observeHandler?: (value: any) => void
|
|
128
128
|
@property({ type: Object }) defaultValue?: any
|
|
129
129
|
@property({ type: Object }) context?: any
|
|
130
|
+
@property({ type: Boolean }) disabled?: boolean
|
|
131
|
+
|
|
132
|
+
private observing: boolean = false
|
|
130
133
|
|
|
131
134
|
connectedCallback() {
|
|
132
135
|
super.connectedCallback()
|
|
@@ -213,7 +216,14 @@ export class OxPropertyEditor extends LitElement {
|
|
|
213
216
|
|
|
214
217
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))
|
|
215
218
|
|
|
216
|
-
|
|
217
|
-
|
|
219
|
+
this.observe(this.value)
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
observe(value: any) {
|
|
223
|
+
if (this.observeHandler && !this.observing) {
|
|
224
|
+
this.observing = true
|
|
225
|
+
this.observeHandler.call(this, value)
|
|
226
|
+
this.observing = false
|
|
227
|
+
}
|
|
218
228
|
}
|
|
219
229
|
}
|