umwd-components 0.1.714 → 0.1.716
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 +273 -0
- package/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/dist/node_modules/@mollie/api-client/dist/mollie.esm.js +1 -1
- package/dist/node_modules/axios/index.js +6 -0
- package/dist/node_modules/axios/lib/adapters/adapters.js +1 -1
- package/dist/node_modules/axios/lib/adapters/fetch.js +1 -1
- package/dist/node_modules/axios/lib/adapters/xhr.js +1 -1
- package/dist/node_modules/axios/lib/cancel/CancelToken.js +1 -1
- package/dist/node_modules/axios/lib/core/Axios.js +1 -1
- package/dist/node_modules/axios/lib/core/AxiosError.js +1 -1
- package/dist/node_modules/axios/lib/core/AxiosHeaders.js +1 -1
- package/dist/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/dist/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/dist/node_modules/axios/lib/core/mergeConfig.js +1 -1
- package/dist/node_modules/axios/lib/core/transformData.js +1 -1
- package/dist/node_modules/axios/lib/defaults/index.js +1 -1
- package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +1 -1
- package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +1 -1
- package/dist/node_modules/axios/lib/helpers/composeSignals.js +1 -1
- package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +1 -1
- package/dist/node_modules/axios/lib/helpers/parseHeaders.js +1 -1
- package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +1 -1
- package/dist/node_modules/axios/lib/helpers/resolveConfig.js +1 -1
- package/dist/node_modules/axios/lib/helpers/throttle.js +1 -1
- package/dist/node_modules/axios/lib/helpers/toFormData.js +1 -1
- package/dist/node_modules/axios/lib/helpers/trackStream.js +1 -1
- package/dist/node_modules/axios/lib/helpers/validator.js +1 -1
- package/dist/node_modules/axios/lib/platform/index.js +1 -1
- package/dist/node_modules/axios/lib/utils.js +1 -1
- package/dist/node_modules/call-bind-apply-helpers/actualApply.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/functionApply.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/functionCall.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/index.js +6 -0
- package/dist/node_modules/call-bind-apply-helpers/reflectApply.js +6 -0
- package/dist/node_modules/call-bound/index.js +6 -0
- package/dist/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/node_modules/dunder-proto/get.js +6 -0
- package/dist/node_modules/es-define-property/index.js +1 -1
- package/dist/{_virtual/index7.js → node_modules/es-object-atoms/index.js} +1 -1
- package/dist/node_modules/function-bind/implementation.js +1 -1
- package/dist/node_modules/function-bind/index.js +1 -1
- package/dist/node_modules/get-intrinsic/index.js +1 -1
- package/dist/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/dist/node_modules/get-proto/Reflect.getPrototypeOf.js +6 -0
- package/dist/node_modules/get-proto/index.js +6 -0
- package/dist/{_virtual/index5.js → node_modules/gopd/gOPD.js} +1 -1
- package/dist/node_modules/gopd/index.js +1 -1
- package/dist/node_modules/has-symbols/index.js +1 -1
- package/dist/node_modules/has-symbols/shams.js +1 -1
- package/dist/node_modules/hasown/index.js +1 -1
- package/dist/{_virtual/index8.js → node_modules/math-intrinsics/abs.js} +1 -1
- package/dist/{_virtual/types.js → node_modules/math-intrinsics/floor.js} +1 -1
- package/dist/node_modules/math-intrinsics/isNaN.js +6 -0
- package/dist/{_virtual/index6.js → node_modules/math-intrinsics/max.js} +1 -1
- package/dist/node_modules/math-intrinsics/min.js +6 -0
- package/dist/node_modules/math-intrinsics/pow.js +6 -0
- package/dist/node_modules/math-intrinsics/round.js +6 -0
- package/dist/node_modules/math-intrinsics/sign.js +6 -0
- package/dist/node_modules/object-assign/index.js +1 -1
- package/dist/node_modules/object-inspect/index.js +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/qs/lib/index.js +1 -1
- package/dist/node_modules/qs/lib/parse.js +1 -1
- package/dist/node_modules/qs/lib/stringify.js +1 -1
- package/dist/node_modules/qs/lib/utils.js +1 -1
- package/dist/node_modules/react-csv/lib/components/Download.js +1 -1
- package/dist/node_modules/react-csv/lib/components/Link.js +1 -1
- package/dist/node_modules/react-csv/lib/core.js +1 -1
- package/dist/node_modules/safe-buffer/index.js +2 -2
- package/dist/node_modules/sax/lib/sax.js +1 -1
- package/dist/node_modules/side-channel/index.js +1 -1
- package/dist/node_modules/side-channel-list/index.js +6 -0
- package/dist/node_modules/side-channel-map/index.js +6 -0
- package/dist/node_modules/side-channel-weakmap/index.js +6 -0
- package/dist/node_modules/string_decoder/lib/string_decoder.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +1 -1
- package/dist/node_modules/xml-js/lib/js2xml.js +1 -1
- package/dist/node_modules/xml-js/lib/xml2json.js +1 -1
- package/dist/src/components/ContactForm.js +1 -1
- package/dist/src/components/FluidBackground.js +1 -1
- package/dist/src/components/LogoutButton.js +1 -1
- package/dist/src/components/WebsitePlaceholder.js +1 -1
- package/dist/src/components/ZodErrors.js +1 -1
- package/dist/src/components/auth/AuthWidget.js +1 -1
- package/dist/src/components/common/Address.js +1 -1
- package/dist/src/components/common/AmountUpdater.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTable.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableFilterRow.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableHead.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableRow.js +1 -1
- package/dist/src/components/common/EnhancedTable/EnhancedTableToolbar.js +1 -1
- package/dist/src/components/common/NumberInput.js +1 -1
- package/dist/src/components/common/WeekPicker.js +1 -1
- package/dist/src/components/common/cookie-consent/CookieConsentContext.js +1 -1
- package/dist/src/components/common/csv/CsvDownloader.js +1 -1
- package/dist/src/components/common/media/MediaGrid.js +1 -1
- package/dist/src/components/common/media/MediaLibraryDialog.js +1 -1
- package/dist/src/components/common/media/UploadBase64MediaForm.js +1 -1
- package/dist/src/components/common/media/UploadMediaForm.js +1 -1
- package/dist/src/components/common/snackbar/GlobalSnackbar.js +1 -1
- package/dist/src/components/e-commerce/cart/CartSummary.js +1 -1
- package/dist/src/components/e-commerce/cart/hooks.js +1 -1
- package/dist/src/components/e-commerce/categories/AddCategoryForm.js +1 -1
- package/dist/src/components/e-commerce/categories/CategorySelectorV2.js +1 -1
- package/dist/src/components/e-commerce/categories/EditCategoryForm.js +1 -1
- package/dist/src/components/e-commerce/checkout/CheckoutForm.js +1 -1
- package/dist/src/components/e-commerce/checkout/Step2.js +1 -1
- package/dist/src/components/e-commerce/checkout/Step4.js +1 -1
- package/dist/src/components/e-commerce/checkout/Step5.js +1 -1
- package/dist/src/components/e-commerce/customer/BusinessCredentials.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerCompletenessWarning.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerProfileDisplay.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerProfileEditForm.js +1 -1
- package/dist/src/components/e-commerce/customer/CustomerSelector.js +1 -1
- package/dist/src/components/e-commerce/enduser/EnduserProfileEditForm.js +1 -1
- package/dist/src/components/e-commerce/invoice/CreateInvoiceForm.js +1 -1
- package/dist/src/components/e-commerce/invoice/InvoiceItemFields.js +1 -1
- package/dist/src/components/e-commerce/invoice/InvoicePDF.js +1 -1
- package/dist/src/components/e-commerce/iro/CreateIROForm.js +1 -1
- package/dist/src/components/e-commerce/iro/IROItemFields.js +1 -1
- package/dist/src/components/e-commerce/iro/IroItemDisplay.js +1 -1
- package/dist/src/components/e-commerce/iro/IroItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/iro/IroStatusIndicator.js +1 -1
- package/dist/src/components/e-commerce/iro/ManageIROForm.js +1 -1
- package/dist/src/components/e-commerce/iro/RmaForm.js +1 -1
- package/dist/src/components/e-commerce/iro/TextualIROItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/iro/TextualManageIROForm.js +1 -1
- package/dist/src/components/e-commerce/opo/CreateOpoForm.js +1 -1
- package/dist/src/components/e-commerce/opo/ManageOpoForm.js +1 -1
- package/dist/src/components/e-commerce/opo/OPOItemFields.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoItemDisplay.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoStatusIndicator.js +1 -1
- package/dist/src/components/e-commerce/opo/OpoSummary.js +1 -1
- package/dist/src/components/e-commerce/opo/PaymentStatusIndicator.js +1 -1
- package/dist/src/components/e-commerce/opo/TextualManageOpoForm.js +1 -1
- package/dist/src/components/e-commerce/opo/TextualOpoItemUpdater.js +1 -1
- package/dist/src/components/e-commerce/products/AddProductForm.js +1 -1
- package/dist/src/components/e-commerce/products/EditProductForm.js +1 -1
- package/dist/src/components/e-commerce/products/EditStockForm.js +1 -1
- package/dist/src/components/e-commerce/products/PriceFields.js +1 -1
- package/dist/src/components/e-commerce/products/ProductCategoryCard.js +1 -1
- package/dist/src/components/e-commerce/products/ProductSelector.js +1 -1
- package/dist/src/components/e-commerce/products/SingleProduct.js +1 -1
- package/dist/src/components/layout/Footer.js +1 -1
- package/dist/src/components/layout/Navbar.js +1 -1
- package/dist/src/components/layout/NavbarV2.js +1 -1
- package/dist/src/components/layout/SideNav.js +1 -1
- package/dist/src/components/logistics/dispatcher/DispatcherProfileEditForm.js +1 -1
- package/dist/src/components/logistics/ipo/AddIPOForm.js +1 -1
- package/dist/src/components/logistics/ipo/IPOItemFields.js +1 -1
- package/dist/src/components/logistics/ipo/IPOItemUpdater.js +1 -1
- package/dist/src/components/logistics/ipo/IpoStatusIndicator.js +1 -1
- package/dist/src/components/logistics/ipo/ManageIPOForm.js +1 -1
- package/dist/src/components/logistics/ipo/TextualIPOItemUpdater.js +1 -1
- package/dist/src/components/logistics/ipo/TextualManageIPOForm.js +1 -1
- package/dist/src/components/logistics/note/NoteTakingComponent.js +1 -1
- package/dist/src/components/logistics/note/NotesDisplay.js +1 -1
- package/dist/src/components/logistics/report/PreReportsDisplay.js +1 -1
- package/dist/src/components/logistics/report/ReportMakingComponent.js +1 -1
- package/dist/src/components/logistics/report/ReportsDisplay.js +1 -1
- package/dist/src/components/logistics/vendor/AddVendorForm.js +1 -1
- package/dist/src/components/logistics/vendor/EditVendorForm.js +1 -1
- package/dist/src/components/logistics/vendor/VendorDisplay.js +1 -1
- package/dist/src/components/logistics/vendor/VendorSelector.js +1 -1
- package/dist/src/components/page-builder/ColumnsSection.js +1 -1
- package/dist/src/components/page-builder/FleetSection.js +1 -1
- package/dist/src/components/page-builder/IconSection.js +1 -1
- package/dist/src/components/page-builder/LogoBarSection.js +1 -1
- package/dist/src/components/page-builder/PBFeaturesSection.js +1 -1
- package/dist/src/components/page-builder/PBPersonaliaSection.js +1 -1
- package/dist/src/components/page-builder/PBTextImageSection.js +1 -1
- package/dist/src/components/page-builder/PictureBarSection.js +1 -1
- package/dist/src/components/page-elements/CategoryBlock.js +1 -1
- package/dist/src/components/page-elements/ColumnsSection.js +1 -1
- package/dist/src/components/page-elements/FeaturesSection.js +1 -1
- package/dist/src/components/page-elements/FleetSection.js +1 -1
- package/dist/src/components/page-elements/IconSection.js +1 -1
- package/dist/src/components/page-elements/LogoBarSection.js +1 -1
- package/dist/src/components/page-elements/PersonaliaSection.js +1 -1
- package/dist/src/components/page-elements/PictureBarSection.js +1 -1
- package/dist/src/components/page-elements/TextImageSection.js +1 -1
- package/dist/src/components/public-information/PublicInformationForm.js +1 -1
- package/dist/src/context/auth/SessionContext.js +1 -1
- package/dist/src/context/common/SnackbarContext.js +1 -1
- package/dist/src/context/e-commerce/cart/CartContext.js +1 -1
- package/dist/src/context/e-commerce/checkout/CheckoutContext.js +1 -1
- package/dist/src/data/actions/auth-actions.js +1 -1
- package/dist/src/data/actions/e-commerce/categories/createCategoryAction.js +1 -1
- package/dist/src/data/actions/e-commerce/categories/updateCategoryAction.js +1 -1
- package/dist/src/data/actions/e-commerce/checkout-action.js +1 -1
- package/dist/src/data/actions/e-commerce/enduser/profile-actions.js +1 -1
- package/dist/src/data/actions/e-commerce/invoices/createInvoiceAction.js +1 -1
- package/dist/src/data/actions/e-commerce/iro/createIroAction.js +1 -1
- package/dist/src/data/actions/e-commerce/iro/requestRmaAction.js +1 -1
- package/dist/src/data/actions/e-commerce/iro/updateIroAction.js +1 -1
- package/dist/src/data/actions/e-commerce/opo/createOpoAction.js +1 -1
- package/dist/src/data/actions/e-commerce/opo/updateOpoAction.js +1 -1
- package/dist/src/data/actions/e-commerce/product/createProductAction.js +1 -1
- package/dist/src/data/actions/e-commerce/product/updateProductAction.js +1 -1
- package/dist/src/data/actions/logistics/dispatcher/profile-actions.js +1 -1
- package/dist/src/data/actions/logistics/ipo/createIPOAction.js +1 -1
- package/dist/src/data/actions/logistics/ipo/updateIpoAction.js +1 -1
- package/dist/src/data/actions/logistics/note/createNoteAction.js +1 -1
- package/dist/src/data/actions/logistics/report/createReportAction.js +1 -1
- package/dist/src/data/actions/logistics/vendor/createVendorAction.js +1 -1
- package/dist/src/data/actions/logistics/vendor/updateVendorAction.js +1 -1
- package/dist/src/data/actions/media/updateMediaAction.js +1 -1
- package/dist/src/data/actions/media/uploadBase64MediaAction.js +1 -1
- package/dist/src/data/actions/media/uploadMediaAction.js +1 -1
- package/dist/src/data/actions/pagebuilder-actions.js +1 -1
- package/dist/src/data/actions/profile-actions.js +1 -1
- package/dist/src/data/actions/public-information/updatePublicInformationAction.js +1 -1
- package/dist/src/data/loaders/common/media/downloadBase64File.js +1 -1
- package/dist/src/data/loaders/common/media/getAllMedia.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllCategoryNames.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllCustomers.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllInvoices.js +1 -1
- package/dist/src/data/loaders/e-commerce/getAllOpos.js +1 -1
- package/dist/src/data/loaders/e-commerce/getCustomerLabels.js +1 -1
- package/dist/src/data/loaders/e-commerce/getCustomerModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/getOpoModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/getPaginatedCategories.js +1 -1
- package/dist/src/data/loaders/e-commerce/getProductModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/getProductNames.js +1 -1
- package/dist/src/data/loaders/e-commerce/getShop.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleCategory.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleCustomer.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleOpo.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleProduct.js +1 -1
- package/dist/src/data/loaders/e-commerce/getSingleStock.js +1 -1
- package/dist/src/data/loaders/e-commerce/getTableProducts.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/getAllIros.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/getIroModel.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/getSingleIro.js +1 -1
- package/dist/src/data/loaders/e-commerce/iros/queryAllIros.js +1 -1
- package/dist/src/data/loaders/e-commerce/queryAllCustomers.js +1 -1
- package/dist/src/data/loaders/e-commerce/queryAllOpos.js +1 -1
- package/dist/src/data/loaders/e-commerce/queryAllProducts.js +1 -1
- package/dist/src/data/loaders/e-commerce-loaders.js +1 -1
- package/dist/src/data/loaders/loaders.js +1 -1
- package/dist/src/data/loaders/logistics/getIpoModel.js +1 -1
- package/dist/src/data/loaders/logistics/getIpoNames.js +1 -1
- package/dist/src/data/loaders/logistics/getSingleIpo.js +1 -1
- package/dist/src/data/loaders/logistics/getSingleVendor.js +1 -1
- package/dist/src/data/loaders/logistics/getTableIpos.js +1 -1
- package/dist/src/data/loaders/logistics/getTableVendors.js +1 -1
- package/dist/src/data/loaders/logistics/getVendorModel.js +1 -1
- package/dist/src/data/loaders/logistics/getVendorNames.js +1 -1
- package/dist/src/data/loaders/logistics/queryAllIpos.js +1 -1
- package/dist/src/data/loaders/logistics/queryAllVendors.js +1 -1
- package/dist/src/data/loaders/page-builder/getTablePages.js +1 -1
- package/dist/src/data/loaders/page-elements/getSinglePage.js +1 -1
- package/dist/src/data/loaders/public-information/getPublicInformation.js +1 -1
- package/dist/src/data/loaders/user/getUserMeLoader.js +1 -1
- package/dist/src/data/services/archive-service.js +1 -1
- package/dist/src/data/services/auth-service.js +1 -1
- package/dist/src/data/services/common/cancellation-service.js +1 -1
- package/dist/src/data/services/common/confirmation-service.js +1 -1
- package/dist/src/data/services/e-commerce/enduser/get-enduser-me-loader.js +1 -1
- package/dist/src/data/services/file-service.js +1 -1
- package/dist/src/data/services/get-token.js +1 -1
- package/dist/src/data/services/get-user-me-loader.js +1 -1
- package/dist/src/data/services/logistics/dispatcher/get-dispatcher-me-loader.js +1 -1
- package/dist/src/data/services/mutate-data.js +1 -1
- package/dist/src/lib/eoriValidate.js +1 -1
- package/dist/src/lib/molliePaymentProvider.js +1 -1
- package/dist/src/lib/parseNavigation.js +1 -1
- package/dist/src/lib/processFilters.js +1 -1
- package/dist/src/lib/utils.js +1 -1
- package/dist/src/lib/vatValidate.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/StrapiErrors.d.ts +2 -2
- package/dist/types/components/e-commerce/cart/hooks.d.ts +2 -3
- package/dist/types/components/e-commerce/products/AddProductForm.d.ts +3 -3
- package/dist/types/lib/getIcon.d.ts +0 -1
- package/dist/types/types/StrapiImageProps.d.ts +0 -1
- package/dist/types/types/common/Contact.d.ts +0 -1
- package/dist/types/types/common/Socials.d.ts +0 -1
- package/dist/types/types/common/enhancedTable/types.d.ts +0 -1
- package/package.json +15 -25
- package/postcss.config.js +5 -6
- package/rollup.config.mjs +9 -0
- package/src/components/Logo.tsx +20 -9
- package/src/components/LogoutButton.tsx +1 -29
- package/src/components/StrapiErrors.tsx +5 -1
- package/src/components/e-commerce/invoice/InvoicePDF.tsx +54 -48
- package/src/components/e-commerce/iro/ManageIROForm.tsx +3 -3
- package/src/components/e-commerce/opo/ManageOpoForm.tsx +7 -2
- package/src/components/e-commerce/opo/OpoItemUpdater.tsx +16 -6
- package/src/index.ts +327 -327
- package/src/lib/APIcon.svg +6 -6
- package/src/lib/utils.ts +0 -7
- package/src/styles/globals.css +2 -3
- package/tsconfig.json +24 -34
- package/.storybook/main.js +0 -26
- package/.storybook/preview.js +0 -50
- package/dist/_virtual/inherits_browser.js +0 -6
- package/dist/_virtual/punycode.js +0 -6
- package/dist/_virtual/url.js +0 -6
- package/dist/_virtual/util.js +0 -6
- package/dist/node_modules/available-typed-arrays/index.js +0 -6
- package/dist/node_modules/base64-js/index.js +0 -6
- package/dist/node_modules/buffer/index.js +0 -12
- package/dist/node_modules/call-bind/callBound.js +0 -6
- package/dist/node_modules/call-bind/index.js +0 -6
- package/dist/node_modules/define-data-property/index.js +0 -6
- package/dist/node_modules/for-each/index.js +0 -6
- package/dist/node_modules/has-property-descriptors/index.js +0 -6
- package/dist/node_modules/has-proto/index.js +0 -6
- package/dist/node_modules/has-tostringtag/shams.js +0 -6
- package/dist/node_modules/ieee754/index.js +0 -7
- package/dist/node_modules/inherits/inherits_browser.js +0 -6
- package/dist/node_modules/is-arguments/index.js +0 -6
- package/dist/node_modules/is-callable/index.js +0 -6
- package/dist/node_modules/is-generator-function/index.js +0 -6
- package/dist/node_modules/is-typed-array/index.js +0 -6
- package/dist/node_modules/set-function-length/index.js +0 -6
- package/dist/node_modules/url/node_modules/punycode/punycode.js +0 -7
- package/dist/node_modules/url/url.js +0 -6
- package/dist/node_modules/util/support/isBufferBrowser.js +0 -6
- package/dist/node_modules/util/support/types.js +0 -6
- package/dist/node_modules/util/util.js +0 -6
- package/dist/node_modules/which-typed-array/index.js +0 -6
- package/dist/types/app/checkout/layout.d.ts +0 -4
- package/dist/types/app/checkout/page.d.ts +0 -3
- package/dist/types/app/layout.d.ts +0 -8
- package/dist/types/app/page.d.ts +0 -2
- package/dist/types/components/e-commerce/cart/CartWidgetOld.d.ts +0 -9
- package/next-env.d.ts +0 -5
- package/next.config.js +0 -18
- package/public/AMH/BulletSVG.svg +0 -9
- package/public/AMH/desktop_wallpaper@0.25x.png +0 -0
- package/public/Logo.svg +0 -6
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo.png +0 -0
- package/public/logo_decorated.png +0 -0
- package/public/logo_text.png +0 -0
- package/public/logo_thick.png +0 -0
- package/public/manifest.json +0 -25
- package/public/placeholders/fullscreen_1920X1080.png +0 -0
- package/public/placeholders/highres_2400X1600.png +0 -0
- package/public/placeholders/large_1200X800.png +0 -0
- package/public/placeholders/medium_600X400.png +0 -0
- package/public/placeholders/small_300X200.png +0 -0
- package/public/placeholders/thumbnail_100X100.png +0 -0
- package/public/robots.txt +0 -3
- package/readme.MD +0 -0
- package/rollup.config copy.mjs +0 -80
- package/src/app/checkout/layout.tsx +0 -28
- package/src/app/checkout/page.tsx +0 -9
- package/src/app/layout.tsx +0 -16
- package/src/app/page.tsx +0 -38
- package/src/stories/ContactForm.stories.js +0 -13
- package/src/stories/FeatureSection.stories.js +0 -86
- package/src/stories/FluidBackground.stories.js +0 -29
- package/src/stories/Footer.stories.js +0 -130
- package/src/stories/HeroSection.stories.js +0 -101
- package/src/stories/LogoutButton.stories.js +0 -15
- package/src/stories/Page.stories.js +0 -536
- package/src/stories/PageBuilder.stories.js +0 -396
- package/src/stories/RegisterForm.stories.js +0 -13
- package/src/stories/ScrollNavbar.stories.js +0 -121
- package/src/stories/SideNav.stories.js +0 -47
- package/src/stories/SigninForm.stories.js +0 -13
- package/src/stories/StrapiImage.stories.js +0 -23
- package/src/stories/TextImageSection.stories.js +0 -73
- package/src/stories/WebsitePlaceholder.stories.js +0 -178
- package/src/stories/WhatsAppClickToChatButton.stories.js +0 -69
- package/src/stories/styles.css +0 -39
- package/tailwind.config.ts +0 -80
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__assign as t}from"../../../node_modules/tslib/tslib.es6.js";import e from"react";import r from"@mui/material/Grid";import m from"@mui/material/Card";import i from"@mui/material/CardContent";import a from"@mui/material/Typography";import n from"@mui/material/Container";import o from"../../lib/getIcon.js";function l(l){var c=l.data,s=c.icon,d=c.maxWidth,p=c.sx,f=void 0===p?{}:p;return e.createElement(n,{maxWidth:d||"lg",sx:t({my:1},f)},e.createElement(r,{container:!0,spacing:2},s.map(
|
|
6
|
+
import{__assign as t}from"../../../node_modules/tslib/tslib.es6.js";import e from"react";import r from"@mui/material/Grid";import m from"@mui/material/Card";import i from"@mui/material/CardContent";import a from"@mui/material/Typography";import n from"@mui/material/Container";import o from"../../lib/getIcon.js";function l(l){var c=l.data,s=c.icon,d=c.maxWidth,p=c.sx,f=void 0===p?{}:p;return e.createElement(n,{maxWidth:d||"lg",sx:t({my:1},f)},e.createElement(r,{container:!0,spacing:2},s.map(function(t){var n=o(t.icon);return e.createElement(r,{item:!0,xs:12,sm:6,md:4,lg:3,key:t.id},e.createElement(m,{sx:{display:"flex",flexDirection:"column",flex:1,height:"100%"}},e.createElement(i,null,e.createElement(a,{variant:"h6",component:"div",sx:{display:"flex",justifyContent:"start",alignItems:"start",minHeight:"4.2rem"}},null!==n&&e.createElement(n,{sx:{mr:2,mt:.2}}),t.title),e.createElement(a,{variant:"body2",color:"text.secondary",component:"div"},t.text))))})))}export{l as IconSection};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import r from"@mui/material/Paper";import o from"@mui/material/Container";import i from"@mui/material/Grid";import a from"@mui/material/Stack";import{StrapiImage as m}from"../StrapiImage.js";import{useTheme as n}from"@mui/material/styles";import{setOpacity as l}from"../../lib/utils.js";import{StyledLink as s}from"../StyledLink.js";function p(p){var c=p.data,d=c.companies,u=c.maxWidth,g=void 0===u?"lg":u,f=c.sx,x=void 0===f?{}:f,h=c.glass,b=void 0!==h&&h,y=n();return t.createElement(o,{maxWidth:g,sx:e({my:1},x)},t.createElement(i,{container:!0,spacing:2},t.createElement(i,{item:!0,xs:12},t.createElement(r,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:l(y.palette.background.paper,b?.1:1),border:b?"1px solid rgba(255, 255, 255, 0.15)":"none"}},t.createElement(a,{direction:{xs:"column",sm:"row"},spacing:2,justifyContent:"space-around"},d&&d.map(
|
|
7
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import r from"@mui/material/Paper";import o from"@mui/material/Container";import i from"@mui/material/Grid";import a from"@mui/material/Stack";import{StrapiImage as m}from"../StrapiImage.js";import{useTheme as n}from"@mui/material/styles";import{setOpacity as l}from"../../lib/utils.js";import{StyledLink as s}from"../StyledLink.js";function p(p){var c=p.data,d=c.companies,u=c.maxWidth,g=void 0===u?"lg":u,f=c.sx,x=void 0===f?{}:f,h=c.glass,b=void 0!==h&&h,y=n();return t.createElement(o,{maxWidth:g,sx:e({my:1},x)},t.createElement(i,{container:!0,spacing:2},t.createElement(i,{item:!0,xs:12},t.createElement(r,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:l(y.palette.background.paper,b?.1:1),border:b?"1px solid rgba(255, 255, 255, 0.15)":"none"}},t.createElement(a,{direction:{xs:"column",sm:"row"},spacing:2,justifyContent:"space-around"},d&&d.map(function(r){return t.createElement(s,{key:r.id,href:r.url,sx:{flex:"1 1 0",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",paddingBottom:"1rem",transform:"scale(.9)",transition:".2s","&:hover":{transform:"scale(1)"}}},t.createElement(m,{id:r.logo.id.toString(),url:r.logo.url,alternativeText:r.logo.alternativeText,width:r.logo.width,height:r.logo.height,style:e(e({},r.logo.style),{width:"120px",height:"120px",objectFit:"contain",paddingBottom:"1rem"})}),r.name)}))))))}export{p as LogoBarSection};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__spreadArray as e,__read as t,__assign as a}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import n from"@mui/material/Paper";import i from"@mui/material/Typography";import l from"@mui/material/Container";import o from"@mui/material/Grid";import m from"@mui/material/Button";import c from"@mui/material/Stack";import s from"@mui/material/Tooltip";import d from"@mui/material/Dialog";import{StrapiImage as p}from"../StrapiImage.js";import u from"@mui/icons-material/Email";import h from"@mui/icons-material/LinkedIn";import{StyledLink as x}from"../StyledLink.js";import{useTheme as f}from"@mui/material/styles";function y(e){var t,l,y=e.partner,E=e.open,g=e.onClose,v=f();return r.createElement(d,{open:E,onClose:g,"aria-labelledby":"dialog-title"},r.createElement(n,{sx:{p:2,height:"100%"}},r.createElement(o,{container:!0,spacing:3},r.createElement(o,{item:!0,xs:12,sm:7},r.createElement(i,{variant:"h5",sx:{mb:2,display:"flex",justifyContent:"flex-start",alignItems:"center"}},y.name),r.createElement(i,{variant:"body2",color:"text.secondary",sx:{mb:2}},y.function)),r.createElement(o,{item:!0,xs:12,sm:5},r.createElement(c,{spacing:2,sx:{overflow:"clip"},justifyContent:"center",alignItems:"stretch"},(null===(t=y.photo)||void 0===t?void 0:t.url)&&r.createElement(p,{id:y.photo.id,url:y.photo.url,alternativeText:y.photo.alternativeText,width:200,height:200,style:a({borderRadius:"50%",margin:"auto"},y.photo.style)}),(null===(l=y.links)||void 0===l?void 0:l.length)>0&&y.links.map(
|
|
7
|
+
import{__spreadArray as e,__read as t,__assign as a}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import n from"@mui/material/Paper";import i from"@mui/material/Typography";import l from"@mui/material/Container";import o from"@mui/material/Grid";import m from"@mui/material/Button";import c from"@mui/material/Stack";import s from"@mui/material/Tooltip";import d from"@mui/material/Dialog";import{StrapiImage as p}from"../StrapiImage.js";import u from"@mui/icons-material/Email";import h from"@mui/icons-material/LinkedIn";import{StyledLink as x}from"../StyledLink.js";import{useTheme as f}from"@mui/material/styles";function y(e){var t,l,y=e.partner,E=e.open,g=e.onClose,v=f();return r.createElement(d,{open:E,onClose:g,"aria-labelledby":"dialog-title"},r.createElement(n,{sx:{p:2,height:"100%"}},r.createElement(o,{container:!0,spacing:3},r.createElement(o,{item:!0,xs:12,sm:7},r.createElement(i,{variant:"h5",sx:{mb:2,display:"flex",justifyContent:"flex-start",alignItems:"center"}},y.name),r.createElement(i,{variant:"body2",color:"text.secondary",sx:{mb:2}},y.function)),r.createElement(o,{item:!0,xs:12,sm:5},r.createElement(c,{spacing:2,sx:{overflow:"clip"},justifyContent:"center",alignItems:"stretch"},(null===(t=y.photo)||void 0===t?void 0:t.url)&&r.createElement(p,{id:y.photo.id,url:y.photo.url,alternativeText:y.photo.alternativeText,width:200,height:200,style:a({borderRadius:"50%",margin:"auto"},y.photo.style)}),(null===(l=y.links)||void 0===l?void 0:l.length)>0&&y.links.map(function(e){return r.createElement(x,{href:e.url,key:e.id,sx:{color:"dark"===v.palette.mode?v.palette.text.secondary:v.palette.secondary.main}},e.text)}),y.linkedIn&&r.createElement(m,{variant:"outlined",startIcon:r.createElement(h,null),href:y.linkedIn,target:"_blank",sx:{color:"dark"===v.palette.mode?v.palette.text.secondary:v.palette.secondary.main}},"LinkedIn"),y.email&&r.createElement(s,{title:"".concat(y.email)},r.createElement(m,{variant:"outlined",startIcon:r.createElement(u,null),href:"mailto:".concat(y.email),sx:{color:"dark"===v.palette.mode?v.palette.text.secondary:v.palette.secondary.main}},"Email")))))))}function E(e,l){var d,E,g=f(),v=t(r.useState(!1),2),k=v[0],I=v[1];return r.createElement(o,{item:!0,xs:12,md:6,key:e.id},r.createElement(y,{partner:e,open:k,onClose:function(){I(!1)}}),r.createElement(n,{sx:{p:2,height:"100%"}},r.createElement(o,{container:!0,spacing:3},r.createElement(o,{item:!0,xs:12,sm:7},r.createElement(i,{variant:"h5",sx:{mb:2,display:"flex",justifyContent:"flex-start",alignItems:"center"}},e.name),r.createElement(i,{variant:"body2",color:"text.secondary",sx:{mb:2}},e.function)),r.createElement(o,{item:!0,xs:12,sm:5},r.createElement(c,{spacing:2,sx:{overflow:"clip"},justifyContent:"center",alignItems:"stretch"},(null===(d=e.photo)||void 0===d?void 0:d.url)&&r.createElement(p,{id:e.photo.id,url:e.photo.url,alternativeText:e.photo.alternativeText,width:e.photo.width||200,height:e.photo.height||200,style:a({maxWidth:"100%",height:"auto",margin:"auto"},e.photo.style)}),(null===(E=e.links)||void 0===E?void 0:E.length)>0&&e.links.map(function(e){return r.createElement(x,{href:e.url,key:e.id,sx:{color:"dark"===g.palette.mode?g.palette.text.secondary:g.palette.secondary.main}},e.text)}),e.linkedIn&&r.createElement(m,{variant:"outlined",startIcon:r.createElement(h,null),href:e.linkedIn,target:"_blank",sx:{color:"dark"===g.palette.mode?g.palette.text.secondary:g.palette.secondary.main}},"LinkedIn"),e.email&&r.createElement(s,{title:"".concat(e.email)},r.createElement(m,{variant:"outlined",startIcon:r.createElement(u,null),href:"mailto:".concat(e.email),sx:{color:"dark"===g.palette.mode?g.palette.text.secondary:g.palette.secondary.main}},"Email")))))))}function g(a){var n=a.data,i=n.partner,m=n.maxWidth,c=n.sx,s=void 0===c?[]:c;return f(),r.createElement(l,{maxWidth:m||"lg",sx:e([{my:1}],t(Array.isArray(s)?s:[s]),!1)},r.createElement(o,{container:!0,spacing:2},i&&i.map(E)))}export{g as PersonaliaSection};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__assign as t}from"../../../node_modules/tslib/tslib.es6.js";import e from"react";import r from"@mui/material/Paper";import i from"@mui/material/Container";import a from"@mui/material/Grid";import m from"@mui/material/Stack";import o from"@mui/material/Box";import{StrapiImage as l}from"../StrapiImage.js";import{useTheme as n}from"@mui/material/styles";import{setOpacity as s}from"../../lib/utils.js";function p(p){var d=p.data,u=d.pictures,c=d.maxWidth,x=void 0===c?"lg":c,f=d.sx,g=void 0===f?{}:f,h=d.glass,b=void 0!==h&&h,E=n();return e.createElement(i,{maxWidth:x,sx:t({my:1},g)},e.createElement(a,{container:!0,spacing:2},e.createElement(a,{item:!0,xs:12},e.createElement(r,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:s(E.palette.background.paper,b?.1:1),border:b?"1px solid rgba(255, 255, 255, 0.15)":"none"}},e.createElement(m,{direction:{xs:"column",sm:"row"},spacing:2,justifyContent:"space-around"},u.data&&u.data.map(
|
|
7
|
+
import{__assign as t}from"../../../node_modules/tslib/tslib.es6.js";import e from"react";import r from"@mui/material/Paper";import i from"@mui/material/Container";import a from"@mui/material/Grid";import m from"@mui/material/Stack";import o from"@mui/material/Box";import{StrapiImage as l}from"../StrapiImage.js";import{useTheme as n}from"@mui/material/styles";import{setOpacity as s}from"../../lib/utils.js";function p(p){var d=p.data,u=d.pictures,c=d.maxWidth,x=void 0===c?"lg":c,f=d.sx,g=void 0===f?{}:f,h=d.glass,b=void 0!==h&&h,E=n();return e.createElement(i,{maxWidth:x,sx:t({my:1},g)},e.createElement(a,{container:!0,spacing:2},e.createElement(a,{item:!0,xs:12},e.createElement(r,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:s(E.palette.background.paper,b?.1:1),border:b?"1px solid rgba(255, 255, 255, 0.15)":"none"}},e.createElement(m,{direction:{xs:"column",sm:"row"},spacing:2,justifyContent:"space-around"},u.data&&u.data.map(function(r){return e.createElement(o,{key:r.id,sx:{flex:"1 1 0"}},e.createElement(l,{id:r.id.toString(),url:r.url,alternativeText:r.alternativeText,width:r.width,height:r.height,style:t(t({},r.style),{width:"100%",height:"auto"})}))}))))))}export{p as PictureBarSection};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__assign as e,__read as t}from"../../../node_modules/tslib/tslib.es6.js";import r,{useState as i,useEffect as n}from"react";import o from"@mui/material/Box";import a from"@mui/material/Container";import l from"@mui/material/Paper";import m from"@mui/material/Typography";import d from"@mui/material/Grid";import{StrapiImage as c}from"../StrapiImage.js";import{useTheme as u}from"@mui/material/styles";import{setOpacity as s}from"../../lib/utils.js";var g=r.lazy(
|
|
7
|
+
import{__assign as e,__read as t}from"../../../node_modules/tslib/tslib.es6.js";import r,{useState as i,useEffect as n}from"react";import o from"@mui/material/Box";import a from"@mui/material/Container";import l from"@mui/material/Paper";import m from"@mui/material/Typography";import d from"@mui/material/Grid";import{StrapiImage as c}from"../StrapiImage.js";import{useTheme as u}from"@mui/material/styles";import{setOpacity as s}from"../../lib/utils.js";var g=r.lazy(function(){return import("mui-markdown")});function p(e){var a=e.image,l=u();if(void 0===a.url)return null;var m=t(i(0),2),d=m[0],s=m[1],g=function(){var e="image-container".concat(a.url),t=document.getElementById(e),r="image".concat(a.url),i=document.getElementById(r);if(null!==t&&null!==i){var n=t.getBoundingClientRect(),o=i.getBoundingClientRect();if(!(o.height>=n.height)){var l=n.height-o.height;n.y<=160&&-n.y<=n.height-o.height-160?s(160-n.y):n.y>0?s(0):s(l)}}};return n(function(){return window.addEventListener("scroll",g),function(){return window.removeEventListener("scroll",g)}},[]),r.createElement(o,{id:"image-container".concat(a.url),sx:{height:"100%",position:"relative"}},r.createElement(c,{id:"image".concat(a.url),alternativeText:a.alternativeText,height:a.height,width:a.width,url:a.url,style:{width:"100%",height:"auto",display:"block",position:"relative",top:d,borderRadius:4,border:"1px solid ".concat(l.palette.secondary.main)}}))}function h(t){var i=t.data,n=i.title,c=i.text,h=i.image,v=i.reverse,f=void 0!==v&&v,x=i.maxWidth,y=i.sx,E=void 0===y?{}:y,b=i.glass,w=void 0!==b&&b,k=i.anchor,B=void 0===k?"":k,C=u();return r.createElement(a,{maxWidth:x||"lg",sx:e({my:1},E),id:B},n&&r.createElement(m,{variant:"h1",textAlign:"center",sx:{pb:2}},n),r.createElement(d,{container:!0,spacing:2,direction:f?"row-reverse":"row"},r.createElement(d,{item:!0,xs:12,md:void 0!==(null==h?void 0:h.url)?8:12},r.createElement(l,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:s(C.palette.background.paper,w?.1:1),border:w?"1px solid rgba(255, 255, 255, 0.15)":"none"}},null!=c&&r.createElement(o,{sx:{height:"100%",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"flex-start"}},r.createElement(g,null,c)))),void 0!==(null==h?void 0:h.url)&&r.createElement(d,{item:!0,xs:12,md:4},r.createElement(p,{image:h}))))}export{h as TextImageSection};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as t,__assign as n}from"../../../node_modules/tslib/tslib.es6.js";import a from"@mui/material/Divider";import r from"@mui/material/Paper";import i from"@mui/material/Box";import m from"@mui/material/Stack";import o from"@mui/material/Alert";import l from"@mui/material/TextField";import c from"@mui/material/Typography";import s from"@mui/material/Grid";import{SubmitButton as d}from"../SubmitButton.js";import{useFormState as u}from"react-dom";import{StrapiErrors as p}from"../StrapiErrors.js";import{BusinessCredentialsFields as f}from"../e-commerce/customer/BusinessCredentials.js";import E,{useState as v}from"react";import{AddressFields as g}from"../common/Address.js";import{updatePublicInformationAction as b}from"../../data/actions/public-information/updatePublicInformationAction.js";import h,{SocialsFields as x}from"../common/socials/Socials.js";import y from"@mui/material/IconButton";import _ from"@mui/icons-material/Add";var k={zodErrors:null,strapiErrors:null,data:null,message:null};function j(j){var C=j.publicInformation,N=j.sx,A=C.id,S=C.title,I=C.description;C.disclaimer_link,C.privacypolicy_link,C.maxWidth;var R=C.email,B=C.phone_number,T=C.business_credentials,V=C.address,P=C.socials;C.header_logo,C.footer_logo;var D=e(u(b,k),2),w=D[0],z=D[1],F=e(v([]),2),G=F[0],M=F[1],W=function(n,a){G.includes(a)?M(G.filter(
|
|
7
|
+
import{__read as e,__spreadArray as t,__assign as n}from"../../../node_modules/tslib/tslib.es6.js";import a from"@mui/material/Divider";import r from"@mui/material/Paper";import i from"@mui/material/Box";import m from"@mui/material/Stack";import o from"@mui/material/Alert";import l from"@mui/material/TextField";import c from"@mui/material/Typography";import s from"@mui/material/Grid";import{SubmitButton as d}from"../SubmitButton.js";import{useFormState as u}from"react-dom";import{StrapiErrors as p}from"../StrapiErrors.js";import{BusinessCredentialsFields as f}from"../e-commerce/customer/BusinessCredentials.js";import E,{useState as v}from"react";import{AddressFields as g}from"../common/Address.js";import{updatePublicInformationAction as b}from"../../data/actions/public-information/updatePublicInformationAction.js";import h,{SocialsFields as x}from"../common/socials/Socials.js";import y from"@mui/material/IconButton";import _ from"@mui/icons-material/Add";var k={zodErrors:null,strapiErrors:null,data:null,message:null};function j(j){var C=j.publicInformation,N=j.sx,A=C.id,S=C.title,I=C.description;C.disclaimer_link,C.privacypolicy_link,C.maxWidth;var R=C.email,B=C.phone_number,T=C.business_credentials,V=C.address,P=C.socials;C.header_logo,C.footer_logo;var D=e(u(b,k),2),w=D[0],z=D[1],F=e(v([]),2),G=F[0],M=F[1],W=function(n,a){G.includes(a)?M(G.filter(function(e){return e!==a})):M(t(t([],e(G),!1),[a],!1))},q=e(E.useState(P.reduce(function(e,t,n){return e.push({data:t,componentName:"socials[".concat(n,"]"),componentReference:"common.social"}),e},[])),2),H=q[0],J=q[1],K=e(E.useState([]),2),L=K[0],O=K[1];return E.createElement(i,{sx:t([{p:2}],e(Array.isArray(N)?N:[N]),!1),component:r},E.createElement("form",{action:z},A&&E.createElement("input",{id:"id",type:"hidden",name:"id",value:A}),E.createElement(s,{container:!0,spacing:2},E.createElement(s,{item:!0,xs:12},E.createElement(c,{variant:"h5"},"Edit Public Information")),E.createElement(s,{item:!0,xs:12},E.createElement(m,{spacing:2},E.createElement(l,{id:"title",name:"title",label:"Title",defaultValue:S}),E.createElement(l,{id:"description",name:"description",label:"Description",defaultValue:I}),E.createElement(l,{id:"email",name:"email",label:"email",defaultValue:R}),E.createElement(l,{id:"phone_number",name:"phone_number",label:"phone_number",defaultValue:B}))),E.createElement(s,{item:!0,xs:12,lg:6},E.createElement(m,{spacing:2},E.createElement(c,{variant:"h6"},"Company Address"),E.createElement(a,null),E.createElement(g,{componentName:"address",componentReference:"common.address",data:V}))),E.createElement(s,{item:!0,xs:12,lg:6},E.createElement(m,{spacing:2},E.createElement(c,{variant:"h6"},"Business Credentials"),E.createElement(a,null),E.createElement(f,{componentName:"business_credentials",componentReference:"business.credentials",data:T}))),E.createElement(s,{item:!0,xs:12,sx:{mt:1}},E.createElement(c,{variant:"h6"},"Socials")),H.map(function(e,t){var a,r;return(null===(a=e.data)||void 0===a?void 0:a.id)?G.includes(null===(r=e.data)||void 0===r?void 0:r.id)?E.createElement(s,{item:!0,xs:12,md:6,lg:4,key:e.data.id},E.createElement(x,{data:e.data,componentName:"socials[".concat(t,"]"),componentReference:"common.social",deleteCallback:function(){J(H.filter(function(e,n){return n!==t}))}})):E.createElement(s,{item:!0,xs:12,md:6,lg:4,key:e.data.id},E.createElement("input",{type:"hidden",name:"socials[".concat(t,"].id"),value:e.data.id}),E.createElement("input",{type:"hidden",name:"socials[".concat(t,"].__component"),value:"logistics-elements.social"}),E.createElement(h,{data:n(n({},e.data),{onClick:W})})):null}),L.map(function(e,t){var a;return E.createElement(s,{item:!0,xs:12,md:6,lg:4,key:null===(a=e.data)||void 0===a?void 0:a.uuid},E.createElement(x,{data:e.data,componentName:e.componentName,componentReference:"common.social",deleteCallback:function(){O(L.filter(function(e,n){return n!==t}).map(function(e,t){return n(n({},e),{componentName:"socials[".concat(t+H.length,"]")})}))}}))}),E.createElement(s,{item:!0,xs:12,md:6,lg:4,justifyContent:"center",alignItems:"center"},E.createElement(y,{onClick:function(){O(t(t([],e(L),!1),[{componentName:"socials[".concat(H.length+L.length,"]"),componentReference:"logistics-elements.social",data:{uuid:Math.random(),name:"",url:""}}],!1))}},E.createElement(_,null))),E.createElement(s,{item:!0,xs:12},E.createElement(m,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:1}},E.createElement(d,{text:"save changes",loadingText:"loading"}),(null==w?void 0:w.strapiErrors)&&E.createElement(p,{error:null==w?void 0:w.strapiErrors}),(null==w?void 0:w.message)&&E.createElement(o,{severity:"error"},null==w?void 0:w.message))))))}export{j as PublicInformationForm};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as r,__awaiter as e,__generator as n}from"../../../node_modules/tslib/tslib.es6.js";import t,{
|
|
7
|
+
import{__read as r,__awaiter as e,__generator as n}from"../../../node_modules/tslib/tslib.es6.js";import t,{useContext as o,createContext as s,useState as i,useEffect as u}from"react";import{getAuthToken as c}from"../../data/services/get-token.js";import{getUserMeLoader as a}from"../../data/services/get-user-me-loader.js";import{loginUserService as l}from"../../data/services/auth-service.js";import{logoutAction as d}from"../../data/actions/auth-actions.js";import{useSearchParams as v}from"next/navigation";import{useCookieConsent as f}from"../../components/common/cookie-consent/CookieConsentContext.js";var h=s(void 0),m=function(o){var s,m=o.children,g=r(i(null),2),p=g[0],w=g[1],b=r(i(!0),2),j=b[0],y=b[1],k=r(i(null),2),x=k[0],A=k[1],C=v(),E=!0;try{var S=f();E=null===(s=null==S?void 0:S.consentGiven)||void 0===s||s}catch(r){E=!0}var F=function(){return e(void 0,void 0,void 0,function(){var r,e;return n(this,function(n){switch(n.label){case 0:y(!0),n.label=1;case 1:return n.trys.push([1,4,5,6]),[4,c()];case 2:return(r=n.sent())?[4,a(r)]:(y(!1),[2]);case 3:return(e=n.sent())?w(e):A("Failed to fetch user details"),[3,6];case 4:return n.sent(),A("An error occurred while fetching user details"),[3,6];case 5:return y(!1),[7];case 6:return[2]}})})};u(function(){F()},[]),u(function(){var r=setInterval(function(){return e(void 0,void 0,void 0,function(){var r,e;return n(this,function(n){switch(n.label){case 0:return[4,c()];case 1:return(r=n.sent())?[4,a(r)]:(w(null),[2]);case 2:return(e=n.sent())!==p&&w(e),[2]}})})},3e3);return function(){return clearInterval(r)}},[]),u(function(){C&&"success"===C.get("login")&&P()},[C]);var I=function(){return e(void 0,void 0,void 0,function(){return n(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,d()];case 1:return r.sent(),w(null),[3,3];case 2:return r.sent(),A("An error occurred during logout"),[3,3];case 3:return[2]}})})},P=function(){return e(void 0,void 0,void 0,function(){return n(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,F()];case 1:return r.sent(),[3,3];case 2:return r.sent(),A("An error occurred while refreshing session"),[3,3];case 3:return[2]}})})};return u(function(){!1===E&&I()},[E]),t.createElement(h.Provider,{value:{user:p,loading:j,error:x,login:function(r,t){return e(void 0,void 0,void 0,function(){var e;return n(this,function(n){switch(n.label){case 0:y(!0),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,l({identifier:r,password:t})];case 2:return(e=n.sent())&&e.jwt?(document.cookie="jwt=".concat(e.jwt,";path=/;max-age=604800;secure"),w(e.user)):A("Failed to login"),[3,5];case 3:return n.sent(),A("An error occurred during login"),[3,5];case 4:return y(!1),[7];case 5:return[2]}})})},logout:I,refreshSession:P,clearError:function(){A(null)}}},m)},g=function(){var r=o(h);if(!r)throw new Error("useSession must be used within a SessionProvider");return r};export{m as SessionProvider,g as useSession};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__assign as a,__spreadArray as n}from"../../../node_modules/tslib/tslib.es6.js";import s,{
|
|
7
|
+
import{__read as e,__assign as a,__spreadArray as n}from"../../../node_modules/tslib/tslib.es6.js";import s,{useContext as t,createContext as o,useReducer as r}from"react";import d from"../../../node_modules/uuid/dist/esm-browser/v4.js";var i={messages:[]},c=o({state:i,dispatch:function(){},handleAddMessage:function(){},handleAddMessages:function(){},handleClose:function(){}}),u=function(s,t){switch(t.type){case"SET_STATE":return a({},t.payload);case"ADD_MESSAGE":return a(a({},s),{messages:n(n([],e(s.messages),!1),[t.payload],!1)});case"UPDATE_MESSAGES":return a(a({},s),{messages:t.payload});default:throw new Error("No case for type ".concat(t.type))}},l=function(t){var o=t.children,l=e(r(u,i),2),p=l[0],f=l[1],E=s.useCallback(function(e){var n=a(a({},e),{open:!0,id:d()});f({type:"ADD_MESSAGE",payload:n})},[f]),m=s.useCallback(function(e){e.map(function(e){return a(a({},e),{open:!0,id:d()})}).forEach(function(e){f({type:"ADD_MESSAGE",payload:e})})},[f]),A={state:p,dispatch:f,handleAddMessage:E,handleAddMessages:m,handleClose:function(a,s,t){if("clickaway"!==s){var o=n([],e(p.messages),!1),r=o.findIndex(function(e){return e.id===t});-1!==r&&(o[r].open=!1,f({type:"UPDATE_MESSAGES",payload:o}))}}};return s.createElement(c.Provider,{value:A},o)},p=function(){return t(c)};export{l as SnackbarProvider,p as useSnackbar};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as t,__assign as n,__spreadArray as e}from"../../../../node_modules/tslib/tslib.es6.js";import i,{useReducer as a,useEffect as o,
|
|
7
|
+
import{__read as t,__assign as n,__spreadArray as e}from"../../../../node_modules/tslib/tslib.es6.js";import i,{useReducer as a,useEffect as o,createContext as r,useContext as u}from"react";import{useCookieConsent as c}from"../../../components/common/cookie-consent/CookieConsentContext.js";import{getCookie as s}from"../../../lib/getCookie.js";import{setCookie as m}from"../../../lib/setCookie.js";var l={items:[],totalExVAT:0,totalVAT:0,totalInclVAT:0,totalAmount:0},f=r({state:l,dispatch:function(){}}),p=function(i,a){switch(a.type){case"ADD_ITEM":var o=i.items.findIndex(function(t){return t.id===a.payload.id});if(o>-1){var r=i.items.map(function(t,e){return e===o?n(n({},t),{quantity:t.quantity+a.payload.quantity}):t});return n(n({},i),{items:r})}return n(n({},i),{items:e(e([],t(i.items),!1),[a.payload],!1)});case"REMOVE_ITEM":var u=i.items.findIndex(function(t){return t.id===a.payload.id});if(u>-1){r=i.items.map(function(t,e){return e===u?n(n({},t),{quantity:t.quantity-1}):t}).filter(function(t){return t.quantity>0});return n(n({},i),{items:r})}return i;case"SET_ITEMS":return n(n({},i),{items:a.payload});case"UPDATE_TOTALS":return n(n({},i),a.payload);default:return i}},d=function(n){var e=n.children,r=t(a(p,l),2),u=r[0],d=r[1],y=c().consentGiven;return o(function(){if(y){var t=s("cart");t&&d({type:"SET_ITEMS",payload:JSON.parse(t)})}},[y]),o(function(){y&&m("cart",JSON.stringify(u.items),365)},[u.items,y]),o(function(){var t,n,e,i;t=0,n=0,e=0,i=0,u.items.forEach(function(a){t+=a.price_excl_vat*a.quantity,n+=a.price_excl_vat*(a.vat_rate/100)*a.quantity,e+=a.price_incl_vat*a.quantity,i+=a.quantity}),d({type:"UPDATE_TOTALS",payload:{totalExVAT:t,totalVAT:n,totalInclVAT:e,totalAmount:i}})},[u.items]),i.createElement(f.Provider,{value:{state:u,dispatch:d}},e)},y=function(){return u(f)};export{d as CartProvider,y as useCart};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__assign as r}from"../../../../node_modules/tslib/tslib.es6.js";import s,{
|
|
7
|
+
import{__read as e,__assign as r}from"../../../../node_modules/tslib/tslib.es6.js";import s,{useContext as l,createContext as o,useReducer as i,useEffect as t}from"react";import{isCustomerProfileCompleteV2 as n}from"../../../lib/isCustomerProfileCompleteV2.js";import{isAddressComplete as d}from"../../../lib/isAddressComplete.js";import{areBusinessCredentailsComplete as a}from"../../../lib/areBusinessCredentialsComplete.js";import{useClientSideCart as u}from"../../../components/e-commerce/cart/hooks.js";import{useSession as m}from"../../auth/SessionContext.js";import c from"../../../lib/isVATValid.js";import p from"../../../lib/isEORIValid.js";var f={confirmations:{itemsInCart:!1,customerProfileComplete:!1,companyAddressComplete:!1,deliveryAddressComplete:!1,billingAddressComplete:!1,businessCredentailsComplete:!1,hasVAT:!1,hasEORI:!1,hasValidatedVAT:!1,hasValidatedEORI:!1},delivery_options:[{id:1,label:"ptt"}],payment_options:[{id:1,label:"ideal"}],prefersBillingAddress:!0,prefersDeliveryAddress:!0,customer_reference:""},v=o({state:f,runAllChecks:function(){},togglePrefersBillingAddress:function(){},togglePrefersDeliveryAddress:function(){},setCustomerInternalReference:function(){}}),_=function(e,s){switch(s.type){case"UPDATE_CONFIRMATIONS":return r(r({},e),{confirmations:r(r({},e.confirmations),s.payload)});case"SET_PREFERS_BILLING_ADDRESS":return r(r({},e),{prefersBillingAddress:s.payload.prefersBillingAddress});case"SET_PREFERS_DELIVERY_ADDRESS":return r(r({},e),{prefersDeliveryAddress:s.payload.prefersDeliveryAddress});case"SET_customer_reference":return r(r({},e),{customer_reference:s.payload.customer_reference});default:return e}},A=function(r){var l=r.children,o=e(i(_,f),2),A=o[0],E=o[1],y=m(),C=y.user;y.loading,y.error;var R=u(),b=function(){var e,r,s,l,o,i,t,u,m,f,v=R.state.items.length>0,_=!!(null==C?void 0:C.customer_profile)&&Object.values(n(null==C?void 0:C.customer_profile)).every(function(e){return!0===e}),A=d(null===(e=null==C?void 0:C.customer_profile)||void 0===e?void 0:e.company_address),y=d(null===(r=null==C?void 0:C.customer_profile)||void 0===r?void 0:r.delivery_address),b=d(null===(s=null==C?void 0:C.customer_profile)||void 0===s?void 0:s.billing_address),S=a(null===(l=null==C?void 0:C.customer_profile)||void 0===l?void 0:l.business_credentials),g=Boolean(null===(i=null===(o=null==C?void 0:C.customer_profile)||void 0===o?void 0:o.business_credentials)||void 0===i?void 0:i.VAT_number),I=Boolean(null===(u=null===(t=null==C?void 0:C.customer_profile)||void 0===t?void 0:t.business_credentials)||void 0===u?void 0:u.EORI_number),D=c(null===(m=null==C?void 0:C.customer_profile)||void 0===m?void 0:m.business_credentials),T=p(null===(f=null==C?void 0:C.customer_profile)||void 0===f?void 0:f.business_credentials);E({type:"UPDATE_CONFIRMATIONS",payload:{itemsInCart:v,customerProfileComplete:_,companyAddressComplete:A,deliveryAddressComplete:y,billingAddressComplete:b,businessCredentailsComplete:S,hasVAT:g,hasEORI:I,hasValidatedVAT:D,hasValidatedEORI:T}})};t(function(){C&&b()},[C]);var S={state:A,runAllChecks:b,togglePrefersBillingAddress:function(){E({type:"SET_PREFERS_BILLING_ADDRESS",payload:{prefersBillingAddress:!A.prefersBillingAddress}})},togglePrefersDeliveryAddress:function(){E({type:"SET_PREFERS_DELIVERY_ADDRESS",payload:{prefersDeliveryAddress:!A.prefersDeliveryAddress}})},setCustomerInternalReference:function(e){E({type:"SET_customer_reference",payload:{customer_reference:e}})}};return s.createElement(v.Provider,{value:S},l)},E=function(){return l(v)};export{A as CheckoutProvider,E as useCheckout};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as e,__generator as r,__assign as s}from"../../../node_modules/tslib/tslib.es6.js";import{z as a}from"zod";import{cookies as t}from"next/headers";import{redirect as o}from"next/navigation";import{registerUserService as n,loginUserService as i,forgotPasswordService as l,resetPasswordService as d}from"../services/auth-service.js";var m,c={maxAge:604800,path:"/",domain:null!==(m=process.env.HOST)&&void 0!==m?m:"localhost",httpOnly:!0,secure:"production"===process.env.NODE_ENV},u=a.object({username:a.string().min(3).max(20,{message:"Username must be between 3 and 20 characters"}),password:a.string().min(6).max(100,{message:"Password must be between 6 and 100 characters"}),email:a.string().email({message:"Please enter a valid email address"}),redirect:a.string().optional()});function g(a,i){return e(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as e,__generator as r,__assign as s}from"../../../node_modules/tslib/tslib.es6.js";import{z as a}from"zod";import{cookies as t}from"next/headers";import{redirect as o}from"next/navigation";import{registerUserService as n,loginUserService as i,forgotPasswordService as l,resetPasswordService as d}from"../services/auth-service.js";var m,c={maxAge:604800,path:"/",domain:null!==(m=process.env.HOST)&&void 0!==m?m:"localhost",httpOnly:!0,secure:"production"===process.env.NODE_ENV},u=a.object({username:a.string().min(3).max(20,{message:"Username must be between 3 and 20 characters"}),password:a.string().min(6).max(100,{message:"Password must be between 6 and 100 characters"}),email:a.string().email({message:"Please enter a valid email address"}),redirect:a.string().optional()});function g(a,i){return e(this,void 0,void 0,function(){var e,l,d,m,g,v,p;return r(this,function(r){switch(r.label){case 0:return(e=u.safeParse({username:i.get("username"),password:i.get("password"),email:i.get("email")})).success?[4,n(e.data)]:[2,s(s({},a),{zodErrors:e.error.flatten().fieldErrors,strapiErrors:null,message:"Missing Fields. Failed to Register."})];case 1:return!(l=r.sent())||l.error?[2,s(s({},a),{strapiErrors:(null===(v=null==l?void 0:l.error)||void 0===v?void 0:v.message)||null,zodErrors:null,message:(null==l?void 0:l.error)?"Failed to Register.":"Ops! Something went wrong. Please try again."})]:(t().set("jwt",l.jwt,c),i.get("redirect")?(d=i.get("redirect"),console.log("redirectValue",d),(m=new URLSearchParams).append("message","Please complete your profile. We've send you an email with a confirmation link."),m.append("severity","info"),g="".concat(null!==(p=null==d?void 0:d.toString())&&void 0!==p?p:"/dashboard","?").concat(m.toString()),o(g),[2]):[2,o("/dashboard")])}})})}var v=a.object({identifier:a.string().min(3,{message:"Identifier must have at least 3 or more characters"}).max(80,{message:"Please enter a valid username or email address"}),password:a.string().min(6,{message:"Password must have at least 6 or more characters"}).max(100,{message:"Password must be between 6 and 100 characters"}),redirect:a.string().optional()});function p(a,n){return e(this,void 0,void 0,function(){var e,l,d,m,u,g,p;return r(this,function(r){switch(r.label){case 0:return(e=v.safeParse({identifier:n.get("identifier"),password:n.get("password")})).success?[4,i(e.data)]:[2,s(s({},a),{zodErrors:e.error.flatten().fieldErrors,message:"Missing Fields. Failed to Login."})];case 1:return!(l=r.sent())||l.error?(console.log("Login Error:",l),[2,s(s({},a),{strapiErrors:(null===(u=null==l?void 0:l.error)||void 0===u?void 0:u.message)||null,zodErrors:null,message:(null==l?void 0:l.error)?"Failed to Login.":"Ops! Something went wrong. Please try again."})]):(t().set("jwt",l.jwt,c),d=null!==(p=null===(g=n.get("redirect"))||void 0===g?void 0:g.toString())&&void 0!==p?p:null,m="".concat(d||"/dashboard","?login=success"),o(m),[2])}})})}var w=a.object({email:a.string().email({message:"Please enter a valid email address"})});function f(a,t){return e(this,void 0,void 0,function(){var e,o;return r(this,function(r){switch(r.label){case 0:return(e=w.safeParse({email:t.get("email")})).success?[4,l(e.data)]:[2,s(s({},a),{zodErrors:e.error.flatten().fieldErrors,message:"Invalid email address."})];case 1:return o=r.sent(),console.log("Forgot Password Response:",o),o?o.error?[2,s(s({},a),{strapiErrors:o.error,zodErrors:null,message:"Failed to send reset email."})]:[2,s(s({},a),{message:"Password reset email sent successfully."})]:[2,s(s({},a),{strapiErrors:null,zodErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}var h=a.object({password:a.string().min(6).max(100,{message:"Password must be between 6 and 100 characters"}),passwordConfirmation:a.string().min(6).max(100,{message:"Password confirmation must be between 6 and 100 characters"}),code:a.string()});function E(a,t){return e(this,void 0,void 0,function(){var e,o;return r(this,function(r){switch(r.label){case 0:return e=h.safeParse({password:t.get("password"),passwordConfirmation:t.get("passwordConfirmation"),code:t.get("code")}),console.log("validatedFields",e),e.success?[4,d(e.data)]:[2,s(s({},a),{zodErrors:e.error.flatten().fieldErrors,message:"Invalid input."})];case 1:return o=r.sent(),console.log("Reset Password Response:",o),o?o.error?[2,s(s({},a),{strapiErrors:o.error,zodErrors:null,message:"Failed to reset password."})]:[2,s(s({},a),{message:"Password reset successfully."})]:[2,s(s({},a),{strapiErrors:null,zodErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}function b(){return e(this,void 0,void 0,function(){return r(this,function(e){return t().set("jwt","",s(s({},c),{maxAge:0})),o("/"),[2]})})}export{f as forgotPasswordAction,p as loginUserAction,b as logoutAction,g as registerUserAction,E as resetPasswordAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,n){return r(this,void 0,void 0,function(){var r,u,c;return e(this,function(e){switch(e.label){case 0:return Object.fromEntries(n),(r=o(n)).data.products&&(r.data.products=JSON.parse(r.data.products)),[4,s("POST","/api/product-categories",r)];case 1:return(u=e.sent())?u.error?[2,t(t({},i),{severity:"error",strapiErrors:u.error,message:"Failed to Create Category."})]:(c=a(u),[2,t(t({},i),{severity:"success",message:"Category Created Successfully",data:c,strapiErrors:null})]):[2,t(t({},i),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{i as createCategoryAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as t,__assign as e}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as t,__assign as e}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,n){return r(this,void 0,void 0,function(){var r,c,u,d;return t(this,function(t){switch(t.label){case 0:return r=Object.fromEntries(n),(c=o(n)).data.products&&(c.data.products=JSON.parse(c.data.products)),[4,s("PUT","/api/product-categories/".concat(r.id),c)];case 1:return(u=t.sent())?u.error?[2,e(e({},i),{severity:"error",strapiErrors:u.error,message:"Failed to Update Category."})]:(d=a(u),[2,e(e({},i),{severity:"success",message:"Category Updated Successfully",data:d,strapiErrors:null})]):[2,e(e({},i),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{i as updateCategoryAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as e,__generator as r,__assign as s}from"../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../services/mutate-data.js";import{parseFormData as o}from"../../../lib/parseFormData.js";import{createMolliePayment as a}from"../../../lib/molliePaymentProvider.js";import{redirect as n}from"next/navigation";function i(i,p){return e(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as e,__generator as r,__assign as s}from"../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../services/mutate-data.js";import{parseFormData as o}from"../../../lib/parseFormData.js";import{createMolliePayment as a}from"../../../lib/molliePaymentProvider.js";import{redirect as n}from"next/navigation";function i(i,p){return e(this,void 0,void 0,function(){var e,c,l,m,u,d;return r(this,function(r){switch(r.label){case 0:return e=o(p),console.log("parsedFormData",e),[4,t("POST","/api/opos/",e)];case 1:return c=r.sent(),console.log("responseData",c),c?c.error?[2,s(s({},i),{strapiErrors:c.error,message:"Failed to create order."})]:"production"!==process.env.NODE_ENV?[3,3]:[4,a(c)]:[2,s(s({},i),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})];case 2:return m=r.sent(),[3,4];case 3:m=null,r.label=4;case 4:return"string"==typeof(l=m)?[2,s(s({},i),{strapiErrors:null,message:l})]:"production"===process.env.NODE_ENV&&l?[4,t("POST","api/payments/",{data:{opo:c.id,payment_status:l.status,provider_id:l.id,provider_response:l}})]:[3,6];case 5:return d=r.sent(),[3,8];case 6:return[4,t("POST","api/payments/",{data:{opo:c.id,payment_status:"open"}})];case 7:d=r.sent(),r.label=8;case 8:return(u=d).error?[2,s(s({},i),{strapiErrors:u.error,message:"Failed to create payment."})]:("production"===process.env.NODE_ENV&&l?n("".concat(l.getCheckoutUrl())):n("/shop/check-out"),[2])}})})}export{i as checkoutAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function a(a,n,l){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function a(a,n,l){return r(this,void 0,void 0,function(){var r,u,m;return e(this,function(e){switch(e.label){case 0:return r=o(l),[4,t("PUT","/api/enduser-profiles/".concat(a),r)];case 1:return(u=e.sent())?u.error?[2,s(s({},n),{severity:"error",strapiErrors:u.error,message:"Failed to update profile."})]:(m=i(u),[2,s(s({},n),{severity:"success",message:"Profile Updated Successfully",data:m,strapiErrors:null})]):[2,s(s({},n),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{a as updateEnduserProfileAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function o(o,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function o(o,n){return r(this,void 0,void 0,function(){var r,m,l,d;return e(this,function(e){switch(e.label){case 0:return r=Object.fromEntries(n),console.log(r),m=a(n),console.log(m),m.data.admin_items&&(m.data.admin_items=JSON.parse(m.data.admin_items)),[4,s("POST","/api/invoices/createAdmin",m)];case 1:return(l=e.sent())?l.error?[2,t(t({},o),{strapiErrors:l.error,message:"Failed to Create Invoice."})]:(d=i(l),[2,t(t({},o),{message:"Invoice Created",data:d,strapiErrors:null})]):[2,t(t({},o),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{o as createInvoiceAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function i(i,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function i(i,n){return r(this,void 0,void 0,function(){var r,l,m;return e(this,function(e){switch(e.label){case 0:return Object.fromEntries(n),(r=a(n)).data.iro_items&&(r.data.iro_items=JSON.parse(r.data.iro_items)),console.log(r),0===r.data.iro_items.length?[2,s(s({},i),{strapiErrors:null,message:"Please add at least one item to the Iro."})]:[4,t("POST","/api/iros/createAdmin",r)];case 1:return(l=e.sent())?l.error?[2,s(s({},i),{strapiErrors:l.error,severity:"error",message:"Failed to Create Iro."})]:(m=o(l),[2,s(s({},i),{message:"Iro Created Successfully",severity:"success",data:m,strapiErrors:null})]):[2,s(s({},i),{strapiErrors:null,severity:"error",message:"Ops! Something went wrong. Please try again."})]}})})}export{i as createIroAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as s,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as e}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,m){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as s,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as e}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,m){return r(this,void 0,void 0,function(){var r,n,l;return s(this,function(s){switch(s.label){case 0:return Object.fromEntries(m),(r=o(m)).data.iro_items&&(r.data.iro_items=JSON.parse(r.data.iro_items)),r.data.opos&&(r.data.opos=JSON.parse(r.data.opos)),[4,e("POST","/api/iros",r)];case 1:return(n=s.sent())?n.error?[2,t(t({},i),{strapiErrors:n.error,message:"Failed to Create Iro."})]:(l=a(n),[2,t(t({},i),{message:"Iro Created Successfully",data:l,strapiErrors:null})]):[2,t(t({},i),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{i as requestRmaAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as i}from"../../../../lib/parseFormData.js";function a(a,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as i}from"../../../../lib/parseFormData.js";function a(a,n){return r(this,void 0,void 0,function(){var r,m,l,p;return e(this,function(e){switch(e.label){case 0:return r=Object.fromEntries(n),m=i(n),console.log("parsedFormData",m),[4,t("PUT","/api/iros/".concat(r.id),m)];case 1:return(l=e.sent())?l.error?[2,s(s({},a),{strapiErrors:l.error,message:"Failed to Update Iro.",severity:"error"})]:(p=o(l),[2,s(s({},a),{message:"Iro Updated",severity:"success",data:p,strapiErrors:null})]):[2,s(s({},a),{strapiErrors:null,message:"Ops! Something went wrong. Please try again.",severity:"error"})]}})})}export{a as updateIroAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as i}from"../../../../lib/parseFormData.js";function a(a,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as i}from"../../../../lib/parseFormData.js";function a(a,n){return r(this,void 0,void 0,function(){var r,m,l;return e(this,function(e){switch(e.label){case 0:return Object.fromEntries(n),r=i(n),[4,t("POST","/api/opos/createAdmin",r)];case 1:return(m=e.sent())?m.error?[2,s(s({},a),{severity:"error",strapiErrors:m.error,message:"Failed to Create Opo."})]:(l=o(m),[2,s(s({},a),{severity:"success",message:"Opo Created Successfully",data:l,strapiErrors:null})]):[2,s(s({},a),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{a as createOpoAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function i(i,n,l){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function i(i,n,l){return r(this,void 0,void 0,function(){var r,m,p;return e(this,function(e){switch(e.label){case 0:return Object.fromEntries(l),r=a(l),console.log("parsedFormData",r),[4,t("PUT","/api/opos/".concat(i),r)];case 1:return(m=e.sent())?m.error?[2,s(s({},n),{severity:"error",strapiErrors:m.error,message:"Failed to Update Opo."})]:(p=o(m),[2,s(s({},n),{severity:"success",message:"Opo Updated Successfully",data:p,strapiErrors:null})]):[2,s(s({},n),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{i as updateOpoAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,l){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,l){return r(this,void 0,void 0,function(){var r,n,c;return e(this,function(e){switch(e.label){case 0:return Object.fromEntries(l),(r=o(l)).data.categories&&(r.data.categories=JSON.parse(r.data.categories)),r.data.gallery&&(r.data.gallery=JSON.parse(r.data.gallery)),[4,s("POST","/api/products",r)];case 1:return(n=e.sent())?n.error?[2,t(t({},i),{severity:"error",strapiErrors:n.error,message:"Failed to Create Product."})]:(c=a(n),[2,t(t({},i),{severity:"success",message:"Product Created Successfully",data:c,strapiErrors:null})]):[2,t(t({},i),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{i as createProductAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as t,__assign as e}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,c){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as t,__assign as e}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function i(i,c){return r(this,void 0,void 0,function(){var r,d,l,n;return t(this,function(t){switch(t.label){case 0:return r=Object.fromEntries(c),(d=o(c)).data.categories&&(d.data.categories=JSON.parse(d.data.categories)),d.data.gallery&&(d.data.gallery=JSON.parse(d.data.gallery)),d.data.stock_reports&&(d.data.stock_reports=JSON.parse(d.data.stock_reports)),[4,s("PUT","/api/products/".concat(r.id),d)];case 1:return(l=t.sent())?l.error?[2,e(e({},i),{severity:"error",strapiErrors:l.error,message:"Failed to Update Product."})]:(n=a(l),[2,e(e({},i),{severity:"success",message:"Product Updated Successfully",data:n,strapiErrors:null})]):[2,e(e({},i),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{i as updateProductAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function a(a,l,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";function a(a,l,n){return r(this,void 0,void 0,function(){var r,p,u;return e(this,function(e){switch(e.label){case 0:return r=o(n),[4,t("PUT","/api/dispatcher-profiles/".concat(a),r)];case 1:return(p=e.sent())?p.error?[2,s(s({},l),{severity:"error",strapiErrors:p.error,message:"Failed to update profile."})]:(u=i(p),[2,s(s({},l),{severity:"success",message:"Profile Updated Successfully",data:u,strapiErrors:null})]):[2,s(s({},l),{severity:"error",strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{a as updateDispatcherProfileAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as e,__generator as r,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";import i from"../../../../../node_modules/dayjs/dayjs.min.js";function d(d,l){return e(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as e,__generator as r,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";import{parseFormData as o}from"../../../../lib/parseFormData.js";import i from"../../../../../node_modules/dayjs/dayjs.min.js";function d(d,l){return e(this,void 0,void 0,function(){var e,m,n,u;return r(this,function(r){switch(r.label){case 0:return(e=o(l)).data.order_date?(m={data:{vendor_profile:e.data.vendors,customer_reference:e.data.customer_reference,order_date:i(e.data.order_date).format("YYYY-MM-DD"),items:e.data.ipo_items}},0===JSON.parse(e.data.ipo_items).length?[2,s(s({},d),{severity:"error",strapiErrors:null,message:"Please add items to the IPO."})]:[4,t("POST","/api/ipos",m)]):[2,s(s({},d),{severity:"error",strapiErrors:null,message:"Please select an Order Date."})];case 1:return(n=r.sent())?n.error?[2,s(s({},d),{severity:"error",strapiErrors:n.error,message:"Failed to create IPO."})]:(u=a(n),[2,s(s({},d),{severity:"success",message:"IPO Created Successfully",data:u,strapiErrors:null})]):[2,s(s({},d),{severity:"error",strapiErrors:null,message:"Failed to create IPO. Please try again."})]}})})}export{d as createIPOAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function o(o,l,u){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as i}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function o(o,l,u){return r(this,void 0,void 0,function(){var r,n,m;return e(this,function(e){switch(e.label){case 0:return r=a(u),[4,t("PUT","/api/ipos/".concat(o),r)];case 1:return(n=e.sent())?n.error?[2,s(s({},l),{severity:"error",strapiErrors:n.error,message:"Failed to update IPO."})]:(m=i(n),[2,s(s({},l),{severity:"success",message:"IPO Updated Successfully",data:m,strapiErrors:null})]):[2,s(s({},l),{severity:"error",strapiErrors:null,message:"Failed to update IPO. Please try again."})]}})})}export{o as updateIpoAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{z as s}from"zod";import{mutateData as o}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";var n=s.object({content:s.string().min(10,"Description must be at least 10 characters long").max(5e3,"Description cannot be more than 5000 characters long")});function i(s,i,l){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{z as s}from"zod";import{mutateData as o}from"../../../services/mutate-data.js";import{flattenAttributes as a}from"../../../../lib/utils.js";var n=s.object({content:s.string().min(10,"Description must be at least 10 characters long").max(5e3,"Description cannot be more than 5000 characters long")});function i(s,i,l){return r(this,void 0,void 0,function(){var r,u,c,m,d;return e(this,function(e){switch(e.label){case 0:return null==s?[2,t(t({},i),{zodErrors:null,strapiErrors:null,message:"Failed to Create Note. Related entity is missing.",severity:"error"})]:(r=n.safeParse({content:l.get("content")})).success?(u=r.data,c={data:t(t({},u),{related:s})},[4,o("POST","/api/notes",c)]):[2,t(t({},i),{zodErrors:r.error.flatten().fieldErrors,strapiErrors:null,message:null,severity:null})];case 1:return(m=e.sent())?m.error?[2,t(t({},i),{zodErrors:null,strapiErrors:m.error,message:"Failed to Create Note.",severity:"error"})]:(d=a(m),[2,t(t({},i),{zodErrors:null,message:"New Note Created",severity:"success",data:d,strapiErrors:null})]):[2,t(t({},i),{zodErrors:null,strapiErrors:null,message:"Ops! Something went wrong. Please try again.",severity:"error"})]}})})}export{i as createNoteAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function i(i,n,l,p){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as s}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function i(i,n,l,p){return r(this,void 0,void 0,function(){var r,m,u,c;return e(this,function(e){switch(e.label){case 0:return r=a(p),m={data:t(t({},r.data),{related:i,type:n})},console.log("reportData",m),[4,s("POST","/api/reports",m)];case 1:return u=e.sent(),console.log("responseData",u),u?u.error?[2,t(t({},l),{strapiErrors:u.error,message:"Failed to Create Report."})]:(c=o(u),[2,t(t({},l),{message:"New Report Created",severity:"success",data:c,strapiErrors:null})]):[2,t(t({},l),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{i as createReportAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function n(n,i){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function n(n,i){return r(this,void 0,void 0,function(){var r,l,u,d;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),(r=a(i)).data.products&&(r.data.products=JSON.parse(r.data.products)),[4,t("POST","/api/vendor-profiles",r)];case 1:return(l=e.sent())?l.error?[2,s(s({},n),{strapiErrors:l.error,zodErrors:null,message:"Failed to create vendor. Please check the form and try again.",severity:"error"})]:(u=o(l),[2,s(s({},n),{data:u,strapiErrors:null,zodErrors:null,message:"Vendor created successfully!",severity:"success"})]):[2,s(s({},n),{strapiErrors:null,zodErrors:null,message:"Something went wrong while creating the vendor. Please try again.",severity:"error"})];case 2:return d=e.sent(),console.error("Error creating vendor:",d),[2,s(s({},n),{data:null,strapiErrors:null,zodErrors:null,message:"An unexpected error occurred. Please try again later.",severity:"error"})];case 3:return[2]}})})}export{n as createVendorAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function n(n,i){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../../../services/mutate-data.js";import{flattenAttributes as o}from"../../../../lib/utils.js";import{parseFormData as a}from"../../../../lib/parseFormData.js";function n(n,i){return r(this,void 0,void 0,function(){var r,l,u,d,c;return e(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),r=Object.fromEntries(i),(l=a(i)).data.products&&(l.data.products=JSON.parse(l.data.products)),[4,t("PUT","/api/vendor-profiles/".concat(r.id),l)];case 1:return(u=e.sent())?u.error?[2,s(s({},n),{data:null,strapiErrors:u.error,zodErrors:null,message:"Failed to update vendor. Please check the form and try again.",severity:"error"})]:(d=o(u),[2,s(s({},n),{data:d,strapiErrors:null,zodErrors:null,message:"Vendor updated successfully!",severity:"success"})]):[2,s(s({},n),{data:null,strapiErrors:null,zodErrors:null,message:"Something went wrong while updating the vendor. Please try again.",severity:"error"})];case 2:return c=e.sent(),console.error("Error updating vendor:",c),[2,s(s({},n),{data:null,strapiErrors:null,zodErrors:null,message:"An unexpected error occurred. Please try again later.",severity:"error"})];case 3:return[2]}})})}export{n as updateVendorAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../../node_modules/tslib/tslib.es6.js";import{flattenAttributes as t}from"../../../lib/utils.js";import{parseFormData as i}from"../../../lib/parseFormData.js";import{fileUpdateService as o}from"../../services/file-service.js";function a(a,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../../node_modules/tslib/tslib.es6.js";import{flattenAttributes as t}from"../../../lib/utils.js";import{parseFormData as i}from"../../../lib/parseFormData.js";import{fileUpdateService as o}from"../../services/file-service.js";function a(a,n){return r(this,void 0,void 0,function(){var r,l,m,d,p;return e(this,function(e){switch(e.label){case 0:return r=Object.fromEntries(n),l=i(n),m=r.id,[4,o(l.data,m.toString())];case 1:return(d=e.sent())?d.error?[2,s(s({},a),{strapiErrors:d.error,message:"Failed to Register."})]:(p=t(d),[2,s(s({},a),{message:"Media Updated",data:p,strapiErrors:null})]):[2,s(s({},a),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{a as updateMediaAction};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__awaiter as r,__generator as e,__assign as t}from"../../../../node_modules/tslib/tslib.es6.js";import{z as n}from"zod";import{mutateData as s}from"../../services/mutate-data.js";import{flattenAttributes as o}from"../../../lib/utils.js";import{parseFormData as i}from"../../../lib/parseFormData.js";var a=n.object({files:n.any()});function l(n,l,u,m,d){return r(this,void 0,void 0,
|
|
6
|
+
import{__awaiter as r,__generator as e,__assign as t}from"../../../../node_modules/tslib/tslib.es6.js";import{z as n}from"zod";import{mutateData as s}from"../../services/mutate-data.js";import{flattenAttributes as o}from"../../../lib/utils.js";import{parseFormData as i}from"../../../lib/parseFormData.js";var a=n.object({files:n.any()});function l(n,l,u,m,d){return r(this,void 0,void 0,function(){var f,c,p,v,g,E,b,F,h,j=this;return e(this,function(w){switch(w.label){case 0:return f=Object.fromEntries(d),i(d),(c=a.safeParse({files:f.files})).success?(p="".concat(n,"/").concat(l),(v=d.getAll("files")).map(function(r){return r instanceof File?r.name:null}).filter(function(r){return null!==r}),[4,Promise.all(v.map(function(t){return r(j,void 0,void 0,function(){var r,n,s;return e(this,function(e){return t instanceof File?(r=t.name.split(".").pop(),n=t.type,(s=new FileReader).readAsDataURL(t),[2,new Promise(function(e){s.onloadend=function(){var o,i=(null===(o=s.result)||void 0===o?void 0:o.toString().split(",")[1])||"";e({name:t.name,ext:r,mime:n,base64_string:i})}})]):[2,null]})})}))]):[2,t(t({},m),{zodErrors:c.error.flatten().fieldErrors,strapiErrors:null,data:null,message:"Invalid Image"})];case 1:return g=w.sent(),E={data:(h={id:l},h[u]=g[0],h)},[4,s("PUT",p,E)];case 2:return(b=w.sent())?b.error?[2,t(t({},m),{strapiErrors:b.error,zodErrors:null,message:"Failed to Upload File."})]:(F=o(b),[2,t(t({},m),{data:F,zodErrors:null,strapiErrors:null,message:"File Uploaded"})]):[2,t(t({},m),{strapiErrors:null,zodErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{l as uploadBase64MediaAction};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__awaiter as e,__generator as r,__assign as s}from"../../../../node_modules/tslib/tslib.es6.js";import{z as i}from"zod";import{fileUploadService as o}from"../../services/file-service.js";import{flattenAttributes as a}from"../../../lib/utils.js";import{parseFormData as n}from"../../../lib/parseFormData.js";var t=["image/jpeg","image/jpg","image/png","image/webp"],l=i.object({image:i.any().refine(
|
|
6
|
+
import{__awaiter as e,__generator as r,__assign as s}from"../../../../node_modules/tslib/tslib.es6.js";import{z as i}from"zod";import{fileUploadService as o}from"../../services/file-service.js";import{flattenAttributes as a}from"../../../lib/utils.js";import{parseFormData as n}from"../../../lib/parseFormData.js";var t=["image/jpeg","image/jpg","image/png","image/webp"],l=i.object({image:i.any().refine(function(e){return 0!==e.size&&void 0!==e.name},"Please update or add new image.").refine(function(e){return t.includes(null==e?void 0:e.type)},".jpg, .jpeg, .png and .webp files are accepted.").refine(function(e){return e.size<=5e6},"Max file size is 5MB.")});function m(i,t){return e(this,void 0,void 0,function(){var e,m,u,d,p;return r(this,function(r){switch(r.label){case 0:return e=Object.fromEntries(t),console.log(e.files),m=n(t),console.log(m),(u=l.safeParse({image:e.files})).success?[4,o(t)]:[2,s(s({},i),{zodErrors:u.error.flatten().fieldErrors,strapiErrors:null,data:null,message:"Invalid Image"})];case 1:return(d=r.sent())?d.error?[2,s(s({},i),{strapiErrors:d.error,zodErrors:null,message:"Failed to Upload File."})]:(p=a(d),[2,s(s({},i),{data:p,zodErrors:null,strapiErrors:null,message:"Image Uploaded"})]):[2,s(s({},i),{strapiErrors:null,zodErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{m as uploadMediaAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as e,__generator as t,__assign as s}from"../../../node_modules/tslib/tslib.es6.js";import{z as a}from"zod";import{formDataToBlocks as r}from"../../lib/utils.js";import{mutateData as i}from"../services/mutate-data.js";var n=a.object({id:a.string(),title:a.string().min(3).max(100,{message:"Title must be between 3 and 100 characters"}),description:a.string().min(3).max(200,{message:"Description must be between 3 and 200 characters"}),blocks:a.array(a.object({id:a.string(),__component:a.string(),heading:a.string().min(3).max(100,{message:"Heading must be between 3 and 100 characters"}).optional(),subHeading:a.string().min(3).max(200,{message:"Subheading must be between 3 and 200 characters"}).optional(),title:a.string().min(3).max(100,{message:"Title must be between 3 and 100 characters"}).optional(),subtitle:a.string().min(3).max(200,{message:"Subtitle must be between 3 and 200 characters"}).optional(),link:a.object({text:a.string({message:"Link text must be between 3 and 100 characters"}).optional(),url:a.string({message:"Please enter a valid URL"}).optional()}).optional(),feature:a.object({heading:a.string().min(3).max(100,{message:"Heading must be between 3 and 100 characters"}).optional(),subHeading:a.string().min(3).max(200,{message:"Subheading must be between 3 and 200 characters"}).optional(),text:a.string().min(3).max(200,{message:"Text must be between 3 and 200 characters"}).optional()}).optional()})).optional()});function o(a,o){return e(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as e,__generator as t,__assign as s}from"../../../node_modules/tslib/tslib.es6.js";import{z as a}from"zod";import{formDataToBlocks as r}from"../../lib/utils.js";import{mutateData as i}from"../services/mutate-data.js";var n=a.object({id:a.string(),title:a.string().min(3).max(100,{message:"Title must be between 3 and 100 characters"}),description:a.string().min(3).max(200,{message:"Description must be between 3 and 200 characters"}),blocks:a.array(a.object({id:a.string(),__component:a.string(),heading:a.string().min(3).max(100,{message:"Heading must be between 3 and 100 characters"}).optional(),subHeading:a.string().min(3).max(200,{message:"Subheading must be between 3 and 200 characters"}).optional(),title:a.string().min(3).max(100,{message:"Title must be between 3 and 100 characters"}).optional(),subtitle:a.string().min(3).max(200,{message:"Subtitle must be between 3 and 200 characters"}).optional(),link:a.object({text:a.string({message:"Link text must be between 3 and 100 characters"}).optional(),url:a.string({message:"Please enter a valid URL"}).optional()}).optional(),feature:a.object({heading:a.string().min(3).max(100,{message:"Heading must be between 3 and 100 characters"}).optional(),subHeading:a.string().min(3).max(200,{message:"Subheading must be between 3 and 200 characters"}).optional(),text:a.string().min(3).max(200,{message:"Text must be between 3 and 200 characters"}).optional()}).optional()})).optional()});function o(a,o){return e(this,void 0,void 0,function(){var e,m,l,g;return t(this,function(t){switch(t.label){case 0:return e=r(o),(m=n.safeParse({id:o.get("id"),title:o.get("title"),description:o.get("description"),blocks:e})).success?(l=m.data,[4,i("PUT","/api/pages/".concat(l.id),{data:l})]):[2,s(s({},a),{zodErrors:m.error.flatten().fieldErrors,strapiErrors:null,message:"Missing Fields. Failed to Update Page."})];case 1:return(g=t.sent())?g.error?[2,s(s({},a),{strapiErrors:g.error,zodErrors:null,message:"Failed to Update Page."})]:[2,s(s({},a),{strapiErrors:null,zodErrors:null,message:"Page Updated Successfully."})]:[2,s(s({},a),{strapiErrors:null,zodErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{o as updatePageAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as e,__assign as s}from"../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../services/mutate-data.js";import{flattenAttributes as i}from"../../lib/utils.js";import{parseFormData as a}from"../../lib/parseFormData.js";function o(o,d){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as e,__assign as s}from"../../../node_modules/tslib/tslib.es6.js";import{mutateData as t}from"../services/mutate-data.js";import{flattenAttributes as i}from"../../lib/utils.js";import{parseFormData as a}from"../../lib/parseFormData.js";function o(o,d){return r(this,void 0,void 0,function(){var r,l,n,m,u;return e(this,function(e){switch(e.label){case 0:return r=Object.fromEntries(d),void 0===(l=a(d)).data.delivery_address&&(l.data.delivery_address=null),void 0===l.data.billing_address&&(l.data.billing_address=null),n=r.id,[4,t("PUT","/api/customer-profiles/".concat(n),l)];case 1:return(m=e.sent())?m.error?[2,s(s({},o),{strapiErrors:m.error,message:"Failed to Register."})]:(u=i(m),[2,s(s({},o),{message:"Profile Updated",data:u,strapiErrors:null})]):[2,s(s({},o),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{o as updateCustomerProfileAction};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as t,__assign as o}from"../../../../node_modules/tslib/tslib.es6.js";import{mutateData as e}from"../../services/mutate-data.js";import{flattenAttributes as s}from"../../../lib/utils.js";import{parseFormData as i}from"../../../lib/parseFormData.js";function a(a,n){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as t,__assign as o}from"../../../../node_modules/tslib/tslib.es6.js";import{mutateData as e}from"../../services/mutate-data.js";import{flattenAttributes as s}from"../../../lib/utils.js";import{parseFormData as i}from"../../../lib/parseFormData.js";function a(a,n){return r(this,void 0,void 0,function(){var r,l,m,p;return t(this,function(t){switch(t.label){case 0:return r=Object.fromEntries(n),console.log("rawFormData",r),l=i(n),console.log("parsedFormData",l),r.id,[4,e("PUT","/api/public-information",l)];case 1:return(m=t.sent())?m.error?[2,o(o({},a),{strapiErrors:m.error,message:"Failed to Register."})]:(p=s(m),[2,o(o({},a),{message:"Public Information Updated",data:p,strapiErrors:null})]):[2,o(o({},a),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}})})}export{a as updatePublicInformationAction};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__awaiter as e,__generator as o}from"../../../../../node_modules/tslib/tslib.es6.js";import{fetchData as t}from"../../loaders.js";import{getStrapiURL as n}from"../../../../lib/utils.js";import r from"../../../../../node_modules/qs/lib/index.js";var s=n();function i(n,i){return e(this,void 0,void 0,
|
|
6
|
+
import{__awaiter as e,__generator as o}from"../../../../../node_modules/tslib/tslib.es6.js";import{fetchData as t}from"../../loaders.js";import{getStrapiURL as n}from"../../../../lib/utils.js";import r from"../../../../../node_modules/qs/lib/index.js";var s=n();function i(n,i){return e(this,void 0,void 0,function(){var e,a,l,c,d,m,u,b,f,p,h;return o(this,function(o){switch(o.label){case 0:return console.log("downloadBase64File"),console.log("path",n),console.log("name",i),(e=new URL(n,s)).search=r.stringify({populate:(h={},h[i]=!0,h)}),[4,t(e.href)];case 1:if(a=o.sent(),console.log("res",a[i]),a[i]&&a[i].base64_string&&a[i].name){for(l=a[i].base64_string,c=atob(l),d=new Array(c.length),m=0;m<c.length;m++)d[m]=c.charCodeAt(m);u=new Uint8Array(d),b=new File([u],a[i].name,{type:"application/octet-stream"}),f=URL.createObjectURL(b),(p=document.createElement("a")).href=f,p.setAttribute("download",a[i].name),document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(f)}return[2]}})})}export{i as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as r,__generator as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{getStrapiURL as i}from"../../../../lib/utils.js";import{fetchData as e}from"../../loaders.js";var o=i();function s(){return r(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as r,__generator as t}from"../../../../../node_modules/tslib/tslib.es6.js";import{getStrapiURL as i}from"../../../../lib/utils.js";import{fetchData as e}from"../../loaders.js";var o=i();function s(){return r(this,void 0,void 0,function(){var r;return t(this,function(t){switch(t.label){case 0:return r=new URL("/api/upload/files",o),[4,e(r.href)];case 1:return[2,t.sent()]}})})}export{s as getAllMedia};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as i,__generator as e}from"../../../../node_modules/tslib/tslib.es6.js";import r from"../../../../node_modules/qs/lib/index.js";import{fetchData as t}from"../loaders.js";import{getStrapiURL as s}from"../../../lib/utils.js";var o=s();function n(){return i(this,void 0,void 0,
|
|
7
|
+
import{__awaiter as i,__generator as e}from"../../../../node_modules/tslib/tslib.es6.js";import r from"../../../../node_modules/qs/lib/index.js";import{fetchData as t}from"../loaders.js";import{getStrapiURL as s}from"../../../lib/utils.js";var o=s();function n(){return i(this,void 0,void 0,function(){var i;return e(this,function(e){switch(e.label){case 0:return(i=new URL("/api/product-categories",o)).search=r.stringify({fields:["id","title","slug"],pagination:{pageSize:100,page:1}}),[4,t(i.href)];case 1:return[2,e.sent()]}})})}export{n as getAllCategoryNames};
|