@pisell/materials 3.3.18 → 3.3.21

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 (227) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Pagination/index.d.ts +1 -1
  8. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  9. package/es/components/appVersionControl/index.d.ts +4 -0
  10. package/es/components/badge/index.d.ts +7 -0
  11. package/es/components/batch-editor/index.d.ts +1 -0
  12. package/es/components/buttonGroupEdit/index.d.ts +8 -0
  13. package/es/components/buttonGroupPreview/index.d.ts +19 -0
  14. package/es/components/cardMetricItem/index.d.ts +12 -0
  15. package/es/components/cardPro/index.d.ts +3 -0
  16. package/es/components/collapse/index.d.ts +15 -0
  17. package/es/components/cropPhoto/index.d.ts +3 -0
  18. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  19. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
  20. package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -0
  21. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  22. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
  23. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  24. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +97 -0
  25. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  26. package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
  27. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
  28. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  29. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
  30. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  31. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  32. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  33. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
  34. package/es/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
  35. package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
  36. package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
  37. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
  38. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +18 -0
  39. package/es/components/dataSourceComponents/fields/index.d.ts +7 -6
  40. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  41. package/es/components/drag-sort-tree/index.d.ts +4 -0
  42. package/es/components/filter/index.d.ts +1 -0
  43. package/es/components/iconfont/index.d.ts +8 -0
  44. package/es/components/login-and-register/index.d.ts +82 -0
  45. package/es/components/page/index.d.ts +5 -0
  46. package/es/components/pisell-config-provider/index.d.ts +12 -0
  47. package/es/components/pisellAnchor/index.d.ts +23 -0
  48. package/es/components/pisellAvatar/index.d.ts +19 -0
  49. package/es/components/pisellCard/index.d.ts +19 -0
  50. package/es/components/pisellCardList/index.d.ts +73 -0
  51. package/es/components/pisellCheckboxGroup/index.d.ts +36 -0
  52. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  53. package/es/components/pisellDropdown/index.d.ts +20 -0
  54. package/es/components/pisellEmpty/index.d.ts +19 -0
  55. package/es/components/pisellGoodPassCard/index.d.ts +47 -0
  56. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  57. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  58. package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  59. package/es/components/pisellInformationEntry/index.d.ts +33 -0
  60. package/es/components/pisellList01/index.d.ts +17 -0
  61. package/es/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
  62. package/es/components/pisellQrcode/index.d.ts +10 -0
  63. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  64. package/es/components/pisellStatisticList/index.d.ts +21 -0
  65. package/es/components/pisellText/components/Amount/index.d.ts +20 -0
  66. package/es/components/pisellWalletPassCard/index.d.ts +85 -0
  67. package/es/components/productCard/components/Action/index.d.ts +3 -0
  68. package/es/components/productCard/components/AmountFooter/index.d.ts +3 -0
  69. package/es/components/productCard/components/Divider/index.d.ts +3 -0
  70. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  71. package/es/components/productCard/components/Header/EditButton/index.d.ts +3 -0
  72. package/es/components/productCard/components/Header/index.d.ts +3 -0
  73. package/es/components/productCard/components/Header/index.js +18 -2
  74. package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
  75. package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
  76. package/es/components/productCard/components/Note/index.d.ts +3 -0
  77. package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
  78. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  79. package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  80. package/es/components/productCard/components/Packages/index.d.ts +3 -0
  81. package/es/components/productCard/components/Packages/utils.d.ts +20 -0
  82. package/es/components/productCard/components/Sales/index.d.ts +3 -0
  83. package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  84. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  85. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  86. package/es/components/productCard/components/Time/index.d.ts +3 -0
  87. package/es/components/productCard/hooks/useOpenNote.d.ts +3 -0
  88. package/es/components/productCard/index.d.ts +5 -0
  89. package/es/components/productCard/index.js +2 -1
  90. package/es/components/productCard/locales.d.ts +63 -0
  91. package/es/components/productCard/status.d.ts +32 -0
  92. package/es/components/productCard/types.d.ts +83 -0
  93. package/es/components/productCard/utils.d.ts +31 -0
  94. package/es/components/record-view/index.d.ts +37 -0
  95. package/es/components/section-footers/index.d.ts +9 -0
  96. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  97. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  98. package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  99. package/es/components/table/Gallery/index.d.ts +5 -0
  100. package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
  101. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  102. package/es/components/table/Table/index.d.ts +4 -0
  103. package/es/components/table/Table/utils.d.ts +161 -0
  104. package/es/components/table/hooks/useTableSetting.d.ts +22 -0
  105. package/es/components/table/hooks/useTransDataSource.d.ts +11 -0
  106. package/es/components/table/types.d.ts +251 -0
  107. package/es/components/tabs/index.d.ts +16 -0
  108. package/es/components/versionModal/index.d.ts +23 -0
  109. package/es/components/walletCard/Guest/index.d.ts +3 -0
  110. package/es/components/walletCard/index.d.ts +65 -0
  111. package/es/index.d.ts +141 -0
  112. package/es/locales/en-US.d.ts +273 -0
  113. package/es/locales/index.d.ts +1 -0
  114. package/es/locales/zh-CN.d.ts +268 -0
  115. package/es/locales/zh-TW.d.ts +268 -0
  116. package/es/utils/index.d.ts +4 -0
  117. package/lib/components/Pagination/index.d.ts +1 -1
  118. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  119. package/lib/components/appVersionControl/index.d.ts +4 -0
  120. package/lib/components/badge/index.d.ts +7 -0
  121. package/lib/components/batch-editor/index.d.ts +1 -0
  122. package/lib/components/buttonGroupEdit/index.d.ts +8 -0
  123. package/lib/components/buttonGroupPreview/index.d.ts +19 -0
  124. package/lib/components/cardMetricItem/index.d.ts +12 -0
  125. package/lib/components/cardPro/index.d.ts +3 -0
  126. package/lib/components/collapse/index.d.ts +15 -0
  127. package/lib/components/cropPhoto/index.d.ts +3 -0
  128. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  129. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
  130. package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -0
  131. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
  132. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
  133. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  134. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +97 -0
  135. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  136. package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
  137. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
  138. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  139. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
  140. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  141. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  142. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  143. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
  144. package/lib/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
  145. package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
  146. package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
  147. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
  148. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +18 -0
  149. package/lib/components/dataSourceComponents/fields/index.d.ts +7 -6
  150. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  151. package/lib/components/drag-sort-tree/index.d.ts +4 -0
  152. package/lib/components/filter/index.d.ts +1 -0
  153. package/lib/components/iconfont/index.d.ts +8 -0
  154. package/lib/components/login-and-register/index.d.ts +82 -0
  155. package/lib/components/page/index.d.ts +5 -0
  156. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  157. package/lib/components/pisellAnchor/index.d.ts +23 -0
  158. package/lib/components/pisellAvatar/index.d.ts +19 -0
  159. package/lib/components/pisellCard/index.d.ts +19 -0
  160. package/lib/components/pisellCardList/index.d.ts +73 -0
  161. package/lib/components/pisellCheckboxGroup/index.d.ts +36 -0
  162. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  163. package/lib/components/pisellDropdown/index.d.ts +20 -0
  164. package/lib/components/pisellEmpty/index.d.ts +19 -0
  165. package/lib/components/pisellGoodPassCard/index.d.ts +47 -0
  166. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  167. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  168. package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  169. package/lib/components/pisellInformationEntry/index.d.ts +33 -0
  170. package/lib/components/pisellList01/index.d.ts +17 -0
  171. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
  172. package/lib/components/pisellQrcode/index.d.ts +10 -0
  173. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  174. package/lib/components/pisellStatisticList/index.d.ts +21 -0
  175. package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
  176. package/lib/components/pisellWalletPassCard/index.d.ts +85 -0
  177. package/lib/components/productCard/components/Action/index.d.ts +3 -0
  178. package/lib/components/productCard/components/AmountFooter/index.d.ts +3 -0
  179. package/lib/components/productCard/components/Divider/index.d.ts +3 -0
  180. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  181. package/lib/components/productCard/components/Header/EditButton/index.d.ts +3 -0
  182. package/lib/components/productCard/components/Header/index.d.ts +3 -0
  183. package/lib/components/productCard/components/Header/index.js +5 -2
  184. package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
  185. package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
  186. package/lib/components/productCard/components/Note/index.d.ts +3 -0
  187. package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
  188. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  189. package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  190. package/lib/components/productCard/components/Packages/index.d.ts +3 -0
  191. package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
  192. package/lib/components/productCard/components/Sales/index.d.ts +3 -0
  193. package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  194. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  195. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  196. package/lib/components/productCard/components/Time/index.d.ts +3 -0
  197. package/lib/components/productCard/hooks/useOpenNote.d.ts +3 -0
  198. package/lib/components/productCard/index.d.ts +5 -0
  199. package/lib/components/productCard/index.js +2 -1
  200. package/lib/components/productCard/locales.d.ts +63 -0
  201. package/lib/components/productCard/status.d.ts +32 -0
  202. package/lib/components/productCard/types.d.ts +83 -0
  203. package/lib/components/productCard/utils.d.ts +31 -0
  204. package/lib/components/record-view/index.d.ts +37 -0
  205. package/lib/components/section-footers/index.d.ts +9 -0
  206. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  207. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  208. package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  209. package/lib/components/table/Gallery/index.d.ts +5 -0
  210. package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
  211. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  212. package/lib/components/table/Table/index.d.ts +4 -0
  213. package/lib/components/table/Table/utils.d.ts +161 -0
  214. package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
  215. package/lib/components/table/hooks/useTransDataSource.d.ts +11 -0
  216. package/lib/components/table/types.d.ts +251 -0
  217. package/lib/components/tabs/index.d.ts +16 -0
  218. package/lib/components/versionModal/index.d.ts +23 -0
  219. package/lib/components/walletCard/Guest/index.d.ts +3 -0
  220. package/lib/components/walletCard/index.d.ts +65 -0
  221. package/lib/index.d.ts +141 -0
  222. package/lib/locales/en-US.d.ts +273 -0
  223. package/lib/locales/index.d.ts +1 -0
  224. package/lib/locales/zh-CN.d.ts +268 -0
  225. package/lib/locales/zh-TW.d.ts +268 -0
  226. package/lib/utils/index.d.ts +4 -0
  227. package/package.json +3 -3
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const CropPhoto: React.FC;
3
+ export default CropPhoto;
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import { FormInstance } from 'antd';
3
+ import { ModeType } from './type';
4
+ import './style.less';
5
+ export interface WithModeProps {
6
+ renderMode?: ModeType;
7
+ value?: any;
8
+ onChange?: (value: any) => void;
9
+ [key: string]: any;
10
+ }
11
+ /**
12
+ * @title: 增加renderMode属性
13
+ * @description: 基于renderMode属性控制渲染模式
14
+ * @return: *
15
+ * @Author: shengjie.zuo
16
+ * @Date: 2024-11-23 17:13:18
17
+ */
18
+ export declare const withMode: <P extends object>(FieldComponent: React.ComponentType<P>, ReadPrettyComponent?: React.ComponentType<P & {
19
+ renderMode: ModeType;
20
+ }> | undefined, transformProps?: ((props: P, renderMode: ModeType) => P) | undefined) => React.FC<P & WithModeProps>;
21
+ export interface WithFormItemProps {
22
+ name: string;
23
+ label?: string;
24
+ mode?: ModeType;
25
+ [key: string]: any;
26
+ }
27
+ export declare const formItemNameReplace: (name: string) => string;
28
+ export declare const formItemNameReverse: (name: string) => string;
29
+ export declare const isValidDomain: (value: string) => boolean;
30
+ /**
31
+ * @title: 追加formItem层
32
+ * @description:
33
+ * @return: *
34
+ * @Author: shengjie.zuo
35
+ * @Date: 2024-11-23 17:14:25
36
+ */
37
+ export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>, overlayProps?: {
38
+ otherFormItemProps?: Record<string, any> | ((props: Record<string, any>, others?: Record<string, any>) => Record<string, any>) | undefined;
39
+ innerProps?: Record<string, any> | undefined;
40
+ } | undefined) => React.FC<P & WithFormItemProps>;
41
+ export declare const withDataSource: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
42
+ dataSource?: any;
43
+ }) => JSX.Element;
44
+ export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
45
+ options?: any;
46
+ optionSourceType?: "custom" | "default" | "api" | undefined;
47
+ labelField: string;
48
+ valueField: string;
49
+ extraParams?: Record<string, any> | undefined;
50
+ }) => JSX.Element;
51
+ export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
52
+ export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => JSX.Element | null;
53
+ export declare function toArr(str: string | number | (string | number)[]): (string | number)[];
54
+ export declare const filterSystemFields: (params: Record<string, any>) => Record<string, any>;
55
+ export declare const transformFormObjToArrayWithUntouched: (obj: Record<string, any>) => any[];
56
+ export declare const setFormFieldsUntouched: (form: FormInstance) => void;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { PisellMenuProps } from '../../pisellMenu/types';
3
+ /**
4
+ * @title: 数据源表单组件
5
+ * @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
6
+ */
7
+ declare const DataSourceMenu: React.ForwardRefExoticComponent<PisellMenuProps & React.RefAttributes<any>>;
8
+ export default DataSourceMenu;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { PisellMenuProps } from '../../pisellMenu/types';
3
+ /**
4
+ * @title: 数据源表单组件
5
+ * @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
6
+ */
7
+ declare const DataSourceMenu: (props: PisellMenuProps, ref: React.Ref<any>) => JSX.Element;
8
+ export default DataSourceMenu;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  interface BaseFilterItem {
3
4
  name?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterItemProps } from '../../../filter/types';
2
3
  import { DataSourceType, Field } from '../../provider/dataSource/DataSourceContext';
3
4
  export declare const genGetField: (dataSource?: DataSourceType) => (key: string) => Field;
@@ -0,0 +1,38 @@
1
+ import { Drawer } from 'antd';
2
+ import { OperationItem } from '../type';
3
+ declare const useDrawerState: (operationContent?: {
4
+ [key: string]: import("react").ReactNode;
5
+ } | undefined) => {
6
+ drawerVisible: boolean;
7
+ setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
+ openDrawer: (item: OperationItem) => void;
9
+ closeDrawer: () => void;
10
+ drawerContent: import("react").ReactNode;
11
+ Container: {
12
+ (props: import("../../../pisellModal").PisellModalProps): JSX.Element;
13
+ confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
14
+ destroy: () => void;
15
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
16
+ };
17
+ info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
18
+ destroy: () => void;
19
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ };
21
+ error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
22
+ destroy: () => void;
23
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
24
+ };
25
+ warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
26
+ warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
27
+ destroy: () => void;
28
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
29
+ };
30
+ success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
31
+ destroy: () => void;
32
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
33
+ };
34
+ Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
35
+ } | typeof Drawer;
36
+ containerProps: {};
37
+ };
38
+ export default useDrawerState;
@@ -0,0 +1,97 @@
1
+ import React from 'react';
2
+ import { DataSourceTableProps } from '../type';
3
+ import { OperationItem } from '../type';
4
+ interface UseTablePropsProps {
5
+ data: any;
6
+ originProps: DataSourceTableProps;
7
+ openDrawer: (type: OperationItem) => void;
8
+ closeDrawer: () => void;
9
+ refreshData: () => void;
10
+ handleFilterChange: (changedFields: any, allFields: any) => void;
11
+ tableRef: any;
12
+ }
13
+ /**
14
+ * 处理table的props
15
+ * 转换title
16
+ * @param props
17
+ * @returns
18
+ */
19
+ declare const useTableProps: (props: UseTablePropsProps) => {
20
+ title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
21
+ pagination: {
22
+ total: number;
23
+ current: number;
24
+ pageSize: number;
25
+ size: string;
26
+ showSizeChanger: boolean;
27
+ };
28
+ columns: import("./useColumns").Column[];
29
+ subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
30
+ buttons: any[] | null;
31
+ filter: JSX.Element | null;
32
+ onRow: (record: any) => any;
33
+ actionButtons: any[] | null;
34
+ titleButtons?: {
35
+ show: boolean;
36
+ maxCount: number;
37
+ items: OperationItem[];
38
+ } | undefined;
39
+ tableButtons?: {
40
+ show: boolean;
41
+ maxCount: number;
42
+ items: OperationItem[];
43
+ } | undefined;
44
+ operation?: {
45
+ show: boolean;
46
+ title: string; /**
47
+ * 处理table的props
48
+ * 转换title
49
+ * @param props
50
+ * @returns
51
+ */
52
+ width: number;
53
+ align: "center" | "left" | "right";
54
+ fixed: false | "left" | "right";
55
+ type: "button" | "link";
56
+ items: OperationItem[];
57
+ } | undefined;
58
+ operationContent?: {
59
+ [key: string]: React.ReactNode;
60
+ } | undefined;
61
+ dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
62
+ search?: {
63
+ show: boolean;
64
+ placeholder: string;
65
+ } | undefined;
66
+ __designMode: string;
67
+ componentId: string;
68
+ clickToDetail?: {
69
+ show: boolean;
70
+ useCustomAction: boolean;
71
+ actionType: string;
72
+ openMode: "modal" | "drawer";
73
+ openContentSize: "small" | "middle" | "large";
74
+ openTitle: string;
75
+ key: string;
76
+ } | undefined;
77
+ filterBy?: Record<string, any> | undefined;
78
+ sortBy: string;
79
+ tabs?: {
80
+ show: boolean;
81
+ type: string;
82
+ items: {
83
+ name: string;
84
+ filterBy: Record<string, any>;
85
+ sortBy: string;
86
+ }[];
87
+ } | undefined;
88
+ onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
89
+ extraParams?: {
90
+ list?: Record<string, any> | undefined;
91
+ get?: Record<string, any> | undefined;
92
+ update?: Record<string, any> | undefined;
93
+ create?: Record<string, any> | undefined;
94
+ destroy?: Record<string, any> | undefined;
95
+ } | undefined;
96
+ };
97
+ export default useTableProps;
@@ -0,0 +1,78 @@
1
+ /// <reference types="react" />
2
+ import { ColumnType } from 'antd/es/table';
3
+ import { DataSourceType } from '../provider/dataSource/DataSourceContext';
4
+ export declare type OperationItem = {
5
+ label?: string;
6
+ openMode: 'modal' | 'drawer' | 'custom';
7
+ openContentSize: 'small' | 'middle' | 'large';
8
+ openTitle: string;
9
+ actionType: 'detail' | 'edit' | 'delete' | 'custom';
10
+ key: string;
11
+ buttonProps?: any;
12
+ onClick?: (record: any) => void;
13
+ };
14
+ export interface DataSourceTableProps {
15
+ title?: string | React.ReactNode | (() => React.ReactNode);
16
+ subTitle?: string | React.ReactNode | (() => React.ReactNode);
17
+ titleButtons?: {
18
+ show: boolean;
19
+ maxCount: number;
20
+ items: OperationItem[];
21
+ };
22
+ tableButtons?: {
23
+ show: boolean;
24
+ maxCount: number;
25
+ items: OperationItem[];
26
+ };
27
+ buttons?: any[];
28
+ operation?: {
29
+ show: boolean;
30
+ title: string;
31
+ width: number;
32
+ align: 'left' | 'center' | 'right';
33
+ fixed: 'left' | 'right' | false;
34
+ type: 'link' | 'button';
35
+ items: OperationItem[];
36
+ };
37
+ operationContent?: {
38
+ [key: string]: React.ReactNode;
39
+ };
40
+ dataSource: DataSourceType;
41
+ columns: ColumnType<any>[];
42
+ filter: any;
43
+ search?: {
44
+ show: boolean;
45
+ placeholder: string;
46
+ };
47
+ __designMode: string;
48
+ componentId: string;
49
+ clickToDetail?: {
50
+ show: boolean;
51
+ useCustomAction: boolean;
52
+ actionType: string;
53
+ openMode: 'modal' | 'drawer';
54
+ openContentSize: 'small' | 'middle' | 'large';
55
+ openTitle: string;
56
+ key: string;
57
+ };
58
+ onRow?: any;
59
+ filterBy?: Record<string, any>;
60
+ sortBy: string;
61
+ tabs?: {
62
+ show: boolean;
63
+ type: string;
64
+ items: {
65
+ name: string;
66
+ filterBy: Record<string, any>;
67
+ sortBy: string;
68
+ }[];
69
+ };
70
+ onValuesChange?: (changedValues: any, values: any) => void;
71
+ extraParams?: {
72
+ list?: Record<string, any>;
73
+ get?: Record<string, any>;
74
+ update?: Record<string, any>;
75
+ create?: Record<string, any>;
76
+ destroy?: Record<string, any>;
77
+ };
78
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DataSourceContextProps } from '../provider/dataSource/DataSourceContext';
2
3
  declare const DataSourceWrapper: (props: DataSourceContextProps) => JSX.Element;
3
4
  export default DataSourceWrapper;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import { ModeType } from "../../dataSourceForm/type";
4
+ export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
5
+ renderMode: ModeType;
6
+ value?: string;
7
+ onChange?: (value: string) => void;
8
+ }
9
+ declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
10
+ export default MobileNumberInputWithMode;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 获取nocobase数据列表
3
+ */
4
+ export declare const getCountryDataList: () => Promise<any>;
5
+ export interface Country {
6
+ id: number;
7
+ name: {
8
+ en: string;
9
+ "zh-CN": string;
10
+ "zh-HK": string;
11
+ original: string;
12
+ };
13
+ code: string;
14
+ calling_code: string;
15
+ currency_code: string;
16
+ sort: number;
17
+ status: string;
18
+ created_at: string;
19
+ updated_at: string;
20
+ prefix: string;
21
+ }
22
+ export declare const useCountries: () => {
23
+ data: Country[];
24
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import { ModeType } from "../../dataSourceForm/type";
4
+ export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
5
+ renderMode: ModeType;
6
+ value?: string;
7
+ onChange?: (value: string) => void;
8
+ }
9
+ declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
10
+ export default PhoneNumberInputWithMode;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 获取nocobase数据列表
3
+ */
4
+ export declare const getCountryDataList: () => Promise<any>;
5
+ export interface Country {
6
+ id: number;
7
+ name: {
8
+ en: string;
9
+ "zh-CN": string;
10
+ "zh-HK": string;
11
+ original: string;
12
+ };
13
+ code: string;
14
+ calling_code: string;
15
+ currency_code: string;
16
+ sort: number;
17
+ status: string;
18
+ created_at: string;
19
+ updated_at: string;
20
+ prefix: string;
21
+ }
22
+ export declare const useCountries: () => {
23
+ data: Country[];
24
+ };
@@ -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" | "xzero" | "saas";
5
+ rootDomain: "custom" | "saas" | "xzero";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -1,6 +1,6 @@
1
1
  declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
2
2
  options?: any;
3
- optionSourceType?: "default" | "custom" | "api" | undefined;
3
+ optionSourceType?: "custom" | "default" | "api" | undefined;
4
4
  labelField: string;
5
5
  valueField: string;
6
6
  extraParams?: Record<string, any> | undefined;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { UploadProps } from './type';
3
+ import './index.less';
4
+ declare const BaseUpload: React.FC<UploadProps>;
5
+ export default BaseUpload;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { UploadProps } from './type';
3
+ declare const UploadWithMode: React.FC<UploadProps & import("../../dataSourceForm/utils").WithModeProps>;
4
+ export default UploadWithMode;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * 获取nocobase媒体数据列表
3
+ */
4
+ export declare const getMediaTypeList: () => Promise<any>;
5
+ export interface MediaType {
6
+ id: number;
7
+ name: string;
8
+ maxsize: number;
9
+ }
10
+ export declare const useMediaConfig: (mediaConfig?: any) => {
11
+ data: {
12
+ upload_onetime_limit: any;
13
+ upload_maxsize: any;
14
+ };
15
+ };
16
+ export declare const useMediaTypes: () => {
17
+ data: MediaType[];
18
+ getExtensionsByIds: (ids: number[]) => string[];
19
+ getMaxSizeByIds: (ids: number[]) => Record<number, number>;
20
+ };
@@ -0,0 +1,56 @@
1
+ import { RcFile } from 'antd/es/upload';
2
+ export declare const filetypes: Record<string, any>;
3
+ /**
4
+ * @Title: 获取 阿里云 Signature
5
+ * @Describe:
6
+ * @Author: Wzw
7
+ */
8
+ export declare const getPolicy: () => Promise<any>;
9
+ export declare const getPolicyFile: () => Promise<any>;
10
+ /**
11
+ * @Title: 获取图片尺寸
12
+ * @Describe:
13
+ * @Author: Wzw
14
+ * @param {*} async
15
+ */
16
+ export declare const getImageWidth: (file: any) => Promise<{
17
+ width: number;
18
+ height: number;
19
+ }>;
20
+ /**
21
+ * @Title: 重新生成文件名
22
+ * @Describe:
23
+ * @Author: Wzw
24
+ * @param {string} file
25
+ */
26
+ export declare const formatFileName: (file?: any) => Promise<string>;
27
+ export declare const uploadFileAli: (file: any) => Promise<any>;
28
+ /**
29
+ * @Title: base64转file
30
+ * @Describe:
31
+ * @Author: Wzw
32
+ * @param {any} dataurl
33
+ * @param {string} filename
34
+ */
35
+ export declare const dataURLtoFile: (dataurl: any, filename: string) => File;
36
+ /**
37
+ * @Title: 获取视频封面
38
+ * @Describe:
39
+ * @Author: Wzw
40
+ * @param {any} file
41
+ */
42
+ export declare const getVideoCover: (file: any) => Promise<unknown>;
43
+ /**
44
+ * @Title: 获取腾讯云 Signature
45
+ * @Describe:
46
+ * @Author: Wzw
47
+ */
48
+ export declare const getSignature: () => Promise<any>;
49
+ /**
50
+ * @Title: 上传到腾讯云
51
+ * @Describe:
52
+ * @Author: Wzw
53
+ * @param {any} file
54
+ */
55
+ export declare const uploadFileTencent: (file: any) => Promise<unknown>;
56
+ export declare const uploadFile: (file: RcFile) => Promise<any>;
@@ -0,0 +1,37 @@
1
+ import { UploadFile as AntdUploadFile } from 'antd/es/upload/interface';
2
+ import type { UploadValue, UploadChangeHandler } from './types';
3
+ export interface UploadFile extends AntdUploadFile {
4
+ metadata?: {
5
+ width?: number;
6
+ height?: number;
7
+ duration?: number;
8
+ bitrate?: number;
9
+ };
10
+ }
11
+ export interface UploadProps {
12
+ renderMode?: string;
13
+ fieldKey: string;
14
+ maxSize?: number;
15
+ minCount?: number;
16
+ maxCount?: number;
17
+ multiple?: boolean;
18
+ presetType?: string[];
19
+ presetTypeString?: string[];
20
+ customType?: string[];
21
+ enablePresetType?: boolean;
22
+ enableCustomType?: boolean;
23
+ allowPreview?: boolean;
24
+ value?: UploadValue;
25
+ typeMaxSizeMap?: Record<string, number>;
26
+ enableMultilingual?: boolean;
27
+ onChange?: UploadChangeHandler;
28
+ disabled?: boolean;
29
+ mediaUploadUrl?: string;
30
+ getHeaders?: () => Record<string, string>;
31
+ mediaConfig?: {
32
+ data: {
33
+ upload_onetime_limit: number;
34
+ upload_maxsize: number;
35
+ };
36
+ };
37
+ }
@@ -0,0 +1,18 @@
1
+ import { RcFile, UploadFile } from 'antd/es/upload/interface';
2
+ import type { MediaMetadata, FileCountValidation, ValidationResult, MultilingualFile, FileListOptions, UploadValue, SingleMultilingualValue } from './types';
3
+ export declare const generateUid: () => string;
4
+ export declare const getSuffix: (name: string) => string;
5
+ export declare const getPointSuffix: (name: string) => string;
6
+ export declare const getFileType: (name: string) => string;
7
+ export declare const getFileName: (url: string) => string;
8
+ export declare const checkFileCount: ({ multiple, minCount, maxCount, valueLength, }: FileCountValidation) => ValidationResult;
9
+ export declare const getMediaMetadata: (file: RcFile) => Promise<MediaMetadata | null>;
10
+ export declare const genFileListByString: (value: string) => UploadFile[];
11
+ export declare const createMultilingualData: (value: string) => SingleMultilingualValue;
12
+ export declare const createMultilingualFileList: (value: string) => Record<string, UploadFile<any>[]>;
13
+ export declare const getDefaultFileList: (value: UploadValue | undefined, options: FileListOptions) => MultilingualFile[];
14
+ export declare const getFileMetadataParams: (file: RcFile & {
15
+ metadata?: MediaMetadata;
16
+ }) => Record<string, any>;
17
+ export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
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>;
@@ -19,7 +20,7 @@ declare const formFieldMap: {
19
20
  Subdomain: import("react").FC<import("antd").InputProps & {
20
21
  onChange: (value: string) => void;
21
22
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
22
- rootDomain: "custom" | "xzero" | "saas";
23
+ rootDomain: "custom" | "saas" | "xzero";
23
24
  customDomain?: string | undefined;
24
25
  value?: string | undefined;
25
26
  tenantId: string;
@@ -34,7 +35,7 @@ declare const formFieldMap: {
34
35
  };
35
36
  FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
36
37
  options?: any;
37
- optionSourceType?: "default" | "custom" | "api" | undefined;
38
+ optionSourceType?: "custom" | "default" | "api" | undefined;
38
39
  labelField: string;
39
40
  valueField: string;
40
41
  extraParams?: Record<string, any> | undefined;
@@ -59,7 +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
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | 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<{}> & {
63
64
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
64
65
  } & {
65
66
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -76,7 +77,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
76
77
  Subdomain: import("react").FC<import("antd").InputProps & {
77
78
  onChange: (value: string) => void;
78
79
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
79
- rootDomain: "custom" | "xzero" | "saas";
80
+ rootDomain: "custom" | "saas" | "xzero";
80
81
  customDomain?: string | undefined;
81
82
  value?: string | undefined;
82
83
  tenantId: string;
@@ -89,13 +90,13 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
89
90
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
90
91
  }) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
91
92
  options?: any;
92
- optionSourceType?: "default" | "custom" | "api" | undefined;
93
+ optionSourceType?: "custom" | "default" | "api" | undefined;
93
94
  labelField: string;
94
95
  valueField: string;
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("antd").InputProps & {
99
100
  onChange: (value: string) => void;
100
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>;
101
102
  export { getFieldComponent, formFieldMap };
@@ -0,0 +1,3 @@
1
+ declare const usePlatform: () => any;
2
+ declare const useIsShop: () => boolean;
3
+ export { usePlatform, useIsShop };
@@ -0,0 +1,4 @@
1
+ import './index.less';
2
+ import { SortType } from './types';
3
+ declare const DragSortTree: (props: SortType) => JSX.Element;
4
+ export default DragSortTree;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterProps } from "./types";
2
3
  declare const Filter: (props: FilterProps) => JSX.Element | null;
3
4
  export default Filter;
@@ -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;