@3t-transform/threeteeui 0.2.86 → 0.2.88
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tttx-data-pattern.cjs.entry.js +25 -0
- package/dist/cjs/tttx-expander.cjs.entry.js +17 -6
- package/dist/cjs/{tttx-filter.cjs.entry.js → tttx-filter_4.cjs.entry.js} +209 -0
- package/dist/cjs/tttx-tree-view.cjs.entry.js +4 -8
- package/dist/cjs/tttx.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.css +13 -0
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.js +26 -10
- package/dist/collection/components/molecules/tttx-expander/tttx-expander.stories.js +10 -10
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.css +1 -5
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.js +22 -7
- package/dist/collection/components/molecules/tttx-tree-view/tttx-tree-view.stories.js +17 -252
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.css +3 -0
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.js +99 -0
- package/dist/collection/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.js +35 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/tttx-data-pattern.d.ts +11 -0
- package/dist/components/tttx-data-pattern.js +86 -0
- package/dist/components/tttx-expander.js +20 -8
- package/dist/components/tttx-filter.js +1 -223
- package/dist/{esm/tttx-filter.entry.js → components/tttx-filter2.js} +44 -8
- package/dist/components/tttx-list.js +1 -92
- package/dist/{esm/tttx-list.entry.js → components/tttx-list2.js} +33 -9
- package/dist/components/tttx-sorter.js +1 -142
- package/dist/{esm/tttx-sorter.entry.js → components/tttx-sorter2.js} +38 -8
- package/dist/components/tttx-toolbar.js +1 -47
- package/dist/{esm/tttx-toolbar.entry.js → components/tttx-toolbar2.js} +25 -7
- package/dist/components/tttx-tree-view.js +4 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tttx-data-pattern.entry.js +21 -0
- package/dist/esm/tttx-expander.entry.js +17 -6
- package/dist/esm/tttx-filter_4.entry.js +395 -0
- package/dist/esm/tttx-tree-view.entry.js +4 -8
- package/dist/esm/tttx.js +1 -1
- package/dist/tttx/p-003798cb.entry.js +1 -0
- package/dist/tttx/p-02515882.entry.js +1 -0
- package/dist/tttx/p-1190c6e5.entry.js +1 -0
- package/dist/tttx/p-fe46ecd4.entry.js +1 -0
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/molecules/tttx-expander/tttx-expander.d.ts +9 -3
- package/dist/types/components/molecules/tttx-tree-view/helper/helper.d.ts +5 -2
- package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.d.ts +4 -3
- package/dist/types/components/molecules/tttx-tree-view/tttx-tree-view.stories.d.ts +1 -4
- package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.d.ts +7 -0
- package/dist/types/components/organisms/tttx-data-pattern/tttx-data-pattern.stories.d.ts +13 -0
- package/dist/types/components.d.ts +26 -4
- package/package.json +1 -1
- package/dist/cjs/tttx-list.cjs.entry.js +0 -74
- package/dist/cjs/tttx-sorter.cjs.entry.js +0 -118
- package/dist/cjs/tttx-toolbar.cjs.entry.js +0 -35
- package/dist/tttx/p-0343ca04.entry.js +0 -1
- package/dist/tttx/p-5ca83a07.entry.js +0 -1
- package/dist/tttx/p-7346c185.entry.js +0 -1
- package/dist/tttx/p-96d6a1ed.entry.js +0 -1
- package/dist/tttx/p-b7a2de3b.entry.js +0 -1
- package/dist/tttx/p-df198186.entry.js +0 -1
|
@@ -29,6 +29,7 @@ export class TttxTreeView {
|
|
|
29
29
|
event.stopPropagation();
|
|
30
30
|
node.isOpen = !node.isOpen;
|
|
31
31
|
this.treeData = [...this.treeData];
|
|
32
|
+
this.expandNode.emit({ node: node, treeViewData: this.treeData });
|
|
32
33
|
}
|
|
33
34
|
handleCheckboxChange(node, event) {
|
|
34
35
|
event.stopPropagation();
|
|
@@ -90,13 +91,7 @@ export class TttxTreeView {
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
htmlcode(type, node, check_box, check_boxColor) {
|
|
93
|
-
const htmlcode = (h("div", { class: "inline-tree-item element" }, node.hasCheckbox && (h("tttx-button", { design: "borderless-circle", notext: true, icon: check_box, iconcolor: check_boxColor, class: "padding-icon checkbox", onClick: event => this.handleCheckboxChange(node, event) })), !node.html && node.hasIcon && h("tttx-icon", { icon: node.icon, color: node.iconColor, class: "padding-icon" }), !node.html && h("div", { class: type }, node.title), node.html && h("div", { class: type, innerHTML: DOMPurify.sanitize(node.html, domSanitiserOptions) })
|
|
94
|
-
event.stopPropagation();
|
|
95
|
-
this.onClickHandler('menu', event, node);
|
|
96
|
-
} })), node.chevronActive && (h("tttx-icon", { icon: "chevron_right", color: "black", class: "padding-icon chevron-button", onClick: (event) => {
|
|
97
|
-
event.stopPropagation();
|
|
98
|
-
this.onClickHandler('chevron', event, node);
|
|
99
|
-
} }))))));
|
|
94
|
+
const htmlcode = (h("div", { class: "inline-tree-item element" }, node.hasCheckbox && (h("tttx-button", { design: "borderless-circle", notext: true, icon: check_box, iconcolor: check_boxColor, class: "padding-icon checkbox", onClick: event => this.handleCheckboxChange(node, event) })), !node.html && node.hasIcon && h("tttx-icon", { icon: node.icon, color: node.iconColor, class: "padding-icon" }), !node.html && h("div", { class: type }, node.title), node.html && h("div", { class: type, innerHTML: DOMPurify.sanitize(node.html, domSanitiserOptions) })));
|
|
100
95
|
return htmlcode;
|
|
101
96
|
}
|
|
102
97
|
render() {
|
|
@@ -163,6 +158,26 @@ export class TttxTreeView {
|
|
|
163
158
|
"resolved": "any",
|
|
164
159
|
"references": {}
|
|
165
160
|
}
|
|
161
|
+
}, {
|
|
162
|
+
"method": "expandNode",
|
|
163
|
+
"name": "expandNode",
|
|
164
|
+
"bubbles": true,
|
|
165
|
+
"cancelable": true,
|
|
166
|
+
"composed": true,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": ""
|
|
170
|
+
},
|
|
171
|
+
"complexType": {
|
|
172
|
+
"original": "ExpandNodeEvent",
|
|
173
|
+
"resolved": "ExpandNodeEvent",
|
|
174
|
+
"references": {
|
|
175
|
+
"ExpandNodeEvent": {
|
|
176
|
+
"location": "import",
|
|
177
|
+
"path": "./helper/helper"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
166
181
|
}];
|
|
167
182
|
}
|
|
168
183
|
}
|
|
@@ -24,7 +24,7 @@ export const Default = TttxTreeViewStory.bind({});
|
|
|
24
24
|
Default.args = {
|
|
25
25
|
data: [
|
|
26
26
|
{
|
|
27
|
-
id:
|
|
27
|
+
id: 'First',
|
|
28
28
|
title: 'Role Specific Vocational Qualification',
|
|
29
29
|
isOpen: false,
|
|
30
30
|
openOrClosed: 'arrow_right',
|
|
@@ -34,16 +34,15 @@ Default.args = {
|
|
|
34
34
|
iconColor: 'green',
|
|
35
35
|
child: [
|
|
36
36
|
{
|
|
37
|
-
id:
|
|
37
|
+
id: 'second',
|
|
38
38
|
title: 'Boop',
|
|
39
39
|
isOpen: false,
|
|
40
40
|
openOrClosed: 'arrow_right',
|
|
41
41
|
icon: 'check_circle',
|
|
42
42
|
iconColor: 'green',
|
|
43
|
-
menuActive: true,
|
|
44
43
|
child: [
|
|
45
44
|
{
|
|
46
|
-
id:
|
|
45
|
+
id: 'third',
|
|
47
46
|
hasIcon: true,
|
|
48
47
|
icon: 'help',
|
|
49
48
|
iconColor: 'gray',
|
|
@@ -69,7 +68,6 @@ Default.args = {
|
|
|
69
68
|
openOrClosed: 'arrow_right',
|
|
70
69
|
icon: 'help',
|
|
71
70
|
iconColor: 'gray',
|
|
72
|
-
chevronActive: true,
|
|
73
71
|
child: [
|
|
74
72
|
{
|
|
75
73
|
id: 4,
|
|
@@ -86,8 +84,6 @@ Default.args = {
|
|
|
86
84
|
icon: 'help',
|
|
87
85
|
iconColor: 'gray',
|
|
88
86
|
title: 'sjdnfkn 2077',
|
|
89
|
-
chevronActive: true,
|
|
90
|
-
menuActive: true,
|
|
91
87
|
},
|
|
92
88
|
],
|
|
93
89
|
},
|
|
@@ -106,171 +102,23 @@ export const Simple = TttxTreeViewSimple.bind({});
|
|
|
106
102
|
Simple.args = {
|
|
107
103
|
data: [
|
|
108
104
|
{
|
|
109
|
-
id:
|
|
110
|
-
title: 'Role Specific Vocational Qualification',
|
|
111
|
-
isOpen: false,
|
|
112
|
-
openOrClosed: 'arrow_right',
|
|
113
|
-
hasCheckbox: false,
|
|
114
|
-
hasIcon: false,
|
|
115
|
-
child: [
|
|
116
|
-
{
|
|
117
|
-
id: 2,
|
|
118
|
-
title: 'Boop',
|
|
119
|
-
isOpen: false,
|
|
120
|
-
openOrClosed: 'arrow_right',
|
|
121
|
-
child: [
|
|
122
|
-
{
|
|
123
|
-
id: 2,
|
|
124
|
-
hasIcon: false,
|
|
125
|
-
title: 'this is a test',
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: 3,
|
|
131
|
-
title: 'Boop',
|
|
132
|
-
isOpen: false,
|
|
133
|
-
openOrClosed: 'arrow_right',
|
|
134
|
-
hasIcon: false,
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: 3,
|
|
140
|
-
title: 'second route',
|
|
141
|
-
isOpen: false,
|
|
142
|
-
openOrClosed: 'arrow_right',
|
|
143
|
-
hasIcon: false,
|
|
144
|
-
hasCheckbox: false,
|
|
145
|
-
child: [
|
|
146
|
-
{
|
|
147
|
-
id: 4,
|
|
148
|
-
title: 'Boop 2077',
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
id: 4,
|
|
152
|
-
title: 'sjdnfkn 2077',
|
|
153
|
-
},
|
|
154
|
-
],
|
|
155
|
-
},
|
|
156
|
-
],
|
|
157
|
-
};
|
|
158
|
-
const TttxTreeViewRightButtons = ({ data }) => `
|
|
159
|
-
<tttx-tree-view id="treeViewRightButtons"></tttx-tree-view>
|
|
160
|
-
<script>
|
|
161
|
-
if(!treeViewRightButtons) {
|
|
162
|
-
const treeViewRightButtons = document.getElementById('treeViewRightButtons');
|
|
163
|
-
}
|
|
164
|
-
treeViewRightButtons.data = ${JSON.stringify(data)};
|
|
165
|
-
</script>
|
|
166
|
-
|
|
167
|
-
`;
|
|
168
|
-
export const RightButtons = TttxTreeViewRightButtons.bind({});
|
|
169
|
-
RightButtons.args = {
|
|
170
|
-
data: [
|
|
171
|
-
{
|
|
172
|
-
id: 1,
|
|
173
|
-
title: 'Role Specific Vocational Qualification',
|
|
174
|
-
isOpen: false,
|
|
175
|
-
openOrClosed: 'arrow_right',
|
|
176
|
-
hasCheckbox: false,
|
|
177
|
-
hasIcon: false,
|
|
178
|
-
menuActive: true,
|
|
179
|
-
chevronActive: true,
|
|
180
|
-
child: [
|
|
181
|
-
{
|
|
182
|
-
id: 2,
|
|
183
|
-
title: 'Boop',
|
|
184
|
-
isOpen: false,
|
|
185
|
-
openOrClosed: 'arrow_right',
|
|
186
|
-
hasIcon: false,
|
|
187
|
-
menuActive: true,
|
|
188
|
-
chevronActive: true,
|
|
189
|
-
child: [
|
|
190
|
-
{
|
|
191
|
-
id: 2,
|
|
192
|
-
hasIcon: false,
|
|
193
|
-
title: 'this is a test',
|
|
194
|
-
menuActive: true,
|
|
195
|
-
chevronActive: true,
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
id: 3,
|
|
201
|
-
title: 'Boop',
|
|
202
|
-
isOpen: false,
|
|
203
|
-
openOrClosed: 'arrow_right',
|
|
204
|
-
hasIcon: false,
|
|
205
|
-
menuActive: true,
|
|
206
|
-
chevronActive: true,
|
|
207
|
-
},
|
|
208
|
-
],
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
id: 3,
|
|
212
|
-
title: 'second route',
|
|
213
|
-
isOpen: false,
|
|
214
|
-
openOrClosed: 'arrow_right',
|
|
215
|
-
hasIcon: false,
|
|
216
|
-
menuActive: true,
|
|
217
|
-
chevronActive: true,
|
|
218
|
-
child: [
|
|
219
|
-
{
|
|
220
|
-
id: 4,
|
|
221
|
-
hasCheckbox: false,
|
|
222
|
-
hasIcon: false,
|
|
223
|
-
title: 'Boop 2077',
|
|
224
|
-
menuActive: true,
|
|
225
|
-
chevronActive: true,
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
id: 4,
|
|
229
|
-
hasCheckbox: false,
|
|
230
|
-
hasIcon: false,
|
|
231
|
-
title: 'sjdnfkn 2077',
|
|
232
|
-
chevronActive: true,
|
|
233
|
-
menuActive: true,
|
|
234
|
-
},
|
|
235
|
-
],
|
|
236
|
-
},
|
|
237
|
-
],
|
|
238
|
-
};
|
|
239
|
-
const TttxTreeViewMenuButton = ({ data }) => `
|
|
240
|
-
<tttx-tree-view id="treeViewMenuButton"></tttx-tree-view>
|
|
241
|
-
<script>
|
|
242
|
-
if(!treeViewMenuButton) {
|
|
243
|
-
const treeViewMenuButton = document.getElementById('treeViewMenuButton');
|
|
244
|
-
}
|
|
245
|
-
treeViewMenuButton.data = ${JSON.stringify(data)};
|
|
246
|
-
</script>
|
|
247
|
-
|
|
248
|
-
`;
|
|
249
|
-
export const MenuButton = TttxTreeViewMenuButton.bind({});
|
|
250
|
-
MenuButton.args = {
|
|
251
|
-
data: [
|
|
252
|
-
{
|
|
253
|
-
id: 1,
|
|
105
|
+
id: 'First',
|
|
254
106
|
title: 'Role Specific Vocational Qualification',
|
|
255
107
|
isOpen: false,
|
|
256
108
|
openOrClosed: 'arrow_right',
|
|
257
109
|
hasCheckbox: false,
|
|
258
110
|
hasIcon: false,
|
|
259
|
-
menuActive: true,
|
|
260
111
|
child: [
|
|
261
112
|
{
|
|
262
|
-
id:
|
|
113
|
+
id: 'second',
|
|
263
114
|
title: 'Boop',
|
|
264
115
|
isOpen: false,
|
|
265
116
|
openOrClosed: 'arrow_right',
|
|
266
|
-
hasIcon: false,
|
|
267
|
-
menuActive: true,
|
|
268
117
|
child: [
|
|
269
118
|
{
|
|
270
|
-
id:
|
|
119
|
+
id: 'third',
|
|
271
120
|
hasIcon: false,
|
|
272
121
|
title: 'this is a test',
|
|
273
|
-
menuActive: true,
|
|
274
122
|
},
|
|
275
123
|
],
|
|
276
124
|
},
|
|
@@ -280,7 +128,6 @@ MenuButton.args = {
|
|
|
280
128
|
isOpen: false,
|
|
281
129
|
openOrClosed: 'arrow_right',
|
|
282
130
|
hasIcon: false,
|
|
283
|
-
menuActive: true,
|
|
284
131
|
},
|
|
285
132
|
],
|
|
286
133
|
},
|
|
@@ -290,95 +137,15 @@ MenuButton.args = {
|
|
|
290
137
|
isOpen: false,
|
|
291
138
|
openOrClosed: 'arrow_right',
|
|
292
139
|
hasIcon: false,
|
|
293
|
-
menuActive: true,
|
|
294
|
-
child: [
|
|
295
|
-
{
|
|
296
|
-
id: 4,
|
|
297
|
-
hasCheckbox: false,
|
|
298
|
-
hasIcon: false,
|
|
299
|
-
title: 'Boop 2077',
|
|
300
|
-
menuActive: true,
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
id: 4,
|
|
304
|
-
hasCheckbox: false,
|
|
305
|
-
hasIcon: false,
|
|
306
|
-
title: 'sjdnfkn 2077',
|
|
307
|
-
menuActive: true,
|
|
308
|
-
},
|
|
309
|
-
],
|
|
310
|
-
},
|
|
311
|
-
],
|
|
312
|
-
};
|
|
313
|
-
const TttxTreeViewChevron = ({ data }) => `
|
|
314
|
-
<tttx-tree-view id="treeViewChevron"></tttx-tree-view>
|
|
315
|
-
<script>
|
|
316
|
-
if(!treeViewChevron) {
|
|
317
|
-
const treeViewChevron = document.getElementById('treeViewChevron');
|
|
318
|
-
}
|
|
319
|
-
treeViewChevron.data = ${JSON.stringify(data)};
|
|
320
|
-
</script>
|
|
321
|
-
|
|
322
|
-
`;
|
|
323
|
-
export const Chevron = TttxTreeViewChevron.bind({});
|
|
324
|
-
Chevron.args = {
|
|
325
|
-
data: [
|
|
326
|
-
{
|
|
327
|
-
id: 1,
|
|
328
|
-
title: 'Role Specific Vocational Qualification',
|
|
329
|
-
isOpen: false,
|
|
330
|
-
openOrClosed: 'arrow_right',
|
|
331
140
|
hasCheckbox: false,
|
|
332
|
-
hasIcon: false,
|
|
333
|
-
chevronActive: true,
|
|
334
|
-
child: [
|
|
335
|
-
{
|
|
336
|
-
id: 2,
|
|
337
|
-
title: 'Boop',
|
|
338
|
-
isOpen: false,
|
|
339
|
-
openOrClosed: 'arrow_right',
|
|
340
|
-
hasIcon: false,
|
|
341
|
-
chevronActive: true,
|
|
342
|
-
child: [
|
|
343
|
-
{
|
|
344
|
-
id: 2,
|
|
345
|
-
hasIcon: false,
|
|
346
|
-
title: 'this is a test',
|
|
347
|
-
chevronActive: true,
|
|
348
|
-
},
|
|
349
|
-
],
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
id: 3,
|
|
353
|
-
title: 'Boop',
|
|
354
|
-
isOpen: false,
|
|
355
|
-
openOrClosed: 'arrow_right',
|
|
356
|
-
hasIcon: false,
|
|
357
|
-
chevronActive: true,
|
|
358
|
-
},
|
|
359
|
-
],
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
id: 3,
|
|
363
|
-
title: 'second route',
|
|
364
|
-
isOpen: false,
|
|
365
|
-
openOrClosed: 'arrow_right',
|
|
366
|
-
hasIcon: false,
|
|
367
|
-
chevronActive: true,
|
|
368
141
|
child: [
|
|
369
142
|
{
|
|
370
143
|
id: 4,
|
|
371
|
-
hasCheckbox: false,
|
|
372
|
-
hasIcon: false,
|
|
373
144
|
title: 'Boop 2077',
|
|
374
|
-
chevronActive: true,
|
|
375
145
|
},
|
|
376
146
|
{
|
|
377
147
|
id: 4,
|
|
378
|
-
hasCheckbox: false,
|
|
379
|
-
hasIcon: false,
|
|
380
148
|
title: 'sjdnfkn 2077',
|
|
381
|
-
chevronActive: true,
|
|
382
149
|
},
|
|
383
150
|
],
|
|
384
151
|
},
|
|
@@ -397,7 +164,7 @@ export const HTML = TttxTreeViewHTML.bind({});
|
|
|
397
164
|
HTML.args = {
|
|
398
165
|
data: [
|
|
399
166
|
{
|
|
400
|
-
id:
|
|
167
|
+
id: 'First',
|
|
401
168
|
title: 'Role Specific Vocational Qualification',
|
|
402
169
|
isOpen: false,
|
|
403
170
|
html: '<div>This is html </div>',
|
|
@@ -466,7 +233,7 @@ export const Checkbox = TttxTreeViewCheckbox.bind({});
|
|
|
466
233
|
Checkbox.args = {
|
|
467
234
|
data: [
|
|
468
235
|
{
|
|
469
|
-
id:
|
|
236
|
+
id: 'First',
|
|
470
237
|
title: 'Role Specific Vocational Qualification',
|
|
471
238
|
isOpen: false,
|
|
472
239
|
openOrClosed: 'arrow_right',
|
|
@@ -540,7 +307,7 @@ export const Icons = TttxTreeViewIcons.bind({});
|
|
|
540
307
|
Icons.args = {
|
|
541
308
|
data: [
|
|
542
309
|
{
|
|
543
|
-
id:
|
|
310
|
+
id: 'First',
|
|
544
311
|
title: 'Role Specific Vocational Qualification',
|
|
545
312
|
isOpen: false,
|
|
546
313
|
openOrClosed: 'arrow_right',
|
|
@@ -619,7 +386,7 @@ export const CheckBoxAndIcons = TttxTreeViewCheckBoxAndIcons.bind({});
|
|
|
619
386
|
CheckBoxAndIcons.args = {
|
|
620
387
|
data: [
|
|
621
388
|
{
|
|
622
|
-
id:
|
|
389
|
+
id: 'First',
|
|
623
390
|
title: 'Role Specific Vocational Qualification',
|
|
624
391
|
isOpen: false,
|
|
625
392
|
openOrClosed: 'arrow_right',
|
|
@@ -753,7 +520,7 @@ export const EmptyGroup = TttxTreeViewEmptyGroup.bind({});
|
|
|
753
520
|
EmptyGroup.args = {
|
|
754
521
|
data: [
|
|
755
522
|
{
|
|
756
|
-
id:
|
|
523
|
+
id: 'First',
|
|
757
524
|
title: 'Role Specific Vocational Qualification',
|
|
758
525
|
isOpen: false,
|
|
759
526
|
openOrClosed: 'arrow_right',
|
|
@@ -775,11 +542,11 @@ const TttxTreeViewselectable = ({ data }) => `
|
|
|
775
542
|
treeViewselectable.data = ${JSON.stringify(data)};
|
|
776
543
|
</script>
|
|
777
544
|
`;
|
|
778
|
-
export const
|
|
779
|
-
|
|
545
|
+
export const SelectableAndHover = TttxTreeViewselectable.bind({});
|
|
546
|
+
SelectableAndHover.args = {
|
|
780
547
|
data: [
|
|
781
548
|
{
|
|
782
|
-
id:
|
|
549
|
+
id: 'First',
|
|
783
550
|
title: 'Role Specific Vocational Qualification',
|
|
784
551
|
isOpen: false,
|
|
785
552
|
openOrClosed: 'arrow_right',
|
|
@@ -788,10 +555,9 @@ selectableAndHover.args = {
|
|
|
788
555
|
hasHover: true,
|
|
789
556
|
selectable: true,
|
|
790
557
|
selected: false,
|
|
791
|
-
chevronActive: true,
|
|
792
558
|
child: [
|
|
793
559
|
{
|
|
794
|
-
id:
|
|
560
|
+
id: 'second',
|
|
795
561
|
title: 'Boop',
|
|
796
562
|
isOpen: false,
|
|
797
563
|
hasCheckbox: false,
|
|
@@ -800,10 +566,9 @@ selectableAndHover.args = {
|
|
|
800
566
|
hasHover: true,
|
|
801
567
|
selectable: true,
|
|
802
568
|
selected: false,
|
|
803
|
-
chevronActive: true,
|
|
804
569
|
child: [
|
|
805
570
|
{
|
|
806
|
-
id:
|
|
571
|
+
id: 'third',
|
|
807
572
|
hasCheckbox: false,
|
|
808
573
|
hasIcon: false,
|
|
809
574
|
title: 'this is a test',
|
|
@@ -814,7 +579,7 @@ selectableAndHover.args = {
|
|
|
814
579
|
],
|
|
815
580
|
},
|
|
816
581
|
{
|
|
817
|
-
id:
|
|
582
|
+
id: 'fouth',
|
|
818
583
|
title: 'Boop',
|
|
819
584
|
isOpen: false,
|
|
820
585
|
openOrClosed: 'arrow_right',
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class TttxDataPattern {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.data = undefined;
|
|
5
|
+
this.sorteroptions = undefined;
|
|
6
|
+
this.filteroptions = undefined;
|
|
7
|
+
this.filterheader = 'Filter';
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, null, h("div", { class: "container" }, h("tttx-toolbar", { border: true }, h("span", { slot: "before" }, h("tttx-sorter", { sorterKey: "data-pattern-list", fieldOptionsData: this.sorteroptions, defaultOption: "Sort by" }), h("tttx-filter", { "filter-options": JSON.stringify(this.filteroptions), showSelectAll: false, "show-option-icons": true, "filter-header": this.filterheader, "filter-key": "data-pattern-list" })), h("span", { slot: "after" }, h("tttx-standalone-input", { class: "qualifications-filter", showerrorbubble: false, inputicon: "search", inline: true, required: true, placeholder: "Search", type: "text",
|
|
11
|
+
// onInput={this.debounceFilter.bind(this)}
|
|
12
|
+
maxlength: 30 }))), h("tttx-toolbar", { border: false }, h("span", { slot: "before" }, h("tttx-button", { design: "primary", icon: "add" }, "Add"))), h("tttx-list", { data: this.data }))));
|
|
13
|
+
}
|
|
14
|
+
static get is() { return "tttx-data-pattern"; }
|
|
15
|
+
static get encapsulation() { return "shadow"; }
|
|
16
|
+
static get originalStyleUrls() {
|
|
17
|
+
return {
|
|
18
|
+
"$": ["tttx-data-pattern.css"]
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static get styleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["tttx-data-pattern.css"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get properties() {
|
|
27
|
+
return {
|
|
28
|
+
"data": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"mutable": false,
|
|
31
|
+
"complexType": {
|
|
32
|
+
"original": "string",
|
|
33
|
+
"resolved": "string",
|
|
34
|
+
"references": {}
|
|
35
|
+
},
|
|
36
|
+
"required": false,
|
|
37
|
+
"optional": false,
|
|
38
|
+
"docs": {
|
|
39
|
+
"tags": [],
|
|
40
|
+
"text": ""
|
|
41
|
+
},
|
|
42
|
+
"attribute": "data",
|
|
43
|
+
"reflect": false
|
|
44
|
+
},
|
|
45
|
+
"sorteroptions": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "string",
|
|
50
|
+
"resolved": "string",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": false,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"attribute": "sorteroptions",
|
|
60
|
+
"reflect": false
|
|
61
|
+
},
|
|
62
|
+
"filteroptions": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"mutable": false,
|
|
65
|
+
"complexType": {
|
|
66
|
+
"original": "string",
|
|
67
|
+
"resolved": "string",
|
|
68
|
+
"references": {}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": ""
|
|
75
|
+
},
|
|
76
|
+
"attribute": "filteroptions",
|
|
77
|
+
"reflect": false
|
|
78
|
+
},
|
|
79
|
+
"filterheader": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"mutable": false,
|
|
82
|
+
"complexType": {
|
|
83
|
+
"original": "string",
|
|
84
|
+
"resolved": "string",
|
|
85
|
+
"references": {}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": ""
|
|
92
|
+
},
|
|
93
|
+
"attribute": "filterheader",
|
|
94
|
+
"reflect": false,
|
|
95
|
+
"defaultValue": "'Filter'"
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'organisms/Data Pattern',
|
|
3
|
+
component: 'data-pattern',
|
|
4
|
+
argTypes: {
|
|
5
|
+
border: {
|
|
6
|
+
control: { type: 'boolean' }
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
const Default = ({ data, sorterOptions, filterOptions }) => `
|
|
11
|
+
<tttx-data-pattern id="datapatternlist"></tttx-data-pattern>
|
|
12
|
+
<script>
|
|
13
|
+
const element = document.getElementById('datapatternlist');
|
|
14
|
+
element.data = ${JSON.stringify(data)};
|
|
15
|
+
element.sorteroptions = ${JSON.stringify(sorterOptions)};
|
|
16
|
+
element.filteroptions = ${JSON.stringify(filterOptions)};
|
|
17
|
+
</script>
|
|
18
|
+
`;
|
|
19
|
+
export const WIPDefaultDataPattern = Default.bind({});
|
|
20
|
+
WIPDefaultDataPattern.args = {
|
|
21
|
+
data: [
|
|
22
|
+
{ icon: 'chevron_right', element: '<span><tttx-icon icon="egg" /></span> Demulon 1,000,000' },
|
|
23
|
+
{ icon: 'chevron_right', element: '<span><tttx-icon icon="egg" color="red" /></span> Patrick' },
|
|
24
|
+
{ icon: 'chevron_right', element: '<span><tttx-icon icon="add" /></span> Lee' },
|
|
25
|
+
{ icon: 'chevron_right', element: '<span><tttx-icon icon="egg" /></span> Ben' },
|
|
26
|
+
],
|
|
27
|
+
sorterOptions: {
|
|
28
|
+
sorterOptions: [{ optionLabel: 'Name' }, { optionLabel: 'Age' }],
|
|
29
|
+
},
|
|
30
|
+
filterOptions: [
|
|
31
|
+
{ optionIcon: 'cancel', optionIconColor: 'exit', optionText: 'MAGICAL' },
|
|
32
|
+
{ optionIcon: 'warning', optionIconColor: 'orange', optionText: 'Expiring soon' },
|
|
33
|
+
{ optionIcon: 'check_circle', optionIconColor: 'green', optionText: 'Active' },
|
|
34
|
+
]
|
|
35
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* tttx custom elements */
|
|
2
2
|
export { TttxButton as TttxButton } from '../types/components/atoms/tttx-button/tttx-button';
|
|
3
|
+
export { TttxDataPattern as TttxDataPattern } from '../types/components/organisms/tttx-data-pattern/tttx-data-pattern';
|
|
3
4
|
export { TttxDialogBox as TttxDialogBox } from '../types/components/molecules/tttx-dialog-box/tttx-dialog-box';
|
|
4
5
|
export { TttxExpander as TttxExpander } from '../types/components/molecules/tttx-expander/tttx-expander';
|
|
5
6
|
export { TttxFilter as TttxFilter } from '../types/components/molecules/tttx-filter/tttx-filter';
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { TttxButton, defineCustomElement as defineCustomElementTttxButton } from './tttx-button.js';
|
|
3
|
+
export { TttxDataPattern, defineCustomElement as defineCustomElementTttxDataPattern } from './tttx-data-pattern.js';
|
|
3
4
|
export { TttxDialogBox, defineCustomElement as defineCustomElementTttxDialogBox } from './tttx-dialog-box.js';
|
|
4
5
|
export { TttxExpander, defineCustomElement as defineCustomElementTttxExpander } from './tttx-expander.js';
|
|
5
6
|
export { TttxFilter, defineCustomElement as defineCustomElementTttxFilter } from './tttx-filter.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TttxDataPattern extends Components.TttxDataPattern, HTMLElement {}
|
|
4
|
+
export const TttxDataPattern: {
|
|
5
|
+
prototype: TttxDataPattern;
|
|
6
|
+
new (): TttxDataPattern;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|