@pisell/materials 1.10.6 → 1.10.7
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.js +5 -5
- package/es/components/PisellSuperTabs/PisellSuperTabs.js +30 -8
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +5 -3
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +2 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.js +2 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +2 -1
- package/es/components/productCard/cartSkuCard/components/sales/index.js +3 -1
- package/es/components/productCard/cartSkuCard/index.js +11 -3
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/lineItem/BookingLineItem.js +5 -1
- package/es/components/productCard/types.d.ts +1 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/select/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/PisellSuperTabs/PisellSuperTabs.js +28 -8
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -3
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +2 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +7 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +2 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +7 -1
- package/lib/components/productCard/cartSkuCard/index.js +15 -2
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/lineItem/BookingLineItem.js +3 -0
- package/lib/components/productCard/types.d.ts +1 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/select/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/PisellGroupView/PisellGroupView.d.ts +0 -9
- package/es/components/PisellGroupView/PisellGroupView.stories.d.ts +0 -27
- package/es/components/PisellGroupView/index.d.ts +0 -6
- package/es/components/PisellGroupView/types.d.ts +0 -124
- package/es/components/PisellGroupView/utils/index.d.ts +0 -20
- package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
- package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
- package/es/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
- package/es/components/PisellTabbar/PisellTabbar.d.ts +0 -20
- package/es/components/PisellTabbar/constants.d.ts +0 -47
- package/es/components/PisellTabbar/index.d.ts +0 -10
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -16
- package/es/components/PisellTabbar/template/Template1/index.d.ts +0 -7
- package/es/components/pisellFind/index.d.ts +0 -69
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
- package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/pisellLookup/types.d.ts +0 -797
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
- package/es/components/pisellTimeRangeDisplay/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
- package/es/components/select-time/RightPanel/index.d.ts +0 -10
- package/es/components/select-time/index.d.ts +0 -16
- package/es/components/table/hooks/useTableSetting.d.ts +0 -21
- package/es/components/virtual-keyboard/Time/index.d.ts +0 -14
- package/es/components/virtual-keyboard/index.d.ts +0 -25
- package/es/hooks/useTranslationOriginal.d.ts +0 -4
- package/es/locales/ja.d.ts +0 -534
- package/es/locales/pt.d.ts +0 -534
- package/es/locales/zh-CN.d.ts +0 -561
- package/es/locales/zh-TW.d.ts +0 -561
- package/lib/components/PisellGroupView/PisellGroupView.d.ts +0 -9
- package/lib/components/PisellGroupView/PisellGroupView.stories.d.ts +0 -27
- package/lib/components/PisellGroupView/index.d.ts +0 -6
- package/lib/components/PisellGroupView/types.d.ts +0 -124
- package/lib/components/PisellGroupView/utils/index.d.ts +0 -20
- package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
- package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
- package/lib/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
- package/lib/components/PisellTabbar/PisellTabbar.d.ts +0 -20
- package/lib/components/PisellTabbar/constants.d.ts +0 -47
- package/lib/components/PisellTabbar/index.d.ts +0 -10
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -16
- package/lib/components/PisellTabbar/template/Template1/index.d.ts +0 -7
- package/lib/components/pisellFind/index.d.ts +0 -69
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
- package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/pisellLookup/types.d.ts +0 -797
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
- package/lib/components/pisellTimeRangeDisplay/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
- package/lib/components/select-time/RightPanel/index.d.ts +0 -10
- package/lib/components/select-time/index.d.ts +0 -16
- package/lib/components/table/hooks/useTableSetting.d.ts +0 -21
- package/lib/components/virtual-keyboard/Time/index.d.ts +0 -14
- package/lib/components/virtual-keyboard/index.d.ts +0 -25
- package/lib/hooks/useTranslationOriginal.d.ts +0 -4
- package/lib/locales/ja.d.ts +0 -534
- package/lib/locales/pt.d.ts +0 -534
- package/lib/locales/zh-CN.d.ts +0 -561
- package/lib/locales/zh-TW.d.ts +0 -561
|
@@ -51,6 +51,7 @@ var PisellSuperTabs = function PisellSuperTabs(props, ref) {
|
|
|
51
51
|
isControlled = _props$isControlled === void 0 ? true : _props$isControlled,
|
|
52
52
|
__designMode = props.__designMode;
|
|
53
53
|
var containerRef = useRef(null);
|
|
54
|
+
var scrollViewRef = useRef(null);
|
|
54
55
|
|
|
55
56
|
// 状态管理:处理受控/非受控模式
|
|
56
57
|
var _useTabsState = useTabsState({
|
|
@@ -62,17 +63,36 @@ var PisellSuperTabs = function PisellSuperTabs(props, ref) {
|
|
|
62
63
|
activeKey = _useTabsState.activeKey,
|
|
63
64
|
handleTabChange = _useTabsState.handleTabChange;
|
|
64
65
|
var scrollItemByRowKey = function scrollItemByRowKey(key) {
|
|
65
|
-
var _containerRef$current;
|
|
66
|
+
var _containerRef$current, _scrollViewRef$curren, _scrollViewRef$curren2;
|
|
66
67
|
var item = Array.from(((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.querySelectorAll('[data-pisell-super-tabs-key]')) || []).find(function (element) {
|
|
67
68
|
return element.dataset.pisellSuperTabsKey === key;
|
|
68
69
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
var scrollContainer = (_scrollViewRef$curren = scrollViewRef.current) === null || _scrollViewRef$curren === void 0 || (_scrollViewRef$curren2 = _scrollViewRef$curren.getScrollContainer) === null || _scrollViewRef$curren2 === void 0 ? void 0 : _scrollViewRef$curren2.call(_scrollViewRef$curren);
|
|
71
|
+
if (!item || !scrollContainer) return;
|
|
72
|
+
var containerRect = scrollContainer.getBoundingClientRect();
|
|
73
|
+
var itemRect = item.getBoundingClientRect();
|
|
74
|
+
var canScrollX = scrollContainer.scrollWidth > scrollContainer.clientWidth + 1;
|
|
75
|
+
var canScrollY = scrollContainer.scrollHeight > scrollContainer.clientHeight + 1;
|
|
76
|
+
var nextLeft = scrollContainer.scrollLeft;
|
|
77
|
+
var nextTop = scrollContainer.scrollTop;
|
|
78
|
+
if (canScrollX && itemRect.left < containerRect.left) {
|
|
79
|
+
nextLeft -= containerRect.left - itemRect.left;
|
|
80
|
+
} else if (canScrollX && itemRect.right > containerRect.right) {
|
|
81
|
+
nextLeft += itemRect.right - containerRect.right;
|
|
75
82
|
}
|
|
83
|
+
if (canScrollY && itemRect.top < containerRect.top) {
|
|
84
|
+
nextTop -= containerRect.top - itemRect.top;
|
|
85
|
+
} else if (canScrollY && itemRect.bottom > containerRect.bottom) {
|
|
86
|
+
nextTop += itemRect.bottom - containerRect.bottom;
|
|
87
|
+
}
|
|
88
|
+
if (nextLeft === scrollContainer.scrollLeft && nextTop === scrollContainer.scrollTop) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
scrollContainer.scrollTo({
|
|
92
|
+
left: nextLeft,
|
|
93
|
+
top: nextTop,
|
|
94
|
+
behavior: 'smooth'
|
|
95
|
+
});
|
|
76
96
|
};
|
|
77
97
|
useImperativeHandle(ref, function () {
|
|
78
98
|
if (__designMode) {
|
|
@@ -99,7 +119,9 @@ var PisellSuperTabs = function PisellSuperTabs(props, ref) {
|
|
|
99
119
|
}, slotTop), /*#__PURE__*/React.createElement("div", {
|
|
100
120
|
className: classNames('pisell-super-tabs-slot-left-' + id, slotLeftClassName),
|
|
101
121
|
style: slotLeftStyle
|
|
102
|
-
}, slotLeft), /*#__PURE__*/React.createElement(PisellScrollView,
|
|
122
|
+
}, slotLeft), /*#__PURE__*/React.createElement(PisellScrollView, _extends({
|
|
123
|
+
ref: scrollViewRef
|
|
124
|
+
}, resolvedScrollViewProps), /*#__PURE__*/React.createElement(PisellBasicGrid, _extends({}, gridProps, {
|
|
103
125
|
dataSource: dataSource,
|
|
104
126
|
rowKey: rowKey,
|
|
105
127
|
renderItem: function renderItem(item, index) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
22
|
+
title: string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
31
|
+
subTitle: string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -13,6 +13,8 @@ import EditButton from "../../../components/Header/EditButton";
|
|
|
13
13
|
import "./index.less";
|
|
14
14
|
var BasicInfo = function BasicInfo(props) {
|
|
15
15
|
var isShowImage = props.isShowImage,
|
|
16
|
+
_props$isShowQuantity = props.isShowQuantityBadge,
|
|
17
|
+
isShowQuantityBadge = _props$isShowQuantity === void 0 ? true : _props$isShowQuantity,
|
|
16
18
|
_props$dataSource = props.dataSource,
|
|
17
19
|
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource,
|
|
18
20
|
style = props.style,
|
|
@@ -121,7 +123,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
121
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
122
124
|
className: basicInfoClassName,
|
|
123
125
|
style: style || {}
|
|
124
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
125
127
|
style: {
|
|
126
128
|
width: 20
|
|
127
129
|
}
|
|
@@ -144,7 +146,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
144
146
|
return /*#__PURE__*/React.createElement("div", {
|
|
145
147
|
className: basicInfoClassName,
|
|
146
148
|
style: style || {}
|
|
147
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
148
150
|
style: {
|
|
149
151
|
width: 20
|
|
150
152
|
}
|
|
@@ -165,7 +167,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
165
167
|
return /*#__PURE__*/React.createElement("div", {
|
|
166
168
|
className: basicInfoClassName,
|
|
167
169
|
style: style || {}
|
|
168
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
170
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
169
171
|
style: {
|
|
170
172
|
width: 20
|
|
171
173
|
}
|
|
@@ -2,11 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
interface IProps {
|
|
4
4
|
isShowImage?: boolean;
|
|
5
|
+
isShowQuantityBadge?: boolean;
|
|
5
6
|
dataSource: {
|
|
6
7
|
bundle?: any[];
|
|
7
8
|
symbol?: string;
|
|
8
9
|
};
|
|
9
10
|
type?: 'a2' | 'a5' | 'a9';
|
|
10
11
|
}
|
|
11
|
-
declare const Packages: ({ isShowImage, dataSource, type }: IProps) => React.JSX.Element | null;
|
|
12
|
+
declare const Packages: ({ isShowImage, isShowQuantityBadge, dataSource, type, }: IProps) => React.JSX.Element | null;
|
|
12
13
|
export default Packages;
|
|
@@ -14,6 +14,7 @@ import AmountFooter from "../../../components/AmountFooter";
|
|
|
14
14
|
import "./index.less";
|
|
15
15
|
var Packages = function Packages(_ref) {
|
|
16
16
|
var isShowImage = _ref.isShowImage,
|
|
17
|
+
isShowQuantityBadge = _ref.isShowQuantityBadge,
|
|
17
18
|
_ref$dataSource = _ref.dataSource,
|
|
18
19
|
dataSource = _ref$dataSource === void 0 ? {} : _ref$dataSource,
|
|
19
20
|
type = _ref.type;
|
|
@@ -51,6 +52,7 @@ var Packages = function Packages(_ref) {
|
|
|
51
52
|
}
|
|
52
53
|
}, /*#__PURE__*/React.createElement(BasicInfo, {
|
|
53
54
|
isShowImage: isShowImage,
|
|
55
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
54
56
|
dataSource: _objectSpread(_objectSpread({}, item), {}, {
|
|
55
57
|
name: item.title,
|
|
56
58
|
image: item.cover,
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -8,6 +8,7 @@ interface IProps {
|
|
|
8
8
|
bundle?: any[];
|
|
9
9
|
};
|
|
10
10
|
isShowImage?: boolean;
|
|
11
|
+
isShowQuantityBadge?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const Sales: ({ hideDivider, dataSource, isShowImage }: IProps) => React.JSX.Element | null;
|
|
13
|
+
declare const Sales: ({ hideDivider, dataSource, isShowImage, isShowQuantityBadge, }: IProps) => React.JSX.Element | null;
|
|
13
14
|
export default Sales;
|
|
@@ -14,7 +14,8 @@ import "./index.less";
|
|
|
14
14
|
var Sales = function Sales(_ref) {
|
|
15
15
|
var hideDivider = _ref.hideDivider,
|
|
16
16
|
dataSource = _ref.dataSource,
|
|
17
|
-
isShowImage = _ref.isShowImage
|
|
17
|
+
isShowImage = _ref.isShowImage,
|
|
18
|
+
isShowQuantityBadge = _ref.isShowQuantityBadge;
|
|
18
19
|
var _ref2 = dataSource || {},
|
|
19
20
|
_ref2$relation_produc = _ref2.relation_products,
|
|
20
21
|
relation_products = _ref2$relation_produc === void 0 ? [] : _ref2$relation_produc,
|
|
@@ -44,6 +45,7 @@ var Sales = function Sales(_ref) {
|
|
|
44
45
|
renderItem: function renderItem(item) {
|
|
45
46
|
return /*#__PURE__*/React.createElement(BasicInfo, {
|
|
46
47
|
isShowImage: isShowImage,
|
|
48
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
47
49
|
style: {
|
|
48
50
|
border: '1px solid #D0D5DD',
|
|
49
51
|
borderRadius: 4,
|
|
@@ -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", "isShowOriginalPrice", "isShowHolder", "isShowNote", "isShowDelete", "isShowInlineDelete", "isShowAmountFooter", "isShowPackageNote", "isShowEditProduct", "disabledClick", "disabledEditClick", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onPromotion", "onGift", "onChangeHolder", "itemType", "type", "rightActions", "rightActionsDisplay", "escapeDom", "maxSpecsCount", "isShowRelatedProduct"];
|
|
2
|
+
var _excluded = ["dataSource", "isShowImage", "isShowQuantityBadge", "isShowOriginalPrice", "isShowHolder", "isShowNote", "isShowDelete", "isShowInlineDelete", "isShowAmountFooter", "isShowPackageNote", "isShowEditProduct", "disabledClick", "disabledEditClick", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onPromotion", "onGift", "onChangeHolder", "itemType", "type", "rightActions", "rightActionsDisplay", "escapeDom", "maxSpecsCount", "isShowRelatedProduct"];
|
|
3
3
|
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; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -42,6 +42,8 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
42
42
|
dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
|
|
43
43
|
_props$isShowImage = props.isShowImage,
|
|
44
44
|
isShowImage = _props$isShowImage === void 0 ? defaultValue.isShowImage : _props$isShowImage,
|
|
45
|
+
_props$isShowQuantity = props.isShowQuantityBadge,
|
|
46
|
+
isShowQuantityBadge = _props$isShowQuantity === void 0 ? true : _props$isShowQuantity,
|
|
45
47
|
_props$isShowOriginal = props.isShowOriginalPrice,
|
|
46
48
|
isShowOriginalPrice = _props$isShowOriginal === void 0 ? defaultValue.isShowOriginalPrice : _props$isShowOriginal,
|
|
47
49
|
_props$isShowHolder = props.isShowHolder,
|
|
@@ -167,6 +169,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
167
169
|
var renderA2 = function renderA2() {
|
|
168
170
|
return /*#__PURE__*/React.createElement(React.Fragment, null, renderMainProduct( /*#__PURE__*/React.createElement(BasicInfo, {
|
|
169
171
|
isShowImage: isShowImage,
|
|
172
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
170
173
|
dataSource: dataSource,
|
|
171
174
|
isMainProduct: true,
|
|
172
175
|
maxSpecsCount: maxSpecsCount
|
|
@@ -194,6 +197,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
194
197
|
type: "pisell2-trash-01"
|
|
195
198
|
})) : null, renderMainProduct( /*#__PURE__*/React.createElement(BasicInfo, {
|
|
196
199
|
isShowImage: isShowImage,
|
|
200
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
197
201
|
dataSource: dataSource,
|
|
198
202
|
isMainProduct: true,
|
|
199
203
|
type: type,
|
|
@@ -207,11 +211,13 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
207
211
|
dataSource: dataSource
|
|
208
212
|
})) : null, /*#__PURE__*/React.createElement(Packages, {
|
|
209
213
|
dataSource: dataSource,
|
|
210
|
-
isShowImage: isShowImage
|
|
214
|
+
isShowImage: isShowImage,
|
|
215
|
+
isShowQuantityBadge: isShowQuantityBadge
|
|
211
216
|
}), /*#__PURE__*/React.createElement(Sales, {
|
|
212
217
|
dataSource: dataSource,
|
|
213
218
|
hideDivider: !!(dataSource !== null && dataSource !== void 0 && (_dataSource$bundle = dataSource.bundle) !== null && _dataSource$bundle !== void 0 && _dataSource$bundle.length),
|
|
214
|
-
isShowImage: isShowImage
|
|
219
|
+
isShowImage: isShowImage,
|
|
220
|
+
isShowQuantityBadge: isShowQuantityBadge
|
|
215
221
|
}), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
|
|
216
222
|
dataSource: dataSource,
|
|
217
223
|
hideDivider: hideDivider
|
|
@@ -245,6 +251,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
245
251
|
type: "pisell2-trash-01"
|
|
246
252
|
})) : null, renderMainProduct( /*#__PURE__*/React.createElement(BasicInfo, {
|
|
247
253
|
isShowImage: isShowImage,
|
|
254
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
248
255
|
dataSource: dataSource,
|
|
249
256
|
isMainProduct: true,
|
|
250
257
|
type: type,
|
|
@@ -255,6 +262,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
255
262
|
})), /*#__PURE__*/React.createElement(Packages, {
|
|
256
263
|
dataSource: dataSource,
|
|
257
264
|
isShowImage: isShowImage,
|
|
265
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
258
266
|
type: type
|
|
259
267
|
}), isShowAmountFooter ? /*#__PURE__*/React.createElement(AmountFooter, {
|
|
260
268
|
item: dataSource,
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -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", "type", "cartSkuType", "isShowBookingHeader", "relatedProductDataSource", "addTimeProductDataSources", "rightActions", "rightActionsDisplay", "escapeDom", "isShowImage", "isFormSubject", "isShowDelete", "isShowInlineDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAddTimeProductCard", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
|
|
2
|
+
var _excluded = ["dataSource", "type", "cartSkuType", "isShowBookingHeader", "relatedProductDataSource", "addTimeProductDataSources", "rightActions", "rightActionsDisplay", "escapeDom", "isShowImage", "isShowQuantityBadge", "isFormSubject", "isShowDelete", "isShowInlineDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAddTimeProductCard", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
|
|
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 _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
@@ -62,6 +62,8 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
62
62
|
rightActionsDisplay = _props$rightActionsDi === void 0 ? 'swipe' : _props$rightActionsDi,
|
|
63
63
|
escapeDom = props.escapeDom,
|
|
64
64
|
isShowImage = props.isShowImage,
|
|
65
|
+
_props$isShowQuantity = props.isShowQuantityBadge,
|
|
66
|
+
isShowQuantityBadge = _props$isShowQuantity === void 0 ? true : _props$isShowQuantity,
|
|
65
67
|
isFormSubject = props.isFormSubject,
|
|
66
68
|
isShowDelete = props.isShowDelete,
|
|
67
69
|
_props$isShowInlineDe = props.isShowInlineDelete,
|
|
@@ -179,12 +181,14 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
179
181
|
}) : null;
|
|
180
182
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
|
|
181
183
|
isShowImage: isShowImage,
|
|
184
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
182
185
|
dataSource: productDataSource,
|
|
183
186
|
type: cartSkuType,
|
|
184
187
|
maxSpecsCount: props.maxSpecsCount || 1
|
|
185
188
|
}), /*#__PURE__*/React.createElement(Packages, {
|
|
186
189
|
dataSource: productDataSource,
|
|
187
190
|
isShowImage: isShowImage,
|
|
191
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
188
192
|
type: cartSkuType
|
|
189
193
|
}), isShowAmountFooter ? /*#__PURE__*/React.createElement(AmountFooter, {
|
|
190
194
|
item: productDataSource,
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("
|
|
158
|
+
}) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting" | "filters")[];
|
|
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 {};
|
package/es/utils/index.d.ts
CHANGED
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
|
@@ -77,6 +77,7 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
77
77
|
__designMode
|
|
78
78
|
} = props;
|
|
79
79
|
const containerRef = (0, import_react.useRef)(null);
|
|
80
|
+
const scrollViewRef = (0, import_react.useRef)(null);
|
|
80
81
|
const { activeKey, handleTabChange } = (0, import_hooks.useTabsState)({
|
|
81
82
|
value,
|
|
82
83
|
defaultValue,
|
|
@@ -84,19 +85,38 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
84
85
|
isControlled: isControlled ?? false
|
|
85
86
|
});
|
|
86
87
|
const scrollItemByRowKey = (key) => {
|
|
87
|
-
var _a2;
|
|
88
|
+
var _a2, _b2, _c2;
|
|
88
89
|
const item = Array.from(
|
|
89
90
|
((_a2 = containerRef.current) == null ? void 0 : _a2.querySelectorAll(
|
|
90
91
|
"[data-pisell-super-tabs-key]"
|
|
91
92
|
)) || []
|
|
92
93
|
).find((element) => element.dataset.pisellSuperTabsKey === key);
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
94
|
+
const scrollContainer = (_c2 = (_b2 = scrollViewRef.current) == null ? void 0 : _b2.getScrollContainer) == null ? void 0 : _c2.call(_b2);
|
|
95
|
+
if (!item || !scrollContainer) return;
|
|
96
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
97
|
+
const itemRect = item.getBoundingClientRect();
|
|
98
|
+
const canScrollX = scrollContainer.scrollWidth > scrollContainer.clientWidth + 1;
|
|
99
|
+
const canScrollY = scrollContainer.scrollHeight > scrollContainer.clientHeight + 1;
|
|
100
|
+
let nextLeft = scrollContainer.scrollLeft;
|
|
101
|
+
let nextTop = scrollContainer.scrollTop;
|
|
102
|
+
if (canScrollX && itemRect.left < containerRect.left) {
|
|
103
|
+
nextLeft -= containerRect.left - itemRect.left;
|
|
104
|
+
} else if (canScrollX && itemRect.right > containerRect.right) {
|
|
105
|
+
nextLeft += itemRect.right - containerRect.right;
|
|
99
106
|
}
|
|
107
|
+
if (canScrollY && itemRect.top < containerRect.top) {
|
|
108
|
+
nextTop -= containerRect.top - itemRect.top;
|
|
109
|
+
} else if (canScrollY && itemRect.bottom > containerRect.bottom) {
|
|
110
|
+
nextTop += itemRect.bottom - containerRect.bottom;
|
|
111
|
+
}
|
|
112
|
+
if (nextLeft === scrollContainer.scrollLeft && nextTop === scrollContainer.scrollTop) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
scrollContainer.scrollTo({
|
|
116
|
+
left: nextLeft,
|
|
117
|
+
top: nextTop,
|
|
118
|
+
behavior: "smooth"
|
|
119
|
+
});
|
|
100
120
|
};
|
|
101
121
|
(0, import_react.useImperativeHandle)(ref, () => {
|
|
102
122
|
if (__designMode) {
|
|
@@ -148,7 +168,7 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
148
168
|
},
|
|
149
169
|
slotLeft
|
|
150
170
|
),
|
|
151
|
-
/* @__PURE__ */ import_react.default.createElement(import_PisellScrollView.default, { ...resolvedScrollViewProps }, /* @__PURE__ */ import_react.default.createElement(
|
|
171
|
+
/* @__PURE__ */ import_react.default.createElement(import_PisellScrollView.default, { ref: scrollViewRef, ...resolvedScrollViewProps }, /* @__PURE__ */ import_react.default.createElement(
|
|
152
172
|
import_PisellBasicGrid.default,
|
|
153
173
|
{
|
|
154
174
|
...gridProps,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
22
|
+
title: string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
31
|
+
subTitle: string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -44,6 +44,7 @@ var import_index = require("./index.less");
|
|
|
44
44
|
var BasicInfo = (props) => {
|
|
45
45
|
const {
|
|
46
46
|
isShowImage,
|
|
47
|
+
isShowQuantityBadge = true,
|
|
47
48
|
dataSource = {},
|
|
48
49
|
style,
|
|
49
50
|
isMainProduct,
|
|
@@ -144,7 +145,7 @@ var BasicInfo = (props) => {
|
|
|
144
145
|
return _originalTotal !== 0 && _originalTotal != _total;
|
|
145
146
|
}, [isShowOriginalPrice, origin_total, total, hasSpecs, hasWeighingInfo]);
|
|
146
147
|
if (type === "a5") {
|
|
147
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
|
|
148
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
|
|
148
149
|
"div",
|
|
149
150
|
{
|
|
150
151
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -155,7 +156,7 @@ var BasicInfo = (props) => {
|
|
|
155
156
|
if (type === "a9") {
|
|
156
157
|
const showAmount = isBundle && !showFooter;
|
|
157
158
|
const _price = showAmount ? Number(price ?? 0) * num : price;
|
|
158
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
159
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
159
160
|
"div",
|
|
160
161
|
{
|
|
161
162
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -163,6 +164,6 @@ var BasicInfo = (props) => {
|
|
|
163
164
|
name
|
|
164
165
|
), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ import_react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `original-price` }, (0, import_utils.formatAmount)(origin_total, 2, symbol)) : null)), renderProductMeta()), renderEdit));
|
|
165
166
|
}
|
|
166
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 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));
|
|
167
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 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));
|
|
167
168
|
};
|
|
168
169
|
var basicInfo_default = BasicInfo;
|
|
@@ -2,11 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
interface IProps {
|
|
4
4
|
isShowImage?: boolean;
|
|
5
|
+
isShowQuantityBadge?: boolean;
|
|
5
6
|
dataSource: {
|
|
6
7
|
bundle?: any[];
|
|
7
8
|
symbol?: string;
|
|
8
9
|
};
|
|
9
10
|
type?: 'a2' | 'a5' | 'a9';
|
|
10
11
|
}
|
|
11
|
-
declare const Packages: ({ isShowImage, dataSource, type }: IProps) => React.JSX.Element | null;
|
|
12
|
+
declare const Packages: ({ isShowImage, isShowQuantityBadge, dataSource, type, }: IProps) => React.JSX.Element | null;
|
|
12
13
|
export default Packages;
|
|
@@ -40,7 +40,12 @@ var import_basicInfo = __toESM(require("../basicInfo"));
|
|
|
40
40
|
var import__ = require("../../index");
|
|
41
41
|
var import_AmountFooter = __toESM(require("../../../components/AmountFooter"));
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
|
-
var Packages = ({
|
|
43
|
+
var Packages = ({
|
|
44
|
+
isShowImage,
|
|
45
|
+
isShowQuantityBadge,
|
|
46
|
+
dataSource = {},
|
|
47
|
+
type
|
|
48
|
+
}) => {
|
|
44
49
|
const { bundle = [], symbol = "$" } = dataSource;
|
|
45
50
|
const showFooter = (0, import_react.useCallback)(
|
|
46
51
|
(_bundle) => {
|
|
@@ -71,6 +76,7 @@ var Packages = ({ isShowImage, dataSource = {}, type }) => {
|
|
|
71
76
|
import_basicInfo.default,
|
|
72
77
|
{
|
|
73
78
|
isShowImage,
|
|
79
|
+
isShowQuantityBadge,
|
|
74
80
|
dataSource: {
|
|
75
81
|
...item,
|
|
76
82
|
name: item.title,
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -8,6 +8,7 @@ interface IProps {
|
|
|
8
8
|
bundle?: any[];
|
|
9
9
|
};
|
|
10
10
|
isShowImage?: boolean;
|
|
11
|
+
isShowQuantityBadge?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const Sales: ({ hideDivider, dataSource, isShowImage }: IProps) => React.JSX.Element | null;
|
|
13
|
+
declare const Sales: ({ hideDivider, dataSource, isShowImage, isShowQuantityBadge, }: IProps) => React.JSX.Element | null;
|
|
13
14
|
export default Sales;
|
|
@@ -39,7 +39,12 @@ var import_basicInfo = __toESM(require("../basicInfo"));
|
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
40
|
var import__ = require("../../index");
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
|
-
var Sales = ({
|
|
42
|
+
var Sales = ({
|
|
43
|
+
hideDivider,
|
|
44
|
+
dataSource,
|
|
45
|
+
isShowImage,
|
|
46
|
+
isShowQuantityBadge
|
|
47
|
+
}) => {
|
|
43
48
|
const { relation_products = [], symbol = "$" } = dataSource || {};
|
|
44
49
|
let other_products = relation_products.map((p) => {
|
|
45
50
|
return {
|
|
@@ -60,6 +65,7 @@ var Sales = ({ hideDivider, dataSource, isShowImage }) => {
|
|
|
60
65
|
import_basicInfo.default,
|
|
61
66
|
{
|
|
62
67
|
isShowImage,
|
|
68
|
+
isShowQuantityBadge,
|
|
63
69
|
style: {
|
|
64
70
|
border: "1px solid #D0D5DD",
|
|
65
71
|
borderRadius: 4,
|