@eventlook/sdk 1.4.45 → 1.4.46-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +1 -0
- package/package.json +3 -1
- package/rollup.config.mjs +2 -0
- package/src/components/hook-form/FormProvider.tsx +5 -2
- package/src/form/ChildEventDialog.tsx +3 -3
- package/src/form/ContactPerson.tsx +1 -1
- package/src/form/PaymentOverviewBox.tsx +39 -72
- package/src/form/PaymentOverviewDrawer.tsx +169 -0
- package/src/form/PaymentPending.tsx +1 -1
- package/src/form/TicketForm.tsx +53 -17
- package/src/form/index.tsx +3 -1
- package/src/form/merchandise/MerchandiseSelection.tsx +24 -0
- package/src/form/merchandise/MerchandiseSlider.tsx +61 -0
- package/src/form/payment/FeeBox.tsx +0 -10
- package/src/form/payment/PaymentOverviewCheckbox.tsx +33 -56
- package/src/form/product/ProductCard.tsx +60 -55
- package/src/form/product/ProductVariantsDialog.tsx +195 -137
- package/src/form/services/index.tsx +217 -0
- package/src/form/tickets/ReleaseDescription.tsx +57 -0
- package/src/form/tickets/ReleaseWithMerchandise.tsx +237 -0
- package/src/form/tickets/TicketQuantityControl.tsx +93 -0
- package/src/form/{TicketSelection.tsx → tickets/TicketSelection.tsx} +130 -101
- package/src/form/tickets/TicketSelectionMobile.tsx +175 -0
- package/src/form/{TicketWithMerchandiseSelection.tsx → tickets/TicketWithMerchandiseSelection.tsx} +3 -7
- package/src/locales/cs.tsx +7 -1
- package/src/locales/en.tsx +7 -1
- package/src/locales/es.tsx +6 -0
- package/src/locales/pl.tsx +6 -0
- package/src/locales/sk.tsx +6 -0
- package/src/locales/uk.tsx +6 -0
- package/src/utils/data/global.ts +1 -0
- package/tsconfig.json +2 -1
- package/.claude/settings.local.json +0 -9
- package/dist/cjs/components/ClientOnly.js +0 -19
- package/dist/cjs/components/ClientOnly.js.map +0 -1
- package/dist/cjs/components/CustomSkeleton.js +0 -15
- package/dist/cjs/components/CustomSkeleton.js.map +0 -1
- package/dist/cjs/components/Image.js +0 -56
- package/dist/cjs/components/Image.js.map +0 -1
- package/dist/cjs/components/Label.js +0 -65
- package/dist/cjs/components/Label.js.map +0 -1
- package/dist/cjs/components/TextIconLabel.js +0 -19
- package/dist/cjs/components/TextIconLabel.js.map +0 -1
- package/dist/cjs/components/TicketFormSkeleton.js +0 -55
- package/dist/cjs/components/TicketFormSkeleton.js.map +0 -1
- package/dist/cjs/components/Trans.js +0 -87
- package/dist/cjs/components/Trans.js.map +0 -1
- package/dist/cjs/components/animate/IconButtonAnimate.js +0 -29
- package/dist/cjs/components/animate/IconButtonAnimate.js.map +0 -1
- package/dist/cjs/components/animate/MotionContainer.js +0 -18
- package/dist/cjs/components/animate/MotionContainer.js.map +0 -1
- package/dist/cjs/components/animate/variants/bounce.js +0 -98
- package/dist/cjs/components/animate/variants/bounce.js.map +0 -1
- package/dist/cjs/components/animate/variants/container.js +0 -25
- package/dist/cjs/components/animate/variants/container.js.map +0 -1
- package/dist/cjs/components/animate/variants/transition.js +0 -17
- package/dist/cjs/components/animate/variants/transition.js.map +0 -1
- package/dist/cjs/components/confirm-dialog/ConfirmDialog.js +0 -24
- package/dist/cjs/components/confirm-dialog/ConfirmDialog.js.map +0 -1
- package/dist/cjs/components/hook-form/FormProvider.js +0 -14
- package/dist/cjs/components/hook-form/FormProvider.js.map +0 -1
- package/dist/cjs/components/hook-form/RHFCheckbox.js +0 -15
- package/dist/cjs/components/hook-form/RHFCheckbox.js.map +0 -1
- package/dist/cjs/components/hook-form/RHFDatePicker.js +0 -22
- package/dist/cjs/components/hook-form/RHFDatePicker.js.map +0 -1
- package/dist/cjs/components/hook-form/RHFPhone.js +0 -24
- package/dist/cjs/components/hook-form/RHFPhone.js.map +0 -1
- package/dist/cjs/components/hook-form/RHFRadioGroup.js +0 -29
- package/dist/cjs/components/hook-form/RHFRadioGroup.js.map +0 -1
- package/dist/cjs/components/hook-form/RHFSelect.js +0 -34
- package/dist/cjs/components/hook-form/RHFSelect.js.map +0 -1
- package/dist/cjs/components/hook-form/RHFTextField.js +0 -15
- package/dist/cjs/components/hook-form/RHFTextField.js.map +0 -1
- package/dist/cjs/components/iconify/Iconify.js +0 -14
- package/dist/cjs/components/iconify/Iconify.js.map +0 -1
- package/dist/cjs/context/GlobalContext.js +0 -65
- package/dist/cjs/context/GlobalContext.js.map +0 -1
- package/dist/cjs/form/ChildEventCard.js +0 -60
- package/dist/cjs/form/ChildEventCard.js.map +0 -1
- package/dist/cjs/form/ChildEventDialog.js +0 -30
- package/dist/cjs/form/ChildEventDialog.js.map +0 -1
- package/dist/cjs/form/ChildEvents.js +0 -17
- package/dist/cjs/form/ChildEvents.js.map +0 -1
- package/dist/cjs/form/ContactPerson.js +0 -40
- package/dist/cjs/form/ContactPerson.js.map +0 -1
- package/dist/cjs/form/EmailConfirmation.js +0 -28
- package/dist/cjs/form/EmailConfirmation.js.map +0 -1
- package/dist/cjs/form/MerchandiseSelection.js +0 -17
- package/dist/cjs/form/MerchandiseSelection.js.map +0 -1
- package/dist/cjs/form/OrderSuccess.js +0 -57
- package/dist/cjs/form/OrderSuccess.js.map +0 -1
- package/dist/cjs/form/Payment.js +0 -214
- package/dist/cjs/form/Payment.js.map +0 -1
- package/dist/cjs/form/PaymentOverviewBox.js +0 -413
- package/dist/cjs/form/PaymentOverviewBox.js.map +0 -1
- package/dist/cjs/form/PaymentPending.js +0 -26
- package/dist/cjs/form/PaymentPending.js.map +0 -1
- package/dist/cjs/form/PaymentSuccess.js +0 -203
- package/dist/cjs/form/PaymentSuccess.js.map +0 -1
- package/dist/cjs/form/ReleaseCountdown.js +0 -34
- package/dist/cjs/form/ReleaseCountdown.js.map +0 -1
- package/dist/cjs/form/ReleaseWithMerchandise.js +0 -130
- package/dist/cjs/form/ReleaseWithMerchandise.js.map +0 -1
- package/dist/cjs/form/ScriptLoader.js +0 -21
- package/dist/cjs/form/ScriptLoader.js.map +0 -1
- package/dist/cjs/form/Shipping.js +0 -119
- package/dist/cjs/form/Shipping.js.map +0 -1
- package/dist/cjs/form/TicketForm.js +0 -470
- package/dist/cjs/form/TicketForm.js.map +0 -1
- package/dist/cjs/form/TicketSelection.js +0 -177
- package/dist/cjs/form/TicketSelection.js.map +0 -1
- package/dist/cjs/form/TicketSelectionMap.js +0 -67
- package/dist/cjs/form/TicketSelectionMap.js.map +0 -1
- package/dist/cjs/form/TicketWithMerchandiseSelection.js +0 -121
- package/dist/cjs/form/TicketWithMerchandiseSelection.js.map +0 -1
- package/dist/cjs/form/TimeslotSelection.js +0 -68
- package/dist/cjs/form/TimeslotSelection.js.map +0 -1
- package/dist/cjs/form/extra-field/ExtraField.js +0 -20
- package/dist/cjs/form/extra-field/ExtraField.js.map +0 -1
- package/dist/cjs/form/extra-field/ReleaseExtraFields.js +0 -60
- package/dist/cjs/form/extra-field/ReleaseExtraFields.js.map +0 -1
- package/dist/cjs/form/index.js +0 -69
- package/dist/cjs/form/index.js.map +0 -1
- package/dist/cjs/form/payment/FeeBox.js +0 -42
- package/dist/cjs/form/payment/FeeBox.js.map +0 -1
- package/dist/cjs/form/payment/PaymentOverviewCheckbox.js +0 -48
- package/dist/cjs/form/payment/PaymentOverviewCheckbox.js.map +0 -1
- package/dist/cjs/form/payment/PaymentSkeleton.js +0 -14
- package/dist/cjs/form/payment/PaymentSkeleton.js.map +0 -1
- package/dist/cjs/form/product/ProductCard.js +0 -61
- package/dist/cjs/form/product/ProductCard.js.map +0 -1
- package/dist/cjs/form/product/ProductVariantsDialog.js +0 -173
- package/dist/cjs/form/product/ProductVariantsDialog.js.map +0 -1
- package/dist/cjs/form/shipping/ShippingSkeleton.js +0 -14
- package/dist/cjs/form/shipping/ShippingSkeleton.js.map +0 -1
- package/dist/cjs/form/style.js +0 -50
- package/dist/cjs/form/style.js.map +0 -1
- package/dist/cjs/form/timeslot/TimeslotCalendar.js +0 -57
- package/dist/cjs/form/timeslot/TimeslotCalendar.js.map +0 -1
- package/dist/cjs/hooks/data/useActiveEventProducts.js +0 -22
- package/dist/cjs/hooks/data/useActiveEventProducts.js.map +0 -1
- package/dist/cjs/hooks/data/useAllowedPaymentMethods.js +0 -22
- package/dist/cjs/hooks/data/useAllowedPaymentMethods.js.map +0 -1
- package/dist/cjs/hooks/data/useEvent.js +0 -22
- package/dist/cjs/hooks/data/useEvent.js.map +0 -1
- package/dist/cjs/hooks/data/useEventActiveReleases.js +0 -26
- package/dist/cjs/hooks/data/useEventActiveReleases.js.map +0 -1
- package/dist/cjs/hooks/data/useEventShippingMethods.js +0 -22
- package/dist/cjs/hooks/data/useEventShippingMethods.js.map +0 -1
- package/dist/cjs/hooks/data/useEventTimeslots.js +0 -23
- package/dist/cjs/hooks/data/useEventTimeslots.js.map +0 -1
- package/dist/cjs/hooks/useCountdown.js +0 -40
- package/dist/cjs/hooks/useCountdown.js.map +0 -1
- package/dist/cjs/hooks/useDebounce.js +0 -17
- package/dist/cjs/hooks/useDebounce.js.map +0 -1
- package/dist/cjs/hooks/useErrors.js +0 -28
- package/dist/cjs/hooks/useErrors.js.map +0 -1
- package/dist/cjs/hooks/useFirstRender.js +0 -14
- package/dist/cjs/hooks/useFirstRender.js.map +0 -1
- package/dist/cjs/hooks/useGlobal.js +0 -11
- package/dist/cjs/hooks/useGlobal.js.map +0 -1
- package/dist/cjs/hooks/useResponsive.js +0 -29
- package/dist/cjs/hooks/useResponsive.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/locales/cs.js +0 -163
- package/dist/cjs/locales/cs.js.map +0 -1
- package/dist/cjs/locales/en.js +0 -164
- package/dist/cjs/locales/en.js.map +0 -1
- package/dist/cjs/locales/es.js +0 -164
- package/dist/cjs/locales/es.js.map +0 -1
- package/dist/cjs/locales/index.js +0 -18
- package/dist/cjs/locales/index.js.map +0 -1
- package/dist/cjs/locales/pl.js +0 -164
- package/dist/cjs/locales/pl.js.map +0 -1
- package/dist/cjs/locales/sk.js +0 -164
- package/dist/cjs/locales/sk.js.map +0 -1
- package/dist/cjs/locales/uk.js +0 -164
- package/dist/cjs/locales/uk.js.map +0 -1
- package/dist/cjs/modules/event-timeslot.js +0 -12
- package/dist/cjs/modules/event-timeslot.js.map +0 -1
- package/dist/cjs/modules/event.js +0 -24
- package/dist/cjs/modules/event.js.map +0 -1
- package/dist/cjs/modules/order.js +0 -14
- package/dist/cjs/modules/order.js.map +0 -1
- package/dist/cjs/modules/promo-code.js +0 -13
- package/dist/cjs/modules/promo-code.js.map +0 -1
- package/dist/cjs/modules/shopping-cart.js +0 -16
- package/dist/cjs/modules/shopping-cart.js.map +0 -1
- package/dist/cjs/utils/axios.js +0 -20
- package/dist/cjs/utils/axios.js.map +0 -1
- package/dist/cjs/utils/data/cookie.js +0 -6
- package/dist/cjs/utils/data/cookie.js.map +0 -1
- package/dist/cjs/utils/data/currency.js +0 -9
- package/dist/cjs/utils/data/currency.js.map +0 -1
- package/dist/cjs/utils/data/event.js +0 -8
- package/dist/cjs/utils/data/event.js.map +0 -1
- package/dist/cjs/utils/data/extra-field.js +0 -16
- package/dist/cjs/utils/data/extra-field.js.map +0 -1
- package/dist/cjs/utils/data/gender.js +0 -9
- package/dist/cjs/utils/data/gender.js.map +0 -1
- package/dist/cjs/utils/data/global.js +0 -6
- package/dist/cjs/utils/data/global.js.map +0 -1
- package/dist/cjs/utils/data/gopay.js +0 -14
- package/dist/cjs/utils/data/gopay.js.map +0 -1
- package/dist/cjs/utils/data/language.js +0 -14
- package/dist/cjs/utils/data/language.js.map +0 -1
- package/dist/cjs/utils/data/lottie/bank-transfer.json.js +0 -20
- package/dist/cjs/utils/data/lottie/bank-transfer.json.js.map +0 -1
- package/dist/cjs/utils/data/promo-code.js +0 -8
- package/dist/cjs/utils/data/promo-code.js.map +0 -1
- package/dist/cjs/utils/data/shipping-method.js +0 -8
- package/dist/cjs/utils/data/shipping-method.js.map +0 -1
- package/dist/cjs/utils/formatNumber.js +0 -19
- package/dist/cjs/utils/formatNumber.js.map +0 -1
- package/dist/cjs/utils/global.js +0 -26
- package/dist/cjs/utils/global.js.map +0 -1
- package/dist/cjs/utils/gtm.js +0 -125
- package/dist/cjs/utils/gtm.js.map +0 -1
- package/dist/cjs/utils/isBrowser.js +0 -6
- package/dist/cjs/utils/isBrowser.js.map +0 -1
- package/dist/cjs/utils/place.js +0 -6
- package/dist/cjs/utils/place.js.map +0 -1
- package/dist/cjs/utils/price.js +0 -15
- package/dist/cjs/utils/price.js.map +0 -1
- package/dist/cjs/utils/product.js +0 -29
- package/dist/cjs/utils/product.js.map +0 -1
- package/dist/cjs/utils/translation.js +0 -6
- package/dist/cjs/utils/translation.js.map +0 -1
- package/dist/cjs/utils/url.js +0 -18
- package/dist/cjs/utils/url.js.map +0 -1
- package/dist/esm/components/ClientOnly.js +0 -15
- package/dist/esm/components/ClientOnly.js.map +0 -1
- package/dist/esm/components/CustomSkeleton.js +0 -11
- package/dist/esm/components/CustomSkeleton.js.map +0 -1
- package/dist/esm/components/Image.js +0 -52
- package/dist/esm/components/Image.js.map +0 -1
- package/dist/esm/components/Label.js +0 -61
- package/dist/esm/components/Label.js.map +0 -1
- package/dist/esm/components/TextIconLabel.js +0 -15
- package/dist/esm/components/TextIconLabel.js.map +0 -1
- package/dist/esm/components/TicketFormSkeleton.js +0 -51
- package/dist/esm/components/TicketFormSkeleton.js.map +0 -1
- package/dist/esm/components/Trans.js +0 -85
- package/dist/esm/components/Trans.js.map +0 -1
- package/dist/esm/components/animate/IconButtonAnimate.js +0 -27
- package/dist/esm/components/animate/IconButtonAnimate.js.map +0 -1
- package/dist/esm/components/animate/MotionContainer.js +0 -14
- package/dist/esm/components/animate/MotionContainer.js.map +0 -1
- package/dist/esm/components/animate/variants/bounce.js +0 -96
- package/dist/esm/components/animate/variants/bounce.js.map +0 -1
- package/dist/esm/components/animate/variants/container.js +0 -23
- package/dist/esm/components/animate/variants/container.js.map +0 -1
- package/dist/esm/components/animate/variants/transition.js +0 -14
- package/dist/esm/components/animate/variants/transition.js.map +0 -1
- package/dist/esm/components/confirm-dialog/ConfirmDialog.js +0 -20
- package/dist/esm/components/confirm-dialog/ConfirmDialog.js.map +0 -1
- package/dist/esm/components/hook-form/FormProvider.js +0 -10
- package/dist/esm/components/hook-form/FormProvider.js.map +0 -1
- package/dist/esm/components/hook-form/RHFCheckbox.js +0 -13
- package/dist/esm/components/hook-form/RHFCheckbox.js.map +0 -1
- package/dist/esm/components/hook-form/RHFDatePicker.js +0 -18
- package/dist/esm/components/hook-form/RHFDatePicker.js.map +0 -1
- package/dist/esm/components/hook-form/RHFPhone.js +0 -20
- package/dist/esm/components/hook-form/RHFPhone.js.map +0 -1
- package/dist/esm/components/hook-form/RHFRadioGroup.js +0 -25
- package/dist/esm/components/hook-form/RHFRadioGroup.js.map +0 -1
- package/dist/esm/components/hook-form/RHFSelect.js +0 -32
- package/dist/esm/components/hook-form/RHFSelect.js.map +0 -1
- package/dist/esm/components/hook-form/RHFTextField.js +0 -11
- package/dist/esm/components/hook-form/RHFTextField.js.map +0 -1
- package/dist/esm/components/iconify/Iconify.js +0 -10
- package/dist/esm/components/iconify/Iconify.js.map +0 -1
- package/dist/esm/context/GlobalContext.js +0 -62
- package/dist/esm/context/GlobalContext.js.map +0 -1
- package/dist/esm/form/ChildEventCard.js +0 -56
- package/dist/esm/form/ChildEventCard.js.map +0 -1
- package/dist/esm/form/ChildEventDialog.js +0 -26
- package/dist/esm/form/ChildEventDialog.js.map +0 -1
- package/dist/esm/form/ChildEvents.js +0 -13
- package/dist/esm/form/ChildEvents.js.map +0 -1
- package/dist/esm/form/ContactPerson.js +0 -36
- package/dist/esm/form/ContactPerson.js.map +0 -1
- package/dist/esm/form/EmailConfirmation.js +0 -24
- package/dist/esm/form/EmailConfirmation.js.map +0 -1
- package/dist/esm/form/MerchandiseSelection.js +0 -13
- package/dist/esm/form/MerchandiseSelection.js.map +0 -1
- package/dist/esm/form/OrderSuccess.js +0 -53
- package/dist/esm/form/OrderSuccess.js.map +0 -1
- package/dist/esm/form/Payment.js +0 -210
- package/dist/esm/form/Payment.js.map +0 -1
- package/dist/esm/form/PaymentOverviewBox.js +0 -409
- package/dist/esm/form/PaymentOverviewBox.js.map +0 -1
- package/dist/esm/form/PaymentPending.js +0 -22
- package/dist/esm/form/PaymentPending.js.map +0 -1
- package/dist/esm/form/PaymentSuccess.js +0 -199
- package/dist/esm/form/PaymentSuccess.js.map +0 -1
- package/dist/esm/form/ReleaseCountdown.js +0 -30
- package/dist/esm/form/ReleaseCountdown.js.map +0 -1
- package/dist/esm/form/ReleaseWithMerchandise.js +0 -126
- package/dist/esm/form/ReleaseWithMerchandise.js.map +0 -1
- package/dist/esm/form/ScriptLoader.js +0 -17
- package/dist/esm/form/ScriptLoader.js.map +0 -1
- package/dist/esm/form/Shipping.js +0 -115
- package/dist/esm/form/Shipping.js.map +0 -1
- package/dist/esm/form/TicketForm.js +0 -447
- package/dist/esm/form/TicketForm.js.map +0 -1
- package/dist/esm/form/TicketSelection.js +0 -173
- package/dist/esm/form/TicketSelection.js.map +0 -1
- package/dist/esm/form/TicketSelectionMap.js +0 -63
- package/dist/esm/form/TicketSelectionMap.js.map +0 -1
- package/dist/esm/form/TicketWithMerchandiseSelection.js +0 -117
- package/dist/esm/form/TicketWithMerchandiseSelection.js.map +0 -1
- package/dist/esm/form/TimeslotSelection.js +0 -64
- package/dist/esm/form/TimeslotSelection.js.map +0 -1
- package/dist/esm/form/extra-field/ExtraField.js +0 -16
- package/dist/esm/form/extra-field/ExtraField.js.map +0 -1
- package/dist/esm/form/extra-field/ReleaseExtraFields.js +0 -56
- package/dist/esm/form/extra-field/ReleaseExtraFields.js.map +0 -1
- package/dist/esm/form/index.js +0 -65
- package/dist/esm/form/index.js.map +0 -1
- package/dist/esm/form/payment/FeeBox.js +0 -38
- package/dist/esm/form/payment/FeeBox.js.map +0 -1
- package/dist/esm/form/payment/PaymentOverviewCheckbox.js +0 -44
- package/dist/esm/form/payment/PaymentOverviewCheckbox.js.map +0 -1
- package/dist/esm/form/payment/PaymentSkeleton.js +0 -10
- package/dist/esm/form/payment/PaymentSkeleton.js.map +0 -1
- package/dist/esm/form/product/ProductCard.js +0 -57
- package/dist/esm/form/product/ProductCard.js.map +0 -1
- package/dist/esm/form/product/ProductVariantsDialog.js +0 -169
- package/dist/esm/form/product/ProductVariantsDialog.js.map +0 -1
- package/dist/esm/form/shipping/ShippingSkeleton.js +0 -10
- package/dist/esm/form/shipping/ShippingSkeleton.js.map +0 -1
- package/dist/esm/form/style.js +0 -44
- package/dist/esm/form/style.js.map +0 -1
- package/dist/esm/form/timeslot/TimeslotCalendar.js +0 -53
- package/dist/esm/form/timeslot/TimeslotCalendar.js.map +0 -1
- package/dist/esm/hooks/data/useActiveEventProducts.js +0 -18
- package/dist/esm/hooks/data/useActiveEventProducts.js.map +0 -1
- package/dist/esm/hooks/data/useAllowedPaymentMethods.js +0 -18
- package/dist/esm/hooks/data/useAllowedPaymentMethods.js.map +0 -1
- package/dist/esm/hooks/data/useEvent.js +0 -18
- package/dist/esm/hooks/data/useEvent.js.map +0 -1
- package/dist/esm/hooks/data/useEventActiveReleases.js +0 -22
- package/dist/esm/hooks/data/useEventActiveReleases.js.map +0 -1
- package/dist/esm/hooks/data/useEventShippingMethods.js +0 -18
- package/dist/esm/hooks/data/useEventShippingMethods.js.map +0 -1
- package/dist/esm/hooks/data/useEventTimeslots.js +0 -19
- package/dist/esm/hooks/data/useEventTimeslots.js.map +0 -1
- package/dist/esm/hooks/useCountdown.js +0 -36
- package/dist/esm/hooks/useCountdown.js.map +0 -1
- package/dist/esm/hooks/useDebounce.js +0 -13
- package/dist/esm/hooks/useDebounce.js.map +0 -1
- package/dist/esm/hooks/useErrors.js +0 -24
- package/dist/esm/hooks/useErrors.js.map +0 -1
- package/dist/esm/hooks/useFirstRender.js +0 -12
- package/dist/esm/hooks/useFirstRender.js.map +0 -1
- package/dist/esm/hooks/useGlobal.js +0 -7
- package/dist/esm/hooks/useGlobal.js.map +0 -1
- package/dist/esm/hooks/useResponsive.js +0 -25
- package/dist/esm/hooks/useResponsive.js.map +0 -1
- package/dist/esm/index.js +0 -6
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/locales/cs.js +0 -159
- package/dist/esm/locales/cs.js.map +0 -1
- package/dist/esm/locales/en.js +0 -160
- package/dist/esm/locales/en.js.map +0 -1
- package/dist/esm/locales/es.js +0 -160
- package/dist/esm/locales/es.js.map +0 -1
- package/dist/esm/locales/index.js +0 -7
- package/dist/esm/locales/index.js.map +0 -1
- package/dist/esm/locales/pl.js +0 -160
- package/dist/esm/locales/pl.js.map +0 -1
- package/dist/esm/locales/sk.js +0 -160
- package/dist/esm/locales/sk.js.map +0 -1
- package/dist/esm/locales/uk.js +0 -160
- package/dist/esm/locales/uk.js.map +0 -1
- package/dist/esm/modules/event-timeslot.js +0 -10
- package/dist/esm/modules/event-timeslot.js.map +0 -1
- package/dist/esm/modules/event.js +0 -19
- package/dist/esm/modules/event.js.map +0 -1
- package/dist/esm/modules/order.js +0 -10
- package/dist/esm/modules/order.js.map +0 -1
- package/dist/esm/modules/promo-code.js +0 -11
- package/dist/esm/modules/promo-code.js.map +0 -1
- package/dist/esm/modules/shopping-cart.js +0 -13
- package/dist/esm/modules/shopping-cart.js.map +0 -1
- package/dist/esm/utils/axios.js +0 -16
- package/dist/esm/utils/axios.js.map +0 -1
- package/dist/esm/utils/data/cookie.js +0 -4
- package/dist/esm/utils/data/cookie.js.map +0 -1
- package/dist/esm/utils/data/currency.js +0 -9
- package/dist/esm/utils/data/currency.js.map +0 -1
- package/dist/esm/utils/data/event.js +0 -8
- package/dist/esm/utils/data/event.js.map +0 -1
- package/dist/esm/utils/data/extra-field.js +0 -16
- package/dist/esm/utils/data/extra-field.js.map +0 -1
- package/dist/esm/utils/data/gender.js +0 -9
- package/dist/esm/utils/data/gender.js.map +0 -1
- package/dist/esm/utils/data/global.js +0 -4
- package/dist/esm/utils/data/global.js.map +0 -1
- package/dist/esm/utils/data/gopay.js +0 -14
- package/dist/esm/utils/data/gopay.js.map +0 -1
- package/dist/esm/utils/data/language.js +0 -14
- package/dist/esm/utils/data/language.js.map +0 -1
- package/dist/esm/utils/data/lottie/bank-transfer.json.js +0 -4
- package/dist/esm/utils/data/lottie/bank-transfer.json.js.map +0 -1
- package/dist/esm/utils/data/promo-code.js +0 -8
- package/dist/esm/utils/data/promo-code.js.map +0 -1
- package/dist/esm/utils/data/shipping-method.js +0 -8
- package/dist/esm/utils/data/shipping-method.js.map +0 -1
- package/dist/esm/utils/formatNumber.js +0 -17
- package/dist/esm/utils/formatNumber.js.map +0 -1
- package/dist/esm/utils/global.js +0 -21
- package/dist/esm/utils/global.js.map +0 -1
- package/dist/esm/utils/gtm.js +0 -112
- package/dist/esm/utils/gtm.js.map +0 -1
- package/dist/esm/utils/isBrowser.js +0 -4
- package/dist/esm/utils/isBrowser.js.map +0 -1
- package/dist/esm/utils/place.js +0 -4
- package/dist/esm/utils/place.js.map +0 -1
- package/dist/esm/utils/price.js +0 -12
- package/dist/esm/utils/price.js.map +0 -1
- package/dist/esm/utils/product.js +0 -27
- package/dist/esm/utils/product.js.map +0 -1
- package/dist/esm/utils/translation.js +0 -4
- package/dist/esm/utils/translation.js.map +0 -1
- package/dist/esm/utils/url.js +0 -16
- package/dist/esm/utils/url.js.map +0 -1
- package/dist/types/components/ClientOnly.d.ts +0 -5
- package/dist/types/components/CustomSkeleton.d.ts +0 -4
- package/dist/types/components/Image.d.ts +0 -14
- package/dist/types/components/Label.d.ts +0 -11
- package/dist/types/components/TextIconLabel.d.ts +0 -11
- package/dist/types/components/TicketFormSkeleton.d.ts +0 -3
- package/dist/types/components/Trans.d.ts +0 -12
- package/dist/types/components/animate/DialogAnimate.d.ts +0 -9
- package/dist/types/components/animate/IconButtonAnimate.d.ts +0 -7
- package/dist/types/components/animate/MotionContainer.d.ts +0 -10
- package/dist/types/components/animate/MotionLazyContainer.d.ts +0 -6
- package/dist/types/components/animate/MotionViewport.d.ts +0 -10
- package/dist/types/components/animate/TextAnimate.d.ts +0 -9
- package/dist/types/components/animate/index.d.ts +0 -7
- package/dist/types/components/animate/variants/actions.d.ts +0 -5
- package/dist/types/components/animate/variants/background.d.ts +0 -104
- package/dist/types/components/animate/variants/bounce.d.ts +0 -131
- package/dist/types/components/animate/variants/container.d.ts +0 -19
- package/dist/types/components/animate/variants/fade.d.ts +0 -217
- package/dist/types/components/animate/variants/flip.d.ts +0 -75
- package/dist/types/components/animate/variants/index.d.ts +0 -12
- package/dist/types/components/animate/variants/path.d.ts +0 -14
- package/dist/types/components/animate/variants/rotate.d.ts +0 -39
- package/dist/types/components/animate/variants/scale.d.ts +0 -75
- package/dist/types/components/animate/variants/slide.d.ts +0 -155
- package/dist/types/components/animate/variants/transition.d.ts +0 -13
- package/dist/types/components/animate/variants/zoom.d.ts +0 -199
- package/dist/types/components/confirm-dialog/ConfirmDialog.d.ts +0 -3
- package/dist/types/components/confirm-dialog/index.d.ts +0 -1
- package/dist/types/components/confirm-dialog/types.d.ts +0 -8
- package/dist/types/components/hook-form/FormProvider.d.ts +0 -9
- package/dist/types/components/hook-form/RHFAutocomplete.d.ts +0 -9
- package/dist/types/components/hook-form/RHFCheckbox.d.ts +0 -20
- package/dist/types/components/hook-form/RHFCodes.d.ts +0 -8
- package/dist/types/components/hook-form/RHFDatePicker.d.ts +0 -9
- package/dist/types/components/hook-form/RHFPhone.d.ts +0 -8
- package/dist/types/components/hook-form/RHFRadioGroup.d.ts +0 -14
- package/dist/types/components/hook-form/RHFSelect.d.ts +0 -23
- package/dist/types/components/hook-form/RHFSlider.d.ts +0 -8
- package/dist/types/components/hook-form/RHFSwitch.d.ts +0 -8
- package/dist/types/components/hook-form/RHFTextField.d.ts +0 -7
- package/dist/types/components/hook-form/index.d.ts +0 -9
- package/dist/types/components/iconify/Iconify.d.ts +0 -10
- package/dist/types/components/iconify/index.d.ts +0 -2
- package/dist/types/components/iconify/types.d.ts +0 -2
- package/dist/types/components/index.d.ts +0 -4
- package/dist/types/context/GlobalContext.d.ts +0 -16
- package/dist/types/form/ChildEventCard.d.ts +0 -7
- package/dist/types/form/ChildEventDialog.d.ts +0 -9
- package/dist/types/form/ChildEvents.d.ts +0 -8
- package/dist/types/form/ContactPerson.d.ts +0 -7
- package/dist/types/form/EmailConfirmation.d.ts +0 -8
- package/dist/types/form/MerchandiseSelection.d.ts +0 -9
- package/dist/types/form/OrderSuccess.d.ts +0 -9
- package/dist/types/form/Payment.d.ts +0 -7
- package/dist/types/form/PaymentOverviewBox.d.ts +0 -7
- package/dist/types/form/PaymentPending.d.ts +0 -3
- package/dist/types/form/PaymentSuccess.d.ts +0 -9
- package/dist/types/form/ReleaseCountdown.d.ts +0 -8
- package/dist/types/form/ReleaseWithMerchandise.d.ts +0 -12
- package/dist/types/form/ScriptLoader.d.ts +0 -3
- package/dist/types/form/Shipping.d.ts +0 -7
- package/dist/types/form/TicketForm.d.ts +0 -11
- package/dist/types/form/TicketSelection.d.ts +0 -7
- package/dist/types/form/TicketSelectionMap.d.ts +0 -7
- package/dist/types/form/TicketWithMerchandiseSelection.d.ts +0 -7
- package/dist/types/form/TimeslotSelection.d.ts +0 -7
- package/dist/types/form/extra-field/ExtraField.d.ts +0 -9
- package/dist/types/form/extra-field/ReleaseExtraFields.d.ts +0 -10
- package/dist/types/form/index.d.ts +0 -26
- package/dist/types/form/payment/FeeBox.d.ts +0 -8
- package/dist/types/form/payment/PaymentOverviewCheckbox.d.ts +0 -12
- package/dist/types/form/payment/PaymentSkeleton.d.ts +0 -7
- package/dist/types/form/product/ProductCard.d.ts +0 -9
- package/dist/types/form/product/ProductVariantsDialog.d.ts +0 -14
- package/dist/types/form/shipping/ShippingSkeleton.d.ts +0 -7
- package/dist/types/form/style.d.ts +0 -11
- package/dist/types/form/timeslot/TimeslotCalendar.d.ts +0 -12
- package/dist/types/hooks/data/useActiveEventProducts.d.ts +0 -8
- package/dist/types/hooks/data/useAllowedPaymentMethods.d.ts +0 -9
- package/dist/types/hooks/data/useEvent.d.ts +0 -8
- package/dist/types/hooks/data/useEventActiveReleases.d.ts +0 -8
- package/dist/types/hooks/data/useEventShippingMethods.d.ts +0 -8
- package/dist/types/hooks/data/useEventTimeslots.d.ts +0 -10
- package/dist/types/hooks/useCountdown.d.ts +0 -6
- package/dist/types/hooks/useDebounce.d.ts +0 -1
- package/dist/types/hooks/useErrors.d.ts +0 -4
- package/dist/types/hooks/useEventListener.d.ts +0 -5
- package/dist/types/hooks/useFirstRender.d.ts +0 -1
- package/dist/types/hooks/useGlobal.d.ts +0 -2
- package/dist/types/hooks/useResponsive.d.ts +0 -8
- package/dist/types/index.d.ts +0 -4
- package/dist/types/locales/cs.d.ts +0 -157
- package/dist/types/locales/en.d.ts +0 -158
- package/dist/types/locales/es.d.ts +0 -158
- package/dist/types/locales/index.d.ts +0 -6
- package/dist/types/locales/pl.d.ts +0 -158
- package/dist/types/locales/sk.d.ts +0 -158
- package/dist/types/locales/uk.d.ts +0 -158
- package/dist/types/modules/event-timeslot.d.ts +0 -2
- package/dist/types/modules/event.d.ts +0 -5
- package/dist/types/modules/order.d.ts +0 -7
- package/dist/types/modules/promo-code.d.ts +0 -1
- package/dist/types/modules/shopping-cart.d.ts +0 -4
- package/dist/types/utils/axios.d.ts +0 -2
- package/dist/types/utils/data/cookie.d.ts +0 -1
- package/dist/types/utils/data/currency.d.ts +0 -5
- package/dist/types/utils/data/event.d.ts +0 -4
- package/dist/types/utils/data/extra-field.d.ts +0 -11
- package/dist/types/utils/data/gender.d.ts +0 -5
- package/dist/types/utils/data/global.d.ts +0 -1
- package/dist/types/utils/data/gopay.d.ts +0 -10
- package/dist/types/utils/data/language.d.ts +0 -10
- package/dist/types/utils/data/order.d.ts +0 -4
- package/dist/types/utils/data/product.d.ts +0 -3
- package/dist/types/utils/data/promo-code.d.ts +0 -4
- package/dist/types/utils/data/shipping-method.d.ts +0 -4
- package/dist/types/utils/data/shopping-cart.d.ts +0 -5
- package/dist/types/utils/formatNumber.d.ts +0 -8
- package/dist/types/utils/global.d.ts +0 -4
- package/dist/types/utils/gtm.d.ts +0 -28
- package/dist/types/utils/isBrowser.d.ts +0 -1
- package/dist/types/utils/place.d.ts +0 -2
- package/dist/types/utils/price.d.ts +0 -5
- package/dist/types/utils/product.d.ts +0 -3
- package/dist/types/utils/translation.d.ts +0 -2
- package/dist/types/utils/types/animate.d.ts +0 -26
- package/dist/types/utils/types/artist.type.d.ts +0 -17
- package/dist/types/utils/types/company.type.d.ts +0 -12
- package/dist/types/utils/types/country.type.d.ts +0 -39
- package/dist/types/utils/types/customer.type.d.ts +0 -10
- package/dist/types/utils/types/event-product.type.d.ts +0 -15
- package/dist/types/utils/types/event-timeslot.type.d.ts +0 -15
- package/dist/types/utils/types/event.type.d.ts +0 -67
- package/dist/types/utils/types/extra-field.type.d.ts +0 -18
- package/dist/types/utils/types/file.type.d.ts +0 -6
- package/dist/types/utils/types/global.type.d.ts +0 -76
- package/dist/types/utils/types/gtm.type.d.ts +0 -90
- package/dist/types/utils/types/locale.type.d.ts +0 -4
- package/dist/types/utils/types/order.type.d.ts +0 -69
- package/dist/types/utils/types/palette.type.d.ts +0 -1
- package/dist/types/utils/types/payment-method.type.d.ts +0 -23
- package/dist/types/utils/types/pixel.type.d.ts +0 -7
- package/dist/types/utils/types/place.type.d.ts +0 -19
- package/dist/types/utils/types/product-image.type.d.ts +0 -5
- package/dist/types/utils/types/product-parameter.type.d.ts +0 -7
- package/dist/types/utils/types/product-variant.type.d.ts +0 -9
- package/dist/types/utils/types/product.type.d.ts +0 -57
- package/dist/types/utils/types/project.type.d.ts +0 -24
- package/dist/types/utils/types/promo-code.type.d.ts +0 -15
- package/dist/types/utils/types/release-category.type.d.ts +0 -17
- package/dist/types/utils/types/release.type.d.ts +0 -28
- package/dist/types/utils/types/shipping-method.type.d.ts +0 -11
- package/dist/types/utils/types/shopping-cart.type.d.ts +0 -78
- package/dist/types/utils/types/ticket.type.d.ts +0 -110
- package/dist/types/utils/types/translation.type.d.ts +0 -18
- package/dist/types/utils/types/user.type.d.ts +0 -9
- package/dist/types/utils/url.d.ts +0 -1
- package/src/form/MerchandiseSelection.tsx +0 -29
- package/src/form/ReleaseWithMerchandise.tsx +0 -230
- /package/src/form/{TicketSelectionMap.tsx → tickets/TicketSelectionMap.tsx} +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var material = require('@mui/material');
|
|
7
|
-
var CustomSkeleton = require('./CustomSkeleton.js');
|
|
8
|
-
|
|
9
|
-
const TicketFormSkeleton = () => (React.createElement(material.Grid, { container: true, spacing: 2 },
|
|
10
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 8 },
|
|
11
|
-
React.createElement(material.Box, null,
|
|
12
|
-
React.createElement(material.Typography, { variant: "h6", gutterBottom: true },
|
|
13
|
-
React.createElement(CustomSkeleton.default, { variant: "text", sx: { maxWidth: 300 } })),
|
|
14
|
-
React.createElement(material.Grid, { container: true, spacing: 2, mb: 2 },
|
|
15
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
16
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
17
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
18
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
19
|
-
React.createElement(material.Grid, { item: true, xs: 12 },
|
|
20
|
-
React.createElement(CustomSkeleton.default, { variant: "text", width: "60%" }))),
|
|
21
|
-
React.createElement(material.Divider, { sx: { my: 3 } }),
|
|
22
|
-
React.createElement(material.Typography, { variant: "h6", gutterBottom: true },
|
|
23
|
-
React.createElement(CustomSkeleton.default, { variant: "text", sx: { maxWidth: 300 } })),
|
|
24
|
-
React.createElement(material.Grid, { container: true, spacing: 2, mb: 2 },
|
|
25
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
26
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
27
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
28
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
29
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
30
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
31
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
32
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
33
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
34
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
35
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 6 },
|
|
36
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 }))),
|
|
37
|
-
React.createElement(material.Divider, { sx: { my: 3 } }),
|
|
38
|
-
React.createElement(material.Typography, { variant: "h6", gutterBottom: true },
|
|
39
|
-
React.createElement(CustomSkeleton.default, { variant: "text", sx: { maxWidth: 300 } })),
|
|
40
|
-
React.createElement(material.Grid, { container: true, spacing: 2, mb: 2 },
|
|
41
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 8 },
|
|
42
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 })),
|
|
43
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 4 },
|
|
44
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 56 }))),
|
|
45
|
-
React.createElement(material.Typography, { variant: "subtitle1", gutterBottom: true },
|
|
46
|
-
React.createElement(CustomSkeleton.default, { variant: "text", sx: { maxWidth: 300 } })),
|
|
47
|
-
React.createElement(material.Stack, { spacing: 2 },
|
|
48
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 64 }),
|
|
49
|
-
React.createElement(CustomSkeleton.default, { variant: "rectangular", height: 64 })))),
|
|
50
|
-
React.createElement(material.Grid, { item: true, xs: 12, md: 4 },
|
|
51
|
-
React.createElement(material.Box, null,
|
|
52
|
-
React.createElement(CustomSkeleton.default, { height: 370 })))));
|
|
53
|
-
|
|
54
|
-
exports.default = TicketFormSkeleton;
|
|
55
|
-
//# sourceMappingURL=TicketFormSkeleton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TicketFormSkeleton.js","sources":["../../../src/components/TicketFormSkeleton.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, Grid, Typography, Divider, Stack } from '@mui/material';\nimport CustomSkeleton from '@components/CustomSkeleton';\n\nconst TicketFormSkeleton: React.FC = () => (\n <Grid container spacing={2}>\n <Grid item xs={12} md={8}>\n <Box>\n <Typography variant=\"h6\" gutterBottom>\n <CustomSkeleton variant=\"text\" sx={{ maxWidth: 300 }} />\n </Typography>\n <Grid container spacing={2} mb={2}>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12}>\n <CustomSkeleton variant=\"text\" width=\"60%\" />\n </Grid>\n </Grid>\n\n <Divider sx={{ my: 3 }} />\n\n {/* Krok 2 – Kontaktní osoba */}\n <Typography variant=\"h6\" gutterBottom>\n <CustomSkeleton variant=\"text\" sx={{ maxWidth: 300 }} />\n </Typography>\n <Grid container spacing={2} mb={2}>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12} md={6}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n </Grid>\n\n <Divider sx={{ my: 3 }} />\n\n {/* Krok 3 – Způsoby platby */}\n <Typography variant=\"h6\" gutterBottom>\n <CustomSkeleton variant=\"text\" sx={{ maxWidth: 300 }} />\n </Typography>\n <Grid container spacing={2} mb={2}>\n <Grid item xs={12} md={8}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n <Grid item xs={12} md={4}>\n <CustomSkeleton variant=\"rectangular\" height={56} />\n </Grid>\n </Grid>\n\n <Typography variant=\"subtitle1\" gutterBottom>\n <CustomSkeleton variant=\"text\" sx={{ maxWidth: 300 }} />\n </Typography>\n <Stack spacing={2}>\n <CustomSkeleton variant=\"rectangular\" height={64} />\n <CustomSkeleton variant=\"rectangular\" height={64} />\n </Stack>\n </Box>\n </Grid>\n <Grid item xs={12} md={4}>\n <Box>\n <CustomSkeleton height={370} />\n </Box>\n </Grid>\n </Grid>\n);\n\nexport default TicketFormSkeleton;\n"],"names":["Grid","Box","Typography","CustomSkeleton","Divider","Stack"],"mappings":";;;;;;;;AAIA,MAAM,kBAAkB,GAAa,OACnC,KAAA,CAAA,aAAA,CAACA,aAAI,EAAA,EAAC,SAAS,EAAA,IAAA,EAAC,OAAO,EAAE,CAAC,EAAA;IACxB,KAAA,CAAA,aAAA,CAACA,aAAI,EAAA,EAAC,IAAI,EAAA,IAAA,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAA;AACtB,QAAA,KAAA,CAAA,aAAA,CAACC,YAAG,EAAA,IAAA;AACF,YAAA,KAAA,CAAA,aAAA,CAACC,mBAAU,EAAA,EAAC,OAAO,EAAC,IAAI,EAAC,YAAY,EAAA,IAAA,EAAA;AACnC,gBAAA,KAAA,CAAA,aAAA,CAACC,sBAAc,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAI,CAC7C;YACb,KAAA,CAAA,aAAA,CAACH,aAAI,EAAA,EAAC,SAAS,EAAA,IAAA,EA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,MAAM,EAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAI,CAC7C;AACb,YAAA,KAAA,CAAA,aAAA,CAACE,cAAK,EAAA,EAAC,OAAO,EAAE,CAAC,EAAA;gBACf,KAAA,CAAA,aAAA,CAACF,sBAAc,IAAC,OAAO,EAAC,aAAa,EAAC,MAAM,EAAE,EAAE,EAAA,CAAI;AACpD,gBAAA,KAAA,CAAA,aAAA,CAACA,sBAAc,EAAA,EAAC,OAAO,EAAC,aAAa,EAAC,MAAM,EAAE,EAAE,EAAA,CAAI,CAC9C,CACJ,CACD;IACP,KAAA,CAAA,aAAA,CAACH,aAAI,EAAA,EAAC,IAAI,EAAA,IAAA,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAA;AACtB,QAAA,KAAA,CAAA,aAAA,CAACC,YAAG,EAAA,IAAA;YACF,KAAA,CAAA,aAAA,CAACE,sBAAc,EAAA,EAAC,MAAM,EAAE,GAAG,GAAI,CAC3B,CACD,CACF;;;;"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var useGlobal = require('../hooks/useGlobal.js');
|
|
5
|
-
|
|
6
|
-
const Trans = ({ text, values = {}, components = {}, enableMarkdown = false, }) => {
|
|
7
|
-
const { t } = useGlobal.default();
|
|
8
|
-
const interpolated = t(text, values);
|
|
9
|
-
const content = parseWithComponents(interpolated, components, enableMarkdown);
|
|
10
|
-
return React.createElement(React.Fragment, null, content);
|
|
11
|
-
};
|
|
12
|
-
const parseMarkdown = (text) => {
|
|
13
|
-
const boldItalicRegex = /(\*\*|__)(.*?)\1|_(.*?)_|`(.*?)`/g;
|
|
14
|
-
const nodes = [];
|
|
15
|
-
let lastIndex = 0;
|
|
16
|
-
let match;
|
|
17
|
-
while ((match = boldItalicRegex.exec(text)) !== null) {
|
|
18
|
-
if (match.index > lastIndex) {
|
|
19
|
-
nodes.push(text.slice(lastIndex, match.index));
|
|
20
|
-
}
|
|
21
|
-
const [, , boldText, italicText, codeText] = match;
|
|
22
|
-
if (boldText) {
|
|
23
|
-
nodes.push(React.createElement("strong", { key: match.index }, boldText));
|
|
24
|
-
}
|
|
25
|
-
else if (italicText) {
|
|
26
|
-
nodes.push(React.createElement("em", { key: match.index }, italicText));
|
|
27
|
-
}
|
|
28
|
-
else if (codeText) {
|
|
29
|
-
nodes.push(React.createElement("code", { key: match.index }, codeText));
|
|
30
|
-
}
|
|
31
|
-
lastIndex = match.index + match[0].length;
|
|
32
|
-
}
|
|
33
|
-
if (lastIndex < text.length) {
|
|
34
|
-
nodes.push(text.slice(lastIndex));
|
|
35
|
-
}
|
|
36
|
-
return nodes;
|
|
37
|
-
};
|
|
38
|
-
const parseWithComponents = (str, components, enableMarkdown) => {
|
|
39
|
-
const nodes = [];
|
|
40
|
-
const tagRegex = /<(\d+)>(.*?)<\/\1>|<(\w+)\s*\/?>/gs;
|
|
41
|
-
let lastIndex = 0;
|
|
42
|
-
let match;
|
|
43
|
-
while ((match = tagRegex.exec(str)) !== null) {
|
|
44
|
-
const matchStart = match.index;
|
|
45
|
-
const matchEnd = tagRegex.lastIndex;
|
|
46
|
-
if (matchStart > lastIndex) {
|
|
47
|
-
const beforeText = str.slice(lastIndex, matchStart);
|
|
48
|
-
nodes.push(...(enableMarkdown ? parseMarkdown(beforeText) : [beforeText]));
|
|
49
|
-
}
|
|
50
|
-
const numberedKey = match[1];
|
|
51
|
-
const numberedContent = match[2];
|
|
52
|
-
const namedComponentKey = match[3];
|
|
53
|
-
const key = matchStart;
|
|
54
|
-
if (numberedKey !== undefined) {
|
|
55
|
-
const component = components[numberedKey];
|
|
56
|
-
const children = enableMarkdown ? parseMarkdown(numberedContent) : [numberedContent];
|
|
57
|
-
if (React.isValidElement(component)) {
|
|
58
|
-
nodes.push(React.cloneElement(component, { key }, children));
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
nodes.push(...children);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
else if (namedComponentKey !== undefined) {
|
|
65
|
-
const component = components[namedComponentKey];
|
|
66
|
-
// Oprava: vytvoř nový element, i když to není validní prvek
|
|
67
|
-
if (React.isValidElement(component)) {
|
|
68
|
-
nodes.push(React.cloneElement(component, { key }));
|
|
69
|
-
}
|
|
70
|
-
else if (typeof namedComponentKey === 'string') {
|
|
71
|
-
nodes.push(React.createElement(namedComponentKey, { key }));
|
|
72
|
-
}
|
|
73
|
-
else {
|
|
74
|
-
nodes.push('');
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
lastIndex = matchEnd;
|
|
78
|
-
}
|
|
79
|
-
if (lastIndex < str.length) {
|
|
80
|
-
const after = str.slice(lastIndex);
|
|
81
|
-
nodes.push(...(enableMarkdown ? parseMarkdown(after) : [after]));
|
|
82
|
-
}
|
|
83
|
-
return nodes;
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
exports.Trans = Trans;
|
|
87
|
-
//# sourceMappingURL=Trans.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Trans.js","sources":["../../../src/components/Trans.tsx"],"sourcesContent":["import React, { JSX } from 'react';\nimport useGlobal from '@hooks/useGlobal.ts';\n\ntype TransProps = {\n text: string;\n values?: Record<string, string | number>;\n components?: Record<string | number, JSX.Element>;\n enableMarkdown?: boolean;\n pluralRules?: {\n [key: string]: string;\n };\n};\n\nexport const Trans: React.FC<TransProps> = ({\n text,\n values = {},\n components = {},\n enableMarkdown = false,\n}) => {\n const { t } = useGlobal();\n const interpolated = t(text, values);\n const content = parseWithComponents(interpolated, components, enableMarkdown);\n return <>{content}</>;\n};\n\nconst parseMarkdown = (text: string): React.ReactNode[] => {\n const boldItalicRegex = /(\\*\\*|__)(.*?)\\1|_(.*?)_|`(.*?)`/g;\n const nodes: React.ReactNode[] = [];\n let lastIndex = 0;\n let match: RegExpExecArray | null;\n\n while ((match = boldItalicRegex.exec(text)) !== null) {\n if (match.index > lastIndex) {\n nodes.push(text.slice(lastIndex, match.index));\n }\n\n const [, , boldText, italicText, codeText] = match;\n const content = boldText || italicText || codeText;\n\n if (boldText) {\n nodes.push(<strong key={match.index}>{boldText}</strong>);\n } else if (italicText) {\n nodes.push(<em key={match.index}>{italicText}</em>);\n } else if (codeText) {\n nodes.push(<code key={match.index}>{codeText}</code>);\n }\n\n lastIndex = match.index + match[0].length;\n }\n\n if (lastIndex < text.length) {\n nodes.push(text.slice(lastIndex));\n }\n\n return nodes;\n};\n\nconst parseWithComponents = (\n str: string,\n components: Record<string | number, JSX.Element>,\n enableMarkdown: boolean\n): React.ReactNode[] => {\n const nodes: React.ReactNode[] = [];\n const tagRegex = /<(\\d+)>(.*?)<\\/\\1>|<(\\w+)\\s*\\/?>/gs;\n\n let lastIndex = 0;\n let match: RegExpExecArray | null;\n\n while ((match = tagRegex.exec(str)) !== null) {\n const matchStart = match.index;\n const matchEnd = tagRegex.lastIndex;\n\n if (matchStart > lastIndex) {\n const beforeText = str.slice(lastIndex, matchStart);\n nodes.push(...(enableMarkdown ? parseMarkdown(beforeText) : [beforeText]));\n }\n\n const numberedKey = match[1];\n const numberedContent = match[2];\n const namedComponentKey = match[3];\n const key = matchStart;\n\n if (numberedKey !== undefined) {\n const component = components[numberedKey];\n const children = enableMarkdown ? parseMarkdown(numberedContent) : [numberedContent];\n\n if (React.isValidElement(component)) {\n nodes.push(React.cloneElement(component, { key }, children));\n } else {\n nodes.push(...children);\n }\n } else if (namedComponentKey !== undefined) {\n const component = components[namedComponentKey];\n\n // Oprava: vytvoř nový element, i když to není validní prvek\n if (React.isValidElement(component)) {\n nodes.push(React.cloneElement(component, { key }));\n } else if (typeof namedComponentKey === 'string') {\n nodes.push(React.createElement(namedComponentKey, { key }));\n } else {\n nodes.push('');\n }\n }\n\n lastIndex = matchEnd;\n }\n\n if (lastIndex < str.length) {\n const after = str.slice(lastIndex);\n nodes.push(...(enableMarkdown ? parseMarkdown(after) : [after]));\n }\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CAAC;;;;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var framerMotion = require('framer-motion');
|
|
5
|
-
var material = require('@mui/material');
|
|
6
|
-
|
|
7
|
-
React.forwardRef(({ children, size = 'medium', sxWrap, ...other }, ref) => (React.createElement(AnimateWrap, { size: size, sxWrap: sxWrap },
|
|
8
|
-
React.createElement(material.IconButton, { size: size, ref: ref, ...other }, children))));
|
|
9
|
-
const varSmall = {
|
|
10
|
-
hover: { scale: 1.1 },
|
|
11
|
-
tap: { scale: 0.95 },
|
|
12
|
-
};
|
|
13
|
-
const varMedium = {
|
|
14
|
-
hover: { scale: 1.09 },
|
|
15
|
-
tap: { scale: 0.97 },
|
|
16
|
-
};
|
|
17
|
-
const varLarge = {
|
|
18
|
-
hover: { scale: 1.08 },
|
|
19
|
-
tap: { scale: 0.99 },
|
|
20
|
-
};
|
|
21
|
-
function AnimateWrap({ size, children, sxWrap }) {
|
|
22
|
-
const isSmall = size === 'small';
|
|
23
|
-
const isLarge = size === 'large';
|
|
24
|
-
return (React.createElement(material.Box, { component: framerMotion.m.div, whileTap: "tap", whileHover: "hover", variants: (isSmall && varSmall) || (isLarge && varLarge) || varMedium, sx: {
|
|
25
|
-
display: 'inline-flex',
|
|
26
|
-
...sxWrap,
|
|
27
|
-
} }, children));
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=IconButtonAnimate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconButtonAnimate.js","sources":["../../../../src/components/animate/IconButtonAnimate.tsx"],"sourcesContent":["import React from 'react';\nimport { m } from 'framer-motion';\nimport { forwardRef, ReactNode } from 'react';\nimport { Box, IconButton, IconButtonProps, SxProps } from '@mui/material';\n\ninterface Props extends IconButtonProps {\n sxWrap?: SxProps;\n}\n\nconst IconButtonAnimate = forwardRef<HTMLButtonElement, Props>(\n ({ children, size = 'medium', sxWrap, ...other }, ref) => (\n <AnimateWrap size={size} sxWrap={sxWrap}>\n <IconButton size={size} ref={ref} {...other}>\n {children}\n </IconButton>\n </AnimateWrap>\n )\n);\n\nexport default IconButtonAnimate;\n\n// ----------------------------------------------------------------------\n\ntype AnimateWrapProp = {\n children: ReactNode;\n size: 'small' | 'medium' | 'large';\n sxWrap?: SxProps;\n};\n\nconst varSmall = {\n hover: { scale: 1.1 },\n tap: { scale: 0.95 },\n};\n\nconst varMedium = {\n hover: { scale: 1.09 },\n tap: { scale: 0.97 },\n};\n\nconst varLarge = {\n hover: { scale: 1.08 },\n tap: { scale: 0.99 },\n};\n\nfunction AnimateWrap({ size, children, sxWrap }: AnimateWrapProp) {\n const isSmall = size === 'small';\n const isLarge = size === 'large';\n\n return (\n <Box\n component={m.div}\n whileTap=\"tap\"\n whileHover=\"hover\"\n variants={(isSmall && varSmall) || (isLarge && varLarge) || varMedium}\n sx={{\n display: 'inline-flex',\n ...sxWrap,\n }}\n >\n {children}\n </Box>\n );\n}\n"],"names":["forwardRef","IconButton","Box","m"],"mappings":";;;;;;AAS0BA,gBAAU,CAClC,CAAC,EAAE,QAAQ,EAAE,IAAI,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACnD,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAA;AACrC,IAAA,KAAA,CAAA,aAAA,CAACC,mBAAU,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,EACxC,QAAQ,CACE,CACD,CACf;AAaH,MAAM,QAAQ,GAAG;AACf,IAAA,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;AACrB,IAAA,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;CACrB;AAED,MAAM,SAAS,GAAG;AAChB,IAAA,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;AACtB,IAAA,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;CACrB;AAED,MAAM,QAAQ,GAAG;AACf,IAAA,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;AACtB,IAAA,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;CACrB;AAED,SAAS,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAmB,EAAA;AAC9D,IAAA,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO;AAChC,IAAA,MAAM,OAAO,GAAG,IAAI,KAAK,OAAO;AAEhC,IAAA,QACE,KAAA,CAAA,aAAA,CAACC,YAAG,EAAA,EACF,SAAS,EAAEC,cAAC,CAAC,GAAG,EAChB,QAAQ,EAAC,KAAK,EACd,UAAU,EAAC,OAAO,EAClB,QAAQ,EAAE,CAAC,OAAO,IAAI,QAAQ,MAAM,OAAO,IAAI,QAAQ,CAAC,IAAI,SAAS,EACrE,EAAE,EAAE;AACF,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,GAAG,MAAM;SACV,EAAA,EAEA,QAAQ,CACL;AAEV;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var framerMotion = require('framer-motion');
|
|
7
|
-
var material = require('@mui/material');
|
|
8
|
-
var container = require('./variants/container.js');
|
|
9
|
-
|
|
10
|
-
function MotionContainer({ animate, action = false, children, ...other }) {
|
|
11
|
-
if (action) {
|
|
12
|
-
return (React.createElement(material.Box, { component: framerMotion.m.div, initial: false, animate: animate ? 'animate' : 'exit', variants: container.varContainer(), ...other }, children));
|
|
13
|
-
}
|
|
14
|
-
return (React.createElement(material.Box, { component: framerMotion.m.div, initial: "initial", animate: "animate", exit: "exit", variants: container.varContainer(), ...other }, children));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
exports.default = MotionContainer;
|
|
18
|
-
//# sourceMappingURL=MotionContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MotionContainer.js","sources":["../../../../src/components/animate/MotionContainer.tsx"],"sourcesContent":["import React from 'react';\nimport { m, MotionProps } from 'framer-motion';\nimport { Box, BoxProps } from '@mui/material';\nimport { varContainer } from './variants';\n\ntype IProps = BoxProps & MotionProps;\n\nexport interface Props extends IProps {\n animate?: boolean;\n action?: boolean;\n}\n\nexport default function MotionContainer({ animate, action = false, children, ...other }: Props) {\n if (action) {\n return (\n <Box\n component={m.div}\n initial={false}\n animate={animate ? 'animate' : 'exit'}\n variants={varContainer()}\n {...other}\n >\n {children}\n </Box>\n );\n }\n\n return (\n <Box\n component={m.div}\n initial=\"initial\"\n animate=\"animate\"\n exit=\"exit\"\n variants={varContainer()}\n {...other}\n >\n {children}\n </Box>\n );\n}\n"],"names":["Box","m","varContainer"],"mappings":";;;;;;;;;AAYc,SAAU,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAS,EAAA;IAC5F,IAAI,MAAM,EAAE;AACV,QAAA,QACE,KAAA,CAAA,aAAA,CAACA,YAAG,EAAA,EACF,SAAS,EAAEC,cAAC,CAAC,GAAG,EAChB,OAAO,EAAE,KAAK,EACd,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,EACrC,QAAQ,EAAEC,sBAAY,EAAE,KACpB,KAAK,EAAA,EAER,QAAQ,CACL;;AAIV,IAAA,QACE,KAAA,CAAA,aAAA,CAACF,YAAG,EAAA,EACF,SAAS,EAAEC,cAAC,CAAC,GAAG,EAChB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAEC,sBAAY,EAAE,EAAA,GACpB,KAAK,EAAA,EAER,QAAQ,CACL;AAEV;;;;"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var transition = require('./transition.js');
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
// ----------------------------------------------------------------------
|
|
7
|
-
const varBounce = (props) => {
|
|
8
|
-
const durationIn = props?.durationIn;
|
|
9
|
-
const durationOut = props?.durationOut;
|
|
10
|
-
const easeIn = props?.easeIn;
|
|
11
|
-
const easeOut = props?.easeOut;
|
|
12
|
-
return {
|
|
13
|
-
// IN
|
|
14
|
-
in: {
|
|
15
|
-
animate: {
|
|
16
|
-
scale: [0.3, 1.1, 0.9, 1.03, 0.97, 1],
|
|
17
|
-
opacity: [0, 1, 1, 1, 1, 1],
|
|
18
|
-
transition: transition.varTranEnter({ durationIn, easeIn }),
|
|
19
|
-
},
|
|
20
|
-
exit: { scale: [0.9, 1.1, 0.3], opacity: [1, 1, 0] },
|
|
21
|
-
},
|
|
22
|
-
inUp: {
|
|
23
|
-
animate: {
|
|
24
|
-
y: [720, -24, 12, -4, 0],
|
|
25
|
-
scaleY: [4, 0.9, 0.95, 0.985, 1],
|
|
26
|
-
opacity: [0, 1, 1, 1, 1],
|
|
27
|
-
transition: { ...transition.varTranEnter({ durationIn, easeIn }) },
|
|
28
|
-
},
|
|
29
|
-
exit: {
|
|
30
|
-
y: [12, -24, 720],
|
|
31
|
-
scaleY: [0.985, 0.9, 3],
|
|
32
|
-
opacity: [1, 1, 0],
|
|
33
|
-
transition: transition.varTranExit({ durationOut, easeOut }),
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
inDown: {
|
|
37
|
-
animate: {
|
|
38
|
-
y: [-720, 24, -12, 4, 0],
|
|
39
|
-
scaleY: [4, 0.9, 0.95, 0.985, 1],
|
|
40
|
-
opacity: [0, 1, 1, 1, 1],
|
|
41
|
-
transition: transition.varTranEnter({ durationIn, easeIn }),
|
|
42
|
-
},
|
|
43
|
-
exit: {
|
|
44
|
-
y: [-12, 24, -720],
|
|
45
|
-
scaleY: [0.985, 0.9, 3],
|
|
46
|
-
opacity: [1, 1, 0],
|
|
47
|
-
transition: transition.varTranExit({ durationOut, easeOut }),
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
inLeft: {
|
|
51
|
-
animate: {
|
|
52
|
-
x: [-720, 24, -12, 4, 0],
|
|
53
|
-
scaleX: [3, 1, 0.98, 0.995, 1],
|
|
54
|
-
opacity: [0, 1, 1, 1, 1],
|
|
55
|
-
transition: transition.varTranEnter({ durationIn, easeIn }),
|
|
56
|
-
},
|
|
57
|
-
exit: {
|
|
58
|
-
x: [0, 24, -720],
|
|
59
|
-
scaleX: [1, 0.9, 2],
|
|
60
|
-
opacity: [1, 1, 0],
|
|
61
|
-
transition: transition.varTranExit({ durationOut, easeOut }),
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
inRight: {
|
|
65
|
-
animate: {
|
|
66
|
-
x: [720, -24, 12, -4, 0],
|
|
67
|
-
scaleX: [3, 1, 0.98, 0.995, 1],
|
|
68
|
-
opacity: [0, 1, 1, 1, 1],
|
|
69
|
-
transition: transition.varTranEnter({ durationIn, easeIn }),
|
|
70
|
-
},
|
|
71
|
-
exit: {
|
|
72
|
-
x: [0, -24, 720],
|
|
73
|
-
scaleX: [1, 0.9, 2],
|
|
74
|
-
opacity: [1, 1, 0],
|
|
75
|
-
transition: transition.varTranExit({ durationOut, easeOut }),
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
// OUT
|
|
79
|
-
out: {
|
|
80
|
-
animate: { scale: [0.9, 1.1, 0.3], opacity: [1, 1, 0] },
|
|
81
|
-
},
|
|
82
|
-
outUp: {
|
|
83
|
-
animate: { y: [-12, 24, -720], scaleY: [0.985, 0.9, 3], opacity: [1, 1, 0] },
|
|
84
|
-
},
|
|
85
|
-
outDown: {
|
|
86
|
-
animate: { y: [12, -24, 720], scaleY: [0.985, 0.9, 3], opacity: [1, 1, 0] },
|
|
87
|
-
},
|
|
88
|
-
outLeft: {
|
|
89
|
-
animate: { x: [0, 24, -720], scaleX: [1, 0.9, 2], opacity: [1, 1, 0] },
|
|
90
|
-
},
|
|
91
|
-
outRight: {
|
|
92
|
-
animate: { x: [0, -24, 720], scaleX: [1, 0.9, 2], opacity: [1, 1, 0] },
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
exports.varBounce = varBounce;
|
|
98
|
-
//# sourceMappingURL=bounce.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bounce.js","sources":["../../../../../src/components/animate/variants/bounce.ts"],"sourcesContent":["// @types\nimport { VariantsType } from '@utils/types/animate';\n//\nimport { varTranEnter, varTranExit } from './transition';\n\n// ----------------------------------------------------------------------\n\nexport const varBounce = (props?: VariantsType) => {\n const durationIn = props?.durationIn;\n const durationOut = props?.durationOut;\n const easeIn = props?.easeIn;\n const easeOut = props?.easeOut;\n\n return {\n // IN\n in: {\n animate: {\n scale: [0.3, 1.1, 0.9, 1.03, 0.97, 1],\n opacity: [0, 1, 1, 1, 1, 1],\n transition: varTranEnter({ durationIn, easeIn }),\n },\n exit: { scale: [0.9, 1.1, 0.3], opacity: [1, 1, 0] },\n },\n inUp: {\n animate: {\n y: [720, -24, 12, -4, 0],\n scaleY: [4, 0.9, 0.95, 0.985, 1],\n opacity: [0, 1, 1, 1, 1],\n transition: { ...varTranEnter({ durationIn, easeIn }) },\n },\n exit: {\n y: [12, -24, 720],\n scaleY: [0.985, 0.9, 3],\n opacity: [1, 1, 0],\n transition: varTranExit({ durationOut, easeOut }),\n },\n },\n inDown: {\n animate: {\n y: [-720, 24, -12, 4, 0],\n scaleY: [4, 0.9, 0.95, 0.985, 1],\n opacity: [0, 1, 1, 1, 1],\n transition: varTranEnter({ durationIn, easeIn }),\n },\n exit: {\n y: [-12, 24, -720],\n scaleY: [0.985, 0.9, 3],\n opacity: [1, 1, 0],\n transition: varTranExit({ durationOut, easeOut }),\n },\n },\n inLeft: {\n animate: {\n x: [-720, 24, -12, 4, 0],\n scaleX: [3, 1, 0.98, 0.995, 1],\n opacity: [0, 1, 1, 1, 1],\n transition: varTranEnter({ durationIn, easeIn }),\n },\n exit: {\n x: [0, 24, -720],\n scaleX: [1, 0.9, 2],\n opacity: [1, 1, 0],\n transition: varTranExit({ durationOut, easeOut }),\n },\n },\n inRight: {\n animate: {\n x: [720, -24, 12, -4, 0],\n scaleX: [3, 1, 0.98, 0.995, 1],\n opacity: [0, 1, 1, 1, 1],\n transition: varTranEnter({ durationIn, easeIn }),\n },\n exit: {\n x: [0, -24, 720],\n scaleX: [1, 0.9, 2],\n opacity: [1, 1, 0],\n transition: varTranExit({ durationOut, easeOut }),\n },\n },\n\n // OUT\n out: {\n animate: { scale: [0.9, 1.1, 0.3], opacity: [1, 1, 0] },\n },\n outUp: {\n animate: { y: [-12, 24, -720], scaleY: [0.985, 0.9, 3], opacity: [1, 1, 0] },\n },\n outDown: {\n animate: { y: [12, -24, 720], scaleY: [0.985, 0.9, 3], opacity: [1, 1, 0] },\n },\n outLeft: {\n animate: { x: [0, 24, -720], scaleX: [1, 0.9, 2], opacity: [1, 1, 0] },\n },\n outRight: {\n animate: { x: [0, -24, 720], scaleX: [1, 0.9, 2], opacity: [1, 1, 0] },\n },\n };\n};\n"],"names":["varTranEnter","varTranExit"],"mappings":";;;;AAEA;AAGA;AAEO,MAAM,SAAS,GAAG,CAAC,KAAoB,KAAI;AAChD,IAAA,MAAM,UAAU,GAAG,KAAK,EAAE,UAAU;AACpC,IAAA,MAAM,WAAW,GAAG,KAAK,EAAE,WAAW;AACtC,IAAA,MAAM,MAAM,GAAG,KAAK,EAAE,MAAM;AAC5B,IAAA,MAAM,OAAO,GAAG,KAAK,EAAE,OAAO;IAE9B,OAAO;;AAEL,QAAA,EAAE,EAAE;AACF,YAAA,OAAO,EAAE;AACP,gBAAA,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;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E,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;AAC5E,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;AACvE,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;AACvE,SAAA;KACF;AACH;;;;"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// ----------------------------------------------------------------------
|
|
4
|
-
const varContainer = (props) => {
|
|
5
|
-
const staggerIn = props?.staggerIn || 0.05;
|
|
6
|
-
const delayIn = props?.staggerIn || 0.05;
|
|
7
|
-
const staggerOut = props?.staggerIn || 0.05;
|
|
8
|
-
return {
|
|
9
|
-
animate: {
|
|
10
|
-
transition: {
|
|
11
|
-
staggerChildren: staggerIn,
|
|
12
|
-
delayChildren: delayIn,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
exit: {
|
|
16
|
-
transition: {
|
|
17
|
-
staggerChildren: staggerOut,
|
|
18
|
-
staggerDirection: -1,
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.varContainer = varContainer;
|
|
25
|
-
//# sourceMappingURL=container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sources":["../../../../../src/components/animate/variants/container.ts"],"sourcesContent":["// ----------------------------------------------------------------------\n\nexport type Props = {\n staggerIn?: number;\n delayIn?: number;\n staggerOut?: number;\n};\n\nexport const varContainer = (props?: Props) => {\n const staggerIn = props?.staggerIn || 0.05;\n const delayIn = props?.staggerIn || 0.05;\n const staggerOut = props?.staggerIn || 0.05;\n\n return {\n animate: {\n transition: {\n staggerChildren: staggerIn,\n delayChildren: delayIn,\n },\n },\n exit: {\n transition: {\n staggerChildren: staggerOut,\n staggerDirection: -1,\n },\n },\n };\n};\n"],"names":[],"mappings":";;AAAA;AAQO,MAAM,YAAY,GAAG,CAAC,KAAa,KAAI;AAC5C,IAAA,MAAM,SAAS,GAAG,KAAK,EAAE,SAAS,IAAI,IAAI;AAC1C,IAAA,MAAM,OAAO,GAAG,KAAK,EAAE,SAAS,IAAI,IAAI;AACxC,IAAA,MAAM,UAAU,GAAG,KAAK,EAAE,SAAS,IAAI,IAAI;IAE3C,OAAO;AACL,QAAA,OAAO,EAAE;AACP,YAAA,UAAU,EAAE;AACV,gBAAA,eAAe,EAAE,SAAS;AAC1B,gBAAA,aAAa,EAAE,OAAO;AACvB,aAAA;AACF,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,UAAU,EAAE;AACV,gBAAA,eAAe,EAAE,UAAU;gBAC3B,gBAAgB,EAAE,EAAE;AACrB,aAAA;AACF,SAAA;KACF;AACH;;;;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// ----------------------------------------------------------------------
|
|
4
|
-
const varTranEnter = (props) => {
|
|
5
|
-
const duration = props?.durationIn || 0.64;
|
|
6
|
-
const ease = props?.easeIn || [0.43, 0.13, 0.23, 0.96];
|
|
7
|
-
return { duration, ease };
|
|
8
|
-
};
|
|
9
|
-
const varTranExit = (props) => {
|
|
10
|
-
const duration = props?.durationOut || 0.48;
|
|
11
|
-
const ease = props?.easeOut || [0.43, 0.13, 0.23, 0.96];
|
|
12
|
-
return { duration, ease };
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
exports.varTranEnter = varTranEnter;
|
|
16
|
-
exports.varTranExit = varTranExit;
|
|
17
|
-
//# sourceMappingURL=transition.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transition.js","sources":["../../../../../src/components/animate/variants/transition.ts"],"sourcesContent":["// @types\nimport { TranHoverType, TranEnterType, TranExitType } from '@utils/types/animate';\n\n// ----------------------------------------------------------------------\n\nexport const varTranHover = (props?: TranHoverType) => {\n const duration = props?.duration || 0.32;\n const ease = props?.ease || [0.43, 0.13, 0.23, 0.96];\n\n return { duration, ease };\n};\n\nexport const varTranEnter = (props?: TranEnterType) => {\n const duration = props?.durationIn || 0.64;\n const ease = props?.easeIn || [0.43, 0.13, 0.23, 0.96];\n\n return { duration, ease };\n};\n\nexport const varTranExit = (props?: TranExitType) => {\n const duration = props?.durationOut || 0.48;\n const ease = props?.easeOut || [0.43, 0.13, 0.23, 0.96];\n\n return { duration, ease };\n};\n"],"names":[],"mappings":";;AAGA;AASO,MAAM,YAAY,GAAG,CAAC,KAAqB,KAAI;AACpD,IAAA,MAAM,QAAQ,GAAG,KAAK,EAAE,UAAU,IAAI,IAAI;AAC1C,IAAA,MAAM,IAAI,GAAG,KAAK,EAAE,MAAM,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAEtD,IAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;AAC3B;AAEO,MAAM,WAAW,GAAG,CAAC,KAAoB,KAAI;AAClD,IAAA,MAAM,QAAQ,GAAG,KAAK,EAAE,WAAW,IAAI,IAAI;AAC3C,IAAA,MAAM,IAAI,GAAG,KAAK,EAAE,OAAO,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAEvD,IAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;AAC3B;;;;;"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var material = require('@mui/material');
|
|
7
|
-
var useGlobal = require('../../hooks/useGlobal.js');
|
|
8
|
-
|
|
9
|
-
// ----------------------------------------------------------------------
|
|
10
|
-
function ConfirmDialog({ title, content, action, open, onClose, ...other }) {
|
|
11
|
-
const { t } = useGlobal.default();
|
|
12
|
-
return (React.createElement(material.Dialog, { fullWidth: true, maxWidth: "xs", open: open, onClose: onClose, ...other },
|
|
13
|
-
React.createElement(material.DialogTitle, { sx: { pb: 2 } }, title),
|
|
14
|
-
content && React.createElement(material.DialogContent, { sx: { typography: 'body2' } },
|
|
15
|
-
" ",
|
|
16
|
-
content,
|
|
17
|
-
" "),
|
|
18
|
-
React.createElement(material.DialogActions, null,
|
|
19
|
-
React.createElement(material.Button, { variant: "outlined", color: "inherit", onClick: onClose }, t('cancel')),
|
|
20
|
-
action)));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
exports.default = ConfirmDialog;
|
|
24
|
-
//# sourceMappingURL=ConfirmDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.js","sources":["../../../../src/components/confirm-dialog/ConfirmDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { Dialog, Button, DialogTitle, DialogActions, DialogContent } from '@mui/material';\nimport { ConfirmDialogProps } from './types';\nimport useGlobal from '@hooks/useGlobal.ts';\n\n// ----------------------------------------------------------------------\n\nexport default function ConfirmDialog({\n title,\n content,\n action,\n open,\n onClose,\n ...other\n}: ConfirmDialogProps) {\n const { t } = useGlobal();\n return (\n <Dialog fullWidth maxWidth=\"xs\" open={open} onClose={onClose} {...other}>\n <DialogTitle sx={{ pb: 2 }}>{title}</DialogTitle>\n\n {content && <DialogContent sx={{ typography: 'body2' }}> {content} </DialogContent>}\n\n <DialogActions>\n <Button variant=\"outlined\" color=\"inherit\" onClick={onClose}>\n {t('cancel')}\n </Button>\n\n {action}\n </DialogActions>\n </Dialog>\n );\n}\n"],"names":["useGlobal","Dialog","DialogTitle","DialogContent","DialogActions","Button"],"mappings":";;;;;;;;AAKA;AAEc,SAAU,aAAa,CAAC,EACpC,KAAK,EACL,OAAO,EACP,MAAM,EACN,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACW,EAAA;AACnB,IAAA,MAAM,EAAE,CAAC,EAAE,GAAGA,iBAAS,EAAE;AACzB,IAAA,QACE,KAAA,CAAA,aAAA,CAACC,eAAM,IAAC,SAAS,EAAA,IAAA,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,KAAM,KAAK,EAAA;QACrE,KAAA,CAAA,aAAA,CAACC,oBAAW,EAAA,EAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAA,EAAG,KAAK,CAAe;QAEhD,OAAO,IAAI,KAAA,CAAA,aAAA,CAACC,sBAAa,EAAA,EAAC,EAAE,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAA;;YAAI,OAAO;AAAkB,YAAA,GAAA,CAAA;AAEnF,QAAA,KAAA,CAAA,aAAA,CAACC,sBAAa,EAAA,IAAA;AACZ,YAAA,KAAA,CAAA,aAAA,CAACC,eAAM,EAAA,EAAC,OAAO,EAAC,UAAU,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,EAAA,EACxD,CAAC,CAAC,QAAQ,CAAC,CACL;YAER,MAAM,CACO,CACT;AAEb;;;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var reactHookForm = require('react-hook-form');
|
|
7
|
-
|
|
8
|
-
function FormProvider({ children, onSubmit, methods }) {
|
|
9
|
-
return (React.createElement(reactHookForm.FormProvider, { ...methods },
|
|
10
|
-
React.createElement("form", { onSubmit: onSubmit }, children)));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
exports.default = FormProvider;
|
|
14
|
-
//# sourceMappingURL=FormProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormProvider.js","sources":["../../../../src/components/hook-form/FormProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { FormProvider as Form, UseFormReturn } from 'react-hook-form';\n\n// ----------------------------------------------------------------------\n\ntype Props = {\n children: React.ReactNode;\n methods: UseFormReturn<any>;\n onSubmit?: VoidFunction;\n};\n\nexport default function FormProvider({ children, onSubmit, methods }: Props) {\n return (\n <Form {...methods}>\n <form onSubmit={onSubmit}>{children}</form>\n </Form>\n );\n}\n"],"names":["Form"],"mappings":";;;;;;;AAWc,SAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAS,EAAA;AACzE,IAAA,QACE,KAAA,CAAA,aAAA,CAACA,0BAAI,EAAA,EAAA,GAAK,OAAO,EAAA;QACf,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,EAAM,QAAQ,EAAE,QAAQ,EAAA,EAAG,QAAQ,CAAQ,CACtC;AAEX;;;;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var reactHookForm = require('react-hook-form');
|
|
5
|
-
var material = require('@mui/material');
|
|
6
|
-
|
|
7
|
-
function RHFCheckbox({ name, helperText, ...other }) {
|
|
8
|
-
const { control } = reactHookForm.useFormContext();
|
|
9
|
-
return (React.createElement(reactHookForm.Controller, { name: name, control: control, render: ({ field, fieldState: { error } }) => (React.createElement("div", null,
|
|
10
|
-
React.createElement(material.FormControlLabel, { control: React.createElement(material.Checkbox, { ...field, checked: field.value }), ...other }),
|
|
11
|
-
(!!error || helperText) && (React.createElement(material.FormHelperText, { error: !!error, sx: { mt: 0 } }, error ? error?.message : helperText)))) }));
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
exports.RHFCheckbox = RHFCheckbox;
|
|
15
|
-
//# sourceMappingURL=RHFCheckbox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RHFCheckbox.js","sources":["../../../../src/components/hook-form/RHFCheckbox.tsx"],"sourcesContent":["import React from 'react';\nimport { useFormContext, Controller } from 'react-hook-form';\n// @mui\nimport {\n Checkbox,\n FormLabel,\n FormGroup,\n FormControl,\n FormHelperText,\n FormControlLabel,\n FormControlLabelProps,\n} from '@mui/material';\n\n// ----------------------------------------------------------------------\n\ninterface RHFCheckboxProps extends Omit<FormControlLabelProps, 'control'> {\n name: string;\n helperText?: React.ReactNode;\n}\n\nexport function RHFCheckbox({ name, helperText, ...other }: RHFCheckboxProps) {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <div>\n <FormControlLabel control={<Checkbox {...field} checked={field.value} />} {...other} />\n\n {(!!error || helperText) && (\n <FormHelperText error={!!error} sx={{ mt: 0 }}>\n {error ? error?.message : helperText}\n </FormHelperText>\n )}\n </div>\n )}\n />\n );\n}\n\n// ----------------------------------------------------------------------\n\ninterface RHFMultiCheckboxProps extends Omit<FormControlLabelProps, 'control' | 'label'> {\n name: string;\n options: { label: string; value: any }[];\n row?: boolean;\n label?: string;\n spacing?: number;\n helperText?: React.ReactNode;\n}\n\nexport function RHFMultiCheckbox({\n row,\n name,\n label,\n options,\n spacing,\n helperText,\n ...other\n}: RHFMultiCheckboxProps) {\n const { control } = useFormContext();\n\n const getSelected = (selectedItems: string[], item: string) =>\n selectedItems.includes(item)\n ? selectedItems.filter((value) => value !== item)\n : [...selectedItems, item];\n\n return (\n <Controller\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormControl component=\"fieldset\">\n {label && (\n <FormLabel component=\"legend\" sx={{ typography: 'body2' }}>\n {label}\n </FormLabel>\n )}\n\n <FormGroup\n sx={{\n ...(row && {\n flexDirection: 'row',\n }),\n '& .MuiFormControlLabel-root': {\n '&:not(:last-of-type)': {\n mb: spacing || 0,\n },\n ...(row && {\n mr: 0,\n '&:not(:last-of-type)': {\n mr: spacing || 2,\n },\n }),\n },\n }}\n >\n {options.map((option) => (\n <FormControlLabel\n key={option.value}\n control={\n <Checkbox\n checked={field.value.includes(option.value)}\n onChange={() => field.onChange(getSelected(field.value, option.value))}\n />\n }\n label={option.label}\n {...other}\n />\n ))}\n </FormGroup>\n\n {(!!error || helperText) && (\n <FormHelperText error={!!error} sx={{ mx: 0 }}>\n {error ? error?.message : helperText}\n </FormHelperText>\n )}\n </FormControl>\n )}\n />\n );\n}\n"],"names":["useFormContext","Controller","FormControlLabel","Checkbox","FormHelperText"],"mappings":";;;;;;AAoBM,SAAU,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,KAAK,EAAoB,EAAA;AAC1E,IAAA,MAAM,EAAE,OAAO,EAAE,GAAGA,4BAAc,EAAE;IAEpC,QACE,KAAA,CAAA,aAAA,CAACC,wBAAU,EAAA,EACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,MACvC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;AACE,YAAA,KAAA,CAAA,aAAA,CAACC,yBAAgB,EAAA,EAAC,OAAO,EAAE,KAAA,CAAA,aAAA,CAACC,iBAAQ,EAAA,EAAA,GAAK,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,EAAA,CAAI,EAAA,GAAM,KAAK,EAAA,CAAI;AAEtF,YAAA,CAAC,CAAC,CAAC,KAAK,IAAI,UAAU,MACrB,KAAA,CAAA,aAAA,CAACC,uBAAc,EAAA,EAAC,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAA,EAC1C,KAAK,GAAG,KAAK,EAAE,OAAO,GAAG,UAAU,CACrB,CAClB,CACG,CACP,EAAA,CACD;AAEN;;;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var reactHookForm = require('react-hook-form');
|
|
7
|
-
var xDatePickers = require('@mui/x-date-pickers');
|
|
8
|
-
|
|
9
|
-
function RHFDatePicker({ name, label, ...others }) {
|
|
10
|
-
const { control } = reactHookForm.useFormContext();
|
|
11
|
-
return (React.createElement(reactHookForm.Controller, { name: name, control: control, render: ({ field, fieldState: { error } }) => (React.createElement(xDatePickers.DatePicker, { ...field, label: label, format: "DD.MM.YYYY", slotProps: {
|
|
12
|
-
textField: {
|
|
13
|
-
error: !!error,
|
|
14
|
-
helperText: error?.message,
|
|
15
|
-
},
|
|
16
|
-
}, sx: {
|
|
17
|
-
width: '100%',
|
|
18
|
-
}, ...others })) }));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.default = RHFDatePicker;
|
|
22
|
-
//# sourceMappingURL=RHFDatePicker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RHFDatePicker.js","sources":["../../../../src/components/hook-form/RHFDatePicker.tsx"],"sourcesContent":["import React from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { DatePicker, DatePickerProps } from '@mui/x-date-pickers';\nimport { Dayjs } from 'dayjs';\n\ntype Props = DatePickerProps<Dayjs> & {\n name: string;\n label: string;\n};\n\nexport default function RHFDatePicker({ name, label, ...others }: Props) {\n const { control } = useFormContext();\n\n return (\n <Controller\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <DatePicker\n {...field}\n label={label}\n format=\"DD.MM.YYYY\"\n slotProps={{\n textField: {\n error: !!error,\n helperText: error?.message,\n },\n }}\n sx={{\n width: '100%',\n }}\n {...others}\n />\n )}\n />\n );\n}\n"],"names":["useFormContext","Controller","DatePicker"],"mappings":";;;;;;;;AAUc,SAAU,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,EAAS,EAAA;AACrE,IAAA,MAAM,EAAE,OAAO,EAAE,GAAGA,4BAAc,EAAE;AAEpC,IAAA,QACE,KAAA,CAAA,aAAA,CAACC,wBAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,MACvC,KAAA,CAAA,aAAA,CAACC,uBAAU,EAAA,EAAA,GACL,KAAK,EACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAC,YAAY,EACnB,SAAS,EAAE;AACT,gBAAA,SAAS,EAAE;oBACT,KAAK,EAAE,CAAC,CAAC,KAAK;oBACd,UAAU,EAAE,KAAK,EAAE,OAAO;AAC3B,iBAAA;AACF,aAAA,EACD,EAAE,EAAE;AACF,gBAAA,KAAK,EAAE,MAAM;AACd,aAAA,EAAA,GACG,MAAM,EAAA,CACV,CACH,EAAA,CACD;AAEN;;;;"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var reactHookForm = require('react-hook-form');
|
|
7
|
-
var useGlobal = require('../../hooks/useGlobal.js');
|
|
8
|
-
|
|
9
|
-
function RHFPhone({ name, defaultCountry, helperText, ...other }) {
|
|
10
|
-
const { control } = reactHookForm.useFormContext();
|
|
11
|
-
const { lang } = useGlobal.default();
|
|
12
|
-
const [MuiTelInput, setMuiTelInput] = React.useState(null);
|
|
13
|
-
React.useEffect(() => {
|
|
14
|
-
import('mui-tel-input').then((mod) => {
|
|
15
|
-
setMuiTelInput(() => mod.MuiTelInput);
|
|
16
|
-
});
|
|
17
|
-
}, []);
|
|
18
|
-
if (!MuiTelInput)
|
|
19
|
-
return null;
|
|
20
|
-
return (React.createElement(reactHookForm.Controller, { name: name, control: control, render: ({ field, fieldState: { error } }) => (React.createElement(MuiTelInput, { ...field, fullWidth: true, value: field.value, error: !!error, helperText: error ? error?.message : helperText, langOfCountryName: lang, lang: lang, defaultCountry: defaultCountry || 'CZ', continents: ['EU'], ...other })) }));
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
exports.default = RHFPhone;
|
|
24
|
-
//# sourceMappingURL=RHFPhone.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RHFPhone.js","sources":["../../../../src/components/hook-form/RHFPhone.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport useGlobal from '@hooks/useGlobal.ts';\nimport { MuiTelInputProps } from 'mui-tel-input';\n\ntype Props = MuiTelInputProps & {\n name: string;\n defaultCountry?: string;\n};\n\nexport default function RHFPhone({ name, defaultCountry, helperText, ...other }: Props) {\n const { control } = useFormContext();\n const { lang } = useGlobal();\n\n const [MuiTelInput, setMuiTelInput] = useState<React.ComponentType<MuiTelInputProps> | null>(\n null\n );\n\n useEffect(() => {\n import('mui-tel-input').then((mod) => {\n setMuiTelInput(() => mod.MuiTelInput);\n });\n }, []);\n\n if (!MuiTelInput) return null;\n\n return (\n <Controller\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <MuiTelInput\n {...field}\n fullWidth\n value={field.value}\n error={!!error}\n helperText={error ? error?.message : helperText}\n langOfCountryName={lang}\n lang={lang}\n defaultCountry={defaultCountry || 'CZ'}\n continents={['EU']}\n {...other}\n />\n )}\n />\n );\n}\n"],"names":["useFormContext","useGlobal","useState","useEffect","Controller"],"mappings":";;;;;;;;AAUc,SAAU,QAAQ,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,KAAK,EAAS,EAAA;AACpF,IAAA,MAAM,EAAE,OAAO,EAAE,GAAGA,4BAAc,EAAE;AACpC,IAAA,MAAM,EAAE,IAAI,EAAE,GAAGC,iBAAS,EAAE;IAE5B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAGC,cAAQ,CAC5C,IAAI,CACL;IAEDC,eAAS,CAAC,MAAK;QACb,OAAO,eAAe,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAI;YACnC,cAAc,CAAC,MAAM,GAAG,CAAC,WAAW,CAAC;AACvC,SAAC,CAAC;KACH,EAAE,EAAE,CAAC;AAEN,IAAA,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,IAAI;AAE7B,IAAA,QACE,KAAA,CAAA,aAAA,CAACC,wBAAU,IACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,MACvC,oBAAC,WAAW,EAAA,EAAA,GACN,KAAK,EACT,SAAS,QACT,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,UAAU,EAAE,KAAK,GAAG,KAAK,EAAE,OAAO,GAAG,UAAU,EAC/C,iBAAiB,EAAE,IAAI,EACvB,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,cAAc,IAAI,IAAI,EACtC,UAAU,EAAE,CAAC,IAAI,CAAC,EAAA,GACd,KAAK,GACT,CACH,EAAA,CACD;AAEN;;;;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var reactHookForm = require('react-hook-form');
|
|
7
|
-
var material = require('@mui/material');
|
|
8
|
-
|
|
9
|
-
function RHFRadioGroup({ row, name, label, options, spacing, helperText, ...other }) {
|
|
10
|
-
const { control } = reactHookForm.useFormContext();
|
|
11
|
-
const labelledby = label ? `${name}-${label}` : '';
|
|
12
|
-
return (React.createElement(reactHookForm.Controller, { name: name, control: control, render: ({ field, fieldState: { error } }) => (React.createElement(material.FormControl, { component: "fieldset" },
|
|
13
|
-
label && (React.createElement(material.FormLabel, { component: "legend", id: labelledby, sx: { typography: 'body2' } }, label)),
|
|
14
|
-
React.createElement(material.RadioGroup, { ...field, "aria-labelledby": labelledby, row: row, ...other }, options.map((option) => (React.createElement(material.FormControlLabel, { key: option.value, value: option.value, control: React.createElement(material.Radio, null), label: option.label, sx: {
|
|
15
|
-
'&:not(:last-of-type)': {
|
|
16
|
-
mb: spacing || 0,
|
|
17
|
-
},
|
|
18
|
-
...(row && {
|
|
19
|
-
mr: 0,
|
|
20
|
-
'&:not(:last-of-type)': {
|
|
21
|
-
mr: spacing || 2,
|
|
22
|
-
},
|
|
23
|
-
}),
|
|
24
|
-
} })))),
|
|
25
|
-
(!!error || helperText) && (React.createElement(material.FormHelperText, { error: !!error, sx: { mx: 0 } }, error ? error?.message : helperText)))) }));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
exports.default = RHFRadioGroup;
|
|
29
|
-
//# sourceMappingURL=RHFRadioGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RHFRadioGroup.js","sources":["../../../../src/components/hook-form/RHFRadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport { useFormContext, Controller } from 'react-hook-form';\nimport {\n Radio,\n FormLabel,\n RadioGroup,\n FormControl,\n FormHelperText,\n RadioGroupProps,\n FormControlLabel,\n} from '@mui/material';\n\n// ----------------------------------------------------------------------\n\ntype Props = RadioGroupProps & {\n name: string;\n options: { label: React.ReactNode; value: any }[];\n label?: string;\n spacing?: number;\n helperText?: React.ReactNode;\n};\n\nexport default function RHFRadioGroup({\n row,\n name,\n label,\n options,\n spacing,\n helperText,\n ...other\n}: Props) {\n const { control } = useFormContext();\n\n const labelledby = label ? `${name}-${label}` : '';\n\n return (\n <Controller\n name={name}\n control={control}\n render={({ field, fieldState: { error } }) => (\n <FormControl component=\"fieldset\">\n {label && (\n <FormLabel component=\"legend\" id={labelledby} sx={{ typography: 'body2' }}>\n {label}\n </FormLabel>\n )}\n\n <RadioGroup {...field} aria-labelledby={labelledby} row={row} {...other}>\n {options.map((option) => (\n <FormControlLabel\n key={option.value}\n value={option.value}\n control={<Radio />}\n label={option.label}\n sx={{\n '&:not(:last-of-type)': {\n mb: spacing || 0,\n },\n ...(row && {\n mr: 0,\n '&:not(:last-of-type)': {\n mr: spacing || 2,\n },\n }),\n }}\n />\n ))}\n </RadioGroup>\n\n {(!!error || helperText) && (\n <FormHelperText error={!!error} sx={{ mx: 0 }}>\n {error ? error?.message : helperText}\n </FormHelperText>\n )}\n </FormControl>\n )}\n />\n );\n}\n"],"names":["useFormContext","Controller","FormControl","FormLabel","RadioGroup","FormControlLabel","Radio","FormHelperText"],"mappings":";;;;;;;;AAsBc,SAAU,aAAa,CAAC,EACpC,GAAG,EACH,IAAI,EACJ,KAAK,EACL,OAAO,EACP,OAAO,EACP,UAAU,EACV,GAAG,KAAK,EACF,EAAA;AACN,IAAA,MAAM,EAAE,OAAO,EAAE,GAAGA,4BAAc,EAAE;AAEpC,IAAA,MAAM,UAAU,GAAG,KAAK,GAAG,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,GAAG,EAAE;AAElD,IAAA,QACE,KAAA,CAAA,aAAA,CAACC,wBAAU,EAAA,EACT,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,KAAK,EAAE,EAAE,MACvC,KAAA,CAAA,aAAA,CAACC,oBAAW,EAAA,EAAC,SAAS,EAAC,UAAU,EAAA;YAC9B,KA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