zartui 3.1.73 → 3.1.74

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.
@@ -35,7 +35,7 @@ export declare const imagePreviewProps: {
35
35
  default: true;
36
36
  };
37
37
  showDownload: BooleanConstructor;
38
- downloadAction: PropType<(params: DownloadActionParams) => boolean | void>;
38
+ downloadAction: PropType<(params: DownloadActionParams) => boolean>;
39
39
  className: PropType<unknown>;
40
40
  closeIcon: {
41
41
  type: PropType<string>;
@@ -97,7 +97,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
97
97
  default: true;
98
98
  };
99
99
  showDownload: BooleanConstructor;
100
- downloadAction: PropType<(params: DownloadActionParams) => boolean | void>;
100
+ downloadAction: PropType<(params: DownloadActionParams) => boolean>;
101
101
  className: PropType<unknown>;
102
102
  closeIcon: {
103
103
  type: PropType<string>;
@@ -157,7 +157,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
157
157
  default: true;
158
158
  };
159
159
  showDownload: BooleanConstructor;
160
- downloadAction: PropType<(params: DownloadActionParams) => boolean | void>;
160
+ downloadAction: PropType<(params: DownloadActionParams) => boolean>;
161
161
  className: PropType<unknown>;
162
162
  closeIcon: {
163
163
  type: PropType<string>;
@@ -64,7 +64,6 @@ var stdin_default = defineComponent({
64
64
  slots
65
65
  }) {
66
66
  const swipeRef = ref();
67
- const hasDownloadSupport = ref(false);
68
67
  const state = reactive({
69
68
  active: 0,
70
69
  rootWidth: 0,
@@ -149,7 +148,7 @@ var stdin_default = defineComponent({
149
148
  });
150
149
  const renderIndex = () => {
151
150
  const image = props.images[state.active];
152
- const showDownload = props.showDownload && hasDownloadSupport.value && !image.url.startsWith("data:");
151
+ const showDownload = props.showDownload && !image.url.startsWith("data:");
153
152
  if (props.showIndex || showDownload) {
154
153
  if (props.showIndex && slots.index) {
155
154
  return _createVNode("div", {
@@ -232,20 +231,9 @@ var stdin_default = defineComponent({
232
231
  useExpose({
233
232
  swipeTo
234
233
  });
235
- onMounted(() => __async(this, null, function* () {
236
- var _a;
234
+ onMounted(() => {
237
235
  resize();
238
- try {
239
- const universalJsSdk = yield import("@egova/universal-js-sdk");
240
- if (universalJsSdk && universalJsSdk.getJSI) {
241
- const fileJsi = (_a = universalJsSdk.getJSI()) == null ? void 0 : _a.file;
242
- hasDownloadSupport.value = !!(fileJsi && fileJsi.download);
243
- }
244
- } catch (e) {
245
- console.warn("Failed to check download support:", e);
246
- hasDownloadSupport.value = false;
247
- }
248
- }));
236
+ });
249
237
  watch([windowWidth, windowHeight], resize);
250
238
  watch(() => props.startPosition, (value) => setActive(+value));
251
239
  watch(() => props.show, (value) => {
@@ -27,7 +27,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
27
27
  default: true;
28
28
  };
29
29
  showDownload: BooleanConstructor;
30
- downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean | void>;
30
+ downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean>;
31
31
  className: import("vue").PropType<unknown>;
32
32
  closeIcon: {
33
33
  type: import("vue").PropType<string>;
@@ -87,7 +87,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
87
87
  default: true;
88
88
  };
89
89
  showDownload: BooleanConstructor;
90
- downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean | void>;
90
+ downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean>;
91
91
  className: import("vue").PropType<unknown>;
92
92
  closeIcon: {
93
93
  type: import("vue").PropType<string>;
@@ -2,7 +2,7 @@ import type { CSSProperties, TeleportProps, ComponentPublicInstance } from 'vue'
2
2
  import type { Interceptor } from '../utils';
3
3
  import type { SwipeToOptions } from '../swipe';
4
4
  import type { PopupCloseIconPosition } from '../popup';
5
- import type { ImagePreviewProps } from './ImagePreview';
5
+ import type { DownloadActionParams, ImagePreviewProps } from './ImagePreview';
6
6
  export type ImageItem = {
7
7
  url: string;
8
8
  title?: string;
@@ -17,6 +17,7 @@ export type ImagePreviewOptions = {
17
17
  showIndex?: boolean;
18
18
  closeable?: boolean;
19
19
  showDownload?: boolean;
20
+ downloadAction?: (params: DownloadActionParams) => boolean;
20
21
  closeIcon?: string;
21
22
  transition?: string;
22
23
  beforeClose?: Interceptor;
package/es/index.d.ts CHANGED
@@ -84,4 +84,4 @@ declare namespace _default {
84
84
  }
85
85
  export default _default;
86
86
  export function install(app: any): void;
87
- export const version: "3.1.73";
87
+ export const version: "3.1.74";
package/es/index.mjs CHANGED
@@ -77,7 +77,7 @@ import { Timeline } from "./timeline/index.mjs";
77
77
  import { Toast } from "./toast/index.mjs";
78
78
  import { Uploader } from "./uploader/index.mjs";
79
79
  import { Video } from "./video/index.mjs";
80
- const version = "3.1.73";
80
+ const version = "3.1.74";
81
81
  function install(app) {
82
82
  const components = [
83
83
  ActionSheet,
@@ -35,7 +35,7 @@ export declare const imagePreviewProps: {
35
35
  default: true;
36
36
  };
37
37
  showDownload: BooleanConstructor;
38
- downloadAction: PropType<(params: DownloadActionParams) => boolean | void>;
38
+ downloadAction: PropType<(params: DownloadActionParams) => boolean>;
39
39
  className: PropType<unknown>;
40
40
  closeIcon: {
41
41
  type: PropType<string>;
@@ -97,7 +97,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
97
97
  default: true;
98
98
  };
99
99
  showDownload: BooleanConstructor;
100
- downloadAction: PropType<(params: DownloadActionParams) => boolean | void>;
100
+ downloadAction: PropType<(params: DownloadActionParams) => boolean>;
101
101
  className: PropType<unknown>;
102
102
  closeIcon: {
103
103
  type: PropType<string>;
@@ -157,7 +157,7 @@ declare const _default: import("vue").DefineComponent<ExtractPropTypes<{
157
157
  default: true;
158
158
  };
159
159
  showDownload: BooleanConstructor;
160
- downloadAction: PropType<(params: DownloadActionParams) => boolean | void>;
160
+ downloadAction: PropType<(params: DownloadActionParams) => boolean>;
161
161
  className: PropType<unknown>;
162
162
  closeIcon: {
163
163
  type: PropType<string>;
@@ -97,7 +97,6 @@ var stdin_default = (0, import_vue.defineComponent)({
97
97
  slots
98
98
  }) {
99
99
  const swipeRef = (0, import_vue.ref)();
100
- const hasDownloadSupport = (0, import_vue.ref)(false);
101
100
  const state = (0, import_vue.reactive)({
102
101
  active: 0,
103
102
  rootWidth: 0,
@@ -182,7 +181,7 @@ var stdin_default = (0, import_vue.defineComponent)({
182
181
  });
183
182
  const renderIndex = () => {
184
183
  const image = props.images[state.active];
185
- const showDownload = props.showDownload && hasDownloadSupport.value && !image.url.startsWith("data:");
184
+ const showDownload = props.showDownload && !image.url.startsWith("data:");
186
185
  if (props.showIndex || showDownload) {
187
186
  if (props.showIndex && slots.index) {
188
187
  return (0, import_vue.createVNode)("div", {
@@ -265,20 +264,9 @@ var stdin_default = (0, import_vue.defineComponent)({
265
264
  (0, import_use_expose.useExpose)({
266
265
  swipeTo
267
266
  });
268
- (0, import_vue.onMounted)(() => __async(this, null, function* () {
269
- var _a;
267
+ (0, import_vue.onMounted)(() => {
270
268
  resize();
271
- try {
272
- const universalJsSdk = yield import("@egova/universal-js-sdk");
273
- if (universalJsSdk && universalJsSdk.getJSI) {
274
- const fileJsi = (_a = universalJsSdk.getJSI()) == null ? void 0 : _a.file;
275
- hasDownloadSupport.value = !!(fileJsi && fileJsi.download);
276
- }
277
- } catch (e) {
278
- console.warn("Failed to check download support:", e);
279
- hasDownloadSupport.value = false;
280
- }
281
- }));
269
+ });
282
270
  (0, import_vue.watch)([import_utils.windowWidth, import_utils.windowHeight], resize);
283
271
  (0, import_vue.watch)(() => props.startPosition, (value) => setActive(+value));
284
272
  (0, import_vue.watch)(() => props.show, (value) => {
@@ -27,7 +27,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
27
27
  default: true;
28
28
  };
29
29
  showDownload: BooleanConstructor;
30
- downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean | void>;
30
+ downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean>;
31
31
  className: import("vue").PropType<unknown>;
32
32
  closeIcon: {
33
33
  type: import("vue").PropType<string>;
@@ -87,7 +87,7 @@ export declare const ImagePreview: import("../utils").WithInstall<import("vue").
87
87
  default: true;
88
88
  };
89
89
  showDownload: BooleanConstructor;
90
- downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean | void>;
90
+ downloadAction: import("vue").PropType<(params: import("./ImagePreview").DownloadActionParams) => boolean>;
91
91
  className: import("vue").PropType<unknown>;
92
92
  closeIcon: {
93
93
  type: import("vue").PropType<string>;
@@ -2,7 +2,7 @@ import type { CSSProperties, TeleportProps, ComponentPublicInstance } from 'vue'
2
2
  import type { Interceptor } from '../utils';
3
3
  import type { SwipeToOptions } from '../swipe';
4
4
  import type { PopupCloseIconPosition } from '../popup';
5
- import type { ImagePreviewProps } from './ImagePreview';
5
+ import type { DownloadActionParams, ImagePreviewProps } from './ImagePreview';
6
6
  export type ImageItem = {
7
7
  url: string;
8
8
  title?: string;
@@ -17,6 +17,7 @@ export type ImagePreviewOptions = {
17
17
  showIndex?: boolean;
18
18
  closeable?: boolean;
19
19
  showDownload?: boolean;
20
+ downloadAction?: (params: DownloadActionParams) => boolean;
20
21
  closeIcon?: string;
21
22
  transition?: string;
22
23
  beforeClose?: Interceptor;
package/lib/index.d.ts CHANGED
@@ -84,4 +84,4 @@ declare namespace _default {
84
84
  }
85
85
  export default _default;
86
86
  export function install(app: any): void;
87
- export const version: "3.1.73";
87
+ export const version: "3.1.74";
package/lib/index.js CHANGED
@@ -182,7 +182,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
182
182
  __reExport(stdin_exports, require("./toast"), module.exports);
183
183
  __reExport(stdin_exports, require("./uploader"), module.exports);
184
184
  __reExport(stdin_exports, require("./video"), module.exports);
185
- const version = "3.1.73";
185
+ const version = "3.1.74";
186
186
  function install(app) {
187
187
  const components = [
188
188
  import_action_sheet.ActionSheet,