@pisell/materials 3.3.72 → 3.3.74

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 (177) 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 +143 -143
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +24 -24
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +24 -24
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
  20. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  21. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
  22. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  23. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
  24. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
  25. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  26. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  27. package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  28. package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
  29. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
  30. package/es/components/date-picker/index.d.ts +1 -0
  31. package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
  32. package/es/components/filter/types.d.ts +46 -0
  33. package/es/components/page/index.d.ts +6 -0
  34. package/es/components/pisellAdjustPrice/index.d.ts +9 -0
  35. package/es/components/pisellCardList/index.d.ts +77 -0
  36. package/es/components/pisellCheckboxGroup/index.d.ts +37 -0
  37. package/es/components/pisellGoodPassCard/index.d.ts +49 -0
  38. package/es/components/pisellQRScanner/index.d.ts +24 -0
  39. package/es/components/pisellText/components/Amount/index.d.ts +20 -0
  40. package/es/components/pisellText/components/Editable/index.d.ts +29 -0
  41. package/es/components/pisellText/index.d.ts +9 -0
  42. package/es/components/pisellToast/index.d.ts +16 -0
  43. package/es/components/pisellWalletPassCard/index.d.ts +94 -0
  44. package/es/components/pisellWalletPassCard/index.js +70 -58
  45. package/es/components/pisellWalletPassCard/index.less +95 -34
  46. package/es/components/productCard/components/Header/index.d.ts +3 -0
  47. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  48. package/es/components/productCard/components/Sales/index.d.ts +3 -0
  49. package/es/components/productCard/components/Time/components/SelectHolder/index.js +1 -0
  50. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
  51. package/es/components/productCard/index.d.ts +5 -0
  52. package/es/components/productCard/utils.d.ts +31 -0
  53. package/es/components/select/index.d.ts +9 -0
  54. package/es/components/select-time/index.d.ts +1 -0
  55. package/es/components/sortableList/index.d.ts +11 -0
  56. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  57. package/es/components/table/Actions/index.d.ts +17 -0
  58. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  59. package/es/components/table/Table/AddFieldModal/index.d.ts +3 -0
  60. package/es/components/table/Table/SelectField/index.d.ts +1 -0
  61. package/es/components/table/Table/fields/index.d.ts +3 -2
  62. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  63. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  64. package/es/components/table/Table/utils.d.ts +1 -1
  65. package/es/components/table/hooks/useTableSetting.d.ts +21 -0
  66. package/es/components/table/hooks/useTransColumns.d.ts +14 -0
  67. package/es/components/table/index.d.ts +4 -0
  68. package/es/components/table/serve.d.ts +13 -0
  69. package/es/components/tabs/index.d.ts +17 -0
  70. package/es/components/virtual-keyboard/Amount/index.d.ts +22 -0
  71. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
  72. package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  73. package/es/components/virtual-keyboard/Number/index.d.ts +13 -0
  74. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
  75. package/es/components/virtual-keyboard/index.d.ts +14 -0
  76. package/es/components/walletCard/index.js +57 -9
  77. package/es/components/walletCard/index.less +63 -2
  78. package/es/index.d.ts +142 -0
  79. package/es/locales/en-US.js +3 -1
  80. package/es/locales/zh-CN.js +3 -1
  81. package/es/locales/zh-TW.js +3 -0
  82. package/es/utils/index.d.ts +1 -1
  83. package/es/utils/platform.d.ts +1 -1
  84. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
  85. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
  86. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
  87. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  88. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
  89. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
  90. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
  91. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  92. package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
  93. package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
  94. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
  95. package/lib/components/date-picker/index.d.ts +1 -0
  96. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
  97. package/lib/components/filter/types.d.ts +46 -0
  98. package/lib/components/page/index.d.ts +6 -0
  99. package/lib/components/pisellAdjustPrice/index.d.ts +9 -0
  100. package/lib/components/pisellCardList/index.d.ts +77 -0
  101. package/lib/components/pisellCheckboxGroup/index.d.ts +37 -0
  102. package/lib/components/pisellGoodPassCard/index.d.ts +49 -0
  103. package/lib/components/pisellQRScanner/index.d.ts +24 -0
  104. package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
  105. package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
  106. package/lib/components/pisellText/index.d.ts +9 -0
  107. package/lib/components/pisellToast/index.d.ts +16 -0
  108. package/lib/components/pisellWalletPassCard/index.d.ts +94 -0
  109. package/lib/components/pisellWalletPassCard/index.js +52 -30
  110. package/lib/components/pisellWalletPassCard/index.less +95 -34
  111. package/lib/components/productCard/components/Header/index.d.ts +3 -0
  112. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  113. package/lib/components/productCard/components/Sales/index.d.ts +3 -0
  114. package/lib/components/productCard/components/Time/components/SelectHolder/index.js +1 -0
  115. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
  116. package/lib/components/productCard/index.d.ts +5 -0
  117. package/lib/components/productCard/utils.d.ts +31 -0
  118. package/lib/components/select/index.d.ts +9 -0
  119. package/lib/components/select-time/index.d.ts +1 -0
  120. package/lib/components/sortableList/index.d.ts +11 -0
  121. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  122. package/lib/components/table/Actions/index.d.ts +17 -0
  123. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  124. package/lib/components/table/Table/AddFieldModal/index.d.ts +3 -0
  125. package/lib/components/table/Table/SelectField/index.d.ts +1 -0
  126. package/lib/components/table/Table/fields/index.d.ts +3 -2
  127. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  128. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  129. package/lib/components/table/Table/utils.d.ts +1 -1
  130. package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
  131. package/lib/components/table/hooks/useTransColumns.d.ts +14 -0
  132. package/lib/components/table/index.d.ts +4 -0
  133. package/lib/components/table/serve.d.ts +13 -0
  134. package/lib/components/tabs/index.d.ts +17 -0
  135. package/lib/components/virtual-keyboard/Amount/index.d.ts +22 -0
  136. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
  137. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  138. package/lib/components/virtual-keyboard/Number/index.d.ts +13 -0
  139. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
  140. package/lib/components/virtual-keyboard/index.d.ts +14 -0
  141. package/lib/components/walletCard/index.js +47 -7
  142. package/lib/components/walletCard/index.less +63 -2
  143. package/lib/index.d.ts +142 -0
  144. package/lib/locales/en-US.js +3 -1
  145. package/lib/locales/zh-CN.js +3 -1
  146. package/lib/locales/zh-TW.js +3 -0
  147. package/lib/utils/index.d.ts +1 -1
  148. package/lib/utils/platform.d.ts +1 -1
  149. package/package.json +1 -1
  150. package/es/components/appVersionControl/index.d.ts +0 -4
  151. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -2
  152. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
  153. package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
  154. package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
  155. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -16
  156. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
  157. package/es/components/drag-sort-tree/index.d.ts +0 -4
  158. package/es/components/login-and-register/index.d.ts +0 -82
  159. package/es/components/pisellEmpty/index.d.ts +0 -19
  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/table/types.d.ts +0 -268
  163. package/es/components/versionModal/index.d.ts +0 -23
  164. package/lib/components/appVersionControl/index.d.ts +0 -4
  165. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -2
  166. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
  167. package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
  168. package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
  169. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -16
  170. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
  171. package/lib/components/drag-sort-tree/index.d.ts +0 -4
  172. package/lib/components/login-and-register/index.d.ts +0 -82
  173. package/lib/components/pisellEmpty/index.d.ts +0 -19
  174. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  175. package/lib/components/productCard/components/Time/index.d.ts +0 -3
  176. package/lib/components/table/types.d.ts +0 -268
  177. package/lib/components/versionModal/index.d.ts +0 -23
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Sales: ({ item, isShowNote }: any) => JSX.Element | null;
3
+ export default Sales;
@@ -98,6 +98,7 @@ var SelectHolder = ({
98
98
  mode: holderMode,
99
99
  size: "large",
100
100
  showSearch: true,
101
+ optionFilterProp: "label",
101
102
  allowClear,
102
103
  onClear: () => onChange(""),
103
104
  value: selectedValue,
@@ -0,0 +1,13 @@
1
+ import './index.less';
2
+ interface SelectHolderModalProps {
3
+ visible: boolean;
4
+ onClose: () => void;
5
+ onConfirm: (value: any) => void;
6
+ lists: any[];
7
+ value: any[];
8
+ holderMaxCount: number;
9
+ addHolderButtonText: string;
10
+ onAdd: () => void;
11
+ }
12
+ declare const SelectHolderModal: (props: SelectHolderModalProps) => JSX.Element;
13
+ export default SelectHolderModal;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ProductCardTypes } from './types';
3
+ import './index.less';
4
+ declare const ProductCard: React.FC<ProductCardTypes>;
5
+ export default ProductCard;
@@ -0,0 +1,31 @@
1
+ import 'dayjs/locale/zh-cn';
2
+ import 'dayjs/locale/en';
3
+ import 'dayjs/locale/zh-tw';
4
+ /**
5
+ * @title: 是否英文
6
+ * @description:
7
+ * @param {any} item
8
+ * @return {*}
9
+ * @Author: WangHan
10
+ * @Date: 2024-12-28 22:49
11
+ */
12
+ export declare const isEn: (item: any) => boolean;
13
+ /**
14
+ * @title: 跨日预约时间
15
+ * @description:
16
+ * @param {any} item
17
+ * @return {*}
18
+ * @Author: WangHan
19
+ * @Date: 2024-12-28 22:50
20
+ */
21
+ export declare const formatMultiDayDate: (item: any) => string;
22
+ /**
23
+ * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
24
+ * @description:
25
+ * @param {any} item
26
+ * @param {any} currentDate
27
+ * @return {*}
28
+ * @Author: zhiwei.Wang
29
+ * @Date: 2024-04-26 14:04
30
+ */
31
+ export declare const getServiceTime: (item: any, currentDate: any) => string;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Select as OriginalSelect } from 'antd';
3
+ import type { SelectProps } from 'antd';
4
+ import './index.less';
5
+ interface CompoundedComponent extends React.ForwardRefExoticComponent<SelectProps> {
6
+ Option: typeof OriginalSelect.Option;
7
+ }
8
+ declare const Select: CompoundedComponent;
9
+ export default Select;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { VirtualKeyboardTimeProps } from "../virtual-keyboard/Time";
2
3
  import { PopoverProps, TimePickerProps } from "antd";
3
4
  import "./index.less";
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { Props } from "../DragSortList";
3
+ export interface SortableListProps<T> {
4
+ dataSource: Props<T>["list"];
5
+ onChange: Props<T>["onChange"];
6
+ rowKey: Props<T>["rowKey"];
7
+ renderItem?: (item: T, index: number) => React.ReactNode;
8
+ activationConstraint?: Props<T>["activationConstraint"];
9
+ }
10
+ declare const SortableList: React.FC<SortableListProps<any>>;
11
+ export default SortableList;
@@ -0,0 +1,7 @@
1
+ interface IExportParams {
2
+ type: string;
3
+ originDataSource: any[];
4
+ currentDataSource: any[];
5
+ }
6
+ export declare const batchExport: (exportParams: IExportParams, exportImport: any) => Promise<true | undefined>;
7
+ export {};
@@ -0,0 +1,17 @@
1
+ import { FilterType } from "../../filter/types";
2
+ import { ColumnSettingType, DataSourceGroupType, ExportImportType, GallerySettingType, GridViewType, SortType } from "../types";
3
+ import "./index.less";
4
+ declare type ActionsProps = {
5
+ filter: FilterType;
6
+ tableId?: string;
7
+ columnSetting?: ColumnSettingType;
8
+ dataSourceGroup?: DataSourceGroupType;
9
+ sort: SortType;
10
+ localPagination?: boolean;
11
+ buttons: any[];
12
+ view: GridViewType;
13
+ gallery: GallerySettingType;
14
+ exportImport?: ExportImportType;
15
+ };
16
+ declare const Actions: ({ filter, sort, columnSetting, dataSourceGroup, tableId, localPagination, buttons, view, gallery, exportImport, }: ActionsProps) => JSX.Element | null;
17
+ export default Actions;
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: number;
3
- vertical: number;
2
+ horizontal: any;
3
+ vertical: any;
4
4
  };
5
5
  export default useGapSize;
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const AddFieldModal: React.FC;
3
+ export default AddFieldModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectField: () => JSX.Element;
2
3
  export default SelectField;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const fieldMaps: {
2
3
  text: {
3
4
  field: {
@@ -197,12 +198,12 @@ export declare const fieldList: ({
197
198
  field_icon: string;
198
199
  field_name: string;
199
200
  field_type: string;
200
- default_value: boolean;
201
+ default_value: string;
201
202
  } | {
202
203
  field_icon: string;
203
204
  field_name: string;
204
205
  field_type: string;
205
- default_value: string;
206
+ default_value: boolean;
206
207
  } | {
207
208
  field_icon: string;
208
209
  field_name: string;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("filters" | "order_by" | "group_by" | "column_setting" | "gallery_setting" | "filter_setting" | "view_mode")[];
158
+ }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filters" | "filter_setting")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -0,0 +1,21 @@
1
+ import { FilterType } from "../../filter/types";
2
+ import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType, LocalSettingsType } from "../types";
3
+ declare type UseTableSettingProps = {
4
+ tableId?: string;
5
+ filter: FilterType;
6
+ columns: Record<string, any>[];
7
+ columnSetting?: ColumnSettingType;
8
+ dataSourceGroup?: DataSourceGroupType;
9
+ sort?: SortType;
10
+ view: GridViewType;
11
+ currentViewMode: ModeType;
12
+ gallery?: GallerySettingType;
13
+ currentSettingHash: string;
14
+ exportImport?: ExportImportModeType;
15
+ localSettings?: LocalSettingsType;
16
+ };
17
+ declare const useTableSetting: (params: UseTableSettingProps) => {
18
+ setTableSetting: (values: Record<string, any>) => void;
19
+ tableSetting: any;
20
+ };
21
+ export default useTableSetting;
@@ -0,0 +1,14 @@
1
+ import { FormInstance } from "antd/es/form";
2
+ declare type UseTransColumnsProps = {
3
+ columns: Record<string, any>[];
4
+ form: FormInstance;
5
+ localPagination: boolean;
6
+ handleSave?: (row: Record<string, any>) => void;
7
+ handleResize?: (index: number, record: Record<string, any>) => (e: any, p2: any) => void;
8
+ dragSort: boolean;
9
+ bordered: boolean;
10
+ };
11
+ declare const useTransColumns: (params: UseTransColumnsProps) => {
12
+ columns: any[];
13
+ };
14
+ export default useTransColumns;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
+ export default _default;
@@ -0,0 +1,13 @@
1
+ declare type exportParams = {
2
+ ids?: Array<string | number>;
3
+ file_name?: string;
4
+ form_id?: string | number;
5
+ code?: string;
6
+ url?: string;
7
+ };
8
+ export declare const exportData: (params: exportParams) => Promise<any>;
9
+ export declare const batchImport: (params: any) => Promise<any>;
10
+ export declare const importTemplate: (params: exportParams) => Promise<any>;
11
+ export declare const getExportFile: (params: any) => Promise<any>;
12
+ export declare const getImportLog: (params: any) => Promise<any>;
13
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Component } from 'react';
2
+ import { TabsProps } from 'antd';
3
+ import './index.less';
4
+ declare class Tabs extends Component<any> {
5
+ state: {
6
+ activeKey: any;
7
+ };
8
+ componentDidMount(): void;
9
+ componentDidUpdate(prevProps: Readonly<any>): void;
10
+ private _handleChange;
11
+ setActiveKey: (key: string) => void;
12
+ getActiveKey: () => any;
13
+ renderIconLabelTabBar: TabsProps['renderTabBar'];
14
+ filterHiddenTabs: (tabs: any[]) => any[];
15
+ render(): JSX.Element;
16
+ }
17
+ export default Tabs;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { BaseNumberKeyboardProps } from '../BaseNumberKeyboard';
3
+ export interface AmountProps {
4
+ max?: number;
5
+ min?: number;
6
+ doneText?: string;
7
+ resetText?: string;
8
+ defaultValue?: string | number;
9
+ placeholder?: string;
10
+ amountProps?: {
11
+ showCurrencySymbol: boolean;
12
+ useThousandsSeparator: boolean;
13
+ };
14
+ presets?: BaseNumberKeyboardProps['presets'];
15
+ value?: string | number;
16
+ onChange?: (val: string | number) => void;
17
+ onEnter?: (val: string | number) => void;
18
+ defaultSelect?: boolean;
19
+ inputFormat?: (_v: string) => React.ReactNode | null;
20
+ }
21
+ declare const Amount: (props: AmountProps) => JSX.Element;
22
+ export default Amount;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { PresetsProps } from "./Presets";
3
+ import './index.less';
4
+ export interface BaseNumberKeyboardProps {
5
+ placeholder?: string;
6
+ format?: (val: string) => React.ReactNode;
7
+ defaultValue?: string | number;
8
+ doneText?: string;
9
+ resetText?: string;
10
+ onChange?: (val: string) => void;
11
+ onEnter?: (val: string) => void;
12
+ value?: string | number;
13
+ max?: number;
14
+ min?: number;
15
+ presets?: PresetsProps['presets'];
16
+ defaultSelect?: boolean;
17
+ }
18
+ declare const BaseNumberKeyboard: (props: BaseNumberKeyboardProps) => JSX.Element;
19
+ export default BaseNumberKeyboard;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export declare type ItemValue = string | number;
4
+ export interface Item {
5
+ value: ItemValue;
6
+ label: React.ReactNode;
7
+ disabled: boolean;
8
+ type: 'text' | 'primary';
9
+ style?: React.CSSProperties;
10
+ size?: number;
11
+ }
12
+ export interface KeyboardProps {
13
+ className?: string;
14
+ style?: React.CSSProperties;
15
+ onChange?: (value?: ItemValue) => void;
16
+ items?: Item[];
17
+ rightItems?: Item[];
18
+ keydown?: boolean;
19
+ }
20
+ declare const _default: React.MemoExoticComponent<(props: KeyboardProps) => JSX.Element>;
21
+ export default _default;
@@ -0,0 +1,13 @@
1
+ export interface NumberProps {
2
+ max?: number;
3
+ min?: number;
4
+ doneText?: string;
5
+ resetText: string;
6
+ defaultValue?: string | number;
7
+ placeholder?: string;
8
+ value?: string | number;
9
+ onChange?: (val: string | number) => void;
10
+ onEnter?: (val: string | number) => void;
11
+ }
12
+ declare const Number: (props: NumberProps) => JSX.Element;
13
+ export default Number;
@@ -0,0 +1,11 @@
1
+ import { InputProps } from 'antd';
2
+ import './index.less';
3
+ export interface VirtualKeyInputProps extends InputProps {
4
+ previewValue?: string;
5
+ renderInput?: (props: any) => any;
6
+ showDelete?: boolean;
7
+ onValueSelect?: (selected: boolean) => void;
8
+ defaultSelect?: boolean;
9
+ }
10
+ declare const VirtualKeyInput: (props: VirtualKeyInputProps) => JSX.Element;
11
+ export default VirtualKeyInput;
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { KeyboardProps } from "./Keyboard";
3
+ import { VirtualKeyInputProps } from "./VirtualKeyInput";
4
+ import "./index.less";
5
+ interface VirtualKeyboardProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ keyboardProps?: KeyboardProps;
7
+ virtualKeyInputProps?: VirtualKeyInputProps;
8
+ rightPanel?: React.ReactNode;
9
+ style?: React.CSSProperties;
10
+ onChange?: (value?: any) => void;
11
+ value?: string;
12
+ }
13
+ declare const VirtualKeyboard: (props: VirtualKeyboardProps) => JSX.Element;
14
+ export default VirtualKeyboard;
@@ -62,6 +62,10 @@ var DEFAULT_PROPS = {
62
62
  showCode: true,
63
63
  walletName: "Level",
64
64
  isLogin: true,
65
+ showHolderName: true,
66
+ holder: null,
67
+ onSetHolder: () => {
68
+ },
65
69
  items: [
66
70
  {
67
71
  type: "rechargeable",
@@ -166,7 +170,9 @@ var CardHeader = ({
166
170
  onCodeClick,
167
171
  isLogin = false,
168
172
  showViewPin = false,
169
- onViewPinClick
173
+ onViewPinClick,
174
+ showHolderName,
175
+ holderName
170
176
  }) => {
171
177
  const processedShowIcon = toBooleanValue(showIcon);
172
178
  const processedShowWalletName = toBooleanValue(showWalletName);
@@ -181,7 +187,7 @@ var CardHeader = ({
181
187
  alt: "wallet icon",
182
188
  style: { width: "20px", height: "20px" }
183
189
  }
184
- )) : null, processedShowWalletName && walletName && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-level-text" }, walletName)), processedShowShopName && shopName && /* @__PURE__ */ import_react.default.createElement("div", null, shopName), processedShowCardNo && cardNo && /* @__PURE__ */ import_react.default.createElement("div", null, cardNo), processedShowViewPin && /* @__PURE__ */ import_react.default.createElement(
190
+ )) : null, processedShowWalletName && walletName && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-header-level-text" }, walletName)), showHolderName && /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-wallet-card-header-holder-name") }, holderName), processedShowShopName && shopName && /* @__PURE__ */ import_react.default.createElement("div", null, shopName), processedShowCardNo && cardNo && /* @__PURE__ */ import_react.default.createElement("div", null, cardNo), processedShowViewPin && /* @__PURE__ */ import_react.default.createElement(
185
191
  "div",
186
192
  {
187
193
  className: "pisell-wallet-card-header-view-pin",
@@ -307,7 +313,10 @@ var WalletCard = (props) => {
307
313
  onClick,
308
314
  className,
309
315
  style,
310
- isGuide
316
+ isGuide,
317
+ showHolderName,
318
+ holder,
319
+ onSetHolder
311
320
  } = mergedProps;
312
321
  const showIcon = toBooleanValue(mergedProps.showIcon);
313
322
  const showWalletName = toBooleanValue(mergedProps.showWalletName);
@@ -350,11 +359,13 @@ var WalletCard = (props) => {
350
359
  if (!(items == null ? void 0 : items.length)) {
351
360
  return;
352
361
  }
362
+ const data = {
363
+ id: props.id,
364
+ holder_id: holder == null ? void 0 : holder.holder_id
365
+ };
353
366
  utils == null ? void 0 : utils.action({
354
367
  type: "pisell1.goWallet",
355
- data: {
356
- id: props.id
357
- },
368
+ data,
358
369
  callback: () => {
359
370
  }
360
371
  });
@@ -367,6 +378,32 @@ var WalletCard = (props) => {
367
378
  console.error("onViewPinClick方法需要传入");
368
379
  }
369
380
  };
381
+ const _renderMask = () => {
382
+ if (typeof onSetHolder !== "function") return null;
383
+ if ((holder == null ? void 0 : holder.holder_type) === "form" && !(holder == null ? void 0 : holder.holder_id)) {
384
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-add-holder-mask" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-add-holder-mask-text" }, (0, import_locales.getText)("pisell2.wallet-card.add-holder-tip")), /* @__PURE__ */ import_react.default.createElement(
385
+ import_antd.Button,
386
+ {
387
+ type: "primary",
388
+ className: "pisell-wallet-add-holder-mask-button",
389
+ onClick: () => onSetHolder == null ? void 0 : onSetHolder()
390
+ },
391
+ (0, import_locales.getText)("pisell2.wallet-card.add-holder-button-text"),
392
+ /* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-user-edit", style: { fontSize: 16 } })
393
+ ));
394
+ }
395
+ return null;
396
+ };
397
+ const _showHolderName = (0, import_react.useMemo)(() => {
398
+ return (holder == null ? void 0 : holder.holder_type) === "form" && showHolderName;
399
+ }, [holder, showHolderName]);
400
+ const holderName = (0, import_react.useMemo)(() => {
401
+ var _a2;
402
+ if ((holder == null ? void 0 : holder.holder_type) === "form" && !(holder == null ? void 0 : holder.holder_id)) {
403
+ return "--";
404
+ }
405
+ return ((_a2 = holder == null ? void 0 : holder.detail) == null ? void 0 : _a2.main_field) || "";
406
+ }, [holder]);
370
407
  return /* @__PURE__ */ import_react.default.createElement(
371
408
  "div",
372
409
  {
@@ -382,6 +419,7 @@ var WalletCard = (props) => {
382
419
  flexDirection: codeDirection === "top" ? "column-reverse" : "column"
383
420
  }
384
421
  },
422
+ _renderMask(),
385
423
  /* @__PURE__ */ import_react.default.createElement(
386
424
  "div",
387
425
  {
@@ -417,7 +455,9 @@ var WalletCard = (props) => {
417
455
  onCodeClick: handleCodeClick,
418
456
  isLogin,
419
457
  showViewPin,
420
- onViewPinClick
458
+ onViewPinClick,
459
+ showHolderName: _showHolderName,
460
+ holderName
421
461
  }
422
462
  ),
423
463
  /* @__PURE__ */ import_react.default.createElement(
@@ -9,6 +9,36 @@
9
9
  width: 100%;
10
10
  display: flex;
11
11
  cursor: pointer;
12
+ position: relative;
13
+ }
14
+
15
+ .pisell-wallet-add-holder-mask {
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ background-color: rgba(0, 0, 0, 0.6);
22
+ display: flex;
23
+ flex-direction: column;
24
+ align-items: center;
25
+ justify-content: center;
26
+ gap: 16px;
27
+ z-index: 9;
28
+
29
+ &-text {
30
+ color: #fff;
31
+ text-align: center;
32
+ font-size: 16px;
33
+ font-style: normal;
34
+ font-weight: 600;
35
+ line-height: 24px;
36
+ white-space: pre-line;
37
+ }
38
+
39
+ &-button {
40
+ font-weight: bold;
41
+ }
12
42
  }
13
43
 
14
44
  // 卡片内容区域
@@ -35,6 +65,12 @@
35
65
  color: #fff;
36
66
  }
37
67
  }
68
+
69
+ .pisell-wallet-card-header-holder-name {
70
+ color: var(--Gray-900, #101828);
71
+ border: 1px solid var(--Gray-100, #f2f4f7);
72
+ background: var(--Gray-100, #f2f4f7);
73
+ }
38
74
  }
39
75
 
40
76
  // 亮色主题
@@ -54,6 +90,12 @@
54
90
  color: #101828;
55
91
  }
56
92
  }
93
+
94
+ .pisell-wallet-card-header-holder-name {
95
+ color: #fff;
96
+ border: 1px solid var(--Gray-600, #475467);
97
+ background: var(--Gray-600, #475467);
98
+ }
57
99
  }
58
100
  }
59
101
 
@@ -66,6 +108,25 @@
66
108
  display: flex;
67
109
  justify-content: space-between;
68
110
  align-items: flex-start;
111
+ min-height: 100px;
112
+
113
+ .pisell-wallet-card-header-holder-name {
114
+ cursor: pointer;
115
+ display: inline-block;
116
+ overflow: hidden;
117
+ text-overflow: ellipsis;
118
+ white-space: nowrap;
119
+ padding: 2px 8px;
120
+ border-radius: 16px;
121
+ height: 22px;
122
+ min-width: 50px;
123
+ text-align: center;
124
+ font-size: 12px;
125
+ line-height: 16px;
126
+ max-width: 100%;
127
+ font-style: normal;
128
+ font-weight: 500;
129
+ }
69
130
 
70
131
  // 头部左侧
71
132
  .pisell-wallet-card-header-left {
@@ -78,7 +139,7 @@
78
139
  display: flex;
79
140
  align-items: center;
80
141
  gap: 10px;
81
- margin-bottom: 8px;
142
+ margin-bottom: 4px;
82
143
 
83
144
  // 卡片名称文本
84
145
  .pisell-wallet-card-header-level-text {
@@ -157,7 +218,7 @@
157
218
 
158
219
  // 卡片内容列表
159
220
  .pisell-wallet-card-list {
160
- margin-top: 30px;
221
+ margin-top: unset;
161
222
  height: 50px;
162
223
  box-sizing: border-box;
163
224
  display: flex;