@axelor/aos-mobile-sale 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -0
- package/lib/api/cart-api.d.ts +24 -0
- package/lib/api/cart-api.js +107 -0
- package/lib/api/cart-api.js.map +1 -0
- package/lib/api/cart-line-api.d.ts +22 -0
- package/lib/api/cart-line-api.js +95 -0
- package/lib/api/cart-line-api.js.map +1 -0
- package/lib/api/complementary-product-api.d.ts +5 -0
- package/lib/api/complementary-product-api.js +39 -0
- package/lib/api/complementary-product-api.js.map +1 -0
- package/lib/api/customer-api.d.ts +15 -0
- package/lib/api/customer-api.js +100 -0
- package/lib/api/customer-api.js.map +1 -0
- package/lib/api/customer-delivery-api.d.ts +3 -0
- package/lib/api/customer-delivery-api.js +33 -0
- package/lib/api/customer-delivery-api.js.map +1 -0
- package/lib/api/index.d.ts +10 -0
- package/lib/api/index.js +28 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/price-list-line-api.d.ts +8 -0
- package/lib/api/price-list-line-api.js +61 -0
- package/lib/api/price-list-line-api.js.map +1 -0
- package/lib/api/product-api.d.ts +34 -0
- package/lib/api/product-api.js +204 -0
- package/lib/api/product-api.js.map +1 -0
- package/lib/api/sale-config-api.d.ts +3 -0
- package/lib/api/sale-config-api.js +38 -0
- package/lib/api/sale-config-api.js.map +1 -0
- package/lib/api/sale-order-api.d.ts +18 -0
- package/lib/api/sale-order-api.js +97 -0
- package/lib/api/sale-order-api.js.map +1 -0
- package/lib/api/sale-order-line-api.d.ts +7 -0
- package/lib/api/sale-order-line-api.js +46 -0
- package/lib/api/sale-order-line-api.js.map +1 -0
- package/lib/components/atoms/CartLineCard/CartLineCard.d.ts +12 -0
- package/lib/components/atoms/CartLineCard/CartLineCard.js +76 -0
- package/lib/components/atoms/CartLineCard/CartLineCard.js.map +1 -0
- package/lib/components/atoms/ClientCard/ClientCard.d.ts +13 -0
- package/lib/components/atoms/ClientCard/ClientCard.js +72 -0
- package/lib/components/atoms/ClientCard/ClientCard.js.map +1 -0
- package/lib/components/atoms/ComplementaryProductCard/ComplementaryProductCard.d.ts +13 -0
- package/lib/components/atoms/ComplementaryProductCard/ComplementaryProductCard.js +81 -0
- package/lib/components/atoms/ComplementaryProductCard/ComplementaryProductCard.js.map +1 -0
- package/lib/components/atoms/DropdownDescriptionsView/DropdownDescriptionsView.d.ts +7 -0
- package/lib/components/atoms/DropdownDescriptionsView/DropdownDescriptionsView.js +39 -0
- package/lib/components/atoms/DropdownDescriptionsView/DropdownDescriptionsView.js.map +1 -0
- package/lib/components/atoms/DropdownFollowUpView/DropdownFollowUpView.d.ts +13 -0
- package/lib/components/atoms/DropdownFollowUpView/DropdownFollowUpView.js +54 -0
- package/lib/components/atoms/DropdownFollowUpView/DropdownFollowUpView.js.map +1 -0
- package/lib/components/atoms/DropdownGeneralView/AdressLine.d.ts +6 -0
- package/lib/components/atoms/DropdownGeneralView/AdressLine.js +51 -0
- package/lib/components/atoms/DropdownGeneralView/AdressLine.js.map +1 -0
- package/lib/components/atoms/DropdownGeneralView/DropdownGeneralView.d.ts +15 -0
- package/lib/components/atoms/DropdownGeneralView/DropdownGeneralView.js +39 -0
- package/lib/components/atoms/DropdownGeneralView/DropdownGeneralView.js.map +1 -0
- package/lib/components/atoms/DropdownMarginView/DropdownMarginView.d.ts +10 -0
- package/lib/components/atoms/DropdownMarginView/DropdownMarginView.js +41 -0
- package/lib/components/atoms/DropdownMarginView/DropdownMarginView.js.map +1 -0
- package/lib/components/atoms/DropdownSOLConfigurationView/DropdownSOLConfigurationView.d.ts +7 -0
- package/lib/components/atoms/DropdownSOLConfigurationView/DropdownSOLConfigurationView.js +32 -0
- package/lib/components/atoms/DropdownSOLConfigurationView/DropdownSOLConfigurationView.js.map +1 -0
- package/lib/components/atoms/DropdownSOLMarginView/DropdownSOLMarginView.d.ts +9 -0
- package/lib/components/atoms/DropdownSOLMarginView/DropdownSOLMarginView.js +33 -0
- package/lib/components/atoms/DropdownSOLMarginView/DropdownSOLMarginView.js.map +1 -0
- package/lib/components/atoms/PartnerCard/PartnerCard.d.ts +12 -0
- package/lib/components/atoms/PartnerCard/PartnerCard.js +72 -0
- package/lib/components/atoms/PartnerCard/PartnerCard.js.map +1 -0
- package/lib/components/atoms/PriceDetails/PriceDetails.d.ts +15 -0
- package/lib/components/atoms/PriceDetails/PriceDetails.js +58 -0
- package/lib/components/atoms/PriceDetails/PriceDetails.js.map +1 -0
- package/lib/components/atoms/PriceListCard/PriceListCard.d.ts +17 -0
- package/lib/components/atoms/PriceListCard/PriceListCard.js +128 -0
- package/lib/components/atoms/PriceListCard/PriceListCard.js.map +1 -0
- package/lib/components/atoms/ProductCard/ProductCard.d.ts +17 -0
- package/lib/components/atoms/ProductCard/ProductCard.js +87 -0
- package/lib/components/atoms/ProductCard/ProductCard.js.map +1 -0
- package/lib/components/atoms/SaleOrderBottomButton/SaleOrderBottomButton.d.ts +6 -0
- package/lib/components/atoms/SaleOrderBottomButton/SaleOrderBottomButton.js +54 -0
- package/lib/components/atoms/SaleOrderBottomButton/SaleOrderBottomButton.js.map +1 -0
- package/lib/components/atoms/SaleOrderCard/SaleOrderCard.d.ts +20 -0
- package/lib/components/atoms/SaleOrderCard/SaleOrderCard.js +129 -0
- package/lib/components/atoms/SaleOrderCard/SaleOrderCard.js.map +1 -0
- package/lib/components/atoms/SaleOrderCard/SaleOrderCardTitle.d.ts +7 -0
- package/lib/components/atoms/SaleOrderCard/SaleOrderCardTitle.js +39 -0
- package/lib/components/atoms/SaleOrderCard/SaleOrderCardTitle.js.map +1 -0
- package/lib/components/atoms/SaleOrderLineCard/SaleOrderLineCard.d.ts +19 -0
- package/lib/components/atoms/SaleOrderLineCard/SaleOrderLineCard.js +137 -0
- package/lib/components/atoms/SaleOrderLineCard/SaleOrderLineCard.js.map +1 -0
- package/lib/components/atoms/SaleOrderSeeLinesButton/SaleOrderSeeLinesButton.d.ts +6 -0
- package/lib/components/atoms/SaleOrderSeeLinesButton/SaleOrderSeeLinesButton.js +66 -0
- package/lib/components/atoms/SaleOrderSeeLinesButton/SaleOrderSeeLinesButton.js.map +1 -0
- package/lib/components/atoms/StateBadge/StateBadge.d.ts +8 -0
- package/lib/components/atoms/StateBadge/StateBadge.js +53 -0
- package/lib/components/atoms/StateBadge/StateBadge.js.map +1 -0
- package/lib/components/atoms/TaxModeBadge/TaxModeBadge.d.ts +7 -0
- package/lib/components/atoms/TaxModeBadge/TaxModeBadge.js +32 -0
- package/lib/components/atoms/TaxModeBadge/TaxModeBadge.js.map +1 -0
- package/lib/components/atoms/VariantPopup/VariantPopup.d.ts +10 -0
- package/lib/components/atoms/VariantPopup/VariantPopup.js +113 -0
- package/lib/components/atoms/VariantPopup/VariantPopup.js.map +1 -0
- package/lib/components/atoms/index.d.ts +20 -0
- package/lib/components/atoms/index.js +38 -0
- package/lib/components/atoms/index.js.map +1 -0
- package/lib/components/index.d.ts +5 -0
- package/lib/components/index.js +23 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/molecules/CartHeader/CartHeader.d.ts +6 -0
- package/lib/components/molecules/CartHeader/CartHeader.js +82 -0
- package/lib/components/molecules/CartHeader/CartHeader.js.map +1 -0
- package/lib/components/molecules/CartLineActionCard/CartLineActionCard.d.ts +11 -0
- package/lib/components/molecules/CartLineActionCard/CartLineActionCard.js +103 -0
- package/lib/components/molecules/CartLineActionCard/CartLineActionCard.js.map +1 -0
- package/lib/components/molecules/CartLinePriceDetails/CartLinePriceDetails.d.ts +8 -0
- package/lib/components/molecules/CartLinePriceDetails/CartLinePriceDetails.js +49 -0
- package/lib/components/molecules/CartLinePriceDetails/CartLinePriceDetails.js.map +1 -0
- package/lib/components/molecules/CartLineValidationButton/CartLineValidationButton.d.ts +8 -0
- package/lib/components/molecules/CartLineValidationButton/CartLineValidationButton.js +73 -0
- package/lib/components/molecules/CartLineValidationButton/CartLineValidationButton.js.map +1 -0
- package/lib/components/molecules/CatalogActionCard/CatalogActionCard.d.ts +7 -0
- package/lib/components/molecules/CatalogActionCard/CatalogActionCard.js +52 -0
- package/lib/components/molecules/CatalogActionCard/CatalogActionCard.js.map +1 -0
- package/lib/components/molecules/ClientActionCard/ClientActionCard.d.ts +8 -0
- package/lib/components/molecules/ClientActionCard/ClientActionCard.js +44 -0
- package/lib/components/molecules/ClientActionCard/ClientActionCard.js.map +1 -0
- package/lib/components/molecules/ClientHeader/ClientHeader.d.ts +7 -0
- package/lib/components/molecules/ClientHeader/ClientHeader.js +53 -0
- package/lib/components/molecules/ClientHeader/ClientHeader.js.map +1 -0
- package/lib/components/molecules/DropdownMultipleQuantities/DropdownMultipleQuantities.d.ts +3 -0
- package/lib/components/molecules/DropdownMultipleQuantities/DropdownMultipleQuantities.js +47 -0
- package/lib/components/molecules/DropdownMultipleQuantities/DropdownMultipleQuantities.js.map +1 -0
- package/lib/components/molecules/DropdownProductSale/DropdownProductSale.d.ts +3 -0
- package/lib/components/molecules/DropdownProductSale/DropdownProductSale.js +64 -0
- package/lib/components/molecules/DropdownProductSale/DropdownProductSale.js.map +1 -0
- package/lib/components/molecules/DropdownProductTypology/DropdownProductTypology.d.ts +3 -0
- package/lib/components/molecules/DropdownProductTypology/DropdownProductTypology.js +42 -0
- package/lib/components/molecules/DropdownProductTypology/DropdownProductTypology.js.map +1 -0
- package/lib/components/molecules/PartnerActionCard/PartnerActionCard.d.ts +19 -0
- package/lib/components/molecules/PartnerActionCard/PartnerActionCard.js +53 -0
- package/lib/components/molecules/PartnerActionCard/PartnerActionCard.js.map +1 -0
- package/lib/components/molecules/ProductDescription/ProductDescription.d.ts +3 -0
- package/lib/components/molecules/ProductDescription/ProductDescription.js +31 -0
- package/lib/components/molecules/ProductDescription/ProductDescription.js.map +1 -0
- package/lib/components/molecules/ProductFloatingButton/ProductFloatingButton.d.ts +3 -0
- package/lib/components/molecules/ProductFloatingButton/ProductFloatingButton.js +58 -0
- package/lib/components/molecules/ProductFloatingButton/ProductFloatingButton.js.map +1 -0
- package/lib/components/molecules/ProductHeader/ProductHeader.d.ts +3 -0
- package/lib/components/molecules/ProductHeader/ProductHeader.js +68 -0
- package/lib/components/molecules/ProductHeader/ProductHeader.js.map +1 -0
- package/lib/components/molecules/SaleOrderDropdownCards/SaleOrderDropdownCards.d.ts +6 -0
- package/lib/components/molecules/SaleOrderDropdownCards/SaleOrderDropdownCards.js +62 -0
- package/lib/components/molecules/SaleOrderDropdownCards/SaleOrderDropdownCards.js.map +1 -0
- package/lib/components/molecules/SaleOrderHeader/SaleOrderHeader.d.ts +6 -0
- package/lib/components/molecules/SaleOrderHeader/SaleOrderHeader.js +108 -0
- package/lib/components/molecules/SaleOrderHeader/SaleOrderHeader.js.map +1 -0
- package/lib/components/molecules/SaleOrderLineDropdownCards/SaleOrderLineDropdownCards.d.ts +6 -0
- package/lib/components/molecules/SaleOrderLineDropdownCards/SaleOrderLineDropdownCards.js +52 -0
- package/lib/components/molecules/SaleOrderLineDropdownCards/SaleOrderLineDropdownCards.js.map +1 -0
- package/lib/components/molecules/SaleOrderLinePriceDetails/SaleOrderLinePriceDetails.d.ts +8 -0
- package/lib/components/molecules/SaleOrderLinePriceDetails/SaleOrderLinePriceDetails.js +58 -0
- package/lib/components/molecules/SaleOrderLinePriceDetails/SaleOrderLinePriceDetails.js.map +1 -0
- package/lib/components/molecules/SaleOrderPriceDetails/SaleOrderPriceDetails.d.ts +7 -0
- package/lib/components/molecules/SaleOrderPriceDetails/SaleOrderPriceDetails.js +60 -0
- package/lib/components/molecules/SaleOrderPriceDetails/SaleOrderPriceDetails.js.map +1 -0
- package/lib/components/molecules/ValidateCartPopup/ValidateCartPopup.d.ts +9 -0
- package/lib/components/molecules/ValidateCartPopup/ValidateCartPopup.js +61 -0
- package/lib/components/molecules/ValidateCartPopup/ValidateCartPopup.js.map +1 -0
- package/lib/components/molecules/VariantProductCard/VariantProductCard.d.ts +15 -0
- package/lib/components/molecules/VariantProductCard/VariantProductCard.js +122 -0
- package/lib/components/molecules/VariantProductCard/VariantProductCard.js.map +1 -0
- package/lib/components/molecules/index.d.ts +21 -0
- package/lib/components/molecules/index.js +39 -0
- package/lib/components/molecules/index.js.map +1 -0
- package/lib/components/organisms/CategorySearchBar/CategorySearchBar.d.ts +12 -0
- package/lib/components/organisms/CategorySearchBar/CategorySearchBar.js +32 -0
- package/lib/components/organisms/CategorySearchBar/CategorySearchBar.js.map +1 -0
- package/lib/components/organisms/CustomerSearchBar/CustomerSearchBar.d.ts +13 -0
- package/lib/components/organisms/CustomerSearchBar/CustomerSearchBar.js +32 -0
- package/lib/components/organisms/CustomerSearchBar/CustomerSearchBar.js.map +1 -0
- package/lib/components/organisms/DropDownSaleOrderView/DropDownSaleOrderView.d.ts +5 -0
- package/lib/components/organisms/DropDownSaleOrderView/DropDownSaleOrderView.js +109 -0
- package/lib/components/organisms/DropDownSaleOrderView/DropDownSaleOrderView.js.map +1 -0
- package/lib/components/organisms/ProductCategorySearchBar/ProductCategorySearchBar.d.ts +12 -0
- package/lib/components/organisms/ProductCategorySearchBar/ProductCategorySearchBar.js +32 -0
- package/lib/components/organisms/ProductCategorySearchBar/ProductCategorySearchBar.js.map +1 -0
- package/lib/components/organisms/ProductDropdownCard/ProductDropdownCard.d.ts +3 -0
- package/lib/components/organisms/ProductDropdownCard/ProductDropdownCard.js +58 -0
- package/lib/components/organisms/ProductDropdownCard/ProductDropdownCard.js.map +1 -0
- package/lib/components/organisms/ProductSearchBar/ProductSearchBar.d.ts +13 -0
- package/lib/components/organisms/ProductSearchBar/ProductSearchBar.js +38 -0
- package/lib/components/organisms/ProductSearchBar/ProductSearchBar.js.map +1 -0
- package/lib/components/organisms/SaleQuotationCreationButtons/SaleQuotationCreationButtons.d.ts +11 -0
- package/lib/components/organisms/SaleQuotationCreationButtons/SaleQuotationCreationButtons.js +46 -0
- package/lib/components/organisms/SaleQuotationCreationButtons/SaleQuotationCreationButtons.js.map +1 -0
- package/lib/components/organisms/SaleQuotationCreationQuantityCard/SaleQuotationCreationQuantityCard.d.ts +9 -0
- package/lib/components/organisms/SaleQuotationCreationQuantityCard/SaleQuotationCreationQuantityCard.js +28 -0
- package/lib/components/organisms/SaleQuotationCreationQuantityCard/SaleQuotationCreationQuantityCard.js.map +1 -0
- package/lib/components/organisms/index.d.ts +8 -0
- package/lib/components/organisms/index.js +26 -0
- package/lib/components/organisms/index.js.map +1 -0
- package/lib/components/pages/SaleOrderListView/SaleOrderListView.d.ts +7 -0
- package/lib/components/pages/SaleOrderListView/SaleOrderListView.js +44 -0
- package/lib/components/pages/SaleOrderListView/SaleOrderListView.js.map +1 -0
- package/lib/components/pages/index.d.ts +1 -0
- package/lib/components/pages/index.js +19 -0
- package/lib/components/pages/index.js.map +1 -0
- package/lib/components/templates/CompanyPicker/CompanyPicker.d.ts +9 -0
- package/lib/components/templates/CompanyPicker/CompanyPicker.js +30 -0
- package/lib/components/templates/CompanyPicker/CompanyPicker.js.map +1 -0
- package/lib/components/templates/index.d.ts +1 -0
- package/lib/components/templates/index.js +19 -0
- package/lib/components/templates/index.js.map +1 -0
- package/lib/features/asyncFunctions-index.d.ts +10 -0
- package/lib/features/asyncFunctions-index.js +28 -0
- package/lib/features/asyncFunctions-index.js.map +1 -0
- package/lib/features/cartLineSlice.d.ts +71 -0
- package/lib/features/cartLineSlice.js +111 -0
- package/lib/features/cartLineSlice.js.map +1 -0
- package/lib/features/cartSlice.d.ts +109 -0
- package/lib/features/cartSlice.js +79 -0
- package/lib/features/cartSlice.js.map +1 -0
- package/lib/features/complementaryProductSlice.d.ts +16 -0
- package/lib/features/complementaryProductSlice.js +49 -0
- package/lib/features/complementaryProductSlice.js.map +1 -0
- package/lib/features/customerDeliverySlice.d.ts +14 -0
- package/lib/features/customerDeliverySlice.js +51 -0
- package/lib/features/customerDeliverySlice.js.map +1 -0
- package/lib/features/customerSlice.d.ts +42 -0
- package/lib/features/customerSlice.js +86 -0
- package/lib/features/customerSlice.js.map +1 -0
- package/lib/features/index.d.ts +10 -0
- package/lib/features/index.js +28 -0
- package/lib/features/index.js.map +1 -0
- package/lib/features/priceListLineSlice.d.ts +16 -0
- package/lib/features/priceListLineSlice.js +49 -0
- package/lib/features/priceListLineSlice.js.map +1 -0
- package/lib/features/productSlice.d.ts +89 -0
- package/lib/features/productSlice.js +156 -0
- package/lib/features/productSlice.js.map +1 -0
- package/lib/features/saleConfigSlice.d.ts +14 -0
- package/lib/features/saleConfigSlice.js +48 -0
- package/lib/features/saleConfigSlice.js.map +1 -0
- package/lib/features/saleOrderLineSlice.d.ts +29 -0
- package/lib/features/saleOrderLineSlice.js +71 -0
- package/lib/features/saleOrderLineSlice.js.map +1 -0
- package/lib/features/saleOrderSlice.d.ts +48 -0
- package/lib/features/saleOrderSlice.js +87 -0
- package/lib/features/saleOrderSlice.js.map +1 -0
- package/lib/hooks/use-sale-header-actions.d.ts +1 -0
- package/lib/hooks/use-sale-header-actions.js +120 -0
- package/lib/hooks/use-sale-header-actions.js.map +1 -0
- package/lib/hooks/use-tax-mode-indicator.d.ts +1 -0
- package/lib/hooks/use-tax-mode-indicator.js +50 -0
- package/lib/hooks/use-tax-mode-indicator.js.map +1 -0
- package/lib/i18n/en.json +180 -0
- package/lib/i18n/fr.json +180 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +132 -0
- package/lib/index.js.map +1 -0
- package/lib/models/index.d.ts +4 -0
- package/lib/models/index.js +22 -0
- package/lib/models/index.js.map +1 -0
- package/lib/models/objectFields.d.ts +2 -0
- package/lib/models/objectFields.js +243 -0
- package/lib/models/objectFields.js.map +1 -0
- package/lib/models/searchFields.d.ts +2 -0
- package/lib/models/searchFields.js +34 -0
- package/lib/models/searchFields.js.map +1 -0
- package/lib/models/sortFields.d.ts +2 -0
- package/lib/models/sortFields.js +28 -0
- package/lib/models/sortFields.js.map +1 -0
- package/lib/models/typeObjects.d.ts +2 -0
- package/lib/models/typeObjects.js +318 -0
- package/lib/models/typeObjects.js.map +1 -0
- package/lib/screens/cart/ActiveCartScreen.d.ts +3 -0
- package/lib/screens/cart/ActiveCartScreen.js +99 -0
- package/lib/screens/cart/ActiveCartScreen.js.map +1 -0
- package/lib/screens/cart/CartLineDetailsScreen.d.ts +5 -0
- package/lib/screens/cart/CartLineDetailsScreen.js +73 -0
- package/lib/screens/cart/CartLineDetailsScreen.js.map +1 -0
- package/lib/screens/cart/CatalogScreen.d.ts +3 -0
- package/lib/screens/cart/CatalogScreen.js +46 -0
- package/lib/screens/cart/CatalogScreen.js.map +1 -0
- package/lib/screens/cart/index.d.ts +34 -0
- package/lib/screens/cart/index.js +48 -0
- package/lib/screens/cart/index.js.map +1 -0
- package/lib/screens/client/ClientSaleDetailsScreen.d.ts +5 -0
- package/lib/screens/client/ClientSaleDetailsScreen.js +60 -0
- package/lib/screens/client/ClientSaleDetailsScreen.js.map +1 -0
- package/lib/screens/client/ClientSaleListScreen.d.ts +3 -0
- package/lib/screens/client/ClientSaleListScreen.js +61 -0
- package/lib/screens/client/ClientSaleListScreen.js.map +1 -0
- package/lib/screens/client/index.d.ts +26 -0
- package/lib/screens/client/index.js +40 -0
- package/lib/screens/client/index.js.map +1 -0
- package/lib/screens/product/ComplementaryProductsScreen.d.ts +3 -0
- package/lib/screens/product/ComplementaryProductsScreen.js +35 -0
- package/lib/screens/product/ComplementaryProductsScreen.js.map +1 -0
- package/lib/screens/product/ProductSaleDetailsScreen.d.ts +5 -0
- package/lib/screens/product/ProductSaleDetailsScreen.js +83 -0
- package/lib/screens/product/ProductSaleDetailsScreen.js.map +1 -0
- package/lib/screens/product/ProductSaleListScreen.d.ts +5 -0
- package/lib/screens/product/ProductSaleListScreen.js +67 -0
- package/lib/screens/product/ProductSaleListScreen.js.map +1 -0
- package/lib/screens/product/ProductSalePriceListsScreen.d.ts +3 -0
- package/lib/screens/product/ProductSalePriceListsScreen.js +68 -0
- package/lib/screens/product/ProductSalePriceListsScreen.js.map +1 -0
- package/lib/screens/product/VariantProductsScreen.d.ts +3 -0
- package/lib/screens/product/VariantProductsScreen.js +38 -0
- package/lib/screens/product/VariantProductsScreen.js.map +1 -0
- package/lib/screens/product/index.d.ts +55 -0
- package/lib/screens/product/index.js +67 -0
- package/lib/screens/product/index.js.map +1 -0
- package/lib/screens/saleOrder/SaleOrderDetailsScreen.d.ts +5 -0
- package/lib/screens/saleOrder/SaleOrderDetailsScreen.js +62 -0
- package/lib/screens/saleOrder/SaleOrderDetailsScreen.js.map +1 -0
- package/lib/screens/saleOrder/SaleOrderLineDetailsScreen.d.ts +6 -0
- package/lib/screens/saleOrder/SaleOrderLineDetailsScreen.js +82 -0
- package/lib/screens/saleOrder/SaleOrderLineDetailsScreen.js.map +1 -0
- package/lib/screens/saleOrder/SaleOrderLineListScreen.d.ts +3 -0
- package/lib/screens/saleOrder/SaleOrderLineListScreen.js +47 -0
- package/lib/screens/saleOrder/SaleOrderLineListScreen.js.map +1 -0
- package/lib/screens/saleOrder/SaleOrdersScreen.d.ts +5 -0
- package/lib/screens/saleOrder/SaleOrdersScreen.js +33 -0
- package/lib/screens/saleOrder/SaleOrdersScreen.js.map +1 -0
- package/lib/screens/saleOrder/SaleQuotationCreationScreen.d.ts +3 -0
- package/lib/screens/saleOrder/SaleQuotationCreationScreen.js +85 -0
- package/lib/screens/saleOrder/SaleQuotationCreationScreen.js.map +1 -0
- package/lib/screens/saleOrder/SaleQuotationsScreen.d.ts +5 -0
- package/lib/screens/saleOrder/SaleQuotationsScreen.js +33 -0
- package/lib/screens/saleOrder/SaleQuotationsScreen.js.map +1 -0
- package/lib/screens/saleOrder/index.d.ts +70 -0
- package/lib/screens/saleOrder/index.js +77 -0
- package/lib/screens/saleOrder/index.js.map +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +19 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/sale-order.helpers.d.ts +1 -0
- package/lib/utils/sale-order.helpers.js +34 -0
- package/lib/utils/sale-order.helpers.js.map +1 -0
- package/package.json +48 -0
package/README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Sale
|
|
3
|
+
tags: Readme
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<h1 align="center">@axelor/aos-mobile-sale</h1>
|
|
7
|
+
|
|
8
|
+
<div align="center">
|
|
9
|
+
<img src="https://i.imgur.com/KJAAFlT.png" width="30%"/>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
## Presentation
|
|
13
|
+
|
|
14
|
+
This package was developed for the [Axelor Open Mobile](https://github.com/axelor/axelor-mobile) application.
|
|
15
|
+
|
|
16
|
+
The purpose of this package is to link with the sale module of the [Axelor Open Suite (AOS)](https://github.com/axelor/axelor-open-suite) ERP. It provides a simplified version of a number of processes available on the webapp. This package is compatible with AOS from version 8.2.0.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
Install the library :
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
yarn add @axelor/aos-mobile-sale
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Compatibility with React v18.2.x and React Native v0.71.x.
|
|
27
|
+
|
|
28
|
+
To add this package in your application, you need to add it in the _modules_ props of the component `Application` from @axelor/aos-mobile-core package.
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import React from 'react';
|
|
32
|
+
import {Application} from '@axelor/aos-mobile-core';
|
|
33
|
+
import {SaleModule} from '@axelor/aos-mobile-sale';
|
|
34
|
+
|
|
35
|
+
const App = () => {
|
|
36
|
+
return <Application modules={[SaleModule]} mainMenu="auth_menu_user" />;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default App;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Developpment
|
|
43
|
+
|
|
44
|
+
This package is developed as part of the Axelor Open Mobile application. To contribute, please go to the [Github project](https://github.com/axelor/axelor-mobile) and follow the guidelines. You will also find an installation guide to help you configure your environment.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function searchCart({ searchValue, page, userId }: {
|
|
2
|
+
searchValue: any;
|
|
3
|
+
page?: number;
|
|
4
|
+
userId: any;
|
|
5
|
+
}): Promise<any>;
|
|
6
|
+
export function updateCart({ partnerId, companyId, cartId, cartVersion }: {
|
|
7
|
+
partnerId: any;
|
|
8
|
+
companyId: any;
|
|
9
|
+
cartId: any;
|
|
10
|
+
cartVersion: any;
|
|
11
|
+
}): Promise<void>;
|
|
12
|
+
export function validateCart({ id, version }: {
|
|
13
|
+
id: any;
|
|
14
|
+
version: any;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
export function emptyCart({ id, version }: {
|
|
17
|
+
id: any;
|
|
18
|
+
version: any;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
export function addProductToActiveCart({ userId, productId, qty }: {
|
|
21
|
+
userId: any;
|
|
22
|
+
productId: any;
|
|
23
|
+
qty: any;
|
|
24
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createStandardSearch, getActionApi, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
|
+
import { addCartLine } from './cart-line-api';
|
|
20
|
+
const createCartCriteria = (searchValue, userId) => {
|
|
21
|
+
const criteria = [getSearchCriterias('sale_cart', searchValue)];
|
|
22
|
+
if (userId) {
|
|
23
|
+
criteria.push({
|
|
24
|
+
fieldName: 'user.id',
|
|
25
|
+
operator: '=',
|
|
26
|
+
value: userId,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return criteria;
|
|
30
|
+
};
|
|
31
|
+
export async function searchCart({ searchValue, page = 0, userId }) {
|
|
32
|
+
return createStandardSearch({
|
|
33
|
+
model: 'com.axelor.apps.sale.db.Cart',
|
|
34
|
+
criteria: createCartCriteria(searchValue, userId),
|
|
35
|
+
fieldKey: 'sale_cart',
|
|
36
|
+
sortKey: 'sale_cart',
|
|
37
|
+
page: page,
|
|
38
|
+
provider: 'model',
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
export async function updateCart({ partnerId, companyId, cartId, cartVersion }) {
|
|
42
|
+
let data = { id: cartId, version: cartVersion };
|
|
43
|
+
if (companyId != null) {
|
|
44
|
+
data = {
|
|
45
|
+
...data,
|
|
46
|
+
company: {
|
|
47
|
+
id: companyId,
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (partnerId != null) {
|
|
52
|
+
data = {
|
|
53
|
+
...data,
|
|
54
|
+
partner: {
|
|
55
|
+
id: partnerId,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return getActionApi().send({
|
|
60
|
+
url: '/ws/rest/com.axelor.apps.sale.db.Cart',
|
|
61
|
+
method: 'post',
|
|
62
|
+
body: { data },
|
|
63
|
+
description: 'Update Cart',
|
|
64
|
+
matchers: {
|
|
65
|
+
modelName: 'com.axelor.apps.sale.db.Cart',
|
|
66
|
+
id: cartId,
|
|
67
|
+
fields: {
|
|
68
|
+
'data.company.id': 'company.id',
|
|
69
|
+
'data.partner.id': 'partner.id',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export async function validateCart({ id, version }) {
|
|
75
|
+
return getActionApi().send({
|
|
76
|
+
url: `/ws/aos/cart/validate/${id}`,
|
|
77
|
+
method: 'put',
|
|
78
|
+
body: { version },
|
|
79
|
+
description: 'Validate Cart',
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export async function emptyCart({ id, version }) {
|
|
83
|
+
return getActionApi().send({
|
|
84
|
+
url: `ws/aos/cart/empty/${id}`,
|
|
85
|
+
method: 'put',
|
|
86
|
+
body: { version },
|
|
87
|
+
description: 'Empty Cart',
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export async function addProductToActiveCart({ userId, productId, qty }) {
|
|
91
|
+
return searchCart({ userId })
|
|
92
|
+
.then(res => res?.data?.data?.[0])
|
|
93
|
+
.then(cart => {
|
|
94
|
+
if (cart != null) {
|
|
95
|
+
return addCartLine({
|
|
96
|
+
cartId: cart.id,
|
|
97
|
+
cartVersion: cart.version,
|
|
98
|
+
productId,
|
|
99
|
+
qty,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
throw { response: { status: 404, statusText: 'No active cart found' } };
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=cart-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart-api.js","sourceRoot":"","sources":["../../src/api/cart-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAE5C,MAAM,kBAAkB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE;IACjD,MAAM,QAAQ,GAAG,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAEhE,IAAI,MAAM,EAAE;QACV,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,SAAS;YACpB,QAAQ,E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artId: any;
|
|
5
|
+
}): Promise<any>;
|
|
6
|
+
export function updateCartLine({ cartLine, qty, variantProduct }: {
|
|
7
|
+
cartLine: any;
|
|
8
|
+
qty: any;
|
|
9
|
+
variantProduct: any;
|
|
10
|
+
}): Promise<void>;
|
|
11
|
+
export function deleteCartLine({ cartLineId }: {
|
|
12
|
+
cartLineId: any;
|
|
13
|
+
}): Promise<void>;
|
|
14
|
+
export function fetchCartLineById({ cartLineId }: {
|
|
15
|
+
cartLineId: any;
|
|
16
|
+
}): Promise<any>;
|
|
17
|
+
export function addCartLine({ cartId, cartVersion, productId, qty }: {
|
|
18
|
+
cartId: any;
|
|
19
|
+
cartVersion: any;
|
|
20
|
+
productId: any;
|
|
21
|
+
qty: any;
|
|
22
|
+
}): Promise<void>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createStandardFetch, createStandardSearch, formatRequestBody, getActionApi, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
|
+
const createCartLineCriteria = (searchValue, cartId) => {
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
fieldName: 'cart.id',
|
|
23
|
+
operator: '=',
|
|
24
|
+
value: cartId,
|
|
25
|
+
},
|
|
26
|
+
getSearchCriterias('sale_cartLine', searchValue),
|
|
27
|
+
];
|
|
28
|
+
};
|
|
29
|
+
export async function searchCartLine({ searchValue, page = 0, cartId }) {
|
|
30
|
+
return createStandardSearch({
|
|
31
|
+
model: 'com.axelor.apps.sale.db.CartLine',
|
|
32
|
+
criteria: createCartLineCriteria(searchValue, cartId),
|
|
33
|
+
fieldKey: 'sale_cartLine',
|
|
34
|
+
sortKey: 'sale_cartLine',
|
|
35
|
+
page: page,
|
|
36
|
+
provider: 'model',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export async function updateCartLine({ cartLine, qty, variantProduct }) {
|
|
40
|
+
const { matchers } = formatRequestBody(cartLine, 'data');
|
|
41
|
+
return getActionApi().send({
|
|
42
|
+
url: '/ws/rest/com.axelor.apps.sale.db.CartLine',
|
|
43
|
+
method: 'post',
|
|
44
|
+
body: {
|
|
45
|
+
data: {
|
|
46
|
+
...cartLine,
|
|
47
|
+
qty,
|
|
48
|
+
variantProduct,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
description: 'Update Cart Line',
|
|
52
|
+
matchers: {
|
|
53
|
+
modelName: 'com.axelor.apps.sale.db.CartLine',
|
|
54
|
+
id: cartLine.id,
|
|
55
|
+
fields: {
|
|
56
|
+
'data.qty': 'qty',
|
|
57
|
+
'data.variantProduct': 'variantProduct',
|
|
58
|
+
...matchers,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
export async function deleteCartLine({ cartLineId }) {
|
|
64
|
+
return getActionApi().send({
|
|
65
|
+
url: `/ws/rest/com.axelor.apps.sale.db.CartLine/${cartLineId}`,
|
|
66
|
+
method: 'delete',
|
|
67
|
+
description: 'Delete Cart Line',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
export async function fetchCartLineById({ cartLineId }) {
|
|
71
|
+
return createStandardFetch({
|
|
72
|
+
model: 'com.axelor.apps.sale.db.CartLine',
|
|
73
|
+
id: cartLineId,
|
|
74
|
+
fieldKey: 'sale_cartLine',
|
|
75
|
+
provider: 'model',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export async function addCartLine({ cartId, cartVersion, productId, qty }) {
|
|
79
|
+
return getActionApi().send({
|
|
80
|
+
url: `/ws/aos/cart/add-line/${cartId}`,
|
|
81
|
+
method: 'put',
|
|
82
|
+
body: { version: cartVersion, cartId, productId, qty },
|
|
83
|
+
description: 'Add Product to Cart Line',
|
|
84
|
+
matchers: {
|
|
85
|
+
modelName: 'com.axelor.apps.sale.db.CartLine',
|
|
86
|
+
id: Date.now(),
|
|
87
|
+
fields: {
|
|
88
|
+
cartId: 'cart.id',
|
|
89
|
+
productId: 'product.id',
|
|
90
|
+
qty: 'qty',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=cart-line-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart-line-api.js","sourceRoot":"","sources":["../../src/api/cart-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,sBAAsB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE;IACrD,OAAO;QACL;YACE,SAAS,EAAE,SAAS;YACpB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,MAAM;SACd;QACD,kBAAkB,CAAC,eAAe,EAAE,WAAW,CAAC;KACjD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EAAC,WAAW,EAAE,IAAI,GAAG,CAAC,EAAE,MAAM,EAAC;IAClE,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,kCA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C,KAAK,UAAU,WAAW,CAAC,EAAC,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,EAAC;IACrE,OAAO,YAAY,EAAE,CAAC,IAAI,CAAC;QACzB,GAAG,EAAE,yBAAyB,MAAM,EAAE;QACtC,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,EAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAC;QACpD,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE;YACR,SAAS,EAAE,kCAAkC;YAC7C,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;YACd,MAAM,EAAE;gBACN,MAAM,EAAE,SAAS;gBACjB,SAAS,EAAE,YAAY;gBACvB,GAAG,EAAE,KAAK;aACX;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
|
+
const createComplementaryProductCriteria = (searchValue, productId) => {
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
fieldName: 'originalProduct.id',
|
|
23
|
+
operator: '=',
|
|
24
|
+
value: productId,
|
|
25
|
+
},
|
|
26
|
+
getSearchCriterias('sale_complementaryProduct', searchValue),
|
|
27
|
+
];
|
|
28
|
+
};
|
|
29
|
+
export async function fetchComplementaryProduct({ searchValue, productId, page = 0, }) {
|
|
30
|
+
return createStandardSearch({
|
|
31
|
+
model: 'com.axelor.apps.sale.db.ComplementaryProduct',
|
|
32
|
+
criteria: createComplementaryProductCriteria(searchValue, productId),
|
|
33
|
+
fieldKey: 'sale_complementaryProduct',
|
|
34
|
+
sortKey: 'sale_complementaryProduct',
|
|
35
|
+
page,
|
|
36
|
+
provider: 'model',
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=complementary-product-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complementary-product-api.js","sourceRoot":"","sources":["../../src/api/complementary-product-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,kCAAkC,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,EAAE;IACpE,OAAO;QACL;YACE,SAAS,EAAE,oBAAoB;YAC/B,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS;SACjB;QACD,kBAAkB,CAAC,2BAA2B,EAAE,WAAW,CAAC;KAC7D,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,EAC9C,WAAW,EACX,SAAS,EACT,IAAI,GAAG,CAAC,GACT;IACC,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,8CAA8C;QACrD,QAAQ,EAAE,kCAAkC,CAAC,WAAW,EAAE,SAAS,CAAC;QACpE,QAAQ,EAAE,2BAA2B;QACrC,OAAO,EAAE,2BAA2B;QACpC,IAAI;QACJ,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function searchCustomer({ searchValue, isAsssignedToMe, userId, categoryId, companyId, page, }: {
|
|
2
|
+
searchValue: any;
|
|
3
|
+
isAsssignedToMe: any;
|
|
4
|
+
userId: any;
|
|
5
|
+
categoryId: any;
|
|
6
|
+
companyId: any;
|
|
7
|
+
page?: number;
|
|
8
|
+
}): Promise<any>;
|
|
9
|
+
export function searchCustomerCategory({ searchValue, page }: {
|
|
10
|
+
searchValue: any;
|
|
11
|
+
page?: number;
|
|
12
|
+
}): Promise<any>;
|
|
13
|
+
export function fetchCustomerById({ customerId }: {
|
|
14
|
+
customerId: any;
|
|
15
|
+
}): Promise<any>;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createStandardFetch, createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
|
+
const createCustomerCriteria = (searchValue, isAsssignedToMe, userId, categoryId) => {
|
|
20
|
+
const criteria = [
|
|
21
|
+
{
|
|
22
|
+
operator: 'and',
|
|
23
|
+
criteria: [
|
|
24
|
+
{
|
|
25
|
+
fieldName: 'isContact',
|
|
26
|
+
operator: '=',
|
|
27
|
+
value: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
operator: 'or',
|
|
31
|
+
criteria: [
|
|
32
|
+
{
|
|
33
|
+
fieldName: 'isCustomer',
|
|
34
|
+
operator: '=',
|
|
35
|
+
value: true,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
fieldName: 'isProspect',
|
|
39
|
+
operator: '=',
|
|
40
|
+
value: true,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
getSearchCriterias('sale_customer', searchValue),
|
|
47
|
+
];
|
|
48
|
+
if (isAsssignedToMe) {
|
|
49
|
+
criteria.push({
|
|
50
|
+
fieldName: 'user.id',
|
|
51
|
+
operator: '=',
|
|
52
|
+
value: userId,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (categoryId != null) {
|
|
56
|
+
criteria.push({
|
|
57
|
+
fieldName: 'partnerCategory.id',
|
|
58
|
+
operator: '=',
|
|
59
|
+
value: categoryId,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return criteria;
|
|
63
|
+
};
|
|
64
|
+
export async function searchCustomer({ searchValue, isAsssignedToMe, userId, categoryId, companyId, page = 0, }) {
|
|
65
|
+
return createStandardSearch({
|
|
66
|
+
model: 'com.axelor.apps.base.db.Partner',
|
|
67
|
+
criteria: createCustomerCriteria(searchValue, isAsssignedToMe, userId, categoryId),
|
|
68
|
+
...(companyId != null && {
|
|
69
|
+
domain: ':company MEMBER OF self.companySet',
|
|
70
|
+
domainContext: {
|
|
71
|
+
company: {
|
|
72
|
+
id: companyId,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
}),
|
|
76
|
+
fieldKey: 'sale_customer',
|
|
77
|
+
sortKey: 'sale_customer',
|
|
78
|
+
page,
|
|
79
|
+
provider: 'model',
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export async function searchCustomerCategory({ searchValue, page = 0 }) {
|
|
83
|
+
return createStandardSearch({
|
|
84
|
+
model: 'com.axelor.apps.base.db.PartnerCategory',
|
|
85
|
+
criteria: [getSearchCriterias('sale_customerCategory', searchValue)],
|
|
86
|
+
fieldKey: 'sale_customerCategory',
|
|
87
|
+
sortKey: 'sale_customerCategory',
|
|
88
|
+
page,
|
|
89
|
+
provider: 'model',
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
export async function fetchCustomerById({ customerId }) {
|
|
93
|
+
return createStandardFetch({
|
|
94
|
+
model: 'com.axelor.apps.base.db.Partner',
|
|
95
|
+
id: customerId,
|
|
96
|
+
fieldKey: 'sale_customer',
|
|
97
|
+
provider: 'model',
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=customer-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-api.js","sourceRoot":"","sources":["../../src/api/customer-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,sBAAsB,GAAG,CAC7B,WAAW,EACX,eAAe,EACf,MAAM,EACN,UAAU,EACV,EAAE;IACF,MAAM,QAAQ,GAAG;QACf;YACE,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE;gBACR;oBACE,SAAS,EAAE,WAAW;oBACtB,QAAQ,EAAE,GAAG;oBACb,KAAK,EAAE,KAAK;iBACb;gBACD;oBACE,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE;wBACR;4BACE,SAAS,EAAE,YAAY;4BACvB,QAAQ,EAAE,GAAG;4BACb,KAAK,EAAE,IAAI;yBACZ;wBACD;4BACE,SAAS,EAAE,YAAY;4BACvB,QAAQ,EAAE,GAAG;4BACb,KAAK,EAAE,IAAI;yBACZ;qBACF;iBACF;aACF;SACF;QACD,kBAAkB,CAAC,eAAe,EAAE,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AC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EAAC,UAAU,EAAC;IAClD,OAAO,mBAAmB,CAAC;QACzB,KAAK,EAAE,iCAAiC;QACxC,EAAE,EAAE,UAAU;QACd,QAAQ,EAAE,eAAe;QACzB,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createStandardSearch } from '@axelor/aos-mobile-core';
|
|
19
|
+
export async function fetchCustomerDelivery({ saleOrderId }) {
|
|
20
|
+
return createStandardSearch({
|
|
21
|
+
model: 'com.axelor.apps.stock.db.StockMove',
|
|
22
|
+
domain: ':saleOrder MEMBER OF self.saleOrderSet',
|
|
23
|
+
domainContext: {
|
|
24
|
+
saleOrder: { id: saleOrderId },
|
|
25
|
+
},
|
|
26
|
+
fieldKey: 'sale_customerDelivery',
|
|
27
|
+
sortKey: 'sale_customerDelivery',
|
|
28
|
+
numberElementsByPage: 1,
|
|
29
|
+
page: 0,
|
|
30
|
+
provider: 'model',
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=customer-delivery-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customer-delivery-api.js","sourceRoot":"","sources":["../../src/api/customer-delivery-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAE7D,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,EAAC,WAAW,EAAC;IACvD,OAAO,oBAAoB,CAAC;QAC1B,KAAK,EAAE,oCAAoC;QAC3C,MAAM,EAAE,wCAAwC;QAChD,aAAa,EAAE;YACb,SAAS,EAAE,EAAC,EAAE,EAAE,WAAW,EAAC;SAC7B;QACD,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,uBAAuB;QAChC,oBAAoB,EAAE,CAAC;QACvB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { addProductToActiveCart as addProductToActiveCartApi, emptyCart as emptyCartApi, searchCart as searchCartApi, updateCart as updateCartApi, validateCart as validateCartApi, } from './cart-api';
|
|
2
|
+
export { addCartLine as addCartLineApi, deleteCartLine as deleteCartLineApi, fetchCartLineById as fetchCartLineByIdApi, searchCartLine as searchCartLineApi, updateCartLine as updateCartLineApi, } from './cart-line-api';
|
|
3
|
+
export { fetchComplementaryProduct as fetchComplementaryProductApi } from './complementary-product-api';
|
|
4
|
+
export { fetchCustomerById as fetchCustomerByIdApi, searchCustomer as searchCustomerApi, searchCustomerCategory as searchCustomerCategoryApi, } from './customer-api';
|
|
5
|
+
export { fetchCustomerDelivery as fetchCustomerDeliveryApi } from './customer-delivery-api';
|
|
6
|
+
export { fetchPriceListLine as fetchPriceListLineApi } from './price-list-line-api';
|
|
7
|
+
export { fetchMatchingProduct as fetchMatchingProductApi, fetchProductById as fetchProductByIdApi, fetchProductCompanyConfig as fetchProductCompanyConfigApi, fetchProductVariantConfig as fetchProductVariantConfigApi, fetchVariantAttributes as fetchVariantAttributesApi, fetchVariantProduct as fetchVariantProductApi, searchProduct as searchProductApi, searchProductCategory as searchProductCategoryApi, } from './product-api';
|
|
8
|
+
export { fetchSaleConfig as fetchSaleConfigApi } from './sale-config-api';
|
|
9
|
+
export { createSaleOrder as createSaleOrderApi, fetchSaleOrder as fetchSaleOrderApi, fetchSaleOrderById as fetchSaleOrderByIdApi, updateSaleOrderStatus as updateSaleOrderStatusApi, } from './sale-order-api';
|
|
10
|
+
export { fetchSaleOrderLine as fetchSaleOrderLineApi, fetchSaleOrderLineById as fetchSaleOrderLineByIdApi, } from './sale-order-line-api';
|
package/lib/api/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
export { addProductToActiveCart as addProductToActiveCartApi, emptyCart as emptyCartApi, searchCart as searchCartApi, updateCart as updateCartApi, validateCart as validateCartApi, } from './cart-api';
|
|
19
|
+
export { addCartLine as addCartLineApi, deleteCartLine as deleteCartLineApi, fetchCartLineById as fetchCartLineByIdApi, searchCartLine as searchCartLineApi, updateCartLine as updateCartLineApi, } from './cart-line-api';
|
|
20
|
+
export { fetchComplementaryProduct as fetchComplementaryProductApi } from './complementary-product-api';
|
|
21
|
+
export { fetchCustomerById as fetchCustomerByIdApi, searchCustomer as searchCustomerApi, searchCustomerCategory as searchCustomerCategoryApi, } from './customer-api';
|
|
22
|
+
export { fetchCustomerDelivery as fetchCustomerDeliveryApi } from './customer-delivery-api';
|
|
23
|
+
export { fetchPriceListLine as fetchPriceListLineApi } from './price-list-line-api';
|
|
24
|
+
export { fetchMatchingProduct as fetchMatchingProductApi, fetchProductById as fetchProductByIdApi, fetchProductCompanyConfig as fetchProductCompanyConfigApi, fetchProductVariantConfig as fetchProductVariantConfigApi, fetchVariantAttributes as fetchVariantAttributesApi, fetchVariantProduct as fetchVariantProductApi, searchProduct as searchProductApi, searchProductCategory as searchProductCategoryApi, } from './product-api';
|
|
25
|
+
export { fetchSaleConfig as fetchSaleConfigApi } from './sale-config-api';
|
|
26
|
+
export { createSaleOrder as createSaleOrderApi, fetchSaleOrder as fetchSaleOrderApi, fetchSaleOrderById as fetchSaleOrderByIdApi, updateSaleOrderStatus as updateSaleOrderStatusApi, } from './sale-order-api';
|
|
27
|
+
export { fetchSaleOrderLine as fetchSaleOrderLineApi, fetchSaleOrderLineById as fetchSaleOrderLineByIdApi, } from './sale-order-line-api';
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,sBAAsB,IAAI,yBAAyB,EACnD,SAAS,IAAI,YAAY,EACzB,UAAU,IAAI,aAAa,EAC3B,UAAU,IAAI,aAAa,EAC3B,YAAY,IAAI,eAAe,GAChC,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,IAAI,cAAc,EAC7B,cAAc,IAAI,iBAAiB,EACnC,iBAAiB,IAAI,oBAAoB,EACzC,cAAc,IAAI,iBAAiB,EACnC,cAAc,IAAI,iBAAiB,GACpC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,yBAAyB,IAAI,4BAA4B,EAAC,MAAM,6BAA6B,CAAC;AACtG,OAAO,EACL,iBAAiB,IAAI,oBAAoB,EACzC,cAAc,IAAI,iBAAiB,EACnC,sBAAsB,IAAI,yBAAyB,GACpD,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,qBAAqB,IAAI,wBAAwB,EAAC,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAC,kBAAkB,IAAI,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAClF,OAAO,EACL,oBAAoB,IAAI,uBAAuB,EAC/C,gBAAgB,IAAI,mBAAmB,EACvC,yBAAyB,IAAI,4BAA4B,EACzD,yBAAyB,IAAI,4BAA4B,EACzD,sBAAsB,IAAI,yBAAyB,EACnD,mBAAmB,IAAI,sBAAsB,EAC7C,aAAa,IAAI,gBAAgB,EACjC,qBAAqB,IAAI,wBAAwB,GAClD,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,eAAe,IAAI,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACxE,OAAO,EACL,eAAe,IAAI,kBAAkB,EACrC,cAAc,IAAI,iBAAiB,EACnC,kBAAkB,IAAI,qBAAqB,EAC3C,qBAAqB,IAAI,wBAAwB,GAClD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,kBAAkB,IAAI,qBAAqB,EAC3C,sBAAsB,IAAI,yBAAyB,GACpD,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2024 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import { createStandardSearch, getSearchCriterias, } from '@axelor/aos-mobile-core';
|
|
19
|
+
const createPriceListLineCriteria = (searchValue, productId, fromDate, toDate, isActive) => {
|
|
20
|
+
const criteria = [
|
|
21
|
+
{
|
|
22
|
+
fieldName: 'product.id',
|
|
23
|
+
operator: '=',
|
|
24
|
+
value: productId,
|
|
25
|
+
},
|
|
26
|
+
getSearchCriterias('sale_priceListLine', searchValue),
|
|
27
|
+
];
|
|
28
|
+
if (fromDate != null) {
|
|
29
|
+
criteria.push({
|
|
30
|
+
fieldName: 'priceList.applicationBeginDate',
|
|
31
|
+
operator: '>=',
|
|
32
|
+
value: fromDate,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (toDate != null) {
|
|
36
|
+
criteria.push({
|
|
37
|
+
fieldName: 'priceList.applicationEndDate',
|
|
38
|
+
operator: '<=',
|
|
39
|
+
value: toDate,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
if (isActive != null) {
|
|
43
|
+
criteria.push({
|
|
44
|
+
fieldName: 'priceList.isActive',
|
|
45
|
+
operator: '=',
|
|
46
|
+
value: isActive,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return criteria;
|
|
50
|
+
};
|
|
51
|
+
export async function fetchPriceListLine({ searchValue, productId, fromDate, toDate, isActive, page = 0, }) {
|
|
52
|
+
return createStandardSearch({
|
|
53
|
+
model: 'com.axelor.apps.base.db.PriceListLine',
|
|
54
|
+
criteria: createPriceListLineCriteria(searchValue, productId, fromDate, toDate, isActive),
|
|
55
|
+
fieldKey: 'sale_priceListLine',
|
|
56
|
+
sortKey: 'sale_priceListLine',
|
|
57
|
+
page,
|
|
58
|
+
provider: 'model',
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=price-list-line-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-list-line-api.js","sourceRoot":"","sources":["../../src/api/price-list-line-api.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,2BAA2B,GAAG,CAClC,WAAW,EACX,SAAS,EACT,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,EAAE;IACF,MAAM,QAAQ,GAAG;QACf;YACE,SAAS,EAAE,YAAY;YACvB,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,SAAS;SACjB;QACD,kBAAkB,CAAC,oBAAoB,EAAE,WAAW,CAAC;KACtD,CAAC;IAEF,IAAI,QAAQ,IAAI,IAAI,EAAE;QACpB,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,gCAAgC;YAC3C,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;KACJ;IAED,IAAI,MAAM,IAAI,IAAI,EAAE;QAClB,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,8BAA8B;YACzC,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;KACJ;IAED,IAAI,QAAQ,IAAI,IAAI,EAAE;QACpB,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,oBAAoB;YAC/B,QAAQ,EAAE,GAAG;YACb,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;KACJ;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EACvC,WAAW,E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