wj-elements 0.1.79 → 0.1.80
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-dialog.js +6 -6
- package/dist/wje-menu-item.js +2 -6
- package/dist/wje-router-outlet.js +0 -2
- package/dist/wje-store.js +1 -1
- package/package.json +1 -1
package/dist/wje-dialog.js
CHANGED
|
@@ -11,19 +11,19 @@ class Dialog extends WJElement {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
13
|
__publicField(this, "className", "Dialog");
|
|
14
|
-
__publicField(this, "onOpen", () => {
|
|
15
|
-
Promise.resolve(this.beforeOpen(this)).then((res) => {
|
|
14
|
+
__publicField(this, "onOpen", (e) => {
|
|
15
|
+
Promise.resolve(this.beforeOpen(this, e)).then((res) => {
|
|
16
16
|
this.dialog.showModal();
|
|
17
17
|
if (this.dialog.open) {
|
|
18
|
-
Promise.resolve(this.afterOpen(this));
|
|
18
|
+
Promise.resolve(this.afterOpen(this, e));
|
|
19
19
|
}
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
|
-
__publicField(this, "onClose", () => {
|
|
23
|
-
Promise.resolve(this.beforeClose(this)).then((res) => {
|
|
22
|
+
__publicField(this, "onClose", (e) => {
|
|
23
|
+
Promise.resolve(this.beforeClose(this, e)).then((res) => {
|
|
24
24
|
this.dialog.close();
|
|
25
25
|
if (this.dialog.open) {
|
|
26
|
-
Promise.resolve(this.afterClose(this));
|
|
26
|
+
Promise.resolve(this.afterClose(this, e));
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
});
|
package/dist/wje-menu-item.js
CHANGED
|
@@ -33,9 +33,7 @@ class MenuItem extends WJElement {
|
|
|
33
33
|
e.stopPropagation();
|
|
34
34
|
} else {
|
|
35
35
|
event.dispatchCustomEvent(this, "wje-menu-item:click");
|
|
36
|
-
event.dispatchCustomEvent(this, this.dialog
|
|
37
|
-
bubbles: true
|
|
38
|
-
});
|
|
36
|
+
event.dispatchCustomEvent(this, this.dialog);
|
|
39
37
|
}
|
|
40
38
|
break;
|
|
41
39
|
case "CONTEXT":
|
|
@@ -49,9 +47,7 @@ class MenuItem extends WJElement {
|
|
|
49
47
|
}
|
|
50
48
|
} else {
|
|
51
49
|
event.dispatchCustomEvent(this, "wje-menu-item:click");
|
|
52
|
-
event.dispatchCustomEvent(this, this.dialog
|
|
53
|
-
bubbles: true
|
|
54
|
-
});
|
|
50
|
+
event.dispatchCustomEvent(this, this.dialog);
|
|
55
51
|
}
|
|
56
52
|
break;
|
|
57
53
|
}
|
|
@@ -114,12 +114,10 @@ function runTransition(el, name, type, cb) {
|
|
|
114
114
|
}
|
|
115
115
|
class GenericCSS extends AnimationHook {
|
|
116
116
|
beforeEnter(outlet, el) {
|
|
117
|
-
el.style.display = "none";
|
|
118
117
|
const name = outlet.getAttribute("animation") || "outlet";
|
|
119
118
|
el.classList.add(`${name}-enter`);
|
|
120
119
|
}
|
|
121
120
|
enter(outlet, el) {
|
|
122
|
-
el.style.display = "block";
|
|
123
121
|
const name = outlet.getAttribute("animation") || "outlet";
|
|
124
122
|
runTransition(el, name, "enter");
|
|
125
123
|
}
|
package/dist/wje-store.js
CHANGED
|
@@ -228,7 +228,7 @@ class Store {
|
|
|
228
228
|
if (Array.isArray(action.payload) && action.payload.length == 0) {
|
|
229
229
|
console.warn(`Nemá zmysel pridávať prázdne pole do pola`);
|
|
230
230
|
}
|
|
231
|
-
if (!Array.isArray(action.payload) && action.type != defaultStoreActions.updateAction(stateValueName).type && action.type != defaultStoreActions.deleteAction(stateValueName).type) {
|
|
231
|
+
if (!Array.isArray(action.payload) && action.type != defaultStoreActions.updateAction(stateValueName).type && action.type != defaultStoreActions.deleteAction(stateValueName).type && action.type != defaultStoreActions.updateAction(stateValueName).type) {
|
|
232
232
|
console.error(`Nemôžete pridať do poľa hodnotu, ktorá nie je pole. Skontrolujte si či definovanie stavu vyzerá takto: "store.define(${stateValueName}, [])"`);
|
|
233
233
|
}
|
|
234
234
|
switch (action.type) {
|
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.80",
|
|
5
5
|
"homepage": "https://github.com/lencys/wj-elements",
|
|
6
6
|
"author": "Lukáš Ondrejček <lukas.ondrejcek@gmail.com>",
|
|
7
7
|
"license": "MIT",
|