@licklist/design 0.58.11-dev.0 → 0.58.11

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 (172) hide show
  1. package/bitbucket-pipelines.yml +8 -0
  2. package/dist/assets/iframe/calendar.svg +2 -2
  3. package/dist/assets/iframe/calendar.svg.js +1 -1
  4. package/dist/assets/iframe/ticket.svg +2 -2
  5. package/dist/assets/iframe/ticket.svg.js +1 -1
  6. package/dist/calendar/Calendar.d.ts +1 -1
  7. package/dist/calendar/Calendar.d.ts.map +1 -1
  8. package/dist/calendar/Calendar.js +1 -1
  9. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
  10. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  11. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  12. package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
  13. package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
  14. package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
  15. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +2 -2
  16. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  17. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  18. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +2 -4
  19. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
  20. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  21. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
  22. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
  23. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js +1 -1
  24. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +2 -4
  25. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
  26. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  27. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -4
  28. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  29. package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
  30. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
  31. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  32. package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
  33. package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
  34. package/dist/iframe/page/components/PageBody/constants.js +1 -1
  35. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  36. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
  37. package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
  38. package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
  39. package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
  40. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  41. package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
  42. package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
  43. package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
  44. package/dist/product-set/control/DateInput.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/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
  50. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  51. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  52. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  53. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  54. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  55. package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -1
  56. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -3
  57. package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
  58. package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
  59. package/dist/recurring-date-picker-input/utils.d.ts +0 -9
  60. package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
  61. package/dist/recurring-date-picker-input/utils.js +1 -1
  62. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  63. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  64. package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
  65. package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
  66. package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
  67. package/dist/static/manual-date-picker/constants/index.d.ts +1 -4
  68. package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
  69. package/dist/static/manual-date-picker/constants/index.js +1 -1
  70. package/dist/static/manual-date-picker/utils/index.d.ts +0 -4
  71. package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
  72. package/dist/static/manual-date-picker/utils/index.js +1 -1
  73. package/dist/styles/iframe-events/Card.scss +8 -24
  74. package/dist/styles/iframe-events/PoweredBy.scss +2 -2
  75. package/dist/styles/iframe-order-process/IframeOrderProcess.scss +20 -57
  76. package/dist/styles/iframe-page/Page.scss +0 -1
  77. package/dist/styles/iframe-page/PageBody.scss +12 -34
  78. package/dist/styles/iframe-page/PageHeader.scss +39 -41
  79. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  80. package/dist/styles/sales/BookingResults.scss +1 -1
  81. package/dist/zone/form/utils/dates.d.ts.map +1 -1
  82. package/jest.config.js +29 -0
  83. package/package.json +35 -10
  84. package/src/assets/iframe/calendar.svg +2 -2
  85. package/src/assets/iframe/ticket.svg +2 -2
  86. package/src/calendar/Calendar.stories.tsx +0 -23
  87. package/src/calendar/Calendar.tsx +5 -5
  88. package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
  89. package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
  90. package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
  91. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +0 -9
  92. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +7 -58
  93. package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +0 -8
  94. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
  95. package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +10 -63
  96. package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -4
  97. package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
  98. package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
  99. package/src/iframe/page/components/PageBody/constants.ts +0 -2
  100. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +0 -10
  101. package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
  102. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +6 -546
  103. package/src/iframe/payment/payment-page/PaymentPage.tsx +29 -38
  104. package/src/iframe/ryft/RyftPaymentForm.tsx +5 -11
  105. package/src/product-set/control/DateAndRecurrenceInput.tsx +1 -2
  106. package/src/product-set/control/DateInput.tsx +3 -1
  107. package/src/product-set/form/ProductCategoriesControl.tsx +1 -1
  108. package/src/product-set/form/ProductSetForm.tsx +1 -5
  109. package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -2
  110. package/src/product-set/product/ProductControl.tsx +3 -6
  111. package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -0
  112. package/src/product-set/product-category/ProductCategoryControl.tsx +43 -105
  113. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
  114. package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +1 -0
  115. package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -11
  116. package/src/recurring-date-picker-input/utils.ts +0 -75
  117. package/src/sales/booking/results/BookingResults.stories.tsx +2 -3
  118. package/src/sales/booking/results/components/ResultCard.tsx +5 -2
  119. package/src/setting/admin/AdminSettingForm.tsx +2 -2
  120. package/src/sortable-tree/SortableTreeItem.tsx +1 -1
  121. package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
  122. package/src/static/manual-date-picker/constants/index.ts +2 -6
  123. package/src/static/manual-date-picker/utils/index.ts +0 -11
  124. package/src/static/switch/BooleanSwitch.tsx +1 -1
  125. package/src/styles/iframe-events/Card.scss +8 -24
  126. package/src/styles/iframe-events/PoweredBy.scss +2 -2
  127. package/src/styles/iframe-order-process/IframeOrderProcess.scss +20 -57
  128. package/src/styles/iframe-page/Page.scss +0 -1
  129. package/src/styles/iframe-page/PageBody.scss +12 -34
  130. package/src/styles/iframe-page/PageHeader.scss +39 -41
  131. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  132. package/src/styles/sales/BookingResults.scss +1 -1
  133. package/src/zone/form/utils/dates.ts +10 -9
  134. package/tests/Auth/Authorizer.test.tsx +194 -0
  135. package/tests/Auth/Layout/UserNavDropDown.test.tsx +43 -0
  136. package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +33 -0
  137. package/tests/Auth/Login/LoginComponent.test.tsx +246 -0
  138. package/tests/Auth/Login/LoginFormComponent.test.tsx +182 -0
  139. package/tests/Auth/Register/RegisterComponent.test.tsx +285 -0
  140. package/tests/Auth/Register/RegisterFormComponent.test.tsx +170 -0
  141. package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +130 -0
  142. package/tests/Auth/Social/SocialCallbackComponent.test.tsx +133 -0
  143. package/tests/Auth/Social/SocialFormComponent.test.tsx +118 -0
  144. package/tests/FileUpload/FileUpload.test.tsx +42 -0
  145. package/tests/Notification/EmailTemplate.test.tsx +82 -0
  146. package/tests/ProductSet/ProductSetPopover.test.tsx +40 -0
  147. package/tests/Report/Report.test.tsx +48 -0
  148. package/tests/Sales/Coupon.test.tsx +51 -0
  149. package/tests/Sales/SalesAndVIews.test.tsx +63 -0
  150. package/tests/SnippetTemplates/SnippetTemplates.test.tsx +56 -0
  151. package/tests/Table/FilterHelperComponent.test.tsx +88 -0
  152. package/tests/Table/PaginationHelperComponent.test.tsx +109 -0
  153. package/tests/Table/PerPageHelperComponent.test.tsx +34 -0
  154. package/tests/Table/TableHelperComponent.test.tsx +295 -0
  155. package/tests/TipTapEditor/TipTapEditor.test.tsx +28 -0
  156. package/tests/__mock__/hooks/useAuthApi.ts +13 -0
  157. package/tests/__mock__/hooks/useAuthMock.ts +13 -0
  158. package/tests/__mock__/hooks/useFormMock.ts +27 -0
  159. package/tests/__mock__/hooks/useNotificationMock.ts +13 -0
  160. package/tests/__mock__/hooks/useQueryMock.ts +16 -0
  161. package/tests/__mock__/hooks/useSocialApiMock.ts +20 -0
  162. package/tests/__mock__/hooks/useTranslationMock.ts +17 -0
  163. package/tests/__mock__/hooks/useUserApiMock.ts +18 -0
  164. package/tests/__mock__/hooks/useUserMock.ts +13 -0
  165. package/tests/__mock__/styleMock.js +1 -0
  166. package/tests/__mock__/windowMock.ts +5 -0
  167. package/tests/packages/react-query.tsx +28 -0
  168. package/tests/setupTests.ts +10 -0
  169. package/dist/iframe/ryft/utils/ryft-form.d.ts +0 -5
  170. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +0 -1
  171. package/dist/iframe/ryft/utils/ryft-form.js +0 -1
  172. package/src/iframe/ryft/utils/ryft-form.ts +0 -47
@@ -1,4 +1,3 @@
1
- // TODO when all iframe pages will be ready, think how we can combine it all in page-body style
2
1
  .page-body {
3
2
  display: flex;
4
3
  background-color: transparent;
@@ -13,6 +12,9 @@
13
12
  .left-block {
14
13
  flex: 1;
15
14
  align-items: stretch;
15
+ border-radius: 0.5rem;
16
+ border-bottom-left-radius: 0;
17
+ border-bottom-right-radius: 0;
16
18
  padding: 1rem;
17
19
  background-color: $snippet-page-body-left-block-background-color;
18
20
  border: 0;
@@ -31,6 +33,7 @@
31
33
  display: flex;
32
34
  align-items: flex-start;
33
35
  justify-content: space-between;
36
+
34
37
  .title {
35
38
  color: $snippet-elements-body-color;
36
39
  margin: 0;
@@ -61,7 +64,7 @@
61
64
  overflow-x: hidden;
62
65
  scrollbar-width: thin;
63
66
  .iframe-event-card {
64
- border-bottom: 1px solid $separator-color;
67
+ border-bottom: 2px solid $separator-color;
65
68
  }
66
69
 
67
70
  @include media-breakpoint-down(sm) {
@@ -78,7 +81,9 @@
78
81
  }
79
82
 
80
83
  .right-block {
81
- height: 100%;
84
+ margin-left: 1rem;
85
+ border-radius: 0.5rem;
86
+ height: calc(100% - 1rem);
82
87
  max-width: 17.5rem;
83
88
  min-width: 17.5rem;
84
89
  width: 100%;
@@ -110,7 +115,7 @@
110
115
  }
111
116
 
112
117
  .collapse {
113
- max-height: calc(100vh - 15rem);
118
+ max-height: calc(100vh - 19rem);
114
119
  transition: none 0s ease 0s;
115
120
 
116
121
  &.show {
@@ -120,7 +125,7 @@
120
125
  }
121
126
 
122
127
  @include media-breakpoint-down(sm) {
123
- max-height: 100%;
128
+ max-height: 7.5rem;
124
129
  }
125
130
  }
126
131
  .collapse-with-people-input {
@@ -146,14 +151,8 @@
146
151
  }
147
152
 
148
153
  .iframe-event-card {
149
- border: none;
150
-
151
- .card-image {
152
- border-radius: 0;
153
- }
154
- .card-body {
155
- padding-left: 1rem;
156
- }
154
+ background-color: transparent;
155
+ border-color: transparent;
157
156
  }
158
157
 
159
158
  .price {
@@ -263,24 +262,3 @@
263
262
  }
264
263
  }
265
264
  }
266
-
267
- .event-list-page-body {
268
- overflow: auto;
269
- .left-block {
270
- .navigation {
271
- font-size: 1.125rem;
272
- font-weight: 500;
273
- padding-bottom: 2.625rem;
274
- display: flex;
275
- align-items: flex-start;
276
- justify-content: space-between;
277
- margin-top: 0.125rem;
278
-
279
- .title {
280
- position: absolute;
281
- color: $snippet-elements-body-color;
282
- margin: 0;
283
- }
284
- }
285
- }
286
- }
@@ -20,57 +20,55 @@ $base-height: 2.5rem;
20
20
  transition: $color-transition;
21
21
  border: 0;
22
22
  }
23
- }
24
- }
25
-
26
- .iframe-page {
27
- .button-wrapper {
28
- background-color: $snippet-page-header-steps-close-button-background-color;
29
- height: $base-height;
30
- width: $base-height;
31
- border-radius: $base-height;
32
- transition: $color-transition;
33
23
 
34
- .close-button {
35
- font-size: 1.25rem;
36
- width: $base-height;
24
+ .button-wrapper {
25
+ background-color: $snippet-page-header-steps-close-button-background-color;
37
26
  height: $base-height;
38
- display: flex;
39
- align-items: center;
40
- justify-content: center;
41
- color: $snippet-page-header-steps-close-button-border-color;
27
+ width: $base-height;
28
+ border-radius: $base-height;
42
29
  transition: $color-transition;
43
30
 
44
- &:hover {
45
- cursor: pointer;
31
+ .close-button {
32
+ font-size: 1.25rem;
33
+ width: $base-height;
34
+ height: $base-height;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ color: $snippet-page-header-steps-close-button-border-color;
39
+ transition: $color-transition;
40
+
41
+ &:hover {
42
+ cursor: pointer;
43
+ }
46
44
  }
47
- }
48
45
 
49
- &.close-button {
50
- margin-left: 1rem;
51
- }
46
+ &.close-button {
47
+ margin-left: 1rem;
48
+ }
52
49
 
53
- .back-button {
54
- font-size: 2rem;
55
- width: $base-height;
56
- height: $base-height;
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- font-weight: lighter;
61
- color: $snippet-page-header-steps-close-button-border-color;
62
- transition: $color-transition;
50
+ .back-button {
51
+ font-size: 2rem;
52
+ width: $base-height;
53
+ height: $base-height;
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ font-weight: lighter;
58
+ color: $snippet-page-header-steps-close-button-border-color;
59
+ transition: $color-transition;
63
60
 
64
- &:hover {
65
- cursor: pointer;
61
+ &:hover {
62
+ cursor: pointer;
63
+ }
66
64
  }
67
- }
68
65
 
69
- &.back-button {
70
- display: flex;
71
- align-items: center;
72
- justify-content: center;
73
- margin-right: 1rem;
66
+ &.back-button {
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ margin-right: 1rem;
71
+ }
74
72
  }
75
73
  }
76
74
  }
@@ -1,52 +1,10 @@
1
1
  .payment_link {
2
- padding: 0 0 1rem 0;
3
-
4
- .button-wrapper {
5
- top: 2rem;
6
- right: 2rem;
7
- position: absolute;
8
- z-index: 100;
9
- }
10
-
11
2
  .page-body {
12
- padding: 0;
13
- height: calc(100vh - 2rem) !important;
14
-
15
- .navigation {
16
- display: block;
17
- @include media-breakpoint-down(sm) {
18
- padding: 0;
19
- }
20
- }
21
-
22
- .right-block {
23
- margin-left: 0;
24
- height: calc(100vh - 2rem);
25
- max-height: calc(100vh - 1rem);
26
- @include media-breakpoint-down(sm) {
27
- width: calc(100% - 2rem);
28
- max-width: unset;
29
- position: inherit;
30
- overflow: visible;
31
- margin: 0 1rem 1rem;
32
- height: unset;
33
- min-height: unset;
34
- max-height: 100%;
35
- }
36
- }
37
-
38
3
  .left-block {
39
4
  .left-block-container {
40
5
  position: relative;
41
6
  max-height: 100%;
42
7
 
43
- .payment-title {
44
- font-size: 0.875rem;
45
- font-weight: 600;
46
- align-items: center;
47
- margin-left: 0.5rem;
48
- }
49
-
50
8
  .ryft-payment-form {
51
9
  .submit-button-wrapper {
52
10
  margin: -1rem 0 1rem;
@@ -55,55 +13,7 @@
55
13
  width: 100%;
56
14
  }
57
15
  }
58
- #mobile-pay-divider-container {
59
- display: flex;
60
- position: relative;
61
- margin-bottom: 1rem;
62
- #mobile-pay-divider-text {
63
- margin-right: 1rem;
64
- font-size: 0.875rem;
65
- font-weight: 600;
66
- }
67
- #mobile-pay-divider {
68
- width: 100%;
69
- border-bottom: 1px #dfdfdf solid;
70
- margin-bottom: 0.6rem;
71
- }
72
- }
73
16
 
74
- #card-title-container {
75
- height: auto;
76
- border: none;
77
- margin-bottom: 0.5rem;
78
- text-align: left;
79
- :first-child {
80
- font-size: 1rem;
81
- font-weight: 600;
82
- margin-bottom: 1rem;
83
- }
84
-
85
- .form-label {
86
- margin-bottom: 0.5rem;
87
- }
88
- }
89
- .mobile-pay-title {
90
- display: block;
91
- font-weight: 600;
92
- font-size: 1rem;
93
- color: black;
94
- padding: 0;
95
- font-style: normal;
96
- font-family: inherit;
97
- margin-bottom: 1rem;
98
- }
99
- }
100
- .form {
101
- .input {
102
- border: 2px solid #525252 !important;
103
- }
104
- }
105
-
106
- .ryft-payment-form {
107
17
  @include media-breakpoint-up(md) {
108
18
  .submit-button-wrapper {
109
19
  max-width: 15.5rem;
@@ -112,9 +22,10 @@
112
22
 
113
23
  // it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
114
24
  .ryft-pay-grid {
25
+ position: absolute !important;
26
+ top: 10rem;
115
27
  width: 100%;
116
28
  max-width: 15.5rem;
117
- margin-bottom: 1rem;
118
29
  }
119
30
  .ryft-pay-apple-pay-button {
120
31
  border-radius: 0.25rem;
@@ -125,36 +36,6 @@
125
36
  display: none !important;
126
37
  }
127
38
  }
128
- @include media-breakpoint-down(sm) {
129
- .left-block-container {
130
- max-height: 100%;
131
- overflow: visible;
132
- }
133
- }
134
- }
135
-
136
- @include media-breakpoint-down(sm) {
137
- flex-direction: column-reverse;
138
- overflow: scroll;
139
-
140
- @include media-breakpoint-down(sm) {
141
- .left-block {
142
- min-height: 100%;
143
- }
144
- .right-block {
145
- margin: 0 auto;
146
- width: 100%;
147
- .children-wrapper {
148
- .accordion {
149
- .collapse {
150
- overflow: visible;
151
- overflow-x: unset;
152
- scrollbar-width: unset;
153
- }
154
- }
155
- }
156
- }
157
- }
158
39
  }
159
40
  }
160
41
  ::-webkit-scrollbar {
@@ -181,7 +62,3 @@
181
62
  }
182
63
  }
183
64
  }
184
-
185
- #ryft-threeDSMethodIframe {
186
- display: none;
187
- }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14rem;
8
+ height: 14.25rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -1 +1 @@
1
- {"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/utils/dates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAOtF,eAAO,MAAM,qBAAqB,cACrB,MAAM,WACR,MAAM,6BAuChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,QAAQ,EAAE,aAyC9D,CAAC"}
1
+ {"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/utils/dates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAOtF,eAAO,MAAM,qBAAqB,cACrB,MAAM,WACR,MAAM,6BAuChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,QAAQ,EAAE,aA0C9D,CAAC"}
package/jest.config.js ADDED
@@ -0,0 +1,29 @@
1
+ // For a detailed explanation regarding each configuration property, visit:
2
+ // https://jestjs.io/docs/en/configuration.html
3
+
4
+ module.exports = {
5
+ modulePathIgnorePatterns: ["/dist/"],
6
+ roots: ["<rootDir>/src", "<rootDir>/tests"],
7
+ globals: {
8
+ "ts-jest": {
9
+ isolatedModules: true,
10
+ babelConfig: {
11
+ presets: ["@babel/preset-env", "@babel/preset-react"],
12
+ },
13
+ },
14
+ },
15
+ transform: {
16
+ "^.+\\.(t|j)sx?$": "ts-jest",
17
+ },
18
+ transformIgnorePatterns: [
19
+ "node_modules/(?!(redux-persist)/)",
20
+ "node_modules/(?!(@licklist)/)",
21
+ ],
22
+ testRegex: ["(\\/tests\\/.*.(test|spec))\\.tsx?$"],
23
+ moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
24
+ setupFilesAfterEnv: ["<rootDir>/tests/setupTests.ts"],
25
+ moduleNameMapper: {
26
+ "^.+\\.(css|scss|sass|less)$": "<rootDir>/tests/__mock__/styleMock.js",
27
+ ".+\\.(svg|png|jpg)$": "identity-obj-proxy",
28
+ },
29
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.58.11-dev.0",
3
+ "version": "0.58.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -16,11 +16,14 @@
16
16
  "type-check:watch": "yarn type-check -- --watch",
17
17
  "build": "rollup -c",
18
18
  "watch": "yarn build -- -w",
19
+ "test": "jest --verbose --coverage --watchAll=false",
20
+ "run-test": "jest --verbose --watchAll=false",
19
21
  "lint": "eslint --ext .ts,.tsx .",
20
22
  "lint:fix": "yarn run lint -- --fix",
21
23
  "lint:format": "prettier \"**/*.{md,json,yml,scss}\" --check",
22
24
  "lint:format:fix": "prettier \"**/*.{md,json,yml,scss}\" --write",
23
25
  "prepare": "husky install",
26
+ "test-staged": "CI=true jest --passWithNoTests --findRelatedTests",
24
27
  "tests": "yarn tests-staged",
25
28
  "prettier-write": "prettier --write",
26
29
  "tsc": "bash -c tsc -p tsconfig.json -b"
@@ -50,9 +53,9 @@
50
53
  "@fortawesome/free-brands-svg-icons": "5.15.2",
51
54
  "@fortawesome/free-solid-svg-icons": "5.15.2",
52
55
  "@fortawesome/react-fontawesome": "0.1.9",
53
- "@licklist/core": ">=0.23.3-dev.0 < 0.23.3",
54
- "@licklist/eslint-config": "0.4.5",
55
- "@licklist/plugins": ">=0.27.2-dev.2 < 0.27.2",
56
+ "@licklist/core": "^0.23.1",
57
+ "@licklist/eslint-config": "0.3.4",
58
+ "@licklist/plugins": "^0.27.2",
56
59
  "@mdx-js/react": "1.6.22",
57
60
  "@popperjs/core": "2.11.8",
58
61
  "@react-aria/utils": "3.9.0",
@@ -70,6 +73,10 @@
70
73
  "@svgr/rollup": "5.5.0",
71
74
  "@svgr/webpack": "5.5.0",
72
75
  "@tanstack/react-table": "8.10.6",
76
+ "@testing-library/jest-dom": "5.16.1",
77
+ "@testing-library/react": "11.2.5",
78
+ "@testing-library/react-hooks": "5.1.0",
79
+ "@testing-library/user-event": "13.5.0",
73
80
  "@tiptap/core": "2.0.0-beta.176",
74
81
  "@tiptap/extension-blockquote": "2.0.0-beta.29",
75
82
  "@tiptap/extension-bold": "2.0.0-beta.28",
@@ -92,10 +99,14 @@
92
99
  "@tiptap/react": "2.0.0-beta.109",
93
100
  "@tiptap/suggestion": "2.0.0-beta.92",
94
101
  "@types/babel__core": "7.1.12",
102
+ "@types/enzyme-adapter-react-16": "1.0.6",
103
+ "@types/jest": "26.0.20",
95
104
  "@types/luxon": "1.26.2",
96
105
  "@types/mdx-js__react": "1.5.3",
106
+ "@types/react": "17.0.2",
97
107
  "@types/react-bootstrap": "1.0.1",
98
108
  "@types/react-date-range": "^1.4.4",
109
+ "@types/react-dom": "17.0.1",
99
110
  "@types/react-email-editor": "1.1.7",
100
111
  "@types/react-loader": "2.4.4",
101
112
  "@types/react-phone-number-input": "3.0.6",
@@ -105,6 +116,7 @@
105
116
  "@typescript-eslint/eslint-plugin": "5.8.1",
106
117
  "@typescript-eslint/parser": "5.8.1",
107
118
  "@wojtekmaj/react-daterange-picker": "^4.1.0",
119
+ "babel-jest": "26.6.3",
108
120
  "babel-loader": "8.2.2",
109
121
  "babel-plugin-inline-react-svg": "2.0.1",
110
122
  "bootstrap": "4.6.0",
@@ -116,16 +128,21 @@
116
128
  "emojibase": "6.1.0",
117
129
  "emojibase-data": "7.0.1",
118
130
  "emojibase-regex": "6.0.1",
131
+ "enzyme": "3.11.0",
132
+ "enzyme-adapter-react-16": "1.15.6",
119
133
  "eslint": "7.32.0",
120
134
  "eslint-config-airbnb": "18.2.1",
121
135
  "eslint-config-prettier": "8.3.0",
136
+ "eslint-plugin-jest": "25.3.2",
122
137
  "eslint-plugin-jsx-a11y": "6.5.1",
123
138
  "eslint-plugin-prettier": "4.0.0",
124
139
  "eslint-plugin-react-hooks": "4.2.0",
140
+ "eslint-plugin-testing-library": "5.0.1",
125
141
  "framer-motion": "4.1.17",
126
142
  "history": "5.3.0",
127
143
  "husky": "7.0.4",
128
144
  "i18next": "19.4.5",
145
+ "jest": "26.6.0",
129
146
  "klona": "2.0.4",
130
147
  "konva": "6.0.0",
131
148
  "lint-staged": "11.1.2",
@@ -133,18 +150,18 @@
133
150
  "luxon": "1.26.0",
134
151
  "moment": "2.29.1",
135
152
  "prettier": "2.5.1",
136
- "react": "17.0.2",
153
+ "react": "16.14.0",
137
154
  "react-bootstrap": "1.6.1",
138
155
  "react-color": "2.19.3",
139
156
  "react-copy-to-clipboard": "5.0.3",
140
157
  "react-date-range": "^1.4.0",
141
- "react-dom": "17.0.2",
158
+ "react-dom": "16.14.0",
142
159
  "react-email-editor": "1.6.1",
143
160
  "react-highlighter": "0.4.3",
144
161
  "react-hook-form": "7.13.0",
145
162
  "react-i18next": "11.8.8",
146
163
  "react-intl": "5.15.8",
147
- "react-konva": "^17.0.2-6",
164
+ "react-konva": "16.13.0-6",
148
165
  "react-loader": "2.4.7",
149
166
  "react-loading-skeleton": "^3.3.1",
150
167
  "react-overlays": "4.1.1",
@@ -169,6 +186,7 @@
169
186
  "sass": "1.32.8",
170
187
  "sass-loader": "10.1.1",
171
188
  "style-loader": "2.0.0",
189
+ "ts-jest": "26.5.2",
172
190
  "twemoji-parser": "14.0.0",
173
191
  "typescript": "4.9.5",
174
192
  "url-loader": "4.1.1",
@@ -176,17 +194,24 @@
176
194
  },
177
195
  "resolutions": {
178
196
  "@types/react": "17.0.2",
179
- "@types/react-dom": "17.0.2"
197
+ "@types/react-dom": "17.0.1"
198
+ },
199
+ "jest": {
200
+ "setupFilesAfterEnv": [
201
+ "./jest.config.js"
202
+ ],
203
+ "snapshotSerializers": [
204
+ "enzyme-to-json/serializer"
205
+ ]
180
206
  },
181
207
  "lint-staged": {
182
208
  "*.{ts,tsx}": [
209
+ "yarn test-staged",
183
210
  "yarn prettier-write",
184
211
  "yarn lint:fix"
185
212
  ]
186
213
  },
187
214
  "devDependencies": {
188
- "@types/react": "17.0.2",
189
- "@types/react-dom": "17.0.2",
190
215
  "identity-obj-proxy": "^3.0.0"
191
216
  },
192
217
  "volta": {
@@ -1,3 +1,3 @@
1
- <svg width="16" height="15" viewBox="0 0 16 15" fill="#979797" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M4 0C3.44772 0 3 0.447715 3 1H1C0.447715 1 0 1.44772 0 2V4H16V2C16 1.44772 15.5523 1 15 1H13C13 0.447715 12.5523 0 12 0C11.4477 0 11 0.447715 11 1H5C5 0.447715 4.55228 0 4 0ZM16 6C16 5.44772 15.5523 5 15 5H1C0.447715 5 0 5.44772 0 6V12C0 13.6569 1.34315 15 3 15H13C14.6569 15 16 13.6569 16 12V6ZM2 7H14V12C14 12.5523 13.5523 13 13 13H3L2.88338 12.9933C2.38604 12.9355 2 12.5128 2 12V7ZM10.5 9C10.2239 9 10 9.22386 10 9.5V11.5C10 11.7761 10.2239 12 10.5 12H12.5C12.7761 12 13 11.7761 13 11.5V9.5C13 9.22386 12.7761 9 12.5 9H10.5Z" />
1
+ <svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4 0C3.44772 0 3 0.447715 3 1H1C0.447715 1 0 1.44772 0 2V4H16V2C16 1.44772 15.5523 1 15 1H13C13 0.447715 12.5523 0 12 0C11.4477 0 11 0.447715 11 1H5C5 0.447715 4.55228 0 4 0ZM16 6C16 5.44772 15.5523 5 15 5H1C0.447715 5 0 5.44772 0 6V12C0 13.6569 1.34315 15 3 15H13C14.6569 15 16 13.6569 16 12V6ZM2 7H14V12C14 12.5523 13.5523 13 13 13H3L2.88338 12.9933C2.38604 12.9355 2 12.5128 2 12V7ZM10.5 9C10.2239 9 10 9.22386 10 9.5V11.5C10 11.7761 10.2239 12 10.5 12H12.5C12.7761 12 13 11.7761 13 11.5V9.5C13 9.22386 12.7761 9 12.5 9H10.5Z" fill="#979797"/>
3
3
  </svg>
@@ -1,3 +1,3 @@
1
- <svg width="18" height="14" viewBox="0 0 18 14" fill="#979797" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M18 2.00002C18 0.89543 17.1046 0 16 0H2C0.89543 0 0 0.89543 0 2L0.000956201 4.35567C0.00105503 4.59911 0.0899525 4.83415 0.250979 5.01672C0.731269 5.56128 1 6.25846 1 7C1 7.74154 0.731269 8.43872 0.250979 8.98328C0.0899525 9.16585 0.00105503 9.4009 0.000956201 9.64433L0 11.9996C0 13.1046 0.89543 14 2 14H16C17.1046 14 18 13.1046 18 12L17.9999 9.64574C17.9999 9.40205 17.9109 9.16675 17.7497 8.98404C17.269 8.43938 17 7.7419 17 7C17 6.2581 17.269 5.56062 17.7497 5.01596C17.9109 4.83325 17.9999 4.59795 17.9999 4.35426L18 2.00002ZM2.07187 4.09764L2 4.002L1.999 2H5C5 2.55228 5.44772 3 6 3C6.55228 3 7 2.55228 7 2H16L15.999 4.002L15.929 4.09646C15.3306 4.93393 15 5.94228 15 7L15.0069 7.26333C15.057 8.22459 15.3805 9.13586 15.929 9.90354L15.999 9.997L16 12H7C7 11.4477 6.55228 11 6 11C5.44772 11 5 11.4477 5 12H2V9.996L2.07187 9.90236C2.66972 9.06511 3 8.05722 3 7C3 5.94278 2.66972 4.93489 2.07187 4.09764ZM6 6C6.55228 6 7 5.55228 7 5C7 4.44772 6.55228 4 6 4C5.44772 4 5 4.44772 5 5C5 5.55228 5.44772 6 6 6ZM7 9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9C5 8.44771 5.44772 8 6 8C6.55228 8 7 8.44771 7 9Z" />
1
+ <svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 2.00002C18 0.89543 17.1046 0 16 0H2C0.89543 0 0 0.89543 0 2L0.000956201 4.35567C0.00105503 4.59911 0.0899525 4.83415 0.250979 5.01672C0.731269 5.56128 1 6.25846 1 7C1 7.74154 0.731269 8.43872 0.250979 8.98328C0.0899525 9.16585 0.00105503 9.4009 0.000956201 9.64433L0 11.9996C0 13.1046 0.89543 14 2 14H16C17.1046 14 18 13.1046 18 12L17.9999 9.64574C17.9999 9.40205 17.9109 9.16675 17.7497 8.98404C17.269 8.43938 17 7.7419 17 7C17 6.2581 17.269 5.56062 17.7497 5.01596C17.9109 4.83325 17.9999 4.59795 17.9999 4.35426L18 2.00002ZM2.07187 4.09764L2 4.002L1.999 2H5C5 2.55228 5.44772 3 6 3C6.55228 3 7 2.55228 7 2H16L15.999 4.002L15.929 4.09646C15.3306 4.93393 15 5.94228 15 7L15.0069 7.26333C15.057 8.22459 15.3805 9.13586 15.929 9.90354L15.999 9.997L16 12H7C7 11.4477 6.55228 11 6 11C5.44772 11 5 11.4477 5 12H2V9.996L2.07187 9.90236C2.66972 9.06511 3 8.05722 3 7C3 5.94278 2.66972 4.93489 2.07187 4.09764ZM6 6C6.55228 6 7 5.55228 7 5C7 4.44772 6.55228 4 6 4C5.44772 4 5 4.44772 5 5C5 5.55228 5.44772 6 6 6ZM7 9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9C5 8.44771 5.44772 8 6 8C6.55228 8 7 8.44771 7 9Z" fill="#979797"/>
3
3
  </svg>
@@ -38,26 +38,3 @@ Default.args = {
38
38
  isDisabled: false,
39
39
  }),
40
40
  };
41
-
42
- export const Loading: Story<CalendarProps> = (args) => {
43
- return (
44
- <div style={{ backgroundColor: "white" }}>
45
- <Calendar {...args} />
46
- </div>
47
- );
48
- };
49
-
50
- Loading.args = {
51
- isLoading: true,
52
- fromPrice: "from £10",
53
- selectedDate: null,
54
- setSelectedDate: () => null,
55
- calendarDates: getMonthCalendarDates(now),
56
- currentDate: now,
57
- getDateTimeButtonProps: () => ({
58
- resources: [],
59
- showResources: false,
60
- shouldCalculateResources: false,
61
- isDisabled: false,
62
- }),
63
- };
@@ -3,7 +3,6 @@ import { DateTime } from "luxon";
3
3
  import { DateTimeButtonProps } from "src/date-time-button";
4
4
  import { CalendarButtons } from "./components/CalendarButtons";
5
5
  import { CalendarDates } from "./components/CalendarDates";
6
- import { LoaderIndicator } from "../static";
7
6
 
8
7
  export const defaultStartDay = DateTime.now().set({
9
8
  millisecond: 0,
@@ -29,14 +28,15 @@ export type CalendarProps = {
29
28
  >;
30
29
  };
31
30
 
32
- export const Calendar = (props: CalendarProps) => {
33
- const { initialDate = defaultStartDay, isLoading } = props;
31
+ export const Calendar = ({
32
+ initialDate = defaultStartDay,
33
+ ...props
34
+ }: CalendarProps) => {
34
35
  return (
35
36
  <div className="calendar-wrapper">
36
37
  <div className="calendar">
37
38
  <CalendarButtons initialDate={initialDate} {...props} />
38
-
39
- {isLoading ? <LoaderIndicator /> : <CalendarDates {...props} />}
39
+ <CalendarDates {...props} />
40
40
  </div>
41
41
  </div>
42
42
  );
@@ -6,6 +6,7 @@ import { CalendarProps } from "../../Calendar";
6
6
 
7
7
  export type CalendarDatesProps = Pick<
8
8
  CalendarProps,
9
+ | "isLoading"
9
10
  | "calendarDates"
10
11
  | "selectedDate"
11
12
  | "setSelectedDate"
@@ -14,6 +15,7 @@ export type CalendarDatesProps = Pick<
14
15
  >;
15
16
 
16
17
  export const CalendarDates = ({
18
+ isLoading = false,
17
19
  calendarDates,
18
20
  selectedDate,
19
21
  setSelectedDate,
@@ -46,9 +48,12 @@ export const CalendarDates = ({
46
48
 
47
49
  const props = getDateTimeButtonProps(date);
48
50
 
51
+ const isDisabled = isLoading || props.isDisabled;
52
+
49
53
  return (
50
54
  <DateTimeButton
51
55
  key={+date}
56
+ isDisabled={isDisabled}
52
57
  isSelected={
53
58
  selectedDate ? date.hasSame(selectedDate, "day") : undefined
54
59
  }
@@ -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