@acorex/platform 21.0.0-next.12 → 21.0.0-next.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.
package/core/index.d.ts CHANGED
@@ -1111,6 +1111,8 @@ interface AXPFileListItem {
1111
1111
  status: AXPFileStatus;
1112
1112
  source?: AXPFileSource;
1113
1113
  meta?: AXPMetaData;
1114
+ title?: string;
1115
+ description?: string;
1114
1116
  }
1115
1117
 
1116
1118
  interface AXPFilterClause extends AXDataSourceFilterOption {
@@ -2125,7 +2127,7 @@ declare class AXPExpressionEvaluatorScopeProviderContext {
2125
2127
  type AXPExpressionEvaluatorScopeProviders = AXPExpressionEvaluatorScopeProvider[] | (() => AXPExpressionEvaluatorScopeProvider[]);
2126
2128
  declare const AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER: InjectionToken<AXPExpressionEvaluatorScopeProviders>;
2127
2129
  declare class AXPExpressionEvaluatorScopeProviderService {
2128
- private providers;
2130
+ private readonly injector;
2129
2131
  private cache;
2130
2132
  private load;
2131
2133
  getScopesAsync(): Promise<AXPExpressionEvaluatorScope>;
@@ -1,5 +1,5 @@
1
1
  import * as i0 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';
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';
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';
@@ -915,17 +915,21 @@ class AXPExpressionEvaluatorScopeProviderContext {
915
915
  const AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER = new InjectionToken('AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER');
916
916
  class AXPExpressionEvaluatorScopeProviderService {
917
917
  constructor() {
918
- this.providers = inject(AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, { optional: true });
918
+ this.injector = inject(Injector);
919
919
  this.cache = null;
920
920
  }
921
921
  async load() {
922
922
  if (this.cache)
923
923
  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
+ : [];
924
930
  const context = new AXPExpressionEvaluatorScopeProviderContext();
925
- if (Array.isArray(this.providers)) {
926
- for (const provider of this.providers) {
927
- await provider.provide(context);
928
- }
931
+ for (const provider of providers) {
932
+ await provider.provide(context);
929
933
  }
930
934
  this.cache = context.getScopes();
931
935
  }