@sme.up/ketchup 11.0.0-SNAPSHOT-20250108124144 → 11.0.0-SNAPSHOT-20250108164743
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/kup-autocomplete_28.cjs.entry.js +67 -52
- package/dist/cjs/kup-input-panel.cjs.entry.js +5 -4
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +13 -15
- package/dist/collection/components/kup-combobox/kup-combobox.js +10 -15
- package/dist/collection/components/kup-input-panel/kup-input-panel.css +2 -1
- package/dist/collection/components/kup-input-panel/kup-input-panel.js +4 -3
- package/dist/collection/components/kup-list/kup-list-helper.js +17 -15
- package/dist/collection/components/kup-list/kup-list.js +26 -6
- package/dist/components/kup-accordion.js +1 -1
- package/dist/components/kup-activity-timeline.js +1 -1
- package/dist/components/kup-autocomplete.js +1 -1
- package/dist/components/kup-badge.js +1 -1
- package/dist/components/kup-box.js +1 -1
- package/dist/components/kup-button-list.js +1 -1
- package/dist/components/kup-button.js +1 -1
- package/dist/components/kup-calendar.js +1 -1
- package/dist/components/kup-card-list.js +2 -2
- package/dist/components/kup-card.js +1 -1
- package/dist/components/kup-cell.js +1 -1
- package/dist/components/kup-chart.js +1 -1
- package/dist/components/kup-checkbox.js +1 -1
- package/dist/components/kup-chip.js +1 -1
- package/dist/components/kup-color-picker.js +1 -1
- package/dist/components/kup-combobox.js +1 -1
- package/dist/components/kup-dashboard.js +1 -1
- package/dist/components/kup-data-table.js +1 -1
- package/dist/components/kup-date-picker.js +1 -1
- package/dist/components/kup-dialog.js +1 -1
- package/dist/components/kup-drawer.js +1 -1
- package/dist/components/kup-dropdown-button.js +1 -1
- package/dist/components/kup-echart.js +1 -1
- package/dist/components/kup-editor.js +1 -1
- package/dist/components/kup-family-tree.js +2 -2
- package/dist/components/kup-form.js +1 -1
- package/dist/components/kup-gauge.js +1 -1
- package/dist/components/kup-grid.js +1 -1
- package/dist/components/kup-htm.js +1 -1
- package/dist/components/kup-iframe.js +1 -1
- package/dist/components/kup-image-list.js +1 -1
- package/dist/components/kup-image.js +1 -1
- package/dist/components/kup-input-panel.js +7 -6
- package/dist/components/kup-lazy.js +1 -1
- package/dist/components/kup-list.js +1 -1
- package/dist/components/kup-magic-box.js +3 -3
- package/dist/components/kup-nav-bar.js +1 -1
- package/dist/components/kup-numeric-picker.js +1 -1
- package/dist/components/kup-object-field.js +1 -1
- package/dist/components/kup-pdf.js +1 -1
- package/dist/components/kup-photo-frame.js +1 -1
- package/dist/components/kup-planner.js +1 -1
- package/dist/components/kup-probe.js +1 -1
- package/dist/components/kup-progress-bar.js +1 -1
- package/dist/components/kup-qlik.js +1 -1
- package/dist/components/kup-radio.js +1 -1
- package/dist/components/kup-rating.js +1 -1
- package/dist/components/kup-snackbar.js +1 -1
- package/dist/components/kup-spinner.js +1 -1
- package/dist/components/kup-switch.js +1 -1
- package/dist/components/kup-tab-bar.js +1 -1
- package/dist/components/kup-text-field.js +1 -1
- package/dist/components/kup-time-picker.js +1 -1
- package/dist/components/kup-toolbar.js +1 -1
- package/dist/components/kup-tree.js +1 -1
- package/dist/components/kup-txt.js +1 -1
- package/dist/components/kup-typography-list.js +1 -1
- package/dist/components/kup-typography.js +1 -1
- package/dist/components/{p-0e384530.js → p-1194de8e.js} +1 -1
- package/dist/components/{p-87432d08.js → p-12f8e447.js} +1 -1
- package/dist/components/{p-94fc3c00.js → p-32590bb9.js} +1 -1
- package/dist/components/{p-f1ee3ada.js → p-416c7cc3.js} +66 -51
- package/dist/components/{p-24075bd0.js → p-b5a63eb3.js} +1 -1
- package/dist/esm/kup-autocomplete_28.entry.js +67 -52
- package/dist/esm/kup-input-panel.entry.js +5 -4
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-07541fac.entry.js +1 -0
- package/dist/ketchup/p-c5130e83.entry.js +9 -0
- package/package.json +1 -1
- package/dist/ketchup/p-41830b0d.entry.js +0 -9
- package/dist/ketchup/p-cdad0a11.entry.js +0 -1
|
@@ -41,24 +41,26 @@ var KupAutocompleteProps;
|
|
|
41
41
|
})(KupAutocompleteProps || (KupAutocompleteProps = {}));
|
|
42
42
|
|
|
43
43
|
function getIdOfItemByDisplayMode(item, mode, separator) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (mode == kupManager$1.ItemsDisplayMode.DESCRIPTION) {
|
|
48
|
-
return item.value;
|
|
44
|
+
const { id, value } = item;
|
|
45
|
+
if (!id && value) {
|
|
46
|
+
return value;
|
|
49
47
|
}
|
|
50
|
-
if (
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
if (id && !value) {
|
|
49
|
+
return id;
|
|
50
|
+
}
|
|
51
|
+
switch (mode) {
|
|
52
|
+
case kupManager$1.ItemsDisplayMode.CODE:
|
|
53
|
+
return id;
|
|
54
|
+
case kupManager$1.ItemsDisplayMode.DESCRIPTION:
|
|
55
|
+
return value;
|
|
56
|
+
case kupManager$1.ItemsDisplayMode.CODE_AND_DESC:
|
|
57
|
+
case kupManager$1.ItemsDisplayMode.CODE_AND_DESC_ALIAS:
|
|
58
|
+
return id && value ? id + separator + value : id || value;
|
|
59
|
+
case kupManager$1.ItemsDisplayMode.DESC_AND_CODE:
|
|
60
|
+
return value && id ? value + separator + id : value || id;
|
|
61
|
+
default:
|
|
62
|
+
return id;
|
|
55
63
|
}
|
|
56
|
-
if (mode == kupManager$1.ItemsDisplayMode.DESC_AND_CODE) {
|
|
57
|
-
if (item.id || item.value) {
|
|
58
|
-
return item.value + separator + item.id;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return item.id;
|
|
62
64
|
}
|
|
63
65
|
function consistencyCheck(idIn, listData, listEl, selectMode, displayMode, e) {
|
|
64
66
|
const validList = !!(listEl && listData && listData['data']);
|
|
@@ -260,6 +262,7 @@ const KupAutocomplete = class {
|
|
|
260
262
|
node: ret.node,
|
|
261
263
|
});
|
|
262
264
|
}
|
|
265
|
+
__classPrivateFieldGet$9(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
263
266
|
}
|
|
264
267
|
onKupClick() {
|
|
265
268
|
this.kupClick.emit({
|
|
@@ -480,7 +483,7 @@ const KupAutocomplete = class {
|
|
|
480
483
|
};
|
|
481
484
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
482
485
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
483
|
-
return (index.h(index.Host, { key: '
|
|
486
|
+
return (index.h(index.Host, { key: '9b562dbefd3dcd6546313faa526d3f6df441de58', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$9(this, _KupAutocomplete_elStyle, "f") }, index.h("style", { key: '2399f62d076091ec5b534ab9323a8a7a555e13f5' }, __classPrivateFieldGet$9(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: 'c48befc1b4be5ac9563e980076015d71342ce713', id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$9(this, _KupAutocomplete_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({ key: '520b3098ecee40da9c4e9b3b3781d3453d0c907c' }, props, { icon: this.showDropDownIcon
|
|
484
487
|
? kupManager$1.KupThemeIconValues.SEARCH
|
|
485
488
|
: null, trailingIcon: true }, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
486
489
|
window.clearTimeout(__classPrivateFieldGet$9(this, _KupAutocomplete_inputTimeout, "f"));
|
|
@@ -535,24 +538,21 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
535
538
|
__classPrivateFieldGet$9(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$9(this, _KupAutocomplete_clickCb, "f"));
|
|
536
539
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
537
540
|
return __classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
538
|
-
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode,
|
|
541
|
+
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
539
542
|
if (!__classPrivateFieldGet$9(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
540
543
|
return;
|
|
541
544
|
}
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
if (setValue) {
|
|
546
|
-
this.value = ret.value;
|
|
547
|
-
this.displayedValue = ret.displayedValue;
|
|
548
|
-
}
|
|
549
|
-
if (__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
550
|
-
__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
551
|
-
}
|
|
545
|
+
if (idIn && idInDecode) {
|
|
546
|
+
this.displayedValue = this.displayedValue =
|
|
547
|
+
getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
552
548
|
}
|
|
553
549
|
else {
|
|
554
|
-
|
|
555
|
-
|
|
550
|
+
__classPrivateFieldSet$5(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
551
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
552
|
+
if ((ret.exists || this.allowInconsistentValues) &&
|
|
553
|
+
eventShouldSetValue) {
|
|
554
|
+
this.value = ret.value;
|
|
555
|
+
this.displayedValue = ret.displayedValue;
|
|
556
556
|
}
|
|
557
557
|
else {
|
|
558
558
|
this.displayedValue = idIn;
|
|
@@ -560,8 +560,8 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
560
560
|
if (__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
561
561
|
__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
562
562
|
}
|
|
563
|
+
return ret;
|
|
563
564
|
}
|
|
564
|
-
return ret;
|
|
565
565
|
}, _KupAutocomplete_prepList = function _KupAutocomplete_prepList() {
|
|
566
566
|
return (index.h("kup-list", Object.assign({ displayMode: this.displayMode }, this.data['kup-list'], { isMenu: true, "onkup-list-click": (e) => this.onKupItemClick(e), ref: (el) => (__classPrivateFieldSet$5(this, _KupAutocomplete_listEl, el, "f")) })));
|
|
567
567
|
};
|
|
@@ -7500,6 +7500,7 @@ const KupCombobox = class {
|
|
|
7500
7500
|
inputValue: __classPrivateFieldGet$7(this, _KupCombobox_textfieldEl, "f").value,
|
|
7501
7501
|
node: ret.node,
|
|
7502
7502
|
});
|
|
7503
|
+
__classPrivateFieldGet$7(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7503
7504
|
}
|
|
7504
7505
|
onKupClick() {
|
|
7505
7506
|
this.onKupIconClick();
|
|
@@ -7716,7 +7717,7 @@ const KupCombobox = class {
|
|
|
7716
7717
|
};
|
|
7717
7718
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
7718
7719
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7719
|
-
return (index.h(index.Host, { key: '
|
|
7720
|
+
return (index.h(index.Host, { key: '80c4c6a95530fc9886496318a1671f13d49815d9', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$7(this, _KupCombobox_elStyle, "f") }, index.h("style", { key: 'e393281cd26940e3c00fa26e5df5ccd82a560471' }, __classPrivateFieldGet$7(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: '73e48d76e96587a78c09dc4e5064f1fcc2b2be11', id: GenericVariables.componentWrapperId, style: __classPrivateFieldGet$7(this, _KupCombobox_elStyle, "f") }, index.h(fTextField.FTextField, Object.assign({ key: 'b691de937b991985d7045009e371885fc9c6f7f9' }, props, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, trailingIcon: true, icon: this.showDropDownIcon
|
|
7720
7721
|
? kupManager$1.KupThemeIconValues.DROPDOWN
|
|
7721
7722
|
: null, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupIconClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet$7(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
7722
7723
|
}
|
|
@@ -7771,21 +7772,15 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7771
7772
|
__classPrivateFieldGet$7(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupCombobox_clickCb, "f"));
|
|
7772
7773
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7773
7774
|
return __classPrivateFieldGet$7(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7774
|
-
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode,
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
if (setValue) {
|
|
7778
|
-
this.value = ret.value;
|
|
7779
|
-
this.displayedValue = ret.displayedValue;
|
|
7780
|
-
}
|
|
7781
|
-
if (__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f") != null) {
|
|
7782
|
-
__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7783
|
-
}
|
|
7775
|
+
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
7776
|
+
if (idIn && idInDecode) {
|
|
7777
|
+
this.displayedValue = getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
7784
7778
|
}
|
|
7785
7779
|
else {
|
|
7786
|
-
this.
|
|
7787
|
-
if (
|
|
7788
|
-
this.
|
|
7780
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$7(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7781
|
+
if (ret.exists && eventShouldSetValue) {
|
|
7782
|
+
this.value = ret.value;
|
|
7783
|
+
this.displayedValue = ret.displayedValue;
|
|
7789
7784
|
}
|
|
7790
7785
|
else {
|
|
7791
7786
|
this.displayedValue = idIn;
|
|
@@ -7793,8 +7788,8 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7793
7788
|
if (__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f") != null) {
|
|
7794
7789
|
__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7795
7790
|
}
|
|
7791
|
+
return ret;
|
|
7796
7792
|
}
|
|
7797
|
-
return ret;
|
|
7798
7793
|
}, _KupCombobox_prepList = function _KupCombobox_prepList() {
|
|
7799
7794
|
var _a, _b;
|
|
7800
7795
|
return (index.h("kup-list", Object.assign({}, this.data['kup-list'], { displayMode: this.displayMode, "is-menu": true, showFilter: ((_b = (_a = this.data['kup-list']) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.length) >= 10 ? true : false, "onkup-list-click": (e) => this.onKupItemClick(e), ref: (el) => (__classPrivateFieldSet$4(this, _KupCombobox_listEl, el, "f")) })));
|
|
@@ -15462,7 +15457,7 @@ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
15462
15457
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15463
15458
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15464
15459
|
};
|
|
15465
|
-
var _KupList_instances, _KupList_kupManager, _KupList_globalFilterTimeout, _KupList_radios, _KupList_listItems, _KupList_handleSelection, _KupList_isNested, _KupList_renderListItem, _KupList_getIconTag, _KupList_isMultiSelection, _KupList_isCheckBoxRule, _KupList_isRadioButtonRule, _KupList_isListBoxRule, _KupList_checkRoleType, _KupList_itemCompliant, _KupList_createFilterComponent, _KupList_listenKeydown;
|
|
15460
|
+
var _KupList_instances, _KupList_kupManager, _KupList_globalFilterTimeout, _KupList_radios, _KupList_listItems, _KupList_previouslySelectedItemIndex, _KupList_previouslySelectedItemReached, _KupList_handleSelection, _KupList_isNested, _KupList_renderListItem, _KupList_getIconTag, _KupList_isMultiSelection, _KupList_isCheckBoxRule, _KupList_isRadioButtonRule, _KupList_isListBoxRule, _KupList_checkRoleType, _KupList_itemCompliant, _KupList_createFilterComponent, _KupList_listenKeydown;
|
|
15466
15461
|
const KupList = class {
|
|
15467
15462
|
constructor(hostRef) {
|
|
15468
15463
|
index.registerInstance(this, hostRef);
|
|
@@ -15480,8 +15475,10 @@ const KupList = class {
|
|
|
15480
15475
|
_KupList_globalFilterTimeout.set(this, void 0);
|
|
15481
15476
|
_KupList_radios.set(this, []);
|
|
15482
15477
|
_KupList_listItems.set(this, []);
|
|
15478
|
+
_KupList_previouslySelectedItemIndex.set(this, void 0);
|
|
15479
|
+
_KupList_previouslySelectedItemReached.set(this, void 0);
|
|
15483
15480
|
_KupList_listenKeydown.set(this, (e) => {
|
|
15484
|
-
if (this.keyboardNavigation) {
|
|
15481
|
+
if (this.keyboardNavigation && __classPrivateFieldGet$4(this, _KupList_listItems, "f")) {
|
|
15485
15482
|
switch (e.key) {
|
|
15486
15483
|
case 'ArrowDown':
|
|
15487
15484
|
e.preventDefault();
|
|
@@ -15557,7 +15554,15 @@ const KupList = class {
|
|
|
15557
15554
|
if (this.focused > __classPrivateFieldGet$4(this, _KupList_listItems, "f").length - 1) {
|
|
15558
15555
|
this.focused = 0;
|
|
15559
15556
|
}
|
|
15560
|
-
__classPrivateFieldGet$4(this,
|
|
15557
|
+
if (!__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
15558
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
15559
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
15560
|
+
this.focused = __classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f");
|
|
15561
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
15562
|
+
}
|
|
15563
|
+
else if (__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused]) {
|
|
15564
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused].focus();
|
|
15565
|
+
}
|
|
15561
15566
|
}
|
|
15562
15567
|
}
|
|
15563
15568
|
/**
|
|
@@ -15582,7 +15587,15 @@ const KupList = class {
|
|
|
15582
15587
|
if (this.focused < 0) {
|
|
15583
15588
|
this.focused = __classPrivateFieldGet$4(this, _KupList_listItems, "f").length - 1;
|
|
15584
15589
|
}
|
|
15585
|
-
__classPrivateFieldGet$4(this,
|
|
15590
|
+
if (!__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
15591
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
15592
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
15593
|
+
this.focused = __classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f");
|
|
15594
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
15595
|
+
}
|
|
15596
|
+
else if (__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused]) {
|
|
15597
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused].focus();
|
|
15598
|
+
}
|
|
15586
15599
|
}
|
|
15587
15600
|
}
|
|
15588
15601
|
/**
|
|
@@ -15698,7 +15711,7 @@ const KupList = class {
|
|
|
15698
15711
|
}
|
|
15699
15712
|
__classPrivateFieldSet$1(this, _KupList_radios, [], "f");
|
|
15700
15713
|
let index$1 = 0;
|
|
15701
|
-
return (index.h(index.Host, { key: '
|
|
15714
|
+
return (index.h(index.Host, { key: 'f1606c18dcfa35ad02c3c7941d0065eff6c384f7' }, index.h("style", { key: '7e1103041cd402bd2f8d3adef4bbdf2ffb9a1eb7' }, __classPrivateFieldGet$4(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: '0bcaa0498b13c789f3c8d8e62f28c646a6de65be', id: "kup-component", class: wrapperClass, onKeyDown: __classPrivateFieldGet$4(this, _KupList_listenKeydown, "f") }, this.showFilter ? (index.h("div", { class: filterClass }, __classPrivateFieldGet$4(this, _KupList_instances, "m", _KupList_createFilterComponent).call(this))) : null, index.h("div", { key: '062bca5c883a1f5627760985a7e687c9bbb48ed3', class: listScrollClass }, index.h("ul", { key: '889d0076b199ae805fa9b3dae51c70734efbe0f4', class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
15702
15715
|
.filter((item) => __classPrivateFieldGet$4(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
15703
15716
|
.map((item) => __classPrivateFieldGet$4(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index$1++)))))));
|
|
15704
15717
|
}
|
|
@@ -15707,7 +15720,7 @@ const KupList = class {
|
|
|
15707
15720
|
}
|
|
15708
15721
|
get rootElement() { return index.getElement(this); }
|
|
15709
15722
|
};
|
|
15710
|
-
_KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_listItems = new WeakMap(), _KupList_listenKeydown = new WeakMap(), _KupList_instances = new WeakSet(), _KupList_handleSelection = function _KupList_handleSelection(index) {
|
|
15723
|
+
_KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_listItems = new WeakMap(), _KupList_previouslySelectedItemIndex = new WeakMap(), _KupList_previouslySelectedItemReached = new WeakMap(), _KupList_listenKeydown = new WeakMap(), _KupList_instances = new WeakSet(), _KupList_handleSelection = function _KupList_handleSelection(index) {
|
|
15711
15724
|
if (index !== null && index !== undefined && !isNaN(index)) {
|
|
15712
15725
|
const listItems = this.rootElement.shadowRoot.querySelectorAll('.list-item');
|
|
15713
15726
|
const id = listItems[index].dataset.id;
|
|
@@ -15730,6 +15743,8 @@ _KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(
|
|
|
15730
15743
|
const item = this.data[index];
|
|
15731
15744
|
item.selected = this.selected.includes(item.id);
|
|
15732
15745
|
}
|
|
15746
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemReached, false, "f");
|
|
15747
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemIndex, this.focused, "f");
|
|
15733
15748
|
this.kupClick.emit({
|
|
15734
15749
|
comp: this,
|
|
15735
15750
|
id: this.rootElement.id,
|
|
@@ -129,7 +129,7 @@ const getInpComponentAbsoluteHeight = (layout) => {
|
|
|
129
129
|
return inpRowHeight;
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
-
const kupInputPanelCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup-fcell-width:fit-content;--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 0);--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n
|
|
132
|
+
const kupInputPanelCss = ".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup-fcell-width:fit-content;--kup_input_panel_background_color:var(\n --kup-input-panel-background-color,\n var(--kup-layer-0)\n );--kup_input_panel_color:var(\n --kup-input-panel-color,\n var(--kup-text-secondary)\n );--kup_input_panel_font_family:var(\n --kup-input-panel-font-family,\n var(--kup-font-family)\n );--kup_input_panel_font_size:var(\n --kup-input-panel-font-size,\n var(--kup-font-size)\n );--kup_input_panel_label_alignment:var(--kup-input-panel-label-alignment);--kup_input_panel_label_width:var(--kup-input-panel-label-width);--kup_input_panel_padding:var(--kup-input-panel-padding, 1em 0);--kup_input_panel_padding--inline:var(--kup-input-panel-padding--inline, 0);--kup_input_panel_absolute_max_height:var(\n --kup-input-panel-absolute-max-height,\n \n 716px\n )}:host .input-panel{background:var(--kup_input_panel_background_color);color:var(--kup_input_panel_color);display:flex;flex-grow:1;overflow:auto;padding:var(--kup_input_panel_padding);position:relative;gap:1rem}:host .input-panel__commands{display:flex;gap:1rem}:host .input-panel__commands.input-panel__commands--right{flex-shrink:0;overflow:hidden}:host .input-panel--inline{flex:1;overflow-x:auto;white-space:nowrap;padding:var(--kup_input_panel_padding--inline);display:inline-flex}:host .input-panel--column{flex-direction:column}:host .input-panel__section_label_container{display:flex;flex-direction:column;gap:1rem}:host .input-panel__section{display:grid;min-width:0}:host .input-panel__section .f-cell__content>*{width:100%}:host .input-panel__horizontal-section{display:inline-grid}:host .input-panel__section-inline{display:inline-block;width:max-content}:host .input-panel .f-cell .f-checkbox .checkbox .checkbox__native-control{height:40px;width:40px}:host .input-panel__label_container{display:flex;flex-direction:column;justify-content:center}:host .input-panel__label_container>.f-cell{flex:1}:host .input-panel__tabs_container{display:flex;flex-direction:column;justify-content:center;gap:2rem}:host .input-panel .f-cell.number-cell .f-cell__content{--kup-textfield-font-family:var(--kup_cell_font_family);font-family:var(--kup_cell_font_family)}:host .input-panel .input-panel-label{display:flex;width:100%;height:100%;align-items:center;justify-content:center}:host .input-panel .input-panel-label--legacy-look{font-size:12px;font-family:var(--kup-font-family-monospace);white-space:pre}:host .input-panel--absolute{justify-content:flex-end;padding:var(--kup-space-02);max-height:var(--kup_input_panel_absolute_max_height)}:host .input-panel--absolute .input-panel-label{justify-content:start}:host .input-panel--absolute .input-panel-label.input-panel-label-number{justify-content:end}:host .input-panel--absolute .mdc-text-field{height:unset !important}:host .input-panel-form--inline{display:flex;align-items:end;gap:1rem}";
|
|
133
133
|
const KupInputPanelStyle0 = kupInputPanelCss;
|
|
134
134
|
|
|
135
135
|
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
@@ -311,9 +311,9 @@ const KupInputPanel = class {
|
|
|
311
311
|
index.h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(kupManager.KupLanguageGeneric.EMPTY_DATA)),
|
|
312
312
|
]
|
|
313
313
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
314
|
-
return (index.h(index.Host, { key: '
|
|
314
|
+
return (index.h(index.Host, { key: '99def586b7b0523db2e50bc702d423c3508dfdf0', "onKup-cell-blur": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_onBlurHandler).bind(this), "onKup-tabbar-click": (e) => {
|
|
315
315
|
this.tabSelected = e.detail.node.id;
|
|
316
|
-
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this) }, index.h("style", { key: '
|
|
316
|
+
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this) }, index.h("style", { key: 'e038f96ecfe84689ed8f664b5d3cbdb6e8123078' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), index.h("div", { key: '974099b920d25293c3c45f3d3fcf80e0944e7ff7', id: GenericVariables.componentWrapperId }, inputPanelContent)));
|
|
317
317
|
}
|
|
318
318
|
disconnectedCallback() {
|
|
319
319
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -347,7 +347,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
347
347
|
else {
|
|
348
348
|
if (layout.absolute) {
|
|
349
349
|
rowContent = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderAbsoluteLayout).call(this, inputPanelCell, layout);
|
|
350
|
-
|
|
350
|
+
// 12px is added due to the chance that the horizontal scrollbar will be rendered
|
|
351
|
+
styleObj.height = `${getInpComponentAbsoluteHeight(layout) * ROW_HEIGHT + 12}px`;
|
|
351
352
|
}
|
|
352
353
|
else {
|
|
353
354
|
if (!layout.sectionsType) {
|
|
@@ -90,6 +90,7 @@ export class KupAutocomplete {
|
|
|
90
90
|
node: ret.node,
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
+
__classPrivateFieldGet(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
93
94
|
}
|
|
94
95
|
onKupClick() {
|
|
95
96
|
this.kupClick.emit({
|
|
@@ -310,7 +311,7 @@ export class KupAutocomplete {
|
|
|
310
311
|
};
|
|
311
312
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
312
313
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
313
|
-
return (h(Host, { key: '
|
|
314
|
+
return (h(Host, { key: '9b562dbefd3dcd6546313faa526d3f6df441de58', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet(this, _KupAutocomplete_elStyle, "f") }, h("style", { key: '2399f62d076091ec5b534ab9323a8a7a555e13f5' }, __classPrivateFieldGet(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'c48befc1b4be5ac9563e980076015d71342ce713', id: componentWrapperId, style: __classPrivateFieldGet(this, _KupAutocomplete_elStyle, "f") }, h(FTextField, Object.assign({ key: '520b3098ecee40da9c4e9b3b3781d3453d0c907c' }, props, { icon: this.showDropDownIcon
|
|
314
315
|
? KupThemeIconValues.SEARCH
|
|
315
316
|
: null, trailingIcon: true }, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => {
|
|
316
317
|
window.clearTimeout(__classPrivateFieldGet(this, _KupAutocomplete_inputTimeout, "f"));
|
|
@@ -1197,24 +1198,21 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
1197
1198
|
__classPrivateFieldGet(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet(this, _KupAutocomplete_clickCb, "f"));
|
|
1198
1199
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
1199
1200
|
return __classPrivateFieldGet(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
1200
|
-
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode,
|
|
1201
|
+
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
1201
1202
|
if (!__classPrivateFieldGet(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
1202
1203
|
return;
|
|
1203
1204
|
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
if (setValue) {
|
|
1208
|
-
this.value = ret.value;
|
|
1209
|
-
this.displayedValue = ret.displayedValue;
|
|
1210
|
-
}
|
|
1211
|
-
if (__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
1212
|
-
__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
1213
|
-
}
|
|
1205
|
+
if (idIn && idInDecode) {
|
|
1206
|
+
this.displayedValue = this.displayedValue =
|
|
1207
|
+
getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
1214
1208
|
}
|
|
1215
1209
|
else {
|
|
1216
|
-
|
|
1217
|
-
|
|
1210
|
+
__classPrivateFieldSet(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
1211
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
1212
|
+
if ((ret.exists || this.allowInconsistentValues) &&
|
|
1213
|
+
eventShouldSetValue) {
|
|
1214
|
+
this.value = ret.value;
|
|
1215
|
+
this.displayedValue = ret.displayedValue;
|
|
1218
1216
|
}
|
|
1219
1217
|
else {
|
|
1220
1218
|
this.displayedValue = idIn;
|
|
@@ -1222,8 +1220,8 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
1222
1220
|
if (__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
1223
1221
|
__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
1224
1222
|
}
|
|
1223
|
+
return ret;
|
|
1225
1224
|
}
|
|
1226
|
-
return ret;
|
|
1227
1225
|
}, _KupAutocomplete_prepList = function _KupAutocomplete_prepList() {
|
|
1228
1226
|
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(this, _KupAutocomplete_listEl, el, "f")) })));
|
|
1229
1227
|
};
|
|
@@ -79,6 +79,7 @@ export class KupCombobox {
|
|
|
79
79
|
inputValue: __classPrivateFieldGet(this, _KupCombobox_textfieldEl, "f").value,
|
|
80
80
|
node: ret.node,
|
|
81
81
|
});
|
|
82
|
+
__classPrivateFieldGet(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
82
83
|
}
|
|
83
84
|
onKupClick() {
|
|
84
85
|
this.onKupIconClick();
|
|
@@ -295,7 +296,7 @@ export class KupCombobox {
|
|
|
295
296
|
};
|
|
296
297
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
297
298
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
298
|
-
return (h(Host, { key: '
|
|
299
|
+
return (h(Host, { key: '80c4c6a95530fc9886496318a1671f13d49815d9', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet(this, _KupCombobox_elStyle, "f") }, h("style", { key: 'e393281cd26940e3c00fa26e5df5ccd82a560471' }, __classPrivateFieldGet(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '73e48d76e96587a78c09dc4e5064f1fcc2b2be11', id: componentWrapperId, style: __classPrivateFieldGet(this, _KupCombobox_elStyle, "f") }, h(FTextField, Object.assign({ key: 'b691de937b991985d7045009e371885fc9c6f7f9' }, props, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, trailingIcon: true, icon: this.showDropDownIcon
|
|
299
300
|
? KupThemeIconValues.DROPDOWN
|
|
300
301
|
: null, value: this.displayedValue, onBlur: () => this.onKupBlur(), onClick: () => this.onKupIconClick(), onChange: (e) => this.onKupChange(e.target.value), onFocus: () => this.onKupFocus(), onInput: () => this.onKupInput(), onIconClick: () => this.onKupIconClick() }))), __classPrivateFieldGet(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
301
302
|
}
|
|
@@ -1082,21 +1083,15 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
1082
1083
|
__classPrivateFieldGet(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet(this, _KupCombobox_clickCb, "f"));
|
|
1083
1084
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
1084
1085
|
return __classPrivateFieldGet(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
1085
|
-
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode,
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
if (setValue) {
|
|
1089
|
-
this.value = ret.value;
|
|
1090
|
-
this.displayedValue = ret.displayedValue;
|
|
1091
|
-
}
|
|
1092
|
-
if (__classPrivateFieldGet(this, _KupCombobox_listEl, "f") != null) {
|
|
1093
|
-
__classPrivateFieldGet(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
1094
|
-
}
|
|
1086
|
+
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
1087
|
+
if (idIn && idInDecode) {
|
|
1088
|
+
this.displayedValue = getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
1095
1089
|
}
|
|
1096
1090
|
else {
|
|
1097
|
-
this.
|
|
1098
|
-
if (
|
|
1099
|
-
this.
|
|
1091
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
1092
|
+
if (ret.exists && eventShouldSetValue) {
|
|
1093
|
+
this.value = ret.value;
|
|
1094
|
+
this.displayedValue = ret.displayedValue;
|
|
1100
1095
|
}
|
|
1101
1096
|
else {
|
|
1102
1097
|
this.displayedValue = idIn;
|
|
@@ -1104,8 +1099,8 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
1104
1099
|
if (__classPrivateFieldGet(this, _KupCombobox_listEl, "f") != null) {
|
|
1105
1100
|
__classPrivateFieldGet(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
1106
1101
|
}
|
|
1102
|
+
return ret;
|
|
1107
1103
|
}
|
|
1108
|
-
return ret;
|
|
1109
1104
|
}, _KupCombobox_prepList = function _KupCombobox_prepList() {
|
|
1110
1105
|
var _a, _b;
|
|
1111
1106
|
return (h("kup-list", Object.assign({}, this.data['kup-list'], { displayMode: this.displayMode, "is-menu": true, showFilter: ((_b = (_a = this.data['kup-list']) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.length) >= 10 ? true : false, "onkup-list-click": (e) => this.onKupItemClick(e), ref: (el) => (__classPrivateFieldSet(this, _KupCombobox_listEl, el, "f")) })));
|
|
@@ -159,7 +159,8 @@
|
|
|
159
159
|
--kup_input_panel_padding--inline: var(--kup-input-panel-padding--inline, 0);
|
|
160
160
|
--kup_input_panel_absolute_max_height: var(
|
|
161
161
|
--kup-input-panel-absolute-max-height,
|
|
162
|
-
|
|
162
|
+
/* 716px comes from the maximum number of lines (32) multiplied by the default height per line (22px) plus 12px for the possibility that the scrollbar will be rendered */
|
|
163
|
+
716px
|
|
163
164
|
);
|
|
164
165
|
}
|
|
165
166
|
:host .input-panel {
|
|
@@ -190,9 +190,9 @@ export class KupInputPanel {
|
|
|
190
190
|
h("p", null, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.translate(KupLanguageGeneric.EMPTY_DATA)),
|
|
191
191
|
]
|
|
192
192
|
: this.inputPanelCells.map((inputPanelCell) => __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderRow).call(this, inputPanelCell));
|
|
193
|
-
return (h(Host, { key: '
|
|
193
|
+
return (h(Host, { key: '99def586b7b0523db2e50bc702d423c3508dfdf0', "onKup-cell-blur": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_onBlurHandler).bind(this), "onKup-tabbar-click": (e) => {
|
|
194
194
|
this.tabSelected = e.detail.node.id;
|
|
195
|
-
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this) }, h("style", { key: '
|
|
195
|
+
}, "onKup-autocomplete-input": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-autocomplete-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this), "onKup-combobox-iconclick": __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_getOptionHandler).bind(this) }, h("style", { key: 'e038f96ecfe84689ed8f664b5d3cbdb6e8123078' }, __classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '974099b920d25293c3c45f3d3fcf80e0944e7ff7', id: componentWrapperId }, inputPanelContent)));
|
|
196
196
|
}
|
|
197
197
|
disconnectedCallback() {
|
|
198
198
|
__classPrivateFieldGet(this, _KupInputPanel_kupManager, "f").language.unregister(this);
|
|
@@ -692,7 +692,8 @@ _KupInputPanel_kupManager = new WeakMap(), _KupInputPanel_formRef = new WeakMap(
|
|
|
692
692
|
else {
|
|
693
693
|
if (layout.absolute) {
|
|
694
694
|
rowContent = __classPrivateFieldGet(this, _KupInputPanel_instances, "m", _KupInputPanel_renderAbsoluteLayout).call(this, inputPanelCell, layout);
|
|
695
|
-
|
|
695
|
+
// 12px is added due to the chance that the horizontal scrollbar will be rendered
|
|
696
|
+
styleObj.height = `${getInpComponentAbsoluteHeight(layout) * ROW_HEIGHT + 12}px`;
|
|
696
697
|
}
|
|
697
698
|
else {
|
|
698
699
|
if (!layout.sectionsType) {
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import { ItemsDisplayMode, } from "./kup-list-declarations";
|
|
2
2
|
export function getIdOfItemByDisplayMode(item, mode, separator) {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const { id, value } = item;
|
|
4
|
+
if (!id && value) {
|
|
5
|
+
return value;
|
|
5
6
|
}
|
|
6
|
-
if (
|
|
7
|
-
return
|
|
7
|
+
if (id && !value) {
|
|
8
|
+
return id;
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
switch (mode) {
|
|
11
|
+
case ItemsDisplayMode.CODE:
|
|
12
|
+
return id;
|
|
13
|
+
case ItemsDisplayMode.DESCRIPTION:
|
|
14
|
+
return value;
|
|
15
|
+
case ItemsDisplayMode.CODE_AND_DESC:
|
|
16
|
+
case ItemsDisplayMode.CODE_AND_DESC_ALIAS:
|
|
17
|
+
return id && value ? id + separator + value : id || value;
|
|
18
|
+
case ItemsDisplayMode.DESC_AND_CODE:
|
|
19
|
+
return value && id ? value + separator + id : value || id;
|
|
20
|
+
default:
|
|
21
|
+
return id;
|
|
19
22
|
}
|
|
20
|
-
return item.id;
|
|
21
23
|
}
|
|
22
24
|
export function consistencyCheck(idIn, listData, listEl, selectMode, displayMode, e) {
|
|
23
25
|
const validList = !!(listEl && listData && listData['data']);
|
|
@@ -14,7 +14,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
14
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15
15
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
16
16
|
};
|
|
17
|
-
var _KupList_instances, _KupList_kupManager, _KupList_globalFilterTimeout, _KupList_radios, _KupList_listItems, _KupList_handleSelection, _KupList_isNested, _KupList_renderListItem, _KupList_getIconTag, _KupList_isMultiSelection, _KupList_isCheckBoxRule, _KupList_isRadioButtonRule, _KupList_isListBoxRule, _KupList_checkRoleType, _KupList_itemCompliant, _KupList_createFilterComponent, _KupList_listenKeydown;
|
|
17
|
+
var _KupList_instances, _KupList_kupManager, _KupList_globalFilterTimeout, _KupList_radios, _KupList_listItems, _KupList_previouslySelectedItemIndex, _KupList_previouslySelectedItemReached, _KupList_handleSelection, _KupList_isNested, _KupList_renderListItem, _KupList_getIconTag, _KupList_isMultiSelection, _KupList_isCheckBoxRule, _KupList_isRadioButtonRule, _KupList_isListBoxRule, _KupList_checkRoleType, _KupList_itemCompliant, _KupList_createFilterComponent, _KupList_listenKeydown;
|
|
18
18
|
import { forceUpdate, h, Host, } from "@stencil/core";
|
|
19
19
|
import { KupListProps, KupListRole, } from "./kup-list-declarations";
|
|
20
20
|
import { ItemsDisplayMode } from "./kup-list-declarations";
|
|
@@ -38,8 +38,10 @@ export class KupList {
|
|
|
38
38
|
_KupList_globalFilterTimeout.set(this, void 0);
|
|
39
39
|
_KupList_radios.set(this, []);
|
|
40
40
|
_KupList_listItems.set(this, []);
|
|
41
|
+
_KupList_previouslySelectedItemIndex.set(this, void 0);
|
|
42
|
+
_KupList_previouslySelectedItemReached.set(this, void 0);
|
|
41
43
|
_KupList_listenKeydown.set(this, (e) => {
|
|
42
|
-
if (this.keyboardNavigation) {
|
|
44
|
+
if (this.keyboardNavigation && __classPrivateFieldGet(this, _KupList_listItems, "f")) {
|
|
43
45
|
switch (e.key) {
|
|
44
46
|
case 'ArrowDown':
|
|
45
47
|
e.preventDefault();
|
|
@@ -115,7 +117,15 @@ export class KupList {
|
|
|
115
117
|
if (this.focused > __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1) {
|
|
116
118
|
this.focused = 0;
|
|
117
119
|
}
|
|
118
|
-
__classPrivateFieldGet(this,
|
|
120
|
+
if (!__classPrivateFieldGet(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
121
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[__classPrivateFieldGet(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
122
|
+
__classPrivateFieldSet(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
123
|
+
this.focused = __classPrivateFieldGet(this, _KupList_previouslySelectedItemIndex, "f");
|
|
124
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[__classPrivateFieldGet(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
125
|
+
}
|
|
126
|
+
else if (__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused]) {
|
|
127
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
128
|
+
}
|
|
119
129
|
}
|
|
120
130
|
}
|
|
121
131
|
/**
|
|
@@ -140,7 +150,15 @@ export class KupList {
|
|
|
140
150
|
if (this.focused < 0) {
|
|
141
151
|
this.focused = __classPrivateFieldGet(this, _KupList_listItems, "f").length - 1;
|
|
142
152
|
}
|
|
143
|
-
__classPrivateFieldGet(this,
|
|
153
|
+
if (!__classPrivateFieldGet(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
154
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[__classPrivateFieldGet(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
155
|
+
__classPrivateFieldSet(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
156
|
+
this.focused = __classPrivateFieldGet(this, _KupList_previouslySelectedItemIndex, "f");
|
|
157
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[__classPrivateFieldGet(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
158
|
+
}
|
|
159
|
+
else if (__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused]) {
|
|
160
|
+
__classPrivateFieldGet(this, _KupList_listItems, "f")[this.focused].focus();
|
|
161
|
+
}
|
|
144
162
|
}
|
|
145
163
|
}
|
|
146
164
|
/**
|
|
@@ -256,7 +274,7 @@ export class KupList {
|
|
|
256
274
|
}
|
|
257
275
|
__classPrivateFieldSet(this, _KupList_radios, [], "f");
|
|
258
276
|
let index = 0;
|
|
259
|
-
return (h(Host, { key: '
|
|
277
|
+
return (h(Host, { key: 'f1606c18dcfa35ad02c3c7941d0065eff6c384f7' }, h("style", { key: '7e1103041cd402bd2f8d3adef4bbdf2ffb9a1eb7' }, __classPrivateFieldGet(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '0bcaa0498b13c789f3c8d8e62f28c646a6de65be', id: "kup-component", class: wrapperClass, onKeyDown: __classPrivateFieldGet(this, _KupList_listenKeydown, "f") }, this.showFilter ? (h("div", { class: filterClass }, __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_createFilterComponent).call(this))) : null, h("div", { key: '062bca5c883a1f5627760985a7e687c9bbb48ed3', class: listScrollClass }, h("ul", { key: '889d0076b199ae805fa9b3dae51c70734efbe0f4', class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
260
278
|
.filter((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
261
279
|
.map((item) => __classPrivateFieldGet(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index++)))))));
|
|
262
280
|
}
|
|
@@ -820,7 +838,7 @@ export class KupList {
|
|
|
820
838
|
}
|
|
821
839
|
static get elementRef() { return "rootElement"; }
|
|
822
840
|
}
|
|
823
|
-
_KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_listItems = new WeakMap(), _KupList_listenKeydown = new WeakMap(), _KupList_instances = new WeakSet(), _KupList_handleSelection = function _KupList_handleSelection(index) {
|
|
841
|
+
_KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(), _KupList_radios = new WeakMap(), _KupList_listItems = new WeakMap(), _KupList_previouslySelectedItemIndex = new WeakMap(), _KupList_previouslySelectedItemReached = new WeakMap(), _KupList_listenKeydown = new WeakMap(), _KupList_instances = new WeakSet(), _KupList_handleSelection = function _KupList_handleSelection(index) {
|
|
824
842
|
if (index !== null && index !== undefined && !isNaN(index)) {
|
|
825
843
|
const listItems = this.rootElement.shadowRoot.querySelectorAll('.list-item');
|
|
826
844
|
const id = listItems[index].dataset.id;
|
|
@@ -843,6 +861,8 @@ _KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(
|
|
|
843
861
|
const item = this.data[index];
|
|
844
862
|
item.selected = this.selected.includes(item.id);
|
|
845
863
|
}
|
|
864
|
+
__classPrivateFieldSet(this, _KupList_previouslySelectedItemReached, false, "f");
|
|
865
|
+
__classPrivateFieldSet(this, _KupList_previouslySelectedItemIndex, this.focused, "f");
|
|
846
866
|
this.kupClick.emit({
|
|
847
867
|
comp: this,
|
|
848
868
|
id: this.rootElement.id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, f as forceUpdate, h, d as Host } from './p-2e5f2e07.js';
|
|
2
2
|
import { k as kupManagerInstance, a as KupComponentSizing, g as getProps, s as setProps, b as KupThemeColorValues, c as KupThemeIconValues } from './p-c8389c1a.js';
|
|
3
|
-
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t } from './p-
|
|
3
|
+
import { M as MDCRipple, F as FImage, c as componentWrapperId, d as defineCustomElement$2, a as defineCustomElement$3, b as defineCustomElement$4, e as defineCustomElement$5, f as defineCustomElement$6, g as defineCustomElement$7, h as defineCustomElement$8, i as defineCustomElement$9, j as defineCustomElement$a, k as defineCustomElement$b, l as defineCustomElement$c, m as defineCustomElement$d, n as defineCustomElement$e, o as defineCustomElement$f, p as defineCustomElement$g, q as defineCustomElement$h, r as defineCustomElement$i, s as defineCustomElement$j, t as defineCustomElement$k, u as defineCustomElement$l, v as defineCustomElement$m, w as defineCustomElement$n, x as defineCustomElement$o, y as defineCustomElement$p, z as defineCustomElement$q, A as defineCustomElement$r, B as defineCustomElement$s, C as defineCustomElement$t } from './p-416c7cc3.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Props of the kup-accordion component.
|