@factorialco/f0-react 4.43.0 → 4.45.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/DocumentToolbar-CW3DaM_j.js +93 -0
- package/dist/DocxViewer-Dpj4i6ig.js +5575 -0
- package/dist/{F0AiProcessingOverlay-BEP7sCit.js → F0AiProcessingOverlay-rViVqtAb.js} +3 -3
- package/dist/{F0CanvasPanel-DbqD05BD.js → F0CanvasPanel-VGTPb68G.js} +87701 -87664
- package/dist/{LocationMap-k_Xf8FpF.js → LocationMap-CdKO0X5V.js} +1 -1
- package/dist/SheetViewer-huUU5vFM.js +137 -0
- package/dist/TextViewer-DXDZcvag.js +74 -0
- package/dist/ai.d.ts +11 -0
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +18 -1
- package/dist/experimental.js +5 -5
- package/dist/f0-C3TJ0moH.js +79279 -0
- package/dist/f0.d.ts +84 -1
- package/dist/f0.js +299 -79563
- package/dist/i18n-provider-defaults.d.ts +11 -0
- package/dist/i18n-provider-defaults.js +13 -2
- package/dist/{index-CU7LjzD8.js → index-CNi_8WQC.js} +14655 -14406
- package/dist/styles.css +1 -1
- package/dist/xlsx-CzlURDDb.js +24525 -0
- package/package.json +3 -2
- package/dist/xlsx-Bedf3nwD.js +0 -15557
package/dist/f0.d.ts
CHANGED
|
@@ -4962,6 +4962,8 @@ export declare const defaultTranslations: {
|
|
|
4962
4962
|
readonly closePreview: "Close";
|
|
4963
4963
|
readonly previousImage: "Previous image";
|
|
4964
4964
|
readonly nextImage: "Next image";
|
|
4965
|
+
readonly openDocument: "Open document";
|
|
4966
|
+
readonly documentPreview: "Document preview";
|
|
4965
4967
|
readonly photo: "Photo";
|
|
4966
4968
|
readonly photoCount: {
|
|
4967
4969
|
readonly one: "{{count}} photo";
|
|
@@ -5207,6 +5209,10 @@ export declare const defaultTranslations: {
|
|
|
5207
5209
|
readonly addBlockedHint: "Finish filling out the last item you just added in order to add another one";
|
|
5208
5210
|
readonly addBlockedErrorHint: "Fix the errors in the existing items before adding another one";
|
|
5209
5211
|
readonly addBlockedMaxHint: "You've reached the maximum number of items";
|
|
5212
|
+
readonly removeConfirmTitle: "Remove item?";
|
|
5213
|
+
readonly removeConfirmMessage: "This item will be removed. This action cannot be undone.";
|
|
5214
|
+
readonly removeError: "Couldn't remove the item. Please try again.";
|
|
5215
|
+
readonly removeErrorTitle: "Remove failed";
|
|
5210
5216
|
};
|
|
5211
5217
|
readonly moreInformation: "More information";
|
|
5212
5218
|
readonly validation: {
|
|
@@ -5269,6 +5275,11 @@ export declare const defaultTranslations: {
|
|
|
5269
5275
|
readonly print: "Print";
|
|
5270
5276
|
readonly download: "Download";
|
|
5271
5277
|
readonly loading: "Loading document";
|
|
5278
|
+
readonly previewFailed: "Preview isn't available for this file";
|
|
5279
|
+
readonly showingFirstRows: {
|
|
5280
|
+
readonly one: "Showing the first row";
|
|
5281
|
+
readonly other: "Showing the first {{count}} rows";
|
|
5282
|
+
};
|
|
5272
5283
|
};
|
|
5273
5284
|
};
|
|
5274
5285
|
|
|
@@ -8701,6 +8712,15 @@ export declare type F0DialogSecondaryActionItem = F0DialogActionItem;
|
|
|
8701
8712
|
|
|
8702
8713
|
declare type F0DialogSize = (typeof dialogSizes)[number];
|
|
8703
8714
|
|
|
8715
|
+
/**
|
|
8716
|
+
* Document families the viewer can render. "pdf" is the default and keeps the
|
|
8717
|
+
* full toolbar (paging, zoom, print, download); the other kinds render a
|
|
8718
|
+
* lazy-loaded, read-only preview: "sheet" (xlsx/xls/csv) as an Excel-style
|
|
8719
|
+
* grid with one tab per sheet, "docx" through docx-preview with page layout,
|
|
8720
|
+
* and "text" as a rendered markdown document (`.md`) or monospaced source.
|
|
8721
|
+
*/
|
|
8722
|
+
export declare type F0DocumentKind = "pdf" | "sheet" | "docx" | "text";
|
|
8723
|
+
|
|
8704
8724
|
/**
|
|
8705
8725
|
* @experimental This is an experimental component use it at your own risk
|
|
8706
8726
|
*/
|
|
@@ -8880,12 +8900,20 @@ declare type F0EntitiesListField = F0BaseField & {
|
|
|
8880
8900
|
labels?: F0EntitiesListLabels;
|
|
8881
8901
|
/** Ids of the items that can be edited (matched against `item.id`) */
|
|
8882
8902
|
editableIds?: Array<string | number>;
|
|
8903
|
+
/** Ids of the items that can be removed (matched against `item.id`) */
|
|
8904
|
+
removableIds?: Array<string | number>;
|
|
8883
8905
|
/** Maximum number of rows allowed */
|
|
8884
8906
|
maxItems?: number;
|
|
8885
8907
|
/** Per-column presentation options, keyed by item-schema property name */
|
|
8886
8908
|
columns?: Record<string, F0EntitiesListColumnConfig>;
|
|
8887
8909
|
/** Custom trailing actions per row (resolved per row) */
|
|
8888
8910
|
rowActions?: (item: EntitiesListItem, index: number) => F0EntitiesListRowAction[];
|
|
8911
|
+
/** Persistence hook for removing a row (runs after the user confirms) */
|
|
8912
|
+
onRemove?: (item: EntitiesListItem) => Promise<{
|
|
8913
|
+
success: boolean;
|
|
8914
|
+
} | void>;
|
|
8915
|
+
/** Per-item confirmation copy for the remove action */
|
|
8916
|
+
confirmRemove?: (item: EntitiesListItem) => ConfirmDialogOptions;
|
|
8889
8917
|
/** Conditional rendering based on another field's value */
|
|
8890
8918
|
renderIf?: EntitiesListFieldRenderIf;
|
|
8891
8919
|
};
|
|
@@ -9017,6 +9045,16 @@ declare interface F0EntitiesListOptions<T = EntitiesListItem> {
|
|
|
9017
9045
|
* (pencil) action that opens the edit dialog.
|
|
9018
9046
|
*/
|
|
9019
9047
|
editableIds?: Array<string | number>;
|
|
9048
|
+
/**
|
|
9049
|
+
* Restricts which items can be removed, matched against each item's `id`
|
|
9050
|
+
* property. The remove counterpart to {@link editableIds}, and independent
|
|
9051
|
+
* of it — a row can be editable but not removable, or vice versa. When
|
|
9052
|
+
* omitted, every item is removable. Items without an `id` (e.g. rows just
|
|
9053
|
+
* added by the user and not yet persisted) stay removable. A row hidden from
|
|
9054
|
+
* this list shows no remove action (`list-view`) / no remove button
|
|
9055
|
+
* (`editable-table`).
|
|
9056
|
+
*/
|
|
9057
|
+
removableIds?: Array<string | number>;
|
|
9020
9058
|
/** Minimum number of rows required (defaults to 1 unless the field is optional) */
|
|
9021
9059
|
minItems?: number;
|
|
9022
9060
|
/** Maximum number of rows allowed. When reached the add button is hidden. */
|
|
@@ -9030,6 +9068,28 @@ declare interface F0EntitiesListOptions<T = EntitiesListItem> {
|
|
|
9030
9068
|
* update or remove the row.
|
|
9031
9069
|
*/
|
|
9032
9070
|
rowActions?: (item: T, index: number) => F0EntitiesListRowAction<T>[];
|
|
9071
|
+
/**
|
|
9072
|
+
* Persistence hook for removing a row — the delete counterpart to
|
|
9073
|
+
* `createFormDefinition` (add) and `updateFormDefinition` (edit). Called with
|
|
9074
|
+
* the row's item **after** the user confirms the destructive action. Return
|
|
9075
|
+
* `{ success: false }` or throw to keep the row and surface an error; return
|
|
9076
|
+
* `{ success: true }` (or nothing) to drop it from the field value.
|
|
9077
|
+
*
|
|
9078
|
+
* When omitted, removal is value-only (the row is spliced from the array with
|
|
9079
|
+
* no network call) — but the confirmation is still shown, per the CRUD
|
|
9080
|
+
* "Delete & destructive" guidance.
|
|
9081
|
+
*/
|
|
9082
|
+
onRemove?: (item: T) => Promise<{
|
|
9083
|
+
success: boolean;
|
|
9084
|
+
} | void>;
|
|
9085
|
+
/**
|
|
9086
|
+
* Per-item confirmation copy for the remove action, so callers can **name the
|
|
9087
|
+
* resource** and its scope (per the CRUD "Delete & destructive" doc). Receives
|
|
9088
|
+
* the row item and returns the confirmation dialog options
|
|
9089
|
+
* (`title`, `msg`, `type`, `confirm`/`cancel` labels). When omitted, a generic
|
|
9090
|
+
* default confirmation is shown.
|
|
9091
|
+
*/
|
|
9092
|
+
confirmRemove?: (item: T) => ConfirmDialogOptions;
|
|
9033
9093
|
}
|
|
9034
9094
|
|
|
9035
9095
|
/**
|
|
@@ -10635,11 +10695,34 @@ export declare const F0PdfViewer: WithDataTestIdReturnType_3<ForwardRefExoticCom
|
|
|
10635
10695
|
Skeleton: () => JSX_2.Element;
|
|
10636
10696
|
}>;
|
|
10637
10697
|
|
|
10698
|
+
/**
|
|
10699
|
+
* Host-provided toolbar action, appended after the built-in controls in every
|
|
10700
|
+
* kind — e.g. a Close button when the viewer lives inside a fullscreen overlay.
|
|
10701
|
+
*/
|
|
10702
|
+
export declare type F0PdfViewerAction = {
|
|
10703
|
+
icon: IconType;
|
|
10704
|
+
label: string;
|
|
10705
|
+
onClick: () => void;
|
|
10706
|
+
};
|
|
10707
|
+
|
|
10638
10708
|
export declare interface F0PdfViewerProps extends WithDataTestIdProps, DataAttributes_2 {
|
|
10639
|
-
/** Source URL of the
|
|
10709
|
+
/** Source URL of the document. */
|
|
10640
10710
|
url: string;
|
|
10641
10711
|
/** File name used when downloading the document. Defaults to "document.pdf". */
|
|
10642
10712
|
filename?: string;
|
|
10713
|
+
/**
|
|
10714
|
+
* Document family to render. Defaults to "pdf" (unchanged behavior). For the
|
|
10715
|
+
* other kinds the PDF-only props below (page, scale, rotation, print…) are
|
|
10716
|
+
* ignored.
|
|
10717
|
+
*/
|
|
10718
|
+
kind?: F0DocumentKind;
|
|
10719
|
+
/** MIME type of the document — used by kind "text" to detect markdown. */
|
|
10720
|
+
mimeType?: string;
|
|
10721
|
+
/**
|
|
10722
|
+
* Custom actions appended to the toolbar (after the built-in controls), in
|
|
10723
|
+
* every kind — e.g. a Close button when the viewer fills an overlay.
|
|
10724
|
+
*/
|
|
10725
|
+
actions?: F0PdfViewerAction[];
|
|
10643
10726
|
/** Zero-based page index to scroll to initially (and on change). */
|
|
10644
10727
|
page?: number;
|
|
10645
10728
|
/** Restrict rendering to a subset of pages (zero-based indexes). */
|