@getlupa/client 0.10.5 → 0.10.7

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.
@@ -40221,37 +40221,37 @@ var store = new Vuex.Store({
40221
40221
 
40222
40222
  const createShadowDom = (shadowId, managerId) => {
40223
40223
  let host = document.getElementById(shadowId);
40224
- let manager = document.getElementById(managerId);
40225
- if (!host) {
40226
- host = document.createElement("div");
40227
- manager = document.createElement("div");
40228
- }
40229
- if (!manager) {
40230
- manager = document.createElement("div");
40224
+ if (host) {
40225
+ host.remove();
40231
40226
  }
40227
+ host = document.createElement("div");
40228
+ const manager = document.createElement("div");
40232
40229
  host.setAttribute("id", shadowId);
40233
40230
  manager === null || manager === void 0 ? void 0 : manager.setAttribute("id", managerId);
40234
40231
  return { host, manager };
40235
40232
  };
40236
40233
  const attatchShadowDom = ({ host, manager, styleUrl, }) => {
40234
+ if (host.shadowRoot) {
40235
+ return;
40236
+ }
40237
40237
  const link = document.createElement("link");
40238
40238
  link.type = "text/css";
40239
40239
  link.rel = "stylesheet";
40240
40240
  link.href = styleUrl;
40241
40241
  // Fonts only work when added in host document head
40242
- const linkNode = document.createElement("link");
40243
- linkNode.type = "text/css";
40244
- linkNode.rel = "stylesheet";
40245
- linkNode.href =
40242
+ const fontLink = document.createElement("link");
40243
+ fontLink.type = "text/css";
40244
+ fontLink.rel = "stylesheet";
40245
+ fontLink.href =
40246
40246
  "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap";
40247
- document.head.appendChild(linkNode);
40247
+ document.head.appendChild(fontLink);
40248
40248
  // Add font for material icons
40249
- const linkNode2 = document.createElement("link");
40250
- linkNode2.type = "text/css";
40251
- linkNode2.rel = "stylesheet";
40252
- linkNode2.href =
40249
+ const materialIconLink = document.createElement("link");
40250
+ materialIconLink.type = "text/css";
40251
+ materialIconLink.rel = "stylesheet";
40252
+ materialIconLink.href =
40253
40253
  "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,1,-50..200";
40254
- document.head.appendChild(linkNode2);
40254
+ document.head.appendChild(materialIconLink);
40255
40255
  const shadow = host.attachShadow({ mode: "open" });
40256
40256
  shadow.appendChild(manager);
40257
40257
  shadow.appendChild(link);
@@ -40428,7 +40428,7 @@ const clearSearchContainer = (selector) => {
40428
40428
  instance === null || instance === void 0 ? void 0 : instance.$destroy();
40429
40429
  return;
40430
40430
  }
40431
- for (const key in app.productList) {
40431
+ for (const key in app.searchContainer) {
40432
40432
  const instance = app.searchContainer[key];
40433
40433
  instance === null || instance === void 0 ? void 0 : instance.$destroy();
40434
40434
  }
@@ -1,6 +1,6 @@
1
1
  export declare const createShadowDom: (shadowId: string, managerId: string) => {
2
2
  host: HTMLElement;
3
- manager: HTMLElement;
3
+ manager: HTMLDivElement;
4
4
  };
5
5
  export declare const attatchShadowDom: ({ host, manager, styleUrl, }: {
6
6
  host: HTMLElement;
@@ -40217,37 +40217,37 @@ var store = new Vuex.Store({
40217
40217
 
40218
40218
  const createShadowDom = (shadowId, managerId) => {
40219
40219
  let host = document.getElementById(shadowId);
40220
- let manager = document.getElementById(managerId);
40221
- if (!host) {
40222
- host = document.createElement("div");
40223
- manager = document.createElement("div");
40224
- }
40225
- if (!manager) {
40226
- manager = document.createElement("div");
40220
+ if (host) {
40221
+ host.remove();
40227
40222
  }
40223
+ host = document.createElement("div");
40224
+ const manager = document.createElement("div");
40228
40225
  host.setAttribute("id", shadowId);
40229
40226
  manager === null || manager === void 0 ? void 0 : manager.setAttribute("id", managerId);
40230
40227
  return { host, manager };
40231
40228
  };
40232
40229
  const attatchShadowDom = ({ host, manager, styleUrl, }) => {
40230
+ if (host.shadowRoot) {
40231
+ return;
40232
+ }
40233
40233
  const link = document.createElement("link");
40234
40234
  link.type = "text/css";
40235
40235
  link.rel = "stylesheet";
40236
40236
  link.href = styleUrl;
40237
40237
  // Fonts only work when added in host document head
40238
- const linkNode = document.createElement("link");
40239
- linkNode.type = "text/css";
40240
- linkNode.rel = "stylesheet";
40241
- linkNode.href =
40238
+ const fontLink = document.createElement("link");
40239
+ fontLink.type = "text/css";
40240
+ fontLink.rel = "stylesheet";
40241
+ fontLink.href =
40242
40242
  "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap";
40243
- document.head.appendChild(linkNode);
40243
+ document.head.appendChild(fontLink);
40244
40244
  // Add font for material icons
40245
- const linkNode2 = document.createElement("link");
40246
- linkNode2.type = "text/css";
40247
- linkNode2.rel = "stylesheet";
40248
- linkNode2.href =
40245
+ const materialIconLink = document.createElement("link");
40246
+ materialIconLink.type = "text/css";
40247
+ materialIconLink.rel = "stylesheet";
40248
+ materialIconLink.href =
40249
40249
  "https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,1,-50..200";
40250
- document.head.appendChild(linkNode2);
40250
+ document.head.appendChild(materialIconLink);
40251
40251
  const shadow = host.attachShadow({ mode: "open" });
40252
40252
  shadow.appendChild(manager);
40253
40253
  shadow.appendChild(link);
@@ -40424,7 +40424,7 @@ const clearSearchContainer = (selector) => {
40424
40424
  instance === null || instance === void 0 ? void 0 : instance.$destroy();
40425
40425
  return;
40426
40426
  }
40427
- for (const key in app.productList) {
40427
+ for (const key in app.searchContainer) {
40428
40428
  const instance = app.searchContainer[key];
40429
40429
  instance === null || instance === void 0 ? void 0 : instance.$destroy();
40430
40430
  }
@@ -1,6 +1,6 @@
1
1
  export declare const createShadowDom: (shadowId: string, managerId: string) => {
2
2
  host: HTMLElement;
3
- manager: HTMLElement;
3
+ manager: HTMLDivElement;
4
4
  };
5
5
  export declare const attatchShadowDom: ({ host, manager, styleUrl, }: {
6
6
  host: HTMLElement;