@pisell/materials 2.2.110 → 2.2.112

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 (241) 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 +155 -150
  7. package/build/lowcode/render/default/view.js +19 -20
  8. package/build/lowcode/view.js +20 -21
  9. package/es/components/batch-editor/index.d.ts +0 -1
  10. package/es/components/dataSourceComponents/dataSourceForm/utils.js +25 -4
  11. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  12. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  13. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
  14. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  16. package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
  17. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -3
  18. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +70 -28
  19. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +24 -2
  20. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +8 -2
  21. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +45 -13
  22. package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +76 -8
  23. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  24. package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
  25. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -1
  26. package/es/components/dataSourceComponents/fields/index.d.ts +14 -15
  27. package/es/components/dataSourceComponents/hooks/usePlatform.js +9 -1
  28. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  29. package/es/components/pisellInput/index.d.ts +0 -1
  30. package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  31. package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  32. package/es/components/pisellModal/components/index.d.ts +0 -1
  33. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  34. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  35. package/es/components/select-time/index.d.ts +0 -1
  36. package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
  37. package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
  38. package/es/components/table/Actions/component/Group/index.d.ts +0 -1
  39. package/es/components/table/Actions/index.d.ts +0 -1
  40. package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  41. package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  42. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  43. package/es/components/table/Table/fields/date/index.d.ts +0 -1
  44. package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
  45. package/es/components/table/Table/fields/image/index.d.ts +0 -1
  46. package/es/components/table/Table/fields/index.d.ts +2 -2
  47. package/es/components/table/Table/fields/link/index.d.ts +0 -1
  48. package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
  49. package/es/components/table/Table/fields/number/index.d.ts +0 -1
  50. package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  51. package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
  52. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  53. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  54. package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  55. package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  56. package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
  57. package/es/components/table/Table/fields/search/index.d.ts +0 -1
  58. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  59. package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
  60. package/es/components/table/Table/fields/text/index.d.ts +0 -1
  61. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  62. package/es/components/table/Table/utils.d.ts +1 -1
  63. package/es/components/versionSelect/index.d.ts +0 -1
  64. package/es/utils/index.d.ts +1 -1
  65. package/es/utils/platform.d.ts +1 -1
  66. package/lib/components/batch-editor/index.d.ts +0 -1
  67. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +18 -2
  68. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  69. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  70. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
  71. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  72. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  73. package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
  74. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -3
  75. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.js +67 -18
  76. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +29 -7
  77. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +8 -2
  78. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +41 -9
  79. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +53 -11
  80. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  81. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
  82. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +0 -1
  83. package/lib/components/dataSourceComponents/fields/index.d.ts +14 -15
  84. package/lib/components/dataSourceComponents/hooks/usePlatform.js +12 -0
  85. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  86. package/lib/components/pisellInput/index.d.ts +0 -1
  87. package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  88. package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  89. package/lib/components/pisellModal/components/index.d.ts +0 -1
  90. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  91. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  92. package/lib/components/select-time/index.d.ts +0 -1
  93. package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
  94. package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
  95. package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
  96. package/lib/components/table/Actions/index.d.ts +0 -1
  97. package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  98. package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  99. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  100. package/lib/components/table/Table/fields/date/index.d.ts +0 -1
  101. package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
  102. package/lib/components/table/Table/fields/image/index.d.ts +0 -1
  103. package/lib/components/table/Table/fields/index.d.ts +2 -2
  104. package/lib/components/table/Table/fields/link/index.d.ts +0 -1
  105. package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
  106. package/lib/components/table/Table/fields/number/index.d.ts +0 -1
  107. package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  108. package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
  109. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  110. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  111. package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  112. package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  113. package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
  114. package/lib/components/table/Table/fields/search/index.d.ts +0 -1
  115. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  116. package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
  117. package/lib/components/table/Table/fields/text/index.d.ts +0 -1
  118. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  119. package/lib/components/table/Table/utils.d.ts +1 -1
  120. package/lib/components/versionSelect/index.d.ts +0 -1
  121. package/lib/utils/index.d.ts +1 -1
  122. package/lib/utils/platform.d.ts +1 -1
  123. package/lowcode/form-item-input.mobile/meta.ts +22 -0
  124. package/lowcode/form-item-input.phone/meta.ts +22 -0
  125. package/package.json +1 -1
  126. package/es/components/appVersionControl/index.d.ts +0 -4
  127. package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
  128. package/es/components/auto-resize-text/index.d.ts +0 -6
  129. package/es/components/cardPro/index.d.ts +0 -3
  130. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
  131. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
  132. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
  133. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
  134. package/es/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
  135. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
  136. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  137. package/es/components/drag-sort-tree/index.d.ts +0 -4
  138. package/es/components/iconfont/index.d.ts +0 -8
  139. package/es/components/keyboard/index.d.ts +0 -22
  140. package/es/components/login-and-register/index.d.ts +0 -82
  141. package/es/components/pisell-config-provider/context.d.ts +0 -22
  142. package/es/components/pisell-config-provider/index.d.ts +0 -13
  143. package/es/components/pisellAdjustPrice/status.d.ts +0 -32
  144. package/es/components/pisellAdjustPrice/type.d.ts +0 -22
  145. package/es/components/pisellCardList/index.d.ts +0 -103
  146. package/es/components/pisellEmpty/index.d.ts +0 -19
  147. package/es/components/pisellQRScanner/index.d.ts +0 -24
  148. package/es/components/pisellText/index.d.ts +0 -8
  149. package/es/components/pisellToast/squareToast/index.d.ts +0 -15
  150. package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
  151. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
  152. package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
  153. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
  154. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -4
  155. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
  156. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
  157. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
  158. package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
  159. package/es/components/productCard/components/Action/index.d.ts +0 -3
  160. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  161. package/es/components/productCard/components/Time/index.d.ts +0 -3
  162. package/es/components/productCard/locales.d.ts +0 -84
  163. package/es/components/select/index.d.ts +0 -9
  164. package/es/components/sortableList/index.d.ts +0 -11
  165. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
  166. package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  167. package/es/components/table/Table/index.d.ts +0 -4
  168. package/es/components/table/serve.d.ts +0 -13
  169. package/es/components/table/types.d.ts +0 -268
  170. package/es/components/versionModal/index.d.ts +0 -23
  171. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  172. package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
  173. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
  174. package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  175. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  176. package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
  177. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  178. package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
  179. package/es/components/virtualInput/index.d.ts +0 -24
  180. package/es/components/walletCard/index.d.ts +0 -71
  181. package/es/locales/en-US.d.ts +0 -307
  182. package/es/locales/zh-CN.d.ts +0 -302
  183. package/es/locales/zh-TW.d.ts +0 -302
  184. package/lib/components/appVersionControl/index.d.ts +0 -4
  185. package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
  186. package/lib/components/auto-resize-text/index.d.ts +0 -6
  187. package/lib/components/cardPro/index.d.ts +0 -3
  188. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
  189. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
  190. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
  191. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
  192. package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +0 -3
  193. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
  194. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  195. package/lib/components/drag-sort-tree/index.d.ts +0 -4
  196. package/lib/components/iconfont/index.d.ts +0 -8
  197. package/lib/components/keyboard/index.d.ts +0 -22
  198. package/lib/components/login-and-register/index.d.ts +0 -82
  199. package/lib/components/pisell-config-provider/context.d.ts +0 -22
  200. package/lib/components/pisell-config-provider/index.d.ts +0 -13
  201. package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
  202. package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
  203. package/lib/components/pisellCardList/index.d.ts +0 -103
  204. package/lib/components/pisellEmpty/index.d.ts +0 -19
  205. package/lib/components/pisellQRScanner/index.d.ts +0 -24
  206. package/lib/components/pisellText/index.d.ts +0 -8
  207. package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
  208. package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
  209. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
  210. package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
  211. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
  212. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -4
  213. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
  214. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
  215. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
  216. package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
  217. package/lib/components/productCard/components/Action/index.d.ts +0 -3
  218. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  219. package/lib/components/productCard/components/Time/index.d.ts +0 -3
  220. package/lib/components/productCard/locales.d.ts +0 -84
  221. package/lib/components/select/index.d.ts +0 -9
  222. package/lib/components/sortableList/index.d.ts +0 -11
  223. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +0 -7
  224. package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  225. package/lib/components/table/Table/index.d.ts +0 -4
  226. package/lib/components/table/serve.d.ts +0 -13
  227. package/lib/components/table/types.d.ts +0 -268
  228. package/lib/components/versionModal/index.d.ts +0 -23
  229. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  230. package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
  231. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
  232. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  233. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  234. package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
  235. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  236. package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
  237. package/lib/components/virtualInput/index.d.ts +0 -24
  238. package/lib/components/walletCard/index.d.ts +0 -71
  239. package/lib/locales/en-US.d.ts +0 -307
  240. package/lib/locales/zh-CN.d.ts +0 -302
  241. package/lib/locales/zh-TW.d.ts +0 -302
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
19
19
  */
20
20
  declare const useTableProps: (props: UseTablePropsProps) => {
21
21
  currentComponentId: any;
22
- title: number | boolean | JSX.Element | React.ReactFragment | (() => 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 | JSX.Element | React.ReactFragment | (() => 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?: {
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
72
72
  useCustomAction: boolean;
73
73
  actionType: string;
74
74
  openMode: "modal" | "drawer";
75
- openContentSize: "small" | "large" | "middle";
75
+ openContentSize: "large" | "middle" | "small";
76
76
  openTitle: string;
77
77
  key: string;
78
78
  } | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DataSourceContextProps } from '../provider/dataSource/DataSourceContext';
3
2
  declare const DataSourceWrapper: (props: DataSourceContextProps) => JSX.Element;
4
3
  export default DataSourceWrapper;
@@ -1,10 +1,17 @@
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
+ declare type PhoneValue = string | {
5
+ phone: string;
6
+ countryCallingCode: string;
7
+ countryCode?: string;
8
+ };
4
9
  export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
5
10
  renderMode: ModeType;
6
- value?: string;
7
- onChange?: (value: string) => void;
11
+ value?: PhoneValue;
12
+ onChange?: (value: PhoneValue) => void;
13
+ returnFormat?: 'string' | 'object';
14
+ inputRef?: any;
8
15
  }
9
16
  declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
10
17
  export default MobileNumberInputWithMode;
@@ -36,12 +36,20 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_utils = require("@pisell/utils");
38
38
  var import_select = __toESM(require("../../../select"));
39
- var import_serve = require("./serve");
39
+ var import_serve = require("./../Input.Phone/serve");
40
40
  var import_ReadPretty = __toESM(require("./ReadPretty"));
41
41
  var import_utils2 = require("../../dataSourceForm/utils");
42
42
  var import_useTranslationOriginal = __toESM(require("../../../../hooks/useTranslationOriginal"));
43
+ var import_useSetRequest = __toESM(require("../../../../hooks/useSetRequest"));
43
44
  var { Option } = import_select.default;
44
- var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) => {
45
+ var MobileNumberInput = ({
46
+ value: propsValue,
47
+ onChange,
48
+ disabled,
49
+ returnFormat = "string",
50
+ ...props
51
+ }) => {
52
+ (0, import_useSetRequest.default)();
45
53
  const { data: countries = [] } = (0, import_serve.useCountries)();
46
54
  const translationOriginal = (0, import_useTranslationOriginal.default)();
47
55
  const value = (0, import_react.useMemo)(() => {
@@ -50,20 +58,46 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
50
58
  }
51
59
  return propsValue;
52
60
  }, [propsValue]);
61
+ const handleChange = (prefix, phoneNumber2, countryCode2) => {
62
+ if (returnFormat === "string") {
63
+ const newValue = phoneNumber2 ? `${prefix}${phoneNumber2}` : "";
64
+ onChange == null ? void 0 : onChange(newValue);
65
+ } else {
66
+ onChange == null ? void 0 : onChange({
67
+ phone: phoneNumber2,
68
+ countryCallingCode: prefix,
69
+ countryCode: countryCode2
70
+ });
71
+ }
72
+ };
53
73
  const parseExternalValue = (val) => {
54
74
  if (!val) return { countryCode: "AU", phoneNumber: "" };
55
- const matchedPrefix = countries.find(
56
- (country) => val.startsWith(country.prefix)
57
- );
58
- if (matchedPrefix) {
75
+ let srtValue = "";
76
+ if ((0, import_utils.isString)(val)) {
77
+ srtValue = val;
78
+ } else if ("phone" in val) {
79
+ srtValue = `${val.countryCallingCode || ""}${val.phone || ""}`;
80
+ }
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) {
59
93
  return {
60
- countryCode: matchedPrefix.code,
61
- phoneNumber: val.slice(matchedPrefix.prefix.length)
94
+ countryCode: matchedContry.code,
95
+ phoneNumber: srtValue.slice(matchedContry.prefix.length)
62
96
  };
63
97
  }
64
98
  return {
65
99
  countryCode: "AU",
66
- phoneNumber: val.replace(/\D/g, "")
100
+ phoneNumber: srtValue.replace(/\D/g, "")
67
101
  };
68
102
  };
69
103
  const [countryCode, setCountryCode] = (0, import_react.useState)(
@@ -83,12 +117,9 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
83
117
  }, [value, countries]);
84
118
  const handleCountryChange = (value2) => {
85
119
  setCountryCode(value2);
86
- const selectedCountry = countries.find(
87
- (c) => c.code === value2
88
- );
120
+ const selectedCountry = countries.find((c) => c.code === value2);
89
121
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
90
- const newValue = `${prefix}${phoneNumber}`;
91
- onChange == null ? void 0 : onChange(newValue);
122
+ handleChange(prefix, phoneNumber, selectedCountry == null ? void 0 : selectedCountry.code);
92
123
  setTimeout(() => {
93
124
  const formInstance = props.form;
94
125
  const fieldName = props.fieldKey;
@@ -104,8 +135,7 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
104
135
  (c) => c.code === countryCode
105
136
  );
106
137
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
107
- const newValue = cleanNumber ? `${prefix}${cleanNumber}` : "";
108
- onChange == null ? void 0 : onChange(newValue);
138
+ handleChange(prefix, cleanNumber, selectedCountry == null ? void 0 : selectedCountry.code);
109
139
  if (!cleanNumber) {
110
140
  const formInstance = props.form;
111
141
  const fieldName = props.fieldKey;
@@ -132,9 +162,24 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
132
162
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
133
163
  return `${prefix}${phoneNumber}`;
134
164
  }, [countryCode, phoneNumber, countries]);
165
+ const objValue = (0, import_react.useMemo)(() => {
166
+ const selectedCountry = countries.find(
167
+ (c) => c.code === countryCode
168
+ );
169
+ const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
170
+ return {
171
+ phone: phoneNumber || "",
172
+ countryCallingCode: prefix,
173
+ countryCode
174
+ };
175
+ }, [countryCode, phoneNumber, countries]);
135
176
  const handleBlur = () => {
136
177
  const finalValue = concatenatedNumber;
137
- onChange == null ? void 0 : onChange(finalValue);
178
+ if (returnFormat === "string") {
179
+ onChange == null ? void 0 : onChange(finalValue);
180
+ } else {
181
+ onChange == null ? void 0 : onChange(objValue);
182
+ }
138
183
  };
139
184
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Space.Compact, { block: true }, /* @__PURE__ */ import_react.default.createElement(
140
185
  import_select.default,
@@ -157,6 +202,7 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
157
202
  import_antd.Input,
158
203
  {
159
204
  ...props,
205
+ ref: props == null ? void 0 : props.inputRef,
160
206
  disabled,
161
207
  type: "tel",
162
208
  value: phoneNumber,
@@ -166,5 +212,8 @@ var MobileNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
166
212
  }
167
213
  ));
168
214
  };
169
- var MobileNumberInputWithMode = (0, import_utils2.withMode)(MobileNumberInput, import_ReadPretty.default);
215
+ var MobileNumberInputWithMode = (0, import_utils2.withMode)(
216
+ MobileNumberInput,
217
+ import_ReadPretty.default
218
+ );
170
219
  var WithMode_default = MobileNumberInputWithMode;
@@ -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, _i, _j, _k, _l;
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,22 @@ var useCountries = () => {
77
83
  prefix: `+${item.calling_code}`
78
84
  }));
79
85
  }
86
+ } else if (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
+ }
94
+ } else if (isH5) {
95
+ const codeList = (_l = (_k = (_j = (_i = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _i.getStore()) == null ? void 0 : _j.getState()) == null ? void 0 : _k.country) == null ? void 0 : _l.country;
96
+ if (codeList) {
97
+ return codeList.map((item) => ({
98
+ ...item,
99
+ prefix: `+${item.calling_code}`
100
+ }));
101
+ }
80
102
  }
81
103
  return data;
82
104
  }, [isShop, data]);
@@ -1,10 +1,16 @@
1
1
  import React from 'react';
2
2
  import { InputProps } from 'antd';
3
3
  import { ModeType } from "../../dataSourceForm/type";
4
+ declare type PhoneValue = string | {
5
+ phone: string;
6
+ countryCallingCode: string;
7
+ };
4
8
  export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
5
9
  renderMode: ModeType;
6
- value?: string;
7
- onChange?: (value: string) => void;
10
+ value?: PhoneValue;
11
+ onChange?: (value: PhoneValue) => void;
12
+ returnFormat?: 'string' | 'object';
13
+ inputRef?: any;
8
14
  }
9
15
  declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
10
16
  export default PhoneNumberInputWithMode;
@@ -40,8 +40,10 @@ var import_serve = require("./serve");
40
40
  var import_ReadPretty = __toESM(require("./ReadPretty"));
41
41
  var import_utils2 = require("../../dataSourceForm/utils");
42
42
  var import_useTranslationOriginal = __toESM(require("../../../../hooks/useTranslationOriginal"));
43
+ var import_useSetRequest = __toESM(require("../../../../hooks/useSetRequest"));
43
44
  var { Option } = import_select.default;
44
- var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) => {
45
+ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, returnFormat = "string", ...props }) => {
46
+ (0, import_useSetRequest.default)();
45
47
  const { data: countries = [] } = (0, import_serve.useCountries)();
46
48
  const translationOriginal = (0, import_useTranslationOriginal.default)();
47
49
  const value = (0, import_react.useMemo)(() => {
@@ -52,18 +54,24 @@ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
52
54
  }, [propsValue]);
53
55
  const parseExternalValue = (val) => {
54
56
  if (!val) return { countryCode: "AU", phoneNumber: "" };
57
+ let srtValue = "";
58
+ if ((0, import_utils.isString)(val)) {
59
+ srtValue = val;
60
+ } else if ("phone" in val) {
61
+ srtValue = `${val.countryCallingCode || ""}${val.phone || ""}`;
62
+ }
55
63
  const matchedPrefix = countries.find(
56
- (country) => val.startsWith(country.prefix)
64
+ (country) => srtValue.startsWith(country.prefix)
57
65
  );
58
66
  if (matchedPrefix) {
59
67
  return {
60
68
  countryCode: matchedPrefix.code,
61
- phoneNumber: val.slice(matchedPrefix.prefix.length)
69
+ phoneNumber: srtValue.slice(matchedPrefix.prefix.length)
62
70
  };
63
71
  }
64
72
  return {
65
73
  countryCode: "AU",
66
- phoneNumber: val.replace(/\D/g, "")
74
+ phoneNumber: srtValue.replace(/\D/g, "")
67
75
  };
68
76
  };
69
77
  const [countryCode, setCountryCode] = (0, import_react.useState)(
@@ -77,6 +85,17 @@ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
77
85
  setCountryCode(newCountryCode);
78
86
  setPhoneNumber(newPhoneNumber);
79
87
  }, [value, countries]);
88
+ const handleChange = (prefix, phoneNumber2) => {
89
+ if (returnFormat === "string") {
90
+ const newValue = phoneNumber2 ? `${prefix}${phoneNumber2}` : "";
91
+ onChange == null ? void 0 : onChange(newValue);
92
+ } else {
93
+ onChange == null ? void 0 : onChange({
94
+ phone: phoneNumber2,
95
+ countryCallingCode: prefix
96
+ });
97
+ }
98
+ };
80
99
  const handlePhoneNumberChange = (e) => {
81
100
  const cleanNumber = e.target.value.replace(/\D/g, "");
82
101
  setPhoneNumber(cleanNumber);
@@ -84,8 +103,7 @@ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
84
103
  (c) => c.code === countryCode
85
104
  );
86
105
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
87
- const newValue = cleanNumber ? `${prefix}${cleanNumber}` : "";
88
- onChange == null ? void 0 : onChange(newValue);
106
+ handleChange(prefix, cleanNumber);
89
107
  if (!cleanNumber) {
90
108
  setTimeout(() => {
91
109
  const formInstance = props.form;
@@ -102,8 +120,7 @@ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
102
120
  (c) => c.code === value2
103
121
  );
104
122
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
105
- const newValue = `${prefix}${phoneNumber}`;
106
- onChange == null ? void 0 : onChange(newValue);
123
+ handleChange(prefix, phoneNumber);
107
124
  setTimeout(() => {
108
125
  const formInstance = props.form;
109
126
  const fieldName = props.fieldKey;
@@ -122,9 +139,23 @@ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
122
139
  const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
123
140
  return `${prefix}${phoneNumber}`;
124
141
  }, [countryCode, phoneNumber, countries]);
142
+ const objValue = (0, import_react.useMemo)(() => {
143
+ const selectedCountry = countries.find(
144
+ (c) => c.code === countryCode
145
+ );
146
+ const prefix = (selectedCountry == null ? void 0 : selectedCountry.prefix) || "";
147
+ return {
148
+ phone: phoneNumber || "",
149
+ countryCallingCode: prefix
150
+ };
151
+ }, [countryCode, phoneNumber, countries]);
125
152
  const handleBlur = () => {
126
153
  const finalValue = concatenatedNumber;
127
- onChange == null ? void 0 : onChange(finalValue);
154
+ if (returnFormat === "string") {
155
+ onChange == null ? void 0 : onChange(finalValue);
156
+ } else {
157
+ onChange == null ? void 0 : onChange(objValue);
158
+ }
128
159
  };
129
160
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Space.Compact, { block: true }, /* @__PURE__ */ import_react.default.createElement(
130
161
  import_select.default,
@@ -147,6 +178,7 @@ var PhoneNumberInput = ({ value: propsValue, onChange, disabled, ...props }) =>
147
178
  import_antd.Input,
148
179
  {
149
180
  ...props,
181
+ ref: props == null ? void 0 : props.inputRef,
150
182
  disabled,
151
183
  type: "tel",
152
184
  value: phoneNumber,
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var serve_exports = {};
31
31
  __export(serve_exports, {
32
32
  getCountryDataList: () => getCountryDataList,
33
+ getShopCountryDataList: () => getShopCountryDataList,
33
34
  useCountries: () => useCountries
34
35
  });
35
36
  module.exports = __toCommonJS(serve_exports);
@@ -39,13 +40,24 @@ var import_utils = require("../../../table/utils");
39
40
  var import_usePlatform = require("../../hooks/usePlatform");
40
41
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
41
42
  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"
43
+ const { data } = await import_utils.request.getRequest().get(
44
+ `/country:list`,
45
+ {},
46
+ {
47
+ isNocobase: true,
48
+ fullResult: true,
49
+ headers: {
50
+ "x-data-source": "pisell2"
51
+ }
47
52
  }
48
- });
53
+ );
54
+ return data.map((item) => ({
55
+ ...item,
56
+ prefix: `+${item.calling_code}`
57
+ }));
58
+ };
59
+ var getShopCountryDataList = async (locale) => {
60
+ const { data } = await import_utils.request.getRequest().get("/shop/area/country", { "translate-locale": locale || "en" });
49
61
  return data.map((item) => ({
50
62
  ...item,
51
63
  prefix: `+${item.calling_code}`
@@ -53,7 +65,9 @@ var getCountryDataList = async () => {
53
65
  };
54
66
  var useCountries = () => {
55
67
  const isShop = (0, import_usePlatform.useIsShop)();
56
- const { appHelper } = (0, import_useEngineContext.default)();
68
+ const isH5 = (0, import_usePlatform.useIsH5)();
69
+ const isPc = (0, import_usePlatform.useIsPc)();
70
+ const { appHelper, ...others } = (0, import_useEngineContext.default)();
57
71
  const { data, run } = (0, import_ahooks.useRequest)(getCountryDataList, {
58
72
  cacheKey: "phone-countries",
59
73
  staleTime: 1e3 * 60 * 5,
@@ -62,15 +76,42 @@ var useCountries = () => {
62
76
  // 1小时后清除缓存
63
77
  manual: true
64
78
  });
79
+ const { data: shopData, run: runShop } = (0, import_ahooks.useRequest)(getShopCountryDataList, {
80
+ cacheKey: "phone-shop-countries",
81
+ staleTime: 1e3 * 60 * 5,
82
+ // 5分钟后数据过期
83
+ cacheTime: 1e3 * 60 * 60,
84
+ // 1小时后清除缓存
85
+ manual: true
86
+ });
65
87
  (0, import_react.useEffect)(() => {
66
- if (!isShop) {
88
+ if (!isShop && !isPc && !isH5) {
67
89
  run();
68
90
  }
69
91
  }, [isShop]);
92
+ (0, import_react.useEffect)(() => {
93
+ var _a, _b, _c, _d, _e, _f, _g;
94
+ if (isShop && !((_e = (_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) == null ? void 0 : _e.length)) {
95
+ runShop((_g = (_f = others == null ? void 0 : others.engine) == null ? void 0 : _f.props) == null ? void 0 : _g.locale);
96
+ }
97
+ }, [isShop]);
70
98
  const currentData = (0, import_react.useMemo)(() => {
71
- var _a, _b, _c, _d;
99
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
72
100
  if (isShop) {
73
- 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;
101
+ return (((_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) || shopData).map((item) => ({
102
+ ...item,
103
+ prefix: `+${item.calling_code}`
104
+ }));
105
+ } else if (isPc) {
106
+ 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;
107
+ if (codeList) {
108
+ return codeList.map((item) => ({
109
+ ...item,
110
+ prefix: `+${item.calling_code}`
111
+ }));
112
+ }
113
+ } else if (isH5) {
114
+ const codeList = (_l = (_k = (_j = (_i = appHelper == null ? void 0 : appHelper.utils) == null ? void 0 : _i.getStore()) == null ? void 0 : _j.getState()) == null ? void 0 : _k.country) == null ? void 0 : _l.country;
74
115
  if (codeList) {
75
116
  return codeList.map((item) => ({
76
117
  ...item,
@@ -79,11 +120,12 @@ var useCountries = () => {
79
120
  }
80
121
  }
81
122
  return data;
82
- }, [isShop, data]);
123
+ }, [isShop, data, shopData]);
83
124
  return { data: currentData };
84
125
  };
85
126
  // Annotate the CommonJS export names for ESM import in node:
86
127
  0 && (module.exports = {
87
128
  getCountryDataList,
129
+ getShopCountryDataList,
88
130
  useCountries
89
131
  });
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "saas" | "xzero";
5
+ rootDomain: "custom" | "xzero" | "saas";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
3
2
  options?: any;
4
3
  optionSourceType?: "default" | "custom" | "api" | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const CameraPopover: (props: {
3
2
  onLocalFileClick: () => void;
4
3
  onCameraChange: (file: any) => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const formFieldMap: {
3
2
  FormItemCheckbox: import("react").FC<{}> & {
4
3
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -20,7 +19,7 @@ declare const formFieldMap: {
20
19
  Subdomain: import("react").FC<import("antd").InputProps & {
21
20
  onChange: (value: string) => void;
22
21
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
23
- rootDomain: "custom" | "saas" | "xzero";
22
+ rootDomain: "custom" | "xzero" | "saas";
24
23
  customDomain?: string | undefined;
25
24
  value?: string | undefined;
26
25
  tenantId: string;
@@ -60,11 +59,7 @@ declare const formFieldMap: {
60
59
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
61
60
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
62
61
  };
63
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
64
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
65
- } & {
66
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
67
- }) | 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> & {
62
+ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
68
63
  JSON: import("react").FC<any>;
69
64
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
70
65
  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>;
@@ -77,18 +72,14 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
77
72
  Subdomain: import("react").FC<import("antd").InputProps & {
78
73
  onChange: (value: string) => void;
79
74
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
80
- rootDomain: "custom" | "saas" | "xzero";
75
+ rootDomain: "custom" | "xzero" | "saas";
81
76
  customDomain?: string | undefined;
82
77
  value?: string | undefined;
83
78
  tenantId: string;
84
79
  name?: string | undefined;
85
80
  fieldKey?: string | undefined;
86
81
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
87
- }) | (import("react").FC<{}> & {
88
- Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
89
- } & {
90
- Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
91
- }) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
82
+ }) | import("react").FC<import("./IconSelect/type").IconSelectProps & 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("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<any> | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
92
83
  options?: any;
93
84
  optionSourceType?: "default" | "custom" | "api" | undefined;
94
85
  labelField: string;
@@ -96,7 +87,15 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
96
87
  extraParams?: Record<string, any> | undefined;
97
88
  } & {
98
89
  dataSource?: any;
99
- }) => 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 & {
90
+ }) => JSX.Element) | (import("react").FC<{}> & {
91
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
92
+ } & {
93
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
94
+ }) | 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<{}> & {
95
+ Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
96
+ } & {
97
+ Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
98
+ }) | 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 & {
100
99
  onChange: (value: string) => void;
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("./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>;
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>;
102
101
  export { getFieldComponent, formFieldMap };
@@ -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,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 { InputProps } from 'antd';
3
2
  import { PisellContextType } from '../pisell-config-provider/context';
4
3
  declare const PisellInput: {