ingeniuscliq-core 0.4.13 → 0.4.15
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-accordion/node_modules/@radix-ui/react-collapsible/dist/index.js +145 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-collapsible/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-collection/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-accordion/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +147 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +118 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +270 -0
- package/dist/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-checkbox/node_modules/@radix-ui/react-primitive/dist/index.js +40 -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-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +43 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +267 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +834 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-collection/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.js +283 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +223 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +43 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +29 -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-label/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +299 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/dist/index.js +283 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-popover/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-radio-group/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-roving-focus/dist/index.js +223 -0
- package/dist/node_modules/@radix-ui/react-radio-group/node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-collection/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +1156 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-collection/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-popper/dist/index.js +283 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-primitive/dist/index.js +43 -0
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-visually-hidden/dist/index.js +34 -0
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-separator/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +554 -0
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +40 -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-switch/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +187 -0
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-primitive/dist/index.js +40 -0
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-roving-focus/dist/index.js +223 -0
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-collection/dist/index.js +70 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +482 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.js +283 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.js +43 -0
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-visually-hidden/dist/index.js +35 -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/@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 +21 -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 +18 -11
- package/core/commands/common/constants.js +0 -10
- package/core/commands/create-core-module.js +0 -288
- package/core/commands/create-module.js +0 -288
- package/core/commands/create-template.js +0 -169
- package/core/commands/helpers/index.js +0 -15
- package/core/commands/helpers/strings.js +0 -4
- package/core/commands/rollback-core-module.js +0 -195
- package/core/commands/rollback-module.js +0 -208
- 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
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { persist } from '../../../node_modules/zustand/esm/middleware.js';
|
|
2
|
+
import { CoreShipmentBaseService } from '../services/base.js';
|
|
3
|
+
import { create } from '../../../node_modules/zustand/esm/react.js';
|
|
4
|
+
|
|
5
|
+
class CoreShipmentBuilder {
|
|
6
|
+
shipmentService;
|
|
7
|
+
initialState;
|
|
8
|
+
constructor(service, initialState) {
|
|
9
|
+
this.shipmentService = service || new CoreShipmentBaseService();
|
|
10
|
+
this.initialState = initialState || {
|
|
11
|
+
shippingMethods: null,
|
|
12
|
+
shippingAddresses: null,
|
|
13
|
+
beneficiaries: null,
|
|
14
|
+
loading: false,
|
|
15
|
+
error: null
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
build() {
|
|
19
|
+
return create()(
|
|
20
|
+
persist(
|
|
21
|
+
(set, get) => ({
|
|
22
|
+
...this.initialState,
|
|
23
|
+
// Shipping Methods
|
|
24
|
+
setShippingMethods: (shippingMethods) => set({ shippingMethods }),
|
|
25
|
+
getShippingMethods: () => get().shippingMethods,
|
|
26
|
+
fetchShippingMethods: async () => {
|
|
27
|
+
set({ loading: true, error: null });
|
|
28
|
+
try {
|
|
29
|
+
const response = await this.shipmentService.getShippingMethods();
|
|
30
|
+
set({ shippingMethods: response.data.data, loading: false });
|
|
31
|
+
return response.data;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
set({ error: error || "Failed to fetch shipping methods", loading: false });
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
// Shipping Addresses
|
|
38
|
+
setShippingAddresses: (shippingAddresses) => set({ shippingAddresses }),
|
|
39
|
+
getShippingAddresses: () => get().shippingAddresses,
|
|
40
|
+
fetchShippingAddresses: async (params, actions) => {
|
|
41
|
+
set({ loading: true, error: null });
|
|
42
|
+
try {
|
|
43
|
+
const response = await this.shipmentService.getShippingAddresses(params);
|
|
44
|
+
set({ shippingAddresses: response.data.data, loading: false });
|
|
45
|
+
actions?.onSuccess?.(response.data);
|
|
46
|
+
return response.data;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
set({ error: error || "Failed to fetch shipping addresses", loading: false });
|
|
49
|
+
actions?.onError?.(error);
|
|
50
|
+
throw error;
|
|
51
|
+
} finally {
|
|
52
|
+
actions?.onFinish?.();
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
addShippingAddress: async (newAddress, params, actions) => {
|
|
56
|
+
set({ loading: true, error: null });
|
|
57
|
+
try {
|
|
58
|
+
const response = await this.shipmentService.addShippingAddress(newAddress);
|
|
59
|
+
await get().fetchShippingAddresses(params);
|
|
60
|
+
actions?.onSuccess?.(response);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
set({ error: error.message || "Failed to add shipping address", loading: false });
|
|
63
|
+
actions?.onError?.(error);
|
|
64
|
+
throw error;
|
|
65
|
+
} finally {
|
|
66
|
+
actions?.onFinish?.();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
updateShippingAddress: async (addressId, updateAddress, params, actions) => {
|
|
70
|
+
set({ loading: true, error: null });
|
|
71
|
+
try {
|
|
72
|
+
const response = await this.shipmentService.updateShippingAddress(addressId, updateAddress);
|
|
73
|
+
await get().fetchShippingAddresses(params);
|
|
74
|
+
actions?.onSuccess?.(response);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
set({ error: error || "Failed to update shipping address", loading: false });
|
|
77
|
+
actions?.onError?.(error);
|
|
78
|
+
throw error;
|
|
79
|
+
} finally {
|
|
80
|
+
actions?.onFinish?.();
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
deleteShippingAddress: async (addressId, params, actions) => {
|
|
84
|
+
set({ loading: true, error: null });
|
|
85
|
+
try {
|
|
86
|
+
const response = await this.shipmentService.deleteShippingAddress(addressId);
|
|
87
|
+
await get().fetchShippingAddresses(params);
|
|
88
|
+
actions?.onSuccess?.(response);
|
|
89
|
+
} catch (error) {
|
|
90
|
+
set({ error: error || "Failed to delete shipping address", loading: false });
|
|
91
|
+
actions?.onError?.(error);
|
|
92
|
+
throw error;
|
|
93
|
+
} finally {
|
|
94
|
+
actions?.onFinish?.();
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
// Beneficiaries
|
|
98
|
+
fetchBeneficiaries: async (params, actions) => {
|
|
99
|
+
set({ loading: true, error: null });
|
|
100
|
+
try {
|
|
101
|
+
const response = await this.shipmentService.getBeneficiaries(params);
|
|
102
|
+
set({ beneficiaries: response.data.data, loading: false });
|
|
103
|
+
actions?.onSuccess?.(response.data);
|
|
104
|
+
return response.data;
|
|
105
|
+
} catch (error) {
|
|
106
|
+
set({ error: error || "Failed to fetch beneficiaries", loading: false });
|
|
107
|
+
actions?.onError?.(error);
|
|
108
|
+
throw error;
|
|
109
|
+
} finally {
|
|
110
|
+
actions?.onFinish?.();
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
addBeneficiary: async (newBeneficiary, params, actions) => {
|
|
114
|
+
set({ loading: true, error: null });
|
|
115
|
+
try {
|
|
116
|
+
const response = await this.shipmentService.addBeneficiary(newBeneficiary);
|
|
117
|
+
await get().fetchBeneficiaries(params);
|
|
118
|
+
actions?.onSuccess?.(response);
|
|
119
|
+
} catch (error) {
|
|
120
|
+
set({ error: error || "Failed to add beneficiary", loading: false });
|
|
121
|
+
actions?.onError?.(error);
|
|
122
|
+
throw error;
|
|
123
|
+
} finally {
|
|
124
|
+
actions?.onFinish?.();
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
updateBeneficiary: async (beneficiaryId, updateBeneficiary, params, actions) => {
|
|
128
|
+
set({ loading: true, error: null });
|
|
129
|
+
try {
|
|
130
|
+
const response = await this.shipmentService.updateBeneficiary(beneficiaryId, updateBeneficiary);
|
|
131
|
+
await get().fetchBeneficiaries(params);
|
|
132
|
+
actions?.onSuccess?.(response);
|
|
133
|
+
} catch (error) {
|
|
134
|
+
set({ error: error || "Failed to update beneficiary", loading: false });
|
|
135
|
+
actions?.onError?.(error);
|
|
136
|
+
throw error;
|
|
137
|
+
} finally {
|
|
138
|
+
actions?.onFinish?.();
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
deleteBeneficiary: async (beneficiaryId, params, actions) => {
|
|
142
|
+
set({ loading: true, error: null });
|
|
143
|
+
try {
|
|
144
|
+
const response = await this.shipmentService.deleteBeneficiary(beneficiaryId);
|
|
145
|
+
await get().fetchBeneficiaries(params);
|
|
146
|
+
actions?.onSuccess?.(response);
|
|
147
|
+
} catch (error) {
|
|
148
|
+
set({ error: error || "Failed to delete beneficiary", loading: false });
|
|
149
|
+
actions?.onError?.(error);
|
|
150
|
+
throw error;
|
|
151
|
+
} finally {
|
|
152
|
+
actions?.onFinish?.();
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
setLoading: (loading) => set({ loading }),
|
|
156
|
+
setError: (error) => set({ error }),
|
|
157
|
+
reset: () => set(this.initialState)
|
|
158
|
+
}),
|
|
159
|
+
{
|
|
160
|
+
name: "shipment-storage",
|
|
161
|
+
partialize: (state) => ({
|
|
162
|
+
shippingMethods: state.shippingMethods,
|
|
163
|
+
shippingAddresses: state.shippingAddresses,
|
|
164
|
+
beneficiaries: state.beneficiaries
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export { CoreShipmentBuilder };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/CoreShipment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import '../../helpers/axiosGlobal.js';
|
|
2
|
+
import { loadModuleTranslations } from '../../i18n/utils/loadModuleTranslations.js';
|
|
3
|
+
import enTranslations from './locale/en.json.js';
|
|
4
|
+
import esTranslations from './locale/es.json.js';
|
|
5
|
+
|
|
6
|
+
loadModuleTranslations("CoreShipment", {
|
|
7
|
+
en: enTranslations,
|
|
8
|
+
es: esTranslations
|
|
9
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const shippingMethods = {"local_pickup":"Local Pickup","province_and_municipality":"Province and Municipality"};
|
|
2
|
+
const available = "{{count}} available in {{zone}}";
|
|
3
|
+
const province = "Province";
|
|
4
|
+
const beneficiary = {"add":"Add beneficiary","edit":"Edit beneficiary","owner":"I am the beneficiary","is_default":"Is this the default beneficiary?","delete":"Delete beneficiary","confirm_delete":"Are you sure you want to delete beneficiary {{beneficiary}}?"};
|
|
5
|
+
const address = {"add":"Add address","edit":"Edit address","is_default":"Is this the default address?","delete":"Delete address","confirm_delete":"Are you sure you want to delete this address?"};
|
|
6
|
+
const enTranslations = {
|
|
7
|
+
shippingMethods,
|
|
8
|
+
available,
|
|
9
|
+
province,
|
|
10
|
+
beneficiary,
|
|
11
|
+
address,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { address, available, beneficiary, enTranslations as default, province, shippingMethods };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const shippingMethods = {"local_pickup":"Recogida en tienda","province_and_municipality":"Provincia y municipio"};
|
|
2
|
+
const available = "{{count}} disponible en {{zone}}";
|
|
3
|
+
const province = "Provincia";
|
|
4
|
+
const beneficiary = {"add":"Agregar beneficiario","edit":"Editar beneficiario","owner":"Soy el beneficiario","is_default":"¿Es el beneficiario principal?","delete":"Eliminar beneficiario","confirm_delete":"¿Estás seguro de que deseas eliminar al beneficiario {{beneficiary}}?"};
|
|
5
|
+
const address = {"add":"Agregar dirección","edit":"Editar dirección","is_default":"¿Es la dirección principal?","delete":"Eliminar dirección","confirm_delete":"¿Estás seguro de que deseas eliminar esta dirección?"};
|
|
6
|
+
const esTranslations = {
|
|
7
|
+
shippingMethods,
|
|
8
|
+
available,
|
|
9
|
+
province,
|
|
10
|
+
beneficiary,
|
|
11
|
+
address,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { address, available, beneficiary, esTranslations as default, province, shippingMethods };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/CoreShipment/registry/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/registry/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/CoreShipment/registry/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/CoreShipment/registry/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -3,16 +3,44 @@ import { CoreShipmentBeneficiary, CoreShipmentBeneficiaryForm, CoreShippingAddre
|
|
|
3
3
|
import { BaseApiResponse, BaseApiResponsePagination } from '../../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Base class that can be extended by concrete services
|
|
6
|
-
*/
|
|
6
|
+
*/
|
|
7
7
|
export declare class CoreShipmentBaseService<T extends CoreShippingMethod<Z>, K extends CoreShippingAddress, Z extends CoreShippingMethodTypes, Y extends CoreShipmentBeneficiary> extends BaseService {
|
|
8
8
|
constructor();
|
|
9
|
+
/**
|
|
10
|
+
* Get all shipping methods
|
|
11
|
+
*/
|
|
9
12
|
getShippingMethods(): Promise<import('axios').AxiosResponse<BaseApiResponse<T[]>, any>>;
|
|
13
|
+
/**
|
|
14
|
+
* Get shipping addresses with pagination
|
|
15
|
+
*/
|
|
10
16
|
getShippingAddresses(params?: Record<string, any>): Promise<import('axios').AxiosResponse<BaseApiResponsePagination<K>, any>>;
|
|
11
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Add new shipping address
|
|
19
|
+
*/
|
|
20
|
+
addShippingAddress<X extends CoreShippingAddressForm>(newAddress: X): Promise<import('axios').AxiosResponse<BaseApiResponse<K>, any>>;
|
|
21
|
+
/**
|
|
22
|
+
* Update shipping address
|
|
23
|
+
*/
|
|
12
24
|
updateShippingAddress(addressId: Pick<K, 'id'>, updateAddress: Partial<K>): Promise<import('axios').AxiosResponse<BaseApiResponse<K>, any>>;
|
|
25
|
+
/**
|
|
26
|
+
* Delete shipping address
|
|
27
|
+
*/
|
|
13
28
|
deleteShippingAddress: (addressId: Pick<K, "id">) => Promise<import('axios').AxiosResponse<BaseApiResponse<null>, any>>;
|
|
29
|
+
/**
|
|
30
|
+
* Get beneficiaries with pagination
|
|
31
|
+
*/
|
|
14
32
|
getBeneficiaries: (params?: Record<string, any>) => Promise<import('axios').AxiosResponse<BaseApiResponsePagination<Y>, any>>;
|
|
33
|
+
/**
|
|
34
|
+
* Add new beneficiary
|
|
35
|
+
*/
|
|
15
36
|
addBeneficiary<X extends CoreShipmentBeneficiaryForm>(newBeneficiary: X): Promise<import('axios').AxiosResponse<BaseApiResponse<Y>, any>>;
|
|
37
|
+
/**
|
|
38
|
+
* Update beneficiary
|
|
39
|
+
*/
|
|
16
40
|
updateBeneficiary<X extends CoreShipmentBeneficiaryForm>(beneficiaryId: Pick<Y, 'id'>, updateBeneficiary: X): Promise<import('axios').AxiosResponse<BaseApiResponse<Y>, any>>;
|
|
41
|
+
/**
|
|
42
|
+
* Delete beneficiary
|
|
43
|
+
*/
|
|
17
44
|
deleteBeneficiary(beneficiaryId: Pick<Y, 'id'>): Promise<import('axios').AxiosResponse<BaseApiResponse<null>, any>>;
|
|
18
45
|
}
|
|
46
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/services/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAE5E;;GAEG;AACH,qBAAa,uBAAuB,CAClC,CAAC,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAC/B,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,uBAAuB,EACjC,CAAC,SAAS,uBAAuB,CACjC,SAAQ,WAAW;;IAKnB;;OAEG;IACH,kBAAkB;IAIlB;;OAEG;IACH,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAIjD;;OAEG;IACH,kBAAkB,CAAC,CAAC,SAAS,uBAAuB,EAAE,UAAU,EAAE,CAAC;IAInE;;OAEG;IACH,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;IAIzE;;OAEG;IACH,qBAAqB,GAAI,WAAW,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,wEAE/C;IAEF;;OAEG;IACH,gBAAgB,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,+EAE9C;IAEF;;OAEG;IACH,cAAc,CAAC,CAAC,SAAS,2BAA2B,EAAE,cAAc,EAAE,CAAC;IAIvE;;OAEG;IACH,iBAAiB,CAAC,CAAC,SAAS,2BAA2B,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAI3G;;OAEG;IACH,iBAAiB,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;CAG/C"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BaseService } from '../../../services/base.js';
|
|
2
|
+
|
|
3
|
+
class CoreShipmentBaseService extends BaseService {
|
|
4
|
+
constructor() {
|
|
5
|
+
super("shipment");
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Get all shipping methods
|
|
9
|
+
*/
|
|
10
|
+
getShippingMethods() {
|
|
11
|
+
return this.api.get(`${this.apiPrefix}/shipment/shipping-methods/actives`);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get shipping addresses with pagination
|
|
15
|
+
*/
|
|
16
|
+
getShippingAddresses(params) {
|
|
17
|
+
return this.api.get(`${this.apiPrefix}/shipment/addresses`, { params });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Add new shipping address
|
|
21
|
+
*/
|
|
22
|
+
addShippingAddress(newAddress) {
|
|
23
|
+
return this.api.post(`${this.apiPrefix}/shipment/addresses`, newAddress);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Update shipping address
|
|
27
|
+
*/
|
|
28
|
+
updateShippingAddress(addressId, updateAddress) {
|
|
29
|
+
return this.api.put(`${this.apiPrefix}/shipment/addresses/${addressId}`, updateAddress);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Delete shipping address
|
|
33
|
+
*/
|
|
34
|
+
deleteShippingAddress = (addressId) => {
|
|
35
|
+
return this.api.delete(`${this.apiPrefix}/shipment/addresses/${addressId}`);
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Get beneficiaries with pagination
|
|
39
|
+
*/
|
|
40
|
+
getBeneficiaries = (params) => {
|
|
41
|
+
return this.api.get(`${this.apiPrefix}/shipment/beneficiaries`, { params });
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Add new beneficiary
|
|
45
|
+
*/
|
|
46
|
+
addBeneficiary(newBeneficiary) {
|
|
47
|
+
return this.api.post(`${this.apiPrefix}/shipment/beneficiaries`, newBeneficiary);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Update beneficiary
|
|
51
|
+
*/
|
|
52
|
+
updateBeneficiary(beneficiaryId, updateBeneficiary) {
|
|
53
|
+
return this.api.put(`${this.apiPrefix}/shipment/beneficiaries/${beneficiaryId}`, updateBeneficiary);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Delete beneficiary
|
|
57
|
+
*/
|
|
58
|
+
deleteBeneficiary(beneficiaryId) {
|
|
59
|
+
return this.api.delete(`${this.apiPrefix}/shipment/beneficiaries/${beneficiaryId}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { CoreShipmentBaseService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreShipment.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/types/CoreShipment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,yBAAyB,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACpH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,mBAAmB,EAAE,CAAC,SAAS,uBAAuB,EAAE,CAAC,SAAS,uBAAuB,CAAE,SAAQ,SAAS;IACtL,eAAe,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;IAC5B,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC5C,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACxC,kBAAkB,EAAE,CAAC,eAAe,EAAE,CAAC,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1D,kBAAkB,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CAAC;IACrC,oBAAoB,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,oBAAoB,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5E,oBAAoB,EAAE,MAAM,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACrD,sBAAsB,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC;IACvH,kBAAkB,EAAE,CAAC,CAAC,SAAS,uBAAuB,EAAE,UAAU,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IACpI,qBAAqB,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1I,qBAAqB,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/G,kBAAkB,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC;IACnH,cAAc,EAAE,CAAC,CAAC,SAAS,2BAA2B,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IACxI,iBAAiB,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/J,iBAAiB,EAAE,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,KAAK,IAAI,CAAC;CAClH;AACD,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,uBAAuB,CAAE,SAAQ,QAAQ;IACnF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR,sBAAsB,EAAE,2BAA2B,EAAE,CAAC;IACtD,qBAAqB,EAAE,2BAA2B,EAAE,CAAC;CACxD;AACD,oBAAY,2BAA2B;IACnC,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;CAChC;AACD,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,2BAA2B,CAAC;AAC/E,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,MAAM,WAAW,2BAA2B;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;CACnB;AACD,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACjD,OAAO,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,8BAA+B,SAAQ,mBAAmB;CAC1E;AACD,MAAM,WAAW,+BAAgC,SAAQ,mBAAmB;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACvB;AACD,MAAM,WAAW,uCAAwC,SAAQ,+BAA+B;IAC5F,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,uBAAwB,SAAQ,QAAQ;IACrD,OAAO,EAAE,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,mCAAoC,SAAQ,uBAAuB;IAChF,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;CACvB;AACD,MAAM,WAAW,2CAA4C,SAAQ,mCAAmC;IACpG,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACxB;AACD,MAAM,WAAW,uBAAwB,SAAQ,QAAQ;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;CACvB;AACD,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var CoreShippingMethodTypesEnum = /* @__PURE__ */ ((CoreShippingMethodTypesEnum2) => {
|
|
2
|
+
CoreShippingMethodTypesEnum2["home_delivery"] = "home_delivery";
|
|
3
|
+
CoreShippingMethodTypesEnum2["local_pickup"] = "local_pickup";
|
|
4
|
+
return CoreShippingMethodTypesEnum2;
|
|
5
|
+
})(CoreShippingMethodTypesEnum || {});
|
|
6
|
+
|
|
7
|
+
export { CoreShippingMethodTypesEnum };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -4,12 +4,22 @@ import { CoreBuilder } from '../../../classes/CoreBuilder';
|
|
|
4
4
|
export declare class CoreShopCartBuilder<T> implements CoreBuilder {
|
|
5
5
|
protected shopCartService: CoreShopCartBaseService<T>;
|
|
6
6
|
protected initialState: Pick<CoreShopCartStore<T>, 'cart' | 'cartItems' | 'loading' | 'error'>;
|
|
7
|
-
constructor(service?: CoreShopCartBaseService<T>, initialState?:
|
|
7
|
+
constructor(service?: CoreShopCartBaseService<T>, initialState?: {
|
|
8
|
+
cart: {
|
|
9
|
+
items: never[];
|
|
10
|
+
subtotal: number;
|
|
11
|
+
total: number;
|
|
12
|
+
itemized_subtotals: never[];
|
|
13
|
+
};
|
|
14
|
+
cartItems: never[];
|
|
15
|
+
loading: boolean;
|
|
16
|
+
error: null;
|
|
17
|
+
});
|
|
8
18
|
build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreShopCartStore<T>>, "persist"> & {
|
|
9
19
|
persist: {
|
|
10
20
|
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreShopCartStore<T>, {
|
|
11
|
-
cart: import('
|
|
12
|
-
cartItems: import('
|
|
21
|
+
cart: import('../types').CoreShopCart<T>;
|
|
22
|
+
cartItems: import('../types').CoreCartItem<T>[];
|
|
13
23
|
}>>) => void;
|
|
14
24
|
clearStorage: () => void;
|
|
15
25
|
rehydrate: () => Promise<void> | void;
|
|
@@ -17,9 +27,10 @@ export declare class CoreShopCartBuilder<T> implements CoreBuilder {
|
|
|
17
27
|
onHydrate: (fn: (state: CoreShopCartStore<T>) => void) => () => void;
|
|
18
28
|
onFinishHydration: (fn: (state: CoreShopCartStore<T>) => void) => () => void;
|
|
19
29
|
getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreShopCartStore<T>, {
|
|
20
|
-
cart: import('
|
|
21
|
-
cartItems: import('
|
|
30
|
+
cart: import('../types').CoreShopCart<T>;
|
|
31
|
+
cartItems: import('../types').CoreCartItem<T>[];
|
|
22
32
|
}>>;
|
|
23
33
|
};
|
|
24
34
|
}>;
|
|
25
35
|
}
|
|
36
|
+
//# sourceMappingURL=CoreShopCartBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreShopCartBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShopCart/classes/CoreShopCartBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,qBAAa,mBAAmB,CAAC,CAAC,CAAE,YAAW,WAAW;IACxD,SAAS,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACtD,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAG7F,OAAO,GAAE,uBAAuB,CAAC,CAAC,CAAoC,EACtE,YAAY;;;;;;;;;;KAUX;IAMI,KAAK;;;;;;;;;;;;;;;;;CAiKb"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { persist } from '../../../node_modules/zustand/esm/middleware.js';
|
|
2
|
+
import { CoreShopCartBaseService } from '../services/base.js';
|
|
3
|
+
import { create } from '../../../node_modules/zustand/esm/react.js';
|
|
4
|
+
|
|
5
|
+
class CoreShopCartBuilder {
|
|
6
|
+
shopCartService;
|
|
7
|
+
initialState;
|
|
8
|
+
constructor(service = new CoreShopCartBaseService(), initialState = {
|
|
9
|
+
cart: {
|
|
10
|
+
items: [],
|
|
11
|
+
subtotal: 0,
|
|
12
|
+
total: 0,
|
|
13
|
+
itemized_subtotals: []
|
|
14
|
+
},
|
|
15
|
+
cartItems: [],
|
|
16
|
+
loading: false,
|
|
17
|
+
error: null
|
|
18
|
+
}) {
|
|
19
|
+
this.shopCartService = service;
|
|
20
|
+
this.initialState = initialState;
|
|
21
|
+
}
|
|
22
|
+
build() {
|
|
23
|
+
return create()(
|
|
24
|
+
persist(
|
|
25
|
+
(set, get) => ({
|
|
26
|
+
...this.initialState,
|
|
27
|
+
// Setters
|
|
28
|
+
setLoading: (loading) => set({ loading }),
|
|
29
|
+
setError: (error) => set({ error }),
|
|
30
|
+
setCart: (cart) => set({ cart }),
|
|
31
|
+
setCartItems: (cartItems) => set({ cartItems }),
|
|
32
|
+
// Getters
|
|
33
|
+
getCartItems: () => get().cartItems,
|
|
34
|
+
getCart: () => get().cart,
|
|
35
|
+
// Add to cart
|
|
36
|
+
addToCart: async (product_id, quantity, actions) => {
|
|
37
|
+
set({ loading: true, error: null });
|
|
38
|
+
try {
|
|
39
|
+
await this.shopCartService.addToCart(product_id, quantity);
|
|
40
|
+
const response = await this.shopCartService.getCart();
|
|
41
|
+
set({
|
|
42
|
+
cart: response.data.data,
|
|
43
|
+
cartItems: response.data.data.items,
|
|
44
|
+
loading: false
|
|
45
|
+
});
|
|
46
|
+
actions?.onSuccess?.(response.data);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
set({ error: error || "Failed to add to cart", loading: false });
|
|
49
|
+
actions?.onError?.(error);
|
|
50
|
+
throw error;
|
|
51
|
+
} finally {
|
|
52
|
+
actions?.onFinish?.();
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
// Remove one unit from cart
|
|
56
|
+
removeFromCart: async (product_id, actions) => {
|
|
57
|
+
set({ loading: true, error: null });
|
|
58
|
+
try {
|
|
59
|
+
await this.shopCartService.removeFromCart(product_id);
|
|
60
|
+
const response = await this.shopCartService.getCart();
|
|
61
|
+
set({
|
|
62
|
+
cart: response.data.data,
|
|
63
|
+
cartItems: response.data.data.items,
|
|
64
|
+
loading: false
|
|
65
|
+
});
|
|
66
|
+
actions?.onSuccess?.(response.data);
|
|
67
|
+
} catch (error) {
|
|
68
|
+
set({ error: error || "Failed to remove from cart", loading: false });
|
|
69
|
+
actions?.onError?.(error);
|
|
70
|
+
throw error;
|
|
71
|
+
} finally {
|
|
72
|
+
actions?.onFinish?.();
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
// Remove entire item from cart
|
|
76
|
+
removeItemFromCart: async (product_id, actions) => {
|
|
77
|
+
set({ loading: true, error: null });
|
|
78
|
+
try {
|
|
79
|
+
await this.shopCartService.removeItemFromCart(product_id);
|
|
80
|
+
const response = await this.shopCartService.getCart();
|
|
81
|
+
set({
|
|
82
|
+
cart: response.data.data,
|
|
83
|
+
cartItems: response.data.data.items,
|
|
84
|
+
loading: false
|
|
85
|
+
});
|
|
86
|
+
actions?.onSuccess?.(response.data);
|
|
87
|
+
} catch (error) {
|
|
88
|
+
set({ error: error || "Failed to remove item from cart", loading: false });
|
|
89
|
+
actions?.onError?.(error);
|
|
90
|
+
throw error;
|
|
91
|
+
} finally {
|
|
92
|
+
actions?.onFinish?.();
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
// Clear cart
|
|
96
|
+
clearCart: async (actions) => {
|
|
97
|
+
set({ loading: true, error: null });
|
|
98
|
+
try {
|
|
99
|
+
await this.shopCartService.clearCart();
|
|
100
|
+
const response = await this.shopCartService.getCart();
|
|
101
|
+
set({
|
|
102
|
+
cart: response.data.data,
|
|
103
|
+
cartItems: response.data.data.items,
|
|
104
|
+
loading: false
|
|
105
|
+
});
|
|
106
|
+
actions?.onSuccess?.(response.data);
|
|
107
|
+
} catch (error) {
|
|
108
|
+
set({ error: error || "Failed to clear cart", loading: false });
|
|
109
|
+
actions?.onError?.(error);
|
|
110
|
+
throw error;
|
|
111
|
+
} finally {
|
|
112
|
+
actions?.onFinish?.();
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
// Fetch full cart
|
|
116
|
+
fetchCart: async (actions) => {
|
|
117
|
+
set({ loading: true, error: null });
|
|
118
|
+
try {
|
|
119
|
+
const response = await this.shopCartService.getCart();
|
|
120
|
+
set({
|
|
121
|
+
cart: response.data.data,
|
|
122
|
+
cartItems: response.data.data.items,
|
|
123
|
+
loading: false
|
|
124
|
+
});
|
|
125
|
+
actions?.onSuccess?.(response.data);
|
|
126
|
+
return response.data;
|
|
127
|
+
} catch (error) {
|
|
128
|
+
set({ error: error || "Failed to fetch cart", loading: false });
|
|
129
|
+
actions?.onError?.(error);
|
|
130
|
+
throw error;
|
|
131
|
+
} finally {
|
|
132
|
+
actions?.onFinish?.();
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
// Fetch cart items only
|
|
136
|
+
fetchCartItems: async (actions) => {
|
|
137
|
+
set({ loading: true, error: null });
|
|
138
|
+
try {
|
|
139
|
+
const response = await this.shopCartService.getCartItems();
|
|
140
|
+
set({ cartItems: response.data.data, loading: false });
|
|
141
|
+
actions?.onSuccess?.(response.data);
|
|
142
|
+
return response.data;
|
|
143
|
+
} catch (error) {
|
|
144
|
+
set({ error: error || "Failed to fetch cart items", loading: false });
|
|
145
|
+
actions?.onError?.(error);
|
|
146
|
+
throw error;
|
|
147
|
+
} finally {
|
|
148
|
+
actions?.onFinish?.();
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
// Reset
|
|
152
|
+
reset: () => set(this.initialState)
|
|
153
|
+
}),
|
|
154
|
+
{
|
|
155
|
+
name: "shop-cart-storage",
|
|
156
|
+
partialize: (state) => ({
|
|
157
|
+
cart: state.cart,
|
|
158
|
+
cartItems: state.cartItems
|
|
159
|
+
})
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export { CoreShopCartBuilder };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShopCart/classes/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShopCart/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|