mn-angular-lib 1.0.88 → 1.0.90

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mn-angular-lib",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.1.3",
6
6
  "@angular/core": "^21.1.3"
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Provider, TemplateRef, OnInit, OnChanges, EventEmitter, ElementRef, PipeTransform, OnDestroy, DoCheck, ChangeDetectorRef, Type, ComponentRef, AfterViewInit, QueryList, ViewContainerRef, SimpleChanges, Signal } from '@angular/core';
2
+ import { InjectionToken, Provider, TemplateRef, OnInit, EventEmitter, OnChanges, ElementRef, PipeTransform, OnDestroy, DoCheck, ChangeDetectorRef, Type, ComponentRef, AfterViewInit, QueryList, ViewContainerRef, SimpleChanges, Signal } from '@angular/core';
3
3
  export { TemplateRef, Type } from '@angular/core';
4
4
  import * as tailwind_variants from 'tailwind-variants';
5
5
  import { VariantProps } from 'tailwind-variants';
@@ -1410,6 +1410,390 @@ declare class MnTextarea implements OnInit {
1410
1410
  static ɵcmp: i0.ɵɵComponentDeclaration<MnTextarea, "mn-lib-textarea", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
1411
1411
  }
1412
1412
 
1413
+ /**
1414
+ * Tailwind-variants definition for the MnFileInput component.
1415
+ *
1416
+ * Mirrors the styling vocabulary of {@link mnInputFieldVariants} (size,
1417
+ * borderRadius, shadow, fullWidth, disabled) so a file input visually matches the
1418
+ * rest of the input family, and adds a `dropzone` toggle for the large dashed
1419
+ * drop area used by the default display mode.
1420
+ */
1421
+ declare const mnFileInputVariants: tailwind_variants.TVReturnType<{
1422
+ /** Inner padding scale of the clickable control. */
1423
+ size: {
1424
+ sm: string;
1425
+ md: string;
1426
+ lg: string;
1427
+ };
1428
+ /** Corner rounding of the control. */
1429
+ borderRadius: {
1430
+ none: string;
1431
+ xs: string;
1432
+ sm: string;
1433
+ md: string;
1434
+ lg: string;
1435
+ xl: string;
1436
+ two_xl: string;
1437
+ three_xl: string;
1438
+ four_xl: string;
1439
+ };
1440
+ /** Drop shadow toggle. */
1441
+ shadow: {
1442
+ true: string;
1443
+ };
1444
+ /** Stretch the control to the full width of its container. */
1445
+ fullWidth: {
1446
+ true: string;
1447
+ };
1448
+ /** Renders the control as a large dashed dropzone with a hover accent. */
1449
+ dropzone: {
1450
+ true: string;
1451
+ };
1452
+ /** Dimmed, non-interactive appearance. */
1453
+ disabled: {
1454
+ true: string;
1455
+ };
1456
+ }, undefined, "bg-base-100 border-1 border-base-300 text-base-content text-sm outline-none transition-colors duration-300 ease-in-out", {
1457
+ /** Inner padding scale of the clickable control. */
1458
+ size: {
1459
+ sm: string;
1460
+ md: string;
1461
+ lg: string;
1462
+ };
1463
+ /** Corner rounding of the control. */
1464
+ borderRadius: {
1465
+ none: string;
1466
+ xs: string;
1467
+ sm: string;
1468
+ md: string;
1469
+ lg: string;
1470
+ xl: string;
1471
+ two_xl: string;
1472
+ three_xl: string;
1473
+ four_xl: string;
1474
+ };
1475
+ /** Drop shadow toggle. */
1476
+ shadow: {
1477
+ true: string;
1478
+ };
1479
+ /** Stretch the control to the full width of its container. */
1480
+ fullWidth: {
1481
+ true: string;
1482
+ };
1483
+ /** Renders the control as a large dashed dropzone with a hover accent. */
1484
+ dropzone: {
1485
+ true: string;
1486
+ };
1487
+ /** Dimmed, non-interactive appearance. */
1488
+ disabled: {
1489
+ true: string;
1490
+ };
1491
+ }, undefined, tailwind_variants.TVReturnType<{
1492
+ /** Inner padding scale of the clickable control. */
1493
+ size: {
1494
+ sm: string;
1495
+ md: string;
1496
+ lg: string;
1497
+ };
1498
+ /** Corner rounding of the control. */
1499
+ borderRadius: {
1500
+ none: string;
1501
+ xs: string;
1502
+ sm: string;
1503
+ md: string;
1504
+ lg: string;
1505
+ xl: string;
1506
+ two_xl: string;
1507
+ three_xl: string;
1508
+ four_xl: string;
1509
+ };
1510
+ /** Drop shadow toggle. */
1511
+ shadow: {
1512
+ true: string;
1513
+ };
1514
+ /** Stretch the control to the full width of its container. */
1515
+ fullWidth: {
1516
+ true: string;
1517
+ };
1518
+ /** Renders the control as a large dashed dropzone with a hover accent. */
1519
+ dropzone: {
1520
+ true: string;
1521
+ };
1522
+ /** Dimmed, non-interactive appearance. */
1523
+ disabled: {
1524
+ true: string;
1525
+ };
1526
+ }, undefined, "bg-base-100 border-1 border-base-300 text-base-content text-sm outline-none transition-colors duration-300 ease-in-out", unknown, unknown, undefined>>;
1527
+ /** Variant prop types derived from {@link mnFileInputVariants}. */
1528
+ type MnFileInputVariants = VariantProps<typeof mnFileInputVariants>;
1529
+
1530
+ /** A single error message definition: a static string or a function of the error args. */
1531
+ type MnFileInputErrorMessageData = string | MnErrorMessageFn;
1532
+ /**
1533
+ * Map of error keys to error message definitions.
1534
+ * Keys correspond to the component's selection errors (`accept`, `maxSize`,
1535
+ * `maxFiles`) or the attached control's validator keys (e.g. `required`).
1536
+ */
1537
+ type MnFileInputErrorMessagesData = Partial<Record<string, MnFileInputErrorMessageData>>;
1538
+ /**
1539
+ * Controls how the selected file(s) are presented.
1540
+ * - `dropzone` — large dashed drop area with icon + hint, previews/rows below (default).
1541
+ * - `thumbnail` — grid of image tiles (file icon for non-images), with an add tile.
1542
+ * - `list` — compact rows of file icon + name + size + remove.
1543
+ * - `compact` — inline styled button + current filename + remove.
1544
+ */
1545
+ type MnFileInputDisplayMode = 'dropzone' | 'thumbnail' | 'list' | 'compact';
1546
+ /**
1547
+ * Configuration properties for the {@link MnFileInput} component.
1548
+ * Passed as a single required `props` object, mirroring the other input components.
1549
+ */
1550
+ type MnFileInputProps = {
1551
+ /** Unique identifier for the input element (required for accessibility). */
1552
+ id: string;
1553
+ /** Name attribute for the underlying file input. */
1554
+ name?: string;
1555
+ /** Label text shown above the control (overrides config when provided). */
1556
+ label?: string;
1557
+ /** Hint shown inside the empty dropzone (overrides config when provided). */
1558
+ dropzoneHint?: string;
1559
+ /** Label for the "choose/replace file" affordance (overrides config when provided). */
1560
+ replaceLabel?: string;
1561
+ /** Accessible label for the per-file remove button (overrides config when provided). */
1562
+ removeLabel?: string;
1563
+ /**
1564
+ * Accepted file types, forwarded to the native `accept` attribute and
1565
+ * re-validated on selection (e.g. `image/*`, `.pdf,.docx`). When unset, all
1566
+ * file types are allowed.
1567
+ */
1568
+ accept?: string;
1569
+ /** Allow selecting more than one file. Changes the value shape to `File[]`. */
1570
+ multiple?: boolean;
1571
+ /** Maximum number of files retained (only meaningful when `multiple` is true). */
1572
+ maxFiles?: number;
1573
+ /** Maximum size per file in bytes; larger files are rejected. */
1574
+ maxSize?: number;
1575
+ /** How the selection is rendered. Defaults to `dropzone`. */
1576
+ displayMode?: MnFileInputDisplayMode;
1577
+ /**
1578
+ * URL of an already-saved image to preview when no new file is selected
1579
+ * (single mode). Cleared when the user removes it; surfaced via `cleared`.
1580
+ */
1581
+ currentUrl?: string | null;
1582
+ /** URLs of already-saved images to preview when nothing is selected (multiple mode). */
1583
+ currentUrls?: string[] | null;
1584
+ /** Disables the control. */
1585
+ disabled?: boolean;
1586
+ /** Size variant of the control (default: `md`). */
1587
+ size?: MnFileInputVariants['size'];
1588
+ /** Border radius variant (default: `lg`). */
1589
+ borderRadius?: MnFileInputVariants['borderRadius'];
1590
+ /** Shadow variant for the control. */
1591
+ shadow?: MnFileInputVariants['shadow'];
1592
+ /** Whether the control should take the full width of its container. */
1593
+ fullWidth?: MnFileInputVariants['fullWidth'];
1594
+ /** Custom error messages mapped by error key (overrides config and built-ins). */
1595
+ errorMessages?: MnFileInputErrorMessagesData;
1596
+ /** Fallback message when no specific message is found for an error. */
1597
+ defaultErrorMessage?: string;
1598
+ /** Priority order for displaying control errors when several exist. */
1599
+ errorPriority?: string[];
1600
+ /** Whether to use the built-in default error messages (default: true). */
1601
+ useBuiltInErrorMessages?: boolean;
1602
+ /** Display every control error instead of just the first/priority one (default: false). */
1603
+ showAllErrors?: boolean;
1604
+ };
1605
+ /**
1606
+ * UI strings resolved from {@link MnConfigService} for the file input.
1607
+ * These can only be set via configuration (or the matching `props` overrides).
1608
+ */
1609
+ type MnFileInputUIConfig = {
1610
+ /** Label text displayed above the control. */
1611
+ label?: string;
1612
+ /** ARIA label for screen readers (falls back to label). */
1613
+ ariaLabel?: string;
1614
+ /** Hint shown inside the empty dropzone. */
1615
+ dropzoneHint?: string;
1616
+ /** Label for the "choose/replace file" affordance. */
1617
+ replaceLabel?: string;
1618
+ /** Accessible label for the per-file remove button. */
1619
+ removeLabel?: string;
1620
+ /** Error messages resolved from config (override built-ins, overridden by props). */
1621
+ errorMessages?: Record<string, string>;
1622
+ };
1623
+
1624
+ /** A single renderable entry in the file input (a newly-selected file or an existing image). */
1625
+ type MnFileDisplayItem = {
1626
+ /** File name (new files) or a derived name (existing images). */
1627
+ name: string;
1628
+ /** Whether the entry should render as an image preview. */
1629
+ isImage: boolean;
1630
+ /** Object-URL (new image files) or saved URL (existing images), else null. */
1631
+ previewUrl: string | null;
1632
+ /** Human-readable size for new files, else null. */
1633
+ sizeLabel: string | null;
1634
+ /** Index used by the remove action. */
1635
+ index: number;
1636
+ /** True for an already-saved image passed via `currentUrl(s)`. */
1637
+ existing: boolean;
1638
+ };
1639
+ /**
1640
+ * MnFileInput Component
1641
+ *
1642
+ * A generic, accessible file input that implements Angular's ControlValueAccessor.
1643
+ * It styles selection to match the rest of the input family, shows image previews
1644
+ * (and a file icon + name for non-images), supports single or multiple selection,
1645
+ * several display layouts, and client-side `accept` / `maxSize` / `maxFiles` limits.
1646
+ *
1647
+ * The form control value is the plain selection: `File | null` (single) or
1648
+ * `File[]` (multiple). An optional `currentUrl`/`currentUrls` renders an
1649
+ * already-saved image; removing it leaves the value untouched and emits `cleared`.
1650
+ *
1651
+ * @example
1652
+ * ```html
1653
+ * <mn-lib-file-input
1654
+ * formControlName="image"
1655
+ * [props]="{ id: 'image', label: 'Cover', accept: 'image/*', displayMode: 'dropzone' }"
1656
+ * (cleared)="onRemoveExisting()">
1657
+ * </mn-lib-file-input>
1658
+ * ```
1659
+ */
1660
+ declare class MnFileInput implements OnInit {
1661
+ ngControl: NgControl | null;
1662
+ /** Configuration properties for the file input. */
1663
+ props: MnFileInputProps;
1664
+ /** Emits whenever the selected file(s) change (in addition to the form control). */
1665
+ filesChange: EventEmitter<File | File[] | null>;
1666
+ /** Emits when the user removes an already-saved image (`currentUrl(s)`). */
1667
+ cleared: EventEmitter<void>;
1668
+ /** Resolved UI configuration for the file input. */
1669
+ protected uiConfig: MnFileInputUIConfig;
1670
+ /** Currently selected files (always an array internally). */
1671
+ protected readonly files: i0.WritableSignal<File[]>;
1672
+ /** Transient message for a rejected selection (accept/maxSize/maxFiles). */
1673
+ protected readonly internalError: i0.WritableSignal<string | null>;
1674
+ private readonly configService;
1675
+ private readonly sectionPath;
1676
+ private readonly explicitInstanceId;
1677
+ private readonly lang;
1678
+ private readonly destroyRef;
1679
+ /** Object-URL previews aligned to {@link files}; null for non-image entries. */
1680
+ private readonly previewUrls;
1681
+ /** True once the user removed the single existing image. */
1682
+ private readonly currentCleared;
1683
+ /** Indices of removed existing images (multiple mode). */
1684
+ private readonly removedExisting;
1685
+ /** Renderable entries: existing images (when nothing newer hides them) then new files. */
1686
+ readonly displayItems: i0.Signal<MnFileDisplayItem[]>;
1687
+ /** Disabled state pushed by the forms API. */
1688
+ private formDisabled;
1689
+ /**
1690
+ * Built-in default error messages in English.
1691
+ * Used when `useBuiltInErrorMessages` is true (default); overridable per-field.
1692
+ */
1693
+ private readonly builtInErrorMessages;
1694
+ /** Registers this component as the ControlValueAccessor for the injected control. */
1695
+ constructor();
1696
+ /** The effective display mode. */
1697
+ get displayMode(): MnFileInputDisplayMode;
1698
+ /** Whether the control is disabled (via props or the forms API). */
1699
+ get isDisabled(): boolean;
1700
+ /** Native `accept` attribute value, or null for no restriction when unset. */
1701
+ get acceptAttr(): string | null;
1702
+ /** Resolved id for the file input element. */
1703
+ get resolvedId(): string;
1704
+ /** Resolved name attribute for the file input element. */
1705
+ get resolvedName(): string | null;
1706
+ /** Tailwind-variant classes for the clickable control. */
1707
+ get controlClasses(): string;
1708
+ /** The attached form control, if any. */
1709
+ get control(): _angular_forms.AbstractControl<any, any, any> | null;
1710
+ /** Whether to show control validation errors. */
1711
+ get showError(): boolean;
1712
+ /** All control error messages (used when `showAllErrors` is true). */
1713
+ get errorMessages(): string[];
1714
+ /** Single control error message (priority-aware). */
1715
+ get errorMessage(): string | null;
1716
+ ngOnInit(): void;
1717
+ /**
1718
+ * Writes a value from the form into the control.
1719
+ * @param val A `File`, an array of `File`, or null/undefined.
1720
+ */
1721
+ writeValue(val: unknown): void;
1722
+ /**
1723
+ * Registers the form's change callback.
1724
+ * @param fn Callback invoked with the new value.
1725
+ */
1726
+ registerOnChange(fn: (val: unknown) => void): void;
1727
+ /**
1728
+ * Registers the form's touched callback.
1729
+ * @param fn Callback invoked when the control is touched.
1730
+ */
1731
+ registerOnTouched(fn: () => void): void;
1732
+ /**
1733
+ * Sets the disabled state of the control.
1734
+ * @param isDisabled Whether the control should be disabled.
1735
+ */
1736
+ setDisabledState(isDisabled: boolean): void;
1737
+ /**
1738
+ * Handles a file-picker change: validates the incoming files against the
1739
+ * configured limits and updates the selection.
1740
+ * @param event The native change event from the hidden file input.
1741
+ */
1742
+ onFileSelected(event: Event): void;
1743
+ /**
1744
+ * Removes a newly-selected file by index.
1745
+ * @param index Index into the current selection.
1746
+ */
1747
+ removeFile(index: number): void;
1748
+ /**
1749
+ * Removes an already-saved image and notifies the consumer via `cleared`.
1750
+ * @param index Index of the existing image (0 in single mode).
1751
+ */
1752
+ removeExisting(index: number): void;
1753
+ /** Whether the attached control carries a `required` validator. */
1754
+ protected isRequired(): boolean;
1755
+ /** Stable track key for a display item across renders. */
1756
+ protected itemKey(item: MnFileDisplayItem): string;
1757
+ /** Whether a file should render as an image. */
1758
+ protected isImage(file: File): boolean;
1759
+ /** Callback to notify Angular forms of value changes. */
1760
+ private onChange;
1761
+ /** Callback to notify Angular forms when the control is touched. */
1762
+ private onTouched;
1763
+ /** Resolves UI strings from config, layering built-in defaults and prop overrides. */
1764
+ private resolveConfig;
1765
+ /**
1766
+ * Validates and merges newly-picked files into the current selection.
1767
+ * @param incoming The files chosen by the user.
1768
+ */
1769
+ private addFiles;
1770
+ /** Replaces the internal selection and rebuilds image previews. */
1771
+ private setFiles;
1772
+ /** Emits the current value to the form and any listeners. */
1773
+ private emit;
1774
+ /** Revokes any outstanding object-URL previews to avoid leaks. */
1775
+ private revokeAll;
1776
+ /** Builds a display item for an already-saved image. */
1777
+ private existingItem;
1778
+ /** Picks which control error key to display. */
1779
+ private pickErrorKey;
1780
+ /** Resolves a control error key to a message, interpolating its args. */
1781
+ private resolveControlError;
1782
+ /**
1783
+ * Resolves a message for an error key using the same precedence as the other
1784
+ * inputs: custom props > config > built-in > fallback > default.
1785
+ */
1786
+ private resolveMessage;
1787
+ /** Checks a file against the configured `accept` filter (extensions and MIME globs). */
1788
+ private matchesAccept;
1789
+ /** Formats a byte count as a human-readable size. */
1790
+ private humanFileSize;
1791
+ /** Derives a display name from a URL (last path segment). */
1792
+ private fileNameFromUrl;
1793
+ static ɵfac: i0.ɵɵFactoryDeclaration<MnFileInput, never>;
1794
+ static ɵcmp: i0.ɵɵComponentDeclaration<MnFileInput, "mn-lib-file-input", never, { "props": { "alias": "props"; "required": true; }; }, { "filesChange": "filesChange"; "cleared": "cleared"; }, never, never, true, never>;
1795
+ }
1796
+
1413
1797
  declare const mnCheckboxVariants: tailwind_variants.TVReturnType<{
1414
1798
  size: {
1415
1799
  xs: string;
@@ -2458,6 +2842,17 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
2458
2842
  * `isDataLoading` clears. `0` means no lock.
2459
2843
  */
2460
2844
  lockedMinHeight: number;
2845
+ /**
2846
+ * Measured pixel height of one full page, applied as a persistent `min-height` floor
2847
+ * while paginated so a short page (the last page, or after a row is removed/filtered)
2848
+ * can't collapse the body and jump the layout below it. Blank space fills the remaindernpm
2849
+ * at the bottom. Captured once a full page is actually on screen; `0` means unmeasured.
2850
+ * Distinct from the transient {@link lockedMinHeight} reload lock — both combine in
2851
+ * {@link bodyMinHeight} via `Math.max`.
2852
+ */
2853
+ fullPageHeight: number;
2854
+ /** Write-once guard so {@link fullPageHeight} is measured once per pageSize. */
2855
+ private pageHeightMeasured;
2461
2856
  protected readonly cdr: ChangeDetectorRef;
2462
2857
  protected readonly lang: MnLanguageService;
2463
2858
  /** Prefix used in validation error messages, e.g. `MnList`. Overridden by subclasses. */
@@ -2468,12 +2863,23 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
2468
2863
  private langSubscription?;
2469
2864
  /** Tracks the previous toolbar template reference for change detection. */
2470
2865
  private previousToolbarTemplate?;
2866
+ constructor();
2471
2867
  /** Whether the component delegates search to the consumer (server-side). */
2472
2868
  get isServerSearched(): boolean;
2473
2869
  get isPaginated(): boolean;
2474
2870
  /** Whether the component delegates pagination to the consumer (server-side). */
2475
2871
  get isServerPaginated(): boolean;
2476
2872
  get showLoadMore(): boolean;
2873
+ /**
2874
+ * The measured full-page {@link fullPageHeight} floor, but only while it should apply:
2875
+ * paginated, not loading, with rows present. Keeps a short page from collapsing the body.
2876
+ */
2877
+ get reservedPageHeight(): number;
2878
+ /**
2879
+ * `min-height` (px) applied to the body: the larger of the transient reload lock and the
2880
+ * persistent full-page floor, so neither can shrink the body below the other. `null` clears it.
2881
+ */
2882
+ get bodyMinHeight(): number | null;
2477
2883
  /** Total number of items, accounting for server-side pagination. */
2478
2884
  get totalItemCount(): number;
2479
2885
  get totalPages(): number;
@@ -2515,6 +2921,11 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
2515
2921
  * only locks when rows are present — the first load has nothing to preserve.
2516
2922
  */
2517
2923
  protected lockBodyHeight(): void;
2924
+ /**
2925
+ * Drops the cached {@link fullPageHeight} floor so it is re-measured on the next full page.
2926
+ * Must run whenever the page size changes (the old floor is for a different row count).
2927
+ */
2928
+ protected invalidatePageHeight(): void;
2518
2929
  protected applyPagination(): void;
2519
2930
  /** Client-side search filtering shared by list and grid. */
2520
2931
  protected applySearchFilter(items: T[]): T[];
@@ -3265,6 +3676,24 @@ type FileFieldConfig<TModel = unknown> = {
3265
3676
  maxSize?: number;
3266
3677
  /** Maximum number of files (when multiple is true) */
3267
3678
  maxFiles?: number;
3679
+ /** How the selection is displayed (default: 'dropzone') */
3680
+ displayMode?: 'dropzone' | 'thumbnail' | 'list' | 'compact';
3681
+ /** Hint shown inside the empty dropzone */
3682
+ dropzoneHint?: string;
3683
+ /** Label for the "choose/replace file" affordance */
3684
+ replaceLabel?: string;
3685
+ /** Accessible label for the per-file remove button */
3686
+ removeLabel?: string;
3687
+ /** URL of an already-saved image to preview when no new file is selected (single mode) */
3688
+ currentUrl?: string | null;
3689
+ /** URLs of already-saved images to preview when nothing is selected (multiple mode) */
3690
+ currentUrls?: string[] | null;
3691
+ /**
3692
+ * Called when the user removes an already-saved image (`currentUrl`/`currentUrls`).
3693
+ * The form value stays null; use this to record the removal intent (e.g. to send
3694
+ * a "clear image" instruction to the API on submit).
3695
+ */
3696
+ onClear?: () => void;
3268
3697
  validators?: ValidatorFn[];
3269
3698
  asyncValidators?: AsyncValidatorFn[];
3270
3699
  readOnly?: boolean;
@@ -3878,6 +4307,13 @@ type FormFieldView<TModel> = FormFieldConfig<TModel> & {
3878
4307
  unit?: string;
3879
4308
  accept?: string;
3880
4309
  multiple?: boolean;
4310
+ displayMode?: 'dropzone' | 'thumbnail' | 'list' | 'compact';
4311
+ dropzoneHint?: string;
4312
+ replaceLabel?: string;
4313
+ removeLabel?: string;
4314
+ currentUrl?: string | null;
4315
+ currentUrls?: string[] | null;
4316
+ onClear?: () => void;
3881
4317
  maxSize: number;
3882
4318
  maxFiles?: number;
3883
4319
  component: Type<unknown>;
@@ -3986,13 +4422,13 @@ declare class MnFormBodyComponent<TModel = unknown, TResult = TModel> implements
3986
4422
  private reloadDependentDataSources;
3987
4423
  getGridColumns(row: FormRow<TModel>): string;
3988
4424
  getGridSpan(rowField: FormRowField<TModel>): string;
3989
- /** Store selected files keyed by field key */
3990
- fileSelections: Record<string, File[]>;
3991
- onFileChange(field: FormFieldConfig<TModel>, event: Event): void;
3992
- removeFile(key: string, index: number): void;
3993
- getSelectedFiles(key: string): File[];
3994
- formatFileSize(bytes: number): string;
3995
- getFileError(field: FormFieldConfig<TModel>): string;
4425
+ /**
4426
+ * Invokes a FILE field's `onClear` callback when its existing image is removed.
4427
+ * FILE fields render {@link MnFileInput}, which owns selection/validation and
4428
+ * writes the value (`File | File[] | null`) straight to the form control.
4429
+ * @param field The field whose existing image was cleared.
4430
+ */
4431
+ onFileCleared(field: FormFieldConfig<TModel>): void;
3996
4432
  submit(): Promise<void>;
3997
4433
  static ɵfac: i0.ɵɵFactoryDeclaration<MnFormBodyComponent<any, any>, never>;
3998
4434
  static ɵcmp: i0.ɵɵComponentDeclaration<MnFormBodyComponent<any, any>, "mn-form-body", never, { "config": { "alias": "config"; "required": false; }; "modalRef": { "alias": "modalRef"; "required": false; }; "hideFooter": { "alias": "hideFooter"; "required": false; }; "hideCustomBody": { "alias": "hideCustomBody"; "required": false; }; }, { "formStatusChange": "formStatusChange"; }, never, never, true, never>;
@@ -5084,7 +5520,7 @@ declare const MN_ICON_MAP: Record<string, string>;
5084
5520
 
5085
5521
  declare class MnIconAttributes {
5086
5522
  static ɵfac: i0.ɵɵFactoryDeclaration<MnIconAttributes, never>;
5087
- static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconAttributes, "mn-icon[mnIconPistol], mn-icon[mnIconPending]", never, {}, {}, never, never, true, never>;
5523
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MnIconAttributes, "mn-icon[mnIconPistol], mn-icon[mnIconPending], mn-icon[mnIconImagePlus], mn-icon[mnIconUpload], mn-icon[mnIconFile], mn-icon[mnIconTrash2], mn-icon[mnIconX]", never, {}, {}, never, never, true, never>;
5088
5524
  }
5089
5525
 
5090
5526
  /**
@@ -5580,5 +6016,5 @@ type MnPreviewMessage = {
5580
6016
  */
5581
6017
  declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
5582
6018
 
5583
- export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDatetime, MnDualHorizontalImage, MnFormBodyComponent, MnGrid, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnSectionDirective, MnSelect, MnSelectableCollectionBase, MnShowAboveDirective, MnShowBelowDirective, MnSkeleton, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultTextAdapter, enableMnPreviewMode, isTranslatable, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig };
5584
- export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ColumnSkeleton, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DatetimeFieldConfig, FailureResult, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, GridDataSource, GridLayout, GridSkeleton, HourRow, ListAppearance, ListDataSource, ListLabels, ListSkeleton, MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnAlertVariants, MnBadgeTypes, MnBadgeVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnCollectionDataSource, MnCollectionLabels, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessageFn, MnErrorMessagesData, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPreviewMessage, MnQueryParams, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTextareaErrorMessageData, MnTextareaErrorMessagesData, MnTextareaProps, MnTextareaUIConfig, MnTextareaVariants, MnTranslatable, MnTranslationMap, MnTranslations, MnValidationErrorArgs, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MonthItem, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, OffsetPaginationStrategy, PaginationMode, PaginationStrategy, PasswordFieldConfig, Primitive, QueryParams, QueryValue, RatingFieldConfig, Result, ResultMeta, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, SortState, StepBodyConfig, StepGuard, StepValidator, SuccessResult, TableAppearance, TableDataSource, TableLabels, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };
6019
+ export { API_BASE_URL, ActionStyle, BackdropMode, BaseModalBuilder, CALENDAR_CONFIG, CALENDAR_DATE_FORMATTER, CalendarDayComponent, CalendarEventComponent, CalendarEventDefaultComponent, CalendarEventLayoutService, CalendarMonthComponent, CalendarUtility, CalendarView, CalendarViewComponent, CalendarWeekComponent, CloseMode, ColumnSortType, ConfirmationModalBuilder, ConfirmationTone, CrudService, CustomModalBuilder, DEFAULT_CALENDAR_CONFIG, DEFAULT_MN_ALERT_CONFIG, DefaultCalendarDateFormatter, FieldAppearance, FieldKind, FormLayoutMode, FormModalBuilder, KeyboardMode, MN_ALERT_CONFIG, MN_CALENDAR_COMPONENT_NAME, MN_CALENDAR_CONFIG, MN_CHECKBOX_CONFIG, MN_DATETIME_CONFIG, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDatetime, MnDualHorizontalImage, MnFileInput, MnFormBodyComponent, MnGrid, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnSectionDirective, MnSelect, MnSelectableCollectionBase, MnShowAboveDirective, MnShowBelowDirective, MnSkeleton, MnTabComponent, MnTable, MnTextarea, MnTranslatePipe, MnWizardBodyComponent, ModalBuilder, ModalCloseReason, ModalIntent, ModalKind, ModalSize, NavigationDirection, OptionState, SelectionMode, StepBuilder, StepState, SubmitMode, UpcomingEventRowComponent, UpcomingEventsComponent, ValidationCode, ValidationStatus, WizardFlowMode, WizardModalBuilder, dateTimeAdapter, defaultTextAdapter, enableMnPreviewMode, isTranslatable, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig };
6020
+ export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ColumnSkeleton, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DatetimeFieldConfig, FailureResult, FieldDataSource, FieldRequiredCondition, FieldValidator, FieldVisibilityCondition, FileFieldConfig, FormFieldConfig, FormFieldGroup, FormModalConfig, FormRow, FormRowField, FormValidator, GridDataSource, GridLayout, GridSkeleton, HourRow, ListAppearance, ListDataSource, ListLabels, ListSkeleton, MnAlert, MnAlertConfig, MnAlertId, MnAlertKind, MnAlertTemplateContext, MnAlertVariants, MnBadgeTypes, MnBadgeVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnCollectionDataSource, MnCollectionLabels, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessageFn, MnErrorMessagesData, MnFileDisplayItem, MnFileInputDisplayMode, MnFileInputErrorMessageData, MnFileInputErrorMessagesData, MnFileInputProps, MnFileInputUIConfig, MnFileInputVariants, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPreviewMessage, MnQueryParams, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTextareaErrorMessageData, MnTextareaErrorMessagesData, MnTextareaProps, MnTextareaUIConfig, MnTextareaVariants, MnTranslatable, MnTranslationMap, MnTranslations, MnValidationErrorArgs, ModalCancelHandler, ModalCloseEvent, ModalConfig, ModalFooterAction, ModalI18nLabels, ModalInputMap, ModalPollingConfig, ModalRef, ModalResultHandler, ModalStepId, MonthItem, MultiSelectFieldConfig, MultiSelectTableFieldConfig, NumberFieldConfig, OffsetPaginationStrategy, PaginationMode, PaginationStrategy, PasswordFieldConfig, Primitive, QueryParams, QueryValue, RatingFieldConfig, Result, ResultMeta, SelectFieldConfig, SelectOption, SingleSelectTableFieldConfig, SliderFieldConfig, SortState, StepBodyConfig, StepGuard, StepValidator, SuccessResult, TableAppearance, TableDataSource, TableLabels, TextFieldConfig, TextareaFieldConfig, ValidationResult, WizardBeforeCompleteValidator, WizardModalConfig, WizardResult, WizardStepChangeEvent, WizardStepChangeHandler, WizardStepConfig };