@evershop/evershop 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/Area.js +199 -12
- package/dist/components/common/Area.js.map +1 -1
- package/dist/components/common/Editor.js +2 -1
- package/dist/components/common/Editor.js.map +1 -1
- package/dist/components/common/ExtendableTable.js +1 -1
- package/dist/components/common/ExtendableTable.js.map +1 -1
- package/dist/components/common/StaticImage.js +2 -2
- package/dist/components/common/StaticImage.js.map +1 -1
- package/dist/components/common/form/Editor.scss +3 -1
- package/dist/components/common/form/ReactSelectCreatableField.d.ts +1 -1
- package/dist/components/common/form/SelectField.js +3 -3
- package/dist/components/common/form/SelectField.js.map +1 -1
- package/dist/components/common/ui/Badge.d.ts +1 -1
- package/dist/components/common/ui/Item.js +1 -1
- package/dist/components/common/ui/Item.js.map +1 -1
- package/dist/components/common/ui/Sonner.d.ts +5 -0
- package/dist/components/common/ui/Sonner.js +24 -0
- package/dist/components/common/ui/Sonner.js.map +1 -0
- package/dist/components/common/ui/Tabs.d.ts +1 -1
- package/dist/components/frontStore/Footer.js +3 -1
- package/dist/components/frontStore/Footer.js.map +1 -1
- package/dist/components/frontStore/Pagination.js +1 -1
- package/dist/components/frontStore/Pagination.js.map +1 -1
- package/dist/components/frontStore/cart/CartContext.d.ts +2 -2
- package/dist/components/frontStore/cart/DefaultCartItemList.js +5 -5
- package/dist/components/frontStore/cart/DefaultCartItemList.js.map +1 -1
- package/dist/components/frontStore/cart/DefaultMiniCartDropdown.js +2 -19
- package/dist/components/frontStore/cart/DefaultMiniCartDropdown.js.map +1 -1
- package/dist/components/frontStore/cart/DefaultMinicartDropdownSummary.d.ts +7 -0
- package/dist/components/frontStore/cart/DefaultMinicartDropdownSummary.js +29 -0
- package/dist/components/frontStore/cart/DefaultMinicartDropdownSummary.js.map +1 -0
- package/dist/components/frontStore/catalog/CategoryInfo.js +2 -2
- package/dist/components/frontStore/catalog/CategoryInfo.js.map +1 -1
- package/dist/components/frontStore/catalog/DefaultCategoryFilterRender.js +1 -1
- package/dist/components/frontStore/catalog/DefaultCategoryFilterRender.js.map +1 -1
- package/dist/components/frontStore/catalog/DefaultProductFilterRender.js +3 -3
- package/dist/components/frontStore/catalog/DefaultProductFilterRender.js.map +1 -1
- package/dist/components/frontStore/catalog/ProductSorting.d.ts +2 -1
- package/dist/components/frontStore/catalog/ProductSorting.js +7 -3
- package/dist/components/frontStore/catalog/ProductSorting.js.map +1 -1
- package/dist/components/frontStore/catalog/SearchBox.d.ts +1 -1
- package/dist/components/frontStore/checkout/CheckoutButton.js +19 -12
- package/dist/components/frontStore/checkout/CheckoutButton.js.map +1 -1
- package/dist/components/frontStore/checkout/CheckoutContext.d.ts +10 -9
- package/dist/components/frontStore/checkout/CheckoutContext.js +39 -25
- package/dist/components/frontStore/checkout/CheckoutContext.js.map +1 -1
- package/dist/components/frontStore/checkout/ContactInformation.js +12 -8
- package/dist/components/frontStore/checkout/ContactInformation.js.map +1 -1
- package/dist/components/frontStore/checkout/Payment.js +19 -12
- package/dist/components/frontStore/checkout/Payment.js.map +1 -1
- package/dist/components/frontStore/checkout/Shipment.js +19 -13
- package/dist/components/frontStore/checkout/Shipment.js.map +1 -1
- package/dist/components/frontStore/checkout/payment/PaymentMethods.js +1 -1
- package/dist/components/frontStore/checkout/payment/PaymentMethods.js.map +1 -1
- package/dist/components/frontStore/checkout/shipment/ShippingMethods.js +2 -2
- package/dist/components/frontStore/checkout/shipment/ShippingMethods.js.map +1 -1
- package/dist/components/frontStore/customer/CustomerContext.d.ts +3 -3
- package/dist/components/frontStore/customer/RegistrationForm.js +1 -1
- package/dist/components/frontStore/customer/address/addressForm/AddressForm.js +1 -1
- package/dist/components/frontStore/customer/address/addressForm/AddressForm.js.map +1 -1
- package/dist/lib/componee/scanForComponents.js.map +1 -1
- package/dist/lib/event/EventProcessor.d.ts +17 -0
- package/dist/lib/event/EventProcessor.js +63 -0
- package/dist/lib/event/EventProcessor.js.map +1 -0
- package/dist/lib/event/EventStorage.d.ts +36 -0
- package/dist/lib/event/EventStorage.js +49 -0
- package/dist/lib/event/EventStorage.js.map +1 -0
- package/dist/lib/event/callSubscibers.d.ts +1 -1
- package/dist/lib/event/callSubscibers.js +7 -11
- package/dist/lib/event/callSubscibers.js.map +1 -1
- package/dist/lib/event/event-manager.js +38 -71
- package/dist/lib/event/event-manager.js.map +1 -1
- package/dist/lib/event/loadSubscribers.d.ts +10 -1
- package/dist/lib/event/loadSubscribers.js +2 -4
- package/dist/lib/event/loadSubscribers.js.map +1 -1
- package/dist/lib/event/tests/unit/EventProcessor.test.d.ts +1 -0
- package/dist/lib/event/tests/unit/EventProcessor.test.js +196 -0
- package/dist/lib/event/tests/unit/EventProcessor.test.js.map +1 -0
- package/dist/lib/event/tests/unit/callSubscribers.test.d.ts +1 -0
- package/dist/lib/event/tests/unit/callSubscribers.test.js +57 -0
- package/dist/lib/event/tests/unit/callSubscribers.test.js.map +1 -0
- package/dist/lib/mail/emailHelper.d.ts +2 -2
- package/dist/lib/postgres/connection.d.ts +3 -1
- package/dist/lib/postgres/connection.js +10 -6
- package/dist/lib/postgres/connection.js.map +1 -1
- package/dist/lib/postgres/query.d.ts +296 -0
- package/dist/lib/postgres/query.js +42 -0
- package/dist/lib/postgres/query.js.map +1 -0
- package/dist/lib/util/getConfig.d.ts +6 -6
- package/dist/lib/util/registry.d.ts +17 -2
- package/dist/lib/util/registry.js.map +1 -1
- package/dist/lib/util/sanitizeHtml.d.ts +16 -0
- package/dist/lib/util/sanitizeHtml.js +45 -0
- package/dist/lib/util/sanitizeHtml.js.map +1 -0
- package/dist/lib/webpack/loaders/AreaLoader.js +0 -1
- package/dist/lib/webpack/loaders/AreaLoader.js.map +1 -1
- package/dist/lib/webpack/util/getTailwindSources.js +1 -1
- package/dist/lib/webpack/util/getTailwindSources.js.map +1 -1
- package/dist/modules/auth/api/refreshUserToken/refreshToken.js +4 -6
- package/dist/modules/auth/api/refreshUserToken/refreshToken.js.map +1 -1
- package/dist/modules/auth/bootstrap.d.ts +1 -1
- package/dist/modules/auth/bootstrap.js +16 -14
- package/dist/modules/auth/bootstrap.js.map +1 -1
- package/dist/modules/auth/services/buildAdminUserPayload.d.ts +10 -0
- package/dist/modules/auth/services/buildAdminUserPayload.js +19 -0
- package/dist/modules/auth/services/buildAdminUserPayload.js.map +1 -0
- package/dist/modules/auth/services/loginUserWithEmail.d.ts +3 -7
- package/dist/modules/auth/services/loginUserWithEmail.js +15 -6
- package/dist/modules/auth/services/loginUserWithEmail.js.map +1 -1
- package/dist/modules/auth/services/logoutUser.d.ts +3 -4
- package/dist/modules/auth/services/logoutUser.js +12 -1
- package/dist/modules/auth/services/logoutUser.js.map +1 -1
- package/dist/modules/base/api/global/[apiResponse]apiErrorHandler.d.ts +3 -1
- package/dist/modules/base/api/global/[apiResponse]apiErrorHandler.js.map +1 -1
- package/dist/modules/base/api/global/[auth]apiResponse[apiErrorHandler].d.ts +3 -1
- package/dist/modules/base/api/global/[auth]apiResponse[apiErrorHandler].js.map +1 -1
- package/dist/modules/base/api/global/[auth]payloadValidate.d.ts +3 -1
- package/dist/modules/base/api/global/[auth]payloadValidate.js +3 -2
- package/dist/modules/base/api/global/[auth]payloadValidate.js.map +1 -1
- package/dist/modules/base/api/global/[payloadValidate]escapeHtml.d.ts +3 -1
- package/dist/modules/base/api/global/[payloadValidate]escapeHtml.js +0 -2
- package/dist/modules/base/api/global/[payloadValidate]escapeHtml.js.map +1 -1
- package/dist/modules/base/migration/Version-1.0.2.d.ts +2 -0
- package/dist/modules/base/migration/Version-1.0.2.js +22 -0
- package/dist/modules/base/migration/Version-1.0.2.js.map +1 -0
- package/dist/modules/base/pages/admin/all/global.scss +1 -1
- package/dist/modules/base/services/escapePayload.js +20 -13
- package/dist/modules/base/services/escapePayload.js.map +1 -1
- package/dist/modules/base/services/markSkipEscape.d.ts +5 -0
- package/dist/modules/base/services/markSkipEscape.js +25 -20
- package/dist/modules/base/services/markSkipEscape.js.map +1 -1
- package/dist/modules/catalog/api/createAttribute/createAttribute[finish].d.ts +3 -1
- package/dist/modules/catalog/api/createCategory/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/catalog/api/createCategory/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/catalog/api/createCategory/createCategory[finish].d.ts +5 -1
- package/dist/modules/catalog/api/createCategory/createCategory[finish].js.map +1 -1
- package/dist/modules/catalog/api/createCategory/finish[apiResponse].d.ts +3 -1
- package/dist/modules/catalog/api/createCategory/finish[apiResponse].js +2 -2
- package/dist/modules/catalog/api/createCategory/finish[apiResponse].js.map +1 -1
- package/dist/modules/catalog/api/createCategory/payloadSchema.json +76 -0
- package/dist/modules/catalog/api/createCollection/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/catalog/api/createCollection/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/catalog/api/createCollection/createCollection[finish].d.ts +4 -1
- package/dist/modules/catalog/api/createCollection/createCollection[finish].js.map +1 -1
- package/dist/modules/catalog/api/createCollection/finish[apiResponse].d.ts +3 -1
- package/dist/modules/catalog/api/createCollection/finish[apiResponse].js +1 -1
- package/dist/modules/catalog/api/createCollection/finish[apiResponse].js.map +1 -1
- package/dist/modules/catalog/{services/collection/collectionDataSchema.json → api/createCollection/payloadSchema.json} +1 -0
- package/dist/modules/catalog/api/createProduct/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/catalog/api/createProduct/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/catalog/api/createProduct/createProduct[finish].d.ts +5 -1
- package/dist/modules/catalog/api/createProduct/createProduct[finish].js.map +1 -1
- package/dist/modules/catalog/api/createProduct/finish[apiResponse].d.ts +3 -1
- package/dist/modules/catalog/api/createProduct/finish[apiResponse].js +2 -2
- package/dist/modules/catalog/api/createProduct/finish[apiResponse].js.map +1 -1
- package/dist/modules/catalog/api/createProduct/payloadSchema.json +76 -0
- package/dist/modules/catalog/api/updateAttribute/updateAttribute[finish].d.ts +3 -1
- package/dist/modules/catalog/api/updateCategory/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/catalog/api/updateCategory/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/catalog/api/updateCategory/finish[apiResponse].d.ts +3 -1
- package/dist/modules/catalog/api/updateCategory/finish[apiResponse].js +2 -2
- package/dist/modules/catalog/api/updateCategory/finish[apiResponse].js.map +1 -1
- package/dist/modules/catalog/api/updateCategory/payloadSchema.json +76 -0
- package/dist/modules/catalog/api/updateCategory/updateCategory[finish].d.ts +5 -1
- package/dist/modules/catalog/api/updateCategory/updateCategory[finish].js +1 -1
- package/dist/modules/catalog/api/updateCategory/updateCategory[finish].js.map +1 -1
- package/dist/modules/catalog/api/updateCollection/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/catalog/api/updateCollection/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/catalog/api/updateCollection/finish[apiResponse].d.ts +3 -1
- package/dist/modules/catalog/api/updateCollection/finish[apiResponse].js +1 -1
- package/dist/modules/catalog/api/updateCollection/finish[apiResponse].js.map +1 -1
- package/{src/modules/catalog/services/collection/collectionDataSchema.json → dist/modules/catalog/api/updateCollection/payloadSchema.json} +1 -0
- package/dist/modules/catalog/api/updateCollection/updateCollection[finish].d.ts +5 -1
- package/dist/modules/catalog/api/updateCollection/updateCollection[finish].js +1 -1
- package/dist/modules/catalog/api/updateCollection/updateCollection[finish].js.map +1 -1
- package/dist/modules/catalog/api/updateProduct/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/catalog/api/updateProduct/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/catalog/api/updateProduct/finish[apiResponse].d.ts +3 -1
- package/dist/modules/catalog/api/updateProduct/finish[apiResponse].js +2 -2
- package/dist/modules/catalog/api/updateProduct/finish[apiResponse].js.map +1 -1
- package/dist/modules/catalog/api/updateProduct/payloadSchema.json +76 -0
- package/dist/modules/catalog/api/updateProduct/updateProduct[finish].d.ts +5 -1
- package/dist/modules/catalog/api/updateProduct/updateProduct[finish].js +1 -1
- package/dist/modules/catalog/api/updateProduct/updateProduct[finish].js.map +1 -1
- package/dist/modules/catalog/graphql/types/Category/Category.resolvers.d.ts +36 -37
- package/dist/modules/catalog/graphql/types/Category/Category.resolvers.js +0 -18
- package/dist/modules/catalog/graphql/types/Category/Category.resolvers.js.map +1 -1
- package/dist/modules/catalog/graphql/types/Collection/Collection.resolvers.js +1 -8
- package/dist/modules/catalog/graphql/types/Collection/Collection.resolvers.js.map +1 -1
- package/dist/modules/catalog/graphql/types/Product/Product.resolvers.js +0 -18
- package/dist/modules/catalog/graphql/types/Product/Product.resolvers.js.map +1 -1
- package/dist/modules/catalog/pages/admin/productEdit/variants/CreateVariant.js +4 -3
- package/dist/modules/catalog/pages/admin/productEdit/variants/CreateVariant.js.map +1 -1
- package/dist/modules/catalog/pages/admin/productEdit/variants/CreateVariantGroup.d.ts +1 -0
- package/dist/modules/catalog/pages/admin/productEdit/variants/CreateVariantGroup.js +12 -6
- package/dist/modules/catalog/pages/admin/productEdit/variants/CreateVariantGroup.js.map +1 -1
- package/dist/modules/catalog/pages/admin/productEdit/variants/EditVariant.js +4 -3
- package/dist/modules/catalog/pages/admin/productEdit/variants/EditVariant.js.map +1 -1
- package/dist/modules/catalog/pages/admin/productEdit/variants/New.js +6 -10
- package/dist/modules/catalog/pages/admin/productEdit/variants/New.js.map +1 -1
- package/dist/modules/catalog/pages/admin/productEdit/variants/VariantModal.d.ts +2 -0
- package/dist/modules/catalog/pages/admin/productEdit/variants/VariantModal.js +8 -2
- package/dist/modules/catalog/pages/admin/productEdit/variants/VariantModal.js.map +1 -1
- package/dist/modules/catalog/pages/admin/productEdit+productNew/General.js +4 -1
- package/dist/modules/catalog/pages/admin/productEdit+productNew/General.js.map +1 -1
- package/dist/modules/catalog/pages/frontStore/categoryView/CategoryView.js +1 -6
- package/dist/modules/catalog/pages/frontStore/categoryView/CategoryView.js.map +1 -1
- package/dist/modules/catalog/pages/frontStore/productView/ProductView.js +7 -1
- package/dist/modules/catalog/pages/frontStore/productView/ProductView.js.map +1 -1
- package/dist/modules/catalog/services/attribute/createProductAttribute.d.ts +78 -2
- package/dist/modules/catalog/services/attribute/createProductAttribute.js +25 -1
- package/dist/modules/catalog/services/attribute/createProductAttribute.js.map +1 -1
- package/dist/modules/catalog/services/attribute/deleteProductAttribute.d.ts +7 -1
- package/dist/modules/catalog/services/attribute/deleteProductAttribute.js +13 -1
- package/dist/modules/catalog/services/attribute/deleteProductAttribute.js.map +1 -1
- package/dist/modules/catalog/services/attribute/updateProductAttribute.d.ts +56 -2
- package/dist/modules/catalog/services/attribute/updateProductAttribute.js +28 -6
- package/dist/modules/catalog/services/attribute/updateProductAttribute.js.map +1 -1
- package/dist/modules/catalog/services/category/createCategory.d.ts +28 -2
- package/dist/modules/catalog/services/category/createCategory.js +18 -1
- package/dist/modules/catalog/services/category/createCategory.js.map +1 -1
- package/dist/modules/catalog/services/category/deleteCategory.d.ts +7 -1
- package/dist/modules/catalog/services/category/deleteCategory.js +13 -1
- package/dist/modules/catalog/services/category/deleteCategory.js.map +1 -1
- package/dist/modules/catalog/services/category/updateCategory.d.ts +25 -1
- package/dist/modules/catalog/services/category/updateCategory.js +26 -4
- package/dist/modules/catalog/services/category/updateCategory.js.map +1 -1
- package/dist/modules/catalog/services/collection/createCollection.d.ts +12 -3
- package/dist/modules/catalog/services/collection/createCollection.js +20 -20
- package/dist/modules/catalog/services/collection/createCollection.js.map +1 -1
- package/dist/modules/catalog/services/collection/deleteCollection.d.ts +7 -1
- package/dist/modules/catalog/services/collection/deleteCollection.js +13 -1
- package/dist/modules/catalog/services/collection/deleteCollection.js.map +1 -1
- package/dist/modules/catalog/services/collection/updateCollection.d.ts +9 -1
- package/dist/modules/catalog/services/collection/updateCollection.js +22 -24
- package/dist/modules/catalog/services/collection/updateCollection.js.map +1 -1
- package/dist/modules/catalog/services/index.d.ts +29 -18
- package/dist/modules/catalog/services/index.js +35 -18
- package/dist/modules/catalog/services/index.js.map +1 -1
- package/dist/modules/catalog/services/product/createProduct.d.ts +56 -4
- package/dist/modules/catalog/services/product/createProduct.js +36 -1
- package/dist/modules/catalog/services/product/createProduct.js.map +1 -1
- package/dist/modules/catalog/services/product/deleteProduct.d.ts +7 -2
- package/dist/modules/catalog/services/product/deleteProduct.js +13 -1
- package/dist/modules/catalog/services/product/deleteProduct.js.map +1 -1
- package/dist/modules/catalog/services/product/updateProduct.d.ts +58 -2
- package/dist/modules/catalog/services/product/updateProduct.js +43 -4
- package/dist/modules/catalog/services/product/updateProduct.js.map +1 -1
- package/dist/modules/checkout/pages/frontStore/cart/ShoppingCart.js +1 -3
- package/dist/modules/checkout/pages/frontStore/cart/ShoppingCart.js.map +1 -1
- package/dist/modules/checkout/pages/frontStore/checkout/Checkout.js +3 -1
- package/dist/modules/checkout/pages/frontStore/checkout/Checkout.js.map +1 -1
- package/dist/modules/checkout/services/addBillingAddress.d.ts +15 -0
- package/dist/modules/checkout/services/addBillingAddress.js +24 -6
- package/dist/modules/checkout/services/addBillingAddress.js.map +1 -1
- package/dist/modules/checkout/services/addCartItem.d.ts +12 -0
- package/dist/modules/checkout/services/addCartItem.js +7 -1
- package/dist/modules/checkout/services/addCartItem.js.map +1 -1
- package/dist/modules/checkout/services/addShippingAddress.d.ts +13 -0
- package/dist/modules/checkout/services/addShippingAddress.js +18 -6
- package/dist/modules/checkout/services/addShippingAddress.js.map +1 -1
- package/dist/modules/checkout/services/checkout.d.ts +19 -1
- package/dist/modules/checkout/services/checkout.js +12 -6
- package/dist/modules/checkout/services/checkout.js.map +1 -1
- package/dist/modules/checkout/services/index.d.ts +5 -3
- package/dist/modules/checkout/services/index.js +5 -3
- package/dist/modules/checkout/services/index.js.map +1 -1
- package/dist/modules/checkout/services/orderCreator.d.ts +48 -0
- package/dist/modules/checkout/services/orderCreator.js +25 -1
- package/dist/modules/checkout/services/orderCreator.js.map +1 -1
- package/dist/modules/checkout/services/removeCartItem.d.ts +8 -0
- package/dist/modules/checkout/services/removeCartItem.js +7 -1
- package/dist/modules/checkout/services/removeCartItem.js.map +1 -1
- package/dist/modules/checkout/services/updateCartItemQty.d.ts +14 -0
- package/dist/modules/checkout/services/updateCartItemQty.js +7 -1
- package/dist/modules/checkout/services/updateCartItemQty.js.map +1 -1
- package/dist/modules/cms/api/createCmsPage/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/cms/api/createCmsPage/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/cms/api/createCmsPage/createPage[finish].d.ts +3 -1
- package/dist/modules/cms/api/createCmsPage/createPage[finish].js +1 -1
- package/dist/modules/cms/api/createCmsPage/createPage[finish].js.map +1 -1
- package/dist/modules/cms/api/createCmsPage/finish[apiResponse].d.ts +3 -1
- package/dist/modules/cms/api/createCmsPage/finish[apiResponse].js +2 -2
- package/dist/modules/cms/api/createCmsPage/finish[apiResponse].js.map +1 -1
- package/dist/modules/cms/api/createCmsPage/payloadSchema.json +76 -0
- package/dist/modules/cms/api/deleteCmsPage/deleteCmsPage.d.ts +3 -1
- package/dist/modules/cms/api/deleteCmsPage/deleteCmsPage.js +1 -1
- package/dist/modules/cms/api/deleteCmsPage/deleteCmsPage.js.map +1 -1
- package/dist/modules/cms/api/updateCmsPage/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/cms/api/updateCmsPage/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/cms/api/updateCmsPage/finish[apiResponse].d.ts +3 -1
- package/dist/modules/cms/api/updateCmsPage/finish[apiResponse].js +2 -2
- package/dist/modules/cms/api/updateCmsPage/finish[apiResponse].js.map +1 -1
- package/dist/modules/cms/api/updateCmsPage/payloadSchema.json +76 -0
- package/dist/modules/cms/api/updateCmsPage/updatePage[finish].d.ts +2 -1
- package/dist/modules/cms/api/updateCmsPage/updatePage[finish].js.map +1 -1
- package/dist/modules/cms/bootstrap.d.ts +1 -1
- package/dist/modules/cms/bootstrap.js +18 -0
- package/dist/modules/cms/bootstrap.js.map +1 -1
- package/dist/modules/cms/components/BasicMenu.js +1 -1
- package/dist/modules/cms/components/BasicMenu.js.map +1 -1
- package/dist/modules/cms/graphql/types/CmsPage/CmsPage.resolvers.js +0 -18
- package/dist/modules/cms/graphql/types/CmsPage/CmsPage.resolvers.js.map +1 -1
- package/dist/modules/cms/graphql/types/Widget/Widget.resolvers.js +0 -17
- package/dist/modules/cms/graphql/types/Widget/Widget.resolvers.js.map +1 -1
- package/dist/modules/cms/services/index.d.ts +3 -0
- package/dist/modules/cms/services/index.js +3 -0
- package/dist/modules/cms/services/index.js.map +1 -1
- package/dist/modules/cms/services/page/createPage.d.ts +18 -2
- package/dist/modules/cms/services/page/createPage.js +25 -7
- package/dist/modules/cms/services/page/createPage.js.map +1 -1
- package/dist/modules/cms/services/page/deletePage.d.ts +6 -2
- package/dist/modules/cms/services/page/deletePage.js +18 -6
- package/dist/modules/cms/services/page/deletePage.js.map +1 -1
- package/dist/modules/cms/services/page/pageDataSchema.json +9 -1
- package/dist/modules/cms/services/page/updatePage.d.ts +22 -1
- package/dist/modules/cms/services/page/updatePage.js +19 -2
- package/dist/modules/cms/services/page/updatePage.js.map +1 -1
- package/dist/modules/cms/services/widget/createWidget.d.ts +12 -1
- package/dist/modules/cms/services/widget/createWidget.js +14 -2
- package/dist/modules/cms/services/widget/createWidget.js.map +1 -1
- package/dist/modules/cms/services/widget/deleteWidget.d.ts +7 -1
- package/dist/modules/cms/services/widget/deleteWidget.js +13 -1
- package/dist/modules/cms/services/widget/deleteWidget.js.map +1 -1
- package/dist/modules/cms/services/widget/updateWidget.d.ts +7 -1
- package/dist/modules/cms/services/widget/updateWidget.js +15 -3
- package/dist/modules/cms/services/widget/updateWidget.js.map +1 -1
- package/dist/modules/cod/pages/frontStore/checkout/CashOnDelivery.js +2 -2
- package/dist/modules/cod/pages/frontStore/checkout/CashOnDelivery.js.map +1 -1
- package/dist/modules/customer/api/refreshCustomerToken/refreshToken.js +4 -6
- package/dist/modules/customer/api/refreshCustomerToken/refreshToken.js.map +1 -1
- package/dist/modules/customer/pages/frontStore/login/LoginPage.js +10 -9
- package/dist/modules/customer/pages/frontStore/login/LoginPage.js.map +1 -1
- package/dist/modules/customer/pages/frontStore/register/RegisterPage.js +14 -13
- package/dist/modules/customer/pages/frontStore/register/RegisterPage.js.map +1 -1
- package/dist/modules/customer/services/customer/address/createCustomerAddress.d.ts +13 -0
- package/dist/modules/customer/services/customer/address/createCustomerAddress.js +13 -1
- package/dist/modules/customer/services/customer/address/createCustomerAddress.js.map +1 -1
- package/dist/modules/customer/services/customer/address/deleteCustomerAddress.d.ts +5 -0
- package/dist/modules/customer/services/customer/address/deleteCustomerAddress.js +13 -1
- package/dist/modules/customer/services/customer/address/deleteCustomerAddress.js.map +1 -1
- package/dist/modules/customer/services/customer/address/updateCustomerAddress.d.ts +13 -0
- package/dist/modules/customer/services/customer/address/updateCustomerAddress.js +13 -1
- package/dist/modules/customer/services/customer/address/updateCustomerAddress.js.map +1 -1
- package/dist/modules/customer/services/customer/buildCustomerPayload.d.ts +8 -0
- package/dist/modules/customer/services/customer/buildCustomerPayload.js +19 -0
- package/dist/modules/customer/services/customer/buildCustomerPayload.js.map +1 -0
- package/dist/modules/customer/services/customer/createCustomer.d.ts +19 -1
- package/dist/modules/customer/services/customer/createCustomer.js +17 -4
- package/dist/modules/customer/services/customer/createCustomer.js.map +1 -1
- package/dist/modules/customer/services/customer/deleteCustomer.d.ts +7 -2
- package/dist/modules/customer/services/customer/deleteCustomer.js +13 -1
- package/dist/modules/customer/services/customer/deleteCustomer.js.map +1 -1
- package/dist/modules/customer/services/customer/loginCustomerWithEmail.js +3 -4
- package/dist/modules/customer/services/customer/loginCustomerWithEmail.js.map +1 -1
- package/dist/modules/customer/services/customer/updateCustomer.d.ts +23 -1
- package/dist/modules/customer/services/customer/updateCustomer.js +13 -1
- package/dist/modules/customer/services/customer/updateCustomer.js.map +1 -1
- package/dist/modules/customer/services/customer/updatePassword.d.ts +13 -0
- package/dist/modules/customer/services/customer/updatePassword.js +13 -1
- package/dist/modules/customer/services/customer/updatePassword.js.map +1 -1
- package/dist/modules/customer/services/index.d.ts +17 -11
- package/dist/modules/customer/services/index.js +26 -11
- package/dist/modules/customer/services/index.js.map +1 -1
- package/dist/modules/oms/bootstrap.js +8 -8
- package/dist/modules/oms/bootstrap.js.map +1 -1
- package/dist/modules/oms/services/addOrderActivityLog.d.ts +20 -0
- package/dist/modules/oms/services/addOrderActivityLog.js +7 -1
- package/dist/modules/oms/services/addOrderActivityLog.js.map +1 -1
- package/dist/modules/oms/services/addPaymentTransaction.d.ts +3 -0
- package/dist/modules/oms/services/addPaymentTransaction.js +16 -0
- package/dist/modules/oms/services/addPaymentTransaction.js.map +1 -0
- package/dist/modules/oms/services/cancelOrder.d.ts +61 -0
- package/dist/modules/oms/services/cancelOrder.js +31 -1
- package/dist/modules/oms/services/cancelOrder.js.map +1 -1
- package/dist/modules/oms/services/createShipment.d.ts +20 -0
- package/dist/modules/oms/services/createShipment.js +7 -1
- package/dist/modules/oms/services/createShipment.js.map +1 -1
- package/dist/modules/oms/services/index.d.ts +4 -0
- package/dist/modules/oms/services/index.js +4 -0
- package/dist/modules/oms/services/index.js.map +1 -1
- package/dist/modules/oms/services/orderLoader.d.ts +8 -0
- package/dist/modules/oms/services/orderLoader.js +57 -0
- package/dist/modules/oms/services/orderLoader.js.map +1 -0
- package/dist/modules/oms/services/statusManager.d.ts +54 -0
- package/dist/modules/oms/services/statusManager.js +101 -0
- package/dist/modules/oms/services/statusManager.js.map +1 -0
- package/dist/modules/oms/services/updateOrderStatus.d.ts +37 -0
- package/dist/modules/oms/services/updateOrderStatus.js +34 -9
- package/dist/modules/oms/services/updateOrderStatus.js.map +1 -1
- package/dist/modules/oms/services/updatePaymentStatus.d.ts +26 -0
- package/dist/modules/oms/services/updatePaymentStatus.js +13 -1
- package/dist/modules/oms/services/updatePaymentStatus.js.map +1 -1
- package/dist/modules/oms/services/updateShipmentStatus.d.ts +26 -0
- package/dist/modules/oms/services/updateShipmentStatus.js +13 -1
- package/dist/modules/oms/services/updateShipmentStatus.js.map +1 -1
- package/dist/modules/paypal/api/paypalAuthorizePayment/[bodyParser]authorize.js +1 -1
- package/dist/modules/paypal/api/paypalAuthorizePayment/[bodyParser]authorize.js.map +1 -1
- package/dist/modules/paypal/api/paypalCaptureAuthorizedPayment/[bodyParser]capture.js +2 -2
- package/dist/modules/paypal/api/paypalCaptureAuthorizedPayment/[bodyParser]capture.js.map +1 -1
- package/dist/modules/paypal/api/paypalCapturePayment/[bodyParser]capture.js +1 -1
- package/dist/modules/paypal/api/paypalCapturePayment/[bodyParser]capture.js.map +1 -1
- package/dist/modules/paypal/bootstrap.d.ts +1 -1
- package/dist/modules/paypal/bootstrap.js +22 -2
- package/dist/modules/paypal/bootstrap.js.map +1 -1
- package/dist/modules/paypal/graphql/types/PaypalSetting/PaypalSetting.admin.resolvers.d.ts +1 -1
- package/dist/modules/paypal/migration/Version-1.0.0.d.ts +3 -0
- package/dist/modules/paypal/migration/Version-1.0.0.js +19 -0
- package/dist/modules/paypal/migration/Version-1.0.0.js.map +1 -0
- package/dist/modules/paypal/pages/admin/orderEdit/PaypalCaptureButton.js +1 -1
- package/dist/modules/paypal/pages/admin/orderEdit/PaypalCaptureButton.js.map +1 -1
- package/dist/modules/paypal/pages/frontStore/checkout/Paypal.js +8 -3
- package/dist/modules/paypal/pages/frontStore/checkout/Paypal.js.map +1 -1
- package/dist/modules/promotion/api/createCoupon/createCoupon[finish].d.ts +1 -1
- package/dist/modules/promotion/api/updateCoupon/updateCoupon[finish].d.ts +1 -1
- package/dist/modules/promotion/services/coupon/createCoupon.d.ts +45 -1
- package/dist/modules/promotion/services/coupon/createCoupon.js +17 -5
- package/dist/modules/promotion/services/coupon/createCoupon.js.map +1 -1
- package/dist/modules/promotion/services/coupon/deleteCoupon.d.ts +8 -1
- package/dist/modules/promotion/services/coupon/deleteCoupon.js +16 -4
- package/dist/modules/promotion/services/coupon/deleteCoupon.js.map +1 -1
- package/dist/modules/promotion/services/coupon/updateCoupon.d.ts +8 -1
- package/dist/modules/promotion/services/coupon/updateCoupon.js +27 -13
- package/dist/modules/promotion/services/coupon/updateCoupon.js.map +1 -1
- package/dist/modules/promotion/services/index.d.ts +6 -0
- package/dist/modules/promotion/services/index.js +10 -0
- package/dist/modules/promotion/services/index.js.map +1 -0
- package/dist/modules/setting/services/setting.d.ts +10 -1
- package/dist/modules/setting/services/setting.js +27 -0
- package/dist/modules/setting/services/setting.js.map +1 -1
- package/dist/modules/stripe/api/capturePaymentIntent/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/stripe/api/capturePaymentIntent/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/stripe/api/capturePaymentIntent/capturePaymentIntent.d.ts +4 -1
- package/dist/modules/stripe/api/capturePaymentIntent/capturePaymentIntent.js +6 -4
- package/dist/modules/stripe/api/capturePaymentIntent/capturePaymentIntent.js.map +1 -1
- package/dist/modules/stripe/api/createPaymentIntent/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/stripe/api/createPaymentIntent/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/stripe/api/createPaymentIntent/createPaymentIntent.d.ts +3 -1
- package/dist/modules/stripe/api/createPaymentIntent/createPaymentIntent.js +4 -4
- package/dist/modules/stripe/api/createPaymentIntent/createPaymentIntent.js.map +1 -1
- package/dist/modules/stripe/api/refundPaymentIntent/[context]bodyParser[auth].d.ts +1 -1
- package/dist/modules/stripe/api/refundPaymentIntent/[context]bodyParser[auth].js.map +1 -1
- package/dist/modules/stripe/api/refundPaymentIntent/refundPaymentIntent.d.ts +1 -1
- package/dist/modules/stripe/api/refundPaymentIntent/refundPaymentIntent.js +11 -7
- package/dist/modules/stripe/api/refundPaymentIntent/refundPaymentIntent.js.map +1 -1
- package/dist/modules/stripe/api/stripeWebHook/[bodyJson]webhook.d.ts +3 -1
- package/dist/modules/stripe/api/stripeWebHook/[bodyJson]webhook.js +6 -6
- package/dist/modules/stripe/api/stripeWebHook/[bodyJson]webhook.js.map +1 -1
- package/dist/modules/stripe/api/stripeWebHook/bodyJson.d.ts +1 -1
- package/dist/modules/stripe/api/stripeWebHook/bodyJson.js.map +1 -1
- package/dist/modules/stripe/bootstrap.d.ts +1 -1
- package/dist/modules/stripe/bootstrap.js +31 -15
- package/dist/modules/stripe/bootstrap.js.map +1 -1
- package/dist/modules/stripe/graphql/types/StripeSetting/StripeSetting.resolvers.d.ts +1 -1
- package/dist/modules/stripe/migration/Version-1.0.0.d.ts +3 -0
- package/dist/modules/stripe/migration/Version-1.0.0.js +19 -0
- package/dist/modules/stripe/migration/Version-1.0.0.js.map +1 -0
- package/dist/modules/stripe/pages/admin/orderEdit/StripeCaptureButton.js +1 -1
- package/dist/modules/stripe/pages/admin/orderEdit/StripeCaptureButton.js.map +1 -1
- package/dist/modules/stripe/pages/admin/orderEdit/StripeRefundButton.js +7 -3
- package/dist/modules/stripe/pages/admin/orderEdit/StripeRefundButton.js.map +1 -1
- package/dist/modules/stripe/pages/frontStore/checkout/Stripe.js +16 -7
- package/dist/modules/stripe/pages/frontStore/checkout/Stripe.js.map +1 -1
- package/dist/modules/stripe/pages/frontStore/stripeReturn/index.d.ts +3 -1
- package/dist/modules/stripe/pages/frontStore/stripeReturn/index.js +8 -4
- package/dist/modules/stripe/pages/frontStore/stripeReturn/index.js.map +1 -1
- package/dist/modules/stripe/services/cancelPayment.d.ts +1 -1
- package/dist/modules/stripe/services/cancelPayment.js +3 -3
- package/dist/modules/stripe/services/cancelPayment.js.map +1 -1
- package/dist/types/apiResponse.d.ts +1 -1
- package/dist/types/appContext.d.ts +7 -4
- package/dist/types/customerAddress.d.ts +1 -1
- package/dist/types/db/index.d.ts +61 -61
- package/dist/types/event.d.ts +27 -14
- package/dist/types/registry.d.ts +119 -0
- package/dist/types/registry.js +2 -0
- package/dist/types/registry.js.map +1 -0
- package/dist/types/widget.d.ts +3 -0
- package/package.json +21 -12
- package/src/components/common/Area.tsx +256 -40
- package/src/components/common/Editor.tsx +6 -3
- package/src/components/common/ExtendableTable.tsx +1 -1
- package/src/components/common/StaticImage.tsx +2 -2
- package/src/components/common/form/Editor.scss +3 -1
- package/src/components/common/form/ReactSelectCreatableField.tsx +1 -1
- package/src/components/common/form/SelectField.tsx +1 -1
- package/src/components/common/ui/Item.tsx +1 -1
- package/src/components/common/ui/Sonner.tsx +43 -0
- package/src/components/frontStore/Footer.tsx +2 -0
- package/src/components/frontStore/Pagination.tsx +1 -1
- package/src/components/frontStore/cart/CartContext.tsx +2 -2
- package/src/components/frontStore/cart/DefaultCartItemList.tsx +5 -5
- package/src/components/frontStore/cart/DefaultMiniCartDropdown.tsx +7 -37
- package/src/components/frontStore/cart/DefaultMinicartDropdownSummary.tsx +57 -0
- package/src/components/frontStore/catalog/CategoryInfo.tsx +2 -2
- package/src/components/frontStore/catalog/DefaultCategoryFilterRender.tsx +1 -1
- package/src/components/frontStore/catalog/DefaultProductFilterRender.tsx +3 -3
- package/src/components/frontStore/catalog/ProductSorting.tsx +13 -4
- package/src/components/frontStore/catalog/SearchBox.tsx +1 -1
- package/src/components/frontStore/checkout/CheckoutButton.tsx +40 -31
- package/src/components/frontStore/checkout/CheckoutContext.tsx +55 -36
- package/src/components/frontStore/checkout/ContactInformation.tsx +28 -23
- package/src/components/frontStore/checkout/Payment.tsx +36 -27
- package/src/components/frontStore/checkout/Shipment.tsx +35 -28
- package/src/components/frontStore/checkout/payment/PaymentMethods.tsx +1 -1
- package/src/components/frontStore/checkout/shipment/ShippingMethods.tsx +6 -2
- package/src/components/frontStore/customer/CustomerContext.tsx +5 -5
- package/src/components/frontStore/customer/RegistrationForm.tsx +1 -1
- package/src/components/frontStore/customer/address/addressForm/AddressForm.tsx +1 -0
- package/src/lib/componee/scanForComponents.ts +0 -1
- package/src/lib/event/EventProcessor.ts +78 -0
- package/src/lib/event/EventStorage.ts +74 -0
- package/src/lib/event/callSubscibers.ts +13 -0
- package/src/lib/event/event-manager.ts +96 -0
- package/src/lib/event/{loadSubscribers.js → loadSubscribers.ts} +20 -8
- package/src/lib/event/tests/unit/EventProcessor.test.js +262 -0
- package/src/lib/event/tests/unit/callSubscribers.test.js +77 -0
- package/src/lib/mail/emailHelper.ts +2 -2
- package/src/lib/postgres/connection.ts +11 -7
- package/src/lib/postgres/query.ts +582 -0
- package/src/lib/util/getConfig.ts +6 -6
- package/src/lib/util/registry.ts +31 -0
- package/src/lib/util/sanitizeHtml.ts +59 -0
- package/src/lib/webpack/loaders/AreaLoader.js +0 -1
- package/src/lib/webpack/util/getTailwindSources.ts +1 -1
- package/src/modules/auth/api/refreshUserToken/refreshToken.ts +4 -6
- package/src/modules/auth/bootstrap.ts +33 -0
- package/src/modules/auth/services/buildAdminUserPayload.ts +22 -0
- package/src/modules/auth/services/loginUserWithEmail.ts +36 -6
- package/src/modules/auth/services/logoutUser.ts +22 -1
- package/src/modules/base/api/global/{[apiResponse]apiErrorHandler.js → [apiResponse]apiErrorHandler.ts} +8 -1
- package/src/modules/base/api/global/{[auth]apiResponse[apiErrorHandler].js → [auth]apiResponse[apiErrorHandler].ts} +7 -1
- package/src/modules/base/api/global/{[auth]payloadValidate.js → [auth]payloadValidate.ts} +10 -3
- package/src/modules/base/api/global/[payloadValidate]escapeHtml.ts +12 -0
- package/src/modules/base/migration/Version-1.0.2.js +37 -0
- package/src/modules/base/pages/admin/all/global.scss +1 -1
- package/src/modules/base/services/{escapePayload.js → escapePayload.ts} +17 -11
- package/src/modules/base/services/markSkipEscape.ts +43 -0
- package/src/modules/catalog/api/createCategory/createCategory[finish].ts +10 -0
- package/src/modules/catalog/api/createCategory/{finish[apiResponse].js → finish[apiResponse].ts} +13 -4
- package/src/modules/catalog/api/createCategory/payloadSchema.json +76 -0
- package/src/modules/catalog/api/createCollection/{createCollection[finish].js → createCollection[finish].ts} +2 -1
- package/src/modules/catalog/api/{updateCollection/finish[apiResponse].js → createCollection/finish[apiResponse].ts} +12 -3
- package/src/modules/catalog/api/createCollection/payloadSchema.json +94 -0
- package/src/modules/catalog/api/createProduct/createProduct[finish].ts +10 -0
- package/src/modules/catalog/api/createProduct/{finish[apiResponse].js → finish[apiResponse].ts} +13 -4
- package/src/modules/catalog/api/createProduct/payloadSchema.json +76 -0
- package/src/modules/catalog/api/updateCategory/{finish[apiResponse].js → finish[apiResponse].ts} +13 -4
- package/src/modules/catalog/api/updateCategory/payloadSchema.json +76 -0
- package/src/modules/catalog/api/updateCategory/updateCategory[finish].ts +14 -0
- package/src/modules/catalog/api/{createCollection/finish[apiResponse].js → updateCollection/finish[apiResponse].ts} +12 -3
- package/src/modules/catalog/api/updateCollection/payloadSchema.json +94 -0
- package/src/modules/catalog/api/updateCollection/updateCollection[finish].ts +14 -0
- package/src/modules/catalog/api/updateProduct/{finish[apiResponse].js → finish[apiResponse].ts} +13 -4
- package/src/modules/catalog/api/updateProduct/payloadSchema.json +76 -0
- package/src/modules/catalog/api/updateProduct/updateProduct[finish].ts +14 -0
- package/src/modules/catalog/graphql/types/Category/{Category.resolvers.js → Category.resolvers.ts} +0 -21
- package/src/modules/catalog/graphql/types/Collection/Collection.resolvers.js +1 -8
- package/src/modules/catalog/graphql/types/Product/Product.resolvers.ts +0 -20
- package/src/modules/catalog/pages/admin/productEdit/variants/CreateVariant.tsx +6 -2
- package/src/modules/catalog/pages/admin/productEdit/variants/CreateVariantGroup.tsx +22 -11
- package/src/modules/catalog/pages/admin/productEdit/variants/EditVariant.tsx +10 -3
- package/src/modules/catalog/pages/admin/productEdit/variants/New.tsx +8 -23
- package/src/modules/catalog/pages/admin/productEdit/variants/VariantModal.tsx +10 -2
- package/src/modules/catalog/pages/admin/productEdit+productNew/General.tsx +5 -2
- package/src/modules/catalog/pages/frontStore/categoryView/CategoryView.tsx +4 -8
- package/src/modules/catalog/pages/frontStore/productView/ProductView.tsx +10 -1
- package/src/modules/catalog/services/attribute/createProductAttribute.ts +146 -8
- package/src/modules/catalog/services/attribute/deleteProductAttribute.ts +58 -4
- package/src/modules/catalog/services/attribute/updateProductAttribute.ts +128 -12
- package/src/modules/catalog/services/category/createCategory.ts +66 -6
- package/src/modules/catalog/services/category/deleteCategory.ts +61 -4
- package/src/modules/catalog/services/category/updateCategory.ts +75 -10
- package/src/modules/catalog/services/collection/createCollection.ts +71 -30
- package/src/modules/catalog/services/collection/deleteCollection.ts +58 -4
- package/src/modules/catalog/services/collection/updateCollection.ts +70 -35
- package/src/modules/catalog/services/index.ts +46 -35
- package/src/modules/catalog/services/product/createProduct.ts +155 -11
- package/src/modules/catalog/services/product/deleteProduct.ts +58 -4
- package/src/modules/catalog/services/product/updateProduct.ts +168 -17
- package/src/modules/checkout/pages/frontStore/cart/ShoppingCart.tsx +0 -2
- package/src/modules/checkout/pages/frontStore/checkout/Checkout.tsx +2 -0
- package/src/modules/checkout/services/addBillingAddress.ts +74 -6
- package/src/modules/checkout/services/addCartItem.ts +31 -1
- package/src/modules/checkout/services/addShippingAddress.ts +54 -6
- package/src/modules/checkout/services/checkout.ts +35 -7
- package/src/modules/checkout/services/index.ts +17 -3
- package/src/modules/checkout/services/orderCreator.ts +105 -1
- package/src/modules/checkout/services/removeCartItem.ts +27 -1
- package/src/modules/checkout/services/updateCartItemQty.ts +33 -1
- package/src/modules/cms/api/createCmsPage/createPage[finish].ts +12 -0
- package/src/modules/cms/api/createCmsPage/{finish[apiResponse].js → finish[apiResponse].ts} +10 -4
- package/src/modules/cms/api/createCmsPage/payloadSchema.json +76 -0
- package/src/modules/cms/api/deleteCmsPage/{deleteCmsPage.js → deleteCmsPage.ts} +8 -2
- package/src/modules/cms/api/updateCmsPage/{finish[apiResponse].js → finish[apiResponse].ts} +10 -4
- package/src/modules/cms/api/updateCmsPage/payloadSchema.json +76 -0
- package/src/modules/cms/api/updateCmsPage/{updatePage[finish].js → updatePage[finish].ts} +2 -1
- package/src/modules/cms/{bootstrap.js → bootstrap.ts} +24 -3
- package/src/modules/cms/components/BasicMenu.tsx +1 -1
- package/src/modules/cms/graphql/types/CmsPage/CmsPage.resolvers.ts +0 -21
- package/src/modules/cms/graphql/types/Widget/Widget.resolvers.js +0 -20
- package/src/modules/cms/services/index.ts +3 -0
- package/src/modules/cms/services/page/{createPage.js → createPage.ts} +65 -8
- package/src/modules/cms/services/page/deletePage.ts +109 -0
- package/src/modules/cms/services/page/pageDataSchema.json +9 -1
- package/src/modules/cms/services/page/{updatePage.js → updatePage.ts} +68 -6
- package/src/modules/cms/services/widget/createWidget.ts +120 -0
- package/src/modules/cms/services/widget/deleteWidget.ts +97 -0
- package/src/modules/cms/services/widget/updateWidget.js +17 -1
- package/src/modules/cms/services/widget/updateWidget.ts +139 -0
- package/src/modules/cod/pages/frontStore/checkout/CashOnDelivery.tsx +4 -2
- package/src/modules/customer/api/refreshCustomerToken/refreshToken.ts +4 -6
- package/src/modules/customer/pages/frontStore/login/LoginPage.tsx +26 -24
- package/src/modules/customer/pages/frontStore/register/RegisterPage.tsx +24 -22
- package/src/modules/customer/services/customer/address/createCustomerAddress.ts +54 -2
- package/src/modules/customer/services/customer/address/deleteCustomerAddress.ts +49 -2
- package/src/modules/customer/services/customer/address/updateCustomerAddress.ts +55 -3
- package/src/modules/customer/services/customer/buildCustomerPayload.ts +20 -0
- package/src/modules/customer/services/customer/createCustomer.ts +60 -7
- package/src/modules/customer/services/customer/deleteCustomer.ts +55 -5
- package/src/modules/customer/services/customer/loginCustomerWithEmail.ts +3 -4
- package/src/modules/customer/services/customer/updateCustomer.ts +62 -5
- package/src/modules/customer/services/customer/updatePassword.ts +56 -3
- package/src/modules/customer/services/index.ts +34 -27
- package/src/modules/oms/bootstrap.ts +9 -8
- package/src/modules/oms/services/addOrderActivityLog.ts +31 -1
- package/src/modules/oms/services/addPaymentTransaction.ts +26 -0
- package/src/modules/oms/services/cancelOrder.ts +131 -1
- package/src/modules/oms/services/createShipment.ts +31 -1
- package/src/modules/oms/services/index.ts +4 -0
- package/src/modules/oms/services/orderLoader.ts +73 -0
- package/src/modules/oms/services/statusManager.ts +159 -0
- package/src/modules/oms/services/updateOrderStatus.ts +101 -9
- package/src/modules/oms/services/updatePaymentStatus.ts +53 -1
- package/src/modules/oms/services/updateShipmentStatus.ts +53 -1
- package/src/modules/paypal/api/paypalAuthorizePayment/[bodyParser]authorize.ts +1 -1
- package/src/modules/paypal/api/paypalCaptureAuthorizedPayment/[bodyParser]capture.ts +10 -2
- package/src/modules/paypal/api/paypalCapturePayment/[bodyParser]capture.ts +5 -1
- package/src/modules/paypal/{bootstrap.js → bootstrap.ts} +23 -2
- package/src/modules/paypal/migration/Version-1.0.0.ts +24 -0
- package/src/modules/paypal/pages/admin/orderEdit/PaypalCaptureButton.tsx +1 -1
- package/src/modules/paypal/pages/frontStore/checkout/Paypal.tsx +9 -3
- package/src/modules/promotion/services/coupon/createCoupon.ts +147 -0
- package/src/modules/promotion/services/coupon/deleteCoupon.ts +100 -0
- package/src/modules/promotion/services/coupon/updateCoupon.ts +130 -0
- package/src/modules/promotion/services/index.ts +11 -0
- package/src/modules/setting/services/setting.ts +40 -2
- package/src/modules/stripe/api/capturePaymentIntent/{capturePaymentIntent.js → capturePaymentIntent.ts} +14 -5
- package/src/modules/stripe/api/createPaymentIntent/{createPaymentIntent.js → createPaymentIntent.ts} +11 -5
- package/src/modules/stripe/api/refundPaymentIntent/{refundPaymentIntent.js → refundPaymentIntent.ts} +11 -7
- package/src/modules/stripe/api/stripeWebHook/{[bodyJson]webhook.js → [bodyJson]webhook.ts} +30 -10
- package/src/modules/stripe/{bootstrap.js → bootstrap.ts} +40 -15
- package/src/modules/stripe/migration/Version-1.0.0.ts +24 -0
- package/src/modules/stripe/pages/admin/orderEdit/StripeCaptureButton.jsx +1 -1
- package/src/modules/stripe/pages/admin/orderEdit/StripeRefundButton.tsx +9 -3
- package/src/modules/stripe/pages/frontStore/checkout/Stripe.tsx +16 -7
- package/src/modules/stripe/pages/frontStore/stripeReturn/{index.js → index.ts} +15 -5
- package/src/modules/stripe/services/{cancelPayment.js → cancelPayment.ts} +4 -4
- package/src/types/apiResponse.ts +1 -1
- package/src/types/appContext.tsx +9 -4
- package/src/types/customerAddress.ts +1 -1
- package/src/types/db/index.ts +61 -61
- package/src/types/event.ts +29 -15
- package/src/types/registry.ts +160 -0
- package/src/types/widget.ts +3 -0
- package/src/lib/event/callSubscibers.js +0 -19
- package/src/lib/event/event-manager.js +0 -134
- package/src/modules/auth/bootstrap.js +0 -28
- package/src/modules/base/api/global/[payloadValidate]escapeHtml.js +0 -12
- package/src/modules/base/services/markSkipEscape.js +0 -30
- package/src/modules/catalog/api/createCategory/createCategory[finish].js +0 -8
- package/src/modules/catalog/api/createProduct/createProduct[finish].js +0 -8
- package/src/modules/catalog/api/updateCategory/updateCategory[finish].js +0 -8
- package/src/modules/catalog/api/updateCollection/updateCollection[finish].js +0 -8
- package/src/modules/catalog/api/updateProduct/updateProduct[finish].js +0 -8
- package/src/modules/cms/api/createCmsPage/createPage[finish].js +0 -10
- package/src/modules/cms/services/page/deletePage.js +0 -55
- package/src/modules/cms/services/widget/createWidget.js +0 -71
- package/src/modules/cms/services/widget/deleteWidget.js +0 -47
- package/src/modules/promotion/services/coupon/createCoupon.js +0 -75
- package/src/modules/promotion/services/coupon/deleteCoupon.js +0 -49
- package/src/modules/promotion/services/coupon/updateCoupon.js +0 -94
- package/src/types/request.d.ts +0 -7
- /package/src/modules/catalog/api/createCategory/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/catalog/api/createCollection/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/catalog/api/createProduct/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/catalog/api/updateCategory/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/catalog/api/updateCollection/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/catalog/api/updateProduct/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/cms/api/createCmsPage/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/cms/api/updateCmsPage/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/stripe/api/capturePaymentIntent/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/stripe/api/createPaymentIntent/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/stripe/api/refundPaymentIntent/{[context]bodyParser[auth].js → [context]bodyParser[auth].ts} +0 -0
- /package/src/modules/stripe/api/stripeWebHook/{bodyJson.js → bodyJson.ts} +0 -0
|
@@ -5,7 +5,6 @@ import { CategoryProducts } from '@components/frontStore/catalog/CategoryProduct
|
|
|
5
5
|
import { CategoryProductsFilter } from '@components/frontStore/catalog/CategoryProductsFilter.js';
|
|
6
6
|
import { CategoryProductsPagination } from '@components/frontStore/catalog/CategoryProductsPagination.js';
|
|
7
7
|
import { ProductSorting } from '@components/frontStore/catalog/ProductSorting.js';
|
|
8
|
-
import { _ } from '@evershop/evershop/lib/locale/translate/_';
|
|
9
8
|
import React from 'react';
|
|
10
9
|
export default function CategoryView({ category }) {
|
|
11
10
|
return (React.createElement(CategoryProvider, { category: category },
|
|
@@ -22,11 +21,7 @@ export default function CategoryView({ category }) {
|
|
|
22
21
|
React.createElement(Area, { id: "categoryRightColumn", className: "md:col-span-3", coreComponents: [
|
|
23
22
|
{
|
|
24
23
|
component: {
|
|
25
|
-
default: (React.createElement(
|
|
26
|
-
React.createElement("div", null, _('${count} Products', {
|
|
27
|
-
count: category.products.total.toString()
|
|
28
|
-
})),
|
|
29
|
-
React.createElement(ProductSorting, { className: "flex justify-start" })))
|
|
24
|
+
default: (React.createElement(ProductSorting, { className: "flex justify-start", count: category.products.total }))
|
|
30
25
|
},
|
|
31
26
|
sortOrder: 10,
|
|
32
27
|
id: 'categoryProductsSorting'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryView.js","sourceRoot":"","sources":["../../../../../../src/modules/catalog/pages/frontStore/categoryView/CategoryView.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAC9C,OAAO,EAEL,gBAAgB,EACjB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8DAA8D,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;
|
|
1
|
+
{"version":3,"file":"CategoryView.js","sourceRoot":"","sources":["../../../../../../src/modules/catalog/pages/frontStore/categoryView/CategoryView.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAC9C,OAAO,EAEL,gBAAgB,EACjB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAClG,OAAO,EAAE,0BAA0B,EAAE,MAAM,8DAA8D,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAElF,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAqB;IAClE,OAAO,CACL,oBAAC,gBAAgB,IAAC,QAAQ,EAAE,QAAQ;QAClC,oBAAC,IAAI,IAAC,EAAE,EAAC,iBAAiB,EAAC,SAAS,EAAC,qBAAqB,GAAG;QAC7D,oBAAC,YAAY,OAAG;QAChB,6BAAK,SAAS,EAAC,kDAAkD;YAC/D,oBAAC,IAAI,IACH,EAAE,EAAC,oBAAoB,EACvB,SAAS,EAAC,eAAe,EACzB,cAAc,EAAE;oBACd;wBACE,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAC,sBAAsB,OAAG,EAAE;wBAClD,SAAS,EAAE,EAAE;wBACb,EAAE,EAAE,eAAe;qBACpB;iBACF,GACD;YACF,oBAAC,IAAI,IACH,EAAE,EAAC,qBAAqB,EACxB,SAAS,EAAC,eAAe,EACzB,cAAc,EAAE;oBACd;wBACE,SAAS,EAAE;4BACT,OAAO,EAAE,CACP,oBAAC,cAAc,IACb,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,KAAK,GAC9B,CACH;yBACF;wBACD,SAAS,EAAE,EAAE;wBACb,EAAE,EAAE,yBAAyB;qBAC9B;oBACD;wBACE,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAC,gBAAgB,OAAG,EAAE;wBAC5C,SAAS,EAAE,EAAE;wBACb,EAAE,EAAE,kBAAkB;qBACvB;oBACD;wBACE,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAC,0BAA0B,OAAG,EAAE;wBACtD,SAAS,EAAE,EAAE;wBACb,EAAE,EAAE,4BAA4B;qBACjC;iBACF,GACD,CACE;QACN,oBAAC,IAAI,IAAC,EAAE,EAAC,oBAAoB,EAAC,SAAS,EAAC,wBAAwB,GAAG,CAClD,CACpB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CnB,CAAC;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAwBxB,CAAC"}
|
|
@@ -36,7 +36,13 @@ export default function ProductView({ product }) {
|
|
|
36
36
|
id: 'productForm'
|
|
37
37
|
}
|
|
38
38
|
] })),
|
|
39
|
-
React.createElement(
|
|
39
|
+
React.createElement(Area, { id: "productSingleDescription", coreComponents: [
|
|
40
|
+
{
|
|
41
|
+
component: { default: React.createElement(ProductSingleDescription, null) },
|
|
42
|
+
sortOrder: 10,
|
|
43
|
+
id: 'productSingleDescription'
|
|
44
|
+
}
|
|
45
|
+
] })),
|
|
40
46
|
React.createElement(Area, { id: "productPageBottom", className: "product__page__bottom" }))));
|
|
41
47
|
}
|
|
42
48
|
export const layout = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductView.js","sourceRoot":"","sources":["../../../../../../src/modules/catalog/pages/frontStore/productView/ProductView.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAChE,OAAO,EAEL,eAAe,EAChB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,OAAO,EAAe;IAC1D,OAAO,CACL,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO;QAC/B,6BAAK,SAAS,EAAC,iBAAiB;YAC9B,oBAAC,IAAI,IAAC,EAAE,EAAC,gBAAgB,EAAC,SAAS,EAAC,oBAAoB,GAAG;YAC3D,6BAAK,SAAS,EAAC,kCAAkC;gBAC/C,6BAAK,SAAS,EAAC,uCAAuC;oBACpD,oBAAC,IAAI,IACH,EAAE,EAAC,uBAAuB,EAC1B,SAAS,EAAC,uBAAuB,EACjC,cAAc,EAAE;4BACd;gCACE,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAC,KAAK,OAAG,EAAE;gCACjC,SAAS,EAAE,CAAC;gCACZ,EAAE,EAAE,OAAO;6BACZ;yBACF,GACD;oBACF,oBAAC,IAAI,IACH,EAAE,EAAC,wBAAwB,EAC3B,SAAS,EAAC,wBAAwB,EAClC,cAAc,EAAE;4BACd;gCACE,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAC,iBAAiB,OAAG,EAAE;gCAC7C,SAAS,EAAE,EAAE;gCACb,EAAE,EAAE,MAAM;6BACX;4BACD;gCACE,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAC,uBAAuB,OAAG,EAAE;gCACnD,SAAS,EAAE,EAAE;gCACb,EAAE,EAAE,YAAY;6BACjB;4BACD;gCACE,SAAS,EAAE,EAAE,OAAO,EAAE,oBAAC,iBAAiB,OAAG,EAAE;gCAC7C,SAAS,EAAE,EAAE;gCACb,EAAE,EAAE,aAAa;6BAClB;yBACF,GACD,CACE;gBACN,oBAAC,wBAAwB,OAAG,
|
|
1
|
+
{"version":3,"file":"ProductView.js","sourceRoot":"","sources":["../../../../../../src/modules/catalog/pages/frontStore/productView/ProductView.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,4BAA4B,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAChE,OAAO,EAEL,eAAe,EAChB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2DAA2D,CAAC;AACpG,OAAO,EAAE,wBAAwB,EAAE,MAAM,4DAA4D,CAAC;AACtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,OAAO,EAAe;IAC1D,OAAO,CACL,oBAAC,eAAe,IAAC,OAAO,EAAE,OAAO;QAC/B,6BAAK,SAAS,EAAC,iBAAiB;YAC9B,oBAAC,IAA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,SAAS,EAAE,EAAE;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDnB,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PoolClient } from '@evershop/postgres-query-builder';
|
|
2
|
+
import type { AttributeRow } from '../../../../types/db/index.js';
|
|
1
3
|
export type AttributeData = {
|
|
2
4
|
attribute_code: string;
|
|
3
5
|
attribute_name: string;
|
|
@@ -5,12 +7,86 @@ export type AttributeData = {
|
|
|
5
7
|
is_required: boolean;
|
|
6
8
|
display_on_frontend?: boolean;
|
|
7
9
|
groups: number[];
|
|
8
|
-
|
|
10
|
+
options?: {
|
|
11
|
+
option_text: string;
|
|
12
|
+
option_id: string | number;
|
|
13
|
+
}[];
|
|
14
|
+
[key: string]: unknown;
|
|
9
15
|
};
|
|
10
16
|
/**
|
|
11
17
|
* Create attribute service. This service will create a attribute with all related data
|
|
12
18
|
* @param {Object} data
|
|
13
19
|
* @param {Object} context
|
|
14
20
|
*/
|
|
15
|
-
declare const _default: (data: AttributeData, context: Record<string, any>) => Promise<
|
|
21
|
+
declare const _default: (data: AttributeData, context: Record<string, any>) => Promise<AttributeRow & {
|
|
22
|
+
insertId: number;
|
|
23
|
+
}>;
|
|
16
24
|
export default _default;
|
|
25
|
+
export declare function hookBeforeInsertAttributeData(callback: (this: {
|
|
26
|
+
connection: PoolClient;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
}, ...args: [
|
|
29
|
+
data: AttributeData,
|
|
30
|
+
connection: PoolClient
|
|
31
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
32
|
+
export declare function hookAfterInsertAttributeData(callback: (this: {
|
|
33
|
+
connection: PoolClient;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}, ...args: [
|
|
36
|
+
data: AttributeData,
|
|
37
|
+
connection: PoolClient
|
|
38
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
39
|
+
export declare function hookBeforeInsertAttributeGroups(callback: (this: {
|
|
40
|
+
connection: PoolClient;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}, ...args: [
|
|
43
|
+
attributeId: number,
|
|
44
|
+
groups: number[],
|
|
45
|
+
connection: PoolClient
|
|
46
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
47
|
+
export declare function hookAfterInsertAttributeGroups(callback: (this: {
|
|
48
|
+
connection: PoolClient;
|
|
49
|
+
[key: string]: unknown;
|
|
50
|
+
}, ...args: [
|
|
51
|
+
attributeId: number,
|
|
52
|
+
groups: number[],
|
|
53
|
+
connection: PoolClient
|
|
54
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
55
|
+
export declare function hookBeforeInsertAttributeOptions(callback: (this: {
|
|
56
|
+
connection: PoolClient;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
}, ...args: [
|
|
59
|
+
attributeId: number,
|
|
60
|
+
attributeType: string,
|
|
61
|
+
attributeCode: string,
|
|
62
|
+
options: {
|
|
63
|
+
option_text: string;
|
|
64
|
+
}[],
|
|
65
|
+
connection: PoolClient
|
|
66
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
67
|
+
export declare function hookAfterInsertAttributeOptions(callback: (this: {
|
|
68
|
+
connection: PoolClient;
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
}, ...args: [
|
|
71
|
+
attributeId: number,
|
|
72
|
+
attributeType: string,
|
|
73
|
+
attributeCode: string,
|
|
74
|
+
options: {
|
|
75
|
+
option_text: string;
|
|
76
|
+
}[],
|
|
77
|
+
connection: PoolClient
|
|
78
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
79
|
+
export declare function hookBeforeCreateAttribute(callback: (this: {
|
|
80
|
+
connection: PoolClient;
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
}, ...args: [
|
|
83
|
+
data: AttributeData,
|
|
84
|
+
context: Record<string, any>
|
|
85
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
86
|
+
export declare function hookAfterCreateAttribute(callback: (this: {
|
|
87
|
+
connection: PoolClient;
|
|
88
|
+
[key: string]: unknown;
|
|
89
|
+
}, ...args: [
|
|
90
|
+
data: AttributeData,
|
|
91
|
+
context: Record<string, any>
|
|
92
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commit, insert, insertOnUpdate, rollback, select, startTransaction } from '@evershop/postgres-query-builder';
|
|
2
2
|
import { getConnection } from '../../../../lib/postgres/connection.js';
|
|
3
|
-
import { hookable } from '../../../../lib/util/hookable.js';
|
|
3
|
+
import { hookable, hookBefore, hookAfter } from '../../../../lib/util/hookable.js';
|
|
4
4
|
import { getValue, getValueSync } from '../../../../lib/util/registry.js';
|
|
5
5
|
import { getAjv } from '../../../base/services/getAjv.js';
|
|
6
6
|
import attributeDataSchema from './attributeDataSchema.json' with { type: 'json' };
|
|
@@ -112,4 +112,28 @@ export default async (data, context) => {
|
|
|
112
112
|
const attribute = await hookable(createAttribute, context)(data, context);
|
|
113
113
|
return attribute;
|
|
114
114
|
};
|
|
115
|
+
export function hookBeforeInsertAttributeData(callback, priority = 10) {
|
|
116
|
+
hookBefore('insertAttributeData', callback, priority);
|
|
117
|
+
}
|
|
118
|
+
export function hookAfterInsertAttributeData(callback, priority = 10) {
|
|
119
|
+
hookAfter('insertAttributeData', callback, priority);
|
|
120
|
+
}
|
|
121
|
+
export function hookBeforeInsertAttributeGroups(callback, priority = 10) {
|
|
122
|
+
hookBefore('insertAttributeGroups', callback, priority);
|
|
123
|
+
}
|
|
124
|
+
export function hookAfterInsertAttributeGroups(callback, priority = 10) {
|
|
125
|
+
hookAfter('insertAttributeGroups', callback, priority);
|
|
126
|
+
}
|
|
127
|
+
export function hookBeforeInsertAttributeOptions(callback, priority = 10) {
|
|
128
|
+
hookBefore('insertAttributeOptions', callback, priority);
|
|
129
|
+
}
|
|
130
|
+
export function hookAfterInsertAttributeOptions(callback, priority = 10) {
|
|
131
|
+
hookAfter('insertAttributeOptions', callback, priority);
|
|
132
|
+
}
|
|
133
|
+
export function hookBeforeCreateAttribute(callback, priority = 10) {
|
|
134
|
+
hookBefore('createAttribute', callback, priority);
|
|
135
|
+
}
|
|
136
|
+
export function hookAfterCreateAttribute(callback, priority = 10) {
|
|
137
|
+
hookAfter('createAttribute', callback, priority);
|
|
138
|
+
}
|
|
115
139
|
//# sourceMappingURL=createProductAttribute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProductAttribute.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/attribute/createProductAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,cAAc,EACd,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"createProductAttribute.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/attribute/createProductAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,MAAM,EACN,cAAc,EACd,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EACL,QAAQ,EACR,YAAY,EACb,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,mBAAmB,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAanF,SAAS,iCAAiC,CAAC,IAAmB;IAC5D,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IAC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AAS,CAAC,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,QAUyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,QAUyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,QAYyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,wBAAwB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,QAYyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,QASyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,QASyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import type { PoolClient } from '@evershop/postgres-query-builder';
|
|
2
|
+
import type { AttributeRow } from '../../../../types/db/index.js';
|
|
1
3
|
/**
|
|
2
4
|
* Delete attribute service. This service will delete an attribute with all related data
|
|
3
5
|
* @param {String} uuid
|
|
4
6
|
* @param {Object} context
|
|
5
7
|
*/
|
|
6
|
-
declare const _default: (uuid: string, context: Record<string, any>) => Promise<
|
|
8
|
+
declare const _default: (uuid: string, context: Record<string, any>) => Promise<AttributeRow>;
|
|
7
9
|
export default _default;
|
|
10
|
+
export declare function hookBeforeDeleteAttributeData(callback: (this: Record<string, any>, ...args: [uuid: string, connection: PoolClient]) => void | Promise<void>, priority?: number): void;
|
|
11
|
+
export declare function hookAfterDeleteAttributeData(callback: (this: Record<string, any>, ...args: [uuid: string, connection: PoolClient]) => void | Promise<void>, priority?: number): void;
|
|
12
|
+
export declare function hookBeforeDeleteAttribute(callback: (this: Record<string, any>, ...args: [uuid: string, context: Record<string, any>]) => void | Promise<void>, priority?: number): void;
|
|
13
|
+
export declare function hookAfterDeleteAttribute(callback: (this: Record<string, any>, ...args: [uuid: string, context: Record<string, any>]) => void | Promise<void>, priority?: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commit, del, rollback, select, startTransaction } from '@evershop/postgres-query-builder';
|
|
2
2
|
import { getConnection } from '../../../../lib/postgres/connection.js';
|
|
3
|
-
import { hookable } from '../../../../lib/util/hookable.js';
|
|
3
|
+
import { hookable, hookBefore, hookAfter } from '../../../../lib/util/hookable.js';
|
|
4
4
|
async function deleteAttributeData(uuid, connection) {
|
|
5
5
|
await del('attribute').where('uuid', '=', uuid).execute(connection);
|
|
6
6
|
}
|
|
@@ -54,4 +54,16 @@ export default async (uuid, context) => {
|
|
|
54
54
|
const attribute = await hookable(deleteAttribute, context)(uuid, context);
|
|
55
55
|
return attribute;
|
|
56
56
|
};
|
|
57
|
+
export function hookBeforeDeleteAttributeData(callback, priority = 10) {
|
|
58
|
+
hookBefore('deleteAttributeData', callback, priority);
|
|
59
|
+
}
|
|
60
|
+
export function hookAfterDeleteAttributeData(callback, priority = 10) {
|
|
61
|
+
hookAfter('deleteAttributeData', callback, priority);
|
|
62
|
+
}
|
|
63
|
+
export function hookBeforeDeleteAttribute(callback, priority = 10) {
|
|
64
|
+
hookBefore('deleteAttribute', callback, priority);
|
|
65
|
+
}
|
|
66
|
+
export function hookAfterDeleteAttribute(callback, priority = 10) {
|
|
67
|
+
hookAfter('deleteAttribute', callback, priority);
|
|
68
|
+
}
|
|
57
69
|
//# sourceMappingURL=deleteProductAttribute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteProductAttribute.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/attribute/deleteProductAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,GAAG,EACH,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"deleteProductAttribute.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/attribute/deleteProductAttribute.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,GAAG,EACH,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACV,MAAM,kCAAkC,CAAC;AAG1C,KAAK,UAAU,mBAAmB,CAChC,IAAY,EACZ,UAAsB;IAEtB,MAAM,GAAG,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACtE,CAAC;AACD;;;;GAIG;AACH,KAAK,UAAU,eAAe,CAC5B,IAAY,EACZ,OAA4B;IAE5B,MAAM,UAAU,GAAG,MAAM,aAAa,EAAE,CAAC;IACzC,MAAM,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,MAAM,MAAM,EAAE;aAC7B,IAAI,CAAC,WAAW,CAAC;aACjB,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC;aACxB,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpB,IAAI,CAAC,SAAS,EAAE,CA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OAAO,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1E,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,UAAU,6BAA6B,CAC3C,QAGyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,QAGyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,QAGyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,QAGyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PoolClient } from '@evershop/postgres-query-builder';
|
|
2
|
+
import type { AttributeRow } from '../../../../types/db/index.js';
|
|
1
3
|
export type AttributeData = {
|
|
2
4
|
attribute_code?: string;
|
|
3
5
|
type?: string;
|
|
@@ -6,7 +8,7 @@ export type AttributeData = {
|
|
|
6
8
|
option_text: string;
|
|
7
9
|
option_id: string | number;
|
|
8
10
|
}[];
|
|
9
|
-
[key: string]:
|
|
11
|
+
[key: string]: unknown;
|
|
10
12
|
};
|
|
11
13
|
/**
|
|
12
14
|
* Update attribute service. This service will update a attribute with all related data
|
|
@@ -14,5 +16,57 @@ export type AttributeData = {
|
|
|
14
16
|
* @param {Object} data
|
|
15
17
|
* @param {Object} context
|
|
16
18
|
*/
|
|
17
|
-
declare const _default: (uuid: string, data: AttributeData, context: Record<string, any>) => Promise<
|
|
19
|
+
declare const _default: (uuid: string, data: AttributeData, context: Record<string, any>) => Promise<AttributeRow & {
|
|
20
|
+
updatedId?: number;
|
|
21
|
+
}>;
|
|
18
22
|
export default _default;
|
|
23
|
+
export declare function hookBeforeUpdateAttributeData(callback: (this: Record<string, any>, ...args: [
|
|
24
|
+
uuid: string,
|
|
25
|
+
data: AttributeData,
|
|
26
|
+
connection: PoolClient
|
|
27
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
28
|
+
export declare function hookAfterUpdateAttributeData(callback: (this: Record<string, any>, ...args: [
|
|
29
|
+
uuid: string,
|
|
30
|
+
data: AttributeData,
|
|
31
|
+
connection: PoolClient
|
|
32
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
33
|
+
export declare function hookBeforeUpdateAttributeGroups(callback: (this: Record<string, any>, ...args: [
|
|
34
|
+
attributeId: number,
|
|
35
|
+
groups: number[],
|
|
36
|
+
connection: PoolClient
|
|
37
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
38
|
+
export declare function hookAfterUpdateAttributeGroups(callback: (this: Record<string, any>, ...args: [
|
|
39
|
+
attributeId: number,
|
|
40
|
+
groups: number[],
|
|
41
|
+
connection: PoolClient
|
|
42
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
43
|
+
export declare function hookBeforeUpdateAttributeOptions(callback: (this: Record<string, any>, ...args: [
|
|
44
|
+
attributeId: number,
|
|
45
|
+
attributeType: string,
|
|
46
|
+
attributeCode: string,
|
|
47
|
+
options: {
|
|
48
|
+
option_text: string;
|
|
49
|
+
option_id: string | number;
|
|
50
|
+
}[],
|
|
51
|
+
connection: PoolClient
|
|
52
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
53
|
+
export declare function hookAfterUpdateAttributeOptions(callback: (this: Record<string, any>, ...args: [
|
|
54
|
+
attributeId: number,
|
|
55
|
+
attributeType: string,
|
|
56
|
+
attributeCode: string,
|
|
57
|
+
options: {
|
|
58
|
+
option_text: string;
|
|
59
|
+
option_id: string | number;
|
|
60
|
+
}[],
|
|
61
|
+
connection: PoolClient
|
|
62
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
63
|
+
export declare function hookBeforeUpdateAttribute(callback: (this: Record<string, any>, ...args: [
|
|
64
|
+
uuid: string,
|
|
65
|
+
data: AttributeData,
|
|
66
|
+
context: Record<string, any>
|
|
67
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
68
|
+
export declare function hookAfterUpdateAttribute(callback: (this: Record<string, any>, ...args: [
|
|
69
|
+
uuid: string,
|
|
70
|
+
data: AttributeData,
|
|
71
|
+
context: Record<string, any>
|
|
72
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { startTransaction, commit, rollback, update, select, insertOnUpdate, del, insert } from '@evershop/postgres-query-builder';
|
|
2
2
|
import { getConnection } from '../../../../lib/postgres/connection.js';
|
|
3
|
-
import { hookable } from '../../../../lib/util/hookable.js';
|
|
3
|
+
import { hookable, hookBefore, hookAfter } from '../../../../lib/util/hookable.js';
|
|
4
4
|
import { getValueSync, getValue } from '../../../../lib/util/registry.js';
|
|
5
5
|
import { getAjv } from '../../../base/services/getAjv.js';
|
|
6
6
|
import attributeDataSchema from './attributeDataSchema.json' with { type: 'json' };
|
|
@@ -105,20 +105,18 @@ async function updateAttributeData(uuid, data, connection) {
|
|
|
105
105
|
throw new Error('Requested attribute not found');
|
|
106
106
|
}
|
|
107
107
|
try {
|
|
108
|
-
const
|
|
108
|
+
const updatedAttribute = await update('attribute')
|
|
109
109
|
.given(data)
|
|
110
110
|
.where('uuid', '=', uuid)
|
|
111
111
|
.execute(connection);
|
|
112
|
-
|
|
112
|
+
Object.assign(attribute, updatedAttribute);
|
|
113
113
|
}
|
|
114
114
|
catch (e) {
|
|
115
115
|
if (!e.message.includes('No data was provided')) {
|
|
116
116
|
throw e;
|
|
117
117
|
}
|
|
118
|
-
else {
|
|
119
|
-
return attribute;
|
|
120
|
-
}
|
|
121
118
|
}
|
|
119
|
+
return attribute;
|
|
122
120
|
}
|
|
123
121
|
/**
|
|
124
122
|
* Update attribute service. This service will update a attribute with all related data
|
|
@@ -175,4 +173,28 @@ export default async (uuid, data, context) => {
|
|
|
175
173
|
const attribute = await hookable(updateAttribute, context)(uuid, data, context);
|
|
176
174
|
return attribute;
|
|
177
175
|
};
|
|
176
|
+
export function hookBeforeUpdateAttributeData(callback, priority = 10) {
|
|
177
|
+
hookBefore('updateAttributeData', callback, priority);
|
|
178
|
+
}
|
|
179
|
+
export function hookAfterUpdateAttributeData(callback, priority = 10) {
|
|
180
|
+
hookAfter('updateAttributeData', callback, priority);
|
|
181
|
+
}
|
|
182
|
+
export function hookBeforeUpdateAttributeGroups(callback, priority = 10) {
|
|
183
|
+
hookBefore('updateAttributeGroups', callback, priority);
|
|
184
|
+
}
|
|
185
|
+
export function hookAfterUpdateAttributeGroups(callback, priority = 10) {
|
|
186
|
+
hookAfter('updateAttributeGroups', callback, priority);
|
|
187
|
+
}
|
|
188
|
+
export function hookBeforeUpdateAttributeOptions(callback, priority = 10) {
|
|
189
|
+
hookBefore('updateAttributeOptions', callback, priority);
|
|
190
|
+
}
|
|
191
|
+
export function hookAfterUpdateAttributeOptions(callback, priority = 10) {
|
|
192
|
+
hookAfter('updateAttributeOptions', callback, priority);
|
|
193
|
+
}
|
|
194
|
+
export function hookBeforeUpdateAttribute(callback, priority = 10) {
|
|
195
|
+
hookBefore('updateAttribute', callback, priority);
|
|
196
|
+
}
|
|
197
|
+
export function hookAfterUpdateAttribute(callback, priority = 10) {
|
|
198
|
+
hookAfter('updateAttribute', callback, priority);
|
|
199
|
+
}
|
|
178
200
|
//# sourceMappingURL=updateProductAttribute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateProductAttribute.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/attribute/updateProductAttribute.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,cAAc,EACd,GAAG,EACH,MAAM,EACP,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"updateProductAttribute.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/attribute/updateProductAttribute.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,cAAc,EACd,GAAG,EACH,MAAM,EACP,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE1E,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1D,OAAO,mBAAmB,MAAM,4BAA4B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAUnF,SAAS,iCAAiC,CAAC,IAAmB;IAC5D,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,mBAAmB,CAAC,QAAQ,GAAG,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,YAAY,CAC7B,+BAA+B,EAC/B,mBAAmB,EACnB,EAAE,CACH,CAAC;IACF,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC;AAED,KAAK,UAAU,sBAAsB,CACnC,W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AC7C,QAOyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,QAOyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,uBAAuB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,QASyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,wBAAwB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,QASyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,QAOyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,QAOyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,12 +1,38 @@
|
|
|
1
|
+
import { Row } from '@components/common/form/Editor.js';
|
|
2
|
+
import type { PoolClient } from '@evershop/postgres-query-builder';
|
|
3
|
+
import type { CategoryDescriptionRow, CategoryRow } from '../../../../types/db/index.js';
|
|
1
4
|
export type CategoryData = {
|
|
2
5
|
name: string;
|
|
3
6
|
url_key: string;
|
|
4
|
-
[
|
|
7
|
+
description?: Row[];
|
|
8
|
+
[key: string]: unknown;
|
|
5
9
|
};
|
|
6
10
|
/**
|
|
7
11
|
* Create category service. This service will create a category with all related data
|
|
8
12
|
* @param {Object} data
|
|
9
13
|
* @param {Object} context
|
|
10
14
|
*/
|
|
11
|
-
declare const _default: (data: CategoryData, context: Record<string, any>) => Promise<
|
|
15
|
+
declare const _default: (data: CategoryData, context: Record<string, any>) => Promise<CategoryRow & CategoryDescriptionRow & {
|
|
16
|
+
insertId: number;
|
|
17
|
+
}>;
|
|
12
18
|
export default _default;
|
|
19
|
+
export declare function hookBeforeInsertCategoryData(callback: (this: Record<string, any>, ...args: [
|
|
20
|
+
data: CategoryData & {
|
|
21
|
+
parent_id?: number;
|
|
22
|
+
},
|
|
23
|
+
connection: PoolClient
|
|
24
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
25
|
+
export declare function hookAfterInsertCategoryData(callback: (this: Record<string, any>, ...args: [
|
|
26
|
+
data: CategoryData & {
|
|
27
|
+
parent_id?: number;
|
|
28
|
+
},
|
|
29
|
+
connection: PoolClient
|
|
30
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
31
|
+
export declare function hookBeforeCreateCategory(callback: (this: Record<string, any>, ...args: [
|
|
32
|
+
data: CategoryData,
|
|
33
|
+
context: Record<string, any>
|
|
34
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
35
|
+
export declare function hookAfterCreateCategory(callback: (this: Record<string, any>, ...args: [
|
|
36
|
+
data: CategoryData,
|
|
37
|
+
context: Record<string, any>
|
|
38
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { commit, insert, rollback, select, startTransaction } from '@evershop/postgres-query-builder';
|
|
2
2
|
import { getConnection } from '../../../../lib/postgres/connection.js';
|
|
3
|
-
import { hookable } from '../../../../lib/util/hookable.js';
|
|
3
|
+
import { hookable, hookBefore, hookAfter } from '../../../../lib/util/hookable.js';
|
|
4
4
|
import { getValue, getValueSync } from '../../../../lib/util/registry.js';
|
|
5
|
+
import { sanitizeRawHtml } from '../../../../lib/util/sanitizeHtml.js';
|
|
5
6
|
import { getAjv } from '../../../base/services/getAjv.js';
|
|
6
7
|
import categoryDataSchema from './categoryDataSchema.json' with { type: 'json' };
|
|
7
8
|
function validateCategoryDataBeforeInsert(data) {
|
|
@@ -51,6 +52,10 @@ async function createCategory(data, context) {
|
|
|
51
52
|
const categoryData = await getValue('categoryDataBeforeCreate', data);
|
|
52
53
|
// Validate category data
|
|
53
54
|
validateCategoryDataBeforeInsert(categoryData);
|
|
55
|
+
// Sanitize raw HTML blocks in EditorJS content
|
|
56
|
+
if (categoryData.description) {
|
|
57
|
+
sanitizeRawHtml(categoryData.description);
|
|
58
|
+
}
|
|
54
59
|
// Insert category data
|
|
55
60
|
const category = await hookable(insertCategoryData, context)(categoryData, connection);
|
|
56
61
|
await commit(connection);
|
|
@@ -74,4 +79,16 @@ export default async (data, context) => {
|
|
|
74
79
|
const category = await hookable(createCategory, context)(data, context);
|
|
75
80
|
return category;
|
|
76
81
|
};
|
|
82
|
+
export function hookBeforeInsertCategoryData(callback, priority = 10) {
|
|
83
|
+
hookBefore('insertCategoryData', callback, priority);
|
|
84
|
+
}
|
|
85
|
+
export function hookAfterInsertCategoryData(callback, priority = 10) {
|
|
86
|
+
hookAfter('insertCategoryData', callback, priority);
|
|
87
|
+
}
|
|
88
|
+
export function hookBeforeCreateCategory(callback, priority = 10) {
|
|
89
|
+
hookBefore('createCategory', callback, priority);
|
|
90
|
+
}
|
|
91
|
+
export function hookAfterCreateCategory(callback, priority = 10) {
|
|
92
|
+
hookAfter('createCategory', callback, priority);
|
|
93
|
+
}
|
|
77
94
|
//# sourceMappingURL=createCategory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCategory.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/category/createCategory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createCategory.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/category/createCategory.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAA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EAAwE,EAAE;IAC9I,+DAA+D;IAC/D,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACxE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,UAAU,4BAA4B,CAC1C,QAMyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,oBAAoB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,QAMyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,oBAAoB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,QAMyB,EACzB,WAAmB,EAAE;IAErB,UAAU,CAAC,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,QAMyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import type { PoolClient } from '@evershop/postgres-query-builder';
|
|
2
|
+
import type { CategoryDescriptionRow, CategoryRow } from '../../../../types/db/index.js';
|
|
1
3
|
/**
|
|
2
4
|
* Delete category service. This service will delete a category with all related data
|
|
3
5
|
* @param {String} uuid
|
|
4
6
|
* @param {Object} context
|
|
5
7
|
*/
|
|
6
|
-
declare const _default: (uuid: string, context: Record<string, any>) => Promise<
|
|
8
|
+
declare const _default: (uuid: string, context: Record<string, any>) => Promise<CategoryRow & CategoryDescriptionRow>;
|
|
7
9
|
export default _default;
|
|
10
|
+
export declare function hookBeforeDeleteCategoryData(callback: (this: Record<string, any>, ...args: [uuid: string, connection: PoolClient]) => void | Promise<void>, priority?: number): void;
|
|
11
|
+
export declare function hookAfterDeleteCategoryData(callback: (this: Record<string, any>, ...args: [uuid: string, connection: PoolClient]) => void | Promise<void>, priority?: number): void;
|
|
12
|
+
export declare function hookBeforeDeleteCategory(callback: (this: Record<string, any>, ...args: [uuid: string, context: Record<string, any>]) => void | Promise<void>, priority?: number): void;
|
|
13
|
+
export declare function hookAfterDeleteCategory(callback: (this: Record<string, any>, ...args: [uuid: string, context: Record<string, any>]) => void | Promise<void>, priority?: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commit, del, rollback, select, startTransaction } from '@evershop/postgres-query-builder';
|
|
2
2
|
import { getConnection } from '../../../../lib/postgres/connection.js';
|
|
3
|
-
import { hookable } from '../../../../lib/util/hookable.js';
|
|
3
|
+
import { hookable, hookBefore, hookAfter } from '../../../../lib/util/hookable.js';
|
|
4
4
|
async function deleteCategoryData(uuid, connection) {
|
|
5
5
|
await del('category').where('uuid', '=', uuid).execute(connection);
|
|
6
6
|
}
|
|
@@ -43,4 +43,16 @@ export default async (uuid, context) => {
|
|
|
43
43
|
const category = await hookable(deleteCategory, context)(uuid, context);
|
|
44
44
|
return category;
|
|
45
45
|
};
|
|
46
|
+
export function hookBeforeDeleteCategoryData(callback, priority = 10) {
|
|
47
|
+
hookBefore('deleteCategoryData', callback, priority);
|
|
48
|
+
}
|
|
49
|
+
export function hookAfterDeleteCategoryData(callback, priority = 10) {
|
|
50
|
+
hookAfter('deleteCategoryData', callback, priority);
|
|
51
|
+
}
|
|
52
|
+
export function hookBeforeDeleteCategory(callback, priority = 10) {
|
|
53
|
+
hookBefore('deleteCategory', callback, priority);
|
|
54
|
+
}
|
|
55
|
+
export function hookAfterDeleteCategory(callback, priority = 10) {
|
|
56
|
+
hookAfter('deleteCategory', callback, priority);
|
|
57
|
+
}
|
|
46
58
|
//# sourceMappingURL=deleteCategory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteCategory.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/category/deleteCategory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,GAAG,EACH,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"deleteCategory.js","sourceRoot":"","sources":["../../../../../src/modules/catalog/services/category/deleteCategory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,GAAG,EACH,QAAQ,EACR,MAAM,EACN,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EACL,QAAQ,EACR,UAAU,EACV,SAAS,EACV,MAAM,kCAAkC,CAAC;AAM1C,KAAK,UAAU,kBAAkB,CAC/B,IAAY,EACZ,UAAsB;IAEtB,MAAM,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACrE,CAAC;AACD;;;;GAIG;AACH,KAAK,UAAU,cAAc,CAC3B,IAAY,EACZ,OAA4B;IAE5B,MAAM,UAAU,GAAG,MAAM,aAAa,EAAE,CAAC;IACzC,MAAM,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACnC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxC,KAAK;aACF,QAAQ,CAAC,sBAAsB,CAAC;aAChC,EAAE,CACD,uDAAuD,EACvD,GAAG,EACH,sBAAsB,CACvB,CAAC;QAEJ,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,GA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AAC;AACnD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,QAGyB,EACzB,WAAmB,EAAE;IAErB,SAAS,CAAC,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { PoolClient } from '@evershop/postgres-query-builder';
|
|
2
|
+
import type { CategoryDescriptionRow, CategoryRow } from '../../../../types/db/index.js';
|
|
1
3
|
import { CategoryData } from './createCategory.js';
|
|
2
4
|
/**
|
|
3
5
|
* Update category service. This service will update a category with all related data
|
|
@@ -5,5 +7,27 @@ import { CategoryData } from './createCategory.js';
|
|
|
5
7
|
* @param {Object} data
|
|
6
8
|
* @param {Object} context
|
|
7
9
|
*/
|
|
8
|
-
declare const _default: (uuid: string, data: CategoryData, context: Record<string, any>) => Promise<
|
|
10
|
+
declare const _default: (uuid: string, data: CategoryData, context: Record<string, any>) => Promise<CategoryRow & CategoryDescriptionRow & {
|
|
11
|
+
updatedId?: number;
|
|
12
|
+
}>;
|
|
9
13
|
export default _default;
|
|
14
|
+
export declare function hookBeforeUpdateCategoryData(callback: (this: Record<string, any>, ...args: [
|
|
15
|
+
uuid: string,
|
|
16
|
+
data: CategoryData,
|
|
17
|
+
connection: PoolClient
|
|
18
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
19
|
+
export declare function hookAfterUpdateCategoryData(callback: (this: Record<string, any>, ...args: [
|
|
20
|
+
uuid: string,
|
|
21
|
+
data: CategoryData,
|
|
22
|
+
connection: PoolClient
|
|
23
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
24
|
+
export declare function hookBeforeUpdateCategory(callback: (this: Record<string, any>, ...args: [
|
|
25
|
+
uuid: string,
|
|
26
|
+
data: CategoryData,
|
|
27
|
+
context: Record<string, any>
|
|
28
|
+
]) => void | Promise<void>, priority?: number): void;
|
|
29
|
+
export declare function hookAfterUpdateCategory(callback: (this: Record<string, any>, ...args: [
|
|
30
|
+
uuid: string,
|
|
31
|
+
data: CategoryData,
|
|
32
|
+
context: Record<string, any>
|
|
33
|
+
]) => void | Promise<void>, priority?: number): void;
|