@licklist/design 0.44.486-dev.17 → 0.44.486-dev.19

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,eAAO,MAAM,sBAAsB,mBAAoB,KAAK,EAAE,WAS7D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE7C,eAAO,MAAM,sBAAsB,mBAAoB,KAAK,EAAE,WAW7D,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.cartSumByOrderProducts=function(e){return e&&e.length?e.reduce((function(e,t){return e+((null==t?void 0:t.deposit)||(null==t?void 0:t.price))*t.quantity}),0):0};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.cartSumByOrderProducts=function(e){return e&&e.length?e.reduce((function(e,t){return t?e+((null==t?void 0:t.deposit)||(null==t?void 0:t.price))*t.quantity:0}),0):0};
@@ -46,6 +46,7 @@
46
46
  .header {
47
47
  background-color: color("white");
48
48
  padding: 0 2.5rem;
49
+ z-index: 2;
49
50
  min-height: 4rem;
50
51
  border-bottom: 1px solid #f0f0f0;
51
52
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.44.486-dev.17",
3
+ "version": "0.44.486-dev.19",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -5,6 +5,8 @@ export const cartSumByOrderProducts = (orderProducts?: Order[]) => {
5
5
  return 0;
6
6
  }
7
7
  return orderProducts.reduce((prevSumValue: number, product) => {
8
+ if (!product) return 0;
9
+
8
10
  return (
9
11
  prevSumValue + (product?.deposit || product?.price) * product.quantity
10
12
  );
@@ -100,18 +100,18 @@ export const PaymentPage = ({
100
100
  );
101
101
  }
102
102
 
103
- const orderTotalAmounByFormValues = cartSumByOrderProducts(
103
+ const orderTotalAmountByFormValues = cartSumByOrderProducts(
104
104
  bookingSummaryProps && bookingSummaryProps?.formValues
105
105
  ? Object.values(bookingSummaryProps?.formValues)
106
106
  : undefined
107
107
  );
108
108
 
109
- // User can fill promocode only in iframe appcliation.
109
+ // User can fill promo code only in iframe application.
110
110
  // It didn't possible via payment link. This check will
111
111
  // be applied when there are no metadata and in case when
112
112
  // orderValues sum is greater than amount in order.
113
113
  const isCalculatedAmountGreaterThanOrderAmount =
114
- orderTotalAmounByFormValues > data?.amount;
114
+ orderTotalAmountByFormValues > data?.amount;
115
115
 
116
116
  return (
117
117
  <Page
@@ -164,7 +164,7 @@ export const PaymentPage = ({
164
164
  <SummaryTotalBlock
165
165
  label={t("total")}
166
166
  amount={
167
- orderTotalAmounByFormValues +
167
+ orderTotalAmountByFormValues +
168
168
  (bookingSummaryProps?.transactionFee || 0)
169
169
  }
170
170
  />
@@ -46,6 +46,7 @@
46
46
  .header {
47
47
  background-color: color("white");
48
48
  padding: 0 2.5rem;
49
+ z-index: 2;
49
50
  min-height: 4rem;
50
51
  border-bottom: 1px solid #f0f0f0;
51
52
  }
package/src/typings.d.ts CHANGED
@@ -28,3 +28,14 @@ declare module "*.json" {
28
28
 
29
29
  declare module "react-phone-number-input/input";
30
30
  declare module "react-phone-number-input/commonjs/Flag";
31
+
32
+ // @TODO: this is a hofix for the following issue:
33
+ // licklist_workspace_frontend/packages/design/src/product-set/hooks/useSortableTreeFunctions.ts(17,34):
34
+ // semantic error TS2304: Cannot find name 'structuredClone'.
35
+ interface WindowOrWorkerGlobalScope {
36
+ structuredClone(value: any, options?: StructuredSerializeOptions): any;
37
+ }
38
+ declare function structuredClone(
39
+ value: any,
40
+ options?: StructuredSerializeOptions
41
+ ): any;