@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.
Files changed (117) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/src/index.d.ts +1 -0
  3. package/dist/src/index.js +1 -0
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/ox-properties-dynamic-view.d.ts +14 -1
  6. package/dist/src/ox-properties-dynamic-view.js +3 -2
  7. package/dist/src/ox-properties-dynamic-view.js.map +1 -1
  8. package/dist/src/ox-property-editor-3axis.js +3 -1
  9. package/dist/src/ox-property-editor-3axis.js.map +1 -1
  10. package/dist/src/ox-property-editor-3dish.js +1 -0
  11. package/dist/src/ox-property-editor-3dish.js.map +1 -1
  12. package/dist/src/ox-property-editor-action.js +1 -0
  13. package/dist/src/ox-property-editor-action.js.map +1 -1
  14. package/dist/src/ox-property-editor-angle.js +8 -1
  15. package/dist/src/ox-property-editor-angle.js.map +1 -1
  16. package/dist/src/ox-property-editor-checkbox.js +1 -1
  17. package/dist/src/ox-property-editor-checkbox.js.map +1 -1
  18. package/dist/src/ox-property-editor-color.js +7 -1
  19. package/dist/src/ox-property-editor-color.js.map +1 -1
  20. package/dist/src/ox-property-editor-crontab.js +4 -1
  21. package/dist/src/ox-property-editor-crontab.js.map +1 -1
  22. package/dist/src/ox-property-editor-data.js +8 -1
  23. package/dist/src/ox-property-editor-data.js.map +1 -1
  24. package/dist/src/ox-property-editor-date.js +1 -1
  25. package/dist/src/ox-property-editor-date.js.map +1 -1
  26. package/dist/src/ox-property-editor-duration.js +4 -1
  27. package/dist/src/ox-property-editor-duration.js.map +1 -1
  28. package/dist/src/ox-property-editor-file.js +7 -1
  29. package/dist/src/ox-property-editor-file.js.map +1 -1
  30. package/dist/src/ox-property-editor-gradient-colorstops.js +1 -0
  31. package/dist/src/ox-property-editor-gradient-colorstops.js.map +1 -1
  32. package/dist/src/ox-property-editor-hashtags.js +7 -1
  33. package/dist/src/ox-property-editor-hashtags.js.map +1 -1
  34. package/dist/src/ox-property-editor-image.js +3 -1
  35. package/dist/src/ox-property-editor-image.js.map +1 -1
  36. package/dist/src/ox-property-editor-key-values.js +1 -0
  37. package/dist/src/ox-property-editor-key-values.js.map +1 -1
  38. package/dist/src/ox-property-editor-mass-fraction.js +1 -0
  39. package/dist/src/ox-property-editor-mass-fraction.js.map +1 -1
  40. package/dist/src/ox-property-editor-month.js +1 -1
  41. package/dist/src/ox-property-editor-month.js.map +1 -1
  42. package/dist/src/ox-property-editor-multiple-colors.js +3 -1
  43. package/dist/src/ox-property-editor-multiple-colors.js.map +1 -1
  44. package/dist/src/ox-property-editor-number.js +1 -0
  45. package/dist/src/ox-property-editor-number.js.map +1 -1
  46. package/dist/src/ox-property-editor-options.js +8 -1
  47. package/dist/src/ox-property-editor-options.js.map +1 -1
  48. package/dist/src/ox-property-editor-partition-keys.js +6 -1
  49. package/dist/src/ox-property-editor-partition-keys.js.map +1 -1
  50. package/dist/src/ox-property-editor-password.js +9 -1
  51. package/dist/src/ox-property-editor-password.js.map +1 -1
  52. package/dist/src/ox-property-editor-range.js +1 -0
  53. package/dist/src/ox-property-editor-range.js.map +1 -1
  54. package/dist/src/ox-property-editor-scene-component-id.js +6 -1
  55. package/dist/src/ox-property-editor-scene-component-id.js.map +1 -1
  56. package/dist/src/ox-property-editor-select.js +7 -1
  57. package/dist/src/ox-property-editor-select.js.map +1 -1
  58. package/dist/src/ox-property-editor-solid-colorstops.js +1 -0
  59. package/dist/src/ox-property-editor-solid-colorstops.js.map +1 -1
  60. package/dist/src/ox-property-editor-string.js +9 -1
  61. package/dist/src/ox-property-editor-string.js.map +1 -1
  62. package/dist/src/ox-property-editor-table.js +8 -1
  63. package/dist/src/ox-property-editor-table.js.map +1 -1
  64. package/dist/src/ox-property-editor-textarea.js +1 -0
  65. package/dist/src/ox-property-editor-textarea.js.map +1 -1
  66. package/dist/src/ox-property-editor-time.js +1 -1
  67. package/dist/src/ox-property-editor-time.js.map +1 -1
  68. package/dist/src/ox-property-editor-unit-number.js +1 -0
  69. package/dist/src/ox-property-editor-unit-number.js.map +1 -1
  70. package/dist/src/ox-property-editor-value-map.js +1 -0
  71. package/dist/src/ox-property-editor-value-map.js.map +1 -1
  72. package/dist/src/ox-property-editor-value-ranges.js +1 -0
  73. package/dist/src/ox-property-editor-value-ranges.js.map +1 -1
  74. package/dist/src/ox-property-editor-work-shift.js +8 -1
  75. package/dist/src/ox-property-editor-work-shift.js.map +1 -1
  76. package/dist/src/ox-property-editor.d.ts +4 -1
  77. package/dist/src/ox-property-editor.js +13 -4
  78. package/dist/src/ox-property-editor.js.map +1 -1
  79. package/dist/tsconfig.tsbuildinfo +1 -1
  80. package/package.json +4 -4
  81. package/src/index.ts +1 -0
  82. package/src/ox-properties-dynamic-view.ts +3 -3
  83. package/src/ox-property-editor-3axis.ts +3 -1
  84. package/src/ox-property-editor-3dish.ts +1 -0
  85. package/src/ox-property-editor-action.ts +1 -0
  86. package/src/ox-property-editor-angle.ts +8 -1
  87. package/src/ox-property-editor-checkbox.ts +1 -1
  88. package/src/ox-property-editor-color.ts +7 -1
  89. package/src/ox-property-editor-crontab.ts +4 -1
  90. package/src/ox-property-editor-data.ts +8 -1
  91. package/src/ox-property-editor-date.ts +1 -1
  92. package/src/ox-property-editor-duration.ts +4 -1
  93. package/src/ox-property-editor-file.ts +7 -1
  94. package/src/ox-property-editor-gradient-colorstops.ts +1 -0
  95. package/src/ox-property-editor-hashtags.ts +7 -1
  96. package/src/ox-property-editor-image.ts +3 -1
  97. package/src/ox-property-editor-key-values.ts +1 -0
  98. package/src/ox-property-editor-mass-fraction.ts +1 -0
  99. package/src/ox-property-editor-month.ts +1 -1
  100. package/src/ox-property-editor-multiple-colors.ts +3 -1
  101. package/src/ox-property-editor-number.ts +1 -0
  102. package/src/ox-property-editor-options.ts +8 -1
  103. package/src/ox-property-editor-partition-keys.ts +6 -1
  104. package/src/ox-property-editor-password.ts +9 -1
  105. package/src/ox-property-editor-range.ts +1 -0
  106. package/src/ox-property-editor-scene-component-id.ts +6 -1
  107. package/src/ox-property-editor-select.ts +7 -1
  108. package/src/ox-property-editor-solid-colorstops.ts +1 -0
  109. package/src/ox-property-editor-string.ts +9 -1
  110. package/src/ox-property-editor-table.ts +8 -1
  111. package/src/ox-property-editor-textarea.ts +1 -0
  112. package/src/ox-property-editor-time.ts +1 -1
  113. package/src/ox-property-editor-unit-number.ts +1 -0
  114. package/src/ox-property-editor-value-map.ts +1 -0
  115. package/src/ox-property-editor-value-ranges.ts +1 -0
  116. package/src/ox-property-editor-work-shift.ts +8 -1
  117. package/src/ox-property-editor.ts +13 -3
@@ -19,6 +19,7 @@ export class OxPropertyEditorSolidColorStops extends OxPropertyEditor {
19
19
  .min=${spec.property && spec.property.min}
20
20
  .max=${spec.property && spec.property.max}
21
21
  ?fullwidth=${fullwidth}
22
+ ?disabled=${this.disabled}
22
23
  >
23
24
  </ox-input-color-stops>
24
25
  `
@@ -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` <input type="text" id="editor" .value=${value || ''} placeholder=${spec.placeholder || ''} /> `
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` <ox-input-table id="editor" .property=${spec.property} ?fullwidth=${fullwidth}></ox-input-table> `
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
  }
@@ -26,6 +26,7 @@ export class OxPropertyEditorNumberUnit extends OxPropertyEditor {
26
26
  .step=${step}
27
27
  .min=${min}
28
28
  .max=${max}
29
+ ?disabled=${this.disabled}
29
30
  ></ox-input-unit-number>
30
31
  `
31
32
  }
@@ -20,6 +20,7 @@ export class OxPropertyEditorValueMap extends OxPropertyEditor {
20
20
  .valuetype=${valuetype}
21
21
  .value=${value}
22
22
  ?fullwidth=${fullwidth}
23
+ ?disabled=${this.disabled}
23
24
  ></ox-input-value-map>
24
25
  `
25
26
  }
@@ -20,6 +20,7 @@ export class OxPropertyEditorValueRanges extends OxPropertyEditor {
20
20
  .valuetype=${valuetype}
21
21
  .value=${value}
22
22
  ?fullwidth=${fullwidth}
23
+ ?disabled=${this.disabled}
23
24
  ></ox-input-value-ranges>
24
25
  `
25
26
  }
@@ -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` <ox-input-work-shift id="editor" .value=${value} ?fullwidth=${fullwidth}></ox-input-work-shift> `
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 }) observe?: (value: any) => void
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
- if (!this.observe) return
217
- this.observe.call(this, this.value)
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
  }