@telia-ace/widget-conversation-flamingo 1.1.111-rc.8 → 1.1.111-rc.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/index.js +2 -2
  2. package/index.mjs +11 -11
  3. package/package.json +3 -3
package/index.js CHANGED
@@ -268,7 +268,7 @@
268
268
  * @license
269
269
  * Copyright 2021 Google LLC
270
270
  * SPDX-License-Identifier: BSD-3-Clause
271
- */let Ua=class extends Event{constructor(e,t,s){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.callback=t,this.subscribe=s??!1}};/**
271
+ */let Ua=class extends Event{constructor(e,t,s,r){super("context-request",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t,this.callback=s,this.subscribe=r??!1}};/**
272
272
  * @license
273
273
  * Copyright 2021 Google LLC
274
274
  * SPDX-License-Identifier: BSD-3-Clause
@@ -280,7 +280,7 @@
280
280
  * @license
281
281
  * Copyright 2021 Google LLC
282
282
  * SPDX-License-Identifier: BSD-3-Clause
283
- */let ja=class extends Event{constructor(e){super("context-provider",{bubbles:!0,composed:!0}),this.context=e}};class ws extends Ba{constructor(e,t,s){var r,i;super(t.context!==void 0?t.initialValue:s),this.onContextRequest=o=>{const a=o.composedPath()[0];o.context===this.context&&a!==this.host&&(o.stopPropagation(),this.addCallback(o.callback,a,o.subscribe))},this.onProviderRequest=o=>{const a=o.composedPath()[0];if(o.context!==this.context||a===this.host)return;const l=new Set;for(const[c,{consumerHost:h}]of this.subscriptions)l.has(c)||(l.add(c),h.dispatchEvent(new Ua(this.context,c,!0)));o.stopPropagation()},this.host=e,t.context!==void 0?this.context=t.context:this.context=t,this.attachListeners(),(i=(r=this.host).addController)==null||i.call(r,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new ja(this.context))}}/**
283
+ */let ja=class extends Event{constructor(e,t){super("context-provider",{bubbles:!0,composed:!0}),this.context=e,this.contextTarget=t}};class ws extends Ba{constructor(e,t,s){var r,i;super(t.context!==void 0?t.initialValue:s),this.onContextRequest=o=>{if(o.context!==this.context)return;const a=o.contextTarget??o.composedPath()[0];a!==this.host&&(o.stopPropagation(),this.addCallback(o.callback,a,o.subscribe))},this.onProviderRequest=o=>{if(o.context!==this.context||(o.contextTarget??o.composedPath()[0])===this.host)return;const a=new Set;for(const[l,{consumerHost:c}]of this.subscriptions)a.has(l)||(a.add(l),c.dispatchEvent(new Ua(this.context,c,l,!0)));o.stopPropagation()},this.host=e,t.context!==void 0?this.context=t.context:this.context=t,this.attachListeners(),(i=(r=this.host).addController)==null||i.call(r,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new ja(this.context,this.host))}}/**
284
284
  * @license
285
285
  * Copyright 2017 Google LLC
286
286
  * SPDX-License-Identifier: BSD-3-Clause
package/index.mjs CHANGED
@@ -3472,8 +3472,8 @@ var Ie = /* @__PURE__ */ ((n) => (n.Inline = "inline", n.Trigger = "trigger", n)
3472
3472
  * SPDX-License-Identifier: BSD-3-Clause
3473
3473
  */
3474
3474
  let Ia = class extends Event {
3475
- constructor(e, t, s) {
3476
- super("context-request", { bubbles: !0, composed: !0 }), this.context = e, this.callback = t, this.subscribe = s ?? !1;
3475
+ constructor(e, t, s, r) {
3476
+ super("context-request", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = t, this.callback = s, this.subscribe = r ?? !1;
3477
3477
  }
3478
3478
  };
3479
3479
  /**
@@ -3520,21 +3520,21 @@ class Ma {
3520
3520
  * SPDX-License-Identifier: BSD-3-Clause
3521
3521
  */
3522
3522
  let za = class extends Event {
3523
- constructor(e) {
3524
- super("context-provider", { bubbles: !0, composed: !0 }), this.context = e;
3523
+ constructor(e, t) {
3524
+ super("context-provider", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = t;
3525
3525
  }
3526
3526
  };
3527
3527
  class xs extends Ma {
3528
3528
  constructor(e, t, s) {
3529
3529
  var r, i;
3530
3530
  super(t.context !== void 0 ? t.initialValue : s), this.onContextRequest = (o) => {
3531
- const a = o.composedPath()[0];
3532
- o.context === this.context && a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
3531
+ if (o.context !== this.context) return;
3532
+ const a = o.contextTarget ?? o.composedPath()[0];
3533
+ a !== this.host && (o.stopPropagation(), this.addCallback(o.callback, a, o.subscribe));
3533
3534
  }, this.onProviderRequest = (o) => {
3534
- const a = o.composedPath()[0];
3535
- if (o.context !== this.context || a === this.host) return;
3536
- const l = /* @__PURE__ */ new Set();
3537
- for (const [c, { consumerHost: h }] of this.subscriptions) l.has(c) || (l.add(c), h.dispatchEvent(new Ia(this.context, c, !0)));
3535
+ if (o.context !== this.context || (o.contextTarget ?? o.composedPath()[0]) === this.host) return;
3536
+ const a = /* @__PURE__ */ new Set();
3537
+ for (const [l, { consumerHost: c }] of this.subscriptions) a.has(l) || (a.add(l), c.dispatchEvent(new Ia(this.context, c, l, !0)));
3538
3538
  o.stopPropagation();
3539
3539
  }, this.host = e, t.context !== void 0 ? this.context = t.context : this.context = t, this.attachListeners(), (i = (r = this.host).addController) == null || i.call(r, this);
3540
3540
  }
@@ -3542,7 +3542,7 @@ class xs extends Ma {
3542
3542
  this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
3543
3543
  }
3544
3544
  hostConnected() {
3545
- this.host.dispatchEvent(new za(this.context));
3545
+ this.host.dispatchEvent(new za(this.context, this.host));
3546
3546
  }
3547
3547
  }
3548
3548
  /**
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-conversation-flamingo",
3
- "version": "1.1.111-rc.8",
3
+ "version": "1.1.111-rc.9",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
7
7
  "dependencies": {
8
8
  "lit": "^3.0.2",
9
- "@lit-labs/motion": "^1.0.4",
9
+ "@lit-labs/motion": "^1.0.8",
10
10
  "@teliads/icons": "^8.4.0",
11
11
  "@teliads/components": "^22.1.1",
12
- "@telia-ace/widget-core-flamingo": "1.1.111-rc.8",
12
+ "@telia-ace/widget-core-flamingo": "1.1.111-rc.9",
13
13
  "lit-html": "^3.0.2",
14
14
  "rxjs": "^7.8.1",
15
15
  "marked": "^15.0.2"