@openmfp/ngx 0.14.1 → 0.14.2

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.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/openmfp/webcomponents.git"
@@ -249,6 +249,27 @@ interface DeleteResourceConfirmationConfig {
249
249
  /** Label for the cancel button. */
250
250
  cancelLabel?: string;
251
251
  }
252
+ /**
253
+ * One entry in the {@link TableCardConfig.filterTabs} strip rendered above the
254
+ * table. Clicking a tab activates that filter; the host receives the selected
255
+ * definition via the `filterTabChanged` output and is responsible for applying
256
+ * the filter to its data set.
257
+ *
258
+ * The strip renders exactly the array of `FieldFilterDefinition` it receives
259
+ * — no extra "All" / no-filter tab is auto-added. If the host wants such an
260
+ * option it must author it as a regular filter entry (e.g.
261
+ * `{ label: 'All', property: '<some-field>', value: '*' }`).
262
+ */
263
+ interface FieldFilterDefinition {
264
+ /** Visible label rendered as the tab text. */
265
+ label: string;
266
+ /** Name of the property the value applies to. Passed through to the host. */
267
+ property: string;
268
+ /** Value compared against `property` when the host applies the filter. */
269
+ value: string;
270
+ /** When `true`, this tab is selected on initial render; otherwise the first tab is. */
271
+ default?: boolean;
272
+ }
252
273
  /** Configuration for the inner `mfp-declarative-table`. */
253
274
  interface TableConfig {
254
275
  /** Column definitions. */
@@ -292,6 +313,11 @@ interface TableCardConfig {
292
313
  editResourceFormConfig?: ResourceFormConfig;
293
314
  /** When set, enables per-row "Delete" button and confirmation dialog. */
294
315
  deleteResourceConfirmationConfig?: DeleteResourceConfirmationConfig;
316
+ /**
317
+ * Predefined filters rendered as a horizontal tab strip above the table.
318
+ * Omit (or pass an empty array) to hide the strip entirely.
319
+ */
320
+ filterTabs?: FieldFilterDefinition[];
295
321
  }
296
322
 
297
323
  type SearchState = 'collapsed' | 'expanded' | 'collapsing';
@@ -316,6 +342,7 @@ declare class DeclarativeTableCard<T extends GenericResource> {
316
342
  value: Record<string, unknown>;
317
343
  }>;
318
344
  readonly deleteSubmit: _angular_core.OutputEmitterRef<T>;
345
+ readonly filterTabChanged: _angular_core.OutputEmitterRef<FieldFilterDefinition | undefined>;
319
346
  protected searchState: _angular_core.WritableSignal<SearchState>;
320
347
  protected searchExpanded: _angular_core.Signal<boolean>;
321
348
  protected searchCollapsing: _angular_core.Signal<boolean>;
@@ -335,8 +362,13 @@ declare class DeclarativeTableCard<T extends GenericResource> {
335
362
  protected searchButtonConfig: _angular_core.Signal<Partial<_openmfp_ngx.ButtonSettings> | undefined>;
336
363
  protected effectiveColumns: _angular_core.Signal<TableFieldDefinition[]>;
337
364
  protected editInitialValue: _angular_core.Signal<Record<string, unknown>>;
365
+ /** Filter-tab definitions for the strip rendered above the table. */
366
+ protected filterTabs: _angular_core.Signal<FieldFilterDefinition[]>;
367
+ /** Whether the tab strip should render at all. */
368
+ protected hasFilterTabs: _angular_core.Signal<boolean>;
338
369
  private readonly injector;
339
370
  constructor();
371
+ protected onFilterTabChanged(tab: FieldFilterDefinition | undefined): void;
340
372
  toggleSearch(): void;
341
373
  onSearchBlur(): void;
342
374
  onSearchAnimationEnd(): void;
@@ -354,7 +386,7 @@ declare class DeclarativeTableCard<T extends GenericResource> {
354
386
  private addActionsColumn;
355
387
  private buildInitialValues;
356
388
  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>;
389
+ 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
390
  }
359
391
 
360
392
  type DashboardLanguage = 'en' | 'de';
@@ -1270,4 +1302,4 @@ declare class WhatsNew {
1270
1302
  }
1271
1303
 
1272
1304
  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 };
1305
+ export type { ButtonSettings, CardConfig, CardsType, CssRule, DashboardButtonsSettings, DashboardConfig, DeleteResourceConfirmationConfig, FieldDefinition, FieldFilterDefinition, FormFieldChangeEvent, FormFieldDefinition, FormFieldErrors, GenericResource, IconDesignType, ModalSettings, PropertyField, ResourceFieldButtonClickEvent, ResourceFormConfig, RuleCondition, SectionConfig, ServiceStatusItem, ServiceStatusValue, TableCardButtonSettings, TableCardConfig, TableCardFormState, TableConfig, TableFieldDefinition, TransformType, UiSettings, ValueRule };