@pisell/materials 1.10.5 → 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 +34 -7
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +19 -3
- 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 +34 -5
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +22 -3
- 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 -12
- 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 -12
- 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,13 +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
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
var _containerRef$current, _scrollViewRef$curren, _scrollViewRef$curren2;
|
|
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) {
|
|
68
|
+
return element.dataset.pisellSuperTabsKey === key;
|
|
69
|
+
});
|
|
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;
|
|
71
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
|
+
});
|
|
72
96
|
};
|
|
73
97
|
useImperativeHandle(ref, function () {
|
|
74
98
|
if (__designMode) {
|
|
@@ -95,7 +119,9 @@ var PisellSuperTabs = function PisellSuperTabs(props, ref) {
|
|
|
95
119
|
}, slotTop), /*#__PURE__*/React.createElement("div", {
|
|
96
120
|
className: classNames('pisell-super-tabs-slot-left-' + id, slotLeftClassName),
|
|
97
121
|
style: slotLeftStyle
|
|
98
|
-
}, slotLeft), /*#__PURE__*/React.createElement(PisellScrollView,
|
|
122
|
+
}, slotLeft), /*#__PURE__*/React.createElement(PisellScrollView, _extends({
|
|
123
|
+
ref: scrollViewRef
|
|
124
|
+
}, resolvedScrollViewProps), /*#__PURE__*/React.createElement(PisellBasicGrid, _extends({}, gridProps, {
|
|
99
125
|
dataSource: dataSource,
|
|
100
126
|
rowKey: rowKey,
|
|
101
127
|
renderItem: function renderItem(item, index) {
|
|
@@ -140,6 +166,7 @@ var PisellSuperTabs = function PisellSuperTabs(props, ref) {
|
|
|
140
166
|
// 包裹点击事件处理
|
|
141
167
|
return /*#__PURE__*/React.createElement("div", {
|
|
142
168
|
key: key,
|
|
169
|
+
"data-pisell-super-tabs-key": key,
|
|
143
170
|
className: classNames('pisell-super-tabs-item', "pisell-super-tabs-item-".concat(id, "-").concat(key), {
|
|
144
171
|
'pisell-super-tabs-item--active': active
|
|
145
172
|
}, tabItemClassName),
|
|
@@ -85,9 +85,14 @@ var PisellTabbar = function PisellTabbar(props, ref) {
|
|
|
85
85
|
_props$direction = props.direction,
|
|
86
86
|
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
87
87
|
_props$showAllItem = props.showAllItem,
|
|
88
|
-
showAllItem = _props$showAllItem === void 0 ? true : _props$showAllItem
|
|
88
|
+
showAllItem = _props$showAllItem === void 0 ? true : _props$showAllItem,
|
|
89
|
+
_props$showSearchItem = props.showSearchItem,
|
|
90
|
+
showSearchItem = _props$showSearchItem === void 0 ? true : _props$showSearchItem,
|
|
91
|
+
_props$scrollActiveIt = props.scrollActiveItemIntoView,
|
|
92
|
+
scrollActiveItemIntoView = _props$scrollActiveIt === void 0 ? false : _props$scrollActiveIt;
|
|
89
93
|
var isVertical = direction === 'vertical';
|
|
90
94
|
var containerRef = useRef(null);
|
|
95
|
+
var level1TabsRef = useRef(null);
|
|
91
96
|
var searchRef = useRef(null);
|
|
92
97
|
var firstCategoryKey = (_dataSource$0$id = (_dataSource$ = dataSource[0]) === null || _dataSource$ === void 0 ? void 0 : _dataSource$.id) !== null && _dataSource$0$id !== void 0 ? _dataSource$0$id : (_dataSource$2 = dataSource[0]) === null || _dataSource$2 === void 0 ? void 0 : _dataSource$2.key;
|
|
93
98
|
var initialActiveKey = value !== null && value !== void 0 ? value : showAllItem ? getDefaultActiveKey(dataSource, 'id') : firstCategoryKey !== undefined ? [firstCategoryKey] : [];
|
|
@@ -145,6 +150,16 @@ var PisellTabbar = function PisellTabbar(props, ref) {
|
|
|
145
150
|
_useState2 = _slicedToArray(_useState, 2),
|
|
146
151
|
isSearchOpen = _useState2[0],
|
|
147
152
|
setIsSearchOpen = _useState2[1];
|
|
153
|
+
useEffect(function () {
|
|
154
|
+
if (!scrollActiveItemIntoView || level1Value == null) return;
|
|
155
|
+
var animationFrame = requestAnimationFrame(function () {
|
|
156
|
+
var _level1TabsRef$curren, _level1TabsRef$curren2;
|
|
157
|
+
(_level1TabsRef$curren = level1TabsRef.current) === null || _level1TabsRef$curren === void 0 || (_level1TabsRef$curren2 = _level1TabsRef$curren.scrollItemByRowKey) === null || _level1TabsRef$curren2 === void 0 || _level1TabsRef$curren2.call(_level1TabsRef$curren, String(level1Value));
|
|
158
|
+
});
|
|
159
|
+
return function () {
|
|
160
|
+
return cancelAnimationFrame(animationFrame);
|
|
161
|
+
};
|
|
162
|
+
}, [level1Value, scrollActiveItemIntoView]);
|
|
148
163
|
|
|
149
164
|
/**
|
|
150
165
|
* 打开搜索模式
|
|
@@ -357,7 +372,7 @@ var PisellTabbar = function PisellTabbar(props, ref) {
|
|
|
357
372
|
*/
|
|
358
373
|
var level1DataSource = useMemo(function () {
|
|
359
374
|
var categoryItems = dataSource.length ? addDataSourceItemsByKey(dataSource, LEVEL_ADD_ITEMS.level1.filter(function (itemKey) {
|
|
360
|
-
return showAllItem || itemKey !== 'all';
|
|
375
|
+
return (showAllItem || itemKey !== 'all') && (showSearchItem || itemKey !== 'search');
|
|
361
376
|
})) : [];
|
|
362
377
|
var actionItems = (level1Actions || []).map(function (action, index) {
|
|
363
378
|
return {
|
|
@@ -378,7 +393,7 @@ var PisellTabbar = function PisellTabbar(props, ref) {
|
|
|
378
393
|
return isVertical ? full.filter(function (item) {
|
|
379
394
|
return (item === null || item === void 0 ? void 0 : item.key) !== 'expand';
|
|
380
395
|
}) : full;
|
|
381
|
-
}, [dataSource, isSearchOpen, isVertical, level1Actions, showAllItem]);
|
|
396
|
+
}, [dataSource, isSearchOpen, isVertical, level1Actions, showAllItem, showSearchItem]);
|
|
382
397
|
|
|
383
398
|
/**
|
|
384
399
|
* 渲染一级 Tab Item
|
|
@@ -646,6 +661,7 @@ var PisellTabbar = function PisellTabbar(props, ref) {
|
|
|
646
661
|
style: style,
|
|
647
662
|
ref: containerRef
|
|
648
663
|
}, /*#__PURE__*/React.createElement(SuperTabs, {
|
|
664
|
+
ref: level1TabsRef,
|
|
649
665
|
isControlled: true,
|
|
650
666
|
id: tabbarId,
|
|
651
667
|
className: classNames('pisell-tabbar__level', 'pisell-tabbar__level--1'),
|
|
@@ -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,11 +85,38 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
84
85
|
isControlled: isControlled ?? false
|
|
85
86
|
});
|
|
86
87
|
const scrollItemByRowKey = (key) => {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
var _a2, _b2, _c2;
|
|
89
|
+
const item = Array.from(
|
|
90
|
+
((_a2 = containerRef.current) == null ? void 0 : _a2.querySelectorAll(
|
|
91
|
+
"[data-pisell-super-tabs-key]"
|
|
92
|
+
)) || []
|
|
93
|
+
).find((element) => element.dataset.pisellSuperTabsKey === key);
|
|
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;
|
|
91
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
|
+
});
|
|
92
120
|
};
|
|
93
121
|
(0, import_react.useImperativeHandle)(ref, () => {
|
|
94
122
|
if (__designMode) {
|
|
@@ -140,7 +168,7 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
140
168
|
},
|
|
141
169
|
slotLeft
|
|
142
170
|
),
|
|
143
|
-
/* @__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(
|
|
144
172
|
import_PisellBasicGrid.default,
|
|
145
173
|
{
|
|
146
174
|
...gridProps,
|
|
@@ -180,6 +208,7 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
180
208
|
"div",
|
|
181
209
|
{
|
|
182
210
|
key,
|
|
211
|
+
"data-pisell-super-tabs-key": key,
|
|
183
212
|
className: (0, import_classnames.default)(
|
|
184
213
|
"pisell-super-tabs-item",
|
|
185
214
|
`pisell-super-tabs-item-${id}-${key}`,
|
|
@@ -81,10 +81,13 @@ var PisellTabbar = (props, ref) => {
|
|
|
81
81
|
searchProps,
|
|
82
82
|
level1Actions,
|
|
83
83
|
direction = "horizontal",
|
|
84
|
-
showAllItem = true
|
|
84
|
+
showAllItem = true,
|
|
85
|
+
showSearchItem = true,
|
|
86
|
+
scrollActiveItemIntoView = false
|
|
85
87
|
} = props;
|
|
86
88
|
const isVertical = direction === "vertical";
|
|
87
89
|
const containerRef = (0, import_react.useRef)(null);
|
|
90
|
+
const level1TabsRef = (0, import_react.useRef)(null);
|
|
88
91
|
const searchRef = (0, import_react.useRef)(null);
|
|
89
92
|
const firstCategoryKey = ((_a = dataSource[0]) == null ? void 0 : _a.id) ?? ((_b = dataSource[0]) == null ? void 0 : _b.key);
|
|
90
93
|
const initialActiveKey = value ?? (showAllItem ? (0, import_utils.getDefaultActiveKey)(dataSource, "id") : firstCategoryKey !== void 0 ? [firstCategoryKey] : []);
|
|
@@ -116,6 +119,14 @@ var PisellTabbar = (props, ref) => {
|
|
|
116
119
|
return getActiveKey(2);
|
|
117
120
|
}, [activeKey]);
|
|
118
121
|
const [isSearchOpen, setIsSearchOpen] = (0, import_react.useState)(false);
|
|
122
|
+
(0, import_react.useEffect)(() => {
|
|
123
|
+
if (!scrollActiveItemIntoView || level1Value == null) return;
|
|
124
|
+
const animationFrame = requestAnimationFrame(() => {
|
|
125
|
+
var _a2, _b2;
|
|
126
|
+
(_b2 = (_a2 = level1TabsRef.current) == null ? void 0 : _a2.scrollItemByRowKey) == null ? void 0 : _b2.call(_a2, String(level1Value));
|
|
127
|
+
});
|
|
128
|
+
return () => cancelAnimationFrame(animationFrame);
|
|
129
|
+
}, [level1Value, scrollActiveItemIntoView]);
|
|
119
130
|
const openSearchMode = () => {
|
|
120
131
|
setCacheActiveKey(activeKey);
|
|
121
132
|
_setActiveKey([]);
|
|
@@ -340,7 +351,7 @@ var PisellTabbar = (props, ref) => {
|
|
|
340
351
|
const categoryItems = dataSource.length ? (0, import_utils.addDataSourceItemsByKey)(
|
|
341
352
|
dataSource,
|
|
342
353
|
import_constants.LEVEL_ADD_ITEMS.level1.filter(
|
|
343
|
-
(itemKey) => showAllItem || itemKey !== "all"
|
|
354
|
+
(itemKey) => (showAllItem || itemKey !== "all") && (showSearchItem || itemKey !== "search")
|
|
344
355
|
)
|
|
345
356
|
) : [];
|
|
346
357
|
const actionItems = (level1Actions || []).map((action, index) => ({
|
|
@@ -356,7 +367,14 @@ var PisellTabbar = (props, ref) => {
|
|
|
356
367
|
}
|
|
357
368
|
return isVertical ? full.filter((item) => (item == null ? void 0 : item.key) !== "expand") : full;
|
|
358
369
|
},
|
|
359
|
-
[
|
|
370
|
+
[
|
|
371
|
+
dataSource,
|
|
372
|
+
isSearchOpen,
|
|
373
|
+
isVertical,
|
|
374
|
+
level1Actions,
|
|
375
|
+
showAllItem,
|
|
376
|
+
showSearchItem
|
|
377
|
+
]
|
|
360
378
|
);
|
|
361
379
|
const renderLevel1Item = (0, import_react.useCallback)(
|
|
362
380
|
(itemProps) => {
|
|
@@ -658,6 +676,7 @@ var PisellTabbar = (props, ref) => {
|
|
|
658
676
|
/* @__PURE__ */ import_react.default.createElement(
|
|
659
677
|
import_PisellSuperTabs.default,
|
|
660
678
|
{
|
|
679
|
+
ref: level1TabsRef,
|
|
661
680
|
isControlled: true,
|
|
662
681
|
id: tabbarId,
|
|
663
682
|
className: (0, import_classnames.default)(
|
|
@@ -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;
|