@sme.up/ketchup 11.0.0-SNAPSHOT-20250108163941 → 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/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-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 +2 -2
- 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/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/p-c5130e83.entry.js +9 -0
- package/package.json +1 -1
- package/dist/ketchup/p-41830b0d.entry.js +0 -9
|
@@ -4106,24 +4106,26 @@ var KupAutocompleteProps;
|
|
|
4106
4106
|
})(KupAutocompleteProps || (KupAutocompleteProps = {}));
|
|
4107
4107
|
|
|
4108
4108
|
function getIdOfItemByDisplayMode(item, mode, separator) {
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
if (mode == ItemsDisplayMode.DESCRIPTION) {
|
|
4113
|
-
return item.value;
|
|
4109
|
+
const { id, value } = item;
|
|
4110
|
+
if (!id && value) {
|
|
4111
|
+
return value;
|
|
4114
4112
|
}
|
|
4115
|
-
if (
|
|
4116
|
-
|
|
4117
|
-
if (item.id || item.value) {
|
|
4118
|
-
return item.id + separator + item.value;
|
|
4119
|
-
}
|
|
4113
|
+
if (id && !value) {
|
|
4114
|
+
return id;
|
|
4120
4115
|
}
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
return
|
|
4124
|
-
|
|
4116
|
+
switch (mode) {
|
|
4117
|
+
case ItemsDisplayMode.CODE:
|
|
4118
|
+
return id;
|
|
4119
|
+
case ItemsDisplayMode.DESCRIPTION:
|
|
4120
|
+
return value;
|
|
4121
|
+
case ItemsDisplayMode.CODE_AND_DESC:
|
|
4122
|
+
case ItemsDisplayMode.CODE_AND_DESC_ALIAS:
|
|
4123
|
+
return id && value ? id + separator + value : id || value;
|
|
4124
|
+
case ItemsDisplayMode.DESC_AND_CODE:
|
|
4125
|
+
return value && id ? value + separator + id : value || id;
|
|
4126
|
+
default:
|
|
4127
|
+
return id;
|
|
4125
4128
|
}
|
|
4126
|
-
return item.id;
|
|
4127
4129
|
}
|
|
4128
4130
|
function consistencyCheck(idIn, listData, listEl, selectMode, displayMode, e) {
|
|
4129
4131
|
const validList = !!(listEl && listData && listData['data']);
|
|
@@ -19066,7 +19068,7 @@ var __classPrivateFieldSet$4 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
19066
19068
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
19067
19069
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
19068
19070
|
};
|
|
19069
|
-
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;
|
|
19071
|
+
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;
|
|
19070
19072
|
const KupList = /*@__PURE__*/ proxyCustomElement(class KupList extends H {
|
|
19071
19073
|
constructor() {
|
|
19072
19074
|
super();
|
|
@@ -19086,8 +19088,10 @@ const KupList = /*@__PURE__*/ proxyCustomElement(class KupList extends H {
|
|
|
19086
19088
|
_KupList_globalFilterTimeout.set(this, void 0);
|
|
19087
19089
|
_KupList_radios.set(this, []);
|
|
19088
19090
|
_KupList_listItems.set(this, []);
|
|
19091
|
+
_KupList_previouslySelectedItemIndex.set(this, void 0);
|
|
19092
|
+
_KupList_previouslySelectedItemReached.set(this, void 0);
|
|
19089
19093
|
_KupList_listenKeydown.set(this, (e) => {
|
|
19090
|
-
if (this.keyboardNavigation) {
|
|
19094
|
+
if (this.keyboardNavigation && __classPrivateFieldGet$5(this, _KupList_listItems, "f")) {
|
|
19091
19095
|
switch (e.key) {
|
|
19092
19096
|
case 'ArrowDown':
|
|
19093
19097
|
e.preventDefault();
|
|
@@ -19163,7 +19167,15 @@ const KupList = /*@__PURE__*/ proxyCustomElement(class KupList extends H {
|
|
|
19163
19167
|
if (this.focused > __classPrivateFieldGet$5(this, _KupList_listItems, "f").length - 1) {
|
|
19164
19168
|
this.focused = 0;
|
|
19165
19169
|
}
|
|
19166
|
-
__classPrivateFieldGet$5(this,
|
|
19170
|
+
if (!__classPrivateFieldGet$5(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
19171
|
+
__classPrivateFieldGet$5(this, _KupList_listItems, "f")[__classPrivateFieldGet$5(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
19172
|
+
__classPrivateFieldSet$4(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
19173
|
+
this.focused = __classPrivateFieldGet$5(this, _KupList_previouslySelectedItemIndex, "f");
|
|
19174
|
+
__classPrivateFieldGet$5(this, _KupList_listItems, "f")[__classPrivateFieldGet$5(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
19175
|
+
}
|
|
19176
|
+
else if (__classPrivateFieldGet$5(this, _KupList_listItems, "f")[this.focused]) {
|
|
19177
|
+
__classPrivateFieldGet$5(this, _KupList_listItems, "f")[this.focused].focus();
|
|
19178
|
+
}
|
|
19167
19179
|
}
|
|
19168
19180
|
}
|
|
19169
19181
|
/**
|
|
@@ -19188,7 +19200,15 @@ const KupList = /*@__PURE__*/ proxyCustomElement(class KupList extends H {
|
|
|
19188
19200
|
if (this.focused < 0) {
|
|
19189
19201
|
this.focused = __classPrivateFieldGet$5(this, _KupList_listItems, "f").length - 1;
|
|
19190
19202
|
}
|
|
19191
|
-
__classPrivateFieldGet$5(this,
|
|
19203
|
+
if (!__classPrivateFieldGet$5(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
19204
|
+
__classPrivateFieldGet$5(this, _KupList_listItems, "f")[__classPrivateFieldGet$5(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
19205
|
+
__classPrivateFieldSet$4(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
19206
|
+
this.focused = __classPrivateFieldGet$5(this, _KupList_previouslySelectedItemIndex, "f");
|
|
19207
|
+
__classPrivateFieldGet$5(this, _KupList_listItems, "f")[__classPrivateFieldGet$5(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
19208
|
+
}
|
|
19209
|
+
else if (__classPrivateFieldGet$5(this, _KupList_listItems, "f")[this.focused]) {
|
|
19210
|
+
__classPrivateFieldGet$5(this, _KupList_listItems, "f")[this.focused].focus();
|
|
19211
|
+
}
|
|
19192
19212
|
}
|
|
19193
19213
|
}
|
|
19194
19214
|
/**
|
|
@@ -19304,7 +19324,7 @@ const KupList = /*@__PURE__*/ proxyCustomElement(class KupList extends H {
|
|
|
19304
19324
|
}
|
|
19305
19325
|
__classPrivateFieldSet$4(this, _KupList_radios, [], "f");
|
|
19306
19326
|
let index = 0;
|
|
19307
|
-
return (h$1(Host, { key: '
|
|
19327
|
+
return (h$1(Host, { key: 'f1606c18dcfa35ad02c3c7941d0065eff6c384f7' }, h$1("style", { key: '7e1103041cd402bd2f8d3adef4bbdf2ffb9a1eb7' }, __classPrivateFieldGet$5(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), h$1("div", { key: '0bcaa0498b13c789f3c8d8e62f28c646a6de65be', id: "kup-component", class: wrapperClass, onKeyDown: __classPrivateFieldGet$5(this, _KupList_listenKeydown, "f") }, this.showFilter ? (h$1("div", { class: filterClass }, __classPrivateFieldGet$5(this, _KupList_instances, "m", _KupList_createFilterComponent).call(this))) : null, h$1("div", { key: '062bca5c883a1f5627760985a7e687c9bbb48ed3', class: listScrollClass }, h$1("ul", { key: '889d0076b199ae805fa9b3dae51c70734efbe0f4', class: componentClass, role: roleAttr, "aria-multiselectable": ariaMultiSelectable }, this.data
|
|
19308
19328
|
.filter((item) => __classPrivateFieldGet$5(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
19309
19329
|
.map((item) => __classPrivateFieldGet$5(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index++)))))));
|
|
19310
19330
|
}
|
|
@@ -19337,7 +19357,7 @@ const KupList = /*@__PURE__*/ proxyCustomElement(class KupList extends H {
|
|
|
19337
19357
|
"select": [64],
|
|
19338
19358
|
"setProps": [64]
|
|
19339
19359
|
}]);
|
|
19340
|
-
_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) {
|
|
19360
|
+
_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) {
|
|
19341
19361
|
if (index !== null && index !== undefined && !isNaN(index)) {
|
|
19342
19362
|
const listItems = this.rootElement.shadowRoot.querySelectorAll('.list-item');
|
|
19343
19363
|
const id = listItems[index].dataset.id;
|
|
@@ -19360,6 +19380,8 @@ _KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(
|
|
|
19360
19380
|
const item = this.data[index];
|
|
19361
19381
|
item.selected = this.selected.includes(item.id);
|
|
19362
19382
|
}
|
|
19383
|
+
__classPrivateFieldSet$4(this, _KupList_previouslySelectedItemReached, false, "f");
|
|
19384
|
+
__classPrivateFieldSet$4(this, _KupList_previouslySelectedItemIndex, this.focused, "f");
|
|
19363
19385
|
this.kupClick.emit({
|
|
19364
19386
|
comp: this,
|
|
19365
19387
|
id: this.rootElement.id,
|
|
@@ -26868,6 +26890,7 @@ const KupCombobox = /*@__PURE__*/ proxyCustomElement(class KupCombobox extends H
|
|
|
26868
26890
|
inputValue: __classPrivateFieldGet$2(this, _KupCombobox_textfieldEl, "f").value,
|
|
26869
26891
|
node: ret.node,
|
|
26870
26892
|
});
|
|
26893
|
+
__classPrivateFieldGet$2(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
26871
26894
|
}
|
|
26872
26895
|
onKupClick() {
|
|
26873
26896
|
this.onKupIconClick();
|
|
@@ -27084,7 +27107,7 @@ const KupCombobox = /*@__PURE__*/ proxyCustomElement(class KupCombobox extends H
|
|
|
27084
27107
|
};
|
|
27085
27108
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
27086
27109
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
27087
|
-
return (h$1(Host, { key: '
|
|
27110
|
+
return (h$1(Host, { key: '80c4c6a95530fc9886496318a1671f13d49815d9', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$2(this, _KupCombobox_elStyle, "f") }, h$1("style", { key: 'e393281cd26940e3c00fa26e5df5ccd82a560471' }, __classPrivateFieldGet$2(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), h$1("div", { key: '73e48d76e96587a78c09dc4e5064f1fcc2b2be11', id: componentWrapperId, style: __classPrivateFieldGet$2(this, _KupCombobox_elStyle, "f") }, h$1(FTextField, Object.assign({ key: 'b691de937b991985d7045009e371885fc9c6f7f9' }, props, this.data['kup-text-field'], { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, trailingIcon: true, icon: this.showDropDownIcon
|
|
27088
27111
|
? KupThemeIconValues.DROPDOWN
|
|
27089
27112
|
: 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$2(this, _KupCombobox_instances, "m", _KupCombobox_prepList).call(this)));
|
|
27090
27113
|
}
|
|
@@ -27171,21 +27194,15 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
27171
27194
|
__classPrivateFieldGet$2(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$2(this, _KupCombobox_clickCb, "f"));
|
|
27172
27195
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
27173
27196
|
return __classPrivateFieldGet$2(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
27174
|
-
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode,
|
|
27175
|
-
|
|
27176
|
-
|
|
27177
|
-
if (setValue) {
|
|
27178
|
-
this.value = ret.value;
|
|
27179
|
-
this.displayedValue = ret.displayedValue;
|
|
27180
|
-
}
|
|
27181
|
-
if (__classPrivateFieldGet$2(this, _KupCombobox_listEl, "f") != null) {
|
|
27182
|
-
__classPrivateFieldGet$2(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
27183
|
-
}
|
|
27197
|
+
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
27198
|
+
if (idIn && idInDecode) {
|
|
27199
|
+
this.displayedValue = getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
27184
27200
|
}
|
|
27185
27201
|
else {
|
|
27186
|
-
this.
|
|
27187
|
-
if (
|
|
27188
|
-
this.
|
|
27202
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$2(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
27203
|
+
if (ret.exists && eventShouldSetValue) {
|
|
27204
|
+
this.value = ret.value;
|
|
27205
|
+
this.displayedValue = ret.displayedValue;
|
|
27189
27206
|
}
|
|
27190
27207
|
else {
|
|
27191
27208
|
this.displayedValue = idIn;
|
|
@@ -27193,8 +27210,8 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
27193
27210
|
if (__classPrivateFieldGet$2(this, _KupCombobox_listEl, "f") != null) {
|
|
27194
27211
|
__classPrivateFieldGet$2(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
27195
27212
|
}
|
|
27213
|
+
return ret;
|
|
27196
27214
|
}
|
|
27197
|
-
return ret;
|
|
27198
27215
|
}, _KupCombobox_prepList = function _KupCombobox_prepList() {
|
|
27199
27216
|
var _a, _b;
|
|
27200
27217
|
return (h$1("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$1(this, _KupCombobox_listEl, el, "f")) })));
|
|
@@ -30885,6 +30902,7 @@ const KupAutocomplete = /*@__PURE__*/ proxyCustomElement(class KupAutocomplete e
|
|
|
30885
30902
|
node: ret.node,
|
|
30886
30903
|
});
|
|
30887
30904
|
}
|
|
30905
|
+
__classPrivateFieldGet(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
30888
30906
|
}
|
|
30889
30907
|
onKupClick() {
|
|
30890
30908
|
this.kupClick.emit({
|
|
@@ -31105,7 +31123,7 @@ const KupAutocomplete = /*@__PURE__*/ proxyCustomElement(class KupAutocomplete e
|
|
|
31105
31123
|
};
|
|
31106
31124
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
31107
31125
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
31108
|
-
return (h$1(Host, { key: '
|
|
31126
|
+
return (h$1(Host, { key: '9b562dbefd3dcd6546313faa526d3f6df441de58', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet(this, _KupAutocomplete_elStyle, "f") }, h$1("style", { key: '2399f62d076091ec5b534ab9323a8a7a555e13f5' }, __classPrivateFieldGet(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), h$1("div", { key: 'c48befc1b4be5ac9563e980076015d71342ce713', id: componentWrapperId, style: __classPrivateFieldGet(this, _KupAutocomplete_elStyle, "f") }, h$1(FTextField, Object.assign({ key: '520b3098ecee40da9c4e9b3b3781d3453d0c907c' }, props, { icon: this.showDropDownIcon
|
|
31109
31127
|
? KupThemeIconValues.SEARCH
|
|
31110
31128
|
: 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: () => {
|
|
31111
31129
|
window.clearTimeout(__classPrivateFieldGet(this, _KupAutocomplete_inputTimeout, "f"));
|
|
@@ -31193,24 +31211,21 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
31193
31211
|
__classPrivateFieldGet(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet(this, _KupAutocomplete_clickCb, "f"));
|
|
31194
31212
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
31195
31213
|
return __classPrivateFieldGet(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
31196
|
-
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode,
|
|
31214
|
+
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
31197
31215
|
if (!__classPrivateFieldGet(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
31198
31216
|
return;
|
|
31199
31217
|
}
|
|
31200
|
-
|
|
31201
|
-
|
|
31202
|
-
|
|
31203
|
-
if (setValue) {
|
|
31204
|
-
this.value = ret.value;
|
|
31205
|
-
this.displayedValue = ret.displayedValue;
|
|
31206
|
-
}
|
|
31207
|
-
if (__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
31208
|
-
__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
31209
|
-
}
|
|
31218
|
+
if (idIn && idInDecode) {
|
|
31219
|
+
this.displayedValue = this.displayedValue =
|
|
31220
|
+
getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
31210
31221
|
}
|
|
31211
31222
|
else {
|
|
31212
|
-
|
|
31213
|
-
|
|
31223
|
+
__classPrivateFieldSet(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
31224
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
31225
|
+
if ((ret.exists || this.allowInconsistentValues) &&
|
|
31226
|
+
eventShouldSetValue) {
|
|
31227
|
+
this.value = ret.value;
|
|
31228
|
+
this.displayedValue = ret.displayedValue;
|
|
31214
31229
|
}
|
|
31215
31230
|
else {
|
|
31216
31231
|
this.displayedValue = idIn;
|
|
@@ -31218,8 +31233,8 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
31218
31233
|
if (__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
31219
31234
|
__classPrivateFieldGet(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
31220
31235
|
}
|
|
31236
|
+
return ret;
|
|
31221
31237
|
}
|
|
31222
|
-
return ret;
|
|
31223
31238
|
}, _KupAutocomplete_prepList = function _KupAutocomplete_prepList() {
|
|
31224
31239
|
return (h$1("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")) })));
|
|
31225
31240
|
};
|
|
@@ -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, g as getProps, s as setProps } from './p-c8389c1a.js';
|
|
3
|
-
import { c as componentWrapperId, d as defineCustomElement$1, a as defineCustomElement$2, b as defineCustomElement$3, e as defineCustomElement$4, f as defineCustomElement$5, g as defineCustomElement$6, h as defineCustomElement$7, i as defineCustomElement$8, j as defineCustomElement$9, k as defineCustomElement$a, l as defineCustomElement$b, m as defineCustomElement$c, n as defineCustomElement$d, o as defineCustomElement$e, p as defineCustomElement$f, q as defineCustomElement$g, r as defineCustomElement$h, s as defineCustomElement$i, t as defineCustomElement$j, u as defineCustomElement$k, v as defineCustomElement$l, w as defineCustomElement$m, x as defineCustomElement$n, y as defineCustomElement$o, z as defineCustomElement$p, A as defineCustomElement$q, B as defineCustomElement$r, C as defineCustomElement$s } from './p-
|
|
3
|
+
import { c as componentWrapperId, d as defineCustomElement$1, a as defineCustomElement$2, b as defineCustomElement$3, e as defineCustomElement$4, f as defineCustomElement$5, g as defineCustomElement$6, h as defineCustomElement$7, i as defineCustomElement$8, j as defineCustomElement$9, k as defineCustomElement$a, l as defineCustomElement$b, m as defineCustomElement$c, n as defineCustomElement$d, o as defineCustomElement$e, p as defineCustomElement$f, q as defineCustomElement$g, r as defineCustomElement$h, s as defineCustomElement$i, t as defineCustomElement$j, u as defineCustomElement$k, v as defineCustomElement$l, w as defineCustomElement$m, x as defineCustomElement$n, y as defineCustomElement$o, z as defineCustomElement$p, A as defineCustomElement$q, B as defineCustomElement$r, C as defineCustomElement$s } from './p-416c7cc3.js';
|
|
4
4
|
import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './p-5882e117.js';
|
|
5
5
|
|
|
6
6
|
var toastuiEditor = {exports: {}};
|
|
@@ -37,24 +37,26 @@ var KupAutocompleteProps;
|
|
|
37
37
|
})(KupAutocompleteProps || (KupAutocompleteProps = {}));
|
|
38
38
|
|
|
39
39
|
function getIdOfItemByDisplayMode(item, mode, separator) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (mode == ItemsDisplayMode.DESCRIPTION) {
|
|
44
|
-
return item.value;
|
|
40
|
+
const { id, value } = item;
|
|
41
|
+
if (!id && value) {
|
|
42
|
+
return value;
|
|
45
43
|
}
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
if (id && !value) {
|
|
45
|
+
return id;
|
|
46
|
+
}
|
|
47
|
+
switch (mode) {
|
|
48
|
+
case ItemsDisplayMode.CODE:
|
|
49
|
+
return id;
|
|
50
|
+
case ItemsDisplayMode.DESCRIPTION:
|
|
51
|
+
return value;
|
|
52
|
+
case ItemsDisplayMode.CODE_AND_DESC:
|
|
53
|
+
case ItemsDisplayMode.CODE_AND_DESC_ALIAS:
|
|
54
|
+
return id && value ? id + separator + value : id || value;
|
|
55
|
+
case ItemsDisplayMode.DESC_AND_CODE:
|
|
56
|
+
return value && id ? value + separator + id : value || id;
|
|
57
|
+
default:
|
|
58
|
+
return id;
|
|
51
59
|
}
|
|
52
|
-
if (mode == ItemsDisplayMode.DESC_AND_CODE) {
|
|
53
|
-
if (item.id || item.value) {
|
|
54
|
-
return item.value + separator + item.id;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return item.id;
|
|
58
60
|
}
|
|
59
61
|
function consistencyCheck(idIn, listData, listEl, selectMode, displayMode, e) {
|
|
60
62
|
const validList = !!(listEl && listData && listData['data']);
|
|
@@ -256,6 +258,7 @@ const KupAutocomplete = class {
|
|
|
256
258
|
node: ret.node,
|
|
257
259
|
});
|
|
258
260
|
}
|
|
261
|
+
__classPrivateFieldGet$9(this, _KupAutocomplete_instances, "m", _KupAutocomplete_closeList).call(this);
|
|
259
262
|
}
|
|
260
263
|
onKupClick() {
|
|
261
264
|
this.kupClick.emit({
|
|
@@ -476,7 +479,7 @@ const KupAutocomplete = class {
|
|
|
476
479
|
};
|
|
477
480
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
478
481
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
479
|
-
return (h(Host, { key: '
|
|
482
|
+
return (h(Host, { key: '9b562dbefd3dcd6546313faa526d3f6df441de58', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$9(this, _KupAutocomplete_elStyle, "f") }, h("style", { key: '2399f62d076091ec5b534ab9323a8a7a555e13f5' }, __classPrivateFieldGet$9(this, _KupAutocomplete_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: 'c48befc1b4be5ac9563e980076015d71342ce713', id: componentWrapperId, style: __classPrivateFieldGet$9(this, _KupAutocomplete_elStyle, "f") }, h(FTextField, Object.assign({ key: '520b3098ecee40da9c4e9b3b3781d3453d0c907c' }, props, { icon: this.showDropDownIcon
|
|
480
483
|
? KupThemeIconValues.SEARCH
|
|
481
484
|
: 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: () => {
|
|
482
485
|
window.clearTimeout(__classPrivateFieldGet$9(this, _KupAutocomplete_inputTimeout, "f"));
|
|
@@ -531,24 +534,21 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
531
534
|
__classPrivateFieldGet$9(this, _KupAutocomplete_kupManager, "f").removeClickCallback(__classPrivateFieldGet$9(this, _KupAutocomplete_clickCb, "f"));
|
|
532
535
|
}, _KupAutocomplete_isListOpened = function _KupAutocomplete_isListOpened() {
|
|
533
536
|
return __classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f").menuVisible == true;
|
|
534
|
-
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode,
|
|
537
|
+
}, _KupAutocomplete_consistencyCheck = function _KupAutocomplete_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
535
538
|
if (!__classPrivateFieldGet$9(this, _KupAutocomplete_doConsistencyCheck, "f")) {
|
|
536
539
|
return;
|
|
537
540
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
if (setValue) {
|
|
542
|
-
this.value = ret.value;
|
|
543
|
-
this.displayedValue = ret.displayedValue;
|
|
544
|
-
}
|
|
545
|
-
if (__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
546
|
-
__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
547
|
-
}
|
|
541
|
+
if (idIn && idInDecode) {
|
|
542
|
+
this.displayedValue = this.displayedValue =
|
|
543
|
+
getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
548
544
|
}
|
|
549
545
|
else {
|
|
550
|
-
|
|
551
|
-
|
|
546
|
+
__classPrivateFieldSet$5(this, _KupAutocomplete_doConsistencyCheck, false, "f");
|
|
547
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f"), this.selectMode, this.displayMode);
|
|
548
|
+
if ((ret.exists || this.allowInconsistentValues) &&
|
|
549
|
+
eventShouldSetValue) {
|
|
550
|
+
this.value = ret.value;
|
|
551
|
+
this.displayedValue = ret.displayedValue;
|
|
552
552
|
}
|
|
553
553
|
else {
|
|
554
554
|
this.displayedValue = idIn;
|
|
@@ -556,8 +556,8 @@ _KupAutocomplete_doConsistencyCheck = new WeakMap(), _KupAutocomplete_elStyle =
|
|
|
556
556
|
if (__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f") != null && !this.serverHandledFilter) {
|
|
557
557
|
__classPrivateFieldGet$9(this, _KupAutocomplete_listEl, "f").filter = ret.value;
|
|
558
558
|
}
|
|
559
|
+
return ret;
|
|
559
560
|
}
|
|
560
|
-
return ret;
|
|
561
561
|
}, _KupAutocomplete_prepList = function _KupAutocomplete_prepList() {
|
|
562
562
|
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$5(this, _KupAutocomplete_listEl, el, "f")) })));
|
|
563
563
|
};
|
|
@@ -7496,6 +7496,7 @@ const KupCombobox = class {
|
|
|
7496
7496
|
inputValue: __classPrivateFieldGet$7(this, _KupCombobox_textfieldEl, "f").value,
|
|
7497
7497
|
node: ret.node,
|
|
7498
7498
|
});
|
|
7499
|
+
__classPrivateFieldGet$7(this, _KupCombobox_instances, "m", _KupCombobox_closeList).call(this);
|
|
7499
7500
|
}
|
|
7500
7501
|
onKupClick() {
|
|
7501
7502
|
this.onKupIconClick();
|
|
@@ -7712,7 +7713,7 @@ const KupCombobox = class {
|
|
|
7712
7713
|
};
|
|
7713
7714
|
const fullHeight = this.rootElement.classList.contains('kup-full-height');
|
|
7714
7715
|
const fullWidth = this.rootElement.classList.contains('kup-full-width');
|
|
7715
|
-
return (h(Host, { key: '
|
|
7716
|
+
return (h(Host, { key: '80c4c6a95530fc9886496318a1671f13d49815d9', class: `${fullHeight ? 'kup-full-height' : ''} ${fullWidth ? 'kup-full-width' : ''}`, style: __classPrivateFieldGet$7(this, _KupCombobox_elStyle, "f") }, h("style", { key: 'e393281cd26940e3c00fa26e5df5ccd82a560471' }, __classPrivateFieldGet$7(this, _KupCombobox_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '73e48d76e96587a78c09dc4e5064f1fcc2b2be11', id: componentWrapperId, style: __classPrivateFieldGet$7(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
|
|
7716
7717
|
? KupThemeIconValues.DROPDOWN
|
|
7717
7718
|
: 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)));
|
|
7718
7719
|
}
|
|
@@ -7767,21 +7768,15 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7767
7768
|
__classPrivateFieldGet$7(this, _KupCombobox_kupManager, "f").removeClickCallback(__classPrivateFieldGet$7(this, _KupCombobox_clickCb, "f"));
|
|
7768
7769
|
}, _KupCombobox_isListOpened = function _KupCombobox_isListOpened() {
|
|
7769
7770
|
return __classPrivateFieldGet$7(this, _KupCombobox_listEl, "f").menuVisible == true;
|
|
7770
|
-
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode,
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
if (setValue) {
|
|
7774
|
-
this.value = ret.value;
|
|
7775
|
-
this.displayedValue = ret.displayedValue;
|
|
7776
|
-
}
|
|
7777
|
-
if (__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f") != null) {
|
|
7778
|
-
__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7779
|
-
}
|
|
7771
|
+
}, _KupCombobox_consistencyCheck = function _KupCombobox_consistencyCheck(idIn, idInDecode, eventShouldSetValue) {
|
|
7772
|
+
if (idIn && idInDecode) {
|
|
7773
|
+
this.displayedValue = getIdOfItemByDisplayMode({ id: idIn, value: idInDecode }, this.displayMode, ' - ');
|
|
7780
7774
|
}
|
|
7781
7775
|
else {
|
|
7782
|
-
this.
|
|
7783
|
-
if (
|
|
7784
|
-
this.
|
|
7776
|
+
const ret = consistencyCheck(idIn, this.data['kup-list'], __classPrivateFieldGet$7(this, _KupCombobox_listEl, "f"), this.selectMode, this.displayMode);
|
|
7777
|
+
if (ret.exists && eventShouldSetValue) {
|
|
7778
|
+
this.value = ret.value;
|
|
7779
|
+
this.displayedValue = ret.displayedValue;
|
|
7785
7780
|
}
|
|
7786
7781
|
else {
|
|
7787
7782
|
this.displayedValue = idIn;
|
|
@@ -7789,8 +7784,8 @@ _KupCombobox_kupManager = new WeakMap(), _KupCombobox_elStyle = new WeakMap(), _
|
|
|
7789
7784
|
if (__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f") != null) {
|
|
7790
7785
|
__classPrivateFieldGet$7(this, _KupCombobox_listEl, "f").filter = ret.value;
|
|
7791
7786
|
}
|
|
7787
|
+
return ret;
|
|
7792
7788
|
}
|
|
7793
|
-
return ret;
|
|
7794
7789
|
}, _KupCombobox_prepList = function _KupCombobox_prepList() {
|
|
7795
7790
|
var _a, _b;
|
|
7796
7791
|
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$4(this, _KupCombobox_listEl, el, "f")) })));
|
|
@@ -15458,7 +15453,7 @@ var __classPrivateFieldSet$1 = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
15458
15453
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15459
15454
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15460
15455
|
};
|
|
15461
|
-
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;
|
|
15456
|
+
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;
|
|
15462
15457
|
const KupList = class {
|
|
15463
15458
|
constructor(hostRef) {
|
|
15464
15459
|
registerInstance(this, hostRef);
|
|
@@ -15476,8 +15471,10 @@ const KupList = class {
|
|
|
15476
15471
|
_KupList_globalFilterTimeout.set(this, void 0);
|
|
15477
15472
|
_KupList_radios.set(this, []);
|
|
15478
15473
|
_KupList_listItems.set(this, []);
|
|
15474
|
+
_KupList_previouslySelectedItemIndex.set(this, void 0);
|
|
15475
|
+
_KupList_previouslySelectedItemReached.set(this, void 0);
|
|
15479
15476
|
_KupList_listenKeydown.set(this, (e) => {
|
|
15480
|
-
if (this.keyboardNavigation) {
|
|
15477
|
+
if (this.keyboardNavigation && __classPrivateFieldGet$4(this, _KupList_listItems, "f")) {
|
|
15481
15478
|
switch (e.key) {
|
|
15482
15479
|
case 'ArrowDown':
|
|
15483
15480
|
e.preventDefault();
|
|
@@ -15553,7 +15550,15 @@ const KupList = class {
|
|
|
15553
15550
|
if (this.focused > __classPrivateFieldGet$4(this, _KupList_listItems, "f").length - 1) {
|
|
15554
15551
|
this.focused = 0;
|
|
15555
15552
|
}
|
|
15556
|
-
__classPrivateFieldGet$4(this,
|
|
15553
|
+
if (!__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
15554
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
15555
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
15556
|
+
this.focused = __classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f");
|
|
15557
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
15558
|
+
}
|
|
15559
|
+
else if (__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused]) {
|
|
15560
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused].focus();
|
|
15561
|
+
}
|
|
15557
15562
|
}
|
|
15558
15563
|
}
|
|
15559
15564
|
/**
|
|
@@ -15578,7 +15583,15 @@ const KupList = class {
|
|
|
15578
15583
|
if (this.focused < 0) {
|
|
15579
15584
|
this.focused = __classPrivateFieldGet$4(this, _KupList_listItems, "f").length - 1;
|
|
15580
15585
|
}
|
|
15581
|
-
__classPrivateFieldGet$4(this,
|
|
15586
|
+
if (!__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemReached, "f") &&
|
|
15587
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")]) {
|
|
15588
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemReached, true, "f");
|
|
15589
|
+
this.focused = __classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f");
|
|
15590
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[__classPrivateFieldGet$4(this, _KupList_previouslySelectedItemIndex, "f")].focus();
|
|
15591
|
+
}
|
|
15592
|
+
else if (__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused]) {
|
|
15593
|
+
__classPrivateFieldGet$4(this, _KupList_listItems, "f")[this.focused].focus();
|
|
15594
|
+
}
|
|
15582
15595
|
}
|
|
15583
15596
|
}
|
|
15584
15597
|
/**
|
|
@@ -15694,7 +15707,7 @@ const KupList = class {
|
|
|
15694
15707
|
}
|
|
15695
15708
|
__classPrivateFieldSet$1(this, _KupList_radios, [], "f");
|
|
15696
15709
|
let index = 0;
|
|
15697
|
-
return (h(Host, { key: '
|
|
15710
|
+
return (h(Host, { key: 'f1606c18dcfa35ad02c3c7941d0065eff6c384f7' }, h("style", { key: '7e1103041cd402bd2f8d3adef4bbdf2ffb9a1eb7' }, __classPrivateFieldGet$4(this, _KupList_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { key: '0bcaa0498b13c789f3c8d8e62f28c646a6de65be', id: "kup-component", class: wrapperClass, onKeyDown: __classPrivateFieldGet$4(this, _KupList_listenKeydown, "f") }, this.showFilter ? (h("div", { class: filterClass }, __classPrivateFieldGet$4(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
|
|
15698
15711
|
.filter((item) => __classPrivateFieldGet$4(this, _KupList_instances, "m", _KupList_itemCompliant).call(this, item))
|
|
15699
15712
|
.map((item) => __classPrivateFieldGet$4(this, _KupList_instances, "m", _KupList_renderListItem).call(this, item, index++)))))));
|
|
15700
15713
|
}
|
|
@@ -15703,7 +15716,7 @@ const KupList = class {
|
|
|
15703
15716
|
}
|
|
15704
15717
|
get rootElement() { return getElement$1(this); }
|
|
15705
15718
|
};
|
|
15706
|
-
_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) {
|
|
15719
|
+
_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) {
|
|
15707
15720
|
if (index !== null && index !== undefined && !isNaN(index)) {
|
|
15708
15721
|
const listItems = this.rootElement.shadowRoot.querySelectorAll('.list-item');
|
|
15709
15722
|
const id = listItems[index].dataset.id;
|
|
@@ -15726,6 +15739,8 @@ _KupList_kupManager = new WeakMap(), _KupList_globalFilterTimeout = new WeakMap(
|
|
|
15726
15739
|
const item = this.data[index];
|
|
15727
15740
|
item.selected = this.selected.includes(item.id);
|
|
15728
15741
|
}
|
|
15742
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemReached, false, "f");
|
|
15743
|
+
__classPrivateFieldSet$1(this, _KupList_previouslySelectedItemIndex, this.focused, "f");
|
|
15729
15744
|
this.kupClick.emit({
|
|
15730
15745
|
comp: this,
|
|
15731
15746
|
id: this.rootElement.id,
|