ngx-axis-appforge 0.0.16 → 0.0.17
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/edit-table/design/index.d.ts +5 -0
- package/axis-components/edit-table/index.d.ts +124 -0
- package/axis-components-covers/edit-table.png +0 -0
- package/core/index.d.ts +28 -1
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs +287 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs +361 -0
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs +9 -163
- package/fesm2022/ngx-axis-appforge-axis-components-form-item-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +3 -34
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs +2 -3
- package/fesm2022/ngx-axis-appforge-axis-components-table-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs +4 -3
- package/fesm2022/ngx-axis-appforge-axis-components-tree-selector-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +53 -2
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +176 -4
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +78 -70
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, OnInit, OnDestroy, WritableSignal } from '@angular/core';
|
|
3
|
+
import { ValueAccessOptions, ScopeDirective, ValueAccess } from 'ngx-axis-appforge/core';
|
|
4
|
+
import { NzTableFilterList } from 'ng-zorro-antd/table';
|
|
5
|
+
import { UntypedFormGroup, FormArray, AbstractControl } from '@angular/forms';
|
|
6
|
+
import { Subscription } from 'rxjs';
|
|
7
|
+
|
|
8
|
+
declare class EditTableOptions extends ValueAccessOptions {
|
|
9
|
+
readonly disabledAppend: _angular_core.WritableSignal<boolean>;
|
|
10
|
+
readonly disabledRemove: _angular_core.WritableSignal<boolean>;
|
|
11
|
+
readonly disabledRemoveFn: _angular_core.WritableSignal<string>;
|
|
12
|
+
readonly maxLength: _angular_core.WritableSignal<number | null>;
|
|
13
|
+
readonly addInitData: _angular_core.WritableSignal<any>;
|
|
14
|
+
readonly size: _angular_core.WritableSignal<"middle" | "small" | "default">;
|
|
15
|
+
readonly showOrder: _angular_core.WritableSignal<boolean>;
|
|
16
|
+
readonly showDataSize: _angular_core.WritableSignal<boolean>;
|
|
17
|
+
readonly bordered: _angular_core.WritableSignal<boolean>;
|
|
18
|
+
readonly outerBordered: _angular_core.WritableSignal<boolean>;
|
|
19
|
+
readonly width: _angular_core.WritableSignal<string | undefined>;
|
|
20
|
+
readonly showCheckbox: _angular_core.WritableSignal<boolean>;
|
|
21
|
+
readonly checkedFormName: _angular_core.WritableSignal<string>;
|
|
22
|
+
readonly singleCheck: _angular_core.WritableSignal<boolean>;
|
|
23
|
+
readonly disableCheckboxFn: _angular_core.WritableSignal<string | undefined>;
|
|
24
|
+
readonly defaultSelectFirstRow: _angular_core.WritableSignal<boolean>;
|
|
25
|
+
readonly showTotal: _angular_core.WritableSignal<boolean>;
|
|
26
|
+
readonly totalTitle: _angular_core.WritableSignal<string>;
|
|
27
|
+
readonly showSubTotal: _angular_core.WritableSignal<boolean>;
|
|
28
|
+
readonly showPagination: _angular_core.WritableSignal<boolean>;
|
|
29
|
+
readonly pageSize: _angular_core.WritableSignal<number>;
|
|
30
|
+
readonly showSizeChanger: _angular_core.WritableSignal<boolean>;
|
|
31
|
+
readonly pageSizeOptions: _angular_core.WritableSignal<string>;
|
|
32
|
+
readonly fields: _angular_core.WritableSignal<any[]>;
|
|
33
|
+
}
|
|
34
|
+
declare class EditTableFieldOptions {
|
|
35
|
+
readonly inuse: _angular_core.WritableSignal<boolean>;
|
|
36
|
+
readonly field: _angular_core.WritableSignal<string>;
|
|
37
|
+
readonly title: _angular_core.WritableSignal<string>;
|
|
38
|
+
readonly sortAble: _angular_core.WritableSignal<boolean>;
|
|
39
|
+
readonly sortOrder: _angular_core.WritableSignal<"descend" | "ascend" | null>;
|
|
40
|
+
readonly sortPriority: _angular_core.WritableSignal<number | null>;
|
|
41
|
+
readonly filterAble: _angular_core.WritableSignal<boolean>;
|
|
42
|
+
readonly filterMultiple: _angular_core.WritableSignal<boolean>;
|
|
43
|
+
readonly width: _angular_core.WritableSignal<number | null>;
|
|
44
|
+
readonly align: _angular_core.WritableSignal<"left" | "right" | "center">;
|
|
45
|
+
readonly freezeMode: _angular_core.WritableSignal<"left" | "right" | "none">;
|
|
46
|
+
readonly totalAble: _angular_core.WritableSignal<boolean>;
|
|
47
|
+
readonly totalFn: _angular_core.WritableSignal<string | undefined>;
|
|
48
|
+
readonly validators: _angular_core.WritableSignal<any[]>;
|
|
49
|
+
readonly child: _angular_core.WritableSignal<any>;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare class Select {
|
|
53
|
+
private options;
|
|
54
|
+
private rowData;
|
|
55
|
+
private scope;
|
|
56
|
+
constructor(options: EditTableOptions, rowData: Signal<EditTableRowData[]>, scope: ScopeDirective | null);
|
|
57
|
+
readonly headerChecked: _angular_core.WritableSignal<"checked" | "none" | "indeterminate">;
|
|
58
|
+
setOfCheckedId: Set<unknown>;
|
|
59
|
+
setOfIndeterminateId: Set<unknown>;
|
|
60
|
+
setOfDisabledId: Signal<Set<string>>;
|
|
61
|
+
private buildDisabledId;
|
|
62
|
+
onAllChecked(checked: boolean): void;
|
|
63
|
+
toggleChecked(row: EditTableRowData): void;
|
|
64
|
+
onItemChecked(row: EditTableRowData, checked: boolean): void;
|
|
65
|
+
updateCheckedSet(row: EditTableRowData, checked: boolean): void;
|
|
66
|
+
refreshCheckedStatus(): void;
|
|
67
|
+
refreshCheckedFormValue(): void;
|
|
68
|
+
getSelectedData(): EditTableRowData[] | undefined;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare class EditTable extends ValueAccess<EditTableOptions> implements OnInit, OnDestroy {
|
|
72
|
+
constructor();
|
|
73
|
+
protected options: EditTableOptions;
|
|
74
|
+
private readonly fb;
|
|
75
|
+
readonly fg: UntypedFormGroup;
|
|
76
|
+
get fa(): FormArray<AbstractControl>;
|
|
77
|
+
readonly rowData: WritableSignal<EditTableRowData[]>;
|
|
78
|
+
readonly select: Select;
|
|
79
|
+
readonly pageSizeOptions: _angular_core.Signal<number[]>;
|
|
80
|
+
readonly scroll: _angular_core.Signal<{
|
|
81
|
+
x: string;
|
|
82
|
+
y: string;
|
|
83
|
+
}>;
|
|
84
|
+
readonly fields: _angular_core.Signal<EditTableFieldOptions[]>;
|
|
85
|
+
readonly leaderFieldWidth: _angular_core.Signal<number>;
|
|
86
|
+
readonly fieldsControlsMap: _angular_core.Signal<{
|
|
87
|
+
[field: string]: {
|
|
88
|
+
sortFn?: any;
|
|
89
|
+
filterItems?: NzTableFilterList;
|
|
90
|
+
filterFn?: any;
|
|
91
|
+
} | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
readonly setOfDisabledRemoveId: WritableSignal<Set<string>>;
|
|
94
|
+
readonly disabledAppend: _angular_core.Signal<boolean>;
|
|
95
|
+
readonly disabledRemove: _angular_core.Signal<boolean>;
|
|
96
|
+
readonly pageIndex: _angular_core.ModelSignal<number>;
|
|
97
|
+
ngOnInit(): void;
|
|
98
|
+
idRequired(field: EditTableFieldOptions): boolean;
|
|
99
|
+
private buildFields;
|
|
100
|
+
private buildScoll;
|
|
101
|
+
private buildLeaderFieldWidth;
|
|
102
|
+
private buildFieldControls;
|
|
103
|
+
writeValue(value: any): void;
|
|
104
|
+
setInitValue(value: any): void;
|
|
105
|
+
valueToFormValue(): void;
|
|
106
|
+
formValueToValue(): void;
|
|
107
|
+
buildRow(): EditTableRowData;
|
|
108
|
+
addRow(): void;
|
|
109
|
+
removeRow(index: number): void;
|
|
110
|
+
refreshStatus(row: EditTableRowData): void;
|
|
111
|
+
ngOnDestroy(): void;
|
|
112
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EditTable, never>;
|
|
113
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EditTable, "axis-edit-table", never, { "pageIndex": { "alias": "pageIndex"; "required": false; "isSignal": true; }; }, { "pageIndex": "pageIndexChange"; }, never, never, true, never>;
|
|
114
|
+
}
|
|
115
|
+
interface EditTableRowData {
|
|
116
|
+
key: string;
|
|
117
|
+
status: WritableSignal<'ignore' | 'invalid' | 'success'>;
|
|
118
|
+
control: AbstractControl;
|
|
119
|
+
subs: Subscription[];
|
|
120
|
+
disabledRemove: WritableSignal<boolean>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { EditTable };
|
|
124
|
+
export type { EditTableRowData };
|
|
Binary file
|
package/core/index.d.ts
CHANGED
|
@@ -621,6 +621,7 @@ declare class FormValidators extends Validators {
|
|
|
621
621
|
static max(maxvalue: number): ValidatorFn;
|
|
622
622
|
static pattern(pattern: string | RegExp): ValidatorFn;
|
|
623
623
|
}
|
|
624
|
+
declare function buildValidators(validators: any[]): ValidatorFn[];
|
|
624
625
|
|
|
625
626
|
declare class BaseDesignSetting implements AfterViewInit {
|
|
626
627
|
private element;
|
|
@@ -751,6 +752,32 @@ declare class SimpleMenu extends BaseMenu {
|
|
|
751
752
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SimpleMenu, "axis-design-simple-menu", never, {}, {}, never, never, true, never>;
|
|
752
753
|
}
|
|
753
754
|
|
|
755
|
+
declare class InputValidator extends FunFieldBase implements ControlValueAccessor {
|
|
756
|
+
private element;
|
|
757
|
+
constructor(element: ElementRef);
|
|
758
|
+
readonly value: _angular_core.ModelSignal<any[] | undefined>;
|
|
759
|
+
readonly showLine: _angular_core.WritableSignal<boolean>;
|
|
760
|
+
onChange: any;
|
|
761
|
+
editIndex: number;
|
|
762
|
+
readonly showModal: _angular_core.ModelSignal<boolean>;
|
|
763
|
+
readonly validatorDesc: _angular_core.Signal<string[] | undefined>;
|
|
764
|
+
fg: UntypedFormGroup;
|
|
765
|
+
protected funFields: FunFieldOptions;
|
|
766
|
+
writeValue(v: any): void;
|
|
767
|
+
registerOnChange(fn: any): void;
|
|
768
|
+
registerOnTouched(fn: any): void;
|
|
769
|
+
ngAfterViewInit(): void;
|
|
770
|
+
private buildValidatorsDesc;
|
|
771
|
+
private wrapFunField;
|
|
772
|
+
private wrapNumberField;
|
|
773
|
+
openWithCreate(): void;
|
|
774
|
+
openWithUpdate(index: number): void;
|
|
775
|
+
save(): void;
|
|
776
|
+
deleteValidator(index: number): void;
|
|
777
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputValidator, never>;
|
|
778
|
+
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>;
|
|
779
|
+
}
|
|
780
|
+
|
|
754
781
|
declare function listSort(list: Array<any>, compareField: string, reverse?: boolean): void;
|
|
755
782
|
declare function trackByFn(trackByField: string): (index: number, item: any) => any;
|
|
756
783
|
declare function copy(obj: any, deepCopy?: boolean): any;
|
|
@@ -784,5 +811,5 @@ interface DynamicFnOptions {
|
|
|
784
811
|
}
|
|
785
812
|
declare function fn(fnBody: string, argsObj: any, ignoreUndefined?: boolean, printError?: boolean): any;
|
|
786
813
|
|
|
787
|
-
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_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FORM_REGISTE_CONTROL_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, OptionsNode, ScopeDirective, SimpleMenu, ValueAccess, ValueAccessOptions, ValueDesignSetting, assignDefaultField, baseFbConfig, baseFunField, codeName, copy, deepMerge, fn, isEquals, listSort, nameCode, obj2Arr, objDiff, rebuildObject, recursionArray, recursionObject, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
|
|
814
|
+
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_OPTIONS_NODE_FOR_MENU, AXIS_DESIGN_SCOPE_INFOS_GETTER_TOKEN, AXIS_EVENT_HANDLERS_TOKEN, AXIS_EVENT_HANDLER_DESCS_TOKEN, AXIS_FORM_REGISTE_CONTROL_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, trackByFn, updateAndValidAll, valueFbConfig, valueFunField };
|
|
788
815
|
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 };
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { FunFieldValueBase, FormValidators, valueFbConfig, baseFbConfig, valueFunField, baseFunField, FunField, BaseDesignSetting, InputTrigger, DynamicDirective, ValueDesignSetting, BaseMenu, CommonMenu, InputValidator, OptionsNode, SimpleMenu } from 'ngx-axis-appforge/core';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import * as i3 from '@angular/forms';
|
|
5
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
6
|
+
import * as i2 from 'ng-zorro-antd/form';
|
|
7
|
+
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
8
|
+
import * as i1 from 'ng-zorro-antd/grid';
|
|
9
|
+
import { NzGridModule } from 'ng-zorro-antd/grid';
|
|
10
|
+
import * as i4 from 'ng-zorro-antd/collapse';
|
|
11
|
+
import { NzCollapseModule } from 'ng-zorro-antd/collapse';
|
|
12
|
+
import * as i5 from 'ng-zorro-antd/input-number';
|
|
13
|
+
import { NzInputNumberModule } from 'ng-zorro-antd/input-number';
|
|
14
|
+
import * as i6 from 'ng-zorro-antd/input';
|
|
15
|
+
import { NzInputModule } from 'ng-zorro-antd/input';
|
|
16
|
+
import * as i7 from 'ng-zorro-antd/switch';
|
|
17
|
+
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
18
|
+
import * as i6$1 from 'ng-zorro-antd/select';
|
|
19
|
+
import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
20
|
+
import * as i8 from 'ng-zorro-antd/radio';
|
|
21
|
+
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
22
|
+
import * as i3$1 from 'ng-zorro-antd/divider';
|
|
23
|
+
import { NzDividerModule } from 'ng-zorro-antd/divider';
|
|
24
|
+
import * as i2$1 from 'ng-zorro-antd/dropdown';
|
|
25
|
+
import { NzDropDownModule } from 'ng-zorro-antd/dropdown';
|
|
26
|
+
import * as i4$1 from 'ng-zorro-antd/icon';
|
|
27
|
+
import { NzIconModule } from 'ng-zorro-antd/icon';
|
|
28
|
+
import * as i1$1 from 'ng-zorro-antd/menu';
|
|
29
|
+
|
|
30
|
+
class EditTableSetting extends FunFieldValueBase {
|
|
31
|
+
fg = this.fb.group({
|
|
32
|
+
...baseFbConfig,
|
|
33
|
+
...valueFbConfig,
|
|
34
|
+
disabledAppend: [undefined, FormValidators.requiredFun],
|
|
35
|
+
disabledRemove: [undefined, FormValidators.requiredFun],
|
|
36
|
+
disabledRemoveFn: [],
|
|
37
|
+
maxLength: [],
|
|
38
|
+
addInitData: [],
|
|
39
|
+
size: [undefined, FormValidators.requiredFun],
|
|
40
|
+
showOrder: [undefined, FormValidators.requiredFun],
|
|
41
|
+
showDataSize: [undefined, FormValidators.requiredFun],
|
|
42
|
+
bordered: [undefined, FormValidators.requiredFun],
|
|
43
|
+
outerBordered: [undefined, FormValidators.requiredFun],
|
|
44
|
+
width: [],
|
|
45
|
+
showCheckbox: [undefined, FormValidators.requiredFun],
|
|
46
|
+
checkedFormName: ["checked", FormValidators.required],
|
|
47
|
+
singleCheck: [undefined, FormValidators.requiredFun],
|
|
48
|
+
disableCheckboxFn: [],
|
|
49
|
+
showTotal: [undefined, FormValidators.requiredFun],
|
|
50
|
+
totalTitle: [],
|
|
51
|
+
showPagination: [true, FormValidators.required],
|
|
52
|
+
pageSize: [undefined, FormValidators.requiredFun],
|
|
53
|
+
showSizeChanger: [undefined, FormValidators.requiredFun],
|
|
54
|
+
pageSizeOptions: ["10,20,50,100", [FormValidators.required, FormValidators.pattern(/^\d+(?:,\d+)*$/)]],
|
|
55
|
+
});
|
|
56
|
+
funFields = {
|
|
57
|
+
...baseFunField,
|
|
58
|
+
...valueFunField,
|
|
59
|
+
disabledAppend: {
|
|
60
|
+
defaultValue: false
|
|
61
|
+
},
|
|
62
|
+
disabledRemove: {
|
|
63
|
+
defaultValue: false
|
|
64
|
+
},
|
|
65
|
+
maxLength: {
|
|
66
|
+
defaultValue: null
|
|
67
|
+
},
|
|
68
|
+
size: {
|
|
69
|
+
defaultValue: "middle"
|
|
70
|
+
},
|
|
71
|
+
showOrder: {
|
|
72
|
+
defaultValue: true
|
|
73
|
+
},
|
|
74
|
+
showDataSize: {
|
|
75
|
+
defaultValue: true
|
|
76
|
+
},
|
|
77
|
+
bordered: {
|
|
78
|
+
defaultValue: false
|
|
79
|
+
},
|
|
80
|
+
outerBordered: {
|
|
81
|
+
defaultValue: false
|
|
82
|
+
},
|
|
83
|
+
width: {
|
|
84
|
+
defaultValue: null
|
|
85
|
+
},
|
|
86
|
+
showCheckbox: {
|
|
87
|
+
defaultValue: false
|
|
88
|
+
},
|
|
89
|
+
singleCheck: {
|
|
90
|
+
defaultValue: false
|
|
91
|
+
},
|
|
92
|
+
showTotal: {
|
|
93
|
+
defaultValue: false
|
|
94
|
+
},
|
|
95
|
+
totalTitle: {
|
|
96
|
+
defaultValue: "合计"
|
|
97
|
+
},
|
|
98
|
+
pageSize: {
|
|
99
|
+
defaultValue: 10
|
|
100
|
+
},
|
|
101
|
+
showSizeChanger: {
|
|
102
|
+
defaultValue: true
|
|
103
|
+
},
|
|
104
|
+
addInitData: {
|
|
105
|
+
defaultValue: undefined
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
rowScopes = computed(() => {
|
|
109
|
+
const row = {};
|
|
110
|
+
this.value().fields?.forEach((field) => {
|
|
111
|
+
row[field.field] = "示例数据";
|
|
112
|
+
});
|
|
113
|
+
return [{
|
|
114
|
+
scopeId: this.formValue()?.id + '.row',
|
|
115
|
+
scopeName: "可编辑表格行",
|
|
116
|
+
ds: { row }
|
|
117
|
+
}];
|
|
118
|
+
}, ...(ngDevMode ? [{ debugName: "rowScopes" }] : []));
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EditTableSetting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: EditTableSetting, isStandalone: true, selector: "axis-design-edit-table-setting", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u7981\u7528\u6DFB\u52A0\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disabledAppend\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u7981\u7528\u5220\u9664\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disabledRemove\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u7981\u7528\u5220\u9664\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disabledRemoveFn\" [noListen]=\"true\" [onlyFun]=\"true\"\n [scopes]=\"rowScopes()\" editTip=\"\u8FD4\u56DEboolean\u4EE5\u63A7\u5236\u662F\u5426\u7981\u7528\u5F53\u524D\u884C\u7684\u5220\u9664\u6309\u94AE\"></axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u6700\u5927\u884C\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number ngModel [ngModelOptions]=\"{standalone:true}\" style=\"width: 100%;\" [nzMin]=\"1\">\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u9ED8\u8BA4\u884C\u6570\u636E\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"addInitData\">\n <ng-container [axisDynamic]=\"{component:'axis-components/input-json',inuse:true}\"\n [standalone]=\"true\" ngModel [ngModelOptions]=\"{standalone:true}\"></ng-container>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5916\u89C2\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u8868\u683C\u5927\u5C0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"size\">\n <nz-radio-group ngModel [ngModelOptions]=\"{standalone:true}\" nzSize=\"small\">\n <label nz-radio-button nzValue=\"small\">\u5C0F</label>\n <label nz-radio-button nzValue=\"middle\">\u4E2D</label>\n <label nz-radio-button nzValue=\"default\">\u5927</label>\n </nz-radio-group>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u5E8F\u53F7\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showOrder\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u6570\u636E\u6761\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showDataSize\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u8FB9\u6846\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"bordered\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u5916\u8FB9\u6846\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"outerBordered\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzTooltipTitle=\"\u4E0D\u8BBE\u7F6E\u65F6\uFF0C\u81EA\u52A8\u8BA1\u7B97\u6EDA\u52A8\u5BBD\u5EA6\uFF0C\u81EA\u52A8\u8BA1\u7B97\u4E0D\u5408\u7406\u65F6\u624B\u52A8\u8BBE\u7F6E\">\n \u8868\u683C\u6EDA\u52A8\u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"width\">\n <nz-input-number ngModel [ngModelOptions]=\"{standalone:true}\" style=\"width: 100%;\" [nzMin]=\"0\">\n <span nzInputAddonAfter>px</span>\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u9009\u62E9\u5668\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u884C\u9009\u62E9\u5668\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showCheckbox\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().showCheckbox?.funMode || formValue()?.showCheckbox?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u9009\u4E2D\u5B57\u6BB5\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <input nz-input formControlName=\"checkedFormName\" />\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u5355\u9009\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"singleCheck\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u9009\u62E9\u5668\u7981\u7528\u811A\u672C\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disableCheckboxFn\" [onlyFun]=\"true\" [noListen]=\"true\"\n [scopes]=\"rowScopes()\">\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u6570\u636E\u7EDF\u8BA1(\u672A\u5B9E\u73B0)\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u542F\u7528\u603B\u8BA1\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showTotal\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().showTotal?.funMode || formValue()?.showTotal?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u603B\u8BA1\u6807\u9898\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"totalTitle\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5206\u9875\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u5206\u9875\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <nz-switch formControlName=\"showPagination\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n @if (formValue()?.showPagination) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u9ED8\u8BA4\u884C\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"pageSize\">\n <nz-input-number style=\"width: 100%;\" ngModel [ngModelOptions]=\"{standalone:true}\" [nzMin]=\"1\">\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u884C\u6570\u4FEE\u6539\u5668\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showSizeChanger\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().showSizeChanger?.funMode || formValue()?.showSizeChanger?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired nzTooltipTitle=\"\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4F8B:10,20,50,100\">\n \u9875\u6570\u53EF\u9009\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <input nz-input formControlName=\"pageSizeOptions\" placeholder=\"\u4F8B:10,20,50,100\" />\n </nz-form-control>\n </nz-form-item>\n }\n }\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i1.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: i1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i2.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i2.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i2.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i2.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzGridModule }, { kind: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i4.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i4.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition"], exportAs: ["nzCollapse"] }, { kind: "component", type: BaseDesignSetting, selector: "axis-base-design-setting", inputs: ["scopeId", "exclude", "fg"] }, { kind: "component", type: InputTrigger, selector: "axis-input-trigger", inputs: ["internalTriggers", "value", "eventDesc", "isVisibleHandlerModal", "editEventHandler"], outputs: ["valueChange", "isVisibleHandlerModalChange", "editEventHandlerChange"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i5.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzVariant", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzBlur", "nzFocus", "nzOnStep"], exportAs: ["nzInputNumber"] }, { kind: "directive", type: i6.NzInputAddonAfterDirective, selector: "[nzInputAddonAfter]" }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i7.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "directive", type: DynamicDirective, selector: "[axisDynamic]", inputs: ["axisDynamic", "standalone", "isDesign"], outputs: ["onRegisteValueAccess"], exportAs: ["axisDynamic"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: i8.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i8.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "component", type: ValueDesignSetting, selector: "axis-value-design-setting", inputs: ["scopeId", "exclude", "fg"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
121
|
+
}
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EditTableSetting, decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{ selector: 'axis-design-edit-table-setting', imports: [NzFormModule, FormsModule, ReactiveFormsModule, FunField, NzGridModule, NzCollapseModule, BaseDesignSetting, InputTrigger, NzInputNumberModule, NzInputModule, NzSwitchModule, NzSelectModule, DynamicDirective, NzRadioModule, ValueDesignSetting], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u7981\u7528\u6DFB\u52A0\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disabledAppend\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u7981\u7528\u5220\u9664\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disabledRemove\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u7981\u7528\u5220\u9664\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disabledRemoveFn\" [noListen]=\"true\" [onlyFun]=\"true\"\n [scopes]=\"rowScopes()\" editTip=\"\u8FD4\u56DEboolean\u4EE5\u63A7\u5236\u662F\u5426\u7981\u7528\u5F53\u524D\u884C\u7684\u5220\u9664\u6309\u94AE\"></axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u6700\u5927\u884C\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"maxLength\">\n <nz-input-number ngModel [ngModelOptions]=\"{standalone:true}\" style=\"width: 100%;\" [nzMin]=\"1\">\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u9ED8\u8BA4\u884C\u6570\u636E\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"addInitData\">\n <ng-container [axisDynamic]=\"{component:'axis-components/input-json',inuse:true}\"\n [standalone]=\"true\" ngModel [ngModelOptions]=\"{standalone:true}\"></ng-container>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5916\u89C2\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u8868\u683C\u5927\u5C0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"size\">\n <nz-radio-group ngModel [ngModelOptions]=\"{standalone:true}\" nzSize=\"small\">\n <label nz-radio-button nzValue=\"small\">\u5C0F</label>\n <label nz-radio-button nzValue=\"middle\">\u4E2D</label>\n <label nz-radio-button nzValue=\"default\">\u5927</label>\n </nz-radio-group>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u5E8F\u53F7\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showOrder\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u6570\u636E\u6761\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showDataSize\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u8FB9\u6846\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"bordered\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u663E\u793A\u5916\u8FB9\u6846\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"outerBordered\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzTooltipTitle=\"\u4E0D\u8BBE\u7F6E\u65F6\uFF0C\u81EA\u52A8\u8BA1\u7B97\u6EDA\u52A8\u5BBD\u5EA6\uFF0C\u81EA\u52A8\u8BA1\u7B97\u4E0D\u5408\u7406\u65F6\u624B\u52A8\u8BBE\u7F6E\">\n \u8868\u683C\u6EDA\u52A8\u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"width\">\n <nz-input-number ngModel [ngModelOptions]=\"{standalone:true}\" style=\"width: 100%;\" [nzMin]=\"0\">\n <span nzInputAddonAfter>px</span>\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u9009\u62E9\u5668\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u884C\u9009\u62E9\u5668\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showCheckbox\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().showCheckbox?.funMode || formValue()?.showCheckbox?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u9009\u4E2D\u5B57\u6BB5\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <input nz-input formControlName=\"checkedFormName\" />\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u5355\u9009\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"singleCheck\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u9009\u62E9\u5668\u7981\u7528\u811A\u672C\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"disableCheckboxFn\" [onlyFun]=\"true\" [noListen]=\"true\"\n [scopes]=\"rowScopes()\">\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u6570\u636E\u7EDF\u8BA1(\u672A\u5B9E\u73B0)\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u542F\u7528\u603B\u8BA1\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showTotal\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().showTotal?.funMode || formValue()?.showTotal?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u603B\u8BA1\u6807\u9898\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"totalTitle\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5206\u9875\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u5206\u9875\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <nz-switch formControlName=\"showPagination\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n @if (formValue()?.showPagination) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u9ED8\u8BA4\u884C\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"pageSize\">\n <nz-input-number style=\"width: 100%;\" ngModel [ngModelOptions]=\"{standalone:true}\" [nzMin]=\"1\">\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u884C\u6570\u4FEE\u6539\u5668\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"showSizeChanger\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().showSizeChanger?.funMode || formValue()?.showSizeChanger?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired nzTooltipTitle=\"\u7528\u9017\u53F7\u5206\u9694\uFF0C\u4F8B:10,20,50,100\">\n \u9875\u6570\u53EF\u9009\u503C\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <input nz-input formControlName=\"pageSizeOptions\" placeholder=\"\u4F8B:10,20,50,100\" />\n </nz-form-control>\n </nz-form-item>\n }\n }\n </nz-collapse-panel>\n <axis-value-design-setting [fg]=\"fg\"></axis-value-design-setting>\n <axis-base-design-setting [fg]=\"fg\"></axis-base-design-setting>\n <axis-input-trigger formControlName=\"triggeEvents\" [internalTriggers]=\"['valueChange']\"></axis-input-trigger>\n </nz-collapse>\n</form>" }]
|
|
125
|
+
}] });
|
|
126
|
+
|
|
127
|
+
class Menu extends BaseMenu {
|
|
128
|
+
addField() {
|
|
129
|
+
const field = `unnamed#${this.optionsNodes.current.options.length + 1}`;
|
|
130
|
+
this.optionsNodes.current.options.push({
|
|
131
|
+
field: field,
|
|
132
|
+
title: "未命名",
|
|
133
|
+
inuse: true,
|
|
134
|
+
});
|
|
135
|
+
this.onChange?.({ nextNodeId: `${this.optionsNodes.parent?.id}.${field}`, historyDesc: "添加表格字段" });
|
|
136
|
+
}
|
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Menu, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.6", type: Menu, isStandalone: true, selector: "axis-design-edit-table-menu", usesInheritance: true, ngImport: i0, template: "<nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <li nz-menu-item (click)=\"addField()\">\n <i nz-icon nzType=\"plus\" nzTheme=\"outline\"></i>\n <nz-divider nzType=\"vertical\"></nz-divider>\n <span>\u6DFB\u52A0\u5B57\u6BB5</span>\n </li>\n <axis-common-menu [baseMenu]=\"this\"></axis-common-menu>\n </ul>\n</nz-dropdown-menu>", styles: [""], dependencies: [{ kind: "ngmodule", type: NzDropDownModule }, { kind: "directive", type: i1$1.NzMenuDirective, selector: "[nz-menu]", inputs: ["nzInlineIndent", "nzTheme", "nzMode", "nzInlineCollapsed", "nzSelectable"], outputs: ["nzClick"], exportAs: ["nzMenu"] }, { kind: "component", type: i1$1.NzMenuItemComponent, selector: "[nz-menu-item]", inputs: ["nzPaddingLeft", "nzDisabled", "nzSelected", "nzDanger", "nzMatchRouterExact", "nzMatchRouter"], exportAs: ["nzMenuItem"] }, { kind: "component", type: i2$1.NzDropdownMenuComponent, selector: "nz-dropdown-menu", exportAs: ["nzDropdownMenu"] }, { kind: "ngmodule", type: NzDividerModule }, { kind: "component", type: i3$1.NzDividerComponent, selector: "nz-divider", inputs: ["nzText", "nzType", "nzOrientation", "nzVariant", "nzDashed", "nzPlain"], exportAs: ["nzDivider"] }, { kind: "ngmodule", type: NzIconModule }, { kind: "directive", type: i4$1.NzIconDirective, selector: "nz-icon,[nz-icon]", inputs: ["nzSpin", "nzRotate", "nzType", "nzTheme", "nzTwotoneColor", "nzIconfont"], exportAs: ["nzIcon"] }, { kind: "component", type: CommonMenu, selector: "axis-common-menu", inputs: ["baseMenu"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
139
|
+
}
|
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: Menu, decorators: [{
|
|
141
|
+
type: Component,
|
|
142
|
+
args: [{ selector: 'axis-design-edit-table-menu', imports: [NzDropDownModule, NzDividerModule, NzIconModule, CommonMenu], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nz-dropdown-menu #menu=\"nzDropdownMenu\">\n <ul nz-menu>\n <li nz-menu-item (click)=\"addField()\">\n <i nz-icon nzType=\"plus\" nzTheme=\"outline\"></i>\n <nz-divider nzType=\"vertical\"></nz-divider>\n <span>\u6DFB\u52A0\u5B57\u6BB5</span>\n </li>\n <axis-common-menu [baseMenu]=\"this\"></axis-common-menu>\n </ul>\n</nz-dropdown-menu>" }]
|
|
143
|
+
}] });
|
|
144
|
+
|
|
145
|
+
class EditTableFieldSetting extends FunFieldValueBase {
|
|
146
|
+
fg = this.fb.group({
|
|
147
|
+
inuse: [undefined, FormValidators.requiredFun],
|
|
148
|
+
field: [],
|
|
149
|
+
title: [undefined, FormValidators.requiredFun],
|
|
150
|
+
sortAble: [undefined, FormValidators.requiredFun],
|
|
151
|
+
sortOrder: [],
|
|
152
|
+
sortPriority: [],
|
|
153
|
+
filterAble: [undefined, FormValidators.requiredFun],
|
|
154
|
+
filterMultiple: [undefined, FormValidators.requiredFun],
|
|
155
|
+
width: [],
|
|
156
|
+
align: [undefined, FormValidators.requiredFun],
|
|
157
|
+
freezeMode: [undefined, FormValidators.requiredFun],
|
|
158
|
+
totalAble: [false, FormValidators.required],
|
|
159
|
+
totalFn: [],
|
|
160
|
+
validators: [],
|
|
161
|
+
});
|
|
162
|
+
funFields = {
|
|
163
|
+
inuse: {
|
|
164
|
+
defaultValue: true
|
|
165
|
+
},
|
|
166
|
+
title: {
|
|
167
|
+
defaultValue: "未命名"
|
|
168
|
+
},
|
|
169
|
+
sortAble: {
|
|
170
|
+
defaultValue: false
|
|
171
|
+
},
|
|
172
|
+
sortOrder: {
|
|
173
|
+
defaultValue: null
|
|
174
|
+
},
|
|
175
|
+
sortPriority: {
|
|
176
|
+
defaultValue: null
|
|
177
|
+
},
|
|
178
|
+
filterAble: {
|
|
179
|
+
defaultValue: false
|
|
180
|
+
},
|
|
181
|
+
filterMultiple: {
|
|
182
|
+
defaultValue: false
|
|
183
|
+
},
|
|
184
|
+
width: {
|
|
185
|
+
defaultValue: null
|
|
186
|
+
},
|
|
187
|
+
align: {
|
|
188
|
+
defaultValue: "left"
|
|
189
|
+
},
|
|
190
|
+
freezeMode: {
|
|
191
|
+
defaultValue: "none"
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EditTableFieldSetting, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
195
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: EditTableFieldSetting, isStandalone: true, selector: "axis-design-edit-table-field-setting", usesInheritance: true, ngImport: i0, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u5B57\u6BB5\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <input nz-input formControlName=\"field\" />\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u5B57\u6BB5\u6807\u9898\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"title\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u53EF\u7528\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"inuse\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5916\u89C2\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"width\">\n <nz-input-number ngModel [ngModelOptions]=\"{standalone:true}\" style=\"width: 100%;\" [nzMin]=\"0\">\n <span nzInputAddonAfter>px</span>\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u5BF9\u9F50\u65B9\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"align\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"left\" nzLabel=\"\u5DE6\u5BF9\u9F50\"></nz-option>\n <nz-option nzValue=\"center\" nzLabel=\"\u5C45\u4E2D\"></nz-option>\n <nz-option nzValue=\"right\" nzLabel=\"\u53F3\u5BF9\u9F50\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u56FA\u5B9A\u65B9\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"freezeMode\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"none\" nzLabel=\"\u4E0D\u56FA\u5B9A\"></nz-option>\n <nz-option nzValue=\"left\" nzLabel=\"\u56FA\u5B9A\u5728\u5DE6\"></nz-option>\n <nz-option nzValue=\"right\" nzLabel=\"\u56FA\u5B9A\u5728\u53F3\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u6392\u5E8F\u8FC7\u6EE4\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u6392\u5E8F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"sortAble\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().sortAble?.funMode || formValue()?.sortAble?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u9ED8\u8BA4\u6392\u5E8F\u65B9\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"sortOrder\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\" nzAllowClear>\n <nz-option nzValue=\"ascend\" nzLabel=\"\u5347\u5E8F\"></nz-option>\n <nz-option nzValue=\"descend\" nzLabel=\"\u964D\u5E8F\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u6392\u5E8F\u4F18\u5148\u7EA7\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"sortPriority\">\n <nz-input-number style=\"width: 100%;\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u8FC7\u6EE4\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"filterAble\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().filterAble?.funMode || formValue()?.filterAble?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u591A\u4E2A\u8FC7\u6EE4\u6761\u4EF6\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"filterMultiple\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u7EDF\u8BA1\u8BBE\u7F6E(\u672A\u5B9E\u73B0)\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u7EDF\u8BA1\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <nz-switch formControlName=\"totalAble\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().totalAble) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u81EA\u5B9A\u4E49\u7EDF\u8BA1\u51FD\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"totalFn\" [onlyFun]=\"true\" [noListen]=\"true\">\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <axis-input-validator formControlName=\"validators\"></axis-input-validator>\n </nz-collapse>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i1.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: i1.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i2.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzForm"] }, { kind: "component", type: i2.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i2.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i2.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "ngmodule", type: NzCollapseModule }, { kind: "component", type: i4.NzCollapsePanelComponent, selector: "nz-collapse-panel", inputs: ["nzActive", "nzDisabled", "nzShowArrow", "nzExtra", "nzHeader", "nzExpandedIcon"], outputs: ["nzActiveChange"], exportAs: ["nzCollapsePanel"] }, { kind: "component", type: i4.NzCollapseComponent, selector: "nz-collapse", inputs: ["nzAccordion", "nzBordered", "nzGhost", "nzExpandIconPosition"], exportAs: ["nzCollapse"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i6.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "component", type: FunField, selector: "axis-fun-field", inputs: ["scopes", "exclude", "scopeId", "onlyFun", "noListen", "disabled", "editTip", "value", "open", "showCreateListenModal", "createListenDataSourceName"], outputs: ["valueChange", "openChange", "showCreateListenModalChange", "createListenDataSourceNameChange"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "ngmodule", type: NzSelectModule }, { kind: "component", type: i6$1.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i6$1.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus", "nzOnClear"], exportAs: ["nzSelect"] }, { kind: "ngmodule", type: NzInputNumberModule }, { kind: "component", type: i5.NzInputNumberComponent, selector: "nz-input-number", inputs: ["nzId", "nzSize", "nzPlaceHolder", "nzStatus", "nzVariant", "nzStep", "nzMin", "nzMax", "nzPrecision", "nzParser", "nzFormatter", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBordered", "nzKeyboard", "nzControls"], outputs: ["nzBlur", "nzFocus", "nzOnStep"], exportAs: ["nzInputNumber"] }, { kind: "directive", type: i6.NzInputAddonAfterDirective, selector: "[nzInputAddonAfter]" }, { kind: "ngmodule", type: NzSwitchModule }, { kind: "component", type: i7.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: InputValidator, selector: "axis-input-validator", inputs: ["value", "showModal"], outputs: ["valueChange", "showModalChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
196
|
+
}
|
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: EditTableFieldSetting, decorators: [{
|
|
198
|
+
type: Component,
|
|
199
|
+
args: [{ selector: 'axis-design-edit-table-field-setting', imports: [FormsModule, NzFormModule, ReactiveFormsModule, NzCollapseModule, NzInputModule, FunField, NzRadioModule, NzSelectModule, NzInputNumberModule, NzSwitchModule, InputValidator], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"fg\" nz-form>\n <nz-collapse [nzBordered]=\"false\">\n <nz-collapse-panel nzHeader=\"\u57FA\u672C\u8BBE\u7F6E\" nzActive>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u5B57\u6BB5\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <input nz-input formControlName=\"field\" />\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u5B57\u6BB5\u6807\u9898\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"title\">\n <input nz-input ngModel [ngModelOptions]=\"{standalone:true}\" />\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u53EF\u7528\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"inuse\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u5916\u89C2\u8BBE\u7F6E\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u5BBD\u5EA6\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"width\">\n <nz-input-number ngModel [ngModelOptions]=\"{standalone:true}\" style=\"width: 100%;\" [nzMin]=\"0\">\n <span nzInputAddonAfter>px</span>\n </nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u5BF9\u9F50\u65B9\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"align\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"left\" nzLabel=\"\u5DE6\u5BF9\u9F50\"></nz-option>\n <nz-option nzValue=\"center\" nzLabel=\"\u5C45\u4E2D\"></nz-option>\n <nz-option nzValue=\"right\" nzLabel=\"\u53F3\u5BF9\u9F50\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u56FA\u5B9A\u65B9\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"freezeMode\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\">\n <nz-option nzValue=\"none\" nzLabel=\"\u4E0D\u56FA\u5B9A\"></nz-option>\n <nz-option nzValue=\"left\" nzLabel=\"\u56FA\u5B9A\u5728\u5DE6\"></nz-option>\n <nz-option nzValue=\"right\" nzLabel=\"\u56FA\u5B9A\u5728\u53F3\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u6392\u5E8F\u8FC7\u6EE4\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u6392\u5E8F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"sortAble\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().sortAble?.funMode || formValue()?.sortAble?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u9ED8\u8BA4\u6392\u5E8F\u65B9\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"sortOrder\">\n <nz-select ngModel [ngModelOptions]=\"{standalone:true}\" nzAllowClear>\n <nz-option nzValue=\"ascend\" nzLabel=\"\u5347\u5E8F\"></nz-option>\n <nz-option nzValue=\"descend\" nzLabel=\"\u964D\u5E8F\"></nz-option>\n </nz-select>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u6392\u5E8F\u4F18\u5148\u7EA7\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"sortPriority\">\n <nz-input-number style=\"width: 100%;\" ngModel\n [ngModelOptions]=\"{standalone:true}\"></nz-input-number>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u8FC7\u6EE4\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"filterAble\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().filterAble?.funMode || formValue()?.filterAble?.originValue) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u591A\u4E2A\u8FC7\u6EE4\u6761\u4EF6\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"filterMultiple\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <nz-collapse-panel nzHeader=\"\u7EDF\u8BA1\u8BBE\u7F6E(\u672A\u5B9E\u73B0)\">\n <nz-form-item>\n <nz-form-label nzSpan=\"10\" nzRequired>\n \u662F\u5426\u7EDF\u8BA1\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <nz-switch formControlName=\"totalAble\"></nz-switch>\n </nz-form-control>\n </nz-form-item>\n @if (formValue().totalAble) {\n <nz-form-item>\n <nz-form-label nzSpan=\"10\">\n \u81EA\u5B9A\u4E49\u7EDF\u8BA1\u51FD\u6570\n </nz-form-label>\n <nz-form-control nzSpan=\"14\">\n <axis-fun-field formControlName=\"totalFn\" [onlyFun]=\"true\" [noListen]=\"true\">\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n }\n </nz-collapse-panel>\n <axis-input-validator formControlName=\"validators\"></axis-input-validator>\n </nz-collapse>\n</form>" }]
|
|
200
|
+
}] });
|
|
201
|
+
|
|
202
|
+
const Config = {
|
|
203
|
+
componentName: "可编辑表格",
|
|
204
|
+
buildOptionsNodes(nextInfo) {
|
|
205
|
+
const next = [];
|
|
206
|
+
const children = [];
|
|
207
|
+
nextInfo.currentObject.fields?.forEach((f, i) => {
|
|
208
|
+
next.push({
|
|
209
|
+
parentId: nextInfo.currentObject.id + "." + i,
|
|
210
|
+
parentObject: f,
|
|
211
|
+
indexOfParent: "child",
|
|
212
|
+
scopeId: nextInfo.currentObject.id + ".row"
|
|
213
|
+
});
|
|
214
|
+
children.push(new OptionsNode({
|
|
215
|
+
id: nextInfo.currentObject.id + "." + i,
|
|
216
|
+
scopeId: nextInfo.currentObject.id + ".row",
|
|
217
|
+
parentId: nextInfo.currentObject.id,
|
|
218
|
+
parentObj: nextInfo.currentObject.fields,
|
|
219
|
+
indexOfParentObj: i,
|
|
220
|
+
rootOptions: f,
|
|
221
|
+
name: `字段[${f.field}]`,
|
|
222
|
+
icon: "profile",
|
|
223
|
+
canSetting: true,
|
|
224
|
+
settingType: EditTableFieldSetting,
|
|
225
|
+
contextMenu: SimpleMenu,
|
|
226
|
+
canDrag: true,
|
|
227
|
+
dragType: "axis-components/edit-table/edit-table-field",
|
|
228
|
+
canDrop: true,
|
|
229
|
+
dropType: "component",
|
|
230
|
+
dropObj: f,
|
|
231
|
+
defaultDropIndex: "child",
|
|
232
|
+
children: []
|
|
233
|
+
}));
|
|
234
|
+
});
|
|
235
|
+
return {
|
|
236
|
+
treeNode: new OptionsNode({
|
|
237
|
+
parentId: nextInfo.parentId,
|
|
238
|
+
scopeId: nextInfo.scopeId,
|
|
239
|
+
name: "可编辑表格",
|
|
240
|
+
canSetting: true,
|
|
241
|
+
canDrag: true,
|
|
242
|
+
dragType: "component",
|
|
243
|
+
canDrop: true,
|
|
244
|
+
dropType: "axis-components/edit-table/edit-table-field",
|
|
245
|
+
dropObj: nextInfo.currentObject.fields,
|
|
246
|
+
defaultDropIndex: nextInfo.currentObject.fields.length,
|
|
247
|
+
parentObj: nextInfo.parentObject,
|
|
248
|
+
indexOfParentObj: nextInfo.indexOfParent,
|
|
249
|
+
rootOptions: nextInfo.currentObject,
|
|
250
|
+
children,
|
|
251
|
+
settingType: EditTableSetting,
|
|
252
|
+
contextMenu: Menu,
|
|
253
|
+
icon: "form"
|
|
254
|
+
}),
|
|
255
|
+
next: next,
|
|
256
|
+
newScopes: [
|
|
257
|
+
{
|
|
258
|
+
scopeId: nextInfo.currentObject.id + ".row",
|
|
259
|
+
parentScopeId: nextInfo.scopeId,
|
|
260
|
+
scopeName: "可编辑表格行",
|
|
261
|
+
ds: {
|
|
262
|
+
row: nextInfo.currentObject.data?.[0] ?? "示例数据"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
};
|
|
267
|
+
},
|
|
268
|
+
bindElementsOptionsNode(element, options) {
|
|
269
|
+
const dropElement = element.querySelector("thead>.ant-table-row");
|
|
270
|
+
const res = {
|
|
271
|
+
[options.id]: { element, dropElement: dropElement },
|
|
272
|
+
};
|
|
273
|
+
options.fields?.forEach((f, i) => {
|
|
274
|
+
const fieldElement = dropElement?.querySelector(`th[data-index="${i}"]`);
|
|
275
|
+
const fieldChildElement = element?.querySelector(`td[data-index="${i}"]`);
|
|
276
|
+
res[`${options.id}.${i}`] = { element: fieldElement, dropElement: fieldChildElement };
|
|
277
|
+
});
|
|
278
|
+
return res;
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Generated bundle index. Do not edit.
|
|
284
|
+
*/
|
|
285
|
+
|
|
286
|
+
export { Config };
|
|
287
|
+
//# sourceMappingURL=ngx-axis-appforge-axis-components-edit-table-design.mjs.map
|