@pisell/materials 6.11.240 → 6.11.241
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/preview.js +4 -4
- package/build/lowcode/render/default/view.js +16 -16
- package/build/lowcode/view.js +15 -15
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/pisellFind/index.d.ts +2 -0
- package/es/components/pisellFind/index.js +11 -0
- package/es/components/pisellLookup/PisellLookup.js +22 -6
- package/es/components/pisellLookup/components/LookupResultHost.js +56 -38
- package/es/components/pisellLookup/components/LookupTrigger.js +2 -0
- package/es/components/pisellLookup/types.d.ts +36 -0
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/pisellFind/index.d.ts +2 -0
- package/lib/components/pisellFind/index.js +19 -0
- package/lib/components/pisellLookup/PisellLookup.js +18 -4
- package/lib/components/pisellLookup/components/LookupResultHost.js +50 -35
- package/lib/components/pisellLookup/components/LookupTrigger.js +2 -0
- package/lib/components/pisellLookup/types.d.ts +36 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -0
- package/package.json +3 -3
- 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.d.ts +0 -5
- package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
- package/es/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
- package/es/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/es/components/PisellTabbar/constants.d.ts +0 -47
- package/es/components/PisellTabbar/types.d.ts +0 -123
- package/es/components/buttonGroupPreview/index.d.ts +0 -19
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +0 -27
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +0 -89
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -14
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -64
- package/es/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +0 -49
- package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +0 -13
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +0 -84
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +0 -20
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
- package/es/components/pisellFloorMapLayout/index.d.ts +0 -39
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +0 -10
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +0 -22
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
- package/es/components/pisellFloorMapLayout/types.d.ts +0 -769
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +0 -27
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +0 -8
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +0 -11
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/es/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +0 -24
- 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/BookingCalendar.d.ts +0 -9
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +0 -34
- package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +0 -18
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +0 -30
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +0 -330
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +0 -52
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +0 -22
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +0 -57
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +0 -26
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
- package/es/components/pisellRecordBoard/types.d.ts +0 -899
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +0 -36
- package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -145
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
- package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -23
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -15
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +0 -23
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +0 -10
- package/es/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/es/components/productCard/lineItem/index.d.ts +0 -72
- package/es/components/productCard/lineItem/locales.d.ts +0 -38
- package/es/components/productCard/types.d.ts +0 -98
- 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/en-US.d.ts +0 -566
- 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.d.ts +0 -5
- package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
- package/lib/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
- package/lib/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
- package/lib/components/PisellTabbar/constants.d.ts +0 -47
- package/lib/components/PisellTabbar/types.d.ts +0 -123
- package/lib/components/buttonGroupPreview/index.d.ts +0 -19
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +0 -27
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +0 -89
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -14
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -64
- package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +0 -49
- package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +0 -13
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +0 -84
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +0 -20
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
- package/lib/components/pisellFloorMapLayout/index.d.ts +0 -39
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +0 -10
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +0 -22
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
- package/lib/components/pisellFloorMapLayout/types.d.ts +0 -769
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +0 -27
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +0 -8
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +0 -11
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/lib/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +0 -24
- 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/BookingCalendar.d.ts +0 -9
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +0 -34
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +0 -18
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +0 -30
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +0 -330
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +0 -52
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +0 -22
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +0 -57
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +0 -26
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
- package/lib/components/pisellRecordBoard/types.d.ts +0 -899
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +0 -36
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -145
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
- package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -23
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -15
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +0 -23
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +0 -10
- package/lib/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
- package/lib/components/productCard/lineItem/index.d.ts +0 -72
- package/lib/components/productCard/lineItem/locales.d.ts +0 -38
- package/lib/components/productCard/types.d.ts +0 -98
- 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/en-US.d.ts +0 -566
- 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
|
@@ -43,6 +43,7 @@ var import_PisellLookup = require("./PisellLookup.less");
|
|
|
43
43
|
var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
44
44
|
const {
|
|
45
45
|
// 触发器配置
|
|
46
|
+
showTrigger = true,
|
|
46
47
|
triggerType = "input",
|
|
47
48
|
trigger,
|
|
48
49
|
triggerText,
|
|
@@ -65,6 +66,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
65
66
|
onSearch,
|
|
66
67
|
searchMode = "realtime",
|
|
67
68
|
debounceTime = 300,
|
|
69
|
+
allowRepeatSearch = false,
|
|
68
70
|
// 扫码配置
|
|
69
71
|
showScan = true,
|
|
70
72
|
onScan,
|
|
@@ -91,9 +93,14 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
91
93
|
// 容器样式配置
|
|
92
94
|
modalWidth,
|
|
93
95
|
modalStyle,
|
|
96
|
+
modalCentered = false,
|
|
97
|
+
modalTransitionName,
|
|
94
98
|
getContainer,
|
|
95
99
|
drawerWidth,
|
|
100
|
+
drawerHeight,
|
|
96
101
|
drawerPlacement,
|
|
102
|
+
drawerTitle,
|
|
103
|
+
drawerClosable,
|
|
97
104
|
popupWidth,
|
|
98
105
|
containerStyle,
|
|
99
106
|
containerClassName,
|
|
@@ -109,6 +116,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
109
116
|
autoFocusOnOpen = true,
|
|
110
117
|
// 输入栏插槽
|
|
111
118
|
inputRender,
|
|
119
|
+
headerRender,
|
|
112
120
|
// 样式配置
|
|
113
121
|
className,
|
|
114
122
|
style,
|
|
@@ -223,7 +231,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
223
231
|
);
|
|
224
232
|
const handleConfirmSearch = (0, import_react.useCallback)(
|
|
225
233
|
(searchKeyword) => {
|
|
226
|
-
if (lastSearchKeywordRef.current === searchKeyword) {
|
|
234
|
+
if (!allowRepeatSearch && lastSearchKeywordRef.current === searchKeyword) {
|
|
227
235
|
return;
|
|
228
236
|
}
|
|
229
237
|
lastSearchKeywordRef.current = searchKeyword;
|
|
@@ -232,7 +240,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
232
240
|
}
|
|
233
241
|
onSearch == null ? void 0 : onSearch(searchKeyword);
|
|
234
242
|
},
|
|
235
|
-
[showHistory, addHistory, onSearch]
|
|
243
|
+
[allowRepeatSearch, showHistory, addHistory, onSearch]
|
|
236
244
|
);
|
|
237
245
|
(0, import_hooks.useDebounceSearch)({
|
|
238
246
|
keyword,
|
|
@@ -391,7 +399,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
391
399
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lookup-content" }, auxiliary, results);
|
|
392
400
|
};
|
|
393
401
|
if (displayType === "inline" || displayType === "popup") {
|
|
394
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lookup pisell-lookup-${displayType} ${className || ""}`, style }, renderTrigger(), /* @__PURE__ */ import_react.default.createElement(
|
|
402
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lookup pisell-lookup-${displayType} ${className || ""}`, style }, showTrigger ? renderTrigger() : null, /* @__PURE__ */ import_react.default.createElement(
|
|
395
403
|
import_components.LookupResultHost,
|
|
396
404
|
{
|
|
397
405
|
displayType,
|
|
@@ -405,7 +413,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
405
413
|
renderContent()
|
|
406
414
|
));
|
|
407
415
|
}
|
|
408
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lookup ${className || ""}`, style }, renderTrigger(), /* @__PURE__ */ import_react.default.createElement(
|
|
416
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `pisell-lookup ${className || ""}`, style }, showTrigger ? renderTrigger() : null, /* @__PURE__ */ import_react.default.createElement(
|
|
409
417
|
import_components.LookupResultHost,
|
|
410
418
|
{
|
|
411
419
|
displayType,
|
|
@@ -413,9 +421,14 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
413
421
|
onClose: close,
|
|
414
422
|
modalWidth,
|
|
415
423
|
modalStyle,
|
|
424
|
+
modalCentered,
|
|
425
|
+
modalTransitionName,
|
|
416
426
|
getContainer,
|
|
417
427
|
drawerWidth,
|
|
428
|
+
drawerHeight,
|
|
418
429
|
drawerPlacement,
|
|
430
|
+
drawerTitle,
|
|
431
|
+
drawerClosable,
|
|
419
432
|
containerStyle,
|
|
420
433
|
containerClassName,
|
|
421
434
|
mask,
|
|
@@ -423,6 +436,7 @@ var PisellLookupComponent = (0, import_react.forwardRef)((props, ref) => {
|
|
|
423
436
|
zIndex,
|
|
424
437
|
onAfterOpen: handleAfterOpen
|
|
425
438
|
},
|
|
439
|
+
displayType === "modal" || displayType === "drawer" ? typeof headerRender === "function" ? headerRender() : headerRender : null,
|
|
426
440
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lookup-search-area-with-close" }, /* @__PURE__ */ import_react.default.createElement(
|
|
427
441
|
import_components.LookupTrigger,
|
|
428
442
|
{
|
|
@@ -34,8 +34,8 @@ __export(LookupResultHost_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(LookupResultHost_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_antd = require("antd");
|
|
37
|
-
var import_icons = require("@ant-design/icons");
|
|
38
37
|
var import_locales = require("../../../locales");
|
|
38
|
+
var import_pisellContainer = __toESM(require("../../pisellContainer"));
|
|
39
39
|
var LookupResultHost = (props) => {
|
|
40
40
|
const {
|
|
41
41
|
displayType,
|
|
@@ -44,9 +44,14 @@ var LookupResultHost = (props) => {
|
|
|
44
44
|
children,
|
|
45
45
|
modalWidth = 834,
|
|
46
46
|
modalStyle,
|
|
47
|
+
modalCentered = false,
|
|
48
|
+
modalTransitionName,
|
|
47
49
|
getContainer,
|
|
48
50
|
drawerWidth = 378,
|
|
51
|
+
drawerHeight,
|
|
49
52
|
drawerPlacement = "right",
|
|
53
|
+
drawerTitle = (0, import_locales.getText)("pisell-lookup-confirm-button-text"),
|
|
54
|
+
drawerClosable = true,
|
|
50
55
|
popupWidth,
|
|
51
56
|
containerStyle,
|
|
52
57
|
containerClassName,
|
|
@@ -109,26 +114,32 @@ var LookupResultHost = (props) => {
|
|
|
109
114
|
].filter(Boolean).join(" ");
|
|
110
115
|
const wrapClassName = hasCustomContainer ? "pisell-lookup-modal-custom-container" : "";
|
|
111
116
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
-
|
|
117
|
+
import_pisellContainer.default,
|
|
113
118
|
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
119
|
+
renderType: "modal",
|
|
120
|
+
props: {
|
|
121
|
+
open: visible,
|
|
122
|
+
onCancel: onClose,
|
|
123
|
+
footer: null,
|
|
124
|
+
header: false,
|
|
125
|
+
closable: false,
|
|
126
|
+
width: modalWidth,
|
|
127
|
+
centered: modalCentered,
|
|
128
|
+
transitionName: modalTransitionName,
|
|
129
|
+
style: { top: 0, ...modalStyle },
|
|
130
|
+
getContainer,
|
|
131
|
+
mask,
|
|
132
|
+
maskClosable: effectiveMaskClosable,
|
|
133
|
+
zIndex,
|
|
134
|
+
rootClassName: modalRootClassName,
|
|
135
|
+
className: modalClassName,
|
|
136
|
+
wrapClassName,
|
|
137
|
+
destroyOnClose: true,
|
|
138
|
+
title: null,
|
|
139
|
+
afterOpenChange: (open) => {
|
|
140
|
+
if (open && onAfterOpen) {
|
|
141
|
+
onAfterOpen();
|
|
142
|
+
}
|
|
132
143
|
}
|
|
133
144
|
}
|
|
134
145
|
},
|
|
@@ -139,22 +150,26 @@ var LookupResultHost = (props) => {
|
|
|
139
150
|
const effectiveMaskClosable = mask ? maskClosable : false;
|
|
140
151
|
const drawerClassName = `pisell-lookup-drawer-container ${!mask ? "pisell-lookup-drawer-no-mask" : ""} ${containerClassName || ""}`;
|
|
141
152
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
142
|
-
|
|
153
|
+
import_pisellContainer.default,
|
|
143
154
|
{
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
renderType: "drawer",
|
|
156
|
+
props: {
|
|
157
|
+
open: visible,
|
|
158
|
+
onClose,
|
|
159
|
+
width: drawerWidth,
|
|
160
|
+
height: drawerHeight,
|
|
161
|
+
placement: drawerPlacement,
|
|
162
|
+
mask,
|
|
163
|
+
maskClosable: effectiveMaskClosable,
|
|
164
|
+
zIndex,
|
|
165
|
+
className: drawerClassName,
|
|
166
|
+
closable: drawerClosable,
|
|
167
|
+
destroyOnClose: true,
|
|
168
|
+
title: drawerTitle,
|
|
169
|
+
afterOpenChange: (open) => {
|
|
170
|
+
if (open && onAfterOpen) {
|
|
171
|
+
onAfterOpen();
|
|
172
|
+
}
|
|
158
173
|
}
|
|
159
174
|
}
|
|
160
175
|
},
|
|
@@ -84,6 +84,11 @@ export interface LookupInputRenderContext {
|
|
|
84
84
|
* PisellLookup 组件 Props
|
|
85
85
|
*/
|
|
86
86
|
export interface PisellLookupProps {
|
|
87
|
+
/**
|
|
88
|
+
* 是否渲染外部触发器;受控打开浮层时可关闭。
|
|
89
|
+
* @default true
|
|
90
|
+
*/
|
|
91
|
+
showTrigger?: boolean;
|
|
87
92
|
/**
|
|
88
93
|
* 预设触发器类型(与 trigger 互斥)
|
|
89
94
|
* @default 'input'
|
|
@@ -189,6 +194,12 @@ export interface PisellLookupProps {
|
|
|
189
194
|
* @param keyword 搜索关键词
|
|
190
195
|
*/
|
|
191
196
|
onSearch?: (keyword: string) => void;
|
|
197
|
+
/**
|
|
198
|
+
* 是否允许重复确认同一个关键词。
|
|
199
|
+
* 适用于提交失败后需要原值重试的场景;默认保持去重行为。
|
|
200
|
+
* @default false
|
|
201
|
+
*/
|
|
202
|
+
allowRepeatSearch?: boolean;
|
|
192
203
|
/**
|
|
193
204
|
* 是否显示扫码按钮
|
|
194
205
|
* @default true
|
|
@@ -299,6 +310,13 @@ export interface PisellLookupProps {
|
|
|
299
310
|
* Modal 自定义样式
|
|
300
311
|
*/
|
|
301
312
|
modalStyle?: React.CSSProperties;
|
|
313
|
+
/**
|
|
314
|
+
* Modal 是否使用容器原生的垂直居中布局。
|
|
315
|
+
* @default false
|
|
316
|
+
*/
|
|
317
|
+
modalCentered?: boolean;
|
|
318
|
+
/** Modal 进出场动画名称。 */
|
|
319
|
+
modalTransitionName?: string;
|
|
302
320
|
/**
|
|
303
321
|
* Modal 挂载节点
|
|
304
322
|
* - HTMLElement: 挂载到指定的 DOM 节点
|
|
@@ -313,11 +331,17 @@ export interface PisellLookupProps {
|
|
|
313
331
|
* @default 378
|
|
314
332
|
*/
|
|
315
333
|
drawerWidth?: number | string;
|
|
334
|
+
/** Drawer 高度;placement 为 top / bottom 时生效。 */
|
|
335
|
+
drawerHeight?: number | string;
|
|
316
336
|
/**
|
|
317
337
|
* Drawer 位置
|
|
318
338
|
* @default 'right'
|
|
319
339
|
*/
|
|
320
340
|
drawerPlacement?: DrawerPlacement;
|
|
341
|
+
/** Drawer 标题;传 null 可隐藏默认标题。 */
|
|
342
|
+
drawerTitle?: React.ReactNode | null;
|
|
343
|
+
/** 是否展示 Drawer 自带关闭按钮。 */
|
|
344
|
+
drawerClosable?: boolean;
|
|
321
345
|
/**
|
|
322
346
|
* Popup 宽度
|
|
323
347
|
*/
|
|
@@ -394,6 +418,8 @@ export interface PisellLookupProps {
|
|
|
394
418
|
* ```
|
|
395
419
|
*/
|
|
396
420
|
inputRender?: (ctx: LookupInputRenderContext) => React.ReactNode;
|
|
421
|
+
/** Modal / Drawer 内置搜索栏上方的自定义内容。 */
|
|
422
|
+
headerRender?: React.ReactNode | (() => React.ReactNode);
|
|
397
423
|
/**
|
|
398
424
|
* 自定义类名
|
|
399
425
|
*/
|
|
@@ -631,6 +657,10 @@ export interface LookupResultHostProps {
|
|
|
631
657
|
* Modal 宽度
|
|
632
658
|
*/
|
|
633
659
|
modalWidth?: number | string;
|
|
660
|
+
/** Modal 是否垂直居中 */
|
|
661
|
+
modalCentered?: boolean;
|
|
662
|
+
/** Modal 进出场动画名称 */
|
|
663
|
+
modalTransitionName?: string;
|
|
634
664
|
/**
|
|
635
665
|
* Modal 样式
|
|
636
666
|
*/
|
|
@@ -643,10 +673,16 @@ export interface LookupResultHostProps {
|
|
|
643
673
|
* Drawer 宽度
|
|
644
674
|
*/
|
|
645
675
|
drawerWidth?: number | string;
|
|
676
|
+
/** Drawer 高度 */
|
|
677
|
+
drawerHeight?: number | string;
|
|
646
678
|
/**
|
|
647
679
|
* Drawer 位置
|
|
648
680
|
*/
|
|
649
681
|
drawerPlacement?: DrawerPlacement;
|
|
682
|
+
/** Drawer 标题 */
|
|
683
|
+
drawerTitle?: React.ReactNode | null;
|
|
684
|
+
/** 是否展示 Drawer 自带关闭按钮 */
|
|
685
|
+
drawerClosable?: boolean;
|
|
650
686
|
/**
|
|
651
687
|
* Popup 宽度
|
|
652
688
|
*/
|
package/lib/index.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ export { default as PisellUpload } from './components/pisellUpload';
|
|
|
128
128
|
export { default as Translation } from './components/translation';
|
|
129
129
|
export { PisellLookup } from './components/pisellLookup';
|
|
130
130
|
export type { PisellLookupProps, PisellLookupRef, LookupInputRenderContext, } from './components/pisellLookup';
|
|
131
|
-
export { PisellFind } from './components/pisellFind';
|
|
131
|
+
export { FIND_FALLBACK_SCANNER_COUNT_KEY, PisellFind, } from './components/pisellFind';
|
|
132
132
|
export type { PisellFindProps, PisellFindRef } from './components/pisellFind';
|
|
133
133
|
export { default as DataSourceForm } from './components/dataSourceComponents/dataSourceForm';
|
|
134
134
|
export { default as FormGroup } from './components/dataSourceComponents/dataSourceForm/group';
|
package/lib/index.js
CHANGED
|
@@ -80,6 +80,7 @@ __export(src_exports, {
|
|
|
80
80
|
Dropdown: () => import_dropdown.default,
|
|
81
81
|
EMPTY_FLOOR_MAP_LAYOUT_CONTEXT: () => import_pisellFloorMapLayout.EMPTY_FLOOR_MAP_LAYOUT_CONTEXT,
|
|
82
82
|
Empty: () => import_antd.Empty,
|
|
83
|
+
FIND_FALLBACK_SCANNER_COUNT_KEY: () => import_pisellFind.FIND_FALLBACK_SCANNER_COUNT_KEY,
|
|
83
84
|
FLOOR_MAP_BUILTIN_SHAPES: () => import_pisellFloorMapLayout.FLOOR_MAP_BUILTIN_SHAPES,
|
|
84
85
|
FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND: () => import_pisellFloorMapLayout.FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND,
|
|
85
86
|
FLOOR_MAP_IMAGE_ELEMENT_KIND: () => import_pisellFloorMapLayout.FLOOR_MAP_IMAGE_ELEMENT_KIND,
|
|
@@ -590,6 +591,7 @@ var import_walletCard = __toESM(require("./components/walletCard"));
|
|
|
590
591
|
Dropdown,
|
|
591
592
|
EMPTY_FLOOR_MAP_LAYOUT_CONTEXT,
|
|
592
593
|
Empty,
|
|
594
|
+
FIND_FALLBACK_SCANNER_COUNT_KEY,
|
|
593
595
|
FLOOR_MAP_BUILTIN_SHAPES,
|
|
594
596
|
FLOOR_MAP_BUILTIN_SHAPE_ELEMENT_KIND,
|
|
595
597
|
FLOOR_MAP_IMAGE_ELEMENT_KIND,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.241",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"antd-mobile": "^5.38.1",
|
|
97
97
|
"vod-js-sdk-v6": "^1.4.11",
|
|
98
98
|
"@pisell/date-picker": "3.0.10",
|
|
99
|
-
"@pisell/
|
|
100
|
-
"@pisell/
|
|
99
|
+
"@pisell/utils": "3.0.4",
|
|
100
|
+
"@pisell/icon": "0.0.11"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"react": "^18.0.0",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { PisellGroupViewProps } from './types';
|
|
3
|
-
import './PisellGroupView.less';
|
|
4
|
-
/**
|
|
5
|
-
* 使用 memo 优化性能:props 未变化时跳过重渲染
|
|
6
|
-
*/
|
|
7
|
-
declare const MemoizedPisellGroupView: <T>(props: PisellGroupViewProps<T>) => React.JSX.Element;
|
|
8
|
-
export { MemoizedPisellGroupView as PisellGroupView };
|
|
9
|
-
export default MemoizedPisellGroupView;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import PisellGroupView from './PisellGroupView';
|
|
3
|
-
/**
|
|
4
|
-
* PisellGroupView 分组展示组件
|
|
5
|
-
*
|
|
6
|
-
* 通用、数据无关的「分组展示容器」:先按条件把列表分组,
|
|
7
|
-
* 再为每个分组渲染 头部 / 统计 / 主体 / 操作 四块,各块均可自定义渲染。
|
|
8
|
-
*/
|
|
9
|
-
declare const meta: Meta<typeof PisellGroupView>;
|
|
10
|
-
export default meta;
|
|
11
|
-
declare type Story = StoryObj<typeof PisellGroupView>;
|
|
12
|
-
/**
|
|
13
|
-
* 基础用法:按「商品 + 时间」组合分组,展示四块结构
|
|
14
|
-
*/
|
|
15
|
-
export declare const Basic: Story;
|
|
16
|
-
/**
|
|
17
|
-
* 单字段分组 + 主体多列布局(itemLayout 对象,内部使用 PisellBasicGrid)
|
|
18
|
-
*/
|
|
19
|
-
export declare const GridBody: Story;
|
|
20
|
-
/**
|
|
21
|
-
* 利用 ItemContext.groupKeys 在主体卡片中省略「头部已展示」的字段
|
|
22
|
-
*/
|
|
23
|
-
export declare const OmitHeaderFields: Story;
|
|
24
|
-
/**
|
|
25
|
-
* 空数据态
|
|
26
|
-
*/
|
|
27
|
-
export declare const Empty: Story;
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import type { GroupKey, GroupResult } from '@pisell/utils';
|
|
3
|
-
/**
|
|
4
|
-
* 单个分组的数据模型
|
|
5
|
-
* @template T - 数据项类型
|
|
6
|
-
* @description 复用 `@pisell/utils` 的 `GroupResult`,包含 groupId、keys、keyMap、items 等
|
|
7
|
-
*/
|
|
8
|
-
export declare type GroupModel<T> = GroupResult<T>;
|
|
9
|
-
/**
|
|
10
|
-
* 主体(第三块)渲染单条数据时的上下文
|
|
11
|
-
* @template T - 数据项类型
|
|
12
|
-
*/
|
|
13
|
-
export interface ItemContext<T> {
|
|
14
|
-
/** 当前数据所属分组 */
|
|
15
|
-
group: GroupModel<T>;
|
|
16
|
-
/** 当前数据在分组内的下标 */
|
|
17
|
-
index: number;
|
|
18
|
-
/**
|
|
19
|
-
* 参与分组的字段名列表
|
|
20
|
-
* @description
|
|
21
|
-
* 调用方可据此在卡片中省略「头部已展示」的字段,避免重复展示。
|
|
22
|
-
* 当使用自定义函数分组时,该数组为空。
|
|
23
|
-
*/
|
|
24
|
-
groupKeys: string[];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* 主体(第三块)的布局配置
|
|
28
|
-
* @description
|
|
29
|
-
* - `'stack'`:纵向堆叠每条卡片(默认)
|
|
30
|
-
* - 对象:透传给内部 `PisellBasicGrid` 实现多列/横向布局
|
|
31
|
-
*/
|
|
32
|
-
export declare type ItemLayout = 'stack' | {
|
|
33
|
-
/** 一行显示的卡片数 */
|
|
34
|
-
columns?: number;
|
|
35
|
-
/** 卡片间距 */
|
|
36
|
-
gap?: number | string;
|
|
37
|
-
/** 排列方向 */
|
|
38
|
-
direction?: 'horizontal' | 'vertical';
|
|
39
|
-
/** 是否换行 */
|
|
40
|
-
wrap?: 'wrap' | 'nowrap';
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* 一个分组渲染出的四块内容
|
|
44
|
-
* @description 透传给 `renderGroup`,便于调用方自定义整组容器但复用四块默认内容
|
|
45
|
-
*/
|
|
46
|
-
export interface GroupBlocks {
|
|
47
|
-
/** ① 头部:分组条件对应的相同信息 */
|
|
48
|
-
header: ReactNode;
|
|
49
|
-
/** ② 统计栏:来自分组数据的统计信息 */
|
|
50
|
-
stats: ReactNode;
|
|
51
|
-
/** ③ 主体:分组内所有条目(卡片) */
|
|
52
|
-
body: ReactNode;
|
|
53
|
-
/** ④ 操作区:批量操作 */
|
|
54
|
-
actions: ReactNode;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* 多端 variant
|
|
58
|
-
* @description 仅用于在根节点追加 `--${variant}` class,由 Less 控制展示差异
|
|
59
|
-
*/
|
|
60
|
-
export declare type GroupViewVariant = 'desktop' | 'tablet' | 'pos' | 'phone';
|
|
61
|
-
/**
|
|
62
|
-
* PisellGroupView 组件 Props
|
|
63
|
-
* @template T - 数据项类型
|
|
64
|
-
* @description
|
|
65
|
-
* 通用、数据无关的「分组展示容器」:先按 `groupBy` 将 `dataSource` 分组,
|
|
66
|
-
* 再为每个分组渲染头部 / 统计 / 主体 / 操作四块,各块均可由外部自定义渲染。
|
|
67
|
-
*/
|
|
68
|
-
export interface PisellGroupViewProps<T = unknown> {
|
|
69
|
-
/** 数据源(应为外部已映射好的列表) */
|
|
70
|
-
dataSource: T[];
|
|
71
|
-
/**
|
|
72
|
-
* 分组规则
|
|
73
|
-
* @description
|
|
74
|
-
* - `string`:单字段路径,支持 `'a.b.c'` 点路径
|
|
75
|
-
* - `string[]`:多字段组合(如 `['productId', 'time']`)
|
|
76
|
-
* - `(item, index) => GroupKey | GroupKey[]`:完全自定义
|
|
77
|
-
*/
|
|
78
|
-
groupBy: string | string[] | ((item: T, index: number) => GroupKey | GroupKey[]);
|
|
79
|
-
/** 自定义分组 id 生成,默认各键以 `|` 拼接 */
|
|
80
|
-
getGroupId?: (keys: GroupKey[]) => string;
|
|
81
|
-
/** 分组之间的排序;不传保持首次出现顺序 */
|
|
82
|
-
sortGroups?: (a: GroupModel<T>, b: GroupModel<T>) => number;
|
|
83
|
-
/** 分组内数据项的排序;不传保持原始相对顺序 */
|
|
84
|
-
sortItems?: (a: T, b: T) => number;
|
|
85
|
-
/** ① 头部:分组条件对应的相同信息(时间、商品名、客户等) */
|
|
86
|
-
renderHeader?: (group: GroupModel<T>) => ReactNode;
|
|
87
|
-
/** ② 统计栏:可自定义展示,数据来源于分组后的数据 */
|
|
88
|
-
renderStats?: (group: GroupModel<T>) => ReactNode;
|
|
89
|
-
/** ③ 主体:渲染分组内的单条数据为卡片 */
|
|
90
|
-
renderItem?: (item: T, ctx: ItemContext<T>) => ReactNode;
|
|
91
|
-
/** ④ 操作区:批量操作(加时、编辑等) */
|
|
92
|
-
renderActions?: (group: GroupModel<T>) => ReactNode;
|
|
93
|
-
/**
|
|
94
|
-
* 主体布局
|
|
95
|
-
* @default 'stack'
|
|
96
|
-
*/
|
|
97
|
-
itemLayout?: ItemLayout;
|
|
98
|
-
/**
|
|
99
|
-
* 自定义主体容器
|
|
100
|
-
* @param group - 当前分组
|
|
101
|
-
* @param defaultBody - 组件按 `itemLayout` + `renderItem` 渲染出的默认主体
|
|
102
|
-
*/
|
|
103
|
-
renderBody?: (group: GroupModel<T>, defaultBody: ReactNode) => ReactNode;
|
|
104
|
-
/**
|
|
105
|
-
* 自定义整组容器
|
|
106
|
-
* @param group - 当前分组
|
|
107
|
-
* @param blocks - 四块默认内容(header/stats/body/actions)
|
|
108
|
-
* @description 提供后将完全接管单个分组的结构,调用方可自由编排四块顺序与包裹
|
|
109
|
-
*/
|
|
110
|
-
renderGroup?: (group: GroupModel<T>, blocks: GroupBlocks) => ReactNode;
|
|
111
|
-
/** 数据源为空时的渲染 */
|
|
112
|
-
renderEmpty?: () => ReactNode;
|
|
113
|
-
/**
|
|
114
|
-
* 主体内单条卡片的 key
|
|
115
|
-
* @description 不传时使用 index(仅在列表无增删改时安全)
|
|
116
|
-
*/
|
|
117
|
-
rowKey?: string | ((item: T, index: number) => string);
|
|
118
|
-
/** 多端 variant,仅追加根节点 class */
|
|
119
|
-
variant?: GroupViewVariant;
|
|
120
|
-
/** 自定义类名 */
|
|
121
|
-
className?: string;
|
|
122
|
-
/** 自定义样式 */
|
|
123
|
-
style?: CSSProperties;
|
|
124
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { PisellGroupViewProps } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* 组件样式前缀
|
|
4
|
-
*/
|
|
5
|
-
export declare const COMPONENT_PREFIX = "pisell-group-view";
|
|
6
|
-
/**
|
|
7
|
-
* 解析参与分组的字段名列表
|
|
8
|
-
* @param groupBy - 组件的 groupBy 配置
|
|
9
|
-
* @returns 字段名数组;自定义函数分组时返回空数组
|
|
10
|
-
* @description 用于透传给 `renderItem`,让调用方据此省略头部已展示的字段
|
|
11
|
-
*/
|
|
12
|
-
export declare const getGroupFieldNames: <T>(groupBy: string | string[] | ((item: T, index: number) => any)) => string[];
|
|
13
|
-
/**
|
|
14
|
-
* 获取主体内单条数据的稳定 key
|
|
15
|
-
* @param item - 数据项
|
|
16
|
-
* @param index - 索引
|
|
17
|
-
* @param rowKey - rowKey 配置
|
|
18
|
-
* @returns key 字符串
|
|
19
|
-
*/
|
|
20
|
-
export declare const resolveItemKey: <T>(item: T, index: number, rowKey?: string | ((item: T, index: number) => string) | undefined) => string;
|