@factorialco/f0-react 6.22.1 → 6.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChatPdfThumbnail-B0umIEqq.js → ChatPdfThumbnail-BS6BmrYf.js} +1 -1
- package/dist/{CoachmarkProvider-C_lomeTl.js → CoachmarkProvider-CGTyzNuB.js} +11612 -11481
- package/dist/{DocumentToolbar-Cvgj-Z0z.js → DocumentToolbar-CurruBn6.js} +2 -2
- package/dist/{DocxViewer-C6LHQg4y.js → DocxViewer-Dvz0Jo7o.js} +2 -2
- package/dist/{F0AiProcessingOverlay-mte_XVAK.js → F0AiProcessingOverlay-i1gfeTef.js} +1 -1
- package/dist/{F0CanvasPanel-DiaHNd_B.js → F0CanvasPanel-kyz8aCo6.js} +1546 -1525
- package/dist/{F0VideoPlayer-CKpPa_Rc.js → F0VideoPlayer-Cjdwg3I9.js} +1 -1
- package/dist/{SheetViewer-Bjzv09EU.js → SheetViewer-DaN0Ahv8.js} +2 -2
- package/dist/{TextViewer-BZFQtNUo.js → TextViewer-DY-zaYsl.js} +2 -2
- package/dist/ai.d.ts +50 -20
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +14 -14
- package/dist/component-status.js +3 -3
- package/dist/experimental.d.ts +258 -42
- package/dist/experimental.js +6700 -6419
- package/dist/f0.d.ts +51 -21
- package/dist/f0.js +9629 -9731
- package/dist/i18n-provider-defaults.d.ts +29 -14
- package/dist/i18n-provider-defaults.js +15 -0
- package/dist/index-O8kba4Zn.js +4 -0
- package/dist/{index-C8Toqg7r.js → index-PGrHyWOP.js} +3 -3
- package/dist/{pdfWorker-CYFzrT6A.js → pdfWorker-CDMnVGUJ.js} +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/index-SVjMui0_.js +0 -4
package/dist/experimental.d.ts
CHANGED
|
@@ -128,6 +128,9 @@ import { WithDataTestIdReturnType as WithDataTestIdReturnType_2 } from './experi
|
|
|
128
128
|
import { WithDataTestIdReturnType as WithDataTestIdReturnType_3 } from './experimental';
|
|
129
129
|
import { WithDataTestIdReturnType as WithDataTestIdReturnType_4 } from './experimental';
|
|
130
130
|
import { WithDataTestIdReturnType as WithDataTestIdReturnType_5 } from './experimental';
|
|
131
|
+
import { z } from 'zod';
|
|
132
|
+
import { ZodEffects } from 'zod';
|
|
133
|
+
import { ZodRawShape } from 'zod';
|
|
131
134
|
|
|
132
135
|
declare type Action = {
|
|
133
136
|
label: string;
|
|
@@ -4714,6 +4717,21 @@ declare const defaultTranslations: {
|
|
|
4714
4717
|
readonly submit: "Submit";
|
|
4715
4718
|
readonly stepOf: "Step {{current}} of {{total}}";
|
|
4716
4719
|
};
|
|
4720
|
+
readonly widgets: {
|
|
4721
|
+
/** Turns a widget over to read what it is telling you (Home's `info`). */
|
|
4722
|
+
readonly whatThisMeans: "What this info means?";
|
|
4723
|
+
/** The button on that other side, which turns it back. */
|
|
4724
|
+
readonly gotIt: "Got it";
|
|
4725
|
+
/** The widget menu's own items, and the dialogs they open. */
|
|
4726
|
+
readonly editParams: "Edit params";
|
|
4727
|
+
readonly editParamsTitle: "Edit widget params";
|
|
4728
|
+
readonly removeWidget: "Remove widget";
|
|
4729
|
+
readonly addWidget: "Add widget";
|
|
4730
|
+
/** Heads the widgets a Home suggests, at the top of the picker. */
|
|
4731
|
+
readonly recommended: "Recommended";
|
|
4732
|
+
/** Why a drop onto a pinned widget was refused. `{{title}}` is its name. */
|
|
4733
|
+
readonly cannotMoveHere: "You can't move a widget here — {{title}} is locked.";
|
|
4734
|
+
};
|
|
4717
4735
|
readonly pdfViewer: {
|
|
4718
4736
|
readonly toolbar: "Document toolbar";
|
|
4719
4737
|
readonly previousPage: "Previous page";
|
|
@@ -5458,8 +5476,16 @@ declare type F0AvatarListProps = {
|
|
|
5458
5476
|
*/
|
|
5459
5477
|
noTooltip?: boolean;
|
|
5460
5478
|
/**
|
|
5461
|
-
* The
|
|
5462
|
-
*
|
|
5479
|
+
* The exact number of avatars to keep visible; the rest collapse into the
|
|
5480
|
+
* `+N` counter. Not a soft cap — a provided `max` is forwarded as
|
|
5481
|
+
* `OverflowList`'s `min` as well, so exactly this many avatars render even in
|
|
5482
|
+
* a container too narrow to fit them (see `F0AvatarList.tsx`).
|
|
5483
|
+
*
|
|
5484
|
+
* There is no numeric default. Left unset, the visible count is
|
|
5485
|
+
* container-driven: `OverflowList` measures the available width and shows as
|
|
5486
|
+
* many avatars as fit, collapsing the remainder into the counter. So passing
|
|
5487
|
+
* a number opts into a fixed footprint, and omitting it opts into filling
|
|
5488
|
+
* the row.
|
|
5463
5489
|
*/
|
|
5464
5490
|
max?: number;
|
|
5465
5491
|
/**
|
|
@@ -5467,10 +5493,17 @@ declare type F0AvatarListProps = {
|
|
|
5467
5493
|
*/
|
|
5468
5494
|
remainingCount?: number;
|
|
5469
5495
|
/**
|
|
5470
|
-
*
|
|
5471
|
-
*
|
|
5472
|
-
*
|
|
5473
|
-
*
|
|
5496
|
+
* @deprecated Never implemented — `F0AvatarList` has always ignored this
|
|
5497
|
+
* prop — and not needed, because `max` already selects between the two
|
|
5498
|
+
* layouts it described. Omit `max` for what this called `"fill"`:
|
|
5499
|
+
* `OverflowList` measures the row and shows as many avatars as fit. Pass a
|
|
5500
|
+
* `max` for `"compact"`: it doubles as `min`, so exactly that many stay
|
|
5501
|
+
* visible. A separate switch could only contradict `max` — `layout="fill"`
|
|
5502
|
+
* with `max={3}` has no coherent meaning — which is why this is going rather
|
|
5503
|
+
* than getting an implementation.
|
|
5504
|
+
* @removeIn 7.0.0
|
|
5505
|
+
* @migration Remove the prop. If you were passing `layout="compact"` to cap
|
|
5506
|
+
* the row, add `max={n}`: `"compact"` never capped anything.
|
|
5474
5507
|
*/
|
|
5475
5508
|
layout?: "fill" | "compact";
|
|
5476
5509
|
/**
|
|
@@ -6592,6 +6625,11 @@ declare type F0FormEditableTableRowAction<R extends RecordType> = {
|
|
|
6592
6625
|
onClick: (item: R, index: number) => void | Promise<void>;
|
|
6593
6626
|
};
|
|
6594
6627
|
|
|
6628
|
+
/**
|
|
6629
|
+
* Type for F0Form schemas - can be a plain ZodObject or a refined ZodObject (ZodEffects)
|
|
6630
|
+
*/
|
|
6631
|
+
declare type F0FormSchema<T extends ZodRawShape = ZodRawShape> = z.ZodObject<T> | ZodEffects<z.ZodObject<T>>;
|
|
6632
|
+
|
|
6595
6633
|
/**
|
|
6596
6634
|
* A tag rendered in a node's metadata row. Its visual is driven by the
|
|
6597
6635
|
* `TagVariant` `type`; its column identity — which toggle/label/default-
|
|
@@ -7665,6 +7703,29 @@ declare interface FrameContextType {
|
|
|
7665
7703
|
setForceFloat: (force: boolean) => void;
|
|
7666
7704
|
}
|
|
7667
7705
|
|
|
7706
|
+
/**
|
|
7707
|
+
* A params-driven value, TYPED against the widget's own schema — how to write a
|
|
7708
|
+
* `title` or an `info` that reads its params without casting at every access:
|
|
7709
|
+
*
|
|
7710
|
+
* ```tsx
|
|
7711
|
+
* title: fromParams(HOURS_PARAMS, (p) => `Hours · ${p.period ?? "this week"}`)
|
|
7712
|
+
* ```
|
|
7713
|
+
*
|
|
7714
|
+
* The params arrive `Partial`, and that is not a formality: a widget exists
|
|
7715
|
+
* before it is configured (the moment it is added, or while its dialog is open
|
|
7716
|
+
* on an incomplete form), so every field has to be treated as possibly unset.
|
|
7717
|
+
* The schema argument is there only to carry the type.
|
|
7718
|
+
*/
|
|
7719
|
+
export declare const fromParams: <S extends WidgetParamsSchema, T>(_schema: S, compute: (params: Partial<z.infer<S>>) => T) => (params: WidgetParams) => T;
|
|
7720
|
+
|
|
7721
|
+
/**
|
|
7722
|
+
* A widget property that may be COMPUTED FROM ITS PARAMS instead of fixed — the
|
|
7723
|
+
* title that says which team it is showing, the info that explains the period
|
|
7724
|
+
* you picked. It gets the params the widget has now (`{}` when it has none), so
|
|
7725
|
+
* the same function serves a widget before and after it is configured.
|
|
7726
|
+
*/
|
|
7727
|
+
export declare type FromWidgetParams<T> = T | ((params: WidgetParams) => T);
|
|
7728
|
+
|
|
7668
7729
|
declare interface GaugeComputation {
|
|
7669
7730
|
datasetId: string;
|
|
7670
7731
|
aggregation: AggregationType;
|
|
@@ -8178,10 +8239,47 @@ export declare type HomeWidgetChrome = Pick<WidgetProps, "action" | "summaries">
|
|
|
8178
8239
|
alert?: never;
|
|
8179
8240
|
});
|
|
8180
8241
|
|
|
8242
|
+
/**
|
|
8243
|
+
* A Home widget's header. The frame's, except that the two things a user reads
|
|
8244
|
+
* to know WHAT they are looking at may follow the params they set.
|
|
8245
|
+
*/
|
|
8246
|
+
export declare type HomeWidgetHeader = Omit<NonNullable<WidgetProps["header"]>, "title" | "info"> & {
|
|
8247
|
+
title?: FromWidgetParams<string>;
|
|
8248
|
+
/**
|
|
8249
|
+
* The `i` beside the title: hovering it explains the widget. Takes the params
|
|
8250
|
+
* too, so it can say what the numbers actually cover.
|
|
8251
|
+
*/
|
|
8252
|
+
info?: FromWidgetParams<string>;
|
|
8253
|
+
};
|
|
8254
|
+
|
|
8181
8255
|
/** A widget as handed to the layout: header + an ordered list of slots. */
|
|
8182
8256
|
export declare type HomeWidgetItem = HomeWidgetChrome & {
|
|
8183
8257
|
id: string;
|
|
8184
|
-
header?:
|
|
8258
|
+
header?: HomeWidgetHeader;
|
|
8259
|
+
/**
|
|
8260
|
+
* THIS WIDGET'S OWN menu items — "Mark all as read", "Export as CSV", whatever
|
|
8261
|
+
* it can do that no other widget can. They go in the widget's three-dots menu,
|
|
8262
|
+
* FIRST: the column adds what every widget carries (what its info means, its
|
|
8263
|
+
* params, removing it) after them, and removing it sits behind a separator.
|
|
8264
|
+
*
|
|
8265
|
+
* Ordinary `DropdownItem`s, so they take an `icon`, a `description`, `critical`
|
|
8266
|
+
* for a destructive one, `disabled`, or a `type: "separator"` of your own to
|
|
8267
|
+
* group them. A `locked` widget still shows them.
|
|
8268
|
+
*/
|
|
8269
|
+
actions?: WidgetProps["actions"];
|
|
8270
|
+
/**
|
|
8271
|
+
* The widget is CONFIGURABLE: these are the params the user may set, as an
|
|
8272
|
+
* F0Form schema. Declaring it — together with the layout's
|
|
8273
|
+
* `onChangeWidgetParams` — is what puts "Edit params" in the widget's menu.
|
|
8274
|
+
*/
|
|
8275
|
+
paramsSchema?: WidgetParamsSchema;
|
|
8276
|
+
/**
|
|
8277
|
+
* The params it is configured with right now. They drive whatever the widget
|
|
8278
|
+
* derives from them (its `title`, its `info`) and are the dialog's starting
|
|
8279
|
+
* point; rebuilding the SLOTS for new params is the app's own job, since only
|
|
8280
|
+
* it knows where their data comes from.
|
|
8281
|
+
*/
|
|
8282
|
+
params?: WidgetParams;
|
|
8185
8283
|
fullHeight?: boolean;
|
|
8186
8284
|
/**
|
|
8187
8285
|
* The widget's catalog glyph — shown for it in the collapsed rail and in the
|
|
@@ -8189,9 +8287,9 @@ export declare type HomeWidgetItem = HomeWidgetChrome & {
|
|
|
8189
8287
|
*/
|
|
8190
8288
|
icon?: IconType;
|
|
8191
8289
|
/**
|
|
8192
|
-
* PINNED: the widget stays put.
|
|
8193
|
-
*
|
|
8194
|
-
* always have, like Clock in.
|
|
8290
|
+
* PINNED: the widget stays put. It offers no "Remove widget" in its menu, it
|
|
8291
|
+
* cannot be dragged, and no other widget can displace it — for widgets a user
|
|
8292
|
+
* must always have, like Clock in.
|
|
8195
8293
|
*/
|
|
8196
8294
|
locked?: boolean;
|
|
8197
8295
|
/**
|
|
@@ -8751,7 +8849,8 @@ export declare interface ListSchema {
|
|
|
8751
8849
|
* `"link"` rows each carry an `href` and render as REAL anchors (role
|
|
8752
8850
|
* `link`, routed through the app's `LinkProvider`) — never an onClick;
|
|
8753
8851
|
* that's the only click behavior rows have. Omit for inert rows.
|
|
8754
|
-
* Same-tab for
|
|
8852
|
+
* Same-tab for paths, `#` fragments and this host under any scheme;
|
|
8853
|
+
* `target="_blank"` only for ANOTHER host (see `isExternalHref`).
|
|
8755
8854
|
*/
|
|
8756
8855
|
clickBehavior?: "link";
|
|
8757
8856
|
/**
|
|
@@ -9237,19 +9336,30 @@ export declare interface NewHomeLayoutProps {
|
|
|
9237
9336
|
/** Full override of how a whole widget is drawn. Defaults to `SlotWidget`. */
|
|
9238
9337
|
renderWidget?: (widget: HomeWidgetItem, ctx: HomeRenderCtx) => ReactNode;
|
|
9239
9338
|
/**
|
|
9240
|
-
*
|
|
9241
|
-
*
|
|
9339
|
+
* Which containers a user may arrange. Only these offer "Remove widget",
|
|
9340
|
+
* dragging and the add placeholder; the others stay put. Both by default.
|
|
9242
9341
|
*/
|
|
9243
|
-
|
|
9244
|
-
/** Called when the layout's edit button is pressed. */
|
|
9245
|
-
onEditingChange?: (editing: boolean) => void;
|
|
9342
|
+
editableWidgetContainers?: WidgetContainerSide[];
|
|
9246
9343
|
/**
|
|
9247
|
-
*
|
|
9248
|
-
*
|
|
9344
|
+
* Called with a widget id when its "Remove widget" menu item is used — the
|
|
9345
|
+
* three-dots menu in the widget's own header.
|
|
9249
9346
|
*/
|
|
9250
|
-
editableWidgetContainers?: WidgetContainerSide[];
|
|
9251
|
-
/** Called with a widget id when its remove control is clicked (edit mode only). */
|
|
9252
9347
|
onRemoveWidget?: (id: string) => void;
|
|
9348
|
+
/**
|
|
9349
|
+
* Called with a widget id and its new params when its "Edit params" dialog is
|
|
9350
|
+
* saved. Providing it is what offers that item, in the same menu, for every
|
|
9351
|
+
* widget that declares a `paramsSchema`. PERSIST what it hands you and pass it
|
|
9352
|
+
* back as the widget's `params` — rebuilding the widget's slots for the new
|
|
9353
|
+
* params is the app's own job, since only it knows where their data comes from.
|
|
9354
|
+
*/
|
|
9355
|
+
onChangeWidgetParams?: (id: string, params: WidgetParams) => void;
|
|
9356
|
+
/**
|
|
9357
|
+
* Draws a widget for params being tried out in that dialog, before they are
|
|
9358
|
+
* saved. Defaults to the widget with those params swapped in — which is
|
|
9359
|
+
* already live for everything they derive (title, info); supply this to
|
|
9360
|
+
* rebuild its slots as well.
|
|
9361
|
+
*/
|
|
9362
|
+
renderWidgetPreview?: (widget: HomeWidgetItem, params: WidgetParams) => ReactNode;
|
|
9253
9363
|
/** When set, renders a "+ Add widget" affordance at the bottom of each column. */
|
|
9254
9364
|
onClickAddNewWidget?: (side: WidgetContainerSide) => void;
|
|
9255
9365
|
/** Called with a side and its widget ids in their new order after a drag. */
|
|
@@ -10584,6 +10694,9 @@ export declare const resolveSlotRenderer: (entry: SlotRendererEntry | undefined)
|
|
|
10584
10694
|
skeleton?: SlotSkeletonRenderer;
|
|
10585
10695
|
} | undefined;
|
|
10586
10696
|
|
|
10697
|
+
/** Resolves a header's params-driven parts against the params in hand. */
|
|
10698
|
+
export declare const resolveWidgetHeader: (header: HomeWidgetHeader | undefined, params?: WidgetParams) => WidgetProps["header"];
|
|
10699
|
+
|
|
10587
10700
|
/**
|
|
10588
10701
|
* Header for a resource detail page: avatar, title, description, status,
|
|
10589
10702
|
* metadata and its primary, secondary and overflow actions.
|
|
@@ -12838,14 +12951,30 @@ export declare type WidgetAvatarsListItemProps = {
|
|
|
12838
12951
|
* WidgetCatalog — the "Add widget" dialog, mirroring the custom-home prototype:
|
|
12839
12952
|
* a searchable picker on the left (icon + title rows, the selected row tinted),
|
|
12840
12953
|
* a LIVE preview of the highlighted widget on the right at the width it will
|
|
12841
|
-
* really get, and the "Add widget" CTA in the dialog footer.
|
|
12842
|
-
*
|
|
12954
|
+
* really get, and the "Add widget" CTA in the dialog footer. FULLSCREEN off a
|
|
12955
|
+
* large display, and the two columns stack on a narrow screen
|
|
12956
|
+
* (`useWidgetDialogLayout`).
|
|
12843
12957
|
*
|
|
12844
12958
|
* Selection follows the filter: if the selected row is filtered out, the first
|
|
12845
12959
|
* remaining row takes over, so the preview always shows something the CTA can
|
|
12846
12960
|
* actually add.
|
|
12847
12961
|
*/
|
|
12848
|
-
export declare function WidgetCatalog({ isOpen, onClose, widgets, onAdd, previewWidth, title, }: WidgetCatalogProps): JSX_2.Element;
|
|
12962
|
+
export declare function WidgetCatalog({ isOpen, onClose, widgets, onAdd, groups, previewWidth, title, }: WidgetCatalogProps): JSX_2.Element;
|
|
12963
|
+
|
|
12964
|
+
/**
|
|
12965
|
+
* One DOMAIN in the picker: a heading the widgets under it belong to.
|
|
12966
|
+
*
|
|
12967
|
+
* The label is the app's own words because f0's `modules` registry maps ids to
|
|
12968
|
+
* ICONS ONLY — there are no module names to borrow, and a domain may well cover
|
|
12969
|
+
* two modules or none.
|
|
12970
|
+
*/
|
|
12971
|
+
export declare interface WidgetCatalogGroup {
|
|
12972
|
+
/** What an item's `group` points at. */
|
|
12973
|
+
id: string;
|
|
12974
|
+
label: string;
|
|
12975
|
+
/** The domain's module: its glyph heads the group. */
|
|
12976
|
+
module?: ModuleId;
|
|
12977
|
+
}
|
|
12849
12978
|
|
|
12850
12979
|
/** One entry in the widget catalog dialog. */
|
|
12851
12980
|
export declare interface WidgetCatalogItem {
|
|
@@ -12857,6 +12986,23 @@ export declare interface WidgetCatalogItem {
|
|
|
12857
12986
|
* `SlotWidget`), so the preview can't drift from what gets added.
|
|
12858
12987
|
*/
|
|
12859
12988
|
preview: ReactNode;
|
|
12989
|
+
/**
|
|
12990
|
+
* What this widget is telling you — the widget's own `header.info`, shown under
|
|
12991
|
+
* the preview. Deciding whether to add a widget is exactly the moment that
|
|
12992
|
+
* sentence is worth reading, so the picker says it without being asked.
|
|
12993
|
+
*/
|
|
12994
|
+
info?: string;
|
|
12995
|
+
/**
|
|
12996
|
+
* Which `groups` entry this widget belongs under. A widget whose group isn't
|
|
12997
|
+
* declared (or which has none) is listed after the groups, without a heading.
|
|
12998
|
+
*/
|
|
12999
|
+
group?: string;
|
|
13000
|
+
/**
|
|
13001
|
+
* LIFTS IT to a "Recommended" section at the very top, and out of its group —
|
|
13002
|
+
* a widget offered twice reads as two widgets. Optional in every sense: with
|
|
13003
|
+
* nothing recommended there is no section.
|
|
13004
|
+
*/
|
|
13005
|
+
recommended?: boolean;
|
|
12860
13006
|
}
|
|
12861
13007
|
|
|
12862
13008
|
export declare interface WidgetCatalogProps {
|
|
@@ -12866,6 +13012,11 @@ export declare interface WidgetCatalogProps {
|
|
|
12866
13012
|
widgets: WidgetCatalogItem[];
|
|
12867
13013
|
/** Called with the chosen widget id when the CTA is pressed. */
|
|
12868
13014
|
onAdd: (id: string) => void;
|
|
13015
|
+
/**
|
|
13016
|
+
* The DOMAINS the picker is organised into, in the order to show them. Omit it
|
|
13017
|
+
* and the list is flat — grouping is an offer, not a requirement.
|
|
13018
|
+
*/
|
|
13019
|
+
groups?: WidgetCatalogGroup[];
|
|
12869
13020
|
/**
|
|
12870
13021
|
* Content width of the column this was opened from — the preview is capped
|
|
12871
13022
|
* to it, so a rail-bound widget previews at rail width.
|
|
@@ -12901,6 +13052,45 @@ export declare type WidgetInboxListItemProps<Id extends string | number = string
|
|
|
12901
13052
|
|
|
12902
13053
|
export declare type WidgetInboxListProps = Props_9;
|
|
12903
13054
|
|
|
13055
|
+
/**
|
|
13056
|
+
* What a user has CONFIGURED about a widget — the values of the fields its
|
|
13057
|
+
* `paramsSchema` declares, keyed by field name. Dates arrive as `Date`s, a
|
|
13058
|
+
* multi-select as an array: whatever the schema's zod types say.
|
|
13059
|
+
*/
|
|
13060
|
+
export declare type WidgetParams = Record<string, unknown>;
|
|
13061
|
+
|
|
13062
|
+
/**
|
|
13063
|
+
* Whether every REQUIRED param of a schema is set — what "this widget can't be
|
|
13064
|
+
* shown until you configure it" comes down to. Use it to send a freshly added
|
|
13065
|
+
* widget straight into its params dialog.
|
|
13066
|
+
*/
|
|
13067
|
+
export declare const widgetParamsAreComplete: (schema: WidgetParamsSchema | undefined, params: WidgetParams | undefined) => boolean;
|
|
13068
|
+
|
|
13069
|
+
/**
|
|
13070
|
+
* A widget's params SCHEMA: an F0Form schema, so the fields are declared once —
|
|
13071
|
+
* in zod, with their f0 field config — and F0Form draws and validates them.
|
|
13072
|
+
*
|
|
13073
|
+
* That buys the whole vocabulary rather than a bespoke one: `z.string()`,
|
|
13074
|
+
* `z.number()`, `z.date()` (`fieldType: "datetime"` for a time as well),
|
|
13075
|
+
* `z.enum()`, and a select fed by a DATASOURCE (`source` + `mapOptions`, with
|
|
13076
|
+
* `multiple` for many) — `z.array()` for the multi-select's value. A field is
|
|
13077
|
+
* REQUIRED unless its zod type is `.optional()`, so "the user must set this"
|
|
13078
|
+
* needs nothing new either.
|
|
13079
|
+
*
|
|
13080
|
+
* ```tsx
|
|
13081
|
+
* paramsSchema: z.object({
|
|
13082
|
+
* since: f0FormField(z.date(), { label: "Since" }),
|
|
13083
|
+
* team: f0FormField(z.array(z.string()), {
|
|
13084
|
+
* label: "Teams",
|
|
13085
|
+
* source: teamsDataSource,
|
|
13086
|
+
* mapOptions: (team) => ({ value: team.id, label: team.name }),
|
|
13087
|
+
* multiple: true,
|
|
13088
|
+
* }),
|
|
13089
|
+
* })
|
|
13090
|
+
* ```
|
|
13091
|
+
*/
|
|
13092
|
+
export declare type WidgetParamsSchema = F0FormSchema;
|
|
13093
|
+
|
|
12904
13094
|
export declare interface WidgetProps {
|
|
12905
13095
|
header?: {
|
|
12906
13096
|
title?: string;
|
|
@@ -12908,22 +13098,37 @@ export declare interface WidgetProps {
|
|
|
12908
13098
|
comment?: string;
|
|
12909
13099
|
info?: string;
|
|
12910
13100
|
canBeBlurred?: boolean;
|
|
13101
|
+
/**
|
|
13102
|
+
* The way out of the widget: it makes the TITLE ITSELF the link — the title
|
|
13103
|
+
* with a chevron after it, one ghost-button-shaped target that lights up on
|
|
13104
|
+
* hover. Nothing sits in the header's top-right (that is the overflow menu's)
|
|
13105
|
+
* and nothing sits in the footer (that is `action`'s): the name of the widget
|
|
13106
|
+
* IS the way into it.
|
|
13107
|
+
*/
|
|
12911
13108
|
link?: {
|
|
12912
13109
|
/**
|
|
12913
|
-
* What following
|
|
12914
|
-
*
|
|
12915
|
-
*
|
|
12916
|
-
* for exactly that reason.
|
|
13110
|
+
* What following it DOES, in words — "Go to Communities". The visible text
|
|
13111
|
+
* is the widget's title, so this is what a screen reader announces
|
|
13112
|
+
* instead: it names the DESTINATION, which a title alone cannot.
|
|
12917
13113
|
*/
|
|
12918
13114
|
title: string;
|
|
12919
13115
|
url?: string;
|
|
12920
13116
|
onClick?: () => void;
|
|
12921
|
-
/** Defaults to the
|
|
13117
|
+
/** Defaults to the chevron. */
|
|
12922
13118
|
icon?: IconType;
|
|
12923
13119
|
};
|
|
12924
13120
|
count?: number;
|
|
12925
13121
|
};
|
|
13122
|
+
/** The card's footer button — its call to action. `neutral`/`sm` by default. */
|
|
12926
13123
|
action?: F0ButtonProps;
|
|
13124
|
+
/**
|
|
13125
|
+
* Extra classes for the FOOTER row that `action` draws in. For content that
|
|
13126
|
+
* BLEEDS past the card's content box and wants the footer brought onto its
|
|
13127
|
+
* line — Home's row-based slots bleed 8px, which eats the gap above the footer
|
|
13128
|
+
* and offsets it from the rows (see `SlotWidget`). Spacing only; `F0Button`
|
|
13129
|
+
* takes no className of its own, so this is the seam for it.
|
|
13130
|
+
*/
|
|
13131
|
+
footerClassName?: string;
|
|
12927
13132
|
summaries?: Array<{
|
|
12928
13133
|
label: string;
|
|
12929
13134
|
value: string | number;
|
|
@@ -12994,6 +13199,17 @@ export declare const WidgetStrip: ForwardRefExoticComponent<DashboardProps_2 & R
|
|
|
12994
13199
|
Skeleton: () => JSX_2.Element;
|
|
12995
13200
|
};
|
|
12996
13201
|
|
|
13202
|
+
/**
|
|
13203
|
+
* A widget's title as TEXT — resolved against its own params, and falling back
|
|
13204
|
+
* to its id so there is always something to name it by (an aria-label on the
|
|
13205
|
+
* collapsed rail's glyph, a row in the catalog).
|
|
13206
|
+
*/
|
|
13207
|
+
export declare const widgetTitle: (widget: {
|
|
13208
|
+
id: string;
|
|
13209
|
+
header?: HomeWidgetHeader;
|
|
13210
|
+
params?: WidgetParams;
|
|
13211
|
+
}) => string;
|
|
13212
|
+
|
|
12997
13213
|
declare type WidgetWidth = "sm" | "md" | "lg";
|
|
12998
13214
|
|
|
12999
13215
|
declare interface WiggleOptions {
|
|
@@ -13134,9 +13350,11 @@ declare namespace Calendar {
|
|
|
13134
13350
|
|
|
13135
13351
|
declare module "@tiptap/core" {
|
|
13136
13352
|
interface Commands<ReturnType> {
|
|
13137
|
-
|
|
13138
|
-
|
|
13139
|
-
|
|
13353
|
+
enhanceHighlight: {
|
|
13354
|
+
setEnhanceHighlight: (from: number, to: number, options?: {
|
|
13355
|
+
placeholder?: string;
|
|
13356
|
+
}) => ReturnType;
|
|
13357
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
13140
13358
|
};
|
|
13141
13359
|
}
|
|
13142
13360
|
}
|
|
@@ -13144,11 +13362,9 @@ declare module "@tiptap/core" {
|
|
|
13144
13362
|
|
|
13145
13363
|
declare module "@tiptap/core" {
|
|
13146
13364
|
interface Commands<ReturnType> {
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
}) => ReturnType;
|
|
13151
|
-
clearEnhanceHighlight: () => ReturnType;
|
|
13365
|
+
aiBlock: {
|
|
13366
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
13367
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
13152
13368
|
};
|
|
13153
13369
|
}
|
|
13154
13370
|
}
|
|
@@ -13186,10 +13402,8 @@ declare module "@tiptap/core" {
|
|
|
13186
13402
|
|
|
13187
13403
|
declare module "@tiptap/core" {
|
|
13188
13404
|
interface Commands<ReturnType> {
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
src: string;
|
|
13192
|
-
}) => ReturnType;
|
|
13405
|
+
transcript: {
|
|
13406
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
13193
13407
|
};
|
|
13194
13408
|
}
|
|
13195
13409
|
}
|
|
@@ -13197,8 +13411,10 @@ declare module "@tiptap/core" {
|
|
|
13197
13411
|
|
|
13198
13412
|
declare module "@tiptap/core" {
|
|
13199
13413
|
interface Commands<ReturnType> {
|
|
13200
|
-
|
|
13201
|
-
|
|
13414
|
+
videoEmbed: {
|
|
13415
|
+
setVideoEmbed: (options: {
|
|
13416
|
+
src: string;
|
|
13417
|
+
}) => ReturnType;
|
|
13202
13418
|
};
|
|
13203
13419
|
}
|
|
13204
13420
|
}
|