@operato/app 9.0.0-beta.7 → 9.0.0-beta.70
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 +325 -0
- package/dist/src/filters-form/ox-filter-resource-code.js +4 -0
- package/dist/src/filters-form/ox-filter-resource-code.js.map +1 -1
- package/dist/src/filters-form/ox-filter-resource-object.js +4 -0
- package/dist/src/filters-form/ox-filter-resource-object.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-code.d.ts +1 -1
- package/dist/src/grist-editor/ox-grist-editor-code.js +1 -1
- package/dist/src/grist-editor/ox-grist-editor-code.js.map +1 -1
- package/dist/src/grist-editor/ox-grist-editor-json.d.ts +1 -1
- package/dist/src/grist-editor/ox-grist-editor-json.js +1 -1
- package/dist/src/grist-editor/ox-grist-editor-json.js.map +1 -1
- package/dist/src/input/index.d.ts +0 -2
- package/dist/src/input/index.js +0 -2
- package/dist/src/input/index.js.map +1 -1
- package/dist/src/input/ox-input-graphql.js +4 -0
- package/dist/src/input/ox-input-graphql.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -22
- package/dist/src/grist-editor/ox-popup-code-input.d.ts +0 -14
- package/dist/src/grist-editor/ox-popup-code-input.js +0 -78
- package/dist/src/grist-editor/ox-popup-code-input.js.map +0 -1
- package/dist/src/input/ox-input-background-pattern.d.ts +0 -34
- package/dist/src/input/ox-input-background-pattern.js +0 -178
- package/dist/src/input/ox-input-background-pattern.js.map +0 -1
- package/dist/src/input/ox-input-fill-style.d.ts +0 -44
- package/dist/src/input/ox-input-fill-style.js +0 -341
- package/dist/src/input/ox-input-fill-style.js.map +0 -1
- package/dist/stories/graphql-client.stories.d.ts +0 -26
- package/dist/stories/graphql-client.stories.js +0 -55
- package/dist/stories/graphql-client.stories.js.map +0 -1
- package/dist/stories/ox-input-graphql.stories.d.ts +0 -25
- package/dist/stories/ox-input-graphql.stories.js +0 -56
- package/dist/stories/ox-input-graphql.stories.js.map +0 -1
- package/dist/stories/ox-selector-resource-object.stories.d.ts +0 -29
- package/dist/stories/ox-selector-resource-object.stories.js +0 -80
- package/dist/stories/ox-selector-resource-object.stories.js.map +0 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/app",
|
|
3
3
|
"description": "WebApplication production supporting components following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "9.0.0-beta.
|
|
5
|
+
"version": "9.0.0-beta.70",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
"./package.json": "./package.json",
|
|
12
12
|
"./input.js": "./dist/src/input/index.js",
|
|
13
13
|
"./input/ox-input-graphql.js": "./dist/src/input/ox-input-graphql.js",
|
|
14
|
-
"./input/ox-input-background-pattern.js": "./dist/src/input/ox-input-background-pattern.js",
|
|
15
|
-
"./input/ox-input-fill-style.js": "./dist/src/input/ox-input-fill-style.js",
|
|
16
14
|
"./selector/ox-selector-resource-id.js": "./dist/src/selector/ox-selector-resource-id.js",
|
|
17
15
|
"./selector/ox-selector-resource-object.js": "./dist/src/selector/ox-selector-resource-object.js",
|
|
18
16
|
"./property-editor.js": "./dist/src/property-editor/index.js",
|
|
@@ -43,12 +41,6 @@
|
|
|
43
41
|
"input/ox-input-graphql.js": [
|
|
44
42
|
"dist/src/input/ox-input-graphql.d.ts"
|
|
45
43
|
],
|
|
46
|
-
"input/ox-input-background-pattern.js": [
|
|
47
|
-
"dist/src/input/ox-input-background-pattern.d.ts"
|
|
48
|
-
],
|
|
49
|
-
"input/ox-input-fill-style.js": [
|
|
50
|
-
"dist/src/input/ox-input-fill-style.d.ts"
|
|
51
|
-
],
|
|
52
44
|
"selector/ox-selector-resource-id.js": [
|
|
53
45
|
"dist/src/selector/ox-selector-resource-id.d.ts"
|
|
54
46
|
],
|
|
@@ -148,18 +140,19 @@
|
|
|
148
140
|
"@graphql-tools/delegate": "^10.0.1",
|
|
149
141
|
"@graphql-tools/wrap": "^8.5.0",
|
|
150
142
|
"@material/web": "^2.0.0",
|
|
151
|
-
"@operato/attachment": "^9.0.0-beta.
|
|
152
|
-
"@operato/data-grist": "^9.0.0-beta.
|
|
153
|
-
"@operato/font": "^9.0.0-beta.
|
|
154
|
-
"@operato/form": "^9.0.0-beta.
|
|
155
|
-
"@operato/graphql": "^9.0.0-beta.
|
|
156
|
-
"@operato/i18n": "^9.0.0-beta.
|
|
157
|
-
"@operato/input": "^9.0.0-beta.
|
|
158
|
-
"@operato/layout": "^9.0.0-beta.
|
|
159
|
-
"@operato/property-editor": "^9.0.0-beta.
|
|
160
|
-
"@operato/
|
|
161
|
-
"@operato/
|
|
162
|
-
"@operato/
|
|
143
|
+
"@operato/attachment": "^9.0.0-beta.70",
|
|
144
|
+
"@operato/data-grist": "^9.0.0-beta.70",
|
|
145
|
+
"@operato/font": "^9.0.0-beta.70",
|
|
146
|
+
"@operato/form": "^9.0.0-beta.70",
|
|
147
|
+
"@operato/graphql": "^9.0.0-beta.38",
|
|
148
|
+
"@operato/i18n": "^9.0.0-beta.37",
|
|
149
|
+
"@operato/input": "^9.0.0-beta.70",
|
|
150
|
+
"@operato/layout": "^9.0.0-beta.52",
|
|
151
|
+
"@operato/property-editor": "^9.0.0-beta.70",
|
|
152
|
+
"@operato/property-panel": "^9.0.0-beta.70",
|
|
153
|
+
"@operato/shell": "^9.0.0-beta.52",
|
|
154
|
+
"@operato/styles": "^9.0.0-beta.47",
|
|
155
|
+
"@operato/utils": "^9.0.0-beta.38",
|
|
163
156
|
"cm6-graphql": "^0.0.14",
|
|
164
157
|
"codemirror": "^6.0.1",
|
|
165
158
|
"cronstrue": "^2.2.0",
|
|
@@ -200,5 +193,5 @@
|
|
|
200
193
|
"prettier --write"
|
|
201
194
|
]
|
|
202
195
|
},
|
|
203
|
-
"gitHead": "
|
|
196
|
+
"gitHead": "62f53c7de111ff64eb422d7a04bab05d1cc3cb69"
|
|
204
197
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import '@material/web/icon/icon.js';
|
|
2
|
-
import '@operato/input/ox-input-code.js';
|
|
3
|
-
import { LitElement } from 'lit';
|
|
4
|
-
export declare class OxPopupCodeInput extends LitElement {
|
|
5
|
-
static styles: import("lit").CSSResult[];
|
|
6
|
-
value: any;
|
|
7
|
-
mode: string;
|
|
8
|
-
confirmCallback: (newval: any) => void;
|
|
9
|
-
language?: string;
|
|
10
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
11
|
-
private onChange;
|
|
12
|
-
private onCancel;
|
|
13
|
-
private onConfirm;
|
|
14
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { __decorate } from "tslib";
|
|
2
|
-
import '@material/web/icon/icon.js';
|
|
3
|
-
import '@operato/input/ox-input-code.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 { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles';
|
|
9
|
-
let OxPopupCodeInput = class OxPopupCodeInput extends LitElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.mode = 'javascript';
|
|
13
|
-
this.language = 'javascript';
|
|
14
|
-
}
|
|
15
|
-
render() {
|
|
16
|
-
return html `
|
|
17
|
-
<ox-input-code .value=${this.value} @change=${this.onChange.bind(this)} .language=${this.language}>
|
|
18
|
-
</ox-input-code>
|
|
19
|
-
|
|
20
|
-
<div class="footer">
|
|
21
|
-
<div filler></div>
|
|
22
|
-
<button @click=${this.onCancel.bind(this)} danger>
|
|
23
|
-
<md-icon>cancel</md-icon>${i18next.t('button.cancel')}
|
|
24
|
-
</button>
|
|
25
|
-
<button @click=${this.onConfirm.bind(this)} done><md-icon>done</md-icon>${i18next.t('button.confirm')}</button>
|
|
26
|
-
</div>
|
|
27
|
-
`;
|
|
28
|
-
}
|
|
29
|
-
onChange(e) {
|
|
30
|
-
e.stopPropagation();
|
|
31
|
-
this.value = e.detail;
|
|
32
|
-
}
|
|
33
|
-
onCancel(e) {
|
|
34
|
-
closePopup(this);
|
|
35
|
-
}
|
|
36
|
-
onConfirm(e) {
|
|
37
|
-
this.confirmCallback && this.confirmCallback(this.value);
|
|
38
|
-
closePopup(this);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
OxPopupCodeInput.styles = [
|
|
42
|
-
CommonHeaderStyles,
|
|
43
|
-
ScrollbarStyles,
|
|
44
|
-
css `
|
|
45
|
-
:host {
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: column;
|
|
48
|
-
|
|
49
|
-
background-color: var(--md-sys-color-surface);
|
|
50
|
-
|
|
51
|
-
width: var(--overlay-center-normal-width, 50%);
|
|
52
|
-
height: var(--overlay-center-normal-height, 50%);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ox-input-code {
|
|
56
|
-
flex: 1;
|
|
57
|
-
overflow-y: auto;
|
|
58
|
-
margin: var(--spacing-small);
|
|
59
|
-
}
|
|
60
|
-
`
|
|
61
|
-
];
|
|
62
|
-
__decorate([
|
|
63
|
-
property({ type: Object })
|
|
64
|
-
], OxPopupCodeInput.prototype, "value", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
property({ type: String })
|
|
67
|
-
], OxPopupCodeInput.prototype, "mode", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
property({ type: Object })
|
|
70
|
-
], OxPopupCodeInput.prototype, "confirmCallback", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
property({ type: String })
|
|
73
|
-
], OxPopupCodeInput.prototype, "language", void 0);
|
|
74
|
-
OxPopupCodeInput = __decorate([
|
|
75
|
-
customElement('ox-popup-code-input')
|
|
76
|
-
], OxPopupCodeInput);
|
|
77
|
-
export { OxPopupCodeInput };
|
|
78
|
-
//# sourceMappingURL=ox-popup-code-input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ox-popup-code-input.js","sourceRoot":"","sources":["../../../src/grist-editor/ox-popup-code-input.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,iCAAiC,CAAA;AAExC,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,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAG9D,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,UAAU;IAAzC;;QAwBuB,SAAI,GAAW,YAAY,CAAA;QAE3B,aAAQ,GAAY,YAAY,CAAA;IA+B9D,CAAC;IA7BC,MAAM;QACJ,OAAO,IAAI,CAAA;8BACe,IAAI,CAAC,KAAK,YAAY,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,QAAQ;;;;;yBAK9E,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;qCACZ,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;;yBAEtC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,OAAO,CAAC,CAAC,CAAC,gBAAgB,CAAC;;KAExG,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;;AAvDM,uBAAM,GAAG;IACd,kBAAkB;IAClB,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;KAgBF;CACF,AApBY,CAoBZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CAAW;AACV;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8CAA4B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yDAAwC;AACvC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAiC;AA1BjD,gBAAgB;IAD5B,aAAa,CAAC,qBAAqB,CAAC;GACxB,gBAAgB,CAyD5B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/input/ox-input-code.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 { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\n\n@customElement('ox-popup-code-input')\nexport class OxPopupCodeInput extends LitElement {\n static styles = [\n CommonHeaderStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: var(--md-sys-color-surface);\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 margin: var(--spacing-small);\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 @property({ type: String }) language?: string = 'javascript'\n\n render() {\n return html`\n <ox-input-code .value=${this.value} @change=${this.onChange.bind(this)} .language=${this.language}>\n </ox-input-code>\n\n <div class=\"footer\">\n <div filler></div>\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)} done><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 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,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import '@operato/i18n/ox-i18n.js';
|
|
5
|
-
import '@operato/input/ox-input-color.js';
|
|
6
|
-
import '@operato/attachment/ox-attachment-selector.js';
|
|
7
|
-
import { OxFormField } from '@operato/input';
|
|
8
|
-
export type BackgroundPatternOption = {
|
|
9
|
-
image?: HTMLImageElement | string;
|
|
10
|
-
color?: string;
|
|
11
|
-
align?: 'left-top' | 'top' | 'right-top' | 'left' | 'center' | 'right' | 'left-bottom' | 'bottom' | 'right-bottom';
|
|
12
|
-
offsetX?: number;
|
|
13
|
-
offsetY?: number;
|
|
14
|
-
width?: number;
|
|
15
|
-
height?: number;
|
|
16
|
-
fitPattern?: boolean;
|
|
17
|
-
noRepeat?: boolean;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* 컴포넌트의 fill pattern을 편집하는 element
|
|
21
|
-
*
|
|
22
|
-
* Example:
|
|
23
|
-
* <ox-input-background-pattern
|
|
24
|
-
* @change="${e => { this.pattern = e.target.value }}"
|
|
25
|
-
* .value=${this.pattern}"
|
|
26
|
-
* ></ox-input-background-pattern>
|
|
27
|
-
*/
|
|
28
|
-
export declare class OxInputBackgroundPattern extends OxFormField {
|
|
29
|
-
static styles: import("lit").CSSResult;
|
|
30
|
-
value?: BackgroundPatternOption;
|
|
31
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
32
|
-
firstUpdated(): void;
|
|
33
|
-
_onChange(e: Event): void;
|
|
34
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import { __decorate } from "tslib";
|
|
5
|
-
import '@operato/i18n/ox-i18n.js';
|
|
6
|
-
import '@operato/input/ox-input-color.js';
|
|
7
|
-
import '@operato/attachment/ox-attachment-selector.js';
|
|
8
|
-
import { css, html } from 'lit';
|
|
9
|
-
import { customElement, property } from 'lit/decorators.js';
|
|
10
|
-
import { OxFormField } from '@operato/input';
|
|
11
|
-
/**
|
|
12
|
-
* 컴포넌트의 fill pattern을 편집하는 element
|
|
13
|
-
*
|
|
14
|
-
* Example:
|
|
15
|
-
* <ox-input-background-pattern
|
|
16
|
-
* @change="${e => { this.pattern = e.target.value }}"
|
|
17
|
-
* .value=${this.pattern}"
|
|
18
|
-
* ></ox-input-background-pattern>
|
|
19
|
-
*/
|
|
20
|
-
let OxInputBackgroundPattern = class OxInputBackgroundPattern extends OxFormField {
|
|
21
|
-
render() {
|
|
22
|
-
const value = this.value || {};
|
|
23
|
-
return html `
|
|
24
|
-
<label> <ox-i18n msgid="label.image">image</ox-i18n> </label>
|
|
25
|
-
|
|
26
|
-
<ox-attachment-selector
|
|
27
|
-
value-key="image"
|
|
28
|
-
.value=${value.image || ''}
|
|
29
|
-
.properties=${{
|
|
30
|
-
category: 'image'
|
|
31
|
-
}}
|
|
32
|
-
custom-editor
|
|
33
|
-
></ox-attachment-selector>
|
|
34
|
-
|
|
35
|
-
<label> <ox-i18n msgid="label.align">align</ox-i18n> </label>
|
|
36
|
-
|
|
37
|
-
<select value-key="align" class="select-content" .value=${value.align}>
|
|
38
|
-
<option value="left-top">Left Top</option>
|
|
39
|
-
<option value="top">Center Top</option>
|
|
40
|
-
<option value="right-top">Right Top</option>
|
|
41
|
-
<option value="left">Left Center</option>
|
|
42
|
-
<option value="center">Center Center</option>
|
|
43
|
-
<option value="right">Right Center</option>
|
|
44
|
-
<option value="left-bottom">Left Bottom</option>
|
|
45
|
-
<option value="bottom">Center Bottom</option>
|
|
46
|
-
<option value="right-bottom">Right Bottom</option>
|
|
47
|
-
</select>
|
|
48
|
-
|
|
49
|
-
<div class="grid-10">
|
|
50
|
-
<label> <ox-i18n msgid="label.offset-x">offsetX</ox-i18n> </label>
|
|
51
|
-
<input type="number" value-key="offsetX" .value=${value.offsetX} />
|
|
52
|
-
|
|
53
|
-
<label> <ox-i18n msgid="label.offset-y">offsetY</ox-i18n> </label>
|
|
54
|
-
<input type="number" value-key="offsetY" .value=${value.offsetY} />
|
|
55
|
-
|
|
56
|
-
<label> <ox-i18n msgid="label.width">width</ox-i18n> </label>
|
|
57
|
-
<input type="number" value-key="width" .value=${value.width} />
|
|
58
|
-
|
|
59
|
-
<label> <ox-i18n msgid="label.height">height</ox-i18n> </label>
|
|
60
|
-
<input type="number" value-key="height" .value=${value.height} />
|
|
61
|
-
</div>
|
|
62
|
-
|
|
63
|
-
<div class="grid-10">
|
|
64
|
-
<label class="icon-only-label color"></label>
|
|
65
|
-
<ox-input-color value-key="color" .value=${value.color}> </ox-input-color>
|
|
66
|
-
</div>
|
|
67
|
-
|
|
68
|
-
<div class="grid-10">
|
|
69
|
-
<input value-key="fitPattern" type="checkbox" .checked=${value.fitPattern} required />
|
|
70
|
-
<label> <ox-i18n msgid="label.fit">fit</ox-i18n> </label>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div class="grid-10">
|
|
74
|
-
<input value-key="noRepeat" type="checkbox" .checked=${value.noRepeat} required />
|
|
75
|
-
<label> <ox-i18n msgid="label.no-repeat">no repeat</ox-i18n> </label>
|
|
76
|
-
</div>
|
|
77
|
-
`;
|
|
78
|
-
}
|
|
79
|
-
firstUpdated() {
|
|
80
|
-
this.renderRoot.addEventListener('change', this._onChange.bind(this));
|
|
81
|
-
}
|
|
82
|
-
_onChange(e) {
|
|
83
|
-
var element = e.target;
|
|
84
|
-
var key = element.getAttribute('value-key');
|
|
85
|
-
var value = element.value;
|
|
86
|
-
if (key === 'fitPattern' || key === 'noRepeat') {
|
|
87
|
-
value = element.checked;
|
|
88
|
-
}
|
|
89
|
-
this.value = {
|
|
90
|
-
...this.value,
|
|
91
|
-
[key]: value
|
|
92
|
-
};
|
|
93
|
-
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
OxInputBackgroundPattern.styles = css `
|
|
97
|
-
:host,
|
|
98
|
-
.grid-10 {
|
|
99
|
-
display: grid;
|
|
100
|
-
grid-template-columns: repeat(10, 1fr);
|
|
101
|
-
grid-gap: 5px;
|
|
102
|
-
grid-auto-rows: minmax(24px, auto);
|
|
103
|
-
|
|
104
|
-
align-items: center;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
* {
|
|
108
|
-
align-self: stretch;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
label {
|
|
112
|
-
grid-column: span 2;
|
|
113
|
-
text-align: right;
|
|
114
|
-
text-transform: capitalize;
|
|
115
|
-
|
|
116
|
-
align-self: center;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.grid-10 {
|
|
120
|
-
grid-column: span 10;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
select,
|
|
124
|
-
input,
|
|
125
|
-
[custom-editor] {
|
|
126
|
-
grid-column: span 8;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
select {
|
|
130
|
-
height: 100%;
|
|
131
|
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
input[type='checkbox'] {
|
|
135
|
-
grid-column: 3 / 4;
|
|
136
|
-
align-self: center;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
input[type='checkbox'] ~ label {
|
|
140
|
-
grid-column: span 7;
|
|
141
|
-
text-align: left;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.grid-10 > input[type='number'] {
|
|
145
|
-
grid-column: span 3;
|
|
146
|
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.grid-10 > label {
|
|
150
|
-
grid-column: span 2;
|
|
151
|
-
text-align: right;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.grid-10 > .icon-only-label {
|
|
155
|
-
grid-column: span 2;
|
|
156
|
-
|
|
157
|
-
background: var(--url-icon-properties-label) no-repeat;
|
|
158
|
-
float: left;
|
|
159
|
-
margin: 0;
|
|
160
|
-
align-self: stretch;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.icon-only-label.color {
|
|
164
|
-
background-position: 100% -500px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.grid-10 > ox-input-color {
|
|
168
|
-
grid-column: span 8;
|
|
169
|
-
}
|
|
170
|
-
`;
|
|
171
|
-
__decorate([
|
|
172
|
-
property({ type: Object })
|
|
173
|
-
], OxInputBackgroundPattern.prototype, "value", void 0);
|
|
174
|
-
OxInputBackgroundPattern = __decorate([
|
|
175
|
-
customElement('ox-input-background-pattern')
|
|
176
|
-
], OxInputBackgroundPattern);
|
|
177
|
-
export { OxInputBackgroundPattern };
|
|
178
|
-
//# sourceMappingURL=ox-input-background-pattern.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ox-input-background-pattern.js","sourceRoot":"","sources":["../../../src/input/ox-input-background-pattern.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,0BAA0B,CAAA;AACjC,OAAO,kCAAkC,CAAA;AACzC,OAAO,+CAA+C,CAAA;AAEtD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAc5C;;;;;;;;GAQG;AAGI,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,WAAW;IA+EvD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,IAAK,EAA8B,CAAA;QAE3D,OAAO,IAAI,CAAA;;;;;iBAKE,KAAK,CAAC,KAAK,IAAI,EAAE;sBACZ;YACZ,QAAQ,EAAE,OAAO;SAClB;;;;;;gEAMuD,KAAK,CAAC,KAAK;;;;;;;;;;;;;;0DAcjB,KAAK,CAAC,OAAO;;;0DAGb,KAAK,CAAC,OAAO;;;wDAGf,KAAK,CAAC,KAAK;;;yDAGV,KAAK,CAAC,MAAM;;;;;mDAKlB,KAAK,CAAC,KAAK;;;;iEAIG,KAAK,CAAC,UAAU;;;;;+DAKlB,KAAK,CAAC,QAAQ;;;KAGxE,CAAA;IACH,CAAC;IAED,YAAY;QACV,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACvE,CAAC;IAED,SAAS,CAAC,CAAQ;QAChB,IAAI,OAAO,GAAG,CAAC,CAAC,MAA0B,CAAA;QAC1C,IAAI,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAA;QAC3C,IAAI,KAAK,GAAQ,OAAO,CAAC,KAAK,CAAA;QAE9B,IAAI,GAAG,KAAK,YAAY,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;YAC/C,KAAK,GAAG,OAAO,CAAC,OAAO,CAAA;QACzB,CAAC;QAED,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,IAAI,CAAC,KAAK;YACb,CAAC,GAAI,CAAC,EAAE,KAAK;SACd,CAAA;QAED,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;IAClF,CAAC;;AA7JM,+BAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0ElB,AA1EY,CA0EZ;AAE2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uDAAgC;AA7EhD,wBAAwB;IADpC,aAAa,CAAC,6BAA6B,CAAC;GAChC,wBAAwB,CA+JpC","sourcesContent":["/**\n * @license Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport '@operato/i18n/ox-i18n.js'\nimport '@operato/input/ox-input-color.js'\nimport '@operato/attachment/ox-attachment-selector.js'\n\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { OxFormField } from '@operato/input'\n\nexport type BackgroundPatternOption = {\n image?: HTMLImageElement | string\n color?: string\n align?: 'left-top' | 'top' | 'right-top' | 'left' | 'center' | 'right' | 'left-bottom' | 'bottom' | 'right-bottom'\n offsetX?: number\n offsetY?: number\n width?: number\n height?: number\n fitPattern?: boolean\n noRepeat?: boolean\n}\n\n/**\n * 컴포넌트의 fill pattern을 편집하는 element\n *\n * Example:\n * <ox-input-background-pattern\n * @change=\"${e => { this.pattern = e.target.value }}\"\n * .value=${this.pattern}\"\n * ></ox-input-background-pattern>\n */\n\n@customElement('ox-input-background-pattern')\nexport class OxInputBackgroundPattern extends OxFormField {\n static styles = css`\n :host,\n .grid-10 {\n display: grid;\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n\n align-items: center;\n }\n\n * {\n align-self: stretch;\n }\n\n label {\n grid-column: span 2;\n text-align: right;\n text-transform: capitalize;\n\n align-self: center;\n }\n\n .grid-10 {\n grid-column: span 10;\n }\n\n select,\n input,\n [custom-editor] {\n grid-column: span 8;\n }\n\n select {\n height: 100%;\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n\n input[type='checkbox'] {\n grid-column: 3 / 4;\n align-self: center;\n }\n\n input[type='checkbox'] ~ label {\n grid-column: span 7;\n text-align: left;\n }\n\n .grid-10 > input[type='number'] {\n grid-column: span 3;\n border: 1px solid rgba(0, 0, 0, 0.2);\n }\n\n .grid-10 > label {\n grid-column: span 2;\n text-align: right;\n }\n\n .grid-10 > .icon-only-label {\n grid-column: span 2;\n\n background: var(--url-icon-properties-label) no-repeat;\n float: left;\n margin: 0;\n align-self: stretch;\n }\n\n .icon-only-label.color {\n background-position: 100% -500px;\n }\n\n .grid-10 > ox-input-color {\n grid-column: span 8;\n }\n `\n\n @property({ type: Object }) value?: BackgroundPatternOption\n\n render() {\n const value = this.value || ({} as BackgroundPatternOption)\n\n return html`\n <label> <ox-i18n msgid=\"label.image\">image</ox-i18n> </label>\n\n <ox-attachment-selector\n value-key=\"image\"\n .value=${value.image || ''}\n .properties=${{\n category: 'image'\n }}\n custom-editor\n ></ox-attachment-selector>\n\n <label> <ox-i18n msgid=\"label.align\">align</ox-i18n> </label>\n\n <select value-key=\"align\" class=\"select-content\" .value=${value.align}>\n <option value=\"left-top\">Left Top</option>\n <option value=\"top\">Center Top</option>\n <option value=\"right-top\">Right Top</option>\n <option value=\"left\">Left Center</option>\n <option value=\"center\">Center Center</option>\n <option value=\"right\">Right Center</option>\n <option value=\"left-bottom\">Left Bottom</option>\n <option value=\"bottom\">Center Bottom</option>\n <option value=\"right-bottom\">Right Bottom</option>\n </select>\n\n <div class=\"grid-10\">\n <label> <ox-i18n msgid=\"label.offset-x\">offsetX</ox-i18n> </label>\n <input type=\"number\" value-key=\"offsetX\" .value=${value.offsetX} />\n\n <label> <ox-i18n msgid=\"label.offset-y\">offsetY</ox-i18n> </label>\n <input type=\"number\" value-key=\"offsetY\" .value=${value.offsetY} />\n\n <label> <ox-i18n msgid=\"label.width\">width</ox-i18n> </label>\n <input type=\"number\" value-key=\"width\" .value=${value.width} />\n\n <label> <ox-i18n msgid=\"label.height\">height</ox-i18n> </label>\n <input type=\"number\" value-key=\"height\" .value=${value.height} />\n </div>\n\n <div class=\"grid-10\">\n <label class=\"icon-only-label color\"></label>\n <ox-input-color value-key=\"color\" .value=${value.color}> </ox-input-color>\n </div>\n\n <div class=\"grid-10\">\n <input value-key=\"fitPattern\" type=\"checkbox\" .checked=${value.fitPattern} required />\n <label> <ox-i18n msgid=\"label.fit\">fit</ox-i18n> </label>\n </div>\n\n <div class=\"grid-10\">\n <input value-key=\"noRepeat\" type=\"checkbox\" .checked=${value.noRepeat} required />\n <label> <ox-i18n msgid=\"label.no-repeat\">no repeat</ox-i18n> </label>\n </div>\n `\n }\n\n firstUpdated() {\n this.renderRoot.addEventListener('change', this._onChange.bind(this))\n }\n\n _onChange(e: Event) {\n var element = e.target as HTMLInputElement\n var key = element.getAttribute('value-key')\n var value: any = element.value\n\n if (key === 'fitPattern' || key === 'noRepeat') {\n value = element.checked\n }\n\n this.value = {\n ...this.value,\n [key!]: value\n }\n\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import '@operato/i18n/ox-i18n.js';
|
|
5
|
-
import '@operato/input/ox-input-color.js';
|
|
6
|
-
import '@operato/input/ox-input-color-stops.js';
|
|
7
|
-
import '@operato/input/ox-input-color-gradient.js';
|
|
8
|
-
import './ox-input-background-pattern.js';
|
|
9
|
-
import { PropertyValues } from 'lit';
|
|
10
|
-
import { ColorStop, GradientOption, OxFormField } from '@operato/input';
|
|
11
|
-
import { BackgroundPatternOption } from './ox-input-background-pattern.js';
|
|
12
|
-
export type FillStyle = {
|
|
13
|
-
type?: 'no' | 'solid' | 'gradient' | 'pattern';
|
|
14
|
-
gradientType?: 'linear' | 'radial';
|
|
15
|
-
colorStops?: ColorStop[];
|
|
16
|
-
rotation?: number;
|
|
17
|
-
center?: 'center' | 'left-top' | 'right-top' | 'right-bottom' | 'left-bottom';
|
|
18
|
-
image?: HTMLImageElement | string;
|
|
19
|
-
offsetX?: number;
|
|
20
|
-
offsetY?: number;
|
|
21
|
-
width?: number;
|
|
22
|
-
height?: number;
|
|
23
|
-
align?: 'left-top' | 'top' | 'right-top' | 'left' | 'center' | 'right' | 'left-bottom' | 'bottom' | 'right-bottom';
|
|
24
|
-
fitPattern?: boolean;
|
|
25
|
-
noRepeat?: boolean;
|
|
26
|
-
color?: string;
|
|
27
|
-
} | 'no' | string;
|
|
28
|
-
export declare class OxInputColorStyle extends OxFormField {
|
|
29
|
-
static styles: import("lit").CSSResult;
|
|
30
|
-
value?: FillStyle;
|
|
31
|
-
fillType?: string;
|
|
32
|
-
solid?: string;
|
|
33
|
-
gradient?: GradientOption;
|
|
34
|
-
pattern?: BackgroundPatternOption;
|
|
35
|
-
colorOnly: boolean;
|
|
36
|
-
private _block_reset;
|
|
37
|
-
updated(changes: PropertyValues<this>): void;
|
|
38
|
-
render(): import("lit-html").TemplateResult<1>;
|
|
39
|
-
_onChangedValue(value: FillStyle): Promise<void>;
|
|
40
|
-
_onChangedFillType(e: Event): void;
|
|
41
|
-
_onChangedSolid(e: Event): void;
|
|
42
|
-
_onChandedGradient(e: Event): void;
|
|
43
|
-
_onChangedPattern(e: Event): void;
|
|
44
|
-
}
|