@operato/attribute 9.0.0-beta.7 → 9.0.0-beta.85

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/attribute",
3
3
  "description": "WebApplication attribute supporting components following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "9.0.0-beta.7",
5
+ "version": "9.0.0-beta.85",
6
6
  "type": "module",
7
7
  "main": "dist/src/index.js",
8
8
  "module": "dist/src/index.js",
@@ -59,16 +59,16 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@material/web": "^2.0.0",
62
- "@operato/data-grist": "^9.0.0-beta.7",
63
- "@operato/graphql": "^9.0.0-beta.6",
64
- "@operato/grist-editor": "^9.0.0-beta.7",
65
- "@operato/i18n": "^9.0.0-beta.5",
66
- "@operato/input": "^9.0.0-beta.7",
67
- "@operato/popup": "^9.0.0-beta.6",
68
- "@operato/property-editor": "^9.0.0-beta.7",
69
- "@operato/shell": "^9.0.0-beta.6",
70
- "@operato/styles": "^9.0.0-beta.6",
71
- "@operato/utils": "^9.0.0-beta.6",
62
+ "@operato/data-grist": "^9.0.0-beta.85",
63
+ "@operato/graphql": "^9.0.0-beta.38",
64
+ "@operato/grist-editor": "^9.0.0-beta.85",
65
+ "@operato/i18n": "^9.0.0-beta.37",
66
+ "@operato/input": "^9.0.0-beta.85",
67
+ "@operato/popup": "^9.0.0-beta.52",
68
+ "@operato/property-editor": "^9.0.0-beta.85",
69
+ "@operato/shell": "^9.0.0-beta.52",
70
+ "@operato/styles": "^9.0.0-beta.47",
71
+ "@operato/utils": "^9.0.0-beta.38",
72
72
  "lit": "^3.1.2"
73
73
  },
74
74
  "devDependencies": {
@@ -103,5 +103,5 @@
103
103
  "prettier --write"
104
104
  ]
105
105
  },
106
- "gitHead": "5651545395e34a4ffa3e915d09fc2d2b9c433df3"
106
+ "gitHead": "eee693c95a8d12322e12fa13282e6646eff9f124"
107
107
  }
@@ -1,18 +0,0 @@
1
- import '@material/web/icon/icon.js';
2
- import '@operato/i18n';
3
- import '../src/ox-attribute-form.js';
4
- import { TemplateResult } from 'lit';
5
- declare const _default: {
6
- title: string;
7
- component: string;
8
- argTypes: {};
9
- };
10
- export default _default;
11
- interface Story<T> {
12
- (args: T): TemplateResult;
13
- args?: Partial<T>;
14
- argTypes?: Record<string, unknown>;
15
- }
16
- interface ArgTypes {
17
- }
18
- export declare const Regular: Story<ArgTypes>;
@@ -1,92 +0,0 @@
1
- import '@material/web/icon/icon.js';
2
- import '@operato/i18n';
3
- import '../src/ox-attribute-form.js';
4
- import { html } from 'lit';
5
- export default {
6
- title: 'ox-attribute-form',
7
- component: 'ox-attribute-form',
8
- argTypes: {}
9
- };
10
- const attributeSet = {
11
- entity: 'Domain',
12
- description: 'Attributes for Domain Entity',
13
- items: [
14
- {
15
- name: '등록정보',
16
- description: '회사 등록 정보',
17
- tag: 'brn',
18
- type: 'text',
19
- active: true,
20
- hidden: false
21
- },
22
- {
23
- name: '주소',
24
- description: '회사 주소',
25
- tag: 'address',
26
- type: 'text',
27
- active: true,
28
- hidden: false
29
- },
30
- {
31
- name: '신용도',
32
- description: '회사의 신용도',
33
- tag: 'credit',
34
- type: 'select',
35
- options: {
36
- options: [
37
- { text: '최우수', value: '최우수' },
38
- { text: '우수', value: '우수' },
39
- { text: '보통', value: '보통' },
40
- { text: '미달', value: '미달' }
41
- ]
42
- },
43
- active: true,
44
- hidden: false
45
- },
46
- {
47
- name: '정보파일',
48
- description: '참조 첨부 파일.',
49
- tag: 'file',
50
- type: 'file',
51
- active: true,
52
- hidden: false
53
- }
54
- ]
55
- };
56
- var value = {
57
- brn: '1234567890-1234-1',
58
- address: '경기도 성남시 분당구.',
59
- credit: '최우수'
60
- };
61
- const Template = ({}) => html `
62
- <link href="/themes/app-theme.css" rel="stylesheet" />
63
- <link
64
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
65
- rel="stylesheet"
66
- />
67
- <link
68
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
69
- rel="stylesheet"
70
- />
71
- <link
72
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
73
- rel="stylesheet"
74
- />
75
-
76
- <style>
77
- body {
78
- }
79
- </style>
80
-
81
- <ox-attribute-form
82
- .attributeSet=${attributeSet}
83
- .value=${value}
84
- @change=${(e) => {
85
- value = e.detail;
86
- console.log('change', value);
87
- }}
88
- ></ox-attribute-form>
89
- `;
90
- export const Regular = Template.bind({});
91
- Regular.args = {};
92
- //# sourceMappingURL=ox-attribute-form.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ox-attribute-form.stories.js","sourceRoot":"","sources":["../../stories/ox-attribute-form.stories.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,eAAe,CAAA;AACtB,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,8BAA8B;IAC3C,KAAK,EAAE;QACL;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,UAAU;YACvB,GAAG,EAAE,KAAK;YACV,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;QACD;YACE,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,OAAO;YACpB,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;QACD;YACE,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,SAAS;YACtB,GAAG,EAAE,QAAQ;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;oBAC3B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;oBAC3B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;iBAC5B;aACF;YACD,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,WAAW;YACxB,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;KACF;CACF,CAAA;AAED,IAAI,KAAK,GAAG;IACV,GAAG,EAAE,mBAAmB;IACxB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,KAAK;CACd,CAAA;AAED,MAAM,QAAQ,GAAoB,CAAC,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;oBAqBpC,YAAY;aACnB,KAAK;cACJ,CAAC,CAAc,EAAE,EAAE;IAC3B,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;IAChB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;AAC9B,CAAC;;CAEJ,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/i18n'\nimport '../src/ox-attribute-form.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-attribute-form',\n component: 'ox-attribute-form',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst attributeSet = {\n entity: 'Domain',\n description: 'Attributes for Domain Entity',\n items: [\n {\n name: '등록정보',\n description: '회사 등록 정보',\n tag: 'brn',\n type: 'text',\n active: true,\n hidden: false\n },\n {\n name: '주소',\n description: '회사 주소',\n tag: 'address',\n type: 'text',\n active: true,\n hidden: false\n },\n {\n name: '신용도',\n description: '회사의 신용도',\n tag: 'credit',\n type: 'select',\n options: {\n options: [\n { text: '최우수', value: '최우수' },\n { text: '우수', value: '우수' },\n { text: '보통', value: '보통' },\n { text: '미달', value: '미달' }\n ]\n },\n active: true,\n hidden: false\n },\n {\n name: '정보파일',\n description: '참조 첨부 파일.',\n tag: 'file',\n type: 'file',\n active: true,\n hidden: false\n }\n ]\n}\n\nvar value = {\n brn: '1234567890-1234-1',\n address: '경기도 성남시 분당구.',\n credit: '최우수'\n}\n\nconst Template: Story<ArgTypes> = ({}: 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-attribute-form\n .attributeSet=${attributeSet}\n .value=${value}\n @change=${(e: CustomEvent) => {\n value = e.detail\n console.log('change', value)\n }}\n ></ox-attribute-form>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
@@ -1,18 +0,0 @@
1
- import '@operato/i18n';
2
- import '../src/ox-attribute-view.js';
3
- import '@material/web/icon/icon.js';
4
- import { TemplateResult } from 'lit';
5
- declare const _default: {
6
- title: string;
7
- component: string;
8
- argTypes: {};
9
- };
10
- export default _default;
11
- interface Story<T> {
12
- (args: T): TemplateResult;
13
- args?: Partial<T>;
14
- argTypes?: Record<string, unknown>;
15
- }
16
- interface ArgTypes {
17
- }
18
- export declare const Regular: Story<ArgTypes>;
@@ -1,85 +0,0 @@
1
- import '@operato/i18n';
2
- import '../src/ox-attribute-view.js';
3
- import '@material/web/icon/icon.js';
4
- import { html } from 'lit';
5
- export default {
6
- title: 'ox-attribute-view',
7
- component: 'ox-attribute-view',
8
- argTypes: {}
9
- };
10
- const attributeSet = {
11
- entity: 'Domain',
12
- description: 'Attributes for Domain Entity',
13
- items: [
14
- {
15
- name: '등록정보',
16
- description: '회사 등록 정보',
17
- tag: 'brn',
18
- type: 'text',
19
- active: true,
20
- hidden: false
21
- },
22
- {
23
- name: '주소',
24
- description: '회사 주소',
25
- tag: 'address',
26
- type: 'text',
27
- active: true,
28
- hidden: false
29
- },
30
- {
31
- name: '신용도',
32
- description: '회사의 신용도',
33
- tag: 'credit',
34
- type: 'select',
35
- options: {
36
- options: [
37
- { text: '최우수', value: '최우수' },
38
- { text: '우수', value: '우수' },
39
- { text: '보통', value: '보통' },
40
- { text: '미달', value: '미달' }
41
- ]
42
- },
43
- active: true,
44
- hidden: false
45
- },
46
- {
47
- name: '정보파일',
48
- description: '참조 첨부 파일.',
49
- tag: 'file',
50
- type: 'file',
51
- active: true,
52
- hidden: false
53
- }
54
- ]
55
- };
56
- var value = {
57
- brn: '1234567890-1234-1',
58
- address: '경기도 성남시 분당구.',
59
- credit: '최우수'
60
- };
61
- const Template = ({}) => html `
62
- <link href="/themes/app-theme.css" rel="stylesheet" />
63
- <link
64
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
65
- rel="stylesheet"
66
- />
67
- <link
68
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
69
- rel="stylesheet"
70
- />
71
- <link
72
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
73
- rel="stylesheet"
74
- />
75
-
76
- <style>
77
- body {
78
- }
79
- </style>
80
-
81
- <ox-attribute-view .attributeSet=${attributeSet} .value=${value}></ox-attribute-view>
82
- `;
83
- export const Regular = Template.bind({});
84
- Regular.args = {};
85
- //# sourceMappingURL=ox-attribute-view.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ox-attribute-view.stories.js","sourceRoot":"","sources":["../../stories/ox-attribute-view.stories.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAA;AACtB,OAAO,6BAA6B,CAAA;AACpC,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,mBAAmB;IAC1B,SAAS,EAAE,mBAAmB;IAC9B,QAAQ,EAAE,EAAE;CACb,CAAA;AAUD,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,8BAA8B;IAC3C,KAAK,EAAE;QACL;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,UAAU;YACvB,GAAG,EAAE,KAAK;YACV,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;QACD;YACE,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,OAAO;YACpB,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;QACD;YACE,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,SAAS;YACtB,GAAG,EAAE,QAAQ;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;oBAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;oBAC3B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;oBAC3B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;iBAC5B;aACF;YACD,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;QACD;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,WAAW;YACxB,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,KAAK;SACd;KACF;CACF,CAAA;AAED,IAAI,KAAK,GAAG;IACV,GAAG,EAAE,mBAAmB;IACxB,OAAO,EAAE,cAAc;IACvB,MAAM,EAAE,KAAK;CACd,CAAA;AAED,MAAM,QAAQ,GAAoB,CAAC,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;qCAoBnB,YAAY,WAAW,KAAK;CAChE,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@operato/i18n'\nimport '../src/ox-attribute-view.js'\nimport '@material/web/icon/icon.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: 'ox-attribute-view',\n component: 'ox-attribute-view',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst attributeSet = {\n entity: 'Domain',\n description: 'Attributes for Domain Entity',\n items: [\n {\n name: '등록정보',\n description: '회사 등록 정보',\n tag: 'brn',\n type: 'text',\n active: true,\n hidden: false\n },\n {\n name: '주소',\n description: '회사 주소',\n tag: 'address',\n type: 'text',\n active: true,\n hidden: false\n },\n {\n name: '신용도',\n description: '회사의 신용도',\n tag: 'credit',\n type: 'select',\n options: {\n options: [\n { text: '최우수', value: '최우수' },\n { text: '우수', value: '우수' },\n { text: '보통', value: '보통' },\n { text: '미달', value: '미달' }\n ]\n },\n active: true,\n hidden: false\n },\n {\n name: '정보파일',\n description: '참조 첨부 파일.',\n tag: 'file',\n type: 'file',\n active: true,\n hidden: false\n }\n ]\n}\n\nvar value = {\n brn: '1234567890-1234-1',\n address: '경기도 성남시 분당구.',\n credit: '최우수'\n}\n\nconst Template: Story<ArgTypes> = ({}: 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-attribute-view .attributeSet=${attributeSet} .value=${value}></ox-attribute-view>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}
@@ -1,25 +0,0 @@
1
- import '@material/web/icon/icon.js';
2
- import '@operato/property-editor/ox-property-editor-checkbox.js';
3
- import '@operato/property-editor/ox-property-editor-number.js';
4
- import '@operato/property-editor/ox-property-editor-string.js';
5
- import '@operato/property-editor/ox-property-editor-options.js';
6
- import '@operato/property-editor/ox-properties-dynamic-view.js';
7
- import '@operato/data-grist/ox-filters-form.js';
8
- import '@operato/data-grist/ox-sorters-control.js';
9
- import '@operato/grist-editor';
10
- import '../src/grist-editor/index.js';
11
- import { TemplateResult } from 'lit';
12
- declare const _default: {
13
- title: string;
14
- component: string;
15
- argTypes: {};
16
- };
17
- export default _default;
18
- interface Story<T> {
19
- (args: T): TemplateResult;
20
- args?: Partial<T>;
21
- argTypes?: Record<string, unknown>;
22
- }
23
- interface ArgTypes {
24
- }
25
- export declare const Regular: Story<ArgTypes>;
@@ -1,321 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import '@material/web/icon/icon.js';
3
- import '@operato/property-editor/ox-property-editor-checkbox.js';
4
- import '@operato/property-editor/ox-property-editor-number.js';
5
- import '@operato/property-editor/ox-property-editor-string.js';
6
- import '@operato/property-editor/ox-property-editor-options.js';
7
- import '@operato/property-editor/ox-properties-dynamic-view.js';
8
- import '@operato/data-grist/ox-filters-form.js';
9
- import '@operato/data-grist/ox-sorters-control.js';
10
- import '@operato/grist-editor'; /* regiester grist editors */
11
- /* set grist-editors */
12
- import '../src/grist-editor/index.js';
13
- import { css, html, LitElement } from 'lit';
14
- import { state } from 'lit/decorators.js';
15
- // import { OxGristEditorCrontab } from '@operato/grist-editor/ox-grist-editor-crontab.js'
16
- // import { OxGristEditorParameters } from '@operato/grist-editor/ox-grist-editor-parameters.js'
17
- // import { OxGristEditorPartitionKeys } from '@operato/grist-editor/ox-grist-editor-partition-keys.js'
18
- // // import { OxGristRendererCrontab } from '@operato/grist-editor/ox-grist-renderer-crontab.js'
19
- // import { OxGristEditorValueMap } from '@operato/grist-editor/ox-grist-editor-value-map.js'
20
- import { i18next } from '@operato/i18n';
21
- import { OxPropertyEditor } from '@operato/property-editor';
22
- import { CommonGristStyles } from '@operato/styles';
23
- OxPropertyEditor.register({
24
- number: 'ox-property-editor-number',
25
- string: 'ox-property-editor-string',
26
- boolean: 'ox-property-editor-checkbox',
27
- options: 'ox-property-editor-options'
28
- });
29
- // registerEditor('parameters', OxGristEditorParameters)
30
- // registerEditor('crontab', OxGristEditorCrontab)
31
- // registerEditor('value-map', OxGristEditorValueMap)
32
- // registerEditor('partition-keys', OxGristEditorPartitionKeys)
33
- const fetchHandler = async ({ page = 1, limit = 100, sortings = [], filters = [] }) => {
34
- var total = 10;
35
- var start = (page - 1) * limit;
36
- return {
37
- total,
38
- records: Array(limit * page > total ? total % limit : limit)
39
- .fill('')
40
- .map((item, idx) => {
41
- return {
42
- id: idx,
43
- entity: `entity-${start + idx + 1}`,
44
- description: `description-${start + idx + 1}`,
45
- attributes: {
46
- brn: '1234567890-1234-1',
47
- address: '경기도 성남시 분당구.',
48
- credit: '최우수'
49
- }
50
- };
51
- })
52
- };
53
- };
54
- class GristDemo extends LitElement {
55
- constructor() {
56
- super(...arguments);
57
- this.mode = 'CARD';
58
- this.config = {
59
- list: { fields: ['name', 'description', 'active'] },
60
- columns: [
61
- { type: 'gutter', gutterName: 'row-selector', multiple: true },
62
- {
63
- type: 'gutter',
64
- gutterName: 'button',
65
- icon: 'add',
66
- handlers: {
67
- click: 'record-copy'
68
- }
69
- },
70
- { type: 'gutter', gutterName: 'sequence' },
71
- {
72
- type: 'gutter',
73
- gutterName: 'button',
74
- icon: 'arrow_upward',
75
- handlers: {
76
- click: 'move-up'
77
- }
78
- },
79
- {
80
- type: 'gutter',
81
- gutterName: 'button',
82
- icon: 'arrow_downward',
83
- handlers: {
84
- click: 'move-down'
85
- }
86
- },
87
- {
88
- type: 'string',
89
- name: 'id',
90
- hidden: true
91
- },
92
- {
93
- type: 'string',
94
- name: 'entity',
95
- header: i18next.t('field.entity'),
96
- record: {
97
- editable: true
98
- },
99
- width: 140
100
- },
101
- {
102
- type: 'string',
103
- name: 'description',
104
- header: i18next.t('field.description'),
105
- record: {
106
- editable: true
107
- },
108
- width: 180
109
- },
110
- {
111
- type: 'select',
112
- name: 'type',
113
- header: i18next.t('field.type'),
114
- record: {
115
- options: ['', 'number', 'text', 'select', 'boolean', 'file'],
116
- editable: true
117
- },
118
- width: 120
119
- },
120
- {
121
- type: 'attributes',
122
- name: 'attributes',
123
- header: i18next.t('field.attributes'),
124
- record: {
125
- editable: true,
126
- options: {
127
- attributeSet: {
128
- entity: 'Domain',
129
- description: 'Attributes for Domain Entity',
130
- items: [
131
- {
132
- name: '등록정보',
133
- description: '회사 등록 정보',
134
- tag: 'brn',
135
- type: 'text',
136
- active: true,
137
- hidden: false
138
- },
139
- {
140
- name: '주소',
141
- description: '회사 주소',
142
- tag: 'address',
143
- type: 'text',
144
- active: true,
145
- hidden: false
146
- },
147
- {
148
- name: '신용도',
149
- description: '회사의 신용도',
150
- tag: 'credit',
151
- type: 'select',
152
- options: {
153
- options: [
154
- { text: '최우수', value: '최우수' },
155
- { text: '우수', value: '우수' },
156
- { text: '보통', value: '보통' },
157
- { text: '미달', value: '미달' }
158
- ]
159
- },
160
- active: true,
161
- hidden: false
162
- },
163
- {
164
- name: '정보파일',
165
- description: '참조 첨부 파일.',
166
- tag: 'file',
167
- type: 'file',
168
- active: true,
169
- hidden: false
170
- }
171
- ]
172
- }
173
- }
174
- },
175
- width: 200
176
- }
177
- ],
178
- rows: {
179
- selectable: {
180
- multiple: true
181
- }
182
- },
183
- pagination: {
184
- infinite: true
185
- },
186
- sorters: [
187
- {
188
- name: 'sequence'
189
- }
190
- ]
191
- };
192
- }
193
- get grist() {
194
- return this.renderRoot.querySelector('ox-grist');
195
- }
196
- render() {
197
- const mode = this.mode || 'CARD';
198
- return html `
199
- <ox-grist .config=${this.config} .mode=${mode} auto-fetch .fetchHandler=${fetchHandler}>
200
- <div id="filters" slot="headroom">
201
- <ox-filters-form @filters-change=${(e) => console.log('changed', e.detail)}></ox-filters-form>
202
- </div>
203
-
204
- <div slot="headroom" id="headroom">
205
- <div id="modes">
206
- <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>
207
- <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>
208
- <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
209
- </div>
210
- </div>
211
- </ox-grist>
212
- `;
213
- }
214
- }
215
- GristDemo.styles = [
216
- CommonGristStyles,
217
- css `
218
- :host {
219
- display: flex;
220
- flex-direction: column;
221
- }
222
-
223
- #tailer {
224
- display: flex;
225
- flex-direction: row;
226
- margin: 0 var(--spacing-medium);
227
- }
228
-
229
- #tailer a {
230
- padding: 0 var(--padding-default) 0 var(--padding-default);
231
- margin: 0 var(--spacing-small);
232
- border-right: 1px solid rgba(0, 0, 0, 0.1);
233
- font-size: var(--fontsize-default);
234
- color: var(--md-sys-color-on-primary-container);
235
- }
236
- `
237
- ];
238
- __decorate([
239
- state()
240
- ], GristDemo.prototype, "mode", void 0);
241
- customElements.define('ox-attributes', GristDemo);
242
- export default {
243
- title: 'ox-grist-editor-attributes',
244
- component: 'ox-grist-editor-attributes',
245
- argTypes: {}
246
- };
247
- const Template = ({}) => html `
248
- <link
249
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
250
- rel="stylesheet"
251
- />
252
- <link
253
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
254
- rel="stylesheet"
255
- />
256
- <link
257
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
258
- rel="stylesheet"
259
- />
260
-
261
- <link href="/themes/app-theme.css" rel="stylesheet" />
262
- <link href="/themes/oops-theme.css" rel="stylesheet" />
263
- <link href="/themes/grist-theme.css" rel="stylesheet" />
264
-
265
- <style>
266
- [slot='headroom'] {
267
- display: flex;
268
- flex-direction: row;
269
- align-items: center;
270
- padding: var(--padding-default) var(--spacing-large);
271
- background-color: var(--md-sys-color-surface);
272
- box-shadow: var(--box-shadow);
273
-
274
- --md-icon-size: 24px;
275
- }
276
- #sorters md-icon,
277
- #modes md-icon {
278
- --md-icon-size: 18px;
279
- }
280
- #sorters {
281
- margin-left: auto;
282
- margin-right: var(--spacing-medium);
283
- padding-left: var(--spacing-small);
284
- border-bottom: var(--border-dim-color);
285
- position: relative;
286
- color: var(--md-sys-color-on-secondary-container);
287
- font-size: var(--fontsize-default);
288
- user-select: none;
289
- }
290
-
291
- #sorters > * {
292
- padding: var(--spacing-small);
293
- vertical-align: middle;
294
- }
295
-
296
- #filters {
297
- display: flex;
298
- justify-content: center;
299
- align-items: center;
300
- }
301
-
302
- #filters * {
303
- margin-right: var(--spacing-medium);
304
- }
305
-
306
- @media only screen and (max-width: 460px) {
307
- #filters {
308
- flex-direction: column;
309
- }
310
-
311
- #modes {
312
- display: none;
313
- }
314
- }
315
- </style>
316
-
317
- <ox-attributes mode="LIST"></ox-attributes>
318
- `;
319
- export const Regular = Template.bind({});
320
- Regular.args = {};
321
- //# sourceMappingURL=ox-grist-editor-attributes.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ox-grist-editor-attributes.stories.js","sourceRoot":"","sources":["../../stories/ox-grist-editor-attributes.stories.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yDAAyD,CAAA;AAChE,OAAO,uDAAuD,CAAA;AAC9D,OAAO,uDAAuD,CAAA;AAC9D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,wDAAwD,CAAA;AAC/D,OAAO,wCAAwC,CAAA;AAC/C,OAAO,2CAA2C,CAAA;AAClD,OAAO,uBAAuB,CAAA,CAAC,6BAA6B;AAC5D,uBAAuB;AACvB,OAAO,8BAA8B,CAAA;AAErC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAGzC,0FAA0F;AAC1F,gGAAgG;AAChG,uGAAuG;AACvG,iGAAiG;AACjG,6FAA6F;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAEnD,gBAAgB,CAAC,QAAQ,CAAC;IACxB,MAAM,EAAE,2BAA2B;IACnC,MAAM,EAAE,2BAA2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AY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEvD,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAA","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@operato/property-editor/ox-property-editor-checkbox.js'\nimport '@operato/property-editor/ox-property-editor-number.js'\nimport '@operato/property-editor/ox-property-editor-string.js'\nimport '@operato/property-editor/ox-property-editor-options.js'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\nimport '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-sorters-control.js'\nimport '@operato/grist-editor' /* regiester grist editors */\n/* set grist-editors */\nimport '../src/grist-editor/index.js'\n\nimport { css, html, LitElement, TemplateResult } from 'lit'\nimport { state } from 'lit/decorators.js'\n\nimport { FetchOption, GristRecord } from '@operato/data-grist'\n// import { OxGristEditorCrontab } from '@operato/grist-editor/ox-grist-editor-crontab.js'\n// import { OxGristEditorParameters } from '@operato/grist-editor/ox-grist-editor-parameters.js'\n// import { OxGristEditorPartitionKeys } from '@operato/grist-editor/ox-grist-editor-partition-keys.js'\n// // import { OxGristRendererCrontab } from '@operato/grist-editor/ox-grist-renderer-crontab.js'\n// import { OxGristEditorValueMap } from '@operato/grist-editor/ox-grist-editor-value-map.js'\nimport { i18next } from '@operato/i18n'\nimport { OxPropertyEditor } from '@operato/property-editor'\nimport { CommonGristStyles } from '@operato/styles'\n\nOxPropertyEditor.register({\n number: 'ox-property-editor-number',\n string: 'ox-property-editor-string',\n boolean: 'ox-property-editor-checkbox',\n options: 'ox-property-editor-options'\n})\n\n// registerEditor('parameters', OxGristEditorParameters)\n// registerEditor('crontab', OxGristEditorCrontab)\n// registerEditor('value-map', OxGristEditorValueMap)\n// registerEditor('partition-keys', OxGristEditorPartitionKeys)\n\nconst fetchHandler = async ({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) => {\n var total = 10\n var start = (page - 1) * limit\n\n return {\n total,\n records: Array(limit * page > total ? total % limit : limit)\n .fill('')\n .map((item, idx) => {\n return {\n id: idx,\n entity: `entity-${start + idx + 1}`,\n description: `description-${start + idx + 1}`,\n attributes: {\n brn: '1234567890-1234-1',\n address: '경기도 성남시 분당구.',\n credit: '최우수'\n }\n }\n })\n }\n}\n\nclass GristDemo extends LitElement {\n static styles = [\n CommonGristStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n }\n\n #tailer {\n display: flex;\n flex-direction: row;\n margin: 0 var(--spacing-medium);\n }\n\n #tailer a {\n padding: 0 var(--padding-default) 0 var(--padding-default);\n margin: 0 var(--spacing-small);\n border-right: 1px solid rgba(0, 0, 0, 0.1);\n font-size: var(--fontsize-default);\n color: var(--md-sys-color-on-primary-container);\n }\n `\n ]\n\n @state() mode: String = 'CARD'\n\n get grist() {\n return this.renderRoot.querySelector('ox-grist')\n }\n\n config: any = {\n list: { fields: ['name', 'description', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'add',\n handlers: {\n click: 'record-copy'\n }\n },\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_upward',\n handlers: {\n click: 'move-up'\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'arrow_downward',\n handlers: {\n click: 'move-down'\n }\n },\n {\n type: 'string',\n name: 'id',\n hidden: true\n },\n {\n type: 'string',\n name: 'entity',\n header: i18next.t('field.entity'),\n record: {\n editable: true\n },\n width: 140\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n width: 180\n },\n {\n type: 'select',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n options: ['', 'number', 'text', 'select', 'boolean', 'file'],\n editable: true\n },\n width: 120\n },\n {\n type: 'attributes',\n name: 'attributes',\n header: i18next.t('field.attributes'),\n record: {\n editable: true,\n options: {\n attributeSet: {\n entity: 'Domain',\n description: 'Attributes for Domain Entity',\n items: [\n {\n name: '등록정보',\n description: '회사 등록 정보',\n tag: 'brn',\n type: 'text',\n active: true,\n hidden: false\n },\n {\n name: '주소',\n description: '회사 주소',\n tag: 'address',\n type: 'text',\n active: true,\n hidden: false\n },\n {\n name: '신용도',\n description: '회사의 신용도',\n tag: 'credit',\n type: 'select',\n options: {\n options: [\n { text: '최우수', value: '최우수' },\n { text: '우수', value: '우수' },\n { text: '보통', value: '보통' },\n { text: '미달', value: '미달' }\n ]\n },\n active: true,\n hidden: false\n },\n {\n name: '정보파일',\n description: '참조 첨부 파일.',\n tag: 'file',\n type: 'file',\n active: true,\n hidden: false\n }\n ]\n }\n }\n },\n width: 200\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n pagination: {\n infinite: true\n },\n sorters: [\n {\n name: 'sequence'\n }\n ]\n }\n\n render() {\n const mode = this.mode || 'CARD'\n\n return html`\n <ox-grist .config=${this.config} .mode=${mode} auto-fetch .fetchHandler=${fetchHandler}>\n <div id=\"filters\" slot=\"headroom\">\n <ox-filters-form @filters-change=${(e: CustomEvent) => console.log('changed', e.detail)}></ox-filters-form>\n </div>\n\n <div slot=\"headroom\" id=\"headroom\">\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n </div>\n </ox-grist>\n `\n }\n}\n\ncustomElements.define('ox-attributes', GristDemo)\n\nexport default {\n title: 'ox-grist-editor-attributes',\n component: 'ox-grist-editor-attributes',\n argTypes: {}\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ninterface ArgTypes {}\n\nconst Template: Story<ArgTypes> = ({}: ArgTypes) => html`\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 <link href=\"/themes/app-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/oops-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/grist-theme.css\" rel=\"stylesheet\" />\n\n <style>\n [slot='headroom'] {\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: var(--padding-default) var(--spacing-large);\n background-color: var(--md-sys-color-surface);\n box-shadow: var(--box-shadow);\n\n --md-icon-size: 24px;\n }\n #sorters md-icon,\n #modes md-icon {\n --md-icon-size: 18px;\n }\n #sorters {\n margin-left: auto;\n margin-right: var(--spacing-medium);\n padding-left: var(--spacing-small);\n border-bottom: var(--border-dim-color);\n position: relative;\n color: var(--md-sys-color-on-secondary-container);\n font-size: var(--fontsize-default);\n user-select: none;\n }\n\n #sorters > * {\n padding: var(--spacing-small);\n vertical-align: middle;\n }\n\n #filters {\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n #filters * {\n margin-right: var(--spacing-medium);\n }\n\n @media only screen and (max-width: 460px) {\n #filters {\n flex-direction: column;\n }\n\n #modes {\n display: none;\n }\n }\n </style>\n\n <ox-attributes mode=\"LIST\"></ox-attributes>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {}\n"]}