ngx-axis-appforge 1.0.12 → 1.0.13
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-covers/read-file.svg +26 -0
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs +8 -3
- package/fesm2022/ngx-axis-appforge-axis-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +12 -6
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-edit-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-flex.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-form.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-loop-task.mjs +6 -6
- package/fesm2022/ngx-axis-appforge-axis-components-loop-task.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-read-file-design.mjs +116 -0
- package/fesm2022/ngx-axis-appforge-axis-components-read-file-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-read-file.mjs +114 -0
- package/fesm2022/ngx-axis-appforge-axis-components-read-file.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs +3 -3
- package/fesm2022/ngx-axis-appforge-axis-components-scope.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-transfer.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +17 -0
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +65 -5
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +9 -1
- package/types/ngx-axis-appforge-axis-components-checkbox.d.ts +1 -0
- package/types/ngx-axis-appforge-axis-components-read-file-design.d.ts +5 -0
- package/types/ngx-axis-appforge-axis-components-read-file.d.ts +37 -0
- package/types/ngx-axis-appforge-core.d.ts +3 -1
|
@@ -392,6 +392,7 @@ class ScopeDirective {
|
|
|
392
392
|
axisScope = input.required(...(ngDevMode ? [{ debugName: "axisScope" }] : /* istanbul ignore next */ []));
|
|
393
393
|
scopeName = input.required(...(ngDevMode ? [{ debugName: "scopeName" }] : /* istanbul ignore next */ []));
|
|
394
394
|
isRoot = input(false, ...(ngDevMode ? [{ debugName: "isRoot" }] : /* istanbul ignore next */ []));
|
|
395
|
+
passComponents = input(false, ...(ngDevMode ? [{ debugName: "passComponents" }] : /* istanbul ignore next */ []));
|
|
395
396
|
elementRef = inject(ElementRef);
|
|
396
397
|
_parentScope = inject(ScopeDirective, { optional: true, skipSelf: true });
|
|
397
398
|
httpContextData = inject(AXIS_HTTP_CONTEXT_DATA_TOKEN, { optional: true });
|
|
@@ -689,12 +690,20 @@ class ScopeDirective {
|
|
|
689
690
|
return res;
|
|
690
691
|
}
|
|
691
692
|
registInstance(id, instance) {
|
|
692
|
-
if (
|
|
693
|
+
if (this.parentScope && this.passComponents()) {
|
|
694
|
+
this.parentScope.registInstance(id, instance);
|
|
695
|
+
}
|
|
696
|
+
else {
|
|
693
697
|
this.instanceMap.set(id, instance);
|
|
694
698
|
}
|
|
695
699
|
}
|
|
696
700
|
unRegistInstance(id) {
|
|
697
|
-
this.
|
|
701
|
+
if (this.parentScope && this.passComponents()) {
|
|
702
|
+
this.parentScope.unRegistInstance(id);
|
|
703
|
+
}
|
|
704
|
+
else {
|
|
705
|
+
this.instanceMap.delete(id);
|
|
706
|
+
}
|
|
698
707
|
}
|
|
699
708
|
findInstance(id) {
|
|
700
709
|
return this.instanceMap.get(id) ?? this.parentScope?.findInstance(id);
|
|
@@ -848,14 +857,14 @@ class ScopeDirective {
|
|
|
848
857
|
return fn(fnstr, Object.assign({}, this.snapshotAll(), args, this.injectFuncs), true);
|
|
849
858
|
}
|
|
850
859
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ScopeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
851
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.12", type: ScopeDirective, isStandalone: true, selector: "[axisScope]", inputs: { axisScope: { classPropertyName: "axisScope", publicName: "axisScope", isSignal: true, isRequired: true, transformFunction: null }, scopeName: { classPropertyName: "scopeName", publicName: "scopeName", isSignal: true, isRequired: true, transformFunction: null }, isRoot: { classPropertyName: "isRoot", publicName: "isRoot", isSignal: true, isRequired: false, transformFunction: null }, dataSources: { classPropertyName: "dataSources", publicName: "dataSources", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
860
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.12", type: ScopeDirective, isStandalone: true, selector: "[axisScope]", inputs: { axisScope: { classPropertyName: "axisScope", publicName: "axisScope", isSignal: true, isRequired: true, transformFunction: null }, scopeName: { classPropertyName: "scopeName", publicName: "scopeName", isSignal: true, isRequired: true, transformFunction: null }, isRoot: { classPropertyName: "isRoot", publicName: "isRoot", isSignal: true, isRequired: false, transformFunction: null }, passComponents: { classPropertyName: "passComponents", publicName: "passComponents", isSignal: true, isRequired: false, transformFunction: null }, dataSources: { classPropertyName: "dataSources", publicName: "dataSources", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
852
861
|
}
|
|
853
862
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ScopeDirective, decorators: [{
|
|
854
863
|
type: Directive,
|
|
855
864
|
args: [{
|
|
856
865
|
selector: '[axisScope]'
|
|
857
866
|
}]
|
|
858
|
-
}], ctorParameters: () => [], propDecorators: { axisScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisScope", required: true }] }], scopeName: [{ type: i0.Input, args: [{ isSignal: true, alias: "scopeName", required: true }] }], isRoot: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRoot", required: false }] }], dataSources: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSources", required: false }] }] } });
|
|
867
|
+
}], ctorParameters: () => [], propDecorators: { axisScope: [{ type: i0.Input, args: [{ isSignal: true, alias: "axisScope", required: true }] }], scopeName: [{ type: i0.Input, args: [{ isSignal: true, alias: "scopeName", required: true }] }], isRoot: [{ type: i0.Input, args: [{ isSignal: true, alias: "isRoot", required: false }] }], passComponents: [{ type: i0.Input, args: [{ isSignal: true, alias: "passComponents", required: false }] }], dataSources: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSources", required: false }] }] } });
|
|
859
868
|
|
|
860
869
|
class EventsHandlerService {
|
|
861
870
|
http;
|
|
@@ -886,6 +895,8 @@ class EventsHandlerService {
|
|
|
886
895
|
return this.runScriptEventHandler(e);
|
|
887
896
|
case "print":
|
|
888
897
|
return this.printEventHandler(e);
|
|
898
|
+
case "exportFile":
|
|
899
|
+
return this.exportFileEventHandler(e);
|
|
889
900
|
default:
|
|
890
901
|
if (this.otherHandlers) {
|
|
891
902
|
for (const h of this.otherHandlers) {
|
|
@@ -1105,6 +1116,12 @@ class EventsHandlerService {
|
|
|
1105
1116
|
});
|
|
1106
1117
|
return of(true);
|
|
1107
1118
|
}
|
|
1119
|
+
exportFileEventHandler(e) {
|
|
1120
|
+
if (e.data?.content && e.data.fileName) {
|
|
1121
|
+
saveAs(new Blob([e.data.content]), e.data.fileName);
|
|
1122
|
+
}
|
|
1123
|
+
return of(true);
|
|
1124
|
+
}
|
|
1108
1125
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: EventsHandlerService, deps: [{ token: i1.HttpClient }, { token: i2.PlatformLocation }, { token: i3.NzMessageService }, { token: i2$1.NzModalService }, { token: i5.Router }, { token: AXIS_EVENT_HANDLERS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1109
1126
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: EventsHandlerService, providedIn: 'root' });
|
|
1110
1127
|
}
|
|
@@ -1310,7 +1327,7 @@ class ValueAccess extends Base {
|
|
|
1310
1327
|
this.onChange?.(e.data?.data);
|
|
1311
1328
|
return of(true);
|
|
1312
1329
|
case "getValue":
|
|
1313
|
-
return this.triggeEvents("afterGetValue", { getValue: this.value() }, e.triggeEvents);
|
|
1330
|
+
return this.triggeEvents("afterGetValue", { ...e.tempDataSource, getValue: this.value() }, e.triggeEvents);
|
|
1314
1331
|
}
|
|
1315
1332
|
return undefined;
|
|
1316
1333
|
}
|
|
@@ -2194,6 +2211,7 @@ class FunField {
|
|
|
2194
2211
|
this.value.set({});
|
|
2195
2212
|
}
|
|
2196
2213
|
if (this.value() !== undefined) {
|
|
2214
|
+
this.value().funMode = false;
|
|
2197
2215
|
this.value().originValue = v;
|
|
2198
2216
|
this.changeValue();
|
|
2199
2217
|
this.computeResult.set(v);
|
|
@@ -3219,6 +3237,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
|
|
|
3219
3237
|
], template: "<form nz-form [formGroup]=\"fg\">\n <nz-form-item>\n <nz-form-label [nzSpan]=\"6\" nzRequired>\n \u6570\u636E\u6E90\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"name\" [noListen]=\"noListen()\">\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]=\"6\">\n \u6570\u636E\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"data\" [noListen]=\"noListen()\">\n <ng-container [axisDynamic]=\"{component:'axis-components/input-json',inuse:true}\" [standalone]=\"true\"\n ngModel [ngModelOptions]=\"{standalone:true}\"></ng-container>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n</form>" }]
|
|
3220
3238
|
}] });
|
|
3221
3239
|
|
|
3240
|
+
class ExportFileHandler extends FunFieldValueBase {
|
|
3241
|
+
noListen = inject(InputTrigger).noListen;
|
|
3242
|
+
fg = this.fb.group({
|
|
3243
|
+
fileName: [undefined, FormValidators.requiredFun],
|
|
3244
|
+
content: [],
|
|
3245
|
+
});
|
|
3246
|
+
funFields = {
|
|
3247
|
+
fileName: {
|
|
3248
|
+
defaultValue: "",
|
|
3249
|
+
},
|
|
3250
|
+
content: {
|
|
3251
|
+
defaultValue: "",
|
|
3252
|
+
}
|
|
3253
|
+
};
|
|
3254
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ExportFileHandler, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3255
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: ExportFileHandler, isStandalone: true, selector: "axis-export-file-handler", providers: [
|
|
3256
|
+
{
|
|
3257
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3258
|
+
useExisting: forwardRef(() => ExportFileHandler),
|
|
3259
|
+
multi: true
|
|
3260
|
+
}
|
|
3261
|
+
], usesInheritance: true, ngImport: i0, template: "<form nz-form [formGroup]=\"fg\">\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u6587\u4EF6\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"fileName\" [noListen]=\"noListen()\">\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=\"6\">\n \u6587\u4EF6\u5185\u5BB9\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"content\" [noListen]=\"noListen()\">\n <textarea nz-input ngModel [ngModelOptions]=\"{standalone:true}\"></textarea>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n</form>", styles: [""], dependencies: [{ kind: "ngmodule", type: NzFormModule }, { kind: "directive", type: i1$3.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$3.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i2$3.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap", "nzSize", "nzVariant", "nzRequiredMark"], exportAs: ["nzForm"] }, { kind: "component", type: i2$3.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i2$3.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i2$3.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$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$3.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$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$3.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: FormsModule }, { kind: "directive", type: i3$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i4.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3262
|
+
}
|
|
3263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ExportFileHandler, decorators: [{
|
|
3264
|
+
type: Component,
|
|
3265
|
+
args: [{ selector: 'axis-export-file-handler', imports: [NzFormModule, ReactiveFormsModule, FunField, FormsModule, NzInputModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
3266
|
+
{
|
|
3267
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3268
|
+
useExisting: forwardRef(() => ExportFileHandler),
|
|
3269
|
+
multi: true
|
|
3270
|
+
}
|
|
3271
|
+
], template: "<form nz-form [formGroup]=\"fg\">\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u6587\u4EF6\u540D\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"fileName\" [noListen]=\"noListen()\">\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=\"6\">\n \u6587\u4EF6\u5185\u5BB9\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"content\" [noListen]=\"noListen()\">\n <textarea nz-input ngModel [ngModelOptions]=\"{standalone:true}\"></textarea>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n</form>" }]
|
|
3272
|
+
}] });
|
|
3273
|
+
|
|
3222
3274
|
const baseEventHandlerDescs = {
|
|
3223
3275
|
api: {
|
|
3224
3276
|
name: "api",
|
|
@@ -3338,6 +3390,13 @@ const baseEventHandlerDescs = {
|
|
|
3338
3390
|
dataComponent: PrintHandler,
|
|
3339
3391
|
target: "service",
|
|
3340
3392
|
},
|
|
3393
|
+
exportFile: {
|
|
3394
|
+
name: "exportFile",
|
|
3395
|
+
title: "导出文件",
|
|
3396
|
+
icon: "file",
|
|
3397
|
+
dataComponent: ExportFileHandler,
|
|
3398
|
+
target: "service",
|
|
3399
|
+
},
|
|
3341
3400
|
exportExcel: {
|
|
3342
3401
|
name: "exportExcel",
|
|
3343
3402
|
title: "导出Excel",
|
|
@@ -3368,6 +3427,7 @@ const baseEventHandlerDescGroups = [
|
|
|
3368
3427
|
baseEventHandlerDescs["route"],
|
|
3369
3428
|
baseEventHandlerDescs["runScript"],
|
|
3370
3429
|
baseEventHandlerDescs["print"],
|
|
3430
|
+
baseEventHandlerDescs["exportFile"],
|
|
3371
3431
|
baseEventHandlerDescs["exportExcel"],
|
|
3372
3432
|
baseEventHandlerDescs["componentsSnapshot"],
|
|
3373
3433
|
]
|