@nemme/js-sdk 0.3.2 → 0.3.4

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.esm.js CHANGED
@@ -6116,7 +6116,7 @@ class Ns {
6116
6116
  }
6117
6117
  displayForm(e, t, r) {
6118
6118
  const a = document.createElement("div");
6119
- a.id = "nm", a.className = this.config.theme === "dark" || window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "", document.body.appendChild(a);
6119
+ a.id = "nm", document.body.appendChild(a);
6120
6120
  const s = on(a), i = we(
6121
6121
  Sn,
6122
6122
  { i18n: I },
@@ -6415,7 +6415,15 @@ class qe {
6415
6415
  /**
6416
6416
  * Create a new Nemme SDK client instance
6417
6417
  */
6418
- async init({ userIdentifier: e, debug: t = !1, batch: r, formConfig: a }) {
6418
+ async init({
6419
+ userIdentifier: e,
6420
+ debug: t = !1,
6421
+ batch: r,
6422
+ formConfig: a,
6423
+ deactivate: s = !1
6424
+ }) {
6425
+ if (s)
6426
+ return this.clientLogger.info("Nemme client deactivated and will stop initialization."), this.initialized = !0, this.clientLogger.configure({ enabled: !1 }), this;
6419
6427
  if (!e) throw new Error("userIdentifier is required parameter");
6420
6428
  this.userIdentifier = e, this.clientLogger.configure({
6421
6429
  enabled: t,
@@ -6425,13 +6433,13 @@ class qe {
6425
6433
  "X-User-Id": this.userIdentifier
6426
6434
  }, this.formConfig = a;
6427
6435
  try {
6428
- const s = await this.initializeSession();
6429
- await this.initializeManagers(s, r), this.initialized = !0, this.clientLogger.info("Nemme client initialized", {
6436
+ const i = await this.initializeSession();
6437
+ await this.initializeManagers(i, r), this.initialized = !0, this.clientLogger.info("Nemme client initialized", {
6430
6438
  clientKey: this.clientKey,
6431
6439
  userIdentifier: this.userIdentifier
6432
6440
  });
6433
- } catch (s) {
6434
- this.clientLogger.error("Error during initialization:", s);
6441
+ } catch (i) {
6442
+ this.clientLogger.error("Error during initialization:", i);
6435
6443
  }
6436
6444
  return this;
6437
6445
  }