@licklist/design 0.59.0-dev.9 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitbucket-pipelines.yml +8 -0
- package/dist/calendar/Calendar.d.ts +1 -1
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/Calendar.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -3
- 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 +1 -3
- 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 +1 -3
- 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/activity-card/ActivityCard.d.ts +1 -2
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.js +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts +1 -3
- 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 +1 -2
- 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 -1
- 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 +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +1 -4
- 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/product-set/product-category/ProductCategoryControl.d.ts +0 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +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 +1 -3
- 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 +0 -12
- 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 +1 -2
- 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/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts +0 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -1
- package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
- package/dist/static/manual-date-picker/constants/index.d.ts +1 -4
- package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/constants/index.js +1 -1
- package/dist/static/manual-date-picker/utils/index.d.ts +0 -4
- package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/utils/index.js +1 -1
- package/dist/styles/activity-card/ListActivitiesCard.scss +1 -1
- package/dist/styles/iframe-events/Card.scss +8 -24
- package/dist/styles/iframe-events/PoweredBy.scss +2 -2
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -5
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
- package/dist/styles/iframe-page/Page.scss +0 -1
- package/dist/styles/iframe-page/PageBody.scss +9 -32
- package/dist/styles/iframe-page/PageHeader.scss +39 -41
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +1 -2
- 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/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/jest.config.js +29 -0
- package/package.json +35 -10
- package/src/calendar/Calendar.stories.tsx +0 -23
- package/src/calendar/Calendar.tsx +5 -5
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -4
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +8 -10
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +0 -4
- package/src/iframe/activity-card/ActivityCard.tsx +2 -4
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
- package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
- package/src/iframe/page/components/PageBody/constants.ts +1 -1
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +3 -3
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/iframe/payment/payment-page/PaymentPage.tsx +2 -2
- package/src/iframe/ryft/RyftPaymentForm.tsx +3 -20
- package/src/iframe/ryft/utils/ryft-form.ts +5 -11
- package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -3
- package/src/product-set/control/DateInput.tsx +5 -4
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +1 -5
- package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -2
- package/src/product-set/product/ProductControl.tsx +38 -38
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +27 -89
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +1 -0
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -11
- package/src/recurring-date-picker-input/utils.ts +0 -77
- package/src/sales/booking/results/BookingResults.stories.tsx +2 -3
- package/src/sales/booking/results/components/ResultCard.tsx +5 -2
- package/src/sales/coupon/control/CouponFormControl.tsx +50 -29
- package/src/sales/coupon/form/CouponFrom.tsx +15 -5
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/dashboard/DashboardSettingForm.tsx +0 -13
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
- package/src/static/manual-date-picker/constants/index.ts +2 -6
- package/src/static/manual-date-picker/utils/index.ts +0 -11
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/activity-card/ListActivitiesCard.scss +1 -1
- package/src/styles/iframe-events/Card.scss +8 -24
- package/src/styles/iframe-events/PoweredBy.scss +2 -2
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -5
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +2 -0
- package/src/styles/iframe-page/Page.scss +0 -1
- package/src/styles/iframe-page/PageBody.scss +9 -32
- package/src/styles/iframe-page/PageHeader.scss +39 -41
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +3 -16
- package/src/zone/form/ZoneForm.tsx +2 -3
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +5 -7
- package/src/zone/form/utils/dates.ts +10 -9
- package/tests/Auth/Authorizer.test.tsx +194 -0
- package/tests/Auth/Layout/UserNavDropDown.test.tsx +43 -0
- package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +33 -0
- package/tests/Auth/Login/LoginComponent.test.tsx +246 -0
- package/tests/Auth/Login/LoginFormComponent.test.tsx +182 -0
- package/tests/Auth/Register/RegisterComponent.test.tsx +285 -0
- package/tests/Auth/Register/RegisterFormComponent.test.tsx +170 -0
- package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +130 -0
- package/tests/Auth/Social/SocialCallbackComponent.test.tsx +133 -0
- package/tests/Auth/Social/SocialFormComponent.test.tsx +118 -0
- package/tests/FileUpload/FileUpload.test.tsx +42 -0
- package/tests/Notification/EmailTemplate.test.tsx +82 -0
- package/tests/ProductSet/ProductSetPopover.test.tsx +40 -0
- package/tests/Report/Report.test.tsx +48 -0
- package/tests/Sales/Coupon.test.tsx +51 -0
- package/tests/Sales/SalesAndVIews.test.tsx +63 -0
- package/tests/SnippetTemplates/SnippetTemplates.test.tsx +56 -0
- package/tests/Table/FilterHelperComponent.test.tsx +88 -0
- package/tests/Table/PaginationHelperComponent.test.tsx +109 -0
- package/tests/Table/PerPageHelperComponent.test.tsx +34 -0
- package/tests/Table/TableHelperComponent.test.tsx +295 -0
- package/tests/TipTapEditor/TipTapEditor.test.tsx +28 -0
- package/tests/__mock__/hooks/useAuthApi.ts +13 -0
- package/tests/__mock__/hooks/useAuthMock.ts +13 -0
- package/tests/__mock__/hooks/useFormMock.ts +27 -0
- package/tests/__mock__/hooks/useNotificationMock.ts +13 -0
- package/tests/__mock__/hooks/useQueryMock.ts +16 -0
- package/tests/__mock__/hooks/useSocialApiMock.ts +20 -0
- package/tests/__mock__/hooks/useTranslationMock.ts +17 -0
- package/tests/__mock__/hooks/useUserApiMock.ts +18 -0
- package/tests/__mock__/hooks/useUserMock.ts +13 -0
- package/tests/__mock__/styleMock.js +1 -0
- package/tests/__mock__/windowMock.ts +5 -0
- package/tests/packages/react-query.tsx +28 -0
- package/tests/setupTests.ts +10 -0
- package/dist/sales/coupon/utils/index.d.ts +0 -7
- package/dist/sales/coupon/utils/index.d.ts.map +0 -1
- package/dist/sales/coupon/utils/index.js +0 -1
- package/src/sales/coupon/utils/index.ts +0 -13
|
@@ -47,127 +47,141 @@
|
|
|
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
|
+
}
|
|
50
100
|
.form {
|
|
51
101
|
.input {
|
|
52
102
|
border: 2px solid #525252 !important;
|
|
53
103
|
}
|
|
54
104
|
}
|
|
55
105
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
106
|
+
.ryft-payment-form {
|
|
107
|
+
@include media-breakpoint-up(md) {
|
|
108
|
+
.submit-button-wrapper {
|
|
109
|
+
max-width: 15.5rem;
|
|
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;
|
|
118
|
+
}
|
|
119
|
+
.ryft-pay-apple-pay-button {
|
|
120
|
+
border-radius: 0.25rem;
|
|
60
121
|
}
|
|
61
122
|
}
|
|
62
|
-
}
|
|
63
123
|
|
|
124
|
+
.divider {
|
|
125
|
+
display: none !important;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
64
128
|
@include media-breakpoint-down(sm) {
|
|
65
|
-
|
|
66
|
-
|
|
129
|
+
.left-block-container {
|
|
130
|
+
max-height: 100%;
|
|
131
|
+
overflow: visible;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
67
135
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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;
|
|
82
153
|
}
|
|
83
154
|
}
|
|
84
155
|
}
|
|
85
156
|
}
|
|
86
157
|
}
|
|
87
158
|
}
|
|
88
|
-
::-webkit-scrollbar {
|
|
89
|
-
display: none;
|
|
90
|
-
scrollbar-width: none;
|
|
91
|
-
}
|
|
92
159
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
display: none;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ryft-payment-form {
|
|
100
|
-
.submit-button-wrapper {
|
|
101
|
-
margin: -1rem 0 1rem;
|
|
102
|
-
|
|
103
|
-
button {
|
|
104
|
-
width: 100%;
|
|
105
|
-
}
|
|
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;
|
|
160
|
+
::-webkit-scrollbar {
|
|
161
|
+
display: none;
|
|
162
|
+
scrollbar-width: none;
|
|
147
163
|
}
|
|
148
164
|
}
|
|
149
165
|
|
|
150
|
-
@include media-breakpoint-
|
|
151
|
-
.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
166
|
+
@include media-breakpoint-down(md) {
|
|
167
|
+
.payment_link {
|
|
168
|
+
.page-body {
|
|
169
|
+
.left-block {
|
|
170
|
+
.left-block-container {
|
|
171
|
+
.ryft-payment-form {
|
|
172
|
+
position: relative;
|
|
173
|
+
max-height: 300px !important;
|
|
174
|
+
.ryft-pay-grid {
|
|
175
|
+
width: 100%;
|
|
176
|
+
max-width: 100%;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
157
181
|
}
|
|
158
182
|
}
|
|
183
|
+
}
|
|
159
184
|
|
|
160
|
-
|
|
161
|
-
|
|
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
|
-
}
|
|
185
|
+
#ryft-threeDSMethodIframe {
|
|
186
|
+
display: none;
|
|
173
187
|
}
|
|
@@ -12,8 +12,7 @@ export interface TypeaheadProps {
|
|
|
12
12
|
isMultipleChoise?: boolean;
|
|
13
13
|
noOptionsMessage: string;
|
|
14
14
|
isInvalid?: boolean;
|
|
15
|
-
isCouponForm?: boolean;
|
|
16
15
|
}
|
|
17
|
-
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name,
|
|
16
|
+
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name, noOptionsMessage, isInvalid, }: TypeaheadProps): JSX.Element;
|
|
18
17
|
export { Typeahead };
|
|
19
18
|
//# 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;CACrB;AAED,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,WAAW,EACX,UAAkB,EAClB,gBAAgB,EAChB,IAAS,EACT,gBAAqB,EACrB,SAAS,GACV,EAAE,cAAc,eAiChB;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")),t=require("react-hook-form"),o=e(require("react-select"));exports.Typeahead=function(e){var i=e.options,l=e.placeholder,a=e.isRequired,u=void 0!==a&&a,s=e.isMultipleChoise,c=e.name,d=void 0===c?"":c,p=e.noOptionsMessage,f=void 0===p?"":p,v=e.isInvalid,m=t.useFormContext().control;return n.createElement(n.Fragment,null,n.createElement(t.Controller,{name:d,control:m,rules:{required:u},render:function(e){var t=e.field;return n.createElement(o,{placeholder:l,value:t.value,isMulti:s,styles:{control:function(e){return r.__assign(r.__assign({},e),v?{borderColor:"red"}:{})}},onChange:function(e){t.onChange(e)},options:i,noOptionsMessage:function(){return n.createElement("span",null,f)}})}}))};
|
|
@@ -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[];
|
|
11
11
|
};
|
|
12
12
|
export type ZoneFormValues = Partial<Zone> & {
|
|
13
13
|
localImageBlobURL?: string;
|
|
14
14
|
};
|
|
15
|
-
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading,
|
|
15
|
+
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, }: 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,EAAE,QAAQ,EAAE,
|
|
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,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,QAAQ,0DAKlB,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")),i=require("./components/ZoneControl.js");exports.ZoneForm=function(e){var u=e.defaultValues,c=e.onSubmit,m=e.serverErrors,d=e.isLoading,f=void 0!==d&&d,b=n.useTranslation("Design").t,p=a.useForm({mode:"onChange",defaultValues:{zoneRecurrences:[]}}),v=p.reset,E=p.setError,g=p.handleSubmit,q=(0,p.watch)();return t.useEffect((function(){u&&v(u)}),[u,v]),t.useEffect((function(){m&&l.handleServerErrors(m,E)}),[m,E]),o.createElement(a.FormProvider,r.__assign({},p),o.createElement(s.Form,{onSubmit:g((function(e){e.localImageBlobURL;var t=r.__rest(e,["localImageBlobURL"]);c(t)}))},o.createElement(i.ZoneControl,{isLoading:f}),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||!q.name},b("saveAndClose"))))))};
|
|
@@ -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[];
|
|
6
6
|
};
|
|
7
|
-
export declare const ZoneControl: ({ isLoading
|
|
7
|
+
export declare const ZoneControl: ({ isLoading }: 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,EAAE,QAAQ,EAAE,
|
|
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,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,gBA0B1D,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"),t=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,o=require("react-bootstrap"),n=require("./NameControl.js"),l=require("./ZoneTypeControl.js"),a=require("./SortControl.js"),i=require("./ZoneRecurrencesControl.js"),m=require("./DescriptionControl.js"),s=require("./ZoneImageControl.js"),c=require("./GameDurationControl.js");exports.ZoneControl=function(e){var r=e.isLoading;return t.createElement(o.Row,null,t.createElement(o.Col,{md:6,sm:12,className:"pr-5"},t.createElement(n.NameControl,{isLoading:r}),t.createElement(i.ZoneRecurrencesControl,null),t.createElement("hr",null),t.createElement(o.Row,null,t.createElement(o.Col,{md:6,sm:6},t.createElement(l.ZoneTypeControl,{isLoading:r}),t.createElement(a.SortControl,{isLoading:r}),t.createElement(c.GameDurationControl,{isLoading:r})),t.createElement(o.Col,{md:6,sm:6},t.createElement(s.ZoneImageControl,{isLoading:r}))),t.createElement("hr",null),t.createElement(o.Row,null,t.createElement(o.Col,{md:12,sm:12},t.createElement(m.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
|
-
type ZoneRecurrenceControlProps = {
|
|
8
|
-
workHours
|
|
7
|
+
export type ZoneRecurrenceControlProps = {
|
|
8
|
+
workHours?: WorkHour[];
|
|
9
|
+
isLoading?: boolean;
|
|
9
10
|
};
|
|
10
|
-
export declare const ZoneRecurrencesControl: (
|
|
11
|
-
export {};
|
|
11
|
+
export declare const ZoneRecurrencesControl: () => JSX.Element;
|
|
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,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,sBAAsB,mBAsMlC,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(
|
|
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 e,g,_=u.useFormContext(),E=_.control,q=_.register,x=_.formState.errors,C=_.getValues,D=_.setValue,R=_.clearErrors,b=u.useFieldArray({name:"zoneRecurrences",control:E,keyName:"_id"}),y=b.fields,I=b.append,S=b.update,k=b.move,z=r.__read(t.useState(!1),2),N=z[0],h=z[1],j=r.__read(t.useState({index:null,values:null}),2),T=j[0],A=j[1],w=function(){return A({index:null,values:null})},F=t.useRef();c.useClickAway(F,(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)||(h(!1),w())}));var M=l.useId(),P=i.useTranslation(["Design","Validation"]).t,O=function(){w(),h((function(e){return!e}))};return t.useEffect((function(){y.length&&R("zoneRecurrences")}),[y,R]),n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,P("zoneAvailable")),n.createElement(o.OverlayTrigger,{show:N,overlay:n.createElement(o.Popover,{id:M,className:"rounded"},n.createElement(o.Popover.Content,{className:"shadow-lg rounded",ref:F},n.createElement(v.RecurringDatePickerInput,{defaultValues:T.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=T.values)||void 0===n?void 0:n.id)&&(t.id=null===(i=T.values)||void 0===i?void 0:i.id),null!==T.index?S(T.index,t):I(t),h((function(){return!1})),w(),[2]}))}))},onDelete:function(){var e=T.index;h(!1),w(),setTimeout((function(){var r=C().zoneRecurrences;D("zoneRecurrences",(void 0===r?[]:r).filter((function(r,t){return t!==e})))}),100)},setInitialStartDateAfterSelect:!0}))),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=y.findIndex((function(e){return String(e._id)===t.id})),i=y.findIndex((function(e){return String(e._id)===r.id}));k(n,i)}}},n.createElement(s.SortableContext,{items:null!==(e=null==y?void 0:y.map((function(e){return String(e._id)})))&&void 0!==e?e:[],strategy:s.verticalListSortingStrategy},null==y?void 0:y.map((function(e,r){return n.createElement(p.ZoneRecurrenceControl,{key:e._id,zoneRecurrence:e,onEdit:function(){return function(e,r){w(),A({index:r,values:e}),h((function(){return!0}))}(e,r)}})})))),n.createElement("div",{className:"zone-recurrence-icon-wrapper",role:"button",tabIndex:0,onClick:O,onKeyDown:O},n.createElement(a.default,{type:"plus-circle",height:"1rem",className:"zone-recurrence-icon-add mr-2"}),P("addDates")),n.createElement(o.Form.Control,r.__assign({type:"hidden"},q("zoneRecurrences",{required:{value:!0,message:P("Validation:fieldMinNumber",{attribute:P("dates"),min:1})}}))),n.createElement("div",{className:"manual-form-error"},null===(g=x.zoneRecurrences)||void 0===g?void 0:g.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,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.59.0
|
|
3
|
+
"version": "0.59.0",
|
|
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": "
|
|
54
|
-
"@licklist/eslint-config": "0.4
|
|
55
|
-
"@licklist/plugins": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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.
|
|
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": {
|
|
@@ -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 = (
|
|
33
|
-
|
|
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
|
}
|