intelica-library-components 1.1.93 → 1.1.94

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.
@@ -8283,6 +8283,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
8283
8283
  }] });
8284
8284
 
8285
8285
  class GlobalMenuService {
8286
+ ConfigService = inject(ConfigService);
8286
8287
  _isMenuVisible = signal(true, ...(ngDevMode ? [{ debugName: "_isMenuVisible" }] : []));
8287
8288
  _selectedProduct = signal({ product: "", icon: "", productId: "" }, ...(ngDevMode ? [{ debugName: "_selectedProduct" }] : []));
8288
8289
  isMenuVisible = this._isMenuVisible.asReadonly();
@@ -8318,11 +8319,13 @@ class GlobalMenuService {
8318
8319
  }
8319
8320
  }
8320
8321
  setMenuVisibility(isVisible) {
8321
- setCookie(this.COOKIE_MENU, String(isVisible)); // 👈 NUEVO
8322
+ const cookieAttributesGeneral = GetCookieAttributes(this.ConfigService.environment?.environment ?? "");
8323
+ setCookie(this.COOKIE_MENU, String(isVisible), cookieAttributesGeneral); // 👈 NUEVO
8322
8324
  this.emitMenuEvent(isVisible);
8323
8325
  }
8324
8326
  setSelectedProduct(product) {
8325
- setCookie(this.COOKIE_PRODUCT, JSON.stringify(product)); // 👈 NUEVO
8327
+ const cookieAttributesGeneral = GetCookieAttributes(this.ConfigService.environment?.environment ?? "");
8328
+ setCookie(this.COOKIE_PRODUCT, JSON.stringify(product), cookieAttributesGeneral); // 👈 NUEVO
8326
8329
  this.emitSelectedProductEvent(product);
8327
8330
  }
8328
8331
  listenMenuEvents() {
@@ -8333,7 +8336,8 @@ class GlobalMenuService {
8333
8336
  const { menuIsVisible } = event.detail ?? {};
8334
8337
  if (typeof menuIsVisible === "boolean") {
8335
8338
  this._isMenuVisible.set(menuIsVisible);
8336
- setCookie(this.COOKIE_MENU, String(menuIsVisible)); // 👈 NUEVO
8339
+ const cookieAttributesGeneral = GetCookieAttributes(this.ConfigService.environment?.environment ?? "");
8340
+ setCookie(this.COOKIE_MENU, String(menuIsVisible), cookieAttributesGeneral); // 👈 NUEVO
8337
8341
  }
8338
8342
  };
8339
8343
  onSelectedProductEvent = (event) => {
@@ -8344,7 +8348,8 @@ class GlobalMenuService {
8344
8348
  if (typeof product === "string" && typeof icon === "string" && typeof authClient === "string") {
8345
8349
  const normalized = { product, icon, productId: authClient };
8346
8350
  this._selectedProduct.set(normalized);
8347
- setCookie(this.COOKIE_PRODUCT, JSON.stringify(normalized)); // 👈 NUEVO
8351
+ const cookieAttributesGeneral = GetCookieAttributes(this.ConfigService.environment?.environment ?? "");
8352
+ setCookie(this.COOKIE_PRODUCT, JSON.stringify(normalized), cookieAttributesGeneral); // 👈 NUEVO
8348
8353
  }
8349
8354
  };
8350
8355
  emitMenuEvent(isVisible) {