@sme.up/ketchup 6.0.0 → 6.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/{cell-utils-a78d6fac.js → cell-utils-fe64a28c.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-5b69d882.js} +4 -4
- package/dist/cjs/f-cell-3a740c48.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-02e83f82.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-2a61ece2.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-09126bdd.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-9ee20a67.js} +3 -3
- package/dist/cjs/{index-eb556444.js → index-06b131ea.js} +6 -4
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +209 -193
- package/dist/cjs/kup-box.cjs.entry.js +1306 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +7 -7
- package/dist/cjs/kup-cell.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash-list.cjs.entry.js +4 -4
- package/dist/cjs/kup-dash_2.cjs.entry.js +4 -7
- package/dist/cjs/{kup-form-editor.cjs.entry.js → kup-dashboard.cjs.entry.js} +123 -148
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -4
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +53 -1338
- package/dist/cjs/kup-family-tree.cjs.entry.js +410 -0
- package/dist/cjs/kup-form.cjs.entry.js +480 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -11
- package/dist/cjs/kup-lazy.cjs.entry.js +4 -4
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-02acbb37.js} +407 -7
- package/dist/cjs/kup-nav-bar.cjs.entry.js +3 -3
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.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 +5 -5
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{utils-6287d878.js → utils-4b208b48.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/family-tree.js +2437 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +14 -6
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +135 -129
- package/dist/collection/components/kup-box/kup-box.js +13 -2
- package/dist/collection/components/kup-button/kup-button.js +1 -0
- package/dist/collection/components/kup-combobox/kup-combobox.js +16 -13
- package/dist/collection/components/kup-dashboard/kup-dashboard-declarations.js +10 -0
- package/dist/collection/components/{kup-form-editor/kup-form-editor.css → kup-dashboard/kup-dashboard.css} +7 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +148 -149
- package/dist/collection/components/kup-data-table/kup-data-table.js +7 -6
- package/dist/collection/components/kup-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +1 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +12 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +101 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +666 -0
- package/dist/collection/components/kup-form/kup-form-declarations.js +25 -0
- package/dist/collection/components/kup-form/kup-form.css +99 -0
- package/dist/collection/components/kup-form/kup-form.js +647 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-image-list/kup-image-list-state.js +9 -0
- package/dist/collection/components/kup-image-list/kup-image-list.css +0 -6
- package/dist/collection/components/kup-image-list/kup-image-list.js +113 -1
- package/dist/collection/components/kup-lazy/kup-lazy.css +13 -6
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +13 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +1 -1
- package/dist/collection/components/kup-text-field/kup-text-field-declarations.js +3 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +27 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +10 -4
- package/dist/collection/f-components/f-button/f-button.js +2 -2
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +5 -1
- package/dist/collection/f-components/f-cell/f-cell.js +34 -114
- package/dist/collection/f-components/f-text-field/f-text-field.js +1 -1
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +109 -1
- package/dist/collection/managers/kup-language/kup-language-declarations.js +11 -0
- package/dist/collection/managers/kup-objects/kup-objects.js +10 -0
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-cb5d4149.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-fd44ef70.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-7b159a22.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-c2e4c522.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-2ab4b9aa.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-ef537d82.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-41c575eb.js} +3 -3
- package/dist/esm/{index-baeab1ac.js → index-ad6ab214.js} +6 -4
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +4 -4
- package/dist/esm/kup-autocomplete_25.entry.js +199 -183
- package/dist/esm/kup-box.entry.js +1302 -0
- package/dist/esm/kup-calendar.entry.js +7 -7
- package/dist/esm/kup-cell.entry.js +9 -8
- package/dist/esm/kup-dash-list.entry.js +4 -4
- package/dist/esm/kup-dash_2.entry.js +4 -7
- package/dist/esm/{kup-form-editor.entry.js → kup-dashboard.entry.js} +123 -148
- package/dist/esm/kup-drawer.entry.js +4 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +54 -1338
- package/dist/esm/kup-family-tree.entry.js +406 -0
- package/dist/esm/kup-form.entry.js +476 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +72 -10
- package/dist/esm/kup-lazy.entry.js +4 -4
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-22a475e6.js} +404 -8
- package/dist/esm/kup-nav-bar.entry.js +3 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.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 +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-d7e4b3c2.js → utils-2c1f4122.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-06c6cc68.js +1 -0
- package/dist/ketchup/{p-3c11e615.entry.js → p-0dacd4bc.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1959f835.entry.js} +1 -1
- package/dist/ketchup/p-1c44dc62.entry.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-264b1b19.entry.js} +1 -1
- package/dist/ketchup/p-38d7584e.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-42080355.entry.js} +1 -1
- package/dist/ketchup/p-4bc9f98b.entry.js +1 -0
- package/dist/ketchup/p-578583db.entry.js +1 -0
- package/dist/ketchup/p-5866d507.entry.js +1 -0
- package/dist/ketchup/p-61059e9d.entry.js +9 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-664be494.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-67cd575d.entry.js} +1 -1
- package/dist/ketchup/{p-e0035c58.js → p-682a367a.js} +1 -1
- package/dist/ketchup/p-6ccf7eb2.entry.js +1 -0
- package/dist/ketchup/p-7230ab97.entry.js +1 -0
- package/dist/ketchup/p-752b4cef.entry.js +1 -0
- package/dist/ketchup/{p-954cc340.entry.js → p-7de3e7ac.entry.js} +1 -1
- package/dist/ketchup/p-928c5c36.js +1 -0
- package/dist/ketchup/{p-6dff70f8.entry.js → p-9b36497d.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-b982d137.entry.js} +1 -1
- package/dist/ketchup/{p-8cdf61a4.js → p-c0219e5e.js} +1 -1
- package/dist/ketchup/p-c55fd0a7.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d154b3a0.entry.js +1 -0
- package/dist/ketchup/p-d2affb6f.entry.js +27 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/{p-7454cb92.js → p-d6c12c6c.js} +1 -1
- package/dist/ketchup/p-da0eab60.entry.js +1 -0
- package/dist/ketchup/{p-7eff4eee.js → p-dc62a30f.js} +1 -1
- package/dist/ketchup/p-e9366aaf.entry.js +39 -0
- package/dist/ketchup/{p-44ec4f03.js → p-edae3076.js} +1 -1
- package/dist/ketchup/p-fc2b1229.js +30 -0
- package/dist/types/components/kup-autocomplete/kup-autocomplete.d.ts +1 -16
- package/dist/types/components/{kup-form-editor/kup-form-editor-declarations.d.ts → kup-dashboard/kup-dashboard-declarations.d.ts} +9 -27
- package/dist/types/components/{kup-form-editor/kup-form-editor.d.ts → kup-dashboard/kup-dashboard.d.ts} +12 -9
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +33 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +61 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +60 -0
- package/dist/types/components/kup-form/kup-form.d.ts +63 -0
- package/dist/types/components/kup-image-list/kup-image-list-state.d.ts +6 -0
- package/dist/types/components/kup-image-list/kup-image-list.d.ts +17 -0
- package/dist/types/components/kup-text-field/kup-text-field-declarations.d.ts +3 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +5 -0
- package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +0 -6
- package/dist/types/components/kup-tree/kup-tree-declarations.d.ts +2 -0
- package/dist/types/components.d.ts +460 -241
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +4 -1
- package/dist/types/f-components/f-text-field/f-text-field-declarations.d.ts +1 -0
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +8 -0
- package/dist/types/managers/kup-data/kup-data-node-helper.d.ts +15 -1
- package/dist/types/managers/kup-data/kup-data.d.ts +7 -1
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +11 -1
- package/dist/types/managers/kup-objects/kup-objects.d.ts +6 -0
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-field/kup-field-declarations.js +0 -15
- package/dist/collection/components/kup-field/kup-field.css +0 -48
- package/dist/collection/components/kup-field/kup-field.js +0 -514
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-4ffbc3ff.js +0 -1
- package/dist/ketchup/p-5264a3e6.entry.js +0 -1
- package/dist/ketchup/p-65974e48.entry.js +0 -1
- package/dist/ketchup/p-65b46587.entry.js +0 -40
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-aca0e54b.js +0 -30
- package/dist/ketchup/p-b8939a8b.entry.js +0 -1
- package/dist/ketchup/p-bfc3bac7.js +0 -1
- package/dist/ketchup/p-c5ce8951.entry.js +0 -1
- package/dist/ketchup/p-cad1e097.entry.js +0 -9
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
- package/dist/ketchup/p-ea10176c.entry.js +0 -1
- package/dist/types/components/kup-field/kup-field-declarations.d.ts +0 -25
- package/dist/types/components/kup-field/kup-field.d.ts +0 -90
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { KupTagNames } from '../../types/GenericTypes';
|
|
2
|
-
import {
|
|
1
|
+
import { KupTagNames, } from '../../types/GenericTypes';
|
|
2
|
+
import { autoCenterComps, editableTypes, FCellClasses, FCellEvents, FCellTypes, fullWidthFieldsComps, kupTypes, } from './f-cell-declarations';
|
|
3
3
|
import { h } from '@stencil/core';
|
|
4
4
|
import { getCellValueForDisplay } from '../../utils/cell-utils';
|
|
5
5
|
import { FCheckbox } from '../f-checkbox/f-checkbox';
|
|
@@ -8,6 +8,7 @@ import { stringToNumber } from '../../utils/utils';
|
|
|
8
8
|
import { FImage } from '../f-image/f-image';
|
|
9
9
|
import { FChip } from '../f-chip/f-chip';
|
|
10
10
|
import { KupThemeColorValues } from '../../managers/kup-theme/kup-theme-declarations';
|
|
11
|
+
import { FSwitch } from '../f-switch/f-switch';
|
|
11
12
|
const dom = document.documentElement;
|
|
12
13
|
/*-------------------------------------------------*/
|
|
13
14
|
/* C o m p o n e n t */
|
|
@@ -26,7 +27,7 @@ export const FCell = (props, children) => {
|
|
|
26
27
|
const hasObj = !dom.ketchup.objects.isEmptyKupObj(cell.obj);
|
|
27
28
|
const isEditable = cell.isEditable && props.editable ? true : false;
|
|
28
29
|
const valueToDisplay = props.previousValue !== cell.value ? cell.value : '';
|
|
29
|
-
const cellType =
|
|
30
|
+
const cellType = dom.ketchup.data.cell.getType(cell, shape);
|
|
30
31
|
const subcomponentProps = Object.assign({}, cell.data);
|
|
31
32
|
let cssClasses = cell.cssClass
|
|
32
33
|
? cell.cssClass
|
|
@@ -201,27 +202,28 @@ function setCellSizeKup(cellType, subcomponentProps, cell) {
|
|
|
201
202
|
function setEditableCell(cellType, classObj, cell, column, props) {
|
|
202
203
|
switch (cellType) {
|
|
203
204
|
case FCellTypes.AUTOCOMPLETE:
|
|
204
|
-
return (h("kup-autocomplete", Object.assign({}, cell.data, { class:
|
|
205
|
+
return (h("kup-autocomplete", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-autocomplete-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-autocomplete-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), "onkup-autocomplete-iconclick": (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
205
206
|
case FCellTypes.CHECKBOX:
|
|
206
|
-
if (
|
|
207
|
-
.tagName)) {
|
|
207
|
+
if (isAutoCentered(props)) {
|
|
208
208
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
209
209
|
}
|
|
210
210
|
return (h(FCheckbox, Object.assign({}, cell.data, { onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
211
211
|
case FCellTypes.COLOR_PICKER:
|
|
212
|
-
return (h("kup-color-picker", Object.assign({}, cell.data, { class:
|
|
212
|
+
return (h("kup-color-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', disabled: false, "onkup-colorpicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
213
213
|
case FCellTypes.COMBOBOX:
|
|
214
|
-
return (h("kup-combobox", Object.assign({}, cell.data, { class:
|
|
214
|
+
return (h("kup-combobox", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-combobox-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-combobox-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), "onkup-combobox-iconclick": (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
215
215
|
case FCellTypes.DATE:
|
|
216
|
-
return (h("kup-date-picker", Object.assign({ initialValue: cell.value }, cell.data, { class:
|
|
216
|
+
return (h("kup-date-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-datepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-datepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
|
|
217
217
|
case FCellTypes.RATING:
|
|
218
218
|
return (h("kup-rating", Object.assign({}, cell.data, { disabled: false, "onkup-rating-click": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
219
|
+
case FCellTypes.SWITCH:
|
|
220
|
+
return (h(FSwitch, Object.assign({}, cell.data, { disabled: false, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE) })));
|
|
219
221
|
case FCellTypes.TIME:
|
|
220
|
-
return (h("kup-time-picker", Object.assign({ initialValue: cell.value }, cell.data, { class:
|
|
222
|
+
return (h("kup-time-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: isFullWidth(props) ? 'kup-full-width' : '', "onkup-timepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-timepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
|
|
221
223
|
case FCellTypes.NUMBER:
|
|
222
224
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
223
225
|
case FCellTypes.STRING:
|
|
224
|
-
return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: true, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
|
|
226
|
+
return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: isFullWidth(props) ? true : false, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
|
|
225
227
|
? stringToNumber(cell.value).toString()
|
|
226
228
|
: cell.value, onChange: (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), onInput: (e) => cellEvent(e, props, cellType, FCellEvents.INPUT), onIconClick: (e) => cellEvent(e, props, cellType, FCellEvents.ICON_CLICK) })));
|
|
227
229
|
}
|
|
@@ -239,8 +241,7 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
|
|
|
239
241
|
}
|
|
240
242
|
return content;
|
|
241
243
|
case FCellTypes.CHECKBOX:
|
|
242
|
-
if (
|
|
243
|
-
.tagName)) {
|
|
244
|
+
if (isAutoCentered(props)) {
|
|
244
245
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
245
246
|
}
|
|
246
247
|
return (h(FImage, { resource: subcomponentProps.checked
|
|
@@ -250,8 +251,7 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
|
|
|
250
251
|
return h("div", { innerHTML: cell.value });
|
|
251
252
|
case FCellTypes.ICON:
|
|
252
253
|
case FCellTypes.IMAGE:
|
|
253
|
-
if (
|
|
254
|
-
.tagName)) {
|
|
254
|
+
if (isAutoCentered(props)) {
|
|
255
255
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
256
256
|
}
|
|
257
257
|
if (subcomponentProps.badgeData) {
|
|
@@ -267,13 +267,18 @@ function setCell(cellType, subcomponentProps, content, classObj, cell, column, p
|
|
|
267
267
|
if (cellValueNumber < 0) {
|
|
268
268
|
classObj[FCellClasses.TEXT_DANGER] = true;
|
|
269
269
|
}
|
|
270
|
-
if (
|
|
271
|
-
.tagName)) {
|
|
270
|
+
if (isAutoCentered(props)) {
|
|
272
271
|
classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
|
|
273
272
|
}
|
|
274
273
|
return h("div", { class: "f-cell__text" }, cellValue);
|
|
275
274
|
}
|
|
276
275
|
return h("div", { class: "f-cell__text" }, content);
|
|
276
|
+
case FCellTypes.SWITCH:
|
|
277
|
+
if (isAutoCentered(props)) {
|
|
278
|
+
classObj[FCellClasses.C_CENTERED] = true;
|
|
279
|
+
}
|
|
280
|
+
subcomponentProps['disabled'] = true;
|
|
281
|
+
return h(FSwitch, Object.assign({}, subcomponentProps));
|
|
277
282
|
default:
|
|
278
283
|
return h("div", { class: "f-cell__text" }, content);
|
|
279
284
|
}
|
|
@@ -293,14 +298,12 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
293
298
|
h(FImage, Object.assign({}, subcomponentProps))));
|
|
294
299
|
}
|
|
295
300
|
case FCellTypes.BUTTON:
|
|
296
|
-
if (
|
|
297
|
-
.tagName)) {
|
|
301
|
+
if (isAutoCentered(props)) {
|
|
298
302
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
299
303
|
}
|
|
300
304
|
return (h("kup-button", Object.assign({}, subcomponentProps, { "onkup-button-click": (e) => cellEvent(e, props, cellType, FCellEvents.CLICK) })));
|
|
301
305
|
case FCellTypes.BUTTON_LIST:
|
|
302
|
-
if (
|
|
303
|
-
.tagName)) {
|
|
306
|
+
if (isAutoCentered(props)) {
|
|
304
307
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
305
308
|
}
|
|
306
309
|
subcomponentProps['data-storage'] = {
|
|
@@ -310,23 +313,21 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
310
313
|
};
|
|
311
314
|
return h("kup-button-list", Object.assign({}, subcomponentProps));
|
|
312
315
|
case FCellTypes.CHART:
|
|
313
|
-
if (
|
|
314
|
-
.tagName)) {
|
|
316
|
+
if (isAutoCentered(props)) {
|
|
315
317
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
316
318
|
}
|
|
317
319
|
return h("kup-chart", Object.assign({}, subcomponentProps));
|
|
318
320
|
case FCellTypes.CHIP:
|
|
319
321
|
return h(FChip, Object.assign({}, subcomponentProps));
|
|
320
322
|
case FCellTypes.COLOR_PICKER:
|
|
321
|
-
return (h("kup-color-picker", Object.assign({}, subcomponentProps, { class:
|
|
323
|
+
return (h("kup-color-picker", Object.assign({}, subcomponentProps, { class: isFullWidth(props) ? 'kup-full-width' : '', disabled: true })));
|
|
322
324
|
case FCellTypes.GAUGE:
|
|
323
325
|
return (h("kup-gauge", Object.assign({ value: stringToNumber(cell.value), "width-component": "280px" }, subcomponentProps)));
|
|
324
326
|
case FCellTypes.KNOB:
|
|
325
327
|
case FCellTypes.PROGRESS_BAR:
|
|
326
328
|
return h("kup-progress-bar", Object.assign({}, subcomponentProps));
|
|
327
329
|
case FCellTypes.RADIO:
|
|
328
|
-
if (
|
|
329
|
-
.tagName)) {
|
|
330
|
+
if (isAutoCentered(props)) {
|
|
330
331
|
classObj[FCellClasses.C_CENTERED] = true;
|
|
331
332
|
}
|
|
332
333
|
subcomponentProps['disabled'] = row.readOnly;
|
|
@@ -335,94 +336,6 @@ function setKupCell(cellType, classObj, subcomponentProps, cell, row, column, pr
|
|
|
335
336
|
return h("kup-rating", Object.assign({}, subcomponentProps, { disabled: true }));
|
|
336
337
|
}
|
|
337
338
|
}
|
|
338
|
-
function getCellType(cell, shape) {
|
|
339
|
-
const obj = cell.obj;
|
|
340
|
-
if (shape) {
|
|
341
|
-
switch (shape.toUpperCase()) {
|
|
342
|
-
case FCellShapes.AUTOCOMPLETE:
|
|
343
|
-
return FCellTypes.AUTOCOMPLETE;
|
|
344
|
-
case FCellShapes.BUTTON_LIST:
|
|
345
|
-
return FCellTypes.BUTTON_LIST;
|
|
346
|
-
case FCellShapes.CHART:
|
|
347
|
-
return FCellTypes.CHART;
|
|
348
|
-
case FCellShapes.CHECKBOX:
|
|
349
|
-
return FCellTypes.CHECKBOX;
|
|
350
|
-
case FCellShapes.CHIP:
|
|
351
|
-
return FCellTypes.CHIP;
|
|
352
|
-
case FCellShapes.COLOR_PICKER:
|
|
353
|
-
return FCellTypes.COLOR_PICKER;
|
|
354
|
-
case FCellShapes.COMBOBOX:
|
|
355
|
-
return FCellTypes.COMBOBOX;
|
|
356
|
-
case FCellShapes.EDITOR:
|
|
357
|
-
return FCellTypes.EDITOR;
|
|
358
|
-
case FCellShapes.GAUGE:
|
|
359
|
-
return FCellTypes.GAUGE;
|
|
360
|
-
case FCellShapes.IMAGE:
|
|
361
|
-
return FCellTypes.IMAGE;
|
|
362
|
-
case FCellShapes.KNOB:
|
|
363
|
-
return FCellTypes.KNOB;
|
|
364
|
-
case FCellShapes.PROGRESS_BAR:
|
|
365
|
-
return FCellTypes.PROGRESS_BAR;
|
|
366
|
-
case FCellShapes.RADIO:
|
|
367
|
-
return FCellTypes.RADIO;
|
|
368
|
-
case FCellShapes.RATING:
|
|
369
|
-
return FCellTypes.RATING;
|
|
370
|
-
case FCellShapes.TEXT_FIELD:
|
|
371
|
-
return FCellTypes.STRING;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
if (dom.ketchup.objects.isBar(obj)) {
|
|
375
|
-
return FCellTypes.BAR;
|
|
376
|
-
}
|
|
377
|
-
else if (dom.ketchup.objects.isButton(obj)) {
|
|
378
|
-
return FCellTypes.BUTTON;
|
|
379
|
-
}
|
|
380
|
-
else if (dom.ketchup.objects.isChart(obj)) {
|
|
381
|
-
return FCellTypes.CHART;
|
|
382
|
-
}
|
|
383
|
-
else if (dom.ketchup.objects.isCheckbox(obj)) {
|
|
384
|
-
return FCellTypes.CHECKBOX;
|
|
385
|
-
}
|
|
386
|
-
else if (dom.ketchup.objects.isColor(obj)) {
|
|
387
|
-
return FCellTypes.COLOR_PICKER;
|
|
388
|
-
}
|
|
389
|
-
else if (dom.ketchup.objects.isIcon(obj)) {
|
|
390
|
-
return FCellTypes.ICON;
|
|
391
|
-
}
|
|
392
|
-
else if (dom.ketchup.objects.isImage(obj)) {
|
|
393
|
-
return FCellTypes.IMAGE;
|
|
394
|
-
}
|
|
395
|
-
else if (dom.ketchup.objects.isLink(obj)) {
|
|
396
|
-
return FCellTypes.LINK;
|
|
397
|
-
}
|
|
398
|
-
else if (dom.ketchup.objects.isProgressBar(obj)) {
|
|
399
|
-
return FCellTypes.PROGRESS_BAR;
|
|
400
|
-
}
|
|
401
|
-
else if (dom.ketchup.objects.isRadio(obj)) {
|
|
402
|
-
return FCellTypes.RADIO;
|
|
403
|
-
}
|
|
404
|
-
else if (dom.ketchup.objects.isKupObjList(obj)) {
|
|
405
|
-
return FCellTypes.CHIP;
|
|
406
|
-
}
|
|
407
|
-
else if (dom.ketchup.objects.isNumber(obj)) {
|
|
408
|
-
return FCellTypes.NUMBER;
|
|
409
|
-
}
|
|
410
|
-
else if (dom.ketchup.objects.isDate(obj)) {
|
|
411
|
-
return FCellTypes.DATE;
|
|
412
|
-
}
|
|
413
|
-
else if (dom.ketchup.objects.isTimestamp(obj)) {
|
|
414
|
-
return FCellTypes.DATETIME;
|
|
415
|
-
}
|
|
416
|
-
else if (dom.ketchup.objects.isTime(obj)) {
|
|
417
|
-
return FCellTypes.TIME;
|
|
418
|
-
}
|
|
419
|
-
else if (dom.ketchup.objects.isVoCodver(obj)) {
|
|
420
|
-
return FCellTypes.ICON;
|
|
421
|
-
}
|
|
422
|
-
else {
|
|
423
|
-
return FCellTypes.STRING;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
339
|
function cellEvent(e, props, cellType, cellEventName) {
|
|
427
340
|
const cell = props.cell;
|
|
428
341
|
const column = props.column;
|
|
@@ -443,6 +356,7 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
443
356
|
}
|
|
444
357
|
break;
|
|
445
358
|
case FCellTypes.CHECKBOX:
|
|
359
|
+
case FCellTypes.SWITCH:
|
|
446
360
|
value = value === 'on' ? '0' : '1';
|
|
447
361
|
if (cell.data) {
|
|
448
362
|
cell.data.checked =
|
|
@@ -479,3 +393,9 @@ function cellEvent(e, props, cellType, cellEventName) {
|
|
|
479
393
|
catch (error) { }
|
|
480
394
|
}
|
|
481
395
|
}
|
|
396
|
+
function isAutoCentered(props) {
|
|
397
|
+
return autoCenterComps.includes(props.component.rootElement.tagName);
|
|
398
|
+
}
|
|
399
|
+
function isFullWidth(props) {
|
|
400
|
+
return fullWidthFieldsComps.includes(props.component.rootElement.tagName);
|
|
401
|
+
}
|
|
@@ -55,7 +55,7 @@ function setContent(props) {
|
|
|
55
55
|
props.maxLength)) : undefined,
|
|
56
56
|
!props.trailingIcon ? iconEl : undefined,
|
|
57
57
|
props.textArea ? (h("span", { class: "mdc-text-field__resizer" },
|
|
58
|
-
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
|
|
58
|
+
h("textarea", { class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown }))) : (h("input", { type: props.inputType ? props.inputType : 'text', step: props.step, min: props.min, max: props.max, name: props.name, class: "mdc-text-field__input", disabled: props.disabled, readOnly: props.readOnly, placeholder: props.fullWidth ? props.label : undefined, maxlength: props.maxLength, value: props.value, onBlur: props.onBlur, onClick: props.onClick, onChange: props.onChange, onFocus: props.onFocus, onInput: props.onInput, onKeyDown: props.onKeyDown })),
|
|
59
59
|
props.isClearable ? (h("span", { class: `mdc-text-field__icon kup-icon ${KupThemeIconValues.CLEAR.replace('--', '')}`, onClick: props.onClearIconClick })) : undefined,
|
|
60
60
|
props.trailingIcon ? iconEl : undefined,
|
|
61
61
|
!props.fullWidth && !isOutlined ? labelEl : undefined,
|
|
@@ -70,6 +70,44 @@ export function toStreamNode(nodes) {
|
|
|
70
70
|
}
|
|
71
71
|
return streamlined;
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets information about the tree depth, such as max number of children and max depth.
|
|
75
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
76
|
+
* @returns {KupDataNodeDrilldownInfo} Information about the tree depth.
|
|
77
|
+
*/
|
|
78
|
+
export function getDrilldownInfoNode(nodes) {
|
|
79
|
+
let maxChildren = 0;
|
|
80
|
+
let maxDepth = 0;
|
|
81
|
+
const getDepth = function (n) {
|
|
82
|
+
const depth = 0;
|
|
83
|
+
if (n.children) {
|
|
84
|
+
n.children.forEach(function (d) {
|
|
85
|
+
const tmpDepth = getDepth(d);
|
|
86
|
+
if (tmpDepth > depth) {
|
|
87
|
+
maxDepth = tmpDepth;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return depth;
|
|
92
|
+
};
|
|
93
|
+
const recursive = (arr) => {
|
|
94
|
+
maxDepth++;
|
|
95
|
+
for (let index = 0; index < arr.length; index++) {
|
|
96
|
+
const node = arr[index];
|
|
97
|
+
getDepth(node);
|
|
98
|
+
if (Array.isArray(node.children) &&
|
|
99
|
+
maxChildren < node.children.length) {
|
|
100
|
+
maxChildren = node.children.length;
|
|
101
|
+
recursive(node.children);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
recursive(nodes);
|
|
106
|
+
return {
|
|
107
|
+
maxChildren,
|
|
108
|
+
maxDepth,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
73
111
|
/**
|
|
74
112
|
* Returns the parent of the given node.
|
|
75
113
|
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
@@ -94,3 +132,34 @@ export function getParentNode(nodes, child) {
|
|
|
94
132
|
}
|
|
95
133
|
return parent;
|
|
96
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Returns the node with id equal to the given value.
|
|
137
|
+
* @param {KupDataNode[]} nodes - Input array of nodes.
|
|
138
|
+
* @param {string} treeNodePath - Tree node path.
|
|
139
|
+
* @returns {KupDataNode} Node.
|
|
140
|
+
*/
|
|
141
|
+
export function getNodeByPath(nodes, treeNodePath) {
|
|
142
|
+
if (!nodes || nodes.length == 0) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
if (!treeNodePath || treeNodePath.length == 0) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
return _getNodeByPath(nodes, treeNodePath);
|
|
149
|
+
}
|
|
150
|
+
function _getNodeByPath(nodes, path) {
|
|
151
|
+
let node = null;
|
|
152
|
+
for (let j = 0; j < path.length; j++) {
|
|
153
|
+
const i = path[j];
|
|
154
|
+
node = _getNode(nodes, node, i);
|
|
155
|
+
}
|
|
156
|
+
return node;
|
|
157
|
+
}
|
|
158
|
+
function _getNode(nodes, node, index) {
|
|
159
|
+
if (node == null) {
|
|
160
|
+
return nodes[index];
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
return node.children[index];
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -2,9 +2,10 @@ import { KupDataNewColumnTypes, } from './kup-data-declarations';
|
|
|
2
2
|
import { findCell, getCellValue, replaceCell } from './kup-data-cell-helper';
|
|
3
3
|
import { findColumns, hideColumns, newColumn } from './kup-data-column-helper';
|
|
4
4
|
import { findRow, toNode } from './kup-data-row-helper';
|
|
5
|
-
import { getParentNode, removeNode, setPropertiesNode, toStreamNode, } from './kup-data-node-helper';
|
|
5
|
+
import { getDrilldownInfoNode, getNodeByPath, getParentNode, removeNode, setPropertiesNode, toStreamNode, } from './kup-data-node-helper';
|
|
6
6
|
import { fieldColumn } from '../../components/kup-data-table/kup-data-table-declarations';
|
|
7
7
|
import { KupDebugCategory } from '../kup-debug/kup-debug-declarations';
|
|
8
|
+
import { FCellShapes, FCellTypes, } from '../../f-components/f-cell/f-cell-declarations';
|
|
8
9
|
const dom = document.documentElement;
|
|
9
10
|
/**
|
|
10
11
|
* Handles data operations.
|
|
@@ -22,6 +23,99 @@ export class KupData {
|
|
|
22
23
|
replace(dataset, cell, columns) {
|
|
23
24
|
return replaceCell(dataset, cell, columns);
|
|
24
25
|
},
|
|
26
|
+
getType(cell, shape) {
|
|
27
|
+
const obj = cell.obj;
|
|
28
|
+
if (shape) {
|
|
29
|
+
switch (shape.toUpperCase()) {
|
|
30
|
+
case FCellShapes.AUTOCOMPLETE:
|
|
31
|
+
return FCellTypes.AUTOCOMPLETE;
|
|
32
|
+
case FCellShapes.BUTTON_LIST:
|
|
33
|
+
return FCellTypes.BUTTON_LIST;
|
|
34
|
+
case FCellShapes.CHART:
|
|
35
|
+
return FCellTypes.CHART;
|
|
36
|
+
case FCellShapes.CHECKBOX:
|
|
37
|
+
return FCellTypes.CHECKBOX;
|
|
38
|
+
case FCellShapes.CHIP:
|
|
39
|
+
return FCellTypes.CHIP;
|
|
40
|
+
case FCellShapes.COLOR_PICKER:
|
|
41
|
+
return FCellTypes.COLOR_PICKER;
|
|
42
|
+
case FCellShapes.COMBOBOX:
|
|
43
|
+
return FCellTypes.COMBOBOX;
|
|
44
|
+
case FCellShapes.EDITOR:
|
|
45
|
+
return FCellTypes.EDITOR;
|
|
46
|
+
case FCellShapes.GAUGE:
|
|
47
|
+
return FCellTypes.GAUGE;
|
|
48
|
+
case FCellShapes.IMAGE:
|
|
49
|
+
return FCellTypes.IMAGE;
|
|
50
|
+
case FCellShapes.KNOB:
|
|
51
|
+
return FCellTypes.KNOB;
|
|
52
|
+
case FCellShapes.PROGRESS_BAR:
|
|
53
|
+
return FCellTypes.PROGRESS_BAR;
|
|
54
|
+
case FCellShapes.RADIO:
|
|
55
|
+
return FCellTypes.RADIO;
|
|
56
|
+
case FCellShapes.RATING:
|
|
57
|
+
return FCellTypes.RATING;
|
|
58
|
+
case FCellShapes.SWITCH:
|
|
59
|
+
return FCellTypes.SWITCH;
|
|
60
|
+
case FCellShapes.TEXT_FIELD:
|
|
61
|
+
return FCellTypes.STRING;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (dom.ketchup.objects.isBar(obj)) {
|
|
65
|
+
return FCellTypes.BAR;
|
|
66
|
+
}
|
|
67
|
+
else if (dom.ketchup.objects.isButton(obj)) {
|
|
68
|
+
return FCellTypes.BUTTON;
|
|
69
|
+
}
|
|
70
|
+
else if (dom.ketchup.objects.isChart(obj)) {
|
|
71
|
+
return FCellTypes.CHART;
|
|
72
|
+
}
|
|
73
|
+
else if (dom.ketchup.objects.isCheckbox(obj)) {
|
|
74
|
+
return FCellTypes.CHECKBOX;
|
|
75
|
+
}
|
|
76
|
+
else if (dom.ketchup.objects.isColor(obj)) {
|
|
77
|
+
return FCellTypes.COLOR_PICKER;
|
|
78
|
+
}
|
|
79
|
+
else if (dom.ketchup.objects.isIcon(obj)) {
|
|
80
|
+
return FCellTypes.ICON;
|
|
81
|
+
}
|
|
82
|
+
else if (dom.ketchup.objects.isImage(obj)) {
|
|
83
|
+
return FCellTypes.IMAGE;
|
|
84
|
+
}
|
|
85
|
+
else if (dom.ketchup.objects.isLink(obj)) {
|
|
86
|
+
return FCellTypes.LINK;
|
|
87
|
+
}
|
|
88
|
+
else if (dom.ketchup.objects.isProgressBar(obj)) {
|
|
89
|
+
return FCellTypes.PROGRESS_BAR;
|
|
90
|
+
}
|
|
91
|
+
else if (dom.ketchup.objects.isRadio(obj)) {
|
|
92
|
+
return FCellTypes.RADIO;
|
|
93
|
+
}
|
|
94
|
+
else if (dom.ketchup.objects.isSwitch(obj)) {
|
|
95
|
+
return FCellTypes.SWITCH;
|
|
96
|
+
}
|
|
97
|
+
else if (dom.ketchup.objects.isKupObjList(obj)) {
|
|
98
|
+
return FCellTypes.CHIP;
|
|
99
|
+
}
|
|
100
|
+
else if (dom.ketchup.objects.isNumber(obj)) {
|
|
101
|
+
return FCellTypes.NUMBER;
|
|
102
|
+
}
|
|
103
|
+
else if (dom.ketchup.objects.isDate(obj)) {
|
|
104
|
+
return FCellTypes.DATE;
|
|
105
|
+
}
|
|
106
|
+
else if (dom.ketchup.objects.isTimestamp(obj)) {
|
|
107
|
+
return FCellTypes.DATETIME;
|
|
108
|
+
}
|
|
109
|
+
else if (dom.ketchup.objects.isTime(obj)) {
|
|
110
|
+
return FCellTypes.TIME;
|
|
111
|
+
}
|
|
112
|
+
else if (dom.ketchup.objects.isVoCodver(obj)) {
|
|
113
|
+
return FCellTypes.ICON;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
return FCellTypes.STRING;
|
|
117
|
+
}
|
|
118
|
+
},
|
|
25
119
|
};
|
|
26
120
|
this.column = {
|
|
27
121
|
find(dataset, filters) {
|
|
@@ -35,9 +129,23 @@ export class KupData {
|
|
|
35
129
|
},
|
|
36
130
|
};
|
|
37
131
|
this.node = {
|
|
132
|
+
getDrilldownInfo(nodes) {
|
|
133
|
+
return getDrilldownInfoNode(nodes);
|
|
134
|
+
},
|
|
38
135
|
getParent(nodes, child) {
|
|
39
136
|
return getParentNode(nodes, child);
|
|
40
137
|
},
|
|
138
|
+
find(nodes, treeNodePath) {
|
|
139
|
+
return getNodeByPath(nodes, treeNodePath);
|
|
140
|
+
},
|
|
141
|
+
findByStrTreeNodePath(nodes, treeNodePath) {
|
|
142
|
+
const split = treeNodePath.split(',');
|
|
143
|
+
const path = [];
|
|
144
|
+
for (let i = 0; i < split.length; i++) {
|
|
145
|
+
path.push(Number(split[i]));
|
|
146
|
+
}
|
|
147
|
+
return getNodeByPath(nodes, path);
|
|
148
|
+
},
|
|
41
149
|
remove(nodes, node2remove) {
|
|
42
150
|
return removeNode(nodes, node2remove);
|
|
43
151
|
},
|
|
@@ -36,6 +36,17 @@ export var KupLanguageColumn;
|
|
|
36
36
|
KupLanguageColumn["NON_NUMERICAL_IN_TABLE"] = "columnNonNumericalInTable";
|
|
37
37
|
KupLanguageColumn["SWAP"] = "columnSwap";
|
|
38
38
|
})(KupLanguageColumn || (KupLanguageColumn = {}));
|
|
39
|
+
/**
|
|
40
|
+
* Dashboard related decodes.
|
|
41
|
+
*/
|
|
42
|
+
export var KupLanguageDashboard;
|
|
43
|
+
(function (KupLanguageDashboard) {
|
|
44
|
+
KupLanguageDashboard["DIMENSION"] = "dashboardDimension";
|
|
45
|
+
KupLanguageDashboard["LOADED"] = "dashboardLoaded";
|
|
46
|
+
KupLanguageDashboard["RESET"] = "dashboardReset";
|
|
47
|
+
KupLanguageDashboard["SAVE"] = "dashboardSave";
|
|
48
|
+
KupLanguageDashboard["VERTICAL"] = "dashboardVertical";
|
|
49
|
+
})(KupLanguageDashboard || (KupLanguageDashboard = {}));
|
|
39
50
|
/**
|
|
40
51
|
* Debug widget decodes.
|
|
41
52
|
*/
|
|
@@ -228,6 +228,16 @@ export class KupObjects {
|
|
|
228
228
|
!this.isRadio(obj) &&
|
|
229
229
|
!this.isChart(obj));
|
|
230
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* Checks whether the object represents a switch or not.
|
|
233
|
+
* @param {KupObj} obj - Object to check.
|
|
234
|
+
* @returns {boolean} True when the object is a switch.
|
|
235
|
+
*/
|
|
236
|
+
isSwitch(obj) {
|
|
237
|
+
if (!obj)
|
|
238
|
+
return false;
|
|
239
|
+
return 'V2' === obj.t && 'ONOFF' === obj.p;
|
|
240
|
+
}
|
|
231
241
|
/**
|
|
232
242
|
* Checks whether the object represents a text field or not.
|
|
233
243
|
* @param {KupObj} obj - Object to check.
|
|
@@ -12,9 +12,11 @@ export const fButtonUsers = [
|
|
|
12
12
|
KupTagNames.BOX,
|
|
13
13
|
KupTagNames.CALENDAR,
|
|
14
14
|
KupTagNames.CARD,
|
|
15
|
+
KupTagNames.DASHBOARD,
|
|
15
16
|
KupTagNames.DATA_TABLE,
|
|
16
17
|
KupTagNames.DROPDOWN_BUTTON,
|
|
17
|
-
KupTagNames.
|
|
18
|
+
KupTagNames.FAMILY_TREE,
|
|
19
|
+
KupTagNames.FORM,
|
|
18
20
|
KupTagNames.IMAGE_LIST,
|
|
19
21
|
KupTagNames.SNACKBAR,
|
|
20
22
|
];
|
|
@@ -25,6 +27,7 @@ export const fCellUsers = [
|
|
|
25
27
|
KupTagNames.BOX,
|
|
26
28
|
KupTagNames.CELL,
|
|
27
29
|
KupTagNames.DATA_TABLE,
|
|
30
|
+
KupTagNames.FORM,
|
|
28
31
|
KupTagNames.TREE,
|
|
29
32
|
];
|
|
30
33
|
/**
|
|
@@ -34,7 +37,9 @@ export const fCheckboxUsers = [
|
|
|
34
37
|
KupTagNames.BOX,
|
|
35
38
|
KupTagNames.CELL,
|
|
36
39
|
KupTagNames.CHECKBOX,
|
|
40
|
+
KupTagNames.DASHBOARD,
|
|
37
41
|
KupTagNames.DATA_TABLE,
|
|
42
|
+
KupTagNames.FORM,
|
|
38
43
|
KupTagNames.LIST,
|
|
39
44
|
KupTagNames.TREE,
|
|
40
45
|
];
|
|
@@ -47,6 +52,7 @@ export const fChipUsers = [
|
|
|
47
52
|
KupTagNames.CELL,
|
|
48
53
|
KupTagNames.CHIP,
|
|
49
54
|
KupTagNames.DATA_TABLE,
|
|
55
|
+
KupTagNames.FORM,
|
|
50
56
|
KupTagNames.TREE,
|
|
51
57
|
];
|
|
52
58
|
/**
|
|
@@ -62,9 +68,11 @@ export const fImageUsers = [
|
|
|
62
68
|
KupTagNames.CARD,
|
|
63
69
|
KupTagNames.CELL,
|
|
64
70
|
KupTagNames.CHIP,
|
|
71
|
+
KupTagNames.DASHBOARD,
|
|
65
72
|
KupTagNames.DATA_TABLE,
|
|
66
73
|
KupTagNames.DROPDOWN_BUTTON,
|
|
67
|
-
KupTagNames.
|
|
74
|
+
KupTagNames.FAMILY_TREE,
|
|
75
|
+
KupTagNames.FORM,
|
|
68
76
|
KupTagNames.IMAGE,
|
|
69
77
|
KupTagNames.IMAGE_LIST,
|
|
70
78
|
KupTagNames.LIST,
|
|
@@ -80,7 +88,14 @@ export const fPaginatorUsers = [KupTagNames.BOX, KupTagNames.DATA_TABLE];
|
|
|
80
88
|
/**
|
|
81
89
|
* Components using the FSwitch functional component.
|
|
82
90
|
*/
|
|
83
|
-
export const fSwitchUsers = [
|
|
91
|
+
export const fSwitchUsers = [
|
|
92
|
+
KupTagNames.BOX,
|
|
93
|
+
KupTagNames.CELL,
|
|
94
|
+
KupTagNames.DATA_TABLE,
|
|
95
|
+
KupTagNames.FORM,
|
|
96
|
+
KupTagNames.SWITCH,
|
|
97
|
+
KupTagNames.TREE,
|
|
98
|
+
];
|
|
84
99
|
/**
|
|
85
100
|
* Components using the FTextField functional component.
|
|
86
101
|
*/
|
|
@@ -90,8 +105,10 @@ export const fTextFieldUsers = [
|
|
|
90
105
|
KupTagNames.CELL,
|
|
91
106
|
KupTagNames.COLOR_PICKER,
|
|
92
107
|
KupTagNames.COMBOBOX,
|
|
108
|
+
KupTagNames.DASHBOARD,
|
|
93
109
|
KupTagNames.DATA_TABLE,
|
|
94
110
|
KupTagNames.DATE_PICKER,
|
|
111
|
+
KupTagNames.FORM,
|
|
95
112
|
KupTagNames.NUMERIC_PICKER,
|
|
96
113
|
KupTagNames.TEXT_FIELD,
|
|
97
114
|
KupTagNames.TIME_PICKER,
|
|
@@ -19,12 +19,13 @@ export var KupTagNames;
|
|
|
19
19
|
KupTagNames["COMBOBOX"] = "KUP-COMBOBOX";
|
|
20
20
|
KupTagNames["DASH"] = "KUP-DASH";
|
|
21
21
|
KupTagNames["DASH_LIST"] = "KUP-DASH-LIST";
|
|
22
|
+
KupTagNames["DASHBOARD"] = "KUP-DASHBOARD";
|
|
22
23
|
KupTagNames["DATA_TABLE"] = "KUP-DATA-TABLE";
|
|
23
24
|
KupTagNames["DATE_PICKER"] = "KUP-DATE-PICKER";
|
|
24
25
|
KupTagNames["DRAWER"] = "KUP-DRAWER";
|
|
25
26
|
KupTagNames["DROPDOWN_BUTTON"] = "KUP-DROPDOWN-BUTTON";
|
|
26
|
-
KupTagNames["
|
|
27
|
-
KupTagNames["
|
|
27
|
+
KupTagNames["FAMILY_TREE"] = "KUP-FAMILY-TREE";
|
|
28
|
+
KupTagNames["FORM"] = "KUP-FORM";
|
|
28
29
|
KupTagNames["GAUGE"] = "KUP-GAUGE";
|
|
29
30
|
KupTagNames["GRID"] = "KUP-GRID";
|
|
30
31
|
KupTagNames["IFRAME"] = "KUP-IFRAME";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as unformattedStringToFormattedStringNumber, d as unformattedStringToFormattedStringTime, e as unformattedStringToFormattedStringTimestamp, h as stringToNumber } from './utils-
|
|
2
|
-
import { d as KupDatesFormats } from './kup-manager-
|
|
1
|
+
import { u as unformattedStringToFormattedStringNumber, d as unformattedStringToFormattedStringTime, e as unformattedStringToFormattedStringTimestamp, h as stringToNumber } from './utils-2c1f4122.js';
|
|
2
|
+
import { d as KupDatesFormats } from './kup-manager-22a475e6.js';
|
|
3
3
|
|
|
4
4
|
const dom = document.documentElement;
|
|
5
5
|
// -------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { h } from './index-
|
|
1
|
+
import { h } from './index-ad6ab214.js';
|
|
2
2
|
import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
|
|
3
|
-
import { F as FImage } from './f-image-
|
|
3
|
+
import { F as FImage } from './f-image-2ab4b9aa.js';
|
|
4
4
|
|
|
5
5
|
/*-------------------------------------------------*/
|
|
6
6
|
/* C o m p o n e n t */
|
|
@@ -58,7 +58,7 @@ function renderButton(props) {
|
|
|
58
58
|
const styleSpinnerContainer = {
|
|
59
59
|
'--kup_button_spinner_height': propsFImage.sizeY,
|
|
60
60
|
};
|
|
61
|
-
return (h("button", { class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, type: "button" },
|
|
61
|
+
return (h("button", { class: classObj, disabled: props.disabled, onBlur: props.onBlur, onClick: props.onClick, onFocus: props.onFocus, style: styleSpinnerContainer, "aria-label": props.title, type: "button" },
|
|
62
62
|
props.trailingIcon
|
|
63
63
|
? [
|
|
64
64
|
h("span", { class: classLabelObj }, props.label),
|
|
@@ -93,7 +93,7 @@ function renderIconButton(props) {
|
|
|
93
93
|
const iconOff = props.iconOff
|
|
94
94
|
? props.iconOff
|
|
95
95
|
: props.icon + '_border';
|
|
96
|
-
return (h("button", { class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, type: "button", value: props.checked ? 'on' : 'off' },
|
|
96
|
+
return (h("button", { class: classObj, disabled: props.disabled, onClick: props.onClick, style: styleSpinnerContainer, type: "button", value: props.checked ? 'on' : 'off', "aria-label": props.title },
|
|
97
97
|
!props.showSpinner || props.disabled ? (h(FImage, Object.assign({}, propsFImage, { resource: props.toggable && !props.checked ? iconOff : props.icon, wrapperClass: `icon-button__icon kup-icon` }))) : null,
|
|
98
98
|
props.toggable && !props.showSpinner ? (h(FImage, Object.assign({}, propsFImage, { resource: props.icon, wrapperClass: `icon-button__icon icon-button__icon--on kup-icon` }))) : null,
|
|
99
99
|
props.showSpinner && !props.disabled ? (h("div", { class: "icon-button__spinner-container" },
|