@licklist/design 0.58.6-dev.10 → 0.58.6-dev.2

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 (93) hide show
  1. package/dist/assets/iframe/calendar.svg +2 -2
  2. package/dist/assets/iframe/calendar.svg.js +1 -1
  3. package/dist/assets/iframe/ticket.svg +2 -2
  4. package/dist/assets/iframe/ticket.svg.js +1 -1
  5. package/dist/calendar/Calendar.d.ts +1 -1
  6. package/dist/calendar/Calendar.d.ts.map +1 -1
  7. package/dist/calendar/Calendar.js +1 -1
  8. package/dist/calendar/components/CalendarButtons/CalendarButtons.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/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
  13. package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
  14. package/dist/iframe/event/event-venue-map/IframeEventVenueMap.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/CalendarStepsForm/CalendarStepsForm.js +1 -1
  30. package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
  31. package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
  32. package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
  33. package/dist/iframe/page/components/PageBody/constants.js +1 -1
  34. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  35. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
  36. package/dist/iframe/payment/order-items-table/OrderItemsTable.js +1 -1
  37. package/dist/iframe/payment/payment-form/PaymentForm.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/payment/payment-page/PaymentTimer.js +1 -1
  41. package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +1 -1
  42. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  43. package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
  44. package/dist/index.js +1 -1
  45. package/dist/product-set/form/VenueMapsControl.js +1 -1
  46. package/dist/product-set/product/ProductControl.d.ts +0 -1
  47. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  48. package/dist/product-set/product/ProductControl.js +1 -1
  49. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  50. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  51. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  52. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  53. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  54. package/dist/sales/booking/results/components/ResultCard.js +1 -1
  55. package/dist/sales/notes/NotesTableRow.js +1 -1
  56. package/dist/setting/dashboard/snippets/card/SnippetCard.js +1 -1
  57. package/dist/snippet/snippet-template/control/PropertyControl.d.ts +1 -3
  58. package/dist/snippet/snippet-template/control/PropertyControl.d.ts.map +1 -1
  59. package/dist/snippet/snippet-template/control/PropertyControl.js +1 -1
  60. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  61. package/dist/striped-static-table/StripedStaticTable.js +1 -1
  62. package/dist/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
  63. package/dist/styles/iframe-page/PageBody.scss +1 -2
  64. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  65. package/dist/venue-map-sets/form/components/VenueMapImageControl.js +1 -1
  66. package/package.json +5 -3
  67. package/src/assets/iframe/calendar.svg +2 -2
  68. package/src/assets/iframe/ticket.svg +2 -2
  69. package/src/calendar/Calendar.stories.tsx +0 -23
  70. package/src/calendar/Calendar.tsx +5 -5
  71. package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
  72. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +0 -9
  73. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +7 -58
  74. package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +0 -8
  75. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
  76. package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +10 -63
  77. package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -4
  78. package/src/iframe/page/components/PageBody/constants.ts +0 -2
  79. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +0 -10
  80. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +6 -546
  81. package/src/iframe/payment/payment-page/PaymentPage.tsx +29 -38
  82. package/src/iframe/ryft/RyftPaymentForm.tsx +5 -11
  83. package/src/product-set/product/ProductControl.tsx +3 -17
  84. package/src/product-set/product-category/ProductCategoryControl.tsx +43 -105
  85. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
  86. package/src/snippet/snippet-template/control/PropertyControl.tsx +2 -6
  87. package/src/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
  88. package/src/styles/iframe-page/PageBody.scss +1 -2
  89. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  90. package/dist/iframe/ryft/utils/ryft-form.d.ts +0 -5
  91. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +0 -1
  92. package/dist/iframe/ryft/utils/ryft-form.js +0 -1
  93. package/src/iframe/ryft/utils/ryft-form.ts +0 -47
@@ -46,8 +46,9 @@
46
46
  color: $snippet-page-header-steps-body-color;
47
47
  transition: $color-transition;
48
48
  margin-left: 0.5rem;
49
+ width: 6rem;
49
50
  word-break: break-word;
50
- font-size: 0.875rem;
51
+ font-size: 0.75rem;
51
52
 
52
53
  @include media-breakpoint-down(sm) {
53
54
  display: none;
@@ -61,31 +62,6 @@
61
62
  font-weight: 400;
62
63
  font-size: 0.875rem;
63
64
 
64
- .payment-page-toggle {
65
- p {
66
- font-size: 1rem;
67
- font-weight: 600;
68
- }
69
- .price {
70
- font-weight: 700;
71
- }
72
- }
73
-
74
- .payment-metadata {
75
- font-weight: 500;
76
- }
77
-
78
- .total {
79
- display: flex;
80
- justify-content: space-between;
81
- align-items: center;
82
-
83
- div {
84
- font-size: 1rem;
85
- font-weight: 700;
86
- }
87
- }
88
-
89
65
  b {
90
66
  display: block;
91
67
  font-size: 1rem;
@@ -137,15 +113,6 @@
137
113
 
138
114
  .cart-items {
139
115
  font-weight: 400;
140
- margin-bottom: 1.4rem;
141
- border-bottom: 2px solid $separator-color;
142
-
143
- .people {
144
- margin-bottom: 0;
145
- p {
146
- margin-bottom: 0;
147
- }
148
- }
149
116
 
150
117
  .empty-cart {
151
118
  margin: 1rem 0;
@@ -158,11 +125,8 @@
158
125
  }
159
126
 
160
127
  .products-by-menu-step {
161
- margin-top: 1.4rem;
162
- font-size: 0.875rem;
163
128
  .title {
164
- font-size: 1rem;
165
- font-weight: 600;
129
+ font-weight: 500;
166
130
  }
167
131
 
168
132
  .categories {
@@ -172,8 +136,8 @@
172
136
  }
173
137
 
174
138
  .products {
175
- margin-top: 1.4rem;
176
- font-size: 0.875rem;
139
+ margin-top: 0.5rem;
140
+
177
141
  .product {
178
142
  margin: 0.5rem 0;
179
143
 
@@ -184,15 +148,6 @@
184
148
  margin-bottom: 0.5rem;
185
149
  }
186
150
  }
187
-
188
- .name {
189
- font-weight: 600;
190
- }
191
-
192
- .price {
193
- font-weight: 400;
194
- font-size: 0.875rem;
195
- }
196
151
  }
197
152
 
198
153
  &:not(:last-child) {
@@ -213,12 +168,6 @@
213
168
  margin: 0 0 0.5rem;
214
169
 
215
170
  .title {
216
- font-size: 1rem;
217
- font-weight: 600;
218
- }
219
-
220
- .metadata {
221
- font-size: 0.95rem;
222
171
  font-weight: 600;
223
172
  }
224
173
  }
@@ -232,7 +181,19 @@
232
181
  }
233
182
 
234
183
  hr {
235
- margin-bottom: 1.5rem;
184
+ margin: 0;
185
+ border-width: 2px;
186
+ border-color: $separator-color;
187
+ }
188
+
189
+ .products {
190
+ font-size: 0.75rem;
191
+
192
+ .product {
193
+ .name {
194
+ font-weight: 500;
195
+ }
196
+ }
236
197
  }
237
198
  }
238
199
 
@@ -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;
@@ -78,7 +77,7 @@
78
77
  }
79
78
 
80
79
  .right-block {
81
- height: 100%;
80
+ height: calc(100% - 1rem);
82
81
  max-width: 17.5rem;
83
82
  min-width: 17.5rem;
84
83
  width: 100%;
@@ -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
- }
@@ -1 +1 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var a=require("tslib"),n=require("react"),t=e(n),l=require("react-i18next"),i=require("react-bootstrap"),o=require("react-hook-form"),r=e(require("@licklist/plugins/dist/services/Form/HookFormService")),s=require("lodash"),u=require("@licklist/plugins/dist/hooks/Media/useImages"),c=require("@licklist/core/dist/DataMapper/Media/ImageDataMapper"),d=require("../../../file-upload/FileUpload.js"),m=require("../../../events/event-venue-map/EventVenueMap.js"),g=require("../../../modals/fullscreen/FullscreenModal.js");exports.VenueMapImageControl=function(e){var p,v=e.index,f=l.useTranslation("Design").t,M=o.useFormContext(),E=M.watch,I=M.setValue,b=M.formState.errors,F=M.clearErrors,q=E("venueMaps.".concat(v)),h=u.useImages(null),_=h.images,k=h.handleImageRemove,C=h.handleImageUploading,j=h.isLoading,U=h.setImages,w=n.useCallback((function(e){return a.__awaiter(void 0,void 0,void 0,(function(){var n;return a.__generator(this,(function(a){switch(a.label){case 0:return[4,C(e,c.IMAGE_TYPE_IMAGE)];case 1:return(n=a.sent())?(I("venueMaps.".concat(v,".localImageBlobURL"),n[0]),[2]):[2]}}))}))}),[C]),x=n.useCallback((function(e,a){k(e,a),I("venueMaps.".concat(v,".localImageBlobURL"),void 0)}),[k]),L=n.useCallback((function(e){I("venueMaps.".concat(v,".points"),e)}),[]);n.useEffect((function(){q&&q.image&&U([a.__assign(a.__assign({},q.image),{url:q.image.url||(null==q?void 0:q.localImageBlobURL)})])}),[null==q?void 0:q.image]),n.useEffect((function(){s.isEqual(_[0],null==q?void 0:q.image)||(I("venueMaps.".concat(v,".image"),_[0]||null),_[0]&&F("venueMaps.".concat(v,".image")))}),[_]);var R=(null===(p=null==q?void 0:q.image)||void 0===p?void 0:p.url)||(null==q?void 0:q.localImageBlobURL);return t.createElement(i.Col,{sm:"6",md:"6"},t.createElement(i.Form.Group,{controlId:"name"},t.createElement(i.Form.Control,{isInvalid:r.isInvalid("venueMaps.".concat(v,".image"),b),hidden:!0}),t.createElement(d.FileUpload,{onFilesChange:w,allowedExtensions:["jpeg","jpg","png"],subTitle:".jpeg .jpg .png",enablePreview:!0,onFileRemove:x,defaultFiles:_,isLoading:j,withIcon:!0,title:f("Design:addImage")}),t.createElement(i.Form.Control.Feedback,{type:"invalid"},r.getErrors("venueMaps.".concat(v,".image"),b))),!!R&&t.createElement(g.FullscreenModal,{content:t.createElement(t.Fragment,null,t.createElement(m.EventVenueMap,{url:R,name:null==q?void 0:q.name,points:null==q?void 0:q.points,onPointsChange:L,editMode:!0}))},(function(e){return t.createElement(i.Button,{onClick:e,className:"pt-3"},f("addPoints"))})))};
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var a=require("tslib"),n=require("react"),t=e(n),l=require("react-i18next"),i=require("react-bootstrap"),o=require("react-hook-form"),r=e(require("@licklist/plugins/dist/services/Form/HookFormService")),s=require("lodash"),u=require("@licklist/plugins/dist/hooks/Media/useImages"),c=require("@licklist/core/dist/DataMapper/Media/ImageDataMapper"),d=require("../../../file-upload/FileUpload.js"),m=require("../../../modals/fullscreen/FullscreenModal.js"),g=require("../../../events/event-venue-map/EventVenueMap.js");exports.VenueMapImageControl=function(e){var p,v=e.index,f=l.useTranslation("Design").t,M=o.useFormContext(),E=M.watch,I=M.setValue,b=M.formState.errors,F=M.clearErrors,q=E("venueMaps.".concat(v)),h=u.useImages(null),_=h.images,k=h.handleImageRemove,C=h.handleImageUploading,j=h.isLoading,U=h.setImages,w=n.useCallback((function(e){return a.__awaiter(void 0,void 0,void 0,(function(){var n;return a.__generator(this,(function(a){switch(a.label){case 0:return[4,C(e,c.IMAGE_TYPE_IMAGE)];case 1:return(n=a.sent())?(I("venueMaps.".concat(v,".localImageBlobURL"),n[0]),[2]):[2]}}))}))}),[C]),x=n.useCallback((function(e,a){k(e,a),I("venueMaps.".concat(v,".localImageBlobURL"),void 0)}),[k]),L=n.useCallback((function(e){I("venueMaps.".concat(v,".points"),e)}),[]);n.useEffect((function(){q&&q.image&&U([a.__assign(a.__assign({},q.image),{url:q.image.url||(null==q?void 0:q.localImageBlobURL)})])}),[null==q?void 0:q.image]),n.useEffect((function(){s.isEqual(_[0],null==q?void 0:q.image)||(I("venueMaps.".concat(v,".image"),_[0]||null),_[0]&&F("venueMaps.".concat(v,".image")))}),[_]);var R=(null===(p=null==q?void 0:q.image)||void 0===p?void 0:p.url)||(null==q?void 0:q.localImageBlobURL);return t.createElement(i.Col,{sm:"6",md:"6"},t.createElement(i.Form.Group,{controlId:"name"},t.createElement(i.Form.Control,{isInvalid:r.isInvalid("venueMaps.".concat(v,".image"),b),hidden:!0}),t.createElement(d.FileUpload,{onFilesChange:w,allowedExtensions:["jpeg","jpg","png"],subTitle:".jpeg .jpg .png",enablePreview:!0,onFileRemove:x,defaultFiles:_,isLoading:j,withIcon:!0,title:f("Design:addImage")}),t.createElement(i.Form.Control.Feedback,{type:"invalid"},r.getErrors("venueMaps.".concat(v,".image"),b))),!!R&&t.createElement(m.FullscreenModal,{content:t.createElement(t.Fragment,null,t.createElement(g.EventVenueMap,{url:R,name:null==q?void 0:q.name,points:null==q?void 0:q.points,onPointsChange:L,editMode:!0}))},(function(e){return t.createElement(i.Button,{onClick:e,className:"pt-3"},f("addPoints"))})))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.58.6-dev.10",
3
+ "version": "0.58.6-dev.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -50,7 +50,7 @@
50
50
  "@fortawesome/free-brands-svg-icons": "5.15.2",
51
51
  "@fortawesome/free-solid-svg-icons": "5.15.2",
52
52
  "@fortawesome/react-fontawesome": "0.1.9",
53
- "@licklist/core": ">=0.23.1-dev.4 < 0.23.1",
53
+ "@licklist/core": ">=0.23.1-dev.3 < 0.23.1",
54
54
  "@licklist/eslint-config": "0.4.5",
55
55
  "@licklist/plugins": ">=0.27.2-dev.0 < 0.27.2",
56
56
  "@mdx-js/react": "1.6.22",
@@ -116,6 +116,7 @@
116
116
  "emojibase": "6.1.0",
117
117
  "emojibase-data": "7.0.1",
118
118
  "emojibase-regex": "6.0.1",
119
+ "enzyme": "3.11.0",
119
120
  "eslint": "7.32.0",
120
121
  "eslint-config-airbnb": "18.2.1",
121
122
  "eslint-config-prettier": "8.3.0",
@@ -144,7 +145,7 @@
144
145
  "react-hook-form": "7.13.0",
145
146
  "react-i18next": "11.8.8",
146
147
  "react-intl": "5.15.8",
147
- "react-konva": "^17.0.2-6",
148
+ "react-konva": "16.13.0-6",
148
149
  "react-loader": "2.4.7",
149
150
  "react-loading-skeleton": "^3.3.1",
150
151
  "react-overlays": "4.1.1",
@@ -187,6 +188,7 @@
187
188
  "devDependencies": {
188
189
  "@types/react": "17.0.2",
189
190
  "@types/react-dom": "17.0.2",
191
+ "@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
190
192
  "identity-obj-proxy": "^3.0.0"
191
193
  },
192
194
  "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
  }
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import { Meta } from "@storybook/react";
3
3
  import { BookingSummary } from "./BookingSummary";
4
- import { SummaryTotalBlock } from "./components/SummaryTotal";
5
4
 
6
5
  export default {
7
6
  title: "Iframe/Order-Process/BookingSummary",
@@ -139,14 +138,6 @@ export function Default() {
139
138
  <div className="payment-process">
140
139
  <div className="col-lg-4">
141
140
  <BookingSummary
142
- isPaymentPage
143
- eventName="new Event"
144
- footer={
145
- <div className="d-flex flex-column justify-content-between">
146
- <SummaryTotalBlock label={"Total"} amount={2} />
147
- <SummaryTotalBlock label={"Total with discount"} amount={1} />
148
- </div>
149
- }
150
141
  date="29 Sept 2022 at 09:00"
151
142
  menuSteps={menuSteps as any}
152
143
  peopleAmount={5}
@@ -8,8 +8,6 @@ import { ProductsByMenuStep } from "./components/ProductsByMenuStep";
8
8
  import { BookingSummaryProps } from "./types";
9
9
  import { SummaryTotal } from "./components/SummaryTotal";
10
10
  import { BookingSummaryAccordion } from "./components/BookingSummaryAccordion";
11
- import { ReactComponent as TicketIcon } from "../../../../assets/iframe/ticket.svg";
12
- import { ReactComponent as CalendarIcon } from "../../../../assets/iframe/calendar.svg";
13
11
 
14
12
  export const BookingSummary = ({
15
13
  date,
@@ -24,10 +22,6 @@ export const BookingSummary = ({
24
22
  hasPeopleInput,
25
23
  isPaymentLink,
26
24
  peopleAmount,
27
- footer,
28
- headerComponent,
29
- // TODO Remove this, when all iframe pages will be ready
30
- isPaymentPage,
31
25
  }: Omit<BookingSummaryProps, "totallWithDiscount">) => {
32
26
  const { t } = useTranslation("Design");
33
27
  const { formatNumber } = useIntl();
@@ -42,18 +36,11 @@ export const BookingSummary = ({
42
36
 
43
37
  return (
44
38
  <div className="payment-booking-summary">
45
- <BookingSummaryAccordion
46
- isPaymentPage={isPaymentPage}
47
- hasPeopleInput={hasPeopleInput}
48
- headerComponent={headerComponent}
49
- >
39
+ <BookingSummaryAccordion hasPeopleInput={hasPeopleInput}>
50
40
  <div className="event-info">
51
- <EventInfo
52
- eventName={eventName}
53
- isPaymentPage={isPaymentPage}
54
- date={date}
55
- time={time}
56
- />
41
+ <p className="m-0 title event-name">{eventName}</p>
42
+ <p className="m-0">{date}</p>
43
+ {time && <p className="m-0">{time}</p>}
57
44
  </div>
58
45
  <hr />
59
46
 
@@ -75,8 +62,8 @@ export const BookingSummary = ({
75
62
  {!shouldHidePeopleAmount && peopleAmount > 0 && (
76
63
  <>
77
64
  <hr />
78
- <div className="d-flex justify-content-between mt-3 people">
79
- <p className="m-0 payment-metadata">{t("people")}:</p>
65
+ <div className="d-flex justify-content-between mt-3">
66
+ <p className="m-0">{t("people")}:</p>
80
67
  <p className="price">{peopleAmount}</p>
81
68
  </div>
82
69
  </>
@@ -86,9 +73,7 @@ export const BookingSummary = ({
86
73
  <>
87
74
  <hr />
88
75
  <div className="d-flex justify-content-between mt-3">
89
- <p className="m-0 payment-metadata">
90
- {t("transactionFee")}:
91
- </p>
76
+ <p className="m-0">{t("transactionFee")}:</p>
92
77
  <p className="price">
93
78
  {formatNumber(transactionFee, {
94
79
  style: "currency",
@@ -99,7 +84,6 @@ export const BookingSummary = ({
99
84
  </>
100
85
  )}
101
86
  </div>
102
- {footer}
103
87
  </div>
104
88
  ) : (
105
89
  <div className="cart-items">
@@ -113,38 +97,3 @@ export const BookingSummary = ({
113
97
 
114
98
  BookingSummary.SummaryTotal = SummaryTotal;
115
99
  BookingSummary.Accordion = BookingSummaryAccordion;
116
-
117
- const EventInfo = ({
118
- isPaymentPage,
119
- eventName,
120
- date,
121
- time,
122
- }: Pick<
123
- BookingSummaryProps,
124
- "date" | "time" | "eventName" | "isPaymentPage"
125
- >) => {
126
- if (isPaymentPage) {
127
- return (
128
- <>
129
- <div className="d-flex align-items-center mb-5">
130
- <TicketIcon height={16} width={20} fill="black" />
131
- <div className="m-0 pl-2 title event-name metadata">{eventName}</div>
132
- </div>
133
-
134
- <div className="d-flex align-items-center mb-5">
135
- <CalendarIcon height={16} width={20} fill="black" />
136
- <div className="m-0 pl-2 metadata">{date}</div>
137
- </div>
138
- {time && <div className="mb-5 metadata">{time}</div>}
139
- </>
140
- );
141
- }
142
-
143
- return (
144
- <>
145
- <p className="m-0 title event-name">{eventName}</p>
146
- <p className="m-0">{date}</p>
147
- {time && <p className="m-0">{time}</p>}
148
- </>
149
- );
150
- };
@@ -3,7 +3,6 @@ import React, {
3
3
  useCallback,
4
4
  PropsWithChildren,
5
5
  useEffect,
6
- ReactElement,
7
6
  } from "react";
8
7
  import { Accordion } from "react-bootstrap";
9
8
  import { useWindowDimensions } from "@licklist/plugins/dist/hooks/Media/useWindowDimensions";
@@ -21,9 +20,6 @@ export type BookingSummaryAccordionProps = PropsWithChildren<{
21
20
  title?: string;
22
21
  showTitleOnlyOnMobile?: boolean;
23
22
  hasPeopleInput?: boolean;
24
- // TODO Remove this, when all iframe pages will be ready
25
- isPaymentPage?: boolean;
26
- headerComponent?: ReactElement;
27
23
  }>;
28
24
 
29
25
  export const BookingSummaryAccordion = ({
@@ -31,8 +27,6 @@ export const BookingSummaryAccordion = ({
31
27
  title,
32
28
  showTitleOnlyOnMobile = false,
33
29
  hasPeopleInput,
34
- isPaymentPage,
35
- headerComponent,
36
30
  }: BookingSummaryAccordionProps) => {
37
31
  const { width } = useWindowDimensions();
38
32
  const [isExpanded, setIsExpanded] = useState(width <= MOBILE_WIDTH);
@@ -74,12 +68,10 @@ export const BookingSummaryAccordion = ({
74
68
  return (
75
69
  <Accordion defaultActiveKey={ACCORDION_KEY} onSelect={onSelect}>
76
70
  <ToggleHeader
77
- isPaymentPage={isPaymentPage}
78
71
  showExpandButton={showExpandButton}
79
72
  isExpanded={isExpanded}
80
73
  title={title}
81
74
  hideComponent={!showToggleHeader}
82
- headerComponent={headerComponent}
83
75
  />
84
76
  <Accordion.Collapse
85
77
  eventKey={ACCORDION_KEY}
@@ -3,7 +3,7 @@ import { useIntl } from "react-intl";
3
3
  import * as Config from "@licklist/core/dist/Config";
4
4
 
5
5
  export type SummaryTotalBlockProps = {
6
- label?: string;
6
+ label: string;
7
7
  amount: number;
8
8
  };
9
9
 
@@ -15,13 +15,13 @@ export const SummaryTotalBlock = ({
15
15
 
16
16
  return (
17
17
  <div className="total">
18
- {label && <div>{label}</div>}
19
- <div className="m-0 price">
18
+ <p className="m-0">{label}</p>
19
+ <p className="m-0 price">
20
20
  {formatNumber(amount, {
21
21
  style: "currency",
22
22
  currency: Config.Currency.GBP,
23
23
  })}
24
- </div>
24
+ </p>
25
25
  </div>
26
26
  );
27
27
  };