q2-tecton-elements 1.69.0 → 1.69.1
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/bundle-report.json +7 -7
- package/dist/cjs/q2-pagination.cjs.entry.js +9 -5
- package/dist/cjs/q2-search.cjs.entry.js +9 -5
- package/dist/collection/components/q2-pagination/q2-pagination.js +9 -5
- package/dist/collection/components/q2-search/q2-search.js +10 -6
- package/dist/components/q2-pagination.js +28 -27
- package/dist/components/q2-search.js +34 -32
- package/dist/esm/q2-pagination.entry.js +9 -5
- package/dist/esm/q2-search.entry.js +10 -6
- package/dist/q2-tecton-elements/q2-pagination.entry.js +24 -23
- package/dist/q2-tecton-elements/q2-search.entry.js +17 -15
- package/package.json +3 -3
package/dist/bundle-report.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-
|
|
2
|
+
"timestamp": "2026-07-14T17:34:27",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
5
|
"version": "24.10.0"
|
|
@@ -928,7 +928,7 @@
|
|
|
928
928
|
"index-Bx4m6N0g.js",
|
|
929
929
|
"mirror-emit-DUjY_ucm.js"
|
|
930
930
|
],
|
|
931
|
-
"originalByteSize":
|
|
931
|
+
"originalByteSize": 20535
|
|
932
932
|
},
|
|
933
933
|
{
|
|
934
934
|
"key": "q2-pill.entry",
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
"index-Cqkz7Bnm.js",
|
|
999
999
|
"index-Bx4m6N0g.js"
|
|
1000
1000
|
],
|
|
1001
|
-
"originalByteSize":
|
|
1001
|
+
"originalByteSize": 41039
|
|
1002
1002
|
},
|
|
1003
1003
|
{
|
|
1004
1004
|
"key": "q2-section.entry",
|
|
@@ -1774,7 +1774,7 @@
|
|
|
1774
1774
|
"index-Bx4m6N0g.js",
|
|
1775
1775
|
"mirror-emit-DUjY_ucm.js"
|
|
1776
1776
|
],
|
|
1777
|
-
"originalByteSize":
|
|
1777
|
+
"originalByteSize": 20535
|
|
1778
1778
|
},
|
|
1779
1779
|
{
|
|
1780
1780
|
"key": "q2-pill.entry",
|
|
@@ -1844,7 +1844,7 @@
|
|
|
1844
1844
|
"index-Cqkz7Bnm.js",
|
|
1845
1845
|
"index-Bx4m6N0g.js"
|
|
1846
1846
|
],
|
|
1847
|
-
"originalByteSize":
|
|
1847
|
+
"originalByteSize": 41039
|
|
1848
1848
|
},
|
|
1849
1849
|
{
|
|
1850
1850
|
"key": "q2-section.entry",
|
|
@@ -2622,7 +2622,7 @@
|
|
|
2622
2622
|
"index-D2LFCsNP.js",
|
|
2623
2623
|
"mirror-emit-kjeNv83f.js"
|
|
2624
2624
|
],
|
|
2625
|
-
"originalByteSize":
|
|
2625
|
+
"originalByteSize": 20738
|
|
2626
2626
|
},
|
|
2627
2627
|
{
|
|
2628
2628
|
"key": "q2-pill.entry",
|
|
@@ -2692,7 +2692,7 @@
|
|
|
2692
2692
|
"index-DUaTw_1N.js",
|
|
2693
2693
|
"index-D2LFCsNP.js"
|
|
2694
2694
|
],
|
|
2695
|
-
"originalByteSize":
|
|
2695
|
+
"originalByteSize": 41308
|
|
2696
2696
|
},
|
|
2697
2697
|
{
|
|
2698
2698
|
"key": "q2-section.entry",
|
|
@@ -20,10 +20,14 @@ const Q2Pagination = class {
|
|
|
20
20
|
const isOverflowing = this.containerWidth > hostElement.clientWidth;
|
|
21
21
|
this.isSmall = isOverflowing;
|
|
22
22
|
index$1.nextPaint(() => {
|
|
23
|
-
const
|
|
23
|
+
const currentContainerWidth = containerElement.clientWidth;
|
|
24
|
+
const measuredContainerWidth = this.isSmall
|
|
25
|
+
? Math.max(this.containerWidth || 0, currentContainerWidth)
|
|
26
|
+
: currentContainerWidth;
|
|
27
|
+
const containerWidthHasNotChanged = this.containerWidth === measuredContainerWidth;
|
|
24
28
|
if (containerWidthHasNotChanged)
|
|
25
29
|
return;
|
|
26
|
-
this.containerWidth =
|
|
30
|
+
this.containerWidth = measuredContainerWidth;
|
|
27
31
|
this.checkSize();
|
|
28
32
|
});
|
|
29
33
|
};
|
|
@@ -311,7 +315,7 @@ const Q2Pagination = class {
|
|
|
311
315
|
total,
|
|
312
316
|
});
|
|
313
317
|
}
|
|
314
|
-
return (index.h("nav", { key: '
|
|
318
|
+
return (index.h("nav", { key: 'c42b191eccb70b9e3c684843cebf9f6b06f3c3b3', class: this.containerClasses.join(' '), ref: el => (this.containerElement = el), "aria-label": index$1.loc('tecton.element.pagination.title') }, index.h("div", { key: 'eb03cdc19938adac4a5c44887fa7d9853c9b89ab', class: "description", "test-id": "description" }, pagesOnly
|
|
315
319
|
? index$1.loc('tecton.element.pagination.pages', {
|
|
316
320
|
current: page,
|
|
317
321
|
total: totalPages,
|
|
@@ -320,10 +324,10 @@ const Q2Pagination = class {
|
|
|
320
324
|
range: currentRange,
|
|
321
325
|
recordType: recordType.toLowerCase(),
|
|
322
326
|
total: total.toLocaleString(),
|
|
323
|
-
})), index.h("div", { key: '
|
|
327
|
+
})), index.h("div", { key: '0e9a0bcfa6545b08843423378066989cf96ad18e', class: "controls" }, index.h("div", { key: '4ea3b0a64165885dfd1bd525527e2617e4f4d748', class: "btn-group" }, index.h("q2-btn", { key: '72d72c7b974ecbca50c4259cca5028515786af5b', ref: el => (this.firstPageBtn = el), label: index$1.loc('tecton.element.pagination.goToFirstPage'), disabled: disabled || onFirstPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, index.h("q2-icon", { key: '26f5f8e8cf23a6d924b4a01796827fb62017809d', type: "chevron-double-left" })), index.h("q2-btn", { key: '5f7845c5917137131cc6703bb59d90c842e32a7e', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: disabled || onFirstPage, onTctClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, index.h("q2-icon", { key: 'e02ccf51de21789099e2b254019f962dbb5011dc', type: "chevron-left" }))), index.h("div", { key: 'ca201f7a4382e7f3835093c4c3877f7e2a0b5150', class: "input-display", hidden: isFullViewHidden }, index.h("span", { key: 'c690830341a15c25e4ad5a2d2a524d876c9f7cdb', "aria-hidden": "true" }, index$1.loc('tecton.element.pagination.page')), index.h("div", { key: '7d08062d6cd495d4025a82413b347ed87915cbce', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, index.h("q2-input", { key: 'e30795721d66d75dd5f349ad4d6d3ffda6023820', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${index$1.loc('tecton.element.pagination.page')} (${index$1.loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => event.stopImmediatePropagation(), onTctChange: event => {
|
|
324
328
|
event.stopPropagation();
|
|
325
329
|
this.handlePageChange(event.detail.value);
|
|
326
|
-
}, "test-id": "pageInput", current: "page", disabled: disabled })), index.h("span", { key: '
|
|
330
|
+
}, "test-id": "pageInput", current: "page", disabled: disabled })), index.h("span", { key: 'e2f1e51306298ddf428fd4e9fa665b58b2535fc8', "aria-hidden": "true" }, index$1.loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), index.h("div", { key: 'c7a095aaa30743441c0c4d22f55e94801b3a823f', class: "btn-group" }, index.h("q2-btn", { key: 'c52d8837ec35b128a9d3f9c87766ed770edc9600', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: disabled || onLastPage, onTctClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, index.h("q2-icon", { key: 'd1d802bddb426070fa1ca92a7937b8405949f01c', type: "chevron-right" })), index.h("q2-btn", { key: '357f5bf5426e6c0004b737238a3c66697fc6a672', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: disabled || onLastPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, index.h("q2-icon", { key: '1be92d6fa9252168baf63420271c8b8a77f41d92', type: "chevron-double-right" })))), index.h("div", { key: '96ca4bc582b1dcb830bad146fbf1233f2549f256', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
|
|
327
331
|
}
|
|
328
332
|
get hostElement() { return index.getElement(this); }
|
|
329
333
|
static get watchers() { return {
|
|
@@ -249,13 +249,17 @@ const Q2Search = class {
|
|
|
249
249
|
// #endregion
|
|
250
250
|
// #region Listeners
|
|
251
251
|
onFocus(event) {
|
|
252
|
-
var _a, _b, _c;
|
|
252
|
+
var _a, _b, _c, _d;
|
|
253
|
+
// Delegate programmatic focus from the host to the inner input
|
|
254
|
+
if (event && index$1.isEventFromElement(event, this.hostElement)) {
|
|
255
|
+
(_a = this.innerInputField) === null || _a === void 0 ? void 0 : _a.focus();
|
|
256
|
+
}
|
|
253
257
|
// Ignore focus that originates inside the popover (e.g., tabbing into a slotted
|
|
254
258
|
// popover-bottom action button). Without this gate, the focus event bubbles up and
|
|
255
259
|
// re-opens a just-closed popover as the user is trying to leave it.
|
|
256
260
|
const path = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : [];
|
|
257
|
-
const target = ((
|
|
258
|
-
if (target && ((
|
|
261
|
+
const target = ((_b = path[0]) !== null && _b !== void 0 ? _b : event === null || event === void 0 ? void 0 : event.target);
|
|
262
|
+
if (target && ((_c = this.popoverElement) === null || _c === void 0 ? void 0 : _c.contains(target)))
|
|
259
263
|
return;
|
|
260
264
|
this.inputFocused = true;
|
|
261
265
|
if (this.isShowingSelectionDisplay) {
|
|
@@ -269,7 +273,7 @@ const Q2Search = class {
|
|
|
269
273
|
else if (this.value) {
|
|
270
274
|
// Single-select: pre-select the displayed text so the next keystroke replaces it
|
|
271
275
|
// — typeahead pattern used by Material Autocomplete, Headless UI Combobox, etc.
|
|
272
|
-
(
|
|
276
|
+
(_d = this.innerInputField) === null || _d === void 0 ? void 0 : _d.select();
|
|
273
277
|
}
|
|
274
278
|
}
|
|
275
279
|
if (!this.open)
|
|
@@ -670,7 +674,7 @@ const Q2Search = class {
|
|
|
670
674
|
return (index.h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: (_a = this.innerInputContainer) !== null && _a !== void 0 ? _a : undefined, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, align: useBlock ? undefined : this.popoverAlignment, block: useBlock }, index.h("div", { class: "popover-content", "data-loading": this.loading ? 'true' : 'false', "aria-busy": this.loading ? 'true' : null }, index.h("div", { class: "popover-top-container", hidden: !this.hasPopoverTop && !(this.multiple && this.showSelectedToggle), tabindex: "-1" }, index.h("slot", { name: "popover-top" }), !this.loading && this.renderMultiSelectHeader()), index.h("q2-option-list", { ref: el => (this.optionList = el), type: "listbox", id: this.optionListId, label: index$1.loc(this.listLabel), multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, showSelected: this.showSelected, customSearch: true, hidden: this.loading, onChange: (e) => e.stopPropagation(), onTctChange: this.onOptionListChange }, index.h("slot", null)), showEmpty && this.renderEmpty(), index.h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, index.h("slot", { name: "popover-bottom" })), this.loading && (index.h("div", { class: "loading-overlay", "aria-hidden": "true" }, index.h("q2-loading", { type: "spinner" }))))));
|
|
671
675
|
}
|
|
672
676
|
render() {
|
|
673
|
-
return (index.h(index.Fragment, { key: '
|
|
677
|
+
return (index.h(index.Fragment, { key: '918ec8192e1dca668611c06f30f002413d87abca' }, index.h("div", { key: 'a6b81bd23e5d7224986175fc02b21e2fd1433f04', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), index.h("click-elsewhere", { key: '7f83f9b669917b5430aedca1595aee0837edd4da', class: this.wrapperClasses, role: "presentation", onChange: this.onClickElsewhere }, index.h("q2-input", { key: '7d8de986679460091123baa023a791dcdaecc58a', ref: el => (this.inputField = el), class: "q2-search-input", label: (this.label && index$1.loc(this.label)) || '', value: this.searchText, iconLeft: "search", clearable: this.clearable && !this.loading && !!this.searchText, disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder ? index$1.loc(this.placeholder) : undefined, hideLabel: this.hideLabel, errors: (Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map(e => index$1.loc(e))) ||
|
|
674
678
|
(this.invalid && ['tecton.element.search.invalid']) ||
|
|
675
679
|
[], ariaExpanded: this.isInputOnlyMode ? undefined : `${this.open}`, ariaControls: this.isInputOnlyMode ? undefined : this.optionListId, ariaHaspopup: this.isInputOnlyMode ? undefined : 'listbox', hideMessages: true, _role: this.isInputOnlyMode ? undefined : 'combobox', onTctInput: this.inputInputHandler, onInput: (e) => e.stopImmediatePropagation(), onChange: (e) => e.stopPropagation(), onTctChange: (e) => e.stopPropagation(), badgeValue: this.badgeValue }), this.renderOptionsDropdown())));
|
|
676
680
|
}
|
|
@@ -17,10 +17,14 @@ export class Q2Pagination {
|
|
|
17
17
|
const isOverflowing = this.containerWidth > hostElement.clientWidth;
|
|
18
18
|
this.isSmall = isOverflowing;
|
|
19
19
|
nextPaint(() => {
|
|
20
|
-
const
|
|
20
|
+
const currentContainerWidth = containerElement.clientWidth;
|
|
21
|
+
const measuredContainerWidth = this.isSmall
|
|
22
|
+
? Math.max(this.containerWidth || 0, currentContainerWidth)
|
|
23
|
+
: currentContainerWidth;
|
|
24
|
+
const containerWidthHasNotChanged = this.containerWidth === measuredContainerWidth;
|
|
21
25
|
if (containerWidthHasNotChanged)
|
|
22
26
|
return;
|
|
23
|
-
this.containerWidth =
|
|
27
|
+
this.containerWidth = measuredContainerWidth;
|
|
24
28
|
this.checkSize();
|
|
25
29
|
});
|
|
26
30
|
};
|
|
@@ -308,7 +312,7 @@ export class Q2Pagination {
|
|
|
308
312
|
total,
|
|
309
313
|
});
|
|
310
314
|
}
|
|
311
|
-
return (h("nav", { key: '
|
|
315
|
+
return (h("nav", { key: 'c42b191eccb70b9e3c684843cebf9f6b06f3c3b3', class: this.containerClasses.join(' '), ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: 'eb03cdc19938adac4a5c44887fa7d9853c9b89ab', class: "description", "test-id": "description" }, pagesOnly
|
|
312
316
|
? loc('tecton.element.pagination.pages', {
|
|
313
317
|
current: page,
|
|
314
318
|
total: totalPages,
|
|
@@ -317,10 +321,10 @@ export class Q2Pagination {
|
|
|
317
321
|
range: currentRange,
|
|
318
322
|
recordType: recordType.toLowerCase(),
|
|
319
323
|
total: total.toLocaleString(),
|
|
320
|
-
})), h("div", { key: '
|
|
324
|
+
})), h("div", { key: '0e9a0bcfa6545b08843423378066989cf96ad18e', class: "controls" }, h("div", { key: '4ea3b0a64165885dfd1bd525527e2617e4f4d748', class: "btn-group" }, h("q2-btn", { key: '72d72c7b974ecbca50c4259cca5028515786af5b', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: disabled || onFirstPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '26f5f8e8cf23a6d924b4a01796827fb62017809d', type: "chevron-double-left" })), h("q2-btn", { key: '5f7845c5917137131cc6703bb59d90c842e32a7e', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: disabled || onFirstPage, onTctClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'e02ccf51de21789099e2b254019f962dbb5011dc', type: "chevron-left" }))), h("div", { key: 'ca201f7a4382e7f3835093c4c3877f7e2a0b5150', class: "input-display", hidden: isFullViewHidden }, h("span", { key: 'c690830341a15c25e4ad5a2d2a524d876c9f7cdb', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '7d08062d6cd495d4025a82413b347ed87915cbce', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: 'e30795721d66d75dd5f349ad4d6d3ffda6023820', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => event.stopImmediatePropagation(), onTctChange: event => {
|
|
321
325
|
event.stopPropagation();
|
|
322
326
|
this.handlePageChange(event.detail.value);
|
|
323
|
-
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: '
|
|
327
|
+
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: 'e2f1e51306298ddf428fd4e9fa665b58b2535fc8', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: 'c7a095aaa30743441c0c4d22f55e94801b3a823f', class: "btn-group" }, h("q2-btn", { key: 'c52d8837ec35b128a9d3f9c87766ed770edc9600', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: disabled || onLastPage, onTctClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'd1d802bddb426070fa1ca92a7937b8405949f01c', type: "chevron-right" })), h("q2-btn", { key: '357f5bf5426e6c0004b737238a3c66697fc6a672', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: disabled || onLastPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: '1be92d6fa9252168baf63420271c8b8a77f41d92', type: "chevron-double-right" })))), h("div", { key: '96ca4bc582b1dcb830bad146fbf1233f2549f256', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
|
|
324
328
|
}
|
|
325
329
|
static get is() { return "q2-pagination"; }
|
|
326
330
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, h, } from "@stencil/core";
|
|
2
|
-
import { loc, overrideFocus, waitForNextPaint } from "../../utils";
|
|
2
|
+
import { isEventFromElement, loc, overrideFocus, waitForNextPaint } from "../../utils";
|
|
3
3
|
/**
|
|
4
4
|
* @name Search
|
|
5
5
|
* @category Forms
|
|
@@ -248,13 +248,17 @@ export class Q2Search {
|
|
|
248
248
|
// #endregion
|
|
249
249
|
// #region Listeners
|
|
250
250
|
onFocus(event) {
|
|
251
|
-
var _a, _b, _c;
|
|
251
|
+
var _a, _b, _c, _d;
|
|
252
|
+
// Delegate programmatic focus from the host to the inner input
|
|
253
|
+
if (event && isEventFromElement(event, this.hostElement)) {
|
|
254
|
+
(_a = this.innerInputField) === null || _a === void 0 ? void 0 : _a.focus();
|
|
255
|
+
}
|
|
252
256
|
// Ignore focus that originates inside the popover (e.g., tabbing into a slotted
|
|
253
257
|
// popover-bottom action button). Without this gate, the focus event bubbles up and
|
|
254
258
|
// re-opens a just-closed popover as the user is trying to leave it.
|
|
255
259
|
const path = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : [];
|
|
256
|
-
const target = ((
|
|
257
|
-
if (target && ((
|
|
260
|
+
const target = ((_b = path[0]) !== null && _b !== void 0 ? _b : event === null || event === void 0 ? void 0 : event.target);
|
|
261
|
+
if (target && ((_c = this.popoverElement) === null || _c === void 0 ? void 0 : _c.contains(target)))
|
|
258
262
|
return;
|
|
259
263
|
this.inputFocused = true;
|
|
260
264
|
if (this.isShowingSelectionDisplay) {
|
|
@@ -268,7 +272,7 @@ export class Q2Search {
|
|
|
268
272
|
else if (this.value) {
|
|
269
273
|
// Single-select: pre-select the displayed text so the next keystroke replaces it
|
|
270
274
|
// — typeahead pattern used by Material Autocomplete, Headless UI Combobox, etc.
|
|
271
|
-
(
|
|
275
|
+
(_d = this.innerInputField) === null || _d === void 0 ? void 0 : _d.select();
|
|
272
276
|
}
|
|
273
277
|
}
|
|
274
278
|
if (!this.open)
|
|
@@ -669,7 +673,7 @@ export class Q2Search {
|
|
|
669
673
|
return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: (_a = this.innerInputContainer) !== null && _a !== void 0 ? _a : undefined, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, align: useBlock ? undefined : this.popoverAlignment, block: useBlock }, h("div", { class: "popover-content", "data-loading": this.loading ? 'true' : 'false', "aria-busy": this.loading ? 'true' : null }, h("div", { class: "popover-top-container", hidden: !this.hasPopoverTop && !(this.multiple && this.showSelectedToggle), tabindex: "-1" }, h("slot", { name: "popover-top" }), !this.loading && this.renderMultiSelectHeader()), h("q2-option-list", { ref: el => (this.optionList = el), type: "listbox", id: this.optionListId, label: loc(this.listLabel), multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, showSelected: this.showSelected, customSearch: true, hidden: this.loading, onChange: (e) => e.stopPropagation(), onTctChange: this.onOptionListChange }, h("slot", null)), showEmpty && this.renderEmpty(), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" })), this.loading && (h("div", { class: "loading-overlay", "aria-hidden": "true" }, h("q2-loading", { type: "spinner" }))))));
|
|
670
674
|
}
|
|
671
675
|
render() {
|
|
672
|
-
return (h(Fragment, { key: '
|
|
676
|
+
return (h(Fragment, { key: '918ec8192e1dca668611c06f30f002413d87abca' }, h("div", { key: 'a6b81bd23e5d7224986175fc02b21e2fd1433f04', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("click-elsewhere", { key: '7f83f9b669917b5430aedca1595aee0837edd4da', class: this.wrapperClasses, role: "presentation", onChange: this.onClickElsewhere }, h("q2-input", { key: '7d8de986679460091123baa023a791dcdaecc58a', ref: el => (this.inputField = el), class: "q2-search-input", label: (this.label && loc(this.label)) || '', value: this.searchText, iconLeft: "search", clearable: this.clearable && !this.loading && !!this.searchText, disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder ? loc(this.placeholder) : undefined, hideLabel: this.hideLabel, errors: (Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map(e => loc(e))) ||
|
|
673
677
|
(this.invalid && ['tecton.element.search.invalid']) ||
|
|
674
678
|
[], ariaExpanded: this.isInputOnlyMode ? undefined : `${this.open}`, ariaControls: this.isInputOnlyMode ? undefined : this.optionListId, ariaHaspopup: this.isInputOnlyMode ? undefined : 'listbox', hideMessages: true, _role: this.isInputOnlyMode ? undefined : 'combobox', onTctInput: this.inputInputHandler, onInput: (e) => e.stopImmediatePropagation(), onChange: (e) => e.stopPropagation(), onTctChange: (e) => e.stopPropagation(), badgeValue: this.badgeValue }), this.renderOptionsDropdown())));
|
|
675
679
|
}
|
|
@@ -6,9 +6,9 @@ import { m as p } from "./mirror-emit.js";
|
|
|
6
6
|
|
|
7
7
|
import { d as h } from "./click-elsewhere2.js";
|
|
8
8
|
|
|
9
|
-
import { d } from "./q2-badge2.js";
|
|
9
|
+
import { d as g } from "./q2-badge2.js";
|
|
10
10
|
|
|
11
|
-
import { d
|
|
11
|
+
import { d } from "./q2-btn2.js";
|
|
12
12
|
|
|
13
13
|
import { d as u } from "./q2-icon2.js";
|
|
14
14
|
|
|
@@ -34,7 +34,8 @@ const x = t(class extends e {
|
|
|
34
34
|
this.disabled = !1, this.checkSize = () => {
|
|
35
35
|
const {hostElement: t, containerElement: e} = this, i = this.containerWidth > t.clientWidth;
|
|
36
36
|
this.isSmall = i, s((() => {
|
|
37
|
-
|
|
37
|
+
const t = e.clientWidth, i = this.isSmall ? Math.max(this.containerWidth || 0, t) : t;
|
|
38
|
+
this.containerWidth === i || (this.containerWidth = i, this.checkSize());
|
|
38
39
|
}));
|
|
39
40
|
}, this.handlePageChange = t => {
|
|
40
41
|
if (this.disabled) return;
|
|
@@ -226,7 +227,7 @@ const x = t(class extends e {
|
|
|
226
227
|
}
|
|
227
228
|
render() {
|
|
228
229
|
var t;
|
|
229
|
-
const {pagesOnly: e, recordsOnly: i, isFullViewHidden: n, recordTypeWithDefault: s, totalPages: o, totalWithDefault: r, pageWithDefault: c, currentRange: p, nextRange: h, prevRange:
|
|
230
|
+
const {pagesOnly: e, recordsOnly: i, isFullViewHidden: n, recordTypeWithDefault: s, totalPages: o, totalWithDefault: r, pageWithDefault: c, currentRange: p, nextRange: h, prevRange: g, showPerPageSelect: d, disabled: u} = this, f = c < 2, b = c === o;
|
|
230
231
|
let m = l("tecton.element.pagination.goToNext"), v = l("tecton.element.pagination.goToPrevious");
|
|
231
232
|
return e ? (v = l("tecton.element.pagination.goToPages", {
|
|
232
233
|
next: c - 1,
|
|
@@ -235,7 +236,7 @@ const x = t(class extends e {
|
|
|
235
236
|
next: c + 1,
|
|
236
237
|
total: o
|
|
237
238
|
})) : i && (v = l("tecton.element.pagination.goToRecords", {
|
|
238
|
-
range:
|
|
239
|
+
range: g,
|
|
239
240
|
recordType: s.toLowerCase(),
|
|
240
241
|
total: r
|
|
241
242
|
}), m = l("tecton.element.pagination.goToRecords", {
|
|
@@ -243,12 +244,12 @@ const x = t(class extends e {
|
|
|
243
244
|
recordType: s.toLowerCase(),
|
|
244
245
|
total: r
|
|
245
246
|
})), a("nav", {
|
|
246
|
-
key: "
|
|
247
|
+
key: "c42b191eccb70b9e3c684843cebf9f6b06f3c3b3",
|
|
247
248
|
class: this.containerClasses.join(" "),
|
|
248
249
|
ref: t => this.containerElement = t,
|
|
249
250
|
"aria-label": l("tecton.element.pagination.title")
|
|
250
251
|
}, a("div", {
|
|
251
|
-
key: "
|
|
252
|
+
key: "eb03cdc19938adac4a5c44887fa7d9853c9b89ab",
|
|
252
253
|
class: "description",
|
|
253
254
|
"test-id": "description"
|
|
254
255
|
}, e ? l("tecton.element.pagination.pages", {
|
|
@@ -259,13 +260,13 @@ const x = t(class extends e {
|
|
|
259
260
|
recordType: s.toLowerCase(),
|
|
260
261
|
total: r.toLocaleString()
|
|
261
262
|
})), a("div", {
|
|
262
|
-
key: "
|
|
263
|
+
key: "0e9a0bcfa6545b08843423378066989cf96ad18e",
|
|
263
264
|
class: "controls"
|
|
264
265
|
}, a("div", {
|
|
265
|
-
key: "
|
|
266
|
+
key: "4ea3b0a64165885dfd1bd525527e2617e4f4d748",
|
|
266
267
|
class: "btn-group"
|
|
267
268
|
}, a("q2-btn", {
|
|
268
|
-
key: "
|
|
269
|
+
key: "72d72c7b974ecbca50c4259cca5028515786af5b",
|
|
269
270
|
ref: t => this.firstPageBtn = t,
|
|
270
271
|
label: l("tecton.element.pagination.goToFirstPage"),
|
|
271
272
|
disabled: u || f,
|
|
@@ -274,10 +275,10 @@ const x = t(class extends e {
|
|
|
274
275
|
"test-id": "firstPageBtn",
|
|
275
276
|
"hide-label": !0
|
|
276
277
|
}, a("q2-icon", {
|
|
277
|
-
key: "
|
|
278
|
+
key: "26f5f8e8cf23a6d924b4a01796827fb62017809d",
|
|
278
279
|
type: "chevron-double-left"
|
|
279
280
|
})), a("q2-btn", {
|
|
280
|
-
key: "
|
|
281
|
+
key: "5f7845c5917137131cc6703bb59d90c842e32a7e",
|
|
281
282
|
ref: t => this.prevPageBtn = t,
|
|
282
283
|
label: v,
|
|
283
284
|
disabled: u || f,
|
|
@@ -285,21 +286,21 @@ const x = t(class extends e {
|
|
|
285
286
|
"test-id": "prevPageBtn",
|
|
286
287
|
"hide-label": !0
|
|
287
288
|
}, a("q2-icon", {
|
|
288
|
-
key: "
|
|
289
|
+
key: "e02ccf51de21789099e2b254019f962dbb5011dc",
|
|
289
290
|
type: "chevron-left"
|
|
290
291
|
}))), a("div", {
|
|
291
|
-
key: "
|
|
292
|
+
key: "ca201f7a4382e7f3835093c4c3877f7e2a0b5150",
|
|
292
293
|
class: "input-display",
|
|
293
294
|
hidden: n
|
|
294
295
|
}, a("span", {
|
|
295
|
-
key: "
|
|
296
|
+
key: "c690830341a15c25e4ad5a2d2a524d876c9f7cdb",
|
|
296
297
|
"aria-hidden": "true"
|
|
297
298
|
}, l("tecton.element.pagination.page")), a("div", {
|
|
298
|
-
key: "
|
|
299
|
+
key: "7d08062d6cd495d4025a82413b347ed87915cbce",
|
|
299
300
|
class: "input-wrapper",
|
|
300
301
|
onClick: () => this.inputField.dispatchEvent(new FocusEvent("focus"))
|
|
301
302
|
}, a("q2-input", {
|
|
302
|
-
key: "
|
|
303
|
+
key: "e30795721d66d75dd5f349ad4d6d3ffda6023820",
|
|
303
304
|
ref: t => this.inputField = t,
|
|
304
305
|
type: "number",
|
|
305
306
|
value: "" + c,
|
|
@@ -316,13 +317,13 @@ const x = t(class extends e {
|
|
|
316
317
|
current: "page",
|
|
317
318
|
disabled: u
|
|
318
319
|
})), a("span", {
|
|
319
|
-
key: "
|
|
320
|
+
key: "e2f1e51306298ddf428fd4e9fa665b58b2535fc8",
|
|
320
321
|
"aria-hidden": "true"
|
|
321
322
|
}, l("tecton.element.pagination.ofPages", [ o.toLocaleString() ]))), a("div", {
|
|
322
|
-
key: "
|
|
323
|
+
key: "c7a095aaa30743441c0c4d22f55e94801b3a823f",
|
|
323
324
|
class: "btn-group"
|
|
324
325
|
}, a("q2-btn", {
|
|
325
|
-
key: "
|
|
326
|
+
key: "c52d8837ec35b128a9d3f9c87766ed770edc9600",
|
|
326
327
|
ref: t => this.nextPageBtn = t,
|
|
327
328
|
label: m,
|
|
328
329
|
disabled: u || b,
|
|
@@ -330,10 +331,10 @@ const x = t(class extends e {
|
|
|
330
331
|
"test-id": "nextPageBtn",
|
|
331
332
|
"hide-label": !0
|
|
332
333
|
}, a("q2-icon", {
|
|
333
|
-
key: "
|
|
334
|
+
key: "d1d802bddb426070fa1ca92a7937b8405949f01c",
|
|
334
335
|
type: "chevron-right"
|
|
335
336
|
})), a("q2-btn", {
|
|
336
|
-
key: "
|
|
337
|
+
key: "357f5bf5426e6c0004b737238a3c66697fc6a672",
|
|
337
338
|
ref: t => this.lastPageBtn = t,
|
|
338
339
|
label: "tecton.element.pagination.goToLastPage",
|
|
339
340
|
disabled: u || b,
|
|
@@ -342,13 +343,13 @@ const x = t(class extends e {
|
|
|
342
343
|
"test-id": "lastPageBtn",
|
|
343
344
|
"hide-label": !0
|
|
344
345
|
}, a("q2-icon", {
|
|
345
|
-
key: "
|
|
346
|
+
key: "1be92d6fa9252168baf63420271c8b8a77f41d92",
|
|
346
347
|
type: "chevron-double-right"
|
|
347
348
|
})))), a("div", {
|
|
348
|
-
key: "
|
|
349
|
+
key: "96ca4bc582b1dcb830bad146fbf1233f2549f256",
|
|
349
350
|
class: "per-page",
|
|
350
351
|
hidden: n || !(null === (t = this.perPageIncrements) || void 0 === t ? void 0 : t.length)
|
|
351
|
-
},
|
|
352
|
+
}, d && this.renderPerPage()));
|
|
352
353
|
}
|
|
353
354
|
get hostElement() {
|
|
354
355
|
return this;
|
|
@@ -427,11 +428,11 @@ const q = x, defineCustomElement = function() {
|
|
|
427
428
|
break;
|
|
428
429
|
|
|
429
430
|
case "q2-badge":
|
|
430
|
-
customElements.get(n(t)) ||
|
|
431
|
+
customElements.get(n(t)) || g();
|
|
431
432
|
break;
|
|
432
433
|
|
|
433
434
|
case "q2-btn":
|
|
434
|
-
customElements.get(n(t)) ||
|
|
435
|
+
customElements.get(n(t)) || d();
|
|
435
436
|
break;
|
|
436
437
|
|
|
437
438
|
case "q2-icon":
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { proxyCustomElement as t, HTMLElement as e, createEvent as i, h as s, Fragment as o, transformTag as n } from "@stencil/core/internal/client";
|
|
2
2
|
|
|
3
|
-
import { l as r, o as l,
|
|
3
|
+
import { l as r, o as l, i as a, w as h } from "./index2.js";
|
|
4
4
|
|
|
5
|
-
import { d as
|
|
5
|
+
import { d as c } from "./click-elsewhere2.js";
|
|
6
6
|
|
|
7
|
-
import { d
|
|
7
|
+
import { d } from "./q2-badge2.js";
|
|
8
8
|
|
|
9
|
-
import { d } from "./q2-btn2.js";
|
|
9
|
+
import { d as p } from "./q2-btn2.js";
|
|
10
10
|
|
|
11
|
-
import { d as
|
|
11
|
+
import { d as u } from "./q2-icon2.js";
|
|
12
12
|
|
|
13
|
-
import { d as
|
|
13
|
+
import { d as v } from "./q2-input2.js";
|
|
14
14
|
|
|
15
|
-
import { d as
|
|
15
|
+
import { d as m } from "./q2-loading2.js";
|
|
16
16
|
|
|
17
|
-
import { d as
|
|
17
|
+
import { d as b } from "./q2-option-list2.js";
|
|
18
18
|
|
|
19
|
-
import { d as
|
|
19
|
+
import { d as g } from "./q2-popover2.js";
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const f = t(class extends e {
|
|
22
22
|
constructor(t) {
|
|
23
23
|
super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.tctChange = i(this, "tctChange", 7),
|
|
24
24
|
this.tctClose = i(this, "tctClose", 7), this.tctInput = i(this, "tctInput", 7),
|
|
@@ -192,12 +192,14 @@ const g = t(class extends e {
|
|
|
192
192
|
// #endregion
|
|
193
193
|
// #region Listeners
|
|
194
194
|
onFocus(t) {
|
|
195
|
-
var e, i, s;
|
|
195
|
+
var e, i, s, o;
|
|
196
|
+
// Delegate programmatic focus from the host to the inner input
|
|
197
|
+
t && a(t, this.hostElement) && (null === (e = this.innerInputField) || void 0 === e || e.focus());
|
|
196
198
|
// Ignore focus that originates inside the popover (e.g., tabbing into a slotted
|
|
197
199
|
// popover-bottom action button). Without this gate, the focus event bubbles up and
|
|
198
200
|
// re-opens a just-closed popover as the user is trying to leave it.
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
+
const n = null !== (i = ("function" == typeof (null == t ? void 0 : t.composedPath) ? t.composedPath() : [])[0]) && void 0 !== i ? i : null == t ? void 0 : t.target;
|
|
202
|
+
n && (null === (s = this.popoverElement) || void 0 === s ? void 0 : s.contains(n)) || (this.inputFocused = !0,
|
|
201
203
|
this.isShowingSelectionDisplay && (
|
|
202
204
|
// Clear the flag before mutating searchText so the filter watcher runs against the
|
|
203
205
|
// new query, not the stale "showing a selection" guard.
|
|
@@ -206,7 +208,7 @@ const g = t(class extends e {
|
|
|
206
208
|
this.searchText = "" : this.value && (
|
|
207
209
|
// Single-select: pre-select the displayed text so the next keystroke replaces it
|
|
208
210
|
// — typeahead pattern used by Material Autocomplete, Headless UI Combobox, etc.
|
|
209
|
-
null === (
|
|
211
|
+
null === (o = this.innerInputField) || void 0 === o || o.select())), this.open || this.openDropdown());
|
|
210
212
|
}
|
|
211
213
|
onFocusOut(t) {
|
|
212
214
|
var e;
|
|
@@ -242,13 +244,13 @@ const g = t(class extends e {
|
|
|
242
244
|
* @testOnly
|
|
243
245
|
*/
|
|
244
246
|
async closePopover() {
|
|
245
|
-
this.closeDropdown(), await
|
|
247
|
+
this.closeDropdown(), await h();
|
|
246
248
|
}
|
|
247
249
|
/**
|
|
248
250
|
* Opens the popover.
|
|
249
251
|
* @testOnly
|
|
250
252
|
*/ async openPopover() {
|
|
251
|
-
this.openDropdown(), await
|
|
253
|
+
this.openDropdown(), await h();
|
|
252
254
|
}
|
|
253
255
|
/**
|
|
254
256
|
* Resets the search to its initial state: clears the input, the
|
|
@@ -283,7 +285,7 @@ const g = t(class extends e {
|
|
|
283
285
|
this.open || await this.openPopover(), i.forEach((t => {
|
|
284
286
|
var e;
|
|
285
287
|
null === (e = this.optionElements.find((e => e.value === t))) || void 0 === e || e.click();
|
|
286
|
-
})), e.closePopover && (await this.closePopover(), await
|
|
288
|
+
})), e.closePopover && (await this.closePopover(), await h());
|
|
287
289
|
}
|
|
288
290
|
// #endregion
|
|
289
291
|
// #region Watchers
|
|
@@ -556,20 +558,20 @@ const g = t(class extends e {
|
|
|
556
558
|
}
|
|
557
559
|
render() {
|
|
558
560
|
return s(o, {
|
|
559
|
-
key: "
|
|
561
|
+
key: "918ec8192e1dca668611c06f30f002413d87abca"
|
|
560
562
|
}, s("div", {
|
|
561
|
-
key: "
|
|
563
|
+
key: "a6b81bd23e5d7224986175fc02b21e2fd1433f04",
|
|
562
564
|
"aria-live": "polite",
|
|
563
565
|
"aria-atomic": "true",
|
|
564
566
|
role: "status",
|
|
565
567
|
class: "sr"
|
|
566
568
|
}, this.statusMessage), s("click-elsewhere", {
|
|
567
|
-
key: "
|
|
569
|
+
key: "7f83f9b669917b5430aedca1595aee0837edd4da",
|
|
568
570
|
class: this.wrapperClasses,
|
|
569
571
|
role: "presentation",
|
|
570
572
|
onChange: this.onClickElsewhere
|
|
571
573
|
}, s("q2-input", {
|
|
572
|
-
key: "
|
|
574
|
+
key: "7d8de986679460091123baa023a791dcdaecc58a",
|
|
573
575
|
ref: t => this.inputField = t,
|
|
574
576
|
class: "q2-search-input",
|
|
575
577
|
label: this.label && r(this.label) || "",
|
|
@@ -682,46 +684,46 @@ const g = t(class extends e {
|
|
|
682
684
|
} ]
|
|
683
685
|
} ]);
|
|
684
686
|
|
|
685
|
-
const
|
|
687
|
+
const w = f, defineCustomElement = function() {
|
|
686
688
|
if ("undefined" == typeof customElements) return;
|
|
687
689
|
[ "q2-search", "click-elsewhere", "q2-badge", "q2-btn", "q2-icon", "q2-input", "q2-loading", "q2-option-list", "q2-popover" ].forEach((t => {
|
|
688
690
|
switch (t) {
|
|
689
691
|
case "q2-search":
|
|
690
|
-
customElements.get(n(t)) || customElements.define(n(t),
|
|
692
|
+
customElements.get(n(t)) || customElements.define(n(t), f);
|
|
691
693
|
break;
|
|
692
694
|
|
|
693
695
|
case "click-elsewhere":
|
|
694
|
-
customElements.get(n(t)) ||
|
|
696
|
+
customElements.get(n(t)) || c();
|
|
695
697
|
break;
|
|
696
698
|
|
|
697
699
|
case "q2-badge":
|
|
698
|
-
customElements.get(n(t)) ||
|
|
700
|
+
customElements.get(n(t)) || d();
|
|
699
701
|
break;
|
|
700
702
|
|
|
701
703
|
case "q2-btn":
|
|
702
|
-
customElements.get(n(t)) ||
|
|
704
|
+
customElements.get(n(t)) || p();
|
|
703
705
|
break;
|
|
704
706
|
|
|
705
707
|
case "q2-icon":
|
|
706
|
-
customElements.get(n(t)) ||
|
|
708
|
+
customElements.get(n(t)) || u();
|
|
707
709
|
break;
|
|
708
710
|
|
|
709
711
|
case "q2-input":
|
|
710
|
-
customElements.get(n(t)) ||
|
|
712
|
+
customElements.get(n(t)) || v();
|
|
711
713
|
break;
|
|
712
714
|
|
|
713
715
|
case "q2-loading":
|
|
714
|
-
customElements.get(n(t)) ||
|
|
716
|
+
customElements.get(n(t)) || m();
|
|
715
717
|
break;
|
|
716
718
|
|
|
717
719
|
case "q2-option-list":
|
|
718
|
-
customElements.get(n(t)) ||
|
|
720
|
+
customElements.get(n(t)) || b();
|
|
719
721
|
break;
|
|
720
722
|
|
|
721
723
|
case "q2-popover":
|
|
722
|
-
customElements.get(n(t)) ||
|
|
724
|
+
customElements.get(n(t)) || g();
|
|
723
725
|
}
|
|
724
726
|
}));
|
|
725
727
|
};
|
|
726
728
|
|
|
727
|
-
export {
|
|
729
|
+
export { w as Q2Search, defineCustomElement }
|
|
@@ -18,10 +18,14 @@ const Q2Pagination = class {
|
|
|
18
18
|
const isOverflowing = this.containerWidth > hostElement.clientWidth;
|
|
19
19
|
this.isSmall = isOverflowing;
|
|
20
20
|
nextPaint(() => {
|
|
21
|
-
const
|
|
21
|
+
const currentContainerWidth = containerElement.clientWidth;
|
|
22
|
+
const measuredContainerWidth = this.isSmall
|
|
23
|
+
? Math.max(this.containerWidth || 0, currentContainerWidth)
|
|
24
|
+
: currentContainerWidth;
|
|
25
|
+
const containerWidthHasNotChanged = this.containerWidth === measuredContainerWidth;
|
|
22
26
|
if (containerWidthHasNotChanged)
|
|
23
27
|
return;
|
|
24
|
-
this.containerWidth =
|
|
28
|
+
this.containerWidth = measuredContainerWidth;
|
|
25
29
|
this.checkSize();
|
|
26
30
|
});
|
|
27
31
|
};
|
|
@@ -309,7 +313,7 @@ const Q2Pagination = class {
|
|
|
309
313
|
total,
|
|
310
314
|
});
|
|
311
315
|
}
|
|
312
|
-
return (h("nav", { key: '
|
|
316
|
+
return (h("nav", { key: 'c42b191eccb70b9e3c684843cebf9f6b06f3c3b3', class: this.containerClasses.join(' '), ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: 'eb03cdc19938adac4a5c44887fa7d9853c9b89ab', class: "description", "test-id": "description" }, pagesOnly
|
|
313
317
|
? loc('tecton.element.pagination.pages', {
|
|
314
318
|
current: page,
|
|
315
319
|
total: totalPages,
|
|
@@ -318,10 +322,10 @@ const Q2Pagination = class {
|
|
|
318
322
|
range: currentRange,
|
|
319
323
|
recordType: recordType.toLowerCase(),
|
|
320
324
|
total: total.toLocaleString(),
|
|
321
|
-
})), h("div", { key: '
|
|
325
|
+
})), h("div", { key: '0e9a0bcfa6545b08843423378066989cf96ad18e', class: "controls" }, h("div", { key: '4ea3b0a64165885dfd1bd525527e2617e4f4d748', class: "btn-group" }, h("q2-btn", { key: '72d72c7b974ecbca50c4259cca5028515786af5b', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: disabled || onFirstPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '26f5f8e8cf23a6d924b4a01796827fb62017809d', type: "chevron-double-left" })), h("q2-btn", { key: '5f7845c5917137131cc6703bb59d90c842e32a7e', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: disabled || onFirstPage, onTctClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'e02ccf51de21789099e2b254019f962dbb5011dc', type: "chevron-left" }))), h("div", { key: 'ca201f7a4382e7f3835093c4c3877f7e2a0b5150', class: "input-display", hidden: isFullViewHidden }, h("span", { key: 'c690830341a15c25e4ad5a2d2a524d876c9f7cdb', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '7d08062d6cd495d4025a82413b347ed87915cbce', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: 'e30795721d66d75dd5f349ad4d6d3ffda6023820', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => event.stopImmediatePropagation(), onTctChange: event => {
|
|
322
326
|
event.stopPropagation();
|
|
323
327
|
this.handlePageChange(event.detail.value);
|
|
324
|
-
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: '
|
|
328
|
+
}, "test-id": "pageInput", current: "page", disabled: disabled })), h("span", { key: 'e2f1e51306298ddf428fd4e9fa665b58b2535fc8', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: 'c7a095aaa30743441c0c4d22f55e94801b3a823f', class: "btn-group" }, h("q2-btn", { key: 'c52d8837ec35b128a9d3f9c87766ed770edc9600', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: disabled || onLastPage, onTctClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'd1d802bddb426070fa1ca92a7937b8405949f01c', type: "chevron-right" })), h("q2-btn", { key: '357f5bf5426e6c0004b737238a3c66697fc6a672', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: disabled || onLastPage, hidden: isFullViewHidden, onTctClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: '1be92d6fa9252168baf63420271c8b8a77f41d92', type: "chevron-double-right" })))), h("div", { key: '96ca4bc582b1dcb830bad146fbf1233f2549f256', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
|
|
325
329
|
}
|
|
326
330
|
get hostElement() { return getElement(this); }
|
|
327
331
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-Cqkz7Bnm.js';
|
|
2
|
-
import { l as loc, o as overrideFocus, w as waitForNextPaint } from './index-Bx4m6N0g.js';
|
|
2
|
+
import { l as loc, o as overrideFocus, i as isEventFromElement, w as waitForNextPaint } from './index-Bx4m6N0g.js';
|
|
3
3
|
|
|
4
4
|
const q2SearchCss = () => `*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{display:block;margin:var(--tct-search-margin, var(--tct-search-margin-top, var(--app-scale-5x, 25px)) 0 var(--tct-search-margin-bottom, var(--app-scale-5x, 25px)))}.q2-search-container{display:block;position:relative}.q2-search-input{margin:0;--tct-input-min-height:var(--tct-search-input-min-height, initial);--tct-input-max-height:var(--tct-search-input-max-height, none);--tct-input-horizontal-gap:var(--tct-search-input-horizontal-gap, var(--app-scale-2x, 10px));--tct-input-icon-container-icon-min-width:var(--tct-search-icon-min-width, fit-content)}.popover-content{display:flex;flex-direction:column}.popover-content[data-loading=true]{min-height:var(--tct-search-loading-popover-height, var(--app-scale-12x, 60px));position:relative}.popover-content[data-loading=true] .loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.popover-content[data-loading=true] .loading-overlay q2-loading{--tct-loading-spinner-size:var(--tct-search-loading-spinner-size, var(--app-scale-8x, 40px));width:1em;height:1em}.popover-top-container[hidden],.popover-bottom-container[hidden]{display:none}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-search-multi-select-header-padding, var(--app-scale-2x, 10px));background:var(--tct-search-multi-select-header-background, var(--t-base, #ffffff));display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-search-multi-select-option-padding, 2px 5px);font-size:var(--tct-search-multi-select-option-font-size, inherit);border-radius:var(--tct-search-multi-select-option-border-radius, var(--app-border-radius-1, 4px));background:var(--tct-search-multi-select-option-background, transparent);color:var(--tct-search-multi-select-option-font-color, inherit)}.popover-top-container .multi-select-header label:hover{background:var(--tct-search-multi-select-option-hover-background, var(--t-gray-14, #f2f2f2));color:var(--tct-search-multi-select-option-hover-font-color, var(--t-gray-5, #404040))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-search-multi-select-option-active-background, var(--t-gray-4, #333333));color:var(--tct-search-multi-select-option-active-font-color, var(--t-base, #ffffff))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-search-multi-select-option-disabled-opacity, var(--app-disabled-opacity, 0.4));cursor:not-allowed}.popover-top-container .multi-select-header input:focus-visible+label{box-shadow:var(--const-double-focus-ring)}.no-results{padding:var(--tct-search-no-results-padding, var(--app-scale-3x, 15px));color:var(--tct-search-no-results-font-color, var(--t-textA, rgba(77, 77, 77, 0.77)));text-align:center}`;
|
|
5
5
|
|
|
@@ -247,13 +247,17 @@ const Q2Search = class {
|
|
|
247
247
|
// #endregion
|
|
248
248
|
// #region Listeners
|
|
249
249
|
onFocus(event) {
|
|
250
|
-
var _a, _b, _c;
|
|
250
|
+
var _a, _b, _c, _d;
|
|
251
|
+
// Delegate programmatic focus from the host to the inner input
|
|
252
|
+
if (event && isEventFromElement(event, this.hostElement)) {
|
|
253
|
+
(_a = this.innerInputField) === null || _a === void 0 ? void 0 : _a.focus();
|
|
254
|
+
}
|
|
251
255
|
// Ignore focus that originates inside the popover (e.g., tabbing into a slotted
|
|
252
256
|
// popover-bottom action button). Without this gate, the focus event bubbles up and
|
|
253
257
|
// re-opens a just-closed popover as the user is trying to leave it.
|
|
254
258
|
const path = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : [];
|
|
255
|
-
const target = ((
|
|
256
|
-
if (target && ((
|
|
259
|
+
const target = ((_b = path[0]) !== null && _b !== void 0 ? _b : event === null || event === void 0 ? void 0 : event.target);
|
|
260
|
+
if (target && ((_c = this.popoverElement) === null || _c === void 0 ? void 0 : _c.contains(target)))
|
|
257
261
|
return;
|
|
258
262
|
this.inputFocused = true;
|
|
259
263
|
if (this.isShowingSelectionDisplay) {
|
|
@@ -267,7 +271,7 @@ const Q2Search = class {
|
|
|
267
271
|
else if (this.value) {
|
|
268
272
|
// Single-select: pre-select the displayed text so the next keystroke replaces it
|
|
269
273
|
// — typeahead pattern used by Material Autocomplete, Headless UI Combobox, etc.
|
|
270
|
-
(
|
|
274
|
+
(_d = this.innerInputField) === null || _d === void 0 ? void 0 : _d.select();
|
|
271
275
|
}
|
|
272
276
|
}
|
|
273
277
|
if (!this.open)
|
|
@@ -668,7 +672,7 @@ const Q2Search = class {
|
|
|
668
672
|
return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: (_a = this.innerInputContainer) !== null && _a !== void 0 ? _a : undefined, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, align: useBlock ? undefined : this.popoverAlignment, block: useBlock }, h("div", { class: "popover-content", "data-loading": this.loading ? 'true' : 'false', "aria-busy": this.loading ? 'true' : null }, h("div", { class: "popover-top-container", hidden: !this.hasPopoverTop && !(this.multiple && this.showSelectedToggle), tabindex: "-1" }, h("slot", { name: "popover-top" }), !this.loading && this.renderMultiSelectHeader()), h("q2-option-list", { ref: el => (this.optionList = el), type: "listbox", id: this.optionListId, label: loc(this.listLabel), multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, showSelected: this.showSelected, customSearch: true, hidden: this.loading, onChange: (e) => e.stopPropagation(), onTctChange: this.onOptionListChange }, h("slot", null)), showEmpty && this.renderEmpty(), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" })), this.loading && (h("div", { class: "loading-overlay", "aria-hidden": "true" }, h("q2-loading", { type: "spinner" }))))));
|
|
669
673
|
}
|
|
670
674
|
render() {
|
|
671
|
-
return (h(Fragment, { key: '
|
|
675
|
+
return (h(Fragment, { key: '918ec8192e1dca668611c06f30f002413d87abca' }, h("div", { key: 'a6b81bd23e5d7224986175fc02b21e2fd1433f04', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("click-elsewhere", { key: '7f83f9b669917b5430aedca1595aee0837edd4da', class: this.wrapperClasses, role: "presentation", onChange: this.onClickElsewhere }, h("q2-input", { key: '7d8de986679460091123baa023a791dcdaecc58a', ref: el => (this.inputField = el), class: "q2-search-input", label: (this.label && loc(this.label)) || '', value: this.searchText, iconLeft: "search", clearable: this.clearable && !this.loading && !!this.searchText, disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder ? loc(this.placeholder) : undefined, hideLabel: this.hideLabel, errors: (Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map(e => loc(e))) ||
|
|
672
676
|
(this.invalid && ['tecton.element.search.invalid']) ||
|
|
673
677
|
[], ariaExpanded: this.isInputOnlyMode ? undefined : `${this.open}`, ariaControls: this.isInputOnlyMode ? undefined : this.optionListId, ariaHaspopup: this.isInputOnlyMode ? undefined : 'listbox', hideMessages: true, _role: this.isInputOnlyMode ? undefined : 'combobox', onTctInput: this.inputInputHandler, onInput: (e) => e.stopImmediatePropagation(), onChange: (e) => e.stopPropagation(), onTctChange: (e) => e.stopPropagation(), badgeValue: this.badgeValue }), this.renderOptionsDropdown())));
|
|
674
678
|
}
|
|
@@ -13,7 +13,8 @@ const l = class {
|
|
|
13
13
|
this.disabled = !1, this.checkSize = () => {
|
|
14
14
|
const {hostElement: t, containerElement: e} = this, i = this.containerWidth > t.clientWidth;
|
|
15
15
|
this.isSmall = i, a((() => {
|
|
16
|
-
|
|
16
|
+
const t = e.clientWidth, i = this.isSmall ? Math.max(this.containerWidth || 0, t) : t;
|
|
17
|
+
this.containerWidth === i || (this.containerWidth = i, this.checkSize());
|
|
17
18
|
}));
|
|
18
19
|
}, this.handlePageChange = t => {
|
|
19
20
|
if (this.disabled) return;
|
|
@@ -205,7 +206,7 @@ const l = class {
|
|
|
205
206
|
}
|
|
206
207
|
render() {
|
|
207
208
|
var t;
|
|
208
|
-
const {pagesOnly: e, recordsOnly: n, isFullViewHidden: a, recordTypeWithDefault: s, totalPages: o, totalWithDefault: r, pageWithDefault: h, currentRange: l, nextRange: p, prevRange:
|
|
209
|
+
const {pagesOnly: e, recordsOnly: n, isFullViewHidden: a, recordTypeWithDefault: s, totalPages: o, totalWithDefault: r, pageWithDefault: h, currentRange: l, nextRange: p, prevRange: g, showPerPageSelect: d, disabled: u} = this, f = h < 2, b = h === o;
|
|
209
210
|
let v = c("tecton.element.pagination.goToNext"), y = c("tecton.element.pagination.goToPrevious");
|
|
210
211
|
return e ? (y = c("tecton.element.pagination.goToPages", {
|
|
211
212
|
next: h - 1,
|
|
@@ -214,7 +215,7 @@ const l = class {
|
|
|
214
215
|
next: h + 1,
|
|
215
216
|
total: o
|
|
216
217
|
})) : n && (y = c("tecton.element.pagination.goToRecords", {
|
|
217
|
-
range:
|
|
218
|
+
range: g,
|
|
218
219
|
recordType: s.toLowerCase(),
|
|
219
220
|
total: r
|
|
220
221
|
}), v = c("tecton.element.pagination.goToRecords", {
|
|
@@ -222,12 +223,12 @@ const l = class {
|
|
|
222
223
|
recordType: s.toLowerCase(),
|
|
223
224
|
total: r
|
|
224
225
|
})), i("nav", {
|
|
225
|
-
key: "
|
|
226
|
+
key: "c42b191eccb70b9e3c684843cebf9f6b06f3c3b3",
|
|
226
227
|
class: this.containerClasses.join(" "),
|
|
227
228
|
ref: t => this.containerElement = t,
|
|
228
229
|
"aria-label": c("tecton.element.pagination.title")
|
|
229
230
|
}, i("div", {
|
|
230
|
-
key: "
|
|
231
|
+
key: "eb03cdc19938adac4a5c44887fa7d9853c9b89ab",
|
|
231
232
|
class: "description",
|
|
232
233
|
"test-id": "description"
|
|
233
234
|
}, e ? c("tecton.element.pagination.pages", {
|
|
@@ -238,13 +239,13 @@ const l = class {
|
|
|
238
239
|
recordType: s.toLowerCase(),
|
|
239
240
|
total: r.toLocaleString()
|
|
240
241
|
})), i("div", {
|
|
241
|
-
key: "
|
|
242
|
+
key: "0e9a0bcfa6545b08843423378066989cf96ad18e",
|
|
242
243
|
class: "controls"
|
|
243
244
|
}, i("div", {
|
|
244
|
-
key: "
|
|
245
|
+
key: "4ea3b0a64165885dfd1bd525527e2617e4f4d748",
|
|
245
246
|
class: "btn-group"
|
|
246
247
|
}, i("q2-btn", {
|
|
247
|
-
key: "
|
|
248
|
+
key: "72d72c7b974ecbca50c4259cca5028515786af5b",
|
|
248
249
|
ref: t => this.firstPageBtn = t,
|
|
249
250
|
label: c("tecton.element.pagination.goToFirstPage"),
|
|
250
251
|
disabled: u || f,
|
|
@@ -253,10 +254,10 @@ const l = class {
|
|
|
253
254
|
"test-id": "firstPageBtn",
|
|
254
255
|
"hide-label": !0
|
|
255
256
|
}, i("q2-icon", {
|
|
256
|
-
key: "
|
|
257
|
+
key: "26f5f8e8cf23a6d924b4a01796827fb62017809d",
|
|
257
258
|
type: "chevron-double-left"
|
|
258
259
|
})), i("q2-btn", {
|
|
259
|
-
key: "
|
|
260
|
+
key: "5f7845c5917137131cc6703bb59d90c842e32a7e",
|
|
260
261
|
ref: t => this.prevPageBtn = t,
|
|
261
262
|
label: y,
|
|
262
263
|
disabled: u || f,
|
|
@@ -264,21 +265,21 @@ const l = class {
|
|
|
264
265
|
"test-id": "prevPageBtn",
|
|
265
266
|
"hide-label": !0
|
|
266
267
|
}, i("q2-icon", {
|
|
267
|
-
key: "
|
|
268
|
+
key: "e02ccf51de21789099e2b254019f962dbb5011dc",
|
|
268
269
|
type: "chevron-left"
|
|
269
270
|
}))), i("div", {
|
|
270
|
-
key: "
|
|
271
|
+
key: "ca201f7a4382e7f3835093c4c3877f7e2a0b5150",
|
|
271
272
|
class: "input-display",
|
|
272
273
|
hidden: a
|
|
273
274
|
}, i("span", {
|
|
274
|
-
key: "
|
|
275
|
+
key: "c690830341a15c25e4ad5a2d2a524d876c9f7cdb",
|
|
275
276
|
"aria-hidden": "true"
|
|
276
277
|
}, c("tecton.element.pagination.page")), i("div", {
|
|
277
|
-
key: "
|
|
278
|
+
key: "7d08062d6cd495d4025a82413b347ed87915cbce",
|
|
278
279
|
class: "input-wrapper",
|
|
279
280
|
onClick: () => this.inputField.dispatchEvent(new FocusEvent("focus"))
|
|
280
281
|
}, i("q2-input", {
|
|
281
|
-
key: "
|
|
282
|
+
key: "e30795721d66d75dd5f349ad4d6d3ffda6023820",
|
|
282
283
|
ref: t => this.inputField = t,
|
|
283
284
|
type: "number",
|
|
284
285
|
value: `${h}`,
|
|
@@ -295,13 +296,13 @@ const l = class {
|
|
|
295
296
|
current: "page",
|
|
296
297
|
disabled: u
|
|
297
298
|
})), i("span", {
|
|
298
|
-
key: "
|
|
299
|
+
key: "e2f1e51306298ddf428fd4e9fa665b58b2535fc8",
|
|
299
300
|
"aria-hidden": "true"
|
|
300
301
|
}, c("tecton.element.pagination.ofPages", [ o.toLocaleString() ]))), i("div", {
|
|
301
|
-
key: "
|
|
302
|
+
key: "c7a095aaa30743441c0c4d22f55e94801b3a823f",
|
|
302
303
|
class: "btn-group"
|
|
303
304
|
}, i("q2-btn", {
|
|
304
|
-
key: "
|
|
305
|
+
key: "c52d8837ec35b128a9d3f9c87766ed770edc9600",
|
|
305
306
|
ref: t => this.nextPageBtn = t,
|
|
306
307
|
label: v,
|
|
307
308
|
disabled: u || b,
|
|
@@ -309,10 +310,10 @@ const l = class {
|
|
|
309
310
|
"test-id": "nextPageBtn",
|
|
310
311
|
"hide-label": !0
|
|
311
312
|
}, i("q2-icon", {
|
|
312
|
-
key: "
|
|
313
|
+
key: "d1d802bddb426070fa1ca92a7937b8405949f01c",
|
|
313
314
|
type: "chevron-right"
|
|
314
315
|
})), i("q2-btn", {
|
|
315
|
-
key: "
|
|
316
|
+
key: "357f5bf5426e6c0004b737238a3c66697fc6a672",
|
|
316
317
|
ref: t => this.lastPageBtn = t,
|
|
317
318
|
label: "tecton.element.pagination.goToLastPage",
|
|
318
319
|
disabled: u || b,
|
|
@@ -321,13 +322,13 @@ const l = class {
|
|
|
321
322
|
"test-id": "lastPageBtn",
|
|
322
323
|
"hide-label": !0
|
|
323
324
|
}, i("q2-icon", {
|
|
324
|
-
key: "
|
|
325
|
+
key: "1be92d6fa9252168baf63420271c8b8a77f41d92",
|
|
325
326
|
type: "chevron-double-right"
|
|
326
327
|
})))), i("div", {
|
|
327
|
-
key: "
|
|
328
|
+
key: "96ca4bc582b1dcb830bad146fbf1233f2549f256",
|
|
328
329
|
class: "per-page",
|
|
329
330
|
hidden: a || !(null === (t = this.perPageIncrements) || void 0 === t ? void 0 : t.length)
|
|
330
|
-
},
|
|
331
|
+
}, d && this.renderPerPage()));
|
|
331
332
|
}
|
|
332
333
|
get hostElement() {
|
|
333
334
|
return n(this);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as t, c as i, h as e, F as s, g as o } from "./index-Cqkz7Bnm.js";
|
|
2
2
|
|
|
3
|
-
import { l as n, o as r,
|
|
3
|
+
import { l as n, o as r, i as a, w as l } from "./index-Bx4m6N0g.js";
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const h = class {
|
|
6
6
|
constructor(e) {
|
|
7
7
|
t(this, e), this.tctChange = i(this, "tctChange", 7), this.tctClose = i(this, "tctClose", 7),
|
|
8
8
|
this.tctInput = i(this, "tctInput", 7), this.tctOpen = i(this, "tctOpen", 7),
|
|
@@ -175,12 +175,14 @@ const l = class {
|
|
|
175
175
|
// #endregion
|
|
176
176
|
// #region Listeners
|
|
177
177
|
onFocus(t) {
|
|
178
|
-
var i, e, s;
|
|
178
|
+
var i, e, s, o;
|
|
179
|
+
// Delegate programmatic focus from the host to the inner input
|
|
180
|
+
t && a(t, this.hostElement) && (null === (i = this.innerInputField) || void 0 === i || i.focus());
|
|
179
181
|
// Ignore focus that originates inside the popover (e.g., tabbing into a slotted
|
|
180
182
|
// popover-bottom action button). Without this gate, the focus event bubbles up and
|
|
181
183
|
// re-opens a just-closed popover as the user is trying to leave it.
|
|
182
|
-
const
|
|
183
|
-
|
|
184
|
+
const n = null !== (e = ("function" == typeof (null == t ? void 0 : t.composedPath) ? t.composedPath() : [])[0]) && void 0 !== e ? e : null == t ? void 0 : t.target;
|
|
185
|
+
n && (null === (s = this.popoverElement) || void 0 === s ? void 0 : s.contains(n)) || (this.inputFocused = !0,
|
|
184
186
|
this.isShowingSelectionDisplay && (
|
|
185
187
|
// Clear the flag before mutating searchText so the filter watcher runs against the
|
|
186
188
|
// new query, not the stale "showing a selection" guard.
|
|
@@ -189,7 +191,7 @@ const l = class {
|
|
|
189
191
|
this.searchText = "" : this.value && (
|
|
190
192
|
// Single-select: pre-select the displayed text so the next keystroke replaces it
|
|
191
193
|
// — typeahead pattern used by Material Autocomplete, Headless UI Combobox, etc.
|
|
192
|
-
null === (
|
|
194
|
+
null === (o = this.innerInputField) || void 0 === o || o.select())), this.open || this.openDropdown());
|
|
193
195
|
}
|
|
194
196
|
onFocusOut(t) {
|
|
195
197
|
var i;
|
|
@@ -225,13 +227,13 @@ const l = class {
|
|
|
225
227
|
* @testOnly
|
|
226
228
|
*/
|
|
227
229
|
async closePopover() {
|
|
228
|
-
this.closeDropdown(), await
|
|
230
|
+
this.closeDropdown(), await l();
|
|
229
231
|
}
|
|
230
232
|
/**
|
|
231
233
|
* Opens the popover.
|
|
232
234
|
* @testOnly
|
|
233
235
|
*/ async openPopover() {
|
|
234
|
-
this.openDropdown(), await
|
|
236
|
+
this.openDropdown(), await l();
|
|
235
237
|
}
|
|
236
238
|
/**
|
|
237
239
|
* Resets the search to its initial state: clears the input, the
|
|
@@ -266,7 +268,7 @@ const l = class {
|
|
|
266
268
|
this.open || await this.openPopover(), e.forEach((t => {
|
|
267
269
|
var i;
|
|
268
270
|
null === (i = this.optionElements.find((i => i.value === t))) || void 0 === i || i.click();
|
|
269
|
-
})), i.closePopover && (await this.closePopover(), await
|
|
271
|
+
})), i.closePopover && (await this.closePopover(), await l());
|
|
270
272
|
}
|
|
271
273
|
// #endregion
|
|
272
274
|
// #region Watchers
|
|
@@ -539,20 +541,20 @@ const l = class {
|
|
|
539
541
|
}
|
|
540
542
|
render() {
|
|
541
543
|
return e(s, {
|
|
542
|
-
key: "
|
|
544
|
+
key: "918ec8192e1dca668611c06f30f002413d87abca"
|
|
543
545
|
}, e("div", {
|
|
544
|
-
key: "
|
|
546
|
+
key: "a6b81bd23e5d7224986175fc02b21e2fd1433f04",
|
|
545
547
|
"aria-live": "polite",
|
|
546
548
|
"aria-atomic": "true",
|
|
547
549
|
role: "status",
|
|
548
550
|
class: "sr"
|
|
549
551
|
}, this.statusMessage), e("click-elsewhere", {
|
|
550
|
-
key: "
|
|
552
|
+
key: "7f83f9b669917b5430aedca1595aee0837edd4da",
|
|
551
553
|
class: this.wrapperClasses,
|
|
552
554
|
role: "presentation",
|
|
553
555
|
onChange: this.onClickElsewhere
|
|
554
556
|
}, e("q2-input", {
|
|
555
|
-
key: "
|
|
557
|
+
key: "7d8de986679460091123baa023a791dcdaecc58a",
|
|
556
558
|
ref: t => this.inputField = t,
|
|
557
559
|
class: "q2-search-input",
|
|
558
560
|
label: this.label && n(this.label) || "",
|
|
@@ -604,6 +606,6 @@ const l = class {
|
|
|
604
606
|
}
|
|
605
607
|
};
|
|
606
608
|
|
|
607
|
-
|
|
609
|
+
h.style = "*{box-sizing:border-box}*:active{outline:none}*:focus-visible{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{display:block;margin:var(--tct-search-margin, var(--tct-search-margin-top, var(--app-scale-5x, 25px)) 0 var(--tct-search-margin-bottom, var(--app-scale-5x, 25px)))}.q2-search-container{display:block;position:relative}.q2-search-input{margin:0;--tct-input-min-height:var(--tct-search-input-min-height, initial);--tct-input-max-height:var(--tct-search-input-max-height, none);--tct-input-horizontal-gap:var(--tct-search-input-horizontal-gap, var(--app-scale-2x, 10px));--tct-input-icon-container-icon-min-width:var(--tct-search-icon-min-width, fit-content)}.popover-content{display:flex;flex-direction:column}.popover-content[data-loading=true]{min-height:var(--tct-search-loading-popover-height, var(--app-scale-12x, 60px));position:relative}.popover-content[data-loading=true] .loading-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.popover-content[data-loading=true] .loading-overlay q2-loading{--tct-loading-spinner-size:var(--tct-search-loading-spinner-size, var(--app-scale-8x, 40px));width:1em;height:1em}.popover-top-container[hidden],.popover-bottom-container[hidden]{display:none}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-search-multi-select-header-padding, var(--app-scale-2x, 10px));background:var(--tct-search-multi-select-header-background, var(--t-base, #ffffff));display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-search-multi-select-option-padding, 2px 5px);font-size:var(--tct-search-multi-select-option-font-size, inherit);border-radius:var(--tct-search-multi-select-option-border-radius, var(--app-border-radius-1, 4px));background:var(--tct-search-multi-select-option-background, transparent);color:var(--tct-search-multi-select-option-font-color, inherit)}.popover-top-container .multi-select-header label:hover{background:var(--tct-search-multi-select-option-hover-background, var(--t-gray-14, #f2f2f2));color:var(--tct-search-multi-select-option-hover-font-color, var(--t-gray-5, #404040))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-search-multi-select-option-active-background, var(--t-gray-4, #333333));color:var(--tct-search-multi-select-option-active-font-color, var(--t-base, #ffffff))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-search-multi-select-option-disabled-opacity, var(--app-disabled-opacity, 0.4));cursor:not-allowed}.popover-top-container .multi-select-header input:focus-visible+label{box-shadow:var(--const-double-focus-ring)}.no-results{padding:var(--tct-search-no-results-padding, var(--app-scale-3x, 15px));color:var(--tct-search-no-results-font-color, var(--t-textA, rgba(77, 77, 77, 0.77)));text-align:center}";
|
|
608
610
|
|
|
609
|
-
export {
|
|
611
|
+
export { h as q2_search }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "q2-tecton-elements",
|
|
3
|
-
"version": "1.69.
|
|
3
|
+
"version": "1.69.1",
|
|
4
4
|
"description": "Q2 Tecton Custom Elements",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Q2 Tecton Team",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"@stencil/core": "~4.43.0",
|
|
58
|
-
"q2-tecton-common": "1.69.
|
|
58
|
+
"q2-tecton-common": "1.69.1",
|
|
59
59
|
"swiper": "^12.1.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"rollup-plugin-istanbul": "^5.0.0"
|
|
78
78
|
},
|
|
79
79
|
"packageManager": "pnpm@10.27.0",
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "17033b43f6a106d77f33ff8ae9bbc66097141b21"
|
|
81
81
|
}
|