@getlupa/client 0.10.2 → 0.10.3

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.
Files changed (37) hide show
  1. package/dist/cjs/components/search-box/SearchBoxInput.vue.d.ts +2 -0
  2. package/dist/cjs/components/search-results/SearchResults.vue.d.ts +1 -0
  3. package/dist/cjs/components/search-results/SearchResultsTitle.vue.d.ts +2 -0
  4. package/dist/cjs/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
  5. package/dist/cjs/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +2 -0
  6. package/dist/cjs/constants/development/searchBoxDev.example.const.d.ts +1 -0
  7. package/dist/cjs/constants/global.const.d.ts +1 -0
  8. package/dist/cjs/index.min.js +255 -114
  9. package/dist/cjs/types/search-box/SearchBoxOptions.d.ts +1 -0
  10. package/dist/cjs/types/search-container/SearchContainerOptions.d.ts +1 -0
  11. package/dist/cjs/utils/shadowDom.utils.d.ts +5 -0
  12. package/dist/containerStyle.js +1 -0
  13. package/dist/es/components/search-box/SearchBoxInput.vue.d.ts +2 -0
  14. package/dist/es/components/search-results/SearchResults.vue.d.ts +1 -0
  15. package/dist/es/components/search-results/SearchResultsTitle.vue.d.ts +2 -0
  16. package/dist/es/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
  17. package/dist/es/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +2 -0
  18. package/dist/es/constants/development/searchBoxDev.example.const.d.ts +1 -0
  19. package/dist/es/constants/global.const.d.ts +1 -0
  20. package/dist/es/index.min.js +255 -114
  21. package/dist/es/types/search-box/SearchBoxOptions.d.ts +1 -0
  22. package/dist/es/types/search-container/SearchContainerOptions.d.ts +1 -0
  23. package/dist/es/utils/shadowDom.utils.d.ts +5 -0
  24. package/dist/iife/components/search-box/SearchBoxInput.vue.d.ts +2 -0
  25. package/dist/iife/components/search-results/SearchResults.vue.d.ts +1 -0
  26. package/dist/iife/components/search-results/SearchResultsTitle.vue.d.ts +2 -0
  27. package/dist/iife/components/search-results/products/SearchResultsToolbar.vue.d.ts +1 -0
  28. package/dist/iife/components/search-results/products/product-card/elements/SearchResultsProductCustom.vue.d.ts +2 -0
  29. package/dist/iife/constants/development/searchBoxDev.example.const.d.ts +1 -0
  30. package/dist/iife/constants/global.const.d.ts +1 -0
  31. package/dist/iife/index.min.js +1 -1
  32. package/dist/iife/types/search-box/SearchBoxOptions.d.ts +1 -0
  33. package/dist/iife/types/search-container/SearchContainerOptions.d.ts +1 -0
  34. package/dist/iife/utils/shadowDom.utils.d.ts +5 -0
  35. package/dist/lupaContainerStyle.css +1 -0
  36. package/dist/style.css +1 -1
  37. package/package.json +3 -2
@@ -20,4 +20,6 @@ export default class SearchBoxInput extends Vue {
20
20
  handleQueryChange(): void;
21
21
  handleInput(evt?: InputEvent): void;
22
22
  handleFocus(): void;
23
+ clear(): void;
24
+ focus(): void;
23
25
  }
@@ -7,6 +7,7 @@ export default class SearchResults extends Vue {
7
7
  options: SearchResultsOptions;
8
8
  initialFilters: FilterGroup;
9
9
  isProductList: boolean;
10
+ isContainer: boolean;
10
11
  get productsOptions(): SearchResultsProductOptions;
11
12
  currentQueryText: string;
12
13
  hasResults: boolean;
@@ -3,6 +3,7 @@ import Vue from "vue";
3
3
  export default class SearchResultsTitle extends Vue {
4
4
  options: SearchResultsOptions;
5
5
  isProductList: boolean;
6
+ showSummary: boolean;
6
7
  currentQueryText: string;
7
8
  totalItems: number;
8
9
  suggestedSearchText: string;
@@ -10,5 +11,6 @@ export default class SearchResultsTitle extends Vue {
10
11
  get showProductCount(): boolean;
11
12
  get showSearchTitle(): boolean;
12
13
  get descriptionTop(): string | undefined;
14
+ get summaryLabel(): string;
13
15
  getLabel(label: string): string;
14
16
  }
@@ -21,6 +21,7 @@ export default class SearchResultsToolbar extends Vue {
21
21
  get displayPageSelect(): boolean;
22
22
  get searchSummaryLabel(): string;
23
23
  get showMobileFilterCount(): boolean;
24
+ get hasResults(): boolean;
24
25
  currentResolutionPageSizes: number[];
25
26
  removeAllFilters: () => {
26
27
  params: QueryParams;
@@ -4,7 +4,9 @@ import { CustomDocumentElement } from "@/types/DocumentElement";
4
4
  export default class SearchResultsProductCustom extends Vue {
5
5
  item: Document;
6
6
  options: CustomDocumentElement;
7
+ get value(): unknown;
7
8
  get text(): string;
9
+ get isArray(): boolean;
8
10
  get className(): string;
9
11
  get label(): string | undefined;
10
12
  get isHtml(): boolean;
@@ -15,6 +15,7 @@ export declare const SEARCH_BOX_CONFIGURATION: {
15
15
  currency: string;
16
16
  priceSeparator: string;
17
17
  defaultFacetLabel: string;
18
+ close: string;
18
19
  };
19
20
  links: {
20
21
  searchResults: string;
@@ -13,3 +13,4 @@ export declare const CURRENCY_KEY_INDICATOR = "price";
13
13
  export declare const DEFAULT_PAGE_SIZE = 12;
14
14
  export declare const DEFAULT_PAGE_SIZE_SELECTION: number[];
15
15
  export declare const LUPA_ROUTING_EVENT = "lupaRedirect";
16
+ export declare const DEFAULT_CONTAINER_STYLE = "containerStyle.css";
@@ -10984,7 +10984,7 @@ let SearchBoxInput = class SearchBoxInput extends Vue$1 {
10984
10984
  if (target) {
10985
10985
  this.inputValue = target.value;
10986
10986
  }
10987
- this.$emit("input", this.inputValue.replace(/\s+$/, ""));
10987
+ this.$emit("input", this.inputValue);
10988
10988
  }
10989
10989
  handleFocus() {
10990
10990
  this.$emit("focus");
@@ -10992,6 +10992,13 @@ let SearchBoxInput = class SearchBoxInput extends Vue$1 {
10992
10992
  this.handleInput();
10993
10993
  }
10994
10994
  }
10995
+ clear() {
10996
+ this.$emit("input", "");
10997
+ }
10998
+ focus() {
10999
+ var _a, _b;
11000
+ (_b = (_a = this.$refs) === null || _a === void 0 ? void 0 : _a.mainInput) === null || _b === void 0 ? void 0 : _b.focus();
11001
+ }
10995
11002
  };
10996
11003
  __decorate([
10997
11004
  Prop()
@@ -11161,6 +11168,14 @@ var __vue_render__$1b = function () {
11161
11168
  var _h = _vm.$createElement;
11162
11169
  var _c = _vm._self._c || _h;
11163
11170
  return _c("div", { attrs: { id: "lupa-search-box-input-container" } }, [
11171
+ _c("div", { staticClass: "lupa-input-clear" }, [
11172
+ _c("div", {
11173
+ staticClass: "lupa-input-clear-content",
11174
+ class: { "lupa-input-clear-filled": _vm.inputValue },
11175
+ on: { click: _vm.clear },
11176
+ }),
11177
+ ]),
11178
+ _vm._v(" "),
11164
11179
  _c("div", { attrs: { id: "lupa-search-box-input" } }, [
11165
11180
  _c("input", {
11166
11181
  staticClass: "lupa-hint",
@@ -11182,6 +11197,7 @@ var __vue_render__$1b = function () {
11182
11197
  expression: "inputValue",
11183
11198
  },
11184
11199
  ],
11200
+ ref: "mainInput",
11185
11201
  staticClass: "lupa-search-box-input-field",
11186
11202
  attrs: {
11187
11203
  autocomplete: "off",
@@ -11221,7 +11237,13 @@ var __vue_render__$1b = function () {
11221
11237
  },
11222
11238
  },
11223
11239
  },
11224
- [_c("span", { staticClass: "lupa-close-action" }, [_vm._v("×")])]
11240
+ [
11241
+ _vm.labels.close
11242
+ ? _c("span", { staticClass: "lupa-close-label" }, [
11243
+ _vm._v(_vm._s(_vm.labels.close)),
11244
+ ])
11245
+ : _vm._e(),
11246
+ ]
11225
11247
  )
11226
11248
  : _vm._e(),
11227
11249
  ])
@@ -11232,7 +11254,7 @@ __vue_render__$1b._withStripped = true;
11232
11254
  /* style */
11233
11255
  const __vue_inject_styles__$1b = function (inject) {
11234
11256
  if (!inject) return
11235
- inject("data-v-ccec518c_0", { source: "\n.lupa-search-box-input-field,\n.lupa-hint {\n width: 100%;\n}\n.lupa-search-box-input-field {\n position: relative !important;\n background: transparent !important;\n}\n.lupa-hint {\n opacity: 0.5;\n position: absolute !important;\n pointer-events: none;\n}\n", map: undefined, media: undefined });
11257
+ inject("data-v-219ea03b_0", { source: "\n.lupa-search-box-input-field,\n.lupa-hint {\n width: 100%;\n}\n.lupa-search-box-input-field {\n position: relative !important;\n background: transparent !important;\n}\n.lupa-hint {\n opacity: 0.5;\n position: absolute !important;\n pointer-events: none;\n}\n.lupa-input-clear {\n display: none;\n}\n", map: undefined, media: undefined });
11236
11258
 
11237
11259
  };
11238
11260
  /* scoped */
@@ -11966,7 +11988,8 @@ const MAX_FACET_VALUES = 5000;
11966
11988
  const CURRENCY_KEY_INDICATOR = "price";
11967
11989
  const DEFAULT_PAGE_SIZE = 12;
11968
11990
  const DEFAULT_PAGE_SIZE_SELECTION = [12, 24, 36, 60];
11969
- const LUPA_ROUTING_EVENT = "lupaRedirect";
11991
+ const LUPA_ROUTING_EVENT = "lupaRedirect";
11992
+ const DEFAULT_CONTAINER_STYLE = "containerStyle.css";
11970
11993
 
11971
11994
  const formatRange = (filter) => {
11972
11995
  var _a, _b;
@@ -30836,12 +30859,16 @@ let SearchBox = class SearchBox extends Vue$1 {
30836
30859
  return (_a = this.options.searchTriggers) !== null && _a !== void 0 ? _a : [];
30837
30860
  }
30838
30861
  mounted() {
30862
+ var _a, _b;
30839
30863
  window.addEventListener("keydown", this.handleKeyDown);
30840
30864
  window.addEventListener("click", this.handleMouseClick);
30841
30865
  this.setSearchResultsLink(this.options.links.searchResults);
30842
30866
  this.saveOptions({ options: this.options });
30843
30867
  this.setSearchBoxOptions({ options: this.options });
30844
30868
  bindSearchTriggers(this.searchTriggers, this.handleCurrentValueSearch);
30869
+ if (this.isSearchContainer) {
30870
+ (_b = (_a = this.$refs) === null || _a === void 0 ? void 0 : _a.searchBoxInput) === null || _b === void 0 ? void 0 : _b.focus();
30871
+ }
30845
30872
  }
30846
30873
  beforeDestroy() {
30847
30874
  window.removeEventListener("keydown", this.handleKeyDown);
@@ -30879,12 +30906,12 @@ let SearchBox = class SearchBox extends Vue$1 {
30879
30906
  }
30880
30907
  handleInput(value) {
30881
30908
  this.opened = true;
30882
- this.inputValue = value;
30909
+ this.inputValue = value.replace(/\s+$/, "");
30883
30910
  this.suggestedValue = defaultSuggestedValue;
30884
30911
  this.trackSearchQuery(value);
30885
30912
  if (this.isSearchContainer) {
30886
30913
  this.goToResultsDebounced({
30887
- searchText: this.searchValue,
30914
+ searchText: value,
30888
30915
  });
30889
30916
  }
30890
30917
  }
@@ -31073,6 +31100,7 @@ var __vue_render__$U = function () {
31073
31100
  { staticClass: "lupa-search-box-wrapper" },
31074
31101
  [
31075
31102
  _c("SearchBoxInput", {
31103
+ ref: "searchBoxInput",
31076
31104
  attrs: {
31077
31105
  options: _vm.inputOptions,
31078
31106
  suggestedValue: _vm.suggestedValue,
@@ -31112,7 +31140,7 @@ __vue_render__$U._withStripped = true;
31112
31140
  /* style */
31113
31141
  const __vue_inject_styles__$U = function (inject) {
31114
31142
  if (!inject) return
31115
- inject("data-v-d81b3ccc_0", { source: "\n#lupa-search-box {\n width: 100%;\n}\n.lupa-search-box-wrapper {\n position: relative;\n}\n", map: undefined, media: undefined });
31143
+ inject("data-v-49023ab6_0", { source: "\n#lupa-search-box {\n width: 100%;\n}\n.lupa-search-box-wrapper {\n position: relative;\n}\n", map: undefined, media: undefined });
31116
31144
 
31117
31145
  };
31118
31146
  /* scoped */
@@ -33089,6 +33117,7 @@ __vue_render__$L._withStripped = true;
33089
33117
  );
33090
33118
 
33091
33119
  const RESULT_ROOT_ID = "lupa-search-results";
33120
+ const SHADOW_ROOT_ID = "lupa-shadow-id";
33092
33121
  const CONTAINER_ROOT_ID = "lupa-search-container";
33093
33122
  const scrollToSearchResults = (timeout = 500) => {
33094
33123
  if (timeout) {
@@ -33099,12 +33128,19 @@ const scrollToSearchResults = (timeout = 500) => {
33099
33128
  }
33100
33129
  };
33101
33130
  const scrollTo = (elementId) => {
33102
- const el = document.getElementById(elementId);
33131
+ var _a, _b;
33132
+ let el = document.getElementById(elementId);
33133
+ const shadowRoot = (_a = document.getElementById(SHADOW_ROOT_ID)) === null || _a === void 0 ? void 0 : _a.shadowRoot;
33134
+ if (!el) {
33135
+ el = (_b = shadowRoot === null || shadowRoot === void 0 ? void 0 : shadowRoot.getElementById(elementId)) !== null && _b !== void 0 ? _b : null;
33136
+ }
33103
33137
  if (!el) {
33104
33138
  return;
33105
33139
  }
33106
- const serchContainer = document.getElementById(CONTAINER_ROOT_ID);
33107
- const container = serchContainer !== null && serchContainer !== void 0 ? serchContainer : window;
33140
+ const searchContainer = shadowRoot
33141
+ ? shadowRoot.getElementById(CONTAINER_ROOT_ID)
33142
+ : undefined;
33143
+ const container = searchContainer !== null && searchContainer !== void 0 ? searchContainer : window;
33108
33144
  container.scrollTo({
33109
33145
  top: el.offsetTop,
33110
33146
  behavior: "smooth",
@@ -34570,6 +34606,7 @@ var __vue_render__$x = function () {
34570
34606
  {
34571
34607
  staticClass: "lupa-search-results-product-title",
34572
34608
  style: "-webkit-line-clamp: " + _vm.maxLines,
34609
+ attrs: { title: _vm.title },
34573
34610
  },
34574
34611
  [
34575
34612
  !_vm.options.link
@@ -35074,9 +35111,17 @@ __vue_render__$s._withStripped = true;
35074
35111
  );
35075
35112
 
35076
35113
  let SearchResultsProductCustom = class SearchResultsProductCustom extends Vue$1 {
35077
- get text() {
35114
+ get value() {
35078
35115
  return this.item[this.options.key];
35079
35116
  }
35117
+ get text() {
35118
+ return this.isArray
35119
+ ? this.item[this.options.key].join(", ")
35120
+ : this.item[this.options.key];
35121
+ }
35122
+ get isArray() {
35123
+ return Array.isArray(this.value);
35124
+ }
35080
35125
  get className() {
35081
35126
  return this.options.className;
35082
35127
  }
@@ -36932,6 +36977,9 @@ let SearchResultsToolbar = class SearchResultsToolbar extends Vue$1 {
36932
36977
  var _a, _b, _c;
36933
36978
  return Boolean((_c = (_b = (_a = this.options.filters) === null || _a === void 0 ? void 0 : _a.currentFilters) === null || _b === void 0 ? void 0 : _b.mobileSidebar) === null || _c === void 0 ? void 0 : _c.showFilterCount);
36934
36979
  }
36980
+ get hasResults() {
36981
+ return this.searchResult.total > 0;
36982
+ }
36935
36983
  };
36936
36984
  __decorate([
36937
36985
  Prop({ default: () => ({ labels: {} }) })
@@ -36980,65 +37028,72 @@ var __vue_render__$f = function () {
36980
37028
  var _vm = this;
36981
37029
  var _h = _vm.$createElement;
36982
37030
  var _c = _vm._self._c || _h;
36983
- return _c("div", { attrs: { id: "lupa-search-results-toolbar" } }, [
36984
- _c(
36985
- "div",
36986
- { staticClass: "lupa-toolbar-left" },
36987
- [
36988
- _vm.showLayoutSelection
36989
- ? _c("SearchResultsLayoutSelection")
36990
- : _c("div"),
36991
- _vm._v(" "),
36992
- _vm.showItemSummary
36993
- ? _c("SearchResultsSummary", {
36994
- attrs: {
36995
- label: _vm.searchSummaryLabel,
36996
- clearable: _vm.hasAnyFilter && _vm.showFilterClear,
36997
- },
36998
- on: { clear: _vm.handleClearAll },
36999
- })
37000
- : _c("div"),
37001
- _vm._v(" "),
37002
- _vm.displayPageSelect
37003
- ? _c("SearchResultsPageSelect", {
37004
- attrs: {
37005
- options: _vm.paginationOptions.pageSelect,
37006
- "last-page-label": _vm.paginationOptions.labels.showMore,
37007
- "first-page-label": _vm.paginationOptions.labels.showLess,
37008
- },
37009
- })
37010
- : _c("div"),
37011
- ],
37012
- 1
37013
- ),
37014
- _vm._v(" "),
37015
- _c(
37016
- "div",
37017
- { staticClass: "lupa-toolbar-right" },
37018
- [
37019
- _c("SearchResultsMobileToggle", {
37020
- attrs: {
37021
- label: _vm.options.labels.mobileFilterButton,
37022
- "show-filter-count": _vm.showMobileFilterCount,
37023
- },
37024
- }),
37025
- _vm._v(" "),
37026
- _vm.paginationDisplay.pageSize
37027
- ? _c("SearchResultsPageSize", {
37028
- attrs: {
37029
- options: _vm.paginationOptions.pageSize,
37030
- label: _vm.paginationOptions.labels.pageSize,
37031
- },
37032
- })
37033
- : _c("div"),
37034
- _vm._v(" "),
37035
- _vm.sortOptions
37036
- ? _c("SearchResultsSort", { attrs: { options: _vm.sortOptions } })
37037
- : _c("div"),
37038
- ],
37039
- 1
37040
- ),
37041
- ])
37031
+ return _c(
37032
+ "div",
37033
+ {
37034
+ class: { "lupa-filter-no-results": !_vm.hasResults },
37035
+ attrs: { id: "lupa-search-results-toolbar" },
37036
+ },
37037
+ [
37038
+ _c(
37039
+ "div",
37040
+ { staticClass: "lupa-toolbar-left" },
37041
+ [
37042
+ _vm.showLayoutSelection
37043
+ ? _c("SearchResultsLayoutSelection")
37044
+ : _c("div"),
37045
+ _vm._v(" "),
37046
+ _vm.showItemSummary
37047
+ ? _c("SearchResultsSummary", {
37048
+ attrs: {
37049
+ label: _vm.searchSummaryLabel,
37050
+ clearable: _vm.hasAnyFilter && _vm.showFilterClear,
37051
+ },
37052
+ on: { clear: _vm.handleClearAll },
37053
+ })
37054
+ : _c("div"),
37055
+ _vm._v(" "),
37056
+ _vm.displayPageSelect
37057
+ ? _c("SearchResultsPageSelect", {
37058
+ attrs: {
37059
+ options: _vm.paginationOptions.pageSelect,
37060
+ "last-page-label": _vm.paginationOptions.labels.showMore,
37061
+ "first-page-label": _vm.paginationOptions.labels.showLess,
37062
+ },
37063
+ })
37064
+ : _c("div"),
37065
+ ],
37066
+ 1
37067
+ ),
37068
+ _vm._v(" "),
37069
+ _c(
37070
+ "div",
37071
+ { staticClass: "lupa-toolbar-right" },
37072
+ [
37073
+ _c("SearchResultsMobileToggle", {
37074
+ attrs: {
37075
+ label: _vm.options.labels.mobileFilterButton,
37076
+ "show-filter-count": _vm.showMobileFilterCount,
37077
+ },
37078
+ }),
37079
+ _vm._v(" "),
37080
+ _vm.paginationDisplay.pageSize
37081
+ ? _c("SearchResultsPageSize", {
37082
+ attrs: {
37083
+ options: _vm.paginationOptions.pageSize,
37084
+ label: _vm.paginationOptions.labels.pageSize,
37085
+ },
37086
+ })
37087
+ : _c("div"),
37088
+ _vm._v(" "),
37089
+ _vm.sortOptions
37090
+ ? _c("SearchResultsSort", { attrs: { options: _vm.sortOptions } })
37091
+ : _c("div"),
37092
+ ],
37093
+ 1
37094
+ ),
37095
+ ]
37096
+ )
37042
37097
  };
37043
37098
  var __vue_staticRenderFns__$f = [];
37044
37099
  __vue_render__$f._withStripped = true;
@@ -37100,7 +37155,7 @@ __vue_render__$e._withStripped = true;
37100
37155
  /* style */
37101
37156
  const __vue_inject_styles__$e = function (inject) {
37102
37157
  if (!inject) return
37103
- inject("data-v-ef12587c_0", { source: ".lupa-spinner {\n color: #555555;\n display: flex;\n justify-content: center;\n position: relative;\n width: 100%;\n padding-top: 100px;\n padding-right: 72px;\n}\n.lupa-spinner div {\n transform-origin: 40px 40px;\n animation: lupa-spinner 1.2s linear infinite;\n}\n.lupa-spinner div:after {\n content: \" \";\n display: block;\n position: absolute;\n top: 3px;\n left: 37px;\n width: 6px;\n height: 18px;\n border-radius: 20%;\n background: #555555;\n}\n.lupa-spinner div:nth-child(1) {\n transform: rotate(0deg);\n animation-delay: -1.1s;\n}\n.lupa-spinner div:nth-child(2) {\n transform: rotate(30deg);\n animation-delay: -1s;\n}\n.lupa-spinner div:nth-child(3) {\n transform: rotate(60deg);\n animation-delay: -0.9s;\n}\n.lupa-spinner div:nth-child(4) {\n transform: rotate(90deg);\n animation-delay: -0.8s;\n}\n.lupa-spinner div:nth-child(5) {\n transform: rotate(120deg);\n animation-delay: -0.7s;\n}\n.lupa-spinner div:nth-child(6) {\n transform: rotate(150deg);\n animation-delay: -0.6s;\n}\n.lupa-spinner div:nth-child(7) {\n transform: rotate(180deg);\n animation-delay: -0.5s;\n}\n.lupa-spinner div:nth-child(8) {\n transform: rotate(210deg);\n animation-delay: -0.4s;\n}\n.lupa-spinner div:nth-child(9) {\n transform: rotate(240deg);\n animation-delay: -0.3s;\n}\n.lupa-spinner div:nth-child(10) {\n transform: rotate(270deg);\n animation-delay: -0.2s;\n}\n.lupa-spinner div:nth-child(11) {\n transform: rotate(300deg);\n animation-delay: -0.1s;\n}\n.lupa-spinner div:nth-child(12) {\n transform: rotate(330deg);\n animation-delay: 0s;\n}\n@keyframes lupa-spinner {\n0% {\n opacity: 1;\n}\n100% {\n opacity: 0;\n}\n}\n.lupa-spinner-wrapper {\n width: 100%;\n}", map: undefined, media: undefined });
37158
+ inject("data-v-3353d3a1_0", { source: ".lupa-spinner {\n color: #555555;\n display: flex;\n justify-content: center;\n position: relative;\n width: 100%;\n padding-top: 100px;\n padding-right: 72px;\n}\n.lupa-spinner div {\n transform-origin: 40px 40px;\n animation: lupa-spinner 1.2s linear infinite;\n}\n.lupa-spinner div:after {\n content: \" \";\n display: block;\n position: absolute;\n top: 3px;\n left: 37px;\n width: 6px;\n height: 18px;\n border-radius: 20%;\n background: #555555;\n}\n.lupa-spinner div:nth-child(1) {\n transform: rotate(0deg);\n animation-delay: -1.1s;\n}\n.lupa-spinner div:nth-child(2) {\n transform: rotate(30deg);\n animation-delay: -1s;\n}\n.lupa-spinner div:nth-child(3) {\n transform: rotate(60deg);\n animation-delay: -0.9s;\n}\n.lupa-spinner div:nth-child(4) {\n transform: rotate(90deg);\n animation-delay: -0.8s;\n}\n.lupa-spinner div:nth-child(5) {\n transform: rotate(120deg);\n animation-delay: -0.7s;\n}\n.lupa-spinner div:nth-child(6) {\n transform: rotate(150deg);\n animation-delay: -0.6s;\n}\n.lupa-spinner div:nth-child(7) {\n transform: rotate(180deg);\n animation-delay: -0.5s;\n}\n.lupa-spinner div:nth-child(8) {\n transform: rotate(210deg);\n animation-delay: -0.4s;\n}\n.lupa-spinner div:nth-child(9) {\n transform: rotate(240deg);\n animation-delay: -0.3s;\n}\n.lupa-spinner div:nth-child(10) {\n transform: rotate(270deg);\n animation-delay: -0.2s;\n}\n.lupa-spinner div:nth-child(11) {\n transform: rotate(300deg);\n animation-delay: -0.1s;\n}\n.lupa-spinner div:nth-child(12) {\n transform: rotate(330deg);\n animation-delay: 0s;\n}\n@keyframes lupa-spinner {\n0% {\n opacity: 1;\n}\n100% {\n opacity: 0;\n}\n}\n.lupa-spinner-wrapper {\n width: 100%;\n overflow: hidden;\n}", map: undefined, media: undefined });
37104
37159
 
37105
37160
  };
37106
37161
  /* scoped */
@@ -37874,6 +37929,10 @@ let SearchResultsTitle = class SearchResultsTitle extends Vue$1 {
37874
37929
  var _a, _b;
37875
37930
  return (_b = (_a = this.options.categories) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.descriptionTop;
37876
37931
  }
37932
+ get summaryLabel() {
37933
+ var _a, _b;
37934
+ return (_b = (_a = this.options.labels) === null || _a === void 0 ? void 0 : _a.itemCount) !== null && _b !== void 0 ? _b : "";
37935
+ }
37877
37936
  getLabel(label) {
37878
37937
  return addParamsToLabel(label, `'${this.currentQueryText}'`);
37879
37938
  }
@@ -37884,6 +37943,9 @@ __decorate([
37884
37943
  __decorate([
37885
37944
  Prop({ default: false })
37886
37945
  ], SearchResultsTitle.prototype, "isProductList", void 0);
37946
+ __decorate([
37947
+ Prop({ default: false })
37948
+ ], SearchResultsTitle.prototype, "showSummary", void 0);
37887
37949
  __decorate([
37888
37950
  searchResult$2.Getter("currentQueryText")
37889
37951
  ], SearchResultsTitle.prototype, "currentQueryText", void 0);
@@ -37896,6 +37958,9 @@ __decorate([
37896
37958
  SearchResultsTitle = __decorate([
37897
37959
  Component({
37898
37960
  name: "SearchResultsTitle",
37961
+ components: {
37962
+ SearchResultsSummary: __vue_component__$h,
37963
+ },
37899
37964
  })
37900
37965
  ], SearchResultsTitle);
37901
37966
  var script$8 = SearchResultsTitle;
@@ -37908,36 +37973,44 @@ var __vue_render__$8 = function () {
37908
37973
  var _vm = this;
37909
37974
  var _h = _vm.$createElement;
37910
37975
  var _c = _vm._self._c || _h;
37911
- return _c("div", [
37912
- _vm.showSearchTitle
37913
- ? _c(
37914
- "h1",
37915
- {
37916
- staticClass: "lupa-result-page-title",
37917
- attrs: { "data-cy": "lupa-result-page-title" },
37918
- },
37919
- [
37920
- _vm._v("\n " + _vm._s(_vm.options.labels.searchResults)),
37921
- _vm.queryText
37922
- ? _c("span", [_vm._v("'" + _vm._s(_vm.queryText) + "'")])
37923
- : _vm._e(),
37924
- _vm._v(" "),
37925
- _vm.showProductCount
37926
- ? _c("span", { staticClass: "lupa-results-total-count" }, [
37927
- _vm._v("(" + _vm._s(_vm.totalItems) + ")"),
37928
- ])
37929
- : _vm._e(),
37930
- ]
37931
- )
37932
- : _vm._e(),
37933
- _vm._v(" "),
37934
- _vm.descriptionTop
37935
- ? _c("div", {
37936
- staticClass: "lupa-result-page-description-top",
37937
- domProps: { innerHTML: _vm._s(_vm.descriptionTop) },
37938
- })
37939
- : _vm._e(),
37940
- ])
37976
+ return _c(
37977
+ "div",
37978
+ [
37979
+ _vm.showSearchTitle
37980
+ ? _c(
37981
+ "h1",
37982
+ {
37983
+ staticClass: "lupa-result-page-title",
37984
+ attrs: { "data-cy": "lupa-result-page-title" },
37985
+ },
37986
+ [
37987
+ _vm._v("\n " + _vm._s(_vm.options.labels.searchResults)),
37988
+ _vm.queryText
37989
+ ? _c("span", [_vm._v("'" + _vm._s(_vm.queryText) + "'")])
37990
+ : _vm._e(),
37991
+ _vm._v(" "),
37992
+ _vm.showProductCount
37993
+ ? _c("span", { staticClass: "lupa-results-total-count" }, [
37994
+ _vm._v("(" + _vm._s(_vm.totalItems) + ")"),
37995
+ ])
37996
+ : _vm._e(),
37997
+ ]
37998
+ )
37999
+ : _vm._e(),
38000
+ _vm._v(" "),
38001
+ _vm.showSummary
38002
+ ? _c("SearchResultsSummary", { attrs: { label: _vm.summaryLabel } })
38003
+ : _vm._e(),
38004
+ _vm._v(" "),
38005
+ _vm.descriptionTop
38006
+ ? _c("div", {
38007
+ staticClass: "lupa-result-page-description-top",
38008
+ domProps: { innerHTML: _vm._s(_vm.descriptionTop) },
38009
+ })
38010
+ : _vm._e(),
38011
+ ],
38012
+ 1
38013
+ )
37941
38014
  };
37942
38015
  var __vue_staticRenderFns__$8 = [];
37943
38016
  __vue_render__$8._withStripped = true;
@@ -38218,6 +38291,9 @@ __decorate([
38218
38291
  __decorate([
38219
38292
  Prop({ default: false })
38220
38293
  ], SearchResults.prototype, "isProductList", void 0);
38294
+ __decorate([
38295
+ Prop({ default: false })
38296
+ ], SearchResults.prototype, "isContainer", void 0);
38221
38297
  __decorate([
38222
38298
  searchResult$1.Getter("currentQueryText")
38223
38299
  ], SearchResults.prototype, "currentQueryText", void 0);
@@ -38301,6 +38377,29 @@ var __vue_render__$6 = function () {
38301
38377
  "div",
38302
38378
  { staticClass: "lupa-search-result-wrapper" },
38303
38379
  [
38380
+ _vm.isContainer
38381
+ ? [
38382
+ _c(
38383
+ "div",
38384
+ { staticClass: "lupa-container-title-summary-mobile" },
38385
+ [
38386
+ _c("SearchResultsDidYouMean", {
38387
+ attrs: { labels: _vm.didYouMeanLabels },
38388
+ }),
38389
+ _vm._v(" "),
38390
+ _c("SearchResultsTitle", {
38391
+ attrs: {
38392
+ "show-summary": true,
38393
+ options: _vm.options,
38394
+ "is-product-list": _vm.isProductList,
38395
+ },
38396
+ }),
38397
+ ],
38398
+ 1
38399
+ ),
38400
+ ]
38401
+ : _vm._e(),
38402
+ _vm._v(" "),
38304
38403
  _vm.isTitleResultTopPosition
38305
38404
  ? _c("CategoryTopFilters", { attrs: { options: _vm.options } })
38306
38405
  : _vm._e(),
@@ -38836,7 +38935,10 @@ var __vue_render__$1 = function () {
38836
38935
  _vm._v(" "),
38837
38936
  _c("SearchResults", {
38838
38937
  ref: "searchResults",
38839
- attrs: { options: _vm.fullSearchResultsOptions },
38938
+ attrs: {
38939
+ options: _vm.fullSearchResultsOptions,
38940
+ "is-container": true,
38941
+ },
38840
38942
  }),
38841
38943
  ],
38842
38944
  1
@@ -38948,13 +39050,19 @@ var __vue_render__ = function () {
38948
39050
  var _vm = this;
38949
39051
  var _h = _vm.$createElement;
38950
39052
  var _c = _vm._self._c || _h;
38951
- return _vm.isOpen
38952
- ? _c("SearchContainer", {
38953
- ref: "productList",
38954
- attrs: { options: _vm.containerOptions },
38955
- on: { "hook:mounted": _vm.focus, close: _vm.close },
38956
- })
38957
- : _vm._e()
39053
+ return _c(
39054
+ "div",
39055
+ [
39056
+ _vm.isOpen
39057
+ ? _c("SearchContainer", {
39058
+ ref: "productList",
39059
+ attrs: { options: _vm.containerOptions },
39060
+ on: { "hook:mounted": _vm.focus, close: _vm.close },
39061
+ })
39062
+ : _vm._e(),
39063
+ ],
39064
+ 1
39065
+ )
38958
39066
  };
38959
39067
  var __vue_staticRenderFns__ = [];
38960
39068
  __vue_render__._withStripped = true;
@@ -40110,6 +40218,30 @@ var store = new Vuex.Store({
40110
40218
  },
40111
40219
  });
40112
40220
 
40221
+ const attatchShadowDom = ({ host, manager, styleUrl, }) => {
40222
+ const link = document.createElement("link");
40223
+ link.type = "text/css";
40224
+ link.rel = "stylesheet";
40225
+ link.href = styleUrl;
40226
+ // Fonts only work when added in host document head
40227
+ const linkNode = document.createElement("link");
40228
+ linkNode.type = "text/css";
40229
+ linkNode.rel = "stylesheet";
40230
+ linkNode.href =
40231
+ "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap";
40232
+ document.head.appendChild(linkNode);
40233
+ // Add font for material icons
40234
+ const linkNode2 = document.createElement("link");
40235
+ linkNode2.type = "text/css";
40236
+ linkNode2.rel = "stylesheet";
40237
+ linkNode2.href =
40238
+ "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,1,-50..200";
40239
+ document.head.appendChild(linkNode2);
40240
+ const shadow = host.attachShadow({ mode: "open" });
40241
+ shadow.appendChild(manager);
40242
+ shadow.appendChild(link);
40243
+ };
40244
+
40113
40245
  /* eslint-disable @typescript-eslint/no-explicit-any */
40114
40246
  const app = {
40115
40247
  box: {},
@@ -40193,6 +40325,7 @@ const productList = (options, mountOptions) => {
40193
40325
  app.productList[options.containerSelector] = instance;
40194
40326
  };
40195
40327
  const searchContainer = (options, mountOptions) => {
40328
+ var _a;
40196
40329
  const existingInstance = app.productList[options.trigger];
40197
40330
  if (existingInstance) {
40198
40331
  existingInstance.productListOptions = options;
@@ -40205,13 +40338,21 @@ const searchContainer = (options, mountOptions) => {
40205
40338
  return;
40206
40339
  }
40207
40340
  Vue$1.use(Vuex);
40208
- const id = `lupa-search-container-manager`;
40209
- const managerElement = document.createElement("div");
40210
- managerElement.setAttribute("id", id);
40211
- document.body.appendChild(managerElement);
40341
+ const id = "lupa-search-container-manager";
40342
+ const shadowId = "lupa-shadow-id";
40343
+ const host = document.createElement("div");
40344
+ const manager = document.createElement("div");
40345
+ host.setAttribute("id", shadowId);
40346
+ manager.setAttribute("id", id);
40347
+ attatchShadowDom({
40348
+ host,
40349
+ manager,
40350
+ styleUrl: (_a = options.styleLink) !== null && _a !== void 0 ? _a : DEFAULT_CONTAINER_STYLE,
40351
+ });
40352
+ document.body.appendChild(host);
40212
40353
  const SearchContainerEntryComponent = Vue$1.component("SearchContainerEntry", __vue_component__);
40213
40354
  const instance = new SearchContainerEntryComponent({
40214
- el: `#${id}`,
40355
+ el: manager,
40215
40356
  propsData: { searchContainerOptions: options },
40216
40357
  store,
40217
40358
  });
@@ -14,6 +14,7 @@ export declare type SearchBoxOptionLabels = {
14
14
  currency: string;
15
15
  priceSeparator?: string;
16
16
  defaultFacetLabel?: string;
17
+ close?: string;
17
18
  };
18
19
  export declare type SearchBoxOptionLinks = {
19
20
  searchResults: string;