ngx-axis-appforge 0.0.51 → 0.0.52
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/rich-text-editor/design/index.d.ts +5 -0
- package/axis-components/rich-text-editor/index.d.ts +27 -0
- package/axis-components/table/index.d.ts +1 -1
- package/axis-components/table-helper/index.d.ts +1 -0
- package/axis-components-covers/rate.svg +2 -2
- package/axis-components-covers/rich-text-editor.png +0 -0
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-button.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-design.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.mjs +2 -2
- package/fesm2022/ngx-axis-appforge-axis-components-form-item.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-rich-text-editor-design.mjs +76 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor-design.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor.mjs +139 -0
- package/fesm2022/ngx-axis-appforge-axis-components-rich-text-editor.mjs.map +1 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs +3 -0
- package/fesm2022/ngx-axis-appforge-axis-components-table-helper.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs +4 -4
- package/fesm2022/ngx-axis-appforge-axis-components-table.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs +19 -13
- package/fesm2022/ngx-axis-appforge-axis-components-upload.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-axis-components.mjs +19 -2
- package/fesm2022/ngx-axis-appforge-axis-components.mjs.map +1 -1
- package/fesm2022/ngx-axis-appforge-core.mjs +76 -4
- package/fesm2022/ngx-axis-appforge-core.mjs.map +1 -1
- package/package.json +123 -113
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, effect, inject, input, ElementRef, isSignal, Directive, Optional, Inject, Injectable, Injector, HostBinding, untracked, model, ViewChild, output, ViewContainerRef, forwardRef, Pipe, signal, ChangeDetectionStrategy, Component, computed, ContentChild } from '@angular/core';
|
|
3
|
-
import { BehaviorSubject, map, catchError, of, Subject, switchMap, debounceTime, Observable, isObservable, merge, NEVER,
|
|
3
|
+
import { BehaviorSubject, filter, map, catchError, of, Subject, switchMap, debounceTime, Observable, isObservable, merge, NEVER, take, mergeMap, from, mergeWith } from 'rxjs';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
|
-
import { HttpContextToken, HttpContext, HttpRequest, HttpClient } from '@angular/common/http';
|
|
5
|
+
import { HttpContextToken, HttpContext, HttpRequest, HttpEventType, HttpClient } from '@angular/common/http';
|
|
6
6
|
import * as i4 from '@angular/router';
|
|
7
7
|
import { ActivatedRoute } from '@angular/router';
|
|
8
8
|
import * as i2 from 'ng-zorro-antd/message';
|
|
@@ -46,7 +46,7 @@ import * as i8 from 'ng-zorro-antd/core/wave';
|
|
|
46
46
|
import * as i2$3 from 'ng-zorro-antd/form';
|
|
47
47
|
import { NzFormModule } from 'ng-zorro-antd/form';
|
|
48
48
|
import * as i4$3 from 'ng-zorro-antd/switch';
|
|
49
|
-
import { NzSwitchModule } from 'ng-zorro-antd/switch';
|
|
49
|
+
import { NzSwitchModule, NzSwitchComponent } from 'ng-zorro-antd/switch';
|
|
50
50
|
import * as i1$3 from 'ng-zorro-antd/grid';
|
|
51
51
|
import { NzGridModule } from 'ng-zorro-antd/grid';
|
|
52
52
|
import * as i7$1 from 'ng-zorro-antd/tree';
|
|
@@ -181,7 +181,7 @@ function sendApi(opt, http) {
|
|
|
181
181
|
context = new HttpContext().set(AXIS_HTTP_CONTEXT_TOKEN, contextData);
|
|
182
182
|
}
|
|
183
183
|
return http.request(new HttpRequest(opt.method?.toUpperCase() || "GET", opt.url, opt.body, { context: context }))
|
|
184
|
-
.pipe(map((h) => h.body), catchError(e => of(undefined)));
|
|
184
|
+
.pipe(filter(e => e.type == HttpEventType.Response), map((h) => h.body), catchError(e => of(undefined)));
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
function listSort(list, compareField, reverse = false) {
|
|
@@ -822,6 +822,8 @@ class EventsHandlerService {
|
|
|
822
822
|
return this.routeEventHandler(e);
|
|
823
823
|
case "runScript":
|
|
824
824
|
return this.runScriptEventHandler(e);
|
|
825
|
+
case "print":
|
|
826
|
+
return this.printEventHandler(e);
|
|
825
827
|
default:
|
|
826
828
|
if (this.otherHandlers) {
|
|
827
829
|
for (const h of this.otherHandlers) {
|
|
@@ -988,6 +990,34 @@ class EventsHandlerService {
|
|
|
988
990
|
}
|
|
989
991
|
return of(false);
|
|
990
992
|
}
|
|
993
|
+
printEventHandler(e) {
|
|
994
|
+
const iframe = document.createElement('iframe');
|
|
995
|
+
iframe.style.position = 'fixed';
|
|
996
|
+
iframe.style.right = '0';
|
|
997
|
+
iframe.style.bottom = '0';
|
|
998
|
+
iframe.style.width = '0';
|
|
999
|
+
iframe.style.height = '0';
|
|
1000
|
+
iframe.style.border = '0';
|
|
1001
|
+
document.body.appendChild(iframe);
|
|
1002
|
+
const doc = iframe.contentDocument || iframe.contentWindow?.document;
|
|
1003
|
+
if (!doc) {
|
|
1004
|
+
return of(false);
|
|
1005
|
+
}
|
|
1006
|
+
if (e.data?.loadTinyCss) {
|
|
1007
|
+
const link = doc.createElement('link');
|
|
1008
|
+
link.rel = 'stylesheet';
|
|
1009
|
+
link.media = 'all';
|
|
1010
|
+
link.href = '/tinymce/skins/content/default/content.min.css';
|
|
1011
|
+
doc.head.appendChild(link);
|
|
1012
|
+
}
|
|
1013
|
+
doc.body.className = "mce-content-body";
|
|
1014
|
+
doc.body.innerHTML = e.data?.html || '';
|
|
1015
|
+
iframe.onload = () => {
|
|
1016
|
+
iframe.contentWindow?.print();
|
|
1017
|
+
};
|
|
1018
|
+
doc.close();
|
|
1019
|
+
return of(true);
|
|
1020
|
+
}
|
|
991
1021
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EventsHandlerService, deps: [{ token: i1.HttpClient }, { token: i2.NzMessageService }, { token: i2$1.NzModalService }, { token: i4.Router }, { token: AXIS_EVENT_HANDLERS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
992
1022
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EventsHandlerService, providedIn: 'root' });
|
|
993
1023
|
}
|
|
@@ -2660,6 +2690,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
2660
2690
|
], template: "<form nz-form [formGroup]=\"fg\">\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u63D0\u9192\u65B9\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"tipWay\" [noListen]=\"noListen()\" editTip=\"message-\u6D88\u606F modal-\u5F39\u7A97\">\n <nz-radio-group ngModel [ngModelOptions]=\"{standalone:true}\">\n <label nz-radio-button nzValue=\"message\">\u6D88\u606F</label>\n <label nz-radio-button nzValue=\"modal\">\u5F39\u7A97</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=\"6\" nzRequired>\n \u6D88\u606F\u7C7B\u578B\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"type\" [noListen]=\"noListen()\" editTip=\"info-\u63D0\u9192 success-\u6210\u529F warning-\u8B66\u544A error-\u9519\u8BEF\">\n <nz-radio-group ngModel [ngModelOptions]=\"{standalone:true}\" nzSize=\"small\">\n <label nz-radio-button nzValue=\"info\">\u63D0\u9192</label>\n <label nz-radio-button nzValue=\"success\">\u6210\u529F</label>\n <label nz-radio-button nzValue=\"warning\">\u8B66\u544A</label>\n <label nz-radio-button nzValue=\"error\">\u9519\u8BEF</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=\"6\" nzRequired>\n \u6D88\u606F\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>" }]
|
|
2661
2691
|
}] });
|
|
2662
2692
|
|
|
2693
|
+
class PrintHandler extends FunFieldValueBase {
|
|
2694
|
+
noListen = inject(InputTrigger).noListen;
|
|
2695
|
+
fg = this.fb.group({
|
|
2696
|
+
html: [],
|
|
2697
|
+
loadTinyCss: [undefined, FormValidators.requiredFun],
|
|
2698
|
+
});
|
|
2699
|
+
funFields = {
|
|
2700
|
+
html: {
|
|
2701
|
+
defaultValue: "",
|
|
2702
|
+
},
|
|
2703
|
+
loadTinyCss: {
|
|
2704
|
+
defaultValue: false,
|
|
2705
|
+
}
|
|
2706
|
+
};
|
|
2707
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PrintHandler, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2708
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: PrintHandler, isStandalone: true, selector: "axis-print-handler", providers: [
|
|
2709
|
+
{
|
|
2710
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2711
|
+
useExisting: forwardRef(() => PrintHandler),
|
|
2712
|
+
multi: true
|
|
2713
|
+
}
|
|
2714
|
+
], usesInheritance: true, ngImport: i0, template: "<form nz-form [formGroup]=\"fg\">\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6253\u5370\u5185\u5BB9\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"html\" [noListen]=\"noListen()\">\n <textarea nz-input ngModel [ngModelOptions]=\"{standalone:true}\"></textarea>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u8F7D\u5165Tiny\u6837\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"loadTinyCss\" [noListen]=\"noListen()\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\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"], 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$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$2.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$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NzSelectModule }, { kind: "ngmodule", type: NzInputModule }, { kind: "directive", type: i4$1.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled"], exportAs: ["nzInput"] }, { kind: "ngmodule", type: NzRadioModule }, { kind: "component", type: NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2715
|
+
}
|
|
2716
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PrintHandler, decorators: [{
|
|
2717
|
+
type: Component,
|
|
2718
|
+
args: [{ selector: 'axis-print-handler', imports: [NzFormModule, ReactiveFormsModule, FunField, FormsModule, NzSelectModule, NzInputModule, NzRadioModule, NzSwitchComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2719
|
+
{
|
|
2720
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2721
|
+
useExisting: forwardRef(() => PrintHandler),
|
|
2722
|
+
multi: true
|
|
2723
|
+
}
|
|
2724
|
+
], template: "<form nz-form [formGroup]=\"fg\">\n <nz-form-item>\n <nz-form-label nzSpan=\"6\">\n \u6253\u5370\u5185\u5BB9\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"html\" [noListen]=\"noListen()\">\n <textarea nz-input ngModel [ngModelOptions]=\"{standalone:true}\"></textarea>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n <nz-form-item>\n <nz-form-label nzSpan=\"6\" nzRequired>\n \u8F7D\u5165Tiny\u6837\u5F0F\n </nz-form-label>\n <nz-form-control nzSpan=\"18\">\n <axis-fun-field formControlName=\"loadTinyCss\" [noListen]=\"noListen()\">\n <nz-switch ngModel [ngModelOptions]=\"{standalone:true}\"></nz-switch>\n </axis-fun-field>\n </nz-form-control>\n </nz-form-item>\n</form>" }]
|
|
2725
|
+
}] });
|
|
2726
|
+
|
|
2663
2727
|
class RefreshDataSourceHandler extends FunFieldValueBase {
|
|
2664
2728
|
fg = this.fb.group({
|
|
2665
2729
|
name: [undefined, FormValidators.requiredFun],
|
|
@@ -2884,6 +2948,13 @@ const baseEventHandlerDescs = {
|
|
|
2884
2948
|
},
|
|
2885
2949
|
dataComponent: RunScriptHandler
|
|
2886
2950
|
},
|
|
2951
|
+
print: {
|
|
2952
|
+
name: "print",
|
|
2953
|
+
title: "打印",
|
|
2954
|
+
icon: "printer",
|
|
2955
|
+
dataComponent: PrintHandler,
|
|
2956
|
+
target: "service",
|
|
2957
|
+
},
|
|
2887
2958
|
};
|
|
2888
2959
|
const baseEventHandlerDescGroups = [
|
|
2889
2960
|
{
|
|
@@ -2897,6 +2968,7 @@ const baseEventHandlerDescGroups = [
|
|
|
2897
2968
|
baseEventHandlerDescs["msgTip"],
|
|
2898
2969
|
baseEventHandlerDescs["route"],
|
|
2899
2970
|
baseEventHandlerDescs["runScript"],
|
|
2971
|
+
baseEventHandlerDescs["print"],
|
|
2900
2972
|
]
|
|
2901
2973
|
}
|
|
2902
2974
|
];
|