@pisell/materials 1.8.54 → 1.8.56

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 (151) 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/async/view.js +1 -1
  5. package/build/lowcode/index.js +1 -1
  6. package/build/lowcode/meta.js +3 -3
  7. package/build/lowcode/preview.js +1 -1
  8. package/build/lowcode/render/default/async/view.js +1 -1
  9. package/build/lowcode/render/default/view.css +1 -1
  10. package/build/lowcode/render/default/view.js +37 -37
  11. package/build/lowcode/view.css +1 -1
  12. package/build/lowcode/view.js +37 -37
  13. package/es/components/buttonGroupPreview/index.js +8 -4
  14. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +207 -49
  15. package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +33 -2
  16. package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +50 -2
  17. package/es/components/pisellFloorMapLayout/components/EdgeLayer.js +252 -0
  18. package/es/components/pisellFloorMapLayout/components/EdgeLayer.less +11 -0
  19. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +179 -29
  20. package/es/components/pisellFloorMapLayout/components/EditableItemLayer.less +0 -28
  21. package/es/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.js +131 -0
  22. package/es/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.less +65 -0
  23. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +5 -4
  24. package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +12 -1
  25. package/es/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.js +8 -1
  26. package/es/components/pisellFloorMapLayout/components/FloorMapOverview.js +16 -8
  27. package/es/components/pisellFloorMapLayout/components/FloorMapOverview.less +69 -17
  28. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +290 -147
  29. package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +210 -11
  30. package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.js +81 -0
  31. package/es/components/pisellFloorMapLayout/components/FloorMapZoneElement.d.ts +8 -0
  32. package/es/components/pisellFloorMapLayout/components/FloorMapZoneElement.js +21 -0
  33. package/es/components/pisellFloorMapLayout/components/FloorMapZoneElement.less +74 -0
  34. package/es/components/pisellFloorMapLayout/components/ItemLayer.less +3 -1
  35. package/es/components/pisellFloorMapLayout/components/NodePortMarkers.js +70 -0
  36. package/es/components/pisellFloorMapLayout/components/NodePortMarkers.less +33 -0
  37. package/es/components/pisellFloorMapLayout/components/ViewControls.js +13 -5
  38. package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +2 -0
  39. package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +2 -1
  40. package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.js +1 -1
  41. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEdgeEditing.js +340 -0
  42. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEdgeViewModel.js +102 -0
  43. package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +244 -84
  44. package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +54 -0
  45. package/es/components/pisellFloorMapLayout/hooks/useShopFloorPlanSubscription.js +7 -4
  46. package/es/components/pisellFloorMapLayout/index.d.ts +5 -1
  47. package/es/components/pisellFloorMapLayout/locales-ja.js +14 -2
  48. package/es/components/pisellFloorMapLayout/locales-pt.js +14 -2
  49. package/es/components/pisellFloorMapLayout/locales.js +161 -8
  50. package/es/components/pisellFloorMapLayout/types.d.ts +86 -4
  51. package/es/components/pisellFloorMapLayout/types.js +5 -1
  52. package/es/components/pisellFloorMapLayout/utils/alignSnap.js +170 -0
  53. package/es/components/pisellFloorMapLayout/utils/batchScenePlacementLayout.js +86 -0
  54. package/es/components/pisellFloorMapLayout/utils/edgeRouting.js +942 -0
  55. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +7 -0
  56. package/es/components/pisellFloorMapLayout/utils/floorMapCanvasStage.js +23 -1
  57. package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +11 -2
  58. package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +20 -3
  59. package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +11 -5
  60. package/es/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.js +5 -3
  61. package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +20 -0
  62. package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.js +62 -0
  63. package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +83 -0
  64. package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.js +29 -0
  65. package/es/components/pisellFloorMapLayout/utils/floorMapToolbarPalette.js +51 -0
  66. package/es/components/productCard/cartSkuCard/components/BookingItem/index.js +14 -0
  67. package/es/components/productCard/cartSkuCard/components/BookingItem/index.less +32 -0
  68. package/es/components/productCard/cartSkuCard/components/resources/index.less +4 -0
  69. package/es/components/productCard/cartSkuCard/components/timeRange/index.js +1 -2
  70. package/es/components/productCard/cartSkuCard/index.js +17 -11
  71. package/es/components/productCard/lineItem/BookingLineItem.js +17 -6
  72. package/es/components/productCard/lineItem/components/Holders/index.js +51 -0
  73. package/es/components/productCard/lineItem/components/Holders/index.less +39 -0
  74. package/es/components/productCard/lineItem/components/Resources/index.js +45 -0
  75. package/es/components/productCard/lineItem/components/TimeRange/index.js +64 -0
  76. package/es/components/productCard/lineItem/index.js +5 -2
  77. package/es/components/productCard/lineItem/index.less +21 -10
  78. package/es/components/productCard/types.d.ts +1 -0
  79. package/es/index.d.ts +6 -2
  80. package/es/index.js +6 -2
  81. package/es/pisell-materials.tw.css +3 -0
  82. package/lib/components/buttonGroupPreview/index.js +8 -4
  83. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +206 -48
  84. package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +33 -2
  85. package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +50 -2
  86. package/lib/components/pisellFloorMapLayout/components/EdgeLayer.js +255 -0
  87. package/lib/components/pisellFloorMapLayout/components/EdgeLayer.less +11 -0
  88. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +179 -29
  89. package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.less +0 -28
  90. package/lib/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.js +134 -0
  91. package/lib/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.less +65 -0
  92. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +4 -3
  93. package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.less +12 -1
  94. package/lib/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.js +8 -1
  95. package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.js +16 -8
  96. package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.less +69 -17
  97. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +287 -144
  98. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +210 -11
  99. package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.js +84 -0
  100. package/lib/components/pisellFloorMapLayout/components/FloorMapZoneElement.d.ts +8 -0
  101. package/lib/components/pisellFloorMapLayout/components/FloorMapZoneElement.js +23 -0
  102. package/lib/components/pisellFloorMapLayout/components/FloorMapZoneElement.less +74 -0
  103. package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +3 -1
  104. package/lib/components/pisellFloorMapLayout/components/NodePortMarkers.js +73 -0
  105. package/lib/components/pisellFloorMapLayout/components/NodePortMarkers.less +33 -0
  106. package/lib/components/pisellFloorMapLayout/components/ViewControls.js +12 -4
  107. package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +2 -0
  108. package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +2 -1
  109. package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.js +1 -1
  110. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEdgeEditing.js +341 -0
  111. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEdgeViewModel.js +103 -0
  112. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +242 -82
  113. package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +54 -0
  114. package/lib/components/pisellFloorMapLayout/hooks/useShopFloorPlanSubscription.js +7 -4
  115. package/lib/components/pisellFloorMapLayout/index.d.ts +5 -1
  116. package/lib/components/pisellFloorMapLayout/locales-ja.js +14 -2
  117. package/lib/components/pisellFloorMapLayout/locales-pt.js +14 -2
  118. package/lib/components/pisellFloorMapLayout/locales.js +161 -8
  119. package/lib/components/pisellFloorMapLayout/types.d.ts +86 -4
  120. package/lib/components/pisellFloorMapLayout/types.js +5 -0
  121. package/lib/components/pisellFloorMapLayout/utils/alignSnap.js +170 -0
  122. package/lib/components/pisellFloorMapLayout/utils/batchScenePlacementLayout.js +87 -0
  123. package/lib/components/pisellFloorMapLayout/utils/edgeRouting.js +956 -0
  124. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +7 -0
  125. package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasStage.js +23 -0
  126. package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.js +11 -2
  127. package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.js +21 -2
  128. package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.js +11 -5
  129. package/lib/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.js +5 -3
  130. package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +20 -0
  131. package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.js +64 -0
  132. package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +83 -0
  133. package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.js +29 -0
  134. package/lib/components/pisellFloorMapLayout/utils/floorMapToolbarPalette.js +54 -0
  135. package/lib/components/productCard/cartSkuCard/components/BookingItem/index.js +17 -0
  136. package/lib/components/productCard/cartSkuCard/components/BookingItem/index.less +32 -0
  137. package/lib/components/productCard/cartSkuCard/components/resources/index.less +4 -0
  138. package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +1 -2
  139. package/lib/components/productCard/cartSkuCard/index.js +17 -11
  140. package/lib/components/productCard/lineItem/BookingLineItem.js +17 -6
  141. package/lib/components/productCard/lineItem/components/Holders/index.js +53 -0
  142. package/lib/components/productCard/lineItem/components/Holders/index.less +39 -0
  143. package/lib/components/productCard/lineItem/components/Resources/index.js +47 -0
  144. package/lib/components/productCard/lineItem/components/TimeRange/index.js +67 -0
  145. package/lib/components/productCard/lineItem/index.js +5 -2
  146. package/lib/components/productCard/lineItem/index.less +21 -10
  147. package/lib/components/productCard/types.d.ts +1 -0
  148. package/lib/index.d.ts +6 -2
  149. package/lib/index.js +11 -0
  150. package/lib/pisell-materials.tw.css +3 -0
  151. package/package.json +6 -3
@@ -0,0 +1,7 @@
1
+ //#region src/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts
2
+ /**
3
+ * 合并平面图 Tab 用多语言包(与业务侧 `locales.init` 可叠加)。
4
+ */
5
+ declare function initFloorMapLayoutLocales(engineLocale: string): void;
6
+ //#endregion
7
+ export { initFloorMapLayoutLocales };
@@ -26,6 +26,28 @@ function computeFloorMapContentStage(params) {
26
26
  };
27
27
  }
28
28
  /**
29
+ * 全览网格行列:n≤3 单行;n≥4 用 ceil(√n) 列、ceil(n/cols) 行,行列接近且末行空格最少。
30
+ * 例:2→2×1,3→3×1,4→2×2,5/6→3×2,7-9→3×3,10-12→4×3。
31
+ *
32
+ * 仅供旧版「等大缩略图卡片」全览使用;新版 All 视图按原始尺寸装箱,请用
33
+ * {@link packCanvasesIntoShelves}。
34
+ */
35
+ function getOverviewGridDims(count) {
36
+ if (count <= 0) return {
37
+ cols: 1,
38
+ rows: 1
39
+ };
40
+ if (count <= 3) return {
41
+ cols: count,
42
+ rows: 1
43
+ };
44
+ const cols = Math.ceil(Math.sqrt(count));
45
+ return {
46
+ cols,
47
+ rows: Math.ceil(count / cols)
48
+ };
49
+ }
50
+ /**
29
51
  * 多画布 All 视图的紧凑装箱(Bottom-Left Fill, BLF):
30
52
  *
31
53
  * - 保留输入顺序(与 Tab 顺序一致),不旋转、不缩放,原始尺寸即渲染尺寸;
@@ -136,4 +158,4 @@ function packCanvasesIntoShelves(boxes, gap, aspectBias = 2.5) {
136
158
  };
137
159
  }
138
160
  //#endregion
139
- export { computeFloorMapContentStage, packCanvasesIntoShelves };
161
+ export { computeFloorMapContentStage, getOverviewGridDims, packCanvasesIntoShelves };
@@ -12,6 +12,11 @@ const BUILTIN_SHAPE_FALLBACK_SIZE = {
12
12
  width: 96,
13
13
  height: 96
14
14
  };
15
+ const ZONE_KIND_DEFAULT_SIZE = {
16
+ width: 240,
17
+ height: 160
18
+ };
19
+ const ZONE_DEFAULT_Z_INDEX = -100;
15
20
  function getDefaultSize(elementKind, elementKinds, element) {
16
21
  if (!elementKind) return {
17
22
  width: DEFAULT_SIZE,
@@ -22,6 +27,7 @@ function getDefaultSize(elementKind, elementKinds, element) {
22
27
  const def = getFloorMapBuiltinShapeDef(element === null || element === void 0 ? void 0 : element.builtinShapeKey);
23
28
  return def ? _objectSpread2({}, def.defaultSize) : _objectSpread2({}, BUILTIN_SHAPE_FALLBACK_SIZE);
24
29
  }
30
+ if (elementKind === "floorMapZone") return _objectSpread2({}, ZONE_KIND_DEFAULT_SIZE);
25
31
  if (!elementKinds.find((k) => k.value === elementKind)) return {
26
32
  width: DEFAULT_SIZE,
27
33
  height: DEFAULT_SIZE
@@ -39,11 +45,12 @@ function mergeCanvasItems(canvasId, config, defaultCellSize = DEFAULT_SIZE) {
39
45
  const items = [];
40
46
  const onCanvas = sceneElements.filter((el) => el.canvasId === canvasId);
41
47
  for (const el of onCanvas) {
42
- var _ref, _el$width, _ref2, _el$height, _el$shape;
48
+ var _ref, _el$width, _ref2, _el$height, _el$shape, _el$parentId;
43
49
  const size = getDefaultSize(el.elementKind, elementKinds, el);
44
50
  const w = (_ref = (_el$width = el.width) !== null && _el$width !== void 0 ? _el$width : size.width) !== null && _ref !== void 0 ? _ref : defaultCellSize;
45
51
  const h = (_ref2 = (_el$height = el.height) !== null && _el$height !== void 0 ? _el$height : size.height) !== null && _ref2 !== void 0 ? _ref2 : defaultCellSize;
46
52
  const kindConfig = getElementKindConfig({ elementKinds }, el.elementKind);
53
+ const isZone = Boolean(el.isZone) || el.elementKind === "floorMapZone";
47
54
  items.push({
48
55
  id: el.instanceId,
49
56
  instanceId: el.instanceId,
@@ -52,9 +59,11 @@ function mergeCanvasItems(canvasId, config, defaultCellSize = DEFAULT_SIZE) {
52
59
  width: w,
53
60
  height: h,
54
61
  name: el.name,
55
- zIndex: el.zIndex,
62
+ zIndex: isZone && el.zIndex == null ? ZONE_DEFAULT_Z_INDEX : el.zIndex,
56
63
  shape: (_el$shape = el.shape) !== null && _el$shape !== void 0 ? _el$shape : kindConfig === null || kindConfig === void 0 ? void 0 : kindConfig.defaultShape,
57
64
  elementKind: el.elementKind,
65
+ isZone,
66
+ parentId: (_el$parentId = el.parentId) !== null && _el$parentId !== void 0 ? _el$parentId : null,
58
67
  _sceneElement: el
59
68
  });
60
69
  }
@@ -16,6 +16,18 @@ function resolveDataBindingPolicy(kind) {
16
16
  var _kind$dataBindingPoli;
17
17
  return (_kind$dataBindingPoli = kind === null || kind === void 0 ? void 0 : kind.dataBindingPolicy) !== null && _kind$dataBindingPoli !== void 0 ? _kind$dataBindingPoli : "none";
18
18
  }
19
+ /**
20
+ * 侧栏调色板:点击即可落点,无需数据源 / 数据行等二次选择。
21
+ * 含预约「装饰」下的内置图形(厕所/分隔/柱子等)、底图图片等(`dataBindingPolicy: none`)。
22
+ * 不含舞台;内置图形须带 `builtinShapeKey` 由 {@link isDirectPlacePaletteEntry} 判断。
23
+ */
24
+ function isDirectPlacePaletteKind(kind) {
25
+ if (!kind) return false;
26
+ if (kind.value === "stage") return false;
27
+ /** 内置图形在调色板按预设展开为多张卡,不单靠 kind 落点 */
28
+ if (kind.value === "floorMapBuiltinShape") return false;
29
+ return resolveDataBindingPolicy(kind) === "none";
30
+ }
19
31
  function getElementKindConfig(config, elementKind) {
20
32
  var _config$elementKinds;
21
33
  if (!elementKind || !(config === null || config === void 0 || (_config$elementKinds = config.elementKinds) === null || _config$elementKinds === void 0 ? void 0 : _config$elementKinds.length)) return void 0;
@@ -45,8 +57,13 @@ function getSwappableElementKindsInSameCategory(config, elementKind) {
45
57
  return ((_k$categoryId = k.categoryId) !== null && _k$categoryId !== void 0 ? _k$categoryId : fallbackId) === cid;
46
58
  });
47
59
  }
48
- const DEFAULT_PLACE_W = 180;
49
- const DEFAULT_PLACE_H = 120;
60
+ /** 绑定资源类图元(dataBindingPolicy required/optional)新建默认尺寸 */
61
+ const FLOOR_MAP_RESOURCE_PLACE_DEFAULT = {
62
+ width: 300,
63
+ height: 200
64
+ };
65
+ const DEFAULT_PLACE_W = FLOOR_MAP_RESOURCE_PLACE_DEFAULT.width;
66
+ const DEFAULT_PLACE_H = FLOOR_MAP_RESOURCE_PLACE_DEFAULT.height;
50
67
  const IMAGE_PLACE_W = 400;
51
68
  const IMAGE_PLACE_H = 240;
52
69
  const DECO_SIZE = 48;
@@ -127,4 +144,4 @@ function getSceneElementRenderIssue(element, kind, dataSources) {
127
144
  return null;
128
145
  }
129
146
  //#endregion
130
- export { getElementKindConfig, getSceneElementRenderIssue, getSwappableElementKindsInSameCategory, isFloorMapBuiltinShapeElementKind, isFloorMapImageElementKind, patchSceneElementForKindSwitch, resolveDataBindingPolicy };
147
+ export { FLOOR_MAP_RESOURCE_PLACE_DEFAULT, getElementKindConfig, getSceneElementRenderIssue, getSwappableElementKindsInSameCategory, isDirectPlacePaletteKind, isFloorMapBuiltinShapeElementKind, isFloorMapImageElementKind, patchSceneElementForKindSwitch, resolveDataBindingPolicy };
@@ -1,6 +1,7 @@
1
1
  import { FLOOR_MAP_STAGE_ELEMENT_KIND } from "../types.js";
2
2
  import { STAGE_DECO_DEFAULT } from "./floorMapStageDefaults.js";
3
3
  import { isFloorMapBuiltinShapeElementKind, isFloorMapImageElementKind } from "./floorMapElementKindUtils.js";
4
+ import { FloorMapZoneElement } from "../components/FloorMapZoneElement.js";
4
5
  import { FloorMapImageElement } from "../components/FloorMapImageElement.js";
5
6
  import { FloorMapBuiltinShapeElement } from "../components/FloorMapBuiltinShapeElement.js";
6
7
  import React from "react";
@@ -33,22 +34,27 @@ function renderFloorMapFallbackPlaceholder(item) {
33
34
  const kind = (item === null || item === void 0 ? void 0 : item.elementKind) || "item";
34
35
  const isCircle = (item === null || item === void 0 ? void 0 : item.shape) === "circle";
35
36
  const isStage = kind === FLOOR_MAP_STAGE_ELEMENT_KIND;
37
+ const isZone = Boolean(item.isZone) || kind === "floorMapZone";
36
38
  const nameText = (item === null || item === void 0 ? void 0 : item.name) != null ? String(item.name).trim() : "";
37
39
  const fallbackLabel = nameText || kind;
40
+ if (isZone) {
41
+ var _item$name, _item$_sceneElement;
42
+ return /* @__PURE__ */ React.createElement(FloorMapZoneElement, { name: (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : (_item$_sceneElement = item._sceneElement) === null || _item$_sceneElement === void 0 ? void 0 : _item$_sceneElement.name });
43
+ }
38
44
  if (isFloorMapImageElementKind(kind)) {
39
- var _item$_sceneElement, _item$name, _item$_sceneElement2;
40
- const url = (_item$_sceneElement = item._sceneElement) === null || _item$_sceneElement === void 0 ? void 0 : _item$_sceneElement.imageUrl;
45
+ var _item$_sceneElement2, _item$name2, _item$_sceneElement3;
46
+ const url = (_item$_sceneElement2 = item._sceneElement) === null || _item$_sceneElement2 === void 0 ? void 0 : _item$_sceneElement2.imageUrl;
41
47
  return /* @__PURE__ */ React.createElement(FloorMapImageElement, {
42
48
  imageUrl: url,
43
- name: (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : (_item$_sceneElement2 = item._sceneElement) === null || _item$_sceneElement2 === void 0 ? void 0 : _item$_sceneElement2.name
49
+ name: (_item$name2 = item.name) !== null && _item$name2 !== void 0 ? _item$name2 : (_item$_sceneElement3 = item._sceneElement) === null || _item$_sceneElement3 === void 0 ? void 0 : _item$_sceneElement3.name
44
50
  });
45
51
  }
46
52
  if (isFloorMapBuiltinShapeElementKind(kind)) {
47
- var _item$name2;
53
+ var _item$name3;
48
54
  const el = item._sceneElement;
49
55
  return /* @__PURE__ */ React.createElement(FloorMapBuiltinShapeElement, {
50
56
  builtinShapeKey: el === null || el === void 0 ? void 0 : el.builtinShapeKey,
51
- name: (_item$name2 = item.name) !== null && _item$name2 !== void 0 ? _item$name2 : el === null || el === void 0 ? void 0 : el.name,
57
+ name: (_item$name3 = item.name) !== null && _item$name3 !== void 0 ? _item$name3 : el === null || el === void 0 ? void 0 : el.name,
52
58
  fillColor: el === null || el === void 0 ? void 0 : el.fillColor,
53
59
  strokeColor: el === null || el === void 0 ? void 0 : el.strokeColor
54
60
  });
@@ -1,7 +1,7 @@
1
1
  import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
2
2
  import { mergeCanvasesForTabs } from "./mergeCanvasesForTabs.js";
3
- import { mergeCanvasItems } from "./floorMapConfigMerge.js";
4
3
  import { gapToPx } from "./layoutMeasurements.js";
4
+ import { mergeCanvasItems } from "./floorMapConfigMerge.js";
5
5
  import { computeFloorMapContentStage, packCanvasesIntoShelves } from "./floorMapCanvasStage.js";
6
6
  //#region src/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.ts
7
7
  /**
@@ -44,16 +44,18 @@ function buildFloorMapOverviewLayout(params) {
44
44
  cellSize
45
45
  };
46
46
  });
47
+ const titleBandHeight = 36;
47
48
  const pack = packCanvasesIntoShelves(stageList.map((s) => ({
48
49
  width: s.contentWidth,
49
- height: s.contentHeight
50
+ height: s.contentHeight + titleBandHeight
50
51
  })), areaGap);
51
52
  return {
52
53
  areas: stageList.map((s, i) => {
53
54
  var _pack$positions$i$x, _pack$positions$i, _pack$positions$i$y, _pack$positions$i2;
54
55
  return _objectSpread2(_objectSpread2({}, s), {}, {
55
56
  x: (_pack$positions$i$x = (_pack$positions$i = pack.positions[i]) === null || _pack$positions$i === void 0 ? void 0 : _pack$positions$i.x) !== null && _pack$positions$i$x !== void 0 ? _pack$positions$i$x : 0,
56
- y: (_pack$positions$i$y = (_pack$positions$i2 = pack.positions[i]) === null || _pack$positions$i2 === void 0 ? void 0 : _pack$positions$i2.y) !== null && _pack$positions$i$y !== void 0 ? _pack$positions$i$y : 0
57
+ y: (_pack$positions$i$y = (_pack$positions$i2 = pack.positions[i]) === null || _pack$positions$i2 === void 0 ? void 0 : _pack$positions$i2.y) !== null && _pack$positions$i$y !== void 0 ? _pack$positions$i$y : 0,
58
+ titleBandHeight
57
59
  });
58
60
  }),
59
61
  totalWidth: pack.totalWidth,
@@ -0,0 +1,20 @@
1
+ import { PisellCardPickerCategoryConfig, PisellCardPickerItem } from "./floorMapResourcePickerTypes.js";
2
+
3
+ //#region src/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts
4
+ /** @deprecated 使用 PisellCardPickerItem */
5
+ type FloorMapResourcePickerRecord = PisellCardPickerItem;
6
+ interface FloorMapResourcePickerCardMeta {
7
+ id: string;
8
+ title: string;
9
+ subtitles: string[];
10
+ capacity: string | null;
11
+ }
12
+ /** 平面图 / 预约:area 最多三级;仅展示 chip,不显示行左侧「区域」等标签 */
13
+ declare function getFloorMapCardPickerCategoryConfig(): PisellCardPickerCategoryConfig;
14
+ /**
15
+ * 小卡片主标题 + 副文案(容量、编号等;区域已在筛选区展示,副文案不再重复 area)。
16
+ */
17
+ declare function getFloorMapResourcePickerCardMeta(record: PisellCardPickerItem): FloorMapResourcePickerCardMeta;
18
+ declare function floorMapResourcePickerRecordSearchText(record: PisellCardPickerItem): string;
19
+ //#endregion
20
+ export { FloorMapResourcePickerRecord, floorMapResourcePickerRecordSearchText, getFloorMapCardPickerCategoryConfig, getFloorMapResourcePickerCardMeta };
@@ -0,0 +1,62 @@
1
+ import { formatDataRecordOptionLabel } from "./floorMapDataRecordLabel.js";
2
+ import { parseNestedPathSegments } from "./floorMapResourcePickerTypes.js";
3
+ //#region src/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.ts
4
+ function pickField(record, key) {
5
+ const raw = record[key];
6
+ if (raw == null) return null;
7
+ const t = String(raw).trim();
8
+ return t ? t : null;
9
+ }
10
+ function resolveReservationAreaRaw(record) {
11
+ return pickField(record, "area");
12
+ }
13
+ /**
14
+ * 预约桌位:从 `area` 解析路径,最多 3 段。
15
+ * 当前资源多为单段(如 `party_room1`);将来 `广东/中山/三乡` 会自动出现二、三级筛选行。
16
+ */
17
+ function getFloorMapResourcePickerCategoryPath(record) {
18
+ return parseNestedPathSegments(resolveReservationAreaRaw(record), 3);
19
+ }
20
+ /** 平面图 / 预约:area 最多三级;仅展示 chip,不显示行左侧「区域」等标签 */
21
+ function getFloorMapCardPickerCategoryConfig() {
22
+ return {
23
+ mode: "nested",
24
+ levels: [
25
+ {},
26
+ {},
27
+ {}
28
+ ],
29
+ getCategoryPath: getFloorMapResourcePickerCategoryPath
30
+ };
31
+ }
32
+ /**
33
+ * 小卡片主标题 + 副文案(容量、编号等;区域已在筛选区展示,副文案不再重复 area)。
34
+ */
35
+ function getFloorMapResourcePickerCardMeta(record) {
36
+ var _pickField, _record$id;
37
+ const title = formatDataRecordOptionLabel(record);
38
+ const subtitles = [];
39
+ const capacityRaw = (_pickField = pickField(record, "capacityLabel")) !== null && _pickField !== void 0 ? _pickField : pickField(record, "capacity");
40
+ const capacity = capacityRaw ? String(capacityRaw) : null;
41
+ const idStr = String((_record$id = record.id) !== null && _record$id !== void 0 ? _record$id : "").trim();
42
+ if (idStr && idStr !== title) subtitles.push(`#${idStr}`);
43
+ return {
44
+ id: idStr,
45
+ title,
46
+ subtitles,
47
+ capacity
48
+ };
49
+ }
50
+ function floorMapResourcePickerRecordSearchText(record) {
51
+ const meta = getFloorMapResourcePickerCardMeta(record);
52
+ const areaRaw = resolveReservationAreaRaw(record);
53
+ return [
54
+ meta.title,
55
+ areaRaw,
56
+ meta.capacity,
57
+ ...meta.subtitles,
58
+ meta.id
59
+ ].filter(Boolean).join(" ").toLowerCase();
60
+ }
61
+ //#endregion
62
+ export { floorMapResourcePickerRecordSearchText, getFloorMapCardPickerCategoryConfig, getFloorMapResourcePickerCardMeta };
@@ -0,0 +1,83 @@
1
+ import { ReactNode } from "react";
2
+
3
+ //#region src/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts
4
+ /** 选择模式 */
5
+ type PisellCardPickerMode = 'single' | 'multiple';
6
+ /** 可选条目:至少包含稳定主键 id */
7
+ interface PisellCardPickerItem {
8
+ id: string;
9
+ [key: string]: unknown;
10
+ }
11
+ /** 分类路径,最多 3 级(不足时后续为 null;未选层级表示「全部」) */
12
+ type PisellCardPickerCategoryPath = [string | null | undefined, string | null | undefined, string | null | undefined];
13
+ /** 单级分类配置(最多 3 级) */
14
+ interface PisellCardPickerCategoryLevelConfig {
15
+ /** 嵌套模式下该级行左侧标签(如「省」「市」「区/镇」) */
16
+ label?: string;
17
+ /**
18
+ * parallel 模式:从 item[field] 读取该维度的 key。
19
+ * nested 模式:请用 getCategoryPath / nestedPathField 从单字段拆路径。
20
+ */
21
+ field?: string;
22
+ }
23
+ /**
24
+ * nested:同一维度嵌套分级(广东 → 中山 → 三乡),子级依赖父级已选。
25
+ * parallel:三个独立维度(每级互不影响)。
26
+ */
27
+ type PisellCardPickerCategoryMode = 'nested' | 'parallel';
28
+ /** 分类筛选配置(最多 3 级;数据只有 1 级时 UI 只展示有值的那一行) */
29
+ interface PisellCardPickerCategoryConfig {
30
+ /** 默认 nested */
31
+ mode?: PisellCardPickerCategoryMode;
32
+ /**
33
+ * 最多 3 级配置位。
34
+ * nested:单字段拆路径;仅 1 段时只出现第 1 行,多段时再逐级出现。
35
+ */
36
+ levels: [PisellCardPickerCategoryLevelConfig?, PisellCardPickerCategoryLevelConfig?, PisellCardPickerCategoryLevelConfig?];
37
+ /** 自定义 [L1,L2,L3];优先于 levels[].field */
38
+ getCategoryPath?: (item: PisellCardPickerItem) => PisellCardPickerCategoryPath;
39
+ /**
40
+ * nested 便捷项:从 item[nestedPathField] 用 `/` `>` 等拆成最多 3 段。
41
+ * 与 getCategoryPath 同时存在时以 getCategoryPath 为准。
42
+ */
43
+ nestedPathField?: string;
44
+ }
45
+ interface PisellCardPickerCardMeta {
46
+ title: string;
47
+ subtitles: string[];
48
+ /** 容量/人数;卡片副文案前可由业务侧渲染人数图标(如平面图资源选择) */
49
+ capacity?: string;
50
+ }
51
+ /**
52
+ * 平面图工具栏「打开资源选择」槽位 props。
53
+ * 与 `PisellProResourcePickerModalProps` 字段对齐;业务注入 modal 时可透传
54
+ * `categoryConfig` / `getSearchText` / `getCardMeta` 等扩展项。
55
+ */
56
+ interface FloorMapResourcePickerSlotProps {
57
+ open: boolean;
58
+ onClose: () => void;
59
+ onConfirm: (selectedIds: string[]) => void;
60
+ records: PisellCardPickerItem[];
61
+ mode?: PisellCardPickerMode;
62
+ value?: string[];
63
+ title?: string;
64
+ disabledIds?: string[];
65
+ /** 最多三级分类;不传则仅搜索 + 列表 */
66
+ categoryConfig?: PisellCardPickerCategoryConfig;
67
+ getSearchText?: (record: PisellCardPickerItem) => string;
68
+ getCardMeta?: (record: PisellCardPickerItem) => PisellCardPickerCardMeta;
69
+ renderCard?: (record: PisellCardPickerItem, ctx: {
70
+ selected: boolean;
71
+ disabled: boolean;
72
+ }) => ReactNode;
73
+ zIndex?: number;
74
+ width?: number;
75
+ className?: string;
76
+ }
77
+ /**
78
+ * 把单字段中的层级路径解析为 [L1, L2, L3]。
79
+ * 例:`广东/中山/三乡` → `['广东','中山','三乡']`;不足三级后续为 null。
80
+ */
81
+ declare function parseNestedPathSegments(raw: unknown, maxDepth?: number): PisellCardPickerCategoryPath;
82
+ //#endregion
83
+ export { FloorMapResourcePickerSlotProps, PisellCardPickerCardMeta, PisellCardPickerCategoryConfig, PisellCardPickerCategoryLevelConfig, PisellCardPickerCategoryMode, PisellCardPickerCategoryPath, PisellCardPickerItem, PisellCardPickerMode, parseNestedPathSegments };
@@ -0,0 +1,29 @@
1
+ //#region src/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.ts
2
+ /** 将「广东/中山/三乡」类字符串拆成最多 3 段(嵌套路径,非三个独立维度) */
3
+ const NESTED_PATH_SPLIT = /(?:\s*\/\s*|\s*>\s*|\s*\\\s*|\s*\|\s*|\s*·\s*)/;
4
+ /**
5
+ * 把单字段中的层级路径解析为 [L1, L2, L3]。
6
+ * 例:`广东/中山/三乡` → `['广东','中山','三乡']`;不足三级后续为 null。
7
+ */
8
+ function parseNestedPathSegments(raw, maxDepth = 3) {
9
+ var _parts$, _parts$2, _parts$3;
10
+ if (raw == null) return [
11
+ null,
12
+ null,
13
+ null
14
+ ];
15
+ const t = String(raw).trim();
16
+ if (!t) return [
17
+ null,
18
+ null,
19
+ null
20
+ ];
21
+ const parts = t.split(NESTED_PATH_SPLIT).map((s) => s.trim()).filter(Boolean).slice(0, maxDepth);
22
+ return [
23
+ (_parts$ = parts[0]) !== null && _parts$ !== void 0 ? _parts$ : null,
24
+ (_parts$2 = parts[1]) !== null && _parts$2 !== void 0 ? _parts$2 : null,
25
+ (_parts$3 = parts[2]) !== null && _parts$3 !== void 0 ? _parts$3 : null
26
+ ];
27
+ }
28
+ //#endregion
29
+ export { parseNestedPathSegments };
@@ -0,0 +1,51 @@
1
+ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
2
+ import "../types.js";
3
+ import { FLOOR_MAP_BUILTIN_SHAPES } from "./floorMapBuiltinShapes.js";
4
+ //#region src/components/pisellFloorMapLayout/utils/floorMapToolbarPalette.ts
5
+ /** 解析侧栏每类展示上限(至少 1) */
6
+ function resolvePaletteSidebarVisibleLimit(limit) {
7
+ return Math.max(1, Math.floor(limit !== null && limit !== void 0 ? limit : 5));
8
+ }
9
+ /** 分类下图元数是否应显示「查看全部」 */
10
+ function shouldShowPaletteViewAll(entryCount, limit) {
11
+ return entryCount > resolvePaletteSidebarVisibleLimit(limit);
12
+ }
13
+ /** 侧栏直接展示的 palette 条目(前 N 项) */
14
+ function getPaletteSidebarVisibleEntries(entries, limit) {
15
+ return entries.slice(0, resolvePaletteSidebarVisibleLimit(limit));
16
+ }
17
+ function buildToolbarPaletteEntries(kinds, resolveBuiltinLabel) {
18
+ const out = [];
19
+ for (const kind of kinds) {
20
+ if (kind.value === "floorMapBuiltinShape") {
21
+ for (const shapeDef of FLOOR_MAP_BUILTIN_SHAPES) out.push({
22
+ key: `builtin:${kind.value}:${shapeDef.key}`,
23
+ kind,
24
+ builtinShapeKey: shapeDef.key,
25
+ shapeDef,
26
+ label: resolveBuiltinLabel(shapeDef)
27
+ });
28
+ continue;
29
+ }
30
+ out.push({
31
+ key: `kind:${kind.value}`,
32
+ kind,
33
+ label: kind.label
34
+ });
35
+ }
36
+ return out;
37
+ }
38
+ /**
39
+ * 按弹窗内各条目数量展开为落点列表(数量为 n 则重复 n 次,落点时阶梯偏移)。
40
+ */
41
+ function expandPaletteEntriesByQuantity(entries, quantities) {
42
+ const out = [];
43
+ for (const e of entries) {
44
+ var _quantities$e$key;
45
+ const n = Math.max(0, Math.floor((_quantities$e$key = quantities[e.key]) !== null && _quantities$e$key !== void 0 ? _quantities$e$key : 0));
46
+ for (let i = 0; i < n; i += 1) out.push(_objectSpread2({ elementKind: e.kind.value }, e.builtinShapeKey ? { builtinShapeKey: e.builtinShapeKey } : {}));
47
+ }
48
+ return out;
49
+ }
50
+ //#endregion
51
+ export { buildToolbarPaletteEntries, expandPaletteEntriesByQuantity, getPaletteSidebarVisibleEntries, shouldShowPaletteViewAll };
@@ -0,0 +1,14 @@
1
+ import TimeRange from "../timeRange/index.js";
2
+ import Resources from "../resources/index.js";
3
+ import React from "react";
4
+ import { Divider } from "antd";
5
+ import classNames from "classnames";
6
+ import "./index.less";
7
+ //#region src/components/productCard/cartSkuCard/components/BookingItem/index.tsx
8
+ const PREFIX = "pisell-cart-sku-card-booking-item";
9
+ const BookingItem = (props) => {
10
+ const { children, isShowRelatedProduct = true, isShowDelete = false, dataSource } = props;
11
+ return /* @__PURE__ */ React.createElement("div", { className: PREFIX }, /* @__PURE__ */ React.createElement("div", { className: classNames(`${PREFIX}__info`, { [`${PREFIX}__info--with-delete`]: isShowDelete }) }, /* @__PURE__ */ React.createElement(TimeRange, { dataSource }), /* @__PURE__ */ React.createElement(Resources, { dataSource })), isShowRelatedProduct && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Divider, { style: { margin: 0 } }), /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__related-product` }, children)));
12
+ };
13
+ //#endregion
14
+ export { BookingItem as default };
@@ -0,0 +1,32 @@
1
+ .pisell-cart-sku-card-booking-item {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 4px;
5
+
6
+ &__info {
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: 4px;
10
+ min-width: 0;
11
+
12
+ &--with-delete {
13
+ padding-right: 44px;
14
+ }
15
+ }
16
+
17
+ &__resource-title {
18
+ color: var(--Gray-900, #101828);
19
+ font-size: 16px;
20
+ font-weight: 600;
21
+ line-height: 24px;
22
+ overflow: hidden;
23
+ text-overflow: ellipsis;
24
+ white-space: nowrap;
25
+ }
26
+
27
+ &__related-product {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 4px;
31
+ }
32
+ }
@@ -15,5 +15,9 @@
15
15
  overflow: hidden;
16
16
  text-overflow: ellipsis;
17
17
  margin: 0;
18
+
19
+ .resource-icon {
20
+ margin-right: 2px;
21
+ }
18
22
  }
19
23
  }
@@ -2,7 +2,6 @@ import IconFont from "../../../../iconfont/index.js";
2
2
  import { getServiceTime } from "../../../utils.js";
3
3
  import { PREFIX } from "../../index.js";
4
4
  import React, { useEffect, useMemo } from "react";
5
- import { Divider } from "antd";
6
5
  import dayjs from "dayjs";
7
6
  import "dayjs/locale/zh-cn";
8
7
  import "dayjs/locale/en";
@@ -32,7 +31,7 @@ const TimeRange = (props) => {
32
31
  useMemo(() => {
33
32
  return isEn ? "HH:mm DD/MM/YYYY" : "YYYY-MM-DD HH:mm";
34
33
  }, [isEn]);
35
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Divider, { style: { margin: "0" } }), /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__time-range` }, /* @__PURE__ */ React.createElement(IconFont, {
34
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}__time-range` }, /* @__PURE__ */ React.createElement(IconFont, {
36
35
  className: "time-icon",
37
36
  type: "pisell2-clock"
38
37
  }), getServiceTime(dataSource, start_date)));
@@ -17,6 +17,7 @@ import Footer from "./components/AmountFooter/index.js";
17
17
  import MultiDay from "./components/MultiDay/index.js";
18
18
  import Promotion from "./components/Promotion/index.js";
19
19
  import Gift from "./components/Gift/index.js";
20
+ import BookingItem from "./components/BookingItem/index.js";
20
21
  import React, { useMemo, useRef } from "react";
21
22
  import { locales } from "@pisell/utils";
22
23
  import classNames from "classnames";
@@ -44,15 +45,17 @@ const _excluded = [
44
45
  "onPromotion",
45
46
  "onGift",
46
47
  "onChangeHolder",
48
+ "itemType",
47
49
  "type",
48
50
  "rightActions",
49
51
  "escapeDom",
50
- "maxSpecsCount"
52
+ "maxSpecsCount",
53
+ "isShowRelatedProduct"
51
54
  ];
52
55
  const PREFIX = "pisell-cart-sku-card";
53
56
  const CartSkuCard = (props) => {
54
57
  var _context$appHelper$ut;
55
- const { dataSource = defaultValue.dataSource, isShowImage = defaultValue.isShowImage, isShowOriginalPrice = defaultValue.isShowOriginalPrice, isShowHolder = defaultValue.isShowHolder, isShowNote = defaultValue.isShowNote, isShowDelete = defaultValue.isShowDelete, isShowAmountFooter = defaultValue.isShowAmountFooter, isShowPackageNote = defaultValue.isShowPackageNote, isShowEditProduct = defaultValue.isShowEditProduct, disabledClick = defaultValue.disabledClick, disabledEditClick = defaultValue.disabledEditClick, onEditProduct, onAction, onDelete, onNote, onLike, onCard, onChangeResource, onPromotion, onGift, onChangeHolder, type, rightActions = [], escapeDom, maxSpecsCount = 1 } = props, other = _objectWithoutProperties(props, _excluded);
58
+ const { dataSource = defaultValue.dataSource, isShowImage = defaultValue.isShowImage, isShowOriginalPrice = defaultValue.isShowOriginalPrice, isShowHolder = defaultValue.isShowHolder, isShowNote = defaultValue.isShowNote, isShowDelete = defaultValue.isShowDelete, isShowAmountFooter = defaultValue.isShowAmountFooter, isShowPackageNote = defaultValue.isShowPackageNote, isShowEditProduct = defaultValue.isShowEditProduct, disabledClick = defaultValue.disabledClick, disabledEditClick = defaultValue.disabledEditClick, onEditProduct, onAction, onDelete, onNote, onLike, onCard, onChangeResource, onPromotion, onGift, onChangeHolder, itemType = "product", type, rightActions = [], escapeDom, maxSpecsCount = 1, isShowRelatedProduct = true } = props, other = _objectWithoutProperties(props, _excluded);
56
59
  const useOpenNoteRef = useRef();
57
60
  const context = useEngineContext();
58
61
  locales.init(locales_default, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get("umi_locale")) || "en");
@@ -68,13 +71,11 @@ const CartSkuCard = (props) => {
68
71
  color: "white",
69
72
  cursor: "pointer",
70
73
  padding: "10px 0px"
71
- } }, /* @__PURE__ */ React.createElement(IconFont, {
72
- type: "pisell2-trash-01",
73
- style: {
74
- fontSize: 20,
75
- marginRight: 4
76
- }
77
- }), /* @__PURE__ */ React.createElement("span", { style: {
74
+ } }, /* @__PURE__ */ React.createElement("span", { style: {
75
+ fontSize: 20,
76
+ marginRight: 4,
77
+ lineHeight: 1
78
+ } }, /* @__PURE__ */ React.createElement(IconFont, { type: "pisell2-trash-01" })), /* @__PURE__ */ React.createElement("span", { style: {
78
79
  fontSize: 12,
79
80
  fontWeight: 500
80
81
  } }, locales.getText("pisell2.cart.sku-card.actions.delete"))),
@@ -140,7 +141,7 @@ const CartSkuCard = (props) => {
140
141
  isShowEditProduct,
141
142
  disabledEditClick,
142
143
  onEditProduct
143
- }), /* @__PURE__ */ React.createElement(TimeRange, { dataSource }), /* @__PURE__ */ React.createElement(Resources, { dataSource }), /* @__PURE__ */ React.createElement(Packages, {
144
+ }), itemType !== "booking" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TimeRange, { dataSource }), /* @__PURE__ */ React.createElement(Resources, { dataSource })) : null, /* @__PURE__ */ React.createElement(Packages, {
144
145
  dataSource,
145
146
  isShowImage
146
147
  }), /* @__PURE__ */ React.createElement(Sales, {
@@ -202,6 +203,7 @@ const CartSkuCard = (props) => {
202
203
  return renderA2();
203
204
  };
204
205
  if (dataSource === null || dataSource === void 0 ? void 0 : dataSource.isGift) return null;
206
+ const content = renderContent();
205
207
  return /* @__PURE__ */ React.createElement("div", { className: `${PREFIX}-wrapper-container` }, /* @__PURE__ */ React.createElement(SwipeAction, {
206
208
  closeOnAction: false,
207
209
  className: classNames(`${PREFIX}-wrapper`),
@@ -215,7 +217,11 @@ const CartSkuCard = (props) => {
215
217
  e.stopPropagation();
216
218
  onCard === null || onCard === void 0 || onCard(dataSource);
217
219
  }
218
- }, renderContent())), /* @__PURE__ */ React.createElement(Gift, _objectSpread2(_objectSpread2({}, (dataSource === null || dataSource === void 0 ? void 0 : dataSource.giftData) || {}), {}, { onClick: () => onGift === null || onGift === void 0 ? void 0 : onGift(dataSource) })));
220
+ }, itemType === "booking" ? /* @__PURE__ */ React.createElement(BookingItem, {
221
+ dataSource,
222
+ isShowRelatedProduct,
223
+ isShowDelete
224
+ }, content) : content)), /* @__PURE__ */ React.createElement(Gift, _objectSpread2(_objectSpread2({}, (dataSource === null || dataSource === void 0 ? void 0 : dataSource.giftData) || {}), {}, { onClick: () => onGift === null || onGift === void 0 ? void 0 : onGift(dataSource) })));
219
225
  };
220
226
  //#endregion
221
227
  export { PREFIX, CartSkuCard as default };