@licklist/design 0.70.0-dev.1 → 0.70.0-dev.3

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,5 +1,4 @@
1
1
  import { FieldValues, RefCallBack, UseFormClearErrors } from 'react-hook-form';
2
- import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper';
3
2
  import { Product, ProductCategory } from '@licklist/plugins/dist/types/context/sale/menuSteps';
4
3
  interface FormOrderItem {
5
4
  id: number;
@@ -7,7 +6,6 @@ interface FormOrderItem {
7
6
  price: number;
8
7
  productCategoryId: number;
9
8
  hasDeposit?: boolean;
10
- zoneId?: Zone['id'];
11
9
  deposit?: number | null;
12
10
  quantity: number;
13
11
  capacity?: number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAG5D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAkE3B,CAAA"}
1
+ {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAG5D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAiE3B,CAAA"}
@@ -8,7 +8,6 @@ var ProductQuantityInput = function(param) {
8
8
  var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid;
9
9
  var t = useTranslation('Design').t;
10
10
  var onChange = function(quantity) {
11
- var _category_zone;
12
11
  _onChange({
13
12
  id: product.id,
14
13
  name: product.name,
@@ -16,7 +15,6 @@ var ProductQuantityInput = function(param) {
16
15
  hasDeposit: category.allowDeposits && (product === null || product === void 0 ? void 0 : product.deposit) < product.price,
17
16
  price: product.price,
18
17
  productCategoryId: category.id,
19
- zoneId: (_category_zone = category.zone) === null || _category_zone === void 0 ? void 0 : _category_zone.id,
20
18
  quantity: quantity,
21
19
  capacity: product === null || product === void 0 ? void 0 : product.capacity
22
20
  });
@@ -1 +1 @@
1
- {"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CA8KtB,CAAA"}
1
+ {"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAOA,OAAO,EAML,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAKlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAEzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CA+KtB,CAAA"}
@@ -5,7 +5,7 @@ import { useForm } from 'react-hook-form';
5
5
  import Button from 'react-bootstrap/Button';
6
6
  import { useHistory } from 'react-router-dom';
7
7
  import Alert from 'react-bootstrap/Alert';
8
- import { useRyftPayment, RYFT_STATUS_PENDING_ACTION, RYFT_STATUS_APPROVED, RYFT_STATUS_CAPTURED } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
8
+ import { useRyftPayment, RYFT_STATUS_PENDING_ACTION, RYFT_STATUS_APPROVED, RYFT_STATUS_CAPTURED, RYFT_STATUS_PENDING_PAYMENT } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
9
9
  import '../../static/index.js';
10
10
  import { injectComponentsInRyftForm } from './utils/ryft-form.js';
11
11
  import { ButtonLoader } from '../../static/loader/ButtonLoader.js';
@@ -220,7 +220,7 @@ var RyftPaymentForm = function(param) {
220
220
  if (!(paymentSession === null || paymentSession === void 0 ? void 0 : paymentSession.id) || !(paymentSession === null || paymentSession === void 0 ? void 0 : paymentSession.returnUrl)) return;
221
221
  // Handle there cases when orderStatus - Captured, Approved,
222
222
  // or when no redirect URL and orderStatus - PendingAction
223
- window.location.href = "".concat(paymentSession.returnUrl, "&ps=").concat(paymentSession.id);
223
+ window.location.href = "".concat(paymentSession.returnUrl, "&paymentSessionId=").concat(paymentSession.id);
224
224
  setReferrerBeforePayment();
225
225
  };
226
226
  var handleSubmit = function() {
@@ -257,7 +257,7 @@ var RyftPaymentForm = function(param) {
257
257
  window.location.href = paymentSession.requiredAction.url;
258
258
  setReferrerBeforePayment();
259
259
  }
260
- if (paymentSession.status === RYFT_STATUS_APPROVED || paymentSession.status === RYFT_STATUS_CAPTURED) {
260
+ if (paymentSession.status === RYFT_STATUS_APPROVED || paymentSession.status === RYFT_STATUS_CAPTURED || paymentSession.status === RYFT_STATUS_PENDING_PAYMENT) {
261
261
  redirectOnFailAttempt(paymentSession);
262
262
  return [
263
263
  2
@@ -49,11 +49,11 @@ var injectComponentsInRyftForm = function(param) {
49
49
  var appleButton = document.getElementById('ryft-pay-apple-pay-button');
50
50
  if (googleButton) {
51
51
  googleButton.disabled = isDisableButton;
52
- googleButton.style.opacity = isDisableButton ? '1' : '0.6';
52
+ googleButton.style.opacity = !isDisableButton ? '1' : '0.6';
53
53
  }
54
54
  if (appleButton) {
55
55
  appleButton.disabled = isDisableButton;
56
- appleButton.style.opacity = isDisableButton ? '1' : '0.6';
56
+ appleButton.style.opacity = !isDisableButton ? '1' : '0.6';
57
57
  }
58
58
  }
59
59
  if (isAppUsingInIframe) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.70.0-dev.1",
3
+ "version": "0.70.0-dev.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -44,7 +44,7 @@
44
44
  "peerDependencies": {
45
45
  "@licklist/core": "0.31.0-dev.0",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.33.4-dev.0",
47
+ "@licklist/plugins": "0.34.0-dev.4",
48
48
  "lodash": "4.17.21",
49
49
  "luxon": "3.5.0",
50
50
  "react": "17.0.2",
@@ -63,7 +63,7 @@
63
63
  "@fortawesome/free-solid-svg-icons": "5.15.2",
64
64
  "@licklist/core": "0.31.0-dev.0",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.33.4-dev.0",
66
+ "@licklist/plugins": "0.34.0-dev.4",
67
67
  "@mantine/core": "6.0.22",
68
68
  "@mantine/hooks": "6.0.22",
69
69
  "@mdx-js/react": "1.6.22",
@@ -208,4 +208,4 @@
208
208
  "yarn": "4.4.0"
209
209
  },
210
210
  "stableVersion": "0.69.1-dev.3"
211
- }
211
+ }
@@ -2,7 +2,6 @@ import clsx from 'clsx'
2
2
  import { Button } from 'react-bootstrap'
3
3
  import { useTranslation } from 'react-i18next'
4
4
  import { FieldValues, RefCallBack, UseFormClearErrors } from 'react-hook-form'
5
- import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
6
5
  import {
7
6
  Product,
8
7
  ProductCategory,
@@ -15,7 +14,6 @@ interface FormOrderItem {
15
14
  price: number
16
15
  productCategoryId: number
17
16
  hasDeposit?: boolean
18
- zoneId?: Zone['id']
19
17
  deposit?: number | null
20
18
  quantity: number
21
19
  capacity?: number | null
@@ -51,7 +49,6 @@ export const ProductQuantityInput = ({
51
49
  hasDeposit: category.allowDeposits && product?.deposit < product.price,
52
50
  price: product.price,
53
51
  productCategoryId: category.id,
54
- zoneId: category.zone?.id,
55
52
  quantity,
56
53
  capacity: product?.capacity,
57
54
  })
@@ -10,6 +10,7 @@ import {
10
10
  RYFT_STATUS_APPROVED,
11
11
  RYFT_STATUS_CAPTURED,
12
12
  RYFT_STATUS_PENDING_ACTION,
13
+ RYFT_STATUS_PENDING_PAYMENT,
13
14
  AttemptPaymentResponse,
14
15
  } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
15
16
  import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
@@ -84,7 +85,7 @@ export const RyftPaymentForm = ({
84
85
 
85
86
  // Handle there cases when orderStatus - Captured, Approved,
86
87
  // or when no redirect URL and orderStatus - PendingAction
87
- window.location.href = `${paymentSession.returnUrl}&ps=${paymentSession.id}`
88
+ window.location.href = `${paymentSession.returnUrl}&paymentSessionId=${paymentSession.id}`
88
89
  setReferrerBeforePayment()
89
90
  }
90
91
 
@@ -112,7 +113,8 @@ export const RyftPaymentForm = ({
112
113
 
113
114
  if (
114
115
  paymentSession.status === RYFT_STATUS_APPROVED ||
115
- paymentSession.status === RYFT_STATUS_CAPTURED
116
+ paymentSession.status === RYFT_STATUS_CAPTURED ||
117
+ paymentSession.status === RYFT_STATUS_PENDING_PAYMENT
116
118
  ) {
117
119
  redirectOnFailAttempt(paymentSession)
118
120
  return
@@ -76,11 +76,11 @@ export const injectComponentsInRyftForm = ({
76
76
  ) as HTMLButtonElement
77
77
  if (googleButton) {
78
78
  googleButton.disabled = isDisableButton
79
- googleButton.style.opacity = isDisableButton ? '1' : '0.6'
79
+ googleButton.style.opacity = !isDisableButton ? '1' : '0.6'
80
80
  }
81
81
  if (appleButton) {
82
82
  appleButton.disabled = isDisableButton
83
- appleButton.style.opacity = isDisableButton ? '1' : '0.6'
83
+ appleButton.style.opacity = !isDisableButton ? '1' : '0.6'
84
84
  }
85
85
  }
86
86