@operato/app 1.0.0-beta.7 → 1.0.0
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 +377 -0
- package/demo/data-grist-test.html +1 -1
- package/dist/src/filters-form/filter-resource-select.d.ts +4 -0
- package/dist/src/filters-form/filter-resource-select.js +78 -0
- package/dist/src/filters-form/filter-resource-select.js.map +1 -0
- package/dist/src/filters-form/index.d.ts +1 -0
- package/dist/src/filters-form/index.js +5 -0
- package/dist/src/filters-form/index.js.map +1 -0
- package/dist/src/grist-editor/index.js +1 -9
- package/dist/src/grist-editor/index.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-resource-object.d.ts +0 -1
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js +7 -12
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js +3 -3
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js +5 -2
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js.map +1 -1
- package/dist/src/grist-editor/ox-popup-code-input.js +5 -4
- package/dist/src/grist-editor/ox-popup-code-input.js.map +1 -1
- package/dist/src/grist-editor/ox-selector-resource-id.js +4 -3
- package/dist/src/grist-editor/ox-selector-resource-id.js.map +1 -1
- package/dist/src/grist-editor/ox-selector-resource-object.js +5 -3
- package/dist/src/grist-editor/ox-selector-resource-object.js.map +1 -1
- package/dist/src/input/ox-input-background-pattern.d.ts +3 -0
- package/dist/src/input/ox-input-background-pattern.js +35 -7
- package/dist/src/input/ox-input-background-pattern.js.map +1 -1
- package/dist/src/input/ox-input-fill-style.d.ts +4 -2
- package/dist/src/input/ox-input-fill-style.js +13 -7
- package/dist/src/input/ox-input-fill-style.js.map +1 -1
- package/dist/src/input/ox-input-graphql.d.ts +1 -1
- package/dist/src/input/ox-input-graphql.js +7 -7
- package/dist/src/input/ox-input-graphql.js.map +1 -1
- package/dist/src/property-editor/index.d.ts +2 -1
- package/dist/src/property-editor/index.js +5 -2
- package/dist/src/property-editor/index.js.map +1 -1
- package/dist/src/property-editor/ox-property-editor-graphql.d.ts +2 -2
- package/dist/src/property-editor/ox-property-editor-graphql.js +4 -4
- package/dist/src/property-editor/ox-property-editor-graphql.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -30
- package/src/filters-form/filter-resource-select.ts +94 -0
- package/src/filters-form/index.ts +6 -0
- package/src/grist-editor/index.ts +1 -9
- package/src/grist-editor/ox-grist-editor-resource-object.ts +17 -13
- package/src/grist-editor/ox-grist-renderer-crontab.ts +5 -4
- package/src/grist-editor/ox-grist-renderer-resource-id.ts +6 -2
- package/src/grist-editor/ox-popup-code-input.ts +5 -4
- package/src/grist-editor/ox-selector-resource-id.ts +4 -3
- package/src/grist-editor/ox-selector-resource-object.ts +5 -3
- package/src/input/ox-input-background-pattern.ts +37 -7
- package/src/input/ox-input-fill-style.ts +18 -8
- package/src/input/ox-input-graphql.ts +8 -8
- package/src/property-editor/index.ts +5 -2
- package/src/property-editor/ox-property-editor-graphql.ts +5 -4
- package/dist/src/grist-editor/ox-grist-editor-crontab.d.ts +0 -8
- package/dist/src/grist-editor/ox-grist-editor-crontab.js +0 -50
- package/dist/src/grist-editor/ox-grist-editor-crontab.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-parameters.d.ts +0 -12
- package/dist/src/grist-editor/ox-grist-editor-parameters.js +0 -84
- package/dist/src/grist-editor/ox-grist-editor-parameters.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.d.ts +0 -11
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js +0 -74
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-value-map.d.ts +0 -11
- package/dist/src/grist-editor/ox-grist-editor-value-map.js +0 -74
- package/dist/src/grist-editor/ox-grist-editor-value-map.js.map +0 -1
- package/dist/src/grist-editor/ox-parameters-builder.d.ts +0 -4
- package/dist/src/grist-editor/ox-parameters-builder.js +0 -118
- package/dist/src/grist-editor/ox-parameters-builder.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-crontab-input.d.ts +0 -11
- package/dist/src/grist-editor/ox-popup-crontab-input.js +0 -74
- package/dist/src/grist-editor/ox-popup-crontab-input.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-parameters-builder.d.ts +0 -13
- package/dist/src/grist-editor/ox-popup-parameters-builder.js +0 -111
- package/dist/src/grist-editor/ox-popup-parameters-builder.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-partition-keys-input.d.ts +0 -12
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js +0 -98
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-value-map-input.d.ts +0 -12
- package/dist/src/grist-editor/ox-popup-value-map-input.js +0 -104
- package/dist/src/grist-editor/ox-popup-value-map-input.js.map +0 -1
- package/src/grist-editor/ox-grist-editor-crontab.ts +0 -62
- package/src/grist-editor/ox-grist-editor-parameters.ts +0 -99
- package/src/grist-editor/ox-grist-editor-partition-keys.ts +0 -86
- package/src/grist-editor/ox-grist-editor-value-map.ts +0 -86
- package/src/grist-editor/ox-parameters-builder.ts +0 -128
- package/src/grist-editor/ox-popup-crontab-input.ts +0 -74
- package/src/grist-editor/ox-popup-parameters-builder.ts +0 -106
- package/src/grist-editor/ox-popup-partition-keys-input.ts +0 -95
- package/src/grist-editor/ox-popup-value-map-input.ts +0 -101
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import './ox-popup-crontab-input.js';
|
|
2
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
3
|
-
export declare class OxGristEditorCrontab extends OxGristEditor {
|
|
4
|
-
private popup?;
|
|
5
|
-
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
6
|
-
firstUpdated(): Promise<void>;
|
|
7
|
-
showEditorPopup(): void;
|
|
8
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import './ox-popup-crontab-input.js';
|
|
3
|
-
import { html } from 'lit';
|
|
4
|
-
import { customElement } from 'lit/decorators.js';
|
|
5
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
-
import { i18next } from '@operato/i18n';
|
|
7
|
-
import { openPopup } from '@operato/layout';
|
|
8
|
-
let OxGristEditorCrontab = class OxGristEditorCrontab extends OxGristEditor {
|
|
9
|
-
get editorTemplate() {
|
|
10
|
-
return html ` <input type="text" .value=${this.value || ''} /> `;
|
|
11
|
-
}
|
|
12
|
-
async firstUpdated() {
|
|
13
|
-
await this.updateComplete;
|
|
14
|
-
this.renderRoot.addEventListener('click', e => {
|
|
15
|
-
e.stopPropagation();
|
|
16
|
-
this.showEditorPopup();
|
|
17
|
-
});
|
|
18
|
-
this.showEditorPopup();
|
|
19
|
-
}
|
|
20
|
-
showEditorPopup() {
|
|
21
|
-
if (this.popup) {
|
|
22
|
-
delete this.popup;
|
|
23
|
-
}
|
|
24
|
-
const confirmCallback = (newval) => {
|
|
25
|
-
this.dispatchEvent(new CustomEvent('field-change', {
|
|
26
|
-
bubbles: true,
|
|
27
|
-
composed: true,
|
|
28
|
-
detail: {
|
|
29
|
-
before: this.value,
|
|
30
|
-
after: newval,
|
|
31
|
-
record: this.record,
|
|
32
|
-
column: this.column,
|
|
33
|
-
row: this.row
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
36
|
-
};
|
|
37
|
-
this.popup = openPopup(html `
|
|
38
|
-
<ox-popup-crontab-input .value=${this.value} .confirmCallback=${confirmCallback}></ox-popup-crontab-input>
|
|
39
|
-
`, {
|
|
40
|
-
backdrop: true,
|
|
41
|
-
title: i18next.t('title.setting schedule'),
|
|
42
|
-
help: 'data-grist/grist-editor/crontab'
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
OxGristEditorCrontab = __decorate([
|
|
47
|
-
customElement('ox-grist-editor-crontab')
|
|
48
|
-
], OxGristEditorCrontab);
|
|
49
|
-
export { OxGristEditorCrontab };
|
|
50
|
-
//# sourceMappingURL=ox-grist-editor-crontab.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,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,SAAS,EAAe,MAAM,iBAAiB,CAAA;AAGxD,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,aAAa;IAGrD,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,IAAI,CAAC,KAAK,EAAE;YACd,OAAO,IAAI,CAAC,KAAK,CAAA;SAClB;QAED,MAAM,eAAe,GAAG,CAAC,MAAW,EAAE,EAAE;YACtC,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,cAAc,EAAE;gBAC9B,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE;oBACN,MAAM,EAAE,IAAI,CAAC,KAAK;oBAClB,KAAK,EAAE,MAAM;oBACb,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,CAAC,KAAK,GAAG,SAAS,CACpB,IAAI,CAAA;yCAC+B,IAAI,CAAC,KAAK,qBAAqB,eAAe;OAChF,EACD;YACE,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,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 { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/layout'\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,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import './ox-parameters-builder.js';
|
|
5
|
-
import './ox-popup-parameters-builder.js';
|
|
6
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
7
|
-
export declare class OxGristEditorParameters extends OxGristEditor {
|
|
8
|
-
private popup?;
|
|
9
|
-
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
10
|
-
firstUpdated(): Promise<void>;
|
|
11
|
-
openSelector(): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { __decorate } from "tslib";
|
|
5
|
-
import './ox-parameters-builder.js';
|
|
6
|
-
import './ox-popup-parameters-builder.js';
|
|
7
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
8
|
-
import { openPopup } from '@operato/layout';
|
|
9
|
-
import { html } from 'lit';
|
|
10
|
-
import { cloneDeep } from 'lodash-es';
|
|
11
|
-
import { customElement } from 'lit/decorators.js';
|
|
12
|
-
import { i18next } from '@operato/i18n';
|
|
13
|
-
let OxGristEditorParameters = class OxGristEditorParameters extends OxGristEditor {
|
|
14
|
-
get editorTemplate() {
|
|
15
|
-
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
16
|
-
return html ` ${value || ''} `;
|
|
17
|
-
}
|
|
18
|
-
async firstUpdated() {
|
|
19
|
-
await this.updateComplete;
|
|
20
|
-
this.renderRoot.addEventListener('click', e => {
|
|
21
|
-
e.stopPropagation();
|
|
22
|
-
this.openSelector();
|
|
23
|
-
});
|
|
24
|
-
this.openSelector();
|
|
25
|
-
}
|
|
26
|
-
async openSelector() {
|
|
27
|
-
if (this.popup) {
|
|
28
|
-
delete this.popup;
|
|
29
|
-
}
|
|
30
|
-
var { options } = this.column.record;
|
|
31
|
-
if (typeof options === 'function') {
|
|
32
|
-
options = await options.call(this, this.value, this.column, this.record, this.row, this.field);
|
|
33
|
-
}
|
|
34
|
-
const { name, help, spec, context, objectified = false } = options;
|
|
35
|
-
const confirmCallback = (newval) => {
|
|
36
|
-
this.dispatchEvent(new CustomEvent('field-change', {
|
|
37
|
-
bubbles: true,
|
|
38
|
-
composed: true,
|
|
39
|
-
detail: {
|
|
40
|
-
before: this.value,
|
|
41
|
-
after: !objectified ? JSON.stringify(newval) : newval,
|
|
42
|
-
record: this.record,
|
|
43
|
-
column: this.column,
|
|
44
|
-
row: this.row
|
|
45
|
-
}
|
|
46
|
-
}));
|
|
47
|
-
};
|
|
48
|
-
try {
|
|
49
|
-
var value = !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {});
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
var value = {};
|
|
53
|
-
}
|
|
54
|
-
/*
|
|
55
|
-
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
56
|
-
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
57
|
-
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
58
|
-
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
59
|
-
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
60
|
-
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
61
|
-
*/
|
|
62
|
-
var template = html `
|
|
63
|
-
<ox-popup-parameters-builder
|
|
64
|
-
.value=${value}
|
|
65
|
-
.props=${spec}
|
|
66
|
-
.host=${this.record}
|
|
67
|
-
.context=${context}
|
|
68
|
-
.confirmCallback=${confirmCallback}
|
|
69
|
-
>
|
|
70
|
-
</ox-popup-parameters-builder>
|
|
71
|
-
`;
|
|
72
|
-
this.popup = openPopup(template, {
|
|
73
|
-
backdrop: true,
|
|
74
|
-
size: 'large',
|
|
75
|
-
title: `${(name === null || name === void 0 ? void 0 : name.toUpperCase()) || ''} ${i18next.t('field.params')}`,
|
|
76
|
-
help
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
OxGristEditorParameters = __decorate([
|
|
81
|
-
customElement('ox-grist-editor-parameters')
|
|
82
|
-
], OxGristEditorParameters);
|
|
83
|
-
export { OxGristEditorParameters };
|
|
84
|
-
//# sourceMappingURL=ox-grist-editor-parameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,CAA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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;;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"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import './ox-popup-partition-keys-input.js';
|
|
5
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
-
export declare class OxGristEditorPartitionKeys extends OxGristEditor {
|
|
7
|
-
private popup?;
|
|
8
|
-
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
9
|
-
firstUpdated(): Promise<void>;
|
|
10
|
-
openSelector(): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { __decorate } from "tslib";
|
|
5
|
-
import './ox-popup-partition-keys-input.js';
|
|
6
|
-
import { html } from 'lit';
|
|
7
|
-
import { customElement } from 'lit/decorators.js';
|
|
8
|
-
import { cloneDeep } from 'lodash-es';
|
|
9
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
10
|
-
import { i18next } from '@operato/i18n';
|
|
11
|
-
import { openPopup } from '@operato/layout';
|
|
12
|
-
let OxGristEditorPartitionKeys = class OxGristEditorPartitionKeys extends OxGristEditor {
|
|
13
|
-
get editorTemplate() {
|
|
14
|
-
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
15
|
-
return html ` ${value || ''} `;
|
|
16
|
-
}
|
|
17
|
-
async firstUpdated() {
|
|
18
|
-
await this.updateComplete;
|
|
19
|
-
this.renderRoot.addEventListener('click', e => {
|
|
20
|
-
e.stopPropagation();
|
|
21
|
-
this.openSelector();
|
|
22
|
-
});
|
|
23
|
-
this.openSelector();
|
|
24
|
-
}
|
|
25
|
-
async openSelector() {
|
|
26
|
-
var _a;
|
|
27
|
-
if (this.popup) {
|
|
28
|
-
delete this.popup;
|
|
29
|
-
}
|
|
30
|
-
const { name, help, objectified = false } = ((_a = this.column.record) === null || _a === void 0 ? void 0 : _a.options) || {};
|
|
31
|
-
const confirmCallback = (newval) => {
|
|
32
|
-
this.dispatchEvent(new CustomEvent('field-change', {
|
|
33
|
-
bubbles: true,
|
|
34
|
-
composed: true,
|
|
35
|
-
detail: {
|
|
36
|
-
before: this.value,
|
|
37
|
-
after: !objectified ? JSON.stringify(newval) : newval,
|
|
38
|
-
record: this.record,
|
|
39
|
-
column: this.column,
|
|
40
|
-
row: this.row
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
43
|
-
};
|
|
44
|
-
try {
|
|
45
|
-
var value = !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {});
|
|
46
|
-
}
|
|
47
|
-
catch (e) {
|
|
48
|
-
var value = {};
|
|
49
|
-
}
|
|
50
|
-
/*
|
|
51
|
-
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
52
|
-
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
53
|
-
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
54
|
-
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
55
|
-
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
56
|
-
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
57
|
-
*/
|
|
58
|
-
var template = html `
|
|
59
|
-
<ox-popup-partition-keys-input .value=${value} .confirmCallback=${confirmCallback}>
|
|
60
|
-
</ox-popup-partition-keys-input>
|
|
61
|
-
`;
|
|
62
|
-
this.popup = openPopup(template, {
|
|
63
|
-
backdrop: true,
|
|
64
|
-
size: 'large',
|
|
65
|
-
title: `${(name === null || name === void 0 ? void 0 : name.toUpperCase()) || i18next.t('field.partition-keys')} `,
|
|
66
|
-
help
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
OxGristEditorPartitionKeys = __decorate([
|
|
71
|
-
customElement('ox-grist-editor-partition-keys')
|
|
72
|
-
], OxGristEditorPartitionKeys);
|
|
73
|
-
export { OxGristEditorPartitionKeys };
|
|
74
|
-
//# sourceMappingURL=ox-grist-editor-partition-keys.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,IAAI,EAAE,MAAM,KAAK,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAe,MAAM,iBAAiB,CAAA;AAGxD,IAAa,0BAA0B,GAAvC,MAAa,0BAA2B,SAAQ,aAAa;IAG3D,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,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,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 { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { cloneDeep } from 'lodash-es'\n\nimport { OxGristEditor } from '@operato/data-grist'\nimport { i18next } from '@operato/i18n'\nimport { openPopup, PopupHandle } from '@operato/layout'\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,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import './ox-popup-value-map-input.js';
|
|
5
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
6
|
-
export declare class OxGristEditorValueMap extends OxGristEditor {
|
|
7
|
-
private popup?;
|
|
8
|
-
get editorTemplate(): import("lit-html").TemplateResult<1>;
|
|
9
|
-
firstUpdated(): Promise<void>;
|
|
10
|
-
openSelector(): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { __decorate } from "tslib";
|
|
5
|
-
import './ox-popup-value-map-input.js';
|
|
6
|
-
import { OxGristEditor } from '@operato/data-grist';
|
|
7
|
-
import { openPopup } from '@operato/layout';
|
|
8
|
-
import { html } from 'lit';
|
|
9
|
-
import { customElement } from 'lit/decorators.js';
|
|
10
|
-
import { cloneDeep } from 'lodash-es';
|
|
11
|
-
import { i18next } from '@operato/i18n';
|
|
12
|
-
let OxGristEditorValueMap = class OxGristEditorValueMap extends OxGristEditor {
|
|
13
|
-
get editorTemplate() {
|
|
14
|
-
const value = typeof this.value === 'object' ? JSON.stringify(this.value) : this.value;
|
|
15
|
-
return html ` ${value || ''} `;
|
|
16
|
-
}
|
|
17
|
-
async firstUpdated() {
|
|
18
|
-
await this.updateComplete;
|
|
19
|
-
this.renderRoot.addEventListener('click', e => {
|
|
20
|
-
e.stopPropagation();
|
|
21
|
-
this.openSelector();
|
|
22
|
-
});
|
|
23
|
-
this.openSelector();
|
|
24
|
-
}
|
|
25
|
-
async openSelector() {
|
|
26
|
-
var _a;
|
|
27
|
-
if (this.popup) {
|
|
28
|
-
delete this.popup;
|
|
29
|
-
}
|
|
30
|
-
const { name, help, valuetype = 'string', objectified = false } = ((_a = this.column.record) === null || _a === void 0 ? void 0 : _a.options) || {};
|
|
31
|
-
const confirmCallback = (newval) => {
|
|
32
|
-
this.dispatchEvent(new CustomEvent('field-change', {
|
|
33
|
-
bubbles: true,
|
|
34
|
-
composed: true,
|
|
35
|
-
detail: {
|
|
36
|
-
before: this.value,
|
|
37
|
-
after: !objectified ? JSON.stringify(newval) : newval,
|
|
38
|
-
record: this.record,
|
|
39
|
-
column: this.column,
|
|
40
|
-
row: this.row
|
|
41
|
-
}
|
|
42
|
-
}));
|
|
43
|
-
};
|
|
44
|
-
try {
|
|
45
|
-
var value = !objectified && typeof this.value === 'string' ? JSON.parse(this.value) : cloneDeep(this.value || {});
|
|
46
|
-
}
|
|
47
|
-
catch (e) {
|
|
48
|
-
var value = {};
|
|
49
|
-
}
|
|
50
|
-
/*
|
|
51
|
-
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
52
|
-
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
53
|
-
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
54
|
-
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
55
|
-
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
56
|
-
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
57
|
-
*/
|
|
58
|
-
var template = html `
|
|
59
|
-
<ox-popup-value-map-input .value=${value} .valuetype=${valuetype} .confirmCallback=${confirmCallback}>
|
|
60
|
-
</ox-popup-value-map-input>
|
|
61
|
-
`;
|
|
62
|
-
this.popup = openPopup(template, {
|
|
63
|
-
backdrop: true,
|
|
64
|
-
size: 'large',
|
|
65
|
-
title: `${(name === null || name === void 0 ? void 0 : name.toUpperCase()) || i18next.t('field.value-map')} `,
|
|
66
|
-
help
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
OxGristEditorValueMap = __decorate([
|
|
71
|
-
customElement('ox-grist-editor-value-map')
|
|
72
|
-
], OxGristEditorValueMap);
|
|
73
|
-
export { OxGristEditorValueMap };
|
|
74
|
-
//# sourceMappingURL=ox-grist-editor-value-map.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,I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AAC,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;yCACkB,KAAK,eAAe,SAAS,qBAAqB,eAAe;;KAErG,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,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"]}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { __decorate } from "tslib";
|
|
5
|
-
import { LitElement, html } from 'lit';
|
|
6
|
-
import { OxPropertyEditor } from '@operato/property-editor';
|
|
7
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
8
|
-
import { connect } from 'pwa-helpers/connect-mixin';
|
|
9
|
-
import { store } from '@operato/shell';
|
|
10
|
-
/**
|
|
11
|
-
모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.
|
|
12
|
-
|
|
13
|
-
Example:
|
|
14
|
-
|
|
15
|
-
<ox-parameters-builder value="{{value}}">
|
|
16
|
-
<label>Center X</label>
|
|
17
|
-
<input type="number" .value="${value.cx}">
|
|
18
|
-
<label>Width</label>
|
|
19
|
-
<input type="number" .value="${value.width}">
|
|
20
|
-
</ox-parameters-builder>
|
|
21
|
-
*/
|
|
22
|
-
const DEFAULT_VALUE = {
|
|
23
|
-
legend: '',
|
|
24
|
-
number: 0,
|
|
25
|
-
angle: 0,
|
|
26
|
-
string: '',
|
|
27
|
-
text: '',
|
|
28
|
-
textarea: '',
|
|
29
|
-
checkbox: false,
|
|
30
|
-
select: '',
|
|
31
|
-
color: '#000000',
|
|
32
|
-
'solidcolor-stops': null,
|
|
33
|
-
'gradientcolor-stops': null,
|
|
34
|
-
'gltf-selector': '',
|
|
35
|
-
'image-selector': '',
|
|
36
|
-
multiplecolor: null,
|
|
37
|
-
editortable: null,
|
|
38
|
-
imageselector: '',
|
|
39
|
-
options: null,
|
|
40
|
-
date: null
|
|
41
|
-
};
|
|
42
|
-
let OxParametersBuilder = class OxParametersBuilder extends connect(store)(LitElement) {
|
|
43
|
-
render() {
|
|
44
|
-
return html `<slot></slot>`;
|
|
45
|
-
}
|
|
46
|
-
firstUpdated() {
|
|
47
|
-
this.addEventListener('change', this._onValueChanged.bind(this));
|
|
48
|
-
}
|
|
49
|
-
updated(changes) {
|
|
50
|
-
changes.has('props') && this._onPropsChanged(this.props);
|
|
51
|
-
changes.has('value') && this._setValues();
|
|
52
|
-
}
|
|
53
|
-
_onPropsChanged(props) {
|
|
54
|
-
this.textContent = '';
|
|
55
|
-
(props || []).forEach(prop => {
|
|
56
|
-
let elementType = OxPropertyEditor.getEditor(prop.type);
|
|
57
|
-
if (!elementType) {
|
|
58
|
-
console.warn('Property Editor not defined', prop.type);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
let element = document.createElement(elementType);
|
|
62
|
-
element.label = prop.label;
|
|
63
|
-
element.type = prop.type;
|
|
64
|
-
element.placeholder = prop.placeholder;
|
|
65
|
-
element.host = this.host;
|
|
66
|
-
// element.context = this.context
|
|
67
|
-
element.setAttribute('name', prop.name);
|
|
68
|
-
if (prop.observe) {
|
|
69
|
-
element.observe = prop.observe;
|
|
70
|
-
}
|
|
71
|
-
element.property = prop.property;
|
|
72
|
-
element.setAttribute('property-editor', '');
|
|
73
|
-
this.appendChild(element);
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
_setValues() {
|
|
77
|
-
var value = this.value || {};
|
|
78
|
-
Array.from(this.querySelectorAll('[name]')).forEach(propertyEditor => {
|
|
79
|
-
const editor = propertyEditor;
|
|
80
|
-
let name = editor.getAttribute('name');
|
|
81
|
-
editor.value = value[name] === undefined ? DEFAULT_VALUE[editor.type] : value[name];
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
_getValues() {
|
|
85
|
-
var value = {};
|
|
86
|
-
Array.from(this.querySelectorAll('[name]')).forEach(propertyEditor => {
|
|
87
|
-
const editor = propertyEditor;
|
|
88
|
-
let name = editor.getAttribute('name');
|
|
89
|
-
value[name] = editor.value === undefined ? DEFAULT_VALUE[editor.type] : editor.value;
|
|
90
|
-
});
|
|
91
|
-
return value;
|
|
92
|
-
}
|
|
93
|
-
_onValueChanged(e) {
|
|
94
|
-
e.stopPropagation();
|
|
95
|
-
var prop = e.target;
|
|
96
|
-
if (!prop || !prop.hasAttribute('property-editor')) {
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
this.dispatchEvent(new CustomEvent('property-change', {
|
|
100
|
-
bubbles: true,
|
|
101
|
-
composed: true,
|
|
102
|
-
detail: this._getValues()
|
|
103
|
-
}));
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
__decorate([
|
|
107
|
-
property({ type: Object })
|
|
108
|
-
], OxParametersBuilder.prototype, "value", void 0);
|
|
109
|
-
__decorate([
|
|
110
|
-
property({ type: Array })
|
|
111
|
-
], OxParametersBuilder.prototype, "props", void 0);
|
|
112
|
-
__decorate([
|
|
113
|
-
property({ type: Object })
|
|
114
|
-
], OxParametersBuilder.prototype, "host", void 0);
|
|
115
|
-
OxParametersBuilder = __decorate([
|
|
116
|
-
customElement('ox-parameters-builder')
|
|
117
|
-
], OxParametersBuilder);
|
|
118
|
-
//# sourceMappingURL=ox-parameters-builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ox-parameters-builder.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-parameters-builder.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,EAAE,UAAU,EAAkB,IAAI,EAAE,MAAM,KAAK,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAgB,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEtC;;;;;;;;;;;EAWE;AAEF,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,CAAC;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,EAAE;IACV,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,SAAS;IAChB,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,aAAa,EAAE,IAAI;IACnB,WAAW,EAAE,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CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAA;QACvF,CAAC,CAAC,CAAA;QAEF,OAAO,KAAK,CAAA;IACd,CAAC;IAED,eAAe,CAAC,CAAQ;QACtB,CAAC,CAAC,eAAe,EAAE,CAAA;QACnB,IAAI,IAAI,GAAG,CAAC,CAAC,MAAqB,CAAA;QAElC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE;YAClD,OAAM;SACP;QAED,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAAC,iBAAiB,EAAE;YACjC,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE;SAC1B,CAAC,CACH,CAAA;IACH,CAAC;CACF,CAAA;AAhF6B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAW;AACX;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;kDAAuB;AACrB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iDAAU;AAHjC,mBAAmB;IADxB,aAAa,CAAC,uBAAuB,CAAC;GACjC,mBAAmB,CAiFxB","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { LitElement, PropertyValues, html } from 'lit'\nimport { OxPropertyEditor, PropertySpec } from '@operato/property-editor'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport { store } from '@operato/shell'\n\n/**\n모든 에디터들은 change 이벤트를 지원해야 한다. 또한, 모든 에디터들은 value속성에 값을 가져야 한다.\n\nExample:\n\n <ox-parameters-builder value=\"{{value}}\">\n <label>Center X</label>\n <input type=\"number\" .value=\"${value.cx}\">\n <label>Width</label>\n <input type=\"number\" .value=\"${value.width}\">\n </ox-parameters-builder>\n*/\n\nconst DEFAULT_VALUE = {\n legend: '',\n number: 0,\n angle: 0,\n string: '',\n text: '',\n textarea: '',\n checkbox: false,\n select: '',\n color: '#000000',\n 'solidcolor-stops': null,\n 'gradientcolor-stops': null,\n 'gltf-selector': '',\n 'image-selector': '',\n multiplecolor: null,\n editortable: null,\n imageselector: '',\n options: null,\n date: null\n} as any\n\n@customElement('ox-parameters-builder')\nclass OxParametersBuilder extends connect(store)(LitElement) {\n @property({ type: Object }) value: any\n @property({ type: Array }) props?: PropertySpec[]\n @property({ type: Object }) host: any\n\n render() {\n return html`<slot></slot>`\n }\n\n firstUpdated() {\n this.addEventListener('change', this._onValueChanged.bind(this))\n }\n\n updated(changes: PropertyValues<this>) {\n changes.has('props') && this._onPropsChanged(this.props)\n changes.has('value') && this._setValues()\n }\n\n _onPropsChanged(props: PropertySpec[] | undefined) {\n this.textContent = ''\n ;(props || []).forEach(prop => {\n let elementType = OxPropertyEditor.getEditor(prop.type)\n if (!elementType) {\n console.warn('Property Editor not defined', prop.type)\n return\n }\n let element = document.createElement(elementType) as OxPropertyEditor\n\n element.label = prop.label\n element.type = prop.type\n element.placeholder = prop.placeholder\n element.host = this.host\n // element.context = this.context\n element.setAttribute('name', prop.name)\n\n if (prop.observe) {\n element.observe = prop.observe\n }\n element.property = prop.property\n element.setAttribute('property-editor', '')\n\n this.appendChild(element)\n })\n }\n\n _setValues() {\n var value = this.value || {}\n Array.from(this.querySelectorAll('[name]')).forEach(propertyEditor => {\n const editor = propertyEditor as OxPropertyEditor\n let name = editor.getAttribute('name')\n editor.value = value[name!] === undefined ? DEFAULT_VALUE[editor.type] : value[name!]\n })\n }\n\n _getValues() {\n var value = {} as any\n Array.from(this.querySelectorAll('[name]')).forEach(propertyEditor => {\n const editor = propertyEditor as OxPropertyEditor\n let name = editor.getAttribute('name')\n value[name!] = editor.value === undefined ? DEFAULT_VALUE[editor.type] : editor.value\n })\n\n return value\n }\n\n _onValueChanged(e: Event) {\n e.stopPropagation()\n var prop = e.target as HTMLElement\n\n if (!prop || !prop.hasAttribute('property-editor')) {\n return\n }\n\n this.dispatchEvent(\n new CustomEvent('property-change', {\n bubbles: true,\n composed: true,\n detail: this._getValues()\n })\n )\n }\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import '@operato/input/ox-input-crontab.js';
|
|
2
|
-
import { LitElement } from 'lit';
|
|
3
|
-
export declare class OxPopupCrontabInput extends LitElement {
|
|
4
|
-
static styles: import("lit").CSSResult[];
|
|
5
|
-
value: any;
|
|
6
|
-
confirmCallback: (newval: any) => void;
|
|
7
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
8
|
-
private onChange;
|
|
9
|
-
private onCancel;
|
|
10
|
-
private onConfirm;
|
|
11
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import '@operato/input/ox-input-crontab.js';
|
|
3
|
-
import { LitElement, css, html } from 'lit';
|
|
4
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
5
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
6
|
-
import { i18next } from '@operato/i18n';
|
|
7
|
-
let OxPopupCrontabInput = class OxPopupCrontabInput extends LitElement {
|
|
8
|
-
render() {
|
|
9
|
-
return html `
|
|
10
|
-
<ox-input-crontab .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-crontab>
|
|
11
|
-
|
|
12
|
-
<div class="button-container">
|
|
13
|
-
<mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
14
|
-
<mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
|
|
15
|
-
</div>
|
|
16
|
-
`;
|
|
17
|
-
}
|
|
18
|
-
onChange(e) {
|
|
19
|
-
e.stopPropagation();
|
|
20
|
-
this.value = e.detail;
|
|
21
|
-
}
|
|
22
|
-
onCancel(e) {
|
|
23
|
-
history.back();
|
|
24
|
-
}
|
|
25
|
-
onConfirm(e) {
|
|
26
|
-
this.confirmCallback && this.confirmCallback(this.value);
|
|
27
|
-
history.back();
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
OxPopupCrontabInput.styles = [
|
|
31
|
-
ScrollbarStyles,
|
|
32
|
-
css `
|
|
33
|
-
:host {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-direction: column;
|
|
36
|
-
|
|
37
|
-
background-color: #fff;
|
|
38
|
-
|
|
39
|
-
width: var(--overlay-center-normal-width, 50%);
|
|
40
|
-
height: var(--overlay-center-normal-height, 50%);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
ox-input-crontab {
|
|
44
|
-
flex: 1;
|
|
45
|
-
overflow-y: auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
span {
|
|
49
|
-
flex: 1;
|
|
50
|
-
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
|
|
55
|
-
color: var(--primary-color);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.button-container {
|
|
59
|
-
display: flex;
|
|
60
|
-
margin-left: auto;
|
|
61
|
-
}
|
|
62
|
-
`
|
|
63
|
-
];
|
|
64
|
-
__decorate([
|
|
65
|
-
property({ type: Object })
|
|
66
|
-
], OxPopupCrontabInput.prototype, "value", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
property({ type: Object })
|
|
69
|
-
], OxPopupCrontabInput.prototype, "confirmCallback", void 0);
|
|
70
|
-
OxPopupCrontabInput = __decorate([
|
|
71
|
-
customElement('ox-popup-crontab-input')
|
|
72
|
-
], OxPopupCrontabInput);
|
|
73
|
-
export { OxPopupCrontabInput };
|
|
74
|
-
//# sourceMappingURL=ox-popup-crontab-input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-crontab-input.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-crontab-input.ts"],"names":[],"mappings":";AAAA,OAAO,oCAAoC,CAAA;AAE3C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AAE,CAAC;4DAAwC;AArCxD,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAgE/B;SAhEY,mBAAmB","sourcesContent":["import '@operato/input/ox-input-crontab.js'\n\nimport { LitElement, css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { ScrollbarStyles } from '@operato/styles'\nimport { i18next } from '@operato/i18n'\n\n@customElement('ox-popup-crontab-input')\nexport class OxPopupCrontabInput 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-crontab {\n flex: 1;\n overflow-y: auto;\n }\n\n span {\n flex: 1;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n color: var(--primary-color);\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: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n return html`\n <ox-input-crontab .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-crontab>\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 history.back()\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n history.back()\n }\n}\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
export declare class OxPopupParametersBuilder extends LitElement {
|
|
3
|
-
static styles: import("lit").CSSResult[];
|
|
4
|
-
value: any;
|
|
5
|
-
props: any;
|
|
6
|
-
host: any;
|
|
7
|
-
context: any;
|
|
8
|
-
confirmCallback: (newval: any) => void;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
10
|
-
private onChange;
|
|
11
|
-
private onCancel;
|
|
12
|
-
private onConfirm;
|
|
13
|
-
}
|