wj-elements 0.1.4 → 0.1.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.
Files changed (89) hide show
  1. package/package.json +1 -1
  2. package/dist/dark.css +0 -1
  3. package/dist/light.css +0 -1
  4. package/dist/localize-DVuO3S17.js +0 -43
  5. package/dist/popup.element-Dj9j__Dh.js +0 -1068
  6. package/dist/router-links-FtZbFUto.js +0 -146
  7. package/dist/styles.css +0 -1
  8. package/dist/wje-accordion-item.js +0 -88
  9. package/dist/wje-accordion.js +0 -79
  10. package/dist/wje-animation.js +0 -121
  11. package/dist/wje-aside.js +0 -55
  12. package/dist/wje-avatar.js +0 -74
  13. package/dist/wje-badge.js +0 -48
  14. package/dist/wje-breadcrumb.js +0 -148
  15. package/dist/wje-breadcrumbs.js +0 -67
  16. package/dist/wje-button-group.js +0 -78
  17. package/dist/wje-button.js +0 -177
  18. package/dist/wje-card-content.js +0 -48
  19. package/dist/wje-card-controls.js +0 -48
  20. package/dist/wje-card-header.js +0 -47
  21. package/dist/wje-card-subtitle.js +0 -55
  22. package/dist/wje-card-title.js +0 -55
  23. package/dist/wje-card.js +0 -48
  24. package/dist/wje-carousel-item.js +0 -33
  25. package/dist/wje-carousel.js +0 -177
  26. package/dist/wje-checkbox.js +0 -104
  27. package/dist/wje-chip.js +0 -32
  28. package/dist/wje-col.js +0 -27
  29. package/dist/wje-color-picker.js +0 -953
  30. package/dist/wje-container.js +0 -57
  31. package/dist/wje-copy-button.js +0 -164
  32. package/dist/wje-dialog.js +0 -86
  33. package/dist/wje-divider.js +0 -53
  34. package/dist/wje-dropdown.js +0 -68
  35. package/dist/wje-element.js +0 -453
  36. package/dist/wje-fetchAndParseCSS.js +0 -40
  37. package/dist/wje-file-upload-item.js +0 -115
  38. package/dist/wje-file-upload.js +0 -297
  39. package/dist/wje-footer.js +0 -56
  40. package/dist/wje-form.js +0 -28
  41. package/dist/wje-format-digital.js +0 -85
  42. package/dist/wje-grid.js +0 -28
  43. package/dist/wje-header.js +0 -58
  44. package/dist/wje-icon-picker.js +0 -221
  45. package/dist/wje-icon.js +0 -117
  46. package/dist/wje-img-comparer.js +0 -111
  47. package/dist/wje-img.js +0 -58
  48. package/dist/wje-infinite-scroll.js +0 -193
  49. package/dist/wje-inline-edit.js +0 -120
  50. package/dist/wje-input-file.js +0 -85
  51. package/dist/wje-input.js +0 -240
  52. package/dist/wje-item.js +0 -45
  53. package/dist/wje-label.js +0 -67
  54. package/dist/wje-list.js +0 -53
  55. package/dist/wje-main.js +0 -56
  56. package/dist/wje-masonry.js +0 -218
  57. package/dist/wje-master.js +0 -342
  58. package/dist/wje-menu-button.js +0 -65
  59. package/dist/wje-menu-item.js +0 -192
  60. package/dist/wje-menu-label.js +0 -57
  61. package/dist/wje-menu.js +0 -74
  62. package/dist/wje-option.js +0 -99
  63. package/dist/wje-options.js +0 -63
  64. package/dist/wje-popup.js +0 -5
  65. package/dist/wje-progress-bar.js +0 -145
  66. package/dist/wje-radio-group.js +0 -101
  67. package/dist/wje-radio.js +0 -46
  68. package/dist/wje-rate.js +0 -260
  69. package/dist/wje-relative-time.js +0 -85
  70. package/dist/wje-route.js +0 -28
  71. package/dist/wje-router-link.js +0 -64
  72. package/dist/wje-router-outlet.js +0 -127
  73. package/dist/wje-routerx.js +0 -1088
  74. package/dist/wje-row.js +0 -58
  75. package/dist/wje-select.js +0 -240
  76. package/dist/wje-slider.js +0 -177
  77. package/dist/wje-split-view.js +0 -112
  78. package/dist/wje-store.js +0 -192
  79. package/dist/wje-tab-group.js +0 -105
  80. package/dist/wje-tab-panel.js +0 -52
  81. package/dist/wje-tab.js +0 -59
  82. package/dist/wje-textarea.js +0 -116
  83. package/dist/wje-thumbnail.js +0 -64
  84. package/dist/wje-toast.js +0 -76
  85. package/dist/wje-toggle.js +0 -94
  86. package/dist/wje-toolbar-action.js +0 -63
  87. package/dist/wje-toolbar.js +0 -61
  88. package/dist/wje-tooltip.js +0 -105
  89. package/dist/wje-visually-hidden.js +0 -56
package/dist/wje-rate.js DELETED
@@ -1,260 +0,0 @@
1
- var u = Object.defineProperty;
2
- var d = (r, o, e) => o in r ? u(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
3
- var n = (r, o, e) => (d(r, typeof o != "symbol" ? o + "" : o, e), e);
4
- import v from "./wje-element.js";
5
- const p = ":host{--wje-rate-gap: .25rem;display:flex}.native-rate{position:relative;display:flex;gap:var(--wje-rate-gap)}.wje-rate-icon{position:relative;cursor:pointer}.selected{color:var(--wje-color-danger)}:host(:not([readonly])) .wje-rate-icon:hover{transform:scale(1.2)}.half wje-icon:first-child{color:#fff}.half wje-icon:last-child{color:currentColor;position:absolute;top:0;left:0}:host([disabled]) .native-rate{pointer-events:none;opacity:.5}";
6
- class c extends v {
7
- /**
8
- * Creates an instance of Rate.
9
- *
10
- * @constructor
11
- */
12
- constructor() {
13
- super();
14
- n(this, "className", "Rate");
15
- /**
16
- * Event handler for the mouse enter event.
17
- *
18
- * @param {Event} e - The event.
19
- */
20
- n(this, "onMouseEnter", (e) => {
21
- e.preventDefault(), this.hoverValue = this.getValueFromXPosition(e.clientX), this.changeRate();
22
- });
23
- /**
24
- * Event handler for the mouse leave event.
25
- *
26
- * @param {Event} e - The event.
27
- */
28
- n(this, "onMouseLeave", (e) => {
29
- e.preventDefault(), this.hoverValue = 0, this.changeRate();
30
- });
31
- /**
32
- * Event handler for the mouse move event.
33
- *
34
- * @param {Event} e - The event.
35
- */
36
- n(this, "onMouseMove", (e) => {
37
- e.preventDefault();
38
- let i = this.getValueFromXPosition(e.clientX);
39
- i != this.hoverValue && (this.hoverValue = i, this.changeRate());
40
- });
41
- /**
42
- * Event handler for the touch start event.
43
- *
44
- * @param {Event} e - The event.
45
- */
46
- n(this, "onTouchStart", (e) => {
47
- e.preventDefault(), this.hoverValue = this.getValueFromXPosition(e.touches[0].clientX), this.changeRate();
48
- });
49
- /**
50
- * Event handler for the touch end event.
51
- *
52
- * @param {Event} e - The event.
53
- */
54
- n(this, "onTouchEnd", (e) => {
55
- e.preventDefault(), this.hoverValue = 0, this.changeRate();
56
- });
57
- /**
58
- * Event handler for the touch move event.
59
- *
60
- * @param {Event} e - The event.
61
- */
62
- n(this, "onTouchMove", (e) => {
63
- e.preventDefault(), this.hoverValue = this.getValueFromXPosition(e.touches[0].clientX), this.changeRate();
64
- });
65
- /**
66
- * Event handler for the click event.
67
- *
68
- * @param {Event} e - The event.
69
- */
70
- n(this, "onClick", (e) => {
71
- e.preventDefault(), this.value = +this.hoverValue;
72
- });
73
- }
74
- /**
75
- * Sets the precision of the rating component.
76
- *
77
- * @param {number} value - The value to set.
78
- */
79
- set precision(e) {
80
- this.setAttribute("precision", e);
81
- }
82
- /**
83
- * Gets the precision of the rating component.
84
- *
85
- * @returns {number} The value of the precision.
86
- */
87
- get precision() {
88
- return this.hasAttribute("precision") ? +this.getAttribute("precision") : 1;
89
- }
90
- /**
91
- * Sets the maximum value of the rating component.
92
- *
93
- * @param {number} value - The value to set.
94
- */
95
- set max(e) {
96
- this.setAttribute("max", e);
97
- }
98
- /**
99
- * Gets the maximum value of the rating component.
100
- *
101
- * @returns {number} The value of the maximum value.
102
- */
103
- get max() {
104
- return this.hasAttribute("icons") ? this.icons.length : +this.getAttribute("max");
105
- }
106
- /**
107
- * Sets the icons of the rating component.
108
- *
109
- * @param {Array<string>} value - The value to set.
110
- */
111
- set icons(e) {
112
- return e;
113
- }
114
- /**
115
- * Gets the icons of the rating component.
116
- *
117
- * @returns {Array<string>} The value of the icons.
118
- */
119
- get icons() {
120
- return this.hasAttribute("icons") ? JSON.parse(this.getAttribute("icons").replace(/'/g, '"')) : ["star-filled"];
121
- }
122
- /**
123
- * Sets the value of the rating component.
124
- *
125
- * @param {number} value - The value to set.
126
- */
127
- set value(e) {
128
- this.setAttribute("value", e);
129
- }
130
- /**
131
- * Gets the value of the rating component.
132
- *
133
- * @returns {number} The value of the value.
134
- */
135
- get value() {
136
- return this.hasAttribute("value") ? +this.getAttribute("value") : 0;
137
- }
138
- /**
139
- * Returns the CSS styles for the component.
140
- *
141
- * @static
142
- * @returns {CSSStyleSheet}
143
- */
144
- static get cssStyleSheet() {
145
- return p;
146
- }
147
- /**
148
- * Returns the list of attributes to observe for changes.
149
- *
150
- * @static
151
- * @returns {Array<string>}
152
- */
153
- static get observedAttributes() {
154
- return ["is-hover"];
155
- }
156
- /**
157
- * Called when an attribute changes.
158
- *
159
- * @param {string} name - The name of the attribute.
160
- * @param {string} old - The old value of the attribute.
161
- * @param {string} newName - The new value of the attribute.
162
- */
163
- attributeChangedCallback(e, i, t) {
164
- }
165
- /**
166
- * Sets up the attributes for the component.
167
- */
168
- setupAttributes() {
169
- this.isShadowRoot = "open";
170
- }
171
- /**
172
- * Draws the component.
173
- *
174
- * @param {Object} context - The context for drawing.
175
- * @param {Object} store - The store for drawing.
176
- * @param {Object} params - The parameters for drawing.
177
- * @returns {DocumentFragment}
178
- */
179
- draw(e, i, t) {
180
- let a = document.createDocumentFragment(), s = document.createElement("div");
181
- if (s.setAttribute("part", "native"), s.classList.add("native-rate"), this.native = s, this.hasAttribute("icons")) {
182
- let h = this.icons;
183
- for (let l = 0; l < h.length; l++)
184
- s.appendChild(this.createIcons(l));
185
- } else
186
- for (let h = 0; h < this.max; h++)
187
- s.appendChild(this.createIcons(h));
188
- return this.changeRate(), a.appendChild(s), a;
189
- }
190
- /**
191
- * Adds event listeners after the component is drawn.
192
- */
193
- afterDraw() {
194
- this.hasAttribute("disabled") || this.hasAttribute("readonly") || (this.addEventListener("mouseenter", this.onMouseEnter), this.addEventListener("mouseleave", this.onMouseLeave), this.addEventListener("mousemove", this.onMouseMove), this.addEventListener("touchstart", this.onTouchStart), this.addEventListener("touchend", this.onTouchEnd), this.addEventListener("touchmove", this.onTouchMove), this.addEventListener("click", this.onClick));
195
- }
196
- /**
197
- * Creates the icons for the rating component.
198
- *
199
- * @param {number} i - The index of the icon.
200
- * @returns {Element} The icon element.
201
- */
202
- createIcons(e) {
203
- let i = document.createElement("div");
204
- i.classList.add("wje-rate-icon");
205
- let t = this.getIcons(e);
206
- if (i.appendChild(t), this.value > e && this.value < e + 1) {
207
- let a = t.cloneNode(!0);
208
- i.appendChild(a);
209
- }
210
- return i;
211
- }
212
- /**
213
- * Changes the rate of the rating component.
214
- */
215
- changeRate() {
216
- const e = this.native.children, i = this.value !== this.hoverValue && this.hoverValue !== 0 && this.hoverValue !== void 0 ? this.hoverValue : this.value;
217
- for (let t = 0; t < e.length; t++)
218
- if (e[t].classList.remove("selected", "hovered"), e[t].children.length > 1 && (e[t].classList.remove("half"), e[t].querySelector("wje-icon:first-child").removeAttribute("style"), e[t].querySelector("wje-icon:last-child").remove()), t < i && e[t].classList.add("selected"), i > t && i < t + 1 && e[t].children.length === 1) {
219
- let a = e[t].querySelector("wje-icon").cloneNode(!0);
220
- e[t].appendChild(a);
221
- let s = (i - t) * 100;
222
- e[t].classList.add("half"), e[t].querySelector("wje-icon:first-child").style.clipPath = `inset(0 0 0 ${s}%)`, e[t].querySelector("wje-icon:last-child").style.clipPath = `inset(0 ${s}% 0 0)`;
223
- }
224
- }
225
- /**
226
- * Returns the icons for the rating component.
227
- *
228
- * @param {number} index - The index of the icon.
229
- * @returns {Element} The icon element.
230
- */
231
- getIcons(e) {
232
- let i = document.createElement("wje-icon");
233
- return i.setAttribute("name", this.max ? this.icons[0] : this.icons[e]), i;
234
- }
235
- /**
236
- * Returns the value from the x position.
237
- *
238
- * @param {number} coordinate - The x coordinate.
239
- * @returns {number} The value.
240
- */
241
- getValueFromXPosition(e) {
242
- const { left: i, right: t, width: a } = this.native.getBoundingClientRect(), s = this.roundToPrecision((e - i) / a * this.max, this.precision);
243
- return Math.min(Math.max(s, 0), this.max);
244
- }
245
- /**
246
- * Rounds a number to the given precision.
247
- *
248
- * @param {number} numberToRound - The number to round.
249
- * @param {number} precision - The precision.
250
- * @returns {number} The rounded number.
251
- */
252
- roundToPrecision(e, i = 0.5) {
253
- const t = 1 / i;
254
- return Math.ceil(e * t) / t;
255
- }
256
- }
257
- c.define("wje-rate", c);
258
- export {
259
- c as default
260
- };
@@ -1,85 +0,0 @@
1
- var h = Object.defineProperty;
2
- var v = (n, i, e) => i in n ? h(n, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[i] = e;
3
- var d = (n, i, e) => (v(n, typeof i != "symbol" ? i + "" : i, e), e);
4
- import f from "./wje-element.js";
5
- import { L as p } from "./localize-DVuO3S17.js";
6
- class l extends f {
7
- /**
8
- * Creates an instance of RelativeTime.
9
- *
10
- * @constructor
11
- */
12
- constructor() {
13
- super();
14
- d(this, "className", "RelativeTime");
15
- this.localizer = new p(this);
16
- }
17
- /**
18
- * Gets the ISO date of the relative time component.
19
- *
20
- * @returns {string} The ISO date.
21
- */
22
- get dateISO() {
23
- let e = /* @__PURE__ */ new Date(), t = this.getAttribute("date");
24
- return this.hasAttribute("date") && (this.isISODate(t) ? t = t : t = +t * 1e3, e = new Date(t)), e.toISOString();
25
- }
26
- /**
27
- * Returns the list of attributes to observe for changes.
28
- *
29
- * @static
30
- * @returns {Array<string>}
31
- */
32
- static get observedAttributes() {
33
- return [""];
34
- }
35
- /**
36
- * Sets up the attributes for the component.
37
- */
38
- setupAttributes() {
39
- this.isShadowRoot = "open";
40
- }
41
- /**
42
- * Draws the component.
43
- *
44
- * @param {Object} context - The context for drawing.
45
- * @param {Object} store - The store for drawing.
46
- * @param {Object} params - The parameters for drawing.
47
- * @returns {DocumentFragment}
48
- */
49
- draw(e, t, u) {
50
- let r = document.createDocumentFragment(), a = document.createElement("div");
51
- return a.setAttribute("part", "native"), a.classList.add("native-relative-time"), a.innerText = this.getRelativeTimeString(this.dateISO), r.appendChild(a), r;
52
- }
53
- /**
54
- * Returns the relative time string for the given date.
55
- *
56
- * @param {string} date - The date.
57
- * @param {string} lang - The language.
58
- * @returns {string} The relative time string.
59
- */
60
- getRelativeTimeString(e, t = navigator.language) {
61
- const r = new Date(e).getTime(), a = Math.round((r - Date.now()) / 1e3), o = [
62
- 60,
63
- 3600,
64
- 86400,
65
- 86400 * 7,
66
- 86400 * 30,
67
- 86400 * 365,
68
- 1 / 0
69
- ], m = ["second", "minute", "hour", "day", "week", "month", "year"], s = o.findIndex((g) => g > Math.abs(a)), c = s ? o[s - 1] : 1;
70
- return this.localizer.relativeTime(Math.floor(a / c), m[s], { numeric: "auto" });
71
- }
72
- /**
73
- * Checks if the given string is an ISO date.
74
- *
75
- * @param {string} str - The string to check.
76
- * @returns {boolean} True if the string is an ISO date, false otherwise.
77
- */
78
- isISODate(e) {
79
- return /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$/.test(e);
80
- }
81
- }
82
- l.define("wje-relative-time", l);
83
- export {
84
- l as default
85
- };
package/dist/wje-route.js DELETED
@@ -1,28 +0,0 @@
1
- var u = Object.defineProperty;
2
- var a = (t, e, r) => e in t ? u(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var s = (t, e, r) => (a(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import c from "./wje-element.js";
5
- class o extends c {
6
- /**
7
- * Creates an instance of Route.
8
- *
9
- * @constructor
10
- */
11
- constructor() {
12
- super();
13
- s(this, "className", "Route");
14
- }
15
- /**
16
- * Returns the list of attributes to observe for changes.
17
- *
18
- * @static
19
- * @returns {Array<string>}
20
- */
21
- static get observedAttributes() {
22
- return [];
23
- }
24
- }
25
- o.define("wje-route", o);
26
- export {
27
- o as default
28
- };
@@ -1,64 +0,0 @@
1
- var a = Object.defineProperty;
2
- var c = (e, t, s) => t in e ? a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var n = (e, t, s) => (c(e, typeof t != "symbol" ? t + "" : t, s), s);
4
- import u from "./wje-element.js";
5
- import { b as l } from "./router-links-FtZbFUto.js";
6
- const d = ":host{display:block;background:transparent!important}:host(.active){cursor:pointer;font-weight:700}";
7
- class o extends u {
8
- /**
9
- * Creates an instance of RouterLink.
10
- *
11
- * @constructor
12
- */
13
- constructor() {
14
- super();
15
- n(this, "className", "RouterLink");
16
- this.unbindRouterLinks = l(this, { selector: !1 });
17
- }
18
- /**
19
- * Returns the CSS styles for the component.
20
- *
21
- * @static
22
- * @returns {CSSStyleSheet}
23
- */
24
- static get cssStyleSheet() {
25
- return d;
26
- }
27
- /**
28
- * Returns the list of attributes to observe for changes.
29
- *
30
- * @static
31
- * @returns {Array<string>}
32
- */
33
- static get observedAttributes() {
34
- return [];
35
- }
36
- /**
37
- * Sets up the attributes for the component.
38
- */
39
- setupAttributes() {
40
- this.isShadowRoot = "open", this.setAttribute("active-class", "active");
41
- }
42
- /**
43
- * Draws the component.
44
- *
45
- * @param {Object} context - The context for drawing.
46
- * @param {Object} store - The store for drawing.
47
- * @param {Object} params - The parameters for drawing.
48
- * @returns {DocumentFragment}
49
- */
50
- draw(s, m, p) {
51
- let r = document.createDocumentFragment(), i = document.createElement("slot");
52
- return r.appendChild(i), r;
53
- }
54
- /**
55
- * Cleans up before the component is disconnected.
56
- */
57
- beforeDisconnect() {
58
- this.unbindRouterLinks();
59
- }
60
- }
61
- o.define("wje-router-link", o);
62
- export {
63
- o as default
64
- };
@@ -1,127 +0,0 @@
1
- var C = Object.defineProperty;
2
- var E = (i, t, n) => t in i ? C(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
3
- var m = (i, t, n) => (E(i, typeof t != "symbol" ? t + "" : t, n), n);
4
- import b from "./wje-element.js";
5
- class $ {
6
- constructor(t = {}) {
7
- this.options = t;
8
- }
9
- getOption(t, n) {
10
- return t.hasAttribute(n) ? t.getAttribute(n) : this.options[n];
11
- }
12
- hasOption(t, n) {
13
- return t.hasAttribute(n) || this.options[n];
14
- }
15
- runParallel(t) {
16
- return this.hasOption(t, "parallel");
17
- }
18
- beforeEnter(t, n) {
19
- }
20
- enter(t, n) {
21
- }
22
- leave(t, n, e) {
23
- e();
24
- }
25
- }
26
- var p = window.requestAnimationFrame, v = "transition", L = "animation", d = "transition", N = "transitionend", c = "animation", D = "animationend";
27
- function O(i) {
28
- window.scrollTo(0, 0), p(function() {
29
- window.scrollTo(0, 0), p(i);
30
- });
31
- }
32
- function x(i, t) {
33
- var n = k(i), e = n.type, r = n.timeout, l = n.propCount;
34
- if (!e)
35
- return t();
36
- var s = e === v ? N : D, u = 0, o = function() {
37
- i.removeEventListener(s, a), t();
38
- }, a = function(h) {
39
- h.target === i && ++u >= l && o();
40
- };
41
- setTimeout(function() {
42
- u < l && o();
43
- }, r + 1), i.addEventListener(s, a);
44
- }
45
- function k(i) {
46
- var t = window.getComputedStyle(i), n = (t[d + "Delay"] || "").split(", "), e = (t[d + "Duration"] || "").split(", "), r = f(n, e), l = (t[c + "Delay"] || "").split(", "), s = (t[c + "Duration"] || "").split(", "), u = f(l, s), o, a = 0, h = 0;
47
- return a = Math.max(r, u), o = a > 0 ? r > u ? v : L : null, h = o ? o === v ? e.length : s.length : 0, {
48
- type: o,
49
- timeout: a,
50
- propCount: h
51
- };
52
- }
53
- function f(i, t) {
54
- for (; i.length < t.length; )
55
- i = i.concat(i);
56
- return Math.max.apply(null, t.map(function(n, e) {
57
- return g(n) + g(i[e]);
58
- }));
59
- }
60
- function g(i) {
61
- return Number(i.slice(0, -1).replace(",", ".")) * 1e3;
62
- }
63
- function A(i, t, n, e) {
64
- i.classList.add(`${t}-${n}-active`), O(function() {
65
- window.scrollTo(0, 0), i.classList.remove(`${t}-${n}`), i.classList.add(`${t}-${n}-to`), x(i, function() {
66
- i.classList.remove(`${t}-${n}-active`, `${t}-${n}-to`), e && e();
67
- });
68
- });
69
- }
70
- class y extends $ {
71
- beforeEnter(t, n) {
72
- const e = t.getAttribute("animation") || "outlet";
73
- n.classList.add(`${e}-enter`);
74
- }
75
- enter(t, n) {
76
- const e = t.getAttribute("animation") || "outlet";
77
- A(n, e, "enter");
78
- }
79
- leave(t, n, e) {
80
- const r = t.getAttribute("animation") || "outlet";
81
- n.classList.add(`${r}-leave`), n.style.display = "none", A(n, r, "leave", e);
82
- }
83
- }
84
- const I = {};
85
- let w;
86
- function T(i) {
87
- return I[i] || w || (w = new y());
88
- }
89
- class M extends HTMLElement {
90
- appendChild(t) {
91
- if (!this.hasAttribute("animation")) {
92
- super.appendChild(t);
93
- return;
94
- }
95
- const n = T(this.getAttribute("animation")), e = n.runParallel(this);
96
- n.beforeEnter(this, t), super.appendChild(t), !e && this.removing ? this.appending = t : n.enter(this, t);
97
- }
98
- removeChild(t) {
99
- if (!this.hasAttribute("animation")) {
100
- super.removeChild(t);
101
- return;
102
- }
103
- const n = T(this.getAttribute("animation"));
104
- if (this.removing && this.removing.parentNode === this && super.removeChild(this.removing), t === this.appending) {
105
- t.parentNode === this && super.removeChild(t), this.removing = null;
106
- return;
107
- }
108
- this.removing = t, n.leave(this, t, () => {
109
- this.removing && this.removing.parentNode === this && super.removeChild(this.removing), this.appending && n.enter(this, this.appending), this.appending = null, this.removing = null;
110
- });
111
- }
112
- }
113
- class P extends M {
114
- /**
115
- * Creates an instance of Route.
116
- *
117
- * @constructor
118
- */
119
- constructor() {
120
- super();
121
- m(this, "className", "RouterOutlet");
122
- }
123
- }
124
- b.define("wje-router-outlet", P);
125
- export {
126
- P as default
127
- };