@pisell/private-materials 3.0.15 → 3.0.17

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 (109) 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 +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/booking/addons/index.d.ts +1 -1
  12. package/es/components/booking/addons/index.js +148 -32
  13. package/es/components/booking/addons/model.d.ts +1 -2
  14. package/es/components/booking/components/TabProduct/selectProductItem/index.js +21 -8
  15. package/es/components/booking/components/TabProduct/selectProductItem/index.less +34 -27
  16. package/es/components/booking/components/TabProduct/tabs/index.less +4 -1
  17. package/es/components/booking/components/collapsibleList/index.d.ts +11 -0
  18. package/es/components/booking/components/collapsibleList/index.js +99 -0
  19. package/es/components/booking/components/collapsibleList/index.less +61 -0
  20. package/es/components/booking/components/collapsibleList/utils.d.ts +2 -0
  21. package/es/components/booking/components/collapsibleList/utils.js +21 -0
  22. package/es/components/booking/components/footer/amount.js +9 -10
  23. package/es/components/booking/components/footer/index.js +4 -1
  24. package/es/components/booking/components/footer/utils.d.ts +18 -0
  25. package/es/components/booking/components/footer/utils.js +76 -4
  26. package/es/components/booking/forms/forms.d.ts +1 -1
  27. package/es/components/booking/forms/index.d.ts +1 -1
  28. package/es/components/booking/forms/model.d.ts +1 -2
  29. package/es/components/booking/forms/single/index.js +16 -82
  30. package/es/components/booking/index.d.ts +1 -1
  31. package/es/components/booking/info/index.d.ts +1 -1
  32. package/es/components/booking/info/model.d.ts +1 -2
  33. package/es/components/booking/info/service/addService/index.js +141 -71
  34. package/es/components/booking/info/service/editService/index.js +49 -24
  35. package/es/components/booking/info/service/editService/index.less +21 -0
  36. package/es/components/booking/info/service/index.d.ts +2 -2
  37. package/es/components/booking/info/service/index.js +5 -129
  38. package/es/components/booking/info/service/index.less +0 -100
  39. package/es/components/booking/info/service/serve.d.ts +1 -0
  40. package/es/components/booking/info/service/serve.js +21 -0
  41. package/es/components/booking/info/service/serviceItem/index.d.ts +4 -0
  42. package/es/components/booking/info/service/serviceItem/index.js +63 -0
  43. package/es/components/booking/info/service/serviceItem/index.less +97 -0
  44. package/es/components/booking/info/service/serviceList/index.d.ts +4 -0
  45. package/es/components/booking/info/service/serviceList/index.js +105 -0
  46. package/es/components/booking/info/service/serviceList/index.less +0 -0
  47. package/es/components/booking/info/utils.d.ts +1 -0
  48. package/es/components/booking/info/utils.js +8 -0
  49. package/es/components/booking/model.d.ts +1 -2
  50. package/es/components/booking/notes/index.d.ts +1 -1
  51. package/es/components/booking/notes/model.d.ts +1 -2
  52. package/es/components/booking/payments/index.d.ts +1 -1
  53. package/es/components/booking/payments/model.d.ts +1 -2
  54. package/es/components/booking/utils.d.ts +16 -0
  55. package/es/components/booking/utils.js +37 -0
  56. package/es/components/productExtension/fields/SelectResourcesTable/index.js +2 -1
  57. package/es/components/productExtension/locales.js +5 -5
  58. package/es/components/schedules/index.d.ts +1 -1
  59. package/es/components/schedules/model.d.ts +1 -2
  60. package/lib/components/booking/addons/index.d.ts +1 -1
  61. package/lib/components/booking/addons/index.js +159 -35
  62. package/lib/components/booking/addons/model.d.ts +1 -2
  63. package/lib/components/booking/components/TabProduct/selectProductItem/index.js +33 -8
  64. package/lib/components/booking/components/TabProduct/selectProductItem/index.less +34 -27
  65. package/lib/components/booking/components/TabProduct/tabs/index.less +4 -1
  66. package/lib/components/booking/components/collapsibleList/index.d.ts +11 -0
  67. package/lib/components/booking/components/collapsibleList/index.js +94 -0
  68. package/lib/components/booking/components/collapsibleList/index.less +61 -0
  69. package/lib/components/booking/components/collapsibleList/utils.d.ts +2 -0
  70. package/lib/components/booking/components/collapsibleList/utils.js +46 -0
  71. package/lib/components/booking/components/footer/amount.js +9 -10
  72. package/lib/components/booking/components/footer/index.js +3 -0
  73. package/lib/components/booking/components/footer/utils.d.ts +18 -0
  74. package/lib/components/booking/components/footer/utils.js +46 -7
  75. package/lib/components/booking/forms/forms.d.ts +1 -1
  76. package/lib/components/booking/forms/index.d.ts +1 -1
  77. package/lib/components/booking/forms/model.d.ts +1 -2
  78. package/lib/components/booking/forms/single/index.js +12 -48
  79. package/lib/components/booking/index.d.ts +1 -1
  80. package/lib/components/booking/info/index.d.ts +1 -1
  81. package/lib/components/booking/info/model.d.ts +1 -2
  82. package/lib/components/booking/info/service/addService/index.js +68 -34
  83. package/lib/components/booking/info/service/editService/index.js +76 -56
  84. package/lib/components/booking/info/service/editService/index.less +21 -0
  85. package/lib/components/booking/info/service/index.d.ts +2 -2
  86. package/lib/components/booking/info/service/index.js +4 -112
  87. package/lib/components/booking/info/service/index.less +0 -100
  88. package/lib/components/booking/info/service/serve.d.ts +1 -0
  89. package/lib/components/booking/info/service/serve.js +30 -0
  90. package/lib/components/booking/info/service/serviceItem/index.d.ts +4 -0
  91. package/lib/components/booking/info/service/serviceItem/index.js +98 -0
  92. package/lib/components/booking/info/service/serviceItem/index.less +97 -0
  93. package/lib/components/booking/info/service/serviceList/index.d.ts +4 -0
  94. package/lib/components/booking/info/service/serviceList/index.js +129 -0
  95. package/lib/components/booking/info/service/serviceList/index.less +0 -0
  96. package/lib/components/booking/info/utils.d.ts +1 -0
  97. package/lib/components/booking/info/utils.js +35 -0
  98. package/lib/components/booking/model.d.ts +1 -2
  99. package/lib/components/booking/notes/index.d.ts +1 -1
  100. package/lib/components/booking/notes/model.d.ts +1 -2
  101. package/lib/components/booking/payments/index.d.ts +1 -1
  102. package/lib/components/booking/payments/model.d.ts +1 -2
  103. package/lib/components/booking/utils.d.ts +16 -0
  104. package/lib/components/booking/utils.js +29 -0
  105. package/lib/components/productExtension/fields/SelectResourcesTable/index.js +1 -1
  106. package/lib/components/productExtension/locales.js +5 -5
  107. package/lib/components/schedules/index.d.ts +1 -1
  108. package/lib/components/schedules/model.d.ts +1 -2
  109. package/package.json +3 -3
@@ -25,7 +25,7 @@ var getProductAmount = function getProductAmount(state, isEdit) {
25
25
  try {
26
26
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
27
27
  var item = _step.value;
28
- price += Number(item._extend.price) * (item._extend.quantity || 1);
28
+ price += Number(item._extend.total);
29
29
  duration += flexibleObj.getValue(item._extend.duration);
30
30
  }
31
31
  } catch (err) {
@@ -38,7 +38,7 @@ var getProductAmount = function getProductAmount(state, isEdit) {
38
38
  try {
39
39
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
40
40
  var _item = _step2.value;
41
- price += Number(_item.price) * _item.quantity;
41
+ price += Number(_item._extend.total) * _item._extend.quantity;
42
42
  }
43
43
  } catch (err) {
44
44
  _iterator2.e(err);
@@ -62,7 +62,7 @@ var getProductAmount = function getProductAmount(state, isEdit) {
62
62
  var getProductItemTax = function getProductItemTax(item, bookingDetail) {
63
63
  var price = 0;
64
64
  // 折扣后的金额 = 商品金额 - 商品折扣
65
- var productDiscountPrice = Number(item.price);
65
+ var productDiscountPrice = Number(item.total);
66
66
  // 店铺税 = 折扣后的金额 * 店铺税率 * 商品是否收税 (is_charge_tax 0 为不收税)
67
67
  var shopTax = productDiscountPrice * Number(bookingDetail.tax_rate) * Number(item.is_charge_tax);
68
68
  // 店铺税率 = 1 + 店铺税率 * 是否含税
@@ -83,10 +83,7 @@ var getProductItemTax = function getProductItemTax(item, bookingDetail) {
83
83
  * @Date: 2024-02-28 10:56
84
84
  */
85
85
  var getTotal = function getTotal(item) {
86
- return item._extend.payment_price !== undefined ? item._extend.payment_price : item._extend.price;
87
- };
88
- var getAddonsTotal = function getAddonsTotal(item) {
89
- return item.payment_price !== undefined ? item.payment_price : item.price;
86
+ return item._extend.payment_price !== undefined ? item._extend.payment_price : item._extend.total;
90
87
  };
91
88
 
92
89
  /**
@@ -112,7 +109,8 @@ var getTax = function getTax(state, isEdit) {
112
109
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
113
110
  var item = _step3.value;
114
111
  price += getProductItemTax(_objectSpread(_objectSpread({}, item), {}, {
115
- price: getTotal(item),
112
+ total: getTotal(item),
113
+ price: item._extend.price,
116
114
  quantity: item._extend.quantity
117
115
  }), state.bookingDetail);
118
116
  }
@@ -127,8 +125,9 @@ var getTax = function getTax(state, isEdit) {
127
125
  for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
128
126
  var _item2 = _step4.value;
129
127
  price += getProductItemTax(_objectSpread(_objectSpread({}, _item2), {}, {
130
- price: getAddonsTotal(_item2),
131
- quantity: _item2.quantity
128
+ total: getTotal(_item2),
129
+ price: _item2._extend.price,
130
+ quantity: _item2._extend.quantity
132
131
  }), state.bookingDetail);
133
132
  }
134
133
  } catch (err) {
@@ -317,8 +317,11 @@ var Footer = function Footer(props) {
317
317
  _context4.prev = 30;
318
318
  _context4.t1 = _context4["catch"](13);
319
319
  console.log(_context4.t1);
320
+ if ((_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.code) === 70101) {
321
+ message.error(_context4.t1 === null || _context4.t1 === void 0 ? void 0 : _context4.t1.message);
322
+ }
320
323
  _setLoading(false);
321
- case 34:
324
+ case 35:
322
325
  case "end":
323
326
  return _context4.stop();
324
327
  }
@@ -1 +1,19 @@
1
+ /**
2
+ * @title: 套餐单规格信息
3
+ * @description:
4
+ * @param {any} option
5
+ * @return {*}
6
+ * @Author: zhiwei.Wang
7
+ * @Date: 2024-02-19 09:26
8
+ */
9
+ export declare const formatProductOption: (option: any) => any;
10
+ /**
11
+ * @title: 套餐信息
12
+ * @description:
13
+ * @param {any} bundle
14
+ * @return {*}
15
+ * @Author: zhiwei.Wang
16
+ * @Date: 2024-02-19 09:26
17
+ */
18
+ export declare const formatProductBundle: (bundle: any) => any;
1
19
  export declare const formatValues: (state: any) => any;
@@ -24,28 +24,90 @@ var formatCustomer = function formatCustomer(data) {
24
24
  country_calling_code: (_data$client6 = data.client) === null || _data$client6 === void 0 ? void 0 : (_data$client6$value = _data$client6.value) === null || _data$client6$value === void 0 ? void 0 : _data$client6$value.country_calling_code
25
25
  };
26
26
  };
27
+
28
+ /**
29
+ * @title: 套餐单规格信息
30
+ * @description:
31
+ * @param {any} option
32
+ * @return {*}
33
+ * @Author: zhiwei.Wang
34
+ * @Date: 2024-02-19 09:26
35
+ */
36
+ export var formatProductOption = function formatProductOption(option) {
37
+ if (!option) {
38
+ return [];
39
+ }
40
+ return option.map(function (d) {
41
+ return {
42
+ "num": d.num,
43
+ "option_group_item_id": d.product_option_item_id,
44
+ "option_group_id": d.option_group_id
45
+ };
46
+ });
47
+ };
48
+
49
+ /**
50
+ * @title: 套餐信息
51
+ * @description:
52
+ * @param {any} bundle
53
+ * @return {*}
54
+ * @Author: zhiwei.Wang
55
+ * @Date: 2024-02-19 09:26
56
+ */
57
+ export var formatProductBundle = function formatProductBundle(bundle) {
58
+ if (!bundle) {
59
+ return;
60
+ }
61
+ return bundle.map(function (d) {
62
+ return {
63
+ "bundle_group_id": d.group_id,
64
+ "bundle_id": d.id,
65
+ "bundle_product_id": d._bundle_product_id,
66
+ "bundle_variant_id": d.bundle_variant_id,
67
+ "num": d.num,
68
+ "extension_id": d.extension_id,
69
+ "extension_type": d.extension_type,
70
+ "option": formatProductOption(d.option)
71
+ };
72
+ });
73
+ };
74
+
75
+ /**
76
+ * @title: 预约商品信息
77
+ * @description:
78
+ * @param {any} data
79
+ * @return {*}
80
+ * @Author: zhiwei.Wang
81
+ * @Date: 2024-02-19 09:26
82
+ */
27
83
  var formatBookings = function formatBookings(data) {
28
84
  var list = data.service.value;
29
85
  var eventOtherParams = data.eventOtherParams;
30
86
  var bookings = [];
31
87
  bookings = list.map(function (item) {
88
+ var _item$_extend, _item$_extend$other;
32
89
  var start_date = item._extend.startDate.format('YYYY-MM-DD');
33
- var start_time = item._extend.startDate.format("HH:mm");
34
90
  var end_date = item._extend.endDate.format('YYYY-MM-DD');
35
91
  var end_time = item._extend.endDate.format("HH:mm");
92
+ var start_time = item._extend.startDate.format("HH:mm");
93
+ var total = Number(item._extend.total);
94
+ var origin_total = Number(item._extend.origin_total);
95
+ var discount_amount = origin_total - total;
36
96
  return _objectSpread({
37
97
  "product": {
38
98
  "num": item._extend.quantity,
39
- "price": item.price,
99
+ "price": item._extend.price,
40
100
  "product_id": item.id,
41
- "discount_amount": Number(item.price) - Number(item._extend.price),
101
+ "discount_amount": discount_amount,
42
102
  "product_discount_reason": item._extend.discount_reason || '',
43
103
  "is_charge_tax": item.is_charge_tax,
44
104
  "note": "",
45
105
  "discountway": item._extend.discountway || "num",
46
106
  "discount_per": item._extend.discount_per,
47
107
  "discount_type": item._extend.discount_type || "discount",
48
- "order_detail_id": item._extend.order_detail_id || 0
108
+ "order_detail_id": item._extend.order_detail_id || 0,
109
+ "product_bundle": formatProductBundle((_item$_extend = item._extend) === null || _item$_extend === void 0 ? void 0 : (_item$_extend$other = _item$_extend.other) === null || _item$_extend$other === void 0 ? void 0 : _item$_extend$other.bundle),
110
+ "bundle_edit": item._extend.bundle_edit
49
111
  },
50
112
  'id': item.booking_id || 0,
51
113
  "relation_id": item._extend.relation_id,
@@ -65,6 +127,16 @@ var formatBookings = function formatBookings(data) {
65
127
  });
66
128
  return bookings;
67
129
  };
130
+
131
+ /**
132
+ * @title: 预约主体信息
133
+ * @description:
134
+ * @param {any} data
135
+ * @param {any} values
136
+ * @return {*}
137
+ * @Author: zhiwei.Wang
138
+ * @Date: 2024-02-19 09:26
139
+ */
68
140
  var formatHolder = function formatHolder(data, values) {
69
141
  var _data$bookingConfig, _data$bookingConfig$c, _data$bookingConfig$c2, _data$bookingConfig$c3, _data$pet$value, _data$pet, _data$pet$originValue, _data$pet$originValue2;
70
142
  var form_id = (data === null || data === void 0 ? void 0 : (_data$bookingConfig = data.bookingConfig) === null || _data$bookingConfig === void 0 ? void 0 : (_data$bookingConfig$c = _data$bookingConfig.config) === null || _data$bookingConfig$c === void 0 ? void 0 : (_data$bookingConfig$c2 = _data$bookingConfig$c.basic) === null || _data$bookingConfig$c2 === void 0 ? void 0 : (_data$bookingConfig$c3 = _data$bookingConfig$c2.appointment_subject) === null || _data$bookingConfig$c3 === void 0 ? void 0 : _data$bookingConfig$c3.form_id) || 0;
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => any;
24
+ declare const Forms: (props: any) => JSX.Element;
25
25
  export default Forms;
@@ -5,5 +5,5 @@ export interface InfoProps {
5
5
  globalState: any;
6
6
  setGlobalState: any;
7
7
  }
8
- declare const Forms: (props: any) => any;
8
+ declare const Forms: (props: any) => JSX.Element;
9
9
  export default Forms;
@@ -1,6 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
2
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
4
3
  state: FormState;
5
4
  } & {
6
5
  dispatch: (params: {
@@ -5,19 +5,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
5
5
  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; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- 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); }
11
- 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; }
12
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
- import React, { useCallback, useState, useMemo } from "react";
8
+ import React, { useCallback, useMemo } from "react";
15
9
  import FileDownload02 from "@pisell/icon/es/FileDownload02";
16
10
  import { image, locales } from "@pisell/utils";
17
11
  import { Avatar } from "antd";
18
12
  import CustomSelect from "../../components/customSelect";
13
+ import CollapsibleList from "../../components/collapsibleList";
19
14
  import "./index.less";
20
- var MAX_LIMIT = 3;
21
15
 
22
16
  /**
23
17
  * @title: 表单选择器
@@ -39,10 +33,6 @@ var Single = function Single(_ref) {
39
33
  addButtonProps = _ref.addButtonProps,
40
34
  modalOpen = _ref.modalOpen,
41
35
  watch = _ref.watch;
42
- var _useState = useState({}),
43
- _useState2 = _slicedToArray(_useState, 2),
44
- maxLimit = _useState2[0],
45
- setMaxLimit = _useState2[1];
46
36
  // const primaryField = useMemo(() => {
47
37
  // return field.field[0]?.key || "";
48
38
  // }, [field]);
@@ -125,69 +115,20 @@ var Single = function Single(_ref) {
125
115
  */
126
116
  var renderItem = useCallback(function (fieldData) {
127
117
  var _fields = form.field || [];
128
-
129
- // 默认展示3条, 点击更多时展示全部
130
- var _maxLimit = maxLimit[fieldData.form_record_id] || MAX_LIMIT;
131
- if (_fields.length > _maxLimit) {
132
- _fields = _fields.slice(0, _maxLimit);
133
- }
134
- return _fields.map(function (field) {
135
- return /*#__PURE__*/React.createElement("div", {
136
- className: "pet-form-item",
137
- key: field.key
138
- }, /*#__PURE__*/React.createElement("div", {
139
- className: "pet-form-item-label"
140
- }, field.field_column.title), /*#__PURE__*/React.createElement("div", {
141
- className: "pet-form-item-value"
142
- }, renderFieldValue(fieldData, field)));
118
+ return /*#__PURE__*/React.createElement(CollapsibleList, {
119
+ list: _fields,
120
+ renderItem: function renderItem(field) {
121
+ return /*#__PURE__*/React.createElement("div", {
122
+ className: "pet-form-item",
123
+ key: field.key
124
+ }, /*#__PURE__*/React.createElement("div", {
125
+ className: "pet-form-item-label"
126
+ }, field.field_column.title), /*#__PURE__*/React.createElement("div", {
127
+ className: "pet-form-item-value"
128
+ }, renderFieldValue(fieldData, field)));
129
+ }
143
130
  });
144
- }, [form, maxLimit]);
145
-
146
- /**
147
- * @title: 展开和收起
148
- * @description:
149
- * @param {any} d
150
- * @return {*}
151
- * @Author: zhiwei.Wang
152
- * @Date: 2024-01-30 17:08
153
- */
154
- var handlePreviewAll = function handlePreviewAll(d) {
155
- var _maxLimit = maxLimit[d.form_record_id] || MAX_LIMIT;
156
- if (_maxLimit === MAX_LIMIT) {
157
- _maxLimit = 99;
158
- } else {
159
- _maxLimit = MAX_LIMIT;
160
- }
161
- setMaxLimit(_objectSpread(_objectSpread({}, maxLimit), {}, _defineProperty({}, d.form_record_id, _maxLimit)));
162
- };
163
-
164
- /**
165
- * @title: 是否展开全部
166
- * @description:
167
- * @param {*} useMemo
168
- * @return {*}
169
- * @Author: zhiwei.Wang
170
- * @Date: 2024-01-30 17:08
171
- */
172
- var showAll = useMemo(function () {
173
- var _field = form.field || [];
174
- return _field.length > MAX_LIMIT;
175
- }, [maxLimit, form]);
176
-
177
- /**
178
- * @title: 展开文案
179
- * @description:
180
- * @return {*}
181
- * @Author: zhiwei.Wang
182
- * @Date: 2024-01-30 17:08
183
- */
184
- var viewAllText = useCallback(function (d) {
185
- var _maxLimit = maxLimit[d.form_record_id] || MAX_LIMIT;
186
- if (_maxLimit === MAX_LIMIT) {
187
- return locales.getText("pisell2.text.view-all");
188
- }
189
- return locales.getText("pisell2.text.view-less");
190
- }, [maxLimit]);
131
+ }, [form]);
191
132
 
192
133
  /**
193
134
  * @title: 渲染字段
@@ -259,14 +200,7 @@ var Single = function Single(_ref) {
259
200
  mode: _mode,
260
201
  previewItemClassName: "pisell-lowcode__booking-pet-card",
261
202
  previewItemRender: function previewItemRender(d) {
262
- return /*#__PURE__*/React.createElement(React.Fragment, null, renderItem(d), showAll ? /*#__PURE__*/React.createElement("div", {
263
- className: "pet-form-view-all",
264
- onClick: function onClick(e) {
265
- e.preventDefault();
266
- e.stopPropagation();
267
- handlePreviewAll(d);
268
- }
269
- }, viewAllText(d)) : null);
203
+ return renderItem(d);
270
204
  },
271
205
  name: ((_form$form3 = form.form) === null || _form$form3 === void 0 ? void 0 : _form$form3.title) || "-",
272
206
  addButtonProps: _addButtonProps,
@@ -1,2 +1,2 @@
1
- declare const Booking: (props: any) => any;
1
+ declare const Booking: (props: any) => JSX.Element;
2
2
  export default Booking;
@@ -8,5 +8,5 @@ export interface InfoProps {
8
8
  slot: any;
9
9
  setState: any;
10
10
  }
11
- declare const Info: (props: any) => any;
11
+ declare const Info: (props: any) => JSX.Element;
12
12
  export default Info;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from "../model";
3
2
  export declare const walkInData: {
4
3
  id: number;
5
4
  nickname: string;
6
5
  };
7
- export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
6
+ export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
8
7
  state: FormState;
9
8
  } & {
10
9
  dispatch: (params: {