@nickeylin/antd-mobile-pro 2.1.3 → 2.1.5

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.
Files changed (44) hide show
  1. package/dist/cjs/components/action-sheet-picker/picker.js +2 -2
  2. package/dist/cjs/components/bar-code/bar-code.js +2 -2
  3. package/dist/cjs/components/card-tabs/tabs.js +2 -2
  4. package/dist/cjs/components/checkbox/checkbox.d.ts +1 -1
  5. package/dist/cjs/components/checkbox/index.d.ts +1 -1
  6. package/dist/cjs/components/config-provider/provider.js +2 -2
  7. package/dist/cjs/components/input-captcha/input-captcha.d.ts +1 -1
  8. package/dist/cjs/components/popup-picker-base/use-popup-picker-mixin.js +2 -2
  9. package/dist/cjs/components/pro-calendar/pro-calendar.js +2 -2
  10. package/dist/cjs/components/pro-calendar-picker/picker.js +2 -2
  11. package/dist/cjs/components/pro-calendar-picker/pro-calendar-picker.js +2 -2
  12. package/dist/cjs/components/pro-form/pro-form-item-dependency.js +2 -2
  13. package/dist/cjs/components/pro-form/pro-form.d.ts +18 -13
  14. package/dist/cjs/components/pro-form/pro-form.js +1 -2
  15. package/dist/cjs/components/pro-form/utils.js +8 -8
  16. package/dist/cjs/components/tree/tree.js +3 -3
  17. package/dist/cjs/components/tree-picker/index.d.ts +1 -1
  18. package/dist/cjs/components/tree-picker/tree-picker.d.ts +1 -1
  19. package/dist/cjs/components/utils/format-url.js +4 -4
  20. package/dist/cjs/components/utils/object-assign-append.js +2 -2
  21. package/dist/cjs/locales/base.js +2 -2
  22. package/dist/es/components/action-sheet-picker/picker.js +1 -1
  23. package/dist/es/components/bar-code/bar-code.js +1 -1
  24. package/dist/es/components/card-tabs/tabs.js +1 -1
  25. package/dist/es/components/checkbox/checkbox.d.ts +1 -1
  26. package/dist/es/components/checkbox/index.d.ts +1 -1
  27. package/dist/es/components/config-provider/provider.js +1 -1
  28. package/dist/es/components/input-captcha/input-captcha.d.ts +1 -1
  29. package/dist/es/components/popup-picker-base/use-popup-picker-mixin.js +1 -1
  30. package/dist/es/components/pro-calendar/pro-calendar.js +1 -1
  31. package/dist/es/components/pro-calendar-picker/picker.js +1 -1
  32. package/dist/es/components/pro-calendar-picker/pro-calendar-picker.js +1 -1
  33. package/dist/es/components/pro-form/pro-form-item-dependency.js +1 -1
  34. package/dist/es/components/pro-form/pro-form.d.ts +18 -13
  35. package/dist/es/components/pro-form/pro-form.js +1 -5
  36. package/dist/es/components/pro-form/utils.js +1 -1
  37. package/dist/es/components/tree/tree.js +2 -2
  38. package/dist/es/components/tree-picker/index.d.ts +1 -1
  39. package/dist/es/components/tree-picker/tree-picker.d.ts +1 -1
  40. package/dist/es/components/utils/format-url.js +1 -1
  41. package/dist/es/components/utils/object-assign-append.js +1 -1
  42. package/dist/es/locales/base.js +1 -1
  43. package/dist/umd/antd-mobile-pro.min.js +1 -1
  44. package/package.json +4 -4
@@ -34,7 +34,7 @@ __export(picker_exports, {
34
34
  module.exports = __toCommonJS(picker_exports);
35
35
  var import_ahooks = require("ahooks");
36
36
  var import_antd_mobile = require("antd-mobile");
37
- var import_lodash = require("lodash");
37
+ var import_lodash_es = require("lodash-es");
38
38
  var import_react = require("react");
39
39
  var import_forward_ref_with_generics = __toESM(require("../../utils/forward-ref-with-generics"));
40
40
  var import_config_provider = require("../config-provider");
@@ -51,7 +51,7 @@ function ActionSheetPickerRaw({
51
51
  const { locale } = (0, import_config_provider.useConfig)();
52
52
  const { value: valueKey = "key", text: textKey = "text" } = fieldNames ?? {};
53
53
  const [visible, setVisible] = (0, import_ahooks.useControllableValue)(
54
- (0, import_lodash.pickBy)({
54
+ (0, import_lodash_es.pickBy)({
55
55
  value: visibleProp,
56
56
  onChange(value2) {
57
57
  if (!value2)
@@ -38,7 +38,7 @@ module.exports = __toCommonJS(bar_code_exports);
38
38
  var import_rc_utils = require("@nickeylin/rc-utils");
39
39
  var import_classnames = __toESM(require("classnames"));
40
40
  var import_jsbarcode = __toESM(require("jsbarcode"));
41
- var import_lodash = require("lodash");
41
+ var import_lodash_es = require("lodash-es");
42
42
  var import_react = require("react");
43
43
  var import_bem = require("../../utils/bem");
44
44
  var bem = (0, import_bem.cn)("barcode");
@@ -48,7 +48,7 @@ function useJsBarcode(value, option) {
48
48
  format: "CODE128",
49
49
  height: 40,
50
50
  fontSize: 14,
51
- ...(0, import_lodash.pickBy)(option)
51
+ ...(0, import_lodash_es.pickBy)(option)
52
52
  });
53
53
  console.log(option);
54
54
  (0, import_react.useEffect)(() => {
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(tabs_exports);
35
35
  var import_antd_mobile = require("antd-mobile");
36
36
  var import_antd_mobile_icons = require("antd-mobile-icons");
37
37
  var import_classnames = __toESM(require("classnames"));
38
- var import_lodash = require("lodash");
38
+ var import_lodash_es = require("lodash-es");
39
39
  var import_bem = require("../../utils/bem");
40
40
  var bem = (0, import_bem.cn)("card-tabs");
41
41
  var CardTabs = ({
@@ -48,7 +48,7 @@ var CardTabs = ({
48
48
  style = {},
49
49
  ...props
50
50
  }) => {
51
- const styles = (0, import_lodash.pick)(style, [
51
+ const styles = (0, import_lodash_es.pick)(style, [
52
52
  "--fixed-active-line-width",
53
53
  "--active-line-height",
54
54
  "--active-line-border-radius",
@@ -17,7 +17,7 @@ declare const Checkbox: import("react").ForwardRefExoticComponent<{
17
17
  onClick?: ((event: import("react").MouseEvent<HTMLLabelElement, MouseEvent>) => void) | undefined;
18
18
  } & {
19
19
  className?: string | undefined;
20
- style?: (import("react").CSSProperties & Partial<Record<"--font-size" | "--gap" | "--icon-size", string>>) | undefined;
20
+ style?: (import("react").CSSProperties & Partial<Record<"--gap" | "--icon-size" | "--font-size", string>>) | undefined;
21
21
  tabIndex?: number | undefined;
22
22
  } & import("react").AriaAttributes & {
23
23
  shape?: "circle" | "square" | undefined;
@@ -14,7 +14,7 @@ declare const Checkbox: import("react").ForwardRefExoticComponent<{
14
14
  onClick?: ((event: import("react").MouseEvent<HTMLLabelElement, MouseEvent>) => void) | undefined;
15
15
  } & {
16
16
  className?: string | undefined;
17
- style?: (import("react").CSSProperties & Partial<Record<"--font-size" | "--gap" | "--icon-size", string>>) | undefined;
17
+ style?: (import("react").CSSProperties & Partial<Record<"--gap" | "--icon-size" | "--font-size", string>>) | undefined;
18
18
  tabIndex?: number | undefined;
19
19
  } & import("react").AriaAttributes & {
20
20
  shape?: "circle" | "square" | undefined;
@@ -35,7 +35,7 @@ __export(provider_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(provider_exports);
37
37
  var import_antd_mobile = require("antd-mobile");
38
- var import_lodash = require("lodash");
38
+ var import_lodash_es = require("lodash-es");
39
39
  var import_react = require("react");
40
40
  var import_zh_CN = __toESM(require("../../locales/zh-CN"));
41
41
  var import_elements_holder = __toESM(require("./elements-holder"));
@@ -53,7 +53,7 @@ var ConfigProvider = ({
53
53
  }) => {
54
54
  const parentValues = useConfig();
55
55
  const holderRef = (0, import_react.useRef)(null);
56
- const values = (0, import_lodash.merge)({}, parentValues, valuesProp);
56
+ const values = (0, import_lodash_es.merge)({}, parentValues, valuesProp);
57
57
  return /* @__PURE__ */ React.createElement(import_antd_mobile.ConfigProvider, { locale: values.locale }, /* @__PURE__ */ React.createElement(ConfigContext.Provider, { value: { ...values, holderRef } }, children, /* @__PURE__ */ React.createElement(import_elements_holder.default, { ref: holderRef })));
58
58
  };
59
59
  // Annotate the CommonJS export names for ESM import in node:
@@ -23,7 +23,7 @@ declare const InputCaptcha: import("react").ForwardRefExoticComponent<{
23
23
  className?: string | undefined;
24
24
  style?: (import("react").CSSProperties & Partial<Record<never, string>>) | undefined;
25
25
  tabIndex?: number | undefined;
26
- } & import("react").AriaAttributes & Omit<InputProps, "className" | "style"> & {
26
+ } & import("react").AriaAttributes & Omit<InputProps, "style" | "className"> & {
27
27
  inputClassName?: string | undefined;
28
28
  inputStyle?: InputProps['style'];
29
29
  /** 获取验证码按钮的 props */
@@ -23,7 +23,7 @@ __export(use_popup_picker_mixin_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(use_popup_picker_mixin_exports);
25
25
  var import_rc_utils = require("@nickeylin/rc-utils");
26
- var import_lodash = require("lodash");
26
+ var import_lodash_es = require("lodash-es");
27
27
  var import_react = require("react");
28
28
  function getLabel(item, labelKey) {
29
29
  if (!item)
@@ -103,7 +103,7 @@ function usePopupPickerMixin({ confirm, fieldNames, ...props }, ref) {
103
103
  setValue(null);
104
104
  setVisible(false);
105
105
  },
106
- ...(0, import_lodash.pick)(
106
+ ...(0, import_lodash_es.pick)(
107
107
  props,
108
108
  "title",
109
109
  "afterClose",
@@ -37,7 +37,7 @@ var import_ahooks = require("ahooks");
37
37
  var import_antd_mobile = require("antd-mobile");
38
38
  var import_classnames = __toESM(require("classnames"));
39
39
  var import_dayjs = __toESM(require("dayjs"));
40
- var import_lodash = require("lodash");
40
+ var import_lodash_es = require("lodash-es");
41
41
  var import_react = require("react");
42
42
  var import_bem = require("../../utils/bem");
43
43
  var import_utils = require("./utils");
@@ -64,7 +64,7 @@ var ProCalendarRaw = ({
64
64
  ...props
65
65
  }, ref) => {
66
66
  const [value, setValue_] = (0, import_ahooks.useControllableValue)(
67
- (0, import_lodash.pickBy)(
67
+ (0, import_lodash_es.pickBy)(
68
68
  {
69
69
  value: valueProp,
70
70
  defaultValue: defaultValueProp,
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(picker_exports);
35
35
  var import_rc_utils = require("@nickeylin/rc-utils");
36
36
  var import_antd_mobile = require("antd-mobile");
37
37
  var import_dayjs = __toESM(require("dayjs"));
38
- var import_lodash = require("lodash");
38
+ var import_lodash_es = require("lodash-es");
39
39
  var import_react = require("react");
40
40
  function toDateValue(val, option) {
41
41
  const { mode = "single", format = "YYYY-MM-DD" } = option;
@@ -65,7 +65,7 @@ function toStringValue(val, option) {
65
65
  if (mode === "range" && Array.isArray(val) && val.length == 2) {
66
66
  return val.map((v) => (0, import_dayjs.default)(v).format(format));
67
67
  }
68
- if (mode === "single" && (0, import_lodash.isDate)(val)) {
68
+ if (mode === "single" && (0, import_lodash_es.isDate)(val)) {
69
69
  return (0, import_dayjs.default)(val).format(format);
70
70
  }
71
71
  return null;
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(pro_calendar_picker_exports);
35
35
  var import_ahooks = require("ahooks");
36
36
  var import_antd_mobile = require("antd-mobile");
37
37
  var import_antd_mobile_icons = require("antd-mobile-icons");
38
- var import_lodash = require("lodash");
38
+ var import_lodash_es = require("lodash-es");
39
39
  var import_react = require("react");
40
40
  var import_bem = require("../../utils/bem");
41
41
  var import_pro_calendar = __toESM(require("../pro-calendar"));
@@ -49,7 +49,7 @@ var ProCalendarPickerRaw = ({
49
49
  ...props
50
50
  }, ref) => {
51
51
  const [value, setValue] = (0, import_ahooks.useControllableValue)(
52
- (0, import_lodash.pickBy)({
52
+ (0, import_lodash_es.pickBy)({
53
53
  value: valueProp,
54
54
  onChange
55
55
  })
@@ -32,7 +32,7 @@ __export(pro_form_item_dependency_exports, {
32
32
  default: () => pro_form_item_dependency_default
33
33
  });
34
34
  module.exports = __toCommonJS(pro_form_item_dependency_exports);
35
- var import_lodash = require("lodash");
35
+ var import_lodash_es = require("lodash-es");
36
36
  var import_pro_form_item = __toESM(require("./pro-form-item"));
37
37
  function ProFormDependency({
38
38
  name,
@@ -52,7 +52,7 @@ function ProFormDependency({
52
52
  return props.shouldUpdate(prevValues, nextValues, info);
53
53
  }
54
54
  return name.some((n) => {
55
- return !(0, import_lodash.isEqual)((0, import_lodash.get)(prevValues, n), (0, import_lodash.get)(nextValues, n));
55
+ return !(0, import_lodash_es.isEqual)((0, import_lodash_es.get)(prevValues, n), (0, import_lodash_es.get)(nextValues, n));
56
56
  });
57
57
  }
58
58
  },
@@ -1,12 +1,11 @@
1
- import { Form, FormProps } from 'antd-mobile';
1
+ import { FormProps } from 'antd-mobile';
2
2
  import { FormProps as RcFormProps } from 'rc-field-form';
3
3
  import { ForwardedRef } from 'react';
4
4
  import { SubmitterProps } from './default-submitter';
5
5
  import { ProFormContextType } from './pro-form-context';
6
- import ProFormItem, { ProFormItemValue } from './pro-form-item';
7
6
  import { ProFormInstance } from './types';
8
7
  import { useFormInstace } from './use-form-instance';
9
- export type ProFormProps<Values extends object = any> = Omit<FormProps, 'onFinish' | 'onValuesChange' | 'onFinishFailed'> & Pick<RcFormProps<Values>, 'form' | 'onValuesChange' | 'onFinishFailed'> & ProFormContextType & {
8
+ export type ProFormProps<Values extends object = any> = Omit<FormProps, 'onFinish' | 'onValuesChange' | 'onFinishFailed' | 'form'> & Pick<RcFormProps<Values>, 'form' | 'onValuesChange' | 'onFinishFailed'> & ProFormContextType & {
10
9
  onFinish?(values: Values): Promise<void>;
11
10
  params?: any;
12
11
  request?(params: any): Promise<Partial<Values>>;
@@ -16,14 +15,20 @@ export type ProFormProps<Values extends object = any> = Omit<FormProps, 'onFinis
16
15
  */
17
16
  submitter?: false | SubmitterProps;
18
17
  };
19
- interface ProFormWithHooks<Values extends object = any> extends React.FC<ProFormProps<Values>> {
20
- useForm: typeof Form.useForm;
21
- useWatch: typeof Form.useWatch;
22
- Header: typeof Form.Header;
23
- Item: typeof ProFormItem;
24
- ItemValue: typeof ProFormItemValue;
25
- Subscribe: typeof Form.Subscribe;
26
- useFormInstance: typeof useFormInstace;
18
+ declare function ProForm<Values extends object = any>({ onFinish, params, request, initialValues, disabled, form: formProp, formRef, submitter, layout, className, childElementPosition, readonly, ...props }: ProFormProps<Values>): JSX.Element;
19
+ declare namespace ProForm {
20
+ var useForm: typeof import("rc-field-form").useForm;
21
+ var useWatch: typeof import("rc-field-form").useWatch;
22
+ var Header: import("react").FC<{
23
+ children?: import("react").ReactNode;
24
+ }>;
25
+ var Item: import("react").FC<import("./pro-form-item").ProFormItemProps>;
26
+ var ItemValue: import("react").FC<{
27
+ value?: import("react").ReactNode;
28
+ placeholder?: string | undefined;
29
+ readonly?: boolean | undefined;
30
+ }>;
31
+ var Subscribe: import("react").FC<import("antd-mobile/es/components/form").FormSubscribeProps>;
32
+ var useFormInstance: typeof useFormInstace;
27
33
  }
28
- declare const TypedProForm: ProFormWithHooks<any>;
29
- export default TypedProForm;
34
+ export default ProForm;
@@ -200,5 +200,4 @@ ProForm.Item = import_pro_form_item.default;
200
200
  ProForm.ItemValue = import_pro_form_item.ProFormItemValue;
201
201
  ProForm.Subscribe = import_antd_mobile.Form.Subscribe;
202
202
  ProForm.useFormInstance = import_use_form_instance.useFormInstace;
203
- var TypedProForm = ProForm;
204
- var pro_form_default = TypedProForm;
203
+ var pro_form_default = ProForm;
@@ -37,11 +37,11 @@ __export(utils_exports, {
37
37
  module.exports = __toCommonJS(utils_exports);
38
38
  var import_rc_utils = require("@nickeylin/rc-utils");
39
39
  var import_ahooks = require("ahooks");
40
- var import_lodash = require("lodash");
40
+ var import_lodash_es = require("lodash-es");
41
41
  var import_react = require("react");
42
42
  var import_pro_form_context = __toESM(require("./pro-form-context"));
43
43
  function traverse(target, callback, parentKeyPath) {
44
- if (typeof target !== "object" || (0, import_lodash.isNil)(target) || target instanceof Blob) {
44
+ if (typeof target !== "object" || (0, import_lodash_es.isNil)(target) || target instanceof Blob) {
45
45
  return target;
46
46
  }
47
47
  const keys = Object.keys(target);
@@ -57,7 +57,7 @@ function traverse(target, callback, parentKeyPath) {
57
57
  function transformKey(target, transformers, option = {}) {
58
58
  const dataFormatMap = Object.keys(transformers).reduce((ret, key) => {
59
59
  const value = transformers[key];
60
- if (!(0, import_lodash.isNil)(value)) {
60
+ if (!(0, import_lodash_es.isNil)(value)) {
61
61
  ret[key] = value;
62
62
  }
63
63
  return ret;
@@ -67,14 +67,14 @@ function transformKey(target, transformers, option = {}) {
67
67
  }
68
68
  if (typeof window === "undefined")
69
69
  return target;
70
- if (typeof target !== "object" || (0, import_lodash.isNil)(target) || target instanceof Blob) {
70
+ if (typeof target !== "object" || (0, import_lodash_es.isNil)(target) || target instanceof Blob) {
71
71
  return target;
72
72
  }
73
73
  const { omitNil, keyPath } = option;
74
74
  if (keyPath) {
75
75
  const keyStr = keyPath.join(".");
76
76
  const transform = transformers[keyStr];
77
- const value = (0, import_lodash.get)(target, keyPath);
77
+ const value = (0, import_lodash_es.get)(target, keyPath);
78
78
  return transform ? transform(value, keyStr, target) : value;
79
79
  }
80
80
  const nextObj = {};
@@ -82,14 +82,14 @@ function transformKey(target, transformers, option = {}) {
82
82
  if (omitNil && !value)
83
83
  return false;
84
84
  const keyStr = keyPath2.join(".");
85
- const oldValue = (0, import_lodash.get)(target, keyPath2);
85
+ const oldValue = (0, import_lodash_es.get)(target, keyPath2);
86
86
  const transform = transformers[keyStr];
87
87
  if (transform) {
88
88
  const newValue = transform(oldValue, keyStr, target);
89
- (0, import_lodash.set)(nextObj, keyPath2, newValue);
89
+ (0, import_lodash_es.set)(nextObj, keyPath2, newValue);
90
90
  return true;
91
91
  } else {
92
- (0, import_lodash.set)(nextObj, keyPath2, oldValue);
92
+ (0, import_lodash_es.set)(nextObj, keyPath2, oldValue);
93
93
  return false;
94
94
  }
95
95
  });
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(tree_exports);
35
35
  var import_icons = require("@ant-design/icons");
36
36
  var import_antd_mobile = require("antd-mobile");
37
37
  var import_classnames = __toESM(require("classnames"));
38
- var import_lodash = require("lodash");
38
+ var import_lodash_es = require("lodash-es");
39
39
  var import_rc_tree = __toESM(require("rc-tree"));
40
40
  var import_react = require("react");
41
41
  var import_bem = require("../../utils/bem");
@@ -63,8 +63,8 @@ function transformTreeData(treeData, rowKey, titleKey) {
63
63
  function filterNodes(searchValue, treeData) {
64
64
  const newArr = [];
65
65
  treeData.forEach((treeNode) => {
66
- const filterName = "name";
67
- const fieldValue = (0, import_lodash.get)(treeNode, filterName, "") || "";
66
+ const filterName = "title";
67
+ const fieldValue = (0, import_lodash_es.get)(treeNode, filterName, "") || "";
68
68
  if (fieldValue !== "" && fieldValue !== null && fieldValue !== void 0 && fieldValue.toLowerCase().indexOf(searchValue) > -1) {
69
69
  newArr.push(treeNode);
70
70
  } else if (treeNode.children && treeNode.children.length > 0) {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import prompt from './prompt';
3
3
  import './tree-picker.less';
4
- declare const TreePicker: (<T extends import("..").TreeDataNode<object> = import("..").TreeDataNode<object>>(props: Omit<import("..").PopupPickerMixinProps<T | T[]>, "fieldNames"> & Pick<import("..").TreeProps<T>, "search" | "params" | "request" | "fieldNames" | "rowKey" | "dataSource"> & {
4
+ declare const TreePicker: (<T extends import("..").TreeDataNode<object> = import("..").TreeDataNode<object>>(props: Omit<import("..").PopupPickerMixinProps<T | T[]>, "fieldNames"> & Pick<import("..").TreeProps<T>, "search" | "fieldNames" | "dataSource" | "rowKey" | "params" | "request"> & {
5
5
  treeProps?: Omit<import("..").TreeProps<T>, "rowKey"> | undefined;
6
6
  multiple?: boolean | undefined;
7
7
  } & {
@@ -9,7 +9,7 @@ export type TreePickerProps<T extends TreeDataNode<object> = TreeDataNode<object
9
9
  */
10
10
  multiple?: boolean;
11
11
  } & NativeProps;
12
- declare const TreePicker: <T extends TreeDataNode<object> = TreeDataNode<object>>(props: Omit<PopupPickerMixinProps<T | T[]>, "fieldNames"> & Pick<TreeProps<T>, "search" | "params" | "request" | "rowKey" | "fieldNames" | "dataSource"> & {
12
+ declare const TreePicker: <T extends TreeDataNode<object> = TreeDataNode<object>>(props: Omit<PopupPickerMixinProps<T | T[]>, "fieldNames"> & Pick<TreeProps<T>, "search" | "fieldNames" | "dataSource" | "rowKey" | "params" | "request"> & {
13
13
  treeProps?: Omit<TreeProps<T>, "rowKey"> | undefined;
14
14
  /**
15
15
  * 启用多选时,将启用复选框禁用选择,即点击整行会选中复选框
@@ -22,11 +22,11 @@ __export(format_url_exports, {
22
22
  default: () => format_url_default
23
23
  });
24
24
  module.exports = __toCommonJS(format_url_exports);
25
- var import_lodash = require("lodash");
25
+ var import_lodash_es = require("lodash-es");
26
26
  function formatUrl(originBaseUrl, originUrl) {
27
- const url = (0, import_lodash.startsWith)(originUrl, "/") ? originUrl.substr(1) : originUrl;
28
- const baseUrl = (0, import_lodash.endsWith)(originBaseUrl, "/") ? originBaseUrl.substr(0, originBaseUrl.length - 1) : originBaseUrl;
29
- if ((0, import_lodash.startsWith)(baseUrl, "http") || (0, import_lodash.startsWith)(baseUrl, "/")) {
27
+ const url = (0, import_lodash_es.startsWith)(originUrl, "/") ? originUrl.substr(1) : originUrl;
28
+ const baseUrl = (0, import_lodash_es.endsWith)(originBaseUrl, "/") ? originBaseUrl.substr(0, originBaseUrl.length - 1) : originBaseUrl;
29
+ if ((0, import_lodash_es.startsWith)(baseUrl, "http") || (0, import_lodash_es.startsWith)(baseUrl, "/")) {
30
30
  return `${baseUrl}/${url}`;
31
31
  }
32
32
  return `/${baseUrl}/${url}`;
@@ -22,11 +22,11 @@ __export(object_assign_append_exports, {
22
22
  objectAssignAppend: () => objectAssignAppend
23
23
  });
24
24
  module.exports = __toCommonJS(object_assign_append_exports);
25
- var import_lodash = require("lodash");
25
+ var import_lodash_es = require("lodash-es");
26
26
  function objectAssignAppend(o, c) {
27
27
  if (o && c && typeof c === "object") {
28
28
  for (const p in c) {
29
- if (!(0, import_lodash.has)(o, p)) {
29
+ if (!(0, import_lodash_es.has)(o, p)) {
30
30
  o[p] = c[p];
31
31
  }
32
32
  }
@@ -25,8 +25,8 @@ __export(base_exports, {
25
25
  module.exports = __toCommonJS(base_exports);
26
26
  var import_base = require("antd-mobile/cjs/locales/base");
27
27
  var import_merge_locale = require("antd-mobile/cjs/utils/merge-locale");
28
- var import_lodash = require("lodash");
29
- var base = (0, import_lodash.merge)(import_base.base, {
28
+ var import_lodash_es = require("lodash-es");
29
+ var base = (0, import_lodash_es.merge)(import_base.base, {
30
30
  common: {
31
31
  userCancel: "user cancel",
32
32
  noDataSourceSet: "no data source set",
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  import { useControllableValue } from 'ahooks';
8
8
  import { ActionSheet } from 'antd-mobile';
9
- import { pickBy } from 'lodash';
9
+ import { pickBy } from 'lodash-es';
10
10
  import { useImperativeHandle, useMemo } from 'react';
11
11
  import forwardRefWithGenerics from "../../utils/forward-ref-with-generics";
12
12
  import { useConfig } from "../config-provider";
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  import { useDeepCompareMemoize } from '@nickeylin/rc-utils';
9
9
  import cls from 'classnames';
10
10
  import JsBarcode from 'jsbarcode';
11
- import { pickBy } from 'lodash';
11
+ import { pickBy } from 'lodash-es';
12
12
  import { useEffect, useRef } from 'react';
13
13
  import { cn } from "../../utils/bem";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -6,7 +6,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
6
6
  import { Button, Space, Tabs } from 'antd-mobile';
7
7
  import { DeleteOutline } from 'antd-mobile-icons';
8
8
  import classNames from 'classnames';
9
- import { pick } from 'lodash';
9
+ import { pick } from 'lodash-es';
10
10
  import { cn } from "../../utils/bem";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -17,7 +17,7 @@ declare const Checkbox: import("react").ForwardRefExoticComponent<{
17
17
  onClick?: ((event: import("react").MouseEvent<HTMLLabelElement, MouseEvent>) => void) | undefined;
18
18
  } & {
19
19
  className?: string | undefined;
20
- style?: (import("react").CSSProperties & Partial<Record<"--font-size" | "--gap" | "--icon-size", string>>) | undefined;
20
+ style?: (import("react").CSSProperties & Partial<Record<"--gap" | "--icon-size" | "--font-size", string>>) | undefined;
21
21
  tabIndex?: number | undefined;
22
22
  } & import("react").AriaAttributes & {
23
23
  shape?: "circle" | "square" | undefined;
@@ -14,7 +14,7 @@ declare const Checkbox: import("react").ForwardRefExoticComponent<{
14
14
  onClick?: ((event: import("react").MouseEvent<HTMLLabelElement, MouseEvent>) => void) | undefined;
15
15
  } & {
16
16
  className?: string | undefined;
17
- style?: (import("react").CSSProperties & Partial<Record<"--font-size" | "--gap" | "--icon-size", string>>) | undefined;
17
+ style?: (import("react").CSSProperties & Partial<Record<"--gap" | "--icon-size" | "--font-size", string>>) | undefined;
18
18
  tabIndex?: number | undefined;
19
19
  } & import("react").AriaAttributes & {
20
20
  shape?: "circle" | "square" | undefined;
@@ -4,7 +4,7 @@ var _excluded = ["children"];
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  import { ConfigProvider as AntConfigProvider } from 'antd-mobile';
7
- import { merge } from 'lodash';
7
+ import { merge } from 'lodash-es';
8
8
  import { createContext, createRef, useContext, useRef } from 'react';
9
9
  import zhCN from "../../locales/zh-CN";
10
10
  import ElementsHolder from "./elements-holder";
@@ -23,7 +23,7 @@ declare const InputCaptcha: import("react").ForwardRefExoticComponent<{
23
23
  className?: string | undefined;
24
24
  style?: (import("react").CSSProperties & Partial<Record<never, string>>) | undefined;
25
25
  tabIndex?: number | undefined;
26
- } & import("react").AriaAttributes & Omit<InputProps, "className" | "style"> & {
26
+ } & import("react").AriaAttributes & Omit<InputProps, "style" | "className"> & {
27
27
  inputClassName?: string | undefined;
28
28
  inputStyle?: InputProps['style'];
29
29
  /** 获取验证码按钮的 props */
@@ -6,7 +6,7 @@ var _excluded = ["confirm", "fieldNames"];
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import { isReactNode, useMergedState } from '@nickeylin/rc-utils';
9
- import { pick } from 'lodash';
9
+ import { pick } from 'lodash-es';
10
10
  import { useEffect, useImperativeHandle, useMemo, useState } from 'react';
11
11
  function getLabel(item, labelKey) {
12
12
  if (!item) return '';
@@ -9,7 +9,7 @@ import { useControllableValue } from 'ahooks';
9
9
  import { Calendar, Popover } from 'antd-mobile';
10
10
  import classNames from 'classnames';
11
11
  import dayjs from 'dayjs';
12
- import { pickBy } from 'lodash';
12
+ import { pickBy } from 'lodash-es';
13
13
  import { cloneElement, forwardRef, useCallback, useMemo } from 'react';
14
14
  import { cn } from "../../utils/bem";
15
15
  import { HALF_DAY_PERIOD, HALF_DAY_PERIOD_NAMES, classesForDate, mergeDates } from "./utils";
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { useMergedState } from '@nickeylin/rc-utils';
8
8
  import { CalendarPicker } from 'antd-mobile';
9
9
  import dayjs from 'dayjs';
10
- import { isDate } from 'lodash';
10
+ import { isDate } from 'lodash-es';
11
11
  import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { useControllableValue } from 'ahooks';
8
8
  import { Button, Popup, SafeArea } from 'antd-mobile';
9
9
  import { CloseOutline } from 'antd-mobile-icons';
10
- import { pickBy } from 'lodash';
10
+ import { pickBy } from 'lodash-es';
11
11
  import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
12
12
  import { cn } from "../../utils/bem";
13
13
  import ProCalendar from "../pro-calendar";
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["name", "children"];
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- import { get, isEqual } from 'lodash';
6
+ import { get, isEqual } from 'lodash-es';
7
7
  import ProFormItem from "./pro-form-item";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  function ProFormDependency(_ref) {
@@ -1,12 +1,11 @@
1
- import { Form, FormProps } from 'antd-mobile';
1
+ import { FormProps } from 'antd-mobile';
2
2
  import { FormProps as RcFormProps } from 'rc-field-form';
3
3
  import { ForwardedRef } from 'react';
4
4
  import { SubmitterProps } from './default-submitter';
5
5
  import { ProFormContextType } from './pro-form-context';
6
- import ProFormItem, { ProFormItemValue } from './pro-form-item';
7
6
  import { ProFormInstance } from './types';
8
7
  import { useFormInstace } from './use-form-instance';
9
- export type ProFormProps<Values extends object = any> = Omit<FormProps, 'onFinish' | 'onValuesChange' | 'onFinishFailed'> & Pick<RcFormProps<Values>, 'form' | 'onValuesChange' | 'onFinishFailed'> & ProFormContextType & {
8
+ export type ProFormProps<Values extends object = any> = Omit<FormProps, 'onFinish' | 'onValuesChange' | 'onFinishFailed' | 'form'> & Pick<RcFormProps<Values>, 'form' | 'onValuesChange' | 'onFinishFailed'> & ProFormContextType & {
10
9
  onFinish?(values: Values): Promise<void>;
11
10
  params?: any;
12
11
  request?(params: any): Promise<Partial<Values>>;
@@ -16,14 +15,20 @@ export type ProFormProps<Values extends object = any> = Omit<FormProps, 'onFinis
16
15
  */
17
16
  submitter?: false | SubmitterProps;
18
17
  };
19
- interface ProFormWithHooks<Values extends object = any> extends React.FC<ProFormProps<Values>> {
20
- useForm: typeof Form.useForm;
21
- useWatch: typeof Form.useWatch;
22
- Header: typeof Form.Header;
23
- Item: typeof ProFormItem;
24
- ItemValue: typeof ProFormItemValue;
25
- Subscribe: typeof Form.Subscribe;
26
- useFormInstance: typeof useFormInstace;
18
+ declare function ProForm<Values extends object = any>({ onFinish, params, request, initialValues, disabled, form: formProp, formRef, submitter, layout, className, childElementPosition, readonly, ...props }: ProFormProps<Values>): JSX.Element;
19
+ declare namespace ProForm {
20
+ var useForm: typeof import("rc-field-form").useForm;
21
+ var useWatch: typeof import("rc-field-form").useWatch;
22
+ var Header: import("react").FC<{
23
+ children?: import("react").ReactNode;
24
+ }>;
25
+ var Item: import("react").FC<import("./pro-form-item").ProFormItemProps>;
26
+ var ItemValue: import("react").FC<{
27
+ value?: import("react").ReactNode;
28
+ placeholder?: string | undefined;
29
+ readonly?: boolean | undefined;
30
+ }>;
31
+ var Subscribe: import("react").FC<import("antd-mobile/es/components/form").FormSubscribeProps>;
32
+ var useFormInstance: typeof useFormInstace;
27
33
  }
28
- declare const TypedProForm: ProFormWithHooks<any>;
29
- export default TypedProForm;
34
+ export default ProForm;
@@ -234,8 +234,4 @@ ProForm.Item = ProFormItem;
234
234
  ProForm.ItemValue = ProFormItemValue;
235
235
  ProForm.Subscribe = Form.Subscribe;
236
236
  ProForm.useFormInstance = useFormInstace;
237
-
238
- // Define proper types for the namespace properties
239
-
240
- var TypedProForm = ProForm;
241
- export default TypedProForm;
237
+ export default ProForm;
@@ -8,7 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  import _regeneratorRuntime from "@babel/runtime/regenerator";
9
9
  import { useDeepCompareMemoize } from '@nickeylin/rc-utils';
10
10
  import { useRequest } from 'ahooks';
11
- import { get, isNil, set } from 'lodash';
11
+ import { get, isNil, set } from 'lodash-es';
12
12
  import { useContext } from 'react';
13
13
  import ProFormContext from "./pro-form-context";
14
14
  function traverse(target, callback, parentKeyPath) {
@@ -10,7 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  import { MenuOutlined } from '@ant-design/icons';
11
11
  import { Empty, SearchBar, Skeleton } from 'antd-mobile';
12
12
  import classNames from 'classnames';
13
- import { get } from 'lodash';
13
+ import { get } from 'lodash-es';
14
14
  import RcTree, { TreeNode } from 'rc-tree';
15
15
  import { useMemo, useState } from 'react';
16
16
  import { cn } from "../../utils/bem";
@@ -44,7 +44,7 @@ function filterNodes(searchValue, treeData) {
44
44
  var newArr = [];
45
45
  treeData.forEach(function (treeNode) {
46
46
  // const { children, ...treeData } = treeNode;
47
- var filterName = 'name';
47
+ var filterName = 'title';
48
48
  var fieldValue = get(treeNode, filterName, '') || '';
49
49
  if (fieldValue !== '' && fieldValue !== null && fieldValue !== undefined && fieldValue.toLowerCase().indexOf(searchValue) > -1) {
50
50
  newArr.push(treeNode);