@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.
Files changed (36) hide show
  1. package/CHANGELOG.md +325 -0
  2. package/dist/src/filters-form/ox-filter-resource-code.js +4 -0
  3. package/dist/src/filters-form/ox-filter-resource-code.js.map +1 -1
  4. package/dist/src/filters-form/ox-filter-resource-object.js +4 -0
  5. package/dist/src/filters-form/ox-filter-resource-object.js.map +1 -1
  6. package/dist/src/grist-editor/ox-grist-editor-code.d.ts +1 -1
  7. package/dist/src/grist-editor/ox-grist-editor-code.js +1 -1
  8. package/dist/src/grist-editor/ox-grist-editor-code.js.map +1 -1
  9. package/dist/src/grist-editor/ox-grist-editor-json.d.ts +1 -1
  10. package/dist/src/grist-editor/ox-grist-editor-json.js +1 -1
  11. package/dist/src/grist-editor/ox-grist-editor-json.js.map +1 -1
  12. package/dist/src/input/index.d.ts +0 -2
  13. package/dist/src/input/index.js +0 -2
  14. package/dist/src/input/index.js.map +1 -1
  15. package/dist/src/input/ox-input-graphql.js +4 -0
  16. package/dist/src/input/ox-input-graphql.js.map +1 -1
  17. package/dist/tsconfig.tsbuildinfo +1 -1
  18. package/package.json +15 -22
  19. package/dist/src/grist-editor/ox-popup-code-input.d.ts +0 -14
  20. package/dist/src/grist-editor/ox-popup-code-input.js +0 -78
  21. package/dist/src/grist-editor/ox-popup-code-input.js.map +0 -1
  22. package/dist/src/input/ox-input-background-pattern.d.ts +0 -34
  23. package/dist/src/input/ox-input-background-pattern.js +0 -178
  24. package/dist/src/input/ox-input-background-pattern.js.map +0 -1
  25. package/dist/src/input/ox-input-fill-style.d.ts +0 -44
  26. package/dist/src/input/ox-input-fill-style.js +0 -341
  27. package/dist/src/input/ox-input-fill-style.js.map +0 -1
  28. package/dist/stories/graphql-client.stories.d.ts +0 -26
  29. package/dist/stories/graphql-client.stories.js +0 -55
  30. package/dist/stories/graphql-client.stories.js.map +0 -1
  31. package/dist/stories/ox-input-graphql.stories.d.ts +0 -25
  32. package/dist/stories/ox-input-graphql.stories.js +0 -56
  33. package/dist/stories/ox-input-graphql.stories.js.map +0 -1
  34. package/dist/stories/ox-selector-resource-object.stories.d.ts +0 -29
  35. package/dist/stories/ox-selector-resource-object.stories.js +0 -80
  36. package/dist/stories/ox-selector-resource-object.stories.js.map +0 -1
@@ -1,341 +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/input/ox-input-color-stops.js';
8
- import '@operato/input/ox-input-color-gradient.js';
9
- import './ox-input-background-pattern.js';
10
- import { css, html } from 'lit';
11
- import { customElement, property } from 'lit/decorators.js';
12
- import { OxFormField } from '@operato/input';
13
- let OxInputColorStyle = class OxInputColorStyle extends OxFormField {
14
- constructor() {
15
- super(...arguments);
16
- this.colorOnly = false;
17
- this._block_reset = false;
18
- }
19
- updated(changes) {
20
- changes.has('value') && this._onChangedValue(this.value || {});
21
- }
22
- render() {
23
- return html `
24
- <div @change=${(e) => this._onChangedFillType(e)} fill-type>
25
- <input
26
- type="radio"
27
- id="fill-type-no"
28
- name="fill-type"
29
- value="no"
30
- .checked=${!this.fillType || this.fillType == 'no'}
31
- />
32
- <label for="fill-type-no"><ox-i18n msgid="label.no-fill">no fill</ox-i18n></label>
33
- <input type="radio" id="fill-type-solid" name="fill-type" value="solid" .checked=${this.fillType == 'solid'} />
34
- <label for="fill-type-solid"><ox-i18n msgid="label.solid">solid</ox-i18n></label>
35
- <input
36
- type="radio"
37
- id="fill-type-gradient"
38
- name="fill-type"
39
- value="gradient"
40
- .checked=${this.fillType == 'gradient'}
41
- />
42
-
43
- <label for="fill-type-gradient"><ox-i18n msgid="label.gradient">gradient</ox-i18n></label>
44
-
45
- ${this.colorOnly
46
- ? html ``
47
- : html `
48
- <input
49
- type="radio"
50
- id="fill-type-pattern"
51
- name="fill-type"
52
- value="pattern"
53
- .checked=${this.fillType == 'pattern'}
54
- />
55
- <label for="fill-type-pattern"><ox-i18n msgid="label.pattern">pattern</ox-i18n></label>
56
- `}
57
- </div>
58
-
59
- <div editors>
60
- <div ?active=${this.fillType == 'no'}></div>
61
-
62
- <div class="grid-10" ?active=${this.fillType == 'solid'}>
63
- <label class="icon-only-label color"></label>
64
- <ox-input-color @change=${(e) => this._onChangedSolid(e)} .value=${this.solid}> </ox-input-color>
65
- </div>
66
-
67
- <div ?active=${this.fillType == 'gradient'}>
68
- <ox-input-color-gradient @change=${(e) => this._onChandedGradient(e)} .value=${this.gradient}>
69
- </ox-input-color-gradient>
70
- </div>
71
-
72
- <div ?active=${this.fillType == 'pattern'}>
73
- <ox-input-background-pattern @change=${(e) => this._onChangedPattern(e)} .value=${this.pattern}>
74
- </ox-input-background-pattern>
75
- </div>
76
- </div>
77
- `;
78
- }
79
- async _onChangedValue(value) {
80
- /*
81
- * this._block_reset의 역할은 내부 사용자 인터렉션에 의한 value의 변경시에는 각 type별 이전값을 유지하기 위함이다.
82
- */
83
- await this.requestUpdate();
84
- /* 설정 값에 따라서, 멤버 속성을 설정한다. */
85
- if (!value) {
86
- this.fillType = 'no';
87
- if (!this._block_reset) {
88
- this.solid = undefined;
89
- this.gradient = undefined;
90
- this.pattern = undefined;
91
- }
92
- this._block_reset = false;
93
- return;
94
- }
95
- switch (typeof value) {
96
- case 'string':
97
- this.fillType = 'solid';
98
- this.solid = value;
99
- if (!this._block_reset) {
100
- this.gradient = undefined;
101
- this.pattern = undefined;
102
- }
103
- break;
104
- case 'object':
105
- this.fillType = value.type;
106
- if (value.type === 'gradient') {
107
- this.gradient = {
108
- type: value.gradientType || 'linear',
109
- colorStops: value.colorStops || [
110
- {
111
- position: 0,
112
- color: this.solid || '#000000'
113
- },
114
- {
115
- position: 1,
116
- color: this.solid || '#FFFFFF'
117
- }
118
- ],
119
- rotation: Number(value.rotation) || 0,
120
- center: value.center
121
- };
122
- if (!this._block_reset) {
123
- this.pattern = undefined;
124
- this.solid = undefined;
125
- }
126
- }
127
- else if (value.type === 'pattern') {
128
- this.pattern = {
129
- image: value.image,
130
- offsetX: Number(value.offsetX) || 0,
131
- offsetY: Number(value.offsetY) || 0,
132
- width: Number(value.width),
133
- height: Number(value.height),
134
- align: value.align,
135
- fitPattern: value.fitPattern,
136
- noRepeat: value.noRepeat,
137
- color: value.color
138
- };
139
- if (!this._block_reset) {
140
- this.gradient = undefined;
141
- this.solid = undefined;
142
- }
143
- }
144
- break;
145
- default:
146
- }
147
- this._block_reset = false;
148
- }
149
- _onChangedFillType(e) {
150
- const element = e.target;
151
- this.fillType = element.value;
152
- switch (this.fillType) {
153
- case 'gradient':
154
- if (!this.gradient) {
155
- this.gradient = {
156
- type: 'linear',
157
- colorStops: [
158
- {
159
- position: 0,
160
- color: this.solid || '#000000'
161
- },
162
- {
163
- position: 1,
164
- color: this.solid || '#FFFFFF'
165
- }
166
- ],
167
- rotation: 0,
168
- center: 'center'
169
- };
170
- }
171
- this.value = {
172
- type: 'gradient',
173
- gradientType: this.gradient.type || 'linear',
174
- colorStops: this.gradient.colorStops || [
175
- {
176
- position: 0,
177
- color: this.solid || '#000000'
178
- },
179
- {
180
- position: 1,
181
- color: this.solid || '#FFFFFF'
182
- }
183
- ],
184
- rotation: Number(this.gradient.rotation) || 0,
185
- center: this.gradient.center
186
- };
187
- break;
188
- case 'pattern':
189
- if (!this.pattern)
190
- this.pattern = {};
191
- this.value = {
192
- type: 'pattern',
193
- image: this.pattern.image,
194
- offsetX: Number(this.pattern.offsetX) || 0,
195
- offsetY: Number(this.pattern.offsetY) || 0,
196
- width: Number(this.pattern.width),
197
- height: Number(this.pattern.height),
198
- align: this.pattern.align,
199
- fitPattern: this.pattern.fitPattern,
200
- noRepeat: this.pattern.noRepeat,
201
- color: this.pattern.color
202
- };
203
- break;
204
- case 'solid':
205
- if (!this.solid)
206
- this.solid = '#fff';
207
- this.value = this.solid;
208
- break;
209
- case 'no':
210
- this.value = '';
211
- break;
212
- }
213
- this._block_reset = true;
214
- this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
215
- }
216
- _onChangedSolid(e) {
217
- if (this.fillType !== 'solid')
218
- return;
219
- this.solid = e.target.value;
220
- this.value = this.solid;
221
- this._block_reset = true;
222
- this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
223
- }
224
- _onChandedGradient(e) {
225
- /*
226
- * TODO Gradient의 rotation은 symmetry 기능 등으로 외부에서 변경될 수도 있다.
227
- * 이 점을 감안해서, 외부 변경에 대한 대응을 해야 한다.
228
- */
229
- if (this.fillType !== 'gradient') {
230
- return;
231
- }
232
- this.gradient = e.target.value;
233
- this.value = {
234
- type: 'gradient',
235
- gradientType: this.gradient.type || 'linear',
236
- colorStops: this.gradient.colorStops || [
237
- {
238
- position: 0,
239
- color: this.solid || '#000000'
240
- },
241
- {
242
- position: 1,
243
- color: this.solid || '#FFFFFF'
244
- }
245
- ],
246
- rotation: Number(this.gradient.rotation) || 0,
247
- center: this.gradient.center
248
- };
249
- this._block_reset = true;
250
- this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
251
- }
252
- _onChangedPattern(e) {
253
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
254
- if (this.fillType !== 'pattern')
255
- return;
256
- this.pattern = e.target.value;
257
- this.value = {
258
- type: 'pattern',
259
- image: (_a = this.pattern) === null || _a === void 0 ? void 0 : _a.image,
260
- offsetX: Number((_b = this.pattern) === null || _b === void 0 ? void 0 : _b.offsetX) || 0,
261
- offsetY: Number((_c = this.pattern) === null || _c === void 0 ? void 0 : _c.offsetY) || 0,
262
- width: Number((_d = this.pattern) === null || _d === void 0 ? void 0 : _d.width),
263
- height: Number((_e = this.pattern) === null || _e === void 0 ? void 0 : _e.height),
264
- align: (_f = this.pattern) === null || _f === void 0 ? void 0 : _f.align,
265
- fitPattern: (_g = this.pattern) === null || _g === void 0 ? void 0 : _g.fitPattern,
266
- noRepeat: (_h = this.pattern) === null || _h === void 0 ? void 0 : _h.noRepeat,
267
- color: (_j = this.pattern) === null || _j === void 0 ? void 0 : _j.color
268
- };
269
- this._block_reset = true;
270
- this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }));
271
- }
272
- };
273
- OxInputColorStyle.styles = css `
274
- :host {
275
- display: flex;
276
- flex-direction: column;
277
- }
278
-
279
- [fill-type] {
280
- display: flex;
281
- margin: 0 0 14px 0;
282
- }
283
-
284
- [fill-type] * {
285
- flex: auto;
286
- margin: 0;
287
- text-align: left;
288
- align-self: center;
289
- }
290
-
291
- .grid-10 {
292
- display: grid;
293
-
294
- grid-template-columns: repeat(10, 1fr);
295
- grid-gap: 5px;
296
- grid-auto-rows: minmax(24px, auto);
297
- }
298
-
299
- .grid-10 > ox-input-color {
300
- grid-column: span 4;
301
- }
302
-
303
- .grid-10 > .icon-only-label {
304
- grid-column: span 1;
305
-
306
- background: var(--url-icon-properties-label) no-repeat;
307
- float: left;
308
- margin: 0;
309
- }
310
-
311
- .icon-only-label.color {
312
- background-position: 100% -500px;
313
- }
314
-
315
- [editors] > :not([active]) {
316
- display: none;
317
- }
318
- `;
319
- __decorate([
320
- property({ type: Object })
321
- ], OxInputColorStyle.prototype, "value", void 0);
322
- __decorate([
323
- property({ type: String })
324
- ], OxInputColorStyle.prototype, "fillType", void 0);
325
- __decorate([
326
- property({ type: String })
327
- ], OxInputColorStyle.prototype, "solid", void 0);
328
- __decorate([
329
- property({ type: Object })
330
- ], OxInputColorStyle.prototype, "gradient", void 0);
331
- __decorate([
332
- property({ type: Object })
333
- ], OxInputColorStyle.prototype, "pattern", void 0);
334
- __decorate([
335
- property({ type: Boolean, attribute: 'color-only' })
336
- ], OxInputColorStyle.prototype, "colorOnly", void 0);
337
- OxInputColorStyle = __decorate([
338
- customElement('ox-input-fill-style')
339
- ], OxInputColorStyle);
340
- export { OxInputColorStyle };
341
- //# sourceMappingURL=ox-input-fill-style.js.map
@@ -1 +0,0 @@
1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C,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDAA0B;AACzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;kDAAkC;AAEP;IAArD,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;oDAA2B;AAtDrE,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAkV7B","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/input/ox-input-color-stops.js'\nimport '@operato/input/ox-input-color-gradient.js'\nimport './ox-input-background-pattern.js'\n\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { ColorStop, GradientOption, OxFormField, OxInputColorGradient } from '@operato/input'\n\nimport { BackgroundPatternOption, OxInputBackgroundPattern } from './ox-input-background-pattern.js'\n\nexport type FillStyle =\n | {\n type?: 'no' | 'solid' | 'gradient' | 'pattern'\n gradientType?: 'linear' | 'radial'\n colorStops?: ColorStop[]\n rotation?: number\n center?: 'center' | 'left-top' | 'right-top' | 'right-bottom' | 'left-bottom'\n image?: HTMLImageElement | string\n offsetX?: number\n offsetY?: number\n width?: number\n height?: number\n align?: 'left-top' | 'top' | 'right-top' | 'left' | 'center' | 'right' | 'left-bottom' | 'bottom' | 'right-bottom'\n fitPattern?: boolean\n noRepeat?: boolean\n color?: string\n }\n | 'no'\n | string\n\n@customElement('ox-input-fill-style')\nexport class OxInputColorStyle extends OxFormField {\n static styles = css`\n :host {\n display: flex;\n flex-direction: column;\n }\n\n [fill-type] {\n display: flex;\n margin: 0 0 14px 0;\n }\n\n [fill-type] * {\n flex: auto;\n margin: 0;\n text-align: left;\n align-self: center;\n }\n\n .grid-10 {\n display: grid;\n\n grid-template-columns: repeat(10, 1fr);\n grid-gap: 5px;\n grid-auto-rows: minmax(24px, auto);\n }\n\n .grid-10 > ox-input-color {\n grid-column: span 4;\n }\n\n .grid-10 > .icon-only-label {\n grid-column: span 1;\n\n background: var(--url-icon-properties-label) no-repeat;\n float: left;\n margin: 0;\n }\n\n .icon-only-label.color {\n background-position: 100% -500px;\n }\n\n [editors] > :not([active]) {\n display: none;\n }\n `\n\n @property({ type: Object }) value?: FillStyle\n @property({ type: String }) fillType?: string\n @property({ type: String }) solid?: string\n @property({ type: Object }) gradient?: GradientOption\n @property({ type: Object }) pattern?: BackgroundPatternOption\n\n @property({ type: Boolean, attribute: 'color-only' }) colorOnly: boolean = false\n\n private _block_reset: boolean = false\n\n updated(changes: PropertyValues<this>) {\n changes.has('value') && this._onChangedValue(this.value || {})\n }\n\n render() {\n return html`\n <div @change=${(e: Event) => this._onChangedFillType(e)} fill-type>\n <input\n type=\"radio\"\n id=\"fill-type-no\"\n name=\"fill-type\"\n value=\"no\"\n .checked=${!this.fillType || this.fillType == 'no'}\n />\n <label for=\"fill-type-no\"><ox-i18n msgid=\"label.no-fill\">no fill</ox-i18n></label>\n <input type=\"radio\" id=\"fill-type-solid\" name=\"fill-type\" value=\"solid\" .checked=${this.fillType == 'solid'} />\n <label for=\"fill-type-solid\"><ox-i18n msgid=\"label.solid\">solid</ox-i18n></label>\n <input\n type=\"radio\"\n id=\"fill-type-gradient\"\n name=\"fill-type\"\n value=\"gradient\"\n .checked=${this.fillType == 'gradient'}\n />\n\n <label for=\"fill-type-gradient\"><ox-i18n msgid=\"label.gradient\">gradient</ox-i18n></label>\n\n ${this.colorOnly\n ? html``\n : html`\n <input\n type=\"radio\"\n id=\"fill-type-pattern\"\n name=\"fill-type\"\n value=\"pattern\"\n .checked=${this.fillType == 'pattern'}\n />\n <label for=\"fill-type-pattern\"><ox-i18n msgid=\"label.pattern\">pattern</ox-i18n></label>\n `}\n </div>\n\n <div editors>\n <div ?active=${this.fillType == 'no'}></div>\n\n <div class=\"grid-10\" ?active=${this.fillType == 'solid'}>\n <label class=\"icon-only-label color\"></label>\n <ox-input-color @change=${(e: Event) => this._onChangedSolid(e)} .value=${this.solid}> </ox-input-color>\n </div>\n\n <div ?active=${this.fillType == 'gradient'}>\n <ox-input-color-gradient @change=${(e: Event) => this._onChandedGradient(e)} .value=${this.gradient}>\n </ox-input-color-gradient>\n </div>\n\n <div ?active=${this.fillType == 'pattern'}>\n <ox-input-background-pattern @change=${(e: Event) => this._onChangedPattern(e)} .value=${this.pattern}>\n </ox-input-background-pattern>\n </div>\n </div>\n `\n }\n\n async _onChangedValue(value: FillStyle) {\n /*\n * this._block_reset의 역할은 내부 사용자 인터렉션에 의한 value의 변경시에는 각 type별 이전값을 유지하기 위함이다.\n */\n await this.requestUpdate()\n\n /* 설정 값에 따라서, 멤버 속성을 설정한다. */\n if (!value) {\n this.fillType = 'no'\n\n if (!this._block_reset) {\n this.solid = undefined\n this.gradient = undefined\n this.pattern = undefined\n }\n\n this._block_reset = false\n return\n }\n\n switch (typeof value) {\n case 'string':\n this.fillType = 'solid'\n this.solid = value\n\n if (!this._block_reset) {\n this.gradient = undefined\n this.pattern = undefined\n }\n break\n case 'object':\n this.fillType = value.type\n\n if (value.type === 'gradient') {\n this.gradient = {\n type: value.gradientType || 'linear',\n colorStops: value.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(value.rotation) || 0,\n center: value.center\n }\n\n if (!this._block_reset) {\n this.pattern = undefined\n this.solid = undefined\n }\n } else if (value.type === 'pattern') {\n this.pattern = {\n image: value.image,\n offsetX: Number(value.offsetX) || 0,\n offsetY: Number(value.offsetY) || 0,\n width: Number(value.width),\n height: Number(value.height),\n align: value.align,\n fitPattern: value.fitPattern,\n noRepeat: value.noRepeat,\n color: value.color\n }\n\n if (!this._block_reset) {\n this.gradient = undefined\n this.solid = undefined\n }\n }\n\n break\n default:\n }\n\n this._block_reset = false\n }\n\n _onChangedFillType(e: Event) {\n const element = e.target as HTMLInputElement\n this.fillType = element.value\n\n switch (this.fillType) {\n case 'gradient':\n if (!this.gradient) {\n this.gradient = {\n type: 'linear',\n colorStops: [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: 0,\n center: 'center'\n }\n }\n\n this.value = {\n type: 'gradient',\n gradientType: this.gradient.type || 'linear',\n colorStops: this.gradient.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(this.gradient.rotation) || 0,\n center: this.gradient.center\n }\n break\n\n case 'pattern':\n if (!this.pattern) this.pattern = {}\n\n this.value = {\n type: 'pattern',\n image: this.pattern.image,\n offsetX: Number(this.pattern.offsetX) || 0,\n offsetY: Number(this.pattern.offsetY) || 0,\n width: Number(this.pattern.width),\n height: Number(this.pattern.height),\n align: this.pattern.align,\n fitPattern: this.pattern.fitPattern,\n noRepeat: this.pattern.noRepeat,\n color: this.pattern.color\n }\n break\n\n case 'solid':\n if (!this.solid) this.solid = '#fff'\n this.value = this.solid\n break\n\n case 'no':\n this.value = ''\n break\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChangedSolid(e: Event) {\n if (this.fillType !== 'solid') return\n\n this.solid = (e.target as HTMLInputElement).value\n\n this.value = this.solid\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChandedGradient(e: Event) {\n /*\n * TODO Gradient의 rotation은 symmetry 기능 등으로 외부에서 변경될 수도 있다.\n * 이 점을 감안해서, 외부 변경에 대한 대응을 해야 한다.\n */\n\n if (this.fillType !== 'gradient') {\n return\n }\n\n this.gradient = (e.target as OxInputColorGradient).value\n\n this.value = {\n type: 'gradient',\n gradientType: this.gradient.type || 'linear',\n colorStops: this.gradient.colorStops || [\n {\n position: 0,\n color: this.solid || '#000000'\n },\n {\n position: 1,\n color: this.solid || '#FFFFFF'\n }\n ],\n rotation: Number(this.gradient.rotation) || 0,\n center: this.gradient.center\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n\n _onChangedPattern(e: Event) {\n if (this.fillType !== 'pattern') return\n\n this.pattern = (e.target as OxInputBackgroundPattern).value\n\n this.value = {\n type: 'pattern',\n image: this.pattern?.image,\n offsetX: Number(this.pattern?.offsetX) || 0,\n offsetY: Number(this.pattern?.offsetY) || 0,\n width: Number(this.pattern?.width),\n height: Number(this.pattern?.height),\n align: this.pattern?.align,\n fitPattern: this.pattern?.fitPattern,\n noRepeat: this.pattern?.noRepeat,\n color: this.pattern?.color\n }\n\n this._block_reset = true\n this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true }))\n }\n}\n"]}
@@ -1,26 +0,0 @@
1
- import '@operato/graphql/graphql-client.js';
2
- import '../src/input/ox-input-graphql.js';
3
- import { TemplateResult } from 'lit';
4
- declare const _default: {
5
- title: string;
6
- component: string;
7
- argTypes: {
8
- value: {
9
- control: string;
10
- };
11
- name: {
12
- control: string;
13
- };
14
- };
15
- };
16
- export default _default;
17
- interface Story<T> {
18
- (args: T): TemplateResult;
19
- args?: Partial<T>;
20
- argTypes?: Record<string, unknown>;
21
- }
22
- interface ArgTypes {
23
- name?: string;
24
- value?: string;
25
- }
26
- export declare const Regular: Story<ArgTypes>;
@@ -1,55 +0,0 @@
1
- import { setClientLink, createMockLink } from '@operato/graphql/graphql-env.js';
2
- import '@operato/graphql/graphql-client.js';
3
- import '../src/input/ox-input-graphql.js';
4
- // TODO cm6-graphql에서 사용하는 nullthrows 관련 모듈 오류로 스토리북 테스트가 안됨.
5
- import { html } from 'lit';
6
- setClientLink(createMockLink({
7
- request: {
8
- query: ''
9
- },
10
- result: {
11
- data: {
12
- viewer: null
13
- }
14
- }
15
- }));
16
- export default {
17
- title: 'graphql-client',
18
- component: 'graphql-client',
19
- argTypes: {
20
- value: { control: 'text' },
21
- name: { control: 'text' }
22
- }
23
- };
24
- const Template = ({ name = 'code', value = '' }) => html `
25
- <style>
26
- body {
27
- }
28
- </style>
29
-
30
- <ox-input-graphql
31
- @change=${(e) => {
32
- console.log(e.target.value);
33
- }}
34
- name=${name}
35
- .value=${value}
36
- >
37
- </ox-input-graphql>
38
- `;
39
- export const Regular = Template.bind({});
40
- Regular.args = {
41
- name: 'code',
42
- value: `
43
- query privileges {
44
- privileges {
45
- items {
46
- privilege
47
- category
48
- description
49
- }
50
- total
51
- }
52
- }
53
- `
54
- };
55
- //# sourceMappingURL=graphql-client.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graphql-client.stories.js","sourceRoot":"","sources":["../../stories/graphql-client.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,oCAAoC,CAAA;AAC3C,OAAO,kCAAkC,CAAA;AAEzC,6DAA6D;AAE7D,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,aAAa,CACX,cAAc,CAAC;IACb,OAAO,EAAE;QACP,KAAK,EAAE,EAAE;KACV;IACD,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,MAAM,EAAE,IAAI;SACb;KACF;CACF,CAAC,CACH,CAAA;AAED,eAAe;IACb,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KAC1B;CACF,CAAA;AAaD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;cAOrE,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;;;CAGjB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE;;;;;;;;;;;CAWR;CACA,CAAA","sourcesContent":["import { setClientLink, createMockLink } from '@operato/graphql/graphql-env.js'\nimport '@operato/graphql/graphql-client.js'\nimport '../src/input/ox-input-graphql.js'\n\n// TODO cm6-graphql에서 사용하는 nullthrows 관련 모듈 오류로 스토리북 테스트가 안됨.\n\nimport { html, TemplateResult } from 'lit'\n\nsetClientLink(\n createMockLink({\n request: {\n query: ''\n },\n result: {\n data: {\n viewer: null\n }\n }\n })\n)\n\nexport default {\n title: 'graphql-client',\n component: 'graphql-client',\n argTypes: {\n value: { control: 'text' },\n name: { control: 'text' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'code', value = '' }: ArgTypes) => html`\n <style>\n body {\n }\n </style>\n\n <ox-input-graphql\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n >\n </ox-input-graphql>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'code',\n value: `\nquery privileges {\n privileges {\n items {\n privilege\n category\n description\n }\n total\n }\n}\n`\n}\n"]}
@@ -1,25 +0,0 @@
1
- import '../src/input/ox-input-graphql.js';
2
- import { TemplateResult } from 'lit';
3
- declare const _default: {
4
- title: string;
5
- component: string;
6
- argTypes: {
7
- value: {
8
- control: string;
9
- };
10
- name: {
11
- control: string;
12
- };
13
- };
14
- };
15
- export default _default;
16
- interface Story<T> {
17
- (args: T): TemplateResult;
18
- args?: Partial<T>;
19
- argTypes?: Record<string, unknown>;
20
- }
21
- interface ArgTypes {
22
- name?: string;
23
- value?: string;
24
- }
25
- export declare const Regular: Story<ArgTypes>;
@@ -1,56 +0,0 @@
1
- import '../src/input/ox-input-graphql.js';
2
- import { html } from 'lit';
3
- export default {
4
- title: 'ox-input-graphql',
5
- component: 'ox-input-graphql',
6
- argTypes: {
7
- value: { control: 'text' },
8
- name: { control: 'text' }
9
- }
10
- };
11
- const Template = ({ name = 'code', value = '' }) => html `
12
- <link href="/themes/app-theme.css" rel="stylesheet" />
13
- <link
14
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
15
- rel="stylesheet"
16
- />
17
- <link
18
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
19
- rel="stylesheet"
20
- />
21
- <link
22
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
23
- rel="stylesheet"
24
- />
25
-
26
- <style>
27
- body {
28
- }
29
- </style>
30
-
31
- <ox-input-graphql
32
- @change=${(e) => {
33
- console.log(e.target.value);
34
- }}
35
- name=${name}
36
- .value=${value}
37
- >
38
- </ox-input-graphql>
39
- `;
40
- export const Regular = Template.bind({});
41
- Regular.args = {
42
- name: 'code',
43
- value: `
44
- query privileges {
45
- privileges {
46
- items {
47
- privilege
48
- category
49
- description
50
- }
51
- total
52
- }
53
- }
54
- `
55
- };
56
- //# sourceMappingURL=ox-input-graphql.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ox-input-graphql.stories.js","sourceRoot":"","sources":["../../stories/ox-input-graphql.stories.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,kBAAkB;IAC7B,QAAQ,EAAE;QACR,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;QAC1B,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;KAC1B;CACF,CAAA;AAaD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,GAAG,EAAE,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;cAqBrE,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;aACF,KAAK;;;CAGjB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE;;;;;;;;;;;CAWR;CACA,CAAA","sourcesContent":["import '../src/input/ox-input-graphql.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-input-graphql',\n component: 'ox-input-graphql',\n argTypes: {\n value: { control: 'text' },\n name: { control: 'text' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n name?: string\n value?: string\n}\n\nconst Template: Story<ArgTypes> = ({ name = 'code', value = '' }: ArgTypes) => html`\n <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n <link\n href=\"https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1\"\n rel=\"stylesheet\"\n />\n\n <style>\n body {\n }\n </style>\n\n <ox-input-graphql\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n .value=${value}\n >\n </ox-input-graphql>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n name: 'code',\n value: `\nquery privileges {\n privileges {\n items {\n privilege\n category\n description\n }\n total\n }\n}\n`\n}\n"]}
@@ -1,29 +0,0 @@
1
- import { TemplateResult } from 'lit';
2
- import '../src/selector/ox-selector-resource-object.js';
3
- declare const _default: {
4
- title: string;
5
- component: string;
6
- argTypes: {
7
- queryName: {
8
- control: string;
9
- };
10
- value: {
11
- control: string;
12
- };
13
- valueField: {
14
- control: string;
15
- };
16
- };
17
- };
18
- export default _default;
19
- interface Story<T> {
20
- (args: T): TemplateResult;
21
- args?: Partial<T>;
22
- argTypes?: Record<string, unknown>;
23
- }
24
- interface ArgTypes {
25
- queryName: string;
26
- value?: string;
27
- valueField?: string;
28
- }
29
- export declare const Regular: Story<ArgTypes>;
@@ -1,80 +0,0 @@
1
- import { html } from 'lit';
2
- import { ifDefined } from 'lit/directives/if-defined.js';
3
- import { setClientLink, createMockLink } from '@operato/graphql/graphql-env.js';
4
- import '../src/selector/ox-selector-resource-object.js';
5
- setClientLink(createMockLink({
6
- request: {
7
- query: ''
8
- },
9
- result: {
10
- data: {
11
- viewer: null
12
- }
13
- }
14
- }));
15
- export default {
16
- title: 'ox-selector-resource-object',
17
- component: 'ox-selector-resource-object',
18
- argTypes: {
19
- queryName: { control: 'string' },
20
- value: { control: 'string' },
21
- valueField: { control: 'string' }
22
- }
23
- };
24
- const Template = ({ value = '', queryName, valueField }) => html `
25
- <style>
26
- body {
27
- }
28
- </style>
29
-
30
- <script>
31
- const select = ['name', 'description']
32
- </script>
33
-
34
- <ox-selector-resource-object
35
- @change=${(e) => {
36
- console.log(e.target.value);
37
- }}
38
- name=${name}
39
- value=${ifDefined(value)}
40
- valueField=${ifDefined(valueField)}
41
- .queryName=${queryName}
42
- .confirmCallback=${(record) => console.log('confirm', record)}
43
- .columns=${[
44
- {
45
- type: 'string',
46
- name: 'id',
47
- header: 'id',
48
- hidden: true,
49
- width: 100,
50
- queryName: ''
51
- },
52
- {
53
- type: 'string',
54
- name: 'name',
55
- header: 'name',
56
- hidden: false,
57
- width: 150,
58
- queryName: ''
59
- },
60
- {
61
- type: 'string',
62
- name: 'description',
63
- header: 'description',
64
- hidden: false,
65
- width: 150,
66
- queryName: ''
67
- }
68
- ]}
69
- .list=${['name', 'description']}
70
- .basicArgs=${''}
71
- >
72
- </ox-selector-resource-object>
73
- `;
74
- export const Regular = Template.bind({});
75
- Regular.args = {
76
- value: '',
77
- queryName: 'entity',
78
- valueField: 'id'
79
- };
80
- //# sourceMappingURL=ox-selector-resource-object.stories.js.map