@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.
Files changed (127) 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/render/default/view.js +5 -5
  6. package/build/lowcode/view.js +5 -5
  7. package/es/components/PisellSuperTabs/PisellSuperTabs.js +34 -7
  8. package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +19 -3
  9. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  10. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  11. package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
  12. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
  13. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +5 -3
  14. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +2 -1
  15. package/es/components/productCard/cartSkuCard/components/packages/index.js +2 -0
  16. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  17. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +2 -1
  18. package/es/components/productCard/cartSkuCard/components/sales/index.js +3 -1
  19. package/es/components/productCard/cartSkuCard/index.js +11 -3
  20. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  21. package/es/components/productCard/lineItem/BookingLineItem.js +5 -1
  22. package/es/components/productCard/types.d.ts +1 -0
  23. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  24. package/es/components/table/Table/fields/index.d.ts +0 -1
  25. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  26. package/es/components/table/Table/fields/select/index.d.ts +0 -1
  27. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  28. package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  29. package/es/components/table/Table/utils.d.ts +1 -1
  30. package/es/utils/index.d.ts +1 -1
  31. package/es/utils/platform.d.ts +1 -1
  32. package/lib/components/PisellSuperTabs/PisellSuperTabs.js +34 -5
  33. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +22 -3
  34. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  35. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  36. package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
  37. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
  38. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -3
  39. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +2 -1
  40. package/lib/components/productCard/cartSkuCard/components/packages/index.js +7 -1
  41. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  42. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +2 -1
  43. package/lib/components/productCard/cartSkuCard/components/sales/index.js +7 -1
  44. package/lib/components/productCard/cartSkuCard/index.js +15 -2
  45. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  46. package/lib/components/productCard/lineItem/BookingLineItem.js +3 -0
  47. package/lib/components/productCard/types.d.ts +1 -0
  48. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  49. package/lib/components/table/Table/fields/index.d.ts +0 -1
  50. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  51. package/lib/components/table/Table/fields/select/index.d.ts +0 -1
  52. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  53. package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  54. package/lib/components/table/Table/utils.d.ts +1 -1
  55. package/lib/utils/index.d.ts +1 -1
  56. package/lib/utils/platform.d.ts +1 -1
  57. package/package.json +1 -1
  58. package/es/components/PisellGroupView/PisellGroupView.d.ts +0 -9
  59. package/es/components/PisellGroupView/PisellGroupView.stories.d.ts +0 -27
  60. package/es/components/PisellGroupView/index.d.ts +0 -6
  61. package/es/components/PisellGroupView/types.d.ts +0 -124
  62. package/es/components/PisellGroupView/utils/index.d.ts +0 -20
  63. package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  64. package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
  65. package/es/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
  66. package/es/components/PisellTabbar/PisellTabbar.d.ts +0 -20
  67. package/es/components/PisellTabbar/constants.d.ts +0 -47
  68. package/es/components/PisellTabbar/index.d.ts +0 -10
  69. package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -12
  70. package/es/components/PisellTabbar/template/Template1/index.d.ts +0 -7
  71. package/es/components/pisellFind/index.d.ts +0 -69
  72. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
  73. package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
  74. package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  75. package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  76. package/es/components/pisellLookup/types.d.ts +0 -797
  77. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
  78. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
  79. package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
  80. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
  81. package/es/components/pisellTimeRangeDisplay/index.d.ts +0 -3
  82. package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
  83. package/es/components/select-time/RightPanel/index.d.ts +0 -10
  84. package/es/components/select-time/index.d.ts +0 -16
  85. package/es/components/table/hooks/useTableSetting.d.ts +0 -21
  86. package/es/components/virtual-keyboard/Time/index.d.ts +0 -14
  87. package/es/components/virtual-keyboard/index.d.ts +0 -25
  88. package/es/hooks/useTranslationOriginal.d.ts +0 -4
  89. package/es/locales/ja.d.ts +0 -534
  90. package/es/locales/pt.d.ts +0 -534
  91. package/es/locales/zh-CN.d.ts +0 -561
  92. package/es/locales/zh-TW.d.ts +0 -561
  93. package/lib/components/PisellGroupView/PisellGroupView.d.ts +0 -9
  94. package/lib/components/PisellGroupView/PisellGroupView.stories.d.ts +0 -27
  95. package/lib/components/PisellGroupView/index.d.ts +0 -6
  96. package/lib/components/PisellGroupView/types.d.ts +0 -124
  97. package/lib/components/PisellGroupView/utils/index.d.ts +0 -20
  98. package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  99. package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +0 -87
  100. package/lib/components/PisellSteps/PisellSteps.stories.d.ts +0 -155
  101. package/lib/components/PisellTabbar/PisellTabbar.d.ts +0 -20
  102. package/lib/components/PisellTabbar/constants.d.ts +0 -47
  103. package/lib/components/PisellTabbar/index.d.ts +0 -10
  104. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -12
  105. package/lib/components/PisellTabbar/template/Template1/index.d.ts +0 -7
  106. package/lib/components/pisellFind/index.d.ts +0 -69
  107. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -94
  108. package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
  109. package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  110. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  111. package/lib/components/pisellLookup/types.d.ts +0 -797
  112. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -9
  113. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +0 -14
  114. package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +0 -43
  115. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +0 -9
  116. package/lib/components/pisellTimeRangeDisplay/index.d.ts +0 -3
  117. package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +0 -15
  118. package/lib/components/select-time/RightPanel/index.d.ts +0 -10
  119. package/lib/components/select-time/index.d.ts +0 -16
  120. package/lib/components/table/hooks/useTableSetting.d.ts +0 -21
  121. package/lib/components/virtual-keyboard/Time/index.d.ts +0 -14
  122. package/lib/components/virtual-keyboard/index.d.ts +0 -25
  123. package/lib/hooks/useTranslationOriginal.d.ts +0 -4
  124. package/lib/locales/ja.d.ts +0 -534
  125. package/lib/locales/pt.d.ts +0 -534
  126. package/lib/locales/zh-CN.d.ts +0 -561
  127. package/lib/locales/zh-TW.d.ts +0 -561
@@ -44,6 +44,7 @@ var import_index = require("./index.less");
44
44
  var BasicInfo = (props) => {
45
45
  const {
46
46
  isShowImage,
47
+ isShowQuantityBadge = true,
47
48
  dataSource = {},
48
49
  style,
49
50
  isMainProduct,
@@ -144,7 +145,7 @@ var BasicInfo = (props) => {
144
145
  return _originalTotal !== 0 && _originalTotal != _total;
145
146
  }, [isShowOriginalPrice, origin_total, total, hasSpecs, hasWeighingInfo]);
146
147
  if (type === "a5") {
147
- return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
148
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
148
149
  "div",
149
150
  {
150
151
  className: `product-name ${renderEdit ? "product-name-edit" : ""}`
@@ -155,7 +156,7 @@ var BasicInfo = (props) => {
155
156
  if (type === "a9") {
156
157
  const showAmount = isBundle && !showFooter;
157
158
  const _price = showAmount ? Number(price ?? 0) * num : price;
158
- return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
159
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
159
160
  "div",
160
161
  {
161
162
  className: `product-name ${renderEdit ? "product-name-edit" : ""}`
@@ -163,6 +164,6 @@ var BasicInfo = (props) => {
163
164
  name
164
165
  ), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ import_react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `original-price` }, (0, import_utils.formatAmount)(origin_total, 2, symbol)) : null)), renderProductMeta()), renderEdit));
165
166
  }
166
- return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
167
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
167
168
  };
168
169
  var basicInfo_default = BasicInfo;
@@ -2,11 +2,12 @@ import React from 'react';
2
2
  import './index.less';
3
3
  interface IProps {
4
4
  isShowImage?: boolean;
5
+ isShowQuantityBadge?: boolean;
5
6
  dataSource: {
6
7
  bundle?: any[];
7
8
  symbol?: string;
8
9
  };
9
10
  type?: 'a2' | 'a5' | 'a9';
10
11
  }
11
- declare const Packages: ({ isShowImage, dataSource, type }: IProps) => React.JSX.Element | null;
12
+ declare const Packages: ({ isShowImage, isShowQuantityBadge, dataSource, type, }: IProps) => React.JSX.Element | null;
12
13
  export default Packages;
@@ -40,7 +40,12 @@ var import_basicInfo = __toESM(require("../basicInfo"));
40
40
  var import__ = require("../../index");
41
41
  var import_AmountFooter = __toESM(require("../../../components/AmountFooter"));
42
42
  var import_index = require("./index.less");
43
- var Packages = ({ isShowImage, dataSource = {}, type }) => {
43
+ var Packages = ({
44
+ isShowImage,
45
+ isShowQuantityBadge,
46
+ dataSource = {},
47
+ type
48
+ }) => {
44
49
  const { bundle = [], symbol = "$" } = dataSource;
45
50
  const showFooter = (0, import_react.useCallback)(
46
51
  (_bundle) => {
@@ -71,6 +76,7 @@ var Packages = ({ isShowImage, dataSource = {}, type }) => {
71
76
  import_basicInfo.default,
72
77
  {
73
78
  isShowImage,
79
+ isShowQuantityBadge,
74
80
  dataSource: {
75
81
  ...item,
76
82
  name: item.title,
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -8,6 +8,7 @@ interface IProps {
8
8
  bundle?: any[];
9
9
  };
10
10
  isShowImage?: boolean;
11
+ isShowQuantityBadge?: boolean;
11
12
  }
12
- declare const Sales: ({ hideDivider, dataSource, isShowImage }: IProps) => React.JSX.Element | null;
13
+ declare const Sales: ({ hideDivider, dataSource, isShowImage, isShowQuantityBadge, }: IProps) => React.JSX.Element | null;
13
14
  export default Sales;
@@ -39,7 +39,12 @@ var import_basicInfo = __toESM(require("../basicInfo"));
39
39
  var import_utils = require("@pisell/utils");
40
40
  var import__ = require("../../index");
41
41
  var import_index = require("./index.less");
42
- var Sales = ({ hideDivider, dataSource, isShowImage }) => {
42
+ var Sales = ({
43
+ hideDivider,
44
+ dataSource,
45
+ isShowImage,
46
+ isShowQuantityBadge
47
+ }) => {
43
48
  const { relation_products = [], symbol = "$" } = dataSource || {};
44
49
  let other_products = relation_products.map((p) => {
45
50
  return {
@@ -60,6 +65,7 @@ var Sales = ({ hideDivider, dataSource, isShowImage }) => {
60
65
  import_basicInfo.default,
61
66
  {
62
67
  isShowImage,
68
+ isShowQuantityBadge,
63
69
  style: {
64
70
  border: "1px solid #D0D5DD",
65
71
  borderRadius: 4,
@@ -62,6 +62,7 @@ var CartSkuCard = (props) => {
62
62
  const {
63
63
  dataSource = import_status.defaultValue.dataSource,
64
64
  isShowImage = import_status.defaultValue.isShowImage,
65
+ isShowQuantityBadge = true,
65
66
  isShowOriginalPrice = import_status.defaultValue.isShowOriginalPrice,
66
67
  isShowHolder = import_status.defaultValue.isShowHolder,
67
68
  isShowNote = import_status.defaultValue.isShowNote,
@@ -163,6 +164,7 @@ var CartSkuCard = (props) => {
163
164
  import_basicInfo.default,
164
165
  {
165
166
  isShowImage,
167
+ isShowQuantityBadge,
166
168
  dataSource,
167
169
  isMainProduct: true,
168
170
  maxSpecsCount
@@ -199,6 +201,7 @@ var CartSkuCard = (props) => {
199
201
  import_basicInfo.default,
200
202
  {
201
203
  isShowImage,
204
+ isShowQuantityBadge,
202
205
  dataSource,
203
206
  isMainProduct: true,
204
207
  type,
@@ -208,12 +211,20 @@ var CartSkuCard = (props) => {
208
211
  onEditProduct
209
212
  }
210
213
  )
211
- ), itemType !== "booking" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_timeRange.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_resources.default, { dataSource })) : null, /* @__PURE__ */ import_react.default.createElement(import_packages.default, { dataSource, isShowImage }), /* @__PURE__ */ import_react.default.createElement(
214
+ ), itemType !== "booking" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_timeRange.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_resources.default, { dataSource })) : null, /* @__PURE__ */ import_react.default.createElement(
215
+ import_packages.default,
216
+ {
217
+ dataSource,
218
+ isShowImage,
219
+ isShowQuantityBadge
220
+ }
221
+ ), /* @__PURE__ */ import_react.default.createElement(
212
222
  import_sales.default,
213
223
  {
214
224
  dataSource,
215
225
  hideDivider: !!((_a2 = dataSource == null ? void 0 : dataSource.bundle) == null ? void 0 : _a2.length),
216
- isShowImage
226
+ isShowImage,
227
+ isShowQuantityBadge
217
228
  }
218
229
  ), ((_b2 = dataSource.items) == null ? void 0 : _b2.length) ? /* @__PURE__ */ import_react.default.createElement(import_MultiDay.default, { dataSource, hideDivider }) : isShowAmountFooter ? /* @__PURE__ */ import_react.default.createElement(
219
230
  import_AmountFooter.default,
@@ -252,6 +263,7 @@ var CartSkuCard = (props) => {
252
263
  import_basicInfo.default,
253
264
  {
254
265
  isShowImage,
266
+ isShowQuantityBadge,
255
267
  dataSource,
256
268
  isMainProduct: true,
257
269
  type,
@@ -266,6 +278,7 @@ var CartSkuCard = (props) => {
266
278
  {
267
279
  dataSource,
268
280
  isShowImage,
281
+ isShowQuantityBadge,
269
282
  type
270
283
  }
271
284
  ), isShowAmountFooter ? /* @__PURE__ */ import_react.default.createElement(
@@ -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) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -73,6 +73,7 @@ var BookingLineItem = (props) => {
73
73
  rightActionsDisplay = "swipe",
74
74
  escapeDom,
75
75
  isShowImage,
76
+ isShowQuantityBadge = true,
76
77
  isFormSubject,
77
78
  isShowDelete,
78
79
  isShowInlineDelete = isShowDelete,
@@ -181,6 +182,7 @@ var BookingLineItem = (props) => {
181
182
  import_basicInfo.default,
182
183
  {
183
184
  isShowImage,
185
+ isShowQuantityBadge,
184
186
  dataSource: productDataSource,
185
187
  type: cartSkuType,
186
188
  maxSpecsCount: props.maxSpecsCount || 1
@@ -190,6 +192,7 @@ var BookingLineItem = (props) => {
190
192
  {
191
193
  dataSource: productDataSource,
192
194
  isShowImage,
195
+ isShowQuantityBadge,
193
196
  type: cartSkuType
194
197
  }
195
198
  ), isShowAmountFooter ? /* @__PURE__ */ import_react.default.createElement(
@@ -67,6 +67,7 @@ export declare type ProductCardTypes = {
67
67
  dataSource: productType;
68
68
  isFormSubject?: boolean;
69
69
  isShowImage?: boolean;
70
+ isShowQuantityBadge?: boolean;
70
71
  isShowOriginalPrice?: boolean;
71
72
  isShowHolder?: boolean;
72
73
  isShowNote?: boolean;
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: number;
3
- vertical: number;
2
+ horizontal: any;
3
+ vertical: any;
4
4
  };
5
5
  export default useGapSize;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const fieldMaps: {
3
2
  text: {
4
3
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -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
- }) => ("filters" | "column_setting" | "gallery_setting" | "order_by" | "group_by" | "view_mode" | "filter_setting")[];
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 {};
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string;
2
+ export declare const getCssNumber: (val: string | number) => string | number;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -1 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.10.5",
3
+ "version": "1.10.7",
4
4
  "scripts": {
5
5
  "dev:tailwind-css": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css --watch",
6
6
  "build:tailwind-css:once": "tailwindcss -c ./tailwind.materials.config.cjs --postcss ./postcss.materials-tailwind.cjs -i ./src/tailwind-input.css -o ./src/pisell-materials.tw.css",
@@ -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;