@treely/strapi-slices 2.1.0 → 2.2.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/dist/components/SEOTags/SEOTags.d.ts +14 -0
- package/dist/components/SEOTags/index.d.ts +1 -0
- package/dist/components/portfolio/SmallCheckout/SmallCheckout.d.ts +1 -1
- package/dist/constants/metadata.d.ts +2 -0
- package/dist/constants/sectionsConfig.d.ts +5 -0
- package/dist/index.d.ts +16 -1
- package/dist/models/HeaderType.d.ts +5 -0
- package/dist/models/Image.d.ts +5 -0
- package/dist/models/PageMetadata.d.ts +9 -0
- package/dist/models/PageProps.d.ts +21 -0
- package/dist/models/strapi/StrapiBlogPostProps.d.ts +6 -0
- package/dist/models/strapi/StrapiCustomerStoryProps.d.ts +6 -0
- package/dist/models/strapi/StrapiPageProps.d.ts +6 -0
- package/dist/models/strapi/StrapiProjectProps.d.ts +6 -0
- package/dist/slices/FullWidthImageSlider/styles.d.ts +1 -0
- package/dist/slices/TextCarousel/styles.d.ts +1 -0
- package/dist/strapi-slices.cjs.development.js +232 -11
- 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 +224 -11
- package/dist/strapi-slices.esm.js.map +1 -1
- package/dist/test/mocks/getStaticPropsContext.d.ts +3 -0
- package/dist/utils/mergeGlobalAndStrapiBlogPostData.d.ts +5 -0
- package/dist/utils/mergeGlobalAndStrapiBlogPostData.test.d.ts +1 -0
- package/dist/utils/mergeGlobalAndStrapiCustomerStoryData.d.ts +4 -0
- package/dist/utils/mergeGlobalAndStrapiCustomerStoryData.test.d.ts +1 -0
- package/dist/utils/mergeGlobalAndStrapiPageData.d.ts +5 -0
- package/dist/utils/mergeGlobalAndStrapiPageData.test.d.ts +1 -0
- package/dist/utils/mergeGlobalAndStrapiProjectData.d.ts +5 -0
- package/dist/utils/mergeGlobalAndStrapiProjectData.test.d.ts +1 -0
- package/package.json +1 -2
- package/src/components/SEOTags/SEOTags.tsx +53 -0
- package/src/components/SEOTags/index.ts +1 -0
- package/src/components/portfolio/SmallCheckout/SmallCheckout.tsx +14 -15
- package/src/constants/metadata.ts +3 -0
- package/src/constants/sectionsConfig.ts +20 -0
- package/src/index.tsx +45 -0
- package/src/models/HeaderType.ts +6 -0
- package/src/models/Image.ts +6 -0
- package/src/models/PageMetadata.ts +11 -0
- package/src/models/PageProps.ts +32 -0
- package/src/models/strapi/StrapiBlogPostProps.ts +7 -0
- package/src/models/strapi/StrapiCustomerStoryProps.ts +9 -0
- package/src/models/strapi/StrapiPageProps.ts +7 -0
- package/src/models/strapi/StrapiProjectProps.ts +7 -0
- package/src/slices/ProjectFacts/ProjectFacts.stories.tsx +53 -0
- package/src/test/mocks/getStaticPropsContext.ts +9 -0
- package/src/utils/mergeGlobalAndStrapiBlogPostData.test.ts +154 -0
- package/src/utils/mergeGlobalAndStrapiBlogPostData.ts +68 -0
- package/src/utils/mergeGlobalAndStrapiCustomerStoryData.test.ts +149 -0
- package/src/utils/mergeGlobalAndStrapiCustomerStoryData.ts +68 -0
- package/src/utils/mergeGlobalAndStrapiPageData.test.ts +254 -0
- package/src/utils/mergeGlobalAndStrapiPageData.ts +81 -0
- package/src/utils/mergeGlobalAndStrapiProjectData.test.ts +243 -0
- package/src/utils/mergeGlobalAndStrapiProjectData.ts +79 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect, Fragment, createRef, createContext, useContext, useCallback, useMemo } from 'react';
|
|
2
|
+
import Head from 'next/head';
|
|
2
3
|
import { Box, BoemlyModal, Flex, IconButton, useMediaQuery, DefaultSectionContainer, Wrapper, DefaultSectionHeader, Button, Gradient, Spacer, SimpleGrid, Heading, Text, useToken, Grid, GridItem, BoemlyList, PortfolioCard, RichText, BoemlyAccordion, HeroCard, Shape, QuoteCard, Center, ShapesCard, TextCardWithIcon, ContactArea, ProjectCard, Tag, Link as Link$1, BoemlyThemeProvider, DatePersonPair, Badge, useDisclosure, Container, AvatarWithName, Divider, LabelNumberPair, BoemlyFormControl, InputRightAddon, LabelTextPair } from 'boemly';
|
|
3
4
|
import Image from 'next/image';
|
|
4
5
|
import { useLockBodyScroll, useKey, useWindowScroll, useWindowSize, useMeasure, useCopyToClipboard } from 'react-use';
|
|
5
6
|
import { CaretLeft, CaretRight, Globe, ArrowRight, MapPin, ArrowLeft, Check, Link as Link$2, FilePdf, DownloadSimple, X } from '@phosphor-icons/react';
|
|
6
|
-
import Head from 'next/head';
|
|
7
7
|
import Link from 'next/link';
|
|
8
8
|
import { useDetectAdBlock } from 'adblock-detect-react';
|
|
9
9
|
import { useRouter } from 'next/router';
|
|
@@ -398,6 +398,219 @@ var strapiMediaUrl = function strapiMediaUrl(media, preferredSize) {
|
|
|
398
398
|
return "" + ((STRAPI_URI.includes('127.0.0.1') || STRAPI_URI.includes('localhost')) && !process.env.STORYBOOK ? STRAPI_URI : '') + url;
|
|
399
399
|
};
|
|
400
400
|
|
|
401
|
+
var DEFAULT_SHARE_IMAGE = 'https://cdn.tree.ly/assets/v3/app/share-image-generic.webp';
|
|
402
|
+
var DEFAULT_SHARE_ALT = 'Share Image';
|
|
403
|
+
|
|
404
|
+
var mergeGlobalAndStrapiBlogPostData = function mergeGlobalAndStrapiBlogPostData(context, global, post, blog, projects) {
|
|
405
|
+
var _post$attributes$meta, _post$attributes$meta2, _post$attributes$meta3, _global$attributes$me, _post$attributes, _post$attributes$meta4, _post$attributes$meta5, _post$attributes$meta6, _post$attributes$meta7, _ref, _post$attributes$meta8, _post$attributes$meta9, _global$attributes$me2;
|
|
406
|
+
var metaShareImageUrl = (_post$attributes$meta = post.attributes.metadata) != null && _post$attributes$meta.shareImage ? strapiMediaUrl((_post$attributes$meta2 = (_post$attributes$meta3 = post.attributes.metadata) == null ? void 0 : _post$attributes$meta3.shareImage.media) != null ? _post$attributes$meta2 : (_global$attributes$me = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me.media, 'large') : DEFAULT_SHARE_IMAGE;
|
|
407
|
+
return _extends({}, post, {
|
|
408
|
+
// Portfolio Projects
|
|
409
|
+
projects: projects,
|
|
410
|
+
// StrapiBlogPost
|
|
411
|
+
attributes: _extends({}, post == null ? void 0 : post.attributes, {
|
|
412
|
+
metadata: (post == null || (_post$attributes = post.attributes) == null ? void 0 : _post$attributes.metadata) || global.attributes.metadata
|
|
413
|
+
}),
|
|
414
|
+
// PageProps
|
|
415
|
+
headerType: {
|
|
416
|
+
extendable: true,
|
|
417
|
+
theme: 'light'
|
|
418
|
+
},
|
|
419
|
+
headerNavMenus: global.attributes.navbar.navMenus || [],
|
|
420
|
+
headerButtons: global.attributes.navbar.buttons || [],
|
|
421
|
+
footerLinks: global.attributes.footer.links || [],
|
|
422
|
+
metadata: {
|
|
423
|
+
title: (_post$attributes$meta4 = (_post$attributes$meta5 = post.attributes.metadata) == null ? void 0 : _post$attributes$meta5.title) != null ? _post$attributes$meta4 : global.attributes.metadata.title,
|
|
424
|
+
description: (_post$attributes$meta6 = (_post$attributes$meta7 = post.attributes.metadata) == null ? void 0 : _post$attributes$meta7.description) != null ? _post$attributes$meta6 : global.attributes.metadata.description,
|
|
425
|
+
shareImage: {
|
|
426
|
+
url: metaShareImageUrl,
|
|
427
|
+
alt: (_ref = (_post$attributes$meta8 = (_post$attributes$meta9 = post.attributes.metadata) == null || (_post$attributes$meta9 = _post$attributes$meta9.shareImage) == null ? void 0 : _post$attributes$meta9.alt) != null ? _post$attributes$meta8 : (_global$attributes$me2 = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me2.alt) != null ? _ref : DEFAULT_SHARE_ALT
|
|
428
|
+
},
|
|
429
|
+
metaTitleSuffix: global.attributes.metaTitleSuffix,
|
|
430
|
+
favicon: strapiMediaUrl(global.attributes.favicon, 'thumbnail')
|
|
431
|
+
},
|
|
432
|
+
slices: post == null ? void 0 : post.attributes.slices,
|
|
433
|
+
blogPosts: blog,
|
|
434
|
+
banner: global.attributes.banner,
|
|
435
|
+
topBanner: (post == null ? void 0 : post.attributes.topBanner) || global.attributes.topBanner,
|
|
436
|
+
customerStories: []
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
var mergeGlobalAndStrapiCustomerStoryData = function mergeGlobalAndStrapiCustomerStoryData(context, global, customerStory, customerStories) {
|
|
441
|
+
var _customerStory$attrib, _customerStory$attrib2, _customerStory$attrib3, _global$attributes$me, _customerStory$attrib4, _customerStory$attrib5, _customerStory$attrib6, _customerStory$attrib7, _customerStory$attrib8, _ref, _customerStory$attrib9, _customerStory$attrib10, _global$attributes$me2;
|
|
442
|
+
var metaShareImageUrl = (_customerStory$attrib = customerStory.attributes.metadata) != null && _customerStory$attrib.shareImage ? strapiMediaUrl((_customerStory$attrib2 = (_customerStory$attrib3 = customerStory.attributes.metadata) == null ? void 0 : _customerStory$attrib3.shareImage.media) != null ? _customerStory$attrib2 : (_global$attributes$me = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me.media, 'large') : DEFAULT_SHARE_IMAGE;
|
|
443
|
+
return _extends({}, customerStory, {
|
|
444
|
+
// Portfolio Projects
|
|
445
|
+
projects: [],
|
|
446
|
+
attributes: _extends({}, customerStory == null ? void 0 : customerStory.attributes, {
|
|
447
|
+
metadata: (customerStory == null || (_customerStory$attrib4 = customerStory.attributes) == null ? void 0 : _customerStory$attrib4.metadata) || global.attributes.metadata
|
|
448
|
+
}),
|
|
449
|
+
// PageProps
|
|
450
|
+
headerType: {
|
|
451
|
+
extendable: true,
|
|
452
|
+
theme: 'light'
|
|
453
|
+
},
|
|
454
|
+
headerNavMenus: global.attributes.navbar.navMenus || [],
|
|
455
|
+
headerButtons: global.attributes.navbar.buttons || [],
|
|
456
|
+
footerLinks: global.attributes.footer.links || [],
|
|
457
|
+
metadata: {
|
|
458
|
+
title: (_customerStory$attrib5 = (_customerStory$attrib6 = customerStory.attributes.metadata) == null ? void 0 : _customerStory$attrib6.title) != null ? _customerStory$attrib5 : global.attributes.metadata.title,
|
|
459
|
+
description: (_customerStory$attrib7 = (_customerStory$attrib8 = customerStory.attributes.metadata) == null ? void 0 : _customerStory$attrib8.description) != null ? _customerStory$attrib7 : global.attributes.metadata.description,
|
|
460
|
+
shareImage: {
|
|
461
|
+
url: metaShareImageUrl,
|
|
462
|
+
alt: (_ref = (_customerStory$attrib9 = (_customerStory$attrib10 = customerStory.attributes.metadata) == null || (_customerStory$attrib10 = _customerStory$attrib10.shareImage) == null ? void 0 : _customerStory$attrib10.alt) != null ? _customerStory$attrib9 : (_global$attributes$me2 = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me2.alt) != null ? _ref : DEFAULT_SHARE_ALT
|
|
463
|
+
},
|
|
464
|
+
metaTitleSuffix: global.attributes.metaTitleSuffix,
|
|
465
|
+
favicon: strapiMediaUrl(global.attributes.favicon, 'thumbnail')
|
|
466
|
+
},
|
|
467
|
+
slices: customerStory == null ? void 0 : customerStory.attributes.slices,
|
|
468
|
+
customerStories: customerStories,
|
|
469
|
+
banner: global.attributes.banner,
|
|
470
|
+
topBanner: (customerStory == null ? void 0 : customerStory.attributes.topBanner) || global.attributes.topBanner,
|
|
471
|
+
blogPosts: []
|
|
472
|
+
});
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
var EXTENDABLE_HEADER_SECTIONS = ['sections.hero', 'sections.map-hero', 'sections.full-width-image', 'sections.small-hero', 'sections.small-hero-light'];
|
|
476
|
+
var DARK_THEME_HEADER_SECTIONS = ['sections.hero', 'sections.small-hero'];
|
|
477
|
+
var SECTIONS_WITH_BLOG_POSTS = ['sections.blog', 'sections.blog-cards'];
|
|
478
|
+
var SECTIONS_WITH_CUSTOMER_STORIES = ['sections.customer-stories'];
|
|
479
|
+
var SECTIONS_WITH_PROJECTS = ['sections.projects-map', 'sections.project-facts'];
|
|
480
|
+
|
|
481
|
+
var mergeGlobalAndStrapiPageData = function mergeGlobalAndStrapiPageData(context, global, page, blogPosts, customerStories, projects) {
|
|
482
|
+
var _page$attributes$meta, _page$attributes$meta2, _page$attributes$meta3, _global$attributes$me, _page$attributes$meta4, _page$attributes, _page$attributes$slic, _page$attributes$slic2, _page$attributes$meta5, _page$attributes$meta6, _page$attributes$meta7, _page$attributes$meta8, _ref, _page$attributes$meta9, _page$attributes$meta10, _global$attributes$me2;
|
|
483
|
+
var metaShareImageUrl = (_page$attributes$meta = page.attributes.metadata) != null && _page$attributes$meta.shareImage ? strapiMediaUrl((_page$attributes$meta2 = (_page$attributes$meta3 = page.attributes.metadata) == null ? void 0 : _page$attributes$meta3.shareImage.media) != null ? _page$attributes$meta2 : (_global$attributes$me = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me.media, 'large') : DEFAULT_SHARE_IMAGE;
|
|
484
|
+
return _extends({}, page, {
|
|
485
|
+
// Portfolio Projects
|
|
486
|
+
projects: projects,
|
|
487
|
+
// StrapiPage
|
|
488
|
+
attributes: _extends({}, page == null ? void 0 : page.attributes, {
|
|
489
|
+
metadata: (_page$attributes$meta4 = page == null || (_page$attributes = page.attributes) == null ? void 0 : _page$attributes.metadata) != null ? _page$attributes$meta4 : global.attributes.metadata
|
|
490
|
+
}),
|
|
491
|
+
// PageProps
|
|
492
|
+
headerType: {
|
|
493
|
+
extendable: EXTENDABLE_HEADER_SECTIONS.includes((_page$attributes$slic = page.attributes.slices[0]) == null ? void 0 : _page$attributes$slic.__component),
|
|
494
|
+
theme: DARK_THEME_HEADER_SECTIONS.includes((_page$attributes$slic2 = page.attributes.slices[0]) == null ? void 0 : _page$attributes$slic2.__component) ? 'dark' : 'light'
|
|
495
|
+
},
|
|
496
|
+
headerNavMenus: global.attributes.navbar.navMenus || [],
|
|
497
|
+
headerButtons: global.attributes.navbar.buttons || [],
|
|
498
|
+
footerLinks: global.attributes.footer.links || [],
|
|
499
|
+
metadata: {
|
|
500
|
+
title: (_page$attributes$meta5 = (_page$attributes$meta6 = page.attributes.metadata) == null ? void 0 : _page$attributes$meta6.title) != null ? _page$attributes$meta5 : global.attributes.metadata.title,
|
|
501
|
+
description: (_page$attributes$meta7 = (_page$attributes$meta8 = page.attributes.metadata) == null ? void 0 : _page$attributes$meta8.description) != null ? _page$attributes$meta7 : global.attributes.metadata.description,
|
|
502
|
+
shareImage: {
|
|
503
|
+
url: metaShareImageUrl,
|
|
504
|
+
alt: (_ref = (_page$attributes$meta9 = (_page$attributes$meta10 = page.attributes.metadata) == null || (_page$attributes$meta10 = _page$attributes$meta10.shareImage) == null ? void 0 : _page$attributes$meta10.alt) != null ? _page$attributes$meta9 : (_global$attributes$me2 = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me2.alt) != null ? _ref : DEFAULT_SHARE_ALT
|
|
505
|
+
},
|
|
506
|
+
metaTitleSuffix: global.attributes.metaTitleSuffix,
|
|
507
|
+
favicon: strapiMediaUrl(global.attributes.favicon, 'thumbnail')
|
|
508
|
+
},
|
|
509
|
+
slices: page == null ? void 0 : page.attributes.slices,
|
|
510
|
+
blogPosts: blogPosts,
|
|
511
|
+
banner: global.attributes.banner,
|
|
512
|
+
topBanner: (page == null ? void 0 : page.attributes.topBanner) || global.attributes.topBanner,
|
|
513
|
+
customerStories: customerStories
|
|
514
|
+
});
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
var mergeGlobalAndStrapiProject = function mergeGlobalAndStrapiProject(context, global, project, blogPosts, projects) {
|
|
518
|
+
var _project$attributes$m, _project$attributes$m2, _project$attributes$m3, _global$attributes$me, _project$attributes, _project$attributes$s, _project$attributes$s2, _project$attributes$m4, _project$attributes$m5, _project$attributes$m6, _project$attributes$m7, _ref, _project$attributes$m8, _project$attributes$m9, _global$attributes$me2;
|
|
519
|
+
var metaShareImageUrl = (_project$attributes$m = project.attributes.metadata) != null && _project$attributes$m.shareImage ? strapiMediaUrl((_project$attributes$m2 = (_project$attributes$m3 = project.attributes.metadata) == null ? void 0 : _project$attributes$m3.shareImage.media) != null ? _project$attributes$m2 : (_global$attributes$me = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me.media, 'large') : DEFAULT_SHARE_IMAGE;
|
|
520
|
+
return _extends({}, project, {
|
|
521
|
+
// Portfolio Projects
|
|
522
|
+
projects: projects,
|
|
523
|
+
// StrapiProject
|
|
524
|
+
attributes: _extends({}, project.attributes, {
|
|
525
|
+
metadata: (project == null || (_project$attributes = project.attributes) == null ? void 0 : _project$attributes.metadata) || global.attributes.metadata
|
|
526
|
+
}),
|
|
527
|
+
headerType: {
|
|
528
|
+
extendable: EXTENDABLE_HEADER_SECTIONS.includes((_project$attributes$s = project.attributes.slices[0]) == null ? void 0 : _project$attributes$s.__component),
|
|
529
|
+
theme: DARK_THEME_HEADER_SECTIONS.includes((_project$attributes$s2 = project.attributes.slices[0]) == null ? void 0 : _project$attributes$s2.__component) ? 'dark' : 'light'
|
|
530
|
+
},
|
|
531
|
+
// PageProps
|
|
532
|
+
headerNavMenus: global.attributes.navbar.navMenus || [],
|
|
533
|
+
headerButtons: global.attributes.navbar.buttons || [],
|
|
534
|
+
footerLinks: global.attributes.footer.links || [],
|
|
535
|
+
metadata: {
|
|
536
|
+
title: (_project$attributes$m4 = (_project$attributes$m5 = project.attributes.metadata) == null ? void 0 : _project$attributes$m5.title) != null ? _project$attributes$m4 : global.attributes.metadata.title,
|
|
537
|
+
description: (_project$attributes$m6 = (_project$attributes$m7 = project.attributes.metadata) == null ? void 0 : _project$attributes$m7.description) != null ? _project$attributes$m6 : global.attributes.metadata.description,
|
|
538
|
+
shareImage: {
|
|
539
|
+
url: metaShareImageUrl,
|
|
540
|
+
alt: (_ref = (_project$attributes$m8 = (_project$attributes$m9 = project.attributes.metadata) == null || (_project$attributes$m9 = _project$attributes$m9.shareImage) == null ? void 0 : _project$attributes$m9.alt) != null ? _project$attributes$m8 : (_global$attributes$me2 = global.attributes.metadata.shareImage) == null ? void 0 : _global$attributes$me2.alt) != null ? _ref : DEFAULT_SHARE_ALT
|
|
541
|
+
},
|
|
542
|
+
metaTitleSuffix: global.attributes.metaTitleSuffix,
|
|
543
|
+
favicon: strapiMediaUrl(global.attributes.favicon, 'thumbnail')
|
|
544
|
+
},
|
|
545
|
+
slices: project.attributes.slices,
|
|
546
|
+
blogPosts: blogPosts,
|
|
547
|
+
banner: global.attributes.banner,
|
|
548
|
+
topBanner: (project == null ? void 0 : project.attributes.topBanner) || global.attributes.topBanner,
|
|
549
|
+
customerStories: []
|
|
550
|
+
});
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
var SEOTags = function SEOTags(_ref) {
|
|
554
|
+
var _shareImage$url, _shareImage$alt;
|
|
555
|
+
var title = _ref.title,
|
|
556
|
+
description = _ref.description,
|
|
557
|
+
shareImage = _ref.shareImage,
|
|
558
|
+
_ref$metaTitleSuffix = _ref.metaTitleSuffix,
|
|
559
|
+
metaTitleSuffix = _ref$metaTitleSuffix === void 0 ? 'Tree.ly' : _ref$metaTitleSuffix,
|
|
560
|
+
_ref$favicon = _ref.favicon,
|
|
561
|
+
favicon = _ref$favicon === void 0 ? 'https://cdn.tree.ly/favicon.ico' : _ref$favicon,
|
|
562
|
+
_ref$domain = _ref.domain,
|
|
563
|
+
domain = _ref$domain === void 0 ? 'tree.ly' : _ref$domain;
|
|
564
|
+
var shareImageUrl = (_shareImage$url = shareImage == null ? void 0 : shareImage.url) != null ? _shareImage$url : DEFAULT_SHARE_IMAGE;
|
|
565
|
+
var shareImageAlt = (_shareImage$alt = shareImage == null ? void 0 : shareImage.alt) != null ? _shareImage$alt : DEFAULT_SHARE_ALT;
|
|
566
|
+
return React.createElement(Head, null, React.createElement("title", null, title + " - " + metaTitleSuffix), React.createElement("meta", {
|
|
567
|
+
name: "description",
|
|
568
|
+
content: description
|
|
569
|
+
}), React.createElement("link", {
|
|
570
|
+
rel: "icon",
|
|
571
|
+
href: favicon
|
|
572
|
+
}), React.createElement("meta", {
|
|
573
|
+
property: "og:url",
|
|
574
|
+
content: "https://" + domain
|
|
575
|
+
}), React.createElement("meta", {
|
|
576
|
+
property: "og:type",
|
|
577
|
+
content: "website"
|
|
578
|
+
}), React.createElement("meta", {
|
|
579
|
+
property: "og:title",
|
|
580
|
+
content: title
|
|
581
|
+
}), React.createElement("meta", {
|
|
582
|
+
property: "og:description",
|
|
583
|
+
content: description
|
|
584
|
+
}), React.createElement("meta", {
|
|
585
|
+
property: "og:image",
|
|
586
|
+
content: shareImageUrl
|
|
587
|
+
}), React.createElement("meta", {
|
|
588
|
+
property: "og:image:alt",
|
|
589
|
+
content: shareImageAlt
|
|
590
|
+
}), React.createElement("meta", {
|
|
591
|
+
name: "twitter:card",
|
|
592
|
+
content: "summary_large_image"
|
|
593
|
+
}), React.createElement("meta", {
|
|
594
|
+
property: "twitter:domain",
|
|
595
|
+
content: domain
|
|
596
|
+
}), React.createElement("meta", {
|
|
597
|
+
property: "twitter:url",
|
|
598
|
+
content: "https://" + domain
|
|
599
|
+
}), React.createElement("meta", {
|
|
600
|
+
name: "twitter:title",
|
|
601
|
+
content: title
|
|
602
|
+
}), React.createElement("meta", {
|
|
603
|
+
name: "twitter:description",
|
|
604
|
+
content: description
|
|
605
|
+
}), React.createElement("meta", {
|
|
606
|
+
name: "twitter:image",
|
|
607
|
+
content: shareImageUrl
|
|
608
|
+
}), React.createElement("meta", {
|
|
609
|
+
name: "twitter:image:alt",
|
|
610
|
+
content: shareImageAlt
|
|
611
|
+
}));
|
|
612
|
+
};
|
|
613
|
+
|
|
401
614
|
var ZoomableImage = function ZoomableImage(_ref) {
|
|
402
615
|
var image = _ref.image,
|
|
403
616
|
_ref$zoom = _ref.zoom,
|
|
@@ -3714,7 +3927,7 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
3714
3927
|
while (1) switch (_context.prev = _context.next) {
|
|
3715
3928
|
case 0:
|
|
3716
3929
|
contributionValueCurrency = _ref2.contributionValueCurrency;
|
|
3717
|
-
push(FPM_API_URI + "/v1/webhooks/shop/checkout?batchId=" + batchId + "&quantity=" + Math.floor(contributionValueCurrency / pricePerKg));
|
|
3930
|
+
return _context.abrupt("return", push(FPM_API_URI + "/v1/webhooks/shop/checkout?batchId=" + batchId + "&quantity=" + Math.floor(contributionValueCurrency / pricePerKg)));
|
|
3718
3931
|
case 2:
|
|
3719
3932
|
case "end":
|
|
3720
3933
|
return _context.stop();
|
|
@@ -3776,12 +3989,12 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
3776
3989
|
return React.createElement(BoemlyFormControl, {
|
|
3777
3990
|
id: "contributionValueCurrency",
|
|
3778
3991
|
size: "md",
|
|
3779
|
-
|
|
3780
|
-
|
|
3992
|
+
inputProps: {
|
|
3993
|
+
type: 'number',
|
|
3781
3994
|
value: field.value,
|
|
3782
|
-
onChange: function onChange(
|
|
3995
|
+
onChange: function onChange(e) {
|
|
3783
3996
|
// valueAsNumber might be NaN
|
|
3784
|
-
var value =
|
|
3997
|
+
var value = e.target.valueAsNumber || 0;
|
|
3785
3998
|
setValues({
|
|
3786
3999
|
contributionValueCurrency: value,
|
|
3787
4000
|
contributionValueKgs: value / pricePerKg / 1000
|
|
@@ -3808,11 +4021,11 @@ var SmallCheckout = function SmallCheckout(_ref) {
|
|
|
3808
4021
|
return React.createElement(BoemlyFormControl, {
|
|
3809
4022
|
id: "contributionValueKgs",
|
|
3810
4023
|
size: "md",
|
|
3811
|
-
|
|
3812
|
-
|
|
4024
|
+
inputProps: {
|
|
4025
|
+
type: 'number',
|
|
3813
4026
|
value: field.value,
|
|
3814
|
-
onChange: function onChange(
|
|
3815
|
-
var value =
|
|
4027
|
+
onChange: function onChange(e) {
|
|
4028
|
+
var value = e.target.valueAsNumber || 0;
|
|
3816
4029
|
setValues({
|
|
3817
4030
|
contributionValueCurrency: value * pricePerKg * 1000,
|
|
3818
4031
|
contributionValueKgs: value
|
|
@@ -4636,5 +4849,5 @@ var SliceRenderer = function SliceRenderer(_ref) {
|
|
|
4636
4849
|
}));
|
|
4637
4850
|
};
|
|
4638
4851
|
|
|
4639
|
-
export { SliceRenderer };
|
|
4852
|
+
export { SECTIONS_WITH_BLOG_POSTS, SECTIONS_WITH_CUSTOMER_STORIES, SECTIONS_WITH_PROJECTS, SEOTags, SliceRenderer, mergeGlobalAndStrapiBlogPostData, mergeGlobalAndStrapiCustomerStoryData, mergeGlobalAndStrapiPageData, mergeGlobalAndStrapiProject as mergeGlobalAndStrapiProjectData };
|
|
4640
4853
|
//# sourceMappingURL=strapi-slices.esm.js.map
|