ngx-axis-appforge 0.0.40 → 0.0.42

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.
Files changed (26) hide show
  1. package/axis-components/edit-table/index.d.ts +49 -77
  2. package/axis-components/select/index.d.ts +8 -3
  3. package/axis-components/table/index.d.ts +9 -65
  4. package/axis-components/transfer/design/index.d.ts +5 -0
  5. package/axis-components/transfer/index.d.ts +112 -0
  6. package/axis-components-covers/transfer.svg +86 -0
  7. package/core/index.d.ts +149 -3
  8. package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs +2 -2
  9. package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs.map +1 -1
  10. package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs +43 -146
  11. package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs.map +1 -1
  12. package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs +2 -2
  13. package/fesm2022/ngx-axis-appforge-axis-components-select-design.mjs.map +1 -1
  14. package/fesm2022/ngx-axis-appforge-axis-components-select.mjs +85 -73
  15. package/fesm2022/ngx-axis-appforge-axis-components-select.mjs.map +1 -1
  16. package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +27 -210
  17. package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
  18. package/fesm2022/ngx-axis-appforge-axis-components-transfer-design.mjs +360 -0
  19. package/fesm2022/ngx-axis-appforge-axis-components-transfer-design.mjs.map +1 -0
  20. package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs +277 -0
  21. package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs.map +1 -0
  22. package/fesm2022/ngx-axis-appforge-axis-components.mjs +28 -1
  23. package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
  24. package/fesm2022/ngx-axis-appforge-core.mjs +365 -1
  25. package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
  26. package/package.json +99 -91
package/core/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, OnDestroy, ElementRef, AfterViewInit, Injector, Type, ComponentRef, PipeTransform, ChangeDetectorRef, InjectionToken, AfterContentInit, ViewContainerRef } from '@angular/core';
2
+ import { OnInit, OnDestroy, ElementRef, AfterViewInit, Injector, Type, ComponentRef, PipeTransform, ChangeDetectorRef, InjectionToken, AfterContentInit, ViewContainerRef, WritableSignal, Signal } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable, BehaviorSubject, Subscription, Subject } from 'rxjs';
5
5
  import { AbstractControl, ControlValueAccessor, FormBuilder, UntypedFormGroup, NgModel, Validators, ValidationErrors, ValidatorFn, FormGroup, FormArray } from '@angular/forms';
@@ -11,6 +11,8 @@ import { NzCheckboxOption } from 'ng-zorro-antd/checkbox';
11
11
  import { NzSafeAny } from 'ng-zorro-antd/core/types';
12
12
  import { NzTreeNodeOptions, NzTreeComponent, NzFormatEmitEvent, NzFormatBeforeDropEvent, NzTreeNode } from 'ng-zorro-antd/tree';
13
13
  import { NzFilterOptionType } from 'ng-zorro-antd/select';
14
+ import { NzTableFilterList } from 'ng-zorro-antd/table';
15
+ import { DatePipe, DecimalPipe, PercentPipe } from '@angular/common';
14
16
 
15
17
  interface EventHandlerOptions<T> {
16
18
  name: string;
@@ -809,6 +811,150 @@ declare class InputValidator extends FunFieldBase implements ControlValueAccesso
809
811
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputValidator, "axis-input-validator", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "showModal": { "alias": "showModal"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "showModal": "showModalChange"; }, never, never, true, never>;
810
812
  }
811
813
 
814
+ interface BaseTableOptions {
815
+ readonly size: WritableSignal<"middle" | "small" | "default">;
816
+ readonly showOrder: WritableSignal<boolean>;
817
+ readonly showDataSize: WritableSignal<boolean>;
818
+ readonly bordered: WritableSignal<boolean>;
819
+ readonly outerBordered: WritableSignal<boolean>;
820
+ readonly width: WritableSignal<number | undefined>;
821
+ readonly showPagination: WritableSignal<boolean>;
822
+ readonly pageSize: WritableSignal<number>;
823
+ readonly showSizeChanger: WritableSignal<boolean>;
824
+ readonly pageSizeOptions: WritableSignal<string>;
825
+ }
826
+ interface SelectableTableOptions {
827
+ readonly showCheckbox: WritableSignal<boolean>;
828
+ readonly singleCheck: WritableSignal<boolean>;
829
+ readonly checkboxLinkageForExpand: WritableSignal<boolean>;
830
+ readonly disableCheckboxFn: WritableSignal<string | undefined>;
831
+ readonly defaultSelectFirstRow: WritableSignal<boolean>;
832
+ }
833
+ interface ExpandableTableOptions {
834
+ readonly showExpand: WritableSignal<boolean>;
835
+ readonly expandMode: WritableSignal<"custom" | "tree">;
836
+ readonly treeChildrenFun: WritableSignal<string>;
837
+ }
838
+ interface BaseTableFieldOptions {
839
+ readonly inuse: WritableSignal<boolean>;
840
+ readonly field: WritableSignal<string>;
841
+ readonly title: WritableSignal<string>;
842
+ readonly sortAble: WritableSignal<boolean>;
843
+ readonly sortOrder: WritableSignal<"descend" | "ascend" | null>;
844
+ readonly sortPriority: WritableSignal<number | null>;
845
+ readonly filterAble: WritableSignal<boolean>;
846
+ readonly filterMultiple: WritableSignal<boolean>;
847
+ readonly width: WritableSignal<number | null>;
848
+ readonly align: WritableSignal<"left" | "right" | "center">;
849
+ readonly freezeMode: WritableSignal<"left" | "right" | "none">;
850
+ readonly child: WritableSignal<any>;
851
+ }
852
+
853
+ declare class TableFieldDisplayService {
854
+ private datePipe;
855
+ private decimalPipe;
856
+ private percentPipe;
857
+ private scope?;
858
+ constructor(datePipe: DatePipe, decimalPipe: DecimalPipe, percentPipe: PercentPipe, scope?: ScopeDirective | undefined);
859
+ private readonly fieldDisplayCache;
860
+ clearCache(field?: string): void;
861
+ getFieldDisplayText(field: BaseTableFieldOptions, row: any): any;
862
+ private getDigitsInfo;
863
+ private getDeepObjectValue;
864
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableFieldDisplayService, [null, null, null, { optional: true; }]>;
865
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TableFieldDisplayService>;
866
+ }
867
+
868
+ declare class TableService<T extends BaseTableOptions, F extends BaseTableFieldOptions> {
869
+ private fieldDisplayService;
870
+ constructor(fieldDisplayService: TableFieldDisplayService);
871
+ private data;
872
+ private options;
873
+ private fields;
874
+ private getRow?;
875
+ private cacheFilterItem;
876
+ readonly displayFields: Signal<F[]>;
877
+ readonly fieldsControlsMap: _angular_core.WritableSignal<{
878
+ [field: string]: {
879
+ sortFn?: any;
880
+ filterItems?: NzTableFilterList;
881
+ filterFn?: any;
882
+ } | undefined;
883
+ }>;
884
+ readonly filedsFilterItemsCache: Map<string, Map<any, any>>;
885
+ readonly leaderFieldWidth: Signal<number>;
886
+ readonly pageSizeOptions: Signal<number[]>;
887
+ init(opts: {
888
+ data: Signal<any[] | undefined>;
889
+ options: T;
890
+ fields: Signal<F[]>;
891
+ getRow?: (row: any) => any;
892
+ cacheFilterItem?: boolean;
893
+ }): void;
894
+ refreshFieldControls(f?: string): void;
895
+ filterChange(field: string, value: any): void;
896
+ private buildLeaderFieldWidth;
897
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableService<any, any>, never>;
898
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<TableService<any, any>>;
899
+ }
900
+
901
+ declare class SelectService {
902
+ private scope?;
903
+ constructor(scope?: ScopeDirective | undefined);
904
+ private options;
905
+ private keyField;
906
+ private data;
907
+ private onSelectedChange;
908
+ readonly headerChecked: _angular_core.WritableSignal<"none" | "checked" | "indeterminate">;
909
+ setOfCheckedId: Set<unknown>;
910
+ setOfIndeterminateId: Set<unknown>;
911
+ setOfDisabledId: Signal<Set<any>>;
912
+ init(opts: {
913
+ options: SelectableTableOptions;
914
+ keyField: string;
915
+ data: Signal<any[] | null>;
916
+ onSelectedChange: (checkedIds: Set<any>) => void;
917
+ }): void;
918
+ private buildDisabledId;
919
+ onAllChecked(checked: boolean): void;
920
+ toggleChecked(row: any): void;
921
+ onItemChecked(row: any, checked: boolean): void;
922
+ updateCheckedSet(row: any, checked: boolean): void;
923
+ refreshCheckedStatus(): void;
924
+ getSelectedData(): any[] | undefined;
925
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectService, [{ optional: true; }]>;
926
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SelectService>;
927
+ }
928
+
929
+ declare class ExpandService {
930
+ private scope?;
931
+ constructor(scope?: ScopeDirective | undefined);
932
+ private options;
933
+ private keyField;
934
+ private data;
935
+ readonly expandedSet: Set<unknown>;
936
+ readonly nodeMap: Signal<Map<string, {
937
+ level: number;
938
+ node: any;
939
+ children?: any[];
940
+ }>>;
941
+ init(opts: {
942
+ options: ExpandableTableOptions;
943
+ keyField: string;
944
+ data: Signal<any[] | null>;
945
+ }): void;
946
+ buildNodeMap(): Map<string, {
947
+ level: number;
948
+ node: any;
949
+ children?: any[];
950
+ }>;
951
+ onExpandChange(key: any, checked: boolean): void;
952
+ buildNodeMapForRow(row: any, nodeMap: Map<string, any>, parentLevel?: number): void;
953
+ getListForExpanded(row: any): any[];
954
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExpandService, [{ optional: true; }]>;
955
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ExpandService>;
956
+ }
957
+
812
958
  declare function listSort(list: Array<any>, compareField: string, reverse?: boolean): void;
813
959
  declare function trackByFn(trackByField: string): (index: number, item: any) => any;
814
960
  declare function copy(obj: any, deepCopy?: boolean): any;
@@ -844,5 +990,5 @@ declare function fn(fnBody: string, argsObj: any, ignoreUndefined?: boolean, pri
844
990
 
845
991
  declare function sendApi(opt: ApiOptions, http: HttpClient): Observable<any>;
846
992
 
847
- 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 };
848
- 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 };
993
+ 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, ExpandService, FilteredTreeResult, FormValidators, FunField, FunFieldBase, FunFieldValueBase, HowLongPipe, InputTrigger, InputValidator, OptionsNode, ScopeDirective, SelectService, SimpleMenu, TableFieldDisplayService, TableService, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, buildValidators, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, sendApi, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
994
+ export type { BaseTableFieldOptions, BaseTableOptions, Cmplib, DataSourceOptions, DesignBindElementsResult, DesignBuildResult, DesignConfig, DynamicFnOptions, EventDesc, EventHandlerDesc, EventHandlerDescGroup, EventHandlerOptions, EventsHandler, Example, ExampleBuilder, ExampleDesc, ExampleGroup, ExpandableTableOptions, FlatNode, FunFieldOptions, FunFieldValue, MyErrorsOptions, MyValidationErrors, NextInfo, OptionsChangeEvent, RegisteFormControlOptions, RegisteValueAccessOptions, ScopeInfo, SelectableTableOptions, TriggeEventsOptions };
@@ -92,11 +92,11 @@ class Checkbox extends ValueAccess {
92
92
  return "";
93
93
  }
94
94
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Checkbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
95
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: Checkbox, isStandalone: true, selector: "axis-checkbox", inputs: { checkboxValue: { classPropertyName: "checkboxValue", publicName: "checkboxValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkboxValue: "checkboxValueChange" }, usesInheritance: true, ngImport: i0, template: "@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}", styles: [":host{display:block;width:100%}nz-select{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i1.NzCheckboxGroupComponent, selector: "nz-checkbox-group", inputs: ["nzName", "nzDisabled", "nzOptions"], exportAs: ["nzCheckboxGroup"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
95
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: Checkbox, isStandalone: true, selector: "axis-checkbox", inputs: { checkboxValue: { classPropertyName: "checkboxValue", publicName: "checkboxValue", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkboxValue: "checkboxValueChange" }, usesInheritance: true, ngImport: i0, template: "@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}", styles: [":host{display:block;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: NzCheckboxModule }, { kind: "component", type: i1.NzCheckboxGroupComponent, selector: "nz-checkbox-group", inputs: ["nzName", "nzDisabled", "nzOptions"], exportAs: ["nzCheckboxGroup"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
96
96
  }
97
97
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Checkbox, decorators: [{
98
98
  type: Component,
99
- args: [{ selector: 'axis-checkbox', imports: [NzCheckboxModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}", styles: [":host{display:block;width:100%}nz-select{width:100%}\n"] }]
99
+ args: [{ selector: 'axis-checkbox', imports: [NzCheckboxModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}", styles: [":host{display:block;width:100%}\n"] }]
100
100
  }], ctorParameters: () => [] });
101
101
 
102
102
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-axis-appforge-axis-components-checkbox.mjs","sources":["../../../axis-components/checkbox/checkbox.options.ts","../../../axis-components/checkbox/checkbox.ts","../../../axis-components/checkbox/checkbox.html","../../../axis-components/checkbox/ngx-axis-appforge-axis-components-checkbox.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class CheckboxOptions extends ValueAccessOptions {\n\n readonly labelField = signal(\"title\");\n readonly valueField = signal(\"key\");\n readonly disabledField = signal(\"disabled\");\n readonly fullValue = signal(false);\n readonly data = signal<any>(undefined);\n}","import { ChangeDetectionStrategy, Component, computed, effect, model, untracked } from '@angular/core';\nimport { ValueAccess } from 'ngx-axis-appforge/core';\nimport { FormsModule } from '@angular/forms';\nimport { CheckboxOptions } from './checkbox.options';\nimport { NzCheckboxModule, NzCheckboxOption } from 'ng-zorro-antd/checkbox';\n\n@Component({\n selector: 'axis-checkbox',\n imports: [NzCheckboxModule, FormsModule],\n templateUrl: './checkbox.html',\n styleUrl: './checkbox.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Checkbox extends ValueAccess<CheckboxOptions> {\n\n constructor() {\n super();\n effect(() => {\n const data = this.options.data();\n if (Array.isArray(data) && data.length) {\n untracked(() => {\n if (this.checkboxValue()?.length) {\n const next = data.filter(d => this.checkboxValue()!.includes(d[this.options.valueField()]))\n if (next.length != this.checkboxValue()!.length) {\n if (this.options.fullValue()) {\n this.setInitValue(next);\n } else {\n this.setInitValue(next.map(r => r[this.options.valueField()]));\n }\n }\n }\n })\n } else {\n this.setInitValue(null);\n }\n });\n }\n\n override options: CheckboxOptions = new CheckboxOptions();\n readonly checkboxData = computed(() => this.buildCheckboxData());\n readonly displayValue = computed(() => this.buildDisplay());\n readonly checkboxValue = model<any[]>();\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.valueToSelectorValue();\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.valueToSelectorValue();\n }\n\n private valueToSelectorValue() {\n if (this.value() != undefined) {\n if (this.options.fullValue()) {\n this.checkboxValue.set(this.value().map((r: any) => r[this.options.valueField()]));\n } else {\n this.checkboxValue.set(this.value());\n }\n return;\n }\n this.checkboxValue.set(this.value());\n }\n\n onCheckboxChange(value: any) {\n if (this.options.fullValue()) {\n this.value.set(this.options.data().filter((item: any) => value.includes(item[this.options.valueField()])));\n } else {\n this.value.set(value);\n }\n this.onChange?.(this.value());\n }\n\n private buildCheckboxData(): NzCheckboxOption[] {\n if (Array.isArray(this.options.data())) {\n return this.options.data().map((r: any) => ({ label: r[this.options.labelField()], value: r[this.options.valueField()], disabled: r[this.options.disabledField()] }))\n } else {\n return [];\n }\n }\n\n private buildDisplay(): string {\n if (Array.isArray(this.value())) {\n if (this.options.fullValue()) {\n return this.value().map((r: any) => r[this.options.labelField()]).join(\";\");\n } else {\n return this.options.data().filter((r: any) => this.value().includes(r[this.options.valueField()])).map((r: any) => r[this.options.labelField()]).join(\";\");\n }\n }\n return \"\";\n }\n\n}\n","@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './checkbox';\n"],"names":[],"mappings":";;;;;;;;AAGM,MAAO,eAAgB,SAAQ,kBAAkB,CAAA;AAE1C,IAAA,UAAU,GAAG,MAAM,CAAC,OAAO,sDAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC;AAC1B,IAAA,aAAa,GAAG,MAAM,CAAC,UAAU,yDAAC;AAClC,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;AACzB,IAAA,IAAI,GAAG,MAAM,CAAM,SAAS,gDAAC;AACzC;;ACGK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,gBAAgB,EAAE,WAAW,CAAC,EAAA,eAAA,EAGvB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,uOAAA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA;;;AEXjD;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-axis-appforge-axis-components-checkbox.mjs","sources":["../../../axis-components/checkbox/checkbox.options.ts","../../../axis-components/checkbox/checkbox.ts","../../../axis-components/checkbox/checkbox.html","../../../axis-components/checkbox/ngx-axis-appforge-axis-components-checkbox.ts"],"sourcesContent":["import { signal } from \"@angular/core\";\nimport { ValueAccessOptions } from \"ngx-axis-appforge/core\";\n\nexport class CheckboxOptions extends ValueAccessOptions {\n\n readonly labelField = signal(\"title\");\n readonly valueField = signal(\"key\");\n readonly disabledField = signal(\"disabled\");\n readonly fullValue = signal(false);\n readonly data = signal<any>(undefined);\n}","import { ChangeDetectionStrategy, Component, computed, effect, model, untracked } from '@angular/core';\nimport { ValueAccess } from 'ngx-axis-appforge/core';\nimport { FormsModule } from '@angular/forms';\nimport { CheckboxOptions } from './checkbox.options';\nimport { NzCheckboxModule, NzCheckboxOption } from 'ng-zorro-antd/checkbox';\n\n@Component({\n selector: 'axis-checkbox',\n imports: [NzCheckboxModule, FormsModule],\n templateUrl: './checkbox.html',\n styleUrl: './checkbox.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class Checkbox extends ValueAccess<CheckboxOptions> {\n\n constructor() {\n super();\n effect(() => {\n const data = this.options.data();\n if (Array.isArray(data) && data.length) {\n untracked(() => {\n if (this.checkboxValue()?.length) {\n const next = data.filter(d => this.checkboxValue()!.includes(d[this.options.valueField()]))\n if (next.length != this.checkboxValue()!.length) {\n if (this.options.fullValue()) {\n this.setInitValue(next);\n } else {\n this.setInitValue(next.map(r => r[this.options.valueField()]));\n }\n }\n }\n })\n } else {\n this.setInitValue(null);\n }\n });\n }\n\n override options: CheckboxOptions = new CheckboxOptions();\n readonly checkboxData = computed(() => this.buildCheckboxData());\n readonly displayValue = computed(() => this.buildDisplay());\n readonly checkboxValue = model<any[]>();\n\n override writeValue(value: any): void {\n super.writeValue(value);\n this.valueToSelectorValue();\n }\n\n override setInitValue(value: any): void {\n super.setInitValue(value);\n this.valueToSelectorValue();\n }\n\n private valueToSelectorValue() {\n if (this.value() != undefined) {\n if (this.options.fullValue()) {\n this.checkboxValue.set(this.value().map((r: any) => r[this.options.valueField()]));\n } else {\n this.checkboxValue.set(this.value());\n }\n return;\n }\n this.checkboxValue.set(this.value());\n }\n\n onCheckboxChange(value: any) {\n if (this.options.fullValue()) {\n this.value.set(this.options.data().filter((item: any) => value.includes(item[this.options.valueField()])));\n } else {\n this.value.set(value);\n }\n this.onChange?.(this.value());\n }\n\n private buildCheckboxData(): NzCheckboxOption[] {\n if (Array.isArray(this.options.data())) {\n return this.options.data().map((r: any) => ({ label: r[this.options.labelField()], value: r[this.options.valueField()], disabled: r[this.options.disabledField()] }))\n } else {\n return [];\n }\n }\n\n private buildDisplay(): string {\n if (Array.isArray(this.value())) {\n if (this.options.fullValue()) {\n return this.value().map((r: any) => r[this.options.labelField()]).join(\";\");\n } else {\n return this.options.data().filter((r: any) => this.value().includes(r[this.options.valueField()])).map((r: any) => r[this.options.labelField()]).join(\";\");\n }\n }\n return \"\";\n }\n\n}\n","@if (options.readonly()) {\n{{displayValue()}}\n}@else {\n<nz-checkbox-group [nzOptions]=\"checkboxData()\" [(ngModel)]=\"checkboxValue\" (ngModelChange)=\"onCheckboxChange($event)\"\n [nzDisabled]=\"options.disabled()\" />\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './checkbox';\n"],"names":[],"mappings":";;;;;;;;AAGM,MAAO,eAAgB,SAAQ,kBAAkB,CAAA;AAE1C,IAAA,UAAU,GAAG,MAAM,CAAC,OAAO,sDAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,sDAAC;AAC1B,IAAA,aAAa,GAAG,MAAM,CAAC,UAAU,yDAAC;AAClC,IA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EAAA,CAAA;;2FAK5B,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAPpB,SAAS;+BACE,eAAe,EAAA,OAAA,EAChB,CAAC,gBAAgB,EAAE,WAAW,CAAC,EAAA,eAAA,EAGvB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,uOAAA,EAAA,MAAA,EAAA,CAAA,mCAAA,CAAA,EAAA;;;AEXjD;;AAEG;;;;"}
@@ -1,25 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, computed, effect, inject, model, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { ValueAccessOptions, ValueAccess, updateAndValidAll, buildValidators, ScopeDirective, DynamicDirective } from 'ngx-axis-appforge/core';
4
- import * as i1 from 'ng-zorro-antd/table';
2
+ import { signal, effect, inject, computed, model, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import * as i1 from 'ngx-axis-appforge/core';
4
+ import { ValueAccessOptions, ValueAccess, updateAndValidAll, buildValidators, ScopeDirective, DynamicDirective, TableFieldDisplayService, TableService, SelectService } from 'ngx-axis-appforge/core';
5
+ import * as i2 from 'ng-zorro-antd/table';
5
6
  import { NzTableModule } from 'ng-zorro-antd/table';
6
- import * as i2 from '@angular/forms';
7
+ import * as i3 from '@angular/forms';
7
8
  import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
8
- import * as i4 from 'ng-zorro-antd/form';
9
+ import * as i5 from 'ng-zorro-antd/form';
9
10
  import { NzFormModule } from 'ng-zorro-antd/form';
10
- import * as i5 from 'ng-zorro-antd/resizable';
11
+ import * as i6 from 'ng-zorro-antd/resizable';
11
12
  import { NzResizableModule } from 'ng-zorro-antd/resizable';
12
- import * as i6 from 'ng-zorro-antd/button';
13
+ import * as i7 from 'ng-zorro-antd/button';
13
14
  import { NzButtonModule } from 'ng-zorro-antd/button';
14
- import * as i8 from 'ng-zorro-antd/popconfirm';
15
+ import * as i9 from 'ng-zorro-antd/popconfirm';
15
16
  import { NzPopconfirmModule } from 'ng-zorro-antd/popconfirm';
16
- import { debounceTime } from 'rxjs';
17
- import * as i9 from 'ng-zorro-antd/icon';
17
+ import { merge, map, debounceTime } from 'rxjs';
18
+ import * as i10 from 'ng-zorro-antd/icon';
18
19
  import { NzIconModule } from 'ng-zorro-antd/icon';
19
- import * as i10 from 'ng-zorro-antd/empty';
20
+ import * as i11 from 'ng-zorro-antd/empty';
20
21
  import { NzEmptyModule } from 'ng-zorro-antd/empty';
21
- import * as i3 from 'ng-zorro-antd/grid';
22
- import * as i7 from 'ng-zorro-antd/core/transition-patch';
22
+ import { DatePipe, DecimalPipe, PercentPipe } from '@angular/common';
23
+ import * as i4 from 'ng-zorro-antd/grid';
24
+ import * as i8 from 'ng-zorro-antd/core/transition-patch';
23
25
 
24
26
  class EditTableOptions extends ValueAccessOptions {
25
27
  disabledAppend = signal(false, ...(ngDevMode ? [{ debugName: "disabledAppend" }] : []));
@@ -38,6 +40,7 @@ class EditTableOptions extends ValueAccessOptions {
38
40
  singleCheck = signal(false, ...(ngDevMode ? [{ debugName: "singleCheck" }] : []));
39
41
  disableCheckboxFn = signal(undefined, ...(ngDevMode ? [{ debugName: "disableCheckboxFn" }] : []));
40
42
  defaultSelectFirstRow = signal(false, ...(ngDevMode ? [{ debugName: "defaultSelectFirstRow" }] : []));
43
+ checkboxLinkageForExpand = signal(false, ...(ngDevMode ? [{ debugName: "checkboxLinkageForExpand" }] : []));
41
44
  showTotal = signal(false, ...(ngDevMode ? [{ debugName: "showTotal" }] : []));
42
45
  totalTitle = signal("合计", ...(ngDevMode ? [{ debugName: "totalTitle" }] : []));
43
46
  showSubTotal = signal(false, ...(ngDevMode ? [{ debugName: "showSubTotal" }] : []));
@@ -66,88 +69,26 @@ class EditTableFieldOptions {
66
69
  child = signal(undefined, ...(ngDevMode ? [{ debugName: "child" }] : []));
67
70
  }
68
71
 
69
- class Select {
70
- options;
71
- rowData;
72
- scope;
73
- constructor(options, rowData, scope) {
74
- this.options = options;
75
- this.rowData = rowData;
76
- this.scope = scope;
77
- }
78
- headerChecked = signal("none", ...(ngDevMode ? [{ debugName: "headerChecked" }] : []));
79
- setOfCheckedId = new Set();
80
- setOfIndeterminateId = new Set();
81
- setOfDisabledId = computed(() => this.buildDisabledId(), ...(ngDevMode ? [{ debugName: "setOfDisabledId" }] : []));
82
- buildDisabledId() {
83
- if (this.options.disableCheckboxFn()) {
84
- const args = this.scope?.snapshotAll() ?? {};
85
- return new Set(this.rowData()?.filter(row => this.scope?.runFnWithSnapshot(this.options.disableCheckboxFn(), Object.assign({}, args, { row })))
86
- .map(row => row.key));
87
- }
88
- return new Set();
89
- }
90
- onAllChecked(checked) {
91
- this.rowData()?.filter(row => !this.setOfDisabledId().has(row.key))?.forEach(row => this.updateCheckedSet(row, checked));
92
- this.refreshCheckedStatus();
93
- this.refreshCheckedFormValue();
94
- }
95
- toggleChecked(row) {
96
- if (this.options.showCheckbox() && !this.setOfDisabledId().has(row.key)) {
97
- console.log("toggleChecked");
98
- this.onItemChecked(row, !this.setOfCheckedId.has(row.key));
99
- }
100
- }
101
- onItemChecked(row, checked) {
102
- this.updateCheckedSet(row, checked);
103
- this.refreshCheckedStatus();
104
- this.refreshCheckedFormValue();
105
- }
106
- updateCheckedSet(row, checked) {
107
- const key = row.key;
108
- if (checked && !this.setOfCheckedId.has(key)) {
109
- if (this.options.singleCheck()) {
110
- this.setOfCheckedId.clear();
111
- }
112
- this.setOfCheckedId.add(key);
113
- }
114
- else if (!checked && this.setOfCheckedId.has(key)) {
115
- this.setOfCheckedId.delete(key);
116
- }
117
- }
118
- refreshCheckedStatus() {
119
- const listOfEnabledData = this.rowData()?.filter(row => !this.setOfDisabledId().has(row.key)) ?? [];
120
- const checked = listOfEnabledData.length > 0 && listOfEnabledData.every(row => this.setOfCheckedId.has(row.key) && !this.setOfIndeterminateId.has(row.key));
121
- if (checked) {
122
- this.headerChecked.set("checked");
123
- }
124
- else {
125
- const indeterminate = listOfEnabledData.some(row => this.setOfCheckedId.has(row.key) || this.setOfIndeterminateId.has(row.key)) && !checked;
126
- this.headerChecked.set(indeterminate ? "indeterminate" : "none");
127
- }
128
- console.log("headerChecked", this.headerChecked());
129
- }
130
- refreshCheckedFormValue() {
131
- this.rowData().forEach(row => {
132
- const v = this.setOfCheckedId.has(row.key);
133
- if (!!row.control.value[this.options.checkedFormName()] != v) {
134
- row.control.patchValue({ [this.options.checkedFormName()]: v });
135
- }
136
- });
137
- }
138
- getSelectedData() {
139
- return this.rowData()?.filter(row => this.setOfCheckedId.has(row.key));
140
- }
141
- }
142
-
143
72
  class EditTable extends ValueAccess {
144
- constructor() {
73
+ tableSvc;
74
+ select;
75
+ constructor(tableSvc, select) {
145
76
  effect(() => {
146
77
  this.fields().forEach((f, i) => {
147
78
  this.bindWithConfig(this.options.fields()[i], { options: f, tag: `bindField.${i}` });
148
79
  });
149
80
  });
150
81
  super();
82
+ this.tableSvc = tableSvc;
83
+ this.select = select;
84
+ effect(() => {
85
+ this.tableSvc.init({ data: this.rowData, options: this.options, fields: this.fields, getRow: (row) => row.control.value, cacheFilterItem: false });
86
+ this.select.init({ options: this.options, keyField: "key", data: this.rowData, onSelectedChange: (ids) => this.onSelectedChange(ids) });
87
+ });
88
+ effect(() => {
89
+ this.addSubscribe(merge(...this.rowData().map(r => merge(...this.tableSvc.displayFields().filter(f => f.filterAble()).map(f => r.control.get(f.field()).valueChanges.pipe(map(() => f.field()), debounceTime(100))))))
90
+ .subscribe((f) => this.tableSvc.refreshFieldControls(f)));
91
+ });
151
92
  this.addSubscribe(this.fa.valueChanges.pipe(debounceTime(300)).subscribe(v => {
152
93
  this.formValueToValue();
153
94
  this.onChange?.(this.value());
@@ -162,12 +103,8 @@ class EditTable extends ValueAccess {
162
103
  return this.fg.get("values");
163
104
  }
164
105
  rowData = signal([], ...(ngDevMode ? [{ debugName: "rowData" }] : []));
165
- select = new Select(this.options, this.rowData, this.getScope());
166
- pageSizeOptions = computed(() => this.options.pageSizeOptions().split(",").map(size => +size), ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : []));
167
106
  scroll = computed(() => this.buildScoll(), ...(ngDevMode ? [{ debugName: "scroll" }] : []));
168
107
  fields = computed(() => this.buildFields(), ...(ngDevMode ? [{ debugName: "fields" }] : []));
169
- leaderFieldWidth = computed(() => this.buildLeaderFieldWidth(), ...(ngDevMode ? [{ debugName: "leaderFieldWidth" }] : []));
170
- fieldsControlsMap = computed(() => this.buildFieldControls(), ...(ngDevMode ? [{ debugName: "fieldsControlsMap" }] : []));
171
108
  setOfDisabledRemoveId = signal(new Set(), ...(ngDevMode ? [{ debugName: "setOfDisabledRemoveId" }] : []));
172
109
  disabledAppend = computed(() => this.options.readonly() || this.options.disabled() || this.options.disabledAppend() || (this.options.maxLength() != null && this.rowData().length >= this.options.maxLength()), ...(ngDevMode ? [{ debugName: "disabledAppend" }] : []));
173
110
  disabledRemove = computed(() => this.options.readonly() || this.options.disabled() || this.options.disabledRemove(), ...(ngDevMode ? [{ debugName: "disabledRemove" }] : []));
@@ -188,10 +125,10 @@ class EditTable extends ValueAccess {
188
125
  buildScoll() {
189
126
  let x = 0;
190
127
  if (this.options.showCheckbox()) {
191
- x += this.leaderFieldWidth();
128
+ x += this.tableSvc.leaderFieldWidth();
192
129
  }
193
130
  if (this.options.showOrder()) {
194
- x += this.leaderFieldWidth();
131
+ x += this.tableSvc.leaderFieldWidth();
195
132
  }
196
133
  this.fields().filter(f => f.inuse()).forEach(f => {
197
134
  if (f.width()) {
@@ -203,54 +140,6 @@ class EditTable extends ValueAccess {
203
140
  });
204
141
  return { x: x + "px", y: "" };
205
142
  }
206
- buildLeaderFieldWidth() {
207
- switch (this.options.size()) {
208
- case "small":
209
- return 45;
210
- case "middle":
211
- return 50;
212
- default:
213
- return 65;
214
- }
215
- }
216
- buildFieldControls() {
217
- const res = {};
218
- for (const field of this.fields().filter(f => f.inuse())) {
219
- res[field.field()] = {};
220
- if (field.filterAble()) {
221
- const valueMap = new Map();
222
- for (const row of this.rowData() ?? []) {
223
- valueMap.set(row.control.value[field.field()], row.control.value);
224
- }
225
- res[field.field()].filterItems = Array.from(valueMap.entries()).map(en => {
226
- let text = en[0];
227
- if (field.filterDisplayFn()) {
228
- text = this.getScope()?.runFnWithSnapshot(field.filterDisplayFn(), { value: en[0], row: en[1] });
229
- }
230
- return { text, value: en[0] };
231
- });
232
- res[field.field()].filterFn = (fd, row) => {
233
- if (fd instanceof Array) {
234
- return fd.includes(row[field.field()]);
235
- }
236
- else {
237
- return fd == row[field.field()];
238
- }
239
- };
240
- }
241
- if (field.sortAble()) {
242
- if (this.rowData()?.some((r) => r.control.value[field.field()] != undefined && typeof (r.control.value) == "number")) {
243
- res[field.field()].sortFn = (a, b) => a[field.field()] - b[field.field()];
244
- }
245
- else {
246
- res[field.field()].sortFn = (a, b) => {
247
- return ((a[field.field()] || "") + "").localeCompare(b[field.field()]);
248
- };
249
- }
250
- }
251
- }
252
- return res;
253
- }
254
143
  writeValue(value) {
255
144
  super.writeValue(value);
256
145
  this.valueToFormValue();
@@ -352,13 +241,21 @@ class EditTable extends ValueAccess {
352
241
  row.subs.forEach(s => s.unsubscribe());
353
242
  });
354
243
  }
355
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EditTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
356
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: EditTable, isStandalone: true, selector: "axis-edit-table", inputs: { pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageIndex: "pageIndexChange" }, usesInheritance: true, ngImport: i0, template: "<form #form nz-form [formGroup]=\"fg\">\n <nz-table #table [nzSize]=\"options.size()\" [nzData]=\"rowData()\" [nzBordered]=\"options.bordered()\"\n [nzOuterBordered]=\"options.outerBordered()\" [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination()\" [nzPageSize]=\"options.pageSize()\"\n [nzShowSizeChanger]=\"options.showSizeChanger()\" [nzPageSizeOptions]=\"pageSizeOptions()\"\n [nzShowTotal]=\"options.showDataSize()?totalRange:null\" [nzScroll]=\"scroll()\"\n [nzFooter]=\"!options.showPagination() && !disabledAppend() && rowData().length?footer:null\"\n [nzNoResult]=\"noResult\" [(nzPageIndex)]=\"pageIndex\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if ( !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"leaderFieldWidth()-10+'px'\"></th>\n }\n }\n <th nzWidth=\"0 !important\" nzLeft></th>\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <th [attr.data-index]=\"i\" nz-resizable nzBounds=\"window\" [nzDisabled]=\"!f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"f.width.set($event.width??null)\"\n [nzShowSort]=\"f.sortAble()\" [nzSortFn]=\"fieldsControlsMap()[f.field()]?.sortFn\"\n [nzSortOrder]=\"f.sortOrder()\" [nzSortPriority]=\"f.sortPriority()??false\"\n [nzShowFilter]=\"f.filterAble()\" [nzFilters]=\"fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"fieldsControlsMap()[f.field()]?.filterFn\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\">\n <nz-form-label [nzNoColon]=\"true\" [nzRequired]=\"idRequired(f)\">\n {{f.title()}}\n </nz-form-label>\n </th>\n }\n }\n @if(!options.disabledRemove()){\n <th nzRight nzAlign=\"center\" nzWidth=\"80px\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody formArrayName=\"values\">\n @for (data of table.data; track data.key;let i=$index) {\n <tr [formGroupName]=\"(table.nzPageIndex-1) * table.nzPageSize + i\" [axisScope]=\"options.id+'.row'\"\n scopeName=\"\u53EF\u7F16\u8F91\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:data.control.value}]\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId.has(data.key)\"\n [nzIndeterminate]=\"select.setOfIndeterminateId.has(data.key)\"\n [nzDisabled]=\"select.setOfDisabledId().has(data.key)\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n <td class=\"row-status\" nzLeft [class]=\"data.status()\"></td>\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-index]=\"i\" [nzRight]=\"f.freezeMode()=='right'\"\n [nzAlign]=\"f.align()\">\n <nz-form-item style=\"margin-bottom: 0;\">\n <nz-form-control>\n <ng-container [axisDynamic]=\"f.child()\" [formControlName]=\"f.field()\"></ng-container>\n </nz-form-control>\n </nz-form-item>\n </td>\n }\n }\n @if(!options.disabledRemove()){\n <td nzRight>\n <button nz-button nzDanger nzType=\"link\" nz-popconfirm nzPopconfirmTitle=\"\u786E\u8BA4\u5220\u9664\uFF1F\"\n [nzCondition]=\"data.status()=='ignore'\" [disabled]=\"data.disabledRemove()\"\n (nzOnConfirm)=\"removeRow((table.nzPageIndex-1) * table.nzPageSize + i)\">\u5220\u9664</button>\n </td>\n }\n </tr>\n }\n </tbody>\n <ng-template #noResult>\n <nz-empty [nzNotFoundContent]=\"addbtn\"></nz-empty>\n <ng-template #addbtn>\n \u6682\u65E0\u6570\u636E@if (!disabledAppend()) {\uFF0C<a (click)=\"addRow()\">\u6DFB\u52A0</a>}\n </ng-template>\n </ng-template>\n <ng-template #totalRange let-range=\"range\" let-total>\n @if (!disabledAppend()) {\n <a style=\"position:absolute;left:24px\" (click)=\"addRow()\"><span nz-icon nzType=\"plus\"\n nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n }\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n <ng-template #footer>\n <a (click)=\"addRow()\"><span nz-icon nzType=\"plus\" nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n </ng-template>\n </nz-table>\n</form>", styles: [":host{display:block}.row-status{width:0;position:relative}.row-status:before{content:\"\";display:block;width:5px;height:17px;border-radius:5px;position:absolute;z-index:1;left:50%;top:50%;transform:translate(4px,-50%)}.invalid:before{background-color:#ff4d4f}.success:before{background-color:#7ed321}.ignore:before{background-color:#9b9b9b}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}th nz-form-label ::ng-deep label{height:unset}\n"], dependencies: [{ kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i1.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "component", type: i1.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i1.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i1.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i1.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i1.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i1.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i1.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "directive", type: i1.NzCellFixedDirective, selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: ["nzRight", "nzLeft", "colspan", "colSpan"] }, { kind: "directive", type: i1.NzCellAlignDirective, selector: "th[nzAlign],td[nzAlign]", inputs: ["nzAlign"] }, { kind: "component", type: i1.NzThSelectionComponent, selector: "th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]", inputs: ["nzSelections", "nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzShowCheckbox", "nzShowRowSelection"], outputs: ["nzCheckedChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i3.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i3.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i4.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i4.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i4.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i4.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzResizableModule }, { kind: "directive", type: i5.NzResizableDirective, selector: "[nz-resizable]", inputs: ["nzBounds", "nzMaxHeight", "nzMaxWidth", "nzMinHeight", "nzMinWidth", "nzGridColumnCount", "nzMaxColumn", "nzMinColumn", "nzLockAspectRatio", "nzPreview", "nzDisabled"], outputs: ["nzResize", "nzResizeEnd", "nzResizeStart"], exportAs: ["nzResizable"] }, { kind: "directive", type: ScopeDirective, selector: "[axisScope]", inputs: ["axisScope", "scopeName", "isRoot", "dataSources"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i6.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i7.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: NzPopconfirmModule }, { kind: "directive", type: i8.NzPopconfirmDirective, selector: "[nz-popconfirm]", inputs: ["nzPopconfirmArrowPointAtCenter", "nzPopconfirmTitle", "nzPopconfirmTitleContext", "nz-popconfirm", "nzPopconfirmTrigger", "nzPopconfirmPlacement", "nzPopconfirmOrigin", "nzPopconfirmMouseEnterDelay", "nzPopconfirmMouseLeaveDelay", "nzPopconfirmOverlayClassName", "nzPopconfirmOverlayStyle", "nzPopconfirmVisible", "nzBeforeConfirm", "nzIcon", "nzCondition", "nzPopconfirmShowArrow", "nzPopconfirmBackdrop", "nzAutofocus", "nzOkText", "nzOkType", "nzCancelText", "nzOkButtonProps", "nzCancelButtonProps", "nzOkDisabled", "nzOkDanger"], outputs: ["nzPopconfirmVisibleChange", "nzOnCancel", "nzOnConfirm"], exportAs: ["nzPopconfirm"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i9.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i10.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
244
+ onSelectedChange(checkedIds) {
245
+ this.rowData().forEach(row => {
246
+ const v = checkedIds.has(row.key);
247
+ if (!!row.control.value[this.options.checkedFormName()] != v) {
248
+ row.control.patchValue({ [this.options.checkedFormName()]: v });
249
+ }
250
+ });
251
+ }
252
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EditTable, deps: [{ token: i1.TableService }, { token: i1.SelectService }], target: i0.ɵɵFactoryTarget.Component });
253
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: EditTable, isStandalone: true, selector: "axis-edit-table", inputs: { pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageIndex: "pageIndexChange" }, providers: [DatePipe, DecimalPipe, PercentPipe, TableFieldDisplayService, TableService, SelectService], usesInheritance: true, ngImport: i0, template: "<form #form nz-form [formGroup]=\"fg\">\n <nz-table #table [nzSize]=\"options.size()\" [nzData]=\"rowData()\" [nzBordered]=\"options.bordered()\"\n [nzOuterBordered]=\"options.outerBordered()\" [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination()\" [nzPageSize]=\"options.pageSize()\"\n [nzShowSizeChanger]=\"options.showSizeChanger()\" [nzPageSizeOptions]=\"tableSvc.pageSizeOptions()\"\n [nzShowTotal]=\"options.showDataSize()?totalRange:null\" [nzScroll]=\"scroll()\"\n [nzFooter]=\"!options.showPagination() && !disabledAppend() && rowData().length?footer:null\"\n [nzNoResult]=\"noResult\" [(nzPageIndex)]=\"pageIndex\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if ( !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\"></th>\n }\n }\n <th nzWidth=\"0 !important\" nzLeft></th>\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <th [attr.data-index]=\"i\" nz-resizable nzBounds=\"window\" [nzDisabled]=\"!f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"f.width.set($event.width??null)\"\n [nzShowSort]=\"f.sortAble()\" [nzSortFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.sortFn\"\n [nzSortOrder]=\"f.sortOrder()\" [nzSortPriority]=\"f.sortPriority()??false\"\n [nzShowFilter]=\"f.filterAble()\"\n [nzFilters]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterFn\"\n (nzFilterChange)=\"tableSvc.filterChange(f.field(),$event)\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\">\n <nz-form-label [nzNoColon]=\"true\" [nzRequired]=\"idRequired(f)\">\n {{f.title()}}\n </nz-form-label>\n </th>\n }\n }\n @if(!options.disabledRemove()){\n <th nzRight nzAlign=\"center\" nzWidth=\"80px\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody formArrayName=\"values\">\n @for (data of table.data; track data.key;let i=$index) {\n <tr [formGroupName]=\"(table.nzPageIndex-1) * table.nzPageSize + i\" [axisScope]=\"options.id+'.row'\"\n scopeName=\"\u53EF\u7F16\u8F91\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:data.control.value}]\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId.has(data.key)\"\n [nzIndeterminate]=\"select.setOfIndeterminateId.has(data.key)\"\n [nzDisabled]=\"select.setOfDisabledId().has(data.key)\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n <td class=\"row-status\" nzLeft [class]=\"data.status()\"></td>\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-index]=\"i\" [nzRight]=\"f.freezeMode()=='right'\"\n [nzAlign]=\"f.align()\">\n <nz-form-item style=\"margin-bottom: 0;\">\n <nz-form-control>\n <ng-container [axisDynamic]=\"f.child()\" [formControlName]=\"f.field()\"></ng-container>\n </nz-form-control>\n </nz-form-item>\n </td>\n }\n }\n @if(!options.disabledRemove()){\n <td nzRight>\n <button nz-button nzDanger nzType=\"link\" nz-popconfirm nzPopconfirmTitle=\"\u786E\u8BA4\u5220\u9664\uFF1F\"\n [nzCondition]=\"data.status()=='ignore'\" [disabled]=\"data.disabledRemove()\"\n (nzOnConfirm)=\"removeRow((table.nzPageIndex-1) * table.nzPageSize + i)\">\u5220\u9664</button>\n </td>\n }\n </tr>\n }\n </tbody>\n <ng-template #noResult>\n <nz-empty [nzNotFoundContent]=\"addbtn\"></nz-empty>\n <ng-template #addbtn>\n \u6682\u65E0\u6570\u636E@if (!disabledAppend()) {\uFF0C<a (click)=\"addRow()\">\u6DFB\u52A0</a>}\n </ng-template>\n </ng-template>\n <ng-template #totalRange let-range=\"range\" let-total>\n @if (!disabledAppend()) {\n <a style=\"position:absolute;left:24px\" (click)=\"addRow()\"><span nz-icon nzType=\"plus\"\n nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n }\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n <ng-template #footer>\n <a (click)=\"addRow()\"><span nz-icon nzType=\"plus\" nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n </ng-template>\n </nz-table>\n</form>", styles: [":host{display:block}.row-status{width:0;position:relative}.row-status:before{content:\"\";display:block;width:5px;height:17px;border-radius:5px;position:absolute;z-index:1;left:50%;top:50%;transform:translate(4px,-50%)}.invalid:before{background-color:#ff4d4f}.success:before{background-color:#7ed321}.ignore:before{background-color:#9b9b9b}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}th nz-form-label ::ng-deep label{height:unset}\n"], dependencies: [{ kind: "ngmodule", type: NzTableModule }, { kind: "component", type: i2.NzTableComponent, selector: "nz-table", inputs: ["nzTableLayout", "nzShowTotal", "nzItemRender", "nzTitle", "nzFooter", "nzNoResult", "nzPageSizeOptions", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualForTrackBy", "nzLoadingDelay", "nzPageIndex", "nzPageSize", "nzTotal", "nzWidthConfig", "nzData", "nzCustomColumn", "nzPaginationPosition", "nzScroll", "noDataVirtualHeight", "nzPaginationType", "nzFrontPagination", "nzTemplateMode", "nzShowPagination", "nzLoading", "nzOuterBordered", "nzLoadingIndicator", "nzBordered", "nzSize", "nzShowSizeChanger", "nzHideOnSinglePage", "nzShowQuickJumper", "nzSimple"], outputs: ["nzPageSizeChange", "nzPageIndexChange", "nzQueryParams", "nzCurrentPageDataChange", "nzCustomColumnChange"], exportAs: ["nzTable"] }, { kind: "component", type: i2.NzThAddOnComponent, selector: "th[nzColumnKey], th[nzSortFn], th[nzSortOrder], th[nzFilters], th[nzShowSort], th[nzShowFilter], th[nzCustomFilter]", inputs: ["nzColumnKey", "nzFilterMultiple", "nzSortOrder", "nzSortPriority", "nzSortDirections", "nzFilters", "nzSortFn", "nzFilterFn", "nzShowSort", "nzShowFilter", "nzCustomFilter"], outputs: ["nzCheckedChange", "nzSortOrderChange", "nzFilterChange"] }, { kind: "directive", type: i2.NzTableCellDirective, selector: "th:not(.nz-disable-th), td:not(.nz-disable-td)" }, { kind: "directive", type: i2.NzThMeasureDirective, selector: "th", inputs: ["nzWidth", "colspan", "colSpan", "rowspan", "rowSpan"] }, { kind: "component", type: i2.NzTdAddOnComponent, selector: "td[nzChecked], td[nzDisabled], td[nzIndeterminate], td[nzIndentSize], td[nzExpand], td[nzShowExpand], td[nzShowCheckbox]", inputs: ["nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzIndentSize", "nzShowExpand", "nzShowCheckbox", "nzExpand", "nzExpandIcon"], outputs: ["nzCheckedChange", "nzExpandChange"] }, { kind: "component", type: i2.NzTheadComponent, selector: "thead:not(.ant-table-thead)", outputs: ["nzSortOrderChange"] }, { kind: "component", type: i2.NzTbodyComponent, selector: "tbody" }, { kind: "directive", type: i2.NzTrDirective, selector: "tr:not([nz-table-measure-row]):not([nzExpand]):not([nz-table-fixed-row])" }, { kind: "directive", type: i2.NzCellFixedDirective, selector: "td[nzRight],th[nzRight],td[nzLeft],th[nzLeft]", inputs: ["nzRight", "nzLeft", "colspan", "colSpan"] }, { kind: "directive", type: i2.NzCellAlignDirective, selector: "th[nzAlign],td[nzAlign]", inputs: ["nzAlign"] }, { kind: "component", type: i2.NzThSelectionComponent, selector: "th[nzSelections],th[nzChecked],th[nzShowCheckbox],th[nzShowRowSelection]", inputs: ["nzSelections", "nzChecked", "nzDisabled", "nzIndeterminate", "nzLabel", "nzShowCheckbox", "nzShowRowSelection"], outputs: ["nzCheckedChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i3.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i4.NzColDirective, selector: "[nz-col],nz-col,nz-form-control,nz-form-label", inputs: ["nzFlex", "nzSpan", "nzOrder", "nzOffset", "nzPush", "nzPull", "nzXs", "nzSm", "nzMd", "nzLg", "nzXl", "nzXXl"], exportAs: ["nzCol"] }, { kind: "directive", type: i4.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i5.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i5.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i5.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i5.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: NzResizableModule }, { kind: "directive", type: i6.NzResizableDirective, selector: "[nz-resizable]", inputs: ["nzBounds", "nzMaxHeight", "nzMaxWidth", "nzMinHeight", "nzMinWidth", "nzGridColumnCount", "nzMaxColumn", "nzMinColumn", "nzLockAspectRatio", "nzPreview", "nzDisabled"], outputs: ["nzResize", "nzResizeEnd", "nzResizeStart"], exportAs: ["nzResizable"] }, { kind: "directive", type: ScopeDirective, selector: "[axisScope]", inputs: ["axisScope", "scopeName", "isRoot", "dataSources"] }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzButtonModule }, { kind: "component", type: i7.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i8.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "ngmodule", type: NzPopconfirmModule }, { kind: "directive", type: i9.NzPopconfirmDirective, selector: "[nz-popconfirm]", inputs: ["nzPopconfirmArrowPointAtCenter", "nzPopconfirmTitle", "nzPopconfirmTitleContext", "nz-popconfirm", "nzPopconfirmTrigger", "nzPopconfirmPlacement", "nzPopconfirmOrigin", "nzPopconfirmMouseEnterDelay", "nzPopconfirmMouseLeaveDelay", "nzPopconfirmOverlayClassName", "nzPopconfirmOverlayStyle", "nzPopconfirmVisible", "nzBeforeConfirm", "nzIcon", "nzCondition", "nzPopconfirmShowArrow", "nzPopconfirmBackdrop", "nzAutofocus", "nzOkText", "nzOkType", "nzCancelText", "nzOkButtonProps", "nzCancelButtonProps", "nzOkDisabled", "nzOkDanger"], outputs: ["nzPopconfirmVisibleChange", "nzOnCancel", "nzOnConfirm"], exportAs: ["nzPopconfirm"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i10.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "ngmodule", type: NzEmptyModule }, { kind: "component", type: i11.NzEmptyComponent, selector: "nz-empty", inputs: ["nzNotFoundImage", "nzNotFoundContent", "nzNotFoundFooter"], exportAs: ["nzEmpty"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
357
254
  }
358
255
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EditTable, decorators: [{
359
256
  type: Component,
360
- args: [{ selector: 'axis-edit-table', imports: [NzTableModule, ReactiveFormsModule, NzFormModule, NzResizableModule, ScopeDirective, DynamicDirective, NzButtonModule, NzPopconfirmModule, NzIconModule, NzEmptyModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form #form nz-form [formGroup]=\"fg\">\n <nz-table #table [nzSize]=\"options.size()\" [nzData]=\"rowData()\" [nzBordered]=\"options.bordered()\"\n [nzOuterBordered]=\"options.outerBordered()\" [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination()\" [nzPageSize]=\"options.pageSize()\"\n [nzShowSizeChanger]=\"options.showSizeChanger()\" [nzPageSizeOptions]=\"pageSizeOptions()\"\n [nzShowTotal]=\"options.showDataSize()?totalRange:null\" [nzScroll]=\"scroll()\"\n [nzFooter]=\"!options.showPagination() && !disabledAppend() && rowData().length?footer:null\"\n [nzNoResult]=\"noResult\" [(nzPageIndex)]=\"pageIndex\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if ( !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"leaderFieldWidth()-10+'px'\"></th>\n }\n }\n <th nzWidth=\"0 !important\" nzLeft></th>\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <th [attr.data-index]=\"i\" nz-resizable nzBounds=\"window\" [nzDisabled]=\"!f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"f.width.set($event.width??null)\"\n [nzShowSort]=\"f.sortAble()\" [nzSortFn]=\"fieldsControlsMap()[f.field()]?.sortFn\"\n [nzSortOrder]=\"f.sortOrder()\" [nzSortPriority]=\"f.sortPriority()??false\"\n [nzShowFilter]=\"f.filterAble()\" [nzFilters]=\"fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"fieldsControlsMap()[f.field()]?.filterFn\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\">\n <nz-form-label [nzNoColon]=\"true\" [nzRequired]=\"idRequired(f)\">\n {{f.title()}}\n </nz-form-label>\n </th>\n }\n }\n @if(!options.disabledRemove()){\n <th nzRight nzAlign=\"center\" nzWidth=\"80px\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody formArrayName=\"values\">\n @for (data of table.data; track data.key;let i=$index) {\n <tr [formGroupName]=\"(table.nzPageIndex-1) * table.nzPageSize + i\" [axisScope]=\"options.id+'.row'\"\n scopeName=\"\u53EF\u7F16\u8F91\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:data.control.value}]\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId.has(data.key)\"\n [nzIndeterminate]=\"select.setOfIndeterminateId.has(data.key)\"\n [nzDisabled]=\"select.setOfDisabledId().has(data.key)\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n <td class=\"row-status\" nzLeft [class]=\"data.status()\"></td>\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-index]=\"i\" [nzRight]=\"f.freezeMode()=='right'\"\n [nzAlign]=\"f.align()\">\n <nz-form-item style=\"margin-bottom: 0;\">\n <nz-form-control>\n <ng-container [axisDynamic]=\"f.child()\" [formControlName]=\"f.field()\"></ng-container>\n </nz-form-control>\n </nz-form-item>\n </td>\n }\n }\n @if(!options.disabledRemove()){\n <td nzRight>\n <button nz-button nzDanger nzType=\"link\" nz-popconfirm nzPopconfirmTitle=\"\u786E\u8BA4\u5220\u9664\uFF1F\"\n [nzCondition]=\"data.status()=='ignore'\" [disabled]=\"data.disabledRemove()\"\n (nzOnConfirm)=\"removeRow((table.nzPageIndex-1) * table.nzPageSize + i)\">\u5220\u9664</button>\n </td>\n }\n </tr>\n }\n </tbody>\n <ng-template #noResult>\n <nz-empty [nzNotFoundContent]=\"addbtn\"></nz-empty>\n <ng-template #addbtn>\n \u6682\u65E0\u6570\u636E@if (!disabledAppend()) {\uFF0C<a (click)=\"addRow()\">\u6DFB\u52A0</a>}\n </ng-template>\n </ng-template>\n <ng-template #totalRange let-range=\"range\" let-total>\n @if (!disabledAppend()) {\n <a style=\"position:absolute;left:24px\" (click)=\"addRow()\"><span nz-icon nzType=\"plus\"\n nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n }\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n <ng-template #footer>\n <a (click)=\"addRow()\"><span nz-icon nzType=\"plus\" nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n </ng-template>\n </nz-table>\n</form>", styles: [":host{display:block}.row-status{width:0;position:relative}.row-status:before{content:\"\";display:block;width:5px;height:17px;border-radius:5px;position:absolute;z-index:1;left:50%;top:50%;transform:translate(4px,-50%)}.invalid:before{background-color:#ff4d4f}.success:before{background-color:#7ed321}.ignore:before{background-color:#9b9b9b}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}th nz-form-label ::ng-deep label{height:unset}\n"] }]
361
- }], ctorParameters: () => [] });
257
+ args: [{ selector: 'axis-edit-table', imports: [NzTableModule, ReactiveFormsModule, NzFormModule, NzResizableModule, ScopeDirective, DynamicDirective, NzButtonModule, NzPopconfirmModule, NzIconModule, NzEmptyModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [DatePipe, DecimalPipe, PercentPipe, TableFieldDisplayService, TableService, SelectService], template: "<form #form nz-form [formGroup]=\"fg\">\n <nz-table #table [nzSize]=\"options.size()\" [nzData]=\"rowData()\" [nzBordered]=\"options.bordered()\"\n [nzOuterBordered]=\"options.outerBordered()\" [nzShowPagination]=\"options.showPagination()\"\n [nzFrontPagination]=\"options.showPagination()\" [nzPageSize]=\"options.pageSize()\"\n [nzShowSizeChanger]=\"options.showSizeChanger()\" [nzPageSizeOptions]=\"tableSvc.pageSizeOptions()\"\n [nzShowTotal]=\"options.showDataSize()?totalRange:null\" [nzScroll]=\"scroll()\"\n [nzFooter]=\"!options.showPagination() && !disabledAppend() && rowData().length?footer:null\"\n [nzNoResult]=\"noResult\" [(nzPageIndex)]=\"pageIndex\">\n <thead>\n <tr>\n @if (options.showCheckbox()) {\n @if ( !options.singleCheck()) {\n <th nzLeft [nzChecked]=\"select.headerChecked()!='none'\"\n [nzIndeterminate]=\"select.headerChecked()=='indeterminate'\"\n (nzCheckedChange)=\"select.onAllChecked($event)\" nzAlign=\"center\"\n [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\">\n </th>\n }@else {\n <th nzLeft [nzWidth]=\"tableSvc.leaderFieldWidth()-10+'px'\"></th>\n }\n }\n <th nzWidth=\"0 !important\" nzLeft></th>\n @if (options.showOrder()) {\n <th nzAlign=\"center\" [nzWidth]=\"tableSvc.leaderFieldWidth()+'px'\">\u5E8F\u53F7</th>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <th [attr.data-index]=\"i\" nz-resizable nzBounds=\"window\" [nzDisabled]=\"!f.width()\"\n [nzWidth]=\"f.width() == null ?null:f.width()+'px'\" (nzResize)=\"f.width.set($event.width??null)\"\n [nzShowSort]=\"f.sortAble()\" [nzSortFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.sortFn\"\n [nzSortOrder]=\"f.sortOrder()\" [nzSortPriority]=\"f.sortPriority()??false\"\n [nzShowFilter]=\"f.filterAble()\"\n [nzFilters]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterItems ?? []\"\n [nzFilterFn]=\"tableSvc.fieldsControlsMap()[f.field()]?.filterFn\"\n (nzFilterChange)=\"tableSvc.filterChange(f.field(),$event)\" [nzFilterMultiple]=\"f.filterMultiple()\"\n [nzAlign]=\"f.align()\" [nzLeft]=\"f.freezeMode()=='left'\" [nzRight]=\"f.freezeMode()=='right'\">\n <nz-form-label [nzNoColon]=\"true\" [nzRequired]=\"idRequired(f)\">\n {{f.title()}}\n </nz-form-label>\n </th>\n }\n }\n @if(!options.disabledRemove()){\n <th nzRight nzAlign=\"center\" nzWidth=\"80px\" data-rowactions>\u64CD\u4F5C</th>\n }\n </tr>\n </thead>\n <tbody formArrayName=\"values\">\n @for (data of table.data; track data.key;let i=$index) {\n <tr [formGroupName]=\"(table.nzPageIndex-1) * table.nzPageSize + i\" [axisScope]=\"options.id+'.row'\"\n scopeName=\"\u53EF\u7F16\u8F91\u8868\u683C\u884C\" [dataSources]=\"[{name:'row',type:'local',data:data.control.value}]\">\n @if (options.showCheckbox()) {\n <td nzLeft [nzChecked]=\"select.setOfCheckedId.has(data.key)\"\n [nzIndeterminate]=\"select.setOfIndeterminateId.has(data.key)\"\n [nzDisabled]=\"select.setOfDisabledId().has(data.key)\"\n (nzCheckedChange)=\"select.onItemChecked(data, $event)\" nzAlign=\"center\"></td>\n }\n <td class=\"row-status\" nzLeft [class]=\"data.status()\"></td>\n @if (options.showOrder()) {\n <td nzAlign=\"center\">{{(table.nzPageIndex-1) * table.nzPageSize + i+1}}</td>\n }\n @for (f of fields(); track f.field();let i=$index) {\n @if (f.inuse()) {\n <td [nzLeft]=\"f.freezeMode()=='left'\" [attr.data-index]=\"i\" [nzRight]=\"f.freezeMode()=='right'\"\n [nzAlign]=\"f.align()\">\n <nz-form-item style=\"margin-bottom: 0;\">\n <nz-form-control>\n <ng-container [axisDynamic]=\"f.child()\" [formControlName]=\"f.field()\"></ng-container>\n </nz-form-control>\n </nz-form-item>\n </td>\n }\n }\n @if(!options.disabledRemove()){\n <td nzRight>\n <button nz-button nzDanger nzType=\"link\" nz-popconfirm nzPopconfirmTitle=\"\u786E\u8BA4\u5220\u9664\uFF1F\"\n [nzCondition]=\"data.status()=='ignore'\" [disabled]=\"data.disabledRemove()\"\n (nzOnConfirm)=\"removeRow((table.nzPageIndex-1) * table.nzPageSize + i)\">\u5220\u9664</button>\n </td>\n }\n </tr>\n }\n </tbody>\n <ng-template #noResult>\n <nz-empty [nzNotFoundContent]=\"addbtn\"></nz-empty>\n <ng-template #addbtn>\n \u6682\u65E0\u6570\u636E@if (!disabledAppend()) {\uFF0C<a (click)=\"addRow()\">\u6DFB\u52A0</a>}\n </ng-template>\n </ng-template>\n <ng-template #totalRange let-range=\"range\" let-total>\n @if (!disabledAppend()) {\n <a style=\"position:absolute;left:24px\" (click)=\"addRow()\"><span nz-icon nzType=\"plus\"\n nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n }\n \u5171{{ total }}\u6761\u6570\u636E\uFF0C\u7B2C{{ range[0] }}-{{ range[1] }}\u6761\n </ng-template>\n <ng-template #footer>\n <a (click)=\"addRow()\"><span nz-icon nzType=\"plus\" nzTheme=\"outline\"></span>\u6DFB\u52A0</a>\n </ng-template>\n </nz-table>\n</form>", styles: [":host{display:block}.row-status{width:0;position:relative}.row-status:before{content:\"\";display:block;width:5px;height:17px;border-radius:5px;position:absolute;z-index:1;left:50%;top:50%;transform:translate(4px,-50%)}.invalid:before{background-color:#ff4d4f}.success:before{background-color:#7ed321}.ignore:before{background-color:#9b9b9b}:host ::ng-deep .ant-table-placeholder .ant-table-expanded-row-fixed{margin:-8px -10px}th nz-form-label ::ng-deep label{height:unset}\n"] }]
258
+ }], ctorParameters: () => [{ type: i1.TableService }, { type: i1.SelectService }] });
362
259
 
363
260
  /**
364
261
  * Generated bundle index. Do not edit.