@operato/property-editor 1.4.38 → 1.4.60

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 (74) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/src/ox-property-editor-3axis.js +2 -1
  3. package/dist/src/ox-property-editor-3axis.js.map +1 -1
  4. package/dist/src/ox-property-editor-3dish.js +2 -1
  5. package/dist/src/ox-property-editor-3dish.js.map +1 -1
  6. package/dist/src/ox-property-editor-angle.js +2 -1
  7. package/dist/src/ox-property-editor-angle.js.map +1 -1
  8. package/dist/src/ox-property-editor-checkbox.js +2 -1
  9. package/dist/src/ox-property-editor-checkbox.js.map +1 -1
  10. package/dist/src/ox-property-editor-color.js +2 -1
  11. package/dist/src/ox-property-editor-color.js.map +1 -1
  12. package/dist/src/ox-property-editor-crontab.js +2 -1
  13. package/dist/src/ox-property-editor-crontab.js.map +1 -1
  14. package/dist/src/ox-property-editor-data.js +2 -1
  15. package/dist/src/ox-property-editor-data.js.map +1 -1
  16. package/dist/src/ox-property-editor-date.js +2 -1
  17. package/dist/src/ox-property-editor-date.js.map +1 -1
  18. package/dist/src/ox-property-editor-duration.js +2 -1
  19. package/dist/src/ox-property-editor-duration.js.map +1 -1
  20. package/dist/src/ox-property-editor-file.js +2 -1
  21. package/dist/src/ox-property-editor-file.js.map +1 -1
  22. package/dist/src/ox-property-editor-gradient-colorstops.js +2 -1
  23. package/dist/src/ox-property-editor-gradient-colorstops.js.map +1 -1
  24. package/dist/src/ox-property-editor-hashtags.js +2 -1
  25. package/dist/src/ox-property-editor-hashtags.js.map +1 -1
  26. package/dist/src/ox-property-editor-image.js +2 -1
  27. package/dist/src/ox-property-editor-image.js.map +1 -1
  28. package/dist/src/ox-property-editor-key-values.js +2 -1
  29. package/dist/src/ox-property-editor-key-values.js.map +1 -1
  30. package/dist/src/ox-property-editor-legend.js +2 -1
  31. package/dist/src/ox-property-editor-legend.js.map +1 -1
  32. package/dist/src/ox-property-editor-mass-fraction.js +2 -1
  33. package/dist/src/ox-property-editor-mass-fraction.js.map +1 -1
  34. package/dist/src/ox-property-editor-month.js +2 -1
  35. package/dist/src/ox-property-editor-month.js.map +1 -1
  36. package/dist/src/ox-property-editor-multiple-colors.js +2 -1
  37. package/dist/src/ox-property-editor-multiple-colors.js.map +1 -1
  38. package/dist/src/ox-property-editor-number.js +2 -1
  39. package/dist/src/ox-property-editor-number.js.map +1 -1
  40. package/dist/src/ox-property-editor-options.js +2 -1
  41. package/dist/src/ox-property-editor-options.js.map +1 -1
  42. package/dist/src/ox-property-editor-partition-keys.js +2 -1
  43. package/dist/src/ox-property-editor-partition-keys.js.map +1 -1
  44. package/dist/src/ox-property-editor-password.js +2 -1
  45. package/dist/src/ox-property-editor-password.js.map +1 -1
  46. package/dist/src/ox-property-editor-range.js +2 -1
  47. package/dist/src/ox-property-editor-range.js.map +1 -1
  48. package/dist/src/ox-property-editor-scene-component-id.js +2 -1
  49. package/dist/src/ox-property-editor-scene-component-id.js.map +1 -1
  50. package/dist/src/ox-property-editor-select.js +2 -1
  51. package/dist/src/ox-property-editor-select.js.map +1 -1
  52. package/dist/src/ox-property-editor-solid-colorstops.js +2 -1
  53. package/dist/src/ox-property-editor-solid-colorstops.js.map +1 -1
  54. package/dist/src/ox-property-editor-string.js +2 -1
  55. package/dist/src/ox-property-editor-string.js.map +1 -1
  56. package/dist/src/ox-property-editor-table.js +2 -1
  57. package/dist/src/ox-property-editor-table.js.map +1 -1
  58. package/dist/src/ox-property-editor-textarea.js +2 -1
  59. package/dist/src/ox-property-editor-textarea.js.map +1 -1
  60. package/dist/src/ox-property-editor-time.js +2 -1
  61. package/dist/src/ox-property-editor-time.js.map +1 -1
  62. package/dist/src/ox-property-editor-unit-number.js +2 -1
  63. package/dist/src/ox-property-editor-unit-number.js.map +1 -1
  64. package/dist/src/ox-property-editor-value-map.js +2 -1
  65. package/dist/src/ox-property-editor-value-map.js.map +1 -1
  66. package/dist/src/ox-property-editor-value-ranges.js +2 -1
  67. package/dist/src/ox-property-editor-value-ranges.js.map +1 -1
  68. package/dist/src/ox-property-editor-work-shift.js +2 -1
  69. package/dist/src/ox-property-editor-work-shift.js.map +1 -1
  70. package/dist/src/ox-property-editor.js +1 -0
  71. package/dist/src/ox-property-editor.js.map +1 -1
  72. package/dist/tsconfig.tsbuildinfo +1 -1
  73. package/package.json +4 -4
  74. package/src/ox-property-editor.ts +1 -0
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-range.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorRange = class OxPropertyEditorRange extends OxPropertyEditor {
6
+ let OxPropertyEditorRange = class OxPropertyEditorRange extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  const { step, min, max } = spec.property || {};
9
9
  const { fullwidth = false } = spec.editor || {};
@@ -22,4 +22,5 @@ export let OxPropertyEditorRange = class OxPropertyEditorRange extends OxPropert
22
22
  OxPropertyEditorRange = __decorate([
23
23
  customElement('ox-property-editor-range')
24
24
  ], OxPropertyEditorRange);
25
+ export { OxPropertyEditorRange };
25
26
  //# sourceMappingURL=ox-property-editor-range.js.map
@@ -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,WAAM,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;;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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-scene-component-id.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorSceneComponentId = class OxPropertyEditorSceneComponentId extends OxPropertyEditor {
6
+ let OxPropertyEditorSceneComponentId = class OxPropertyEditorSceneComponentId extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  return html `
9
9
  <ox-input-scene-component-id id="editor" .value=${value} .property=${spec.property}></ox-input-scene-component-id>
@@ -13,4 +13,5 @@ export let OxPropertyEditorSceneComponentId = class OxPropertyEditorSceneCompone
13
13
  OxPropertyEditorSceneComponentId = __decorate([
14
14
  customElement('ox-property-editor-scene-component-id')
15
15
  ], OxPropertyEditorSceneComponentId);
16
+ export { OxPropertyEditorSceneComponentId };
16
17
  //# sourceMappingURL=ox-property-editor-scene-component-id.js.map
@@ -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,WAAM,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;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"]}
@@ -4,7 +4,7 @@ import '@operato/popup/ox-popup-list.js';
4
4
  import { css, html } from 'lit';
5
5
  import { customElement, query } from 'lit/decorators.js';
6
6
  import { OxPropertyEditor } from './ox-property-editor.js';
7
- export let OxPropertyEditorSelect = class OxPropertyEditorSelect extends OxPropertyEditor {
7
+ let OxPropertyEditorSelect = class OxPropertyEditorSelect extends OxPropertyEditor {
8
8
  async connectedCallback() {
9
9
  var _a;
10
10
  super.connectedCallback();
@@ -68,4 +68,5 @@ __decorate([
68
68
  OxPropertyEditorSelect = __decorate([
69
69
  customElement('ox-property-editor-select')
70
70
  ], OxPropertyEditorSelect);
71
+ export { OxPropertyEditorSelect };
71
72
  //# sourceMappingURL=ox-property-editor-select.js.map
@@ -1 +1 @@
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,yBA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I,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;YACjC,IAAI,CAAC,QAAQ,GAAG;gBACd,GAAG,IAAI,CAAC,QAAQ;gBAChB,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;aACnC,CAAA;YACD,MAAM,IAAI,CAAC,cAAc,CAAA;YACzB,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAA;SAC9B;IACH,CAAC;IAED,cAAc,CAAC,KAAU,EAAE,IAAkB;;QAC3C,IAAI,OAAO,GAAG,MAAA,IAAI,CAAC,QAA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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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-color-stops.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorSolidColorStops = class OxPropertyEditorSolidColorStops extends OxPropertyEditor {
6
+ let OxPropertyEditorSolidColorStops = class OxPropertyEditorSolidColorStops extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  const { fullwidth = true } = spec.editor || {};
9
9
  return html `
@@ -22,4 +22,5 @@ export let OxPropertyEditorSolidColorStops = class OxPropertyEditorSolidColorSto
22
22
  OxPropertyEditorSolidColorStops = __decorate([
23
23
  customElement('ox-property-editor-solid-colorstops')
24
24
  ], OxPropertyEditorSolidColorStops);
25
+ export { OxPropertyEditorSolidColorStops };
25
26
  //# sourceMappingURL=ox-property-editor-solid-colorstops.js.map
@@ -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,WAAM,+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;;;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"]}
@@ -2,7 +2,7 @@ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { customElement } from 'lit/decorators.js';
4
4
  import { OxPropertyEditor } from './ox-property-editor.js';
5
- export let OxPropertyEditorString = class OxPropertyEditorString extends OxPropertyEditor {
5
+ let OxPropertyEditorString = class OxPropertyEditorString extends OxPropertyEditor {
6
6
  editorTemplate(value, spec) {
7
7
  return html ` <input type="text" id="editor" .value=${value || ''} placeholder=${spec.placeholder || ''} /> `;
8
8
  }
@@ -10,4 +10,5 @@ export let OxPropertyEditorString = class OxPropertyEditorString extends OxPrope
10
10
  OxPropertyEditorString = __decorate([
11
11
  customElement('ox-property-editor-string')
12
12
  ], OxPropertyEditorString);
13
+ export { OxPropertyEditorString };
13
14
  //# sourceMappingURL=ox-property-editor-string.js.map
@@ -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,WAAM,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,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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-table.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorString = class OxPropertyEditorString extends OxPropertyEditor {
6
+ let OxPropertyEditorString = class OxPropertyEditorString extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  const { fullwidth = true } = spec.editor || {};
9
9
  return html ` <ox-input-table id="editor" .property=${spec.property} ?fullwidth=${fullwidth}></ox-input-table> `;
@@ -12,4 +12,5 @@ export let OxPropertyEditorString = class OxPropertyEditorString extends OxPrope
12
12
  OxPropertyEditorString = __decorate([
13
13
  customElement('ox-property-editor-table')
14
14
  ], OxPropertyEditorString);
15
+ export { OxPropertyEditorString };
15
16
  //# sourceMappingURL=ox-property-editor-table.js.map
@@ -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,WAAM,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,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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-code.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorTextArea = class OxPropertyEditorTextArea extends OxPropertyEditor {
6
+ let OxPropertyEditorTextArea = class OxPropertyEditorTextArea extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  var _a, _b, _c;
9
9
  const { fullwidth = true } = spec.editor || {};
@@ -23,4 +23,5 @@ export let OxPropertyEditorTextArea = class OxPropertyEditorTextArea extends OxP
23
23
  OxPropertyEditorTextArea = __decorate([
24
24
  customElement('ox-property-editor-textarea')
25
25
  ], OxPropertyEditorTextArea);
26
+ export { OxPropertyEditorTextArea };
26
27
  //# sourceMappingURL=ox-property-editor-textarea.js.map
@@ -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,WAAM,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;eACP,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,KAAI,EAAE;mBACrB,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,KAAI,EAAE;uBACxB,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,KAAI,OAAO;qBACtC,SAAS;;;KAGzB,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 mode=${spec.property?.mode || ''}\n tab-size=${spec.property?.tabSize || ''}\n tab-as-space=${spec.property?.tabAsSpace || 'false'}\n ?fullwidth=${fullwidth}\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;eACP,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,KAAI,EAAE;mBACrB,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,KAAI,EAAE;uBACxB,CAAA,MAAA,IAAI,CAAC,QAAQ,0CAAE,UAAU,KAAI,OAAO;qBACtC,SAAS;;;KAGzB,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 mode=${spec.property?.mode || ''}\n tab-size=${spec.property?.tabSize || ''}\n tab-as-space=${spec.property?.tabAsSpace || 'false'}\n ?fullwidth=${fullwidth}\n >\n </ox-input-code>\n `\n }\n}\n"]}
@@ -2,7 +2,7 @@ import { __decorate } from "tslib";
2
2
  import { html } from 'lit';
3
3
  import { customElement } from 'lit/decorators.js';
4
4
  import { OxPropertyEditor } from './ox-property-editor.js';
5
- export let OxPropertyEditorTime = class OxPropertyEditorTime extends OxPropertyEditor {
5
+ let OxPropertyEditorTime = class OxPropertyEditorTime extends OxPropertyEditor {
6
6
  editorTemplate(value, spec) {
7
7
  return html ` <input type="time" id="editor" .value=${value} /> `;
8
8
  }
@@ -10,4 +10,5 @@ export let OxPropertyEditorTime = class OxPropertyEditorTime extends OxPropertyE
10
10
  OxPropertyEditorTime = __decorate([
11
11
  customElement('ox-property-editor-time')
12
12
  ], OxPropertyEditorTime);
13
+ export { OxPropertyEditorTime };
13
14
  //# sourceMappingURL=ox-property-editor-time.js.map
@@ -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,WAAM,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,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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-unit-number.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorNumberUnit = class OxPropertyEditorNumberUnit extends OxPropertyEditor {
6
+ let OxPropertyEditorNumberUnit = class OxPropertyEditorNumberUnit extends OxPropertyEditor {
7
7
  makeup(v) {
8
8
  return Number(v);
9
9
  }
@@ -27,4 +27,5 @@ export let OxPropertyEditorNumberUnit = class OxPropertyEditorNumberUnit extends
27
27
  OxPropertyEditorNumberUnit = __decorate([
28
28
  customElement('ox-property-editor-unit-number')
29
29
  ], OxPropertyEditorNumberUnit);
30
+ export { OxPropertyEditorNumberUnit };
30
31
  //# sourceMappingURL=ox-property-editor-unit-number.js.map
@@ -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,WAAM,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;;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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-value-map.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorValueMap = class OxPropertyEditorValueMap extends OxPropertyEditor {
6
+ let OxPropertyEditorValueMap = class OxPropertyEditorValueMap extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  const { property } = spec;
9
9
  const valuetype = (property === null || property === void 0 ? void 0 : property.valuetype) || 'string';
@@ -22,4 +22,5 @@ export let OxPropertyEditorValueMap = class OxPropertyEditorValueMap extends OxP
22
22
  OxPropertyEditorValueMap = __decorate([
23
23
  customElement('ox-property-editor-value-map')
24
24
  ], OxPropertyEditorValueMap);
25
+ export { OxPropertyEditorValueMap };
25
26
  //# sourceMappingURL=ox-property-editor-value-map.js.map
@@ -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,WAAM,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;;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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-value-ranges.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorValueRanges = class OxPropertyEditorValueRanges extends OxPropertyEditor {
6
+ let OxPropertyEditorValueRanges = class OxPropertyEditorValueRanges extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  const { property } = spec;
9
9
  const valuetype = (property === null || property === void 0 ? void 0 : property.valuetype) || 'string';
@@ -22,4 +22,5 @@ export let OxPropertyEditorValueRanges = class OxPropertyEditorValueRanges exten
22
22
  OxPropertyEditorValueRanges = __decorate([
23
23
  customElement('ox-property-editor-value-ranges')
24
24
  ], OxPropertyEditorValueRanges);
25
+ export { OxPropertyEditorValueRanges };
25
26
  //# sourceMappingURL=ox-property-editor-value-ranges.js.map
@@ -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,WAAM,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;;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"]}
@@ -3,7 +3,7 @@ import '@operato/input/ox-input-work-shift.js';
3
3
  import { html } from 'lit';
4
4
  import { customElement } from 'lit/decorators.js';
5
5
  import { OxPropertyEditor } from './ox-property-editor.js';
6
- export let OxPropertyEditorWorkShift = class OxPropertyEditorWorkShift extends OxPropertyEditor {
6
+ let OxPropertyEditorWorkShift = class OxPropertyEditorWorkShift extends OxPropertyEditor {
7
7
  editorTemplate(value, spec) {
8
8
  const { editor } = spec;
9
9
  const { fullwidth = true } = editor || {};
@@ -13,4 +13,5 @@ export let OxPropertyEditorWorkShift = class OxPropertyEditorWorkShift extends O
13
13
  OxPropertyEditorWorkShift = __decorate([
14
14
  customElement('ox-property-editor-work-shift')
15
15
  ], OxPropertyEditorWorkShift);
16
+ export { OxPropertyEditorWorkShift };
16
17
  //# sourceMappingURL=ox-property-editor-work-shift.js.map
@@ -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,WAAM,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,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"]}
@@ -140,6 +140,7 @@ OxPropertyEditor.styles = [
140
140
  ox-select,
141
141
  input:not([type='checkbox']) {
142
142
  border: 1px solid rgba(0, 0, 0, 0.2);
143
+ border-radius: 4px;
143
144
  }
144
145
 
145
146
  :host > legend {
@@ -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;;QAmH6B,eAAU,GAAgC,CAAC,CAAC,EAAE,CAAC,CAAC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AAO,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;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 }\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 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;;QAoH6B,eAAU,GAAgC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QA0ClE,YAAO,GAAG,KAAK,CAAA;IAmD1B,CAAC;IA9MQ,MAAM,CAAC,QAAQ,CAAC,KAAiC;QACtD,MAA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Ae;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;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 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"]}