@licklist/design 0.62.3 → 0.63.0-dev.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.
- package/bitbucket-pipelines.yml +0 -8
- package/dist/date-time-button/DateTimeButton.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +3 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +3 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +3 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +1 -5
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +4 -3
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/utils.d.ts +5 -0
- package/dist/product-set/control/utils.d.ts.map +1 -0
- package/dist/product-set/control/utils.js +1 -0
- package/dist/product-set/form/ProductSetForm.d.ts +4 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +3 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/recurring-date-picker-input/utils.d.ts +12 -0
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/sales/coupon/control/CouponFormControl.d.ts +2 -1
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +1 -1
- package/dist/sales/coupon/form/CouponFrom.d.ts +2 -2
- package/dist/sales/coupon/form/CouponFrom.d.ts.map +1 -1
- package/dist/sales/coupon/utils/index.d.ts +7 -0
- package/dist/sales/coupon/utils/index.d.ts.map +1 -0
- package/dist/sales/coupon/utils/index.js +1 -0
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts +1 -0
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -1
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +99 -113
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +2 -1
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +1 -1
- package/dist/zone/form/ZoneForm.d.ts +2 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +1 -1
- package/dist/zone/form/components/AvailableTimesControl.d.ts +0 -2
- package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.d.ts +2 -2
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -4
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/package.json +10 -35
- package/src/date-time-button/DateTimeButton.stories.tsx +2 -1
- package/src/date-time-button/DateTimeButton.tsx +7 -5
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +4 -0
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +10 -8
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +4 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/iframe/ryft/RyftPaymentForm.tsx +12 -4
- package/src/iframe/ryft/utils/ryft-form.ts +8 -4
- package/src/product-set/control/DateAndRecurrenceInput.tsx +48 -14
- package/src/product-set/control/DateInput.tsx +2 -4
- package/src/product-set/control/ProductSetControl.stories.tsx +1 -1
- package/src/product-set/control/ProductSetControl.tsx +5 -8
- package/src/product-set/control/utils.ts +25 -0
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.stories.tsx +1 -2
- package/src/product-set/form/ProductSetForm.tsx +5 -1
- package/src/product-set/hooks/useSortableTreeFunctions.ts +2 -0
- package/src/product-set/product/ProductControl.tsx +38 -38
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +0 -2
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +0 -1
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +11 -1
- package/src/recurring-date-picker-input/utils.ts +77 -0
- package/src/sales/booking/results/BookingResults.stories.tsx +3 -2
- package/src/sales/booking/results/components/ResultCard.tsx +2 -5
- package/src/sales/coupon/control/CouponFormControl.tsx +28 -51
- package/src/sales/coupon/form/CouponFrom.tsx +5 -15
- package/src/sales/coupon/utils/index.ts +13 -0
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/dashboard/DashboardSettingForm.tsx +13 -0
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +99 -113
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +16 -3
- package/src/zone/form/ZoneForm.tsx +3 -2
- package/src/zone/form/components/AvailableTimesControl.tsx +0 -2
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +7 -5
- package/src/zone/form/utils/dates.ts +9 -10
- package/jest.config.js +0 -29
- package/tests/Auth/Authorizer.test.tsx +0 -194
- package/tests/Auth/Layout/UserNavDropDown.test.tsx +0 -43
- package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +0 -33
- package/tests/Auth/Login/LoginComponent.test.tsx +0 -246
- package/tests/Auth/Login/LoginFormComponent.test.tsx +0 -182
- package/tests/Auth/Register/RegisterComponent.test.tsx +0 -285
- package/tests/Auth/Register/RegisterFormComponent.test.tsx +0 -170
- package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +0 -130
- package/tests/Auth/Social/SocialCallbackComponent.test.tsx +0 -133
- package/tests/Auth/Social/SocialFormComponent.test.tsx +0 -118
- package/tests/FileUpload/FileUpload.test.tsx +0 -42
- package/tests/Notification/EmailTemplate.test.tsx +0 -82
- package/tests/ProductSet/ProductSetPopover.test.tsx +0 -40
- package/tests/Report/Report.test.tsx +0 -48
- package/tests/Sales/Coupon.test.tsx +0 -51
- package/tests/Sales/SalesAndVIews.test.tsx +0 -63
- package/tests/SnippetTemplates/SnippetTemplates.test.tsx +0 -56
- package/tests/Table/FilterHelperComponent.test.tsx +0 -88
- package/tests/Table/PaginationHelperComponent.test.tsx +0 -109
- package/tests/Table/PerPageHelperComponent.test.tsx +0 -34
- package/tests/Table/TableHelperComponent.test.tsx +0 -295
- package/tests/TipTapEditor/TipTapEditor.test.tsx +0 -28
- package/tests/__mock__/hooks/useAuthApi.ts +0 -13
- package/tests/__mock__/hooks/useAuthMock.ts +0 -13
- package/tests/__mock__/hooks/useFormMock.ts +0 -27
- package/tests/__mock__/hooks/useNotificationMock.ts +0 -13
- package/tests/__mock__/hooks/useQueryMock.ts +0 -16
- package/tests/__mock__/hooks/useSocialApiMock.ts +0 -20
- package/tests/__mock__/hooks/useTranslationMock.ts +0 -17
- package/tests/__mock__/hooks/useUserApiMock.ts +0 -18
- package/tests/__mock__/hooks/useUserMock.ts +0 -13
- package/tests/__mock__/styleMock.js +0 -1
- package/tests/__mock__/windowMock.ts +0 -5
- package/tests/packages/react-query.tsx +0 -28
- package/tests/setupTests.ts +0 -10
|
@@ -47,141 +47,127 @@
|
|
|
47
47
|
margin-left: 0.5rem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.ryft-payment-form {
|
|
51
|
-
.submit-button-wrapper {
|
|
52
|
-
margin: -1rem 0 1rem;
|
|
53
|
-
|
|
54
|
-
button {
|
|
55
|
-
width: 100%;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
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
|
-
|
|
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
50
|
.form {
|
|
101
51
|
.input {
|
|
102
52
|
border: 2px solid #525252 !important;
|
|
103
53
|
}
|
|
104
54
|
}
|
|
105
55
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
114
|
-
.ryft-pay-grid {
|
|
115
|
-
width: 100%;
|
|
116
|
-
max-width: 15.5rem;
|
|
117
|
-
margin-bottom: 1rem;
|
|
56
|
+
@include media-breakpoint-down(sm) {
|
|
57
|
+
.left-block-container {
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
overflow: visible;
|
|
118
60
|
}
|
|
119
|
-
.ryft-pay-apple-pay-button {
|
|
120
|
-
border-radius: 0.25rem;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.divider {
|
|
125
|
-
display: none !important;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
@include media-breakpoint-down(sm) {
|
|
129
|
-
.left-block-container {
|
|
130
|
-
max-height: 100%;
|
|
131
|
-
overflow: visible;
|
|
132
61
|
}
|
|
133
62
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@include media-breakpoint-down(sm) {
|
|
137
|
-
flex-direction: column-reverse;
|
|
138
|
-
overflow: scroll;
|
|
139
63
|
|
|
140
64
|
@include media-breakpoint-down(sm) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
65
|
+
flex-direction: column-reverse;
|
|
66
|
+
overflow: scroll;
|
|
67
|
+
|
|
68
|
+
@include media-breakpoint-down(sm) {
|
|
69
|
+
.left-block {
|
|
70
|
+
min-height: 100%;
|
|
71
|
+
}
|
|
72
|
+
.right-block {
|
|
73
|
+
margin: 0 auto;
|
|
74
|
+
width: 100%;
|
|
75
|
+
.children-wrapper {
|
|
76
|
+
.accordion {
|
|
77
|
+
.collapse {
|
|
78
|
+
overflow: visible;
|
|
79
|
+
overflow-x: unset;
|
|
80
|
+
scrollbar-width: unset;
|
|
81
|
+
}
|
|
153
82
|
}
|
|
154
83
|
}
|
|
155
84
|
}
|
|
156
85
|
}
|
|
157
86
|
}
|
|
158
87
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
88
|
+
::-webkit-scrollbar {
|
|
89
|
+
display: none;
|
|
90
|
+
scrollbar-width: none;
|
|
91
|
+
}
|
|
163
92
|
}
|
|
164
93
|
}
|
|
165
94
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
max-width: 100%;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
95
|
+
#ryft-threeDSMethodIframe {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ryft-payment-form {
|
|
100
|
+
.submit-button-wrapper {
|
|
101
|
+
margin: -1rem 0 1rem;
|
|
102
|
+
|
|
103
|
+
button {
|
|
104
|
+
width: 100%;
|
|
181
105
|
}
|
|
182
106
|
}
|
|
107
|
+
#mobile-pay-divider-container {
|
|
108
|
+
display: flex;
|
|
109
|
+
position: relative;
|
|
110
|
+
margin-bottom: 1rem;
|
|
111
|
+
#mobile-pay-divider-text {
|
|
112
|
+
margin-right: 1rem;
|
|
113
|
+
font-size: 0.875rem;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
}
|
|
116
|
+
#mobile-pay-divider {
|
|
117
|
+
width: 100%;
|
|
118
|
+
border-bottom: 1px #dfdfdf solid;
|
|
119
|
+
margin-bottom: 0.6rem;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
#card-title-container {
|
|
124
|
+
height: auto;
|
|
125
|
+
border: none;
|
|
126
|
+
margin-bottom: 0.5rem;
|
|
127
|
+
text-align: left;
|
|
128
|
+
:first-child {
|
|
129
|
+
font-size: 1rem;
|
|
130
|
+
font-weight: 600;
|
|
131
|
+
margin-bottom: 1rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.form-label {
|
|
135
|
+
margin-bottom: 0.5rem;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
.mobile-pay-title {
|
|
139
|
+
display: block;
|
|
140
|
+
font-weight: 600;
|
|
141
|
+
font-size: 1rem;
|
|
142
|
+
color: black;
|
|
143
|
+
padding: 0;
|
|
144
|
+
font-style: normal;
|
|
145
|
+
font-family: inherit;
|
|
146
|
+
margin-bottom: 1rem;
|
|
147
|
+
}
|
|
183
148
|
}
|
|
184
149
|
|
|
185
|
-
|
|
186
|
-
|
|
150
|
+
@include media-breakpoint-up(md) {
|
|
151
|
+
.ryft-payment-form,
|
|
152
|
+
.iframe-payment-form {
|
|
153
|
+
position: relative;
|
|
154
|
+
max-height: 300px !important;
|
|
155
|
+
.submit-button-wrapper {
|
|
156
|
+
max-width: 15.5rem;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
161
|
+
.ryft-pay-grid {
|
|
162
|
+
width: 100%;
|
|
163
|
+
max-width: 15.5rem;
|
|
164
|
+
margin-bottom: 1rem;
|
|
165
|
+
}
|
|
166
|
+
.ryft-pay-apple-pay-button {
|
|
167
|
+
border-radius: 0.25rem;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.divider {
|
|
171
|
+
display: none !important;
|
|
172
|
+
}
|
|
187
173
|
}
|
|
@@ -12,7 +12,8 @@ export interface TypeaheadProps {
|
|
|
12
12
|
isMultipleChoise?: boolean;
|
|
13
13
|
noOptionsMessage: string;
|
|
14
14
|
isInvalid?: boolean;
|
|
15
|
+
isCouponForm?: boolean;
|
|
15
16
|
}
|
|
16
|
-
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name, noOptionsMessage, isInvalid, }: TypeaheadProps): JSX.Element;
|
|
17
|
+
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name, isCouponForm, noOptionsMessage, isInvalid, }: TypeaheadProps): JSX.Element;
|
|
17
18
|
export { Typeahead };
|
|
18
19
|
//# sourceMappingURL=Typeahead.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,WAAW,EACX,UAAkB,EAClB,gBAAgB,EAChB,IAAS,EACT,YAAoB,EACpB,gBAAqB,EACrB,SAAS,GACV,EAAE,cAAc,eA4ChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -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 r=require("tslib"),n=e(require("react")),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),n=e(require("react")),o=require("react-hook-form"),t=e(require("react-select"));exports.Typeahead=function(e){var i=e.options,s=e.placeholder,a=e.isRequired,l=void 0!==a&&a,u=e.isMultipleChoise,c=e.name,d=void 0===c?"":c,p=e.isCouponForm,m=void 0!==p&&p,f=e.noOptionsMessage,v=void 0===f?"":f,g=e.isInvalid,_=o.useFormContext().control;return n.createElement(n.Fragment,null,n.createElement(o.Controller,{name:d,control:_,rules:{required:l},render:function(e){var o=e.field;return n.createElement(t,{placeholder:s,value:o.value,isMulti:u,styles:{control:function(e){return r.__assign(r.__assign({},e),(n=m?{borderRadius:"1rem",minHeight:"3rem"}:{},g?r.__assign({borderColor:"red"},n):r.__assign({},n)));var n}},onChange:function(e){o.onChange(e)},options:i,noOptionsMessage:function(){return n.createElement("span",null,v)}})}}))};
|
|
@@ -7,10 +7,10 @@ export type ZoneFormProps = {
|
|
|
7
7
|
onSubmit: (values: Partial<Zone>) => void;
|
|
8
8
|
serverErrors?: ServerError;
|
|
9
9
|
isLoading?: boolean;
|
|
10
|
-
workHours
|
|
10
|
+
workHours: WorkHour[] | undefined;
|
|
11
11
|
};
|
|
12
12
|
export type ZoneFormValues = Partial<Zone> & {
|
|
13
13
|
localImageBlobURL?: string;
|
|
14
14
|
};
|
|
15
|
-
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, }: ZoneFormProps) => JSX.Element;
|
|
15
|
+
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, workHours, }: ZoneFormProps) => JSX.Element;
|
|
16
16
|
//# sourceMappingURL=ZoneForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,
|
|
1
|
+
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,QAAQ,qEAMlB,aAAa,gBAiDf,CAAC"}
|
|
@@ -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 r=require("tslib"),t=require("react"),o=e(t),n=require("react-i18next"),s=require("react-bootstrap"),a=require("react-hook-form"),l=e(require("@licklist/plugins/dist/services/Form/FormErrorService")),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),t=require("react"),o=e(t),n=require("react-i18next"),s=require("react-bootstrap"),a=require("react-hook-form"),l=e(require("@licklist/plugins/dist/services/Form/FormErrorService")),u=require("./components/ZoneControl.js");exports.ZoneForm=function(e){var i=e.defaultValues,c=e.onSubmit,m=e.serverErrors,d=e.isLoading,f=void 0!==d&&d,b=e.workHours,p=n.useTranslation("Design").t,v=a.useForm({mode:"onChange",defaultValues:{zoneRecurrences:[]}}),E=v.reset,g=v.setError,q=v.handleSubmit,w=(0,v.watch)();return t.useEffect((function(){i&&E(i)}),[i,E]),t.useEffect((function(){m&&l.handleServerErrors(m,g)}),[m,g]),o.createElement(a.FormProvider,r.__assign({},v),o.createElement(s.Form,{onSubmit:q((function(e){e.localImageBlobURL;var t=r.__rest(e,["localImageBlobURL"]);c(t)}))},o.createElement(u.ZoneControl,{isLoading:f,workHours:b}),o.createElement(s.Row,null,o.createElement(s.Col,{md:6,sm:12}),o.createElement(s.Col,{className:"product-set-save-btn-wrapper p-0 pl-4 d-flex mw-100",md:6,sm:12},o.createElement(s.Button,{className:"product-set-save-btn mt-5 ml-5 d-no dne d-md-block",type:"submit",disabled:f||!w.name},p("saveAndClose"))))))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvailableTimesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/AvailableTimesControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,eAAe,EAAW,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM;QAAE,cAAc,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC9C,QAAQ,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,
|
|
1
|
+
{"version":3,"file":"AvailableTimesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/AvailableTimesControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,eAAe,EAAW,MAAM,iBAAiB,CAAC;AAE3D,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM;QAAE,cAAc,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAC9C,QAAQ,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;AAEF,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B,CAAC;AAEF,KAAK,kBAAkB,GAAG;IAAE,cAAc,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,qBAAqB,6GA8FjC,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
3
3
|
export type ZoneControlProps = {
|
|
4
4
|
isLoading: boolean;
|
|
5
|
-
workHours
|
|
5
|
+
workHours: WorkHour[] | undefined;
|
|
6
6
|
};
|
|
7
|
-
export declare const ZoneControl: ({ isLoading }: ZoneControlProps) => JSX.Element;
|
|
7
|
+
export declare const ZoneControl: ({ isLoading, workHours }: ZoneControlProps) => JSX.Element;
|
|
8
8
|
//# sourceMappingURL=ZoneControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneControl.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,
|
|
1
|
+
{"version":3,"file":"ZoneControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneControl.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,WAAW,6BAA8B,gBAAgB,gBA0BrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),o=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,t=require("react-bootstrap"),n=require("./NameControl.js"),l=require("./ZoneTypeControl.js"),a=require("./SortControl.js"),i=require("./ZoneRecurrencesControl.js"),s=require("./DescriptionControl.js"),m=require("./ZoneImageControl.js"),c=require("./GameDurationControl.js");exports.ZoneControl=function(e){var r=e.isLoading,u=e.workHours;return o.createElement(t.Row,null,o.createElement(t.Col,{md:6,sm:12,className:"pr-5"},o.createElement(n.NameControl,{isLoading:r}),o.createElement(i.ZoneRecurrencesControl,{workHours:u}),o.createElement("hr",null),o.createElement(t.Row,null,o.createElement(t.Col,{md:6,sm:6},o.createElement(l.ZoneTypeControl,{isLoading:r}),o.createElement(a.SortControl,{isLoading:r}),o.createElement(c.GameDurationControl,{isLoading:r})),o.createElement(t.Col,{md:6,sm:6},o.createElement(m.ZoneImageControl,{isLoading:r}))),o.createElement("hr",null),o.createElement(t.Row,null,o.createElement(t.Col,{md:12,sm:12},o.createElement(s.DescriptionControl,{isLoading:r})))))};
|
|
@@ -4,9 +4,9 @@ import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMa
|
|
|
4
4
|
export interface DateAndRecurrenceInputValues {
|
|
5
5
|
zoneRecurrences?: Partial<ZoneRecurrence>[];
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
workHours
|
|
9
|
-
isLoading?: boolean;
|
|
7
|
+
type ZoneRecurrenceControlProps = {
|
|
8
|
+
workHours: WorkHour[] | undefined;
|
|
10
9
|
};
|
|
11
|
-
export declare const ZoneRecurrencesControl: () => JSX.Element;
|
|
10
|
+
export declare const ZoneRecurrencesControl: ({ workHours, }: ZoneRecurrenceControlProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
12
12
|
//# sourceMappingURL=ZoneRecurrencesControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneRecurrencesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneRecurrencesControl.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAC;AAMlG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAWtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;CAC7C;AAED,
|
|
1
|
+
{"version":3,"file":"ZoneRecurrencesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneRecurrencesControl.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAC;AAMlG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAWtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;CAC7C;AAED,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,mBAEhC,0BAA0B,gBAuM5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("tslib"),t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-i18next"),o=require("react-bootstrap"),a=require("../../../static/Icon.js"),u=require("react-hook-form"),l=require("@react-aria/utils"),c=require("react-use");require("../../../static/index.js");var d=require("@dnd-kit/core"),s=require("@dnd-kit/sortable"),m=require("../../../modals/confirmation/ConfirmModal.js"),v=require("../../../recurring-date-picker-input/RecurringDatePickerInput.js"),f=require("../../../product-set/control/DateAndRecurrenceInput.js"),p=require("./ZoneRecurrenceControl.js");exports.ZoneRecurrencesControl=function(){var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("tslib"),t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-i18next"),o=require("react-bootstrap"),a=require("../../../static/Icon.js"),u=require("react-hook-form"),l=require("@react-aria/utils"),c=require("react-use");require("../../../static/index.js");var d=require("@dnd-kit/core"),s=require("@dnd-kit/sortable"),m=require("../../../modals/confirmation/ConfirmModal.js"),v=require("../../../recurring-date-picker-input/RecurringDatePickerInput.js"),f=require("../../../product-set/control/DateAndRecurrenceInput.js"),p=require("./ZoneRecurrenceControl.js");exports.ZoneRecurrencesControl=function(e){var g,_,E=e.workHours,q=u.useFormContext(),x=q.control,C=q.register,D=q.formState.errors,R=q.getValues,b=q.setValue,k=q.clearErrors,y=u.useFieldArray({name:"zoneRecurrences",control:x,keyName:"_id"}),I=y.fields,S=y.append,z=y.update,N=y.move,h=r.__read(t.useState(!1),2),j=h[0],w=h[1],T=r.__read(t.useState({index:null,values:null}),2),A=T[0],F=T[1],M=function(){return F({index:null,values:null})},P=t.useRef();c.useClickAway(P,(function(e){var r,t,n;m.CONFIRM_MODAL_ACTIONS.includes(null===(n=null===(t=null===(r=e.target)||void 0===r?void 0:r.attributes)||void 0===t?void 0:t.getNamedItem("data-id"))||void 0===n?void 0:n.value)||(w(!1),M())}));var O=l.useId(),V=i.useTranslation(["Design","Validation"]).t,L=function(){M(),w((function(e){return!e}))};return t.useEffect((function(){I.length&&k("zoneRecurrences")}),[I,k]),n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,V("zoneAvailable")),n.createElement(o.OverlayTrigger,{show:j,overlay:n.createElement(o.Popover,{id:O,className:"rounded"},n.createElement(o.Popover.Content,{className:"shadow-lg rounded",ref:P},n.createElement(v.RecurringDatePickerInput,{defaultValues:A.values,onChange:function(e){return r.__awaiter(void 0,void 0,void 0,(function(){var t,n,i;return r.__generator(this,(function(r){return t={rrule:e.rrule,startDate:e.startDate,endDate:e.endDate,startTime:e.startTime,endTime:e.endTime},(null===(n=A.values)||void 0===n?void 0:n.id)&&(t.id=null===(i=A.values)||void 0===i?void 0:i.id),null!==A.index?z(A.index,t):S(t),w((function(){return!1})),M(),[2]}))}))},onDelete:function(){var e=A.index;w(!1),M(),setTimeout((function(){var r=R().zoneRecurrences;b("zoneRecurrences",(void 0===r?[]:r).filter((function(r,t){return t!==e})))}),100)},setInitialStartDateAfterSelect:!0,workHours:E}))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[f.sameWidthPopperModifier]}},n.createElement("div",{className:"zone-recurrences"},n.createElement(d.DndContext,{onDragEnd:function(e){var r=e.over,t=e.active;if(r.id!==t.id){var n=I.findIndex((function(e){return String(e._id)===t.id})),i=I.findIndex((function(e){return String(e._id)===r.id}));N(n,i)}}},n.createElement(s.SortableContext,{items:null!==(g=null==I?void 0:I.map((function(e){return String(e._id)})))&&void 0!==g?g:[],strategy:s.verticalListSortingStrategy},null==I?void 0:I.map((function(e,r){return n.createElement(p.ZoneRecurrenceControl,{key:e._id,zoneRecurrence:e,onEdit:function(){return function(e,r){M(),F({index:r,values:e}),w((function(){return!0}))}(e,r)}})})))),n.createElement("div",{className:"zone-recurrence-icon-wrapper",role:"button",tabIndex:0,onClick:L,onKeyDown:L},n.createElement(a.default,{type:"plus-circle",height:"1rem",className:"zone-recurrence-icon-add mr-2"}),V("addDates")),n.createElement(o.Form.Control,r.__assign({type:"hidden"},C("zoneRecurrences",{required:{value:!0,message:V("Validation:fieldMinNumber",{attribute:V("dates"),min:1})}}))),n.createElement("div",{className:"manual-form-error"},null===(_=D.zoneRecurrences)||void 0===_?void 0:_.message))))};
|
|
@@ -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,
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.63.0-dev.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -16,14 +16,11 @@
|
|
|
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",
|
|
21
19
|
"lint": "eslint --ext .ts,.tsx .",
|
|
22
20
|
"lint:fix": "yarn run lint -- --fix",
|
|
23
21
|
"lint:format": "prettier \"**/*.{md,json,yml,scss}\" --check",
|
|
24
22
|
"lint:format:fix": "prettier \"**/*.{md,json,yml,scss}\" --write",
|
|
25
23
|
"prepare": "husky install",
|
|
26
|
-
"test-staged": "CI=true jest --passWithNoTests --findRelatedTests",
|
|
27
24
|
"tests": "yarn tests-staged",
|
|
28
25
|
"prettier-write": "prettier --write",
|
|
29
26
|
"tsc": "bash -c tsc -p tsconfig.json -b"
|
|
@@ -53,9 +50,9 @@
|
|
|
53
50
|
"@fortawesome/free-brands-svg-icons": "5.15.2",
|
|
54
51
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
55
52
|
"@fortawesome/react-fontawesome": "0.1.9",
|
|
56
|
-
"@licklist/core": "
|
|
57
|
-
"@licklist/eslint-config": "0.
|
|
58
|
-
"@licklist/plugins": "
|
|
53
|
+
"@licklist/core": ">=0.25.1-dev.0 < 0.25.1",
|
|
54
|
+
"@licklist/eslint-config": "0.4.5",
|
|
55
|
+
"@licklist/plugins": ">=0.28.0-dev.2 < 0.28.0",
|
|
59
56
|
"@mdx-js/react": "1.6.22",
|
|
60
57
|
"@popperjs/core": "2.11.8",
|
|
61
58
|
"@react-aria/utils": "3.9.0",
|
|
@@ -73,10 +70,6 @@
|
|
|
73
70
|
"@svgr/rollup": "5.5.0",
|
|
74
71
|
"@svgr/webpack": "5.5.0",
|
|
75
72
|
"@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",
|
|
80
73
|
"@tiptap/core": "2.0.0-beta.176",
|
|
81
74
|
"@tiptap/extension-blockquote": "2.0.0-beta.29",
|
|
82
75
|
"@tiptap/extension-bold": "2.0.0-beta.28",
|
|
@@ -99,14 +92,10 @@
|
|
|
99
92
|
"@tiptap/react": "2.0.0-beta.109",
|
|
100
93
|
"@tiptap/suggestion": "2.0.0-beta.92",
|
|
101
94
|
"@types/babel__core": "7.1.12",
|
|
102
|
-
"@types/enzyme-adapter-react-16": "1.0.6",
|
|
103
|
-
"@types/jest": "26.0.20",
|
|
104
95
|
"@types/luxon": "1.26.2",
|
|
105
96
|
"@types/mdx-js__react": "1.5.3",
|
|
106
|
-
"@types/react": "17.0.2",
|
|
107
97
|
"@types/react-bootstrap": "1.0.1",
|
|
108
98
|
"@types/react-date-range": "^1.4.4",
|
|
109
|
-
"@types/react-dom": "17.0.1",
|
|
110
99
|
"@types/react-email-editor": "1.1.7",
|
|
111
100
|
"@types/react-loader": "2.4.4",
|
|
112
101
|
"@types/react-phone-number-input": "3.0.6",
|
|
@@ -116,7 +105,6 @@
|
|
|
116
105
|
"@typescript-eslint/eslint-plugin": "5.8.1",
|
|
117
106
|
"@typescript-eslint/parser": "5.8.1",
|
|
118
107
|
"@wojtekmaj/react-daterange-picker": "^4.1.0",
|
|
119
|
-
"babel-jest": "26.6.3",
|
|
120
108
|
"babel-loader": "8.2.2",
|
|
121
109
|
"babel-plugin-inline-react-svg": "2.0.1",
|
|
122
110
|
"bootstrap": "4.6.0",
|
|
@@ -128,21 +116,16 @@
|
|
|
128
116
|
"emojibase": "6.1.0",
|
|
129
117
|
"emojibase-data": "7.0.1",
|
|
130
118
|
"emojibase-regex": "6.0.1",
|
|
131
|
-
"enzyme": "3.11.0",
|
|
132
|
-
"enzyme-adapter-react-16": "1.15.6",
|
|
133
119
|
"eslint": "7.32.0",
|
|
134
120
|
"eslint-config-airbnb": "18.2.1",
|
|
135
121
|
"eslint-config-prettier": "8.3.0",
|
|
136
|
-
"eslint-plugin-jest": "25.3.2",
|
|
137
122
|
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
138
123
|
"eslint-plugin-prettier": "4.0.0",
|
|
139
124
|
"eslint-plugin-react-hooks": "4.2.0",
|
|
140
|
-
"eslint-plugin-testing-library": "5.0.1",
|
|
141
125
|
"framer-motion": "4.1.17",
|
|
142
126
|
"history": "5.3.0",
|
|
143
127
|
"husky": "7.0.4",
|
|
144
128
|
"i18next": "19.4.5",
|
|
145
|
-
"jest": "26.6.0",
|
|
146
129
|
"klona": "2.0.4",
|
|
147
130
|
"konva": "6.0.0",
|
|
148
131
|
"lint-staged": "11.1.2",
|
|
@@ -150,18 +133,18 @@
|
|
|
150
133
|
"luxon": "1.26.0",
|
|
151
134
|
"moment": "2.29.1",
|
|
152
135
|
"prettier": "2.5.1",
|
|
153
|
-
"react": "
|
|
136
|
+
"react": "17.0.2",
|
|
154
137
|
"react-bootstrap": "1.6.1",
|
|
155
138
|
"react-color": "2.19.3",
|
|
156
139
|
"react-copy-to-clipboard": "5.0.3",
|
|
157
140
|
"react-date-range": "^1.4.0",
|
|
158
|
-
"react-dom": "
|
|
141
|
+
"react-dom": "17.0.2",
|
|
159
142
|
"react-email-editor": "1.6.1",
|
|
160
143
|
"react-highlighter": "0.4.3",
|
|
161
144
|
"react-hook-form": "7.13.0",
|
|
162
145
|
"react-i18next": "11.8.8",
|
|
163
146
|
"react-intl": "5.15.8",
|
|
164
|
-
"react-konva": "
|
|
147
|
+
"react-konva": "^17.0.2-6",
|
|
165
148
|
"react-loader": "2.4.7",
|
|
166
149
|
"react-loading-skeleton": "^3.3.1",
|
|
167
150
|
"react-overlays": "4.1.1",
|
|
@@ -186,7 +169,6 @@
|
|
|
186
169
|
"sass": "1.32.8",
|
|
187
170
|
"sass-loader": "10.1.1",
|
|
188
171
|
"style-loader": "2.0.0",
|
|
189
|
-
"ts-jest": "26.5.2",
|
|
190
172
|
"twemoji-parser": "14.0.0",
|
|
191
173
|
"typescript": "4.9.5",
|
|
192
174
|
"url-loader": "4.1.1",
|
|
@@ -194,24 +176,17 @@
|
|
|
194
176
|
},
|
|
195
177
|
"resolutions": {
|
|
196
178
|
"@types/react": "17.0.2",
|
|
197
|
-
"@types/react-dom": "17.0.
|
|
198
|
-
},
|
|
199
|
-
"jest": {
|
|
200
|
-
"setupFilesAfterEnv": [
|
|
201
|
-
"./jest.config.js"
|
|
202
|
-
],
|
|
203
|
-
"snapshotSerializers": [
|
|
204
|
-
"enzyme-to-json/serializer"
|
|
205
|
-
]
|
|
179
|
+
"@types/react-dom": "17.0.2"
|
|
206
180
|
},
|
|
207
181
|
"lint-staged": {
|
|
208
182
|
"*.{ts,tsx}": [
|
|
209
|
-
"yarn test-staged",
|
|
210
183
|
"yarn prettier-write",
|
|
211
184
|
"yarn lint:fix"
|
|
212
185
|
]
|
|
213
186
|
},
|
|
214
187
|
"devDependencies": {
|
|
188
|
+
"@types/react": "17.0.2",
|
|
189
|
+
"@types/react-dom": "17.0.2",
|
|
215
190
|
"identity-obj-proxy": "^3.0.0"
|
|
216
191
|
},
|
|
217
192
|
"volta": {
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
component: DateTimeButton,
|
|
9
9
|
} as Meta;
|
|
10
10
|
|
|
11
|
-
const date = DateTime.now();
|
|
11
|
+
const date = DateTime.now().plus({ hour: 1 });
|
|
12
12
|
|
|
13
13
|
export const Default: Story<DateTimeButtonProps> = (args) => {
|
|
14
14
|
return <DateTimeButton {...args} />;
|
|
@@ -19,6 +19,7 @@ Default.args = {
|
|
|
19
19
|
isSelected: false,
|
|
20
20
|
isDisabled: false,
|
|
21
21
|
onSelect: () => null,
|
|
22
|
+
shouldCalculateResources: false,
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export const Selected: Story<DateTimeButtonProps> = (args) => {
|
|
@@ -46,7 +46,7 @@ export const DateTimeButton = ({
|
|
|
46
46
|
|
|
47
47
|
const isTimeVariant = variant === Variant.time;
|
|
48
48
|
|
|
49
|
-
const
|
|
49
|
+
const isPast = variant === Variant.time ? isPastTime(date) : isPastDate(date);
|
|
50
50
|
|
|
51
51
|
const noResources =
|
|
52
52
|
shouldCalculateResources &&
|
|
@@ -55,7 +55,7 @@ export const DateTimeButton = ({
|
|
|
55
55
|
!has(resources, "bookedResources") ||
|
|
56
56
|
!has(resources, "totalResources"));
|
|
57
57
|
|
|
58
|
-
const isDisabled = _isDisabled || isSoldOut ||
|
|
58
|
+
const isDisabled = _isDisabled || isSoldOut || isPast || noResources;
|
|
59
59
|
|
|
60
60
|
return (
|
|
61
61
|
<button
|
|
@@ -85,7 +85,7 @@ export const DateTimeButton = ({
|
|
|
85
85
|
{showResources && resources && (
|
|
86
86
|
<AvailabilityIndicator
|
|
87
87
|
resources={resources}
|
|
88
|
-
isUnavailable={_isDisabled ||
|
|
88
|
+
isUnavailable={_isDisabled || isPast}
|
|
89
89
|
isSoldOut={isSoldOut}
|
|
90
90
|
/>
|
|
91
91
|
)}
|
|
@@ -93,5 +93,7 @@ export const DateTimeButton = ({
|
|
|
93
93
|
);
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
const
|
|
97
|
-
|
|
96
|
+
const isPastTime = (date: DateTime): boolean => DateTime.now() > date;
|
|
97
|
+
|
|
98
|
+
const isPastDate = (date: DateTime): boolean =>
|
|
99
|
+
DateTime.now() > date.set({ hour: 23, minute: 59, second: 59 });
|
|
@@ -19,6 +19,7 @@ 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";
|
|
22
23
|
import { CategoryGroup } from "../../../../types/categories";
|
|
23
24
|
import { SaleDeadline } from "../SaleDeadline/SaleDeadline";
|
|
24
25
|
import {
|
|
@@ -64,6 +65,7 @@ export interface EditEventFormProps extends HasPermissionProp {
|
|
|
64
65
|
createProductSet: (props: EditEventFormValues) => void;
|
|
65
66
|
setEditProductSetId: (value: string) => void;
|
|
66
67
|
isExternalPaymentLinkEnabled?: boolean;
|
|
68
|
+
workHours: WorkHour[] | undefined;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
const eventImageTypes = {
|
|
@@ -83,6 +85,7 @@ export const EditEventForm = ({
|
|
|
83
85
|
createProductSet,
|
|
84
86
|
setEditProductSetId,
|
|
85
87
|
isExternalPaymentLinkEnabled,
|
|
88
|
+
workHours,
|
|
86
89
|
}: EditEventFormProps) => {
|
|
87
90
|
const { t } = useTranslation(["Design", "Validation"]);
|
|
88
91
|
|
|
@@ -403,6 +406,7 @@ export const EditEventForm = ({
|
|
|
403
406
|
setEditProductSetId={setEditProductSetId}
|
|
404
407
|
setShowEditProductSet={setShowEditProductSet}
|
|
405
408
|
showEditProductSet={showEditProductSet}
|
|
409
|
+
workHours={workHours}
|
|
406
410
|
/>
|
|
407
411
|
|
|
408
412
|
{hasPermission && !showEditProductSet && (
|