@pisell/materials 6.11.241 → 6.11.243

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 (177) 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 +4 -4
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +7 -7
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +24 -24
  9. package/es/components/PisellCards/index.d.ts +1 -0
  10. package/es/components/PisellFields/index.d.ts +1 -0
  11. package/es/components/PisellGroupView/PisellGroupView.d.ts +9 -0
  12. package/es/components/PisellGroupView/PisellGroupView.stories.d.ts +27 -0
  13. package/es/components/PisellGroupView/index.d.ts +6 -0
  14. package/es/components/PisellGroupView/types.d.ts +124 -0
  15. package/es/components/PisellGroupView/utils/index.d.ts +20 -0
  16. package/es/components/PisellLayouts/index.d.ts +1 -0
  17. package/es/components/PisellMetrics/index.d.ts +1 -0
  18. package/es/components/PisellTabbar/PisellTabbar.js +3 -4
  19. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  20. package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
  21. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  22. package/es/components/dataSourceComponents/fields/index.d.ts +5 -4
  23. package/es/components/date-picker/index.d.ts +1 -0
  24. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
  25. package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
  26. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +89 -0
  27. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
  28. package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +64 -0
  29. package/es/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +49 -0
  30. package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +13 -0
  31. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
  32. package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
  33. package/es/components/pisellFloorMapLayout/index.d.ts +39 -0
  34. package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +10 -0
  35. package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +22 -0
  36. package/es/components/pisellFloorMapLayout/types.d.ts +769 -0
  37. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +27 -0
  38. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  39. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  40. package/es/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +24 -0
  41. package/es/components/pisellModal/components/index.d.ts +1 -0
  42. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  43. package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +9 -0
  44. package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +34 -0
  45. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +18 -0
  46. package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +30 -0
  47. package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +330 -0
  48. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +52 -0
  49. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +22 -0
  50. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +57 -0
  51. package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +26 -0
  52. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  53. package/es/components/pisellRecordBoard/types.d.ts +899 -0
  54. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
  55. package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
  56. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
  57. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -3
  58. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  59. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -5
  60. package/es/components/productCard/cartSkuCard/components/inlineActions/index.js +3 -1
  61. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +22 -0
  62. package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +9 -0
  63. package/es/components/productCard/cartSkuCard/components/weighing/index.js +12 -14
  64. package/es/components/productCard/cartSkuCard/index.less +8 -1
  65. package/es/components/productCard/lineItem/components/Holders/index.d.ts +10 -0
  66. package/es/components/table/Table/fields/date/index.d.ts +1 -0
  67. package/es/components/table/Table/fields/index.d.ts +3 -2
  68. package/es/components/table/Table/fields/link/index.d.ts +1 -0
  69. package/es/components/table/Table/fields/number/index.d.ts +1 -0
  70. package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
  71. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  72. package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  73. package/es/components/table/Table/fields/search/index.d.ts +1 -0
  74. package/es/components/table/Table/fields/select/index.d.ts +1 -0
  75. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  76. package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  77. package/es/components/table/Table/utils.d.ts +1 -1
  78. package/es/components/virtual-keyboard/Time/index.d.ts +14 -0
  79. package/es/components/virtual-keyboard/index.d.ts +25 -0
  80. package/es/pisell-materials.tw.css +1 -1
  81. package/lib/components/PisellCards/index.d.ts +1 -0
  82. package/lib/components/PisellFields/index.d.ts +1 -0
  83. package/lib/components/PisellGroupView/PisellGroupView.d.ts +9 -0
  84. package/lib/components/PisellGroupView/PisellGroupView.stories.d.ts +27 -0
  85. package/lib/components/PisellGroupView/index.d.ts +6 -0
  86. package/lib/components/PisellGroupView/types.d.ts +124 -0
  87. package/lib/components/PisellGroupView/utils/index.d.ts +20 -0
  88. package/lib/components/PisellLayouts/index.d.ts +1 -0
  89. package/lib/components/PisellMetrics/index.d.ts +1 -0
  90. package/lib/components/PisellTabbar/PisellTabbar.js +2 -2
  91. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
  92. package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
  93. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  94. package/lib/components/dataSourceComponents/fields/index.d.ts +5 -4
  95. package/lib/components/date-picker/index.d.ts +1 -0
  96. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
  97. package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
  98. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +89 -0
  99. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
  100. package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +64 -0
  101. package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +49 -0
  102. package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +13 -0
  103. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
  104. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
  105. package/lib/components/pisellFloorMapLayout/index.d.ts +39 -0
  106. package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +10 -0
  107. package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +22 -0
  108. package/lib/components/pisellFloorMapLayout/types.d.ts +769 -0
  109. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +27 -0
  110. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
  111. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
  112. package/lib/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +24 -0
  113. package/lib/components/pisellModal/components/index.d.ts +1 -0
  114. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  115. package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +9 -0
  116. package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +34 -0
  117. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +18 -0
  118. package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +30 -0
  119. package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +330 -0
  120. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +52 -0
  121. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +22 -0
  122. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +57 -0
  123. package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +26 -0
  124. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  125. package/lib/components/pisellRecordBoard/types.d.ts +899 -0
  126. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
  127. package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
  128. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
  129. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +1 -2
  130. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  131. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +3 -6
  132. package/lib/components/productCard/cartSkuCard/components/inlineActions/index.js +2 -1
  133. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +22 -0
  134. package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +9 -0
  135. package/lib/components/productCard/cartSkuCard/components/weighing/index.js +11 -14
  136. package/lib/components/productCard/cartSkuCard/index.less +8 -1
  137. package/lib/components/productCard/lineItem/components/Holders/index.d.ts +10 -0
  138. package/lib/components/table/Table/fields/date/index.d.ts +1 -0
  139. package/lib/components/table/Table/fields/index.d.ts +3 -2
  140. package/lib/components/table/Table/fields/link/index.d.ts +1 -0
  141. package/lib/components/table/Table/fields/number/index.d.ts +1 -0
  142. package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
  143. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
  144. package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
  145. package/lib/components/table/Table/fields/search/index.d.ts +1 -0
  146. package/lib/components/table/Table/fields/select/index.d.ts +1 -0
  147. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  148. package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  149. package/lib/components/table/Table/utils.d.ts +1 -1
  150. package/lib/components/virtual-keyboard/Time/index.d.ts +14 -0
  151. package/lib/components/virtual-keyboard/index.d.ts +25 -0
  152. package/lib/pisell-materials.tw.css +1 -1
  153. package/package.json +3 -3
  154. package/es/components/PisellTabbar/index.d.ts +0 -10
  155. package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -12
  156. package/es/components/PisellTabbar/template/Template1/index.d.ts +0 -7
  157. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +0 -48
  158. package/es/components/pisellFind/index.d.ts +0 -69
  159. package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
  160. package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  161. package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  162. package/es/components/pisellLookup/types.d.ts +0 -797
  163. package/es/components/pisellRecordBoard/index.d.ts +0 -55
  164. package/es/components/pisellTimeRangeDisplay/index.d.ts +0 -3
  165. package/es/index.d.ts +0 -271
  166. package/lib/components/PisellTabbar/index.d.ts +0 -10
  167. package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +0 -12
  168. package/lib/components/PisellTabbar/template/Template1/index.d.ts +0 -7
  169. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +0 -48
  170. package/lib/components/pisellFind/index.d.ts +0 -69
  171. package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
  172. package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  173. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  174. package/lib/components/pisellLookup/types.d.ts +0 -797
  175. package/lib/components/pisellRecordBoard/index.d.ts +0 -55
  176. package/lib/components/pisellTimeRangeDisplay/index.d.ts +0 -3
  177. package/lib/index.d.ts +0 -271
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import 'dayjs/locale/zh-cn';
3
+ import 'dayjs/locale/en';
4
+ import type { PisellTimeRangeDisplayProps } from './types';
5
+ import './PisellTimeRangeDisplay.less';
6
+ /**
7
+ * PisellTimeRangeDisplay 组件
8
+ *
9
+ * @description
10
+ * 纯展示型时间区间组件,将 startAt / endAt 格式化为「时间区间 + 持续时间」。
11
+ * - 同一天:HH:mm-HH:mm,可选显示日期/星期
12
+ * - 跨天:起止日期时间
13
+ * - 持续时间:d h m s 格式
14
+ * - 字段顺序由 fieldOrder 控制,可将 duration 放在中间
15
+ *
16
+ * @example
17
+ * <PisellTimeRangeDisplay
18
+ * startAt="2026-02-04 09:00"
19
+ * endAt="2026-02-04 18:00"
20
+ * />
21
+ * // => "09:00-18:00" + "9h"
22
+ *
23
+ * <PisellTimeRangeDisplay
24
+ * startAt={start}
25
+ * endAt={end}
26
+ * fields={{ fieldOrder: ['time', 'duration', 'date', 'weekday'] }}
27
+ * showDateForSameDay
28
+ * />
29
+ */
30
+ export declare const PisellTimeRangeDisplay: React.FC<PisellTimeRangeDisplayProps>;
31
+ declare const _default: React.NamedExoticComponent<PisellTimeRangeDisplayProps>;
32
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { type Dayjs } from 'dayjs';
3
+ import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, TextStyleConfig } from '../types';
4
+ export interface TimeRangeBlockProps {
5
+ /** 开始时间 */
6
+ start: Dayjs;
7
+ /** 结束时间 */
8
+ end: Dayjs;
9
+ /** 是否同一天 */
10
+ isSameDay: boolean;
11
+ /** 时间格式配置 */
12
+ timeFormat?: TimeFormatConfig;
13
+ /** 日期格式配置(跨天时用于起止日期,含 showRelativeDay) */
14
+ dateFormat?: DateFormatConfig;
15
+ /** 星期格式配置(跨天时用于「Sat, 22 Jan」) */
16
+ weekdayFormat?: WeekdayFormatConfig;
17
+ /** 跨天时是否展示星期 */
18
+ showWeekdayInCrossDay?: boolean;
19
+ /** 参考日期,用于相对日判定,默认 dayjs() */
20
+ referenceDate?: Dayjs;
21
+ /** 文本样式 */
22
+ style?: TextStyleConfig;
23
+ /** 开始时间文本样式,会覆盖 style 中的同名字段 */
24
+ startStyle?: TextStyleConfig;
25
+ /** 结束时间文本样式,会覆盖 style 中的同名字段 */
26
+ endStyle?: TextStyleConfig;
27
+ /** 自定义类名 */
28
+ className?: string;
29
+ }
30
+ /**
31
+ * 时间区间展示块
32
+ * - 同一天:HH:mm-HH:mm
33
+ * - 跨天:起止完整日期时间;若某端为相对日(今天/昨天/明天)则只显示「时间 相对日」,不显示星期+日期
34
+ */
35
+ export declare const TimeRangeBlock: React.FC<TimeRangeBlockProps>;
36
+ export default TimeRangeBlock;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Footer: ({ item, hideDivider, type, isOnlyTotal }: any) => React.JSX.Element;
4
+ export default Footer;
@@ -42,9 +42,8 @@ var import_index = require("./index.less");
42
42
  var import_utils2 = require("@pisell/utils");
43
43
  var import__ = require("../../index");
44
44
  var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
45
- var _a, _b;
46
45
  const { total, origin_total, symbol, tip, num, discount_reason } = item;
47
- const weighingInfo = (_b = (_a = item == null ? void 0 : item._origin) == null ? void 0 : _a._extend) == null ? void 0 : _b.weighing;
46
+ const weighingInfo = (0, import_utils2.resolveWeighingSnapshot)(item);
48
47
  const formatFooterAmount = (amount, precision = 2) => {
49
48
  if (!weighingInfo) {
50
49
  return (0, import_utils._formatAmount)(amount, symbol, precision);
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface IProps {
4
+ isShowImage?: boolean;
5
+ dataSource: {
6
+ image?: string;
7
+ bundle?: any[];
8
+ options?: any[];
9
+ product_option_string?: string;
10
+ name?: string;
11
+ symbol?: string;
12
+ price?: string | number;
13
+ total?: number;
14
+ origin_total?: number;
15
+ num?: number;
16
+ holder_id?: any;
17
+ isFormSubject?: boolean;
18
+ totalDifference?: number;
19
+ };
20
+ style?: React.CSSProperties;
21
+ /** 作为主商品卡片展示
22
+ * 1. 影响商品数量 tag 的位置
23
+ * 2. isMain 且 type 为 a5,展示holder
24
+ */
25
+ isMainProduct?: boolean;
26
+ maxSpecsCount?: number;
27
+ type?: 'a2' | 'a5' | 'a9';
28
+ isBundle?: boolean;
29
+ showFooter?: boolean;
30
+ isShowOriginalPrice?: boolean;
31
+ isShowEditProduct?: boolean;
32
+ onEditProduct?: (val: any) => void;
33
+ disabledEditClick?: boolean;
34
+ }
35
+ declare const BasicInfo: (props: IProps) => React.JSX.Element;
36
+ export default BasicInfo;
@@ -42,7 +42,6 @@ var import__ = require("../../index");
42
42
  var import_EditButton = __toESM(require("../../../components/Header/EditButton"));
43
43
  var import_index = require("./index.less");
44
44
  var BasicInfo = (props) => {
45
- var _a, _b;
46
45
  const {
47
46
  isShowImage,
48
47
  dataSource = {},
@@ -84,10 +83,8 @@ var BasicInfo = (props) => {
84
83
  );
85
84
  };
86
85
  const hasSpecs = (bundle == null ? void 0 : bundle.length) || (options == null ? void 0 : options.length) || product_option_string;
87
- const weighingInfo = (_b = (_a = dataSource == null ? void 0 : dataSource._origin) == null ? void 0 : _a._extend) == null ? void 0 : _b.weighing;
88
- const hasWeighingInfo = Boolean(
89
- weighingInfo && (Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.weight)) || Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.net_weight)))
90
- );
86
+ const weighingInfo = (0, import_utils.resolveWeighingSnapshot)(dataSource);
87
+ const hasWeighingInfo = Boolean(weighingInfo);
91
88
  const hasProductMeta = hasSpecs || hasWeighingInfo;
92
89
  const basicInfoClassName = (0, import_classnames.default)(`${import__.PREFIX}__basic-info`, {
93
90
  [`${import__.PREFIX}__basic-info--weighing`]: hasWeighingInfo
@@ -115,7 +112,7 @@ var BasicInfo = (props) => {
115
112
  );
116
113
  };
117
114
  const renderProductPrice = () => {
118
- if (weighingInfo) {
115
+ if (hasWeighingInfo) {
119
116
  return null;
120
117
  }
121
118
  return (0, import_utils.formatAmount)(price, 2, symbol);
@@ -48,7 +48,8 @@ var InlineActions = ({ actions }) => {
48
48
  },
49
49
  onClick: (event) => {
50
50
  var _a;
51
- return (_a = action.onClick) == null ? void 0 : _a.call(action, event);
51
+ event.stopPropagation();
52
+ (_a = action.onClick) == null ? void 0 : _a.call(action, event);
52
53
  }
53
54
  },
54
55
  action.text
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface SpecsProps {
4
+ /** 数据源 */
5
+ dataSource?: {
6
+ bundle?: Array<{
7
+ title: string;
8
+ }>;
9
+ options?: Array<{
10
+ name: string;
11
+ price: number;
12
+ num: number;
13
+ }>;
14
+ product_option_string?: string;
15
+ symbol?: string;
16
+ };
17
+ /** 最大展示数量,默认为 1 */
18
+ maxSpecsCount?: number;
19
+ type?: 'a2' | 'a5' | 'a9';
20
+ }
21
+ declare const Specs: (props: SpecsProps) => React.JSX.Element | null;
22
+ export default Specs;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { WeighingSnapshot } from '@pisell/utils';
3
+ import './index.less';
4
+ interface WeighingProps {
5
+ dataSource?: WeighingSnapshot;
6
+ symbol?: string;
7
+ }
8
+ declare const Weighing: (props: WeighingProps) => React.JSX.Element | null;
9
+ export default Weighing;
@@ -36,17 +36,11 @@ var import_react = __toESM(require("react"));
36
36
  var import_utils = require("@pisell/utils");
37
37
  var import__ = require("../../index");
38
38
  var import_index = require("./index.less");
39
- var UNIT_LABEL_MAP = {
40
- KILOGRAMS: "kg",
41
- GRAMS: "g",
42
- POUNDS: "lb",
43
- OUNCES: "oz"
44
- };
45
39
  var formatWeight = (value, unit) => {
46
40
  const parsedValue = Number(value);
47
41
  const displayValue = Number.isFinite(parsedValue) ? parsedValue : 0;
48
- const displayUnit = UNIT_LABEL_MAP[unit || "KILOGRAMS"];
49
- return `${displayValue.toFixed(3)} ${displayUnit}`;
42
+ const displayUnit = (0, import_utils.getWeightUnitSymbol)(unit);
43
+ return `${(0, import_utils.formatWeightValue)(displayValue)} ${displayUnit}`;
50
44
  };
51
45
  var Weighing = (props) => {
52
46
  const { dataSource, symbol } = props;
@@ -55,15 +49,18 @@ var Weighing = (props) => {
55
49
  }
56
50
  const {
57
51
  mode,
52
+ weight_source,
58
53
  weight,
59
54
  tare,
55
+ tare_weight,
60
56
  net_weight,
61
57
  unit_price,
62
- unit = "KILOGRAMS"
58
+ unit = import_utils.STANDARD_WEIGHT_UNIT
63
59
  } = dataSource;
64
- const unitLabel = UNIT_LABEL_MAP[unit];
65
- const tareValue = Number((tare == null ? void 0 : tare.value) || 0);
66
- const isManualWeight = mode === "manual";
60
+ const unitLabel = (0, import_utils.getWeightUnitSymbol)(unit);
61
+ const tareValue = Number((tare == null ? void 0 : tare.value) ?? tare_weight ?? 0);
62
+ const tareUnit = (tare == null ? void 0 : tare.unit) || unit;
63
+ const isManualWeight = (mode ?? weight_source) === "manual";
67
64
  const grossLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.gross");
68
65
  const tareLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.tare");
69
66
  const netLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.net");
@@ -88,8 +85,8 @@ var Weighing = (props) => {
88
85
  className: `${import__.PREFIX}__weighing-row ${import__.PREFIX}__weighing-row--large`
89
86
  },
90
87
  /* @__PURE__ */ import_react.default.createElement("span", null, `${tareLabel}: ${formatWeight(
91
- tare == null ? void 0 : tare.value,
92
- (tare == null ? void 0 : tare.unit) || unit
88
+ (tare == null ? void 0 : tare.value) ?? tare_weight,
89
+ tareUnit
93
90
  )}`)
94
91
  ) : null, /* @__PURE__ */ import_react.default.createElement(
95
92
  "div",
@@ -28,7 +28,14 @@
28
28
  }
29
29
 
30
30
  .pisell-cart-sku-card {
31
- --pisell-cart-sku-card-physical-text-height: 30px;
31
+ // 浏览器无法可靠换算屏幕物理尺寸:保留设计基准,并允许按送检设备校准。
32
+ // 当前送检机 30px 实测约 3mm,因此默认系数为 4/3;设备侧可覆盖该系数。
33
+ --pisell-cart-sku-card-weighing-font-base: 30px;
34
+ --pisell-cart-sku-card-device-font-scale: 1.333333;
35
+ --pisell-cart-sku-card-physical-text-height: calc(
36
+ var(--pisell-cart-sku-card-weighing-font-base) *
37
+ var(--pisell-cart-sku-card-device-font-scale)
38
+ );
32
39
 
33
40
  padding: 4px 8px 4px 4px;
34
41
  border-radius: inherit;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { LineItemHolderOption } from '../../types';
3
+ import './index.less';
4
+ interface LineItemHoldersProps {
5
+ dataSource?: any;
6
+ holderOptions?: LineItemHolderOption[];
7
+ isFormSubject?: boolean;
8
+ }
9
+ declare const LineItemHolders: (props: LineItemHoldersProps) => React.JSX.Element | null;
10
+ export default LineItemHolders;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const fieldMaps: {
2
3
  text: {
3
4
  field: {
@@ -197,12 +198,12 @@ export declare const fieldList: ({
197
198
  field_icon: string;
198
199
  field_name: string;
199
200
  field_type: string;
200
- default_value: string;
201
+ default_value: boolean;
201
202
  } | {
202
203
  field_icon: string;
203
204
  field_name: string;
204
205
  field_type: string;
205
- default_value: boolean;
206
+ default_value: string;
206
207
  } | {
207
208
  field_icon: string;
208
209
  field_name: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: {
2
3
  field: {
3
4
  field_icon: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  field: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import filter from "./filterUtil";
2
3
  declare const _default: {
3
4
  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" | "filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
158
+ }) => ("filters" | "column_setting" | "gallery_setting" | "order_by" | "group_by" | "view_mode" | "filter_setting")[];
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 {};
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import { Item } from "../Keyboard";
3
+ import "./index.less";
4
+ export interface VirtualKeyboardTimeProps extends React.HTMLAttributes<HTMLDivElement> {
5
+ style?: React.CSSProperties;
6
+ selectType?: 'light' | 'dark';
7
+ onChange?: (value?: any) => void;
8
+ value?: any;
9
+ items?: Item[];
10
+ onEnter?: (value: any) => void;
11
+ rightPanel?: React.ReactNode;
12
+ }
13
+ declare const VirtualKeyboardTime: (props: VirtualKeyboardTimeProps) => React.JSX.Element;
14
+ export default VirtualKeyboardTime;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { KeyboardProps } from "./Keyboard";
3
+ import { VirtualKeyInputProps } from "./VirtualKeyInput";
4
+ import "./index.less";
5
+ interface VirtualKeyboardProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ keyboardProps?: KeyboardProps;
7
+ virtualKeyInputProps?: VirtualKeyInputProps;
8
+ rightPanel?: React.ReactNode;
9
+ style?: React.CSSProperties;
10
+ onChange?: (value?: any) => void;
11
+ value?: string;
12
+ selectType?: 'light' | 'dark';
13
+ backgroundColor?: string;
14
+ containerBackgroundColor?: string;
15
+ buttonBackgroundColor?: string;
16
+ textColor?: string;
17
+ keyboardBackgroundColor?: string;
18
+ keyboardButtonBackgroundColor?: string;
19
+ keyboardButtonTextColor?: string;
20
+ keyboardButtonHoverColor?: string;
21
+ primaryButtonBackgroundColor?: string;
22
+ primaryButtonTextColor?: string;
23
+ }
24
+ declare const VirtualKeyboard: (props: VirtualKeyboardProps) => React.JSX.Element;
25
+ export default VirtualKeyboard;