@sankhyalabs/ezui 1.1.39 → 1.1.43
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/cjs/ez-button_16.cjs.entry.js +305 -201
- package/dist/cjs/ez-dialog.cjs.entry.js +4 -4
- package/dist/cjs/ez-popup.cjs.entry.js +3 -3
- package/dist/cjs/ez-toast.cjs.entry.js +37 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/ez-dialog/ez-dialog.js +16 -12
- package/dist/collection/components/ez-form/assets/trash-can-outline.svg +3 -0
- package/dist/collection/components/ez-form/ez-form.js +1 -0
- package/dist/collection/components/ez-form/subcomponents/DataUnit.js +2 -1
- package/dist/collection/components/ez-form/subcomponents/form-metadata.js +1 -5
- package/dist/collection/components/ez-form/subcomponents/structure/Field.js +2 -3
- package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +6 -3
- package/dist/collection/components/ez-popup/ez-popup.js +5 -5
- package/dist/collection/components/ez-toast/ez-toast.css +108 -0
- package/dist/collection/components/ez-toast/ez-toast.js +113 -0
- package/dist/collection/components/ez-upload/RemoteFile.js +89 -0
- package/dist/collection/components/ez-upload/ez-upload.css +23 -3
- package/dist/collection/components/ez-upload/ez-upload.js +257 -297
- package/dist/collection/utils/Application.js +34 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +350 -212
- package/dist/esm/ez-button_16.entry.js +305 -201
- package/dist/esm/ez-dialog.entry.js +4 -4
- package/dist/esm/ez-popup.entry.js +3 -3
- package/dist/esm/ez-toast.entry.js +33 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/assets/trash-can-outline.svg +3 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-1ff02df6.entry.js +1 -0
- package/dist/ezui/p-4a87d740.entry.js +1 -0
- package/dist/ezui/p-c12beec1.entry.js +1 -0
- package/dist/ezui/p-c3b18332.entry.js +1 -0
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +3 -3
- package/dist/types/components/ez-popup/ez-popup.d.ts +1 -1
- package/dist/types/components/ez-toast/ez-toast.d.ts +17 -0
- package/dist/types/components/ez-upload/RemoteFile.d.ts +14 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +51 -57
- package/dist/types/components.d.ts +91 -57
- package/dist/types/utils/Application.d.ts +6 -0
- package/package.json +2 -2
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-40fe4f51.entry.js +0 -1
- package/dist/ezui/p-c7cee3ae.entry.js +0 -1
- package/dist/ezui/p-caa50ec5.entry.js +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default class Application {
|
|
2
|
+
static async showDialog(title, message, icon = null, confirm, critical = false) {
|
|
3
|
+
return new Promise(resolve => {
|
|
4
|
+
let dialog = document.querySelector("ez-dialog");
|
|
5
|
+
if (!dialog) {
|
|
6
|
+
dialog = document.createElement("ez-dialog");
|
|
7
|
+
window.document.body.appendChild(dialog);
|
|
8
|
+
}
|
|
9
|
+
dialog.ezTitle = title;
|
|
10
|
+
dialog.message = message;
|
|
11
|
+
dialog.critical = critical;
|
|
12
|
+
dialog.confirm = confirm;
|
|
13
|
+
dialog.personalizedIconPath = icon;
|
|
14
|
+
dialog.oppened = true;
|
|
15
|
+
dialog.addEventListener("ezChange", (evt) => resolve(evt.detail));
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
static async alert(title, message, icon = null) {
|
|
19
|
+
return Application.showDialog(title, message, icon, false, false);
|
|
20
|
+
}
|
|
21
|
+
static async confirm(title, message, icon = null, critical = false) {
|
|
22
|
+
return Application.showDialog(title, message, icon, true, critical);
|
|
23
|
+
}
|
|
24
|
+
static async info(message) {
|
|
25
|
+
let toast = document.querySelector("ez-toast");
|
|
26
|
+
if (!toast) {
|
|
27
|
+
toast = document.createElement("ez-toast");
|
|
28
|
+
window.document.body.appendChild(toast);
|
|
29
|
+
}
|
|
30
|
+
toast.message = message;
|
|
31
|
+
toast.fadeTime = 4000;
|
|
32
|
+
toast.show();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -128,6 +128,12 @@ export const EzTimeInput: {
|
|
|
128
128
|
new (): EzTimeInput;
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
+
interface EzToast extends Components.EzToast, HTMLElement {}
|
|
132
|
+
export const EzToast: {
|
|
133
|
+
prototype: EzToast;
|
|
134
|
+
new (): EzToast;
|
|
135
|
+
};
|
|
136
|
+
|
|
131
137
|
interface EzUpload extends Components.EzUpload, HTMLElement {}
|
|
132
138
|
export const EzUpload: {
|
|
133
139
|
prototype: EzUpload;
|