@nascentdigital/funnel-ui 4.5.0 → 4.5.2

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.
@@ -14,10 +14,10 @@ export declare namespace Block {
14
14
  className?: string;
15
15
  panel: BlockLayout.Panel;
16
16
  };
17
- function create<TMessage extends boolean | undefined = undefined, TVisual extends boolean | undefined = undefined, TList extends Schema.ListField | undefined = undefined, TExtend extends Schema.Block.Config = Schema.Block.Config>(args: Create.Args<TMessage, TVisual, TList, TExtend>): Create.Result<TMessage, TVisual, TList, TExtend>;
17
+ function create<TBlockId extends string, TMessage extends boolean | undefined = undefined, TVisual extends boolean | undefined = undefined, TList extends Schema.ListField | undefined = undefined, TExtend extends Schema.Block.Config = Schema.Block.Config, TItemProps = any>(args: Create.Args<TBlockId, TMessage, TVisual, TList, TExtend, TItemProps>): Create.Result<TBlockId, TMessage, TVisual, TList, TExtend, TItemProps>;
18
18
  namespace Create {
19
- type Args<TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config> = {
20
- id: string;
19
+ type Args<TBlockId extends string, TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config, TItemProps> = {
20
+ id: TBlockId;
21
21
  name: string;
22
22
  version: number;
23
23
  className?: string;
@@ -25,30 +25,30 @@ export declare namespace Block {
25
25
  visual?: TVisual;
26
26
  list?: {
27
27
  schema: TList;
28
- itemRenderer: TList extends Schema.ListField<infer TContent> ? (item: Schema.ListField.LinkedValue.ForItem<TContent>, itemProps: any) => ReactNode : never;
28
+ itemRenderer: TList extends Schema.ListField<infer TContent> ? (item: Schema.ListField.LinkedValue.ForItem<TContent>, itemProps: TItemProps) => ReactNode : never;
29
29
  };
30
30
  extendConfigSchema?: TExtend;
31
31
  };
32
- type Result<TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config> = {
33
- Component: FunctionComponent<Result.Component<TMessage, TVisual, TList, TExtend>>;
34
- schema: Result.Schema<TMessage, TVisual, TList, TExtend>;
32
+ type Result<TBlockId extends string, TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config, TItemProps> = {
33
+ Component: FunctionComponent<Result.Component<TBlockId, TMessage, TVisual, TList, TExtend, TItemProps>>;
34
+ schema: Result.Schema<TBlockId, TMessage, TVisual, TList, TExtend>;
35
35
  };
36
36
  namespace Result {
37
37
  type FieldsSchema<TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined> = ((TMessage extends true ? typeof MessagePanel.Fields.all : {}) & (TVisual extends true ? typeof VisualPanel.Fields.all : {}) & (TList extends Schema.ListField ? {
38
38
  list: TList;
39
39
  } : {}));
40
40
  type ConfigSchema<TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config, TFields extends FieldsSchema<TMessage, TVisual, TList> = FieldsSchema<TMessage, TVisual, TList>> = BlockPanel.GetConfigSchema.Result<TFields, TMessage extends true ? 'message' : undefined, TVisual extends true ? 'visual' extends Schema.Fields.AssetFields.Keys<TFields> ? 'visual' : undefined : undefined, TList extends Schema.ListField ? 'list' extends Schema.Fields.ListFields.Keys<TFields> ? 'list' : undefined : undefined, TExtend>;
41
- type Schema<TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config> = Schema.Block<string, FieldsSchema<TMessage, TVisual, TList>, ConfigSchema<TMessage, TVisual, TList, TExtend>>;
42
- type Component<TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config> = {
41
+ type Schema<TBlockId extends string, TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config> = Schema.Block<TBlockId, FieldsSchema<TMessage, TVisual, TList>, ConfigSchema<TMessage, TVisual, TList, TExtend>>;
42
+ type Component<TBlockId extends string, TMessage extends boolean | undefined, TVisual extends boolean | undefined, TList extends Schema.ListField | undefined, TExtend extends Schema.Block.Config, TItemProps> = {
43
43
  className?: string;
44
- model: Schema.Block.LinkedData<Schema<TMessage, TVisual, TList, TExtend>>;
44
+ model: Schema.Block.LinkedData<Schema<TBlockId, TMessage, TVisual, TList, TExtend>>;
45
45
  } & ((TMessage extends true ? {
46
46
  messagePanelProps?: MessagePanel.Props.Configuration;
47
47
  } : {}) & (TVisual extends true ? {
48
48
  visualPanelProps?: VisualPanel.Props.Configuration;
49
49
  } : {}) & (TList extends Schema.ListField ? {
50
50
  listPanelProps?: ListPanel.Props.Configuration & {
51
- itemProps: any;
51
+ itemProps: TItemProps;
52
52
  };
53
53
  } : {}));
54
54
  }
@@ -1,9 +1,10 @@
1
1
  import { Schema } from '@nascentdigital/funnel-core';
2
2
  import { ComponentProps } from 'react';
3
+ import { Client } from '../entities';
3
4
  import { Block } from './Block';
4
5
  export declare function Clients(props: ComponentProps<typeof Clients.Component>): import("react/jsx-runtime").JSX.Element;
5
6
  export declare namespace Clients {
6
- const Component: import("react").FunctionComponent<Block.Create.Result.Component<true, undefined, Schema.ListField<{
7
+ const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-clients", true, undefined, Schema.ListField<{
7
8
  item: Schema.CollectionField<Schema.Collection<{
8
9
  division: Schema.Optional<Schema.TextField>;
9
10
  location: Schema.Optional<Schema.TextField>;
@@ -11,7 +12,7 @@ export declare namespace Clients {
11
12
  badge: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Image>>;
12
13
  badgeText: Schema.Optional<Schema.TextField>;
13
14
  }>>;
14
- }>, Schema.Block.Config>>, schema: Block.Create.Result.Schema<true, undefined, Schema.ListField<{
15
+ }>, Schema.Block.Config, Client.Props.Configuration>>, schema: Block.Create.Result.Schema<"_nd-clients", true, undefined, Schema.ListField<{
15
16
  item: Schema.CollectionField<Schema.Collection<{
16
17
  division: Schema.Optional<Schema.TextField>;
17
18
  location: Schema.Optional<Schema.TextField>;
@@ -1,314 +1,18 @@
1
1
  import { Schema } from '@nascentdigital/funnel-core';
2
- import { HTMLAttributes, JSXElementConstructor } from 'react';
2
+ import { ComponentProps, JSXElementConstructor } from 'react';
3
3
  import { EmbeddedVideo } from '../../client/refs';
4
- import { HTMLElements } from '../../types';
5
- import { BlockPanel } from '../panels';
6
- export declare function MediaLayout<T extends MediaLayout.Tag>({ className, as, EmbeddedVideoElement, layout, ...props }: MediaLayout.Props<T>): import("react").DetailedReactHTMLElement<{
7
- prefix?: string | undefined | undefined;
8
- content?: string | undefined | undefined;
9
- translate?: "yes" | "no" | undefined | undefined;
10
- color?: string | undefined | undefined;
11
- id?: string | undefined | undefined;
12
- onClick?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
13
- slot?: string | undefined | undefined;
14
- style?: import("react").CSSProperties | undefined;
15
- title?: string | undefined | undefined;
16
- onAnimationStart?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
17
- onDragStart?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
18
- onDragEnd?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
19
- onDrag?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
20
- defaultChecked?: boolean | undefined | undefined;
21
- defaultValue?: string | number | readonly string[] | undefined;
22
- suppressContentEditableWarning?: boolean | undefined | undefined;
23
- suppressHydrationWarning?: boolean | undefined | undefined;
24
- accessKey?: string | undefined | undefined;
25
- autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
26
- autoFocus?: boolean | undefined | undefined;
27
- contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
28
- contextMenu?: string | undefined | undefined;
29
- dir?: string | undefined | undefined;
30
- draggable?: (boolean | "true" | "false") | undefined;
31
- enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
32
- hidden?: boolean | undefined | undefined;
33
- lang?: string | undefined | undefined;
34
- nonce?: string | undefined | undefined;
35
- spellCheck?: (boolean | "true" | "false") | undefined;
36
- tabIndex?: number | undefined | undefined;
37
- radioGroup?: string | undefined | undefined;
38
- role?: import("react").AriaRole | undefined;
39
- about?: string | undefined | undefined;
40
- datatype?: string | undefined | undefined;
41
- inlist?: any;
42
- property?: string | undefined | undefined;
43
- rel?: string | undefined | undefined;
44
- resource?: string | undefined | undefined;
45
- rev?: string | undefined | undefined;
46
- typeof?: string | undefined | undefined;
47
- vocab?: string | undefined | undefined;
48
- autoCorrect?: string | undefined | undefined;
49
- autoSave?: string | undefined | undefined;
50
- itemProp?: string | undefined | undefined;
51
- itemScope?: boolean | undefined | undefined;
52
- itemType?: string | undefined | undefined;
53
- itemID?: string | undefined | undefined;
54
- itemRef?: string | undefined | undefined;
55
- results?: number | undefined | undefined;
56
- security?: string | undefined | undefined;
57
- unselectable?: "on" | "off" | undefined | undefined;
58
- popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
59
- popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
60
- popoverTarget?: string | undefined | undefined;
61
- inert?: boolean | undefined | undefined;
62
- inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
63
- is?: string | undefined | undefined;
64
- exportparts?: string | undefined | undefined;
65
- part?: string | undefined | undefined;
66
- "aria-activedescendant"?: string | undefined | undefined;
67
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
68
- "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
69
- "aria-braillelabel"?: string | undefined | undefined;
70
- "aria-brailleroledescription"?: string | undefined | undefined;
71
- "aria-busy"?: (boolean | "true" | "false") | undefined;
72
- "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
73
- "aria-colcount"?: number | undefined | undefined;
74
- "aria-colindex"?: number | undefined | undefined;
75
- "aria-colindextext"?: string | undefined | undefined;
76
- "aria-colspan"?: number | undefined | undefined;
77
- "aria-controls"?: string | undefined | undefined;
78
- "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
79
- "aria-describedby"?: string | undefined | undefined;
80
- "aria-description"?: string | undefined | undefined;
81
- "aria-details"?: string | undefined | undefined;
82
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
83
- "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
84
- "aria-errormessage"?: string | undefined | undefined;
85
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
86
- "aria-flowto"?: string | undefined | undefined;
87
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
88
- "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
89
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
90
- "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
91
- "aria-keyshortcuts"?: string | undefined | undefined;
92
- "aria-label"?: string | undefined | undefined;
93
- "aria-labelledby"?: string | undefined | undefined;
94
- "aria-level"?: number | undefined | undefined;
95
- "aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
96
- "aria-modal"?: (boolean | "true" | "false") | undefined;
97
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
98
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
99
- "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
100
- "aria-owns"?: string | undefined | undefined;
101
- "aria-placeholder"?: string | undefined | undefined;
102
- "aria-posinset"?: number | undefined | undefined;
103
- "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
104
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
105
- "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
106
- "aria-required"?: (boolean | "true" | "false") | undefined;
107
- "aria-roledescription"?: string | undefined | undefined;
108
- "aria-rowcount"?: number | undefined | undefined;
109
- "aria-rowindex"?: number | undefined | undefined;
110
- "aria-rowindextext"?: string | undefined | undefined;
111
- "aria-rowspan"?: number | undefined | undefined;
112
- "aria-selected"?: (boolean | "true" | "false") | undefined;
113
- "aria-setsize"?: number | undefined | undefined;
114
- "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
115
- "aria-valuemax"?: number | undefined | undefined;
116
- "aria-valuemin"?: number | undefined | undefined;
117
- "aria-valuenow"?: number | undefined | undefined;
118
- "aria-valuetext"?: string | undefined | undefined;
119
- dangerouslySetInnerHTML?: {
120
- __html: string | TrustedHTML;
121
- } | undefined | undefined;
122
- onCopy?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
123
- onCopyCapture?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
124
- onCut?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
125
- onCutCapture?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
126
- onPaste?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
127
- onPasteCapture?: import("react").ClipboardEventHandler<HTMLElements.Standard[T]> | undefined;
128
- onCompositionEnd?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
129
- onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
130
- onCompositionStart?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
131
- onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
132
- onCompositionUpdate?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
133
- onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLElements.Standard[T]> | undefined;
134
- onFocus?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
135
- onFocusCapture?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
136
- onBlur?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
137
- onBlurCapture?: import("react").FocusEventHandler<HTMLElements.Standard[T]> | undefined;
138
- onChange?: import("react").ChangeEventHandler<HTMLElements.Standard[T], Element> | undefined;
139
- onChangeCapture?: import("react").ChangeEventHandler<HTMLElements.Standard[T], Element> | undefined;
140
- onBeforeInput?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
141
- onBeforeInputCapture?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
142
- onInput?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
143
- onInputCapture?: import("react").InputEventHandler<HTMLElements.Standard[T]> | undefined;
144
- onReset?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
145
- onResetCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
146
- onSubmit?: import("react").SubmitEventHandler<HTMLElements.Standard[T]> | undefined;
147
- onSubmitCapture?: import("react").SubmitEventHandler<HTMLElements.Standard[T]> | undefined;
148
- onInvalid?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
149
- onInvalidCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
150
- onLoad?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
151
- onLoadCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
152
- onError?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
153
- onErrorCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
154
- onKeyDown?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
155
- onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
156
- onKeyPress?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
157
- onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
158
- onKeyUp?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
159
- onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLElements.Standard[T]> | undefined;
160
- onAbort?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
161
- onAbortCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
162
- onCanPlay?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
163
- onCanPlayCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
164
- onCanPlayThrough?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
165
- onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
166
- onDurationChange?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
167
- onDurationChangeCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
168
- onEmptied?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
169
- onEmptiedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
170
- onEncrypted?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
171
- onEncryptedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
172
- onEnded?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
173
- onEndedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
174
- onLoadedData?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
175
- onLoadedDataCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
176
- onLoadedMetadata?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
177
- onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
178
- onLoadStart?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
179
- onLoadStartCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
180
- onPause?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
181
- onPauseCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
182
- onPlay?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
183
- onPlayCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
184
- onPlaying?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
185
- onPlayingCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
186
- onProgress?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
187
- onProgressCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
188
- onRateChange?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
189
- onRateChangeCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
190
- onSeeked?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
191
- onSeekedCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
192
- onSeeking?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
193
- onSeekingCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
194
- onStalled?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
195
- onStalledCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
196
- onSuspend?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
197
- onSuspendCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
198
- onTimeUpdate?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
199
- onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
200
- onVolumeChange?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
201
- onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
202
- onWaiting?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
203
- onWaitingCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
204
- onAuxClick?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
205
- onAuxClickCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
206
- onClickCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
207
- onContextMenu?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
208
- onContextMenuCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
209
- onDoubleClick?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
210
- onDoubleClickCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
211
- onDragCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
212
- onDragEndCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
213
- onDragEnter?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
214
- onDragEnterCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
215
- onDragExit?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
216
- onDragExitCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
217
- onDragLeave?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
218
- onDragLeaveCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
219
- onDragOver?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
220
- onDragOverCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
221
- onDragStartCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
222
- onDrop?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
223
- onDropCapture?: import("react").DragEventHandler<HTMLElements.Standard[T]> | undefined;
224
- onMouseDown?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
225
- onMouseDownCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
226
- onMouseEnter?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
227
- onMouseLeave?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
228
- onMouseMove?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
229
- onMouseMoveCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
230
- onMouseOut?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
231
- onMouseOutCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
232
- onMouseOver?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
233
- onMouseOverCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
234
- onMouseUp?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
235
- onMouseUpCapture?: import("react").MouseEventHandler<HTMLElements.Standard[T]> | undefined;
236
- onSelect?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
237
- onSelectCapture?: import("react").ReactEventHandler<HTMLElements.Standard[T]> | undefined;
238
- onTouchCancel?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
239
- onTouchCancelCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
240
- onTouchEnd?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
241
- onTouchEndCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
242
- onTouchMove?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
243
- onTouchMoveCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
244
- onTouchStart?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
245
- onTouchStartCapture?: import("react").TouchEventHandler<HTMLElements.Standard[T]> | undefined;
246
- onPointerDown?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
247
- onPointerDownCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
248
- onPointerMove?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
249
- onPointerMoveCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
250
- onPointerUp?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
251
- onPointerUpCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
252
- onPointerCancel?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
253
- onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
254
- onPointerEnter?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
255
- onPointerLeave?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
256
- onPointerOver?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
257
- onPointerOverCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
258
- onPointerOut?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
259
- onPointerOutCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
260
- onGotPointerCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
261
- onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
262
- onLostPointerCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
263
- onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLElements.Standard[T]> | undefined;
264
- onScroll?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
265
- onScrollCapture?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
266
- onScrollEnd?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
267
- onScrollEndCapture?: import("react").UIEventHandler<HTMLElements.Standard[T]> | undefined;
268
- onWheel?: import("react").WheelEventHandler<HTMLElements.Standard[T]> | undefined;
269
- onWheelCapture?: import("react").WheelEventHandler<HTMLElements.Standard[T]> | undefined;
270
- onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
271
- onAnimationEnd?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
272
- onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
273
- onAnimationIteration?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
274
- onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLElements.Standard[T]> | undefined;
275
- onToggle?: import("react").ToggleEventHandler<HTMLElements.Standard[T]> | undefined;
276
- onBeforeToggle?: import("react").ToggleEventHandler<HTMLElements.Standard[T]> | undefined;
277
- onTransitionCancel?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
278
- onTransitionCancelCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
279
- onTransitionEnd?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
280
- onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
281
- onTransitionRun?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
282
- onTransitionRunCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
283
- onTransitionStart?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
284
- onTransitionStartCapture?: import("react").TransitionEventHandler<HTMLElements.Standard[T]> | undefined;
285
- className: string;
286
- }, HTMLElement> | null;
4
+ import { Block } from './Block';
5
+ export declare function MediaLayout({ EmbeddedVideoElement, listPanelProps, ...props }: MediaLayout.Props): import("react/jsx-runtime").JSX.Element;
287
6
  export declare namespace MediaLayout {
288
- type Layout = 'poster' | '1col' | '2col' | 'brick' | 'brickAlt';
289
- namespace Layout {
290
- const Enum: Schema.EnumField.Options<Layout>;
291
- const schema: Schema.EnumField<Schema.EnumField.Options<Layout>>;
292
- function getClassName(layout?: Layout): string;
293
- }
294
- const schema: Schema.Block<"_nd-mediaLayout", {
295
- list: Schema.ListField<{
296
- visual: Schema.AssetField<Schema.AssetField.LinkedValue.Visual>;
297
- embedded: Schema.EmbeddedVideoField;
298
- }>;
299
- }, BlockPanel.GetConfigSchema.Result<{
300
- list: Schema.ListField<{
301
- visual: Schema.AssetField<Schema.AssetField.LinkedValue.Visual>;
302
- embedded: Schema.EmbeddedVideoField;
303
- }>;
304
- }, undefined, undefined, "list", {
305
- mediaLayout: Schema.EnumField<Schema.EnumField.Options<Layout>>;
306
- }>>;
307
- type Props<T extends Tag> = Omit<HTMLAttributes<HTMLElements.Standard[T]>, 'children'> & {
308
- as: T;
7
+ const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-mediaLayout", true, undefined, Schema.ListField<{
8
+ visual: Schema.AssetField<Schema.AssetField.LinkedValue.Visual>;
9
+ embedded: Schema.EmbeddedVideoField;
10
+ }>, Schema.Block.Config, any>>, schema: Block.Create.Result.Schema<"_nd-mediaLayout", true, undefined, Schema.ListField<{
11
+ visual: Schema.AssetField<Schema.AssetField.LinkedValue.Visual>;
12
+ embedded: Schema.EmbeddedVideoField;
13
+ }>, Schema.Block.Config>;
14
+ type Props = ComponentProps<typeof Component> & {
309
15
  EmbeddedVideoElement?: JSXElementConstructor<EmbeddedVideo.Props>;
310
- layout: Model;
311
16
  };
312
- type Tag = Exclude<HTMLElements.Standard.Container, 'ul' | 'ol' | 'li'>;
313
17
  type Model = Schema.Block.LinkedData<typeof schema>;
314
18
  }
@@ -10,115 +10,50 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
13
  Object.defineProperty(exports, "__esModule", { value: true });
17
14
  exports.MediaLayout = MediaLayout;
18
15
  const jsx_runtime_1 = require("react/jsx-runtime");
19
16
  const funnel_core_1 = require("@nascentdigital/funnel-core");
20
- const classnames_1 = __importDefault(require("classnames"));
21
- const react_1 = require("react");
22
17
  const refs_1 = require("../../client/refs");
23
18
  const fields_1 = require("../fields");
24
19
  const panels_1 = require("../panels");
25
- const schema_1 = require("../schema");
20
+ const Block_1 = require("./Block");
26
21
  // block
27
22
  function MediaLayout(_a) {
28
- var _b, _c;
29
- var { className, as, EmbeddedVideoElement = refs_1.EmbeddedVideo, layout } = _a, props = __rest(_a, ["className", "as", "EmbeddedVideoElement", "layout"]);
30
- // dont render if missing model
31
- const { config, fields } = layout !== null && layout !== void 0 ? layout : {};
32
- const items = (_c = (_b = fields === null || fields === void 0 ? void 0 : fields.list) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : [];
33
- if (!layout) {
34
- console.warn('[MediaLayout] attempted to render without items model');
35
- return null;
36
- }
23
+ var { EmbeddedVideoElement = refs_1.EmbeddedVideo, listPanelProps } = _a, props = __rest(_a, ["EmbeddedVideoElement", "listPanelProps"]);
37
24
  // render
38
- return (0, react_1.createElement)(as, Object.assign({ className: (0, classnames_1.default)(className, 'nd-MediaLayout nd-Block-fullbleed',
39
- // MediaLayout.Layout.getClassName(config?.layout?.value),
40
- schema_1.BlockConfig.Presets.ThemeOnly.getClassName(config)) }, props), (0, jsx_runtime_1.jsx)("div", { className: "nd-MediaLayout-content", children: items.map(({ schema, id, value: item }) => (0, jsx_runtime_1.jsx)("div", { className: "nd-MediaLayout-itemWrap", children: funnel_core_1.Schema.EmbeddedVideoField.Value.filter(item)
41
- ?
42
- (0, jsx_runtime_1.jsx)(EmbeddedVideoElement, { className: "nd-MediaLayout-item", video: item })
43
- :
44
- (0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-MediaLayout-item", visual: item }) }, id)) }));
25
+ return ((0, jsx_runtime_1.jsx)(MediaLayout.Component, Object.assign({ listPanelProps: Object.assign(Object.assign({}, listPanelProps), { itemProps: { EmbeddedVideoElement } }) }, props)));
45
26
  }
46
27
  // extension
47
28
  (function (MediaLayout) {
48
- let Layout;
49
- (function (Layout) {
50
- // enum
51
- Layout.Enum = {
52
- poster: { name: 'Poster', hint: 'A large/prominent presentation.' },
53
- '1col': { name: '1 Column', hint: 'All visuals are put into a single column.' },
54
- '2col': { name: '2 Column', hint: 'Split into 2 columns on larger screens.' },
55
- brick: { name: 'Brick', hint: 'A masonry pattern.' },
56
- brickAlt: { name: 'Brick (Flipped)', hint: 'An alternate masonary pattern (reversed direction).' }
57
- };
58
- // schema
59
- Layout.schema = funnel_core_1.Schema.Field.enumeration({
60
- name: 'Layout',
61
- hint: 'Select a media layout',
62
- description: 'Determine how your assets will be presented.',
63
- options: Layout.Enum,
64
- defaultOption: '1col'
65
- });
66
- // helpers
67
- function getClassName(layout) {
68
- switch (layout) {
69
- case 'poster':
70
- return 'nd-MediaLayout-layout-poster';
71
- case '1col':
72
- return 'nd-MediaLayout-layout-1col';
73
- case '2col':
74
- return 'nd-MediaLayout-layout-2col';
75
- case 'brick':
76
- return 'nd-MediaLayout-layout-brick';
77
- case 'brickAlt':
78
- return 'nd-MediaLayout-layout-brickAlt';
79
- default:
80
- console.warn('[MediaLayout] unrecognized layout:', layout);
81
- return 'nd-MediaLayout-layout-poster';
82
- }
83
- }
84
- Layout.getClassName = getClassName;
85
- })(Layout = MediaLayout.Layout || (MediaLayout.Layout = {}));
86
- const fieldsSchema = {
87
- list: funnel_core_1.Schema.Field.list({
88
- name: 'Assets',
89
- description: 'Add one or more assets and then configure the layout.',
90
- itemTypes: {
91
- visual: panels_1.VisualPanel.Fields.visual.unwrap(),
92
- embedded: funnel_core_1.Schema.Field.embeddedVideo({
93
- name: 'Embedded Video',
94
- description: 'A remote streaming video (e.g. YouTube)',
95
- allowMuting: true
96
- })
97
- },
98
- min: 1,
99
- max: 20
100
- })
101
- };
102
- const configSchema = panels_1.BlockPanel.getConfigSchema({
103
- fields: fieldsSchema,
104
- listKey: 'list',
105
- extend: {
106
- mediaLayout: Layout.schema
107
- }
108
- });
109
- MediaLayout.schema = funnel_core_1.Schema.Block.create({
29
+ var _a;
30
+ // factory
31
+ _a = Block_1.Block.create({
110
32
  id: '_nd-mediaLayout',
111
33
  name: 'MediaLayout',
112
34
  version: 1,
113
- config: configSchema,
114
- fields: fieldsSchema,
115
- getConfig: args => panels_1.BlockPanel.getConfig({
116
- args,
117
- listKey: 'list'
118
- }),
119
- getLayout: args => panels_1.BlockPanel.getLayout({
120
- args,
121
- listKey: 'list'
122
- })
123
- });
35
+ className: 'nd-MediaLayout',
36
+ message: true,
37
+ list: {
38
+ schema: funnel_core_1.Schema.Field.list({
39
+ name: 'Assets',
40
+ description: 'Add one or more assets and then configure the layout.',
41
+ itemTypes: {
42
+ visual: panels_1.VisualPanel.Fields.visual.unwrap(),
43
+ embedded: funnel_core_1.Schema.Field.embeddedVideo({
44
+ name: 'Embedded Video',
45
+ description: 'A remote streaming video (e.g. YouTube)',
46
+ allowMuting: true
47
+ })
48
+ },
49
+ min: 1,
50
+ max: 20
51
+ }),
52
+ itemRenderer: (item, { EmbeddedVideoElement }) => ((0, jsx_runtime_1.jsx)("div", { className: "nd-MediaLayout-itemWrap", children: funnel_core_1.Schema.EmbeddedVideoField.Value.filter(item.value)
53
+ ?
54
+ (0, jsx_runtime_1.jsx)(EmbeddedVideoElement, { className: "nd-MediaLayout-item", video: item.value })
55
+ :
56
+ (0, jsx_runtime_1.jsx)(fields_1.Visual, { className: "nd-MediaLayout-item", visual: item.value }) }))
57
+ }
58
+ }), MediaLayout.Component = _a.Component, MediaLayout.schema = _a.schema;
124
59
  })(MediaLayout || (exports.MediaLayout = MediaLayout = {}));
@@ -9,9 +9,9 @@ export declare namespace Message {
9
9
  const schema: Schema.EnumField<Schema.EnumField.Options<Variant>>;
10
10
  function getClassName(variant?: Variant): string;
11
11
  }
12
- const Component: import("react").FunctionComponent<Block.Create.Result.Component<true, true, undefined, {
12
+ const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-message", true, true, undefined, {
13
13
  variant: Schema.EnumField<Schema.EnumField.Options<Variant>>;
14
- }>>, schema: Block.Create.Result.Schema<true, true, undefined, {
14
+ }, any>>, schema: Block.Create.Result.Schema<"_nd-message", true, true, undefined, {
15
15
  variant: Schema.EnumField<Schema.EnumField.Options<Variant>>;
16
16
  }>;
17
17
  type Model = Schema.Block.LinkedData<typeof schema>;
@@ -1,9 +1,10 @@
1
1
  import { Schema } from '@nascentdigital/funnel-core';
2
2
  import { ComponentProps } from 'react';
3
3
  import { Block } from './Block';
4
+ import { OutcomeDetail } from './OutcomeDetail';
4
5
  export declare function Outcome(props: ComponentProps<typeof Outcome.Component>): import("react/jsx-runtime").JSX.Element;
5
6
  export declare namespace Outcome {
6
- const Component: import("react").FunctionComponent<Block.Create.Result.Component<true, true, Schema.ListField<{
7
+ const Component: import("react").FunctionComponent<Block.Create.Result.Component<"_nd-outcome", true, true, Schema.ListField<{
7
8
  detail: Schema.ObjectField<{
8
9
  title: Schema.Optional<Schema.TextField>;
9
10
  headline: Schema.RichTextField;
@@ -11,7 +12,7 @@ export declare namespace Outcome {
11
12
  icon: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
12
13
  link: Schema.Optional<Schema.LinkField>;
13
14
  }>;
14
- }>, Schema.Block.Config>>, schema: Block.Create.Result.Schema<true, true, Schema.ListField<{
15
+ }>, Schema.Block.Config, OutcomeDetail.Props.Configuration>>, schema: Block.Create.Result.Schema<"_nd-outcome", true, true, Schema.ListField<{
15
16
  detail: Schema.ObjectField<{
16
17
  title: Schema.Optional<Schema.TextField>;
17
18
  headline: Schema.RichTextField;
@@ -291,8 +291,6 @@ export declare namespace OutcomeDetail {
291
291
  icon: Schema.Optional<Schema.AssetField<Schema.AssetField.LinkedValue.Visual>>;
292
292
  link: Schema.Optional<Schema.LinkField>;
293
293
  }>;
294
- type Model = Schema.Field.LinkedData<typeof schema>;
295
- type Tag = HTMLElements.Standard.Container;
296
294
  type Props<T extends Tag> = Omit<HTMLAttributes<HTMLElements.Standard[T]>, 'children'> & {
297
295
  as: T;
298
296
  titleTag?: Title.Tag;
@@ -300,4 +298,9 @@ export declare namespace OutcomeDetail {
300
298
  captionTag?: Caption.Tag;
301
299
  detail: Model;
302
300
  };
301
+ namespace Props {
302
+ type Configuration = Pick<Partial<Props<Tag>>, 'as' | 'titleTag' | 'headlineTag' | 'captionTag'>;
303
+ }
304
+ type Model = Schema.Field.LinkedData<typeof schema>;
305
+ type Tag = HTMLElements.Standard.Container;
303
306
  }