umwd-components 0.1.312 → 0.1.313
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/public-information/PublicInformationForm.js +7 -0
- package/dist/src/data/actions/public-information/updatePublicInformationAction.js +7 -0
- package/dist/src/data/loaders/public-information/getPublicInformation.js +7 -0
- package/dist/src/index.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/index.ts +4 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import{__read as e}from"../../../node_modules/tslib/tslib.es6.js";import r from"@mui/material/Divider";import t from"@mui/material/Paper";import a from"@mui/material/Box";import o from"@mui/material/Stack";import i from"@mui/material/Alert";import m from"@mui/material/TextField";import n from"@mui/material/Typography";import{SubmitButton as l}from"../SubmitButton.js";import{useFormState as s}from"react-dom";import{StrapiErrors as c}from"../StrapiErrors.js";import{BusinessCredentialsFields as d}from"../e-commerce/customer/BusinessCredentials.js";import p from"react";import{AddressFields as u}from"../common/Address.js";import{updatePublicInformationAction as f}from"../../data/actions/public-information/updatePublicInformationAction.js";var E={zodErrors:null,strapiErrors:null,data:null,message:null};function b(b){var v=b.publicInformation;console.log(v),v.id;var g=v.title,x=v.description;v.disclaimer_link,v.privacypolicy_link,v.maxWidth;var _=v.email,h=v.phone_number,y=v.business_credentials,j=v.address;v.socials,v.header_logo,v.footer_logo;var k=e(s(f,E),2),T=k[0],A=k[1];return p.createElement(a,{component:t,sx:{p:2}},p.createElement("form",{action:A},p.createElement(o,{spacing:2},p.createElement(o,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{backgroundColor:"secondary.dark",px:2,py:1}},p.createElement(l,{text:"save changes",loadingText:"loading",sx:{color:"secondary.contrastText"}}),p.createElement(c,{error:null==T?void 0:T.strapiErrors}),(null==T?void 0:T.message)&&p.createElement(i,{severity:"error"},null==T?void 0:T.message)),p.createElement(m,{id:"title",name:"title",label:"Title",defaultValue:g}),p.createElement(m,{id:"description",name:"description",label:"Description",defaultValue:x}),p.createElement(m,{id:"email",name:"email",label:"email",defaultValue:_}),p.createElement(m,{id:"phone_number",name:"phone_number",label:"phone_number",defaultValue:h}),p.createElement(n,{variant:"h6"},"Company Address"),p.createElement(r,null),p.createElement(u,{componentName:"address",componentReference:"common.address",data:j}),p.createElement(r,null),p.createElement(n,{variant:"h6"},"Business Credentials"),p.createElement(d,{componentName:"business_credentials",componentReference:"business.credentials",data:y}))))}export{b as PublicInformationForm};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import{__awaiter as r,__generator as t,__assign as o}from"../../../../node_modules/tslib/tslib.es6.js";import{mutateData as e}from"../../services/mutate-data.js";import{flattenAttributes as s}from"../../../lib/utils.js";import{parseFormData as i}from"../../../lib/parseFormData.js";function a(a,n){return r(this,void 0,void 0,(function(){var r,l,m,p;return t(this,(function(t){switch(t.label){case 0:return r=Object.fromEntries(n),console.log("rawFormData",r),l=i(n),console.log("parsedFormData",l),r.id,[4,e("PUT","/api/public-information",l)];case 1:return(m=t.sent())?m.error?[2,o(o({},a),{strapiErrors:m.error,message:"Failed to Register."})]:(p=s(m),[2,o(o({},a),{message:"Public Information Updated",data:p,strapiErrors:null})]):[2,o(o({},a),{strapiErrors:null,message:"Ops! Something went wrong. Please try again."})]}}))}))}export{a as updatePublicInformationAction};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import{__awaiter as i,__generator as r}from"../../../../node_modules/tslib/tslib.es6.js";import e from"../../../../node_modules/qs/lib/index.js";import{fetchData as s}from"../../loaders.js";import{getStrapiURL as o,flattenAttributes as t}from"../../../lib/utils.js";import{unstable_noStore as n}from"next/cache";var a=o();function l(){return i(this,void 0,void 0,(function(){var i,o;return r(this,(function(r){switch(r.label){case 0:return n(),(i=new URL("/api/public-information",a)).search=e.stringify({populate:{address:!0,business_credentials:!0}}),o=t,[4,s(i.href)];case 1:return[2,o.apply(void 0,[r.sent()])]}}))}))}export{l as getPublicInformation};
|
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,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";
|
|
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{PublicInformationForm}from"./components/public-information/PublicInformationForm.js";export{getPublicInformation}from"./data/loaders/public-information/getPublicInformation.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";
|