@treely/strapi-slices 2.3.0 → 2.4.1
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/README.md +79 -0
- package/dist/components/CreditsAvailableBadge/messages.de.d.ts +2 -2
- package/dist/components/CreditsAvailableBadge/messages.en.d.ts +2 -2
- package/dist/components/portfolio/DocumentsDownloadList/messages.de.d.ts +2 -2
- package/dist/components/portfolio/DocumentsDownloadList/messages.en.d.ts +2 -2
- package/dist/components/portfolio/ProjectInfo/messages.de.d.ts +2 -2
- package/dist/components/portfolio/ProjectInfo/messages.en.d.ts +2 -2
- package/dist/components/portfolio/SmallCheckout/messages.de.d.ts +2 -2
- package/dist/components/portfolio/SmallCheckout/messages.en.d.ts +2 -2
- package/dist/index.d.ts +3 -1
- package/dist/slices/Comparison/messages.de.d.ts +2 -2
- package/dist/slices/Comparison/messages.en.d.ts +2 -2
- package/dist/slices/Cta/messages.de.d.ts +2 -2
- package/dist/slices/Cta/messages.en.d.ts +2 -2
- package/dist/slices/CustomerStories/messages.de.d.ts +2 -2
- package/dist/slices/CustomerStories/messages.en.d.ts +2 -2
- package/dist/slices/FullWidthImageSlider/styles.d.ts +1 -1
- package/dist/slices/Glossary/messages.de.d.ts +2 -2
- package/dist/slices/Glossary/messages.en.d.ts +2 -2
- package/dist/slices/ProjectFacts/messages.de.d.ts +2 -2
- package/dist/slices/ProjectFacts/messages.en.d.ts +2 -2
- package/dist/slices/ProjectsMap/messages.de.d.ts +2 -2
- package/dist/slices/ProjectsMap/messages.en.d.ts +2 -2
- package/dist/slices/ShopCheckout/messages.de.d.ts +2 -2
- package/dist/slices/ShopCheckout/messages.en.d.ts +2 -2
- package/dist/slices/TextCarousel/styles.d.ts +2 -2
- package/dist/strapi-slices.cjs.development.js +36 -36
- package/dist/strapi-slices.cjs.development.js.map +1 -1
- package/dist/strapi-slices.cjs.production.min.js +1 -1
- package/dist/strapi-slices.cjs.production.min.js.map +1 -1
- package/dist/strapi-slices.esm.js +36 -36
- package/dist/strapi-slices.esm.js.map +1 -1
- package/dist/unit.messages.de.d.ts +2 -2
- package/dist/unit.messages.en.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/CreditsAvailableBadge/messages.de.ts +2 -1
- package/src/components/CreditsAvailableBadge/messages.en.ts +2 -1
- package/src/components/portfolio/DocumentsDownloadList/messages.de.ts +2 -1
- package/src/components/portfolio/DocumentsDownloadList/messages.en.ts +2 -1
- package/src/components/portfolio/ProjectInfo/messages.de.ts +2 -1
- package/src/components/portfolio/ProjectInfo/messages.en.ts +2 -1
- package/src/components/portfolio/SmallCheckout/messages.de.ts +2 -1
- package/src/components/portfolio/SmallCheckout/messages.en.ts +2 -1
- package/src/index.tsx +4 -0
- package/src/slices/Comparison/messages.de.ts +2 -1
- package/src/slices/Comparison/messages.en.ts +2 -1
- package/src/slices/Cta/Cta.tsx +2 -2
- package/src/slices/Cta/messages.de.ts +2 -1
- package/src/slices/Cta/messages.en.ts +2 -1
- package/src/slices/CustomerStories/messages.de.ts +2 -1
- package/src/slices/CustomerStories/messages.en.ts +2 -1
- package/src/slices/FullWidthImageSlider/FullWidthImageSlider.tsx +1 -1
- package/src/slices/FullWidthImageSlider/styles.ts +1 -1
- package/src/slices/Glossary/messages.de.ts +2 -1
- package/src/slices/Glossary/messages.en.ts +2 -1
- package/src/slices/ProjectFacts/messages.de.ts +2 -1
- package/src/slices/ProjectFacts/messages.en.ts +2 -1
- package/src/slices/ProjectsMap/mapboxStyle.ts +3 -3
- package/src/slices/ProjectsMap/messages.de.ts +2 -1
- package/src/slices/ProjectsMap/messages.en.ts +2 -1
- package/src/slices/ShopCheckout/messages.de.ts +2 -1
- package/src/slices/ShopCheckout/messages.en.ts +2 -1
- package/src/slices/TextCarousel/TextCarousel.tsx +2 -2
- package/src/slices/TextCarousel/styles.ts +6 -6
- package/src/unit.messages.de.ts +2 -1
- package/src/unit.messages.en.ts +2 -1
package/README.md
CHANGED
|
@@ -3,3 +3,82 @@
|
|
|
3
3
|
This package contains all the slices that are used for the Tree.ly website as
|
|
4
4
|
well as other projects developed by Tree.ly and powered by the Tree.ly Strapi
|
|
5
5
|
instance.
|
|
6
|
+
|
|
7
|
+
Find the documentation of the slices [here](https://storybook.tree.ly).
|
|
8
|
+
|
|
9
|
+
## Development
|
|
10
|
+
|
|
11
|
+
Install dependencies:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Run the app in DEV mode:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm run dev
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Run the linter:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run lint
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Run the tests:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm run test
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Commit message guideline
|
|
36
|
+
|
|
37
|
+
The project uses the Angular commit message guideline. Find the documentation
|
|
38
|
+
[here](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format).
|
|
39
|
+
|
|
40
|
+
## Build
|
|
41
|
+
|
|
42
|
+
Build the package:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm run build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Find the build in the `dist` folder.
|
|
49
|
+
|
|
50
|
+
## Use the package
|
|
51
|
+
|
|
52
|
+
Install the package:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install @tree-ly/strapi-slices
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use the slices:
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import {
|
|
62
|
+
IStrapiData,
|
|
63
|
+
SliceRenderer,
|
|
64
|
+
StrapiBlogPost,
|
|
65
|
+
StrapiCustomerStory
|
|
66
|
+
} from '@tree-ly/strapi-slices';
|
|
67
|
+
|
|
68
|
+
// Get the slices, blog posts, and customer stories from Strapi
|
|
69
|
+
// Get the projects from the FPM API
|
|
70
|
+
const slices: any[] = [];
|
|
71
|
+
const blogPosts: IStrapiData<StrapiBlogPost> = [];
|
|
72
|
+
const projects: PortfolioProject[] = [];
|
|
73
|
+
const customerStories: IStrapiData<StrapiCustomerStory> = [];
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
const App = (): JSX.Element => (
|
|
77
|
+
<SliceRenderer
|
|
78
|
+
slices={slices}
|
|
79
|
+
blogPosts={blogPosts}
|
|
80
|
+
projects={projects}
|
|
81
|
+
customerStories={customerStories}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesDe: {
|
|
2
2
|
'components.creditsAvailableBadge.text.yes': string;
|
|
3
3
|
'components.creditsAvailableBadge.text.some': string;
|
|
4
4
|
'components.creditsAvailableBadge.text.no': string;
|
|
5
5
|
'components.creditsAvailableBadge.text.notYet': string;
|
|
6
6
|
};
|
|
7
|
-
export default
|
|
7
|
+
export default messagesDe;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesEn: {
|
|
2
2
|
'components.creditsAvailableBadge.text.yes': string;
|
|
3
3
|
'components.creditsAvailableBadge.text.some': string;
|
|
4
4
|
'components.creditsAvailableBadge.text.no': string;
|
|
5
5
|
'components.creditsAvailableBadge.text.notYet': string;
|
|
6
6
|
};
|
|
7
|
-
export default
|
|
7
|
+
export default messagesEn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesDe: {
|
|
2
2
|
'features.projectInfo.projectInfo.value': string;
|
|
3
3
|
'features.projectInfo.properties.area': string;
|
|
4
4
|
'features.projectInfo.properties.location': string;
|
|
@@ -12,4 +12,4 @@ declare const _default: {
|
|
|
12
12
|
'features.projectInfo.properties.riskBuffer': string;
|
|
13
13
|
'features.projectInfo.properties.year': string;
|
|
14
14
|
};
|
|
15
|
-
export default
|
|
15
|
+
export default messagesDe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesEn: {
|
|
2
2
|
'features.projectInfo.projectInfo.value': string;
|
|
3
3
|
'features.projectInfo.properties.area': string;
|
|
4
4
|
'features.projectInfo.properties.location': string;
|
|
@@ -12,4 +12,4 @@ declare const _default: {
|
|
|
12
12
|
'features.projectInfo.properties.riskBuffer': string;
|
|
13
13
|
'features.projectInfo.properties.year': string;
|
|
14
14
|
};
|
|
15
|
-
export default
|
|
15
|
+
export default messagesEn;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesDe: {
|
|
2
2
|
'portfolio.smallCheckout.contributionValueCurrency.label.CHF': string;
|
|
3
3
|
'portfolio.smallCheckout.contributionValueCurrency.label.EUR': string;
|
|
4
4
|
'portfolio.smallCheckout.contributionValueCurrency.unit.EUR': string;
|
|
@@ -13,4 +13,4 @@ declare const _default: {
|
|
|
13
13
|
'portfolio.smallCheckout.cta.subTitle': string;
|
|
14
14
|
'portfolio.smallCheckout.cta.button': string;
|
|
15
15
|
};
|
|
16
|
-
export default
|
|
16
|
+
export default messagesDe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesEn: {
|
|
2
2
|
'portfolio.smallCheckout.contributionValueCurrency.label.CHF': string;
|
|
3
3
|
'portfolio.smallCheckout.contributionValueCurrency.label.EUR': string;
|
|
4
4
|
'portfolio.smallCheckout.contributionValueCurrency.unit.EUR': string;
|
|
@@ -13,4 +13,4 @@ declare const _default: {
|
|
|
13
13
|
'portfolio.smallCheckout.cta.subTitle': string;
|
|
14
14
|
'portfolio.smallCheckout.cta.button': string;
|
|
15
15
|
};
|
|
16
|
-
export default
|
|
16
|
+
export default messagesEn;
|
package/dist/index.d.ts
CHANGED
|
@@ -39,8 +39,10 @@ import StrapiTextCardWithIcons from './models/strapi/StrapiTextCardWithIcons';
|
|
|
39
39
|
import StrapiTopBanner from './models/strapi/StrapiTopBanner';
|
|
40
40
|
import HeaderType from './models/HeaderType';
|
|
41
41
|
import Image from './models/Image';
|
|
42
|
+
import Locale from './models/Locale';
|
|
42
43
|
import PageMetadata from './models/PageMetadata';
|
|
43
44
|
import PageProps from './models/PageProps';
|
|
45
|
+
import PortfolioProject from './models/PortfolioProject';
|
|
44
46
|
import mergeGlobalAndStrapiBlogPostData from './utils/mergeGlobalAndStrapiBlogPostData';
|
|
45
47
|
import mergeGlobalAndStrapiCustomerStoryData from './utils/mergeGlobalAndStrapiCustomerStoryData';
|
|
46
48
|
import mergeGlobalAndStrapiPageData from './utils/mergeGlobalAndStrapiPageData';
|
|
@@ -51,4 +53,4 @@ import { SECTIONS_WITH_BLOG_POSTS, SECTIONS_WITH_CUSTOMER_STORIES, SECTIONS_WITH
|
|
|
51
53
|
export * from './components/SEOTags';
|
|
52
54
|
export * from './components/SliceRenderer';
|
|
53
55
|
export { mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProjectData, strapiLinkUrl, strapiMediaUrl, SECTIONS_WITH_BLOG_POSTS, SECTIONS_WITH_CUSTOMER_STORIES, SECTIONS_WITH_PROJECTS, };
|
|
54
|
-
export type { IStrapi, IStrapiData, IStrapiResponse, StrapiAuthor, StrapiAvatarWithName, StrapiBanner, StrapiBlogPost, StrapiBlogPostProps, StrapiButtonWithVariant, StrapiCategory, StrapiContactArea, StrapiCustomerStory, StrapiCustomerStoryProps, StrapiDefaultHeader, StrapiGlobal, StrapiGlossaryItem, StrapiHeroCard, StrapiImage, StrapiImageFormat, StrapiImageWithLink, StrapiLink, StrapiLinkList, StrapiLinkPage, StrapiLinkWithIcon, StrapiLocalization, StrapiMedia, StrapiMetadata, StrapiNavMenu, StrapiPage, StrapiPageProps, StrapiPortfolio, StrapiPortfolioCard, StrapiProject, StrapiProjectProps, StrapiProjectCard, StrapiQuoteCard, StrapiShapesCard, StrapiTextCardWithIcons, StrapiTopBanner, HeaderType, Image, PageMetadata, PageProps, };
|
|
56
|
+
export type { IStrapi, IStrapiData, IStrapiResponse, StrapiAuthor, StrapiAvatarWithName, StrapiBanner, StrapiBlogPost, StrapiBlogPostProps, StrapiButtonWithVariant, StrapiCategory, StrapiContactArea, StrapiCustomerStory, StrapiCustomerStoryProps, StrapiDefaultHeader, StrapiGlobal, StrapiGlossaryItem, StrapiHeroCard, StrapiImage, StrapiImageFormat, StrapiImageWithLink, StrapiLink, StrapiLinkList, StrapiLinkPage, StrapiLinkWithIcon, StrapiLocalization, StrapiMedia, StrapiMetadata, StrapiNavMenu, StrapiPage, StrapiPageProps, StrapiPortfolio, StrapiPortfolioCard, StrapiProject, StrapiProjectProps, StrapiProjectCard, StrapiQuoteCard, StrapiShapesCard, StrapiTextCardWithIcons, StrapiTopBanner, HeaderType, Image, Locale, PageMetadata, PageProps, PortfolioProject, };
|
|
@@ -4,7 +4,7 @@ export declare const SliderContainer: import("@emotion/styled").StyledComponent<
|
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
}, {}, {}>;
|
|
6
6
|
interface ButtonsContainerProps {
|
|
7
|
-
show:
|
|
7
|
+
show: string;
|
|
8
8
|
}
|
|
9
9
|
export declare const ButtonsContainer: import("@emotion/styled").StyledComponent<(import("@chakra-ui/system/dist/system.types").MergeWithAs<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, Omit<import("@chakra-ui/system/dist/system.types").ChakraProps, never>, import("@chakra-ui/system/dist/system.types").As> & {
|
|
10
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesDe: {
|
|
2
2
|
'sections.shopCheckout.intro.price': string;
|
|
3
3
|
'sections.shopCheckout.contributionValue.label.EUR': string;
|
|
4
4
|
'sections.shopCheckout.contributionValue.label.CHF': string;
|
|
@@ -12,4 +12,4 @@ declare const _default: {
|
|
|
12
12
|
'sections.shopCheckout.summary.price': string;
|
|
13
13
|
'sections.shopCheckout.submit': string;
|
|
14
14
|
};
|
|
15
|
-
export default
|
|
15
|
+
export default messagesDe;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const messagesEn: {
|
|
2
2
|
'sections.shopCheckout.intro.price': string;
|
|
3
3
|
'sections.shopCheckout.contributionValue.label.EUR': string;
|
|
4
4
|
'sections.shopCheckout.contributionValue.label.CHF': string;
|
|
@@ -12,4 +12,4 @@ declare const _default: {
|
|
|
12
12
|
'sections.shopCheckout.summary.price': string;
|
|
13
13
|
'sections.shopCheckout.submit': string;
|
|
14
14
|
};
|
|
15
|
-
export default
|
|
15
|
+
export default messagesEn;
|
|
@@ -4,7 +4,7 @@ export declare const CarouselContainer: import("@emotion/styled").StyledComponen
|
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
}, {}, {}>;
|
|
6
6
|
interface CarouselInnerContainerProps {
|
|
7
|
-
|
|
7
|
+
numberofitems: number;
|
|
8
8
|
}
|
|
9
9
|
export declare const CarouselInnerContainer: import("@emotion/styled").StyledComponent<{
|
|
10
10
|
slot?: string | undefined;
|
|
@@ -274,7 +274,7 @@ export declare const CarouselInnerContainer: import("@emotion/styled").StyledCom
|
|
|
274
274
|
theme?: import("@emotion/react").Theme | undefined;
|
|
275
275
|
} & CarouselInnerContainerProps, {}, {}>;
|
|
276
276
|
interface CardContainerProps {
|
|
277
|
-
|
|
277
|
+
numberofitems: number;
|
|
278
278
|
}
|
|
279
279
|
export declare const CardContainer: import("@emotion/styled").StyledComponent<(import("@chakra-ui/system/dist/system.types").MergeWithAs<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, any, Omit<import("@chakra-ui/system/dist/system.types").ChakraProps, never>, import("@chakra-ui/system/dist/system.types").As> & {
|
|
280
280
|
theme?: import("@emotion/react").Theme | undefined;
|