zartui 3.1.17 → 3.1.18
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 +23 -0
- package/es/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/es/hierarchy-select/HierarchySelect.mjs +11 -1
- package/es/hierarchy-select/index.d.ts +9 -0
- 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 +6 -4
- package/es/media-picker/index.d.ts +1 -0
- package/es/media-picker/index.mjs +3 -1
- package/es/media-picker/type.d.ts +10 -1
- package/es/media-picker/type.mjs +12 -0
- package/es/vue-sfc-shim.d.ts +6 -6
- package/es/vue-tsx-shim.d.ts +23 -23
- package/lib/hierarchy-select/HierarchySelect.d.ts +13 -0
- package/lib/hierarchy-select/HierarchySelect.js +11 -1
- package/lib/hierarchy-select/index.d.ts +9 -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 +6 -4
- package/lib/media-picker/index.d.ts +1 -0
- package/lib/media-picker/index.js +3 -1
- package/lib/media-picker/type.d.ts +10 -1
- package/lib/media-picker/type.js +16 -0
- 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 +28 -6
- package/lib/zartui.es.js +28 -6
- package/lib/zartui.js +28 -6
- package/lib/zartui.min.js +1 -1
- package/package.json +3 -3
|
@@ -601,9 +601,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
601
601
|
emit("delete", media, index);
|
|
602
602
|
};
|
|
603
603
|
const renderMediaThumbnail = (media) => {
|
|
604
|
-
|
|
604
|
+
const thumbnailUrl = media.showSrc || media.url;
|
|
605
|
+
if (thumbnailUrl) {
|
|
605
606
|
return (0, import_vue.createVNode)(import_image.default, {
|
|
606
|
-
"src":
|
|
607
|
+
"src": thumbnailUrl,
|
|
607
608
|
"fit": "cover",
|
|
608
609
|
"radius": "4"
|
|
609
610
|
}, null);
|
|
@@ -697,6 +698,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
697
698
|
const title = props.showTitle && (0, import_vue.createVNode)("div", {
|
|
698
699
|
"class": bem("title")
|
|
699
700
|
}, [props.title]);
|
|
701
|
+
const showButtons = props.allowTakePhoto || props.allowPickPhoto || props.allowTakeVideo || props.allowPickVideo || props.allowTakeAudio || props.allowPickAudio || props.allowPickFile;
|
|
700
702
|
return (0, import_vue.createVNode)("div", {
|
|
701
703
|
"class": bem()
|
|
702
704
|
}, [title, hiddenInput(), (0, import_vue.createVNode)(import_media_player.default, {
|
|
@@ -712,9 +714,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
|
712
714
|
"cancel-text": "\u53D6\u6D88",
|
|
713
715
|
"close-on-click-action": true,
|
|
714
716
|
"onSelect": selectAction
|
|
715
|
-
}, null), (0, import_vue.createVNode)("div", {
|
|
717
|
+
}, null), (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
|
|
716
718
|
"class": bem("line")
|
|
717
|
-
}, [renderButtons()]), (0, import_vue.withDirectives)((0, import_vue.createVNode)(import_grid.default, {
|
|
719
|
+
}, [renderButtons()]), [[import_vue.vShow, showButtons]]), (0, import_vue.withDirectives)((0, import_vue.createVNode)(import_grid.default, {
|
|
718
720
|
"column-num": "3",
|
|
719
721
|
"border": false,
|
|
720
722
|
"square": true,
|
|
@@ -150,6 +150,7 @@ export declare const MediaPicker: import("../utils").WithInstall<import("vue").D
|
|
|
150
150
|
export default MediaPicker;
|
|
151
151
|
export type { MediaPickerProps } from './MediaPicker';
|
|
152
152
|
export type { Media, MediaType, MediaAddType, MediaUploadStatus, MediaPreview, MediaPick, MediaBeforeRead, MediaAfterRead, MediaBeforeDelete, MediaPickerThemeVars, } from './type';
|
|
153
|
+
export { defaultMedia } from './type';
|
|
153
154
|
declare module 'vue' {
|
|
154
155
|
interface GlobalComponents {
|
|
155
156
|
ZtMediaPicker: typeof MediaPicker;
|
|
@@ -28,10 +28,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var stdin_exports = {};
|
|
29
29
|
__export(stdin_exports, {
|
|
30
30
|
MediaPicker: () => MediaPicker,
|
|
31
|
-
default: () => stdin_default
|
|
31
|
+
default: () => stdin_default,
|
|
32
|
+
defaultMedia: () => import_type.defaultMedia
|
|
32
33
|
});
|
|
33
34
|
module.exports = __toCommonJS(stdin_exports);
|
|
34
35
|
var import_utils = require("../utils");
|
|
35
36
|
var import_MediaPicker = __toESM(require("./MediaPicker"));
|
|
37
|
+
var import_type = require("./type");
|
|
36
38
|
const MediaPicker = (0, import_utils.withInstall)(import_MediaPicker.default);
|
|
37
39
|
var stdin_default = MediaPicker;
|
|
@@ -2,7 +2,7 @@ export type MediaType = 'photo' | 'audio' | 'video' | 'file';
|
|
|
2
2
|
export type MediaAddType = 'take' | 'pick' | 'take_and_pick';
|
|
3
3
|
export type MediaUploadStatus = 'uploading' | 'done' | 'failed';
|
|
4
4
|
export type Media = {
|
|
5
|
-
file
|
|
5
|
+
file?: File;
|
|
6
6
|
url?: string;
|
|
7
7
|
type: MediaType;
|
|
8
8
|
uniqueCode: string;
|
|
@@ -19,6 +19,15 @@ export type Media = {
|
|
|
19
19
|
extra?: object;
|
|
20
20
|
label?: string;
|
|
21
21
|
};
|
|
22
|
+
export declare const defaultMedia: {
|
|
23
|
+
uniqueCode: string;
|
|
24
|
+
fileSize: number;
|
|
25
|
+
fileName: string;
|
|
26
|
+
originalName: string;
|
|
27
|
+
originalSize: number;
|
|
28
|
+
lastModified: number;
|
|
29
|
+
deletable: boolean;
|
|
30
|
+
};
|
|
22
31
|
export type MediaBeforeRead = (files: Array<File>) => boolean | Promise<Array<File>>;
|
|
23
32
|
export type MediaAfterRead = (medias: Array<Media>) => void;
|
|
24
33
|
export type MediaBeforeDelete = (media: Media) => boolean | Promise<void>;
|
package/lib/media-picker/type.js
CHANGED
|
@@ -2,6 +2,10 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
5
9
|
var __copyProps = (to, from, except, desc) => {
|
|
6
10
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
11
|
for (let key of __getOwnPropNames(from))
|
|
@@ -12,4 +16,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
12
16
|
};
|
|
13
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
18
|
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
defaultMedia: () => defaultMedia
|
|
21
|
+
});
|
|
15
22
|
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
const defaultMedia = {
|
|
24
|
+
uniqueCode: "",
|
|
25
|
+
fileSize: 0,
|
|
26
|
+
fileName: "",
|
|
27
|
+
originalName: "",
|
|
28
|
+
originalSize: 0,
|
|
29
|
+
lastModified: 0,
|
|
30
|
+
deletable: false
|
|
31
|
+
};
|
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
|
+
}
|