umwd-components 0.1.469 → 0.1.470
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/page-elements/CategoryBlock.js +7 -0
- package/dist/src/components/page-elements/Page.js +1 -1
- package/dist/src/components/page-elements/ProductBlock.js +7 -0
- package/dist/src/data/loaders/loaders.js +1 -1
- package/dist/src/data/loaders/page-elements/getSinglePage.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/page-elements/CategoryBlock.d.ts +27 -0
- package/dist/types/components/page-elements/ProductBlock.d.ts +16 -0
- package/package.json +1 -1
- package/src/components/page-elements/CategoryBlock.tsx +72 -0
- package/src/components/page-elements/Page.tsx +6 -0
- package/src/components/page-elements/ProductBlock.tsx +57 -0
- package/src/data/loaders/loaders.ts +5 -0
- package/src/data/loaders/page-elements/getSinglePage.ts +5 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import t from"@mui/material/Paper";import i from"@mui/material/Container";import a from"@mui/material/Grid";import m from"@mui/material/Stack";import{useTheme as o}from"@mui/material/styles";import{setOpacity as n}from"../../lib/utils.js";import{Typography as l}from"@mui/material";function s(s){var c=s.data,p=c.maxWidth,d=void 0===p?"lg":p,u=c.sx,f=void 0===u?{}:u,b=c.glass,x=void 0!==b&&b,g=o();return r.createElement(i,{maxWidth:d,sx:e({my:1},f)},r.createElement(a,{container:!0,spacing:2},r.createElement(a,{item:!0,xs:12},r.createElement(t,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:n(g.palette.background.paper,x?.1:1),border:x?"1px solid rgba(255, 255, 255, 0.15)":"none"}},r.createElement(m,{direction:{xs:"column",sm:"row"},spacing:2,justifyContent:"space-around"},r.createElement(l,{variant:"h4"},c.category.title),r.createElement(l,{variant:"body1"},c.category.description))))))}export{s as CategoryBlock};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @copyright Jelle Paulus
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
|
-
import{__spreadArray as e,__read as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import{TextImageSection as a}from"./TextImageSection.js";import{HeroSection as o}from"./HeroSectionV2.js";import{FeatureSection as n}from"./FeaturesSection.js";import{FleetSection as
|
|
6
|
+
import{__spreadArray as e,__read as t}from"../../../node_modules/tslib/tslib.es6.js";import r from"react";import{TextImageSection as a}from"./TextImageSection.js";import{HeroSection as o}from"./HeroSectionV2.js";import{FeatureSection as n}from"./FeaturesSection.js";import{FleetSection as c}from"./FleetSection.js";import{IconSection as m}from"./IconSection.js";import{ColumnsSection as s}from"./ColumnsSection.js";import i from"@mui/material/Box";import{ContactForm as l}from"../ContactForm.js";import{PersonaliaSection as p}from"./PersonaliaSection.js";import{PictureBarSection as d}from"./PictureBarSection.js";import{LogoBarSection as u}from"./LogoBarSection.js";import{ProductBlock as f}from"./ProductBlock.js";import{CategoryBlock as g}from"./CategoryBlock.js";function k(e){switch(e.__component){case"page-elements.hero-section":return r.createElement(o,{key:e.id,data:e});case"page-elements.features-section":return r.createElement(n,{key:e.id,data:e});case"page-elements.contact-section":return r.createElement(l,{key:e.id,data:e});case"page-elements.text-image-section":return r.createElement(a,{key:e.id,data:e});case"page-elements.icon-section":return r.createElement(m,{key:e.id,data:e});case"page-elements.fleet-section":return r.createElement(c,{key:e.id,data:e});case"page-elements.columns-section":return r.createElement(s,{key:e.id,data:e});case"page-elements.personalia-section":return r.createElement(p,{key:e.id,data:e});case"page-elements.picture-bar-section":return r.createElement(d,{key:e.id,data:e});case"page-elements.logo-bar-section":return r.createElement(u,{key:e.id,data:e});case"page-elements.product-block":return r.createElement(f,{key:e.id,data:e});case"page-elements.category-block":return r.createElement(g,{key:e.id,data:e});default:return null}}function y(a){var o=a.blocks,n=a.sx,c=void 0===n?[]:n;return o?r.createElement(i,{sx:e([],t(Array.isArray(c)?c:[c]),!1)},o.map(k)):r.createElement("p",null,"No sections found")}export{y as Page};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/*
|
|
3
|
+
* UMWD-Components
|
|
4
|
+
* @copyright Jelle Paulus
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
import{__assign as r}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import e from"@mui/material/Paper";import o from"@mui/material/Container";import i from"@mui/material/Grid";import m from"@mui/material/Stack";import{useTheme as a}from"@mui/material/styles";import{setOpacity as l}from"../../lib/utils.js";function n(n){var s=n.data,p=s.maxWidth,c=void 0===p?"lg":p,d=s.sx,u=void 0===d?{}:d,f=s.glass,x=void 0!==f&&f,b=a();return t.createElement(o,{maxWidth:c,sx:r({my:1},u)},t.createElement(i,{container:!0,spacing:2},t.createElement(i,{item:!0,xs:12},t.createElement(e,{sx:{p:2,backdropFilter:"blur(3px)",backgroundColor:l(b.palette.background.paper,x?.1:1),border:x?"1px solid rgba(255, 255, 255, 0.15)":"none"}},t.createElement(m,{direction:{xs:"column",sm:"row"},spacing:2,justifyContent:"space-around"},"Product Block")))))}export{n as ProductBlock};
|
|
@@ -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 n from"../../../node_modules/qs/lib/index.js";import{getStrapiURL as r,flattenAttributes as o}from"../../lib/utils.js";import{unstable_noStore as i}from"next/cache";import{getAuthToken as s}from"../services/get-token.js";var a=r();function u(n){return e(this,void 0,void 0,(function(){var e,r,i,a;return t(this,(function(t){switch(t.label){case 0:return[4,s()];case 1:e=t.sent(),r={method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}},t.label=2;case 2:return t.trys.push([2,5,,6]),[4,fetch(n,e?r:{})];case 3:return[4,t.sent().json()];case 4:return i=t.sent(),[2,o(i)];case 5:throw a=t.sent(),console.error("Error fetching data:",a),a;case 6:return[2]}}))}))}function c(){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/home-page",a)).search=n.stringify({populate:{blocks:{populate:{image:{populate:!0},link:{populate:!0},feature:{populate:!0}}}}}),[4,u(e.href)];case 1:return[2,t.sent()]}}))}))}function
|
|
7
|
+
import{__awaiter as e,__generator as t}from"../../../node_modules/tslib/tslib.es6.js";import n from"../../../node_modules/qs/lib/index.js";import{getStrapiURL as r,flattenAttributes as o}from"../../lib/utils.js";import{unstable_noStore as i}from"next/cache";import{getAuthToken as s}from"../services/get-token.js";var a=r();function u(n){return e(this,void 0,void 0,(function(){var e,r,i,a;return t(this,(function(t){switch(t.label){case 0:return[4,s()];case 1:e=t.sent(),r={method:"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)}},t.label=2;case 2:return t.trys.push([2,5,,6]),[4,fetch(n,e?r:{})];case 3:return[4,t.sent().json()];case 4:return i=t.sent(),[2,o(i)];case 5:throw a=t.sent(),console.error("Error fetching data:",a),a;case 6:return[2]}}))}))}function c(){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/home-page",a)).search=n.stringify({populate:{blocks:{populate:{image:{populate:!0},link:{populate:!0},feature:{populate:!0}}}}}),[4,u(e.href)];case 1:return[2,t.sent()]}}))}))}function p(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return i(),(e=new URL("/api/slugify/slugs/page/disclaimer?populate[blocks][populate]=%2A",a)).search=n.stringify({populate:{blocks:{populate:!0}}}),[4,u(e.href)];case 1:return[2,t.sent()]}}))}))}function l(){return e(this,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return i(),(e=new URL("/api/pages",a)).search=n.stringify({populate:{blocks:{populate:{bgImage:{populate:!0},logoImage:{populate:!0},image:{populate:!0},link:{populate:!0},feature:{populate:!0},icon:{populate:!0},airplane:{populate:{floorplan:!0}},column:{populate:!0},partner:{populate:{text:!0,photo:!0,links:!0}},pictures:!0,companies:{populate:{logo:!0}},textV2:!0,category:{populate:{products:!0}}}}}}),[4,u(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 i(),(e=new URL("/api/pages",a)).search=n.stringify({fields:["slug","title"]}),[4,u(e.href)];case 1:return[2,t.sent()]}}))}))}function h(){return e(this,void 0,void 0,(function(){var e,r,i,s;return t(this,(function(t){switch(t.label){case 0:(e=new URL("/api/public-information",a)).search=n.stringify({populate:{socials:!0,business_credentials:!0,footer_logo:!0,header_logo:!0,address:!0}}),r={method:"GET",headers:{"Content-Type":"application/json"}},t.label=1;case 1:return t.trys.push([1,4,,5]),[4,fetch(e,r)];case 2:return[4,t.sent().json()];case 3:return i=t.sent(),[2,o(i)];case 4:return s=t.sent(),console.error("Error fetching data:",s),[2,null];case 5:return[2]}}))}))}function d(){return e(this,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,u(new URL("/api/navigation/render/main-navigation?type=RFR",a).href)];case 1:return[2,e.sent()]}}))}))}export{u as fetchData,l as getAllPages,p as getDisclaimerData,c as getHomePageData,d as getNavigation,f as getPageNames,h as getSiteData};
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @copyright Jelle Paulus
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
7
|
-
import{__awaiter as e,__generator as o}from"../../../../node_modules/tslib/tslib.es6.js";import t from"../../../../node_modules/qs/lib/index.js";import{getStrapiURL as a,flattenAttributes as l}from"../../../lib/utils.js";import{unstable_noStore as
|
|
7
|
+
import{__awaiter as e,__generator as o}from"../../../../node_modules/tslib/tslib.es6.js";import t from"../../../../node_modules/qs/lib/index.js";import{getStrapiURL as a,flattenAttributes as l}from"../../../lib/utils.js";import{unstable_noStore as p}from"next/cache";var r=a();function n(a){return e(this,void 0,void 0,(function(){var e,n,s,u;return o(this,(function(o){switch(o.label){case 0:p(),console.log("getSinglePage",a),a||(a="home"),(e=new URL("/api/slugify/slugs/page/".concat(a),r)).search=t.stringify({populate:{blocks:{populate:{logoImage:{populate:!0},bgImage:{populate:!0},image:{populate:!0},link:{populate:!0},feature:{populate:!0},icon:{populate:!0},airplane:{populate:{floorplan:!0}},column:{populate:!0},partner:{populate:{text:!0,photo:!0,links:!0}},pictures:!0,companies:{populate:{logo:!0}},textV2:!0,category:{populate:{products:!0}}}}}}),console.log(e.href),n={method:"GET",headers:{"Content-Type":"application/json"}},o.label=1;case 1:return o.trys.push([1,4,,5]),[4,fetch(e,n)];case 2:return[4,o.sent().json()];case 3:return s=o.sent(),[2,l(s)];case 4:return u=o.sent(),console.error("Error fetching data:",u),[2,null];case 5:return[2]}}))}))}export{n as getSinglePage};
|