@pisell/materials 1.0.859 → 1.0.861

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 (125) 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 +1 -1
  6. package/build/lowcode/preview.js +4 -4
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +14 -14
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +13 -13
  11. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
  12. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +17 -3
  13. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +26 -0
  14. package/es/components/productCard/cartSkuCard/index.js +2 -1
  15. package/es/components/productCard/cartSkuCard/locales.d.ts +72 -0
  16. package/es/components/productCard/cartSkuCard/locales.js +13 -6
  17. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
  18. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +16 -2
  19. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +26 -0
  20. package/lib/components/productCard/cartSkuCard/index.js +8 -1
  21. package/lib/components/productCard/cartSkuCard/locales.d.ts +72 -0
  22. package/lib/components/productCard/cartSkuCard/locales.js +14 -0
  23. package/package.json +3 -3
  24. package/es/components/appVersionControl/index.d.ts +0 -4
  25. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
  26. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -39
  27. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -98
  28. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -79
  29. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -16
  30. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
  31. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
  32. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  33. package/es/components/drag-sort-tree/index.d.ts +0 -3
  34. package/es/components/hardwareErrorTip/demo.d.ts +0 -3
  35. package/es/components/hardwareErrorTip/errorCard/index.d.ts +0 -28
  36. package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +0 -12
  37. package/es/components/hardwareErrorTip/index.d.ts +0 -19
  38. package/es/components/hardwareErrorTip/logCard/index.d.ts +0 -27
  39. package/es/components/hardwareErrorTip/types.d.ts +0 -44
  40. package/es/components/login-and-register/index.d.ts +0 -82
  41. package/es/components/pisell-config-provider/index.d.ts +0 -12
  42. package/es/components/pisellAdjustPrice/index.d.ts +0 -4
  43. package/es/components/pisellAdjustPrice/type.d.ts +0 -20
  44. package/es/components/pisellEmpty/index.d.ts +0 -19
  45. package/es/components/productCard/components/Header/Actions/index.d.ts +0 -3
  46. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  47. package/es/components/productCard/components/Note/index.d.ts +0 -3
  48. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
  49. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
  50. package/es/components/productCard/components/Time/index.d.ts +0 -3
  51. package/es/components/productCard/components/Warning/index.d.ts +0 -7
  52. package/es/components/productCard/index.d.ts +0 -7
  53. package/es/components/productCard/locales.d.ts +0 -84
  54. package/es/components/productCard/status.d.ts +0 -32
  55. package/es/components/productCard/types.d.ts +0 -84
  56. package/es/components/productCard/utils.d.ts +0 -31
  57. package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  58. package/es/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
  59. package/es/components/table/Gallery/index.d.ts +0 -5
  60. package/es/components/table/Table/index.d.ts +0 -4
  61. package/es/components/table/Table/utils.d.ts +0 -173
  62. package/es/components/table/hooks/useTableSetting.d.ts +0 -22
  63. package/es/components/table/hooks/useTransDataSource.d.ts +0 -12
  64. package/es/components/table/types.d.ts +0 -253
  65. package/es/components/versionModal/index.d.ts +0 -24
  66. package/es/components/virtual-keyboard/Amount/index.d.ts +0 -32
  67. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
  68. package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  69. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  70. package/es/components/walletCard/index.d.ts +0 -71
  71. package/es/index.d.ts +0 -142
  72. package/es/locales/en-US.d.ts +0 -313
  73. package/es/locales/zh-CN.d.ts +0 -308
  74. package/es/locales/zh-TW.d.ts +0 -308
  75. package/lib/components/appVersionControl/index.d.ts +0 -4
  76. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
  77. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -39
  78. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -98
  79. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -79
  80. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -16
  81. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
  82. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
  83. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  84. package/lib/components/drag-sort-tree/index.d.ts +0 -3
  85. package/lib/components/hardwareErrorTip/demo.d.ts +0 -3
  86. package/lib/components/hardwareErrorTip/errorCard/index.d.ts +0 -28
  87. package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +0 -12
  88. package/lib/components/hardwareErrorTip/index.d.ts +0 -19
  89. package/lib/components/hardwareErrorTip/logCard/index.d.ts +0 -27
  90. package/lib/components/hardwareErrorTip/types.d.ts +0 -44
  91. package/lib/components/login-and-register/index.d.ts +0 -82
  92. package/lib/components/pisell-config-provider/index.d.ts +0 -12
  93. package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
  94. package/lib/components/pisellAdjustPrice/type.d.ts +0 -20
  95. package/lib/components/pisellEmpty/index.d.ts +0 -19
  96. package/lib/components/productCard/components/Header/Actions/index.d.ts +0 -3
  97. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  98. package/lib/components/productCard/components/Note/index.d.ts +0 -3
  99. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
  100. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +0 -18
  101. package/lib/components/productCard/components/Time/index.d.ts +0 -3
  102. package/lib/components/productCard/components/Warning/index.d.ts +0 -7
  103. package/lib/components/productCard/index.d.ts +0 -7
  104. package/lib/components/productCard/locales.d.ts +0 -84
  105. package/lib/components/productCard/status.d.ts +0 -32
  106. package/lib/components/productCard/types.d.ts +0 -84
  107. package/lib/components/productCard/utils.d.ts +0 -31
  108. package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  109. package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
  110. package/lib/components/table/Gallery/index.d.ts +0 -5
  111. package/lib/components/table/Table/index.d.ts +0 -4
  112. package/lib/components/table/Table/utils.d.ts +0 -173
  113. package/lib/components/table/hooks/useTableSetting.d.ts +0 -22
  114. package/lib/components/table/hooks/useTransDataSource.d.ts +0 -12
  115. package/lib/components/table/types.d.ts +0 -253
  116. package/lib/components/versionModal/index.d.ts +0 -24
  117. package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -32
  118. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -21
  119. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  120. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  121. package/lib/components/walletCard/index.d.ts +0 -71
  122. package/lib/index.d.ts +0 -142
  123. package/lib/locales/en-US.d.ts +0 -313
  124. package/lib/locales/zh-CN.d.ts +0 -308
  125. package/lib/locales/zh-TW.d.ts +0 -308
@@ -15,6 +15,7 @@ interface IProps {
15
15
  num?: number;
16
16
  };
17
17
  style?: React.CSSProperties;
18
+ isMainProduct?: boolean;
18
19
  }
19
20
  declare const BasicInfo: (props: IProps) => JSX.Element;
20
21
  export default BasicInfo;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import classNames from 'classnames';
2
3
  import { image as imageAli, formatAmount } from '@pisell/utils';
3
4
  import Specs from "../specs";
4
5
  import { PREFIX } from "../../index";
@@ -7,7 +8,8 @@ var BasicInfo = function BasicInfo(props) {
7
8
  var isShowImage = props.isShowImage,
8
9
  _props$dataSource = props.dataSource,
9
10
  dataSource = _props$dataSource === void 0 ? {} : _props$dataSource,
10
- style = props.style;
11
+ style = props.style,
12
+ isMainProduct = props.isMainProduct;
11
13
  var image = dataSource.image,
12
14
  bundle = dataSource.bundle,
13
15
  options = dataSource.options,
@@ -21,14 +23,26 @@ var BasicInfo = function BasicInfo(props) {
21
23
  origin_total = _dataSource$origin_to === void 0 ? 0 : _dataSource$origin_to,
22
24
  _dataSource$num = dataSource.num,
23
25
  num = _dataSource$num === void 0 ? 1 : _dataSource$num;
26
+ var renderNumTag = function renderNumTag() {
27
+ if (num > 1) return /*#__PURE__*/React.createElement("div", {
28
+ className: classNames("num-tag", {
29
+ 'is-main': isMainProduct
30
+ })
31
+ }, num < 99 ? num : '99+');
32
+ return null;
33
+ };
24
34
  var hasSpecs = (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (options === null || options === void 0 ? void 0 : options.length) || product_option_string;
25
35
  return /*#__PURE__*/React.createElement("div", {
26
36
  className: "".concat(PREFIX, "__basic-info"),
27
37
  style: style || {}
28
- }, isShowImage && image && /*#__PURE__*/React.createElement("img", {
38
+ }, renderNumTag(), isShowImage && image && /*#__PURE__*/React.createElement("img", {
29
39
  src: imageAli.ali(image, 64),
30
40
  className: "product-cover"
31
- }), /*#__PURE__*/React.createElement("div", {
41
+ }), (!isShowImage || !image) && num > 1 ? /*#__PURE__*/React.createElement("div", {
42
+ style: {
43
+ width: 26
44
+ }
45
+ }) : null, /*#__PURE__*/React.createElement("div", {
32
46
  className: "product-info"
33
47
  }, /*#__PURE__*/React.createElement("div", {
34
48
  className: "product-name"
@@ -2,6 +2,32 @@
2
2
  &__basic-info {
3
3
  display: flex;
4
4
  gap: 4px;
5
+ position: relative;
6
+
7
+ .num-tag {
8
+ background-color: #7f56da;
9
+ position: absolute;
10
+ left: 0;
11
+ top: 0;
12
+ border-radius: 12px;
13
+ min-width: 24px;
14
+ height: 24px;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ z-index: 1;
19
+
20
+ color: var(--Base-White, #fff);
21
+ font-size: 16px;
22
+ font-style: normal;
23
+ font-weight: 600;
24
+ line-height: 16px;
25
+
26
+ &.is-main {
27
+ left: -4px;
28
+ top: -4px;
29
+ }
30
+ }
5
31
 
6
32
  img {
7
33
  width: 48px;
@@ -97,7 +97,8 @@ var CartSkuCard = function CartSkuCard(props) {
97
97
  var renderA2 = function renderA2() {
98
98
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
99
99
  isShowImage: isShowImage,
100
- dataSource: dataSource
100
+ dataSource: dataSource,
101
+ isMainProduct: true
101
102
  }), /*#__PURE__*/React.createElement(DiscountReason, {
102
103
  dataSource: dataSource
103
104
  }), isShowNote ? /*#__PURE__*/React.createElement(Note, _extends({}, other, {
@@ -4,18 +4,90 @@ declare const _default: {
4
4
  'pisell2.cart.sku-card.more': string;
5
5
  'pisell2.cart.sku-card.packages.title': string;
6
6
  'pisell2.cart.sku-card.sales.title': string;
7
+ 'pisell2.product.card.day': (val: number) => string;
8
+ 'pisell2.product.card.day.event': (val: number) => string;
9
+ 'pisell2.product.card.minute': (val: number) => string;
10
+ 'pisell2.product.card.discount.note': string;
11
+ 'pisell2.product.card.edit': string;
12
+ 'pisell2.product.card.discount.add.note': string;
13
+ 'pisell2.product.card.discount.edit.note': string;
14
+ 'pisell2.product.card.confirm': string;
15
+ 'pisell2.product.card.cancel': string;
16
+ 'pisell2.product.card.note.pla': string;
17
+ 'pisell2.product.card.items.package': string;
18
+ 'pisell2.product.card.view-all': string;
19
+ 'pisell2.product.card.view-less': string;
20
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
21
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
22
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
23
+ 'pisell2.product.card.add.holder.modal.title.1': string;
24
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
25
+ 'pisell2.product.card.sales': string;
26
+ 'pisell2.product.card.add.holder.modal.cancel': string;
27
+ 'pisell2.product.card.add.holder.modal.clear': string;
28
+ 'pisell2.product.card.add.holder.modal.apply': string;
29
+ 'pisell2.product.card.add.holder.modal.add': string;
30
+ 'pisell2.product.card.closing-soon.warning': string;
7
31
  };
8
32
  'zh-CN': {
9
33
  'pisell2.product.card.discount.reason': string;
10
34
  'pisell2.cart.sku-card.more': string;
11
35
  'pisell2.cart.sku-card.packages.title': string;
12
36
  'pisell2.cart.sku-card.sales.title': string;
37
+ 'pisell2.product.card.edit': string;
38
+ 'pisell2.product.card.day': (val: number) => string;
39
+ 'pisell2.product.card.day.event': (val: number) => string;
40
+ 'pisell2.product.card.minute': (val: number) => string;
41
+ 'pisell2.product.card.discount.note': string;
42
+ 'pisell2.product.card.discount.add.note': string;
43
+ 'pisell2.product.card.discount.edit.note': string;
44
+ 'pisell2.product.card.confirm': string;
45
+ 'pisell2.product.card.cancel': string;
46
+ 'pisell2.product.card.note.pla': string;
47
+ 'pisell2.product.card.items.package': string;
48
+ 'pisell2.product.card.view-all': string;
49
+ 'pisell2.product.card.view-less': string;
50
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
51
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
52
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
53
+ 'pisell2.product.card.add.holder.modal.title.1': string;
54
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
55
+ 'pisell2.product.card.sales': string;
56
+ 'pisell2.product.card.add.holder.modal.cancel': string;
57
+ 'pisell2.product.card.add.holder.modal.clear': string;
58
+ 'pisell2.product.card.add.holder.modal.apply': string;
59
+ 'pisell2.product.card.add.holder.modal.add': string;
60
+ 'pisell2.product.card.closing-soon.warning': string;
13
61
  };
14
62
  'zh-HK': {
15
63
  'pisell2.product.card.discount.reason': string;
16
64
  'pisell2.cart.sku-card.more': string;
17
65
  'pisell2.cart.sku-card.packages.title': string;
18
66
  'pisell2.cart.sku-card.sales.title': string;
67
+ 'pisell2.product.card.edit': string;
68
+ 'pisell2.product.card.day': (val: number) => string;
69
+ 'pisell2.product.card.day.event': (val: number) => string;
70
+ 'pisell2.product.card.minute': (val: number) => string;
71
+ 'pisell2.product.card.discount.note': string;
72
+ 'pisell2.product.card.discount.add.note': string;
73
+ 'pisell2.product.card.discount.edit.note': string;
74
+ 'pisell2.product.card.confirm': string;
75
+ 'pisell2.product.card.cancel': string;
76
+ 'pisell2.product.card.note.pla': string;
77
+ 'pisell2.product.card.items.package': string;
78
+ 'pisell2.product.card.view-all': string;
79
+ 'pisell2.product.card.view-less': string;
80
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
81
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
82
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
83
+ 'pisell2.product.card.add.holder.modal.title.1': string;
84
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
85
+ 'pisell2.product.card.sales': string;
86
+ 'pisell2.product.card.add.holder.modal.cancel': string;
87
+ 'pisell2.product.card.add.holder.modal.clear': string;
88
+ 'pisell2.product.card.add.holder.modal.apply': string;
89
+ 'pisell2.product.card.add.holder.modal.add': string;
90
+ 'pisell2.product.card.closing-soon.warning': string;
19
91
  };
20
92
  };
21
93
  export default _default;
@@ -1,20 +1,27 @@
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";
1
8
  export default {
2
- en: {
9
+ en: _objectSpread(_objectSpread({}, localeTexts.en), {}, {
3
10
  'pisell2.product.card.discount.reason': 'Discount reason',
4
11
  'pisell2.cart.sku-card.more': 'more...',
5
12
  'pisell2.cart.sku-card.packages.title': 'Items in package',
6
13
  'pisell2.cart.sku-card.sales.title': 'Sales'
7
- },
8
- 'zh-CN': {
14
+ }),
15
+ 'zh-CN': _objectSpread(_objectSpread({}, localeTexts['zh-CN']), {}, {
9
16
  'pisell2.product.card.discount.reason': '折扣原因',
10
17
  'pisell2.cart.sku-card.more': '更多……',
11
18
  'pisell2.cart.sku-card.packages.title': '包含的商品',
12
19
  'pisell2.cart.sku-card.sales.title': '销售'
13
- },
14
- 'zh-HK': {
20
+ }),
21
+ 'zh-HK': _objectSpread(_objectSpread({}, localeTexts['zh-HK']), {}, {
15
22
  'pisell2.product.card.discount.reason': '折扣原因',
16
23
  'pisell2.cart.sku-card.more': '更多……',
17
24
  'pisell2.cart.sku-card.packages.title': '包含的商品',
18
25
  'pisell2.cart.sku-card.sales.title': '銷售'
19
- }
26
+ })
20
27
  };
@@ -15,6 +15,7 @@ interface IProps {
15
15
  num?: number;
16
16
  };
17
17
  style?: React.CSSProperties;
18
+ isMainProduct?: boolean;
18
19
  }
19
20
  declare const BasicInfo: (props: IProps) => JSX.Element;
20
21
  export default BasicInfo;
@@ -33,12 +33,13 @@ __export(basicInfo_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(basicInfo_exports);
35
35
  var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
36
37
  var import_utils = require("@pisell/utils");
37
38
  var import_specs = __toESM(require("../specs"));
38
39
  var import__ = require("../../index");
39
40
  var import_index = require("./index.less");
40
41
  var BasicInfo = (props) => {
41
- const { isShowImage, dataSource = {}, style } = props;
42
+ const { isShowImage, dataSource = {}, style, isMainProduct } = props;
42
43
  const {
43
44
  image,
44
45
  bundle,
@@ -51,7 +52,20 @@ var BasicInfo = (props) => {
51
52
  origin_total = 0,
52
53
  num = 1
53
54
  } = dataSource;
55
+ const renderNumTag = () => {
56
+ if (num > 1)
57
+ return /* @__PURE__ */ import_react.default.createElement(
58
+ "div",
59
+ {
60
+ className: (0, import_classnames.default)(`num-tag`, {
61
+ "is-main": isMainProduct
62
+ })
63
+ },
64
+ num < 99 ? num : "99+"
65
+ );
66
+ return null;
67
+ };
54
68
  const hasSpecs = (bundle == null ? void 0 : bundle.length) || (options == null ? void 0 : options.length) || product_option_string;
55
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, isShowImage && image && /* @__PURE__ */ import_react.default.createElement("img", { src: import_utils.image.ali(image, 64), className: `product-cover` }), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num, 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
69
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), isShowImage && image && /* @__PURE__ */ import_react.default.createElement("img", { src: import_utils.image.ali(image, 64), className: `product-cover` }), (!isShowImage || !image) && num > 1 ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 26 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num, 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
56
70
  };
57
71
  var basicInfo_default = BasicInfo;
@@ -2,6 +2,32 @@
2
2
  &__basic-info {
3
3
  display: flex;
4
4
  gap: 4px;
5
+ position: relative;
6
+
7
+ .num-tag {
8
+ background-color: #7f56da;
9
+ position: absolute;
10
+ left: 0;
11
+ top: 0;
12
+ border-radius: 12px;
13
+ min-width: 24px;
14
+ height: 24px;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ z-index: 1;
19
+
20
+ color: var(--Base-White, #fff);
21
+ font-size: 16px;
22
+ font-style: normal;
23
+ font-weight: 600;
24
+ line-height: 16px;
25
+
26
+ &.is-main {
27
+ left: -4px;
28
+ top: -4px;
29
+ }
30
+ }
5
31
 
6
32
  img {
7
33
  width: 48px;
@@ -112,7 +112,14 @@ var CartSkuCard = (props) => {
112
112
  return (bundle == null ? void 0 : bundle.length) || (relation_products == null ? void 0 : relation_products.length);
113
113
  }, [dataSource]);
114
114
  const renderA2 = () => {
115
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_basicInfo.default, { isShowImage, dataSource }), /* @__PURE__ */ import_react.default.createElement(import_discountReason.default, { dataSource }), isShowNote ? /* @__PURE__ */ import_react.default.createElement(
115
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
116
+ import_basicInfo.default,
117
+ {
118
+ isShowImage,
119
+ dataSource,
120
+ isMainProduct: true
121
+ }
122
+ ), /* @__PURE__ */ import_react.default.createElement(import_discountReason.default, { dataSource }), isShowNote ? /* @__PURE__ */ import_react.default.createElement(
116
123
  import_Note.default,
117
124
  {
118
125
  ...other,
@@ -4,18 +4,90 @@ declare const _default: {
4
4
  'pisell2.cart.sku-card.more': string;
5
5
  'pisell2.cart.sku-card.packages.title': string;
6
6
  'pisell2.cart.sku-card.sales.title': string;
7
+ 'pisell2.product.card.day': (val: number) => string;
8
+ 'pisell2.product.card.day.event': (val: number) => string;
9
+ 'pisell2.product.card.minute': (val: number) => string;
10
+ 'pisell2.product.card.discount.note': string;
11
+ 'pisell2.product.card.edit': string;
12
+ 'pisell2.product.card.discount.add.note': string;
13
+ 'pisell2.product.card.discount.edit.note': string;
14
+ 'pisell2.product.card.confirm': string;
15
+ 'pisell2.product.card.cancel': string;
16
+ 'pisell2.product.card.note.pla': string;
17
+ 'pisell2.product.card.items.package': string;
18
+ 'pisell2.product.card.view-all': string;
19
+ 'pisell2.product.card.view-less': string;
20
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
21
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
22
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
23
+ 'pisell2.product.card.add.holder.modal.title.1': string;
24
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
25
+ 'pisell2.product.card.sales': string;
26
+ 'pisell2.product.card.add.holder.modal.cancel': string;
27
+ 'pisell2.product.card.add.holder.modal.clear': string;
28
+ 'pisell2.product.card.add.holder.modal.apply': string;
29
+ 'pisell2.product.card.add.holder.modal.add': string;
30
+ 'pisell2.product.card.closing-soon.warning': string;
7
31
  };
8
32
  'zh-CN': {
9
33
  'pisell2.product.card.discount.reason': string;
10
34
  'pisell2.cart.sku-card.more': string;
11
35
  'pisell2.cart.sku-card.packages.title': string;
12
36
  'pisell2.cart.sku-card.sales.title': string;
37
+ 'pisell2.product.card.edit': string;
38
+ 'pisell2.product.card.day': (val: number) => string;
39
+ 'pisell2.product.card.day.event': (val: number) => string;
40
+ 'pisell2.product.card.minute': (val: number) => string;
41
+ 'pisell2.product.card.discount.note': string;
42
+ 'pisell2.product.card.discount.add.note': string;
43
+ 'pisell2.product.card.discount.edit.note': string;
44
+ 'pisell2.product.card.confirm': string;
45
+ 'pisell2.product.card.cancel': string;
46
+ 'pisell2.product.card.note.pla': string;
47
+ 'pisell2.product.card.items.package': string;
48
+ 'pisell2.product.card.view-all': string;
49
+ 'pisell2.product.card.view-less': string;
50
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
51
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
52
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
53
+ 'pisell2.product.card.add.holder.modal.title.1': string;
54
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
55
+ 'pisell2.product.card.sales': string;
56
+ 'pisell2.product.card.add.holder.modal.cancel': string;
57
+ 'pisell2.product.card.add.holder.modal.clear': string;
58
+ 'pisell2.product.card.add.holder.modal.apply': string;
59
+ 'pisell2.product.card.add.holder.modal.add': string;
60
+ 'pisell2.product.card.closing-soon.warning': string;
13
61
  };
14
62
  'zh-HK': {
15
63
  'pisell2.product.card.discount.reason': string;
16
64
  'pisell2.cart.sku-card.more': string;
17
65
  'pisell2.cart.sku-card.packages.title': string;
18
66
  'pisell2.cart.sku-card.sales.title': string;
67
+ 'pisell2.product.card.edit': string;
68
+ 'pisell2.product.card.day': (val: number) => string;
69
+ 'pisell2.product.card.day.event': (val: number) => string;
70
+ 'pisell2.product.card.minute': (val: number) => string;
71
+ 'pisell2.product.card.discount.note': string;
72
+ 'pisell2.product.card.discount.add.note': string;
73
+ 'pisell2.product.card.discount.edit.note': string;
74
+ 'pisell2.product.card.confirm': string;
75
+ 'pisell2.product.card.cancel': string;
76
+ 'pisell2.product.card.note.pla': string;
77
+ 'pisell2.product.card.items.package': string;
78
+ 'pisell2.product.card.view-all': string;
79
+ 'pisell2.product.card.view-less': string;
80
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
81
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
82
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
83
+ 'pisell2.product.card.add.holder.modal.title.1': string;
84
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
85
+ 'pisell2.product.card.sales': string;
86
+ 'pisell2.product.card.add.holder.modal.cancel': string;
87
+ 'pisell2.product.card.add.holder.modal.clear': string;
88
+ 'pisell2.product.card.add.holder.modal.apply': string;
89
+ 'pisell2.product.card.add.holder.modal.add': string;
90
+ 'pisell2.product.card.closing-soon.warning': string;
19
91
  };
20
92
  };
21
93
  export default _default;
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
18
  };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
 
19
29
  // src/components/productCard/cartSkuCard/locales.ts
@@ -22,20 +32,24 @@ __export(locales_exports, {
22
32
  default: () => locales_default
23
33
  });
24
34
  module.exports = __toCommonJS(locales_exports);
35
+ var import_locales = __toESM(require("../locales"));
25
36
  var locales_default = {
26
37
  en: {
38
+ ...import_locales.default.en,
27
39
  "pisell2.product.card.discount.reason": "Discount reason",
28
40
  "pisell2.cart.sku-card.more": "more...",
29
41
  "pisell2.cart.sku-card.packages.title": "Items in package",
30
42
  "pisell2.cart.sku-card.sales.title": "Sales"
31
43
  },
32
44
  "zh-CN": {
45
+ ...import_locales.default["zh-CN"],
33
46
  "pisell2.product.card.discount.reason": "折扣原因",
34
47
  "pisell2.cart.sku-card.more": "更多……",
35
48
  "pisell2.cart.sku-card.packages.title": "包含的商品",
36
49
  "pisell2.cart.sku-card.sales.title": "销售"
37
50
  },
38
51
  "zh-HK": {
52
+ ...import_locales.default["zh-HK"],
39
53
  "pisell2.product.card.discount.reason": "折扣原因",
40
54
  "pisell2.cart.sku-card.more": "更多……",
41
55
  "pisell2.cart.sku-card.packages.title": "包含的商品",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.859",
3
+ "version": "1.0.861",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -72,8 +72,8 @@
72
72
  "react-barcode": "^1.5.3",
73
73
  "vod-js-sdk-v6": "^1.4.11",
74
74
  "@pisell/date-picker": "1.0.122",
75
- "@pisell/utils": "1.0.50",
76
- "@pisell/icon": "0.0.10"
75
+ "@pisell/icon": "0.0.10",
76
+ "@pisell/utils": "1.0.50"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "react": "^18.0.0",
@@ -1,4 +0,0 @@
1
- import { AppVersionControlProps } from './types';
2
- import './index.less';
3
- declare const AppVersionControl: (props: AppVersionControlProps) => JSX.Element;
4
- export default AppVersionControl;
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
- import { FormInstance } from 'antd';
3
- import { ModeType } from './type';
4
- import './style.less';
5
- export interface WithModeProps {
6
- renderMode?: ModeType;
7
- value?: any;
8
- onChange?: (value: any) => void;
9
- [key: string]: any;
10
- }
11
- /**
12
- * @title: 增加renderMode属性
13
- * @description: 基于renderMode属性控制渲染模式
14
- * @return: *
15
- * @Author: shengjie.zuo
16
- * @Date: 2024-11-23 17:13:18
17
- */
18
- export declare const withMode: <P extends object>(FieldComponent: React.ComponentType<P>, ReadPrettyComponent?: React.ComponentType<P & {
19
- renderMode: ModeType;
20
- }> | undefined, transformProps?: ((props: P, renderMode: ModeType) => P) | undefined) => React.FC<P & WithModeProps>;
21
- export interface WithFormItemProps {
22
- name: string;
23
- label?: string;
24
- mode?: ModeType;
25
- [key: string]: any;
26
- }
27
- export declare const formItemNameReplace: (name: string) => string;
28
- export declare const formItemNameReverse: (name: string) => string;
29
- export declare const isValidDomain: (value: string) => boolean;
30
- /**
31
- * @title: 追加formItem层
32
- * @description:
33
- * @return: *
34
- * @Author: shengjie.zuo
35
- * @Date: 2024-11-23 17:14:25
36
- */
37
- export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>, overlayProps?: {
38
- otherFormItemProps?: Record<string, any> | ((props: Record<string, any>, others?: Record<string, any>) => Record<string, any>) | undefined;
39
- innerProps?: Record<string, any> | undefined;
40
- } | undefined) => React.FC<P & WithFormItemProps>;
41
- export declare const withDataSource: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
42
- dataSource?: any;
43
- }) => JSX.Element;
44
- export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
45
- options?: any;
46
- optionSourceType?: "default" | "custom" | "api" | undefined;
47
- labelField: string;
48
- valueField: string;
49
- extraParams?: Record<string, any> | undefined;
50
- }) => JSX.Element;
51
- export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
52
- export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => JSX.Element | null;
53
- export declare function toArr(str: string | number | (string | number)[]): (string | number)[];
54
- export declare const filterSystemFields: (params: Record<string, any>) => Record<string, any>;
55
- export declare const transformFormObjToArrayWithUntouched: (obj: Record<string, any>) => any[];
56
- export declare const setFormFieldsUntouched: (form: FormInstance) => void;
@@ -1,39 +0,0 @@
1
- import { Drawer } from 'antd';
2
- import React from 'react';
3
- import { OperationItem } from '../type';
4
- declare const useDrawerState: (operationContent?: {
5
- [key: string]: React.ReactNode;
6
- } | undefined) => {
7
- drawerVisible: boolean;
8
- setDrawerVisible: React.Dispatch<React.SetStateAction<boolean>>;
9
- openDrawer: (item: OperationItem) => void;
10
- closeDrawer: () => void;
11
- drawerContent: React.ReactNode;
12
- Container: {
13
- (props: import("../../../pisellModal").PisellModalProps): JSX.Element;
14
- confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
15
- destroy: () => void;
16
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
17
- };
18
- info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
19
- destroy: () => void;
20
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
- };
22
- error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
23
- destroy: () => void;
24
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
25
- };
26
- warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
27
- warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
28
- destroy: () => void;
29
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
30
- };
31
- success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
32
- destroy: () => void;
33
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
34
- };
35
- Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
36
- } | typeof Drawer;
37
- containerProps: {};
38
- };
39
- export default useDrawerState;