atr-components 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/esm2020/core/directive/role.directive.mjs +1 -4
  2. package/esm2020/lib/shared/atr-shared.module.mjs +115 -0
  3. package/esm2020/lib/shared/form/form.component.mjs +374 -0
  4. package/esm2020/lib/shared/local-upload/local-upload.component.mjs +40 -0
  5. package/esm2020/lib/shared/select-tree/select-tree.component.mjs +55 -0
  6. package/esm2020/lib/shared/service/busi.service.mjs +69 -0
  7. package/esm2020/lib/shared/share.service.mjs +107 -0
  8. package/esm2020/lib/shared/table/table-form-item/table-form-item.component.mjs +96 -0
  9. package/esm2020/lib/shared/table/table-td/table-td.component.mjs +137 -0
  10. package/esm2020/lib/shared/table/table.component.mjs +672 -0
  11. package/esm2020/lib/shared/upload/upload.component.mjs +221 -0
  12. package/esm2020/lib/shared/validators/atr-validtors.mjs +9 -0
  13. package/esm2020/lib/shared/video/video.component.mjs +15 -0
  14. package/esm2020/public-api.mjs +13 -1
  15. package/fesm2015/atr-components.mjs +1809 -9
  16. package/fesm2015/atr-components.mjs.map +1 -1
  17. package/fesm2020/atr-components.mjs +1798 -9
  18. package/fesm2020/atr-components.mjs.map +1 -1
  19. package/lib/shared/atr-shared.module.d.ts +23 -0
  20. package/lib/shared/form/form.component.d.ts +34 -0
  21. package/lib/shared/local-upload/local-upload.component.d.ts +19 -0
  22. package/lib/shared/select-tree/select-tree.component.d.ts +23 -0
  23. package/lib/shared/service/busi.service.d.ts +20 -0
  24. package/lib/shared/share.service.d.ts +14 -0
  25. package/lib/shared/table/table-form-item/table-form-item.component.d.ts +25 -0
  26. package/lib/shared/table/table-td/table-td.component.d.ts +21 -0
  27. package/lib/shared/table/table.component.d.ts +88 -0
  28. package/lib/shared/upload/upload.component.d.ts +46 -0
  29. package/lib/shared/validators/atr-validtors.d.ts +2 -0
  30. package/lib/shared/video/video.component.d.ts +7 -0
  31. package/package.json +1 -1
  32. package/public-api.d.ts +12 -0
  33. package/esm2020/core/utils/AtrTools.util.mjs +0 -270
@@ -0,0 +1,23 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./table/table-form-item/table-form-item.component";
3
+ import * as i2 from "./table/table-td/table-td.component";
4
+ import * as i3 from "./table/table.component";
5
+ import * as i4 from "./upload/upload.component";
6
+ import * as i5 from "./form/form.component";
7
+ import * as i6 from "./local-upload/local-upload.component";
8
+ import * as i7 from "./select-tree/select-tree.component";
9
+ import * as i8 from "./video/video.component";
10
+ import * as i9 from "../../core/pipe/pipe-module.module";
11
+ import * as i10 from "@angular/common";
12
+ import * as i11 from "@angular/forms";
13
+ import * as i12 from "@angular/router";
14
+ import * as i13 from "../../core/ngz-module/cus-zorro-antd.module";
15
+ import * as i14 from "ng-zorro-antd/resizable";
16
+ import * as i15 from "ngx-videogular";
17
+ import * as i16 from "@angular/cdk/drag-drop";
18
+ import * as i17 from "../../atr-components.module";
19
+ export declare class AtrSharedModule {
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtrSharedModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AtrSharedModule, [typeof i1.TableFormItemComponent, typeof i2.TableTdComponent, typeof i3.AtrTableComponent, typeof i4.UploadComponent, typeof i5.AtrFormComponent, typeof i6.LocalUploadComponent, typeof i7.SelectTreeComponent, typeof i8.VideoComponent], [typeof i9.PipeModuleModule, typeof i10.CommonModule, typeof i11.FormsModule, typeof i11.ReactiveFormsModule, typeof i12.RouterModule, typeof i13.CusNgZorroAntdModule, typeof i14.NzResizableModule, typeof i15.VgCoreModule, typeof i15.VgControlsModule, typeof i15.VgOverlayPlayModule, typeof i15.VgBufferingModule, typeof i16.DragDropModule, typeof i17.AtrComponentsModule], [typeof i16.DragDropModule, typeof i10.CommonModule, typeof i11.FormsModule, typeof i11.ReactiveFormsModule, typeof i12.RouterModule, typeof i13.CusNgZorroAntdModule, typeof i14.NzResizableModule, typeof i1.TableFormItemComponent, typeof i2.TableTdComponent, typeof i3.AtrTableComponent, typeof i4.UploadComponent, typeof i5.AtrFormComponent, typeof i6.LocalUploadComponent, typeof i7.SelectTreeComponent, typeof i8.VideoComponent, typeof i9.PipeModuleModule]>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<AtrSharedModule>;
23
+ }
@@ -0,0 +1,34 @@
1
+ import { OnInit, Injector, EventEmitter } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { ShareService } from '../share.service';
4
+ import { AtrFormDetail, AtrFormOpt, FormAction, formButton } from "../../../core/base/atr-common";
5
+ import { DictService } from "../../../core/services/dict/dict.service";
6
+ import * as i0 from "@angular/core";
7
+ export declare class AtrFormComponent implements OnInit {
8
+ private shareService;
9
+ private fb;
10
+ private dictService;
11
+ private injector;
12
+ private locale;
13
+ dicts: any;
14
+ atrForm: FormGroup | any;
15
+ formOpts: AtrFormOpt | any;
16
+ formAction: EventEmitter<FormAction>;
17
+ constructor(shareService: ShareService, fb: FormBuilder, dictService: DictService, injector: Injector, locale: string);
18
+ resetLayout(item: any): void;
19
+ doAction(item: formButton, event: MouseEvent): void;
20
+ setValue(key: string, value: any): void;
21
+ getDicList(item: any): void;
22
+ ngOnInit(): void;
23
+ compare(value: any, operator: any, target: any): boolean;
24
+ checkIsShowBase(op: any): boolean;
25
+ isRequired(item: AtrFormDetail): string | boolean | undefined;
26
+ isShow(isHidden: any, operator: any): boolean;
27
+ getDictValue(code: string): void;
28
+ imageUploadChange(e: any): void;
29
+ resetForm(): void;
30
+ getFormVaild(): any;
31
+ showTime(item: any): boolean;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtrFormComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtrFormComponent, "atr-form", never, { "formOpts": "formOpts"; }, { "formAction": "formAction"; }, never, never>;
34
+ }
@@ -0,0 +1,19 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { NzUploadFile } from 'ng-zorro-antd/upload/ng-zorro-antd-upload';
3
+ import * as i0 from "@angular/core";
4
+ export declare class LocalUploadComponent implements OnInit {
5
+ url: any;
6
+ name: any;
7
+ code: any;
8
+ showList: any;
9
+ constructor();
10
+ ngOnInit(): void;
11
+ header: (file: NzUploadFile) => {
12
+ "x-header-atr": string;
13
+ token: string;
14
+ userId: string;
15
+ orgCode: string;
16
+ };
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalUploadComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<LocalUploadComponent, "atr-local-upload", never, { "url": "url"; "name": "name"; "code": "code"; }, {}, never, never>;
19
+ }
@@ -0,0 +1,23 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { DictService } from "../../../core/services/dict/dict.service";
3
+ import { SelectAction } from "../../../core/base/atr-common";
4
+ import * as i0 from "@angular/core";
5
+ export declare interface SelectTreeOpt {
6
+ dictCode: string;
7
+ key: string;
8
+ value?: string;
9
+ }
10
+ export declare class SelectTreeComponent implements OnInit {
11
+ private dictService;
12
+ dicts: any;
13
+ opt: SelectTreeOpt | any;
14
+ action: EventEmitter<SelectAction>;
15
+ selectValue: any;
16
+ isDisable: boolean;
17
+ constructor(dictService: DictService);
18
+ ngOnInit(): void;
19
+ getDictValue(code: string): void;
20
+ changeValue(): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectTreeComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectTreeComponent, "app-select-tree", never, { "opt": "opt"; "isDisable": "isDisable"; }, { "action": "action"; }, never, never>;
23
+ }
@@ -0,0 +1,20 @@
1
+ import { NzDrawerService } from 'ng-zorro-antd/drawer';
2
+ import { NzModalService } from 'ng-zorro-antd/modal';
3
+ import { NzMessageService } from 'ng-zorro-antd/message';
4
+ import { HttpService } from "../../../core/services/http.service";
5
+ import * as i0 from "@angular/core";
6
+ export declare class BusiService {
7
+ private drawerService;
8
+ private httpService;
9
+ private modalService;
10
+ private locale;
11
+ private msg;
12
+ options: any;
13
+ allowOpen: boolean;
14
+ searchDrawerResRef: any;
15
+ constructor(drawerService: NzDrawerService, httpService: HttpService, modalService: NzModalService, locale: string, msg: NzMessageService);
16
+ resetPass(reseturl: any, param: any, callBack: any, content?: string, successTitle?: string): void;
17
+ getCascaderDefultV(dictList: any, value: any, index: any, result: any): any;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<BusiService, never>;
19
+ static ɵprov: i0.ɵɵInjectableDeclaration<BusiService>;
20
+ }
@@ -0,0 +1,14 @@
1
+ import { Observable } from "rxjs";
2
+ import { NzDrawerService } from 'ng-zorro-antd/drawer';
3
+ import { HttpService } from "../../core/services/http.service";
4
+ import * as i0 from "@angular/core";
5
+ export declare class ShareService {
6
+ private drawerService;
7
+ private httpService;
8
+ constructor(drawerService: NzDrawerService, httpService: HttpService);
9
+ getDicList(item: any): Observable<any>;
10
+ getDicListBase(res: any, item: any): any;
11
+ convertCascader(arrs: any, keys: any): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<ShareService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<ShareService>;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { ControlValueAccessor } from "@angular/forms";
3
+ import { AtrQueryHeader, TableAction } from "../../../../core/base/atr-common";
4
+ import { ToolsUtil } from "../../../../core/utils/ToolsUtil";
5
+ import * as i0 from "@angular/core";
6
+ export declare class TableFormItemComponent implements OnInit, ControlValueAccessor {
7
+ header: AtrQueryHeader | any;
8
+ value: string | any;
9
+ dictList: any;
10
+ headerAction: EventEmitter<TableAction>;
11
+ onChangeListener: any;
12
+ onTouchedListener: any;
13
+ isNull: typeof ToolsUtil.isNull;
14
+ constructor();
15
+ ngOnInit(): void;
16
+ writeValue(value: string | any[]): void;
17
+ registerOnChange(fn: any): void;
18
+ registerOnTouched(fn: any): void;
19
+ setDisabledState?(isDisabled: boolean): void;
20
+ onChange(e?: any): void;
21
+ selectChange(value: any, item: any): void;
22
+ clickIcon(value: any, item: AtrQueryHeader, $event: any): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableFormItemComponent, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableFormItemComponent, "app-table-form-item", never, { "header": "header"; "value": "value"; "dictList": "dictList"; }, { "headerAction": "headerAction"; }, never, never>;
25
+ }
@@ -0,0 +1,21 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { Table, TableAction } from "../../../../core/base/atr-common";
3
+ import * as i0 from "@angular/core";
4
+ export declare class TableTdComponent implements OnInit {
5
+ data: any;
6
+ item: Table | any;
7
+ i: any;
8
+ doActionByRowAction: EventEmitter<any>;
9
+ popoverTrigger: any;
10
+ imagePrefix: string;
11
+ constructor();
12
+ change(value: boolean): void;
13
+ ngOnInit(): void;
14
+ doActionByRow(data: any, code: any, event: MouseEvent, index: any): void;
15
+ enter(e: any): void;
16
+ isShowBtn(data: any, operator: string, action?: TableAction): boolean;
17
+ checkIsShowBase(op: any, data: any): boolean;
18
+ compare(value: any, operator: any, target: any): boolean;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableTdComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableTdComponent, "app-table-td", never, { "data": "data"; "item": "item"; "i": "i"; }, { "doActionByRowAction": "doActionByRowAction"; }, never, never>;
21
+ }
@@ -0,0 +1,88 @@
1
+ import { OnInit, Injector, ElementRef, EventEmitter, ChangeDetectorRef } from '@angular/core';
2
+ import { FormGroup, FormBuilder } from '@angular/forms';
3
+ import { CdkDragDrop } from "@angular/cdk/drag-drop";
4
+ import { NzDropdownMenuComponent } from 'ng-zorro-antd/dropdown';
5
+ import { AtrQueryHeader, AtrQueyrOpt, json, Table, TableAction } from "../../../core/base/atr-common";
6
+ import * as i0 from "@angular/core";
7
+ export declare class AtrTableComponent implements OnInit {
8
+ private fb;
9
+ private injector;
10
+ private locale;
11
+ private cd;
12
+ atrForm: FormGroup | any;
13
+ isCollapse: boolean;
14
+ dicts: any;
15
+ pageIndex: number;
16
+ pageSize: number;
17
+ total: number;
18
+ loading: boolean;
19
+ allowDrag: boolean;
20
+ tableDatas: any;
21
+ scrollSize: any;
22
+ isAllDisplayDataChecked: boolean;
23
+ isIndeterminate: boolean;
24
+ numberOfChecked: number;
25
+ mapOfCheckedId: {
26
+ [key: string]: boolean;
27
+ };
28
+ curChecked: number;
29
+ imagePrefix: string;
30
+ defaultParams: {};
31
+ isAllLoad: boolean;
32
+ sortMap: {
33
+ [key: string]: any;
34
+ };
35
+ rowSpanMap: any;
36
+ queryOpts: AtrQueyrOpt | any;
37
+ showPagination: boolean;
38
+ title: string;
39
+ tableAction: EventEmitter<TableAction>;
40
+ queryBack: EventEmitter<TableAction>;
41
+ headerAction: EventEmitter<TableAction>;
42
+ tableContent: ElementRef | any;
43
+ constructor(fb: FormBuilder, injector: Injector, locale: string, cd: ChangeDetectorRef);
44
+ isShowColor(data: any): any;
45
+ dbclickData(data: any, rowNo: number): void;
46
+ doActionByRow2(e: any): void;
47
+ private get httpService();
48
+ private get nzContextMenuService();
49
+ setTableLoadding(loadding: boolean): void;
50
+ onResize(width: any, col: string): void;
51
+ isEnable(operator: string): boolean;
52
+ isShowBtn(data: any, operator: string, action?: TableAction): boolean;
53
+ checkIsShowBase(op: any, data: any): boolean;
54
+ compare(value: any, operator: any, target: any): boolean;
55
+ pushTableDatas(tableDatas: any): void;
56
+ removeDatas(key: any, value: any): void;
57
+ doAction(code: any): void;
58
+ doActionByRow(data: any, code: any, event: MouseEvent): void;
59
+ getAllCheckInfo(): any[];
60
+ getAllCheckDatas(): any[];
61
+ checkAll(value: boolean): void;
62
+ refreshStatus(): void;
63
+ selectRow(data: any, rowNo: number): void;
64
+ ngOnInit(): void;
65
+ initHeader(): void;
66
+ getDicList(item: any): void;
67
+ ngAfterViewInit(): void;
68
+ sort(sortName: string, value: any): void;
69
+ private get dictService();
70
+ getDictValue(code: string): void;
71
+ toggleCollapse(): void;
72
+ resetForm(): void;
73
+ selectChange(value: any, item: any): void;
74
+ clickIcon(value: any, item: AtrQueryHeader, $event: any): void;
75
+ getQueryParams(reset: boolean): json;
76
+ getHederType(cusKey: string): any;
77
+ setDefaultParams(params: any, reset?: boolean): void;
78
+ getSortInfo(): string;
79
+ query(reset?: boolean): void;
80
+ contextMenu($event: any, menu: NzDropdownMenuComponent): void;
81
+ log(value: string[]): void;
82
+ checkShowTd(item: Table, index: any): boolean;
83
+ checkRowSpan(item: Table, data: any): any;
84
+ getRowSpan(): void;
85
+ drop(event: CdkDragDrop<string[]>): void;
86
+ static ɵfac: i0.ɵɵFactoryDeclaration<AtrTableComponent, never>;
87
+ static ɵcmp: i0.ɵɵComponentDeclaration<AtrTableComponent, "atr-table", never, { "loading": "loading"; "allowDrag": "allowDrag"; "queryOpts": "queryOpts"; "showPagination": "showPagination"; "title": "title"; }, { "tableAction": "tableAction"; "queryBack": "queryBack"; "headerAction": "headerAction"; }, never, never>;
88
+ }
@@ -0,0 +1,46 @@
1
+ import { OnInit, EventEmitter, Injector } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
5
+ import { NzUploadChangeParam, NzUploadFile, NzUploadXHRArgs } from 'ng-zorro-antd/upload';
6
+ import { ImageOpts } from "../../../core/base/atr-common";
7
+ import * as i0 from "@angular/core";
8
+ export declare class UploadComponent implements OnInit {
9
+ private injector;
10
+ private httpClient;
11
+ private modalService;
12
+ opts: ImageOpts | any;
13
+ isEdit: boolean;
14
+ allowChangSeq: boolean;
15
+ tplModal: NzModalRef | any;
16
+ uploadUrl: any;
17
+ uploadData: any;
18
+ showUploadList: {
19
+ showPreviewIcon: boolean;
20
+ showRemoveIcon: boolean;
21
+ hidePreviewIconInNonImage: boolean;
22
+ };
23
+ afterChange: EventEmitter<any>;
24
+ optsChange: EventEmitter<any>;
25
+ previewImage: string | any;
26
+ previewVisible: boolean;
27
+ changeVisible: boolean;
28
+ constructor(injector: Injector, httpClient: HttpClient, modalService: NzModalService);
29
+ ngOnInit(): void;
30
+ getFileTyeIcon(fileType: string, fileName: string): string;
31
+ getThumbUrl(path: string): string;
32
+ getFileThumbUrl(type: string): string;
33
+ onChange(params: NzUploadChangeParam): void;
34
+ private get httpService();
35
+ handlePreview: (file: NzUploadFile) => void;
36
+ remove: (file: NzUploadFile) => boolean;
37
+ beforeUpload: (file: NzUploadFile, fileList: NzUploadFile[]) => Observable<boolean>;
38
+ customReq: (item: NzUploadXHRArgs) => import("rxjs").Subscription;
39
+ openBannerSeq(tplContent: any, tplFooter: any): void;
40
+ destroyTplModal(): void;
41
+ arrowUp(index: any): void;
42
+ arrowDown(index: any): void;
43
+ saveSeq(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<UploadComponent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<UploadComponent, "atr-img-upload", never, { "opts": "opts"; "isEdit": "isEdit"; "allowChangSeq": "allowChangSeq"; }, { "afterChange": "afterChange"; "optsChange": "optsChange"; }, never, never>;
46
+ }
@@ -0,0 +1,2 @@
1
+ import { ValidatorFn } from "@angular/forms";
2
+ export declare function telphoneValidator(): ValidatorFn;
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class VideoComponent {
3
+ url: any;
4
+ constructor();
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<VideoComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<VideoComponent, "app-video", never, { "url": "url"; }, {}, never, never>;
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atr-components",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.3.0",
6
6
  "@angular/core": "^13.3.0"
package/public-api.d.ts CHANGED
@@ -26,3 +26,15 @@ export * from "./core/pipe/defaultVal.pipe";
26
26
  export * from "./core/pipe/day.pipe";
27
27
  export * from "./core/pipe/safe-compute.pipe";
28
28
  export * from "./core/pipe/is-not-empty.pipe";
29
+ export * from "./lib/shared/atr-shared.module";
30
+ export * from "./lib/shared/form/form.component";
31
+ export * from "./lib/shared/local-upload/local-upload.component";
32
+ export * from "./lib/shared/select-tree/select-tree.component";
33
+ export * from "./lib/shared/service/busi.service";
34
+ export * from "./lib/shared/table/table-td/table-td.component";
35
+ export * from "./lib/shared/share.service";
36
+ export * from "./lib/shared/video/video.component";
37
+ export * from "./lib/shared/validators/atr-validtors";
38
+ export * from "./lib/shared/upload/upload.component";
39
+ export * from "./lib/shared/table/table.component";
40
+ export * from "./lib/shared/table/table-form-item/table-form-item.component";