mn-angular-lib 1.0.135 → 1.0.137
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/fesm2022/mn-angular-lib.mjs +859 -428
- package/fesm2022/mn-angular-lib.mjs.map +1 -1
- package/package.json +8 -2
- package/src/lib/features/mn-rich-text-editor/mn-rich-text-editor.component.css +36 -0
- package/src/lib/styles/index.css +1 -0
- package/types/mn-angular-lib.d.ts +356 -108
- package/src/lib/features/mn-grid/mn-grid.component.css +0 -63
|
@@ -128,6 +128,13 @@ type MnAlertTemplateContext = {
|
|
|
128
128
|
dismiss: () => void;
|
|
129
129
|
};
|
|
130
130
|
declare class MnAlertOutletComponent {
|
|
131
|
+
private readonly lang;
|
|
132
|
+
/**
|
|
133
|
+
* Accessible name for this control. Resolved through the conventional
|
|
134
|
+
* `mnAlert.close` key so an app can translate it, falling back to English when the
|
|
135
|
+
* key is not defined rather than leaking the raw key into the UI.
|
|
136
|
+
*/
|
|
137
|
+
get closeLabel(): string;
|
|
131
138
|
template?: TemplateRef<MnAlertTemplateContext>;
|
|
132
139
|
private store;
|
|
133
140
|
alerts$: Observable<MnAlert[]>;
|
|
@@ -3243,6 +3250,21 @@ declare class MnLanguageService {
|
|
|
3243
3250
|
* Helper to retrieve a value from a potentially nested translation map using a dot-notated key.
|
|
3244
3251
|
*/
|
|
3245
3252
|
private getValueFromMap;
|
|
3253
|
+
/**
|
|
3254
|
+
* Translate a key **only if it is defined**, returning `undefined` otherwise.
|
|
3255
|
+
*
|
|
3256
|
+
* {@link translate} deliberately returns the key itself when it is missing, which
|
|
3257
|
+
* makes it unusable for a library's own default labels: a consumer that never
|
|
3258
|
+
* defined `mnCollection.rowsPerPage` would see that raw string in their UI. This
|
|
3259
|
+
* lets a caller try a conventional key and fall back to a readable English default
|
|
3260
|
+
* when the app has not translated it, so components ship translatable strings
|
|
3261
|
+
* without forcing every consumer to define them.
|
|
3262
|
+
*
|
|
3263
|
+
* @param key The dot-notated translation key.
|
|
3264
|
+
* @param params Optional `{{name}}` interpolation values.
|
|
3265
|
+
* @returns The translation, or `undefined` when the key is not defined.
|
|
3266
|
+
*/
|
|
3267
|
+
translateIfPresent(key: string, params?: Record<string, string | number>): string | undefined;
|
|
3246
3268
|
/**
|
|
3247
3269
|
* Shorthand alias for `translate`.
|
|
3248
3270
|
*/
|
|
@@ -3399,6 +3421,24 @@ declare abstract class MnCollectionBase<T, DS extends MnCollectionDataSource<T>>
|
|
|
3399
3421
|
* to keep the default (currently nothing).
|
|
3400
3422
|
*/
|
|
3401
3423
|
protected onRowsChanged(): void;
|
|
3424
|
+
/**
|
|
3425
|
+
* Resolves a label three ways, in order: the consumer's explicit key, a
|
|
3426
|
+
* conventional `mnCollection.*` key when the app defines one, and finally a
|
|
3427
|
+
* readable English default.
|
|
3428
|
+
*
|
|
3429
|
+
* The middle step is what makes the components translatable out of the box: an
|
|
3430
|
+
* app that adds the `mnCollection` namespace to its locale files gets every
|
|
3431
|
+
* table, list and grid translated at once, with no per-call-site wiring across
|
|
3432
|
+
* dozens of data sources. An app that does not keeps today's English text rather
|
|
3433
|
+
* than leaking raw keys into the UI.
|
|
3434
|
+
*
|
|
3435
|
+
* @param consumerKey The data source's own translation key, if it set one.
|
|
3436
|
+
* @param defaultKey The conventional key this label falls back to.
|
|
3437
|
+
* @param fallback The English text used when neither key resolves.
|
|
3438
|
+
* @param params Optional interpolation values.
|
|
3439
|
+
* @returns The resolved label.
|
|
3440
|
+
*/
|
|
3441
|
+
protected resolveLabel(consumerKey: string | undefined, defaultKey: string, fallback: string, params?: Record<string, string | number>): string;
|
|
3402
3442
|
/**
|
|
3403
3443
|
* Resolves translation keys to display strings via {@link MnLanguageService}.
|
|
3404
3444
|
* Subclasses override to resolve their own keys; call `super` to keep these.
|
|
@@ -3469,12 +3509,6 @@ declare abstract class MnSelectableCollectionBase<T, DS extends MnSelectableColl
|
|
|
3469
3509
|
* its ids matched a loaded row yet. See {@link beforeInitialFilter}.
|
|
3470
3510
|
*/
|
|
3471
3511
|
private pendingInitialEmit;
|
|
3472
|
-
/**
|
|
3473
|
-
* The ids that arrived pre-selected, kept apart from {@link selectedIds} so
|
|
3474
|
-
* {@link prioritizeInitialSelection} has a set that does **not** move as the user
|
|
3475
|
-
* clicks. Null when the collection opened with nothing selected.
|
|
3476
|
-
*/
|
|
3477
|
-
private pinnedSelectionIds;
|
|
3478
3512
|
/**
|
|
3479
3513
|
* Every selected row, in selection order, for the summary. Ids whose row was
|
|
3480
3514
|
* never seen are skipped rather than rendered as a bare id.
|
|
@@ -3484,6 +3518,15 @@ declare abstract class MnSelectableCollectionBase<T, DS extends MnSelectableColl
|
|
|
3484
3518
|
get showSelectionSummary(): boolean;
|
|
3485
3519
|
/** How many tags to show before collapsing the remainder. */
|
|
3486
3520
|
get selectionSummaryLimit(): number;
|
|
3521
|
+
/**
|
|
3522
|
+
* Tag count the summary collapses at when the data source names no limit.
|
|
3523
|
+
*
|
|
3524
|
+
* Subclasses that know their own width narrow this: the same eight tags that
|
|
3525
|
+
* read as a compact header on a wide table become seven stacked lines in a phone
|
|
3526
|
+
* sheet, pushing the rows they describe off screen. Overridden by
|
|
3527
|
+
* {@link MnCollectionDataSource.selectionSummaryLimit}.
|
|
3528
|
+
*/
|
|
3529
|
+
protected get defaultSelectionSummaryLimit(): number;
|
|
3487
3530
|
/**
|
|
3488
3531
|
* The tags to render: the first {@link selectionSummaryLimit} rows, or all of them
|
|
3489
3532
|
* once expanded. Keeps a large selection from turning the header into the page.
|
|
@@ -3517,23 +3560,6 @@ declare abstract class MnSelectableCollectionBase<T, DS extends MnSelectableColl
|
|
|
3517
3560
|
* @returns The label, or null when none can be derived.
|
|
3518
3561
|
*/
|
|
3519
3562
|
protected defaultSelectionLabel(_row: T): string | null;
|
|
3520
|
-
/**
|
|
3521
|
-
* Reorders rows so the ones that were already selected when the collection
|
|
3522
|
-
* opened come first, preserving the incoming order within each group.
|
|
3523
|
-
*
|
|
3524
|
-
* Deliberately keyed on the *initial* selection rather than the live one: pinning
|
|
3525
|
-
* what the user is currently ticking would make a row jump to the top the instant
|
|
3526
|
-
* it is clicked, moving the next row under the pointer mid-click. Freezing the set
|
|
3527
|
-
* answers the actual question — "what was already chosen?" — and leaves the list
|
|
3528
|
-
* still while it is being worked with. A row deselected during the session keeps
|
|
3529
|
-
* its place for the same reason.
|
|
3530
|
-
*
|
|
3531
|
-
* Callers apply this only when no explicit sort is active, so a sorted column
|
|
3532
|
-
* always wins.
|
|
3533
|
-
* @param items The rows in their current order.
|
|
3534
|
-
* @returns The rows with the initially-selected ones hoisted to the top.
|
|
3535
|
-
*/
|
|
3536
|
-
protected prioritizeInitialSelection(items: T[]): T[];
|
|
3537
3563
|
/** Seeds selection from `initialSelectedIds` before the first filter pass. */
|
|
3538
3564
|
protected beforeInitialFilter(): void;
|
|
3539
3565
|
/** Announces a deferred initial selection as soon as its rows are loaded. */
|
|
@@ -3566,6 +3592,7 @@ type MnPageSlot = {
|
|
|
3566
3592
|
* reacts to the outputs.
|
|
3567
3593
|
*/
|
|
3568
3594
|
declare class MnCollectionPagination {
|
|
3595
|
+
private readonly lang;
|
|
3569
3596
|
/** Prefix for the page-size select's id, keeping it unique per host. */
|
|
3570
3597
|
idPrefix: string;
|
|
3571
3598
|
isPaginated: boolean;
|
|
@@ -3594,17 +3621,61 @@ declare class MnCollectionPagination {
|
|
|
3594
3621
|
* e.g. page 5 of 50 → `1 … 4 5 6 … 50`
|
|
3595
3622
|
*/
|
|
3596
3623
|
get pageSlots(): MnPageSlot[];
|
|
3597
|
-
/** Wrapper classes for a slot: anchors and their gaps are md+ only. */
|
|
3598
|
-
slotVisibility(slot: MnPageSlot): string;
|
|
3599
3624
|
/** e.g. `Page 5 of 50`. */
|
|
3600
3625
|
get pageIndicatorLabel(): string;
|
|
3601
3626
|
/** e.g. `41–50 of 250`. */
|
|
3602
3627
|
get itemRangeLabel(): string;
|
|
3628
|
+
/** "Items per page" label beside the page-size selector. */
|
|
3629
|
+
get rowsPerPageLabel(): string;
|
|
3603
3630
|
/**
|
|
3604
3631
|
* Substitutes `{{name}}` placeholders, matching the interpolation syntax used
|
|
3605
3632
|
* by MnLanguageService so the same translation strings work either way.
|
|
3606
3633
|
*/
|
|
3607
3634
|
private fill;
|
|
3635
|
+
/** Label for the load-more button. */
|
|
3636
|
+
get loadMoreLabel(): string;
|
|
3637
|
+
/** Accessible label for the first-page control. */
|
|
3638
|
+
get firstPageLabel(): string;
|
|
3639
|
+
/** Accessible label for the previous-page control. */
|
|
3640
|
+
get previousPageLabel(): string;
|
|
3641
|
+
/** Accessible label for the next-page control. */
|
|
3642
|
+
get nextPageLabel(): string;
|
|
3643
|
+
/** Accessible label for the last-page control. */
|
|
3644
|
+
get lastPageLabel(): string;
|
|
3645
|
+
/**
|
|
3646
|
+
* Wrapper classes for one slot in the page strip, shrinking it in two steps as
|
|
3647
|
+
* the footer narrows. Container queries, so the measurement is the footer's own
|
|
3648
|
+
* width — the same strip is wide on a page and cramped in a modal.
|
|
3649
|
+
*
|
|
3650
|
+
* The first/last anchors and their gaps drop below 640px, where « and » already
|
|
3651
|
+
* jump to either end. Below 380px every number except the current one drops too:
|
|
3652
|
+
* the strip would otherwise wrap onto a second line and push the footer over the
|
|
3653
|
+
* table, and the "Page 3 of 9" readout beside it already says where the user is.
|
|
3654
|
+
* The arrows survive both steps, so navigation never depends on a number.
|
|
3655
|
+
*/
|
|
3656
|
+
slotVisibility(slot: MnPageSlot): string;
|
|
3657
|
+
/**
|
|
3658
|
+
* Accessible label for a page-number button.
|
|
3659
|
+
* @param page The page the button jumps to.
|
|
3660
|
+
* @returns The label, naming the page.
|
|
3661
|
+
*/
|
|
3662
|
+
pageLabel(page: number): string;
|
|
3663
|
+
/**
|
|
3664
|
+
* Resolves a label three ways, in order: the consumer's explicit text, the
|
|
3665
|
+
* conventional `mnCollection.*` key when the app defines one, and finally a
|
|
3666
|
+
* readable English default.
|
|
3667
|
+
*
|
|
3668
|
+
* Mirrors `MnCollectionBase.resolveLabel`; this component is presentational and
|
|
3669
|
+
* does not extend that base, but its chrome must be just as translatable — the
|
|
3670
|
+
* page-size label and the item-range readout are on screen for every paged
|
|
3671
|
+
* collection in the app.
|
|
3672
|
+
*
|
|
3673
|
+
* @param explicit The label the host passed in, if any.
|
|
3674
|
+
* @param key The conventional translation key to try.
|
|
3675
|
+
* @param fallback The English text used when neither resolves.
|
|
3676
|
+
* @returns The resolved label.
|
|
3677
|
+
*/
|
|
3678
|
+
private label;
|
|
3608
3679
|
static ɵfac: i0.ɵɵFactoryDeclaration<MnCollectionPagination, never>;
|
|
3609
3680
|
static ɵcmp: i0.ɵɵComponentDeclaration<MnCollectionPagination, "mn-collection-pagination", never, { "idPrefix": { "alias": "idPrefix"; "required": false; }; "isPaginated": { "alias": "isPaginated"; "required": false; }; "isServerPaginated": { "alias": "isServerPaginated"; "required": false; }; "showLoadMore": { "alias": "showLoadMore"; "required": false; }; "loadingMoreRows": { "alias": "loadingMoreRows"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalPages": { "alias": "totalPages"; "required": false; }; "totalItemCount": { "alias": "totalItemCount"; "required": false; }; "visiblePages": { "alias": "visiblePages"; "required": false; }; "pageSizeSelectOptions": { "alias": "pageSizeSelectOptions"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; }, { "loadMore": "loadMore"; "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, never, never, true, never>;
|
|
3610
3681
|
}
|
|
@@ -3656,29 +3727,14 @@ type TableAppearance = {
|
|
|
3656
3727
|
* - `select` → `string` (single choice; empty string means "no filter")
|
|
3657
3728
|
* - `multi-select` → `string[]` (OR semantics across the chosen values)
|
|
3658
3729
|
* - `boolean` → `boolean` (tri-state: any / true / false)
|
|
3659
|
-
* - `number-range` → {@link NumberRangeFilterValue}
|
|
3660
|
-
* - `date-range` → {@link DateRangeFilterValue}
|
|
3661
3730
|
*/
|
|
3662
|
-
type ColumnFilterType = 'text' | 'select' | 'multi-select' | 'boolean'
|
|
3731
|
+
type ColumnFilterType = 'text' | 'select' | 'multi-select' | 'boolean';
|
|
3663
3732
|
type ColumnFilterOption = {
|
|
3664
3733
|
label: string;
|
|
3665
3734
|
value: string;
|
|
3666
3735
|
};
|
|
3667
|
-
/** Inclusive numeric bounds; either side may be omitted for an open-ended range. */
|
|
3668
|
-
type NumberRangeFilterValue = {
|
|
3669
|
-
min?: number;
|
|
3670
|
-
max?: number;
|
|
3671
|
-
};
|
|
3672
|
-
/**
|
|
3673
|
-
* Inclusive date bounds as `YYYY-MM-DD` strings (the format the underlying
|
|
3674
|
-
* date control emits); either side may be omitted for an open-ended range.
|
|
3675
|
-
*/
|
|
3676
|
-
type DateRangeFilterValue = {
|
|
3677
|
-
from?: string;
|
|
3678
|
-
to?: string;
|
|
3679
|
-
};
|
|
3680
3736
|
/** Every value shape a column filter can hold, discriminated by {@link ColumnFilterType}. */
|
|
3681
|
-
type ColumnFilterValue = string | string[] | boolean
|
|
3737
|
+
type ColumnFilterValue = string | string[] | boolean;
|
|
3682
3738
|
/** Map of column key to its current filter value. */
|
|
3683
3739
|
type ColumnFilterState = Record<string, ColumnFilterValue | undefined>;
|
|
3684
3740
|
/**
|
|
@@ -3760,16 +3816,6 @@ type ColumnFilterConfig<T> = (ColumnFilterCommon & {
|
|
|
3760
3816
|
filterOptions?: never;
|
|
3761
3817
|
/** Custom predicate. Receives the row and the chosen true/false state. */
|
|
3762
3818
|
filterFn?: (row: T, filterValue: boolean) => boolean;
|
|
3763
|
-
}) | (ColumnFilterCommon & {
|
|
3764
|
-
filterType: 'number-range';
|
|
3765
|
-
filterOptions?: never;
|
|
3766
|
-
/** Custom predicate. Receives the row and the inclusive numeric bounds. */
|
|
3767
|
-
filterFn?: (row: T, filterValue: NumberRangeFilterValue) => boolean;
|
|
3768
|
-
}) | (ColumnFilterCommon & {
|
|
3769
|
-
filterType: 'date-range';
|
|
3770
|
-
filterOptions?: never;
|
|
3771
|
-
/** Custom predicate. Receives the row and the inclusive `YYYY-MM-DD` bounds. */
|
|
3772
|
-
filterFn?: (row: T, filterValue: DateRangeFilterValue) => boolean;
|
|
3773
3819
|
}) | {
|
|
3774
3820
|
filterable?: false;
|
|
3775
3821
|
filterType?: never;
|
|
@@ -3827,18 +3873,6 @@ type TableDataSource<T> = MnSelectableCollectionDataSource<T> & {
|
|
|
3827
3873
|
* every locale change.
|
|
3828
3874
|
*/
|
|
3829
3875
|
type MnTableFilterLabels = {
|
|
3830
|
-
/** Lower bound of a number range. Defaults to "Min". */
|
|
3831
|
-
min?: string;
|
|
3832
|
-
minKey?: string;
|
|
3833
|
-
/** Upper bound of a number range. Defaults to "Max". */
|
|
3834
|
-
max?: string;
|
|
3835
|
-
maxKey?: string;
|
|
3836
|
-
/** Start of a date range. Defaults to "From". */
|
|
3837
|
-
from?: string;
|
|
3838
|
-
fromKey?: string;
|
|
3839
|
-
/** End of a date range. Defaults to "To". */
|
|
3840
|
-
to?: string;
|
|
3841
|
-
toKey?: string;
|
|
3842
3876
|
/** Unset option of a boolean filter. Defaults to "Any". */
|
|
3843
3877
|
any?: string;
|
|
3844
3878
|
anyKey?: string;
|
|
@@ -3861,8 +3895,6 @@ type MnTableFilterLabels = {
|
|
|
3861
3895
|
/** @deprecated Use {@link MnCollectionLabels}. */
|
|
3862
3896
|
type TableLabels = MnCollectionLabels;
|
|
3863
3897
|
|
|
3864
|
-
/** Which bound of a range filter an input edits. */
|
|
3865
|
-
type RangeBound = 'min' | 'max' | 'from' | 'to';
|
|
3866
3898
|
declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDataSource<T>> {
|
|
3867
3899
|
sortChange: EventEmitter<SortState | null>;
|
|
3868
3900
|
rowClick: EventEmitter<T>;
|
|
@@ -3871,8 +3903,6 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
3871
3903
|
columnFilters: ColumnFilterState;
|
|
3872
3904
|
/** Viewport width (px) below which the inline filter row collapses into a panel. */
|
|
3873
3905
|
private static readonly FILTER_COLLAPSE_WIDTH;
|
|
3874
|
-
/** Bounds rendered by a number-range filter, in input order. */
|
|
3875
|
-
protected readonly numberBounds: RangeBound[];
|
|
3876
3906
|
/**
|
|
3877
3907
|
* True when the viewport is narrow enough that the per-column filter inputs no
|
|
3878
3908
|
* longer fit under their headers; the inline row is then replaced by a toggle
|
|
@@ -3884,8 +3914,6 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
3884
3914
|
protected readonly componentName = "MnTable";
|
|
3885
3915
|
protected get trackedToolbarTemplate(): TemplateRef<unknown> | undefined;
|
|
3886
3916
|
protected collectionBody?: ElementRef<HTMLElement>;
|
|
3887
|
-
/** Bounds rendered by a date-range filter, in input order. */
|
|
3888
|
-
protected readonly dateBounds: RangeBound[];
|
|
3889
3917
|
/** Debounces server-side text filters so typing doesn't fire a request per keystroke. */
|
|
3890
3918
|
private readonly filterDebounce;
|
|
3891
3919
|
/**
|
|
@@ -3914,8 +3942,6 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
3914
3942
|
* every other type commits immediately.
|
|
3915
3943
|
*/
|
|
3916
3944
|
onColumnFilter(column: ColumnDefinition<T>, value: ColumnFilterValue): void;
|
|
3917
|
-
/** Updates one bound of a range filter, leaving the other side untouched. */
|
|
3918
|
-
onRangeFilter(column: ColumnDefinition<T>, bound: RangeBound, raw: string): void;
|
|
3919
3945
|
/** Updates a tri-state boolean filter from its select ('' = any). */
|
|
3920
3946
|
onBooleanFilter(column: ColumnDefinition<T>, raw: string): void;
|
|
3921
3947
|
/** The effective filter type of a column, defaulting to text. */
|
|
@@ -3924,33 +3950,29 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
3924
3950
|
isColumnFilterActive(column: ColumnDefinition<T>): boolean;
|
|
3925
3951
|
/** Filter options formatted for mn-multi-select for a given column. */
|
|
3926
3952
|
getFilterMultiSelectOptions(column: ColumnDefinition<T>): MnMultiSelectOption<string>[];
|
|
3927
|
-
/**
|
|
3928
|
-
|
|
3929
|
-
/**
|
|
3930
|
-
|
|
3953
|
+
/** Label for the small-screen filters toggle button. */
|
|
3954
|
+
get filtersButtonLabel(): string;
|
|
3955
|
+
/**
|
|
3956
|
+
* Summary a multi-select filter collapses to once more than one option is picked.
|
|
3957
|
+
* Resolved with the `{count}` token intact for mn-multi-select to fill in.
|
|
3958
|
+
*/
|
|
3959
|
+
get filterSelectedLabel(): string;
|
|
3931
3960
|
/** Current text/select filter value for a column. */
|
|
3932
3961
|
textFilterValue(column: ColumnDefinition<T>): string;
|
|
3933
3962
|
/** Current multi-select filter value for a column. */
|
|
3934
3963
|
multiFilterValue(column: ColumnDefinition<T>): string[];
|
|
3935
3964
|
/** Current boolean filter value for a column, as the select's string value. */
|
|
3936
3965
|
booleanFilterValue(column: ColumnDefinition<T>): string;
|
|
3937
|
-
/** Current value of one bound of a range filter, as an input-ready string. */
|
|
3938
|
-
rangeFilterValue(column: ColumnDefinition<T>, bound: RangeBound): string;
|
|
3939
|
-
/** Label for a range filter bound, falling back to the English default. */
|
|
3940
|
-
rangeBoundLabel(bound: RangeBound): string;
|
|
3941
3966
|
/** Resets every column filter and re-applies (or re-requests) filtering. */
|
|
3942
3967
|
clearAllFilters(): void;
|
|
3943
3968
|
/** Whether any column has filtering enabled. */
|
|
3944
3969
|
get hasColumnFilters(): boolean;
|
|
3945
|
-
/** Label for the small-screen filters toggle button. */
|
|
3946
|
-
get filtersButtonLabel(): string;
|
|
3947
|
-
/**
|
|
3948
|
-
* Summary a multi-select filter collapses to once more than one option is picked.
|
|
3949
|
-
* Resolved with the `{count}` token intact for mn-multi-select to fill in.
|
|
3950
|
-
*/
|
|
3951
|
-
get filterSelectedLabel(): string;
|
|
3952
3970
|
/** Label for the "clear all filters" action in the small-screen panel. */
|
|
3953
3971
|
get clearFiltersButtonLabel(): string;
|
|
3972
|
+
/** Heading for the selection summary, with the count filled in. */
|
|
3973
|
+
get selectionSummaryTitle(): string;
|
|
3974
|
+
/** Label for the summary's clear-everything action. */
|
|
3975
|
+
get selectionClearAllLabel(): string;
|
|
3954
3976
|
/** Opens/closes the stacked filter panel shown on small screens. */
|
|
3955
3977
|
toggleFiltersPanel(): void;
|
|
3956
3978
|
private readonly baseTableClasses;
|
|
@@ -3993,18 +4015,23 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
3993
4015
|
get tableClasses(): string;
|
|
3994
4016
|
/** Page size to use at/above the `md` breakpoint (consumer's pageSize, or the user's selection). */
|
|
3995
4017
|
private desktopPageSize;
|
|
3996
|
-
/** Heading for the selection summary, with the count filled in. */
|
|
3997
|
-
get selectionSummaryTitle(): string;
|
|
3998
|
-
/** Label for the summary's clear-everything action. */
|
|
3999
|
-
get selectionClearAllLabel(): string;
|
|
4000
4018
|
/** Label for the summary's expand/collapse control. */
|
|
4001
4019
|
get selectionSummaryToggleLabel(): string;
|
|
4002
|
-
/**
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4020
|
+
/** Placeholder and accessible name for the search box. */
|
|
4021
|
+
get searchPlaceholderLabel(): string;
|
|
4022
|
+
/** Accessible name for the scrollable table region. */
|
|
4023
|
+
get tableRegionLabel(): string;
|
|
4024
|
+
/**
|
|
4025
|
+
* Fewer tags once the table is narrow. A tag holding a person's full name takes
|
|
4026
|
+
* a whole line at phone width, so the eight that read as a compact header on a
|
|
4027
|
+
* wide table become eight stacked lines in a modal sheet — the summary then
|
|
4028
|
+
* occupies more of the screen than the rows it is summarising.
|
|
4029
|
+
*
|
|
4030
|
+
* Reuses {@link filtersCollapsed} rather than measuring again: it is already
|
|
4031
|
+
* maintained on every resize and means exactly "this table is under 640px".
|
|
4032
|
+
* The heading still states the true total, so the hidden tags cost no information.
|
|
4006
4033
|
*/
|
|
4007
|
-
|
|
4034
|
+
protected get defaultSelectionSummaryLimit(): number;
|
|
4008
4035
|
/** Tracks the desktop page size when the user picks one (selector only shows at >= md). */
|
|
4009
4036
|
onPageSizeChange(newSize: number): void;
|
|
4010
4037
|
/** The effective column-width strategy, defaulting to `stable`. */
|
|
@@ -4016,6 +4043,8 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
4016
4043
|
* it sits in could still have grown to fit it.
|
|
4017
4044
|
*/
|
|
4018
4045
|
get widthsArePinned(): boolean;
|
|
4046
|
+
/** Any / Yes / No options for a boolean column filter. */
|
|
4047
|
+
getBooleanFilterOptions(column: ColumnDefinition<T>): MnSelectOption<string>[];
|
|
4019
4048
|
/**
|
|
4020
4049
|
* The width to render for a column: the consumer's own declared width always
|
|
4021
4050
|
* wins, then a width pinned by the `stable` layout, otherwise none.
|
|
@@ -4132,6 +4161,14 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
4132
4161
|
/** Resolves the range / boolean filter control labels from their translation keys. */
|
|
4133
4162
|
private resolveFilterLabelKeys;
|
|
4134
4163
|
private applySorting;
|
|
4164
|
+
/** Filter options formatted for mn-select for a given column. */
|
|
4165
|
+
getFilterSelectOptions(column: ColumnDefinition<T>): MnSelectOption<string>[];
|
|
4166
|
+
/**
|
|
4167
|
+
* Accessible label for a tag's remove button.
|
|
4168
|
+
* @param row The row the tag stands for.
|
|
4169
|
+
* @returns The label, naming the row so screen readers announce which one goes.
|
|
4170
|
+
*/
|
|
4171
|
+
selectionRemoveLabel(row: T): string;
|
|
4135
4172
|
static ɵfac: i0.ɵɵFactoryDeclaration<MnTable<any>, never>;
|
|
4136
4173
|
static ɵcmp: i0.ɵɵComponentDeclaration<MnTable<any>, "mn-table", never, {}, { "sortChange": "sortChange"; "rowClick": "rowClick"; }, never, never, true, never>;
|
|
4137
4174
|
}
|
|
@@ -4146,10 +4183,10 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
4146
4183
|
/** The reset/unset value for a filter type. */
|
|
4147
4184
|
declare function emptyFilterValue(type: ColumnFilterType): ColumnFilterValue;
|
|
4148
4185
|
/**
|
|
4149
|
-
* Whether a filter value should actually narrow the rows. Empty strings
|
|
4150
|
-
* arrays
|
|
4151
|
-
*
|
|
4152
|
-
*
|
|
4186
|
+
* Whether a filter value should actually narrow the rows. Empty strings and
|
|
4187
|
+
* empty arrays are inactive; `false` on a boolean filter is active (it means
|
|
4188
|
+
* "show only the false rows"), which is why a plain truthiness check is not
|
|
4189
|
+
* enough.
|
|
4153
4190
|
*/
|
|
4154
4191
|
declare function isFilterValueActive(value: ColumnFilterValue | undefined): boolean;
|
|
4155
4192
|
/**
|
|
@@ -4165,11 +4202,6 @@ declare function resolveFilterableValue<T>(column: ColumnDefinition<T>, row: T):
|
|
|
4165
4202
|
* - `select` — exact string equality
|
|
4166
4203
|
* - `multi-select` — equality against any selected value (OR)
|
|
4167
4204
|
* - `boolean` — truthiness of the raw value equals the chosen state
|
|
4168
|
-
* - `number-range` / `date-range` — inclusive bounds, each side optional
|
|
4169
|
-
*
|
|
4170
|
-
* A row whose raw value cannot be interpreted for the type (a non-numeric value
|
|
4171
|
-
* under a number range, an unparsable date) is excluded rather than kept, so an
|
|
4172
|
-
* active filter never silently passes rows it cannot evaluate.
|
|
4173
4205
|
*/
|
|
4174
4206
|
declare function defaultFilterPredicate(type: ColumnFilterType, raw: unknown, value: ColumnFilterValue): boolean;
|
|
4175
4207
|
/**
|
|
@@ -5363,6 +5395,13 @@ declare class MnModalService {
|
|
|
5363
5395
|
}
|
|
5364
5396
|
|
|
5365
5397
|
declare class MnModalShellComponent<TResult = unknown> implements OnInit, AfterViewInit, OnDestroy {
|
|
5398
|
+
private readonly lang;
|
|
5399
|
+
/**
|
|
5400
|
+
* Accessible name for this control. Resolved through the conventional
|
|
5401
|
+
* `mnModal.close` key so an app can translate it, falling back to English when the
|
|
5402
|
+
* key is not defined rather than leaking the raw key into the UI.
|
|
5403
|
+
*/
|
|
5404
|
+
get closeModalLabel(): string;
|
|
5366
5405
|
private el;
|
|
5367
5406
|
private cdr;
|
|
5368
5407
|
/** Downward release speed (px/ms) above which a short drag still dismisses — a "flick".
|
|
@@ -5876,6 +5915,8 @@ declare class MnList<T = unknown> extends MnSelectableCollectionBase<T, ListData
|
|
|
5876
5915
|
protected get trackedToolbarTemplate(): TemplateRef<unknown> | undefined;
|
|
5877
5916
|
protected collectionBody?: ElementRef<HTMLElement>;
|
|
5878
5917
|
protected applyFilter(searchForItems: boolean): void;
|
|
5918
|
+
/** Accessible name for the scrollable list region. */
|
|
5919
|
+
get listRegionLabel(): string;
|
|
5879
5920
|
static ɵfac: i0.ɵɵFactoryDeclaration<MnList<any>, never>;
|
|
5880
5921
|
static ɵcmp: i0.ɵɵComponentDeclaration<MnList<any>, "mn-list", never, {}, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
5881
5922
|
}
|
|
@@ -5888,7 +5929,10 @@ declare class MnList<T = unknown> extends MnSelectableCollectionBase<T, ListData
|
|
|
5888
5929
|
* Breakpoints match Tailwind defaults: sm 640px, md 768px, lg 1024px, xl 1280px.
|
|
5889
5930
|
*/
|
|
5890
5931
|
type GridLayout = {
|
|
5891
|
-
/**
|
|
5932
|
+
/**
|
|
5933
|
+
* Explicit column count per breakpoint. Each falls back to the next-smaller one.
|
|
5934
|
+
* Counts are clamped to 1–12, the range Tailwind's `grid-cols-*` utilities cover.
|
|
5935
|
+
*/
|
|
5892
5936
|
cols?: {
|
|
5893
5937
|
base?: number;
|
|
5894
5938
|
sm?: number;
|
|
@@ -5956,6 +6000,20 @@ declare class MnGrid<T = unknown> extends MnCollectionBase<T, GridDataSource<T>>
|
|
|
5956
6000
|
protected readonly componentName = "MnGrid";
|
|
5957
6001
|
/** Whether the grid uses auto-fit (minCardWidth) instead of explicit columns. */
|
|
5958
6002
|
get isAutoLayout(): boolean;
|
|
6003
|
+
/**
|
|
6004
|
+
* Classes for the card container: `grid` plus one column utility per
|
|
6005
|
+
* breakpoint the consumer configured. Omitted for the auto-fit layout, whose
|
|
6006
|
+
* columns come from {@link autoTemplateColumns} instead.
|
|
6007
|
+
*/
|
|
6008
|
+
get gridClasses(): string;
|
|
6009
|
+
/** Gap between cards. */
|
|
6010
|
+
get gridGap(): string;
|
|
6011
|
+
/**
|
|
6012
|
+
* Inline `grid-template-columns` for the auto-fit layout, or null when explicit
|
|
6013
|
+
* `cols` are used (the utilities in {@link gridClasses} then own the columns).
|
|
6014
|
+
* `minCardWidth` is a free-form CSS length, so it can only be expressed inline.
|
|
6015
|
+
*/
|
|
6016
|
+
get autoTemplateColumns(): string | null;
|
|
5959
6017
|
/** Skeleton lines for the default/lines placeholder; null when a custom template is used. */
|
|
5960
6018
|
get skeletonLines(): Partial<MnSkeletonProps>[];
|
|
5961
6019
|
/**
|
|
@@ -5967,6 +6025,10 @@ declare class MnGrid<T = unknown> extends MnCollectionBase<T, GridDataSource<T>>
|
|
|
5967
6025
|
protected collectionBody?: ElementRef<HTMLElement>;
|
|
5968
6026
|
onItemClick(item: T): void;
|
|
5969
6027
|
protected applyFilter(searchForItems: boolean): void;
|
|
6028
|
+
/** Accessible name for the scrollable grid region. */
|
|
6029
|
+
get gridRegionLabel(): string;
|
|
6030
|
+
/** Accessible name for the loading placeholder. */
|
|
6031
|
+
get loadingLabel(): string;
|
|
5970
6032
|
static ɵfac: i0.ɵɵFactoryDeclaration<MnGrid<any>, never>;
|
|
5971
6033
|
static ɵcmp: i0.ɵɵComponentDeclaration<MnGrid<any>, "mn-grid", never, {}, { "itemClick": "itemClick"; }, never, never, true, never>;
|
|
5972
6034
|
}
|
|
@@ -6226,6 +6288,12 @@ type MonthItem = {
|
|
|
6226
6288
|
* ```
|
|
6227
6289
|
*/
|
|
6228
6290
|
declare class CalendarViewComponent implements OnInit, OnDestroy {
|
|
6291
|
+
/**
|
|
6292
|
+
* Accessible name for this control. Resolved through the conventional
|
|
6293
|
+
* `mnCalendar.calendarView` key so an app can translate it, falling back to English when the
|
|
6294
|
+
* key is not defined rather than leaking the raw key into the UI.
|
|
6295
|
+
*/
|
|
6296
|
+
get calendarViewLabel(): string;
|
|
6229
6297
|
/** Whether to show the action button in the toolbar. */
|
|
6230
6298
|
showButton: boolean;
|
|
6231
6299
|
/** Label text for the action button. */
|
|
@@ -6323,6 +6391,13 @@ type DisplayHourRow$1 = {
|
|
|
6323
6391
|
* so they appear side-by-side rather than stacked.
|
|
6324
6392
|
*/
|
|
6325
6393
|
declare class CalendarWeekComponent implements OnInit, OnDestroy {
|
|
6394
|
+
private readonly lang;
|
|
6395
|
+
/**
|
|
6396
|
+
* Accessible name for this control. Resolved through the conventional
|
|
6397
|
+
* `mnCalendar.weekView` key so an app can translate it, falling back to English when the
|
|
6398
|
+
* key is not defined rather than leaking the raw key into the UI.
|
|
6399
|
+
*/
|
|
6400
|
+
get weekViewLabel(): string;
|
|
6326
6401
|
private layoutService;
|
|
6327
6402
|
private cdr;
|
|
6328
6403
|
/** The date around which the week is centred. */
|
|
@@ -6393,6 +6468,13 @@ type DisplayHourRow = {
|
|
|
6393
6468
|
* {@link CalendarEventLayoutService}.
|
|
6394
6469
|
*/
|
|
6395
6470
|
declare class CalendarDayComponent implements OnInit, OnDestroy {
|
|
6471
|
+
private readonly lang;
|
|
6472
|
+
/**
|
|
6473
|
+
* Accessible name for this control. Resolved through the conventional
|
|
6474
|
+
* `mnCalendar.dayView` key so an app can translate it, falling back to English when the
|
|
6475
|
+
* key is not defined rather than leaking the raw key into the UI.
|
|
6476
|
+
*/
|
|
6477
|
+
get dayViewLabel(): string;
|
|
6396
6478
|
private layoutService;
|
|
6397
6479
|
private cdr;
|
|
6398
6480
|
/** The date to display. */
|
|
@@ -6452,6 +6534,13 @@ declare class CalendarDayComponent implements OnInit, OnDestroy {
|
|
|
6452
6534
|
* events on that day. Clicking a cell emits `dayClicked`.
|
|
6453
6535
|
*/
|
|
6454
6536
|
declare class CalendarMonthComponent implements OnInit, OnDestroy {
|
|
6537
|
+
private readonly lang;
|
|
6538
|
+
/**
|
|
6539
|
+
* Accessible name for this control. Resolved through the conventional
|
|
6540
|
+
* `mnCalendar.monthView` key so an app can translate it, falling back to English when the
|
|
6541
|
+
* key is not defined rather than leaking the raw key into the UI.
|
|
6542
|
+
*/
|
|
6543
|
+
get monthViewLabel(): string;
|
|
6455
6544
|
/** The date whose month is displayed. */
|
|
6456
6545
|
focusDay: Date;
|
|
6457
6546
|
/** Observable that emits the full event list whenever it changes. */
|
|
@@ -6539,6 +6628,13 @@ declare class CalendarEventDefaultComponent implements CalendarEventData, OnInit
|
|
|
6539
6628
|
* (events whose end time is in the future), sorted by start time.
|
|
6540
6629
|
*/
|
|
6541
6630
|
declare class UpcomingEventsComponent implements OnInit, OnChanges, OnDestroy {
|
|
6631
|
+
private readonly lang;
|
|
6632
|
+
/**
|
|
6633
|
+
* Accessible name for this control. Resolved through the conventional
|
|
6634
|
+
* `mnCalendar.upcomingEvents` key so an app can translate it, falling back to English when the
|
|
6635
|
+
* key is not defined rather than leaking the raw key into the UI.
|
|
6636
|
+
*/
|
|
6637
|
+
get upcomingEventsLabel(): string;
|
|
6542
6638
|
/** Observable that emits the full event list whenever it changes. */
|
|
6543
6639
|
eventsChanged: Observable<CalendarEvent[]>;
|
|
6544
6640
|
/** Resolved calendar configuration passed from the parent view. */
|
|
@@ -6840,6 +6936,158 @@ declare class MnTabComponent implements DoCheck, AfterViewInit, OnDestroy {
|
|
|
6840
6936
|
static ɵcmp: i0.ɵɵComponentDeclaration<MnTabComponent, "mn-tab", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "scrollable": { "alias": "scrollable"; "required": false; }; "justified": { "alias": "justified"; "required": false; }; }, { "activeChange": "activeChange"; }, never, never, true, never>;
|
|
6841
6937
|
}
|
|
6842
6938
|
|
|
6939
|
+
/**
|
|
6940
|
+
* One control on the editor's default toolbar.
|
|
6941
|
+
*
|
|
6942
|
+
* The list doubles as the key space for {@link MnRichTextEditorLabels}: a label
|
|
6943
|
+
* can only be given for a control the default toolbar actually renders.
|
|
6944
|
+
*/
|
|
6945
|
+
type MnRichTextEditorControl = 'textStyle' | 'bold' | 'italic' | 'underline' | 'strike' | 'orderedList' | 'bulletList' | 'blockquote' | 'codeBlock' | 'link' | 'clean';
|
|
6946
|
+
/**
|
|
6947
|
+
* Hover labels for the toolbar controls.
|
|
6948
|
+
*
|
|
6949
|
+
* Values are either literal text (`labels`) or translation keys resolved through
|
|
6950
|
+
* `MnLanguageService` (`labelKeys`); anything left out falls back to the
|
|
6951
|
+
* component's built-in English label.
|
|
6952
|
+
*/
|
|
6953
|
+
type MnRichTextEditorLabels = Partial<Record<MnRichTextEditorControl, string>>;
|
|
6954
|
+
/**
|
|
6955
|
+
* A Quill toolbar definition: rows of control descriptors, exactly as Quill's
|
|
6956
|
+
* `modules.toolbar` option takes them.
|
|
6957
|
+
*
|
|
6958
|
+
* Typed loosely on purpose — Quill accepts strings (`'bold'`) and objects
|
|
6959
|
+
* (`{ header: [2, 3, false] }`) in the same row, and the library does not export
|
|
6960
|
+
* a type for it.
|
|
6961
|
+
*/
|
|
6962
|
+
type MnRichTextEditorToolbar = readonly (readonly unknown[])[];
|
|
6963
|
+
|
|
6964
|
+
/**
|
|
6965
|
+
* Thin wrapper around the {@link Quill} rich-text editor.
|
|
6966
|
+
*
|
|
6967
|
+
* Quill is used **directly** rather than through an Angular wrapper package: the
|
|
6968
|
+
* wrapper libraries carry peer-dependency ranges that lag behind Angular's
|
|
6969
|
+
* release train, and none of them add anything this component needs.
|
|
6970
|
+
*
|
|
6971
|
+
* Consumers must install `quill` themselves (it is an optional peer dependency)
|
|
6972
|
+
* and load its snow theme, e.g. `node_modules/quill/dist/quill.snow.css` in the
|
|
6973
|
+
* `styles` array of `angular.json`. Only the chrome around that theme — radius,
|
|
6974
|
+
* borders, height limits and the toolbar tooltips — belongs to this component;
|
|
6975
|
+
* recolouring Quill's own palette to an app theme stays with the app, because
|
|
6976
|
+
* the same `.ql-snow` markup is normally reused to render stored HTML in places
|
|
6977
|
+
* where no editor is mounted.
|
|
6978
|
+
*
|
|
6979
|
+
* Quill itself is pulled in with a dynamic `import()` when the editor mounts.
|
|
6980
|
+
* This component sits in the library's single entry point, which apps import
|
|
6981
|
+
* eagerly, so a static import would put the whole editor engine in every app's
|
|
6982
|
+
* initial bundle — including the pages that never open one.
|
|
6983
|
+
*
|
|
6984
|
+
* Zoneless notes: nothing here relies on an implicit change-detection tick. The
|
|
6985
|
+
* editor is created inside {@link afterNextRender} (the host element only exists
|
|
6986
|
+
* after the first render pass) and every value that flows back out is written to
|
|
6987
|
+
* a signal or emitted through an `output`, both of which schedule change
|
|
6988
|
+
* detection themselves. No `setTimeout`, no manual `detectChanges`.
|
|
6989
|
+
*
|
|
6990
|
+
* The produced HTML is **not** trusted: sanitise it before rendering it anywhere.
|
|
6991
|
+
*
|
|
6992
|
+
* @example
|
|
6993
|
+
* ```html
|
|
6994
|
+
* <mn-rich-text-editor
|
|
6995
|
+
* [content]="draft()"
|
|
6996
|
+
* [placeholder]="'minutes.placeholder' | mnTranslate"
|
|
6997
|
+
* [labelKeys]="{ bold: 'editor.bold', italic: 'editor.italic' }"
|
|
6998
|
+
* (contentChange)="draft.set($event)">
|
|
6999
|
+
* </mn-rich-text-editor>
|
|
7000
|
+
* ```
|
|
7001
|
+
*/
|
|
7002
|
+
declare class MnRichTextEditor implements OnDestroy {
|
|
7003
|
+
/**
|
|
7004
|
+
* The initial HTML content. Later changes are applied only when they differ
|
|
7005
|
+
* from what the editor currently holds, so a parent echoing the emitted value
|
|
7006
|
+
* back never moves the caret.
|
|
7007
|
+
*/
|
|
7008
|
+
readonly content: i0.InputSignal<string>;
|
|
7009
|
+
/** Placeholder shown while the editor is empty. */
|
|
7010
|
+
readonly placeholder: i0.InputSignal<string>;
|
|
7011
|
+
/** Accessible label for the editing surface. */
|
|
7012
|
+
readonly ariaLabel: i0.InputSignal<string>;
|
|
7013
|
+
/** Toolbar layout, in Quill's own format. Defaults to a prose-oriented set. */
|
|
7014
|
+
readonly toolbar: i0.InputSignal<MnRichTextEditorToolbar>;
|
|
7015
|
+
/** Literal hover labels per toolbar control. */
|
|
7016
|
+
readonly labels: i0.InputSignal<Partial<Record<MnRichTextEditorControl, string>>>;
|
|
7017
|
+
/** Translation keys per toolbar control; takes precedence over `labels`. */
|
|
7018
|
+
readonly labelKeys: i0.InputSignal<Partial<Record<MnRichTextEditorControl, string>>>;
|
|
7019
|
+
/**
|
|
7020
|
+
* Utilities applied to the wrapper, for sizing the writing surface. Overriding
|
|
7021
|
+
* this replaces the default height limits, so pass both bounds when you do.
|
|
7022
|
+
*/
|
|
7023
|
+
readonly editorClass: i0.InputSignal<string>;
|
|
7024
|
+
/** Emits the editor's HTML on every user edit. */
|
|
7025
|
+
readonly contentChange: i0.OutputEmitterRef<string>;
|
|
7026
|
+
/**
|
|
7027
|
+
* Chrome around Quill's snow theme: the field's radius, border and surface.
|
|
7028
|
+
*
|
|
7029
|
+
* Descendant variants rather than a stylesheet — the utilities come from the
|
|
7030
|
+
* consuming app's Tailwind build (which scans this bundle), so they follow the
|
|
7031
|
+
* app's theme tokens the same way the rest of the library does.
|
|
7032
|
+
*/
|
|
7033
|
+
protected readonly chromeClass: string;
|
|
7034
|
+
/** Host element, used to keep DOM queries inside this component. */
|
|
7035
|
+
private readonly host;
|
|
7036
|
+
/** Language service, used to resolve the toolbar labels from keys. */
|
|
7037
|
+
private readonly lang;
|
|
7038
|
+
/** The container Quill mounts into. */
|
|
7039
|
+
private readonly editorHost;
|
|
7040
|
+
/** The live editor instance, or null before Quill has loaded. */
|
|
7041
|
+
private quill;
|
|
7042
|
+
/** Whether the component is gone, so a late Quill load knows to stop. */
|
|
7043
|
+
private destroyed;
|
|
7044
|
+
/** The last HTML this component emitted, used to skip redundant writes. */
|
|
7045
|
+
private readonly lastEmitted;
|
|
7046
|
+
constructor();
|
|
7047
|
+
/** Drops the editor reference so the instance can be garbage collected. */
|
|
7048
|
+
ngOnDestroy(): void;
|
|
7049
|
+
/** Moves focus into the editing surface. */
|
|
7050
|
+
focusEditor(): void;
|
|
7051
|
+
/**
|
|
7052
|
+
* Loads Quill, builds the instance and wires its change handler.
|
|
7053
|
+
*
|
|
7054
|
+
* Nothing awaits this beyond the component itself: the surface appears once
|
|
7055
|
+
* the engine has loaded, and until then the `content` effect is a no-op that
|
|
7056
|
+
* the seeding below makes good.
|
|
7057
|
+
*/
|
|
7058
|
+
private createEditor;
|
|
7059
|
+
/**
|
|
7060
|
+
* Gives each toolbar control a hover label, so hovering explains what the
|
|
7061
|
+
* style does. Set on the Quill-generated DOM after init; a control the current
|
|
7062
|
+
* toolbar does not render is simply skipped.
|
|
7063
|
+
*/
|
|
7064
|
+
private applyToolbarLabels;
|
|
7065
|
+
/**
|
|
7066
|
+
* Picks the hover label for one control.
|
|
7067
|
+
* @param control The control being labelled.
|
|
7068
|
+
* @param labels Literal labels supplied by the consumer.
|
|
7069
|
+
* @param keys Translation keys supplied by the consumer.
|
|
7070
|
+
* @returns The translated key, the literal label, or the built-in default.
|
|
7071
|
+
*/
|
|
7072
|
+
private resolveLabel;
|
|
7073
|
+
/**
|
|
7074
|
+
* Replaces the editor content with stored HTML. Quill parses it into its own
|
|
7075
|
+
* document model, which silently drops anything it has no format for — a
|
|
7076
|
+
* useful extra filter on top of the consumer's sanitiser.
|
|
7077
|
+
* @param html The HTML to load into the editor.
|
|
7078
|
+
*/
|
|
7079
|
+
private setEditorHtml;
|
|
7080
|
+
/** Emits the editor's current HTML, normalising Quill's "empty" document. */
|
|
7081
|
+
private emitCurrentHtml;
|
|
7082
|
+
/**
|
|
7083
|
+
* Reads the editor's HTML.
|
|
7084
|
+
* @returns The current HTML, or an empty string when the editor is blank.
|
|
7085
|
+
*/
|
|
7086
|
+
private readHtml;
|
|
7087
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MnRichTextEditor, never>;
|
|
7088
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MnRichTextEditor, "mn-rich-text-editor", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "toolbar": { "alias": "toolbar"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "labelKeys": { "alias": "labelKeys"; "required": false; "isSignal": true; }; "editorClass": { "alias": "editorClass"; "required": false; "isSignal": true; }; }, { "contentChange": "contentChange"; }, never, never, true, never>;
|
|
7089
|
+
}
|
|
7090
|
+
|
|
6843
7091
|
declare const mnIconVariants: tailwind_variants.TVReturnType<{
|
|
6844
7092
|
color: {
|
|
6845
7093
|
current: string;
|
|
@@ -7394,5 +7642,5 @@ type MnPreviewMessage = {
|
|
|
7394
7642
|
*/
|
|
7395
7643
|
declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
|
|
7396
7644
|
|
|
7397
|
-
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_HAPTICS, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MODAL_ACTION_ICONS, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MODAL_ACTION_ICON_SIZE, MODAL_ACTION_ICON_SIZE_SM, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnCollectionState, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDateSelectorBar, 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, defaultFilterPredicate, defaultIconForStyle, defaultTextAdapter, emptyFilterValue, enableMnPreviewMode, isFilterValueActive, isTranslatable, matchesColumnFilter, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
|
|
7398
|
-
export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnBase, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ColumnFilterValue, ColumnSkeleton, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig,
|
|
7645
|
+
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_HAPTICS, MN_ICON_MAP, MN_INPUT_FIELD_CONFIG, MN_INSTANCE_ID, MN_LIB_DUAL_HORIZONTAL_IMAGE, MN_MODAL_ACTION_ICONS, MN_MULTI_SELECT_CONFIG, MN_SECTION_PATH, MN_SELECT_CONFIG, MN_TEXTAREA_CONFIG, MODAL_ACTION_ICON_SIZE, MODAL_ACTION_ICON_SIZE_SM, MnAlertOutletComponent, MnAlertService, MnAlertStore, MnBadge, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnCollectionState, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDateSelectorBar, MnDatetime, MnDualHorizontalImage, MnFileInput, MnFormBodyComponent, MnGrid, MnHiddenBelowDirective, MnHttpService, MnIcon, MnIconAttributes, MnInformationCard, MnInputField, MnInstanceDirective, MnLanguageService, MnList, MnModalRef, MnModalService, MnModalShellComponent, MnMultiSelect, MnRichTextEditor, 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, defaultFilterPredicate, defaultIconForStyle, defaultTextAdapter, emptyFilterValue, enableMnPreviewMode, isFilterValueActive, isTranslatable, matchesColumnFilter, mnAlertVariants, mnBadgeVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
|
|
7646
|
+
export type { AnimationOptions, ApiError, BaseModalConfig, CalendarButton, CalendarConfig, CalendarDateFormatter, CalendarEvent, CalendarEventData, CancellationActionConfig, CheckboxFieldConfig, ColorFieldConfig, ColorPreset, ColumnBase, ColumnDay, ColumnDefinition, ColumnFilterOption, ColumnFilterState, ColumnFilterType, ColumnFilterValue, ColumnSkeleton, ConfirmationActionConfig, ConfirmationModalConfig, CrudConfig, CurrentTimeCalendarEvent, CursorPaginationStrategy, CustomFieldConfig, CustomModalConfig, DateFieldConfig, DateSelectorBarLayout, DatetimeFieldConfig, DayTile, 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, MnColumnFilter, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDualHorizontalImageConfig, MnDualHorizontalImageTypes, MnErrorMessageData, MnErrorMessageFn, MnErrorMessagesData, MnFileDisplayItem, MnFileInputDisplayMode, MnFileInputErrorMessageData, MnFileInputErrorMessagesData, MnFileInputProps, MnFileInputUIConfig, MnFileInputVariants, MnHapticStyle, MnHapticsHandler, MnIconTypes, MnIconVariants, MnImageType, MnInformationCardBaseData, MnInformationCardData, MnInformationCardVariants, MnInputAdapter, MnInputBaseProps, MnInputDateTimeProps, MnInputFieldProps, MnInputFieldUIConfig, MnInputProps, MnInputType, MnInputVariants, MnLanguageConfig, MnMultiSelectErrorMessageData, MnMultiSelectErrorMessagesData, MnMultiSelectOption, MnMultiSelectProps, MnMultiSelectUIConfig, MnMultiSelectVariants, MnPageSlot, MnPreviewMessage, MnQueryParams, MnRichTextEditorControl, MnRichTextEditorLabels, MnRichTextEditorToolbar, MnSelectErrorMessageData, MnSelectErrorMessagesData, MnSelectOption, MnSelectProps, MnSelectUIConfig, MnSelectVariants, MnSelectableCollectionDataSource, MnShowInput, MnSkeletonProps, MnSkeletonShape, MnSkeletonVariantProps, MnTabDataSource, MnTabItem, MnTableFilterLabels, 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 };
|