@sme.up/ketchup 8.3.3 → 9.1.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/{component-24811409.js → component-cb3b32f5.js} +7 -2
- package/dist/cjs/{f-button-7687085a.js → f-button-733664a5.js} +2 -2
- package/dist/cjs/{f-cell-37ef6f00.js → f-cell-f37757a6.js} +201 -22
- package/dist/cjs/{f-checkbox-758d1d34.js → f-checkbox-556771e8.js} +1 -1
- package/dist/cjs/{f-chip-cf59bdb3.js → f-chip-3349d130.js} +3 -3
- package/dist/cjs/{f-image-1245b0cf.js → f-image-b7a5816b.js} +2 -2
- package/dist/cjs/{f-paginator-utils-b1af2a8f.js → f-paginator-utils-1fe1df76.js} +49 -50
- package/dist/cjs/{f-text-field-9c745112.js → f-text-field-8557fc3f.js} +38 -4
- package/dist/cjs/{f-text-field-mdc-b1fa6fd6.js → f-text-field-mdc-4fda9705.js} +1 -1
- package/dist/cjs/{index-eac07680.js → index-4b3a5567.js} +134 -26
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_27.cjs.entry.js +295 -338
- package/dist/cjs/kup-box.cjs.entry.js +25 -17
- package/dist/cjs/kup-calendar.cjs.entry.js +6 -6
- package/dist/cjs/kup-card-list.cjs.entry.js +244 -0
- package/dist/cjs/kup-cell.cjs.entry.js +9 -7
- package/dist/cjs/kup-dashboard.cjs.entry.js +8 -8
- package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
- package/dist/cjs/kup-echart.cjs.entry.js +4579 -4431
- package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
- package/dist/cjs/kup-grid.cjs.entry.js +109 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
- package/dist/cjs/kup-image-list.cjs.entry.js +9 -9
- 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-38caaef3.js → kup-manager-cb73c128.js} +64 -14
- package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
- package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
- package/dist/cjs/kup-planner.cjs.entry.js +5 -5
- 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 +709 -0
- package/dist/collection/assets/data-table-performance.js +6 -0
- package/dist/collection/assets/data-table.js +44 -0
- package/dist/collection/assets/image-list.js +2 -12
- package/dist/collection/assets/index.js +8 -4
- package/dist/collection/assets/progress-bar.js +0 -0
- package/dist/collection/assets/radio.js +30 -0
- package/dist/collection/collection-manifest.json +3 -4
- package/dist/collection/components/kup-box/kup-box.js +14 -6
- package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -1
- package/dist/collection/components/kup-card/kup-card.css +34 -7
- package/dist/collection/components/kup-card/kup-card.js +25 -22
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +45 -54
- 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 +13 -0
- package/dist/collection/components/kup-card-list/kup-card-list.css +34 -0
- package/dist/collection/components/kup-card-list/kup-card-list.js +481 -0
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +47 -48
- package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +36 -22
- package/dist/collection/components/kup-echart/kup-echart.js +0 -2
- package/dist/collection/components/kup-grid/kup-grid.css +10 -0
- 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 +2 -0
- package/dist/collection/f-components/f-cell/f-cell.js +38 -17
- 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/managers/kup-data/kup-data.js +2 -0
- package/dist/collection/managers/kup-math/kup-math.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/types/GenericTypes.js +1 -2
- package/dist/collection/utils/cell-utils.js +6 -7
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/kup-accordion.js +2 -0
- package/dist/components/kup-autocomplete2.js +1555 -1387
- package/dist/components/kup-box2.js +24 -6
- package/dist/components/kup-calendar.js +4 -1
- package/dist/components/{kup-dash-list.d.ts → kup-card-list.d.ts} +4 -4
- package/dist/components/kup-card-list.js +408 -0
- package/dist/components/kup-cell.js +1 -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 +3 -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-dropdown-button.js +1 -1
- package/dist/components/kup-echart2.js +4578 -4430
- package/dist/components/kup-family-tree.js +1 -1
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid2.js +1 -1
- package/dist/components/kup-image-list.js +3 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-planner.js +3 -1
- package/dist/esm/{component-cc25b031.js → component-879e99bf.js} +7 -2
- package/dist/esm/{f-button-e54ce8d5.js → f-button-f247ce10.js} +2 -2
- package/dist/esm/{f-cell-4149a05d.js → f-cell-ba94f1b3.js} +199 -23
- package/dist/esm/{f-checkbox-7b113dd8.js → f-checkbox-cbf7b3de.js} +1 -1
- package/dist/esm/{f-chip-c3c86f7b.js → f-chip-104c4a64.js} +3 -3
- package/dist/esm/{f-image-adceee49.js → f-image-d2a9603c.js} +2 -2
- package/dist/esm/{f-paginator-utils-e559dac8.js → f-paginator-utils-743522fa.js} +49 -50
- package/dist/esm/{f-text-field-aa4497a8.js → f-text-field-4d91ccfc.js} +38 -4
- package/dist/esm/{f-text-field-mdc-32a1ffd9.js → f-text-field-mdc-1143cf21.js} +1 -1
- package/dist/esm/{index-d413187a.js → index-c161a33e.js} +134 -26
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_27.entry.js +295 -338
- package/dist/esm/kup-box.entry.js +25 -17
- package/dist/esm/kup-calendar.entry.js +6 -6
- package/dist/esm/kup-card-list.entry.js +240 -0
- package/dist/esm/kup-cell.entry.js +9 -7
- package/dist/esm/kup-dashboard.entry.js +8 -8
- package/dist/esm/kup-drawer.entry.js +2 -2
- package/dist/esm/kup-echart.entry.js +4579 -4431
- package/dist/esm/kup-family-tree.entry.js +4 -4
- package/dist/esm/kup-grid.entry.js +105 -0
- package/dist/esm/kup-iframe.entry.js +2 -2
- package/dist/esm/kup-image-list.entry.js +9 -9
- package/dist/esm/kup-lazy.entry.js +2 -2
- package/dist/esm/kup-magic-box.entry.js +3 -3
- package/dist/esm/{kup-manager-a4153fb2.js → kup-manager-94b3d177.js} +64 -14
- package/dist/esm/kup-nav-bar.entry.js +2 -2
- package/dist/esm/kup-numeric-picker.entry.js +5 -5
- package/dist/esm/kup-photo-frame.entry.js +2 -2
- package/dist/esm/kup-planner.entry.js +5 -5
- 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/ketchup.esm.js +1 -1
- package/dist/ketchup/p-12e47371.js +1 -0
- package/dist/ketchup/{p-3c44e838.entry.js → p-15548f51.entry.js} +1 -1
- package/dist/ketchup/p-20e8ab84.js +2 -0
- package/dist/ketchup/{p-2739b7ac.entry.js → p-21f1b22a.entry.js} +1 -1
- package/dist/ketchup/{p-e76b646c.js → p-2c47b88f.js} +3 -3
- package/dist/ketchup/{p-23d54fb2.entry.js → p-304f296e.entry.js} +1 -1
- package/dist/ketchup/p-48f8b0d5.entry.js +9 -0
- package/dist/ketchup/p-4ca502ce.entry.js +1 -0
- package/dist/ketchup/{p-698442ed.js → p-4d7c02f4.js} +1 -1
- package/dist/ketchup/{p-3d671241.entry.js → p-5abbf31b.entry.js} +1 -1
- package/dist/ketchup/{p-44b5c573.entry.js → p-5c9b10a5.entry.js} +1 -1
- package/dist/ketchup/{p-b415fe84.entry.js → p-5cb2dbf3.entry.js} +1 -1
- package/dist/ketchup/p-679ccbf8.js +1 -0
- package/dist/ketchup/p-6a0ac578.entry.js +1 -0
- package/dist/ketchup/{p-f3c8c1da.entry.js → p-87e13738.entry.js} +1 -1
- package/dist/ketchup/p-8e5db599.entry.js +1 -0
- package/dist/ketchup/{p-c0878519.entry.js → p-a14ede8c.entry.js} +1 -1
- package/dist/ketchup/{p-2f0798d3.js → p-a2007880.js} +1 -1
- package/dist/ketchup/p-a2b75445.entry.js +39 -0
- package/dist/ketchup/{p-47752f3b.js → p-b0678a34.js} +1 -1
- package/dist/ketchup/{p-7360a410.js → p-ba003975.js} +1 -1
- package/dist/ketchup/{p-d817be2a.js → p-bb80719e.js} +1 -1
- package/dist/ketchup/{p-c39ddeae.entry.js → p-bf41d71f.entry.js} +1 -1
- package/dist/ketchup/p-c32e8755.entry.js +1 -0
- package/dist/ketchup/p-c4b1bde1.entry.js +1 -0
- package/dist/ketchup/p-c6b58be6.entry.js +1 -0
- package/dist/ketchup/{p-6d9ffb32.js → p-cd2af1a6.js} +1 -1
- package/dist/ketchup/{p-124f3f42.js → p-d4a879fc.js} +1 -1
- package/dist/ketchup/{p-b623c774.entry.js → p-d56763cf.entry.js} +1 -1
- package/dist/ketchup/{p-3081ed82.entry.js → p-e7f57bee.entry.js} +1 -1
- package/dist/ketchup/{p-eec864dd.entry.js → p-eb12225c.entry.js} +1 -1
- package/dist/ketchup/{p-3bbcae45.entry.js → p-f22abf4e.entry.js} +1 -1
- package/dist/ketchup/{p-e917200c.entry.js → p-f82db512.entry.js} +1 -1
- package/dist/types/components/kup-box/kup-box.d.ts +1 -0
- package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +1 -1
- package/dist/types/components/kup-calendar/kup-calendar.d.ts +1 -1
- package/dist/types/components/kup-card/kup-card.d.ts +3 -3
- package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +35 -0
- package/dist/types/components/kup-card-list/kup-card-list.d.ts +62 -0
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- 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 +103 -96
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -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/managers/kup-math/kup-math.d.ts +1 -1
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +16 -4
- package/dist/types/types/GenericTypes.d.ts +1 -2
- package/package.json +6 -3
- package/dist/cjs/kup-dash-list.cjs.entry.js +0 -116
- package/dist/cjs/kup-dash_2.cjs.entry.js +0 -179
- package/dist/collection/assets/dash-list.js +0 -474
- package/dist/collection/components/kup-dash/kup-dash.css +0 -136
- package/dist/collection/components/kup-dash/kup-dash.js +0 -171
- package/dist/collection/components/kup-dash-list/kup-dash-list.css +0 -10
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +0 -331
- package/dist/components/kup-dash-list.js +0 -288
- package/dist/components/kup-dash.d.ts +0 -11
- package/dist/components/kup-dash.js +0 -6
- package/dist/components/kup-dash2.js +0 -228
- package/dist/esm/kup-dash-list.entry.js +0 -112
- package/dist/esm/kup-dash_2.entry.js +0 -174
- package/dist/ketchup/p-0848391f.entry.js +0 -1
- package/dist/ketchup/p-25d45dc9.entry.js +0 -1
- package/dist/ketchup/p-283ca113.entry.js +0 -1
- package/dist/ketchup/p-384137d7.entry.js +0 -39
- package/dist/ketchup/p-3972b97c.entry.js +0 -1
- package/dist/ketchup/p-5ce0e645.entry.js +0 -1
- package/dist/ketchup/p-b8fcbcc9.entry.js +0 -1
- package/dist/ketchup/p-be864593.entry.js +0 -9
- package/dist/ketchup/p-d680bdde.js +0 -1
- package/dist/ketchup/p-f79d544a.js +0 -1
- package/dist/ketchup/p-fd75d5bf.js +0 -2
- package/dist/types/components/kup-dash/kup-dash.d.ts +0 -33
- package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +0 -22
|
@@ -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);
|
|
@@ -5,8 +5,8 @@ export class KupDataTableState {
|
|
|
5
5
|
this.expandGroups = false;
|
|
6
6
|
this.groupLabelDisplay = GroupLabelDisplayMode.BOTH;
|
|
7
7
|
this.density = 'small';
|
|
8
|
-
this.enableSortableColumns = false;
|
|
9
8
|
this.enableExtraColumns = true;
|
|
9
|
+
this.enableSortableColumns = false;
|
|
10
10
|
this.forceOneLine = false;
|
|
11
11
|
this.globalFilter = false;
|
|
12
12
|
this.globalFilterValue = '';
|
|
@@ -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 = {};
|
|
@@ -677,7 +677,6 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
677
677
|
options = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_candleChart).call(this);
|
|
678
678
|
break;
|
|
679
679
|
case KupEchartTypes.CALENDAR:
|
|
680
|
-
console.log('virtual 0');
|
|
681
680
|
options = __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_calendarChart).call(this);
|
|
682
681
|
break;
|
|
683
682
|
default:
|
|
@@ -1014,7 +1013,6 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
1014
1013
|
return {
|
|
1015
1014
|
tooltip: Object.assign(Object.assign({}, __classPrivateFieldGet(this, _KupEchart_instances, "m", _KupEchart_setTooltip).call(this)), { trigger: 'item', formatter: (value) => {
|
|
1016
1015
|
const name = value.data;
|
|
1017
|
-
console.log('data', name);
|
|
1018
1016
|
const data = keys.map((e, i) => {
|
|
1019
1017
|
return `<li> ${e}: ${name[i]} </li>`;
|
|
1020
1018
|
});
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
--kup_grid_gap: var(--kup-grid-gap, 24px);
|
|
10
10
|
--kup_grid_gap_mobile: var(--kup-grid-gap-mobile, 16px);
|
|
11
11
|
--kup_grid_padding: var(--kup-grid-padding, 24px);
|
|
12
|
+
display: block;
|
|
12
13
|
font-size: var(--kup_grid_font_size);
|
|
13
14
|
height: 100%;
|
|
14
15
|
width: 100%;
|
|
@@ -181,4 +182,13 @@
|
|
|
181
182
|
}
|
|
182
183
|
:host(.kup-full-width) .flex-layout__inner * {
|
|
183
184
|
margin: auto;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host(.kup-full-width.scalable-cards) .flex-layout__inner {
|
|
188
|
+
width: 100%;
|
|
189
|
+
}
|
|
190
|
+
:host(.kup-full-width.scalable-cards) .flex-layout__inner * {
|
|
191
|
+
margin: 0;
|
|
192
|
+
height: 100%;
|
|
193
|
+
width: 100%;
|
|
184
194
|
}
|
|
@@ -11,247 +11,6 @@
|
|
|
11
11
|
* @prop --kup-progressbar-width: Sets width of the component.
|
|
12
12
|
*/
|
|
13
13
|
:host {
|
|
14
|
-
--kup_progressbar_border_radius: var(--kup-progressbar-border-radius, 4px);
|
|
15
|
-
--kup_progressbar_font_family: var(
|
|
16
|
-
--kup-progressbar-font-family,
|
|
17
|
-
var(--kup-font-family)
|
|
18
|
-
);
|
|
19
|
-
--kup_progressbar_font_size: var(
|
|
20
|
-
--kup-progressbar-font-size,
|
|
21
|
-
var(--kup-font-size)
|
|
22
|
-
);
|
|
23
|
-
--kup_progressbar_height: var(--kup-progressbar-height, 1.25em);
|
|
24
|
-
--kup_progressbar_primary_color: var(
|
|
25
|
-
--kup-progressbar-primary-color,
|
|
26
|
-
var(--kup-primary-color)
|
|
27
|
-
);
|
|
28
|
-
--kup_progressbar_text_color: var(
|
|
29
|
-
--kup-progressbar-text-color,
|
|
30
|
-
var(--kup-text-color)
|
|
31
|
-
);
|
|
32
|
-
--kup_progressbar_text_color_rgb: var(
|
|
33
|
-
--kup-progressbar-text-color-rgb,
|
|
34
|
-
var(--kup-text-color-rgb)
|
|
35
|
-
);
|
|
36
|
-
--kup_progressbar_text_on_primary_color: var(
|
|
37
|
-
--kup-progressbar-text-on-primary-color,
|
|
38
|
-
var(--kup-text-on-primary-color)
|
|
39
|
-
);
|
|
40
|
-
--kup_progressbar_track_color: var(
|
|
41
|
-
--kup-progressbar-track-color,
|
|
42
|
-
var(--kup-disabled-background-color)
|
|
43
|
-
);
|
|
44
|
-
--kup_progressbar_width: var(--kup-progressbar-width, 100%);
|
|
45
14
|
display: block;
|
|
46
|
-
|
|
47
|
-
font-size: var(--kup_progressbar_font_size);
|
|
48
|
-
width: var(--kup_progressbar_width);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.progress-bar {
|
|
52
|
-
background: var(--kup_progressbar_track_color);
|
|
53
|
-
border-radius: var(--kup_progressbar_border_radius);
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
position: relative;
|
|
56
|
-
width: var(--kup_progressbar_width);
|
|
57
|
-
}
|
|
58
|
-
.progress-bar.text-color-on-primary .progress-bar-percentage {
|
|
59
|
-
color: var(--kup_progressbar_text_on_primary_color);
|
|
60
|
-
}
|
|
61
|
-
.progress-bar.text-color-on-primary .progress-bar-percentage span {
|
|
62
|
-
color: var(--kup_progressbar_text_on_primary_color);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.progress-bar-percentage {
|
|
66
|
-
background: var(--kup_progressbar_primary_color);
|
|
67
|
-
border-radius: var(--kup_progressbar_border_radius);
|
|
68
|
-
color: var(--kup_progressbar_text_color);
|
|
69
|
-
height: var(--kup_progressbar_height);
|
|
70
|
-
padding: 0.5em 0;
|
|
71
|
-
text-align: center;
|
|
72
|
-
transition: width 0.2s ease;
|
|
73
|
-
}
|
|
74
|
-
.progress-bar-percentage span {
|
|
75
|
-
color: var(--kup_progressbar_text_color);
|
|
76
|
-
display: inline-block;
|
|
77
|
-
font-size: 1em;
|
|
78
|
-
left: 0;
|
|
79
|
-
line-height: var(--kup_progressbar_height);
|
|
80
|
-
position: absolute;
|
|
81
|
-
width: var(--kup_progressbar_width);
|
|
82
|
-
}
|
|
83
|
-
.progress-bar-percentage .kup-icon {
|
|
84
|
-
display: block;
|
|
85
|
-
height: var(--kup_progressbar_height);
|
|
86
|
-
}
|
|
87
|
-
.progress-bar-percentage .kup-icon:not(.is-image) {
|
|
88
|
-
background-color: var(--kup_progressbar_text_on_primary_color);
|
|
89
|
-
}
|
|
90
|
-
.progress-bar-percentage .kup-icon img {
|
|
91
|
-
width: auto;
|
|
92
|
-
height: 100%;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
:host([is-radial]) {
|
|
96
|
-
box-sizing: border-box;
|
|
97
|
-
margin: auto;
|
|
98
|
-
padding: 1.25em 0px;
|
|
99
|
-
}
|
|
100
|
-
:host([is-radial]) #kup-component {
|
|
101
|
-
display: flex;
|
|
102
|
-
font-size: 10em;
|
|
103
|
-
margin: auto;
|
|
104
|
-
}
|
|
105
|
-
:host([is-radial]) .pie-wrapper {
|
|
106
|
-
height: 1em;
|
|
107
|
-
width: 1em;
|
|
108
|
-
float: left;
|
|
109
|
-
margin: auto;
|
|
110
|
-
position: relative;
|
|
111
|
-
}
|
|
112
|
-
:host([is-radial]) .pie-wrapper:nth-child(3n+1) {
|
|
113
|
-
clear: both;
|
|
114
|
-
}
|
|
115
|
-
:host([is-radial]) .pie-wrapper .pie {
|
|
116
|
-
height: 1em;
|
|
117
|
-
width: 1em;
|
|
118
|
-
clip: rect(0, 1em, 1em, 0.5em);
|
|
119
|
-
left: 0;
|
|
120
|
-
position: absolute;
|
|
121
|
-
top: 0;
|
|
122
|
-
}
|
|
123
|
-
:host([is-radial]) .pie-wrapper .pie.has-value .half-circle {
|
|
124
|
-
border-color: var(--kup_progressbar_primary_color);
|
|
125
|
-
}
|
|
126
|
-
:host([is-radial]) .pie-wrapper .pie.has-value .half-circle.left-side {
|
|
127
|
-
transition: transform 0.2s ease;
|
|
128
|
-
}
|
|
129
|
-
:host([is-radial]) .pie-wrapper .pie.has-value.is-less-than-half .right-side {
|
|
130
|
-
display: none;
|
|
131
|
-
}
|
|
132
|
-
:host([is-radial]) .pie-wrapper .pie.has-value.is-more-than-half {
|
|
133
|
-
clip: rect(auto, auto, auto, auto);
|
|
134
|
-
}
|
|
135
|
-
:host([is-radial]) .pie-wrapper .pie.has-value.is-more-than-half .right-side {
|
|
136
|
-
transform: rotate(180deg);
|
|
137
|
-
}
|
|
138
|
-
:host([is-radial]) .pie-wrapper .pie .half-circle {
|
|
139
|
-
height: 1em;
|
|
140
|
-
width: 1em;
|
|
141
|
-
border: 0.1em solid var(--kup_progressbar_track_color);
|
|
142
|
-
border-radius: 50%;
|
|
143
|
-
clip: rect(0, 0.5em, 1em, 0);
|
|
144
|
-
left: 0;
|
|
145
|
-
position: absolute;
|
|
146
|
-
top: 0;
|
|
147
|
-
}
|
|
148
|
-
:host([is-radial]) .pie-wrapper .label {
|
|
149
|
-
background: none;
|
|
150
|
-
bottom: 0.4em;
|
|
151
|
-
color: var(--kup_progressbar_text_color);
|
|
152
|
-
cursor: default;
|
|
153
|
-
display: block;
|
|
154
|
-
font-size: 0.25em;
|
|
155
|
-
left: 0.4em;
|
|
156
|
-
line-height: 2.75em;
|
|
157
|
-
position: absolute;
|
|
158
|
-
right: 0.4em;
|
|
159
|
-
text-align: center;
|
|
160
|
-
top: 0.4em;
|
|
161
|
-
}
|
|
162
|
-
:host([is-radial]) .pie-wrapper .label.kup-icon {
|
|
163
|
-
display: block;
|
|
164
|
-
height: 1.25em;
|
|
165
|
-
width: 1.25em;
|
|
166
|
-
object-fit: cover;
|
|
167
|
-
margin: auto;
|
|
168
|
-
}
|
|
169
|
-
:host([is-radial]) .pie-wrapper .label.kup-icon:not(.is-image) {
|
|
170
|
-
background-color: var(--kup_progressbar_primary_color);
|
|
171
|
-
}
|
|
172
|
-
:host([is-radial]) .pie-wrapper .label.kup-icon img {
|
|
173
|
-
width: auto;
|
|
174
|
-
height: 100%;
|
|
175
|
-
}
|
|
176
|
-
:host([is-radial]) .pie-wrapper .label .smaller {
|
|
177
|
-
color: var(--kup_progressbar_text_color);
|
|
178
|
-
opacity: 0.8;
|
|
179
|
-
font-size: 0.45em;
|
|
180
|
-
padding-bottom: 20px;
|
|
181
|
-
vertical-align: super;
|
|
182
|
-
}
|
|
183
|
-
:host([is-radial]) .pie-wrapper .shadow {
|
|
184
|
-
height: 1em;
|
|
185
|
-
width: 1em;
|
|
186
|
-
border: 0.1em solid var(--kup_progressbar_track_color);
|
|
187
|
-
border-radius: 50%;
|
|
188
|
-
}
|
|
189
|
-
:host([is-radial]) *,
|
|
190
|
-
:host([is-radial]) *:before,
|
|
191
|
-
:host([is-radial]) *:after {
|
|
192
|
-
box-sizing: border-box;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
@keyframes running-stripes {
|
|
196
|
-
0% {
|
|
197
|
-
background-position: 0 0;
|
|
198
|
-
}
|
|
199
|
-
100% {
|
|
200
|
-
background-position: 3em 3em;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
/*-------------------------------------------------*/
|
|
204
|
-
/* C o m p o n e n t C l a s s e s */
|
|
205
|
-
/*-------------------------------------------------*/
|
|
206
|
-
:host(.kup-animated) .progress-bar-percentage {
|
|
207
|
-
animation: running-stripes 2s linear infinite;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
:host(.kup-padded) .progress-bar {
|
|
211
|
-
padding: 0.5em;
|
|
212
|
-
width: calc(100% - 1em);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
:host(.kup-slim) #kup-component .progress-bar {
|
|
216
|
-
border-radius: 9px;
|
|
217
|
-
}
|
|
218
|
-
:host(.kup-slim) #kup-component .progress-bar .progress-bar-percentage {
|
|
219
|
-
border-radius: 9px;
|
|
220
|
-
padding: 0;
|
|
221
|
-
}
|
|
222
|
-
:host(.kup-slim) #kup-component .pie-wrapper .pie .half-circle {
|
|
223
|
-
border-width: 0.05em;
|
|
224
|
-
}
|
|
225
|
-
:host(.kup-slim) #kup-component .pie-wrapper .shadow {
|
|
226
|
-
border-width: 0.05em;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
:host(.kup-striped) .progress-bar-percentage {
|
|
230
|
-
background-image: linear-gradient(-45deg, rgba(var(--kup_progressbar_text_color_rgb), 0.125) 25%, transparent 25%, transparent 50%, rgba(var(--kup_progressbar_text_color_rgb), 0.125) 50%, rgba(var(--kup_progressbar_text_color_rgb), 0.125) 75%, transparent 75%, transparent);
|
|
231
|
-
background-size: 3em 3em;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
:host(.kup-danger) {
|
|
235
|
-
--kup-progressbar-primary-color: var(--kup-danger-color);
|
|
236
|
-
--kup-progressbar-text-on-primary-color: white;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
:host(.kup-info) {
|
|
240
|
-
--kup-progressbar-primary-color: var(--kup-info-color);
|
|
241
|
-
--kup-progressbar-text-on-primary-color: white;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
:host(.kup-secondary) {
|
|
245
|
-
--kup-progressbar-primary-color: var(--kup-secondary-color);
|
|
246
|
-
--kup-progressbar-text-on-primary-color: var(--kup-text-on-secondary-color);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
:host(.kup-success) {
|
|
250
|
-
--kup-progressbar-primary-color: var(--kup-success-color);
|
|
251
|
-
--kup-progressbar-text-on-primary-color: white;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
:host(.kup-warning) {
|
|
255
|
-
--kup-progressbar-primary-color: var(--kup-warning-color);
|
|
256
|
-
--kup-progressbar-text-on-primary-color: white;
|
|
15
|
+
width: var(--kup-progressbar-width, 100%);
|
|
257
16
|
}
|