@pisell/private-materials 6.4.69 → 6.4.70

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.
@@ -117,7 +117,7 @@ export var formatProductBundle = function formatProductBundle(bundle) {
117
117
  // checkout 2.0 新增
118
118
  "price_type": d === null || d === void 0 ? void 0 : d.price_type,
119
119
  // checkout 2.0 新增
120
- "custom_price": new Decimal(d === null || d === void 0 ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
120
+ "custom_price": Math.abs(new Decimal(d === null || d === void 0 ? void 0 : d.price).sub(option_price).toNumber()).toFixed(2),
121
121
  "custom_price_type": d === null || d === void 0 ? void 0 : d.price_type,
122
122
  "option": option
123
123
  };
@@ -350,11 +350,6 @@ var CartClientCard = /*#__PURE__*/forwardRef(function (_ref, ref) {
350
350
  setHandleSetClient(handleSetClient);
351
351
  }
352
352
  }, [isActive]);
353
- useEffect(function () {
354
- return function () {
355
- setHandleSetClient(null);
356
- };
357
- }, [isActive]);
358
353
  var tags = useMemo(function () {
359
354
  var _latest_wallet_detail;
360
355
  if (!selectedCustomer) return;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
301
- action?: "amount" | "pay" | "deviceList" | undefined;
300
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
+ action?: "pay" | "amount" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
@@ -120,7 +120,7 @@ var formatProductBundle = (bundle) => {
120
120
  // checkout 2.0 新增
121
121
  "price_type": d == null ? void 0 : d.price_type,
122
122
  // checkout 2.0 新增
123
- "custom_price": new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber().toFixed(2),
123
+ "custom_price": Math.abs(new import_decimal.default(d == null ? void 0 : d.price).sub(option_price).toNumber()).toFixed(2),
124
124
  "custom_price_type": d == null ? void 0 : d.price_type,
125
125
  "option": option
126
126
  };
@@ -262,11 +262,6 @@ var CartClientCard = (0, import_react.forwardRef)(({
262
262
  (0, import_utils3.setHandleSetClient)(handleSetClient);
263
263
  }
264
264
  }, [isActive]);
265
- (0, import_react.useEffect)(() => {
266
- return () => {
267
- (0, import_utils3.setHandleSetClient)(null);
268
- };
269
- }, [isActive]);
270
265
  const tags = (0, import_react.useMemo)(() => {
271
266
  var _a2;
272
267
  if (!selectedCustomer) return;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
301
- action?: "amount" | "pay" | "deviceList" | undefined;
300
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
+ action?: "pay" | "amount" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.4.69",
3
+ "version": "6.4.70",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -62,8 +62,8 @@
62
62
  "@react-spring/web": "^9.6.1",
63
63
  "@use-gesture/react": "^10.3.1",
64
64
  "@pisell/icon": "0.0.11",
65
- "@pisell/date-picker": "3.0.7",
66
65
  "@pisell/utils": "3.0.2",
66
+ "@pisell/date-picker": "3.0.7",
67
67
  "@pisell/materials": "6.4.17"
68
68
  },
69
69
  "peerDependencies": {