mn-angular-lib 1.0.144 → 1.0.146
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
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
The mobile bottom-sheet chrome (anchoring, slide animation, backdrop, safe-area inset)
|
|
3
|
+
lives in the shared mn-bottom-sheet component, which this dropdown projects its item
|
|
4
|
+
list into. No component-local styles are needed — layout is expressed entirely through
|
|
5
|
+
the template's Tailwind classes.
|
|
6
|
+
*/
|
|
@@ -2847,6 +2847,272 @@ declare class MnMultiSelect implements OnInit {
|
|
|
2847
2847
|
static ɵcmp: i0.ɵɵComponentDeclaration<MnMultiSelect, "mn-lib-multi-select", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
|
|
2848
2848
|
}
|
|
2849
2849
|
|
|
2850
|
+
/**
|
|
2851
|
+
* Layout variants for the trigger button. An icon-only trigger (the default ⋯) is a
|
|
2852
|
+
* square affordance; a trigger with a text label grows to fit its content with
|
|
2853
|
+
* horizontal padding instead. The `labeled` axis switches between the two.
|
|
2854
|
+
*/
|
|
2855
|
+
declare const mnDropdownTriggerVariants: tailwind_variants.TVReturnType<{
|
|
2856
|
+
size: {
|
|
2857
|
+
sm: string;
|
|
2858
|
+
md: string;
|
|
2859
|
+
lg: string;
|
|
2860
|
+
};
|
|
2861
|
+
labeled: {
|
|
2862
|
+
true: string;
|
|
2863
|
+
false: string;
|
|
2864
|
+
};
|
|
2865
|
+
borderRadius: {
|
|
2866
|
+
none: string;
|
|
2867
|
+
xs: string;
|
|
2868
|
+
sm: string;
|
|
2869
|
+
md: string;
|
|
2870
|
+
lg: string;
|
|
2871
|
+
xl: string;
|
|
2872
|
+
full: string;
|
|
2873
|
+
};
|
|
2874
|
+
}, undefined, "inline-flex items-center justify-center gap-x-1.5 text-base-content/80 cursor-pointer", {
|
|
2875
|
+
size: {
|
|
2876
|
+
sm: string;
|
|
2877
|
+
md: string;
|
|
2878
|
+
lg: string;
|
|
2879
|
+
};
|
|
2880
|
+
labeled: {
|
|
2881
|
+
true: string;
|
|
2882
|
+
false: string;
|
|
2883
|
+
};
|
|
2884
|
+
borderRadius: {
|
|
2885
|
+
none: string;
|
|
2886
|
+
xs: string;
|
|
2887
|
+
sm: string;
|
|
2888
|
+
md: string;
|
|
2889
|
+
lg: string;
|
|
2890
|
+
xl: string;
|
|
2891
|
+
full: string;
|
|
2892
|
+
};
|
|
2893
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
2894
|
+
size: {
|
|
2895
|
+
sm: string;
|
|
2896
|
+
md: string;
|
|
2897
|
+
lg: string;
|
|
2898
|
+
};
|
|
2899
|
+
labeled: {
|
|
2900
|
+
true: string;
|
|
2901
|
+
false: string;
|
|
2902
|
+
};
|
|
2903
|
+
borderRadius: {
|
|
2904
|
+
none: string;
|
|
2905
|
+
xs: string;
|
|
2906
|
+
sm: string;
|
|
2907
|
+
md: string;
|
|
2908
|
+
lg: string;
|
|
2909
|
+
xl: string;
|
|
2910
|
+
full: string;
|
|
2911
|
+
};
|
|
2912
|
+
}, undefined, "inline-flex items-center justify-center gap-x-1.5 text-base-content/80 cursor-pointer", unknown, unknown, undefined>>;
|
|
2913
|
+
type MnDropdownTriggerVariants = VariantProps<typeof mnDropdownTriggerVariants>;
|
|
2914
|
+
|
|
2915
|
+
/** Theme colour tokens an action item can be tinted with, mirroring mn-button's palette. */
|
|
2916
|
+
type MnDropdownActionColor = 'primary' | 'secondary' | 'danger' | 'warning' | 'success' | 'accent' | 'gray';
|
|
2917
|
+
/**
|
|
2918
|
+
* A single command in a {@link MnDropdownProps} menu. Unlike a select option it holds
|
|
2919
|
+
* no value — choosing it fires {@link run} and closes the menu. This is a *command*
|
|
2920
|
+
* menu, not a value picker, which is why mn-dropdown is not a ControlValueAccessor.
|
|
2921
|
+
*/
|
|
2922
|
+
type MnDropdownAction = {
|
|
2923
|
+
/** Visible label. Falls back to `labelKey`'s resolved text when omitted. */
|
|
2924
|
+
label?: string;
|
|
2925
|
+
/**
|
|
2926
|
+
* Translation key for the label, resolved via MnLanguageService and kept updated on
|
|
2927
|
+
* locale change. Takes precedence over {@link label} when it resolves to a value.
|
|
2928
|
+
*/
|
|
2929
|
+
labelKey?: string;
|
|
2930
|
+
/**
|
|
2931
|
+
* Optional leading icon, supplied as a template so the consumer keeps full control
|
|
2932
|
+
* over which icon set is used (a lucide `<svg>`, an `<mn-icon>`, an emoji…).
|
|
2933
|
+
*/
|
|
2934
|
+
icon?: TemplateRef<unknown>;
|
|
2935
|
+
/** Invoked when the item is chosen. The menu closes immediately afterwards. */
|
|
2936
|
+
run: () => void;
|
|
2937
|
+
/** When true the item is shown dimmed and cannot be chosen. */
|
|
2938
|
+
disabled?: boolean;
|
|
2939
|
+
/**
|
|
2940
|
+
* Tints the item's label and icon. When omitted the item uses the default foreground
|
|
2941
|
+
* ({@link danger} still forces the destructive red). Lets a host carry a per-item
|
|
2942
|
+
* colour — e.g. an mn-table actions column keeps the same colours it shows inline.
|
|
2943
|
+
*/
|
|
2944
|
+
color?: MnDropdownActionColor;
|
|
2945
|
+
/** Renders the item in a destructive style (e.g. a "Delete" action). Shorthand for
|
|
2946
|
+
* the red foreground; equivalent to `color: 'danger'`. */
|
|
2947
|
+
danger?: boolean;
|
|
2948
|
+
};
|
|
2949
|
+
/**
|
|
2950
|
+
* Configuration for {@link MnDropdown}. Everything is passed through the single
|
|
2951
|
+
* `props` input, mirroring mn-select / mn-multi-select.
|
|
2952
|
+
*/
|
|
2953
|
+
type MnDropdownProps = {
|
|
2954
|
+
/** Unique identifier, required for the trigger/menu accessibility wiring. */
|
|
2955
|
+
id: string;
|
|
2956
|
+
/** The commands rendered in the menu, in order. */
|
|
2957
|
+
actions: MnDropdownAction[];
|
|
2958
|
+
/**
|
|
2959
|
+
* Text shown inside the trigger button, turning the ⋯ icon into a labelled control
|
|
2960
|
+
* (e.g. "Actions"). When set, {@link triggerIcon} defaults to a trailing chevron
|
|
2961
|
+
* instead of the dots. Omit for the icon-only ⋯ trigger.
|
|
2962
|
+
*/
|
|
2963
|
+
triggerLabel?: string;
|
|
2964
|
+
/** Translation key for {@link triggerLabel}. Resolved via MnLanguageService. */
|
|
2965
|
+
triggerLabelKey?: string;
|
|
2966
|
+
/**
|
|
2967
|
+
* Which glyph the trigger shows. Defaults to `'dots-vertical'` (⋮) for an icon-only
|
|
2968
|
+
* trigger, or `'chevron'` (▾) when a {@link triggerLabel} is set. Use `'none'` for a
|
|
2969
|
+
* text-only trigger, or `'dots-horizontal'` (⋯) for the horizontal ellipsis.
|
|
2970
|
+
*/
|
|
2971
|
+
triggerIcon?: 'dots-vertical' | 'dots-horizontal' | 'chevron' | 'none';
|
|
2972
|
+
/** Accessible label for the trigger button. Falls back to a translated default.
|
|
2973
|
+
* Ignored for name purposes when {@link triggerLabel} provides visible text. */
|
|
2974
|
+
ariaLabel?: string;
|
|
2975
|
+
/** Translation key for {@link ariaLabel}. Resolved via MnLanguageService. */
|
|
2976
|
+
ariaLabelKey?: string;
|
|
2977
|
+
/**
|
|
2978
|
+
* Heading shown above the items — on mobile the sheet covers its own trigger, so a
|
|
2979
|
+
* title tells the user what the menu belongs to. Optional on desktop.
|
|
2980
|
+
*/
|
|
2981
|
+
menuLabel?: string;
|
|
2982
|
+
/** Translation key for {@link menuLabel}. Resolved via MnLanguageService. */
|
|
2983
|
+
menuLabelKey?: string;
|
|
2984
|
+
/**
|
|
2985
|
+
* Whether the menu renders as a bottom sheet on small screens (< 640px). Defaults
|
|
2986
|
+
* to true; set false to keep the trigger-anchored popover on mobile too.
|
|
2987
|
+
*/
|
|
2988
|
+
mobileSheet?: boolean;
|
|
2989
|
+
/** Size variant of the ⋯ trigger (default: 'md'). */
|
|
2990
|
+
size?: MnDropdownTriggerVariants['size'];
|
|
2991
|
+
/** Border-radius variant of the ⋯ trigger (default: 'md'). */
|
|
2992
|
+
borderRadius?: MnDropdownTriggerVariants['borderRadius'];
|
|
2993
|
+
};
|
|
2994
|
+
/**
|
|
2995
|
+
* Config resolved via {@link MnConfigService} under the `mn-dropdown` section, so an
|
|
2996
|
+
* app can set shared accessible labels once instead of per instance.
|
|
2997
|
+
*/
|
|
2998
|
+
type MnDropdownUIConfig = {
|
|
2999
|
+
/** Default accessible label for the ⋯ trigger (falls back to "Actions"). */
|
|
3000
|
+
ariaLabel?: string;
|
|
3001
|
+
/** Default heading for the menu/sheet. */
|
|
3002
|
+
menuLabel?: string;
|
|
3003
|
+
/** Accessible label for the mobile sheet's close button (falls back to "Close"). */
|
|
3004
|
+
closeLabel?: string;
|
|
3005
|
+
};
|
|
3006
|
+
|
|
3007
|
+
declare const MN_DROPDOWN_CONFIG: InjectionToken<MnDropdownUIConfig>;
|
|
3008
|
+
/**
|
|
3009
|
+
* A ⋯ command menu. The trigger opens a `role="menu"` list of {@link MnDropdownAction}s
|
|
3010
|
+
* that each fire and dismiss on choice — a *command* menu, not a value picker, so it is
|
|
3011
|
+
* intentionally not a ControlValueAccessor.
|
|
3012
|
+
*
|
|
3013
|
+
* Presentation mirrors mn-multi-select: an anchored popover on desktop and the shared
|
|
3014
|
+
* {@link MnBottomSheet} on mobile (< 640px). Both the popover and the sheet host are
|
|
3015
|
+
* portalled to `document.body` so their `position: fixed` anchors to the viewport rather
|
|
3016
|
+
* than any transformed/filtered ancestor (a table cell, a card) — the same root-cause fix
|
|
3017
|
+
* the multi-select applies.
|
|
3018
|
+
*/
|
|
3019
|
+
declare class MnDropdown implements OnInit {
|
|
3020
|
+
props: MnDropdownProps;
|
|
3021
|
+
protected uiConfig: MnDropdownUIConfig;
|
|
3022
|
+
private readonly configService;
|
|
3023
|
+
private readonly sectionPath;
|
|
3024
|
+
private readonly explicitInstanceId;
|
|
3025
|
+
private readonly elRef;
|
|
3026
|
+
private readonly lang;
|
|
3027
|
+
private readonly destroyRef;
|
|
3028
|
+
private readonly renderer;
|
|
3029
|
+
private readonly cdr;
|
|
3030
|
+
/** Reference to the trigger element for positioning the popover. Read as an
|
|
3031
|
+
* `ElementRef` because `button[mnButton]` is a component — the default query would
|
|
3032
|
+
* otherwise return the MnButton instance, which has no `nativeElement`. */
|
|
3033
|
+
triggerRef: ElementRef<HTMLElement>;
|
|
3034
|
+
/** Layout classes for the anchored popover panel. The mobile sheet is rendered by
|
|
3035
|
+
* mn-bottom-sheet instead, so it needs no branch here. */
|
|
3036
|
+
readonly panelClasses = "fixed z-9999 min-w-48 max-w-[min(20rem,90vw)] bg-base-100 border border-base-300 rounded-md shadow-lg py-1 max-h-[60vh] overflow-auto -translate-x-full";
|
|
3037
|
+
/** Tailwind's `sm` breakpoint — below this the menu renders as a bottom sheet.
|
|
3038
|
+
* Kept in step with the same constant in mn-bottom-sheet / mn-multi-select. */
|
|
3039
|
+
private static readonly SHEET_MAX_WIDTH;
|
|
3040
|
+
/** The anchored popover panel currently moved into `document.body`, if any. */
|
|
3041
|
+
private movedPanel;
|
|
3042
|
+
/** The bottom-sheet host currently moved into `document.body`, if any. */
|
|
3043
|
+
private movedSheet;
|
|
3044
|
+
/** Whether the viewport is currently narrow enough for the sheet layout. */
|
|
3045
|
+
private isNarrowViewport;
|
|
3046
|
+
/** Live breakpoint match, so rotating the device re-evaluates the layout. */
|
|
3047
|
+
private sheetMedia;
|
|
3048
|
+
/** The listener registered on `sheetMedia`, retained for teardown. */
|
|
3049
|
+
private sheetMediaListener;
|
|
3050
|
+
/** `document.body`'s inline `overflow` before the sheet locked it, restored on close. */
|
|
3051
|
+
private previousBodyOverflow;
|
|
3052
|
+
/** Watches the trigger while open, so the panel closes if the trigger is hidden. */
|
|
3053
|
+
private visibilityObserver;
|
|
3054
|
+
/** Capture-phase scroll listener installed while open, closing on any ancestor scroll. */
|
|
3055
|
+
private scrollCapture;
|
|
3056
|
+
isOpen: boolean;
|
|
3057
|
+
/** Popover position computed from the trigger's bounding rect. */
|
|
3058
|
+
dropdownStyle: {
|
|
3059
|
+
top: string;
|
|
3060
|
+
left: string;
|
|
3061
|
+
};
|
|
3062
|
+
/**
|
|
3063
|
+
* The popover panel, relocated to `document.body` on appearance (see mn-multi-select's
|
|
3064
|
+
* portal rationale) and detached when the query clears on close/destroy.
|
|
3065
|
+
*/
|
|
3066
|
+
set dropdownRef(ref: ElementRef<HTMLElement> | undefined);
|
|
3067
|
+
/**
|
|
3068
|
+
* The bottom-sheet host, relocated to `document.body` so its `position: fixed`
|
|
3069
|
+
* children anchor to the viewport rather than a transformed ancestor.
|
|
3070
|
+
*/
|
|
3071
|
+
set sheetRef(ref: ElementRef<HTMLElement> | undefined);
|
|
3072
|
+
ngOnInit(): void;
|
|
3073
|
+
private resolveConfig;
|
|
3074
|
+
private startWatchingViewport;
|
|
3075
|
+
private stopWatchingViewport;
|
|
3076
|
+
toggle(): void;
|
|
3077
|
+
/** The single close path, so every open-only listener is torn down with the panel. */
|
|
3078
|
+
close(): void;
|
|
3079
|
+
/** Whether the menu should currently render as a bottom sheet. */
|
|
3080
|
+
get isSheet(): boolean;
|
|
3081
|
+
/** Fires an action and closes. Ignores disabled items defensively. */
|
|
3082
|
+
select(action: MnDropdownAction): void;
|
|
3083
|
+
private updateDropdownPosition;
|
|
3084
|
+
private startWatchingTrigger;
|
|
3085
|
+
private stopWatchingTrigger;
|
|
3086
|
+
onDocumentClick(event: Event): void;
|
|
3087
|
+
onEscape(): void;
|
|
3088
|
+
onWindowScrollOrResize(): void;
|
|
3089
|
+
private lockBodyScroll;
|
|
3090
|
+
private unlockBodyScroll;
|
|
3091
|
+
private portal;
|
|
3092
|
+
/** The label shown for an action, preferring a resolved translation key. */
|
|
3093
|
+
actionLabel(action: MnDropdownAction): string;
|
|
3094
|
+
/**
|
|
3095
|
+
* Foreground class for an item: an explicit {@link MnDropdownAction.color}, else the
|
|
3096
|
+
* destructive red for a {@link MnDropdownAction.danger} item, else the default text.
|
|
3097
|
+
*/
|
|
3098
|
+
actionColorClass(action: MnDropdownAction): string;
|
|
3099
|
+
/** Accessible name for the ⋯ trigger button. */
|
|
3100
|
+
get triggerAriaLabel(): string;
|
|
3101
|
+
/** The visible text on the trigger, or null for an icon-only ⋯ trigger. */
|
|
3102
|
+
get triggerLabelText(): string | null;
|
|
3103
|
+
/** Which glyph the trigger renders: an explicit choice, else a chevron when the
|
|
3104
|
+
* trigger is labelled and the vertical dots when it is icon-only. */
|
|
3105
|
+
get resolvedTriggerIcon(): 'dots-vertical' | 'dots-horizontal' | 'chevron' | 'none';
|
|
3106
|
+
/** Heading shown above the menu/sheet, or null when none is configured. */
|
|
3107
|
+
get menuLabel(): string | null;
|
|
3108
|
+
/** Accessible label for the sheet's close button. */
|
|
3109
|
+
get closeLabel(): string;
|
|
3110
|
+
get triggerClasses(): string;
|
|
3111
|
+
get resolvedId(): string;
|
|
3112
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MnDropdown, never>;
|
|
3113
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MnDropdown, "mn-lib-dropdown", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
|
|
3114
|
+
}
|
|
3115
|
+
|
|
2850
3116
|
/**
|
|
2851
3117
|
* A viewport-anchored bottom sheet — the mobile presentation shared by the modal
|
|
2852
3118
|
* shell and the multi-select dropdown.
|
|
@@ -3979,13 +4245,71 @@ type MnColumnFilter = {
|
|
|
3979
4245
|
* skeleton at 75% width is used (matching the previous default).
|
|
3980
4246
|
*/
|
|
3981
4247
|
type ColumnSkeleton = Partial<MnSkeletonProps> | TemplateRef<unknown>;
|
|
4248
|
+
/**
|
|
4249
|
+
* A per-row command rendered in an actions column (see {@link ColumnBase.actions}).
|
|
4250
|
+
* Unlike a cell it carries no display value — choosing it invokes {@link run} with the
|
|
4251
|
+
* row. The table renders actions inline as buttons and, when there are
|
|
4252
|
+
* {@link ColumnBase.actionsCollapseThreshold} or more, collapses them into a ⋯ menu
|
|
4253
|
+
* (mn-dropdown) once the table is narrower than 450px.
|
|
4254
|
+
*/
|
|
4255
|
+
type MnTableRowAction<T> = {
|
|
4256
|
+
/** Visible label. Falls back to `labelKey`'s resolved text when omitted. */
|
|
4257
|
+
label?: string;
|
|
4258
|
+
/** Translation key for the label, resolved via MnLanguageService and kept updated on locale change. */
|
|
4259
|
+
labelKey?: string;
|
|
4260
|
+
/** Optional leading icon, supplied as a template (a lucide `<svg>`, an `<mn-icon>`, …). */
|
|
4261
|
+
icon?: TemplateRef<unknown>;
|
|
4262
|
+
/** Invoked with the row when the action is chosen. */
|
|
4263
|
+
run: (row: T) => void;
|
|
4264
|
+
/** Predicate deciding whether the action is disabled for a given row. */
|
|
4265
|
+
disabled?: (row: T) => boolean;
|
|
4266
|
+
/**
|
|
4267
|
+
* Tints the action's button and its ⋯-menu item. Defaults to `'secondary'` (or
|
|
4268
|
+
* `'danger'` when {@link danger} is set), matching the built-in look. Whatever colour
|
|
4269
|
+
* an action shows inline is carried into the collapsed bottom-sheet item too.
|
|
4270
|
+
*/
|
|
4271
|
+
color?: MnDropdownActionColor;
|
|
4272
|
+
/** Renders the action in a destructive style (e.g. "Delete"). Shorthand for
|
|
4273
|
+
* `color: 'danger'`. */
|
|
4274
|
+
danger?: boolean;
|
|
4275
|
+
};
|
|
3982
4276
|
/** Everything about a column that is independent of filtering. */
|
|
3983
4277
|
type ColumnBase<T> = {
|
|
3984
4278
|
key: string;
|
|
3985
4279
|
header: string | TemplateRef<unknown>;
|
|
3986
4280
|
/** Translation key for the column header. When set, mn-table resolves it via MnLanguageService and keeps it updated on locale change. */
|
|
3987
4281
|
headerKey?: string;
|
|
3988
|
-
|
|
4282
|
+
/**
|
|
4283
|
+
* How a data cell is rendered — a string accessor or a `TemplateRef`. Optional only
|
|
4284
|
+
* because an {@link actions} column renders commands instead of a value; every value
|
|
4285
|
+
* column must set it.
|
|
4286
|
+
*/
|
|
4287
|
+
cell?: ((row: T) => string) | TemplateRef<unknown>;
|
|
4288
|
+
/**
|
|
4289
|
+
* Turns this column into an actions column: per-row command buttons rendered inline,
|
|
4290
|
+
* automatically collapsing into a ⋯ menu (mn-dropdown) once the table is narrower than
|
|
4291
|
+
* 450px **and** there are at least {@link actionsCollapseThreshold} actions. When set,
|
|
4292
|
+
* {@link cell} is ignored.
|
|
4293
|
+
*/
|
|
4294
|
+
actions?: MnTableRowAction<T>[];
|
|
4295
|
+
/**
|
|
4296
|
+
* Number of {@link actions} at or above which the inline buttons collapse to a ⋯ menu
|
|
4297
|
+
* on a narrow table. Defaults to 3 — one or two buttons still fit on a phone, a longer
|
|
4298
|
+
* list does not.
|
|
4299
|
+
*/
|
|
4300
|
+
actionsCollapseThreshold?: number;
|
|
4301
|
+
/**
|
|
4302
|
+
* How each inline action button is presented on a wide table:
|
|
4303
|
+
* - `'both'` (default) — icon (when provided) followed by the label;
|
|
4304
|
+
* - `'icon'` — icon only; the label becomes the button's accessible name and hover
|
|
4305
|
+
* tooltip. An action without an icon falls back to showing its label so it is never
|
|
4306
|
+
* blank;
|
|
4307
|
+
* - `'label'` — text only, no icon.
|
|
4308
|
+
*
|
|
4309
|
+
* The collapsed ⋯ menu always lists full labels regardless of this setting, so
|
|
4310
|
+
* `'icon'` still reads clearly once the actions move into the bottom sheet on mobile.
|
|
4311
|
+
*/
|
|
4312
|
+
actionsInline?: 'icon' | 'label' | 'both';
|
|
3989
4313
|
/** Alternative cell renderer shown below the given breakpoint. When set, `cell` is hidden below this breakpoint and `cellSm` is shown instead. */
|
|
3990
4314
|
cellSm?: {
|
|
3991
4315
|
below: 'sm' | 'md' | 'lg';
|
|
@@ -4337,6 +4661,38 @@ declare class MnTable<T = object> extends MnSelectableCollectionBase<T, TableDat
|
|
|
4337
4661
|
getCellValue(column: ColumnDefinition<T>, row: T): string;
|
|
4338
4662
|
/** Returns the small-screen cell value for a column with cellSm defined. */
|
|
4339
4663
|
getCellSmValue(column: ColumnDefinition<T>, row: T): string;
|
|
4664
|
+
/**
|
|
4665
|
+
* Whether an actions column should offer the collapsing ⋯ variant: only when it has at
|
|
4666
|
+
* least its threshold's worth of actions (default 3). Below that, the inline buttons
|
|
4667
|
+
* stay put at every width — one or two fit on a phone. The width switch itself is a
|
|
4668
|
+
* pure container query in the template; this only decides whether to render the ⋯ path
|
|
4669
|
+
* at all.
|
|
4670
|
+
*/
|
|
4671
|
+
shouldCollapseActions(column: ColumnDefinition<T>): boolean;
|
|
4672
|
+
/** The resolved label for an inline action button (translation key wins once resolved). */
|
|
4673
|
+
rowActionLabel(action: MnTableRowAction<T>): string;
|
|
4674
|
+
/** Whether an inline action button should render its icon. */
|
|
4675
|
+
showActionIcon(column: ColumnDefinition<T>, action: MnTableRowAction<T>): boolean;
|
|
4676
|
+
/**
|
|
4677
|
+
* Whether an inline action button should render its text label. In `'icon'` mode the
|
|
4678
|
+
* label is hidden — unless the action has no icon, in which case it is shown anyway so
|
|
4679
|
+
* the button is never blank.
|
|
4680
|
+
*/
|
|
4681
|
+
showActionLabel(column: ColumnDefinition<T>, action: MnTableRowAction<T>): boolean;
|
|
4682
|
+
/** Whether an action is disabled for the given row. */
|
|
4683
|
+
isRowActionDisabled(action: MnTableRowAction<T>, row: T): boolean;
|
|
4684
|
+
/**
|
|
4685
|
+
* The effective colour for an action, used identically by the inline button and the
|
|
4686
|
+
* collapsed ⋯-menu item so the two never diverge: an explicit `color`, else `'danger'`
|
|
4687
|
+
* for a destructive action, else the default `'secondary'`.
|
|
4688
|
+
*/
|
|
4689
|
+
rowActionColor(action: MnTableRowAction<T>): MnDropdownActionColor;
|
|
4690
|
+
/** Invokes an action for a row. */
|
|
4691
|
+
runRowAction(action: MnTableRowAction<T>, row: T): void;
|
|
4692
|
+
/** A stable, unique element id for a row's actions dropdown (aria wiring). */
|
|
4693
|
+
actionsDropdownId(column: ColumnDefinition<T>, row: T): string;
|
|
4694
|
+
/** Maps a column's actions to mn-dropdown commands, binding the row into each. */
|
|
4695
|
+
rowDropdownActions(column: ColumnDefinition<T>, row: T): MnDropdownAction[];
|
|
4340
4696
|
trackByKey: (_index: number, column: ColumnDefinition<T>) => string;
|
|
4341
4697
|
/** True when the table is narrower than the filter-collapse breakpoint. */
|
|
4342
4698
|
private isFilterViewport;
|
|
@@ -8081,5 +8437,5 @@ type MnPreviewMessage = {
|
|
|
8081
8437
|
*/
|
|
8082
8438
|
declare function enableMnPreviewMode(configService: MnConfigService, langService: MnLanguageService, allowedOrigins?: string[]): void;
|
|
8083
8439
|
|
|
8084
|
-
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, MnBottomSheet, MnBreadcrumbs, 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, mnBreadcrumbsVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
|
|
8085
|
-
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, MnBreadcrumbItem, MnBreadcrumbsData, MnBreadcrumbsVariants, 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 };
|
|
8440
|
+
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_DROPDOWN_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, MnBottomSheet, MnBreadcrumbs, MnButton, MnCheckbox, MnCollectionBase, MnCollectionPagination, MnCollectionState, MnConfigService, MnConfirmationBodyComponent, MnCustomBodyHostComponent, MnDateSelectorBar, MnDatetime, MnDropdown, 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, mnBreadcrumbsVariants, mnButtonVariants, mnCheckboxVariants, mnCheckboxWrapperVariants, mnDatetimeVariants, mnDropdownTriggerVariants, mnFileInputVariants, mnIconVariants, mnInformationCardVariants, mnInputFieldVariants, mnMultiSelectVariants, mnSelectVariants, mnSkeletonVariants, mnTextareaVariants, numberAdapter, pickAdapter, provideMnAlerts, provideMnCalendarConfig, provideMnComponentConfig, provideMnConfig, provideMnLanguage, resolveCalendarConfig, resolveFilterableValue };
|
|
8441
|
+
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, MnBreadcrumbItem, MnBreadcrumbsData, MnBreadcrumbsVariants, MnButtonTypes, MnButtonVariants, MnCheckboxErrorMessageData, MnCheckboxErrorMessagesData, MnCheckboxProps, MnCheckboxUIConfig, MnCheckboxVariants, MnCheckboxWrapperVariants, MnCollectionDataSource, MnCollectionLabels, MnColumnFilter, MnConfigFile, MnConfigSettings, MnConfigValue, MnDatetimeErrorMessageData, MnDatetimeErrorMessagesData, MnDatetimeMode, MnDatetimeProps, MnDatetimeUIConfig, MnDatetimeVariants, MnDomAttrs, MnDropdownAction, MnDropdownActionColor, MnDropdownProps, MnDropdownTriggerVariants, MnDropdownUIConfig, 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, MnTableRowAction, 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 };
|