ngx-axis-appforge 0.0.74 → 0.0.75
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/axis-components/flex/index.d.ts +3 -0
- package/axis-components/table/index.d.ts +7 -3
- package/core/index.d.ts +10 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +16 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-flex-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs +32 -6
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +8 -3
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +60 -6
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +16 -3
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +126 -126
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { WritableSignal } from '@angular/core';
|
|
2
3
|
import { NzJustify, NzAlign, NzWrap } from 'ng-zorro-antd/flex';
|
|
3
4
|
import { BaseOptions, Base } from 'ngx-axis-appforge/core';
|
|
4
5
|
|
|
@@ -13,6 +14,8 @@ declare class FlexOptions extends BaseOptions {
|
|
|
13
14
|
|
|
14
15
|
declare class Flex extends Base<FlexOptions> {
|
|
15
16
|
options: FlexOptions;
|
|
17
|
+
readonly loopMap: _angular_core.Signal<Map<string, WritableSignal<any[]>>>;
|
|
18
|
+
constructor();
|
|
16
19
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Flex, never>;
|
|
17
20
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Flex, "axis-flex", never, {}, {}, never, never, true, never>;
|
|
18
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnDestroy, ElementRef } from '@angular/core';
|
|
2
|
+
import { OnDestroy, ElementRef, WritableSignal } from '@angular/core';
|
|
3
3
|
import { DataOptions, Base, EventHandlerOptions } from 'ngx-axis-appforge/core';
|
|
4
4
|
import { BaseTableOptions, SelectableTableOptions, ExpandableTableOptions, StatisticTableOptions, BaseTableFieldOptions, StatisticTableFieldOptions, TableFieldDisplayService, TableService, ExpandService, StatisticService, SelectService } from 'ngx-axis-appforge/axis-components/table-helper';
|
|
5
5
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
@@ -51,6 +51,8 @@ declare class TableOptions extends DataOptions implements BaseTableOptions, Sele
|
|
|
51
51
|
readonly expandRow: _angular_core.WritableSignal<any>;
|
|
52
52
|
}
|
|
53
53
|
declare class TableFieldOptions implements BaseTableFieldOptions, StatisticTableFieldOptions {
|
|
54
|
+
loop: boolean;
|
|
55
|
+
loopTarget: any[] | undefined;
|
|
54
56
|
readonly inuse: _angular_core.WritableSignal<boolean>;
|
|
55
57
|
readonly field: _angular_core.WritableSignal<string>;
|
|
56
58
|
readonly title: _angular_core.WritableSignal<string>;
|
|
@@ -117,17 +119,19 @@ declare class Table extends Base<TableOptions> {
|
|
|
117
119
|
constructor(elementRef: ElementRef, tableFieldDisplayService: TableFieldDisplayService, tableSvc: TableService<TableOptions, TableFieldOptions>, select: SelectService, expand: ExpandService, statistic: StatisticService, parentSelect?: SelectService);
|
|
118
120
|
options: TableOptions;
|
|
119
121
|
select: SelectService;
|
|
120
|
-
readonly scroll:
|
|
122
|
+
readonly scroll: WritableSignal<{
|
|
121
123
|
x: string;
|
|
122
124
|
y: string;
|
|
123
125
|
}>;
|
|
124
126
|
readonly fields: _angular_core.Signal<TableFieldOptions[]>;
|
|
125
127
|
readonly rowActions: _angular_core.Signal<any[]>;
|
|
126
128
|
readonly actionsFieldWidth: _angular_core.Signal<number>;
|
|
127
|
-
readonly fixFields:
|
|
129
|
+
readonly fixFields: WritableSignal<TableFieldOptions[]>;
|
|
128
130
|
readonly backendPageParamsChange: Subject<void>;
|
|
129
131
|
readonly customExportDataSubject: Subject<any[]>;
|
|
130
132
|
timer?: number;
|
|
133
|
+
readonly loopFieldMap: _angular_core.Signal<Map<string, WritableSignal<any[]>>>;
|
|
134
|
+
readonly loopFieldDataMap: WritableSignal<Map<TableFieldOptions, any>>;
|
|
131
135
|
callFunction<T>(name: String, args?: any): T | undefined;
|
|
132
136
|
resizeHandleOffsetX(field: TableFieldOptions): number;
|
|
133
137
|
tableSetter?: TableSetter;
|
package/core/index.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ declare class BaseOptions {
|
|
|
34
34
|
requiredPermissions: string[];
|
|
35
35
|
readonly triggeEvents: _angular_core.WritableSignal<TriggeEventsOptions | undefined>;
|
|
36
36
|
readonly style: _angular_core.WritableSignal<any>;
|
|
37
|
+
loop: boolean;
|
|
38
|
+
loopTarget: any[] | undefined;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
interface ApiOptions {
|
|
@@ -225,10 +227,12 @@ declare abstract class FunFieldValueBase extends FunFieldBase implements OnInit,
|
|
|
225
227
|
|
|
226
228
|
declare class OptionsNode {
|
|
227
229
|
protected config: OptionsNodeConfig;
|
|
230
|
+
canLoop: boolean;
|
|
228
231
|
constructor(config: OptionsNodeConfig);
|
|
229
232
|
get id(): string;
|
|
230
233
|
get parentId(): string | undefined;
|
|
231
234
|
get scopeId(): string | undefined;
|
|
235
|
+
set scopeId(scopeId: string);
|
|
232
236
|
get name(): string | undefined;
|
|
233
237
|
get dragType(): string | undefined;
|
|
234
238
|
get dropType(): string | undefined;
|
|
@@ -382,6 +386,7 @@ interface NextInfo {
|
|
|
382
386
|
indexOfParent?: string | number;
|
|
383
387
|
parentId?: string;
|
|
384
388
|
scopeId?: string;
|
|
389
|
+
canLoop?: boolean;
|
|
385
390
|
}
|
|
386
391
|
interface ScopeInfo {
|
|
387
392
|
scopeId: string;
|
|
@@ -484,6 +489,7 @@ declare const AXIS_DESIGN_OPTIONS_NODE_FOR_MENU: InjectionToken<{
|
|
|
484
489
|
current: OptionsNode;
|
|
485
490
|
parent?: OptionsNode;
|
|
486
491
|
}>;
|
|
492
|
+
declare const AXIS_DESIGN_CAN_LOOP_TOKEN: InjectionToken<boolean>;
|
|
487
493
|
declare const AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN: InjectionToken<(scopeId?: string) => BehaviorSubject<ScopeInfo[]>>;
|
|
488
494
|
declare const AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN: InjectionToken<{
|
|
489
495
|
component: string;
|
|
@@ -666,6 +672,7 @@ declare class BaseDesignSetting implements AfterViewInit {
|
|
|
666
672
|
readonly scopeId: _angular_core.InputSignal<string | undefined>;
|
|
667
673
|
readonly exclude: _angular_core.InputSignal<string[]>;
|
|
668
674
|
readonly allPermissions: [string, string][];
|
|
675
|
+
readonly canLoop: boolean;
|
|
669
676
|
fg: _angular_core.InputSignal<UntypedFormGroup>;
|
|
670
677
|
ngAfterViewInit(): void;
|
|
671
678
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseDesignSetting, never>;
|
|
@@ -674,6 +681,8 @@ declare class BaseDesignSetting implements AfterViewInit {
|
|
|
674
681
|
declare const baseFbConfig: {
|
|
675
682
|
id: ((typeof FormValidators.required)[] | undefined)[];
|
|
676
683
|
inuse: ((typeof FormValidators.requiredFun)[] | undefined)[];
|
|
684
|
+
loop: (boolean | (typeof FormValidators.required)[])[];
|
|
685
|
+
loopTarget: never[];
|
|
677
686
|
requiredPermissions: never[];
|
|
678
687
|
style: never[];
|
|
679
688
|
triggeEvents: never[];
|
|
@@ -853,5 +862,5 @@ declare function fn(fnBody: string, argsObj: any, ignoreUndefined?: boolean, pri
|
|
|
853
862
|
|
|
854
863
|
declare function sendApi(opt: ApiOptions, http: HttpClient): Observable<any>;
|
|
855
864
|
|
|
856
|
-
export { AXIS_COMPONENTS_LOADER_TOKEN, AXIS_COMPONENTS_TOKEN, AXIS_CURRENT_USER_PERMISSIONS_TOKEN, AXIS_DESIGN_ALL_PERMISSIONS_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_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 };
|
|
865
|
+
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_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 };
|
|
857
866
|
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_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_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';
|
|
@@ -1433,6 +1433,20 @@ class Design extends ValueAccess {
|
|
|
1433
1433
|
this.componentsCounter.set(nextInfo.currentObject.component, this.componentsCounter.get(nextInfo.currentObject.component) + 1);
|
|
1434
1434
|
const res = config.buildOptionsNodes?.(nextInfo);
|
|
1435
1435
|
if (res) {
|
|
1436
|
+
res.treeNode.canLoop = nextInfo.canLoop ?? false;
|
|
1437
|
+
if (nextInfo.canLoop && res.treeNode.options?.loop) {
|
|
1438
|
+
const newScope = {
|
|
1439
|
+
scopeId: res.treeNode.id + ".loop",
|
|
1440
|
+
scopeName: "循环",
|
|
1441
|
+
parentScopeId: nextInfo.scopeId,
|
|
1442
|
+
ds: {
|
|
1443
|
+
loopRow: res.treeNode.options.loopTarget?.[0] ?? "示例数据"
|
|
1444
|
+
},
|
|
1445
|
+
};
|
|
1446
|
+
res.newScopes ??= [];
|
|
1447
|
+
res.newScopes.push(newScope);
|
|
1448
|
+
res.treeNode.scopeId = newScope.scopeId;
|
|
1449
|
+
}
|
|
1436
1450
|
let nodes = [res.treeNode];
|
|
1437
1451
|
while (nodes.length) {
|
|
1438
1452
|
let next = [];
|
|
@@ -1600,6 +1614,7 @@ class Design extends ValueAccess {
|
|
|
1600
1614
|
if (optionsNode.settingType) {
|
|
1601
1615
|
const injector = Injector.create({
|
|
1602
1616
|
providers: [
|
|
1617
|
+
{ provide: AXIS_DESIGN_CAN_LOOP_TOKEN, useValue: optionsNode.canLoop },
|
|
1603
1618
|
{ provide: AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, useValue: this.buildScopeInfosGetter(optionsNode) },
|
|
1604
1619
|
{ provide: AXIS_DESIGN_COMPONENT_INFO_FOR_SETTING_TOKEN, useValue: this.buildComponentInfoForSetting(optionsNode) },
|
|
1605
1620
|
{ provide: AXIS_DESIGN_COMPONENT_REF_FOR_SETTING_TOKEN, useFactory: () => this.buildComponentRefForSetting(optionsNode) },
|