@openmfp/ngx 0.17.2 → 0.17.4

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.17.2",
3
+ "version": "0.17.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/openmfp/webcomponents.git"
@@ -260,8 +260,13 @@ declare class DeclarativeForm<T extends GenericResource> {
260
260
 
261
261
  /** Configuration for the create/edit resource form rendered inside the table card dialogs. */
262
262
  interface ResourceFormConfig {
263
- /** Ordered list of fields to render in the form. */
264
- fields: FormFieldDefinition[];
263
+ /**
264
+ * Ordered list of fields to render in the form. May be a plain array, or a
265
+ * thunk returning a promise of the fields — the thunk form is resolved lazily
266
+ * when the dialog opens (e.g. to fetch dynamic select options on demand
267
+ * rather than prefetching them on render).
268
+ */
269
+ fields: FormFieldDefinition[] | (() => Promise<FormFieldDefinition[]>);
265
270
  /** Dialog title shown in the header. */
266
271
  title?: string;
267
272
  /** Label for the confirm/submit button. */
@@ -426,6 +431,8 @@ declare class DeclarativeTableCard<T extends GenericResource> {
426
431
  protected editDialogOpen: _angular_core.WritableSignal<boolean>;
427
432
  protected deleteDialogOpen: _angular_core.WritableSignal<boolean>;
428
433
  protected pendingResource: _angular_core.WritableSignal<T | null>;
434
+ protected resolvedCreateFields: _angular_core.WritableSignal<FormFieldDefinition[]>;
435
+ protected resolvedEditFields: _angular_core.WritableSignal<FormFieldDefinition[]>;
429
436
  protected tableConfig: _angular_core.Signal<_openmfp_ngx.TableConfig>;
430
437
  protected header: _angular_core.Signal<string | undefined>;
431
438
  protected headerTooltip: _angular_core.Signal<string | undefined>;
@@ -445,6 +452,9 @@ declare class DeclarativeTableCard<T extends GenericResource> {
445
452
  protected onFilterTabChanged(tab: FieldFilterDefinition | undefined): void;
446
453
  submitSearch(): void;
447
454
  onButtonClick(event: ResourceFieldButtonClickEvent<T>): void;
455
+ openCreateDialog(): Promise<void>;
456
+ private openEditDialog;
457
+ private resolveFormFields;
448
458
  closeCreateDialog(): void;
449
459
  closeEditDialog(): void;
450
460
  closeDeleteDialog(): void;