@pisell/materials 6.3.17 → 6.3.18

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 (269) 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 +5 -5
  6. package/build/lowcode/preview.js +144 -144
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +23 -23
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -23
  11. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  12. package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
  13. package/es/components/auto-resize-text/auto-text-size-standalone.js +258 -0
  14. package/es/components/auto-resize-text/index.d.ts +6 -0
  15. package/es/components/auto-resize-text/index.js +40 -0
  16. package/es/components/cardPro/index.js +10 -3
  17. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  18. package/es/components/dataSourceComponents/fields/index.d.ts +16 -16
  19. package/es/components/iconfont/index.js +1 -1
  20. package/es/components/keyboard/index.d.ts +22 -0
  21. package/es/components/keyboard/index.js +159 -0
  22. package/es/components/keyboard/index.less +44 -0
  23. package/es/components/page/index.js +5 -2
  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 +39 -2
  30. package/es/components/pisellCardList/index.less +9 -1
  31. package/es/components/pisellCheckboxGroup/index.d.ts +3 -0
  32. package/es/components/pisellCheckboxGroup/index.js +9 -4
  33. package/es/components/pisellCheckboxGroup/index.less +28 -1
  34. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  35. package/es/components/pisellGoodPassCard/index.d.ts +1 -0
  36. package/es/components/pisellGoodPassCard/index.js +17 -5
  37. package/es/components/pisellText/components/Amount/index.js +2 -1
  38. package/es/components/pisellToast/index.d.ts +1 -0
  39. package/es/components/pisellToast/index.js +4 -0
  40. package/es/components/pisellToast/squareToast/index.d.ts +15 -0
  41. package/es/components/pisellToast/squareToast/index.js +28 -0
  42. package/es/components/pisellToast/squareToast/index.less +60 -0
  43. package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
  44. package/es/components/pisellToast/squareToast/methods.js +136 -0
  45. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  46. package/es/components/pisellToast/squareToast/renderImperatively.js +190 -0
  47. package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
  48. package/es/components/pisellToast/squareToast/toast.js +60 -0
  49. package/es/components/pisellWalletPassCard/index.d.ts +53 -1
  50. package/es/components/pisellWalletPassCard/index.js +333 -73
  51. package/es/components/pisellWalletPassCard/index.less +47 -9
  52. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  53. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
  54. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  55. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  56. package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +82 -0
  57. package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  58. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  59. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +56 -0
  60. package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
  61. package/es/components/productCard/cartSkuCard/components/Note/index.js +29 -0
  62. package/es/components/productCard/cartSkuCard/components/Note/index.less +27 -0
  63. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +28 -0
  64. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +94 -0
  65. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
  66. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  67. package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
  68. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  69. package/es/components/productCard/cartSkuCard/components/holders/index.js +49 -0
  70. package/es/components/productCard/cartSkuCard/components/holders/index.less +47 -0
  71. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  72. package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
  73. package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  74. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  75. package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
  76. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  77. package/es/components/productCard/cartSkuCard/components/resources/index.js +39 -0
  78. package/es/components/productCard/cartSkuCard/components/resources/index.less +19 -0
  79. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
  80. package/es/components/productCard/cartSkuCard/components/sales/index.js +57 -0
  81. package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  82. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  83. package/es/components/productCard/cartSkuCard/components/specs/index.js +44 -0
  84. package/es/components/productCard/cartSkuCard/components/specs/index.less +34 -0
  85. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  86. package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +360 -0
  87. package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +74 -0
  88. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  89. package/es/components/productCard/cartSkuCard/components/timeRange/index.js +54 -0
  90. package/es/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
  91. package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
  92. package/es/components/productCard/cartSkuCard/index.js +194 -0
  93. package/es/components/productCard/cartSkuCard/index.less +33 -0
  94. package/es/components/productCard/cartSkuCard/locales.d.ts +99 -0
  95. package/es/components/productCard/cartSkuCard/locales.js +33 -0
  96. package/es/components/productCard/components/Action/index.js +14 -1
  97. package/es/components/productCard/components/Action/index.less +3 -0
  98. package/es/components/productCard/components/Header/index.js +23 -8
  99. package/es/components/productCard/components/Header/index.less +16 -1
  100. package/es/components/productCard/components/Sales/index.js +2 -2
  101. package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +3 -1
  102. package/es/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
  103. package/es/components/productCard/index.d.ts +3 -1
  104. package/es/components/productCard/index.js +7 -2
  105. package/es/components/productCard/index.less +6 -0
  106. package/es/components/productCard/locales.js +3 -0
  107. package/es/components/productCard/status.js +1 -0
  108. package/es/components/productCard/types.d.ts +1 -0
  109. package/es/components/productCard/utils.js +8 -1
  110. package/es/components/select-time/index.d.ts +14 -0
  111. package/es/components/table/Table/AddFieldModal/index.d.ts +1 -0
  112. package/es/components/table/Table/AddFieldModal/index.js +13 -13
  113. package/es/components/table/Table/AddFieldModal/index.less +11 -11
  114. package/es/components/table/Table/utils.d.ts +1 -1
  115. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
  116. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +21 -7
  117. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
  118. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
  119. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +44 -25
  120. package/es/components/virtual-keyboard/Number/index.js +4 -1
  121. package/es/components/virtual-keyboard/Number/types.d.ts +1 -0
  122. package/es/components/virtual-keyboard/index.d.ts +11 -0
  123. package/es/components/virtual-keyboard/index.js +88 -3
  124. package/es/components/virtual-keyboard/index.less +33 -1
  125. package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
  126. package/es/components/virtualInput/BaseVirtualInput/index.js +163 -0
  127. package/es/components/virtualInput/BaseVirtualInput/index.less +77 -0
  128. package/es/components/virtualInput/index.d.ts +24 -0
  129. package/es/components/virtualInput/index.js +60 -0
  130. package/es/components/virtualInput/index.less +42 -0
  131. package/es/index.d.ts +5 -1
  132. package/es/index.js +5 -2
  133. package/es/locales/en-US.d.ts +19 -2
  134. package/es/locales/en-US.js +29 -6
  135. package/es/locales/zh-CN.d.ts +19 -2
  136. package/es/locales/zh-CN.js +29 -6
  137. package/es/locales/zh-TW.d.ts +19 -2
  138. package/es/locales/zh-TW.js +28 -6
  139. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  140. package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
  141. package/lib/components/auto-resize-text/auto-text-size-standalone.js +273 -0
  142. package/lib/components/auto-resize-text/index.d.ts +6 -0
  143. package/lib/components/auto-resize-text/index.js +71 -0
  144. package/lib/components/cardPro/index.js +3 -2
  145. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  146. package/lib/components/dataSourceComponents/fields/index.d.ts +16 -16
  147. package/lib/components/iconfont/index.js +1 -1
  148. package/lib/components/keyboard/index.d.ts +22 -0
  149. package/lib/components/keyboard/index.js +223 -0
  150. package/lib/components/keyboard/index.less +44 -0
  151. package/lib/components/page/index.js +3 -2
  152. package/lib/components/pisell-config-provider/context.d.ts +2 -0
  153. package/lib/components/pisell-config-provider/index.d.ts +1 -0
  154. package/lib/components/pisellAdjustPrice/index.js +4 -0
  155. package/lib/components/pisellAdjustPrice/type.d.ts +2 -0
  156. package/lib/components/pisellCardList/index.d.ts +32 -2
  157. package/lib/components/pisellCardList/index.js +39 -2
  158. package/lib/components/pisellCardList/index.less +9 -1
  159. package/lib/components/pisellCheckboxGroup/index.d.ts +3 -0
  160. package/lib/components/pisellCheckboxGroup/index.js +6 -1
  161. package/lib/components/pisellCheckboxGroup/index.less +28 -1
  162. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  163. package/lib/components/pisellGoodPassCard/index.d.ts +1 -0
  164. package/lib/components/pisellGoodPassCard/index.js +31 -4
  165. package/lib/components/pisellText/components/Amount/index.js +2 -1
  166. package/lib/components/pisellToast/index.d.ts +1 -0
  167. package/lib/components/pisellToast/index.js +10 -1
  168. package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
  169. package/lib/components/pisellToast/squareToast/index.js +58 -0
  170. package/lib/components/pisellToast/squareToast/index.less +60 -0
  171. package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
  172. package/lib/components/pisellToast/squareToast/methods.js +150 -0
  173. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  174. package/lib/components/pisellToast/squareToast/renderImperatively.js +162 -0
  175. package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
  176. package/lib/components/pisellToast/squareToast/toast.js +88 -0
  177. package/lib/components/pisellWalletPassCard/index.d.ts +53 -1
  178. package/lib/components/pisellWalletPassCard/index.js +257 -59
  179. package/lib/components/pisellWalletPassCard/index.less +47 -9
  180. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  181. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
  182. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  183. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  184. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +71 -0
  185. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  186. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  187. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +77 -0
  188. package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
  189. package/lib/components/productCard/cartSkuCard/components/Note/index.js +56 -0
  190. package/lib/components/productCard/cartSkuCard/components/Note/index.less +27 -0
  191. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +28 -0
  192. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +83 -0
  193. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +117 -0
  194. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  195. package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
  196. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  197. package/lib/components/productCard/cartSkuCard/components/holders/index.js +64 -0
  198. package/lib/components/productCard/cartSkuCard/components/holders/index.less +47 -0
  199. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  200. package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
  201. package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  202. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  203. package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
  204. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  205. package/lib/components/productCard/cartSkuCard/components/resources/index.js +71 -0
  206. package/lib/components/productCard/cartSkuCard/components/resources/index.less +19 -0
  207. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
  208. package/lib/components/productCard/cartSkuCard/components/sales/index.js +77 -0
  209. package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  210. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  211. package/lib/components/productCard/cartSkuCard/components/specs/index.js +66 -0
  212. package/lib/components/productCard/cartSkuCard/components/specs/index.less +34 -0
  213. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  214. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +373 -0
  215. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +74 -0
  216. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  217. package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +68 -0
  218. package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +38 -0
  219. package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
  220. package/lib/components/productCard/cartSkuCard/index.js +229 -0
  221. package/lib/components/productCard/cartSkuCard/index.less +33 -0
  222. package/lib/components/productCard/cartSkuCard/locales.d.ts +99 -0
  223. package/lib/components/productCard/cartSkuCard/locales.js +64 -0
  224. package/lib/components/productCard/components/Action/index.js +9 -0
  225. package/lib/components/productCard/components/Action/index.less +3 -0
  226. package/lib/components/productCard/components/Header/index.js +21 -11
  227. package/lib/components/productCard/components/Header/index.less +16 -1
  228. package/lib/components/productCard/components/Sales/index.js +2 -2
  229. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
  230. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.less +3 -0
  231. package/lib/components/productCard/index.d.ts +3 -1
  232. package/lib/components/productCard/index.js +7 -2
  233. package/lib/components/productCard/index.less +6 -0
  234. package/lib/components/productCard/locales.js +12 -3
  235. package/lib/components/productCard/status.js +1 -0
  236. package/lib/components/productCard/types.d.ts +1 -0
  237. package/lib/components/productCard/utils.js +8 -1
  238. package/lib/components/select-time/index.d.ts +14 -0
  239. package/lib/components/table/Table/AddFieldModal/index.d.ts +1 -0
  240. package/lib/components/table/Table/AddFieldModal/index.js +9 -9
  241. package/lib/components/table/Table/AddFieldModal/index.less +11 -11
  242. package/lib/components/table/Table/utils.d.ts +1 -1
  243. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +5 -1
  244. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.js +19 -2
  245. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.less +9 -5
  246. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +4 -0
  247. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +45 -27
  248. package/lib/components/virtual-keyboard/Number/index.js +3 -0
  249. package/lib/components/virtual-keyboard/Number/types.d.ts +1 -0
  250. package/lib/components/virtual-keyboard/index.d.ts +11 -0
  251. package/lib/components/virtual-keyboard/index.js +60 -2
  252. package/lib/components/virtual-keyboard/index.less +33 -1
  253. package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
  254. package/lib/components/virtualInput/BaseVirtualInput/index.js +179 -0
  255. package/lib/components/virtualInput/BaseVirtualInput/index.less +77 -0
  256. package/lib/components/virtualInput/index.d.ts +24 -0
  257. package/lib/components/virtualInput/index.js +102 -0
  258. package/lib/components/virtualInput/index.less +42 -0
  259. package/lib/index.d.ts +5 -1
  260. package/lib/index.js +11 -0
  261. package/lib/locales/en-US.d.ts +19 -2
  262. package/lib/locales/en-US.js +24 -5
  263. package/lib/locales/zh-CN.d.ts +19 -2
  264. package/lib/locales/zh-CN.js +24 -5
  265. package/lib/locales/zh-TW.d.ts +19 -2
  266. package/lib/locales/zh-TW.js +23 -5
  267. package/package.json +4 -4
  268. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
  269. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
@@ -0,0 +1,194 @@
1
+ var _excluded = ["dataSource", "isShowImage", "isShowHolder", "isShowNote", "isShowDelete", "isShowAmountFooter", "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$isShowAmountFo = props.isShowAmountFooter,
44
+ isShowAmountFooter = _props$isShowAmountFo === void 0 ? defaultValue.isShowAmountFooter : _props$isShowAmountFo,
45
+ _props$isShowPackageN = props.isShowPackageNote,
46
+ isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
47
+ _props$isShowEditProd = props.isShowEditProduct,
48
+ isShowEditProduct = _props$isShowEditProd === void 0 ? defaultValue.isShowEditProduct : _props$isShowEditProd,
49
+ onEditProduct = props.onEditProduct,
50
+ _onAction = props.onAction,
51
+ onDelete = props.onDelete,
52
+ onNote = props.onNote,
53
+ onLike = props.onLike,
54
+ onCard = props.onCard,
55
+ onChangeResource = props.onChangeResource,
56
+ onChangeHolder = props.onChangeHolder,
57
+ type = props.type,
58
+ _props$rightActions = props.rightActions,
59
+ rightActions = _props$rightActions === void 0 ? [] : _props$rightActions,
60
+ escapeDom = props.escapeDom,
61
+ other = _objectWithoutProperties(props, _excluded);
62
+ var useOpenNoteRef = useRef();
63
+ var context = useEngineContext();
64
+ 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');
65
+ console.log('prodcut props', props);
66
+ var isShowAction = dataSource.isShowAction,
67
+ actionText = dataSource.actionText;
68
+ var _rightActions = useMemo(function () {
69
+ var deleteAction = {
70
+ key: 'delete',
71
+ text: /*#__PURE__*/React.createElement("div", {
72
+ style: {
73
+ display: 'flex',
74
+ justifyContent: 'center',
75
+ alignItems: 'center',
76
+ color: 'white',
77
+ cursor: 'pointer',
78
+ padding: '10px 0px'
79
+ }
80
+ }, /*#__PURE__*/React.createElement(Iconfont, {
81
+ type: "pisell2-trash-01",
82
+ style: {
83
+ fontSize: 20,
84
+ marginRight: 4
85
+ }
86
+ }), /*#__PURE__*/React.createElement("span", {
87
+ style: {
88
+ fontSize: 12,
89
+ fontWeight: 500
90
+ }
91
+ }, locales.getText('pisell2.cart.sku-card.actions.delete'))),
92
+ color: 'danger',
93
+ onClick: function onClick(e) {
94
+ e.preventDefault();
95
+ e.stopPropagation();
96
+ onDelete === null || onDelete === void 0 || onDelete(dataSource);
97
+ }
98
+ };
99
+ var actions = _toConsumableArray(rightActions);
100
+ if (isShowDelete) {
101
+ actions.unshift(deleteAction);
102
+ }
103
+ return actions;
104
+ }, [dataSource, onDelete, isShowDelete, rightActions]);
105
+ var hideDivider = useMemo(function () {
106
+ return false;
107
+ // const { bundle, relation_products } = dataSource;
108
+ // return bundle?.length || relation_products?.length;
109
+ }, [dataSource]);
110
+ var renderA2 = function renderA2() {
111
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
112
+ isShowImage: isShowImage,
113
+ dataSource: dataSource,
114
+ isMainProduct: true
115
+ }), /*#__PURE__*/React.createElement(DiscountReason, {
116
+ dataSource: dataSource
117
+ }), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
118
+ item: dataSource,
119
+ openNote: function openNote() {
120
+ useOpenNoteRef.current.open({
121
+ item: dataSource
122
+ });
123
+ }
124
+ })) : null);
125
+ };
126
+ var renderA5 = function renderA5() {
127
+ var _dataSource$bundle, _dataSource$items;
128
+ return /*#__PURE__*/React.createElement(React.Fragment, null, isShowDelete ? /*#__PURE__*/React.createElement("div", {
129
+ className: "".concat(PREFIX, "__delete-btn"),
130
+ onClick: function onClick(e) {
131
+ e.preventDefault();
132
+ e.stopPropagation();
133
+ onDelete === null || onDelete === void 0 || onDelete(dataSource);
134
+ }
135
+ }, /*#__PURE__*/React.createElement(Iconfont, {
136
+ type: "pisell2-trash-01"
137
+ })) : null, /*#__PURE__*/React.createElement(BasicInfo, {
138
+ isShowImage: isShowImage,
139
+ dataSource: dataSource,
140
+ isMainProduct: true,
141
+ type: type
142
+ }), /*#__PURE__*/React.createElement(TimeRange, {
143
+ dataSource: dataSource
144
+ }), /*#__PURE__*/React.createElement(Resources, {
145
+ dataSource: dataSource
146
+ }), /*#__PURE__*/React.createElement(Packages, {
147
+ dataSource: dataSource,
148
+ isShowImage: isShowImage
149
+ }), /*#__PURE__*/React.createElement(Sales, {
150
+ dataSource: dataSource,
151
+ hideDivider: !!(dataSource !== null && dataSource !== void 0 && (_dataSource$bundle = dataSource.bundle) !== null && _dataSource$bundle !== void 0 && _dataSource$bundle.length),
152
+ isShowImage: isShowImage
153
+ }), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
154
+ dataSource: dataSource,
155
+ hideDivider: hideDivider
156
+ }) : isShowAmountFooter ? /*#__PURE__*/React.createElement(AmountFooter, {
157
+ item: dataSource,
158
+ hideDivider: hideDivider,
159
+ type: "total"
160
+ }) : null, isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
161
+ item: dataSource,
162
+ openNote: function openNote() {
163
+ useOpenNoteRef.current.open({
164
+ item: dataSource
165
+ });
166
+ }
167
+ })) : null, isShowAction && actionText ? /*#__PURE__*/React.createElement(Action, {
168
+ item: dataSource,
169
+ onAction: function onAction() {
170
+ return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
171
+ }
172
+ }) : null);
173
+ };
174
+ var renderContent = function renderContent() {
175
+ if (type === 'a5') {
176
+ return renderA5();
177
+ }
178
+ return renderA2();
179
+ };
180
+ return /*#__PURE__*/React.createElement(SwipeAction, {
181
+ closeOnAction: false,
182
+ className: classNames("".concat(PREFIX, "-wrapper")),
183
+ rightActions: _rightActions,
184
+ escapeDom: escapeDom
185
+ }, /*#__PURE__*/React.createElement("div", {
186
+ className: classNames(PREFIX, "".concat(PREFIX, "--").concat(type)),
187
+ onClick: function onClick(e) {
188
+ e.preventDefault();
189
+ e.stopPropagation();
190
+ onCard === null || onCard === void 0 || onCard(dataSource);
191
+ }
192
+ }, renderContent()));
193
+ };
194
+ 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,99 @@
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.cart.sku-card.unassigned': string;
9
+ 'pisell2.product.card.day': (val: number) => string;
10
+ 'pisell2.product.card.day.event': (val: number) => string;
11
+ 'pisell2.product.card.minute': (val: number) => string;
12
+ 'pisell2.product.card.discount.note': string;
13
+ 'pisell2.product.card.edit': string;
14
+ 'pisell2.product.card.discount.add.note': string;
15
+ 'pisell2.product.card.discount.edit.note': string;
16
+ 'pisell2.product.card.confirm': string;
17
+ 'pisell2.product.card.cancel': string;
18
+ 'pisell2.product.card.note.pla': string;
19
+ 'pisell2.product.card.items.package': string;
20
+ 'pisell2.product.card.view-all': string;
21
+ 'pisell2.product.card.view-less': string;
22
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
23
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
24
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
25
+ 'pisell2.product.card.add.holder.modal.title.1': string;
26
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
27
+ 'pisell2.product.card.sales': string;
28
+ 'pisell2.product.card.add.holder.modal.cancel': string;
29
+ 'pisell2.product.card.add.holder.modal.clear': string;
30
+ 'pisell2.product.card.add.holder.modal.apply': string;
31
+ 'pisell2.product.card.add.holder.modal.add': string;
32
+ 'pisell2.product.card.closing-soon.warning': string;
33
+ };
34
+ 'zh-CN': {
35
+ 'pisell2.product.card.discount.reason': string;
36
+ 'pisell2.cart.sku-card.more': string;
37
+ 'pisell2.cart.sku-card.packages.title': string;
38
+ 'pisell2.cart.sku-card.sales.title': string;
39
+ 'pisell2.cart.sku-card.actions.delete': string;
40
+ 'pisell2.cart.sku-card.unassigned': string;
41
+ 'pisell2.product.card.edit': string;
42
+ 'pisell2.product.card.day': (val: number) => string;
43
+ 'pisell2.product.card.day.event': (val: number) => string;
44
+ 'pisell2.product.card.minute': (val: number) => string;
45
+ 'pisell2.product.card.discount.note': string;
46
+ 'pisell2.product.card.discount.add.note': string;
47
+ 'pisell2.product.card.discount.edit.note': string;
48
+ 'pisell2.product.card.confirm': string;
49
+ 'pisell2.product.card.cancel': string;
50
+ 'pisell2.product.card.note.pla': string;
51
+ 'pisell2.product.card.items.package': string;
52
+ 'pisell2.product.card.view-all': string;
53
+ 'pisell2.product.card.view-less': string;
54
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
55
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
56
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
57
+ 'pisell2.product.card.add.holder.modal.title.1': string;
58
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
59
+ 'pisell2.product.card.sales': string;
60
+ 'pisell2.product.card.add.holder.modal.cancel': string;
61
+ 'pisell2.product.card.add.holder.modal.clear': string;
62
+ 'pisell2.product.card.add.holder.modal.apply': string;
63
+ 'pisell2.product.card.add.holder.modal.add': string;
64
+ 'pisell2.product.card.closing-soon.warning': string;
65
+ };
66
+ 'zh-HK': {
67
+ 'pisell2.product.card.discount.reason': string;
68
+ 'pisell2.cart.sku-card.more': string;
69
+ 'pisell2.cart.sku-card.packages.title': string;
70
+ 'pisell2.cart.sku-card.sales.title': string;
71
+ 'pisell2.cart.sku-card.actions.delete': string;
72
+ 'pisell2.cart.sku-card.unassigned': string;
73
+ 'pisell2.product.card.edit': string;
74
+ 'pisell2.product.card.day': (val: number) => string;
75
+ 'pisell2.product.card.day.event': (val: number) => string;
76
+ 'pisell2.product.card.minute': (val: number) => string;
77
+ 'pisell2.product.card.discount.note': string;
78
+ 'pisell2.product.card.discount.add.note': string;
79
+ 'pisell2.product.card.discount.edit.note': string;
80
+ 'pisell2.product.card.confirm': string;
81
+ 'pisell2.product.card.cancel': string;
82
+ 'pisell2.product.card.note.pla': string;
83
+ 'pisell2.product.card.items.package': string;
84
+ 'pisell2.product.card.view-all': string;
85
+ 'pisell2.product.card.view-less': string;
86
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
87
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
88
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
89
+ 'pisell2.product.card.add.holder.modal.title.1': string;
90
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
91
+ 'pisell2.product.card.sales': string;
92
+ 'pisell2.product.card.add.holder.modal.cancel': string;
93
+ 'pisell2.product.card.add.holder.modal.clear': string;
94
+ 'pisell2.product.card.add.holder.modal.apply': string;
95
+ 'pisell2.product.card.add.holder.modal.add': string;
96
+ 'pisell2.product.card.closing-soon.warning': string;
97
+ };
98
+ };
99
+ export default _default;
@@ -0,0 +1,33 @@
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
+ 'pisell2.cart.sku-card.unassigned': 'Unassigned'
16
+ }),
17
+ 'zh-CN': _objectSpread(_objectSpread({}, localeTexts['zh-CN']), {}, {
18
+ 'pisell2.product.card.discount.reason': '折扣原因',
19
+ 'pisell2.cart.sku-card.more': '更多……',
20
+ 'pisell2.cart.sku-card.packages.title': '包含的商品',
21
+ 'pisell2.cart.sku-card.sales.title': '销售',
22
+ 'pisell2.cart.sku-card.actions.delete': '删除',
23
+ 'pisell2.cart.sku-card.unassigned': '未分配'
24
+ }),
25
+ 'zh-HK': _objectSpread(_objectSpread({}, localeTexts['zh-HK']), {}, {
26
+ 'pisell2.product.card.discount.reason': '折扣原因',
27
+ 'pisell2.cart.sku-card.more': '更多……',
28
+ 'pisell2.cart.sku-card.packages.title': '包含的商品',
29
+ 'pisell2.cart.sku-card.sales.title': '銷售',
30
+ 'pisell2.cart.sku-card.actions.delete': '刪除',
31
+ 'pisell2.cart.sku-card.unassigned': '未分配'
32
+ })
33
+ };
@@ -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", "isShowAmountFooter", "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();
@@ -41,10 +42,13 @@ var ProductCard = function ProductCard(props) {
41
42
  isShowNote = _props$isShowNote === void 0 ? defaultValue.isShowNote : _props$isShowNote,
42
43
  _props$isShowDelete = props.isShowDelete,
43
44
  isShowDelete = _props$isShowDelete === void 0 ? defaultValue.isShowDelete : _props$isShowDelete,
45
+ _props$isShowAmountFo = props.isShowAmountFooter,
46
+ isShowAmountFooter = _props$isShowAmountFo === void 0 ? defaultValue.isShowAmountFooter : _props$isShowAmountFo,
44
47
  _props$isShowPackageN = props.isShowPackageNote,
45
48
  isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
46
49
  _props$isShowEditProd = props.isShowEditProduct,
47
50
  isShowEditProduct = _props$isShowEditProd === void 0 ? defaultValue.isShowEditProduct : _props$isShowEditProd,
51
+ scenario = props.scenario,
48
52
  _onEditProduct = props.onEditProduct,
49
53
  _onAction = props.onAction,
50
54
  _onDelete = props.onDelete,
@@ -101,7 +105,7 @@ var ProductCard = function ProductCard(props) {
101
105
  return _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(dataSource);
102
106
  }
103
107
  })), /*#__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)),
108
+ 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
109
  key: _id
106
110
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
107
111
  onClick: function onClick(e) {
@@ -173,4 +177,5 @@ var ProductCard = function ProductCard(props) {
173
177
  }
174
178
  }))));
175
179
  };
180
+ ProductCard.V2 = CartSkuCard;
176
181
  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': '銷售',
@@ -61,6 +61,7 @@ export var defaultValue = {
61
61
  isShowHolder: true,
62
62
  isShowNote: true,
63
63
  isShowDelete: true,
64
+ isShowAmountFooter: true,
64
65
  isShowPackageNote: true,
65
66
  isShowEditProduct: false,
66
67
  locale: 'en-US',
@@ -67,6 +67,7 @@ export declare type ProductCardTypes = {
67
67
  isShowNote?: boolean;
68
68
  isShowPackageNote?: boolean;
69
69
  isShowDelete?: boolean;
70
+ isShowAmountFooter?: boolean;
70
71
  disabledEdit?: boolean;
71
72
  locale?: string;
72
73
  symbol?: string;