@pisell/materials 6.2.28 → 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 +12 -2
- 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 +11 -2
- 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
|
@@ -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;
|
|
@@ -47,7 +47,7 @@ var index = function index(props) {
|
|
|
47
47
|
var renderVoucherContent = function renderVoucherContent(item) {
|
|
48
48
|
return /*#__PURE__*/React.createElement("span", {
|
|
49
49
|
className: "voucher-item-content-save"
|
|
50
|
-
}, getText('pisell2.text.goodpass.save'),
|
|
50
|
+
}, getText('pisell2.text.goodpass.save'), ' ', /*#__PURE__*/React.createElement(PisellText.Amount, {
|
|
51
51
|
value: item.savedAmount
|
|
52
52
|
}));
|
|
53
53
|
};
|
|
@@ -86,8 +86,8 @@ var index = function index(props) {
|
|
|
86
86
|
}, /*#__PURE__*/React.createElement("div", {
|
|
87
87
|
style: {
|
|
88
88
|
padding: '10px 0',
|
|
89
|
-
display:
|
|
90
|
-
flexDirection:
|
|
89
|
+
display: 'flex',
|
|
90
|
+
flexDirection: 'column',
|
|
91
91
|
gap: 12
|
|
92
92
|
}
|
|
93
93
|
}, dataSource.map(renderVoucherItem)));
|
|
@@ -110,13 +110,25 @@ var index = function index(props) {
|
|
|
110
110
|
className: "".concat(clsPrefix, "-body")
|
|
111
111
|
}, list.map(renderVoucherItem)));
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
var renderModalMode = function renderModalMode() {
|
|
114
|
+
var sortList = (mixedSort === null || mixedSort === void 0 ? void 0 : mixedSort(dataSource)) || dataSource;
|
|
115
|
+
if (sortList.length === 0) return null;
|
|
116
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
style: {
|
|
118
|
+
padding: '10px 0',
|
|
119
|
+
display: 'flex',
|
|
120
|
+
flexDirection: 'column',
|
|
121
|
+
gap: 12
|
|
122
|
+
}
|
|
123
|
+
}, sortList.map(renderVoucherItem));
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !props.isInModal ? renderModal() : null, dataSource.length > 0 ? /*#__PURE__*/React.createElement(PisellCard, {
|
|
114
126
|
padding: 8,
|
|
115
127
|
borderRadius: 8,
|
|
116
128
|
style: _objectSpread({
|
|
117
129
|
width: 378
|
|
118
130
|
}, style),
|
|
119
131
|
className: clsPrefix
|
|
120
|
-
}, renderMixedMode()));
|
|
132
|
+
}, props.isInModal ? renderModalMode() : renderMixedMode()) : null);
|
|
121
133
|
};
|
|
122
134
|
export default index;
|
|
@@ -32,13 +32,25 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
32
32
|
return null;
|
|
33
33
|
};
|
|
34
34
|
var hasSpecs = (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (options === null || options === void 0 ? void 0 : options.length) || product_option_string;
|
|
35
|
+
var renderImage = function renderImage() {
|
|
36
|
+
if (!isShowImage) return null;
|
|
37
|
+
if (image) {
|
|
38
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
39
|
+
src: imageAli.ali(image, 64),
|
|
40
|
+
className: "product-cover"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// 如果没有图片,显示文字图片
|
|
45
|
+
var displayText = name ? name.slice(0, 2) : '';
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "product-cover-text"
|
|
48
|
+
}, displayText);
|
|
49
|
+
};
|
|
35
50
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
51
|
className: "".concat(PREFIX, "__basic-info"),
|
|
37
52
|
style: style || {}
|
|
38
|
-
}, renderNumTag(), isShowImage
|
|
39
|
-
src: imageAli.ali(image, 64),
|
|
40
|
-
className: "product-cover"
|
|
41
|
-
}), (!isShowImage || !image) && num > 1 ? /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
}, renderNumTag(), renderImage(), (!isShowImage || !image && !name) && num > 1 ? /*#__PURE__*/React.createElement("div", {
|
|
42
54
|
style: {
|
|
43
55
|
width: 26
|
|
44
56
|
}
|
|
@@ -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 {};
|
|
@@ -201,6 +201,11 @@ export var SwipeAction = /*#__PURE__*/forwardRef(function (p, ref) {
|
|
|
201
201
|
useEffect(function () {
|
|
202
202
|
if (!props.closeOnTouchOutside) return;
|
|
203
203
|
function handle(e) {
|
|
204
|
+
// 检查点击的元素或其祖先元素是否有特定 class
|
|
205
|
+
if (e.target && props.escapeDom) {
|
|
206
|
+
var container = document.querySelector(props.escapeDom);
|
|
207
|
+
if (container !== null && container !== void 0 && container.contains(e.target)) return;
|
|
208
|
+
}
|
|
204
209
|
if (x.get() === 0) {
|
|
205
210
|
return;
|
|
206
211
|
}
|
|
@@ -209,11 +214,16 @@ export var SwipeAction = /*#__PURE__*/forwardRef(function (p, ref) {
|
|
|
209
214
|
close();
|
|
210
215
|
}
|
|
211
216
|
}
|
|
212
|
-
|
|
217
|
+
if ('ontouchstart' in window) {
|
|
218
|
+
document.addEventListener('touchstart', handle);
|
|
219
|
+
} else {
|
|
220
|
+
document.addEventListener('mousedown', handle);
|
|
221
|
+
}
|
|
213
222
|
return function () {
|
|
214
223
|
document.removeEventListener('touchstart', handle);
|
|
224
|
+
document.removeEventListener('mousedown', handle);
|
|
215
225
|
};
|
|
216
|
-
}, [props.closeOnTouchOutside]);
|
|
226
|
+
}, [props.closeOnTouchOutside, props.escapeDom]);
|
|
217
227
|
function renderAction(action) {
|
|
218
228
|
var _action$color, _colorRecord$color;
|
|
219
229
|
var color = (_action$color = action.color) !== null && _action$color !== void 0 ? _action$color : 'light';
|
|
@@ -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;
|
|
@@ -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 = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder", "type", "rightActions"];
|
|
2
|
+
var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder", "type", "rightActions", "escapeDom"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -63,6 +63,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
63
63
|
type = props.type,
|
|
64
64
|
_props$rightActions = props.rightActions,
|
|
65
65
|
rightActions = _props$rightActions === void 0 ? [] : _props$rightActions,
|
|
66
|
+
escapeDom = props.escapeDom,
|
|
66
67
|
other = _objectWithoutProperties(props, _excluded);
|
|
67
68
|
var useOpenNoteRef = useRef();
|
|
68
69
|
var context = useEngineContext();
|
|
@@ -194,7 +195,8 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
194
195
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SwipeAction, {
|
|
195
196
|
closeOnAction: false,
|
|
196
197
|
className: classNames("".concat(PREFIX, "-wrapper")),
|
|
197
|
-
rightActions: _rightActions
|
|
198
|
+
rightActions: _rightActions,
|
|
199
|
+
escapeDom: escapeDom
|
|
198
200
|
}, /*#__PURE__*/React.createElement("div", {
|
|
199
201
|
className: classNames(PREFIX, "".concat(PREFIX, "--").concat(type)),
|
|
200
202
|
onClick: function onClick(e) {
|
|
@@ -13,7 +13,7 @@ var prefix = 'pisell-lowcode-';
|
|
|
13
13
|
var Header = function Header(props) {
|
|
14
14
|
var isShowDelete = props.isShowDelete,
|
|
15
15
|
item = props.item,
|
|
16
|
-
|
|
16
|
+
isShowImage = props.isShowImage,
|
|
17
17
|
onDelete = props.onDelete,
|
|
18
18
|
disabledEdit = props.disabledEdit,
|
|
19
19
|
onEditProduct = props.onEditProduct,
|
|
@@ -66,14 +66,26 @@ var Header = function Header(props) {
|
|
|
66
66
|
var showDelete = useMemo(function () {
|
|
67
67
|
return isShowDelete && !disabledEdit && !disabled;
|
|
68
68
|
}, [isShowDelete, disabledEdit, disabled]);
|
|
69
|
+
var renderImage = function renderImage() {
|
|
70
|
+
if (!isShowImage) return null;
|
|
71
|
+
if (image) {
|
|
72
|
+
return /*#__PURE__*/React.createElement("img", {
|
|
73
|
+
src: imageAli.ali(image, 64),
|
|
74
|
+
className: "".concat(prefix, "product-header-cover")
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// 如果没有图片,显示文字图片
|
|
79
|
+
var displayText = name ? name.slice(0, 2) : '';
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
className: "".concat(prefix, "product-header-cover-text")
|
|
82
|
+
}, displayText);
|
|
83
|
+
};
|
|
69
84
|
return /*#__PURE__*/React.createElement("div", {
|
|
70
85
|
className: classNames("".concat(prefix, "product-header"), headerCenterStyle && "".concat(prefix, "product-options-header"))
|
|
71
86
|
}, showDelete ? /*#__PURE__*/React.createElement(DeleteButton, {
|
|
72
87
|
onDelete: onDelete
|
|
73
|
-
}) : null,
|
|
74
|
-
src: imageAli.ali(image, 64),
|
|
75
|
-
className: "".concat(prefix, "product-header-cover")
|
|
76
|
-
}) : null, id ? /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
}) : null, renderImage(), id ? /*#__PURE__*/React.createElement("div", {
|
|
77
89
|
className: classNames("".concat(prefix, "product-right-wrap"), _defineProperty({}, "".concat(prefix, "product-right-wrap-stretch"), isShowEditProduct))
|
|
78
90
|
}, /*#__PURE__*/React.createElement("div", {
|
|
79
91
|
className: "".concat(prefix, "product-title")
|
|
@@ -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;
|
|
@@ -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 = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder"];
|
|
2
|
+
var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "scenario", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder"];
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
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); }
|
|
@@ -46,6 +46,7 @@ var ProductCard = function ProductCard(props) {
|
|
|
46
46
|
isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
|
|
47
47
|
_props$isShowEditProd = props.isShowEditProduct,
|
|
48
48
|
isShowEditProduct = _props$isShowEditProd === void 0 ? defaultValue.isShowEditProduct : _props$isShowEditProd,
|
|
49
|
+
scenario = props.scenario,
|
|
49
50
|
_onEditProduct = props.onEditProduct,
|
|
50
51
|
_onAction = props.onAction,
|
|
51
52
|
_onDelete = props.onDelete,
|
|
@@ -102,7 +103,7 @@ var ProductCard = function ProductCard(props) {
|
|
|
102
103
|
return _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(dataSource);
|
|
103
104
|
}
|
|
104
105
|
})), /*#__PURE__*/React.createElement(CardPro, {
|
|
105
|
-
className: classNames('pisell-lowcode-product-card', _defineProperty(_defineProperty({}, 'pisell-lowcode-product-card-image', !showImage), 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct)),
|
|
106
|
+
className: classNames('pisell-lowcode-product-card', _defineProperty(_defineProperty(_defineProperty({}, 'pisell-lowcode-product-card-image', !showImage && scenario !== 'booking2'), 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct && scenario !== 'booking2'), 'pisell-lowcode-product-card-image-booking2', scenario === 'booking2')),
|
|
106
107
|
key: _id
|
|
107
108
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
108
109
|
onClick: function onClick(e) {
|
|
@@ -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;
|