wj-elements 0.1.121 → 0.1.122
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.
- package/dist/wje-sliding-container.js +26 -22
- package/package.json +1 -1
|
@@ -337,22 +337,24 @@ class SlidingContainer extends WJElement {
|
|
|
337
337
|
*/
|
|
338
338
|
async open(event) {
|
|
339
339
|
await Promise.resolve(this.beforeOpen(event)).then(async () => {
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
if (!this._isOpen) {
|
|
341
|
+
this.dispatchEvent(
|
|
342
|
+
new CustomEvent("wje-sliding-container:beforeOpen", {
|
|
343
|
+
bubbles: true,
|
|
344
|
+
composed: true
|
|
345
|
+
})
|
|
346
|
+
);
|
|
347
|
+
await this.doAnimateTransition();
|
|
348
|
+
await Promise.resolve(this.afterOpen(event)).then(() => {
|
|
349
|
+
this._isOpen = true;
|
|
342
350
|
this.dispatchEvent(
|
|
343
351
|
new CustomEvent("wje-sliding-container:open", {
|
|
344
352
|
bubbles: true,
|
|
345
353
|
composed: true
|
|
346
354
|
})
|
|
347
355
|
);
|
|
348
|
-
this.doAnimateTransition();
|
|
349
|
-
})() : () => {
|
|
350
|
-
}
|
|
351
|
-
).then(async () => {
|
|
352
|
-
await Promise.resolve(this.afterOpen(event)).then(() => {
|
|
353
|
-
this._isOpen = true;
|
|
354
356
|
});
|
|
355
|
-
}
|
|
357
|
+
}
|
|
356
358
|
});
|
|
357
359
|
}
|
|
358
360
|
/**
|
|
@@ -362,18 +364,14 @@ class SlidingContainer extends WJElement {
|
|
|
362
364
|
*/
|
|
363
365
|
async close(event) {
|
|
364
366
|
await Promise.resolve(this.beforeClose(event)).then(async () => {
|
|
365
|
-
|
|
366
|
-
this.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
this.doAnimateTransition();
|
|
374
|
-
})() : () => {
|
|
375
|
-
}
|
|
376
|
-
).then(async () => {
|
|
367
|
+
if (this._isOpen) {
|
|
368
|
+
this.dispatchEvent(
|
|
369
|
+
new CustomEvent("wje-sliding-container:beforeClose", {
|
|
370
|
+
bubbles: true,
|
|
371
|
+
composed: true
|
|
372
|
+
})
|
|
373
|
+
);
|
|
374
|
+
await this.doAnimateTransition();
|
|
377
375
|
await Promise.resolve(this.afterClose(event)).then(() => {
|
|
378
376
|
if (this.removeChildAfterClose) {
|
|
379
377
|
this.childNodes.forEach((child) => {
|
|
@@ -381,8 +379,14 @@ class SlidingContainer extends WJElement {
|
|
|
381
379
|
});
|
|
382
380
|
}
|
|
383
381
|
this._isOpen = false;
|
|
382
|
+
this.dispatchEvent(
|
|
383
|
+
new CustomEvent("wje-sliding-container:close", {
|
|
384
|
+
bubbles: true,
|
|
385
|
+
composed: true
|
|
386
|
+
})
|
|
387
|
+
);
|
|
384
388
|
});
|
|
385
|
-
}
|
|
389
|
+
}
|
|
386
390
|
});
|
|
387
391
|
}
|
|
388
392
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wj-elements",
|
|
3
3
|
"description": "WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.122",
|
|
5
5
|
"homepage": "https://github.com/lencys/wj-elements",
|
|
6
6
|
"author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
|
|
7
7
|
"license": "MIT",
|