aptechka 0.56.8 → 0.56.9

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.
@@ -1 +1 @@
1
- "use strict";var I=s=>{throw TypeError(s)};var p=(s,i,t)=>i.has(s)||I("Cannot "+t);var e=(s,i,t)=>(p(s,i,"read from private field"),t?t.call(s):i.get(s)),l=(s,i,t)=>i.has(s)?I("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),c=(s,i,t,r)=>(p(s,i,"write to private field"),r?r.call(s,t):i.set(s,t),t),m=(s,i,t)=>(p(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../attribute/index.cjs"),q=require("../index-Cqw2NKev.cjs"),z=require("../events-KVanG9sR.cjs"),H=require("../style-At6aDoqG.cjs");var d,n,f,h,E,u,o,x,A,y,v,M;class S{constructor(i,t){l(this,o);l(this,d,null);l(this,n,null);l(this,f,null);l(this,h,null);l(this,E);l(this,u,!1);l(this,A,()=>{e(this,u)?this.close():this.open()});l(this,y,i=>{e(this,u)&&!(i instanceof CustomEvent)&&(m(this,o,v).call(this,0,!0),m(this,o,v).call(this,e(this,o,x)))});t.firstElementChild instanceof HTMLElement&&t.lastElementChild instanceof HTMLElement?(c(this,d,i),c(this,n,t),c(this,f,t.firstElementChild),c(this,h,t.lastElementChild),e(this,h).style.overflow="hidden",e(this,d).axisAttribute.current==="y"?e(this,h).style.height="0px":e(this,h).style.width="0px",addEventListener("resize",e(this,y)),e(this,f).addEventListener("click",e(this,A)),e(this,n).hasAttribute("data-opened")&&this.open({skipTransition:!0})):i.removeItem(e(this,n))}get element(){return e(this,n)}destroy(){e(this,f)&&(e(this,n).classList.remove("opened","triggered"),e(this,n).removeAttribute("data-opened"),e(this,f).style.cursor="",m(this,o,v).call(this,void 0),removeEventListener("resize",e(this,y)),e(this,f).removeEventListener("click",e(this,A)),clearTimeout(e(this,E)))}open(i){i!=null&&i.skipTransition&&m(this,o,M).call(this),e(this,d).multipleAttribute.current||e(this,d).closeAll({exclude:e(this,n)}),c(this,u,!0),clearTimeout(e(this,E)),e(this,n).classList.add("triggered"),m(this,o,v).call(this,e(this,o,x)),setTimeout(()=>{e(this,n).classList.add("opened"),e(this,n).setAttribute("data-opened",""),c(this,E,setTimeout(()=>{window.dispatchEvent(new Event("resize"))},H.getElementTransitionDurationMS(e(this,h))))},0),z.dispatchEvent(this.element,"accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,u),element:e(this,n)}})}close(i){i!=null&&i.skipTransition&&m(this,o,M).call(this),clearTimeout(e(this,E)),c(this,u,!1),e(this,n).classList.remove("opened"),m(this,o,v).call(this,0),c(this,E,setTimeout(()=>{e(this,n).classList.remove("triggered"),window.dispatchEvent(new Event("resize"))},H.getElementTransitionDurationMS(e(this,h)))),z.dispatchEvent(this.element,"accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,u),element:e(this,n)}})}}d=new WeakMap,n=new WeakMap,f=new WeakMap,h=new WeakMap,E=new WeakMap,u=new WeakMap,o=new WeakSet,x=function(){return e(this,d).axisAttribute.current==="x"?e(this,h).scrollWidth:e(this,h).scrollHeight},A=new WeakMap,y=new WeakMap,v=function(i,t=!1){t&&(e(this,h).style.transition="all 0s",setTimeout(()=>{e(this,h).style.transition=""}));const r=e(this,d).axisAttribute.current==="x"?"width":"height";i!=null?e(this,h).style[r]=`${i}px`:e(this,h).style[r]=""},M=function(){e(this,h).style.transition="all 0s",setTimeout(()=>{e(this,h).style.transition=""},50)};var b,T,a,g,L,k;class O extends HTMLElement{constructor(){super();l(this,L);l(this,b,new C.Attribute(this,"axis","y"));l(this,T,new C.Attribute(this,"multiple",!1));l(this,a,[]);l(this,g,null);q.isBrowser&&c(this,g,new MutationObserver(t=>{t.forEach(r=>{r.removedNodes.forEach(w=>{w instanceof HTMLElement&&this.removeItem(w)}),r.addedNodes.forEach(w=>{w instanceof HTMLElement&&this.createItem(w)})})}))}get axisAttribute(){return e(this,b)}get multipleAttribute(){return e(this,T)}createItem(t){e(this,a).find(r=>r.element===t)||e(this,a).push(new S(this,t))}removeItem(t){c(this,a,e(this,a).filter(r=>{if(r.element!==t)return!0;r.destroy()}))}closeAll(t){e(this,a).forEach(r=>{(t==null?void 0:t.exclude)!==r.element&&r.close(t)})}openAll(t){e(this,a).forEach(r=>{(t==null?void 0:t.exclude)!==r.element&&r.open(t)})}connectedCallback(){e(this,b).observe(),e(this,T).observe(),e(this,g).observe(e(this,L,k),{childList:!0}),c(this,a,[...e(this,L,k).children].map(t=>{if(t instanceof HTMLElement)return new S(this,t)}).filter(t=>!!t))}disconnectedCallback(){e(this,b).unobserve(),e(this,T).unobserve(),e(this,g).disconnect()}}b=new WeakMap,T=new WeakMap,a=new WeakMap,g=new WeakMap,L=new WeakSet,k=function(){return this.shadowRoot?this.shadowRoot:this};q.isBrowser&&!customElements.get("e-accordion")&&customElements.define("e-accordion",O);exports.AccordionElement=O;
1
+ "use strict";var k=s=>{throw TypeError(s)};var p=(s,i,t)=>i.has(s)||k("Cannot "+t);var e=(s,i,t)=>(p(s,i,"read from private field"),t?t.call(s):i.get(s)),l=(s,i,t)=>i.has(s)?k("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),c=(s,i,t,r)=>(p(s,i,"write to private field"),r?r.call(s,t):i.set(s,t),t),m=(s,i,t)=>(p(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("../attribute/index.cjs"),q=require("../index-Cqw2NKev.cjs"),z=require("../events-KVanG9sR.cjs"),H=require("../style-At6aDoqG.cjs");var d,n,f,h,E,u,o,x,A,y,v,C;class S{constructor(i,t){l(this,o);l(this,d,null);l(this,n,null);l(this,f,null);l(this,h,null);l(this,E);l(this,u,!1);l(this,A,()=>{e(this,u)?this.close():this.open()});l(this,y,i=>{e(this,u)&&!(i instanceof CustomEvent)&&(m(this,o,v).call(this,0,!0),m(this,o,v).call(this,e(this,o,x)))});t.firstElementChild instanceof HTMLElement&&t.lastElementChild instanceof HTMLElement?(c(this,d,i),c(this,n,t),c(this,f,t.firstElementChild),c(this,h,t.lastElementChild),e(this,h).style.overflow="hidden",e(this,d).axisAttribute.current==="y"?e(this,h).style.height="0px":e(this,h).style.width="0px",addEventListener("resize",e(this,y)),e(this,f).addEventListener("click",e(this,A)),e(this,n).hasAttribute("data-opened")&&this.open({skipTransition:!0})):i.removeItem(e(this,n))}get element(){return e(this,n)}destroy(){e(this,f)&&(e(this,n).classList.remove("opened","triggered"),e(this,n).removeAttribute("data-opened"),e(this,f).style.cursor="",m(this,o,v).call(this,void 0),removeEventListener("resize",e(this,y)),e(this,f).removeEventListener("click",e(this,A)),clearTimeout(e(this,E)))}open(i){i!=null&&i.skipTransition&&m(this,o,C).call(this),e(this,d).multipleAttribute.current||e(this,d).closeAll({exclude:e(this,n)}),c(this,u,!0),clearTimeout(e(this,E)),e(this,n).classList.add("triggered"),m(this,o,v).call(this,e(this,o,x)),setTimeout(()=>{e(this,n).classList.add("opened"),e(this,n).setAttribute("data-opened",""),c(this,E,setTimeout(()=>{window.dispatchEvent(new CustomEvent("resize"))},H.getElementTransitionDurationMS(e(this,h))))},0),z.dispatchEvent(this.element,"accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,u),element:e(this,n)}})}close(i){i!=null&&i.skipTransition&&m(this,o,C).call(this),clearTimeout(e(this,E)),c(this,u,!1),e(this,n).classList.remove("opened"),m(this,o,v).call(this,0),c(this,E,setTimeout(()=>{e(this,n).classList.remove("triggered"),window.dispatchEvent(new CustomEvent("resize"))},H.getElementTransitionDurationMS(e(this,h)))),z.dispatchEvent(this.element,"accordionItemToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,u),element:e(this,n)}})}}d=new WeakMap,n=new WeakMap,f=new WeakMap,h=new WeakMap,E=new WeakMap,u=new WeakMap,o=new WeakSet,x=function(){return e(this,d).axisAttribute.current==="x"?e(this,h).scrollWidth:e(this,h).scrollHeight},A=new WeakMap,y=new WeakMap,v=function(i,t=!1){t&&(e(this,h).style.transition="all 0s",setTimeout(()=>{e(this,h).style.transition=""}));const r=e(this,d).axisAttribute.current==="x"?"width":"height";i!=null?e(this,h).style[r]=`${i}px`:e(this,h).style[r]=""},C=function(){e(this,h).style.transition="all 0s",setTimeout(()=>{e(this,h).style.transition=""},50)};var b,T,a,g,L,M;class O extends HTMLElement{constructor(){super();l(this,L);l(this,b,new I.Attribute(this,"axis","y"));l(this,T,new I.Attribute(this,"multiple",!1));l(this,a,[]);l(this,g,null);q.isBrowser&&c(this,g,new MutationObserver(t=>{t.forEach(r=>{r.removedNodes.forEach(w=>{w instanceof HTMLElement&&this.removeItem(w)}),r.addedNodes.forEach(w=>{w instanceof HTMLElement&&this.createItem(w)})})}))}get axisAttribute(){return e(this,b)}get multipleAttribute(){return e(this,T)}createItem(t){e(this,a).find(r=>r.element===t)||e(this,a).push(new S(this,t))}removeItem(t){c(this,a,e(this,a).filter(r=>{if(r.element!==t)return!0;r.destroy()}))}closeAll(t){e(this,a).forEach(r=>{(t==null?void 0:t.exclude)!==r.element&&r.close(t)})}openAll(t){e(this,a).forEach(r=>{(t==null?void 0:t.exclude)!==r.element&&r.open(t)})}connectedCallback(){e(this,b).observe(),e(this,T).observe(),e(this,g).observe(e(this,L,M),{childList:!0}),c(this,a,[...e(this,L,M).children].map(t=>{if(t instanceof HTMLElement)return new S(this,t)}).filter(t=>!!t))}disconnectedCallback(){e(this,b).unobserve(),e(this,T).unobserve(),e(this,g).disconnect()}}b=new WeakMap,T=new WeakMap,a=new WeakMap,g=new WeakMap,L=new WeakSet,M=function(){return this.shadowRoot?this.shadowRoot:this};q.isBrowser&&!customElements.get("e-accordion")&&customElements.define("e-accordion",O);exports.AccordionElement=O;
@@ -1,13 +1,13 @@
1
- var C = (s) => {
1
+ var I = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var x = (s, i, t) => i.has(s) || C("Cannot " + t);
5
- var e = (s, i, t) => (x(s, i, "read from private field"), t ? t.call(s) : i.get(s)), n = (s, i, t) => i.has(s) ? C("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), a = (s, i, t, r) => (x(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t), m = (s, i, t) => (x(s, i, "access private method"), t);
4
+ var x = (s, i, t) => i.has(s) || I("Cannot " + t);
5
+ var e = (s, i, t) => (x(s, i, "read from private field"), t ? t.call(s) : i.get(s)), n = (s, i, t) => i.has(s) ? I("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), a = (s, i, t, r) => (x(s, i, "write to private field"), r ? r.call(s, t) : i.set(s, t), t), m = (s, i, t) => (x(s, i, "access private method"), t);
6
6
  import { Attribute as M } from "../attribute/index.js";
7
7
  import { i as R } from "../index-euf5anj6.js";
8
8
  import { d as z } from "../events-CsVF98U6.js";
9
9
  import { g as H } from "../style-j2TwriJ_.js";
10
- var d, h, f, l, E, u, o, y, w, L, v, k;
10
+ var d, h, f, l, E, u, o, y, w, L, v, C;
11
11
  class S {
12
12
  constructor(i, t) {
13
13
  n(this, o);
@@ -32,9 +32,9 @@ class S {
32
32
  e(this, f) && (e(this, h).classList.remove("opened", "triggered"), e(this, h).removeAttribute("data-opened"), e(this, f).style.cursor = "", m(this, o, v).call(this, void 0), removeEventListener("resize", e(this, L)), e(this, f).removeEventListener("click", e(this, w)), clearTimeout(e(this, E)));
33
33
  }
34
34
  open(i) {
35
- i != null && i.skipTransition && m(this, o, k).call(this), e(this, d).multipleAttribute.current || e(this, d).closeAll({ exclude: e(this, h) }), a(this, u, !0), clearTimeout(e(this, E)), e(this, h).classList.add("triggered"), m(this, o, v).call(this, e(this, o, y)), setTimeout(() => {
35
+ i != null && i.skipTransition && m(this, o, C).call(this), e(this, d).multipleAttribute.current || e(this, d).closeAll({ exclude: e(this, h) }), a(this, u, !0), clearTimeout(e(this, E)), e(this, h).classList.add("triggered"), m(this, o, v).call(this, e(this, o, y)), setTimeout(() => {
36
36
  e(this, h).classList.add("opened"), e(this, h).setAttribute("data-opened", ""), a(this, E, setTimeout(() => {
37
- window.dispatchEvent(new Event("resize"));
37
+ window.dispatchEvent(new CustomEvent("resize"));
38
38
  }, H(e(this, l))));
39
39
  }, 0), z(this.element, "accordionItemToggle", {
40
40
  bubbles: !0,
@@ -46,8 +46,8 @@ class S {
46
46
  });
47
47
  }
48
48
  close(i) {
49
- i != null && i.skipTransition && m(this, o, k).call(this), clearTimeout(e(this, E)), a(this, u, !1), e(this, h).classList.remove("opened"), m(this, o, v).call(this, 0), a(this, E, setTimeout(() => {
50
- e(this, h).classList.remove("triggered"), window.dispatchEvent(new Event("resize"));
49
+ i != null && i.skipTransition && m(this, o, C).call(this), clearTimeout(e(this, E)), a(this, u, !1), e(this, h).classList.remove("opened"), m(this, o, v).call(this, 0), a(this, E, setTimeout(() => {
50
+ e(this, h).classList.remove("triggered"), window.dispatchEvent(new CustomEvent("resize"));
51
51
  }, H(e(this, l)))), z(this.element, "accordionItemToggle", {
52
52
  bubbles: !0,
53
53
  composed: !0,
@@ -66,12 +66,12 @@ d = new WeakMap(), h = new WeakMap(), f = new WeakMap(), l = new WeakMap(), E =
66
66
  }));
67
67
  const r = e(this, d).axisAttribute.current === "x" ? "width" : "height";
68
68
  i != null ? e(this, l).style[r] = `${i}px` : e(this, l).style[r] = "";
69
- }, k = function() {
69
+ }, C = function() {
70
70
  e(this, l).style.transition = "all 0s", setTimeout(() => {
71
71
  e(this, l).style.transition = "";
72
72
  }, 50);
73
73
  };
74
- var b, T, c, g, A, I;
74
+ var b, T, c, g, A, k;
75
75
  class N extends HTMLElement {
76
76
  constructor() {
77
77
  super();
@@ -117,9 +117,9 @@ class N extends HTMLElement {
117
117
  });
118
118
  }
119
119
  connectedCallback() {
120
- e(this, b).observe(), e(this, T).observe(), e(this, g).observe(e(this, A, I), {
120
+ e(this, b).observe(), e(this, T).observe(), e(this, g).observe(e(this, A, k), {
121
121
  childList: !0
122
- }), a(this, c, [...e(this, A, I).children].map((t) => {
122
+ }), a(this, c, [...e(this, A, k).children].map((t) => {
123
123
  if (t instanceof HTMLElement)
124
124
  return new S(this, t);
125
125
  }).filter((t) => !!t));
@@ -128,7 +128,7 @@ class N extends HTMLElement {
128
128
  e(this, b).unobserve(), e(this, T).unobserve(), e(this, g).disconnect();
129
129
  }
130
130
  }
131
- b = new WeakMap(), T = new WeakMap(), c = new WeakMap(), g = new WeakMap(), A = new WeakSet(), I = function() {
131
+ b = new WeakMap(), T = new WeakMap(), c = new WeakMap(), g = new WeakMap(), A = new WeakSet(), k = function() {
132
132
  return this.shadowRoot ? this.shadowRoot : this;
133
133
  };
134
134
  R && !customElements.get("e-accordion") && customElements.define("e-accordion", N);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.56.8",
3
+ "version": "0.56.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"