@licklist/design 0.67.1 → 0.67.2-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/.storybook/main.cjs +15 -12
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +35 -40
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -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/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +2 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/layout/DropDownToggle.d.ts.map +1 -1
- package/dist/layout/DropDownToggle.js +1 -0
- 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 -0
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +2 -2
- 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/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 +60 -2
- 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/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/hooks/useSortableTreeFunctions.d.ts +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.js +2 -1
- package/dist/provider/location-input/LocationInput.d.ts +4 -1
- package/dist/provider/location-input/LocationInput.d.ts.map +1 -1
- package/dist/provider/location-input/LocationInput.js +46 -2
- package/dist/provider/location-input/index.d.ts +1 -0
- package/dist/provider/location-input/index.d.ts.map +1 -1
- package/dist/provider/provider-form/ProviderForm.d.ts +3 -1
- package/dist/provider/provider-form/ProviderForm.d.ts.map +1 -1
- package/dist/provider/provider-form/ProviderForm.js +26 -5
- package/dist/provider/venue-form/VenueForm.d.ts +3 -1
- package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
- package/dist/provider/venue-form/VenueForm.js +4 -2
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +4 -8
- 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 +6 -3
- package/dist/recurring-date-picker-input/utils.d.ts +5 -0
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +75 -3
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +6 -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/styles/auth/AccessDenied.scss +1 -1
- package/dist/styles/back-button/BackButton.scss +25 -24
- package/dist/styles/back-button/_index.scss +1 -1
- package/dist/styles/company-user-form/UserForm.scss +4 -7
- package/dist/styles/company-user-form/_index.scss +1 -1
- package/dist/styles/custom-fields/CreateSortableListItem.scss +2 -1
- package/dist/styles/custom-fields/_index.scss +1 -1
- package/dist/styles/customers/Filter.scss +5 -5
- package/dist/styles/events/EditEventModal.scss +1 -3
- package/dist/styles/events/EventVenueMap.scss +7 -7
- package/dist/styles/form/Input.scss +1 -1
- package/dist/styles/header/Header.scss +1 -1
- package/dist/styles/header/elements/CompanySelector.scss +2 -2
- package/dist/styles/iframe-events/Calendar.scss +0 -1
- package/dist/styles/iframe-events/CalendarSelect.scss +1 -1
- package/dist/styles/iframe-events/CategoryStepsForm.scss +6 -7
- package/dist/styles/iframe-events/Event.scss +2 -4
- package/dist/styles/iframe-events/EventForm.scss +54 -54
- package/dist/styles/iframe-events/EventNavigationFooter.scss +1 -0
- package/dist/styles/iframe-events/TicketDescription.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/iframe-payments/PaymentForm.scss +1 -1
- package/dist/styles/layout/BackgroundVideoContainer.scss +2 -2
- package/dist/styles/notification/Notification.scss +1 -1
- package/dist/styles/order-items-table/OrderItemsTable.scss +1 -2
- package/dist/styles/product-set/CreateProductSetItem.scss +15 -13
- package/dist/styles/product-set/DateAndRecurrenceInput.scss +6 -8
- package/dist/styles/product-set/EditCategoryModal.scss +4 -4
- package/dist/styles/product-set/EditProductModal.scss +3 -3
- package/dist/styles/product-set/EditStepModal.scss +4 -4
- package/dist/styles/product-set/EditVenueMapSetModal.scss +6 -6
- package/dist/styles/product-set/ProductSetForm.scss +25 -2
- package/dist/styles/product-set/TutorialGifCard.scss +1 -1
- package/dist/styles/product-set/_index.scss +2 -2
- package/dist/styles/report/ReportCard.scss +1 -0
- package/dist/styles/report/_index.scss +1 -1
- package/dist/styles/resources-blocking/_index.scss +4 -0
- package/dist/styles/sales/BookingFilter.scss +2 -2
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/BookingTabs.scss +7 -5
- package/dist/styles/sales/Filters.scss +5 -4
- package/dist/styles/sales/GuestProfile.scss +170 -175
- package/dist/styles/sales/LifeTimeSales.scss +1 -1
- package/dist/styles/sales/ManualBooking.scss +4 -2
- package/dist/styles/snippet-templates/_snippetVariables.scss +63 -244
- package/dist/styles/sortable-field/SortableField.scss +16 -16
- package/dist/styles/sortable-field/_index.scss +1 -1
- package/dist/styles/sortable-tree/Item.scss +4 -4
- package/dist/styles/table/Table.scss +1 -1
- package/dist/styles/themes/bookedit/_variables.scss +10 -32
- package/dist/styles/themes/licklist/_variables.scss +1 -1
- package/dist/styles/tiptap-editor/TiptapEditor.scss +9 -10
- package/dist/styles/tiptap-editor/_index.scss +1 -1
- package/dist/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
- package/dist/styles/virtualized/_index.scss +1 -1
- package/dist/styles/zones/ZoneForm.scss +1 -0
- package/dist/styles/zones/ZoneRecurrencesControl.scss +6 -8
- 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 +3 -2
- 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 +4 -2
- 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 +4 -2
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/auth/ChangePassword/ChangePassword.stories.tsx +1 -1
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/auth/ResetPassword/ResetPassword.stories.tsx +1 -1
- package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +31 -28
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/header/elements/Elements.stories.tsx +1 -1
- package/src/help/popover/Popover.stories.tsx +1 -1
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +3 -3
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
- package/src/layout/DropDown.tsx +2 -1
- package/src/layout/DropDownToggle.tsx +2 -0
- package/src/product-set/card/ProductSetCard.stories.tsx +3 -1
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -4
- package/src/product-set/control/DateInput.tsx +2 -1
- package/src/product-set/control/ProductSetControl.tsx +1 -1
- package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +2 -2
- package/src/product-set/form/ProductCategoriesControl.tsx +38 -2
- package/src/product-set/form/ProductSetForm.tsx +22 -3
- package/src/product-set/form/ProductZonesControl.tsx +4 -7
- package/src/product-set/form/SelectCategoryModal.stories.tsx +1 -1
- 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/hooks/useSortableTreeFunctions.ts +2 -0
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +5 -5
- package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
- package/src/product-set/product/quantity/ProductQuantity.stories.tsx +1 -1
- package/src/product-set/product-zone/ProductZoneControl.tsx +9 -9
- package/src/provider/location-input/LocationInput.tsx +40 -1
- package/src/provider/location-input/index.ts +1 -0
- package/src/provider/provider-form/ProviderForm.tsx +26 -2
- package/src/provider/venue-form/VenueForm.tsx +4 -1
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
- package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +11 -4
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +12 -1
- package/src/recurring-date-picker-input/utils.ts +91 -1
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/setting/admin/AdminSetting.stories.tsx +1 -0
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/system/SystemSetting.stories.tsx +1 -1
- package/src/snippet/snippet-template/preview/Preview.tsx +6 -0
- package/src/sortable-tree/SortableTreeItem.tsx +13 -1
- package/src/styles/auth/AccessDenied.scss +1 -1
- package/src/styles/back-button/BackButton.scss +25 -24
- package/src/styles/back-button/_index.scss +1 -1
- package/src/styles/company-user-form/UserForm.scss +4 -7
- package/src/styles/company-user-form/_index.scss +1 -1
- package/src/styles/custom-fields/CreateSortableListItem.scss +2 -1
- package/src/styles/custom-fields/_index.scss +1 -1
- package/src/styles/customers/Filter.scss +5 -5
- package/src/styles/events/EditEventModal.scss +1 -3
- package/src/styles/events/EventVenueMap.scss +7 -7
- package/src/styles/form/Input.scss +1 -1
- package/src/styles/header/Header.scss +1 -1
- package/src/styles/header/elements/CompanySelector.scss +2 -2
- package/src/styles/iframe-events/Calendar.scss +0 -1
- package/src/styles/iframe-events/CalendarSelect.scss +1 -1
- package/src/styles/iframe-events/CategoryStepsForm.scss +6 -7
- package/src/styles/iframe-events/Event.scss +2 -4
- package/src/styles/iframe-events/EventForm.scss +54 -54
- package/src/styles/iframe-events/EventNavigationFooter.scss +1 -0
- package/src/styles/iframe-events/TicketDescription.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/iframe-payments/PaymentForm.scss +1 -1
- package/src/styles/layout/BackgroundVideoContainer.scss +2 -2
- package/src/styles/notification/Notification.scss +1 -1
- package/src/styles/order-items-table/OrderItemsTable.scss +1 -2
- package/src/styles/product-set/CreateProductSetItem.scss +15 -13
- package/src/styles/product-set/DateAndRecurrenceInput.scss +6 -8
- package/src/styles/product-set/EditCategoryModal.scss +4 -4
- package/src/styles/product-set/EditProductModal.scss +3 -3
- package/src/styles/product-set/EditStepModal.scss +4 -4
- package/src/styles/product-set/EditVenueMapSetModal.scss +6 -6
- package/src/styles/product-set/ProductSetForm.scss +25 -2
- package/src/styles/product-set/TutorialGifCard.scss +1 -1
- package/src/styles/product-set/_index.scss +2 -2
- package/src/styles/report/ReportCard.scss +1 -0
- package/src/styles/report/_index.scss +1 -1
- package/src/styles/resources-blocking/_index.scss +4 -0
- package/src/styles/sales/BookingFilter.scss +2 -2
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/BookingTabs.scss +7 -5
- package/src/styles/sales/Filters.scss +5 -4
- package/src/styles/sales/GuestProfile.scss +170 -175
- package/src/styles/sales/LifeTimeSales.scss +1 -1
- package/src/styles/sales/ManualBooking.scss +4 -2
- package/src/styles/snippet-templates/_snippetVariables.scss +63 -244
- package/src/styles/sortable-field/SortableField.scss +16 -16
- package/src/styles/sortable-field/_index.scss +1 -1
- package/src/styles/sortable-tree/Item.scss +4 -4
- package/src/styles/table/Table.scss +1 -1
- package/src/styles/themes/bookedit/_variables.scss +10 -32
- package/src/styles/themes/licklist/_variables.scss +1 -1
- package/src/styles/tiptap-editor/TiptapEditor.scss +9 -10
- package/src/styles/tiptap-editor/_index.scss +1 -1
- package/src/styles/venue-map-sets/VenueMapSetForm.scss +5 -4
- package/src/styles/virtualized/_index.scss +1 -1
- package/src/styles/zones/ZoneForm.scss +1 -0
- package/src/styles/zones/ZoneRecurrencesControl.scss +6 -8
- package/src/tiptap-editor/TipTapEditor.stories.tsx +6 -4
- package/src/tiptap-editor/TipTapMenu/TipTapMenu.stories.tsx +5 -2
- package/src/zone/form/ZoneForm.tsx +3 -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/yarn.lock +103 -116
- package/dist/assets/iframe/selectArrow.svg.js +0 -17
package/.storybook/main.cjs
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
stories: [
|
|
3
|
-
|
|
2
|
+
"stories": [
|
|
3
|
+
"../src/**/*.stories.mdx",
|
|
4
|
+
"../src/**/*.stories.@(js|jsx|ts|tsx)"
|
|
5
|
+
],
|
|
6
|
+
"addons": [
|
|
4
7
|
"@storybook/addon-links",
|
|
5
8
|
"@storybook/addon-essentials",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
'@storybook/preset-scss',
|
|
10
|
+
'@storybook/addon-knobs',
|
|
11
|
+
'@storybook/addon-a11y'
|
|
9
12
|
],
|
|
10
13
|
// Export a function. Accept the base config as the only param.
|
|
11
14
|
webpackFinal: async (config, { configType }) => {
|
|
@@ -17,28 +20,28 @@ module.exports = {
|
|
|
17
20
|
|
|
18
21
|
const assetLoader = {
|
|
19
22
|
loader: assetRule.loader,
|
|
20
|
-
options: assetRule.options || assetRule.query
|
|
23
|
+
options: assetRule.options || assetRule.query
|
|
21
24
|
};
|
|
22
25
|
|
|
23
26
|
const gifLoader = {
|
|
24
27
|
loader: gifRule.loader,
|
|
25
|
-
options: gifRule.options || gifRule.query
|
|
26
|
-
}
|
|
28
|
+
options: gifRule.options || gifRule.query
|
|
29
|
+
}
|
|
27
30
|
|
|
28
31
|
// Make whatever fine-grained changes you need
|
|
29
32
|
config.module.rules.unshift({
|
|
30
33
|
test: /\.gif$/,
|
|
31
34
|
exclude: /node_modules/,
|
|
32
|
-
use: ["url-loader", gifLoader]
|
|
35
|
+
use: ["url-loader", gifLoader]
|
|
33
36
|
});
|
|
34
|
-
|
|
37
|
+
|
|
35
38
|
config.module.rules.unshift({
|
|
36
39
|
test: /\.svg$/,
|
|
37
40
|
exclude: /node_modules/,
|
|
38
|
-
use: ["@svgr/webpack", assetLoader]
|
|
41
|
+
use: ["@svgr/webpack", assetLoader]
|
|
39
42
|
});
|
|
40
43
|
|
|
41
44
|
// Return the altered config
|
|
42
45
|
return config;
|
|
43
46
|
},
|
|
44
|
-
}
|
|
47
|
+
}
|
|
@@ -203,9 +203,10 @@ var LoginComponent = function(param) {
|
|
|
203
203
|
var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
|
|
204
204
|
var userApiService = useUserApi(request);
|
|
205
205
|
var handleError = function(error) {
|
|
206
|
+
var _error_response_data, _error_response;
|
|
206
207
|
notification.danger({
|
|
207
208
|
title: "Error",
|
|
208
|
-
message: error.message
|
|
209
|
+
message: (error === null || error === void 0 ? void 0 : (_error_response = error.response) === null || _error_response === void 0 ? void 0 : (_error_response_data = _error_response.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.message) || error.message
|
|
209
210
|
});
|
|
210
211
|
};
|
|
211
212
|
var storeSecrets = function(secrets) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarButtons.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarButtons/CalendarButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,KAAK,oBAAoB,GAAG,IAAI,CAC9B,aAAa,EACX,WAAW,GACX,aAAa,GACb,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,wBAAwB,CAC3B,CAAC;AAEF,eAAO,MAAM,eAAe,sGAOzB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CalendarButtons.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarButtons/CalendarButtons.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,KAAK,oBAAoB,GAAG,IAAI,CAC9B,aAAa,EACX,WAAW,GACX,aAAa,GACb,aAAa,GACb,gBAAgB,GAChB,iBAAiB,GACjB,wBAAwB,CAC3B,CAAC;AAEF,eAAO,MAAM,eAAe,sGAOzB,oBAAoB,4CAiHtB,CAAC"}
|
|
@@ -3,28 +3,27 @@ import { useCallback, useMemo } from 'react';
|
|
|
3
3
|
import { Button } from 'react-bootstrap';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { range } from 'lodash';
|
|
6
|
-
import {
|
|
6
|
+
import { DateTime } from 'luxon';
|
|
7
7
|
import { CalendarSelect } from '../CalendarSelect/CalendarSelect.js';
|
|
8
8
|
|
|
9
9
|
var CalendarButtons = function(param) {
|
|
10
10
|
var _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, initialDate = param.initialDate, currentDate = param.currentDate, setCurrentDate = param.setCurrentDate, setSelectedDate = param.setSelectedDate, getDateTimeButtonProps = param.getDateTimeButtonProps;
|
|
11
11
|
var t = useTranslation("Design").t;
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
19
|
-
}, []);
|
|
20
|
-
var onSelectPreviousMonth = useCallback(function() {
|
|
21
|
-
setCurrentDate(function(prevDate) {
|
|
22
|
-
return prevDate.minus({
|
|
23
|
-
month: 1
|
|
24
|
-
});
|
|
12
|
+
var onSelectMonth = useCallback(function(value) {
|
|
13
|
+
var selectedMonth = Number(value);
|
|
14
|
+
var nextDateTime = currentDate.set({
|
|
15
|
+
month: selectedMonth
|
|
25
16
|
});
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
if (nextDateTime <= initialDate) {
|
|
18
|
+
setCurrentDate(initialDate);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
setCurrentDate(nextDateTime);
|
|
22
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
+
[
|
|
24
|
+
setCurrentDate,
|
|
25
|
+
currentDate
|
|
26
|
+
]);
|
|
28
27
|
var yearOptions = useMemo(function() {
|
|
29
28
|
return range(initialDate.year, initialDate.year + 5, 1).map(function(year) {
|
|
30
29
|
return {
|
|
@@ -35,11 +34,21 @@ var CalendarButtons = function(param) {
|
|
|
35
34
|
}, [
|
|
36
35
|
initialDate
|
|
37
36
|
]);
|
|
38
|
-
var
|
|
39
|
-
|
|
37
|
+
var monthOptions = useMemo(function() {
|
|
38
|
+
var initialMonth = currentDate.year > initialDate.year ? 1 : initialDate.month;
|
|
39
|
+
return range(initialMonth, 13).map(function(monthNumber) {
|
|
40
|
+
return {
|
|
41
|
+
label: DateTime.fromObject({
|
|
42
|
+
month: monthNumber
|
|
43
|
+
}).toLocaleString({
|
|
44
|
+
month: "long"
|
|
45
|
+
}),
|
|
46
|
+
value: monthNumber
|
|
47
|
+
};
|
|
48
|
+
});
|
|
40
49
|
}, [
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
initialDate,
|
|
51
|
+
currentDate
|
|
43
52
|
]);
|
|
44
53
|
var onSelectYear = function(value) {
|
|
45
54
|
var selectedYear = Number(value);
|
|
@@ -96,27 +105,13 @@ var CalendarButtons = function(param) {
|
|
|
96
105
|
/*#__PURE__*/ jsxs("div", {
|
|
97
106
|
className: "calendar-buttons",
|
|
98
107
|
children: [
|
|
99
|
-
/*#__PURE__*/
|
|
108
|
+
/*#__PURE__*/ jsx("div", {
|
|
100
109
|
className: "buttons-wrapper",
|
|
101
|
-
children:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
variant: "link",
|
|
107
|
-
children: /*#__PURE__*/ jsx(SvgSelectArrow, {})
|
|
108
|
-
}),
|
|
109
|
-
/*#__PURE__*/ jsx("div", {
|
|
110
|
-
className: "month-title",
|
|
111
|
-
children: currentDate.toFormat("MMMM")
|
|
112
|
-
}),
|
|
113
|
-
/*#__PURE__*/ jsx(Button, {
|
|
114
|
-
className: "calendar-button",
|
|
115
|
-
onClick: onSelectNextMonth,
|
|
116
|
-
variant: "link",
|
|
117
|
-
children: /*#__PURE__*/ jsx(SvgSelectArrow, {})
|
|
118
|
-
})
|
|
119
|
-
]
|
|
110
|
+
children: /*#__PURE__*/ jsx(CalendarSelect, {
|
|
111
|
+
options: monthOptions,
|
|
112
|
+
onChange: onSelectMonth,
|
|
113
|
+
value: currentDate.month
|
|
114
|
+
})
|
|
120
115
|
}),
|
|
121
116
|
/*#__PURE__*/ jsx(CalendarSelect, {
|
|
122
117
|
options: yearOptions,
|
|
@@ -13,13 +13,13 @@ import { getFirstErrorKey } from '@licklist/plugins/dist/utils/FormValues';
|
|
|
13
13
|
import { SaleDeadline } from '../SaleDeadline/SaleDeadline.js';
|
|
14
14
|
import { CategoriesInput } from '../../../../provider/categories-input/CategoriesInput.js';
|
|
15
15
|
import { CategoriesInputDescription } from '../../../../provider/categories-input/CategoriesInputDescription.js';
|
|
16
|
+
import '@licklist/plugins';
|
|
16
17
|
import 'react-bootstrap/Form';
|
|
17
18
|
import 'react-phone-number-input/input';
|
|
18
19
|
import 'react-phone-number-input/locale/en.json';
|
|
19
20
|
import 'react-select';
|
|
20
21
|
import '../../../../provider/provider-form/ProviderForm.js';
|
|
21
22
|
import '../../../../provider/venue-form/VenueForm.js';
|
|
22
|
-
import '@licklist/core/dist/Config';
|
|
23
23
|
import 'clsx';
|
|
24
24
|
import '@licklist/core/dist/DataMapper/User/UserRoleDataMapper';
|
|
25
25
|
import '@licklist/plugins/dist/validation/Rules/emailRule';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,
|
|
1
|
+
{"version":3,"file":"getDefaultProductSet.d.ts","sourceRoot":"","sources":["../../../../src/events/edit-event-modal/utils/getDefaultProductSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACX,MAAM,6DAA6D,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,eAAO,MAAM,gBAAgB,gBACd,UAAU,GAAG,IAAI,qBACX,OAAO,KACzB,oBAoCD,CAAC"}
|
|
@@ -133,7 +133,6 @@ var getDefaultValues = function(productSet, hasNoRecurrences) {
|
|
|
133
133
|
subProducts: subProducts === null || subProducts === void 0 ? void 0 : subProducts.map(function(_param) {
|
|
134
134
|
var subProducts = _extends({}, _object_destructuring_empty(_param));
|
|
135
135
|
return _object_spread_props(_object_spread({}, subProducts), {
|
|
136
|
-
originalProductId: null,
|
|
137
136
|
productCategoryId: undefined
|
|
138
137
|
});
|
|
139
138
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAC;AAG7D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,
|
|
1
|
+
{"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAC;AAG7D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;IAC1B,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAkE3B,CAAC"}
|
|
@@ -8,6 +8,7 @@ var ProductQuantityInput = function(param) {
|
|
|
8
8
|
var product = param.product, category = param.category, _onChange = param.onChange, clearErrors = param.clearErrors, refCallback = param.refCallback, productInfo = param.productInfo, invalid = param.invalid;
|
|
9
9
|
var t = useTranslation("Design").t;
|
|
10
10
|
var onChange = function(quantity) {
|
|
11
|
+
var _category_zone;
|
|
11
12
|
_onChange({
|
|
12
13
|
id: product.id,
|
|
13
14
|
name: product.name,
|
|
@@ -15,6 +16,7 @@ var ProductQuantityInput = function(param) {
|
|
|
15
16
|
hasDeposit: category.allowDeposits && (product === null || product === void 0 ? void 0 : product.deposit) < product.price,
|
|
16
17
|
price: product.price,
|
|
17
18
|
productCategoryId: category.id,
|
|
19
|
+
zoneId: (_category_zone = category.zone) === null || _category_zone === void 0 ? void 0 : _category_zone.id,
|
|
18
20
|
quantity: quantity,
|
|
19
21
|
capacity: product === null || product === void 0 ? void 0 : product.capacity
|
|
20
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymentSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/utils/paymentSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,oBAAoB,EAEpB,WAAW,EAEZ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"paymentSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/payment/order-items-table/utils/paymentSummary.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,oBAAoB,EAEpB,WAAW,EAEZ,MAAM,UAAU,CAAC;AA8FlB,eAAO,MAAM,oBAAoB,oEAK9B,oBAAoB,KAAG,WAAW,EAUpC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
interface Props {
|
|
2
3
|
children?: React.ReactNode | React.ReactNode[];
|
|
3
4
|
style?: any;
|
|
4
5
|
className?: any;
|
|
5
6
|
"aria-laballedby"?: any;
|
|
6
7
|
}
|
|
7
|
-
declare const DropDown:
|
|
8
|
+
declare const DropDown: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
|
|
8
9
|
export default DropDown;
|
|
9
10
|
//# sourceMappingURL=DropDown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../src/layout/DropDown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropDown.d.ts","sourceRoot":"","sources":["../../src/layout/DropDown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/C,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,SAAS,CAAC,EAAE,GAAG,CAAC;IAChB,iBAAiB,CAAC,EAAE,GAAG,CAAC;CACzB;AAED,QAAA,MAAM,QAAQ,uEAcZ,CAAC;AAIH,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropDownToggle.d.ts","sourceRoot":"","sources":["../../src/layout/DropDownToggle.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/C,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACzC;AAED,QAAA,MAAM,cAAc,2FAYlB,CAAC;
|
|
1
|
+
{"version":3,"file":"DropDownToggle.d.ts","sourceRoot":"","sources":["../../src/layout/DropDownToggle.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC/C,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;CACzC;AAED,QAAA,MAAM,cAAc,2FAYlB,CAAC;AAIH,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateAndRecurrenceInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateAndRecurrenceInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;
|
|
1
|
+
{"version":3,"file":"DateAndRecurrenceInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateAndRecurrenceInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAqB7G,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,mFAKhC,2BAA2B,4CA+Q7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
|
|
@@ -387,6 +387,7 @@ var DateAndRecurrenceInput = function(param) {
|
|
|
387
387
|
defaultValues: editState.values,
|
|
388
388
|
onChange: handleRecurringDateChange,
|
|
389
389
|
onDelete: handleDelete,
|
|
390
|
+
workHours: workHours,
|
|
390
391
|
children: providerHasBookingManagement && /*#__PURE__*/ jsx(AvailableTimesControl, {
|
|
391
392
|
workHours: workHours,
|
|
392
393
|
isLoading: isLoading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAG7G,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAiBtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,mFAKnB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateInput.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAG7G,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAiBtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,mFAKnB,2BAA2B,4CAuP7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
|
|
@@ -400,13 +400,13 @@ var DateInput = function(param) {
|
|
|
400
400
|
className: "product-set-recurrences",
|
|
401
401
|
children: [
|
|
402
402
|
fields.map(function(menuRecurrence, index) {
|
|
403
|
-
var _errors_menuRecurrences__availableTimes, _errors_menuRecurrences_, _errors_menuRecurrences;
|
|
403
|
+
var _errors_menuRecurrences__availableTimes, _errors_menuRecurrences_, _errors_menuRecurrences, _errors_menuRecurrences_1, _errors_menuRecurrences1;
|
|
404
404
|
return /*#__PURE__*/ jsx(ProductSetRecurrenceOverridesControl, {
|
|
405
405
|
menuRecurrence: menuRecurrence,
|
|
406
406
|
onEdit: function() {
|
|
407
407
|
return handleOnEdit(menuRecurrence, index);
|
|
408
408
|
},
|
|
409
|
-
errorMessage: errors === null || errors === void 0 ? void 0 : (_errors_menuRecurrences = errors.menuRecurrences) === null || _errors_menuRecurrences === void 0 ? void 0 : (_errors_menuRecurrences_ = _errors_menuRecurrences["".concat(index)]) === null || _errors_menuRecurrences_ === void 0 ? void 0 : (_errors_menuRecurrences__availableTimes = _errors_menuRecurrences_.availableTimes) === null || _errors_menuRecurrences__availableTimes === void 0 ? void 0 : _errors_menuRecurrences__availableTimes.message
|
|
409
|
+
errorMessage: (errors === null || errors === void 0 ? void 0 : (_errors_menuRecurrences = errors.menuRecurrences) === null || _errors_menuRecurrences === void 0 ? void 0 : (_errors_menuRecurrences_ = _errors_menuRecurrences["".concat(index)]) === null || _errors_menuRecurrences_ === void 0 ? void 0 : (_errors_menuRecurrences__availableTimes = _errors_menuRecurrences_.availableTimes) === null || _errors_menuRecurrences__availableTimes === void 0 ? void 0 : _errors_menuRecurrences__availableTimes.message) || (errors === null || errors === void 0 ? void 0 : (_errors_menuRecurrences1 = errors.menuRecurrences) === null || _errors_menuRecurrences1 === void 0 ? void 0 : (_errors_menuRecurrences_1 = _errors_menuRecurrences1["".concat(index)]) === null || _errors_menuRecurrences_1 === void 0 ? void 0 : _errors_menuRecurrences_1.message)
|
|
410
410
|
}, menuRecurrence._id);
|
|
411
411
|
}),
|
|
412
412
|
fields.length < MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE && /*#__PURE__*/ jsxs("div", {
|
|
@@ -41,7 +41,7 @@ export interface ProductSetControlProps {
|
|
|
41
41
|
fieldSets?: FieldSet[];
|
|
42
42
|
showEmailTemplate?: boolean;
|
|
43
43
|
showSmsTemplate?: boolean;
|
|
44
|
-
workHours
|
|
44
|
+
workHours: WorkHour[] | undefined;
|
|
45
45
|
providerHasBookingManagement?: boolean;
|
|
46
46
|
isOverrides?: boolean;
|
|
47
47
|
occurrenceStartAtDate?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,
|
|
1
|
+
{"version":3,"file":"ProductSetControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/ProductSetControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAOL,mBAAmB,EACnB,cAAc,EAEd,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAGrE,OAAO,EAAE,QAAQ,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,qEAAqE,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAGhG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAIL,4BAA4B,EAC7B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAgBhC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,aAAa,GAAG,WAAW,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAwB,SAAQ,4BAA4B;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,cAAc,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;IACjC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,GAAU,EACV,SAAc,EACd,cAAmB,EACnB,YAAiB,EACjB,qBAAqB,EACrB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,SAAS,EACT,4BAAoC,EACpC,WAAmB,EACnB,qBAAqB,EACrB,oBAA4B,GAC7B,EAAE,sBAAsB,2CAmUxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"AAaA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAC;AAQ1E,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAoCvE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AA0BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,6BAA6B,2CA4T/B;AAED,eAAO,MAAM,cAAc,iBACX,YAAY,SACnB,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAczC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs, Fragment
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useContext, useState, useEffect } from 'react';
|
|
3
3
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
4
4
|
import { uniqueId } from 'lodash';
|
|
5
5
|
import { Badge } from 'react-bootstrap';
|
|
6
6
|
import { useFormContext, useFieldArray, useWatch, Controller } from 'react-hook-form';
|
|
7
|
+
import { FaTicketAlt, FaCalendar, FaBars, FaBowlingBall } from 'react-icons/fa';
|
|
7
8
|
import { useTranslation } from 'react-i18next';
|
|
8
9
|
import { useSensor, MouseSensor } from '@dnd-kit/core';
|
|
9
10
|
import { CATEGORY_TYPE_GAME, CATEGORY_TYPE_FIXED_DURATION, QUANTITY_TYPE_STANDARD, CATEGORY_TYPE_TICKETS } from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
@@ -13,7 +14,7 @@ import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js'
|
|
|
13
14
|
import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
|
|
14
15
|
import { ProductCategoryControl } from '../product-category/ProductCategoryControl.js';
|
|
15
16
|
import { ProductsControl } from './ProductsControl.js';
|
|
16
|
-
import { SelectCategoryModal } from './SelectCategoryModal.js';
|
|
17
|
+
import { CATEGORY_TYPES_NAMES, SelectCategoryModal } from './SelectCategoryModal.js';
|
|
17
18
|
import { ProductSetLoadingContext } from './context.js';
|
|
18
19
|
import { VenueMapSetModal } from './VenueMapSetModal.js';
|
|
19
20
|
import { sortArrayByIndex, moveArrayElements } from '../utils/index.js';
|
|
@@ -117,6 +118,40 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
117
118
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
118
119
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
119
120
|
}
|
|
121
|
+
var _obj;
|
|
122
|
+
// @TODO not for first release
|
|
123
|
+
// import Popover from "./ProductSetFormPopover";
|
|
124
|
+
var CATEGORIES_TYPE = (_obj = {}, _define_property(_obj, CATEGORY_TYPES_NAMES.tickets, {
|
|
125
|
+
label: "tickets",
|
|
126
|
+
icon: /*#__PURE__*/ jsx(FaTicketAlt, {
|
|
127
|
+
color: "#0e8ce2",
|
|
128
|
+
size: 10
|
|
129
|
+
})
|
|
130
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.bookings, {
|
|
131
|
+
label: "bookings",
|
|
132
|
+
icon: /*#__PURE__*/ jsx(FaCalendar, {
|
|
133
|
+
color: "#0e8ce2",
|
|
134
|
+
size: 10
|
|
135
|
+
})
|
|
136
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.menuItems, {
|
|
137
|
+
label: "menuItems",
|
|
138
|
+
icon: /*#__PURE__*/ jsx(FaBars, {
|
|
139
|
+
color: "#0e8ce2",
|
|
140
|
+
size: 10
|
|
141
|
+
})
|
|
142
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.game, {
|
|
143
|
+
label: "game",
|
|
144
|
+
icon: /*#__PURE__*/ jsx(FaBowlingBall, {
|
|
145
|
+
color: "#0e8ce2",
|
|
146
|
+
size: 10
|
|
147
|
+
})
|
|
148
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.fixedDuration, {
|
|
149
|
+
label: "fixedDuration",
|
|
150
|
+
icon: /*#__PURE__*/ jsx(FaCalendar, {
|
|
151
|
+
color: "#0e8ce2",
|
|
152
|
+
size: 10
|
|
153
|
+
})
|
|
154
|
+
}), _obj);
|
|
120
155
|
var getCategoryDefaultValue = function(categoryType, sort) {
|
|
121
156
|
return {
|
|
122
157
|
id: null,
|
|
@@ -250,6 +285,7 @@ function ProductCategoriesControl(param) {
|
|
|
250
285
|
var onSetIsExpanded = function() {
|
|
251
286
|
setIsExpanded(productCategoryId);
|
|
252
287
|
};
|
|
288
|
+
var categoryType = CATEGORIES_TYPE[productCategory.type];
|
|
253
289
|
return /*#__PURE__*/ jsx(Controller, {
|
|
254
290
|
name: "".concat(productCategoriesFieldName, ".").concat(index, ".name"),
|
|
255
291
|
control: control,
|
|
@@ -299,6 +335,16 @@ function ProductCategoriesControl(param) {
|
|
|
299
335
|
secondaryBadge: getBadgeConfig(productCategory.type, t(productCategory.type)),
|
|
300
336
|
modalClass: ProductSetModalClasses.category,
|
|
301
337
|
isNewAdded: showCategoryModal,
|
|
338
|
+
itemButton: /*#__PURE__*/ jsxs("div", {
|
|
339
|
+
className: "btn-outline-primary item-icon sm border border-primary rounded-sm",
|
|
340
|
+
children: [
|
|
341
|
+
categoryType.icon,
|
|
342
|
+
/*#__PURE__*/ jsx("span", {
|
|
343
|
+
className: "ml-2",
|
|
344
|
+
children: t(categoryType.label)
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
}),
|
|
302
348
|
body: /*#__PURE__*/ jsx(ProductCategoryControl, {
|
|
303
349
|
isLoading: isLoading,
|
|
304
350
|
onCategoryNameChange: onChange,
|
|
@@ -10,10 +10,13 @@ import { SelectItem } from "../../types/generic/SelectItem";
|
|
|
10
10
|
export interface WithIsLoading {
|
|
11
11
|
isLoading: boolean;
|
|
12
12
|
}
|
|
13
|
+
export interface WithIdOptional {
|
|
14
|
+
id?: number;
|
|
15
|
+
}
|
|
13
16
|
export interface WithId {
|
|
14
17
|
id: number;
|
|
15
18
|
}
|
|
16
|
-
export interface ProductSetFormValues extends FormValues,
|
|
19
|
+
export interface ProductSetFormValues extends FormValues, WithIdOptional, ProductSetControlValues {
|
|
17
20
|
steps: Step[];
|
|
18
21
|
isOverrides?: boolean;
|
|
19
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAI1F,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAC;AACtI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAI1F,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAC;AACtI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAI5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,cAAc,EACd,uBAAuB;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,4BAA4B,CAAC,EAAE,gCAAgC,CAAC,sBAAsB,CAAC,CAAC;IACxF,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,GAAG,MAAM,EACV,EAAE,mBAAmB,2CA4JrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useEffect } from 'react';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
3
|
import { Form, Row, Col, Button } from 'react-bootstrap';
|
|
4
4
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
@@ -10,7 +10,16 @@ import { useDialogContext } from '../../modals/dialog/DialogContext.js';
|
|
|
10
10
|
import { ProductSetControl } from '../control/ProductSetControl.js';
|
|
11
11
|
import { ProductSetContextProvider, ProductSetLoadingContext } from './context.js';
|
|
12
12
|
import { getFilteredTemplates, checkAvailableTimesErrors } from '../utils/index.js';
|
|
13
|
+
import { ErrorModal } from '../../iframe/order-process/components/ErrorModal/ErrorModal.js';
|
|
13
14
|
|
|
15
|
+
function _array_like_to_array(arr, len) {
|
|
16
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
17
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
18
|
+
return arr2;
|
|
19
|
+
}
|
|
20
|
+
function _array_with_holes(arr) {
|
|
21
|
+
if (Array.isArray(arr)) return arr;
|
|
22
|
+
}
|
|
14
23
|
function _define_property(obj, key, value) {
|
|
15
24
|
if (key in obj) {
|
|
16
25
|
Object.defineProperty(obj, key, {
|
|
@@ -24,6 +33,33 @@ function _define_property(obj, key, value) {
|
|
|
24
33
|
}
|
|
25
34
|
return obj;
|
|
26
35
|
}
|
|
36
|
+
function _iterable_to_array_limit(arr, i) {
|
|
37
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
38
|
+
if (_i == null) return;
|
|
39
|
+
var _arr = [];
|
|
40
|
+
var _n = true;
|
|
41
|
+
var _d = false;
|
|
42
|
+
var _s, _e;
|
|
43
|
+
try {
|
|
44
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
45
|
+
_arr.push(_s.value);
|
|
46
|
+
if (i && _arr.length === i) break;
|
|
47
|
+
}
|
|
48
|
+
} catch (err) {
|
|
49
|
+
_d = true;
|
|
50
|
+
_e = err;
|
|
51
|
+
} finally{
|
|
52
|
+
try {
|
|
53
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
54
|
+
} finally{
|
|
55
|
+
if (_d) throw _e;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return _arr;
|
|
59
|
+
}
|
|
60
|
+
function _non_iterable_rest() {
|
|
61
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
62
|
+
}
|
|
27
63
|
function _object_spread(target) {
|
|
28
64
|
for(var i = 1; i < arguments.length; i++){
|
|
29
65
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -90,6 +126,17 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
90
126
|
}
|
|
91
127
|
return target;
|
|
92
128
|
}
|
|
129
|
+
function _sliced_to_array(arr, i) {
|
|
130
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
131
|
+
}
|
|
132
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
133
|
+
if (!o) return;
|
|
134
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
135
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
136
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
137
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
138
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
139
|
+
}
|
|
93
140
|
function ProductSetForm(_param) {
|
|
94
141
|
var companyName = _param.companyName, isLoading = _param.isLoading, defaultValues = _param.defaultValues, onSubmitAndRedirect = _param.onSubmitAndRedirect, onSubmitNoRedirect = _param.onSubmitNoRedirect, productGroupList = _param.productGroupList, serverErrors = _param.serverErrors, _param_providerHasMap = _param.providerHasMap, providerHasMap = _param_providerHasMap === void 0 ? false : _param_providerHasMap, _param_venueMapSets = _param.venueMapSets, venueMapSets = _param_venueMapSets === void 0 ? [] : _param_venueMapSets, providerHasBookingManagement = _param.providerHasBookingManagement, zones = _param.zones, isCreateAction = _param.isCreateAction, workHours = _param.workHours, isOverrides = _param.isOverrides, isCreateNewOverrides = _param.isCreateNewOverrides, shared = _object_without_properties(_param, [
|
|
95
142
|
"companyName",
|
|
@@ -110,6 +157,7 @@ function ProductSetForm(_param) {
|
|
|
110
157
|
]);
|
|
111
158
|
var t = useTranslation("Design").t;
|
|
112
159
|
var _useDialogContext = useDialogContext(), isShownDialog = _useDialogContext.isShownDialog, onBeforeUnload = _useDialogContext.onBeforeUnload, onPopState = _useDialogContext.onPopState, onApproveDialog = _useDialogContext.onApproveDialog, onDeclineDialog = _useDialogContext.onDeclineDialog;
|
|
160
|
+
var _useState = _sliced_to_array(useState(""), 2), errorMessage = _useState[0], setErrorMessage = _useState[1];
|
|
113
161
|
var form = useForm({
|
|
114
162
|
defaultValues: defaultValues,
|
|
115
163
|
mode: "onChange"
|
|
@@ -141,13 +189,16 @@ function ProductSetForm(_param) {
|
|
|
141
189
|
if (!serverErrors) {
|
|
142
190
|
return;
|
|
143
191
|
}
|
|
192
|
+
if (Array.isArray(serverErrors) && serverErrors[0]) {
|
|
193
|
+
setErrorMessage(serverErrors[0]);
|
|
194
|
+
}
|
|
144
195
|
FormErrorService.handleServerErrors(serverErrors, setError);
|
|
145
196
|
}, [
|
|
146
197
|
serverErrors,
|
|
147
198
|
setError
|
|
148
199
|
]);
|
|
149
200
|
useEffect(function() {
|
|
150
|
-
window.history.pushState(null, "", window.location.pathname);
|
|
201
|
+
window.history.pushState(null, "", window.location.pathname + window.location.search);
|
|
151
202
|
window.addEventListener("beforeunload", onBeforeUnload);
|
|
152
203
|
window.addEventListener("popstate", onPopState);
|
|
153
204
|
return function() {
|
|
@@ -170,6 +221,13 @@ function ProductSetForm(_param) {
|
|
|
170
221
|
onApprove: onApproveDialog,
|
|
171
222
|
onDecline: onDeclineDialog
|
|
172
223
|
}),
|
|
224
|
+
/*#__PURE__*/ jsx(ErrorModal, {
|
|
225
|
+
message: errorMessage,
|
|
226
|
+
isOpen: !!errorMessage,
|
|
227
|
+
onClose: function() {
|
|
228
|
+
return setErrorMessage("");
|
|
229
|
+
}
|
|
230
|
+
}),
|
|
173
231
|
/*#__PURE__*/ jsx(FormProvider, _object_spread_props(_object_spread({}, form), {
|
|
174
232
|
children: /*#__PURE__*/ jsx(Form, {
|
|
175
233
|
onSubmit: form.handleSubmit(submitHandler(onSubmitAndRedirect)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAC;AAGhG,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAQtE,UAAU,wBAAwB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAClE,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAaD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,UAAU,mDAIrD,wBAAwB,CAAC,CAAC,CAAC,4CAqI7B,CAAC"}
|
|
@@ -11,8 +11,6 @@ import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
|
|
|
11
11
|
import { SortableTree } from '../../sortable-tree/SortableTree.js';
|
|
12
12
|
import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js';
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
-
// @ts-nocheck
|
|
16
14
|
function _array_like_to_array(arr, len) {
|
|
17
15
|
if (len == null || len > arr.length) len = arr.length;
|
|
18
16
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
1
2
|
import { CategoryType } from "@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper";
|
|
3
|
+
export declare const CATEGORY_TYPES_NAMES: {
|
|
4
|
+
readonly menuItems: "menuItems";
|
|
5
|
+
readonly tickets: "tickets";
|
|
6
|
+
readonly bookings: "bookings";
|
|
7
|
+
readonly game: "game";
|
|
8
|
+
readonly fixedDuration: "fixedDuration";
|
|
9
|
+
};
|
|
10
|
+
export type CategoryConfig = {
|
|
11
|
+
label: string;
|
|
12
|
+
icon: ReactElement;
|
|
13
|
+
};
|
|
2
14
|
export interface SelectCategoryModalProps {
|
|
3
15
|
isVisible: boolean;
|
|
4
16
|
onHide: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAC;AAG3D,OAAO,EAML,YAAY,EACb,MAAM,kEAAkE,CAAC;AAgB1E,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC;AA4BnE,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;CACpD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,MAAM,EACN,gBAAgB,GACjB,EAAE,wBAAwB,2CAyH1B"}
|