1import { l as e, o as t } from "./commerce.indexBu0Q3kxk.js"; 2import { a as n, i as r, n as i, r as a, u as o } from "./decoratorsDgvFPsqQ.js"; 3import { t as s } from "./whenDHlaxSuD.js"; 4import { t as c } from "./bind-stateHBIU0rdL.js"; 5import { t as l } from "./binding-guardBYpyFCsg.js"; 6import { t as u } from "./bindingsC1qzP6-H.js"; 7import { t as d } from "./with-tailwind-stylesCLrXF-GP.js"; 8import { t as f } from "./error-guardDZkUaSL0.js"; 9import { d as p } from "./utilsCdZ5ESYt.js"; 10import { t as m } from "./fieldset-groupr2r36x-h.js"; 11import { t as h } from "./storeCURF8TVf.js"; 12import { a as g, n as _, o as v, t as y } from "./validateCQMMAC2H.js"; 13//#region node_modules/@coveo/atomic/dist/atomic/components/components/commerce/atomic-commerce-products-per-page/atomic-commerce-products-per-page.js 14var b = function(e, t, n, r) { 15 var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o; 16 if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r); 17 else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a); 18 return i > 3 && a && Object.defineProperty(t, n, a), a; 19}, x = class extends n { 20 constructor() { 21 super(...arguments), this.isAppLoaded = !1, this.radioGroupName = p("atomic-commerce-products-per-page-"), this.choicesDisplayed = "10,25,50,100"; 22 } 23 initialize() { 24 this.choices = y(this.choicesDisplayed), this.initialChoice = this.initialChoice ?? this.choices[0], _(this.initialChoice, this.choices); 25 let n = this.bindings.interfaceElement.type === "search" ? t(this.bindings.engine) : e(this.bindings.engine); 26 this.summary = n.summary(), this.pagination = n.pagination(this.initialChoice ? { options: { pageSize: this.initialChoice } } : {}), h(this.bindings.store, (e) => { 27 this.isAppLoaded = e; 28 }); 29 } 30 scrollToTopEvent() { 31 this.dispatchEvent(new CustomEvent("atomic/scrollToTop", { 32 bubbles: !0, 33 composed: !0 34 })); 35 } 36 get label() { 37 return this.bindings.i18n.t("products-per-page"); 38 } 39 render() { 40 return o` 41 ${s(!this.summaryState.hasError && this.summaryState.hasProducts && this.isAppLoaded, () => o` 42 <div class="flex items-center"> 43 ${g()(o`${this.label}`)} 44 ${m({ props: { label: this.label } })(v({ props: { 45 label: this.label, 46 groupName: this.radioGroupName, 47 pageSize: this.paginationState.pageSize, 48 choices: this.choices, 49 lang: this.bindings.i18n.language, 50 scrollToTopEvent: () => this.scrollToTopEvent(), 51 setItemSize: (e) => this.pagination.setPageSize(e), 52 focusOnFirstResultAfterNextSearch: () => this.bindings.store.state.resultList?.focusOnFirstResultAfterNextSearch(), 53 focusOnNextNewResult: () => this.bindings.store.state.resultList?.focusOnNextNewResult() 54 } }))} 55 </div> 56 `)} 57 `; 58 } 59}; 60b([c("pagination"), i()], x.prototype, "paginationState", void 0), b([c("summary"), i()], x.prototype, "summaryState", void 0), b([i()], x.prototype, "error", void 0), b([i()], x.prototype, "isAppLoaded", void 0), b([a({ 61 reflect: !0, 62 attribute: "choices-displayed" 63})], x.prototype, "choicesDisplayed", void 0), b([a({ 64 type: Number, 65 reflect: !0, 66 attribute: "initial-choice" 67})], x.prototype, "initialChoice", void 0), b([l(), f()], x.prototype, "render", null), x = b([ 68 r("atomic-commerce-products-per-page"), 69 u(), 70 d 71], x); 72//#endregion 73export { x as AtomicCommerceProductsPerPage };
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.