@meshmakers/shared-ui 3.4.1100 → 3.4.1130

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": "@meshmakers/shared-ui",
3
- "version": "3.4.1100",
3
+ "version": "3.4.1130",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^22.0.0",
6
6
  "@angular/core": "^22.0.0",
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Type, OnDestroy, AfterViewInit, EventEmitter, ElementRef, OnInit, InjectionToken, TemplateRef, PipeTransform, OnChanges, SimpleChanges, EnvironmentProviders } from '@angular/core';
2
+ import { TemplateRef, Type, OnDestroy, AfterViewInit, EventEmitter, ElementRef, OnInit, InjectionToken, PipeTransform, OnChanges, SimpleChanges, EnvironmentProviders } from '@angular/core';
3
3
  import * as _progress_kendo_svg_icons from '@progress/kendo-svg-icons';
4
4
  import { SVGIcon } from '@progress/kendo-svg-icons';
5
5
  import { FormGroup, ControlValueAccessor, Validator, FormControl, AbstractControl, ValidationErrors } from '@angular/forms';
@@ -16,6 +16,35 @@ import { AutoCompleteComponent } from '@progress/kendo-angular-dropdowns';
16
16
  import { CompositeFilterDescriptor, SortDescriptor, State as State$1 } from '@progress/kendo-data-query';
17
17
  import { CanDeactivate } from '@angular/router';
18
18
 
19
+ /**
20
+ * Marks an `<ng-template>` whose contents the list view renders inside its
21
+ * toolbar, between the host's toolbar actions and the search box.
22
+ *
23
+ * It exists so a page can put its own scope/filter controls — view switches,
24
+ * "only in clarification" toggles and the like — in the SAME band as the
25
+ * table's search and options, instead of stacking a second strip above the
26
+ * grid. Those controls steer the table, so they belong with the table's own
27
+ * controls.
28
+ *
29
+ * A directive rather than plain `<ng-content>`: the toolbar itself lives in a
30
+ * `kendoGridToolbarTemplate`, and content projected with `<ng-content>` cannot
31
+ * be placed inside an `<ng-template>`. Capturing a TemplateRef and rendering it
32
+ * with `ngTemplateOutlet` is the way to reach that spot.
33
+ *
34
+ * ```html
35
+ * <mm-list-view ...>
36
+ * <ng-template mmListViewFilters>
37
+ * <kendo-buttongroup selection="single" [attr.aria-label]="'Ansicht'">…</kendo-buttongroup>
38
+ * </ng-template>
39
+ * </mm-list-view>
40
+ * ```
41
+ */
42
+ declare class ListViewFiltersDirective {
43
+ readonly templateRef: TemplateRef<any>;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListViewFiltersDirective, never>;
45
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ListViewFiltersDirective, "[mmListViewFilters]", never, {}, {}, never, never, true, never>;
46
+ }
47
+
19
48
  /**
20
49
  * Mapping configuration for a single status value to its visual representation
21
50
  */
@@ -207,6 +236,8 @@ interface ListViewMessages {
207
236
  refreshData: string;
208
237
  /** Tooltip for the "Reset Filters" button. Default: "Reset Filters" */
209
238
  resetFilters: string;
239
+ /** Tooltip for the collapsed command menu. Default: "Commands" */
240
+ commands: string;
210
241
  /** Title for the actions command column. Default: "Actions" */
211
242
  actionsColumnTitle: string;
212
243
  /** PDF footer page template. Default: "Page {pageNum} of {totalPages}" */
@@ -230,6 +261,16 @@ interface ListViewMessages {
230
261
  /** Grid: no records message. Default: "No records available." */
231
262
  noRecords: string;
232
263
  }
264
+ /**
265
+ * One entry of the list toolbar's command group (row filter, exports, reset,
266
+ * refresh). Rendered as a laid-out icon button when the list is wide enough,
267
+ * and as a menu item once the commands collapse.
268
+ */
269
+ interface ListViewCommand {
270
+ id: 'rowFilter' | 'excel' | 'pdf' | 'reset' | 'refresh';
271
+ text: string;
272
+ svgIcon: SVGIcon;
273
+ }
233
274
  /**
234
275
  * Default English messages for the ListViewComponent.
235
276
  */
@@ -278,6 +319,11 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
278
319
  /** Last measured row height — reused while a page renders no rows (e.g. empty filter result). */
279
320
  private lastMeasuredRowHeight;
280
321
  private readonly autoPageSizeRecompute$;
322
+ /**
323
+ * Host-supplied scope/filter controls, rendered in the toolbar rather than in
324
+ * a strip of their own above the grid — see ListViewFiltersDirective.
325
+ */
326
+ protected filtersTemplate?: ListViewFiltersDirective;
281
327
  private gridComponent?;
282
328
  private dataBindingDirective?;
283
329
  gridContextMenu?: ContextMenuComponent;
@@ -341,6 +387,33 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
341
387
  * context-menu trigger should pass something around 100.
342
388
  */
343
389
  actionsColumnWidth: number;
390
+ /**
391
+ * Floor for the actions column HEADER. The header is a translated word, and
392
+ * at the grid's header font "Actions" needs 73px once the cell's padding is
393
+ * counted, German "Aktionen" 83px, Spanish "Acciones" 82px.
394
+ */
395
+ private static readonly MIN_ACTIONS_HEADER_WIDTH;
396
+ /** Measured geometry of one flat icon button in a command cell. */
397
+ private static readonly ACTION_BUTTON_WIDTH;
398
+ private static readonly ACTION_BUTTON_GAP;
399
+ private static readonly COMMAND_CELL_PADDING;
400
+ /**
401
+ * Buttons the actions cell can render at once: one per non-separator action
402
+ * item, plus the context-menu button when that menu is shown inline. Item
403
+ * visibility is evaluated per row, so this is the worst case — which is the
404
+ * case the column has to be wide enough for.
405
+ */
406
+ private get maxActionButtons();
407
+ /**
408
+ * The actions column width actually used.
409
+ *
410
+ * A host sizes this by eye and gets it wrong in both directions: too narrow
411
+ * for the header (three Studio lists passed 70 and rendered "ACTIO…") or too
412
+ * narrow for the buttons (the same 70, and even a 90 that fits the header,
413
+ * clipped the third button off an archives row). Both floors are computed
414
+ * rather than guessed, so the column always fits its own content.
415
+ */
416
+ protected get effectiveActionsColumnWidth(): number;
344
417
  /**
345
418
  * Hides the row-checkbox column while the list view is narrower than this many
346
419
  * pixels — on phone-sized layouts multi-select via checkboxes is impractical and
@@ -364,6 +437,34 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
364
437
  * `null` (the default) keeps the table at every width.
365
438
  */
366
439
  cardModeBelow: number | null;
440
+ /**
441
+ * Below this component width the toolbar's command buttons (row filter,
442
+ * exports, reset, refresh) collapse into a single overflow menu. Above it
443
+ * they stay laid out, because reaching a command in one click beats hiding
444
+ * it behind a menu whenever there is room.
445
+ *
446
+ * Measured against the component's OWN width, not the viewport: expanding or
447
+ * collapsing the app drawer changes the space a list has by ~240px without
448
+ * the window ever resizing.
449
+ */
450
+ collapseCommandsBelow: number;
451
+ /** True while the command buttons are collapsed into the overflow menu. */
452
+ protected get commandsCollapsed(): boolean;
453
+ /**
454
+ * The commands available right now, in toolbar order. The row filter is
455
+ * omitted in card mode: cards have no column headers for a filter row to
456
+ * appear in, and the grid already drops `filterable` there — leaving the
457
+ * button visible offered to toggle something that cannot exist. Reset stays
458
+ * available, or a filter set before the switch could never be cleared.
459
+ */
460
+ protected get toolbarCommands(): ListViewCommand[];
461
+ /**
462
+ * Runs a command by id. Excel and PDF are driven by Kendo's own
463
+ * `kendoGridExcelCommand` / `kendoGridPDFCommand` directives when the buttons
464
+ * are laid out; from the overflow menu there is no directive to attach to, so
465
+ * the grid API is called directly.
466
+ */
467
+ protected onCommand(id: string): void;
367
468
  protected get isCardMode(): boolean;
368
469
  /** First column = the card's title/identity line (AB#4930). */
369
470
  protected get cardTitleColumn(): TableColumn | null;
@@ -515,8 +616,16 @@ declare class ListViewComponent extends CommandBaseService implements OnDestroy,
515
616
  private buildMenuItems;
516
617
  protected getPdfPageText(pageNum: number, totalPages: number): string;
517
618
  protected readonly moreVerticalIcon: SVGIcon$1;
619
+ /**
620
+ * Sliders, not an ellipsis. Host toolbars conventionally use the vertical
621
+ * ellipsis for their own overflow group, and two "more" menus side by side
622
+ * say nothing about which holds what. These commands are the table's options
623
+ * — filter, exports, refresh — so the icon says "options" and the two menus
624
+ * are told apart by meaning rather than by dot orientation.
625
+ */
626
+ protected readonly commandsIcon: SVGIcon$1;
518
627
  static ɵfac: i0.ɵɵFactoryDeclaration<ListViewComponent, never>;
519
- static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent, "mm-list-view", never, { "pageSize": { "alias": "pageSize"; "required": false; }; "skip": { "alias": "skip"; "required": false; }; "autoPageSize": { "alias": "autoPageSize"; "required": false; }; "rowIsClickable": { "alias": "rowIsClickable"; "required": false; }; "showRowCheckBoxes": { "alias": "showRowCheckBoxes"; "required": false; }; "showRowSelectAllCheckBox": { "alias": "showRowSelectAllCheckBox"; "required": false; }; "contextMenuType": { "alias": "contextMenuType"; "required": false; }; "leftToolbarActions": { "alias": "leftToolbarActions"; "required": false; }; "rightToolbarActions": { "alias": "rightToolbarActions"; "required": false; }; "actionCommandItems": { "alias": "actionCommandItems"; "required": false; }; "contextMenuCommandItems": { "alias": "contextMenuCommandItems"; "required": false; }; "excelExportFileName": { "alias": "excelExportFileName"; "required": false; }; "pdfExportFileName": { "alias": "pdfExportFileName"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "rowFilterEnabled": { "alias": "rowFilterEnabled"; "required": false; }; "searchTextBoxEnabled": { "alias": "searchTextBoxEnabled"; "required": false; }; "persistListState": { "alias": "persistListState"; "required": false; }; "listStateKey": { "alias": "listStateKey"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "actionsColumnWidth": { "alias": "actionsColumnWidth"; "required": false; }; "hideCheckboxesBelow": { "alias": "hideCheckboxesBelow"; "required": false; }; "cardModeBelow": { "alias": "cardModeBelow"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; }, { "rowClicked": "rowClicked"; "resetFilters": "resetFilters"; }, never, never, true, never>;
628
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListViewComponent, "mm-list-view", never, { "pageSize": { "alias": "pageSize"; "required": false; }; "skip": { "alias": "skip"; "required": false; }; "autoPageSize": { "alias": "autoPageSize"; "required": false; }; "rowIsClickable": { "alias": "rowIsClickable"; "required": false; }; "showRowCheckBoxes": { "alias": "showRowCheckBoxes"; "required": false; }; "showRowSelectAllCheckBox": { "alias": "showRowSelectAllCheckBox"; "required": false; }; "contextMenuType": { "alias": "contextMenuType"; "required": false; }; "leftToolbarActions": { "alias": "leftToolbarActions"; "required": false; }; "rightToolbarActions": { "alias": "rightToolbarActions"; "required": false; }; "actionCommandItems": { "alias": "actionCommandItems"; "required": false; }; "contextMenuCommandItems": { "alias": "contextMenuCommandItems"; "required": false; }; "excelExportFileName": { "alias": "excelExportFileName"; "required": false; }; "pdfExportFileName": { "alias": "pdfExportFileName"; "required": false; }; "pageable": { "alias": "pageable"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "rowFilterEnabled": { "alias": "rowFilterEnabled"; "required": false; }; "searchTextBoxEnabled": { "alias": "searchTextBoxEnabled"; "required": false; }; "persistListState": { "alias": "persistListState"; "required": false; }; "listStateKey": { "alias": "listStateKey"; "required": false; }; "resizable": { "alias": "resizable"; "required": false; }; "actionsColumnWidth": { "alias": "actionsColumnWidth"; "required": false; }; "hideCheckboxesBelow": { "alias": "hideCheckboxesBelow"; "required": false; }; "cardModeBelow": { "alias": "cardModeBelow"; "required": false; }; "collapseCommandsBelow": { "alias": "collapseCommandsBelow"; "required": false; }; "rowClass": { "alias": "rowClass"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; }, { "rowClicked": "rowClicked"; "resetFilters": "resetFilters"; }, ["filtersTemplate"], never, true, never>;
520
629
  }
521
630
 
522
631
  declare const upload: {
@@ -2509,5 +2618,5 @@ declare class WindowStateService {
2509
2618
 
2510
2619
  declare function provideMmSharedUi(): EnvironmentProviders;
2511
2620
 
2512
- export { BaseFormComponent, BaseTreeDetailComponent, ButtonTypes, BytesToSizePipe, CRON_PRESETS, ConfirmationService, ConfirmationWindowComponent, ConfirmationWindowResult, CopyableTextComponent, CronBuilderComponent, CronHumanizerService, CronParserService, DEFAULT_CONFIRMATION_WINDOW_MESSAGES, DEFAULT_CRON_BUILDER_CONFIG, DEFAULT_ENTITY_SELECT_DIALOG_MESSAGES, DEFAULT_ENTITY_SELECT_INPUT_MESSAGES, DEFAULT_INPUT_DIALOG_MESSAGES, DEFAULT_LIST_VIEW_MESSAGES, DEFAULT_MESSAGE_DETAILS_DIALOG_MESSAGES, DEFAULT_NOTIFICATION_DISPLAY_MESSAGES, DEFAULT_PROGRESS_WINDOW_MESSAGES, DEFAULT_RESPONSIVE_COLSPAN, DEFAULT_SAVE_AS_DIALOG_MESSAGES, DEFAULT_TIME_RANGE_LABELS, DataSourceBase, DataSourceTyped, DialogType, EntitySelectDialogComponent, EntitySelectDialogService, EntitySelectInputComponent, FetchResultBase, FetchResultTyped, FileUploadResult, FileUploadService, FormTitleExtraDirective, HAS_UNSAVED_CHANGES, HOUR_INTERVALS, HierarchyDataSource, HierarchyDataSourceBase, ImportStrategyDialogComponent, ImportStrategyDialogResult, ImportStrategyDialogService, ImportStrategyDto, InputDialogComponent, InputService, ListStateService, ListViewComponent, MINUTE_INTERVALS, MessageDetailsDialogComponent, MessageDetailsDialogService, MessageListenerService, MmListViewDataBindingDirective, NotificationDisplayService, PascalCasePipe, ProgressValue, ProgressWindowComponent, ProgressWindowService, RELATIVE_WEEKS, SECOND_INTERVALS, SaveAsDialogComponent, SaveAsDialogService, TimeRangePickerComponent, TimeRangeUtils, TreeComponent, UnsavedChangesDirective, UnsavedChangesGuard, UploadFileDialogComponent, WEEKDAYS, WEEKDAY_ABBREVIATIONS, WindowStateService, generateDayOfMonthOptions, generateHourOptions, generateMinuteOptions, provideMmSharedUi };
2513
- export type { BadgeMapping, BadgeMappingTable, BaseFormConfig, BaseFormMessages, ColumnDefinition, ConfirmationButtonLabels, ConfirmationWindowData, ConfirmationWindowMessages, ContextMenuType, CronBuilderConfig, CronFields, CronPreset, CronSchedule, CronValidationResult, DialogFetchOptions, DialogFetchResult, DropdownOption, EntitySelectDialogDataSource, EntitySelectDialogMessages, EntitySelectDialogOptions, EntitySelectDialogResult, EntitySelectInputMessages, FetchAgainOptions, FetchDataOptions, FetchResult, FileUploadData, HasUnsavedChanges, InputDialogMessages, ListViewMessages, MessageDetailsDialogData, MessageDetailsDialogMessages, NameAvailabilityResult, NodeDroppedEvent, NodeInfo, NotificationDisplayMessages, PersistedListState, ProgressWindowConfig, ProgressWindowData, ProgressWindowMessages, ProgressWindowOptions, ProgressWindowResult, Quarter, RelativeTimeUnit, ResponsiveFormBreakPoint, RowClassFn, SaveAsDialogDataSource, SaveAsDialogMessages, SaveAsDialogOptions, SaveAsDialogResult, ScheduleType, StatusFieldConfig, StatusIconMapping, StatusMapping, TableColumn, TimeRange, TimeRangeISO, TimeRangeOption, TimeRangePickerConfig, TimeRangePickerLabels, TimeRangeSelection, TimeRangeType, TimeRangeZone, UnsavedChangesMessages, Weekday, WindowDimensions };
2621
+ export { BaseFormComponent, BaseTreeDetailComponent, ButtonTypes, BytesToSizePipe, CRON_PRESETS, ConfirmationService, ConfirmationWindowComponent, ConfirmationWindowResult, CopyableTextComponent, CronBuilderComponent, CronHumanizerService, CronParserService, DEFAULT_CONFIRMATION_WINDOW_MESSAGES, DEFAULT_CRON_BUILDER_CONFIG, DEFAULT_ENTITY_SELECT_DIALOG_MESSAGES, DEFAULT_ENTITY_SELECT_INPUT_MESSAGES, DEFAULT_INPUT_DIALOG_MESSAGES, DEFAULT_LIST_VIEW_MESSAGES, DEFAULT_MESSAGE_DETAILS_DIALOG_MESSAGES, DEFAULT_NOTIFICATION_DISPLAY_MESSAGES, DEFAULT_PROGRESS_WINDOW_MESSAGES, DEFAULT_RESPONSIVE_COLSPAN, DEFAULT_SAVE_AS_DIALOG_MESSAGES, DEFAULT_TIME_RANGE_LABELS, DataSourceBase, DataSourceTyped, DialogType, EntitySelectDialogComponent, EntitySelectDialogService, EntitySelectInputComponent, FetchResultBase, FetchResultTyped, FileUploadResult, FileUploadService, FormTitleExtraDirective, HAS_UNSAVED_CHANGES, HOUR_INTERVALS, HierarchyDataSource, HierarchyDataSourceBase, ImportStrategyDialogComponent, ImportStrategyDialogResult, ImportStrategyDialogService, ImportStrategyDto, InputDialogComponent, InputService, ListStateService, ListViewComponent, ListViewFiltersDirective, MINUTE_INTERVALS, MessageDetailsDialogComponent, MessageDetailsDialogService, MessageListenerService, MmListViewDataBindingDirective, NotificationDisplayService, PascalCasePipe, ProgressValue, ProgressWindowComponent, ProgressWindowService, RELATIVE_WEEKS, SECOND_INTERVALS, SaveAsDialogComponent, SaveAsDialogService, TimeRangePickerComponent, TimeRangeUtils, TreeComponent, UnsavedChangesDirective, UnsavedChangesGuard, UploadFileDialogComponent, WEEKDAYS, WEEKDAY_ABBREVIATIONS, WindowStateService, generateDayOfMonthOptions, generateHourOptions, generateMinuteOptions, provideMmSharedUi };
2622
+ export type { BadgeMapping, BadgeMappingTable, BaseFormConfig, BaseFormMessages, ColumnDefinition, ConfirmationButtonLabels, ConfirmationWindowData, ConfirmationWindowMessages, ContextMenuType, CronBuilderConfig, CronFields, CronPreset, CronSchedule, CronValidationResult, DialogFetchOptions, DialogFetchResult, DropdownOption, EntitySelectDialogDataSource, EntitySelectDialogMessages, EntitySelectDialogOptions, EntitySelectDialogResult, EntitySelectInputMessages, FetchAgainOptions, FetchDataOptions, FetchResult, FileUploadData, HasUnsavedChanges, InputDialogMessages, ListViewCommand, ListViewMessages, MessageDetailsDialogData, MessageDetailsDialogMessages, NameAvailabilityResult, NodeDroppedEvent, NodeInfo, NotificationDisplayMessages, PersistedListState, ProgressWindowConfig, ProgressWindowData, ProgressWindowMessages, ProgressWindowOptions, ProgressWindowResult, Quarter, RelativeTimeUnit, ResponsiveFormBreakPoint, RowClassFn, SaveAsDialogDataSource, SaveAsDialogMessages, SaveAsDialogOptions, SaveAsDialogResult, ScheduleType, StatusFieldConfig, StatusIconMapping, StatusMapping, TableColumn, TimeRange, TimeRangeISO, TimeRangeOption, TimeRangePickerConfig, TimeRangePickerLabels, TimeRangeSelection, TimeRangeType, TimeRangeZone, UnsavedChangesMessages, Weekday, WindowDimensions };