@licklist/design 0.67.4 → 0.67.5-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/Calendar.d.ts +2 -2
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +35 -40
- package/dist/calendar/utils/index.d.ts +2 -2
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/calendar/utils/index.js +20 -4
- package/dist/date-time-button/DateTimeButton.d.ts +1 -2
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +2 -3
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +2 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +4 -4
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +27 -26
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +2 -2
- 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 +3 -3
- 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/event/event-card/IframeEventCard.d.ts +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +9 -3
- 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/index.js +1 -0
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.d.ts +3 -1
- package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.js +172 -8
- package/dist/product-set/card/ProductSetCard.d.ts +6 -2
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +30 -11
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +3 -2
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +3 -1
- 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 +3 -3
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +4 -16
- 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 +6 -2
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +65 -5
- package/dist/product-set/form/ProductSetNameControl.d.ts +6 -0
- package/dist/product-set/form/ProductSetNameControl.d.ts.map +1 -0
- package/dist/product-set/form/ProductSetNameControl.js +35 -0
- 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/form/index.d.ts +1 -0
- package/dist/product-set/form/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.d.ts +7 -0
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +10 -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 +41 -2
- package/dist/provider/location-input/LocationInputDescription.d.ts +4 -1
- package/dist/provider/location-input/LocationInputDescription.d.ts.map +1 -1
- package/dist/provider/location-input/LocationInputDescription.js +27 -12
- 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 +7 -3
- 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 +7 -3
- 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/RecurrenceIntervalAndFrequencyInput.d.ts +2 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.js +7 -13
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +4 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +7 -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 +72 -3
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +4 -7
- package/dist/sales/guest-profile/previous-bookings/PreviousBookings.js +1 -1
- package/dist/sales/manual-booking/formatDays.js +3 -3
- package/dist/sales/manual-booking/select-event/SelectEvent.d.ts.map +1 -1
- package/dist/sales/manual-booking/select-event/SelectEvent.js +3 -3
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +2 -2
- package/dist/sales/notes/NotesTableRow.js +3 -4
- 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/typeahead/Typeahead.d.ts +5 -1
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +9 -2
- package/dist/zone/form/ZoneForm.d.ts +3 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +4 -2
- package/dist/zone/form/components/ZoneControl.d.ts +3 -2
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +5 -2
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +5 -4
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +5 -2
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/package.json +10 -10
- 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/Calendar.stories.tsx +0 -2
- package/src/calendar/Calendar.tsx +1 -4
- package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +31 -28
- package/src/calendar/utils/index.ts +26 -4
- package/src/date-time-button/DateTimeButton.stories.tsx +0 -1
- package/src/date-time-button/DateTimeButton.tsx +1 -6
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +3 -2
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +35 -37
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +3 -3
- 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-card/IframeEventCard.tsx +16 -2
- 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/modals/confirmation/ConfirmModal.tsx +19 -3
- package/src/product-set/card/ProductSetCard.stories.tsx +3 -1
- package/src/product-set/card/ProductSetCard.tsx +47 -8
- package/src/product-set/control/DateAndRecurrenceInput.tsx +6 -4
- package/src/product-set/control/DateInput.tsx +2 -1
- package/src/product-set/control/ProductSetControl.tsx +4 -15
- package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +2 -2
- package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
- package/src/product-set/form/ProductSetForm.tsx +25 -3
- package/src/product-set/form/ProductSetNameControl.tsx +27 -0
- 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/form/index.ts +1 -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/product-set/utils/index.ts +11 -0
- package/src/provider/location-input/LocationInput.tsx +36 -1
- package/src/provider/location-input/LocationInputDescription.tsx +23 -11
- package/src/provider/location-input/index.ts +1 -0
- package/src/provider/provider-form/ProviderForm.tsx +7 -2
- package/src/provider/venue-form/VenueForm.tsx +5 -2
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +8 -22
- package/src/recurring-date-picker-input/RecurringDatePickerInput.stories.tsx +11 -4
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +17 -3
- package/src/recurring-date-picker-input/utils.ts +86 -1
- package/src/sales/booking/results/components/ResultCard.tsx +4 -10
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +1 -1
- package/src/sales/manual-booking/formatDays.ts +3 -3
- package/src/sales/manual-booking/select-event/SelectEvent.tsx +2 -2
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +2 -2
- package/src/sales/notes/NotesTableRow.tsx +3 -3
- 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 +6 -0
- 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/typeahead/Typeahead.tsx +15 -1
- package/src/zone/form/ZoneForm.tsx +9 -2
- package/src/zone/form/components/ZoneControl.tsx +8 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +10 -5
- package/src/zone/form/utils/dates.ts +9 -10
- package/yarn.lock +127 -140
- package/dist/assets/iframe/selectArrow.svg.js +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":"AAAA,OAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAG1D,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,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,kBAAkB,CAAC;IACrC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CACnD;AAED,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,WAAW,EACX,UAAkB,EAClB,gBAAgB,EAChB,IAAS,EACT,KAAK,EACL,aAAa,EACb,eAAe,EACf,YAAoB,EACpB,gBAAqB,EACrB,SAAS,GACV,EAAE,cAAc,2CAoDhB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -31,7 +31,7 @@ function _object_spread(target) {
|
|
|
31
31
|
return target;
|
|
32
32
|
}
|
|
33
33
|
function Typeahead(param) {
|
|
34
|
-
var options = param.options, placeholder = param.placeholder, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, isMultipleChoise = param.isMultipleChoise, _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_isCouponForm = param.isCouponForm, isCouponForm = _param_isCouponForm === void 0 ? false : _param_isCouponForm, _param_noOptionsMessage = param.noOptionsMessage, noOptionsMessage = _param_noOptionsMessage === void 0 ? "" : _param_noOptionsMessage, isInvalid = param.isInvalid;
|
|
34
|
+
var options = param.options, placeholder = param.placeholder, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, isMultipleChoise = param.isMultipleChoise, _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, value = param.value, onChangeValue = param.onChangeValue, containerStyles = param.containerStyles, _param_isCouponForm = param.isCouponForm, isCouponForm = _param_isCouponForm === void 0 ? false : _param_isCouponForm, _param_noOptionsMessage = param.noOptionsMessage, noOptionsMessage = _param_noOptionsMessage === void 0 ? "" : _param_noOptionsMessage, isInvalid = param.isInvalid;
|
|
35
35
|
var control = useFormContext().control;
|
|
36
36
|
var getStyle = function() {
|
|
37
37
|
var couponFormStyle = isCouponForm ? {
|
|
@@ -53,14 +53,21 @@ function Typeahead(param) {
|
|
|
53
53
|
var field = param.field;
|
|
54
54
|
return /*#__PURE__*/ jsx(Select, {
|
|
55
55
|
placeholder: placeholder,
|
|
56
|
-
value: field.value,
|
|
56
|
+
value: value !== null && value !== void 0 ? value : field.value,
|
|
57
57
|
isMulti: isMultipleChoise,
|
|
58
58
|
styles: {
|
|
59
|
+
container: function(base) {
|
|
60
|
+
return _object_spread({}, base, containerStyles);
|
|
61
|
+
},
|
|
59
62
|
control: function(base) {
|
|
60
63
|
return _object_spread({}, base, getStyle());
|
|
61
64
|
}
|
|
62
65
|
},
|
|
63
66
|
onChange: function(value) {
|
|
67
|
+
if (onChangeValue) {
|
|
68
|
+
onChangeValue(value);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
64
71
|
field.onChange(value);
|
|
65
72
|
},
|
|
66
73
|
options: options,
|
|
@@ -6,10 +6,11 @@ export type ZoneFormProps = {
|
|
|
6
6
|
onSubmit: (values: Partial<Zone>) => void;
|
|
7
7
|
serverErrors?: ServerError;
|
|
8
8
|
isLoading?: boolean;
|
|
9
|
-
workHours
|
|
9
|
+
workHours: WorkHour[] | undefined;
|
|
10
|
+
timeZone: string;
|
|
10
11
|
};
|
|
11
12
|
export type ZoneFormValues = Partial<Zone> & {
|
|
12
13
|
localImageBlobURL?: string;
|
|
13
14
|
};
|
|
14
|
-
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, }: ZoneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, workHours, timeZone, }: ZoneFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
//# sourceMappingURL=ZoneForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,
|
|
1
|
+
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,QAAQ,+EAOlB,aAAa,4CAqDf,CAAC"}
|
|
@@ -86,7 +86,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
86
86
|
return target;
|
|
87
87
|
}
|
|
88
88
|
var ZoneForm = function(param) {
|
|
89
|
-
var defaultValues = param.defaultValues, onSubmit = param.onSubmit, serverErrors = param.serverErrors, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading;
|
|
89
|
+
var defaultValues = param.defaultValues, onSubmit = param.onSubmit, serverErrors = param.serverErrors, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, workHours = param.workHours, timeZone = param.timeZone;
|
|
90
90
|
var t = useTranslation("Design").t;
|
|
91
91
|
var form = useForm({
|
|
92
92
|
mode: "onChange",
|
|
@@ -121,7 +121,9 @@ var ZoneForm = function(param) {
|
|
|
121
121
|
onSubmit: handleSubmit(onFormSubmit),
|
|
122
122
|
children: [
|
|
123
123
|
/*#__PURE__*/ jsx(ZoneControl, {
|
|
124
|
-
isLoading: isLoading
|
|
124
|
+
isLoading: isLoading,
|
|
125
|
+
workHours: workHours,
|
|
126
|
+
timeZone: timeZone
|
|
125
127
|
}),
|
|
126
128
|
/*#__PURE__*/ jsxs(Row, {
|
|
127
129
|
children: [
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
2
2
|
export type ZoneControlProps = {
|
|
3
3
|
isLoading: boolean;
|
|
4
|
-
workHours
|
|
4
|
+
workHours: WorkHour[] | undefined;
|
|
5
|
+
timeZone: string;
|
|
5
6
|
};
|
|
6
|
-
export declare const ZoneControl: ({ isLoading }: ZoneControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const ZoneControl: ({ isLoading, workHours, timeZone, }: ZoneControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
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":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,
|
|
1
|
+
{"version":3,"file":"ZoneControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAStF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,WAAW,wCAIrB,gBAAgB,4CA0BlB,CAAC"}
|
|
@@ -9,7 +9,7 @@ import { ZoneImageControl } from './ZoneImageControl.js';
|
|
|
9
9
|
import { GameDurationControl } from './GameDurationControl.js';
|
|
10
10
|
|
|
11
11
|
var ZoneControl = function(param) {
|
|
12
|
-
var isLoading = param.isLoading;
|
|
12
|
+
var isLoading = param.isLoading, workHours = param.workHours, timeZone = param.timeZone;
|
|
13
13
|
return /*#__PURE__*/ jsx(Row, {
|
|
14
14
|
children: /*#__PURE__*/ jsxs(Col, {
|
|
15
15
|
md: 6,
|
|
@@ -19,7 +19,10 @@ var ZoneControl = function(param) {
|
|
|
19
19
|
/*#__PURE__*/ jsx(NameControl, {
|
|
20
20
|
isLoading: isLoading
|
|
21
21
|
}),
|
|
22
|
-
/*#__PURE__*/ jsx(ZoneRecurrencesControl, {
|
|
22
|
+
/*#__PURE__*/ jsx(ZoneRecurrencesControl, {
|
|
23
|
+
workHours: workHours,
|
|
24
|
+
timeZone: timeZone
|
|
25
|
+
}),
|
|
23
26
|
/*#__PURE__*/ jsx("hr", {}),
|
|
24
27
|
/*#__PURE__*/ jsxs(Row, {
|
|
25
28
|
children: [
|
|
@@ -3,9 +3,10 @@ import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMa
|
|
|
3
3
|
export interface DateAndRecurrenceInputValues {
|
|
4
4
|
zoneRecurrences?: Partial<ZoneRecurrence>[];
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
workHours
|
|
8
|
-
|
|
6
|
+
type ZoneRecurrenceControlProps = {
|
|
7
|
+
workHours: WorkHour[] | undefined;
|
|
8
|
+
timeZone: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const ZoneRecurrencesControl: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const ZoneRecurrencesControl: ({ workHours, timeZone, }: ZoneRecurrenceControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
11
12
|
//# sourceMappingURL=ZoneRecurrencesControl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneRecurrencesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneRecurrencesControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAC;AAMlG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAWtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;CAC7C;AAED,
|
|
1
|
+
{"version":3,"file":"ZoneRecurrencesControl.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/components/ZoneRecurrencesControl.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAC;AAMlG,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAWtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;CAC7C;AAED,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,sBAAsB,6BAGhC,0BAA0B,4CAoM5B,CAAC"}
|
|
@@ -211,7 +211,8 @@ function _ts_generator(thisArg, body) {
|
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
var ZoneRecurrencesControl = function() {
|
|
214
|
+
var ZoneRecurrencesControl = function(param) {
|
|
215
|
+
var workHours = param.workHours, timeZone = param.timeZone;
|
|
215
216
|
var _errors_zoneRecurrences;
|
|
216
217
|
var _useFormContext = useFormContext(), control = _useFormContext.control, register = _useFormContext.register, errors = _useFormContext.formState.errors, getValues = _useFormContext.getValues, setValue = _useFormContext.setValue, clearErrors = _useFormContext.clearErrors;
|
|
217
218
|
var _useFieldArray = useFieldArray({
|
|
@@ -348,7 +349,9 @@ var ZoneRecurrencesControl = function() {
|
|
|
348
349
|
defaultValues: editState.values,
|
|
349
350
|
onChange: handleRecurringDateChange,
|
|
350
351
|
onDelete: handleDelete,
|
|
351
|
-
setInitialStartDateAfterSelect: true
|
|
352
|
+
setInitialStartDateAfterSelect: true,
|
|
353
|
+
workHours: workHours,
|
|
354
|
+
timeZone: timeZone
|
|
352
355
|
})
|
|
353
356
|
})
|
|
354
357
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/utils/dates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAOtF,eAAO,MAAM,qBAAqB,cACrB,MAAM,WACR,MAAM,6BAuChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"dates.d.ts","sourceRoot":"","sources":["../../../../src/zone/form/utils/dates.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAOtF,eAAO,MAAM,qBAAqB,cACrB,MAAM,WACR,MAAM,6BAuChB,CAAC;AAEF,eAAO,MAAM,wBAAwB,eAAgB,QAAQ,EAAE,aAyC9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.67.
|
|
3
|
+
"version": "0.67.5-dev.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.29.1",
|
|
45
|
+
"@licklist/core": "0.29.1-dev.3",
|
|
46
46
|
"@licklist/eslint-config": "0.5.5",
|
|
47
|
-
"@licklist/plugins": "0.32.0",
|
|
47
|
+
"@licklist/plugins": "0.32.0-dev.3",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
|
-
"luxon": "
|
|
49
|
+
"luxon": "3.5.0",
|
|
50
50
|
"react": "17.0.2",
|
|
51
51
|
"react-dom": "17.0.2",
|
|
52
52
|
"react-hook-form": "7.52.2",
|
|
@@ -61,10 +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
|
-
"@
|
|
65
|
-
"@licklist/core": "0.29.1",
|
|
64
|
+
"@licklist/core": "0.29.1-dev.3",
|
|
66
65
|
"@licklist/eslint-config": "0.5.5",
|
|
67
|
-
"@licklist/plugins": "0.32.0",
|
|
66
|
+
"@licklist/plugins": "0.32.0-dev.3",
|
|
68
67
|
"@mdx-js/react": "1.6.22",
|
|
69
68
|
"@popperjs/core": "2.11.8",
|
|
70
69
|
"@react-aria/utils": "3.9.0",
|
|
@@ -101,7 +100,7 @@
|
|
|
101
100
|
"framer-motion": "4.1.17",
|
|
102
101
|
"konva": "6.0.0",
|
|
103
102
|
"lodash": "4.17.21",
|
|
104
|
-
"luxon": "
|
|
103
|
+
"luxon": "3.5.0",
|
|
105
104
|
"moment": "2.29.1",
|
|
106
105
|
"react": "17.0.2",
|
|
107
106
|
"react-bootstrap": "1.6.1",
|
|
@@ -145,7 +144,7 @@
|
|
|
145
144
|
"@svgr/rollup": "8.1.0",
|
|
146
145
|
"@swc/core": "1.6.5",
|
|
147
146
|
"@types/lodash": "4.17.5",
|
|
148
|
-
"@types/luxon": "
|
|
147
|
+
"@types/luxon": "3.4.2",
|
|
149
148
|
"@types/mdx-js__react": "1.5.3",
|
|
150
149
|
"@types/node": "20.9.0",
|
|
151
150
|
"@types/react": "17.0.80",
|
|
@@ -200,5 +199,6 @@
|
|
|
200
199
|
"volta": {
|
|
201
200
|
"node": "20.9.0",
|
|
202
201
|
"yarn": "4.4.0"
|
|
203
|
-
}
|
|
202
|
+
},
|
|
203
|
+
"stableVersion": "0.66.7-dev.5"
|
|
204
204
|
}
|
|
@@ -33,7 +33,6 @@ Default.args = {
|
|
|
33
33
|
getDateTimeButtonProps: () => ({
|
|
34
34
|
resources: [],
|
|
35
35
|
showResources: false,
|
|
36
|
-
shouldCalculateResources: false,
|
|
37
36
|
isDisabled: false,
|
|
38
37
|
}),
|
|
39
38
|
};
|
|
@@ -56,7 +55,6 @@ Loading.args = {
|
|
|
56
55
|
getDateTimeButtonProps: () => ({
|
|
57
56
|
resources: [],
|
|
58
57
|
showResources: false,
|
|
59
|
-
shouldCalculateResources: false,
|
|
60
58
|
isDisabled: false,
|
|
61
59
|
}),
|
|
62
60
|
};
|
|
@@ -23,10 +23,7 @@ export type CalendarProps = {
|
|
|
23
23
|
initialDate?: DateTime;
|
|
24
24
|
getDateTimeButtonProps: (
|
|
25
25
|
date: DateTime,
|
|
26
|
-
) => Pick<
|
|
27
|
-
DateTimeButtonProps,
|
|
28
|
-
"resources" | "showResources" | "shouldCalculateResources" | "isDisabled"
|
|
29
|
-
>;
|
|
26
|
+
) => Pick<DateTimeButtonProps, "resources" | "showResources" | "isDisabled">;
|
|
30
27
|
};
|
|
31
28
|
|
|
32
29
|
export const Calendar = (props: CalendarProps) => {
|
|
@@ -2,7 +2,7 @@ import { useCallback, useMemo } from "react";
|
|
|
2
2
|
import { Button } from "react-bootstrap";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
4
|
import { range } from "lodash";
|
|
5
|
-
import {
|
|
5
|
+
import { DateTime } from "luxon";
|
|
6
6
|
import { CalendarSelect } from "../CalendarSelect";
|
|
7
7
|
import { CalendarProps } from "../../Calendar";
|
|
8
8
|
|
|
@@ -26,15 +26,21 @@ export const CalendarButtons = ({
|
|
|
26
26
|
}: CalendarButtonsProps) => {
|
|
27
27
|
const { t } = useTranslation("Design");
|
|
28
28
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
const onSelectMonth = useCallback(
|
|
30
|
+
(value: string) => {
|
|
31
|
+
const selectedMonth = Number(value);
|
|
32
|
+
const nextDateTime = currentDate.set({ month: selectedMonth });
|
|
33
|
+
|
|
34
|
+
if (nextDateTime <= initialDate) {
|
|
35
|
+
setCurrentDate(initialDate);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
setCurrentDate(nextDateTime);
|
|
40
|
+
},
|
|
36
41
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
37
|
-
|
|
42
|
+
[setCurrentDate, currentDate],
|
|
43
|
+
);
|
|
38
44
|
|
|
39
45
|
const yearOptions = useMemo(() => {
|
|
40
46
|
return range(initialDate.year, initialDate.year + 5, 1).map((year) => {
|
|
@@ -42,10 +48,18 @@ export const CalendarButtons = ({
|
|
|
42
48
|
});
|
|
43
49
|
}, [initialDate]);
|
|
44
50
|
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
const monthOptions = useMemo(() => {
|
|
52
|
+
const initialMonth =
|
|
53
|
+
currentDate.year > initialDate.year ? 1 : initialDate.month;
|
|
54
|
+
return range(initialMonth, 13).map((monthNumber) => {
|
|
55
|
+
return {
|
|
56
|
+
label: DateTime.fromObject({ month: monthNumber }).toLocaleString({
|
|
57
|
+
month: "long",
|
|
58
|
+
}),
|
|
59
|
+
value: monthNumber,
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
}, [initialDate, currentDate]);
|
|
49
63
|
|
|
50
64
|
const onSelectYear = (value: string) => {
|
|
51
65
|
const selectedYear = Number(value);
|
|
@@ -107,22 +121,11 @@ export const CalendarButtons = ({
|
|
|
107
121
|
<hr />
|
|
108
122
|
<div className="calendar-buttons">
|
|
109
123
|
<div className="buttons-wrapper">
|
|
110
|
-
<
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
>
|
|
116
|
-
<SelectArrow />
|
|
117
|
-
</Button>
|
|
118
|
-
<div className="month-title">{currentDate.toFormat("MMMM")}</div>
|
|
119
|
-
<Button
|
|
120
|
-
className="calendar-button"
|
|
121
|
-
onClick={onSelectNextMonth}
|
|
122
|
-
variant="link"
|
|
123
|
-
>
|
|
124
|
-
<SelectArrow />
|
|
125
|
-
</Button>
|
|
124
|
+
<CalendarSelect
|
|
125
|
+
options={monthOptions}
|
|
126
|
+
onChange={onSelectMonth}
|
|
127
|
+
value={currentDate.month}
|
|
128
|
+
/>
|
|
126
129
|
</div>
|
|
127
130
|
<CalendarSelect
|
|
128
131
|
options={yearOptions}
|
|
@@ -1,18 +1,40 @@
|
|
|
1
1
|
import { DateTime, Interval } from "luxon";
|
|
2
2
|
|
|
3
|
-
export const getMonthCalendarDates = (
|
|
3
|
+
export const getMonthCalendarDates = (
|
|
4
|
+
initialDate: DateTime,
|
|
5
|
+
timeZone?: string,
|
|
6
|
+
): DateTime[] => {
|
|
4
7
|
const startOfMonth = initialDate.startOf("month");
|
|
5
8
|
const endOfMonth = initialDate.endOf("month");
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
const dateTimes = Interval.fromDateTimes(startOfMonth, endOfMonth)
|
|
8
11
|
.splitBy({ day: 1 })
|
|
9
12
|
.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;
|
|
10
21
|
};
|
|
11
22
|
|
|
12
|
-
export const getWeekCalendarDates = (
|
|
23
|
+
export const getWeekCalendarDates = (
|
|
24
|
+
initialDate: DateTime,
|
|
25
|
+
timeZone?: string,
|
|
26
|
+
): DateTime[] => {
|
|
13
27
|
const lastDay = initialDate.plus({ days: 7 });
|
|
14
28
|
|
|
15
|
-
|
|
29
|
+
const dateTimes = Interval.fromDateTimes(initialDate, lastDay)
|
|
16
30
|
.splitBy({ day: 1 })
|
|
17
31
|
.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;
|
|
18
40
|
};
|
|
@@ -20,7 +20,6 @@ export type DateTimeButtonProps = {
|
|
|
20
20
|
price?: string | number | ReactElement | null;
|
|
21
21
|
resources?: ZoneResourcesAvailability | null;
|
|
22
22
|
showResources?: boolean;
|
|
23
|
-
shouldCalculateResources?: boolean;
|
|
24
23
|
variant: Variant;
|
|
25
24
|
};
|
|
26
25
|
|
|
@@ -33,15 +32,11 @@ export const DateTimeButton = ({
|
|
|
33
32
|
price,
|
|
34
33
|
resources,
|
|
35
34
|
showResources,
|
|
36
|
-
shouldCalculateResources = true,
|
|
37
35
|
variant = Variant.week,
|
|
38
36
|
}: DateTimeButtonProps) => {
|
|
39
37
|
const isSoldOut =
|
|
40
38
|
_isSoldOut ||
|
|
41
|
-
|
|
42
|
-
(shouldCalculateResources &&
|
|
43
|
-
resources &&
|
|
44
|
-
resources.bookedResources >= resources.totalResources);
|
|
39
|
+
(resources && resources.bookedResources >= resources.totalResources);
|
|
45
40
|
|
|
46
41
|
const isTimeVariant = variant === Variant.time;
|
|
47
42
|
|
|
@@ -64,6 +64,7 @@ export interface EditEventFormProps extends HasPermissionProp {
|
|
|
64
64
|
createProductSet: (props: EditEventFormValues) => void;
|
|
65
65
|
setEditProductSetId: (value: string) => void;
|
|
66
66
|
isExternalPaymentLinkEnabled?: boolean;
|
|
67
|
+
timeZone: string;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
const eventImageTypes = {
|
|
@@ -83,6 +84,7 @@ export const EditEventForm = ({
|
|
|
83
84
|
createProductSet,
|
|
84
85
|
setEditProductSetId,
|
|
85
86
|
isExternalPaymentLinkEnabled,
|
|
87
|
+
timeZone,
|
|
86
88
|
}: EditEventFormProps) => {
|
|
87
89
|
const { t } = useTranslation(["Design", "Validation"]);
|
|
88
90
|
|
|
@@ -122,7 +124,6 @@ export const EditEventForm = ({
|
|
|
122
124
|
const visible = watch("visible");
|
|
123
125
|
const editedProductSet = watch("editedProductSet");
|
|
124
126
|
const productSetId = watch("productSetId");
|
|
125
|
-
const occurrenceStartAtDate = watch("start");
|
|
126
127
|
|
|
127
128
|
const {
|
|
128
129
|
images,
|
|
@@ -404,7 +405,7 @@ export const EditEventForm = ({
|
|
|
404
405
|
setEditProductSetId={setEditProductSetId}
|
|
405
406
|
setShowEditProductSet={setShowEditProductSet}
|
|
406
407
|
showEditProductSet={showEditProductSet}
|
|
407
|
-
|
|
408
|
+
timeZone={timeZone}
|
|
408
409
|
/>
|
|
409
410
|
|
|
410
411
|
{hasPermission && !showEditProductSet && (
|
package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx
CHANGED
|
@@ -5,9 +5,11 @@ import { useId } from "@react-aria/utils";
|
|
|
5
5
|
import { Controller, useFormContext } from "react-hook-form";
|
|
6
6
|
import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
|
|
7
7
|
import { ProductSet } from "@licklist/core/dist/DataMapper/Product/ProductSetDataMapper";
|
|
8
|
+
import { getTypeHeadItemsFromMenus } from "../../../../product-set/utils";
|
|
8
9
|
import { ConfirmModal } from "../../../../modals/confirmation/ConfirmModal";
|
|
9
10
|
import { EditEventFormValues } from "../EditEventForm/EditEventForm";
|
|
10
11
|
import { EditEventProductSet } from "./component/EditEventProductSet";
|
|
12
|
+
import { Typeahead } from "../../../../typeahead";
|
|
11
13
|
|
|
12
14
|
interface SelectEventProductSetProps extends HasPermissionProp {
|
|
13
15
|
productSets?: ProductSet[];
|
|
@@ -15,7 +17,7 @@ interface SelectEventProductSetProps extends HasPermissionProp {
|
|
|
15
17
|
setShowEditProductSet: (value: boolean) => void;
|
|
16
18
|
createProductSet: (props: EditEventFormValues) => void;
|
|
17
19
|
setEditProductSetId: (value: string) => void;
|
|
18
|
-
|
|
20
|
+
timeZone: string;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export const SelectEventProductSet = ({
|
|
@@ -24,7 +26,7 @@ export const SelectEventProductSet = ({
|
|
|
24
26
|
setEditProductSetId,
|
|
25
27
|
showEditProductSet,
|
|
26
28
|
setShowEditProductSet,
|
|
27
|
-
|
|
29
|
+
timeZone,
|
|
28
30
|
}: SelectEventProductSetProps) => {
|
|
29
31
|
const { t } = useTranslation(["Design"]);
|
|
30
32
|
const form = useFormContext<EditEventFormValues>();
|
|
@@ -42,6 +44,21 @@ export const SelectEventProductSet = ({
|
|
|
42
44
|
const productSetId = watch("productSetId");
|
|
43
45
|
const editedProductSet = watch("editedProductSet");
|
|
44
46
|
|
|
47
|
+
const typeheadValues = getTypeHeadItemsFromMenus(
|
|
48
|
+
editedProductSet
|
|
49
|
+
? productSets.map((productSet) => {
|
|
50
|
+
if (productSet.id === editedProductSet.id) {
|
|
51
|
+
return editedProductSet;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return productSet;
|
|
55
|
+
})
|
|
56
|
+
: productSets,
|
|
57
|
+
);
|
|
58
|
+
const selectedProductSetTypeheadValue = productSetId
|
|
59
|
+
? typeheadValues?.find((typeheadValue) => typeheadValue.id === productSetId)
|
|
60
|
+
: undefined;
|
|
61
|
+
|
|
45
62
|
const onEditProductSet = useCallback(
|
|
46
63
|
() => {
|
|
47
64
|
setEditProductSetId(String(productSetId));
|
|
@@ -95,6 +112,7 @@ export const SelectEventProductSet = ({
|
|
|
95
112
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
96
113
|
const onSubmit = (value: EditEventFormValues["editedProductSet"]) => {
|
|
97
114
|
setShowEditProductSet(false);
|
|
115
|
+
setValue("productSetId", value.id);
|
|
98
116
|
setValue("editedProductSet", value);
|
|
99
117
|
};
|
|
100
118
|
|
|
@@ -110,49 +128,29 @@ export const SelectEventProductSet = ({
|
|
|
110
128
|
<Controller
|
|
111
129
|
control={control}
|
|
112
130
|
name="productSetId"
|
|
113
|
-
render={(
|
|
114
|
-
const fieldValue = String(field.value);
|
|
131
|
+
render={() => {
|
|
115
132
|
return (
|
|
116
133
|
<>
|
|
117
134
|
<div className="d-flex align-items-center flex-row w-100">
|
|
118
135
|
<ConfirmModal>
|
|
119
136
|
{(confirm) => {
|
|
120
137
|
return (
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
138
|
+
<Typeahead
|
|
139
|
+
name="productSetId"
|
|
140
|
+
value={selectedProductSetTypeheadValue}
|
|
141
|
+
containerStyles={{ width: "100%" }}
|
|
142
|
+
onChangeValue={(typeheadValue) => {
|
|
124
143
|
onChangeProductSet(
|
|
125
|
-
Number(
|
|
144
|
+
Number(typeheadValue.id),
|
|
126
145
|
confirm,
|
|
127
|
-
)
|
|
128
|
-
}
|
|
129
|
-
isInvalid={Boolean(errors.productSetId)}
|
|
130
|
-
value={fieldValue}
|
|
131
|
-
>
|
|
132
|
-
<option value="" hidden>
|
|
133
|
-
{t("Design:chooseProductSet")}
|
|
134
|
-
</option>
|
|
135
|
-
{productSets?.map((productSet) => {
|
|
136
|
-
const isCurrentEditedProductSet =
|
|
137
|
-
editedProductSet &&
|
|
138
|
-
editedProductSet?.id === productSet?.id;
|
|
139
|
-
return (
|
|
140
|
-
<option
|
|
141
|
-
key={productSet.id}
|
|
142
|
-
value={productSet.id}
|
|
143
|
-
>
|
|
144
|
-
{isCurrentEditedProductSet ||
|
|
145
|
-
productSet.isOverride
|
|
146
|
-
? `[${t("edited")}] ${
|
|
147
|
-
isCurrentEditedProductSet
|
|
148
|
-
? editedProductSet?.name
|
|
149
|
-
: productSet.name
|
|
150
|
-
}`
|
|
151
|
-
: productSet.name}
|
|
152
|
-
</option>
|
|
153
146
|
);
|
|
154
|
-
}
|
|
155
|
-
|
|
147
|
+
}}
|
|
148
|
+
options={typeheadValues}
|
|
149
|
+
placeholder={t("Design:choose")}
|
|
150
|
+
noOptionsMessage={t(
|
|
151
|
+
"Design:noAvailableProductSets",
|
|
152
|
+
)}
|
|
153
|
+
/>
|
|
156
154
|
);
|
|
157
155
|
}}
|
|
158
156
|
</ConfirmModal>
|
|
@@ -211,10 +209,10 @@ export const SelectEventProductSet = ({
|
|
|
211
209
|
{showEditProductSet && productSetId && (
|
|
212
210
|
<EditEventProductSet
|
|
213
211
|
onSubmit={onSubmit}
|
|
214
|
-
occurrenceStartAtDate={occurrenceStartAtDate}
|
|
215
212
|
defaultValues={
|
|
216
213
|
productSetId === editedProductSet?.id && editedProductSet
|
|
217
214
|
}
|
|
215
|
+
timeZone={timeZone}
|
|
218
216
|
/>
|
|
219
217
|
)}
|
|
220
218
|
</>
|