aptechka 0.61.4 → 0.61.6
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.
|
@@ -2,7 +2,7 @@ export declare class BillboardStepButtonElement extends HTMLElement {
|
|
|
2
2
|
#private;
|
|
3
3
|
handleClick: ((event: Event) => boolean) | undefined;
|
|
4
4
|
constructor();
|
|
5
|
-
protected connectedCallback(): void
|
|
5
|
+
protected connectedCallback(): Promise<void>;
|
|
6
6
|
protected disconnectedCallback(): void;
|
|
7
7
|
}
|
|
8
8
|
declare global {
|
package/lib/billboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var Q=i=>{throw TypeError(i)};var G=(i,r,e)=>r.has(i)||Q("Cannot "+e);var t=(i,r,e)=>(G(i,r,"read from private field"),e?e.call(i):r.get(i)),s=(i,r,e)=>r.has(i)?Q("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),d=(i,r,e,n)=>(G(i,r,"write to private field"),n?n.call(i,e):r.set(i,e),e),b=(i,r,e)=>(G(i,r,"access private method"),e);var J=(i,r,e)=>new Promise((n,l)=>{var a=x=>{try{N(e.next(x))}catch(O){l(O)}},S=x=>{try{N(e.throw(x))}catch(O){l(O)}},N=x=>x.done?n(x.value):Promise.resolve(x.value).then(a,S);N((e=e.apply(i,r)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("../index-Cqw2NKev.cjs"),K=require("../dom-JBOkFLTh.cjs"),q=require("../css-property/index.cjs"),W=require("../events-KVanG9sR.cjs"),X=require("../gestures-C7gbKx11.cjs"),Y=require("../math-GDWEqu7y.cjs"),Z=require("../number-DyefJ5a1.cjs");var k,f,E,L,y,u,h,o,D,M,j,_,$,z,F;class H extends HTMLElement{constructor(){super(...arguments);s(this,o);s(this,k,new q.CSSProperty(this,"--loop",!0));s(this,f,new q.CSSProperty(this,"--autoplay",!1));s(this,E,new q.CSSProperty(this,"--swipe","x"));s(this,L);s(this,y,!1);s(this,u,[]);s(this,h,0);s(this,M,e=>{d(this,y,e.isIntersecting),t(this,y)?b(this,o,D).call(this):clearInterval(t(this,L))});s(this,j,()=>{clearInterval(t(this,L)),t(this,y)&&d(this,L,setInterval(t(this,z),parseFloat(t(this,f).current||"0")*1e3))});s(this,z,()=>{b(this,o,$).call(this,t(this,h)+1)});s(this,F,e=>{if(!t(this,E).current)return;let n=0;X.setupDrag(l=>{const a=e.x-l.x,S=e.y-l.y;t(this,E).current==="x"?Math.abs(a)>Math.abs(S)&&Math.abs(a)>10&&(n=Math.sign(a)):t(this,E).current==="y"&&Math.abs(S)>Math.abs(a)&&Math.abs(S)>10&&(n=Math.sign(S))},()=>{n&&this.shift(n)})})}get counter(){return t(this,h)}get loop(){return t(this,k)}get autoplay(){return t(this,f)}get swipe(){return t(this,E)}get itemElements(){return t(this,u)}addItem(e){t(this,u).push(e),b(this,o,_).call(this)}set(e){(!this.handleSet||this.handleSet(e))&&(b(this,o,$).call(this,e),b(this,o,D).call(this))}shift(e){this.set(t(this,h)+e)}connectedCallback(){var e;d(this,u,[...this.querySelectorAll(`[data-billboard-item${this.id?`="${this.id}"`:""}]`)]),(e=t(this,u)[0])==null||e.classList.add("current"),b(this,o,_).call(this),t(this,f).subscribe(n=>{n.current?(B.intersector.subscribe(this,t(this,M)),b(this,o,D).call(this)):(d(this,y,!0),B.intersector.unsubscribe(t(this,M)),clearInterval(t(this,L)),b(this,o,$).call(this,0))}),t(this,f).observe(),t(this,E).observe(),t(this,k).observe(),this.addEventListener("pointerdown",t(this,F))}disconnectedCallback(){t(this,f).unobserve(),t(this,E).unobserve(),t(this,k).unobserve(),B.intersector.unsubscribe(t(this,M)),clearInterval(t(this,L))}}k=new WeakMap,f=new WeakMap,E=new WeakMap,L=new WeakMap,y=new WeakMap,u=new WeakMap,h=new WeakMap,o=new WeakSet,D=function(){t(this,f).current!==!1&&t(this,j).call(this)},M=new WeakMap,j=new WeakMap,_=function(){this.classList.toggle("has-length",t(this,u).length>1),this.classList.toggle("start",t(this,h)===0),this.classList.toggle("end",t(this,h)===t(this,u).length-1)},$=function(e){const n=t(this,h);t(this,k).current?d(this,h,Z.loopNumber(e,t(this,u).length)):d(this,h,Y.clamp(e,0,t(this,u).length-1)),this.classList.remove("forward","backward"),t(this,h)-n>=0?this.classList.add("forward"):t(this,h)-n<0&&this.classList.add("backward"),t(this,u).forEach((l,a)=>{l.classList.remove("current","previous","next"),a===t(this,h)?l.classList.add("current"):a<t(this,h)?l.classList.add("previous"):a>t(this,h)&&l.classList.add("next")}),b(this,o,_).call(this),W.dispatchEvent(this,"billboardChange",{detail:{counter:t(this,h)}}),setTimeout(()=>{window.dispatchEvent(new Event("resize"))},0)},z=new WeakMap,F=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",H);var m,I,p,A,P;class R extends HTMLElement{constructor(){super(...arguments);s(this,m,null);s(this,I,null);s(this,p,[]);s(this,A,e=>{const n=e.currentTarget,l=t(this,p).findIndex(a=>a===n);l>=0&&t(this,m).set(l)});s(this,P,()=>{t(this,p).forEach((e,n)=>{n===t(this,m).counter?e.classList.add("current"):e.classList.remove("current")})})}connectedCallback(){return J(this,null,function*(){var e;if(d(this,m,K.findParentElement(this,H)),t(this,m)&&(yield customElements.whenDefined("e-billboard"),this.isConnected)){this.innerHTML="";const n=t(this,m).itemElements.length;d(this,I,document.createElement("div"));for(let l=0;l<n;l++){const a=document.createElement("button");t(this,p).push(a),t(this,I).appendChild(a)}this.appendChild(t(this,I)),t(this,p).forEach(l=>{l.addEventListener("click",t(this,A))}),(e=t(this,m))==null||e.addEventListener("billboardChange",t(this,P)),t(this,P).call(this)}})}disconnectedCallback(){var e;t(this,p).forEach(n=>{n.removeEventListener("click",t(this,A))}),(e=t(this,m))==null||e.removeEventListener("billboardChange",t(this,P)),this.innerHTML="",d(this,p,[])}}m=new WeakMap,I=new WeakMap,p=new WeakMap,A=new WeakMap,P=new WeakMap;B.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",R);var v,g,C;class U extends HTMLElement{constructor(){super();s(this,v,new q.CSSProperty(this,"--index",0));s(this,g,null);s(this,C,()=>{var e;t(this,v).current===((e=t(this,g))==null?void 0:e.counter)?this.classList.add("current"):this.classList.remove("current")});this.addEventListener("click",e=>{t(this,g)&&(!this.handleClick||this.handleClick(e))&&t(this,g).set(t(this,v).current)})}connectedCallback(){var e;this.tabIndex=0,d(this,g,K.findParentElement(this,H)),(e=t(this,g))==null||e.addEventListener("billboardChange",t(this,C)),customElements.whenDefined("e-billboard").then(()=>{this.isConnected&&t(this,C).call(this)}),t(this,v).subscribe(t(this,C)),t(this,v).observe()}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,v).unsubscribe(t(this,C)),t(this,v).unobserve(),(e=t(this,g))==null||e.removeEventListener("billboardChange",t(this,C))}}v=new WeakMap,g=new WeakMap,C=new WeakMap;B.isBrowser&&!customElements.get("e-billboard-set-button")&&customElements.define("e-billboard-set-button",U);var w,c,T;class V extends HTMLElement{constructor(){super();s(this,w,new q.CSSProperty(this,"--step",1));s(this,c,null);s(this,T,()=>{t(this,c)&&(!t(this,c).loop.current&&(t(this,c).counter===0&&t(this,w).current<=0||t(this,c).counter===t(this,c).itemElements.length-1&&t(this,w).current>=0)?this.setAttribute("disabled",""):this.removeAttribute("disabled"))});this.addEventListener("click",e=>{t(this,c)&&(!this.handleClick||this.handleClick(e))&&t(this,c).shift(t(this,w).current)})}connectedCallback(){return J(this,null,function*(){var e;yield customElements.whenDefined("e-billboard"),t(this,w).observe(),this.tabIndex=0,d(this,c,K.findParentElement(this,H)),(e=t(this,c))==null||e.addEventListener("billboardChange",t(this,T)),t(this,T).call(this)})}disconnectedCallback(){var e;this.removeAttribute("tabindex"),t(this,w).unobserve(),(e=t(this,c))==null||e.removeEventListener("billboardChange",t(this,T))}}w=new WeakMap,c=new WeakMap,T=new WeakMap;B.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",V);exports.BillboardBulletsElement=R;exports.BillboardElement=H;exports.BillboardSetButtonElement=U;exports.BillboardStepButtonElement=V;
|
package/lib/billboard/index.js
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
var
|
|
2
|
-
throw TypeError(
|
|
1
|
+
var U = (i) => {
|
|
2
|
+
throw TypeError(i);
|
|
3
3
|
};
|
|
4
|
-
var J = (
|
|
5
|
-
var t = (
|
|
6
|
-
var
|
|
7
|
-
var
|
|
4
|
+
var J = (i, r, e) => r.has(i) || U("Cannot " + e);
|
|
5
|
+
var t = (i, r, e) => (J(i, r, "read from private field"), e ? e.call(i) : r.get(i)), s = (i, r, e) => r.has(i) ? U("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, e), d = (i, r, e, n) => (J(i, r, "write to private field"), n ? n.call(i, e) : r.set(i, e), e), u = (i, r, e) => (J(i, r, "access private method"), e);
|
|
6
|
+
var K = (i, r, e) => new Promise((n, h) => {
|
|
7
|
+
var a = (x) => {
|
|
8
8
|
try {
|
|
9
|
-
j(e.next(
|
|
9
|
+
j(e.next(x));
|
|
10
10
|
} catch (G) {
|
|
11
11
|
h(G);
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, y = (x) => {
|
|
14
14
|
try {
|
|
15
|
-
j(e.throw(
|
|
15
|
+
j(e.throw(x));
|
|
16
16
|
} catch (G) {
|
|
17
17
|
h(G);
|
|
18
18
|
}
|
|
19
|
-
}, j = (
|
|
20
|
-
j((e = e.apply(
|
|
19
|
+
}, j = (x) => x.done ? n(x.value) : Promise.resolve(x.value).then(a, y);
|
|
20
|
+
j((e = e.apply(i, r)).next());
|
|
21
21
|
});
|
|
22
|
-
import { a as
|
|
23
|
-
import { b as
|
|
24
|
-
import { CSSProperty as
|
|
22
|
+
import { a as O, i as Q } from "../index-euf5anj6.js";
|
|
23
|
+
import { b as R } from "../dom-CVWzyXPH.js";
|
|
24
|
+
import { CSSProperty as A } from "../css-property/index.js";
|
|
25
25
|
import { d as V } from "../events-CsVF98U6.js";
|
|
26
26
|
import { s as W } from "../gestures-CcXV6fCp.js";
|
|
27
27
|
import { c as X } from "../math-BOBiC4TN.js";
|
|
28
28
|
import { l as Y } from "../number-CbdpfO3u.js";
|
|
29
|
-
var
|
|
29
|
+
var k, f, p, L, M, b, l, o, D, I, q, P, $, z, F;
|
|
30
30
|
class N extends HTMLElement {
|
|
31
31
|
constructor() {
|
|
32
32
|
super(...arguments);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
33
|
+
s(this, o);
|
|
34
|
+
s(this, k, new A(this, "--loop", !0));
|
|
35
|
+
s(this, f, new A(this, "--autoplay", !1));
|
|
36
|
+
s(this, p, new A(this, "--swipe", "x"));
|
|
37
|
+
s(this, L);
|
|
38
|
+
s(this, M, !1);
|
|
39
|
+
s(this, b, []);
|
|
40
|
+
s(this, l, 0);
|
|
41
|
+
s(this, I, (e) => {
|
|
42
|
+
d(this, M, e.isIntersecting), t(this, M) ? u(this, o, D).call(this) : clearInterval(t(this, L));
|
|
43
43
|
});
|
|
44
|
-
|
|
45
|
-
clearInterval(t(this, L)), t(this, M) &&
|
|
44
|
+
s(this, q, () => {
|
|
45
|
+
clearInterval(t(this, L)), t(this, M) && d(this, L, setInterval(
|
|
46
46
|
t(this, z),
|
|
47
47
|
parseFloat(t(this, f).current || "0") * 1e3
|
|
48
48
|
));
|
|
49
49
|
});
|
|
50
|
-
|
|
51
|
-
u(this,
|
|
50
|
+
s(this, z, () => {
|
|
51
|
+
u(this, o, $).call(this, t(this, l) + 1);
|
|
52
52
|
});
|
|
53
|
-
|
|
53
|
+
s(this, F, (e) => {
|
|
54
54
|
if (!t(this, p).current)
|
|
55
55
|
return;
|
|
56
|
-
let
|
|
56
|
+
let n = 0;
|
|
57
57
|
W(
|
|
58
58
|
(h) => {
|
|
59
|
-
const
|
|
60
|
-
t(this, p).current === "x" ? Math.abs(
|
|
59
|
+
const a = e.x - h.x, y = e.y - h.y;
|
|
60
|
+
t(this, p).current === "x" ? Math.abs(a) > Math.abs(y) && Math.abs(a) > 10 && (n = Math.sign(a)) : t(this, p).current === "y" && Math.abs(y) > Math.abs(a) && Math.abs(y) > 10 && (n = Math.sign(y));
|
|
61
61
|
},
|
|
62
62
|
() => {
|
|
63
|
-
|
|
63
|
+
n && this.shift(n);
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
});
|
|
@@ -69,7 +69,7 @@ class N extends HTMLElement {
|
|
|
69
69
|
return t(this, l);
|
|
70
70
|
}
|
|
71
71
|
get loop() {
|
|
72
|
-
return t(this,
|
|
72
|
+
return t(this, k);
|
|
73
73
|
}
|
|
74
74
|
get autoplay() {
|
|
75
75
|
return t(this, f);
|
|
@@ -78,42 +78,43 @@ class N extends HTMLElement {
|
|
|
78
78
|
return t(this, p);
|
|
79
79
|
}
|
|
80
80
|
get itemElements() {
|
|
81
|
-
return t(this,
|
|
81
|
+
return t(this, b);
|
|
82
82
|
}
|
|
83
83
|
addItem(e) {
|
|
84
|
-
t(this,
|
|
84
|
+
t(this, b).push(e), u(this, o, P).call(this);
|
|
85
85
|
}
|
|
86
86
|
set(e) {
|
|
87
|
-
(!this.handleSet || this.handleSet(e)) && (u(this,
|
|
87
|
+
(!this.handleSet || this.handleSet(e)) && (u(this, o, $).call(this, e), u(this, o, D).call(this));
|
|
88
88
|
}
|
|
89
89
|
shift(e) {
|
|
90
90
|
this.set(t(this, l) + e);
|
|
91
91
|
}
|
|
92
92
|
connectedCallback() {
|
|
93
93
|
var e;
|
|
94
|
-
|
|
94
|
+
d(this, b, [
|
|
95
95
|
...this.querySelectorAll(
|
|
96
96
|
`[data-billboard-item${this.id ? `="${this.id}"` : ""}]`
|
|
97
97
|
)
|
|
98
|
-
]), (e = t(this,
|
|
99
|
-
|
|
100
|
-
}), t(this, f).observe(), t(this, p).observe(), t(this,
|
|
98
|
+
]), (e = t(this, b)[0]) == null || e.classList.add("current"), u(this, o, P).call(this), t(this, f).subscribe((n) => {
|
|
99
|
+
n.current ? (O.subscribe(this, t(this, I)), u(this, o, D).call(this)) : (d(this, M, !0), O.unsubscribe(t(this, I)), clearInterval(t(this, L)), u(this, o, $).call(this, 0));
|
|
100
|
+
}), t(this, f).observe(), t(this, p).observe(), t(this, k).observe(), this.addEventListener("pointerdown", t(this, F));
|
|
101
101
|
}
|
|
102
102
|
disconnectedCallback() {
|
|
103
|
-
t(this, f).unobserve(), t(this, p).unobserve(), t(this,
|
|
103
|
+
t(this, f).unobserve(), t(this, p).unobserve(), t(this, k).unobserve(), O.unsubscribe(t(this, I)), clearInterval(t(this, L));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
k = new WeakMap(), f = new WeakMap(), p = new WeakMap(), L = new WeakMap(), M = new WeakMap(), b = new WeakMap(), l = new WeakMap(), o = new WeakSet(), D = function() {
|
|
107
107
|
t(this, f).current !== !1 && t(this, q).call(this);
|
|
108
|
-
},
|
|
109
|
-
this.classList.toggle("has-length", t(this,
|
|
108
|
+
}, I = new WeakMap(), q = new WeakMap(), P = function() {
|
|
109
|
+
this.classList.toggle("has-length", t(this, b).length > 1), this.classList.toggle("start", t(this, l) === 0), this.classList.toggle(
|
|
110
110
|
"end",
|
|
111
|
-
t(this, l) === t(this,
|
|
111
|
+
t(this, l) === t(this, b).length - 1
|
|
112
112
|
);
|
|
113
113
|
}, $ = function(e) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
const n = t(this, l);
|
|
115
|
+
t(this, k).current ? d(this, l, Y(e, t(this, b).length)) : d(this, l, X(e, 0, t(this, b).length - 1)), this.classList.remove("forward", "backward"), t(this, l) - n >= 0 ? this.classList.add("forward") : t(this, l) - n < 0 && this.classList.add("backward"), t(this, b).forEach((h, a) => {
|
|
116
|
+
h.classList.remove("current", "previous", "next"), a === t(this, l) ? h.classList.add("current") : a < t(this, l) ? h.classList.add("previous") : a > t(this, l) && h.classList.add("next");
|
|
117
|
+
}), u(this, o, P).call(this), V(this, "billboardChange", {
|
|
117
118
|
detail: {
|
|
118
119
|
counter: t(this, l)
|
|
119
120
|
}
|
|
@@ -122,36 +123,36 @@ w = new WeakMap(), f = new WeakMap(), p = new WeakMap(), L = new WeakMap(), M =
|
|
|
122
123
|
}, 0);
|
|
123
124
|
}, z = new WeakMap(), F = new WeakMap();
|
|
124
125
|
customElements.get("e-billboard") || customElements.define("e-billboard", N);
|
|
125
|
-
var m, B, E,
|
|
126
|
+
var m, B, E, H, S;
|
|
126
127
|
class Z extends HTMLElement {
|
|
127
128
|
constructor() {
|
|
128
129
|
super(...arguments);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const
|
|
130
|
+
s(this, m, null);
|
|
131
|
+
s(this, B, null);
|
|
132
|
+
s(this, E, []);
|
|
133
|
+
s(this, H, (e) => {
|
|
134
|
+
const n = e.currentTarget, h = t(this, E).findIndex((a) => a === n);
|
|
134
135
|
h >= 0 && t(this, m).set(h);
|
|
135
136
|
});
|
|
136
|
-
|
|
137
|
-
t(this, E).forEach((e,
|
|
138
|
-
|
|
137
|
+
s(this, S, () => {
|
|
138
|
+
t(this, E).forEach((e, n) => {
|
|
139
|
+
n === t(this, m).counter ? e.classList.add("current") : e.classList.remove("current");
|
|
139
140
|
});
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
143
|
connectedCallback() {
|
|
143
|
-
return
|
|
144
|
+
return K(this, null, function* () {
|
|
144
145
|
var e;
|
|
145
|
-
if (
|
|
146
|
+
if (d(this, m, R(this, N)), t(this, m) && (yield customElements.whenDefined("e-billboard"), this.isConnected)) {
|
|
146
147
|
this.innerHTML = "";
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
for (let h = 0; h <
|
|
150
|
-
const
|
|
151
|
-
t(this, E).push(
|
|
148
|
+
const n = t(this, m).itemElements.length;
|
|
149
|
+
d(this, B, document.createElement("div"));
|
|
150
|
+
for (let h = 0; h < n; h++) {
|
|
151
|
+
const a = document.createElement("button");
|
|
152
|
+
t(this, E).push(a), t(this, B).appendChild(a);
|
|
152
153
|
}
|
|
153
154
|
this.appendChild(t(this, B)), t(this, E).forEach((h) => {
|
|
154
|
-
h.addEventListener("click", t(this,
|
|
155
|
+
h.addEventListener("click", t(this, H));
|
|
155
156
|
}), (e = t(this, m)) == null || e.addEventListener(
|
|
156
157
|
"billboardChange",
|
|
157
158
|
t(this, S)
|
|
@@ -161,23 +162,23 @@ class Z extends HTMLElement {
|
|
|
161
162
|
}
|
|
162
163
|
disconnectedCallback() {
|
|
163
164
|
var e;
|
|
164
|
-
t(this, E).forEach((
|
|
165
|
-
|
|
165
|
+
t(this, E).forEach((n) => {
|
|
166
|
+
n.removeEventListener("click", t(this, H));
|
|
166
167
|
}), (e = t(this, m)) == null || e.removeEventListener(
|
|
167
168
|
"billboardChange",
|
|
168
169
|
t(this, S)
|
|
169
|
-
), this.innerHTML = "",
|
|
170
|
+
), this.innerHTML = "", d(this, E, []);
|
|
170
171
|
}
|
|
171
172
|
}
|
|
172
|
-
m = new WeakMap(), B = new WeakMap(), E = new WeakMap(),
|
|
173
|
-
|
|
173
|
+
m = new WeakMap(), B = new WeakMap(), E = new WeakMap(), H = new WeakMap(), S = new WeakMap();
|
|
174
|
+
Q && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", Z);
|
|
174
175
|
var v, g, C;
|
|
175
176
|
class _ extends HTMLElement {
|
|
176
177
|
constructor() {
|
|
177
178
|
super();
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
s(this, v, new A(this, "--index", 0));
|
|
180
|
+
s(this, g, null);
|
|
181
|
+
s(this, C, () => {
|
|
181
182
|
var e;
|
|
182
183
|
t(this, v).current === ((e = t(this, g)) == null ? void 0 : e.counter) ? this.classList.add("current") : this.classList.remove("current");
|
|
183
184
|
});
|
|
@@ -187,7 +188,7 @@ class _ extends HTMLElement {
|
|
|
187
188
|
}
|
|
188
189
|
connectedCallback() {
|
|
189
190
|
var e;
|
|
190
|
-
this.tabIndex = 0,
|
|
191
|
+
this.tabIndex = 0, d(this, g, R(this, N)), (e = t(this, g)) == null || e.addEventListener(
|
|
191
192
|
"billboardChange",
|
|
192
193
|
t(this, C)
|
|
193
194
|
), customElements.whenDefined("e-billboard").then(() => {
|
|
@@ -203,37 +204,39 @@ class _ extends HTMLElement {
|
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
206
|
v = new WeakMap(), g = new WeakMap(), C = new WeakMap();
|
|
206
|
-
|
|
207
|
-
var
|
|
207
|
+
Q && !customElements.get("e-billboard-set-button") && customElements.define("e-billboard-set-button", _);
|
|
208
|
+
var w, c, T;
|
|
208
209
|
class tt extends HTMLElement {
|
|
209
210
|
constructor() {
|
|
210
211
|
super();
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
t(this,
|
|
212
|
+
s(this, w, new A(this, "--step", 1));
|
|
213
|
+
s(this, c, null);
|
|
214
|
+
s(this, T, () => {
|
|
215
|
+
t(this, c) && (!t(this, c).loop.current && (t(this, c).counter === 0 && t(this, w).current <= 0 || t(this, c).counter === t(this, c).itemElements.length - 1 && t(this, w).current >= 0) ? this.setAttribute("disabled", "") : this.removeAttribute("disabled"));
|
|
215
216
|
});
|
|
216
217
|
this.addEventListener("click", (e) => {
|
|
217
|
-
t(this,
|
|
218
|
+
t(this, c) && (!this.handleClick || this.handleClick(e)) && t(this, c).shift(t(this, w).current);
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
221
|
connectedCallback() {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
"
|
|
224
|
-
|
|
225
|
-
|
|
222
|
+
return K(this, null, function* () {
|
|
223
|
+
var e;
|
|
224
|
+
yield customElements.whenDefined("e-billboard"), t(this, w).observe(), this.tabIndex = 0, d(this, c, R(this, N)), (e = t(this, c)) == null || e.addEventListener(
|
|
225
|
+
"billboardChange",
|
|
226
|
+
t(this, T)
|
|
227
|
+
), t(this, T).call(this);
|
|
228
|
+
});
|
|
226
229
|
}
|
|
227
230
|
disconnectedCallback() {
|
|
228
231
|
var e;
|
|
229
|
-
this.removeAttribute("tabindex"), t(this,
|
|
232
|
+
this.removeAttribute("tabindex"), t(this, w).unobserve(), (e = t(this, c)) == null || e.removeEventListener(
|
|
230
233
|
"billboardChange",
|
|
231
|
-
t(this,
|
|
234
|
+
t(this, T)
|
|
232
235
|
);
|
|
233
236
|
}
|
|
234
237
|
}
|
|
235
|
-
|
|
236
|
-
|
|
238
|
+
w = new WeakMap(), c = new WeakMap(), T = new WeakMap();
|
|
239
|
+
Q && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", tt);
|
|
237
240
|
export {
|
|
238
241
|
Z as BillboardBulletsElement,
|
|
239
242
|
N as BillboardElement,
|