@operato/app 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/src/grist-editor/ox-grist-editor-code.js +2 -1
- package/dist/src/grist-editor/ox-grist-editor-code.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-json.js +1 -0
- package/dist/src/grist-editor/ox-grist-editor-json.js.map +1 -1
- package/dist/src/grist-editor/ox-popup-code-input.d.ts +1 -0
- package/dist/src/grist-editor/ox-popup-code-input.js +6 -1
- package/dist/src/grist-editor/ox-popup-code-input.js.map +1 -1
- package/dist/src/property-editor/index.js +1 -0
- package/dist/src/property-editor/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/grist-editor/ox-grist-editor-code.ts +2 -1
- package/src/grist-editor/ox-grist-editor-json.ts +1 -0
- package/src/grist-editor/ox-popup-code-input.ts +3 -1
- package/src/property-editor/index.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [1.7.4](https://github.com/hatiolab/operato/compare/v1.7.3...v1.7.4) (2023-12-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* add language option into ox-input-code and relatives ([534bbf8](https://github.com/hatiolab/operato/commit/534bbf833a2089d5bd9586712e3f16b33476e626))
|
|
12
|
+
* add language option into ox-input-code and relatives ([c2efecd](https://github.com/hatiolab/operato/commit/c2efecd257aa2cf4bb1022989ab8954f47a75366))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### [1.7.3](https://github.com/hatiolab/operato/compare/v1.7.2...v1.7.3) (2023-12-11)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### :bug: Bug Fix
|
|
20
|
+
|
|
21
|
+
* add language option into ox-input-code and relatives ([1ee1c85](https://github.com/hatiolab/operato/commit/1ee1c85efa1f8a7d8c9dcabe6c17190159e43812))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
### [1.7.2](https://github.com/hatiolab/operato/compare/v1.7.1...v1.7.2) (2023-12-11)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @operato/app
|
|
@@ -22,7 +22,7 @@ let OxGristEditorCode = class OxGristEditorCode extends OxGristEditor {
|
|
|
22
22
|
}
|
|
23
23
|
showEditorPopup() {
|
|
24
24
|
var _a;
|
|
25
|
-
var { mode } = ((_a = this.column.record) === null || _a === void 0 ? void 0 : _a.options) || {};
|
|
25
|
+
var { mode, language = 'javascript' } = ((_a = this.column.record) === null || _a === void 0 ? void 0 : _a.options) || {};
|
|
26
26
|
var change = (value) => {
|
|
27
27
|
this.dispatchEvent(new CustomEvent('field-change', {
|
|
28
28
|
bubbles: true,
|
|
@@ -41,6 +41,7 @@ let OxGristEditorCode = class OxGristEditorCode extends OxGristEditor {
|
|
|
41
41
|
.value=${this.value}
|
|
42
42
|
mode=${mode}
|
|
43
43
|
.confirmCallback=${change.bind(this)}
|
|
44
|
+
language=${language}
|
|
44
45
|
></ox-popup-code-input>
|
|
45
46
|
`, {
|
|
46
47
|
backdrop: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-code.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-code.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAA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it/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\n\n@customElement('ox-grist-editor-code')\nexport class OxGristEditorCode extends OxGristEditor {\n get editorTemplate() {\n return html` <div tabindex=\"0\">${this.value || ''}</div> `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n var { mode, language = 'javascript' } = this.column.record?.options || {}\n\n var change = (value: string) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: value,\n column: this.column,\n record: this.record,\n row: this.row\n }\n })\n )\n }\n\n var popup = openPopup(\n html`\n <ox-popup-code-input\n .value=${this.value}\n mode=${mode}\n .confirmCallback=${change.bind(this)}\n language=${language}\n ></ox-popup-code-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.edit code'),\n help: 'data-grist/grist-editor/code'\n }\n )\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-json.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-json.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGpC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,aAAa;IAClD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,sBAAsB,IAAI,CAAC,KAAK,IAAI,EAAE,SAAS,CAAA;IAC5D,CAAC;IAED,QAAQ,CAAC,CAAQ;QACf,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,CAAC,eAAe,EAAE,CAAA;IACxB,CAAC;IAED,UAAU,CAAC,CAAgB;QACzB,MAAM,GAAG,GAAG,CAAC,CAAC,GAAG,CAAA;QACjB,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACnB,CAAC,CAAC,eAAe,EAAE,CAAA;YACnB,IAAI,CAAC,eAAe,EAAE,CAAA;QACxB,CAAC;IACH,CAAC;IAED,eAAe;QACb,IAAI,MAAM,GAAG,CAAC,KAAa,EAAE,EAAE;YAC7B,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,QAAQ,EAAE;gBACxB,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,KAAK;oBAClB,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI,KAAK,GAAG,SAAS,CACnB,IAAI,CAAA;;mBAES,IAAI,CAAC,KAAK;;oBAET,CAAC,CAAc,EAAE,EAAE;YAC3B,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACtB,KAAK,CAAC,KAAK,EAAE,CAAA;QACf,CAAC
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-json.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-json.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAA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QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC;YACnC,IAAI,EAAE,8BAA8B;SACrC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAtDY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAsD7B","sourcesContent":["import './ox-popup-code-input.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\nimport { i18next } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\n\n@customElement('ox-grist-editor-json')\nexport class OxGristEditorJson extends OxGristEditor {\n get editorTemplate() {\n return html` <div tabindex=\"0\">${this.value || ''}</div> `\n }\n\n _onclick(e: Event): void {\n e.stopPropagation()\n this.showEditorPopup()\n }\n\n _onkeydown(e: KeyboardEvent): void {\n const key = e.key\n if (key == 'Enter') {\n e.stopPropagation()\n this.showEditorPopup()\n }\n }\n\n showEditorPopup() {\n var change = (value: string) => {\n this.dispatchEvent(\n new CustomEvent('change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: value,\n column: this.column,\n record: this.record,\n row: this.row\n }\n })\n )\n }\n\n var popup = openPopup(\n html`\n <ox-popup-code-input\n .value=${this.value}\n mode=\"javascript\"\n @change=${(e: CustomEvent) => {\n change(e.detail.value)\n popup.close()\n }}\n lanugage=\"json\"\n ></ox-popup-code-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.edit json'),\n help: 'data-grist/grist-editor/json'\n }\n )\n }\n}\n"]}
|
|
@@ -9,10 +9,12 @@ let OxPopupCodeInput = class OxPopupCodeInput extends LitElement {
|
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.mode = 'javascript';
|
|
12
|
+
this.language = 'javascript';
|
|
12
13
|
}
|
|
13
14
|
render() {
|
|
14
15
|
return html `
|
|
15
|
-
<ox-input-code .value=${this.value}
|
|
16
|
+
<ox-input-code .value=${this.value} @change=${this.onChange.bind(this)} .language=${this.language}>
|
|
17
|
+
</ox-input-code>
|
|
16
18
|
|
|
17
19
|
<div class="button-container">
|
|
18
20
|
<mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
@@ -65,6 +67,9 @@ __decorate([
|
|
|
65
67
|
__decorate([
|
|
66
68
|
property({ type: Object })
|
|
67
69
|
], OxPopupCodeInput.prototype, "confirmCallback", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
property({ type: String })
|
|
72
|
+
], OxPopupCodeInput.prototype, "language", void 0);
|
|
68
73
|
OxPopupCodeInput = __decorate([
|
|
69
74
|
customElement('ox-popup-code-input')
|
|
70
75
|
], OxPopupCodeInput);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-code-input.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-code-input.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QA2BuB,SAAI,GAAW,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"ox-popup-code-input.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-code-input.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MA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AQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAA4B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDAAwC;AACvC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAiC;AA7BjD,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CAyD5B","sourcesContent":["import '@operato/input/ox-input-code.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-code-input')\nexport class OxPopupCodeInput extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n\n width: var(--overlay-center-normal-width, 50%);\n height: var(--overlay-center-normal-height, 50%);\n }\n\n ox-input-code {\n flex: 1;\n overflow-y: auto;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n }\n `\n ]\n\n @property({ type: Object }) value: any\n @property({ type: String }) mode: string = 'javascript'\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n @property({ type: String }) language?: string = 'javascript'\n\n render() {\n return html`\n <ox-input-code .value=${this.value} @change=${this.onChange.bind(this)} .language=${this.language}>\n </ox-input-code>\n\n <div class=\"button-container\">\n <mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>\n <mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>\n </div>\n `\n }\n\n private onChange(e: CustomEvent) {\n e.stopPropagation()\n\n this.value = e.detail\n }\n\n private onCancel(e: Event) {\n closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -47,6 +47,7 @@ OxPropertyEditor.register({
|
|
|
47
47
|
string: 'ox-property-editor-string',
|
|
48
48
|
textarea: 'ox-property-editor-textarea',
|
|
49
49
|
javascript: 'ox-property-editor-textarea',
|
|
50
|
+
script: 'ox-property-editor-textarea',
|
|
50
51
|
checkbox: 'ox-property-editor-checkbox',
|
|
51
52
|
boolean: 'ox-property-editor-checkbox',
|
|
52
53
|
select: 'ox-property-editor-select',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/property-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,sDAAsD,CAAA;AAC7D,OAAO,sDAAsD,CAAA;AAC7D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,4DAA4D,CAAA;AACnE,OAAO,yDAAyD,CAAA;AAChE,OAAO,uDAAuD,CAAA;AAC9D,OAAO,sDAAsD,CAAA;AAC7D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,qDAAqD,CAAA;AAC5D,OAAO,qDAAqD,CAAA;AAC5D,OAAO,sDAAsD,CAAA;AAC7D,OAAO,qDAAqD,CAAA;AAC5D,OAAO,yDAAyD,CAAA;AAChE,OAAO,wDAAwD,CAAA;AAC/D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,mEAAmE,CAAA;AAC1E,OAAO,sDAAsD,CAAA;AAC7D,OAAO,gEAAgE,CAAA;AACvE,OAAO,iEAAiE,CAAA;AACxE,OAAO,oEAAoE,CAAA;AAC3E,OAAO,yDAAyD,CAAA;AAChE,OAAO,sDAAsD,CAAA;AAC7D,OAAO,2DAA2D,CAAA;AAClE,OAAO,+DAA+D,CAAA;AACtE,OAAO,0DAA0D,CAAA;AACjE,OAAO,6DAA6D,CAAA;AACpE,OAAO,yDAAyD,CAAA;AAChE,OAAO,sDAAsD,CAAA;AAC7D,OAAO,qDAAqD,CAAA;AAC5D,OAAO,+DAA+D,CAAA;AACtE,OAAO,0DAA0D,CAAA;AACjE,OAAO,mDAAmD,CAAA;AAC1D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D,CAAC,CAAA","sourcesContent":["import '@operato/property-editor/ox-property-editor-3axis.js'\nimport '@operato/property-editor/ox-property-editor-3dish.js'\nimport '@operato/property-editor/ox-property-editor-legend.js'\nimport '@operato/property-editor/ox-property-editor-number.js'\nimport '@operato/property-editor/ox-property-editor-unit-number.js'\nimport '@operato/property-editor/ox-property-editor-password.js'\nimport '@operato/property-editor/ox-property-editor-action.js'\nimport '@operato/property-editor/ox-property-editor-angle.js'\nimport '@operato/property-editor/ox-property-editor-string.js'\nimport '@operato/property-editor/ox-property-editor-data.js'\nimport '@operato/property-editor/ox-property-editor-date.js'\nimport '@operato/property-editor/ox-property-editor-month.js'\nimport '@operato/property-editor/ox-property-editor-time.js'\nimport '@operato/property-editor/ox-property-editor-checkbox.js'\nimport '@operato/property-editor/ox-property-editor-options.js'\nimport '@operato/property-editor/ox-property-editor-select.js'\nimport '@operato/property-editor/ox-property-editor-scene-component-id.js'\nimport '@operato/property-editor/ox-property-editor-color.js'\nimport '@operato/property-editor/ox-property-editor-multiple-colors.js'\nimport '@operato/property-editor/ox-property-editor-solid-colorstops.js'\nimport '@operato/property-editor/ox-property-editor-gradient-colorstops.js'\nimport '@operato/property-editor/ox-property-editor-textarea.js'\nimport '@operato/property-editor/ox-property-editor-table.js'\nimport '@operato/property-editor/ox-property-editor-key-values.js'\nimport '@operato/property-editor/ox-property-editor-partition-keys.js'\nimport '@operato/property-editor/ox-property-editor-value-map.js'\nimport '@operato/property-editor/ox-property-editor-value-ranges.js'\nimport '@operato/property-editor/ox-property-editor-hashtags.js'\nimport '@operato/property-editor/ox-property-editor-image.js'\nimport '@operato/property-editor/ox-property-editor-file.js'\nimport '@operato/attachment/ox-property-editor-attachment-selector.js'\nimport '@operato/attachment/ox-property-editor-image-selector.js'\nimport '@operato/font/ox-property-editor-font-selector.js'\nimport './ox-property-editor-graphql.js'\nimport './ox-property-editor-resource-object.js'\n\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nOxPropertyEditor.register({\n '3axis': 'ox-property-editor-3axis',\n '3dish': 'ox-property-editor-3dish',\n legend: 'ox-property-editor-legend',\n number: 'ox-property-editor-number',\n 'unit-number': 'ox-property-editor-unit-number',\n slider: 'ox-property-editor-range',\n password: 'ox-property-editor-password',\n action: 'ox-property-editor-action',\n angle: 'ox-property-editor-angle',\n string: 'ox-property-editor-string',\n textarea: 'ox-property-editor-textarea',\n javascript: 'ox-property-editor-textarea',\n checkbox: 'ox-property-editor-checkbox',\n boolean: 'ox-property-editor-checkbox',\n select: 'ox-property-editor-select',\n date: 'ox-property-editor-date',\n month: 'ox-property-editor-month',\n time: 'ox-property-editor-time',\n options: 'ox-property-editor-options',\n data: 'ox-property-editor-data',\n file: 'ox-property-editor-file',\n image: 'ox-property-editor-image',\n 'range-input': 'ox-property-editor-range',\n 'attachment-selector': 'ox-property-editor-attachment-selector',\n 'gltf-selector': 'ox-property-editor-attachment-selector',\n 'image-selector': 'ox-property-editor-image-selector',\n color: 'ox-property-editor-color',\n 'solid-color-stops': 'ox-property-editor-solid-colorstops',\n 'gradient-color-stops': 'ox-property-editor-gradient-colorstops',\n 'multiple-color': 'ox-property-editor-multiple-colors',\n map: 'ox-property-editor-value-map',\n range: 'ox-property-editor-value-ranges',\n graphql: 'ox-property-editor-graphql',\n 'editor-table': 'ox-property-editor-table',\n 'id-input': 'ox-property-editor-scene-component-id',\n 'font-selector': 'ox-property-editor-font-selector',\n 'partition-keys': 'ox-property-editor-partion-keys',\n 'key-values': 'ox-property-editor-key-values',\n hashtags: 'ox-property-editor-hashtags',\n 'resource-object': 'ox-property-editor-resource-object'\n})\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/property-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,sDAAsD,CAAA;AAC7D,OAAO,sDAAsD,CAAA;AAC7D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,4DAA4D,CAAA;AACnE,OAAO,yDAAyD,CAAA;AA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,EAAE,6BAA6B;IACvC,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,2BAA2B;IACnC,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,0BAA0B;IACjC,IAAI,EAAE,yBAAyB;IAC/B,OAAO,EAAE,4BAA4B;IACrC,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,0BAA0B;IACjC,aAAa,EAAE,0BAA0B;IACzC,qBAAqB,EAAE,wCAAwC;IAC/D,eAAe,EAAE,wCAAwC;IACzD,gBAAgB,EAAE,mCAAmC;IACrD,KAAK,EAAE,0BAA0B;IACjC,mBAAmB,EAAE,qCAAqC;IAC1D,sBAAsB,EAAE,wCAAwC;IAChE,gBAAgB,EAAE,oCAAoC;IACtD,GAAG,EAAE,8BAA8B;IACnC,KAAK,EAAE,iCAAiC;IACxC,OAAO,EAAE,4BAA4B;IACrC,cAAc,EAAE,0BAA0B;IAC1C,UAAU,EAAE,uCAAuC;IACnD,eAAe,EAAE,kCAAkC;IACnD,gBAAgB,EAAE,iCAAiC;IACnD,YAAY,EAAE,+BAA+B;IAC7C,QAAQ,EAAE,6BAA6B;IACvC,iBAAiB,EAAE,oCAAoC;CACxD,CAAC,CAAA","sourcesContent":["import '@operato/property-editor/ox-property-editor-3axis.js'\nimport '@operato/property-editor/ox-property-editor-3dish.js'\nimport '@operato/property-editor/ox-property-editor-legend.js'\nimport '@operato/property-editor/ox-property-editor-number.js'\nimport '@operato/property-editor/ox-property-editor-unit-number.js'\nimport '@operato/property-editor/ox-property-editor-password.js'\nimport '@operato/property-editor/ox-property-editor-action.js'\nimport '@operato/property-editor/ox-property-editor-angle.js'\nimport '@operato/property-editor/ox-property-editor-string.js'\nimport '@operato/property-editor/ox-property-editor-data.js'\nimport '@operato/property-editor/ox-property-editor-date.js'\nimport '@operato/property-editor/ox-property-editor-month.js'\nimport '@operato/property-editor/ox-property-editor-time.js'\nimport '@operato/property-editor/ox-property-editor-checkbox.js'\nimport '@operato/property-editor/ox-property-editor-options.js'\nimport '@operato/property-editor/ox-property-editor-select.js'\nimport '@operato/property-editor/ox-property-editor-scene-component-id.js'\nimport '@operato/property-editor/ox-property-editor-color.js'\nimport '@operato/property-editor/ox-property-editor-multiple-colors.js'\nimport '@operato/property-editor/ox-property-editor-solid-colorstops.js'\nimport '@operato/property-editor/ox-property-editor-gradient-colorstops.js'\nimport '@operato/property-editor/ox-property-editor-textarea.js'\nimport '@operato/property-editor/ox-property-editor-table.js'\nimport '@operato/property-editor/ox-property-editor-key-values.js'\nimport '@operato/property-editor/ox-property-editor-partition-keys.js'\nimport '@operato/property-editor/ox-property-editor-value-map.js'\nimport '@operato/property-editor/ox-property-editor-value-ranges.js'\nimport '@operato/property-editor/ox-property-editor-hashtags.js'\nimport '@operato/property-editor/ox-property-editor-image.js'\nimport '@operato/property-editor/ox-property-editor-file.js'\nimport '@operato/attachment/ox-property-editor-attachment-selector.js'\nimport '@operato/attachment/ox-property-editor-image-selector.js'\nimport '@operato/font/ox-property-editor-font-selector.js'\nimport './ox-property-editor-graphql.js'\nimport './ox-property-editor-resource-object.js'\n\nimport { OxPropertyEditor } from '@operato/property-editor'\n\nOxPropertyEditor.register({\n '3axis': 'ox-property-editor-3axis',\n '3dish': 'ox-property-editor-3dish',\n legend: 'ox-property-editor-legend',\n number: 'ox-property-editor-number',\n 'unit-number': 'ox-property-editor-unit-number',\n slider: 'ox-property-editor-range',\n password: 'ox-property-editor-password',\n action: 'ox-property-editor-action',\n angle: 'ox-property-editor-angle',\n string: 'ox-property-editor-string',\n textarea: 'ox-property-editor-textarea',\n javascript: 'ox-property-editor-textarea',\n script: 'ox-property-editor-textarea',\n checkbox: 'ox-property-editor-checkbox',\n boolean: 'ox-property-editor-checkbox',\n select: 'ox-property-editor-select',\n date: 'ox-property-editor-date',\n month: 'ox-property-editor-month',\n time: 'ox-property-editor-time',\n options: 'ox-property-editor-options',\n data: 'ox-property-editor-data',\n file: 'ox-property-editor-file',\n image: 'ox-property-editor-image',\n 'range-input': 'ox-property-editor-range',\n 'attachment-selector': 'ox-property-editor-attachment-selector',\n 'gltf-selector': 'ox-property-editor-attachment-selector',\n 'image-selector': 'ox-property-editor-image-selector',\n color: 'ox-property-editor-color',\n 'solid-color-stops': 'ox-property-editor-solid-colorstops',\n 'gradient-color-stops': 'ox-property-editor-gradient-colorstops',\n 'multiple-color': 'ox-property-editor-multiple-colors',\n map: 'ox-property-editor-value-map',\n range: 'ox-property-editor-value-ranges',\n graphql: 'ox-property-editor-graphql',\n 'editor-table': 'ox-property-editor-table',\n 'id-input': 'ox-property-editor-scene-component-id',\n 'font-selector': 'ox-property-editor-font-selector',\n 'partition-keys': 'ox-property-editor-partion-keys',\n 'key-values': 'ox-property-editor-key-values',\n hashtags: 'ox-property-editor-hashtags',\n 'resource-object': 'ox-property-editor-resource-object'\n})\n"]}
|