@pisell/private-materials 6.2.33 → 6.2.35

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.
@@ -784,11 +784,7 @@ var Info = function Info(_, ref) {
784
784
  disabled: !isNormalProduct && !((_state$service$resour = state.service.resourcesOrigin) !== null && _state$service$resour !== void 0 && _state$service$resour.length),
785
785
  onClick: function onClick() {
786
786
  form.submit();
787
- },
788
- style: state !== null && state !== void 0 && state.isBookingTicket2 ? {
789
- width: '200px',
790
- maxWidth: '200px'
791
- } : {}
787
+ }
792
788
  }, locales.getText('pisell2.text.apply')));
793
789
  }, [(_state$service$resour2 = state.service.resourcesOrigin) === null || _state$service$resour2 === void 0 ? void 0 : _state$service$resour2.length, isNormalProduct]);
794
790
  console.log('render edit');
@@ -56,7 +56,7 @@ export default {
56
56
  },
57
57
  'pisell2.product.card.subtotal': 'Subtotal',
58
58
  'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
59
- if (hour === 0 && minute === 0) return "".concat(minute, "min");
59
+ if (hour <= 0 && minute <= 0) return "".concat(0, "min");
60
60
  return "".concat(hour > 0 ? "".concat(hour, "h") : '').concat(hour > 0 && minute > 0 ? ' ' : '').concat(minute > 0 ? "".concat(minute, "min") : '');
61
61
  },
62
62
  'pisell2.product.card.day': function pisell2ProductCardDay(val) {
@@ -128,7 +128,7 @@ export default {
128
128
  return "\u5DF2\u6709".concat(number, "\u4EF6");
129
129
  },
130
130
  'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
131
- if (hour === 0 && minute === 0) return "".concat(minute, "\u5206\u949F");
131
+ if (hour <= 0 && minute <= 0) return "".concat(0, "\u5206\u949F");
132
132
  return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u65F6") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u949F") : '');
133
133
  },
134
134
  'pisell2.product.card.day': function pisell2ProductCardDay(val) {
@@ -200,7 +200,7 @@ export default {
200
200
  },
201
201
  'pisell2.product.card.subtotal': '小計',
202
202
  'pisell2.product.card.hour.minute': function pisell2ProductCardHourMinute(hour, minute) {
203
- if (hour === 0 && minute === 0) return "".concat(minute, "\u5206\u9418");
203
+ if (hour <= 0 && minute <= 0) return "".concat(0, "\u5206\u9418");
204
204
  return "".concat(hour > 0 ? "".concat(hour, "\u5C0F\u6642") : '').concat(minute > 0 ? "".concat(minute, "\u5206\u9418") : '');
205
205
  },
206
206
  'pisell2.product.card.day': function pisell2ProductCardDay(val) {
@@ -119,7 +119,13 @@ var Info = (_, ref) => {
119
119
  useDuration
120
120
  });
121
121
  return val2;
122
- }, [durationProps, useStartTime, currentResource, (_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time, useDuration]);
122
+ }, [
123
+ durationProps,
124
+ useStartTime,
125
+ currentResource,
126
+ (_g = (_f = (_e = state.bookingConfig) == null ? void 0 : _e.config) == null ? void 0 : _f.basic) == null ? void 0 : _g.service_time,
127
+ useDuration
128
+ ]);
123
129
  (0, import_react.useEffect)(() => {
124
130
  try {
125
131
  if (useDuration.indexOf("flexible_") == 0) {
@@ -461,7 +467,12 @@ var Info = (_, ref) => {
461
467
  renderItem: (item) => (0, import_utils2.renderBundles)(item, state.amountSymbol)
462
468
  }
463
469
  ))));
464
- }, [(_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name, bundles, state.amountSymbol, state.isBookingCreatePage]);
470
+ }, [
471
+ (_s = (_r = (_q = state.service) == null ? void 0 : _q.cacheItem) == null ? void 0 : _r._extend) == null ? void 0 : _s.product_name,
472
+ bundles,
473
+ state.amountSymbol,
474
+ state.isBookingCreatePage
475
+ ]);
465
476
  const price = (0, import_react.useMemo)(() => {
466
477
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
467
478
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
@@ -493,7 +504,12 @@ var Info = (_, ref) => {
493
504
  }
494
505
  )
495
506
  ));
496
- }, [useTotal, (_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total, state.amountSymbol, state.channelDisabledEdit]);
507
+ }, [
508
+ useTotal,
509
+ (_u = (_t = state.service.cacheItem) == null ? void 0 : _t._extend) == null ? void 0 : _u.origin_total,
510
+ state.amountSymbol,
511
+ state.channelDisabledEdit
512
+ ]);
497
513
  const reason = (0, import_react.useMemo)(() => {
498
514
  return isReason ? /* @__PURE__ */ import_react.default.createElement(import_antd.Col, { span: 24 }, /* @__PURE__ */ import_react.default.createElement(
499
515
  import_antd.Form.Item,
@@ -550,16 +566,18 @@ var Info = (_, ref) => {
550
566
  getCurrentCacheItem
551
567
  }
552
568
  ));
553
- }, [state.renderType, (_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources, (_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps]);
569
+ }, [
570
+ state.renderType,
571
+ (_A = (_z = state.service.cacheItem) == null ? void 0 : _z._data) == null ? void 0 : _A.resources,
572
+ (_C = (_B = state.service.cacheItem) == null ? void 0 : _B._data) == null ? void 0 : _C.resourceMaps
573
+ ]);
554
574
  const capacity = (0, import_react.useMemo)(() => {
555
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(
556
- import_Capacity.default,
557
- {
558
- state,
559
- cacheItem: state.service.cacheItem
560
- }
561
- ));
562
- }, [state.locale, state.isTerminal, (_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys]);
575
+ return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { noStyle: true, name: "capacity" }, /* @__PURE__ */ import_react.default.createElement(import_Capacity.default, { state, cacheItem: state.service.cacheItem }));
576
+ }, [
577
+ state.locale,
578
+ state.isTerminal,
579
+ (_F = (_E = (_D = state.service) == null ? void 0 : _D.cacheItem) == null ? void 0 : _E._data) == null ? void 0 : _F.capacitys
580
+ ]);
563
581
  const hiddenQuantity = (0, import_react.useMemo)(() => {
564
582
  return /* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { hidden: true, name: "quantity" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, null));
565
583
  }, []);
@@ -633,15 +651,18 @@ var Info = (_, ref) => {
633
651
  disabled: !isNormalProduct && !((_a2 = state.service.resourcesOrigin) == null ? void 0 : _a2.length),
634
652
  onClick: () => {
635
653
  form.submit();
636
- },
637
- style: (state == null ? void 0 : state.isBookingTicket2) ? { width: "200px", maxWidth: "200px" } : {}
654
+ }
638
655
  },
639
656
  import_utils.locales.getText("pisell2.text.apply")
640
657
  )
641
658
  );
642
659
  }, [(_G = state.service.resourcesOrigin) == null ? void 0 : _G.length, isNormalProduct]);
643
660
  console.log("render edit");
644
- console.log(state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose), performance.now() - window.pp1, "打开商品1");
661
+ console.log(
662
+ state.service.editModal && !((_H = state.service.cacheItem) == null ? void 0 : _H.autoClose),
663
+ performance.now() - window.pp1,
664
+ "打开商品1"
665
+ );
645
666
  const [val, setVal] = (0, import_react.useState)(false);
646
667
  (0, import_react.useEffect)(() => {
647
668
  if (isShowTimeAndResource) {
@@ -76,7 +76,7 @@ var locales_default = {
76
76
  "pisell2.product.card.cart-items": (number) => `${number}items`,
77
77
  "pisell2.product.card.subtotal": "Subtotal",
78
78
  "pisell2.product.card.hour.minute": (hour, minute) => {
79
- if (hour === 0 && minute === 0) return `${minute}min`;
79
+ if (hour <= 0 && minute <= 0) return `${0}min`;
80
80
  return `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`;
81
81
  },
82
82
  "pisell2.product.card.day": (val) => `${val > 1 ? " days" : " day"}`,
@@ -138,7 +138,7 @@ var locales_default = {
138
138
  "pisell2.product.card.subtotal": "小计",
139
139
  "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`,
140
140
  "pisell2.product.card.hour.minute": (hour, minute) => {
141
- if (hour === 0 && minute === 0) return `${minute}分钟`;
141
+ if (hour <= 0 && minute <= 0) return `${0}分钟`;
142
142
  return `${hour > 0 ? `${hour}小时` : ""}${minute > 0 ? `${minute}分钟` : ""}`;
143
143
  },
144
144
  "pisell2.product.card.day": (val) => "天",
@@ -200,7 +200,7 @@ var locales_default = {
200
200
  "pisell2.product.card.cart-items": (number) => `${number}件商品`,
201
201
  "pisell2.product.card.subtotal": "小計",
202
202
  "pisell2.product.card.hour.minute": (hour, minute) => {
203
- if (hour === 0 && minute === 0) return `${minute}分鐘`;
203
+ if (hour <= 0 && minute <= 0) return `${0}分鐘`;
204
204
  return `${hour > 0 ? `${hour}小時` : ""}${minute > 0 ? `${minute}分鐘` : ""}`;
205
205
  },
206
206
  "pisell2.product.card.day": (val) => "天",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.2.33",
3
+ "version": "6.2.35",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,10 +59,10 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "react-resizable": "^3.0.5",
61
61
  "styled-components": "^6.0.0-rc.3",
62
- "@pisell/date-picker": "3.0.4",
63
62
  "@pisell/icon": "0.0.11",
64
- "@pisell/materials": "6.2.32",
65
- "@pisell/utils": "3.0.0"
63
+ "@pisell/materials": "6.2.34",
64
+ "@pisell/utils": "3.0.0",
65
+ "@pisell/date-picker": "3.0.4"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",