@licklist/design 0.69.1 → 0.69.3-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/.prettierrc +5 -1
- package/dist/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.js +2 -1
- package/dist/events/edit-event-modal/IntervalInput.js +1 -1
- 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 +3 -2
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +2 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +55 -26
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -0
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +3 -2
- package/dist/iframe/activity-card/ActivityCard.d.ts +5 -4
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +52 -40
- 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.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +2 -0
- package/dist/iframe/order-process/components/Timer/Timer.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts +2 -2
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +8 -2
- package/dist/iframe/ryft/utils/ryft-form.d.ts +2 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +20 -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/modals/dialog/Dialog.js +2 -2
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +3 -0
- package/dist/product-set/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/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +2 -2
- package/dist/product-set/control/ProductSetControl.d.ts +4 -0
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +24 -3
- package/dist/product-set/control/ProductSetImageControl.d.ts +2 -0
- package/dist/product-set/control/ProductSetImageControl.d.ts.map +1 -0
- package/dist/product-set/control/ProductSetImageControl.js +279 -0
- package/dist/product-set/form/MobileFooter.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +48 -2
- package/dist/product-set/form/ProductSetForm.d.ts +4 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +64 -1
- 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/ProductsControl.js +1 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +0 -3
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +0 -3
- package/dist/product-set/form/index.d.ts +1 -0
- package/dist/product-set/form/index.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.d.ts.map +1 -1
- package/dist/product-set/product/booking-management/ProductBookingManagementControl.js +6 -0
- package/dist/product-set/product/deposit/ProductDepositControl.d.ts.map +1 -1
- package/dist/product-set/product/deposit/ProductDepositControl.js +3 -0
- package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
- package/dist/product-set/product/duration/ProductDurationControl.js +6 -0
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +3 -0
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityConstantControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityControl.js +6 -0
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.d.ts.map +1 -1
- package/dist/product-set/product/quantity/ProductQuantityRechargingControl.js +4 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +12 -0
- package/dist/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/recurrence-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceEndInput.js +3 -0
- package/dist/recurring-date-picker-input/RecurrenceEndInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +6 -4
- 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/root.css +51 -51
- 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/manual-booking/search-user/SearchUser.js +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/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/static/CurrencyNumberInput.d.ts.map +1 -1
- package/dist/static/CurrencyNumberInput.js +3 -0
- package/dist/static/form-number-input/FormNumberInput.d.ts.map +1 -1
- package/dist/static/form-number-input/FormNumberInput.js +3 -0
- package/dist/static/number-input/NumberInput.d.ts.map +1 -1
- package/dist/static/number-input/NumberInput.js +3 -0
- package/dist/styles/activity-card/{GridActivitiesCard.scss → ActivitiesCard.scss} +19 -5
- package/dist/styles/activity-card/ListActivitiesCard.scss +12 -42
- package/dist/styles/activity-card/_index.scss +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +22 -0
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +28 -1
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.d.ts.map +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.js +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/utils.js +1 -1
- 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/components/GameDurationControl.d.ts.map +1 -1
- package/dist/zone/form/components/GameDurationControl.js +3 -0
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.js +3 -0
- package/package.json +9 -7
- package/postcss.config.cjs +2 -2
- package/src/affiliate/card/AffiliateCard.tsx +15 -15
- package/src/affiliate/form/AffiliateControl.tsx +8 -8
- package/src/affiliate/form/AffiliateForm.tsx +6 -5
- package/src/auth/AccessDenied/AccessDenied.tsx +8 -8
- package/src/auth/ChangePassword/ChangePasswordComponent.tsx +4 -4
- package/src/auth/ChangePassword/ChangePasswordFormComponent.tsx +14 -14
- package/src/auth/Layout/AuthNavComponent.tsx +6 -6
- package/src/auth/Layout/UserNavComponent.tsx +2 -2
- package/src/auth/Layout/UserNavDropDown.tsx +1 -1
- package/src/auth/Login/LoginComponent.tsx +9 -9
- package/src/auth/Login/LoginFormComponent.tsx +15 -15
- package/src/auth/Logout/Logout.stories.tsx +2 -2
- package/src/auth/Register/BirthDateFormComponent.tsx +17 -17
- package/src/auth/Register/RegisterComponent.tsx +7 -7
- package/src/auth/Register/RegisterFormComponent.tsx +56 -56
- package/src/auth/ResetPassword/ResetPasswordComponent.tsx +3 -3
- package/src/auth/ResetPassword/ResetPasswordFormComponent.tsx +13 -13
- package/src/auth/Social/SocialCallbackComponent.tsx +3 -3
- package/src/auth/Social/SocialFormComponent.tsx +4 -4
- package/src/availability-indicator/AvailabilityIndicator.tsx +1 -1
- package/src/calendar/Calendar.tsx +2 -2
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +2 -2
- package/src/calendar/components/CalendarSelect/CalendarSelect.tsx +2 -2
- package/src/calendar/components/CalendarWeekdays/CalendarWeekdays.tsx +2 -2
- package/src/collapsible-input-group/CollapsibleInputGroup.tsx +6 -6
- package/src/custom-fields/CustomFields.stories.tsx +1 -1
- package/src/custom-fields/field/FieldItem.tsx +1 -1
- package/src/custom-fields/field/SelectFieldModal.tsx +4 -4
- package/src/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.tsx +8 -8
- package/src/custom-fields/forms/DropdownForm.tsx +16 -16
- package/src/custom-fields/forms/TextInputForm.tsx +6 -6
- package/src/customers/components/filter/CustomerFilter.tsx +3 -3
- package/src/date-time-button/DateContent.tsx +1 -1
- package/src/date-time-button/DateTimeButton.tsx +2 -2
- package/src/error/ErrorFallback.tsx +1 -1
- package/src/events/edit-event-modal/IntervalInput.tsx +15 -15
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.stories.tsx +2 -2
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +27 -26
- package/src/events/edit-event-modal/component/ProductSetShortForm/ProductSetShortForm.tsx +3 -3
- package/src/events/edit-event-modal/component/SaleDeadline/SaleDeadline.tsx +11 -11
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +94 -89
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +5 -5
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +2 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.stories.tsx +1 -1
- package/src/events/edit-recurrent-event-modal/EditRecurrentEventModal.tsx +16 -16
- package/src/events/event-card/EventCard.stories.tsx +5 -5
- package/src/events/event-card/EventCard.tsx +30 -30
- package/src/events/event-card/EventCardSkeleton.tsx +10 -10
- package/src/events/event-statistic-modal/EventStatisticModal.stories.tsx +1 -1
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +8 -8
- package/src/events/event-venue-map/components/Dropdown/Dropdown.tsx +1 -1
- package/src/events/event-venue-map/components/Dropdown/components/DropdownWrapper/DropdownWrapper.tsx +3 -3
- package/src/events/event-venue-map/components/Dropdown/components/ProductsControl/ProductsControl.tsx +5 -5
- package/src/events/event-venue-map/components/Dropdown/components/SelectControl/SelectControl.tsx +10 -10
- package/src/events/event-venue-map/components/MapPoint/components/DeleteIcon/DeleteIcon.tsx +1 -1
- package/src/events/event-venue-map/components/MapPoint/components/EditIcon/EditIcon.tsx +1 -1
- package/src/events/event-venue-map/components/MapPoint/components/PointIcon/PointIcon.tsx +2 -2
- package/src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx +1 -1
- package/src/events/event-venue-map/components/Scrollbars/Scrollbars.tsx +5 -5
- package/src/events/event-venue-map/components/VenueMap/VenueMap.tsx +3 -3
- package/src/events/event-venue-map/components/ZoomButtons/ZoomButtons.tsx +4 -4
- package/src/file-upload/FilePreview.tsx +8 -8
- package/src/file-upload/FileUpload.tsx +8 -8
- package/src/header/BookeditHeader.tsx +1 -1
- package/src/header/Header.stories.tsx +16 -16
- package/src/header/Header.tsx +11 -11
- package/src/header/LicklistHeader.tsx +1 -1
- package/src/header/elements/CompanySelector.tsx +6 -6
- package/src/help/example/Example.tsx +12 -12
- package/src/help/popover/HelpPopover.tsx +5 -5
- package/src/iframe/activity-card/ActivityCard.tsx +38 -27
- package/src/iframe/back-button/BackButton.tsx +3 -3
- package/src/iframe/custom-fields/components/CustomDateField.stories.tsx +1 -1
- package/src/iframe/custom-fields/components/CustomDateField.tsx +7 -7
- package/src/iframe/event/event-booking-form/EventBookingForm.tsx +14 -14
- package/src/iframe/event/event-booking-products/EventBookingProducts.tsx +3 -3
- package/src/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.tsx +10 -10
- package/src/iframe/event/event-booking-view/EventBookingView.tsx +1 -1
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +6 -6
- package/src/iframe/event/event-card/IframeEventCardSkeleton.tsx +20 -20
- package/src/iframe/event/event-card/IframeEventCards.stories.tsx +2 -2
- package/src/iframe/event/event-description/EventDescription.stories.tsx +3 -3
- package/src/iframe/event/event-description/EventDescription.tsx +10 -10
- package/src/iframe/event/event-navigation-footer/EventNavigationFooter.tsx +6 -6
- package/src/iframe/event/event-order-short-summary/EventOrderShortSummary.tsx +2 -2
- package/src/iframe/event/event-order-short-summary/components/Summary/Summary.tsx +4 -4
- package/src/iframe/event/event-order-summary/EventOrderSummary.stories.tsx +1 -1
- package/src/iframe/event/event-order-summary/EventOrderSummary.tsx +5 -5
- package/src/iframe/event/event-product-sets/EventProductSets.stories.tsx +1 -1
- package/src/iframe/event/event-product-sets/EventProductSets.tsx +1 -1
- package/src/iframe/event/event-product-sets/components/EventProductSet.tsx +1 -1
- package/src/iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.tsx +1 -1
- package/src/iframe/event/event-step-venue-map-zones/components/EventStepVenueMapZone.tsx +3 -3
- package/src/iframe/event/event-tables/EventTables.stories.tsx +1 -1
- package/src/iframe/event/event-tables/EventTables.tsx +5 -5
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +4 -4
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.tsx +1 -1
- package/src/iframe/event/ticket-description/TicketDescription.stories.tsx +6 -6
- package/src/iframe/event/ticket-description/TicketDescription.tsx +7 -7
- package/src/iframe/external-modal/ExternalModal.tsx +7 -7
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +8 -8
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +23 -23
- package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +1 -1
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +6 -6
- package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +3 -3
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/SummaryTotal.tsx +1 -1
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +2 -2
- package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +9 -9
- package/src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx +3 -3
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +5 -5
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +3 -3
- package/src/iframe/order-process/components/CalendarStepsForm/components/Category.tsx +1 -1
- package/src/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.tsx +3 -3
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +7 -7
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.stories.tsx +1 -1
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +13 -4
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +3 -2
- package/src/iframe/order-process/components/ErrorModal/ErrorModal.tsx +8 -8
- package/src/iframe/order-process/components/NavigationFooter/NavigationFooter.tsx +4 -4
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.stories.tsx +1 -1
- package/src/iframe/order-process/components/NavigationSteps/NavigationSteps.tsx +6 -6
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.stories.tsx +2 -2
- package/src/iframe/order-process/components/PaymentCard/PaymentCard.tsx +9 -9
- package/src/iframe/order-process/components/Timer/Timer.stories.tsx +2 -2
- package/src/iframe/order-process/components/Timer/Timer.tsx +6 -6
- package/src/iframe/page/Page.stories.tsx +4 -4
- package/src/iframe/page/Page.tsx +1 -1
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +2 -2
- package/src/iframe/page/components/PageBody/components/RightBlock/RightBlock.tsx +2 -2
- package/src/iframe/page/components/PageHeader/PageHeader.tsx +6 -6
- package/src/iframe/payment/order-items-table/OrderItemsTable.stories.tsx +2 -2
- package/src/iframe/payment/order-items-table/OrderItemsTable.tsx +2 -2
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +3 -3
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +1 -0
- package/src/iframe/payment/payment-form/PaymentForm.stories.tsx +5 -5
- package/src/iframe/payment/payment-form/PaymentForm.tsx +12 -12
- package/src/iframe/payment/payment-page/PaymentPage.tsx +5 -5
- package/src/iframe/payment/payment-status-header/PaymentStatusHeader.stories.tsx +2 -2
- package/src/iframe/payment/payment-status-header/PaymentStatusHeader.tsx +2 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusComponent.stories.tsx +2 -2
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +2 -2
- package/src/iframe/payment/status-body/StatusBody.tsx +3 -3
- package/src/iframe/powered-by/PoweredBy.tsx +4 -4
- package/src/iframe/ryft/RyftPaymentForm.tsx +24 -16
- package/src/iframe/ryft/utils/ryft-form.ts +26 -2
- package/src/image-radio-input/ImageRadioInput.tsx +5 -5
- package/src/layout/BackgroundVideoContainer.tsx +2 -2
- package/src/layout/Container.tsx +1 -1
- package/src/layout/DropDown.tsx +1 -1
- package/src/layout/Layout.stories.tsx +5 -5
- package/src/logo/Logo.tsx +2 -2
- package/src/modals/confirmation/ConfirmModal.tsx +32 -16
- package/src/modals/dialog/Dialog.tsx +10 -10
- package/src/modals/fullscreen/FullscreenModal.tsx +10 -10
- package/src/modals/fullscreen/FulscreenModal.stories.tsx +2 -2
- package/src/notification/components/NotificationPlaceholders.tsx +5 -5
- package/src/notification/email-template/card/EmailTemplateCard.tsx +10 -10
- package/src/notification/email-template/control/EmailTemplateControl.tsx +30 -29
- package/src/notification/email-template/form/EmailTemplateForm.tsx +3 -3
- package/src/notification/send-email-template/SendEmailTemplateForm.tsx +11 -11
- package/src/notification/sms-template/card/SmsTemplateCard.tsx +9 -9
- package/src/notification/sms-template/control/SmsTemplateControl.tsx +15 -15
- package/src/notification/sms-template/form/SmsTemplateForm.tsx +1 -1
- package/src/number-of-people-input/components/RenderNumberOfPeopleInputComponent.tsx +6 -6
- package/src/product-set/card/ProductSetCard.tsx +63 -24
- package/src/product-set/control/DateAndRecurrenceInput.tsx +10 -10
- package/src/product-set/control/DateInput.tsx +12 -11
- package/src/product-set/control/ProductSetControl.stories.tsx +2 -2
- package/src/product-set/control/ProductSetControl.tsx +66 -72
- package/src/product-set/control/ProductSetImageControl.tsx +97 -0
- package/src/product-set/control/ProductSetRecurrenceControl.stories.tsx +1 -1
- package/src/product-set/control/ProductSetRecurrenceControl.tsx +10 -10
- package/src/product-set/control/ProductSetRecurrenceOverridesControl.tsx +9 -9
- package/src/product-set/control/TutorialGifCard.tsx +10 -10
- package/src/product-set/deposit-paid/ProductSetDepositPaid.stories.tsx +2 -2
- package/src/product-set/deposit-paid/ProductSetDepositPaidControl.tsx +9 -9
- package/src/product-set/elements/DeleteFieldButton.tsx +3 -3
- package/src/product-set/form/MobileFooter.tsx +3 -4
- package/src/product-set/form/ProductCategoriesControl.tsx +43 -7
- package/src/product-set/form/ProductSetForm.tsx +28 -6
- package/src/product-set/form/ProductSetFormPopover.tsx +4 -4
- package/src/product-set/form/ProductSetNameControl.tsx +27 -0
- package/src/product-set/form/ProductZonesControl.tsx +5 -8
- package/src/product-set/form/ProductsControl.tsx +4 -4
- package/src/product-set/form/SelectCategoryModal.tsx +24 -24
- package/src/product-set/form/StepsControl.tsx +5 -5
- package/src/product-set/form/SubProductsControl.tsx +1 -4
- package/src/product-set/form/VenueMapSetModal.tsx +16 -16
- package/src/product-set/form/VenueMapsControl.tsx +9 -12
- package/src/product-set/form/index.ts +1 -0
- package/src/product-set/item/CreateProductSetItem.tsx +2 -2
- package/src/product-set/popover/ProductSetPopover.stories.tsx +7 -7
- package/src/product-set/popover/ProductSetPopover.tsx +5 -5
- package/src/product-set/product/Product.stories.tsx +4 -4
- package/src/product-set/product/ProductControl.tsx +19 -20
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +11 -11
- package/src/product-set/product/booking-management/ProductBookingManagement.stories.tsx +1 -1
- package/src/product-set/product/booking-management/ProductBookingManagementControl.tsx +11 -9
- package/src/product-set/product/deposit/ProductDeposit.stories.tsx +1 -1
- package/src/product-set/product/deposit/ProductDepositControl.tsx +5 -4
- package/src/product-set/product/duration/ProductDurationControl.stories.tsx +1 -1
- package/src/product-set/product/duration/ProductDurationControl.tsx +12 -10
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +1 -1
- package/src/product-set/product/price/ProductPrice.stories.tsx +1 -1
- package/src/product-set/product/price/ProductPriceControl.tsx +5 -4
- package/src/product-set/product/quantity/ProductQuantity.stories.tsx +3 -3
- package/src/product-set/product/quantity/ProductQuantityConstantControl.tsx +12 -10
- package/src/product-set/product/quantity/ProductQuantityControl.tsx +10 -8
- package/src/product-set/product/quantity/ProductQuantityRechargingControl.tsx +4 -3
- package/src/product-set/product-category/ProductCategory.stories.tsx +4 -4
- package/src/product-set/product-category/ProductCategoryControl.tsx +31 -27
- package/src/product-set/product-zone/ProductZoneControl.tsx +7 -7
- package/src/product-set/step/Step.stories.tsx +1 -1
- package/src/product-set/step/StepControl.tsx +5 -5
- package/src/product-set/tabs/ProductSetTabs.stories.tsx +3 -3
- package/src/product-set/tabs/ProductSetTabs.tsx +1 -1
- package/src/product-set/utils/index.ts +11 -0
- package/src/provider/categories-input/CategoriesInput.tsx +9 -9
- package/src/provider/categories-input/CategoriesInputDescription.tsx +4 -4
- package/src/provider/company/user-form/UserForm.tsx +9 -9
- package/src/provider/location-input/LocationInput.tsx +11 -11
- package/src/provider/location-input/LocationInputDescription.tsx +1 -1
- package/src/provider/location-input/components/FormGroupControll.tsx +1 -1
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +18 -18
- package/src/provider/provider-form/ProviderForm.tsx +11 -11
- package/src/provider/provider-links-input/ProviderLinksInput.tsx +4 -4
- package/src/provider/venue-form/VenueForm.tsx +12 -12
- package/src/provider/working-hours-input/WorkingHoursInput.tsx +13 -13
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +1 -1
- package/src/radio-card/RadioCard.tsx +3 -3
- package/src/recurrence-input/RecurrenceEndInput.tsx +13 -12
- package/src/recurrence-input/RecurrenceIntervalAndFrequencyInput.tsx +6 -6
- package/src/recurrence-input/RecurrenceMonthlyRepeatByInput.tsx +4 -4
- package/src/recurrence-input/RecurrenceWeekdaysInput.tsx +4 -4
- package/src/recurring-date-picker-input/DatePickerInput.tsx +3 -3
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +8 -8
- package/src/recurring-date-picker-input/RecurrenceEndInput.tsx +13 -12
- package/src/recurring-date-picker-input/RecurrenceIntervalAndFrequencyInput.tsx +10 -10
- package/src/recurring-date-picker-input/RecurrenceMonthlyRepeatByInput.tsx +4 -4
- package/src/recurring-date-picker-input/RecurrenceWeekdaysInput.tsx +6 -6
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +4 -4
- package/src/recurring-date-picker-input/utils.ts +4 -4
- package/src/report/DataFieldsSelector/DataFieldsSelector.tsx +6 -6
- package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +23 -23
- package/src/report/ReportTypeSelect/ReportTypeSelect.tsx +9 -9
- package/src/report/card/ReportCard.tsx +3 -3
- package/src/report/form/ReportForm.tsx +9 -9
- package/src/resource/form/ResourceForm.tsx +4 -4
- package/src/resource/form/components/CapacityControl.tsx +3 -2
- package/src/resource/form/components/NameControl.tsx +1 -1
- package/src/resource/form/components/SortControl.tsx +3 -2
- package/src/resource/form/components/ZoneControl.tsx +3 -3
- package/src/root.css +51 -51
- package/src/sales/booking/results/BookingResults.tsx +2 -2
- package/src/sales/booking/results/components/ResultCard.tsx +8 -10
- package/src/sales/coupon/control/CouponFormControl.tsx +31 -24
- package/src/sales/coupon/form/CouponFrom.tsx +3 -3
- package/src/sales/filters/SaleFilters.tsx +3 -3
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +12 -12
- package/src/sales/guest-profile/profile/Profile.tsx +6 -6
- package/src/sales/guest-profile/profile/components/ImageHolder/ImageHolder.tsx +1 -1
- package/src/sales/guest-profile/user-metrics/UserMetrics.tsx +34 -34
- package/src/sales/guest-profile/visited-providers/VisitedProviders.tsx +10 -10
- package/src/sales/life-time-sales/LifeTimeSalesChart.tsx +8 -8
- package/src/sales/manual-booking/number-input-horizontal/NumberInputHorizontal.stories.tsx +1 -1
- package/src/sales/manual-booking/number-input-horizontal/NumberInputHorizontal.tsx +3 -3
- package/src/sales/manual-booking/search-user/SearchUser.tsx +8 -8
- package/src/sales/manual-booking/select-date-type-control/SelectDateTypeControl.tsx +10 -10
- package/src/sales/manual-booking/select-event/SelectEvent.tsx +13 -13
- package/src/sales/manual-booking/select-menu/SelectMenu.tsx +5 -5
- package/src/sales/manual-booking/select-menu/components/MenuButton.tsx +2 -2
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +11 -11
- package/src/sales/modals/payment-modal/PaymentModal.tsx +10 -10
- package/src/sales/modals/refund-modal/RefundModal.stories.tsx +1 -1
- package/src/sales/modals/refund-modal/RefundModal.tsx +11 -11
- package/src/sales/notes/NotesTable.tsx +5 -5
- package/src/sales/notes/NotesTableRow.tsx +13 -13
- package/src/sales/notes/note-form/NoteForm.tsx +11 -11
- package/src/sales/payment-form/SalePaymentForm.tsx +5 -5
- package/src/sales/payment-form/components/RyftPayment/RyftPayment.tsx +9 -9
- package/src/sales/sales-and-views/SalesAndViewsChart.tsx +19 -19
- package/src/sales/source-of-sales/SourceOfSalesChart.tsx +9 -9
- package/src/sales/statistics-chart/StatisticsChart.tsx +4 -4
- package/src/setting/admin/AdminSettingForm.tsx +14 -14
- package/src/setting/admin/PaymentFeeForm.tsx +33 -28
- package/src/setting/dashboard/DashboardSettingForm.tsx +17 -16
- package/src/setting/dashboard/EventSettingForm.tsx +3 -3
- package/src/setting/dashboard/FinancialDataForm.tsx +5 -5
- package/src/setting/dashboard/OtherSettingForm.tsx +29 -29
- package/src/setting/dashboard/ProviderSettingForm.tsx +3 -3
- package/src/setting/dashboard/components/IpInput.tsx +10 -10
- package/src/setting/dashboard/payments/payments-form/PaymentsForm.tsx +8 -8
- package/src/setting/dashboard/payments/payments-modal/PaymentsModal.tsx +4 -4
- package/src/setting/dashboard/snippet-templates/card/SnippetTemplateCard.tsx +8 -8
- package/src/setting/dashboard/snippets/card/SnippetCard.tsx +16 -16
- package/src/setting/system/SystemSettingForm.tsx +8 -8
- package/src/sidebar/elements/Elements.stories.tsx +1 -1
- package/src/sidebar/elements/ReturnBack.tsx +3 -3
- package/src/slide-curtain/SlideCurtain.stories.tsx +1 -1
- package/src/slide-curtain/SlideCurtain.tsx +4 -4
- package/src/snippet/snippet-template/SnippetTemplate.tsx +3 -3
- package/src/snippet/snippet-template/context/snippetTemplate.tsx +2 -2
- package/src/snippet/snippet-template/control/PropertyControl.tsx +8 -8
- package/src/snippet/snippet-template/form/SnippetTemplateForm.tsx +7 -7
- package/src/snippet/snippet-template/preview/Preview.tsx +72 -66
- package/src/snippet/snippet-template/settings/SettingButton.tsx +2 -2
- package/src/sortable-fields/SortableFieldItem.tsx +2 -2
- package/src/sortable-list/CreateSortableListItem.tsx +3 -3
- package/src/sortable-tree/SortableTreeItem.stories.tsx +2 -2
- package/src/sortable-tree/SortableTreeItem.tsx +46 -40
- package/src/sorting-select/SortingSelect.tsx +4 -4
- package/src/static/CountryCodeSelect.tsx +4 -4
- package/src/static/CountrySelect.tsx +5 -5
- package/src/static/CurrencyNumberInput.tsx +6 -5
- package/src/static/RestrictedAccess.tsx +6 -6
- package/src/static/SocialButton.tsx +1 -1
- package/src/static/Static.stories.tsx +24 -24
- package/src/static/UserBadge.tsx +7 -7
- package/src/static/WarningMessage.tsx +2 -2
- package/src/static/date-range-input/DateRangeInput.stories.tsx +1 -1
- package/src/static/date-range-input/DateRangeInput.tsx +12 -12
- package/src/static/form-number-input/FormNumberInput.stories.tsx +1 -1
- package/src/static/form-number-input/FormNumberInput.tsx +5 -4
- package/src/static/images/Images.stories.tsx +1 -1
- package/src/static/loader/BlockLoader.tsx +2 -2
- package/src/static/loader/ButtonLoader.tsx +1 -1
- package/src/static/loader/Loader.stories.tsx +2 -2
- package/src/static/loader/PaymentLoader.tsx +4 -4
- package/src/static/loader/SnippetLoader.tsx +2 -2
- package/src/static/manual-date-picker/ManualDatePicker.tsx +9 -9
- package/src/static/number-input/NumberInput.tsx +7 -6
- package/src/static/switch/Switch.stories.tsx +3 -3
- package/src/static/switch/Switch.tsx +4 -4
- package/src/static/tabs/Tabs.tsx +1 -1
- package/src/static/text-expand/TextExpand.tsx +3 -3
- package/src/striped-static-table/StripedStaticTable.tsx +2 -2
- package/src/styles/activity-card/{GridActivitiesCard.scss → ActivitiesCard.scss} +19 -5
- package/src/styles/activity-card/ListActivitiesCard.scss +12 -42
- package/src/styles/activity-card/_index.scss +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +22 -0
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +28 -1
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/table/FilterHelperComponent.tsx +10 -10
- package/src/table/MenuButton.tsx +1 -1
- package/src/table/PaginationHelperComponent.tsx +7 -7
- package/src/table/PerPageHelperComponent.tsx +5 -5
- package/src/table/ReactTableHelperComponent.tsx +1 -1
- package/src/table/TableHelperComponent.tsx +1 -1
- package/src/theme/Theme.stories.tsx +36 -36
- package/src/tiptap-editor/TipTapEditor.tsx +1 -1
- package/src/tiptap-editor/TipTapMenu/TipTapMenu.tsx +21 -21
- package/src/tiptap-editor/TipTapMenu/components/TipTapMenuItem.tsx +2 -2
- package/src/tiptap-editor/TipTapMenu/extensions/constants.ts +2 -1
- package/src/tiptap-editor/TipTapMenu/extensions/utils.ts +2 -2
- package/src/typeahead/Typeahead.stories.tsx +3 -3
- package/src/typeahead/Typeahead.tsx +15 -1
- package/src/typeahead-helper/TypeaheadHelperComponent.tsx +4 -4
- package/src/venue-map-sets/card/VenueMapSetCard.tsx +14 -14
- package/src/venue-map-sets/form/VenueMapSetForm.tsx +3 -3
- package/src/venue-map-sets/form/components/NameControl.tsx +1 -1
- package/src/venue-map-sets/form/components/VenueMapControl.tsx +8 -8
- package/src/venue-map-sets/form/components/VenueMapImageControl.tsx +5 -5
- package/src/venue-map-sets/form/components/VenueMapModal.tsx +16 -16
- package/src/venue-map-sets/form/components/VenueMapsControl.tsx +1 -1
- package/src/virtualized/components/VirtualizedGrid.tsx +1 -1
- package/src/zone/card/ZoneCard.tsx +14 -14
- package/src/zone/form/ZoneForm.tsx +3 -3
- package/src/zone/form/components/AvailableTimesControl.tsx +4 -4
- package/src/zone/form/components/DescriptionControl.tsx +2 -2
- package/src/zone/form/components/GameDurationControl.tsx +3 -2
- package/src/zone/form/components/NameControl.tsx +1 -1
- package/src/zone/form/components/SortControl.tsx +3 -2
- package/src/zone/form/components/ZoneControl.tsx +1 -1
- package/src/zone/form/components/ZoneImageControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrenceControl.tsx +10 -10
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +10 -10
- package/src/zone/form/components/ZoneTypeControl.tsx +2 -2
- package/tailwind.config.js +3 -6
- package/yarn.lock +95 -69
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useFormContext } from 'react-hook-form';
|
|
3
|
+
import { useImages, HookFormService } from '@licklist/plugins';
|
|
4
|
+
import { IMAGE_TYPE_IMAGE } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
|
|
5
|
+
import { useCallback, useEffect } from 'react';
|
|
6
|
+
import { Form } from 'react-bootstrap';
|
|
7
|
+
import { FileUpload } from '../../file-upload/FileUpload.js';
|
|
8
|
+
import { useTranslation } from 'react-i18next';
|
|
9
|
+
import { isEqual } from 'lodash';
|
|
10
|
+
|
|
11
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
12
|
+
try {
|
|
13
|
+
var info = gen[key](arg);
|
|
14
|
+
var value = info.value;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
reject(error);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (info.done) {
|
|
20
|
+
resolve(value);
|
|
21
|
+
} else {
|
|
22
|
+
Promise.resolve(value).then(_next, _throw);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
function _async_to_generator(fn) {
|
|
26
|
+
return function() {
|
|
27
|
+
var self = this, args = arguments;
|
|
28
|
+
return new Promise(function(resolve, reject) {
|
|
29
|
+
var gen = fn.apply(self, args);
|
|
30
|
+
function _next(value) {
|
|
31
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
32
|
+
}
|
|
33
|
+
function _throw(err) {
|
|
34
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
35
|
+
}
|
|
36
|
+
_next(undefined);
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function _define_property(obj, key, value) {
|
|
41
|
+
if (key in obj) {
|
|
42
|
+
Object.defineProperty(obj, key, {
|
|
43
|
+
value: value,
|
|
44
|
+
enumerable: true,
|
|
45
|
+
configurable: true,
|
|
46
|
+
writable: true
|
|
47
|
+
});
|
|
48
|
+
} else {
|
|
49
|
+
obj[key] = value;
|
|
50
|
+
}
|
|
51
|
+
return obj;
|
|
52
|
+
}
|
|
53
|
+
function _object_spread(target) {
|
|
54
|
+
for(var i = 1; i < arguments.length; i++){
|
|
55
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
56
|
+
var ownKeys = Object.keys(source);
|
|
57
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
58
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
59
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
ownKeys.forEach(function(key) {
|
|
63
|
+
_define_property(target, key, source[key]);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
function ownKeys(object, enumerableOnly) {
|
|
69
|
+
var keys = Object.keys(object);
|
|
70
|
+
if (Object.getOwnPropertySymbols) {
|
|
71
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
72
|
+
if (enumerableOnly) {
|
|
73
|
+
symbols = symbols.filter(function(sym) {
|
|
74
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
keys.push.apply(keys, symbols);
|
|
78
|
+
}
|
|
79
|
+
return keys;
|
|
80
|
+
}
|
|
81
|
+
function _object_spread_props(target, source) {
|
|
82
|
+
source = source != null ? source : {};
|
|
83
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
84
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
85
|
+
} else {
|
|
86
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
87
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return target;
|
|
91
|
+
}
|
|
92
|
+
function _ts_generator(thisArg, body) {
|
|
93
|
+
var f, y, t, g, _ = {
|
|
94
|
+
label: 0,
|
|
95
|
+
sent: function() {
|
|
96
|
+
if (t[0] & 1) throw t[1];
|
|
97
|
+
return t[1];
|
|
98
|
+
},
|
|
99
|
+
trys: [],
|
|
100
|
+
ops: []
|
|
101
|
+
};
|
|
102
|
+
return g = {
|
|
103
|
+
next: verb(0),
|
|
104
|
+
"throw": verb(1),
|
|
105
|
+
"return": verb(2)
|
|
106
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
107
|
+
return this;
|
|
108
|
+
}), g;
|
|
109
|
+
function verb(n) {
|
|
110
|
+
return function(v) {
|
|
111
|
+
return step([
|
|
112
|
+
n,
|
|
113
|
+
v
|
|
114
|
+
]);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function step(op) {
|
|
118
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
119
|
+
while(_)try {
|
|
120
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
121
|
+
if (y = 0, t) op = [
|
|
122
|
+
op[0] & 2,
|
|
123
|
+
t.value
|
|
124
|
+
];
|
|
125
|
+
switch(op[0]){
|
|
126
|
+
case 0:
|
|
127
|
+
case 1:
|
|
128
|
+
t = op;
|
|
129
|
+
break;
|
|
130
|
+
case 4:
|
|
131
|
+
_.label++;
|
|
132
|
+
return {
|
|
133
|
+
value: op[1],
|
|
134
|
+
done: false
|
|
135
|
+
};
|
|
136
|
+
case 5:
|
|
137
|
+
_.label++;
|
|
138
|
+
y = op[1];
|
|
139
|
+
op = [
|
|
140
|
+
0
|
|
141
|
+
];
|
|
142
|
+
continue;
|
|
143
|
+
case 7:
|
|
144
|
+
op = _.ops.pop();
|
|
145
|
+
_.trys.pop();
|
|
146
|
+
continue;
|
|
147
|
+
default:
|
|
148
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
149
|
+
_ = 0;
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
153
|
+
_.label = op[1];
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
157
|
+
_.label = t[1];
|
|
158
|
+
t = op;
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
if (t && _.label < t[2]) {
|
|
162
|
+
_.label = t[2];
|
|
163
|
+
_.ops.push(op);
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
if (t[2]) _.ops.pop();
|
|
167
|
+
_.trys.pop();
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
op = body.call(thisArg, _);
|
|
171
|
+
} catch (e) {
|
|
172
|
+
op = [
|
|
173
|
+
6,
|
|
174
|
+
e
|
|
175
|
+
];
|
|
176
|
+
y = 0;
|
|
177
|
+
} finally{
|
|
178
|
+
f = t = 0;
|
|
179
|
+
}
|
|
180
|
+
if (op[0] & 5) throw op[1];
|
|
181
|
+
return {
|
|
182
|
+
value: op[0] ? op[1] : void 0,
|
|
183
|
+
done: true
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
var ProductSetImageControl = function() {
|
|
188
|
+
var t = useTranslation('Design').t;
|
|
189
|
+
var _useFormContext = useFormContext(), errors = _useFormContext.formState.errors, setValue = _useFormContext.setValue, watch = _useFormContext.watch, clearErrors = _useFormContext.clearErrors;
|
|
190
|
+
var currentProductSet = watch();
|
|
191
|
+
var _useImages = useImages(null), images = _useImages.images, handleImageRemove = _useImages.handleImageRemove, handleImageUploading = _useImages.handleImageUploading, isImageUploading = _useImages.isLoading, setImages = _useImages.setImages;
|
|
192
|
+
var onFilesChange = useCallback(function() {
|
|
193
|
+
var _ref = _async_to_generator(function(files) {
|
|
194
|
+
var uploadedFiles;
|
|
195
|
+
return _ts_generator(this, function(_state) {
|
|
196
|
+
switch(_state.label){
|
|
197
|
+
case 0:
|
|
198
|
+
return [
|
|
199
|
+
4,
|
|
200
|
+
handleImageUploading(files, IMAGE_TYPE_IMAGE)
|
|
201
|
+
];
|
|
202
|
+
case 1:
|
|
203
|
+
uploadedFiles = _state.sent();
|
|
204
|
+
if (!uploadedFiles) return [
|
|
205
|
+
2
|
|
206
|
+
];
|
|
207
|
+
setValue('localImageBlobURL', URL.createObjectURL(files[0]));
|
|
208
|
+
return [
|
|
209
|
+
2
|
|
210
|
+
];
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
return function(files) {
|
|
215
|
+
return _ref.apply(this, arguments);
|
|
216
|
+
};
|
|
217
|
+
}(), // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
218
|
+
[
|
|
219
|
+
handleImageUploading
|
|
220
|
+
]);
|
|
221
|
+
var onImageRemove = useCallback(function(id, path) {
|
|
222
|
+
handleImageRemove(id, path);
|
|
223
|
+
setValue('localImageBlobURL', undefined);
|
|
224
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
225
|
+
[
|
|
226
|
+
handleImageRemove
|
|
227
|
+
]);
|
|
228
|
+
useEffect(function() {
|
|
229
|
+
if (!currentProductSet || !currentProductSet.image) return;
|
|
230
|
+
setImages([
|
|
231
|
+
_object_spread_props(_object_spread({}, currentProductSet.image), {
|
|
232
|
+
url: currentProductSet.image.url || (currentProductSet === null || currentProductSet === void 0 ? void 0 : currentProductSet.localImageBlobURL)
|
|
233
|
+
})
|
|
234
|
+
]);
|
|
235
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
236
|
+
}, [
|
|
237
|
+
currentProductSet === null || currentProductSet === void 0 ? void 0 : currentProductSet.image
|
|
238
|
+
]);
|
|
239
|
+
useEffect(function() {
|
|
240
|
+
if (isEqual(images[0], currentProductSet === null || currentProductSet === void 0 ? void 0 : currentProductSet.image)) return;
|
|
241
|
+
setValue('image', images[0] || null);
|
|
242
|
+
if (images[0]) {
|
|
243
|
+
clearErrors('image');
|
|
244
|
+
}
|
|
245
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
246
|
+
}, [
|
|
247
|
+
images
|
|
248
|
+
]);
|
|
249
|
+
return /*#__PURE__*/ jsxs(Form.Group, {
|
|
250
|
+
controlId: "name",
|
|
251
|
+
children: [
|
|
252
|
+
/*#__PURE__*/ jsx(Form.Control, {
|
|
253
|
+
isInvalid: HookFormService.isInvalid('image', errors),
|
|
254
|
+
hidden: true
|
|
255
|
+
}),
|
|
256
|
+
/*#__PURE__*/ jsx(FileUpload, {
|
|
257
|
+
onFilesChange: onFilesChange,
|
|
258
|
+
allowedExtensions: [
|
|
259
|
+
'jpeg',
|
|
260
|
+
'jpg',
|
|
261
|
+
'png'
|
|
262
|
+
],
|
|
263
|
+
subTitle: ".jpeg .jpg .png",
|
|
264
|
+
enablePreview: true,
|
|
265
|
+
onFileRemove: onImageRemove,
|
|
266
|
+
defaultFiles: images,
|
|
267
|
+
isLoading: isImageUploading,
|
|
268
|
+
withIcon: true,
|
|
269
|
+
title: t('Design:addImage')
|
|
270
|
+
}),
|
|
271
|
+
/*#__PURE__*/ jsx(Form.Control.Feedback, {
|
|
272
|
+
type: "invalid",
|
|
273
|
+
children: HookFormService.getErrors('image', errors)
|
|
274
|
+
})
|
|
275
|
+
]
|
|
276
|
+
});
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
export { ProductSetImageControl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileFooter.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/MobileFooter.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"MobileFooter.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/MobileFooter.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,4CAY3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductCategoriesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductCategoriesControl.tsx"],"names":[],"mappings":"AAaA,OAAO,EAKL,YAAY,EACb,MAAM,kEAAkE,CAAA;AAQzE,OAAO,EAAwB,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAoCtE,UAAU,6BAA8B,SAAQ,aAAa;IAC3D,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AA0BD,wBAAgB,wBAAwB,CAAC,EACvC,SAAS,EACT,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,oBAAoB,GACrB,EAAE,6BAA6B,2CA4T/B;AAED,eAAO,MAAM,cAAc,iBACX,YAAY,SACnB,MAAM,KACZ;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAczC,CAAA"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs, Fragment
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useContext, useState, useEffect } from 'react';
|
|
3
3
|
import HookFormService from '@licklist/plugins/dist/services/Form/HookFormService';
|
|
4
4
|
import { uniqueId } from 'lodash';
|
|
5
5
|
import { Badge } from 'react-bootstrap';
|
|
6
6
|
import { useFormContext, useFieldArray, useWatch, Controller } from 'react-hook-form';
|
|
7
|
+
import { FaTicketAlt, FaCalendar, FaBars, FaBowlingBall } from 'react-icons/fa';
|
|
7
8
|
import { useTranslation } from 'react-i18next';
|
|
8
9
|
import { useSensor, MouseSensor } from '@dnd-kit/core';
|
|
9
10
|
import { CATEGORY_TYPE_GAME, CATEGORY_TYPE_FIXED_DURATION, QUANTITY_TYPE_STANDARD, CATEGORY_TYPE_TICKETS } from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
@@ -13,7 +14,7 @@ import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js'
|
|
|
13
14
|
import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
|
|
14
15
|
import { ProductCategoryControl } from '../product-category/ProductCategoryControl.js';
|
|
15
16
|
import { ProductsControl } from './ProductsControl.js';
|
|
16
|
-
import { SelectCategoryModal } from './SelectCategoryModal.js';
|
|
17
|
+
import { CATEGORY_TYPES_NAMES, SelectCategoryModal } from './SelectCategoryModal.js';
|
|
17
18
|
import { ProductSetLoadingContext } from './context.js';
|
|
18
19
|
import { VenueMapSetModal } from './VenueMapSetModal.js';
|
|
19
20
|
import { sortArrayByIndex, moveArrayElements } from '../utils/index.js';
|
|
@@ -117,6 +118,40 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
117
118
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
118
119
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
119
120
|
}
|
|
121
|
+
var _obj;
|
|
122
|
+
// @TODO not for first release
|
|
123
|
+
// import Popover from "./ProductSetFormPopover";
|
|
124
|
+
var CATEGORIES_TYPE = (_obj = {}, _define_property(_obj, CATEGORY_TYPES_NAMES.tickets, {
|
|
125
|
+
label: 'tickets',
|
|
126
|
+
icon: /*#__PURE__*/ jsx(FaTicketAlt, {
|
|
127
|
+
color: "#0e8ce2",
|
|
128
|
+
size: 10
|
|
129
|
+
})
|
|
130
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.bookings, {
|
|
131
|
+
label: 'bookings',
|
|
132
|
+
icon: /*#__PURE__*/ jsx(FaCalendar, {
|
|
133
|
+
color: "#0e8ce2",
|
|
134
|
+
size: 10
|
|
135
|
+
})
|
|
136
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.menuItems, {
|
|
137
|
+
label: 'menuItems',
|
|
138
|
+
icon: /*#__PURE__*/ jsx(FaBars, {
|
|
139
|
+
color: "#0e8ce2",
|
|
140
|
+
size: 10
|
|
141
|
+
})
|
|
142
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.game, {
|
|
143
|
+
label: 'game',
|
|
144
|
+
icon: /*#__PURE__*/ jsx(FaBowlingBall, {
|
|
145
|
+
color: "#0e8ce2",
|
|
146
|
+
size: 10
|
|
147
|
+
})
|
|
148
|
+
}), _define_property(_obj, CATEGORY_TYPES_NAMES.fixedDuration, {
|
|
149
|
+
label: 'fixedDuration',
|
|
150
|
+
icon: /*#__PURE__*/ jsx(FaCalendar, {
|
|
151
|
+
color: "#0e8ce2",
|
|
152
|
+
size: 10
|
|
153
|
+
})
|
|
154
|
+
}), _obj);
|
|
120
155
|
var getCategoryDefaultValue = function(categoryType, sort) {
|
|
121
156
|
return {
|
|
122
157
|
id: null,
|
|
@@ -250,6 +285,7 @@ function ProductCategoriesControl(param) {
|
|
|
250
285
|
var onSetIsExpanded = function() {
|
|
251
286
|
setIsExpanded(productCategoryId);
|
|
252
287
|
};
|
|
288
|
+
var categoryType = CATEGORIES_TYPE[productCategory.type];
|
|
253
289
|
return /*#__PURE__*/ jsx(Controller, {
|
|
254
290
|
name: "".concat(productCategoriesFieldName, ".").concat(index, ".name"),
|
|
255
291
|
control: control,
|
|
@@ -299,6 +335,16 @@ function ProductCategoriesControl(param) {
|
|
|
299
335
|
secondaryBadge: getBadgeConfig(productCategory.type, t(productCategory.type)),
|
|
300
336
|
modalClass: ProductSetModalClasses.category,
|
|
301
337
|
isNewAdded: showCategoryModal,
|
|
338
|
+
itemButton: /*#__PURE__*/ jsxs("div", {
|
|
339
|
+
className: "btn-outline-primary item-icon sm border border-primary rounded-sm",
|
|
340
|
+
children: [
|
|
341
|
+
categoryType.icon,
|
|
342
|
+
/*#__PURE__*/ jsx("span", {
|
|
343
|
+
className: "ml-2",
|
|
344
|
+
children: t(categoryType.label)
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
}),
|
|
302
348
|
body: /*#__PURE__*/ jsx(ProductCategoryControl, {
|
|
303
349
|
isLoading: isLoading,
|
|
304
350
|
onCategoryNameChange: onChange,
|
|
@@ -10,10 +10,13 @@ import { SelectItem } from '../../types/generic/SelectItem';
|
|
|
10
10
|
export interface WithIsLoading {
|
|
11
11
|
isLoading: boolean;
|
|
12
12
|
}
|
|
13
|
+
export interface WithIdOptional {
|
|
14
|
+
id?: number;
|
|
15
|
+
}
|
|
13
16
|
export interface WithId {
|
|
14
17
|
id: number;
|
|
15
18
|
}
|
|
16
|
-
export interface ProductSetFormValues extends FormValues,
|
|
19
|
+
export interface ProductSetFormValues extends FormValues, WithIdOptional, ProductSetControlValues {
|
|
17
20
|
steps: Step[];
|
|
18
21
|
isOverrides?: boolean;
|
|
19
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAIzF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAK3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAA;AACrI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAA;AAIzF,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAK3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAA;AACrI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAA;AAGrF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAI3D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAA;CACnB;AACD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAA;CACX;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,cAAc,EACd,uBAAuB;IACzB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC3D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;IAC5B,4BAA4B,CAAC,EAAE,gCAAgC,CAAC,sBAAsB,CAAC,CAAA;IACvF,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;IACrB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACR,GAAG,MAAM,EACV,EAAE,mBAAmB,2CAiKrB"}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { useEffect } from 'react';
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
3
|
import { Form, Row, Col, Button } from 'react-bootstrap';
|
|
4
4
|
import { useForm, FormProvider } from 'react-hook-form';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import FormErrorService from '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
7
7
|
import { isEqual } from 'lodash';
|
|
8
|
+
import { transformErrorToMessage } from '@licklist/plugins/dist/utils/error';
|
|
8
9
|
import { Dialog } from '../../modals/dialog/Dialog.js';
|
|
9
10
|
import { useDialogContext } from '../../modals/dialog/DialogContext.js';
|
|
10
11
|
import { ProductSetControl } from '../control/ProductSetControl.js';
|
|
11
12
|
import { ProductSetContextProvider, ProductSetLoadingContext } from './context.js';
|
|
12
13
|
import { getFilteredTemplates, checkAvailableTimesErrors } from '../utils/index.js';
|
|
14
|
+
import { ErrorModal } from '../../iframe/order-process/components/ErrorModal/ErrorModal.js';
|
|
13
15
|
|
|
16
|
+
function _array_like_to_array(arr, len) {
|
|
17
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
18
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
19
|
+
return arr2;
|
|
20
|
+
}
|
|
21
|
+
function _array_with_holes(arr) {
|
|
22
|
+
if (Array.isArray(arr)) return arr;
|
|
23
|
+
}
|
|
14
24
|
function _define_property(obj, key, value) {
|
|
15
25
|
if (key in obj) {
|
|
16
26
|
Object.defineProperty(obj, key, {
|
|
@@ -24,6 +34,33 @@ function _define_property(obj, key, value) {
|
|
|
24
34
|
}
|
|
25
35
|
return obj;
|
|
26
36
|
}
|
|
37
|
+
function _iterable_to_array_limit(arr, i) {
|
|
38
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
39
|
+
if (_i == null) return;
|
|
40
|
+
var _arr = [];
|
|
41
|
+
var _n = true;
|
|
42
|
+
var _d = false;
|
|
43
|
+
var _s, _e;
|
|
44
|
+
try {
|
|
45
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
46
|
+
_arr.push(_s.value);
|
|
47
|
+
if (i && _arr.length === i) break;
|
|
48
|
+
}
|
|
49
|
+
} catch (err) {
|
|
50
|
+
_d = true;
|
|
51
|
+
_e = err;
|
|
52
|
+
} finally{
|
|
53
|
+
try {
|
|
54
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
55
|
+
} finally{
|
|
56
|
+
if (_d) throw _e;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return _arr;
|
|
60
|
+
}
|
|
61
|
+
function _non_iterable_rest() {
|
|
62
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
63
|
+
}
|
|
27
64
|
function _object_spread(target) {
|
|
28
65
|
for(var i = 1; i < arguments.length; i++){
|
|
29
66
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -90,6 +127,17 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
90
127
|
}
|
|
91
128
|
return target;
|
|
92
129
|
}
|
|
130
|
+
function _sliced_to_array(arr, i) {
|
|
131
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
132
|
+
}
|
|
133
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
134
|
+
if (!o) return;
|
|
135
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
136
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
137
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
138
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
139
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
140
|
+
}
|
|
93
141
|
function ProductSetForm(_param) {
|
|
94
142
|
var companyName = _param.companyName, isLoading = _param.isLoading, defaultValues = _param.defaultValues, onSubmitAndRedirect = _param.onSubmitAndRedirect, onSubmitNoRedirect = _param.onSubmitNoRedirect, productGroupList = _param.productGroupList, serverErrors = _param.serverErrors, _param_providerHasMap = _param.providerHasMap, providerHasMap = _param_providerHasMap === void 0 ? false : _param_providerHasMap, _param_venueMapSets = _param.venueMapSets, venueMapSets = _param_venueMapSets === void 0 ? [] : _param_venueMapSets, providerHasBookingManagement = _param.providerHasBookingManagement, zones = _param.zones, isCreateAction = _param.isCreateAction, workHours = _param.workHours, isOverrides = _param.isOverrides, isCreateNewOverrides = _param.isCreateNewOverrides, timeZone = _param.timeZone, shared = _object_without_properties(_param, [
|
|
95
143
|
"companyName",
|
|
@@ -111,6 +159,7 @@ function ProductSetForm(_param) {
|
|
|
111
159
|
]);
|
|
112
160
|
var t = useTranslation('Design').t;
|
|
113
161
|
var _useDialogContext = useDialogContext(), isShownDialog = _useDialogContext.isShownDialog, onBeforeUnload = _useDialogContext.onBeforeUnload, onPopState = _useDialogContext.onPopState, onApproveDialog = _useDialogContext.onApproveDialog, onDeclineDialog = _useDialogContext.onDeclineDialog;
|
|
162
|
+
var _useState = _sliced_to_array(useState(''), 2), errorMessage = _useState[0], setErrorMessage = _useState[1];
|
|
114
163
|
var form = useForm({
|
|
115
164
|
defaultValues: defaultValues,
|
|
116
165
|
mode: 'onChange'
|
|
@@ -142,6 +191,13 @@ function ProductSetForm(_param) {
|
|
|
142
191
|
if (!serverErrors) {
|
|
143
192
|
return;
|
|
144
193
|
}
|
|
194
|
+
if (!Array.isArray(serverErrors)) {
|
|
195
|
+
setErrorMessage(transformErrorToMessage(serverErrors));
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (Array.isArray(serverErrors) && serverErrors[0]) {
|
|
199
|
+
setErrorMessage(serverErrors[0]);
|
|
200
|
+
}
|
|
145
201
|
FormErrorService.handleServerErrors(serverErrors, setError);
|
|
146
202
|
}, [
|
|
147
203
|
serverErrors,
|
|
@@ -171,6 +227,13 @@ function ProductSetForm(_param) {
|
|
|
171
227
|
onApprove: onApproveDialog,
|
|
172
228
|
onDecline: onDeclineDialog
|
|
173
229
|
}),
|
|
230
|
+
/*#__PURE__*/ jsx(ErrorModal, {
|
|
231
|
+
message: errorMessage,
|
|
232
|
+
isOpen: !!errorMessage,
|
|
233
|
+
onClose: function() {
|
|
234
|
+
return setErrorMessage('');
|
|
235
|
+
}
|
|
236
|
+
}),
|
|
174
237
|
/*#__PURE__*/ jsx(FormProvider, _object_spread_props(_object_spread({}, form), {
|
|
175
238
|
children: /*#__PURE__*/ jsx(Form, {
|
|
176
239
|
onSubmit: form.handleSubmit(submitHandler(onSubmitAndRedirect)),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductSetNameControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetNameControl.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,gCAI/B;IACD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,4CAeA,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Form } from 'react-bootstrap';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
|
|
5
|
+
var ProductSetNameControl = function(param) {
|
|
6
|
+
var value = param.value, onChange = param.onChange, error = param.error;
|
|
7
|
+
var t = useTranslation([
|
|
8
|
+
'Design'
|
|
9
|
+
]).t;
|
|
10
|
+
return /*#__PURE__*/ jsxs(Form.Group, {
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ jsxs(Form.Label, {
|
|
13
|
+
children: [
|
|
14
|
+
t('Design:ProductSetName'),
|
|
15
|
+
"*"
|
|
16
|
+
]
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ jsx(Form.Control, {
|
|
19
|
+
value: value,
|
|
20
|
+
maxLength: 255,
|
|
21
|
+
onChange: function(e) {
|
|
22
|
+
return onChange(e.target.value);
|
|
23
|
+
},
|
|
24
|
+
placeholder: t('Design:placeholderProductSetName'),
|
|
25
|
+
isInvalid: Boolean(error)
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ jsx(Form.Control.Feedback, {
|
|
28
|
+
type: "invalid",
|
|
29
|
+
children: error
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { ProductSetNameControl };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductZonesControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductZonesControl.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,kEAAkE,CAAA;AAG/F,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAA;AAQrE,UAAU,wBAAwB,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAClE,WAAW,EAAE,OAAO,CAAA;IACpB,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B;AAaD,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,UAAU,mDAIrD,wBAAwB,CAAC,CAAC,CAAC,4CAqI7B,CAAA"}
|
|
@@ -11,8 +11,6 @@ import { CreateProductSetItem } from '../item/CreateProductSetItem.js';
|
|
|
11
11
|
import { SortableTree } from '../../sortable-tree/SortableTree.js';
|
|
12
12
|
import { ProductSetModalClasses } from '../../sortable-tree/SortableTreeItem.js';
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
-
// @ts-nocheck
|
|
16
14
|
function _array_like_to_array(arr, len) {
|
|
17
15
|
if (len == null || len > arr.length) len = arr.length;
|
|
18
16
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -23,6 +23,7 @@ import 'react-bootstrap/Col';
|
|
|
23
23
|
import 'react-bootstrap/InputGroup';
|
|
24
24
|
import 'react-bootstrap/Row';
|
|
25
25
|
import '@licklist/plugins/dist/services/Form/FormErrorService';
|
|
26
|
+
import '@licklist/plugins/dist/utils/error';
|
|
26
27
|
import '@licklist/plugins';
|
|
27
28
|
import 'react-bootstrap/Button';
|
|
28
29
|
import 'react-bootstrap/OverlayTrigger';
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
1
2
|
import { CategoryType } from '@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper';
|
|
3
|
+
export declare const CATEGORY_TYPES_NAMES: {
|
|
4
|
+
readonly menuItems: "menuItems";
|
|
5
|
+
readonly tickets: "tickets";
|
|
6
|
+
readonly bookings: "bookings";
|
|
7
|
+
readonly game: "game";
|
|
8
|
+
readonly fixedDuration: "fixedDuration";
|
|
9
|
+
};
|
|
10
|
+
export type CategoryConfig = {
|
|
11
|
+
label: string;
|
|
12
|
+
icon: ReactElement;
|
|
13
|
+
};
|
|
2
14
|
export interface SelectCategoryModalProps {
|
|
3
15
|
isVisible: boolean;
|
|
4
16
|
onHide: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectCategoryModal.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SelectCategoryModal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAwB,MAAM,OAAO,CAAA;AAG1D,OAAO,EAML,YAAY,EACb,MAAM,kEAAkE,CAAA;AAgBzE,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAAA;AA4BlE,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,gBAAgB,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAA;CACnD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,MAAM,EACN,gBAAgB,GACjB,EAAE,wBAAwB,2CAyH1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SubProductsControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAIvD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"SubProductsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/SubProductsControl.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAIvD,UAAU,uBAAuB;IAC/B,YAAY,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC,cAAc,CAAC,CAAA;IACvE,SAAS,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,MAAM,CAAA;IAC5B,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,WAAW,GACZ,EAAE,uBAAuB,2CAuDzB"}
|
|
@@ -108,9 +108,6 @@ function SubProductsControl(param) {
|
|
|
108
108
|
images: (_subProducts_index = subProducts[index]) === null || _subProducts_index === void 0 ? void 0 : _subProducts_index.images
|
|
109
109
|
});
|
|
110
110
|
// @ts-expect-error TS2345
|
|
111
|
-
// @TODO fix prod type error
|
|
112
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
113
|
-
// @ts-ignore
|
|
114
111
|
append(subProductCopy);
|
|
115
112
|
}
|
|
116
113
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VenueMapsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/VenueMapsControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAA;AAEpF,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAA;AAG5F,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAA;IACvC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAA;CACjE,CAAA;AAED,eAAO,MAAM,gBAAgB,mEAK1B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"VenueMapsControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/VenueMapsControl.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2DAA2D,CAAA;AAEpF,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAA;AAG5F,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAA;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,CAAA;IACvC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE,KAAK,IAAI,CAAA;CACjE,CAAA;AAED,eAAO,MAAM,gBAAgB,mEAK1B,qBAAqB,4CA2DvB,CAAA"}
|
|
@@ -35,9 +35,6 @@ var VenueMapsControl = function(param) {
|
|
|
35
35
|
url: image.url,
|
|
36
36
|
name: name,
|
|
37
37
|
points: points,
|
|
38
|
-
// @TODO fix prod type error
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
40
|
-
// @ts-ignore
|
|
41
38
|
products: products,
|
|
42
39
|
pointProducts: pointProducts,
|
|
43
40
|
onPointProductsChange: onPointProductsChange
|