@pisell/materials 6.2.27 → 6.2.29
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 +164 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +39 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +39 -25
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- 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/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +7 -6
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/es/components/pisellGoodPassCard/index.d.ts +1 -0
- package/es/components/pisellGoodPassCard/index.js +17 -5
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellWalletPassCard/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +16 -4
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +15 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +13 -3
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +2 -5
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/index.js +4 -2
- package/es/components/productCard/cartSkuCard/index.less +1 -1
- package/es/components/productCard/components/Header/index.js +17 -5
- package/es/components/productCard/components/Header/index.less +15 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/index.js +3 -2
- package/es/components/productCard/index.less +6 -0
- 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/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/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/image/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/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/utils.d.ts +1 -1
- package/es/components/versionSelect/index.d.ts +1 -0
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- 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/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +7 -6
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +1 -0
- package/lib/components/pisellGoodPassCard/index.js +31 -4
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellModal/components/IpadModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/MobileModal/index.d.ts +1 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +9 -1
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +15 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +12 -3
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +2 -5
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/index.js +3 -1
- package/lib/components/productCard/cartSkuCard/index.less +1 -1
- package/lib/components/productCard/components/Header/index.js +16 -8
- package/lib/components/productCard/components/Header/index.less +15 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/index.js +4 -2
- package/lib/components/productCard/index.less +6 -0
- 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/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/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/image/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/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/utils.d.ts +1 -1
- package/lib/components/versionSelect/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -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: boolean;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: string;
|
|
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
|
+
}) => ("column_setting" | "gallery_setting" | "order_by" | "group_by" | "view_mode" | "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 {};
|
|
@@ -17,7 +17,7 @@ interface UseTablePropsProps {
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
-
title: number | boolean |
|
|
20
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
21
21
|
pagination: {
|
|
22
22
|
total: number;
|
|
23
23
|
current: number;
|
|
@@ -26,7 +26,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
26
26
|
showSizeChanger: boolean;
|
|
27
27
|
};
|
|
28
28
|
columns: import("./useColumns").Column[];
|
|
29
|
-
subTitle: number | boolean |
|
|
29
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
30
30
|
buttons: any[] | null;
|
|
31
31
|
filter: JSX.Element | null;
|
|
32
32
|
onRow: (record: any) => any;
|
|
@@ -52,7 +52,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
52
52
|
width: number;
|
|
53
53
|
align: "center" | "left" | "right";
|
|
54
54
|
fixed: false | "left" | "right";
|
|
55
|
-
type: "
|
|
55
|
+
type: "link" | "button";
|
|
56
56
|
items: OperationItem[];
|
|
57
57
|
} | undefined;
|
|
58
58
|
operationContent?: {
|
|
@@ -70,7 +70,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
70
70
|
useCustomAction: boolean;
|
|
71
71
|
actionType: string;
|
|
72
72
|
openMode: "modal" | "drawer";
|
|
73
|
-
openContentSize: "small" | "
|
|
73
|
+
openContentSize: "small" | "large" | "middle";
|
|
74
74
|
openTitle: string;
|
|
75
75
|
key: string;
|
|
76
76
|
} | undefined;
|
|
@@ -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;
|
|
@@ -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) => 1000 | 2000 | 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,13 +60,11 @@ 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) =>
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
|
|
63
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
65
|
} & {
|
|
65
66
|
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("
|
|
67
|
-
onChange: (value: string) => void;
|
|
68
|
-
} & 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("./Input/type").InputProps> & {
|
|
67
|
+
}) | 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> & {
|
|
69
68
|
JSON: import("react").FC<any>;
|
|
70
69
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
71
70
|
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>;
|
|
@@ -85,7 +84,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
85
84
|
name?: string | undefined;
|
|
86
85
|
fieldKey?: string | undefined;
|
|
87
86
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
88
|
-
}) |
|
|
87
|
+
}) | (import("react").FC<{}> & {
|
|
89
88
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
89
|
} & {
|
|
91
90
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -97,5 +96,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
97
96
|
extraParams?: Record<string, any> | undefined;
|
|
98
97
|
} & {
|
|
99
98
|
dataSource?: any;
|
|
100
|
-
}) => JSX.Element) | import("react").FC<
|
|
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
|
export { getFieldComponent, formFieldMap };
|
|
@@ -44,6 +44,7 @@ export interface PisellGoodPassCardProps {
|
|
|
44
44
|
style: React.CSSProperties;
|
|
45
45
|
/**快捷展示排序 */
|
|
46
46
|
mixedSort?: (val: Discount[]) => Discount[];
|
|
47
|
+
isInModal: boolean;
|
|
47
48
|
}
|
|
48
49
|
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
49
50
|
export default index;
|
|
@@ -86,7 +86,18 @@ var index = (props) => {
|
|
|
86
86
|
onCancel: () => setShowModal(false),
|
|
87
87
|
className: `${clsPrefix}-all-items-modal`
|
|
88
88
|
},
|
|
89
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
89
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
style: {
|
|
93
|
+
padding: "10px 0",
|
|
94
|
+
display: "flex",
|
|
95
|
+
flexDirection: "column",
|
|
96
|
+
gap: 12
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
dataSource.map(renderVoucherItem)
|
|
100
|
+
)
|
|
90
101
|
);
|
|
91
102
|
};
|
|
92
103
|
const renderMixedMode = () => {
|
|
@@ -94,7 +105,23 @@ var index = (props) => {
|
|
|
94
105
|
const list = sortList.length > 3 ? sortList.slice(0, 3) : sortList;
|
|
95
106
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-header` }, /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_locales.getText)("pisell2.text.goodpass.product-vouchers")), /* @__PURE__ */ import_react.default.createElement(import_antd.Typography.Text, { underline: true, onClick: () => setShowModal(true) }, (0, import_locales.getText)("pisell2.text.goodpass.view-more"))), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 4 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-body` }, list.map(renderVoucherItem)));
|
|
96
107
|
};
|
|
97
|
-
|
|
108
|
+
const renderModalMode = () => {
|
|
109
|
+
const sortList = (mixedSort == null ? void 0 : mixedSort(dataSource)) || dataSource;
|
|
110
|
+
if (sortList.length === 0) return null;
|
|
111
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
style: {
|
|
115
|
+
padding: "10px 0",
|
|
116
|
+
display: "flex",
|
|
117
|
+
flexDirection: "column",
|
|
118
|
+
gap: 12
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
sortList.map(renderVoucherItem)
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !props.isInModal ? renderModal() : null, dataSource.length > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
98
125
|
import__.PisellCard,
|
|
99
126
|
{
|
|
100
127
|
padding: 8,
|
|
@@ -105,7 +132,7 @@ var index = (props) => {
|
|
|
105
132
|
},
|
|
106
133
|
className: clsPrefix
|
|
107
134
|
},
|
|
108
|
-
renderMixedMode()
|
|
109
|
-
));
|
|
135
|
+
props.isInModal ? renderModalMode() : renderMixedMode()
|
|
136
|
+
) : null);
|
|
110
137
|
};
|
|
111
138
|
var pisellGoodPassCard_default = index;
|
|
@@ -66,6 +66,14 @@ var BasicInfo = (props) => {
|
|
|
66
66
|
return null;
|
|
67
67
|
};
|
|
68
68
|
const hasSpecs = (bundle == null ? void 0 : bundle.length) || (options == null ? void 0 : options.length) || product_option_string;
|
|
69
|
-
|
|
69
|
+
const renderImage = () => {
|
|
70
|
+
if (!isShowImage) return null;
|
|
71
|
+
if (image) {
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement("img", { src: import_utils.image.ali(image, 64), className: `product-cover` });
|
|
73
|
+
}
|
|
74
|
+
const displayText = name ? name.slice(0, 2) : "";
|
|
75
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `product-cover-text` }, displayText);
|
|
76
|
+
};
|
|
77
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), (!isShowImage || !image && !name) && num > 1 ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 26 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num, 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
70
78
|
};
|
|
71
79
|
var basicInfo_default = BasicInfo;
|
|
@@ -36,6 +36,21 @@
|
|
|
36
36
|
border-radius: 6px;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.product-cover-text {
|
|
40
|
+
width: 48px;
|
|
41
|
+
height: 48px;
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
border-radius: 8px;
|
|
44
|
+
background-color: #DEDEDE;
|
|
45
|
+
color: #7E7E7E;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
font-size: 22px;
|
|
50
|
+
font-weight: 500;
|
|
51
|
+
line-height: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
39
54
|
.product-info {
|
|
40
55
|
flex: 1;
|
|
41
56
|
display: flex;
|
|
@@ -28,6 +28,7 @@ export declare type SwipeActionProps = {
|
|
|
28
28
|
stopPropagation?: PropagationEvent[];
|
|
29
29
|
onActionsReveal?: (side: SideType) => void;
|
|
30
30
|
onClose?: () => void;
|
|
31
|
+
escapeDom?: string;
|
|
31
32
|
} & NativeProps<'--background'>;
|
|
32
33
|
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
33
34
|
rightActions?: Action[] | undefined;
|
|
@@ -39,5 +40,6 @@ export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
|
39
40
|
stopPropagation?: "click"[] | undefined;
|
|
40
41
|
onActionsReveal?: ((side: SideType) => void) | undefined;
|
|
41
42
|
onClose?: (() => void) | undefined;
|
|
43
|
+
escapeDom?: string | undefined;
|
|
42
44
|
} & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
|
|
43
45
|
export {};
|
|
@@ -96,7 +96,7 @@ var Button = ({
|
|
|
96
96
|
children
|
|
97
97
|
);
|
|
98
98
|
};
|
|
99
|
-
var classPrefix = `pisell-swipe-action`;
|
|
99
|
+
var classPrefix = `pisell-custom-swipe-action`;
|
|
100
100
|
var defaultProps = {
|
|
101
101
|
rightActions: [],
|
|
102
102
|
leftActions: [],
|
|
@@ -216,6 +216,10 @@ var SwipeAction = (0, import_react.forwardRef)(
|
|
|
216
216
|
(0, import_react.useEffect)(() => {
|
|
217
217
|
if (!props.closeOnTouchOutside) return;
|
|
218
218
|
function handle(e) {
|
|
219
|
+
if (e.target && props.escapeDom) {
|
|
220
|
+
const container = document.querySelector(props.escapeDom);
|
|
221
|
+
if (container == null ? void 0 : container.contains(e.target)) return;
|
|
222
|
+
}
|
|
219
223
|
if (x.get() === 0) {
|
|
220
224
|
return;
|
|
221
225
|
}
|
|
@@ -224,11 +228,16 @@ var SwipeAction = (0, import_react.forwardRef)(
|
|
|
224
228
|
close();
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
|
-
|
|
231
|
+
if ("ontouchstart" in window) {
|
|
232
|
+
document.addEventListener("touchstart", handle);
|
|
233
|
+
} else {
|
|
234
|
+
document.addEventListener("mousedown", handle);
|
|
235
|
+
}
|
|
228
236
|
return () => {
|
|
229
237
|
document.removeEventListener("touchstart", handle);
|
|
238
|
+
document.removeEventListener("mousedown", handle);
|
|
230
239
|
};
|
|
231
|
-
}, [props.closeOnTouchOutside]);
|
|
240
|
+
}, [props.closeOnTouchOutside, props.escapeDom]);
|
|
232
241
|
function renderAction(action) {
|
|
233
242
|
const color = action.color ?? "light";
|
|
234
243
|
const _style = action.style || {};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
.pisell-swipe-action {
|
|
2
|
-
--background: var(--adm-color-background);
|
|
3
|
-
background: var(--background);
|
|
1
|
+
.pisell-custom-swipe-action {
|
|
4
2
|
cursor: grab;
|
|
5
3
|
overflow: hidden;
|
|
6
4
|
touch-action: pan-y;
|
|
@@ -31,8 +29,7 @@
|
|
|
31
29
|
&-action-button {
|
|
32
30
|
--border-radius: 0;
|
|
33
31
|
--border-width: 0;
|
|
34
|
-
--text-color: var(--adm-color-text-light-solid);
|
|
35
32
|
padding-left: 4px;
|
|
36
33
|
padding-right: 4px;
|
|
37
34
|
}
|
|
38
|
-
}
|
|
35
|
+
}
|
|
@@ -3,6 +3,7 @@ import { ProductCardTypes } from '../types';
|
|
|
3
3
|
interface ISKUCardProps extends ProductCardTypes {
|
|
4
4
|
type: 'a2' | 'a5';
|
|
5
5
|
rightActions: any[];
|
|
6
|
+
escapeDom?: string;
|
|
6
7
|
}
|
|
7
8
|
export declare const PREFIX = "pisell-cart-sku-card";
|
|
8
9
|
declare const CartSkuCard: (props: ISKUCardProps) => JSX.Element;
|
|
@@ -75,6 +75,7 @@ var CartSkuCard = (props) => {
|
|
|
75
75
|
onChangeHolder,
|
|
76
76
|
type,
|
|
77
77
|
rightActions = [],
|
|
78
|
+
escapeDom,
|
|
78
79
|
...other
|
|
79
80
|
} = props;
|
|
80
81
|
const useOpenNoteRef = (0, import_react.useRef)();
|
|
@@ -198,7 +199,8 @@ var CartSkuCard = (props) => {
|
|
|
198
199
|
{
|
|
199
200
|
closeOnAction: false,
|
|
200
201
|
className: (0, import_classnames.default)(`${PREFIX}-wrapper`),
|
|
201
|
-
rightActions: _rightActions
|
|
202
|
+
rightActions: _rightActions,
|
|
203
|
+
escapeDom
|
|
202
204
|
},
|
|
203
205
|
/* @__PURE__ */ import_react.default.createElement(
|
|
204
206
|
"div",
|
|
@@ -44,7 +44,7 @@ var Header = (props) => {
|
|
|
44
44
|
const {
|
|
45
45
|
isShowDelete,
|
|
46
46
|
item,
|
|
47
|
-
|
|
47
|
+
isShowImage,
|
|
48
48
|
onDelete,
|
|
49
49
|
disabledEdit,
|
|
50
50
|
onEditProduct,
|
|
@@ -71,6 +71,20 @@ var Header = (props) => {
|
|
|
71
71
|
const showDelete = (0, import_react.useMemo)(() => {
|
|
72
72
|
return isShowDelete && !disabledEdit && !disabled;
|
|
73
73
|
}, [isShowDelete, disabledEdit, disabled]);
|
|
74
|
+
const renderImage = () => {
|
|
75
|
+
if (!isShowImage) return null;
|
|
76
|
+
if (image) {
|
|
77
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
78
|
+
"img",
|
|
79
|
+
{
|
|
80
|
+
src: import_utils.image.ali(image, 64),
|
|
81
|
+
className: `${prefix}product-header-cover`
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
const displayText = name ? name.slice(0, 2) : "";
|
|
86
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-header-cover-text` }, displayText);
|
|
87
|
+
};
|
|
74
88
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
75
89
|
"div",
|
|
76
90
|
{
|
|
@@ -80,13 +94,7 @@ var Header = (props) => {
|
|
|
80
94
|
)
|
|
81
95
|
},
|
|
82
96
|
showDelete ? /* @__PURE__ */ import_react.default.createElement(import_DeleteButton.default, { onDelete }) : null,
|
|
83
|
-
|
|
84
|
-
"img",
|
|
85
|
-
{
|
|
86
|
-
src: import_utils.image.ali(image, 64),
|
|
87
|
-
className: `${prefix}product-header-cover`
|
|
88
|
-
}
|
|
89
|
-
) : null,
|
|
97
|
+
renderImage(),
|
|
90
98
|
id ? /* @__PURE__ */ import_react.default.createElement(
|
|
91
99
|
"div",
|
|
92
100
|
{
|
|
@@ -19,6 +19,21 @@
|
|
|
19
19
|
border-radius: 8px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
&-product-header-cover-text {
|
|
23
|
+
width: 64px;
|
|
24
|
+
height: 64px;
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
background-color: #DEDEDE;
|
|
28
|
+
color: #7E7E7E;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: center;
|
|
32
|
+
font-size: 22px;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
line-height: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
22
37
|
&-product-right-wrap {
|
|
23
38
|
display: flex;
|
|
24
39
|
flex-direction: column;
|