buzzcasting-storage 2.10.0 → 2.10.2

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.
@@ -363,8 +363,8 @@ export declare enum STORAGE {
363
363
  export declare class Widget {
364
364
  private storageReader;
365
365
  private broadcastChannel;
366
+ private element;
366
367
  private query;
367
- private props;
368
368
  private listeners;
369
369
  /**
370
370
  * Main container for managing widgets and data updates
@@ -1,7 +1,7 @@
1
1
  var Ei = Object.defineProperty;
2
2
  var Oi = (v, o, d) => o in v ? Ei(v, o, { enumerable: !0, configurable: !0, writable: !0, value: d }) : v[o] = d;
3
3
  var P = (v, o, d) => (Oi(v, typeof o != "symbol" ? o + "" : o, d), d);
4
- const xi = "2.9.6";
4
+ const xi = "2.10.1";
5
5
  class ki {
6
6
  constructor(o) {
7
7
  P(this, "options");
@@ -4220,8 +4220,8 @@ class Li {
4220
4220
  constructor(o, d, m) {
4221
4221
  P(this, "storageReader");
4222
4222
  P(this, "broadcastChannel");
4223
+ P(this, "element");
4223
4224
  P(this, "query");
4224
- P(this, "props");
4225
4225
  P(this, "listeners");
4226
4226
  /**
4227
4227
  * Generic call to any query type
@@ -4304,7 +4304,7 @@ class Li {
4304
4304
  * @param modal IModal
4305
4305
  */
4306
4306
  P(this, "showModal", (o) => {
4307
- const d = { ...o.props, ...this.props };
4307
+ const d = Ii(this.element.attributes), m = { ...o.props, ...d };
4308
4308
  console.debug(
4309
4309
  "%cwidget",
4310
4310
  x.WIDGET,
@@ -4312,21 +4312,21 @@ class Li {
4312
4312
  o.showComponent,
4313
4313
  d.widget
4314
4314
  );
4315
- const m = new CustomEvent(ue.SHOW_MODAL, {
4315
+ const I = new CustomEvent(ue.SHOW_MODAL, {
4316
4316
  detail: {
4317
4317
  component: o.showComponent,
4318
- props: d
4318
+ props: m
4319
4319
  },
4320
4320
  bubbles: !0,
4321
4321
  cancelable: !0,
4322
4322
  composed: !0
4323
4323
  });
4324
- window.dispatchEvent(m);
4324
+ window.dispatchEvent(I);
4325
4325
  });
4326
4326
  var j;
4327
- m = typeof m < "u" ? m : "buzzcasting-slide", this.listeners = d;
4327
+ this.element = o, this.listeners = d, m = typeof m < "u" ? m : "buzzcasting-slide";
4328
4328
  let I;
4329
- I = { ...o.dataset }, delete I.hmr, I.slide = ((j = o.closest(m.toUpperCase())) == null ? void 0 : j.id) ?? `${m} not found`, I = nt(I), this.query = I, this.props = Ii(o.attributes);
4329
+ I = { ...o.dataset }, delete I.hmr, I.slide = ((j = o.closest(m.toUpperCase())) == null ? void 0 : j.id) ?? `${m} not found`, I = nt(I), this.query = I;
4330
4330
  const B = window.BuzzCasting.getOptions();
4331
4331
  this.storageReader = new Mi(B), this.broadcastChannel = new BroadcastChannel(I.slide), this.startListener();
4332
4332
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buzzcasting-storage",
3
3
  "type": "module",
4
- "version": "2.10.0",
4
+ "version": "2.10.2",
5
5
  "private": false,
6
6
  "author": {
7
7
  "name": "Mark Tamis, TouchFlows SAS",