@pisell/materials 1.0.952 → 1.0.954

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 (157) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.js +21 -21
  8. package/build/lowcode/view.js +22 -22
  9. package/es/components/auto-complete-number/index.d.ts +0 -1
  10. package/es/components/badge/index.d.ts +0 -1
  11. package/es/components/batch-editor/fields/index.d.ts +0 -1
  12. package/es/components/calendar/index.d.ts +0 -1
  13. package/es/components/classicLayout/index.d.ts +0 -1
  14. package/es/components/colorPicker/index.d.ts +0 -1
  15. package/es/components/config-provider/index.d.ts +0 -1
  16. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  17. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  18. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +2 -1
  19. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +35 -23
  20. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -2
  21. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +14 -2
  22. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +1 -0
  23. package/es/components/dataSourceComponents/fields/Upload/index.js +4 -3
  24. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  25. package/es/components/dataSourceComponents/fields/index.d.ts +9 -8
  26. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -1
  27. package/es/components/dataSourceComponents/hooks/usePlatform.js +9 -1
  28. package/es/components/date-picker/index.d.ts +1 -0
  29. package/es/components/dropdown/index.d.ts +0 -1
  30. package/es/components/filter/components/items/index.d.ts +0 -1
  31. package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
  32. package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
  33. package/es/components/filter/components/items/text/index.d.ts +0 -1
  34. package/es/components/iconfont/index.d.ts +8 -0
  35. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  36. package/es/components/pisellCard/index.d.ts +0 -1
  37. package/es/components/pisellDatePicker/index.d.ts +0 -1
  38. package/es/components/pisellInput/index.d.ts +0 -1
  39. package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
  40. package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
  41. package/es/components/pisellModal/components/index.d.ts +1 -0
  42. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
  43. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  44. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
  45. package/es/components/productCard/components/Divider/index.d.ts +0 -1
  46. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  47. package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  48. package/es/components/segmented/index.d.ts +0 -1
  49. package/es/components/skeleton/index.d.ts +0 -1
  50. package/es/components/slider/index.d.ts +0 -1
  51. package/es/components/sort/components/InlineMenu/index.d.ts +0 -1
  52. package/es/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
  53. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  54. package/es/components/table/Summary/index.d.ts +0 -1
  55. package/es/components/table/Table/fields/date/index.d.ts +1 -0
  56. package/es/components/table/Table/fields/image/Show/index.d.ts +1 -0
  57. package/es/components/table/Table/fields/image/index.d.ts +1 -0
  58. package/es/components/table/Table/fields/index.d.ts +3 -2
  59. package/es/components/table/Table/fields/link/index.d.ts +1 -0
  60. package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
  61. package/es/components/table/Table/fields/number/index.d.ts +1 -0
  62. package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
  63. package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
  64. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  65. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
  66. package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
  67. package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  68. package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
  69. package/es/components/table/Table/fields/search/index.d.ts +1 -0
  70. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  71. package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
  72. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  73. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  74. package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  75. package/es/components/table/TableFilter/SortIcon.d.ts +0 -1
  76. package/es/components/time-picker/index.d.ts +0 -1
  77. package/es/components/upload/index.d.ts +0 -1
  78. package/es/components/versionSelect/index.d.ts +0 -1
  79. package/es/components/walletCard/Guest/index.d.ts +0 -1
  80. package/es/components/walletCard/Guide/index.d.ts +0 -1
  81. package/es/utils/index.d.ts +1 -1
  82. package/es/utils/platform.d.ts +1 -1
  83. package/lib/components/auto-complete-number/index.d.ts +0 -1
  84. package/lib/components/badge/index.d.ts +0 -1
  85. package/lib/components/batch-editor/fields/index.d.ts +0 -1
  86. package/lib/components/calendar/index.d.ts +0 -1
  87. package/lib/components/classicLayout/index.d.ts +0 -1
  88. package/lib/components/colorPicker/index.d.ts +0 -1
  89. package/lib/components/config-provider/index.d.ts +0 -1
  90. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  91. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  92. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +2 -1
  93. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +33 -16
  94. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +2 -2
  95. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +21 -7
  96. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +1 -0
  97. package/lib/components/dataSourceComponents/fields/Upload/index.js +2 -1
  98. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  99. package/lib/components/dataSourceComponents/fields/index.d.ts +9 -8
  100. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -1
  101. package/lib/components/dataSourceComponents/hooks/usePlatform.js +12 -0
  102. package/lib/components/date-picker/index.d.ts +1 -0
  103. package/lib/components/dropdown/index.d.ts +0 -1
  104. package/lib/components/filter/components/items/index.d.ts +0 -1
  105. package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
  106. package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
  107. package/lib/components/filter/components/items/text/index.d.ts +0 -1
  108. package/lib/components/iconfont/index.d.ts +8 -0
  109. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  110. package/lib/components/pisellCard/index.d.ts +0 -1
  111. package/lib/components/pisellDatePicker/index.d.ts +0 -1
  112. package/lib/components/pisellInput/index.d.ts +0 -1
  113. package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
  114. package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
  115. package/lib/components/pisellModal/components/index.d.ts +1 -0
  116. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
  117. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  118. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
  119. package/lib/components/productCard/components/Divider/index.d.ts +0 -1
  120. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  121. package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  122. package/lib/components/segmented/index.d.ts +0 -1
  123. package/lib/components/skeleton/index.d.ts +0 -1
  124. package/lib/components/slider/index.d.ts +0 -1
  125. package/lib/components/sort/components/InlineMenu/index.d.ts +0 -1
  126. package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
  127. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  128. package/lib/components/table/Summary/index.d.ts +0 -1
  129. package/lib/components/table/Table/fields/date/index.d.ts +1 -0
  130. package/lib/components/table/Table/fields/image/Show/index.d.ts +1 -0
  131. package/lib/components/table/Table/fields/image/index.d.ts +1 -0
  132. package/lib/components/table/Table/fields/index.d.ts +3 -2
  133. package/lib/components/table/Table/fields/link/index.d.ts +1 -0
  134. package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
  135. package/lib/components/table/Table/fields/number/index.d.ts +1 -0
  136. package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
  137. package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
  138. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  139. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
  140. package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
  141. package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  142. package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
  143. package/lib/components/table/Table/fields/search/index.d.ts +1 -0
  144. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  145. package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
  146. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  147. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  148. package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  149. package/lib/components/table/TableFilter/SortIcon.d.ts +0 -1
  150. package/lib/components/time-picker/index.d.ts +0 -1
  151. package/lib/components/upload/index.d.ts +0 -1
  152. package/lib/components/versionSelect/index.d.ts +0 -1
  153. package/lib/components/walletCard/Guest/index.d.ts +0 -1
  154. package/lib/components/walletCard/Guide/index.d.ts +0 -1
  155. package/lib/utils/index.d.ts +1 -1
  156. package/lib/utils/platform.d.ts +1 -1
  157. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: {
2
3
  field: {
3
4
  field_icon: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  declare const Show: (props: FieldPropsType) => JSX.Element;
3
4
  export default Show;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FieldPropsType } from "../../types";
2
3
  import "./index.less";
3
4
  declare const Show: (props: FieldPropsType) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const summary: (props: any) => JSX.Element;
3
2
  export default summary;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface SortIconProps {
3
2
  sortOrder: null | "ascend" | "descend";
4
3
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const TimePicker: (props: any) => JSX.Element;
3
2
  export default TimePicker;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Upload: (props: any) => JSX.Element;
3
2
  export default Upload;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  import './index.less';
4
3
  export interface Version {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Guest: (props: any) => JSX.Element;
4
3
  export default Guest;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Guide: (props: any) => JSX.Element;
4
3
  export default Guide;
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string;
2
+ export declare const getCssNumber: (val: string | number) => string | number;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -1 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AutoCompleteProps, InputNumberProps } from "antd";
3
2
  interface AutoCompleteNumberProps {
4
3
  autoCompleteProps: AutoCompleteProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BadgeProps as OriginalBadgeprops } from 'antd';
3
2
  import './index.less';
4
3
  export interface Badgeprops extends OriginalBadgeprops {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  price: import("react").FC<import("./Price").PriceProps>;
4
3
  image: (props: import("./Image").ImageProps) => JSX.Element | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Calendar: (props: any) => JSX.Element;
3
2
  export default Calendar;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ClassicLayout: (props: any) => JSX.Element;
4
3
  export default ClassicLayout;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ColorPickerProps } from 'antd';
3
2
  declare const ColorPicker: (props: ColorPickerProps) => JSX.Element;
4
3
  export default ColorPicker;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ConfigProviderProps as OriginalConfigProviderProps } from "antd/es/config-provider";
3
2
  import "dayjs/locale/zh-cn";
4
3
  export interface ConfigProviderProps extends OriginalConfigProviderProps {
@@ -1,5 +1,5 @@
1
1
  declare const useDataSourceKey: () => {
2
- dataSourceKey: string | undefined;
3
- dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
2
+ dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
3
+ dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
4
4
  };
5
5
  export default useDataSourceKey;
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
22
+ title: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
23
23
  pagination: {
24
24
  total: number;
25
25
  current: number;
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
28
28
  showSizeChanger: boolean;
29
29
  };
30
30
  columns: import("./useColumns").Column[];
31
- subTitle: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
31
+ subTitle: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
32
32
  buttons: any[] | null;
33
33
  filter: {
34
34
  dom: any;
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
54
54
  width: number;
55
55
  align: "center" | "left" | "right";
56
56
  fixed: false | "left" | "right";
57
- type: "link" | "button";
57
+ type: "button" | "link";
58
58
  items: OperationItem[];
59
59
  } | undefined;
60
60
  operationContent?: {
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { InputProps } from 'antd';
3
- import { ModeType } from "../../dataSourceForm/type";
3
+ import { ModeType } from '../../dataSourceForm/type';
4
4
  declare type PhoneValue = string | {
5
5
  phone: string;
6
6
  countryCallingCode: string;
7
+ countryCode?: string;
7
8
  };
8
9
  export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
9
10
  renderMode: ModeType;
@@ -42,7 +42,13 @@ var import_utils2 = require("../../dataSourceForm/utils");
42
42
  var import_useTranslationOriginal = __toESM(require("../../../../hooks/useTranslationOriginal"));
43
43
  var import_useSetRequest = __toESM(require("../../../../hooks/useSetRequest"));
44
44
  var { Option } = import_select.default;
45
- var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat = "string", ...props }) => {
45
+ var MobileNumberInput = ({
46
+ value: propsValue,
47
+ onChange,
48
+ disabled,
49
+ returnFormat = "string",
50
+ ...props
51
+ }) => {
46
52
  (0, import_useSetRequest.default)();
47
53
  const { data: countries = [] } = (0, import_serve.useCountries)();
48
54
  const translationOriginal = (0, import_useTranslationOriginal.default)();
@@ -52,14 +58,15 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
52
58
  }
53
59
  return propsValue;
54
60
  }, [propsValue]);
55
- const handleChange = (prefix, phoneNumber2) => {
61
+ const handleChange = (prefix, phoneNumber2, countryCode2) => {
56
62
  if (returnFormat === "string") {
57
63
  const newValue = phoneNumber2 ? `${prefix}${phoneNumber2}` : "";
58
64
  onChange == null ? void 0 : onChange(newValue);
59
65
  } else {
60
66
  onChange == null ? void 0 : onChange({
61
67
  phone: phoneNumber2,
62
- countryCallingCode: prefix
68
+ countryCallingCode: prefix,
69
+ countryCode: countryCode2
63
70
  });
64
71
  }
65
72
  };
@@ -71,13 +78,21 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
71
78
  } else if ("phone" in val) {
72
79
  srtValue = `${val.countryCallingCode || ""}${val.phone || ""}`;
73
80
  }
74
- const matchedPrefix = countries.find(
75
- (country) => srtValue.startsWith(country.prefix)
76
- );
77
- if (matchedPrefix) {
81
+ let matchedContry = null;
82
+ if (!(0, import_utils.isString)(val) && (val == null ? void 0 : val.countryCode)) {
83
+ matchedContry = countries.find(
84
+ (country) => (country == null ? void 0 : country.code) === (val == null ? void 0 : val.countryCode)
85
+ );
86
+ }
87
+ if (!matchedContry) {
88
+ matchedContry = countries.find(
89
+ (country) => srtValue.startsWith(country.prefix)
90
+ );
91
+ }
92
+ if (matchedContry) {
78
93
  return {
79
- countryCode: matchedPrefix.code,
80
- phoneNumber: srtValue.slice(matchedPrefix.prefix.length)
94
+ countryCode: matchedContry.code,
95
+ phoneNumber: srtValue.slice(matchedContry.prefix.length)
81
96
  };
82
97
  }
83
98
  return {
@@ -102,11 +117,9 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
102
117
  }, [value, countries]);
103
118
  const handleCountryChange = (value2) => {
104
119
  setCountryCode(value2);
105
- const selectedCountry = countries.find(
106
- (c) => c.code === value2
107
- );
120
+ const selectedCountry = countries.find((c) => c.code === value2);
108
121
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
109
- handleChange(prefix, phoneNumber);
122
+ handleChange(prefix, phoneNumber, selectedCountry == null ? void 0 : selectedCountry.code);
110
123
  setTimeout(() => {
111
124
  const formInstance = props.form;
112
125
  const fieldName = props.fieldKey;
@@ -122,7 +135,7 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
122
135
  (c) => c.code === countryCode
123
136
  );
124
137
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
125
- handleChange(prefix, cleanNumber);
138
+ handleChange(prefix, cleanNumber, selectedCountry == null ? void 0 : selectedCountry.code);
126
139
  if (!cleanNumber) {
127
140
  const formInstance = props.form;
128
141
  const fieldName = props.fieldKey;
@@ -156,7 +169,8 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
156
169
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
157
170
  return {
158
171
  phone: phoneNumber || "",
159
- countryCallingCode: prefix
172
+ countryCallingCode: prefix,
173
+ countryCode
160
174
  };
161
175
  }, [countryCode, phoneNumber, countries]);
162
176
  const handleBlur = () => {
@@ -198,5 +212,8 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, returnFormat =
198
212
  }
199
213
  ));
200
214
  };
201
- var MobileNumberInputWithMode = (0, import_utils2.withMode)(MobileNumberInput, import_ReadPretty.default);
215
+ var MobileNumberInputWithMode = (0, import_utils2.withMode)(
216
+ MobileNumberInput,
217
+ import_ReadPretty.default
218
+ );
202
219
  var WithMode_default = MobileNumberInputWithMode;
@@ -6,8 +6,8 @@ export interface Country {
6
6
  id: number;
7
7
  name: {
8
8
  en: string;
9
- "zh-CN": string;
10
- "zh-HK": string;
9
+ 'zh-CN': string;
10
+ 'zh-HK': string;
11
11
  original: string;
12
12
  };
13
13
  code: string;
@@ -39,13 +39,17 @@ var import_utils = require("../../../table/utils");
39
39
  var import_usePlatform = require("../../hooks/usePlatform");
40
40
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
41
41
  var getCountryDataList = async () => {
42
- const { data } = await import_utils.request.getRequest().get(`/country:list`, {}, {
43
- isNocobase: true,
44
- fullResult: true,
45
- headers: {
46
- "x-data-source": "pisell2"
42
+ const { data } = await import_utils.request.getRequest().get(
43
+ `/country:list`,
44
+ {},
45
+ {
46
+ isNocobase: true,
47
+ fullResult: true,
48
+ headers: {
49
+ "x-data-source": "pisell2"
50
+ }
47
51
  }
48
- });
52
+ );
49
53
  return data.map((item) => ({
50
54
  ...item,
51
55
  prefix: `+${item.calling_code}`
@@ -53,6 +57,8 @@ var getCountryDataList = async () => {
53
57
  };
54
58
  var useCountries = () => {
55
59
  const isShop = (0, import_usePlatform.useIsShop)();
60
+ const isH5 = (0, import_usePlatform.useIsH5)();
61
+ const isPc = (0, import_usePlatform.useIsPc)();
56
62
  const { appHelper } = (0, import_useEngineContext.default)();
57
63
  const { data, run } = (0, import_ahooks.useRequest)(getCountryDataList, {
58
64
  cacheKey: "phone-countries",
@@ -68,7 +74,7 @@ var useCountries = () => {
68
74
  }
69
75
  }, [isShop]);
70
76
  const currentData = (0, import_react.useMemo)(() => {
71
- var _a, _b, _c, _d;
77
+ var _a, _b, _c, _d, _e, _f, _g, _h;
72
78
  if (isShop) {
73
79
  const codeList = (_d = (_c = (_b = (_a = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _a.store) == null ? void 0 : _b.getState()) == null ? void 0 : _c.global) == null ? void 0 : _d.codeList;
74
80
  if (codeList) {
@@ -77,6 +83,14 @@ var useCountries = () => {
77
83
  prefix: `+${item.calling_code}`
78
84
  }));
79
85
  }
86
+ } else if (isH5 || isPc) {
87
+ const codeList = (_h = (_g = (_f = (_e = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _e.store) == null ? void 0 : _f.getState()) == null ? void 0 : _g.country) == null ? void 0 : _h.country;
88
+ if (codeList) {
89
+ return codeList.map((item) => ({
90
+ ...item,
91
+ prefix: `+${item.calling_code}`
92
+ }));
93
+ }
80
94
  }
81
95
  return data;
82
96
  }, [isShop, data]);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const CameraPopover: (props: {
2
3
  onLocalFileClick: () => void;
3
4
  onCameraChange: (file: any) => void;
@@ -55,8 +55,9 @@ var Upload = (0, import_utils.withFormItem)(import_WithMode.default, {
55
55
  }
56
56
  }
57
57
  };
58
+ return { rules: [...(others == null ? void 0 : others.rules) || [], rule] };
58
59
  }
59
- return { rules: [...(others == null ? void 0 : others.rules) || [], rule] };
60
+ return {};
60
61
  }
61
62
  });
62
63
  var Upload_default = Upload;
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
15
15
  metadata?: MediaMetadata;
16
16
  }) => Record<string, any>;
17
17
  export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
18
- export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
18
+ export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const formFieldMap: {
2
3
  FormItemCheckbox: import("react").FC<{}> & {
3
4
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -59,11 +60,7 @@ declare const formFieldMap: {
59
60
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
60
61
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
61
62
  };
62
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
63
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
64
- } & {
65
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
66
- }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
63
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<import("./Input/type").InputProps> & {
67
64
  JSON: import("react").FC<any>;
68
65
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
69
66
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
@@ -83,7 +80,11 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
83
80
  name?: string | undefined;
84
81
  fieldKey?: string | undefined;
85
82
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
86
- }) | (import("react").FC<{}> & {
83
+ }) | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
84
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
85
+ } & {
86
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
87
+ }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
87
88
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
88
89
  } & {
89
90
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -95,7 +96,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
95
96
  extraParams?: Record<string, any> | undefined;
96
97
  } & {
97
98
  dataSource?: any;
98
- }) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
99
+ }) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
99
100
  onChange: (value: string) => void;
100
- } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
101
+ } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
101
102
  export { getFieldComponent, formFieldMap };
@@ -1,3 +1,5 @@
1
1
  declare const usePlatform: () => any;
2
2
  declare const useIsShop: () => boolean;
3
- export { usePlatform, useIsShop };
3
+ declare const useIsH5: () => boolean;
4
+ declare const useIsPc: () => boolean;
5
+ export { usePlatform, useIsShop, useIsH5, useIsPc };
@@ -29,6 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/dataSourceComponents/hooks/usePlatform.ts
30
30
  var usePlatform_exports = {};
31
31
  __export(usePlatform_exports, {
32
+ useIsH5: () => useIsH5,
33
+ useIsPc: () => useIsPc,
32
34
  useIsShop: () => useIsShop,
33
35
  usePlatform: () => usePlatform
34
36
  });
@@ -44,8 +46,18 @@ var useIsShop = () => {
44
46
  const platform = usePlatform();
45
47
  return platform === "shop";
46
48
  };
49
+ var useIsH5 = () => {
50
+ const platform = usePlatform();
51
+ return platform === "h5";
52
+ };
53
+ var useIsPc = () => {
54
+ const platform = usePlatform();
55
+ return platform === "pc";
56
+ };
47
57
  // Annotate the CommonJS export names for ESM import in node:
48
58
  0 && (module.exports = {
59
+ useIsH5,
60
+ useIsPc,
49
61
  useIsShop,
50
62
  usePlatform
51
63
  });
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const DatePicker: (props: any) => JSX.Element;
2
3
  export default DatePicker;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Dropdown: (props: any) => JSX.Element;
3
2
  export default Dropdown;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const fieldMaps: {
3
2
  text: {
4
3
  field: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Text: () => JSX.Element;
3
2
  export default Text;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Text: (props: any) => JSX.Element;
3
2
  export default Text;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -0,0 +1,8 @@
1
+ import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
2
+ import React from 'react';
3
+ interface IconFontProps extends IconComponentProps {
4
+ type: string;
5
+ onClick?: React.MouseEventHandler<HTMLSpanElement>;
6
+ }
7
+ declare const IconFont: React.FC<IconFontProps>;
8
+ export default IconFont;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputNumberProps } from 'antd/es/input-number';
3
2
  export interface PisellAdjustPriceInputNumberProps extends Omit<InputNumberProps, 'onChange'> {
4
3
  value?: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CardProps } from 'antd';
3
2
  import './index.less';
4
3
  export interface PisellCardProps extends CardProps {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PisellDatePicker: (props: any) => JSX.Element;
3
2
  export default PisellDatePicker;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputProps } from 'antd';
3
2
  import { PisellContextType } from '../pisell-config-provider/context';
4
3
  declare const PisellInput: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PcModalProps } from '../PcModal';
2
3
  export interface IpadModalProps extends PcModalProps {
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PcModalProps } from '../PcModal';
2
3
  import './index.less';
3
4
  export interface MobileModalProps extends PcModalProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import IpadModal from './IpadModal';
2
3
  import MobileModal from './MobileModal';
3
4
  import PcModal from './PcModal';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Holders: (props: any) => JSX.Element | null;
4
3
  export default Holders;
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Resources: (props: any) => JSX.Element | null;
4
3
  export default Resources;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Divider: ({ type }: any) => JSX.Element;
4
3
  export default Divider;
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;