umwd-components 0.1.370 → 0.1.371
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/node_modules/base64-js/index.js +1 -1
- package/dist/node_modules/ieee754/index.js +1 -1
- package/dist/src/components/common/markdown/MarkdownEditor.js +1 -1
- package/dist/src/components/e-commerce/products/AddProductForm.js +1 -1
- package/dist/src/components/e-commerce/products/EditProductForm.js +1 -1
- package/dist/src/components/e-commerce/products/ProductCard.js +1 -1
- package/dist/src/components/e-commerce/products/SingleProduct.js +1 -1
- package/dist/src/components/logistics/note/NoteTakingComponent.js +1 -1
- package/dist/src/components/logistics/note/NotesDisplay.js +1 -1
- package/dist/src/components/page-builder/PageBuilder.js +1 -1
- package/dist/src/components/public-information/PublicInformationForm.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/common/markdown/MarkdownEditor.d.ts +3 -1
- package/dist/types/components/public-information/PublicInformationForm.d.ts +3 -1
- package/dist/types/types/public-information/types.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/common/markdown/MarkdownEditor.tsx +11 -2
- package/src/components/e-commerce/products/AddProductForm.tsx +2 -11
- package/src/components/e-commerce/products/EditProductForm.tsx +6 -0
- package/src/components/e-commerce/products/ProductCard.tsx +8 -2
- package/src/components/e-commerce/products/ProductCategoryCard.tsx +0 -1
- package/src/components/e-commerce/products/SingleProduct.tsx +2 -1
- package/src/components/logistics/note/NoteTakingComponent.tsx +13 -1
- package/src/components/logistics/note/NotesDisplay.tsx +2 -1
- package/src/components/page-builder/PageBuilder.tsx +11 -22
- package/src/components/public-information/PublicInformationForm.tsx +9 -6
- package/src/types/public-information/types.tsx +2 -0
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__exports as r}from"../../_virtual/
|
|
6
|
+
import{__exports as r}from"../../_virtual/index6.js";var t;function e(){if(t)return r;t=1,r.byteLength=function(r){var t=i(r),e=t[0],n=t[1];return 3*(e+n)/4-n},r.toByteArray=function(r){var t,e,a=i(r),u=a[0],h=a[1],c=new o(function(r,t,e){return 3*(t+e)/4-e}(0,u,h)),f=0,d=h>0?u-4:u;for(e=0;e<d;e+=4)t=n[r.charCodeAt(e)]<<18|n[r.charCodeAt(e+1)]<<12|n[r.charCodeAt(e+2)]<<6|n[r.charCodeAt(e+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;2===h&&(t=n[r.charCodeAt(e)]<<2|n[r.charCodeAt(e+1)]>>4,c[f++]=255&t);1===h&&(t=n[r.charCodeAt(e)]<<10|n[r.charCodeAt(e+1)]<<4|n[r.charCodeAt(e+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t);return c},r.fromByteArray=function(r){for(var t,n=r.length,o=n%3,a=[],u=16383,i=0,c=n-o;i<c;i+=u)a.push(h(r,i,i+u>c?c:i+u));1===o?(t=r[n-1],a.push(e[t>>2]+e[t<<4&63]+"==")):2===o&&(t=(r[n-2]<<8)+r[n-1],a.push(e[t>>10]+e[t>>4&63]+e[t<<2&63]+"="));return a.join("")};for(var e=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u<64;++u)e[u]=a[u],n[a.charCodeAt(u)]=u;function i(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function h(r,t,n){for(var o,a,u=[],i=t;i<n;i+=3)o=(r[i]<<16&16711680)+(r[i+1]<<8&65280)+(255&r[i+2]),u.push(e[(a=o)>>18&63]+e[a>>12&63]+e[a>>6&63]+e[63&a]);return u.join("")}return n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63,r}export{e as __require};
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__exports as a}from"../../_virtual/
|
|
6
|
+
import{__exports as a}from"../../_virtual/index7.js";
|
|
7
7
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var t;function o(){return t||(t=1,a.read=function(a,t,o,r,h){var M,e,i=8*h-r-1,p=(1<<i)-1,f=p>>1,n=-7,w=o?h-1:0,s=o?-1:1,u=a[t+w];for(w+=s,M=u&(1<<-n)-1,u>>=-n,n+=i;n>0;M=256*M+a[t+w],w+=s,n-=8);for(e=M&(1<<-n)-1,M>>=-n,n+=r;n>0;e=256*e+a[t+w],w+=s,n-=8);if(0===M)M=1-f;else{if(M===p)return e?NaN:1/0*(u?-1:1);e+=Math.pow(2,r),M-=f}return(u?-1:1)*e*Math.pow(2,M-r)},a.write=function(a,t,o,r,h,M){var e,i,p,f=8*M-h-1,n=(1<<f)-1,w=n>>1,s=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,u=r?0:M-1,N=r?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(i=isNaN(t)?1:0,e=n):(e=Math.floor(Math.log(t)/Math.LN2),t*(p=Math.pow(2,-e))<1&&(e--,p*=2),(t+=e+w>=1?s/p:s*Math.pow(2,1-w))*p>=2&&(e++,p/=2),e+w>=n?(i=0,e=n):e+w>=1?(i=(t*p-1)*Math.pow(2,h),e+=w):(i=t*Math.pow(2,w-1)*Math.pow(2,h),e=0));h>=8;a[o+u]=255&i,u+=N,i/=256,h-=8);for(e=e<<h|i,f+=h;f>0;a[o+u]=255&e,u+=N,e/=256,f-=8);a[o+u-N]|=128*_}),a}export{o as __require};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import
|
|
7
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import a from"react";import r from"@mui/material/Box";import i from"@mui/material/Paper";import m from"@mui/material/Stack";import l from"@mui/material/TextField";import{useTheme as o}from"@mui/material/styles";import n from"./MarkdownDisplay.js";function s(s){var p=s.name,c=s.label,u=s.defaultValue,d=s.sx,f=e(a.useState(u||""),2),x=f[0],g=f[1],h=o();return a.createElement(m,{direction:"row",spacing:2,sx:t([],e(Array.isArray(d)?d:[d]),!1)},a.createElement(l,{name:p,label:c,multiline:!0,minRows:4,value:x,placeholder:"# Heading 1 \n ## Heading 2 \n ### Heading 3 \n **bold** \n *italic*",onChange:function(e){return g("".concat(e.target.value))},sx:{flex:1,whiteSpace:"pre",height:"100%"}}),a.createElement(r,{sx:{flex:1}},a.createElement(i,{sx:{p:2,border:"1px solid ".concat(h.palette.primary.main),height:"100%"}},a.createElement(n,null,x))))}export{s as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as n}from"react";import i from"@mui/material/Paper";import m from"@mui/material/Box";import a from"@mui/material/Stack";import l from"@mui/material/Alert";import o from"@mui/material/TextField";import c from"@mui/material/Typography";import{SubmitButton as s}from"../../SubmitButton.js";import{useFormState as d}from"react-dom";import{StrapiErrors as u}from"../../StrapiErrors.js";import{createProductAction as p}from"../../../data/actions/e-commerce/product/createProductAction.js";import{MediaLibraryDialog as E}from"../../common/media/MediaLibraryDialog.js";import
|
|
7
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as n}from"react";import i from"@mui/material/Paper";import m from"@mui/material/Box";import a from"@mui/material/Stack";import l from"@mui/material/Alert";import o from"@mui/material/TextField";import c from"@mui/material/Typography";import{SubmitButton as s}from"../../SubmitButton.js";import{useFormState as d}from"react-dom";import{StrapiErrors as u}from"../../StrapiErrors.js";import{createProductAction as p}from"../../../data/actions/e-commerce/product/createProductAction.js";import{MediaLibraryDialog as E}from"../../common/media/MediaLibraryDialog.js";import f from"@mui/material/Button";import g from"@mui/material/Grid";import{StrapiImage as h}from"../../StrapiImage.js";import{PriceFields as v}from"./PriceFields.js";import x from"../categories/CategorySelectorV2.js";import{DimensionsFields as y}from"../../common/Dimensions.js";import j from"../../logistics/vendor/VendorSelector.js";import w from"../../common/markdown/MarkdownEditor.js";var S={zodErrors:null,strapiErrors:null,data:null,message:null};function b(b){var C=b.vendorArr,k=b.categories,T=e(d(p,S),2),P=T[0],V=T[1],D=e(n(null),2),I=D[0],N=D[1],A=e(n(null),2),B=A[0],O=A[1],F=e(n([]),2),G=F[0],M=F[1];return r.createElement(m,{component:i,sx:{p:2}},r.createElement("form",{action:V},r.createElement(g,{container:!0,spacing:2},r.createElement(g,{item:!0,xs:12},r.createElement(a,{spacing:2},r.createElement(o,{id:"title",name:"title",label:"Title"}),r.createElement(w,{name:"description",label:"Description"}))),r.createElement(g,{item:!0,xs:6},r.createElement(c,{variant:"h6"},"Product Image"),r.createElement("input",{id:"image",type:"hidden",name:"image",value:(null==B?void 0:B.id)||""}),r.createElement(h,{id:(null==B?void 0:B.id)||"",url:(null==B?void 0:B.url)||"",alternativeText:"product image",width:(null==B?void 0:B.width)&&(null==B?void 0:B.height)?B.width/B.height*200:200,height:200}),r.createElement(f,{onClick:function(){return N("image")}},"open media library"),r.createElement(E,{open:"image"===I,handleClose:function(){return N(null)},handleCancel:function(){O(null),N(null)},handleSelect:function(e){O(e)},selected:B?[B]:[]})),r.createElement(g,{item:!0,xs:6},r.createElement(c,{variant:"h6"},"Image Gallery"),r.createElement("input",{id:"gallery",type:"hidden",name:"gallery",value:JSON.stringify(G.map((function(e){return e.id})))}),r.createElement(a,{direction:"row",spacing:2},G.map((function(e){return r.createElement(h,{key:e.id,id:e.id,url:e.url,alternativeText:"gallery image",width:e.width/e.height*100,height:100})}))),r.createElement(f,{onClick:function(){return N("gallery")}},"open media library"),r.createElement(E,{open:"gallery"===I,handleClose:function(){return N(null)},handleCancel:function(){M([]),N(null)},handleSelect:function(r){if(G.indexOf(r)>-1){var n=t([],e(G),!1);n.splice(G.indexOf(r),1),M(n)}else G.length>=5?M(t([],e(G),!1)):M(t(t([],e(G),!1),[r],!1))},selected:G})),r.createElement(g,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Price"),r.createElement(v,{componentName:"price",componentReference:"e-commerce-elements.price"})),r.createElement(g,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Categories"),r.createElement(x,{categories:k,currentValue:[]})),r.createElement(g,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Dimensions"),r.createElement(y,{componentName:"dimensions",componentReference:"e-commerce-elements.dimensions"})),r.createElement(g,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Vendors"),r.createElement(j,{vendorNames:C,currentValue:null}))),r.createElement(g,{item:!0,xs:12},r.createElement(a,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:2}},r.createElement(s,{text:"create new product",loadingText:"loading"}),r.createElement(u,{error:null==P?void 0:P.strapiErrors}),(null==P?void 0:P.message)&&r.createElement(l,{severity:"error"},null==P?void 0:P.message)))))}export{b as AddProductForm};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as i}from"react";import n from"@mui/material/Paper";import a from"@mui/material/Box";import l from"@mui/material/Stack";import m from"@mui/material/Alert";import o from"@mui/material/TextField";import c from"@mui/material/Typography";import{SubmitButton as d}from"../../SubmitButton.js";import{useFormState as u}from"react-dom";import{StrapiErrors as s}from"../../StrapiErrors.js";import{updateProductAction as p}from"../../../data/actions/e-commerce/product/updateProductAction.js";import{MediaLibraryDialog as
|
|
7
|
+
import{__read as e,__spreadArray as t}from"../../../../node_modules/tslib/tslib.es6.js";import r,{useState as i}from"react";import n from"@mui/material/Paper";import a from"@mui/material/Box";import l from"@mui/material/Stack";import m from"@mui/material/Alert";import o from"@mui/material/TextField";import c from"@mui/material/Typography";import{SubmitButton as d}from"../../SubmitButton.js";import{useFormState as u}from"react-dom";import{StrapiErrors as s}from"../../StrapiErrors.js";import{updateProductAction as p}from"../../../data/actions/e-commerce/product/updateProductAction.js";import{MediaLibraryDialog as E}from"../../common/media/MediaLibraryDialog.js";import g from"@mui/material/Button";import f from"@mui/material/Grid";import{StrapiImage as v}from"../../StrapiImage.js";import{PriceFields as h}from"./PriceFields.js";import y from"../categories/CategorySelectorV2.js";import{DimensionsFields as x}from"../../common/Dimensions.js";import w from"../../logistics/vendor/VendorSelector.js";import j from"../../common/markdown/MarkdownEditor.js";var b={zodErrors:null,strapiErrors:null,data:null,message:null};function S(S){var C,V,k=S.data,T=S.vendorArr,D=S.categoriesArray,I=k.id,P=k.title,A=k.description,N=k.image,R=k.gallery,B=k.price,F=k.dimensions,G=k.categories,M=k.vendors;console.log("data",k);var z=(null==R?void 0:R.data)||[],J=(null==G?void 0:G.data)||[],L=e(u(p,b),2),O=L[0],_=L[1],q=e(i(null),2),H=q[0],K=q[1],Q=e(i(N||null),2),U=Q[0],W=Q[1],X=e(i(t([],e(z),!1)),2),Y=X[0],Z=X[1];return r.createElement(a,{component:n,sx:{p:2}},r.createElement("form",{action:_},I&&r.createElement("input",{id:"id",type:"hidden",name:"id",value:I}),r.createElement(f,{container:!0,spacing:2},r.createElement(f,{item:!0,xs:12},r.createElement(l,{spacing:2},r.createElement(o,{id:"title",name:"title",label:"Title",defaultValue:P}),r.createElement(o,{id:"description",name:"description",label:"Description",multiline:!0,minRows:4,maxRows:8,defaultValue:A}),r.createElement(j,{name:"description",label:"Description",defaultValue:A}))),r.createElement(f,{item:!0,xs:6},r.createElement(c,{variant:"h6"},"Product Image"),r.createElement("input",{id:"image",type:"hidden",name:"image",value:null==U?void 0:U.id}),r.createElement(v,{id:(null==U?void 0:U.id)||"",url:(null==U?void 0:U.url)||"",alternativeText:"product image",width:(null==U?void 0:U.width)&&(null==U?void 0:U.height)?U.width/U.height*200:200,height:200}),r.createElement(g,{onClick:function(){return K("image")}},"open media library"),r.createElement(E,{open:"image"===H,handleClose:function(){return K(null)},handleCancel:function(){W(null),K(null)},handleSelect:function(e){W(e)},selected:U?[U]:[]})),r.createElement(f,{item:!0,xs:6},r.createElement(c,{variant:"h6"},"Image Gallery"),r.createElement("input",{id:"gallery",type:"hidden",name:"gallery",value:JSON.stringify(Y.map((function(e){return e.id})))}),r.createElement(l,{direction:"row",spacing:2},Y.map((function(e){return r.createElement(v,{key:e.id,id:e.id,url:e.url,alternativeText:"gallery image",width:(null==e?void 0:e.width)&&(null==e?void 0:e.height)?e.width/e.height*100:100,height:100})}))),r.createElement(g,{onClick:function(){return K("gallery")}},"open media library"),r.createElement(E,{open:"gallery"===H,handleClose:function(){return K(null)},handleCancel:function(){Z([]),K(null)},handleSelect:function(r){var i=Y.findIndex((function(e){return e.id===r.id}));if(i>-1){var n=t([],e(Y),!1);n.splice(i,1),Z(n)}else Y.length>=5?Z(t([],e(Y),!1)):Z(t(t([],e(Y),!1),[r],!1))},selected:Y})),r.createElement(f,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Price"),r.createElement(h,{componentName:"price",componentReference:"e-commerce-elements.price",data:B})),r.createElement(f,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Categories"),r.createElement(y,{categories:D,currentValue:t([],e(J.map((function(e){return e.id}))),!1)})),r.createElement(f,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Dimensions"),r.createElement(x,{componentName:"dimensions",componentReference:"e-commerce-elements.dimensions",data:F})),r.createElement(f,{item:!0,xs:12},r.createElement(c,{variant:"h6"},"Vendors"),r.createElement(w,{vendorNames:T,currentValue:null===(V=null===(C=M.data)||void 0===C?void 0:C[0])||void 0===V?void 0:V.id}))),r.createElement(f,{item:!0,xs:12},r.createElement(l,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:1}},r.createElement(d,{text:"update product",loadingText:"loading"}),(null==O?void 0:O.strapiErrors)&&r.createElement(s,{error:null==O?void 0:O.strapiErrors}),(null==O?void 0:O.message)&&r.createElement(m,{severity:"error"},null==O?void 0:O.message)))))}export{S as EditProductForm};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__spreadArray as t,__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import r from"react";import i from"@mui/material/Box";import a from"@mui/material/Card";import o from"@mui/material/CardActions";import m from"@mui/material/CardContent";import l from"@mui/material/CardMedia";import n from"@mui/material/Button";import c from"@mui/material/Typography";import u from"@mui/material/Stack";import p from"./Price.js";import{getStrapiMedia as s}from"../../../lib/utils.js";import{StyledLink as d}from"../../StyledLink.js";import f from"../cart/AddToCartButton.client.js";function
|
|
6
|
+
import{__spreadArray as t,__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import r from"react";import i from"@mui/material/Box";import a from"@mui/material/Card";import o from"@mui/material/CardActions";import m from"@mui/material/CardContent";import l from"@mui/material/CardMedia";import n from"@mui/material/Button";import c from"@mui/material/Typography";import u from"@mui/material/Stack";import p from"./Price.js";import{getStrapiMedia as s}from"../../../lib/utils.js";import{StyledLink as d}from"../../StyledLink.js";import f from"../cart/AddToCartButton.client.js";import v from"../../common/markdown/MarkdownDisplay.js";function _(_){var x,h,E=_.product,y=_.sx,b=void 0===y?[]:y,g=E.id,j=E.uuid,C=E.product_number,w=E.title,k=E.description,A=E.slug,B=E.price,M=E.image,T=s(null==M?void 0:M.url),D=s(null===(h=null===(x=null==M?void 0:M.formats)||void 0===x?void 0:x.thumbnail)||void 0===h?void 0:h.url);return r.createElement(a,{sx:t([{width:"100%",height:"100%"},{display:"flex",flexDirection:"column"}],e(Array.isArray(b)?b:[b]),!1)},r.createElement(l,{component:"img",height:"140",src:"".concat(T),alt:M.alternativeText}),r.createElement(m,null,r.createElement(u,{direction:"row",justifyContent:"space-between",sx:{pb:2}},r.createElement(d,{href:"/shop/".concat(A),target:"_self"},r.createElement(c,{variant:"h5"},w)),r.createElement(p,{id:g,price:B.price,vat:B.vat,vat_rate:B.vat_rate,price_incl_vat:B.price_incl_vat})),k&&r.createElement(v,null,k.substring(0,150)+"...")),r.createElement(i,{sx:{flexGrow:1}}),r.createElement(o,{sx:{display:"flex",justifyContent:"flex-end"}},r.createElement(n,{size:"small",href:"/shop/".concat(A)},"Learn More"),r.createElement(f,{product:{id:g,uuid:j,slug:A,thumb:D,title:w,vat_rate:B.vat_rate,price_excl_vat:B.price,price_incl_vat:B.price_incl_vat,quantity:1,product_number:C}})))}export{_ as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import e,{Suspense as t}from"react";import l from"@mui/material/Box";import
|
|
6
|
+
import e,{Suspense as t}from"react";import l from"@mui/material/Box";import r from"@mui/material/Button";import i from"@mui/material/Typography";import a from"@mui/material/Stack";import n from"@mui/material/Grid";import m from"@mui/material/Paper";import{getStrapiMedia as o}from"../../../lib/utils.js";import c from"next/link";import{StrapiImage as u}from"../../StrapiImage.js";import d from"../cart/AddToCartButton.client.js";import s from"../../common/markdown/MarkdownDisplay.js";function p(p){var v,g,E,x,f=p.product;p.sx;var h=f.id,y=f.uuid,_=f.product_number,b=f.title,k=f.description,T=f.slug,j=f.price,w=f.image;f.gallery;var B=f.categories,F=f.stock,C=(null==w?void 0:w.url)?o(w.url):null,A=(null===(g=null===(v=null==w?void 0:w.formats)||void 0===v?void 0:v.thumbnail)||void 0===g?void 0:g.url)?o(w.formats.thumbnail.url):null;return e.createElement(e.Fragment,null,e.createElement(n,{container:!0,spacing:2,sx:{py:3,minHeight:"60vh"}},e.createElement(n,{item:!0,xs:12,sm:12,md:12,lg:12,xl:12},e.createElement(i,{variant:"h4",align:"left",component:"h1"},b)),e.createElement(n,{item:!0,xs:12,sm:8,md:9,lg:4,xl:4},e.createElement(s,null,k)),e.createElement(n,{item:!0,xs:12,sm:4,md:3,lg:3,xl:3},(null==j?void 0:j.price)&&e.createElement(m,{sx:{p:1}},e.createElement(a,{spacing:1},e.createElement(i,{variant:"body2"},"Price excl. VAT € ",j.price.toFixed(2)),j.price_incl_vat&&e.createElement(i,{variant:"body2",sx:{fontWeight:600}},"Price incl. VAT € ",j.price_incl_vat.toFixed(2)),e.createElement(i,{variant:"body2",sx:{fontWeight:600,color:0===F?"red":"white"},align:"right"},F," items in stock"),e.createElement(d,{product:{id:h,uuid:y,slug:T,thumb:A,title:b,vat_rate:j.vat_rate,quantity:1,price_excl_vat:j.price,price_incl_vat:j.price_incl_vat,product_number:_}})))),e.createElement(n,{item:!0,xs:12,sm:12,md:6,lg:5,xl:5},null!==C&&e.createElement(l,{sx:{height:"400px",width:"100%",position:"relative"}},e.createElement(t,{fallback:e.createElement("div",null,"Loading...")},e.createElement(u,{id:w.id,url:C,alternativeText:w.alternativeText,fill:!0,style:{objectFit:"contain"}})))),e.createElement(n,{item:!0,xs:12,sm:12,md:6,lg:7,xl:7},e.createElement(n,{container:!0,spacing:2},e.createElement(n,{item:!0,xs:12},e.createElement(i,{variant:"h6"},"Image galleryy")),e.createElement(n,{item:!0,xs:12},e.createElement(t,{fallback:e.createElement("div",null,"Loading...")},e.createElement(a,{spacing:1,direction:"row"},(null===(E=null==f?void 0:f.gallery)||void 0===E?void 0:E.data)&&f.gallery.data.map((function(t){var r=(null==t?void 0:t.url)?o(t.url):null;return e.createElement(l,{key:t.id,sx:{width:" 150px",height:"150px",position:"relative"}},null!==r&&e.createElement(u,{id:t.id,url:r,alternativeText:t.alternativeText,fill:!0,style:{objectFit:"contain"}}))}))))),e.createElement(n,{item:!0,xs:12,md:6},(null==B?void 0:B.data)&&e.createElement(a,{justifyContent:"center",alignItems:"center",direction:1===B.data.length?"row":"column"},1===B.data.length?e.createElement(i,null,"Category:"):e.createElement(i,null,"Categories:"),null===(x=B.data)||void 0===x?void 0:x.map((function(t){return e.createElement(c,{href:"/shop/categories/".concat(t.slug),key:t.id,legacyBehavior:!0},e.createElement(r,{variant:"text"},t.slug))})))),e.createElement(n,{item:!0,xs:12,md:6},e.createElement(a,null,e.createElement(c,{href:"/shop",legacyBehavior:!0},e.createElement(r,{variant:"outlined"},"continue shopping"))))))))}export{p as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r}from"react";import o from"@mui/material/Alert";import a from"@mui/material/IconButton";import
|
|
6
|
+
import{__read as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as r}from"react";import o from"@mui/material/Alert";import a from"@mui/material/IconButton";import m from"@mui/material/Dialog";import l from"@mui/material/DialogContent";import i from"@mui/material/DialogActions";import n from"@mui/material/Button";import c from"@mui/material/Typography";import f from"@mui/material/Paper";import u from"@mui/material/Stack";import s from"@mui/icons-material/NoteAlt";import{SubmitButton as d}from"../../SubmitButton.js";import{StrapiErrors as p}from"../../StrapiErrors.js";import{useFormState as g}from"react-dom";import{createNoteAction as E}from"../../../data/actions/logistics/note/createNoteAction.js";import b from"../../common/markdown/MarkdownEditor.js";import{formatDate as k}from"../../../../node_modules/date-fns/format.js";var v={zodErrors:null,strapiErrors:null,data:null,message:null};function x(x){var h=x.content,y=x.related,j=e(r(!1),2),A=j[0],D=j[1],S=E.bind(null,y),w=e(g(S,v),2),C=w[0],B=w[1];return t.createElement(t.Fragment,null,t.createElement(a,{onClick:function(){return D(!0)},sx:{width:50,height:50,color:"#ffff88"}},t.createElement(s,{fontSize:"large"})),t.createElement(m,{open:A,fullWidth:!0,maxWidth:"lg"},t.createElement("form",{action:B},t.createElement(l,{sx:{p:1}},t.createElement(f,{elevation:4,sx:{background:"linear-gradient(135deg, #ffff88 81%,#ffff88 82%,#ffff88 82%,#ffffc6 100%)",color:"black",p:1}},t.createElement(u,{spacing:2},t.createElement(c,{variant:"body1",textAlign:"right"},k(Date.now(),"dd-MM-yyyy")),t.createElement(b,{name:"content",label:"The note",defaultValue:h,sx:{color:"black",label:{color:"black"},input:{color:"black"},div:{color:"black"}}})))),t.createElement(i,null,t.createElement(n,{onClick:function(){return D(!1)}},"Cancel"),t.createElement(d,{text:"Submit",loadingText:"Loading..."}),t.createElement(p,{error:null==C?void 0:C.strapiErrors}),(null==C?void 0:C.message)&&t.createElement(o,{severity:"error"},null==C?void 0:C.message)))))}export{x as default};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import e from"react";import t from"@mui/material/Typography";import r from"@mui/material/Card";import a from"@mui/material/CardContent";import
|
|
6
|
+
import e from"react";import t from"@mui/material/Typography";import r from"@mui/material/Card";import a from"@mui/material/CardContent";import o from"@mui/material/Stack";import n from"../../common/markdown/MarkdownDisplay.js";var l=function(l){var m=l.notes;return e.createElement(o,{spacing:2},m.map((function(o,l){var m,i,f;return console.log("note",o),e.createElement(r,{variant:"outlined",key:l,sx:{background:"linear-gradient(135deg, #ffff88 81%,#ffff88 82%,#ffff88 82%,#ffffc6 100%)",color:"black",p:1}},e.createElement(a,null,e.createElement(t,null,o.date),e.createElement(n,null,o.content),e.createElement(t,{align:"right",sx:{fontStyle:"bold"}},"- ",null===(m=o.author)||void 0===m?void 0:m.first_name," ",null===(i=o.author)||void 0===i?void 0:i.last_name," ",null===(f=o.author)||void 0===f?void 0:f.username)))})))};export{l as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e,__spreadArray as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import o from"@mui/material/Box";import i from"@mui/material/TextField";import
|
|
7
|
+
import{__read as e,__spreadArray as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import o from"@mui/material/Box";import i from"@mui/material/TextField";import a from"@mui/material/Stack";import n from"@mui/material/Container";import m from"@mui/material/Alert";import{PBTextImageSection as l}from"./PBTextImageSection.js";import{PBHeroSection as c}from"./PBHeroSection.js";import{PBFeatureSection as s}from"./PBFeaturesSection.js";import{FleetSection as d}from"./FleetSection.js";import{IconSection as u}from"./IconSection.js";import{ColumnsSection as p}from"./ColumnsSection.js";import f from"./PBContactForm.js";import{PBPersonaliaSection as E}from"./PBPersonaliaSection.js";import{PictureBarSection as y}from"./PictureBarSection.js";import{LogoBarSection as _}from"./LogoBarSection.js";import{useFormState as x}from"react-dom";import{updatePageAction as v}from"../../data/actions/pagebuilder-actions.js";import{SubmitButton as g}from"../SubmitButton.js";import{StrapiErrors as j}from"../StrapiErrors.js";import{ExplanatoryFoldOut as k}from"../ExplanatoryFoldOut.js";import{useTheme as S}from"@mui/material/styles";import b from"../common/markdown/MarkdownEditor.js";var h={zodErrors:null,strapiErrors:null,data:null,message:null};function B(e,t){switch(e.__component){case"layout.hero-section":return r.createElement(c,{key:e.id+e.__component,data:e,index:t});case"layout.features-section":return r.createElement(s,{key:e.id+e.__component,data:e,index:t});case"layout.contact-section":return r.createElement(f,{key:e.id+e.__component,data:e,index:t});case"layout.text-image-section":return r.createElement(l,{key:e.id+e.__component,data:e});case"layout.icon-section":return r.createElement(u,{key:e.id+e.__component,data:e});case"layout.fleet-section":return r.createElement(d,{key:e.id+e.__component,data:e});case"layout.columns-section":return r.createElement(p,{key:e.id+e.__component,data:e});case"layout.personalia-section":return r.createElement(E,{key:e.id+e.__component,data:e,index:t});case"layout.picture-bar-section":return r.createElement(y,{key:e.id+e.__component,data:e});case"layout.logo-bar-section":return r.createElement(_,{key:e.id+e.__component,data:e});default:return null}}function P(l){var c,s,d=l.data,u=d.id,p=d.title,f=d.description,E=d.blocks,y=d.maxWidth,_=void 0===y?"lg":y,P=d.sx,w=void 0===P?[]:P;if(!E)return r.createElement("p",null,"No sections found");var F=S(),T=e(x(v,h),2),z=T[0],A=T[1];return r.createElement(o,{sx:t([],e(Array.isArray(w)?w:[w]),!1)},r.createElement("form",{action:A},r.createElement("input",{id:"id",type:"hidden",name:"id",value:u}),r.createElement(n,{maxWidth:_||"lg",sx:{my:1}},r.createElement(a,{spacing:2,sx:{p:1,border:"1px dashed ".concat(F.palette.primary.main)}},r.createElement(k,{title:"title and description",description:"Edit the title and description of your pages. Even if it's not shown on the website it is important for SEO"}),r.createElement(i,{id:"title",name:"title",label:"title",defaultValue:p,variant:"outlined",error:null!=(null===(c=null==z?void 0:z.zodErrors)||void 0===c?void 0:c.title),helperText:null===(s=null==z?void 0:z.zodErrors)||void 0===s?void 0:s.title}),r.createElement(b,{name:"description",label:"description",defaultValue:f}))),E.map(B),r.createElement(a,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:1}},r.createElement(g,{text:"save changes",loadingText:"loading"}),r.createElement(j,{error:null==z?void 0:z.strapiErrors}),(null==z?void 0:z.message)&&r.createElement(m,{severity:"success"},null==z?void 0:z.message))))}export{P as default};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__read as e}from"../../../node_modules/tslib/tslib.es6.js";import
|
|
7
|
+
import{__read as e,__spreadArray as r}from"../../../node_modules/tslib/tslib.es6.js";import t from"@mui/material/Divider";import a from"@mui/material/Paper";import i from"@mui/material/Box";import m from"@mui/material/Stack";import n from"@mui/material/Alert";import o from"@mui/material/TextField";import l from"@mui/material/Typography";import{SubmitButton as s}from"../SubmitButton.js";import{useFormState as c}from"react-dom";import{StrapiErrors as d}from"../StrapiErrors.js";import{BusinessCredentialsFields as p}from"../e-commerce/customer/BusinessCredentials.js";import u from"react";import{AddressFields as f}from"../common/Address.js";import{updatePublicInformationAction as E}from"../../data/actions/public-information/updatePublicInformationAction.js";var b={zodErrors:null,strapiErrors:null,data:null,message:null};function v(v){var g=v.publicInformation,h=v.sx;console.log(g);var _=g.id,y=g.title,x=g.description;g.disclaimer_link,g.privacypolicy_link,g.maxWidth;var j=g.email,A=g.phone_number,B=g.business_credentials,T=g.address;g.socials,g.header_logo,g.footer_logo;var V=e(c(E,b),2),k=V[0],C=V[1];return u.createElement(i,{sx:r([{p:2}],e(Array.isArray(h)?h:[h]),!1),component:a},u.createElement("form",{action:C},u.createElement("input",{id:"id",type:"hidden",name:"id",value:_}),u.createElement(m,{spacing:2},u.createElement(o,{id:"title",name:"title",label:"Title",defaultValue:y}),u.createElement(o,{id:"description",name:"description",label:"Description",defaultValue:x}),u.createElement(o,{id:"email",name:"email",label:"email",defaultValue:j}),u.createElement(o,{id:"phone_number",name:"phone_number",label:"phone_number",defaultValue:A}),u.createElement(l,{variant:"h6"},"Company Address"),u.createElement(t,null),u.createElement(f,{componentName:"address",componentReference:"common.address",data:T}),u.createElement(t,null),u.createElement(l,{variant:"h6"},"Business Credentials"),u.createElement(p,{componentName:"business_credentials",componentReference:"business.credentials",data:B}),u.createElement(m,{direction:"row-reverse",spacing:2,alignItems:"center",sx:{py:1}},u.createElement(s,{text:"save changes",loadingText:"loading"}),u.createElement(d,{error:null==k?void 0:k.strapiErrors}),(null==k?void 0:k.message)&&u.createElement(n,{severity:"error"},null==k?void 0:k.message)))))}export{v as PublicInformationForm};
|