@licklist/design 0.59.0-dev.9 → 0.59.0

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 (201) hide show
  1. package/bitbucket-pipelines.yml +8 -0
  2. package/dist/calendar/Calendar.d.ts +1 -1
  3. package/dist/calendar/Calendar.d.ts.map +1 -1
  4. package/dist/calendar/Calendar.js +1 -1
  5. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
  6. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  7. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  8. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -3
  9. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
  10. package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  11. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +1 -3
  12. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
  13. package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +1 -1
  14. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +1 -3
  15. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
  16. package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
  17. package/dist/iframe/activity-card/ActivityCard.d.ts +1 -2
  18. package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
  19. package/dist/iframe/activity-card/ActivityCard.js +1 -1
  20. package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
  21. package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
  22. package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
  23. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
  24. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  25. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  26. package/dist/iframe/page/components/PageBody/constants.d.ts +1 -1
  27. package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
  28. package/dist/iframe/page/components/PageBody/constants.js +1 -1
  29. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
  30. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
  31. package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
  32. package/dist/iframe/ryft/RyftPaymentForm.d.ts +1 -3
  33. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  34. package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
  35. package/dist/iframe/ryft/utils/ryft-form.d.ts +1 -2
  36. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
  37. package/dist/iframe/ryft/utils/ryft-form.js +1 -1
  38. package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -1
  39. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  40. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  41. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  42. package/dist/product-set/control/DateInput.js +1 -1
  43. package/dist/product-set/control/ProductSetControl.d.ts +1 -1
  44. package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
  45. package/dist/product-set/form/ProductSetForm.d.ts +1 -4
  46. package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
  47. package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
  48. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  49. package/dist/product-set/product/ProductControl.js +1 -1
  50. package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
  51. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  52. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  53. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  54. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  55. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  56. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -1
  57. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -3
  58. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  59. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  60. package/dist/recurring-date-picker-input/utils.d.ts +0 -12
  61. package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
  62. package/dist/recurring-date-picker-input/utils.js +1 -1
  63. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  64. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  65. package/dist/sales/coupon/control/CouponFormControl.d.ts +1 -2
  66. package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
  67. package/dist/sales/coupon/control/CouponFormControl.js +1 -1
  68. package/dist/sales/coupon/form/CouponFrom.d.ts +2 -2
  69. package/dist/sales/coupon/form/CouponFrom.d.ts.map +1 -1
  70. package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
  71. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  72. package/dist/setting/dashboard/DashboardSettingForm.d.ts +0 -1
  73. package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
  74. package/dist/setting/dashboard/DashboardSettingForm.js +1 -1
  75. package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
  76. package/dist/static/manual-date-picker/constants/index.d.ts +1 -4
  77. package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
  78. package/dist/static/manual-date-picker/constants/index.js +1 -1
  79. package/dist/static/manual-date-picker/utils/index.d.ts +0 -4
  80. package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
  81. package/dist/static/manual-date-picker/utils/index.js +1 -1
  82. package/dist/styles/activity-card/ListActivitiesCard.scss +1 -1
  83. package/dist/styles/iframe-events/Card.scss +8 -24
  84. package/dist/styles/iframe-events/PoweredBy.scss +2 -2
  85. package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -5
  86. package/dist/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
  87. package/dist/styles/iframe-page/Page.scss +0 -1
  88. package/dist/styles/iframe-page/PageBody.scss +9 -32
  89. package/dist/styles/iframe-page/PageHeader.scss +39 -41
  90. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
  91. package/dist/styles/sales/BookingResults.scss +1 -1
  92. package/dist/typeahead/Typeahead.d.ts +1 -2
  93. package/dist/typeahead/Typeahead.d.ts.map +1 -1
  94. package/dist/typeahead/Typeahead.js +1 -1
  95. package/dist/zone/form/ZoneForm.d.ts +2 -2
  96. package/dist/zone/form/ZoneForm.d.ts.map +1 -1
  97. package/dist/zone/form/ZoneForm.js +1 -1
  98. package/dist/zone/form/components/ZoneControl.d.ts +2 -2
  99. package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
  100. package/dist/zone/form/components/ZoneControl.js +1 -1
  101. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -4
  102. package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
  103. package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
  104. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  105. package/jest.config.js +29 -0
  106. package/package.json +35 -10
  107. package/src/calendar/Calendar.stories.tsx +0 -23
  108. package/src/calendar/Calendar.tsx +5 -5
  109. package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
  110. package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -4
  111. package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +8 -10
  112. package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +0 -4
  113. package/src/iframe/activity-card/ActivityCard.tsx +2 -4
  114. package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
  115. package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
  116. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
  117. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
  118. package/src/iframe/page/components/PageBody/constants.ts +1 -1
  119. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +3 -3
  120. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
  121. package/src/iframe/payment/payment-page/PaymentPage.tsx +2 -2
  122. package/src/iframe/ryft/RyftPaymentForm.tsx +3 -20
  123. package/src/iframe/ryft/utils/ryft-form.ts +5 -11
  124. package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -3
  125. package/src/product-set/control/DateInput.tsx +5 -4
  126. package/src/product-set/control/ProductSetControl.tsx +1 -1
  127. package/src/product-set/form/ProductCategoriesControl.tsx +1 -1
  128. package/src/product-set/form/ProductSetForm.tsx +1 -5
  129. package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -2
  130. package/src/product-set/product/ProductControl.tsx +38 -38
  131. package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -0
  132. package/src/product-set/product-category/ProductCategoryControl.tsx +27 -89
  133. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
  134. package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +1 -0
  135. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -11
  136. package/src/recurring-date-picker-input/utils.ts +0 -77
  137. package/src/sales/booking/results/BookingResults.stories.tsx +2 -3
  138. package/src/sales/booking/results/components/ResultCard.tsx +5 -2
  139. package/src/sales/coupon/control/CouponFormControl.tsx +50 -29
  140. package/src/sales/coupon/form/CouponFrom.tsx +15 -5
  141. package/src/setting/admin/AdminSettingForm.tsx +2 -2
  142. package/src/setting/dashboard/DashboardSettingForm.tsx +0 -13
  143. package/src/sortable-tree/SortableTreeItem.tsx +1 -1
  144. package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
  145. package/src/static/manual-date-picker/constants/index.ts +2 -6
  146. package/src/static/manual-date-picker/utils/index.ts +0 -11
  147. package/src/static/switch/BooleanSwitch.tsx +1 -1
  148. package/src/styles/activity-card/ListActivitiesCard.scss +1 -1
  149. package/src/styles/iframe-events/Card.scss +8 -24
  150. package/src/styles/iframe-events/PoweredBy.scss +2 -2
  151. package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -5
  152. package/src/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
  153. package/src/styles/iframe-page/Page.scss +0 -1
  154. package/src/styles/iframe-page/PageBody.scss +9 -32
  155. package/src/styles/iframe-page/PageHeader.scss +39 -41
  156. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
  157. package/src/styles/sales/BookingResults.scss +1 -1
  158. package/src/typeahead/Typeahead.tsx +3 -16
  159. package/src/zone/form/ZoneForm.tsx +2 -3
  160. package/src/zone/form/components/ZoneControl.tsx +3 -3
  161. package/src/zone/form/components/ZoneRecurrencesControl.tsx +5 -7
  162. package/src/zone/form/utils/dates.ts +10 -9
  163. package/tests/Auth/Authorizer.test.tsx +194 -0
  164. package/tests/Auth/Layout/UserNavDropDown.test.tsx +43 -0
  165. package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +33 -0
  166. package/tests/Auth/Login/LoginComponent.test.tsx +246 -0
  167. package/tests/Auth/Login/LoginFormComponent.test.tsx +182 -0
  168. package/tests/Auth/Register/RegisterComponent.test.tsx +285 -0
  169. package/tests/Auth/Register/RegisterFormComponent.test.tsx +170 -0
  170. package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +130 -0
  171. package/tests/Auth/Social/SocialCallbackComponent.test.tsx +133 -0
  172. package/tests/Auth/Social/SocialFormComponent.test.tsx +118 -0
  173. package/tests/FileUpload/FileUpload.test.tsx +42 -0
  174. package/tests/Notification/EmailTemplate.test.tsx +82 -0
  175. package/tests/ProductSet/ProductSetPopover.test.tsx +40 -0
  176. package/tests/Report/Report.test.tsx +48 -0
  177. package/tests/Sales/Coupon.test.tsx +51 -0
  178. package/tests/Sales/SalesAndVIews.test.tsx +63 -0
  179. package/tests/SnippetTemplates/SnippetTemplates.test.tsx +56 -0
  180. package/tests/Table/FilterHelperComponent.test.tsx +88 -0
  181. package/tests/Table/PaginationHelperComponent.test.tsx +109 -0
  182. package/tests/Table/PerPageHelperComponent.test.tsx +34 -0
  183. package/tests/Table/TableHelperComponent.test.tsx +295 -0
  184. package/tests/TipTapEditor/TipTapEditor.test.tsx +28 -0
  185. package/tests/__mock__/hooks/useAuthApi.ts +13 -0
  186. package/tests/__mock__/hooks/useAuthMock.ts +13 -0
  187. package/tests/__mock__/hooks/useFormMock.ts +27 -0
  188. package/tests/__mock__/hooks/useNotificationMock.ts +13 -0
  189. package/tests/__mock__/hooks/useQueryMock.ts +16 -0
  190. package/tests/__mock__/hooks/useSocialApiMock.ts +20 -0
  191. package/tests/__mock__/hooks/useTranslationMock.ts +17 -0
  192. package/tests/__mock__/hooks/useUserApiMock.ts +18 -0
  193. package/tests/__mock__/hooks/useUserMock.ts +13 -0
  194. package/tests/__mock__/styleMock.js +1 -0
  195. package/tests/__mock__/windowMock.ts +5 -0
  196. package/tests/packages/react-query.tsx +28 -0
  197. package/tests/setupTests.ts +10 -0
  198. package/dist/sales/coupon/utils/index.d.ts +0 -7
  199. package/dist/sales/coupon/utils/index.d.ts.map +0 -1
  200. package/dist/sales/coupon/utils/index.js +0 -1
  201. package/src/sales/coupon/utils/index.ts +0 -13
@@ -19,7 +19,6 @@ import { scrollToError } from "@licklist/plugins/dist/utils/ScrollUtils";
19
19
  import { getFirstErrorKey } from "@licklist/plugins/dist/utils/FormValues";
20
20
 
21
21
  import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
22
- import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
23
22
  import { CategoryGroup } from "../../../../types/categories";
24
23
  import { SaleDeadline } from "../SaleDeadline/SaleDeadline";
25
24
  import {
@@ -65,7 +64,6 @@ export interface EditEventFormProps extends HasPermissionProp {
65
64
  createProductSet: (props: EditEventFormValues) => void;
66
65
  setEditProductSetId: (value: string) => void;
67
66
  isExternalPaymentLinkEnabled?: boolean;
68
- workHours: WorkHour[] | undefined;
69
67
  }
70
68
 
71
69
  const eventImageTypes = {
@@ -85,7 +83,6 @@ export const EditEventForm = ({
85
83
  createProductSet,
86
84
  setEditProductSetId,
87
85
  isExternalPaymentLinkEnabled,
88
- workHours,
89
86
  }: EditEventFormProps) => {
90
87
  const { t } = useTranslation(["Design", "Validation"]);
91
88
 
@@ -406,7 +403,6 @@ export const EditEventForm = ({
406
403
  setEditProductSetId={setEditProductSetId}
407
404
  setShowEditProductSet={setShowEditProductSet}
408
405
  showEditProductSet={showEditProductSet}
409
- workHours={workHours}
410
406
  />
411
407
 
412
408
  {hasPermission && !showEditProductSet && (
@@ -5,7 +5,6 @@ import { useId } from "@react-aria/utils";
5
5
  import { Controller, useFormContext } from "react-hook-form";
6
6
  import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
7
7
  import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
8
- import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
9
8
  import { ConfirmModal } from "../../../../modals/confirmation/ConfirmModal";
10
9
  import { EditEventFormValues } from "../EditEventForm/EditEventForm";
11
10
  import { EditEventProductSet } from "./component/EditEventProductSet";
@@ -16,7 +15,6 @@ interface SelectEventProductSetProps extends HasPermissionProp {
16
15
  setShowEditProductSet: (value: boolean) => void;
17
16
  createProductSet: (props: EditEventFormValues) => void;
18
17
  setEditProductSetId: (value: string) => void;
19
- workHours: WorkHour[] | undefined;
20
18
  }
21
19
 
22
20
  export const SelectEventProductSet = ({
@@ -25,7 +23,6 @@ export const SelectEventProductSet = ({
25
23
  setEditProductSetId,
26
24
  showEditProductSet,
27
25
  setShowEditProductSet,
28
- workHours,
29
26
  }: SelectEventProductSetProps) => {
30
27
  const { t } = useTranslation(["Design"]);
31
28
  const form = useFormContext<EditEventFormValues>();
@@ -202,13 +199,14 @@ export const SelectEventProductSet = ({
202
199
  </Form.Group>
203
200
  </div>
204
201
  {showEditProductSet && productSetId && (
205
- <EditEventProductSet
206
- onSubmit={onSubmit}
207
- defaultValues={
208
- productSetId === editedProductSet?.id && editedProductSet
209
- }
210
- workHours={workHours}
211
- />
202
+ <>
203
+ <EditEventProductSet
204
+ onSubmit={onSubmit}
205
+ defaultValues={
206
+ productSetId === editedProductSet?.id && editedProductSet
207
+ }
208
+ />
209
+ </>
212
210
  )}
213
211
  </>
214
212
  );
@@ -5,7 +5,6 @@ import { isEqual } from "lodash";
5
5
  import { useParams } from "react-router-dom";
6
6
  import { useEventEditProductSetContext } from "@licklist/plugins/dist/context/event/EventEditProductSetContext";
7
7
  import { useTranslation } from "react-i18next";
8
- import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
9
8
  import { BlockLoader } from "../../../../../static/loader/BlockLoader";
10
9
  import { ProductSetControl } from "../../../../../product-set";
11
10
  import { ProductSetContextProvider } from "../../../../../product-set/form/context";
@@ -23,13 +22,11 @@ export interface EventDates {
23
22
  interface EditEventProductSetProps {
24
23
  onSubmit: (value: EditEventFormValues["editedProductSet"]) => void;
25
24
  defaultValues?: EditEventFormValues["editedProductSet"];
26
- workHours: WorkHour[] | undefined;
27
25
  }
28
26
 
29
27
  export const EditEventProductSet = ({
30
28
  onSubmit,
31
29
  defaultValues,
32
- workHours,
33
30
  }: EditEventProductSetProps) => {
34
31
  const { companyId } = useParams<{
35
32
  companyId: string;
@@ -127,7 +124,6 @@ export const EditEventProductSet = ({
127
124
  companyName={selectedCompany?.title}
128
125
  fee={feeInPercent}
129
126
  isEventEditProductSet
130
- workHours={workHours}
131
127
  />
132
128
  <Button
133
129
  disabled={isLoading}
@@ -13,14 +13,12 @@ export type ActivityCardProps = {
13
13
  onSelect: () => void;
14
14
  isSelected: boolean;
15
15
  layout?: Layout;
16
- availableTimes?: string | null;
17
16
  };
18
17
 
19
18
  export const ActivityCard = ({
20
19
  title,
21
20
  duration,
22
21
  price,
23
- availableTimes,
24
22
  // image,
25
23
  onSelect,
26
24
  isSelected,
@@ -35,6 +33,7 @@ export const ActivityCard = ({
35
33
  >
36
34
  <div className={clsx("d-flex", "flex-column")}>
37
35
  <div className="activity-card-title">{title}</div>
36
+
38
37
  {duration && <div>{duration}</div>}
39
38
 
40
39
  {price && <div>{price}</div>}
@@ -51,8 +50,7 @@ export const ActivityCard = ({
51
50
  })}
52
51
  >
53
52
  <div className="description">
54
- <div className="title mb-2">{title}</div>
55
- {availableTimes && <div>{availableTimes}</div>}
53
+ <div className="title">{title}</div>
56
54
  {duration && (
57
55
  <div>
58
56
  <p>{duration}</p>
@@ -16,7 +16,6 @@ export function Default() {
16
16
  return (
17
17
  <div>
18
18
  <IframeEventCard
19
- showMoreInfo
20
19
  imageSrc={
21
20
  showImage
22
21
  ? // eslint-disable-next-line max-len
@@ -29,7 +29,6 @@ interface IframeEventCardProps {
29
29
  titleId?: string;
30
30
  descriptionId?: string;
31
31
  imageClassName?: string;
32
- showMoreInfo?: boolean;
33
32
  }
34
33
 
35
34
  export function IframeEventCard({
@@ -47,7 +46,6 @@ export function IframeEventCard({
47
46
  titleId,
48
47
  descriptionId,
49
48
  imageClassName,
50
- showMoreInfo,
51
49
  }: IframeEventCardProps) {
52
50
  const { formatNumber } = useIntl();
53
51
  const { t } = useTranslation("Design");
@@ -72,7 +70,6 @@ export function IframeEventCard({
72
70
  )}
73
71
  onClick={goToDetails ? onClick : undefined}
74
72
  >
75
- {showMoreInfo && <div className="iframe-event-card__info-icon">i</div>}
76
73
  {imageSrc && (
77
74
  <Card.Img
78
75
  className={imageClassName ?? "card-image"}
@@ -94,8 +91,12 @@ export function IframeEventCard({
94
91
  <div className="icon-wrapper">
95
92
  <CalendarSvg />
96
93
  </div>
97
- <p className="m-0 list-view-hided">{date}</p>
98
- <p className="m-0 grid-view-hided">{shortDate}</p>
94
+ <p className="iframe-event-card__bold m-0 list-view-hided">
95
+ {date}
96
+ </p>
97
+ <p className="iframe-event-card__bold m-0 grid-view-hided">
98
+ {shortDate}
99
+ </p>
99
100
  </div>
100
101
  </Card.Text>
101
102
 
@@ -105,7 +106,7 @@ export function IframeEventCard({
105
106
  <div className="icon-wrapper">
106
107
  <ClockSvg />
107
108
  </div>
108
- <p className="m-0">{type}</p>
109
+ <p className="iframe-event-card__bold m-0">{type}</p>
109
110
  </div>
110
111
  </Card.Text>
111
112
  )}
@@ -116,7 +117,7 @@ export function IframeEventCard({
116
117
  <div className="icon-wrapper">
117
118
  <TicketSvg />
118
119
  </div>
119
- <p className="m-0">
120
+ <p className="iframe-event-card__bold m-0">
120
121
  {t("from")}{" "}
121
122
  {formatNumber(cost, { style: "currency", currency: "GBP" })}
122
123
  </p>
@@ -90,7 +90,7 @@ export const NumberInput = forwardRef<HTMLInputElement, NumberInputProps>(
90
90
  type="number"
91
91
  onChange={(e) => handleChangeValue(Number(e.target.value))}
92
92
  value={value}
93
- min={0}
93
+ min={min}
94
94
  max={max}
95
95
  defaultValue={defaultValue}
96
96
  placeholder={placeholder}
@@ -28,9 +28,7 @@ export const LeftBlock = ({
28
28
  {pageTitle && (
29
29
  <>
30
30
  {typeof pageTitle === "string" ? (
31
- <div className="title" id="navigation-title">
32
- {pageTitle}
33
- </div>
31
+ <div className="title">{pageTitle}</div>
34
32
  ) : (
35
33
  pageTitle
36
34
  )}
@@ -25,6 +25,6 @@ export const COLLAPSE_MARGIN = 36;
25
25
 
26
26
  export const PAGE_LEFT_BLOCK_CONTAINER_ID = "page-left-block-container";
27
27
  export const PAGE_CALENDAR_SELECT_WRAPPER = "calendar-select-wrapper";
28
- export const PAGE_BODY_WITH_SCROLL = "page-body-with-scroll";
28
+ export const PAYMENT_LINK_PAGE_BODY = "payment_link_page_body";
29
29
 
30
30
  export const PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
@@ -16,7 +16,7 @@ import {
16
16
  PAGE_LEFT_BLOCK_CONTAINER_ID,
17
17
  PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,
18
18
  PAGE_CALENDAR_SELECT_WRAPPER,
19
- PAGE_BODY_WITH_SCROLL,
19
+ PAYMENT_LINK_PAGE_BODY,
20
20
  } from "../constants";
21
21
  import { ChangeRightBlockHeightEvent } from "../types";
22
22
 
@@ -52,10 +52,10 @@ export const useResizePageBody = () => {
52
52
  ? calenderWrapper.clientHeight
53
53
  : 0;
54
54
 
55
- const paymentLinkPageBody = document.getElementById(PAGE_BODY_WITH_SCROLL);
55
+ const paymentLinkPageBody = document.getElementById(PAYMENT_LINK_PAGE_BODY);
56
56
  if (paymentLinkPageBody) {
57
57
  paymentLinkPageBody.scroll({
58
- top: -height,
58
+ top: -rightBlockHeight,
59
59
  behavior: "smooth",
60
60
  });
61
61
  }
@@ -63,7 +63,7 @@ const processedPaymentSummary = ({
63
63
  const total = calculateTotalPrice(order, externalPaymentDetail);
64
64
 
65
65
  const totalDiscount = calculateTotalDiscount(order.payments);
66
-
66
+ const totalWithDiscount = total - Number(totalDiscount);
67
67
  let summaryItems: SummaryItem[] = [
68
68
  {
69
69
  translateKey: AMOUNT_TOTAL,
@@ -74,7 +74,7 @@ const processedPaymentSummary = ({
74
74
  if (totalDiscount) {
75
75
  summaryItems.push({
76
76
  translateKey: AMOUNT_WITH_DISCOUNT,
77
- price: order.totalToPayAmount,
77
+ price: totalWithDiscount < 0 ? 0 : totalWithDiscount,
78
78
  });
79
79
  }
80
80
 
@@ -84,17 +84,17 @@ const processedPaymentSummary = ({
84
84
 
85
85
  summaryItems.push({
86
86
  translateKey: TOTAL_PAID,
87
- price: order.paidAmount,
87
+ price: totalWithDiscount <= 0 ? 0 : order.totalAmount,
88
88
  });
89
- if (order.totalToPayAmount <= 0) {
89
+ if (totalWithDiscount <= 0) {
90
90
  return summaryItems;
91
91
  }
92
92
  summaryItems = [...summaryItems, ...externalPaymentDetail];
93
93
 
94
- if (order.remainingToPay) {
94
+ if (totalWithDiscount > order.totalAmount) {
95
95
  summaryItems.push({
96
96
  translateKey: REMAINING_TO_PAY,
97
- price: order.remainingToPay,
97
+ price: totalWithDiscount - order.totalAmount,
98
98
  });
99
99
  }
100
100
  return summaryItems;
@@ -16,7 +16,7 @@ import { PaymentTimer } from "./PaymentTimer";
16
16
  import { Page, PageBody } from "../../page";
17
17
  import { BookingSummary } from "../../order-process";
18
18
  import { cartSumByOrderProducts } from "../../order-process/components/BookingSummary/utils";
19
- import { PAGE_BODY_WITH_SCROLL } from "../../page/components/PageBody/constants";
19
+ import { PAYMENT_LINK_PAGE_BODY } from "../../page/components/PageBody/constants";
20
20
 
21
21
  export interface PaymentMetadata {
22
22
  total: number;
@@ -126,7 +126,7 @@ export const PaymentPage = ({
126
126
  onCloseButtonClick={isIframePayment ? onGoBack : undefined}
127
127
  /> */}
128
128
  <PageBody
129
- id={PAGE_BODY_WITH_SCROLL}
129
+ id={PAYMENT_LINK_PAGE_BODY}
130
130
  leftBlock={
131
131
  <PageBody.LeftBlock>
132
132
  <div className="d-flex align-items-center mb-5">
@@ -12,8 +12,6 @@ import {
12
12
  RYFT_STATUS_PENDING_ACTION,
13
13
  AttemptPaymentResponse,
14
14
  } from "@licklist/plugins/dist/hooks/Ryft/useRyftPayment";
15
- import { ProviderPaymentSettings } from "@licklist/core/dist/DataMapper/Setting/ProviderPaymentSettingsDataMapper";
16
-
17
15
  import { BlockLoader, ButtonLoader } from "../../static";
18
16
  import { injectComponentsInRyftForm } from "./utils/ryft-form";
19
17
 
@@ -42,13 +40,11 @@ export interface RyftPaymentFormProps {
42
40
  ) => Promise<void>;
43
41
  onSubmit: () => Promise<AttemptPaymentResponse>;
44
42
  resetReferrer?: () => void;
45
- providerPaymentSettings?: ProviderPaymentSettings;
46
43
  }
47
44
 
48
45
  export const RyftPaymentForm = ({
49
46
  accountId,
50
47
  isCreateLoading,
51
- providerPaymentSettings,
52
48
  initRyft,
53
49
  resetReferrer,
54
50
  onSubmit,
@@ -123,26 +119,13 @@ export const RyftPaymentForm = ({
123
119
  };
124
120
 
125
121
  useEffect(
126
- () => {
127
- if (
128
- !formRef.current?.childNodes?.length ||
129
- formRef.current?.childNodes?.length < 3 ||
130
- !accountId.data?.account_id
131
- ) {
132
- return;
133
- }
134
- injectComponentsInRyftForm({
135
- t,
136
- additionalPaymentMethodsEnabled:
137
- providerPaymentSettings?.additionalPaymentMethodsEnabled,
138
- });
139
- },
122
+ () => injectComponentsInRyftForm({ t }),
140
123
  // eslint-disable-next-line react-hooks/exhaustive-deps
141
124
  [formRef.current?.childNodes?.length]
142
125
  );
143
126
 
144
127
  useEffect(() => {
145
- if (!accountId.data?.account_id || accountId.isError) return;
128
+ if (!accountId.data || accountId.isError) return;
146
129
 
147
130
  initRyft(
148
131
  () => {
@@ -156,7 +139,7 @@ export const RyftPaymentForm = ({
156
139
  );
157
140
 
158
141
  // eslint-disable-next-line react-hooks/exhaustive-deps
159
- }, [accountId.data?.account_id]);
142
+ }, [accountId.data]);
160
143
 
161
144
  if (accountId.isLoading || accountId.isFetching || isCreateLoading)
162
145
  return (
@@ -2,18 +2,17 @@ import { TFunction } from "react-i18next";
2
2
 
3
3
  export const injectComponentsInRyftForm = ({
4
4
  t,
5
- additionalPaymentMethodsEnabled,
6
5
  }: {
7
6
  t: TFunction<string[]>;
8
- additionalPaymentMethodsEnabled?: boolean;
9
7
  }) => {
10
8
  const cardContainer = document.getElementById("ryft-pay-iframe");
9
+ const oldCardDividerContainer = document.getElementById(
10
+ "card-title-container"
11
+ );
11
12
 
12
- if (!cardContainer) {
13
+ if (!cardContainer || oldCardDividerContainer) {
13
14
  return;
14
15
  }
15
- // Removing of the old title container
16
- document.getElementById("card-title-container")?.remove();
17
16
 
18
17
  const cardTitle = document.createElement("div");
19
18
  const cardText = document.createElement("div");
@@ -27,14 +26,10 @@ export const injectComponentsInRyftForm = ({
27
26
 
28
27
  const payGrid = document.getElementById("ryft-pay-grid");
29
28
 
30
- if (!payGrid || !additionalPaymentMethodsEnabled) {
29
+ if (!payGrid) {
31
30
  return;
32
31
  }
33
32
 
34
- // Removing of the old mobile title container and divider container
35
- document.getElementById("mobile-pay-title")?.remove();
36
- document.getElementById("mobile-pay-divider-container")?.remove();
37
-
38
33
  // Adding title and divider for apple and google pay button
39
34
  const mobilePayTitle = document.createElement("div");
40
35
  const dividerText = document.createElement("div");
@@ -42,7 +37,6 @@ export const injectComponentsInRyftForm = ({
42
37
  const container = document.createElement("div");
43
38
  mobilePayTitle.className = "mobile-pay-title";
44
39
  mobilePayTitle.innerText = t("Design:expressCheckoutWith");
45
- mobilePayTitle.id = "mobile-pay-title";
46
40
  dividerText.id = "mobile-pay-divider-text";
47
41
  dividerText.innerText = "or";
48
42
  divider.id = "mobile-pay-divider";
@@ -36,7 +36,7 @@ export interface DateAndRecurrenceInputValues {
36
36
 
37
37
  interface DateAndRecurrenceInputProps {
38
38
  isEventEditProductSet?: boolean;
39
- workHours: WorkHour[] | undefined;
39
+ workHours?: WorkHour[];
40
40
  providerHasBookingManagement: boolean;
41
41
  isLoading?: boolean;
42
42
  }
@@ -90,7 +90,7 @@ export const DateAndRecurrenceInput = ({
90
90
  clearEditState();
91
91
  });
92
92
 
93
- const popoverId = useId();
93
+ const popoverId = useId()!;
94
94
 
95
95
  const { t } = useTranslation("Design");
96
96
 
@@ -228,7 +228,6 @@ export const DateAndRecurrenceInput = ({
228
228
  defaultValues={editState.values}
229
229
  onChange={handleRecurringDateChange}
230
230
  onDelete={handleDelete}
231
- workHours={workHours}
232
231
  >
233
232
  {providerHasBookingManagement && (
234
233
  <AvailableTimesControl
@@ -5,8 +5,9 @@ import { Form, OverlayTrigger, Popover } from "react-bootstrap";
5
5
  import { useFieldArray, useFormContext } from "react-hook-form";
6
6
  import { useTranslation } from "react-i18next";
7
7
  import { useClickAway } from "react-use";
8
- import { TIMEZONE, TIME_FORMAT } from "@licklist/core/dist/Config/Date";
8
+ import { TIMEZONE } from "@licklist/core/dist/Config/Date";
9
9
  import { ProductSetRecurrence } from "@licklist/core/dist/DataMapper/Product/ProductSetRecurrenceDataMapper";
10
+ import { TIME_FORMAT } from "@licklist/core/dist/Config/Date";
10
11
  import { DateTime } from "luxon";
11
12
  import RRule, { Frequency } from "rrule";
12
13
  import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
@@ -26,6 +27,7 @@ import {
26
27
  import { ProductSetRecurrenceOverridesControl } from "./ProductSetRecurrenceOverridesControl";
27
28
  import { MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE } from "../product/constants";
28
29
 
30
+
29
31
  export interface DateAndRecurrenceInputValues {
30
32
  menuRecurrences?: Partial<ProductSetRecurrence>[];
31
33
  }
@@ -57,7 +59,7 @@ export const DateInput = ({
57
59
  control,
58
60
  keyName: "_id",
59
61
  });
60
- const [availableTimes, setAvailableTimes] = useState<string[]>([]);
62
+
61
63
  const [isDatePopoverVisible, setIsDatePopoverVisible] = useState(false);
62
64
  const availableTimesFormRef = useRef<AvailableTimesControlRef>();
63
65
  const [editState, setEditState] = useState<{
@@ -92,7 +94,6 @@ export const DateInput = ({
92
94
  // Hotfix for an issue with Popover close & open actions
93
95
  setTimeout(() => {
94
96
  setEditState({ index, values: next });
95
- setAvailableTimes(next.availableTimes || []);
96
97
  setIsDatePopoverVisible(() => true);
97
98
  }, 100);
98
99
  };
@@ -220,7 +221,7 @@ export const DateInput = ({
220
221
  workHours={workHours}
221
222
  isLoading={isLoading}
222
223
  ref={availableTimesFormRef}
223
- defaultValues={availableTimes}
224
+ defaultValues={[]}
224
225
  errorMessage={
225
226
  errors?.menuRecurrences?.[`${editState?.index}`]
226
227
  ?.availableTimes?.message
@@ -85,7 +85,7 @@ export interface ProductSetControlProps {
85
85
  fieldSets?: FieldSet[];
86
86
  showEmailTemplate?: boolean;
87
87
  showSmsTemplate?: boolean;
88
- workHours: WorkHour[] | undefined;
88
+ workHours?: WorkHour[];
89
89
  providerHasBookingManagement?: boolean;
90
90
  isOverrides?: boolean;
91
91
  }
@@ -307,7 +307,7 @@ export function ProductCategoriesControl({
307
307
  title={t("addCategory")}
308
308
  isOverride={isOverrides}
309
309
  onClick={() => {
310
- if (isOverrides) return;
310
+ if (isOverrides) return;
311
311
  setIsSelectCategoryVisible(true);
312
312
  }}
313
313
  />
@@ -26,16 +26,12 @@ import { checkAvailableTimesErrors, getFilteredTemplates } from "../utils";
26
26
  export interface WithIsLoading {
27
27
  isLoading: boolean;
28
28
  }
29
- export interface WithIdOptional {
30
- id?: number;
31
- }
32
-
33
29
  export interface WithId {
34
30
  id: number;
35
31
  }
36
32
  export interface ProductSetFormValues
37
33
  extends FormValues,
38
- WithIdOptional,
34
+ WithId,
39
35
  ProductSetControlValues {
40
36
  steps: Step[];
41
37
  isOverrides?: boolean;
@@ -24,10 +24,8 @@ export const useSortableTreeFunctions = ({
24
24
  const cancelChanges = (index: number) => {
25
25
  if (isOverrides) return;
26
26
  if (!previousValue) {
27
- // eslint-disable-next-line consistent-return
28
27
  return remove(index);
29
28
  }
30
- // eslint-disable-next-line consistent-return
31
29
  return setValue(`${fieldName}.${index}` as const, previousValue);
32
30
  };
33
31
 
@@ -7,17 +7,14 @@ import {
7
7
  QUANTITY_TYPE_LIST_DTO,
8
8
  QUANTITY_TYPE_RECHARGING,
9
9
  } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
10
- import {
11
- ProductType,
12
- PRODUCT_DEfAULT_COLORS,
13
- } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
10
+ import { ProductType } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
14
11
  import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
15
- import clsx from "clsx";
16
12
  import {
17
13
  FieldNamePrefixPath,
18
14
  FormValues,
19
15
  } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
20
16
  import { useId } from "@react-aria/utils";
17
+ import clsx from "clsx";
21
18
  import React, {
22
19
  ChangeEvent,
23
20
  useCallback,
@@ -39,7 +36,7 @@ import {
39
36
  } from "react-hook-form";
40
37
  import { useTranslation } from "react-i18next";
41
38
  import { useImages } from "@licklist/plugins/dist/hooks/Media/useImages";
42
-
39
+ import { PRODUCT_DEfAULT_COLORS } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
43
40
  import {
44
41
  Image,
45
42
  IMAGE_TYPE_IMAGE,
@@ -149,7 +146,7 @@ export function ProductControl<T extends FormValues>({
149
146
  clearErrors,
150
147
  } = useFormContext<T>();
151
148
 
152
- const { setLoading, productGroupList } = useContext(ProductSetLoadingContext);
149
+ const { setLoading } = useContext(ProductSetLoadingContext);
153
150
  const { t } = useTranslation(["Design", "Validation", "ProductSet"]);
154
151
  const [expanded, setExpanded] = useState(false);
155
152
  const [initialImages, setInitialImages] = useState<Image[] | null>(null);
@@ -162,8 +159,8 @@ export function ProductControl<T extends FormValues>({
162
159
 
163
160
  const advancedId = useId();
164
161
  const nameId = useId();
165
-
166
- const productGroupId = useId();
162
+ // @TODO: no need for v1 release
163
+ // const productGroupId = useId();
167
164
  const descriptionId = useId();
168
165
  const termsAndConditionsId = useId();
169
166
  const isAvailableId = useId();
@@ -403,35 +400,6 @@ export function ProductControl<T extends FormValues>({
403
400
  isRequired={false}
404
401
  defaultColors={PRODUCT_DEfAULT_COLORS}
405
402
  />
406
-
407
- <Form.Group controlId={productGroupId}>
408
- <Form.Label>{t("productGroup")}</Form.Label>
409
- <Form.Control
410
- as="select"
411
- {...register(`${fieldNamePrefix}.productGroupId` as Path<T>)}
412
- isInvalid={HookFormService.isInvalid<T>(
413
- `${fieldNamePrefix}.productGroupId` as Path<T>,
414
- errors
415
- )}
416
- disabled={isLoading}
417
- defaultValue=""
418
- >
419
- <option value="">{t("Design:selectProductGroup")}</option>
420
- {productGroupList.map((productGroup) => {
421
- return (
422
- <option value={productGroup.id} key={productGroup.id}>
423
- {productGroup.value}
424
- </option>
425
- );
426
- })}
427
- </Form.Control>
428
- <Form.Control.Feedback type="invalid">
429
- {HookFormService.getErrors<T>(
430
- `${fieldNamePrefix}.productGroupId` as Path<T>,
431
- errors
432
- )}
433
- </Form.Control.Feedback>
434
- </Form.Group>
435
403
  </Col>
436
404
  </Row>
437
405
 
@@ -704,6 +672,38 @@ export function ProductControl<T extends FormValues>({
704
672
  </Collapse>
705
673
 
706
674
  <Row>
675
+ {/* @TODO: no need for v1 release
676
+ <Col xs={12} sm={6}>
677
+ <Form.Group controlId={productGroupId}>
678
+ <Form.Label>{t("productGroup")}</Form.Label>
679
+ <Form.Control
680
+ as="select"
681
+ {...register(`${fieldNamePrefix}.productGroupId` as Path<T>)}
682
+ isInvalid={HookFormService.isInvalid<T>(
683
+ `${fieldNamePrefix}.productGroupId` as Path<T>,
684
+ errors
685
+ )}
686
+ disabled={isLoading}
687
+ defaultValue=""
688
+ >
689
+ <option value="">{t("Design:selectProductGroup")}</option>
690
+ {productGroupList.map((productGroup) => {
691
+ return (
692
+ <option value={productGroup.id} key={productGroup.id}>
693
+ {productGroup.value}
694
+ </option>
695
+ );
696
+ })}
697
+ </Form.Control>
698
+ <Form.Control.Feedback type="invalid">
699
+ {HookFormService.getErrors<T>(
700
+ `${fieldNamePrefix}.productGroupId` as Path<T>,
701
+ errors
702
+ )}
703
+ </Form.Control.Feedback>
704
+ </Form.Group>
705
+ </Col> */}
706
+
707
707
  <Col xs={12}>
708
708
  {hasBookingManagement && (
709
709
  <ProductBookingManagementControl<T>