@masterteam/forms 0.0.71 → 0.0.72

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.
@@ -14,7 +14,7 @@ import { Tabs } from '@masterteam/components/tabs';
14
14
  import { DynamicForm } from '@masterteam/forms/dynamic-form';
15
15
  import { Icon } from '@masterteam/icons';
16
16
  import { HttpClient, HttpContext } from '@angular/common/http';
17
- import { ValidatorConfig, TextFieldConfig, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, MultiSelectFieldConfig, UserSearchFieldConfig, REQUEST_CONTEXT, UploadFileFieldConfig, ToggleFieldConfig, DateFieldConfig, SliderFieldConfig, NumberFieldConfig, EditorFieldConfig, LookupMatrixFieldConfig } from '@masterteam/components';
17
+ import { ValidatorConfig, TextFieldConfig, EntityListFieldConfig, REQUEST_CONTEXT, SchedulePredecessorFieldConfig, SchemaConnectionFieldConfig, SelectFieldConfig, MultiSelectFieldConfig, UserSearchFieldConfig, UploadFileFieldConfig, ToggleFieldConfig, DateFieldConfig, SliderFieldConfig, NumberFieldConfig, EditorFieldConfig, LookupMatrixFieldConfig } from '@masterteam/components';
18
18
  import { TranslocoService, TranslocoDirective, TranslocoPipe } from '@jsverse/transloco';
19
19
 
20
20
  /**
@@ -485,6 +485,22 @@ function mapFieldToConfig(field, lang, lookups, context, readonly = false, teamM
485
485
  }
486
486
  : null,
487
487
  });
488
+ // ── EntityList (related items list) ────────────────────
489
+ case 'EntityList':
490
+ return new EntityListFieldConfig({
491
+ ...base,
492
+ propertyId: prop?.propertyId ?? null,
493
+ configuration: prop?.configuration ?? null,
494
+ runtimeContext: context
495
+ ? {
496
+ sourceId: context.moduleDataId ?? context.levelDataId ?? null,
497
+ levelDataId: context.levelDataId ?? null,
498
+ }
499
+ : null,
500
+ context: new HttpContext().set(REQUEST_CONTEXT, {
501
+ useBaseUrl: false,
502
+ }),
503
+ });
488
504
  // ── Fallback ──────────────────────────────────────────────
489
505
  default:
490
506
  return new TextFieldConfig(base);