ngx-axis-appforge 0.0.85 → 0.0.87
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/scope/index.d.ts +3 -2
- package/axis-components/table-helper/index.d.ts +8 -4
- package/axis-components/transfer/index.d.ts +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs +6 -6
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs +33 -11
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +18 -7
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs +14 -6
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AfterViewInit } from '@angular/core';
|
|
2
3
|
import { BaseOptions, DataSourceOptions, Base, ScopeDirective, EventHandlerOptions } from 'ngx-axis-appforge/core';
|
|
3
4
|
import { Observable } from 'rxjs';
|
|
4
5
|
|
|
@@ -9,8 +10,8 @@ declare class ScopeOptions extends BaseOptions {
|
|
|
9
10
|
readonly isRoot: _angular_core.WritableSignal<boolean>;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
declare class Scope extends Base<ScopeOptions> {
|
|
13
|
-
|
|
13
|
+
declare class Scope extends Base<ScopeOptions> implements AfterViewInit {
|
|
14
|
+
ngAfterViewInit(): void;
|
|
14
15
|
options: ScopeOptions;
|
|
15
16
|
childScope: ScopeDirective;
|
|
16
17
|
triggeEvents(trigger: string, tempDataSource?: any, triggeEvents?: {
|
|
@@ -144,8 +144,9 @@ declare class TableService<T extends BaseTableOptions, F extends BaseTableFieldO
|
|
|
144
144
|
|
|
145
145
|
declare const AXIS_TABLE_SELECT_TOKEN: InjectionToken<SelectService>;
|
|
146
146
|
declare enum ChangeScene {
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
refreshHeader = 0,
|
|
148
|
+
userClick = 1,
|
|
149
|
+
linkage = 2
|
|
149
150
|
}
|
|
150
151
|
declare class SelectService {
|
|
151
152
|
private scope?;
|
|
@@ -165,6 +166,9 @@ declare class SelectService {
|
|
|
165
166
|
readonly setOfDisabledId: i0.WritableSignal<Set<any>>;
|
|
166
167
|
private subs;
|
|
167
168
|
private readonly subSelects;
|
|
169
|
+
private readonly useBackEndPaging;
|
|
170
|
+
private readonly dataCache;
|
|
171
|
+
readonly selectedRows: Signal<any[] | undefined>;
|
|
168
172
|
private get rows();
|
|
169
173
|
init(opts: {
|
|
170
174
|
options: SelectableTableOptions;
|
|
@@ -186,8 +190,8 @@ declare class SelectService {
|
|
|
186
190
|
onItemChecked(row: any, checked: boolean, scene?: ChangeScene): void;
|
|
187
191
|
onSetItemsChecked(rows: any[], scene?: ChangeScene): void;
|
|
188
192
|
updateCheckedSet(key: string, checked: boolean, indeterminate?: boolean): void;
|
|
189
|
-
refreshCheckedStatus(scene
|
|
190
|
-
|
|
193
|
+
refreshCheckedStatus(scene?: ChangeScene): void;
|
|
194
|
+
buildSelectedData(): any[] | undefined;
|
|
191
195
|
close(): void;
|
|
192
196
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectService, [{ optional: true; }]>;
|
|
193
197
|
static ɵprov: i0.ɵɵInjectableDeclaration<SelectService>;
|
|
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { WritableSignal } from '@angular/core';
|
|
3
3
|
import { ValueAccessOptions, ValueAccess } from 'ngx-axis-appforge/core';
|
|
4
4
|
import { BaseTableOptions, BaseTableFieldOptions, TableService } from 'ngx-axis-appforge/axis-components/table-helper';
|
|
5
|
-
import { TransferItem } from 'ng-zorro-antd/transfer';
|
|
5
|
+
import { TransferItem, TransferChange } from 'ng-zorro-antd/transfer';
|
|
6
6
|
|
|
7
7
|
declare class TransferOptions extends ValueAccessOptions {
|
|
8
8
|
readonly labelField: WritableSignal<string>;
|
|
@@ -105,7 +105,7 @@ declare class Transfer extends ValueAccess<TransferOptions> {
|
|
|
105
105
|
private valueToTransferValue;
|
|
106
106
|
onSelectChange(value: any): void;
|
|
107
107
|
openModal(): void;
|
|
108
|
-
onTransferChange(
|
|
108
|
+
onTransferChange(e: TransferChange): void;
|
|
109
109
|
onModalOk(): void;
|
|
110
110
|
onModalCancel(): void;
|
|
111
111
|
private buildFields;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal,
|
|
2
|
+
import { signal, untracked, ViewChild, Component } from '@angular/core';
|
|
3
3
|
import { BaseOptions, Base, ScopeDirective, DynamicDirective } from 'ngx-axis-appforge/core';
|
|
4
4
|
import { of } from 'rxjs';
|
|
5
5
|
|
|
@@ -11,9 +11,9 @@ class ScopeOptions extends BaseOptions {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
class Scope extends Base {
|
|
14
|
-
|
|
15
|
-
super();
|
|
16
|
-
|
|
14
|
+
ngAfterViewInit() {
|
|
15
|
+
super.ngAfterViewInit();
|
|
16
|
+
this.listenDataChange();
|
|
17
17
|
}
|
|
18
18
|
options = new ScopeOptions();
|
|
19
19
|
childScope;
|
|
@@ -56,13 +56,13 @@ class Scope extends Base {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: Scope, deps:
|
|
59
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: Scope, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
60
60
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: Scope, isStandalone: true, selector: "axis-scope", viewQueries: [{ propertyName: "childScope", first: true, predicate: ScopeDirective, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-container [axisScope]=\"options.id\" [scopeName]=\"options.scopeName()\" [isRoot]=\"true\"\n [dataSources]=\"options.dataSources()\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</ng-container>", styles: [":host{display:block;width:100%;height:100%;position:relative}\n"], dependencies: [{ kind: "directive", type: ScopeDirective, selector: "[axisScope]", inputs: ["axisScope", "scopeName", "isRoot", "dataSources"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign", "forceRenderOnChange"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }] });
|
|
61
61
|
}
|
|
62
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: Scope, decorators: [{
|
|
63
63
|
type: Component,
|
|
64
64
|
args: [{ selector: 'axis-scope', imports: [ScopeDirective, DynamicDirective], template: "<ng-container [axisScope]=\"options.id\" [scopeName]=\"options.scopeName()\" [isRoot]=\"true\"\n [dataSources]=\"options.dataSources()\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</ng-container>", styles: [":host{display:block;width:100%;height:100%;position:relative}\n"] }]
|
|
65
|
-
}],
|
|
65
|
+
}], propDecorators: { childScope: [{
|
|
66
66
|
type: ViewChild,
|
|
67
67
|
args: [ScopeDirective, { static: true }]
|
|
68
68
|
}] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-axis-appforge-axis-components-scope.mjs","sources":["../../../axis-components/scope/scope.options.ts","../../../axis-components/scope/scope.ts","../../../axis-components/scope/scope.html","../../../axis-components/scope/ngx-axis-appforge-axis-components-scope.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { BaseOptions, DataSourceOptions } from \"ngx-axis-appforge/core\";\n\nexport class ScopeOptions extends BaseOptions {\n readonly scopeName = signal(\"未命名\");\n readonly dataSources = signal<DataSourceOptions[]>([]);\n readonly child = signal<any>(undefined);\n readonly isRoot = signal(true);\n}","import { Component, effect, untracked, ViewChild } from '@angular/core';\nimport { ScopeOptions } from './scope.options';\nimport { ScopeDirective, DynamicDirective, Base, EventHandlerOptions } from 'ngx-axis-appforge/core';\nimport { Observable, of } from 'rxjs';\n\n@Component({\n selector: 'axis-scope',\n imports: [ScopeDirective, DynamicDirective],\n templateUrl: './scope.html',\n styleUrl: './scope.css',\n})\nexport class Scope extends Base<ScopeOptions> {\n\n
|
|
1
|
+
{"version":3,"file":"ngx-axis-appforge-axis-components-scope.mjs","sources":["../../../axis-components/scope/scope.options.ts","../../../axis-components/scope/scope.ts","../../../axis-components/scope/scope.html","../../../axis-components/scope/ngx-axis-appforge-axis-components-scope.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { BaseOptions, DataSourceOptions } from \"ngx-axis-appforge/core\";\n\nexport class ScopeOptions extends BaseOptions {\n readonly scopeName = signal(\"未命名\");\n readonly dataSources = signal<DataSourceOptions[]>([]);\n readonly child = signal<any>(undefined);\n readonly isRoot = signal(true);\n}","import { AfterViewInit, Component, effect, untracked, ViewChild } from '@angular/core';\nimport { ScopeOptions } from './scope.options';\nimport { ScopeDirective, DynamicDirective, Base, EventHandlerOptions } from 'ngx-axis-appforge/core';\nimport { Observable, of } from 'rxjs';\n\n@Component({\n selector: 'axis-scope',\n imports: [ScopeDirective, DynamicDirective],\n templateUrl: './scope.html',\n styleUrl: './scope.css',\n})\nexport class Scope extends Base<ScopeOptions> implements AfterViewInit {\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this.listenDataChange();\n }\n\n override options: ScopeOptions = new ScopeOptions();\n\n @ViewChild(ScopeDirective, { static: true })\n childScope!: ScopeDirective;\n\n override triggeEvents(trigger: string, tempDataSource?: any, triggeEvents?: { [trigger: string]: EventHandlerOptions<any>[]; }, scope?: ScopeDirective): Observable<boolean> {\n return super.triggeEvents(trigger, tempDataSource, triggeEvents, scope ?? this.childScope);\n }\n\n override triggeEvent(e: EventHandlerOptions<unknown>, scope?: ScopeDirective): Observable<boolean> {\n return super.triggeEvent(e, scope ?? this.childScope);\n }\n\n override onEvents(e: EventHandlerOptions<any>): Observable<boolean> | undefined {\n const obs = super.onEvents?.(e);\n if (obs) {\n return;\n }\n switch (e.name) {\n case \"triggeEvent\":\n if (e.data.target === \"component\") {\n return this.childScope.findInstance(e.data.id)?.triggeEvents(e.data.name, e.data.data) ?? of(false);\n } else {\n return this.triggeEvents(e.data.name, e.data.data);\n }\n }\n return undefined;\n }\n\n\n listenDataChange(): void {\n this.unsubscribe([\"dataChange\"]);\n const dataChangeHandlers = this.options.triggeEvents()?.[\"dataChange\"];\n untracked(() => {\n if (dataChangeHandlers) {\n for (const handler of dataChangeHandlers) {\n const io = this.childScope.dynamicOptions(handler, true);\n if (io.init) {\n this.triggeEvents(\"dataChange\", undefined, { dataChange: [handler] }).subscribe();\n }\n if (io.obs) {\n this.addSubscribe(io.obs.subscribe(_ => this.triggeEvents(\"dataChange\", undefined, { dataChange: [handler] }).subscribe()), \"dataChange\");\n }\n }\n }\n });\n }\n\n}\n","<ng-container [axisScope]=\"options.id\" [scopeName]=\"options.scopeName()\" [isRoot]=\"true\"\n [dataSources]=\"options.dataSources()\">\n <ng-container [axisDynamic]=\"options.child()\"></ng-container>\n</ng-container>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './scope';\n"],"names":[],"mappings":";;;;;AAGM,MAAO,YAAa,SAAQ,WAAW,CAAA;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAsB,EAAE,uDAAC;AAC7C,IAAA,KAAK,GAAG,MAAM,CAAM,SAAS,iDAAC;AAC9B,IAAA,MAAM,GAAG,MAAM,CAAC,IAAI,kDAAC;AACjC;;ACGK,MAAO,KAAM,SAAQ,IAAkB,CAAA;IAElC,eAAe,GA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A,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,YAAA,EAAA,UAAA,EAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,sBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAI/B,KAAK,EAAA,UAAA,EAAA,CAAA;kBANjB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAAA,OAAA,EACb,CAAC,cAAc,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,oOAAA,EAAA,MAAA,EAAA,CAAA,iEAAA,CAAA,EAAA;;sBAa1C,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;;AEpB7C;;AAEG;;;;"}
|
|
@@ -274,7 +274,7 @@ class TableService {
|
|
|
274
274
|
this.tableData.set(data);
|
|
275
275
|
}
|
|
276
276
|
buildRowsGroupMap() {
|
|
277
|
-
return this._buildRowsGroupMap(this.tableData(), this.useBackEndPaging());
|
|
277
|
+
return this._buildRowsGroupMap(this.useBackEndPaging() ? this.data() : this.tableData(), this.useBackEndPaging());
|
|
278
278
|
}
|
|
279
279
|
buildRowsGroupMapForExport() {
|
|
280
280
|
return this._buildRowsGroupMap(this.tableDataForExport(), false, this.groupAbleFieldsForExport());
|
|
@@ -575,8 +575,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
575
575
|
const AXIS_TABLE_SELECT_TOKEN = new InjectionToken('axis.tableSelect');
|
|
576
576
|
var ChangeScene;
|
|
577
577
|
(function (ChangeScene) {
|
|
578
|
-
ChangeScene[ChangeScene["
|
|
579
|
-
ChangeScene[ChangeScene["
|
|
578
|
+
ChangeScene[ChangeScene["refreshHeader"] = 0] = "refreshHeader";
|
|
579
|
+
ChangeScene[ChangeScene["userClick"] = 1] = "userClick";
|
|
580
|
+
ChangeScene[ChangeScene["linkage"] = 2] = "linkage";
|
|
580
581
|
})(ChangeScene || (ChangeScene = {}));
|
|
581
582
|
class SelectService {
|
|
582
583
|
scope;
|
|
@@ -603,8 +604,11 @@ class SelectService {
|
|
|
603
604
|
setOfDisabledId = signal(new Set(), ...(ngDevMode ? [{ debugName: "setOfDisabledId" }] : []));
|
|
604
605
|
subs = [];
|
|
605
606
|
subSelects = new Map();
|
|
607
|
+
useBackEndPaging = computed(() => this.options.showPagination() && this.options.useBackEndPaging(), ...(ngDevMode ? [{ debugName: "useBackEndPaging" }] : []));
|
|
608
|
+
dataCache = new Map();
|
|
609
|
+
selectedRows = computed(() => this.buildSelectedData(), ...(ngDevMode ? [{ debugName: "selectedRows" }] : []));
|
|
606
610
|
get rows() {
|
|
607
|
-
if (this.
|
|
611
|
+
if (this.useBackEndPaging()) {
|
|
608
612
|
return this.data()?.rows;
|
|
609
613
|
}
|
|
610
614
|
else {
|
|
@@ -621,7 +625,6 @@ class SelectService {
|
|
|
621
625
|
setOfCheckedId.add(item);
|
|
622
626
|
}
|
|
623
627
|
this.setOfCheckedId.set(setOfCheckedId);
|
|
624
|
-
untracked(() => this.refreshCheckedStatus(ChangeScene.userClick));
|
|
625
628
|
if (opts.onSelectedChange) {
|
|
626
629
|
this.subs.push(this.changeSubject.subscribe(_ => {
|
|
627
630
|
opts.onSelectedChange(this.setOfCheckedId());
|
|
@@ -731,7 +734,7 @@ class SelectService {
|
|
|
731
734
|
this.setOfCheckedId().delete(key);
|
|
732
735
|
}
|
|
733
736
|
}
|
|
734
|
-
refreshCheckedStatus(scene) {
|
|
737
|
+
refreshCheckedStatus(scene = ChangeScene.userClick) {
|
|
735
738
|
const listOfEnabledData = this.rows?.filter(row => !this.setOfDisabledId().has(row[this.keyField])) ?? [];
|
|
736
739
|
const checked = listOfEnabledData.length > 0 && listOfEnabledData.every(row => this.setOfCheckedId().has(row[this.keyField]) && !this.setOfIndeterminateId().has(row[this.keyField]));
|
|
737
740
|
if (checked) {
|
|
@@ -741,12 +744,31 @@ class SelectService {
|
|
|
741
744
|
const indeterminate = listOfEnabledData.some(row => this.setOfCheckedId().has(row[this.keyField]) || this.setOfIndeterminateId().has(row[this.keyField])) && !checked;
|
|
742
745
|
this.headerChecked.set(indeterminate ? "indeterminate" : "none");
|
|
743
746
|
}
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
+
if (scene != ChangeScene.refreshHeader) {
|
|
748
|
+
this.setOfCheckedId.set(new Set([...this.setOfCheckedId()]));
|
|
749
|
+
this.setOfIndeterminateId.set(new Set([...this.setOfIndeterminateId()]));
|
|
750
|
+
this.changeSubject.next(scene);
|
|
751
|
+
}
|
|
747
752
|
}
|
|
748
|
-
|
|
749
|
-
|
|
753
|
+
buildSelectedData() {
|
|
754
|
+
if (this.useBackEndPaging()) {
|
|
755
|
+
const res = [];
|
|
756
|
+
if (this.rows) {
|
|
757
|
+
for (const row of this.rows) {
|
|
758
|
+
if (this.dataCache.has(row[this.keyField])) {
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
761
|
+
this.dataCache.set(row[this.keyField], row);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
for (const id of this.setOfCheckedId()) {
|
|
765
|
+
res.push(this.dataCache.get(id));
|
|
766
|
+
}
|
|
767
|
+
return res;
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
return this.rows?.filter(row => this.setOfCheckedId().has(row[this.keyField]));
|
|
771
|
+
}
|
|
750
772
|
}
|
|
751
773
|
close() {
|
|
752
774
|
for (const sub of this.subs) {
|