@operato/app 0.4.2 → 0.4.5
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 +25 -0
- package/dist/src/filter-renderer/filter-resource-select.d.ts +4 -0
- package/dist/src/filter-renderer/filter-resource-select.js +79 -0
- package/dist/src/filter-renderer/filter-resource-select.js.map +1 -0
- package/dist/src/filter-renderer/index.d.ts +1 -0
- package/dist/src/filter-renderer/index.js +5 -0
- package/dist/src/filter-renderer/index.js.map +1 -0
- package/dist/src/grist-editor/index.d.ts +1 -0
- package/dist/src/grist-editor/index.js +28 -0
- package/dist/src/grist-editor/index.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-code.d.ts +7 -0
- package/dist/src/grist-editor/ox-grist-editor-code.js +53 -0
- package/dist/src/grist-editor/ox-grist-editor-code.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-crontab.d.ts +8 -0
- package/dist/src/grist-editor/ox-grist-editor-crontab.js +50 -0
- package/dist/src/grist-editor/ox-grist-editor-crontab.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-json.d.ts +7 -0
- package/dist/src/grist-editor/ox-grist-editor-json.js +54 -0
- package/dist/src/grist-editor/ox-grist-editor-json.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-parameters.d.ts +12 -0
- package/dist/src/grist-editor/ox-grist-editor-parameters.js +84 -0
- package/dist/src/grist-editor/ox-grist-editor-parameters.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.d.ts +11 -0
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js +74 -0
- package/dist/src/grist-editor/ox-grist-editor-partition-keys.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-code.d.ts +6 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-code.js +55 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-code.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-id.d.ts +9 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-id.js +72 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-id.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-object.d.ts +11 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js +104 -0
- package/dist/src/grist-editor/ox-grist-editor-resource-object.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-editor-value-map.d.ts +11 -0
- package/dist/src/grist-editor/ox-grist-editor-value-map.js +74 -0
- package/dist/src/grist-editor/ox-grist-editor-value-map.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-renderer-crontab.d.ts +2 -0
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js +26 -0
- package/dist/src/grist-editor/ox-grist-renderer-crontab.js.map +1 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.d.ts +2 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js +9 -0
- package/dist/src/grist-editor/ox-grist-renderer-resource-id.js.map +1 -0
- 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-parameters-builder.d.ts +4 -0
- package/dist/src/grist-editor/ox-parameters-builder.js +118 -0
- package/dist/src/grist-editor/ox-parameters-builder.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-code-input.d.ts +12 -0
- package/dist/src/grist-editor/ox-popup-code-input.js +71 -0
- package/dist/src/grist-editor/ox-popup-code-input.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-crontab-input.d.ts +11 -0
- package/dist/src/grist-editor/ox-popup-crontab-input.js +74 -0
- package/dist/src/grist-editor/ox-popup-crontab-input.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-parameters-builder.d.ts +13 -0
- package/dist/src/grist-editor/ox-popup-parameters-builder.js +111 -0
- package/dist/src/grist-editor/ox-popup-parameters-builder.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-partition-keys-input.d.ts +12 -0
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js +98 -0
- package/dist/src/grist-editor/ox-popup-partition-keys-input.js.map +1 -0
- package/dist/src/grist-editor/ox-popup-value-map-input.d.ts +12 -0
- package/dist/src/grist-editor/ox-popup-value-map-input.js +104 -0
- package/dist/src/grist-editor/ox-popup-value-map-input.js.map +1 -0
- package/dist/src/grist-editor/ox-selector-resource-id.d.ts +24 -0
- package/dist/src/grist-editor/ox-selector-resource-id.js +202 -0
- package/dist/src/grist-editor/ox-selector-resource-id.js.map +1 -0
- package/dist/src/grist-editor/ox-selector-resource-object.d.ts +39 -0
- package/dist/src/grist-editor/ox-selector-resource-object.js +343 -0
- package/dist/src/grist-editor/ox-selector-resource-object.js.map +1 -0
- package/dist/src/input/index.d.ts +3 -0
- package/dist/src/input/index.js +4 -0
- package/dist/src/input/index.js.map +1 -0
- package/dist/src/input/ox-input-background-pattern.d.ts +31 -0
- package/dist/src/input/ox-input-background-pattern.js +150 -0
- package/dist/src/input/ox-input-background-pattern.js.map +1 -0
- package/dist/src/input/ox-input-fill-style.d.ts +41 -0
- package/dist/src/input/ox-input-fill-style.js +325 -0
- package/dist/src/input/ox-input-fill-style.js.map +1 -0
- package/dist/src/input/ox-input-graphql.d.ts +36 -0
- package/dist/src/input/ox-input-graphql.js +161 -0
- package/dist/src/input/ox-input-graphql.js.map +1 -0
- package/dist/src/input/ox-input-resource.d.ts +36 -0
- package/dist/src/input/ox-input-resource.js +161 -0
- package/dist/src/input/ox-input-resource.js.map +1 -0
- package/dist/src/property-editor/index.d.ts +24 -0
- package/dist/src/property-editor/index.js +58 -0
- package/dist/src/property-editor/index.js.map +1 -0
- package/dist/src/property-editor/ox-property-editor-graphql.d.ts +5 -0
- package/dist/src/property-editor/ox-property-editor-graphql.js +15 -0
- package/dist/src/property-editor/ox-property-editor-graphql.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@operato/input/ox-input-code.js';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
export declare class OxPopupCodeInput extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
value: any;
|
|
6
|
+
mode: string;
|
|
7
|
+
confirmCallback: (newval: any) => void;
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
private onChange;
|
|
10
|
+
private onCancel;
|
|
11
|
+
private onConfirm;
|
|
12
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-code.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 OxPopupCodeInput = class OxPopupCodeInput extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.mode = 'javascript';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return html `
|
|
14
|
+
<ox-input-code .value=${this.value} .mode=${this.mode} @change=${this.onChange.bind(this)}> </ox-input-code>
|
|
15
|
+
|
|
16
|
+
<div class="button-container">
|
|
17
|
+
<mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
18
|
+
<mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
|
|
19
|
+
</div>
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
onChange(e) {
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
this.value = e.detail;
|
|
25
|
+
}
|
|
26
|
+
onCancel(e) {
|
|
27
|
+
history.back();
|
|
28
|
+
}
|
|
29
|
+
onConfirm(e) {
|
|
30
|
+
this.confirmCallback && this.confirmCallback(this.value);
|
|
31
|
+
history.back();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
OxPopupCodeInput.styles = [
|
|
35
|
+
ScrollbarStyles,
|
|
36
|
+
css `
|
|
37
|
+
:host {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
|
|
41
|
+
background-color: #fff;
|
|
42
|
+
|
|
43
|
+
width: var(--overlay-center-normal-width, 50%);
|
|
44
|
+
height: var(--overlay-center-normal-height, 50%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ox-input-code {
|
|
48
|
+
flex: 1;
|
|
49
|
+
overflow-y: auto;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.button-container {
|
|
53
|
+
display: flex;
|
|
54
|
+
margin-left: auto;
|
|
55
|
+
}
|
|
56
|
+
`
|
|
57
|
+
];
|
|
58
|
+
__decorate([
|
|
59
|
+
property({ type: Object })
|
|
60
|
+
], OxPopupCodeInput.prototype, "value", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
property({ type: String })
|
|
63
|
+
], OxPopupCodeInput.prototype, "mode", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: Object })
|
|
66
|
+
], OxPopupCodeInput.prototype, "confirmCallback", void 0);
|
|
67
|
+
OxPopupCodeInput = __decorate([
|
|
68
|
+
customElement('ox-popup-code-input')
|
|
69
|
+
], OxPopupCodeInput);
|
|
70
|
+
export { OxPopupCodeInput };
|
|
71
|
+
//# sourceMappingURL=ox-popup-code-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-popup-code-input.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-code-input.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBA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I,EAAE,MAAM,EAAE,CAAC;yDAAwC;AA5BxD,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CAuD5B;SAvDY,gBAAgB","sourcesContent":["import '@operato/input/ox-input-code.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-code-input')\nexport class OxPopupCodeInput extends LitElement {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n\n width: var(--overlay-center-normal-width, 50%);\n height: var(--overlay-center-normal-height, 50%);\n }\n\n ox-input-code {\n flex: 1;\n overflow-y: auto;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n }\n `\n ]\n\n @property({ type: Object }) value: any\n @property({ type: String }) mode: string = 'javascript'\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n return html`\n <ox-input-code .value=${this.value} .mode=${this.mode} @change=${this.onChange.bind(this)}> </ox-input-code>\n\n <div class=\"button-container\">\n <mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>\n <mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>\n </div>\n `\n }\n\n private onChange(e: CustomEvent) {\n e.stopPropagation()\n\n this.value = e.detail\n }\n\n private onCancel(e: Event) {\n history.back()\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n history.back()\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,IAAa,mBAAmB,GAAhC,MAAa,mBAAoB,SAAQ,UAAU;IAuCjD,MAAM;QACJ,OAAO,IAAI,CAAA;iCACkB,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;;6BAGlD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;6BACtD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;;KAEhF,CAAA;IACH,CAAC;IAEO,QAAQ,CAAC,CAAc;QAC7B,CAAC,CAAC,eAAe,EAAE,CAAA;QAEnB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;IACvB,CAAC;IAEO,QAAQ,CAAC,CAAQ;QACvB,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;IAEO,SAAS,CAAC,CAAQ;QACxB,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;CACF,CAAA;AA/DQ,0BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,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"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { LitElement, css, html } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { ScrollbarStyles } from '@operato/styles';
|
|
5
|
+
import { i18next } from '@operato/i18n';
|
|
6
|
+
let OxPopupParametersBuilder = class OxPopupParametersBuilder extends LitElement {
|
|
7
|
+
render() {
|
|
8
|
+
var props = this.props instanceof Array ? this.props : [];
|
|
9
|
+
return html `
|
|
10
|
+
${props.length > 0
|
|
11
|
+
? html `
|
|
12
|
+
<ox-parameters-builder
|
|
13
|
+
.value=${this.value}
|
|
14
|
+
.props=${props}
|
|
15
|
+
.host=${this.host}
|
|
16
|
+
.context=${this.context}
|
|
17
|
+
@property-change=${this.onChange.bind(this)}
|
|
18
|
+
>
|
|
19
|
+
</ox-parameters-builder>
|
|
20
|
+
`
|
|
21
|
+
: html ` <span><i18n-msg msgid="text.no properties to set"></i18n-msg></span> `}
|
|
22
|
+
|
|
23
|
+
<div class="button-container">
|
|
24
|
+
<mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
25
|
+
<mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
|
|
26
|
+
</div>
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
onChange(e) {
|
|
30
|
+
e.stopPropagation();
|
|
31
|
+
/*
|
|
32
|
+
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
33
|
+
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
34
|
+
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
35
|
+
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
36
|
+
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
37
|
+
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
38
|
+
(이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)
|
|
39
|
+
=>
|
|
40
|
+
이런 이유로, Object.assign(...)을 사용하였다.
|
|
41
|
+
*/
|
|
42
|
+
if (!this.value) {
|
|
43
|
+
this.value = {};
|
|
44
|
+
}
|
|
45
|
+
for (let key in this.value) {
|
|
46
|
+
delete this.value[key];
|
|
47
|
+
}
|
|
48
|
+
Object.assign(this.value, e.detail);
|
|
49
|
+
}
|
|
50
|
+
onCancel(e) {
|
|
51
|
+
history.back();
|
|
52
|
+
}
|
|
53
|
+
onConfirm(e) {
|
|
54
|
+
this.confirmCallback && this.confirmCallback(this.value);
|
|
55
|
+
history.back();
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
OxPopupParametersBuilder.styles = [
|
|
59
|
+
ScrollbarStyles,
|
|
60
|
+
css `
|
|
61
|
+
:host {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
|
|
65
|
+
background-color: #fff;
|
|
66
|
+
|
|
67
|
+
width: var(--overlay-center-normal-width, 50%);
|
|
68
|
+
height: var(--overlay-center-normal-height, 50%);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
ox-parameters-builder {
|
|
72
|
+
flex: 1;
|
|
73
|
+
overflow-y: auto;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
span {
|
|
77
|
+
flex: 1;
|
|
78
|
+
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
|
|
83
|
+
color: var(--primary-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.button-container {
|
|
87
|
+
display: flex;
|
|
88
|
+
margin-left: auto;
|
|
89
|
+
}
|
|
90
|
+
`
|
|
91
|
+
];
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ type: Object })
|
|
94
|
+
], OxPopupParametersBuilder.prototype, "value", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
property({ type: Object })
|
|
97
|
+
], OxPopupParametersBuilder.prototype, "props", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
property({ type: Object })
|
|
100
|
+
], OxPopupParametersBuilder.prototype, "host", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
property({ type: Object })
|
|
103
|
+
], OxPopupParametersBuilder.prototype, "context", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
property({ type: Object })
|
|
106
|
+
], OxPopupParametersBuilder.prototype, "confirmCallback", void 0);
|
|
107
|
+
OxPopupParametersBuilder = __decorate([
|
|
108
|
+
customElement('ox-popup-parameters-builder')
|
|
109
|
+
], OxPopupParametersBuilder);
|
|
110
|
+
export { OxPopupParametersBuilder };
|
|
111
|
+
//# sourceMappingURL=ox-popup-parameters-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-popup-parameters-builder.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-parameters-builder.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,UAAU;IA0CtD,MAAM;QACJ,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;QAEzD,OAAO,IAAI,CAAA;QACP,KAAK,CAAC,MAAM,GAAG,CAAC;YAChB,CAAC,CAAC,IAAI,CAAA;;uBAES,IAAI,CAAC,KAAK;uBACV,KAAK;sBACN,IAAI,CAAC,IAAI;yBACN,IAAI,CAAC,OAAO;iCACJ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;;WAG9C;YACH,CAAC,CAAC,IAAI,CAAA,wEAAwE;;;6BAGzD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,I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C;iEAAwC;AAxCxD,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAkGpC;SAlGY,wBAAwB","sourcesContent":["import { 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-parameters-builder')\nexport class OxPopupParametersBuilder 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-parameters-builder {\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 }) props: any\n @property({ type: Object }) host: any\n @property({ type: Object }) context: any\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n var props = this.props instanceof Array ? this.props : []\n\n return html`\n ${props.length > 0\n ? html`\n <ox-parameters-builder\n .value=${this.value}\n .props=${props}\n .host=${this.host}\n .context=${this.context}\n @property-change=${this.onChange.bind(this)}\n >\n </ox-parameters-builder>\n `\n : html` <span><i18n-msg msgid=\"text.no properties to set\"></i18n-msg></span> `}\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 /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n (이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)\n => \n 이런 이유로, Object.assign(...)을 사용하였다.\n */\n if (!this.value) {\n this.value = {}\n }\n\n for (let key in this.value) {\n delete this.value[key]\n }\n Object.assign(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"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@operato/input/ox-input-partition-keys.js';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
export declare class OxPopupPartitionKeysInput extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
value: any;
|
|
6
|
+
valuetype: string;
|
|
7
|
+
confirmCallback: (newval: any) => void;
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
private onChange;
|
|
10
|
+
private onCancel;
|
|
11
|
+
private onConfirm;
|
|
12
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-partition-keys.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 OxPopupPartitionKeysInput = class OxPopupPartitionKeysInput extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.valuetype = 'string';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return html `
|
|
14
|
+
<ox-input-partition-keys .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-partition-keys>
|
|
15
|
+
|
|
16
|
+
<div class="button-container">
|
|
17
|
+
<mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
18
|
+
<mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
|
|
19
|
+
</div>
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
onChange(e) {
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
/*
|
|
25
|
+
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
26
|
+
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
27
|
+
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
28
|
+
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
29
|
+
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
30
|
+
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
31
|
+
(이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)
|
|
32
|
+
=>
|
|
33
|
+
이런 이유로, Object.assign(...)을 사용하였다.
|
|
34
|
+
*/
|
|
35
|
+
if (!this.value || typeof this.value !== 'object') {
|
|
36
|
+
this.value = {};
|
|
37
|
+
}
|
|
38
|
+
for (let key in this.value) {
|
|
39
|
+
delete this.value[key];
|
|
40
|
+
}
|
|
41
|
+
Object.assign(this.value, e.detail);
|
|
42
|
+
}
|
|
43
|
+
onCancel(e) {
|
|
44
|
+
history.back();
|
|
45
|
+
}
|
|
46
|
+
onConfirm(e) {
|
|
47
|
+
this.confirmCallback && this.confirmCallback(this.value);
|
|
48
|
+
history.back();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
OxPopupPartitionKeysInput.styles = [
|
|
52
|
+
ScrollbarStyles,
|
|
53
|
+
css `
|
|
54
|
+
:host {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
|
|
58
|
+
background-color: #fff;
|
|
59
|
+
|
|
60
|
+
width: var(--overlay-center-normal-width, 50%);
|
|
61
|
+
height: var(--overlay-center-normal-height, 50%);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
ox-input-partition-keys {
|
|
65
|
+
flex: 1;
|
|
66
|
+
overflow-y: auto;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
span {
|
|
70
|
+
flex: 1;
|
|
71
|
+
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
|
|
76
|
+
color: var(--primary-color);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.button-container {
|
|
80
|
+
display: flex;
|
|
81
|
+
margin-left: auto;
|
|
82
|
+
}
|
|
83
|
+
`
|
|
84
|
+
];
|
|
85
|
+
__decorate([
|
|
86
|
+
property({ type: Object })
|
|
87
|
+
], OxPopupPartitionKeysInput.prototype, "value", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: String })
|
|
90
|
+
], OxPopupPartitionKeysInput.prototype, "valuetype", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: Object })
|
|
93
|
+
], OxPopupPartitionKeysInput.prototype, "confirmCallback", void 0);
|
|
94
|
+
OxPopupPartitionKeysInput = __decorate([
|
|
95
|
+
customElement('ox-popup-partition-keys-input')
|
|
96
|
+
], OxPopupPartitionKeysInput);
|
|
97
|
+
export { OxPopupPartitionKeysInput };
|
|
98
|
+
//# sourceMappingURL=ox-popup-partition-keys-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-popup-partition-keys-input.js","sourceRoot":"","sources":["../../../src/grist-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C,IAAI,EAAE,CAAA;IAChB,CAAC;IAEO,SAAS,CAAC,CAAQ;QACxB,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;CACF,CAAA;AApFQ,gCAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kEAAwC;AAtCxD,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CAqFrC;SArFY,yBAAyB","sourcesContent":["import '@operato/input/ox-input-partition-keys.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-partition-keys-input')\nexport class OxPopupPartitionKeysInput 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-partition-keys {\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: String }) valuetype: string = 'string'\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n return html`\n <ox-input-partition-keys .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-partition-keys>\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 /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n (이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)\n => \n 이런 이유로, Object.assign(...)을 사용하였다.\n */\n\n if (!this.value || typeof this.value !== 'object') {\n this.value = {}\n }\n\n for (let key in this.value) {\n delete this.value[key]\n }\n\n Object.assign(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"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import '@operato/input/ox-input-value-map.js';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
export declare class OxPopupValueMapInput extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult[];
|
|
5
|
+
value: any;
|
|
6
|
+
valuetype: string;
|
|
7
|
+
confirmCallback: (newval: any) => void;
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
9
|
+
private onChange;
|
|
10
|
+
private onCancel;
|
|
11
|
+
private onConfirm;
|
|
12
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@operato/input/ox-input-value-map.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 OxPopupValueMapInput = class OxPopupValueMapInput extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.valuetype = 'string';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return html `
|
|
14
|
+
<ox-input-value-map
|
|
15
|
+
.value=${this.value}
|
|
16
|
+
keytype="string"
|
|
17
|
+
.valuetype=${this.valuetype}
|
|
18
|
+
@change=${this.onChange.bind(this)}
|
|
19
|
+
>
|
|
20
|
+
</ox-input-value-map>
|
|
21
|
+
|
|
22
|
+
<div class="button-container">
|
|
23
|
+
<mwc-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
24
|
+
<mwc-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</mwc-button>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
onChange(e) {
|
|
29
|
+
e.stopPropagation();
|
|
30
|
+
/*
|
|
31
|
+
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
32
|
+
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
33
|
+
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
34
|
+
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
35
|
+
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
36
|
+
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
37
|
+
(이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)
|
|
38
|
+
=>
|
|
39
|
+
이런 이유로, Object.assign(...)을 사용하였다.
|
|
40
|
+
*/
|
|
41
|
+
if (!this.value) {
|
|
42
|
+
this.value = {};
|
|
43
|
+
}
|
|
44
|
+
for (let key in this.value) {
|
|
45
|
+
delete this.value[key];
|
|
46
|
+
}
|
|
47
|
+
Object.assign(this.value, e.detail);
|
|
48
|
+
}
|
|
49
|
+
onCancel(e) {
|
|
50
|
+
history.back();
|
|
51
|
+
}
|
|
52
|
+
onConfirm(e) {
|
|
53
|
+
this.confirmCallback && this.confirmCallback(this.value);
|
|
54
|
+
history.back();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
OxPopupValueMapInput.styles = [
|
|
58
|
+
ScrollbarStyles,
|
|
59
|
+
css `
|
|
60
|
+
:host {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
|
|
64
|
+
background-color: #fff;
|
|
65
|
+
|
|
66
|
+
width: var(--overlay-center-normal-width, 50%);
|
|
67
|
+
height: var(--overlay-center-normal-height, 50%);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
ox-input-value-map {
|
|
71
|
+
flex: 1;
|
|
72
|
+
overflow-y: auto;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
span {
|
|
76
|
+
flex: 1;
|
|
77
|
+
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
|
|
82
|
+
color: var(--primary-color);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.button-container {
|
|
86
|
+
display: flex;
|
|
87
|
+
margin-left: auto;
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
];
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: Object })
|
|
93
|
+
], OxPopupValueMapInput.prototype, "value", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: String })
|
|
96
|
+
], OxPopupValueMapInput.prototype, "valuetype", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: Object })
|
|
99
|
+
], OxPopupValueMapInput.prototype, "confirmCallback", void 0);
|
|
100
|
+
OxPopupValueMapInput = __decorate([
|
|
101
|
+
customElement('ox-popup-value-map-input')
|
|
102
|
+
], OxPopupValueMapInput);
|
|
103
|
+
export { OxPopupValueMapInput };
|
|
104
|
+
//# sourceMappingURL=ox-popup-value-map-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-popup-value-map-input.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-value-map-input.ts"],"names":[],"mappings":";AAAA,OAAO,sCAAsC,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAGvC,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,UAAU;IAApD;;QAqC8B,cAAS,GAAW,QAAQ,CAAA;IAsD1D,CAAC;IAnDC,MAAM;QACJ,OAAO,IAAI,CAAA;;iBAEE,IAAI,CAAC,KAAK;;qBAEN,IAAI,CAAC,SAAS;kBACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;6BAKb,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;6BACtD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;;KAEhF,CAAA;IACH,CAAC;IAEO,QAAQ,CAAC,CAAc;QAC7B,CAAC,CAAC,eAAe,EAAE,CAAA;QAEnB;;;;;;;;;;UAUE;QAEF,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACf,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;SAChB;QAED,KAAK,IAAI,GAAG,IAAI,IAAI,CAAC,KAAK,EAAE;YAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;SACvB;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAEO,QAAQ,CAAC,CAAQ;QACvB,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;IAEO,SAAS,CAAC,CAAQ;QACxB,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,OAAO,CAAC,IAAI,EAAE,CAAA;IAChB,CAAC;CACF,CAAA;AA1FQ,2BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;CACF,CAAA;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6DAAwC;AAtCxD,oBAAoB;IADhC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,oBAAoB,CA2FhC;SA3FY,oBAAoB","sourcesContent":["import '@operato/input/ox-input-value-map.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-value-map-input')\nexport class OxPopupValueMapInput 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-value-map {\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: String }) valuetype: string = 'string'\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n return html`\n <ox-input-value-map\n .value=${this.value}\n keytype=\"string\"\n .valuetype=${this.valuetype}\n @change=${this.onChange.bind(this)}\n >\n </ox-input-value-map>\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 /* \n 주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로, \n layout의 구성에 변화가 발생하면, 다시 render된다.\n 이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)\n 이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,\n 만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.\n 따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.\n (이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)\n => \n 이런 이유로, Object.assign(...)을 사용하였다.\n */\n\n if (!this.value) {\n this.value = {}\n }\n\n for (let key in this.value) {\n delete this.value[key]\n }\n\n Object.assign(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"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import '@operato/data-grist';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
import { DataGrist, FetchOption, GristData, GristRecord } from '@operato/data-grist';
|
|
4
|
+
export declare class OxSelectorResourceId extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult;
|
|
6
|
+
value?: string;
|
|
7
|
+
config: any;
|
|
8
|
+
data: GristData;
|
|
9
|
+
queryName: string;
|
|
10
|
+
basicArgs: any;
|
|
11
|
+
confirmCallback?: (record?: GristRecord) => void;
|
|
12
|
+
selectedRecords: GristRecord[];
|
|
13
|
+
grist: DataGrist;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
onempty(): void;
|
|
16
|
+
oncancel(): void;
|
|
17
|
+
onconfirm(): void;
|
|
18
|
+
firstUpdated(): Promise<void>;
|
|
19
|
+
fetchHandler({ page, limit, sorters, filters }: FetchOption): Promise<{
|
|
20
|
+
total: any;
|
|
21
|
+
records: any;
|
|
22
|
+
}>;
|
|
23
|
+
get selected(): GristRecord | undefined;
|
|
24
|
+
}
|