@operato/data-tree 9.0.0-beta.6 → 9.0.0
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 +156 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -4
- package/dist/src/index.js.map +0 -1
- package/dist/src/ox-tree-horizontal.d.ts +0 -21
- package/dist/src/ox-tree-horizontal.js +0 -262
- package/dist/src/ox-tree-horizontal.js.map +0 -1
- package/dist/src/ox-tree-vertical.d.ts +0 -21
- package/dist/src/ox-tree-vertical.js +0 -229
- package/dist/src/ox-tree-vertical.js.map +0 -1
- package/dist/src/ox-tree.d.ts +0 -23
- package/dist/src/ox-tree.js +0 -250
- package/dist/src/ox-tree.js.map +0 -1
- package/dist/stories/data-tree-horizontal.stories.d.ts +0 -28
- package/dist/stories/data-tree-horizontal.stories.js +0 -213
- package/dist/stories/data-tree-horizontal.stories.js.map +0 -1
- package/dist/stories/data-tree-vertical.stories.d.ts +0 -28
- package/dist/stories/data-tree-vertical.stories.js +0 -213
- package/dist/stories/data-tree-vertical.stories.js.map +0 -1
- package/dist/stories/data-tree.stories.d.ts +0 -22
- package/dist/stories/data-tree.stories.js +0 -77
- package/dist/stories/data-tree.stories.js.map +0 -1
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import '../src/ox-tree-vertical.js';
|
|
2
|
-
import '@material/web/icon/icon.js';
|
|
3
|
-
import { html } from 'lit';
|
|
4
|
-
export default {
|
|
5
|
-
title: '3 modes in ox-tree-vertical',
|
|
6
|
-
component: 'ox-tree-vertical',
|
|
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-vertical {
|
|
34
|
-
height: 500px;
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
37
|
-
|
|
38
|
-
<div>
|
|
39
|
-
<ox-tree-vertical .data=${data} description-property="description"></ox-tree-vertical>
|
|
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-vertical.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-tree-vertical.stories.js","sourceRoot":"","sources":["../../stories/data-tree-vertical.stories.ts"],"names":[],"mappings":"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","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"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import '../src/ox-tree.js';
|
|
2
|
-
import '@material/web/icon/icon.js';
|
|
3
|
-
import { TemplateResult } from 'lit';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: string;
|
|
7
|
-
argTypes: {
|
|
8
|
-
data: {
|
|
9
|
-
control: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export default _default;
|
|
14
|
-
interface Story<T> {
|
|
15
|
-
(args: T): TemplateResult;
|
|
16
|
-
args?: Partial<T>;
|
|
17
|
-
argTypes?: Record<string, unknown>;
|
|
18
|
-
}
|
|
19
|
-
interface ArgTypes {
|
|
20
|
-
data: object;
|
|
21
|
-
}
|
|
22
|
-
export declare const Regular: Story<ArgTypes>;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import '../src/ox-tree.js';
|
|
2
|
-
import '@material/web/icon/icon.js';
|
|
3
|
-
import { html } from 'lit';
|
|
4
|
-
export default {
|
|
5
|
-
title: '3 modes in ox-tree',
|
|
6
|
-
component: 'ox-tree',
|
|
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
|
-
<ox-tree .data=${data}></ox-tree>
|
|
33
|
-
`;
|
|
34
|
-
export const Regular = Template.bind({});
|
|
35
|
-
Regular.args = {
|
|
36
|
-
data: {
|
|
37
|
-
id: '0',
|
|
38
|
-
label: 'AAAAA',
|
|
39
|
-
children: [
|
|
40
|
-
{
|
|
41
|
-
id: '1-1',
|
|
42
|
-
label: 'AAAAA-1',
|
|
43
|
-
children: [
|
|
44
|
-
{
|
|
45
|
-
id: '1-1-1',
|
|
46
|
-
label: 'AAAAA-2'
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: '1-2',
|
|
52
|
-
label: 'BBBBB-1',
|
|
53
|
-
children: [
|
|
54
|
-
{
|
|
55
|
-
id: '1-2-1',
|
|
56
|
-
label: 'BBBBB-2'
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: '1-2-2',
|
|
60
|
-
label: 'BBBBB-21'
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
id: '1-3',
|
|
66
|
-
label: 'CCCCC-1',
|
|
67
|
-
children: [
|
|
68
|
-
{
|
|
69
|
-
id: '1-3-1',
|
|
70
|
-
label: 'CCCCC-2'
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
//# sourceMappingURL=data-tree.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-tree.stories.js","sourceRoot":"","sources":["../../stories/data-tree.stories.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAA;AAC1B,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAA;AAE1C,eAAe;IACb,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE;QACR,IAAI,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;KAC5B;CACF,CAAA;AAYD,MAAM,QAAQ,GAAoB,CAAC,EAAE,IAAI,EAAY,EAAE,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;mBAqB3C,IAAI;CACtB,CAAA;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACxC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE;QACJ,EAAE,EAAE,GAAG;QACP,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE;YACR;gBACE,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,SAAS;gBAChB,QAAQ,EAAE;oBACR;wBACE,EAAE,EAAE,OAAO;wBACX,KAAK,EAAE,SAAS;qBACjB;iBACF;aACF;YACD;gBACE,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,SAAS;gBAChB,QAAQ,EAAE;oBACR;wBACE,EAAE,EAAE,OAAO;wBACX,KAAK,EAAE,SAAS;qBACjB;oBACD;wBACE,EAAE,EAAE,OAAO;wBACX,KAAK,EAAE,UAAU;qBAClB;iBACF;aACF;YACD;gBACE,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,SAAS;gBAChB,QAAQ,EAAE;oBACR;wBACE,EAAE,EAAE,OAAO;wBACX,KAAK,EAAE,SAAS;qBACjB;iBACF;aACF;SACF;KACF;CACF,CAAA","sourcesContent":["import '../src/ox-tree.js'\nimport '@material/web/icon/icon.js'\n\nimport { html, TemplateResult } from 'lit'\n\nexport default {\n title: '3 modes in ox-tree',\n component: 'ox-tree',\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\ninterface ArgTypes {\n data: object\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 <ox-tree .data=${data}></ox-tree>\n`\n\nexport const Regular = Template.bind({})\nRegular.args = {\n data: {\n id: '0',\n label: 'AAAAA',\n children: [\n {\n id: '1-1',\n label: 'AAAAA-1',\n children: [\n {\n id: '1-1-1',\n label: 'AAAAA-2'\n }\n ]\n },\n {\n id: '1-2',\n label: 'BBBBB-1',\n children: [\n {\n id: '1-2-1',\n label: 'BBBBB-2'\n },\n {\n id: '1-2-2',\n label: 'BBBBB-21'\n }\n ]\n },\n {\n id: '1-3',\n label: 'CCCCC-1',\n children: [\n {\n id: '1-3-1',\n label: 'CCCCC-2'\n }\n ]\n }\n ]\n }\n}\n"]}
|