diff --git a/README.md b/README.md
index a0a7509ac..94877b7c2 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fcommerceproject-name=next-commerce-agilitycms&repository-name=next-commerce-agilitycms&demo-title=Next.js%20Commerce%20Agility%20CMS&demo-description=An%20all-in-one%20starter%20kit%20for%20high-performance%20e-commerce%20sites%20with%20Agility%20CMS.&demo-url=https%3A%2F%2Fnextjs-commerce-agility-cms.vercel.app/&demo-image=https%3A%2F%2Fbigcommerce-demo-asset-ksvtgfvnd.vercel.app%2Fbigcommerce.png&integration-ids=oac_MuWZiE4jtmQ2ejZQaQ7ncuDT)
+[](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fcommerceproject-name=next-commerce-agilitycms&repository-name=next-commerce-agilitycms&demo-title=Next.js%20Commerce%20with%20Agility%20CMS&demo-description=An%20all-in-one%20starter%20kit%20for%20high-performance%20e-commerce%20sites%20with%20Agility%20CMS.&demo-url=https%3A%2F%2Fnextjs-commerce-agility-cms.vercel.app/&demo-image=https%3A%2F%2Fbigcommerce-demo-asset-ksvtgfvnd.vercel.app%2Fbigcommerce.png&integration-ids=oac_MuWZiE4jtmQ2ejZQaQ7ncuDT)
# Next.js Commerce with Agility CMS
diff --git a/assets/components.css b/assets/components.css
index ebebcc238..513719dec 100644
--- a/assets/components.css
+++ b/assets/components.css
@@ -1,3 +1,3 @@
.fit {
- min-height: calc(100vh - 88px);
+ min-height: 400px /*calc(100vh - 88px)*/;
}
diff --git a/components/agility-global/AgilityPage.tsx b/components/agility-global/AgilityPage.tsx
index 330cb3634..081469aa9 100644
--- a/components/agility-global/AgilityPage.tsx
+++ b/components/agility-global/AgilityPage.tsx
@@ -1,21 +1,49 @@
import pageTemplates from "components/agility-pageTemplates"
+import Head from 'next/head'
-const AgilityPage = ({ agilityProps, error, revalidate }: { agilityProps: any, error?: any, revalidate?: any}) => {
+const AgilityPage = ({ agilityProps, error, revalidate }: { agilityProps: any, error?: any, revalidate?: any }) => {
if (!agilityProps) {
console.error(`Page object or template was not found.`)
return null
}
- let AgilityPageTemplate = pageTemplates(agilityProps.pageTemplateName)
- if (! AgilityPageTemplate) {
- console.error(`${agilityProps.pageTemplateName} not found.`)
- return null
+ let pageTitle = "Commerce Storefront"
+
+ if (agilityProps.globalData?.sitedata) {
+ pageTitle = agilityProps.globalData?.sitedata.name
}
- return (
-
- )
+ if (agilityProps.notFound === true) {
+ return (
+ <>
+
+ Page Not Found - {pageTitle}
+
+ Page not found.
+ >
+ )
+ }
+
+ if (agilityProps.pageTemplateName) {
+
+ let AgilityPageTemplate = pageTemplates(agilityProps.pageTemplateName)
+ if (!AgilityPageTemplate) {
+ console.error(`${agilityProps.pageTemplateName} not found.`)
+ return null
+ }
+
+ return (
+ <>
+
+ {agilityProps.sitemapNode?.title} - {pageTitle}
+
+
+ >
+ )
+ } else {
+ return null
+ }
}
diff --git a/components/agility-global/GlobalFooter.js b/components/agility-global/GlobalFooter.js
deleted file mode 100644
index 211a9f62a..000000000
--- a/components/agility-global/GlobalFooter.js
+++ /dev/null
@@ -1,75 +0,0 @@
-import React, { Component, useState } from 'react';
-import Link from 'next/link';
-
-import {expandLinkedList} from "@agility/utils"
-
-const GlobalFooter = (props) => {
- const { globalFooterProps } = props;
-
- return (
- FOOTER
- )
-
-}
-
-GlobalFooter.getCustomInitialProps = async function ({agility, languageCode, channelName}) {
-
- const api = agility;
-
- let contentItem = null;
-
- //hack
- return {}
-
- try {
- //get the global footer
- let contentItemList = await api.getContentList({
- referenceName: "globalfooter",
- languageCode: languageCode
- });
-
- if (contentItemList?.length > 0) {
- contentItem = contentItemList[0];
-
- //resolve the links...
- contentItem = await expandLinkedList({ agility, contentItem, languageCode,
- fieldName: "column2Links",
- sortIDField: "column2SortIDs"
- })
-
- contentItem = await expandLinkedList({ agility, contentItem, languageCode,
- fieldName: "column3Links",
- sortIDField: "column3SortIDs"
- })
-
- contentItem = await expandLinkedList({ agility, contentItem, languageCode,
- fieldName: "column4Links",
- sortIDField: "column4SortIDs"
- })
-
- }
-
-
- } catch (error) {
- if (console) console.error("Could not load global footer item.", error);
- }
-
- //return a clean object...
- return {
- siteName: contentItem.fields.siteName,
- siteDescription: contentItem.fields.siteDescription,
- column2Title: contentItem.fields.column2Title,
- column3Title: contentItem.fields.column3Title,
- column4Title: contentItem.fields.column4Title,
- facebookURL: contentItem.fields.facebookURL,
- twitterURL: contentItem.fields.twitterURL,
- youTubeURL: contentItem.fields.youTubeURL,
- column2Links: contentItem.fields.column2Links.map(link => link.fields.link),
- column3Links: contentItem.fields.column3Links.map(link => link.fields.link),
- column4Links: contentItem.fields.column4Links.map(link => link.fields.link),
-
- }
-}
-
-
-export default GlobalFooter
\ No newline at end of file
diff --git a/components/agility-global/GlobalHeader.js b/components/agility-global/GlobalHeader.js
deleted file mode 100644
index 371f90935..000000000
--- a/components/agility-global/GlobalHeader.js
+++ /dev/null
@@ -1,73 +0,0 @@
-import React, { Component, useState } from 'react';
-import Link from 'next/link';
-
-
-const GlobalHeader = (props) => {
- const { globalHeaderProps, sitemapNode, page } = props;
-
- const globalHeaderItem = globalHeaderProps.contentItem;
- let siteName = globalHeaderItem?.fields.siteName || "Agility Starter 2020"
- let logo = globalHeaderItem?.fields.logo || nulll
-
- return (
- HEADER
- )
-
-}
-
-GlobalHeader.getCustomInitialProps = async function (props) {
-
- const api = props.agility;
- const languageCode = props.languageCode;
- const channelName = props.channelName;
- let contentItem = null;
- let links = [];
-
- //hack
- return {}
-
- try {
- //get the global header
- let contentItemList = await api.getContentList({
- referenceName: "globalheader",
- languageCode: languageCode
- });
-
- if (contentItemList && contentItemList.length) {
- contentItem = contentItemList[0];
-
- }
- } catch (error) {
- if (console) console.error("Could not load global header item.", error);
- }
-
-
- try {
- //get the nested sitemap
- let sitemap = await api.getSitemapNested({
- channelName: channelName,
- languageCode: languageCode,
- });
-
- //grab the top level links that are visible on menu
- links = sitemap
- .filter(node => node.visible.menu)
- .map(node => {
- return {
- text: node.menuText || node.title,
- path: node.path
- }
- })
-
- } catch (error) {
- if (console) console.error("Could not load nested sitemap.", error);
- }
-
- return {
- contentItem,
- links
- }
-}
-
-
-export default GlobalHeader
\ No newline at end of file
diff --git a/components/agility-modules/BlogPostDetails.tsx b/components/agility-modules/BlogPostDetails.tsx
new file mode 100644
index 000000000..b40687689
--- /dev/null
+++ b/components/agility-modules/BlogPostDetails.tsx
@@ -0,0 +1,99 @@
+import React from "react";
+import Head from "next/head";
+import { renderHTML } from "@agility/nextjs";
+import { AgilityImage } from "@agility/nextjs";
+import truncate from "truncate-html";
+import Link from "next/link";
+import Image from "next/image"
+
+const PostDetails = ({ dynamicPageItem }: any) => {
+
+ // post fields
+ const post = dynamicPageItem.fields;
+
+ const productJSON = post.product
+ const product = JSON.parse(productJSON)
+
+ // format date
+ const dateStr = new Date(post.date).toLocaleDateString();
+
+ const description = truncate(post.content, {
+ length: 160,
+ decodeEntities: true,
+ stripTags: true,
+ reserveLastWord: true,
+ });
+
+ let imageSrc = post.image?.url || null;
+
+
+ // post image alt
+ let imageAlt = post.image?.label || null;
+
+
+ let ogImageSrc = `${imageSrc}?w=1600&h=900`
+
+ let imageHeight = 900
+ let imageWidth = 1600
+
+
+ return (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ );
+};
+
+
+PostDetails.getCustomInitialProps = async () => {
+ return {
+ cloud_name: process.env.CLOUDINARY_CLOUD_NAME
+ }
+}
+
+export default PostDetails;
diff --git a/components/agility-modules/BlogPostListing.tsx b/components/agility-modules/BlogPostListing.tsx
new file mode 100644
index 000000000..ec501874d
--- /dev/null
+++ b/components/agility-modules/BlogPostListing.tsx
@@ -0,0 +1,87 @@
+import React from "react";
+import Link from "next/link";
+import Image from "next/image"
+
+import { ModuleWithInit, AgilityImage } from '@agility/nextjs'
+import products from "pages/api/catalog/products";
+
+interface ICustomData {
+
+ posts: []
+
+}
+
+interface IModule {
+
+}
+
+const PostsListing: ModuleWithInit = ({ customData, module, languageCode, isDevelopmentMode, isPreview }) => {
+ // get posts
+ const { posts } = customData;
+
+ // set up href for internal links
+ let href = "/pages/[...slug]";
+
+ // if there are no posts, display message on frontend
+ if (posts.length <= 0) {
+ return (
+
+
No posts available.
+
+
+ );
+ }
+
+ return (
+
+ );
+};
+
+
+
+
+export default PostsListing;
diff --git a/components/agility-modules/FeaturedProducts.tsx b/components/agility-modules/FeaturedProducts.tsx
deleted file mode 100644
index c3b14f6af..000000000
--- a/components/agility-modules/FeaturedProducts.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import { FC } from "react"
-import { Grid, Marquee, Hero } from '@components/ui'
-import { ProductCard } from '@components/product'
-import { ModuleWithInit } from "@agility/nextjs"
-
-interface ICustomData {
- products: any
-}
-
-interface IModule {
-}
-
-
-const FeaturedProducts: ModuleWithInit = ({ customData }) => {
-
- if (! customData) {
- return No featured products returned.
- }
-
- const products:any = customData.products
-
- return (
-
- {products.slice(0, 3).map((product: any, i: number) => (
-
- ))}
-
- )
-}
-
-export default FeaturedProducts
-
diff --git a/components/agility-modules/HomeAllProductsGrid.tsx b/components/agility-modules/HomeAllProductsGrid.tsx
deleted file mode 100644
index 06665b419..000000000
--- a/components/agility-modules/HomeAllProductsGrid.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import React, { FC } from 'react'
-import HomeAllProductsGrid from '@components/common/HomeAllProductsGrid'
-import { ModuleWithInit } from '@agility/nextjs'
-import { ProductCard } from '@components/product'
-import { Grid, Marquee, Hero } from '@components/ui'
-
-
-interface ICustomData {
-
- products: any
-
-}
-
-interface IModule {
-}
-
-
-const HomeAllProductsGridModule: ModuleWithInit = ({ customData }) => {
-
-
- const products = customData.products
-
- return (
-
- {products.slice(0, 3).map((product: any, i: number) => (
-
- ))}
-
- )
-
-
-}
-
-export default HomeAllProductsGridModule
-
diff --git a/components/agility-modules/ProductListing.tsx b/components/agility-modules/ProductListing.tsx
index fd26aa789..41d91a607 100644
--- a/components/agility-modules/ProductListing.tsx
+++ b/components/agility-modules/ProductListing.tsx
@@ -1,8 +1,44 @@
-const ProductListing = () => {
- return (
-
- )
+import React, { FC } from 'react'
+import { ModuleWithInit } from '@agility/nextjs'
+import { ProductCard } from '@components/product'
+import { Grid, Marquee, Hero } from '@components/ui'
+
+
+interface ICustomData {
+
+ products: any
+
}
-export default ProductListing
+interface IModule {
+ numItems: string,
+ layout?: 'A' | 'B' | 'C' | 'D' | 'normal'
+ variant?: 'default' | 'filled'
+}
+
+
+const ProductListingModule: ModuleWithInit = ( { customData, module, languageCode, isDevelopmentMode, isPreview }) => {
+
+
+ const products = customData.products
+
+ return (
+
+ {products.map((product: any, i: number) => (
+
+ ))}
+
+ )
+
+
+}
+
+export default ProductListingModule
diff --git a/components/agility-modules/BestsellingProducts.tsx b/components/agility-modules/ProductMarquee.tsx
similarity index 80%
rename from components/agility-modules/BestsellingProducts.tsx
rename to components/agility-modules/ProductMarquee.tsx
index fd130f03e..21d8b97d8 100644
--- a/components/agility-modules/BestsellingProducts.tsx
+++ b/components/agility-modules/ProductMarquee.tsx
@@ -12,7 +12,7 @@ interface IModule {
}
-const BestsellingProducts: ModuleWithInit = ({ customData }) => {
+const ProductMarqueeModule: ModuleWithInit = ({ customData }) => {
const products = customData.products
@@ -26,5 +26,5 @@ const BestsellingProducts: ModuleWithInit = ({ customData
}
-export default BestsellingProducts
+export default ProductMarqueeModule
diff --git a/components/agility-modules/RichTextArea.tsx b/components/agility-modules/RichTextArea.tsx
index 425f0bee3..d30fbc5f5 100644
--- a/components/agility-modules/RichTextArea.tsx
+++ b/components/agility-modules/RichTextArea.tsx
@@ -8,8 +8,6 @@ interface Fields {
const RichTextArea:Module = ({ module: {fields} }) => {
-
-
return (
diff --git a/components/agility-modules/index.ts b/components/agility-modules/index.ts
index 112b9ebff..8224bc6d8 100644
--- a/components/agility-modules/index.ts
+++ b/components/agility-modules/index.ts
@@ -1,21 +1,22 @@
import RichTextArea from "./RichTextArea"
-import BestsellingProducts from "./BestsellingProducts"
+import ProductMarquee from "./ProductMarquee"
import ProductDetails from "./ProductDetails"
-import FeaturedProducts from "./FeaturedProducts"
+
import ProductListing from "./ProductListing"
import ProductSearch from "./ProductSearch"
import Hero from "./Hero"
-import HomeAllProductsGrid from "./HomeAllProductsGrid"
+import HomeAllProductsGrid from "./ProductListing"
import Cart from "./Cart"
import Orders from "./Orders"
import Profile from "./Profile"
import Wishlist from "./Wishlist"
+import BlogPostListing from "./BlogPostListing"
+import BlogPostDetails from "./BlogPostDetails"
const allModules = [
{ name: "RichTextArea", module: RichTextArea },
- { name: "BestsellingProducts", module: BestsellingProducts },
- { name: "FeaturedProducts", module: FeaturedProducts },
+ { name: "ProductMarquee", module: ProductMarquee },
{ name: "ProductListing", module: ProductListing },
{ name: "ProductSearch", module: ProductSearch },
{ name: "Hero", module: Hero },
@@ -23,8 +24,11 @@ const allModules = [
{ name: "HomeAllProductsGrid", module: HomeAllProductsGrid },
{ name: "Cart", module: Cart },
{ name: "Orders", module: Orders },
- { name: "Profile", module: Profile},
- { name: "Wishlist", module: Wishlist}
+ { name: "Profile", module: Profile },
+ { name: "Wishlist", module: Wishlist },
+ { name: "BlogPostListing", module: BlogPostListing },
+ { name: "BlogPostDetails", module: BlogPostDetails }
+
]
/**
diff --git a/components/common/Footer/Footer.tsx b/components/common/Footer/Footer.tsx
index d5c2ea390..9ea384668 100644
--- a/components/common/Footer/Footer.tsx
+++ b/components/common/Footer/Footer.tsx
@@ -10,122 +10,118 @@ import { I18nWidget } from '@components/common'
import s from './Footer.module.css'
interface Props {
- className?: string
- children?: any
- pages?: Page[]
+ className?: string
+ children?: any
+ pages?: Page[],
+ agilityProps: any
}
-const links = [
- {
- name: 'Home',
- url: '/',
- },
-]
+const links:[] = []
-const Footer: FC = ({ className, pages }) => {
- const { sitePages } = usePages(pages)
- const rootClassName = cn(s.root, className)
+const Footer: FC = ({ className, pages, agilityProps }) => {
+ const { sitePages } = usePages(pages)
+ const rootClassName = cn(s.root, className)
- return (
-
- )
+ return (
+
+ )
}
function usePages(pages?: Page[]) {
- const { locale } = useRouter()
- const sitePages: Page[] = []
+ const { locale } = useRouter()
+ const sitePages: Page[] = []
- if (pages) {
- pages.forEach((page) => {
- const slug = page.url && getSlug(page.url)
- if (!slug) return
- if (locale && !slug.startsWith(`${locale}/`)) return
- sitePages.push(page)
- })
- }
+ if (pages) {
+ pages.forEach((page) => {
+ const slug = page.url && getSlug(page.url)
+ if (!slug) return
+ if (locale && !slug.startsWith(`${locale}/`)) return
+ sitePages.push(page)
+ })
+ }
- return {
- sitePages: sitePages.sort(bySortOrder),
- }
+ return {
+ sitePages: sitePages.sort(bySortOrder),
+ }
}
// Sort pages by the sort order assigned in the BC dashboard
function bySortOrder(a: Page, b: Page) {
- return (a.sort_order ?? 0) - (b.sort_order ?? 0)
+ return (a.sort_order ?? 0) - (b.sort_order ?? 0)
}
export default Footer
diff --git a/components/common/Layout/Layout.tsx b/components/common/Layout/Layout.tsx
index ff6d72aaf..e8bbf46de 100644
--- a/components/common/Layout/Layout.tsx
+++ b/components/common/Layout/Layout.tsx
@@ -45,7 +45,8 @@ const FeatureBar = dynamic(
interface Props {
pageProps: {
pages?: Page[]
- categories: Category[]
+ categories: Category[],
+ agilityProps: any
}
}
@@ -90,10 +91,14 @@ const SidebarUI: FC = () => {
) : null
}
-const Layout: FC = ({
- children,
- pageProps: { categories = [], ...pageProps },
-}) => {
+const Layout: FC = (props) => {
+
+ const {
+ children,
+ pageProps: { agilityProps, categories = [], ...pageProps },
+ } = props
+
+
const { acceptedCookies, onAcceptCookies } = useAcceptCookies()
const { locale = 'en-US' } = useRouter()
const navBarlinks = categories.slice(0, 2).map((c) => ({
@@ -104,9 +109,9 @@ const Layout: FC = ({
return (
-
+
{children}
-
+
= ({ links }) => (
-
-
-
-
-
-
-
-
-)
+const Navbar: FC = ({ links, agilityProps }) => {
+
+ const siteData = agilityProps.globalData["sitedata"]
+
+ return (
+
+
+
+
+
+
+
+
+ )
+}
export default Navbar
diff --git a/framework/module-data/FeaturedProductsData.ts b/framework/module-data/FeaturedProductsData.ts
deleted file mode 100644
index 74e7b5a02..000000000
--- a/framework/module-data/FeaturedProductsData.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import commerce from '@lib/api/commerce'
-
-const getCustomInitialProps = async function ({ item, agility, languageCode, channelName, pageInSitemap, dynamicPageItem }: any) {
- //TODO: pass the locale and preview mode as props...
-
-
- const locale = "en-US"
- const preview = false
-
- const config = { locale, locales: [locale] }
- const productsPromise = commerce.getAllProducts({
- variables: { first: 6 },
- config,
- preview,
- // Saleor provider only
- ...({ featured: true } as any),
- })
-
- const { products } = await productsPromise
-
- return {
- products
- }
-
-}
-
-export default { getCustomInitialProps }
\ No newline at end of file
diff --git a/lib/global-data/SiteData.ts b/lib/global-data/SiteData.ts
new file mode 100644
index 000000000..6e767388b
--- /dev/null
+++ b/lib/global-data/SiteData.ts
@@ -0,0 +1,72 @@
+import { ComponentWithInit } from "@agility/nextjs"
+
+interface ICustomData {
+ name: any,
+ logo: any,
+ links: any[]
+}
+
+const SiteData:ComponentWithInit = ({ globalData, sitemapNode, page }) => {
+ return null
+}
+
+SiteData.getCustomInitialProps = async function ({ agility, languageCode, channelName }) {
+ // set up api
+ const api = agility;
+
+ // set up content item
+ let contentItem = null;
+
+ // set up links
+ let links = [];
+
+ try {
+ // try to fetch our site header
+ let header = await api.getContentList({
+ referenceName: "sitedata",
+ languageCode: languageCode,
+ take: 1
+ });
+
+ // if we have a header, set as content item
+ if (header && header.items.length > 0) {
+ contentItem = header.items[0];
+
+ // else return null
+ } else {
+ throw new Error("The Site Data item did not have any content.")
+ }
+ } catch (error) {
+ throw new Error(`Could not load site data item: ${error}`)
+ }
+
+ try {
+ // get the nested sitemap
+ let sitemap = await api.getSitemapNested({
+ channelName: channelName,
+ languageCode: languageCode,
+ });
+
+ // grab the top level links that are visible on menu
+ links = sitemap
+ .filter((node:any) => node.visible.menu)
+ .map((node:any) => {
+ return {
+ name: node.menuText || node.title,
+ url: node.path,
+ };
+ });
+ } catch (error) {
+ throw new Error(`Could not load nested sitemap: ${error}`)
+ }
+
+ // return clean object...
+ return {
+ name: contentItem.fields.name,
+ logo: contentItem.fields.logo,
+ links,
+ };
+};
+
+
+export default SiteData
\ No newline at end of file
diff --git a/lib/module-data/BlogPostListing.ts b/lib/module-data/BlogPostListing.ts
new file mode 100644
index 000000000..95ea160c8
--- /dev/null
+++ b/lib/module-data/BlogPostListing.ts
@@ -0,0 +1,86 @@
+
+const getCustomInitialProps = async ({
+ agility,
+ channelName,
+ languageCode,
+}:any) => {
+ // set up api
+ const api = agility;
+
+
+
+ // get sitemap...
+ let sitemap = await api.getSitemap({
+ channelName: channelName,
+ languageCode,
+ });
+
+ // get posts...
+ let rawPosts = await api.getContentList({
+ referenceName: "blogposts",
+ languageCode,
+ take: 50,
+ contentLinkDepth: 2,
+ depth: 2
+ });
+
+ // resolve dynamic urls
+ const dynamicUrls: [] = resolvePostUrls(sitemap, rawPosts.items);
+ const posts: [] = rawPosts.items.map((post: any) => {
+
+ const productJSON = post.fields.product
+ const product = JSON.parse(productJSON)
+
+ const productName = product.name
+ const productImageSrc = product.imageUrl
+
+ // date
+ const date = new Date(post.fields.date).toLocaleDateString();
+
+ // url
+ const url = dynamicUrls[post.contentID] || "#";
+
+ // post image src
+ let imageSrc = post.fields.image?.url || null
+
+ // post image alt
+ let imageAlt = post.fields.image?.label || null;
+
+ return {
+ contentID: post.contentID,
+ title: post.fields.title,
+ date,
+ url,
+ productName,
+ productImageSrc,
+ imageSrc,
+ imageAlt,
+ };
+ });
+
+ //sort newest first...
+ posts.sort((a: any, b: any) => {
+ return b.date.localeCompare(a.date);
+ })
+
+ return {
+ posts,
+ };
+
+
+};
+
+// function to resole post urls
+const resolvePostUrls = function (sitemap: any, posts: any): any {
+ let dynamicUrls: any = {};
+ posts.forEach((post: any) => {
+ Object.keys(sitemap).forEach((path) => {
+ if (sitemap[path].contentID === post.contentID) {
+ dynamicUrls[post.contentID] = path;
+ }
+ });
+ });
+ return dynamicUrls;
+};
+
+export default { getCustomInitialProps }
\ No newline at end of file
diff --git a/framework/module-data/CartData.ts b/lib/module-data/CartData.ts
similarity index 100%
rename from framework/module-data/CartData.ts
rename to lib/module-data/CartData.ts
diff --git a/framework/module-data/ProductDetailsData.ts b/lib/module-data/ProductDetailsData.ts
similarity index 100%
rename from framework/module-data/ProductDetailsData.ts
rename to lib/module-data/ProductDetailsData.ts
diff --git a/framework/module-data/HomeAllProductsGridData.ts b/lib/module-data/ProductListing.ts
similarity index 80%
rename from framework/module-data/HomeAllProductsGridData.ts
rename to lib/module-data/ProductListing.ts
index 74e7b5a02..58fee3688 100644
--- a/framework/module-data/HomeAllProductsGridData.ts
+++ b/lib/module-data/ProductListing.ts
@@ -3,13 +3,14 @@ import commerce from '@lib/api/commerce'
const getCustomInitialProps = async function ({ item, agility, languageCode, channelName, pageInSitemap, dynamicPageItem }: any) {
//TODO: pass the locale and preview mode as props...
-
const locale = "en-US"
const preview = false
+ const numItems = parseInt(item.fields.numItems) || 10
+
const config = { locale, locales: [locale] }
const productsPromise = commerce.getAllProducts({
- variables: { first: 6 },
+ variables: { first: numItems },
config,
preview,
// Saleor provider only
diff --git a/framework/module-data/BestsellingProductsData.ts b/lib/module-data/ProductMarquee.ts
similarity index 100%
rename from framework/module-data/BestsellingProductsData.ts
rename to lib/module-data/ProductMarquee.ts
diff --git a/framework/module-data/ProductSearchData.ts b/lib/module-data/ProductSearchData.ts
similarity index 100%
rename from framework/module-data/ProductSearchData.ts
rename to lib/module-data/ProductSearchData.ts
diff --git a/framework/module-data/index.ts b/lib/module-data/index.ts
similarity index 55%
rename from framework/module-data/index.ts
rename to lib/module-data/index.ts
index 40781246d..47828fb99 100644
--- a/framework/module-data/index.ts
+++ b/lib/module-data/index.ts
@@ -1,17 +1,19 @@
-import BestsellingProductsData from "./BestsellingProductsData"
+
import CartData from "./CartData"
-import FeaturedProductsData from "./FeaturedProductsData"
-import HomeAllProductsGridData from "./HomeAllProductsGridData"
+import ProductListing from "./ProductListing"
+import ProductMarquee from "./ProductMarquee"
import ProductSearchData from "./ProductSearchData"
import ProductDetailsData from "./ProductDetailsData"
+import BlogPostListing from "./BlogPostListing"
const allModules:any =[
- { name: "BestsellingProducts", init: BestsellingProductsData },
- { name: "FeaturedProducts", init: FeaturedProductsData},
- { name: "HomeAllProductsGrid", init: HomeAllProductsGridData},
+
+ { name: "ProductListing", init: ProductListing},
+ { name: "ProductMarquee", init: ProductMarquee},
{ name: "ProductSearch", init: ProductSearchData},
{ name: "Cart", init: CartData},
- { name: "ProductDetails", init: ProductDetailsData}
+ { name: "ProductDetails", init: ProductDetailsData},
+ { name: "BlogPostListing", init: BlogPostListing}
]
/**
diff --git a/package.json b/package.json
index a0ff6c226..6b038997a 100644
--- a/package.json
+++ b/package.json
@@ -26,8 +26,9 @@
},
"dependencies": {
"@agility/content-sync": "^1.0.3",
- "@agility/nextjs": "^0.2.0-rc14",
+ "@agility/nextjs": "^0.2.0-rc18",
"@react-spring/web": "^9.2.1",
+ "@tailwindcss/typography": "^0.4.1",
"@vercel/fetch": "^6.1.0",
"autoprefixer": "^10.2.6",
"body-scroll-lock": "^3.1.5",
@@ -57,7 +58,8 @@
"swell-js": "^4.0.0-next.0",
"swr": "^0.5.6",
"tabbable": "^5.2.0",
- "tailwindcss": "^2.1.2"
+ "tailwindcss": "^2.1.2",
+ "truncate-html": "^1.0.3"
},
"devDependencies": {
"@graphql-codegen/cli": "^1.21.5",
diff --git a/pages/[...slug].tsx b/pages/[...slug].tsx
index 0f405de85..7573fc186 100644
--- a/pages/[...slug].tsx
+++ b/pages/[...slug].tsx
@@ -12,7 +12,8 @@ import { getAgilityPageProps, getAgilityPaths } from "@agility/nextjs/node"
import { handlePreview } from "@agility/nextjs"
import AgilityPage from "components/agility-global/AgilityPage"
-import getModuleData from "framework/module-data"
+import getModuleData from "@lib/module-data"
+import SiteData from '@lib/global-data/SiteData'
export async function getStaticProps({ preview, params, locale, locales, defaultLocale }: GetStaticPropsContext<{ slug: string[] }>) {
@@ -26,15 +27,13 @@ export async function getStaticProps({ preview, params, locale, locales, default
params.slug[1] = "product-details"
}
- //add any global components (header, footer) that need agility data here
+ //add any global data accessor here
const globalComponents = {
- // "header": GlobalHeader,
- // "footer": GlobalFooter
+ "sitedata": SiteData
}
const agilityProps = await getAgilityPageProps({ preview, params, locale, getModule: getModuleData, defaultLocale, globalComponents });
-
let rebuildFrequency = 10
let productDetail: any = null
diff --git a/tailwind.config.js b/tailwind.config.js
index 25f9d8e38..8104d675a 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -65,4 +65,7 @@ module.exports = {
},
},
},
+ plugins: [
+ require('@tailwindcss/typography'),
+ ],
}
diff --git a/yarn.lock b/yarn.lock
index fb357a8cc..b3921d5c6 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -19,10 +19,10 @@
dotenv "^8.2.0"
proper-lockfile "^4.1.2"
-"@agility/nextjs@^0.2.0-rc14":
- version "0.2.0-rc14"
- resolved "https://registry.yarnpkg.com/@agility/nextjs/-/nextjs-0.2.0-rc14.tgz#eaeed440fcaf778db9f463c0f3f0a4bf64316771"
- integrity sha512-DHgiUeVsLZByHcjsawz7HL9OLkD9nIOyHNUwNxuFSWjB22m5jn1V33EdxkF6ecjtC9n3Dm/WkWFsNGXyLIdl/Q==
+"@agility/nextjs@^0.2.0-rc18":
+ version "0.2.0-rc18"
+ resolved "https://registry.yarnpkg.com/@agility/nextjs/-/nextjs-0.2.0-rc18.tgz#bf2f6bfe61bac3c9b8ad9c4b70e461eae017b45c"
+ integrity sha512-hitv7OafgJtVo2Y8s0t9dLmQKhowD1wr9GkP9lOKJkinBNb0kj4Lzf7Cpl7g34wwstPtEYHtwSlWC1bvfdMfUQ==
"@ardatan/aggregate-error@0.0.6":
version "0.0.6"
@@ -1053,6 +1053,16 @@
dependencies:
defer-to-connect "^1.0.1"
+"@tailwindcss/typography@^0.4.1":
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.4.1.tgz#51ddbceea6a0ee9902c649dbe58871c81a831212"
+ integrity sha512-ovPPLUhs7zAIJfr0y1dbGlyCuPhpuv/jpBoFgqAc658DWGGrOBWBMpAWLw2KlzbNeVk4YBJMzue1ekvIbdw6XA==
+ dependencies:
+ lodash.castarray "^4.4.0"
+ lodash.isplainobject "^4.0.6"
+ lodash.merge "^4.6.2"
+ lodash.uniq "^4.5.0"
+
"@tootallnate/once@1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
@@ -1068,6 +1078,13 @@
resolved "https://registry.yarnpkg.com/@types/body-scroll-lock/-/body-scroll-lock-2.6.1.tgz#0dbd2b6ad2f4cfcece7102d6cf8630ce95508ee0"
integrity sha512-PPFm/2A6LfKmSpvMg58gHtSqwwMChbcKKGhSCRIhY4MyFzhY8moAN6HrTCpOeZQUqkFdTFfMqr7njeqGLKt72Q==
+"@types/cheerio@^0.22.8":
+ version "0.22.29"
+ resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.29.tgz#7115e9688bfc9e2f2730327c674b3d6a7e753e09"
+ integrity sha512-rNX1PsrDPxiNiyLnRKiW2NXHJFHqx0Fl3J2WsZq0MTBspa/FgwlqhXJE2crIcc+/2IglLHtSWw7g053oUR8fOg==
+ dependencies:
+ "@types/node" "*"
+
"@types/cookie@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@types/cookie/-/cookie-0.4.0.tgz#14f854c0f93d326e39da6e3b6f34f7d37513d108"
@@ -1621,6 +1638,11 @@ body-scroll-lock@^3.1.5:
resolved "https://registry.yarnpkg.com/body-scroll-lock/-/body-scroll-lock-3.1.5.tgz#c1392d9217ed2c3e237fee1e910f6cdd80b7aaec"
integrity sha512-Yi1Xaml0EvNA0OYWxXiYNqY24AfWkbA6w5vxE7GWxtKfzIbZM+Qw+aSmkgsbWzbHiy/RCSkUZBplVxTA+E4jJg==
+boolbase@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
+ integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
+
bowser@^2.11.0:
version "2.11.0"
resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f"
@@ -1929,6 +1951,28 @@ charenc@0.0.2:
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
integrity sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=
+cheerio@0.22.0:
+ version "0.22.0"
+ resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-0.22.0.tgz#a9baa860a3f9b595a6b81b1a86873121ed3a269e"
+ integrity sha1-qbqoYKP5tZWmuBsahocxIe06Jp4=
+ dependencies:
+ css-select "~1.2.0"
+ dom-serializer "~0.1.0"
+ entities "~1.1.1"
+ htmlparser2 "^3.9.1"
+ lodash.assignin "^4.0.9"
+ lodash.bind "^4.1.4"
+ lodash.defaults "^4.0.1"
+ lodash.filter "^4.4.0"
+ lodash.flatten "^4.2.0"
+ lodash.foreach "^4.3.0"
+ lodash.map "^4.4.0"
+ lodash.merge "^4.4.0"
+ lodash.pick "^4.2.1"
+ lodash.reduce "^4.4.0"
+ lodash.reject "^4.4.0"
+ lodash.some "^4.4.0"
+
chokidar@3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a"
@@ -2301,11 +2345,26 @@ css-prefers-color-scheme@^3.1.1:
dependencies:
postcss "^7.0.5"
+css-select@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"
+ integrity sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=
+ dependencies:
+ boolbase "~1.0.0"
+ css-what "2.1"
+ domutils "1.5.1"
+ nth-check "~1.0.1"
+
css-unit-converter@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/css-unit-converter/-/css-unit-converter-1.1.2.tgz#4c77f5a1954e6dbff60695ecb214e3270436ab21"
integrity sha512-IiJwMC8rdZE0+xiEZHeru6YoONC4rfPMqGm2W85jMIbkFvv5nFTwJVFHam2eFrN6txmoUYFAFXiv8ICVeTO0MA==
+css-what@2.1:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2"
+ integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==
+
css.escape@1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb"
@@ -2629,11 +2688,60 @@ dlv@^1.1.3:
resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79"
integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==
+dom-serializer@0:
+ version "0.2.2"
+ resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.2.2.tgz#1afb81f533717175d478655debc5e332d9f9bb51"
+ integrity sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==
+ dependencies:
+ domelementtype "^2.0.1"
+ entities "^2.0.0"
+
+dom-serializer@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.1.tgz#1ec4059e284babed36eec2941d4a970a189ce7c0"
+ integrity sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==
+ dependencies:
+ domelementtype "^1.3.0"
+ entities "^1.1.1"
+
domain-browser@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==
+domelementtype@1, domelementtype@^1.3.0, domelementtype@^1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.1.tgz#d048c44b37b0d10a7f2a3d5fee3f4333d790481f"
+ integrity sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==
+
+domelementtype@^2.0.1:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57"
+ integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==
+
+domhandler@^2.3.0:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803"
+ integrity sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==
+ dependencies:
+ domelementtype "1"
+
+domutils@1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
+ integrity sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=
+ dependencies:
+ dom-serializer "0"
+ domelementtype "1"
+
+domutils@^1.5.1:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
+ integrity sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==
+ dependencies:
+ dom-serializer "0"
+ domelementtype "1"
+
dot-case@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751"
@@ -2746,6 +2854,16 @@ enquirer@^2.3.6:
dependencies:
ansi-colors "^4.1.1"
+entities@^1.1.1, entities@~1.1.1:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56"
+ integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==
+
+entities@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55"
+ integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==
+
errno@^0.1.3:
version "0.1.8"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f"
@@ -3348,6 +3466,18 @@ html-tags@^3.1.0:
resolved "https://registry.yarnpkg.com/html-tags/-/html-tags-3.1.0.tgz#7b5e6f7e665e9fb41f30007ed9e0d41e97fb2140"
integrity sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==
+htmlparser2@^3.9.1:
+ version "3.10.1"
+ resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f"
+ integrity sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==
+ dependencies:
+ domelementtype "^1.3.1"
+ domhandler "^2.3.0"
+ domutils "^1.5.1"
+ entities "^1.1.1"
+ inherits "^2.0.1"
+ readable-stream "^3.1.1"
+
http-cache-semantics@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
@@ -4034,11 +4164,26 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"
+lodash.assignin@^4.0.9:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.assignin/-/lodash.assignin-4.2.0.tgz#ba8df5fb841eb0a3e8044232b0e263a8dc6a28a2"
+ integrity sha1-uo31+4QesKPoBEIysOJjqNxqKKI=
+
+lodash.bind@^4.1.4:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/lodash.bind/-/lodash.bind-4.2.1.tgz#7ae3017e939622ac31b7d7d7dcb1b34db1690d35"
+ integrity sha1-euMBfpOWIqwxt9fX3LGzTbFpDTU=
+
lodash.camelcase@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
+lodash.castarray@^4.4.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115"
+ integrity sha1-wCUTUV4wna3dTCTGDP3c9ZdtkRU=
+
lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
@@ -4049,6 +4194,26 @@ lodash.debounce@^4.0.8:
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
+lodash.defaults@^4.0.1:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c"
+ integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=
+
+lodash.filter@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.filter/-/lodash.filter-4.6.0.tgz#668b1d4981603ae1cc5a6fa760143e480b4c4ace"
+ integrity sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=
+
+lodash.flatten@^4.2.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f"
+ integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=
+
+lodash.foreach@^4.3.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53"
+ integrity sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM=
+
lodash.get@^4:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
@@ -4089,21 +4254,51 @@ lodash.isstring@^4.0.1:
resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=
+lodash.map@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3"
+ integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=
+
+lodash.merge@^4.4.0, lodash.merge@^4.6.2:
+ version "4.6.2"
+ resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
+ integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
+
lodash.once@^4.0.0:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac"
integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=
+lodash.pick@^4.2.1:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
+ integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=
+
lodash.random@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lodash.random/-/lodash.random-3.2.0.tgz#96e24e763333199130d2c9e2fd57f91703cc262d"
integrity sha1-luJOdjMzGZEw0sni/Vf5FwPMJi0=
+lodash.reduce@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"
+ integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=
+
+lodash.reject@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.reject/-/lodash.reject-4.6.0.tgz#80d6492dc1470864bbf583533b651f42a9f52415"
+ integrity sha1-gNZJLcFHCGS79YNTO2UfQqn1JBU=
+
lodash.snakecase@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=
+lodash.some@^4.4.0:
+ version "4.6.0"
+ resolved "https://registry.yarnpkg.com/lodash.some/-/lodash.some-4.6.0.tgz#1bb9f314ef6b8baded13b549169b2a945eb68e4d"
+ integrity sha1-G7nzFO9ri63tE7VJFpsqlF62jk0=
+
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
@@ -4601,6 +4796,13 @@ npm-run-path@^4.0.1:
dependencies:
path-key "^3.0.0"
+nth-check@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-1.0.2.tgz#b2bd295c37e3dd58a3bf0700376663ba4d9cf05c"
+ integrity sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==
+ dependencies:
+ boolbase "~1.0.0"
+
nullthrows@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1"
@@ -5585,7 +5787,7 @@ readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.3.3, readable
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
-readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0:
+readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
@@ -6408,6 +6610,14 @@ tr46@^1.0.1:
dependencies:
punycode "^2.1.0"
+truncate-html@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/truncate-html/-/truncate-html-1.0.3.tgz#0166dfc7890626130c2e4174c6b73d4d63993e5f"
+ integrity sha512-1o1prdRv+iehXcGwn29YgXU17DotHkr+OK3ijVEG7FGMwHNG9RyobXwimw6djDvbIc24rhmz3tjNNvNESjkNkQ==
+ dependencies:
+ "@types/cheerio" "^0.22.8"
+ cheerio "0.22.0"
+
ts-loader@^7.0.0:
version "7.0.5"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-7.0.5.tgz#789338fb01cb5dc0a33c54e50558b34a73c9c4c5"