@licklist/design 0.71.5-dev.1 → 0.71.5-dev.10

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 (33) hide show
  1. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -0
  2. package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts +0 -1
  3. package/dist/events/edit-event-modal/hooks/useValidationOptions.d.ts.map +1 -1
  4. package/dist/events/edit-event-modal/hooks/useValidationOptions.js +1 -6
  5. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
  6. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +1 -0
  7. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +2 -1
  8. package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
  9. package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
  10. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
  11. package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
  12. package/dist/events/event-statistic-modal/hooks/useTableData.js +3 -2
  13. package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
  14. package/dist/events/event-statistic-modal/utils/index.js +4 -5
  15. package/dist/iframe/page/components/PageBody/constants.d.ts +1 -0
  16. package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
  17. package/dist/iframe/page/components/PageBody/constants.js +2 -1
  18. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  19. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +6 -1
  20. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  21. package/dist/iframe/ryft/RyftPaymentForm.js +4 -3
  22. package/dist/product-set/product/advanced-options/AdvancedOptions.js +1 -0
  23. package/dist/snippet/snippet-template/preview/Preview.js +1 -0
  24. package/package.json +5 -5
  25. package/src/events/edit-event-modal/hooks/useValidationOptions.tsx +0 -5
  26. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +6 -1
  27. package/src/events/event-statistic-modal/EventStatisticModal.tsx +3 -1
  28. package/src/events/event-statistic-modal/hooks/useTableData.tsx +5 -3
  29. package/src/events/event-statistic-modal/utils/index.ts +5 -13
  30. package/src/iframe/page/components/PageBody/constants.ts +1 -0
  31. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +11 -2
  32. package/src/iframe/ryft/RyftPaymentForm.tsx +10 -8
  33. package/yarn.lock +542 -474
@@ -64,6 +64,7 @@ import '@tanstack/react-table';
64
64
  import '../../../../../iframe/payment/order-items-table/hooks/useTableData.js';
65
65
  import '@licklist/plugins/dist/context/payment/PaymentSessionContext';
66
66
  import 'react-bootstrap/Alert';
67
+ import '@licklist/core/dist/DataMapper/Order/PaymentSessionOrderDataMapper';
67
68
  import '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
68
69
  import '@licklist/plugins/dist';
69
70
  import '../../../../../iframe/order-process/components/BookingSummary/BookingSummary.js';
@@ -1,7 +1,6 @@
1
1
  export declare const useValidationOptions: () => {
2
2
  start: {
3
3
  required: string;
4
- validate: (value: any) => string | true;
5
4
  };
6
5
  end: {
7
6
  required: string;
@@ -1 +1 @@
1
- {"version":3,"file":"useValidationOptions.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/hooks/useValidationOptions.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;kBASrB,MAAM;;;;kBAWN,MAAM;;;CAWjB,CAAA"}
1
+ {"version":3,"file":"useValidationOptions.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/hooks/useValidationOptions.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;kBASrB,MAAM;;;kBAMN,MAAM;;;CAWjB,CAAA"}
@@ -16,12 +16,7 @@ var useValidationOptions = function() {
16
16
  start: {
17
17
  required: t('Validation:fieldRequired', {
18
18
  attribute: t('start')
19
- }),
20
- // TODO: uncomment when event splitting is implemented
21
- // and extract into plugins
22
- validate: function(value) {
23
- return DateTime.fromISO(value).diffNow().toMillis() > 0 || t('Validation:fieldValidEventStart');
24
- }
19
+ })
25
20
  },
26
21
  end: {
27
22
  required: t('Validation:fieldRequired', {
@@ -1 +1 @@
1
- {"version":3,"file":"EditRecurrentEventModal.d.ts","sourceRoot":"","sources":["../../../src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,cAAc,CAAA;AAC1C,eAAO,MAAM,8BAA8B,2BAA2B,CAAA;AACtE,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C,QAAA,MAAM,KAAK,+DAID,CAAA;AAEV,eAAO,MAAM,2BAA2B,cAAkB,CAAA;AAE1D,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,kBAAkB,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,MAAM,EAAE,6BAA6B,KAAK,IAAI,CAAA;CAC1D,CAAA;AAED,eAAO,MAAM,uBAAuB,mDAMjC,4BAA4B,4CA2E9B,CAAA"}
1
+ {"version":3,"file":"EditRecurrentEventModal.d.ts","sourceRoot":"","sources":["../../../src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,cAAc,CAAA;AAC1C,eAAO,MAAM,8BAA8B,2BAA2B,CAAA;AACtE,eAAO,MAAM,eAAe,cAAc,CAAA;AAE1C,QAAA,MAAM,KAAK,+DAID,CAAA;AAEV,eAAO,MAAM,2BAA2B,cAAkB,CAAA;AAE1D,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAA;AAEvD,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,kBAAkB,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,MAAM,EAAE,6BAA6B,KAAK,IAAI,CAAA;CAC1D,CAAA;AAED,eAAO,MAAM,uBAAuB,mDAMjC,4BAA4B,4CAgF9B,CAAA"}
@@ -51,6 +51,7 @@ var EditRecurrentEventModal = function(param) {
51
51
  /*#__PURE__*/ jsx(Button, {
52
52
  variant: "danger",
53
53
  className: "btn-sm rounded",
54
+ disabled: disabled,
54
55
  onClick: onHide,
55
56
  children: /*#__PURE__*/ jsx(FaTimes, {
56
57
  size: 16
@@ -6,6 +6,7 @@ export type EventStatisticModalProps = {
6
6
  date?: Event['startAt'] | null;
7
7
  eventStatistic?: EventStatistic | null;
8
8
  title?: string;
9
+ eventId?: string;
9
10
  };
10
- export declare const EventStatisticModal: ({ isOpen, setIsOpen, date, eventStatistic, title, }: EventStatisticModalProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const EventStatisticModal: ({ isOpen, setIsOpen, date, eventStatistic, title, eventId, }: EventStatisticModalProps) => import("react/jsx-runtime").JSX.Element;
11
12
  //# sourceMappingURL=EventStatisticModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventStatisticModal.d.ts","sourceRoot":"","sources":["../../../src/events/event-statistic-modal/EventStatisticModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,yDAAyD,CAAA;AAK/E,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;IAC9B,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,mBAAmB,wDAM7B,wBAAwB,4CAiD1B,CAAA"}
1
+ {"version":3,"file":"EventStatisticModal.d.ts","sourceRoot":"","sources":["../../../src/events/event-statistic-modal/EventStatisticModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,yDAAyD,CAAA;AAK/E,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,CAAA;IAC9B,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACtC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,eAAO,MAAM,mBAAmB,iEAO7B,wBAAwB,4CAiD1B,CAAA"}
@@ -18,9 +18,9 @@ import '@tanstack/react-table';
18
18
  import { useTableData } from './hooks/useTableData.js';
19
19
 
20
20
  var EventStatisticModal = function(param) {
21
- var isOpen = param.isOpen, setIsOpen = param.setIsOpen, date = param.date, eventStatistic = param.eventStatistic, title = param.title;
21
+ var isOpen = param.isOpen, setIsOpen = param.setIsOpen, date = param.date, eventStatistic = param.eventStatistic, title = param.title, eventId = param.eventId;
22
22
  var t = useTranslation('Design').t;
23
- var data = useTableData(date, eventStatistic);
23
+ var data = useTableData(date, eventStatistic, eventId);
24
24
  var handleClose = function() {
25
25
  setIsOpen(false);
26
26
  };
@@ -1,5 +1,5 @@
1
1
  import { EventStatistic } from '@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper';
2
2
  import { Event } from '@licklist/core/dist/DataMapper/Provider/EventDataMapper';
3
3
  import { StaticTableData } from '../../../table';
4
- export declare const useTableData: (date: Event["startAt"] | null, eventStatistic: EventStatistic | null) => StaticTableData[];
4
+ export declare const useTableData: (date: Event["startAt"] | null, eventStatistic: EventStatistic | null, eventId: string) => StaticTableData[];
5
5
  //# sourceMappingURL=useTableData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTableData.d.ts","sourceRoot":"","sources":["../../../../src/events/event-statistic-modal/hooks/useTableData.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,yDAAyD,CAAA;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,YAAY,SACjB,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,kBACb,cAAc,GAAG,IAAI,sBA6EtC,CAAA"}
1
+ {"version":3,"file":"useTableData.d.ts","sourceRoot":"","sources":["../../../../src/events/event-statistic-modal/hooks/useTableData.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,yDAAyD,CAAA;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,eAAO,MAAM,YAAY,SACjB,KAAK,CAAC,SAAS,CAAC,GAAG,IAAI,kBACb,cAAc,GAAG,IAAI,WAC5B,MAAM,sBA8EhB,CAAA"}
@@ -52,7 +52,7 @@ function _unsupported_iterable_to_array(o, minLen) {
52
52
  if (n === "Map" || n === "Set") return Array.from(n);
53
53
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
54
54
  }
55
- var useTableData = function(date, eventStatistic) {
55
+ var useTableData = function(date, eventStatistic, eventId) {
56
56
  var t = useTranslation('Design').t;
57
57
  var formatNumber = useIntl().formatNumber;
58
58
  var _useState = _sliced_to_array(useState([]), 2), tableRows = _useState[0], setTableRows = _useState[1];
@@ -70,7 +70,7 @@ var useTableData = function(date, eventStatistic) {
70
70
  }
71
71
  return t(key);
72
72
  };
73
- var transformStatisticToTableRows = function(date, statistic) {
73
+ var transformStatisticToTableRows = function(date, statistic, eventId) {
74
74
  if (!statistic) {
75
75
  return [];
76
76
  }
@@ -106,6 +106,7 @@ var useTableData = function(date, eventStatistic) {
106
106
  // eslint-disable-next-line react-hooks/exhaustive-deps
107
107
  }, [
108
108
  date,
109
+ eventId,
109
110
  eventStatistic
110
111
  ]);
111
112
  return tableRows;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/events/event-statistic-modal/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AAKjG,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE;QACT,aAAa,EAAE,MAAM,CAAA;QACrB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;CACF,CAAA;AAED,eAAO,MAAM,gCAAgC,SACrC,MAAM,kBACI,cAAc,sBAqH/B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/events/event-statistic-modal/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AAKjG,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE;QACT,aAAa,EAAE,MAAM,CAAA;QACrB,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;CACF,CAAA;AAED,eAAO,MAAM,gCAAgC,SACrC,MAAM,kBACI,cAAc,sBA6G/B,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { DateTime } from 'luxon';
2
2
  import { DATE_FORMAT, DATE_TIME_FULL_FORMAT } from '@licklist/core/dist/Config';
3
- import { values } from 'lodash';
3
+ import { values, maxBy } from 'lodash';
4
4
 
5
5
  function _array_like_to_array(arr, len) {
6
6
  if (len == null || len > arr.length) len = arr.length;
@@ -45,11 +45,10 @@ var convertEventStatisticToTableData = function(date, eventStatistic) {
45
45
  return DateTime.fromFormat(date, DATE_TIME_FULL_FORMAT).toFormat(DATE_FORMAT) === summaryFormattedDate;
46
46
  })) !== null && _Object_keys_filter !== void 0 ? _Object_keys_filter : [];
47
47
  var summaryMap = new Map();
48
- var maxTotalQuantity = values(eventStatistic === null || eventStatistic === void 0 ? void 0 : eventStatistic.productCategorySummary).flat().flatMap(function(categorySummary) {
48
+ var allProductsSummary = values(eventStatistic === null || eventStatistic === void 0 ? void 0 : eventStatistic.productCategorySummary).flat().flatMap(function(categorySummary) {
49
49
  return categorySummary.productsSummary;
50
- }).reduce(function(acc, productSummary) {
51
- return productSummary.totalQuantity > acc ? productSummary.totalQuantity : acc;
52
- }, 0);
50
+ });
51
+ var maxTotalQuantity = maxBy(allProductsSummary, 'id').totalQuantity || 0;
53
52
  summaryDays.map(function(day) {
54
53
  return eventStatistic === null || eventStatistic === void 0 ? void 0 : eventStatistic.productCategorySummary[day];
55
54
  }).flat().sort(function(prev, next) {
@@ -1,4 +1,5 @@
1
1
  export declare const TAB_WIDTH = 768;
2
+ export declare const MOBILE_WIDTH = 480;
2
3
  export declare const RIGHT_BLOCK_RESIZED_EVENT = "RIGHT_BLOCK_RESIZED_EVENT";
3
4
  export declare const STANDARD_BODY_PADDING: number;
4
5
  export declare const STANDARD_HEADER_FOOTER_SIZE = 96;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/page/components/PageBody/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAA;AAC5B,eAAO,MAAM,yBAAyB,8BAA8B,CAAA;AAEpE,eAAO,MAAM,qBAAqB,QAAU,CAAA;AAE5C,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAG7C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAI7C,eAAO,MAAM,0CAA0C,KAAK,CAAA;AAE5D,eAAO,MAAM,kBAAkB,+BAA+B,CAAA;AAC9D,eAAO,MAAM,oBAAoB,yBAAyB,CAAA;AAC1D,eAAO,MAAM,oBAAoB,iCAAiC,CAAA;AAClE,eAAO,MAAM,qBAAqB,0BAA0B,CAAA;AAE5D,eAAO,MAAM,mBAAmB,qBAAqB,CAAA;AACrD,eAAO,MAAM,4BAA4B,oCAAoC,CAAA;AAC7E,eAAO,MAAM,0BAA0B,kCAAkC,CAAA;AACzE,eAAO,MAAM,uBAAuB,IAAI,CAAA;AACxC,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,eAAO,MAAM,4BAA4B,8BAA8B,CAAA;AACvE,eAAO,MAAM,4BAA4B,4BAA4B,CAAA;AACrE,eAAO,MAAM,qBAAqB,0BAA0B,CAAA;AAE5D,eAAO,MAAM,gCAAgC,MAAM,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/page/components/PageBody/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAA;AAC5B,eAAO,MAAM,YAAY,MAAM,CAAA;AAC/B,eAAO,MAAM,yBAAyB,8BAA8B,CAAA;AAEpE,eAAO,MAAM,qBAAqB,QAAU,CAAA;AAE5C,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAG7C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AAI7C,eAAO,MAAM,0CAA0C,KAAK,CAAA;AAE5D,eAAO,MAAM,kBAAkB,+BAA+B,CAAA;AAC9D,eAAO,MAAM,oBAAoB,yBAAyB,CAAA;AAC1D,eAAO,MAAM,oBAAoB,iCAAiC,CAAA;AAClE,eAAO,MAAM,qBAAqB,0BAA0B,CAAA;AAE5D,eAAO,MAAM,mBAAmB,qBAAqB,CAAA;AACrD,eAAO,MAAM,4BAA4B,oCAAoC,CAAA;AAC7E,eAAO,MAAM,0BAA0B,kCAAkC,CAAA;AACzE,eAAO,MAAM,uBAAuB,IAAI,CAAA;AACxC,eAAO,MAAM,eAAe,KAAK,CAAA;AAEjC,eAAO,MAAM,4BAA4B,8BAA8B,CAAA;AACvE,eAAO,MAAM,4BAA4B,4BAA4B,CAAA;AACrE,eAAO,MAAM,qBAAqB,0BAA0B,CAAA;AAE5D,eAAO,MAAM,gCAAgC,MAAM,CAAA"}
@@ -1,4 +1,5 @@
1
1
  var TAB_WIDTH = 768;
2
+ var MOBILE_WIDTH = 480;
2
3
  var RIGHT_BLOCK_RESIZED_EVENT = 'RIGHT_BLOCK_RESIZED_EVENT';
3
4
  // The sum of paddings in PageBody + header for first block
4
5
  var STANDARD_BODY_PADDING = 48 + 49;
@@ -20,4 +21,4 @@ var PAGE_CALENDAR_SELECT_WRAPPER = 'calendar-select-wrapper';
20
21
  var PAGE_BODY_WITH_SCROLL = 'page-body-with-scroll';
21
22
  var PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
22
23
 
23
- export { COLLAPSE_MARGIN, DEFAULT_RIGHT_BLOCK_HEIGHT, PAGE_BODY_WITH_SCROLL, PAGE_CALENDAR_SELECT_WRAPPER, PAGE_LEFT_BLOCK_CONTAINER_ID, PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE, PAGE_RIGHT_BLOCK_BOTTOM_ID, PAGE_RIGHT_BLOCK_CHILDREN_ID, PAGE_RIGHT_BLOCK_ID, RIGHT_BLOCK_COLLAPSE, RIGHT_BLOCK_COLLAPSED, RIGHT_BLOCK_EXPAND, RIGHT_BLOCK_EXPANDED, RIGHT_BLOCK_RESIZED_EVENT, SEPARATOR_DEFAULT_WIDTH, STANDARD_BODY_PADDING, STANDARD_HEADER_FOOTER_SIZE, TAB_WIDTH };
24
+ export { COLLAPSE_MARGIN, DEFAULT_RIGHT_BLOCK_HEIGHT, MOBILE_WIDTH, PAGE_BODY_WITH_SCROLL, PAGE_CALENDAR_SELECT_WRAPPER, PAGE_LEFT_BLOCK_CONTAINER_ID, PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE, PAGE_RIGHT_BLOCK_BOTTOM_ID, PAGE_RIGHT_BLOCK_CHILDREN_ID, PAGE_RIGHT_BLOCK_ID, RIGHT_BLOCK_COLLAPSE, RIGHT_BLOCK_COLLAPSED, RIGHT_BLOCK_EXPAND, RIGHT_BLOCK_EXPANDED, RIGHT_BLOCK_RESIZED_EVENT, SEPARATOR_DEFAULT_WIDTH, STANDARD_BODY_PADDING, STANDARD_HEADER_FOOTER_SIZE, TAB_WIDTH };
@@ -1 +1 @@
1
- {"version":3,"file":"useResizePageBody.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/hooks/useResizePageBody.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;eAMnB,MAAM;gBACL,MAAM;;CA2OjB,CAAA"}
1
+ {"version":3,"file":"useResizePageBody.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/hooks/useResizePageBody.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;eAMnB,MAAM;gBACL,MAAM;;CAmPjB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { useState, useRef, useMemo, useEffect } from 'react';
2
2
  import { useWindowDimensions } from '@licklist/plugins/dist/hooks/Media/useWindowDimensions';
3
- import { DEFAULT_RIGHT_BLOCK_HEIGHT, PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE, TAB_WIDTH, PAGE_CALENDAR_SELECT_WRAPPER, PAGE_BODY_WITH_SCROLL, STANDARD_BODY_PADDING, STANDARD_HEADER_FOOTER_SIZE, PAGE_LEFT_BLOCK_CONTAINER_ID, PAGE_RIGHT_BLOCK_BOTTOM_ID, SEPARATOR_DEFAULT_WIDTH, COLLAPSE_MARGIN, RIGHT_BLOCK_RESIZED_EVENT, RIGHT_BLOCK_EXPAND, RIGHT_BLOCK_EXPANDED, RIGHT_BLOCK_COLLAPSE, RIGHT_BLOCK_COLLAPSED } from '../constants.js';
3
+ import { DEFAULT_RIGHT_BLOCK_HEIGHT, PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE, TAB_WIDTH, PAGE_CALENDAR_SELECT_WRAPPER, PAGE_BODY_WITH_SCROLL, MOBILE_WIDTH, STANDARD_BODY_PADDING, STANDARD_HEADER_FOOTER_SIZE, PAGE_LEFT_BLOCK_CONTAINER_ID, PAGE_RIGHT_BLOCK_BOTTOM_ID, SEPARATOR_DEFAULT_WIDTH, COLLAPSE_MARGIN, RIGHT_BLOCK_RESIZED_EVENT, RIGHT_BLOCK_EXPAND, RIGHT_BLOCK_EXPANDED, RIGHT_BLOCK_COLLAPSE, RIGHT_BLOCK_COLLAPSED } from '../constants.js';
4
4
 
5
5
  function _array_like_to_array(arr, len) {
6
6
  if (len == null || len > arr.length) len = arr.length;
@@ -73,6 +73,11 @@ var useResizePageBody = function() {
73
73
  behavior: 'smooth'
74
74
  });
75
75
  }
76
+ if (width <= MOBILE_WIDTH && Boolean(CALENDAR_WRAPPER_HEIGHT)) {
77
+ return {
78
+ maxHeight: height - STANDARD_BODY_PADDING - rightBlockHeight - CALENDAR_WRAPPER_HEIGHT
79
+ };
80
+ }
76
81
  return {
77
82
  maxHeight: height - STANDARD_BODY_PADDING - rightBlockHeight - STANDARD_HEADER_FOOTER_SIZE - CALENDAR_WRAPPER_HEIGHT
78
83
  };
@@ -1 +1 @@
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;AAOzD,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,4CAqLtB,CAAA"}
1
+ {"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAaA,OAAO,EAEL,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;AAOzD,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,4CAqLtB,CAAA"}
@@ -5,7 +5,8 @@ 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, RYFT_STATUS_PENDING_PAYMENT } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
8
+ import { STATUS_PENDING_ACTION, STATUS_APPROVED, STATUS_CAPTURED, STATUS_PENDING_PAYMENT } from '@licklist/core/dist/DataMapper/Order/PaymentSessionOrderDataMapper';
9
+ import { useRyftPayment } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
9
10
  import '../../static/index.js';
10
11
  import { injectComponentsInRyftForm } from './utils/ryft-form.js';
11
12
  import { ButtonLoader } from '../../static/loader/ButtonLoader.js';
@@ -256,7 +257,7 @@ var RyftPaymentForm = function(param) {
256
257
  setRyftError('unknown_error');
257
258
  }
258
259
  if ('requiredAction' in paymentSession) {
259
- if (paymentSession.status !== RYFT_STATUS_PENDING_ACTION || !((_paymentSession_requiredAction = paymentSession.requiredAction) === null || _paymentSession_requiredAction === void 0 ? void 0 : _paymentSession_requiredAction.url)) {
260
+ if (paymentSession.status !== STATUS_PENDING_ACTION || !((_paymentSession_requiredAction = paymentSession.requiredAction) === null || _paymentSession_requiredAction === void 0 ? void 0 : _paymentSession_requiredAction.url)) {
260
261
  redirectOnFailAttempt(paymentSession);
261
262
  return [
262
263
  2
@@ -265,7 +266,7 @@ var RyftPaymentForm = function(param) {
265
266
  window.location.href = paymentSession.requiredAction.url;
266
267
  setReferrerBeforePayment();
267
268
  }
268
- if (paymentSession.status === RYFT_STATUS_APPROVED || paymentSession.status === RYFT_STATUS_CAPTURED || paymentSession.status === RYFT_STATUS_PENDING_PAYMENT) {
269
+ if (paymentSession.status === STATUS_APPROVED || paymentSession.status === STATUS_CAPTURED || paymentSession.status === STATUS_PENDING_PAYMENT) {
269
270
  redirectOnFailAttempt(paymentSession);
270
271
  return [
271
272
  2
@@ -46,6 +46,7 @@ import '@tanstack/react-table';
46
46
  import '../../../iframe/payment/order-items-table/hooks/useTableData.js';
47
47
  import '@licklist/plugins/dist/context/payment/PaymentSessionContext';
48
48
  import 'react-bootstrap/Alert';
49
+ import '@licklist/core/dist/DataMapper/Order/PaymentSessionOrderDataMapper';
49
50
  import '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
50
51
  import '@licklist/plugins/dist';
51
52
  import '../../../iframe/order-process/components/BookingSummary/BookingSummary.js';
@@ -46,6 +46,7 @@ import '@licklist/plugins/dist/context/payment/PaymentSessionContext';
46
46
  import '@licklist/core/dist/Config';
47
47
  import 'react-hook-form';
48
48
  import 'react-bootstrap/Alert';
49
+ import '@licklist/core/dist/DataMapper/Order/PaymentSessionOrderDataMapper';
49
50
  import '@licklist/plugins/dist/hooks/Ryft/useRyftPayment';
50
51
  import '@licklist/plugins/dist';
51
52
  import { BookingSummary } from '../../../iframe/order-process/components/BookingSummary/BookingSummary.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.71.5-dev.1",
3
+ "version": "0.71.5-dev.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -42,9 +42,9 @@
42
42
  ]
43
43
  },
44
44
  "peerDependencies": {
45
- "@licklist/core": "0.31.1-dev.4",
45
+ "@licklist/core": "0.31.2-dev.3",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.34.0-dev.4",
47
+ "@licklist/plugins": "0.35.0-dev.0",
48
48
  "lodash": "4.17.21",
49
49
  "luxon": "3.5.0",
50
50
  "react": "17.0.2",
@@ -61,9 +61,9 @@
61
61
  "@dnd-kit/utilities": "2.0.0",
62
62
  "@fortawesome/fontawesome-svg-core": "1.2.34",
63
63
  "@fortawesome/free-solid-svg-icons": "5.15.2",
64
- "@licklist/core": "0.31.2-dev.1",
64
+ "@licklist/core": "0.31.2-dev.3",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.34.0-dev.4",
66
+ "@licklist/plugins": "0.35.0-dev.0",
67
67
  "@mantine/core": "6.0.22",
68
68
  "@mantine/hooks": "6.0.22",
69
69
  "@mdx-js/react": "1.6.22",
@@ -12,11 +12,6 @@ export const useValidationOptions = () => {
12
12
  required: t('Validation:fieldRequired', {
13
13
  attribute: t('start'),
14
14
  }) as string,
15
- // TODO: uncomment when event splitting is implemented
16
- // and extract into plugins
17
- validate: (value) =>
18
- DateTime.fromISO(value).diffNow().toMillis() > 0 ||
19
- (t('Validation:fieldValidEventStart') as string),
20
15
  },
21
16
 
22
17
  end: {
@@ -61,7 +61,12 @@ export const EditRecurrentEventModal = ({
61
61
  <Form onSubmit={handleSubmit(onSubmit)} noValidate>
62
62
  <Modal.Header className='border-0'>
63
63
  <Modal.Title as='h6'>{title}</Modal.Title>
64
- <Button variant='danger' className='btn-sm rounded' onClick={onHide}>
64
+ <Button
65
+ variant='danger'
66
+ className='btn-sm rounded'
67
+ disabled={disabled}
68
+ onClick={onHide}
69
+ >
65
70
  <FaTimes size={16} />
66
71
  </Button>
67
72
  </Modal.Header>
@@ -12,6 +12,7 @@ export type EventStatisticModalProps = {
12
12
  date?: Event['startAt'] | null
13
13
  eventStatistic?: EventStatistic | null
14
14
  title?: string
15
+ eventId?: string
15
16
  }
16
17
 
17
18
  export const EventStatisticModal = ({
@@ -20,10 +21,11 @@ export const EventStatisticModal = ({
20
21
  date,
21
22
  eventStatistic,
22
23
  title,
24
+ eventId,
23
25
  }: EventStatisticModalProps) => {
24
26
  const { t } = useTranslation('Design')
25
27
 
26
- const data = useTableData(date, eventStatistic)
28
+ const data = useTableData(date, eventStatistic, eventId )
27
29
  const handleClose = () => {
28
30
  setIsOpen(false)
29
31
  }
@@ -11,6 +11,7 @@ import { StaticTableData } from '../../../table'
11
11
  export const useTableData = (
12
12
  date: Event['startAt'] | null,
13
13
  eventStatistic: EventStatistic | null,
14
+ eventId: string
14
15
  ) => {
15
16
  const { t } = useTranslation('Design')
16
17
  const { formatNumber } = useIntl()
@@ -33,6 +34,7 @@ export const useTableData = (
33
34
  const transformStatisticToTableRows = (
34
35
  date: Event['startAt'],
35
36
  statistic: EventStatistic | null,
37
+ eventId: string
36
38
  ) => {
37
39
  if (!statistic) {
38
40
  return []
@@ -40,7 +42,7 @@ export const useTableData = (
40
42
 
41
43
  const tableDataRows: StaticTableData[] = []
42
44
 
43
- convertEventStatisticToTableData(date, statistic).forEach(
45
+ convertEventStatisticToTableData(date, statistic, eventId).forEach(
44
46
  ({ name, quantity, total, isBold, isHeader, key }) => {
45
47
  const formattedTotal = !Object.keys(TRANSLATION_KEYS).includes(
46
48
  String(total),
@@ -82,9 +84,9 @@ export const useTableData = (
82
84
  }
83
85
 
84
86
  useEffect(() => {
85
- setTableRows(transformStatisticToTableRows(date, eventStatistic))
87
+ setTableRows(transformStatisticToTableRows(date, eventStatistic, eventId))
86
88
  // eslint-disable-next-line react-hooks/exhaustive-deps
87
- }, [date, eventStatistic])
89
+ }, [date, eventId, eventStatistic])
88
90
 
89
91
  return tableRows
90
92
  }
@@ -1,7 +1,7 @@
1
1
  import { EventStatistic } from '@licklist/core/dist/DataMapper/Provider/EventStatisticDataMapper'
2
2
  import { DateTime } from 'luxon'
3
3
  import { DATE_FORMAT, DATE_TIME_FULL_FORMAT } from '@licklist/core/dist/Config'
4
- import { values } from 'lodash'
4
+ import { values, maxBy } from 'lodash'
5
5
 
6
6
  export const TRANSLATION_KEYS = {
7
7
  shortQuantity: 'shortQuantity',
@@ -36,7 +36,6 @@ export const convertEventStatisticToTableData = (
36
36
  const summaryFormattedDate = DateTime.fromISO(date)
37
37
  .toUTC()
38
38
  .toFormat(DATE_FORMAT)
39
-
40
39
  const summaryDays =
41
40
  Object.keys(eventStatistic?.productCategorySummary)?.filter(
42
41
  (date) =>
@@ -46,15 +45,11 @@ export const convertEventStatisticToTableData = (
46
45
  ) ?? []
47
46
 
48
47
  const summaryMap = new Map<string, TableDataRecord>()
49
-
50
- const maxTotalQuantity = values(eventStatistic?.productCategorySummary)
48
+ const allProductsSummary = values(eventStatistic?.productCategorySummary)
51
49
  .flat()
52
50
  .flatMap((categorySummary) => categorySummary.productsSummary)
53
- .reduce(
54
- (acc, productSummary) =>
55
- productSummary.totalQuantity > acc ? productSummary.totalQuantity : acc,
56
- 0,
57
- )
51
+
52
+ const maxTotalQuantity = maxBy(allProductsSummary, 'id').totalQuantity || 0
58
53
 
59
54
  summaryDays
60
55
  .map((day) => eventStatistic?.productCategorySummary[day])
@@ -69,9 +64,7 @@ export const convertEventStatisticToTableData = (
69
64
  .forEach(
70
65
  ({ totalPerCategory, productsSummary = [], categoryName, eventId }) => {
71
66
  let quantity = 0
72
-
73
67
  totalAmount += totalPerCategory || 0
74
-
75
68
  if (!summaryMap.has(`${categoryName}`)) {
76
69
  summaryMap.set(`${categoryName}`, {
77
70
  name: categoryName,
@@ -113,13 +106,13 @@ export const convertEventStatisticToTableData = (
113
106
  })
114
107
  },
115
108
  )
116
-
117
109
  const prevTotalPerCategory = summaryMap.get(
118
110
  `${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`,
119
111
  ) ?? {
120
112
  quantity: 0,
121
113
  total: 0,
122
114
  }
115
+
123
116
  summaryMap.set(`${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`, {
124
117
  name: TRANSLATION_KEYS.totalPerCategory,
125
118
  key: `${eventId}.${categoryName}.${TRANSLATION_KEYS.totalPerCategory}`,
@@ -127,7 +120,6 @@ export const convertEventStatisticToTableData = (
127
120
  total: String(Number(prevTotalPerCategory.total) + totalPerCategory),
128
121
  isBold: true,
129
122
  })
130
-
131
123
  totalQuantity += quantity
132
124
  },
133
125
  )
@@ -1,4 +1,5 @@
1
1
  export const TAB_WIDTH = 768
2
+ export const MOBILE_WIDTH = 480
2
3
  export const RIGHT_BLOCK_RESIZED_EVENT = 'RIGHT_BLOCK_RESIZED_EVENT'
3
4
  // The sum of paddings in PageBody + header for first block
4
5
  export const STANDARD_BODY_PADDING = 48 + 49
@@ -2,6 +2,7 @@ import { useEffect, useMemo, useState, useRef } from 'react'
2
2
  import { useWindowDimensions } from '@licklist/plugins/dist/hooks/Media/useWindowDimensions'
3
3
  import {
4
4
  TAB_WIDTH,
5
+ MOBILE_WIDTH,
5
6
  STANDARD_BODY_PADDING,
6
7
  STANDARD_HEADER_FOOTER_SIZE,
7
8
  RIGHT_BLOCK_RESIZED_EVENT,
@@ -60,6 +61,16 @@ export const useResizePageBody = () => {
60
61
  })
61
62
  }
62
63
 
64
+ if (width <= MOBILE_WIDTH && Boolean(CALENDAR_WRAPPER_HEIGHT)) {
65
+ return {
66
+ maxHeight:
67
+ height -
68
+ STANDARD_BODY_PADDING -
69
+ rightBlockHeight -
70
+ CALENDAR_WRAPPER_HEIGHT,
71
+ }
72
+
73
+ }
63
74
  return {
64
75
  maxHeight:
65
76
  height -
@@ -87,7 +98,6 @@ export const useResizePageBody = () => {
87
98
 
88
99
  if (width >= TAB_WIDTH && !isContainerSizeApplied) {
89
100
  isContainerSizeApplied.current = true
90
-
91
101
  setLeftBlockContainerSizes({
92
102
  width: leftBlockContainer.clientWidth,
93
103
  height: leftBlockContainer.clientHeight,
@@ -117,7 +127,6 @@ export const useResizePageBody = () => {
117
127
  ) {
118
128
  minimalMapSize.current = calculatedMinimalMapSize
119
129
  }
120
-
121
130
  return {
122
131
  width: leftBlockContainer.clientWidth,
123
132
  height: minimalMapSize.current,
@@ -5,12 +5,14 @@ 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 {
9
+ STATUS_APPROVED,
10
+ STATUS_CAPTURED,
11
+ STATUS_PENDING_ACTION,
12
+ STATUS_PENDING_PAYMENT,
13
+ } from '@licklist/core/dist/DataMapper/Order/PaymentSessionOrderDataMapper'
8
14
  import {
9
15
  useRyftPayment,
10
- RYFT_STATUS_APPROVED,
11
- RYFT_STATUS_CAPTURED,
12
- RYFT_STATUS_PENDING_ACTION,
13
- RYFT_STATUS_PENDING_PAYMENT,
14
16
  AttemptPaymentResponse,
15
17
  } from '@licklist/plugins/dist/hooks/Ryft/useRyftPayment'
16
18
  import { ProviderPaymentSettings } from '@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper'
@@ -105,7 +107,7 @@ export const RyftPaymentForm = ({
105
107
 
106
108
  if ('requiredAction' in paymentSession) {
107
109
  if (
108
- paymentSession.status !== RYFT_STATUS_PENDING_ACTION ||
110
+ paymentSession.status !== STATUS_PENDING_ACTION ||
109
111
  !paymentSession.requiredAction?.url
110
112
  ) {
111
113
  redirectOnFailAttempt(paymentSession)
@@ -117,9 +119,9 @@ export const RyftPaymentForm = ({
117
119
  }
118
120
 
119
121
  if (
120
- paymentSession.status === RYFT_STATUS_APPROVED ||
121
- paymentSession.status === RYFT_STATUS_CAPTURED ||
122
- paymentSession.status === RYFT_STATUS_PENDING_PAYMENT
122
+ paymentSession.status === STATUS_APPROVED ||
123
+ paymentSession.status === STATUS_CAPTURED ||
124
+ paymentSession.status === STATUS_PENDING_PAYMENT
123
125
  ) {
124
126
  redirectOnFailAttempt(paymentSession)
125
127
  return