PageSourceSearch

https://www.principal.com/profiles/contrib/houston/modules/pfg_cov…/esm/pdscoveo-refine-toggle.2pk70jLf.js

js principal.com collected 2026-09-24 08:41:23 UTC 3,536 bytes, 77 lines download raw bytes

1import { a as e, n as t, o as n, r } from "./pdscoveo-breadbox.9Y03e-5b.js";
2import { _ as i, d as a, f as o, h as s, o as c, p as l, u } from "./lit.BIXSeZ-E.js";
3//#region packages/pdscoveo/src/components/pdscoveo-refine-toggle/pdscoveo-refine-toggle.css?inline
4var d = "pds-button{--pds-base-type-line-height-28:1.1}@media (width>=1024px){.refinetoggle-c-button{display:none}}.refinetoggle-c-icon-filter{margin-right:calc(1 * var(--pds-base-unit,8px));display:inline-block}", f = "\n<svg\n  class=\"lucide lucide-funnel\"\n  xmlns=\"http://www.w3.org/2000/svg\"\n  width=\"24\"\n  height=\"24\"\n  viewBox=\"0 0 24 24\"\n  fill=\"none\"\n  stroke=\"currentColor\"\n  stroke-width=\"2\"\n  stroke-linecap=\"round\"\n  stroke-linejoin=\"round\"\n>\n  <path d=\"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\" />\n</svg>\n", p = Object.defineProperty, m = Object.getOwnPropertyDescriptor, h = (e, t, n, r) => {
5	for (var i = r > 1 ? void 0 : r ? m(t, n) : t, a = e.length - 1, o; a >= 0; a--) (o = e[a]) && (i = (r ? o(t, n, i) : o(i)) || i);
6	return r && i && p(t, n, i), i;
7}, g = class extends n {
8	constructor() {
9		super(...arguments), this.icon = f;
10	}
11	render() {
12		return s`${c(this.setIconAttributes())}`;
13	}
14};
15h([u()], g.prototype, "icon", 2), g = h([e("pds-icon-filter")], g);
16//#endregion
17//#region packages/pdscoveo/src/components/pdscoveo-refine-toggle/pdscoveo-refine-toggle.ts
18var _ = class extends l {
19	constructor(...e) {
20		super(...e), this.includeBreadbox = !0, this.includeFacets = !0, this.includeSorts = !0, this.label = "Filter & sort";
21	}
22	static {
23		this.styles = i(d);
24	}
25	loadModal() {
26		this.modalRef || (this.modalRef = document.createElement("pdscoveo-refine-modal"), this.modalRef.setAttribute("include-breadbox", String(this.includeBreadbox)), this.modalRef.setAttribute("include-facets", String(this.includeFacets)), this.modalRef.setAttribute("include-sorts", String(this.includeSorts)), this.modalRef.setAttribute("modal-title", String(this.label)), this.insertAdjacentElement("beforebegin", this.modalRef));
27	}
28	enableModal() {
29		if (this.modalRef) {
30			let e = this.modalRef?.shadowRoot?.querySelector("pds-modal");
31			e && e.openModal();
32		}
33	}
34	render() {
35		return this.error ? s`
36        <p>
37          Error when initializing the toggle, please view the console for more
38          information.
39        </p>
40      ` : (this.loadModal(), s`
41      <pds-button
42        class="refinetoggle-c-button"
43        @click=${() => this.enableModal()}
44        part="button"
45      >
46        <pds-icon-filter
47          class="refinetoggle-c-icon-filter"
48          part="icon"
49        ></pds-icon-filter>
50        <span class="refinetoggle-c-button-label" part="label">
51          ${" " + this.label}
52        </span>
53      </pds-button>
54    `);
55	}
56};
57t([a({
58	attribute: "include-breadbox",
59	reflect: !0,
60	type: Boolean
61}), r("design:type", Object)], _.prototype, "includeBreadbox", void 0), t([a({
62	attribute: "include-facets",
63	reflect: !0,
64	type: Boolean
65}), r("design:type", Object)], _.prototype, "includeFacets", void 0), t([a({
66	attribute: "include-sorts",
67	reflect: !0,
68	type: Boolean
69}), r("design:type", Object)], _.prototype, "includeSorts", void 0), t([a({
70	attribute: "label",
71	reflect: !0,
72	type: String
73}), r("design:type", Object)], _.prototype, "label", void 0), _ = t([o("pdscoveo-refine-toggle")], _);
74//#endregion
75export { _ as t };
76
77//# sourceMappingURL=pdscoveo-refine-toggle.2pk70jLf.js.map

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.