@licklist/design 0.72.0-stage.11 → 0.72.0-stage.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.
Files changed (44) hide show
  1. package/dist/date-time-button/DateTimeButton.js +4 -1
  2. package/dist/events/edit-event-modal/IntervalInput.d.ts +1 -2
  3. package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
  4. package/dist/events/edit-event-modal/IntervalInput.js +2 -9
  5. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -3
  6. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  7. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +8 -30
  8. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts +1 -10
  9. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
  10. package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +6 -17
  11. package/dist/events/event-card/EventCard.d.ts +1 -2
  12. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  13. package/dist/events/event-card/EventCard.js +2 -11
  14. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +1 -1
  15. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  16. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -2
  17. package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +2 -2
  18. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -1
  19. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  20. package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
  21. package/dist/iframe/payment/payment-page/PaymentPage.js +1 -4
  22. package/dist/index.js +1 -1
  23. package/dist/product-set/control/ProductSetControl.js +2 -1
  24. package/dist/product-set/form/ProductsControl.js +1 -1
  25. package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
  26. package/dist/recurrence-input/RecurrenceInput.js +3 -7
  27. package/package.json +3 -3
  28. package/src/date-time-button/DateTimeButton.tsx +3 -1
  29. package/src/events/edit-event-modal/IntervalInput.tsx +2 -7
  30. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +2 -43
  31. package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +8 -44
  32. package/src/events/event-card/EventCard.tsx +4 -15
  33. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +0 -2
  34. package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +2 -2
  35. package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -1
  36. package/src/iframe/payment/payment-page/PaymentPage.tsx +10 -8
  37. package/src/product-set/control/ProductSetControl.tsx +1 -1
  38. package/src/product-set/form/ProductsControl.tsx +1 -1
  39. package/src/recurrence-input/RecurrenceInput.tsx +3 -9
  40. package/yarn.lock +246 -250
  41. package/dist/events/edit-event-modal/utils/checkIfEventBooked.d.ts +0 -5
  42. package/dist/events/edit-event-modal/utils/checkIfEventBooked.d.ts.map +0 -1
  43. package/dist/events/edit-event-modal/utils/checkIfEventBooked.js +0 -27
  44. package/src/events/edit-event-modal/utils/checkIfEventBooked.ts +0 -44
@@ -14,7 +14,7 @@ var DateTimeButton = function(param) {
14
14
  var date = param.date, _isDisabled = param.isDisabled, isSelected = param.isSelected, _isSoldOut = param.isSoldOut, onSelect = param.onSelect, price = param.price, resources = param.resources, showResources = param.showResources, _param_variant = param.variant, variant = _param_variant === void 0 ? "week" : _param_variant, availabilityFormat = param.availabilityFormat;
15
15
  var isSoldOut = _isSoldOut || resources && resources.bookedResources >= resources.totalResources;
16
16
  var isTimeVariant = variant === "time";
17
- var isPast = isPastDate(date);
17
+ var isPast = variant === "time" ? isPastTime(date) : isPastDate(date);
18
18
  var isDisabled = _isDisabled || isSoldOut || isPast;
19
19
  var isUnavailable = _isDisabled || isPast;
20
20
  return /*#__PURE__*/ jsxs("button", {
@@ -45,6 +45,9 @@ var DateTimeButton = function(param) {
45
45
  ]
46
46
  });
47
47
  };
48
+ var isPastTime = function(date) {
49
+ return DateTime.now() > date;
50
+ };
48
51
  var isPastDate = function(date) {
49
52
  return DateTime.now() > date.set({
50
53
  hour: 23,
@@ -6,13 +6,12 @@ interface IntervalInputProps {
6
6
  productSetId?: number;
7
7
  disabled?: boolean;
8
8
  disabledRecurrent?: boolean;
9
- isCopyCreate?: boolean;
10
9
  }
11
10
  export interface IntervalInputValues {
12
11
  start: string;
13
12
  end: string;
14
13
  rrule: string | null;
15
14
  }
16
- export declare function IntervalInput({ disabled, editedProductSet, productSetId, productSets, disabledRecurrent, isCopyCreate }: IntervalInputProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function IntervalInput({ disabled, editedProductSet, productSetId, productSets, disabledRecurrent, }: IntervalInputProps): import("react/jsx-runtime").JSX.Element;
17
16
  export {};
18
17
  //# sourceMappingURL=IntervalInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IntervalInput.d.ts","sourceRoot":"","sources":["../../../src/events/edit-event-modal/IntervalInput.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AAIxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D,UAAU,kBAAkB;IAC1B,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAyB,EACzB,YAAoB,EACrB,EAAE,kBAAkB,2CAkKpB"}
1
+ {"version":3,"file":"IntervalInput.d.ts","sourceRoot":"","sources":["../../../src/events/edit-event-modal/IntervalInput.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AAIxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D,UAAU,kBAAkB;IAC1B,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAyB,GAC1B,EAAE,kBAAkB,2CA+JpB"}
@@ -110,7 +110,7 @@ function _unsupported_iterable_to_array(o, minLen) {
110
110
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
111
111
  }
112
112
  function IntervalInput(param) {
113
- var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, editedProductSet = param.editedProductSet, productSetId = param.productSetId, productSets = param.productSets, _param_disabledRecurrent = param.disabledRecurrent, disabledRecurrent = _param_disabledRecurrent === void 0 ? false : _param_disabledRecurrent, _param_isCopyCreate = param.isCopyCreate, isCopyCreate = _param_isCopyCreate === void 0 ? false : _param_isCopyCreate;
113
+ var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, editedProductSet = param.editedProductSet, productSetId = param.productSetId, productSets = param.productSets, _param_disabledRecurrent = param.disabledRecurrent, disabledRecurrent = _param_disabledRecurrent === void 0 ? false : _param_disabledRecurrent;
114
114
  var _errors_start, _errors_end;
115
115
  var t = useTranslation([
116
116
  'Design',
@@ -152,14 +152,7 @@ function IntervalInput(param) {
152
152
  }, [
153
153
  editedProductSet
154
154
  ]);
155
- useEffect(function() {
156
- if (!isCopyCreate) return;
157
- setRecurrent(false);
158
- setValue('rrule', null);
159
- // eslint-disable-next-line react-hooks/exhaustive-deps
160
- }, [
161
- isCopyCreate
162
- ]);
155
+ useEffect(function() {});
163
156
  useEffect(function() {
164
157
  if (!productSets) return;
165
158
  var isOverridenProductSet = productSets.find(function(productSet) {
@@ -37,8 +37,6 @@ export interface EditEventFormProps extends HasPermissionProp {
37
37
  eventProductSet?: ProductSet;
38
38
  overrideNameError?: string;
39
39
  disabledRecurrent?: boolean;
40
- isCopyCreate?: boolean;
41
- isBooked?: boolean;
42
40
  }
43
- export declare const EditEventForm: ({ disabled, categories, title, hasPermission, defaultEventValues, serverErrors, onSaveEvent, productSets, createProductSet, setEditProductSetId, isExternalPaymentLinkEnabled, timeZone, eventProductSet, overrideNameError, disabledRecurrent, isCopyCreate, isBooked, }: EditEventFormProps) => import("react/jsx-runtime").JSX.Element;
41
+ export declare const EditEventForm: ({ disabled, categories, title, hasPermission, defaultEventValues, serverErrors, onSaveEvent, productSets, createProductSet, setEditProductSetId, isExternalPaymentLinkEnabled, timeZone, eventProductSet, overrideNameError, disabledRecurrent, }: EditEventFormProps) => import("react/jsx-runtime").JSX.Element;
44
42
  //# sourceMappingURL=EditEventForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditEventForm.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EACN,MAAM,sDAAsD,CAAA;AAO7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAG3E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAS5D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAKlF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAClD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACtD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAOD,eAAO,MAAM,aAAa,8QAkBvB,kBAAkB,4CAiYpB,CAAA"}
1
+ {"version":3,"file":"EditEventForm.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EACN,MAAM,sDAAsD,CAAA;AAM7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAG3E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAS5D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAGlF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;CACxC;AAED,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,aAAa,EAAE,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACjD,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAClD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACtD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAOD,eAAO,MAAM,aAAa,sPAgBvB,kBAAkB,4CAkWpB,CAAA"}
@@ -3,7 +3,6 @@ import { useState, useCallback, useEffect } from 'react';
3
3
  import { IMAGE_TYPE_MAP, IMAGE_TYPE_IMAGE, IMAGE_TYPE_COVER } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
4
4
  import { useId } from '@react-aria/utils';
5
5
  import { Modal, Form, Accordion, Button } from 'react-bootstrap';
6
- import { isEqual } from 'lodash';
7
6
  import { useForm, FormProvider, Controller } from 'react-hook-form';
8
7
  import { DateTime } from 'luxon';
9
8
  import { useTranslation } from 'react-i18next';
@@ -11,9 +10,6 @@ import { useMultipleImages } from '@licklist/plugins/dist/hooks/Media/useMultipl
11
10
  import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService';
12
11
  import { scrollToError } from '@licklist/plugins/dist/utils/ScrollUtils';
13
12
  import { getFirstErrorKey } from '@licklist/plugins/dist/utils/FormValues';
14
- import { ConfirmModal } from '../../../../modals/confirmation/ConfirmModal.js';
15
- import { Dialog } from '../../../../modals/dialog/Dialog.js';
16
- import { useDialogContext } from '../../../../modals/dialog/DialogContext.js';
17
13
  import { SaleDeadline } from '../SaleDeadline/SaleDeadline.js';
18
14
  import { CategoriesInput } from '../../../../provider/categories-input/CategoriesInput.js';
19
15
  import { CategoriesInputDescription } from '../../../../provider/categories-input/CategoriesInputDescription.js';
@@ -36,8 +32,9 @@ import { TipTapEditor } from '../../../../tiptap-editor/TipTapEditor.js';
36
32
  import { FileUpload } from '../../../../file-upload/FileUpload.js';
37
33
  import { IntervalInput } from '../../IntervalInput.js';
38
34
  import { SelectEventProductSet } from '../SelectEventProductSet/SelectEventProductSet.js';
35
+ import { Dialog } from '../../../../modals/dialog/Dialog.js';
36
+ import { useDialogContext } from '../../../../modals/dialog/DialogContext.js';
39
37
  import { isUrlValid } from '../../utils/isUrlValid.js';
40
- import { toSimpleDateTime } from '../../utils/checkIfEventBooked.js';
41
38
 
42
39
  /* eslint-disable react-hooks/exhaustive-deps */ function _array_like_to_array(arr, len) {
43
40
  if (len == null || len > arr.length) len = arr.length;
@@ -142,7 +139,7 @@ var eventImageTypes = {
142
139
  uploadCover: IMAGE_TYPE_MAP[IMAGE_TYPE_COVER]
143
140
  };
144
141
  var EditEventForm = function(param) {
145
- var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, categories = param.categories, title = param.title, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, defaultEventValues = param.defaultEventValues, serverErrors = param.serverErrors, onSaveEvent = param.onSaveEvent, productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, isExternalPaymentLinkEnabled = param.isExternalPaymentLinkEnabled, timeZone = param.timeZone, eventProductSet = param.eventProductSet, overrideNameError = param.overrideNameError, _param_disabledRecurrent = param.disabledRecurrent, disabledRecurrent = _param_disabledRecurrent === void 0 ? false : _param_disabledRecurrent, _param_isCopyCreate = param.isCopyCreate, isCopyCreate = _param_isCopyCreate === void 0 ? false : _param_isCopyCreate, _param_isBooked = param.isBooked, isBooked = _param_isBooked === void 0 ? false : _param_isBooked;
142
+ var _param_disabled = param.disabled, disabled = _param_disabled === void 0 ? false : _param_disabled, categories = param.categories, title = param.title, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, defaultEventValues = param.defaultEventValues, serverErrors = param.serverErrors, onSaveEvent = param.onSaveEvent, productSets = param.productSets, createProductSet = param.createProductSet, setEditProductSetId = param.setEditProductSetId, isExternalPaymentLinkEnabled = param.isExternalPaymentLinkEnabled, timeZone = param.timeZone, eventProductSet = param.eventProductSet, overrideNameError = param.overrideNameError, _param_disabledRecurrent = param.disabledRecurrent, disabledRecurrent = _param_disabledRecurrent === void 0 ? false : _param_disabledRecurrent;
146
143
  var _defaultEventValues_rrule, _defaultEventValues_rrule1, _errors_name, _errors_externalPaymentLink, _errors_integrationUrl;
147
144
  var t = useTranslation([
148
145
  'Design',
@@ -165,7 +162,6 @@ var EditEventForm = function(param) {
165
162
  var productSetId = watch('productSetId');
166
163
  var rrule = watch('rrule');
167
164
  var _useMultipleImages = useMultipleImages(initialImages), images = _useMultipleImages.images, handleImageRemove = _useMultipleImages.handleImageRemove, handleImageUploading = _useMultipleImages.handleImageUploading, isImagesLoading = _useMultipleImages.isImagesLoading, isCoverImagesLoading = _useMultipleImages.isCoverImagesLoading;
168
- var watchedValues = watch();
169
165
  var onErrorSubmit = function(submitErrors) {
170
166
  scrollToError(getFirstErrorKey(submitErrors));
171
167
  };
@@ -222,9 +218,6 @@ var EditEventForm = function(param) {
222
218
  defaultExDate,
223
219
  rrule
224
220
  ]);
225
- var isChanged = !isEqual(watchedValues, sanitizeDefaultValues(defaultEventValues));
226
- var isChangedTime = (watchedValues === null || watchedValues === void 0 ? void 0 : watchedValues.start) !== toSimpleDateTime((defaultEventValues === null || defaultEventValues === void 0 ? void 0 : defaultEventValues.startAt) || '') || (watchedValues === null || watchedValues === void 0 ? void 0 : watchedValues.end) !== toSimpleDateTime((defaultEventValues === null || defaultEventValues === void 0 ? void 0 : defaultEventValues.endAt) || '');
227
- var isSinglEventWithBooked = !rrule && isBooked && isChangedTime;
228
221
  return /*#__PURE__*/ jsxs(Fragment, {
229
222
  children: [
230
223
  /*#__PURE__*/ jsx(Dialog, {
@@ -322,8 +315,7 @@ var EditEventForm = function(param) {
322
315
  productSetId: productSetId,
323
316
  productSets: productSets,
324
317
  disabledRecurrent: disabledRecurrent,
325
- editedProductSet: editedProductSet,
326
- isCopyCreate: isCopyCreate
318
+ editedProductSet: editedProductSet
327
319
  }, watch('name')),
328
320
  categories.length !== 0 && /*#__PURE__*/ jsx(Form.Group, {
329
321
  children: /*#__PURE__*/ jsx(Accordion, {
@@ -488,22 +480,8 @@ var EditEventForm = function(param) {
488
480
  eventProductSet: eventProductSet,
489
481
  overrideNameError: overrideNameError
490
482
  }),
491
- isSinglEventWithBooked && /*#__PURE__*/ jsx(ConfirmModal, {
492
- content: t('App:confirmChangeEventDate'),
493
- children: function(confirm) {
494
- return /*#__PURE__*/ jsx(Button, {
495
- disabled: disabled || formState.isSubmitting || !isChanged || isImagesLoading || isCoverImagesLoading,
496
- className: "save-event",
497
- type: "button",
498
- onClick: function() {
499
- return confirm(handleSubmit(onSaveEvent, onErrorSubmit));
500
- },
501
- children: formState.isSubmitting ? "".concat(t('saveAndAdd'), "...") : t('saveAndAdd')
502
- });
503
- }
504
- }),
505
- hasPermission && !showEditProductSet && !isSinglEventWithBooked && /*#__PURE__*/ jsx(Button, {
506
- disabled: disabled || formState.isSubmitting || !isChanged || isImagesLoading || isCoverImagesLoading,
483
+ hasPermission && !showEditProductSet && /*#__PURE__*/ jsx(Button, {
484
+ disabled: disabled || formState.isSubmitting || isImagesLoading || isCoverImagesLoading,
507
485
  className: "save-event",
508
486
  type: "submit",
509
487
  children: formState.isSubmitting ? "".concat(t('saveAndAdd'), "...") : t('saveAndAdd')
@@ -528,7 +506,7 @@ var sanitizeDefaultValues = function(values) {
528
506
  suppressSeconds: true
529
507
  });
530
508
  };
531
- var _values_name, _values_description, _values_startAt, _values_endAt, _values_rrule, _values_categories, _values_termsAndConditions, _values_visible, _values_externalPaymentLink, _values_images, _values_integrationUrl, _values_recurrenceEndAt;
509
+ var _values_name, _values_description, _values_startAt, _values_endAt, _values_rrule, _values_categories, _values_termsAndConditions, _values_visible, _values_externalPaymentLink, _values_integrationUrl, _values_recurrenceEndAt;
532
510
  return {
533
511
  name: (_values_name = values === null || values === void 0 ? void 0 : values.name) !== null && _values_name !== void 0 ? _values_name : '',
534
512
  description: (_values_description = values === null || values === void 0 ? void 0 : values.description) !== null && _values_description !== void 0 ? _values_description : '',
@@ -540,7 +518,7 @@ var sanitizeDefaultValues = function(values) {
540
518
  visible: (_values_visible = values === null || values === void 0 ? void 0 : values.visible) !== null && _values_visible !== void 0 ? _values_visible : '',
541
519
  externalPaymentLink: (_values_externalPaymentLink = values === null || values === void 0 ? void 0 : values.externalPaymentLink) !== null && _values_externalPaymentLink !== void 0 ? _values_externalPaymentLink : '',
542
520
  productSetId: values === null || values === void 0 ? void 0 : values.productSetId,
543
- images: (_values_images = values === null || values === void 0 ? void 0 : values.images) !== null && _values_images !== void 0 ? _values_images : [],
521
+ images: values === null || values === void 0 ? void 0 : values.images,
544
522
  saleDeadline: values === null || values === void 0 ? void 0 : values.saleDeadline,
545
523
  integrationUrl: (_values_integrationUrl = values === null || values === void 0 ? void 0 : values.integrationUrl) !== null && _values_integrationUrl !== void 0 ? _values_integrationUrl : '',
546
524
  recurrenceEndAt: (_values_recurrenceEndAt = values === null || values === void 0 ? void 0 : values.recurrenceEndAt) !== null && _values_recurrenceEndAt !== void 0 ? _values_recurrenceEndAt : undefined
@@ -1,4 +1,3 @@
1
- import { EventWithMetadata } from '@licklist/plugins';
2
1
  export declare const MODE_THIS_EVENT = "thisEvent";
3
2
  export declare const MODE_THIS_AND_FOLLOWING_EVENTS = "thisAndFollowingEvents";
4
3
  export declare const MODE_ALL_EVENTS = "allEvents";
@@ -9,9 +8,6 @@ export declare const RECURRENT_MODE_TYPES_LIST: {
9
8
  thisAndFollowingEvents: number;
10
9
  allEvents: number;
11
10
  };
12
- export declare const RECURRENT_MODE_TYPES_WITHOUT_ALL: {
13
- thisEvent: number;
14
- };
15
11
  export type RecurrentEventMode = (typeof MODES)[number];
16
12
  export type EditRecurrentEventModalValues = {
17
13
  mode: RecurrentEventMode;
@@ -22,12 +18,7 @@ export type EditRecurrentEventModalProps = {
22
18
  onHide: () => void;
23
19
  title: string;
24
20
  onSubmit: (values: EditRecurrentEventModalValues) => void;
25
- isDateWasChanged?: boolean;
26
- isChangeDateOrTime?: boolean;
27
- event?: EventWithMetadata;
28
- date?: string;
29
- isRemoveModal?: boolean;
30
21
  };
31
- export declare const EditRecurrentEventModal: ({ disabled, isOpen, onHide, title, onSubmit, isDateWasChanged, isChangeDateOrTime, event, date, isRemoveModal, }: EditRecurrentEventModalProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const EditRecurrentEventModal: ({ disabled, isOpen, onHide, title, onSubmit, }: EditRecurrentEventModalProps) => import("react/jsx-runtime").JSX.Element;
32
23
  export {};
33
24
  //# sourceMappingURL=EditRecurrentEventModal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditRecurrentEventModal.d.ts","sourceRoot":"","sources":["../../../src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAGrD,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,eAAO,MAAM,gCAAgC;;CAE5C,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;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAED,eAAO,MAAM,uBAAuB,qHAWjC,4BAA4B,4CAoG9B,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"}
@@ -3,7 +3,6 @@ import { Modal, Form, Button } from 'react-bootstrap';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { useForm, Controller } from 'react-hook-form';
5
5
  import { FaTimes } from 'react-icons/fa';
6
- import { checkIfEventIsBooked } from '../edit-event-modal/utils/checkIfEventBooked.js';
7
6
 
8
7
  function _define_property(obj, key, value) {
9
8
  if (key in obj) {
@@ -24,19 +23,14 @@ var MODE_ALL_EVENTS = 'allEvents';
24
23
  var DEFAULT_RECURRENT_MODE_TYPE = MODE_THIS_EVENT;
25
24
  var _obj;
26
25
  var RECURRENT_MODE_TYPES_LIST = (_obj = {}, _define_property(_obj, MODE_THIS_EVENT, 1), _define_property(_obj, MODE_THIS_AND_FOLLOWING_EVENTS, 2), _define_property(_obj, MODE_ALL_EVENTS, 3), _obj);
27
- var RECURRENT_MODE_TYPES_WITHOUT_ALL = _define_property({}, MODE_THIS_EVENT, 1);
28
26
  var EditRecurrentEventModal = function(param) {
29
- var disabled = param.disabled, isOpen = param.isOpen, onHide = param.onHide, title = param.title, onSubmit = param.onSubmit, _param_isDateWasChanged = param.isDateWasChanged, isDateWasChanged = _param_isDateWasChanged === void 0 ? false : _param_isDateWasChanged, _param_isChangeDateOrTime = param.isChangeDateOrTime, isChangeDateOrTime = _param_isChangeDateOrTime === void 0 ? false : _param_isChangeDateOrTime, event = param.event, date = param.date, _param_isRemoveModal = param.isRemoveModal, isRemoveModal = _param_isRemoveModal === void 0 ? false : _param_isRemoveModal;
27
+ var disabled = param.disabled, isOpen = param.isOpen, onHide = param.onHide, title = param.title, onSubmit = param.onSubmit;
30
28
  var t = useTranslation('Design').t;
31
29
  var _useForm = useForm({
32
30
  defaultValues: {
33
31
  mode: DEFAULT_RECURRENT_MODE_TYPE
34
32
  }
35
- }), control = _useForm.control, watch = _useForm.watch, handleSubmit = _useForm.handleSubmit;
36
- var activityMode = watch('mode');
37
- var isBooked = checkIfEventIsBooked(event, date, activityMode);
38
- var recurrentListMode = isDateWasChanged ? RECURRENT_MODE_TYPES_WITHOUT_ALL : RECURRENT_MODE_TYPES_LIST;
39
- var confirmDescription = isChangeDateOrTime && isBooked || isBooked && isRemoveModal;
33
+ }), control = _useForm.control, handleSubmit = _useForm.handleSubmit;
40
34
  return /*#__PURE__*/ jsx(Modal, {
41
35
  show: isOpen,
42
36
  onHide: onHide,
@@ -65,11 +59,6 @@ var EditRecurrentEventModal = function(param) {
65
59
  })
66
60
  ]
67
61
  }),
68
- confirmDescription && /*#__PURE__*/ jsx(Modal.Dialog, {
69
- className: "pl-4",
70
- contentClassName: "border-0",
71
- children: t(isRemoveModal ? 'App:confirmRemoveEventWithBooking' : 'App:confirmChangeEventDate')
72
- }),
73
62
  /*#__PURE__*/ jsx(Modal.Body, {
74
63
  className: "p-0 ml-4",
75
64
  children: /*#__PURE__*/ jsx(Form.Group, {
@@ -78,7 +67,7 @@ var EditRecurrentEventModal = function(param) {
78
67
  render: function(param) {
79
68
  var _param_field = param.field, value = _param_field.value, onChange = _param_field.onChange;
80
69
  return /*#__PURE__*/ jsx(Fragment, {
81
- children: Object.keys(recurrentListMode).map(function(option) {
70
+ children: Object.keys(RECURRENT_MODE_TYPES_LIST).map(function(option) {
82
71
  return /*#__PURE__*/ jsxs(Form.Check, {
83
72
  type: "radio",
84
73
  id: option,
@@ -115,14 +104,14 @@ var EditRecurrentEventModal = function(param) {
115
104
  onClick: onHide,
116
105
  className: "text-decoration-none",
117
106
  disabled: disabled,
118
- children: t(confirmDescription ? 'App:cancelChangeDate' : 'cancel')
107
+ children: t('cancel')
119
108
  }),
120
109
  /*#__PURE__*/ jsx(Button, {
121
110
  variant: "success",
122
111
  type: "submit",
123
112
  className: "text-decoration-none",
124
113
  disabled: disabled,
125
- children: t(confirmDescription ? 'App:saveChangeDate' : 'OK')
114
+ children: t('ok').toUpperCase()
126
115
  })
127
116
  ]
128
117
  })
@@ -131,4 +120,4 @@ var EditRecurrentEventModal = function(param) {
131
120
  });
132
121
  };
133
122
 
134
- export { DEFAULT_RECURRENT_MODE_TYPE, EditRecurrentEventModal, MODE_ALL_EVENTS, MODE_THIS_AND_FOLLOWING_EVENTS, MODE_THIS_EVENT, RECURRENT_MODE_TYPES_LIST, RECURRENT_MODE_TYPES_WITHOUT_ALL };
123
+ export { DEFAULT_RECURRENT_MODE_TYPE, EditRecurrentEventModal, MODE_ALL_EVENTS, MODE_THIS_AND_FOLLOWING_EVENTS, MODE_THIS_EVENT, RECURRENT_MODE_TYPES_LIST };
@@ -16,7 +16,6 @@ export interface EventCardProps extends HasPermissionProp {
16
16
  titleId?: string;
17
17
  descriptionId?: string;
18
18
  productSetName?: string;
19
- eventID?: string;
20
19
  }
21
- export declare function EventCard({ name, description, date, imageUrl, sales, onPreview, onEdit, onCopy, onRemove, hasPermission, productSetName, onStatistic, eventStatistic, titleId, descriptionId, eventID, }: EventCardProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function EventCard({ name, description, date, imageUrl, sales, onPreview, onEdit, onCopy, onRemove, hasPermission, productSetName, onStatistic, eventStatistic, titleId, descriptionId, }: EventCardProps): import("react/jsx-runtime").JSX.Element;
22
21
  //# sourceMappingURL=EventCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventCard.d.ts","sourceRoot":"","sources":["../../../src/events/event-card/EventCard.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AAQjG,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAS3C,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACtC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,aAAoB,EACpB,cAAc,EACd,WAAW,EACX,cAAc,EACd,OAAO,EACP,aAAa,EACb,OAAO,GACR,EAAE,cAAc,2CA0JhB"}
1
+ {"version":3,"file":"EventCard.d.ts","sourceRoot":"","sources":["../../../src/events/event-card/EventCard.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AAQjG,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAS3C,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACtC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,aAAoB,EACpB,cAAc,EACd,WAAW,EACX,cAAc,EACd,OAAO,EACP,aAAa,GACd,EAAE,cAAc,2CAiJhB"}
@@ -38,7 +38,7 @@ function _object_without_properties_loose(source, excluded) {
38
38
  return target;
39
39
  }
40
40
  function EventCard(param) {
41
- var name = param.name, description = param.description, date = param.date, imageUrl = param.imageUrl, sales = param.sales, onPreview = param.onPreview, onEdit = param.onEdit, onCopy = param.onCopy, onRemove = param.onRemove, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, productSetName = param.productSetName, onStatistic = param.onStatistic, eventStatistic = param.eventStatistic, titleId = param.titleId, descriptionId = param.descriptionId, eventID = param.eventID;
41
+ var name = param.name, description = param.description, date = param.date, imageUrl = param.imageUrl, sales = param.sales, onPreview = param.onPreview, onEdit = param.onEdit, onCopy = param.onCopy, onRemove = param.onRemove, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, productSetName = param.productSetName, onStatistic = param.onStatistic, eventStatistic = param.eventStatistic, titleId = param.titleId, descriptionId = param.descriptionId;
42
42
  var t = useTranslation('Design').t;
43
43
  var _useIntl = useIntl(), formatNumber = _useIntl.formatNumber, formatDate = _useIntl.formatDate;
44
44
  var _getStatisticInfo = getStatisticInfo(eventStatistic, date), totalViews = _getStatisticInfo.totalViews, statistics = _object_without_properties(_getStatisticInfo, [
@@ -79,16 +79,7 @@ function EventCard(param) {
79
79
  children: [
80
80
  /*#__PURE__*/ jsx(Card.Title, {
81
81
  id: titleId,
82
- children: eventID ? /*#__PURE__*/ jsxs("div", {
83
- className: "d-flex",
84
- children: [
85
- name,
86
- /*#__PURE__*/ jsx("p", {
87
- className: "text-secondary ml-2",
88
- children: "(ID:".concat(eventID, ")")
89
- })
90
- ]
91
- }) : name
82
+ children: name
92
83
  }),
93
84
  /*#__PURE__*/ jsxs("div", {
94
85
  className: "flex-grow-1",
@@ -1,6 +1,6 @@
1
1
  import { BookingSummaryProps } from './types';
2
2
  export declare const BookingSummary: {
3
- ({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, headerTitle, transactionFee, productsWithErrors, isLoading, hasPeopleInput, peopleAmount, footer, headerComponent, isPaymentPage, }: Omit<BookingSummaryProps, "totallWithDiscount">): import("react/jsx-runtime").JSX.Element;
3
+ ({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, transactionFee, productsWithErrors, isLoading, hasPeopleInput, peopleAmount, footer, headerComponent, isPaymentPage, }: Omit<BookingSummaryProps, "totallWithDiscount">): import("react/jsx-runtime").JSX.Element;
4
4
  SummaryTotal: ({ formValues, totalWithDiscount, transactionFee, isFreePayment, }: Pick<BookingSummaryProps, "formValues" | "totalWithDiscount" | "transactionFee" | "isFreePayment">) => import("react/jsx-runtime").JSX.Element;
5
5
  Accordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, isPaymentPage, headerComponent, }: import("./components/BookingSummaryAccordion").BookingSummaryAccordionProps) => import("react/jsx-runtime").JSX.Element;
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAM7C,eAAO,MAAM,cAAc;kNAiBxB,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;;;CAiFjD,CAAA"}
1
+ {"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAM7C,eAAO,MAAM,cAAc;qMAgBxB,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;;;CAgFjD,CAAA"}
@@ -12,7 +12,7 @@ import { ReactComponent as SvgCalendar } from '../../../../assets/iframe/calenda
12
12
  import { LoaderIndicator } from '../../../../static/loader/LoaderIndicator.js';
13
13
 
14
14
  var BookingSummary = function(param) {
15
- var date = param.date, time = param.time, menuSteps = param.menuSteps, _param_formValues = param.formValues, formValues = _param_formValues === void 0 ? {} : _param_formValues, shouldHidePeopleAmount = param.shouldHidePeopleAmount, eventName = param.eventName, headerTitle = param.headerTitle, _param_transactionFee = param.transactionFee, transactionFee = _param_transactionFee === void 0 ? 0 : _param_transactionFee, _param_productsWithErrors = param.productsWithErrors, productsWithErrors = _param_productsWithErrors === void 0 ? [] : _param_productsWithErrors, isLoading = param.isLoading, hasPeopleInput = param.hasPeopleInput, peopleAmount = param.peopleAmount, footer = param.footer, headerComponent = param.headerComponent, // TODO Remove this, when all iframe pages will be ready
15
+ var date = param.date, time = param.time, menuSteps = param.menuSteps, _param_formValues = param.formValues, formValues = _param_formValues === void 0 ? {} : _param_formValues, shouldHidePeopleAmount = param.shouldHidePeopleAmount, eventName = param.eventName, _param_transactionFee = param.transactionFee, transactionFee = _param_transactionFee === void 0 ? 0 : _param_transactionFee, _param_productsWithErrors = param.productsWithErrors, productsWithErrors = _param_productsWithErrors === void 0 ? [] : _param_productsWithErrors, isLoading = param.isLoading, hasPeopleInput = param.hasPeopleInput, peopleAmount = param.peopleAmount, footer = param.footer, headerComponent = param.headerComponent, // TODO Remove this, when all iframe pages will be ready
16
16
  isPaymentPage = param.isPaymentPage;
17
17
  var _values;
18
18
  var t = useTranslation('Design').t;
@@ -30,7 +30,6 @@ var BookingSummary = function(param) {
30
30
  children: /*#__PURE__*/ jsxs(BookingSummaryAccordion, {
31
31
  isPaymentPage: isPaymentPage,
32
32
  hasPeopleInput: hasPeopleInput,
33
- title: headerTitle,
34
33
  headerComponent: headerComponent,
35
34
  children: [
36
35
  /*#__PURE__*/ jsx("div", {
@@ -9,7 +9,7 @@ var ProductSummary = function(param) {
9
9
  var t = useTranslation('Design').t;
10
10
  var formatNumber = useIntl().formatNumber;
11
11
  var priceForOneProduct = orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.price;
12
- var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers) || [];
12
+ var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers);
13
13
  var fullPrice = formatNumber(priceForOneProduct * (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.quantity), {
14
14
  style: 'currency',
15
15
  currency: Config.Currency.GBP
@@ -38,7 +38,7 @@ var ProductSummary = function(param) {
38
38
  })
39
39
  ]
40
40
  }),
41
- !!(modifiersSets === null || modifiersSets === void 0 ? void 0 : modifiersSets.length) && /*#__PURE__*/ jsx(Fragment, {
41
+ !!modifiersSets.length && /*#__PURE__*/ jsx(Fragment, {
42
42
  children: modifiersSets.map(function(modifier, index) {
43
43
  return /*#__PURE__*/ jsx(ProductWithModifier, {
44
44
  modifier: modifier,
@@ -22,6 +22,5 @@ export type BookingSummaryProps = {
22
22
  isPaymentPage?: boolean;
23
23
  headerComponent?: ReactElement;
24
24
  footer?: ReactElement;
25
- headerTitle?: string;
26
25
  };
27
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,eAAO,MAAM,YAAY,MAAM,CAAA;AAC/B,eAAO,MAAM,aAAa,oBAAoB,CAAA;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,YAAY,CAAA;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAA;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,eAAO,MAAM,YAAY,MAAM,CAAA;AAC/B,eAAO,MAAM,aAAa,oBAAoB,CAAA;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAA;IAC/C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,YAAY,CAAA;IAC9B,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAA;AAI9F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,4CA+Md,CAAA"}
1
+ {"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAA;AAI9F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAA;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACjC,SAAS,EAAE,OAAO,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,4CAiNd,CAAA"}
@@ -189,8 +189,6 @@ var PaymentPage = function(_param) {
189
189
  var isCalculatedAmountGreaterThanOrderAmount = !hasRemaingToPay && orderCartAmountByFormValues > (data === null || data === void 0 ? void 0 : data.amount);
190
190
  var isPaymentLinkWithRemainingToPay = (data === null || data === void 0 ? void 0 : data.remaining_to_pay) && !!Number(data === null || data === void 0 ? void 0 : data.remaining_to_pay);
191
191
  var totalPaidWithRemainingToPay = (data === null || data === void 0 ? void 0 : data.amount_to_pay) && !!Number(data === null || data === void 0 ? void 0 : data.amount_to_pay);
192
- var _bookingSummaryProps_transactionFee;
193
- var totalBooked = paymentMetadata ? paymentMetadata.paid ? paymentMetadata.total - paymentMetadata.paid : paymentMetadata.total : orderTotalAmountByFormValues + ((_bookingSummaryProps_transactionFee = bookingSummaryProps === null || bookingSummaryProps === void 0 ? void 0 : bookingSummaryProps.transactionFee) !== null && _bookingSummaryProps_transactionFee !== void 0 ? _bookingSummaryProps_transactionFee : 0);
194
192
  return /*#__PURE__*/ jsx(Page, {
195
193
  className: "payment_link",
196
194
  children: /*#__PURE__*/ jsx(PageBody, {
@@ -207,9 +205,8 @@ var PaymentPage = function(_param) {
207
205
  rightBlock: /*#__PURE__*/ jsx(PageBody.RightBlock, {
208
206
  children: /*#__PURE__*/ jsx(BookingSummary, _object_spread_props(_object_spread({}, bookingSummaryProps), {
209
207
  isPaymentPage: true,
210
- headerTitle: t('remainingBalance'),
211
208
  headerComponent: /*#__PURE__*/ jsx(SummaryTotalBlock, {
212
- amount: totalBooked
209
+ amount: paymentMetadata ? paymentMetadata.total : orderTotalAmountByFormValues + ((bookingSummaryProps === null || bookingSummaryProps === void 0 ? void 0 : bookingSummaryProps.transactionFee) || 0)
213
210
  }),
214
211
  footer: /*#__PURE__*/ jsx("div", {
215
212
  className: "d-flex flex-column justify-content-between",
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ export { ErrorFallback } from './error/ErrorFallback.js';
23
23
  export { ProductSetShortForm } from './events/edit-event-modal/component/ProductSetShortForm/ProductSetShortForm.js';
24
24
  export { SelectEventProductSet } from './events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js';
25
25
  export { EditEventForm } from './events/edit-event-modal/component/EditEventForm/EditEventForm.js';
26
- export { DEFAULT_RECURRENT_MODE_TYPE, EditRecurrentEventModal, MODE_ALL_EVENTS, MODE_THIS_AND_FOLLOWING_EVENTS, MODE_THIS_EVENT, RECURRENT_MODE_TYPES_LIST, RECURRENT_MODE_TYPES_WITHOUT_ALL } from './events/edit-recurrent-event-modal/EditRecurrentEventModal.js';
26
+ export { DEFAULT_RECURRENT_MODE_TYPE, EditRecurrentEventModal, MODE_ALL_EVENTS, MODE_THIS_AND_FOLLOWING_EVENTS, MODE_THIS_EVENT, RECURRENT_MODE_TYPES_LIST } from './events/edit-recurrent-event-modal/EditRecurrentEventModal.js';
27
27
  export { EventCard } from './events/event-card/EventCard.js';
28
28
  export { EventCardSkeleton } from './events/event-card/EventCardSkeleton.js';
29
29
  export { EventStatisticModal } from './events/event-statistic-modal/EventStatisticModal.js';
@@ -184,7 +184,8 @@ function ProductSetControl(param) {
184
184
  })
185
185
  }),
186
186
  /*#__PURE__*/ jsx(SaleDeadline, {
187
- disabled: false
187
+ disabled: false,
188
+ onlyBefore: true
188
189
  }),
189
190
  /*#__PURE__*/ jsx("div", {
190
191
  className: "divider"
@@ -234,7 +234,7 @@ function ProductsControl(param) {
234
234
  id: String(product._id),
235
235
  isExpanded: isFirstProductAdded,
236
236
  isInvalid: !!categoryProductErrors,
237
- title: "".concat(value, " (ID:").concat(product.id, ")"),
237
+ title: value,
238
238
  isOverride: isOverrides,
239
239
  badge: /*#__PURE__*/ jsx(Badge, {
240
240
  className: "product-badge",
@@ -1 +1 @@
1
- {"version":3,"file":"RecurrenceInput.d.ts","sourceRoot":"","sources":["../../src/recurrence-input/RecurrenceInput.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAWjD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,gBAAmC,GACpC,EAAE,oBAAoB,2CAyEtB"}
1
+ {"version":3,"file":"RecurrenceInput.d.ts","sourceRoot":"","sources":["../../src/recurrence-input/RecurrenceInput.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAWjD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,gBAAmC,GACpC,EAAE,oBAAoB,2CAmEtB"}
@@ -117,13 +117,9 @@ function RecurrenceInput(param) {
117
117
  })), 2), state = _useReducer[0], updateState = _useReducer[1];
118
118
  useEffect(// TODO: unhardcode timezone
119
119
  function() {
120
- return onChange(RRule.optionsToString(_object_spread({
121
- freq: state.freq,
122
- count: state.count,
123
- interval: state.interval,
124
- byweekday: state.byweekday,
120
+ return onChange(RRule.optionsToString(_object_spread_props(_object_spread({}, state), {
125
121
  tzid: 'Europe/London'
126
- }, state)).replace('RRULE:', ''));
122
+ })).replace('RRULE:', ''));
127
123
  }, [
128
124
  state
129
125
  ]);
@@ -135,8 +131,8 @@ function RecurrenceInput(param) {
135
131
  onChange: function(param) {
136
132
  var interval = param.interval, frequency = param.frequency;
137
133
  updateState({
138
- freq: frequency,
139
134
  interval: interval,
135
+ freq: frequency,
140
136
  byweekday: frequency === state.freq ? state.byweekday : frequency === RRule.WEEKLY ? [
141
137
  getWeekdayForFrequency({
142
138
  date: date,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.72.0-stage.11",
3
+ "version": "0.72.0-stage.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -42,7 +42,7 @@
42
42
  ]
43
43
  },
44
44
  "peerDependencies": {
45
- "@licklist/core": "0.32.8-stage.9",
45
+ "@licklist/core": "0.32.8-stage.4",
46
46
  "@licklist/eslint-config": "0.5.6",
47
47
  "@licklist/plugins": "0.35.6-stage.2",
48
48
  "lodash": "4.17.21",
@@ -61,7 +61,7 @@
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.32.8-stage.9",
64
+ "@licklist/core": "0.32.8-stage.4",
65
65
  "@licklist/eslint-config": "0.5.6",
66
66
  "@licklist/plugins": "0.35.6-stage.2",
67
67
  "@mantine/core": "6.0.22",
@@ -43,7 +43,7 @@ export const DateTimeButton = ({
43
43
 
44
44
  const isTimeVariant = variant === Variant.time
45
45
 
46
- const isPast = isPastDate(date)
46
+ const isPast = variant === Variant.time ? isPastTime(date) : isPastDate(date)
47
47
 
48
48
  const isDisabled = _isDisabled || isSoldOut || isPast
49
49
  const isUnavailable = _isDisabled || isPast
@@ -82,5 +82,7 @@ export const DateTimeButton = ({
82
82
  )
83
83
  }
84
84
 
85
+ const isPastTime = (date: DateTime): boolean => DateTime.now() > date
86
+
85
87
  const isPastDate = (date: DateTime): boolean =>
86
88
  DateTime.now() > date.set({ hour: 23, minute: 59, second: 59 })
@@ -18,7 +18,6 @@ interface IntervalInputProps {
18
18
  productSetId?: number
19
19
  disabled?: boolean
20
20
  disabledRecurrent?: boolean
21
- isCopyCreate?: boolean
22
21
  }
23
22
 
24
23
  export interface IntervalInputValues {
@@ -33,7 +32,6 @@ export function IntervalInput({
33
32
  productSetId,
34
33
  productSets,
35
34
  disabledRecurrent = false,
36
- isCopyCreate = false
37
35
  }: IntervalInputProps) {
38
36
  const { t } = useTranslation(['Design', 'Validation'])
39
37
  const {
@@ -76,11 +74,8 @@ export function IntervalInput({
76
74
  }, [editedProductSet])
77
75
 
78
76
  useEffect(() => {
79
- if (!isCopyCreate) return
80
- setRecurrent(false)
81
- setValue('rrule', null)
82
- // eslint-disable-next-line react-hooks/exhaustive-deps
83
- }, [isCopyCreate])
77
+
78
+ })
84
79
 
85
80
  useEffect(() => {
86
81
  if (!productSets) return