@sme.up/ketchup 9.0.0 → 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/{f-button-b2cfce1c.js → f-button-733664a5.js} +2 -2
- package/dist/cjs/{f-cell-75fca92b.js → f-cell-f37757a6.js} +183 -11
- package/dist/cjs/{f-checkbox-48d7af02.js → f-checkbox-556771e8.js} +1 -1
- package/dist/cjs/{f-chip-3e504f3e.js → f-chip-3349d130.js} +3 -3
- package/dist/cjs/{f-image-270d39ae.js → f-image-b7a5816b.js} +2 -2
- package/dist/cjs/{f-paginator-utils-6d0c4678.js → f-paginator-utils-1fe1df76.js} +49 -50
- package/dist/cjs/{f-text-field-bbcd2143.js → f-text-field-8557fc3f.js} +38 -4
- package/dist/cjs/{index-c3d10561.js → index-4b3a5567.js} +48 -18
- 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 +157 -195
- package/dist/cjs/kup-box.cjs.entry.js +23 -15
- package/dist/cjs/kup-calendar.cjs.entry.js +5 -5
- package/dist/cjs/kup-card-list.cjs.entry.js +2 -2
- 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-cb73c128.js} +59 -9
- 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 +3 -3
- 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/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-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/managers/kup-data/kup-data.js +2 -0
- 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/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 +962 -801
- package/dist/components/kup-box2.js +24 -6
- package/dist/components/kup-calendar.js +3 -0
- package/dist/components/kup-dashboard.js +2 -0
- package/dist/components/kup-image-list.js +2 -0
- package/dist/components/kup-planner.js +2 -0
- package/dist/esm/{f-button-baa419dc.js → f-button-f247ce10.js} +2 -2
- package/dist/esm/{f-cell-18ee3afa.js → f-cell-ba94f1b3.js} +181 -12
- package/dist/esm/{f-checkbox-00a1e020.js → f-checkbox-cbf7b3de.js} +1 -1
- package/dist/esm/{f-chip-311500f4.js → f-chip-104c4a64.js} +3 -3
- package/dist/esm/{f-image-da03494c.js → f-image-d2a9603c.js} +2 -2
- package/dist/esm/{f-paginator-utils-d63a195e.js → f-paginator-utils-743522fa.js} +49 -50
- package/dist/esm/{f-text-field-e5f1f1fd.js → f-text-field-4d91ccfc.js} +38 -4
- package/dist/esm/{index-3336c3b1.js → index-c161a33e.js} +48 -18
- package/dist/esm/ketchup.js +4 -4
- package/dist/esm/kup-accordion.entry.js +3 -3
- package/dist/esm/kup-autocomplete_27.entry.js +157 -195
- package/dist/esm/kup-box.entry.js +23 -15
- package/dist/esm/kup-calendar.entry.js +5 -5
- package/dist/esm/kup-card-list.entry.js +2 -2
- 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-c8d5c94d.js → kup-manager-94b3d177.js} +59 -9
- 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 +3 -3
- 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-81debebe.entry.js → p-15548f51.entry.js} +1 -1
- package/dist/ketchup/p-20e8ab84.js +2 -0
- package/dist/ketchup/{p-a0f59b05.entry.js → p-21f1b22a.entry.js} +1 -1
- package/dist/ketchup/{p-25de68e5.js → p-2c47b88f.js} +3 -3
- package/dist/ketchup/{p-7e1c8fc0.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-7555c10d.js → p-4d7c02f4.js} +1 -1
- package/dist/ketchup/{p-76130e83.entry.js → p-5abbf31b.entry.js} +1 -1
- package/dist/ketchup/{p-13eac183.entry.js → p-5c9b10a5.entry.js} +1 -1
- package/dist/ketchup/{p-55fd3f46.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-d6a7498b.entry.js → p-87e13738.entry.js} +1 -1
- package/dist/ketchup/p-8e5db599.entry.js +1 -0
- package/dist/ketchup/{p-07707cd1.entry.js → p-a14ede8c.entry.js} +1 -1
- package/dist/ketchup/{p-39602629.js → p-a2007880.js} +1 -1
- package/dist/ketchup/{p-da58f8ab.entry.js → p-a2b75445.entry.js} +1 -1
- package/dist/ketchup/{p-8281c9e5.js → p-b0678a34.js} +1 -1
- package/dist/ketchup/{p-4597f25d.js → p-ba003975.js} +1 -1
- package/dist/ketchup/{p-f729449f.js → p-bb80719e.js} +1 -1
- package/dist/ketchup/{p-2a2a18bf.entry.js → p-bf41d71f.entry.js} +1 -1
- package/dist/ketchup/{p-d8384990.entry.js → p-c32e8755.entry.js} +1 -1
- package/dist/ketchup/p-c4b1bde1.entry.js +1 -0
- package/dist/ketchup/p-c6b58be6.entry.js +1 -0
- package/dist/ketchup/{p-2dab9c4f.entry.js → p-d56763cf.entry.js} +1 -1
- package/dist/ketchup/{p-7bf649f0.entry.js → p-e7f57bee.entry.js} +1 -1
- package/dist/ketchup/{p-a8a39b08.entry.js → p-eb12225c.entry.js} +1 -1
- package/dist/ketchup/{p-2d192def.entry.js → p-f22abf4e.entry.js} +1 -1
- package/dist/ketchup/{p-51aa248f.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-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 +6 -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/managers/kup-theme/kup-theme-declarations.d.ts +12 -0
- package/dist/types/stencil-public-runtime.d.ts +5 -3
- package/package.json +2 -2
- 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-bb854cf5.entry.js +0 -1
- package/dist/ketchup/p-ecb9fe91.entry.js +0 -1
|
@@ -277,15 +277,23 @@ const KupBox = /*@__PURE__*/ proxyCustomElement(class KupBox extends HTMLElement
|
|
|
277
277
|
sortRows(rows) {
|
|
278
278
|
let sortedRows = rows;
|
|
279
279
|
if (this.sortBy) {
|
|
280
|
-
|
|
281
|
-
const sortObject = {
|
|
282
|
-
column: this.sortBy,
|
|
283
|
-
sortMode: SortMode.A,
|
|
284
|
-
};
|
|
285
|
-
sortedRows = sortRows(sortedRows, [sortObject]);
|
|
280
|
+
sortedRows = sortRows(sortedRows, this.toSortObjectList());
|
|
286
281
|
}
|
|
287
282
|
return sortedRows;
|
|
288
283
|
}
|
|
284
|
+
toSortObjectList() {
|
|
285
|
+
const sortByArray = this.sortBy.split('|').map((col) => {
|
|
286
|
+
const colNameAndSortMode = col.split(',');
|
|
287
|
+
const sortObject = {
|
|
288
|
+
column: colNameAndSortMode[0],
|
|
289
|
+
sortMode: colNameAndSortMode.length > 1
|
|
290
|
+
? SortMode[colNameAndSortMode[1]]
|
|
291
|
+
: SortMode.A,
|
|
292
|
+
};
|
|
293
|
+
return sortObject;
|
|
294
|
+
});
|
|
295
|
+
return sortByArray;
|
|
296
|
+
}
|
|
289
297
|
checkScrollOnHover() {
|
|
290
298
|
if (!this.kupManager.scrollOnHover.isRegistered(this.boxContainer)) {
|
|
291
299
|
if (this.scrollOnHover) {
|
|
@@ -1294,6 +1302,16 @@ const KupBox = /*@__PURE__*/ proxyCustomElement(class KupBox extends HTMLElement
|
|
|
1294
1302
|
"loadRowActions": [64],
|
|
1295
1303
|
"refresh": [64],
|
|
1296
1304
|
"setProps": [64]
|
|
1305
|
+
}, undefined, {
|
|
1306
|
+
"rowsPerPage": ["rowsPerPageHandler", "recalculateRows"],
|
|
1307
|
+
"globalFilterValue": ["recalculateRows"],
|
|
1308
|
+
"sortBy": ["recalculateRows"],
|
|
1309
|
+
"pagination": ["recalculateRows"],
|
|
1310
|
+
"currentPage": ["recalculateRows"],
|
|
1311
|
+
"currentRowsPerPage": ["recalculateRows"],
|
|
1312
|
+
"data": ["onDataChanged"],
|
|
1313
|
+
"layout": ["onLayoutChanged"],
|
|
1314
|
+
"selectBox": ["onSelectBoxChanged"]
|
|
1297
1315
|
}]);
|
|
1298
1316
|
_KupBox_intObserver = new WeakMap(), _KupBox_rowsRefs = new WeakMap(), _KupBox_navBarHeight = new WeakMap(), _KupBox_instances = new WeakSet(), _KupBox_didRenderObservers = function _KupBox_didRenderObservers() {
|
|
1299
1317
|
if (this.lazyLoadRows &&
|
|
@@ -14182,6 +14182,9 @@ const KupCalendar$1 = /*@__PURE__*/ proxyCustomElement(class KupCalendar extends
|
|
|
14182
14182
|
"refresh": [64],
|
|
14183
14183
|
"resizeCallback": [64],
|
|
14184
14184
|
"setProps": [64]
|
|
14185
|
+
}, undefined, {
|
|
14186
|
+
"data": ["setCalendarData"],
|
|
14187
|
+
"currentDate": ["setCalendarData"]
|
|
14185
14188
|
}]);
|
|
14186
14189
|
function defineCustomElement$1() {
|
|
14187
14190
|
if (typeof customElements === "undefined") {
|
|
@@ -405,6 +405,8 @@ const KupDashboard$1 = /*@__PURE__*/ proxyCustomElement(class KupDashboard exten
|
|
|
405
405
|
"getProps": [64],
|
|
406
406
|
"refresh": [64],
|
|
407
407
|
"setProps": [64]
|
|
408
|
+
}, undefined, {
|
|
409
|
+
"data": ["dataChanged"]
|
|
408
410
|
}]);
|
|
409
411
|
function defineCustomElement$1() {
|
|
410
412
|
if (typeof customElements === "undefined") {
|
|
@@ -239,6 +239,8 @@ const KupImageList$1 = /*@__PURE__*/ proxyCustomElement(class KupImageList exten
|
|
|
239
239
|
"getProps": [64],
|
|
240
240
|
"refresh": [64],
|
|
241
241
|
"setProps": [64]
|
|
242
|
+
}, undefined, {
|
|
243
|
+
"selectedNode": ["selectNode"]
|
|
242
244
|
}]);
|
|
243
245
|
_KupImageList_clickTimeout = new WeakMap(), _KupImageList_kupManager = new WeakMap(), _KupImageList_backProps = new WeakMap(), _KupImageList_topProps = new WeakMap(), _KupImageList_instances = new WeakSet(), _KupImageList_createItem = function _KupImageList_createItem(node) {
|
|
244
246
|
const props = {
|
|
@@ -13027,6 +13027,8 @@ const KupPlanner$1 = /*@__PURE__*/ proxyCustomElement(class KupPlanner extends H
|
|
|
13027
13027
|
"refresh": [64],
|
|
13028
13028
|
"setProps": [64],
|
|
13029
13029
|
"addPhases": [64]
|
|
13030
|
+
}, undefined, {
|
|
13031
|
+
"data": ["dataChanged"]
|
|
13030
13032
|
}]);
|
|
13031
13033
|
_KupPlanner_kupManager = new WeakMap(), _KupPlanner_lastOnChangeReceived = new WeakMap(), _KupPlanner_rootPlanner = new WeakMap(), _KupPlanner_phases = new WeakMap(), _KupPlanner_storedSettings = new WeakMap(), _KupPlanner_instances = new WeakSet(), _KupPlanner_renderReactPlannerElement = function _KupPlanner_renderReactPlannerElement() {
|
|
13032
13034
|
var _a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from './index-
|
|
1
|
+
import { h } from './index-c161a33e.js';
|
|
2
2
|
import { F as FButtonStyling } from './f-button-declarations-8a009df1.js';
|
|
3
|
-
import { F as FImage } from './f-image-
|
|
3
|
+
import { F as FImage } from './f-image-d2a9603c.js';
|
|
4
4
|
|
|
5
5
|
/*-------------------------------------------------*/
|
|
6
6
|
/* C o m p o n e n t */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { a9 as editableTypes, aa as kupTypes, b as KupThemeColorValues, a6 as FCellTypes, ab as KupTagNames, F as FCellShapes, ac as fullWidthFieldsComps, ad as FCellClasses, ae as autoCenterComps, af as getCellValueForDisplay, ag as FCellEvents } from './kup-manager-
|
|
2
|
-
import { h } from './index-
|
|
3
|
-
import { F as FCheckbox } from './f-checkbox-
|
|
4
|
-
import { F as FTextField } from './f-text-field-
|
|
5
|
-
import { F as FImage } from './f-image-
|
|
6
|
-
import { F as FChipType, a as FChip } from './f-chip-
|
|
1
|
+
import { a9 as editableTypes, aa as kupTypes, b as KupThemeColorValues, a6 as FCellTypes, ab as KupTagNames, F as FCellShapes, ac as fullWidthFieldsComps, ad as FCellClasses, ae as autoCenterComps, af as getCellValueForDisplay, ag as FCellEvents } from './kup-manager-94b3d177.js';
|
|
2
|
+
import { h, a as getAssetPath } from './index-c161a33e.js';
|
|
3
|
+
import { F as FCheckbox } from './f-checkbox-cbf7b3de.js';
|
|
4
|
+
import { F as FTextField } from './f-text-field-4d91ccfc.js';
|
|
5
|
+
import { F as FImage } from './f-image-d2a9603c.js';
|
|
6
|
+
import { F as FChipType, a as FChip } from './f-chip-104c4a64.js';
|
|
7
|
+
import { F as FButton } from './f-button-f247ce10.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Props of the kup-list component.
|
|
@@ -54,6 +55,164 @@ const FSwitch = (props) => {
|
|
|
54
55
|
h("label", { onClick: props.onChange }, props.label))));
|
|
55
56
|
};
|
|
56
57
|
|
|
58
|
+
/*-------------------------------------------------*/
|
|
59
|
+
/* C o m p o n e n t */
|
|
60
|
+
/*-------------------------------------------------*/
|
|
61
|
+
const FProgressBar = (props) => {
|
|
62
|
+
if (!props.centeredLabel && !props.centeredLabel !== false) {
|
|
63
|
+
props.centeredLabel = true;
|
|
64
|
+
}
|
|
65
|
+
let componentClass = `f-progress-bar ${props.danger ? 'kup-danger' : ''} ${props.animated ? 'kup-animated' : ''} ${props.padded ? 'kup-padded' : ''} ${props.info ? 'kup-info' : ''} ${props.slim ? 'kup-slim' : ''} ${props.striped ? 'kup-striped' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.slim ? 'kup-slim' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}`;
|
|
66
|
+
let pieClass = 'pie';
|
|
67
|
+
let radialStyle = undefined;
|
|
68
|
+
if (props.isRadial) {
|
|
69
|
+
componentClass += ' pie-wrapper is-radial';
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
componentClass += ' progress-bar';
|
|
73
|
+
}
|
|
74
|
+
let labelStyle = undefined;
|
|
75
|
+
const valueStyle = {
|
|
76
|
+
width: `${props.value}%`,
|
|
77
|
+
};
|
|
78
|
+
if (!props.centeredLabel) {
|
|
79
|
+
labelStyle = valueStyle;
|
|
80
|
+
if (props.value > 2) {
|
|
81
|
+
componentClass += ' text-color-on-primary';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
else if (props.value > 49) {
|
|
85
|
+
componentClass += ' text-color-on-primary';
|
|
86
|
+
}
|
|
87
|
+
let label = null;
|
|
88
|
+
if (props.icon) {
|
|
89
|
+
label = createIconElement(props);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
if (!props.hideLabel) {
|
|
93
|
+
if (props.isRadial) {
|
|
94
|
+
if (props.label) {
|
|
95
|
+
label = h("span", { class: "label" }, props.label);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
label = (h("span", { class: "label" },
|
|
99
|
+
props.value,
|
|
100
|
+
h("span", { class: "smaller" }, "%")));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
if (props.label) {
|
|
105
|
+
label = props.label;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
label = props.value + '%';
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (props.value > 0) {
|
|
114
|
+
pieClass += ' has-value';
|
|
115
|
+
if (props.value > 50) {
|
|
116
|
+
pieClass += ' is-more-than-half';
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
pieClass += ' is-less-than-half';
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (props.isRadial) {
|
|
123
|
+
return (h("div", { class: componentClass },
|
|
124
|
+
label,
|
|
125
|
+
h("div", { class: pieClass },
|
|
126
|
+
h("div", { style: radialStyle, class: "left-side half-circle" }),
|
|
127
|
+
h("div", { class: "right-side half-circle" })),
|
|
128
|
+
h("div", { class: "shadow" })));
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return (h("div", { class: componentClass },
|
|
132
|
+
h("div", { class: "progress-bar-percentage", style: valueStyle },
|
|
133
|
+
h("span", { style: labelStyle }, label))));
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
function createIconElement(props) {
|
|
137
|
+
if (!props.icon) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
if (props.icon.indexOf('.') > -1 ||
|
|
141
|
+
props.icon.indexOf('/') > -1 ||
|
|
142
|
+
props.icon.indexOf('\\') > -1) {
|
|
143
|
+
return (h("span", { class: "label kup-icon is-image" },
|
|
144
|
+
h("img", { src: props.icon })));
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
let svg = `url('${getAssetPath(`./assets/svg/${props.icon}.svg`)}') no-repeat center`;
|
|
148
|
+
let iconStyle = {
|
|
149
|
+
mask: svg,
|
|
150
|
+
webkitMask: svg,
|
|
151
|
+
};
|
|
152
|
+
return h("span", { style: iconStyle, class: "label kup-icon" });
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/*-------------------------------------------------*/
|
|
157
|
+
/* C o m p o n e n t */
|
|
158
|
+
/*-------------------------------------------------*/
|
|
159
|
+
const FRadio = (props) => {
|
|
160
|
+
var _a;
|
|
161
|
+
const hasColumns = !!props.columns;
|
|
162
|
+
const radioList = [];
|
|
163
|
+
for (let i = 0; i < ((_a = props.data) === null || _a === void 0 ? void 0 : _a.length); i++) {
|
|
164
|
+
const data = props.data[i];
|
|
165
|
+
const classObj = {
|
|
166
|
+
radio: true,
|
|
167
|
+
'radio--checked': data.checked ? true : false,
|
|
168
|
+
'radio--disabled': props.disabled ? true : false,
|
|
169
|
+
};
|
|
170
|
+
radioList.push(h("div", { class: `form-field ${props.leadingLabel ? ' form-field--align-end' : ''}` },
|
|
171
|
+
h("div", { class: classObj },
|
|
172
|
+
h("input", { class: "radio__native-control", type: "radio", name: "radio-element", value: data.value, checked: data.checked, disabled: props.disabled, onBlur: props.onBlur, onChange: props.onChange
|
|
173
|
+
? props.onChange.bind(props.onChange, i)
|
|
174
|
+
: null, onFocus: props.onFocus }),
|
|
175
|
+
h("div", { class: "radio__background" },
|
|
176
|
+
h("div", { class: "radio__outer-circle" }),
|
|
177
|
+
h("div", { class: "radio__inner-circle" }))),
|
|
178
|
+
h("label", { htmlFor: 'radio-element', onClick: props.onChange
|
|
179
|
+
? props.onChange.bind(props.onChange, i)
|
|
180
|
+
: null }, data.label ? data.label : '')));
|
|
181
|
+
}
|
|
182
|
+
const styleObj = {
|
|
183
|
+
'--kup_radio_columns': hasColumns
|
|
184
|
+
? `repeat(${props.columns}, 1fr)`
|
|
185
|
+
: '',
|
|
186
|
+
};
|
|
187
|
+
return (h("div", { class: `f-radio radio-wrapper ${hasColumns ? 'radio-wrapper-grid' : ''} ${props.danger ? 'kup-danger' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}`, style: styleObj }, radioList));
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/*-------------------------------------------------*/
|
|
191
|
+
/* C o m p o n e n t */
|
|
192
|
+
/*-------------------------------------------------*/
|
|
193
|
+
const FRating = (props) => {
|
|
194
|
+
if (!props.maxValue) {
|
|
195
|
+
props.maxValue = 5;
|
|
196
|
+
}
|
|
197
|
+
return (h("div", { class: `f-rating ${props.disabled ? 'disabled' : ''} ${props.danger ? 'kup-danger' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, buildStars(props)));
|
|
198
|
+
};
|
|
199
|
+
function buildStars(props) {
|
|
200
|
+
const stars = [];
|
|
201
|
+
for (let i = 1; i <= props.maxValue; i++) {
|
|
202
|
+
if (i <= props.value) {
|
|
203
|
+
stars.push(h("span", { class: "rating", onClick: props.onClick
|
|
204
|
+
? props.onClick.bind(props.onClick, i)
|
|
205
|
+
: null }, "\u2605"));
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
stars.push(h("span", { class: "rating", onClick: props.onClick
|
|
209
|
+
? props.onClick.bind(props.onClick, i)
|
|
210
|
+
: null }, "\u2606"));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return stars;
|
|
214
|
+
}
|
|
215
|
+
|
|
57
216
|
const dom = document.documentElement;
|
|
58
217
|
/*-------------------------------------------------*/
|
|
59
218
|
/* C o m p o n e n t */
|
|
@@ -252,7 +411,14 @@ function setEditableCell(cellType, classObj, cell, column, props) {
|
|
|
252
411
|
if (isAutoCentered(props)) {
|
|
253
412
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
254
413
|
}
|
|
255
|
-
|
|
414
|
+
if (cell.shape === FCellShapes.INPUT_CHECKBOX) {
|
|
415
|
+
return (h("input", { checked: cell.value === 'on' || cell.value === '1'
|
|
416
|
+
? true
|
|
417
|
+
: false, class: "input-checkbox", onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), type: "checkbox" }));
|
|
418
|
+
}
|
|
419
|
+
else {
|
|
420
|
+
return (h(FCheckbox, Object.assign({}, cell.data, { onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
421
|
+
}
|
|
256
422
|
case FCellTypes.CHIP:
|
|
257
423
|
return (h("kup-chip", Object.assign({}, cell.data, { type: FChipType.INPUT, enableInput: true, "onKup-chip-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) }),
|
|
258
424
|
h("kup-text-field", Object.assign({ fullWidth: true, slot: "field" }, cell.slotData))));
|
|
@@ -371,7 +537,7 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
371
537
|
if (isAutoCentered(props)) {
|
|
372
538
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
373
539
|
}
|
|
374
|
-
return (h(
|
|
540
|
+
return (h(FButton, Object.assign({}, subcomponentProps, { onClick: (e) => cellEvent(e, props, cellType, FCellEvents.CLICK) })));
|
|
375
541
|
case FCellTypes.BUTTON_LIST:
|
|
376
542
|
if (isAutoCentered(props)) {
|
|
377
543
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
@@ -397,15 +563,15 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
397
563
|
return (h("kup-gauge", Object.assign({ key: column.name + props.row.id, value: dom.ketchup.math.numberifySafe(cell.value), "width-component": "280px" }, subcomponentProps)));
|
|
398
564
|
case FCellTypes.KNOB:
|
|
399
565
|
case FCellTypes.PROGRESS_BAR:
|
|
400
|
-
return (h("kup-progress-bar", Object.assign({ key: column.name + props.row.id }, subcomponentProps)));
|
|
566
|
+
return subcomponentProps.customStyle ? (h("kup-progress-bar", Object.assign({ key: column.name + props.row.id }, subcomponentProps))) : (h(FProgressBar, Object.assign({}, subcomponentProps)));
|
|
401
567
|
case FCellTypes.RADIO:
|
|
402
568
|
if (isAutoCentered(props)) {
|
|
403
569
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
404
570
|
}
|
|
405
571
|
subcomponentProps['disabled'] = row.readOnly;
|
|
406
|
-
return
|
|
572
|
+
return h(FRadio, Object.assign({}, subcomponentProps));
|
|
407
573
|
case FCellTypes.RATING:
|
|
408
|
-
return
|
|
574
|
+
return h(FRating, Object.assign({}, subcomponentProps, { disabled: true }));
|
|
409
575
|
}
|
|
410
576
|
}
|
|
411
577
|
function cellEvent(e, props, cellType, cellEventName) {
|
|
@@ -478,6 +644,9 @@ function getValueFromEventTaget(e, cellType) {
|
|
|
478
644
|
let value = isInputEvent
|
|
479
645
|
? e.target.value
|
|
480
646
|
: e.detail.value;
|
|
647
|
+
if (cellType === FCellTypes.CHECKBOX && isInputEvent) {
|
|
648
|
+
value = e.target.checked ? 'off' : 'on';
|
|
649
|
+
}
|
|
481
650
|
if (cellType === FCellTypes.NUMBER && isInputEvent) {
|
|
482
651
|
value = dom.ketchup.math.formattedStringToNumberString(value, '');
|
|
483
652
|
}
|
|
@@ -492,4 +661,4 @@ function isFullWidth(props) {
|
|
|
492
661
|
return fullWidthFieldsComps.includes((_a = props.component) === null || _a === void 0 ? void 0 : _a.rootElement.tagName);
|
|
493
662
|
}
|
|
494
663
|
|
|
495
|
-
export { FCell as F, ItemsDisplayMode as I, KupListRole as K, KupListProps as a,
|
|
664
|
+
export { FCell as F, ItemsDisplayMode as I, KupListRole as K, KupListProps as a, FProgressBar as b, FRadio as c, FRating as d, FSwitch as e };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from './index-
|
|
2
|
-
import { F as FImage } from './f-image-
|
|
3
|
-
import { K as KupThemeIconValues, m as KupLanguageGeneric, b as KupThemeColorValues } from './kup-manager-
|
|
1
|
+
import { h } from './index-c161a33e.js';
|
|
2
|
+
import { F as FImage } from './f-image-d2a9603c.js';
|
|
3
|
+
import { K as KupThemeIconValues, m as KupLanguageGeneric, b as KupThemeColorValues } from './kup-manager-94b3d177.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Types of the f-chip component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h, a as getAssetPath } from './index-
|
|
2
|
-
import { b as KupThemeColorValues } from './kup-manager-
|
|
1
|
+
import { h, a as getAssetPath } from './index-c161a33e.js';
|
|
2
|
+
import { b as KupThemeColorValues } from './kup-manager-94b3d177.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The type of a CSS step in CSS-drawing mode.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as Filters, J as FilterInterval, H as getValueForDisplay, D as getValueForDisplay2, af as getCellValueForDisplay, v as getColumnByName, z as KupObjects, ah as KupData, ai as compareCell, N as TotalMode, h as KupDatesFormats, a2 as SortMode, aj as KupLanguagePage, r as KupLanguageRow, m as KupLanguageGeneric } from './kup-manager-
|
|
2
|
-
import { h } from './index-
|
|
3
|
-
import { F as FButton } from './f-button-
|
|
1
|
+
import { E as Filters, J as FilterInterval, H as getValueForDisplay, D as getValueForDisplay2, af as getCellValueForDisplay, v as getColumnByName, z as KupObjects, ah as KupData, ai as compareCell, N as TotalMode, h as KupDatesFormats, a2 as SortMode, aj as KupLanguagePage, r as KupLanguageRow, m as KupLanguageGeneric } from './kup-manager-94b3d177.js';
|
|
2
|
+
import { h } from './index-c161a33e.js';
|
|
3
|
+
import { F as FButton } from './f-button-f247ce10.js';
|
|
4
4
|
import { F as FButtonStyling } from './f-button-declarations-8a009df1.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -869,19 +869,19 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
869
869
|
return;
|
|
870
870
|
}
|
|
871
871
|
keys.forEach((key) => {
|
|
872
|
-
const currentTotalValue = dom$2.ketchup.math.numberify(groupRow.group.totals[key] || 0);
|
|
873
872
|
const cell = addedRow.cells[key];
|
|
874
873
|
if (cell) {
|
|
875
|
-
|
|
874
|
+
const _isNumber = dom$2.ketchup.objects.isNumber(cell.obj);
|
|
876
875
|
const totalMode = totals[key];
|
|
877
876
|
switch (totalMode) {
|
|
878
877
|
case TotalMode.COUNT:
|
|
879
|
-
groupRow.group.totals[key]
|
|
878
|
+
let currentTotalValue = groupRow.group.totals[key] || 0;
|
|
879
|
+
groupRow.group.totals[key] = ++currentTotalValue;
|
|
880
880
|
// updating parents
|
|
881
881
|
let parent = groupRow.group.parent;
|
|
882
882
|
while (parent != null) {
|
|
883
|
-
|
|
884
|
-
parent.group.totals[key] = currentParentCount
|
|
883
|
+
let currentParentCount = parent.group.totals[key] || 0;
|
|
884
|
+
parent.group.totals[key] = ++currentParentCount;
|
|
885
885
|
parent = parent.group.parent;
|
|
886
886
|
}
|
|
887
887
|
break;
|
|
@@ -939,8 +939,9 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
939
939
|
break;
|
|
940
940
|
case TotalMode.SUM:
|
|
941
941
|
case TotalMode.AVERAGE:
|
|
942
|
-
if (_isNumber) {
|
|
942
|
+
if (_isNumber && cell.value) {
|
|
943
943
|
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
944
|
+
const currentTotalValue = groupRow.group.totals[key] || 0;
|
|
944
945
|
groupRow.group.totals[key] =
|
|
945
946
|
cellValue + currentTotalValue;
|
|
946
947
|
// updating parents
|
|
@@ -955,11 +956,11 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
955
956
|
break;
|
|
956
957
|
// TODO DRY the MIN and MAX functions
|
|
957
958
|
case TotalMode.MIN:
|
|
958
|
-
if (_isNumber) {
|
|
959
|
-
const
|
|
959
|
+
if (_isNumber && cell.value) {
|
|
960
|
+
const currentMinValue = groupRow.group.totals[key];
|
|
960
961
|
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
961
|
-
if (
|
|
962
|
-
groupRow.group.totals[key] = Math.min(
|
|
962
|
+
if (currentMinValue) {
|
|
963
|
+
groupRow.group.totals[key] = Math.min(currentMinValue, cellValue);
|
|
963
964
|
}
|
|
964
965
|
else {
|
|
965
966
|
// first round
|
|
@@ -979,22 +980,21 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
979
980
|
parent = parent.group.parent;
|
|
980
981
|
}
|
|
981
982
|
}
|
|
982
|
-
else if (
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
const currentTotalValue = groupRow.group.totals[key];
|
|
989
|
-
if (currentTotalValue) {
|
|
983
|
+
else if (cell.value &&
|
|
984
|
+
dom$2.ketchup.objects.isDate(cell.obj)) {
|
|
985
|
+
const cellValue = dom$2.ketchup.dates.toDayjs(cell.value);
|
|
986
|
+
if (dom$2.ketchup.dates.isValid(cellValue)) {
|
|
987
|
+
const currentMinValue = groupRow.group.totals[key];
|
|
988
|
+
if (currentMinValue) {
|
|
990
989
|
let moments = [];
|
|
991
990
|
moments.push(cellValue);
|
|
992
|
-
moments.push(dom$2.ketchup.dates.
|
|
991
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentMinValue));
|
|
993
992
|
groupRow.group.totals[key] =
|
|
994
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments));
|
|
993
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
|
|
995
994
|
}
|
|
996
995
|
else {
|
|
997
|
-
groupRow.group.totals[key] =
|
|
996
|
+
groupRow.group.totals[key] =
|
|
997
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
998
998
|
}
|
|
999
999
|
// updating parents
|
|
1000
1000
|
let parent = groupRow.group.parent;
|
|
@@ -1003,13 +1003,14 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1003
1003
|
if (currentParentMin) {
|
|
1004
1004
|
let moments = [];
|
|
1005
1005
|
moments.push(cellValue);
|
|
1006
|
-
moments.push(dom$2.ketchup.dates.
|
|
1006
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentParentMin));
|
|
1007
1007
|
parent.group.totals[key] =
|
|
1008
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments));
|
|
1008
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.min(moments), KupDatesFormats.ISO_DATE);
|
|
1009
1009
|
}
|
|
1010
1010
|
else {
|
|
1011
1011
|
// first round
|
|
1012
|
-
parent.group.totals[key] =
|
|
1012
|
+
parent.group.totals[key] =
|
|
1013
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
1013
1014
|
}
|
|
1014
1015
|
parent = parent.group.parent;
|
|
1015
1016
|
}
|
|
@@ -1018,11 +1019,11 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1018
1019
|
break;
|
|
1019
1020
|
// TODO DRY the MIN and MAX functions
|
|
1020
1021
|
case TotalMode.MAX:
|
|
1021
|
-
if (_isNumber) {
|
|
1022
|
-
const
|
|
1022
|
+
if (_isNumber && cell.value) {
|
|
1023
|
+
const currentMaxValue = groupRow.group.totals[key];
|
|
1023
1024
|
const cellValue = dom$2.ketchup.math.numberify(dom$2.ketchup.math.numberifySafe(cell.value));
|
|
1024
|
-
if (
|
|
1025
|
-
groupRow.group.totals[key] = Math.max(
|
|
1025
|
+
if (currentMaxValue) {
|
|
1026
|
+
groupRow.group.totals[key] = Math.max(currentMaxValue, cellValue);
|
|
1026
1027
|
}
|
|
1027
1028
|
else {
|
|
1028
1029
|
// first round
|
|
@@ -1042,37 +1043,37 @@ function updateGroupTotal(groupRow, totals, addedRow, distinctObj) {
|
|
|
1042
1043
|
parent = parent.group.parent;
|
|
1043
1044
|
}
|
|
1044
1045
|
}
|
|
1045
|
-
else if (
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
const currentTotalValue = groupRow.group.totals[key];
|
|
1052
|
-
if (currentTotalValue) {
|
|
1046
|
+
else if (cell.value &&
|
|
1047
|
+
dom$2.ketchup.objects.isDate(cell.obj)) {
|
|
1048
|
+
const cellValue = dom$2.ketchup.dates.toDayjs(cell.value);
|
|
1049
|
+
if (dom$2.ketchup.dates.isValid(cellValue)) {
|
|
1050
|
+
const currentMaxValue = groupRow.group.totals[key];
|
|
1051
|
+
if (currentMaxValue) {
|
|
1053
1052
|
let moments = [];
|
|
1054
1053
|
moments.push(cellValue);
|
|
1055
|
-
moments.push(dom$2.ketchup.dates.
|
|
1054
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentMaxValue));
|
|
1056
1055
|
groupRow.group.totals[key] =
|
|
1057
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments));
|
|
1056
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
|
|
1058
1057
|
}
|
|
1059
1058
|
else {
|
|
1060
|
-
groupRow.group.totals[key] =
|
|
1059
|
+
groupRow.group.totals[key] =
|
|
1060
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
1061
1061
|
}
|
|
1062
1062
|
// updating parents
|
|
1063
1063
|
let parent = groupRow.group.parent;
|
|
1064
1064
|
while (parent != null) {
|
|
1065
|
-
const
|
|
1066
|
-
if (
|
|
1065
|
+
const currentParentMax = parent.group.totals[key];
|
|
1066
|
+
if (currentParentMax) {
|
|
1067
1067
|
let moments = [];
|
|
1068
1068
|
moments.push(cellValue);
|
|
1069
|
-
moments.push(dom$2.ketchup.dates.
|
|
1069
|
+
moments.push(dom$2.ketchup.dates.toDayjs(currentParentMax));
|
|
1070
1070
|
parent.group.totals[key] =
|
|
1071
|
-
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments));
|
|
1071
|
+
dom$2.ketchup.dates.format(dom$2.ketchup.dates.max(moments), KupDatesFormats.ISO_DATE);
|
|
1072
1072
|
}
|
|
1073
1073
|
else {
|
|
1074
1074
|
// first round
|
|
1075
|
-
parent.group.totals[key] =
|
|
1075
|
+
parent.group.totals[key] =
|
|
1076
|
+
dom$2.ketchup.dates.format(cellValue, KupDatesFormats.ISO_DATE);
|
|
1076
1077
|
}
|
|
1077
1078
|
parent = parent.group.parent;
|
|
1078
1079
|
}
|
|
@@ -1161,9 +1162,7 @@ function adjustGroupAverageOrFormula(row, type, toAdjustKeys, totals) {
|
|
|
1161
1162
|
// adjust average/formulas
|
|
1162
1163
|
toAdjustKeys.forEach((key) => {
|
|
1163
1164
|
if (type == TotalMode.AVERAGE) {
|
|
1164
|
-
row.group.totals[key] =
|
|
1165
|
-
dom$2.ketchup.math.numberify(row.group.totals[key]) /
|
|
1166
|
-
numberOfLeaf;
|
|
1165
|
+
row.group.totals[key] = row.group.totals[key] / numberOfLeaf;
|
|
1167
1166
|
}
|
|
1168
1167
|
if (type == TotalMode.MATH) {
|
|
1169
1168
|
let formula = totals[key].substring(TotalMode.MATH.length);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h, a as getAssetPath } from './index-
|
|
2
|
-
import { K as KupThemeIconValues } from './kup-manager-
|
|
1
|
+
import { h, a as getAssetPath } from './index-c161a33e.js';
|
|
2
|
+
import { K as KupThemeIconValues } from './kup-manager-94b3d177.js';
|
|
3
3
|
|
|
4
4
|
const dom = document.documentElement;
|
|
5
5
|
/*-------------------------------------------------*/
|
|
@@ -55,7 +55,8 @@ function setContent(props) {
|
|
|
55
55
|
let value = props.value;
|
|
56
56
|
let inputType = (_a = props.inputType) !== null && _a !== void 0 ? _a : 'text';
|
|
57
57
|
let persManageForNumberFormat = false;
|
|
58
|
-
if (props.inputType === 'number' &&
|
|
58
|
+
if (props.inputType === 'number' &&
|
|
59
|
+
((props.decimals && props.decimals > 0) || props.group)) {
|
|
59
60
|
inputType = 'text';
|
|
60
61
|
persManageForNumberFormat = true;
|
|
61
62
|
}
|
|
@@ -99,7 +100,40 @@ function setContent(props) {
|
|
|
99
100
|
group: props.group,
|
|
100
101
|
integer: props.integers,
|
|
101
102
|
};
|
|
102
|
-
|
|
103
|
+
if (props.min !== undefined &&
|
|
104
|
+
props.min !== null &&
|
|
105
|
+
props.min >
|
|
106
|
+
parseFloat(e.target.value)) {
|
|
107
|
+
e.target.value =
|
|
108
|
+
formatValue(props.min.toString(), options, true);
|
|
109
|
+
}
|
|
110
|
+
else if (props.max !== undefined &&
|
|
111
|
+
props.max !== null &&
|
|
112
|
+
props.max <
|
|
113
|
+
parseFloat(e.target.value)) {
|
|
114
|
+
e.target.value =
|
|
115
|
+
formatValue(props.max.toString(), options, true);
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
e.target.value =
|
|
119
|
+
formatValue(e.target.value, options, true);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
if (props.min !== undefined &&
|
|
124
|
+
props.min !== null &&
|
|
125
|
+
props.min >
|
|
126
|
+
parseFloat(e.target.value)) {
|
|
127
|
+
e.target.value =
|
|
128
|
+
props.min.toString();
|
|
129
|
+
}
|
|
130
|
+
else if (props.max !== undefined &&
|
|
131
|
+
props.max !== null &&
|
|
132
|
+
props.max <
|
|
133
|
+
parseFloat(e.target.value)) {
|
|
134
|
+
e.target.value =
|
|
135
|
+
props.max.toString();
|
|
136
|
+
}
|
|
103
137
|
}
|
|
104
138
|
if (props.onChange) {
|
|
105
139
|
props.onChange(e);
|