@nascentdigital/funnel-ui 4.4.20 → 4.5.0
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 +5 -1
- package/dist/Tailwind.js +9 -0
- package/dist/server/blocks/Block.d.ts +42 -2
- package/dist/server/blocks/Block.js +88 -0
- package/dist/server/blocks/Clients.d.ts +20 -29
- package/dist/server/blocks/Clients.js +13 -57
- package/dist/server/blocks/MediaLayout.d.ts +10 -5
- package/dist/server/blocks/MediaLayout.js +41 -22
- package/dist/server/blocks/Message.d.ts +9 -67
- package/dist/server/blocks/Message.js +15 -292
- package/dist/server/blocks/Outcome.d.ts +22 -82
- package/dist/server/blocks/Outcome.js +20 -474
- package/dist/server/blocks/Testimonial.d.ts +81 -16
- package/dist/server/blocks/Testimonial.js +59 -27
- package/dist/server/blocks/Testimonials.d.ts +41 -0
- package/dist/server/blocks/Testimonials.js +90 -0
- package/dist/server/blocks/ValueProp.d.ts +19 -38
- package/dist/server/blocks/ValueProp.js +14 -100
- package/dist/server/blocks/index.d.ts +1 -0
- package/dist/server/blocks/index.js +1 -0
- package/dist/server/blocks/summary/Statement.d.ts +304 -0
- package/dist/server/blocks/summary/Statement.js +52 -0
- package/dist/server/blocks/summary/Summary.d.ts +18 -0
- package/dist/server/blocks/summary/Summary.js +34 -0
- package/dist/server/blocks/summary/index.d.ts +1 -0
- package/dist/server/blocks/summary/index.js +17 -0
- package/dist/server/entities/Person.d.ts +27 -2
- package/dist/server/entities/Person.js +55 -5
- package/dist/server/layouts/BrickLayout.d.ts +290 -0
- package/dist/server/layouts/BrickLayout.js +25 -0
- package/dist/server/layouts/CardLayout.d.ts +291 -0
- package/dist/server/layouts/CardLayout.js +25 -0
- package/dist/server/layouts/FlexWrapLayout.d.ts +290 -0
- package/dist/server/layouts/FlexWrapLayout.js +41 -0
- package/dist/server/layouts/StackLayout.d.ts +290 -0
- package/dist/server/layouts/StackLayout.js +25 -0
- package/dist/server/layouts/grid/GridItem.d.ts +8 -0
- package/dist/server/layouts/grid/GridItem.js +9 -0
- package/dist/server/layouts/grid/GridLayout.d.ts +293 -0
- package/dist/server/layouts/grid/GridLayout.js +25 -0
- package/dist/server/layouts/grid/index.d.ts +2 -0
- package/dist/server/layouts/grid/index.js +18 -0
- package/dist/server/layouts/index.d.ts +5 -0
- package/dist/server/layouts/index.js +21 -0
- package/dist/server/panels/BlockPanel.d.ts +80 -1
- package/dist/server/panels/BlockPanel.js +831 -0
- package/dist/server/panels/ListPanel.d.ts +62 -0
- package/dist/server/panels/ListPanel.js +137 -0
- package/dist/server/panels/MessagePanel.d.ts +69 -5
- package/dist/server/panels/MessagePanel.js +128 -5
- package/dist/server/panels/TestimonialPanel.d.ts +47 -0
- package/dist/server/panels/TestimonialPanel.js +71 -0
- package/dist/server/panels/VisualPanel.d.ts +45 -13
- package/dist/server/panels/VisualPanel.js +75 -16
- package/dist/server/panels/index.d.ts +2 -0
- package/dist/server/panels/index.js +2 -0
- package/dist/server/schema/BlockConfig.d.ts +3 -1
- package/dist/server/schema/BlockConfig.js +2 -1
- package/dist/server/schema/ItemAlignment.d.ts +2 -0
- package/dist/server/schema/ItemPosition.d.ts +1 -0
- package/dist/server/schema/ItemSize.d.ts +2 -1
- package/dist/server/schema/ItemSize.js +2 -1
- package/dist/server/schema/ListPanelLayout.d.ts +34 -0
- package/dist/server/schema/ListPanelLayout.js +24 -0
- package/dist/server/schema/PanelLayout.d.ts +14 -0
- package/dist/server/schema/PanelLayout.js +70 -0
- package/dist/server/schema/SlotVariation.d.ts +9 -0
- package/dist/server/schema/SlotVariation.js +48 -0
- package/dist/server/schema/TextAlignment.d.ts +1 -0
- package/dist/server/schema/index.d.ts +3 -0
- package/dist/server/schema/index.js +3 -0
- package/dist/styles/blocks/Clients.css +0 -1
- package/dist/styles/blocks/Message.css +0 -343
- package/dist/styles/blocks/Outcome.css +13 -50
- package/dist/styles/blocks/Summary.css +15 -0
- package/dist/styles/blocks/Testimonial.css +1 -318
- package/dist/styles/blocks/ValueProp.css +0 -126
- package/dist/styles/blocks/_index.css +1 -0
- package/dist/styles/layouts/BrickLayout.css +43 -0
- package/dist/styles/layouts/CardLayout.css +46 -0
- package/dist/styles/layouts/FlexWrapLayout.css +38 -0
- package/dist/styles/layouts/GridLayout.css +25 -0
- package/dist/styles/layouts/StackLayout.css +46 -0
- package/dist/styles/layouts/_index.css +6 -1
- package/dist/styles/panels/ListPanel.css +3 -0
- package/dist/styles/panels/TestimonialPanel.css +64 -0
- package/dist/styles/panels/_index.css +2 -0
- package/package.json +3 -2
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
import { HTMLElements } from '../../../types';
|
|
4
|
+
import { Caption, Headline } from '../../fields';
|
|
5
|
+
export declare function Statement<T extends Statement.Tag>({ className, as, headlineTag, captionTag, statement, ...props }: Statement.Props<T>): import("react").DetailedReactHTMLElement<{
|
|
6
|
+
prefix?: string | undefined | undefined;
|
|
7
|
+
content?: string | undefined | undefined;
|
|
8
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
9
|
+
color?: string | undefined | undefined;
|
|
10
|
+
id?: string | undefined | undefined;
|
|
11
|
+
onClick?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
12
|
+
slot?: string | undefined | undefined;
|
|
13
|
+
style?: import("react").CSSProperties | undefined;
|
|
14
|
+
title?: string | undefined | undefined;
|
|
15
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
16
|
+
onDragStart?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
17
|
+
onDragEnd?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
18
|
+
onDrag?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
19
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
20
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
21
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
22
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
23
|
+
accessKey?: string | undefined | undefined;
|
|
24
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
25
|
+
autoFocus?: boolean | undefined | undefined;
|
|
26
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
27
|
+
contextMenu?: string | undefined | undefined;
|
|
28
|
+
dir?: string | undefined | undefined;
|
|
29
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
30
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
31
|
+
hidden?: boolean | undefined | undefined;
|
|
32
|
+
lang?: string | undefined | undefined;
|
|
33
|
+
nonce?: string | undefined | undefined;
|
|
34
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
35
|
+
tabIndex?: number | undefined | undefined;
|
|
36
|
+
radioGroup?: string | undefined | undefined;
|
|
37
|
+
role?: import("react").AriaRole | undefined;
|
|
38
|
+
about?: string | undefined | undefined;
|
|
39
|
+
datatype?: string | undefined | undefined;
|
|
40
|
+
inlist?: any;
|
|
41
|
+
property?: string | undefined | undefined;
|
|
42
|
+
rel?: string | undefined | undefined;
|
|
43
|
+
resource?: string | undefined | undefined;
|
|
44
|
+
rev?: string | undefined | undefined;
|
|
45
|
+
typeof?: string | undefined | undefined;
|
|
46
|
+
vocab?: string | undefined | undefined;
|
|
47
|
+
autoCorrect?: string | undefined | undefined;
|
|
48
|
+
autoSave?: string | undefined | undefined;
|
|
49
|
+
itemProp?: string | undefined | undefined;
|
|
50
|
+
itemScope?: boolean | undefined | undefined;
|
|
51
|
+
itemType?: string | undefined | undefined;
|
|
52
|
+
itemID?: string | undefined | undefined;
|
|
53
|
+
itemRef?: string | undefined | undefined;
|
|
54
|
+
results?: number | undefined | undefined;
|
|
55
|
+
security?: string | undefined | undefined;
|
|
56
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
57
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
58
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
59
|
+
popoverTarget?: string | undefined | undefined;
|
|
60
|
+
inert?: boolean | undefined | undefined;
|
|
61
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
62
|
+
is?: string | undefined | undefined;
|
|
63
|
+
exportparts?: string | undefined | undefined;
|
|
64
|
+
part?: string | undefined | undefined;
|
|
65
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
66
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
67
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
68
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
69
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
70
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
71
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
72
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
73
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
74
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
75
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
76
|
+
"aria-controls"?: string | undefined | undefined;
|
|
77
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
78
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
79
|
+
"aria-description"?: string | undefined | undefined;
|
|
80
|
+
"aria-details"?: string | undefined | undefined;
|
|
81
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
82
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
83
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
84
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
85
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
86
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
88
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
89
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
90
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
91
|
+
"aria-label"?: string | undefined | undefined;
|
|
92
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
93
|
+
"aria-level"?: number | undefined | undefined;
|
|
94
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
95
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
96
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
97
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
98
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
99
|
+
"aria-owns"?: string | undefined | undefined;
|
|
100
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
101
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
102
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
103
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
104
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
105
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
106
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
107
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
108
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
109
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
110
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
111
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
112
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
113
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
114
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
115
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
116
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
117
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
118
|
+
dangerouslySetInnerHTML?: {
|
|
119
|
+
__html: string | TrustedHTML;
|
|
120
|
+
} | undefined | undefined;
|
|
121
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
122
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
123
|
+
onCut?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
124
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
125
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
126
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
127
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
128
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
129
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
130
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
131
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
132
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
133
|
+
onFocus?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
134
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
135
|
+
onBlur?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
136
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
137
|
+
onChange?: import("react").ChangeEventHandler<HTMLElements.Standard[T], Element> | undefined;
|
|
138
|
+
onChangeCapture?: import("react").ChangeEventHandler<HTMLElements.Standard[T], Element> | undefined;
|
|
139
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
140
|
+
onBeforeInputCapture?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
141
|
+
onInput?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
142
|
+
onInputCapture?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
143
|
+
onReset?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
144
|
+
onResetCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
145
|
+
onSubmit?: import("react").SubmitEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
146
|
+
onSubmitCapture?: import("react").SubmitEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
147
|
+
onInvalid?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
148
|
+
onInvalidCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
149
|
+
onLoad?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
150
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
151
|
+
onError?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
152
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
153
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
154
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
155
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
156
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
157
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
158
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
159
|
+
onAbort?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
160
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
161
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
162
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
163
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
164
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
165
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
166
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
167
|
+
onEmptied?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
168
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
169
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
170
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
171
|
+
onEnded?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
172
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
173
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
174
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
175
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
176
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
177
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
178
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
179
|
+
onPause?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
180
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
181
|
+
onPlay?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
182
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
183
|
+
onPlaying?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
184
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
185
|
+
onProgress?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
186
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
187
|
+
onRateChange?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
188
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
189
|
+
onSeeked?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
190
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
191
|
+
onSeeking?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
192
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
193
|
+
onStalled?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
194
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
195
|
+
onSuspend?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
196
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
197
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
198
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
199
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
200
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
201
|
+
onWaiting?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
202
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
203
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
204
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
205
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
206
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
207
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
208
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
209
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
210
|
+
onDragCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
211
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
212
|
+
onDragEnter?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
213
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
214
|
+
onDragExit?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
215
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
216
|
+
onDragLeave?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
217
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
218
|
+
onDragOver?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
219
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
220
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
221
|
+
onDrop?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
222
|
+
onDropCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
223
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
224
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
225
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
226
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
227
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
228
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
229
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
230
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
231
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
232
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
233
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
234
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
235
|
+
onSelect?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
236
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
237
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
238
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
239
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
240
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
241
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
242
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
243
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
244
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
245
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
246
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
247
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
248
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
249
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
250
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
251
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
252
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
253
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
254
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
255
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
256
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
257
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
258
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
259
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
260
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
261
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
262
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
263
|
+
onScroll?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
264
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
265
|
+
onScrollEnd?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
266
|
+
onScrollEndCapture?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
267
|
+
onWheel?: import("react").WheelEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
268
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
269
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
270
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
271
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
272
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
273
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
274
|
+
onToggle?: import("react").ToggleEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
275
|
+
onBeforeToggle?: import("react").ToggleEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
276
|
+
onTransitionCancel?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
277
|
+
onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
278
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
279
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
280
|
+
onTransitionRun?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
281
|
+
onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
282
|
+
onTransitionStart?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
283
|
+
onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
|
|
284
|
+
nameTag?: HTMLElements.Standard.Text;
|
|
285
|
+
className: string;
|
|
286
|
+
}, HTMLElement> | null;
|
|
287
|
+
export declare namespace Statement {
|
|
288
|
+
const schema: Schema.ObjectField<{
|
|
289
|
+
headline: Schema.RichTextField;
|
|
290
|
+
caption: Schema.RichTextField;
|
|
291
|
+
}>;
|
|
292
|
+
type Props<T extends Tag> = Omit<HTMLAttributes<HTMLElements.Standard[T]>, 'children'> & {
|
|
293
|
+
as: T;
|
|
294
|
+
nameTag?: HTMLElements.Standard.Text;
|
|
295
|
+
headlineTag?: Headline.Tag;
|
|
296
|
+
captionTag?: Caption.Tag;
|
|
297
|
+
statement: Model;
|
|
298
|
+
};
|
|
299
|
+
namespace Props {
|
|
300
|
+
type Configuration = Pick<Props<Tag>, 'headlineTag' | 'captionTag'>;
|
|
301
|
+
}
|
|
302
|
+
type Tag = HTMLElements.Standard.Container;
|
|
303
|
+
type Model = Schema.Field.LinkedData<typeof schema>;
|
|
304
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Statement = Statement;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const react_1 = require("react");
|
|
22
|
+
const fields_1 = require("../../fields");
|
|
23
|
+
// component
|
|
24
|
+
function Statement(_a) {
|
|
25
|
+
var _b;
|
|
26
|
+
var { className, as, headlineTag = 'div', captionTag = 'div', statement } = _a, props = __rest(_a, ["className", "as", "headlineTag", "captionTag", "statement"]);
|
|
27
|
+
// dont render if missing model
|
|
28
|
+
if (!statement) {
|
|
29
|
+
console.warn('[Statement] attempted to render without statement model');
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
// render content
|
|
33
|
+
const { headline: headlineRaw, caption: captionRaw } = (_b = statement.value) !== null && _b !== void 0 ? _b : {};
|
|
34
|
+
const headline = headlineRaw === null || headlineRaw === void 0 ? void 0 : headlineRaw.value;
|
|
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-Statement') }, props), (0, jsx_runtime_1.jsxs)("div", { className: "nd-Statement-content", children: [(0, jsx_runtime_1.jsx)(fields_1.Headline, { as: headlineTag, headline: headline }), (0, jsx_runtime_1.jsx)(fields_1.Caption, { as: captionTag, caption: caption })] }));
|
|
37
|
+
}
|
|
38
|
+
// extension
|
|
39
|
+
(function (Statement) {
|
|
40
|
+
// schema
|
|
41
|
+
Statement.schema = funnel_core_1.Schema.Field.object({
|
|
42
|
+
name: 'Statement',
|
|
43
|
+
description: 'A statement',
|
|
44
|
+
preview: {
|
|
45
|
+
title: 'headline'
|
|
46
|
+
},
|
|
47
|
+
content: {
|
|
48
|
+
headline: fields_1.Headline.schema,
|
|
49
|
+
caption: fields_1.Caption.schema
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
})(Statement || (exports.Statement = Statement = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Schema } from '@nascentdigital/funnel-core';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { Block } from '../Block';
|
|
4
|
+
export declare function Summary(props: ComponentProps<typeof Summary.Component>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace Summary {
|
|
6
|
+
const Component: import("react").FunctionComponent<Block.Create.Result.Component<true, undefined, Schema.ListField<{
|
|
7
|
+
statement: Schema.ObjectField<{
|
|
8
|
+
headline: Schema.RichTextField;
|
|
9
|
+
caption: Schema.RichTextField;
|
|
10
|
+
}>;
|
|
11
|
+
}>, Schema.Block.Config>>, schema: Block.Create.Result.Schema<true, undefined, Schema.ListField<{
|
|
12
|
+
statement: Schema.ObjectField<{
|
|
13
|
+
headline: Schema.RichTextField;
|
|
14
|
+
caption: Schema.RichTextField;
|
|
15
|
+
}>;
|
|
16
|
+
}>, Schema.Block.Config>;
|
|
17
|
+
type Model = Schema.Block.LinkedData<typeof schema>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Summary = Summary;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
6
|
+
const Block_1 = require("../Block");
|
|
7
|
+
const Statement_1 = require("./Statement");
|
|
8
|
+
// component
|
|
9
|
+
function Summary(props) {
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(Summary.Component, Object.assign({}, props));
|
|
11
|
+
}
|
|
12
|
+
// extension
|
|
13
|
+
(function (Summary) {
|
|
14
|
+
var _a;
|
|
15
|
+
// factory
|
|
16
|
+
_a = Block_1.Block.create({
|
|
17
|
+
id: '_nd_summary',
|
|
18
|
+
name: 'Summary',
|
|
19
|
+
version: 1,
|
|
20
|
+
className: 'nd-Summary',
|
|
21
|
+
message: true,
|
|
22
|
+
list: {
|
|
23
|
+
schema: funnel_core_1.Schema.Field.list({
|
|
24
|
+
name: 'Statements',
|
|
25
|
+
itemTypes: {
|
|
26
|
+
statement: Statement_1.Statement.schema
|
|
27
|
+
},
|
|
28
|
+
min: 1,
|
|
29
|
+
max: 3
|
|
30
|
+
}),
|
|
31
|
+
itemRenderer: (item, itemProps) => ((0, jsx_runtime_1.jsx)(Statement_1.Statement, Object.assign({ as: "li", className: "nd-Summary-statement", statement: item }, itemProps)))
|
|
32
|
+
}
|
|
33
|
+
}), Summary.Component = _a.Component, Summary.schema = _a.schema;
|
|
34
|
+
})(Summary || (exports.Summary = Summary = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Summary';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Summary"), exports);
|
|
@@ -2,7 +2,7 @@ import { Schema } from '@nascentdigital/funnel-core';
|
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
import { HTMLElements } from '../../types';
|
|
4
4
|
import { Title } from '../fields';
|
|
5
|
-
export declare function Person<T extends Person.Tag>({ as, className, titleTag, nameTag, companyTag, locationTag, person, ...props }: Person.Props<T>): import("react").DetailedReactHTMLElement<{
|
|
5
|
+
export declare function Person<T extends Person.Tag>({ as, className, titleTag, nameTag, companyTag, locationTag, person, displayFields: displayFieldsRaw, ...props }: Person.Props<T>): import("react").DetailedReactHTMLElement<{
|
|
6
6
|
prefix?: string | undefined | undefined;
|
|
7
7
|
content?: string | undefined | undefined;
|
|
8
8
|
translate?: "yes" | "no" | undefined | undefined;
|
|
@@ -297,7 +297,13 @@ export declare namespace Person {
|
|
|
297
297
|
}
|
|
298
298
|
const schema: Schema.Collection<{
|
|
299
299
|
title: Schema.Optional<Schema.TextField>;
|
|
300
|
-
company: Schema.Optional<Schema.
|
|
300
|
+
company: Schema.Optional<Schema.CollectionField<Schema.Collection<{
|
|
301
|
+
division: Schema.Optional<Schema.TextField>;
|
|
302
|
+
location: Schema.Optional<Schema.TextField>;
|
|
303
|
+
logo: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
|
|
304
|
+
badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
305
|
+
badgeText: Schema.Optional<Schema.TextField>;
|
|
306
|
+
}>>>;
|
|
301
307
|
location: Schema.Optional<Schema.TextField>;
|
|
302
308
|
picture: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
|
|
303
309
|
}>;
|
|
@@ -308,7 +314,26 @@ export declare namespace Person {
|
|
|
308
314
|
companyTag?: HTMLElements.Standard.Text;
|
|
309
315
|
locationTag?: HTMLElements.Standard.Text;
|
|
310
316
|
person?: Value;
|
|
317
|
+
displayFields?: ReadonlyArray<DisplayFields.Id>;
|
|
311
318
|
};
|
|
312
319
|
type Value = Schema.Collection.LinkedData<typeof schema>;
|
|
313
320
|
type Tag = HTMLElements.Standard.Container;
|
|
321
|
+
class DisplayFields {
|
|
322
|
+
private readonly _fields;
|
|
323
|
+
private constructor();
|
|
324
|
+
get hasPicture(): boolean;
|
|
325
|
+
get hasCopy(): boolean;
|
|
326
|
+
get hasName(): boolean;
|
|
327
|
+
get hasTitle(): boolean;
|
|
328
|
+
get hasCompany(): boolean;
|
|
329
|
+
get hasLocation(): boolean;
|
|
330
|
+
static for(fields?: ReadonlyArray<DisplayFields.Id>): DisplayFields;
|
|
331
|
+
}
|
|
332
|
+
namespace DisplayFields {
|
|
333
|
+
type Id = keyof Value['fields'];
|
|
334
|
+
namespace Id {
|
|
335
|
+
const values: ReadonlyArray<Id>;
|
|
336
|
+
}
|
|
337
|
+
function exclude(...ids: ReadonlyArray<Id>): ("name" | "picture" | "title" | "location" | "company")[];
|
|
338
|
+
}
|
|
314
339
|
}
|
|
@@ -20,9 +20,10 @@ const funnel_core_1 = require("@nascentdigital/funnel-core");
|
|
|
20
20
|
const classnames_1 = __importDefault(require("classnames"));
|
|
21
21
|
const react_1 = require("react");
|
|
22
22
|
const fields_1 = require("../fields");
|
|
23
|
+
const Client_1 = require("./Client");
|
|
23
24
|
// component
|
|
24
25
|
function Person(_a) {
|
|
25
|
-
var { as, className, titleTag = 'span', nameTag = 'span', companyTag = 'span', locationTag = 'span', person } = _a, props = __rest(_a, ["as", "className", "titleTag", "nameTag", "companyTag", "locationTag", "person"]);
|
|
26
|
+
var { as, className, titleTag = 'span', nameTag = 'span', companyTag = 'span', locationTag = 'span', person, displayFields: displayFieldsRaw } = _a, props = __rest(_a, ["as", "className", "titleTag", "nameTag", "companyTag", "locationTag", "person", "displayFields"]);
|
|
26
27
|
// dont render if missing model
|
|
27
28
|
if (!person) {
|
|
28
29
|
console.warn('[Person] attempted to render without person model');
|
|
@@ -32,10 +33,17 @@ function Person(_a) {
|
|
|
32
33
|
const { name, fields: { title: titleRaw, company: companyRaw, location: locationRaw, picture: pictureRaw } = {} } = person;
|
|
33
34
|
const title = titleRaw === null || titleRaw === void 0 ? void 0 : titleRaw.value;
|
|
34
35
|
const company = companyRaw === null || companyRaw === void 0 ? void 0 : companyRaw.value;
|
|
36
|
+
const companyName = company === null || company === void 0 ? void 0 : company.name;
|
|
35
37
|
const location = locationRaw === null || locationRaw === void 0 ? void 0 : locationRaw.value;
|
|
36
38
|
const picture = pictureRaw === null || pictureRaw === void 0 ? void 0 : pictureRaw.value;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
const displayFields = Person.DisplayFields.for(displayFieldsRaw);
|
|
40
|
+
return (0, react_1.createElement)(as, Object.assign({ className: (0, classnames_1.default)(className, 'nd-Person') }, props), (0, jsx_runtime_1.jsxs)("div", { className: "nd-Person-content", children: [picture && displayFields.hasPicture &&
|
|
41
|
+
(0, jsx_runtime_1.jsx)("div", { className: "nd-Person-pictureWrap", children: (0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-Person-picture", visual: picture }) }), displayFields.hasCopy &&
|
|
42
|
+
(0, jsx_runtime_1.jsx)("div", { className: "nd-Person-copyWrap", children: (0, jsx_runtime_1.jsxs)("div", { className: "nd-Person-copy", children: [name && displayFields.hasName &&
|
|
43
|
+
(0, react_1.createElement)(nameTag, { className: 'nd-Person-name' }, name), title && displayFields.hasTitle &&
|
|
44
|
+
(0, react_1.createElement)(titleTag, { className: 'nd-Person-title' }, title), companyName && displayFields.hasCompany &&
|
|
45
|
+
(0, react_1.createElement)(companyTag, { className: 'nd-Person-company' }, companyName), location && displayFields.hasLocation &&
|
|
46
|
+
(0, react_1.createElement)(locationTag, { className: 'nd-Person-location' }, location)] }) })] }));
|
|
39
47
|
}
|
|
40
48
|
// extension
|
|
41
49
|
(function (Person) {
|
|
@@ -80,9 +88,9 @@ function Person(_a) {
|
|
|
80
88
|
description: 'An individual, such as a team member or client.',
|
|
81
89
|
fields: {
|
|
82
90
|
title: fields_1.Title.schema.optional(),
|
|
83
|
-
company: funnel_core_1.Schema.Field.
|
|
91
|
+
company: funnel_core_1.Schema.Field.collection({
|
|
84
92
|
name: 'Company',
|
|
85
|
-
|
|
93
|
+
collections: [Client_1.Client.schema]
|
|
86
94
|
}).optional(),
|
|
87
95
|
location: funnel_core_1.Schema.Field.text({
|
|
88
96
|
name: 'Location',
|
|
@@ -95,4 +103,46 @@ function Person(_a) {
|
|
|
95
103
|
Tags.Role.group
|
|
96
104
|
]
|
|
97
105
|
});
|
|
106
|
+
// display fields
|
|
107
|
+
class DisplayFields {
|
|
108
|
+
constructor(fields) {
|
|
109
|
+
// initialize instance variables
|
|
110
|
+
this._fields = new Set(fields.length === 0
|
|
111
|
+
? ['picture', 'name', 'title', 'company', 'location']
|
|
112
|
+
: fields);
|
|
113
|
+
}
|
|
114
|
+
get hasPicture() {
|
|
115
|
+
return this._fields.has('picture');
|
|
116
|
+
}
|
|
117
|
+
get hasCopy() {
|
|
118
|
+
return this.hasName || this.hasTitle || this.hasCompany || this.hasLocation;
|
|
119
|
+
}
|
|
120
|
+
get hasName() {
|
|
121
|
+
return this._fields.has('name');
|
|
122
|
+
}
|
|
123
|
+
get hasTitle() {
|
|
124
|
+
return this._fields.has('title');
|
|
125
|
+
}
|
|
126
|
+
get hasCompany() {
|
|
127
|
+
return this._fields.has('company');
|
|
128
|
+
}
|
|
129
|
+
get hasLocation() {
|
|
130
|
+
return this._fields.has('location');
|
|
131
|
+
}
|
|
132
|
+
static for(fields = []) {
|
|
133
|
+
return new DisplayFields(fields);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
Person.DisplayFields = DisplayFields;
|
|
137
|
+
(function (DisplayFields) {
|
|
138
|
+
let Id;
|
|
139
|
+
(function (Id) {
|
|
140
|
+
Id.values = ['picture', 'name', 'title', 'company', 'location'];
|
|
141
|
+
})(Id = DisplayFields.Id || (DisplayFields.Id = {}));
|
|
142
|
+
// helpers
|
|
143
|
+
function exclude(...ids) {
|
|
144
|
+
return Id.values.filter(id => !ids.includes(id));
|
|
145
|
+
}
|
|
146
|
+
DisplayFields.exclude = exclude;
|
|
147
|
+
})(DisplayFields = Person.DisplayFields || (Person.DisplayFields = {}));
|
|
98
148
|
})(Person || (exports.Person = Person = {}));
|