@sme.up/ketchup 9.0.0 → 9.2.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/dist/cjs/{f-button-b2cfce1c.js → f-button-9ccadd52.js} +2 -2
- package/dist/cjs/{f-cell-75fca92b.js → f-cell-3130506f.js} +183 -11
- package/dist/cjs/{f-checkbox-48d7af02.js → f-checkbox-9d2635d9.js} +1 -1
- package/dist/cjs/{f-chip-3e504f3e.js → f-chip-beb7af58.js} +3 -3
- package/dist/cjs/{f-image-270d39ae.js → f-image-66a3c3c1.js} +2 -2
- package/dist/cjs/{f-paginator-utils-6d0c4678.js → f-paginator-utils-c475e07f.js} +49 -50
- package/dist/cjs/{f-text-field-bbcd2143.js → f-text-field-c74856ff.js} +38 -4
- package/dist/cjs/{index-c3d10561.js → index-d8e5eb5f.js} +156 -39
- package/dist/cjs/index.cjs.js +11 -0
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +159 -197
- package/dist/cjs/kup-box.cjs.entry.js +23 -15
- package/dist/cjs/kup-calendar.cjs.entry.js +5061 -5028
- package/dist/cjs/kup-card-list.cjs.entry.js +34 -14
- package/dist/cjs/kup-cell.cjs.entry.js +9 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +2 -2
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-grid.cjs.entry.js +2 -2
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
- package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
- package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
- package/dist/cjs/{kup-manager-130bbd9d.js → kup-manager-7334c396.js} +63 -12
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +895 -410
- package/dist/cjs/kup-probe.cjs.entry.js +2 -2
- package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
- package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/card-list.js +12 -9
- package/dist/collection/assets/index.js +4 -0
- package/dist/collection/assets/progress-bar.js +0 -0
- package/dist/collection/assets/radio.js +30 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/kup-box/kup-box.js +14 -6
- package/dist/collection/components/kup-card/kup-card.css +14 -0
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +10 -5
- package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +10 -0
- package/dist/collection/components/kup-card-list/kup-card-list.js +232 -12
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +47 -48
- package/dist/collection/components/kup-data-table/kup-data-table.js +36 -22
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.css +1 -242
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +37 -84
- package/dist/collection/components/kup-radio/kup-radio.css +0 -161
- package/dist/collection/components/kup-radio/kup-radio.js +31 -26
- package/dist/collection/components/kup-rating/kup-rating.css +0 -8
- package/dist/collection/components/kup-rating/kup-rating.js +27 -52
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +1 -0
- package/dist/collection/f-components/f-cell/f-cell.js +19 -5
- package/dist/collection/f-components/f-progress-bar/f-progress-bar-declarations.js +1 -0
- package/dist/collection/f-components/f-progress-bar/f-progress-bar.js +88 -0
- package/dist/collection/f-components/f-radio/f-radio-declarations.js +1 -0
- package/dist/collection/f-components/f-radio/f-radio.js +28 -0
- package/dist/collection/f-components/f-rating/f-rating-declarations.js +1 -0
- package/dist/collection/f-components/f-rating/f-rating.js +26 -0
- package/dist/collection/f-components/f-text-field/f-text-field.js +36 -2
- package/dist/collection/index.js +5 -0
- package/dist/collection/managers/kup-data/kup-data.js +2 -0
- package/dist/collection/managers/kup-math/kup-math-helper.js +1 -1
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +33 -0
- package/dist/collection/managers/kup-theme/kup-theme.js +13 -1
- package/dist/collection/utils/cell-utils.js +6 -7
- package/dist/collection/utils/utils.js +0 -5
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +9 -1
- package/dist/components/kup-accordion.js +4 -1
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-autocomplete2.js +13902 -32341
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box2.js +26 -7
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +5001 -4964
- package/dist/components/kup-card-list.js +44 -13
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +2 -1
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +4 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +2 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +2 -1
- package/dist/components/kup-family-tree.js +2 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +2 -1
- package/dist/components/kup-iframe.js +2 -1
- package/dist/components/kup-image-list.js +4 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-lazy.js +2 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +2 -1
- package/dist/{esm/kup-manager-c8d5c94d.js → components/kup-manager.js} +63 -13
- package/dist/components/kup-nav-bar.js +2 -1
- package/dist/components/kup-numeric-picker.js +2 -1
- package/dist/components/kup-photo-frame.js +2 -1
- package/dist/components/kup-planner.js +896 -408
- package/dist/components/kup-probe.js +2 -1
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +2 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +2 -1
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/esm/{f-button-baa419dc.js → f-button-0bce6587.js} +2 -2
- package/dist/esm/{f-cell-18ee3afa.js → f-cell-88d375e1.js} +181 -12
- package/dist/esm/{f-checkbox-00a1e020.js → f-checkbox-31219c42.js} +1 -1
- package/dist/esm/{f-chip-311500f4.js → f-chip-ef0d4130.js} +3 -3
- package/dist/esm/{f-image-da03494c.js → f-image-727453df.js} +2 -2
- package/dist/esm/{f-paginator-utils-d63a195e.js → f-paginator-utils-4524e41c.js} +49 -50
- package/dist/esm/{f-text-field-e5f1f1fd.js → f-text-field-7b4d622c.js} +38 -4
- package/dist/esm/{index-3336c3b1.js → index-99c17b08.js} +157 -40
- package/dist/esm/index.js +8 -0
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +159 -197
- package/dist/esm/kup-box.entry.js +23 -15
- package/dist/esm/kup-calendar.entry.js +5061 -5028
- package/dist/esm/kup-card-list.entry.js +34 -14
- package/dist/esm/kup-cell.entry.js +9 -7
- package/dist/esm/kup-dashboard.entry.js +6 -6
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +2 -2
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-grid.entry.js +2 -2
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +8 -8
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/kup-manager-9a9d2dbb.js +18604 -0
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +895 -410
- package/dist/esm/kup-probe.entry.js +2 -2
- package/dist/esm/kup-qlik.entry.js +2 -2
- package/dist/esm/kup-snackbar.entry.js +4 -4
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/index.esm.js +1 -0
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-a8a39b08.entry.js → p-042e1ed0.entry.js} +1 -1
- package/dist/ketchup/{p-55fd3f46.entry.js → p-0dc763af.entry.js} +1 -1
- package/dist/ketchup/{p-76130e83.entry.js → p-1ae879af.entry.js} +1 -1
- package/dist/ketchup/p-1db0c862.entry.js +1 -0
- package/dist/ketchup/{p-25de68e5.js → p-20458088.js} +3 -3
- package/dist/ketchup/{p-a0f59b05.entry.js → p-20c1a69f.entry.js} +1 -1
- package/dist/ketchup/p-267dd24a.entry.js +9 -0
- package/dist/ketchup/{p-39602629.js → p-2849af6f.js} +1 -1
- package/dist/ketchup/p-30938d5a.entry.js +1 -0
- package/dist/ketchup/{p-f729449f.js → p-34e4a985.js} +1 -1
- package/dist/ketchup/p-4067c71b.js +2 -0
- package/dist/ketchup/{p-8281c9e5.js → p-4e696daf.js} +1 -1
- package/dist/ketchup/p-61f71872.entry.js +1 -0
- package/dist/ketchup/p-6a7df3d2.js +1 -0
- package/dist/ketchup/{p-2dab9c4f.entry.js → p-6b33f5de.entry.js} +1 -1
- package/dist/ketchup/{p-4597f25d.js → p-7a876328.js} +1 -1
- package/dist/ketchup/{p-7e1c8fc0.entry.js → p-7f64b612.entry.js} +1 -1
- package/dist/ketchup/{p-07707cd1.entry.js → p-90db42e6.entry.js} +1 -1
- package/dist/ketchup/{p-13eac183.entry.js → p-9cc1c76b.entry.js} +1 -1
- package/dist/ketchup/p-9d3d8690.js +1 -0
- package/dist/ketchup/{p-7bf649f0.entry.js → p-b4ba27da.entry.js} +1 -1
- package/dist/ketchup/{p-2a2a18bf.entry.js → p-c046fd1c.entry.js} +1 -1
- package/dist/ketchup/p-c120043a.entry.js +1 -0
- package/dist/ketchup/p-d520d757.entry.js +1 -0
- package/dist/ketchup/p-e9bc0749.entry.js +1 -0
- package/dist/ketchup/{p-7555c10d.js → p-ea56edbe.js} +1 -1
- package/dist/ketchup/p-edd88921.entry.js +1 -0
- package/dist/ketchup/{p-da58f8ab.entry.js → p-f1f82eef.entry.js} +1 -1
- package/dist/ketchup/{p-51aa248f.entry.js → p-f67ee60f.entry.js} +3 -3
- package/dist/ketchup/p-f6844304.entry.js +1 -0
- package/dist/ketchup/{p-2d192def.entry.js → p-f8213d22.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box.d.ts +1 -0
- package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +12 -12
- package/dist/types/components/kup-card-list/kup-card-list.d.ts +50 -0
- package/dist/types/components/kup-progress-bar/kup-progress-bar.d.ts +0 -1
- package/dist/types/components/kup-radio/kup-radio-declarations.d.ts +1 -9
- package/dist/types/components/kup-radio/kup-radio.d.ts +3 -2
- package/dist/types/components/kup-rating/kup-rating.d.ts +2 -7
- package/dist/types/components.d.ts +674 -4
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +1 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar-declarations.d.ts +16 -0
- package/dist/types/f-components/f-progress-bar/f-progress-bar.d.ts +3 -0
- package/dist/types/f-components/f-radio/f-radio-declarations.d.ts +22 -0
- package/dist/types/f-components/f-radio/f-radio.d.ts +3 -0
- package/dist/types/f-components/f-rating/f-rating-declarations.d.ts +10 -0
- package/dist/types/f-components/f-rating/f-rating.d.ts +3 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +26 -3
- package/dist/types/utils/utils.d.ts +0 -2
- package/package.json +3 -3
- package/dist/ketchup/p-008ad26c.js +0 -1
- package/dist/ketchup/p-0c19d485.entry.js +0 -9
- package/dist/ketchup/p-2d42477d.js +0 -2
- package/dist/ketchup/p-5c15661d.entry.js +0 -1
- package/dist/ketchup/p-5cfaa673.entry.js +0 -1
- package/dist/ketchup/p-5f583257.entry.js +0 -1
- package/dist/ketchup/p-80699a95.js +0 -1
- package/dist/ketchup/p-81debebe.entry.js +0 -1
- package/dist/ketchup/p-bb854cf5.entry.js +0 -1
- package/dist/ketchup/p-d6a7498b.entry.js +0 -1
- package/dist/ketchup/p-d8384990.entry.js +0 -1
- package/dist/ketchup/p-ecb9fe91.entry.js +0 -1
|
@@ -24,6 +24,16 @@ export class KupCardList {
|
|
|
24
24
|
this.data = null;
|
|
25
25
|
this.fullWidth = true;
|
|
26
26
|
this.horizontal = false;
|
|
27
|
+
this.descrCol = '';
|
|
28
|
+
this.iconCol = '';
|
|
29
|
+
this.valueCol = '';
|
|
30
|
+
this.measureCol = '';
|
|
31
|
+
this.intvalueCol = '';
|
|
32
|
+
this.decvalueCol = '';
|
|
33
|
+
this.textcolorCol = '';
|
|
34
|
+
this.valuecolorCol = '';
|
|
35
|
+
this.iconcolorCol = '';
|
|
36
|
+
this.layoutCol = '';
|
|
27
37
|
this.isClickable = false;
|
|
28
38
|
}
|
|
29
39
|
/*-------------------------------------------------*/
|
|
@@ -71,36 +81,36 @@ export class KupCardList {
|
|
|
71
81
|
let decvalueCol, descrCol, iconCol, iconcolorCol, intvalueCol, layoutCol, measureCol, textcolorCol, valueCol, valuecolorCol;
|
|
72
82
|
for (let index = 0; index < this.data.columns.length; index++) {
|
|
73
83
|
const column = this.data.columns[index];
|
|
74
|
-
if (column.
|
|
75
|
-
switch (column.
|
|
76
|
-
case
|
|
84
|
+
if (column.name) {
|
|
85
|
+
switch (column.name) {
|
|
86
|
+
case this.decvalueCol:
|
|
77
87
|
decvalueCol = column;
|
|
78
88
|
break;
|
|
79
|
-
case
|
|
89
|
+
case this.descrCol:
|
|
80
90
|
descrCol = column;
|
|
81
91
|
break;
|
|
82
|
-
case
|
|
92
|
+
case this.iconCol:
|
|
83
93
|
iconCol = column;
|
|
84
94
|
break;
|
|
85
|
-
case
|
|
95
|
+
case this.iconcolorCol:
|
|
86
96
|
iconcolorCol = column;
|
|
87
97
|
break;
|
|
88
|
-
case
|
|
98
|
+
case this.intvalueCol:
|
|
89
99
|
intvalueCol = column;
|
|
90
100
|
break;
|
|
91
|
-
case
|
|
101
|
+
case this.layoutCol:
|
|
92
102
|
layoutCol = column;
|
|
93
103
|
break;
|
|
94
|
-
case
|
|
104
|
+
case this.measureCol:
|
|
95
105
|
measureCol = column;
|
|
96
106
|
break;
|
|
97
|
-
case
|
|
107
|
+
case this.textcolorCol:
|
|
98
108
|
textcolorCol = column;
|
|
99
109
|
break;
|
|
100
|
-
case
|
|
110
|
+
case this.valueCol:
|
|
101
111
|
valueCol = column;
|
|
102
112
|
break;
|
|
103
|
-
case
|
|
113
|
+
case this.valuecolorCol:
|
|
104
114
|
valuecolorCol = column;
|
|
105
115
|
break;
|
|
106
116
|
}
|
|
@@ -343,6 +353,216 @@ export class KupCardList {
|
|
|
343
353
|
"reflect": false,
|
|
344
354
|
"defaultValue": "false"
|
|
345
355
|
},
|
|
356
|
+
"descrCol": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"mutable": false,
|
|
359
|
+
"complexType": {
|
|
360
|
+
"original": "string",
|
|
361
|
+
"resolved": "string",
|
|
362
|
+
"references": {}
|
|
363
|
+
},
|
|
364
|
+
"required": false,
|
|
365
|
+
"optional": false,
|
|
366
|
+
"docs": {
|
|
367
|
+
"tags": [{
|
|
368
|
+
"name": "default",
|
|
369
|
+
"text": "\"\""
|
|
370
|
+
}],
|
|
371
|
+
"text": "Sets the description column."
|
|
372
|
+
},
|
|
373
|
+
"attribute": "descr-col",
|
|
374
|
+
"reflect": false,
|
|
375
|
+
"defaultValue": "''"
|
|
376
|
+
},
|
|
377
|
+
"iconCol": {
|
|
378
|
+
"type": "string",
|
|
379
|
+
"mutable": false,
|
|
380
|
+
"complexType": {
|
|
381
|
+
"original": "string",
|
|
382
|
+
"resolved": "string",
|
|
383
|
+
"references": {}
|
|
384
|
+
},
|
|
385
|
+
"required": false,
|
|
386
|
+
"optional": false,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [{
|
|
389
|
+
"name": "default",
|
|
390
|
+
"text": "\"\""
|
|
391
|
+
}],
|
|
392
|
+
"text": "Sets the icon column."
|
|
393
|
+
},
|
|
394
|
+
"attribute": "icon-col",
|
|
395
|
+
"reflect": false,
|
|
396
|
+
"defaultValue": "''"
|
|
397
|
+
},
|
|
398
|
+
"valueCol": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"mutable": false,
|
|
401
|
+
"complexType": {
|
|
402
|
+
"original": "string",
|
|
403
|
+
"resolved": "string",
|
|
404
|
+
"references": {}
|
|
405
|
+
},
|
|
406
|
+
"required": false,
|
|
407
|
+
"optional": false,
|
|
408
|
+
"docs": {
|
|
409
|
+
"tags": [{
|
|
410
|
+
"name": "default",
|
|
411
|
+
"text": "\"\""
|
|
412
|
+
}],
|
|
413
|
+
"text": "Sets the value column."
|
|
414
|
+
},
|
|
415
|
+
"attribute": "value-col",
|
|
416
|
+
"reflect": false,
|
|
417
|
+
"defaultValue": "''"
|
|
418
|
+
},
|
|
419
|
+
"measureCol": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"mutable": false,
|
|
422
|
+
"complexType": {
|
|
423
|
+
"original": "string",
|
|
424
|
+
"resolved": "string",
|
|
425
|
+
"references": {}
|
|
426
|
+
},
|
|
427
|
+
"required": false,
|
|
428
|
+
"optional": false,
|
|
429
|
+
"docs": {
|
|
430
|
+
"tags": [{
|
|
431
|
+
"name": "default",
|
|
432
|
+
"text": "\"\""
|
|
433
|
+
}],
|
|
434
|
+
"text": "Sets the unit of measure column."
|
|
435
|
+
},
|
|
436
|
+
"attribute": "measure-col",
|
|
437
|
+
"reflect": false,
|
|
438
|
+
"defaultValue": "''"
|
|
439
|
+
},
|
|
440
|
+
"intvalueCol": {
|
|
441
|
+
"type": "string",
|
|
442
|
+
"mutable": false,
|
|
443
|
+
"complexType": {
|
|
444
|
+
"original": "string",
|
|
445
|
+
"resolved": "string",
|
|
446
|
+
"references": {}
|
|
447
|
+
},
|
|
448
|
+
"required": false,
|
|
449
|
+
"optional": false,
|
|
450
|
+
"docs": {
|
|
451
|
+
"tags": [{
|
|
452
|
+
"name": "default",
|
|
453
|
+
"text": "\"\""
|
|
454
|
+
}],
|
|
455
|
+
"text": "Sets the integer value column."
|
|
456
|
+
},
|
|
457
|
+
"attribute": "intvalue-col",
|
|
458
|
+
"reflect": false,
|
|
459
|
+
"defaultValue": "''"
|
|
460
|
+
},
|
|
461
|
+
"decvalueCol": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"mutable": false,
|
|
464
|
+
"complexType": {
|
|
465
|
+
"original": "string",
|
|
466
|
+
"resolved": "string",
|
|
467
|
+
"references": {}
|
|
468
|
+
},
|
|
469
|
+
"required": false,
|
|
470
|
+
"optional": false,
|
|
471
|
+
"docs": {
|
|
472
|
+
"tags": [{
|
|
473
|
+
"name": "default",
|
|
474
|
+
"text": "\"\""
|
|
475
|
+
}],
|
|
476
|
+
"text": "Sets the decimal value column."
|
|
477
|
+
},
|
|
478
|
+
"attribute": "decvalue-col",
|
|
479
|
+
"reflect": false,
|
|
480
|
+
"defaultValue": "''"
|
|
481
|
+
},
|
|
482
|
+
"textcolorCol": {
|
|
483
|
+
"type": "string",
|
|
484
|
+
"mutable": false,
|
|
485
|
+
"complexType": {
|
|
486
|
+
"original": "string",
|
|
487
|
+
"resolved": "string",
|
|
488
|
+
"references": {}
|
|
489
|
+
},
|
|
490
|
+
"required": false,
|
|
491
|
+
"optional": false,
|
|
492
|
+
"docs": {
|
|
493
|
+
"tags": [{
|
|
494
|
+
"name": "default",
|
|
495
|
+
"text": "\"\""
|
|
496
|
+
}],
|
|
497
|
+
"text": "Sets the text color column."
|
|
498
|
+
},
|
|
499
|
+
"attribute": "textcolor-col",
|
|
500
|
+
"reflect": false,
|
|
501
|
+
"defaultValue": "''"
|
|
502
|
+
},
|
|
503
|
+
"valuecolorCol": {
|
|
504
|
+
"type": "string",
|
|
505
|
+
"mutable": false,
|
|
506
|
+
"complexType": {
|
|
507
|
+
"original": "string",
|
|
508
|
+
"resolved": "string",
|
|
509
|
+
"references": {}
|
|
510
|
+
},
|
|
511
|
+
"required": false,
|
|
512
|
+
"optional": false,
|
|
513
|
+
"docs": {
|
|
514
|
+
"tags": [{
|
|
515
|
+
"name": "default",
|
|
516
|
+
"text": "\"\""
|
|
517
|
+
}],
|
|
518
|
+
"text": "Sets the value color column."
|
|
519
|
+
},
|
|
520
|
+
"attribute": "valuecolor-col",
|
|
521
|
+
"reflect": false,
|
|
522
|
+
"defaultValue": "''"
|
|
523
|
+
},
|
|
524
|
+
"iconcolorCol": {
|
|
525
|
+
"type": "string",
|
|
526
|
+
"mutable": false,
|
|
527
|
+
"complexType": {
|
|
528
|
+
"original": "string",
|
|
529
|
+
"resolved": "string",
|
|
530
|
+
"references": {}
|
|
531
|
+
},
|
|
532
|
+
"required": false,
|
|
533
|
+
"optional": false,
|
|
534
|
+
"docs": {
|
|
535
|
+
"tags": [{
|
|
536
|
+
"name": "default",
|
|
537
|
+
"text": "\"\""
|
|
538
|
+
}],
|
|
539
|
+
"text": "Sets the icon color column."
|
|
540
|
+
},
|
|
541
|
+
"attribute": "iconcolor-col",
|
|
542
|
+
"reflect": false,
|
|
543
|
+
"defaultValue": "''"
|
|
544
|
+
},
|
|
545
|
+
"layoutCol": {
|
|
546
|
+
"type": "string",
|
|
547
|
+
"mutable": false,
|
|
548
|
+
"complexType": {
|
|
549
|
+
"original": "string",
|
|
550
|
+
"resolved": "string",
|
|
551
|
+
"references": {}
|
|
552
|
+
},
|
|
553
|
+
"required": false,
|
|
554
|
+
"optional": false,
|
|
555
|
+
"docs": {
|
|
556
|
+
"tags": [{
|
|
557
|
+
"name": "default",
|
|
558
|
+
"text": "\"\""
|
|
559
|
+
}],
|
|
560
|
+
"text": "Sets the layout column."
|
|
561
|
+
},
|
|
562
|
+
"attribute": "layout-col",
|
|
563
|
+
"reflect": false,
|
|
564
|
+
"defaultValue": "''"
|
|
565
|
+
},
|
|
346
566
|
"isClickable": {
|
|
347
567
|
"type": "boolean",
|
|
348
568
|
"mutable": false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SortMode, TotalMode, } from "./kup-data-table-declarations";
|
|
2
2
|
import { getCellValueForDisplay, getColumnByName, compareCell, } from "../../utils/cell-utils";
|
|
3
3
|
import { FiltersRows } from "../../utils/filters/filters-rows";
|
|
4
|
-
import { KupDatesFormats } from "../../managers/kup-dates/kup-dates-declarations";
|
|
4
|
+
import { KupDatesFormats, } from "../../managers/kup-dates/kup-dates-declarations";
|
|
5
5
|
const dom = document.documentElement;
|
|
6
6
|
export function sortRows(rows = [], sort = []) {
|
|
7
7
|
if (!rows || rows.length === 0) {
|
|
@@ -233,19 +233,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
233
233
|
return;
|
|
234
234
|
}
|
|
235
235
|
keys.forEach((key) => {
|
|
236
|
-
const currentTotalValue = dom.ketchup.math.numberify(groupRow.group.totals[key] || 0);
|
|
237
236
|
const cell = addedRow.cells[key];
|
|
238
237
|
if (cell) {
|
|
239
|
-
|
|
238
|
+
const _isNumber = dom.ketchup.objects.isNumber(cell.obj);
|
|
240
239
|
const totalMode = totals[key];
|
|
241
240
|
switch (totalMode) {
|
|
242
241
|
case TotalMode.COUNT:
|
|
243
|
-
groupRow.group.totals[key]
|
|
242
|
+
let currentTotalValue = groupRow.group.totals[key] || 0;
|
|
243
|
+
groupRow.group.totals[key] = ++currentTotalValue;
|
|
244
244
|
// updating parents
|
|
245
245
|
let parent = groupRow.group.parent;
|
|
246
246
|
while (parent != null) {
|
|
247
|
-
|
|
248
|
-
parent.group.totals[key] = currentParentCount
|
|
247
|
+
let currentParentCount = parent.group.totals[key] || 0;
|
|
248
|
+
parent.group.totals[key] = ++currentParentCount;
|
|
249
249
|
parent = parent.group.parent;
|
|
250
250
|
}
|
|
251
251
|
break;
|
|
@@ -303,8 +303,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
303
303
|
break;
|
|
304
304
|
case TotalMode.SUM:
|
|
305
305
|
case TotalMode.AVERAGE:
|
|
306
|
-
if (_isNumber) {
|
|
306
|
+
if (_isNumber && cell.value) {
|
|
307
307
|
const cellValue = dom.ketchup.math.numberify(dom.ketchup.math.numberifySafe(cell.value));
|
|
308
|
+
const currentTotalValue = groupRow.group.totals[key] || 0;
|
|
308
309
|
groupRow.group.totals[key] =
|
|
309
310
|
cellValue + currentTotalValue;
|
|
310
311
|
// updating parents
|
|
@@ -319,11 +320,11 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
319
320
|
break;
|
|
320
321
|
// TODO DRY the MIN and MAX functions
|
|
321
322
|
case TotalMode.MIN:
|
|
322
|
-
if (_isNumber) {
|
|
323
|
-
const
|
|
323
|
+
if (_isNumber && cell.value) {
|
|
324
|
+
const currentMinValue = groupRow.group.totals[key];
|
|
324
325
|
const cellValue = dom.ketchup.math.numberify(dom.ketchup.math.numberifySafe(cell.value));
|
|
325
|
-
if (
|
|
326
|
-
groupRow.group.totals[key] = Math.min(
|
|
326
|
+
if (currentMinValue) {
|
|
327
|
+
groupRow.group.totals[key] = Math.min(currentMinValue, cellValue);
|
|
327
328
|
}
|
|
328
329
|
else {
|
|
329
330
|
// first round
|
|
@@ -343,22 +344,21 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
343
344
|
parent = parent.group.parent;
|
|
344
345
|
}
|
|
345
346
|
}
|
|
346
|
-
else if (
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
const currentTotalValue = groupRow.group.totals[key];
|
|
353
|
-
if (currentTotalValue) {
|
|
347
|
+
else if (cell.value &&
|
|
348
|
+
dom.ketchup.objects.isDate(cell.obj)) {
|
|
349
|
+
const cellValue = dom.ketchup.dates.toDayjs(cell.value);
|
|
350
|
+
if (dom.ketchup.dates.isValid(cellValue)) {
|
|
351
|
+
const currentMinValue = groupRow.group.totals[key];
|
|
352
|
+
if (currentMinValue) {
|
|
354
353
|
let moments = [];
|
|
355
354
|
moments.push(cellValue);
|
|
356
|
-
moments.push(dom.ketchup.dates.
|
|
355
|
+
moments.push(dom.ketchup.dates.toDayjs(currentMinValue));
|
|
357
356
|
groupRow.group.totals[key] =
|
|
358
|
-
dom.ketchup.dates.format(dom.ketchup.dates.min(moments));
|
|
357
|
+
dom.ketchup.dates.format(dom.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
|
|
359
358
|
}
|
|
360
359
|
else {
|
|
361
|
-
groupRow.group.totals[key] =
|
|
360
|
+
groupRow.group.totals[key] =
|
|
361
|
+
dom.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
362
362
|
}
|
|
363
363
|
// updating parents
|
|
364
364
|
let parent = groupRow.group.parent;
|
|
@@ -367,13 +367,14 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
367
367
|
if (currentParentMin) {
|
|
368
368
|
let moments = [];
|
|
369
369
|
moments.push(cellValue);
|
|
370
|
-
moments.push(dom.ketchup.dates.
|
|
370
|
+
moments.push(dom.ketchup.dates.toDayjs(currentParentMin));
|
|
371
371
|
parent.group.totals[key] =
|
|
372
|
-
dom.ketchup.dates.format(dom.ketchup.dates.min(moments));
|
|
372
|
+
dom.ketchup.dates.format(dom.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
|
|
373
373
|
}
|
|
374
374
|
else {
|
|
375
375
|
// first round
|
|
376
|
-
parent.group.totals[key] =
|
|
376
|
+
parent.group.totals[key] =
|
|
377
|
+
dom.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
377
378
|
}
|
|
378
379
|
parent = parent.group.parent;
|
|
379
380
|
}
|
|
@@ -382,11 +383,11 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
382
383
|
break;
|
|
383
384
|
// TODO DRY the MIN and MAX functions
|
|
384
385
|
case TotalMode.MAX:
|
|
385
|
-
if (_isNumber) {
|
|
386
|
-
const
|
|
386
|
+
if (_isNumber && cell.value) {
|
|
387
|
+
const currentMaxValue = groupRow.group.totals[key];
|
|
387
388
|
const cellValue = dom.ketchup.math.numberify(dom.ketchup.math.numberifySafe(cell.value));
|
|
388
|
-
if (
|
|
389
|
-
groupRow.group.totals[key] = Math.max(
|
|
389
|
+
if (currentMaxValue) {
|
|
390
|
+
groupRow.group.totals[key] = Math.max(currentMaxValue, cellValue);
|
|
390
391
|
}
|
|
391
392
|
else {
|
|
392
393
|
// first round
|
|
@@ -406,37 +407,37 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
406
407
|
parent = parent.group.parent;
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
|
-
else if (
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
const currentTotalValue = groupRow.group.totals[key];
|
|
416
|
-
if (currentTotalValue) {
|
|
410
|
+
else if (cell.value &&
|
|
411
|
+
dom.ketchup.objects.isDate(cell.obj)) {
|
|
412
|
+
const cellValue = dom.ketchup.dates.toDayjs(cell.value);
|
|
413
|
+
if (dom.ketchup.dates.isValid(cellValue)) {
|
|
414
|
+
const currentMaxValue = groupRow.group.totals[key];
|
|
415
|
+
if (currentMaxValue) {
|
|
417
416
|
let moments = [];
|
|
418
417
|
moments.push(cellValue);
|
|
419
|
-
moments.push(dom.ketchup.dates.
|
|
418
|
+
moments.push(dom.ketchup.dates.toDayjs(currentMaxValue));
|
|
420
419
|
groupRow.group.totals[key] =
|
|
421
|
-
dom.ketchup.dates.format(dom.ketchup.dates.max(moments));
|
|
420
|
+
dom.ketchup.dates.format(dom.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
|
|
422
421
|
}
|
|
423
422
|
else {
|
|
424
|
-
groupRow.group.totals[key] =
|
|
423
|
+
groupRow.group.totals[key] =
|
|
424
|
+
dom.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
425
425
|
}
|
|
426
426
|
// updating parents
|
|
427
427
|
let parent = groupRow.group.parent;
|
|
428
428
|
while (parent != null) {
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
429
|
+
const currentParentMax = parent.group.totals[key];
|
|
430
|
+
if (currentParentMax) {
|
|
431
431
|
let moments = [];
|
|
432
432
|
moments.push(cellValue);
|
|
433
|
-
moments.push(dom.ketchup.dates.
|
|
433
|
+
moments.push(dom.ketchup.dates.toDayjs(currentParentMax));
|
|
434
434
|
parent.group.totals[key] =
|
|
435
|
-
dom.ketchup.dates.format(dom.ketchup.dates.max(moments));
|
|
435
|
+
dom.ketchup.dates.format(dom.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
|
|
436
436
|
}
|
|
437
437
|
else {
|
|
438
438
|
// first round
|
|
439
|
-
parent.group.totals[key] =
|
|
439
|
+
parent.group.totals[key] =
|
|
440
|
+
dom.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
440
441
|
}
|
|
441
442
|
parent = parent.group.parent;
|
|
442
443
|
}
|
|
@@ -525,9 +526,7 @@ function adjustGroupAverageOrFormula(row, type, toAdjustKeys, totals) {
|
|
|
525
526
|
// adjust average/formulas
|
|
526
527
|
toAdjustKeys.forEach((key) => {
|
|
527
528
|
if (type == TotalMode.AVERAGE) {
|
|
528
|
-
row.group.totals[key] =
|
|
529
|
-
dom.ketchup.math.numberify(row.group.totals[key]) /
|
|
530
|
-
numberOfLeaf;
|
|
529
|
+
row.group.totals[key] = row.group.totals[key] / numberOfLeaf;
|
|
531
530
|
}
|
|
532
531
|
if (type == TotalMode.MATH) {
|
|
533
532
|
let formula = totals[key].substring(TotalMode.MATH.length);
|
|
@@ -14,7 +14,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
14
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
15
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
16
|
};
|
|
17
|
-
var _KupDataTable_instances, _KupDataTable_initialized, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_insertCount, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_switchToTotalsMatrix, _KupDataTable_setObjForTotalsMatrix, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_setDynPosElements, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_clickHandler, _KupDataTable_contextMenuHandler, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onDefaultRowActionClick, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_renderActions, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderTotalsMatrix, _KupDataTable_renderGridPanel;
|
|
17
|
+
var _KupDataTable_instances, _KupDataTable_initialized, _KupDataTable_rows, _KupDataTable_rowsLength, _KupDataTable_paginatedRows, _KupDataTable_paginatedRowsLength, _KupDataTable_footer, _KupDataTable_kupManager, _KupDataTable_renderedRows, _KupDataTable_loadMoreEventCounter, _KupDataTable_loadMoreEventPreviousQuantity, _KupDataTable_theadRef, _KupDataTable_tableRef, _KupDataTable_originalData, _KupDataTable_tableAreaRef, _KupDataTable_stickyTheadRef, _KupDataTable_customizeTopButtonRef, _KupDataTable_customizeTopPanelRef, _KupDataTable_sizedColumns, _KupDataTable_intObserver, _KupDataTable_navBarHeight, _KupDataTable_theadIntersecting, _KupDataTable_tableIntersecting, _KupDataTable_isSafariBrowser, _KupDataTable_isRestoringState, _KupDataTable_globalFilterTimeout, _KupDataTable_totalMenuCoords, _KupDataTable_clickTimeout, _KupDataTable_thRefs, _KupDataTable_rowsRefs, _KupDataTable_oldWidth, _KupDataTable_hold, _KupDataTable_interactableDrag, _KupDataTable_interactableDrop, _KupDataTable_interactableResize, _KupDataTable_interactableTouch, _KupDataTable_dropareaRef, _KupDataTable_removeDropareaRef, _KupDataTable_groupsDropareaRef, _KupDataTable_clickCb, _KupDataTable_clickCbCustomPanel, _KupDataTable_clickCbDropCard, _KupDataTable_resizeTimeout, _KupDataTable_columnMenuInstance, _KupDataTable_filtersColumnMenuInstance, _KupDataTable_filtersRowsInstance, _KupDataTable_detailCard, _KupDataTable_insertCard, _KupDataTable_confirmDeleteCard, _KupDataTable_confirmDeleteDialog, _KupDataTable_columnMenuCard, _KupDataTable_columnDropCard, _KupDataTable_columnDropCardAnchor, _KupDataTable_insertCount, _KupDataTable_BUTTON_CANCEL_ID, _KupDataTable_BUTTON_SUBMIT_ID, _KupDataTable_FIELDS_FORM_ID, _KupDataTable_MESSAGE_ID, _KupDataTable_MESSAGE_WRAPPER_ID, _KupDataTable_INSERT_PREFIX, _KupDataTable_closeDropCard, _KupDataTable_createDropCard, _KupDataTable_calculateData, _KupDataTable_getRow, _KupDataTable__getRow, _KupDataTable_getTransposedData, _KupDataTable_setTransposedData, _KupDataTable_switchToTotalsMatrix, _KupDataTable_setObjForTotalsMatrix, _KupDataTable_stickyHeaderPosition, _KupDataTable_updateStickyHeaderSize, _KupDataTable_setObserver, _KupDataTable_didLoadInteractables, _KupDataTable_didRenderInteractables, _KupDataTable_didLoadObservers, _KupDataTable_didRenderObservers, _KupDataTable_didLoadEventHandling, _KupDataTable_scrollStickyHeader, _KupDataTable_checkScrollOnHover, _KupDataTable_customizePanelPosition, _KupDataTable_rowsPointLength, _KupDataTable_paginatedRowsPointLength, _KupDataTable__rowsLength, _KupDataTable_setDynPosElements, _KupDataTable_resetSelectedRows, _KupDataTable_getSizedColumns, _KupDataTable_rowDetail, _KupDataTable_rowInsertForm, _KupDataTable_rowsDelete, _KupDataTable_getEventDetails, _KupDataTable_clickHandler, _KupDataTable_contextMenuHandler, _KupDataTable_dblClickHandler, _KupDataTable_initRows, _KupDataTable_filterRows, _KupDataTable_isGrouping, _KupDataTable_hasRowActions, _KupDataTable_removeGroup, _KupDataTable_hasTotals, _KupDataTable_tableHasAutoWidth, _KupDataTable_forceGroupExpansion, _KupDataTable_forceRowGroupExpansion, _KupDataTable_adjustPaginator, _KupDataTable_composeFixedCellStyleAndClass, _KupDataTable_updateFixedRowsAndColumnsCssVariables, _KupDataTable_onColumnSort, _KupDataTable_onRemoveFilter, _KupDataTable_getFilterValueForTooltip, _KupDataTable_onGlobalFilterChange, _KupDataTable_handlePageChange, _KupDataTable_handleRowsPerPageChange, _KupDataTable_onRowClick, _KupDataTable_selectColumn, _KupDataTable_deselectColumn, _KupDataTable_onDefaultRowActionClick, _KupDataTable_onRowActionExpanderClick, _KupDataTable_handleRowSelect, _KupDataTable_onRowExpand, _KupDataTable_onSelectAll, _KupDataTable_openTotalMenu, _KupDataTable_closeTotalMenu, _KupDataTable_isOpenedTotalMenuForColumn, _KupDataTable_groupRows, _KupDataTable_onLoadMoreClick, _KupDataTable_adjustGroupState, _KupDataTable_adjustGroupStateFromRow, _KupDataTable_sortRows, _KupDataTable_getSortIcon, _KupDataTable_getSortDecode, _KupDataTable_calculateColspan, _KupDataTable_isGroupExpanded, _KupDataTable_handleColumnSort, _KupDataTable_moveSortedColumns, _KupDataTable_applyLineBreaks, _KupDataTable_composeHeaderCellClassAndStyle, _KupDataTable_renderHeader, _KupDataTable_renderStickyHeader, _KupDataTable_totalMenuPosition, _KupDataTable_onTotalMenuOpen, _KupDataTable_renderRow, _KupDataTable_renderActions, _KupDataTable_onCustomSettingsClick, _KupDataTable_openCustomSettings, _KupDataTable_closeCustomSettings, _KupDataTable_renderPaginator, _KupDataTable_columnRemoveArea, _KupDataTable_columnGroupArea, _KupDataTable_hideShowColumnDropArea, _KupDataTable_handleColumnGroup, _KupDataTable_transcodeItem, _KupDataTable_createListData, _KupDataTable_FONTSIZE_CODES, _KupDataTable_FONTSIZE_DECODES, _KupDataTable_FONTSIZE_ICONS, _KupDataTable_getFontSizeCodeFromDecode, _KupDataTable_renderFontSizePanel, _KupDataTable_DENSITY_DECODES, _KupDataTable_DENSITY_ICONS, _KupDataTable_getDensityCodeFromDecode, _KupDataTable_renderDensityPanel, _KupDataTable_GRID_CODES, _KupDataTable_GRID_DECODES, _KupDataTable_GRID_ICONS, _KupDataTable_getGridCodeFromDecode, _KupDataTable_renderTransposeSwitch, _KupDataTable_renderTotalsMatrix, _KupDataTable_renderGridPanel;
|
|
18
18
|
import { forceUpdate, h, Host, } from "@stencil/core";
|
|
19
19
|
import { FixedCellsClasses, FixedCellsCSSVarsBase, GroupLabelDisplayMode, LoadMoreMode, PaginatorPos, ShowGrid, SortMode, TotalMode, TotalLabel, KupDataTableProps, fieldColumn, iconColumn, keyColumn, SelectionMode, } from "./kup-data-table-declarations";
|
|
20
20
|
import { getColumnByName } from "../../utils/cell-utils";
|
|
@@ -743,7 +743,10 @@ export class KupDataTable {
|
|
|
743
743
|
this.selectedRows = [];
|
|
744
744
|
for (let index = 0; index < rowsIdentifiers.length; index++) {
|
|
745
745
|
const id = rowsIdentifiers[index];
|
|
746
|
-
|
|
746
|
+
const row = __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_getRow).call(this, id);
|
|
747
|
+
if (row) {
|
|
748
|
+
this.selectedRows.push(row);
|
|
749
|
+
}
|
|
747
750
|
}
|
|
748
751
|
if (emitEvent !== false) {
|
|
749
752
|
this.kupRowSelected.emit({
|
|
@@ -1033,7 +1036,7 @@ export class KupDataTable {
|
|
|
1033
1036
|
});
|
|
1034
1037
|
}
|
|
1035
1038
|
if (this.totals) {
|
|
1036
|
-
const selectedItem = listData.find((item) => item.
|
|
1039
|
+
const selectedItem = listData.find((item) => item.id === this.totals[column.name]);
|
|
1037
1040
|
if (selectedItem) {
|
|
1038
1041
|
selectedItem.selected = true;
|
|
1039
1042
|
listData.push({
|
|
@@ -1237,8 +1240,12 @@ export class KupDataTable {
|
|
|
1237
1240
|
for (let index = 0; index < this.data.columns.length; index++) {
|
|
1238
1241
|
const column = this.data.columns[index];
|
|
1239
1242
|
cells[column.name] = {
|
|
1240
|
-
data: column.cellData
|
|
1241
|
-
|
|
1243
|
+
data: column.cellData
|
|
1244
|
+
? JSON.parse(JSON.stringify(column.cellData))
|
|
1245
|
+
: undefined,
|
|
1246
|
+
slotData: column.cellSlotData
|
|
1247
|
+
? JSON.parse(JSON.stringify(column.cellSlotData))
|
|
1248
|
+
: undefined,
|
|
1242
1249
|
isEditable: column.isKey ||
|
|
1243
1250
|
column.isEditable,
|
|
1244
1251
|
obj: Object.assign({}, column.obj),
|
|
@@ -3501,27 +3508,34 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
3501
3508
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
|
|
3502
3509
|
}
|
|
3503
3510
|
}, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
|
|
3504
|
-
let row = null;
|
|
3505
|
-
const search = (rows) => {
|
|
3506
|
-
if (rows && rows.length > 0 && !row) {
|
|
3507
|
-
test(rows);
|
|
3508
|
-
}
|
|
3509
|
-
};
|
|
3510
|
-
const test = (rows) => {
|
|
3511
|
-
if (typeof id === 'number') {
|
|
3512
|
-
row = rows[id];
|
|
3513
|
-
}
|
|
3514
|
-
else {
|
|
3515
|
-
row = rows.find((row) => row.id === id);
|
|
3516
|
-
}
|
|
3517
|
-
};
|
|
3518
3511
|
if (__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
|
|
3519
|
-
__classPrivateFieldGet(this,
|
|
3512
|
+
return __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable__getRow).call(this, id, __classPrivateFieldGet(this, _KupDataTable_paginatedRows, "f"));
|
|
3513
|
+
}
|
|
3514
|
+
else {
|
|
3515
|
+
return __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable__getRow).call(this, id, __classPrivateFieldGet(this, _KupDataTable_rows, "f"));
|
|
3516
|
+
}
|
|
3517
|
+
}, _KupDataTable__getRow = function _KupDataTable__getRow(id, rows) {
|
|
3518
|
+
if (!rows || rows.length == 0) {
|
|
3519
|
+
return null;
|
|
3520
|
+
}
|
|
3521
|
+
if (typeof id === 'number') {
|
|
3522
|
+
return rows[id];
|
|
3520
3523
|
}
|
|
3521
3524
|
else {
|
|
3522
|
-
|
|
3525
|
+
for (let i = 0; i < rows.length; i++) {
|
|
3526
|
+
let r = rows[i];
|
|
3527
|
+
if (r.id === id) {
|
|
3528
|
+
return r;
|
|
3529
|
+
}
|
|
3530
|
+
if (r.group) {
|
|
3531
|
+
r = __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable__getRow).call(this, id, r.group.children);
|
|
3532
|
+
if (r) {
|
|
3533
|
+
return r;
|
|
3534
|
+
}
|
|
3535
|
+
}
|
|
3536
|
+
}
|
|
3523
3537
|
}
|
|
3524
|
-
return
|
|
3538
|
+
return null;
|
|
3525
3539
|
}, _KupDataTable_getTransposedData = function _KupDataTable_getTransposedData(column) {
|
|
3526
3540
|
if (column) {
|
|
3527
3541
|
this.filters = {};
|