@sme.up/ketchup 6.1.0-SNAPSHOT → 6.2.0-SNAPSHOT
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-d894e802.js} +2 -2
- package/dist/cjs/{f-button-ac179257.js → f-button-414b3bc3.js} +4 -4
- package/dist/cjs/f-cell-c8983ec7.js +418 -0
- package/dist/cjs/f-checkbox-57443ca3.js +29 -0
- package/dist/cjs/{f-chip-b00897d7.js → f-chip-ef81bf51.js} +3 -3
- package/dist/cjs/{f-image-89f25556.js → f-image-0618c795.js} +2 -2
- package/dist/cjs/{f-paginator-utils-8fa501b3.js → f-paginator-utils-c9dd5173.js} +5 -5
- package/dist/cjs/{f-text-field-e1e45ade.js → f-text-field-7d31190f.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 +200 -187
- package/dist/cjs/kup-box_2.cjs.entry.js +23 -12
- 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-field.cjs.entry.js +2 -2
- package/dist/cjs/kup-form.cjs.entry.js +469 -0
- package/dist/cjs/kup-iframe.cjs.entry.js +3 -3
- package/dist/cjs/kup-image-list.cjs.entry.js +11 -10
- package/dist/cjs/kup-lazy.cjs.entry.js +3 -3
- package/dist/cjs/kup-magic-box.cjs.entry.js +4 -4
- package/dist/cjs/{kup-manager-7a941909.js → kup-manager-2fee8cf3.js} +324 -6
- 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 +7 -9
- 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-8470184d.js} +1 -1
- package/dist/collection/assets/dashboard.js +113 -0
- package/dist/collection/assets/data-table.js +15 -0
- package/dist/collection/assets/form.js +179 -0
- package/dist/collection/assets/grid.js +17 -0
- package/dist/collection/assets/index.js +10 -6
- package/dist/collection/collection-manifest.json +3 -2
- 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-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-drawer/kup-drawer.css +5 -8
- package/dist/collection/components/kup-form/kup-form-declarations.js +19 -0
- package/dist/collection/components/kup-form/kup-form.css +86 -0
- package/dist/collection/components/kup-form/kup-form.js +668 -0
- package/dist/collection/components/kup-grid/kup-grid.js +1 -4
- package/dist/collection/components/kup-list/kup-list-helper.js +9 -3
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.css +10 -7
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +3 -5
- 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.js +94 -0
- 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 +18 -3
- package/dist/collection/types/GenericTypes.js +2 -1
- package/dist/esm/{cell-utils-964da6b5.js → cell-utils-7fc84d4e.js} +2 -2
- package/dist/esm/{f-button-871a544b.js → f-button-2f6cc296.js} +4 -4
- package/dist/esm/{f-cell-521ef17a.js → f-cell-4428481c.js} +48 -283
- package/dist/esm/f-checkbox-c51c4a75.js +27 -0
- package/dist/esm/{f-chip-1dda722f.js → f-chip-b39eb49a.js} +3 -3
- package/dist/esm/{f-image-c468d8ae.js → f-image-b08ebeb2.js} +2 -2
- package/dist/esm/{f-paginator-utils-7dff8ff0.js → f-paginator-utils-4fda6086.js} +5 -5
- package/dist/esm/{f-text-field-d6c61c73.js → f-text-field-184a5fb3.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 +190 -177
- package/dist/esm/kup-box_2.entry.js +23 -12
- 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-field.entry.js +2 -2
- package/dist/esm/kup-form.entry.js +465 -0
- package/dist/esm/kup-iframe.entry.js +3 -3
- package/dist/esm/kup-image-list.entry.js +10 -9
- package/dist/esm/kup-lazy.entry.js +3 -3
- package/dist/esm/kup-magic-box.entry.js +4 -4
- package/dist/esm/{kup-manager-58b075b4.js → kup-manager-3325b2d8.js} +321 -7
- 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 +7 -9
- 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-6373a07e.js} +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-006bc4d0.entry.js +1 -0
- package/dist/ketchup/{p-8cdf61a4.js → p-0741da57.js} +1 -1
- package/dist/ketchup/{p-44ec4f03.js → p-13e08580.js} +1 -1
- package/dist/ketchup/p-153697fb.entry.js +1 -0
- package/dist/ketchup/{p-a615a92b.entry.js → p-175edb62.entry.js} +1 -1
- package/dist/ketchup/{p-fac1a08b.entry.js → p-1db1d42b.entry.js} +1 -1
- package/dist/ketchup/{p-f09f2f98.entry.js → p-30820f8f.entry.js} +1 -1
- package/dist/ketchup/p-35325834.entry.js +9 -0
- package/dist/ketchup/{p-65b46587.entry.js → p-359e8bec.entry.js} +4 -4
- package/dist/ketchup/{p-6dff70f8.entry.js → p-3c7c92c0.entry.js} +1 -1
- package/dist/ketchup/{p-954cc340.entry.js → p-41cf8703.entry.js} +1 -1
- package/dist/ketchup/{p-3c11e615.entry.js → p-6127fccf.entry.js} +1 -1
- package/dist/ketchup/{p-f71a1675.entry.js → p-6b82e4e2.entry.js} +1 -1
- package/dist/ketchup/p-704e60eb.js +30 -0
- package/dist/ketchup/p-70660fe2.js +1 -0
- package/dist/ketchup/{p-ea10176c.entry.js → p-762c0382.entry.js} +1 -1
- package/dist/ketchup/{p-c5ce8951.entry.js → p-76947316.entry.js} +1 -1
- package/dist/ketchup/{p-d2ee56dd.entry.js → p-8103b80a.entry.js} +1 -1
- package/dist/ketchup/{p-99e0d768.entry.js → p-9fa457d4.entry.js} +1 -1
- package/dist/ketchup/{p-65974e48.entry.js → p-a0ce8075.entry.js} +1 -1
- package/dist/ketchup/p-a804fe83.entry.js +27 -0
- package/dist/ketchup/{p-7454cb92.js → p-ca9fd099.js} +1 -1
- package/dist/ketchup/p-caabb9ab.entry.js +1 -0
- package/dist/ketchup/p-cc3abf84.entry.js +1 -0
- package/dist/ketchup/p-cd5cfa7c.js +1 -0
- package/dist/ketchup/p-d2e76960.entry.js +1 -0
- package/dist/ketchup/p-d3b542b3.js +2 -0
- package/dist/ketchup/p-d7004ae4.js +1 -0
- package/dist/ketchup/{p-e0035c58.js → p-d95c904b.js} +1 -1
- package/dist/ketchup/{p-7eff4eee.js → p-ddce3430.js} +1 -1
- package/dist/ketchup/p-ee580b3a.entry.js +1 -0
- package/dist/ketchup/p-f49cb68e.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} +12 -9
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +48 -0
- package/dist/types/components/kup-form/kup-form.d.ts +68 -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 +412 -159
- 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.d.ts +2 -0
- 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 +2 -1
- package/package.json +2 -2
- package/dist/cjs/f-cell-69294bca.js +0 -653
- package/dist/collection/assets/form-editor.js +0 -338
- package/dist/collection/components/kup-form-editor/kup-form-editor-declarations.js +0 -23
- 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-80968627.entry.js +0 -1
- package/dist/ketchup/p-976244f9.entry.js +0 -9
- 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-db71436b.entry.js +0 -27
- package/dist/ketchup/p-e1039cf2.entry.js +0 -1
|
@@ -1,17 +1,18 @@
|
|
|
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-ad6ab214.js';
|
|
2
|
+
import { k as kupManagerInstance, K as KupThemeIconValues, a as KupDynamicPositionPlacement, b as KupThemeColorValues, c as KupDebugCategory, d as KupDatesFormats, e as KupCardBuiltInClockElements, f as KupCardCSSClasses, g as KupLanguageTotals, h as KupLanguageGeneric, i as KupLanguageColumn, j as KupDataNewColumnTypes, l as KupCardSubEvents, m as KupCardIds, n as KupLanguageRow, o as KupCardFamily, p as KupCardProps, q as KupDates, r as KupDatesNormalize, s as KupObjects, G as GroupLabelDisplayMode, S as SelectionMode, t as KupLanguageGrouping, u as KupLanguageCheckbox, v as KupLanguageSearch, F as FCellPadding, L as LoadMoreMode, P as PaginatorPos, w as ShowGrid, T as TotalMode, x as TotalLabel, y as KupPointerEventTypes, z as kupDraggableColumnAttr, A as kupDragActiveAttr, B as KupDragEffect, C as kupDraggableCellAttr, D as KupDropEventTypes, E as iconColumn, H as keyColumn, I as fieldColumn, J as FixedCellsCSSVarsBase, M as SortMode, N as KupLanguageFontsize, O as KupLanguageDensity, Q as KupLanguageGrid, R as kupDynamicPositionAttribute, U as KupDataTableProps, V as FixedCellsClasses } from './kup-manager-3325b2d8.js';
|
|
3
|
+
import { F as FTextField } from './f-text-field-184a5fb3.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-
|
|
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-6373a07e.js';
|
|
6
6
|
import { c as componentWrapperId } from './GenericVariables-665de00a.js';
|
|
7
|
-
import { F as FImage } from './f-image-
|
|
8
|
-
import { F as FButton } from './f-button-
|
|
7
|
+
import { F as FImage } from './f-image-b08ebeb2.js';
|
|
8
|
+
import { F as FButton } from './f-button-2f6cc296.js';
|
|
9
9
|
import { F as FButtonStyling } from './f-button-declarations-b1b4cac4.js';
|
|
10
|
-
import { F as FChipType, a as FChip } from './f-chip-
|
|
10
|
+
import { F as FChipType, a as FChip } from './f-chip-b39eb49a.js';
|
|
11
11
|
import { M as MDCRipple } from './component-b1bedf1d.js';
|
|
12
|
-
import { g as getColumnByName, f as formatToNumber, a as getValueForDisplay2, b as getValueForDisplay } from './cell-utils-
|
|
13
|
-
import { F as FCheckbox
|
|
14
|
-
import { F as FiltersColumnMenu, a as FiltersRows, b as Filters, c as FilterInterval, d as calcTotals, n as normalizeRows, p as paginateRows, f as filterRows, g as groupRows, s as sortRows, e as FPaginator, h as pageChange, r as rowsPerPageChange, t as treeMainColumnName, K as KupTreeExpansionMode, i as KupGlobalFilterMode, j as KupTreeProps } from './f-paginator-utils-
|
|
12
|
+
import { g as getColumnByName, f as formatToNumber, a as getValueForDisplay2, b as getValueForDisplay } from './cell-utils-7fc84d4e.js';
|
|
13
|
+
import { F as FCheckbox } from './f-checkbox-c51c4a75.js';
|
|
14
|
+
import { F as FiltersColumnMenu, a as FiltersRows, b as Filters, c as FilterInterval, d as calcTotals, n as normalizeRows, p as paginateRows, f as filterRows, g as groupRows, s as sortRows, e as FPaginator, h as pageChange, r as rowsPerPageChange, t as treeMainColumnName, K as KupTreeExpansionMode, i as KupGlobalFilterMode, j as KupTreeProps } from './f-paginator-utils-4fda6086.js';
|
|
15
|
+
import { F as FCell, a as FSwitch } from './f-cell-4428481c.js';
|
|
15
16
|
import './tslib.es6-3eea2234.js';
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -104,15 +105,21 @@ function consistencyCheck(idIn, listData, listEl, selectMode, displayMode, e) {
|
|
|
104
105
|
if (selected == null && idIn == null && listData) {
|
|
105
106
|
selected = getFirstItemSelected(listData);
|
|
106
107
|
}
|
|
108
|
+
let trueValue = null;
|
|
107
109
|
if (selected == null) {
|
|
108
110
|
selected = {
|
|
109
111
|
id: idIn == null ? '' : idIn,
|
|
110
112
|
value: idIn == null ? '' : idIn,
|
|
111
113
|
};
|
|
114
|
+
id = selected.id;
|
|
115
|
+
displayedValue = selected.id;
|
|
116
|
+
trueValue = selected.id;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
120
|
+
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
121
|
+
trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
112
122
|
}
|
|
113
|
-
id = getIdOfItemByDisplayMode(selected, selectMode, ' - ');
|
|
114
|
-
displayedValue = getIdOfItemByDisplayMode(selected, displayMode, ' - ');
|
|
115
|
-
const trueValue = getIdOfItemByDisplayMode(selected, ItemsDisplayMode.CODE, ' - ');
|
|
116
123
|
return {
|
|
117
124
|
value: id,
|
|
118
125
|
displayedValue: displayedValue,
|
|
@@ -192,6 +199,23 @@ function getItemByDisplayMode(listData, id, displayMode, setSelected) {
|
|
|
192
199
|
|
|
193
200
|
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
201
|
|
|
202
|
+
var __classPrivateFieldGet$2 = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
203
|
+
if (kind === "a" && !f)
|
|
204
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
205
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
206
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
207
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
208
|
+
};
|
|
209
|
+
var __classPrivateFieldSet$2 = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
210
|
+
if (kind === "m")
|
|
211
|
+
throw new TypeError("Private method is not writable");
|
|
212
|
+
if (kind === "a" && !f)
|
|
213
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
214
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
215
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
216
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
217
|
+
};
|
|
218
|
+
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
219
|
const KupAutocomplete = class {
|
|
196
220
|
constructor(hostRef) {
|
|
197
221
|
registerInstance(this, hostRef);
|
|
@@ -202,6 +226,7 @@ const KupAutocomplete = class {
|
|
|
202
226
|
this.kupInput = createEvent(this, "kup-autocomplete-input", 6);
|
|
203
227
|
this.kupIconClick = createEvent(this, "kup-autocomplete-iconclick", 6);
|
|
204
228
|
this.kupItemClick = createEvent(this, "kup-autocomplete-itemclick", 6);
|
|
229
|
+
_KupAutocomplete_instances.add(this);
|
|
205
230
|
/*-------------------------------------------------*/
|
|
206
231
|
/* S t a t e s */
|
|
207
232
|
/*-------------------------------------------------*/
|
|
@@ -269,34 +294,35 @@ const KupAutocomplete = class {
|
|
|
269
294
|
/*-------------------------------------------------*/
|
|
270
295
|
/* I n t e r n a l V a r i a b l e s */
|
|
271
296
|
/*-------------------------------------------------*/
|
|
272
|
-
this
|
|
273
|
-
this
|
|
274
|
-
this
|
|
297
|
+
_KupAutocomplete_doConsistencyCheck.set(this, true);
|
|
298
|
+
_KupAutocomplete_elStyle.set(this, undefined);
|
|
299
|
+
_KupAutocomplete_listEl.set(this, null);
|
|
275
300
|
/**
|
|
276
301
|
* Instance of the KupManager class.
|
|
277
302
|
*/
|
|
278
|
-
this
|
|
279
|
-
this
|
|
280
|
-
this
|
|
281
|
-
this
|
|
303
|
+
_KupAutocomplete_kupManager.set(this, kupManagerInstance());
|
|
304
|
+
_KupAutocomplete_textfieldWrapper.set(this, undefined);
|
|
305
|
+
_KupAutocomplete_textfieldEl.set(this, undefined);
|
|
306
|
+
_KupAutocomplete_clickCb.set(this, null);
|
|
307
|
+
_KupAutocomplete_inputTimeout.set(this, void 0);
|
|
282
308
|
}
|
|
283
309
|
onKupBlur() {
|
|
284
310
|
this.kupBlur.emit({
|
|
285
311
|
comp: this,
|
|
286
312
|
id: this.rootElement.id,
|
|
287
313
|
value: this.value,
|
|
288
|
-
inputValue: this.
|
|
314
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
289
315
|
});
|
|
290
316
|
}
|
|
291
317
|
onKupChange(value) {
|
|
292
|
-
this
|
|
293
|
-
const ret = this.
|
|
318
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
319
|
+
const ret = __classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
294
320
|
if (ret.exists || this.allowInconsistentValues) {
|
|
295
321
|
this.kupChange.emit({
|
|
296
322
|
comp: this,
|
|
297
323
|
id: this.rootElement.id,
|
|
298
324
|
value: this.value,
|
|
299
|
-
inputValue: this.
|
|
325
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
300
326
|
});
|
|
301
327
|
}
|
|
302
328
|
}
|
|
@@ -305,7 +331,7 @@ const KupAutocomplete = class {
|
|
|
305
331
|
comp: this,
|
|
306
332
|
id: this.rootElement.id,
|
|
307
333
|
value: this.value,
|
|
308
|
-
inputValue: this.
|
|
334
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
309
335
|
});
|
|
310
336
|
}
|
|
311
337
|
onKupFocus() {
|
|
@@ -313,82 +339,78 @@ const KupAutocomplete = class {
|
|
|
313
339
|
comp: this,
|
|
314
340
|
id: this.rootElement.id,
|
|
315
341
|
value: this.value,
|
|
316
|
-
inputValue: this.
|
|
342
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
317
343
|
});
|
|
318
344
|
}
|
|
319
345
|
onKupInput() {
|
|
320
|
-
this
|
|
321
|
-
this.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.listEl.filter = this.displayedValue;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
if (this.textfieldEl.value.length >= this.minimumChars) {
|
|
346
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
347
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value, false);
|
|
348
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
349
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value.length >= this.minimumChars) {
|
|
328
350
|
this.kupInput.emit({
|
|
329
351
|
comp: this,
|
|
330
352
|
id: this.rootElement.id,
|
|
331
353
|
value: this.value,
|
|
332
|
-
inputValue: this.
|
|
354
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
333
355
|
});
|
|
334
356
|
}
|
|
335
357
|
}
|
|
336
358
|
onKupIconClick() {
|
|
337
|
-
if (this.
|
|
338
|
-
this.
|
|
359
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
360
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
339
361
|
}
|
|
340
362
|
else {
|
|
341
|
-
this.
|
|
363
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, true);
|
|
342
364
|
}
|
|
343
365
|
this.kupIconClick.emit({
|
|
344
366
|
comp: this,
|
|
345
367
|
id: this.rootElement.id,
|
|
346
368
|
value: this.value,
|
|
347
|
-
inputValue: this.
|
|
348
|
-
open: this.
|
|
369
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
370
|
+
open: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.contains('toggled'),
|
|
349
371
|
});
|
|
350
372
|
}
|
|
351
373
|
onKupItemClick(e) {
|
|
352
374
|
this.onKupChange(e.detail.selected.id);
|
|
353
|
-
this.
|
|
354
|
-
if (this
|
|
355
|
-
this.
|
|
375
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
376
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f")) {
|
|
377
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
356
378
|
}
|
|
357
379
|
this.kupItemClick.emit({
|
|
358
380
|
comp: this,
|
|
359
381
|
id: this.rootElement.id,
|
|
360
382
|
value: this.value,
|
|
361
|
-
inputValue: this.
|
|
383
|
+
inputValue: __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value,
|
|
362
384
|
});
|
|
363
385
|
}
|
|
364
386
|
/*-------------------------------------------------*/
|
|
365
387
|
/* L i s t e n e r s */
|
|
366
388
|
/*-------------------------------------------------*/
|
|
367
389
|
listenKeydown(e) {
|
|
368
|
-
if (this.
|
|
390
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_isListOpened).call(this)) {
|
|
369
391
|
switch (e.key) {
|
|
370
392
|
case 'ArrowDown':
|
|
371
393
|
e.preventDefault();
|
|
372
394
|
e.stopPropagation();
|
|
373
|
-
this.
|
|
395
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
374
396
|
break;
|
|
375
397
|
case 'ArrowUp':
|
|
376
398
|
e.preventDefault();
|
|
377
399
|
e.stopPropagation();
|
|
378
|
-
this.
|
|
400
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
379
401
|
break;
|
|
380
402
|
case 'Enter':
|
|
381
403
|
e.preventDefault();
|
|
382
404
|
e.stopPropagation();
|
|
383
|
-
this.
|
|
384
|
-
this.
|
|
385
|
-
this.
|
|
405
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").select().then(() => {
|
|
406
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
407
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
386
408
|
});
|
|
387
409
|
break;
|
|
388
410
|
case 'Escape':
|
|
389
411
|
e.preventDefault();
|
|
390
412
|
e.stopPropagation();
|
|
391
|
-
this.
|
|
413
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
392
414
|
break;
|
|
393
415
|
}
|
|
394
416
|
}
|
|
@@ -397,14 +419,14 @@ const KupAutocomplete = class {
|
|
|
397
419
|
case 'ArrowDown':
|
|
398
420
|
e.preventDefault();
|
|
399
421
|
e.stopPropagation();
|
|
400
|
-
this.
|
|
401
|
-
this.
|
|
422
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
423
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusNext();
|
|
402
424
|
break;
|
|
403
425
|
case 'ArrowUp':
|
|
404
426
|
e.preventDefault();
|
|
405
427
|
e.stopPropagation();
|
|
406
|
-
this.
|
|
407
|
-
this.
|
|
428
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_openList).call(this, false);
|
|
429
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").focusPrevious();
|
|
408
430
|
break;
|
|
409
431
|
}
|
|
410
432
|
}
|
|
@@ -437,7 +459,7 @@ const KupAutocomplete = class {
|
|
|
437
459
|
* Sets the focus to the component.
|
|
438
460
|
*/
|
|
439
461
|
async setFocus() {
|
|
440
|
-
this.
|
|
462
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").focus();
|
|
441
463
|
}
|
|
442
464
|
/**
|
|
443
465
|
* Sets the props to the component.
|
|
@@ -451,81 +473,16 @@ const KupAutocomplete = class {
|
|
|
451
473
|
* @param {string} value - Value of the component.
|
|
452
474
|
*/
|
|
453
475
|
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) })));
|
|
476
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
477
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, value, true);
|
|
521
478
|
}
|
|
522
479
|
/*-------------------------------------------------*/
|
|
523
480
|
/* L i f e c y c l e H o o k s */
|
|
524
481
|
/*-------------------------------------------------*/
|
|
525
482
|
componentWillLoad() {
|
|
526
|
-
this.
|
|
527
|
-
this.
|
|
528
|
-
this
|
|
483
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, false);
|
|
484
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.register(this);
|
|
485
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, true, "f");
|
|
529
486
|
this.value = this.initialValue;
|
|
530
487
|
if (!this.data) {
|
|
531
488
|
this.data = {
|
|
@@ -535,43 +492,103 @@ const KupAutocomplete = class {
|
|
|
535
492
|
}
|
|
536
493
|
}
|
|
537
494
|
componentDidLoad() {
|
|
538
|
-
this.
|
|
539
|
-
this.
|
|
495
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_consistencyCheck).call(this, this.value, true);
|
|
496
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logLoad(this, true);
|
|
540
497
|
}
|
|
541
498
|
componentWillRender() {
|
|
542
|
-
this.
|
|
499
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, false);
|
|
543
500
|
}
|
|
544
501
|
componentDidRender() {
|
|
545
502
|
const root = this.rootElement.shadowRoot;
|
|
546
503
|
if (root) {
|
|
547
504
|
const f = root.querySelector('.f-text-field');
|
|
548
505
|
if (f) {
|
|
549
|
-
this
|
|
550
|
-
this
|
|
506
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_textfieldWrapper, f, "f");
|
|
507
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_textfieldEl, f.querySelector('input'), "f");
|
|
551
508
|
FTextFieldMDC(f);
|
|
552
509
|
}
|
|
553
510
|
}
|
|
554
|
-
this.
|
|
511
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").debug.logRender(this, true);
|
|
555
512
|
}
|
|
556
513
|
render() {
|
|
557
514
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
558
515
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
559
|
-
return (h(Host, { class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: this
|
|
516
|
+
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
517
|
? KupThemeIconValues.DROPDOWN
|
|
561
518
|
: 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.
|
|
519
|
+
window.clearTimeout(__classPrivateFieldGet$2(this, _KupAutocomplete_inputTimeout, "f"));
|
|
520
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_inputTimeout, window.setTimeout(() => this.onKupInput(), this.inputDelay), "f");
|
|
521
|
+
}, onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_prepList).call(this)));
|
|
565
522
|
}
|
|
566
523
|
disconnectedCallback() {
|
|
567
|
-
if (this
|
|
568
|
-
this.
|
|
569
|
-
this.
|
|
524
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f")) {
|
|
525
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.unregister([__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f")]);
|
|
526
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").remove();
|
|
570
527
|
}
|
|
571
|
-
this.
|
|
528
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").theme.unregister(this);
|
|
572
529
|
}
|
|
573
530
|
get rootElement() { return getElement$1(this); }
|
|
574
531
|
};
|
|
532
|
+
_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) {
|
|
533
|
+
if (forceOpen != true &&
|
|
534
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldEl, "f").value.length < this.minimumChars) {
|
|
535
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
538
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.add('toggled');
|
|
539
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible = true;
|
|
540
|
+
const elStyle = __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").style;
|
|
541
|
+
elStyle.height = 'auto';
|
|
542
|
+
elStyle.minWidth = __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").clientWidth + 'px';
|
|
543
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.isRegistered(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"))) {
|
|
544
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.changeAnchor(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f"));
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.register(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), __classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f"), 0, KupDynamicPositionPlacement.AUTO, true);
|
|
548
|
+
}
|
|
549
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.start(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"));
|
|
550
|
+
if (!__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f")) {
|
|
551
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_clickCb, {
|
|
552
|
+
cb: () => {
|
|
553
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
554
|
+
},
|
|
555
|
+
el: __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"),
|
|
556
|
+
}, "f");
|
|
557
|
+
}
|
|
558
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").addClickCallback(__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f"), true);
|
|
559
|
+
return true;
|
|
560
|
+
}, _KupAutocomplete_closeList = function _KupAutocomplete_closeList() {
|
|
561
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_textfieldWrapper, "f").classList.remove('toggled');
|
|
562
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible = false;
|
|
563
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").dynamicPosition.stop(__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"));
|
|
564
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$2(this, _KupAutocomplete_clickCb, "f"));
|
|
565
|
+
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
566
|
+
return __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
567
|
+
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, setValue) {
|
|
568
|
+
if (!__classPrivateFieldGet$2(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
__classPrivateFieldSet$2(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
572
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
573
|
+
if (ret.exists || this.allowInconsistentValues) {
|
|
574
|
+
if (setValue) {
|
|
575
|
+
this.value = ret.value;
|
|
576
|
+
this.displayedValue = ret.displayedValue;
|
|
577
|
+
}
|
|
578
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
579
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
this.displayedValue = idIn;
|
|
584
|
+
if (__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
585
|
+
__classPrivateFieldGet$2(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return ret;
|
|
589
|
+
}, _KupAutocomplete_prepList = function _KupAutocomplete_prepList() {
|
|
590
|
+
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")) })));
|
|
591
|
+
};
|
|
575
592
|
KupAutocomplete.style = kupAutocompleteCss;
|
|
576
593
|
|
|
577
594
|
/**
|
|
@@ -6930,7 +6947,7 @@ const KupCombobox = class {
|
|
|
6930
6947
|
});
|
|
6931
6948
|
}
|
|
6932
6949
|
onKupChange(value) {
|
|
6933
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
6950
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
6934
6951
|
this.kupChange.emit({
|
|
6935
6952
|
comp: this,
|
|
6936
6953
|
id: this.rootElement.id,
|
|
@@ -6963,14 +6980,14 @@ const KupCombobox = class {
|
|
|
6963
6980
|
});
|
|
6964
6981
|
}
|
|
6965
6982
|
onKupInput() {
|
|
6966
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
6983
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").value, false);
|
|
6984
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
6967
6985
|
this.kupInput.emit({
|
|
6968
6986
|
comp: this,
|
|
6969
6987
|
id: this.rootElement.id,
|
|
6970
6988
|
value: this.value,
|
|
6971
6989
|
inputValue: __classPrivateFieldGet$1(this, _KupCombobox_textfieldEl, "f").value,
|
|
6972
6990
|
});
|
|
6973
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_openList).call(this);
|
|
6974
6991
|
}
|
|
6975
6992
|
onKupIconClick() {
|
|
6976
6993
|
if (__classPrivateFieldGet$1(this, _KupCombobox_textfieldWrapper, "f").classList.contains('toggled')) {
|
|
@@ -7096,7 +7113,7 @@ const KupCombobox = class {
|
|
|
7096
7113
|
* @param {string} value - Value to be set.
|
|
7097
7114
|
*/
|
|
7098
7115
|
async setValue(value) {
|
|
7099
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
7116
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, value, true);
|
|
7100
7117
|
}
|
|
7101
7118
|
/*-------------------------------------------------*/
|
|
7102
7119
|
/* L i f e c y c l e H o o k s */
|
|
@@ -7113,7 +7130,7 @@ const KupCombobox = class {
|
|
|
7113
7130
|
}
|
|
7114
7131
|
}
|
|
7115
7132
|
componentDidLoad() {
|
|
7116
|
-
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this,
|
|
7133
|
+
__classPrivateFieldGet$1(this, _KupCombobox_instances, "m", _KupCombobox_consistencyCheck).call(this, this.value, true);
|
|
7117
7134
|
__classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").debug.logLoad(this, true);
|
|
7118
7135
|
}
|
|
7119
7136
|
componentWillRender() {
|
|
@@ -7136,7 +7153,7 @@ const KupCombobox = class {
|
|
|
7136
7153
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7137
7154
|
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
7155
|
? 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)))
|
|
7156
|
+
: 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
7157
|
}
|
|
7141
7158
|
disconnectedCallback() {
|
|
7142
7159
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f")) {
|
|
@@ -7183,20 +7200,22 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7183
7200
|
__classPrivateFieldGet$1(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$1(this, _KupCombobox_clickCb, "f"));
|
|
7184
7201
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7185
7202
|
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
|
-
|
|
7203
|
+
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, setValue) {
|
|
7204
|
+
let ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$1(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7205
|
+
if (ret.exists) {
|
|
7206
|
+
if (setValue) {
|
|
7207
|
+
this.value = ret.value;
|
|
7208
|
+
this.displayedValue = ret.displayedValue;
|
|
7209
|
+
}
|
|
7191
7210
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f") != null) {
|
|
7192
|
-
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter =
|
|
7211
|
+
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7193
7212
|
}
|
|
7194
7213
|
}
|
|
7195
7214
|
else {
|
|
7196
7215
|
this.value = idIn;
|
|
7197
7216
|
this.displayedValue = idIn;
|
|
7198
7217
|
if (__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f") != null) {
|
|
7199
|
-
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter =
|
|
7218
|
+
__classPrivateFieldGet$1(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7200
7219
|
}
|
|
7201
7220
|
}
|
|
7202
7221
|
return ret;
|
|
@@ -14830,20 +14849,6 @@ const KupSpinner = class {
|
|
|
14830
14849
|
};
|
|
14831
14850
|
KupSpinner.style = kupSpinnerCss;
|
|
14832
14851
|
|
|
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
14852
|
/**
|
|
14848
14853
|
* Props of the kup-switch component.
|
|
14849
14854
|
* Used to export every prop in an object.
|
|
@@ -15236,7 +15241,10 @@ var KupTextFieldProps;
|
|
|
15236
15241
|
KupTextFieldProps["isClearable"] = "Enables a clear trailing icon.";
|
|
15237
15242
|
KupTextFieldProps["label"] = "When set, its content will be shown as a label.";
|
|
15238
15243
|
KupTextFieldProps["leadingLabel"] = "When set to true, the label will be on the left of the component.";
|
|
15244
|
+
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
15245
|
KupTextFieldProps["maxLength"] = "When set, the helper will display a character counter.";
|
|
15246
|
+
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.";
|
|
15247
|
+
KupTextFieldProps["name"] = "The HTML name attribute used for form autocomplete.";
|
|
15240
15248
|
KupTextFieldProps["outlined"] = "When set to true, the component will be rendered as an outlined field.";
|
|
15241
15249
|
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
15250
|
KupTextFieldProps["step"] = "The HTML step of the input element. It has effect only with number input type.";
|
|
@@ -15352,6 +15360,11 @@ const KupTextField = class {
|
|
|
15352
15360
|
* @default null
|
|
15353
15361
|
*/
|
|
15354
15362
|
this.min = null;
|
|
15363
|
+
/**
|
|
15364
|
+
* The HTML name attribute used for form autocomplete.
|
|
15365
|
+
* @default null
|
|
15366
|
+
*/
|
|
15367
|
+
this.name = null;
|
|
15355
15368
|
/**
|
|
15356
15369
|
* When set to true, the component will be rendered as an outlined field.
|
|
15357
15370
|
* @default false
|
|
@@ -15555,6 +15568,7 @@ const KupTextField = class {
|
|
|
15555
15568
|
max: this.max,
|
|
15556
15569
|
maxLength: this.maxLength,
|
|
15557
15570
|
min: this.min,
|
|
15571
|
+
name: this.name,
|
|
15558
15572
|
outlined: this.outlined,
|
|
15559
15573
|
readOnly: this.readOnly,
|
|
15560
15574
|
secondary: this.rootElement.classList.contains('kup-secondary')
|
|
@@ -15671,12 +15685,6 @@ const KupTimePicker = class {
|
|
|
15671
15685
|
* Instance of the KupManager class.
|
|
15672
15686
|
*/
|
|
15673
15687
|
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
15688
|
this.hoursActive = true;
|
|
15681
15689
|
this.minutesActive = false;
|
|
15682
15690
|
this.secondsActive = false;
|
|
@@ -16385,7 +16393,6 @@ const KupTree = class {
|
|
|
16385
16393
|
if (this.store && this.stateId) {
|
|
16386
16394
|
const state = this.store.getState(this.stateId);
|
|
16387
16395
|
if (state != null) {
|
|
16388
|
-
console.log('Initialize with state for stateId ' + this.stateId, state);
|
|
16389
16396
|
this.density = state.density;
|
|
16390
16397
|
this.showFilters = state.showFilters;
|
|
16391
16398
|
this.showFooter = state.showFooter;
|
|
@@ -16432,7 +16439,6 @@ const KupTree = class {
|
|
|
16432
16439
|
return;
|
|
16433
16440
|
}
|
|
16434
16441
|
if (somethingChanged) {
|
|
16435
|
-
console.log('Persisting state for stateId ' + this.stateId + ': ', this.state);
|
|
16436
16442
|
this.store.persistState(this.stateId, this.state);
|
|
16437
16443
|
}
|
|
16438
16444
|
}
|
|
@@ -16741,7 +16747,7 @@ const KupTree = class {
|
|
|
16741
16747
|
this.closeTotalMenu();
|
|
16742
16748
|
this.openTotalMenu(column);
|
|
16743
16749
|
}
|
|
16744
|
-
getEventDetails(path) {
|
|
16750
|
+
getEventDetails(path, e) {
|
|
16745
16751
|
let isHeader, isBody, isFooter, td, th, tr, filterRemove;
|
|
16746
16752
|
if (path) {
|
|
16747
16753
|
for (let i = path.length - 1; i >= 0; i--) {
|
|
@@ -16813,6 +16819,7 @@ const KupTree = class {
|
|
|
16813
16819
|
cell: cell ? cell : null,
|
|
16814
16820
|
column: column ? column : null,
|
|
16815
16821
|
filterRemove: filterRemove ? filterRemove : null,
|
|
16822
|
+
originalEvent: e,
|
|
16816
16823
|
row: row ? row : null,
|
|
16817
16824
|
td: td ? td : null,
|
|
16818
16825
|
th: th ? th : null,
|
|
@@ -16821,7 +16828,7 @@ const KupTree = class {
|
|
|
16821
16828
|
}
|
|
16822
16829
|
contextMenuHandler(e) {
|
|
16823
16830
|
e.preventDefault();
|
|
16824
|
-
const details = this.getEventDetails(this.getEventPath(e.target));
|
|
16831
|
+
const details = this.getEventDetails(this.getEventPath(e.target), e);
|
|
16825
16832
|
if (details.area === 'header') {
|
|
16826
16833
|
if (details.th && details.column) {
|
|
16827
16834
|
this.openColumnMenu(details.column.name);
|
|
@@ -17556,6 +17563,12 @@ const KupTree = class {
|
|
|
17556
17563
|
}
|
|
17557
17564
|
}
|
|
17558
17565
|
}
|
|
17566
|
+
if (root) {
|
|
17567
|
+
const fs = root.querySelectorAll('.f-text-field');
|
|
17568
|
+
for (let index = 0; index < fs.length; index++) {
|
|
17569
|
+
FTextFieldMDC(fs[index]);
|
|
17570
|
+
}
|
|
17571
|
+
}
|
|
17559
17572
|
if (this.preventXScroll) {
|
|
17560
17573
|
this.setEllipsis();
|
|
17561
17574
|
}
|