@licklist/design 0.44.485-dev.38 → 0.44.485-dev.4
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/types/index.d.ts +1 -1
- package/dist/affiliate/types/index.d.ts.map +1 -1
- package/dist/auth/Login/LoginComponent.d.ts +1 -1
- package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
- package/dist/auth/Login/LoginFormComponent.d.ts +1 -1
- package/dist/auth/Login/LoginFormComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterComponent.d.ts +1 -1
- package/dist/auth/Register/RegisterComponent.d.ts.map +1 -1
- package/dist/auth/Register/RegisterFormComponent.d.ts +1 -1
- package/dist/auth/Register/RegisterFormComponent.d.ts.map +1 -1
- package/dist/auth/ResetPassword/ResetPasswordFormComponent.d.ts +1 -1
- package/dist/auth/ResetPassword/ResetPasswordFormComponent.d.ts.map +1 -1
- package/dist/collapsible-input-group/CollapsibleInputGroup.d.ts +1 -1
- package/dist/collapsible-input-group/CollapsibleInputGroup.d.ts.map +1 -1
- package/dist/custom-fields/field-set/CustomFieldSets.d.ts +3 -3
- package/dist/custom-fields/field-set/CustomFieldSets.d.ts.map +1 -1
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.d.ts +1 -1
- package/dist/custom-fields/field-set/components/CustomFieldSet/CustomFieldSet.d.ts.map +1 -1
- package/dist/custom-fields/field-set/contexts/useCustomFieldSets.d.ts +2 -2
- package/dist/custom-fields/field-set/contexts/useCustomFieldSets.d.ts.map +1 -1
- package/dist/customers/components/filter/CustomerFilter.d.ts +3 -2
- package/dist/customers/components/filter/CustomerFilter.d.ts.map +1 -1
- package/dist/customers/components/filter/CustomerFilter.js +1 -1
- package/dist/events/edit-event-modal/IntervalInput.d.ts +1 -4
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +1 -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 +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -1
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts +3 -3
- package/dist/events/edit-recurrent-event-modal/EditRecurrentEventModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.d.ts.map +1 -1
- package/dist/events/event-statistic-modal/EventStatisticModal.js +1 -1
- package/dist/events/event-venue-map/EventVenueMap.d.ts +2 -5
- package/dist/events/event-venue-map/EventVenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/EventVenueMap.js +1 -1
- package/dist/events/event-venue-map/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/events/event-venue-map/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/ProductsControl/ProductsControl.d.ts +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/ProductsControl/ProductsControl.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/SelectControl/SelectControl.d.ts +1 -1
- package/dist/events/event-venue-map/components/Dropdown/components/SelectControl/SelectControl.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/MapPoint.d.ts +1 -1
- package/dist/events/event-venue-map/components/MapPoint/MapPoint.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/MapPoint.js +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/DeleteIcon/DeleteIcon.d.ts +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/DeleteIcon/DeleteIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/EditIcon/EditIcon.d.ts +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/EditIcon/EditIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/PointIcon/PointIcon.d.ts +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/PointIcon/PointIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.js +1 -1
- package/dist/events/event-venue-map/components/VenueMap/VenueMap.d.ts +2 -4
- package/dist/events/event-venue-map/components/VenueMap/VenueMap.d.ts.map +1 -1
- package/dist/events/event-venue-map/components/VenueMap/VenueMap.js +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts +1 -1
- package/dist/events/event-venue-map/hooks/useCanvasSize.d.ts.map +1 -1
- package/dist/events/event-venue-map/hooks/useStageActions.d.ts +1 -1
- package/dist/events/event-venue-map/hooks/useStageActions.d.ts.map +1 -1
- package/dist/events/event-venue-map/types/index.d.ts +5 -5
- package/dist/events/event-venue-map/types/index.d.ts.map +1 -1
- package/dist/events/event-venue-map/utils/index.d.ts +3 -3
- package/dist/events/event-venue-map/utils/index.d.ts.map +1 -1
- package/dist/file-upload/FilePreview.d.ts +2 -2
- package/dist/file-upload/FilePreview.d.ts.map +1 -1
- package/dist/file-upload/FileUpload.d.ts +1 -1
- package/dist/file-upload/FileUpload.d.ts.map +1 -1
- package/dist/header/Header.d.ts +1 -1
- package/dist/header/Header.d.ts.map +1 -1
- package/dist/help/example/Example.d.ts +4 -4
- package/dist/help/example/Example.d.ts.map +1 -1
- package/dist/help/popover/HelpPopover.d.ts +1 -1
- package/dist/help/popover/HelpPopover.d.ts.map +1 -1
- package/dist/iframe/custom-fields/components/CustomDateField.d.ts +1 -1
- package/dist/iframe/custom-fields/components/CustomDateField.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts +1 -1
- package/dist/iframe/event/event-calendar/EventCalendar.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDate/CalendarDate.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts +2 -2
- package/dist/iframe/event/event-calendar/components/CalendarSelect/CalendarSelect.d.ts.map +1 -1
- package/dist/iframe/event/event-calendar/types/index.d.ts +1 -1
- package/dist/iframe/event/event-calendar/types/index.d.ts.map +1 -1
- package/dist/iframe/event/event-details/EventDetails.d.ts +1 -1
- package/dist/iframe/event/event-details/EventDetails.d.ts.map +1 -1
- package/dist/iframe/event/event-order-short-summary/components/Summary/Summary.d.ts +6 -5
- package/dist/iframe/event/event-order-short-summary/components/Summary/Summary.d.ts.map +1 -1
- package/dist/iframe/event/event-order-short-summary/components/Summary/Summary.js +1 -1
- package/dist/iframe/event/event-product-sets/EventProductSets.d.ts +1 -1
- package/dist/iframe/event/event-product-sets/EventProductSets.d.ts.map +1 -1
- package/dist/iframe/event/event-product-sets/components/EventProductSet.d.ts +1 -1
- package/dist/iframe/event/event-product-sets/components/EventProductSet.d.ts.map +1 -1
- package/dist/iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.d.ts +1 -1
- package/dist/iframe/event/event-step-venue-map-zones/EventStepVenueMapZones.d.ts.map +1 -1
- package/dist/iframe/event/event-step-venue-map-zones/components/EventStepVenueMapZone.d.ts +1 -1
- package/dist/iframe/event/event-step-venue-map-zones/components/EventStepVenueMapZone.d.ts.map +1 -1
- package/dist/iframe/event/event-venue-map/IframeEventVenueMap.d.ts +1 -5
- package/dist/iframe/event/event-venue-map/IframeEventVenueMap.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +4 -4
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/utils/index.js +1 -1
- package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts +4 -4
- package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts +1 -3
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.js +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/components/Category.d.ts +2 -4
- package/dist/iframe/order-process/components/CalendarStepsForm/components/Category.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/components/Category.js +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.d.ts +2 -4
- package/dist/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.js +1 -1
- package/dist/iframe/order-process/components/Category/Category.d.ts +1 -2
- package/dist/iframe/order-process/components/Category/Category.d.ts.map +1 -1
- package/dist/iframe/order-process/components/Category/Category.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts +1 -2
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.d.ts +0 -1
- 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 +1 -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 +1 -1
- package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.d.ts +1 -1
- package/dist/iframe/order-process/components/NavigationSteps/NavigationSteps.d.ts.map +1 -1
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts +1 -1
- package/dist/iframe/order-process/components/PaymentCard/PaymentCard.d.ts.map +1 -1
- package/dist/iframe/order-process/components/StepsForm/StepsForm.d.ts +1 -2
- package/dist/iframe/order-process/components/StepsForm/StepsForm.d.ts.map +1 -1
- package/dist/iframe/order-process/components/StepsForm/StepsForm.js +1 -1
- package/dist/iframe/order-process/components/Timer/Timer.d.ts +1 -1
- package/dist/iframe/order-process/components/Timer/Timer.d.ts.map +1 -1
- package/dist/iframe/page/Page.d.ts +1 -1
- package/dist/iframe/page/Page.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/PageBody.d.ts +1 -1
- package/dist/iframe/page/components/PageBody/PageBody.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/RightBlock/RightBlock.d.ts +1 -1
- package/dist/iframe/page/components/PageBody/components/RightBlock/RightBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/types.d.ts +1 -1
- package/dist/iframe/page/components/PageBody/types.d.ts.map +1 -1
- package/dist/iframe/page/components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/iframe/page/components/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts +0 -5
- package/dist/iframe/payment/order-items-table/hooks/useTableData.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/hooks/useTableData.js +1 -1
- package/dist/iframe/payment/order-items-table/types/index.d.ts +2 -2
- package/dist/iframe/payment/order-items-table/types/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/index.d.ts +1 -6
- package/dist/iframe/payment/order-items-table/utils/index.d.ts.map +1 -1
- package/dist/iframe/payment/order-items-table/utils/index.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/payment/payment-status-header/PaymentStatusHeader.d.ts +1 -1
- package/dist/iframe/payment/payment-status-header/PaymentStatusHeader.d.ts.map +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts +3 -5
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-status-page/PaymentStatusPage.js +1 -1
- package/dist/iframe/powered-by/PoweredBy.d.ts +1 -1
- package/dist/iframe/powered-by/PoweredBy.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/modals/confirmation/ConfirmModal.d.ts +2 -2
- package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts +1 -4
- package/dist/notification/email-template/card/EmailTemplateCard.d.ts.map +1 -1
- package/dist/notification/email-template/card/EmailTemplateCard.js +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts +0 -3
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts +1 -7
- package/dist/notification/email-template/form/EmailTemplateForm.d.ts.map +1 -1
- package/dist/notification/email-template/form/EmailTemplateForm.js +1 -1
- package/dist/notification/sms-template/card/SmsTemplateCard.d.ts +1 -4
- package/dist/notification/sms-template/card/SmsTemplateCard.d.ts.map +1 -1
- package/dist/notification/sms-template/card/SmsTemplateCard.js +1 -1
- package/dist/notification/sms-template/control/SmsTemplateControl.d.ts +1 -6
- package/dist/notification/sms-template/control/SmsTemplateControl.d.ts.map +1 -1
- package/dist/notification/sms-template/control/SmsTemplateControl.js +1 -1
- package/dist/notification/sms-template/form/SmsTemplateForm.d.ts +1 -4
- package/dist/notification/sms-template/form/SmsTemplateForm.d.ts.map +1 -1
- package/dist/notification/sms-template/form/SmsTemplateForm.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +4 -16
- package/dist/product-set/control/ProductSetControl.d.ts.map +1 -1
- package/dist/product-set/control/ProductSetControl.js +1 -1
- package/dist/product-set/deposit-paid/ProductSetDepositPaidControl.d.ts +3 -3
- package/dist/product-set/deposit-paid/ProductSetDepositPaidControl.d.ts.map +1 -1
- package/dist/product-set/elements/DeleteFieldButton.d.ts +1 -1
- package/dist/product-set/elements/DeleteFieldButton.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +1 -1
- package/dist/product-set/form/ProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/product-set/form/StepsControl.d.ts.map +1 -1
- package/dist/product-set/form/StepsControl.js +1 -1
- package/dist/product-set/form/VenueMapSetModal.d.ts +1 -1
- package/dist/product-set/form/VenueMapSetModal.d.ts.map +1 -1
- 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/context.d.ts +1 -1
- package/dist/product-set/form/context.d.ts.map +1 -1
- package/dist/product-set/popover/ProductSetPopover.d.ts +1 -1
- package/dist/product-set/popover/ProductSetPopover.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts +0 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.js +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.d.ts +3 -7
- package/dist/product-set/product/price/ProductPriceControl.d.ts.map +1 -1
- package/dist/product-set/product/price/ProductPriceControl.js +1 -1
- package/dist/product-set/tabs/ProductSetTab.d.ts +1 -1
- package/dist/product-set/tabs/ProductSetTab.d.ts.map +1 -1
- package/dist/product-set/tabs/ProductSetTabs.d.ts +1 -1
- package/dist/product-set/tabs/ProductSetTabs.d.ts.map +1 -1
- package/dist/product-set/types/index.d.ts +5 -5
- package/dist/product-set/types/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.d.ts +0 -4
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +1 -1
- package/dist/provider/categories-input/CategoriesInput.d.ts +1 -1
- package/dist/provider/categories-input/CategoriesInput.d.ts.map +1 -1
- package/dist/provider/categories-input/CategoriesInputDescription.d.ts +1 -1
- package/dist/provider/categories-input/CategoriesInputDescription.d.ts.map +1 -1
- package/dist/provider/categories-input/index.d.ts +1 -1
- package/dist/provider/categories-input/index.d.ts.map +1 -1
- package/dist/provider/company/user-form/UserForm.d.ts +2 -2
- package/dist/provider/company/user-form/UserForm.d.ts.map +1 -1
- package/dist/provider/location-input/index.d.ts +1 -1
- package/dist/provider/location-input/index.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts +2 -2
- package/dist/provider/provider-details-input/ProviderDetailsInput.d.ts.map +1 -1
- package/dist/provider/provider-details-input/ProviderDetailsInput.js +1 -1
- package/dist/provider/provider-form/ProviderForm.d.ts +1 -1
- package/dist/provider/provider-form/ProviderForm.d.ts.map +1 -1
- package/dist/provider/provider-links-input/ProviderLinksInput.d.ts +2 -2
- package/dist/provider/provider-links-input/ProviderLinksInput.d.ts.map +1 -1
- package/dist/provider/resources-blocking-modal/ResourcesBlockingModal.d.ts +1 -1
- package/dist/provider/resources-blocking-modal/ResourcesBlockingModal.d.ts.map +1 -1
- package/dist/provider/venue-form/VenueForm.d.ts +1 -1
- package/dist/provider/venue-form/VenueForm.d.ts.map +1 -1
- package/dist/provider/working-hours-input/index.d.ts +1 -1
- package/dist/provider/working-hours-input/index.d.ts.map +1 -1
- package/dist/recurrence-input/utils.d.ts +2 -2
- package/dist/recurrence-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/recurring-date-picker-input/utils.d.ts +2 -2
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/resource/form/ResourceForm.d.ts +2 -2
- package/dist/resource/form/ResourceForm.d.ts.map +1 -1
- package/dist/resource/form/components/CapacityControl.d.ts +1 -1
- package/dist/resource/form/components/CapacityControl.d.ts.map +1 -1
- package/dist/resource/form/components/NameControl.d.ts +1 -1
- package/dist/resource/form/components/NameControl.d.ts.map +1 -1
- package/dist/resource/form/components/SortControl.d.ts +1 -1
- package/dist/resource/form/components/SortControl.d.ts.map +1 -1
- package/dist/resource/form/components/ZoneControl.d.ts +1 -1
- package/dist/resource/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/sales/booking/filter/BookingFilter.d.ts +1 -1
- package/dist/sales/booking/filter/BookingFilter.d.ts.map +1 -1
- package/dist/sales/booking/filter/components/AdditionalFIlterSection.d.ts +1 -1
- package/dist/sales/booking/filter/components/AdditionalFIlterSection.d.ts.map +1 -1
- package/dist/sales/booking/filter/components/AdditionalFIlterSection.js +1 -1
- package/dist/sales/booking/filter/components/MainFilterSection.d.ts +1 -1
- package/dist/sales/booking/filter/components/MainFilterSection.d.ts.map +1 -1
- package/dist/sales/booking/filter/components/ResultTagButton.d.ts +1 -1
- package/dist/sales/booking/filter/components/ResultTagButton.d.ts.map +1 -1
- package/dist/sales/booking/results/BookingResults.d.ts +1 -1
- package/dist/sales/booking/results/BookingResults.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/tabs/BookingTabs.d.ts +1 -1
- package/dist/sales/booking/tabs/BookingTabs.d.ts.map +1 -1
- package/dist/sales/filters/SaleFilters.d.ts +2 -1
- package/dist/sales/filters/SaleFilters.d.ts.map +1 -1
- package/dist/sales/guest-profile/previous-bookings/PreviousBookings.d.ts +3 -4
- package/dist/sales/guest-profile/previous-bookings/PreviousBookings.d.ts.map +1 -1
- package/dist/sales/guest-profile/previous-bookings/PreviousBookings.js +1 -1
- package/dist/sales/guest-profile/profile/Profile.d.ts +1 -1
- package/dist/sales/guest-profile/profile/Profile.d.ts.map +1 -1
- package/dist/sales/guest-profile/profile/components/ImageHolder/ImageHolder.d.ts +1 -1
- package/dist/sales/guest-profile/profile/components/ImageHolder/ImageHolder.d.ts.map +1 -1
- package/dist/sales/guest-profile/user-metrics/UserMetrics.d.ts +1 -1
- package/dist/sales/guest-profile/user-metrics/UserMetrics.d.ts.map +1 -1
- package/dist/sales/guest-profile/visited-providers/VisitedProviders.d.ts +1 -1
- package/dist/sales/guest-profile/visited-providers/VisitedProviders.d.ts.map +1 -1
- package/dist/sales/life-time-sales/LifeTimeSalesChart.d.ts +1 -1
- package/dist/sales/life-time-sales/LifeTimeSalesChart.d.ts.map +1 -1
- package/dist/sales/manual-booking/customer-info/CustomerInfo.d.ts +1 -1
- package/dist/sales/manual-booking/customer-info/CustomerInfo.d.ts.map +1 -1
- package/dist/sales/manual-booking/final-step/FinalStep.d.ts +1 -1
- package/dist/sales/manual-booking/final-step/FinalStep.d.ts.map +1 -1
- package/dist/sales/manual-booking/number-input-horizontal/NumberInputHorizontal.d.ts +1 -1
- package/dist/sales/manual-booking/number-input-horizontal/NumberInputHorizontal.d.ts.map +1 -1
- package/dist/sales/manual-booking/select-date-type-control/SelectDateTypeControl.d.ts +1 -1
- package/dist/sales/manual-booking/select-date-type-control/SelectDateTypeControl.d.ts.map +1 -1
- package/dist/sales/manual-booking/select-menu/SelectMenu.d.ts +1 -1
- package/dist/sales/manual-booking/select-menu/SelectMenu.d.ts.map +1 -1
- package/dist/sales/manual-booking/select-menu/SelectMenu.js +1 -1
- package/dist/sales/manual-booking/select-menu/components/MenuButton.d.ts +1 -1
- package/dist/sales/manual-booking/select-menu/components/MenuButton.d.ts.map +1 -1
- package/dist/sales/notes/NotesTable.d.ts +1 -1
- package/dist/sales/notes/NotesTable.d.ts.map +1 -1
- package/dist/sales/notes/NotesTableRow.d.ts +1 -1
- package/dist/sales/notes/NotesTableRow.d.ts.map +1 -1
- package/dist/sales/notes/note-form/NoteForm.d.ts +1 -1
- package/dist/sales/notes/note-form/NoteForm.d.ts.map +1 -1
- package/dist/sales/payment-form/SalePaymentForm.d.ts +2 -2
- package/dist/sales/payment-form/SalePaymentForm.d.ts.map +1 -1
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.d.ts +1 -1
- package/dist/sales/payment-form/components/RyftPayment/RyftPayment.d.ts.map +1 -1
- package/dist/sales/payment-form/types.d.ts +2 -2
- package/dist/sales/payment-form/types.d.ts.map +1 -1
- package/dist/sales/sales-and-views/SalesAndViewsChart.d.ts +1 -1
- package/dist/sales/sales-and-views/SalesAndViewsChart.d.ts.map +1 -1
- package/dist/setting/admin/AdminSettingForm.d.ts +1 -1
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/admin/PaymentFeeForm.d.ts +2 -2
- package/dist/setting/admin/PaymentFeeForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/EventSettingForm.d.ts +2 -2
- package/dist/setting/dashboard/EventSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/FinancialDataForm.d.ts +2 -2
- package/dist/setting/dashboard/FinancialDataForm.d.ts.map +1 -1
- package/dist/setting/dashboard/OtherSettingForm.d.ts +2 -2
- package/dist/setting/dashboard/OtherSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/ProviderSettingForm.d.ts +2 -2
- package/dist/setting/dashboard/ProviderSettingForm.d.ts.map +1 -1
- package/dist/setting/system/SystemSettingForm.d.ts +1 -1
- package/dist/setting/system/SystemSettingForm.d.ts.map +1 -1
- package/dist/snippet/snippet-template/context/snippetTemplate.d.ts +1 -1
- package/dist/snippet/snippet-template/context/snippetTemplate.d.ts.map +1 -1
- package/dist/sortable-list/SortableList.d.ts +4 -4
- package/dist/sortable-list/SortableList.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/static/Icon.d.ts +1 -1
- package/dist/static/Icon.d.ts.map +1 -1
- package/dist/static/date-range-input/DateRangeInput.d.ts +1 -1
- package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
- package/dist/static/images/DefaultUserImage.d.ts +1 -1
- package/dist/static/images/DefaultUserImage.d.ts.map +1 -1
- package/dist/static/loader/ButtonLoader.d.ts +1 -1
- package/dist/static/loader/ButtonLoader.d.ts.map +1 -1
- package/dist/static/loader/PaymentLoader.d.ts +1 -1
- package/dist/static/loader/PaymentLoader.d.ts.map +1 -1
- package/dist/static/manual-date-picker/ManualDatePicker.d.ts +1 -1
- package/dist/static/manual-date-picker/ManualDatePicker.d.ts.map +1 -1
- package/dist/static/manual-date-picker/hooks/useManualDatePicker.d.ts +2 -2
- package/dist/static/manual-date-picker/hooks/useManualDatePicker.d.ts.map +1 -1
- package/dist/static/tabs/Tab.d.ts +1 -1
- package/dist/static/tabs/Tab.d.ts.map +1 -1
- package/dist/static/tabs/Tabs.d.ts +1 -1
- package/dist/static/tabs/Tabs.d.ts.map +1 -1
- package/dist/styles/customers/Filter.scss +4 -23
- package/dist/styles/events/EventStatisticModal.scss +37 -0
- package/dist/styles/packages.scss +0 -1
- package/dist/styles/snippet-templates/SnippetTemplateCard.scss +0 -16
- package/dist/table/MenuButton.d.ts +1 -1
- package/dist/table/MenuButton.d.ts.map +1 -1
- package/dist/table/ReactTableHelperComponent.d.ts +2 -2
- package/dist/table/ReactTableHelperComponent.d.ts.map +1 -1
- package/dist/table/StaticTable.d.ts +3 -3
- package/dist/table/StaticTable.d.ts.map +1 -1
- package/dist/table/StaticTable.js +1 -1
- package/dist/table/types.d.ts +5 -5
- package/dist/table/types.d.ts.map +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/EMOJIS.d.ts +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/EMOJIS.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.d.ts +12 -6
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +1 -1
- package/dist/typeahead-helper/TypeaheadHelperComponent.d.ts +1 -1
- package/dist/typeahead-helper/TypeaheadHelperComponent.d.ts.map +1 -1
- package/dist/types/categories.d.ts +2 -2
- package/dist/types/categories.d.ts.map +1 -1
- package/dist/types/currency.d.ts +1 -1
- package/dist/types/currency.d.ts.map +1 -1
- package/dist/types/generic/SelectItem.d.ts +1 -1
- package/dist/types/generic/SelectItem.d.ts.map +1 -1
- package/dist/types/iframe.d.ts +2 -4
- package/dist/types/iframe.d.ts.map +1 -1
- package/dist/types/provider-links.d.ts +2 -2
- package/dist/types/provider-links.d.ts.map +1 -1
- package/dist/venue-map-sets/form/components/NameControl.d.ts +1 -1
- package/dist/venue-map-sets/form/components/NameControl.d.ts.map +1 -1
- package/dist/venue-map-sets/form/components/VenueMapControl.d.ts +4 -4
- package/dist/venue-map-sets/form/components/VenueMapControl.d.ts.map +1 -1
- package/dist/venue-map-sets/form/components/VenueMapImageControl.d.ts +1 -1
- package/dist/venue-map-sets/form/components/VenueMapImageControl.d.ts.map +1 -1
- package/dist/venue-map-sets/form/components/VenueMapModal.d.ts +1 -1
- package/dist/venue-map-sets/form/components/VenueMapModal.d.ts.map +1 -1
- package/dist/venue-map-sets/form/components/VenueMapsControl.d.ts +1 -1
- package/dist/venue-map-sets/form/components/VenueMapsControl.d.ts.map +1 -1
- package/dist/venue-map-sets/form/types/index.d.ts +4 -4
- package/dist/venue-map-sets/form/types/index.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedGrid.d.ts +1 -1
- package/dist/virtualized/components/VirtualizedGrid.d.ts.map +1 -1
- package/dist/virtualized/components/VirtualizedWindowScroller.d.ts +3 -3
- package/dist/virtualized/components/VirtualizedWindowScroller.d.ts.map +1 -1
- package/dist/virtualized/context/VirtualizedContext.d.ts +2 -2
- package/dist/virtualized/context/VirtualizedContext.d.ts.map +1 -1
- package/dist/widgets/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/widgets/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/widgets/ImageRadioInput/ImageRadioInput.d.ts +1 -1
- package/dist/widgets/ImageRadioInput/ImageRadioInput.d.ts.map +1 -1
- package/dist/widgets/SnippetCode/SnippetCode.d.ts +1 -1
- package/dist/widgets/SnippetCode/SnippetCode.d.ts.map +1 -1
- package/dist/widgets/WidgetBuilderForm/WidgetBuilderForm.d.ts +1 -1
- package/dist/widgets/WidgetBuilderForm/WidgetBuilderForm.d.ts.map +1 -1
- package/dist/widgets/WidgetTypeRadio/WidgetTypeRadio.d.ts +1 -1
- package/dist/widgets/WidgetTypeRadio/WidgetTypeRadio.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.d.ts +2 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/components/AvailableTimesControl.d.ts +2 -2
- package/dist/zone/form/components/AvailableTimesControl.d.ts.map +1 -1
- package/dist/zone/form/components/DescriptionControl.d.ts +1 -1
- package/dist/zone/form/components/DescriptionControl.d.ts.map +1 -1
- package/dist/zone/form/components/NameControl.d.ts +1 -1
- package/dist/zone/form/components/NameControl.d.ts.map +1 -1
- package/dist/zone/form/components/SortControl.d.ts +1 -1
- package/dist/zone/form/components/SortControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.d.ts +1 -1
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneImageControl.d.ts +1 -1
- package/dist/zone/form/components/ZoneImageControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneTypeControl.d.ts +1 -1
- package/dist/zone/form/components/ZoneTypeControl.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/customers/components/filter/CustomerFilter.stories.tsx +2 -1
- package/src/customers/components/filter/CustomerFilter.tsx +5 -3
- package/src/events/edit-event-modal/IntervalInput.tsx +1 -21
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -3
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +2 -11
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +4 -6
- package/src/events/event-statistic-modal/EventStatisticModal.tsx +1 -1
- package/src/events/event-venue-map/EventVenueMap.tsx +0 -4
- package/src/events/event-venue-map/components/MapPoint/MapPoint.tsx +1 -3
- package/src/events/event-venue-map/components/MapPoint/components/ProductIcon/ProductIcon.tsx +2 -13
- package/src/events/event-venue-map/components/VenueMap/VenueMap.tsx +4 -12
- package/src/iframe/event/event-order-short-summary/components/Summary/Summary.tsx +20 -20
- package/src/iframe/event/event-venue-map/IframeEventVenueMap.stories.tsx +0 -5
- package/src/iframe/order-process/OrderProcess.stories.tsx +0 -1
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +1 -4
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +3 -3
- package/src/iframe/order-process/components/BookingSummary/utils/index.ts +2 -6
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.stories.tsx +0 -1
- package/src/iframe/order-process/components/CalendarStepsForm/CalendarStepsForm.tsx +0 -5
- package/src/iframe/order-process/components/CalendarStepsForm/components/Category.tsx +0 -4
- package/src/iframe/order-process/components/CalendarStepsForm/components/CategoryProductModal.tsx +0 -4
- package/src/iframe/order-process/components/Category/Category.tsx +0 -3
- package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +8 -42
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +0 -3
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +2 -3
- package/src/iframe/order-process/components/StepsForm/StepsForm.tsx +0 -3
- package/src/iframe/payment/order-items-table/OrderItemsTable.stories.tsx +0 -2
- package/src/iframe/payment/order-items-table/hooks/useTableData.tsx +14 -21
- package/src/iframe/payment/order-items-table/utils/index.ts +15 -55
- package/src/iframe/payment/payment-page/PaymentPage.tsx +5 -45
- package/src/iframe/payment/payment-status-page/PaymentStatusPage.tsx +12 -66
- package/src/index.ts +0 -1
- package/src/notification/email-template/card/EmailTemplateCard.stories.tsx +2 -4
- package/src/notification/email-template/card/EmailTemplateCard.tsx +3 -15
- package/src/notification/email-template/control/EmailTemplateControl.tsx +6 -90
- package/src/notification/email-template/form/EmailTemplateForm.stories.tsx +0 -34
- package/src/notification/email-template/form/EmailTemplateForm.tsx +5 -23
- package/src/notification/sms-template/card/SmsTemplateCard.stories.tsx +1 -3
- package/src/notification/sms-template/card/SmsTemplateCard.tsx +3 -13
- package/src/notification/sms-template/control/SmsTemplateControl.tsx +2 -38
- package/src/notification/sms-template/form/SmsTemplateForm.stories.tsx +0 -21
- package/src/notification/sms-template/form/SmsTemplateForm.tsx +1 -5
- package/src/product-set/control/ProductSetControl.tsx +33 -61
- package/src/product-set/form/ProductSetForm.stories.tsx +2 -41
- package/src/product-set/form/ProductSetForm.tsx +0 -11
- package/src/product-set/form/ProductsControl.tsx +1 -20
- package/src/product-set/form/StepsControl.tsx +2 -20
- package/src/product-set/product/ProductControl.tsx +10 -25
- package/src/product-set/product/price/ProductPriceControl.tsx +21 -43
- package/src/product-set/utils/index.ts +0 -28
- package/src/provider/provider-details-input/ProviderDetailsInput.tsx +2 -0
- package/src/sales/filters/SaleFilters.tsx +1 -1
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.stories.tsx +5 -35
- package/src/sales/guest-profile/previous-bookings/PreviousBookings.tsx +3 -11
- package/src/sales/manual-booking/select-menu/SelectMenu.tsx +1 -3
- package/src/styles/customers/Filter.scss +4 -23
- package/src/styles/events/EventStatisticModal.scss +37 -0
- package/src/styles/packages.scss +0 -1
- package/src/styles/snippet-templates/SnippetTemplateCard.scss +0 -16
- package/src/table/StaticTable.tsx +2 -4
- package/src/typeahead/Typeahead.stories.tsx +6 -9
- package/src/typeahead/Typeahead.tsx +12 -19
- package/src/types/iframe.ts +0 -2
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.d.ts +0 -9
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.d.ts.map +0 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.js +0 -1
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.d.ts +0 -2
- package/dist/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.d.ts.map +0 -1
- package/dist/notification/hooks/useTranslatedParameters.d.ts +0 -7
- package/dist/notification/hooks/useTranslatedParameters.d.ts.map +0 -1
- package/dist/notification/hooks/useTranslatedParameters.js +0 -1
- package/dist/striped-static-table/StripedStaticTable.d.ts +0 -7
- package/dist/striped-static-table/StripedStaticTable.d.ts.map +0 -1
- package/dist/striped-static-table/StripedStaticTable.js +0 -1
- package/dist/striped-static-table/index.d.ts +0 -2
- package/dist/striped-static-table/index.d.ts.map +0 -1
- package/dist/styles/striped-static-table/_index.scss +0 -33
- package/src/events/event-venue-map/components/MapPoint/components/ProductTooltip/ProductTooltip.tsx +0 -68
- package/src/events/event-venue-map/components/MapPoint/components/ProductTooltip/index.ts +0 -1
- package/src/notification/hooks/useTranslatedParameters.ts +0 -27
- package/src/striped-static-table/StripedStaticTable.stories.tsx +0 -71
- package/src/striped-static-table/StripedStaticTable.tsx +0 -63
- package/src/striped-static-table/index.ts +0 -1
- package/src/styles/striped-static-table/_index.scss +0 -33
|
@@ -86,7 +86,6 @@ export interface ProductControlValues
|
|
|
86
86
|
isRequired: boolean;
|
|
87
87
|
quantitySelector: number;
|
|
88
88
|
hasSpecialNotes: boolean;
|
|
89
|
-
minSpend?: number | null;
|
|
90
89
|
type?: ProductType;
|
|
91
90
|
weight?: number;
|
|
92
91
|
tierId?: number;
|
|
@@ -158,7 +157,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
158
157
|
const quantitySelectorId = useId();
|
|
159
158
|
const hasSpecialNotesId = useId();
|
|
160
159
|
const unlimitedQuantityId = useId();
|
|
161
|
-
const minSpendId = useId();
|
|
162
160
|
|
|
163
161
|
const quantitySelectorList: SelectItem[] = [
|
|
164
162
|
{ id: 1, value: t("quantitySelector") },
|
|
@@ -191,7 +189,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
191
189
|
|
|
192
190
|
const onImageRemove = useCallback(
|
|
193
191
|
(id, path) => {
|
|
194
|
-
handleImageRemove(
|
|
192
|
+
handleImageRemove(id, path);
|
|
195
193
|
},
|
|
196
194
|
[handleImageRemove]
|
|
197
195
|
);
|
|
@@ -202,13 +200,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
202
200
|
}, [setLoading, isImageUploading]);
|
|
203
201
|
|
|
204
202
|
useEffect(() => {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
setInitialImages(formImages as Image[]);
|
|
208
|
-
}, [getValues, setInitialImages, fieldNamePrefix]);
|
|
209
|
-
|
|
210
|
-
useEffect(() => {
|
|
211
|
-
if (Array.isArray(images)) {
|
|
203
|
+
if (Array.isArray(images) && images?.length > 0) {
|
|
212
204
|
setValue(
|
|
213
205
|
`${fieldNamePrefix}.images` as Path<T>,
|
|
214
206
|
images as UnpackNestedValue<PathValue<T, Path<T>>>
|
|
@@ -216,6 +208,12 @@ export function ProductControl<T extends FormValues>({
|
|
|
216
208
|
}
|
|
217
209
|
}, [images, fieldNamePrefix, setValue]);
|
|
218
210
|
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
const formImages = getValues(`${fieldNamePrefix}.images` as Path<T>);
|
|
213
|
+
|
|
214
|
+
setInitialImages(formImages as Image[]);
|
|
215
|
+
}, [getValues, setInitialImages, fieldNamePrefix]);
|
|
216
|
+
|
|
219
217
|
const quantitySelector = quantityValue ?? "1";
|
|
220
218
|
const quantity = QUANTITY_TYPE_LIST_DTO[quantitySelector as string];
|
|
221
219
|
|
|
@@ -276,7 +274,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
276
274
|
/>
|
|
277
275
|
<ProductPriceControl<T>
|
|
278
276
|
isLoading={isLoading}
|
|
279
|
-
fieldNamePrefix={
|
|
277
|
+
fieldNamePrefix={fieldNamePrefix}
|
|
280
278
|
title={t("totalPrice")}
|
|
281
279
|
allowDeposits={allowDeposits}
|
|
282
280
|
/>
|
|
@@ -284,7 +282,7 @@ export function ProductControl<T extends FormValues>({
|
|
|
284
282
|
) : (
|
|
285
283
|
<ProductPriceControl<T>
|
|
286
284
|
isLoading={isLoading}
|
|
287
|
-
fieldNamePrefix={
|
|
285
|
+
fieldNamePrefix={fieldNamePrefix}
|
|
288
286
|
/>
|
|
289
287
|
)}
|
|
290
288
|
|
|
@@ -559,19 +557,6 @@ export function ProductControl<T extends FormValues>({
|
|
|
559
557
|
{categoryType === CATEGORY_TYPE_FIXED_DURATION && (
|
|
560
558
|
<FixedDurationOptions fieldNamePrefix={fieldNamePrefix} />
|
|
561
559
|
)}
|
|
562
|
-
<Form.Group
|
|
563
|
-
controlId={minSpendId}
|
|
564
|
-
className="advanced-switch-container"
|
|
565
|
-
>
|
|
566
|
-
<ProductPriceControl
|
|
567
|
-
title={t("minSpend")}
|
|
568
|
-
isRequired={false}
|
|
569
|
-
isMoreThanZero
|
|
570
|
-
allowDeposits={false}
|
|
571
|
-
isLoading={isLoading}
|
|
572
|
-
fieldNamePrefix={`${fieldNamePrefix}.minSpend` as Path<T>}
|
|
573
|
-
/>
|
|
574
|
-
</Form.Group>
|
|
575
560
|
</div>
|
|
576
561
|
</Collapse>
|
|
577
562
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import HookFormService from "@licklist/plugins/dist/services/Form/HookFormService";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
FieldNamePrefixPath,
|
|
5
|
+
FormValues,
|
|
6
|
+
} from "@licklist/plugins/dist/types/services/Form/hook-form-service";
|
|
4
7
|
import { useId } from "@react-aria/utils";
|
|
5
8
|
import { Form } from "react-bootstrap";
|
|
6
9
|
import Col from "react-bootstrap/Col";
|
|
@@ -13,13 +16,10 @@ export interface ProductPriceControlValues extends FormValues {
|
|
|
13
16
|
price: number;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
export interface ProductPriceControlProps<T> {
|
|
19
|
+
export interface ProductPriceControlProps<T> extends FieldNamePrefixPath<T> {
|
|
17
20
|
isLoading: boolean;
|
|
18
21
|
title?: string;
|
|
19
22
|
allowDeposits?: boolean;
|
|
20
|
-
fieldNamePrefix: Path<T>;
|
|
21
|
-
isRequired?: boolean;
|
|
22
|
-
isMoreThanZero?: boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export function ProductPriceControl<T extends FormValues>({
|
|
@@ -27,15 +27,13 @@ export function ProductPriceControl<T extends FormValues>({
|
|
|
27
27
|
fieldNamePrefix,
|
|
28
28
|
title,
|
|
29
29
|
allowDeposits,
|
|
30
|
-
isRequired = true,
|
|
31
|
-
isMoreThanZero,
|
|
32
30
|
}: ProductPriceControlProps<T>) {
|
|
33
31
|
const {
|
|
34
32
|
control,
|
|
35
33
|
formState: { errors },
|
|
36
34
|
} = useFormContext<T>();
|
|
37
35
|
const { t } = useTranslation("Design");
|
|
38
|
-
|
|
36
|
+
|
|
39
37
|
const priceId = useId();
|
|
40
38
|
|
|
41
39
|
return (
|
|
@@ -45,7 +43,7 @@ export function ProductPriceControl<T extends FormValues>({
|
|
|
45
43
|
className={!allowDeposits && "p-0"}
|
|
46
44
|
>
|
|
47
45
|
<Form.Group controlId={priceId}>
|
|
48
|
-
<Form.Label>{
|
|
46
|
+
<Form.Label>{title ?? t("price")}</Form.Label>
|
|
49
47
|
|
|
50
48
|
<InputGroup hasValidation>
|
|
51
49
|
<InputGroup.Prepend>
|
|
@@ -66,58 +64,38 @@ export function ProductPriceControl<T extends FormValues>({
|
|
|
66
64
|
name={name}
|
|
67
65
|
onChange={onChange}
|
|
68
66
|
isInvalid={HookFormService.isInvalid<T>(
|
|
69
|
-
`${fieldNamePrefix}` as Path<T>,
|
|
67
|
+
`${fieldNamePrefix}.price` as Path<T>,
|
|
70
68
|
errors
|
|
71
69
|
)}
|
|
72
70
|
disabled={isLoading}
|
|
73
71
|
/>
|
|
74
72
|
)}
|
|
75
73
|
control={control}
|
|
76
|
-
name={`${fieldNamePrefix}` as Path<T>}
|
|
74
|
+
name={`${fieldNamePrefix}.price` as Path<T>}
|
|
77
75
|
rules={{
|
|
78
|
-
required:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
min: 0,
|
|
89
|
-
}) as string,
|
|
90
|
-
}
|
|
91
|
-
: undefined,
|
|
76
|
+
required: t("Validation:fieldRequired", {
|
|
77
|
+
attribute: t("price"),
|
|
78
|
+
}) as string,
|
|
79
|
+
min: {
|
|
80
|
+
value: 0,
|
|
81
|
+
message: t("Validation:fieldMinNumber", {
|
|
82
|
+
attribute: t("price"),
|
|
83
|
+
min: 0,
|
|
84
|
+
}) as string,
|
|
85
|
+
},
|
|
92
86
|
max: {
|
|
93
87
|
value: 999999.99,
|
|
94
88
|
message: t("Validation:fieldMaxNumber", {
|
|
95
|
-
attribute:
|
|
89
|
+
attribute: t("price"),
|
|
96
90
|
max: 999999.99,
|
|
97
91
|
}) as string,
|
|
98
92
|
},
|
|
99
|
-
|
|
100
|
-
validate: (value) => {
|
|
101
|
-
if (
|
|
102
|
-
!isMoreThanZero ||
|
|
103
|
-
(isMoreThanZero &&
|
|
104
|
-
(value === undefined || value === null || value === "")) ||
|
|
105
|
-
(isMoreThanZero && Number(value) > 0)
|
|
106
|
-
) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return t("Validation:fieldGreaterMinNumber", {
|
|
111
|
-
attribute: productTitle,
|
|
112
|
-
min: 0,
|
|
113
|
-
}) as string;
|
|
114
|
-
},
|
|
115
93
|
}}
|
|
116
94
|
/>
|
|
117
95
|
|
|
118
96
|
<Form.Control.Feedback type="invalid">
|
|
119
97
|
{HookFormService.getErrors<T>(
|
|
120
|
-
`${fieldNamePrefix}` as Path<T>,
|
|
98
|
+
`${fieldNamePrefix}.price` as Path<T>,
|
|
121
99
|
errors
|
|
122
100
|
)}
|
|
123
101
|
</Form.Control.Feedback>
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { EmailTemplate } from "@licklist/core/dist/DataMapper/Notification/EmailTemplateDataMapper";
|
|
2
|
-
import { SmsTemplate } from "@licklist/core/dist/DataMapper/Notification/SmsTemplateDataMapper";
|
|
3
|
-
import { TemplateItem } from "../control/ProductSetControl";
|
|
4
|
-
|
|
5
1
|
export const moveArrayElements = <T>(
|
|
6
2
|
array: T[],
|
|
7
3
|
prevIndex: number,
|
|
@@ -18,27 +14,3 @@ export const moveArrayElements = <T>(
|
|
|
18
14
|
export const sortArrayByIndex = <T>(array: T[]) => {
|
|
19
15
|
return array.map((element: T, index) => ({ ...element, sort: index }));
|
|
20
16
|
};
|
|
21
|
-
|
|
22
|
-
export const getFilteredTemplates = (
|
|
23
|
-
templates?: EmailTemplate[] | SmsTemplate[],
|
|
24
|
-
formTemplates?: TemplateItem[]
|
|
25
|
-
): TemplateItem[] | undefined => {
|
|
26
|
-
if (!templates) {
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return templates
|
|
31
|
-
?.filter(
|
|
32
|
-
(template) =>
|
|
33
|
-
template.notification.isActive &&
|
|
34
|
-
!formTemplates?.find(
|
|
35
|
-
(formTemplate) =>
|
|
36
|
-
formTemplate.value.notification.type === template.notification.type
|
|
37
|
-
)
|
|
38
|
-
)
|
|
39
|
-
?.map((template) => ({
|
|
40
|
-
id: template?.id,
|
|
41
|
-
value: template,
|
|
42
|
-
label: template?.notification?.name,
|
|
43
|
-
}));
|
|
44
|
-
};
|
|
@@ -34,6 +34,7 @@ export function ProviderDetailsInput({
|
|
|
34
34
|
const {
|
|
35
35
|
register,
|
|
36
36
|
formState: { errors },
|
|
37
|
+
setValue,
|
|
37
38
|
} = useFormContext<ProviderDetailsInputValues>();
|
|
38
39
|
const { t } = useTranslation(["App", "Design", "Validation"]);
|
|
39
40
|
|
|
@@ -148,6 +149,7 @@ export function ProviderDetailsInput({
|
|
|
148
149
|
<Typeahead
|
|
149
150
|
name="company"
|
|
150
151
|
options={companiesOptions}
|
|
152
|
+
setValue={setValue}
|
|
151
153
|
placeholder={t("App:select")}
|
|
152
154
|
noOptionsMessage={t("App:noMatchesFound")}
|
|
153
155
|
/>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Meta } from "@storybook/react";
|
|
3
|
-
import { boolean } from "@storybook/addon-knobs";
|
|
4
3
|
import { Event } from "@licklist/core/dist/DataMapper/Provider/EventDataMapper";
|
|
5
4
|
import { User } from "@licklist/core/dist/DataMapper/User/UserDataMapper";
|
|
6
5
|
import { Product } from "@licklist/core/dist/DataMapper/Product/ProductDataMapper";
|
|
@@ -11,26 +10,11 @@ export default {
|
|
|
11
10
|
title: "Sales/Guest Profile/Previous Bookings",
|
|
12
11
|
} as Meta;
|
|
13
12
|
|
|
14
|
-
export const Default = (args) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<a href={`/some_href/${order.id}`}>{order[order.orderableType]?.name}</a>
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div>
|
|
25
|
-
<PreviousBookings
|
|
26
|
-
{...args}
|
|
27
|
-
renderOrderTitleLinkByProvider={
|
|
28
|
-
useProviderLink ? renderOrderTitleLinkByProvider : undefined
|
|
29
|
-
}
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
13
|
+
export const Default = (args) => (
|
|
14
|
+
<div>
|
|
15
|
+
<PreviousBookings {...args} />
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
34
18
|
|
|
35
19
|
Default.args = {
|
|
36
20
|
orders: [
|
|
@@ -59,8 +43,6 @@ Default.args = {
|
|
|
59
43
|
updatedAt: "2022-05-20 18:28:56",
|
|
60
44
|
status: "cart",
|
|
61
45
|
tickets: [],
|
|
62
|
-
orderableType: "event",
|
|
63
|
-
orderableId: 1,
|
|
64
46
|
event: {
|
|
65
47
|
id: 1,
|
|
66
48
|
name: "testEvent1",
|
|
@@ -97,8 +79,6 @@ Default.args = {
|
|
|
97
79
|
updatedAt: "2022-05-20 18:28:56",
|
|
98
80
|
status: "cart",
|
|
99
81
|
tickets: [],
|
|
100
|
-
orderableType: "event",
|
|
101
|
-
orderableId: 2,
|
|
102
82
|
event: {
|
|
103
83
|
id: 2,
|
|
104
84
|
name: "testEvent2",
|
|
@@ -148,8 +128,6 @@ Default.args = {
|
|
|
148
128
|
updatedAt: "2022-05-20 18:28:56",
|
|
149
129
|
status: "cart",
|
|
150
130
|
tickets: [],
|
|
151
|
-
orderableType: "event",
|
|
152
|
-
orderableId: 3,
|
|
153
131
|
event: {
|
|
154
132
|
id: 3,
|
|
155
133
|
name: "testEvent3",
|
|
@@ -178,8 +156,6 @@ Default.args = {
|
|
|
178
156
|
updatedAt: "2022-05-20 18:28:56",
|
|
179
157
|
status: "cart",
|
|
180
158
|
tickets: [],
|
|
181
|
-
orderableType: "event",
|
|
182
|
-
orderableId: 3,
|
|
183
159
|
event: {
|
|
184
160
|
id: 3,
|
|
185
161
|
name: "testEvent3",
|
|
@@ -208,8 +184,6 @@ Default.args = {
|
|
|
208
184
|
updatedAt: "2022-05-20 18:28:56",
|
|
209
185
|
status: "cart",
|
|
210
186
|
tickets: [],
|
|
211
|
-
orderableType: "event",
|
|
212
|
-
orderableId: 3,
|
|
213
187
|
event: {
|
|
214
188
|
id: 3,
|
|
215
189
|
name: "testEvent3",
|
|
@@ -238,8 +212,6 @@ Default.args = {
|
|
|
238
212
|
updatedAt: "2022-05-20 18:28:56",
|
|
239
213
|
status: "cart",
|
|
240
214
|
tickets: [],
|
|
241
|
-
orderableType: "event",
|
|
242
|
-
orderableId: 3,
|
|
243
215
|
event: {
|
|
244
216
|
id: 3,
|
|
245
217
|
name: "testEvent3",
|
|
@@ -267,8 +239,6 @@ Default.args = {
|
|
|
267
239
|
updatedAt: "2022-05-20 18:28:56",
|
|
268
240
|
status: "cart",
|
|
269
241
|
tickets: [],
|
|
270
|
-
orderableType: "event",
|
|
271
|
-
orderableId: 3,
|
|
272
242
|
event: {
|
|
273
243
|
id: 3,
|
|
274
244
|
name: "testEvent3",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import { useTranslation } from "react-i18next";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
4
|
import { Button } from "react-bootstrap";
|
|
@@ -8,13 +8,9 @@ const MAX_ORDERS_COUNT = 6;
|
|
|
8
8
|
|
|
9
9
|
export type PreviousBookingsProps = {
|
|
10
10
|
orders: Order[];
|
|
11
|
-
renderOrderTitleLinkByProvider?: (order: Order) => ReactNode;
|
|
12
11
|
};
|
|
13
12
|
|
|
14
|
-
export const PreviousBookings = ({
|
|
15
|
-
orders,
|
|
16
|
-
renderOrderTitleLinkByProvider,
|
|
17
|
-
}: PreviousBookingsProps) => {
|
|
13
|
+
export const PreviousBookings = ({ orders }: PreviousBookingsProps) => {
|
|
18
14
|
const { t } = useTranslation("Design");
|
|
19
15
|
const [showOlderBookings, setShowOlderBookings] = useState(false);
|
|
20
16
|
|
|
@@ -40,17 +36,13 @@ export const PreviousBookings = ({
|
|
|
40
36
|
{orders.length > 0 ? (
|
|
41
37
|
<div className="events-wrapper">
|
|
42
38
|
{orders.slice(0, endSlicedOrdersNumber).map((order) => {
|
|
43
|
-
const eventName = renderOrderTitleLinkByProvider
|
|
44
|
-
? renderOrderTitleLinkByProvider(order)
|
|
45
|
-
: order[order.orderableType]?.name;
|
|
46
|
-
|
|
47
39
|
return (
|
|
48
40
|
<div
|
|
49
41
|
className="event-info col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6"
|
|
50
42
|
key={order.id}
|
|
51
43
|
>
|
|
52
44
|
<div className="info-wrapper">
|
|
53
|
-
<p className="label">{
|
|
45
|
+
<p className="label">{order.event?.name}</p>
|
|
54
46
|
{order.createdAt && (
|
|
55
47
|
<p className="event-date">{formatDate(order.createdAt)}</p>
|
|
56
48
|
)}
|
|
@@ -39,9 +39,7 @@ export const SelectMenu = ({
|
|
|
39
39
|
) : (
|
|
40
40
|
<>
|
|
41
41
|
{!isLoading && (
|
|
42
|
-
<Form.Label className="bold-text">
|
|
43
|
-
{t("Design:productSets")}
|
|
44
|
-
</Form.Label>
|
|
42
|
+
<Form.Label className="bold-text">{t("App:menus")}</Form.Label>
|
|
45
43
|
)}
|
|
46
44
|
|
|
47
45
|
<div className="menu-list-manual-booking">
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
.customers-filter {
|
|
2
|
+
gap: 0.5rem;
|
|
3
|
+
|
|
2
4
|
@include media-breakpoint-down(sm) {
|
|
3
5
|
label {
|
|
4
6
|
font-size: 0.8rem;
|
|
@@ -22,32 +24,11 @@
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
.customers-filter-items {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
.customer-filter {
|
|
28
|
-
flex: 0 0 33.33%;
|
|
29
|
-
max-width: 33.33%;
|
|
30
|
-
}
|
|
27
|
+
gap: 0.5rem;
|
|
31
28
|
|
|
32
29
|
@include media-breakpoint-down(xs) {
|
|
33
30
|
flex-direction: column;
|
|
34
|
-
|
|
35
|
-
.customer-filter {
|
|
36
|
-
flex: 1;
|
|
37
|
-
max-width: 100%;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@include media-breakpoint-up(sm) {
|
|
42
|
-
.customer-filter {
|
|
43
|
-
&:first-child {
|
|
44
|
-
padding-left: 0;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&:last-child {
|
|
48
|
-
padding-right: 0;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
31
|
+
gap: 0rem;
|
|
51
32
|
}
|
|
52
33
|
}
|
|
53
34
|
}
|
|
@@ -6,6 +6,43 @@
|
|
|
6
6
|
.modal-body {
|
|
7
7
|
height: 75vh;
|
|
8
8
|
overflow: scroll;
|
|
9
|
+
|
|
10
|
+
table.event-statistic-table {
|
|
11
|
+
thead {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
tbody {
|
|
16
|
+
tr {
|
|
17
|
+
border-bottom: 1px solid $gray-500;
|
|
18
|
+
td {
|
|
19
|
+
text-transform: capitalize;
|
|
20
|
+
|
|
21
|
+
&:nth-child(2), &:nth-child(3) {
|
|
22
|
+
text-align: right;
|
|
23
|
+
}
|
|
24
|
+
&:nth-child(2) {
|
|
25
|
+
width: 20%;
|
|
26
|
+
}
|
|
27
|
+
&:nth-child(3) {
|
|
28
|
+
width: 35%;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
td:has(div.header-row){
|
|
33
|
+
background-color: #d8ecf7;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:first-child {
|
|
37
|
+
border-top: 1px solid $gray-500;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.bold {
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
9
46
|
}
|
|
10
47
|
}
|
|
11
48
|
|
package/src/styles/packages.scss
CHANGED
|
@@ -45,22 +45,6 @@ $snippet-template-card-button-transition: $product-set-card-transition !default;
|
|
|
45
45
|
display: flex;
|
|
46
46
|
justify-content: space-between;
|
|
47
47
|
align-items: center;
|
|
48
|
-
|
|
49
|
-
a {
|
|
50
|
-
white-space: nowrap;
|
|
51
|
-
display: inline-block;
|
|
52
|
-
text-overflow: ellipsis;
|
|
53
|
-
width: 85%;
|
|
54
|
-
overflow: hidden;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.snippet-template-card-subject {
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
display: inline-block;
|
|
61
|
-
text-overflow: ellipsis;
|
|
62
|
-
width: 100%;
|
|
63
|
-
overflow: hidden;
|
|
64
48
|
}
|
|
65
49
|
|
|
66
50
|
.snippet-template-card-button {
|
|
@@ -11,7 +11,7 @@ export interface StaticTableData {
|
|
|
11
11
|
[key: string]: ReactNode;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
interface StaticTableProps {
|
|
15
15
|
className?: string;
|
|
16
16
|
columns: StaticTableColumn[];
|
|
17
17
|
data: StaticTableData[];
|
|
@@ -19,7 +19,6 @@ export interface StaticTableProps {
|
|
|
19
19
|
bordered?: boolean;
|
|
20
20
|
hover?: boolean;
|
|
21
21
|
size?: string;
|
|
22
|
-
displayHeader?: boolean;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export function StaticTable({
|
|
@@ -30,7 +29,6 @@ export function StaticTable({
|
|
|
30
29
|
bordered = false,
|
|
31
30
|
hover = false,
|
|
32
31
|
size,
|
|
33
|
-
displayHeader = true,
|
|
34
32
|
}: StaticTableProps) {
|
|
35
33
|
return (
|
|
36
34
|
<Table
|
|
@@ -40,7 +38,7 @@ export function StaticTable({
|
|
|
40
38
|
hover={hover}
|
|
41
39
|
size={size}
|
|
42
40
|
>
|
|
43
|
-
|
|
41
|
+
<TableHead columns={columns} />
|
|
44
42
|
<tbody>
|
|
45
43
|
{data.map((row) => (
|
|
46
44
|
<tr key={row.key}>
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { storiesOf } from "@storybook/react";
|
|
3
|
-
import { FormProvider, useForm } from "react-hook-form";
|
|
4
3
|
import { Typeahead } from "./Typeahead";
|
|
5
4
|
|
|
6
|
-
storiesOf("Typeahead", module)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<FormProvider {...form}>
|
|
5
|
+
storiesOf("Typeahead", module)
|
|
6
|
+
.add("Typeahead", () => (
|
|
7
|
+
<>
|
|
10
8
|
<Typeahead
|
|
11
9
|
name="user"
|
|
12
|
-
isMultipleChoise
|
|
13
10
|
options={[
|
|
14
11
|
{ id: 1, value: "user1", label: "User1" },
|
|
15
12
|
{ id: 2, value: "user2", label: "User2" },
|
|
16
13
|
{ id: 3, value: "user3", label: "User3" },
|
|
17
14
|
]}
|
|
15
|
+
setValue={() => {}}
|
|
18
16
|
placeholder="Select"
|
|
19
17
|
noOptionsMessage="No Options Found"
|
|
20
18
|
/>
|
|
21
|
-
|
|
22
|
-
);
|
|
23
|
-
});
|
|
19
|
+
</>
|
|
20
|
+
));
|
|
@@ -1,54 +1,47 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Select from "react-select";
|
|
3
|
-
import {
|
|
3
|
+
import { useForm, Controller } from "react-hook-form";
|
|
4
4
|
|
|
5
5
|
export type TypeaheadOptions = {
|
|
6
|
-
id: number
|
|
7
|
-
value:
|
|
6
|
+
id: number;
|
|
7
|
+
value: string;
|
|
8
8
|
label: string;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export interface TypeaheadProps {
|
|
12
12
|
options: TypeaheadOptions[];
|
|
13
|
+
setValue: (value: string | any) => void;
|
|
13
14
|
placeholder: string;
|
|
14
15
|
isRequired?: boolean;
|
|
15
16
|
name: string;
|
|
16
|
-
isMultipleChoise?: boolean;
|
|
17
17
|
noOptionsMessage: string;
|
|
18
|
-
isInvalid?: boolean;
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
function Typeahead({
|
|
22
21
|
options,
|
|
22
|
+
setValue,
|
|
23
23
|
placeholder,
|
|
24
24
|
isRequired = false,
|
|
25
|
-
isMultipleChoise,
|
|
26
25
|
name = "",
|
|
27
26
|
noOptionsMessage = "",
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
27
|
+
}) {
|
|
28
|
+
const { control } = useForm({
|
|
29
|
+
mode: "onChange",
|
|
30
|
+
});
|
|
31
|
+
const prefix = "id";
|
|
33
32
|
|
|
34
33
|
return (
|
|
35
34
|
<>
|
|
36
35
|
<Controller
|
|
37
|
-
name={name}
|
|
36
|
+
name={`${name}.${prefix as string}` as const}
|
|
38
37
|
control={control}
|
|
39
38
|
rules={{ required: isRequired }}
|
|
40
39
|
render={({ field }) => (
|
|
41
40
|
<Select
|
|
42
41
|
placeholder={placeholder}
|
|
43
42
|
value={field.value}
|
|
44
|
-
isMulti={isMultipleChoise}
|
|
45
|
-
styles={{
|
|
46
|
-
control: (base) => ({
|
|
47
|
-
...base,
|
|
48
|
-
...getErrorStyle(),
|
|
49
|
-
}),
|
|
50
|
-
}}
|
|
51
43
|
onChange={(value) => {
|
|
44
|
+
setValue(`${name}.${prefix}`, value.id);
|
|
52
45
|
field.onChange(value);
|
|
53
46
|
}}
|
|
54
47
|
options={options}
|
package/src/types/iframe.ts
CHANGED