myio-js-library 0.1.44 → 0.1.45

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.
package/dist/index.cjs CHANGED
@@ -6910,12 +6910,13 @@ var AllReportModal = class {
6910
6910
  clientSecret: params.api.clientSecret,
6911
6911
  base: params.api.dataApiBaseUrl
6912
6912
  });
6913
- this.debugEnabled = !!params.debug;
6913
+ this.debugEnabled = params.debug === 1;
6914
6914
  this.debugLog("\u{1F680} AllReportModal initialized", {
6915
6915
  customerId: params.customerId,
6916
6916
  itemsListLength: params.itemsList?.length || 0,
6917
6917
  itemsList: params.itemsList,
6918
6918
  debugEnabled: this.debugEnabled,
6919
+ debugParam: params.debug,
6919
6920
  apiConfig: {
6920
6921
  hasIngestionToken: !!params.api.ingestionToken,
6921
6922
  dataApiBaseUrl: params.api.dataApiBaseUrl
@@ -6977,14 +6978,16 @@ var AllReportModal = class {
6977
6978
  return 0;
6978
6979
  }
6979
6980
  show() {
6981
+ this.debugLog("\u{1F3AD} Modal show() called - creating modal UI");
6980
6982
  this.modal = createModal({
6981
- title: "Relat\xF3rio Geral - Todas as Lojas",
6983
+ title: `Relat\xF3rio Geral - Todas as Lojas${this.debugEnabled ? " [DEBUG MODE]" : ""}`,
6982
6984
  width: "85vw",
6983
6985
  height: "90vh",
6984
6986
  theme: this.params.ui?.theme || "light"
6985
6987
  });
6986
6988
  this.renderContent();
6987
6989
  this.modal.on("close", () => {
6990
+ this.debugLog("\u{1F6AA} Modal closing - cleaning up resources");
6988
6991
  if (this.dateRangePicker) {
6989
6992
  this.dateRangePicker.destroy();
6990
6993
  this.dateRangePicker = null;
@@ -6996,6 +6999,7 @@ var AllReportModal = class {
6996
6999
  this.authClient.clearCache();
6997
7000
  this.emit("close");
6998
7001
  });
7002
+ this.debugLog("\u2705 Modal created and ready to use");
6999
7003
  return {
7000
7004
  close: () => this.modal.close(),
7001
7005
  on: (event, handler) => this.on(event, handler)
package/dist/index.d.cts CHANGED
@@ -663,7 +663,7 @@ interface OpenAllReportParams {
663
663
  api: BaseApiCfg;
664
664
  itemsList: StoreItem[];
665
665
  fetcher?: CustomerTotalsFetcher;
666
- debug?: boolean;
666
+ debug?: 1 | 0;
667
667
  }
668
668
  interface OpenSettingsParams {
669
669
  deviceId: string;
package/dist/index.js CHANGED
@@ -6843,12 +6843,13 @@ var AllReportModal = class {
6843
6843
  clientSecret: params.api.clientSecret,
6844
6844
  base: params.api.dataApiBaseUrl
6845
6845
  });
6846
- this.debugEnabled = !!params.debug;
6846
+ this.debugEnabled = params.debug === 1;
6847
6847
  this.debugLog("\u{1F680} AllReportModal initialized", {
6848
6848
  customerId: params.customerId,
6849
6849
  itemsListLength: params.itemsList?.length || 0,
6850
6850
  itemsList: params.itemsList,
6851
6851
  debugEnabled: this.debugEnabled,
6852
+ debugParam: params.debug,
6852
6853
  apiConfig: {
6853
6854
  hasIngestionToken: !!params.api.ingestionToken,
6854
6855
  dataApiBaseUrl: params.api.dataApiBaseUrl
@@ -6910,14 +6911,16 @@ var AllReportModal = class {
6910
6911
  return 0;
6911
6912
  }
6912
6913
  show() {
6914
+ this.debugLog("\u{1F3AD} Modal show() called - creating modal UI");
6913
6915
  this.modal = createModal({
6914
- title: "Relat\xF3rio Geral - Todas as Lojas",
6916
+ title: `Relat\xF3rio Geral - Todas as Lojas${this.debugEnabled ? " [DEBUG MODE]" : ""}`,
6915
6917
  width: "85vw",
6916
6918
  height: "90vh",
6917
6919
  theme: this.params.ui?.theme || "light"
6918
6920
  });
6919
6921
  this.renderContent();
6920
6922
  this.modal.on("close", () => {
6923
+ this.debugLog("\u{1F6AA} Modal closing - cleaning up resources");
6921
6924
  if (this.dateRangePicker) {
6922
6925
  this.dateRangePicker.destroy();
6923
6926
  this.dateRangePicker = null;
@@ -6929,6 +6932,7 @@ var AllReportModal = class {
6929
6932
  this.authClient.clearCache();
6930
6933
  this.emit("close");
6931
6934
  });
6935
+ this.debugLog("\u2705 Modal created and ready to use");
6932
6936
  return {
6933
6937
  close: () => this.modal.close(),
6934
6938
  on: (event, handler) => this.on(event, handler)
@@ -6832,12 +6832,13 @@
6832
6832
  clientSecret: params.api.clientSecret,
6833
6833
  base: params.api.dataApiBaseUrl
6834
6834
  });
6835
- this.debugEnabled = !!params.debug;
6835
+ this.debugEnabled = params.debug === 1;
6836
6836
  this.debugLog("\u{1F680} AllReportModal initialized", {
6837
6837
  customerId: params.customerId,
6838
6838
  itemsListLength: params.itemsList?.length || 0,
6839
6839
  itemsList: params.itemsList,
6840
6840
  debugEnabled: this.debugEnabled,
6841
+ debugParam: params.debug,
6841
6842
  apiConfig: {
6842
6843
  hasIngestionToken: !!params.api.ingestionToken,
6843
6844
  dataApiBaseUrl: params.api.dataApiBaseUrl
@@ -6899,14 +6900,16 @@
6899
6900
  return 0;
6900
6901
  }
6901
6902
  show() {
6903
+ this.debugLog("\u{1F3AD} Modal show() called - creating modal UI");
6902
6904
  this.modal = createModal({
6903
- title: "Relat\xF3rio Geral - Todas as Lojas",
6905
+ title: `Relat\xF3rio Geral - Todas as Lojas${this.debugEnabled ? " [DEBUG MODE]" : ""}`,
6904
6906
  width: "85vw",
6905
6907
  height: "90vh",
6906
6908
  theme: this.params.ui?.theme || "light"
6907
6909
  });
6908
6910
  this.renderContent();
6909
6911
  this.modal.on("close", () => {
6912
+ this.debugLog("\u{1F6AA} Modal closing - cleaning up resources");
6910
6913
  if (this.dateRangePicker) {
6911
6914
  this.dateRangePicker.destroy();
6912
6915
  this.dateRangePicker = null;
@@ -6918,6 +6921,7 @@
6918
6921
  this.authClient.clearCache();
6919
6922
  this.emit("close");
6920
6923
  });
6924
+ this.debugLog("\u2705 Modal created and ready to use");
6921
6925
  return {
6922
6926
  close: () => this.modal.close(),
6923
6927
  on: (event, handler) => this.on(event, handler)