@pisell/materials 1.0.936 → 1.0.938
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 +5 -5
- package/build/lowcode/render/default/view.js +14 -14
- package/build/lowcode/view.js +14 -14
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/index.js +0 -4
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -7
- package/es/components/date-picker/datePickerCpt.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/list/index.d.ts +1 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/es/components/pisellText/components/Editable/index.js +5 -1
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +1 -0
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/component/ViewMode/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/versionSelect/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -1
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/es/components/walletCard/index.d.ts +8 -3
- package/es/components/walletCard/index.js +47 -36
- package/es/locales/en-US.d.ts +1 -1
- package/es/locales/en-US.js +1 -1
- package/es/locales/zh-CN.d.ts +1 -1
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.d.ts +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.js +0 -2
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -7
- package/lib/components/date-picker/datePickerCpt.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/list/index.d.ts +1 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/lib/components/pisellText/components/Editable/index.js +5 -1
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +1 -0
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -1
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
- package/lib/components/walletCard/index.d.ts +8 -3
- package/lib/components/walletCard/index.js +43 -27
- package/lib/locales/en-US.d.ts +1 -1
- package/lib/locales/en-US.js +1 -1
- package/lib/locales/zh-CN.d.ts +1 -1
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.d.ts +1 -1
- package/lib/locales/zh-TW.js +1 -1
- package/lowcode/auto-resize-text/meta.ts +9431 -0
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: any;
|
|
34
34
|
onRow: (record: any) => any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
2
3
|
options?: any;
|
|
3
4
|
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
@@ -8,7 +8,6 @@ import { withFormItem } from "../../dataSourceForm/utils";
|
|
|
8
8
|
import UploadWithMode from "./WithMode";
|
|
9
9
|
import { checkFileCount } from "./utils";
|
|
10
10
|
import { DEFAULT_MAX_COUNT } from "./constants";
|
|
11
|
-
import BaseUpload from "./BaseUpload";
|
|
12
11
|
var Upload = withFormItem(UploadWithMode, {
|
|
13
12
|
otherFormItemProps: function otherFormItemProps(props, others) {
|
|
14
13
|
var rule = {};
|
|
@@ -36,7 +35,4 @@ var Upload = withFormItem(UploadWithMode, {
|
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
|
-
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
Upload.BaseUpload = BaseUpload;
|
|
42
38
|
export default Upload;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const formFieldMap: {
|
|
2
3
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
3
4
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -59,11 +60,7 @@ declare const formFieldMap: {
|
|
|
59
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
62
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
63
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
-
} & {
|
|
65
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
67
64
|
JSON: import("react").FC<any>;
|
|
68
65
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
69
66
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -84,6 +81,10 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
84
81
|
fieldKey?: string | undefined;
|
|
85
82
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
86
83
|
}) | (import("react").FC<{}> & {
|
|
84
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
85
|
+
} & {
|
|
86
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
87
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
87
88
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
89
|
} & {
|
|
89
90
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -95,7 +96,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
95
96
|
extraParams?: Record<string, any> | undefined;
|
|
96
97
|
} & {
|
|
97
98
|
dataSource?: any;
|
|
98
|
-
}) => JSX.Element) | import("react").FC<
|
|
99
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
100
|
onChange: (value: string) => void;
|
|
100
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -76,7 +76,11 @@ var Editable = function Editable(props) {
|
|
|
76
76
|
return value;
|
|
77
77
|
}
|
|
78
78
|
if (value && _typeof(value) === 'object') {
|
|
79
|
-
|
|
79
|
+
if (typeof currentLocale === 'string' && currentLocale.toLowerCase().includes('en')) {
|
|
80
|
+
return value['en'] || '';
|
|
81
|
+
} else {
|
|
82
|
+
return value[currentLocale] || '';
|
|
83
|
+
}
|
|
80
84
|
}
|
|
81
85
|
return '';
|
|
82
86
|
}, [value, currentLocale, children]);
|
|
@@ -161,7 +161,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
161
161
|
sort?: SortType | undefined;
|
|
162
162
|
mode: "" | "localStorage" | "remote";
|
|
163
163
|
currentViewMode: ModeType;
|
|
164
|
-
}) => ("filters" | "
|
|
164
|
+
}) => ("filters" | "view_mode" | "order_by" | "group_by" | "column_setting" | "gallery_setting" | "filter_setting")[];
|
|
165
165
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
166
166
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
167
167
|
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface BaseVirtualInputProps {
|
|
4
|
+
/** 输入值 */
|
|
5
|
+
value?: string | React.ReactNode;
|
|
6
|
+
/** 占位符 */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** 是否自动聚焦 */
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
/** 是否禁用 */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** 组件高度,默认60px */
|
|
13
|
+
height?: number | string;
|
|
14
|
+
/** 字体大小,默认48px,如果不设置会根据高度自动计算 */
|
|
15
|
+
fontSize?: number | string;
|
|
16
|
+
/** 聚焦回调 */
|
|
17
|
+
onFocus?: () => void;
|
|
18
|
+
/** 失焦回调 */
|
|
19
|
+
onBlur?: () => void;
|
|
20
|
+
/** 文字位置 */
|
|
21
|
+
textAlign?: 'start' | 'center' | 'end';
|
|
22
|
+
/** 自定义样式 */
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/** 自定义类名 */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** showCursor */
|
|
27
|
+
showCursor?: boolean;
|
|
28
|
+
/** 防止失焦的元素选择器或ref */
|
|
29
|
+
preventBlurElements?: Array<string | React.RefObject<HTMLElement>>;
|
|
30
|
+
/** 是否聚焦(受控模式) */
|
|
31
|
+
focused?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface BaseVirtualInputRef {
|
|
34
|
+
/** 手动聚焦 */
|
|
35
|
+
focus: () => void;
|
|
36
|
+
/** 手动失焦 */
|
|
37
|
+
blur: () => void;
|
|
38
|
+
}
|
|
39
|
+
declare const BaseVirtualInput: React.ForwardRefExoticComponent<BaseVirtualInputProps & React.RefAttributes<BaseVirtualInputRef>>;
|
|
40
|
+
export default BaseVirtualInput;
|
|
@@ -8,9 +8,14 @@ declare global {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export interface WalletCardItem {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
type: string;
|
|
12
|
+
custom_title?: string | {
|
|
13
|
+
original: string;
|
|
14
|
+
en: string;
|
|
15
|
+
'zh-CN': string;
|
|
16
|
+
'zh-HK': string;
|
|
17
|
+
};
|
|
18
|
+
display?: 0 | 1;
|
|
14
19
|
value?: number;
|
|
15
20
|
}
|
|
16
21
|
export interface WalletCardProps {
|
|
@@ -4,10 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
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); }
|
|
7
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -41,7 +37,7 @@ var DEFAULT_PROPS = {
|
|
|
41
37
|
showWalletName: true,
|
|
42
38
|
shopName: 'Store name',
|
|
43
39
|
showShopName: true,
|
|
44
|
-
cardNo: '
|
|
40
|
+
cardNo: 'WL0000000001',
|
|
45
41
|
cardStyle: 'normal',
|
|
46
42
|
codeType: 'barCode',
|
|
47
43
|
platform: 'pc',
|
|
@@ -51,21 +47,41 @@ var DEFAULT_PROPS = {
|
|
|
51
47
|
walletName: 'Level',
|
|
52
48
|
isLogin: true,
|
|
53
49
|
items: [{
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
type: 'rechargeable',
|
|
51
|
+
display: 1,
|
|
52
|
+
custom_title: {
|
|
53
|
+
original: 'Balance',
|
|
54
|
+
'zh-CN': '充值卡',
|
|
55
|
+
'zh-HK': '充值卡',
|
|
56
|
+
en: 'Balance'
|
|
57
|
+
}
|
|
57
58
|
}, {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
type: 'point',
|
|
60
|
+
display: 1,
|
|
61
|
+
custom_title: {
|
|
62
|
+
original: 'Points',
|
|
63
|
+
'zh-CN': '积分卡',
|
|
64
|
+
'zh-HK': '積分卡',
|
|
65
|
+
en: 'Points'
|
|
66
|
+
}
|
|
61
67
|
}, {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
type: 'voucher',
|
|
69
|
+
display: 1,
|
|
70
|
+
custom_title: {
|
|
71
|
+
original: 'Voucher',
|
|
72
|
+
'zh-CN': '代金券',
|
|
73
|
+
'zh-HK': '代金券',
|
|
74
|
+
en: 'Voucher'
|
|
75
|
+
}
|
|
65
76
|
}, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
77
|
+
type: 'discount',
|
|
78
|
+
display: 1,
|
|
79
|
+
custom_title: {
|
|
80
|
+
original: 'Discount',
|
|
81
|
+
'zh-CN': '折扣卡',
|
|
82
|
+
'zh-HK': '折扣卡',
|
|
83
|
+
en: 'Discount'
|
|
84
|
+
}
|
|
69
85
|
}]
|
|
70
86
|
};
|
|
71
87
|
|
|
@@ -198,49 +214,44 @@ var CardHeader = function CardHeader(_ref2) {
|
|
|
198
214
|
|
|
199
215
|
// 子组件:卡片内容项
|
|
200
216
|
var CardItem = function CardItem(_ref3) {
|
|
217
|
+
var _context$appHelper2;
|
|
201
218
|
var item = _ref3.item,
|
|
202
219
|
symbol = _ref3.symbol;
|
|
203
|
-
var
|
|
204
|
-
|
|
220
|
+
var type = item.type,
|
|
221
|
+
custom_title = item.custom_title,
|
|
205
222
|
value = item.value;
|
|
223
|
+
var context = useEngineContext();
|
|
224
|
+
var utils = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils;
|
|
225
|
+
var translationOriginal = (utils === null || utils === void 0 ? void 0 : utils.translationOriginal) || (utils === null || utils === void 0 ? void 0 : utils.translation);
|
|
206
226
|
return /*#__PURE__*/React.createElement("div", {
|
|
207
227
|
className: "pisell-wallet-card-item"
|
|
208
228
|
}, /*#__PURE__*/React.createElement("div", {
|
|
209
229
|
className: "pisell-wallet-card-item-label"
|
|
210
|
-
},
|
|
230
|
+
}, translationOriginal(custom_title || '') || ''), /*#__PURE__*/React.createElement("div", {
|
|
211
231
|
className: "pisell-wallet-card-item-value"
|
|
212
|
-
},
|
|
232
|
+
}, type === 'rechargeable' ? /*#__PURE__*/React.createElement(Amount, {
|
|
213
233
|
className: "pisell-card-amount-item-value",
|
|
214
234
|
platform: "h5",
|
|
215
235
|
symbol: symbol,
|
|
216
236
|
useThousandsSeparator: true,
|
|
217
237
|
showCurrencySymbol: true,
|
|
218
238
|
value: value
|
|
219
|
-
}) : value));
|
|
239
|
+
}) : value || '0'));
|
|
220
240
|
};
|
|
221
241
|
|
|
222
242
|
// 子组件:卡片内容
|
|
223
243
|
var CardContent = function CardContent(_ref4) {
|
|
224
244
|
var items = _ref4.items,
|
|
225
245
|
symbol = _ref4.symbol;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
// 对 items 进行排序
|
|
230
|
-
var sortedItems = useMemo(function () {
|
|
231
|
-
if (!(items !== null && items !== void 0 && items.length)) return [];
|
|
232
|
-
return _toConsumableArray(items).sort(function (a, b) {
|
|
233
|
-
var indexA = expectedOrder.indexOf(a.key);
|
|
234
|
-
var indexB = expectedOrder.indexOf(b.key);
|
|
235
|
-
return indexA - indexB;
|
|
236
|
-
});
|
|
237
|
-
}, [items]);
|
|
246
|
+
var filteredItems = (items || []).filter(function (item) {
|
|
247
|
+
return item.display !== 0;
|
|
248
|
+
});
|
|
238
249
|
return /*#__PURE__*/React.createElement("div", {
|
|
239
250
|
className: "pisell-wallet-card-list",
|
|
240
251
|
style: {
|
|
241
|
-
justifyContent:
|
|
252
|
+
justifyContent: filteredItems.length > 1 ? 'space-between' : 'flex-start'
|
|
242
253
|
}
|
|
243
|
-
},
|
|
254
|
+
}, filteredItems.map(function (item, index) {
|
|
244
255
|
return /*#__PURE__*/React.createElement(CardItem, {
|
|
245
256
|
key: index,
|
|
246
257
|
item: item,
|
package/es/locales/en-US.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ declare const _default: {
|
|
|
176
176
|
'pisell-action-get-data': string;
|
|
177
177
|
'pisell-action-delete-success': string;
|
|
178
178
|
'pisell-action-delete-failed': string;
|
|
179
|
-
'walletCard-
|
|
179
|
+
'walletCard-point': string;
|
|
180
180
|
'walletCard-rechargeable': string;
|
|
181
181
|
'walletCard-voucher': string;
|
|
182
182
|
'walletCard-discount': string;
|
package/es/locales/en-US.js
CHANGED
|
@@ -226,7 +226,7 @@ export default {
|
|
|
226
226
|
'pisell-action-get-data': 'Please get data first',
|
|
227
227
|
'pisell-action-delete-success': 'Deleted successfully',
|
|
228
228
|
'pisell-action-delete-failed': 'Delete failed, please try again',
|
|
229
|
-
'walletCard-
|
|
229
|
+
'walletCard-point': 'Points',
|
|
230
230
|
'walletCard-rechargeable': 'Balance',
|
|
231
231
|
'walletCard-voucher': 'Voucher',
|
|
232
232
|
'walletCard-discount': 'Discount',
|
package/es/locales/zh-CN.d.ts
CHANGED
|
@@ -176,7 +176,7 @@ declare const _default: {
|
|
|
176
176
|
'pisell-action-get-data': string;
|
|
177
177
|
'pisell-action-delete-success': string;
|
|
178
178
|
'pisell-action-delete-failed': string;
|
|
179
|
-
'walletCard-
|
|
179
|
+
'walletCard-point': string;
|
|
180
180
|
'walletCard-rechargeable': string;
|
|
181
181
|
'walletCard-voucher': string;
|
|
182
182
|
'walletCard-discount': string;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -225,7 +225,7 @@ export default {
|
|
|
225
225
|
'pisell-action-get-data': '请先获取数据',
|
|
226
226
|
'pisell-action-delete-success': '删除成功',
|
|
227
227
|
'pisell-action-delete-failed': '删除失败,请重试',
|
|
228
|
-
'walletCard-
|
|
228
|
+
'walletCard-point': '积分',
|
|
229
229
|
'walletCard-rechargeable': '余额',
|
|
230
230
|
'walletCard-voucher': '代金券',
|
|
231
231
|
'walletCard-discount': '折扣卡',
|
package/es/locales/zh-TW.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ declare const _default: {
|
|
|
175
175
|
'pisell-action-get-data': string;
|
|
176
176
|
'pisell-action-delete-success': string;
|
|
177
177
|
'pisell-action-delete-failed': string;
|
|
178
|
-
'walletCard-
|
|
178
|
+
'walletCard-point': string;
|
|
179
179
|
'walletCard-rechargeable': string;
|
|
180
180
|
'walletCard-voucher': string;
|
|
181
181
|
'walletCard-discount': string;
|
package/es/locales/zh-TW.js
CHANGED
|
@@ -225,7 +225,7 @@ export default {
|
|
|
225
225
|
'pisell-action-get-data': '請先獲取數據',
|
|
226
226
|
'pisell-action-delete-success': '刪除成功',
|
|
227
227
|
'pisell-action-delete-failed': '刪除失敗,請重試',
|
|
228
|
-
'walletCard-
|
|
228
|
+
'walletCard-point': '積分',
|
|
229
229
|
'walletCard-rechargeable': '餘額',
|
|
230
230
|
'walletCard-voucher': '代金券',
|
|
231
231
|
'walletCard-discount': '折扣卡',
|