aptechka 0.56.5 → 0.56.7

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.
@@ -5,6 +5,7 @@ export interface BillboardEvents {
5
5
  }
6
6
  export declare class BillboardElement extends HTMLElement {
7
7
  #private;
8
+ handleSet: ((number: number) => boolean) | undefined;
8
9
  get counter(): number;
9
10
  get itemElements(): HTMLElement[];
10
11
  addItem(element: HTMLElement): void;
@@ -1,5 +1,6 @@
1
1
  export declare class BillboardSetButtonElement extends HTMLElement {
2
2
  #private;
3
+ handleClick: ((event: Event) => boolean) | undefined;
3
4
  constructor();
4
5
  protected connectedCallback(): void;
5
6
  protected disconnectedCallback(): void;
@@ -1,5 +1,6 @@
1
1
  export declare class BillboardStepButtonElement extends HTMLElement {
2
2
  #private;
3
+ handleClick: ((event: Event) => boolean) | undefined;
3
4
  constructor();
4
5
  protected connectedCallback(): void;
5
6
  protected disconnectedCallback(): void;
@@ -1 +1 @@
1
- "use strict";var F=s=>{throw TypeError(s)};var _=(s,r,t)=>r.has(s)||F("Cannot "+t);var e=(s,r,t)=>(_(s,r,"read from private field"),t?t.call(s):r.get(s)),i=(s,r,t)=>r.has(s)?F("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,t),a=(s,r,t,n)=>(_(s,r,"write to private field"),n?n.call(s,t):r.set(s,t),t),d=(s,r,t)=>(_(s,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../index-Cqw2NKev.cjs"),z=require("../dom-JBOkFLTh.cjs"),T=require("../css-property/index.cjs"),G=require("../events-KVanG9sR.cjs"),J=require("../gestures-C7gbKx11.cjs"),K=require("../number-DyefJ5a1.cjs");var v,p,g,C,o,b,l,j,M,w,q,P,A,H;class I extends HTMLElement{constructor(){super(...arguments);i(this,l);i(this,v,new T.CSSProperty(this,"--autoplay",!1));i(this,p,new T.CSSProperty(this,"--swipe","x"));i(this,g);i(this,C,!1);i(this,o,[]);i(this,b,0);i(this,w,t=>{a(this,C,t.isIntersecting),e(this,C)?d(this,l,M).call(this):clearInterval(e(this,g))});i(this,q,()=>{clearInterval(e(this,g)),e(this,C)&&a(this,g,setInterval(e(this,A),parseFloat(e(this,v).current||"0")*1e3))});i(this,A,()=>{d(this,l,P).call(this,e(this,b)+1)});i(this,H,t=>{if(!e(this,p).current)return;let n=0;J.setupDrag(h=>{const f=t.x-h.x,D=t.y-h.y;e(this,p).current==="x"?Math.abs(f)>Math.abs(D)&&(n=Math.sign(f)):e(this,p).current==="y"&&Math.abs(D)>Math.abs(f)&&(n=Math.sign(D))},()=>{this.shift(n)})})}get counter(){return e(this,b)}get itemElements(){return e(this,o)}addItem(t){e(this,o).push(t),d(this,l,j).call(this)}set(t){d(this,l,P).call(this,t),d(this,l,M).call(this)}shift(t){this.set(e(this,b)+t)}connectedCallback(){var t;a(this,o,[...this.querySelectorAll(`[data-billboard-item="${this.id||""}"]`)]),(t=e(this,o)[0])==null||t.classList.add("current"),d(this,l,j).call(this),e(this,v).subscribe(n=>{n.current?(x.intersector.subscribe(this,e(this,w)),d(this,l,M).call(this)):(a(this,C,!0),x.intersector.unsubscribe(e(this,w)),clearInterval(e(this,g)),d(this,l,P).call(this,0))}),e(this,v).observe(),e(this,p).observe(),this.addEventListener("pointerdown",e(this,H))}disconnectedCallback(){e(this,v).unobserve(),e(this,p).unobserve(),x.intersector.unsubscribe(e(this,w)),clearInterval(e(this,g))}}v=new WeakMap,p=new WeakMap,g=new WeakMap,C=new WeakMap,o=new WeakMap,b=new WeakMap,l=new WeakSet,j=function(){e(this,o).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},M=function(){e(this,v).current!==!1&&e(this,q).call(this)},w=new WeakMap,q=new WeakMap,P=function(t){a(this,b,K.loopNumber(t,e(this,o).length)),e(this,o).forEach((n,h)=>{h===e(this,b)?n.classList.add("current"):n.classList.remove("current")}),G.dispatchEvent(this,"billboardChange",{detail:{counter:e(this,b)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},A=new WeakMap,H=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",I);var c,u,k,B;class N extends HTMLElement{constructor(){super(...arguments);i(this,c,null);i(this,u,[]);i(this,k,t=>{const n=t.currentTarget,h=e(this,u).findIndex(f=>f===n);h>=0&&e(this,c).set(h)});i(this,B,()=>{e(this,u).forEach((t,n)=>{n===e(this,c).counter?t.classList.add("current"):t.classList.remove("current")})})}connectedCallback(){a(this,c,z.findParentElement(this,I)),e(this,c)&&customElements.whenDefined("e-billboard").then(()=>{var t;if(this.isConnected){const n=e(this,c).itemElements.length;for(let h=0;h<n;h++){const f=document.createElement("button");e(this,u).push(f),this.appendChild(f)}e(this,u).forEach(h=>{h.addEventListener("click",e(this,k))}),(t=e(this,c))==null||t.addEventListener("billboardChange",e(this,B)),e(this,B).call(this)}})}disconnectedCallback(){var t;e(this,u).forEach(n=>{n.removeEventListener("click",e(this,k))}),(t=e(this,c))==null||t.removeEventListener("billboardChange",e(this,B)),this.innerHTML="",a(this,u,[])}}c=new WeakMap,u=new WeakMap,k=new WeakMap,B=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",N);var m,E,L;class O extends HTMLElement{constructor(){super();i(this,m,new T.CSSProperty(this,"--index",0));i(this,E,null);i(this,L,()=>{var t;e(this,m).current===((t=e(this,E))==null?void 0:t.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",()=>{e(this,E)&&e(this,E).set(e(this,m).current)})}connectedCallback(){var t;this.tabIndex=0,a(this,E,z.findParentElement(this,I)),(t=e(this,E))==null||t.addEventListener("billboardChange",e(this,L)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&e(this,L).call(this)}),e(this,m).subscribe(e(this,L)),e(this,m).observe()}disconnectedCallback(){var t;this.removeAttribute("tabindex"),e(this,m).unsubscribe(e(this,L)),e(this,m).unobserve(),(t=e(this,E))==null||t.removeEventListener("billboardChange",e(this,L))}}m=new WeakMap,E=new WeakMap,L=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",O);var y,S;class $ extends HTMLElement{constructor(){super();i(this,y,new T.CSSProperty(this,"--step",1));i(this,S,null);this.addEventListener("click",()=>{e(this,S)&&e(this,S).shift(e(this,y).current)})}connectedCallback(){this.tabIndex=0,a(this,S,z.findParentElement(this,I)),e(this,y).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),e(this,y).unobserve()}}y=new WeakMap,S=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",$);exports.BillboardBulletsElement=N;exports.BillboardElement=I;exports.BillboardSetButtonElement=O;exports.BillboardStepButtonElement=$;
1
+ "use strict";var F=s=>{throw TypeError(s)};var _=(s,r,e)=>r.has(s)||F("Cannot "+e);var t=(s,r,e)=>(_(s,r,"read from private field"),e?e.call(s):r.get(s)),i=(s,r,e)=>r.has(s)?F("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),a=(s,r,e,n)=>(_(s,r,"write to private field"),n?n.call(s,e):r.set(s,e),e),d=(s,r,e)=>(_(s,r,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../index-Cqw2NKev.cjs"),z=require("../dom-JBOkFLTh.cjs"),T=require("../css-property/index.cjs"),G=require("../events-KVanG9sR.cjs"),J=require("../gestures-C7gbKx11.cjs"),K=require("../number-DyefJ5a1.cjs");var v,p,g,C,c,b,l,j,M,k,q,P,A,H;class I extends HTMLElement{constructor(){super(...arguments);i(this,l);i(this,v,new T.CSSProperty(this,"--autoplay",!1));i(this,p,new T.CSSProperty(this,"--swipe","x"));i(this,g);i(this,C,!1);i(this,c,[]);i(this,b,0);i(this,k,e=>{a(this,C,e.isIntersecting),t(this,C)?d(this,l,M).call(this):clearInterval(t(this,g))});i(this,q,()=>{clearInterval(t(this,g)),t(this,C)&&a(this,g,setInterval(t(this,A),parseFloat(t(this,v).current||"0")*1e3))});i(this,A,()=>{d(this,l,P).call(this,t(this,b)+1)});i(this,H,e=>{if(!t(this,p).current)return;let n=0;J.setupDrag(h=>{const E=e.x-h.x,D=e.y-h.y;t(this,p).current==="x"?Math.abs(E)>Math.abs(D)&&(n=Math.sign(E)):t(this,p).current==="y"&&Math.abs(D)>Math.abs(E)&&(n=Math.sign(D))},()=>{this.shift(n)})})}get counter(){return t(this,b)}get itemElements(){return t(this,c)}addItem(e){t(this,c).push(e),d(this,l,j).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(d(this,l,P).call(this,e),d(this,l,M).call(this))}shift(e){this.set(t(this,b)+e)}connectedCallback(){var e;a(this,c,[...this.querySelectorAll(`[data-billboard-item="${this.id||""}"]`)]),(e=t(this,c)[0])==null||e.classList.add("current"),d(this,l,j).call(this),t(this,v).subscribe(n=>{n.current?(x.intersector.subscribe(this,t(this,k)),d(this,l,M).call(this)):(a(this,C,!0),x.intersector.unsubscribe(t(this,k)),clearInterval(t(this,g)),d(this,l,P).call(this,0))}),t(this,v).observe(),t(this,p).observe(),this.addEventListener("pointerdown",t(this,H))}disconnectedCallback(){t(this,v).unobserve(),t(this,p).unobserve(),x.intersector.unsubscribe(t(this,k)),clearInterval(t(this,g))}}v=new WeakMap,p=new WeakMap,g=new WeakMap,C=new WeakMap,c=new WeakMap,b=new WeakMap,l=new WeakSet,j=function(){t(this,c).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},M=function(){t(this,v).current!==!1&&t(this,q).call(this)},k=new WeakMap,q=new WeakMap,P=function(e){a(this,b,K.loopNumber(e,t(this,c).length)),t(this,c).forEach((n,h)=>{h===t(this,b)?n.classList.add("current"):n.classList.remove("current")}),G.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,b)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},A=new WeakMap,H=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",I);var o,u,y,S;class N extends HTMLElement{constructor(){super(...arguments);i(this,o,null);i(this,u,[]);i(this,y,e=>{const n=e.currentTarget,h=t(this,u).findIndex(E=>E===n);h>=0&&t(this,o).set(h)});i(this,S,()=>{t(this,u).forEach((e,n)=>{n===t(this,o).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){a(this,o,z.findParentElement(this,I)),t(this,o)&&customElements.whenDefined("e-billboard").then(()=>{var e;if(this.isConnected){const n=t(this,o).itemElements.length;for(let h=0;h<n;h++){const E=document.createElement("button");t(this,u).push(E),this.appendChild(E)}t(this,u).forEach(h=>{h.addEventListener("click",t(this,y))}),(e=t(this,o))==null||e.addEventListener("billboardChange",t(this,S)),t(this,S).call(this)}})}disconnectedCallback(){var e;t(this,u).forEach(n=>{n.removeEventListener("click",t(this,y))}),(e=t(this,o))==null||e.removeEventListener("billboardChange",t(this,S)),this.innerHTML="",a(this,u,[])}}o=new WeakMap,u=new WeakMap,y=new WeakMap,S=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",N);var m,f,L;class O extends HTMLElement{constructor(){super();i(this,m,new T.CSSProperty(this,"--index",0));i(this,f,null);i(this,L,()=>{var e;t(this,m).current===((e=t(this,f))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,f)&&(!this.handleClick||this.handleClick(e))&&t(this,f).set(t(this,m).current)})}connectedCallback(){var e;this.tabIndex=0,a(this,f,z.findParentElement(this,I)),(e=t(this,f))==null||e.addEventListener("billboardChange",t(this,L)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,L).call(this)}),t(this,m).subscribe(t(this,L)),t(this,m).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,m).unsubscribe(t(this,L)),t(this,m).unobserve(),(e=t(this,f))==null||e.removeEventListener("billboardChange",t(this,L))}}m=new WeakMap,f=new WeakMap,L=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",O);var w,B;class $ extends HTMLElement{constructor(){super();i(this,w,new T.CSSProperty(this,"--step",1));i(this,B,null);this.addEventListener("click",e=>{t(this,B)&&(!this.handleClick||this.handleClick(e))&&t(this,B).shift(t(this,w).current)})}connectedCallback(){this.tabIndex=0,a(this,B,z.findParentElement(this,I)),t(this,w).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),t(this,w).unobserve()}}w=new WeakMap,B=new WeakMap;x.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",$);exports.BillboardBulletsElement=N;exports.BillboardElement=I;exports.BillboardSetButtonElement=O;exports.BillboardStepButtonElement=$;
@@ -1,45 +1,45 @@
1
1
  var j = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var q = (s, r, e) => r.has(s) || j("Cannot " + e);
5
- var t = (s, r, e) => (q(s, r, "read from private field"), e ? e.call(s) : r.get(s)), i = (s, r, e) => r.has(s) ? j("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, e), a = (s, r, e, n) => (q(s, r, "write to private field"), n ? n.call(s, e) : r.set(s, e), e), d = (s, r, e) => (q(s, r, "access private method"), e);
4
+ var q = (s, l, e) => l.has(s) || j("Cannot " + e);
5
+ var t = (s, l, e) => (q(s, l, "read from private field"), e ? e.call(s) : l.get(s)), i = (s, l, e) => l.has(s) ? j("Cannot add the same private member more than once") : l instanceof WeakSet ? l.add(s) : l.set(s, e), a = (s, l, e, n) => (q(s, l, "write to private field"), n ? n.call(s, e) : l.set(s, e), e), d = (s, l, e) => (q(s, l, "access private method"), e);
6
6
  import { a as z, i as N } from "../index-euf5anj6.js";
7
7
  import { b as $ } from "../dom-CVWzyXPH.js";
8
- import { CSSProperty as T } from "../css-property/index.js";
8
+ import { CSSProperty as S } from "../css-property/index.js";
9
9
  import { d as G } from "../events-CsVF98U6.js";
10
10
  import { s as J } from "../gestures-CcXV6fCp.js";
11
11
  import { l as K } from "../number-CbdpfO3u.js";
12
- var v, p, L, x, o, b, l, F, y, C, S, B, A, H;
12
+ var p, v, L, C, c, b, r, F, y, k, T, B, A, H;
13
13
  class D extends HTMLElement {
14
14
  constructor() {
15
15
  super(...arguments);
16
- i(this, l);
17
- i(this, v, new T(this, "--autoplay", !1));
18
- i(this, p, new T(this, "--swipe", "x"));
16
+ i(this, r);
17
+ i(this, p, new S(this, "--autoplay", !1));
18
+ i(this, v, new S(this, "--swipe", "x"));
19
19
  i(this, L);
20
- i(this, x, !1);
21
- i(this, o, []);
20
+ i(this, C, !1);
21
+ i(this, c, []);
22
22
  i(this, b, 0);
23
- i(this, C, (e) => {
24
- a(this, x, e.isIntersecting), t(this, x) ? d(this, l, y).call(this) : clearInterval(t(this, L));
23
+ i(this, k, (e) => {
24
+ a(this, C, e.isIntersecting), t(this, C) ? d(this, r, y).call(this) : clearInterval(t(this, L));
25
25
  });
26
- i(this, S, () => {
27
- clearInterval(t(this, L)), t(this, x) && a(this, L, setInterval(
26
+ i(this, T, () => {
27
+ clearInterval(t(this, L)), t(this, C) && a(this, L, setInterval(
28
28
  t(this, A),
29
- parseFloat(t(this, v).current || "0") * 1e3
29
+ parseFloat(t(this, p).current || "0") * 1e3
30
30
  ));
31
31
  });
32
32
  i(this, A, () => {
33
- d(this, l, B).call(this, t(this, b) + 1);
33
+ d(this, r, B).call(this, t(this, b) + 1);
34
34
  });
35
35
  i(this, H, (e) => {
36
- if (!t(this, p).current)
36
+ if (!t(this, v).current)
37
37
  return;
38
38
  let n = 0;
39
39
  J(
40
40
  (h) => {
41
41
  const E = e.x - h.x, P = e.y - h.y;
42
- t(this, p).current === "x" ? Math.abs(E) > Math.abs(P) && (n = Math.sign(E)) : t(this, p).current === "y" && Math.abs(P) > Math.abs(E) && (n = Math.sign(P));
42
+ t(this, v).current === "x" ? Math.abs(E) > Math.abs(P) && (n = Math.sign(E)) : t(this, v).current === "y" && Math.abs(P) > Math.abs(E) && (n = Math.sign(P));
43
43
  },
44
44
  () => {
45
45
  this.shift(n);
@@ -51,37 +51,37 @@ class D extends HTMLElement {
51
51
  return t(this, b);
52
52
  }
53
53
  get itemElements() {
54
- return t(this, o);
54
+ return t(this, c);
55
55
  }
56
56
  addItem(e) {
57
- t(this, o).push(e), d(this, l, F).call(this);
57
+ t(this, c).push(e), d(this, r, F).call(this);
58
58
  }
59
59
  set(e) {
60
- d(this, l, B).call(this, e), d(this, l, y).call(this);
60
+ (!this.handleSet || this.handleSet(e)) && (d(this, r, B).call(this, e), d(this, r, y).call(this));
61
61
  }
62
62
  shift(e) {
63
63
  this.set(t(this, b) + e);
64
64
  }
65
65
  connectedCallback() {
66
66
  var e;
67
- a(this, o, [
67
+ a(this, c, [
68
68
  ...this.querySelectorAll(
69
69
  `[data-billboard-item="${this.id || ""}"]`
70
70
  )
71
- ]), (e = t(this, o)[0]) == null || e.classList.add("current"), d(this, l, F).call(this), t(this, v).subscribe((n) => {
72
- n.current ? (z.subscribe(this, t(this, C)), d(this, l, y).call(this)) : (a(this, x, !0), z.unsubscribe(t(this, C)), clearInterval(t(this, L)), d(this, l, B).call(this, 0));
73
- }), t(this, v).observe(), t(this, p).observe(), this.addEventListener("pointerdown", t(this, H));
71
+ ]), (e = t(this, c)[0]) == null || e.classList.add("current"), d(this, r, F).call(this), t(this, p).subscribe((n) => {
72
+ n.current ? (z.subscribe(this, t(this, k)), d(this, r, y).call(this)) : (a(this, C, !0), z.unsubscribe(t(this, k)), clearInterval(t(this, L)), d(this, r, B).call(this, 0));
73
+ }), t(this, p).observe(), t(this, v).observe(), this.addEventListener("pointerdown", t(this, H));
74
74
  }
75
75
  disconnectedCallback() {
76
- t(this, v).unobserve(), t(this, p).unobserve(), z.unsubscribe(t(this, C)), clearInterval(t(this, L));
76
+ t(this, p).unobserve(), t(this, v).unobserve(), z.unsubscribe(t(this, k)), clearInterval(t(this, L));
77
77
  }
78
78
  }
79
- v = new WeakMap(), p = new WeakMap(), L = new WeakMap(), x = new WeakMap(), o = new WeakMap(), b = new WeakMap(), l = new WeakSet(), F = function() {
80
- t(this, o).length > 1 ? this.classList.add("has-length") : this.classList.remove("has-length");
79
+ p = new WeakMap(), v = new WeakMap(), L = new WeakMap(), C = new WeakMap(), c = new WeakMap(), b = new WeakMap(), r = new WeakSet(), F = function() {
80
+ t(this, c).length > 1 ? this.classList.add("has-length") : this.classList.remove("has-length");
81
81
  }, y = function() {
82
- t(this, v).current !== !1 && t(this, S).call(this);
83
- }, C = new WeakMap(), S = new WeakMap(), B = function(e) {
84
- a(this, b, K(e, t(this, o).length)), t(this, o).forEach((n, h) => {
82
+ t(this, p).current !== !1 && t(this, T).call(this);
83
+ }, k = new WeakMap(), T = new WeakMap(), B = function(e) {
84
+ a(this, b, K(e, t(this, c).length)), t(this, c).forEach((n, h) => {
85
85
  h === t(this, b) ? n.classList.add("current") : n.classList.remove("current");
86
86
  }), G(this, "billboardChange", {
87
87
  detail: {
@@ -92,37 +92,37 @@ v = new WeakMap(), p = new WeakMap(), L = new WeakMap(), x = new WeakMap(), o =
92
92
  }, 0);
93
93
  }, A = new WeakMap(), H = new WeakMap();
94
94
  customElements.get("e-billboard") || customElements.define("e-billboard", D);
95
- var c, u, M, k;
95
+ var o, u, M, x;
96
96
  class O extends HTMLElement {
97
97
  constructor() {
98
98
  super(...arguments);
99
- i(this, c, null);
99
+ i(this, o, null);
100
100
  i(this, u, []);
101
101
  i(this, M, (e) => {
102
102
  const n = e.currentTarget, h = t(this, u).findIndex((E) => E === n);
103
- h >= 0 && t(this, c).set(h);
103
+ h >= 0 && t(this, o).set(h);
104
104
  });
105
- i(this, k, () => {
105
+ i(this, x, () => {
106
106
  t(this, u).forEach((e, n) => {
107
- n === t(this, c).counter ? e.classList.add("current") : e.classList.remove("current");
107
+ n === t(this, o).counter ? e.classList.add("current") : e.classList.remove("current");
108
108
  });
109
109
  });
110
110
  }
111
111
  connectedCallback() {
112
- a(this, c, $(this, D)), t(this, c) && customElements.whenDefined("e-billboard").then(() => {
112
+ a(this, o, $(this, D)), t(this, o) && customElements.whenDefined("e-billboard").then(() => {
113
113
  var e;
114
114
  if (this.isConnected) {
115
- const n = t(this, c).itemElements.length;
115
+ const n = t(this, o).itemElements.length;
116
116
  for (let h = 0; h < n; h++) {
117
117
  const E = document.createElement("button");
118
118
  t(this, u).push(E), this.appendChild(E);
119
119
  }
120
120
  t(this, u).forEach((h) => {
121
121
  h.addEventListener("click", t(this, M));
122
- }), (e = t(this, c)) == null || e.addEventListener(
122
+ }), (e = t(this, o)) == null || e.addEventListener(
123
123
  "billboardChange",
124
- t(this, k)
125
- ), t(this, k).call(this);
124
+ t(this, x)
125
+ ), t(this, x).call(this);
126
126
  }
127
127
  });
128
128
  }
@@ -130,26 +130,26 @@ class O extends HTMLElement {
130
130
  var e;
131
131
  t(this, u).forEach((n) => {
132
132
  n.removeEventListener("click", t(this, M));
133
- }), (e = t(this, c)) == null || e.removeEventListener(
133
+ }), (e = t(this, o)) == null || e.removeEventListener(
134
134
  "billboardChange",
135
- t(this, k)
135
+ t(this, x)
136
136
  ), this.innerHTML = "", a(this, u, []);
137
137
  }
138
138
  }
139
- c = new WeakMap(), u = new WeakMap(), M = new WeakMap(), k = new WeakMap();
139
+ o = new WeakMap(), u = new WeakMap(), M = new WeakMap(), x = new WeakMap();
140
140
  N && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", O);
141
141
  var m, f, g;
142
142
  class Q extends HTMLElement {
143
143
  constructor() {
144
144
  super();
145
- i(this, m, new T(this, "--index", 0));
145
+ i(this, m, new S(this, "--index", 0));
146
146
  i(this, f, null);
147
147
  i(this, g, () => {
148
148
  var e;
149
149
  t(this, m).current === ((e = t(this, f)) == null ? void 0 : e.counter) ? this.classList.add("current") : this.classList.remove("current");
150
150
  });
151
- this.addEventListener("click", () => {
152
- t(this, f) && t(this, f).set(t(this, m).current);
151
+ this.addEventListener("click", (e) => {
152
+ t(this, f) && (!this.handleClick || this.handleClick(e)) && t(this, f).set(t(this, m).current);
153
153
  });
154
154
  }
155
155
  connectedCallback() {
@@ -175,10 +175,10 @@ var w, I;
175
175
  class R extends HTMLElement {
176
176
  constructor() {
177
177
  super();
178
- i(this, w, new T(this, "--step", 1));
178
+ i(this, w, new S(this, "--step", 1));
179
179
  i(this, I, null);
180
- this.addEventListener("click", () => {
181
- t(this, I) && t(this, I).shift(t(this, w).current);
180
+ this.addEventListener("click", (e) => {
181
+ t(this, I) && (!this.handleClick || this.handleClick(e)) && t(this, I).shift(t(this, w).current);
182
182
  });
183
183
  }
184
184
  connectedCallback() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.56.5",
3
+ "version": "0.56.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"