@licklist/design 0.70.4 → 0.70.5-dev.1
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/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/assets/iframe/available.svg +4 -4
- package/dist/assets/iframe/available.svg.js +16 -18
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/availability-indicator/AvailabilityIndicator.d.ts +3 -1
- package/dist/availability-indicator/AvailabilityIndicator.d.ts.map +1 -1
- package/dist/availability-indicator/AvailabilityIndicator.js +112 -18
- package/dist/calendar/Calendar.d.ts +2 -0
- package/dist/calendar/Calendar.d.ts.map +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 +3 -2
- package/dist/calendar/utils/index.d.ts +8 -2
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/calendar/utils/index.js +9 -21
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.d.ts.map +1 -1
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.js +14 -0
- package/dist/date-time-button/DateContent.d.ts.map +1 -1
- package/dist/date-time-button/DateContent.js +3 -3
- package/dist/date-time-button/DateTimeButton.d.ts +3 -1
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +2 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +0 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts +3 -1
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +5 -3
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +13 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +25 -12
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +4 -5
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +3 -0
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +48 -2
- 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/form/ProductSetForm.js +1 -1
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +0 -2
- package/dist/product-set/form/ProductsControl.js +1 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +0 -3
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +0 -3
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +3 -0
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.js +3 -0
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.js +3 -0
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +21 -0
- package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.js +16 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +7 -0
- package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +10 -4
- package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +3 -0
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +3 -0
- package/dist/static/number-input/NumberInput.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.js +3 -0
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
- package/dist/styles/date-time-button/DateTimeButton.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +22 -0
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
- package/dist/styles/sales/BookingFilter.scss +2 -3
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/BookingTabs.scss +26 -29
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +3 -0
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +3 -0
- package/package.json +9 -7
- package/src/affiliate/form/AffiliateForm.tsx +1 -0
- package/src/assets/iframe/available.svg +4 -4
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/availability-indicator/AvailabilityIndicator.tsx +91 -16
- package/src/calendar/Calendar.tsx +2 -0
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +3 -0
- package/src/calendar/utils/index.ts +17 -26
- package/src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx +16 -1
- package/src/date-time-button/DateContent.tsx +3 -3
- package/src/date-time-button/DateTimeButton.tsx +4 -0
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/iframe/activity-card/ActivityCard.tsx +15 -2
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
- package/src/iframe/ryft/RyftPaymentForm.tsx +14 -3
- package/src/iframe/ryft/utils/ryft-form.ts +6 -5
- package/src/layout/DropDown.tsx +1 -1
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
- package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
- package/src/product-set/form/ProductSetForm.tsx +6 -2
- package/src/product-set/form/ProductZonesControl.tsx +1 -4
- package/src/product-set/form/SelectCategoryModal.tsx +2 -2
- package/src/product-set/form/SubProductsControl.tsx +0 -3
- package/src/product-set/form/VenueMapsControl.tsx +0 -3
- package/src/product-set/product/ProductControl.tsx +0 -1
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
- package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
- package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
- package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
- package/src/resource/form/components/CapacityControl.tsx +1 -0
- package/src/resource/form/components/SortControl.tsx +1 -0
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
- package/src/setting/admin/PaymentFeeForm.tsx +5 -0
- package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -0
- package/src/sortable-tree/SortableTreeItem.tsx +6 -0
- package/src/static/CurrencyNumberInput.tsx +1 -0
- package/src/static/form-number-input/FormNumberInput.tsx +1 -0
- package/src/static/number-input/NumberInput.tsx +1 -0
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +9 -0
- package/src/styles/date-time-button/DateTimeButton.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +22 -0
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +1 -3
- package/src/styles/sales/BookingFilter.scss +2 -3
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/BookingTabs.scss +26 -29
- package/src/zone/form/components/GameDurationControl.tsx +1 -0
- package/src/zone/form/components/SortControl.tsx +1 -0
- package/yarn.lock +125 -109
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
.main-filter-section {
|
|
8
8
|
display: flex;
|
|
9
|
+
gap: 1rem;
|
|
9
10
|
justify-content: center;
|
|
10
11
|
|
|
11
12
|
.search {
|
|
@@ -46,7 +47,6 @@
|
|
|
46
47
|
|
|
47
48
|
.buttons {
|
|
48
49
|
display: flex;
|
|
49
|
-
margin-left: 1rem;
|
|
50
50
|
|
|
51
51
|
.btn {
|
|
52
52
|
padding: 0;
|
|
@@ -122,8 +122,6 @@
|
|
|
122
122
|
flex-direction: column;
|
|
123
123
|
|
|
124
124
|
.buttons {
|
|
125
|
-
margin-top: 1rem;
|
|
126
|
-
margin-left: 0;
|
|
127
125
|
justify-content: space-between;
|
|
128
126
|
}
|
|
129
127
|
}
|
|
@@ -174,6 +172,7 @@
|
|
|
174
172
|
|
|
175
173
|
.additional-filter-container {
|
|
176
174
|
flex-wrap: nowrap;
|
|
175
|
+
align-items: baseline;
|
|
177
176
|
|
|
178
177
|
@include media-breakpoint-down(md) {
|
|
179
178
|
flex-wrap: wrap;
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
.booking-tabs-
|
|
1
|
+
.booking-tabs-panel {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: row;
|
|
4
|
-
justify-content: space-between;
|
|
5
4
|
align-items: center;
|
|
6
|
-
|
|
5
|
+
gap: 1rem;
|
|
7
6
|
background-color: $white;
|
|
8
7
|
|
|
9
8
|
.booking-tabs {
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: 0.5rem;
|
|
11
|
+
|
|
12
|
+
@include media-breakpoint-down(md) {
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
align-self: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
svg {
|
|
11
18
|
g > rect:first-child {
|
|
12
19
|
fill: $white;
|
|
@@ -20,40 +27,29 @@
|
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
29
|
}
|
|
23
|
-
|
|
24
|
-
@include media-breakpoint-down(sm) {
|
|
25
|
-
width: 4rem;
|
|
26
|
-
}
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
.content {
|
|
30
33
|
display: flex;
|
|
34
|
+
flex-grow: 1;
|
|
35
|
+
gap: 1rem;
|
|
31
36
|
justify-content: space-between;
|
|
32
|
-
|
|
33
|
-
flex-direction: row;
|
|
37
|
+
align-items: center;
|
|
34
38
|
|
|
35
39
|
@include media-breakpoint-down(sm) {
|
|
36
|
-
display: flex;
|
|
37
40
|
flex-direction: column;
|
|
38
41
|
align-items: start;
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.booking {
|
|
43
|
-
@include media-breakpoint-down(sm) {
|
|
44
|
-
height: 13rem;
|
|
45
|
-
}
|
|
42
|
+
gap: 0.5rem;
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
.separator {
|
|
50
|
-
|
|
47
|
+
align-self: stretch;
|
|
51
48
|
border-right: 2px solid #dcdcdc;
|
|
52
49
|
}
|
|
53
50
|
|
|
54
51
|
.children {
|
|
55
52
|
flex: 1;
|
|
56
|
-
margin-left: 1rem;
|
|
57
53
|
|
|
58
54
|
@include media-breakpoint-down(sm) {
|
|
59
55
|
display: flex;
|
|
@@ -64,12 +60,13 @@
|
|
|
64
60
|
|
|
65
61
|
.buttons {
|
|
66
62
|
display: flex;
|
|
63
|
+
align-items: center;
|
|
67
64
|
|
|
68
65
|
.btn {
|
|
69
66
|
display: flex;
|
|
70
67
|
align-items: center;
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
padding-top: 0.5rem;
|
|
69
|
+
padding-bottom: 0.5rem;
|
|
73
70
|
}
|
|
74
71
|
|
|
75
72
|
.btn-outline-primary {
|
|
@@ -96,13 +93,19 @@
|
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
95
|
|
|
99
|
-
@include media-breakpoint-down(
|
|
100
|
-
display: flex;
|
|
96
|
+
@include media-breakpoint-down(lg) {
|
|
101
97
|
flex-direction: column;
|
|
98
|
+
align-items: stretch;
|
|
99
|
+
gap: 0.5rem;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@include media-breakpoint-down(sm) {
|
|
103
|
+
flex-direction: row;
|
|
102
104
|
align-items: start;
|
|
103
105
|
gap: 0.5rem;
|
|
104
106
|
margin-top: 0.5rem;
|
|
105
107
|
white-space: nowrap;
|
|
108
|
+
flex-wrap: wrap;
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
|
|
@@ -113,10 +116,4 @@
|
|
|
113
116
|
margin-top: 1rem;
|
|
114
117
|
height: 100%;
|
|
115
118
|
}
|
|
116
|
-
|
|
117
|
-
.booking {
|
|
118
|
-
@include media-breakpoint-down(sm) {
|
|
119
|
-
height: 13rem;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,
|
|
1
|
+
{"version":3,"file":"GameDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/GameDurationControl.tsx"],"names":[],"mappings":"AAOA,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,mBAAmB,mBAE7B,wBAAwB,4CAgC1B,CAAA"}
|
|
@@ -77,6 +77,9 @@ var GameDurationControl = function(param) {
|
|
|
77
77
|
required: false,
|
|
78
78
|
min: 1
|
|
79
79
|
})), {
|
|
80
|
+
onWheel: function(event) {
|
|
81
|
+
return event.currentTarget.blur();
|
|
82
|
+
},
|
|
80
83
|
placeholder: t('Design:duration'),
|
|
81
84
|
isInvalid: Boolean(errors.defaultDuration),
|
|
82
85
|
disabled: isLoading
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"SortControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/SortControl.tsx"],"names":[],"mappings":"AAOA,KAAK,gBAAgB,GAAG;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,gBAAgB,4CAoC1D,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.70.
|
|
3
|
+
"version": "0.70.5-dev.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.
|
|
45
|
+
"@licklist/core": "0.31.1-dev.4",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
|
-
"@licklist/plugins": "0.
|
|
47
|
+
"@licklist/plugins": "0.34.0-dev.4",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
49
|
"luxon": "3.5.0",
|
|
50
50
|
"react": "17.0.2",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@dnd-kit/utilities": "2.0.0",
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
|
-
"@licklist/core": "0.
|
|
64
|
+
"@licklist/core": "0.31.1-dev.4",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
|
-
"@licklist/plugins": "0.
|
|
66
|
+
"@licklist/plugins": "0.34.0-dev.4",
|
|
67
67
|
"@mantine/core": "6.0.22",
|
|
68
68
|
"@mantine/hooks": "6.0.22",
|
|
69
69
|
"@mdx-js/react": "1.6.22",
|
|
@@ -202,8 +202,10 @@
|
|
|
202
202
|
"yarn tsc"
|
|
203
203
|
]
|
|
204
204
|
},
|
|
205
|
+
"packageManager": "yarn@4.4.0",
|
|
205
206
|
"volta": {
|
|
206
207
|
"node": "20.9.0",
|
|
207
208
|
"yarn": "4.4.0"
|
|
208
|
-
}
|
|
209
|
-
|
|
209
|
+
},
|
|
210
|
+
"stableVersion": "0.69.1-dev.3"
|
|
211
|
+
}
|
|
@@ -76,6 +76,7 @@ export const AffiliateForm = ({
|
|
|
76
76
|
const copyToClipboard = () =>
|
|
77
77
|
// eslint-disable-next-line consistent-return
|
|
78
78
|
window.navigator.clipboard.writeText(formValues.link)
|
|
79
|
+
|
|
79
80
|
return (
|
|
80
81
|
<FormProvider {...form}>
|
|
81
82
|
<Form onSubmit={form.handleSubmit(handleSubmit)}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<rect x="
|
|
3
|
-
<rect x="
|
|
4
|
-
<rect x="
|
|
1
|
+
<svg viewBox="auto" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="14%" y="0" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
3
|
+
<rect x="14%" y="33%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
4
|
+
<rect x="14%" y="66%" width="63%" height="29%" rx="15%" fill="#4CF973" stroke="white"/>
|
|
5
5
|
</svg>
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { FunctionComponent, SVGProps } from 'react'
|
|
2
2
|
import { useTranslation } from 'react-i18next'
|
|
3
3
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
|
|
4
|
+
import {
|
|
5
|
+
AVAILABILITY_FORMAT_NUMBER,
|
|
6
|
+
AvailabilityFormat,
|
|
7
|
+
} from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
|
|
8
|
+
import { useWindowDimensions } from '@licklist/plugins'
|
|
4
9
|
import { ReactComponent as AvailableIcon } from '../assets/iframe/available.svg'
|
|
5
10
|
import { ReactComponent as LimitedIcon } from '../assets/iframe/limited.svg'
|
|
6
11
|
import { ReactComponent as SoldOutIcon } from '../assets/iframe/soldOut.svg'
|
|
12
|
+
import { TAB_WIDTH } from '../iframe/page/components/PageBody/constants'
|
|
7
13
|
|
|
8
14
|
const LOTS_OF_SPACE_LIMIT = 0.2
|
|
9
15
|
const LIMITED_LIMIT = 0.8
|
|
@@ -13,38 +19,94 @@ type Config = {
|
|
|
13
19
|
Icon: FunctionComponent<SVGProps<SVGSVGElement>>
|
|
14
20
|
}
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
type GetIconsAndLabelsWithArgumentResult = Config & {
|
|
23
|
+
argument?: number
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface GetIconsAndLabels extends ZoneResourcesAvailability {
|
|
27
|
+
availabilityFormat?: AvailabilityFormat | null
|
|
28
|
+
}
|
|
29
|
+
interface GetAppropreateLabelFormat extends GetIconsAndLabels {
|
|
30
|
+
label?: string
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const getLabelsWithArgument = ({
|
|
17
34
|
bookedResources,
|
|
18
35
|
totalResources,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
availabilityFormat,
|
|
37
|
+
label,
|
|
38
|
+
}: GetAppropreateLabelFormat): {
|
|
39
|
+
label: string
|
|
40
|
+
argument?: number
|
|
41
|
+
} => {
|
|
42
|
+
const availableResources = totalResources - bookedResources
|
|
43
|
+
|
|
44
|
+
if (availabilityFormat !== AVAILABILITY_FORMAT_NUMBER) {
|
|
45
|
+
return { label }
|
|
22
46
|
}
|
|
23
47
|
|
|
48
|
+
return availableResources === 1
|
|
49
|
+
? { label: 'availableSingleResource' }
|
|
50
|
+
: { label: 'availableMultipleResources', argument: availableResources }
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const getIconsAndLabelsWithArgument = ({
|
|
54
|
+
bookedResources,
|
|
55
|
+
totalResources,
|
|
56
|
+
availabilityFormat,
|
|
57
|
+
}: GetIconsAndLabels): GetIconsAndLabelsWithArgumentResult => {
|
|
24
58
|
// lots of space if less than 80% booked
|
|
25
59
|
if (bookedResources / totalResources <= LOTS_OF_SPACE_LIMIT) {
|
|
26
|
-
return {
|
|
60
|
+
return {
|
|
61
|
+
...getLabelsWithArgument({
|
|
62
|
+
bookedResources,
|
|
63
|
+
totalResources,
|
|
64
|
+
availabilityFormat,
|
|
65
|
+
label: 'lotsOfSpace',
|
|
66
|
+
}),
|
|
67
|
+
Icon: AvailableIcon,
|
|
68
|
+
}
|
|
27
69
|
}
|
|
28
70
|
|
|
29
71
|
if (bookedResources / totalResources >= LIMITED_LIMIT) {
|
|
30
|
-
return {
|
|
72
|
+
return {
|
|
73
|
+
...getLabelsWithArgument({
|
|
74
|
+
bookedResources,
|
|
75
|
+
totalResources,
|
|
76
|
+
availabilityFormat,
|
|
77
|
+
label: 'limited',
|
|
78
|
+
}),
|
|
79
|
+
Icon: LimitedIcon,
|
|
80
|
+
}
|
|
31
81
|
}
|
|
32
82
|
|
|
33
|
-
return {
|
|
83
|
+
return {
|
|
84
|
+
...getLabelsWithArgument({
|
|
85
|
+
bookedResources,
|
|
86
|
+
totalResources,
|
|
87
|
+
availabilityFormat,
|
|
88
|
+
label: 'available',
|
|
89
|
+
}),
|
|
90
|
+
Icon: AvailableIcon,
|
|
91
|
+
}
|
|
34
92
|
}
|
|
35
93
|
|
|
36
94
|
type AvailabilityIndicatorProps = {
|
|
37
95
|
resources: ZoneResourcesAvailability
|
|
38
96
|
isUnavailable?: boolean
|
|
39
97
|
isSoldOut?: boolean
|
|
98
|
+
availabilityFormat?: AvailabilityFormat | null
|
|
40
99
|
}
|
|
41
100
|
|
|
42
101
|
export const AvailabilityIndicator = ({
|
|
43
102
|
resources,
|
|
44
103
|
isUnavailable,
|
|
45
|
-
isSoldOut,
|
|
104
|
+
isSoldOut: _isSoldOut,
|
|
105
|
+
availabilityFormat,
|
|
46
106
|
}: AvailabilityIndicatorProps) => {
|
|
47
107
|
const { t } = useTranslation('Design')
|
|
108
|
+
const isSoldOut =
|
|
109
|
+
_isSoldOut || resources.bookedResources === resources.totalResources
|
|
48
110
|
|
|
49
111
|
if (isUnavailable) {
|
|
50
112
|
return <Indicator Icon={SoldOutIcon} label={t('notAvailable')} />
|
|
@@ -54,14 +116,27 @@ export const AvailabilityIndicator = ({
|
|
|
54
116
|
return <Indicator Icon={SoldOutIcon} label={t('soldOut')} />
|
|
55
117
|
}
|
|
56
118
|
|
|
57
|
-
const { Icon, label } =
|
|
119
|
+
const { Icon, label, argument } = getIconsAndLabelsWithArgument({
|
|
120
|
+
...resources,
|
|
121
|
+
availabilityFormat,
|
|
122
|
+
})
|
|
58
123
|
|
|
59
|
-
return
|
|
124
|
+
return (
|
|
125
|
+
<Indicator
|
|
126
|
+
Icon={Icon}
|
|
127
|
+
label={t(label, argument ? { argument } : undefined)}
|
|
128
|
+
/>
|
|
129
|
+
)
|
|
60
130
|
}
|
|
61
131
|
|
|
62
|
-
const Indicator = ({ Icon, label }: Config) =>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
132
|
+
const Indicator = ({ Icon, label }: Config) => {
|
|
133
|
+
const { width } = useWindowDimensions()
|
|
134
|
+
const iconSizes =
|
|
135
|
+
width > TAB_WIDTH ? { height: 15, width: 11 } : { height: 11, width: 7 }
|
|
136
|
+
return (
|
|
137
|
+
<div className='availability-indicator'>
|
|
138
|
+
<Icon height={iconSizes.height} width={iconSizes.width} viewBox='auto' />
|
|
139
|
+
<div className='indicator-label'>{label}</div>
|
|
140
|
+
</div>
|
|
141
|
+
)
|
|
142
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Dispatch, ReactElement, SetStateAction } from 'react'
|
|
2
2
|
import { DateTime } from 'luxon'
|
|
3
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
|
|
3
4
|
import { DateTimeButtonProps } from 'src/date-time-button'
|
|
4
5
|
import { CalendarButtons } from './components/CalendarButtons'
|
|
5
6
|
import { CalendarDates } from './components/CalendarDates'
|
|
@@ -21,6 +22,7 @@ export type CalendarProps = {
|
|
|
21
22
|
fromPrice?: string | ReactElement | null
|
|
22
23
|
isLoading?: boolean
|
|
23
24
|
initialDate?: DateTime
|
|
25
|
+
availabilityFormat?: AvailabilityFormat | null
|
|
24
26
|
getDateTimeButtonProps: (
|
|
25
27
|
date: DateTime,
|
|
26
28
|
) => Pick<DateTimeButtonProps, 'resources' | 'showResources' | 'isDisabled'>
|
|
@@ -11,6 +11,7 @@ export type CalendarDatesProps = Pick<
|
|
|
11
11
|
| 'setSelectedDate'
|
|
12
12
|
| 'fromPrice'
|
|
13
13
|
| 'getDateTimeButtonProps'
|
|
14
|
+
| 'availabilityFormat'
|
|
14
15
|
>
|
|
15
16
|
|
|
16
17
|
export const CalendarDates = ({
|
|
@@ -18,6 +19,7 @@ export const CalendarDates = ({
|
|
|
18
19
|
selectedDate,
|
|
19
20
|
setSelectedDate,
|
|
20
21
|
fromPrice,
|
|
22
|
+
availabilityFormat,
|
|
21
23
|
getDateTimeButtonProps,
|
|
22
24
|
}: CalendarDatesProps) => {
|
|
23
25
|
const fillCalendarDates = useMemo(() => {
|
|
@@ -56,6 +58,7 @@ export const CalendarDates = ({
|
|
|
56
58
|
onSelect={() => setSelectedDate(date)}
|
|
57
59
|
price={fromPrice}
|
|
58
60
|
variant={Variant.month}
|
|
61
|
+
availabilityFormat={availabilityFormat}
|
|
59
62
|
{...props}
|
|
60
63
|
/>
|
|
61
64
|
)
|
|
@@ -1,40 +1,31 @@
|
|
|
1
|
+
import { TimeZone } from '@licklist/core/dist/DataMapper/Common/TimeZoneDataMapper'
|
|
1
2
|
import { DateTime, Interval } from 'luxon'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
initialDate
|
|
5
|
-
timeZone
|
|
6
|
-
)
|
|
4
|
+
type Builder = (args: {
|
|
5
|
+
initialDate?: DateTime
|
|
6
|
+
timeZone: TimeZone['name']
|
|
7
|
+
}) => DateTime[]
|
|
8
|
+
|
|
9
|
+
export const getMonthCalendarDates: Builder = ({
|
|
10
|
+
initialDate: _initialDate,
|
|
11
|
+
timeZone,
|
|
12
|
+
}): DateTime[] => {
|
|
13
|
+
const initialDate = _initialDate || DateTime.now().setZone(timeZone)
|
|
14
|
+
|
|
7
15
|
const startOfMonth = initialDate.startOf('month')
|
|
8
16
|
const endOfMonth = initialDate.endOf('month')
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
return Interval.fromDateTimes(startOfMonth, endOfMonth)
|
|
11
19
|
.splitBy({ day: 1 })
|
|
12
20
|
.map((d) => d.start)
|
|
13
|
-
|
|
14
|
-
if (timeZone) {
|
|
15
|
-
return dateTimes.map((date) =>
|
|
16
|
-
date.setZone(timeZone, { keepLocalTime: true }),
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return dateTimes
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export const getWeekCalendarDates = (
|
|
24
|
-
initialDate
|
|
25
|
-
|
|
26
|
-
): DateTime[] => {
|
|
23
|
+
export const getWeekCalendarDates: Builder = ({ timeZone }): DateTime[] => {
|
|
24
|
+
const initialDate = DateTime.now().setZone(timeZone)
|
|
25
|
+
|
|
27
26
|
const lastDay = initialDate.plus({ days: 7 })
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
return Interval.fromDateTimes(initialDate, lastDay)
|
|
30
29
|
.splitBy({ day: 1 })
|
|
31
30
|
.map((d) => d.start)
|
|
32
|
-
|
|
33
|
-
if (timeZone) {
|
|
34
|
-
return dateTimes.map((date) =>
|
|
35
|
-
date.setZone(timeZone, { keepLocalTime: true }),
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return dateTimes
|
|
40
31
|
}
|
|
@@ -17,6 +17,7 @@ import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permi
|
|
|
17
17
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService'
|
|
18
18
|
import { ServerError } from '@licklist/plugins/dist/hooks/Api/useHttpQuery'
|
|
19
19
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService'
|
|
20
|
+
import useNotification from '@licklist/plugins/dist/context/app/hooks/useNotification'
|
|
20
21
|
|
|
21
22
|
import {
|
|
22
23
|
CreateSortableListItem,
|
|
@@ -84,7 +85,7 @@ export const CustomFieldSet = ({
|
|
|
84
85
|
useEffect(() => {
|
|
85
86
|
FormErrorService.handleServerErrors(serverErrors, setError)
|
|
86
87
|
}, [serverErrors, setError])
|
|
87
|
-
|
|
88
|
+
const notification = useNotification()
|
|
88
89
|
const { fields, append, remove } = useFieldArray({
|
|
89
90
|
control,
|
|
90
91
|
name: CUSTOM_FIELDS,
|
|
@@ -97,6 +98,13 @@ export const CustomFieldSet = ({
|
|
|
97
98
|
|
|
98
99
|
if (!response) return
|
|
99
100
|
|
|
101
|
+
notification.success({
|
|
102
|
+
title: t('App:success'),
|
|
103
|
+
message: t('Notification:createSuccessfully', {
|
|
104
|
+
argument: t('customField'),
|
|
105
|
+
}),
|
|
106
|
+
})
|
|
107
|
+
|
|
100
108
|
setFieldSets((prevFieldSets) => {
|
|
101
109
|
const nextFieldSets = [...prevFieldSets]
|
|
102
110
|
|
|
@@ -115,6 +123,13 @@ export const CustomFieldSet = ({
|
|
|
115
123
|
const removeFieldSet = async () => {
|
|
116
124
|
if (fieldSet.id !== null) {
|
|
117
125
|
await onFieldSetDelete(fieldSet)
|
|
126
|
+
|
|
127
|
+
notification.success({
|
|
128
|
+
title: t('App:success'),
|
|
129
|
+
message: t('Notification:theRemovedSuccessfully', {
|
|
130
|
+
argument: t('customField'),
|
|
131
|
+
}),
|
|
132
|
+
})
|
|
118
133
|
}
|
|
119
134
|
|
|
120
135
|
setFieldSets(
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
} from '@licklist/core/dist/Config'
|
|
7
7
|
import { getDayWithOrdinal } from '@licklist/plugins/dist/utils/formatDate'
|
|
8
8
|
import clsx from 'clsx'
|
|
9
|
-
import { isToday, isTomorrow } from 'date-fns'
|
|
10
9
|
import { DateTime } from 'luxon'
|
|
11
10
|
import { useTranslation } from 'react-i18next'
|
|
11
|
+
import { isToday, isTomorrow } from '@licklist/plugins/dist'
|
|
12
12
|
import { DateTimeButtonProps, Variant } from './DateTimeButton'
|
|
13
13
|
|
|
14
14
|
type DateContentProps = Pick<
|
|
@@ -55,9 +55,9 @@ export const DateContent = ({
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
const getDate = (date: DateTime): string => {
|
|
58
|
-
if (isToday(date
|
|
58
|
+
if (isToday(date)) return 'today'
|
|
59
59
|
|
|
60
|
-
if (isTomorrow(date
|
|
60
|
+
if (isTomorrow(date)) return 'tomorrow'
|
|
61
61
|
|
|
62
62
|
return date.toFormat(DAY_OF_WEEK)
|
|
63
63
|
}
|
|
@@ -2,6 +2,7 @@ import { ReactElement } from 'react'
|
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import { DateTime } from 'luxon'
|
|
4
4
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
|
|
5
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
|
|
5
6
|
import { AvailabilityIndicator } from '../availability-indicator'
|
|
6
7
|
import { DateContent } from './DateContent'
|
|
7
8
|
|
|
@@ -21,6 +22,7 @@ export type DateTimeButtonProps = {
|
|
|
21
22
|
resources?: ZoneResourcesAvailability | null
|
|
22
23
|
showResources?: boolean
|
|
23
24
|
variant: Variant
|
|
25
|
+
availabilityFormat?: AvailabilityFormat | null
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export const DateTimeButton = ({
|
|
@@ -33,6 +35,7 @@ export const DateTimeButton = ({
|
|
|
33
35
|
resources,
|
|
34
36
|
showResources,
|
|
35
37
|
variant = Variant.week,
|
|
38
|
+
availabilityFormat,
|
|
36
39
|
}: DateTimeButtonProps) => {
|
|
37
40
|
const isSoldOut =
|
|
38
41
|
_isSoldOut ||
|
|
@@ -69,6 +72,7 @@ export const DateTimeButton = ({
|
|
|
69
72
|
{price && !isDisabled && <div className='price'>{price}</div>}
|
|
70
73
|
{showResources && resources && (
|
|
71
74
|
<AvailabilityIndicator
|
|
75
|
+
availabilityFormat={availabilityFormat}
|
|
72
76
|
resources={resources}
|
|
73
77
|
isUnavailable={_isDisabled || isPast}
|
|
74
78
|
isSoldOut={isSoldOut}
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react'
|
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
|
|
4
4
|
import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
|
|
5
|
+
import { AvailabilityFormat } from '@licklist/core/dist/DataMapper/Provider/SnippetDataMapper'
|
|
5
6
|
import { AvailabilityIndicator } from '../../availability-indicator'
|
|
6
7
|
|
|
7
8
|
export const LAYOUT_GRID = 'grid'
|
|
@@ -18,6 +19,7 @@ export type ActivityCardProps = {
|
|
|
18
19
|
availableTimes?: string | null
|
|
19
20
|
image?: Image | null
|
|
20
21
|
resources?: ZoneResourcesAvailability
|
|
22
|
+
availabilityFormat?: AvailabilityFormat | null
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
export const ActivityCard = ({
|
|
@@ -30,6 +32,7 @@ export const ActivityCard = ({
|
|
|
30
32
|
onSelect,
|
|
31
33
|
isSelected,
|
|
32
34
|
layout = LAYOUT_GRID,
|
|
35
|
+
availabilityFormat,
|
|
33
36
|
resources,
|
|
34
37
|
}: ActivityCardProps) => {
|
|
35
38
|
if (layout === LAYOUT_GRID) {
|
|
@@ -50,7 +53,12 @@ export const ActivityCard = ({
|
|
|
50
53
|
{description && (
|
|
51
54
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
52
55
|
)}
|
|
53
|
-
{resources &&
|
|
56
|
+
{resources && (
|
|
57
|
+
<AvailabilityIndicator
|
|
58
|
+
resources={resources}
|
|
59
|
+
availabilityFormat={availabilityFormat}
|
|
60
|
+
/>
|
|
61
|
+
)}
|
|
54
62
|
</div>
|
|
55
63
|
</button>
|
|
56
64
|
)
|
|
@@ -76,7 +84,12 @@ export const ActivityCard = ({
|
|
|
76
84
|
{description && (
|
|
77
85
|
<div className='mt-2 activity-card-description'>{description}</div>
|
|
78
86
|
)}
|
|
79
|
-
{resources &&
|
|
87
|
+
{resources && (
|
|
88
|
+
<AvailabilityIndicator
|
|
89
|
+
resources={resources}
|
|
90
|
+
availabilityFormat={availabilityFormat}
|
|
91
|
+
/>
|
|
92
|
+
)}
|
|
80
93
|
</div>
|
|
81
94
|
|
|
82
95
|
<hr className='list-activity-card-hr' />
|