@acorex/platform 21.0.0-next.15 → 21.0.0-next.16

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/core/index.d.ts CHANGED
@@ -2127,7 +2127,7 @@ declare class AXPExpressionEvaluatorScopeProviderContext {
2127
2127
  type AXPExpressionEvaluatorScopeProviders = AXPExpressionEvaluatorScopeProvider[] | (() => AXPExpressionEvaluatorScopeProvider[]);
2128
2128
  declare const AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER: InjectionToken<AXPExpressionEvaluatorScopeProviders>;
2129
2129
  declare class AXPExpressionEvaluatorScopeProviderService {
2130
- private readonly injector;
2130
+ private providers;
2131
2131
  private cache;
2132
2132
  private load;
2133
2133
  getScopesAsync(): Promise<AXPExpressionEvaluatorScope>;
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, Directive, computed, Injector, ChangeDetectionStrategy, Component, input, ElementRef, ViewContainerRef, signal, effect, runInInjectionContext, Optional, Inject, NgModule, EventEmitter, HostListener, Output, provideAppInitializer, Pipe } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, Directive, computed, ChangeDetectionStrategy, Component, input, ElementRef, Injector, ViewContainerRef, signal, effect, runInInjectionContext, Optional, Inject, NgModule, EventEmitter, HostListener, Output, provideAppInitializer, Pipe } from '@angular/core';
3
3
  import { get, isPlainObject, set, isNil, isEmpty, isArray, merge, isObjectLike, transform, isEqual, differenceWith, union, cloneDeep, sortBy, isUndefined, endsWith, startsWith, includes, lte, gte, lt, gt, orderBy } from 'lodash-es';
4
4
  import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
5
5
  import * as i1 from '@acorex/components/skeleton';
@@ -655,8 +655,6 @@ function getSmart(obj, smartPath) {
655
655
  });
656
656
  }
657
657
  function extractValue(value, key = 'id') {
658
- console.log('value', value);
659
- console.log('key', key);
660
658
  if (isNil(value)) {
661
659
  return null;
662
660
  }
@@ -915,21 +913,17 @@ class AXPExpressionEvaluatorScopeProviderContext {
915
913
  const AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER = new InjectionToken('AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER');
916
914
  class AXPExpressionEvaluatorScopeProviderService {
917
915
  constructor() {
918
- this.injector = inject(Injector);
916
+ this.providers = inject(AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, { optional: true });
919
917
  this.cache = null;
920
918
  }
921
919
  async load() {
922
920
  if (this.cache)
923
921
  return;
924
- const raw = this.injector.get(AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, [], { optional: true });
925
- const providers = Array.isArray(raw)
926
- ? raw
927
- : typeof raw === 'function'
928
- ? raw()
929
- : [];
930
922
  const context = new AXPExpressionEvaluatorScopeProviderContext();
931
- for (const provider of providers) {
932
- await provider.provide(context);
923
+ if (Array.isArray(this.providers)) {
924
+ for (const provider of this.providers) {
925
+ await provider.provide(context);
926
+ }
933
927
  }
934
928
  this.cache = context.getScopes();
935
929
  }