@operato/app 1.0.0-alpha.29 → 1.0.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/src/grist-editor/index.js +6 -4
- package/dist/src/grist-editor/index.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-code.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-code.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-code.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-crontab.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-crontab.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-crontab.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-json.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-json.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-json.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-parameters.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-parameters.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-parameters.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-resource-code.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-resource-code.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-resource-code.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-resource-id.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-resource-id.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-resource-id.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-resource-object.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-value-map.d.ts +2 -2
- package/dist/src/grist-editor/ox-grist-editor-value-map.js +2 -2
- package/dist/src/grist-editor/ox-grist-editor-value-map.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-renderer-resource-object.d.ts +2 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-object.js +22 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-object.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js +1 -1
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -14
- package/src/grist-editor/index.ts +6 -4
- package/src/grist-editor/ox-grist-editor-code.ts +2 -2
- package/src/grist-editor/ox-grist-editor-crontab.ts +2 -2
- package/src/grist-editor/ox-grist-editor-json.ts +2 -2
- package/src/grist-editor/ox-grist-editor-parameters.ts +2 -2
- package/src/grist-editor/ox-grist-editor-partition-keys.ts +2 -2
- package/src/grist-editor/ox-grist-editor-resource-code.ts +2 -2
- package/src/grist-editor/ox-grist-editor-resource-id.ts +2 -2
- package/src/grist-editor/ox-grist-editor-resource-object.ts +2 -2
- package/src/grist-editor/ox-grist-editor-value-map.ts +2 -2
- package/src/grist-editor/ox-grist-renderer-resource-object.ts +25 -0
- package/src/grist-editor/ox-popup-partition-keys-input.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.0.0-alpha.31](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.30...v1.0.0-alpha.31) (2022-03-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :bug: Bug Fix
|
|
10
|
+
|
|
11
|
+
* ox-grist-renderer support class type renderer (refer ox-grist-renderer-progress) ([ad7c8e1](https://github.com/hatiolab/operato/commit/ad7c8e1b453d19af9daa13ae4eb7c2059d85dfbb))
|
|
12
|
+
* partition-keys related ui components ([c21b4d2](https://github.com/hatiolab/operato/commit/c21b4d292ca4a6d6b4bf774a570dbabd349528fc))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [1.0.0-alpha.30](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.29...v1.0.0-alpha.30) (2022-03-18)
|
|
17
|
+
|
|
18
|
+
**Note:** Version bump only for package @operato/app
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [1.0.0-alpha.29](https://github.com/hatiolab/operato/compare/v1.0.0-alpha.28...v1.0.0-alpha.29) (2022-03-17)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist';
|
|
2
2
|
import { OxGristEditorCrontab } from './ox-grist-editor-crontab.js';
|
|
3
3
|
import { OxGristEditorJson } from './ox-grist-editor-json.js';
|
|
4
4
|
import { OxGristEditorParameters } from './ox-grist-editor-parameters.js';
|
|
@@ -8,6 +8,7 @@ import { OxGristEditorResourceId } from './ox-grist-editor-resource-id.js';
|
|
|
8
8
|
import { OxGristEditorResourceObject } from './ox-grist-editor-resource-object.js';
|
|
9
9
|
import { OxGristEditorValueMap } from './ox-grist-editor-value-map.js';
|
|
10
10
|
import { OxGristRendererResourceId } from './ox-grist-renderer-resource-id.js';
|
|
11
|
+
import { OxGristRendererResourceObject } from './ox-grist-renderer-resource-object.js';
|
|
11
12
|
/* register grist renderer/editor for id */
|
|
12
13
|
registerEditor('resource-id', OxGristEditorResourceId);
|
|
13
14
|
registerEditor('resource-object', OxGristEditorResourceObject);
|
|
@@ -18,7 +19,8 @@ registerEditor('partition-keys', OxGristEditorPartitionKeys);
|
|
|
18
19
|
registerEditor('crontab', OxGristEditorCrontab);
|
|
19
20
|
registerEditor('json', OxGristEditorJson);
|
|
20
21
|
registerRenderer('resource-id', OxGristRendererResourceId);
|
|
21
|
-
registerRenderer('
|
|
22
|
-
registerRenderer('
|
|
23
|
-
registerRenderer('
|
|
22
|
+
registerRenderer('resource-object', OxGristRendererResourceObject);
|
|
23
|
+
registerRenderer('parameters', OxGristRendererJson5);
|
|
24
|
+
registerRenderer('value-map', OxGristRendererJson5);
|
|
25
|
+
registerRenderer('partition-keys', OxGristRendererJson5);
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/grist-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/grist-editor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAA;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAA;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAA;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAA;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAA;AAEtF,2CAA2C;AAC3C,cAAc,CAAC,aAAa,EAAE,uBAAuB,CAAC,CAAA;AACtD,cAAc,CAAC,iBAAiB,EAAE,2BAA2B,CAAC,CAAA;AAC9D,cAAc,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAA;AAC1D,cAAc,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;AACrD,cAAc,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAA;AAClD,cAAc,CAAC,gBAAgB,EAAE,0BAA0B,CAAC,CAAA;AAC5D,cAAc,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAA;AAC/C,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;AAEzC,gBAAgB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAA;AAC1D,gBAAgB,CAAC,iBAAiB,EAAE,6BAA6B,CAAC,CAAA;AAClE,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAA;AACpD,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAA;AACnD,gBAAgB,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAA","sourcesContent":["import { OxGristRendererJson5, registerEditor, registerRenderer } from '@operato/data-grist'\n\nimport { OxGristEditorCrontab } from './ox-grist-editor-crontab.js'\nimport { OxGristEditorJson } from './ox-grist-editor-json.js'\nimport { OxGristEditorParameters } from './ox-grist-editor-parameters.js'\nimport { OxGristEditorPartitionKeys } from './ox-grist-editor-partition-keys.js'\nimport { OxGristEditorResourceCode } from './ox-grist-editor-resource-code.js'\nimport { OxGristEditorResourceId } from './ox-grist-editor-resource-id.js'\nimport { OxGristEditorResourceObject } from './ox-grist-editor-resource-object.js'\nimport { OxGristEditorValueMap } from './ox-grist-editor-value-map.js'\nimport { OxGristRendererResourceId } from './ox-grist-renderer-resource-id.js'\nimport { OxGristRendererResourceObject } from './ox-grist-renderer-resource-object.js'\n\n/* register grist renderer/editor for id */\nregisterEditor('resource-id', OxGristEditorResourceId)\nregisterEditor('resource-object', OxGristEditorResourceObject)\nregisterEditor('resource-code', OxGristEditorResourceCode)\nregisterEditor('parameters', OxGristEditorParameters)\nregisterEditor('value-map', OxGristEditorValueMap)\nregisterEditor('partition-keys', OxGristEditorPartitionKeys)\nregisterEditor('crontab', OxGristEditorCrontab)\nregisterEditor('json', OxGristEditorJson)\n\nregisterRenderer('resource-id', OxGristRendererResourceId)\nregisterRenderer('resource-object', OxGristRendererResourceObject)\nregisterRenderer('parameters', OxGristRendererJson5)\nregisterRenderer('value-map', OxGristRendererJson5)\nregisterRenderer('partition-keys', OxGristRendererJson5)\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './ox-popup-code-input.js';
|
|
2
|
-
import {
|
|
3
|
-
export declare class OxGristEditorCode extends
|
|
2
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorCode extends OxGristEditor {
|
|
4
4
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
5
5
|
firstUpdated(): Promise<void>;
|
|
6
6
|
showEditorPopup(): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import './ox-popup-code-input.js';
|
|
3
|
-
import {
|
|
3
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
4
4
|
import { customElement } from 'lit/decorators.js';
|
|
5
5
|
import { html } from 'lit';
|
|
6
6
|
import { i18next } from '@operato/i18n';
|
|
7
7
|
import { openPopup } from '@operato/layout';
|
|
8
|
-
let OxGristEditorCode = class OxGristEditorCode extends
|
|
8
|
+
let OxGristEditorCode = class OxGristEditorCode extends OxGristEditor {
|
|
9
9
|
get editorTemplate() {
|
|
10
10
|
return html ` <input type="text" .value=${this.value || ''} /> `;
|
|
11
11
|
}
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-code.js","sourceRoot":"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CAAC,GAAG;iBACd;aACF,CAAC,CACH,CAAA;QACH,CAAC,CAAA;QAED,IAAI,KAAK,GAAG,SAAS,CACnB,IAAI,CAAA;;mBAES,IAAI,CAAC,KAAK;iBACZ,IAAI;oBACD,CAAC,CAAc,EAAE,EAAE;YAC3B,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACtB,KAAK,CAAC,KAAK,EAAE,CAAA;QACf,CAAC;;OAEJ,EACD;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YAC1C,IAAI,EAAE,8BAA8B;SACrC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAtDY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAsD7B;SAtDY,iBAAiB","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-code')\nexport class OxGristEditorCode extends OxGristEditor {\n get editorTemplate() {\n return html` <input type=\"text\" .value=${this.value || ''} /> `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.showEditorPopup()\n })\n\n this.showEditorPopup()\n }\n\n showEditorPopup() {\n var { mode } = this.column.record?.options || {}\n\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=${mode}\n @change=${(e: CustomEvent) => {\n change(e.detail.value)\n popup.close()\n }}\n ></ox-popup-code-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/code'\n }\n )\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './ox-popup-crontab-input.js';
|
|
2
|
-
import {
|
|
3
|
-
export declare class OxGristEditorCrontab extends
|
|
2
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorCrontab extends OxGristEditor {
|
|
4
4
|
private popup?;
|
|
5
5
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
firstUpdated(): Promise<void>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import './ox-popup-crontab-input.js';
|
|
3
3
|
import { openPopup } from '@operato/layout';
|
|
4
|
-
import {
|
|
4
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
5
5
|
import { customElement } from 'lit/decorators.js';
|
|
6
6
|
import { html } from 'lit';
|
|
7
7
|
import { i18next } from '@operato/i18n';
|
|
8
|
-
let OxGristEditorCrontab = class OxGristEditorCrontab extends
|
|
8
|
+
let OxGristEditorCrontab = class OxGristEditorCrontab extends OxGristEditor {
|
|
9
9
|
get editorTemplate() {
|
|
10
10
|
return html ` <input type="text" .value=${this.value || ''} /> `;
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-crontab.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-crontab.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-crontab.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-crontab.ts"],"names":[],"mappings":";AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,O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C,wBAAwB,CAAC;YAC1C,IAAI,EAAE,iCAAiC;SACxC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AAnDY,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAmDhC;SAnDY,oBAAoB","sourcesContent":["import './ox-popup-crontab-input.js'\n\nimport { PopupHandle, openPopup } from '@operato/layout'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { customElement } from 'lit/decorators.js'\nimport { html } from 'lit'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-grist-editor-crontab')\nexport class OxGristEditorCrontab extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n return html` <input type=\"text\" .value=${this.value || ''} /> `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.showEditorPopup()\n })\n\n this.showEditorPopup()\n }\n\n showEditorPopup() {\n if (this.popup) {\n delete this.popup\n }\n\n const confirmCallback = (newval: any) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n this.popup = openPopup(\n html`\n <ox-popup-crontab-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-crontab-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/crontab'\n }\n )\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './ox-popup-code-input.js';
|
|
2
|
-
import {
|
|
3
|
-
export declare class OxGristEditorJson extends
|
|
2
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorJson extends OxGristEditor {
|
|
4
4
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
5
5
|
firstUpdated(): Promise<void>;
|
|
6
6
|
showEditorPopup(): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import './ox-popup-code-input.js';
|
|
3
|
-
import {
|
|
3
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
4
4
|
import { customElement } from 'lit/decorators.js';
|
|
5
5
|
import { html } from 'lit';
|
|
6
6
|
import { i18next } from '@operato/i18n';
|
|
7
7
|
import { openPopup } from '@operato/layout';
|
|
8
|
-
let OxGristEditorJson = class OxGristEditorJson extends
|
|
8
|
+
let OxGristEditorJson = class OxGristEditorJson extends OxGristEditor {
|
|
9
9
|
get editorTemplate() {
|
|
10
10
|
return html ` <input type="text" .value=${this.value || ''} /> `;
|
|
11
11
|
}
|
|
@@ -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,
|
|
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;AAG3C,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,aAAa;IAClD,IAAI,cAAc;QAChB,OAAO,IAAI,CAAA,8BAA8B,IAAI,CAAC,KAAK,IAAI,EAAE,MAAM,CAAA;IACjE,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,cAAc,CAAA;QAEzB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;YAC5C,CAAC,CAAC,eAAe,EAAE,CAAA;YAEnB,IAAI,CAAC,eAAe,EAAE,CAAA;QACxB,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,eAAe,EAAE,CAAA;IACxB,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;;OAEJ,EACD;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,wBAAwB,CAAC;YAC1C,IAAI,EAAE,8BAA8B;SACrC,CACF,CAAA;IACH,CAAC;CACF,CAAA;AApDY,iBAAiB;IAD7B,aAAa,CAAC,sBAAsB,CAAC;GACzB,iBAAiB,CAoD7B;SApDY,iBAAiB","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` <input type=\"text\" .value=${this.value || ''} /> `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.showEditorPopup()\n })\n\n this.showEditorPopup()\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 ></ox-popup-code-input>\n `,\n {\n backdrop: true,\n title: i18next.t('title.setting schedule'),\n help: 'data-grist/grist-editor/code'\n }\n )\n }\n}\n"]}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import './ox-parameters-builder.js';
|
|
5
5
|
import './ox-popup-parameters-builder.js';
|
|
6
|
-
import {
|
|
7
|
-
export declare class OxGristEditorParameters extends
|
|
6
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
7
|
+
export declare class OxGristEditorParameters extends OxGristEditor {
|
|
8
8
|
private popup?;
|
|
9
9
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
10
10
|
firstUpdated(): Promise<void>;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
import { __decorate } from "tslib";
|
|
5
5
|
import './ox-parameters-builder.js';
|
|
6
6
|
import './ox-popup-parameters-builder.js';
|
|
7
|
-
import {
|
|
7
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
8
8
|
import { openPopup } from '@operato/layout';
|
|
9
9
|
import { html } from 'lit';
|
|
10
10
|
import { cloneDeep } from 'lodash-es';
|
|
11
11
|
import { customElement } from 'lit/decorators.js';
|
|
12
12
|
import { i18next } from '@operato/i18n';
|
|
13
|
-
let OxGristEditorParameters = class OxGristEditorParameters extends
|
|
13
|
+
let OxGristEditorParameters = class OxGristEditorParameters extends OxGristEditor {
|
|
14
14
|
get editorTemplate() {
|
|
15
15
|
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
16
16
|
return html ` ${value || ''} `;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-parameters.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-parameters.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAA6B,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-parameters.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-parameters.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,4BAA4B,CAAA;AACnC,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAA6B,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAO,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,aAAa;IAGxD,IAAI,cAAc;QAChB,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QACtF,OAAO,IAAI,CAAA,IAAI,KAAK,IAAI,EAAE,GAAG,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,cAAc,CAAA;QAEzB,IAAI,CAAC,U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AC,WAAW,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;SACxG;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,KAAK,GAAQ,EAAE,CAAA;SACpB;QAED;;;;;;;UAOE;QACF,IAAI,QAAQ,GAAG,IAAI,CAAA;;iBAEN,KAAK;iBACL,IAAI;gBACL,IAAI,CAAC,MAAM;mBACR,OAAO;2BACC,eAAe;;;KAGrC,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE;YAClE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAlFY,uBAAuB;IADnC,aAAa,CAAC,4BAA4B,CAAC;GAC/B,uBAAuB,CAkFnC;SAlFY,uBAAuB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-parameters-builder.js'\nimport './ox-popup-parameters-builder.js'\n\nimport { ColumnConfig, GristRecord, OxGristEditor } from '@operato/data-grist'\nimport { PopupHandle, openPopup } from '@operato/layout'\nimport { css, html } from 'lit'\n\nimport { cloneDeep } from 'lodash-es'\nimport { customElement } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-grist-editor-parameters')\nexport class OxGristEditorParameters extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value\n return html` ${value || ''} `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.openSelector()\n })\n\n this.openSelector()\n }\n\n async openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n var { options } = this.column.record\n\n if (typeof options === 'function') {\n options = await options.call(this, this.value, this.column, this.record, this.row, this.field)\n }\n\n const { name, help, spec, context, objectified = false } = options\n\n const confirmCallback = (newval: any) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: !objectified ? JSON.stringify(newval) : newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n try {\n var value: any =\n !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {})\n } catch (e) {\n var value: any = {}\n }\n\n /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n */\n var template = html`\n <ox-popup-parameters-builder\n .value=${value}\n .props=${spec}\n .host=${this.record}\n .context=${context}\n .confirmCallback=${confirmCallback}\n >\n </ox-popup-parameters-builder>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || ''} ${i18next.t('field.params')}`,\n help\n })\n }\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import './ox-popup-partition-keys-input.js';
|
|
5
|
-
import {
|
|
6
|
-
export declare class OxGristEditorPartitionKeys extends
|
|
5
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
+
export declare class OxGristEditorPartitionKeys extends OxGristEditor {
|
|
7
7
|
private popup?;
|
|
8
8
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
9
9
|
firstUpdated(): Promise<void>;
|
|
@@ -5,11 +5,11 @@ import { __decorate } from "tslib";
|
|
|
5
5
|
import './ox-popup-partition-keys-input.js';
|
|
6
6
|
import { openPopup } from '@operato/layout';
|
|
7
7
|
import { customElement } from 'lit/decorators.js';
|
|
8
|
-
import {
|
|
8
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
9
9
|
import { cloneDeep } from 'lodash-es';
|
|
10
10
|
import { html } from 'lit';
|
|
11
11
|
import { i18next } from '@operato/i18n';
|
|
12
|
-
let OxGristEditorPartitionKeys = class OxGristEditorPartitionKeys extends
|
|
12
|
+
let OxGristEditorPartitionKeys = class OxGristEditorPartitionKeys extends OxGristEditor {
|
|
13
13
|
get editorTemplate() {
|
|
14
14
|
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
15
15
|
return html ` ${value || ''} `;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-partition-keys.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-partition-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAY,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-partition-keys.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-partition-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,aAA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;gBACd,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,KAAK;oBAClB,KAAK,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM;oBACrD,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;YACF,IAAI,KAAK,GACP,CAAC,WAAW,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;SACxG;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,KAAK,GAAQ,EAAE,CAAA;SACpB;QAED;;;;;;;UAOE;QACF,IAAI,QAAQ,GAAG,IAAI,CAAA;8CACuB,KAAK,qBAAqB,eAAe;;KAElF,CAAA;QAED,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE;YAC/B,QAAQ,EAAE,IAAI;YACd,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,EAAE,KAAI,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,GAAG;YACrE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAtEY,0BAA0B;IADtC,aAAa,CAAC,gCAAgC,CAAC;GACnC,0BAA0B,CAsEtC;SAtEY,0BAA0B","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-popup-partition-keys-input.js'\n\nimport { PopupHandle, openPopup } from '@operato/layout'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { cloneDeep } from 'lodash-es'\nimport { html } from 'lit'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-grist-editor-partition-keys')\nexport class OxGristEditorPartitionKeys extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value\n return html` ${value || ''} `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.openSelector()\n })\n\n this.openSelector()\n }\n\n async openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n const { name, help, objectified = false } = this.column.record?.options || {}\n\n const confirmCallback = (newval: any) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: !objectified ? JSON.stringify(newval) : newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n try {\n var value: any =\n !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {})\n } catch (e) {\n var value: any = {}\n }\n\n /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n */\n var template = html`\n <ox-popup-partition-keys-input .value=${value} .confirmCallback=${confirmCallback}>\n </ox-popup-partition-keys-input>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || i18next.t('field.partition-keys')} `,\n help\n })\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@material/mwc-icon';
|
|
2
|
-
import {
|
|
3
|
-
export declare class OxGristEditorResourceCode extends
|
|
2
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
3
|
+
export declare class OxGristEditorResourceCode extends OxGristEditor {
|
|
4
4
|
firstUpdated(): Promise<void>;
|
|
5
5
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import '@material/mwc-icon';
|
|
3
|
-
import {
|
|
3
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
4
4
|
import { client, gqlContext } from '@operato/graphql';
|
|
5
5
|
import { customElement } from 'lit/decorators.js';
|
|
6
6
|
import gql from 'graphql-tag';
|
|
@@ -16,7 +16,7 @@ const FETCH_COMMON_CODE_GQL = (codeName) => gql `
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
`;
|
|
19
|
-
let OxGristEditorResourceCode = class OxGristEditorResourceCode extends
|
|
19
|
+
let OxGristEditorResourceCode = class OxGristEditorResourceCode extends OxGristEditor {
|
|
20
20
|
async firstUpdated() {
|
|
21
21
|
super.firstUpdated();
|
|
22
22
|
var { codeName, codes } = this.column.record || {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-resource-code.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-resource-code.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-resource-code.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-resource-code.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAE3B,OAAO,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAA;AACjE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAk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C,MAAM,IAAI,EAAE,CAAA;QAExC,OAAO,IAAI,CAAA;;UAEL,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CACnB,CAAC,IAAgB,EAAE,EAAE,CAAC,IAAI,CAAA;gCACJ,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,UAAU,IAAI,CAAC,IAAI;gBAC1D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;;WAEjE,CACF;;KAEJ,CAAA;IACH,CAAC;CACF,CAAA;AA1CY,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CA0CrC;SA1CY,yBAAyB","sourcesContent":["import '@material/mwc-icon'\n\nimport { OxGristEditor, RecordConfig } from '@operato/data-grist'\nimport { client, gqlContext } from '@operato/graphql'\n\nimport { customElement } from 'lit/decorators.js'\nimport gql from 'graphql-tag'\nimport { html } from 'lit'\n\ntype CommonCodeDetail = {\n name: string\n description: string\n rank: number\n}\n\ntype CommonCode = {\n name: string\n description: string\n details: CommonCodeDetail[]\n}\n\nconst FETCH_COMMON_CODE_GQL = (codeName: string) => gql`\n{\n commonCode(name: \"${codeName}\") {\n details {\n name\n description\n rank\n }\n }\n}\n`\n\n@customElement('ox-grist-editor-resource-code')\nexport class OxGristEditorResourceCode extends OxGristEditor {\n async firstUpdated() {\n super.firstUpdated()\n\n var { codeName, codes } = this.column.record || {}\n\n if (!codes && codeName) {\n /* codeName으로 fetch 해와서, this.column.record.codes에 보관한다. */\n var response = await client.query({\n query: FETCH_COMMON_CODE_GQL(codeName),\n context: gqlContext()\n })\n\n var commonCode = response && response.data && response.data.commonCode\n\n if (commonCode) {\n this.column.record.codes = [{ name: '', description: '' }].concat(\n commonCode.details.sort(function (a: CommonCodeDetail, b: CommonCodeDetail) {\n return a.rank - b.rank\n })\n )\n\n this.requestUpdate()\n }\n }\n }\n\n get editorTemplate() {\n var { codes } = this.column.record || {}\n\n return html`\n <select>\n ${(codes || ['']).map(\n (code: CommonCode) => html`\n <option ?selected=${code.name == this.value} value=${code.name}>\n ${code.name}${code.description ? ` - ${code.description}` : ''}\n </option>\n `\n )}\n </select>\n `\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@material/mwc-icon';
|
|
2
2
|
import './ox-selector-resource-id.js';
|
|
3
|
-
import {
|
|
3
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
4
4
|
import { TemplateResult } from 'lit';
|
|
5
|
-
export declare class OxGristEditorResourceId extends
|
|
5
|
+
export declare class OxGristEditorResourceId extends OxGristEditor {
|
|
6
6
|
private popup?;
|
|
7
7
|
render(): TemplateResult<1>;
|
|
8
8
|
firstUpdated(): Promise<void>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import '@material/mwc-icon';
|
|
3
3
|
import './ox-selector-resource-id.js';
|
|
4
|
-
import {
|
|
4
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
5
5
|
import { openPopup } from '@operato/layout';
|
|
6
6
|
import { html } from 'lit';
|
|
7
7
|
import { customElement } from 'lit/decorators.js';
|
|
8
|
-
let OxGristEditorResourceId = class OxGristEditorResourceId extends
|
|
8
|
+
let OxGristEditorResourceId = class OxGristEditorResourceId extends OxGristEditor {
|
|
9
9
|
render() {
|
|
10
10
|
var { nameField = 'name', descriptionField = 'description' } = this.column.record.options || {};
|
|
11
11
|
var value = this.value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-resource-id.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-resource-id.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAe,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-resource-id.js","sourceRoot":"","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sourcesContent":["import '@material/mwc-icon'\nimport './ox-selector-resource-id.js'\n\nimport { GristRecord, OxGristEditor } from '@operato/data-grist'\nimport { PopupHandle, openPopup } from '@operato/layout'\nimport { TemplateResult, html } from 'lit'\n\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('ox-input-resource-id')\nexport class OxGristEditorResourceId extends OxGristEditor {\n private popup?: PopupHandle\n\n render() {\n var { nameField = 'name', descriptionField = 'description' } = this.column.record.options || {}\n var value = this.value\n\n return html`\n ${!value ? html`` : html` <span>${value[nameField]} (${value[descriptionField]})</span> `}\n <mwc-icon>arrow_drop_down</mwc-icon>\n `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.openSelector()\n })\n\n this.openSelector()\n }\n\n openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n const confirmCallback: (record: GristRecord | undefined) => void = selected => {\n if (!selected) {\n return\n }\n\n var { idField = 'id', nameField = 'name', descriptionField = 'description' } = this.column.record.options || {}\n\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: {\n [idField]: selected[idField],\n [nameField]: selected[nameField],\n [descriptionField]: selected[descriptionField]\n },\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n var value = this.value || {}\n var template = html`\n <ox-selector-resource-id\n .value=${value.id}\n .confirmCallback=${confirmCallback.bind(this)}\n .queryName=${this.column.record.options.queryName}\n .basicArgs=${this.column.record.options.basicArgs}\n ></ox-selector-resource-id>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: 'select item'\n })\n }\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@material/mwc-icon';
|
|
2
2
|
import './ox-selector-resource-object.js';
|
|
3
3
|
import { TemplateResult } from 'lit';
|
|
4
|
-
import {
|
|
5
|
-
export declare class OxGristEditorResourceObject extends
|
|
4
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
5
|
+
export declare class OxGristEditorResourceObject extends OxGristEditor {
|
|
6
6
|
private popup?;
|
|
7
7
|
private template?;
|
|
8
8
|
get editorTemplate(): TemplateResult<1>;
|
|
@@ -3,10 +3,10 @@ import '@material/mwc-icon';
|
|
|
3
3
|
import './ox-selector-resource-object.js';
|
|
4
4
|
import { openPopup } from '@operato/layout';
|
|
5
5
|
import { html } from 'lit';
|
|
6
|
-
import {
|
|
6
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
7
7
|
import { customElement } from 'lit/decorators.js';
|
|
8
8
|
import { i18next } from '@operato/i18n';
|
|
9
|
-
let OxGristEditorResourceObject = class OxGristEditorResourceObject extends
|
|
9
|
+
let OxGristEditorResourceObject = class OxGristEditorResourceObject extends OxGristEditor {
|
|
10
10
|
get editorTemplate() {
|
|
11
11
|
var value = this.value || {};
|
|
12
12
|
var { nameField = 'name', descriptionField = 'description' } = this.column.record.options || {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-resource-object.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-resource-object.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-resource-object.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-resource-object.ts"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAA;AAC3B,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAuB,IAAI,EAAE,MAAM,KAAK,CAAA;AAE/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,a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ato/layout'\nimport { TemplateResult, css, html } from 'lit'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { customElement } from 'lit/decorators.js'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-grist-editor-resource-object')\nexport class OxGristEditorResourceObject extends OxGristEditor {\n private popup?: PopupHandle\n private template?: TemplateResult\n\n get editorTemplate() {\n var value = this.value || {}\n\n var { nameField = 'name', descriptionField = 'description' } = this.column.record.options || {}\n var name, description\n if (typeof nameField === 'function') {\n name = nameField(value)\n } else {\n name = value[nameField]\n }\n\n if (typeof descriptionField === 'function') {\n description = descriptionField(value)\n } else {\n description = value[descriptionField] && `(${value[descriptionField]})`\n }\n\n return html`\n ${!value ? html`` : html` <span>${name || ''}${description || ''}</span> `}\n <mwc-icon>arrow_drop_down</mwc-icon>\n `\n }\n\n async firstUpdated() {\n this.template = ((this.column.record || {}).options || {}).template\n\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.openSelector()\n })\n\n this.openSelector()\n }\n\n openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n const confirmCallback = (selected: { [field: string]: any }) => {\n var { idField = 'id', nameField = 'name', descriptionField = 'description' } = this.column.record.options || {}\n\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: {\n ...(this.column.record.options.select || [])\n .map((field: any) => field.name)\n .reduce((obj: { [field: string]: any }, fieldName: string) => {\n return (obj = {\n ...obj,\n [fieldName]: selected[fieldName]\n })\n }, {} as { [field: string]: any }),\n [idField]: selected[idField],\n [nameField]: selected[nameField],\n [descriptionField]: selected[descriptionField]\n },\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n var value = this.value || {}\n var valueField: string | ((item: any) => any) = this.column.record.options.valueField || 'id'\n var actualValue\n if (typeof valueField === 'function') {\n actualValue = valueField(value)\n } else {\n actualValue = value[valueField]\n }\n\n var template =\n this.template ||\n html`\n <ox-selector-resource-object\n .value=${actualValue}\n .confirmCallback=${confirmCallback.bind(this)}\n .queryName=${this.column.record.options.queryName}\n .select=${this.column.record.options.select}\n .list=${this.column.record.options.list}\n .basicArgs=${this.column.record.options.basicArgs}\n .valueField=${this.column.record.options.valueField}\n ></ox-selector-resource-object>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.select_item')\n })\n }\n}\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
import './ox-popup-value-map-input.js';
|
|
5
|
-
import {
|
|
6
|
-
export declare class OxGristEditorValueMap extends
|
|
5
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
+
export declare class OxGristEditorValueMap extends OxGristEditor {
|
|
7
7
|
private popup?;
|
|
8
8
|
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
9
9
|
firstUpdated(): Promise<void>;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { __decorate } from "tslib";
|
|
5
5
|
import './ox-popup-value-map-input.js';
|
|
6
|
-
import {
|
|
6
|
+
import { OxGristEditor } from '@operato/data-grist';
|
|
7
7
|
import { openPopup } from '@operato/layout';
|
|
8
8
|
import { html } from 'lit';
|
|
9
9
|
import { customElement } from 'lit/decorators.js';
|
|
10
10
|
import { cloneDeep } from 'lodash-es';
|
|
11
11
|
import { i18next } from '@operato/i18n';
|
|
12
|
-
let OxGristEditorValueMap = class OxGristEditorValueMap extends
|
|
12
|
+
let OxGristEditorValueMap = class OxGristEditorValueMap extends OxGristEditor {
|
|
13
13
|
get editorTemplate() {
|
|
14
14
|
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
15
15
|
return html ` ${value || ''} `;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-editor-value-map.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-value-map.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAA6B,
|
|
1
|
+
{"version":3,"file":"ox-grist-editor-value-map.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-editor-value-map.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,+BAA+B,CAAA;AAEtC,OAAO,EAA6B,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9E,OAAO,EAAe,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAO,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAY,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,aAAa;IAGtD,IAAI,cAAc;QAChB,MAAM,KAAK,GAAG,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QACtF,OAAO,IAAI,CAAA,IAAI,KAAK,IAAI,EAAE,GAAG,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,cAAc,CAAA;QAEzB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;YAC5C,CAAC,CAAC,eAAe,EAAE,CAAA;YAEnB,IAAI,CAAC,YAAY,EAAE,CAAA;QACrB,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IAED,KAAK,CAAC,YAAY;;QAChB,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,OAAO,IAAI,CAAC,KAAK,CAAA;SAClB;Q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,EAAE,KAAI,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAG;YAChE,IAAI;SACL,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAtEY,qBAAqB;IADjC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,qBAAqB,CAsEjC;SAtEY,qBAAqB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport './ox-popup-value-map-input.js'\n\nimport { ColumnConfig, GristRecord, OxGristEditor } from '@operato/data-grist'\nimport { PopupHandle, openPopup } from '@operato/layout'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { cloneDeep } from 'lodash-es'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-grist-editor-value-map')\nexport class OxGristEditorValueMap extends OxGristEditor {\n private popup?: PopupHandle\n\n get editorTemplate() {\n const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value\n return html` ${value || ''} `\n }\n\n async firstUpdated() {\n await this.updateComplete\n\n this.renderRoot.addEventListener('click', e => {\n e.stopPropagation()\n\n this.openSelector()\n })\n\n this.openSelector()\n }\n\n async openSelector() {\n if (this.popup) {\n delete this.popup\n }\n\n const { name, help, valuetype = 'string', objectified = false } = this.column.record?.options || {}\n\n const confirmCallback = (newval: any) => {\n this.dispatchEvent(\n new CustomEvent('field-change', {\n bubbles: true,\n composed: true,\n detail: {\n before: this.value,\n after: !objectified ? JSON.stringify(newval) : newval,\n record: this.record,\n column: this.column,\n row: this.row\n }\n })\n )\n }\n\n try {\n var value: any =\n !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {})\n } catch (e) {\n var value: any = {}\n }\n\n /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n */\n var template = html`\n <ox-popup-value-map-input .value=${value} .valuetype=${valuetype} .confirmCallback=${confirmCallback}>\n </ox-popup-value-map-input>\n `\n\n this.popup = openPopup(template, {\n backdrop: true,\n size: 'large',\n title: `${name?.toUpperCase() || i18next.t('field.value-map')} `,\n help\n })\n }\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { html } from 'lit-html';
|
|
2
|
+
export const OxGristRendererResourceObject = (value, column, record, rowIndex, field) => {
|
|
3
|
+
if (!value) {
|
|
4
|
+
return '';
|
|
5
|
+
}
|
|
6
|
+
var { nameField = 'name', descriptionField = 'description' } = column.record.options || {};
|
|
7
|
+
var name, description;
|
|
8
|
+
if (typeof nameField === 'function') {
|
|
9
|
+
name = nameField(value);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
name = value[nameField];
|
|
13
|
+
}
|
|
14
|
+
if (typeof descriptionField === 'function') {
|
|
15
|
+
description = descriptionField(value);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
description = value[descriptionField] && `(${value[descriptionField]})`;
|
|
19
|
+
}
|
|
20
|
+
return html ` ${name || ''}${description || ''} `;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=ox-grist-renderer-resource-object.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-grist-renderer-resource-object.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-grist-renderer-resource-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,MAAM,CAAC,MAAM,6BAA6B,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IACrG,IAAI,CAAC,KAAK,EAAE;QACV,OAAO,EAAE,CAAA;KACV;IAED,IAAI,EAAE,SAAS,GAAG,MAAM,EAAE,gBAAgB,GAAG,aAAa,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAA;IAC1F,IAAI,IAAI,EAAE,WAAW,CAAA;IAErB,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE;QACnC,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;KACxB;SAAM;QACL,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAA;KACxB;IAED,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;QAC1C,WAAW,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAA;KACtC;SAAM;QACL,WAAW,GAAG,KAAK,CAAC,gBAAgB,CAAC,IAAI,IAAI,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAA;KACxE;IAED,OAAO,IAAI,CAAA,IAAI,IAAI,IAAI,EAAE,GAAG,WAAW,IAAI,EAAE,GAAG,CAAA;AAClD,CAAC,CAAA","sourcesContent":["import { FieldRenderer } from '@operato/data-grist'\nimport { html } from 'lit-html'\n\nexport const OxGristRendererResourceObject: FieldRenderer = (value, column, record, rowIndex, field) => {\n if (!value) {\n return ''\n }\n\n var { nameField = 'name', descriptionField = 'description' } = column.record.options || {}\n var name, description\n\n if (typeof nameField === 'function') {\n name = nameField(value)\n } else {\n name = value[nameField]\n }\n\n if (typeof descriptionField === 'function') {\n description = descriptionField(value)\n } else {\n description = value[descriptionField] && `(${value[descriptionField]})`\n }\n\n return html` ${name || ''}${description || ''} `\n}\n"]}
|
|
@@ -32,7 +32,7 @@ let OxPopupPartitionKeysInput = class OxPopupPartitionKeysInput extends LitEleme
|
|
|
32
32
|
=>
|
|
33
33
|
이런 이유로, Object.assign(...)을 사용하였다.
|
|
34
34
|
*/
|
|
35
|
-
if (!this.value) {
|
|
35
|
+
if (!this.value || typeof this.value !== 'object') {
|
|
36
36
|
this.value = {};
|
|
37
37
|
}
|
|
38
38
|
for (let key in this.value) {
|