@operato/attribute 10.29.81 → 10.29.84
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/dist/stories/ox-attribute-form.stories.d.ts +18 -0
- package/dist/stories/ox-attribute-form.stories.js +113 -0
- package/dist/stories/ox-attribute-view.stories.d.ts +18 -0
- package/dist/stories/ox-attribute-view.stories.js +106 -0
- package/dist/stories/ox-grist-editor-attributes.stories.d.ts +25 -0
- package/dist/stories/ox-grist-editor-attributes.stories.js +321 -0
- package/package.json +26 -12
- package/CHANGELOG.md +0 -4882
- package/dist/src/grist-editor/index.js.map +0 -1
- package/dist/src/grist-editor/ox-grist-editor-attributes.js.map +0 -1
- package/dist/src/grist-editor/ox-popup-attributes.js.map +0 -1
- package/dist/src/index.js.map +0 -1
- package/dist/src/ox-attribute-form.js.map +0 -1
- package/dist/src/ox-attribute-view.js.map +0 -1
- package/dist/src/types.js.map +0 -1
- package/dist/test/attribute-file.test.d.ts +0 -2
- package/dist/test/attribute-file.test.js +0 -45
- package/dist/test/attribute-file.test.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/test/attribute-file.test.ts +0 -51
|
@@ -0,0 +1,18 @@
|
|
|
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>;
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
options: {}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: '주소',
|
|
25
|
+
description: '회사 주소',
|
|
26
|
+
tag: 'address',
|
|
27
|
+
type: 'text',
|
|
28
|
+
active: true,
|
|
29
|
+
hidden: false,
|
|
30
|
+
options: {}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'API 키',
|
|
34
|
+
description: '외부 API 접근 키',
|
|
35
|
+
tag: 'apiKey',
|
|
36
|
+
type: 'secret',
|
|
37
|
+
active: true,
|
|
38
|
+
hidden: false,
|
|
39
|
+
options: {}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: '비밀번호',
|
|
43
|
+
description: '시스템 접근 비밀번호',
|
|
44
|
+
tag: 'password',
|
|
45
|
+
type: 'secret',
|
|
46
|
+
active: true,
|
|
47
|
+
hidden: false,
|
|
48
|
+
options: {}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: '신용도',
|
|
52
|
+
description: '회사의 신용도',
|
|
53
|
+
tag: 'credit',
|
|
54
|
+
type: 'select',
|
|
55
|
+
options: {
|
|
56
|
+
options: [
|
|
57
|
+
{ text: '최우수', value: '최우수' },
|
|
58
|
+
{ text: '우수', value: '우수' },
|
|
59
|
+
{ text: '보통', value: '보통' },
|
|
60
|
+
{ text: '미달', value: '미달' }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
active: true,
|
|
64
|
+
hidden: false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: '정보파일',
|
|
68
|
+
description: '참조 첨부 파일.',
|
|
69
|
+
tag: 'file',
|
|
70
|
+
type: 'file',
|
|
71
|
+
active: true,
|
|
72
|
+
hidden: false,
|
|
73
|
+
options: {}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
var value = {
|
|
78
|
+
brn: '1234567890-1234-1',
|
|
79
|
+
address: '경기도 성남시 분당구.',
|
|
80
|
+
credit: '최우수'
|
|
81
|
+
};
|
|
82
|
+
const Template = ({}) => html `
|
|
83
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
84
|
+
<link
|
|
85
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
86
|
+
rel="stylesheet"
|
|
87
|
+
/>
|
|
88
|
+
<link
|
|
89
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
90
|
+
rel="stylesheet"
|
|
91
|
+
/>
|
|
92
|
+
<link
|
|
93
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
94
|
+
rel="stylesheet"
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<style>
|
|
98
|
+
body {
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
|
|
102
|
+
<ox-attribute-form
|
|
103
|
+
.attributeSet=${attributeSet}
|
|
104
|
+
.value=${value}
|
|
105
|
+
@change=${(e) => {
|
|
106
|
+
value = e.detail;
|
|
107
|
+
console.log('change', value);
|
|
108
|
+
}}
|
|
109
|
+
></ox-attribute-form>
|
|
110
|
+
`;
|
|
111
|
+
export const Regular = Template.bind({});
|
|
112
|
+
Regular.args = {};
|
|
113
|
+
//# sourceMappingURL=ox-attribute-form.stories.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
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>;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
options: {}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: '주소',
|
|
25
|
+
description: '회사 주소',
|
|
26
|
+
tag: 'address',
|
|
27
|
+
type: 'text',
|
|
28
|
+
active: true,
|
|
29
|
+
hidden: false,
|
|
30
|
+
options: {}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'API 키',
|
|
34
|
+
description: '외부 API 접근 키',
|
|
35
|
+
tag: 'apiKey',
|
|
36
|
+
type: 'secret',
|
|
37
|
+
active: true,
|
|
38
|
+
hidden: false,
|
|
39
|
+
options: {}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: '비밀번호',
|
|
43
|
+
description: '시스템 접근 비밀번호',
|
|
44
|
+
tag: 'password',
|
|
45
|
+
type: 'secret',
|
|
46
|
+
active: true,
|
|
47
|
+
hidden: false,
|
|
48
|
+
options: {}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: '신용도',
|
|
52
|
+
description: '회사의 신용도',
|
|
53
|
+
tag: 'credit',
|
|
54
|
+
type: 'select',
|
|
55
|
+
options: {
|
|
56
|
+
options: [
|
|
57
|
+
{ text: '최우수', value: '최우수' },
|
|
58
|
+
{ text: '우수', value: '우수' },
|
|
59
|
+
{ text: '보통', value: '보통' },
|
|
60
|
+
{ text: '미달', value: '미달' }
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
active: true,
|
|
64
|
+
hidden: false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: '정보파일',
|
|
68
|
+
description: '참조 첨부 파일.',
|
|
69
|
+
tag: 'file',
|
|
70
|
+
type: 'file',
|
|
71
|
+
active: true,
|
|
72
|
+
hidden: false,
|
|
73
|
+
options: {}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
};
|
|
77
|
+
var value = {
|
|
78
|
+
brn: '1234567890-1234-1',
|
|
79
|
+
address: '경기도 성남시 분당구.',
|
|
80
|
+
credit: '최우수'
|
|
81
|
+
};
|
|
82
|
+
const Template = ({}) => html `
|
|
83
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
84
|
+
<link
|
|
85
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
86
|
+
rel="stylesheet"
|
|
87
|
+
/>
|
|
88
|
+
<link
|
|
89
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
90
|
+
rel="stylesheet"
|
|
91
|
+
/>
|
|
92
|
+
<link
|
|
93
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
94
|
+
rel="stylesheet"
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<style>
|
|
98
|
+
body {
|
|
99
|
+
}
|
|
100
|
+
</style>
|
|
101
|
+
|
|
102
|
+
<ox-attribute-view .attributeSet=${attributeSet} .value=${value}></ox-attribute-view>
|
|
103
|
+
`;
|
|
104
|
+
export const Regular = Template.bind({});
|
|
105
|
+
Regular.args = {};
|
|
106
|
+
//# sourceMappingURL=ox-attribute-view.stories.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
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>;
|
|
@@ -0,0 +1,321 @@
|
|
|
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', 'secret', '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
|
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": "10.29.
|
|
5
|
+
"version": "10.29.84",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -15,6 +15,20 @@
|
|
|
15
15
|
"./ox-attribute-view.js": "./dist/src/ox-attribute-view.js",
|
|
16
16
|
"./types.js": "./dist/src/types.js"
|
|
17
17
|
},
|
|
18
|
+
"files": [
|
|
19
|
+
"README.md",
|
|
20
|
+
"dist",
|
|
21
|
+
"themes",
|
|
22
|
+
"translations",
|
|
23
|
+
"!**/*.map",
|
|
24
|
+
"!**/*.test.*",
|
|
25
|
+
"!**/*.spec.*",
|
|
26
|
+
"!**/test/**",
|
|
27
|
+
"!**/tests/**",
|
|
28
|
+
"!**/__tests__/**",
|
|
29
|
+
"!**/*.tsbuildinfo",
|
|
30
|
+
"!**/.DS_Store"
|
|
31
|
+
],
|
|
18
32
|
"typesVersions": {
|
|
19
33
|
"*": {
|
|
20
34
|
"grist-editor": [
|
|
@@ -59,16 +73,16 @@
|
|
|
59
73
|
},
|
|
60
74
|
"dependencies": {
|
|
61
75
|
"@material/web": "^2.0.0",
|
|
62
|
-
"@operato/data-grist": "^10.29.
|
|
63
|
-
"@operato/graphql": "^10.29.
|
|
64
|
-
"@operato/grist-editor": "^10.29.
|
|
65
|
-
"@operato/i18n": "^10.29.
|
|
66
|
-
"@operato/input": "^10.29.
|
|
67
|
-
"@operato/popup": "^10.29.
|
|
68
|
-
"@operato/property-editor": "^10.29.
|
|
69
|
-
"@operato/shell": "^10.29.
|
|
70
|
-
"@operato/styles": "^10.29.
|
|
71
|
-
"@operato/utils": "^10.29.
|
|
76
|
+
"@operato/data-grist": "^10.29.84",
|
|
77
|
+
"@operato/graphql": "^10.29.83",
|
|
78
|
+
"@operato/grist-editor": "^10.29.84",
|
|
79
|
+
"@operato/i18n": "^10.29.83",
|
|
80
|
+
"@operato/input": "^10.29.83",
|
|
81
|
+
"@operato/popup": "^10.29.83",
|
|
82
|
+
"@operato/property-editor": "^10.29.84",
|
|
83
|
+
"@operato/shell": "^10.29.83",
|
|
84
|
+
"@operato/styles": "^10.29.83",
|
|
85
|
+
"@operato/utils": "^10.29.83",
|
|
72
86
|
"lit": "^3.1.2"
|
|
73
87
|
},
|
|
74
88
|
"devDependencies": {
|
|
@@ -103,5 +117,5 @@
|
|
|
103
117
|
"prettier --write"
|
|
104
118
|
]
|
|
105
119
|
},
|
|
106
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "a6c30e4a03a2a71b4aba24f09853d8be78655147"
|
|
107
121
|
}
|