zartui 3.1.37 → 3.1.39

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.
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, watch, createVNode as _createVNode, createTextVNode as _createTextVNode, mergeProps as _mergeProps, vShow as _vShow, withDirectives as _withDirectives } from "vue";
2
2
  import { createNamespace, ELLIPSIS, extend, HAPTICS_FEEDBACK, isSameValue, pick } from "../utils/index.mjs";
3
3
  import DateTimePicker, { dateTimePickerProps } from "./DateTimePickerWrapper.mjs";
4
- import { pickerInheritKeys } from "./utils.mjs";
4
+ import { pickerInheritKeys, popupInheritKeys } from "./utils.mjs";
5
5
  import Popup from "../popup/Popup.mjs";
6
6
  import Toolbar, { pickerToolbarPropKeys, pickerToolbarSlots } from "../picker/PickerToolbar.mjs";
7
7
  import Divider from "../divider/Divider.mjs";
@@ -252,13 +252,13 @@ var stdin_default = defineComponent({
252
252
  }), pick(slots, pickerToolbarSlots))];
253
253
  }
254
254
  };
255
- return () => _createVNode(Popup, {
255
+ return () => _createVNode(Popup, _mergeProps(pick(props, popupInheritKeys), {
256
256
  "round": true,
257
257
  "position": "bottom",
258
258
  "onOpen": onOpen,
259
259
  "show": currentShow.value,
260
260
  "onUpdate:show": ($event) => currentShow.value = $event
261
- }, {
261
+ }), {
262
262
  default: () => [renderTitle(), renderPicker(), renderToolbar()]
263
263
  });
264
264
  }
@@ -47,6 +47,7 @@ export declare const sharedProps: {
47
47
  };
48
48
  };
49
49
  export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "showTitle" | "allowHtml" | "cancelButtonText" | "confirmButtonText" | "swipeDuration" | "showToolbar" | "optionHeight" | "visibleOptionNum")[];
50
+ export declare const popupInheritKeys: any;
50
51
  export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
51
52
  export declare const getMonthEndDay: (year: number, month: number) => number;
52
53
  export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter) => PickerOption[];
@@ -1,5 +1,6 @@
1
1
  import { extend, padZero, makeArrayProp, clamp } from "../utils/index.mjs";
2
2
  import { pickerSharedProps } from "../picker/Picker.mjs";
3
+ import { popupSharedPropKeys } from "../popup/shared.mjs";
3
4
  const sharedProps = extend({}, pickerSharedProps, {
4
5
  modelValue: makeArrayProp(),
5
6
  filter: {
@@ -11,6 +12,12 @@ const sharedProps = extend({}, pickerSharedProps, {
11
12
  }
12
13
  });
13
14
  const pickerInheritKeys = Object.keys(pickerSharedProps);
15
+ const popupInheritKeys = [
16
+ ...popupSharedPropKeys,
17
+ "round",
18
+ "closeOnPopstate",
19
+ "safeAreaInsetBottom"
20
+ ];
14
21
  function times(n, iteratee) {
15
22
  if (n < 0) {
16
23
  return [];
@@ -47,6 +54,7 @@ export {
47
54
  genOptions,
48
55
  getMonthEndDay,
49
56
  pickerInheritKeys,
57
+ popupInheritKeys,
50
58
  sharedProps,
51
59
  times
52
60
  };
package/es/index.d.ts CHANGED
@@ -83,4 +83,4 @@ declare namespace _default {
83
83
  }
84
84
  export default _default;
85
85
  export function install(app: any): void;
86
- export const version: "3.1.37";
86
+ export const version: "3.1.39";
package/es/index.mjs CHANGED
@@ -76,7 +76,7 @@ import { Timeline } from "./timeline/index.mjs";
76
76
  import { Toast } from "./toast/index.mjs";
77
77
  import { Uploader } from "./uploader/index.mjs";
78
78
  import { Video } from "./video/index.mjs";
79
- const version = "3.1.37";
79
+ const version = "3.1.39";
80
80
  function install(app) {
81
81
  const components = [
82
82
  ActionSheet,
@@ -43,6 +43,7 @@ import { showImagePreview } from "../image-preview/index.mjs";
43
43
  import { ImageProcessor, checkWatermarkConfigSupported, CompressOptions, ResizeOptions } from "@egova-mobile/app-media-utils";
44
44
  import { isEmptyValue } from "../field/utils.mjs";
45
45
  import { wxUploadImage } from "./util/wx-util.mjs";
46
+ import { useExpose } from "../composables/use-expose.mjs";
46
47
  const [name, bem] = createNamespace("media-picker");
47
48
  const FILE_SIZE_LIMIT = 100;
48
49
  const mediaPickerProps = {
@@ -772,6 +773,9 @@ var stdin_default = defineComponent({
772
773
  actionVisible.value = false;
773
774
  action.func && action.func();
774
775
  };
776
+ useExpose({
777
+ mediaPick
778
+ });
775
779
  return () => {
776
780
  const title = props.showTitle && _createVNode("div", {
777
781
  "class": bem("title")
@@ -284,13 +284,13 @@ var stdin_default = (0, import_vue.defineComponent)({
284
284
  }), (0, import_utils.pick)(slots, import_PickerToolbar.pickerToolbarSlots))];
285
285
  }
286
286
  };
287
- return () => (0, import_vue.createVNode)(import_Popup.default, {
287
+ return () => (0, import_vue.createVNode)(import_Popup.default, (0, import_vue.mergeProps)((0, import_utils.pick)(props, import_utils2.popupInheritKeys), {
288
288
  "round": true,
289
289
  "position": "bottom",
290
290
  "onOpen": onOpen,
291
291
  "show": currentShow.value,
292
292
  "onUpdate:show": ($event) => currentShow.value = $event
293
- }, {
293
+ }), {
294
294
  default: () => [renderTitle(), renderPicker(), renderToolbar()]
295
295
  });
296
296
  }
@@ -47,6 +47,7 @@ export declare const sharedProps: {
47
47
  };
48
48
  };
49
49
  export declare const pickerInheritKeys: ("title" | "readonly" | "loading" | "showTitle" | "allowHtml" | "cancelButtonText" | "confirmButtonText" | "swipeDuration" | "showToolbar" | "optionHeight" | "visibleOptionNum")[];
50
+ export declare const popupInheritKeys: any;
50
51
  export declare function times<T>(n: number, iteratee: (index: number) => T): T[];
51
52
  export declare const getMonthEndDay: (year: number, month: number) => number;
52
53
  export declare const genOptions: <T extends string>(min: number, max: number, type: T, formatter: Formatter, filter?: Filter) => PickerOption[];
@@ -21,12 +21,14 @@ __export(stdin_exports, {
21
21
  genOptions: () => genOptions,
22
22
  getMonthEndDay: () => getMonthEndDay,
23
23
  pickerInheritKeys: () => pickerInheritKeys,
24
+ popupInheritKeys: () => popupInheritKeys,
24
25
  sharedProps: () => sharedProps,
25
26
  times: () => times
26
27
  });
27
28
  module.exports = __toCommonJS(stdin_exports);
28
29
  var import_utils = require("../utils");
29
30
  var import_Picker = require("../picker/Picker");
31
+ var import_shared = require("../popup/shared");
30
32
  const sharedProps = (0, import_utils.extend)({}, import_Picker.pickerSharedProps, {
31
33
  modelValue: (0, import_utils.makeArrayProp)(),
32
34
  filter: {
@@ -38,6 +40,12 @@ const sharedProps = (0, import_utils.extend)({}, import_Picker.pickerSharedProps
38
40
  }
39
41
  });
40
42
  const pickerInheritKeys = Object.keys(import_Picker.pickerSharedProps);
43
+ const popupInheritKeys = [
44
+ ...import_shared.popupSharedPropKeys,
45
+ "round",
46
+ "closeOnPopstate",
47
+ "safeAreaInsetBottom"
48
+ ];
41
49
  function times(n, iteratee) {
42
50
  if (n < 0) {
43
51
  return [];
package/lib/index.d.ts CHANGED
@@ -83,4 +83,4 @@ declare namespace _default {
83
83
  }
84
84
  export default _default;
85
85
  export function install(app: any): void;
86
- export const version: "3.1.37";
86
+ export const version: "3.1.39";
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.37";
183
+ const version = "3.1.39";
184
184
  function install(app) {
185
185
  const components = [
186
186
  import_action_sheet.ActionSheet,
@@ -75,6 +75,7 @@ var import_image_preview = require("../image-preview");
75
75
  var import_app_media_utils = require("@egova-mobile/app-media-utils");
76
76
  var import_utils2 = require("../field/utils");
77
77
  var import_wx_util = require("./util/wx-util");
78
+ var import_use_expose = require("../composables/use-expose");
78
79
  const [name, bem] = (0, import_utils.createNamespace)("media-picker");
79
80
  const FILE_SIZE_LIMIT = 100;
80
81
  const mediaPickerProps = {
@@ -804,6 +805,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
804
805
  actionVisible.value = false;
805
806
  action.func && action.func();
806
807
  };
808
+ (0, import_use_expose.useExpose)({
809
+ mediaPick
810
+ });
807
811
  return () => {
808
812
  const title = props.showTitle && (0, import_vue.createVNode)("div", {
809
813
  "class": bem("title")