@nascentdigital/funnel-ui 4.5.2 → 4.5.4
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/Tailwind.d.ts +1 -1
- package/dist/Tailwind.js +70 -24
- package/dist/client/hooks/breakpoint/BreakpointContainer.d.ts +1 -1
- package/dist/client/hooks/breakpoint/BreakpointContainer.js +3 -1
- package/dist/client/interaction/Carousel.d.ts +1 -1
- package/dist/client/interaction/Carousel.js +28 -30
- package/dist/client/interaction/index.d.ts +0 -6
- package/dist/client/interaction/index.js +0 -6
- package/dist/server/Page.d.ts +15 -0
- package/dist/server/Page.js +70 -0
- package/dist/server/blocks/Block.d.ts +4 -2
- package/dist/server/blocks/Block.js +10 -3
- package/dist/server/blocks/Editorial.d.ts +2 -2
- package/dist/server/blocks/Editorial.js +4 -4
- package/dist/server/blocks/Form.d.ts +2 -2
- package/dist/server/blocks/Form.js +3 -3
- package/dist/server/blocks/Message.js +2 -1
- package/dist/server/blocks/Projects.d.ts +29 -37
- package/dist/server/blocks/Projects.js +13 -84
- package/dist/server/blocks/RelatedPages.d.ts +58 -0
- package/dist/server/blocks/RelatedPages.js +99 -0
- package/dist/server/blocks/Stats.d.ts +19 -31
- package/dist/server/blocks/Stats.js +13 -57
- package/dist/server/blocks/Testimonial.d.ts +2 -2
- package/dist/server/blocks/Testimonial.js +17 -14
- package/dist/server/blocks/Testimonials.d.ts +35 -35
- package/dist/server/blocks/Testimonials.js +21 -66
- package/dist/server/blocks/index.d.ts +2 -0
- package/dist/server/blocks/index.js +2 -0
- package/dist/server/entities/previews/MessagePreview.d.ts +2 -2
- package/dist/server/entities/previews/MessagePreview.js +1 -1
- package/dist/server/fields/CallToActions.d.ts +12 -0
- package/dist/server/fields/CallToActions.js +27 -0
- package/dist/server/fields/Caption.js +3 -2
- package/dist/server/fields/Description.js +1 -1
- package/dist/server/fields/FreeFormContent.js +1 -1
- package/dist/server/fields/Headline.js +1 -1
- package/dist/server/fields/Quote.js +1 -1
- package/dist/server/fields/RichText.js +1 -0
- package/dist/server/fields/index.d.ts +1 -0
- package/dist/server/fields/index.js +1 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +2 -0
- package/dist/server/layouts/BentoLayout.d.ts +289 -0
- package/dist/server/layouts/BentoLayout.js +25 -0
- package/dist/server/layouts/index.d.ts +1 -0
- package/dist/server/layouts/index.js +1 -0
- package/dist/server/panels/BlockPanel.js +1 -3
- package/dist/server/panels/ListPanel.d.ts +4 -4
- package/dist/server/panels/ListPanel.js +13 -2
- package/dist/server/panels/MessagePanel.d.ts +2 -6
- package/dist/server/panels/MessagePanel.js +2 -12
- package/dist/server/panels/TestimonialPanel.d.ts +44 -18
- package/dist/server/panels/TestimonialPanel.js +44 -19
- package/dist/server/panels/VisualPanel.d.ts +1 -1
- package/dist/server/panels/VisualPanel.js +0 -2
- package/dist/server/schema/Anchor.d.ts +1 -1
- package/dist/server/schema/Anchor.js +2 -2
- package/dist/server/schema/BlockConfig.js +1 -1
- package/dist/server/schema/ListPanelLayout.d.ts +6 -0
- package/dist/server/schema/ListPanelLayout.js +3 -0
- package/dist/server/utils/ReactUtils.d.ts +6 -0
- package/dist/server/utils/ReactUtils.js +25 -0
- package/dist/server/utils/index.d.ts +1 -0
- package/dist/{client/interaction/modal → server/utils}/index.js +1 -2
- package/dist/styles/Page.css +5 -0
- package/dist/styles/Section.css +52 -0
- package/dist/styles/blocks/Block-spacing.css +31 -38
- package/dist/styles/blocks/Block-theming.css +2 -4
- package/dist/styles/blocks/MediaLayout.css +16 -0
- package/dist/styles/blocks/Projects.css +0 -9
- package/dist/styles/blocks/RelatedPages.css +13 -0
- package/dist/styles/blocks/Stats.css +1 -30
- package/dist/styles/components/Carousel.css +128 -0
- package/dist/styles/components/_index.css +2 -1
- package/dist/styles/entities/Person.css +4 -4
- package/dist/styles/entities/Project.css +8 -2
- package/dist/styles/entities/UniqueSellingPoint.css +3 -3
- package/dist/styles/fields/Caption.css +2 -2
- package/dist/styles/fields/Description.css +2 -2
- package/dist/styles/fields/Icon.css +1 -1
- package/dist/styles/fields/Link.css +1 -1
- package/dist/styles/fields/Quote.css +2 -2
- package/dist/styles/fields/Title.css +1 -1
- package/dist/styles/index.css +2 -0
- package/dist/styles/layouts/BentoLayout.css +41 -0
- package/dist/styles/layouts/_index.css +1 -0
- package/dist/styles/panels/TestimonialPanel.css +4 -0
- package/package.json +2 -3
- package/dist/client/interaction/Popup.d.ts +0 -36
- package/dist/client/interaction/Popup.js +0 -244
- package/dist/client/interaction/Tooltip.d.ts +0 -16
- package/dist/client/interaction/Tooltip.js +0 -122
- package/dist/client/interaction/UILevel.d.ts +0 -1
- package/dist/client/interaction/UILevel.js +0 -2
- package/dist/client/interaction/backdrop/BackdropContainer.d.ts +0 -5
- package/dist/client/interaction/backdrop/BackdropContainer.js +0 -114
- package/dist/client/interaction/backdrop/BackdropContext.d.ts +0 -8
- package/dist/client/interaction/backdrop/BackdropContext.js +0 -6
- package/dist/client/interaction/backdrop/BackdropEvent.d.ts +0 -64
- package/dist/client/interaction/backdrop/BackdropEvent.js +0 -92
- package/dist/client/interaction/backdrop/index.d.ts +0 -4
- package/dist/client/interaction/backdrop/index.js +0 -20
- package/dist/client/interaction/backdrop/useBackdrop.d.ts +0 -13
- package/dist/client/interaction/backdrop/useBackdrop.js +0 -58
- package/dist/client/interaction/backdrop/useBackdropClick.d.ts +0 -2
- package/dist/client/interaction/backdrop/useBackdropClick.js +0 -21
- package/dist/client/interaction/backdrop/useBackdropVisible.d.ts +0 -1
- package/dist/client/interaction/backdrop/useBackdropVisible.js +0 -30
- package/dist/client/interaction/focus/FocusArea.d.ts +0 -10
- package/dist/client/interaction/focus/FocusArea.js +0 -38
- package/dist/client/interaction/focus/FocusContext.d.ts +0 -7
- package/dist/client/interaction/focus/FocusContext.js +0 -7
- package/dist/client/interaction/focus/FocusController.d.ts +0 -9
- package/dist/client/interaction/focus/FocusController.js +0 -40
- package/dist/client/interaction/focus/FocusService.d.ts +0 -20
- package/dist/client/interaction/focus/FocusService.js +0 -204
- package/dist/client/interaction/focus/LinkedList.d.ts +0 -18
- package/dist/client/interaction/focus/LinkedList.js +0 -122
- package/dist/client/interaction/focus/index.d.ts +0 -2
- package/dist/client/interaction/focus/index.js +0 -18
- package/dist/client/interaction/focus/useFocusService.d.ts +0 -2
- package/dist/client/interaction/focus/useFocusService.js +0 -14
- package/dist/client/interaction/modal/Modal.d.ts +0 -29
- package/dist/client/interaction/modal/Modal.js +0 -136
- package/dist/client/interaction/modal/ModalContainer.d.ts +0 -5
- package/dist/client/interaction/modal/ModalContainer.js +0 -104
- package/dist/client/interaction/modal/ModalContext.d.ts +0 -8
- package/dist/client/interaction/modal/ModalContext.js +0 -6
- package/dist/client/interaction/modal/ModalEvent.d.ts +0 -39
- package/dist/client/interaction/modal/ModalEvent.js +0 -53
- package/dist/client/interaction/modal/index.d.ts +0 -2
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { TestimonialPanel } from '../panels';
|
|
4
|
+
import { Block } from './Block';
|
|
5
|
+
export declare function Testimonials(props: ComponentProps<typeof Testimonials.Component>): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export declare namespace Testimonials {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
testimonials: Schema.ListField<{
|
|
14
|
-
testimonial: Schema.ObjectField<{
|
|
15
|
-
quote: Schema.RichTextField;
|
|
16
|
-
author: Schema.CollectionField<Schema.Collection<{
|
|
17
|
-
title: Schema.Optional<Schema.TextField>;
|
|
18
|
-
company: Schema.Optional<Schema.CollectionField<Schema.Collection<{
|
|
19
|
-
division: Schema.Optional<Schema.TextField>;
|
|
20
|
-
location: Schema.Optional<Schema.TextField>;
|
|
21
|
-
logo: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
|
|
22
|
-
badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
23
|
-
badgeText: Schema.Optional<Schema.TextField>;
|
|
24
|
-
}>>>;
|
|
7
|
+
const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-testimonials", true, undefined, Schema.ListField<{
|
|
8
|
+
testimonial: Schema.ObjectField<{
|
|
9
|
+
quote: Schema.RichTextField;
|
|
10
|
+
author: Schema.CollectionField<Schema.Collection<{
|
|
11
|
+
title: Schema.Optional<Schema.TextField>;
|
|
12
|
+
company: Schema.Optional<Schema.CollectionField<Schema.Collection<{
|
|
13
|
+
division: Schema.Optional<Schema.TextField>;
|
|
25
14
|
location: Schema.Optional<Schema.TextField>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
logo: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
|
|
16
|
+
badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
17
|
+
badgeText: Schema.Optional<Schema.TextField>;
|
|
18
|
+
}>>>;
|
|
19
|
+
location: Schema.Optional<Schema.TextField>;
|
|
20
|
+
picture: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
21
|
+
}>>;
|
|
29
22
|
}>;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
23
|
+
}>, Schema.Block.Config, TestimonialPanel.Testimonial.Props.Configuration>>, schema: Block.Create.Result.Schema<"_nd-testimonials", true, undefined, Schema.ListField<{
|
|
24
|
+
testimonial: Schema.ObjectField<{
|
|
25
|
+
quote: Schema.RichTextField;
|
|
26
|
+
author: Schema.CollectionField<Schema.Collection<{
|
|
27
|
+
title: Schema.Optional<Schema.TextField>;
|
|
28
|
+
company: Schema.Optional<Schema.CollectionField<Schema.Collection<{
|
|
29
|
+
division: Schema.Optional<Schema.TextField>;
|
|
30
|
+
location: Schema.Optional<Schema.TextField>;
|
|
31
|
+
logo: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
|
|
32
|
+
badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
33
|
+
badgeText: Schema.Optional<Schema.TextField>;
|
|
34
|
+
}>>>;
|
|
35
|
+
location: Schema.Optional<Schema.TextField>;
|
|
36
|
+
picture: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
37
|
+
}>>;
|
|
38
|
+
}>;
|
|
39
|
+
}>, Schema.Block.Config>;
|
|
40
40
|
type Model = Schema.Block.LinkedData<typeof schema>;
|
|
41
41
|
}
|
|
@@ -1,62 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.Testimonials = Testimonials;
|
|
18
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
5
|
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
20
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
21
6
|
const panels_1 = require("../panels");
|
|
22
7
|
const Block_1 = require("./Block");
|
|
23
|
-
//
|
|
24
|
-
function Testimonials(
|
|
25
|
-
|
|
26
|
-
var { className, testimonials, messagePanelProps = {}, testimonialsPanelProps = {} } = _a, props = __rest(_a, ["className", "testimonials", "messagePanelProps", "testimonialsPanelProps"]);
|
|
27
|
-
// don't render if missing model
|
|
28
|
-
if (!testimonials) {
|
|
29
|
-
console.warn('[Testimonials] attempted to render without testimonials model');
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
// destructure props
|
|
33
|
-
const config = (_b = testimonials.config) !== null && _b !== void 0 ? _b : {};
|
|
34
|
-
const fields = (_c = testimonials.fields) !== null && _c !== void 0 ? _c : {};
|
|
35
|
-
const { title: titleRaw, headline: headlineRaw, caption: captionRaw, ctas: ctasRaw, testimonials: testimonialsRaw } = fields;
|
|
36
|
-
const title = titleRaw === null || titleRaw === void 0 ? void 0 : titleRaw.value;
|
|
37
|
-
const headline = headlineRaw === null || headlineRaw === void 0 ? void 0 : headlineRaw.value;
|
|
38
|
-
const caption = captionRaw === null || captionRaw === void 0 ? void 0 : captionRaw.value;
|
|
39
|
-
const ctas = ctasRaw === null || ctasRaw === void 0 ? void 0 : ctasRaw.value;
|
|
40
|
-
const testimonialItems = (_d = testimonialsRaw === null || testimonialsRaw === void 0 ? void 0 : testimonialsRaw.value) !== null && _d !== void 0 ? _d : [];
|
|
41
|
-
const { className: messagePanelClassname } = messagePanelProps, messagePanelPropsRest = __rest(messagePanelProps, ["className"]);
|
|
42
|
-
const { className: testimonialsPanelClassname } = testimonialsPanelProps;
|
|
43
|
-
// panel layout
|
|
44
|
-
const layout = {};
|
|
45
|
-
const getPanel = ({ className, panel }) => {
|
|
46
|
-
var _a;
|
|
47
|
-
switch (panel.type) {
|
|
48
|
-
case 'message':
|
|
49
|
-
return ((0, jsx_runtime_1.jsx)(panels_1.MessagePanel, Object.assign({ className: (0, classnames_1.default)(className, messagePanelClassname, 'nd-Testimonials-message'), panel: panel, title: title, headline: headline, caption: caption, ctas: ctas }, messagePanelPropsRest)));
|
|
50
|
-
case 'list':
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)(panels_1.ListPanel, { as: (_a = testimonialsPanelProps.tag) !== null && _a !== void 0 ? _a : 'ul', className: (0, classnames_1.default)(className, testimonialsPanelClassname, 'nd-Testimonials-list'), panel: panel, items: testimonialItems, layout: "horizontalStack", children: testimonial => (0, jsx_runtime_1.jsx)(panels_1.TestimonialPanel, { panel: {}, quote: testimonial.value.quote.value, author: testimonial.value.author.value }) }));
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
// render block
|
|
55
|
-
return ((0, jsx_runtime_1.jsx)(Block_1.Block, Object.assign({ className: (0, classnames_1.default)(className, 'nd-Testimonials'), layout: layout, renderPanel: getPanel }, props)));
|
|
8
|
+
// component
|
|
9
|
+
function Testimonials(props) {
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(Testimonials.Component, Object.assign({}, props));
|
|
56
11
|
}
|
|
57
12
|
// extension
|
|
58
13
|
(function (Testimonials) {
|
|
59
|
-
|
|
14
|
+
var _a;
|
|
15
|
+
// testimonial schema
|
|
60
16
|
const testimonialSchema = funnel_core_1.Schema.Field.object({
|
|
61
17
|
name: 'Testimonial',
|
|
62
18
|
preview: {
|
|
@@ -67,24 +23,23 @@ function Testimonials(_a) {
|
|
|
67
23
|
author: panels_1.TestimonialPanel.Fields.author
|
|
68
24
|
}
|
|
69
25
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
headline: panels_1.MessagePanel.Fields.headline,
|
|
73
|
-
caption: panels_1.MessagePanel.Fields.caption,
|
|
74
|
-
ctas: panels_1.MessagePanel.Fields.ctas,
|
|
75
|
-
testimonials: funnel_core_1.Schema.Field.list({
|
|
76
|
-
name: 'Testimonials',
|
|
77
|
-
min: 1,
|
|
78
|
-
max: 3,
|
|
79
|
-
itemTypes: {
|
|
80
|
-
testimonial: testimonialSchema
|
|
81
|
-
}
|
|
82
|
-
})
|
|
83
|
-
};
|
|
84
|
-
Testimonials.schema = funnel_core_1.Schema.Block.create({
|
|
26
|
+
// factory
|
|
27
|
+
_a = Block_1.Block.create({
|
|
85
28
|
id: '_nd-testimonials',
|
|
86
29
|
name: 'Testimonials',
|
|
87
30
|
version: 1,
|
|
88
|
-
|
|
89
|
-
|
|
31
|
+
className: 'nd-Testimonials',
|
|
32
|
+
message: true,
|
|
33
|
+
list: {
|
|
34
|
+
schema: funnel_core_1.Schema.Field.list({
|
|
35
|
+
name: 'Testimonials',
|
|
36
|
+
min: 1,
|
|
37
|
+
max: 3,
|
|
38
|
+
itemTypes: {
|
|
39
|
+
testimonial: testimonialSchema
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
itemRenderer: ({ value }, itemProps) => ((0, jsx_runtime_1.jsx)(panels_1.TestimonialPanel.Testimonial, Object.assign({ quote: value.quote.value, author: value.author.value }, itemProps)))
|
|
43
|
+
}
|
|
44
|
+
}), Testimonials.Component = _a.Component, Testimonials.schema = _a.schema;
|
|
90
45
|
})(Testimonials || (exports.Testimonials = Testimonials = {}));
|
|
@@ -7,8 +7,10 @@ export * from './MediaLayout';
|
|
|
7
7
|
export * from './Message';
|
|
8
8
|
export * from './Outcome';
|
|
9
9
|
export * from './Projects';
|
|
10
|
+
export * from './RelatedPages';
|
|
10
11
|
export * from './Stat';
|
|
11
12
|
export * from './Stats';
|
|
12
13
|
export * from './Testimonial';
|
|
14
|
+
export * from './Testimonials';
|
|
13
15
|
export * from './ValueProp';
|
|
14
16
|
export * from './summary';
|
|
@@ -23,8 +23,10 @@ __exportStar(require("./MediaLayout"), exports);
|
|
|
23
23
|
__exportStar(require("./Message"), exports);
|
|
24
24
|
__exportStar(require("./Outcome"), exports);
|
|
25
25
|
__exportStar(require("./Projects"), exports);
|
|
26
|
+
__exportStar(require("./RelatedPages"), exports);
|
|
26
27
|
__exportStar(require("./Stat"), exports);
|
|
27
28
|
__exportStar(require("./Stats"), exports);
|
|
28
29
|
__exportStar(require("./Testimonial"), exports);
|
|
30
|
+
__exportStar(require("./Testimonials"), exports);
|
|
29
31
|
__exportStar(require("./ValueProp"), exports);
|
|
30
32
|
__exportStar(require("./summary"), exports);
|
|
@@ -2,7 +2,7 @@ import { HTMLAttributes, ReactNode } from 'react';
|
|
|
2
2
|
import { HTMLElements } from '../../../types';
|
|
3
3
|
import { Message } from '../../blocks';
|
|
4
4
|
import { Caption, Headline, Title, Visual } from '../../fields';
|
|
5
|
-
export declare function MessagePreview<T extends MessagePreview.Tag>({ className, as, preview, titleTag, headlineTag, captionTag, copyDecorator, visualDecorator, visualLoading, ...props }: MessagePreview.Props<T>): import("react").DetailedReactHTMLElement<{
|
|
5
|
+
export declare function MessagePreview<T extends MessagePreview.Tag = 'div'>({ className, as, preview, titleTag, headlineTag, captionTag, copyDecorator, visualDecorator, visualLoading, ...props }: MessagePreview.Props<T>): import("react").DetailedReactHTMLElement<{
|
|
6
6
|
prefix?: string | undefined | undefined;
|
|
7
7
|
content?: string | undefined | undefined;
|
|
8
8
|
translate?: "yes" | "no" | undefined | undefined;
|
|
@@ -285,7 +285,7 @@ export declare function MessagePreview<T extends MessagePreview.Tag>({ className
|
|
|
285
285
|
}, HTMLElement> | null;
|
|
286
286
|
export declare namespace MessagePreview {
|
|
287
287
|
type Props<T extends Tag> = Omit<HTMLAttributes<HTMLElements.Standard[T]>, 'children'> & {
|
|
288
|
-
as
|
|
288
|
+
as?: T;
|
|
289
289
|
preview: Model;
|
|
290
290
|
titleTag?: Title.Tag;
|
|
291
291
|
headlineTag?: Headline.Tag;
|
|
@@ -33,7 +33,7 @@ function MessagePreview(_a) {
|
|
|
33
33
|
const headline = headlineRaw === null || headlineRaw === void 0 ? void 0 : headlineRaw.value;
|
|
34
34
|
const visual = visualRaw === null || visualRaw === void 0 ? void 0 : visualRaw.value;
|
|
35
35
|
const caption = captionRaw === null || captionRaw === void 0 ? void 0 : captionRaw.value;
|
|
36
|
-
return (0, react_1.createElement)(as, Object.assign({ className: (0, classnames_1.default)(className, 'nd-MessagePreview') }, props), (0, jsx_runtime_1.jsxs)("div", { className: "nd-MessagePreview-content", children: [(visual || visualDecorator) &&
|
|
36
|
+
return (0, react_1.createElement)(as !== null && as !== void 0 ? as : 'div', Object.assign({ className: (0, classnames_1.default)(className, 'nd-MessagePreview') }, props), (0, jsx_runtime_1.jsxs)("div", { className: "nd-MessagePreview-content", children: [(visual || visualDecorator) &&
|
|
37
37
|
(0, jsx_runtime_1.jsxs)("div", { className: "nd-MessagePreview-visualWrap", children: [visual &&
|
|
38
38
|
(0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-MessagePreview-visual", visual: visual, loading: visualLoading }), visualDecorator] }), (0, jsx_runtime_1.jsxs)("div", { className: "nd-MessagePreview-copyWrap", children: [(0, jsx_runtime_1.jsxs)("div", { className: "nd-MessagePreview-copy", children: [title &&
|
|
39
39
|
(0, jsx_runtime_1.jsx)(fields_1.Title, { as: titleTag, title: title, className: "nd-MessagePreview-title" }), (0, jsx_runtime_1.jsx)(fields_1.Headline, { as: headlineTag, headline: headline, className: "nd-MessagePreview-headline" }), caption &&
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
export declare function CallToActions({ className, ctas }: CallToActions.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace CallToActions {
|
|
4
|
+
const schema: Schema.ListField<{
|
|
5
|
+
cta: Schema.LinkField;
|
|
6
|
+
}>;
|
|
7
|
+
type Props = {
|
|
8
|
+
className?: string;
|
|
9
|
+
ctas: Value;
|
|
10
|
+
};
|
|
11
|
+
type Value = Schema.Field.LinkedValue.ForOptionalType<typeof schema>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CallToActions = CallToActions;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
9
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
10
|
+
const Link_1 = require("./Link");
|
|
11
|
+
// component
|
|
12
|
+
function CallToActions({ className, ctas }) {
|
|
13
|
+
// render
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(className, 'nd-CallToActions'), children: ctas.map(cta => (0, jsx_runtime_1.jsx)(Link_1.Link, { link: cta.value }, cta.id)) }));
|
|
15
|
+
}
|
|
16
|
+
// extension
|
|
17
|
+
(function (CallToActions) {
|
|
18
|
+
// schema
|
|
19
|
+
const cta = funnel_core_1.Schema.Field.link({ name: 'Call to Action' });
|
|
20
|
+
CallToActions.schema = funnel_core_1.Schema.Field.list({
|
|
21
|
+
name: 'CTAs',
|
|
22
|
+
description: 'Add your call-to-actions in the order you\'d like them to appear *(these are optional)*.',
|
|
23
|
+
itemTypes: { cta },
|
|
24
|
+
min: 1,
|
|
25
|
+
max: 2
|
|
26
|
+
});
|
|
27
|
+
})(CallToActions || (exports.CallToActions = CallToActions = {}));
|
|
@@ -31,7 +31,7 @@ function Caption(_a) {
|
|
|
31
31
|
Caption.schema = funnel_core_1.Schema.Field.richtext({
|
|
32
32
|
name: 'Caption',
|
|
33
33
|
hint: 'Enter some text',
|
|
34
|
-
|
|
34
|
+
semantics: 'mini-editor',
|
|
35
35
|
capabilities: {
|
|
36
36
|
bold: true,
|
|
37
37
|
italics: true,
|
|
@@ -39,7 +39,8 @@ function Caption(_a) {
|
|
|
39
39
|
strikethrough: true,
|
|
40
40
|
superscript: true,
|
|
41
41
|
subscript: true,
|
|
42
|
-
links: true
|
|
42
|
+
links: true,
|
|
43
|
+
lists: true
|
|
43
44
|
}
|
|
44
45
|
});
|
|
45
46
|
})(Caption || (exports.Caption = Caption = {}));
|
|
@@ -34,7 +34,7 @@ function FreeFormContent(_a) {
|
|
|
34
34
|
const baseArgs = {
|
|
35
35
|
name: 'Content',
|
|
36
36
|
hint: 'Free form content',
|
|
37
|
-
|
|
37
|
+
semantics: 'full-editor'
|
|
38
38
|
};
|
|
39
39
|
// variants
|
|
40
40
|
schema.article = funnel_core_1.Schema.Field.richtext(Object.assign(Object.assign({}, baseArgs), { capabilities: funnel_core_1.Schema.RichTextField.Capabilities.Options.article }));
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CallToActions"), exports);
|
|
17
18
|
__exportStar(require("./Caption"), exports);
|
|
18
19
|
__exportStar(require("./Description"), exports);
|
|
19
20
|
__exportStar(require("./FreeFormContent"), exports);
|
package/dist/server/index.d.ts
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -23,3 +23,5 @@ __exportStar(require("./panels"), exports);
|
|
|
23
23
|
__exportStar(require("./schema"), exports);
|
|
24
24
|
__exportStar(require("./sections"), exports);
|
|
25
25
|
__exportStar(require("./transitions"), exports);
|
|
26
|
+
__exportStar(require("./utils"), exports);
|
|
27
|
+
__exportStar(require("./Page"), exports);
|