@iapps/ng-dhis2-ui 1.2.168 → 1.2.170

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.
@@ -9007,6 +9007,7 @@ class BaseFormFieldComponent extends ReactWrapperModule {
9007
9007
  this.fieldError = input(...(ngDevMode ? [undefined, { debugName: "fieldError" }] : []));
9008
9008
  this.fieldConfig = input(new FieldConfig(), ...(ngDevMode ? [{ debugName: "fieldConfig" }] : []));
9009
9009
  this.programRuleOptions = input(...(ngDevMode ? [undefined, { debugName: "programRuleOptions" }] : []));
9010
+ this.runtimeOptions = input(...(ngDevMode ? [undefined, { debugName: "runtimeOptions" }] : []));
9010
9011
  this.form = model.required(...(ngDevMode ? [{ debugName: "form" }] : []));
9011
9012
  // kept for compatibility (even if not used directly here)
9012
9013
  this.isValid = input(...(ngDevMode ? [undefined, { debugName: "isValid" }] : []));
@@ -9025,6 +9026,7 @@ class BaseFormFieldComponent extends ReactWrapperModule {
9025
9026
  this.isValueAssigned$ = toObservable(this.isValueAssigned);
9026
9027
  this.fieldError$ = toObservable(this.fieldError);
9027
9028
  this.programRuleOptions$ = toObservable(this.programRuleOptions);
9029
+ this.runtimeOptions$ = toObservable(this.runtimeOptions);
9028
9030
  this.label = computed(() => {
9029
9031
  const cfg = this.fieldConfig();
9030
9032
  const f = this.field();
@@ -9037,6 +9039,7 @@ class BaseFormFieldComponent extends ReactWrapperModule {
9037
9039
  this.InputField = this.#getInputField();
9038
9040
  this.update = new EventEmitter();
9039
9041
  this.immediateUpdate = new EventEmitter();
9042
+ this.runtimeOptionsChange = new EventEmitter();
9040
9043
  }
9041
9044
  async ngAfterViewInit() {
9042
9045
  if (!this.elementRef)
@@ -9207,6 +9210,26 @@ class BaseFormFieldComponent extends ReactWrapperModule {
9207
9210
  });
9208
9211
  return () => sub.unsubscribe();
9209
9212
  }, []);
9213
+ useEffect(() => {
9214
+ const sub = this.runtimeOptions$.subscribe((options) => {
9215
+ if (!options)
9216
+ return;
9217
+ setFilteredOptions(options);
9218
+ const currentCtrl = this.#getCurrentFieldControl(fg);
9219
+ const currentValue = String(currentCtrl?.value ?? '').trim();
9220
+ if (!currentValue)
9221
+ return;
9222
+ const stillValid = options.some((option) => {
9223
+ const optionValue = String(option?.value ?? option?.code ?? option?.key ?? option?.id ?? '');
9224
+ return optionValue === currentValue;
9225
+ });
9226
+ if (!stillValid) {
9227
+ currentCtrl?.setValue(null, { emitEvent: true });
9228
+ setValue('');
9229
+ }
9230
+ });
9231
+ return () => sub.unsubscribe();
9232
+ }, []);
9210
9233
  // Keep refs synced
9211
9234
  useEffect(() => {
9212
9235
  valueRef.current = value;
@@ -9304,6 +9327,12 @@ class BaseFormFieldComponent extends ReactWrapperModule {
9304
9327
  }
9305
9328
  }
9306
9329
  setFilteredOptions(nextOptions);
9330
+ this.ngZone.run(() => {
9331
+ this.runtimeOptionsChange.emit({
9332
+ field,
9333
+ options: nextOptions,
9334
+ });
9335
+ });
9307
9336
  setDisabled(baseDisabled || !parentValue);
9308
9337
  };
9309
9338
  applyDependentOptions(parentCtrl.value);
@@ -9381,6 +9410,13 @@ class BaseFormFieldComponent extends ReactWrapperModule {
9381
9410
  const ctrl = this.#getCurrentFieldControl(fg);
9382
9411
  ctrl?.setValue(newValue);
9383
9412
  this.update.emit({ form: fg, value: newValue });
9413
+ if (currentField.controlType === 'dropdown' ||
9414
+ currentField.controlType === 'multi-dropdown') {
9415
+ this.runtimeOptionsChange.emit({
9416
+ field: currentField,
9417
+ options: filteredOptions ?? [],
9418
+ });
9419
+ }
9384
9420
  });
9385
9421
  setValue(currentField.controlType === 'checkbox'
9386
9422
  ? newValue
@@ -9602,7 +9638,7 @@ class BaseFormFieldComponent extends ReactWrapperModule {
9602
9638
  }
9603
9639
  }
9604
9640
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
9605
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: BaseFormFieldComponent, isStandalone: true, inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, fieldError: { classPropertyName: "fieldError", publicName: "fieldError", isSignal: true, isRequired: false, transformFunction: null }, fieldConfig: { classPropertyName: "fieldConfig", publicName: "fieldConfig", isSignal: true, isRequired: false, transformFunction: null }, programRuleOptions: { classPropertyName: "programRuleOptions", publicName: "programRuleOptions", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, isValueAssigned: { classPropertyName: "isValueAssigned", publicName: "isValueAssigned", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigs: { classPropertyName: "optionCascadeConfigs", publicName: "optionCascadeConfigs", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigMap: { classPropertyName: "optionCascadeConfigMap", publicName: "optionCascadeConfigMap", isSignal: true, isRequired: false, transformFunction: null }, coordinatePickerGeoConfig: { classPropertyName: "coordinatePickerGeoConfig", publicName: "coordinatePickerGeoConfig", isSignal: true, isRequired: false, transformFunction: null }, fieldControlKeyById: { classPropertyName: "fieldControlKeyById", publicName: "fieldControlKeyById", isSignal: true, isRequired: false, transformFunction: null }, program: { classPropertyName: "program", publicName: "program", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { form: "formChange", value: "valueChange", update: "update", immediateUpdate: "immediateUpdate" }, usesInheritance: true, ngImport: i0 }); }
9641
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.3", type: BaseFormFieldComponent, isStandalone: true, inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, fieldError: { classPropertyName: "fieldError", publicName: "fieldError", isSignal: true, isRequired: false, transformFunction: null }, fieldConfig: { classPropertyName: "fieldConfig", publicName: "fieldConfig", isSignal: true, isRequired: false, transformFunction: null }, programRuleOptions: { classPropertyName: "programRuleOptions", publicName: "programRuleOptions", isSignal: true, isRequired: false, transformFunction: null }, runtimeOptions: { classPropertyName: "runtimeOptions", publicName: "runtimeOptions", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: true, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, isValueAssigned: { classPropertyName: "isValueAssigned", publicName: "isValueAssigned", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigs: { classPropertyName: "optionCascadeConfigs", publicName: "optionCascadeConfigs", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigMap: { classPropertyName: "optionCascadeConfigMap", publicName: "optionCascadeConfigMap", isSignal: true, isRequired: false, transformFunction: null }, coordinatePickerGeoConfig: { classPropertyName: "coordinatePickerGeoConfig", publicName: "coordinatePickerGeoConfig", isSignal: true, isRequired: false, transformFunction: null }, fieldControlKeyById: { classPropertyName: "fieldControlKeyById", publicName: "fieldControlKeyById", isSignal: true, isRequired: false, transformFunction: null }, program: { classPropertyName: "program", publicName: "program", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { form: "formChange", value: "valueChange", update: "update", immediateUpdate: "immediateUpdate", runtimeOptionsChange: "runtimeOptionsChange" }, usesInheritance: true, ngImport: i0 }); }
9606
9642
  }
9607
9643
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: BaseFormFieldComponent, decorators: [{
9608
9644
  type: Directive
@@ -9610,6 +9646,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImpor
9610
9646
  type: Output
9611
9647
  }], immediateUpdate: [{
9612
9648
  type: Output
9649
+ }], runtimeOptionsChange: [{
9650
+ type: Output
9613
9651
  }] } });
9614
9652
 
9615
9653
  class FormFieldItemComponent extends BaseFormFieldComponent {
@@ -9793,6 +9831,9 @@ class FormFieldComponent {
9793
9831
  onImmediateChange(event) {
9794
9832
  this.immediateFieldUpdate.emit({ value: event?.value || '' });
9795
9833
  }
9834
+ onRuntimeOptionsChange(event) {
9835
+ this.runtimeOptionChange.emit(event);
9836
+ }
9796
9837
  onFieldUpdate(e, isDate, isDateTime) {
9797
9838
  if (e && e.value) {
9798
9839
  const dateValue = new Date(e.value);
@@ -9846,13 +9887,14 @@ class FormFieldComponent {
9846
9887
  }
9847
9888
  onUpdateRuntimeOptions(options) {
9848
9889
  this._runtimeOptions = [...options];
9890
+ this.runtimeOptions = [...options];
9849
9891
  }
9850
9892
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9851
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: FormFieldComponent, isStandalone: false, selector: "ng-dhis2-ui-form-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, fieldConfig: { classPropertyName: "fieldConfig", publicName: "fieldConfig", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: false, isRequired: false, transformFunction: null }, isCheckBoxButton: { classPropertyName: "isCheckBoxButton", publicName: "isCheckBoxButton", isSignal: true, isRequired: false, transformFunction: null }, fieldClass: { classPropertyName: "fieldClass", publicName: "fieldClass", isSignal: true, isRequired: false, transformFunction: null }, programRuleActions: { classPropertyName: "programRuleActions", publicName: "programRuleActions", isSignal: true, isRequired: false, transformFunction: null }, dataEntities: { classPropertyName: "dataEntities", publicName: "dataEntities", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null }, program: { classPropertyName: "program", publicName: "program", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigs: { classPropertyName: "optionCascadeConfigs", publicName: "optionCascadeConfigs", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigMap: { classPropertyName: "optionCascadeConfigMap", publicName: "optionCascadeConfigMap", isSignal: true, isRequired: false, transformFunction: null }, coordinatePickerGeoConfig: { classPropertyName: "coordinatePickerGeoConfig", publicName: "coordinatePickerGeoConfig", isSignal: true, isRequired: false, transformFunction: null }, fieldControlKeyById: { classPropertyName: "fieldControlKeyById", publicName: "fieldControlKeyById", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fieldUpdate: "fieldUpdate", immediateFieldUpdate: "immediateFieldUpdate", runtimeOptionChange: "runtimeOptionChange" }, usesOnChanges: true, ngImport: i0, template: "@if (field(); as formField) {\n @let fieldError = runtimeError();\n @let isAssigned = isValueAssigned();\n @let fieldConfigValue = fieldConfig();\n @let cascadeConfigs = optionCascadeConfigs();\n @let entryFormCoordinatePickerGeoConfig = coordinatePickerGeoConfig();\n\n <div class=\"form-field-item\">\n <ng-dhis2-ui-form-field-item\n [field]=\"getDisplayField(formField)\"\n [fieldError]=\"fieldError\"\n [isValueAssigned]=\"isAssigned\"\n [fieldConfig]=\"fieldConfigValue\"\n [(form)]=\"form\"\n [programRuleOptions]=\"programRuleOptions()\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [optionCascadeConfigs]=\"cascadeConfigs\"\n [optionCascadeConfigMap]=\"optionCascadeConfigMap()\"\n [fieldControlKeyById]=\"fieldControlKeyById()\"\n [coordinatePickerGeoConfig]=\"entryFormCoordinatePickerGeoConfig\"\n [program]=\"program()\"\n [value]=\"value()\"\n (update)=\"onValueChange()\"\n (immediateUpdate)=\"onImmediateChange($event)\"\n />\n </div>\n}\n", styles: [".form-field-item{margin-bottom:16px}\n"], dependencies: [{ kind: "component", type: FormFieldItemComponent, selector: "ng-dhis2-ui-form-field-item" }] }); }
9893
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.3", type: FormFieldComponent, isStandalone: false, selector: "ng-dhis2-ui-form-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, fieldConfig: { classPropertyName: "fieldConfig", publicName: "fieldConfig", isSignal: true, isRequired: true, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: false, isRequired: false, transformFunction: null }, isCheckBoxButton: { classPropertyName: "isCheckBoxButton", publicName: "isCheckBoxButton", isSignal: true, isRequired: false, transformFunction: null }, fieldClass: { classPropertyName: "fieldClass", publicName: "fieldClass", isSignal: true, isRequired: false, transformFunction: null }, programRuleActions: { classPropertyName: "programRuleActions", publicName: "programRuleActions", isSignal: true, isRequired: false, transformFunction: null }, dataEntities: { classPropertyName: "dataEntities", publicName: "dataEntities", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, dataId: { classPropertyName: "dataId", publicName: "dataId", isSignal: true, isRequired: false, transformFunction: null }, customOrgUnitRoots: { classPropertyName: "customOrgUnitRoots", publicName: "customOrgUnitRoots", isSignal: true, isRequired: false, transformFunction: null }, program: { classPropertyName: "program", publicName: "program", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigs: { classPropertyName: "optionCascadeConfigs", publicName: "optionCascadeConfigs", isSignal: true, isRequired: false, transformFunction: null }, optionCascadeConfigMap: { classPropertyName: "optionCascadeConfigMap", publicName: "optionCascadeConfigMap", isSignal: true, isRequired: false, transformFunction: null }, coordinatePickerGeoConfig: { classPropertyName: "coordinatePickerGeoConfig", publicName: "coordinatePickerGeoConfig", isSignal: true, isRequired: false, transformFunction: null }, fieldControlKeyById: { classPropertyName: "fieldControlKeyById", publicName: "fieldControlKeyById", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fieldUpdate: "fieldUpdate", immediateFieldUpdate: "immediateFieldUpdate", runtimeOptionChange: "runtimeOptionChange" }, usesOnChanges: true, ngImport: i0, template: "@if (field(); as formField) {\n @let fieldError = runtimeError();\n @let isAssigned = isValueAssigned();\n @let fieldConfigValue = fieldConfig();\n @let cascadeConfigs = optionCascadeConfigs();\n @let entryFormCoordinatePickerGeoConfig = coordinatePickerGeoConfig();\n\n <div class=\"form-field-item\">\n <ng-dhis2-ui-form-field-item\n [field]=\"getDisplayField(formField)\"\n [fieldError]=\"fieldError\"\n [isValueAssigned]=\"isAssigned\"\n [fieldConfig]=\"fieldConfigValue\"\n [(form)]=\"form\"\n [programRuleOptions]=\"programRuleOptions()\"\n [runtimeOptions]=\"runtimeOptions\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [optionCascadeConfigs]=\"cascadeConfigs\"\n [optionCascadeConfigMap]=\"optionCascadeConfigMap()\"\n [fieldControlKeyById]=\"fieldControlKeyById()\"\n [coordinatePickerGeoConfig]=\"entryFormCoordinatePickerGeoConfig\"\n [program]=\"program()\"\n [value]=\"value()\"\n (update)=\"onValueChange()\"\n (immediateUpdate)=\"onImmediateChange($event)\"\n (runtimeOptionsChange)=\"onRuntimeOptionsChange($event)\"\n />\n </div>\n}\n", styles: [".form-field-item{margin-bottom:16px}\n"], dependencies: [{ kind: "component", type: FormFieldItemComponent, selector: "ng-dhis2-ui-form-field-item" }] }); }
9852
9894
  }
9853
9895
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.3", ngImport: i0, type: FormFieldComponent, decorators: [{
9854
9896
  type: Component,
9855
- args: [{ selector: 'ng-dhis2-ui-form-field', standalone: false, template: "@if (field(); as formField) {\n @let fieldError = runtimeError();\n @let isAssigned = isValueAssigned();\n @let fieldConfigValue = fieldConfig();\n @let cascadeConfigs = optionCascadeConfigs();\n @let entryFormCoordinatePickerGeoConfig = coordinatePickerGeoConfig();\n\n <div class=\"form-field-item\">\n <ng-dhis2-ui-form-field-item\n [field]=\"getDisplayField(formField)\"\n [fieldError]=\"fieldError\"\n [isValueAssigned]=\"isAssigned\"\n [fieldConfig]=\"fieldConfigValue\"\n [(form)]=\"form\"\n [programRuleOptions]=\"programRuleOptions()\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [optionCascadeConfigs]=\"cascadeConfigs\"\n [optionCascadeConfigMap]=\"optionCascadeConfigMap()\"\n [fieldControlKeyById]=\"fieldControlKeyById()\"\n [coordinatePickerGeoConfig]=\"entryFormCoordinatePickerGeoConfig\"\n [program]=\"program()\"\n [value]=\"value()\"\n (update)=\"onValueChange()\"\n (immediateUpdate)=\"onImmediateChange($event)\"\n />\n </div>\n}\n", styles: [".form-field-item{margin-bottom:16px}\n"] }]
9897
+ args: [{ selector: 'ng-dhis2-ui-form-field', standalone: false, template: "@if (field(); as formField) {\n @let fieldError = runtimeError();\n @let isAssigned = isValueAssigned();\n @let fieldConfigValue = fieldConfig();\n @let cascadeConfigs = optionCascadeConfigs();\n @let entryFormCoordinatePickerGeoConfig = coordinatePickerGeoConfig();\n\n <div class=\"form-field-item\">\n <ng-dhis2-ui-form-field-item\n [field]=\"getDisplayField(formField)\"\n [fieldError]=\"fieldError\"\n [isValueAssigned]=\"isAssigned\"\n [fieldConfig]=\"fieldConfigValue\"\n [(form)]=\"form\"\n [programRuleOptions]=\"programRuleOptions()\"\n [runtimeOptions]=\"runtimeOptions\"\n [dataId]=\"dataId()\"\n [customOrgUnitRoots]=\"customOrgUnitRoots()\"\n [optionCascadeConfigs]=\"cascadeConfigs\"\n [optionCascadeConfigMap]=\"optionCascadeConfigMap()\"\n [fieldControlKeyById]=\"fieldControlKeyById()\"\n [coordinatePickerGeoConfig]=\"entryFormCoordinatePickerGeoConfig\"\n [program]=\"program()\"\n [value]=\"value()\"\n (update)=\"onValueChange()\"\n (immediateUpdate)=\"onImmediateChange($event)\"\n (runtimeOptionsChange)=\"onRuntimeOptionsChange($event)\"\n />\n </div>\n}\n", styles: [".form-field-item{margin-bottom:16px}\n"] }]
9856
9898
  }], ctorParameters: () => [], propDecorators: { form: [{
9857
9899
  type: Input
9858
9900
  }], fieldUpdate: [{
@@ -10179,10 +10221,16 @@ class FormComponent {
10179
10221
  isFormInValid() {
10180
10222
  return this.form().invalid;
10181
10223
  }
10224
+ getOptionValue(option) {
10225
+ return String(option?.value ?? option?.code ?? option?.key ?? option?.id ?? '');
10226
+ }
10182
10227
  onRunTimeOptionUpdate(result) {
10183
10228
  if (this.fieldComponents) {
10184
10229
  const fieldToUpdate = this.fieldComponents.find((fieldComponent) => fieldComponent?.field()?.dependentField?.id === result?.field?.id);
10185
- const parentOption = result?.options.find((option) => option.code === this.form()?.value[result?.field?.id]);
10230
+ const selectedValue = String(this.form()?.value[result?.field?.id] ??
10231
+ this.form()?.value[result?.field?.key] ??
10232
+ '');
10233
+ const parentOption = result?.options.find((option) => this.getOptionValue(option) === selectedValue);
10186
10234
  fieldToUpdate?.onUpdateRuntimeOptions(parentOption?.options || []);
10187
10235
  }
10188
10236
  }
@@ -13188,7 +13236,10 @@ class ProgramEntryFormMetaData {
13188
13236
  async #getCustomFieldConfigurations() {
13189
13237
  try {
13190
13238
  const response = await this.d2.httpInstance.get('dataStore/field-extensions?fields=id,fieldOptionsDependsOn,optionSet&paging=false');
13191
- const entries = response?.data?.['entries'];
13239
+ const responseData = response?.data;
13240
+ const entries = Array.isArray(responseData)
13241
+ ? responseData
13242
+ : responseData?.['entries'];
13192
13243
  if (!Array.isArray(entries)) {
13193
13244
  return {};
13194
13245
  }