@operato/data-tree 7.0.63 → 7.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/ox-tree-horizontal.d.ts +21 -0
- package/dist/src/ox-tree-horizontal.js +262 -0
- package/dist/src/ox-tree-horizontal.js.map +1 -0
- package/dist/src/ox-tree-vertical.d.ts +1 -1
- package/dist/src/ox-tree-vertical.js +13 -6
- package/dist/src/ox-tree-vertical.js.map +1 -1
- package/dist/stories/data-tree-horizontal.stories.d.ts +28 -0
- package/dist/stories/data-tree-horizontal.stories.js +213 -0
- package/dist/stories/data-tree-horizontal.stories.js.map +1 -0
- package/dist/stories/data-tree-vertical.stories.d.ts +7 -1
- package/dist/stories/data-tree-vertical.stories.js +177 -84
- package/dist/stories/data-tree-vertical.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -4
- package/src/index.ts +1 -0
- package/src/ox-tree-horizontal.ts +260 -0
- package/src/ox-tree-vertical.ts +17 -8
- package/stories/data-tree-horizontal.stories.ts +231 -0
- package/stories/data-tree-vertical.stories.ts +183 -85
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import '../src/ox-tree-horizontal.js';
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import { html } from 'lit';
|
|
4
|
+
export default {
|
|
5
|
+
title: '3 modes in ox-tree-horizontal',
|
|
6
|
+
component: 'ox-tree-horizontal',
|
|
7
|
+
argTypes: {
|
|
8
|
+
data: { control: 'object' }
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const Template = ({ data }) => html `
|
|
12
|
+
<link
|
|
13
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
|
14
|
+
rel="stylesheet"
|
|
15
|
+
/>
|
|
16
|
+
<link
|
|
17
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
|
18
|
+
rel="stylesheet"
|
|
19
|
+
/>
|
|
20
|
+
<link
|
|
21
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
|
22
|
+
rel="stylesheet"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
|
26
|
+
<link href="/themes/light.css" rel="stylesheet" />
|
|
27
|
+
<link href="/themes/dark.css" rel="stylesheet" />
|
|
28
|
+
<link href="/themes/spacing.css" rel="stylesheet" />
|
|
29
|
+
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
30
|
+
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
31
|
+
|
|
32
|
+
<style>
|
|
33
|
+
ox-tree-horizontal {
|
|
34
|
+
height: 1000px;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
|
|
38
|
+
<div>
|
|
39
|
+
<ox-tree-horizontal .data=${data} description-property="description"></ox-tree-horizontal>
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
42
|
+
export const Regular = Template.bind({});
|
|
43
|
+
Regular.args = {
|
|
44
|
+
data: [
|
|
45
|
+
{
|
|
46
|
+
id: 'H000',
|
|
47
|
+
label: 'Home',
|
|
48
|
+
children: [
|
|
49
|
+
{
|
|
50
|
+
id: 'H001',
|
|
51
|
+
label: 'About us',
|
|
52
|
+
children: [
|
|
53
|
+
{
|
|
54
|
+
id: 'H101',
|
|
55
|
+
label: 'Our history',
|
|
56
|
+
children: [
|
|
57
|
+
{
|
|
58
|
+
id: 'H111',
|
|
59
|
+
label: 'Founder',
|
|
60
|
+
description: 'long long founder history'
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'H102',
|
|
66
|
+
label: 'Our board',
|
|
67
|
+
children: [
|
|
68
|
+
{
|
|
69
|
+
id: 'H121',
|
|
70
|
+
label: 'Brad Whiteman'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'H122',
|
|
74
|
+
label: 'Cynthia Tolken'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'H123',
|
|
78
|
+
label: 'Bobby Founderson'
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'H002',
|
|
86
|
+
label: 'Our products',
|
|
87
|
+
children: [
|
|
88
|
+
{
|
|
89
|
+
id: 'H201',
|
|
90
|
+
label: 'The Widget 2000™',
|
|
91
|
+
children: [
|
|
92
|
+
{
|
|
93
|
+
id: 'H211',
|
|
94
|
+
label: 'Order form'
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'H202',
|
|
100
|
+
label: 'The McGuffin V2',
|
|
101
|
+
children: [
|
|
102
|
+
{
|
|
103
|
+
id: 'H221',
|
|
104
|
+
label: 'Order form'
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'H003',
|
|
112
|
+
label: 'Contact us',
|
|
113
|
+
children: [
|
|
114
|
+
{
|
|
115
|
+
id: 'H301',
|
|
116
|
+
label: 'Social media',
|
|
117
|
+
children: [
|
|
118
|
+
{
|
|
119
|
+
id: 'H311',
|
|
120
|
+
label: 'Facebook'
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 'H000',
|
|
130
|
+
label: 'Home',
|
|
131
|
+
children: [
|
|
132
|
+
{
|
|
133
|
+
id: 'H001',
|
|
134
|
+
label: 'About us',
|
|
135
|
+
children: [
|
|
136
|
+
{
|
|
137
|
+
id: 'H101',
|
|
138
|
+
label: 'Our history',
|
|
139
|
+
children: [
|
|
140
|
+
{
|
|
141
|
+
id: 'H111',
|
|
142
|
+
label: 'Founder',
|
|
143
|
+
description: 'long long founder history'
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: 'H102',
|
|
149
|
+
label: 'Our board',
|
|
150
|
+
children: [
|
|
151
|
+
{
|
|
152
|
+
id: 'H121',
|
|
153
|
+
label: 'Brad Whiteman'
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'H122',
|
|
157
|
+
label: 'Cynthia Tolken'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'H123',
|
|
161
|
+
label: 'Bobby Founderson'
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: 'H002',
|
|
169
|
+
label: 'Our products',
|
|
170
|
+
children: [
|
|
171
|
+
{
|
|
172
|
+
id: 'H201',
|
|
173
|
+
label: 'The Widget 2000™',
|
|
174
|
+
children: [
|
|
175
|
+
{
|
|
176
|
+
id: 'H211',
|
|
177
|
+
label: 'Order form'
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: 'H202',
|
|
183
|
+
label: 'The McGuffin V2',
|
|
184
|
+
children: [
|
|
185
|
+
{
|
|
186
|
+
id: 'H221',
|
|
187
|
+
label: 'Order form'
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: 'H003',
|
|
195
|
+
label: 'Contact us',
|
|
196
|
+
children: [
|
|
197
|
+
{
|
|
198
|
+
id: 'H301',
|
|
199
|
+
label: 'Social media',
|
|
200
|
+
children: [
|
|
201
|
+
{
|
|
202
|
+
id: 'H311',
|
|
203
|
+
label: 'Facebook'
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=data-tree-horizontal.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-tree-horizontal.stories.js","sourceRoot":"","sources":["../../stories/data-tree-horizontal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,oBAAoB;IAC/B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAA;AAiBD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCA4B9B,IAAI;;CAEnC,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE;QACJ;YACE,EAAE,EAAE,MAAM;YACV,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE;gBACR;oBACE,EAAE,EAAE,MAAM;oBACV,KAAK,EAAE,UAAU;oBACjB,QAAQ,EAAE;wBACR;4BACE,EAAE,EAAE,MAAM;4BACV,KAAK,EAAE,aAAa;4BACpB,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,SAAS;oCAChB,WAAW,EAAE,2BAA2B;iCACzC;6BACF;yBACF;wBACD;4BACE,EAAE,EAAE,MAA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AE,MAAM;4BACV,KAAK,EAAE,WAAW;4BAClB,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,eAAe;iCACvB;gCACD;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,gBAAgB;iCACxB;gCACD;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,kBAAkB;iCAC1B;6BACF;yBACF;qBACF;iBACF;gBACD;oBACE,EAAE,EAAE,MAAM;oBACV,KAAK,EAAE,cAAc;oBACrB,QAAQ,EAAE;wBACR;4BACE,EAAE,EAAE,MAAM;4BACV,KAAK,EAAE,kBAAkB;4BACzB,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,YAAY;iCACpB;6BACF;yBACF;wBACD;4BACE,EAAE,EAAE,MAAM;4BACV,KAAK,EAAE,iBAAiB;4BACxB,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,YAAY;iCACpB;6BACF;yBACF;qBACF;iBACF;gBACD;oBACE,EAAE,EAAE,MAAM;oBACV,KAAK,EAAE,YAAY;oBACnB,QAAQ,EAAE;wBACR;4BACE,EAAE,EAAE,MAAM;4BACV,KAAK,EAAE,cAAc;4BACrB,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,UAAU;iCAClB;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-tree-horizontal.js'\nimport '@material/web/icon/icon.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: '3 modes in ox-tree-horizontal',\n component: 'ox-tree-horizontal',\n argTypes: {\n data: { control: 'object' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ntype TreeItem = {\n [key: string]: any\n __status__?: { [state: string]: boolean | string }\n}\n\ninterface ArgTypes {\n data: Array<TreeItem>\n}\n\nconst Template: Story<ArgTypes> = ({ data }: 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/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n <link href=\"/themes/grist-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/form-theme.css\" rel=\"stylesheet\" />\n\n <style>\n ox-tree-horizontal {\n height: 1000px;\n }\n </style>\n\n <div>\n <ox-tree-horizontal .data=${data} description-property=\"description\"></ox-tree-horizontal>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n data: [\n {\n id: 'H000',\n label: 'Home',\n children: [\n {\n id: 'H001',\n label: 'About us',\n children: [\n {\n id: 'H101',\n label: 'Our history',\n children: [\n {\n id: 'H111',\n label: 'Founder',\n description: 'long long founder history'\n }\n ]\n },\n {\n id: 'H102',\n label: 'Our board',\n children: [\n {\n id: 'H121',\n label: 'Brad Whiteman'\n },\n {\n id: 'H122',\n label: 'Cynthia Tolken'\n },\n {\n id: 'H123',\n label: 'Bobby Founderson'\n }\n ]\n }\n ]\n },\n {\n id: 'H002',\n label: 'Our products',\n children: [\n {\n id: 'H201',\n label: 'The Widget 2000™',\n children: [\n {\n id: 'H211',\n label: 'Order form'\n }\n ]\n },\n {\n id: 'H202',\n label: 'The McGuffin V2',\n children: [\n {\n id: 'H221',\n label: 'Order form'\n }\n ]\n }\n ]\n },\n {\n id: 'H003',\n label: 'Contact us',\n children: [\n {\n id: 'H301',\n label: 'Social media',\n children: [\n {\n id: 'H311',\n label: 'Facebook'\n }\n ]\n }\n ]\n }\n ]\n },\n {\n id: 'H000',\n label: 'Home',\n children: [\n {\n id: 'H001',\n label: 'About us',\n children: [\n {\n id: 'H101',\n label: 'Our history',\n children: [\n {\n id: 'H111',\n label: 'Founder',\n description: 'long long founder history'\n }\n ]\n },\n {\n id: 'H102',\n label: 'Our board',\n children: [\n {\n id: 'H121',\n label: 'Brad Whiteman'\n },\n {\n id: 'H122',\n label: 'Cynthia Tolken'\n },\n {\n id: 'H123',\n label: 'Bobby Founderson'\n }\n ]\n }\n ]\n },\n {\n id: 'H002',\n label: 'Our products',\n children: [\n {\n id: 'H201',\n label: 'The Widget 2000™',\n children: [\n {\n id: 'H211',\n label: 'Order form'\n }\n ]\n },\n {\n id: 'H202',\n label: 'The McGuffin V2',\n children: [\n {\n id: 'H221',\n label: 'Order form'\n }\n ]\n }\n ]\n },\n {\n id: 'H003',\n label: 'Contact us',\n children: [\n {\n id: 'H301',\n label: 'Social media',\n children: [\n {\n id: 'H311',\n label: 'Facebook'\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n"]}
|
|
@@ -16,7 +16,13 @@ interface Story<T> {
|
|
|
16
16
|
args?: Partial<T>;
|
|
17
17
|
argTypes?: Record<string, unknown>;
|
|
18
18
|
}
|
|
19
|
+
type TreeItem = {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
__status__?: {
|
|
22
|
+
[state: string]: boolean | string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
19
25
|
interface ArgTypes {
|
|
20
|
-
data:
|
|
26
|
+
data: Array<TreeItem>;
|
|
21
27
|
}
|
|
22
28
|
export declare const Regular: Story<ArgTypes>;
|
|
@@ -29,92 +29,185 @@ const Template = ({ data }) => html `
|
|
|
29
29
|
<link href="/themes/grist-theme.css" rel="stylesheet" />
|
|
30
30
|
<link href="/themes/form-theme.css" rel="stylesheet" />
|
|
31
31
|
|
|
32
|
-
<
|
|
32
|
+
<style>
|
|
33
|
+
ox-tree-vertical {
|
|
34
|
+
height: 500px;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
|
|
38
|
+
<div>
|
|
39
|
+
<ox-tree-vertical .data=${data} description-property="description"></ox-tree-vertical>
|
|
40
|
+
</div>
|
|
33
41
|
`;
|
|
34
42
|
export const Regular = Template.bind({});
|
|
35
43
|
Regular.args = {
|
|
36
|
-
data:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
44
|
+
data: [
|
|
45
|
+
{
|
|
46
|
+
id: 'H000',
|
|
47
|
+
label: 'Home',
|
|
48
|
+
children: [
|
|
49
|
+
{
|
|
50
|
+
id: 'H001',
|
|
51
|
+
label: 'About us',
|
|
52
|
+
children: [
|
|
53
|
+
{
|
|
54
|
+
id: 'H101',
|
|
55
|
+
label: 'Our history',
|
|
56
|
+
children: [
|
|
57
|
+
{
|
|
58
|
+
id: 'H111',
|
|
59
|
+
label: 'Founder',
|
|
60
|
+
description: 'long long founder history'
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 'H102',
|
|
66
|
+
label: 'Our board',
|
|
67
|
+
children: [
|
|
68
|
+
{
|
|
69
|
+
id: 'H121',
|
|
70
|
+
label: 'Brad Whiteman'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'H122',
|
|
74
|
+
label: 'Cynthia Tolken'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'H123',
|
|
78
|
+
label: 'Bobby Founderson'
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 'H002',
|
|
86
|
+
label: 'Our products',
|
|
87
|
+
children: [
|
|
88
|
+
{
|
|
89
|
+
id: 'H201',
|
|
90
|
+
label: 'The Widget 2000™',
|
|
91
|
+
children: [
|
|
92
|
+
{
|
|
93
|
+
id: 'H211',
|
|
94
|
+
label: 'Order form'
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'H202',
|
|
100
|
+
label: 'The McGuffin V2',
|
|
101
|
+
children: [
|
|
102
|
+
{
|
|
103
|
+
id: 'H221',
|
|
104
|
+
label: 'Order form'
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'H003',
|
|
112
|
+
label: 'Contact us',
|
|
113
|
+
children: [
|
|
114
|
+
{
|
|
115
|
+
id: 'H301',
|
|
116
|
+
label: 'Social media',
|
|
117
|
+
children: [
|
|
118
|
+
{
|
|
119
|
+
id: 'H311',
|
|
120
|
+
label: 'Facebook'
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 'H000',
|
|
130
|
+
label: 'Home',
|
|
131
|
+
children: [
|
|
132
|
+
{
|
|
133
|
+
id: 'H001',
|
|
134
|
+
label: 'About us',
|
|
135
|
+
children: [
|
|
136
|
+
{
|
|
137
|
+
id: 'H101',
|
|
138
|
+
label: 'Our history',
|
|
139
|
+
children: [
|
|
140
|
+
{
|
|
141
|
+
id: 'H111',
|
|
142
|
+
label: 'Founder',
|
|
143
|
+
description: 'long long founder history'
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: 'H102',
|
|
149
|
+
label: 'Our board',
|
|
150
|
+
children: [
|
|
151
|
+
{
|
|
152
|
+
id: 'H121',
|
|
153
|
+
label: 'Brad Whiteman'
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'H122',
|
|
157
|
+
label: 'Cynthia Tolken'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'H123',
|
|
161
|
+
label: 'Bobby Founderson'
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
id: 'H002',
|
|
169
|
+
label: 'Our products',
|
|
170
|
+
children: [
|
|
171
|
+
{
|
|
172
|
+
id: 'H201',
|
|
173
|
+
label: 'The Widget 2000™',
|
|
174
|
+
children: [
|
|
175
|
+
{
|
|
176
|
+
id: 'H211',
|
|
177
|
+
label: 'Order form'
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: 'H202',
|
|
183
|
+
label: 'The McGuffin V2',
|
|
184
|
+
children: [
|
|
185
|
+
{
|
|
186
|
+
id: 'H221',
|
|
187
|
+
label: 'Order form'
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: 'H003',
|
|
195
|
+
label: 'Contact us',
|
|
196
|
+
children: [
|
|
197
|
+
{
|
|
198
|
+
id: 'H301',
|
|
199
|
+
label: 'Social media',
|
|
200
|
+
children: [
|
|
201
|
+
{
|
|
202
|
+
id: 'H311',
|
|
203
|
+
label: 'Facebook'
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
119
212
|
};
|
|
120
213
|
//# sourceMappingURL=data-tree-vertical.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-tree-vertical.stories.js","sourceRoot":"","sources":["../../stories/data-tree-vertical.stories.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,6BAA6B;IACpC,SAAS,EAAE,kBAAkB;IAC7B,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"data-tree-vertical.stories.js","sourceRoot":"","sources":["../../stories/data-tree-vertical.stories.ts"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,4BAA4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B,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,YAAY;iCACpB;6BACF;yBACF;wBACD;4BACE,EAAE,EAAE,MAAM;4BACV,KAAK,EAAE,iBAAiB;4BACxB,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,YAAY;iCACpB;6BACF;yBACF;qBACF;iBACF;gBACD;oBACE,EAAE,EAAE,MAAM;oBACV,KAAK,EAAE,YAAY;oBACnB,QAAQ,EAAE;wBACR;4BACE,EAAE,EAAE,MAAM;4BACV,KAAK,EAAE,cAAc;4BACrB,QAAQ,EAAE;gCACR;oCACE,EAAE,EAAE,MAAM;oCACV,KAAK,EAAE,UAAU;iCAClB;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-tree-vertical.js'\nimport '@material/web/icon/icon.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: '3 modes in ox-tree-vertical',\n component: 'ox-tree-vertical',\n argTypes: {\n data: { control: 'object' }\n }\n}\n\ninterface Story<T> {\n (args: T): TemplateResult\n args?: Partial<T>\n argTypes?: Record<string, unknown>\n}\n\ntype TreeItem = {\n [key: string]: any\n __status__?: { [state: string]: boolean | string }\n}\n\ninterface ArgTypes {\n data: Array<TreeItem>\n}\n\nconst Template: Story<ArgTypes> = ({ data }: 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/light.css\" rel=\"stylesheet\" />\n <link href=\"/themes/dark.css\" rel=\"stylesheet\" />\n <link href=\"/themes/spacing.css\" rel=\"stylesheet\" />\n <link href=\"/themes/grist-theme.css\" rel=\"stylesheet\" />\n <link href=\"/themes/form-theme.css\" rel=\"stylesheet\" />\n\n <style>\n ox-tree-vertical {\n height: 500px;\n }\n </style>\n\n <div>\n <ox-tree-vertical .data=${data} description-property=\"description\"></ox-tree-vertical>\n </div>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n data: [\n {\n id: 'H000',\n label: 'Home',\n children: [\n {\n id: 'H001',\n label: 'About us',\n children: [\n {\n id: 'H101',\n label: 'Our history',\n children: [\n {\n id: 'H111',\n label: 'Founder',\n description: 'long long founder history'\n }\n ]\n },\n {\n id: 'H102',\n label: 'Our board',\n children: [\n {\n id: 'H121',\n label: 'Brad Whiteman'\n },\n {\n id: 'H122',\n label: 'Cynthia Tolken'\n },\n {\n id: 'H123',\n label: 'Bobby Founderson'\n }\n ]\n }\n ]\n },\n {\n id: 'H002',\n label: 'Our products',\n children: [\n {\n id: 'H201',\n label: 'The Widget 2000™',\n children: [\n {\n id: 'H211',\n label: 'Order form'\n }\n ]\n },\n {\n id: 'H202',\n label: 'The McGuffin V2',\n children: [\n {\n id: 'H221',\n label: 'Order form'\n }\n ]\n }\n ]\n },\n {\n id: 'H003',\n label: 'Contact us',\n children: [\n {\n id: 'H301',\n label: 'Social media',\n children: [\n {\n id: 'H311',\n label: 'Facebook'\n }\n ]\n }\n ]\n }\n ]\n },\n {\n id: 'H000',\n label: 'Home',\n children: [\n {\n id: 'H001',\n label: 'About us',\n children: [\n {\n id: 'H101',\n label: 'Our history',\n children: [\n {\n id: 'H111',\n label: 'Founder',\n description: 'long long founder history'\n }\n ]\n },\n {\n id: 'H102',\n label: 'Our board',\n children: [\n {\n id: 'H121',\n label: 'Brad Whiteman'\n },\n {\n id: 'H122',\n label: 'Cynthia Tolken'\n },\n {\n id: 'H123',\n label: 'Bobby Founderson'\n }\n ]\n }\n ]\n },\n {\n id: 'H002',\n label: 'Our products',\n children: [\n {\n id: 'H201',\n label: 'The Widget 2000™',\n children: [\n {\n id: 'H211',\n label: 'Order form'\n }\n ]\n },\n {\n id: 'H202',\n label: 'The McGuffin V2',\n children: [\n {\n id: 'H221',\n label: 'Order form'\n }\n ]\n }\n ]\n },\n {\n id: 'H003',\n label: 'Contact us',\n children: [\n {\n id: 'H301',\n label: 'Social media',\n children: [\n {\n id: 'H311',\n label: 'Facebook'\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n"]}
|