@pisell/materials 2.2.99 → 2.2.101
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 +4 -4
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -23
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +29 -29
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +20 -20
- package/es/components/date-picker/datePickerCpt.d.ts +1 -0
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.d.ts +1 -0
- package/es/components/lowCodePage/index.d.ts +1 -0
- package/es/components/pisell-config-provider/context.d.ts +2 -0
- package/es/components/pisell-config-provider/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
- package/es/components/pisellAdjustPrice/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/index.js +5 -1
- package/es/components/pisellAdjustPrice/type.d.ts +2 -0
- package/es/components/pisellCardList/index.d.ts +32 -2
- package/es/components/pisellCardList/index.js +40 -3
- package/es/components/pisellCardList/index.less +9 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +3 -0
- package/es/components/pisellCheckboxGroup/index.js +9 -4
- package/es/components/pisellCheckboxGroup/index.less +28 -1
- package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +0 -1
- package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/es/components/pisellModal/components/index.d.ts +0 -1
- package/es/components/pisellText/components/Amount/index.js +2 -1
- package/es/components/pisellWalletPassCard/index.d.ts +53 -1
- package/es/components/pisellWalletPassCard/index.js +333 -75
- package/es/components/pisellWalletPassCard/index.less +48 -11
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +5 -1
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/es/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/index.js +0 -2
- package/es/components/productCard/components/AmountFooter/index.d.ts +1 -0
- package/es/components/productCard/components/Header/EditButton/index.d.ts +1 -0
- package/es/components/productCard/components/Header/index.d.ts +1 -0
- package/es/components/productCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/components/Note/index.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/index.d.ts +1 -0
- package/es/components/productCard/components/Sales/index.d.ts +1 -0
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +1 -0
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +1 -0
- package/es/components/qrcode/index.d.ts +1 -0
- package/es/components/select-time/index.d.ts +0 -1
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/es/components/table/Table/AddFieldModal/index.js +13 -13
- package/es/components/table/Table/AddFieldModal/index.less +11 -11
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/date/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/image/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/es/components/table/Table/fields/link/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +0 -1
- 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/versionSelect/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Number/index.js +4 -1
- package/es/components/virtual-keyboard/Number/types.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/locales/en-US.d.ts +6 -0
- package/es/locales/en-US.js +9 -2
- package/es/locales/zh-CN.d.ts +6 -0
- package/es/locales/zh-CN.js +9 -2
- package/es/locales/zh-TW.d.ts +6 -0
- package/es/locales/zh-TW.js +9 -2
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +20 -20
- package/lib/components/date-picker/datePickerCpt.d.ts +1 -0
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/list/index.d.ts +1 -0
- package/lib/components/lowCodePage/index.d.ts +1 -0
- package/lib/components/pisell-config-provider/context.d.ts +2 -0
- package/lib/components/pisell-config-provider/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/index.js +4 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +2 -0
- package/lib/components/pisellCardList/index.d.ts +32 -2
- package/lib/components/pisellCardList/index.js +40 -3
- package/lib/components/pisellCardList/index.less +9 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +3 -0
- package/lib/components/pisellCheckboxGroup/index.js +6 -1
- package/lib/components/pisellCheckboxGroup/index.less +28 -1
- package/lib/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/lib/components/pisellInput/index.d.ts +0 -1
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
- package/lib/components/pisellModal/components/index.d.ts +0 -1
- package/lib/components/pisellText/components/Amount/index.js +2 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +53 -1
- package/lib/components/pisellWalletPassCard/index.js +253 -59
- package/lib/components/pisellWalletPassCard/index.less +48 -11
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
- package/lib/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/index.js +1 -1
- package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -0
- package/lib/components/productCard/components/Header/EditButton/index.d.ts +1 -0
- package/lib/components/productCard/components/Header/index.d.ts +1 -0
- package/lib/components/productCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/components/Note/index.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/index.d.ts +1 -0
- package/lib/components/productCard/components/Sales/index.d.ts +1 -0
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +1 -0
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +1 -0
- package/lib/components/qrcode/index.d.ts +1 -0
- package/lib/components/select-time/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/lib/components/table/Table/AddFieldModal/index.js +9 -9
- package/lib/components/table/Table/AddFieldModal/index.less +11 -11
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/date/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/image/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/table/Table/fields/link/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +0 -1
- 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/versionSelect/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Number/index.js +3 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/locales/en-US.d.ts +6 -0
- package/lib/locales/en-US.js +9 -2
- package/lib/locales/zh-CN.d.ts +6 -0
- package/lib/locales/zh-CN.js +9 -2
- package/lib/locales/zh-TW.d.ts +6 -0
- package/lib/locales/zh-TW.js +9 -2
- package/lowcode/pisell-card-list/meta.ts +50 -1
- package/lowcode/pisell-wallet-pass-card/actionsMeta.ts +7 -0
- package/package.json +11 -10
|
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
|
|
|
43
43
|
}) => JSX.Element;
|
|
44
44
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
45
|
options?: any;
|
|
46
|
-
optionSourceType?: "
|
|
46
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
47
47
|
labelField: string;
|
|
48
48
|
valueField: string;
|
|
49
49
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -363,7 +363,7 @@ export var withFormItem = function withFormItem(WrappedComponent, overlayProps)
|
|
|
363
363
|
rules: rules
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
|
-
return (overlayProps === null || overlayProps === void 0 ? void 0 : overlayProps.otherFormItemProps) || {};
|
|
366
|
+
return _objectSpread(_objectSpread({}, otherProps || {}), (overlayProps === null || overlayProps === void 0 ? void 0 : overlayProps.otherFormItemProps) || {}) || {};
|
|
367
367
|
}, [overlayProps === null || overlayProps === void 0 ? void 0 : overlayProps.otherFormItemProps, otherProps]);
|
|
368
368
|
return /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
369
369
|
required: required,
|
|
@@ -53,7 +53,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
53
53
|
width: number;
|
|
54
54
|
align: "center" | "left" | "right";
|
|
55
55
|
fixed: false | "left" | "right";
|
|
56
|
-
type: "
|
|
56
|
+
type: "button" | "link";
|
|
57
57
|
items: OperationItem[];
|
|
58
58
|
} | undefined;
|
|
59
59
|
operationContent?: {
|
|
@@ -71,7 +71,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
71
71
|
useCustomAction: boolean;
|
|
72
72
|
actionType: string;
|
|
73
73
|
openMode: "modal" | "drawer";
|
|
74
|
-
openContentSize: "small" | "
|
|
74
|
+
openContentSize: "small" | "middle" | "large";
|
|
75
75
|
openTitle: string;
|
|
76
76
|
key: string;
|
|
77
77
|
} | undefined;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
2
|
options?: any;
|
|
4
|
-
optionSourceType?: "
|
|
3
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
5
4
|
labelField: string;
|
|
6
5
|
valueField: string;
|
|
7
6
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -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;
|
|
@@ -20,7 +20,7 @@ declare const formFieldMap: {
|
|
|
20
20
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
21
21
|
onChange: (value: string) => void;
|
|
22
22
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
23
|
-
rootDomain: "custom" | "
|
|
23
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
24
24
|
customDomain?: string | undefined;
|
|
25
25
|
value?: string | undefined;
|
|
26
26
|
tenantId: string;
|
|
@@ -35,7 +35,7 @@ declare const formFieldMap: {
|
|
|
35
35
|
};
|
|
36
36
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
37
37
|
options?: any;
|
|
38
|
-
optionSourceType?: "
|
|
38
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
39
39
|
labelField: string;
|
|
40
40
|
valueField: string;
|
|
41
41
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -60,11 +60,25 @@ declare const formFieldMap: {
|
|
|
60
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
62
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & 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("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
64
|
+
options?: any;
|
|
65
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
66
|
+
labelField: string;
|
|
67
|
+
valueField: string;
|
|
68
|
+
extraParams?: Record<string, any> | undefined;
|
|
69
|
+
} & {
|
|
70
|
+
dataSource?: any;
|
|
71
|
+
}) => JSX.Element) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
72
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
73
|
+
} & {
|
|
74
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
75
|
+
}) | import("react").FC<import("antd").InputProps & {
|
|
76
|
+
onChange: (value: string) => void;
|
|
77
|
+
} & 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("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
64
78
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
65
79
|
} & {
|
|
66
80
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
67
|
-
}) | import("react").FC<import("./
|
|
81
|
+
}) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
68
82
|
JSON: import("react").FC<any>;
|
|
69
83
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
70
84
|
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>;
|
|
@@ -77,26 +91,12 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
77
91
|
Subdomain: import("react").FC<import("antd").InputProps & {
|
|
78
92
|
onChange: (value: string) => void;
|
|
79
93
|
onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
80
|
-
rootDomain: "custom" | "
|
|
94
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
81
95
|
customDomain?: string | undefined;
|
|
82
96
|
value?: string | undefined;
|
|
83
97
|
tenantId: string;
|
|
84
98
|
name?: string | undefined;
|
|
85
99
|
fieldKey?: string | undefined;
|
|
86
100
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
87
|
-
})
|
|
88
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
89
|
-
} & {
|
|
90
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
91
|
-
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
92
|
-
options?: any;
|
|
93
|
-
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
94
|
-
labelField: string;
|
|
95
|
-
valueField: string;
|
|
96
|
-
extraParams?: Record<string, any> | undefined;
|
|
97
|
-
} & {
|
|
98
|
-
dataSource?: any;
|
|
99
|
-
}) => JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
100
|
-
onChange: (value: string) => void;
|
|
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
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -54,7 +54,8 @@ var TreeItem = function TreeItem(props) {
|
|
|
54
54
|
transform: CSS.Transform.toString(transform && _objectSpread(_objectSpread({}, transform), {}, {
|
|
55
55
|
scaleY: 1
|
|
56
56
|
})),
|
|
57
|
-
transition: transition
|
|
57
|
+
transition: transition,
|
|
58
|
+
display: item.domHidden ? 'none' : 'block'
|
|
58
59
|
};
|
|
59
60
|
var rowKey = useMemo(function () {
|
|
60
61
|
return (childrenProps === null || childrenProps === void 0 ? void 0 : childrenProps.rowKey) || 'id';
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
var MyIcon = createFromIconfontCN({
|
|
5
|
-
scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.
|
|
5
|
+
scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.11.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
var IconFont = function IconFont(props) {
|
|
8
8
|
return /*#__PURE__*/React.createElement(MyIcon, _extends({}, props, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["value", "onChange", "defaultValue", "originValue", "selectType"];
|
|
2
|
+
var _excluded = ["value", "onChange", "defaultValue", "originValue", "selectType", "resetText", "doneText"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -31,6 +31,8 @@ var PisellAdjustPrice = function PisellAdjustPrice(props) {
|
|
|
31
31
|
originValue = props.originValue,
|
|
32
32
|
_props$selectType = props.selectType,
|
|
33
33
|
selectType = _props$selectType === void 0 ? 'light' : _props$selectType,
|
|
34
|
+
resetText = props.resetText,
|
|
35
|
+
doneText = props.doneText,
|
|
34
36
|
others = _objectWithoutProperties(props, _excluded);
|
|
35
37
|
var config = usePisellConfig();
|
|
36
38
|
var _useState = useState(value || 0),
|
|
@@ -177,6 +179,8 @@ var PisellAdjustPrice = function PisellAdjustPrice(props) {
|
|
|
177
179
|
onChange: handleChange,
|
|
178
180
|
onEnter: handleEnter,
|
|
179
181
|
placeholder: discountMode === 'amount' ? '0' : '%',
|
|
182
|
+
resetText: resetText,
|
|
183
|
+
doneText: doneText,
|
|
180
184
|
rightItemsStyle: {
|
|
181
185
|
buttonBackgroundColor: configColor.buttonBackgroundColor,
|
|
182
186
|
textColor: configColor.textColor,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
|
|
3
3
|
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
-
import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
|
|
4
|
+
import { PisellWalletPassCardProps, FormatOption } from '../pisellWalletPassCard';
|
|
5
5
|
import './index.less';
|
|
6
6
|
export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
|
|
7
7
|
platform?: PisellContextType['platform'];
|
|
@@ -67,7 +67,37 @@ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'opt
|
|
|
67
67
|
/** 编辑编辑按钮后,弹窗展示之前 */
|
|
68
68
|
beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
|
|
69
69
|
/** 编辑弹窗点击提交 */
|
|
70
|
-
onConfirmEdit?: (value: any, index: number) => void;
|
|
70
|
+
onConfirmEdit?: (value: any, index: number, data: any) => void;
|
|
71
|
+
/** 是否展示状态标识 */
|
|
72
|
+
showStatus?: boolean;
|
|
73
|
+
/** 名称标题字号字重颜色配置 */
|
|
74
|
+
nameTitleStyle?: {
|
|
75
|
+
fontSize: number;
|
|
76
|
+
fontWeight: number;
|
|
77
|
+
color: string;
|
|
78
|
+
};
|
|
79
|
+
/** 开启编辑金额 */
|
|
80
|
+
enableEditAmount?: boolean;
|
|
81
|
+
/** 编辑金额事件 */
|
|
82
|
+
onConfirmEditAmount?: (value: number, index: number, data: any) => void;
|
|
83
|
+
/** 是否使用外部详情处理 */
|
|
84
|
+
useExternalDetail?: boolean;
|
|
85
|
+
/** 详情事件 */
|
|
86
|
+
onDetail?: (value: any, index: number) => void;
|
|
87
|
+
/** 自定义余额格式化函数,如果提供则优先使用 */
|
|
88
|
+
formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
|
|
89
|
+
/** 自定义余额标题格式化函数,如果提供则优先使用 */
|
|
90
|
+
formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
91
|
+
/** 自定义使用金额格式化函数,如果提供则优先使用 */
|
|
92
|
+
formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
|
|
93
|
+
/** 自定义使用金额标题格式化函数,如果提供则优先使用 */
|
|
94
|
+
formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
95
|
+
/** 编辑金额前事件 */
|
|
96
|
+
onBeforeEditAmount?: (value: any, index: number, data: any) => Promise<any> | boolean | void;
|
|
97
|
+
/** 选项点击事件 */
|
|
98
|
+
onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: any) => void;
|
|
99
|
+
/** 是否展示选中状态的背景色 */
|
|
100
|
+
showActiveBackground?: boolean;
|
|
71
101
|
}
|
|
72
102
|
declare const _default: React.NamedExoticComponent<PisellCardListProps>;
|
|
73
103
|
export default _default;
|
|
@@ -38,7 +38,19 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
38
38
|
empty = props.empty,
|
|
39
39
|
showEmpty = props.showEmpty,
|
|
40
40
|
showBalanceSymbol = props.showBalanceSymbol,
|
|
41
|
-
onChangeDebounce = props.onChangeDebounce
|
|
41
|
+
onChangeDebounce = props.onChangeDebounce,
|
|
42
|
+
showStatus = props.showStatus,
|
|
43
|
+
nameTitleStyle = props.nameTitleStyle,
|
|
44
|
+
enableEditAmount = props.enableEditAmount,
|
|
45
|
+
useExternalDetail = props.useExternalDetail,
|
|
46
|
+
onDetail = props.onDetail,
|
|
47
|
+
formatBalance = props.formatBalance,
|
|
48
|
+
formatBalanceTitle = props.formatBalanceTitle,
|
|
49
|
+
formatRedeem = props.formatRedeem,
|
|
50
|
+
formatRedeemTitle = props.formatRedeemTitle,
|
|
51
|
+
onBeforeEditAmount = props.onBeforeEditAmount,
|
|
52
|
+
onItemClick = props.onItemClick,
|
|
53
|
+
showActiveBackground = props.showActiveBackground;
|
|
42
54
|
return data.length ? /*#__PURE__*/React.createElement(PisellCheckboxGroup, {
|
|
43
55
|
options: data,
|
|
44
56
|
value: value,
|
|
@@ -50,9 +62,16 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
50
62
|
iconPosition: "hide",
|
|
51
63
|
fullWidth: fullWidth,
|
|
52
64
|
onChangeDebounce: onChangeDebounce,
|
|
65
|
+
onItemClick: onItemClick,
|
|
66
|
+
showActiveBackground: showActiveBackground,
|
|
53
67
|
renderOption: function renderOption(item, active, index) {
|
|
54
68
|
return /*#__PURE__*/React.createElement(PisellWalletPassCard, _extends({}, item, {
|
|
55
69
|
active: active,
|
|
70
|
+
mode: mode,
|
|
71
|
+
showActiveIcon: true,
|
|
72
|
+
showStatus: showStatus || (item === null || item === void 0 ? void 0 : item.showStatus),
|
|
73
|
+
cardStatus: item === null || item === void 0 ? void 0 : item.cardStatus,
|
|
74
|
+
nameTitleStyle: nameTitleStyle || (item === null || item === void 0 ? void 0 : item.nameTitleStyle),
|
|
56
75
|
showName: showName || (item === null || item === void 0 ? void 0 : item.showName),
|
|
57
76
|
showBalance: showBalance || (item === null || item === void 0 ? void 0 : item.showBalance),
|
|
58
77
|
showCode: showCode || (item === null || item === void 0 ? void 0 : item.showCode),
|
|
@@ -65,18 +84,36 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
65
84
|
showBalanceSymbol: showBalanceSymbol || (item === null || item === void 0 ? void 0 : item.showBalanceSymbol),
|
|
66
85
|
showActions: props.showActions || (item === null || item === void 0 ? void 0 : item.showActions),
|
|
67
86
|
actions: props.actions || (item === null || item === void 0 ? void 0 : item.actions),
|
|
87
|
+
enableEditAmount: enableEditAmount || (item === null || item === void 0 ? void 0 : item.enableEditAmount),
|
|
88
|
+
useExternalDetail: useExternalDetail || (item === null || item === void 0 ? void 0 : item.useExternalDetail),
|
|
89
|
+
onDetail: function onDetail(record) {
|
|
90
|
+
var _props$onDetail;
|
|
91
|
+
return props === null || props === void 0 || (_props$onDetail = props.onDetail) === null || _props$onDetail === void 0 ? void 0 : _props$onDetail.call(props, record, index);
|
|
92
|
+
},
|
|
68
93
|
beforeEdit: function beforeEdit(record) {
|
|
69
94
|
var _props$beforeEdit;
|
|
70
95
|
return props === null || props === void 0 || (_props$beforeEdit = props.beforeEdit) === null || _props$beforeEdit === void 0 ? void 0 : _props$beforeEdit.call(props, record, index);
|
|
71
96
|
},
|
|
97
|
+
onConfirmEditAmount: function onConfirmEditAmount(value) {
|
|
98
|
+
var _props$onConfirmEditA;
|
|
99
|
+
(_props$onConfirmEditA = props.onConfirmEditAmount) === null || _props$onConfirmEditA === void 0 || _props$onConfirmEditA.call(props, value, index, item);
|
|
100
|
+
},
|
|
72
101
|
onConfirmEdit: function onConfirmEdit(newVal) {
|
|
73
102
|
var _props$onConfirmEdit;
|
|
74
|
-
(_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index);
|
|
103
|
+
(_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index, item);
|
|
75
104
|
},
|
|
105
|
+
formatBalance: formatBalance || (item === null || item === void 0 ? void 0 : item.formatBalance),
|
|
106
|
+
formatBalanceTitle: formatBalanceTitle || (item === null || item === void 0 ? void 0 : item.formatBalanceTitle),
|
|
76
107
|
type: type,
|
|
77
108
|
style: direction === 'vertical' || direction === 'horizontal' && fullWidth ? {
|
|
78
109
|
width: '100%'
|
|
79
|
-
} : {}
|
|
110
|
+
} : {},
|
|
111
|
+
formatRedeem: formatRedeem || (item === null || item === void 0 ? void 0 : item.formatRedeem),
|
|
112
|
+
formatRedeemTitle: formatRedeemTitle || (item === null || item === void 0 ? void 0 : item.formatRedeemTitle),
|
|
113
|
+
onBeforeEditAmount: function onBeforeEditAmount(record) {
|
|
114
|
+
var _props$onBeforeEditAm;
|
|
115
|
+
return props === null || props === void 0 || (_props$onBeforeEditAm = props.onBeforeEditAmount) === null || _props$onBeforeEditAm === void 0 ? void 0 : _props$onBeforeEditAm.call(props, record, index, item);
|
|
116
|
+
}
|
|
80
117
|
}));
|
|
81
118
|
}
|
|
82
119
|
}) : showEmpty && (empty || /*#__PURE__*/React.createElement(PisellEmpty, null));
|
|
@@ -72,4 +72,12 @@
|
|
|
72
72
|
// .pisell-card-disabled {
|
|
73
73
|
// color: var(--Gray-500, #667085);
|
|
74
74
|
// padding-bottom: 36px;
|
|
75
|
-
// }
|
|
75
|
+
// }
|
|
76
|
+
|
|
77
|
+
.keyboard-modal-wrapper {
|
|
78
|
+
.pisell-amount-keyboard-wrap {
|
|
79
|
+
padding: 10px;
|
|
80
|
+
background: rgba(29, 41, 57, .8) !important;
|
|
81
|
+
border-radius: 10px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -5,6 +5,7 @@ export interface PisellCheckboxGroupOption {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
+
error?: boolean;
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
}
|
|
10
11
|
declare type PisellCheckboxGroupValue = string | string[] | any;
|
|
@@ -24,6 +25,8 @@ export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
24
25
|
optionClassName?: string;
|
|
25
26
|
optionActiveClassName?: string;
|
|
26
27
|
onChangeDebounce?: boolean;
|
|
28
|
+
onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: PisellCheckboxGroupOption) => void;
|
|
29
|
+
showActiveBackground?: boolean;
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
29
32
|
* @title: PisellCheckboxGroup
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["platform", "gap", "style", "options", "onChange", "value", "renderOption", "padding", "rowKey", "mode", "direction", "fullWidth", "iconPosition", "optionClassName", "optionActiveClassName", "onChangeDebounce"];
|
|
2
|
+
var _excluded = ["platform", "gap", "style", "options", "onChange", "value", "renderOption", "padding", "rowKey", "mode", "direction", "fullWidth", "iconPosition", "optionClassName", "optionActiveClassName", "onChangeDebounce", "onItemClick", "showActiveBackground"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -65,6 +65,9 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
|
|
|
65
65
|
optionClassName = props.optionClassName,
|
|
66
66
|
optionActiveClassName = props.optionActiveClassName,
|
|
67
67
|
onChangeDebounce = props.onChangeDebounce,
|
|
68
|
+
onItemClick = props.onItemClick,
|
|
69
|
+
_props$showActiveBack = props.showActiveBackground,
|
|
70
|
+
showActiveBackground = _props$showActiveBack === void 0 ? false : _props$showActiveBack,
|
|
68
71
|
rest = _objectWithoutProperties(props, _excluded);
|
|
69
72
|
var _useState = useState([]),
|
|
70
73
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -183,13 +186,15 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
|
|
|
183
186
|
}), options.map(function (option, index) {
|
|
184
187
|
var active = _value.includes(option[rowKey]);
|
|
185
188
|
return /*#__PURE__*/React.createElement(PisellRow, {
|
|
186
|
-
className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty({
|
|
187
|
-
'pisell-checkbox-group-item-active': active
|
|
188
|
-
|
|
189
|
+
className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty(_defineProperty({
|
|
190
|
+
'pisell-checkbox-group-item-active': active,
|
|
191
|
+
'pisell-checkbox-group-item-with-background': active && showActiveBackground
|
|
192
|
+
}, optionActiveClassName, active), 'pisell-checkbox-group-item-error', option.error)),
|
|
189
193
|
key: option[rowKey],
|
|
190
194
|
gap: 10,
|
|
191
195
|
style: rowStyle,
|
|
192
196
|
onClick: function onClick(e) {
|
|
197
|
+
onItemClick === null || onItemClick === void 0 || onItemClick(e, option);
|
|
193
198
|
if (option.disabled) return;
|
|
194
199
|
if (onChangeDebounce) {
|
|
195
200
|
run(option[rowKey], option);
|
|
@@ -24,10 +24,37 @@
|
|
|
24
24
|
|
|
25
25
|
&.pisell-checkbox-group-item-active {
|
|
26
26
|
&::before {
|
|
27
|
-
border-width:
|
|
27
|
+
border-width: 4px;
|
|
28
28
|
border-color: var(--theme-color);
|
|
29
|
+
z-index: 1;
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// 可选的背景色样式,需要额外的类名才会应用
|
|
34
|
+
&.pisell-checkbox-group-item-with-background {
|
|
35
|
+
&::before {
|
|
36
|
+
background: var(--Primary-50, #F9F5FF);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
.pisell-row-center {
|
|
40
|
+
.pisell-row {
|
|
41
|
+
position: relative;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.pisell-row-right {
|
|
46
|
+
position: relative;
|
|
47
|
+
z-index: 1;
|
|
29
48
|
}
|
|
49
|
+
}
|
|
30
50
|
|
|
51
|
+
&.pisell-checkbox-group-item-error {
|
|
52
|
+
&::before {
|
|
53
|
+
border-color: var(--Error-500, #F04438);
|
|
54
|
+
border-width: 2px;
|
|
55
|
+
background: var(--Error-50, #FEF3F2);
|
|
56
|
+
z-index: 1;
|
|
57
|
+
}
|
|
31
58
|
}
|
|
32
59
|
}
|
|
33
60
|
}
|
|
@@ -14,7 +14,8 @@ var Amount = function Amount(props) {
|
|
|
14
14
|
others = _objectWithoutProperties(props, _excluded);
|
|
15
15
|
var config = usePisellConfig();
|
|
16
16
|
var amount = useMemo(function () {
|
|
17
|
-
|
|
17
|
+
var _config$getSymbolic;
|
|
18
|
+
return formatAmountWithOptions(value, symbol || (config === null || config === void 0 ? void 0 : config.symbol) || (config === null || config === void 0 || (_config$getSymbolic = config.getSymbolic) === null || _config$getSymbolic === void 0 ? void 0 : _config$getSymbolic.call(config)) || "", {
|
|
18
19
|
precision: precision,
|
|
19
20
|
showCurrencySymbol: showCurrencySymbol,
|
|
20
21
|
useThousandsSeparator: useThousandsSeparator,
|