umwd-components 0.1.305 → 0.1.307
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/src/components/e-commerce/invoice/InvoicePDF.js +1 -1
- package/dist/src/data/loaders/e-commerce-loaders.js +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/lib/parseNavigation.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/e-commerce/invoice/InvoicePDF.d.ts +0 -5
- package/dist/types/index.d.ts +0 -1
- package/dist/types/types/Navigation.d.ts +6 -5
- package/package.json +1 -1
- package/src/app/page.tsx +15 -0
- package/src/components/e-commerce/invoice/InvoicePDF.tsx +9 -38
- package/src/data/loaders/e-commerce-loaders.ts +7 -6
- package/src/index.ts +0 -1
- package/src/lib/parseNavigation.ts +4 -6
- package/src/types/Navigation.tsx +6 -5
- /package/src/{middleware.ts → TODOmiddleware.ts} +0 -0
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{
|
|
7
|
+
import{__read as e,__assign as t}from"../../../../node_modules/tslib/tslib.es6.js";import l from"next/dynamic";import{StyleSheet as n,Document as o,Page as r,View as c,Text as i}from"@react-pdf/renderer";import a,{useState as m,Fragment as u}from"react";import d from"@mui/material/IconButton";import s from"@mui/material/Dialog";import E from"@mui/material/DialogContent";import y from"@mui/material/DialogActions";import p from"@mui/material/Button";import v from"@mui/icons-material/PictureAsPdf";var f=n.create({page:{flexDirection:"column",backgroundColor:"#E4E4E4"},header:{padding:10,flexDirection:"row",alignItems:"center"},logo:{width:24,height:24,marginRight:10},section:{margin:10,padding:10,fontSize:12},row:{flexDirection:"row"},rowSection:{flex:1},productRowSection:{flex:1,width:1/6},h1:{fontSize:28},h2:{fontSize:24,fontStyle:"bold"},h3:{fontSize:16,fontStyle:"bold"}});function S(e){var l,n,m=e.props.invoice,d=m.seller_business_credentials,s=m.seller_company_address,E=m.buyer_company_address,y=m.buyer_business_credentials;return a.createElement(o,null,a.createElement(r,{size:"A4",style:f.page},a.createElement(c,{style:f.header},a.createElement(i,{style:f.h1},null==d?void 0:d.company_name)),a.createElement(c,{style:f.section},a.createElement(i,{style:f.h2},"INVOICE")),a.createElement(c,{style:f.section},a.createElement(c,{style:f.row},a.createElement(c,{style:f.rowSection},a.createElement(i,{style:f.h3},"BILLING DETAILS"),a.createElement(i,null,null==y?void 0:y.company_name),a.createElement(i,null,null==m?void 0:m.buyer_first_name," ",null==m?void 0:m.buyer_last_name),a.createElement(i,null,null==E?void 0:E.street," ",null==E?void 0:E.street_number," ",null==E?void 0:E.street_number_addition),a.createElement(i,null,null==E?void 0:E.postal_code," ",null==E?void 0:E.city)),a.createElement(c,{style:f.rowSection},a.createElement(i,{style:f.h3},"FROM"),a.createElement(i,null,null==d?void 0:d.company_name),a.createElement(i,null,null==s?void 0:s.street," ",null==s?void 0:s.street_number," ",null==s?void 0:s.street_number_addition),a.createElement(i,null,null==s?void 0:s.postal_code," ",null==s?void 0:s.city),a.createElement(i,{style:{fontStyle:"bold",marginTop:10}},"CoC Number"),a.createElement(i,null,null==d?void 0:d.coc_number),a.createElement(i,{style:{fontStyle:"bold",marginTop:10}},"VAT Number"),a.createElement(i,null,null==d?void 0:d.vat_number)))),a.createElement(c,{style:f.section},a.createElement(c,{style:f.row},a.createElement(c,{style:f.rowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Invoice number"),a.createElement(i,null,null==m?void 0:m.invoice_number)),a.createElement(c,{style:f.rowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Invoice date"),a.createElement(i,null,null==m?void 0:m.invoice_date)))),a.createElement(c,{style:f.section},a.createElement(i,{style:f.h3},"SUMMARY"),a.createElement(c,{style:f.row},a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Title")),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Amount")),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"VAT rate")),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"VAT")),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Excl. VAT")),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Incl. VAT"))),null===(l=null==m?void 0:m.items)||void 0===l?void 0:l.map((function(e,t){return a.createElement(u,{key:t},a.createElement(c,{style:f.row},a.createElement(c,{style:f.productRowSection},a.createElement(i,null,e.product_title)),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,e.quantity)),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,e.vat_rate," %")),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,"€ ",(e.price_incl_vat-e.price_excl_vat).toFixed(2))),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,"€ ",e.price_excl_vat)),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,"€ ",e.price_incl_vat))))}))),a.createElement(c,{style:f.section},a.createElement(i,{style:f.h3},"TOTALS"),a.createElement(c,{style:f.row},a.createElement(c,{style:f.productRowSection}),a.createElement(c,{style:f.productRowSection}),a.createElement(c,{style:f.productRowSection}),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"VAT")),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Excl. VAT")),a.createElement(c,{style:f.productRowSection},a.createElement(i,{style:{fontStyle:"bold"}},"Incl. VAT"))),a.createElement(c,{style:f.row},a.createElement(c,{style:f.productRowSection}),a.createElement(c,{style:f.productRowSection}),a.createElement(c,{style:f.productRowSection}),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,"€ ",null===(n=null==m?void 0:m.VAT_total)||void 0===n?void 0:n.toFixed(2))),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,"€ ",null==m?void 0:m.total_excl_vat)),a.createElement(c,{style:f.productRowSection},a.createElement(i,null,"€ ",null==m?void 0:m.total_incl_vat)))),a.createElement(c,{style:f.section},a.createElement(i,{style:t(t({},f.h3),{border:"2px solid black",padding:10})},"Total Due: € ",null==m?void 0:m.total_incl_vat))))}function _(e){var t=e.invoice,n=l((function(){return import("@react-pdf/renderer").then((function(e){return e.PDFDownloadLink}))}),{ssr:!1,loading:function(){return a.createElement("p",null,"Loading...")}});return a.createElement(n,{document:a.createElement(S,{props:{invoice:t}}),fileName:"invoice_".concat(null==t?void 0:t.invoice_number)},a.createElement(d,null,a.createElement(v,null)))}function w(t){var n=t.invoice,o=l((function(){return import("@react-pdf/renderer").then((function(e){return e.PDFViewer}))}),{ssr:!1,loading:function(){return a.createElement("p",null,"Loading...")}}),r=e(m(!1),2),c=r[0],i=r[1];return a.createElement(a.Fragment,null,a.createElement(d,{onClick:function(){return i(!0)}},a.createElement(v,null)),a.createElement(s,{open:c,fullWidth:!0,maxWidth:"lg"},a.createElement(E,null,a.createElement(o,{style:{width:"100%",minHeight:"70vh"}},a.createElement(S,{props:{invoice:n}}))),a.createElement(y,null,a.createElement(p,{variant:"contained",onClick:function(){return i(!1)}},"Close"))))}export{_ as InvoiceDownloadLink,w as InvoicePDFViewer};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as e,__generator as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"../../../node_modules/qs/lib/index.js";import{fetchData as i}from"../loaders.js";import{getStrapiURL as n,flattenAttributes as s}from"../../lib/utils.js";import{unstable_noStore as o}from"next/cache";var a=n();function c(n){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return o(),(e=new URL("/api/slugify/slugs/product/".concat(n),a)).search=r.stringify({populate:{price:!0,image:!0,galery:!0,dimensions:!0,categories:!0,brand:!0}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function u(n,s){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return 4,(e=new URL("/api/products",a)).search=r.stringify({populate:{price:!0,image:!0,galery:!0,dimensions:!0,categories:!0,brand:!0},pagination:{pageSize:4,page:s}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function p(n){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return(e=new URL("/api/slugify/slugs/product-category/".concat(n),a)).search=r.stringify({populate:{products:{populate:{image:!0,price:!0}}}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function l(n,s){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return 4,(e=new URL("/api/product-categories",a)).search=r.stringify({populate:{products:{populate:{image:!0,price:!0}}},pagination:{pageSize:4,page:s}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function f(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return console.log("getCustomerProfile"),o(),(e=new URL("/api/users/me",a)).search=r.stringify({populate:{customer_profile:!0}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function d(r){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return console.log("getSingleOrder",r),o(),e=new URL("/api/opos/".concat(r),a),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function h(n,c,u,p){return e(this,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return o(),(e=new URL("/api/opos",a)).search=r.stringify({sort:"".concat(p,":").concat(u),populate:{opo_items:{populate:{product:{populate:{price:!0}}}},customer:!0,payments:!0},pagination:{pageSize:c,page:n+1}}),l=s,[4,i(e.href)];case 1:return[2,l.apply(void 0,[t.sent()])]}}))}))}function g(n,c,u,p){return e(this,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return o(),(e=new URL("/api/invoices",a)).search=r.stringify({sort:"".concat(p,":").concat(u),populate:{items:!0,seller_business_credentials:!0,seller_company_address:!0,buyer_company_address:!0,buyer_business_credentials:!0},pagination:{pageSize:c,page:n+1}}),l=s,[4,i(e.href)];case 1:return[2,l.apply(void 0,[t.sent()])]}}))}))}export{l as getAllCategories,g as getAllInvoices,h as getAllOrders,u as getAllProducts,f as getCustomerProfile,p as getSingleCategory,d as getSingleOrder,c as getSingleProduct};
|
|
7
|
+
import{__awaiter as e,__generator as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"../../../node_modules/qs/lib/index.js";import{fetchData as i}from"../loaders.js";import{getStrapiURL as n,flattenAttributes as s}from"../../lib/utils.js";import{unstable_noStore as o}from"next/cache";var a=n();function c(n){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return o(),(e=new URL("/api/slugify/slugs/product/".concat(n),a)).search=r.stringify({populate:{price:!0,image:!0,galery:!0,dimensions:!0,categories:!0,brand:!0}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function u(n,s){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return 4,(e=new URL("/api/products",a)).search=r.stringify({populate:{price:!0,image:!0,galery:!0,dimensions:!0,categories:!0,brand:!0},pagination:{pageSize:4,page:s}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function p(n){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return(e=new URL("/api/slugify/slugs/product-category/".concat(n),a)).search=r.stringify({populate:{products:{populate:{image:!0,price:!0}}}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function l(n,s){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return 4,(e=new URL("/api/product-categories",a)).search=r.stringify({populate:{products:{populate:{image:!0,price:!0}}},pagination:{pageSize:4,page:s}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function f(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return console.log("getCustomerProfile"),o(),(e=new URL("/api/users/me",a)).search=r.stringify({populate:{customer_profile:!0}}),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function d(r){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return console.log("getSingleOrder",r),o(),e=new URL("/api/opos/".concat(r),a),[4,i(e.href)];case 1:return[2,t.sent()]}}))}))}function h(n,c,u,p){return e(this,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return o(),(e=new URL("/api/opos",a)).search=r.stringify({sort:"".concat(p||"id",":").concat(u||"desc"),populate:{opo_items:{populate:{product:{populate:{price:!0}}}},customer:!0,payments:!0},pagination:{pageSize:c||10,page:n?n+1:1}}),l=s,[4,i(e.href)];case 1:return[2,l.apply(void 0,[t.sent()])]}}))}))}function g(n,c,u,p){return e(this,void 0,void 0,(function(){var e,l;return t(this,(function(t){switch(t.label){case 0:return o(),(e=new URL("/api/invoices",a)).search=r.stringify({sort:"".concat(p||"id",":").concat(u||"desc"),populate:{items:!0,seller_business_credentials:!0,seller_company_address:!0,buyer_company_address:!0,buyer_business_credentials:!0},pagination:{pageSize:c||10,page:n?n+1:1}}),l=s,[4,i(e.href)];case 1:return[2,l.apply(void 0,[t.sent()])]}}))}))}export{l as getAllCategories,g as getAllInvoices,h as getAllOrders,u as getAllProducts,f as getCustomerProfile,p as getSingleCategory,d as getSingleOrder,c as getSingleProduct};
|
package/dist/src/index.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
export{default as Address}from"./components/common/Address.js";export{default as Pagination}from"./components/common/Pagination.js";export{StyledLink}from"./components/StyledLink.js";export{default as ScrollLink}from"./components/ScrollLink.js";export{default as WhatsAppClickToChatButton}from"./components/WhatsAppClickToChatButton.js";export{default as Footer}from"./components/layout/Footer.js";export{default as Navbar}from"./components/layout/Navbar.js";export{default as NavbarV2}from"./components/layout/NavbarV2.js";export{default as SideNav}from"./components/layout/SideNav.js";export{default as WebsitePlaceholder}from"./components/WebsitePlaceholder.js";export{default as FluidBackground}from"./components/FluidBackground.js";export{default as AuthWidget}from"./components/auth/AuthWidget.js";export{default as RegisterForm}from"./components/auth/RegisterForm.js";export{default as SigninForm}from"./components/auth/SigninForm.js";export{default as DenseRegisterForm}from"./components/auth/DenseRegisterForm.js";export{default as DenseSigninForm}from"./components/auth/DenseSigninForm.js";export{default as LogoutButton}from"./components/LogoutButton.js";export{loginUserAction,logoutAction,registerUserAction}from"./data/actions/auth-actions.js";export{Page}from"./components/page-elements/Page.js";export{ContactForm}from"./components/ContactForm.js";export{getAllPages,getDisclaimerData,getHomePageData,getNavigation,getPageNames,getPagedata,getSiteData}from"./data/loaders.js";export{default as PageBuilder}from"./components/page-builder/PageBuilder.js";export{updatePageAction}from"./data/actions/pagebuilder-actions.js";export{default as EnhancedTable}from"./components/e-commerce/EnhancedTable/EnhancedTable.js";export{default as EnhancedTableRow}from"./components/e-commerce/EnhancedTable/EnhancedTableRow.js";export{default as EnhancedTableHead}from"./components/e-commerce/EnhancedTable/EnhancedTableHead.js";export{default as EnhancedTableToolbar}from"./components/e-commerce/EnhancedTable/EnhancedTableToolbar.js";export{default as ProductCard}from"./components/e-commerce/products/ProductCard.js";export{default as Price}from"./components/e-commerce/products/Price.js";export{default as ProductCategoryCard}from"./components/e-commerce/products/ProductCategoryCard.js";export{default as SingleProduct}from"./components/e-commerce/products/SingleProduct.js";export{default as CheckoutForm}from"./components/e-commerce/checkout/CheckoutForm.js";export{default as Step1}from"./components/e-commerce/checkout/Step1.js";export{default as Step2}from"./components/e-commerce/checkout/Step2.js";export{default as Step3}from"./components/e-commerce/checkout/Step3.js";export{default as Step4}from"./components/e-commerce/checkout/Step4.js";export{default as Step5}from"./components/e-commerce/checkout/Step5.js";export{default as BusinessCredentials}from"./components/e-commerce/customer/BusinessCredentials.js";export{default as CustomerProfileEditForm}from"./components/e-commerce/customer/CustomerProfileEditForm.js";export{default as DenseCustomerProfileDisplay}from"./components/e-commerce/customer/DenseCustomerProfileDisplay.js";export{default as CustomerProfileDisplay}from"./components/e-commerce/customer/CustomerProfileDisplay.js";export{SessionProvider,useSession}from"./context/auth/SessionContext.js";export{default as CartDisplay}from"./components/e-commerce/cart/CartDisplay.js";export{default as CartSummaryRow}from"./components/e-commerce/cart/CartSummaryRow.js";export{default as CartSummary}from"./components/e-commerce/cart/CartSummary.js";export{default as CartWidget}from"./components/e-commerce/cart/CartWidget.js";export{default as AddToCartButton}from"./components/e-commerce/cart/AddToCartButton.client.js";export{CartProvider,useCart}from"./context/e-commerce/cart/CartContext.js";export{default as OpoDisplay}from"./components/e-commerce/opo/OpoDisplay.js";export{OpoSummary}from"./components/e-commerce/opo/OpoSummary.js";export{OpoSummaryRow}from"./components/e-commerce/opo/OpoSummaryRow.js";export{PaymentStatusIndicator}from"./components/e-commerce/opo/PaymentStatusIndicator.js";export{InvoiceDownloadLink,
|
|
6
|
+
export{default as Address}from"./components/common/Address.js";export{default as Pagination}from"./components/common/Pagination.js";export{StyledLink}from"./components/StyledLink.js";export{default as ScrollLink}from"./components/ScrollLink.js";export{default as WhatsAppClickToChatButton}from"./components/WhatsAppClickToChatButton.js";export{default as Footer}from"./components/layout/Footer.js";export{default as Navbar}from"./components/layout/Navbar.js";export{default as NavbarV2}from"./components/layout/NavbarV2.js";export{default as SideNav}from"./components/layout/SideNav.js";export{default as WebsitePlaceholder}from"./components/WebsitePlaceholder.js";export{default as FluidBackground}from"./components/FluidBackground.js";export{default as AuthWidget}from"./components/auth/AuthWidget.js";export{default as RegisterForm}from"./components/auth/RegisterForm.js";export{default as SigninForm}from"./components/auth/SigninForm.js";export{default as DenseRegisterForm}from"./components/auth/DenseRegisterForm.js";export{default as DenseSigninForm}from"./components/auth/DenseSigninForm.js";export{default as LogoutButton}from"./components/LogoutButton.js";export{loginUserAction,logoutAction,registerUserAction}from"./data/actions/auth-actions.js";export{Page}from"./components/page-elements/Page.js";export{ContactForm}from"./components/ContactForm.js";export{getAllPages,getDisclaimerData,getHomePageData,getNavigation,getPageNames,getPagedata,getSiteData}from"./data/loaders.js";export{default as PageBuilder}from"./components/page-builder/PageBuilder.js";export{updatePageAction}from"./data/actions/pagebuilder-actions.js";export{default as EnhancedTable}from"./components/e-commerce/EnhancedTable/EnhancedTable.js";export{default as EnhancedTableRow}from"./components/e-commerce/EnhancedTable/EnhancedTableRow.js";export{default as EnhancedTableHead}from"./components/e-commerce/EnhancedTable/EnhancedTableHead.js";export{default as EnhancedTableToolbar}from"./components/e-commerce/EnhancedTable/EnhancedTableToolbar.js";export{default as ProductCard}from"./components/e-commerce/products/ProductCard.js";export{default as Price}from"./components/e-commerce/products/Price.js";export{default as ProductCategoryCard}from"./components/e-commerce/products/ProductCategoryCard.js";export{default as SingleProduct}from"./components/e-commerce/products/SingleProduct.js";export{default as CheckoutForm}from"./components/e-commerce/checkout/CheckoutForm.js";export{default as Step1}from"./components/e-commerce/checkout/Step1.js";export{default as Step2}from"./components/e-commerce/checkout/Step2.js";export{default as Step3}from"./components/e-commerce/checkout/Step3.js";export{default as Step4}from"./components/e-commerce/checkout/Step4.js";export{default as Step5}from"./components/e-commerce/checkout/Step5.js";export{default as BusinessCredentials}from"./components/e-commerce/customer/BusinessCredentials.js";export{default as CustomerProfileEditForm}from"./components/e-commerce/customer/CustomerProfileEditForm.js";export{default as DenseCustomerProfileDisplay}from"./components/e-commerce/customer/DenseCustomerProfileDisplay.js";export{default as CustomerProfileDisplay}from"./components/e-commerce/customer/CustomerProfileDisplay.js";export{SessionProvider,useSession}from"./context/auth/SessionContext.js";export{default as CartDisplay}from"./components/e-commerce/cart/CartDisplay.js";export{default as CartSummaryRow}from"./components/e-commerce/cart/CartSummaryRow.js";export{default as CartSummary}from"./components/e-commerce/cart/CartSummary.js";export{default as CartWidget}from"./components/e-commerce/cart/CartWidget.js";export{default as AddToCartButton}from"./components/e-commerce/cart/AddToCartButton.client.js";export{CartProvider,useCart}from"./context/e-commerce/cart/CartContext.js";export{default as OpoDisplay}from"./components/e-commerce/opo/OpoDisplay.js";export{OpoSummary}from"./components/e-commerce/opo/OpoSummary.js";export{OpoSummaryRow}from"./components/e-commerce/opo/OpoSummaryRow.js";export{PaymentStatusIndicator}from"./components/e-commerce/opo/PaymentStatusIndicator.js";export{InvoiceDownloadLink,InvoicePDFViewer}from"./components/e-commerce/invoice/InvoicePDF.js";export{getAllCategories,getAllInvoices,getAllOrders,getAllProducts,getCustomerProfile,getSingleCategory,getSingleOrder,getSingleProduct}from"./data/loaders/e-commerce-loaders.js";export{flattenAttributes,formDataToBlocks,getStrapiMedia,getStrapiURL}from"./lib/utils.js";export{areBusinessCredentailsComplete}from"./lib/areBusinessCredentialsComplete.js";export{isCustomerProfileComplete}from"./lib/isCustomerProfileComplete.js";export{parseFormData}from"./lib/parseFormData.js";export{parseStrapiNavigation as parseNavigation}from"./lib/parseNavigation.js";export{ExplanatoryFoldOut}from"./components/ExplanatoryFoldOut.js";export{getExtendedUserMeLoader}from"./data/services/get-user-me-loader.js";export{BlockRendererClient}from"./components/BlockRendererClient.js";
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__values as t}from"../../node_modules/tslib/tslib.es6.js";function r(r){var e,l,n,a,
|
|
6
|
+
import{__values as t}from"../../node_modules/tslib/tslib.es6.js";function r(r){var e,l,n,a,s=[];try{for(var u=t(Object.values(r.pages)),i=u.next();!i.done;i=u.next()){var o=i.value;if(null==o.parent){var f={id:o.slug,title:o.title,path:"".concat(o.path),slug:o.slug,subItems:[]};s.push(f)}}}catch(t){e={error:t}}finally{try{i&&!i.done&&(l=u.return)&&l.call(u)}finally{if(e)throw e.error}}var c=function(t){if(null!==t.parent){var r=s.find((function(r){return r.id===t.parent}));if(r){r.subItems||(r.subItems=[]);var e={id:t.id.toString(),title:t.title,path:"".concat(t.path),slug:t.slug,subItems:[]};r.subItems.push(e)}}};try{for(var p=t(Object.values(r.pages)),v=p.next();!v.done;v=p.next()){c(v.value)}}catch(t){n={error:t}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(n)throw n.error}}return s}export{r as parseStrapiNavigation};
|