@pisell/materials 1.0.803 → 1.0.805

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 (127) 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.css +1 -1
  6. package/build/lowcode/render/default/view.js +5 -5
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +4 -4
  9. package/es/components/appVersionControl/index.d.ts +4 -0
  10. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  11. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
  12. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
  13. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +98 -0
  14. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
  15. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -0
  16. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  17. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  18. package/es/components/drag-sort-tree/index.d.ts +3 -0
  19. package/es/components/login-and-register/index.d.ts +82 -0
  20. package/es/components/page/index.d.ts +1 -0
  21. package/es/components/page/index.js +1 -5
  22. package/es/components/pisell-config-provider/index.d.ts +12 -0
  23. package/es/components/pisellAvatar/index.d.ts +19 -0
  24. package/es/components/pisellCardList/index.d.ts +2 -0
  25. package/es/components/pisellCardList/index.js +4 -0
  26. package/es/components/pisellCheckboxGroup/index.d.ts +36 -0
  27. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  28. package/es/components/pisellEmpty/index.d.ts +19 -0
  29. package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  30. package/es/components/pisellInformationEntry/index.d.ts +33 -0
  31. package/es/components/pisellMenu/types.d.ts +26 -0
  32. package/es/components/pisellText/components/Amount/index.d.ts +20 -0
  33. package/es/components/pisellWalletPassCard/index.d.ts +2 -0
  34. package/es/components/pisellWalletPassCard/index.js +80 -13
  35. package/es/components/productCard/components/AmountFooter/index.d.ts +0 -1
  36. package/es/components/productCard/components/AmountFooter/index.js +22 -6
  37. package/es/components/productCard/components/AmountFooter/index.less +28 -1
  38. package/es/components/productCard/components/Header/Actions/index.d.ts +3 -0
  39. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  40. package/es/components/productCard/components/Header/EditButton/index.d.ts +4 -0
  41. package/es/components/productCard/components/Header/index.d.ts +4 -0
  42. package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
  43. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
  44. package/es/components/productCard/components/Sales/index.d.ts +4 -0
  45. package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  46. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  47. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  48. package/es/components/productCard/components/Time/index.d.ts +3 -0
  49. package/es/components/productCard/components/Time/index.js +5 -3
  50. package/es/components/productCard/locales.d.ts +63 -0
  51. package/es/components/productCard/status.d.ts +32 -0
  52. package/es/components/productCard/types.d.ts +83 -0
  53. package/es/components/productCard/utils.d.ts +31 -0
  54. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  55. package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  56. package/es/components/table/Gallery/index.d.ts +5 -0
  57. package/es/components/table/Table/index.d.ts +4 -0
  58. package/es/components/table/Table/utils.d.ts +173 -0
  59. package/es/components/table/hooks/useTableSetting.d.ts +22 -0
  60. package/es/components/table/hooks/useTransDataSource.d.ts +12 -0
  61. package/es/components/table/types.d.ts +253 -0
  62. package/es/components/versionModal/index.d.ts +24 -0
  63. package/es/components/walletCard/index.d.ts +65 -0
  64. package/es/locales/en-US.d.ts +276 -0
  65. package/es/locales/zh-CN.d.ts +271 -0
  66. package/es/locales/zh-TW.d.ts +271 -0
  67. package/lib/components/appVersionControl/index.d.ts +4 -0
  68. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  69. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
  70. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
  71. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +98 -0
  72. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
  73. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -0
  74. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  75. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  76. package/lib/components/drag-sort-tree/index.d.ts +3 -0
  77. package/lib/components/login-and-register/index.d.ts +82 -0
  78. package/lib/components/page/index.d.ts +1 -0
  79. package/lib/components/page/index.js +0 -4
  80. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  81. package/lib/components/pisellAvatar/index.d.ts +19 -0
  82. package/lib/components/pisellCardList/index.d.ts +2 -0
  83. package/lib/components/pisellCardList/index.js +4 -0
  84. package/lib/components/pisellCheckboxGroup/index.d.ts +36 -0
  85. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  86. package/lib/components/pisellEmpty/index.d.ts +19 -0
  87. package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  88. package/lib/components/pisellInformationEntry/index.d.ts +33 -0
  89. package/lib/components/pisellMenu/types.d.ts +26 -0
  90. package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
  91. package/lib/components/pisellWalletPassCard/index.d.ts +2 -0
  92. package/lib/components/pisellWalletPassCard/index.js +43 -11
  93. package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -1
  94. package/lib/components/productCard/components/AmountFooter/index.js +16 -6
  95. package/lib/components/productCard/components/AmountFooter/index.less +28 -1
  96. package/lib/components/productCard/components/Header/Actions/index.d.ts +3 -0
  97. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  98. package/lib/components/productCard/components/Header/EditButton/index.d.ts +4 -0
  99. package/lib/components/productCard/components/Header/index.d.ts +4 -0
  100. package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
  101. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
  102. package/lib/components/productCard/components/Sales/index.d.ts +4 -0
  103. package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  104. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  105. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  106. package/lib/components/productCard/components/Time/index.d.ts +3 -0
  107. package/lib/components/productCard/components/Time/index.js +5 -3
  108. package/lib/components/productCard/locales.d.ts +63 -0
  109. package/lib/components/productCard/status.d.ts +32 -0
  110. package/lib/components/productCard/types.d.ts +83 -0
  111. package/lib/components/productCard/utils.d.ts +31 -0
  112. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  113. package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  114. package/lib/components/table/Gallery/index.d.ts +5 -0
  115. package/lib/components/table/Table/index.d.ts +4 -0
  116. package/lib/components/table/Table/utils.d.ts +173 -0
  117. package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
  118. package/lib/components/table/hooks/useTransDataSource.d.ts +12 -0
  119. package/lib/components/table/types.d.ts +253 -0
  120. package/lib/components/versionModal/index.d.ts +24 -0
  121. package/lib/components/walletCard/index.d.ts +65 -0
  122. package/lib/locales/en-US.d.ts +276 -0
  123. package/lib/locales/zh-CN.d.ts +271 -0
  124. package/lib/locales/zh-TW.d.ts +271 -0
  125. package/lowcode/pisell-card-list/meta.ts +5 -0
  126. package/lowcode/pisell-wallet-pass-card/meta.ts +6 -1
  127. package/package.json +3 -3
@@ -0,0 +1,4 @@
1
+ import { AppVersionControlProps } from './types';
2
+ import './index.less';
3
+ declare const AppVersionControl: (props: AppVersionControlProps) => JSX.Element;
4
+ export default AppVersionControl;
@@ -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,39 @@
1
+ import { Drawer } from 'antd';
2
+ import React from 'react';
3
+ import { OperationItem } from '../type';
4
+ declare const useDrawerState: (operationContent?: {
5
+ [key: string]: React.ReactNode;
6
+ } | undefined) => {
7
+ drawerVisible: boolean;
8
+ setDrawerVisible: React.Dispatch<React.SetStateAction<boolean>>;
9
+ openDrawer: (item: OperationItem) => void;
10
+ closeDrawer: () => void;
11
+ drawerContent: React.ReactNode;
12
+ Container: {
13
+ (props: import("../../../pisellModal").PisellModalProps): JSX.Element;
14
+ confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
15
+ destroy: () => void;
16
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
17
+ };
18
+ info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
19
+ destroy: () => void;
20
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
+ };
22
+ error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
23
+ destroy: () => void;
24
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
25
+ };
26
+ warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
27
+ warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
28
+ destroy: () => void;
29
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
30
+ };
31
+ success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
32
+ destroy: () => void;
33
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
34
+ };
35
+ Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
36
+ } | typeof Drawer;
37
+ containerProps: {};
38
+ };
39
+ export default useDrawerState;
@@ -0,0 +1,98 @@
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" | "large" | "middle";
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
+ onDeleteFinish?: ((record: Record<string, any>) => void) | undefined;
90
+ extraParams?: {
91
+ list?: Record<string, any> | undefined;
92
+ get?: Record<string, any> | undefined;
93
+ update?: Record<string, any> | undefined;
94
+ create?: Record<string, any> | undefined;
95
+ destroy?: Record<string, any> | undefined;
96
+ } | undefined;
97
+ };
98
+ export default useTableProps;
@@ -0,0 +1,79 @@
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
+ onDeleteFinish?: (record: Record<string, any>) => void;
72
+ extraParams?: {
73
+ list?: Record<string, any>;
74
+ get?: Record<string, any>;
75
+ update?: Record<string, any>;
76
+ create?: Record<string, any>;
77
+ destroy?: Record<string, any>;
78
+ };
79
+ }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import { ModeType } from "../../dataSourceForm/type";
4
+ declare type PhoneValue = string | {
5
+ phone: string;
6
+ countryCallingCode: string;
7
+ };
8
+ export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
9
+ renderMode: ModeType;
10
+ value?: PhoneValue;
11
+ onChange?: (value: PhoneValue) => void;
12
+ returnFormat?: 'string' | 'object';
13
+ inputRef?: any;
14
+ }
15
+ declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
16
+ export default MobileNumberInputWithMode;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { InputProps } from 'antd';
3
+ import { ModeType } from "../../dataSourceForm/type";
4
+ declare type PhoneValue = string | {
5
+ phone: string;
6
+ countryCallingCode: string;
7
+ };
8
+ export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
9
+ renderMode: ModeType;
10
+ value?: PhoneValue;
11
+ onChange?: (value: PhoneValue) => void;
12
+ returnFormat?: 'string' | 'object';
13
+ inputRef?: any;
14
+ }
15
+ declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
16
+ export default PhoneNumberInputWithMode;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * 获取nocobase数据列表
3
+ */
4
+ export declare const getCountryDataList: () => Promise<any>;
5
+ export declare const getShopCountryDataList: (locale?: any) => Promise<any>;
6
+ export interface Country {
7
+ id: number;
8
+ name: {
9
+ en: string;
10
+ "zh-CN": string;
11
+ "zh-HK": string;
12
+ original: string;
13
+ };
14
+ code: string;
15
+ calling_code: string;
16
+ currency_code: string;
17
+ sort: number;
18
+ status: string;
19
+ created_at: string;
20
+ updated_at: string;
21
+ prefix: string;
22
+ }
23
+ export declare const useCountries: () => {
24
+ data: Country[];
25
+ };
@@ -0,0 +1,3 @@
1
+ import { SortType } from './types';
2
+ declare const DragSortTree: (props: SortType) => JSX.Element;
3
+ export default DragSortTree;
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ /**
4
+ * loginAndRegister组件的属性接口
5
+ */
6
+ export interface loginAndRegisterProps {
7
+ /** Logo相关配置 */
8
+ showLogo?: boolean;
9
+ logo?: string;
10
+ logoPosition?: 'left' | 'center' | 'right';
11
+ logoSize?: {
12
+ width?: number;
13
+ height?: number;
14
+ };
15
+ /** 标题相关配置 */
16
+ title?: string;
17
+ showTitle?: boolean;
18
+ titleAlign?: 'left' | 'center' | 'right';
19
+ /** 副标题相关配置 */
20
+ subtitle?: string;
21
+ showSubtitle?: boolean;
22
+ subtitleAlign?: 'left' | 'center' | 'right';
23
+ /** 登录方式配置 */
24
+ loginMethods?: ('email' | 'google' | 'facebook' | 'apple')[];
25
+ defaultLoginMethod?: 'email' | 'google' | 'facebook' | 'apple';
26
+ /** 表单配置 */
27
+ emailLabel?: string;
28
+ passwordLabel?: string;
29
+ emailPlaceholder?: string;
30
+ passwordPlaceholder?: string;
31
+ emailRules?: any[];
32
+ buttonText?: string;
33
+ rememberMeText?: string;
34
+ forgotPasswordText?: string;
35
+ showRememberMe?: boolean;
36
+ showForgotPassword?: boolean;
37
+ /** 社交登录配置 */
38
+ socialLoginTexts?: {
39
+ google?: string;
40
+ facebook?: string;
41
+ apple?: string;
42
+ };
43
+ /** 底部配置 */
44
+ showFooter?: boolean;
45
+ showSignUp?: boolean;
46
+ signUpText?: string;
47
+ signUpLink?: string;
48
+ signUpPosition?: 'left' | 'center' | 'right';
49
+ otherLinks?: Array<{
50
+ text: string;
51
+ url: string;
52
+ }>;
53
+ otherLinksPosition?: 'left' | 'center' | 'right';
54
+ /** 登录/注册切换配置 */
55
+ showTabs?: boolean;
56
+ loginTabText?: string;
57
+ registerTabText?: string;
58
+ /** 注册表单配置 */
59
+ registerEmailPlaceholder?: string;
60
+ registerPasswordPlaceholder?: string;
61
+ registerButtonText?: string;
62
+ /** 事件回调 */
63
+ onLogin?: (values: {
64
+ email: string;
65
+ loginMethod: string;
66
+ }) => void;
67
+ onSocialLogin?: (type: 'google' | 'facebook' | 'apple') => void;
68
+ onSignUp?: () => void;
69
+ onRegister?: (values: {
70
+ email: string;
71
+ password: string;
72
+ }) => void;
73
+ /** 新增背景图片属性 */
74
+ backgroundImage?: string;
75
+ }
76
+ /**
77
+ * Saas登录组件
78
+ * @param props - 组件属性
79
+ * @returns React组件
80
+ */
81
+ declare const loginAndRegister: React.FC<loginAndRegisterProps>;
82
+ export default loginAndRegister;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ConfigProviderProps } from '../config-provider';
2
3
  interface PageProps extends ConfigProviderProps {
3
4
  }
@@ -8,7 +8,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
8
8
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import React, { useEffect, useMemo } from 'react';
11
+ import React, { useMemo } from 'react';
12
12
  import ConfigProvider from "../config-provider";
13
13
  import { AdapterDayjs } from '@pisell/date-picker/es/AdapterDayjs';
14
14
  import VariablesProvider from "../dataSourceComponents/provider/variables/VariablesProvider";
@@ -56,11 +56,7 @@ var Page = function Page(props) {
56
56
  platform = _ref.platform,
57
57
  themeColor = _ref.themeColor;
58
58
  var locale = propsLocale || (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en';
59
- useEffect(function () {
60
- console.log('useEffectuseEffect page');
61
- }, []);
62
59
  var theme = useMemo(function () {
63
- console.log(platform, themeColor, props === null || props === void 0 ? void 0 : props.theme, 'useEffectuseEffect platform, themeColor, props?.theme');
64
60
  if (props !== null && props !== void 0 && props.theme) {
65
61
  var _props$theme;
66
62
  return _objectSpread(_objectSpread({}, props.theme), {}, {
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from './context';
3
+ interface PisellConfigProviderType {
4
+ platform?: PisellContextType['platform'];
5
+ children: React.ReactNode;
6
+ /** 货币符号 */
7
+ symbol?: string;
8
+ /** 当前语言环境 */
9
+ locale?: string;
10
+ }
11
+ declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
12
+ export default PisellConfigProvider;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { AvatarProps } from 'antd';
3
+ import './index.less';
4
+ export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
+ export interface PisellAvatarProps extends Omit<AvatarProps, 'size' | 'shape'> {
6
+ shape?: 'circle' | 'square';
7
+ size?: AvatarSize;
8
+ src?: string;
9
+ alt?: string;
10
+ icon?: React.ReactNode;
11
+ children?: React.ReactNode;
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ useTextAvatar?: boolean;
15
+ borderRadius?: number;
16
+ onError?: () => boolean;
17
+ }
18
+ declare const PisellAvatar: React.FC<PisellAvatarProps>;
19
+ export default PisellAvatar;
@@ -64,6 +64,8 @@ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'opt
64
64
  };
65
65
  };
66
66
  };
67
+ /** 编辑编辑按钮后,弹窗展示之前 */
68
+ beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
67
69
  /** 编辑弹窗点击提交 */
68
70
  onConfirmEdit?: (value: any, index: number) => void;
69
71
  }
@@ -63,6 +63,10 @@ var PisellCardList = function PisellCardList(props) {
63
63
  showBalanceSymbol: showBalanceSymbol || (item === null || item === void 0 ? void 0 : item.showBalanceSymbol),
64
64
  showActions: props.showActions || (item === null || item === void 0 ? void 0 : item.showActions),
65
65
  actions: props.actions || (item === null || item === void 0 ? void 0 : item.actions),
66
+ beforeEdit: function beforeEdit(record) {
67
+ var _props$beforeEdit;
68
+ return props === null || props === void 0 || (_props$beforeEdit = props.beforeEdit) === null || _props$beforeEdit === void 0 ? void 0 : _props$beforeEdit.call(props, record, index);
69
+ },
66
70
  onConfirmEdit: function onConfirmEdit(newVal) {
67
71
  var _props$onConfirmEdit;
68
72
  (_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index);
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from '../pisell-config-provider/context';
3
+ import './index.less';
4
+ export interface PisellCheckboxGroupOption {
5
+ label: string;
6
+ value: string;
7
+ disabled?: boolean;
8
+ [key: string]: any;
9
+ }
10
+ declare type PisellCheckboxGroupValue = string | string[] | any;
11
+ export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
12
+ platform?: PisellContextType['platform'];
13
+ direction?: 'horizontal' | 'vertical';
14
+ fullWidth?: boolean;
15
+ gap?: number;
16
+ padding?: number;
17
+ options: PisellCheckboxGroupOption[];
18
+ onChange?: (value: PisellCheckboxGroupValue, item: PisellCheckboxGroupOption) => void;
19
+ value?: PisellCheckboxGroupValue;
20
+ renderOption?: (option: PisellCheckboxGroupOption, active: boolean, index: number) => React.ReactNode;
21
+ rowKey?: string;
22
+ mode?: 'multiple' | 'single';
23
+ iconPosition?: 'left' | 'right' | 'hide';
24
+ optionClassName?: string;
25
+ optionActiveClassName?: string;
26
+ }
27
+ /**
28
+ * @title: PisellCheckboxGroup
29
+ * @description: 选中组件
30
+ * @param {PisellCheckboxGroupProps} props
31
+ * @return {*}
32
+ * @Author: zhiwei.Wang
33
+ * @Date: 2024-08-16 10:34
34
+ */
35
+ declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
36
+ export default PisellCheckboxGroup;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface PisellCustomCheckboxGroupProps {
4
+ dataSource?: any[];
5
+ disabled?: boolean;
6
+ allowAdd?: boolean;
7
+ isMultiple?: boolean;
8
+ id?: string | string[];
9
+ onClick?: (value: any) => void;
10
+ onAdd?: () => void;
11
+ renderAddItem?: (item: any) => React.ReactNode;
12
+ [key: string]: any;
13
+ className?: string;
14
+ }
15
+ declare const PisellCustomCheckboxGroup: React.FC<PisellCustomCheckboxGroupProps>;
16
+ export default PisellCustomCheckboxGroup;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { EmptyProps } from 'antd';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ import './index.less';
5
+ export interface PisellEmptyProps extends EmptyProps {
6
+ /** 平台 */
7
+ platform?: PisellContextType['platform'];
8
+ /** 额外内容描述 */
9
+ extraDescription?: React.ReactNode;
10
+ /** 额外内容描述 */
11
+ icon?: React.ReactNode;
12
+ /** 自定义底部额外操作区域 */
13
+ footer?: React.ReactNode;
14
+ /** 最大宽度 */
15
+ maxWidth?: number;
16
+ [key: string]: any;
17
+ }
18
+ declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
19
+ export default PisellEmpty;
@@ -0,0 +1,4 @@
1
+ export declare const useNativeScanner: (onChange?: ((val: string) => void) | undefined) => {
2
+ activeNativeScanner: () => void;
3
+ isTerminal: any;
4
+ };
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from '../pisell-config-provider/context';
3
+ import './index.less';
4
+ export declare type EntryModeType = {
5
+ /**
6
+ * 录入模式名称
7
+ * scanCode: 扫码录入
8
+ * input: 手动录入
9
+ * scanner: 扫码枪录入
10
+ * nfc: NFC录入
11
+ */
12
+ type: 'scanCode' | 'input' | 'scanner' | 'nfc';
13
+ /**
14
+ * 录入模式文案 没有使用默认文案
15
+ */
16
+ name?: string;
17
+ };
18
+ export interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
19
+ /** 平台 */
20
+ platform?: PisellContextType['platform'];
21
+ /** 录入模式 */
22
+ entryModes: EntryModeType[];
23
+ /** 标题文案 */
24
+ title?: React.ReactNode;
25
+ /** 搜索框描述文案 */
26
+ searchDescribe?: React.ReactNode;
27
+ /** 录入信息值改变 */
28
+ onChange?: (val: string) => void;
29
+ /** 录入类型切换时候触发的 */
30
+ onChangeType?: (val: null | EntryModeType['type']) => void;
31
+ }
32
+ declare const PisellInformationEntry: (props: PisellInformationEntryProps) => JSX.Element;
33
+ export default PisellInformationEntry;
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ import type { MenuProps } from 'antd';
3
+ export interface PisellMenuProps extends Omit<MenuProps, 'items'> {
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ mode?: 'vertical' | 'horizontal' | 'inline';
7
+ theme?: 'light' | 'dark';
8
+ defaultOpenKeys?: string[];
9
+ defaultSelectedKeys?: string[];
10
+ inlineCollapsed?: boolean;
11
+ openKeys?: string[];
12
+ selectedKeys?: string[];
13
+ onOpenChange?: (openKeys: string[]) => void;
14
+ dataSource?: any;
15
+ __designMode?: string;
16
+ other?: PisellMenuProps;
17
+ }
18
+ export interface MenuItemType {
19
+ key: string;
20
+ label: string;
21
+ path: string;
22
+ children?: MenuItemType[];
23
+ icon?: string | React.ReactNode;
24
+ hide?: boolean;
25
+ type?: 'group' | 'divider';
26
+ }