zartui 3.1.34 → 3.1.36
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/README.md +27 -27
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.d.ts +55 -55
- package/es/media-picker/MediaPicker.mjs +57 -2
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/index-8bc782d2.mjs +5545 -0
- package/lib/index-d66aaef4.js +5545 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
- package/lib/media-picker/MediaPicker.js +57 -2
- package/lib/vue-sfc-shim.d.ts +6 -6
- package/lib/vue-tsx-shim.d.ts +23 -23
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +58 -3
- package/lib/zartui.es.js +58 -3
- package/lib/zartui.js +6077 -476
- package/lib/zartui.min.js +1 -1
- package/package.json +10 -3
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -180,7 +180,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
|
|
|
180
180
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
|
181
181
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
182
182
|
__reExport(stdin_exports, require("./video"), module.exports);
|
|
183
|
-
const version = "3.1.
|
|
183
|
+
const version = "3.1.36";
|
|
184
184
|
function install(app) {
|
|
185
185
|
const components = [
|
|
186
186
|
import_action_sheet.ActionSheet,
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { App } from 'vue';
|
|
2
|
-
|
|
3
|
-
declare type ListenEvent =
|
|
4
|
-
| 'scroll'
|
|
5
|
-
| 'wheel'
|
|
6
|
-
| 'mousewheel'
|
|
7
|
-
| 'resize'
|
|
8
|
-
| 'animationend'
|
|
9
|
-
| 'transitionend'
|
|
10
|
-
| 'touchmove';
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line
|
|
13
|
-
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
-
|
|
15
|
-
declare type Filter = {
|
|
16
|
-
webp?: Callback;
|
|
17
|
-
progressive?: Callback;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
declare type Adapter = {
|
|
21
|
-
error?: Callback;
|
|
22
|
-
loaded?: Callback;
|
|
23
|
-
loading?: Callback;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export declare type LazyloadOptions = {
|
|
27
|
-
error?: string;
|
|
28
|
-
filter?: Filter;
|
|
29
|
-
silent?: boolean;
|
|
30
|
-
adapter?: Adapter;
|
|
31
|
-
loading?: string;
|
|
32
|
-
attempt?: number;
|
|
33
|
-
preLoad?: number;
|
|
34
|
-
observer?: boolean;
|
|
35
|
-
lazyImage?: boolean;
|
|
36
|
-
throttleWait?: number;
|
|
37
|
-
listenEvents?: ListenEvent[];
|
|
38
|
-
dispatchEvent?: boolean;
|
|
39
|
-
lazyComponent?: boolean;
|
|
40
|
-
observerOptions?: IntersectionObserverInit;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export declare const Lazyload: {
|
|
44
|
-
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
declare module '@vue/runtime-core' {
|
|
48
|
-
interface ComponentCustomProperties {
|
|
49
|
-
$Lazyload: {
|
|
50
|
-
$on: (event: string, handler: Callback) => void;
|
|
51
|
-
$off: (event: string, handler?: Callback) => void;
|
|
52
|
-
$once: (event: string, handler: Callback) => void;
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
|
|
3
|
+
declare type ListenEvent =
|
|
4
|
+
| 'scroll'
|
|
5
|
+
| 'wheel'
|
|
6
|
+
| 'mousewheel'
|
|
7
|
+
| 'resize'
|
|
8
|
+
| 'animationend'
|
|
9
|
+
| 'transitionend'
|
|
10
|
+
| 'touchmove';
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line
|
|
13
|
+
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
|
14
|
+
|
|
15
|
+
declare type Filter = {
|
|
16
|
+
webp?: Callback;
|
|
17
|
+
progressive?: Callback;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
declare type Adapter = {
|
|
21
|
+
error?: Callback;
|
|
22
|
+
loaded?: Callback;
|
|
23
|
+
loading?: Callback;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export declare type LazyloadOptions = {
|
|
27
|
+
error?: string;
|
|
28
|
+
filter?: Filter;
|
|
29
|
+
silent?: boolean;
|
|
30
|
+
adapter?: Adapter;
|
|
31
|
+
loading?: string;
|
|
32
|
+
attempt?: number;
|
|
33
|
+
preLoad?: number;
|
|
34
|
+
observer?: boolean;
|
|
35
|
+
lazyImage?: boolean;
|
|
36
|
+
throttleWait?: number;
|
|
37
|
+
listenEvents?: ListenEvent[];
|
|
38
|
+
dispatchEvent?: boolean;
|
|
39
|
+
lazyComponent?: boolean;
|
|
40
|
+
observerOptions?: IntersectionObserverInit;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export declare const Lazyload: {
|
|
44
|
+
install(app: App, options?: LazyloadOptions): void;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
declare module '@vue/runtime-core' {
|
|
48
|
+
interface ComponentCustomProperties {
|
|
49
|
+
$Lazyload: {
|
|
50
|
+
$on: (event: string, handler: Callback) => void;
|
|
51
|
+
$off: (event: string, handler?: Callback) => void;
|
|
52
|
+
$once: (event: string, handler: Callback) => void;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -25,6 +25,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
mod
|
|
26
26
|
));
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var __async = (__this, __arguments, generator) => {
|
|
29
|
+
return new Promise((resolve, reject) => {
|
|
30
|
+
var fulfilled = (value) => {
|
|
31
|
+
try {
|
|
32
|
+
step(generator.next(value));
|
|
33
|
+
} catch (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var rejected = (value) => {
|
|
38
|
+
try {
|
|
39
|
+
step(generator.throw(value));
|
|
40
|
+
} catch (e) {
|
|
41
|
+
reject(e);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
45
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
28
48
|
var stdin_exports = {};
|
|
29
49
|
__export(stdin_exports, {
|
|
30
50
|
default: () => stdin_default
|
|
@@ -703,7 +723,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
703
723
|
}
|
|
704
724
|
deleteMedia(media, index);
|
|
705
725
|
};
|
|
706
|
-
const previewMedia = (index) => {
|
|
726
|
+
const previewMedia = (index) => __async(this, null, function* () {
|
|
727
|
+
var _a;
|
|
707
728
|
if (props.preview && props.preview(props.mediaList, index)) {
|
|
708
729
|
return;
|
|
709
730
|
}
|
|
@@ -726,9 +747,43 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
726
747
|
mediaPlayerVisible.value = true;
|
|
727
748
|
}
|
|
728
749
|
} else if (media.type === "file") {
|
|
750
|
+
try {
|
|
751
|
+
let universalJsSdk = yield import("@egova/universal-js-sdk");
|
|
752
|
+
if (universalJsSdk && universalJsSdk.getJSI && media.url) {
|
|
753
|
+
let fileJsi = (_a = universalJsSdk.getJSI()) == null ? void 0 : _a.file;
|
|
754
|
+
if (fileJsi && fileJsi.download && fileJsi.openDocument) {
|
|
755
|
+
(0, import_toast.showLoadingToast)({
|
|
756
|
+
message: "\u6253\u5F00\u4E2D...",
|
|
757
|
+
forbidClick: true,
|
|
758
|
+
duration: 0
|
|
759
|
+
});
|
|
760
|
+
fileJsi.download({
|
|
761
|
+
url: media.url
|
|
762
|
+
}).then(({
|
|
763
|
+
tempFilePath
|
|
764
|
+
}) => {
|
|
765
|
+
if (fileJsi && fileJsi.openDocument) {
|
|
766
|
+
fileJsi.openDocument({
|
|
767
|
+
localFilePath: tempFilePath
|
|
768
|
+
}).finally(() => {
|
|
769
|
+
(0, import_toast.closeToast)();
|
|
770
|
+
});
|
|
771
|
+
} else {
|
|
772
|
+
(0, import_toast.closeToast)();
|
|
773
|
+
}
|
|
774
|
+
}).catch(() => {
|
|
775
|
+
(0, import_toast.closeToast)();
|
|
776
|
+
(0, import_toast.showFailToast)("\u4E0B\u8F7D\u5931\u8D25");
|
|
777
|
+
});
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
} catch (e) {
|
|
782
|
+
console.log(e.message);
|
|
783
|
+
}
|
|
729
784
|
(0, import_toast.showFailToast)("\u6682\u4E0D\u652F\u6301\u6B64\u7C7B\u6587\u4EF6\u7684\u9884\u89C8");
|
|
730
785
|
}
|
|
731
|
-
};
|
|
786
|
+
});
|
|
732
787
|
const renderMediaList = () => props.mediaList.map((media, index) => {
|
|
733
788
|
const showDelete = media.deletable && media.status !== "uploading";
|
|
734
789
|
const deleteIcon = showDelete && (0, import_vue.createVNode)(import_DeleteIcon.default, {
|
package/lib/vue-sfc-shim.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare module '*.vue' {
|
|
2
|
-
// eslint-disable-next-line
|
|
3
|
-
import { DefineComponent } from 'vue';
|
|
4
|
-
const Component: DefineComponent;
|
|
5
|
-
export default Component;
|
|
6
|
-
}
|
|
1
|
+
declare module '*.vue' {
|
|
2
|
+
// eslint-disable-next-line
|
|
3
|
+
import { DefineComponent } from 'vue';
|
|
4
|
+
const Component: DefineComponent;
|
|
5
|
+
export default Component;
|
|
6
|
+
}
|
package/lib/vue-tsx-shim.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import 'vue';
|
|
2
|
-
|
|
3
|
-
type EventHandler = (...args: any[]) => void;
|
|
4
|
-
|
|
5
|
-
declare module 'vue' {
|
|
6
|
-
interface ComponentCustomProps {
|
|
7
|
-
id?: string;
|
|
8
|
-
role?: string;
|
|
9
|
-
tabindex?: number;
|
|
10
|
-
onClick?: EventHandler;
|
|
11
|
-
onTouchend?: EventHandler;
|
|
12
|
-
onTouchmove?: EventHandler;
|
|
13
|
-
onTouchstart?: EventHandler;
|
|
14
|
-
onTouchcancel?: EventHandler;
|
|
15
|
-
onTouchmovePassive?: EventHandler;
|
|
16
|
-
onTouchstartPassive?: EventHandler;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface HTMLAttributes {
|
|
20
|
-
onTouchmovePassive?: EventHandler;
|
|
21
|
-
onTouchstartPassive?: EventHandler;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
import 'vue';
|
|
2
|
+
|
|
3
|
+
type EventHandler = (...args: any[]) => void;
|
|
4
|
+
|
|
5
|
+
declare module 'vue' {
|
|
6
|
+
interface ComponentCustomProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
tabindex?: number;
|
|
10
|
+
onClick?: EventHandler;
|
|
11
|
+
onTouchend?: EventHandler;
|
|
12
|
+
onTouchmove?: EventHandler;
|
|
13
|
+
onTouchstart?: EventHandler;
|
|
14
|
+
onTouchcancel?: EventHandler;
|
|
15
|
+
onTouchmovePassive?: EventHandler;
|
|
16
|
+
onTouchstartPassive?: EventHandler;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface HTMLAttributes {
|
|
20
|
+
onTouchmovePassive?: EventHandler;
|
|
21
|
+
onTouchstartPassive?: EventHandler;
|
|
22
|
+
}
|
|
23
|
+
}
|