ingeniuscliq-core 0.4.14 → 0.4.16
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/README.md +417 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +3 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +3 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +3 -0
- package/dist/assets/logo.svg.js +3 -0
- package/dist/classes/CoreBuilder.d.ts +1 -0
- package/dist/classes/CoreBuilder.d.ts.map +1 -0
- package/dist/classes/CoreBuilder.js +4 -0
- package/dist/classes/index.d.ts +1 -0
- package/dist/classes/index.d.ts.map +1 -0
- package/dist/components/common/carousel/CustomCarousel.d.ts +2 -1
- package/dist/components/common/carousel/CustomCarousel.d.ts.map +1 -0
- package/dist/components/common/carousel/CustomCarousel.tsx +26 -0
- package/dist/components/common/carousel/CustomCarouselSection.d.ts +2 -1
- package/dist/components/common/carousel/CustomCarouselSection.d.ts.map +1 -0
- package/dist/components/common/carousel/CustomCarouselSection.tsx +41 -0
- package/dist/components/common/carousel/index.d.ts +3 -2
- package/dist/components/common/carousel/index.d.ts.map +1 -0
- package/dist/components/common/form/CustomFormField.d.ts +4 -2
- package/dist/components/common/form/CustomFormField.d.ts.map +1 -0
- package/dist/components/common/form/CustomFormField.tsx +29 -0
- package/dist/components/common/form/FormCheckbox.d.ts +5 -1
- package/dist/components/common/form/FormCheckbox.d.ts.map +1 -0
- package/dist/components/common/form/FormCheckbox.tsx +57 -0
- package/dist/components/common/form/FormInput.d.ts +4 -1
- package/dist/components/common/form/FormInput.d.ts.map +1 -0
- package/dist/components/common/form/FormInput.tsx +60 -0
- package/dist/components/common/form/FormSelect.d.ts +8 -2
- package/dist/components/common/form/FormSelect.d.ts.map +1 -0
- package/dist/components/common/form/FormSelect.tsx +78 -0
- package/dist/components/common/form/FormTextArea.d.ts +6 -4
- package/dist/components/common/form/FormTextArea.d.ts.map +1 -0
- package/dist/components/common/form/FormTextArea.tsx +57 -0
- package/dist/components/common/form/FormWrapper.d.ts +2 -1
- package/dist/components/common/form/FormWrapper.d.ts.map +1 -0
- package/dist/components/common/form/FormWrapper.tsx +21 -0
- package/dist/components/common/form/index.d.ts +4 -3
- package/dist/components/common/form/index.d.ts.map +1 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/components/common/index.d.ts.map +1 -0
- package/dist/components/common/logo/Logo.d.ts +2 -1
- package/dist/components/common/logo/Logo.d.ts.map +1 -0
- package/dist/components/common/logo/Logo.tsx +40 -0
- package/dist/components/common/logo/index.d.ts +1 -0
- package/dist/components/common/logo/index.d.ts.map +1 -0
- package/dist/components/common/pagination/CustomPagination.d.ts +2 -1
- package/dist/components/common/pagination/CustomPagination.d.ts.map +1 -0
- package/dist/components/common/pagination/CustomPagination.tsx +64 -0
- package/dist/components/common/pagination/index.d.ts +1 -0
- package/dist/components/common/pagination/index.d.ts.map +1 -0
- package/dist/components/common/select/CustomSelect.d.ts +2 -1
- package/dist/components/common/select/CustomSelect.d.ts.map +1 -0
- package/dist/components/common/select/CustomSelect.tsx +27 -0
- package/dist/components/common/select/index.d.ts +1 -0
- package/dist/components/common/select/index.d.ts.map +1 -0
- package/dist/components/common/spinner/Spinner.d.ts +1 -0
- package/dist/components/common/spinner/Spinner.d.ts.map +1 -0
- package/dist/components/common/spinner/Spinner.tsx +32 -0
- package/dist/components/common/spinner/index.d.ts +1 -0
- package/dist/components/common/spinner/index.d.ts.map +1 -0
- package/dist/components/common/stepper/Stepper.d.ts +18 -0
- package/dist/components/common/stepper/Stepper.d.ts.map +1 -0
- package/dist/components/common/stepper/Stepper.tsx +59 -0
- package/dist/components/common/stepper/index.d.ts +2 -0
- package/dist/components/common/stepper/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +5 -4
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/layouts/CoreBaseLayout.d.ts +3 -1
- package/dist/components/layouts/CoreBaseLayout.d.ts.map +1 -0
- package/dist/components/layouts/CoreBaseLayout.tsx +19 -0
- package/dist/components/layouts/index.d.ts +1 -0
- package/dist/components/layouts/index.d.ts.map +1 -0
- package/dist/components/templates/CoreHomeLayout.d.ts +1 -0
- package/dist/components/templates/CoreHomeLayout.d.ts.map +1 -0
- package/dist/components/templates/CoreHomeLayout.tsx +8 -0
- package/dist/components/templates/CorePreviewLayout.d.ts +2 -1
- package/dist/components/templates/CorePreviewLayout.d.ts.map +1 -0
- package/dist/components/templates/CorePreviewLayout.tsx +27 -0
- package/dist/components/templates/index.d.ts +1 -0
- package/dist/components/templates/index.d.ts.map +1 -0
- package/dist/components/ui/accordion.d.ts +5 -4
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.tsx +44 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -11
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.tsx +106 -0
- package/dist/components/ui/alert.d.ts +5 -5
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.tsx +49 -0
- package/dist/components/ui/avatar.d.ts +4 -3
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.tsx +40 -0
- package/dist/components/ui/badge.d.ts +5 -3
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.tsx +26 -0
- package/dist/components/ui/breadcrumb.d.ts +17 -8
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.tsx +88 -0
- package/dist/components/ui/button.d.ts +5 -3
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.tsx +47 -0
- package/dist/components/ui/card.d.ts +9 -8
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.tsx +68 -0
- package/dist/components/ui/carousel.d.ts +6 -6
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.tsx +191 -0
- package/dist/components/ui/checkbox.d.ts +2 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.tsx +28 -0
- package/dist/components/ui/dialog.d.ts +19 -12
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.tsx +95 -0
- package/dist/components/ui/dropdown-menu.d.ts +24 -20
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.tsx +140 -0
- package/dist/components/ui/form.d.ts +6 -6
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/form.tsx +102 -0
- package/dist/components/ui/index.d.ts +2 -6
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +3 -3
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.tsx +25 -0
- package/dist/components/ui/label.d.ts +3 -1
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.tsx +20 -0
- package/dist/components/ui/pagination.d.ts +27 -12
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.tsx +122 -0
- package/dist/components/ui/popover.d.ts +5 -4
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.tsx +24 -0
- package/dist/components/ui/radio-group.d.ts +3 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.tsx +34 -0
- package/dist/components/ui/select.d.ts +13 -12
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.tsx +128 -0
- package/dist/components/ui/separator.d.ts +2 -1
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.tsx +24 -0
- package/dist/components/ui/sheet.d.ts +26 -11
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.tsx +106 -0
- package/dist/components/ui/skeleton.d.ts +3 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.tsx +17 -0
- package/dist/components/ui/slider.d.ts +2 -1
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.tsx +31 -0
- package/dist/components/ui/stepper.d.ts +40 -32
- package/dist/components/ui/stepper.d.ts.map +1 -0
- package/dist/components/ui/stepper.tsx +452 -0
- package/dist/components/ui/switch.d.ts +2 -1
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.tsx +27 -0
- package/dist/components/ui/table.d.ts +9 -8
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.tsx +80 -0
- package/dist/components/ui/tabs.d.ts +5 -4
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.tsx +45 -0
- package/dist/components/ui/textarea.d.ts +2 -1
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.tsx +22 -0
- package/dist/components/ui/tooltip.d.ts +5 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.tsx +23 -0
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/helpers/axiosGlobal.d.ts +7 -5
- package/dist/helpers/axiosGlobal.d.ts.map +1 -0
- package/dist/helpers/axiosGlobal.js +66 -0
- package/dist/helpers/image.d.ts +1 -0
- package/dist/helpers/image.d.ts.map +1 -0
- package/dist/helpers/image.js +11 -0
- package/dist/helpers/index.d.ts +1 -2
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/numbers.d.ts +1 -0
- package/dist/helpers/numbers.d.ts.map +1 -0
- package/dist/helpers/numbers.js +8 -0
- package/dist/helpers/strings.d.ts +1 -0
- package/dist/helpers/strings.d.ts.map +1 -0
- package/dist/helpers/strings.js +6 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +16 -0
- package/dist/hooks/useLanguage.d.ts +5 -0
- package/dist/hooks/useLanguage.d.ts.map +1 -0
- package/dist/hooks/useLanguage.js +32 -0
- package/dist/hooks/useNotification.d.ts +1 -0
- package/dist/hooks/useNotification.d.ts.map +1 -0
- package/dist/hooks/useNotification.js +17 -0
- package/dist/i18n/config.d.ts +82 -68
- package/dist/i18n/config.d.ts.map +1 -0
- package/dist/i18n/config.js +58 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/locales/en.json.js +12 -0
- package/dist/i18n/locales/es.json.js +12 -0
- package/dist/i18n/locales/fields/en.json.js +52 -0
- package/dist/i18n/locales/fields/es.json.js +52 -0
- package/dist/i18n/locales/messages/en.json.js +14 -0
- package/dist/i18n/locales/messages/es.json.js +14 -0
- package/dist/i18n/utils/getModuleNamespace.d.ts +16 -0
- package/dist/i18n/utils/getModuleNamespace.d.ts.map +1 -0
- package/dist/i18n/utils/getModuleNamespace.js +10 -0
- package/dist/i18n/utils/loadModuleTranslations.d.ts +5 -0
- package/dist/i18n/utils/loadModuleTranslations.d.ts.map +1 -0
- package/dist/i18n/utils/loadModuleTranslations.js +21 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +87 -20192
- package/dist/ingeniuscliq-core.css +1240 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +8 -0
- package/dist/modules/CoreAuth/classes/CoreAuthBuilder.d.ts +5 -3
- package/dist/modules/CoreAuth/classes/CoreAuthBuilder.d.ts.map +1 -0
- package/dist/modules/CoreAuth/classes/CoreAuthBuilder.js +185 -0
- package/dist/modules/CoreAuth/classes/index.d.ts +1 -0
- package/dist/modules/CoreAuth/classes/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/constants/auth.d.ts +1 -0
- package/dist/modules/CoreAuth/constants/auth.d.ts.map +1 -0
- package/dist/modules/CoreAuth/constants/auth.js +6 -0
- package/dist/modules/CoreAuth/constants/index.d.ts +1 -0
- package/dist/modules/CoreAuth/constants/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/context/AuthContext.d.ts +12 -0
- package/dist/modules/CoreAuth/context/AuthContext.d.ts.map +1 -0
- package/dist/modules/CoreAuth/context/AuthContext.tsx +4 -0
- package/dist/modules/CoreAuth/context/index.d.ts +2 -0
- package/dist/modules/CoreAuth/context/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/hooks/index.d.ts +1 -0
- package/dist/modules/CoreAuth/hooks/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/hooks/useAuth.d.ts +10 -9
- package/dist/modules/CoreAuth/hooks/useAuth.d.ts.map +1 -0
- package/dist/modules/CoreAuth/hooks/useAuth.js +38 -0
- package/dist/modules/CoreAuth/index.d.ts +8 -1
- package/dist/modules/CoreAuth/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/index.js +11 -0
- package/dist/modules/CoreAuth/locale/en.json.js +4 -0
- package/dist/modules/CoreAuth/locale/es.json.js +4 -0
- package/dist/modules/CoreAuth/registry/hooks/index.d.ts +1 -0
- package/dist/modules/CoreAuth/registry/hooks/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/registry/index.d.ts +1 -0
- package/dist/modules/CoreAuth/registry/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/registry/types/index.d.ts +1 -0
- package/dist/modules/CoreAuth/registry/types/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/services/base.d.ts +24 -5
- package/dist/modules/CoreAuth/services/base.d.ts.map +1 -0
- package/dist/modules/CoreAuth/services/base.js +53 -0
- package/dist/modules/CoreAuth/services/index.d.ts +1 -0
- package/dist/modules/CoreAuth/services/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/stores/authStore.d.ts +15 -8
- package/dist/modules/CoreAuth/stores/authStore.d.ts.map +1 -0
- package/dist/modules/CoreAuth/stores/authStore.js +13 -0
- package/dist/modules/CoreAuth/stores/index.d.ts +1 -0
- package/dist/modules/CoreAuth/stores/index.d.ts.map +1 -0
- package/dist/modules/CoreAuth/types/CoreAuth.d.ts +10 -6
- package/dist/modules/CoreAuth/types/CoreAuth.d.ts.map +1 -0
- package/dist/modules/CoreAuth/types/index.d.ts +1 -0
- package/dist/modules/CoreAuth/types/index.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/classes/CoreCustomizationBuilder.d.ts +8 -8
- package/dist/modules/CoreCustomization/classes/CoreCustomizationBuilder.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/classes/CoreCustomizationBuilder.js +82 -0
- package/dist/modules/CoreCustomization/classes/index.d.ts +1 -0
- package/dist/modules/CoreCustomization/classes/index.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/index.d.ts +4 -1
- package/dist/modules/CoreCustomization/index.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/index.js +9 -0
- package/dist/modules/CoreCustomization/locale/en.json.js +4 -0
- package/dist/modules/CoreCustomization/locale/es.json.js +4 -0
- package/dist/modules/CoreCustomization/registry/index.d.ts +1 -0
- package/dist/modules/CoreCustomization/registry/index.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/registry/types/index.d.ts +1 -0
- package/dist/modules/CoreCustomization/registry/types/index.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/services/base.d.ts +8 -1
- package/dist/modules/CoreCustomization/services/base.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/services/base.js +21 -0
- package/dist/modules/CoreCustomization/services/index.d.ts +1 -0
- package/dist/modules/CoreCustomization/services/index.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/types/CoreCustomization.d.ts +1 -0
- package/dist/modules/CoreCustomization/types/CoreCustomization.d.ts.map +1 -0
- package/dist/modules/CoreCustomization/types/index.d.ts +1 -0
- package/dist/modules/CoreCustomization/types/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/classes/CoreOrderBuilder.d.ts +4 -3
- package/dist/modules/CoreOrder/classes/CoreOrderBuilder.d.ts.map +1 -0
- package/dist/modules/CoreOrder/classes/CoreOrderBuilder.js +113 -0
- package/dist/modules/CoreOrder/classes/index.d.ts +1 -0
- package/dist/modules/CoreOrder/classes/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/index.d.ts +4 -1
- package/dist/modules/CoreOrder/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/index.js +9 -0
- package/dist/modules/CoreOrder/locale/en.json.js +4 -0
- package/dist/modules/CoreOrder/locale/es.json.js +4 -0
- package/dist/modules/CoreOrder/registry/hooks/index.d.ts +1 -0
- package/dist/modules/CoreOrder/registry/hooks/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/registry/index.d.ts +1 -0
- package/dist/modules/CoreOrder/registry/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/registry/types/index.d.ts +1 -0
- package/dist/modules/CoreOrder/registry/types/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/services/base.d.ts +17 -1
- package/dist/modules/CoreOrder/services/base.d.ts.map +1 -0
- package/dist/modules/CoreOrder/services/base.js +27 -0
- package/dist/modules/CoreOrder/services/index.d.ts +1 -0
- package/dist/modules/CoreOrder/services/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/types/CoreOrder.d.ts +1 -0
- package/dist/modules/CoreOrder/types/CoreOrder.d.ts.map +1 -0
- package/dist/modules/CoreOrder/types/index.d.ts +1 -0
- package/dist/modules/CoreOrder/types/index.d.ts.map +1 -0
- package/dist/modules/CoreOrder/types/interfaces/OrderActions.d.ts +1 -0
- package/dist/modules/CoreOrder/types/interfaces/OrderActions.d.ts.map +1 -0
- package/dist/modules/CoreOrder/types/interfaces/index.d.ts +1 -0
- package/dist/modules/CoreOrder/types/interfaces/index.d.ts.map +1 -0
- package/dist/modules/CorePayForm/classes/CorePayFormBuilder.d.ts +12 -11
- package/dist/modules/CorePayForm/classes/CorePayFormBuilder.d.ts.map +1 -0
- package/dist/modules/CorePayForm/classes/CorePayFormBuilder.js +67 -0
- package/dist/modules/CorePayForm/classes/index.d.ts +1 -0
- package/dist/modules/CorePayForm/classes/index.d.ts.map +1 -0
- package/dist/modules/CorePayForm/index.d.ts +4 -1
- package/dist/modules/CorePayForm/index.d.ts.map +1 -0
- package/dist/modules/CorePayForm/index.js +9 -0
- package/dist/modules/CorePayForm/locale/en.json.js +4 -0
- package/dist/modules/CorePayForm/locale/es.json.js +4 -0
- package/dist/modules/CorePayForm/registry/hooks/index.d.ts +1 -0
- package/dist/modules/CorePayForm/registry/hooks/index.d.ts.map +1 -0
- package/dist/modules/CorePayForm/registry/index.d.ts +1 -0
- package/dist/modules/CorePayForm/registry/index.d.ts.map +1 -0
- package/dist/modules/CorePayForm/registry/types/index.d.ts +1 -0
- package/dist/modules/CorePayForm/registry/types/index.d.ts.map +1 -0
- package/dist/modules/CorePayForm/services/base.d.ts +12 -1
- package/dist/modules/CorePayForm/services/base.d.ts.map +1 -0
- package/dist/modules/CorePayForm/services/base.js +21 -0
- package/dist/modules/CorePayForm/services/index.d.ts +1 -0
- package/dist/modules/CorePayForm/services/index.d.ts.map +1 -0
- package/dist/modules/CorePayForm/types/CorePayForm.d.ts +1 -0
- package/dist/modules/CorePayForm/types/CorePayForm.d.ts.map +1 -0
- package/dist/modules/CorePayForm/types/index.d.ts +1 -0
- package/dist/modules/CorePayForm/types/index.d.ts.map +1 -0
- package/dist/modules/CoreProduct/classes/CoreProductBuilder.d.ts +5 -4
- package/dist/modules/CoreProduct/classes/CoreProductBuilder.d.ts.map +1 -0
- package/dist/modules/CoreProduct/classes/CoreProductBuilder.js +120 -0
- package/dist/modules/CoreProduct/classes/index.d.ts +1 -0
- package/dist/modules/CoreProduct/classes/index.d.ts.map +1 -0
- package/dist/modules/CoreProduct/index.d.ts +4 -1
- package/dist/modules/CoreProduct/index.d.ts.map +1 -0
- package/dist/modules/CoreProduct/index.js +9 -0
- package/dist/modules/CoreProduct/locale/en.json.js +14 -0
- package/dist/modules/CoreProduct/locale/es.json.js +14 -0
- package/dist/modules/CoreProduct/registry/index.d.ts +1 -0
- package/dist/modules/CoreProduct/registry/index.d.ts.map +1 -0
- package/dist/modules/CoreProduct/registry/types/index.d.ts +1 -0
- package/dist/modules/CoreProduct/registry/types/index.d.ts.map +1 -0
- package/dist/modules/CoreProduct/services/base.d.ts +20 -7
- package/dist/modules/CoreProduct/services/base.d.ts.map +1 -0
- package/dist/modules/CoreProduct/services/base.js +35 -0
- package/dist/modules/CoreProduct/services/index.d.ts +1 -0
- package/dist/modules/CoreProduct/services/index.d.ts.map +1 -0
- package/dist/modules/CoreProduct/types/CoreProduct.d.ts +1 -0
- package/dist/modules/CoreProduct/types/CoreProduct.d.ts.map +1 -0
- package/dist/modules/CoreProduct/types/CoreProductCategory.d.ts +1 -0
- package/dist/modules/CoreProduct/types/CoreProductCategory.d.ts.map +1 -0
- package/dist/modules/CoreProduct/types/index.d.ts +1 -0
- package/dist/modules/CoreProduct/types/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/classes/CoreShipmentBuilder.d.ts +6 -5
- package/dist/modules/CoreShipment/classes/CoreShipmentBuilder.d.ts.map +1 -0
- package/dist/modules/CoreShipment/classes/CoreShipmentBuilder.js +172 -0
- package/dist/modules/CoreShipment/classes/index.d.ts +1 -0
- package/dist/modules/CoreShipment/classes/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/index.d.ts +4 -1
- package/dist/modules/CoreShipment/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/index.js +9 -0
- package/dist/modules/CoreShipment/locale/en.json.js +14 -0
- package/dist/modules/CoreShipment/locale/es.json.js +14 -0
- package/dist/modules/CoreShipment/registry/classes/index.d.ts +1 -0
- package/dist/modules/CoreShipment/registry/classes/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/registry/index.d.ts +1 -0
- package/dist/modules/CoreShipment/registry/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/registry/services/index.d.ts +1 -0
- package/dist/modules/CoreShipment/registry/services/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/registry/types/index.d.ts +1 -0
- package/dist/modules/CoreShipment/registry/types/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/services/base.d.ts +30 -2
- package/dist/modules/CoreShipment/services/base.d.ts.map +1 -0
- package/dist/modules/CoreShipment/services/base.js +63 -0
- package/dist/modules/CoreShipment/services/index.d.ts +1 -0
- package/dist/modules/CoreShipment/services/index.d.ts.map +1 -0
- package/dist/modules/CoreShipment/types/CoreShipment.d.ts +1 -0
- package/dist/modules/CoreShipment/types/CoreShipment.d.ts.map +1 -0
- package/dist/modules/CoreShipment/types/CoreShipment.js +7 -0
- package/dist/modules/CoreShipment/types/index.d.ts +1 -0
- package/dist/modules/CoreShipment/types/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/classes/CoreShopCartBuilder.d.ts +16 -5
- package/dist/modules/CoreShopCart/classes/CoreShopCartBuilder.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/classes/CoreShopCartBuilder.js +166 -0
- package/dist/modules/CoreShopCart/classes/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/classes/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/constants/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/constants/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/constants/shopCart.d.ts +1 -0
- package/dist/modules/CoreShopCart/constants/shopCart.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/constants/shopCart.js +8 -0
- package/dist/modules/CoreShopCart/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/index.js +8 -0
- package/dist/modules/CoreShopCart/locale/en.json.js +4 -0
- package/dist/modules/CoreShopCart/locale/es.json.js +4 -0
- package/dist/modules/CoreShopCart/registry/hooks/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/registry/hooks/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/registry/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/registry/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/registry/types/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/registry/types/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/services/base.d.ts +23 -4
- package/dist/modules/CoreShopCart/services/base.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/services/base.js +53 -0
- package/dist/modules/CoreShopCart/services/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/services/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/types/CoreShopCart.d.ts +1 -0
- package/dist/modules/CoreShopCart/types/CoreShopCart.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/types/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/types/index.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/types/interfaces/CartActions.d.ts +1 -0
- package/dist/modules/CoreShopCart/types/interfaces/CartActions.d.ts.map +1 -0
- package/dist/modules/CoreShopCart/types/interfaces/index.d.ts +1 -0
- package/dist/modules/CoreShopCart/types/interfaces/index.d.ts.map +1 -0
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/registry/hooks/index.d.ts +1 -0
- package/dist/modules/registry/hooks/index.d.ts.map +1 -0
- package/dist/modules/registry/index.d.ts +1 -0
- package/dist/modules/registry/index.d.ts.map +1 -0
- package/dist/modules/registry/types/index.d.ts +1 -0
- package/dist/modules/registry/types/index.d.ts.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +814 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +751 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +350 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +161 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +137 -0
- package/dist/node_modules/@radix-ui/number/dist/index.js +6 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +305 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +147 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +118 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +270 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +145 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +39 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +79 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +321 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +267 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +29 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +24 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +834 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +299 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +283 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +43 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +282 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +223 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +1156 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +554 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +99 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +152 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +187 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +482 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +12 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +35 -0
- package/dist/node_modules/@stepperize/core/dist/index.js +3 -0
- package/dist/node_modules/@stepperize/react/dist/index.js +6 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +137 -0
- package/dist/node_modules/axios/index.js +25 -0
- package/dist/node_modules/axios/lib/adapters/adapters.js +81 -0
- package/dist/node_modules/axios/lib/adapters/fetch.js +229 -0
- package/dist/node_modules/axios/lib/adapters/xhr.js +199 -0
- package/dist/node_modules/axios/lib/axios.js +86 -0
- package/dist/node_modules/axios/lib/cancel/CancelToken.js +133 -0
- package/dist/node_modules/axios/lib/cancel/CanceledError.js +23 -0
- package/dist/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/dist/node_modules/axios/lib/core/Axios.js +238 -0
- package/dist/node_modules/axios/lib/core/AxiosError.js +101 -0
- package/dist/node_modules/axios/lib/core/AxiosHeaders.js +312 -0
- package/dist/node_modules/axios/lib/core/InterceptorManager.js +69 -0
- package/dist/node_modules/axios/lib/core/buildFullPath.js +22 -0
- package/dist/node_modules/axios/lib/core/dispatchRequest.js +81 -0
- package/dist/node_modules/axios/lib/core/mergeConfig.js +106 -0
- package/dist/node_modules/axios/lib/core/settle.js +27 -0
- package/dist/node_modules/axios/lib/core/transformData.js +28 -0
- package/dist/node_modules/axios/lib/defaults/index.js +159 -0
- package/dist/node_modules/axios/lib/defaults/transitional.js +7 -0
- package/dist/node_modules/axios/lib/env/data.js +3 -0
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +56 -0
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
- package/dist/node_modules/axios/lib/helpers/bind.js +7 -0
- package/dist/node_modules/axios/lib/helpers/buildURL.js +69 -0
- package/dist/node_modules/axios/lib/helpers/combineURLs.js +15 -0
- package/dist/node_modules/axios/lib/helpers/composeSignals.js +48 -0
- package/dist/node_modules/axios/lib/helpers/cookies.js +43 -0
- package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +93 -0
- package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.js +15 -0
- package/dist/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
- package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
- package/dist/node_modules/axios/lib/helpers/null.js +4 -0
- package/dist/node_modules/axios/lib/helpers/parseHeaders.js +55 -0
- package/dist/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +46 -0
- package/dist/node_modules/axios/lib/helpers/resolveConfig.js +58 -0
- package/dist/node_modules/axios/lib/helpers/speedometer.js +53 -0
- package/dist/node_modules/axios/lib/helpers/spread.js +28 -0
- package/dist/node_modules/axios/lib/helpers/throttle.js +44 -0
- package/dist/node_modules/axios/lib/helpers/toFormData.js +219 -0
- package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
- package/dist/node_modules/axios/lib/helpers/trackStream.js +88 -0
- package/dist/node_modules/axios/lib/helpers/validator.js +99 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
- package/dist/node_modules/axios/lib/platform/browser/index.js +15 -0
- package/dist/node_modules/axios/lib/platform/common/utils.js +45 -0
- package/dist/node_modules/axios/lib/platform/index.js +9 -0
- package/dist/node_modules/axios/lib/utils.js +780 -0
- package/dist/node_modules/class-variance-authority/dist/index.js +44 -0
- package/dist/node_modules/clsx/dist/clsx.js +3 -0
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1669 -0
- package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +37 -0
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +38 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +43 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +30 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-left.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +14 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +17 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +28 -0
- package/dist/node_modules/react-hook-form/dist/index.esm.js +560 -0
- package/dist/node_modules/react-i18next/dist/es/IcuTransUtils/htmlEntityDecoder.js +210 -0
- package/dist/node_modules/react-i18next/dist/es/context.js +18 -0
- package/dist/node_modules/react-i18next/dist/es/defaults.js +22 -0
- package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +7 -0
- package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +12 -0
- package/dist/node_modules/react-i18next/dist/es/unescape.js +27 -0
- package/dist/node_modules/react-i18next/dist/es/useTranslation.js +157 -0
- package/dist/node_modules/react-i18next/dist/es/utils.js +63 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +167 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +38 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +110 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +56 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +19 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
- package/dist/node_modules/sonner/dist/index.js +299 -0
- package/dist/node_modules/tslib/tslib.es6.js +56 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +21 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +77 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +106 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +77 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +19 -0
- package/dist/node_modules/zustand/esm/middleware.js +188 -0
- package/dist/node_modules/zustand/esm/react.js +22 -0
- package/dist/node_modules/zustand/esm/vanilla.js +24 -0
- package/dist/services/base.d.ts +1 -0
- package/dist/services/base.d.ts.map +1 -0
- package/dist/services/base.js +67 -0
- package/dist/services/factory.d.ts +14 -0
- package/dist/services/factory.d.ts.map +1 -0
- package/dist/services/factory.js +39 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/stores/customizationStore.d.ts +5 -27
- package/dist/stores/customizationStore.d.ts.map +1 -0
- package/dist/stores/customizationStore.js +7 -0
- package/dist/stores/index.d.ts +1 -0
- package/dist/stores/index.d.ts.map +1 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/types/BaseResponseActions.d.ts +1 -0
- package/dist/types/BaseResponseActions.d.ts.map +1 -0
- package/dist/types/BaseStore.d.ts +1 -0
- package/dist/types/BaseStore.d.ts.map +1 -0
- package/dist/types/BaseType.d.ts +1 -0
- package/dist/types/BaseType.d.ts.map +1 -0
- package/dist/types/CoreImage.d.ts +1 -0
- package/dist/types/CoreImage.d.ts.map +1 -0
- package/dist/types/CoreMenu.d.ts +1 -0
- package/dist/types/CoreMenu.d.ts.map +1 -0
- package/dist/types/contracts/BaseApiResponse.d.ts +1 -0
- package/dist/types/contracts/BaseApiResponse.d.ts.map +1 -0
- package/dist/types/contracts/BasePagination.d.ts +1 -0
- package/dist/types/contracts/BasePagination.d.ts.map +1 -0
- package/dist/types/contracts/index.d.ts +1 -0
- package/dist/types/contracts/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/interfaces/BaseImageType.d.ts +1 -0
- package/dist/types/interfaces/BaseImageType.d.ts.map +1 -0
- package/dist/types/interfaces/BaseSlugType.d.ts +1 -0
- package/dist/types/interfaces/BaseSlugType.d.ts.map +1 -0
- package/dist/types/interfaces/BaseVisibleType.d.ts +1 -0
- package/dist/types/interfaces/BaseVisibleType.d.ts.map +1 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/dist/types/interfaces/index.d.ts.map +1 -0
- package/dist/types/ui/carousel.d.ts +1 -0
- package/dist/types/ui/carousel.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/ui/index.d.ts.map +1 -0
- package/dist/types/ui/main.d.ts +1 -0
- package/dist/types/ui/main.d.ts.map +1 -0
- package/dist/types/ui/template.d.ts +1 -0
- package/dist/types/ui/template.d.ts.map +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/vite-env.d.ts +11 -0
- package/package.json +22 -15
- package/core/commands/common/constants.js +0 -10
- package/core/commands/helpers/index.js +0 -15
- package/core/commands/helpers/strings.js +0 -4
- package/core/commands/templates/locale.js +0 -14
- package/core/commands/templates/service.js +0 -12
- package/core/commands/templates/type.js +0 -10
- package/dist/assets/index.d.ts +0 -8
- package/dist/components/ui/calendar.d.ts +0 -4
- package/dist/components/ui/drawer.d.ts +0 -13
- package/dist/components/ui/navigation-menu.d.ts +0 -14
- package/dist/components/ui/sidebar.d.ts +0 -69
- package/dist/components/ui/sonner.d.ts +0 -3
- package/dist/constants/menu.d.ts +0 -2
- package/dist/helpers/template.d.ts +0 -2
- package/dist/helpers/tenant.d.ts +0 -2
- package/dist/index.css +0 -1
- package/dist/modules/CoreCustomization/registry/hooks/index.d.ts +0 -0
- package/dist/modules/CoreProduct/registry/hooks/index.d.ts +0 -0
- /package/{core → src/core}/commands/create-core-module.js +0 -0
- /package/{core → src/core}/commands/create-module.js +0 -0
- /package/{core → src/core}/commands/create-template.js +0 -0
- /package/{core → src/core}/commands/rollback-core-module.js +0 -0
- /package/{core → src/core}/commands/rollback-module.js +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import AxiosError from './AxiosError.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Resolve or reject a Promise based on response status.
|
|
5
|
+
*
|
|
6
|
+
* @param {Function} resolve A function that resolves the promise.
|
|
7
|
+
* @param {Function} reject A function that rejects the promise.
|
|
8
|
+
* @param {object} response The response.
|
|
9
|
+
*
|
|
10
|
+
* @returns {object} The response.
|
|
11
|
+
*/
|
|
12
|
+
function settle(resolve, reject, response) {
|
|
13
|
+
const validateStatus = response.config.validateStatus;
|
|
14
|
+
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
15
|
+
resolve(response);
|
|
16
|
+
} else {
|
|
17
|
+
reject(new AxiosError(
|
|
18
|
+
'Request failed with status code ' + response.status,
|
|
19
|
+
[AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
20
|
+
response.config,
|
|
21
|
+
response.request,
|
|
22
|
+
response
|
|
23
|
+
));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { settle as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import utils from '../utils.js';
|
|
2
|
+
import defaults from '../defaults/index.js';
|
|
3
|
+
import AxiosHeaders from './AxiosHeaders.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Transform the data for a request or a response
|
|
7
|
+
*
|
|
8
|
+
* @param {Array|Function} fns A single function or Array of functions
|
|
9
|
+
* @param {?Object} response The response object
|
|
10
|
+
*
|
|
11
|
+
* @returns {*} The resulting transformed data
|
|
12
|
+
*/
|
|
13
|
+
function transformData(fns, response) {
|
|
14
|
+
const config = this || defaults;
|
|
15
|
+
const context = response || config;
|
|
16
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
17
|
+
let data = context.data;
|
|
18
|
+
|
|
19
|
+
utils.forEach(fns, function transform(fn) {
|
|
20
|
+
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
headers.normalize();
|
|
24
|
+
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { transformData as default };
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import utils from '../utils.js';
|
|
2
|
+
import AxiosError from '../core/AxiosError.js';
|
|
3
|
+
import transitionalDefaults from './transitional.js';
|
|
4
|
+
import toFormData from '../helpers/toFormData.js';
|
|
5
|
+
import toURLEncodedForm from '../helpers/toURLEncodedForm.js';
|
|
6
|
+
import platform from '../platform/index.js';
|
|
7
|
+
import formDataToJSON from '../helpers/formDataToJSON.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
11
|
+
* of the input
|
|
12
|
+
*
|
|
13
|
+
* @param {any} rawValue - The value to be stringified.
|
|
14
|
+
* @param {Function} parser - A function that parses a string into a JavaScript object.
|
|
15
|
+
* @param {Function} encoder - A function that takes a value and returns a string.
|
|
16
|
+
*
|
|
17
|
+
* @returns {string} A stringified version of the rawValue.
|
|
18
|
+
*/
|
|
19
|
+
function stringifySafely(rawValue, parser, encoder) {
|
|
20
|
+
if (utils.isString(rawValue)) {
|
|
21
|
+
try {
|
|
22
|
+
(parser || JSON.parse)(rawValue);
|
|
23
|
+
return utils.trim(rawValue);
|
|
24
|
+
} catch (e) {
|
|
25
|
+
if (e.name !== 'SyntaxError') {
|
|
26
|
+
throw e;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return (encoder || JSON.stringify)(rawValue);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const defaults = {
|
|
35
|
+
|
|
36
|
+
transitional: transitionalDefaults,
|
|
37
|
+
|
|
38
|
+
adapter: ['xhr', 'http', 'fetch'],
|
|
39
|
+
|
|
40
|
+
transformRequest: [function transformRequest(data, headers) {
|
|
41
|
+
const contentType = headers.getContentType() || '';
|
|
42
|
+
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
43
|
+
const isObjectPayload = utils.isObject(data);
|
|
44
|
+
|
|
45
|
+
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
46
|
+
data = new FormData(data);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const isFormData = utils.isFormData(data);
|
|
50
|
+
|
|
51
|
+
if (isFormData) {
|
|
52
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (utils.isArrayBuffer(data) ||
|
|
56
|
+
utils.isBuffer(data) ||
|
|
57
|
+
utils.isStream(data) ||
|
|
58
|
+
utils.isFile(data) ||
|
|
59
|
+
utils.isBlob(data) ||
|
|
60
|
+
utils.isReadableStream(data)
|
|
61
|
+
) {
|
|
62
|
+
return data;
|
|
63
|
+
}
|
|
64
|
+
if (utils.isArrayBufferView(data)) {
|
|
65
|
+
return data.buffer;
|
|
66
|
+
}
|
|
67
|
+
if (utils.isURLSearchParams(data)) {
|
|
68
|
+
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
69
|
+
return data.toString();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let isFileList;
|
|
73
|
+
|
|
74
|
+
if (isObjectPayload) {
|
|
75
|
+
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
76
|
+
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
80
|
+
const _FormData = this.env && this.env.FormData;
|
|
81
|
+
|
|
82
|
+
return toFormData(
|
|
83
|
+
isFileList ? {'files[]': data} : data,
|
|
84
|
+
_FormData && new _FormData(),
|
|
85
|
+
this.formSerializer
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (isObjectPayload || hasJSONContentType ) {
|
|
91
|
+
headers.setContentType('application/json', false);
|
|
92
|
+
return stringifySafely(data);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return data;
|
|
96
|
+
}],
|
|
97
|
+
|
|
98
|
+
transformResponse: [function transformResponse(data) {
|
|
99
|
+
const transitional = this.transitional || defaults.transitional;
|
|
100
|
+
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
101
|
+
const JSONRequested = this.responseType === 'json';
|
|
102
|
+
|
|
103
|
+
if (utils.isResponse(data) || utils.isReadableStream(data)) {
|
|
104
|
+
return data;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
108
|
+
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
109
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
return JSON.parse(data);
|
|
113
|
+
} catch (e) {
|
|
114
|
+
if (strictJSONParsing) {
|
|
115
|
+
if (e.name === 'SyntaxError') {
|
|
116
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
117
|
+
}
|
|
118
|
+
throw e;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return data;
|
|
124
|
+
}],
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
128
|
+
* timeout is not created.
|
|
129
|
+
*/
|
|
130
|
+
timeout: 0,
|
|
131
|
+
|
|
132
|
+
xsrfCookieName: 'XSRF-TOKEN',
|
|
133
|
+
xsrfHeaderName: 'X-XSRF-TOKEN',
|
|
134
|
+
|
|
135
|
+
maxContentLength: -1,
|
|
136
|
+
maxBodyLength: -1,
|
|
137
|
+
|
|
138
|
+
env: {
|
|
139
|
+
FormData: platform.classes.FormData,
|
|
140
|
+
Blob: platform.classes.Blob
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
validateStatus: function validateStatus(status) {
|
|
144
|
+
return status >= 200 && status < 300;
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
headers: {
|
|
148
|
+
common: {
|
|
149
|
+
'Accept': 'application/json, text/plain, */*',
|
|
150
|
+
'Content-Type': undefined
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
156
|
+
defaults.headers[method] = {};
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
export { defaults as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import toFormData from './toFormData.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* It encodes a string by replacing all characters that are not in the unreserved set with
|
|
5
|
+
* their percent-encoded equivalents
|
|
6
|
+
*
|
|
7
|
+
* @param {string} str - The string to encode.
|
|
8
|
+
*
|
|
9
|
+
* @returns {string} The encoded string.
|
|
10
|
+
*/
|
|
11
|
+
function encode(str) {
|
|
12
|
+
const charMap = {
|
|
13
|
+
'!': '%21',
|
|
14
|
+
"'": '%27',
|
|
15
|
+
'(': '%28',
|
|
16
|
+
')': '%29',
|
|
17
|
+
'~': '%7E',
|
|
18
|
+
'%20': '+',
|
|
19
|
+
'%00': '\x00'
|
|
20
|
+
};
|
|
21
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
22
|
+
return charMap[match];
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* It takes a params object and converts it to a FormData object
|
|
28
|
+
*
|
|
29
|
+
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
|
|
30
|
+
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
|
|
31
|
+
*
|
|
32
|
+
* @returns {void}
|
|
33
|
+
*/
|
|
34
|
+
function AxiosURLSearchParams(params, options) {
|
|
35
|
+
this._pairs = [];
|
|
36
|
+
|
|
37
|
+
params && toFormData(params, this, options);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const prototype = AxiosURLSearchParams.prototype;
|
|
41
|
+
|
|
42
|
+
prototype.append = function append(name, value) {
|
|
43
|
+
this._pairs.push([name, value]);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
prototype.toString = function toString(encoder) {
|
|
47
|
+
const _encode = encoder ? function(value) {
|
|
48
|
+
return encoder.call(this, value, encode);
|
|
49
|
+
} : encode;
|
|
50
|
+
|
|
51
|
+
return this._pairs.map(function each(pair) {
|
|
52
|
+
return _encode(pair[0]) + '=' + _encode(pair[1]);
|
|
53
|
+
}, '').join('&');
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export { AxiosURLSearchParams as default };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
const HttpStatusCode = {
|
|
2
|
+
Continue: 100,
|
|
3
|
+
SwitchingProtocols: 101,
|
|
4
|
+
Processing: 102,
|
|
5
|
+
EarlyHints: 103,
|
|
6
|
+
Ok: 200,
|
|
7
|
+
Created: 201,
|
|
8
|
+
Accepted: 202,
|
|
9
|
+
NonAuthoritativeInformation: 203,
|
|
10
|
+
NoContent: 204,
|
|
11
|
+
ResetContent: 205,
|
|
12
|
+
PartialContent: 206,
|
|
13
|
+
MultiStatus: 207,
|
|
14
|
+
AlreadyReported: 208,
|
|
15
|
+
ImUsed: 226,
|
|
16
|
+
MultipleChoices: 300,
|
|
17
|
+
MovedPermanently: 301,
|
|
18
|
+
Found: 302,
|
|
19
|
+
SeeOther: 303,
|
|
20
|
+
NotModified: 304,
|
|
21
|
+
UseProxy: 305,
|
|
22
|
+
Unused: 306,
|
|
23
|
+
TemporaryRedirect: 307,
|
|
24
|
+
PermanentRedirect: 308,
|
|
25
|
+
BadRequest: 400,
|
|
26
|
+
Unauthorized: 401,
|
|
27
|
+
PaymentRequired: 402,
|
|
28
|
+
Forbidden: 403,
|
|
29
|
+
NotFound: 404,
|
|
30
|
+
MethodNotAllowed: 405,
|
|
31
|
+
NotAcceptable: 406,
|
|
32
|
+
ProxyAuthenticationRequired: 407,
|
|
33
|
+
RequestTimeout: 408,
|
|
34
|
+
Conflict: 409,
|
|
35
|
+
Gone: 410,
|
|
36
|
+
LengthRequired: 411,
|
|
37
|
+
PreconditionFailed: 412,
|
|
38
|
+
PayloadTooLarge: 413,
|
|
39
|
+
UriTooLong: 414,
|
|
40
|
+
UnsupportedMediaType: 415,
|
|
41
|
+
RangeNotSatisfiable: 416,
|
|
42
|
+
ExpectationFailed: 417,
|
|
43
|
+
ImATeapot: 418,
|
|
44
|
+
MisdirectedRequest: 421,
|
|
45
|
+
UnprocessableEntity: 422,
|
|
46
|
+
Locked: 423,
|
|
47
|
+
FailedDependency: 424,
|
|
48
|
+
TooEarly: 425,
|
|
49
|
+
UpgradeRequired: 426,
|
|
50
|
+
PreconditionRequired: 428,
|
|
51
|
+
TooManyRequests: 429,
|
|
52
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
53
|
+
UnavailableForLegalReasons: 451,
|
|
54
|
+
InternalServerError: 500,
|
|
55
|
+
NotImplemented: 501,
|
|
56
|
+
BadGateway: 502,
|
|
57
|
+
ServiceUnavailable: 503,
|
|
58
|
+
GatewayTimeout: 504,
|
|
59
|
+
HttpVersionNotSupported: 505,
|
|
60
|
+
VariantAlsoNegotiates: 506,
|
|
61
|
+
InsufficientStorage: 507,
|
|
62
|
+
LoopDetected: 508,
|
|
63
|
+
NotExtended: 510,
|
|
64
|
+
NetworkAuthenticationRequired: 511,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
68
|
+
HttpStatusCode[value] = key;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export { HttpStatusCode as default };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import utils from '../utils.js';
|
|
2
|
+
import AxiosURLSearchParams from './AxiosURLSearchParams.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
|
|
6
|
+
* URI encoded counterparts
|
|
7
|
+
*
|
|
8
|
+
* @param {string} val The value to be encoded.
|
|
9
|
+
*
|
|
10
|
+
* @returns {string} The encoded value.
|
|
11
|
+
*/
|
|
12
|
+
function encode(val) {
|
|
13
|
+
return encodeURIComponent(val).
|
|
14
|
+
replace(/%3A/gi, ':').
|
|
15
|
+
replace(/%24/g, '$').
|
|
16
|
+
replace(/%2C/gi, ',').
|
|
17
|
+
replace(/%20/g, '+').
|
|
18
|
+
replace(/%5B/gi, '[').
|
|
19
|
+
replace(/%5D/gi, ']');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Build a URL by appending params to the end
|
|
24
|
+
*
|
|
25
|
+
* @param {string} url The base of the url (e.g., http://www.google.com)
|
|
26
|
+
* @param {object} [params] The params to be appended
|
|
27
|
+
* @param {?(object|Function)} options
|
|
28
|
+
*
|
|
29
|
+
* @returns {string} The formatted url
|
|
30
|
+
*/
|
|
31
|
+
function buildURL(url, params, options) {
|
|
32
|
+
/*eslint no-param-reassign:0*/
|
|
33
|
+
if (!params) {
|
|
34
|
+
return url;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const _encode = options && options.encode || encode;
|
|
38
|
+
|
|
39
|
+
if (utils.isFunction(options)) {
|
|
40
|
+
options = {
|
|
41
|
+
serialize: options
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const serializeFn = options && options.serialize;
|
|
46
|
+
|
|
47
|
+
let serializedParams;
|
|
48
|
+
|
|
49
|
+
if (serializeFn) {
|
|
50
|
+
serializedParams = serializeFn(params, options);
|
|
51
|
+
} else {
|
|
52
|
+
serializedParams = utils.isURLSearchParams(params) ?
|
|
53
|
+
params.toString() :
|
|
54
|
+
new AxiosURLSearchParams(params, options).toString(_encode);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (serializedParams) {
|
|
58
|
+
const hashmarkIndex = url.indexOf("#");
|
|
59
|
+
|
|
60
|
+
if (hashmarkIndex !== -1) {
|
|
61
|
+
url = url.slice(0, hashmarkIndex);
|
|
62
|
+
}
|
|
63
|
+
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return url;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export { buildURL as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a new URL by combining the specified URLs
|
|
3
|
+
*
|
|
4
|
+
* @param {string} baseURL The base URL
|
|
5
|
+
* @param {string} relativeURL The relative URL
|
|
6
|
+
*
|
|
7
|
+
* @returns {string} The combined URL
|
|
8
|
+
*/
|
|
9
|
+
function combineURLs(baseURL, relativeURL) {
|
|
10
|
+
return relativeURL
|
|
11
|
+
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
|
12
|
+
: baseURL;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { combineURLs as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import CanceledError from '../cancel/CanceledError.js';
|
|
2
|
+
import AxiosError from '../core/AxiosError.js';
|
|
3
|
+
import utils from '../utils.js';
|
|
4
|
+
|
|
5
|
+
const composeSignals = (signals, timeout) => {
|
|
6
|
+
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
|
7
|
+
|
|
8
|
+
if (timeout || length) {
|
|
9
|
+
let controller = new AbortController();
|
|
10
|
+
|
|
11
|
+
let aborted;
|
|
12
|
+
|
|
13
|
+
const onabort = function (reason) {
|
|
14
|
+
if (!aborted) {
|
|
15
|
+
aborted = true;
|
|
16
|
+
unsubscribe();
|
|
17
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
18
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
let timer = timeout && setTimeout(() => {
|
|
23
|
+
timer = null;
|
|
24
|
+
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
|
25
|
+
}, timeout);
|
|
26
|
+
|
|
27
|
+
const unsubscribe = () => {
|
|
28
|
+
if (signals) {
|
|
29
|
+
timer && clearTimeout(timer);
|
|
30
|
+
timer = null;
|
|
31
|
+
signals.forEach(signal => {
|
|
32
|
+
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
|
33
|
+
});
|
|
34
|
+
signals = null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
|
39
|
+
|
|
40
|
+
const {signal} = controller;
|
|
41
|
+
|
|
42
|
+
signal.unsubscribe = () => utils.asap(unsubscribe);
|
|
43
|
+
|
|
44
|
+
return signal;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export { composeSignals as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import utils from '../utils.js';
|
|
2
|
+
import platform from '../platform/index.js';
|
|
3
|
+
|
|
4
|
+
const cookies = platform.hasStandardBrowserEnv ?
|
|
5
|
+
|
|
6
|
+
// Standard browser envs support document.cookie
|
|
7
|
+
{
|
|
8
|
+
write(name, value, expires, path, domain, secure) {
|
|
9
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
10
|
+
|
|
11
|
+
utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
12
|
+
|
|
13
|
+
utils.isString(path) && cookie.push('path=' + path);
|
|
14
|
+
|
|
15
|
+
utils.isString(domain) && cookie.push('domain=' + domain);
|
|
16
|
+
|
|
17
|
+
secure === true && cookie.push('secure');
|
|
18
|
+
|
|
19
|
+
document.cookie = cookie.join('; ');
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
read(name) {
|
|
23
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
24
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
remove(name) {
|
|
28
|
+
this.write(name, '', Date.now() - 86400000);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:
|
|
33
|
+
|
|
34
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
35
|
+
{
|
|
36
|
+
write() {},
|
|
37
|
+
read() {
|
|
38
|
+
return null;
|
|
39
|
+
},
|
|
40
|
+
remove() {}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { cookies as default };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import utils from '../utils.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
|
|
5
|
+
*
|
|
6
|
+
* @param {string} name - The name of the property to get.
|
|
7
|
+
*
|
|
8
|
+
* @returns An array of strings.
|
|
9
|
+
*/
|
|
10
|
+
function parsePropPath(name) {
|
|
11
|
+
// foo[x][y][z]
|
|
12
|
+
// foo.x.y.z
|
|
13
|
+
// foo-x-y-z
|
|
14
|
+
// foo x y z
|
|
15
|
+
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
16
|
+
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Convert an array to an object.
|
|
22
|
+
*
|
|
23
|
+
* @param {Array<any>} arr - The array to convert to an object.
|
|
24
|
+
*
|
|
25
|
+
* @returns An object with the same keys and values as the array.
|
|
26
|
+
*/
|
|
27
|
+
function arrayToObject(arr) {
|
|
28
|
+
const obj = {};
|
|
29
|
+
const keys = Object.keys(arr);
|
|
30
|
+
let i;
|
|
31
|
+
const len = keys.length;
|
|
32
|
+
let key;
|
|
33
|
+
for (i = 0; i < len; i++) {
|
|
34
|
+
key = keys[i];
|
|
35
|
+
obj[key] = arr[key];
|
|
36
|
+
}
|
|
37
|
+
return obj;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* It takes a FormData object and returns a JavaScript object
|
|
42
|
+
*
|
|
43
|
+
* @param {string} formData The FormData object to convert to JSON.
|
|
44
|
+
*
|
|
45
|
+
* @returns {Object<string, any> | null} The converted object.
|
|
46
|
+
*/
|
|
47
|
+
function formDataToJSON(formData) {
|
|
48
|
+
function buildPath(path, value, target, index) {
|
|
49
|
+
let name = path[index++];
|
|
50
|
+
|
|
51
|
+
if (name === '__proto__') return true;
|
|
52
|
+
|
|
53
|
+
const isNumericKey = Number.isFinite(+name);
|
|
54
|
+
const isLast = index >= path.length;
|
|
55
|
+
name = !name && utils.isArray(target) ? target.length : name;
|
|
56
|
+
|
|
57
|
+
if (isLast) {
|
|
58
|
+
if (utils.hasOwnProp(target, name)) {
|
|
59
|
+
target[name] = [target[name], value];
|
|
60
|
+
} else {
|
|
61
|
+
target[name] = value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return !isNumericKey;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (!target[name] || !utils.isObject(target[name])) {
|
|
68
|
+
target[name] = [];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const result = buildPath(path, value, target[name], index);
|
|
72
|
+
|
|
73
|
+
if (result && utils.isArray(target[name])) {
|
|
74
|
+
target[name] = arrayToObject(target[name]);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return !isNumericKey;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
81
|
+
const obj = {};
|
|
82
|
+
|
|
83
|
+
utils.forEachEntry(formData, (name, value) => {
|
|
84
|
+
buildPath(parsePropPath(name), value, obj, 0);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
return obj;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export { formDataToJSON as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether the specified URL is absolute
|
|
3
|
+
*
|
|
4
|
+
* @param {string} url The URL to test
|
|
5
|
+
*
|
|
6
|
+
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
|
7
|
+
*/
|
|
8
|
+
function isAbsoluteURL(url) {
|
|
9
|
+
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
10
|
+
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
11
|
+
// by any combination of letters, digits, plus, period, or hyphen.
|
|
12
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { isAbsoluteURL as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import utils from '../utils.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Determines whether the payload is an error thrown by Axios
|
|
5
|
+
*
|
|
6
|
+
* @param {*} payload The value to test
|
|
7
|
+
*
|
|
8
|
+
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
9
|
+
*/
|
|
10
|
+
function isAxiosError(payload) {
|
|
11
|
+
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { isAxiosError as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import platform from '../platform/index.js';
|
|
2
|
+
|
|
3
|
+
const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
|
4
|
+
url = new URL(url, platform.origin);
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
origin.protocol === url.protocol &&
|
|
8
|
+
origin.host === url.host &&
|
|
9
|
+
(isMSIE || origin.port === url.port)
|
|
10
|
+
);
|
|
11
|
+
})(
|
|
12
|
+
new URL(platform.origin),
|
|
13
|
+
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
|
14
|
+
) : () => true;
|
|
15
|
+
|
|
16
|
+
export { isURLSameOrigin as default };
|