@operato/app 9.0.0-beta.6 → 9.0.0-beta.62

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 (27) hide show
  1. package/CHANGELOG.md +292 -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/input/index.d.ts +0 -2
  7. package/dist/src/input/index.js +0 -2
  8. package/dist/src/input/index.js.map +1 -1
  9. package/dist/src/input/ox-input-graphql.js +4 -0
  10. package/dist/src/input/ox-input-graphql.js.map +1 -1
  11. package/dist/tsconfig.tsbuildinfo +1 -1
  12. package/package.json +15 -22
  13. package/dist/src/input/ox-input-background-pattern.d.ts +0 -34
  14. package/dist/src/input/ox-input-background-pattern.js +0 -178
  15. package/dist/src/input/ox-input-background-pattern.js.map +0 -1
  16. package/dist/src/input/ox-input-fill-style.d.ts +0 -44
  17. package/dist/src/input/ox-input-fill-style.js +0 -341
  18. package/dist/src/input/ox-input-fill-style.js.map +0 -1
  19. package/dist/stories/graphql-client.stories.d.ts +0 -26
  20. package/dist/stories/graphql-client.stories.js +0 -55
  21. package/dist/stories/graphql-client.stories.js.map +0 -1
  22. package/dist/stories/ox-input-graphql.stories.d.ts +0 -25
  23. package/dist/stories/ox-input-graphql.stories.js +0 -56
  24. package/dist/stories/ox-input-graphql.stories.js.map +0 -1
  25. package/dist/stories/ox-selector-resource-object.stories.d.ts +0 -29
  26. package/dist/stories/ox-selector-resource-object.stories.js +0 -80
  27. package/dist/stories/ox-selector-resource-object.stories.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ox-input-fill-style.js","sourceRoot":"","sources":["../../../src/input/ox-input-fill-style.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,OAAO,0BAA0B,CAAA;AACj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,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
@@ -1 +0,0 @@
1
- {"version":3,"file":"ox-selector-resource-object.stories.js","sourceRoot":"","sources":["../../stories/ox-selector-resource-object.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,gDAAgD,CAAA;AAEvD,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,6BAA6B;IACpC,SAAS,EAAE,6BAA6B;IACxC,QAAQ,EAAE;QACR,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAChC,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;QAC5B,UAAU,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAClC;CACF,CAAA;AAcD,MAAM,QAAQ,GAAoB,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,EAAE,UAAU,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;cAW7E,CAAC,CAAQ,EAAE,EAAE;IACrB,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC;WACM,IAAI;YACH,SAAS,CAAC,KAAK,CAAC;iBACX,SAAS,CAAC,UAAU,CAAC;iBACrB,SAAS;uBACH,CAAC,MAAW,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC;eACvD;IACT;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,EAAE;KACd;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,MAAM;QACd,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,EAAE;KACd;IACD;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,EAAE;KACd;CACF;YACO,CAAC,MAAM,EAAE,aAAa,CAAC;iBAClB,EAAE;;;CAGlB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,KAAK,EAAE,EAAE;IACT,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,IAAI;CACjB,CAAA","sourcesContent":["import { html, TemplateResult } from 'lit'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport { setClientLink, createMockLink } from '@operato/graphql/graphql-env.js'\nimport '../src/selector/ox-selector-resource-object.js'\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: 'ox-selector-resource-object',\n component: 'ox-selector-resource-object',\n argTypes: {\n queryName: { control: 'string' },\n value: { control: 'string' },\n valueField: { control: 'string' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {\n queryName: string\n value?: string\n valueField?: string\n}\n\nconst Template: Story<ArgTypes> = ({ value = '', queryName, valueField }: ArgTypes) => html`\n <style>\n body {\n }\n </style>\n\n <script>\n const select = ['name', 'description']\n </script>\n\n <ox-selector-resource-object\n @change=${(e: Event) => {\n console.log((e.target as HTMLInputElement).value)\n }}\n name=${name}\n value=${ifDefined(value)}\n valueField=${ifDefined(valueField)}\n .queryName=${queryName}\n .confirmCallback=${(record: any) => console.log('confirm', record)}\n .columns=${[\n {\n type: 'string',\n name: 'id',\n header: 'id',\n hidden: true,\n width: 100,\n queryName: ''\n },\n {\n type: 'string',\n name: 'name',\n header: 'name',\n hidden: false,\n width: 150,\n queryName: ''\n },\n {\n type: 'string',\n name: 'description',\n header: 'description',\n hidden: false,\n width: 150,\n queryName: ''\n }\n ]}\n .list=${['name', 'description']}\n .basicArgs=${''}\n >\n </ox-selector-resource-object>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n value: '',\n queryName: 'entity',\n valueField: 'id'\n}\n"]}