@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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +143 -143
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -24
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +24 -24
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/es/components/filter/types.d.ts +46 -0
- package/es/components/page/index.d.ts +6 -0
- package/es/components/pisellAdjustPrice/index.d.ts +9 -0
- package/es/components/pisellCardList/index.d.ts +77 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +37 -0
- package/es/components/pisellGoodPassCard/index.d.ts +49 -0
- package/es/components/pisellQRScanner/index.d.ts +24 -0
- package/es/components/pisellText/components/Amount/index.d.ts +20 -0
- package/es/components/pisellText/components/Editable/index.d.ts +29 -0
- package/es/components/pisellText/index.d.ts +9 -0
- package/es/components/pisellToast/index.d.ts +16 -0
- package/es/components/pisellWalletPassCard/index.d.ts +94 -0
- package/es/components/pisellWalletPassCard/index.js +70 -58
- package/es/components/pisellWalletPassCard/index.less +95 -34
- package/es/components/productCard/components/Header/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectHolder/index.js +1 -0
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/es/components/productCard/index.d.ts +5 -0
- package/es/components/productCard/utils.d.ts +31 -0
- package/es/components/select/index.d.ts +9 -0
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/sortableList/index.d.ts +11 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/es/components/table/Actions/index.d.ts +17 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/AddFieldModal/index.d.ts +3 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/components/table/hooks/useTransColumns.d.ts +14 -0
- package/es/components/table/index.d.ts +4 -0
- package/es/components/table/serve.d.ts +13 -0
- package/es/components/tabs/index.d.ts +17 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +22 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +13 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
- package/es/components/virtual-keyboard/index.d.ts +14 -0
- package/es/components/walletCard/index.js +57 -9
- package/es/components/walletCard/index.less +63 -2
- package/es/index.d.ts +142 -0
- package/es/locales/en-US.js +3 -1
- package/es/locales/zh-CN.js +3 -1
- package/es/locales/zh-TW.js +3 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/lib/components/filter/types.d.ts +46 -0
- package/lib/components/page/index.d.ts +6 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +9 -0
- package/lib/components/pisellCardList/index.d.ts +77 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +37 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +49 -0
- package/lib/components/pisellQRScanner/index.d.ts +24 -0
- package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
- package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
- package/lib/components/pisellText/index.d.ts +9 -0
- package/lib/components/pisellToast/index.d.ts +16 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +94 -0
- package/lib/components/pisellWalletPassCard/index.js +52 -30
- package/lib/components/pisellWalletPassCard/index.less +95 -34
- package/lib/components/productCard/components/Header/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectHolder/index.js +1 -0
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/lib/components/productCard/index.d.ts +5 -0
- package/lib/components/productCard/utils.d.ts +31 -0
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/sortableList/index.d.ts +11 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/lib/components/table/Actions/index.d.ts +17 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/AddFieldModal/index.d.ts +3 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/components/table/hooks/useTransColumns.d.ts +14 -0
- package/lib/components/table/index.d.ts +4 -0
- package/lib/components/table/serve.d.ts +13 -0
- package/lib/components/tabs/index.d.ts +17 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +22 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +13 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
- package/lib/components/virtual-keyboard/index.d.ts +14 -0
- package/lib/components/walletCard/index.js +47 -7
- package/lib/components/walletCard/index.less +63 -2
- package/lib/index.d.ts +142 -0
- package/lib/locales/en-US.js +3 -1
- package/lib/locales/zh-CN.js +3 -1
- package/lib/locales/zh-TW.js +3 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -16
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/components/Time/index.d.ts +0 -3
- package/es/components/table/types.d.ts +0 -268
- package/es/components/versionModal/index.d.ts +0 -23
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -16
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/index.d.ts +0 -3
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/versionModal/index.d.ts +0 -23
|
@@ -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,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:
|
|
201
|
+
default_value: string;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
206
207
|
} | {
|
|
207
208
|
field_icon: string;
|
|
208
209
|
field_name: string;
|
|
@@ -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
|
-
}) => ("
|
|
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,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;
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { Card, QRCode } from 'antd';
|
|
13
|
+
import { Button, Card, QRCode } from 'antd';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import React, { useMemo, useState } from 'react';
|
|
16
16
|
import Barcode from 'react-barcode';
|
|
@@ -44,6 +44,9 @@ var DEFAULT_PROPS = {
|
|
|
44
44
|
showCode: true,
|
|
45
45
|
walletName: 'Level',
|
|
46
46
|
isLogin: true,
|
|
47
|
+
showHolderName: true,
|
|
48
|
+
holder: null,
|
|
49
|
+
onSetHolder: function onSetHolder() {},
|
|
47
50
|
items: [{
|
|
48
51
|
type: 'rechargeable',
|
|
49
52
|
display: 1,
|
|
@@ -166,7 +169,9 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
166
169
|
isLogin = _ref2$isLogin === void 0 ? false : _ref2$isLogin,
|
|
167
170
|
_ref2$showViewPin = _ref2.showViewPin,
|
|
168
171
|
showViewPin = _ref2$showViewPin === void 0 ? false : _ref2$showViewPin,
|
|
169
|
-
onViewPinClick = _ref2.onViewPinClick
|
|
172
|
+
onViewPinClick = _ref2.onViewPinClick,
|
|
173
|
+
showHolderName = _ref2.showHolderName,
|
|
174
|
+
holderName = _ref2.holderName;
|
|
170
175
|
// 处理可能为0/1的布尔值
|
|
171
176
|
var processedShowIcon = toBooleanValue(showIcon);
|
|
172
177
|
var processedShowWalletName = toBooleanValue(showWalletName);
|
|
@@ -191,7 +196,9 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
191
196
|
}
|
|
192
197
|
})) : null, processedShowWalletName && walletName && /*#__PURE__*/React.createElement("div", {
|
|
193
198
|
className: "pisell-wallet-card-header-level-text"
|
|
194
|
-
}, walletName)),
|
|
199
|
+
}, walletName)), showHolderName && /*#__PURE__*/React.createElement("div", {
|
|
200
|
+
className: classNames('pisell-wallet-card-header-holder-name')
|
|
201
|
+
}, holderName), processedShowShopName && shopName && /*#__PURE__*/React.createElement("div", null, shopName), processedShowCardNo && cardNo && /*#__PURE__*/React.createElement("div", null, cardNo), processedShowViewPin && /*#__PURE__*/React.createElement("div", {
|
|
195
202
|
className: "pisell-wallet-card-header-view-pin",
|
|
196
203
|
onClick: onViewPinClick
|
|
197
204
|
}, getText('walletCard-viewPin'), /*#__PURE__*/React.createElement(EyeOff, {
|
|
@@ -349,7 +356,10 @@ var WalletCard = function WalletCard(props) {
|
|
|
349
356
|
onClick = mergedProps.onClick,
|
|
350
357
|
className = mergedProps.className,
|
|
351
358
|
style = mergedProps.style,
|
|
352
|
-
isGuide = mergedProps.isGuide
|
|
359
|
+
isGuide = mergedProps.isGuide,
|
|
360
|
+
showHolderName = mergedProps.showHolderName,
|
|
361
|
+
holder = mergedProps.holder,
|
|
362
|
+
onSetHolder = mergedProps.onSetHolder;
|
|
353
363
|
|
|
354
364
|
// 处理可能为0/1的布尔值props
|
|
355
365
|
var showIcon = toBooleanValue(mergedProps.showIcon);
|
|
@@ -393,11 +403,13 @@ var WalletCard = function WalletCard(props) {
|
|
|
393
403
|
if (!(items !== null && items !== void 0 && items.length)) {
|
|
394
404
|
return;
|
|
395
405
|
}
|
|
406
|
+
var data = {
|
|
407
|
+
id: props.id,
|
|
408
|
+
holder_id: holder === null || holder === void 0 ? void 0 : holder.holder_id
|
|
409
|
+
};
|
|
396
410
|
utils === null || utils === void 0 || utils.action({
|
|
397
411
|
type: 'pisell1.goWallet',
|
|
398
|
-
data:
|
|
399
|
-
id: props.id
|
|
400
|
-
},
|
|
412
|
+
data: data,
|
|
401
413
|
callback: function callback() {}
|
|
402
414
|
});
|
|
403
415
|
};
|
|
@@ -413,6 +425,40 @@ var WalletCard = function WalletCard(props) {
|
|
|
413
425
|
console.error('onViewPinClick方法需要传入');
|
|
414
426
|
}
|
|
415
427
|
};
|
|
428
|
+
var _renderMask = function _renderMask() {
|
|
429
|
+
if (typeof onSetHolder !== 'function') return null;
|
|
430
|
+
if ((holder === null || holder === void 0 ? void 0 : holder.holder_type) === 'form' && !(holder !== null && holder !== void 0 && holder.holder_id)) {
|
|
431
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
432
|
+
className: "pisell-wallet-add-holder-mask"
|
|
433
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
434
|
+
className: "pisell-wallet-add-holder-mask-text"
|
|
435
|
+
}, getText('pisell2.wallet-card.add-holder-tip')), /*#__PURE__*/React.createElement(Button, {
|
|
436
|
+
type: "primary",
|
|
437
|
+
className: "pisell-wallet-add-holder-mask-button"
|
|
438
|
+
//@ts-ignore
|
|
439
|
+
,
|
|
440
|
+
onClick: function onClick() {
|
|
441
|
+
return onSetHolder === null || onSetHolder === void 0 ? void 0 : onSetHolder();
|
|
442
|
+
}
|
|
443
|
+
}, getText('pisell2.wallet-card.add-holder-button-text'), /*#__PURE__*/React.createElement(Iconfont, {
|
|
444
|
+
type: "pisell2-user-edit",
|
|
445
|
+
style: {
|
|
446
|
+
fontSize: 16
|
|
447
|
+
}
|
|
448
|
+
})));
|
|
449
|
+
}
|
|
450
|
+
return null;
|
|
451
|
+
};
|
|
452
|
+
var _showHolderName = useMemo(function () {
|
|
453
|
+
return (holder === null || holder === void 0 ? void 0 : holder.holder_type) === 'form' && showHolderName;
|
|
454
|
+
}, [holder, showHolderName]);
|
|
455
|
+
var holderName = useMemo(function () {
|
|
456
|
+
var _holder$detail;
|
|
457
|
+
if ((holder === null || holder === void 0 ? void 0 : holder.holder_type) === 'form' && !(holder !== null && holder !== void 0 && holder.holder_id)) {
|
|
458
|
+
return '--';
|
|
459
|
+
}
|
|
460
|
+
return (holder === null || holder === void 0 || (_holder$detail = holder.detail) === null || _holder$detail === void 0 ? void 0 : _holder$detail.main_field) || '';
|
|
461
|
+
}, [holder]);
|
|
416
462
|
return /*#__PURE__*/React.createElement("div", {
|
|
417
463
|
className: classNames('pisell-wallet-card-wrapper', className),
|
|
418
464
|
style: style,
|
|
@@ -429,7 +475,7 @@ var WalletCard = function WalletCard(props) {
|
|
|
429
475
|
style: {
|
|
430
476
|
flexDirection: codeDirection === 'top' ? 'column-reverse' : 'column'
|
|
431
477
|
}
|
|
432
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
478
|
+
}, _renderMask(), /*#__PURE__*/React.createElement("div", {
|
|
433
479
|
className: classNames('pisell-wallet-card-content', mode, (!isLogin || isGuide) && 'pisell-wallet-card-guest-content'),
|
|
434
480
|
style: backgroundStyle
|
|
435
481
|
}, isLogin ? !isGuide ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -452,7 +498,9 @@ var WalletCard = function WalletCard(props) {
|
|
|
452
498
|
onCodeClick: handleCodeClick,
|
|
453
499
|
isLogin: isLogin,
|
|
454
500
|
showViewPin: showViewPin,
|
|
455
|
-
onViewPinClick: onViewPinClick
|
|
501
|
+
onViewPinClick: onViewPinClick,
|
|
502
|
+
showHolderName: _showHolderName,
|
|
503
|
+
holderName: holderName
|
|
456
504
|
}), /*#__PURE__*/React.createElement(CardContent, {
|
|
457
505
|
items: items,
|
|
458
506
|
symbol: symbol
|
|
@@ -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:
|
|
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:
|
|
221
|
+
margin-top: unset;
|
|
161
222
|
height: 50px;
|
|
162
223
|
box-sizing: border-box;
|
|
163
224
|
display: flex;
|