ngx-axis-appforge 0.0.78 → 0.0.79

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.
@@ -216,6 +216,7 @@ declare class Design extends ValueAccess<DesignOptions> implements OnDestroy {
216
216
  readonly chooseComponentVisible: _angular_core.ModelSignal<boolean>;
217
217
  readonly chooseComponentSubject: Subject<Example | undefined>;
218
218
  readonly chooseComponentTags: _angular_core.WritableSignal<string[]>;
219
+ readonly refreshScopeInfosSubject: Subject<string | undefined>;
219
220
  cacheSized: [number, number];
220
221
  setting: ViewContainerRef;
221
222
  settingRef?: ComponentRef<FunFieldValueBase>;
@@ -12,6 +12,7 @@ declare class TransferOptions extends ValueAccessOptions {
12
12
  readonly allowInvalidValue: WritableSignal<boolean>;
13
13
  readonly data: WritableSignal<any>;
14
14
  readonly type: WritableSignal<"normal" | "table">;
15
+ readonly listStyle: WritableSignal<any>;
15
16
  readonly oneWay: WritableSignal<boolean>;
16
17
  readonly modalTitle: WritableSignal<string>;
17
18
  readonly titles: WritableSignal<string>;
package/core/index.d.ts CHANGED
@@ -491,6 +491,7 @@ declare const AXIS_DESIGN_OPTIONS_NODE_FOR_MENU: InjectionToken<{
491
491
  }>;
492
492
  declare const AXIS_DESIGN_CAN_LOOP_TOKEN: InjectionToken<boolean>;
493
493
  declare const AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN: InjectionToken<(scopeId?: string) => BehaviorSubject<ScopeInfo[]>>;
494
+ declare const AXIS_DESIGN_SCOPE_INFOS_REFRESH_TOKEN: InjectionToken<BehaviorSubject<string | undefined>>;
494
495
  declare const AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN: InjectionToken<{
495
496
  component: string;
496
497
  componentName: string;
@@ -572,6 +573,7 @@ declare class FunField implements ControlValueAccessor, OnDestroy, AfterContentI
572
573
  readonly onlyFun: _angular_core.InputSignal<boolean>;
573
574
  readonly noListen: _angular_core.InputSignal<boolean>;
574
575
  readonly disabled: _angular_core.InputSignal<boolean>;
576
+ readonly scopeInfosRefresh: BehaviorSubject<string | undefined> | null;
575
577
  readonly getScopeInfos: ((scopeId?: string) => BehaviorSubject<ScopeInfo[]>) | null;
576
578
  readonly scopeInfos: _angular_core.Signal<ScopeInfo[] | undefined>;
577
579
  readonly scripts: {
@@ -863,5 +865,5 @@ declare function fn(fnBody: string, argsObj: any, ignoreUndefined?: boolean, pri
863
865
 
864
866
  declare function sendApi(opt: ApiOptions, http: HttpClient): Observable<any>;
865
867
 
866
- export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FILE_BASE_URL_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_HTTP_CONTEXT_TOKEN, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_SCRIPTS_TOKEN, Base, BaseDesignSetting, BaseMenu, BaseOptions, CommonMenu, ComponentsLoader, DataHandler, DataOptions, DesignBuilder, DynamicDirective, ElementNode, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, InputValidator, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, buildValidators, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, sendApi, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
868
+ export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_DESIGN_SCOPE_INFOS_REFRESH_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FILE_BASE_URL_TOKEN, AXIS_FORM_REGISTE_CONTROL_TOKEN, AXIS_FORM_UNREGISTE_CONTROL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_HTTP_CONTEXT_TOKEN, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_SCRIPTS_TOKEN, Base, BaseDesignSetting, BaseMenu, BaseOptions, CommonMenu, ComponentsLoader, DataHandler, DataOptions, DesignBuilder, DynamicDirective, ElementNode, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, InputValidator, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, buildValidators, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, sendApi, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
867
869
  export type { Cmplib, DataSourceOptions, DesignBindElementsResult, DesignBuildResult, DesignConfig, DynamicFnOptions, EventDesc, EventHandlerDesc, EventHandlerDescGroup, EventHandlerOptions, EventsHandler, Example, ExampleBuilder, ExampleDesc, ExampleGroup, FlatNode, FunFieldOptions, FunFieldValue, MyErrorsOptions, MyValidationErrors, NextInfo, OptionsChangeEvent, RegisteFormControlOptions, RegisteValueAccessOptions, ScopeInfo, TriggeEventsOptions };
@@ -18,7 +18,7 @@ import { BehaviorSubject, combineLatest, auditTime, tap, map, filter, take, debo
18
18
  import * as i3$1 from 'ng-zorro-antd/flex';
19
19
  import { NzFlexModule } from 'ng-zorro-antd/flex';
20
20
  import { SelectionModel } from '@angular/cdk/collections';
21
- import { FilteredTreeResult, AXIS_FILE_BASE_URL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_COMPONENTS_LOADER_TOKEN, ScopeDirective, DynamicDirective, DesignBuilder, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, isEquals, ValueAccessOptions, copy, HowLongPipe, ValueAccess, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, OptionsNode } from 'ngx-axis-appforge/core';
21
+ import { FilteredTreeResult, AXIS_FILE_BASE_URL_TOKEN, AXIS_HTTP_CONTEXT_DATA_TOKEN, AXIS_COMPONENTS_LOADER_TOKEN, ScopeDirective, DynamicDirective, DesignBuilder, AXIS_INJECT_DATA_TOKEN, AXIS_INJECT_FUNC_TOKEN, AXIS_DESIGN_CMPLIBS_TOKEN, isEquals, ValueAccessOptions, copy, HowLongPipe, ValueAccess, AXIS_DESIGN_CAN_LOOP_TOKEN, AXIS_DESIGN_SCOPE_INFOS_REFRESH_TOKEN, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_TOKEN, AXIS_DESIGN_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_CHOOSE_COMPONENT_FUNC_TOKEN, OptionsNode } from 'ngx-axis-appforge/core';
22
22
  import * as i6 from 'ng-zorro-antd/button';
23
23
  import { NzButtonModule } from 'ng-zorro-antd/button';
24
24
  import * as i9 from 'ng-zorro-antd/tooltip';
@@ -1392,6 +1392,7 @@ class Design extends ValueAccess {
1392
1392
  chooseComponentVisible = model(false, ...(ngDevMode ? [{ debugName: "chooseComponentVisible" }] : []));
1393
1393
  chooseComponentSubject = new Subject();
1394
1394
  chooseComponentTags = signal([], ...(ngDevMode ? [{ debugName: "chooseComponentTags" }] : []));
1395
+ refreshScopeInfosSubject = new Subject();
1395
1396
  cacheSized = [300, 300];
1396
1397
  setting;
1397
1398
  settingRef;
@@ -1525,6 +1526,7 @@ class Design extends ValueAccess {
1525
1526
  this.loadSetting(e.nextNodeId);
1526
1527
  }
1527
1528
  }
1529
+ this.refreshScopeInfosSubject.next(undefined);
1528
1530
  });
1529
1531
  this.onChange?.(this.value());
1530
1532
  if (putHistory) {
@@ -1603,6 +1605,7 @@ class Design extends ValueAccess {
1603
1605
  this.settingOptionsNodeId = nodeId;
1604
1606
  this.settingOptionsStr.set(JSON.stringify(newNode.options, null, " "));
1605
1607
  this.settingRef?.instance.writeValue(newNode.options);
1608
+ this.refreshScopeInfosSubject.next(undefined);
1606
1609
  return;
1607
1610
  }
1608
1611
  }
@@ -1618,7 +1621,8 @@ class Design extends ValueAccess {
1618
1621
  const injector = Injector.create({
1619
1622
  providers: [
1620
1623
  { provide: AXIS_DESIGN_CAN_LOOP_TOKEN, useValue: optionsNode.canLoop },
1621
- { provide: AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, useValue: this.buildScopeInfosGetter(optionsNode) },
1624
+ { provide: AXIS_DESIGN_SCOPE_INFOS_REFRESH_TOKEN, useValue: this.refreshScopeInfosSubject },
1625
+ { provide: AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, useValue: this.buildScopeInfosGetter() },
1622
1626
  { provide: AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, useValue: this.buildComponentInfoForSetting(optionsNode) },
1623
1627
  { provide: AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, useFactory: () => this.buildComponentRefForSetting(optionsNode) },
1624
1628
  { provide: AXIS_DESIGN_COMPONENT_REF_GETTER_TOKEN, useValue: (nodeId) => this.preview.getComponentRef(nodeId) },
@@ -1636,10 +1640,10 @@ class Design extends ValueAccess {
1636
1640
  this.resetSetting();
1637
1641
  }
1638
1642
  }
1639
- buildScopeInfosGetter(optionsNode) {
1640
- const _scopeId = optionsNode.scopeId;
1643
+ buildScopeInfosGetter() {
1641
1644
  return (scopeId) => {
1642
- scopeId ??= _scopeId;
1645
+ const node = this.optionsNodes.get(this.settingOptionsNodeId);
1646
+ scopeId ??= node?.scopeId;
1643
1647
  if (scopeId) {
1644
1648
  if (!this.scopInfoSubjects.has(scopeId)) {
1645
1649
  this.scopInfoSubjects.set(scopeId, this.buildScopeInfoSubject(scopeId));