@openmfp/ngx 0.14.1 → 0.14.3

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": "@openmfp/ngx",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/openmfp/webcomponents.git"
@@ -5,7 +5,6 @@ import * as _openmfp_ngx from '@openmfp/ngx';
5
5
  import { Input } from '@fundamental-ngx/ui5-webcomponents/input';
6
6
  import { SafeHtml } from '@angular/platform-browser';
7
7
  import { GridStackOptions } from 'gridstack';
8
- import { nodesCB } from 'gridstack/dist/angular';
9
8
 
10
9
  /** Subset of fields of a generic resource that the table/form components rely on. */
11
10
  interface GenericResource extends Record<string, unknown> {
@@ -249,6 +248,27 @@ interface DeleteResourceConfirmationConfig {
249
248
  /** Label for the cancel button. */
250
249
  cancelLabel?: string;
251
250
  }
251
+ /**
252
+ * One entry in the {@link TableCardConfig.filterTabs} strip rendered above the
253
+ * table. Clicking a tab activates that filter; the host receives the selected
254
+ * definition via the `filterTabChanged` output and is responsible for applying
255
+ * the filter to its data set.
256
+ *
257
+ * The strip renders exactly the array of `FieldFilterDefinition` it receives
258
+ * — no extra "All" / no-filter tab is auto-added. If the host wants such an
259
+ * option it must author it as a regular filter entry (e.g.
260
+ * `{ label: 'All', property: '<some-field>', value: '*' }`).
261
+ */
262
+ interface FieldFilterDefinition {
263
+ /** Visible label rendered as the tab text. */
264
+ label: string;
265
+ /** Name of the property the value applies to. Passed through to the host. */
266
+ property: string;
267
+ /** Value compared against `property` when the host applies the filter. */
268
+ value: string;
269
+ /** When `true`, this tab is selected on initial render; otherwise the first tab is. */
270
+ default?: boolean;
271
+ }
252
272
  /** Configuration for the inner `mfp-declarative-table`. */
253
273
  interface TableConfig {
254
274
  /** Column definitions. */
@@ -292,6 +312,11 @@ interface TableCardConfig {
292
312
  editResourceFormConfig?: ResourceFormConfig;
293
313
  /** When set, enables per-row "Delete" button and confirmation dialog. */
294
314
  deleteResourceConfirmationConfig?: DeleteResourceConfirmationConfig;
315
+ /**
316
+ * Predefined filters rendered as a horizontal tab strip above the table.
317
+ * Omit (or pass an empty array) to hide the strip entirely.
318
+ */
319
+ filterTabs?: FieldFilterDefinition[];
295
320
  }
296
321
 
297
322
  type SearchState = 'collapsed' | 'expanded' | 'collapsing';
@@ -316,6 +341,7 @@ declare class DeclarativeTableCard<T extends GenericResource> {
316
341
  value: Record<string, unknown>;
317
342
  }>;
318
343
  readonly deleteSubmit: _angular_core.OutputEmitterRef<T>;
344
+ readonly filterTabChanged: _angular_core.OutputEmitterRef<FieldFilterDefinition | undefined>;
319
345
  protected searchState: _angular_core.WritableSignal<SearchState>;
320
346
  protected searchExpanded: _angular_core.Signal<boolean>;
321
347
  protected searchCollapsing: _angular_core.Signal<boolean>;
@@ -335,8 +361,13 @@ declare class DeclarativeTableCard<T extends GenericResource> {
335
361
  protected searchButtonConfig: _angular_core.Signal<Partial<_openmfp_ngx.ButtonSettings> | undefined>;
336
362
  protected effectiveColumns: _angular_core.Signal<TableFieldDefinition[]>;
337
363
  protected editInitialValue: _angular_core.Signal<Record<string, unknown>>;
364
+ /** Filter-tab definitions for the strip rendered above the table. */
365
+ protected filterTabs: _angular_core.Signal<FieldFilterDefinition[]>;
366
+ /** Whether the tab strip should render at all. */
367
+ protected hasFilterTabs: _angular_core.Signal<boolean>;
338
368
  private readonly injector;
339
369
  constructor();
370
+ protected onFilterTabChanged(tab: FieldFilterDefinition | undefined): void;
340
371
  toggleSearch(): void;
341
372
  onSearchBlur(): void;
342
373
  onSearchAnimationEnd(): void;
@@ -354,7 +385,7 @@ declare class DeclarativeTableCard<T extends GenericResource> {
354
385
  private addActionsColumn;
355
386
  private buildInitialValues;
356
387
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeclarativeTableCard<any>, never>;
357
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DeclarativeTableCard<any>, "mfp-declarative-table-card", never, { "resources": { "alias": "resources"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "createFormState": { "alias": "createFormState"; "required": false; "isSignal": true; }; "editFormState": { "alias": "editFormState"; "required": false; "isSignal": true; }; }, { "actionButtonClick": "actionButtonClick"; "tableRowClicked": "tableRowClicked"; "loadMoreResources": "loadMoreResources"; "paginationLimitChanged": "paginationLimitChanged"; "searchChanged": "searchChanged"; "createFieldChange": "createFieldChange"; "editFieldChange": "editFieldChange"; "createSubmit": "createSubmit"; "editSubmit": "editSubmit"; "deleteSubmit": "deleteSubmit"; }, never, never, true, never>;
388
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DeclarativeTableCard<any>, "mfp-declarative-table-card", never, { "resources": { "alias": "resources"; "required": true; "isSignal": true; }; "config": { "alias": "config"; "required": true; "isSignal": true; }; "createFormState": { "alias": "createFormState"; "required": false; "isSignal": true; }; "editFormState": { "alias": "editFormState"; "required": false; "isSignal": true; }; }, { "actionButtonClick": "actionButtonClick"; "tableRowClicked": "tableRowClicked"; "loadMoreResources": "loadMoreResources"; "paginationLimitChanged": "paginationLimitChanged"; "searchChanged": "searchChanged"; "createFieldChange": "createFieldChange"; "editFieldChange": "editFieldChange"; "createSubmit": "createSubmit"; "editSubmit": "editSubmit"; "deleteSubmit": "deleteSubmit"; "filterTabChanged": "filterTabChanged"; }, never, never, true, never>;
358
389
  }
359
390
 
360
391
  type DashboardLanguage = 'en' | 'de';
@@ -436,6 +467,7 @@ interface CardConfig {
436
467
  /** Human-readable label shown in the "Add Card" dialog. */
437
468
  label?: string;
438
469
  }
470
+ type MountCfg = Pick<CardConfig, 'type' | 'component' | 'componentInputs'>;
439
471
  /** Configuration for a named horizontal section that groups cards. */
440
472
  interface SectionConfig {
441
473
  /** Unique identifier for this section. */
@@ -493,6 +525,7 @@ declare class Dashboard implements OnInit, OnDestroy {
493
525
  toolbarMenuOpen: _angular_core.WritableSignal<boolean>;
494
526
  /** True once the user has dragged/resized any grid item while in edit mode. */
495
527
  private gridDirty;
528
+ protected backgroundImageHeight: _angular_core.WritableSignal<number | null>;
496
529
  /** JSON snapshots of sections/cards taken on entering edit mode, used to detect changes. */
497
530
  private sectionsSnapshotJson;
498
531
  private cardsSnapshotJson;
@@ -573,15 +606,7 @@ declare class Dashboard implements OnInit, OnDestroy {
573
606
  enterEditMode(): void;
574
607
  saveEdit(): void;
575
608
  cancelEdit(): void;
576
- /**
577
- * Confirms abandoning unsaved edit-mode changes: closes the discard popup
578
- * and reverts sections/cards to the snapshot taken on entering edit mode.
579
- */
580
609
  confirmDiscard(): void;
581
- /**
582
- * Cancels the discard popup and keeps the user in edit mode with their
583
- * pending changes intact.
584
- */
585
610
  cancelDiscard(): void;
586
611
  /**
587
612
  * Public framework-agnostic navigation guard. Consumer apps (Angular Router
@@ -623,8 +648,9 @@ declare class Dashboard implements OnInit, OnDestroy {
623
648
  added: CardConfig[];
624
649
  removed: string[];
625
650
  }): void;
626
- onGridChange(event: nodesCB): void;
651
+ onGridChange(): void;
627
652
  private saveCardsPosition;
653
+ private updateCardsPositions;
628
654
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Dashboard, never>;
629
655
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<Dashboard, "mfp-dashboard", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "sections": { "alias": "sections"; "required": false; "isSignal": true; }; "cards": { "alias": "cards"; "required": false; "isSignal": true; }; "availableCards": { "alias": "availableCards"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; }, { "sections": "sectionsChange"; "cards": "cardsChange"; "saved": "saved"; "actionButtonClick": "actionButtonClick"; "unsavedChangesChange": "unsavedChangesChange"; }, never, ["[slot=dashboard-subheader]"], true, never>;
630
656
  }
@@ -1270,4 +1296,4 @@ declare class WhatsNew {
1270
1296
  }
1271
1297
 
1272
1298
  export { BooleanValue, CARD_TYPES, Dashboard, DeclarativeForm, DeclarativeTable, DeclarativeTableCard, Favorites, LinkValue, ResourceField, SecretValue, ServiceStatusCard, TagListValue, VisitedServiceCard, WhatsNew };
1273
- export type { ButtonSettings, CardConfig, CardsType, CssRule, DashboardButtonsSettings, DashboardConfig, DeleteResourceConfirmationConfig, FieldDefinition, FormFieldChangeEvent, FormFieldDefinition, FormFieldErrors, GenericResource, IconDesignType, ModalSettings, PropertyField, ResourceFieldButtonClickEvent, ResourceFormConfig, RuleCondition, SectionConfig, ServiceStatusItem, ServiceStatusValue, TableCardButtonSettings, TableCardConfig, TableCardFormState, TableConfig, TableFieldDefinition, TransformType, UiSettings, ValueRule };
1299
+ export type { ButtonSettings, CardConfig, CardsType, CssRule, DashboardButtonsSettings, DashboardConfig, DeleteResourceConfirmationConfig, FieldDefinition, FieldFilterDefinition, FormFieldChangeEvent, FormFieldDefinition, FormFieldErrors, GenericResource, IconDesignType, ModalSettings, MountCfg, PropertyField, ResourceFieldButtonClickEvent, ResourceFormConfig, RuleCondition, SectionConfig, ServiceStatusItem, ServiceStatusValue, TableCardButtonSettings, TableCardConfig, TableCardFormState, TableConfig, TableFieldDefinition, TransformType, UiSettings, ValueRule };