@operato/grist-editor 2.0.0-alpha.12 → 2.0.0-alpha.120
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 +615 -0
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-grist-editor-crontab.d.ts +1 -1
- package/dist/src/ox-grist-editor-duration.d.ts +1 -1
- package/dist/src/ox-grist-editor-hashtags.d.ts +1 -1
- package/dist/src/ox-grist-editor-i18n-label.d.ts +13 -0
- package/dist/src/ox-grist-editor-i18n-label.js +85 -0
- package/dist/src/ox-grist-editor-i18n-label.js.map +1 -0
- package/dist/src/ox-grist-editor-parameters.d.ts +1 -1
- package/dist/src/ox-grist-editor-partition-keys.d.ts +1 -1
- package/dist/src/ox-grist-editor-partition-keys.js +1 -1
- package/dist/src/ox-grist-editor-partition-keys.js.map +1 -1
- package/dist/src/ox-grist-editor-quantifier.d.ts +1 -1
- package/dist/src/ox-grist-editor-value-map.d.ts +1 -1
- package/dist/src/ox-grist-editor-value-ranges.d.ts +1 -1
- package/dist/src/ox-grist-renderer-i18n-label.d.ts +2 -0
- package/dist/src/ox-grist-renderer-i18n-label.js +9 -0
- package/dist/src/ox-grist-renderer-i18n-label.js.map +1 -0
- package/dist/src/ox-grist-renderer-partition-keys.d.ts +1 -1
- package/dist/src/ox-grist-renderer-partition-keys.js +4 -4
- package/dist/src/ox-grist-renderer-partition-keys.js.map +1 -1
- package/dist/src/ox-parameters-builder.d.ts +15 -1
- package/dist/src/ox-parameters-builder.js +6 -0
- package/dist/src/ox-parameters-builder.js.map +1 -1
- package/dist/src/ox-popup-crontab-input.d.ts +2 -1
- package/dist/src/ox-popup-crontab-input.js +7 -8
- package/dist/src/ox-popup-crontab-input.js.map +1 -1
- package/dist/src/ox-popup-duration-input.d.ts +2 -1
- package/dist/src/ox-popup-duration-input.js +7 -8
- package/dist/src/ox-popup-duration-input.js.map +1 -1
- package/dist/src/ox-popup-hashtags-input.d.ts +2 -1
- package/dist/src/ox-popup-hashtags-input.js +8 -9
- package/dist/src/ox-popup-hashtags-input.js.map +1 -1
- package/dist/src/ox-popup-i18n-label-input.d.ts +16 -0
- package/dist/src/ox-popup-i18n-label-input.js +100 -0
- package/dist/src/ox-popup-i18n-label-input.js.map +1 -0
- package/dist/src/ox-popup-parameters-builder.d.ts +2 -1
- package/dist/src/ox-popup-parameters-builder.js +10 -8
- package/dist/src/ox-popup-parameters-builder.js.map +1 -1
- package/dist/src/ox-popup-partition-keys-input.d.ts +2 -1
- package/dist/src/ox-popup-partition-keys-input.js +7 -8
- package/dist/src/ox-popup-partition-keys-input.js.map +1 -1
- package/dist/src/ox-popup-value-map-input.d.ts +2 -1
- package/dist/src/ox-popup-value-map-input.js +7 -8
- package/dist/src/ox-popup-value-map-input.js.map +1 -1
- package/dist/src/ox-popup-value-ranges-input.d.ts +2 -1
- package/dist/src/ox-popup-value-ranges-input.js +7 -8
- package/dist/src/ox-popup-value-ranges-input.js.map +1 -1
- package/dist/stories/ox-grist-editor-crontab.stories.d.ts +1 -1
- package/dist/stories/ox-grist-editor-crontab.stories.js +66 -54
- package/dist/stories/ox-grist-editor-crontab.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +44 -36
- package/src/index.ts +4 -0
- package/src/ox-grist-editor-i18n-label.ts +101 -0
- package/src/ox-grist-editor-partition-keys.ts +1 -1
- package/src/ox-grist-renderer-i18n-label.ts +12 -0
- package/src/ox-grist-renderer-partition-keys.ts +4 -4
- package/src/ox-parameters-builder.ts +8 -2
- package/src/ox-popup-crontab-input.ts +7 -8
- package/src/ox-popup-duration-input.ts +7 -8
- package/src/ox-popup-hashtags-input.ts +8 -9
- package/src/ox-popup-i18n-label-input.ts +97 -0
- package/src/ox-popup-parameters-builder.ts +10 -8
- package/src/ox-popup-partition-keys-input.ts +7 -8
- package/src/ox-popup-value-map-input.ts +8 -8
- package/src/ox-popup-value-ranges-input.ts +7 -8
- package/stories/ox-grist-editor-crontab.stories.ts +71 -60
- package/themes/grist-theme.css +3 -1
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@operato/input/ox-input-i18n-label.js';
|
|
4
|
+
import { css, html, LitElement } from 'lit';
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
6
|
+
import { i18next } from '@operato/i18n';
|
|
7
|
+
import { closePopup } from '@operato/popup';
|
|
8
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
9
|
+
let OxPopupValueMapInput = class OxPopupValueMapInput extends LitElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.languages = [];
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return html `
|
|
16
|
+
<ox-input-i18n-label .value=${this.value} .languages=${this.languages} @change=${this.onChange.bind(this)}>
|
|
17
|
+
</ox-input-i18n-label>
|
|
18
|
+
|
|
19
|
+
<div class="button-container">
|
|
20
|
+
<button @click=${this.onCancel.bind(this)} danger>
|
|
21
|
+
<md-icon>cancel</md-icon>${i18next.t('button.cancel')}
|
|
22
|
+
</button>
|
|
23
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
onChange(e) {
|
|
28
|
+
e.stopPropagation();
|
|
29
|
+
/*
|
|
30
|
+
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
31
|
+
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
32
|
+
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
33
|
+
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
34
|
+
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
35
|
+
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
36
|
+
(이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)
|
|
37
|
+
=>
|
|
38
|
+
이런 이유로, Object.assign(...)을 사용하였다.
|
|
39
|
+
*/
|
|
40
|
+
if (!this.value || typeof this.value !== 'object') {
|
|
41
|
+
this.value = {};
|
|
42
|
+
}
|
|
43
|
+
for (let key in this.value) {
|
|
44
|
+
delete this.value[key];
|
|
45
|
+
}
|
|
46
|
+
Object.assign(this.value, e.detail);
|
|
47
|
+
}
|
|
48
|
+
onCancel(e) {
|
|
49
|
+
closePopup(this);
|
|
50
|
+
}
|
|
51
|
+
onConfirm(e) {
|
|
52
|
+
this.confirmCallback && this.confirmCallback(this.value);
|
|
53
|
+
closePopup(this);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
OxPopupValueMapInput.styles = [
|
|
57
|
+
ButtonContainerStyles,
|
|
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-i18n-label {
|
|
71
|
+
flex: 1;
|
|
72
|
+
overflow-y: auto;
|
|
73
|
+
padding: var(--padding-default);
|
|
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
|
+
];
|
|
87
|
+
__decorate([
|
|
88
|
+
property({ type: Object })
|
|
89
|
+
], OxPopupValueMapInput.prototype, "value", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
property({ type: Array })
|
|
92
|
+
], OxPopupValueMapInput.prototype, "languages", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
property({ type: Object })
|
|
95
|
+
], OxPopupValueMapInput.prototype, "confirmCallback", void 0);
|
|
96
|
+
OxPopupValueMapInput = __decorate([
|
|
97
|
+
customElement('ox-popup-i18n-label-input')
|
|
98
|
+
], OxPopupValueMapInput);
|
|
99
|
+
export { OxPopupValueMapInput };
|
|
100
|
+
//# sourceMappingURL=ox-popup-i18n-label-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ox-popup-i18n-label-input.js","sourceRoot":"","sources":["../../src/ox-popup-i18n-label-input.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,uCAAuC,CAAA;AAE9C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjE,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAA7C;;QAkCsB,cAAS,GAAwC,EAAE,CAAA;IAmDhF,CAAC;IAhDC,MAAM;QACJ,OAAO,IAAI,CAAA;oCACqB,IAAI,CAAC,KAAK,eAAe,IAAI,CAAC,SAAS,YAAY,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;;;yBAItF,IAAI,CAAC,QAAQ,CAAC,IAAI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C,aAAa,CAAC,2BAA2B,CAAC;GAC9B,oBAAoB,CAqFhC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-i18n-label.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-i18n-label-input')\nexport class OxPopupValueMapInput extends LitElement {\n static styles = [\n ButtonContainerStyles,\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-i18n-label {\n flex: 1;\n overflow-y: auto;\n padding: var(--padding-default);\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 ]\n\n @property({ type: Object }) value: any\n @property({ type: Array }) languages: { code: string; display: string }[] = []\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n return html`\n <ox-input-i18n-label .value=${this.value} .languages=${this.languages} @change=${this.onChange.bind(this)}>\n </ox-input-i18n-label>\n\n <div class=\"button-container\">\n <button @click=${this.onCancel.bind(this)} danger>\n <md-icon>cancel</md-icon>${i18next.t('button.cancel')}\n </button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</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 closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
1
2
|
import '@operato/i18n/ox-i18n.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
export declare class OxPopupParametersBuilder extends LitElement {
|
|
@@ -7,7 +8,7 @@ export declare class OxPopupParametersBuilder extends LitElement {
|
|
|
7
8
|
host: any;
|
|
8
9
|
context: any;
|
|
9
10
|
confirmCallback: (newval: any) => void;
|
|
10
|
-
render(): import("lit").TemplateResult<1>;
|
|
11
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
11
12
|
private onChange;
|
|
12
13
|
private onCancel;
|
|
13
14
|
private onConfirm;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
2
3
|
import '@operato/i18n/ox-i18n.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
6
|
import { i18next } from '@operato/i18n';
|
|
6
7
|
import { closePopup } from '@operato/popup';
|
|
7
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
8
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
8
9
|
let OxPopupParametersBuilder = class OxPopupParametersBuilder extends LitElement {
|
|
9
10
|
render() {
|
|
10
11
|
var props = this.props instanceof Array ? this.props : [];
|
|
@@ -23,8 +24,10 @@ let OxPopupParametersBuilder = class OxPopupParametersBuilder extends LitElement
|
|
|
23
24
|
: html ` <span><ox-i18n msgid="text.no properties to set"></ox-i18n></span> `}
|
|
24
25
|
|
|
25
26
|
<div class="button-container">
|
|
26
|
-
<
|
|
27
|
-
|
|
27
|
+
<button @click=${this.onCancel.bind(this)} danger>
|
|
28
|
+
<md-icon>cancel</md-icon>${i18next.t('button.cancel')}
|
|
29
|
+
</button>
|
|
30
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
28
31
|
</div>
|
|
29
32
|
`;
|
|
30
33
|
}
|
|
@@ -58,6 +61,7 @@ let OxPopupParametersBuilder = class OxPopupParametersBuilder extends LitElement
|
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
63
|
OxPopupParametersBuilder.styles = [
|
|
64
|
+
ButtonContainerStyles,
|
|
61
65
|
ScrollbarStyles,
|
|
62
66
|
css `
|
|
63
67
|
:host {
|
|
@@ -73,6 +77,9 @@ OxPopupParametersBuilder.styles = [
|
|
|
73
77
|
ox-parameters-builder {
|
|
74
78
|
flex: 1;
|
|
75
79
|
overflow-y: auto;
|
|
80
|
+
|
|
81
|
+
display: flex;
|
|
82
|
+
flex-direction: column;
|
|
76
83
|
}
|
|
77
84
|
|
|
78
85
|
span {
|
|
@@ -84,11 +91,6 @@ OxPopupParametersBuilder.styles = [
|
|
|
84
91
|
|
|
85
92
|
color: var(--primary-color);
|
|
86
93
|
}
|
|
87
|
-
|
|
88
|
-
.button-container {
|
|
89
|
-
display: flex;
|
|
90
|
-
margin-left: auto;
|
|
91
|
-
}
|
|
92
94
|
`
|
|
93
95
|
];
|
|
94
96
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-parameters-builder.js","sourceRoot":"","sources":["../../src/ox-popup-parameters-builder.ts"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ACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iEAAwC;AAvCxD,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAmGpC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-parameters-builder')\nexport class OxPopupParametersBuilder extends LitElement {\n static styles = [\n ButtonContainerStyles,\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 display: flex;\n flex-direction: column;\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 ]\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><ox-i18n msgid=\"text.no properties to set\"></ox-i18n></span> `}\n\n <div class=\"button-container\">\n <button @click=${this.onCancel.bind(this)} danger>\n <md-icon>cancel</md-icon>${i18next.t('button.cancel')}\n </button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</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 closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
1
2
|
import '@operato/input/ox-input-partition-keys.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
export declare class OxPopupPartitionKeysInput extends LitElement {
|
|
@@ -5,7 +6,7 @@ export declare class OxPopupPartitionKeysInput extends LitElement {
|
|
|
5
6
|
value: any;
|
|
6
7
|
valuetype: string;
|
|
7
8
|
confirmCallback: (newval: any) => void;
|
|
8
|
-
render(): import("lit").TemplateResult<1>;
|
|
9
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
9
10
|
private onChange;
|
|
10
11
|
private onCancel;
|
|
11
12
|
private onConfirm;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
2
3
|
import '@operato/input/ox-input-partition-keys.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
6
|
import { i18next } from '@operato/i18n';
|
|
6
7
|
import { closePopup } from '@operato/popup';
|
|
7
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
8
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
8
9
|
let OxPopupPartitionKeysInput = class OxPopupPartitionKeysInput extends LitElement {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -15,8 +16,10 @@ let OxPopupPartitionKeysInput = class OxPopupPartitionKeysInput extends LitEleme
|
|
|
15
16
|
<ox-input-partition-keys .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-partition-keys>
|
|
16
17
|
|
|
17
18
|
<div class="button-container">
|
|
18
|
-
<
|
|
19
|
-
|
|
19
|
+
<button @click=${this.onCancel.bind(this)} danger>
|
|
20
|
+
<md-icon>cancel</md-icon>${i18next.t('button.cancel')}
|
|
21
|
+
</button>
|
|
22
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
20
23
|
</div>
|
|
21
24
|
`;
|
|
22
25
|
}
|
|
@@ -50,6 +53,7 @@ let OxPopupPartitionKeysInput = class OxPopupPartitionKeysInput extends LitEleme
|
|
|
50
53
|
}
|
|
51
54
|
};
|
|
52
55
|
OxPopupPartitionKeysInput.styles = [
|
|
56
|
+
ButtonContainerStyles,
|
|
53
57
|
ScrollbarStyles,
|
|
54
58
|
css `
|
|
55
59
|
:host {
|
|
@@ -77,11 +81,6 @@ OxPopupPartitionKeysInput.styles = [
|
|
|
77
81
|
|
|
78
82
|
color: var(--primary-color);
|
|
79
83
|
}
|
|
80
|
-
|
|
81
|
-
.button-container {
|
|
82
|
-
display: flex;
|
|
83
|
-
margin-left: auto;
|
|
84
|
-
}
|
|
85
84
|
`
|
|
86
85
|
];
|
|
87
86
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-partition-keys-input.js","sourceRoot":"","sources":["../../src/ox-popup-partition-keys-input.ts"],"names":[],"mappings":";AAAA,OAAO,2CAA2C,CAAA;AAElD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"ox-popup-partition-keys-input.js","sourceRoot":"","sources":["../../src/ox-popup-partition-keys-input.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,2CAA2C,CAAA;AAElD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjE,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAkCuB,cAAS,GAAW,QAAQ,CAAA;IAkD1D,CAAC;IA/CC,MAAM;QACJ,OAAO,IAAI,CAAA;wCACyB,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;;yBAG7D,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;qCACZ,OAAO,CAAC,CAAC,CAAC,eAAe,CAA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":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-partition-keys.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-partition-keys-input')\nexport class OxPopupPartitionKeysInput extends LitElement {\n static styles = [\n ButtonContainerStyles,\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 padding: 10px;\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 ]\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 <button @click=${this.onCancel.bind(this)} danger>\n <md-icon>cancel</md-icon>${i18next.t('button.cancel')}\n </button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</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 closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
1
2
|
import '@operato/input/ox-input-value-map.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
export declare class OxPopupValueMapInput extends LitElement {
|
|
@@ -6,7 +7,7 @@ export declare class OxPopupValueMapInput extends LitElement {
|
|
|
6
7
|
valuetype: string;
|
|
7
8
|
confirmCallback: (newval: any) => void;
|
|
8
9
|
defaultValue?: string;
|
|
9
|
-
render(): import("lit").TemplateResult<1>;
|
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
11
|
private onChange;
|
|
11
12
|
private onCancel;
|
|
12
13
|
private onConfirm;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
2
3
|
import '@operato/input/ox-input-value-map.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
6
|
import { i18next } from '@operato/i18n';
|
|
6
7
|
import { closePopup } from '@operato/popup';
|
|
7
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
8
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
8
9
|
let OxPopupValueMapInput = class OxPopupValueMapInput extends LitElement {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -22,8 +23,10 @@ let OxPopupValueMapInput = class OxPopupValueMapInput extends LitElement {
|
|
|
22
23
|
</ox-input-value-map>
|
|
23
24
|
|
|
24
25
|
<div class="button-container">
|
|
25
|
-
<
|
|
26
|
-
|
|
26
|
+
<button @click=${this.onCancel.bind(this)} danger>
|
|
27
|
+
<md-icon>cancel</md-icon>${i18next.t('button.cancel')}
|
|
28
|
+
</button>
|
|
29
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
27
30
|
</div>
|
|
28
31
|
`;
|
|
29
32
|
}
|
|
@@ -57,6 +60,7 @@ let OxPopupValueMapInput = class OxPopupValueMapInput extends LitElement {
|
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
62
|
OxPopupValueMapInput.styles = [
|
|
63
|
+
ButtonContainerStyles,
|
|
60
64
|
ScrollbarStyles,
|
|
61
65
|
css `
|
|
62
66
|
:host {
|
|
@@ -83,11 +87,6 @@ OxPopupValueMapInput.styles = [
|
|
|
83
87
|
|
|
84
88
|
color: var(--primary-color);
|
|
85
89
|
}
|
|
86
|
-
|
|
87
|
-
.button-container {
|
|
88
|
-
display: flex;
|
|
89
|
-
margin-left: auto;
|
|
90
|
-
}
|
|
91
90
|
`
|
|
92
91
|
];
|
|
93
92
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-value-map-input.js","sourceRoot":"","sources":["../../src/ox-popup-value-map-input.ts"],"names":[],"mappings":";AAAA,OAAO,sCAAsC,CAAA;AAE7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{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KAAK,CAAC,GAAG,CAAC,CAAA;QACxB,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAA;IACrC,CAAC;IAEO,QAAQ,CAAC,CAAQ;QACvB,UAAU,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC;IAEO,SAAS,CAAC,CAAQ;QACxB,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,UAAU,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC;;AAzFM,2BAAM,GAAG;IACd,qBAAqB;IACrB,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAyBF;CACF,AA7BY,CA6BZ;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;AACX;IAAvD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAAsB;AAnClE,oBAAoB;IADhC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,oBAAoB,CA2FhC","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport '@operato/input/ox-input-value-map.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-value-map-input')\nexport class OxPopupValueMapInput extends LitElement {\n static styles = [\n ButtonContainerStyles,\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 ]\n\n @property({ type: Object }) value: any\n @property({ type: String }) valuetype: string = 'string'\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n @property({ type: String, attribute: 'default-value' }) defaultValue?: string\n\n render() {\n return html`\n <ox-input-value-map\n .value=${this.value}\n keytype=\"string\"\n .valuetype=${this.valuetype}\n .defaultValue=${this.defaultValue}\n @change=${this.onChange.bind(this)}\n >\n </ox-input-value-map>\n\n <div class=\"button-container\">\n <button @click=${this.onCancel.bind(this)} danger>\n <md-icon>cancel</md-icon>${i18next.t('button.cancel')}\n </button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</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 closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
1
2
|
import '@operato/input/ox-input-value-ranges.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
export declare class OxPopupValueRangesInput extends LitElement {
|
|
@@ -6,7 +7,7 @@ export declare class OxPopupValueRangesInput extends LitElement {
|
|
|
6
7
|
valuetype: string;
|
|
7
8
|
confirmCallback: (newval: any) => void;
|
|
8
9
|
defaultValue?: string;
|
|
9
|
-
render(): import("lit").TemplateResult<1>;
|
|
10
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
10
11
|
private onChange;
|
|
11
12
|
private onCancel;
|
|
12
13
|
private onConfirm;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
2
3
|
import '@operato/input/ox-input-value-ranges.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
5
6
|
import { i18next } from '@operato/i18n';
|
|
6
7
|
import { closePopup } from '@operato/popup';
|
|
7
|
-
import { ScrollbarStyles } from '@operato/styles';
|
|
8
|
+
import { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles';
|
|
8
9
|
let OxPopupValueRangesInput = class OxPopupValueRangesInput extends LitElement {
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
@@ -22,8 +23,10 @@ let OxPopupValueRangesInput = class OxPopupValueRangesInput extends LitElement {
|
|
|
22
23
|
</ox-input-value-ranges>
|
|
23
24
|
|
|
24
25
|
<div class="button-container">
|
|
25
|
-
<
|
|
26
|
-
|
|
26
|
+
<button @click=${this.onCancel.bind(this)} danger>
|
|
27
|
+
<md-icon>cancel</md-icon>${i18next.t('button.cancel')}
|
|
28
|
+
</button>
|
|
29
|
+
<button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
27
30
|
</div>
|
|
28
31
|
`;
|
|
29
32
|
}
|
|
@@ -57,6 +60,7 @@ let OxPopupValueRangesInput = class OxPopupValueRangesInput extends LitElement {
|
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
62
|
OxPopupValueRangesInput.styles = [
|
|
63
|
+
ButtonContainerStyles,
|
|
60
64
|
ScrollbarStyles,
|
|
61
65
|
css `
|
|
62
66
|
:host {
|
|
@@ -83,11 +87,6 @@ OxPopupValueRangesInput.styles = [
|
|
|
83
87
|
|
|
84
88
|
color: var(--primary-color);
|
|
85
89
|
}
|
|
86
|
-
|
|
87
|
-
.button-container {
|
|
88
|
-
display: flex;
|
|
89
|
-
margin-left: auto;
|
|
90
|
-
}
|
|
91
90
|
`
|
|
92
91
|
];
|
|
93
92
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-value-ranges-input.js","sourceRoot":"","sources":["../../src/ox-popup-value-ranges-input.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"ox-popup-value-ranges-input.js","sourceRoot":"","sources":["../../src/ox-popup-value-ranges-input.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAEhD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,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IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,UAAU,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC;;AAzFM,8BAAM,GAAG;IACd,qBAAqB;IACrB,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAyBF;CACF,AA7BY,CA6BZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0DAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gEAAwC;AACX;IAAvD,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;6DAAsB;AAnClE,uBAAuB;IADnC,aAAa,CAAC,6BAA6B,CAAC;GAChC,uBAAuB,CA2FnC","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-value-ranges.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ButtonContainerStyles, ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-value-ranges-input')\nexport class OxPopupValueRangesInput extends LitElement {\n static styles = [\n ButtonContainerStyles,\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-ranges {\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 ]\n\n @property({ type: Object }) value: any\n @property({ type: String }) valuetype: string = 'string'\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n @property({ type: String, attribute: 'default-value' }) defaultValue?: string\n\n render() {\n return html`\n <ox-input-value-ranges\n .value=${this.value}\n keytype=\"string\"\n .valuetype=${this.valuetype}\n .defaultValue=${this.defaultValue}\n @change=${this.onChange.bind(this)}\n >\n </ox-input-value-ranges>\n\n <div class=\"button-container\">\n <button @click=${this.onCancel.bind(this)} danger>\n <md-icon>cancel</md-icon>${i18next.t('button.cancel')}\n </button>\n <button @click=${this.onConfirm.bind(this)}><md-icon>done</md-icon>${i18next.t('button.confirm')}</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 closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -6,7 +6,7 @@ import '@operato/property-editor/ox-properties-dynamic-view.js';
|
|
|
6
6
|
import '@operato/data-grist';
|
|
7
7
|
import '@operato/data-grist/ox-filters-form.js';
|
|
8
8
|
import '@operato/data-grist/ox-sorters-control.js';
|
|
9
|
-
import '@material/
|
|
9
|
+
import '@material/web/icon/icon.js';
|
|
10
10
|
import { TemplateResult } from 'lit';
|
|
11
11
|
declare const _default: {
|
|
12
12
|
title: string;
|
|
@@ -7,7 +7,7 @@ import '@operato/property-editor/ox-properties-dynamic-view.js';
|
|
|
7
7
|
import '@operato/data-grist';
|
|
8
8
|
import '@operato/data-grist/ox-filters-form.js';
|
|
9
9
|
import '@operato/data-grist/ox-sorters-control.js';
|
|
10
|
-
import '@material/
|
|
10
|
+
import '@material/web/icon/icon.js';
|
|
11
11
|
/* set grist-editors */
|
|
12
12
|
import { css, html, LitElement } from 'lit';
|
|
13
13
|
import { state } from 'lit/decorators.js';
|
|
@@ -311,9 +311,9 @@ class GristDemo extends LitElement {
|
|
|
311
311
|
|
|
312
312
|
<div slot="headroom" id="headroom">
|
|
313
313
|
<div id="modes">
|
|
314
|
-
<
|
|
315
|
-
<
|
|
316
|
-
<
|
|
314
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>
|
|
315
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>
|
|
316
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
317
317
|
</div>
|
|
318
318
|
</div>
|
|
319
319
|
</ox-grist>
|
|
@@ -353,65 +353,77 @@ export default {
|
|
|
353
353
|
argTypes: {}
|
|
354
354
|
};
|
|
355
355
|
const Template = ({}) => html `
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
356
|
+
<link
|
|
357
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
358
|
+
rel="stylesheet"
|
|
359
|
+
/>
|
|
360
|
+
<link
|
|
361
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
362
|
+
rel="stylesheet"
|
|
363
|
+
/>
|
|
364
|
+
<link
|
|
365
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
366
|
+
rel="stylesheet"
|
|
367
|
+
/>
|
|
360
368
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
flex-direction: row;
|
|
365
|
-
align-items: center;
|
|
366
|
-
padding: var(--padding-default) var(--padding-wide);
|
|
367
|
-
background-color: var(--theme-white-color);
|
|
368
|
-
box-shadow: var(--box-shadow);
|
|
369
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
370
|
+
<link href="/themes/oops-theme.css" rel="stylesheet" />
|
|
371
|
+
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
369
372
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
margin-right: var(--margin-default);
|
|
379
|
-
padding-left: var(--padding-narrow);
|
|
380
|
-
border-bottom: var(--border-dark-color);
|
|
381
|
-
position: relative;
|
|
382
|
-
color: var(--secondary-color);
|
|
383
|
-
font-size: var(--fontsize-default);
|
|
384
|
-
user-select: none;
|
|
385
|
-
}
|
|
373
|
+
<style>
|
|
374
|
+
[slot='headroom'] {
|
|
375
|
+
display: flex;
|
|
376
|
+
flex-direction: row;
|
|
377
|
+
align-items: center;
|
|
378
|
+
padding: var(--padding-default) var(--padding-wide);
|
|
379
|
+
background-color: var(--theme-white-color);
|
|
380
|
+
box-shadow: var(--box-shadow);
|
|
386
381
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
382
|
+
--md-icon-size: 24px;
|
|
383
|
+
}
|
|
384
|
+
#sorters md-icon,
|
|
385
|
+
#modes md-icon {
|
|
386
|
+
--md-icon-size: 18px;
|
|
387
|
+
}
|
|
388
|
+
#sorters {
|
|
389
|
+
margin-left: auto;
|
|
390
|
+
margin-right: var(--margin-default);
|
|
391
|
+
padding-left: var(--padding-narrow);
|
|
392
|
+
border-bottom: var(--border-dark-color);
|
|
393
|
+
position: relative;
|
|
394
|
+
color: var(--secondary-color);
|
|
395
|
+
font-size: var(--fontsize-default);
|
|
396
|
+
user-select: none;
|
|
397
|
+
}
|
|
391
398
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
}
|
|
399
|
+
#sorters > * {
|
|
400
|
+
padding: var(--padding-narrow);
|
|
401
|
+
vertical-align: middle;
|
|
402
|
+
}
|
|
397
403
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
404
|
+
#filters {
|
|
405
|
+
display: flex;
|
|
406
|
+
justify-content: center;
|
|
407
|
+
align-items: center;
|
|
408
|
+
}
|
|
401
409
|
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
}
|
|
410
|
+
#filters * {
|
|
411
|
+
margin-right: var(--margin-default);
|
|
412
|
+
}
|
|
406
413
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
414
|
+
@media only screen and (max-width: 460px) {
|
|
415
|
+
#filters {
|
|
416
|
+
flex-direction: column;
|
|
410
417
|
}
|
|
411
|
-
</style>
|
|
412
418
|
|
|
413
|
-
|
|
414
|
-
|
|
419
|
+
#modes {
|
|
420
|
+
display: none;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
</style>
|
|
424
|
+
|
|
425
|
+
<ox-grist-demo mode="LIST"></ox-grist-demo>
|
|
426
|
+
`;
|
|
415
427
|
export const Regular = Template.bind({});
|
|
416
428
|
Regular.args = {};
|
|
417
429
|
//# sourceMappingURL=ox-grist-editor-crontab.stories.js.map
|