@pisell/materials 6.11.239 → 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.
Files changed (198) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/preview.js +4 -4
  6. package/build/lowcode/render/default/view.js +16 -16
  7. package/build/lowcode/view.js +15 -15
  8. package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +2 -0
  9. package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +47 -22
  10. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  11. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  12. package/es/components/pisellFind/index.d.ts +2 -0
  13. package/es/components/pisellFind/index.js +11 -0
  14. package/es/components/pisellLookup/PisellLookup.js +22 -6
  15. package/es/components/pisellLookup/components/LookupResultHost.js +56 -38
  16. package/es/components/pisellLookup/components/LookupTrigger.js +2 -0
  17. package/es/components/pisellLookup/types.d.ts +36 -0
  18. package/es/index.d.ts +1 -1
  19. package/es/index.js +1 -1
  20. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +2 -0
  21. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +71 -35
  22. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  23. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  24. package/lib/components/pisellFind/index.d.ts +2 -0
  25. package/lib/components/pisellFind/index.js +19 -0
  26. package/lib/components/pisellLookup/PisellLookup.js +18 -4
  27. package/lib/components/pisellLookup/components/LookupResultHost.js +50 -35
  28. package/lib/components/pisellLookup/components/LookupTrigger.js +2 -0
  29. package/lib/components/pisellLookup/types.d.ts +36 -0
  30. package/lib/index.d.ts +1 -1
  31. package/lib/index.js +2 -0
  32. package/package.json +3 -3
  33. package/es/components/PisellGroupView/PisellGroupView.d.ts +0 -9
  34. package/es/components/PisellGroupView/PisellGroupView.stories.d.ts +0 -27
  35. package/es/components/PisellGroupView/index.d.ts +0 -6
  36. package/es/components/PisellGroupView/types.d.ts +0 -124
  37. package/es/components/PisellGroupView/utils/index.d.ts +0 -20
  38. package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  39. package/es/components/PisellScrollView/PisellScrollView.d.ts +0 -5
  40. package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
  41. package/es/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
  42. package/es/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
  43. package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
  44. package/es/components/PisellTabbar/constants.d.ts +0 -47
  45. package/es/components/PisellTabbar/types.d.ts +0 -119
  46. package/es/components/buttonGroupPreview/index.d.ts +0 -19
  47. package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
  48. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
  49. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
  50. package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +0 -27
  51. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +0 -89
  52. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -14
  53. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -64
  54. package/es/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +0 -49
  55. package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +0 -13
  56. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +0 -84
  57. package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +0 -20
  58. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
  59. package/es/components/pisellFloorMapLayout/index.d.ts +0 -39
  60. package/es/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
  61. package/es/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
  62. package/es/components/pisellFloorMapLayout/locales.d.ts +0 -969
  63. package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +0 -10
  64. package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +0 -22
  65. package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
  66. package/es/components/pisellFloorMapLayout/types.d.ts +0 -769
  67. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +0 -27
  68. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +0 -8
  69. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +0 -11
  70. package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
  71. package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
  72. package/es/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +0 -24
  73. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
  74. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
  75. package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +0 -9
  76. package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
  77. package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +0 -34
  78. package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
  79. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +0 -18
  80. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +0 -30
  81. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
  82. package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
  83. package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +0 -330
  84. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +0 -52
  85. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +0 -22
  86. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +0 -57
  87. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +0 -26
  88. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
  89. package/es/components/pisellRecordBoard/types.d.ts +0 -899
  90. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
  91. package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +0 -36
  92. package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -145
  93. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
  94. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
  95. package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
  96. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
  97. package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -23
  98. package/es/components/productCard/cartSkuCard/index.d.ts +0 -15
  99. package/es/components/productCard/lineItem/BookingLineItem.d.ts +0 -23
  100. package/es/components/productCard/lineItem/components/Holders/index.d.ts +0 -10
  101. package/es/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
  102. package/es/components/productCard/lineItem/index.d.ts +0 -72
  103. package/es/components/productCard/lineItem/locales.d.ts +0 -38
  104. package/es/components/productCard/types.d.ts +0 -98
  105. package/es/components/select-time/RightPanel/index.d.ts +0 -10
  106. package/es/components/select-time/index.d.ts +0 -16
  107. package/es/components/table/hooks/useTableSetting.d.ts +0 -21
  108. package/es/components/virtual-keyboard/Time/index.d.ts +0 -14
  109. package/es/components/virtual-keyboard/index.d.ts +0 -25
  110. package/es/hooks/useTranslationOriginal.d.ts +0 -4
  111. package/es/locales/en-US.d.ts +0 -566
  112. package/es/locales/ja.d.ts +0 -534
  113. package/es/locales/pt.d.ts +0 -534
  114. package/es/locales/zh-CN.d.ts +0 -561
  115. package/es/locales/zh-TW.d.ts +0 -561
  116. package/lib/components/PisellGroupView/PisellGroupView.d.ts +0 -9
  117. package/lib/components/PisellGroupView/PisellGroupView.stories.d.ts +0 -27
  118. package/lib/components/PisellGroupView/index.d.ts +0 -6
  119. package/lib/components/PisellGroupView/types.d.ts +0 -124
  120. package/lib/components/PisellGroupView/utils/index.d.ts +0 -20
  121. package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  122. package/lib/components/PisellScrollView/PisellScrollView.d.ts +0 -5
  123. package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
  124. package/lib/components/PisellScrollView/hooks/useScrollState.d.ts +0 -13
  125. package/lib/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
  126. package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +0 -8
  127. package/lib/components/PisellTabbar/constants.d.ts +0 -47
  128. package/lib/components/PisellTabbar/types.d.ts +0 -119
  129. package/lib/components/buttonGroupPreview/index.d.ts +0 -19
  130. package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
  131. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -22
  132. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
  133. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +0 -27
  134. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +0 -89
  135. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -14
  136. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +0 -64
  137. package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +0 -49
  138. package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +0 -13
  139. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +0 -84
  140. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +0 -20
  141. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
  142. package/lib/components/pisellFloorMapLayout/index.d.ts +0 -39
  143. package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
  144. package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
  145. package/lib/components/pisellFloorMapLayout/locales.d.ts +0 -969
  146. package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +0 -10
  147. package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +0 -22
  148. package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +0 -80
  149. package/lib/components/pisellFloorMapLayout/types.d.ts +0 -769
  150. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +0 -27
  151. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +0 -8
  152. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +0 -11
  153. package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
  154. package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
  155. package/lib/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +0 -24
  156. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
  157. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
  158. package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +0 -9
  159. package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
  160. package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +0 -34
  161. package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts +0 -102
  162. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +0 -18
  163. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +0 -30
  164. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
  165. package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +0 -32
  166. package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +0 -330
  167. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +0 -52
  168. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +0 -22
  169. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +0 -57
  170. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +0 -26
  171. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +0 -14
  172. package/lib/components/pisellRecordBoard/types.d.ts +0 -899
  173. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
  174. package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +0 -36
  175. package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -145
  176. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
  177. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -36
  178. package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
  179. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -22
  180. package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +0 -23
  181. package/lib/components/productCard/cartSkuCard/index.d.ts +0 -15
  182. package/lib/components/productCard/lineItem/BookingLineItem.d.ts +0 -23
  183. package/lib/components/productCard/lineItem/components/Holders/index.d.ts +0 -10
  184. package/lib/components/productCard/lineItem/components/Resources/index.d.ts +0 -7
  185. package/lib/components/productCard/lineItem/index.d.ts +0 -72
  186. package/lib/components/productCard/lineItem/locales.d.ts +0 -38
  187. package/lib/components/productCard/types.d.ts +0 -98
  188. package/lib/components/select-time/RightPanel/index.d.ts +0 -10
  189. package/lib/components/select-time/index.d.ts +0 -16
  190. package/lib/components/table/hooks/useTableSetting.d.ts +0 -21
  191. package/lib/components/virtual-keyboard/Time/index.d.ts +0 -14
  192. package/lib/components/virtual-keyboard/index.d.ts +0 -25
  193. package/lib/hooks/useTranslationOriginal.d.ts +0 -4
  194. package/lib/locales/en-US.d.ts +0 -566
  195. package/lib/locales/ja.d.ts +0 -534
  196. package/lib/locales/pt.d.ts +0 -534
  197. package/lib/locales/zh-CN.d.ts +0 -561
  198. package/lib/locales/zh-TW.d.ts +0 -561
@@ -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
- import_antd.Modal,
117
+ import_pisellContainer.default,
113
118
  {
114
- open: visible,
115
- onCancel: onClose,
116
- footer: null,
117
- width: modalWidth,
118
- style: { top: 0, ...modalStyle },
119
- getContainer,
120
- mask,
121
- maskClosable: effectiveMaskClosable,
122
- zIndex,
123
- rootClassName: modalRootClassName,
124
- className: modalClassName,
125
- wrapClassName,
126
- closeIcon: null,
127
- destroyOnClose: true,
128
- title: null,
129
- afterOpenChange: (open) => {
130
- if (open && onAfterOpen) {
131
- onAfterOpen();
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
- import_antd.Drawer,
153
+ import_pisellContainer.default,
143
154
  {
144
- open: visible,
145
- onClose,
146
- width: drawerWidth,
147
- placement: drawerPlacement,
148
- mask,
149
- maskClosable: effectiveMaskClosable,
150
- zIndex,
151
- className: drawerClassName,
152
- closeIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null),
153
- destroyOnClose: true,
154
- title: (0, import_locales.getText)("pisell-lookup-confirm-button-text"),
155
- afterOpenChange: (open) => {
156
- if (open && onAfterOpen) {
157
- onAfterOpen();
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
  },
@@ -196,6 +196,8 @@ var LookupTriggerComponent = (0, import_react.forwardRef)(
196
196
  {
197
197
  type: "primary",
198
198
  size,
199
+ loading,
200
+ disabled,
199
201
  onClick: handleConfirm,
200
202
  className: "pisell-lookup-input-confirm"
201
203
  },
@@ -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.239",
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/icon": "0.0.11",
100
- "@pisell/utils": "3.0.4"
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,6 +0,0 @@
1
- /**
2
- * PisellGroupView 组件导出
3
- * @description 通用、数据无关的分组展示容器
4
- */
5
- export { PisellGroupView, default } from './PisellGroupView';
6
- export type { PisellGroupViewProps, GroupModel, GroupBlocks, ItemContext, ItemLayout, GroupViewVariant, } from './types';
@@ -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;
@@ -1,163 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import PisellProcedure from './PisellProcedure';
3
- /**
4
- * PisellProcedure 流程容器组件
5
- *
6
- * 用于管理多步骤流程的复合容器组件,基于 PisellLayout 实现三段式布局
7
- * 包含头部区域(步骤条)、主体区域(内容区+信息区)、底部区域(操作按钮)
8
- */
9
- declare const meta: Meta<typeof PisellProcedure>;
10
- export default meta;
11
- declare type Story = StoryObj<typeof PisellProcedure>;
12
- /**
13
- * 基础用法
14
- * @description 默认流程容器,包含头部、主体、底部三个区域
15
- */
16
- export declare const Default: Story;
17
- /**
18
- * 页面模式
19
- * @description 默认模式,支持响应式和移动端适配
20
- */
21
- export declare const PageMode: Story;
22
- /**
23
- * 弹窗模式
24
- * @description 用于弹窗场景,不应用移动端适配
25
- */
26
- export declare const ModalMode: Story;
27
- /**
28
- * 步骤控制
29
- * @description 使用 onStepsChange 监听步骤变化
30
- */
31
- export declare const StepControl: Story;
32
- /**
33
- * 步骤拦截
34
- * @description 通过 onNext/onPrev 返回 false 阻止步骤切换
35
- */
36
- export declare const StepIntercept: Story;
37
- /**
38
- * 无侧边栏
39
- */
40
- export declare const WithoutSidebar: Story;
41
- /**
42
- * 无头部
43
- */
44
- export declare const WithoutHeader: Story;
45
- /**
46
- * 无底部
47
- */
48
- export declare const WithoutFooter: Story;
49
- /**
50
- * 最小配置
51
- * @description 仅显示主体内容
52
- */
53
- export declare const MinimalConfig: Story;
54
- /**
55
- * 头部插槽顺序 - 默认
56
- * @description left 在左,right 在右
57
- */
58
- export declare const HeaderSlotDefault: Story;
59
- /**
60
- * 头部插槽顺序 - 反转
61
- * @description left 在右,right 在左
62
- */
63
- export declare const HeaderSlotReverse: Story;
64
- /**
65
- * 隐藏步骤条
66
- * @description 仅显示头部插槽,不显示步骤条
67
- */
68
- export declare const HideSteps: Story;
69
- /**
70
- * 第一步显示返回按钮
71
- * @description 通过 showBackOnFirstStep 控制
72
- */
73
- export declare const ShowBackOnFirstStep: Story;
74
- /**
75
- * 返回确认弹窗
76
- * @description 点击返回时弹出确认弹窗
77
- */
78
- export declare const BackConfirmModal: Story;
79
- /**
80
- * 关闭确认弹窗
81
- * @description 点击关闭时弹出确认弹窗
82
- */
83
- export declare const CloseConfirmModal: Story;
84
- /**
85
- * 主体布局 - 比例布局
86
- * @description 使用比例分配内容区和侧边栏宽度
87
- */
88
- export declare const BodyRatioLayout: Story;
89
- /**
90
- * 主体布局 - 固定宽度
91
- * @description 侧边栏使用固定宽度
92
- */
93
- export declare const BodyFixedLayout: Story;
94
- /**
95
- * 主体布局 - 垂直布局
96
- * @description 内容区和侧边栏上下排列
97
- */
98
- export declare const BodyVerticalLayout: Story;
99
- /**
100
- * 主体布局 - 内容顺序反转
101
- * @description 侧边栏在左/上,内容区在右/下
102
- */
103
- export declare const BodyContentOrderReverse: Story;
104
- /**
105
- * 底部位置 - 悬浮在侧边栏
106
- * @description 默认位置,底部悬浮在侧边栏区域
107
- */
108
- export declare const FooterFloatSidebar: Story;
109
- /**
110
- * 底部位置 - 固定在整体底部
111
- */
112
- export declare const FooterFixedBottom: Story;
113
- /**
114
- * 底部位置 - 悬浮在整体区域
115
- * @description 移动端默认使用此模式
116
- */
117
- export declare const FooterFloatAll: Story;
118
- /**
119
- * 底部位置 - 悬浮在内容区
120
- */
121
- export declare const FooterFloatContent: Story;
122
- /**
123
- * 底部位置 - 内嵌在内容区底部
124
- */
125
- export declare const FooterFixedContentBottom: Story;
126
- /**
127
- * 底部位置 - 内嵌在侧边栏底部
128
- */
129
- export declare const FooterFixedSidebarBottom: Story;
130
- /**
131
- * 移动端总结按钮
132
- * @description 移动端显示总结按钮,点击可查看侧边栏内容
133
- */
134
- export declare const MobileSummaryButton: Story;
135
- /**
136
- * 溢出收纳功能
137
- * @description 当宽度不足时,按钮会被收纳到 More 菜单中
138
- */
139
- export declare const OverflowActions: Story;
140
- /**
141
- * 禁用溢出收纳
142
- * @description 不启用溢出收纳,按钮会换行显示
143
- */
144
- export declare const DisableOverflow: Story;
145
- /**
146
- * 完整示例 - 购物流程
147
- * @description 模拟真实的购物流程
148
- */
149
- export declare const ShoppingFlow: Story;
150
- /**
151
- * 完整示例 - 注册流程
152
- * @description 模拟用户注册流程
153
- */
154
- export declare const RegistrationFlow: Story;
155
- /**
156
- * 完整示例 - 表单向导
157
- * @description 多步表单向导
158
- */
159
- export declare const FormWizard: Story;
160
- /**
161
- * 交互测试 - 组件渲染
162
- */
163
- export declare const InteractionTest: Story;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- import { PisellScrollViewProps, PisellScrollViewRef } from './types';
3
- import './PisellScrollView.less';
4
- declare const PisellScrollView: React.ForwardRefExoticComponent<Omit<PisellScrollViewProps, "ref"> & React.RefAttributes<PisellScrollViewRef>>;
5
- export default PisellScrollView;