ngx-axis-appforge 0.0.49 → 0.0.50

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.
@@ -1,16 +1,20 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnDestroy, WritableSignal } from '@angular/core';
3
3
  import { ValueAccessOptions, ValueAccess, RegisteValueAccessOptions } from 'ngx-axis-appforge/core';
4
- import { BaseTableOptions, SelectableTableOptions, BaseTableFieldOptions, TableService, SelectService } from 'ngx-axis-appforge/axis-components/table-helper';
4
+ import { BaseTableOptions, SelectableTableOptions, ExpandableTableOptions, BaseTableFieldOptions, TableService, SelectService, ExpandService } from 'ngx-axis-appforge/axis-components/table-helper';
5
5
  import { UntypedFormGroup, FormArray, AbstractControl } from '@angular/forms';
6
6
  import { Subscription } from 'rxjs';
7
7
 
8
- declare class EditTableOptions extends ValueAccessOptions implements BaseTableOptions, SelectableTableOptions {
8
+ declare class EditTableOptions extends ValueAccessOptions implements BaseTableOptions, SelectableTableOptions, ExpandableTableOptions {
9
9
  readonly disabledAppend: _angular_core.WritableSignal<boolean>;
10
10
  readonly disabledRemove: _angular_core.WritableSignal<boolean>;
11
11
  readonly disabledRemoveFn: _angular_core.WritableSignal<string>;
12
12
  readonly maxLength: _angular_core.WritableSignal<number | null>;
13
13
  readonly addInitData: _angular_core.WritableSignal<any>;
14
+ readonly showExpand: _angular_core.WritableSignal<boolean>;
15
+ readonly expandMode: _angular_core.WritableSignal<"custom" | "tree">;
16
+ readonly treeChildrenFun: _angular_core.WritableSignal<string>;
17
+ readonly expandFormName: _angular_core.WritableSignal<string | undefined>;
14
18
  readonly size: _angular_core.WritableSignal<"middle" | "small" | "default">;
15
19
  readonly showOrder: _angular_core.WritableSignal<boolean>;
16
20
  readonly showDataSize: _angular_core.WritableSignal<boolean>;
@@ -31,6 +35,7 @@ declare class EditTableOptions extends ValueAccessOptions implements BaseTableOp
31
35
  readonly showSizeChanger: _angular_core.WritableSignal<boolean>;
32
36
  readonly pageSizeOptions: _angular_core.WritableSignal<string>;
33
37
  readonly fields: _angular_core.WritableSignal<any[]>;
38
+ readonly expandRow: _angular_core.WritableSignal<any>;
34
39
  }
35
40
  declare class EditTableFieldOptions implements BaseTableFieldOptions {
36
41
  readonly inuse: _angular_core.WritableSignal<boolean>;
@@ -53,7 +58,8 @@ declare class EditTableFieldOptions implements BaseTableFieldOptions {
53
58
  declare class EditTable extends ValueAccess<EditTableOptions> implements OnInit, OnDestroy {
54
59
  tableSvc: TableService<EditTableOptions, EditTableFieldOptions>;
55
60
  select: SelectService;
56
- constructor(tableSvc: TableService<EditTableOptions, EditTableFieldOptions>, select: SelectService);
61
+ expand: ExpandService;
62
+ constructor(tableSvc: TableService<EditTableOptions, EditTableFieldOptions>, select: SelectService, expand: ExpandService, parentSelect?: SelectService);
57
63
  options: EditTableOptions;
58
64
  private readonly fb;
59
65
  readonly fg: UntypedFormGroup;
@@ -76,6 +82,7 @@ declare class EditTable extends ValueAccess<EditTableOptions> implements OnInit,
76
82
  setInitValue(value: any): void;
77
83
  childRegisteValueAccess(opt: RegisteValueAccessOptions, index: number, field: EditTableFieldOptions): void;
78
84
  valueToFormValue(): void;
85
+ formValueToSelect(): void;
79
86
  formValueToValue(): void;
80
87
  buildRow(): EditTableRowData;
81
88
  addRow(): void;
@@ -83,7 +90,7 @@ declare class EditTable extends ValueAccess<EditTableOptions> implements OnInit,
83
90
  refreshStatus(row: EditTableRowData): void;
84
91
  ngOnDestroy(): void;
85
92
  onSelectedChange(checkedIds: Set<any>): void;
86
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditTable, never>;
93
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditTable, [null, null, null, { optional: true; skipSelf: true; }]>;
87
94
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<EditTable, "axis-edit-table", never, { "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; }, { "pageIndex": "pageIndexChange"; }, never, never, true, never>;
88
95
  }
89
96
  interface EditTableRowData {
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy, ElementRef } from '@angular/core';
3
3
  import { DataOptions, Base } from 'ngx-axis-appforge/core';
4
- import { BaseTableOptions, SelectableTableOptions, ExpandableTableOptions, StatisticTableOptions, BaseTableFieldOptions, StatisticTableFieldOptions, TableService, SelectService, ExpandService, StatisticService } from 'ngx-axis-appforge/axis-components/table-helper';
4
+ import { BaseTableOptions, SelectableTableOptions, ExpandableTableOptions, StatisticTableOptions, BaseTableFieldOptions, StatisticTableFieldOptions, TableService, ExpandService, StatisticService, SelectService } from 'ngx-axis-appforge/axis-components/table-helper';
5
5
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
6
6
  import { NzResizeEvent } from 'ng-zorro-antd/resizable';
7
7
  import { Subject, Subscription } from 'rxjs';
@@ -112,11 +112,11 @@ declare class TableSetter implements OnDestroy {
112
112
  declare class Table extends Base<TableOptions> {
113
113
  private elementRef;
114
114
  tableSvc: TableService<TableOptions, TableFieldOptions>;
115
- select: SelectService;
116
115
  expand: ExpandService;
117
116
  statistic: StatisticService;
118
- constructor(elementRef: ElementRef, tableSvc: TableService<TableOptions, TableFieldOptions>, select: SelectService, expand: ExpandService, statistic: StatisticService);
117
+ constructor(elementRef: ElementRef, tableSvc: TableService<TableOptions, TableFieldOptions>, select: SelectService, expand: ExpandService, statistic: StatisticService, parentSelect?: SelectService);
119
118
  options: TableOptions;
119
+ select: SelectService;
120
120
  readonly scroll: _angular_core.WritableSignal<{
121
121
  x: string;
122
122
  y: string;
@@ -140,7 +140,7 @@ declare class Table extends Base<TableOptions> {
140
140
  rowspan(field: string, index: number): number;
141
141
  onSelectedChange(): void;
142
142
  ngOnDestroy(): void;
143
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<Table, never>;
143
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Table, [null, null, null, null, null, { optional: true; skipSelf: true; }]>;
144
144
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<Table, "axis-table", never, { "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; }, { "pageIndex": "pageIndexChange"; }, never, never, true, never>;
145
145
  }
146
146
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { WritableSignal, Signal } from '@angular/core';
2
+ import { WritableSignal, Signal, InjectionToken } from '@angular/core';
3
3
  import { NzTableFilterList } from 'ng-zorro-antd/table';
4
4
  import { DatePipe, DecimalPipe, PercentPipe } from '@angular/common';
5
5
  import { ScopeDirective } from 'ngx-axis-appforge/core';
@@ -27,6 +27,7 @@ interface ExpandableTableOptions extends BaseTableOptions {
27
27
  readonly showExpand: WritableSignal<boolean>;
28
28
  readonly expandMode: WritableSignal<"custom" | "tree">;
29
29
  readonly treeChildrenFun: WritableSignal<string>;
30
+ readonly expandRow: WritableSignal<any>;
30
31
  }
31
32
  interface StatisticTableOptions extends BaseTableOptions {
32
33
  readonly showStatistic: WritableSignal<boolean>;
@@ -102,30 +103,50 @@ declare class TableService<T extends BaseTableOptions, F extends BaseTableFieldO
102
103
  static ɵprov: i0.ɵɵInjectableDeclaration<TableService<any, any>>;
103
104
  }
104
105
 
106
+ declare const AXIS_TABLE_SELECT_TOKEN: InjectionToken<SelectService>;
107
+ declare enum ChangeScene {
108
+ userClick = 0,
109
+ linkage = 1
110
+ }
105
111
  declare class SelectService {
106
112
  private scope?;
107
113
  constructor(scope?: ScopeDirective | undefined);
114
+ readonly ready: i0.WritableSignal<boolean>;
108
115
  private options;
109
- private keyField;
116
+ keyField: string;
110
117
  private data;
111
- private onSelectedChange;
118
+ private readonly changeSubject;
119
+ private parent?;
120
+ private subSelectKeyFun?;
121
+ private registToParent;
112
122
  readonly headerChecked: i0.WritableSignal<"none" | "checked" | "indeterminate">;
113
- setOfCheckedId: Set<unknown>;
114
- setOfIndeterminateId: Set<unknown>;
115
- setOfDisabledId: Signal<Set<any>>;
123
+ readonly setOfCheckedId: i0.WritableSignal<Set<any>>;
124
+ readonly setOfIndeterminateId: i0.WritableSignal<Set<any>>;
125
+ readonly setOfDisabledId: Signal<Set<any>>;
126
+ private subs;
127
+ private readonly subSelects;
116
128
  init(opts: {
117
129
  options: SelectableTableOptions;
118
130
  keyField: string;
119
131
  data: Signal<any[] | null>;
120
132
  onSelectedChange: (checkedIds: Set<any>) => void;
133
+ parent?: SelectService;
134
+ scope?: ScopeDirective | null;
135
+ subSelectKeyFun?: (scope: ScopeDirective) => string;
136
+ registToParent?: boolean;
121
137
  }): void;
138
+ findSubSelect(key: string): SelectService | undefined;
139
+ getSubSelectKey(scope: ScopeDirective): string;
140
+ private initCheckboxLinkageForExpand;
122
141
  private buildDisabledId;
123
- onAllChecked(checked: boolean): void;
124
- toggleChecked(row: any): void;
125
- onItemChecked(row: any, checked: boolean): void;
126
- updateCheckedSet(row: any, checked: boolean): void;
127
- refreshCheckedStatus(): void;
142
+ onAllChecked(checked: boolean, scene?: ChangeScene): void;
143
+ toggleChecked(row: any, scene?: ChangeScene): void;
144
+ onItemChecked(row: any, checked: boolean, scene?: ChangeScene): void;
145
+ onSetItemsChecked(rows: any[], scene?: ChangeScene): void;
146
+ updateCheckedSet(key: string, checked: boolean, indeterminate?: boolean): void;
147
+ refreshCheckedStatus(scene: ChangeScene): void;
128
148
  getSelectedData(): any[] | undefined;
149
+ close(): void;
129
150
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectService, [{ optional: true; }]>;
130
151
  static ɵprov: i0.ɵɵInjectableDeclaration<SelectService>;
131
152
  }
@@ -181,5 +202,5 @@ declare class StatisticService {
181
202
  static ɵprov: i0.ɵɵInjectableDeclaration<StatisticService>;
182
203
  }
183
204
 
184
- export { ExpandService, SelectService, StatisticService, TableFieldDisplayService, TableService };
205
+ export { AXIS_TABLE_SELECT_TOKEN, ChangeScene, ExpandService, SelectService, StatisticService, TableFieldDisplayService, TableService };
185
206
  export type { BaseTableFieldOptions, BaseTableOptions, ExpandableTableOptions, SelectableTableOptions, StatisticTableFieldOptions, StatisticTableOptions };
@@ -332,7 +332,7 @@ class Tree {
332
332
  let nextNodeId;
333
333
  for (const nodeId of this.selectListSelection.selected) {
334
334
  const node = this.optionsNodes().get(nodeId);
335
- if (node) {
335
+ if (node?.canSetting) {
336
336
  changed = true;
337
337
  if (node.isRoot) {
338
338
  next = null;