atr-components 3.0.17 → 3.0.18

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.
@@ -103,7 +103,7 @@ import { NzSpaceModule } from 'ng-zorro-antd/space';
103
103
  import * as i1$3 from 'ng-zorro-antd/image';
104
104
  import { NzImageModule } from 'ng-zorro-antd/image';
105
105
  import * as i2$2 from '@tinymce/tinymce-angular';
106
- import { EditorModule, EditorComponent as EditorComponent$1 } from '@tinymce/tinymce-angular';
106
+ import { EditorModule } from '@tinymce/tinymce-angular';
107
107
  import * as i1 from '@angular/platform-browser';
108
108
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
109
109
  import * as i4 from 'ng-zorro-antd/core/transition-patch';
@@ -4394,75 +4394,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
4394
4394
  class EditorComponent {
4395
4395
  constructor() {
4396
4396
  this.apiKey_editor = "r6xv8n00ar72ext02c46958btgzj53kd1223mr6kj8q9gvs6";
4397
- this.value = '';
4398
- // TinyMCE 配置
4397
+ this.initialized = false;
4398
+ // 合并默认配置
4399
4399
  this.editorConfig = {
4400
- height: 500,
4401
- branding: false,
4402
- statusbar: true,
4403
- menubar: 'edit insert format tools table help',
4404
- language: 'zh_CN',
4405
- language_url: 'assets/lib/tinymce/zh_CN.js',
4406
- plugins: [
4407
- 'advlist autolink lists link image charmap print preview anchor imagetools',
4408
- 'searchreplace visualblocks code fullscreen',
4409
- 'insertdatetime media table paste code help wordcount'
4410
- ],
4411
- toolbar: 'undo redo | formatselect | bold italic backcolor | \
4412
- alignleft aligncenter alignright alignjustify | \
4413
- bullist numlist outdent indent | image | removeformat | help',
4414
- // 图片相关配置
4415
- image_advtab: true,
4416
- automatic_uploads: true,
4417
- image_description: true,
4418
- image_dimensions: true,
4419
- image_title: true,
4420
- image_prepend_url: '',
4421
- // 图片上传处理
4422
- images_upload_handler: (blobInfo, progress) => {
4423
- return new Promise((resolve, reject) => {
4424
- const reader = new FileReader();
4425
- reader.onload = () => {
4426
- resolve(reader.result);
4427
- };
4428
- reader.onerror = () => {
4429
- reject('图片读取失败');
4430
- };
4431
- reader.readAsDataURL(blobInfo.blob());
4432
- });
4433
- },
4434
- // 文件选择器
4435
- file_picker_callback: (callback, value, meta) => {
4436
- if (meta.filetype === 'image') {
4437
- const input = document.createElement('input');
4438
- input.setAttribute('type', 'file');
4439
- input.setAttribute('accept', 'image/*');
4440
- input.onchange = (e) => {
4441
- const file = e.target.files[0];
4400
+ ...{
4401
+ height: 500,
4402
+ branding: false,
4403
+ statusbar: true,
4404
+ menubar: 'edit insert format tools table help',
4405
+ language: 'zh_CN',
4406
+ language_url: 'assets/lib/tinymce/zh_CN.js',
4407
+ plugins: [
4408
+ 'advlist autolink lists link image charmap print preview anchor imagetools',
4409
+ 'searchreplace visualblocks code fullscreen',
4410
+ 'insertdatetime media table paste code help wordcount'
4411
+ ],
4412
+ toolbar: 'undo redo | formatselect | bold italic backcolor | \
4413
+ alignleft aligncenter alignright alignjustify | \
4414
+ bullist numlist outdent indent | image | removeformat | help',
4415
+ // ============ 新增图片相关配置开始 ============
4416
+ // 启用图片高级选项
4417
+ image_advtab: true,
4418
+ // 允许上传图片
4419
+ automatic_uploads: true,
4420
+ // 图片描述
4421
+ image_description: true,
4422
+ // 图片尺寸控制
4423
+ image_dimensions: true,
4424
+ // 图片标题
4425
+ image_title: true,
4426
+ // 图片预览
4427
+ image_prepend_url: '',
4428
+ // 图片上传处理函数
4429
+ images_upload_handler: (blobInfo, progress) => {
4430
+ return new Promise((resolve, reject) => {
4431
+ // 默认使用Base64嵌入(临时方案)
4442
4432
  const reader = new FileReader();
4443
4433
  reader.onload = () => {
4444
- callback(reader.result, { title: file.name });
4434
+ resolve(reader.result);
4445
4435
  };
4446
- reader.readAsDataURL(file);
4447
- };
4448
- input.click();
4436
+ reader.onerror = () => {
4437
+ reject('图片读取失败');
4438
+ };
4439
+ reader.readAsDataURL(blobInfo.blob());
4440
+ });
4441
+ },
4442
+ // 文件选择器回调(用于选择本地图片)
4443
+ file_picker_callback: (callback, value, meta) => {
4444
+ if (meta.filetype === 'image') {
4445
+ const input = document.createElement('input');
4446
+ input.setAttribute('type', 'file');
4447
+ input.setAttribute('accept', 'image/*');
4448
+ input.onchange = (e) => {
4449
+ const file = e.target.files[0];
4450
+ const reader = new FileReader();
4451
+ reader.onload = () => {
4452
+ // 创建blob缓存
4453
+ const id = 'blobid' + (new Date()).getTime();
4454
+ const blobCache = tinymce.activeEditor.editorUpload.blobCache;
4455
+ const base64 = reader.result.split(',')[1];
4456
+ const blobInfo = blobCache.create(id, file, base64);
4457
+ blobCache.add(blobInfo);
4458
+ // 调用回调
4459
+ callback(blobInfo.blobUri(), { title: file.name });
4460
+ };
4461
+ reader.readAsDataURL(file);
4462
+ };
4463
+ input.click();
4464
+ }
4465
+ },
4466
+ // ============ 新增图片相关配置结束 ============
4467
+ setup: (editor) => {
4468
+ this.editor = editor;
4469
+ editor.on('init', () => {
4470
+ console.log('✅ 编辑器初始化成功!');
4471
+ this.initialized = true;
4472
+ // 设置初始值
4473
+ if (this.value) {
4474
+ editor.setContent(this.value);
4475
+ }
4476
+ setTimeout(() => {
4477
+ // 移除试用提示容器
4478
+ document.querySelector("div.tox-promotion")?.remove();
4479
+ console.log("已尝试移除试用提示");
4480
+ }, 100);
4481
+ });
4482
+ // 监听编辑器内容变化
4483
+ editor.on('change keyup', () => {
4484
+ const content = editor.getContent();
4485
+ this.onEditorChange(content);
4486
+ });
4449
4487
  }
4450
4488
  },
4451
- // 初始化回调
4452
- setup: (editor) => {
4453
- editor.on('init', () => {
4454
- console.log('✅ 编辑器初始化成功!');
4455
- setTimeout(() => {
4456
- document.querySelector("div.tox-promotion")?.remove();
4457
- console.log("已尝试移除试用提示");
4458
- }, 100);
4459
- });
4460
- }
4489
+ ...this.editorConfig
4461
4490
  };
4462
4491
  }
4463
- // ControlValueAccessor 接口实现
4492
+ ngAfterViewInit() {
4493
+ // 确保 TinyMCE 已加载
4494
+ if (typeof tinymce !== 'undefined' && !this.editor) {
4495
+ // 可以在这里手动初始化编辑器
4496
+ }
4497
+ }
4464
4498
  writeValue(value) {
4465
4499
  this.value = value || '';
4500
+ // 如果编辑器已经初始化,更新编辑器内容
4501
+ if (this.editor && this.initialized) {
4502
+ this.editor.setContent(this.value);
4503
+ }
4466
4504
  }
4467
4505
  registerOnChange(fn) {
4468
4506
  this.onChangeListener = fn;
@@ -4471,40 +4509,36 @@ class EditorComponent {
4471
4509
  this.onTouchedListener = fn;
4472
4510
  }
4473
4511
  setDisabledState(isDisabled) {
4474
- // 可以通过编辑器实例设置只读模式
4475
- }
4476
- // 修复:处理编辑器内容变化
4477
- onEditorChange(event) {
4478
- // TinyMCE Angular 组件的事件参数是一个对象
4479
- // 包含 { event: Event, editor: any, value: string }
4480
- if (event && typeof event === 'object') {
4481
- // 获取内容
4482
- const content = event.value || event.editor?.getContent() || '';
4483
- this.value = content;
4484
- // 通知 Angular 表单
4485
- if (this.onChangeListener) {
4486
- this.onChangeListener(content);
4487
- }
4488
- if (this.onTouchedListener) {
4489
- this.onTouchedListener();
4490
- }
4512
+ if (this.editor) {
4513
+ this.editor.setMode(isDisabled ? 'readonly' : 'design');
4491
4514
  }
4492
- else if (typeof event === 'string') {
4493
- // 如果是字符串,直接使用
4494
- this.value = event;
4495
- if (this.onChangeListener) {
4496
- this.onChangeListener(event);
4497
- }
4515
+ }
4516
+ // 编辑器内容变化时的处理
4517
+ onEditorChange(content) {
4518
+ this.value = content;
4519
+ // 通知 Angular 表单值已改变
4520
+ if (this.onChangeListener) {
4521
+ this.onChangeListener(content);
4522
+ }
4523
+ if (this.onTouchedListener) {
4524
+ this.onTouchedListener();
4525
+ }
4526
+ }
4527
+ // 组件销毁时清理编辑器
4528
+ ngOnDestroy() {
4529
+ if (this.editor) {
4530
+ this.editor.remove();
4531
+ this.editor = null;
4498
4532
  }
4499
4533
  }
4500
4534
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4501
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: EditorComponent, isStandalone: false, selector: "app-editor", inputs: { apiKey_editor: "apiKey_editor", value: "value" }, providers: [
4535
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: EditorComponent, isStandalone: false, selector: "app-editor", inputs: { apiKey_editor: "apiKey_editor", value: "value", editorConfig: "editorConfig" }, providers: [
4502
4536
  {
4503
4537
  provide: NG_VALUE_ACCESSOR,
4504
4538
  useExisting: forwardRef(() => EditorComponent),
4505
4539
  multi: true
4506
4540
  }
4507
- ], viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent$1, descendants: true }], ngImport: i0, template: "<!-- \u4FEE\u590D\uFF1A\u79FB\u9664 apiKey \u5C5E\u6027\uFF0C\u4F7F\u7528\u6B63\u786E\u7684\u914D\u7F6E -->\r\n<editor\r\n [init]=\"editorConfig\"\r\n [apiKey]=\"apiKey_editor\"\r\n [(ngModel)]=\"value\"\r\n name=\"editor\"\r\n (onChange)=\"onEditorChange($event)\"\r\n></editor>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "readonly", "disabled"] }] }); }
4541
+ ], ngImport: i0, template: "<editor\r\n [init]=\"editorConfig\"\r\n [(ngModel)]=\"value\"\r\n [apiKey]=\"apiKey_editor\"\r\n name=\"editor\"\r\n (onChange)=\"onEditorChange($event)\"\r\n></editor>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$2.EditorComponent, selector: "editor", inputs: ["cloudChannel", "apiKey", "licenseKey", "init", "id", "initialValue", "outputFormat", "inline", "tagName", "plugins", "toolbar", "modelEvents", "allowedEvents", "ignoreEvents", "readonly", "disabled"] }] }); }
4508
4542
  }
4509
4543
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EditorComponent, decorators: [{
4510
4544
  type: Component,
@@ -4514,14 +4548,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
4514
4548
  useExisting: forwardRef(() => EditorComponent),
4515
4549
  multi: true
4516
4550
  }
4517
- ], template: "<!-- \u4FEE\u590D\uFF1A\u79FB\u9664 apiKey \u5C5E\u6027\uFF0C\u4F7F\u7528\u6B63\u786E\u7684\u914D\u7F6E -->\r\n<editor\r\n [init]=\"editorConfig\"\r\n [apiKey]=\"apiKey_editor\"\r\n [(ngModel)]=\"value\"\r\n name=\"editor\"\r\n (onChange)=\"onEditorChange($event)\"\r\n></editor>\r\n" }]
4518
- }], propDecorators: { apiKey_editor: [{
4551
+ ], template: "<editor\r\n [init]=\"editorConfig\"\r\n [(ngModel)]=\"value\"\r\n [apiKey]=\"apiKey_editor\"\r\n name=\"editor\"\r\n (onChange)=\"onEditorChange($event)\"\r\n></editor>\r\n" }]
4552
+ }], ctorParameters: () => [], propDecorators: { apiKey_editor: [{
4519
4553
  type: Input
4520
4554
  }], value: [{
4521
4555
  type: Input
4522
- }], editor: [{
4523
- type: ViewChild,
4524
- args: [EditorComponent$1]
4556
+ }], editorConfig: [{
4557
+ type: Input
4525
4558
  }] } });
4526
4559
 
4527
4560
  class AtrFormComponent {
@@ -5092,7 +5125,7 @@ class AtrFormComponent {
5092
5125
  return false;
5093
5126
  }
5094
5127
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrFormComponent, deps: [{ token: ShareService }, { token: HttpService }, { token: i3.UntypedFormBuilder }, { token: DictService }, { token: i0.Injector }, { token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Component }); }
5095
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AtrFormComponent, isStandalone: false, selector: "atr-form", inputs: { formOpts: "formOpts", viewTitle: "viewTitle" }, outputs: { formAction: "formAction", uploadAction: "uploadAction" }, ngImport: i0, template: "<atr-view-form *ngIf=\"formOpts.type == 'view'\" [dicts]=\"dicts\" [atrForm]=\"atrForm\" [title]=\"viewTitle\"\r\n [formOpts]=\"formOpts\"></atr-view-form>\r\n\r\n<form nz-form [formGroup]=\"atrForm\" *ngIf=\"formOpts.type != 'view'\">\r\n <div nz-row nzGutter=\"8\" nzType=\"flex\" nzAlign=\"top\">\r\n <ng-container *ngFor=\"let item of formOpts.items\">\r\n <div nz-col nzSpan=\"24\" class=\"form-title\" *ngIf=\"item.type == 'title'\">\r\n {{item.label}}\r\n </div>\r\n <div nz-col [nzSpan]=\"item.span\" *ngIf=\"isShow(item.isHidden,item.operator)\">\r\n <ng-content *ngTemplateOutlet=\"item.firstTemp\"></ng-content>\r\n <nz-form-item *ngIf=\"item.type != 'title'\">\r\n <nz-form-label [nzSm]=\"item.lspan\" [nzXs]=\"24\" [nzRequired]=\"isRequired(item)\">{{item.label}}</nz-form-label>\r\n <nz-form-control [nzSm]=\"item.cspan\" [nzXs]=\"24\">\r\n <div style=\"display: flex;width: 100%\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect' && item.treeList\"\r\n [nzNodes]=\"item.treeList\"\r\n [nzDefaultExpandAll]=\"item.expandAll\"\r\n nzShowSearch=\"true\"\r\n nzHideUnMatched=\"true\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n [nzShowSearch]=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzAllowClear]=\"!item.notNull\"\r\n [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzVirtualHeight=\"330px\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <nz-color-picker *ngIf=\"item.type == 'color'\" [formControlName]=\"item.key\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [nzDisabled]=\"item.readonly\"></nz-color-picker>\r\n <!-- <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzAllowClear]=\"!item.notNull\"\r\n [nzNodes]=\"item.treeList\"\r\n nzShowSearch=\"true\"\r\n nzHideUnMatched=\"true\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n [nzShowSearch]=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\" style=\"flex: 1\"\r\n >\r\n </nz-tree-select> -->\r\n <app-select-icons *ngIf=\"item.type == 'selectIcon'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly \"\r\n style=\"flex: 1\"\r\n [formControlName]=\"item.key\">\r\n </app-select-icons>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <nz-switch *ngIf=\"item.type == 'switch'\" [formControlName]=\"item.key\"\r\n [nzDisabled]=\"item.readonly || formOpts.type == 'view'\"\r\n (ngModelChange)=\"formChange($event,item)\" [nzCheckedChildren]=\"item.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"item.nzUnCheckedChildren\"></nz-switch>\r\n\r\n <textarea *ngIf=\"item.type == 'textarea'\" nz-input [rows]=\"item.rows\" placeholder=\"{{item.placeholder}}\"\r\n [formControlName]=\"item.key\" [readonly]=\"item.readonly|| formOpts.type == 'view'\"></textarea>\r\n <nz-input-number *ngIf=\"item.type == 'number'\" nzPlaceHolder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [nzFormatter]=\"item.dateFormat || defNumFormat\"\r\n [nzStep]=\"item.nzStep || 1\" [nzPrecision]=\"item.nzPrecision || 0\"\r\n [nzMin]=\"item.minNumber\" [nzMax]=\"item.maxNumber\"\r\n [formControlName]=\"item.key\"></nz-input-number>\r\n <nz-radio-group *ngIf=\"item.type == 'radio'\" [formControlName]=\"item.key\">\r\n <label nz-radio *ngFor=\"let o of item.dictList\" [nzValue]=\"o.value\">{{o.label}}</label>\r\n </nz-radio-group>\r\n <nz-checkbox-wrapper *ngIf=\"item.type == 'checkbox'\" [formControlName]=\"item.key\">\r\n <div nz-row>\r\n <div *ngFor=\"let o of item.dictList\" nz-col>\r\n <label nz-checkbox [nzValue]=\"o.value\">{{o.label}}</label></div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'select'\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n nzDisabled=\"{{item.readonly|| formOpts.type == 'view'}}\"\r\n >\r\n <nz-option *ngFor=\"let o of dicts[item.dictCode]\" [nzLabel]=\"o.typeName\" [nzValue]=\"o.id\"></nz-option>\r\n </nz-select>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzShowSearch\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n [nzDisabled]=\"item.readonly|| formOpts.type == 'view'\"\r\n (ngModelChange)=\"selectChange($event,item)\"\r\n >\r\n <nz-option *ngFor=\"let o of item.dictList\" [nzLabel]=\"o.label\" [nzValue]=\"o.value\"></nz-option>\r\n </nz-select>\r\n <nz-cascader [nzDisabled]=\"item.readonly\" style=\"flex: 1\" [nzAllowClear]=\"!item.notNull\"\r\n [nzValueProperty]=\"item.valueProperty\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzChangeOnSelect]=\"item.allowSelectNode\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\"></nz-cascader>\r\n <ng-container *ngIf=\"item.type == 'date'\">\r\n <nz-date-picker *ngIf=\"!item.dateMode\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\" style=\"flex: 1\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-date-picker *ngIf=\"item.dateMode\"\r\n style=\"flex: 1\"\r\n [nzMode]=\"item.dateMode\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n </ng-container>\r\n\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" style=\"flex: 1\"\r\n [nzShowTime]=\"item.nzShowTime? item.nzShowTime : false\"\r\n [formControlName]=\"item.key\"\r\n [nzFormat]=\"item.nzShowTime && item.nzShowTime.nzFormat ? ('yyyy-MM-dd '+ item.nzShowTime.nzFormat) : 'yyyy-MM-dd'\"\r\n [nzPlaceHolder]=\"['\u5F00\u59CB\u65F6\u95F4', '\u7ED3\u675F\u65F6\u95F4']\"></nz-range-picker>\r\n\r\n <input *ngIf=\"item.type == 'image'\" nz-input [formControlName]=\"item.key\" [hidden]=\"true\"/>\r\n <atr-img-upload *ngIf=\"item.type == 'image'\" [(opts)]=\"item.imageOpts\"\r\n (onBeforeUpload)=\"onBeforeUpload($event,item)\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n <div *ngIf=\"item.type == 'editor'\">\r\n <app-editor style=\"flex: 1\" [formControlName]=\"item.key\"></app-editor>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"item.type == 'word'\" [innerHTML]=\"item.value |defVal:item.defaultValue |safeHtml\">\r\n </div>\r\n <div *ngIf=\"item.type == 'buttons'\">\r\n <ng-container *ngFor=\"let btn of item.buttons\">\r\n <button nz-button type=\"button\" [nzType]=\"btn.btnType |defVal: 'default'\"\r\n class=\"ant-btn ant-btn-primary\"\r\n style=\"margin-right: 5px\" *ngIf=\"btn.isShow || isShow(false,btn.operator)\"\r\n (click)=\"doAction(btn,$event)\">\r\n <span>{{btn.name}}</span></button>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngFor=\"let valid of item.validators\">\r\n <ng-container *ngIf=\"atrForm.get(item.key).hasError(valid.type) && (atrForm.get(item.key).dirty )\">\r\n <div style=\"color:red; height: 15px;margin: 0;line-height: 15px;\">{{valid.errorLabel}}</div>\r\n </ng-container>\r\n </ng-container>\r\n <button nz-button nzType=\"default\" style=\"cursor: default;background-color: #fafafa;color: black\"\r\n *ngIf=\"item.ends\" disabled>\r\n {{item.ends}}\r\n </button>\r\n <button *ngIf=\"item.button?.isShow\" type=\"button\" class=\"ant-btn ant-btn-primary\"\r\n (click)=\"doAction(item.button,$event)\">\r\n <span>{{item.button.name}}</span></button>\r\n </div>\r\n <div *ngIf=\"item.proposal\" style=\"color: red;width: 100%\">{{item.proposal}}</div>\r\n </nz-form-control>\r\n </nz-form-item>\r\n <ng-content *ngTemplateOutlet=\"item.temp\"></ng-content>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n</form>\r\n", styles: [":host ::ng-deep .ant-form-item{margin:0 0 10px}:host ::ng-deep .ant-form-item-label{text-align:left}:host ::ng-deep nz-input-number{width:100%}:host .form-title{height:50px;line-height:50px;font-weight:500;font-size:20px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-bottom:14px;margin-top:11px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.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: i6$3.NzColorPickerComponent, selector: "nz-color-picker", inputs: ["nzFormat", "nzValue", "nzSize", "nzDefaultValue", "nzTrigger", "nzTitle", "nzFlipFlop", "nzShowText", "nzOpen", "nzAllowClear", "nzDisabled", "nzDisabledAlpha"], outputs: ["nzOnChange", "nzOnFormatChange", "nzOnClear", "nzOnOpenChange"], exportAs: ["nzColorPicker"] }, { kind: "component", type: i3$1.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i4$1.NzCascaderComponent, selector: "nz-cascader, [nz-cascader]", inputs: ["nzOpen", "nzOptions", "nzOptionRender", "nzShowInput", "nzShowArrow", "nzAllowClear", "nzAutoFocus", "nzChangeOnSelect", "nzDisabled", "nzColumnClassName", "nzExpandTrigger", "nzValueProperty", "nzLabelProperty", "nzLabelRender", "nzVariant", "nzNotFoundContent", "nzSize", "nzBackdrop", "nzShowSearch", "nzPlaceHolder", "nzMenuClassName", "nzMenuStyle", "nzMouseLeaveDelay", "nzMouseEnterDelay", "nzStatus", "nzMultiple", "nzMaxTagCount", "nzPlacement", "nzTriggerAction", "nzChangeOn", "nzLoadData", "nzDisplayWith", "nzPrefix", "nzSuffixIcon", "nzExpandIcon"], outputs: ["nzVisibleChange", "nzSelectionChange", "nzRemoved", "nzClear"], exportAs: ["nzCascader"] }, { kind: "component", type: i6$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "component", type: i6$2.NzCheckboxWrapperComponent, selector: "nz-checkbox-wrapper", outputs: ["nzOnChange"], exportAs: ["nzCheckboxWrapper"] }, { kind: "component", type: i5.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i5.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "directive", type: i6.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: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i14.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap", "nzRequiredMark"], exportAs: ["nzForm"] }, { kind: "component", type: i14.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i14.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i14.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: i9.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "component", type: i16.NzInputNumberLegacyComponent, selector: "nz-input-number", inputs: ["nzSize", "nzMin", "nzMax", "nzParser", "nzPrecision", "nzPrecisionMode", "nzPlaceHolder", "nzStatus", "nzStep", "nzInputMode", "nzId", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBorderless", "nzFormatter"], outputs: ["nzBlur", "nzFocus"], exportAs: ["nzInputNumber"] }, { kind: "component", type: i17.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i17.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "component", type: i10.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i10.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "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: "component", type: i9$1.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: i11.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzVariant", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzPrefix", "nzSuffixIcon", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckboxChange"], exportAs: ["nzTreeSelect"] }, { kind: "component", type: UploadComponent, selector: "atr-img-upload", inputs: ["opts", "isEdit", "allowChangSeq", "showUploadList"], outputs: ["afterChange", "optsChange", "onBeforeUpload"] }, { kind: "component", type: SelectIconsComponent, selector: "app-select-icons", inputs: ["readonly", "placeholder"] }, { kind: "component", type: ViewFormComponent, selector: "atr-view-form", inputs: ["formOpts", "atrForm", "dicts", "title", "items"] }, { kind: "component", type: EditorComponent, selector: "app-editor", inputs: ["apiKey_editor", "value"] }, { kind: "pipe", type: DefaultValPipe, name: "defVal" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
5128
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: AtrFormComponent, isStandalone: false, selector: "atr-form", inputs: { formOpts: "formOpts", viewTitle: "viewTitle" }, outputs: { formAction: "formAction", uploadAction: "uploadAction" }, ngImport: i0, template: "<atr-view-form *ngIf=\"formOpts.type == 'view'\" [dicts]=\"dicts\" [atrForm]=\"atrForm\" [title]=\"viewTitle\"\r\n [formOpts]=\"formOpts\"></atr-view-form>\r\n\r\n<form nz-form [formGroup]=\"atrForm\" *ngIf=\"formOpts.type != 'view'\">\r\n <div nz-row nzGutter=\"8\" nzType=\"flex\" nzAlign=\"top\">\r\n <ng-container *ngFor=\"let item of formOpts.items\">\r\n <div nz-col nzSpan=\"24\" class=\"form-title\" *ngIf=\"item.type == 'title'\">\r\n {{item.label}}\r\n </div>\r\n <div nz-col [nzSpan]=\"item.span\" *ngIf=\"isShow(item.isHidden,item.operator)\">\r\n <ng-content *ngTemplateOutlet=\"item.firstTemp\"></ng-content>\r\n <nz-form-item *ngIf=\"item.type != 'title'\">\r\n <nz-form-label [nzSm]=\"item.lspan\" [nzXs]=\"24\" [nzRequired]=\"isRequired(item)\">{{item.label}}</nz-form-label>\r\n <nz-form-control [nzSm]=\"item.cspan\" [nzXs]=\"24\">\r\n <div style=\"display: flex;width: 100%\">\r\n <nz-tree-select *ngIf=\"item.type == 'treeSelect' && item.treeList\"\r\n [nzNodes]=\"item.treeList\"\r\n [nzDefaultExpandAll]=\"item.expandAll\"\r\n nzShowSearch=\"true\"\r\n nzHideUnMatched=\"true\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n [nzShowSearch]=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzAllowClear]=\"!item.notNull\"\r\n [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzVirtualHeight=\"330px\"\r\n style=\"flex: 1\"\r\n >\r\n </nz-tree-select>\r\n <nz-color-picker *ngIf=\"item.type == 'color'\" [formControlName]=\"item.key\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [nzDisabled]=\"item.readonly\"></nz-color-picker>\r\n <!-- <nz-tree-select *ngIf=\"item.type == 'treeSelect'\"\r\n [nzAllowClear]=\"!item.notNull\"\r\n [nzNodes]=\"item.treeList\"\r\n nzShowSearch=\"true\"\r\n nzHideUnMatched=\"true\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n [nzShowSearch]=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMultiple]=\"item.selectUrl.isMultiple\"\r\n [nzDisabled]=\"item.readonly\" style=\"flex: 1\"\r\n >\r\n </nz-tree-select> -->\r\n <app-select-icons *ngIf=\"item.type == 'selectIcon'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n [readonly]=\"item.readonly \"\r\n style=\"flex: 1\"\r\n [formControlName]=\"item.key\">\r\n </app-select-icons>\r\n <input *ngIf=\"item.type == 'text'\" nz-input placeholder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [readonly]=\"item.readonly || formOpts.type == 'view'\"\r\n [formControlName]=\"item.key\"/>\r\n <nz-switch *ngIf=\"item.type == 'switch'\" [formControlName]=\"item.key\"\r\n [nzDisabled]=\"item.readonly || formOpts.type == 'view'\"\r\n (ngModelChange)=\"formChange($event,item)\" [nzCheckedChildren]=\"item.nzCheckedChildren\"\r\n [nzUnCheckedChildren]=\"item.nzUnCheckedChildren\"></nz-switch>\r\n\r\n <textarea *ngIf=\"item.type == 'textarea'\" nz-input [rows]=\"item.rows\" placeholder=\"{{item.placeholder}}\"\r\n [formControlName]=\"item.key\" [readonly]=\"item.readonly|| formOpts.type == 'view'\"></textarea>\r\n <nz-input-number *ngIf=\"item.type == 'number'\" nzPlaceHolder=\"{{item.placeholder}}\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n [nzFormatter]=\"item.dateFormat || defNumFormat\"\r\n [nzStep]=\"item.nzStep || 1\" [nzPrecision]=\"item.nzPrecision || 0\"\r\n [nzMin]=\"item.minNumber\" [nzMax]=\"item.maxNumber\"\r\n [formControlName]=\"item.key\"></nz-input-number>\r\n <nz-radio-group *ngIf=\"item.type == 'radio'\" [formControlName]=\"item.key\">\r\n <label nz-radio *ngFor=\"let o of item.dictList\" [nzValue]=\"o.value\">{{o.label}}</label>\r\n </nz-radio-group>\r\n <nz-checkbox-wrapper *ngIf=\"item.type == 'checkbox'\" [formControlName]=\"item.key\">\r\n <div nz-row>\r\n <div *ngFor=\"let o of item.dictList\" nz-col>\r\n <label nz-checkbox [nzValue]=\"o.value\">{{o.label}}</label></div>\r\n </div>\r\n </nz-checkbox-wrapper>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'select'\"\r\n (ngModelChange)=\"formChange($event,item)\"\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n nzServerSearch\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n nzDisabled=\"{{item.readonly|| formOpts.type == 'view'}}\"\r\n >\r\n <nz-option *ngFor=\"let o of dicts[item.dictCode]\" [nzLabel]=\"o.typeName\" [nzValue]=\"o.id\"></nz-option>\r\n </nz-select>\r\n <nz-select\r\n [nzShowSearch]=\"true\"\r\n *ngIf=\"item.type == 'selectc'\"\r\n nzShowSearch\r\n nzPlaceHolder=\"{{item.placeholder}}\"\r\n nzAllowClear=\"true\"\r\n [formControlName]=\"item.key\"\r\n [nzMode]=\"item.nzMode || 'default'\"\r\n [nzDisabled]=\"item.readonly|| formOpts.type == 'view'\"\r\n (ngModelChange)=\"selectChange($event,item)\"\r\n >\r\n <nz-option *ngFor=\"let o of item.dictList\" [nzLabel]=\"o.label\" [nzValue]=\"o.value\"></nz-option>\r\n </nz-select>\r\n <nz-cascader [nzDisabled]=\"item.readonly\" style=\"flex: 1\" [nzAllowClear]=\"!item.notNull\"\r\n [nzValueProperty]=\"item.valueProperty\"\r\n [nzShowSearch]=\"true\" *ngIf=\"item.type == 'cascader'\"\r\n [nzChangeOnSelect]=\"item.allowSelectNode\"\r\n [nzOptions]=\"item.dictList\" [formControlName]=\"item.key\"></nz-cascader>\r\n <ng-container *ngIf=\"item.type == 'date'\">\r\n <nz-date-picker *ngIf=\"!item.dateMode\" [nzFormat]=\"item.dateFormat ? item.dateFormat : 'yyyy-MM-dd'\"\r\n [nzShowTime]=\"showTime(item)\" style=\"flex: 1\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n <nz-date-picker *ngIf=\"item.dateMode\"\r\n style=\"flex: 1\"\r\n [nzMode]=\"item.dateMode\"\r\n [nzDisabled]=\"formOpts.type == 'view' || item.readonly \"\r\n [formControlName]=\"item.key\"></nz-date-picker>\r\n </ng-container>\r\n\r\n <nz-range-picker *ngIf=\"item.type == 'dateRange'\" style=\"flex: 1\"\r\n [nzShowTime]=\"item.nzShowTime? item.nzShowTime : false\"\r\n [formControlName]=\"item.key\"\r\n [nzFormat]=\"item.nzShowTime && item.nzShowTime.nzFormat ? ('yyyy-MM-dd '+ item.nzShowTime.nzFormat) : 'yyyy-MM-dd'\"\r\n [nzPlaceHolder]=\"['\u5F00\u59CB\u65F6\u95F4', '\u7ED3\u675F\u65F6\u95F4']\"></nz-range-picker>\r\n\r\n <input *ngIf=\"item.type == 'image'\" nz-input [formControlName]=\"item.key\" [hidden]=\"true\"/>\r\n <atr-img-upload *ngIf=\"item.type == 'image'\" [(opts)]=\"item.imageOpts\"\r\n (onBeforeUpload)=\"onBeforeUpload($event,item)\"\r\n (afterChange)=\"imageUploadChange($event)\"></atr-img-upload>\r\n <div *ngIf=\"item.type == 'editor'\">\r\n <app-editor style=\"flex: 1\" [formControlName]=\"item.key\"></app-editor>\r\n\r\n </div>\r\n\r\n <div *ngIf=\"item.type == 'word'\" [innerHTML]=\"item.value |defVal:item.defaultValue |safeHtml\">\r\n </div>\r\n <div *ngIf=\"item.type == 'buttons'\">\r\n <ng-container *ngFor=\"let btn of item.buttons\">\r\n <button nz-button type=\"button\" [nzType]=\"btn.btnType |defVal: 'default'\"\r\n class=\"ant-btn ant-btn-primary\"\r\n style=\"margin-right: 5px\" *ngIf=\"btn.isShow || isShow(false,btn.operator)\"\r\n (click)=\"doAction(btn,$event)\">\r\n <span>{{btn.name}}</span></button>\r\n </ng-container>\r\n </div>\r\n <ng-container *ngFor=\"let valid of item.validators\">\r\n <ng-container *ngIf=\"atrForm.get(item.key).hasError(valid.type) && (atrForm.get(item.key).dirty )\">\r\n <div style=\"color:red; height: 15px;margin: 0;line-height: 15px;\">{{valid.errorLabel}}</div>\r\n </ng-container>\r\n </ng-container>\r\n <button nz-button nzType=\"default\" style=\"cursor: default;background-color: #fafafa;color: black\"\r\n *ngIf=\"item.ends\" disabled>\r\n {{item.ends}}\r\n </button>\r\n <button *ngIf=\"item.button?.isShow\" type=\"button\" class=\"ant-btn ant-btn-primary\"\r\n (click)=\"doAction(item.button,$event)\">\r\n <span>{{item.button.name}}</span></button>\r\n </div>\r\n <div *ngIf=\"item.proposal\" style=\"color: red;width: 100%\">{{item.proposal}}</div>\r\n </nz-form-control>\r\n </nz-form-item>\r\n <ng-content *ngTemplateOutlet=\"item.temp\"></ng-content>\r\n </div>\r\n </ng-container>\r\n </div>\r\n\r\n</form>\r\n", styles: [":host ::ng-deep .ant-form-item{margin:0 0 10px}:host ::ng-deep .ant-form-item-label{text-align:left}:host ::ng-deep nz-input-number{width:100%}:host .form-title{height:50px;line-height:50px;font-weight:500;font-size:20px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-bottom:14px;margin-top:11px}\n"], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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.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: i6$3.NzColorPickerComponent, selector: "nz-color-picker", inputs: ["nzFormat", "nzValue", "nzSize", "nzDefaultValue", "nzTrigger", "nzTitle", "nzFlipFlop", "nzShowText", "nzOpen", "nzAllowClear", "nzDisabled", "nzDisabledAlpha"], outputs: ["nzOnChange", "nzOnFormatChange", "nzOnClear", "nzOnOpenChange"], exportAs: ["nzColorPicker"] }, { kind: "component", type: i3$1.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i4.ɵNzTransitionPatchDirective, selector: "[nz-button], [nz-icon], nz-icon, [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "directive", type: i5$1.NzWaveDirective, selector: "[nz-wave],button[nz-button]:not([nzType=\"link\"]):not([nzType=\"text\"])", inputs: ["nzWaveExtraNode"], exportAs: ["nzWave"] }, { kind: "component", type: i4$1.NzCascaderComponent, selector: "nz-cascader, [nz-cascader]", inputs: ["nzOpen", "nzOptions", "nzOptionRender", "nzShowInput", "nzShowArrow", "nzAllowClear", "nzAutoFocus", "nzChangeOnSelect", "nzDisabled", "nzColumnClassName", "nzExpandTrigger", "nzValueProperty", "nzLabelProperty", "nzLabelRender", "nzVariant", "nzNotFoundContent", "nzSize", "nzBackdrop", "nzShowSearch", "nzPlaceHolder", "nzMenuClassName", "nzMenuStyle", "nzMouseLeaveDelay", "nzMouseEnterDelay", "nzStatus", "nzMultiple", "nzMaxTagCount", "nzPlacement", "nzTriggerAction", "nzChangeOn", "nzLoadData", "nzDisplayWith", "nzPrefix", "nzSuffixIcon", "nzExpandIcon"], outputs: ["nzVisibleChange", "nzSelectionChange", "nzRemoved", "nzClear"], exportAs: ["nzCascader"] }, { kind: "component", type: i6$2.NzCheckboxComponent, selector: "[nz-checkbox]", inputs: ["nzValue", "nzAutoFocus", "nzDisabled", "nzIndeterminate", "nzChecked", "nzId", "nzName"], outputs: ["nzCheckedChange"], exportAs: ["nzCheckbox"] }, { kind: "component", type: i6$2.NzCheckboxWrapperComponent, selector: "nz-checkbox-wrapper", outputs: ["nzOnChange"], exportAs: ["nzCheckboxWrapper"] }, { kind: "component", type: i5.NzDatePickerComponent, selector: "nz-date-picker,nz-week-picker,nz-month-picker,nz-quarter-picker,nz-year-picker,nz-range-picker", inputs: ["nzAllowClear", "nzAutoFocus", "nzDisabled", "nzBorderless", "nzInputReadOnly", "nzInline", "nzOpen", "nzDisabledDate", "nzLocale", "nzPlaceHolder", "nzPopupStyle", "nzDropdownClassName", "nzSize", "nzStatus", "nzFormat", "nzVariant", "nzDateRender", "nzDisabledTime", "nzRenderExtraFooter", "nzShowToday", "nzMode", "nzShowNow", "nzRanges", "nzDefaultPickerValue", "nzSeparator", "nzSuffixIcon", "nzBackdrop", "nzId", "nzPlacement", "nzShowWeekNumber", "nzShowTime"], outputs: ["nzOnPanelChange", "nzOnCalendarChange", "nzOnOk", "nzOnOpenChange"], exportAs: ["nzDatePicker"] }, { kind: "directive", type: i5.NzRangePickerComponent, selector: "nz-range-picker", exportAs: ["nzRangePicker"] }, { kind: "directive", type: i6.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: i6.NzRowDirective, selector: "[nz-row],nz-row,nz-form-item", inputs: ["nzAlign", "nzJustify", "nzGutter"], exportAs: ["nzRow"] }, { kind: "directive", type: i14.NzFormDirective, selector: "[nz-form]", inputs: ["nzLayout", "nzNoColon", "nzAutoTips", "nzDisableAutoTips", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap", "nzRequiredMark"], exportAs: ["nzForm"] }, { kind: "component", type: i14.NzFormItemComponent, selector: "nz-form-item", exportAs: ["nzFormItem"] }, { kind: "component", type: i14.NzFormLabelComponent, selector: "nz-form-label", inputs: ["nzFor", "nzRequired", "nzNoColon", "nzTooltipTitle", "nzTooltipIcon", "nzLabelAlign", "nzLabelWrap"], exportAs: ["nzFormLabel"] }, { kind: "component", type: i14.NzFormControlComponent, selector: "nz-form-control", inputs: ["nzSuccessTip", "nzWarningTip", "nzErrorTip", "nzValidatingTip", "nzExtra", "nzAutoTips", "nzDisableAutoTips", "nzHasFeedback", "nzValidateStatus"], exportAs: ["nzFormControl"] }, { kind: "directive", type: i9.NzInputDirective, selector: "input[nz-input],textarea[nz-input]", inputs: ["nzBorderless", "nzVariant", "nzSize", "nzStepperless", "nzStatus", "disabled", "readonly"], exportAs: ["nzInput"] }, { kind: "component", type: i16.NzInputNumberLegacyComponent, selector: "nz-input-number", inputs: ["nzSize", "nzMin", "nzMax", "nzParser", "nzPrecision", "nzPrecisionMode", "nzPlaceHolder", "nzStatus", "nzStep", "nzInputMode", "nzId", "nzDisabled", "nzReadOnly", "nzAutoFocus", "nzBorderless", "nzFormatter"], outputs: ["nzBlur", "nzFocus"], exportAs: ["nzInputNumber"] }, { kind: "component", type: i17.NzRadioComponent, selector: "[nz-radio],[nz-radio-button]", inputs: ["nzValue", "nzDisabled", "nzAutoFocus", "nz-radio-button"], exportAs: ["nzRadio"] }, { kind: "component", type: i17.NzRadioGroupComponent, selector: "nz-radio-group", inputs: ["nzDisabled", "nzButtonStyle", "nzSize", "nzName"], exportAs: ["nzRadioGroup"] }, { kind: "component", type: i10.NzOptionComponent, selector: "nz-option", inputs: ["nzTitle", "nzLabel", "nzValue", "nzKey", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i10.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzVariant", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzPrefix", "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: "component", type: i9$1.NzSwitchComponent, selector: "nz-switch", inputs: ["nzLoading", "nzDisabled", "nzControl", "nzCheckedChildren", "nzUnCheckedChildren", "nzSize", "nzId"], exportAs: ["nzSwitch"] }, { kind: "component", type: i11.NzTreeSelectComponent, selector: "nz-tree-select", inputs: ["nzId", "nzAllowClear", "nzShowExpand", "nzShowLine", "nzDropdownMatchSelectWidth", "nzCheckable", "nzHideUnMatched", "nzShowIcon", "nzShowSearch", "nzDisabled", "nzAsyncData", "nzMultiple", "nzDefaultExpandAll", "nzCheckStrictly", "nzVirtualItemSize", "nzVirtualMaxBufferPx", "nzVirtualMinBufferPx", "nzVirtualHeight", "nzExpandedIcon", "nzNotFoundContent", "nzNodes", "nzOpen", "nzSize", "nzVariant", "nzPlaceHolder", "nzDropdownStyle", "nzDropdownClassName", "nzBackdrop", "nzStatus", "nzPlacement", "nzExpandedKeys", "nzPrefix", "nzSuffixIcon", "nzDisplayWith", "nzMaxTagCount", "nzMaxTagPlaceholder", "nzTreeTemplate"], outputs: ["nzOpenChange", "nzCleared", "nzRemoved", "nzExpandChange", "nzTreeClick", "nzTreeCheckboxChange"], exportAs: ["nzTreeSelect"] }, { kind: "component", type: UploadComponent, selector: "atr-img-upload", inputs: ["opts", "isEdit", "allowChangSeq", "showUploadList"], outputs: ["afterChange", "optsChange", "onBeforeUpload"] }, { kind: "component", type: SelectIconsComponent, selector: "app-select-icons", inputs: ["readonly", "placeholder"] }, { kind: "component", type: ViewFormComponent, selector: "atr-view-form", inputs: ["formOpts", "atrForm", "dicts", "title", "items"] }, { kind: "component", type: EditorComponent, selector: "app-editor", inputs: ["apiKey_editor", "value", "editorConfig"] }, { kind: "pipe", type: DefaultValPipe, name: "defVal" }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }] }); }
5096
5129
  }
5097
5130
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AtrFormComponent, decorators: [{
5098
5131
  type: Component,