@messaia/cdk 22.0.1-rc.12 → 22.0.1-rc.13

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.
@@ -16603,7 +16603,7 @@ class AbstractSelectFormField extends AbstractMatFormField {
16603
16603
  this.filterable = this.enumMetadata != null;
16604
16604
  /* Rebuild enum options from metadata so dynamic hide and disable callbacks re-run. */
16605
16605
  this.options = this.enumMetadata
16606
- ? EnumService.applyMetadata(this.enum, this.enumMetadata, this.getEnumContext())
16606
+ ? EnumService.applyMetadata(this.enum, this.enumMetadata, this.context)
16607
16607
  : EnumService.toArray(this.enum, this.prefix);
16608
16608
  /* Apply optional enum-level filter after metadata transformation. */
16609
16609
  if (this._enumFilter && this.options) {
@@ -16612,40 +16612,6 @@ class AbstractSelectFormField extends AbstractMatFormField {
16612
16612
  /* Keep filtered list synchronized with rebuilt options. */
16613
16613
  this.filteredOptions = this.options;
16614
16614
  }
16615
- /**
16616
- * @description Creates an enriched metadata context containing the latest form state.
16617
- * @returns {any} Metadata context used by EnumMetadata hide and disable callbacks.
16618
- */
16619
- getEnumContext() {
16620
- /* Resolve root form state so metadata callbacks can evaluate against current values. */
16621
- const rootControl = this.ngControl?.control?.root;
16622
- const formValue = rootControl?.getRawValue?.() ?? rootControl?.value;
16623
- /* Fall back to original context when form state or context is unavailable. */
16624
- if (this.context == null || formValue == null) {
16625
- return this.context;
16626
- }
16627
- /* For primitive contexts, create an explicit wrapper payload with form information. */
16628
- if (typeof this.context !== 'object' && typeof this.context !== 'function') {
16629
- return {
16630
- context: this.context,
16631
- data: this.context,
16632
- entity: formValue,
16633
- formValue: formValue,
16634
- formGroup: rootControl
16635
- };
16636
- }
16637
- /* Preserve prototype access to context methods while attaching fresh runtime fields. */
16638
- const enumContext = Object.create(this.context);
16639
- /* Define own properties to avoid writing to getter-only members on inherited contexts. */
16640
- Object.defineProperties(enumContext, {
16641
- context: { value: this.context, enumerable: true, configurable: true, writable: true },
16642
- data: { value: this.context?.data ?? this.context, enumerable: true, configurable: true, writable: true },
16643
- entity: { value: formValue, enumerable: true, configurable: true, writable: true },
16644
- formValue: { value: formValue, enumerable: true, configurable: true, writable: true },
16645
- formGroup: { value: rootControl, enumerable: true, configurable: true, writable: true }
16646
- });
16647
- return enumContext;
16648
- }
16649
16615
  /**
16650
16616
  * Log to console
16651
16617
  * @param message