@sme.up/ketchup 6.1.0-SNAPSHOT → 6.3.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-ac179257.js → f-button-94cb5f35.js} +4 -4
- package/dist/cjs/f-cell-76830a0d.js +416 -0
- package/dist/cjs/f-checkbox-cd977193.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-68d45fd3.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0e71df7e.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-46689c0a.js} +80 -403
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-b4229cef.js} +11 -3
- package/dist/cjs/{index-eb556444.js → index-31125378.js} +15 -8
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +5 -6
- package/dist/cjs/kup-autocomplete_25.cjs.entry.js +331 -299
- package/dist/cjs/kup-box.cjs.entry.js +1304 -0
- package/dist/cjs/kup-calendar.cjs.entry.js +9 -11
- package/dist/cjs/kup-cell.cjs.entry.js +10 -11
- package/dist/cjs/kup-dash-list.cjs.entry.js +5 -7
- package/dist/cjs/kup-dash_2.cjs.entry.js +5 -9
- package/dist/cjs/kup-dashboard.cjs.entry.js +438 -0
- package/dist/cjs/kup-drawer.cjs.entry.js +5 -6
- package/dist/cjs/{kup-box_2.cjs.entry.js → kup-echart.cjs.entry.js} +66 -1353
- package/dist/cjs/kup-family-tree.cjs.entry.js +486 -0
- package/dist/cjs/kup-form.cjs.entry.js +478 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +4 -5
- package/dist/cjs/kup-image-list.cjs.entry.js +73 -13
- package/dist/cjs/kup-lazy.cjs.entry.js +5 -6
- package/dist/cjs/kup-magic-box.cjs.entry.js +5 -6
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-7c514a30.js} +1787 -356
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -5
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
- package/dist/cjs/kup-photo-frame.cjs.entry.js +6 -7
- 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 +6 -7
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/dashboard.js +161 -0
- package/dist/collection/assets/data-table.js +59 -0
- package/dist/collection/assets/family-tree.js +2654 -0
- package/dist/collection/assets/form.js +433 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +18 -6
- package/dist/collection/assets/kupinteract.js +68 -0
- package/dist/collection/collection-manifest.json +8 -7
- 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} +14 -6
- package/dist/collection/components/{kup-form-editor/kup-form-editor.js → kup-dashboard/kup-dashboard.js} +211 -152
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +42 -30
- 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 +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-echart/kup-echart.js +9 -9
- package/dist/collection/components/kup-family-tree/kup-family-tree-declarations.js +14 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.css +171 -0
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +854 -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 +4 -0
- package/dist/collection/components/kup-text-field/kup-text-field.js +54 -0
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +0 -6
- package/dist/collection/components/kup-tree/kup-tree.js +26 -9
- 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 +9 -1
- package/dist/collection/managers/kup-data/kup-data-cell-helper.js +48 -15
- package/dist/collection/managers/kup-data/kup-data-node-helper.js +69 -0
- package/dist/collection/managers/kup-data/kup-data.js +114 -6
- package/dist/collection/managers/kup-interact/kup-interact.js +3 -5
- 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-scroll-on-hover/kup-scroll-on-hover-declarations.js +2 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +131 -45
- package/dist/collection/managers/kup-theme/kup-theme-declarations.js +20 -3
- package/dist/collection/types/GenericTypes.js +3 -2
- package/dist/collection/utils/filters/filters-rows.js +4 -23
- package/dist/collection/utils/filters/filters-tree-items.js +2 -1
- package/dist/esm/{f-button-871a544b.js → f-button-cd948e50.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-474dd282.js} +46 -283
- package/dist/esm/f-checkbox-e06cf07b.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-d6f2eb94.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-914a03ef.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-a4a52732.js} +44 -366
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-76341fe3.js} +11 -3
- package/dist/esm/{index-baeab1ac.js → index-e41330a5.js} +15 -8
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +3 -4
- package/dist/esm/kup-autocomplete_25.entry.js +222 -190
- package/dist/esm/kup-box.entry.js +1300 -0
- package/dist/esm/kup-calendar.entry.js +5 -7
- package/dist/esm/kup-cell.entry.js +7 -8
- package/dist/esm/kup-dash-list.entry.js +2 -4
- package/dist/esm/kup-dash_2.entry.js +3 -7
- package/dist/esm/kup-dashboard.entry.js +434 -0
- package/dist/esm/kup-drawer.entry.js +3 -4
- package/dist/esm/{kup-box_2.entry.js → kup-echart.entry.js} +61 -1347
- package/dist/esm/kup-family-tree.entry.js +482 -0
- package/dist/esm/kup-form.entry.js +474 -0
- package/dist/esm/kup-iframe.entry.js +2 -3
- package/dist/esm/kup-image-list.entry.js +70 -10
- package/dist/esm/kup-lazy.entry.js +3 -4
- package/dist/esm/kup-magic-box.entry.js +3 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-86f440c7.js} +1762 -357
- package/dist/esm/kup-nav-bar.entry.js +2 -3
- package/dist/esm/kup-numeric-picker.entry.js +3 -3
- package/dist/esm/kup-photo-frame.entry.js +4 -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 -5
- package/dist/esm/loader.js +3 -3
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-00e1133d.entry.js +9 -0
- package/dist/ketchup/p-066f344a.entry.js +1 -0
- package/dist/ketchup/p-0c6e0647.entry.js +1 -0
- package/dist/ketchup/p-151f7c17.entry.js +27 -0
- package/dist/ketchup/p-1e9c03b0.entry.js +1 -0
- package/dist/ketchup/p-21ea11cb.js +30 -0
- package/dist/ketchup/{p-fac1a08b.entry.js → p-2f4e6c50.entry.js} +1 -1
- package/dist/ketchup/p-3586f59c.js +1 -0
- package/dist/ketchup/p-359fd90d.entry.js +1 -0
- package/dist/ketchup/p-389fd0bf.js +1 -0
- package/dist/ketchup/p-5552f156.js +1 -0
- package/dist/ketchup/{p-f09f2f98.entry.js → p-77aff9c1.entry.js} +1 -1
- package/dist/ketchup/p-7cfdf53c.entry.js +39 -0
- package/dist/ketchup/p-853a5178.entry.js +1 -0
- package/dist/ketchup/{p-44ec4f03.js → p-8673bd4e.js} +1 -1
- package/dist/ketchup/p-8b55b786.entry.js +1 -0
- package/dist/ketchup/p-95f5834b.entry.js +1 -0
- package/dist/ketchup/p-a2c595c4.js +1 -0
- package/dist/ketchup/p-ae91f27e.entry.js +1 -0
- package/dist/ketchup/p-af664379.js +1 -0
- package/dist/ketchup/p-b0b3989b.js +2 -0
- package/dist/ketchup/p-b3b65a61.entry.js +1 -0
- package/dist/ketchup/p-bc306a53.entry.js +1 -0
- package/dist/ketchup/{p-f71a1675.entry.js → p-c3783b77.entry.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-cd4fc3fb.js} +1 -1
- package/dist/ketchup/p-cee76b14.entry.js +1 -0
- package/dist/ketchup/p-cfaea29b.entry.js +1 -0
- package/dist/ketchup/p-d2f51e7b.entry.js +1 -0
- package/dist/ketchup/p-df8e6a4d.entry.js +1 -0
- package/dist/ketchup/p-e60a1170.entry.js +1 -0
- package/dist/ketchup/p-e9a1ba04.entry.js +1 -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} +17 -9
- package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
- package/dist/types/components/kup-family-tree/kup-family-tree-declarations.d.ts +37 -0
- package/dist/types/components/kup-family-tree/kup-family-tree.d.ts +82 -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 +4 -0
- package/dist/types/components/kup-text-field/kup-text-field.d.ts +10 -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/kup-tree/kup-tree.d.ts +0 -1
- package/dist/types/components.d.ts +492 -231
- 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 +2 -0
- package/dist/types/managers/kup-data/kup-data-cell-helper.d.ts +13 -6
- 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 +9 -2
- 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/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +9 -1
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +7 -5
- package/dist/types/types/GenericTypes.d.ts +3 -2
- package/dist/types/utils/filters/filters-rows.d.ts +0 -2
- package/package.json +2 -2
- package/dist/cjs/cell-utils-a78d6fac.js +0 -168
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/cjs/kup-field.cjs.entry.js +0 -241
- package/dist/cjs/kup-form-editor.cjs.entry.js +0 -404
- package/dist/cjs/utils-6287d878.js +0 -447
- 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/cell-utils-964da6b5.js +0 -160
- package/dist/esm/kup-field.entry.js +0 -237
- package/dist/esm/kup-form-editor.entry.js +0 -400
- package/dist/esm/utils-d7e4b3c2.js +0 -428
- package/dist/ketchup/p-1ae66cc5.js +0 -1
- package/dist/ketchup/p-34b74425.js +0 -1
- package/dist/ketchup/p-3c11e615.entry.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-6dff70f8.entry.js +0 -1
- package/dist/ketchup/p-7454cb92.js +0 -1
- package/dist/ketchup/p-80968627.entry.js +0 -1
- package/dist/ketchup/p-8cdf61a4.js +0 -1
- package/dist/ketchup/p-954cc340.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- package/dist/ketchup/p-99e0d768.entry.js +0 -1
- package/dist/ketchup/p-a0f6e25c.entry.js +0 -1
- package/dist/ketchup/p-a615a92b.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-d2ee56dd.entry.js +0 -1
- package/dist/ketchup/p-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e0035c58.js +0 -1
- 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,17 +1,16 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement$1, a as getAssetPath } from './index-
|
|
2
|
-
import { k as kupManagerInstance, K as
|
|
3
|
-
import { F as FTextField } from './f-text-field-
|
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, g as getElement$1, a as getAssetPath } from './index-e41330a5.js';
|
|
2
|
+
import { k as kupManagerInstance, g as getProps, s as setProps, K as KupThemeIconValues, a as KupDynamicPositionPlacement, b as KupThemeColorValues, c as KupDebugCategory, d as getMonthsAsStringByLocale, e as KupDatesFormats, D as DateTimeFormatOptionsMonth, f as KupCardBuiltInClockElements, h as KupCardCSSClasses, i as KupLanguageTotals, j as KupLanguageGeneric, l as KupLanguageColumn, m as KupDataNewColumnTypes, n as KupCardSubEvents, o as KupCardIds, p as KupLanguageRow, q as KupCardFamily, r as KupCardProps, t as getColumnByName, u as KupDates, v as formatToNumber, w as KupDatesNormalize, x as KupObjects, y as identify, G as GroupLabelDisplayMode, S as SelectionMode, z as KupLanguageGrouping, A as KupLanguageCheckbox, B as getValueForDisplay2, F as Filters, C as getValueForDisplay, E as KupLanguageSearch, H as FilterInterval, I as FCellPadding, L as LoadMoreMode, P as PaginatorPos, J as ShowGrid, T as TotalMode, M as TotalLabel, N as KupPointerEventTypes, O as kupDraggableColumnAttr, Q as kupDragActiveAttr, R as KupDragEffect, U as kupDraggableCellAttr, V as KupDropEventTypes, W as iconColumn, X as keyColumn, Y as fieldColumn, Z as FixedCellsCSSVarsBase, _ as SortMode, $ as numberToFormattedStringNumber, a0 as KupLanguageFontsize, a1 as KupLanguageDensity, a2 as KupLanguageGrid, a3 as kupDynamicPositionAttribute, a4 as KupDataTableProps, a5 as FixedCellsClasses, a6 as unformattedStringToFormattedStringNumber, a7 as formattedStringToCustomUnformattedStringTime, a8 as isValidFormattedStringTime, a9 as formatTime, aa as unformattedStringToFormattedStringTime, ab as addColumnValueFromRow, ac as KupGlobalFilterMode } from './kup-manager-86f440c7.js';
|
|
3
|
+
import { F as FTextField } from './f-text-field-76341fe3.js';
|
|
4
4
|
import { F as FTextFieldMDC } from './f-text-field-mdc-d42d3f9e.js';
|
|
5
|
-
import { g as getProps, s as setProps, a as getMonthsAsStringByLocale, D as DateTimeFormatOptionsMonth, i as identify, n as numberToFormattedStringNumber, u as unformattedStringToFormattedStringNumber, f as formattedStringToCustomUnformattedStringTime, b as isValidFormattedStringTime, c as formatTime, d as unformattedStringToFormattedStringTime } from './utils-d7e4b3c2.js';
|
|
6
5
|
import { c as componentWrapperId } from './GenericVariables-665de00a.js';
|
|
7
|
-
import { F as FImage } from './f-image-
|
|
8
|
-
import { F as FButton } from './f-button-
|
|
6
|
+
import { F as FImage } from './f-image-914a03ef.js';
|
|
7
|
+
import { F as FButton } from './f-button-cd948e50.js';
|
|
9
8
|
import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
|
|
10
|
-
import { F as FChipType, a as FChip } from './f-chip-
|
|
9
|
+
import { F as FChipType, a as FChip } from './f-chip-d6f2eb94.js';
|
|
11
10
|
import { M as MDCRipple } from './component-b1bedf1d.js';
|
|
12
|
-
import {
|
|
13
|
-
import { F as
|
|
14
|
-
import { F as
|
|
11
|
+
import { F as FCheckbox } from './f-checkbox-e06cf07b.js';
|
|
12
|
+
import { F as FiltersColumnMenu, a as FiltersRows, c as calcTotals, n as normalizeRows, p as paginateRows, f as filterRows, g as groupRows, s as sortRows, b as FPaginator, d as pageChange, r as rowsPerPageChange, t as treeMainColumnName, K as KupTreeExpansionMode, e as KupTreeProps } from './f-paginator-utils-a4a52732.js';
|
|
13
|
+
import { F as FCell, a as FSwitch } from './f-cell-474dd282.js';
|
|
15
14
|
import './tslib.es6-3eea2234.js';
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -104,15 +103,21 @@ function consistencyCheck(idIn, listData, listEl, selectMode, displayMode, e) {
|
|
|
104
103
|
if (selected == null && idIn == null && listData) {
|
|
105
104
|
selected = getFirstItemSelected(listData);
|
|
106
105
|
}
|
|
106
|
+
let trueValue = null;
|
|
107
107
|
if (selected == null) {
|
|
108
108
|
selected = {
|
|
109
109
|
id: idIn == null ? '' : idIn,
|
|
110
110
|
value: idIn == null ? '' : idIn,
|
|
111
111
|
};
|
|
112
|
+
id = selected.id;
|
|
113
|
+
displayedValue = selected.id;
|
|
114
|
+
trueValue = selected.id;
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
118
|
+
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
119
|
+
trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
112
120
|
}
|
|
113
|
-
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
114
|
-
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
115
|
-
const trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
116
121
|
return {
|
|
117
122
|
value: id,
|
|
118
123
|
displayedValue: displayedValue,
|
|
@@ -192,6 +197,23 @@ function getItemByDisplayMode(listData, id, displayMode, setSelected) {
|
|
|
192
197
|
|
|
193
198
|
const kupAutocompleteCss = ":host{display:block;width:max-content}.kup-icon{transition:transform 0.15s}.toggled .kup-icon.kup-dropdown-icon{transform:rotate(-180deg)}.kup-icon.kup-dropdown-icon{-webkit-mask:var(--kup-dropdown-icon);mask:var(--kup-dropdown-icon)}.f-text-field{position:relative}:host(.kup-full-height){height:100%}:host(.kup-full-height) #kup-component,:host(.kup-full-height) .f-text-field,:host(.kup-full-height) .mdc-text-field{height:100%}:host(.kup-full-width){width:100%}:host(.kup-full-width) #kup-component{width:100%}:host(.kup-danger){--kup-textfield-primary-color:var(--kup-danger-color);--kup-textfield-primary-color-rgb:var(--kup-danger-color-rgb)}:host(.kup-info){--kup-textfield-primary-color:var(--kup-info-color);--kup-textfield-primary-color-rgb:var(--kup-info-color-rgb)}:host(.kup-secondary){--kup-textfield-primary-color:var(--kup-secondary-color);--kup-textfield-primary-color-rgb:var(--kup-secondary-color-rgb)}:host(.kup-success){--kup-textfield-primary-color:var(--kup-success-color);--kup-textfield-primary-color-rgb:var(--kup-success-color-rgb)}:host(.kup-warning){--kup-textfield-primary-color:var(--kup-warning-color);--kup-textfield-primary-color-rgb:var(--kup-warning-color-rgb)}";
|
|
194
199
|
|
|
200
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
201
|
+
if (kind === "a" && !f)
|
|
202
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
203
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
204
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
205
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
206
|
+
};
|
|
207
|
+
var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
208
|
+
if (kind === "m")
|
|
209
|
+
throw new TypeError("Private method is not writable");
|
|
210
|
+
if (kind === "a" && !f)
|
|
211
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
212
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
213
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
214
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
215
|
+
};
|
|
216
|
+
var _KupAutocomplete_instances, _KupAutocomplete_doConsistencyCheck, _KupAutocomplete_elStyle, _KupAutocomplete_listEl, _KupAutocomplete_kupManager, _KupAutocomplete_textfieldWrapper, _KupAutocomplete_textfieldEl, _KupAutocomplete_clickCb, _KupAutocomplete_inputTimeout, _KupAutocomplete_openList, _KupAutocomplete_closeList, _KupAutocomplete_isListOpened, _KupAutocomplete_consistencyCheck, _KupAutocomplete_prepList;
|
|
195
217
|
const KupAutocomplete = class {
|
|
196
218
|
constructor(hostRef) {
|
|
197
219
|
registerInstance(this, hostRef);
|
|
@@ -202,6 +224,7 @@ const KupAutocomplete = class {
|
|
|
202
224
|
this.kupInput = createEvent(this, "kup-autocomplete-input", 6);
|
|
203
225
|
this.kupIconClick = createEvent(this, "kup-autocomplete-iconclick", 6);
|
|
204
226
|
this.kupItemClick = createEvent(this, "kup-autocomplete-itemclick", 6);
|
|
227
|
+
_KupAutocomplete_instances.add(this);
|
|
205
228
|
/*-------------------------------------------------*/
|
|
206
229
|
/* S t a t e s */
|
|
207
230
|
/*-------------------------------------------------*/
|
|
@@ -269,34 +292,35 @@ const KupAutocomplete = class {
|
|
|
269
292
|
/*-------------------------------------------------*/
|
|
270
293
|
/* I n t e r n a l V a r i a b l e s */
|
|
271
294
|
/*-------------------------------------------------*/
|
|
272
|
-
this
|
|
273
|
-
this
|
|
274
|
-
this
|
|
295
|
+
_KupAutocomplete_doConsistencyCheck.set(this, true);
|
|
296
|
+
_KupAutocomplete_elStyle.set(this, undefined);
|
|
297
|
+
_KupAutocomplete_listEl.set(this, null);
|
|
275
298
|
/**
|
|
276
299
|
* Instance of the KupManager class.
|
|
277
300
|
*/
|
|
278
|
-
this
|
|
279
|
-
this
|
|
280
|
-
this
|
|
281
|
-
this
|
|
301
|
+
_KupAutocomplete_kupManager.set(this, kupManagerInstance());
|
|
302
|
+
_KupAutocomplete_textfieldWrapper.set(this, undefined);
|
|
303
|
+
_KupAutocomplete_textfieldEl.set(this, undefined);
|
|
304
|
+
_KupAutocomplete_clickCb.set(this, null);
|
|
305
|
+
_KupAutocomplete_inputTimeout.set(this, void 0);
|
|
282
306
|
}
|
|
283
307
|
onKupBlur() {
|
|
284
308
|
this.kupBlur.emit({
|
|
285
309
|
comp: this,
|
|
286
310
|
id: this.rootElement.id,
|
|
287
311
|
value: this.value,
|
|
288
|
-
inputValue: this.
|
|
312
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
289
313
|
});
|
|
290
314
|
}
|
|
291
315
|
onKupChange(value) {
|
|
292
|
-
this
|
|
293
|
-
const ret = this.
|
|
316
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
317
|
+
const ret = __classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
294
318
|
if (ret.exists || this.allowInconsistentValues) {
|
|
295
319
|
this.kupChange.emit({
|
|
296
320
|
comp: this,
|
|
297
321
|
id: this.rootElement.id,
|
|
298
322
|
value: this.value,
|
|
299
|
-
inputValue: this.
|
|
323
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
300
324
|
});
|
|
301
325
|
}
|
|
302
326
|
}
|
|
@@ -305,7 +329,7 @@ const KupAutocomplete = class {
|
|
|
305
329
|
comp: this,
|
|
306
330
|
id: this.rootElement.id,
|
|
307
331
|
value: this.value,
|
|
308
|
-
inputValue: this.
|
|
332
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
309
333
|
});
|
|
310
334
|
}
|
|
311
335
|
onKupFocus() {
|
|
@@ -313,82 +337,78 @@ const KupAutocomplete = class {
|
|
|
313
337
|
comp: this,
|
|
314
338
|
id: this.rootElement.id,
|
|
315
339
|
value: this.value,
|
|
316
|
-
inputValue: this.
|
|
340
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
317
341
|
});
|
|
318
342
|
}
|
|
319
343
|
onKupInput() {
|
|
320
|
-
this
|
|
321
|
-
this.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.listEl.filter = this.displayedValue;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
if (this.textfieldEl.value.length >= this.minimumChars) {
|
|
344
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
345
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value, false);
|
|
346
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
347
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value.length >= this.minimumChars) {
|
|
328
348
|
this.kupInput.emit({
|
|
329
349
|
comp: this,
|
|
330
350
|
id: this.rootElement.id,
|
|
331
351
|
value: this.value,
|
|
332
|
-
inputValue: this.
|
|
352
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
333
353
|
});
|
|
334
354
|
}
|
|
335
355
|
}
|
|
336
356
|
onKupIconClick() {
|
|
337
|
-
if (this.
|
|
338
|
-
this.
|
|
357
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
358
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
339
359
|
}
|
|
340
360
|
else {
|
|
341
|
-
this.
|
|
361
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, true);
|
|
342
362
|
}
|
|
343
363
|
this.kupIconClick.emit({
|
|
344
364
|
comp: this,
|
|
345
365
|
id: this.rootElement.id,
|
|
346
366
|
value: this.value,
|
|
347
|
-
inputValue: this.
|
|
348
|
-
open: this.
|
|
367
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
368
|
+
open: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled'),
|
|
349
369
|
});
|
|
350
370
|
}
|
|
351
371
|
onKupItemClick(e) {
|
|
352
372
|
this.onKupChange(e.detail.selected.id);
|
|
353
|
-
this.
|
|
354
|
-
if (this
|
|
355
|
-
this.
|
|
373
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
374
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
375
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
356
376
|
}
|
|
357
377
|
this.kupItemClick.emit({
|
|
358
378
|
comp: this,
|
|
359
379
|
id: this.rootElement.id,
|
|
360
380
|
value: this.value,
|
|
361
|
-
inputValue: this.
|
|
381
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
362
382
|
});
|
|
363
383
|
}
|
|
364
384
|
/*-------------------------------------------------*/
|
|
365
385
|
/* L i s t e n e r s */
|
|
366
386
|
/*-------------------------------------------------*/
|
|
367
387
|
listenKeydown(e) {
|
|
368
|
-
if (this.
|
|
388
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
369
389
|
switch (e.key) {
|
|
370
390
|
case 'ArrowDown':
|
|
371
391
|
e.preventDefault();
|
|
372
392
|
e.stopPropagation();
|
|
373
|
-
this.
|
|
393
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
374
394
|
break;
|
|
375
395
|
case 'ArrowUp':
|
|
376
396
|
e.preventDefault();
|
|
377
397
|
e.stopPropagation();
|
|
378
|
-
this.
|
|
398
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
379
399
|
break;
|
|
380
400
|
case 'Enter':
|
|
381
401
|
e.preventDefault();
|
|
382
402
|
e.stopPropagation();
|
|
383
|
-
this.
|
|
384
|
-
this.
|
|
385
|
-
this.
|
|
403
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
404
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
405
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
386
406
|
});
|
|
387
407
|
break;
|
|
388
408
|
case 'Escape':
|
|
389
409
|
e.preventDefault();
|
|
390
410
|
e.stopPropagation();
|
|
391
|
-
this.
|
|
411
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
392
412
|
break;
|
|
393
413
|
}
|
|
394
414
|
}
|
|
@@ -397,14 +417,14 @@ const KupAutocomplete = class {
|
|
|
397
417
|
case 'ArrowDown':
|
|
398
418
|
e.preventDefault();
|
|
399
419
|
e.stopPropagation();
|
|
400
|
-
this.
|
|
401
|
-
this.
|
|
420
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
421
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
402
422
|
break;
|
|
403
423
|
case 'ArrowUp':
|
|
404
424
|
e.preventDefault();
|
|
405
425
|
e.stopPropagation();
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
426
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
427
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
408
428
|
break;
|
|
409
429
|
}
|
|
410
430
|
}
|
|
@@ -437,7 +457,7 @@ const KupAutocomplete = class {
|
|
|
437
457
|
* Sets the focus to the component.
|
|
438
458
|
*/
|
|
439
459
|
async setFocus() {
|
|
440
|
-
this.
|
|
460
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
441
461
|
}
|
|
442
462
|
/**
|
|
443
463
|
* Sets the props to the component.
|
|
@@ -451,81 +471,16 @@ const KupAutocomplete = class {
|
|
|
451
471
|
* @param {string} value - Value of the component.
|
|
452
472
|
*/
|
|
453
473
|
async setValue(value) {
|
|
454
|
-
this
|
|
455
|
-
this.
|
|
456
|
-
}
|
|
457
|
-
/*-------------------------------------------------*/
|
|
458
|
-
/* P r i v a t e M e t h o d s */
|
|
459
|
-
/*-------------------------------------------------*/
|
|
460
|
-
openList(forceOpen) {
|
|
461
|
-
if (forceOpen != true &&
|
|
462
|
-
this.textfieldEl.value.length < this.minimumChars) {
|
|
463
|
-
this.closeList();
|
|
464
|
-
return false;
|
|
465
|
-
}
|
|
466
|
-
this.textfieldWrapper.classList.add('toggled');
|
|
467
|
-
this.listEl.menuVisible = true;
|
|
468
|
-
const elStyle = this.listEl.style;
|
|
469
|
-
elStyle.height = 'auto';
|
|
470
|
-
elStyle.minWidth = this.textfieldWrapper.clientWidth + 'px';
|
|
471
|
-
if (this.kupManager.dynamicPosition.isRegistered(this.listEl)) {
|
|
472
|
-
this.kupManager.dynamicPosition.changeAnchor(this.listEl, this.textfieldWrapper);
|
|
473
|
-
}
|
|
474
|
-
else {
|
|
475
|
-
this.kupManager.dynamicPosition.register(this.listEl, this.textfieldWrapper, 0, KupDynamicPositionPlacement.AUTO, true);
|
|
476
|
-
}
|
|
477
|
-
this.kupManager.dynamicPosition.start(this.listEl);
|
|
478
|
-
if (!this.clickCb) {
|
|
479
|
-
this.clickCb = {
|
|
480
|
-
cb: () => {
|
|
481
|
-
this.closeList();
|
|
482
|
-
},
|
|
483
|
-
el: this.listEl,
|
|
484
|
-
};
|
|
485
|
-
}
|
|
486
|
-
this.kupManager.addClickCallback(this.clickCb, true);
|
|
487
|
-
return true;
|
|
488
|
-
}
|
|
489
|
-
closeList() {
|
|
490
|
-
this.textfieldWrapper.classList.remove('toggled');
|
|
491
|
-
this.listEl.menuVisible = false;
|
|
492
|
-
this.kupManager.dynamicPosition.stop(this.listEl);
|
|
493
|
-
this.kupManager.removeClickCallback(this.clickCb);
|
|
494
|
-
}
|
|
495
|
-
isListOpened() {
|
|
496
|
-
return this.listEl.menuVisible == true;
|
|
497
|
-
}
|
|
498
|
-
consistencyCheck(e, idIn) {
|
|
499
|
-
if (!this.doConsistencyCheck) {
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
this.doConsistencyCheck = false;
|
|
503
|
-
const ret = consistencyCheck(idIn, this.data['kup-list'], this.listEl, this.selectMode, this.displayMode, e);
|
|
504
|
-
if (ret.exists || this.allowInconsistentValues) {
|
|
505
|
-
this.value = ret.value;
|
|
506
|
-
this.displayedValue = ret.displayedValue;
|
|
507
|
-
if (this.listEl != null && !this.serverHandledFilter) {
|
|
508
|
-
this.listEl.filter = this.displayedValue;
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
else {
|
|
512
|
-
this.displayedValue = idIn;
|
|
513
|
-
if (this.listEl != null && !this.serverHandledFilter) {
|
|
514
|
-
this.listEl.filter = idIn;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
return ret;
|
|
518
|
-
}
|
|
519
|
-
prepList() {
|
|
520
|
-
return (h("kup-list", Object.assign({ displayMode: this.displayMode }, this.data['kup-list'], { isMenu: true, "onkup-list-click": (e) => this.onKupItemClick(e), ref: (el) => (this.listEl = el) })));
|
|
474
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
475
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
521
476
|
}
|
|
522
477
|
/*-------------------------------------------------*/
|
|
523
478
|
/* L i f e c y c l e H o o k s */
|
|
524
479
|
/*-------------------------------------------------*/
|
|
525
480
|
componentWillLoad() {
|
|
526
|
-
this.
|
|
527
|
-
this.
|
|
528
|
-
this
|
|
481
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
482
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.register(this);
|
|
483
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
529
484
|
this.value = this.initialValue;
|
|
530
485
|
if (!this.data) {
|
|
531
486
|
this.data = {
|
|
@@ -535,43 +490,103 @@ const KupAutocomplete = class {
|
|
|
535
490
|
}
|
|
536
491
|
}
|
|
537
492
|
componentDidLoad() {
|
|
538
|
-
this.
|
|
539
|
-
this.
|
|
493
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, true);
|
|
494
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
540
495
|
}
|
|
541
496
|
componentWillRender() {
|
|
542
|
-
this.
|
|
497
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, false);
|
|
543
498
|
}
|
|
544
499
|
componentDidRender() {
|
|
545
500
|
const root = this.rootElement.shadowRoot;
|
|
546
501
|
if (root) {
|
|
547
502
|
const f = root.querySelector('.f-text-field');
|
|
548
503
|
if (f) {
|
|
549
|
-
this
|
|
550
|
-
this
|
|
504
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_textfieldWrapper, f, "f");
|
|
505
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_textfieldEl, f.querySelector('input'), "f");
|
|
551
506
|
FTextFieldMDC(f);
|
|
552
507
|
}
|
|
553
508
|
}
|
|
554
|
-
this.
|
|
509
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, true);
|
|
555
510
|
}
|
|
556
511
|
render() {
|
|
557
512
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
558
513
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
559
|
-
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: this
|
|
514
|
+
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$2(this, _KupAutocomplete_elStyle, "f") }, h("style", null, __classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: __classPrivateFieldGet$2(this, _KupAutocomplete_elStyle, "f") }, h(FTextField, Object.assign({}, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, icon: this.showDropDownIcon
|
|
560
515
|
? KupThemeIconValues.DROPDOWN
|
|
561
516
|
: null, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
562
|
-
window.clearTimeout(this
|
|
563
|
-
this
|
|
564
|
-
}, onIconClick: () => this.onKupIconClick() }), this.
|
|
517
|
+
window.clearTimeout(__classPrivateFieldGet$2(this, _KupAutocomplete_inputTimeout, "f"));
|
|
518
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_inputTimeout, window.setTimeout(() => this.onKupInput(), this.inputDelay), "f");
|
|
519
|
+
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
565
520
|
}
|
|
566
521
|
disconnectedCallback() {
|
|
567
|
-
if (this
|
|
568
|
-
this.
|
|
569
|
-
this.
|
|
522
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f")) {
|
|
523
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f")]);
|
|
524
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").remove();
|
|
570
525
|
}
|
|
571
|
-
this.
|
|
526
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.unregister(this);
|
|
572
527
|
}
|
|
573
528
|
get rootElement() { return getElement$1(this); }
|
|
574
529
|
};
|
|
530
|
+
_KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle = new WeakMap(), _KupAutocomplete_listEl = new WeakMap(), _KupAutocomplete_kupManager = new WeakMap(), _KupAutocomplete_textfieldWrapper = new WeakMap(), _KupAutocomplete_textfieldEl = new WeakMap(), _KupAutocomplete_clickCb = new WeakMap(), _KupAutocomplete_inputTimeout = new WeakMap(), _KupAutocomplete_instances = new WeakSet(), _KupAutocomplete_openList = function _KupAutocomplete_openList(forceOpen) {
|
|
531
|
+
if (forceOpen != true &&
|
|
532
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
533
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
534
|
+
return false;
|
|
535
|
+
}
|
|
536
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
537
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
538
|
+
const elStyle = __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").style;
|
|
539
|
+
elStyle.height = 'auto';
|
|
540
|
+
elStyle.minWidth = __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
541
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"))) {
|
|
542
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
543
|
+
}
|
|
544
|
+
else {
|
|
545
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
|
|
546
|
+
}
|
|
547
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"));
|
|
548
|
+
if (!__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f")) {
|
|
549
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_clickCb, {
|
|
550
|
+
cb: () => {
|
|
551
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
552
|
+
},
|
|
553
|
+
el: __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"),
|
|
554
|
+
}, "f");
|
|
555
|
+
}
|
|
556
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f"), true);
|
|
557
|
+
return true;
|
|
558
|
+
}, _KupAutocomplete_closeList = function _KupAutocomplete_closeList() {
|
|
559
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
560
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
561
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"));
|
|
562
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f"));
|
|
563
|
+
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
564
|
+
return __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
565
|
+
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, setValue) {
|
|
566
|
+
if (!__classPrivateFieldGet$2(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
570
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
571
|
+
if (ret.exists || this.allowInconsistentValues) {
|
|
572
|
+
if (setValue) {
|
|
573
|
+
this.value = ret.value;
|
|
574
|
+
this.displayedValue = ret.displayedValue;
|
|
575
|
+
}
|
|
576
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
577
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
else {
|
|
581
|
+
this.displayedValue = idIn;
|
|
582
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
583
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return ret;
|
|
587
|
+
}, _KupAutocomplete_prepList = function _KupAutocomplete_prepList() {
|
|
588
|
+
return (h("kup-list", Object.assign({ displayMode: this.displayMode }, this.data['kup-list'], { isMenu: true, "onkup-list-click": (e) => this.onKupItemClick(e), ref: (el) => (__classPrivateFieldSet$2(this, _KupAutocomplete_listEl, el, "f")) })));
|
|
589
|
+
};
|
|
575
590
|
KupAutocomplete.style = kupAutocompleteCss;
|
|
576
591
|
|
|
577
592
|
/**
|
|
@@ -907,6 +922,7 @@ const KupButton = class {
|
|
|
907
922
|
: false,
|
|
908
923
|
styling: this.styling,
|
|
909
924
|
showSpinner: this.showSpinner,
|
|
925
|
+
title: this.rootElement.title,
|
|
910
926
|
toggable: this.toggable,
|
|
911
927
|
trailingIcon: this.trailingIcon,
|
|
912
928
|
warning: this.rootElement.classList.contains('kup-warning')
|
|
@@ -6930,7 +6946,7 @@ const KupCombobox = class {
|
|
|
6930
6946
|
});
|
|
6931
6947
|
}
|
|
6932
6948
|
onKupChange(value) {
|
|
6933
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
6949
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
6934
6950
|
this.kupChange.emit({
|
|
6935
6951
|
comp: this,
|
|
6936
6952
|
id: this.rootElement.id,
|
|
@@ -6963,14 +6979,14 @@ const KupCombobox = class {
|
|
|
6963
6979
|
});
|
|
6964
6980
|
}
|
|
6965
6981
|
onKupInput() {
|
|
6966
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
6982
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").value, false);
|
|
6983
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
6967
6984
|
this.kupInput.emit({
|
|
6968
6985
|
comp: this,
|
|
6969
6986
|
id: this.rootElement.id,
|
|
6970
6987
|
value: this.value,
|
|
6971
6988
|
inputValue: __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").value,
|
|
6972
6989
|
});
|
|
6973
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
6974
6990
|
}
|
|
6975
6991
|
onKupIconClick() {
|
|
6976
6992
|
if (__classPrivateFieldGet$1(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
@@ -7096,7 +7112,7 @@ const KupCombobox = class {
|
|
|
7096
7112
|
* @param {string} value - Value to be set.
|
|
7097
7113
|
*/
|
|
7098
7114
|
async setValue(value) {
|
|
7099
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
7115
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7100
7116
|
}
|
|
7101
7117
|
/*-------------------------------------------------*/
|
|
7102
7118
|
/* L i f e c y c l e H o o k s */
|
|
@@ -7113,7 +7129,7 @@ const KupCombobox = class {
|
|
|
7113
7129
|
}
|
|
7114
7130
|
}
|
|
7115
7131
|
componentDidLoad() {
|
|
7116
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
7132
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, true);
|
|
7117
7133
|
__classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7118
7134
|
}
|
|
7119
7135
|
componentWillRender() {
|
|
@@ -7136,7 +7152,7 @@ const KupCombobox = class {
|
|
|
7136
7152
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7137
7153
|
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$1(this, _KupCombobox_elStyle, "f") }, h("style", null, __classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId, style: __classPrivateFieldGet$1(this, _KupCombobox_elStyle, "f") }, h(FTextField, Object.assign({}, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, icon: this.showDropDownIcon
|
|
7138
7154
|
? KupThemeIconValues.DROPDOWN
|
|
7139
|
-
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }), __classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)))
|
|
7155
|
+
: null, readOnly: this.isSelect, trailingIcon: true, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7140
7156
|
}
|
|
7141
7157
|
disconnectedCallback() {
|
|
7142
7158
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f")) {
|
|
@@ -7183,20 +7199,22 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7183
7199
|
__classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$1(this, _KupCombobox_clickCb, "f"));
|
|
7184
7200
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7185
7201
|
return __classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7186
|
-
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(
|
|
7187
|
-
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$1(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode
|
|
7188
|
-
if (ret.exists
|
|
7189
|
-
|
|
7190
|
-
|
|
7202
|
+
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, setValue) {
|
|
7203
|
+
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$1(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7204
|
+
if (ret.exists) {
|
|
7205
|
+
if (setValue) {
|
|
7206
|
+
this.value = ret.value;
|
|
7207
|
+
this.displayedValue = ret.displayedValue;
|
|
7208
|
+
}
|
|
7191
7209
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f") != null) {
|
|
7192
|
-
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter =
|
|
7210
|
+
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7193
7211
|
}
|
|
7194
7212
|
}
|
|
7195
7213
|
else {
|
|
7196
7214
|
this.value = idIn;
|
|
7197
7215
|
this.displayedValue = idIn;
|
|
7198
7216
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f") != null) {
|
|
7199
|
-
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter =
|
|
7217
|
+
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7200
7218
|
}
|
|
7201
7219
|
}
|
|
7202
7220
|
return ret;
|
|
@@ -7211,8 +7229,8 @@ class KupDataTableState {
|
|
|
7211
7229
|
this.expandGroups = false;
|
|
7212
7230
|
this.groupLabelDisplay = GroupLabelDisplayMode.BOTH;
|
|
7213
7231
|
this.density = 'small';
|
|
7214
|
-
this.enableSortableColumns = false;
|
|
7215
7232
|
this.enableExtraColumns = true;
|
|
7233
|
+
this.enableSortableColumns = false;
|
|
7216
7234
|
this.forceOneLine = false;
|
|
7217
7235
|
this.globalFilter = false;
|
|
7218
7236
|
this.globalFilterValue = '';
|
|
@@ -11267,20 +11285,21 @@ const KupDataTable = class {
|
|
|
11267
11285
|
}
|
|
11268
11286
|
let groupChips = null;
|
|
11269
11287
|
if (this.isGrouping()) {
|
|
11270
|
-
const chipsData =
|
|
11288
|
+
const chipsData = [];
|
|
11289
|
+
for (let index = 0; index < this.groups.length; index++) {
|
|
11290
|
+
const group = this.groups[index];
|
|
11271
11291
|
const column = getColumnByName(this.getColumns(), group.column);
|
|
11272
11292
|
if (column) {
|
|
11273
|
-
|
|
11293
|
+
chipsData.push({
|
|
11274
11294
|
value: column.title,
|
|
11275
11295
|
id: column.name,
|
|
11276
11296
|
checked: true,
|
|
11277
|
-
};
|
|
11278
|
-
return a;
|
|
11297
|
+
});
|
|
11279
11298
|
}
|
|
11280
11299
|
else {
|
|
11281
|
-
|
|
11300
|
+
this.kupManager.debug.logMessage(this, "Grouped for a non-existent column! (" + group.column + ")", KupDebugCategory.WARNING);
|
|
11282
11301
|
}
|
|
11283
|
-
}
|
|
11302
|
+
}
|
|
11284
11303
|
if (chipsData.length > 0) {
|
|
11285
11304
|
const props = {
|
|
11286
11305
|
data: chipsData,
|
|
@@ -12147,6 +12166,7 @@ const KupDropdownButton = class {
|
|
|
12147
12166
|
? true
|
|
12148
12167
|
: false,
|
|
12149
12168
|
styling: this.styling ? this.styling : FButtonStyling.RAISED,
|
|
12169
|
+
title: this.rootElement.title,
|
|
12150
12170
|
};
|
|
12151
12171
|
if (!this.dropdownOnly) {
|
|
12152
12172
|
buttons.push(h(FButton, Object.assign({}, props, { icon: this.icon ? this.icon : null, label: this.label ? this.label : null, trailingIcon: this.trailingIcon ? true : false, wrapperClass: "dropdown-button__primary-action", onClick: () => this.onKupClick(), onBlur: () => this.onKupBlur(), onFocus: () => this.onKupFocus() })));
|
|
@@ -14830,20 +14850,6 @@ const KupSpinner = class {
|
|
|
14830
14850
|
};
|
|
14831
14851
|
KupSpinner.style = kupSpinnerCss;
|
|
14832
14852
|
|
|
14833
|
-
/*-------------------------------------------------*/
|
|
14834
|
-
/* C o m p o n e n t */
|
|
14835
|
-
/*-------------------------------------------------*/
|
|
14836
|
-
const FSwitch = (props) => {
|
|
14837
|
-
return (h("div", Object.assign({ class: `f-switch ${props.danger ? 'kup-danger' : ''} ${props.info ? 'kup-info' : ''} ${props.secondary ? 'kup-secondary' : ''} ${props.success ? 'kup-success' : ''} ${props.warning ? 'kup-warning' : ''} ${props.wrapperClass ? props.wrapperClass : ''}` }, props.dataSet, { id: props.id, title: props.title }),
|
|
14838
|
-
h("div", { class: `form-field ${props.leadingLabel ? 'form-field--align-end' : ''}` },
|
|
14839
|
-
h("div", { class: `switch ${props.checked ? 'switch--checked' : ''} ${props.disabled ? 'switch--disabled' : ''}` },
|
|
14840
|
-
h("div", { class: "switch__track" }),
|
|
14841
|
-
h("div", { class: "switch__thumb-underlay" },
|
|
14842
|
-
h("div", { class: "switch__thumb" },
|
|
14843
|
-
h("input", { type: "checkbox", class: "switch__native-control", role: "switch", checked: props.checked, disabled: props.disabled, value: props.checked ? 'on' : 'off', onBlur: props.onBlur, onChange: props.onChange, onFocus: props.onFocus })))),
|
|
14844
|
-
h("label", { onClick: props.onChange }, props.label))));
|
|
14845
|
-
};
|
|
14846
|
-
|
|
14847
14853
|
/**
|
|
14848
14854
|
* Props of the kup-switch component.
|
|
14849
14855
|
* Used to export every prop in an object.
|
|
@@ -15224,6 +15230,7 @@ KupTabBar.style = kupTabBarCss;
|
|
|
15224
15230
|
var KupTextFieldProps;
|
|
15225
15231
|
(function (KupTextFieldProps) {
|
|
15226
15232
|
KupTextFieldProps["customStyle"] = "Custom style of the component.";
|
|
15233
|
+
KupTextFieldProps["decimals"] = "Number of decimals (should be used when inputType is number).";
|
|
15227
15234
|
KupTextFieldProps["disabled"] = "When set to true, the component is disabled.";
|
|
15228
15235
|
KupTextFieldProps["emitSubmitEventOnEnter"] = "When the text field is part of the autocomplete component and the list is opened, enter key selects the item and doesn't submit.";
|
|
15229
15236
|
KupTextFieldProps["fullWidth"] = "When set to true, the component will be rendered at full width.";
|
|
@@ -15236,7 +15243,10 @@ var KupTextFieldProps;
|
|
|
15236
15243
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
15237
15244
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
15238
15245
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
15246
|
+
KupTextFieldProps["max"] = "The HTML max attribute specifies the maximum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.";
|
|
15239
15247
|
KupTextFieldProps["maxLength"] = "When set, the helper will display a character counter.";
|
|
15248
|
+
KupTextFieldProps["min"] = "The HTML min attribute specifies the minimum value for the input element. Works with the following input types: number, range, date, datetime-local, month, time and week.";
|
|
15249
|
+
KupTextFieldProps["name"] = "The HTML name attribute used for form autocomplete.";
|
|
15240
15250
|
KupTextFieldProps["outlined"] = "When set to true, the component will be rendered as an outlined field.";
|
|
15241
15251
|
KupTextFieldProps["readOnly"] = "Sets the component to read only state, making it not editable, but interactable. Used in combobox component when it behaves as a select.";
|
|
15242
15252
|
KupTextFieldProps["step"] = "The HTML step of the input element. It has effect only with number input type.";
|
|
@@ -15275,6 +15285,11 @@ const KupTextField = class {
|
|
|
15275
15285
|
* @see https://ketchup.smeup.com/ketchup-showcase/#/customization
|
|
15276
15286
|
*/
|
|
15277
15287
|
this.customStyle = '';
|
|
15288
|
+
/**
|
|
15289
|
+
* Number of decimals (should be used when inputType is number).
|
|
15290
|
+
* @default null
|
|
15291
|
+
*/
|
|
15292
|
+
this.decimals = null;
|
|
15278
15293
|
/**
|
|
15279
15294
|
* When set to true, the component is disabled.
|
|
15280
15295
|
* @default false
|
|
@@ -15352,6 +15367,11 @@ const KupTextField = class {
|
|
|
15352
15367
|
* @default null
|
|
15353
15368
|
*/
|
|
15354
15369
|
this.min = null;
|
|
15370
|
+
/**
|
|
15371
|
+
* The HTML name attribute used for form autocomplete.
|
|
15372
|
+
* @default null
|
|
15373
|
+
*/
|
|
15374
|
+
this.name = null;
|
|
15355
15375
|
/**
|
|
15356
15376
|
* When set to true, the component will be rendered as an outlined field.
|
|
15357
15377
|
* @default false
|
|
@@ -15536,6 +15556,7 @@ const KupTextField = class {
|
|
|
15536
15556
|
danger: this.rootElement.classList.contains('kup-danger')
|
|
15537
15557
|
? true
|
|
15538
15558
|
: false,
|
|
15559
|
+
decimals: this.decimals,
|
|
15539
15560
|
disabled: this.disabled,
|
|
15540
15561
|
fullHeight: this.rootElement.classList.contains('kup-full-height')
|
|
15541
15562
|
? true
|
|
@@ -15555,6 +15576,7 @@ const KupTextField = class {
|
|
|
15555
15576
|
max: this.max,
|
|
15556
15577
|
maxLength: this.maxLength,
|
|
15557
15578
|
min: this.min,
|
|
15579
|
+
name: this.name,
|
|
15558
15580
|
outlined: this.outlined,
|
|
15559
15581
|
readOnly: this.readOnly,
|
|
15560
15582
|
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
@@ -15671,12 +15693,6 @@ const KupTimePicker = class {
|
|
|
15671
15693
|
* Instance of the KupManager class.
|
|
15672
15694
|
*/
|
|
15673
15695
|
this.kupManager = kupManagerInstance();
|
|
15674
|
-
this.hoursEl = undefined;
|
|
15675
|
-
this.minutesEl = undefined;
|
|
15676
|
-
this.secondsEl = undefined;
|
|
15677
|
-
this.hoursCircleEl = undefined;
|
|
15678
|
-
this.minutesCircleEl = undefined;
|
|
15679
|
-
this.secondsCircleEl = undefined;
|
|
15680
15696
|
this.hoursActive = true;
|
|
15681
15697
|
this.minutesActive = false;
|
|
15682
15698
|
this.secondsActive = false;
|
|
@@ -16168,7 +16184,7 @@ class FiltersTreeItems extends FiltersRows {
|
|
|
16168
16184
|
value: node.value,
|
|
16169
16185
|
};
|
|
16170
16186
|
if (node.visible) {
|
|
16171
|
-
|
|
16187
|
+
addColumnValueFromRow(values, column, cellsHolder[column.name]);
|
|
16172
16188
|
this.extractColumnValues(node.children, column, values);
|
|
16173
16189
|
}
|
|
16174
16190
|
});
|
|
@@ -16369,7 +16385,6 @@ const KupTree = class {
|
|
|
16369
16385
|
* Reference to the column menu card.
|
|
16370
16386
|
*/
|
|
16371
16387
|
this.columnMenuCard = null;
|
|
16372
|
-
this.selectedColumn = '';
|
|
16373
16388
|
this.clickTimeout = [];
|
|
16374
16389
|
this.sizedColumns = undefined;
|
|
16375
16390
|
this.filtersColumnMenuInstance = new FiltersColumnMenu();
|
|
@@ -16385,7 +16400,6 @@ const KupTree = class {
|
|
|
16385
16400
|
if (this.store && this.stateId) {
|
|
16386
16401
|
const state = this.store.getState(this.stateId);
|
|
16387
16402
|
if (state != null) {
|
|
16388
|
-
console.log('Initialize with state for stateId ' + this.stateId, state);
|
|
16389
16403
|
this.density = state.density;
|
|
16390
16404
|
this.showFilters = state.showFilters;
|
|
16391
16405
|
this.showFooter = state.showFooter;
|
|
@@ -16432,7 +16446,6 @@ const KupTree = class {
|
|
|
16432
16446
|
return;
|
|
16433
16447
|
}
|
|
16434
16448
|
if (somethingChanged) {
|
|
16435
|
-
console.log('Persisting state for stateId ' + this.stateId + ': ', this.state);
|
|
16436
16449
|
this.store.persistState(this.stateId, this.state);
|
|
16437
16450
|
}
|
|
16438
16451
|
}
|
|
@@ -16741,7 +16754,7 @@ const KupTree = class {
|
|
|
16741
16754
|
this.closeTotalMenu();
|
|
16742
16755
|
this.openTotalMenu(column);
|
|
16743
16756
|
}
|
|
16744
|
-
getEventDetails(path) {
|
|
16757
|
+
getEventDetails(path, e) {
|
|
16745
16758
|
let isHeader, isBody, isFooter, td, th, tr, filterRemove;
|
|
16746
16759
|
if (path) {
|
|
16747
16760
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
@@ -16813,6 +16826,7 @@ const KupTree = class {
|
|
|
16813
16826
|
cell: cell ? cell : null,
|
|
16814
16827
|
column: column ? column : null,
|
|
16815
16828
|
filterRemove: filterRemove ? filterRemove : null,
|
|
16829
|
+
originalEvent: e,
|
|
16816
16830
|
row: row ? row : null,
|
|
16817
16831
|
td: td ? td : null,
|
|
16818
16832
|
th: th ? th : null,
|
|
@@ -16821,7 +16835,7 @@ const KupTree = class {
|
|
|
16821
16835
|
}
|
|
16822
16836
|
contextMenuHandler(e) {
|
|
16823
16837
|
e.preventDefault();
|
|
16824
|
-
const details = this.getEventDetails(this.getEventPath(e.target));
|
|
16838
|
+
const details = this.getEventDetails(this.getEventPath(e.target), e);
|
|
16825
16839
|
if (details.area === 'header') {
|
|
16826
16840
|
if (details.th && details.column) {
|
|
16827
16841
|
this.openColumnMenu(details.column.name);
|
|
@@ -16855,6 +16869,12 @@ const KupTree = class {
|
|
|
16855
16869
|
KupTreeExpansionMode.DROPDOWN ||
|
|
16856
16870
|
(this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE &&
|
|
16857
16871
|
!treeNodeData.expandable)) {
|
|
16872
|
+
const td = e
|
|
16873
|
+
? this.getEventPath(e.target).find((el) => {
|
|
16874
|
+
if (el.tagName === 'TD')
|
|
16875
|
+
return el;
|
|
16876
|
+
})
|
|
16877
|
+
: null;
|
|
16858
16878
|
// If this TreeNode is not disabled, then it can be selected and an event is emitted
|
|
16859
16879
|
if (treeNodeData && !treeNodeData.disabled) {
|
|
16860
16880
|
if (this.autoSelectionNodeMode)
|
|
@@ -16868,11 +16888,10 @@ const KupTree = class {
|
|
|
16868
16888
|
.split(',')
|
|
16869
16889
|
.map((treeNodeIndex) => parseInt(treeNodeIndex)),
|
|
16870
16890
|
treeNode: treeNodeData,
|
|
16871
|
-
columnName:
|
|
16891
|
+
columnName: td ? td.dataset.column : null,
|
|
16872
16892
|
auto: auto,
|
|
16873
16893
|
});
|
|
16874
16894
|
}
|
|
16875
|
-
this.selectedColumn = '';
|
|
16876
16895
|
}
|
|
16877
16896
|
// If KupTreeExpansionMode.NODE then click is a collapse/expand click
|
|
16878
16897
|
if (this.expansionMode.toLowerCase() === KupTreeExpansionMode.NODE) {
|
|
@@ -17207,13 +17226,20 @@ const KupTree = class {
|
|
|
17207
17226
|
}
|
|
17208
17227
|
// When can be expanded OR selected
|
|
17209
17228
|
if (!treeNodeData.disabled) {
|
|
17210
|
-
treeNodeOptions['onClick'] = () => {
|
|
17211
|
-
|
|
17229
|
+
treeNodeOptions['onClick'] = (e) => {
|
|
17230
|
+
// Note: event must be cloned
|
|
17231
|
+
// otherwise inside setTimeout will be exiting the Shadow DOM scope(causing loss of information, including target).
|
|
17232
|
+
const clone = {};
|
|
17233
|
+
for (const key in e) {
|
|
17234
|
+
clone[key] = e[key];
|
|
17235
|
+
}
|
|
17236
|
+
this.clickTimeout.push(setTimeout(() => this.hdlTreeNodeClick(clone, treeNodeData, treeNodePath, false), 300));
|
|
17212
17237
|
};
|
|
17213
17238
|
}
|
|
17214
17239
|
// When a tree node is displayed as a table
|
|
17215
17240
|
let treeNodeCells = null;
|
|
17216
17241
|
let visibleCols = this.getVisibleColumns();
|
|
17242
|
+
!this.kupManager.objects.isEmptyKupObj(treeNodeData.obj);
|
|
17217
17243
|
if (this.showColumns && visibleCols && visibleCols.length) {
|
|
17218
17244
|
treeNodeCells = [];
|
|
17219
17245
|
// Renders all the cells
|
|
@@ -17556,6 +17582,12 @@ const KupTree = class {
|
|
|
17556
17582
|
}
|
|
17557
17583
|
}
|
|
17558
17584
|
}
|
|
17585
|
+
if (root) {
|
|
17586
|
+
const fs = root.querySelectorAll('.f-text-field');
|
|
17587
|
+
for (let index = 0; index < fs.length; index++) {
|
|
17588
|
+
FTextFieldMDC(fs[index]);
|
|
17589
|
+
}
|
|
17590
|
+
}
|
|
17559
17591
|
if (this.preventXScroll) {
|
|
17560
17592
|
this.setEllipsis();
|
|
17561
17593
|
}
|