@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
@@ -7,7 +7,12 @@ let OxPropertyEditorPartitionKeys = class OxPropertyEditorPartitionKeys extends
7
7
  editorTemplate(value, spec) {
8
8
  const { fullwidth = true } = spec.editor || {};
9
9
  return html `
10
- <ox-input-partition-keys id="editor" .value=${value} ?fullwidth=${fullwidth}></ox-input-partition-keys>
10
+ <ox-input-partition-keys
11
+ id="editor"
12
+ .value=${value}
13
+ ?fullwidth=${fullwidth}
14
+ ?disabled=${this.disabled}
15
+ ></ox-input-partition-keys>
11
16
  `;
12
17
  }
13
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-partition-keys.js","sourceRoot":"","sources":["../../src/ox-property-editor-partition-keys.ts"],"names":[],"mappings":";AAAA,OAAO,2CAA2C,CAAA;AAElD,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,gBAAgB;IACjE,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;oDACqC,KAAK,eAAe,SAAS;KAC5E,CAAA;IACH,CAAC;CACF,CAAA;AARY,6BAA6B;IADzC,aAAa,CAAC,mCAAmC,CAAC;GACtC,6BAA6B,CAQzC","sourcesContent":["import '@operato/input/ox-input-partition-keys.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-partition-keys')\nexport class OxPropertyEditorPartitionKeys extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-partition-keys id=\"editor\" .value=${value} ?fullwidth=${fullwidth}></ox-input-partition-keys>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-partition-keys.js","sourceRoot":"","sources":["../../src/ox-property-editor-partition-keys.ts"],"names":[],"mappings":";AAAA,OAAO,2CAA2C,CAAA;AAElD,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,gBAAgB;IACjE,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;iBAGE,KAAK;qBACD,SAAS;oBACV,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAbY,6BAA6B;IADzC,aAAa,CAAC,mCAAmC,CAAC;GACtC,6BAA6B,CAazC","sourcesContent":["import '@operato/input/ox-input-partition-keys.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-partition-keys')\nexport class OxPropertyEditorPartitionKeys extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-partition-keys\n id=\"editor\"\n .value=${value}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n ></ox-input-partition-keys>\n `\n }\n}\n"]}
@@ -4,7 +4,15 @@ import { customElement } from 'lit/decorators.js';
4
4
  import { OxPropertyEditor } from './ox-property-editor.js';
5
5
  let OxPropertyEditorPassword = class OxPropertyEditorPassword extends OxPropertyEditor {
6
6
  editorTemplate(value, spec) {
7
- return html ` <input type="password" id="editor" .value=${value} placeholder=${spec.placeholder || ''} /> `;
7
+ return html `
8
+ <input
9
+ type="password"
10
+ id="editor"
11
+ .value=${value}
12
+ placeholder=${spec.placeholder || ''}
13
+ ?disabled=${this.disabled}
14
+ />
15
+ `;
8
16
  }
9
17
  };
10
18
  OxPropertyEditorPassword = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-password.js","sourceRoot":"","sources":["../../src/ox-property-editor-password.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,gBAAgB;IAC5D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA,8CAA8C,KAAK,gBAAgB,IAAI,CAAC,WAAW,IAAI,EAAE,MAAM,CAAA;IAC5G,CAAC;CACF,CAAA;AAJY,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAIpC","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-password')\nexport class OxPropertyEditorPassword extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html` <input type=\"password\" id=\"editor\" .value=${value} placeholder=${spec.placeholder || ''} /> `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-password.js","sourceRoot":"","sources":["../../src/ox-property-editor-password.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,gBAAgB;IAC5D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA;;;;iBAIE,KAAK;sBACA,IAAI,CAAC,WAAW,IAAI,EAAE;oBACxB,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAZY,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAYpC","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-password')\nexport class OxPropertyEditorPassword extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html`\n <input\n type=\"password\"\n id=\"editor\"\n .value=${value}\n placeholder=${spec.placeholder || ''}\n ?disabled=${this.disabled}\n />\n `\n }\n}\n"]}
@@ -15,6 +15,7 @@ let OxPropertyEditorRange = class OxPropertyEditorRange extends OxPropertyEditor
15
15
  .min=${min}
16
16
  .max=${max}
17
17
  ?fullwidth=${fullwidth}
18
+ ?disabled=${this.disabled}
18
19
  ></ox-input-range>
19
20
  `;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-range.js","sourceRoot":"","sources":["../../src/ox-property-editor-range.ts"],"names":[],"mappings":";AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,gBAAgB;IACzD,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAC9C,MAAM,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE/C,OAAO,IAAI,CAAA;;;iBAGE,KAAK;gBACN,IAAI;eACL,GAAG;eACH,GAAG;qBACG,SAAS;;KAEzB,CAAA;IACH,CAAC;CACF,CAAA;AAhBY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAgBjC","sourcesContent":["import '@operato/input/ox-input-range.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-range')\nexport class OxPropertyEditorRange extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { step, min, max } = spec.property || {}\n const { fullwidth = false } = spec.editor || {}\n\n return html`\n <ox-input-range\n id=\"editor\"\n .value=${value}\n .step=${step}\n .min=${min}\n .max=${max}\n ?fullwidth=${fullwidth}\n ></ox-input-range>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-range.js","sourceRoot":"","sources":["../../src/ox-property-editor-range.ts"],"names":[],"mappings":";AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,gBAAgB;IACzD,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAC9C,MAAM,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE/C,OAAO,IAAI,CAAA;;;iBAGE,KAAK;gBACN,IAAI;eACL,GAAG;eACH,GAAG;qBACG,SAAS;oBACV,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAjBY,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAiBjC","sourcesContent":["import '@operato/input/ox-input-range.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-range')\nexport class OxPropertyEditorRange extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { step, min, max } = spec.property || {}\n const { fullwidth = false } = spec.editor || {}\n\n return html`\n <ox-input-range\n id=\"editor\"\n .value=${value}\n .step=${step}\n .min=${min}\n .max=${max}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n ></ox-input-range>\n `\n }\n}\n"]}
@@ -6,7 +6,12 @@ import { OxPropertyEditor } from './ox-property-editor.js';
6
6
  let OxPropertyEditorSceneComponentId = class OxPropertyEditorSceneComponentId extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  return html `
9
- <ox-input-scene-component-id id="editor" .value=${value} .property=${spec.property}></ox-input-scene-component-id>
9
+ <ox-input-scene-component-id
10
+ id="editor"
11
+ .value=${value}
12
+ .property=${spec.property}
13
+ ?disabled=${this.disabled}
14
+ ></ox-input-scene-component-id>
10
15
  `;
11
16
  }
12
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-scene-component-id.js","sourceRoot":"","sources":["../../src/ox-property-editor-scene-component-id.ts"],"names":[],"mappings":";AAAA,OAAO,+CAA+C,CAAA;AAEtD,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,gBAAgB;IACpE,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA;wDACyC,KAAK,cAAc,IAAI,CAAC,QAAQ;KACnF,CAAA;IACH,CAAC;CACF,CAAA;AANY,gCAAgC;IAD5C,aAAa,CAAC,uCAAuC,CAAC;GAC1C,gCAAgC,CAM5C","sourcesContent":["import '@operato/input/ox-input-scene-component-id.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-scene-component-id')\nexport class OxPropertyEditorSceneComponentId extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html`\n <ox-input-scene-component-id id=\"editor\" .value=${value} .property=${spec.property}></ox-input-scene-component-id>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-scene-component-id.js","sourceRoot":"","sources":["../../src/ox-property-editor-scene-component-id.ts"],"names":[],"mappings":";AAAA,OAAO,+CAA+C,CAAA;AAEtD,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,gCAAgC,GAAtC,MAAM,gCAAiC,SAAQ,gBAAgB;IACpE,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA;;;iBAGE,KAAK;oBACF,IAAI,CAAC,QAAQ;oBACb,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAXY,gCAAgC;IAD5C,aAAa,CAAC,uCAAuC,CAAC;GAC1C,gCAAgC,CAW5C","sourcesContent":["import '@operato/input/ox-input-scene-component-id.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-scene-component-id')\nexport class OxPropertyEditorSceneComponentId extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html`\n <ox-input-scene-component-id\n id=\"editor\"\n .value=${value}\n .property=${spec.property}\n ?disabled=${this.disabled}\n ></ox-input-scene-component-id>\n `\n }\n}\n"]}
@@ -26,7 +26,13 @@ let OxPropertyEditorSelect = class OxPropertyEditorSelect extends OxPropertyEdit
26
26
  }
27
27
  const { fullwidth = false } = spec.editor || {};
28
28
  return html `
29
- <ox-select id="editor" .value=${value} placeholder=${spec.placeholder || ''} ?fullwidth=${fullwidth}>
29
+ <ox-select
30
+ id="editor"
31
+ .value=${value}
32
+ placeholder=${spec.placeholder || ''}
33
+ ?fullwidth=${fullwidth}
34
+ ?disabled=${this.disabled}
35
+ >
30
36
  <ox-popup-list with-search>
31
37
  ${options.map(item => html `
32
38
  <div option value=${this._getOptionValue(item)} ?selected=${this._isSelected(value, item)}>
@@ -1 +1 @@
1
-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,IAAI,CAAA;kCACU,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC;kBACrF,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,CAAA,QAAQ;;aAEjD,CACF;;;KAGN,CAAA;IACH,CAAC;IAED,eAAe,CAAC,IAAY;QAC1B,IAAI,OAAO,IAAI,IAAI,QAAQ;YAAE,OAAO,IAAI,CAAA;QAExC,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED,iBAAiB,CAAC,IAAY;QAC5B,IAAI,OAAO,IAAI,IAAI,QAAQ;YAAE,OAAO,IAAI,CAAA;QAExC,OAAO,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAA;IAClC,CAAC;IAED,WAAW,CAAC,KAAU,EAAE,IAAY;QAClC,OAAO,KAAK,KAAK,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;IAC7C,CAAC;;AAhEM,6BAAM,GAAG;IACd,GAAG,gBAAgB,CAAC,MAAM;IAC1B,GAAG,CAAA;;;;;;;KAOF;CACF,AAVY,CAUZ;AAEmB;IAAnB,KAAK,CAAC,WAAW,CAAC;wDAAsB;AAb9B,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CAkElC","sourcesContent":["import '@operato/input/ox-select.js'\nimport '@operato/popup/ox-popup-list.js'\n\nimport { css, html, LitElement, TemplateResult } from 'lit'\nimport { customElement, query } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\ntype Option = { display?: string; text?: string; value: any } | string\n\n@customElement('ox-property-editor-select')\nexport class OxPropertyEditorSelect extends OxPropertyEditor {\n static styles = [\n ...OxPropertyEditor.styles,\n css`\n ox-select {\n background-color: var(--theme-white-color);\n padding: 1px 2px;\n color: var(--theme-black-color);\n font-size: 13.5px;\n }\n `\n ]\n\n @query('ox-select') oxSelect!: LitElement\n\n async connectedCallback() {\n super.connectedCallback()\n\n var options = this.property?.options\n if (typeof options === 'function') {\n this.property = {\n ...this.property,\n options: await options.apply(this)\n }\n await this.updateComplete\n this.oxSelect.requestUpdate()\n }\n }\n\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n var options = spec.property?.options as Option[]\n if (!(options instanceof Array)) {\n options = []\n }\n const { fullwidth = false } = spec.editor || {}\n\n return html`\n <ox-select id=\"editor\" .value=${value} placeholder=${spec.placeholder || ''} ?fullwidth=${fullwidth}>\n <ox-popup-list with-search>\n ${options.map(\n item => html`\n <div option value=${this._getOptionValue(item)} ?selected=${this._isSelected(value, item)}>\n ${this._getOptionDisplay(item) || html`&nbsp;`}\n </div>\n `\n )}\n </ox-popup-list>\n </ox-select>\n `\n }\n\n _getOptionValue(item: Option) {\n if (typeof item == 'string') return item\n\n return item.value\n }\n\n _getOptionDisplay(item: Option) {\n if (typeof item == 'string') return item\n\n return item.display || item.text\n }\n\n _isSelected(value: any, item: Option) {\n return value === this._getOptionValue(item)\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-select.js","sourceRoot":"","sources":["../../src/ox-property-editor-select.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAA8B,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAMnD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,gBAAgB;IAe1D,KAAK,CAAC,iBAAiB;;QACrB,KAAK,CAAC,iBAAiB,EAAE,CAAA;QAEzB,IAAI,OAAO,GAAG,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,CAAA;QACpC,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE,CA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W,CAAC,KAAU,EAAE,IAAY;QAClC,OAAO,KAAK,KAAK,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;IAC7C,CAAC;;AAtEM,6BAAM,GAAG;IACd,GAAG,gBAAgB,CAAC,MAAM;IAC1B,GAAG,CAAA;;;;;;;KAOF;CACF,AAVY,CAUZ;AAEmB;IAAnB,KAAK,CAAC,WAAW,CAAC;wDAAsB;AAb9B,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CAwElC","sourcesContent":["import '@operato/input/ox-select.js'\nimport '@operato/popup/ox-popup-list.js'\n\nimport { css, html, LitElement, TemplateResult } from 'lit'\nimport { customElement, query } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\ntype Option = { display?: string; text?: string; value: any } | string\n\n@customElement('ox-property-editor-select')\nexport class OxPropertyEditorSelect extends OxPropertyEditor {\n static styles = [\n ...OxPropertyEditor.styles,\n css`\n ox-select {\n background-color: var(--theme-white-color);\n padding: 1px 2px;\n color: var(--theme-black-color);\n font-size: 13.5px;\n }\n `\n ]\n\n @query('ox-select') oxSelect!: LitElement\n\n async connectedCallback() {\n super.connectedCallback()\n\n var options = this.property?.options\n if (typeof options === 'function') {\n this.property = {\n ...this.property,\n options: await options.apply(this)\n }\n await this.updateComplete\n this.oxSelect.requestUpdate()\n }\n }\n\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n var options = spec.property?.options as Option[]\n if (!(options instanceof Array)) {\n options = []\n }\n const { fullwidth = false } = spec.editor || {}\n\n return html`\n <ox-select\n id=\"editor\"\n .value=${value}\n placeholder=${spec.placeholder || ''}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n >\n <ox-popup-list with-search>\n ${options.map(\n item => html`\n <div option value=${this._getOptionValue(item)} ?selected=${this._isSelected(value, item)}>\n ${this._getOptionDisplay(item) || html`&nbsp;`}\n </div>\n `\n )}\n </ox-popup-list>\n </ox-select>\n `\n }\n\n _getOptionValue(item: Option) {\n if (typeof item == 'string') return item\n\n return item.value\n }\n\n _getOptionDisplay(item: Option) {\n if (typeof item == 'string') return item\n\n return item.display || item.text\n }\n\n _isSelected(value: any, item: Option) {\n return value === this._getOptionValue(item)\n }\n}\n"]}
@@ -14,6 +14,7 @@ let OxPropertyEditorSolidColorStops = class OxPropertyEditorSolidColorStops exte
14
14
  .min=${spec.property && spec.property.min}
15
15
  .max=${spec.property && spec.property.max}
16
16
  ?fullwidth=${fullwidth}
17
+ ?disabled=${this.disabled}
17
18
  >
18
19
  </ox-input-color-stops>
19
20
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-solid-colorstops.js","sourceRoot":"","sources":["../../src/ox-property-editor-solid-colorstops.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,gBAAgB;IACnE,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;;iBAIE,KAAK;eACP,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG;eAClC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG;qBAC5B,SAAS;;;KAGzB,CAAA;IACH,CAAC;CACF,CAAA;AAhBY,+BAA+B;IAD3C,aAAa,CAAC,qCAAqC,CAAC;GACxC,+BAA+B,CAgB3C","sourcesContent":["import '@operato/input/ox-input-color-stops.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-solid-colorstops')\nexport class OxPropertyEditorSolidColorStops extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-color-stops\n id=\"editor\"\n type=\"solid\"\n .value=${value}\n .min=${spec.property && spec.property.min}\n .max=${spec.property && spec.property.max}\n ?fullwidth=${fullwidth}\n >\n </ox-input-color-stops>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-solid-colorstops.js","sourceRoot":"","sources":["../../src/ox-property-editor-solid-colorstops.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,gBAAgB;IACnE,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;;iBAIE,KAAK;eACP,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG;eAClC,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG;qBAC5B,SAAS;oBACV,IAAI,CAAC,QAAQ;;;KAG5B,CAAA;IACH,CAAC;CACF,CAAA;AAjBY,+BAA+B;IAD3C,aAAa,CAAC,qCAAqC,CAAC;GACxC,+BAA+B,CAiB3C","sourcesContent":["import '@operato/input/ox-input-color-stops.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-solid-colorstops')\nexport class OxPropertyEditorSolidColorStops extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-color-stops\n id=\"editor\"\n type=\"solid\"\n .value=${value}\n .min=${spec.property && spec.property.min}\n .max=${spec.property && spec.property.max}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n >\n </ox-input-color-stops>\n `\n }\n}\n"]}
@@ -4,7 +4,15 @@ import { customElement } from 'lit/decorators.js';
4
4
  import { OxPropertyEditor } from './ox-property-editor.js';
5
5
  let OxPropertyEditorString = class OxPropertyEditorString extends OxPropertyEditor {
6
6
  editorTemplate(value, spec) {
7
- return html ` <input type="text" id="editor" .value=${value || ''} placeholder=${spec.placeholder || ''} /> `;
7
+ return html `
8
+ <input
9
+ type="text"
10
+ id="editor"
11
+ .value=${value || ''}
12
+ placeholder=${spec.placeholder || ''}
13
+ ?disabled=${this.disabled}
14
+ />
15
+ `;
8
16
  }
9
17
  };
10
18
  OxPropertyEditorString = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-string.js","sourceRoot":"","sources":["../../src/ox-property-editor-string.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,gBAAgB;IAC1D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA,0CAA0C,KAAK,IAAI,EAAE,gBAAgB,IAAI,CAAC,WAAW,IAAI,EAAE,MAAM,CAAA;IAC9G,CAAC;CACF,CAAA;AAJY,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CAIlC","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-string')\nexport class OxPropertyEditorString extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html` <input type=\"text\" id=\"editor\" .value=${value || ''} placeholder=${spec.placeholder || ''} /> `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-string.js","sourceRoot":"","sources":["../../src/ox-property-editor-string.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,gBAAgB;IAC1D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA;;;;iBAIE,KAAK,IAAI,EAAE;sBACN,IAAI,CAAC,WAAW,IAAI,EAAE;oBACxB,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAZY,sBAAsB;IADlC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,sBAAsB,CAYlC","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-string')\nexport class OxPropertyEditorString extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html`\n <input\n type=\"text\"\n id=\"editor\"\n .value=${value || ''}\n placeholder=${spec.placeholder || ''}\n ?disabled=${this.disabled}\n />\n `\n }\n}\n"]}
@@ -6,7 +6,14 @@ import { OxPropertyEditor } from './ox-property-editor.js';
6
6
  let OxPropertyEditorString = class OxPropertyEditorString extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  const { fullwidth = true } = spec.editor || {};
9
- return html ` <ox-input-table id="editor" .property=${spec.property} ?fullwidth=${fullwidth}></ox-input-table> `;
9
+ return html `
10
+ <ox-input-table
11
+ id="editor"
12
+ .property=${spec.property}
13
+ ?fullwidth=${fullwidth}
14
+ ?disabled=${this.disabled}
15
+ ></ox-input-table>
16
+ `;
10
17
  }
11
18
  };
12
19
  OxPropertyEditorString = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-table.js","sourceRoot":"","sources":["../../src/ox-property-editor-table.ts"],"names":[],"mappings":";AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,gBAAgB;IAC1D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA,0CAA0C,IAAI,CAAC,QAAQ,eAAe,SAAS,qBAAqB,CAAA;IACjH,CAAC;CACF,CAAA;AANY,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAMlC","sourcesContent":["import '@operato/input/ox-input-table.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-table')\nexport class OxPropertyEditorString extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html` <ox-input-table id=\"editor\" .property=${spec.property} ?fullwidth=${fullwidth}></ox-input-table> `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-table.js","sourceRoot":"","sources":["../../src/ox-property-editor-table.ts"],"names":[],"mappings":";AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,gBAAgB;IAC1D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;oBAGK,IAAI,CAAC,QAAQ;qBACZ,SAAS;oBACV,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAbY,sBAAsB;IADlC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,sBAAsB,CAalC","sourcesContent":["import '@operato/input/ox-input-table.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-table')\nexport class OxPropertyEditorString extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-table\n id=\"editor\"\n .property=${spec.property}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n ></ox-input-table>\n `\n }\n}\n"]}
@@ -15,6 +15,7 @@ let OxPropertyEditorTextArea = class OxPropertyEditorTextArea extends OxProperty
15
15
  tab-as-space=${((_b = spec.property) === null || _b === void 0 ? void 0 : _b.tabAsSpace) || 'false'}
16
16
  ?fullwidth=${fullwidth}
17
17
  language=${((_c = spec.property) === null || _c === void 0 ? void 0 : _c.language) || 'javascript'}
18
+ ?disabled=${this.disabled}
18
19
  >
19
20
  </ox-input-code>
20
21
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-textarea.js","sourceRoot":"","sources":["../../src/ox-property-editor-textarea.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,gBAAgB;IAC5D,cAAc,CAAC,KAAU,EAAE,IAAkB;;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;iBAGE,KAAK;mBACH,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,KAAI,EAAE;uBACxB,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,KAAI,OAAO;qBACtC,SAAS;mBACX,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,QAAQ,KAAI,YAAY;;;KAGrD,CAAA;IACH,CAAC;CACF,CAAA;AAhBY,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAgBpC","sourcesContent":["import '@operato/input/ox-input-code.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-textarea')\nexport class OxPropertyEditorTextArea extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-code\n id=\"editor\"\n .value=${value}\n tab-size=${spec.property?.tabSize || ''}\n tab-as-space=${spec.property?.tabAsSpace || 'false'}\n ?fullwidth=${fullwidth}\n language=${spec.property?.language || 'javascript'}\n >\n </ox-input-code>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-textarea.js","sourceRoot":"","sources":["../../src/ox-property-editor-textarea.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,gBAAgB;IAC5D,cAAc,CAAC,KAAU,EAAE,IAAkB;;QAC3C,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;iBAGE,KAAK;mBACH,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,KAAI,EAAE;uBACxB,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,KAAI,OAAO;qBACtC,SAAS;mBACX,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,QAAQ,KAAI,YAAY;oBACtC,IAAI,CAAC,QAAQ;;;KAG5B,CAAA;IACH,CAAC;CACF,CAAA;AAjBY,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAiBpC","sourcesContent":["import '@operato/input/ox-input-code.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-textarea')\nexport class OxPropertyEditorTextArea extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-code\n id=\"editor\"\n .value=${value}\n tab-size=${spec.property?.tabSize || ''}\n tab-as-space=${spec.property?.tabAsSpace || 'false'}\n ?fullwidth=${fullwidth}\n language=${spec.property?.language || 'javascript'}\n ?disabled=${this.disabled}\n >\n </ox-input-code>\n `\n }\n}\n"]}
@@ -4,7 +4,7 @@ import { customElement } from 'lit/decorators.js';
4
4
  import { OxPropertyEditor } from './ox-property-editor.js';
5
5
  let OxPropertyEditorTime = class OxPropertyEditorTime extends OxPropertyEditor {
6
6
  editorTemplate(value, spec) {
7
- return html ` <input type="time" id="editor" .value=${value} /> `;
7
+ return html ` <input type="time" id="editor" .value=${value} ?disabled=${this.disabled} /> `;
8
8
  }
9
9
  };
10
10
  OxPropertyEditorTime = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-time.js","sourceRoot":"","sources":["../../src/ox-property-editor-time.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,gBAAgB;IACxD,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA,0CAA0C,KAAK,MAAM,CAAA;IAClE,CAAC;CACF,CAAA;AAJY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAIhC","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-time')\nexport class OxPropertyEditorTime extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html` <input type=\"time\" id=\"editor\" .value=${value} /> `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-time.js","sourceRoot":"","sources":["../../src/ox-property-editor-time.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,gBAAgB;IACxD,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,OAAO,IAAI,CAAA,0CAA0C,KAAK,cAAc,IAAI,CAAC,QAAQ,MAAM,CAAA;IAC7F,CAAC;CACF,CAAA;AAJY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAIhC","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-time')\nexport class OxPropertyEditorTime extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html` <input type=\"time\" id=\"editor\" .value=${value} ?disabled=${this.disabled} /> `\n }\n}\n"]}
@@ -20,6 +20,7 @@ let OxPropertyEditorNumberUnit = class OxPropertyEditorNumberUnit extends OxProp
20
20
  .step=${step}
21
21
  .min=${min}
22
22
  .max=${max}
23
+ ?disabled=${this.disabled}
23
24
  ></ox-input-unit-number>
24
25
  `;
25
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-unit-number.js","sourceRoot":"","sources":["../../src/ox-property-editor-unit-number.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,gBAAgB;IACrD,MAAM,CAAC,CAAS;QACvB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;IAClB,CAAC;IAED,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAE9D,OAAO,IAAI,CAAA;;;;sBAIO,IAAI,CAAC,WAAW,IAAI,EAAE;mBACzB,IAAI;oBACH,QAAQ,IAAI,IAAI;iBACnB,KAAK;gBACN,IAAI;eACL,GAAG;eACH,GAAG;;KAEb,CAAA;IACH,CAAC;CACF,CAAA;AAtBY,0BAA0B;IADtC,aAAa,CAAC,gCAAgC,CAAC;GACnC,0BAA0B,CAsBtC","sourcesContent":["import '@operato/input/ox-input-unit-number.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-unit-number')\nexport class OxPropertyEditorNumberUnit extends OxPropertyEditor {\n override makeup(v: string) {\n return Number(v)\n }\n\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { step, min, max, unit, userUnit } = spec.property || {}\n\n return html`\n <ox-input-unit-number\n id=\"editor\"\n type=\"number\"\n placeholder=${spec.placeholder || ''}\n .stdUnit=${unit}\n .userUnit=${userUnit || unit}\n .value=${value}\n .step=${step}\n .min=${min}\n .max=${max}\n ></ox-input-unit-number>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-unit-number.js","sourceRoot":"","sources":["../../src/ox-property-editor-unit-number.ts"],"names":[],"mappings":";AAAA,OAAO,wCAAwC,CAAA;AAE/C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,0BAA0B,GAAhC,MAAM,0BAA2B,SAAQ,gBAAgB;IACrD,MAAM,CAAC,CAAS;QACvB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAA;IAClB,CAAC;IAED,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAE9D,OAAO,IAAI,CAAA;;;;sBAIO,IAAI,CAAC,WAAW,IAAI,EAAE;mBACzB,IAAI;oBACH,QAAQ,IAAI,IAAI;iBACnB,KAAK;gBACN,IAAI;eACL,GAAG;eACH,GAAG;oBACE,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAvBY,0BAA0B;IADtC,aAAa,CAAC,gCAAgC,CAAC;GACnC,0BAA0B,CAuBtC","sourcesContent":["import '@operato/input/ox-input-unit-number.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-unit-number')\nexport class OxPropertyEditorNumberUnit extends OxPropertyEditor {\n override makeup(v: string) {\n return Number(v)\n }\n\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { step, min, max, unit, userUnit } = spec.property || {}\n\n return html`\n <ox-input-unit-number\n id=\"editor\"\n type=\"number\"\n placeholder=${spec.placeholder || ''}\n .stdUnit=${unit}\n .userUnit=${userUnit || unit}\n .value=${value}\n .step=${step}\n .min=${min}\n .max=${max}\n ?disabled=${this.disabled}\n ></ox-input-unit-number>\n `\n }\n}\n"]}
@@ -15,6 +15,7 @@ let OxPropertyEditorValueMap = class OxPropertyEditorValueMap extends OxProperty
15
15
  .valuetype=${valuetype}
16
16
  .value=${value}
17
17
  ?fullwidth=${fullwidth}
18
+ ?disabled=${this.disabled}
18
19
  ></ox-input-value-map>
19
20
  `;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-value-map.js","sourceRoot":"","sources":["../../src/ox-property-editor-value-map.ts"],"names":[],"mappings":";AAAA,OAAO,sCAAsC,CAAA;AAE7C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,gBAAgB;IAC5D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;QACzB,MAAM,SAAS,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS,KAAI,QAAQ,CAAA;QACjD,qDAAqD;QACrD,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;qBAGM,SAAS;iBACb,KAAK;qBACD,SAAS;;KAEzB,CAAA;IACH,CAAC;CACF,CAAA;AAhBY,wBAAwB;IADpC,aAAa,CAAC,8BAA8B,CAAC;GACjC,wBAAwB,CAgBpC","sourcesContent":["import '@operato/input/ox-input-value-map.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-value-map')\nexport class OxPropertyEditorValueMap extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { property } = spec\n const valuetype = property?.valuetype || 'string'\n /* IMPLEMENT-ME valuetype 에 editor를 전달할 수 있는 기능 개발 */\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-value-map\n id=\"editor\"\n .valuetype=${valuetype}\n .value=${value}\n ?fullwidth=${fullwidth}\n ></ox-input-value-map>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-value-map.js","sourceRoot":"","sources":["../../src/ox-property-editor-value-map.ts"],"names":[],"mappings":";AAAA,OAAO,sCAAsC,CAAA;AAE7C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,gBAAgB;IAC5D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;QACzB,MAAM,SAAS,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS,KAAI,QAAQ,CAAA;QACjD,qDAAqD;QACrD,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;qBAGM,SAAS;iBACb,KAAK;qBACD,SAAS;oBACV,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAjBY,wBAAwB;IADpC,aAAa,CAAC,8BAA8B,CAAC;GACjC,wBAAwB,CAiBpC","sourcesContent":["import '@operato/input/ox-input-value-map.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-value-map')\nexport class OxPropertyEditorValueMap extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { property } = spec\n const valuetype = property?.valuetype || 'string'\n /* IMPLEMENT-ME valuetype 에 editor를 전달할 수 있는 기능 개발 */\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-value-map\n id=\"editor\"\n .valuetype=${valuetype}\n .value=${value}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n ></ox-input-value-map>\n `\n }\n}\n"]}
@@ -15,6 +15,7 @@ let OxPropertyEditorValueRanges = class OxPropertyEditorValueRanges extends OxPr
15
15
  .valuetype=${valuetype}
16
16
  .value=${value}
17
17
  ?fullwidth=${fullwidth}
18
+ ?disabled=${this.disabled}
18
19
  ></ox-input-value-ranges>
19
20
  `;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-value-ranges.js","sourceRoot":"","sources":["../../src/ox-property-editor-value-ranges.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,gBAAgB;IAC/D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;QACzB,MAAM,SAAS,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS,KAAI,QAAQ,CAAA;QACjD,qDAAqD;QACrD,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;qBAGM,SAAS;iBACb,KAAK;qBACD,SAAS;;KAEzB,CAAA;IACH,CAAC;CACF,CAAA;AAhBY,2BAA2B;IADvC,aAAa,CAAC,iCAAiC,CAAC;GACpC,2BAA2B,CAgBvC","sourcesContent":["import '@operato/input/ox-input-value-ranges.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-value-ranges')\nexport class OxPropertyEditorValueRanges extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { property } = spec\n const valuetype = property?.valuetype || 'string'\n /* IMPLEMENT-ME valuetype 에 editor를 전달할 수 있는 기능 개발 */\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-value-ranges\n id=\"editor\"\n .valuetype=${valuetype}\n .value=${value}\n ?fullwidth=${fullwidth}\n ></ox-input-value-ranges>\n `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-value-ranges.js","sourceRoot":"","sources":["../../src/ox-property-editor-value-ranges.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,gBAAgB;IAC/D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA;QACzB,MAAM,SAAS,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,SAAS,KAAI,QAAQ,CAAA;QACjD,qDAAqD;QACrD,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;QAE9C,OAAO,IAAI,CAAA;;;qBAGM,SAAS;iBACb,KAAK;qBACD,SAAS;oBACV,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAjBY,2BAA2B;IADvC,aAAa,CAAC,iCAAiC,CAAC;GACpC,2BAA2B,CAiBvC","sourcesContent":["import '@operato/input/ox-input-value-ranges.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-value-ranges')\nexport class OxPropertyEditorValueRanges extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { property } = spec\n const valuetype = property?.valuetype || 'string'\n /* IMPLEMENT-ME valuetype 에 editor를 전달할 수 있는 기능 개발 */\n const { fullwidth = true } = spec.editor || {}\n\n return html`\n <ox-input-value-ranges\n id=\"editor\"\n .valuetype=${valuetype}\n .value=${value}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n ></ox-input-value-ranges>\n `\n }\n}\n"]}
@@ -7,7 +7,14 @@ let OxPropertyEditorWorkShift = class OxPropertyEditorWorkShift extends OxProper
7
7
  editorTemplate(value, spec) {
8
8
  const { editor } = spec;
9
9
  const { fullwidth = true } = editor || {};
10
- return html ` <ox-input-work-shift id="editor" .value=${value} ?fullwidth=${fullwidth}></ox-input-work-shift> `;
10
+ return html `
11
+ <ox-input-work-shift
12
+ id="editor"
13
+ .value=${value}
14
+ ?fullwidth=${fullwidth}
15
+ ?disabled=${this.disabled}
16
+ ></ox-input-work-shift>
17
+ `;
11
18
  }
12
19
  };
13
20
  OxPropertyEditorWorkShift = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor-work-shift.js","sourceRoot":"","sources":["../../src/ox-property-editor-work-shift.ts"],"names":[],"mappings":";AAAA,OAAO,uCAAuC,CAAA;AAE9C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,gBAAgB;IAC7D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;QACvB,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAA;QAEzC,OAAO,IAAI,CAAA,4CAA4C,KAAK,eAAe,SAAS,0BAA0B,CAAA;IAChH,CAAC;CACF,CAAA;AAPY,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CAOrC","sourcesContent":["import '@operato/input/ox-input-work-shift.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-work-shift')\nexport class OxPropertyEditorWorkShift extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { editor } = spec\n const { fullwidth = true } = editor || {}\n\n return html` <ox-input-work-shift id=\"editor\" .value=${value} ?fullwidth=${fullwidth}></ox-input-work-shift> `\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor-work-shift.js","sourceRoot":"","sources":["../../src/ox-property-editor-work-shift.ts"],"names":[],"mappings":";AAAA,OAAO,uCAAuC,CAAA;AAE9C,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAInD,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,gBAAgB;IAC7D,cAAc,CAAC,KAAU,EAAE,IAAkB;QAC3C,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;QACvB,MAAM,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,MAAM,IAAI,EAAE,CAAA;QAEzC,OAAO,IAAI,CAAA;;;iBAGE,KAAK;qBACD,SAAS;oBACV,IAAI,CAAC,QAAQ;;KAE5B,CAAA;IACH,CAAC;CACF,CAAA;AAdY,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CAcrC","sourcesContent":["import '@operato/input/ox-input-work-shift.js'\n\nimport { html, TemplateResult } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxPropertyEditor } from './ox-property-editor.js'\nimport { PropertySpec } from './types.js'\n\n@customElement('ox-property-editor-work-shift')\nexport class OxPropertyEditorWorkShift extends OxPropertyEditor {\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n const { editor } = spec\n const { fullwidth = true } = editor || {}\n\n return html`\n <ox-input-work-shift\n id=\"editor\"\n .value=${value}\n ?fullwidth=${fullwidth}\n ?disabled=${this.disabled}\n ></ox-input-work-shift>\n `\n }\n}\n"]}
@@ -19,9 +19,11 @@ export declare class OxPropertyEditor extends LitElement {
19
19
  editor?: EditorProperty;
20
20
  host: any;
21
21
  quantifier?: [min: number, max: number];
22
- observe?: (value: any) => void;
22
+ observeHandler?: (value: any) => void;
23
23
  defaultValue?: any;
24
24
  context?: any;
25
+ disabled?: boolean;
26
+ private observing;
25
27
  connectedCallback(): void;
26
28
  editorTemplate(value: any, spec: PropertySpec): TemplateResult;
27
29
  render(): TemplateResult<1>;
@@ -31,4 +33,5 @@ export declare class OxPropertyEditor extends LitElement {
31
33
  makeup(v: any): any;
32
34
  _computeLabelId(label: string): string;
33
35
  _valueChanged(e: Event): void;
36
+ observe(value: any): void;
34
37
  }
@@ -7,6 +7,7 @@ export class OxPropertyEditor extends LitElement {
7
7
  constructor() {
8
8
  super(...arguments);
9
9
  this.quantifier = [1, 1];
10
+ this.observing = false;
10
11
  this.__by_me = false;
11
12
  }
12
13
  static register(types) {
@@ -86,9 +87,14 @@ export class OxPropertyEditor extends LitElement {
86
87
  this.value = value;
87
88
  }
88
89
  this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
89
- if (!this.observe)
90
- return;
91
- this.observe.call(this, this.value);
90
+ this.observe(this.value);
91
+ }
92
+ observe(value) {
93
+ if (this.observeHandler && !this.observing) {
94
+ this.observing = true;
95
+ this.observeHandler.call(this, value);
96
+ this.observing = false;
97
+ }
92
98
  }
93
99
  }
94
100
  OxPropertyEditor.registry = {};
@@ -216,13 +222,16 @@ __decorate([
216
222
  ], OxPropertyEditor.prototype, "quantifier", void 0);
217
223
  __decorate([
218
224
  property({ type: Object })
219
- ], OxPropertyEditor.prototype, "observe", void 0);
225
+ ], OxPropertyEditor.prototype, "observeHandler", void 0);
220
226
  __decorate([
221
227
  property({ type: Object })
222
228
  ], OxPropertyEditor.prototype, "defaultValue", void 0);
223
229
  __decorate([
224
230
  property({ type: Object })
225
231
  ], OxPropertyEditor.prototype, "context", void 0);
232
+ __decorate([
233
+ property({ type: Boolean })
234
+ ], OxPropertyEditor.prototype, "disabled", void 0);
226
235
  __decorate([
227
236
  state()
228
237
  ], OxPropertyEditor.prototype, "__by_me", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"ox-property-editor.js","sourceRoot":"","sources":["../../src/ox-property-editor.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAI3C,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAqH6B,eAAU,GAAgC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QA0ClE,YAAO,GAAG,KAAK,CAAA;IAmD1B,CAAC;IA/MQ,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAChC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CA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AC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAwB;AACvB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAU;AACV;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;oDAAiD;AAC/C;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAA+B;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAc;AAuChC;IAAR,KAAK,EAAE;iDAAgB","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport deepClone from 'lodash-es/cloneDeep'\n\nimport { EditorProperty, PropertySpec } from './types'\n\nexport class OxPropertyEditor extends LitElement {\n static registry: { [type: string]: string } = {}\n\n public static register(types: { [type: string]: string }) {\n Object.keys(types).forEach(type => {\n OxPropertyEditor.registry[type] = types[type]\n })\n }\n\n public static getEditor(type: string): string {\n return OxPropertyEditor.registry[type]\n }\n\n static styles = [\n css`\n :host {\n margin: 5px;\n\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n\n align-items: center;\n\n color: var(--property-sidebar-fieldset-legend-color);\n }\n\n :host > * {\n box-sizing: border-box;\n\n grid-column: span 7;\n order: 2;\n\n align-self: stretch;\n }\n\n :host > label {\n grid-column: span 3;\n order: 1;\n\n text-align: right;\n\n font: var(--label-font);\n text-transform: capitalize;\n\n align-self: center;\n }\n\n :host > input[type='checkbox'] ~ label,\n :host > ox-checkbox ~ label {\n grid-column: span 6;\n order: 2;\n\n text-align: left;\n }\n\n select,\n ox-select,\n input:not([type='checkbox']) {\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n }\n\n :host > legend {\n grid-column: 1 / -1;\n\n display: inline-block;\n\n text-align: left;\n text-transform: capitalize;\n }\n\n :host > [fullwidth] {\n grid-column: 1 / -1;\n }\n\n :host > input[type='checkbox'],\n :host > ox-checkbox {\n grid-column: span 4;\n order: 1;\n\n justify-self: end;\n align-self: center;\n }\n\n ox-input-code,\n ox-input-data,\n .multiline-input {\n height: 300px;\n }\n\n :host > div {\n display: flex;\n flex-direction: column;\n gap: 3px;\n }\n\n div[data-index] {\n display: flex;\n min-height: 24px;\n }\n\n div[data-index] > * {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) value: any\n @property({ type: String }) type!: string\n @property({ type: String, attribute: true, reflect: true }) name!: string\n @property({ type: String }) label!: string\n @property({ type: String }) placeholder?: string\n @property({ type: Object }) property?: any\n @property({ type: Object }) editor?: EditorProperty\n @property({ type: Object }) host: any\n @property({ type: Array }) quantifier?: [min: number, max: number] = [1, 1]\n @property({ type: Object }) observe?: (value: any) => void\n @property({ type: Object }) defaultValue?: any\n @property({ type: Object }) context?: any\n\n connectedCallback() {\n super.connectedCallback()\n\n this.renderRoot.addEventListener('change', this._valueChanged.bind(this))\n }\n\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html``\n }\n\n render() {\n const { defaultValue } = this\n const { value = defaultValue, quantifier } = this\n const [min = 1, max = 1] = quantifier || [1, 1]\n\n return html`\n ${max <= 1\n ? this.editorTemplate(value, this)\n : html`\n <div ?fullwidth=${this.editor?.fullwidth}>\n ${new Array(max)\n .fill('')\n .map(\n (_, idx) => html` <div editor data-index=${idx}>${this.editorTemplate(value?.[idx], this)}</div> `\n )}\n </div>\n `}\n ${this.label\n ? html`\n <label for=\"editor\">\n <ox-i18n msgid=${this._computeLabelId(this.label)}>${this.label}</ox-i18n>\n </label>\n `\n : html``}\n `\n }\n\n @state() __by_me = false\n\n shouldUpdate(changedProperties: any) {\n if (this.__by_me) {\n return false\n }\n\n if (changedProperties.has('value')) {\n this.__by_me = true\n this.value = this.makeup(this.value)\n this.__by_me = false\n }\n\n return true\n }\n\n get valueProperty() {\n return 'value'\n }\n\n makeup(v: any) {\n return deepClone(v)\n }\n\n _computeLabelId(label: string) {\n if (label.indexOf('label.') >= 0) return label\n\n return 'label.' + label\n }\n\n _valueChanged(e: Event) {\n e.stopPropagation()\n const editor = e.target as HTMLInputElement\n\n const [min = 1, max = 1] = this.quantifier || []\n const value = this.makeup((editor as any)[this.valueProperty])\n\n if (max > 1) {\n const index = Number(editor.closest('[data-index]')?.getAttribute('data-index'))\n var array: any[] = this.value instanceof Array ? [...this.value] : []\n array[index] = value\n this.value = array\n } else {\n this.value = value\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n\n if (!this.observe) return\n this.observe.call(this, this.value)\n }\n}\n"]}
1
+ {"version":3,"file":"ox-property-editor.js","sourceRoot":"","sources":["../../src/ox-property-editor.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAI3C,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QAqH6B,eAAU,GAAgC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAMnE,cAAS,GAAY,KAAK,CAAA;QAuCzB,YAAO,GAAG,KAAK,CAAA;IA0D1B,CAAC;IAzNQ,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAChC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,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EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAc;AAC7C;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qDAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAwB;AACvB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAAU;AACV;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;oDAAiD;AAC/C;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAsC;AACrC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAmB;AAClB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAc;AACZ;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;kDAAmB;AAyCtC;IAAR,KAAK,EAAE;iDAAgB","sourcesContent":["import '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement, TemplateResult } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport deepClone from 'lodash-es/cloneDeep'\n\nimport { EditorProperty, PropertySpec } from './types'\n\nexport class OxPropertyEditor extends LitElement {\n static registry: { [type: string]: string } = {}\n\n public static register(types: { [type: string]: string }) {\n Object.keys(types).forEach(type => {\n OxPropertyEditor.registry[type] = types[type]\n })\n }\n\n public static getEditor(type: string): string {\n return OxPropertyEditor.registry[type]\n }\n\n static styles = [\n css`\n :host {\n margin: 5px;\n\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n\n align-items: center;\n\n color: var(--property-sidebar-fieldset-legend-color);\n }\n\n :host > * {\n box-sizing: border-box;\n\n grid-column: span 7;\n order: 2;\n\n align-self: stretch;\n }\n\n :host > label {\n grid-column: span 3;\n order: 1;\n\n text-align: right;\n\n font: var(--label-font);\n text-transform: capitalize;\n\n align-self: center;\n }\n\n :host > input[type='checkbox'] ~ label,\n :host > ox-checkbox ~ label {\n grid-column: span 6;\n order: 2;\n\n text-align: left;\n }\n\n select,\n ox-select,\n input:not([type='checkbox']) {\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 4px;\n }\n\n :host > legend {\n grid-column: 1 / -1;\n\n display: inline-block;\n\n text-align: left;\n text-transform: capitalize;\n }\n\n :host > [fullwidth] {\n grid-column: 1 / -1;\n }\n\n :host > input[type='checkbox'],\n :host > ox-checkbox {\n grid-column: span 4;\n order: 1;\n\n justify-self: end;\n align-self: center;\n }\n\n ox-input-code,\n ox-input-data,\n .multiline-input {\n height: 300px;\n }\n\n :host > div {\n display: flex;\n flex-direction: column;\n gap: 3px;\n }\n\n div[data-index] {\n display: flex;\n min-height: 24px;\n }\n\n div[data-index] > * {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) value: any\n @property({ type: String }) type!: string\n @property({ type: String, attribute: true, reflect: true }) name!: string\n @property({ type: String }) label!: string\n @property({ type: String }) placeholder?: string\n @property({ type: Object }) property?: any\n @property({ type: Object }) editor?: EditorProperty\n @property({ type: Object }) host: any\n @property({ type: Array }) quantifier?: [min: number, max: number] = [1, 1]\n @property({ type: Object }) observeHandler?: (value: any) => void\n @property({ type: Object }) defaultValue?: any\n @property({ type: Object }) context?: any\n @property({ type: Boolean }) disabled?: boolean\n\n private observing: boolean = false\n\n connectedCallback() {\n super.connectedCallback()\n\n this.renderRoot.addEventListener('change', this._valueChanged.bind(this))\n }\n\n editorTemplate(value: any, spec: PropertySpec): TemplateResult {\n return html``\n }\n\n render() {\n const { defaultValue } = this\n const { value = defaultValue, quantifier } = this\n const [min = 1, max = 1] = quantifier || [1, 1]\n\n return html`\n ${max <= 1\n ? this.editorTemplate(value, this)\n : html`\n <div ?fullwidth=${this.editor?.fullwidth}>\n ${new Array(max)\n .fill('')\n .map(\n (_, idx) => html` <div editor data-index=${idx}>${this.editorTemplate(value?.[idx], this)}</div> `\n )}\n </div>\n `}\n ${this.label\n ? html`\n <label for=\"editor\">\n <ox-i18n msgid=${this._computeLabelId(this.label)}>${this.label}</ox-i18n>\n </label>\n `\n : html``}\n `\n }\n\n @state() __by_me = false\n\n shouldUpdate(changedProperties: any) {\n if (this.__by_me) {\n return false\n }\n\n if (changedProperties.has('value')) {\n this.__by_me = true\n this.value = this.makeup(this.value)\n this.__by_me = false\n }\n\n return true\n }\n\n get valueProperty() {\n return 'value'\n }\n\n makeup(v: any) {\n return deepClone(v)\n }\n\n _computeLabelId(label: string) {\n if (label.indexOf('label.') >= 0) return label\n\n return 'label.' + label\n }\n\n _valueChanged(e: Event) {\n e.stopPropagation()\n const editor = e.target as HTMLInputElement\n\n const [min = 1, max = 1] = this.quantifier || []\n const value = this.makeup((editor as any)[this.valueProperty])\n\n if (max > 1) {\n const index = Number(editor.closest('[data-index]')?.getAttribute('data-index'))\n var array: any[] = this.value instanceof Array ? [...this.value] : []\n array[index] = value\n this.value = array\n } else {\n this.value = value\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n\n this.observe(this.value)\n }\n\n observe(value: any) {\n if (this.observeHandler && !this.observing) {\n this.observing = true\n this.observeHandler.call(this, value)\n this.observing = false\n }\n }\n}\n"]}