@pisell/materials 6.3.4 → 6.4.2

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 (267) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +4 -4
  6. package/build/lowcode/preview.js +150 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +28 -24
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +34 -30
  11. package/es/components/DragSortList/index.js +6 -6
  12. package/es/components/classicLayout/index.js +4 -5
  13. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  14. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  16. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  17. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  18. package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
  19. package/es/components/filter/index.d.ts +1 -0
  20. package/es/components/icon/index.js +5 -5
  21. package/es/components/iconfont/index.js +1 -1
  22. package/es/components/list/index.d.ts +1 -0
  23. package/es/components/list/index.js +6 -6
  24. package/es/components/pisell-config-provider/context.d.ts +2 -0
  25. package/es/components/pisell-config-provider/index.d.ts +1 -0
  26. package/es/components/pisellAdjustPrice/index.js +5 -1
  27. package/es/components/pisellAdjustPrice/type.d.ts +2 -0
  28. package/es/components/pisellCardList/index.d.ts +32 -2
  29. package/es/components/pisellCardList/index.js +42 -3
  30. package/es/components/pisellCardList/index.less +9 -1
  31. package/es/components/pisellCheckboxGroup/index.d.ts +4 -0
  32. package/es/components/pisellCheckboxGroup/index.js +23 -4
  33. package/es/components/pisellCheckboxGroup/index.less +28 -1
  34. package/es/components/pisellGoodPassCard/index.d.ts +1 -0
  35. package/es/components/pisellGoodPassCard/index.js +17 -5
  36. package/es/components/pisellText/components/Amount/index.js +2 -1
  37. package/es/components/pisellToast/index.js +3 -0
  38. package/es/components/pisellWalletPassCard/index.d.ts +53 -1
  39. package/es/components/pisellWalletPassCard/index.js +333 -75
  40. package/es/components/pisellWalletPassCard/index.less +48 -11
  41. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  42. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
  43. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  44. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  45. package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +82 -0
  46. package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  47. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  48. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +56 -0
  49. package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
  50. package/es/components/productCard/cartSkuCard/components/Note/index.js +29 -0
  51. package/es/components/productCard/cartSkuCard/components/Note/index.less +27 -0
  52. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
  53. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +93 -0
  54. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
  55. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  56. package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
  57. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  58. package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
  59. package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
  60. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  61. package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
  62. package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  63. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  64. package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
  65. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  66. package/es/components/productCard/cartSkuCard/components/resources/index.js +39 -0
  67. package/es/components/productCard/cartSkuCard/components/resources/index.less +19 -0
  68. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
  69. package/es/components/productCard/cartSkuCard/components/sales/index.js +57 -0
  70. package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  71. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  72. package/es/components/productCard/cartSkuCard/components/specs/index.js +44 -0
  73. package/es/components/productCard/cartSkuCard/components/specs/index.less +34 -0
  74. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +45 -0
  75. package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +292 -0
  76. package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
  77. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  78. package/es/components/productCard/cartSkuCard/components/timeRange/index.js +54 -0
  79. package/es/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
  80. package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
  81. package/es/components/productCard/cartSkuCard/index.js +201 -0
  82. package/es/components/productCard/cartSkuCard/index.less +33 -0
  83. package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
  84. package/es/components/productCard/cartSkuCard/locales.js +30 -0
  85. package/es/components/productCard/components/Action/index.js +14 -1
  86. package/es/components/productCard/components/Action/index.less +3 -0
  87. package/es/components/productCard/components/Header/index.js +23 -8
  88. package/es/components/productCard/components/Header/index.less +16 -1
  89. package/es/components/productCard/components/Sales/index.js +2 -2
  90. package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +3 -1
  91. package/es/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
  92. package/es/components/productCard/index.d.ts +3 -1
  93. package/es/components/productCard/index.js +5 -2
  94. package/es/components/productCard/index.less +6 -0
  95. package/es/components/productCard/locales.js +3 -0
  96. package/es/components/qrcode/index.js +1 -1
  97. package/es/components/sort/components/InlineMenu/index.js +1 -1
  98. package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
  99. package/es/components/table/Actions/component/ViewMode/index.js +1 -1
  100. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +4 -5
  101. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  102. package/es/components/table/Header/Buttons/index.js +5 -5
  103. package/es/components/table/Table/AddFieldModal/index.d.ts +1 -0
  104. package/es/components/table/Table/AddFieldModal/index.js +13 -13
  105. package/es/components/table/Table/AddFieldModal/index.less +11 -11
  106. package/es/components/table/Table/SelectField/index.d.ts +1 -0
  107. package/es/components/table/Table/SelectField/index.js +4 -4
  108. package/es/components/table/Table/fields/date/Edit/index.js +1 -1
  109. package/es/components/table/Table/fields/index.d.ts +3 -2
  110. package/es/components/table/Table/fields/link/Edit/index.js +5 -5
  111. package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
  112. package/es/components/table/Table/fields/search/filterUtil/index.js +0 -1
  113. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  114. package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
  115. package/es/components/table/Table/fields/text/Show/index.js +4 -4
  116. package/es/components/table/Table/fields/text/filterUtil/index.js +0 -1
  117. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  118. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  119. package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
  120. package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
  121. package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
  122. package/es/components/table/Table/utils.d.ts +1 -1
  123. package/es/components/table/hooks/useMergeColumnSetting.js +1 -2
  124. package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
  125. package/es/components/table/hooks/useTransFilterSetting.js +5 -5
  126. package/es/components/translation/utils.js +5 -5
  127. package/es/components/virtual-keyboard/Number/index.js +4 -1
  128. package/es/components/virtual-keyboard/Number/types.d.ts +1 -0
  129. package/es/components/virtual-keyboard/index.d.ts +11 -0
  130. package/es/components/virtual-keyboard/index.js +88 -3
  131. package/es/components/virtual-keyboard/index.less +33 -1
  132. package/es/components/walletCard/Guide/index.js +12 -1
  133. package/es/hooks/useResponsive.js +2 -2
  134. package/es/index.d.ts +1 -0
  135. package/es/locales/en-US.d.ts +6 -0
  136. package/es/locales/en-US.js +9 -2
  137. package/es/locales/zh-CN.d.ts +6 -0
  138. package/es/locales/zh-CN.js +9 -2
  139. package/es/locales/zh-TW.d.ts +6 -0
  140. package/es/locales/zh-TW.js +9 -2
  141. package/es/utils/hoc.js +1 -1
  142. package/es/utils/index.d.ts +1 -1
  143. package/es/utils/miniRedux.js +8 -9
  144. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  145. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  146. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  147. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  148. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  149. package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
  150. package/lib/components/filter/index.d.ts +1 -0
  151. package/lib/components/iconfont/index.js +1 -1
  152. package/lib/components/list/index.d.ts +1 -0
  153. package/lib/components/lowCodePage/index.js +1 -2
  154. package/lib/components/pisell-config-provider/context.d.ts +2 -0
  155. package/lib/components/pisell-config-provider/index.d.ts +1 -0
  156. package/lib/components/pisellAdjustPrice/index.js +4 -0
  157. package/lib/components/pisellAdjustPrice/type.d.ts +2 -0
  158. package/lib/components/pisellCardList/index.d.ts +32 -2
  159. package/lib/components/pisellCardList/index.js +42 -3
  160. package/lib/components/pisellCardList/index.less +9 -1
  161. package/lib/components/pisellCheckboxGroup/index.d.ts +4 -0
  162. package/lib/components/pisellCheckboxGroup/index.js +22 -1
  163. package/lib/components/pisellCheckboxGroup/index.less +28 -1
  164. package/lib/components/pisellGoodPassCard/index.d.ts +1 -0
  165. package/lib/components/pisellGoodPassCard/index.js +31 -4
  166. package/lib/components/pisellText/components/Amount/index.js +2 -1
  167. package/lib/components/pisellToast/index.js +3 -0
  168. package/lib/components/pisellWalletPassCard/index.d.ts +53 -1
  169. package/lib/components/pisellWalletPassCard/index.js +253 -59
  170. package/lib/components/pisellWalletPassCard/index.less +48 -11
  171. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  172. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
  173. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  174. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  175. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +71 -0
  176. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  177. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  178. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +77 -0
  179. package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
  180. package/lib/components/productCard/cartSkuCard/components/Note/index.js +56 -0
  181. package/lib/components/productCard/cartSkuCard/components/Note/index.less +27 -0
  182. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
  183. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +82 -0
  184. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
  185. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  186. package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
  187. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  188. package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
  189. package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
  190. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  191. package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
  192. package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  193. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  194. package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
  195. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  196. package/lib/components/productCard/cartSkuCard/components/resources/index.js +71 -0
  197. package/lib/components/productCard/cartSkuCard/components/resources/index.less +19 -0
  198. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
  199. package/lib/components/productCard/cartSkuCard/components/sales/index.js +77 -0
  200. package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  201. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  202. package/lib/components/productCard/cartSkuCard/components/specs/index.js +66 -0
  203. package/lib/components/productCard/cartSkuCard/components/specs/index.less +34 -0
  204. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +45 -0
  205. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +339 -0
  206. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +35 -0
  207. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  208. package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +68 -0
  209. package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
  210. package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
  211. package/lib/components/productCard/cartSkuCard/index.js +239 -0
  212. package/lib/components/productCard/cartSkuCard/index.less +33 -0
  213. package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
  214. package/lib/components/productCard/cartSkuCard/locales.js +61 -0
  215. package/lib/components/productCard/components/Action/index.js +9 -0
  216. package/lib/components/productCard/components/Action/index.less +3 -0
  217. package/lib/components/productCard/components/Header/index.js +21 -11
  218. package/lib/components/productCard/components/Header/index.less +16 -1
  219. package/lib/components/productCard/components/Sales/index.js +2 -2
  220. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
  221. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
  222. package/lib/components/productCard/index.d.ts +3 -1
  223. package/lib/components/productCard/index.js +6 -2
  224. package/lib/components/productCard/index.less +6 -0
  225. package/lib/components/productCard/locales.js +12 -3
  226. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  227. package/lib/components/table/Table/AddFieldModal/index.d.ts +1 -0
  228. package/lib/components/table/Table/AddFieldModal/index.js +9 -9
  229. package/lib/components/table/Table/AddFieldModal/index.less +11 -11
  230. package/lib/components/table/Table/SelectField/index.d.ts +1 -0
  231. package/lib/components/table/Table/fields/date/filterUtil/index.js +3 -6
  232. package/lib/components/table/Table/fields/index.d.ts +3 -2
  233. package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +4 -8
  234. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  235. package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
  236. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  237. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  238. package/lib/components/table/Table/fields/utils/index.js +1 -2
  239. package/lib/components/table/Table/utils.d.ts +1 -1
  240. package/lib/components/virtual-keyboard/Number/index.js +3 -0
  241. package/lib/components/virtual-keyboard/Number/types.d.ts +1 -0
  242. package/lib/components/virtual-keyboard/index.d.ts +11 -0
  243. package/lib/components/virtual-keyboard/index.js +60 -2
  244. package/lib/components/virtual-keyboard/index.less +33 -1
  245. package/lib/components/walletCard/Guide/index.js +11 -1
  246. package/lib/hooks/useResponsive.js +3 -6
  247. package/lib/index.d.ts +1 -0
  248. package/lib/locales/en-US.d.ts +6 -0
  249. package/lib/locales/en-US.js +9 -2
  250. package/lib/locales/zh-CN.d.ts +6 -0
  251. package/lib/locales/zh-CN.js +9 -2
  252. package/lib/locales/zh-TW.d.ts +6 -0
  253. package/lib/locales/zh-TW.js +9 -2
  254. package/lib/utils/index.d.ts +1 -1
  255. package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
  256. package/lowcode/pisell-card-list/meta.ts +50 -1
  257. package/lowcode/pisell-wallet-pass-card/actionsMeta.ts +7 -0
  258. package/lowcode/virtual-keyboard/meta.ts +131 -0
  259. package/package.json +7 -4
  260. package/dist/umd/materials.min.css +0 -1
  261. package/dist/umd/materials.min.js +0 -1
  262. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  263. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  264. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  265. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  266. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  267. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
@@ -0,0 +1,201 @@
1
+ var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder", "type", "rightActions", "escapeDom"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
+ import React, { useMemo, useRef } from 'react';
12
+ import classNames from 'classnames';
13
+ import { locales } from '@pisell/utils';
14
+ import localeTexts from "./locales";
15
+ import BasicInfo from "./components/basicInfo";
16
+ import DiscountReason from "./components/discountReason";
17
+ import TimeRange from "./components/timeRange";
18
+ import Resources from "./components/resources";
19
+ import Packages from "./components/packages";
20
+ import Sales from "./components/sales";
21
+ import { SwipeAction } from "./components/swipeAction";
22
+ import Note from "./components/Note";
23
+ import AmountFooter from "./components/AmountFooter";
24
+ import Items from "./components/MultiDay";
25
+ import "./index.less";
26
+ import Iconfont from "../../iconfont";
27
+ import useEngineContext from "../../../hooks/useEngineContext";
28
+ import Action from "../components/Action";
29
+ import { defaultValue } from "../status";
30
+ export var PREFIX = 'pisell-cart-sku-card';
31
+ var CartSkuCard = function CartSkuCard(props) {
32
+ var _context$appHelper$ut;
33
+ var _props$dataSource = props.dataSource,
34
+ dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
35
+ _props$isShowImage = props.isShowImage,
36
+ isShowImage = _props$isShowImage === void 0 ? defaultValue.isShowImage : _props$isShowImage,
37
+ _props$isShowHolder = props.isShowHolder,
38
+ isShowHolder = _props$isShowHolder === void 0 ? defaultValue.isShowHolder : _props$isShowHolder,
39
+ _props$isShowNote = props.isShowNote,
40
+ isShowNote = _props$isShowNote === void 0 ? defaultValue.isShowNote : _props$isShowNote,
41
+ _props$isShowDelete = props.isShowDelete,
42
+ isShowDelete = _props$isShowDelete === void 0 ? defaultValue.isShowDelete : _props$isShowDelete,
43
+ _props$isShowPackageN = props.isShowPackageNote,
44
+ isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
45
+ _props$isShowEditProd = props.isShowEditProduct,
46
+ isShowEditProduct = _props$isShowEditProd === void 0 ? defaultValue.isShowEditProduct : _props$isShowEditProd,
47
+ onEditProduct = props.onEditProduct,
48
+ _onAction = props.onAction,
49
+ onDelete = props.onDelete,
50
+ onNote = props.onNote,
51
+ onLike = props.onLike,
52
+ onCard = props.onCard,
53
+ onChangeResource = props.onChangeResource,
54
+ onChangeHolder = props.onChangeHolder,
55
+ type = props.type,
56
+ _props$rightActions = props.rightActions,
57
+ rightActions = _props$rightActions === void 0 ? [] : _props$rightActions,
58
+ escapeDom = props.escapeDom,
59
+ other = _objectWithoutProperties(props, _excluded);
60
+ var useOpenNoteRef = useRef();
61
+ var context = useEngineContext();
62
+ locales.init(localeTexts, ((_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');
63
+ console.log('prodcut props', props);
64
+ var isShowAction = dataSource.isShowAction,
65
+ actionText = dataSource.actionText;
66
+ var _rightActions = useMemo(function () {
67
+ var deleteAction = {
68
+ key: 'delete',
69
+ text: /*#__PURE__*/React.createElement("div", {
70
+ style: {
71
+ display: 'flex',
72
+ justifyContent: 'center',
73
+ alignItems: 'center',
74
+ color: 'white',
75
+ cursor: 'pointer',
76
+ padding: '10px 0px'
77
+ }
78
+ }, /*#__PURE__*/React.createElement(Iconfont, {
79
+ type: "pisell2-trash-01",
80
+ style: {
81
+ fontSize: 20,
82
+ marginRight: 4
83
+ }
84
+ }), /*#__PURE__*/React.createElement("span", {
85
+ style: {
86
+ fontSize: 12,
87
+ fontWeight: 500
88
+ }
89
+ }, locales.getText('pisell2.cart.sku-card.actions.delete'))),
90
+ color: 'danger',
91
+ onClick: function onClick(e) {
92
+ e.preventDefault();
93
+ e.stopPropagation();
94
+ onDelete === null || onDelete === void 0 || onDelete(dataSource);
95
+ }
96
+ };
97
+ var actions = _toConsumableArray(rightActions);
98
+ if (isShowDelete) {
99
+ actions.unshift(deleteAction);
100
+ }
101
+ return actions;
102
+ }, [dataSource, onDelete, isShowDelete, rightActions]);
103
+ var hideDivider = useMemo(function () {
104
+ return false;
105
+ // const { bundle, relation_products } = dataSource;
106
+ // return bundle?.length || relation_products?.length;
107
+ }, [dataSource]);
108
+ var renderA2 = function renderA2() {
109
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
110
+ isShowImage: isShowImage,
111
+ dataSource: dataSource,
112
+ isMainProduct: true
113
+ }), /*#__PURE__*/React.createElement(DiscountReason, {
114
+ dataSource: dataSource
115
+ }), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
116
+ item: dataSource,
117
+ openNote: function openNote() {
118
+ useOpenNoteRef.current.open({
119
+ item: dataSource
120
+ });
121
+ }
122
+ })) : null);
123
+ };
124
+ var renderA5 = function renderA5() {
125
+ var _dataSource$bundle, _dataSource$items;
126
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isShowDelete ? /*#__PURE__*/React.createElement("div", {
127
+ className: "".concat(PREFIX, "__delete-btn"),
128
+ onClick: function onClick(e) {
129
+ e.preventDefault();
130
+ e.stopPropagation();
131
+ onDelete === null || onDelete === void 0 || onDelete(dataSource);
132
+ }
133
+ }, /*#__PURE__*/React.createElement(Iconfont, {
134
+ type: "pisell2-trash-01"
135
+ })) : null, /*#__PURE__*/React.createElement(BasicInfo, {
136
+ isShowImage: isShowImage,
137
+ dataSource: dataSource,
138
+ isMainProduct: true,
139
+ type: type
140
+ }), /*#__PURE__*/React.createElement(TimeRange, {
141
+ dataSource: dataSource
142
+ }), /*#__PURE__*/React.createElement(Resources, {
143
+ dataSource: dataSource
144
+ }), /*#__PURE__*/React.createElement(Packages, {
145
+ dataSource: dataSource,
146
+ isShowImage: isShowImage
147
+ }), /*#__PURE__*/React.createElement(Sales, {
148
+ dataSource: dataSource,
149
+ hideDivider: !!(dataSource !== null && dataSource !== void 0 && (_dataSource$bundle = dataSource.bundle) !== null && _dataSource$bundle !== void 0 && _dataSource$bundle.length),
150
+ isShowImage: isShowImage
151
+ }), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
152
+ dataSource: dataSource,
153
+ hideDivider: hideDivider
154
+ }) : /*#__PURE__*/React.createElement(AmountFooter, {
155
+ item: dataSource,
156
+ hideDivider: hideDivider,
157
+ type: "total"
158
+ }), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
159
+ item: dataSource,
160
+ openNote: function openNote() {
161
+ useOpenNoteRef.current.open({
162
+ item: dataSource
163
+ });
164
+ }
165
+ })) : null, isShowAction && actionText ? /*#__PURE__*/React.createElement(Action, {
166
+ item: dataSource,
167
+ onAction: function onAction() {
168
+ return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
169
+ }
170
+ }) : null);
171
+ };
172
+ var renderContent = function renderContent() {
173
+ if (type === 'a5') {
174
+ return renderA5();
175
+ }
176
+ return renderA2();
177
+ };
178
+ return /*#__PURE__*/React.createElement(React.Fragment, null, type === 'a2' ? /*#__PURE__*/React.createElement(SwipeAction, {
179
+ closeOnAction: false,
180
+ className: classNames("".concat(PREFIX, "-wrapper")),
181
+ rightActions: _rightActions,
182
+ escapeDom: escapeDom
183
+ }, /*#__PURE__*/React.createElement("div", {
184
+ className: classNames(PREFIX, "".concat(PREFIX, "--").concat(type)),
185
+ onClick: function onClick(e) {
186
+ e.preventDefault();
187
+ e.stopPropagation();
188
+ onCard === null || onCard === void 0 || onCard(dataSource);
189
+ }
190
+ }, renderContent())) : /*#__PURE__*/React.createElement("div", {
191
+ className: classNames("".concat(PREFIX, "-wrapper"))
192
+ }, /*#__PURE__*/React.createElement("div", {
193
+ className: classNames(PREFIX, "".concat(PREFIX, "-").concat(type)),
194
+ onClick: function onClick(e) {
195
+ e.preventDefault();
196
+ e.stopPropagation();
197
+ onCard === null || onCard === void 0 || onCard(dataSource);
198
+ }
199
+ }, renderContent())));
200
+ };
201
+ export default CartSkuCard;
@@ -0,0 +1,33 @@
1
+ .pisell-cart-sku-card-wrapper {
2
+ border-radius: 8px;
3
+ background: var(--Base-White, #fff);
4
+ border: 1px solid var(--Gray-300, #d0d5dd);
5
+ }
6
+
7
+ .pisell-cart-sku-card {
8
+ padding: 4px 8px 4px 4px;
9
+ border-radius: inherit;
10
+ user-select: none;
11
+ position: relative;
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: 4px;
15
+
16
+ &-a5 {
17
+ cursor: pointer;
18
+ }
19
+
20
+ &__delete-btn {
21
+ cursor: pointer;
22
+ position: absolute;
23
+ padding: 10px;
24
+ top: 0;
25
+ right: 0;
26
+ z-index: 1;
27
+
28
+ > span {
29
+ color: #667085;
30
+ font-size: 20px;
31
+ }
32
+ }
33
+ }
@@ -0,0 +1,96 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.product.card.discount.reason': string;
4
+ 'pisell2.cart.sku-card.more': string;
5
+ 'pisell2.cart.sku-card.packages.title': string;
6
+ 'pisell2.cart.sku-card.sales.title': string;
7
+ 'pisell2.cart.sku-card.actions.delete': string;
8
+ 'pisell2.product.card.day': (val: number) => string;
9
+ 'pisell2.product.card.day.event': (val: number) => string;
10
+ 'pisell2.product.card.minute': (val: number) => string;
11
+ 'pisell2.product.card.discount.note': string;
12
+ 'pisell2.product.card.edit': string;
13
+ 'pisell2.product.card.discount.add.note': string;
14
+ 'pisell2.product.card.discount.edit.note': string;
15
+ 'pisell2.product.card.confirm': string;
16
+ 'pisell2.product.card.cancel': string;
17
+ 'pisell2.product.card.note.pla': string;
18
+ 'pisell2.product.card.items.package': string;
19
+ 'pisell2.product.card.view-all': string;
20
+ 'pisell2.product.card.view-less': string;
21
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
22
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
23
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
24
+ 'pisell2.product.card.add.holder.modal.title.1': string;
25
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
26
+ 'pisell2.product.card.sales': string;
27
+ 'pisell2.product.card.add.holder.modal.cancel': string;
28
+ 'pisell2.product.card.add.holder.modal.clear': string;
29
+ 'pisell2.product.card.add.holder.modal.apply': string;
30
+ 'pisell2.product.card.add.holder.modal.add': string;
31
+ 'pisell2.product.card.closing-soon.warning': string;
32
+ };
33
+ 'zh-CN': {
34
+ 'pisell2.product.card.discount.reason': string;
35
+ 'pisell2.cart.sku-card.more': string;
36
+ 'pisell2.cart.sku-card.packages.title': string;
37
+ 'pisell2.cart.sku-card.sales.title': string;
38
+ 'pisell2.cart.sku-card.actions.delete': string;
39
+ 'pisell2.product.card.edit': string;
40
+ 'pisell2.product.card.day': (val: number) => string;
41
+ 'pisell2.product.card.day.event': (val: number) => string;
42
+ 'pisell2.product.card.minute': (val: number) => string;
43
+ 'pisell2.product.card.discount.note': string;
44
+ 'pisell2.product.card.discount.add.note': string;
45
+ 'pisell2.product.card.discount.edit.note': string;
46
+ 'pisell2.product.card.confirm': string;
47
+ 'pisell2.product.card.cancel': string;
48
+ 'pisell2.product.card.note.pla': string;
49
+ 'pisell2.product.card.items.package': string;
50
+ 'pisell2.product.card.view-all': string;
51
+ 'pisell2.product.card.view-less': string;
52
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
53
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
54
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
55
+ 'pisell2.product.card.add.holder.modal.title.1': string;
56
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
57
+ 'pisell2.product.card.sales': string;
58
+ 'pisell2.product.card.add.holder.modal.cancel': string;
59
+ 'pisell2.product.card.add.holder.modal.clear': string;
60
+ 'pisell2.product.card.add.holder.modal.apply': string;
61
+ 'pisell2.product.card.add.holder.modal.add': string;
62
+ 'pisell2.product.card.closing-soon.warning': string;
63
+ };
64
+ 'zh-HK': {
65
+ 'pisell2.product.card.discount.reason': string;
66
+ 'pisell2.cart.sku-card.more': string;
67
+ 'pisell2.cart.sku-card.packages.title': string;
68
+ 'pisell2.cart.sku-card.sales.title': string;
69
+ 'pisell2.cart.sku-card.actions.delete': string;
70
+ 'pisell2.product.card.edit': string;
71
+ 'pisell2.product.card.day': (val: number) => string;
72
+ 'pisell2.product.card.day.event': (val: number) => string;
73
+ 'pisell2.product.card.minute': (val: number) => string;
74
+ 'pisell2.product.card.discount.note': string;
75
+ 'pisell2.product.card.discount.add.note': string;
76
+ 'pisell2.product.card.discount.edit.note': string;
77
+ 'pisell2.product.card.confirm': string;
78
+ 'pisell2.product.card.cancel': string;
79
+ 'pisell2.product.card.note.pla': string;
80
+ 'pisell2.product.card.items.package': string;
81
+ 'pisell2.product.card.view-all': string;
82
+ 'pisell2.product.card.view-less': string;
83
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
84
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
85
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
86
+ 'pisell2.product.card.add.holder.modal.title.1': string;
87
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
88
+ 'pisell2.product.card.sales': string;
89
+ 'pisell2.product.card.add.holder.modal.cancel': string;
90
+ 'pisell2.product.card.add.holder.modal.clear': string;
91
+ 'pisell2.product.card.add.holder.modal.apply': string;
92
+ 'pisell2.product.card.add.holder.modal.add': string;
93
+ 'pisell2.product.card.closing-soon.warning': string;
94
+ };
95
+ };
96
+ export default _default;
@@ -0,0 +1,30 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import localeTexts from "../locales";
8
+ export default {
9
+ en: _objectSpread(_objectSpread({}, localeTexts.en), {}, {
10
+ 'pisell2.product.card.discount.reason': 'Discount reason',
11
+ 'pisell2.cart.sku-card.more': 'more...',
12
+ 'pisell2.cart.sku-card.packages.title': 'Items in package',
13
+ 'pisell2.cart.sku-card.sales.title': 'Sales',
14
+ 'pisell2.cart.sku-card.actions.delete': 'Delete'
15
+ }),
16
+ 'zh-CN': _objectSpread(_objectSpread({}, localeTexts['zh-CN']), {}, {
17
+ 'pisell2.product.card.discount.reason': '折扣原因',
18
+ 'pisell2.cart.sku-card.more': '更多……',
19
+ 'pisell2.cart.sku-card.packages.title': '包含的商品',
20
+ 'pisell2.cart.sku-card.sales.title': '销售',
21
+ 'pisell2.cart.sku-card.actions.delete': '删除'
22
+ }),
23
+ 'zh-HK': _objectSpread(_objectSpread({}, localeTexts['zh-HK']), {}, {
24
+ 'pisell2.product.card.discount.reason': '折扣原因',
25
+ 'pisell2.cart.sku-card.more': '更多……',
26
+ 'pisell2.cart.sku-card.packages.title': '包含的商品',
27
+ 'pisell2.cart.sku-card.sales.title': '銷售',
28
+ 'pisell2.cart.sku-card.actions.delete': '刪除'
29
+ })
30
+ };
@@ -1,11 +1,24 @@
1
1
  import React from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { Button } from 'antd';
4
+ import Iconfont from "../../../iconfont";
4
5
  import "./index.less";
5
6
  var prefix = 'pisell-lowcode-';
6
7
  var Action = function Action(_ref) {
7
8
  var item = _ref.item,
8
9
  onAction = _ref.onAction;
10
+ var renderIcon = function renderIcon() {
11
+ var actionIcon = item.actionIcon;
12
+ if (actionIcon && typeof actionIcon === 'string') {
13
+ return /*#__PURE__*/React.createElement(Iconfont, {
14
+ type: actionIcon,
15
+ style: {
16
+ fontSize: 20
17
+ }
18
+ });
19
+ }
20
+ return null;
21
+ };
9
22
  return /*#__PURE__*/React.createElement("div", {
10
23
  className: classNames("".concat(prefix, "product-actions"))
11
24
  }, /*#__PURE__*/React.createElement(Button, {
@@ -16,6 +29,6 @@ var Action = function Action(_ref) {
16
29
  e.stopPropagation();
17
30
  onAction();
18
31
  }
19
- }, item.actionText));
32
+ }, renderIcon(), item.actionText));
20
33
  };
21
34
  export default Action;
@@ -10,5 +10,8 @@
10
10
 
11
11
  &-product-actions-item {
12
12
  flex: 1;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
13
16
  }
14
17
  }
@@ -13,7 +13,7 @@ var prefix = 'pisell-lowcode-';
13
13
  var Header = function Header(props) {
14
14
  var isShowDelete = props.isShowDelete,
15
15
  item = props.item,
16
- showImage = props.showImage,
16
+ isShowImage = props.isShowImage,
17
17
  onDelete = props.onDelete,
18
18
  disabledEdit = props.disabledEdit,
19
19
  onEditProduct = props.onEditProduct,
@@ -26,7 +26,10 @@ var Header = function Header(props) {
26
26
  name = item.name,
27
27
  price = item.price,
28
28
  symbol = item.symbol,
29
- disabled = item.disabled;
29
+ disabled = item.disabled,
30
+ relation_products = item.relation_products,
31
+ _item$num = item.num,
32
+ num = _item$num === void 0 ? 1 : _item$num;
30
33
 
31
34
  /**
32
35
  * @title: 是否显示价格
@@ -39,8 +42,8 @@ var Header = function Header(props) {
39
42
  var showPrice = useMemo(function () {
40
43
  // 如果有报价单则不需要显示价格
41
44
 
42
- return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 || (options === null || options === void 0 ? void 0 : options.length) > 0;
43
- }, [bundle, options]);
45
+ return (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0 || (options === null || options === void 0 ? void 0 : options.length) > 0 || ((relation_products === null || relation_products === void 0 ? void 0 : relation_products.length) || 0) > 0;
46
+ }, [bundle, options, relation_products]);
44
47
 
45
48
  /**
46
49
  * @title: 样式是否居中
@@ -65,14 +68,26 @@ var Header = function Header(props) {
65
68
  var showDelete = useMemo(function () {
66
69
  return isShowDelete && !disabledEdit && !disabled;
67
70
  }, [isShowDelete, disabledEdit, disabled]);
71
+ var renderImage = function renderImage() {
72
+ if (!isShowImage) return null;
73
+ if (image) {
74
+ return /*#__PURE__*/React.createElement("img", {
75
+ src: imageAli.ali(image, 64),
76
+ className: "".concat(prefix, "product-header-cover")
77
+ });
78
+ }
79
+
80
+ // 如果没有图片,显示文字图片
81
+ var displayText = name ? name.slice(0, 2) : '';
82
+ return /*#__PURE__*/React.createElement("div", {
83
+ className: "".concat(prefix, "product-header-cover-text")
84
+ }, displayText);
85
+ };
68
86
  return /*#__PURE__*/React.createElement("div", {
69
87
  className: classNames("".concat(prefix, "product-header"), headerCenterStyle && "".concat(prefix, "product-options-header"))
70
88
  }, showDelete ? /*#__PURE__*/React.createElement(DeleteButton, {
71
89
  onDelete: onDelete
72
- }) : null, showImage ? /*#__PURE__*/React.createElement("img", {
73
- src: imageAli.ali(image, 64),
74
- className: "".concat(prefix, "product-header-cover")
75
- }) : null, id ? /*#__PURE__*/React.createElement("div", {
90
+ }) : null, renderImage(), id ? /*#__PURE__*/React.createElement("div", {
76
91
  className: classNames("".concat(prefix, "product-right-wrap"), _defineProperty({}, "".concat(prefix, "product-right-wrap-stretch"), isShowEditProduct))
77
92
  }, /*#__PURE__*/React.createElement("div", {
78
93
  className: "".concat(prefix, "product-title")
@@ -19,6 +19,21 @@
19
19
  border-radius: 8px;
20
20
  }
21
21
 
22
+ &-product-header-cover-text {
23
+ width: 64px;
24
+ height: 64px;
25
+ flex-shrink: 0;
26
+ border-radius: 8px;
27
+ background-color: #dedede;
28
+ color: #7e7e7e;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ font-size: 22px;
33
+ font-weight: 500;
34
+ line-height: 1;
35
+ }
36
+
22
37
  &-product-right-wrap {
23
38
  display: flex;
24
39
  flex-direction: column;
@@ -54,4 +69,4 @@
54
69
  font-weight: 400;
55
70
  line-height: 20px;
56
71
  }
57
- }
72
+ }
@@ -20,10 +20,10 @@ var Sales = function Sales(_ref) {
20
20
  other_products = other_products.map(function (p) {
21
21
  return _objectSpread(_objectSpread({}, p), {}, {
22
22
  title: p === null || p === void 0 ? void 0 : p.product_title,
23
- price: p === null || p === void 0 ? void 0 : p.payment_price,
23
+ price: p === null || p === void 0 ? void 0 : p.selling_price,
24
24
  symbol: item.symbol,
25
25
  num: p === null || p === void 0 ? void 0 : p.product_quantity,
26
- total: p === null || p === void 0 ? void 0 : p.payment_price
26
+ total: p === null || p === void 0 ? void 0 : p.selling_price
27
27
  });
28
28
  });
29
29
  return ((_other_products = other_products) === null || _other_products === void 0 ? void 0 : _other_products.length) > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
@@ -143,7 +143,9 @@ var SelectHolderModal = function SelectHolderModal(props) {
143
143
  size: "large",
144
144
  onClick: onClose,
145
145
  className: "select-holder-modal-cancel-button"
146
- }, locales.getText('pisell2.product.card.add.holder.modal.cancel'))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
146
+ }, locales.getText('pisell2.product.card.add.holder.modal.cancel'))), /*#__PURE__*/React.createElement("div", {
147
+ className: "select-holder-modal-footer-right"
148
+ }, /*#__PURE__*/React.createElement(Button, {
147
149
  size: "large",
148
150
  onClick: handleClear,
149
151
  className: "select-holder-modal-clear-button"
@@ -35,5 +35,8 @@
35
35
  .select-holder-modal-clear-button {
36
36
  width: 132px;
37
37
  }
38
+ .select-holder-modal-footer-right {
39
+ display: flex;
40
+ }
38
41
  }
39
42
  }
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ProductCardTypes } from './types';
3
3
  import './index.less';
4
- declare const ProductCard: React.FC<ProductCardTypes>;
4
+ declare const ProductCard: React.FC<ProductCardTypes> & {
5
+ V2: any;
6
+ };
5
7
  export default ProductCard;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder"];
2
+ var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowPackageNote", "isShowEditProduct", "scenario", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onChangeHolder"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -27,6 +27,7 @@ import { defaultValue } from "./status";
27
27
  import useEngineContext from "../../hooks/useEngineContext";
28
28
  import Warning from "./components/Warning";
29
29
  import "./index.less";
30
+ import CartSkuCard from "./cartSkuCard";
30
31
  var ProductCard = function ProductCard(props) {
31
32
  var _utils$storage, _dataSource$items;
32
33
  var context = useEngineContext();
@@ -45,6 +46,7 @@ var ProductCard = function ProductCard(props) {
45
46
  isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
46
47
  _props$isShowEditProd = props.isShowEditProduct,
47
48
  isShowEditProduct = _props$isShowEditProd === void 0 ? defaultValue.isShowEditProduct : _props$isShowEditProd,
49
+ scenario = props.scenario,
48
50
  _onEditProduct = props.onEditProduct,
49
51
  _onAction = props.onAction,
50
52
  _onDelete = props.onDelete,
@@ -101,7 +103,7 @@ var ProductCard = function ProductCard(props) {
101
103
  return _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(dataSource);
102
104
  }
103
105
  })), /*#__PURE__*/React.createElement(CardPro, {
104
- className: classNames('pisell-lowcode-product-card', _defineProperty(_defineProperty({}, 'pisell-lowcode-product-card-image', !showImage), 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct)),
106
+ className: classNames('pisell-lowcode-product-card', _defineProperty(_defineProperty(_defineProperty({}, 'pisell-lowcode-product-card-image', !showImage && scenario !== 'booking2'), 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct && scenario !== 'booking2'), 'pisell-lowcode-product-card-image-booking2', scenario === 'booking2')),
105
107
  key: _id
106
108
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
107
109
  onClick: function onClick(e) {
@@ -173,4 +175,5 @@ var ProductCard = function ProductCard(props) {
173
175
  }
174
176
  }))));
175
177
  };
178
+ ProductCard.V2 = CartSkuCard;
176
179
  export default ProductCard;
@@ -47,6 +47,12 @@
47
47
  }
48
48
  }
49
49
 
50
+ .pisell-lowcode-product-card-image-booking2 {
51
+ .pisell-cardPro-content {
52
+ padding: 4px;
53
+ }
54
+ }
55
+
50
56
  .pisell-lowcode-product-card-wrap {
51
57
  position: relative;
52
58
  }
@@ -31,6 +31,7 @@ export default {
31
31
  },
32
32
  'pisell2.product.card.add.holder.modal.title.1': "Please Select",
33
33
  'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
34
+ if (hour <= 0 && minute <= 0) return "".concat(0, "min");
34
35
  return "".concat(hour > 0 ? "".concat(hour, "h") : '').concat(hour > 0 && minute > 0 ? ' ' : '').concat(minute > 0 ? "".concat(minute, "min") : '');
35
36
  },
36
37
  'pisell2.product.card.sales': 'Sales',
@@ -72,6 +73,7 @@ export default {
72
73
  },
73
74
  'pisell2.product.card.add.holder.modal.title.1': "\u8BF7\u9009\u62E9",
74
75
  'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
76
+ if (hour <= 0 && minute <= 0) return "".concat(0, "\u5206\u949F");
75
77
  return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u65F6") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u949F") : '');
76
78
  },
77
79
  'pisell2.product.card.sales': '销售',
@@ -113,6 +115,7 @@ export default {
113
115
  },
114
116
  'pisell2.product.card.add.holder.modal.title.1': "\u8ACB\u9078\u64C7",
115
117
  'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
118
+ if (hour <= 0 && minute <= 0) return "".concat(0, "\u5206\u9418");
116
119
  return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u6642") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u9418") : '');
117
120
  },
118
121
  'pisell2.product.card.sales': '銷售',
@@ -3,7 +3,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
3
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
5
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
8
  import React, { useMemo } from "react";
9
9
  import { QRCode as AntQRCode, Modal } from "antd";