@unchainedshop/admin-ui 4.8.32 → 4.8.33
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/chunk-3L6EZQ6P.js +135 -0
- package/dist/chunk-54DKBWXV.js +33 -0
- package/dist/chunk-5WPFHQZN.js +388 -0
- package/dist/chunk-6UGLNLJG.js +44 -0
- package/dist/chunk-BMDNY67T.js +22547 -0
- package/dist/chunk-BOMSMJF2.js +77 -0
- package/dist/chunk-COV7BREX.js +50 -0
- package/dist/chunk-E77YIMGR.js +2083 -0
- package/dist/chunk-EJDZRZSZ.js +59 -0
- package/dist/chunk-ELPURWDC.js +75 -0
- package/dist/chunk-F6LBNV3H.js +9 -0
- package/dist/chunk-FDHXLNZQ.js +44 -0
- package/dist/chunk-GY2DRQGW.js +166 -0
- package/dist/chunk-HERLM47Z.js +309 -0
- package/dist/chunk-HJKRGBDG.js +694 -0
- package/dist/chunk-I64TXIE7.js +618 -0
- package/dist/chunk-IAQPLRXZ.js +16 -0
- package/dist/chunk-ICJH36K4.js +326 -0
- package/dist/chunk-ILYPJE4N.js +57 -0
- package/dist/chunk-IWKDBADX.js +73 -0
- package/dist/chunk-IXBMHOB5.js +13 -0
- package/dist/chunk-IYKPRAWC.js +26 -0
- package/dist/chunk-J23QSWDL.js +8 -0
- package/dist/chunk-KH5MK6ZW.js +18 -0
- package/dist/chunk-KRIRF7F6.js +76 -0
- package/dist/chunk-NT7RB7AK.js +70 -0
- package/dist/chunk-OKGJ6HDE.js +26 -0
- package/dist/chunk-OTXM2UCD.js +19 -0
- package/dist/chunk-PJLYVMUM.js +3308 -0
- package/dist/chunk-PUI5BIKO.js +41 -0
- package/dist/chunk-Q6S3LBUF.js +180 -0
- package/dist/chunk-QHR23GVH.js +1099 -0
- package/dist/chunk-QWQ3WJJN.js +1 -0
- package/dist/chunk-RAQV2GYF.js +70 -0
- package/dist/chunk-VBO377AY.js +14 -0
- package/dist/chunk-VYEXPG3M.js +107 -0
- package/dist/chunk-WPLOTFGW.js +36 -0
- package/dist/chunk-YO6PT7KD.js +13 -0
- package/dist/chunk-ZUOVKRKC.js +957 -0
- package/dist/components/ui/Accordion/Accordion.d.ts +11 -0
- package/dist/components/ui/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/ui/Accordion/AccordionHeader.d.ts +6 -0
- package/dist/components/ui/Accordion/AccordionHeader.d.ts.map +1 -0
- package/dist/components/ui/Accordion/AccordionItem.d.ts +11 -0
- package/dist/components/ui/Accordion/AccordionItem.d.ts.map +1 -0
- package/dist/components/ui/ActiveInActive.d.ts +10 -0
- package/dist/components/ui/ActiveInActive.d.ts.map +1 -0
- package/dist/components/ui/AnimatedCounter.d.ts +7 -0
- package/dist/components/ui/AnimatedCounter.d.ts.map +1 -0
- package/dist/components/ui/Badge.d.ts +10 -0
- package/dist/components/ui/Badge.d.ts.map +1 -0
- package/dist/components/ui/BreadCrumbs.d.ts +7 -0
- package/dist/components/ui/BreadCrumbs.d.ts.map +1 -0
- package/dist/components/ui/Button.d.ts +36 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/CopyableText.d.ts +5 -0
- package/dist/components/ui/CopyableText.d.ts.map +1 -0
- package/dist/components/ui/DateInput.d.ts +15 -0
- package/dist/components/ui/DateInput.d.ts.map +1 -0
- package/dist/components/ui/DateRangeFilterInput.d.ts +4 -0
- package/dist/components/ui/DateRangeFilterInput.d.ts.map +1 -0
- package/dist/components/ui/DetailHeader.d.ts +6 -0
- package/dist/components/ui/DetailHeader.d.ts.map +1 -0
- package/dist/components/ui/DraggableIcon.d.ts +3 -0
- package/dist/components/ui/DraggableIcon.d.ts.map +1 -0
- package/dist/components/ui/ErrorBoundary.d.ts +18 -0
- package/dist/components/ui/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/ui/ErrorFallback.d.ts +6 -0
- package/dist/components/ui/ErrorFallback.d.ts.map +1 -0
- package/dist/components/ui/HelpText.d.ts +11 -0
- package/dist/components/ui/HelpText.d.ts.map +1 -0
- package/dist/components/ui/ImageWithFallback.d.ts +7 -0
- package/dist/components/ui/ImageWithFallback.d.ts.map +1 -0
- package/dist/components/ui/InfoTextBanner.d.ts +6 -0
- package/dist/components/ui/InfoTextBanner.d.ts.map +1 -0
- package/dist/components/ui/JSONView.d.ts +6 -0
- package/dist/components/ui/JSONView.d.ts.map +1 -0
- package/dist/components/ui/ListHeader.d.ts +6 -0
- package/dist/components/ui/ListHeader.d.ts.map +1 -0
- package/dist/components/ui/Loading.d.ts +10 -0
- package/dist/components/ui/Loading.d.ts.map +1 -0
- package/dist/components/ui/NoData.d.ts +7 -0
- package/dist/components/ui/NoData.d.ts.map +1 -0
- package/dist/components/ui/NoImage.d.ts +7 -0
- package/dist/components/ui/NoImage.d.ts.map +1 -0
- package/dist/components/ui/NoImageSvg.d.ts +8 -0
- package/dist/components/ui/NoImageSvg.d.ts.map +1 -0
- package/dist/components/ui/PageHeader.d.ts +11 -0
- package/dist/components/ui/PageHeader.d.ts.map +1 -0
- package/dist/components/ui/Pagination.d.ts +8 -0
- package/dist/components/ui/Pagination.d.ts.map +1 -0
- package/dist/components/ui/Portal/Portal.d.ts +16 -0
- package/dist/components/ui/Portal/Portal.d.ts.map +1 -0
- package/dist/components/ui/Portal/Portal.types.d.ts +16 -0
- package/dist/components/ui/Portal/Portal.types.d.ts.map +1 -0
- package/dist/components/ui/SaveAndCancelButtons.d.ts +10 -0
- package/dist/components/ui/SaveAndCancelButtons.d.ts.map +1 -0
- package/dist/components/ui/SearchField.d.ts +7 -0
- package/dist/components/ui/SearchField.d.ts.map +1 -0
- package/dist/components/ui/Tab.d.ts +18 -0
- package/dist/components/ui/Tab.d.ts.map +1 -0
- package/dist/components/ui/Tag/TagInput.d.ts +19 -0
- package/dist/components/ui/Tag/TagInput.d.ts.map +1 -0
- package/dist/components/ui/Tag/TagList.d.ts +8 -0
- package/dist/components/ui/Tag/TagList.d.ts.map +1 -0
- package/dist/components/ui/Tag/TagListForm.d.ts +8 -0
- package/dist/components/ui/Tag/TagListForm.d.ts.map +1 -0
- package/dist/components/ui/Toggle.d.ts +11 -0
- package/dist/components/ui/Toggle.d.ts.map +1 -0
- package/dist/components/ui/ToolTip.d.ts +7 -0
- package/dist/components/ui/ToolTip.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/chart.d.ts +42 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/form/CheckboxField.d.ts +4 -0
- package/dist/components/ui/form/CheckboxField.d.ts.map +1 -0
- package/dist/components/ui/form/ChoicesField.d.ts +12 -0
- package/dist/components/ui/form/ChoicesField.d.ts.map +1 -0
- package/dist/components/ui/form/Combobox.d.ts +20 -0
- package/dist/components/ui/form/Combobox.d.ts.map +1 -0
- package/dist/components/ui/form/DatePickerField.d.ts +4 -0
- package/dist/components/ui/form/DatePickerField.d.ts.map +1 -0
- package/dist/components/ui/form/EmailField.d.ts +7 -0
- package/dist/components/ui/form/EmailField.d.ts.map +1 -0
- package/dist/components/ui/form/FieldWithHelp.d.ts +10 -0
- package/dist/components/ui/form/FieldWithHelp.d.ts.map +1 -0
- package/dist/components/ui/form/FieldWrapper.d.ts +8 -0
- package/dist/components/ui/form/FieldWrapper.d.ts.map +1 -0
- package/dist/components/ui/form/FormErrors.d.ts +6 -0
- package/dist/components/ui/form/FormErrors.d.ts.map +1 -0
- package/dist/components/ui/form/JSONAreaField.d.ts +7 -0
- package/dist/components/ui/form/JSONAreaField.d.ts.map +1 -0
- package/dist/components/ui/form/MarkdownTextAreaField.d.ts +8 -0
- package/dist/components/ui/form/MarkdownTextAreaField.d.ts.map +1 -0
- package/dist/components/ui/form/PasswordField.d.ts +3 -0
- package/dist/components/ui/form/PasswordField.d.ts.map +1 -0
- package/dist/components/ui/form/SelectField.d.ts +11 -0
- package/dist/components/ui/form/SelectField.d.ts.map +1 -0
- package/dist/components/ui/form/SubmitButton.d.ts +9 -0
- package/dist/components/ui/form/SubmitButton.d.ts.map +1 -0
- package/dist/components/ui/form/TagInputField.d.ts +7 -0
- package/dist/components/ui/form/TagInputField.d.ts.map +1 -0
- package/dist/components/ui/form/TextAreaField.d.ts +8 -0
- package/dist/components/ui/form/TextAreaField.d.ts.map +1 -0
- package/dist/components/ui/form/TextField.d.ts +10 -0
- package/dist/components/ui/form/TextField.d.ts.map +1 -0
- package/dist/components/ui/form/index.d.ts +18 -0
- package/dist/components/ui/form/index.d.ts.map +1 -0
- package/dist/components/ui/icons.d.ts +4 -0
- package/dist/components/ui/icons.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +47 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/form.js +2617 -0
- package/dist/gql/operation-types.d.ts +13239 -0
- package/dist/gql/operation-types.d.ts.map +1 -0
- package/dist/gql/schema-types.d.ts +3876 -0
- package/dist/gql/schema-types.d.ts.map +1 -0
- package/dist/gql/types.d.ts +3 -0
- package/dist/gql/types.d.ts.map +1 -0
- package/dist/hooks.js +49 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/modal.js +51 -0
- package/dist/modules/Auth/AuthContext.d.ts +9 -0
- package/dist/modules/Auth/AuthContext.d.ts.map +1 -0
- package/dist/modules/Auth/useAuth.d.ts +6 -0
- package/dist/modules/Auth/useAuth.d.ts.map +1 -0
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts +8 -0
- package/dist/modules/UnchainedContext/UnchainedContext.d.ts.map +1 -0
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts +7 -0
- package/dist/modules/UnchainedContext/useUnchainedContext.d.ts.map +1 -0
- package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts +3 -0
- package/dist/modules/accounts/fragment/MD5MetaDataFragment.d.ts.map +1 -0
- package/dist/modules/accounts/fragment/UserFragment.d.ts +3 -0
- package/dist/modules/accounts/fragment/UserFragment.d.ts.map +1 -0
- package/dist/modules/accounts/hooks/useCurrentUser.d.ts +10 -0
- package/dist/modules/accounts/hooks/useCurrentUser.d.ts.map +1 -0
- package/dist/modules/accounts/hooks/useUsersCount.d.ts +8 -0
- package/dist/modules/accounts/hooks/useUsersCount.d.ts.map +1 -0
- package/dist/modules/accounts.js +1349 -0
- package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts +8 -0
- package/dist/modules/assortment/hooks/useAssortmentsCount.d.ts.map +1 -0
- package/dist/modules/assortment.js +1205 -0
- package/dist/modules/common/components/AppContext.d.ts +18 -0
- package/dist/modules/common/components/AppContext.d.ts.map +1 -0
- package/dist/modules/common/components/FormWrapper.d.ts +8 -0
- package/dist/modules/common/components/FormWrapper.d.ts.map +1 -0
- package/dist/modules/common/components/LocaleWrapper.d.ts +7 -0
- package/dist/modules/common/components/LocaleWrapper.d.ts.map +1 -0
- package/dist/modules/common/components/MediaAvatar.d.ts +6 -0
- package/dist/modules/common/components/MediaAvatar.d.ts.map +1 -0
- package/dist/modules/common/components/SelectOptions.d.ts +17 -0
- package/dist/modules/common/components/SelectOptions.d.ts.map +1 -0
- package/dist/modules/common/components/Table.d.ts +25 -0
- package/dist/modules/common/components/Table.d.ts.map +1 -0
- package/dist/modules/common/components/TableCell.d.ts +12 -0
- package/dist/modules/common/components/TableCell.d.ts.map +1 -0
- package/dist/modules/common/components/TableRow.d.ts +10 -0
- package/dist/modules/common/components/TableRow.d.ts.map +1 -0
- package/dist/modules/common/components/ThemeWrapper.d.ts +10 -0
- package/dist/modules/common/components/ThemeWrapper.d.ts.map +1 -0
- package/dist/modules/common/data/iso-codes.d.ts +4 -0
- package/dist/modules/common/data/iso-codes.d.ts.map +1 -0
- package/dist/modules/common/data/miscellaneous.d.ts +52 -0
- package/dist/modules/common/data/miscellaneous.d.ts.map +1 -0
- package/dist/modules/common/fragments/AddressFragment.d.ts +3 -0
- package/dist/modules/common/fragments/AddressFragment.d.ts.map +1 -0
- package/dist/modules/common/hooks/useApp.d.ts +11 -0
- package/dist/modules/common/hooks/useApp.d.ts.map +1 -0
- package/dist/modules/common/hooks/useBulkResultHandler.d.ts +8 -0
- package/dist/modules/common/hooks/useBulkResultHandler.d.ts.map +1 -0
- package/dist/modules/common/hooks/useBulkSelection.d.ts +12 -0
- package/dist/modules/common/hooks/useBulkSelection.d.ts.map +1 -0
- package/dist/modules/common/hooks/useCSVExport.d.ts +10 -0
- package/dist/modules/common/hooks/useCSVExport.d.ts.map +1 -0
- package/dist/modules/common/hooks/useCSVImport.d.ts +18 -0
- package/dist/modules/common/hooks/useCSVImport.d.ts.map +1 -0
- package/dist/modules/common/hooks/useChatEndpointChecker.d.ts +5 -0
- package/dist/modules/common/hooks/useChatEndpointChecker.d.ts.map +1 -0
- package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts +10 -0
- package/dist/modules/common/hooks/useConfirmMediaUpload.d.ts.map +1 -0
- package/dist/modules/common/hooks/useDashboardMetrics.d.ts +23 -0
- package/dist/modules/common/hooks/useDashboardMetrics.d.ts.map +1 -0
- package/dist/modules/common/hooks/useLocalStorage.d.ts +3 -0
- package/dist/modules/common/hooks/useLocalStorage.d.ts.map +1 -0
- package/dist/modules/common/hooks/useOrderAnalytics.d.ts +25 -0
- package/dist/modules/common/hooks/useOrderAnalytics.d.ts.map +1 -0
- package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts +16 -0
- package/dist/modules/common/hooks/useOrderItemsAnalytics.d.ts.map +1 -0
- package/dist/modules/common/hooks/useOutsideClick.d.ts +3 -0
- package/dist/modules/common/hooks/useOutsideClick.d.ts.map +1 -0
- package/dist/modules/common/hooks/usePortal.d.ts +20 -0
- package/dist/modules/common/hooks/usePortal.d.ts.map +1 -0
- package/dist/modules/common/hooks/useScrollRestoration.d.ts +8 -0
- package/dist/modules/common/hooks/useScrollRestoration.d.ts.map +1 -0
- package/dist/modules/common/hooks/useShopConfiguration.d.ts +8 -0
- package/dist/modules/common/hooks/useShopConfiguration.d.ts.map +1 -0
- package/dist/modules/common/hooks/useShopInfo.d.ts +41 -0
- package/dist/modules/common/hooks/useShopInfo.d.ts.map +1 -0
- package/dist/modules/common/hooks/useStatusTypes.d.ts +10 -0
- package/dist/modules/common/hooks/useStatusTypes.d.ts.map +1 -0
- package/dist/modules/common/hooks/useSystemRoles.d.ts +7 -0
- package/dist/modules/common/hooks/useSystemRoles.d.ts.map +1 -0
- package/dist/modules/common/hooks/useTheme.d.ts +7 -0
- package/dist/modules/common/hooks/useTheme.d.ts.map +1 -0
- package/dist/modules/common/utils/deBounce.d.ts +3 -0
- package/dist/modules/common/utils/deBounce.d.ts.map +1 -0
- package/dist/modules/common/utils/defaultNextImageLoader.d.ts +7 -0
- package/dist/modules/common/utils/defaultNextImageLoader.d.ts.map +1 -0
- package/dist/modules/common/utils/formatUsername.d.ts +3 -0
- package/dist/modules/common/utils/formatUsername.d.ts.map +1 -0
- package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts +30 -0
- package/dist/modules/common/utils/getSetupStepsConfigurationsMeta.d.ts.map +1 -0
- package/dist/modules/common/utils/normalizeFilterKeys.d.ts +4 -0
- package/dist/modules/common/utils/normalizeFilterKeys.d.ts.map +1 -0
- package/dist/modules/common/utils/sharedContext.d.ts +9 -0
- package/dist/modules/common/utils/sharedContext.d.ts.map +1 -0
- package/dist/modules/common/utils/useFormatDateTime.d.ts +16 -0
- package/dist/modules/common/utils/useFormatDateTime.d.ts.map +1 -0
- package/dist/modules/common/utils/utils.d.ts +21 -0
- package/dist/modules/common/utils/utils.d.ts.map +1 -0
- package/dist/modules/country/fragments/CountryFragment.d.ts +3 -0
- package/dist/modules/country/fragments/CountryFragment.d.ts.map +1 -0
- package/dist/modules/country/hooks/useCountries.d.ts +22 -0
- package/dist/modules/country/hooks/useCountries.d.ts.map +1 -0
- package/dist/modules/country.js +108 -0
- package/dist/modules/currency.js +119 -0
- package/dist/modules/delivery-provider.js +269 -0
- package/dist/modules/enrollment.js +431 -0
- package/dist/modules/event.js +123 -0
- package/dist/modules/filter.js +497 -0
- package/dist/modules/forms/components/Form.d.ts +8 -0
- package/dist/modules/forms/components/Form.d.ts.map +1 -0
- package/dist/modules/forms/hooks/useField.d.ts +35 -0
- package/dist/modules/forms/hooks/useField.d.ts.map +1 -0
- package/dist/modules/forms/hooks/useForm.d.ts +44 -0
- package/dist/modules/forms/hooks/useForm.d.ts.map +1 -0
- package/dist/modules/forms/hooks/useFormContext.d.ts +3 -0
- package/dist/modules/forms/hooks/useFormContext.d.ts.map +1 -0
- package/dist/modules/forms/lib/FormContext.d.ts +13 -0
- package/dist/modules/forms/lib/FormContext.d.ts.map +1 -0
- package/dist/modules/forms/lib/clean.d.ts +3 -0
- package/dist/modules/forms/lib/clean.d.ts.map +1 -0
- package/dist/modules/forms/lib/validators.d.ts +20 -0
- package/dist/modules/forms/lib/validators.d.ts.map +1 -0
- package/dist/modules/language/fragments/LanguageFragment.d.ts +3 -0
- package/dist/modules/language/fragments/LanguageFragment.d.ts.map +1 -0
- package/dist/modules/language/hooks/useLanguages.d.ts +19 -0
- package/dist/modules/language/hooks/useLanguages.d.ts.map +1 -0
- package/dist/modules/language.js +106 -0
- package/dist/modules/modal/components/AlertMessage.d.ts +9 -0
- package/dist/modules/modal/components/AlertMessage.d.ts.map +1 -0
- package/dist/modules/modal/components/DangerMessage.d.ts +13 -0
- package/dist/modules/modal/components/DangerMessage.d.ts.map +1 -0
- package/dist/modules/modal/components/ImportResultMessage.d.ts +14 -0
- package/dist/modules/modal/components/ImportResultMessage.d.ts.map +1 -0
- package/dist/modules/modal/components/Modal.d.ts +10 -0
- package/dist/modules/modal/components/Modal.d.ts.map +1 -0
- package/dist/modules/modal/components/ModalWrapper.d.ts +6 -0
- package/dist/modules/modal/components/ModalWrapper.d.ts.map +1 -0
- package/dist/modules/modal/hooks/useModal.d.ts +7 -0
- package/dist/modules/modal/hooks/useModal.d.ts.map +1 -0
- package/dist/modules/modal/utils/ModalContext.d.ts +9 -0
- package/dist/modules/modal/utils/ModalContext.d.ts.map +1 -0
- package/dist/modules/order/fragments/OrderDetailFragment.d.ts +3 -0
- package/dist/modules/order/fragments/OrderDetailFragment.d.ts.map +1 -0
- package/dist/modules/order/fragments/OrderFragment.d.ts +3 -0
- package/dist/modules/order/fragments/OrderFragment.d.ts.map +1 -0
- package/dist/modules/order/hooks/useOrders.d.ts +46 -0
- package/dist/modules/order/hooks/useOrders.d.ts.map +1 -0
- package/dist/modules/order.js +569 -0
- package/dist/modules/payment-providers.js +206 -0
- package/dist/modules/product/hooks/useProductsCount.d.ts +8 -0
- package/dist/modules/product/hooks/useProductsCount.d.ts.map +1 -0
- package/dist/modules/product-review.js +270 -0
- package/dist/modules/product.js +6914 -0
- package/dist/modules/quotation.js +324 -0
- package/dist/modules/token.js +143 -0
- package/dist/modules/warehousing-providers.js +206 -0
- package/dist/modules/work/fragments/WorkFragment.d.ts +3 -0
- package/dist/modules/work/fragments/WorkFragment.d.ts.map +1 -0
- package/dist/modules/work/hooks/useAddWork.d.ts +6 -0
- package/dist/modules/work/hooks/useAddWork.d.ts.map +1 -0
- package/dist/modules/work/hooks/useWork.d.ts +32 -0
- package/dist/modules/work/hooks/useWork.d.ts.map +1 -0
- package/dist/modules/work.js +232 -0
- package/dist/plugins.js +13 -0
- package/dist/providers.js +9 -0
- package/dist/sdk/hooks.d.ts +12 -0
- package/dist/sdk/hooks.d.ts.map +1 -0
- package/dist/sdk/modal.d.ts +7 -0
- package/dist/sdk/modal.d.ts.map +1 -0
- package/dist/sdk/plugins.d.ts +78 -0
- package/dist/sdk/plugins.d.ts.map +1 -0
- package/dist/sdk/providers.d.ts +5 -0
- package/dist/sdk/providers.d.ts.map +1 -0
- package/dist/sdk/shims/admin-ui-plugins.d.ts +3 -0
- package/dist/sdk/shims/admin-ui-plugins.d.ts.map +1 -0
- package/dist/sdk/shims/apollo-client-react.d.ts +3 -0
- package/dist/sdk/shims/apollo-client-react.d.ts.map +1 -0
- package/dist/sdk/shims/apollo-client.d.ts +3 -0
- package/dist/sdk/shims/apollo-client.d.ts.map +1 -0
- package/dist/sdk/shims/host.d.ts +17 -0
- package/dist/sdk/shims/host.d.ts.map +1 -0
- package/dist/sdk/shims/next-head.d.ts +3 -0
- package/dist/sdk/shims/next-head.d.ts.map +1 -0
- package/dist/sdk/shims/next-image.d.ts +3 -0
- package/dist/sdk/shims/next-image.d.ts.map +1 -0
- package/dist/sdk/shims/next-link.d.ts +3 -0
- package/dist/sdk/shims/next-link.d.ts.map +1 -0
- package/dist/sdk/shims/next-router.d.ts +3 -0
- package/dist/sdk/shims/next-router.d.ts.map +1 -0
- package/dist/sdk/shims/react-dom-client.d.ts +3 -0
- package/dist/sdk/shims/react-dom-client.d.ts.map +1 -0
- package/dist/sdk/shims/react-dom.d.ts +3 -0
- package/dist/sdk/shims/react-dom.d.ts.map +1 -0
- package/dist/sdk/shims/react-hook-form.d.ts +3 -0
- package/dist/sdk/shims/react-hook-form.d.ts.map +1 -0
- package/dist/sdk/shims/react-intl.d.ts +3 -0
- package/dist/sdk/shims/react-intl.d.ts.map +1 -0
- package/dist/sdk/shims/react-jsx-runtime.d.ts +3 -0
- package/dist/sdk/shims/react-jsx-runtime.d.ts.map +1 -0
- package/dist/sdk/shims/react-toastify.d.ts +3 -0
- package/dist/sdk/shims/react-toastify.d.ts.map +1 -0
- package/dist/sdk/shims/react.d.ts +3 -0
- package/dist/sdk/shims/react.d.ts.map +1 -0
- package/dist/sdk/theme.d.ts +26 -0
- package/dist/sdk/theme.d.ts.map +1 -0
- package/dist/shims/admin-ui-plugins.js +9 -0
- package/dist/shims/apollo-client-react.js +25 -0
- package/dist/shims/apollo-client.js +55 -0
- package/dist/shims/next-head.js +9 -0
- package/dist/shims/next-image.js +9 -0
- package/dist/shims/next-link.js +9 -0
- package/dist/shims/next-router.js +13 -0
- package/dist/shims/react-dom-client.js +11 -0
- package/dist/shims/react-dom.js +22 -0
- package/dist/shims/react-hook-form.js +25 -0
- package/dist/shims/react-intl.js +37 -0
- package/dist/shims/react-jsx-runtime.js +11 -0
- package/dist/shims/react-toastify.js +16 -0
- package/dist/shims/react.js +52 -0
- package/dist/theme.js +34 -0
- package/dist/ui.js +19764 -0
- package/out/403/index.html +3 -3
- package/out/404/index.html +3 -3
- package/out/404.html +3 -3
- package/out/423/index.html +3 -3
- package/out/500/index.html +3 -3
- package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → LYf4c16v7ZGmJ_J77NFgQ}/_buildManifest.js +2 -2
- package/out/_next/static/chunks/{41p3ng89i5lem.js → 23swqksldp1rl.js} +1 -1
- package/out/_next/static/chunks/{1wnuiwsbi70eq.js → 3bqaitmo4sp-a.js} +1 -1
- package/out/_offline/index.html +3 -3
- package/out/account/forgot-password/index.html +3 -3
- package/out/account/index.html +3 -3
- package/out/assortments/AssortmentDetailPage/index.html +3 -3
- package/out/assortments/index.html +3 -3
- package/out/assortments/new/index.html +3 -3
- package/out/copilot/index.html +3 -3
- package/out/country/CountryDetailPage/index.html +3 -3
- package/out/country/index.html +3 -3
- package/out/country/new/index.html +3 -3
- package/out/currency/CurrencyDetailPage/index.html +3 -3
- package/out/currency/index.html +3 -3
- package/out/currency/new/index.html +3 -3
- package/out/delivery-provider/DeliveryProviderDetailPage/index.html +3 -3
- package/out/delivery-provider/index.html +3 -3
- package/out/delivery-provider/new/index.html +3 -3
- package/out/enrollments/EnrollmentDetailPage/index.html +3 -3
- package/out/enrollments/index.html +3 -3
- package/out/events/EventDetailPage/index.html +3 -3
- package/out/events/index.html +3 -3
- package/out/exports/index.html +3 -3
- package/out/external/index.html +3 -3
- package/out/filters/FilterDetailPage/index.html +3 -3
- package/out/filters/index.html +3 -3
- package/out/filters/new/index.html +3 -3
- package/out/index.html +3 -3
- package/out/install/index.html +3 -3
- package/out/language/LanguageDetailPage/index.html +3 -3
- package/out/language/index.html +3 -3
- package/out/language/new/index.html +3 -3
- package/out/log-in/index.html +3 -3
- package/out/manifest.json +48 -0
- package/out/orders/OrderDetailPage/index.html +3 -3
- package/out/orders/index.html +3 -3
- package/out/payment-provider/PaymentProviderDetailPage/index.html +3 -3
- package/out/payment-provider/index.html +3 -3
- package/out/payment-provider/new/index.html +3 -3
- package/out/products/ProductDetailPage/index.html +3 -3
- package/out/products/index.html +3 -3
- package/out/products/new/index.html +3 -3
- package/out/quotations/QuotationDetailPage/index.html +3 -3
- package/out/quotations/index.html +3 -3
- package/out/reset-password/index.html +3 -3
- package/out/sign-up/index.html +3 -3
- package/out/styleguide/index.html +3 -3
- package/out/tokens/TokenDetailPage/index.html +3 -3
- package/out/tokens/index.html +3 -3
- package/out/users/UserDetailPage/index.html +3 -3
- package/out/users/index.html +3 -3
- package/out/users/new/index.html +3 -3
- package/out/verify-email/index.html +3 -3
- package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +3 -3
- package/out/warehousing-provider/index.html +3 -3
- package/out/warehousing-provider/new/index.html +3 -3
- package/out/works/WorkDetailPage/index.html +3 -3
- package/out/works/WorkQueueListView/index.html +3 -3
- package/out/works/index.html +3 -3
- package/out/works/management/index.html +3 -3
- package/package.json +2 -2
- /package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → LYf4c16v7ZGmJ_J77NFgQ}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → LYf4c16v7ZGmJ_J77NFgQ}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { A, Y, y, l3, u3, i3, n, o2, K, C, u, N, m, x2, t2, c, b, s, p } from './chunk-QHR23GVH.js';
|
|
2
|
+
import c2, { createContext, useRef, useState, useMemo, Fragment, useEffect, useContext } from 'react';
|
|
3
|
+
|
|
4
|
+
function f() {
|
|
5
|
+
let e = useRef(false);
|
|
6
|
+
return n(() => (e.current = true, () => {
|
|
7
|
+
e.current = false;
|
|
8
|
+
}), []), e;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// ../node_modules/@headlessui/react/dist/components/transition/transition.js
|
|
12
|
+
function ue(e) {
|
|
13
|
+
var t2;
|
|
14
|
+
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || !b((t2 = e.as) != null ? t2 : de) || c2.Children.count(e.children) === 1;
|
|
15
|
+
}
|
|
16
|
+
var V = createContext(null);
|
|
17
|
+
V.displayName = "TransitionContext";
|
|
18
|
+
var De = ((n2) => (n2.Visible = "visible", n2.Hidden = "hidden", n2))(De || {});
|
|
19
|
+
function He() {
|
|
20
|
+
let e = useContext(V);
|
|
21
|
+
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
function Ae() {
|
|
25
|
+
let e = useContext(w);
|
|
26
|
+
if (e === null) throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");
|
|
27
|
+
return e;
|
|
28
|
+
}
|
|
29
|
+
var w = createContext(null);
|
|
30
|
+
w.displayName = "NestingContext";
|
|
31
|
+
function M(e) {
|
|
32
|
+
return "children" in e ? M(e.children) : e.current.filter(({ el: t2 }) => t2.current !== null).filter(({ state: t2 }) => t2 === "visible").length > 0;
|
|
33
|
+
}
|
|
34
|
+
function Te(e, t2) {
|
|
35
|
+
let n2 = s(e), l2 = useRef([]), S = f(), R = p(), d = o2((o2, i2 = C.Hidden) => {
|
|
36
|
+
let a = l2.current.findIndex(({ el: s2 }) => s2 === o2);
|
|
37
|
+
a !== -1 && (u(i2, { [C.Unmount]() {
|
|
38
|
+
l2.current.splice(a, 1);
|
|
39
|
+
}, [C.Hidden]() {
|
|
40
|
+
l2.current[a].state = "hidden";
|
|
41
|
+
} }), R.microTask(() => {
|
|
42
|
+
var s2;
|
|
43
|
+
!M(l2) && S.current && ((s2 = n2.current) == null || s2.call(n2));
|
|
44
|
+
}));
|
|
45
|
+
}), y2 = o2((o2) => {
|
|
46
|
+
let i2 = l2.current.find(({ el: a }) => a === o2);
|
|
47
|
+
return i2 ? i2.state !== "visible" && (i2.state = "visible") : l2.current.push({ el: o2, state: "visible" }), () => d(o2, C.Unmount);
|
|
48
|
+
}), C2 = useRef([]), p2 = useRef(Promise.resolve()), h = useRef({ enter: [], leave: [] }), g = o2((o2, i2, a) => {
|
|
49
|
+
C2.current.splice(0), t2 && (t2.chains.current[i2] = t2.chains.current[i2].filter(([s2]) => s2 !== o2)), t2 == null || t2.chains.current[i2].push([o2, new Promise((s2) => {
|
|
50
|
+
C2.current.push(s2);
|
|
51
|
+
})]), t2 == null || t2.chains.current[i2].push([o2, new Promise((s2) => {
|
|
52
|
+
Promise.all(h.current[i2].map(([r2, f2]) => f2)).then(() => s2());
|
|
53
|
+
})]), i2 === "enter" ? p2.current = p2.current.then(() => t2 == null ? void 0 : t2.wait.current).then(() => a(i2)) : a(i2);
|
|
54
|
+
}), v = o2((o2, i2, a) => {
|
|
55
|
+
Promise.all(h.current[i2].splice(0).map(([s2, r2]) => r2)).then(() => {
|
|
56
|
+
var s2;
|
|
57
|
+
(s2 = C2.current.shift()) == null || s2();
|
|
58
|
+
}).then(() => a(i2));
|
|
59
|
+
});
|
|
60
|
+
return useMemo(() => ({ children: l2, register: y2, unregister: d, onStart: g, onStop: v, wait: p2, chains: h }), [y2, d, l2, g, v, h, p2]);
|
|
61
|
+
}
|
|
62
|
+
var de = Fragment;
|
|
63
|
+
var fe = A.RenderStrategy;
|
|
64
|
+
function Fe(e, t2$1) {
|
|
65
|
+
var ee, te;
|
|
66
|
+
let { transition: n2 = true, beforeEnter: l2, afterEnter: S, beforeLeave: R, afterLeave: d, enter: y2, enterFrom: C2, enterTo: p2, entered: h, leave: g, leaveFrom: v, leaveTo: o2$1, ...i2 } = e, [a, s2] = useState(null), r2 = useRef(null), f2 = ue(e), U = y(...f2 ? [r2, t2$1, s2] : t2$1 === null ? [] : [t2$1]), H = (ee = i2.unmount) == null || ee ? C.Unmount : C.Hidden, { show: u3, appear: z, initial: K2 } = He(), [m2, j] = useState(u3 ? "visible" : "hidden"), Q = Ae(), { register: A2, unregister: F } = Q;
|
|
67
|
+
n(() => A2(r2), [A2, r2]), n(() => {
|
|
68
|
+
if (H === C.Hidden && r2.current) {
|
|
69
|
+
if (u3 && m2 !== "visible") {
|
|
70
|
+
j("visible");
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
return u(m2, { ["hidden"]: () => F(r2), ["visible"]: () => A2(r2) });
|
|
74
|
+
}
|
|
75
|
+
}, [m2, r2, A2, F, u3, H]);
|
|
76
|
+
let G = l3();
|
|
77
|
+
n(() => {
|
|
78
|
+
if (f2 && G && m2 === "visible" && r2.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
79
|
+
}, [r2, m2, G, f2]);
|
|
80
|
+
let ce = K2 && !z, Y2 = z && u3 && K2, B = useRef(false), I = Te(() => {
|
|
81
|
+
B.current || (j("hidden"), F(r2));
|
|
82
|
+
}, Q), Z = o2((W) => {
|
|
83
|
+
B.current = true;
|
|
84
|
+
let L = W ? "enter" : "leave";
|
|
85
|
+
I.onStart(r2, L, (_) => {
|
|
86
|
+
_ === "enter" ? l2 == null || l2() : _ === "leave" && (R == null || R());
|
|
87
|
+
});
|
|
88
|
+
}), $ = o2((W) => {
|
|
89
|
+
let L = W ? "enter" : "leave";
|
|
90
|
+
B.current = false, I.onStop(r2, L, (_) => {
|
|
91
|
+
_ === "enter" ? S == null || S() : _ === "leave" && (d == null || d());
|
|
92
|
+
}), L === "leave" && !M(I) && (j("hidden"), F(r2));
|
|
93
|
+
});
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
f2 && n2 || (Z(u3), $(u3));
|
|
96
|
+
}, [u3, f2, n2]);
|
|
97
|
+
let pe = /* @__PURE__ */ (() => !(!n2 || !f2 || !G || ce))(), [, T] = N(pe, a, u3, { start: Z, end: $ }), Ce = m({ ref: U, className: ((te = t2(i2.className, Y2 && y2, Y2 && C2, T.enter && y2, T.enter && T.closed && C2, T.enter && !T.closed && p2, T.leave && g, T.leave && !T.closed && v, T.leave && T.closed && o2$1, !T.transition && u3 && h)) == null ? void 0 : te.trim()) || void 0, ...x2(T) }), N2 = 0;
|
|
98
|
+
m2 === "visible" && (N2 |= i3.Open), m2 === "hidden" && (N2 |= i3.Closed), u3 && m2 === "hidden" && (N2 |= i3.Opening), !u3 && m2 === "visible" && (N2 |= i3.Closing);
|
|
99
|
+
let he = K();
|
|
100
|
+
return c2.createElement(w.Provider, { value: I }, c2.createElement(c, { value: N2 }, he({ ourProps: Ce, theirProps: i2, defaultTag: de, features: fe, visible: m2 === "visible", name: "Transition.Child" })));
|
|
101
|
+
}
|
|
102
|
+
function Ie(e, t2) {
|
|
103
|
+
let { show: n2, appear: l2 = false, unmount: S = true, ...R } = e, d = useRef(null), y2 = ue(e), C2 = y(...y2 ? [d, t2] : t2 === null ? [] : [t2]);
|
|
104
|
+
l3();
|
|
105
|
+
let p2 = u3();
|
|
106
|
+
if (n2 === void 0 && p2 !== null && (n2 = (p2 & i3.Open) === i3.Open), n2 === void 0) throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");
|
|
107
|
+
let [h, g] = useState(n2 ? "visible" : "hidden"), v = Te(() => {
|
|
108
|
+
n2 || g("hidden");
|
|
109
|
+
}), [o2$1, i2] = useState(true), a = useRef([n2]);
|
|
110
|
+
n(() => {
|
|
111
|
+
o2$1 !== false && a.current[a.current.length - 1] !== n2 && (a.current.push(n2), i2(false));
|
|
112
|
+
}, [a, n2]);
|
|
113
|
+
let s2 = useMemo(() => ({ show: n2, appear: l2, initial: o2$1 }), [n2, l2, o2$1]);
|
|
114
|
+
n(() => {
|
|
115
|
+
n2 ? g("visible") : !M(v) && d.current !== null && g("hidden");
|
|
116
|
+
}, [n2, v]);
|
|
117
|
+
let r2 = { unmount: S }, f2 = o2(() => {
|
|
118
|
+
var u3;
|
|
119
|
+
o2$1 && i2(false), (u3 = e.beforeEnter) == null || u3.call(e);
|
|
120
|
+
}), U = o2(() => {
|
|
121
|
+
var u3;
|
|
122
|
+
o2$1 && i2(false), (u3 = e.beforeLeave) == null || u3.call(e);
|
|
123
|
+
}), H = K();
|
|
124
|
+
return c2.createElement(w.Provider, { value: v }, c2.createElement(V.Provider, { value: s2 }, H({ ourProps: { ...r2, as: Fragment, children: c2.createElement(me, { ref: C2, ...r2, ...R, beforeEnter: f2, beforeLeave: U }) }, theirProps: {}, defaultTag: Fragment, features: fe, visible: h === "visible", name: "Transition" })));
|
|
125
|
+
}
|
|
126
|
+
function Le(e, t2) {
|
|
127
|
+
let n2 = useContext(V) !== null, l2 = u3() !== null;
|
|
128
|
+
return c2.createElement(c2.Fragment, null, !n2 && l2 ? c2.createElement(X, { ref: t2, ...e }) : c2.createElement(me, { ref: t2, ...e }));
|
|
129
|
+
}
|
|
130
|
+
var X = Y(Ie);
|
|
131
|
+
var me = Y(Fe);
|
|
132
|
+
var Oe = Y(Le);
|
|
133
|
+
var Ke = Object.assign(X, { Child: Oe, Root: X });
|
|
134
|
+
|
|
135
|
+
export { Ke, Oe, f };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
// src/modules/common/hooks/useLocalStorage.ts
|
|
4
|
+
var useLocalStorage = (key, initialValue) => {
|
|
5
|
+
const [storedValue, setStoredValue] = useState(() => {
|
|
6
|
+
try {
|
|
7
|
+
if (typeof window !== "undefined" && window.localStorage) {
|
|
8
|
+
const item = window.localStorage.getItem(key);
|
|
9
|
+
return item ? JSON.parse(item) : initialValue;
|
|
10
|
+
}
|
|
11
|
+
return initialValue;
|
|
12
|
+
} catch (error) {
|
|
13
|
+
return initialValue;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const setValue = (value) => {
|
|
17
|
+
try {
|
|
18
|
+
if (typeof window !== "undefined" && window.localStorage) {
|
|
19
|
+
const valueToStore = value instanceof Function ? value(storedValue) : value;
|
|
20
|
+
setStoredValue(valueToStore);
|
|
21
|
+
window.localStorage.setItem(key, JSON.stringify(valueToStore));
|
|
22
|
+
} else {
|
|
23
|
+
console.error("localStorage is not available");
|
|
24
|
+
}
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error(error);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
return [storedValue, setValue];
|
|
30
|
+
};
|
|
31
|
+
var useLocalStorage_default = useLocalStorage;
|
|
32
|
+
|
|
33
|
+
export { useLocalStorage_default };
|
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import { Ke, Oe, f as f$1 } from './chunk-3L6EZQ6P.js';
|
|
2
|
+
import { E, m, n as n$1 } from './chunk-FDHXLNZQ.js';
|
|
3
|
+
import { Y, r, u3, i3, y, u2, o2, l3, oe, y2, x, n, S, k3, f2, p2, H, n2, K, s4, l4 as l4$1, le, B, A, M, n3, u, v, T2, I, p, f, s2, l, t3, o4, d, w2 as w2$1, c2, t, A2, s3, i } from './chunk-QHR23GVH.js';
|
|
4
|
+
import { ModalContext_default } from './chunk-VBO377AY.js';
|
|
5
|
+
import l4, { createContext, useRef, useReducer, createRef, useCallback, useMemo, useContext, useState, Fragment, useEffect } from 'react';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var e = createContext(() => {
|
|
10
|
+
});
|
|
11
|
+
function C({ value: t3, children: o4 }) {
|
|
12
|
+
return l4.createElement(e.Provider, { value: t3 }, o4);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// ../node_modules/@headlessui/react/dist/hooks/use-escape.js
|
|
16
|
+
function a(o4$1, r3 = typeof document != "undefined" ? document.defaultView : null, t3) {
|
|
17
|
+
let n6 = I(o4$1, "escape");
|
|
18
|
+
E(r3, "keydown", (e2) => {
|
|
19
|
+
n6 && (e2.defaultPrevented || e2.key === o4.Escape && t3(e2));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function f4() {
|
|
23
|
+
var t3;
|
|
24
|
+
let [e2] = useState(() => typeof window != "undefined" && typeof window.matchMedia == "function" ? window.matchMedia("(pointer: coarse)") : null), [o4, c2] = useState((t3 = e2 == null ? void 0 : e2.matches) != null ? t3 : false);
|
|
25
|
+
return n(() => {
|
|
26
|
+
if (!e2) return;
|
|
27
|
+
function n6(r3) {
|
|
28
|
+
c2(r3.matches);
|
|
29
|
+
}
|
|
30
|
+
return e2.addEventListener("change", n6), () => e2.removeEventListener("change", n6);
|
|
31
|
+
}, [e2]), o4;
|
|
32
|
+
}
|
|
33
|
+
function S2({ defaultContainers: l5 = [], portals: n6, mainTreeNode: o4 } = {}) {
|
|
34
|
+
let c2 = o2(() => {
|
|
35
|
+
var r3, u5;
|
|
36
|
+
let i5 = l(o4), t3$1 = [];
|
|
37
|
+
for (let e2 of l5) e2 !== null && (t3(e2) ? t3$1.push(e2) : "current" in e2 && t3(e2.current) && t3$1.push(e2.current));
|
|
38
|
+
if (n6 != null && n6.current) for (let e2 of n6.current) t3$1.push(e2);
|
|
39
|
+
for (let e2 of (r3 = i5 == null ? void 0 : i5.querySelectorAll("html > *, body > *")) != null ? r3 : []) e2 !== document.body && e2 !== document.head && t3(e2) && e2.id !== "headlessui-portal-root" && (o4 && (e2.contains(o4) || e2.contains((u5 = o4 == null ? void 0 : o4.getRootNode()) == null ? void 0 : u5.host)) || t3$1.some((E2) => e2.contains(E2)) || t3$1.push(e2));
|
|
40
|
+
return t3$1;
|
|
41
|
+
});
|
|
42
|
+
return { resolveContainers: c2, contains: o2((i5) => c2().some((t3) => t3.contains(i5))) };
|
|
43
|
+
}
|
|
44
|
+
var d2 = createContext(null);
|
|
45
|
+
function j({ children: l5, node: n6 }) {
|
|
46
|
+
let [o4, c2] = useState(null), i5 = x2(n6 != null ? n6 : o4);
|
|
47
|
+
return l4.createElement(d2.Provider, { value: i5 }, l5, i5 === null && l4.createElement(f, { features: s2.Hidden, ref: (t3$1) => {
|
|
48
|
+
var r3, u5;
|
|
49
|
+
if (t3$1) {
|
|
50
|
+
for (let e2 of (u5 = (r3 = l(t3$1)) == null ? void 0 : r3.querySelectorAll("html > *, body > *")) != null ? u5 : []) if (e2 !== document.body && e2 !== document.head && t3(e2) && e2 != null && e2.contains(t3$1)) {
|
|
51
|
+
c2(e2);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
} }));
|
|
56
|
+
}
|
|
57
|
+
function x2(l5 = null) {
|
|
58
|
+
var n6;
|
|
59
|
+
return (n6 = useContext(d2)) != null ? n6 : l5;
|
|
60
|
+
}
|
|
61
|
+
var a2 = ((r3) => (r3[r3.Forwards = 0] = "Forwards", r3[r3.Backwards = 1] = "Backwards", r3))(a2 || {});
|
|
62
|
+
function u4() {
|
|
63
|
+
let e2 = useRef(0);
|
|
64
|
+
return s3(true, "keydown", (r3) => {
|
|
65
|
+
r3.key === "Tab" && (e2.current = r3.shiftKey ? 1 : 0);
|
|
66
|
+
}, true), e2;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ../node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js
|
|
70
|
+
function x3(o4) {
|
|
71
|
+
if (!o4) return /* @__PURE__ */ new Set();
|
|
72
|
+
if (typeof o4 == "function") return new Set(o4());
|
|
73
|
+
let t3$1 = /* @__PURE__ */ new Set();
|
|
74
|
+
for (let e2 of o4.current) t3(e2.current) && t3$1.add(e2.current);
|
|
75
|
+
return t3$1;
|
|
76
|
+
}
|
|
77
|
+
var $ = "div";
|
|
78
|
+
var G = ((n6) => (n6[n6.None = 0] = "None", n6[n6.InitialFocus = 1] = "InitialFocus", n6[n6.TabLock = 2] = "TabLock", n6[n6.FocusLock = 4] = "FocusLock", n6[n6.RestoreFocus = 8] = "RestoreFocus", n6[n6.AutoFocus = 16] = "AutoFocus", n6))(G || {});
|
|
79
|
+
function w2(o4, t3) {
|
|
80
|
+
let e2 = useRef(null), r3 = y(e2, t3), { initialFocus: u5, initialFocusFallback: a3, containers: n6, features: s5 = 15, ...f5 } = o4;
|
|
81
|
+
l3() || (s5 = 0);
|
|
82
|
+
let l5 = u2(e2.current);
|
|
83
|
+
re(s5, { ownerDocument: l5 });
|
|
84
|
+
let T2$1 = ne(s5, { ownerDocument: l5, container: e2, initialFocus: u5, initialFocusFallback: a3 });
|
|
85
|
+
oe2(s5, { ownerDocument: l5, container: e2, containers: n6, previousActiveElement: T2$1 });
|
|
86
|
+
let g = u4(), A3 = o2((c2) => {
|
|
87
|
+
if (!n3(e2.current)) return;
|
|
88
|
+
let E2 = e2.current;
|
|
89
|
+
((V) => V())(() => {
|
|
90
|
+
u(g.current, { [a2.Forwards]: () => {
|
|
91
|
+
v(E2, T2.First, { skipElements: [c2.relatedTarget, a3] });
|
|
92
|
+
}, [a2.Backwards]: () => {
|
|
93
|
+
v(E2, T2.Last, { skipElements: [c2.relatedTarget, a3] });
|
|
94
|
+
} });
|
|
95
|
+
});
|
|
96
|
+
}), v2 = I(!!(s5 & 2), "focus-trap#tab-lock"), N = p(), b2 = useRef(false), k2 = { ref: r3, onKeyDown(c2) {
|
|
97
|
+
c2.key == "Tab" && (b2.current = true, N.requestAnimationFrame(() => {
|
|
98
|
+
b2.current = false;
|
|
99
|
+
}));
|
|
100
|
+
}, onBlur(c2) {
|
|
101
|
+
if (!(s5 & 4)) return;
|
|
102
|
+
let E2 = x3(n6);
|
|
103
|
+
n3(e2.current) && E2.add(e2.current);
|
|
104
|
+
let L = c2.relatedTarget;
|
|
105
|
+
i(L) && L.dataset.headlessuiFocusGuard !== "true" && (I2(E2, L) || (b2.current ? v(e2.current, u(g.current, { [a2.Forwards]: () => T2.Next, [a2.Backwards]: () => T2.Previous }) | T2.WrapAround, { relativeTo: c2.target }) : i(c2.target) && w2$1(c2.target)));
|
|
106
|
+
} }, B2 = K();
|
|
107
|
+
return l4.createElement(l4.Fragment, null, v2 && l4.createElement(f, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A3, features: s2.Focusable }), B2({ ourProps: k2, theirProps: f5, defaultTag: $, name: "FocusTrap" }), v2 && l4.createElement(f, { as: "button", type: "button", "data-headlessui-focus-guard": true, onFocus: A3, features: s2.Focusable }));
|
|
108
|
+
}
|
|
109
|
+
var ee = Y(w2);
|
|
110
|
+
var ge = Object.assign(ee, { features: G });
|
|
111
|
+
function te(o4 = true) {
|
|
112
|
+
let t3 = useRef(n$1.slice());
|
|
113
|
+
return m(([e2], [r3]) => {
|
|
114
|
+
r3 === true && e2 === false && t(() => {
|
|
115
|
+
t3.current.splice(0);
|
|
116
|
+
}), r3 === false && e2 === true && (t3.current = n$1.slice());
|
|
117
|
+
}, [o4, n$1, t3]), o2(() => {
|
|
118
|
+
var e2;
|
|
119
|
+
return (e2 = t3.current.find((r3) => r3 != null && r3.isConnected)) != null ? e2 : null;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
function re(o4, { ownerDocument: t3 }) {
|
|
123
|
+
let e2 = !!(o4 & 8), r3 = te(e2);
|
|
124
|
+
m(() => {
|
|
125
|
+
e2 || d(t3 == null ? void 0 : t3.body) && w2$1(r3());
|
|
126
|
+
}, [e2]), c2(() => {
|
|
127
|
+
e2 && w2$1(r3());
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function ne(o4, { ownerDocument: t3, container: e2, initialFocus: r3, initialFocusFallback: u5 }) {
|
|
131
|
+
let a3 = useRef(null), n6 = I(!!(o4 & 1), "focus-trap#initial-focus"), s5 = f$1();
|
|
132
|
+
return m(() => {
|
|
133
|
+
if (o4 === 0) return;
|
|
134
|
+
if (!n6) {
|
|
135
|
+
u5 != null && u5.current && w2$1(u5.current);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
let f5 = e2.current;
|
|
139
|
+
f5 && t(() => {
|
|
140
|
+
if (!s5.current) return;
|
|
141
|
+
let l5 = t3 == null ? void 0 : t3.activeElement;
|
|
142
|
+
if (r3 != null && r3.current) {
|
|
143
|
+
if ((r3 == null ? void 0 : r3.current) === l5) {
|
|
144
|
+
a3.current = l5;
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
} else if (f5.contains(l5)) {
|
|
148
|
+
a3.current = l5;
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (r3 != null && r3.current) w2$1(r3.current);
|
|
152
|
+
else {
|
|
153
|
+
if (o4 & 16) {
|
|
154
|
+
if (v(f5, T2.First | T2.AutoFocus) !== A2.Error) return;
|
|
155
|
+
} else if (v(f5, T2.First) !== A2.Error) return;
|
|
156
|
+
if (u5 != null && u5.current && (w2$1(u5.current), (t3 == null ? void 0 : t3.activeElement) === u5.current)) return;
|
|
157
|
+
console.warn("There are no focusable elements inside the <FocusTrap />");
|
|
158
|
+
}
|
|
159
|
+
a3.current = t3 == null ? void 0 : t3.activeElement;
|
|
160
|
+
});
|
|
161
|
+
}, [u5, n6, o4]), a3;
|
|
162
|
+
}
|
|
163
|
+
function oe2(o4, { ownerDocument: t3, container: e2, containers: r3, previousActiveElement: u5 }) {
|
|
164
|
+
let a3 = f$1(), n6 = !!(o4 & 4);
|
|
165
|
+
E(t3 == null ? void 0 : t3.defaultView, "focus", (s5) => {
|
|
166
|
+
if (!n6 || !a3.current) return;
|
|
167
|
+
let f5 = x3(r3);
|
|
168
|
+
n3(e2.current) && f5.add(e2.current);
|
|
169
|
+
let l5 = u5.current;
|
|
170
|
+
if (!l5) return;
|
|
171
|
+
let T2 = s5.target;
|
|
172
|
+
n3(T2) ? I2(f5, T2) ? (u5.current = T2, w2$1(T2)) : (s5.preventDefault(), s5.stopPropagation(), w2$1(l5)) : w2$1(u5.current);
|
|
173
|
+
}, true);
|
|
174
|
+
}
|
|
175
|
+
function I2(o4, t3) {
|
|
176
|
+
for (let e2 of o4) if (e2.contains(t3)) return true;
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// ../node_modules/@headlessui/react/dist/components/dialog/dialog.js
|
|
181
|
+
var we = ((o4) => (o4[o4.Open = 0] = "Open", o4[o4.Closed = 1] = "Closed", o4))(we || {});
|
|
182
|
+
var Be = ((t3) => (t3[t3.SetTitleId = 0] = "SetTitleId", t3))(Be || {});
|
|
183
|
+
var Ue = { [0](e2, t3) {
|
|
184
|
+
return e2.titleId === t3.id ? e2 : { ...e2, titleId: t3.id };
|
|
185
|
+
} };
|
|
186
|
+
var w3 = createContext(null);
|
|
187
|
+
w3.displayName = "DialogContext";
|
|
188
|
+
function O(e2) {
|
|
189
|
+
let t3 = useContext(w3);
|
|
190
|
+
if (t3 === null) {
|
|
191
|
+
let o4 = new Error(`<${e2} /> is missing a parent <Dialog /> component.`);
|
|
192
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o4, O), o4;
|
|
193
|
+
}
|
|
194
|
+
return t3;
|
|
195
|
+
}
|
|
196
|
+
function He(e2, t3) {
|
|
197
|
+
return u(t3.type, Ue, e2, t3);
|
|
198
|
+
}
|
|
199
|
+
var z = Y(function(t3, o4) {
|
|
200
|
+
let a3 = r(), { id: n6 = `headlessui-dialog-${a3}`, open: i5, onClose: p4, initialFocus: d3, role: s5 = "dialog", autoFocus: f5 = true, __demoMode: u5 = false, unmount: y3 = false, ...S3 } = t3, R = useRef(false);
|
|
201
|
+
s5 = (function() {
|
|
202
|
+
return s5 === "dialog" || s5 === "alertdialog" ? s5 : (R.current || (R.current = true, console.warn(`Invalid role [${s5}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
|
|
203
|
+
})();
|
|
204
|
+
let g = u3();
|
|
205
|
+
i5 === void 0 && g !== null && (i5 = (g & i3.Open) === i3.Open);
|
|
206
|
+
let T2 = useRef(null), I3 = y(T2, o4), F2 = u2(T2.current), c2 = i5 ? 0 : 1, [b2, Q] = useReducer(He, { titleId: null, descriptionId: null, panelRef: createRef() }), m2 = o2(() => p4(false)), B2 = o2((r3) => Q({ type: 0, id: r3 })), D = l3() ? c2 === 0 : false, [Z, ee2] = oe(), te2 = { get current() {
|
|
207
|
+
var r3;
|
|
208
|
+
return (r3 = b2.panelRef.current) != null ? r3 : T2.current;
|
|
209
|
+
} }, v2 = x2(), { resolveContainers: M3 } = S2({ mainTreeNode: v2, portals: Z, defaultContainers: [te2] }), U = g !== null ? (g & i3.Closing) === i3.Closing : false;
|
|
210
|
+
y2(u5 || U ? false : D, { allowed: o2(() => {
|
|
211
|
+
var r3, W;
|
|
212
|
+
return [(W = (r3 = T2.current) == null ? void 0 : r3.closest("[data-headlessui-portal]")) != null ? W : null];
|
|
213
|
+
}), disallowed: o2(() => {
|
|
214
|
+
var r3;
|
|
215
|
+
return [(r3 = v2 == null ? void 0 : v2.closest("body > *:not(#headlessui-portal-root)")) != null ? r3 : null];
|
|
216
|
+
}) });
|
|
217
|
+
let P = x.get(null);
|
|
218
|
+
n(() => {
|
|
219
|
+
if (D) return P.actions.push(n6), () => P.actions.pop(n6);
|
|
220
|
+
}, [P, n6, D]);
|
|
221
|
+
let H2 = S(P, useCallback((r3) => P.selectors.isTop(r3, n6), [P, n6]));
|
|
222
|
+
k3(H2, M3, (r3) => {
|
|
223
|
+
r3.preventDefault(), m2();
|
|
224
|
+
}), a(H2, F2 == null ? void 0 : F2.defaultView, (r3) => {
|
|
225
|
+
r3.preventDefault(), r3.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), m2();
|
|
226
|
+
}), f2(u5 || U ? false : D, F2, M3), p2(D, T2, m2);
|
|
227
|
+
let [oe3, ne2] = H(), re2 = useMemo(() => [{ dialogState: c2, close: m2, setTitleId: B2, unmount: y3 }, b2], [c2, m2, B2, y3, b2]), N = n2({ open: c2 === 0 }), le2 = { ref: I3, id: n6, role: s5, tabIndex: -1, "aria-modal": u5 ? void 0 : c2 === 0 ? true : void 0, "aria-labelledby": b2.titleId, "aria-describedby": oe3, unmount: y3 }, ae = !f4(), E2 = G.None;
|
|
228
|
+
D && !u5 && (E2 |= G.RestoreFocus, E2 |= G.TabLock, f5 && (E2 |= G.AutoFocus), ae && (E2 |= G.InitialFocus));
|
|
229
|
+
let ie = K();
|
|
230
|
+
return l4.createElement(s4, null, l4.createElement(l4$1, { force: true }, l4.createElement(le, null, l4.createElement(w3.Provider, { value: re2 }, l4.createElement(B, { target: T2 }, l4.createElement(l4$1, { force: false }, l4.createElement(ne2, { slot: N }, l4.createElement(ee2, null, l4.createElement(ge, { initialFocus: d3, initialFocusFallback: T2, containers: M3, features: E2 }, l4.createElement(C, { value: m2 }, ie({ ourProps: le2, theirProps: S3, slot: N, defaultTag: Ne, features: We, visible: c2 === 0, name: "Dialog" })))))))))));
|
|
231
|
+
});
|
|
232
|
+
var Ne = "div";
|
|
233
|
+
var We = A.RenderStrategy | A.Static;
|
|
234
|
+
function $e(e2, t3) {
|
|
235
|
+
let { transition: o4 = false, open: a3, ...n6 } = e2, i5 = u3(), p4 = e2.hasOwnProperty("open") || i5 !== null, d3 = e2.hasOwnProperty("onClose");
|
|
236
|
+
if (!p4 && !d3) throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");
|
|
237
|
+
if (!p4) throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");
|
|
238
|
+
if (!d3) throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");
|
|
239
|
+
if (!i5 && typeof e2.open != "boolean") throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e2.open}`);
|
|
240
|
+
if (typeof e2.onClose != "function") throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e2.onClose}`);
|
|
241
|
+
return (a3 !== void 0 || o4) && !n6.static ? l4.createElement(j, null, l4.createElement(Ke, { show: a3, transition: o4, unmount: n6.unmount }, l4.createElement(z, { ref: t3, ...n6 }))) : l4.createElement(j, null, l4.createElement(z, { ref: t3, open: a3, ...n6 }));
|
|
242
|
+
}
|
|
243
|
+
var je = "div";
|
|
244
|
+
function Ye(e2, t3) {
|
|
245
|
+
let o4 = r(), { id: a3 = `headlessui-dialog-panel-${o4}`, transition: n6 = false, ...i5 } = e2, [{ dialogState: p4, unmount: d3 }, s5] = O("Dialog.Panel"), f5 = y(t3, s5.panelRef), u5 = n2({ open: p4 === 0 }), y3 = o2((I3) => {
|
|
246
|
+
I3.stopPropagation();
|
|
247
|
+
}), S3 = { ref: f5, id: a3, onClick: y3 }, R = n6 ? Oe : Fragment, g = n6 ? { unmount: d3 } : {}, T2 = K();
|
|
248
|
+
return l4.createElement(R, { ...g }, T2({ ourProps: S3, theirProps: i5, slot: u5, defaultTag: je, name: "Dialog.Panel" }));
|
|
249
|
+
}
|
|
250
|
+
var Je = "div";
|
|
251
|
+
function Ke2(e2, t3) {
|
|
252
|
+
let { transition: o4 = false, ...a3 } = e2, [{ dialogState: n6, unmount: i5 }] = O("Dialog.Backdrop"), p4 = n2({ open: n6 === 0 }), d3 = { ref: t3, "aria-hidden": true }, s5 = o4 ? Oe : Fragment, f5 = o4 ? { unmount: i5 } : {}, u5 = K();
|
|
253
|
+
return l4.createElement(s5, { ...f5 }, u5({ ourProps: d3, theirProps: a3, slot: p4, defaultTag: Je, name: "Dialog.Backdrop" }));
|
|
254
|
+
}
|
|
255
|
+
var Xe = "h2";
|
|
256
|
+
function Ve(e2, t3) {
|
|
257
|
+
let o4 = r(), { id: a3 = `headlessui-dialog-title-${o4}`, ...n6 } = e2, [{ dialogState: i5, setTitleId: p4 }] = O("Dialog.Title"), d3 = y(t3);
|
|
258
|
+
useEffect(() => (p4(a3), () => p4(null)), [a3, p4]);
|
|
259
|
+
let s5 = n2({ open: i5 === 0 }), f5 = { ref: d3, id: a3 };
|
|
260
|
+
return K()({ ourProps: f5, theirProps: n6, slot: s5, defaultTag: Xe, name: "Dialog.Title" });
|
|
261
|
+
}
|
|
262
|
+
var qe = Y($e);
|
|
263
|
+
var ze = Y(Ye);
|
|
264
|
+
Y(Ke2);
|
|
265
|
+
var Qe = Y(Ve);
|
|
266
|
+
var ht = Object.assign(qe, { Panel: ze, Title: Qe, Description: M });
|
|
267
|
+
var Modal = ({
|
|
268
|
+
onClose: close,
|
|
269
|
+
children,
|
|
270
|
+
visible = false,
|
|
271
|
+
closeOnOutsideClick = false
|
|
272
|
+
}) => {
|
|
273
|
+
const intl = useIntl();
|
|
274
|
+
const handleClose = () => {
|
|
275
|
+
if (closeOnOutsideClick && close) {
|
|
276
|
+
close();
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
return /* @__PURE__ */ jsx(Ke, { show: visible, children: /* @__PURE__ */ jsxs(ht, { onClose: handleClose, className: "relative z-50", children: [
|
|
280
|
+
/* @__PURE__ */ jsx(
|
|
281
|
+
Oe,
|
|
282
|
+
{
|
|
283
|
+
enter: "ease-out duration-200",
|
|
284
|
+
enterFrom: "opacity-0",
|
|
285
|
+
enterTo: "opacity-100",
|
|
286
|
+
leave: "ease-in duration-150",
|
|
287
|
+
leaveFrom: "opacity-100",
|
|
288
|
+
leaveTo: "opacity-0",
|
|
289
|
+
children: /* @__PURE__ */ jsx(
|
|
290
|
+
"div",
|
|
291
|
+
{
|
|
292
|
+
className: "fixed inset-0 bg-slate-950/60 backdrop-blur-sm",
|
|
293
|
+
"aria-hidden": "true"
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
}
|
|
297
|
+
),
|
|
298
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 overflow-y-auto", children: /* @__PURE__ */ jsx("div", { className: "flex min-h-full items-center justify-center p-4", children: /* @__PURE__ */ jsx(
|
|
299
|
+
Oe,
|
|
300
|
+
{
|
|
301
|
+
enter: "ease-out duration-200",
|
|
302
|
+
enterFrom: "opacity-0 scale-95 translate-y-4",
|
|
303
|
+
enterTo: "opacity-100 scale-100 translate-y-0",
|
|
304
|
+
leave: "ease-in duration-150",
|
|
305
|
+
leaveFrom: "opacity-100 scale-100 translate-y-0",
|
|
306
|
+
leaveTo: "opacity-0 scale-95 translate-y-4",
|
|
307
|
+
children: /* @__PURE__ */ jsxs(ze, { className: "relative w-full max-w-lg transform overflow-hidden rounded-lg bg-surface px-4 pt-5 pb-4 text-left shadow-2xl sm:p-6", children: [
|
|
308
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-0 right-0 pt-4 pr-4 sm:block", children: /* @__PURE__ */ jsxs(
|
|
309
|
+
"button",
|
|
310
|
+
{
|
|
311
|
+
id: "modal_close",
|
|
312
|
+
type: "button",
|
|
313
|
+
onClick: close,
|
|
314
|
+
className: "rounded-md bg-surface-input text-text-muted hover:text-text-secondary focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
|
|
315
|
+
children: [
|
|
316
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: intl.formatMessage({
|
|
317
|
+
id: "close",
|
|
318
|
+
defaultMessage: "Close"
|
|
319
|
+
}) }),
|
|
320
|
+
/* @__PURE__ */ jsx(
|
|
321
|
+
"svg",
|
|
322
|
+
{
|
|
323
|
+
className: "h-6 w-6",
|
|
324
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
325
|
+
fill: "none",
|
|
326
|
+
viewBox: "0 0 24 24",
|
|
327
|
+
stroke: "currentColor",
|
|
328
|
+
"aria-hidden": "true",
|
|
329
|
+
children: /* @__PURE__ */ jsx(
|
|
330
|
+
"path",
|
|
331
|
+
{
|
|
332
|
+
strokeLinecap: "round",
|
|
333
|
+
strokeLinejoin: "round",
|
|
334
|
+
strokeWidth: "2",
|
|
335
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
) }),
|
|
343
|
+
children && l4.isValidElement(children) ? l4.cloneElement(children, {
|
|
344
|
+
close
|
|
345
|
+
}) : children
|
|
346
|
+
] })
|
|
347
|
+
}
|
|
348
|
+
) }) })
|
|
349
|
+
] }) });
|
|
350
|
+
};
|
|
351
|
+
var Modal_default = Modal;
|
|
352
|
+
var ModalWrapper = ({ children }) => {
|
|
353
|
+
const [modalChildren, setChildren] = useState(null);
|
|
354
|
+
const [closeOnOutsideClick, setCloseOnOutsideClick] = useState(false);
|
|
355
|
+
const hideModal = () => setChildren(null);
|
|
356
|
+
const [onClose, setOnClose] = useState(() => hideModal);
|
|
357
|
+
const ctx = useMemo(() => {
|
|
358
|
+
const setModal = (newModalChildren, { closeOnOutsideClick: newCloseOnOutsideClick = false } = {}) => {
|
|
359
|
+
return new Promise((resolve) => {
|
|
360
|
+
if (!newModalChildren) {
|
|
361
|
+
resolve(true);
|
|
362
|
+
}
|
|
363
|
+
setCloseOnOutsideClick(newCloseOnOutsideClick);
|
|
364
|
+
setChildren(() => newModalChildren);
|
|
365
|
+
setOnClose(() => () => {
|
|
366
|
+
hideModal();
|
|
367
|
+
resolve(true);
|
|
368
|
+
});
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
return { setModal };
|
|
372
|
+
}, []);
|
|
373
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
374
|
+
/* @__PURE__ */ jsx(
|
|
375
|
+
Modal_default,
|
|
376
|
+
{
|
|
377
|
+
visible: !!modalChildren,
|
|
378
|
+
onClose,
|
|
379
|
+
closeOnOutsideClick,
|
|
380
|
+
children: modalChildren
|
|
381
|
+
}
|
|
382
|
+
),
|
|
383
|
+
/* @__PURE__ */ jsx(ModalContext_default.Provider, { value: ctx, children })
|
|
384
|
+
] });
|
|
385
|
+
};
|
|
386
|
+
var ModalWrapper_default = ModalWrapper;
|
|
387
|
+
|
|
388
|
+
export { ModalWrapper_default, Modal_default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// src/sdk/shims/host.ts
|
|
2
|
+
function hostDep(specifier) {
|
|
3
|
+
let resolved = void 0;
|
|
4
|
+
let didResolve = false;
|
|
5
|
+
const resolve = () => {
|
|
6
|
+
if (didResolve) return resolved;
|
|
7
|
+
const deps = typeof window !== "undefined" && window.__UNCHAINED_PLUGIN_DEPS__;
|
|
8
|
+
const dep = deps?.[specifier];
|
|
9
|
+
if (!dep) {
|
|
10
|
+
throw new Error(
|
|
11
|
+
`Unchained admin-ui plugin runtime: host dependency "${specifier}" is not available. Plugin modules can only be loaded by the admin-ui after its plugin runtime is initialized.`
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
resolved = dep;
|
|
15
|
+
didResolve = true;
|
|
16
|
+
return dep;
|
|
17
|
+
};
|
|
18
|
+
return new Proxy(/* @__PURE__ */ Object.create(null), {
|
|
19
|
+
get(_target, prop) {
|
|
20
|
+
if (prop === Symbol.toPrimitive || prop === Symbol.toStringTag) {
|
|
21
|
+
return void 0;
|
|
22
|
+
}
|
|
23
|
+
return resolve()[prop];
|
|
24
|
+
},
|
|
25
|
+
set(_target, prop, value) {
|
|
26
|
+
resolve()[prop] = value;
|
|
27
|
+
return true;
|
|
28
|
+
},
|
|
29
|
+
has(_target, prop) {
|
|
30
|
+
return prop in resolve();
|
|
31
|
+
},
|
|
32
|
+
ownKeys() {
|
|
33
|
+
return Reflect.ownKeys(resolve());
|
|
34
|
+
},
|
|
35
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
36
|
+
return Object.getOwnPropertyDescriptor(resolve(), prop);
|
|
37
|
+
},
|
|
38
|
+
getPrototypeOf() {
|
|
39
|
+
return Object.getPrototypeOf(resolve());
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { hostDep };
|