@operato/grist-editor 2.0.0-alpha.7 → 2.0.0-alpha.77
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 +362 -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-popup-crontab-input.d.ts +2 -1
- package/dist/src/ox-popup-crontab-input.js +5 -2
- 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 +5 -2
- 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 +5 -2
- 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 +104 -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 +5 -2
- 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 +5 -2
- 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 +5 -2
- 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 +3 -2
- 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-popup-crontab-input.ts +5 -2
- package/src/ox-popup-duration-input.ts +5 -2
- package/src/ox-popup-hashtags-input.ts +5 -2
- package/src/ox-popup-i18n-label-input.ts +101 -0
- package/src/ox-popup-parameters-builder.ts +5 -2
- package/src/ox-popup-partition-keys-input.ts +5 -2
- package/src/ox-popup-value-map-input.ts +6 -2
- package/src/ox-popup-value-ranges-input.ts +3 -2
- package/stories/ox-grist-editor-crontab.stories.ts +71 -60
- package/themes/grist-theme.css +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
function onmouseover(e, value) {
|
|
4
4
|
const element = e.target;
|
|
@@ -11,11 +11,11 @@ function onmouseout(e) {
|
|
|
11
11
|
}
|
|
12
12
|
export const OxGristRendererPartitionKeys = (value, column, record, rowIndex, field) => {
|
|
13
13
|
return value && value instanceof Array && value.length > 0
|
|
14
|
-
? html `<
|
|
15
|
-
style="--
|
|
14
|
+
? html `<md-icon
|
|
15
|
+
style="--md-icon-size:1.3em"
|
|
16
16
|
@mouseover=${(e) => onmouseover(e, value)}
|
|
17
17
|
@mouseout=${onmouseout}
|
|
18
|
-
>key</
|
|
18
|
+
>key</md-icon
|
|
19
19
|
>`
|
|
20
20
|
: html ``;
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-grist-renderer-partition-keys.js","sourceRoot":"","sources":["../../src/ox-grist-renderer-partition-keys.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ox-grist-renderer-partition-keys.js","sourceRoot":"","sources":["../../src/ox-grist-renderer-partition-keys.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAG1B,SAAS,WAAW,CAAC,CAAa,EAAE,KAAY;IAC9C,MAAM,OAAO,GAAG,CAAC,CAAC,MAAwB,CAAA;IAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACpD,OAAO,CAAC,YAAY,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA;AAC/C,CAAC;AAED,SAAS,UAAU,CAAC,CAAa;IAC/B,MAAM,OAAO,GAAG,CAAC,CAAC,MAAwB,CAAA;IAC1C,OAAO,CAAC,eAAe,CAAC,cAAc,CAAC,CAAA;AACzC,CAAC;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IACpG,OAAO,KAAK,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QACxD,CAAC,CAAC,IAAI,CAAA;;qBAEW,CAAC,CAAa,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,CAAC;oBACzC,UAAU;;QAEtB;QACJ,CAAC,CAAC,IAAI,CAAA,EAAE,CAAA;AACZ,CAAC,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\nimport { html } from 'lit'\nimport { FieldRenderer } from '@operato/data-grist'\n\nfunction onmouseover(e: MouseEvent, value: any[]) {\n const element = e.target as HTMLPreElement\n const tooltip = value.map(key => key.name).join(',')\n element.setAttribute('data-tooltip', tooltip)\n}\n\nfunction onmouseout(e: MouseEvent) {\n const element = e.target as HTMLPreElement\n element.removeAttribute('data-tooltip')\n}\n\nexport const OxGristRendererPartitionKeys: FieldRenderer = (value, column, record, rowIndex, field) => {\n return value && value instanceof Array && value.length > 0\n ? html`<md-icon\n style=\"--md-icon-size:1.3em\"\n @mouseover=${(e: MouseEvent) => onmouseover(e, value)}\n @mouseout=${onmouseout}\n >key</md-icon\n >`\n : html``\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js';
|
|
1
2
|
import '@operato/input/ox-input-crontab.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
export declare class OxPopupCrontabInput extends LitElement {
|
|
4
5
|
static styles: import("lit").CSSResult[];
|
|
5
6
|
value: any;
|
|
6
7
|
confirmCallback: (newval: any) => void;
|
|
7
|
-
render(): import("lit").TemplateResult<1>;
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
8
9
|
private onChange;
|
|
9
10
|
private onCancel;
|
|
10
11
|
private onConfirm;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.js';
|
|
2
3
|
import '@operato/input/ox-input-crontab.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
@@ -11,8 +12,8 @@ let OxPopupCrontabInput = class OxPopupCrontabInput extends LitElement {
|
|
|
11
12
|
<ox-input-crontab .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-crontab>
|
|
12
13
|
|
|
13
14
|
<div class="button-container">
|
|
14
|
-
<
|
|
15
|
-
<
|
|
15
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
16
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
16
17
|
</div>
|
|
17
18
|
`;
|
|
18
19
|
}
|
|
@@ -59,6 +60,8 @@ OxPopupCrontabInput.styles = [
|
|
|
59
60
|
.button-container {
|
|
60
61
|
display: flex;
|
|
61
62
|
margin-left: auto;
|
|
63
|
+
gap: 10px;
|
|
64
|
+
padding: var(--padding-default);
|
|
62
65
|
}
|
|
63
66
|
`
|
|
64
67
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-crontab-input.js","sourceRoot":"","sources":["../../src/ox-popup-crontab-input.ts"],"names":[],"mappings":";AAAA,OAAO,oCAAoC,CAAA;AAE3C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,mBAAmB,GAA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;;AAhEM,0BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCF;CACF,AAnCY,CAmCZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DAAwC;AAvCxD,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAkE/B","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@operato/input/ox-input-crontab.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-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 gap: 10px;\n padding: var(--padding-default);\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 <md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>\n <md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>\n </div>\n `\n }\n\n private onChange(e: CustomEvent) {\n e.stopPropagation()\n\n this.value = e.detail\n }\n\n private onCancel(e: Event) {\n closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js';
|
|
1
2
|
import '@operato/input/ox-input-duration.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
export declare class OxPopupDurationInput extends LitElement {
|
|
4
5
|
static styles: import("lit").CSSResult[];
|
|
5
6
|
value: any;
|
|
6
7
|
confirmCallback: (newval: any) => void;
|
|
7
|
-
render(): import("lit").TemplateResult<1>;
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
8
9
|
private onChange;
|
|
9
10
|
private onCancel;
|
|
10
11
|
private onConfirm;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.js';
|
|
2
3
|
import '@operato/input/ox-input-duration.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
@@ -11,8 +12,8 @@ let OxPopupDurationInput = class OxPopupDurationInput extends LitElement {
|
|
|
11
12
|
<ox-input-duration .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-duration>
|
|
12
13
|
|
|
13
14
|
<div class="button-container">
|
|
14
|
-
<
|
|
15
|
-
<
|
|
15
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
16
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
16
17
|
</div>
|
|
17
18
|
`;
|
|
18
19
|
}
|
|
@@ -49,6 +50,8 @@ OxPopupDurationInput.styles = [
|
|
|
49
50
|
.button-container {
|
|
50
51
|
display: flex;
|
|
51
52
|
margin-left: auto;
|
|
53
|
+
gap: 10px;
|
|
54
|
+
padding: var(--padding-default);
|
|
52
55
|
}
|
|
53
56
|
`
|
|
54
57
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-duration-input.js","sourceRoot":"","sources":["../../src/ox-popup-duration-input.ts"],"names":[],"mappings":";AAAA,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"ox-popup-duration-input.js","sourceRoot":"","sources":["../../src/ox-popup-duration-input.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IA+BlD,MAAM;QACJ,OAAO,IAAI,CAAA;kCACmB,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;;;qCAG3C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;qCACtD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;;KAExF,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,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;;AAtDM,2BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;KAsBF;CACF,AAzBY,CAyBZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6DAAwC;AA7BxD,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CAwDhC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@operato/input/ox-input-duration.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-duration-input')\nexport class OxPopupDurationInput 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-duration {\n flex: 1;\n overflow-y: auto;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n gap: 10px;\n padding: var(--padding-default);\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-duration .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-duration>\n\n <div class=\"button-container\">\n <md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>\n <md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>\n </div>\n `\n }\n\n private onChange(e: CustomEvent) {\n e.stopPropagation()\n\n this.value = e.detail\n }\n\n private onCancel(e: Event) {\n closePopup(this)\n }\n\n private onConfirm(e: Event) {\n this.confirmCallback && this.confirmCallback(this.value)\n closePopup(this)\n }\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js';
|
|
1
2
|
import '@operato/input/ox-input-hashtags.js';
|
|
2
3
|
import { LitElement } from 'lit';
|
|
3
4
|
export declare class OxPopupHashtagsInput extends LitElement {
|
|
4
5
|
static styles: import("lit").CSSResult[];
|
|
5
6
|
value: string[];
|
|
6
7
|
confirmCallback: (newval: any) => void;
|
|
7
|
-
render(): import("lit").TemplateResult<1>;
|
|
8
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
8
9
|
private onChange;
|
|
9
10
|
private onCancel;
|
|
10
11
|
private onConfirm;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.js';
|
|
2
3
|
import '@operato/input/ox-input-hashtags.js';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
4
5
|
import { customElement, property } from 'lit/decorators.js';
|
|
@@ -15,8 +16,8 @@ let OxPopupHashtagsInput = class OxPopupHashtagsInput extends LitElement {
|
|
|
15
16
|
<ox-input-hashtags .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-hashtags>
|
|
16
17
|
|
|
17
18
|
<div class="button-container">
|
|
18
|
-
<
|
|
19
|
-
<
|
|
19
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
20
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
20
21
|
</div>
|
|
21
22
|
`;
|
|
22
23
|
}
|
|
@@ -53,6 +54,8 @@ OxPopupHashtagsInput.styles = [
|
|
|
53
54
|
.button-container {
|
|
54
55
|
display: flex;
|
|
55
56
|
margin-left: auto;
|
|
57
|
+
gap: 10px;
|
|
58
|
+
padding: var(--padding-default);
|
|
56
59
|
}
|
|
57
60
|
`
|
|
58
61
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-hashtags-input.js","sourceRoot":"","sources":["../../src/ox-popup-hashtags-input.ts"],"names":[],"mappings":";AAAA,OAAO,qCAAqC,CAAA;AAE5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAA7C;;
|
|
1
|
+
{"version":3,"file":"ox-popup-hashtags-input.js","sourceRoot":"","sources":["../../src/ox-popup-hashtags-input.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,qCAAqC,CAAA;AAE5C,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,MA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AyB,CAAC;GAC5B,oBAAoB,CAwDhC","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@operato/input/ox-input-hashtags.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { i18next } from '@operato/i18n'\nimport { closePopup } from '@operato/popup'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-hashtags-input')\nexport class OxPopupHashtagsInput 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-hashtags {\n flex: 1;\n overflow-y: auto;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n gap: 10px;\n padding: var(--padding-default);\n }\n `\n ]\n\n @property({ type: Object }) value: string[] = []\n @property({ type: Object }) confirmCallback!: (newval: any) => void\n\n render() {\n return html`\n <ox-input-hashtags .value=${this.value} @change=${this.onChange.bind(this)}> </ox-input-hashtags>\n\n <div class=\"button-container\">\n <md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>\n <md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>\n </div>\n `\n }\n\n private onChange(e: CustomEvent) {\n e.stopPropagation()\n\n this.value = (e.target as any).value\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"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '@material/web/button/elevated-button.js';
|
|
2
|
+
import '@operato/input/ox-input-i18n-label.js';
|
|
3
|
+
import { LitElement } from 'lit';
|
|
4
|
+
export declare class OxPopupValueMapInput extends LitElement {
|
|
5
|
+
static styles: import("lit").CSSResult[];
|
|
6
|
+
value: any;
|
|
7
|
+
languages: {
|
|
8
|
+
code: string;
|
|
9
|
+
display: string;
|
|
10
|
+
}[];
|
|
11
|
+
confirmCallback: (newval: any) => void;
|
|
12
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
13
|
+
private onChange;
|
|
14
|
+
private onCancel;
|
|
15
|
+
private onConfirm;
|
|
16
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.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 { 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
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
21
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
22
|
+
</div>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
onChange(e) {
|
|
26
|
+
e.stopPropagation();
|
|
27
|
+
/*
|
|
28
|
+
주의 : 이 팝업 템플릿은 layout 모듈에 의해서 render 되므로,
|
|
29
|
+
layout의 구성에 변화가 발생하면, 다시 render된다.
|
|
30
|
+
이 팝업이 떠 있는 상태에서, 또 다른 팝업이 뜨는 경우도 layout 구성의 변화를 야기한다. (overlay의 갯수의 증가)
|
|
31
|
+
이 경우 value, options, confirmCallback 등 클로져를 사용한 것들이 초기 바인딩된 값으로 다시 바인딩되게 되는데,
|
|
32
|
+
만약, 템플릿 내부에서 이들 속성의 레퍼런스가 변화했다면, 원래 상태로 되돌아가는 현상이 발생하게 된다.
|
|
33
|
+
따라서, 가급적 이들 속성의 레퍼런스를 변화시키지 않는 것이 좋다.
|
|
34
|
+
(이 팝업 클래스를 템플릿으로 사용한 곳의 코드를 참조하세요.)
|
|
35
|
+
=>
|
|
36
|
+
이런 이유로, Object.assign(...)을 사용하였다.
|
|
37
|
+
*/
|
|
38
|
+
if (!this.value || typeof this.value !== 'object') {
|
|
39
|
+
this.value = {};
|
|
40
|
+
}
|
|
41
|
+
for (let key in this.value) {
|
|
42
|
+
delete this.value[key];
|
|
43
|
+
}
|
|
44
|
+
Object.assign(this.value, e.detail);
|
|
45
|
+
}
|
|
46
|
+
onCancel(e) {
|
|
47
|
+
closePopup(this);
|
|
48
|
+
}
|
|
49
|
+
onConfirm(e) {
|
|
50
|
+
this.confirmCallback && this.confirmCallback(this.value);
|
|
51
|
+
closePopup(this);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
OxPopupValueMapInput.styles = [
|
|
55
|
+
ScrollbarStyles,
|
|
56
|
+
css `
|
|
57
|
+
:host {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
|
|
61
|
+
background-color: #fff;
|
|
62
|
+
|
|
63
|
+
width: var(--overlay-center-normal-width, 50%);
|
|
64
|
+
height: var(--overlay-center-normal-height, 50%);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
ox-input-i18n-label {
|
|
68
|
+
flex: 1;
|
|
69
|
+
overflow-y: auto;
|
|
70
|
+
padding: var(--padding-default);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
span {
|
|
74
|
+
flex: 1;
|
|
75
|
+
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
|
|
80
|
+
color: var(--primary-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.button-container {
|
|
84
|
+
display: flex;
|
|
85
|
+
margin-left: auto;
|
|
86
|
+
gap: 10px;
|
|
87
|
+
padding: var(--padding-default);
|
|
88
|
+
}
|
|
89
|
+
`
|
|
90
|
+
];
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: Object })
|
|
93
|
+
], OxPopupValueMapInput.prototype, "value", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
property({ type: Array })
|
|
96
|
+
], OxPopupValueMapInput.prototype, "languages", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
property({ type: Object })
|
|
99
|
+
], OxPopupValueMapInput.prototype, "confirmCallback", void 0);
|
|
100
|
+
OxPopupValueMapInput = __decorate([
|
|
101
|
+
customElement('ox-popup-i18n-label-input')
|
|
102
|
+
], OxPopupValueMapInput);
|
|
103
|
+
export { OxPopupValueMapInput };
|
|
104
|
+
//# 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,yCAAyC,CAAA;AAChD,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,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAA7C;;QAwCsB,cAAS,GAAwC,EAAE,CAAA;IAiDhF,CAAC;IA9CC,MAAM;QACJ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1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;uDAAoD;AAClD;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6DAAwC;AAzCxD,oBAAoB;IADhC,aAAa,CAAC,2BAA2B,CAAC;GAC9B,oBAAoB,CAyFhC","sourcesContent":["import '@material/web/button/elevated-button.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 { ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-i18n-label-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-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 .button-container {\n display: flex;\n margin-left: auto;\n gap: 10px;\n padding: var(--padding-default);\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 <md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>\n <md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-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/button/elevated-button.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,4 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.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';
|
|
@@ -23,8 +24,8 @@ 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
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
28
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
28
29
|
</div>
|
|
29
30
|
`;
|
|
30
31
|
}
|
|
@@ -88,6 +89,8 @@ OxPopupParametersBuilder.styles = [
|
|
|
88
89
|
.button-container {
|
|
89
90
|
display: flex;
|
|
90
91
|
margin-left: auto;
|
|
92
|
+
gap: 10px;
|
|
93
|
+
padding: var(--padding-default);
|
|
91
94
|
}
|
|
92
95
|
`
|
|
93
96
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-parameters-builder.js","sourceRoot":"","sources":["../../src/ox-popup-parameters-builder.ts"],"names":[],"mappings":";AAAA,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG1C,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,UAAU;
|
|
1
|
+
{"version":3,"file":"ox-popup-parameters-builder.js","sourceRoot":"","sources":["../../src/ox-popup-parameters-builder.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,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,GAAG,CAAC,CAAA;QACxB,CAAC;QACD,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;;AAlGM,+BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCF;CACF,AAnCY,CAmCZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sDAAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDAAa;AACZ;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iEAAwC;AA1CxD,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CAoGpC","sourcesContent":["import '@material/web/button/elevated-button.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 { ScrollbarStyles } from '@operato/styles'\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 gap: 10px;\n padding: var(--padding-default);\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 <md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>\n <md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-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/button/elevated-button.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,4 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.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';
|
|
@@ -15,8 +16,8 @@ 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
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
20
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
20
21
|
</div>
|
|
21
22
|
`;
|
|
22
23
|
}
|
|
@@ -81,6 +82,8 @@ OxPopupPartitionKeysInput.styles = [
|
|
|
81
82
|
.button-container {
|
|
82
83
|
display: flex;
|
|
83
84
|
margin-left: auto;
|
|
85
|
+
gap: 10px;
|
|
86
|
+
padding: var(--padding-default);
|
|
84
87
|
}
|
|
85
88
|
`
|
|
86
89
|
];
|
|
@@ -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;AAG1C,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;
|
|
1
|
+
{"version":3,"file":"ox-popup-partition-keys-input.js","sourceRoot":"","sources":["../../src/ox-popup-partition-keys-input.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,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;AAG1C,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAwCuB,cAAS,GAAW,QAAQ,CAAA;IAgD1D,CAAC;IA7CC,MAAM;QACJ,OAA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AE,MAAM,EAAE,CAAC;4DAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kEAAwC;AAzCxD,yBAAyB;IADrC,aAAa,CAAC,+BAA+B,CAAC;GAClC,yBAAyB,CAwFrC","sourcesContent":["import '@material/web/button/elevated-button.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 { ScrollbarStyles } from '@operato/styles'\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 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 .button-container {\n display: flex;\n margin-left: auto;\n gap: 10px;\n padding: var(--padding-default);\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 <md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>\n <md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-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/button/elevated-button.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,4 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.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';
|
|
@@ -22,8 +23,8 @@ let OxPopupValueMapInput = class OxPopupValueMapInput extends LitElement {
|
|
|
22
23
|
</ox-input-value-map>
|
|
23
24
|
|
|
24
25
|
<div class="button-container">
|
|
25
|
-
<
|
|
26
|
-
<
|
|
26
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
27
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
27
28
|
</div>
|
|
28
29
|
`;
|
|
29
30
|
}
|
|
@@ -87,6 +88,8 @@ OxPopupValueMapInput.styles = [
|
|
|
87
88
|
.button-container {
|
|
88
89
|
display: flex;
|
|
89
90
|
margin-left: auto;
|
|
91
|
+
gap: 10px;
|
|
92
|
+
padding: var(--padding-default);
|
|
90
93
|
}
|
|
91
94
|
`
|
|
92
95
|
];
|
|
@@ -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;AAG1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,UAAU;IAA7C;;
|
|
1
|
+
{"version":3,"file":"ox-popup-value-map-input.js","sourceRoot":"","sources":["../../src/ox-popup-value-map-input.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAEhD,OAAO,sCAAsC,CAAA;AAE7C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EA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CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxD,UAAU,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC;;AA7FM,2BAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCF;CACF,AAnCY,CAmCZ;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;AAzClE,oBAAoB;IADhC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,oBAAoB,CA+FhC","sourcesContent":["import '@material/web/button/elevated-button.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 { ScrollbarStyles } from '@operato/styles'\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 gap: 10px;\n padding: var(--padding-default);\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 <md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>\n <md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-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/button/elevated-button.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,4 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import '@material/web/button/elevated-button.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';
|
|
@@ -22,8 +23,8 @@ let OxPopupValueRangesInput = class OxPopupValueRangesInput extends LitElement {
|
|
|
22
23
|
</ox-input-value-ranges>
|
|
23
24
|
|
|
24
25
|
<div class="button-container">
|
|
25
|
-
<
|
|
26
|
-
<
|
|
26
|
+
<md-elevated-button @click=${this.onCancel.bind(this)}>${i18next.t('button.cancel')}</md-elevated-button>
|
|
27
|
+
<md-elevated-button @click=${this.onConfirm.bind(this)}>${i18next.t('button.confirm')}</md-elevated-button>
|
|
27
28
|
</div>
|
|
28
29
|
`;
|
|
29
30
|
}
|