@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.
Files changed (66) hide show
  1. package/README.md +79 -0
  2. package/dist/components/CreditsAvailableBadge/messages.de.d.ts +2 -2
  3. package/dist/components/CreditsAvailableBadge/messages.en.d.ts +2 -2
  4. package/dist/components/portfolio/DocumentsDownloadList/messages.de.d.ts +2 -2
  5. package/dist/components/portfolio/DocumentsDownloadList/messages.en.d.ts +2 -2
  6. package/dist/components/portfolio/ProjectInfo/messages.de.d.ts +2 -2
  7. package/dist/components/portfolio/ProjectInfo/messages.en.d.ts +2 -2
  8. package/dist/components/portfolio/SmallCheckout/messages.de.d.ts +2 -2
  9. package/dist/components/portfolio/SmallCheckout/messages.en.d.ts +2 -2
  10. package/dist/index.d.ts +3 -1
  11. package/dist/slices/Comparison/messages.de.d.ts +2 -2
  12. package/dist/slices/Comparison/messages.en.d.ts +2 -2
  13. package/dist/slices/Cta/messages.de.d.ts +2 -2
  14. package/dist/slices/Cta/messages.en.d.ts +2 -2
  15. package/dist/slices/CustomerStories/messages.de.d.ts +2 -2
  16. package/dist/slices/CustomerStories/messages.en.d.ts +2 -2
  17. package/dist/slices/FullWidthImageSlider/styles.d.ts +1 -1
  18. package/dist/slices/Glossary/messages.de.d.ts +2 -2
  19. package/dist/slices/Glossary/messages.en.d.ts +2 -2
  20. package/dist/slices/ProjectFacts/messages.de.d.ts +2 -2
  21. package/dist/slices/ProjectFacts/messages.en.d.ts +2 -2
  22. package/dist/slices/ProjectsMap/messages.de.d.ts +2 -2
  23. package/dist/slices/ProjectsMap/messages.en.d.ts +2 -2
  24. package/dist/slices/ShopCheckout/messages.de.d.ts +2 -2
  25. package/dist/slices/ShopCheckout/messages.en.d.ts +2 -2
  26. package/dist/slices/TextCarousel/styles.d.ts +2 -2
  27. package/dist/strapi-slices.cjs.development.js +36 -36
  28. package/dist/strapi-slices.cjs.development.js.map +1 -1
  29. package/dist/strapi-slices.cjs.production.min.js +1 -1
  30. package/dist/strapi-slices.cjs.production.min.js.map +1 -1
  31. package/dist/strapi-slices.esm.js +36 -36
  32. package/dist/strapi-slices.esm.js.map +1 -1
  33. package/dist/unit.messages.de.d.ts +2 -2
  34. package/dist/unit.messages.en.d.ts +2 -2
  35. package/package.json +1 -1
  36. package/src/components/CreditsAvailableBadge/messages.de.ts +2 -1
  37. package/src/components/CreditsAvailableBadge/messages.en.ts +2 -1
  38. package/src/components/portfolio/DocumentsDownloadList/messages.de.ts +2 -1
  39. package/src/components/portfolio/DocumentsDownloadList/messages.en.ts +2 -1
  40. package/src/components/portfolio/ProjectInfo/messages.de.ts +2 -1
  41. package/src/components/portfolio/ProjectInfo/messages.en.ts +2 -1
  42. package/src/components/portfolio/SmallCheckout/messages.de.ts +2 -1
  43. package/src/components/portfolio/SmallCheckout/messages.en.ts +2 -1
  44. package/src/index.tsx +4 -0
  45. package/src/slices/Comparison/messages.de.ts +2 -1
  46. package/src/slices/Comparison/messages.en.ts +2 -1
  47. package/src/slices/Cta/Cta.tsx +2 -2
  48. package/src/slices/Cta/messages.de.ts +2 -1
  49. package/src/slices/Cta/messages.en.ts +2 -1
  50. package/src/slices/CustomerStories/messages.de.ts +2 -1
  51. package/src/slices/CustomerStories/messages.en.ts +2 -1
  52. package/src/slices/FullWidthImageSlider/FullWidthImageSlider.tsx +1 -1
  53. package/src/slices/FullWidthImageSlider/styles.ts +1 -1
  54. package/src/slices/Glossary/messages.de.ts +2 -1
  55. package/src/slices/Glossary/messages.en.ts +2 -1
  56. package/src/slices/ProjectFacts/messages.de.ts +2 -1
  57. package/src/slices/ProjectFacts/messages.en.ts +2 -1
  58. package/src/slices/ProjectsMap/mapboxStyle.ts +3 -3
  59. package/src/slices/ProjectsMap/messages.de.ts +2 -1
  60. package/src/slices/ProjectsMap/messages.en.ts +2 -1
  61. package/src/slices/ShopCheckout/messages.de.ts +2 -1
  62. package/src/slices/ShopCheckout/messages.en.ts +2 -1
  63. package/src/slices/TextCarousel/TextCarousel.tsx +2 -2
  64. package/src/slices/TextCarousel/styles.ts +6 -6
  65. package/src/unit.messages.de.ts +2 -1
  66. 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 _default: {
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 _default;
7
+ export default messagesDe;
@@ -1,7 +1,7 @@
1
- declare const _default: {
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 _default;
7
+ export default messagesEn;
@@ -1,5 +1,5 @@
1
- declare const _default: {
1
+ declare const messagesDe: {
2
2
  'features.portfolio.documentsDownloadList.projectDocuments': string;
3
3
  'features.portfolio.documentsDownloadList.downloadDocument': string;
4
4
  };
5
- export default _default;
5
+ export default messagesDe;
@@ -1,5 +1,5 @@
1
- declare const _default: {
1
+ declare const messagesEn: {
2
2
  'features.portfolio.documentsDownloadList.projectDocuments': string;
3
3
  'features.portfolio.documentsDownloadList.downloadDocument': string;
4
4
  };
5
- export default _default;
5
+ export default messagesEn;
@@ -1,4 +1,4 @@
1
- declare const _default: {
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 _default;
15
+ export default messagesDe;
@@ -1,4 +1,4 @@
1
- declare const _default: {
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 _default;
15
+ export default messagesEn;
@@ -1,4 +1,4 @@
1
- declare const _default: {
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 _default;
16
+ export default messagesDe;
@@ -1,4 +1,4 @@
1
- declare const _default: {
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 _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, };
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const messagesDe: {
2
2
  'sections.comparison.backgroundShapes': string;
3
3
  };
4
- export default _default;
4
+ export default messagesDe;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const messagesEn: {
2
2
  'sections.comparison.backgroundShapes': string;
3
3
  };
4
- export default _default;
4
+ export default messagesEn;
@@ -1,5 +1,5 @@
1
- declare const _default: {
1
+ declare const messagesDe: {
2
2
  'sections.cta.backgroundShapes': string;
3
3
  'sections.cta.backgroundShapesLight': string;
4
4
  };
5
- export default _default;
5
+ export default messagesDe;
@@ -1,5 +1,5 @@
1
- declare const _default: {
1
+ declare const messagesEn: {
2
2
  'sections.cta.backgroundShapesDark': string;
3
3
  'sections.cta.backgroundShapesLight': string;
4
4
  };
5
- export default _default;
5
+ export default messagesEn;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const messagesDe: {
2
2
  'sections.customerStories.more': string;
3
3
  };
4
- export default _default;
4
+ export default messagesDe;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const messagesEn: {
2
2
  'sections.customerStories.more': string;
3
3
  };
4
- export default _default;
4
+ export default messagesEn;
@@ -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: boolean;
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,6 +1,6 @@
1
- declare const _default: {
1
+ declare const messagesDe: {
2
2
  'sections.glossary.copyButtonLabel': string;
3
3
  'sections.glossary.copySuccessMessage': string;
4
4
  'sections.glossary.copyFailureMessage': string;
5
5
  };
6
- export default _default;
6
+ export default messagesDe;
@@ -1,6 +1,6 @@
1
- declare const _default: {
1
+ declare const messagesEn: {
2
2
  'sections.glossary.copyButtonLabel': string;
3
3
  'sections.glossary.copySuccessMessage': string;
4
4
  'sections.glossary.copyFailureMessage': string;
5
5
  };
6
- export default _default;
6
+ export default messagesEn;
@@ -1,5 +1,5 @@
1
- declare const _default: {
1
+ declare const messagesDe: {
2
2
  'sections.projectFacts.projectInfo.value': string;
3
3
  'projects.projectFacts.properties.area': string;
4
4
  };
5
- export default _default;
5
+ export default messagesDe;
@@ -1,5 +1,5 @@
1
- declare const _default: {
1
+ declare const messagesEn: {
2
2
  'sections.projectFacts.projectInfo.value': string;
3
3
  'projects.projectFacts.properties.area': string;
4
4
  };
5
- export default _default;
5
+ export default messagesEn;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const messagesDe: {
2
2
  'sections.projectsMap.link.text': string;
3
3
  };
4
- export default _default;
4
+ export default messagesDe;
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const messagesEn: {
2
2
  'sections.projectsMap.link.text': string;
3
3
  };
4
- export default _default;
4
+ export default messagesEn;
@@ -1,4 +1,4 @@
1
- declare const _default: {
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 _default;
15
+ export default messagesDe;
@@ -1,4 +1,4 @@
1
- declare const _default: {
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 _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
- numberOfItems: number;
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
- numberOfItems: number;
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;