@licklist/design 0.71.24 → 0.72.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/auth/Layout/AuthNavComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/auth/Login/LoginFormComponent.d.ts.map +1 -1
- package/dist/auth/Logout/Logout.js +1 -0
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterFormComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordFormComponent.d.ts.map +1 -1
- package/dist/auth/Router.d.ts.map +1 -1
- package/dist/auth/Router.js +2 -0
- package/dist/calendar/utils/index.d.ts +1 -1
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts +3 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +11 -4
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +3 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +20 -6
- package/dist/events/edit-event-modal/component/SaleDeadline/SaleDeadline.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +3 -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/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts +5 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.js +5 -3
- package/dist/events/event-card/EventCard.d.ts +2 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +11 -2
- package/dist/events/event-card/utils.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +2 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +2 -2
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/hooks/useTableData.js +2 -1
- package/dist/events/event-statistic-modal/utils/index.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/utils/index.js +3 -3
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/EventVenueMap.js +1 -0
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.js +11 -4
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts +18 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.js +295 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts +15 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.js +90 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts +14 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.js +404 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts +10 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.js +87 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts +2 -0
- package/dist/iframe/ProductWithModifierModal/ModifierSetModal/index.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/index.d.ts +2 -0
- package/dist/iframe/ProductWithModifierModal/index.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/utils.d.ts +5 -0
- package/dist/iframe/ProductWithModifierModal/utils.d.ts.map +1 -0
- package/dist/iframe/ProductWithModifierModal/utils.js +21 -0
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts +3 -1
- package/dist/iframe/event/ticket-description/TicketDescription.d.ts.map +1 -1
- package/dist/iframe/event/ticket-description/TicketDescription.js +10 -7
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts +5 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +12 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.js +3 -3
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +4 -0
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +29 -2
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +106 -2
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +13 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +3 -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 +95 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts +23 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.d.ts.map +1 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.js +62 -0
- package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts +2 -0
- package/dist/iframe/order-process/components/CategoryProduct/constants.d.ts.map +1 -0
- package/dist/iframe/order-process/components/CategoryProduct/constants.js +4 -0
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts +6 -0
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.d.ts.map +1 -0
- package/dist/iframe/order-process/components/utils/useOnWindowUnmount.js +18 -0
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +83 -10
- package/dist/iframe/payment/order-items-table/utils/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/index.js +15 -0
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +2 -2
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +2 -2
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -0
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +4 -5
- package/dist/index.js +2 -1
- package/dist/layout/DropDown.d.ts +2 -1
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +3 -0
- package/dist/notification/sms-template/card/SmsTemplateCard.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +7 -2
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +7 -5
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +0 -2
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +26 -6
- 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 +1 -1
- 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/context.d.ts +3 -1
- package/dist/product-set/form/context.d.ts.map +1 -1
- package/dist/product-set/form/context.js +2 -1
- package/dist/product-set/product/ProductControl.d.ts +8 -0
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +25 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +3 -0
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
- package/dist/product-set/utils/index.d.ts +88 -0
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +19 -1
- package/dist/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +7 -3
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.js +1 -0
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.js +3 -0
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.js +3 -0
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +0 -2
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +21 -0
- package/dist/sales/coupon/utils/index.d.ts +2 -1
- package/dist/sales/coupon/utils/index.d.ts.map +1 -1
- package/dist/sales/life-time-sales/LifeTimeSalesChart.js +1 -0
- package/dist/sales/manual-booking/select-event/SelectEvent.js +1 -0
- package/dist/sales/manual-booking/select-menu/SelectMenu.js +1 -0
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -0
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.js +16 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +4 -1
- package/dist/setting/dashboard/snippet-templates/card/SnippetTemplateCard.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 +3 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +3 -0
- package/dist/static/date-range-input/utils/index.d.ts +1 -1
- package/dist/static/date-range-input/utils/index.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +3 -0
- package/dist/static/loader/FullScreenLoader.d.ts +8 -0
- package/dist/static/loader/FullScreenLoader.d.ts.map +1 -0
- package/dist/static/loader/FullScreenLoader.js +41 -0
- package/dist/static/loader/LoaderIndicator.d.ts +2 -3
- package/dist/static/loader/LoaderIndicator.d.ts.map +1 -1
- package/dist/static/loader/LoaderIndicator.js +4 -2
- package/dist/static/loader/index.d.ts +1 -0
- package/dist/static/loader/index.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.js +3 -0
- package/dist/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
- package/dist/styles/date-time-button/DateTimeButton.scss +7 -0
- package/dist/styles/events/EditEventModal.scss +2 -0
- package/dist/styles/iframe-events/Calendar.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/iframe-page/Page.scss +16 -0
- package/dist/styles/iframe-page/PageBody.scss +4 -0
- package/dist/styles/modals/Modals.scss +16 -0
- package/dist/styles/product-set/EditProductSetElement.scss +1 -0
- package/dist/styles/product-set/ProductSetForm.scss +13 -3
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -4
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/ManualBooking.scss +6 -0
- package/dist/styles/static/Loader.scss +9 -0
- package/dist/styles/themes/bookedit/index.scss +19 -0
- package/dist/zone/form/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +3 -0
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +3 -0
- package/package.json +8 -6
- package/src/affiliate/form/AffiliateForm.tsx +1 -0
- package/src/auth/Layout/AuthNavComponent.tsx +4 -0
- package/src/auth/Login/LoginComponent.tsx +3 -1
- package/src/auth/Login/LoginFormComponent.tsx +2 -0
- package/src/auth/Register/RegisterComponent.tsx +2 -0
- package/src/auth/Register/RegisterFormComponent.tsx +4 -0
- package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +4 -0
- package/src/auth/Router.tsx +2 -0
- package/src/calendar/Calendar.stories.tsx +2 -2
- package/src/calendar/utils/index.ts +1 -1
- package/src/events/edit-event-modal/IntervalInput.tsx +13 -3
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +24 -2
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +9 -7
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +0 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +9 -1
- package/src/events/event-card/EventCard.tsx +15 -4
- package/src/events/event-card/utils.ts +10 -9
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +3 -1
- package/src/events/event-statistic-modal/hooks/useTableData.tsx +2 -1
- package/src/events/event-statistic-modal/utils/index.ts +6 -5
- package/src/events/event-venue-map/EventVenueMap.tsx +1 -0
- package/src/events/event-venue-map/hooks/useCanvasSize.ts +5 -1
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetForm.tsx +212 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/ProductWithModifierSetModal.tsx +76 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ModifierSetControll.tsx +393 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx +98 -0
- package/src/iframe/ProductWithModifierModal/ModifierSetModal/index.ts +1 -0
- package/src/iframe/ProductWithModifierModal/index.ts +1 -0
- package/src/iframe/ProductWithModifierModal/utils.ts +29 -0
- package/src/iframe/event/ticket-description/TicketDescription.tsx +11 -4
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +24 -2
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +13 -11
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +45 -4
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +155 -75
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +9 -0
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +58 -1
- package/src/iframe/order-process/components/CategoryProduct/components/ProductWithModifier/ProductWithModifier.tsx +86 -0
- package/src/iframe/order-process/components/CategoryProduct/constants.ts +1 -0
- package/src/iframe/order-process/components/utils/useOnWindowUnmount.ts +25 -0
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +1 -2
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +84 -14
- package/src/iframe/payment/order-items-table/utils/index.ts +23 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +3 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +19 -20
- package/src/iframe/ryft/utils/ryft-form.ts +6 -5
- package/src/layout/DropDown.tsx +1 -1
- package/src/notification/email-template/card/EmailTemplateCard.tsx +2 -0
- package/src/notification/email-template/control/EmailTemplateControl.tsx +1 -0
- package/src/notification/sms-template/card/SmsTemplateCard.tsx +2 -0
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -4
- package/src/product-set/control/DateInput.tsx +3 -4
- package/src/product-set/form/ProductSetForm.tsx +17 -5
- package/src/product-set/form/ProductZonesControl.tsx +1 -4
- package/src/product-set/form/ProductsControl.tsx +34 -16
- package/src/product-set/form/SubProductsControl.tsx +0 -3
- package/src/product-set/form/VenueMapsControl.tsx +1 -4
- package/src/product-set/form/context.tsx +5 -0
- package/src/product-set/product/ProductControl.tsx +37 -2
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +2 -0
- package/src/product-set/product/deposit/ProductDepositControl.tsx +1 -0
- package/src/product-set/product/duration/ProductDurationControl.tsx +2 -0
- package/src/product-set/product/price/ProductPriceControl.tsx +1 -0
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +2 -0
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +1 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +4 -0
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/product-set/utils/index.ts +19 -0
- package/src/recurrence-input/RecurrenceEndInput.tsx +1 -0
- package/src/recurrence-input/RecurrenceInput.tsx +10 -6
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +1 -0
- package/src/resource/form/components/CapacityControl.tsx +1 -0
- package/src/resource/form/components/SortControl.tsx +1 -0
- package/src/sales/booking/results/components/ResultCard.tsx +0 -2
- package/src/sales/coupon/control/CouponFormControl.tsx +7 -0
- package/src/sales/coupon/utils/index.ts +5 -3
- package/src/setting/admin/AdminSettingForm.tsx +4 -0
- package/src/setting/admin/PaymentFeeForm.tsx +5 -0
- package/src/setting/dashboard/DashboardSettingForm.tsx +1 -0
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +2 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +1 -2
- package/src/sortable-tree/SortableTreeItem.tsx +1 -6
- package/src/static/CurrencyNumberInput.tsx +1 -0
- package/src/static/date-range-input/utils/index.ts +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +1 -0
- package/src/static/loader/FullScreenLoader.tsx +16 -0
- package/src/static/loader/LoaderIndicator.tsx +6 -3
- package/src/static/loader/index.ts +1 -0
- package/src/static/number-input/NumberInput.tsx +1 -0
- package/src/styles/availability-indicator/AvailabilityIndicator.scss +1 -4
- package/src/styles/date-time-button/DateTimeButton.scss +7 -0
- package/src/styles/events/EditEventModal.scss +2 -0
- package/src/styles/iframe-events/Calendar.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/iframe-page/Page.scss +16 -0
- package/src/styles/iframe-page/PageBody.scss +4 -0
- package/src/styles/modals/Modals.scss +16 -0
- package/src/styles/product-set/EditProductSetElement.scss +1 -0
- package/src/styles/product-set/ProductSetForm.scss +13 -3
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -4
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/ManualBooking.scss +6 -0
- package/src/styles/static/Loader.scss +9 -0
- package/src/styles/themes/bookedit/index.scss +19 -0
- package/src/zone/form/components/GameDurationControl.tsx +1 -0
- package/src/zone/form/components/SortControl.tsx +1 -0
- package/yarn.lock +188 -188
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Col, Form } from 'react-bootstrap';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import { useMemo, useEffect } from 'react';
|
|
5
|
+
import { useId } from '@mantine/hooks';
|
|
6
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
7
|
+
import { xor } from 'lodash';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import { Currency } from '@licklist/core/dist/Config';
|
|
10
|
+
import { useIntl } from 'react-intl';
|
|
11
|
+
import { MAX_PRODUCT_NUMBER } from '../../../order-process/components/CategoryProduct/constants.js';
|
|
12
|
+
import 'recharts';
|
|
13
|
+
import 'react-loader';
|
|
14
|
+
import '@licklist/plugins/dist/hooks/Media/useWindowDimensions';
|
|
15
|
+
import 'moment';
|
|
16
|
+
import '@react-aria/utils';
|
|
17
|
+
import 'react-date-range';
|
|
18
|
+
import 'react-use';
|
|
19
|
+
import 'react-icons/fa';
|
|
20
|
+
import 'luxon';
|
|
21
|
+
import 'react-date-range/dist/styles.css';
|
|
22
|
+
import 'react-date-range/dist/theme/default.css';
|
|
23
|
+
import '@licklist/core/dist/DataMapper/User/UserDetailDataMapper';
|
|
24
|
+
import 'react-bootstrap/Col';
|
|
25
|
+
import 'react-bootstrap/Row';
|
|
26
|
+
import '@licklist/plugins/dist/services/Media/MediaService';
|
|
27
|
+
import '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
28
|
+
import '@licklist/core/dist/DataMapper/Product/CouponDataMapper';
|
|
29
|
+
import '@licklist/plugins/dist/validation/Rules/couponCodeRules';
|
|
30
|
+
import 'react-select';
|
|
31
|
+
import 'rrule';
|
|
32
|
+
import '@licklist/core/dist/Services';
|
|
33
|
+
import { NumberInputHorizontal } from '../../../../sales/manual-booking/number-input-horizontal/NumberInputHorizontal.js';
|
|
34
|
+
import '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper';
|
|
35
|
+
import '@licklist/plugins/dist/utils/relyOnPeople';
|
|
36
|
+
import 'react-highlighter';
|
|
37
|
+
import '@licklist/plugins/dist';
|
|
38
|
+
import '@licklist/core/dist/Config/DefaultUser';
|
|
39
|
+
import '../../../../typeahead-helper/TypeaheadHelperComponent.js';
|
|
40
|
+
import 'react-bootstrap/ModalHeader';
|
|
41
|
+
import 'react-bootstrap/ModalTitle';
|
|
42
|
+
import '../../../../sales/constants.js';
|
|
43
|
+
import '../../../../static/CurrencyNumberInput.js';
|
|
44
|
+
import '@licklist/core/dist/DataMapper/Order/OrderPaymentDataMapper';
|
|
45
|
+
import '@licklist/plugins/dist/context/sale/SalePaymentFormContext';
|
|
46
|
+
import '@licklist/core/dist/Services/Date';
|
|
47
|
+
import 'react-router-dom';
|
|
48
|
+
import '../../../../static/index.js';
|
|
49
|
+
import '@licklist/core/dist/DataMapper/Order/OrderDataMapper';
|
|
50
|
+
import '@licklist/plugins/dist/utils/formatDate';
|
|
51
|
+
import '@licklist/plugins/dist/utils/sourceTitle';
|
|
52
|
+
import 'react-bootstrap/ModalBody';
|
|
53
|
+
import 'react-bootstrap/ModalFooter';
|
|
54
|
+
import 'react-bootstrap/Modal';
|
|
55
|
+
import 'react-bootstrap/PageItem';
|
|
56
|
+
import '@licklist/plugins/dist/services/Table/PaginationService';
|
|
57
|
+
import '@licklist/plugins/dist/services/Table/TableService';
|
|
58
|
+
import '@licklist/plugins/dist/hooks/Query/useQuery';
|
|
59
|
+
import '@licklist/plugins/dist/services/Route/RouteService';
|
|
60
|
+
import '../../../../table/utils/index.js';
|
|
61
|
+
import '@tanstack/react-table';
|
|
62
|
+
|
|
63
|
+
var ModifiersSetControl = function(param) {
|
|
64
|
+
var modifierSet = param.modifierSet, modifiers = param.modifiers, productId = param.productId, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, _param_isEditMode = param.isEditMode, isEditMode = _param_isEditMode === void 0 ? false : _param_isEditMode, orderProductModifierSets = param.orderProductModifierSets;
|
|
65
|
+
var _currentOrderModifiersSets_find;
|
|
66
|
+
var _useFormContext = useFormContext(), control = _useFormContext.control, watch = _useFormContext.watch, setValue = _useFormContext.setValue, trigger = _useFormContext.trigger;
|
|
67
|
+
var t = useTranslation('App').t;
|
|
68
|
+
var orderModifiersSets = watch("".concat(productId, ".orderProductModifiers"));
|
|
69
|
+
var formatNumber = useIntl().formatNumber;
|
|
70
|
+
var formatToCurrency = function(value) {
|
|
71
|
+
return formatNumber(value, {
|
|
72
|
+
style: 'currency',
|
|
73
|
+
currency: Currency.GBP
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
var currentOrderModifiersSets = useMemo(function() {
|
|
77
|
+
return (orderProductModifierSets === null || orderProductModifierSets === void 0 ? void 0 : orderProductModifierSets.filter(function(modifier) {
|
|
78
|
+
return modifier.modifierSetId === modifierSet.id;
|
|
79
|
+
})) || [];
|
|
80
|
+
}, [
|
|
81
|
+
orderProductModifierSets,
|
|
82
|
+
modifierSet.id
|
|
83
|
+
]);
|
|
84
|
+
var onChangeModifiers = function(e, type, quantity) {
|
|
85
|
+
var _orderModifiersSets_find;
|
|
86
|
+
if (!modifiers) return;
|
|
87
|
+
var selectedModifier = modifiers === null || modifiers === void 0 ? void 0 : modifiers.find(function(item) {
|
|
88
|
+
return item.id === Number(e.target.defaultValue || e.target.id);
|
|
89
|
+
});
|
|
90
|
+
var checkSelectedModifier = (orderModifiersSets === null || orderModifiersSets === void 0 ? void 0 : (_orderModifiersSets_find = orderModifiersSets.find(function(modifier) {
|
|
91
|
+
return (modifier === null || modifier === void 0 ? void 0 : modifier.modifierId) === (selectedModifier === null || selectedModifier === void 0 ? void 0 : selectedModifier.id);
|
|
92
|
+
})) === null || _orderModifiersSets_find === void 0 ? void 0 : _orderModifiersSets_find.quantity) === 1;
|
|
93
|
+
if (selectedModifier && type === 'radio') {
|
|
94
|
+
modifiers.forEach(function(modifier) {
|
|
95
|
+
var isSelected = modifier.id === selectedModifier.id;
|
|
96
|
+
var orderModifiers = {
|
|
97
|
+
modifierId: modifier.id,
|
|
98
|
+
price: modifier.price,
|
|
99
|
+
productId: productId,
|
|
100
|
+
name: modifier.name,
|
|
101
|
+
quantity: isSelected ? 1 : 0,
|
|
102
|
+
modifierSetId: modifierSet.id
|
|
103
|
+
};
|
|
104
|
+
setValue("".concat(productId, ".orderProductModifiers.").concat(modifierSet.id, ".").concat(orderModifiers.modifierId), orderModifiers);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (selectedModifier && type === 'checkbox') {
|
|
108
|
+
var orderModifiers = {
|
|
109
|
+
modifierId: selectedModifier.id,
|
|
110
|
+
price: selectedModifier.price,
|
|
111
|
+
productId: productId,
|
|
112
|
+
name: selectedModifier.name,
|
|
113
|
+
quantity: checkSelectedModifier ? 0 : 1,
|
|
114
|
+
modifierSetId: modifierSet.id
|
|
115
|
+
};
|
|
116
|
+
setValue("".concat(productId, ".orderProductModifiers.").concat(modifierSet.id, ".").concat(selectedModifier.id), orderModifiers);
|
|
117
|
+
}
|
|
118
|
+
if (selectedModifier && type === 'selector') {
|
|
119
|
+
var orderModifiers1 = {
|
|
120
|
+
modifierId: selectedModifier.id,
|
|
121
|
+
price: selectedModifier.price,
|
|
122
|
+
productId: productId,
|
|
123
|
+
quantity: quantity,
|
|
124
|
+
name: selectedModifier.name,
|
|
125
|
+
modifierSetId: modifierSet.id
|
|
126
|
+
};
|
|
127
|
+
setValue("".concat(productId, ".orderProductModifiers.").concat(modifierSet.id, ".").concat(selectedModifier.id), orderModifiers1);
|
|
128
|
+
}
|
|
129
|
+
trigger("".concat(productId, ".orderProductModifiers"));
|
|
130
|
+
};
|
|
131
|
+
useEffect(function() {
|
|
132
|
+
if (!(orderProductModifierSets === null || orderProductModifierSets === void 0 ? void 0 : orderProductModifierSets.length)) return;
|
|
133
|
+
orderProductModifierSets.forEach(function(orderModifier) {
|
|
134
|
+
return setValue("".concat(productId, ".orderProductModifiers.").concat(orderModifier.modifierSetId, ".").concat(orderModifier.modifierId), orderModifier);
|
|
135
|
+
});
|
|
136
|
+
}, [
|
|
137
|
+
isEditMode
|
|
138
|
+
]);
|
|
139
|
+
var radioButtonDefaultModifier = (_currentOrderModifiersSets_find = currentOrderModifiersSets.find(function(modifier) {
|
|
140
|
+
return modifierSet.modifiers.some(function(rl) {
|
|
141
|
+
return rl.id === modifier.modifierId;
|
|
142
|
+
});
|
|
143
|
+
})) === null || _currentOrderModifiersSets_find === void 0 ? void 0 : _currentOrderModifiersSets_find.modifierId.toString();
|
|
144
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
145
|
+
children: (modifierSet === null || modifierSet === void 0 ? void 0 : modifierSet.maxItems) === 1 && modifiers.every(function(modifier) {
|
|
146
|
+
return modifier.maxItems === 1;
|
|
147
|
+
}) ? /*#__PURE__*/ jsx(Fragment, {
|
|
148
|
+
children: /*#__PURE__*/ jsx(Controller, {
|
|
149
|
+
name: "".concat(productId, ".modifier"),
|
|
150
|
+
control: control,
|
|
151
|
+
rules: {
|
|
152
|
+
required: {
|
|
153
|
+
value: !!modifierSet.minItems,
|
|
154
|
+
message: t('Validation:fieldRequired')
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
render: function(param) {
|
|
158
|
+
var field = param.field, fieldState = param.fieldState;
|
|
159
|
+
var onChange = function(e) {
|
|
160
|
+
onChangeModifiers(e, 'radio');
|
|
161
|
+
field.onChange(e.target.id);
|
|
162
|
+
};
|
|
163
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
164
|
+
children: [
|
|
165
|
+
modifiers.map(function(modifier) {
|
|
166
|
+
var _currentOrderModifiersSets_find_modifierId, _currentOrderModifiersSets_find;
|
|
167
|
+
var selectedOrderModifierId = currentOrderModifiersSets === null || currentOrderModifiersSets === void 0 ? void 0 : (_currentOrderModifiersSets_find = currentOrderModifiersSets.find(function(orderModifier) {
|
|
168
|
+
return orderModifier.modifierId === modifier.id;
|
|
169
|
+
})) === null || _currentOrderModifiersSets_find === void 0 ? void 0 : (_currentOrderModifiersSets_find_modifierId = _currentOrderModifiersSets_find.modifierId) === null || _currentOrderModifiersSets_find_modifierId === void 0 ? void 0 : _currentOrderModifiersSets_find_modifierId.toString();
|
|
170
|
+
return /*#__PURE__*/ jsx(Col, {
|
|
171
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
172
|
+
className: "modifier-container d-flex flex-column p-2",
|
|
173
|
+
children: [
|
|
174
|
+
/*#__PURE__*/ jsx(Form.Check, {
|
|
175
|
+
className: "custom-radio p-2",
|
|
176
|
+
inline: true,
|
|
177
|
+
id: modifier.id.toString(),
|
|
178
|
+
defaultChecked: !!selectedOrderModifierId,
|
|
179
|
+
defaultValue: selectedOrderModifierId || modifier.id.toString(),
|
|
180
|
+
checked: field.value === modifier.id.toString(),
|
|
181
|
+
onChange: onChange,
|
|
182
|
+
type: "radio",
|
|
183
|
+
label: modifier.name,
|
|
184
|
+
name: modifier.name
|
|
185
|
+
}),
|
|
186
|
+
/*#__PURE__*/ jsxs("div", {
|
|
187
|
+
className: "mt-3 w-100 pl-2",
|
|
188
|
+
children: [
|
|
189
|
+
/*#__PURE__*/ jsx("p", {
|
|
190
|
+
children: modifier.description
|
|
191
|
+
}),
|
|
192
|
+
/*#__PURE__*/ jsxs("div", {
|
|
193
|
+
className: "modifier-price",
|
|
194
|
+
children: [
|
|
195
|
+
"+ ",
|
|
196
|
+
formatToCurrency(modifier.price)
|
|
197
|
+
]
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
})
|
|
201
|
+
]
|
|
202
|
+
})
|
|
203
|
+
}, modifier.id);
|
|
204
|
+
}),
|
|
205
|
+
fieldState.error && /*#__PURE__*/ jsx("div", {
|
|
206
|
+
className: "invalid-feedback d-block",
|
|
207
|
+
children: fieldState.error.message
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
});
|
|
211
|
+
},
|
|
212
|
+
defaultValue: radioButtonDefaultModifier
|
|
213
|
+
})
|
|
214
|
+
}) : /*#__PURE__*/ jsx(Fragment, {
|
|
215
|
+
children: modifiers === null || modifiers === void 0 ? void 0 : modifiers.map(function(modifier, index) {
|
|
216
|
+
var _currentOrderModifiersSets_find;
|
|
217
|
+
var selectedOrderModifier = currentOrderModifiersSets === null || currentOrderModifiersSets === void 0 ? void 0 : (_currentOrderModifiersSets_find = currentOrderModifiersSets.find(function(orderModifier) {
|
|
218
|
+
return orderModifier.modifierId === modifier.id;
|
|
219
|
+
})) === null || _currentOrderModifiersSets_find === void 0 ? void 0 : _currentOrderModifiersSets_find.quantity;
|
|
220
|
+
return /*#__PURE__*/ jsx(Fragment, {
|
|
221
|
+
children: modifier.maxItems === 1 ? /*#__PURE__*/ jsx(Fragment, {
|
|
222
|
+
children: /*#__PURE__*/ jsx(Controller, {
|
|
223
|
+
name: "".concat(productId, ".").concat(modifierSet.id, ".modifiers[").concat(index, "]"),
|
|
224
|
+
control: control,
|
|
225
|
+
rules: {
|
|
226
|
+
required: {
|
|
227
|
+
value: !!modifier.minItems,
|
|
228
|
+
message: t('Validation:fieldRequired')
|
|
229
|
+
},
|
|
230
|
+
validate: function(value) {
|
|
231
|
+
var maxItems = modifier.maxItems, minItems = modifier.minItems;
|
|
232
|
+
if ((value === null || value === void 0 ? void 0 : value.length) > maxItems) {
|
|
233
|
+
return t('Validation:quantityMaxNumberModifier', {
|
|
234
|
+
max: maxItems
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
if ((value === null || value === void 0 ? void 0 : value.length) < minItems) {
|
|
238
|
+
return t('Validation:quantityMinNumberModifier', {
|
|
239
|
+
min: minItems
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
render: function(param) {
|
|
246
|
+
var field = param.field, error = param.fieldState.error;
|
|
247
|
+
var onChange = function(e) {
|
|
248
|
+
onChangeModifiers(e, 'checkbox');
|
|
249
|
+
field.onChange(xor(field.value, [
|
|
250
|
+
Number(e.target.value)
|
|
251
|
+
]));
|
|
252
|
+
};
|
|
253
|
+
return /*#__PURE__*/ jsxs(Col, {
|
|
254
|
+
className: "modifier-container pl-4",
|
|
255
|
+
children: [
|
|
256
|
+
/*#__PURE__*/ jsx("div", {
|
|
257
|
+
className: "d-flex justify-content-between pl-2 align-items-center",
|
|
258
|
+
children: /*#__PURE__*/ jsx(Checkbox, {
|
|
259
|
+
value: modifier.id,
|
|
260
|
+
onChange: onChange,
|
|
261
|
+
label: modifier.name,
|
|
262
|
+
defaultChecked: !!selectedOrderModifier
|
|
263
|
+
})
|
|
264
|
+
}),
|
|
265
|
+
/*#__PURE__*/ jsxs("div", {
|
|
266
|
+
className: "mt-3 w-100 pl-2",
|
|
267
|
+
children: [
|
|
268
|
+
/*#__PURE__*/ jsx("p", {
|
|
269
|
+
children: modifier.description
|
|
270
|
+
}),
|
|
271
|
+
/*#__PURE__*/ jsxs("div", {
|
|
272
|
+
className: "modifier-price",
|
|
273
|
+
children: [
|
|
274
|
+
"+ ",
|
|
275
|
+
formatToCurrency(modifier.price)
|
|
276
|
+
]
|
|
277
|
+
})
|
|
278
|
+
]
|
|
279
|
+
}),
|
|
280
|
+
(error === null || error === void 0 ? void 0 : error.message) && /*#__PURE__*/ jsx("div", {
|
|
281
|
+
className: "invalid-feedback d-flex",
|
|
282
|
+
children: error === null || error === void 0 ? void 0 : error.message
|
|
283
|
+
})
|
|
284
|
+
]
|
|
285
|
+
}, modifier.id.toString());
|
|
286
|
+
}
|
|
287
|
+
})
|
|
288
|
+
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
289
|
+
children: [
|
|
290
|
+
/*#__PURE__*/ jsx("div", {
|
|
291
|
+
className: "modifier-header m-0",
|
|
292
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
293
|
+
className: "title",
|
|
294
|
+
children: modifier.name
|
|
295
|
+
})
|
|
296
|
+
}),
|
|
297
|
+
/*#__PURE__*/ jsx(Controller, {
|
|
298
|
+
control: control,
|
|
299
|
+
name: "".concat(productId, ".").concat(modifierSet.id, ".modifiers[").concat(index, "].quantity"),
|
|
300
|
+
rules: {
|
|
301
|
+
required: {
|
|
302
|
+
value: !!modifier.minItems,
|
|
303
|
+
message: t('Validation:fieldRequired')
|
|
304
|
+
},
|
|
305
|
+
validate: function(value) {
|
|
306
|
+
var maxItems = modifier.maxItems, minItems = modifier.minItems;
|
|
307
|
+
if (value > maxItems) {
|
|
308
|
+
return t('Validation:quantityMaxNumberModifier', {
|
|
309
|
+
max: maxItems
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
if (value < minItems) {
|
|
313
|
+
return t('Validation:quantityMinNumberModifier', {
|
|
314
|
+
min: minItems
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
return true;
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
render: function(param) {
|
|
321
|
+
var _param_field = param.field, onChange = _param_field.onChange, value = _param_field.value, ref = _param_field.ref, _param_fieldState = param.fieldState, invalid = _param_fieldState.invalid, error = _param_fieldState.error;
|
|
322
|
+
var onChangeProductQuantity = function(val) {
|
|
323
|
+
var quantity = Math.min(MAX_PRODUCT_NUMBER, Math.max(0, Math.ceil(val)));
|
|
324
|
+
onChange(quantity);
|
|
325
|
+
trigger("".concat(productId, ".").concat(modifierSet.id, ".modifiers[").concat(index, "].quantity"));
|
|
326
|
+
onChangeModifiers({
|
|
327
|
+
target: {
|
|
328
|
+
id: modifier.id.toString()
|
|
329
|
+
}
|
|
330
|
+
}, 'selector', quantity);
|
|
331
|
+
};
|
|
332
|
+
var _ref;
|
|
333
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
334
|
+
className: "modifier-container",
|
|
335
|
+
children: [
|
|
336
|
+
/*#__PURE__*/ jsx("div", {
|
|
337
|
+
className: "d-flex align-items-center column mb-8 pl-6 pt-2",
|
|
338
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
339
|
+
className: "quantity-container mb-0",
|
|
340
|
+
children: /*#__PURE__*/ jsx(NumberInputHorizontal, {
|
|
341
|
+
ref: ref,
|
|
342
|
+
size: "big",
|
|
343
|
+
onChange: onChangeProductQuantity,
|
|
344
|
+
onMinusClick: onChangeProductQuantity,
|
|
345
|
+
onPlusClick: onChangeProductQuantity,
|
|
346
|
+
min: 0,
|
|
347
|
+
max: MAX_PRODUCT_NUMBER,
|
|
348
|
+
value: (_ref = value !== null && value !== void 0 ? value : selectedOrderModifier) !== null && _ref !== void 0 ? _ref : 0,
|
|
349
|
+
className: clsx(invalid && 'error'),
|
|
350
|
+
isLoading: isLoading
|
|
351
|
+
})
|
|
352
|
+
})
|
|
353
|
+
}),
|
|
354
|
+
/*#__PURE__*/ jsxs("div", {
|
|
355
|
+
className: "p-2 mt-3 w-100 pl-4",
|
|
356
|
+
children: [
|
|
357
|
+
/*#__PURE__*/ jsx("p", {
|
|
358
|
+
className: "pl-2",
|
|
359
|
+
children: modifier.description
|
|
360
|
+
}),
|
|
361
|
+
/*#__PURE__*/ jsxs("div", {
|
|
362
|
+
className: "pl-2 modifier-price",
|
|
363
|
+
children: [
|
|
364
|
+
"+ ",
|
|
365
|
+
formatToCurrency(modifier.price)
|
|
366
|
+
]
|
|
367
|
+
}),
|
|
368
|
+
(error === null || error === void 0 ? void 0 : error.message) && /*#__PURE__*/ jsx("div", {
|
|
369
|
+
className: "d-flex mt-3 w-100",
|
|
370
|
+
children: /*#__PURE__*/ jsx("p", {
|
|
371
|
+
className: "iframe-event__message-error",
|
|
372
|
+
children: error.message
|
|
373
|
+
})
|
|
374
|
+
})
|
|
375
|
+
]
|
|
376
|
+
})
|
|
377
|
+
]
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
})
|
|
381
|
+
]
|
|
382
|
+
})
|
|
383
|
+
});
|
|
384
|
+
})
|
|
385
|
+
})
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
var Checkbox = function(param) {
|
|
389
|
+
var onChange = param.onChange, value = param.value, label = param.label, defaultChecked = param.defaultChecked;
|
|
390
|
+
var checkboxId = useId();
|
|
391
|
+
return /*#__PURE__*/ jsx(Form.Group, {
|
|
392
|
+
controlId: checkboxId,
|
|
393
|
+
className: "custom-checkbox mt-0",
|
|
394
|
+
children: /*#__PURE__*/ jsx(Form.Check, {
|
|
395
|
+
label: label,
|
|
396
|
+
value: value,
|
|
397
|
+
defaultChecked: defaultChecked,
|
|
398
|
+
onChange: onChange,
|
|
399
|
+
type: "checkbox"
|
|
400
|
+
})
|
|
401
|
+
});
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
export { ModifiersSetControl };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OrderModifierByProduct } from '@licklist/core/dist/DataMapper/Order/OrderModifiierByProduct';
|
|
2
|
+
import { Product } from '@licklist/plugins/dist/types/context/sale/menuSteps';
|
|
3
|
+
interface ProductControlProps {
|
|
4
|
+
product: Product;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
editOrderModifier?: OrderModifierByProduct;
|
|
7
|
+
}
|
|
8
|
+
export declare const ProductControl: ({ product, isLoading, editOrderModifier, }: ProductControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ProductControll.d.ts.map
|
package/dist/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductControll.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/controll/ProductControll.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAA;AACrG,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAA;AAK7E,UAAU,mBAAmB;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,iBAAiB,CAAC,EAAE,sBAAsB,CAAA;CAC3C;AAED,eAAO,MAAM,cAAc,+CAIxB,mBAAmB,4CA+ErB,CAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useFormContext, Controller } from 'react-hook-form';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { ModifiersSetControl } from './ModifierSetControll.js';
|
|
6
|
+
import { orderProductModifiersQuantity } from '../../utils.js';
|
|
7
|
+
|
|
8
|
+
var ProductControl = function(param) {
|
|
9
|
+
var product = param.product, _param_isLoading = param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, editOrderModifier = param.editOrderModifier;
|
|
10
|
+
var t = useTranslation() // Added translation hook
|
|
11
|
+
.t;
|
|
12
|
+
var _useFormContext = useFormContext(), control = _useFormContext.control, watch = _useFormContext.watch, isValid = _useFormContext.formState.isValid, clearErrors = _useFormContext.clearErrors;
|
|
13
|
+
var modifiersSet = (product === null || product === void 0 ? void 0 : product.modifiersSet) || [];
|
|
14
|
+
var orderModifiersSets = watch("".concat(product.id, ".orderProductModifiers"));
|
|
15
|
+
useEffect(function() {
|
|
16
|
+
if (!isValid) return;
|
|
17
|
+
clearErrors();
|
|
18
|
+
}, [
|
|
19
|
+
isValid,
|
|
20
|
+
clearErrors
|
|
21
|
+
]);
|
|
22
|
+
return /*#__PURE__*/ jsx("div", {
|
|
23
|
+
className: "mb-8 pt-4",
|
|
24
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
25
|
+
className: "d-flex flex-column",
|
|
26
|
+
children: modifiersSet.map(function(modifierSet) {
|
|
27
|
+
var orderProductModifiersMaxQuantity = orderProductModifiersQuantity(orderModifiersSets, modifierSet);
|
|
28
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
29
|
+
className: "modifier-set-container",
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ jsx("div", {
|
|
32
|
+
className: "modifier-header",
|
|
33
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
34
|
+
className: "title",
|
|
35
|
+
children: modifierSet.name
|
|
36
|
+
})
|
|
37
|
+
}),
|
|
38
|
+
/*#__PURE__*/ jsx(Controller, {
|
|
39
|
+
control: control,
|
|
40
|
+
name: "".concat(product.id, ".").concat(modifierSet.id),
|
|
41
|
+
rules: {
|
|
42
|
+
validate: function() {
|
|
43
|
+
var maxItems = modifierSet.maxItems, minItems = modifierSet.minItems;
|
|
44
|
+
if (!!minItems && orderProductModifiersMaxQuantity < minItems) {
|
|
45
|
+
return t('Validation:quantityMinNumberModifier', {
|
|
46
|
+
min: minItems
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (orderProductModifiersMaxQuantity > maxItems) {
|
|
50
|
+
return t('Validation:quantityMaxNumberModifier', {
|
|
51
|
+
max: maxItems
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
render: function(param) {
|
|
58
|
+
var error = param.fieldState.error;
|
|
59
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ jsx(ModifiersSetControl, {
|
|
62
|
+
modifierSet: modifierSet,
|
|
63
|
+
productId: product.id,
|
|
64
|
+
modifiers: modifierSet.modifiers,
|
|
65
|
+
isEditMode: !!(editOrderModifier === null || editOrderModifier === void 0 ? void 0 : editOrderModifier.modifiers),
|
|
66
|
+
orderProductModifierSets: editOrderModifier === null || editOrderModifier === void 0 ? void 0 : editOrderModifier.modifiers,
|
|
67
|
+
isLoading: isLoading
|
|
68
|
+
}),
|
|
69
|
+
(error === null || error === void 0 ? void 0 : error.message) && /*#__PURE__*/ jsxs("div", {
|
|
70
|
+
className: "invalid-feedback d-flex pl-4",
|
|
71
|
+
children: [
|
|
72
|
+
error === null || error === void 0 ? void 0 : error.message,
|
|
73
|
+
"!"
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
]
|
|
81
|
+
}, modifierSet.id);
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export { ProductControl };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/iframe/ProductWithModifierModal/ModifierSetModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/iframe/ProductWithModifierModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OrderModifier } from "@licklist/core/dist/DataMapper/Order/OrderModifierDataMapper";
|
|
2
|
+
export type selectModifierType = 'radio' | 'checkbox' | 'selector';
|
|
3
|
+
export declare const filteredOrderModifierSets: (modifiersSet: OrderModifier[]) => OrderModifier[];
|
|
4
|
+
export declare const orderProductModifiersQuantity: (orderModifiersSets: OrderModifier[], modifierSet: any) => number;
|
|
5
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/iframe/ProductWithModifierModal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8DAA8D,CAAA;AAG5F,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAA;AAElE,eAAO,MAAM,yBAAyB,iBACpB,aAAa,EAAE,KAC5B,aAAa,EAUf,CAAA;AAED,eAAO,MAAM,6BAA6B,uBACpB,aAAa,EAAE,6BAQpC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { uniqBy } from 'lodash';
|
|
2
|
+
|
|
3
|
+
var filteredOrderModifierSets = function(modifiersSet) {
|
|
4
|
+
var _modifiersSet_flat;
|
|
5
|
+
if (!modifiersSet) return [];
|
|
6
|
+
var orderModifier = modifiersSet === null || modifiersSet === void 0 ? void 0 : (_modifiersSet_flat = modifiersSet.flat()) === null || _modifiersSet_flat === void 0 ? void 0 : _modifiersSet_flat.filter(function(modifier) {
|
|
7
|
+
return !!(modifier === null || modifier === void 0 ? void 0 : modifier.quantity);
|
|
8
|
+
});
|
|
9
|
+
return uniqBy(orderModifier, function(item) {
|
|
10
|
+
return "".concat(item.modifierId, "-").concat(item.modifierSetId);
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var orderProductModifiersQuantity = function(orderModifiersSets, modifierSet) {
|
|
14
|
+
if (!(orderModifiersSets === null || orderModifiersSets === void 0 ? void 0 : orderModifiersSets.length)) return 0;
|
|
15
|
+
var filteredOrderModifier = filteredOrderModifierSets(orderModifiersSets);
|
|
16
|
+
return filteredOrderModifier.filter(function(item) {
|
|
17
|
+
return (item === null || item === void 0 ? void 0 : item.modifierSetId) === modifierSet.id;
|
|
18
|
+
}).length;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { filteredOrderModifierSets, orderProductModifiersQuantity };
|
|
@@ -4,11 +4,13 @@ interface TicketDescriptionProps {
|
|
|
4
4
|
title: string;
|
|
5
5
|
description: string;
|
|
6
6
|
className?: string;
|
|
7
|
+
classNameProductModal?: string;
|
|
7
8
|
images: Image[] | null;
|
|
8
9
|
price?: ReactNode;
|
|
9
10
|
isRequired?: boolean;
|
|
10
11
|
canExpand?: boolean;
|
|
12
|
+
isModal?: boolean;
|
|
11
13
|
}
|
|
12
|
-
export declare function TicketDescription({ title, description, className, images, price, isRequired, canExpand, }: TicketDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function TicketDescription({ title, description, className, classNameProductModal, images, price, isRequired, canExpand, isModal }: TicketDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=TicketDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketDescription.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/ticket-description/TicketDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAY,MAAM,OAAO,CAAA;AAE1D,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAA;AAK7D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"TicketDescription.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/ticket-description/TicketDescription.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAY,MAAM,OAAO,CAAA;AAE1D,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAA;AAK7D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAID,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,SAAc,EACd,qBAA0B,EAC1B,MAAM,EACN,KAAK,EACL,UAAkB,EAClB,SAAgB,EAChB,OAAc,EACf,EAAE,sBAAsB,2CAmDxB"}
|
|
@@ -54,7 +54,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
54
54
|
}
|
|
55
55
|
var DESCRIPTION_MAX_LENGTH = 120;
|
|
56
56
|
function TicketDescription(param) {
|
|
57
|
-
var title = param.title, description = param.description, _param_className = param.className, className = _param_className === void 0 ? '' : _param_className, images = param.images, price = param.price, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, _param_canExpand = param.canExpand, canExpand = _param_canExpand === void 0 ? true : _param_canExpand;
|
|
57
|
+
var title = param.title, description = param.description, _param_className = param.className, className = _param_className === void 0 ? '' : _param_className, _param_classNameProductModal = param.classNameProductModal, classNameProductModal = _param_classNameProductModal === void 0 ? '' : _param_classNameProductModal, images = param.images, price = param.price, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, _param_canExpand = param.canExpand, canExpand = _param_canExpand === void 0 ? true : _param_canExpand, _param_isModal = param.isModal, isModal = _param_isModal === void 0 ? false : _param_isModal;
|
|
58
58
|
var _useState = _sliced_to_array(useState(false), 2), isDescriptionExpanded = _useState[0], setIsDescriptionExpanded = _useState[1];
|
|
59
59
|
var wrapperClasses = clsx('ticket-description', className);
|
|
60
60
|
var imageSrc = images ? MediaService.getImageSrc(images, THUMBNAIL_IMAGE_SIZE) : null;
|
|
@@ -68,11 +68,12 @@ function TicketDescription(param) {
|
|
|
68
68
|
className: "ticket-description__wrapper",
|
|
69
69
|
style: descriptionWrapperStyle,
|
|
70
70
|
children: /*#__PURE__*/ jsxs("div", {
|
|
71
|
-
className:
|
|
71
|
+
className: clsx('ticket-description__wrapper-children', classNameProductModal),
|
|
72
72
|
children: [
|
|
73
73
|
imageSrc && /*#__PURE__*/ jsx("div", {
|
|
74
|
-
className:
|
|
74
|
+
className: clsx('image-wrapper', classNameProductModal && 'w-100 h-25'),
|
|
75
75
|
children: /*#__PURE__*/ jsx("img", {
|
|
76
|
+
className: clsx(classNameProductModal && 'w-100'),
|
|
76
77
|
src: imageSrc,
|
|
77
78
|
alt: title
|
|
78
79
|
})
|
|
@@ -84,12 +85,14 @@ function TicketDescription(param) {
|
|
|
84
85
|
children: /*#__PURE__*/ jsx(Description, {
|
|
85
86
|
title: title,
|
|
86
87
|
isRequired: isRequired,
|
|
87
|
-
description: description
|
|
88
|
+
description: description,
|
|
89
|
+
isModal: isModal
|
|
88
90
|
})
|
|
89
91
|
}) : /*#__PURE__*/ jsx(Description, {
|
|
90
92
|
title: title,
|
|
91
93
|
isRequired: isRequired,
|
|
92
|
-
description: description
|
|
94
|
+
description: description,
|
|
95
|
+
isModal: isModal
|
|
93
96
|
})
|
|
94
97
|
]
|
|
95
98
|
})
|
|
@@ -104,9 +107,9 @@ function TicketDescription(param) {
|
|
|
104
107
|
});
|
|
105
108
|
}
|
|
106
109
|
var Description = function(param) {
|
|
107
|
-
var title = param.title, isRequired = param.isRequired, description = param.description;
|
|
110
|
+
var title = param.title, isRequired = param.isRequired, description = param.description, isModal = param.isModal;
|
|
108
111
|
return /*#__PURE__*/ jsx("div", {
|
|
109
|
-
className:
|
|
112
|
+
className: clsx('description-content', isModal && 'ml-4 mt-2'),
|
|
110
113
|
children: /*#__PURE__*/ jsxs("div", {
|
|
111
114
|
className: "d-flex flex-column",
|
|
112
115
|
children: [
|