@pisell/materials 3.0.61 → 3.0.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +28 -60
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +22 -54
  11. package/es/components/Pagination/index.d.ts +1 -1
  12. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  13. package/es/components/TimeResourceSelector/index.js +115 -0
  14. package/es/components/TimeResourceSelector/index.less +59 -0
  15. package/es/components/cardPro/index.js +1 -4
  16. package/es/components/collapse/index.js +27 -4
  17. package/es/components/iconfont/index.js +1 -1
  18. package/es/components/pisellAnchor/index.d.ts +15 -0
  19. package/es/components/pisellAnchor/index.js +126 -0
  20. package/es/components/pisellAnchor/index.less +177 -0
  21. package/es/components/pisellAvatar/index.d.ts +19 -0
  22. package/es/components/pisellAvatar/index.js +90 -0
  23. package/es/components/pisellAvatar/index.less +26 -0
  24. package/es/components/pisellCard/index.d.ts +8 -0
  25. package/es/components/pisellCard/index.js +34 -5
  26. package/es/components/pisellCard/index.less +31 -4
  27. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  28. package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
  29. package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
  30. package/es/components/pisellDropdown/index.d.ts +20 -0
  31. package/es/components/pisellDropdown/index.js +51 -0
  32. package/es/components/pisellDropdown/index.less +44 -0
  33. package/es/components/pisellEmpty/index.d.ts +2 -1
  34. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  35. package/es/components/pisellHeaderProgressBar/index.js +76 -0
  36. package/es/components/pisellHeaderProgressBar/index.less +18 -0
  37. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  38. package/es/components/pisellImageCarousels/index.js +108 -0
  39. package/es/components/pisellImageCarousels/index.less +92 -0
  40. package/es/components/pisellList01/index.d.ts +17 -0
  41. package/es/components/pisellList01/index.js +105 -0
  42. package/es/components/pisellList01/index.less +53 -0
  43. package/es/components/pisellModal/components/PcModal/index.js +1 -1
  44. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  45. package/es/components/pisellSectionHeaders/index.js +35 -0
  46. package/es/components/pisellSectionHeaders/index.less +46 -0
  47. package/es/components/pisellText/components/Amount/index.js +1 -1
  48. package/es/components/pisellViewGrid/index.d.ts +16 -0
  49. package/es/components/pisellViewGrid/index.js +66 -0
  50. package/es/components/pisellViewGrid/index.less +31 -0
  51. package/es/components/productCard/components/Action/index.js +1 -1
  52. package/es/components/productCard/components/AmountFooter/index.d.ts +1 -1
  53. package/es/components/productCard/components/AmountFooter/index.js +30 -10
  54. package/es/components/productCard/components/AmountFooter/index.less +11 -0
  55. package/es/components/productCard/components/Header/index.js +24 -15
  56. package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
  57. package/es/components/productCard/components/MultiDay/index.js +79 -0
  58. package/es/components/productCard/components/MultiDay/index.less +34 -0
  59. package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
  60. package/es/components/productCard/components/MultiDay/utils.js +54 -0
  61. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +11 -5
  62. package/es/components/productCard/components/Packages/components/options/index.js +2 -2
  63. package/es/components/productCard/components/Packages/index.js +1 -2
  64. package/es/components/productCard/components/Sales/index.js +2 -2
  65. package/es/components/productCard/components/Time/index.js +15 -13
  66. package/es/components/productCard/hooks/useOpenNote.js +3 -2
  67. package/es/components/productCard/index.d.ts +1 -1
  68. package/es/components/productCard/index.js +39 -21
  69. package/es/components/productCard/index.less +6 -1
  70. package/es/components/productCard/status.d.ts +24 -1
  71. package/es/components/productCard/status.js +54 -2
  72. package/es/components/productCard/types.d.ts +62 -1
  73. package/es/components/productCard/utils.d.ts +10 -144
  74. package/es/components/productCard/utils.js +49 -670
  75. package/es/components/section-footers/index.d.ts +9 -0
  76. package/es/components/section-footers/index.js +17 -0
  77. package/es/components/section-footers/index.less +5 -0
  78. package/es/components/table/Table/utils.d.ts +1 -1
  79. package/es/index.d.ts +10 -0
  80. package/es/index.js +10 -0
  81. package/lib/components/Pagination/index.d.ts +1 -1
  82. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  83. package/lib/components/TimeResourceSelector/index.js +109 -0
  84. package/lib/components/TimeResourceSelector/index.less +59 -0
  85. package/lib/components/cardPro/index.js +0 -3
  86. package/lib/components/collapse/index.js +30 -4
  87. package/lib/components/iconfont/index.js +1 -1
  88. package/lib/components/pisellAnchor/index.d.ts +15 -0
  89. package/lib/components/pisellAnchor/index.js +120 -0
  90. package/lib/components/pisellAnchor/index.less +177 -0
  91. package/lib/components/pisellAvatar/index.d.ts +19 -0
  92. package/lib/components/pisellAvatar/index.js +108 -0
  93. package/lib/components/pisellAvatar/index.less +26 -0
  94. package/lib/components/pisellCard/index.d.ts +8 -0
  95. package/lib/components/pisellCard/index.js +30 -7
  96. package/lib/components/pisellCard/index.less +31 -4
  97. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  98. package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
  99. package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
  100. package/lib/components/pisellDropdown/index.d.ts +20 -0
  101. package/lib/components/pisellDropdown/index.js +72 -0
  102. package/lib/components/pisellDropdown/index.less +44 -0
  103. package/lib/components/pisellEmpty/index.d.ts +2 -1
  104. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  105. package/lib/components/pisellHeaderProgressBar/index.js +88 -0
  106. package/lib/components/pisellHeaderProgressBar/index.less +18 -0
  107. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  108. package/lib/components/pisellImageCarousels/index.js +108 -0
  109. package/lib/components/pisellImageCarousels/index.less +92 -0
  110. package/lib/components/pisellList01/index.d.ts +17 -0
  111. package/lib/components/pisellList01/index.js +113 -0
  112. package/lib/components/pisellList01/index.less +53 -0
  113. package/lib/components/pisellModal/components/PcModal/index.js +1 -1
  114. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  115. package/lib/components/pisellSectionHeaders/index.js +52 -0
  116. package/lib/components/pisellSectionHeaders/index.less +46 -0
  117. package/lib/components/pisellText/components/Amount/index.js +2 -2
  118. package/lib/components/pisellViewGrid/index.d.ts +16 -0
  119. package/lib/components/pisellViewGrid/index.js +98 -0
  120. package/lib/components/pisellViewGrid/index.less +31 -0
  121. package/lib/components/productCard/components/Action/index.js +1 -1
  122. package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -1
  123. package/lib/components/productCard/components/AmountFooter/index.js +33 -9
  124. package/lib/components/productCard/components/AmountFooter/index.less +11 -0
  125. package/lib/components/productCard/components/Header/index.js +18 -9
  126. package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
  127. package/lib/components/productCard/components/MultiDay/index.js +72 -0
  128. package/lib/components/productCard/components/MultiDay/index.less +34 -0
  129. package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
  130. package/lib/components/productCard/components/MultiDay/utils.js +77 -0
  131. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
  132. package/lib/components/productCard/components/Packages/components/options/index.js +2 -2
  133. package/lib/components/productCard/components/Packages/index.js +1 -1
  134. package/lib/components/productCard/components/Sales/index.js +1 -2
  135. package/lib/components/productCard/components/Time/index.js +14 -11
  136. package/lib/components/productCard/hooks/useOpenNote.js +2 -1
  137. package/lib/components/productCard/index.d.ts +1 -1
  138. package/lib/components/productCard/index.js +37 -20
  139. package/lib/components/productCard/index.less +6 -1
  140. package/lib/components/productCard/status.d.ts +24 -1
  141. package/lib/components/productCard/status.js +37 -2
  142. package/lib/components/productCard/types.d.ts +62 -1
  143. package/lib/components/productCard/utils.d.ts +10 -144
  144. package/lib/components/productCard/utils.js +40 -566
  145. package/lib/components/section-footers/index.d.ts +9 -0
  146. package/lib/components/section-footers/index.js +44 -0
  147. package/lib/components/section-footers/index.less +5 -0
  148. package/lib/components/table/Table/utils.d.ts +1 -1
  149. package/lib/index.d.ts +10 -0
  150. package/lib/index.js +30 -0
  151. package/lowcode/pisell-anchor/meta.ts +118 -0
  152. package/lowcode/pisell-anchor/snippets.ts +26 -0
  153. package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
  154. package/lowcode/pisell-avatar/meta.ts +111 -0
  155. package/lowcode/pisell-avatar/snippets.ts +14 -0
  156. package/lowcode/pisell-card/meta.ts +62 -27
  157. package/lowcode/pisell-card/snippets.ts +6 -0
  158. package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
  159. package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
  160. package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
  161. package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
  162. package/lowcode/pisell-dropdown/meta.ts +180 -0
  163. package/lowcode/pisell-dropdown/snippets.ts +69 -0
  164. package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
  165. package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
  166. package/lowcode/pisell-image-carousels/meta.ts +143 -0
  167. package/lowcode/pisell-image-carousels/snippets.ts +20 -0
  168. package/lowcode/pisell-list01/meta.ts +74 -0
  169. package/lowcode/pisell-list01/snippets.ts +35 -0
  170. package/lowcode/pisell-section-headers/meta.ts +91 -0
  171. package/lowcode/pisell-section-headers/snippets.ts +22 -0
  172. package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
  173. package/lowcode/pisell-view-grid/meta.ts +167 -0
  174. package/lowcode/pisell-view-grid/snippets.ts +54 -0
  175. package/lowcode/section-footers/meta.ts +66 -0
  176. package/lowcode/section-footers/snippe.ts +21 -0
  177. package/package.json +4 -3
@@ -18,25 +18,30 @@ import Time from "./components/Time";
18
18
  import Packages from "./components/Packages";
19
19
  import Sales from "./components/Sales";
20
20
  import AmountFooter from "./components/AmountFooter";
21
+ import Items from "./components/MultiDay";
21
22
  import Note from "./components/Note";
22
23
  import Action from "./components/Action";
23
24
  import UseOpenNote from "./hooks/useOpenNote";
24
25
  import localeTexts from "./locales";
26
+ import { defaultValue } from "./status";
27
+ import useEngineContext from "../../hooks/useEngineContext";
25
28
  import "./index.less";
26
- locales.init(localeTexts, localStorage.getItem('umi_locale') || 'en');
27
29
  var ProductCard = function ProductCard(props) {
28
- var _dataSource$_extend, _dataSource$_extend$d, _classNames;
29
- var dataSource = props.dataSource,
30
+ var _utils$storage, _classNames, _dataSource$items;
31
+ var context = useEngineContext();
32
+ var utils = context.appHelper.utils || {};
33
+ var _props$dataSource = props.dataSource,
34
+ dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
30
35
  _props$isShowImage = props.isShowImage,
31
- isShowImage = _props$isShowImage === void 0 ? true : _props$isShowImage,
36
+ isShowImage = _props$isShowImage === void 0 ? defaultValue.isShowImage : _props$isShowImage,
32
37
  _props$isShowHolder = props.isShowHolder,
33
- isShowHolder = _props$isShowHolder === void 0 ? true : _props$isShowHolder,
38
+ isShowHolder = _props$isShowHolder === void 0 ? defaultValue.isShowHolder : _props$isShowHolder,
34
39
  _props$isShowNote = props.isShowNote,
35
- isShowNote = _props$isShowNote === void 0 ? true : _props$isShowNote,
40
+ isShowNote = _props$isShowNote === void 0 ? defaultValue.isShowNote : _props$isShowNote,
36
41
  _props$isShowDelete = props.isShowDelete,
37
- isShowDelete = _props$isShowDelete === void 0 ? true : _props$isShowDelete,
42
+ isShowDelete = _props$isShowDelete === void 0 ? defaultValue.isShowDelete : _props$isShowDelete,
38
43
  _props$isShowPackageN = props.isShowPackageNote,
39
- isShowPackageNote = _props$isShowPackageN === void 0 ? true : _props$isShowPackageN,
44
+ isShowPackageNote = _props$isShowPackageN === void 0 ? defaultValue.isShowPackageNote : _props$isShowPackageN,
40
45
  _onAction = props.onAction,
41
46
  _onDelete = props.onDelete,
42
47
  onNote = props.onNote,
@@ -44,6 +49,17 @@ var ProductCard = function ProductCard(props) {
44
49
  onCard = props.onCard,
45
50
  other = _objectWithoutProperties(props, _excluded);
46
51
  var useOpenNoteRef = useRef();
52
+ var locale = (utils === null || utils === void 0 ? void 0 : (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || localStorage.getItem('umi_locale');
53
+ locales.init(localeTexts, locale || 'en');
54
+ console.log(dataSource, isShowImage, isShowNote, 'dataSource');
55
+ var image = dataSource.image,
56
+ bundle = dataSource.bundle,
57
+ relation_products = dataSource.relation_products,
58
+ _id = dataSource._id,
59
+ isShowAction = dataSource.isShowAction,
60
+ actionText = dataSource.actionText,
61
+ errorMessage = dataSource.errorMessage,
62
+ isNormalProduct = dataSource.isNormalProduct;
47
63
 
48
64
  /**
49
65
  * @title: 显示图片
@@ -54,8 +70,8 @@ var ProductCard = function ProductCard(props) {
54
70
  * @Date: 2024-11-21 19:33
55
71
  */
56
72
  var showImage = useMemo(function () {
57
- return isShowImage && (dataSource === null || dataSource === void 0 ? void 0 : dataSource.cover);
58
- }, [isShowImage, dataSource === null || dataSource === void 0 ? void 0 : dataSource.cover]);
73
+ return isShowImage && image;
74
+ }, [isShowImage, image]);
59
75
 
60
76
  /**
61
77
  * @title: 是否隐藏footer分割线
@@ -66,12 +82,11 @@ var ProductCard = function ProductCard(props) {
66
82
  * @Date: 2024-11-23 13:30
67
83
  */
68
84
  var hideDivider = useMemo(function () {
69
- var _dataSource$bundle, _dataSource$relation_;
70
- return (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$bundle = dataSource.bundle) === null || _dataSource$bundle === void 0 ? void 0 : _dataSource$bundle.length) || (dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$relation_ = dataSource.relation_details) === null || _dataSource$relation_ === void 0 ? void 0 : _dataSource$relation_.length);
71
- }, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.bundle, dataSource === null || dataSource === void 0 ? void 0 : dataSource.relation_details]);
85
+ return (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (relation_products === null || relation_products === void 0 ? void 0 : relation_products.length);
86
+ }, [bundle, relation_products]);
72
87
  return /*#__PURE__*/React.createElement(CardPro, {
73
- className: classNames('pisell-lowcode-product-card', (_classNames = {}, _defineProperty(_classNames, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames, 'pisell-lowcode-normal-product-card', !showImage && !(dataSource !== null && dataSource !== void 0 && (_dataSource$_extend = dataSource._extend) !== null && _dataSource$_extend !== void 0 && (_dataSource$_extend$d = _dataSource$_extend.date) !== null && _dataSource$_extend$d !== void 0 && _dataSource$_extend$d.value)), _classNames)),
74
- key: dataSource === null || dataSource === void 0 ? void 0 : dataSource._id
88
+ className: classNames('pisell-lowcode-product-card', (_classNames = {}, _defineProperty(_classNames, 'pisell-lowcode-product-card-image', !showImage), _defineProperty(_classNames, 'pisell-lowcode-normal-product-card', !showImage && isNormalProduct), _defineProperty(_classNames, 'pisell-lowcode-product-card-disabled', dataSource === null || dataSource === void 0 ? void 0 : dataSource.disabled), _classNames)),
89
+ key: _id
75
90
  }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
76
91
  onClick: function onClick(e) {
77
92
  e.preventDefault();
@@ -86,19 +101,22 @@ var ProductCard = function ProductCard(props) {
86
101
  onDelete: function onDelete() {
87
102
  _onDelete === null || _onDelete === void 0 ? void 0 : _onDelete(dataSource);
88
103
  }
89
- })), dataSource !== null && dataSource !== void 0 && dataSource._extend ? /*#__PURE__*/React.createElement(Time, {
104
+ })), /*#__PURE__*/React.createElement(Time, {
90
105
  item: dataSource,
91
106
  isShowHolder: isShowHolder,
92
107
  onLike: function onLike(item) {
93
108
  return _onLike === null || _onLike === void 0 ? void 0 : _onLike(item);
94
109
  }
95
- }) : null, /*#__PURE__*/React.createElement(Packages, {
110
+ }), /*#__PURE__*/React.createElement(Packages, {
96
111
  item: dataSource,
97
112
  isShowPackageNote: isShowPackageNote
98
113
  }), /*#__PURE__*/React.createElement(Sales, {
99
114
  item: dataSource,
100
115
  isShowNote: isShowNote
101
- }), /*#__PURE__*/React.createElement(AmountFooter, {
116
+ }), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
117
+ dataSource: dataSource,
118
+ hideDivider: hideDivider
119
+ }) : /*#__PURE__*/React.createElement(AmountFooter, {
102
120
  item: dataSource,
103
121
  hideDivider: hideDivider,
104
122
  type: "total"
@@ -109,13 +127,13 @@ var ProductCard = function ProductCard(props) {
109
127
  item: dataSource
110
128
  });
111
129
  }
112
- })) : null, dataSource !== null && dataSource !== void 0 && dataSource._showAction && dataSource !== null && dataSource !== void 0 && dataSource._actionText ? /*#__PURE__*/React.createElement(Action, {
130
+ })) : null, isShowAction && actionText ? /*#__PURE__*/React.createElement(Action, {
113
131
  item: dataSource,
114
132
  onAction: function onAction() {
115
133
  return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
116
134
  }
117
- }) : null, dataSource !== null && dataSource !== void 0 && dataSource._errorMessage ? /*#__PURE__*/React.createElement(Alert, {
118
- message: dataSource._errorMessage,
135
+ }) : null, errorMessage ? /*#__PURE__*/React.createElement(Alert, {
136
+ message: errorMessage,
119
137
  type: "warning",
120
138
  showIcon: true,
121
139
  className: "pisell-lowcode-product-card-error"
@@ -1,6 +1,7 @@
1
1
  .pisell-lowcode-product-card {
2
2
  overflow: hidden;
3
3
  border: 1px solid var(--Gray-300, #d0d5dd);
4
+
4
5
  &:hover,
5
6
  &:active {
6
7
  border: 1px solid var(--Gray-400, #98a2b3);
@@ -36,7 +37,7 @@
36
37
  width: 6px;
37
38
  height: 100%;
38
39
  background: var(--Blue-400, #53b1fd);
39
- z-index: 2;
40
+ z-index: 1 !important;
40
41
  }
41
42
  }
42
43
 
@@ -46,6 +47,10 @@
46
47
  }
47
48
  }
48
49
 
50
+ .pisell-lowcode-product-card-disabled {
51
+ opacity: 0.4;
52
+ }
53
+
49
54
  .pisell-lowcode-product-card-error {
50
55
  border: none !important;
51
56
  margin: 8px -16px -8px;
@@ -1,4 +1,27 @@
1
- import { ProductCardTypes } from './types';
1
+ import { ProductCardTypes, bundleType, optionType, productType } from './types';
2
+ /**
3
+ * @title: 套餐数据
4
+ * @description:
5
+ * @return {*}
6
+ * @Author: WangHan
7
+ * @Date: 2025-01-02 23:21
8
+ */
9
+ export declare const defaultBundle: bundleType;
10
+ /**
11
+ * @description: 单规格
12
+ * @return {*}
13
+ * @Author: WangHan
14
+ * @Date: 2025-01-02 23:00
15
+ */
16
+ export declare const defaultOption: optionType;
17
+ /**
18
+ * @title: 商品商品类型
19
+ * @description:
20
+ * @return {*}
21
+ * @Author: WangHan
22
+ * @Date: 2025-01-02 22:48
23
+ */
24
+ export declare const defaultProduct: productType;
2
25
  /**
3
26
  * @title: 默认数据
4
27
  * @description:
@@ -1,3 +1,53 @@
1
+ /**
2
+ * @title: 套餐数据
3
+ * @description:
4
+ * @return {*}
5
+ * @Author: WangHan
6
+ * @Date: 2025-01-02 23:21
7
+ */
8
+ export var defaultBundle = {
9
+ id: 0,
10
+ name: '',
11
+ num: 1,
12
+ price: 0,
13
+ total: 0
14
+ };
15
+
16
+ /**
17
+ * @description: 单规格
18
+ * @return {*}
19
+ * @Author: WangHan
20
+ * @Date: 2025-01-02 23:00
21
+ */
22
+ export var defaultOption = {
23
+ id: 0,
24
+ name: '',
25
+ num: 1,
26
+ price: 0,
27
+ total: 0
28
+ };
29
+
30
+ /**
31
+ * @title: 商品商品类型
32
+ * @description:
33
+ * @return {*}
34
+ * @Author: WangHan
35
+ * @Date: 2025-01-02 22:48
36
+ */
37
+ export var defaultProduct = {
38
+ id: 0,
39
+ _id: 0,
40
+ name: '',
41
+ price: 0,
42
+ total: 0,
43
+ num: 1,
44
+ image: '',
45
+ isShowNote: true,
46
+ note: '',
47
+ is_show_duration: true,
48
+ is_show_week: true
49
+ };
50
+
1
51
  /**
2
52
  * @title: 默认数据
3
53
  * @description:
@@ -6,10 +56,12 @@
6
56
  * @Date: 2024-12-12 16:49
7
57
  */
8
58
  export var defaultValue = {
9
- dataSource: {},
59
+ dataSource: defaultProduct,
10
60
  isShowImage: true,
11
61
  isShowHolder: true,
12
62
  isShowNote: true,
13
63
  isShowDelete: true,
14
- isShowPackageNote: true
64
+ isShowPackageNote: true,
65
+ locale: 'en-US',
66
+ symbol: '$'
15
67
  };
@@ -1,14 +1,75 @@
1
+ export declare type bundleType = {
2
+ id: number;
3
+ name: string;
4
+ num: number;
5
+ price: number;
6
+ total: number;
7
+ origin_total?: number;
8
+ price_type?: string;
9
+ options?: optionType[];
10
+ };
11
+ /**
12
+ * @description:
13
+ * @return {*}
14
+ * @Author: WangHan
15
+ * @Date: 2025-01-02 23:00
16
+ */
17
+ export declare type optionType = {
18
+ id: number;
19
+ name: string;
20
+ num: number;
21
+ price: number;
22
+ total: number;
23
+ origin_total?: number;
24
+ };
25
+ /**
26
+ * @title: 商品商品类型
27
+ * @description:
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2025-01-02 22:48
31
+ */
32
+ export declare type productType = {
33
+ _id: string | number;
34
+ id: number;
35
+ name: string;
36
+ price: number;
37
+ total: number;
38
+ num: number;
39
+ origin_total?: number;
40
+ image?: string;
41
+ isShowNote?: boolean;
42
+ note?: string;
43
+ like_status?: string;
44
+ bundle?: bundleType[];
45
+ options?: optionType[];
46
+ isShowAction?: boolean;
47
+ actionText?: string;
48
+ errorMessage?: string;
49
+ product_option_string?: string;
50
+ discount_reason?: string;
51
+ relation_products?: any[];
52
+ resource_id?: string | number;
53
+ relation_form_name?: string;
54
+ holder_title?: string;
55
+ start_date?: string;
56
+ end_date?: string;
57
+ is_show_duration?: boolean;
58
+ is_show_week?: boolean;
59
+ };
1
60
  /**
2
61
  * 排序总配置
3
62
  */
4
63
  export declare type ProductCardTypes = {
5
- dataSource: any;
64
+ dataSource: productType;
6
65
  isShowImage?: boolean;
7
66
  isShowHolder?: boolean;
8
67
  isShowNote?: boolean;
9
68
  isShowPackageNote?: boolean;
10
69
  isShowDelete?: boolean;
11
70
  disabledEdit?: boolean;
71
+ locale?: string;
72
+ symbol?: string;
12
73
  onAction?: (val: any) => void;
13
74
  onDelete?: (val: any) => void;
14
75
  onNote?: (val: any) => void;
@@ -1,60 +1,24 @@
1
- import dayjs from 'dayjs';
2
1
  import 'dayjs/locale/zh-cn';
3
2
  import 'dayjs/locale/en';
4
3
  import 'dayjs/locale/zh-tw';
5
- declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
6
- declare class Request {
7
- private request;
8
- constructor();
9
- setRequest(val: any): void;
10
- getRequest(): {
11
- get: RType;
12
- post: RType;
13
- put: RType;
14
- remove: RType;
15
- custom: RType;
16
- };
17
- }
18
- export declare const request: Request;
19
4
  /**
20
- * @title: 格式化持续时长用于展示
5
+ * @title: 是否英文
21
6
  * @description:
22
- * @param {number} service_times
7
+ * @param {any} item
23
8
  * @return {*}
24
- * @Author: zhiwei.Wang
25
- * @Date: 2024-04-26 14:00
9
+ * @Author: WangHan
10
+ * @Date: 2024-12-28 22:49
26
11
  */
27
- export declare const getDiscountTime: (service_times: number) => string;
12
+ export declare const isEn: (item: any) => boolean;
28
13
  /**
29
- * @title: 时间切片
14
+ * @title: 跨日预约时间
30
15
  * @description:
31
- * @param {any} config
32
- * @param {string} locale
33
- * @return {*}
34
- * @Author: zhiwei.Wang
35
- * @Date: 2024-04-26 13:59
36
- */
37
- export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
38
- timeSlices: {
39
- label: string;
40
- value: string;
41
- }[];
42
- durationSlicesBasedOnTime: {
43
- label: string;
44
- value: number;
45
- }[];
46
- };
47
- export declare const getNowTime: () => string;
48
- export declare const isNowTime: (time: string) => boolean;
49
- /**
50
- * @title: 获取服务的开始时间, 如果是now 转换为当前的时间
51
- * @description:
52
- * @param {string} start_time
16
+ * @param {any} item
53
17
  * @return {*}
54
- * @Author: zhiwei.Wang
55
- * @Date: 2024-04-26 14:03
18
+ * @Author: WangHan
19
+ * @Date: 2024-12-28 22:50
56
20
  */
57
- export declare const getServeStartTime: (start_time: string) => string;
21
+ export declare const formatMultiDayDate: (item: any) => string;
58
22
  /**
59
23
  * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
60
24
  * @description:
@@ -65,101 +29,3 @@ export declare const getServeStartTime: (start_time: string) => string;
65
29
  * @Date: 2024-04-26 14:04
66
30
  */
67
31
  export declare const getServiceTime: (item: any, currentDate: any) => string;
68
- export declare const findNextSlice: ({ timeSlices, index, date, }: {
69
- timeSlices: any[];
70
- index?: number | undefined;
71
- date?: string | undefined;
72
- }) => any;
73
- export declare const findNextDuration: (current: any, array: any, defaultValue?: any) => any;
74
- export declare const formatProductListByCategory: (list: any, filterItem: any) => unknown[];
75
- export declare const getResourceTimeIsUsable: (item: any, cacheItem: any) => any;
76
- /**
77
- * @title: 查找是否有可用的time
78
- * @description:
79
- * @param {any} resourceItem
80
- * @return {*}
81
- * @Author: zhiwei.Wang
82
- * @Date: 2024-01-09 13:57
83
- */
84
- export declare const formatTimes: (resourceItem: any, cacheItem: any) => any;
85
- /**
86
- * @title: 获取店铺的营业结束时间
87
- * @description:
88
- * @return {*}
89
- * @Author: zhiwei.Wang
90
- * @Date: 2024-02-23 10:00
91
- */
92
- export declare const getShopOpeningHours: () => string;
93
- /**
94
- * @title: 对灵活时长进行处理
95
- * @description:
96
- * @return {*}
97
- * @Author: zhiwei.Wang
98
- * @Date: 2024-02-23 10:00
99
- */
100
- export declare const flexibleObj: {
101
- create: (num: number) => any;
102
- getValue: (str: string | number) => number;
103
- isFlexible: (str: string | number) => boolean;
104
- add: (current: number | string, duration: number) => any;
105
- };
106
- /**
107
- * @title: 获取结束时间
108
- * @description: 取 endDate | 店铺营业时间 最小的那一个
109
- * @param {any} startDate
110
- * @param {string} duration
111
- * @param {any} endDate
112
- * @return {*}
113
- * @Author: zhiwei.Wang
114
- * @Date: 2024-02-23 10:01
115
- */
116
- export declare const getEndDate: (startDate: any, duration: string | number, endDate: any) => any;
117
- export declare const getServiceTimes: (service: any) => {
118
- startDate: dayjs.Dayjs;
119
- endDate: dayjs.Dayjs;
120
- };
121
- export declare const getErrorList: (resource: any, cacheItem: any) => {
122
- label: any;
123
- type: string;
124
- }[];
125
- /**
126
- * @title: 格式化资源, 添加自定义参数
127
- * @description:
128
- * @param {any} resourceItem
129
- * @return {*}
130
- * @Author: zhiwei.Wang
131
- * @Date: 2024-01-09 13:40
132
- */
133
- export declare const formatResource: (resourceItem: any, cacheItem?: any, formatLabel?: any) => any;
134
- export declare const getLastServer: (list: any) => any;
135
- export declare const getCacheParams: () => any;
136
- export declare const deleteCacheParams: () => void;
137
- /**
138
- * @title: 创建一个服务商品
139
- * @description:
140
- * @param {any} state
141
- * @param {any} item
142
- * @return {*}
143
- * @Author: zhiwei.Wang
144
- * @Date: 2024-01-26 14:09
145
- */
146
- export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
147
- export declare const getProductTotalPrice: (item: any) => number;
148
- /**
149
- * @title: 判断 duration
150
- * @description: 用于处理不同格式的duration
151
- * @param {number} duration
152
- * @return {*}
153
- * @Author: zhiwei.Wang
154
- * @Date: 2024-02-23 10:02
155
- */
156
- export declare const getDuration: (duration: number | {
157
- type: string;
158
- value: number;
159
- }) => number | {
160
- type: string;
161
- value: number;
162
- } | "flexible";
163
- export declare const isWalkIn: (customer_id?: number | string) => boolean;
164
- export declare const getIsEdit: (state: any) => boolean;
165
- export {};