ngx-rs-ant 2.3.6 → 2.3.8

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.
@@ -2627,11 +2627,14 @@ class FormService {
2627
2627
  }
2628
2628
  });
2629
2629
  }
2630
- extraValidate(model, params, extraValidator) {
2631
- return this.http.post('api/validate/form', model, {
2630
+ extraValidate(extraValidator, pathParam, model, params) {
2631
+ return this.http.post('api/validate/form', {
2632
+ model,
2633
+ params
2634
+ }, {
2632
2635
  params: {
2633
2636
  validator: extraValidator,
2634
- ...params
2637
+ ...pathParam
2635
2638
  }
2636
2639
  }).pipe(map(response => {
2637
2640
  if (response.success) {
@@ -2725,6 +2728,12 @@ class FormComponent extends UniqueId {
2725
2728
  this.service.getFormTemplateConfig(this.tenant, this.className, this.template).subscribe(response => {
2726
2729
  this.config = response.data.template;
2727
2730
  this.extraValidator = this.config.extraValidator;
2731
+ this.extraValidatorParams = {};
2732
+ if (this.config.extraValidatorParams) {
2733
+ for (let param of this.config.extraValidatorParams) {
2734
+ this.extraValidatorParams[param.name] = param.value;
2735
+ }
2736
+ }
2728
2737
  if (this.onlyFrontEnd) {
2729
2738
  this.loading = false;
2730
2739
  this.onDataLoaded.emit({
@@ -2761,12 +2770,13 @@ class FormComponent extends UniqueId {
2761
2770
  });
2762
2771
  }
2763
2772
  extraValidate() {
2764
- return lastValueFrom(this.service.extraValidate(this.model, Object.assign({}, this.params, {
2773
+ return lastValueFrom(this.service.extraValidate(this.extraValidator, {
2774
+ ...this.params,
2765
2775
  tenant: this.tenant,
2766
2776
  className: this.className,
2767
- oid: this.oid,
2768
- template: this.template
2769
- }), this.extraValidator).pipe(map(response => {
2777
+ oid: this.oid || '',
2778
+ template: this.template || ''
2779
+ }, this.model, this.extraValidatorParams).pipe(map(response => {
2770
2780
  if (!response.isValid) {
2771
2781
  this.extraValidateMessage = response.message;
2772
2782
  return response;
@@ -4771,8 +4781,8 @@ class WordDesignerComponent {
4771
4781
  });
4772
4782
  }
4773
4783
  ngOnDestroy() {
4774
- this.service.valueUpdated.unsubscribe();
4775
- this.service.valueChanged.unsubscribe();
4784
+ // this.service.valueUpdated.unsubscribe();
4785
+ // this.service.valueChanged.unsubscribe();
4776
4786
  }
4777
4787
  loadTemplateAndConfig(response) {
4778
4788
  this.sections = response.sections || [];
@@ -4964,7 +4974,7 @@ class WordEditorService {
4964
4974
  }
4965
4975
  });
4966
4976
  }
4967
- reloadTemplate(tenant, className, oid, templateClassName, templateNumberAttribute, templateFileAttribute, templateConfigAttribute) {
4977
+ reloadTemplate(tenant, className, oid, templateClassName, defaultTemplateNumber, templateNumberAttribute, templateFileAttribute, templateConfigAttribute) {
4968
4978
  return this.http.get('api/data/custom', {
4969
4979
  params: {
4970
4980
  executor: 'com.cs.system.word.editor.ReloadTemplate',
@@ -4972,6 +4982,7 @@ class WordEditorService {
4972
4982
  className,
4973
4983
  oid,
4974
4984
  templateClassName,
4985
+ defaultTemplateNumber,
4975
4986
  templateNumberAttribute,
4976
4987
  templateFileAttribute,
4977
4988
  templateConfigAttribute
@@ -4988,7 +4999,7 @@ class WordEditorService {
4988
4999
  }
4989
5000
  });
4990
5001
  }
4991
- generateFile(tenant, className, oid, generateFileAttribute, templateFileAttribute, templateConfigAttribute, model) {
5002
+ generateFile(tenant, className, oid, generateFileAttribute, templateFileAttribute, templateConfigAttribute, model, generateToTemp) {
4992
5003
  return this.http.post('api/data/custom', model, {
4993
5004
  params: {
4994
5005
  executor: 'com.cs.system.word.editor.GenerateFile',
@@ -4997,7 +5008,8 @@ class WordEditorService {
4997
5008
  oid,
4998
5009
  generateFileAttribute,
4999
5010
  templateFileAttribute,
5000
- templateConfigAttribute
5011
+ templateConfigAttribute,
5012
+ generateToTemp
5001
5013
  }
5002
5014
  });
5003
5015
  }
@@ -5016,13 +5028,15 @@ class WordEditorComponent {
5016
5028
  this.templateNumberAttribute = 'templateNumber';
5017
5029
  this.templateFileAttribute = 'templateFile';
5018
5030
  this.templateConfigAttribute = 'templateConfig';
5031
+ this.generateFileAttribute = 'file';
5019
5032
  this.showPullTemplateButton = true;
5020
5033
  this.showPullDataButton = true;
5021
- this.showCalcButton = true;
5034
+ this.showCalcButton = false;
5022
5035
  this.showValidateButton = true;
5036
+ this.showSaveButton = true;
5023
5037
  this.showGenerateFileButton = true;
5024
- this.generateFileAttribute = 'file';
5025
5038
  this.showCloseButton = true;
5039
+ this.generateToTemp = false;
5026
5040
  this.readonly = false;
5027
5041
  this.onSaved = new EventEmitter();
5028
5042
  this.onGenerated = new EventEmitter();
@@ -5048,13 +5062,13 @@ class WordEditorComponent {
5048
5062
  });
5049
5063
  }
5050
5064
  ngOnDestroy() {
5051
- this.service.valueUpdated.unsubscribe();
5052
- this.service.valueChanged.unsubscribe();
5065
+ // this.service.valueUpdated.unsubscribe();
5066
+ // this.service.valueChanged.unsubscribe();
5053
5067
  }
5054
5068
  pullTemplate() {
5055
5069
  if (confirm('该操作会清除已录入的数据,确定重新拉取模板配置?')) {
5056
5070
  this.loading = true;
5057
- this.wordEditorService.reloadTemplate(this.tenant, this.className, this.oid, this.templateClassName, this.templateNumberAttribute, this.templateFileAttribute, this.templateConfigAttribute).subscribe(response => {
5071
+ this.wordEditorService.reloadTemplate(this.tenant, this.className, this.oid, this.templateClassName, this.defaultTemplateNumber, this.templateNumberAttribute, this.templateFileAttribute, this.templateConfigAttribute).subscribe(response => {
5058
5072
  this.sections = response.data?.sections || [];
5059
5073
  this.service.marks = response.data.marks;
5060
5074
  this.loading = false;
@@ -5084,12 +5098,18 @@ class WordEditorComponent {
5084
5098
  }
5085
5099
  save() {
5086
5100
  this.loading = true;
5087
- this.wordEditorService.save(this.tenant, this.className, this.oid, {
5101
+ const model = {
5088
5102
  [this.templateConfigAttribute]: JSON.stringify({
5089
5103
  sections: this.sections,
5090
5104
  marks: this.service.marks
5091
5105
  })
5092
- }).subscribe(response => {
5106
+ };
5107
+ if (this.generateToTemp) {
5108
+ notifySuccess('保存成功');
5109
+ this.onSaved.emit(model);
5110
+ return;
5111
+ }
5112
+ this.wordEditorService.save(this.tenant, this.className, this.oid, model).subscribe(response => {
5093
5113
  this.loading = false;
5094
5114
  if (response.success) {
5095
5115
  notifySuccess('保存成功');
@@ -5104,20 +5124,25 @@ class WordEditorComponent {
5104
5124
  sections: this.sections,
5105
5125
  marks: this.service.marks
5106
5126
  })
5107
- }).subscribe(response => {
5127
+ }, this.generateToTemp).subscribe(response => {
5108
5128
  this.loading = false;
5109
5129
  if (response.success) {
5110
5130
  notifySuccess('生成附件成功');
5111
- this.onGenerated.emit();
5131
+ if (this.generateToTemp) {
5132
+ this.onGenerated.emit(response.data);
5133
+ }
5134
+ else {
5135
+ this.onGenerated.emit();
5136
+ }
5112
5137
  }
5113
5138
  });
5114
5139
  }
5115
5140
  }
5116
5141
  WordEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorComponent, deps: [{ token: SectionService }, { token: WordEditorService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
5117
- WordEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WordEditorComponent, selector: "rs-word-editor", inputs: { tenant: "tenant", className: "className", oid: "oid", templateClassName: "templateClassName", templateNumberAttribute: "templateNumberAttribute", templateFileAttribute: "templateFileAttribute", templateConfigAttribute: "templateConfigAttribute", params: "params", tabViewContainerRef: "tabViewContainerRef", showPullTemplateButton: "showPullTemplateButton", showPullDataButton: "showPullDataButton", showCalcButton: "showCalcButton", showValidateButton: "showValidateButton", showGenerateFileButton: "showGenerateFileButton", generateFileAttribute: "generateFileAttribute", showCloseButton: "showCloseButton", readonly: "readonly" }, outputs: { onSaved: "onSaved", onGenerated: "onGenerated", onClosed: "onClosed" }, providers: [WordEditorService], viewQueries: [{ propertyName: "validator", first: true, predicate: ["validator"], descendants: true }], ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\" [visible]=\"loading\">\r\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\r\n</dx-load-panel>\r\n<div *ngIf=\"!readonly\" class=\"bar header\">\r\n <dx-button *ngIf=\"showPullTemplateButton\" type=\"success\" text=\"\u66F4\u65B0\u6A21\u677F\" (onClick)=\"pullTemplate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showPullDataButton\" type=\"success\" text=\"\u586B\u5145\u6570\u636E\" (onClick)=\"pullData()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <!-- <dx-button *ngIf=\"showCalcButton\" type=\"default\" text=\"\u6267\u884C\u8BA1\u7B97\" (onClick)=\"calc()\"\r\n [disabled]=\"loading\"></dx-button>-->\r\n <dx-button *ngIf=\"showValidateButton\" type=\"default\" text=\"\u6267\u884C\u6821\u9A8C\" (onClick)=\"validate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n</div>\r\n<dx-validation-group [class.validation-group]=\"true\" #validator>\r\n <div class=\"viewer-container\">\r\n <div class=\"viewer\">\r\n <ng-container *ngFor=\"let section of sections\">\r\n <rs-section [section]=\"section\"></rs-section>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</dx-validation-group>\r\n<div class=\"bar footer\">\r\n <dx-button *ngIf=\"!readonly\" type=\"default\" text=\"\u4FDD\u5B58\" (onClick)=\"save()\" [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"!readonly && showGenerateFileButton\" type=\"success\" text=\"\u751F\u6210\u9644\u4EF6\" (onClick)=\"generateFile()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showCloseButton\" type=\"normal\" text=\"\u5173\u95ED\" (onClick)=\"onClosed.emit()\"></dx-button>\r\n</div>\r\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap;background-color:#f5f5f5}:host .bar{flex:none;padding:12px 24px;background-color:var(--coast-base-bg-color, rgb(255, 255, 255));z-index:1;display:flex;flex-flow:row nowrap}:host .bar>dx-button{width:80px}:host .bar>dx-button:not(:last-child){margin-right:8px}:host .header{border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;top:0}:host .validation-group{flex:auto;height:0;overflow-y:auto;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}:host .validation-group .viewer-container{flex:auto;height:0;overflow-x:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}:host .validation-group .viewer-container .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index:0}:host .footer{justify-content:flex-end;border-top:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;bottom:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "component", type: i3.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i6$1.DxLoadPanelComponent, selector: "dx-load-panel", inputs: ["animation", "closeOnOutsideClick", "container", "copyRootClassesToWrapper", "deferRendering", "delay", "elementAttr", "focusStateEnabled", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "indicatorSrc", "maxHeight", "maxWidth", "message", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showIndicator", "showPane", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "delayChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "indicatorSrcChange", "maxHeightChange", "maxWidthChange", "messageChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showIndicatorChange", "showPaneChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i7$1.DxValidationGroupComponent, selector: "dx-validation-group", inputs: ["elementAttr", "height", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "elementAttrChange", "heightChange", "widthChange"] }, { kind: "component", type: SectionComponent, selector: "rs-section", inputs: ["section", "editMode", "pasteMode", "readonly"] }] });
5142
+ WordEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WordEditorComponent, selector: "rs-word-editor", inputs: { tenant: "tenant", className: "className", oid: "oid", templateClassName: "templateClassName", defaultTemplateNumber: "defaultTemplateNumber", templateNumberAttribute: "templateNumberAttribute", templateFileAttribute: "templateFileAttribute", templateConfigAttribute: "templateConfigAttribute", generateFileAttribute: "generateFileAttribute", params: "params", tabViewContainerRef: "tabViewContainerRef", showPullTemplateButton: "showPullTemplateButton", showPullDataButton: "showPullDataButton", showCalcButton: "showCalcButton", showValidateButton: "showValidateButton", showSaveButton: "showSaveButton", showGenerateFileButton: "showGenerateFileButton", showCloseButton: "showCloseButton", generateToTemp: "generateToTemp", readonly: "readonly" }, outputs: { onSaved: "onSaved", onGenerated: "onGenerated", onClosed: "onClosed" }, providers: [WordEditorService], viewQueries: [{ propertyName: "validator", first: true, predicate: ["validator"], descendants: true }], ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\" [visible]=\"loading\">\r\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\r\n</dx-load-panel>\r\n<div *ngIf=\"!readonly\" class=\"bar header\">\r\n <dx-button *ngIf=\"showPullTemplateButton\" type=\"success\" text=\"\u66F4\u65B0\u6A21\u677F\" (onClick)=\"pullTemplate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showPullDataButton\" type=\"success\" text=\"\u586B\u5145\u6570\u636E\" (onClick)=\"pullData()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showCalcButton\" type=\"default\" text=\"\u6267\u884C\u8BA1\u7B97\" (onClick)=\"calc()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showValidateButton\" type=\"default\" text=\"\u6267\u884C\u6821\u9A8C\" (onClick)=\"validate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n</div>\r\n<dx-validation-group [class.validation-group]=\"true\" #validator>\r\n <div class=\"viewer-container\">\r\n <div class=\"viewer\">\r\n <ng-container *ngFor=\"let section of sections\">\r\n <rs-section [section]=\"section\"></rs-section>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</dx-validation-group>\r\n<div *ngIf=\"!readonly || showCloseButton\" class=\"bar footer\">\r\n <dx-button *ngIf=\"!readonly && showSaveButton\" type=\"default\" text=\"\u4FDD\u5B58\" (onClick)=\"save()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"!readonly && showGenerateFileButton\" type=\"success\" text=\"\u751F\u6210\u9644\u4EF6\" (onClick)=\"generateFile()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showCloseButton\" type=\"normal\" text=\"\u5173\u95ED\" (onClick)=\"onClosed.emit()\"></dx-button>\r\n</div>\r\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap;background-color:#f5f5f5}:host .bar{flex:none;padding:12px 24px;background-color:var(--coast-base-bg-color, rgb(255, 255, 255));z-index:1;display:flex;flex-flow:row nowrap}:host .bar>dx-button{width:80px}:host .bar>dx-button:not(:last-child){margin-right:8px}:host .header{border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;top:0}:host .validation-group{flex:auto;height:0;overflow-y:auto;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}:host .validation-group .viewer-container{flex:auto;height:0;overflow-x:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}:host .validation-group .viewer-container .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index:0}:host .footer{justify-content:flex-end;border-top:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;bottom:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i6.DxoPositionComponent, selector: "dxo-position", inputs: ["at", "boundary", "boundaryOffset", "collision", "my", "of", "offset"] }, { kind: "component", type: i3.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i6$1.DxLoadPanelComponent, selector: "dx-load-panel", inputs: ["animation", "closeOnOutsideClick", "container", "copyRootClassesToWrapper", "deferRendering", "delay", "elementAttr", "focusStateEnabled", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "indicatorSrc", "maxHeight", "maxWidth", "message", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showIndicator", "showPane", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "delayChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "indicatorSrcChange", "maxHeightChange", "maxWidthChange", "messageChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showIndicatorChange", "showPaneChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "component", type: i7$1.DxValidationGroupComponent, selector: "dx-validation-group", inputs: ["elementAttr", "height", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "elementAttrChange", "heightChange", "widthChange"] }, { kind: "component", type: SectionComponent, selector: "rs-section", inputs: ["section", "editMode", "pasteMode", "readonly"] }] });
5118
5143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorComponent, decorators: [{
5119
5144
  type: Component,
5120
- args: [{ selector: 'rs-word-editor', providers: [WordEditorService], template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\" [visible]=\"loading\">\r\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\r\n</dx-load-panel>\r\n<div *ngIf=\"!readonly\" class=\"bar header\">\r\n <dx-button *ngIf=\"showPullTemplateButton\" type=\"success\" text=\"\u66F4\u65B0\u6A21\u677F\" (onClick)=\"pullTemplate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showPullDataButton\" type=\"success\" text=\"\u586B\u5145\u6570\u636E\" (onClick)=\"pullData()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <!-- <dx-button *ngIf=\"showCalcButton\" type=\"default\" text=\"\u6267\u884C\u8BA1\u7B97\" (onClick)=\"calc()\"\r\n [disabled]=\"loading\"></dx-button>-->\r\n <dx-button *ngIf=\"showValidateButton\" type=\"default\" text=\"\u6267\u884C\u6821\u9A8C\" (onClick)=\"validate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n</div>\r\n<dx-validation-group [class.validation-group]=\"true\" #validator>\r\n <div class=\"viewer-container\">\r\n <div class=\"viewer\">\r\n <ng-container *ngFor=\"let section of sections\">\r\n <rs-section [section]=\"section\"></rs-section>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</dx-validation-group>\r\n<div class=\"bar footer\">\r\n <dx-button *ngIf=\"!readonly\" type=\"default\" text=\"\u4FDD\u5B58\" (onClick)=\"save()\" [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"!readonly && showGenerateFileButton\" type=\"success\" text=\"\u751F\u6210\u9644\u4EF6\" (onClick)=\"generateFile()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showCloseButton\" type=\"normal\" text=\"\u5173\u95ED\" (onClick)=\"onClosed.emit()\"></dx-button>\r\n</div>\r\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap;background-color:#f5f5f5}:host .bar{flex:none;padding:12px 24px;background-color:var(--coast-base-bg-color, rgb(255, 255, 255));z-index:1;display:flex;flex-flow:row nowrap}:host .bar>dx-button{width:80px}:host .bar>dx-button:not(:last-child){margin-right:8px}:host .header{border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;top:0}:host .validation-group{flex:auto;height:0;overflow-y:auto;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}:host .validation-group .viewer-container{flex:auto;height:0;overflow-x:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}:host .validation-group .viewer-container .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index:0}:host .footer{justify-content:flex-end;border-top:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;bottom:0}\n"] }]
5145
+ args: [{ selector: 'rs-word-editor', providers: [WordEditorService], template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\" [visible]=\"loading\">\r\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\r\n</dx-load-panel>\r\n<div *ngIf=\"!readonly\" class=\"bar header\">\r\n <dx-button *ngIf=\"showPullTemplateButton\" type=\"success\" text=\"\u66F4\u65B0\u6A21\u677F\" (onClick)=\"pullTemplate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showPullDataButton\" type=\"success\" text=\"\u586B\u5145\u6570\u636E\" (onClick)=\"pullData()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showCalcButton\" type=\"default\" text=\"\u6267\u884C\u8BA1\u7B97\" (onClick)=\"calc()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showValidateButton\" type=\"default\" text=\"\u6267\u884C\u6821\u9A8C\" (onClick)=\"validate()\"\r\n [disabled]=\"loading\"></dx-button>\r\n</div>\r\n<dx-validation-group [class.validation-group]=\"true\" #validator>\r\n <div class=\"viewer-container\">\r\n <div class=\"viewer\">\r\n <ng-container *ngFor=\"let section of sections\">\r\n <rs-section [section]=\"section\"></rs-section>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</dx-validation-group>\r\n<div *ngIf=\"!readonly || showCloseButton\" class=\"bar footer\">\r\n <dx-button *ngIf=\"!readonly && showSaveButton\" type=\"default\" text=\"\u4FDD\u5B58\" (onClick)=\"save()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"!readonly && showGenerateFileButton\" type=\"success\" text=\"\u751F\u6210\u9644\u4EF6\" (onClick)=\"generateFile()\"\r\n [disabled]=\"loading\"></dx-button>\r\n <dx-button *ngIf=\"showCloseButton\" type=\"normal\" text=\"\u5173\u95ED\" (onClick)=\"onClosed.emit()\"></dx-button>\r\n</div>\r\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap;background-color:#f5f5f5}:host .bar{flex:none;padding:12px 24px;background-color:var(--coast-base-bg-color, rgb(255, 255, 255));z-index:1;display:flex;flex-flow:row nowrap}:host .bar>dx-button{width:80px}:host .bar>dx-button:not(:last-child){margin-right:8px}:host .header{border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;top:0}:host .validation-group{flex:auto;height:0;overflow-y:auto;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}:host .validation-group .viewer-container{flex:auto;height:0;overflow-x:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}:host .validation-group .viewer-container .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index:0}:host .footer{justify-content:flex-end;border-top:1px solid var(--coast-border-color, rgb(221, 221, 221));position:sticky;bottom:0}\n"] }]
5121
5146
  }], ctorParameters: function () { return [{ type: SectionService }, { type: WordEditorService }, { type: i0.ViewContainerRef }]; }, propDecorators: { tenant: [{
5122
5147
  type: Input
5123
5148
  }], className: [{
@@ -5126,12 +5151,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
5126
5151
  type: Input
5127
5152
  }], templateClassName: [{
5128
5153
  type: Input
5154
+ }], defaultTemplateNumber: [{
5155
+ type: Input
5129
5156
  }], templateNumberAttribute: [{
5130
5157
  type: Input
5131
5158
  }], templateFileAttribute: [{
5132
5159
  type: Input
5133
5160
  }], templateConfigAttribute: [{
5134
5161
  type: Input
5162
+ }], generateFileAttribute: [{
5163
+ type: Input
5135
5164
  }], params: [{
5136
5165
  type: Input
5137
5166
  }], tabViewContainerRef: [{
@@ -5144,12 +5173,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
5144
5173
  type: Input
5145
5174
  }], showValidateButton: [{
5146
5175
  type: Input
5147
- }], showGenerateFileButton: [{
5176
+ }], showSaveButton: [{
5148
5177
  type: Input
5149
- }], generateFileAttribute: [{
5178
+ }], showGenerateFileButton: [{
5150
5179
  type: Input
5151
5180
  }], showCloseButton: [{
5152
5181
  type: Input
5182
+ }], generateToTemp: [{
5183
+ type: Input
5153
5184
  }], readonly: [{
5154
5185
  type: Input
5155
5186
  }], onSaved: [{