@unchainedshop/admin-ui 4.8.32 → 4.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/chunks/{2wmsx4gjbgvfv.js → 0bc8hmxlcg6h5.js} +5 -5
- package/out/_next/static/chunks/{07o9g5hqfpvjc.js → 0djb38xrt32ao.js} +1 -1
- package/out/_next/static/chunks/{41p3ng89i5lem.js → 0drw_p7p-jjq1.js} +2 -2
- package/out/_next/static/chunks/{2rb1-3t3-sv5s.js → 0hz0qu27uks3z.js} +2 -2
- package/out/_next/static/chunks/{1s9v5dndopkuz.js → 0rzjz052fwjjc.js} +1 -1
- package/out/_next/static/chunks/170d-jbu8ilzu.js +100 -0
- package/out/_next/static/chunks/1a9-pdm78ri7r.js +1 -0
- package/out/_next/static/chunks/{3q3m075m4bxz1.js → 1epju6xepfqtq.js} +2 -2
- package/out/_next/static/chunks/{1qi5yjvzxspwv.js → 1r0w-hk6d2kqw.js} +1 -1
- package/out/_next/static/chunks/25frktmrq-xu0.js +1 -0
- package/out/_next/static/chunks/{2jonbba27xy3u.js → 2cclew3l28rc4.js} +1 -1
- package/out/_next/static/chunks/{1f7-0l47bx76m.js → 2olb298bph2yc.js} +1 -1
- package/out/_next/static/chunks/{11go520d1hcm5.js → 33_-2ne9ecvay.js} +1 -1
- package/out/_next/static/chunks/33qeilxkl3ckn.js +116 -0
- package/out/_next/static/chunks/{33yzdcbu7w60l.js → 33tewe5d_lfl-.js} +1 -1
- package/out/_next/static/chunks/{0qj3xdz043z8l.js → 3i9q2-4e0mix5.js} +1 -1
- package/out/_next/static/chunks/3m4smrmdqi2-3.js +5 -0
- package/out/_next/static/chunks/{1g96s7-fwvokd.js → 3zw4-oie-f7_0.js} +1 -1
- package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → nrNmgRi1nHylx_8lvjG2D}/_buildManifest.js +10 -10
- 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 +19 -19
- package/out/_next/static/chunks/0a5nr3-_q7xx1.js +0 -100
- package/out/_next/static/chunks/1sksqjru86hlm.js +0 -1
- package/out/_next/static/chunks/1wnuiwsbi70eq.js +0 -116
- package/out/_next/static/chunks/2cj8g3fxmitaa.js +0 -1
- package/out/_next/static/chunks/3wlvio5id54ow.js +0 -5
- /package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → nrNmgRi1nHylx_8lvjG2D}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{jOx5PlckLwWIJ5yrvePdU → nrNmgRi1nHylx_8lvjG2D}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { useUnchainedContext_default } from '../chunk-IAQPLRXZ.js';
|
|
2
|
+
import '../chunk-WPLOTFGW.js';
|
|
3
|
+
import { gql } from '@apollo/client';
|
|
4
|
+
import { useMutation, useQuery } from '@apollo/client/react';
|
|
5
|
+
|
|
6
|
+
var PaymentProviderFragment = gql`
|
|
7
|
+
fragment PaymentProviderFragment on PaymentProvider {
|
|
8
|
+
_id
|
|
9
|
+
created
|
|
10
|
+
updated
|
|
11
|
+
deleted
|
|
12
|
+
isActive
|
|
13
|
+
type
|
|
14
|
+
interface {
|
|
15
|
+
_id
|
|
16
|
+
label
|
|
17
|
+
version
|
|
18
|
+
}
|
|
19
|
+
configuration
|
|
20
|
+
configurationError
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
var PaymentProviderFragment_default = PaymentProviderFragment;
|
|
24
|
+
|
|
25
|
+
// src/modules/payment-providers/hooks/useCreatePaymentProvider.ts
|
|
26
|
+
var CreatePaymentProviderMutation = gql`
|
|
27
|
+
mutation CreatePaymentProvider(
|
|
28
|
+
$paymentProvider: CreatePaymentProviderInput!
|
|
29
|
+
) {
|
|
30
|
+
createPaymentProvider(paymentProvider: $paymentProvider) {
|
|
31
|
+
...PaymentProviderFragment
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
${PaymentProviderFragment_default}
|
|
35
|
+
`;
|
|
36
|
+
var useCreatePaymentProvider = () => {
|
|
37
|
+
const [createPaymentProviderMutation, { data, loading, error }] = useMutation(CreatePaymentProviderMutation);
|
|
38
|
+
const createPaymentProvider = async ({
|
|
39
|
+
paymentProvider
|
|
40
|
+
}) => {
|
|
41
|
+
return createPaymentProviderMutation({
|
|
42
|
+
variables: { paymentProvider },
|
|
43
|
+
refetchQueries: ["PaymentProviders", "ShopStatus"]
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
const newPaymentProvider = data?.createPaymentProvider;
|
|
47
|
+
return {
|
|
48
|
+
createPaymentProvider,
|
|
49
|
+
newPaymentProvider,
|
|
50
|
+
loading,
|
|
51
|
+
error
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
var useCreatePaymentProvider_default = useCreatePaymentProvider;
|
|
55
|
+
var PaymentInterfacesQuery = gql`
|
|
56
|
+
query PaymentInterfaces($providerType: PaymentProviderType) {
|
|
57
|
+
paymentInterfaces(type: $providerType) {
|
|
58
|
+
_id
|
|
59
|
+
value: _id
|
|
60
|
+
label
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
var usePaymentInterfacesByType = ({
|
|
65
|
+
providerType
|
|
66
|
+
}) => {
|
|
67
|
+
const { data, loading, error } = useQuery(PaymentInterfacesQuery, {
|
|
68
|
+
skip: !providerType,
|
|
69
|
+
variables: { providerType }
|
|
70
|
+
});
|
|
71
|
+
const paymentInterfaces = data?.paymentInterfaces || [];
|
|
72
|
+
return {
|
|
73
|
+
paymentInterfaces,
|
|
74
|
+
loading,
|
|
75
|
+
error
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
var usePaymentInterfacesByType_default = usePaymentInterfacesByType;
|
|
79
|
+
var GetPaymentProviderQuery = (inlineFragment = "") => gql`
|
|
80
|
+
query PaymentProvider($paymentProviderId: ID!) {
|
|
81
|
+
paymentProvider(paymentProviderId: $paymentProviderId) {
|
|
82
|
+
...PaymentProviderFragment
|
|
83
|
+
${inlineFragment}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
${PaymentProviderFragment_default}
|
|
87
|
+
`;
|
|
88
|
+
var usePaymentProvider = ({
|
|
89
|
+
paymentProviderId = null
|
|
90
|
+
}) => {
|
|
91
|
+
const { customProperties } = useUnchainedContext_default();
|
|
92
|
+
const { data, loading, error } = useQuery(GetPaymentProviderQuery(customProperties?.PaymentProvider), {
|
|
93
|
+
skip: !paymentProviderId,
|
|
94
|
+
variables: { paymentProviderId }
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
paymentProvider: data?.paymentProvider,
|
|
98
|
+
loading,
|
|
99
|
+
error
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
var usePaymentProvider_default = usePaymentProvider;
|
|
103
|
+
var PaymentProvidersTypeQuery = gql`
|
|
104
|
+
query PaymentProvidersType {
|
|
105
|
+
paymentProviderType: __type(name: "PaymentProviderType") {
|
|
106
|
+
options: enumValues {
|
|
107
|
+
value: name
|
|
108
|
+
label: description
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
`;
|
|
113
|
+
var usePaymentProviderTypes = () => {
|
|
114
|
+
const { data, loading, error } = useQuery(PaymentProvidersTypeQuery);
|
|
115
|
+
const paymentProviderType = data?.paymentProviderType?.options || [];
|
|
116
|
+
return {
|
|
117
|
+
paymentProviderType,
|
|
118
|
+
loading,
|
|
119
|
+
error
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
var usePaymentProviderTypes_default = usePaymentProviderTypes;
|
|
123
|
+
var PaymentProvidersQuery = gql`
|
|
124
|
+
query PaymentProviders($type: PaymentProviderType) {
|
|
125
|
+
paymentProviders(type: $type) {
|
|
126
|
+
...PaymentProviderFragment
|
|
127
|
+
}
|
|
128
|
+
paymentProvidersCount(type: $type)
|
|
129
|
+
}
|
|
130
|
+
${PaymentProviderFragment_default}
|
|
131
|
+
`;
|
|
132
|
+
var usePaymentProviders = ({
|
|
133
|
+
type = null
|
|
134
|
+
} = {}) => {
|
|
135
|
+
const variables = {};
|
|
136
|
+
if (type) variables.type = type;
|
|
137
|
+
const { data, loading, error } = useQuery(PaymentProvidersQuery, {
|
|
138
|
+
variables
|
|
139
|
+
});
|
|
140
|
+
const paymentProviders = data?.paymentProviders || [];
|
|
141
|
+
return {
|
|
142
|
+
paymentProviders,
|
|
143
|
+
loading,
|
|
144
|
+
error,
|
|
145
|
+
paymentProvidersCount: data?.paymentProvidersCount || 0
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
var usePaymentProviders_default = usePaymentProviders;
|
|
149
|
+
var RemovePaymentProviderMutation = gql`
|
|
150
|
+
mutation RemovePaymentProvider($paymentProviderId: ID!) {
|
|
151
|
+
removePaymentProvider(paymentProviderId: $paymentProviderId) {
|
|
152
|
+
_id
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
156
|
+
var useRemovePaymentProvider = () => {
|
|
157
|
+
const [removePaymentProviderMutation] = useMutation(RemovePaymentProviderMutation);
|
|
158
|
+
const removePaymentProvider = async ({
|
|
159
|
+
paymentProviderId
|
|
160
|
+
}) => {
|
|
161
|
+
return removePaymentProviderMutation({
|
|
162
|
+
variables: {
|
|
163
|
+
paymentProviderId
|
|
164
|
+
},
|
|
165
|
+
refetchQueries: ["PaymentProviders", "ShopStatus"]
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
return {
|
|
169
|
+
removePaymentProvider
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
var useRemovePaymentProvider_default = useRemovePaymentProvider;
|
|
173
|
+
var UpdatePaymentProviderMutation = gql`
|
|
174
|
+
mutation UpdatePaymentProvider(
|
|
175
|
+
$paymentProvider: UpdateProviderInput!
|
|
176
|
+
$paymentProviderId: ID!
|
|
177
|
+
) {
|
|
178
|
+
updatePaymentProvider(
|
|
179
|
+
paymentProvider: $paymentProvider
|
|
180
|
+
paymentProviderId: $paymentProviderId
|
|
181
|
+
) {
|
|
182
|
+
...PaymentProviderFragment
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
${PaymentProviderFragment_default}
|
|
186
|
+
`;
|
|
187
|
+
var useUpdatePaymentProvider = () => {
|
|
188
|
+
const [updatePaymentProviderMutation] = useMutation(UpdatePaymentProviderMutation);
|
|
189
|
+
const updatePaymentProvider = async ({
|
|
190
|
+
configuration,
|
|
191
|
+
paymentProviderId
|
|
192
|
+
}) => {
|
|
193
|
+
return updatePaymentProviderMutation({
|
|
194
|
+
variables: {
|
|
195
|
+
paymentProvider: { configuration },
|
|
196
|
+
paymentProviderId
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
return {
|
|
201
|
+
updatePaymentProvider
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
var useUpdatePaymentProvider_default = useUpdatePaymentProvider;
|
|
205
|
+
|
|
206
|
+
export { useCreatePaymentProvider_default as useCreatePaymentProvider, usePaymentInterfacesByType_default as usePaymentInterfacesByType, usePaymentProvider_default as usePaymentProvider, usePaymentProviderTypes_default as usePaymentProviderTypes, usePaymentProviders_default as usePaymentProviders, useRemovePaymentProvider_default as useRemovePaymentProvider, useUpdatePaymentProvider_default as useUpdatePaymentProvider };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IProductsCountQueryVariables } from '../../../gql/types';
|
|
2
|
+
declare const useProductsCount: ({ queryString, tags, includeDrafts, }: IProductsCountQueryVariables) => {
|
|
3
|
+
productsCount: number;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: import("@apollo/client").ErrorLike;
|
|
6
|
+
};
|
|
7
|
+
export default useProductsCount;
|
|
8
|
+
//# sourceMappingURL=useProductsCount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProductsCount.d.ts","sourceRoot":"","sources":["../../../../src/modules/product/hooks/useProductsCount.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,4BAA4B,EAC7B,MAAM,oBAAoB,CAAC;AAkB5B,QAAA,MAAM,gBAAgB,GAAI,uCAIvB,4BAA4B;;;;CAoB9B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { ProductReviewDetailFragment_default } from '../chunk-ILYPJE4N.js';
|
|
2
|
+
import { ProductBriefFragment_default } from '../chunk-EJDZRZSZ.js';
|
|
3
|
+
import { useApp_default } from '../chunk-BOMSMJF2.js';
|
|
4
|
+
import '../chunk-ELPURWDC.js';
|
|
5
|
+
import '../chunk-RAQV2GYF.js';
|
|
6
|
+
import '../chunk-54DKBWXV.js';
|
|
7
|
+
import '../chunk-J23QSWDL.js';
|
|
8
|
+
import '../chunk-QWQ3WJJN.js';
|
|
9
|
+
import '../chunk-GY2DRQGW.js';
|
|
10
|
+
import '../chunk-IAQPLRXZ.js';
|
|
11
|
+
import '../chunk-WPLOTFGW.js';
|
|
12
|
+
import { gql } from '@apollo/client';
|
|
13
|
+
import { useMutation, useQuery } from '@apollo/client/react';
|
|
14
|
+
|
|
15
|
+
var AddProductReviewVoteMutation = gql`
|
|
16
|
+
mutation AddProductReviewVote(
|
|
17
|
+
$productReviewId: ID!
|
|
18
|
+
$type: ProductReviewVoteType!
|
|
19
|
+
$meta: JSON
|
|
20
|
+
$forceLocale: Locale
|
|
21
|
+
) {
|
|
22
|
+
addProductReviewVote(
|
|
23
|
+
productReviewId: $productReviewId
|
|
24
|
+
type: $type
|
|
25
|
+
meta: $meta
|
|
26
|
+
) {
|
|
27
|
+
_id
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
var useAddProductReviewVote = () => {
|
|
32
|
+
const [addProductReviewVoteMutation] = useMutation(AddProductReviewVoteMutation);
|
|
33
|
+
const addProductReviewVote = async ({
|
|
34
|
+
productReviewId,
|
|
35
|
+
type,
|
|
36
|
+
meta
|
|
37
|
+
}) => {
|
|
38
|
+
return addProductReviewVoteMutation({
|
|
39
|
+
variables: {
|
|
40
|
+
productReviewId,
|
|
41
|
+
type,
|
|
42
|
+
meta
|
|
43
|
+
},
|
|
44
|
+
refetchQueries: ["ProductReviewByProduct", "ProductReviewByUser"]
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
addProductReviewVote
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
var useAddProductReviewVote_default = useAddProductReviewVote;
|
|
52
|
+
var CreateProductReviewMutation = gql`
|
|
53
|
+
mutation CreateProductReview(
|
|
54
|
+
$productId: ID!
|
|
55
|
+
$productReview: ProductReviewInput!
|
|
56
|
+
$forceLocale: Locale
|
|
57
|
+
) {
|
|
58
|
+
createProductReview(productId: $productId, productReview: $productReview) {
|
|
59
|
+
_id
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
var useCreateProductReview = () => {
|
|
64
|
+
const [createProductReviewMutation] = useMutation(CreateProductReviewMutation);
|
|
65
|
+
const createProductReview = async ({
|
|
66
|
+
productId,
|
|
67
|
+
productReview: { title, rating, review }
|
|
68
|
+
}) => {
|
|
69
|
+
return createProductReviewMutation({
|
|
70
|
+
variables: {
|
|
71
|
+
productId,
|
|
72
|
+
productReview: {
|
|
73
|
+
title,
|
|
74
|
+
rating,
|
|
75
|
+
review
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
refetchQueries: ["ProductReviewByProduct", "ProductReviewByUser"]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
createProductReview
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
var useCreateProductReview_default = useCreateProductReview;
|
|
86
|
+
var ProductReviewQuery = gql`
|
|
87
|
+
query ProductReviewByProduct(
|
|
88
|
+
$productId: ID
|
|
89
|
+
$slug: String
|
|
90
|
+
$limit: Int
|
|
91
|
+
$offset: Int
|
|
92
|
+
$sort: [SortOptionInput!]
|
|
93
|
+
$forceLocale: Locale
|
|
94
|
+
) {
|
|
95
|
+
product(productId: $productId, slug: $slug) {
|
|
96
|
+
_id
|
|
97
|
+
reviews(limit: $limit, offset: $offset, sort: $sort) {
|
|
98
|
+
...ProductReviewDetailFragment
|
|
99
|
+
}
|
|
100
|
+
reviewsCount
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
${ProductReviewDetailFragment_default}
|
|
104
|
+
`;
|
|
105
|
+
var useProductReviewsByProductId = ({
|
|
106
|
+
productId = null,
|
|
107
|
+
slug = null,
|
|
108
|
+
limit = 10,
|
|
109
|
+
offset = 0,
|
|
110
|
+
sort: sortOptions = [{ key: "created", value: "DESC" /* Desc */ }]
|
|
111
|
+
} = {}) => {
|
|
112
|
+
const { selectedLocale } = useApp_default();
|
|
113
|
+
const { data, loading, error, fetchMore } = useQuery(ProductReviewQuery, {
|
|
114
|
+
skip: !productId,
|
|
115
|
+
variables: {
|
|
116
|
+
productId,
|
|
117
|
+
slug,
|
|
118
|
+
limit,
|
|
119
|
+
offset,
|
|
120
|
+
sort: sortOptions,
|
|
121
|
+
forceLocale: selectedLocale
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
const product = data?.product;
|
|
125
|
+
const productReviews = product?.reviews || [];
|
|
126
|
+
const reviewsCount = product?.reviewsCount || 0;
|
|
127
|
+
const loadMore = () => {
|
|
128
|
+
fetchMore({
|
|
129
|
+
variables: { offset: productReviews?.length }
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
return {
|
|
133
|
+
productReviews,
|
|
134
|
+
loading,
|
|
135
|
+
error,
|
|
136
|
+
reviewsCount,
|
|
137
|
+
loadMore
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
var useProductReviewsByProductId_default = useProductReviewsByProductId;
|
|
141
|
+
var RemoveProductReviewMutation = gql`
|
|
142
|
+
mutation RemoveProductReview($productReviewId: ID!) {
|
|
143
|
+
removeProductReview(productReviewId: $productReviewId) {
|
|
144
|
+
_id
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
var useRemoveProductReview = () => {
|
|
149
|
+
const [removeProductReviewMutation] = useMutation(RemoveProductReviewMutation);
|
|
150
|
+
const removeProductReview = async ({
|
|
151
|
+
productReviewId
|
|
152
|
+
}) => {
|
|
153
|
+
return removeProductReviewMutation({
|
|
154
|
+
variables: {
|
|
155
|
+
productReviewId
|
|
156
|
+
},
|
|
157
|
+
refetchQueries: ["ProductReviewByProduct", "ProductReviewByUser"]
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
removeProductReview
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
var useRemoveProductReview_default = useRemoveProductReview;
|
|
165
|
+
var RemoveProductReviewVoteMutation = gql`
|
|
166
|
+
mutation RemoveProductReviewVote(
|
|
167
|
+
$productReviewId: ID!
|
|
168
|
+
$type: ProductReviewVoteType!
|
|
169
|
+
$forceLocale: Locale
|
|
170
|
+
) {
|
|
171
|
+
removeProductReviewVote(productReviewId: $productReviewId, type: $type) {
|
|
172
|
+
_id
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
var useRemoveProductReviewVote = () => {
|
|
177
|
+
const [removeProductReviewVoteMutation] = useMutation(RemoveProductReviewVoteMutation);
|
|
178
|
+
const removeProductReviewVote = async ({
|
|
179
|
+
productReviewId,
|
|
180
|
+
type
|
|
181
|
+
}) => {
|
|
182
|
+
return removeProductReviewVoteMutation({
|
|
183
|
+
variables: {
|
|
184
|
+
productReviewId,
|
|
185
|
+
type
|
|
186
|
+
},
|
|
187
|
+
refetchQueries: ["ProductReviewByProduct", "ProductReviewByUser"]
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
return {
|
|
191
|
+
removeProductReviewVote
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
var useRemoveProductReviewVote_default = useRemoveProductReviewVote;
|
|
195
|
+
var ProductReviewQuery2 = gql`
|
|
196
|
+
query UserProductReviews(
|
|
197
|
+
$userId: ID!
|
|
198
|
+
$limit: Int
|
|
199
|
+
$offset: Int
|
|
200
|
+
$sort: [SortOptionInput!]
|
|
201
|
+
$forceLocale: Locale
|
|
202
|
+
) {
|
|
203
|
+
user(userId: $userId) {
|
|
204
|
+
_id
|
|
205
|
+
reviews(limit: $limit, offset: $offset, sort: $sort) {
|
|
206
|
+
_id
|
|
207
|
+
created
|
|
208
|
+
updated
|
|
209
|
+
deleted
|
|
210
|
+
author {
|
|
211
|
+
_id
|
|
212
|
+
name
|
|
213
|
+
avatar {
|
|
214
|
+
_id
|
|
215
|
+
url
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
product {
|
|
219
|
+
...ProductBriefFragment
|
|
220
|
+
}
|
|
221
|
+
title
|
|
222
|
+
review
|
|
223
|
+
upVote: voteCount(type: UPVOTE)
|
|
224
|
+
downVote: voteCount(type: DOWNVOTE)
|
|
225
|
+
ownVotes {
|
|
226
|
+
timestamp
|
|
227
|
+
type
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
reviewsCount
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
${ProductBriefFragment_default}
|
|
234
|
+
`;
|
|
235
|
+
var useUserProductReviews = ({
|
|
236
|
+
userId = null,
|
|
237
|
+
limit = 10,
|
|
238
|
+
offset = 0,
|
|
239
|
+
sort: sortOptions = [{ key: "created", value: "DESC" /* Desc */ }]
|
|
240
|
+
}) => {
|
|
241
|
+
const { selectedLocale } = useApp_default();
|
|
242
|
+
const { data, loading, error, fetchMore } = useQuery(ProductReviewQuery2, {
|
|
243
|
+
skip: !userId,
|
|
244
|
+
variables: {
|
|
245
|
+
userId,
|
|
246
|
+
limit,
|
|
247
|
+
offset,
|
|
248
|
+
sort: sortOptions,
|
|
249
|
+
forceLocale: selectedLocale
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
const user = data?.user;
|
|
253
|
+
const reviews = user?.reviews || [];
|
|
254
|
+
const reviewsCount = user?.reviewsCount || 0;
|
|
255
|
+
const loadMore = () => {
|
|
256
|
+
fetchMore({
|
|
257
|
+
variables: { offset: reviews?.length }
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
return {
|
|
261
|
+
reviews,
|
|
262
|
+
loading,
|
|
263
|
+
error,
|
|
264
|
+
loadMore,
|
|
265
|
+
reviewsCount
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
var useUserProductReviews_default = useUserProductReviews;
|
|
269
|
+
|
|
270
|
+
export { useAddProductReviewVote_default as useAddProductReviewVote, useCreateProductReview_default as useCreateProductReview, useProductReviewsByProductId_default as useProductReviewsByProductId, useRemoveProductReview_default as useRemoveProductReview, useRemoveProductReviewVote_default as useRemoveProductReviewVote, useUserProductReviews_default as useUserProductReviews };
|