@iapps/ng-dhis2-ui 1.4.4 → 1.4.6

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": "@iapps/ng-dhis2-ui",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0 || ^20.0.0",
6
6
  "@angular/core": "^19.0.0 || ^20.0.0",
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnDestroy, AfterViewInit, ElementRef, EventEmitter, NgZone, OnChanges, SimpleChanges, OnInit, EffectRef, Signal } from '@angular/core';
2
+ import { OnDestroy, AfterViewInit, ElementRef, EventEmitter, NgZone, OnChanges, SimpleChanges, OnInit, EffectRef, QueryList, Signal } from '@angular/core';
3
3
  import React, { ComponentProps } from 'react';
4
4
  import * as ReactDOM from 'react-dom/client';
5
5
  import * as i2 from '@angular/common';
@@ -1101,7 +1101,7 @@ declare class FormFieldComponent implements OnInit, OnChanges, OnDestroy {
1101
1101
  }
1102
1102
 
1103
1103
  type SectionRuleTargetType = 'PROGRAM_SECTION' | 'PROGRAM_STAGE_SECTION';
1104
- declare class FormComponent implements OnChanges, OnDestroy, OnInit {
1104
+ declare class FormComponent implements AfterViewInit, OnChanges, OnDestroy, OnInit {
1105
1105
  #private;
1106
1106
  programEntryFormConfig: _angular_core.InputSignal<any>;
1107
1107
  formConfig: _angular_core.InputSignal<FormConfig>;
@@ -1128,11 +1128,15 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
1128
1128
  configuration: _angular_core.Signal<FormConfig>;
1129
1129
  formUpdate: EventEmitter<any>;
1130
1130
  formValidityUpdate: EventEmitter<boolean>;
1131
- fieldComponents: FormFieldComponent[];
1131
+ fieldComponents: QueryList<FormFieldComponent>;
1132
+ private readonly destroyRef;
1132
1133
  values: any;
1133
1134
  readonly fieldControlKeyById: _angular_core.Signal<Record<string, string>>;
1134
1135
  get layoutCssClass(): string;
1135
1136
  ruleProcessor: EffectRef;
1137
+ private readonly visibilityDisabledKeys;
1138
+ private readonly unrenderedViewDisabledKeys;
1139
+ private readonly previousShowErrorIds;
1136
1140
  constructor();
1137
1141
  resolveSections(meta: any): any;
1138
1142
  private getSections;
@@ -1147,6 +1151,8 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
1147
1151
  } | null | undefined, expectedSectionType: SectionRuleTargetType): boolean;
1148
1152
  ngOnInit(): void;
1149
1153
  ngOnChanges(changes: SimpleChanges): void;
1154
+ ngAfterViewInit(): void;
1155
+ private syncActuallyRenderedFields;
1150
1156
  onSubmit(): void;
1151
1157
  onFieldUpdate(form: FormGroup, field: IFormField<string>): void;
1152
1158
  onClear(): void;
@@ -1154,7 +1160,6 @@ declare class FormComponent implements OnChanges, OnDestroy, OnInit {
1154
1160
  private getOptionValue;
1155
1161
  onRunTimeOptionUpdate(result: any): void;
1156
1162
  ngOnDestroy(): void;
1157
- private readonly hiddenFieldIds;
1158
1163
  get sanitizedFields(): IFormField<string>[];
1159
1164
  getVisibleSectionFields(section: any): IFormField<string>[];
1160
1165
  private isFieldHiddenByRules;
@@ -1391,11 +1396,18 @@ declare class BaseFormWrapperComponent implements OnDestroy {
1391
1396
  }
1392
1397
 
1393
1398
  declare class FlatFormComponent extends BaseFormWrapperComponent implements OnInit {
1399
+ private readonly destroyRef;
1394
1400
  formGroup: FormGroup;
1395
1401
  collapsibleSections: _angular_core.InputSignal<boolean>;
1396
1402
  programEntryFormConfig: _angular_core.InputSignal<any>;
1397
1403
  optionCascadeConfigs: _angular_core.InputSignal<OptionsPathCascadeConfig[]>;
1398
1404
  ngOnInit(): void;
1405
+ /**
1406
+ * Exclude only controls that cannot be edited in this form: metadata-hidden,
1407
+ * HIDEFIELD, hidden auto-assigned, or absent from TRACKER sections.
1408
+ * Controls keep their raw values for the existing SDK save flow.
1409
+ */
1410
+ private excludeUnrenderedTrackerControls;
1399
1411
  onFormUpdate(dataValues?: Record<string, unknown>): void;
1400
1412
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlatFormComponent, never>;
1401
1413
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlatFormComponent, "ng-dhis2-ui-flat-form", never, { "collapsibleSections": { "alias": "collapsibleSections"; "required": false; "isSignal": true; }; "programEntryFormConfig": { "alias": "programEntryFormConfig"; "required": true; "isSignal": true; }; "optionCascadeConfigs": { "alias": "optionCascadeConfigs"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
@@ -1482,7 +1494,7 @@ declare class D2FormModule {
1482
1494
  declare class FieldUtil {
1483
1495
  static getFieldDropdownOptions(field: any): DropdownOption[];
1484
1496
  static sanitizeOptions(options: any[]): any;
1485
- static getFieldType(valueType: string): "email" | "number" | "text" | "tel" | "date" | "date-time" | "org-unit" | "file" | "coordinate";
1497
+ static getFieldType(valueType: string): "email" | "tel" | "date" | "date-time" | "org-unit" | "file" | "number" | "coordinate" | "text";
1486
1498
  static getFieldControlType(valueType: string, hasOptions: boolean): FieldControlType;
1487
1499
  static getOptionEntities?(options: any[]): any;
1488
1500
  }
@@ -1492,7 +1504,7 @@ declare class FieldControlTypeUtil {
1492
1504
  }
1493
1505
 
1494
1506
  declare class FormFieldTypeUtil {
1495
- static getFieldType(valueType: string): "number" | "text" | "tel" | "date-time" | "image" | "org-unit" | "file" | "coordinate";
1507
+ static getFieldType(valueType: string): "tel" | "date-time" | "image" | "org-unit" | "file" | "number" | "coordinate" | "text";
1496
1508
  }
1497
1509
 
1498
1510
  declare class FormUtil {
@@ -1669,6 +1681,11 @@ declare class EventFormModule {
1669
1681
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<EventFormModule>;
1670
1682
  }
1671
1683
 
1684
+ interface ScopedResult<M> {
1685
+ metadata: M | null;
1686
+ error: string | null;
1687
+ }
1688
+
1672
1689
  declare class ProgramEntryFormModule {
1673
1690
  #private;
1674
1691
  config: _angular_core.InputSignal<ProgramEntryFormConfig>;
@@ -1684,10 +1701,14 @@ declare class ProgramEntryFormModule {
1684
1701
  d2: _iapps_d2_web_sdk.D2Web;
1685
1702
  loading: _angular_core.WritableSignal<boolean>;
1686
1703
  metaData: _angular_core.WritableSignal<IProgramEntryFormMetaData>;
1704
+ readonly activeFormScope: _angular_core.Signal<ScopedResult<IProgramEntryFormMetaData>>;
1687
1705
  isFormValid: _angular_core.WritableSignal<boolean>;
1706
+ private readonly isSubmitting;
1688
1707
  isFormValid$: Observable<boolean>;
1689
1708
  instance: _angular_core.WritableSignal<TrackedEntityInstance | DHIS2Event>;
1690
1709
  trackedEntityInstance: _angular_core.WritableSignal<TrackedEntityInstance>;
1710
+ private readonly instanceRevision;
1711
+ private readonly initialAutoAssignedValues;
1691
1712
  instanceQuery: BaseTrackerQuery<TrackedEntityInstance> | BaseEventQuery<DHIS2Event>;
1692
1713
  preprocess: _angular_core.InputSignal<(payload: {
1693
1714
  instance: TrackedEntityInstance | DHIS2Event;