ngx-rs-ant 2.2.2 → 2.2.3

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 (54) hide show
  1. package/esm2020/data-grid/data-grid.component.mjs +3 -3
  2. package/esm2020/data-grid/instance-link-template/instance-link-template.component.mjs +3 -3
  3. package/esm2020/form/form.component.mjs +4 -4
  4. package/esm2020/public-api.mjs +11 -1
  5. package/esm2020/types/component/mark-item-component-base.mjs +8 -0
  6. package/esm2020/types/config/mark-item-config-base.mjs +4 -0
  7. package/esm2020/types/config/modal-config-base.mjs +1 -1
  8. package/esm2020/util/utils.mjs +17 -17
  9. package/esm2020/word/section/color.pipe.mjs +19 -0
  10. package/esm2020/word/section/mark.pipe.mjs +20 -0
  11. package/esm2020/word/section/node/node.component.mjs +31 -0
  12. package/esm2020/word/section/node/paragraph/paragraph.component.mjs +44 -0
  13. package/esm2020/word/section/node/paragraph/run/run.component.mjs +84 -0
  14. package/esm2020/word/section/node/paragraph-for-input/item/item.component.mjs +64 -0
  15. package/esm2020/word/section/node/paragraph-for-input/paragraph-for-input.component.mjs +46 -0
  16. package/esm2020/word/section/pt.pipe.mjs +22 -0
  17. package/esm2020/word/section/section.component.mjs +44 -0
  18. package/esm2020/word/section/section.module.mjs +50 -0
  19. package/esm2020/word/section/section.service.mjs +48 -0
  20. package/esm2020/word/word-designer/mark-config/mark-config.component.mjs +77 -0
  21. package/esm2020/word/word-designer/word-designer.component.mjs +207 -0
  22. package/esm2020/word/word-designer/word-designer.module.mjs +35 -0
  23. package/esm2020/word/word-designer/word-designer.service.mjs +69 -0
  24. package/esm2020/word/word-editor/word-editor.component.mjs +154 -0
  25. package/esm2020/word/word-editor/word-editor.module.mjs +32 -0
  26. package/esm2020/word/word-editor/word-editor.service.mjs +67 -0
  27. package/fesm2015/ngx-rs-ant.mjs +1038 -22
  28. package/fesm2015/ngx-rs-ant.mjs.map +1 -1
  29. package/fesm2020/ngx-rs-ant.mjs +1031 -22
  30. package/fesm2020/ngx-rs-ant.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/public-api.d.ts +10 -0
  33. package/types/component/mark-item-component-base.d.ts +21 -0
  34. package/types/config/mark-item-config-base.d.ts +17 -0
  35. package/types/config/modal-config-base.d.ts +8 -0
  36. package/util/utils.d.ts +10 -10
  37. package/word/section/color.pipe.d.ts +7 -0
  38. package/word/section/mark.pipe.d.ts +10 -0
  39. package/word/section/node/node.component.d.ts +12 -0
  40. package/word/section/node/paragraph/paragraph.component.d.ts +35 -0
  41. package/word/section/node/paragraph/run/run.component.d.ts +21 -0
  42. package/word/section/node/paragraph-for-input/item/item.component.d.ts +27 -0
  43. package/word/section/node/paragraph-for-input/paragraph-for-input.component.d.ts +35 -0
  44. package/word/section/pt.pipe.d.ts +7 -0
  45. package/word/section/section.component.d.ts +22 -0
  46. package/word/section/section.module.d.ts +16 -0
  47. package/word/section/section.service.d.ts +24 -0
  48. package/word/word-designer/mark-config/mark-config.component.d.ts +21 -0
  49. package/word/word-designer/word-designer.component.d.ts +48 -0
  50. package/word/word-designer/word-designer.module.d.ts +11 -0
  51. package/word/word-designer/word-designer.service.d.ts +13 -0
  52. package/word/word-editor/word-editor.component.d.ts +41 -0
  53. package/word/word-editor/word-editor.module.d.ts +10 -0
  54. package/word/word-editor/word-editor.service.d.ts +14 -0
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, Input, HostBinding, EventEmitter, Output, HostListener, ViewContainerRef, ViewChild, Directive, ViewChildren, NgModule, Injectable, ContentChild, Pipe } from '@angular/core';
3
- import { PluginFactory } from 'coast-plugin-register';
3
+ import { PluginFactory, MarkItemFactory } from 'coast-plugin-register';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import { Subject, ReplaySubject, Subscription, map, shareReplay, firstValueFrom, of, lastValueFrom, debounceTime, interval } from 'rxjs';
@@ -29,6 +29,8 @@ import * as i5$2 from 'devextreme-angular/ui/tooltip';
29
29
  import * as i4 from 'devextreme-angular/ui/popover';
30
30
  import * as i2$3 from 'ng2-pdfjs-viewer';
31
31
  import { PdfJsViewerComponent, PdfJsViewerModule } from 'ng2-pdfjs-viewer';
32
+ import * as i2$4 from 'devextreme-angular/ui/select-box';
33
+ import * as i7$1 from 'devextreme-angular/ui/validation-group';
32
34
 
33
35
  class DividerLineComponent {
34
36
  get _style() {
@@ -1801,13 +1803,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1801
1803
  }]
1802
1804
  }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });
1803
1805
 
1804
- function notify_error(message) {
1806
+ function notifyError(message) {
1805
1807
  _notify(message, 12000, 'warning');
1806
1808
  }
1807
- function notify_warning(message) {
1809
+ function notifyWarning(message) {
1808
1810
  _notify(message, 8000, 'warning');
1809
1811
  }
1810
- function notify_success(message) {
1812
+ function notifySuccess(message) {
1811
1813
  _notify(message, 4000, 'success');
1812
1814
  }
1813
1815
  function _notify(message, time, type) {
@@ -1827,7 +1829,7 @@ function _notify(message, time, type) {
1827
1829
  function localeSortMethod(value1, value2) {
1828
1830
  return value1.localeCompare(value2);
1829
1831
  }
1830
- function file_type_icon(name) {
1832
+ function fileTypeIcon(name) {
1831
1833
  const type = name.substring(name.lastIndexOf('.') + 1).toLocaleLowerCase();
1832
1834
  switch (type) {
1833
1835
  case 'doc':
@@ -1862,11 +1864,11 @@ function file_type_icon(name) {
1862
1864
  return 'unknown';
1863
1865
  }
1864
1866
  }
1865
- function support_preview_ext() {
1867
+ function supportPreviewExt() {
1866
1868
  return ['pdf', 'png', 'jpg', 'jpeg', 'gif', 'bmp', 'doc', 'docx', 'txt', 'xml', 'json', 'js', 'xls', 'xlsx', 'csv', 'ppt', 'pptx', 'mp3', 'mp4'];
1867
1869
  }
1868
- function format_file_size(size) {
1869
- const labels = ['b', 'Kb', 'Mb', 'Gb'];
1870
+ function formatFileSize(size) {
1871
+ const labels = ['b', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb'];
1870
1872
  const count = labels.length - 1;
1871
1873
  let i = 0;
1872
1874
  while (i < count && size >= 1024) {
@@ -1875,7 +1877,7 @@ function format_file_size(size) {
1875
1877
  }
1876
1878
  return Math.round(size * 100) / 100 + " " + labels[i];
1877
1879
  }
1878
- function filename_from_disposition(disposition) {
1880
+ function filenameFromDisposition(disposition) {
1879
1881
  const filenamePair = disposition.split(';').filter(str => /^filename=/.test(str.trim())).pop();
1880
1882
  if (filenamePair) {
1881
1883
  let str = filenamePair.trim();
@@ -1887,7 +1889,7 @@ function filename_from_disposition(disposition) {
1887
1889
  return null;
1888
1890
  }
1889
1891
  }
1890
- function download_file(blob, filename, callback) {
1892
+ function downloadFile(blob, filename, callback) {
1891
1893
  const url = window.webkitURL.createObjectURL(blob);
1892
1894
  const a = document.createElement('a');
1893
1895
  document.body.appendChild(a);
@@ -1926,20 +1928,20 @@ function validate(validator) {
1926
1928
  }
1927
1929
  });
1928
1930
  }
1929
- function validate_group(validationGroupComponent) {
1931
+ function validateGroup(validationGroupComponent) {
1930
1932
  if (!validationGroupComponent) {
1931
1933
  return firstValueFrom(of(true));
1932
1934
  }
1933
- return validateGroup(validationGroupComponent.instance, validationGroupComponent.element.nativeElement);
1935
+ return _validateGroup(validationGroupComponent.instance, validationGroupComponent.element.nativeElement);
1934
1936
  }
1935
- function validate_group_by_name(name, brokenElementParent) {
1937
+ function validateGroupByName(name, brokenElementParent) {
1936
1938
  const validationGroup = validationEngine.getGroupConfig(name);
1937
1939
  if (!validationGroup) {
1938
1940
  return firstValueFrom(of(true));
1939
1941
  }
1940
- return validateGroup(validationGroup, brokenElementParent);
1942
+ return _validateGroup(validationGroup, brokenElementParent);
1941
1943
  }
1942
- function validateGroup(validationGroup, brokenElementParent) {
1944
+ function _validateGroup(validationGroup, brokenElementParent) {
1943
1945
  let sourceNode;
1944
1946
  const targetClassName = 'dx-field';
1945
1947
  const findTargetNode = (node) => {
@@ -2023,7 +2025,7 @@ function evaluateFilter(filter, model) {
2023
2025
  return false;
2024
2026
  }
2025
2027
  if (typeof filter[0] === 'string') {
2026
- return evaluateCondition(filter, model);
2028
+ return _evaluateCondition(filter, model);
2027
2029
  }
2028
2030
  // 复合条件,约定统一为and/or
2029
2031
  let currentOperator = filter[1].toUpperCase();
@@ -2040,7 +2042,7 @@ function evaluateFilter(filter, model) {
2040
2042
  }
2041
2043
  return false;
2042
2044
  }
2043
- function evaluateCondition(condition, model) {
2045
+ function _evaluateCondition(condition, model) {
2044
2046
  const [key, conditionType, value] = condition;
2045
2047
  let modelValue = model[key];
2046
2048
  switch (conditionType) {
@@ -2801,10 +2803,10 @@ class FormComponent extends UniqueId {
2801
2803
  validate() {
2802
2804
  return new Promise((resolve) => {
2803
2805
  const promises = Array.from(this.elementRef.nativeElement.querySelectorAll('rs-form')).map((item) => {
2804
- return validate_group_by_name(item.getAttribute('validator-group-name'), this.elementRef.nativeElement);
2806
+ return validateGroupByName(item.getAttribute('validator-group-name'), this.elementRef.nativeElement);
2805
2807
  });
2806
2808
  // 添加顶级元素的验证 Promise
2807
- promises.push(validate_group_by_name(this.getUniqueId(), this.elementRef.nativeElement));
2809
+ promises.push(validateGroupByName(this.getUniqueId(), this.elementRef.nativeElement));
2808
2810
  // 使用 Promise.all 等待所有 Promise 完成
2809
2811
  Promise.all(promises)
2810
2812
  .then((results) => {
@@ -2869,7 +2871,7 @@ class InstanceLinkTemplateComponent {
2869
2871
  openNewTab($event) {
2870
2872
  $event.event?.stopPropagation();
2871
2873
  if (!window.coast.tabManager) {
2872
- notify_warning('此操作仅能在coast-web项目中执行,type:detail,config:tenant=' + this.tenant + ',className=' + this.className + ',oid=' + this.oid);
2874
+ notifyWarning('此操作仅能在coast-web项目中执行,type:detail,config:tenant=' + this.tenant + ',className=' + this.className + ',oid=' + this.oid);
2873
2875
  return;
2874
2876
  }
2875
2877
  window.coast.tabManager.add.next({
@@ -3045,7 +3047,7 @@ class DataGridComponent {
3045
3047
  });
3046
3048
  if (this.onlyFrontEnd) {
3047
3049
  if (this.dataSource && !Array.isArray(this.dataSource)) {
3048
- notify_error('因onlyFrontEnd参数为true,需要明确指定dataSource参数为数组');
3050
+ notifyError('因onlyFrontEnd参数为true,需要明确指定dataSource参数为数组');
3049
3051
  }
3050
3052
  }
3051
3053
  else {
@@ -3909,6 +3911,13 @@ class FormItemComponentBase extends ComponentBase {
3909
3911
  }
3910
3912
  }
3911
3913
 
3914
+ class MarkItemComponentBase extends ComponentBase {
3915
+ constructor() {
3916
+ super(...arguments);
3917
+ this.readonly = false;
3918
+ }
3919
+ }
3920
+
3912
3921
  class ModalComponentBase extends ComponentBase {
3913
3922
  }
3914
3923
 
@@ -3931,6 +3940,9 @@ class CellConfigBase extends ConfigBase {
3931
3940
  class FormItemConfigBase extends ConfigBase {
3932
3941
  }
3933
3942
 
3943
+ class MarkItemConfigBase extends ComponentBase {
3944
+ }
3945
+
3934
3946
  class ModalConfigBase extends ConfigBase {
3935
3947
  }
3936
3948
 
@@ -4116,9 +4128,1006 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4116
4128
  type: Injectable
4117
4129
  }], ctorParameters: function () { return []; } });
4118
4130
 
4131
+ class PtPipe {
4132
+ transform(value, scale = 1) {
4133
+ if (!value) {
4134
+ return '';
4135
+ }
4136
+ if (typeof value === 'string') {
4137
+ return value;
4138
+ }
4139
+ return value * scale + 'pt';
4140
+ }
4141
+ }
4142
+ PtPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PtPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4143
+ PtPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: PtPipe, name: "pt" });
4144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: PtPipe, decorators: [{
4145
+ type: Pipe,
4146
+ args: [{
4147
+ name: 'pt'
4148
+ }]
4149
+ }] });
4150
+
4151
+ class SectionService {
4152
+ constructor() {
4153
+ this.scale = 1;
4154
+ this.marks = [];
4155
+ this.readonly = false;
4156
+ this.activeMark = { name: '未定义书签' };
4157
+ this.copiedMark = {};
4158
+ this.readyPasteMarkNames = [];
4159
+ this.lastClickToPasteMarkName = '';
4160
+ this.valueUpdated = new EventEmitter();
4161
+ }
4162
+ switchMark(type) {
4163
+ let index = this.marks.indexOf(this.activeMark);
4164
+ if (index + type === -1) {
4165
+ this.activeMark = this.marks[this.marks.length - 1];
4166
+ }
4167
+ else if (index + type === this.marks.length) {
4168
+ this.activeMark = this.marks[0];
4169
+ }
4170
+ else {
4171
+ this.activeMark = this.marks[index + type];
4172
+ }
4173
+ document.getElementById('mark-setting_' + this.activeMark.name)?.scrollIntoView({
4174
+ block: 'center',
4175
+ inline: 'center'
4176
+ });
4177
+ }
4178
+ getMark(name) {
4179
+ if (!name) {
4180
+ return undefined;
4181
+ }
4182
+ return this.marks.find(m => m.name === name);
4183
+ }
4184
+ getMarkIndex(name) {
4185
+ if (!name) {
4186
+ return -1;
4187
+ }
4188
+ return this.marks.findIndex(m => m.name === name);
4189
+ }
4190
+ }
4191
+ SectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4192
+ SectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionService });
4193
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionService, decorators: [{
4194
+ type: Injectable
4195
+ }] });
4196
+
4197
+ class MarkPipe {
4198
+ constructor(service) {
4199
+ this.service = service;
4200
+ }
4201
+ transform(name) {
4202
+ return this.service.getMark(name);
4203
+ }
4204
+ }
4205
+ MarkPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MarkPipe, deps: [{ token: SectionService }], target: i0.ɵɵFactoryTarget.Pipe });
4206
+ MarkPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MarkPipe, name: "mark" });
4207
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MarkPipe, decorators: [{
4208
+ type: Pipe,
4209
+ args: [{
4210
+ name: 'mark'
4211
+ }]
4212
+ }], ctorParameters: function () { return [{ type: SectionService }]; } });
4213
+
4214
+ class RunComponent {
4215
+ constructor(service) {
4216
+ this.service = service;
4217
+ this.editMode = false;
4218
+ this.pasteMode = false;
4219
+ }
4220
+ ngOnInit() {
4221
+ if (!this.node.text) {
4222
+ if (this.node.mark && this.editMode) {
4223
+ this.nodeText = '&ensp;';
4224
+ }
4225
+ else {
4226
+ this.nodeText = '';
4227
+ }
4228
+ }
4229
+ else {
4230
+ this.nodeText = this.node.text.replaceAll(' ', '&ensp;').replaceAll('\f', '&ensp;');
4231
+ }
4232
+ }
4233
+ click($event, markName) {
4234
+ if (this.pasteMode) {
4235
+ if (markName === this.service.activeMark?.name) {
4236
+ return;
4237
+ }
4238
+ if ($event.ctrlKey) {
4239
+ if (this.service.readyPasteMarkNames.includes(markName)) {
4240
+ this.service.readyPasteMarkNames.splice(this.service.readyPasteMarkNames.indexOf(markName), 1);
4241
+ }
4242
+ else {
4243
+ this.service.lastClickToPasteMarkName = markName;
4244
+ this.service.readyPasteMarkNames.push(markName);
4245
+ }
4246
+ }
4247
+ else if ($event.shiftKey) {
4248
+ if (this.service.lastClickToPasteMarkName) {
4249
+ let startIndex = this.service.getMarkIndex(this.service.lastClickToPasteMarkName);
4250
+ let endIndex = this.service.getMarkIndex(markName);
4251
+ this.service.lastClickToPasteMarkName = markName;
4252
+ if (startIndex > endIndex) {
4253
+ let temp = startIndex;
4254
+ startIndex = endIndex;
4255
+ endIndex = temp;
4256
+ }
4257
+ for (let i = startIndex; i <= endIndex; i++) {
4258
+ let name = this.service.marks[i].name;
4259
+ if (!this.service.readyPasteMarkNames.includes(name)) {
4260
+ this.service.readyPasteMarkNames.push(name);
4261
+ }
4262
+ }
4263
+ }
4264
+ else {
4265
+ this.service.lastClickToPasteMarkName = markName;
4266
+ this.service.readyPasteMarkNames = [markName];
4267
+ }
4268
+ }
4269
+ else {
4270
+ this.service.lastClickToPasteMarkName = markName;
4271
+ this.service.readyPasteMarkNames = [markName];
4272
+ }
4273
+ }
4274
+ else {
4275
+ this.service.activeMark = this.service.getMark(markName);
4276
+ }
4277
+ }
4278
+ }
4279
+ RunComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RunComponent, deps: [{ token: SectionService }], target: i0.ɵɵFactoryTarget.Component });
4280
+ RunComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RunComponent, selector: "rs-run", inputs: { node: "node", editMode: "editMode", pasteMode: "pasteMode" }, ngImport: i0, template: "<div class=\"node\" [style.display]=\"node.type === 'image' ? 'inline-block' : ''\" [style.float]=\"node.style?.['float']\">\r\n <i *ngIf=\"node.mark && node.setting && editMode\"\r\n [id]=\"'mark-setting_' + node.mark\"\r\n [style.font-size]=\"12 | pt:service.scale\"\r\n [style.left]=\"-12 | pt:service.scale\"\r\n class=\"mark-setting coast-icon-setting\"\r\n [class.used]=\"(node.mark | mark)?.type\"\r\n [class.active]=\"node.mark === service.activeMark.name\"\r\n [class.copied]=\"node.mark === service.copiedMark.name\"\r\n [class.ready-paste]=\"service.readyPasteMarkNames.includes(node.mark)\"\r\n (click)=\"click($event, node.mark)\"></i>\r\n <span *ngIf=\"node.type === 'run'\"\r\n [style.font-family]=\"node.style['font-family']\"\r\n [style.font-size]=\"node.style['font-size'] | pt:service.scale\"\r\n [style.font-weight]=\"node.style['font-bold'] ? 'bold' : 'normal'\"\r\n [style.text-decoration]=\"node.style['underline'] ? 'underline 1px' : 'none'\"\r\n [style.float]=\"node.style['float']\"\r\n [class.mark]=\"node.mark === service.activeMark.name && editMode\"\r\n [innerHTML]=\"nodeText\">\r\n </span>\r\n <img *ngIf=\"node.type === 'image'\"\r\n [style.width]=\"node.style['width'] | pt:service.scale\"\r\n [style.height]=\"node.style['height'] | pt:service.scale\"\r\n [style.position]=\"node.style['position']\"\r\n [style.top]=\"node.style['top'] | pt:service.scale\"\r\n [style.left]=\"node.style['left'] | pt:service.scale\"\r\n [style.z-index]=\"node.style['z-index']\"\r\n [class.mark]=\"node.mark === service.activeMark.name && editMode\"\r\n [src]=\"'data:image/png;base64,' + node.data\" alt=\"\">\r\n</div>\r\n", styles: [":host .node{position:relative;display:inline;text-indent:0}:host .node .mark-setting{position:absolute;cursor:pointer;color:var(--coast-warning-color, rgb(240, 173, 78));z-index:1}:host .node .mark-setting.used{color:var(--coast-success-color, rgb(92, 184, 92))}:host .node .mark-setting.active{color:var(--coast-default-color, rgb(51, 122, 183))}:host .node .mark-setting.copied{background-color:var(--coast-success-color, rgb(92, 184, 92))}:host .node .mark-setting.ready-paste{background-color:var(--coast-danger-color, rgb(217, 83, 79))}:host .node span.mark{background-color:var(--coast-active-color, rgba(51, 122, 183, .5))}:host .node img.mark{border:1px solid var(--coast-active-color, rgba(51, 122, 183, .5))}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: MarkPipe, name: "mark" }, { kind: "pipe", type: PtPipe, name: "pt" }] });
4281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RunComponent, decorators: [{
4282
+ type: Component,
4283
+ args: [{ selector: 'rs-run', template: "<div class=\"node\" [style.display]=\"node.type === 'image' ? 'inline-block' : ''\" [style.float]=\"node.style?.['float']\">\r\n <i *ngIf=\"node.mark && node.setting && editMode\"\r\n [id]=\"'mark-setting_' + node.mark\"\r\n [style.font-size]=\"12 | pt:service.scale\"\r\n [style.left]=\"-12 | pt:service.scale\"\r\n class=\"mark-setting coast-icon-setting\"\r\n [class.used]=\"(node.mark | mark)?.type\"\r\n [class.active]=\"node.mark === service.activeMark.name\"\r\n [class.copied]=\"node.mark === service.copiedMark.name\"\r\n [class.ready-paste]=\"service.readyPasteMarkNames.includes(node.mark)\"\r\n (click)=\"click($event, node.mark)\"></i>\r\n <span *ngIf=\"node.type === 'run'\"\r\n [style.font-family]=\"node.style['font-family']\"\r\n [style.font-size]=\"node.style['font-size'] | pt:service.scale\"\r\n [style.font-weight]=\"node.style['font-bold'] ? 'bold' : 'normal'\"\r\n [style.text-decoration]=\"node.style['underline'] ? 'underline 1px' : 'none'\"\r\n [style.float]=\"node.style['float']\"\r\n [class.mark]=\"node.mark === service.activeMark.name && editMode\"\r\n [innerHTML]=\"nodeText\">\r\n </span>\r\n <img *ngIf=\"node.type === 'image'\"\r\n [style.width]=\"node.style['width'] | pt:service.scale\"\r\n [style.height]=\"node.style['height'] | pt:service.scale\"\r\n [style.position]=\"node.style['position']\"\r\n [style.top]=\"node.style['top'] | pt:service.scale\"\r\n [style.left]=\"node.style['left'] | pt:service.scale\"\r\n [style.z-index]=\"node.style['z-index']\"\r\n [class.mark]=\"node.mark === service.activeMark.name && editMode\"\r\n [src]=\"'data:image/png;base64,' + node.data\" alt=\"\">\r\n</div>\r\n", styles: [":host .node{position:relative;display:inline;text-indent:0}:host .node .mark-setting{position:absolute;cursor:pointer;color:var(--coast-warning-color, rgb(240, 173, 78));z-index:1}:host .node .mark-setting.used{color:var(--coast-success-color, rgb(92, 184, 92))}:host .node .mark-setting.active{color:var(--coast-default-color, rgb(51, 122, 183))}:host .node .mark-setting.copied{background-color:var(--coast-success-color, rgb(92, 184, 92))}:host .node .mark-setting.ready-paste{background-color:var(--coast-danger-color, rgb(217, 83, 79))}:host .node span.mark{background-color:var(--coast-active-color, rgba(51, 122, 183, .5))}:host .node img.mark{border:1px solid var(--coast-active-color, rgba(51, 122, 183, .5))}\n"] }]
4284
+ }], ctorParameters: function () { return [{ type: SectionService }]; }, propDecorators: { node: [{
4285
+ type: Input
4286
+ }], editMode: [{
4287
+ type: Input
4288
+ }], pasteMode: [{
4289
+ type: Input
4290
+ }] } });
4291
+
4292
+ class ParagraphComponent {
4293
+ get _style() {
4294
+ return {
4295
+ display: 'block',
4296
+ marginTop: this.pt.transform(this.paragraph.style['margin-top'], this.service.scale),
4297
+ marginBottom: this.pt.transform(this.paragraph.style['margin-bottom'], this.service.scale),
4298
+ marginLeft: this.pt.transform(this.paragraph.style['margin-left'], this.service.scale),
4299
+ textIndent: this.pt.transform(this.paragraph.style['text-indent'], this.service.scale),
4300
+ textAlign: this.paragraph.style['text-align'],
4301
+ lineHeight: this.pt.transform(this.paragraph.style['line-height'], this.service.scale),
4302
+ minHeight: this.pt.transform(this.paragraph.style['min-height'], this.service.scale),
4303
+ fontFamily: this.paragraph.style['font-family'],
4304
+ fontSize: this.pt.transform(this.paragraph.style['font-size'], this.service.scale)
4305
+ };
4306
+ }
4307
+ constructor(service, pt) {
4308
+ this.service = service;
4309
+ this.pt = pt;
4310
+ this.editMode = false;
4311
+ this.pasteMode = false;
4312
+ }
4313
+ }
4314
+ ParagraphComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ParagraphComponent, deps: [{ token: SectionService }, { token: PtPipe }], target: i0.ɵɵFactoryTarget.Component });
4315
+ ParagraphComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ParagraphComponent, selector: "rs-paragraph", inputs: { paragraph: "paragraph", editMode: "editMode", pasteMode: "pasteMode" }, host: { properties: { "style": "this._style" } }, ngImport: i0, template: "<ng-container *ngFor=\"let node of paragraph.content\">\r\n <rs-run [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\"></rs-run>\r\n</ng-container>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: RunComponent, selector: "rs-run", inputs: ["node", "editMode", "pasteMode"] }] });
4316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ParagraphComponent, decorators: [{
4317
+ type: Component,
4318
+ args: [{ selector: 'rs-paragraph', template: "<ng-container *ngFor=\"let node of paragraph.content\">\r\n <rs-run [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\"></rs-run>\r\n</ng-container>\r\n" }]
4319
+ }], ctorParameters: function () { return [{ type: SectionService }, { type: PtPipe }]; }, propDecorators: { paragraph: [{
4320
+ type: Input
4321
+ }], editMode: [{
4322
+ type: Input
4323
+ }], pasteMode: [{
4324
+ type: Input
4325
+ }], _style: [{
4326
+ type: HostBinding,
4327
+ args: ['style']
4328
+ }] } });
4329
+
4330
+ class ItemComponent {
4331
+ get _style() {
4332
+ if (this.node.style?.float) {
4333
+ return { float: this.node.style.float };
4334
+ }
4335
+ return {};
4336
+ }
4337
+ constructor(service) {
4338
+ this.service = service;
4339
+ this.editMode = false;
4340
+ this.readonly = false;
4341
+ }
4342
+ ngOnInit() {
4343
+ if (!this.mark.type || !this.node.setting) {
4344
+ return;
4345
+ }
4346
+ let markItem = MarkItemFactory.get(this.mark.type);
4347
+ if (!markItem) {
4348
+ console.error('不存在组件:' + this.mark.type);
4349
+ return;
4350
+ }
4351
+ setTimeout(() => {
4352
+ let componentRef = this.itemRef.createComponent(markItem.component);
4353
+ const componentInstance = componentRef.instance;
4354
+ componentInstance.tenant = this.service.tenant;
4355
+ componentInstance.templateClassName = this.service.templateClassName;
4356
+ componentInstance.instanceClassName = this.service.instanceClassName;
4357
+ componentInstance.instanceOid = this.service.instanceOid;
4358
+ componentInstance.mark = this.mark;
4359
+ componentInstance.marks = this.service.marks;
4360
+ componentInstance.readonly = this.service.readonly || this.readonly;
4361
+ componentInstance.valueUpdated = this.service.valueUpdated;
4362
+ componentInstance.params = this.service.params;
4363
+ componentInstance.tabViewContainerRef = this.service.tabViewContainerRef;
4364
+ });
4365
+ }
4366
+ }
4367
+ ItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ItemComponent, deps: [{ token: SectionService }], target: i0.ɵɵFactoryTarget.Component });
4368
+ ItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ItemComponent, selector: "rs-item", inputs: { node: "node", mark: "mark", editMode: "editMode", readonly: "readonly" }, host: { properties: { "style": "this._style" } }, viewQueries: [{ propertyName: "itemRef", first: true, predicate: ["itemRef"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<ng-container *ngIf=\"node.setting\" #itemRef></ng-container>\r\n<rs-run *ngIf=\"mark.config.showMarkContent\" [node]=\"node\" [editMode]=\"editMode\"></rs-run>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: RunComponent, selector: "rs-run", inputs: ["node", "editMode", "pasteMode"] }] });
4369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ItemComponent, decorators: [{
4370
+ type: Component,
4371
+ args: [{ selector: 'rs-item', template: "<ng-container *ngIf=\"node.setting\" #itemRef></ng-container>\r\n<rs-run *ngIf=\"mark.config.showMarkContent\" [node]=\"node\" [editMode]=\"editMode\"></rs-run>\r\n" }]
4372
+ }], ctorParameters: function () { return [{ type: SectionService }]; }, propDecorators: { node: [{
4373
+ type: Input
4374
+ }], mark: [{
4375
+ type: Input
4376
+ }], editMode: [{
4377
+ type: Input
4378
+ }], readonly: [{
4379
+ type: Input
4380
+ }], _style: [{
4381
+ type: HostBinding,
4382
+ args: ['style']
4383
+ }], itemRef: [{
4384
+ type: ViewChild,
4385
+ args: ['itemRef', { read: ViewContainerRef }]
4386
+ }] } });
4387
+
4388
+ class ParagraphForInputComponent {
4389
+ get _style() {
4390
+ return {
4391
+ display: 'block',
4392
+ marginTop: this.pt.transform(this.paragraph.style['margin-top'], this.service.scale),
4393
+ marginBottom: this.pt.transform(this.paragraph.style['margin-bottom'], this.service.scale),
4394
+ marginLeft: this.pt.transform(this.paragraph.style['margin-left'], this.service.scale),
4395
+ textIndent: this.pt.transform(this.paragraph.style['text-indent'], this.service.scale),
4396
+ textAlign: this.paragraph.style['text-align'],
4397
+ lineHeight: this.pt.transform(this.paragraph.style['line-height'], this.service.scale),
4398
+ minHeight: this.pt.transform(this.paragraph.style['min-height'], this.service.scale),
4399
+ fontFamily: this.paragraph.style['font-family'],
4400
+ fontSize: this.pt.transform(this.paragraph.style['font-size'], this.service.scale)
4401
+ };
4402
+ }
4403
+ constructor(service, pt) {
4404
+ this.service = service;
4405
+ this.pt = pt;
4406
+ this.editMode = false;
4407
+ this.readonly = false;
4408
+ }
4409
+ }
4410
+ ParagraphForInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ParagraphForInputComponent, deps: [{ token: SectionService }, { token: PtPipe }], target: i0.ɵɵFactoryTarget.Component });
4411
+ ParagraphForInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: ParagraphForInputComponent, selector: "rs-paragraph-for-input", inputs: { paragraph: "paragraph", editMode: "editMode", readonly: "readonly" }, host: { properties: { "style": "this._style" } }, ngImport: i0, template: "<ng-container *ngFor=\"let node of paragraph.content\">\r\n <rs-item *ngIf=\"node.mark\" [node]=\"node\" [mark]=\"node.mark | mark\" [editMode]=\"editMode\"\r\n [readonly]=\"readonly\"></rs-item>\r\n <rs-run *ngIf=\"!node.mark\" [node]=\"node\"></rs-run>\r\n</ng-container>\r\n", styles: [""], 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: RunComponent, selector: "rs-run", inputs: ["node", "editMode", "pasteMode"] }, { kind: "component", type: ItemComponent, selector: "rs-item", inputs: ["node", "mark", "editMode", "readonly"] }, { kind: "pipe", type: MarkPipe, name: "mark" }] });
4412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ParagraphForInputComponent, decorators: [{
4413
+ type: Component,
4414
+ args: [{ selector: 'rs-paragraph-for-input', template: "<ng-container *ngFor=\"let node of paragraph.content\">\r\n <rs-item *ngIf=\"node.mark\" [node]=\"node\" [mark]=\"node.mark | mark\" [editMode]=\"editMode\"\r\n [readonly]=\"readonly\"></rs-item>\r\n <rs-run *ngIf=\"!node.mark\" [node]=\"node\"></rs-run>\r\n</ng-container>\r\n" }]
4415
+ }], ctorParameters: function () { return [{ type: SectionService }, { type: PtPipe }]; }, propDecorators: { paragraph: [{
4416
+ type: Input
4417
+ }], editMode: [{
4418
+ type: Input
4419
+ }], readonly: [{
4420
+ type: Input
4421
+ }], _style: [{
4422
+ type: HostBinding,
4423
+ args: ['style']
4424
+ }] } });
4425
+
4426
+ class ColorPipe {
4427
+ transform(value) {
4428
+ if (value[0] === 0 && value[1] === 0 && value[2] === 0 && value[3] === 0) {
4429
+ return '';
4430
+ }
4431
+ return 'rgba(' + value[0] * 255 + ',' + value[1] * 255 + ',' + value[2] * 255 + ',' + value[3] + ')';
4432
+ }
4433
+ }
4434
+ ColorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
4435
+ ColorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: ColorPipe, name: "color" });
4436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ColorPipe, decorators: [{
4437
+ type: Pipe,
4438
+ args: [{
4439
+ name: 'color'
4440
+ }]
4441
+ }] });
4442
+
4443
+ class NodeComponent {
4444
+ constructor(service) {
4445
+ this.service = service;
4446
+ this.editMode = false;
4447
+ this.pasteMode = false;
4448
+ this.readonly = false;
4449
+ }
4450
+ }
4451
+ NodeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeComponent, deps: [{ token: SectionService }], target: i0.ɵɵFactoryTarget.Component });
4452
+ NodeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: NodeComponent, selector: "rs-node", inputs: { node: "node", editMode: "editMode", pasteMode: "pasteMode", readonly: "readonly" }, ngImport: i0, template: "<div class=\"table\" [style.align-items]=\"node.align\" *ngIf=\"node.type === 'table'\">\r\n <table [style.margin-left]=\"node.style?.['margin-left'] | pt:service.scale\"\r\n [style.width]=\"(node.style?.widthType === 'percent' ? node.style?.width + '%' : node.style?.width) | pt:service.scale\"\r\n [style.border-top-width]=\"node.style?.['border-top-width'] | pt:service.scale\"\r\n [style.border-top-color]=\"node.style?.['border-top-color'] | color\"\r\n [style.border-right-width]=\"node.style?.['border-right-width'] | pt:service.scale\"\r\n [style.border-right-color]=\"node.style?.['border-right-color'] | color\"\r\n [style.border-bottom-width]=\"node.style?.['border-bottom-width'] | pt:service.scale\"\r\n [style.border-bottom-color]=\"node.style?.['border-bottom-color'] | color\"\r\n [style.border-left-width]=\"node.style?.['border-left-width'] | pt:service.scale\"\r\n [style.border-left-color]=\"node.style?.['border-left-color'] | color\">\r\n <tr *ngFor=\"let row of node.rows\" [style.height]=\"row.style.height | pt:service.scale\">\r\n <ng-container *ngFor=\"let cell of row.cells\">\r\n <ng-container *ngIf=\"!cell.ignore\">\r\n <td [rowSpan]=\"cell.rowSpan\" [colSpan]=\"cell.colSpan\"\r\n [style.width]=\"cell.style.width | pt:service.scale\"\r\n [style.padding-top]=\"cell.style?.['padding-top'] | pt:service.scale\"\r\n [style.padding-right]=\"cell.style?.['padding-right'] | pt:service.scale\"\r\n [style.padding-bottom]=\"cell.style?.['padding-bottom'] | pt:service.scale\"\r\n [style.padding-left]=\"cell.style?.['padding-left'] | pt:service.scale\"\r\n [style.vertical-align]=\"cell.style?.['vertical-align']\"\r\n [style.background-color]=\"cell.style?.['background-color'] | color\"\r\n [style.border-top-width]=\"cell.style?.['border-top-width'] | pt:service.scale\"\r\n [style.border-top-color]=\"cell.style?.['border-top-color'] | color\"\r\n [style.border-right-width]=\"cell.style?.['border-right-width'] | pt:service.scale\"\r\n [style.border-right-color]=\"cell.style?.['border-right-color'] | color\"\r\n [style.border-bottom-width]=\"cell.style?.['border-bottom-width'] | pt:service.scale\"\r\n [style.border-bottom-color]=\"cell.style?.['border-bottom-color'] | color\"\r\n [style.border-left-width]=\"cell.style?.['border-left-width'] | pt:service.scale\"\r\n [style.border-left-color]=\"cell.style?.['border-left-color'] | color\">\r\n <ng-container *ngFor=\"let node of cell.body\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </tr>\r\n </table>\r\n</div>\r\n<ng-container *ngIf=\"node.type === 'paragraph'\">\r\n <ng-container *ngIf=\"editMode\">\r\n <rs-paragraph [paragraph]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\"></rs-paragraph>\r\n </ng-container>\r\n <ng-container *ngIf=\"!editMode\">\r\n <rs-paragraph-for-input [paragraph]=\"node\" [editMode]=\"editMode\"\r\n [readonly]=\"readonly\"></rs-paragraph-for-input>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host .table{display:flex;flex-flow:column nowrap;justify-content:center}:host .table table{border-collapse:collapse}:host .table table td{border:1px solid #000000}\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: NodeComponent, selector: "rs-node", inputs: ["node", "editMode", "pasteMode", "readonly"] }, { kind: "component", type: ParagraphComponent, selector: "rs-paragraph", inputs: ["paragraph", "editMode", "pasteMode"] }, { kind: "component", type: ParagraphForInputComponent, selector: "rs-paragraph-for-input", inputs: ["paragraph", "editMode", "readonly"] }, { kind: "pipe", type: ColorPipe, name: "color" }, { kind: "pipe", type: PtPipe, name: "pt" }] });
4453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeComponent, decorators: [{
4454
+ type: Component,
4455
+ args: [{ selector: 'rs-node', template: "<div class=\"table\" [style.align-items]=\"node.align\" *ngIf=\"node.type === 'table'\">\r\n <table [style.margin-left]=\"node.style?.['margin-left'] | pt:service.scale\"\r\n [style.width]=\"(node.style?.widthType === 'percent' ? node.style?.width + '%' : node.style?.width) | pt:service.scale\"\r\n [style.border-top-width]=\"node.style?.['border-top-width'] | pt:service.scale\"\r\n [style.border-top-color]=\"node.style?.['border-top-color'] | color\"\r\n [style.border-right-width]=\"node.style?.['border-right-width'] | pt:service.scale\"\r\n [style.border-right-color]=\"node.style?.['border-right-color'] | color\"\r\n [style.border-bottom-width]=\"node.style?.['border-bottom-width'] | pt:service.scale\"\r\n [style.border-bottom-color]=\"node.style?.['border-bottom-color'] | color\"\r\n [style.border-left-width]=\"node.style?.['border-left-width'] | pt:service.scale\"\r\n [style.border-left-color]=\"node.style?.['border-left-color'] | color\">\r\n <tr *ngFor=\"let row of node.rows\" [style.height]=\"row.style.height | pt:service.scale\">\r\n <ng-container *ngFor=\"let cell of row.cells\">\r\n <ng-container *ngIf=\"!cell.ignore\">\r\n <td [rowSpan]=\"cell.rowSpan\" [colSpan]=\"cell.colSpan\"\r\n [style.width]=\"cell.style.width | pt:service.scale\"\r\n [style.padding-top]=\"cell.style?.['padding-top'] | pt:service.scale\"\r\n [style.padding-right]=\"cell.style?.['padding-right'] | pt:service.scale\"\r\n [style.padding-bottom]=\"cell.style?.['padding-bottom'] | pt:service.scale\"\r\n [style.padding-left]=\"cell.style?.['padding-left'] | pt:service.scale\"\r\n [style.vertical-align]=\"cell.style?.['vertical-align']\"\r\n [style.background-color]=\"cell.style?.['background-color'] | color\"\r\n [style.border-top-width]=\"cell.style?.['border-top-width'] | pt:service.scale\"\r\n [style.border-top-color]=\"cell.style?.['border-top-color'] | color\"\r\n [style.border-right-width]=\"cell.style?.['border-right-width'] | pt:service.scale\"\r\n [style.border-right-color]=\"cell.style?.['border-right-color'] | color\"\r\n [style.border-bottom-width]=\"cell.style?.['border-bottom-width'] | pt:service.scale\"\r\n [style.border-bottom-color]=\"cell.style?.['border-bottom-color'] | color\"\r\n [style.border-left-width]=\"cell.style?.['border-left-width'] | pt:service.scale\"\r\n [style.border-left-color]=\"cell.style?.['border-left-color'] | color\">\r\n <ng-container *ngFor=\"let node of cell.body\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n </ng-container>\r\n </td>\r\n </ng-container>\r\n </ng-container>\r\n </tr>\r\n </table>\r\n</div>\r\n<ng-container *ngIf=\"node.type === 'paragraph'\">\r\n <ng-container *ngIf=\"editMode\">\r\n <rs-paragraph [paragraph]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\"></rs-paragraph>\r\n </ng-container>\r\n <ng-container *ngIf=\"!editMode\">\r\n <rs-paragraph-for-input [paragraph]=\"node\" [editMode]=\"editMode\"\r\n [readonly]=\"readonly\"></rs-paragraph-for-input>\r\n </ng-container>\r\n</ng-container>\r\n", styles: [":host .table{display:flex;flex-flow:column nowrap;justify-content:center}:host .table table{border-collapse:collapse}:host .table table td{border:1px solid #000000}\n"] }]
4456
+ }], ctorParameters: function () { return [{ type: SectionService }]; }, propDecorators: { node: [{
4457
+ type: Input
4458
+ }], editMode: [{
4459
+ type: Input
4460
+ }], pasteMode: [{
4461
+ type: Input
4462
+ }], readonly: [{
4463
+ type: Input
4464
+ }] } });
4465
+
4466
+ class SectionComponent {
4467
+ get _style() {
4468
+ return {
4469
+ width: this.pt.transform(this.section.style['width'], this.service.scale),
4470
+ paddingTop: this.pt.transform(this.section.style['padding-top'], this.service.scale),
4471
+ paddingRight: this.pt.transform(this.section.style['padding-right'], this.service.scale),
4472
+ paddingBottom: this.pt.transform(this.section.style['padding-bottom'], this.service.scale),
4473
+ paddingLeft: this.pt.transform(this.section.style['padding-left'], this.service.scale),
4474
+ userSelect: this.pasteMode ? 'none' : 'auto'
4475
+ };
4476
+ }
4477
+ constructor(service, pt) {
4478
+ this.service = service;
4479
+ this.pt = pt;
4480
+ this.editMode = false;
4481
+ this.pasteMode = false;
4482
+ this.readonly = false;
4483
+ }
4484
+ }
4485
+ SectionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionComponent, deps: [{ token: SectionService }, { token: PtPipe }], target: i0.ɵɵFactoryTarget.Component });
4486
+ SectionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SectionComponent, selector: "rs-section", inputs: { section: "section", editMode: "editMode", pasteMode: "pasteMode", readonly: "readonly" }, host: { properties: { "style": "this._style" } }, providers: [PtPipe], ngImport: i0, template: "<div *ngIf=\"section.header\">\r\n <ng-container *ngFor=\"let node of section.header\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n </ng-container>\r\n</div>\r\n<ng-container *ngFor=\"let node of section.body\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n</ng-container>\r\n<div *ngIf=\"section.footer\">\r\n <ng-container *ngFor=\"let node of section.footer\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n </ng-container>\r\n</div>\r\n", styles: [":host{display:block;background-color:#fff;margin-bottom:8px}\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: NodeComponent, selector: "rs-node", inputs: ["node", "editMode", "pasteMode", "readonly"] }] });
4487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionComponent, decorators: [{
4488
+ type: Component,
4489
+ args: [{ selector: 'rs-section', providers: [PtPipe], template: "<div *ngIf=\"section.header\">\r\n <ng-container *ngFor=\"let node of section.header\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n </ng-container>\r\n</div>\r\n<ng-container *ngFor=\"let node of section.body\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n</ng-container>\r\n<div *ngIf=\"section.footer\">\r\n <ng-container *ngFor=\"let node of section.footer\">\r\n <rs-node [node]=\"node\" [editMode]=\"editMode\" [pasteMode]=\"pasteMode\" [readonly]=\"readonly\"></rs-node>\r\n </ng-container>\r\n</div>\r\n", styles: [":host{display:block;background-color:#fff;margin-bottom:8px}\n"] }]
4490
+ }], ctorParameters: function () { return [{ type: SectionService }, { type: PtPipe }]; }, propDecorators: { section: [{
4491
+ type: Input
4492
+ }], editMode: [{
4493
+ type: Input
4494
+ }], pasteMode: [{
4495
+ type: Input
4496
+ }], readonly: [{
4497
+ type: Input
4498
+ }], _style: [{
4499
+ type: HostBinding,
4500
+ args: ['style']
4501
+ }] } });
4502
+
4503
+ class SectionModule {
4504
+ }
4505
+ SectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4506
+ SectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, declarations: [SectionComponent,
4507
+ NodeComponent,
4508
+ ParagraphComponent,
4509
+ RunComponent,
4510
+ ParagraphForInputComponent,
4511
+ ItemComponent,
4512
+ ColorPipe,
4513
+ MarkPipe,
4514
+ PtPipe], imports: [CommonModule], exports: [SectionComponent,
4515
+ NodeComponent] });
4516
+ SectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, imports: [CommonModule] });
4517
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SectionModule, decorators: [{
4518
+ type: NgModule,
4519
+ args: [{
4520
+ declarations: [
4521
+ SectionComponent,
4522
+ NodeComponent,
4523
+ ParagraphComponent,
4524
+ RunComponent,
4525
+ ParagraphForInputComponent,
4526
+ ItemComponent,
4527
+ ColorPipe,
4528
+ MarkPipe,
4529
+ PtPipe
4530
+ ],
4531
+ imports: [
4532
+ CommonModule
4533
+ ],
4534
+ exports: [
4535
+ SectionComponent,
4536
+ NodeComponent
4537
+ ]
4538
+ }]
4539
+ }] });
4540
+
4541
+ class WordDesignerService {
4542
+ constructor(http) {
4543
+ this.http = http;
4544
+ }
4545
+ loadTemplate(tenant, className, oid) {
4546
+ return this.http.get('api/data/' + className + '/' + oid, {
4547
+ params: {
4548
+ tenant
4549
+ }
4550
+ }).pipe(map(response => {
4551
+ if (response.data?.templateConfig) {
4552
+ return JSON.parse(response.data.templateConfig);
4553
+ }
4554
+ return {};
4555
+ }));
4556
+ }
4557
+ uploadTemplateFile(tenant, className, oid, retainMarkConfig, file) {
4558
+ const formData = new FormData();
4559
+ formData.append('file', file);
4560
+ return this.http.post('api/data/custom/upload', formData, {
4561
+ params: {
4562
+ executor: 'com.cs.system.word.designer.UploadTemplateFile',
4563
+ tenant,
4564
+ className,
4565
+ oid,
4566
+ retainMarkConfig,
4567
+ filename: file.name
4568
+ }
4569
+ }).pipe(map(response => {
4570
+ return response.data || {};
4571
+ }));
4572
+ }
4573
+ downloadTemplateFile(tenant, className, oid, callback) {
4574
+ return this.http.get('api/data/custom/download', {
4575
+ params: {
4576
+ executor: 'com.cs.system.word.designer.DownloadTemplate',
4577
+ tenant,
4578
+ className,
4579
+ oid
4580
+ },
4581
+ observe: 'response',
4582
+ responseType: 'blob'
4583
+ }).subscribe(response => {
4584
+ const disposition = response.headers.get('Content-Disposition');
4585
+ const filename = disposition && filenameFromDisposition(disposition);
4586
+ if (response.body) {
4587
+ downloadFile(response.body, filename || '未命名文件', callback);
4588
+ }
4589
+ });
4590
+ }
4591
+ save(tenant, className, oid, model) {
4592
+ return this.http.post('api/data/' + className + '/' + oid, model, {
4593
+ params: {
4594
+ tenant
4595
+ }
4596
+ });
4597
+ }
4598
+ }
4599
+ WordDesignerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4600
+ WordDesignerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerService });
4601
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerService, decorators: [{
4602
+ type: Injectable
4603
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
4604
+
4605
+ class MarkConfigComponent {
4606
+ constructor() {
4607
+ this.changeMark = false;
4608
+ }
4609
+ get mark() {
4610
+ return this._mark;
4611
+ }
4612
+ set mark(mark) {
4613
+ if (!mark) {
4614
+ return;
4615
+ }
4616
+ this._mark = mark;
4617
+ this.changeMark = true;
4618
+ this.loadMarkConfig();
4619
+ }
4620
+ ngOnInit() {
4621
+ this.markTypes = MarkItemFactory.getMarkItems(...this.filterCategories || '');
4622
+ }
4623
+ loadMarkConfig() {
4624
+ setTimeout(() => {
4625
+ this.markItemConfigRef.clear();
4626
+ let config = MarkItemFactory.getConfig(this.mark.type);
4627
+ if (!config) {
4628
+ return;
4629
+ }
4630
+ const componentRef = this.markItemConfigRef.createComponent(config.component);
4631
+ const instance = componentRef.instance;
4632
+ instance.tenant = this.tenant;
4633
+ instance.templateClassName = this.templateClassName;
4634
+ instance.templateOid = this.templateOid;
4635
+ instance.instanceClassName = this.instanceClassName;
4636
+ instance.mark = this.mark;
4637
+ instance.marks = this.marks;
4638
+ });
4639
+ }
4640
+ changeMarkType() {
4641
+ if (this.changeMark) {
4642
+ this.changeMark = false;
4643
+ }
4644
+ else {
4645
+ this.mark.pickerCode = null;
4646
+ this.mark.generatorCode = null;
4647
+ }
4648
+ this.loadMarkConfig();
4649
+ }
4650
+ }
4651
+ MarkConfigComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MarkConfigComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4652
+ MarkConfigComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MarkConfigComponent, selector: "rs-mark-config", inputs: { tenant: "tenant", templateClassName: "templateClassName", templateOid: "templateOid", instanceClassName: "instanceClassName", filterCategories: "filterCategories", mark: "mark", marks: "marks" }, viewQueries: [{ propertyName: "markItemConfigRef", first: true, predicate: ["markItemConfigRef"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div class=\"dx-field\">\n <div class=\"dx-field-label\">\n <span>\u4E66\u7B7E\u6807\u8BC6</span>\n <span class=\"required-mark\">&nbsp;*</span>\n </div>\n <div class=\"dx-field-value\">\n <dx-text-box [(value)]=\"mark.name\" [readOnly]=\"true\">\n <dx-validator>\n <dxi-validation-rule type=\"required\" message=\"\u503C\u4E0D\u80FD\u4E3A\u7A7A\"></dxi-validation-rule>\n </dx-validator>\n </dx-text-box>\n </div>\n</div>\n<div class=\"dx-field\">\n <div class=\"dx-field-label\">\n <span>\u4E66\u7B7E\u540D\u79F0</span>\n </div>\n <div class=\"dx-field-value\">\n <dx-text-box [(value)]=\"mark.display\"></dx-text-box>\n </div>\n</div>\n<div class=\"dx-field\">\n <div class=\"dx-field-label\">\n <span>\u7EC4\u4EF6\u7C7B\u578B</span>\n <span class=\"required-mark\">&nbsp;*</span>\n </div>\n <div class=\"dx-field-value\">\n <dx-select-box [dataSource]=\"markTypes\"\n valueExpr=\"name\"\n displayExpr=\"caption\"\n [(value)]=\"mark.type\"\n (onSelectionChanged)=\"changeMarkType()\">\n <dx-validator>\n <dxi-validation-rule type=\"required\" message=\"\u503C\u4E0D\u80FD\u4E3A\u7A7A\"></dxi-validation-rule>\n </dx-validator>\n </dx-select-box>\n </div>\n</div>\n<ng-container #markItemConfigRef></ng-container>\n", styles: [":host .dx-field{margin-bottom:8px;display:flex;flex-flow:row nowrap}:host .dx-field .dx-field-label{flex:0 0 80px}:host .dx-field .dx-field-value{flex:1}\n"], dependencies: [{ kind: "component", type: i6.DxiValidationRuleComponent, selector: "dxi-validation-rule", inputs: ["message", "trim", "type", "ignoreEmptyValue", "max", "min", "reevaluate", "validationCallback", "comparisonTarget", "comparisonType", "pattern"] }, { kind: "component", type: i2$4.DxSelectBoxComponent, selector: "dx-select-box", inputs: ["acceptCustomValue", "accessKey", "activeStateEnabled", "buttons", "customItemCreateEvent", "dataSource", "deferRendering", "disabled", "displayExpr", "displayValue", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "fieldTemplate", "focusStateEnabled", "grouped", "groupTemplate", "height", "hint", "hoverStateEnabled", "inputAttr", "isDirty", "isValid", "items", "itemTemplate", "label", "labelMode", "maxLength", "minSearchLength", "name", "noDataText", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchEnabled", "searchExpr", "searchMode", "searchTimeout", "selectedItem", "showClearButton", "showDataBeforeSearch", "showDropDownButton", "showSelectionControls", "spellcheck", "stylingMode", "tabIndex", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCustomItemCreating", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onSelectionChanged", "onValueChanged", "acceptCustomValueChange", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "customItemCreateEventChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayExprChange", "displayValueChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "fieldTemplateChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isDirtyChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxLengthChange", "minSearchLengthChange", "nameChange", "noDataTextChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectedItemChange", "showClearButtonChange", "showDataBeforeSearchChange", "showDropDownButtonChange", "showSelectionControlsChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }, { kind: "component", type: i7.DxTextBoxComponent, selector: "dx-text-box", inputs: ["accessKey", "activeStateEnabled", "buttons", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "inputAttr", "isDirty", "isValid", "label", "labelMode", "mask", "maskChar", "maskInvalidMessage", "maskRules", "maxLength", "mode", "name", "placeholder", "readOnly", "rtlEnabled", "showClearButton", "showMaskMode", "spellcheck", "stylingMode", "tabIndex", "text", "useMaskedValue", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "visible", "width"], outputs: ["onChange", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onKeyDown", "onKeyUp", "onOptionChanged", "onPaste", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isDirtyChange", "isValidChange", "labelChange", "labelModeChange", "maskChange", "maskCharChange", "maskInvalidMessageChange", "maskRulesChange", "maxLengthChange", "modeChange", "nameChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "showClearButtonChange", "showMaskModeChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useMaskedValueChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "visibleChange", "widthChange", "onBlur"] }, { kind: "component", type: i8.DxValidatorComponent, selector: "dx-validator", inputs: ["adapter", "elementAttr", "height", "name", "validationGroup", "validationRules", "width"], outputs: ["onDisposing", "onInitialized", "onOptionChanged", "onValidated", "adapterChange", "elementAttrChange", "heightChange", "nameChange", "validationGroupChange", "validationRulesChange", "widthChange"] }] });
4653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MarkConfigComponent, decorators: [{
4654
+ type: Component,
4655
+ args: [{ selector: 'rs-mark-config', template: "<div class=\"dx-field\">\n <div class=\"dx-field-label\">\n <span>\u4E66\u7B7E\u6807\u8BC6</span>\n <span class=\"required-mark\">&nbsp;*</span>\n </div>\n <div class=\"dx-field-value\">\n <dx-text-box [(value)]=\"mark.name\" [readOnly]=\"true\">\n <dx-validator>\n <dxi-validation-rule type=\"required\" message=\"\u503C\u4E0D\u80FD\u4E3A\u7A7A\"></dxi-validation-rule>\n </dx-validator>\n </dx-text-box>\n </div>\n</div>\n<div class=\"dx-field\">\n <div class=\"dx-field-label\">\n <span>\u4E66\u7B7E\u540D\u79F0</span>\n </div>\n <div class=\"dx-field-value\">\n <dx-text-box [(value)]=\"mark.display\"></dx-text-box>\n </div>\n</div>\n<div class=\"dx-field\">\n <div class=\"dx-field-label\">\n <span>\u7EC4\u4EF6\u7C7B\u578B</span>\n <span class=\"required-mark\">&nbsp;*</span>\n </div>\n <div class=\"dx-field-value\">\n <dx-select-box [dataSource]=\"markTypes\"\n valueExpr=\"name\"\n displayExpr=\"caption\"\n [(value)]=\"mark.type\"\n (onSelectionChanged)=\"changeMarkType()\">\n <dx-validator>\n <dxi-validation-rule type=\"required\" message=\"\u503C\u4E0D\u80FD\u4E3A\u7A7A\"></dxi-validation-rule>\n </dx-validator>\n </dx-select-box>\n </div>\n</div>\n<ng-container #markItemConfigRef></ng-container>\n", styles: [":host .dx-field{margin-bottom:8px;display:flex;flex-flow:row nowrap}:host .dx-field .dx-field-label{flex:0 0 80px}:host .dx-field .dx-field-value{flex:1}\n"] }]
4656
+ }], propDecorators: { tenant: [{
4657
+ type: Input
4658
+ }], templateClassName: [{
4659
+ type: Input
4660
+ }], templateOid: [{
4661
+ type: Input
4662
+ }], instanceClassName: [{
4663
+ type: Input
4664
+ }], filterCategories: [{
4665
+ type: Input
4666
+ }], mark: [{
4667
+ type: Input
4668
+ }], marks: [{
4669
+ type: Input
4670
+ }], markItemConfigRef: [{
4671
+ type: ViewChild,
4672
+ args: ['markItemConfigRef', { static: true, read: ViewContainerRef }]
4673
+ }] } });
4674
+
4675
+ class WordDesignerComponent {
4676
+ handleKeyDown($event) {
4677
+ switch ($event.code) {
4678
+ case 'ArrowUp':
4679
+ if ($event.altKey) {
4680
+ this.service.switchMark(-1);
4681
+ }
4682
+ break;
4683
+ case 'ArrowDown':
4684
+ if ($event.altKey) {
4685
+ this.service.switchMark(1);
4686
+ }
4687
+ break;
4688
+ case 'KeyC':
4689
+ if ($event.ctrlKey) {
4690
+ const selection = window.getSelection();
4691
+ if (selection?.toString()) {
4692
+ return;
4693
+ }
4694
+ this.copyMarkConfig();
4695
+ }
4696
+ break;
4697
+ case 'KeyV':
4698
+ if ($event.ctrlKey) {
4699
+ this.pasteMarkConfig();
4700
+ }
4701
+ break;
4702
+ case 'Escape':
4703
+ this.exitPasteMode();
4704
+ break;
4705
+ }
4706
+ if (this.mouseInViewer && $event.ctrlKey && $event.key === '0') {
4707
+ $event.preventDefault();
4708
+ this.scale(0);
4709
+ }
4710
+ }
4711
+ constructor(service, wordDesignerService, viewContainerRef, modalService) {
4712
+ this.service = service;
4713
+ this.wordDesignerService = wordDesignerService;
4714
+ this.viewContainerRef = viewContainerRef;
4715
+ this.modalService = modalService;
4716
+ this.needUpload = false;
4717
+ this.pasteMode = false;
4718
+ this.mouseInViewer = false;
4719
+ this.loading = false;
4720
+ this.retainMarkConfig = false;
4721
+ }
4722
+ ngOnInit() {
4723
+ this.service.tenant = this.tenant;
4724
+ this.service.templateClassName = this.className;
4725
+ this.service.templateOid = this.oid;
4726
+ this.service.instanceClassName = this.instanceClassName;
4727
+ this.service.params = this.params;
4728
+ this.service.tabViewContainerRef = this.tabViewContainerRef;
4729
+ this.loading = true;
4730
+ this.wordDesignerService.loadTemplate(this.tenant, this.className, this.oid).subscribe(response => {
4731
+ this.loadTemplateAndConfig(response);
4732
+ this.loading = false;
4733
+ });
4734
+ }
4735
+ loadTemplateAndConfig(response) {
4736
+ this.sections = response.sections || [];
4737
+ if (this.sections.length === 0) {
4738
+ this.needUpload = true;
4739
+ this.loading = false;
4740
+ return;
4741
+ }
4742
+ this.needUpload = false;
4743
+ this.service.marks = response.marks.map((mark) => {
4744
+ mark.config = mark.config || {};
4745
+ return mark;
4746
+ });
4747
+ if (this.service.marks.length > 0) {
4748
+ this.service.activeMark = this.service.marks[0];
4749
+ }
4750
+ }
4751
+ scaleByMouse($event) {
4752
+ if ($event.ctrlKey) {
4753
+ $event.preventDefault();
4754
+ this.scale($event.deltaY < 0 ? 0.1 : -0.1);
4755
+ }
4756
+ }
4757
+ scale(type) {
4758
+ if (type === 0) {
4759
+ this.service.scale = 1;
4760
+ }
4761
+ else {
4762
+ this.service.scale += type;
4763
+ }
4764
+ }
4765
+ upload() {
4766
+ this.loading = true;
4767
+ this.wordDesignerService.uploadTemplateFile(this.tenant, this.className, this.oid, this.retainMarkConfig, this.uploadInput.nativeElement.files[0]).subscribe(response => {
4768
+ this.uploadInput.nativeElement.value = '';
4769
+ this.loadTemplateAndConfig(response);
4770
+ this.loading = false;
4771
+ });
4772
+ }
4773
+ openReplaceTemplateFileModal() {
4774
+ this.replaceFileModal = this.modalService.open(this.tabViewContainerRef, '替换文件', 'default', this.replaceFileModalTemplate, {});
4775
+ }
4776
+ replaceTemplateFile(retainMarkConfig) {
4777
+ this.retainMarkConfig = retainMarkConfig;
4778
+ this.uploadInput.nativeElement.click();
4779
+ this.replaceFileModal?.hide();
4780
+ }
4781
+ downloadTemplateFile() {
4782
+ this.loading = true;
4783
+ this.wordDesignerService.downloadTemplateFile(this.tenant, this.className, this.oid, () => {
4784
+ this.loading = false;
4785
+ });
4786
+ }
4787
+ preview() {
4788
+ for (let mark of this.service.marks) {
4789
+ mark.value = undefined;
4790
+ }
4791
+ this.previewModal = this.modalService.open(this.tabViewContainerRef, '预览', 'full', this.previewTemplate, {}, this.previewFooterTemplate);
4792
+ }
4793
+ saveConfig() {
4794
+ this.loading = true;
4795
+ this.service.marks.map(mark => {
4796
+ delete mark.value;
4797
+ });
4798
+ this.wordDesignerService.save(this.tenant, this.className, this.oid, {
4799
+ templateConfig: JSON.stringify({
4800
+ sections: this.sections,
4801
+ marks: this.service.marks
4802
+ })
4803
+ }).subscribe(response => {
4804
+ if (response.success) {
4805
+ notifySuccess('保存成功');
4806
+ this.loading = false;
4807
+ }
4808
+ });
4809
+ }
4810
+ copyMarkConfig() {
4811
+ this.service.copiedMark = deepClone(this.service.activeMark);
4812
+ this.pasteMode = true;
4813
+ }
4814
+ exitPasteMode() {
4815
+ this.service.copiedMark = {};
4816
+ this.service.readyPasteMarkNames = [];
4817
+ this.service.lastClickToPasteMarkName = '';
4818
+ this.pasteMode = false;
4819
+ }
4820
+ pasteMarkConfig() {
4821
+ let readyPasteMark;
4822
+ for (let readyPasteMarkName of this.service.readyPasteMarkNames) {
4823
+ readyPasteMark = this.service.getMark(readyPasteMarkName);
4824
+ const display = readyPasteMark.display;
4825
+ Object.assign(readyPasteMark, deepClone(this.service.copiedMark));
4826
+ readyPasteMark.name = readyPasteMarkName;
4827
+ readyPasteMark.display = display;
4828
+ }
4829
+ this.service.activeMark = readyPasteMark || this.service.activeMark;
4830
+ this.exitPasteMode();
4831
+ }
4832
+ }
4833
+ WordDesignerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerComponent, deps: [{ token: SectionService }, { token: WordDesignerService }, { token: i0.ViewContainerRef }, { token: ModalService }], target: i0.ɵɵFactoryTarget.Component });
4834
+ WordDesignerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: WordDesignerComponent, selector: "rs-word-designer", inputs: { tenant: "tenant", className: "className", oid: "oid", instanceClassName: "instanceClassName", filterCategories: "filterCategories", params: "params", tabViewContainerRef: "tabViewContainerRef" }, host: { listeners: { "window:keydown": "handleKeyDown($event)" } }, providers: [WordDesignerService], viewQueries: [{ propertyName: "uploadInput", first: true, predicate: ["uploadInput"], descendants: true, static: true }, { propertyName: "replaceFileModalTemplate", first: true, predicate: ["replaceFileModalTemplate"], descendants: true, static: true }, { propertyName: "previewTemplate", first: true, predicate: ["previewTemplate"], descendants: true, static: true }, { propertyName: "previewFooterTemplate", first: true, predicate: ["previewFooterTemplate"], descendants: true, static: true }], ngImport: i0, template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\" [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<input #uploadInput type=\"file\" name=\"file\"\n accept=\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" (change)=\"upload()\"\n style=\"display: none;\"/>\n<div class=\"coast-card\">\n <div class=\"coast-card-content\">\n <div class=\"content-main\" [class.show-upload-btn]=\"needUpload\">\n <ng-container *ngIf=\"needUpload\">\n <dx-button type=\"success\" text=\"\u4E0A\u4F20\u6587\u4EF6\" (onClick)=\"uploadInput.click()\"></dx-button>\n </ng-container>\n <div *ngIf=\"!needUpload\" class=\"left-panel\">\n <div *ngIf=\"pasteMode\" class=\"paste-mode-bar\">\n <span\n class=\"message\">\u5DF2\u8FDB\u5165\u6279\u91CF\u7C98\u8D34\u914D\u7F6E\u6A21\u5F0F\uFF0C\u652F\u6301Ctrl\u3001Shift\u952E\u5FEB\u6377\u9009\u62E9\uFF0C\u6309Ctrl+V\u7EC4\u5408\u952E\u7C98\u8D34\u914D\u7F6E\uFF0C\u6309Esc\u952E\u53D6\u6D88\u64CD\u4F5C\u5E76\u9000\u51FA\u8BE5\u6A21\u5F0F</span>\n <dx-button [width]=\"48\" text=\"\u9000\u51FA\" (onClick)=\"exitPasteMode()\"></dx-button>\n </div>\n <div class=\"content\"\n (mouseenter)=\"mouseInViewer = true;\"\n (mouseleave)=\"mouseInViewer = false;\"\n (mousewheel)=\"scaleByMouse($event)\">\n <div *ngIf=\"!needUpload\" class=\"viewer\">\n <ng-container *ngFor=\"let section of sections\">\n <rs-section [section]=\"section\" [editMode]=\"true\" [pasteMode]=\"pasteMode\"></rs-section>\n </ng-container>\n </div>\n </div>\n </div>\n <div *ngIf=\"!needUpload\" class=\"right-panel\">\n <div class=\"header\">\n <dx-button type=\"default\" text=\"\u66FF\u6362\u6587\u4EF6\" (onClick)=\"openReplaceTemplateFileModal()\"\n [disabled]=\"loading\"></dx-button>\n <dx-button icon=\"coast-icon coast-icon-download\" hint=\"\u4E0B\u8F7D\u6587\u4EF6\"\n (onClick)=\"downloadTemplateFile()\" [disabled]=\"loading\"></dx-button>\n <dx-button icon=\"coast-icon coast-icon-direction-up\" hint=\"\u4E0A\u4E00\u4E2A(Alt + \u2191)\"\n (onClick)=\"service.switchMark(-1)\" [disabled]=\"loading\"></dx-button>\n <dx-button icon=\"coast-icon coast-icon-direction-down\" hint=\"\u4E0B\u4E00\u4E2A(Alt + \u2193)\"\n (onClick)=\"service.switchMark(1)\" [disabled]=\"loading\"></dx-button>\n <dx-button [type]=\"pasteMode ? 'success' : 'default'\" text=\"\u590D\u5236\" hint=\"\u590D\u5236(Ctrl + c)\"\n (onClick)=\"copyMarkConfig()\"></dx-button>\n <dx-button type=\"danger\" text=\"\u7C98\u8D34\" hint=\"\u7C98\u8D34(Ctrl + v)\" (onClick)=\"pasteMarkConfig()\"\n [disabled]=\"loading || !pasteMode\"></dx-button>\n </div>\n <div class=\"config\" *ngIf=\"service.activeMark\">\n <rs-mark-config [tenant]=\"tenant\"\n [templateClassName]=\"className\"\n [templateOid]=\"oid\"\n [instanceClassName]=\"instanceClassName\"\n [filterCategories]=\"filterCategories\"\n [mark]=\"service.activeMark\"\n [marks]=\"service.marks\"></rs-mark-config>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"!needUpload\" class=\"footer\">\n <div class=\"left\">\n <dx-button text=\"\u653E\u5927\" (onClick)=\"scale(0.1)\"></dx-button>\n <dx-button text=\"\u8FD8\u539F\" (onClick)=\"scale(0)\"></dx-button>\n <dx-button text=\"\u7F29\u5C0F\" (onClick)=\"scale(-0.1)\"></dx-button>\n </div>\n <div class=\"right\">\n <dx-button type=\"default\" text=\"\u9884\u89C8\" (onClick)=\"preview()\" [disabled]=\"needUpload || loading\"></dx-button>\n <dx-button type=\"success\" text=\"\u4FDD\u5B58\" (onClick)=\"saveConfig()\" [disabled]=\"needUpload || loading\"></dx-button>\n </div>\n </div>\n</div>\n<ng-template #replaceFileModalTemplate>\n <div class=\"confirm-message\">\n <span>\u66FF\u6362\u6587\u4EF6\u53EF\u4EE5\u6309\u7167\u4E66\u7B7E\u6807\u8BC6\u7EE7\u627F\u5DF2\u4FDD\u5B58\u7684\u4E66\u7B7E\u914D\u7F6E\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C\uFF1A</span>\n </div>\n <div class=\"form-buttons\">\n <div class=\"buttons-wrapper\">\n <dx-button type=\"default\" text=\"\u7EE7\u627F\u914D\u7F6E\" (onClick)=\"replaceTemplateFile(true)\"></dx-button>\n <dx-button type=\"danger\" text=\"\u6E05\u9664\u914D\u7F6E\" (onClick)=\"replaceTemplateFile(false)\"></dx-button>\n <dx-button type=\"normal\" text=\"\u53D6\u6D88\" (onClick)=\"replaceFileModal?.hide()\"></dx-button>\n </div>\n </div>\n</ng-template>\n<ng-template #previewTemplate>\n <div class=\"preview-viewer\">\n <div class=\"viewer-container\">\n <div class=\"viewer\">\n <ng-container *ngFor=\"let section of sections\">\n <rs-section [section]=\"section\"></rs-section>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-template>\n<ng-template #previewFooterTemplate>\n <div class=\"form-buttons\">\n <div class=\"buttons-wrapper\">\n <dx-button type=\"normal\" text=\"\u5173\u95ED\" (onClick)=\"previewModal?.hide()\"></dx-button>\n </div>\n </div>\n</ng-template>\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap}:host .coast-card{flex:1;padding:0}:host .coast-card .content-main{display:flex;flex-flow:row nowrap;padding:16px 0 0 16px;margin:0}:host .coast-card .content-main.show-upload-btn{padding:16px;background-color:var(--coast-empty-color, rgb(229, 229, 229));align-items:center;justify-content:center}:host .coast-card .content-main .left-panel{flex:auto;width:0;overflow-x:auto;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}:host .coast-card .content-main .left-panel .paste-mode-bar{flex:none;padding:8px;background-color:var(--coast-base-bg-color, rgb(255, 255, 255));border:1px solid var(--coast-border-color, rgb(221, 221, 221));display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center}:host .coast-card .content-main .left-panel .paste-mode-bar .message{font-weight:700}:host .coast-card .content-main .left-panel .content{flex:auto;height:0;overflow-y:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}:host .coast-card .content-main .left-panel .content .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index:0}:host .coast-card .content-main .right-panel{flex:0 0 320px;display:flex;flex-flow:column nowrap;border-left:1px solid var(--coast-border-color, rgb(221, 221, 221))}:host .coast-card .content-main .right-panel .header{flex:none;border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221));padding:0 16px 16px}:host .coast-card .content-main .right-panel .header>dx-button:not(:last-child){margin-right:8px}:host .coast-card .content-main .right-panel .config{flex:auto;height:0;overflow:auto;padding:24px;display:flex;flex-flow:column nowrap}:host .coast-card .footer{flex:none;border-top:1px solid var(--coast-border-color, rgb(221, 221, 221));padding:12px 24px;display:flex;flex-flow:row nowrap;justify-content:space-between}:host .coast-card .footer dx-button{width:80px}:host .coast-card .footer dx-button:not(:last-child){margin-right:8px}.confirm-message{padding:24px;margin-bottom:12px;border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221))}.confirm-message span{font-size:14px}.preview-viewer{flex:auto;height:0;overflow-y:auto;margin:0 16px;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}.preview-viewer .viewer-container{flex:auto;height:0;overflow-x:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}.preview-viewer .viewer-container .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index: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: SectionComponent, selector: "rs-section", inputs: ["section", "editMode", "pasteMode", "readonly"] }, { kind: "component", type: MarkConfigComponent, selector: "rs-mark-config", inputs: ["tenant", "templateClassName", "templateOid", "instanceClassName", "filterCategories", "mark", "marks"] }] });
4835
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerComponent, decorators: [{
4836
+ type: Component,
4837
+ args: [{ selector: 'rs-word-designer', providers: [WordDesignerService], template: "<dx-load-panel [container]=\"viewContainerRef.element.nativeElement\" [showPane]=\"false\" [visible]=\"loading\">\n <dxo-position [of]=\"viewContainerRef.element.nativeElement\"></dxo-position>\n</dx-load-panel>\n<input #uploadInput type=\"file\" name=\"file\"\n accept=\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\" (change)=\"upload()\"\n style=\"display: none;\"/>\n<div class=\"coast-card\">\n <div class=\"coast-card-content\">\n <div class=\"content-main\" [class.show-upload-btn]=\"needUpload\">\n <ng-container *ngIf=\"needUpload\">\n <dx-button type=\"success\" text=\"\u4E0A\u4F20\u6587\u4EF6\" (onClick)=\"uploadInput.click()\"></dx-button>\n </ng-container>\n <div *ngIf=\"!needUpload\" class=\"left-panel\">\n <div *ngIf=\"pasteMode\" class=\"paste-mode-bar\">\n <span\n class=\"message\">\u5DF2\u8FDB\u5165\u6279\u91CF\u7C98\u8D34\u914D\u7F6E\u6A21\u5F0F\uFF0C\u652F\u6301Ctrl\u3001Shift\u952E\u5FEB\u6377\u9009\u62E9\uFF0C\u6309Ctrl+V\u7EC4\u5408\u952E\u7C98\u8D34\u914D\u7F6E\uFF0C\u6309Esc\u952E\u53D6\u6D88\u64CD\u4F5C\u5E76\u9000\u51FA\u8BE5\u6A21\u5F0F</span>\n <dx-button [width]=\"48\" text=\"\u9000\u51FA\" (onClick)=\"exitPasteMode()\"></dx-button>\n </div>\n <div class=\"content\"\n (mouseenter)=\"mouseInViewer = true;\"\n (mouseleave)=\"mouseInViewer = false;\"\n (mousewheel)=\"scaleByMouse($event)\">\n <div *ngIf=\"!needUpload\" class=\"viewer\">\n <ng-container *ngFor=\"let section of sections\">\n <rs-section [section]=\"section\" [editMode]=\"true\" [pasteMode]=\"pasteMode\"></rs-section>\n </ng-container>\n </div>\n </div>\n </div>\n <div *ngIf=\"!needUpload\" class=\"right-panel\">\n <div class=\"header\">\n <dx-button type=\"default\" text=\"\u66FF\u6362\u6587\u4EF6\" (onClick)=\"openReplaceTemplateFileModal()\"\n [disabled]=\"loading\"></dx-button>\n <dx-button icon=\"coast-icon coast-icon-download\" hint=\"\u4E0B\u8F7D\u6587\u4EF6\"\n (onClick)=\"downloadTemplateFile()\" [disabled]=\"loading\"></dx-button>\n <dx-button icon=\"coast-icon coast-icon-direction-up\" hint=\"\u4E0A\u4E00\u4E2A(Alt + \u2191)\"\n (onClick)=\"service.switchMark(-1)\" [disabled]=\"loading\"></dx-button>\n <dx-button icon=\"coast-icon coast-icon-direction-down\" hint=\"\u4E0B\u4E00\u4E2A(Alt + \u2193)\"\n (onClick)=\"service.switchMark(1)\" [disabled]=\"loading\"></dx-button>\n <dx-button [type]=\"pasteMode ? 'success' : 'default'\" text=\"\u590D\u5236\" hint=\"\u590D\u5236(Ctrl + c)\"\n (onClick)=\"copyMarkConfig()\"></dx-button>\n <dx-button type=\"danger\" text=\"\u7C98\u8D34\" hint=\"\u7C98\u8D34(Ctrl + v)\" (onClick)=\"pasteMarkConfig()\"\n [disabled]=\"loading || !pasteMode\"></dx-button>\n </div>\n <div class=\"config\" *ngIf=\"service.activeMark\">\n <rs-mark-config [tenant]=\"tenant\"\n [templateClassName]=\"className\"\n [templateOid]=\"oid\"\n [instanceClassName]=\"instanceClassName\"\n [filterCategories]=\"filterCategories\"\n [mark]=\"service.activeMark\"\n [marks]=\"service.marks\"></rs-mark-config>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"!needUpload\" class=\"footer\">\n <div class=\"left\">\n <dx-button text=\"\u653E\u5927\" (onClick)=\"scale(0.1)\"></dx-button>\n <dx-button text=\"\u8FD8\u539F\" (onClick)=\"scale(0)\"></dx-button>\n <dx-button text=\"\u7F29\u5C0F\" (onClick)=\"scale(-0.1)\"></dx-button>\n </div>\n <div class=\"right\">\n <dx-button type=\"default\" text=\"\u9884\u89C8\" (onClick)=\"preview()\" [disabled]=\"needUpload || loading\"></dx-button>\n <dx-button type=\"success\" text=\"\u4FDD\u5B58\" (onClick)=\"saveConfig()\" [disabled]=\"needUpload || loading\"></dx-button>\n </div>\n </div>\n</div>\n<ng-template #replaceFileModalTemplate>\n <div class=\"confirm-message\">\n <span>\u66FF\u6362\u6587\u4EF6\u53EF\u4EE5\u6309\u7167\u4E66\u7B7E\u6807\u8BC6\u7EE7\u627F\u5DF2\u4FDD\u5B58\u7684\u4E66\u7B7E\u914D\u7F6E\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C\uFF1A</span>\n </div>\n <div class=\"form-buttons\">\n <div class=\"buttons-wrapper\">\n <dx-button type=\"default\" text=\"\u7EE7\u627F\u914D\u7F6E\" (onClick)=\"replaceTemplateFile(true)\"></dx-button>\n <dx-button type=\"danger\" text=\"\u6E05\u9664\u914D\u7F6E\" (onClick)=\"replaceTemplateFile(false)\"></dx-button>\n <dx-button type=\"normal\" text=\"\u53D6\u6D88\" (onClick)=\"replaceFileModal?.hide()\"></dx-button>\n </div>\n </div>\n</ng-template>\n<ng-template #previewTemplate>\n <div class=\"preview-viewer\">\n <div class=\"viewer-container\">\n <div class=\"viewer\">\n <ng-container *ngFor=\"let section of sections\">\n <rs-section [section]=\"section\"></rs-section>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-template>\n<ng-template #previewFooterTemplate>\n <div class=\"form-buttons\">\n <div class=\"buttons-wrapper\">\n <dx-button type=\"normal\" text=\"\u5173\u95ED\" (onClick)=\"previewModal?.hide()\"></dx-button>\n </div>\n </div>\n</ng-template>\n", styles: [":host{flex:1;display:flex;flex-flow:column nowrap}:host .coast-card{flex:1;padding:0}:host .coast-card .content-main{display:flex;flex-flow:row nowrap;padding:16px 0 0 16px;margin:0}:host .coast-card .content-main.show-upload-btn{padding:16px;background-color:var(--coast-empty-color, rgb(229, 229, 229));align-items:center;justify-content:center}:host .coast-card .content-main .left-panel{flex:auto;width:0;overflow-x:auto;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}:host .coast-card .content-main .left-panel .paste-mode-bar{flex:none;padding:8px;background-color:var(--coast-base-bg-color, rgb(255, 255, 255));border:1px solid var(--coast-border-color, rgb(221, 221, 221));display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center}:host .coast-card .content-main .left-panel .paste-mode-bar .message{font-weight:700}:host .coast-card .content-main .left-panel .content{flex:auto;height:0;overflow-y:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}:host .coast-card .content-main .left-panel .content .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index:0}:host .coast-card .content-main .right-panel{flex:0 0 320px;display:flex;flex-flow:column nowrap;border-left:1px solid var(--coast-border-color, rgb(221, 221, 221))}:host .coast-card .content-main .right-panel .header{flex:none;border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221));padding:0 16px 16px}:host .coast-card .content-main .right-panel .header>dx-button:not(:last-child){margin-right:8px}:host .coast-card .content-main .right-panel .config{flex:auto;height:0;overflow:auto;padding:24px;display:flex;flex-flow:column nowrap}:host .coast-card .footer{flex:none;border-top:1px solid var(--coast-border-color, rgb(221, 221, 221));padding:12px 24px;display:flex;flex-flow:row nowrap;justify-content:space-between}:host .coast-card .footer dx-button{width:80px}:host .coast-card .footer dx-button:not(:last-child){margin-right:8px}.confirm-message{padding:24px;margin-bottom:12px;border-bottom:1px solid var(--coast-border-color, rgb(221, 221, 221))}.confirm-message span{font-size:14px}.preview-viewer{flex:auto;height:0;overflow-y:auto;margin:0 16px;background-color:var(--coast-empty-color, rgb(229, 229, 229));display:flex;flex-flow:column nowrap}.preview-viewer .viewer-container{flex:auto;height:0;overflow-x:auto;padding:8px 16px 0;display:flex;flex-flow:row nowrap}.preview-viewer .viewer-container .viewer{margin:auto;display:flex;flex-flow:column nowrap;align-items:center;z-index:0}\n"] }]
4838
+ }], ctorParameters: function () { return [{ type: SectionService }, { type: WordDesignerService }, { type: i0.ViewContainerRef }, { type: ModalService }]; }, propDecorators: { tenant: [{
4839
+ type: Input
4840
+ }], className: [{
4841
+ type: Input
4842
+ }], oid: [{
4843
+ type: Input
4844
+ }], instanceClassName: [{
4845
+ type: Input
4846
+ }], filterCategories: [{
4847
+ type: Input
4848
+ }], params: [{
4849
+ type: Input
4850
+ }], tabViewContainerRef: [{
4851
+ type: Input
4852
+ }], uploadInput: [{
4853
+ type: ViewChild,
4854
+ args: ['uploadInput', { static: true }]
4855
+ }], replaceFileModalTemplate: [{
4856
+ type: ViewChild,
4857
+ args: ['replaceFileModalTemplate', { static: true }]
4858
+ }], previewTemplate: [{
4859
+ type: ViewChild,
4860
+ args: ['previewTemplate', { static: true }]
4861
+ }], previewFooterTemplate: [{
4862
+ type: ViewChild,
4863
+ args: ['previewFooterTemplate', { static: true }]
4864
+ }], handleKeyDown: [{
4865
+ type: HostListener,
4866
+ args: ['window:keydown', ['$event']]
4867
+ }] } });
4868
+
4869
+ class WordDesignerModule {
4870
+ }
4871
+ WordDesignerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4872
+ WordDesignerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerModule, declarations: [WordDesignerComponent,
4873
+ MarkConfigComponent], imports: [CommonModule,
4874
+ DevExtremeModule,
4875
+ SectionModule], exports: [WordDesignerComponent] });
4876
+ WordDesignerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerModule, imports: [CommonModule,
4877
+ DevExtremeModule,
4878
+ SectionModule] });
4879
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordDesignerModule, decorators: [{
4880
+ type: NgModule,
4881
+ args: [{
4882
+ declarations: [
4883
+ WordDesignerComponent,
4884
+ MarkConfigComponent
4885
+ ],
4886
+ imports: [
4887
+ CommonModule,
4888
+ DevExtremeModule,
4889
+ SectionModule
4890
+ ],
4891
+ exports: [
4892
+ WordDesignerComponent
4893
+ ]
4894
+ }]
4895
+ }] });
4896
+
4897
+ class WordEditorService {
4898
+ constructor(http) {
4899
+ this.http = http;
4900
+ }
4901
+ loadTemplate(tenant, className, oid) {
4902
+ return this.http.get('api/data/' + className + '/' + oid, {
4903
+ params: {
4904
+ tenant
4905
+ }
4906
+ }).pipe(map(response => {
4907
+ if (response.data?.templateConfig) {
4908
+ return JSON.parse(response.data.templateConfig);
4909
+ }
4910
+ return {};
4911
+ }));
4912
+ }
4913
+ save(tenant, className, oid, model) {
4914
+ return this.http.post('api/data/' + className + '/' + oid, model, {
4915
+ params: {
4916
+ tenant
4917
+ }
4918
+ });
4919
+ }
4920
+ reloadTemplate(tenant, className, oid, templateClassName) {
4921
+ return this.http.get('api/data/custom', {
4922
+ params: {
4923
+ executor: 'com.cs.system.word.editor.ReloadTemplate',
4924
+ tenant,
4925
+ className,
4926
+ oid,
4927
+ templateClassName
4928
+ }
4929
+ });
4930
+ }
4931
+ pullData(tenant, className, oid, marks) {
4932
+ return this.http.post('api/data/custom', marks, {
4933
+ params: {
4934
+ executor: 'com.cs.system.word.editor.PullData',
4935
+ tenant,
4936
+ className,
4937
+ oid
4938
+ }
4939
+ });
4940
+ }
4941
+ generateFile(tenant, className, oid, generateFileAttribute, generateFileName, model) {
4942
+ return this.http.post('api/data/custom', model, {
4943
+ params: {
4944
+ executor: 'com.cs.system.word.editor.GenerateFile',
4945
+ tenant,
4946
+ className,
4947
+ oid,
4948
+ generateFileAttribute,
4949
+ generateFileName
4950
+ }
4951
+ });
4952
+ }
4953
+ }
4954
+ WordEditorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorService, deps: [{ token: i1$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
4955
+ WordEditorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorService });
4956
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorService, decorators: [{
4957
+ type: Injectable
4958
+ }], ctorParameters: function () { return [{ type: i1$1.HttpClient }]; } });
4959
+
4960
+ class WordEditorComponent {
4961
+ constructor(service, wordEditorService, viewContainerRef) {
4962
+ this.service = service;
4963
+ this.wordEditorService = wordEditorService;
4964
+ this.viewContainerRef = viewContainerRef;
4965
+ this.showPullTemplateButton = true;
4966
+ this.showPullDataButton = true;
4967
+ this.showCalcButton = true;
4968
+ this.showValidateButton = true;
4969
+ this.showGenerateFileButton = true;
4970
+ this.showCloseButton = true;
4971
+ this.readonly = false;
4972
+ this.onSaved = new EventEmitter();
4973
+ this.onGenerated = new EventEmitter();
4974
+ this.onClosed = new EventEmitter();
4975
+ this.loading = false;
4976
+ }
4977
+ ngOnInit() {
4978
+ if (!this.oid) {
4979
+ return;
4980
+ }
4981
+ this.service.tenant = this.tenant;
4982
+ this.service.templateClassName = this.templateClassName;
4983
+ this.service.instanceClassName = this.className;
4984
+ this.service.instanceOid = this.oid;
4985
+ this.service.params = this.params;
4986
+ this.service.tabViewContainerRef = this.tabViewContainerRef;
4987
+ this.service.readonly = this.readonly;
4988
+ this.loading = true;
4989
+ this.wordEditorService.loadTemplate(this.tenant, this.className, this.oid).subscribe(response => {
4990
+ this.sections = response.sections || [];
4991
+ this.service.marks = response.marks;
4992
+ this.loading = false;
4993
+ });
4994
+ }
4995
+ pullTemplate() {
4996
+ if (confirm('该操作会清除已录入的数据,确定重新拉取模板配置?')) {
4997
+ this.loading = true;
4998
+ this.wordEditorService.reloadTemplate(this.tenant, this.className, this.oid, this.templateClassName).subscribe(response => {
4999
+ this.sections = response.data?.sections || [];
5000
+ this.service.marks = response.data.marks;
5001
+ this.loading = false;
5002
+ });
5003
+ }
5004
+ }
5005
+ pullData() {
5006
+ this.loading = true;
5007
+ this.wordEditorService.pullData(this.tenant, this.className, this.oid, {
5008
+ marks: JSON.stringify(this.service.marks)
5009
+ }).subscribe(response => {
5010
+ for (let mark of this.service.marks) {
5011
+ if (response.data.hasOwnProperty(mark.name)) {
5012
+ mark.value = response.data[mark.name];
5013
+ }
5014
+ }
5015
+ this.service.valueUpdated.emit();
5016
+ this.loading = false;
5017
+ notifySuccess('拉取完成');
5018
+ });
5019
+ }
5020
+ calc() {
5021
+ }
5022
+ validate() {
5023
+ validateGroup(this.validator).then();
5024
+ }
5025
+ save() {
5026
+ this.loading = true;
5027
+ this.wordEditorService.save(this.tenant, this.className, this.oid, {
5028
+ templateConfig: JSON.stringify({
5029
+ sections: this.sections,
5030
+ marks: this.service.marks
5031
+ })
5032
+ }).subscribe(response => {
5033
+ this.loading = false;
5034
+ if (response.success) {
5035
+ notifySuccess('保存成功');
5036
+ this.onSaved.emit();
5037
+ }
5038
+ });
5039
+ }
5040
+ generateFile() {
5041
+ this.loading = true;
5042
+ this.wordEditorService.generateFile(this.tenant, this.className, this.oid, this.generateFileAttribute || 'file', this.generateFileName || '', {
5043
+ templateConfig: JSON.stringify({
5044
+ sections: this.sections,
5045
+ marks: this.service.marks
5046
+ })
5047
+ }).subscribe(response => {
5048
+ this.loading = false;
5049
+ if (response.success) {
5050
+ notifySuccess('生成附件成功');
5051
+ this.onGenerated.emit();
5052
+ }
5053
+ });
5054
+ }
5055
+ }
5056
+ 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 });
5057
+ 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", params: "params", tabViewContainerRef: "tabViewContainerRef", showPullTemplateButton: "showPullTemplateButton", showPullDataButton: "showPullDataButton", showCalcButton: "showCalcButton", showValidateButton: "showValidateButton", showGenerateFileButton: "showGenerateFileButton", generateFileAttribute: "generateFileAttribute", generateFileName: "generateFileName", 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"] }] });
5058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorComponent, decorators: [{
5059
+ type: Component,
5060
+ 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"] }]
5061
+ }], ctorParameters: function () { return [{ type: SectionService }, { type: WordEditorService }, { type: i0.ViewContainerRef }]; }, propDecorators: { tenant: [{
5062
+ type: Input
5063
+ }], className: [{
5064
+ type: Input
5065
+ }], oid: [{
5066
+ type: Input
5067
+ }], templateClassName: [{
5068
+ type: Input
5069
+ }], params: [{
5070
+ type: Input
5071
+ }], tabViewContainerRef: [{
5072
+ type: Input
5073
+ }], showPullTemplateButton: [{
5074
+ type: Input
5075
+ }], showPullDataButton: [{
5076
+ type: Input
5077
+ }], showCalcButton: [{
5078
+ type: Input
5079
+ }], showValidateButton: [{
5080
+ type: Input
5081
+ }], showGenerateFileButton: [{
5082
+ type: Input
5083
+ }], generateFileAttribute: [{
5084
+ type: Input
5085
+ }], generateFileName: [{
5086
+ type: Input
5087
+ }], showCloseButton: [{
5088
+ type: Input
5089
+ }], readonly: [{
5090
+ type: Input
5091
+ }], onSaved: [{
5092
+ type: Output
5093
+ }], onGenerated: [{
5094
+ type: Output
5095
+ }], onClosed: [{
5096
+ type: Output
5097
+ }], validator: [{
5098
+ type: ViewChild,
5099
+ args: ['validator']
5100
+ }] } });
5101
+
5102
+ class WordEditorModule {
5103
+ }
5104
+ WordEditorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5105
+ WordEditorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: WordEditorModule, declarations: [WordEditorComponent], imports: [CommonModule,
5106
+ DevExtremeModule,
5107
+ SectionModule], exports: [WordEditorComponent] });
5108
+ WordEditorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorModule, imports: [CommonModule,
5109
+ DevExtremeModule,
5110
+ SectionModule] });
5111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: WordEditorModule, decorators: [{
5112
+ type: NgModule,
5113
+ args: [{
5114
+ declarations: [
5115
+ WordEditorComponent
5116
+ ],
5117
+ imports: [
5118
+ CommonModule,
5119
+ DevExtremeModule,
5120
+ SectionModule
5121
+ ],
5122
+ exports: [
5123
+ WordEditorComponent
5124
+ ]
5125
+ }]
5126
+ }] });
5127
+
4119
5128
  /**
4120
5129
  * Generated bundle index. Do not edit.
4121
5130
  */
4122
5131
 
4123
- export { BoxContainerComponent, BoxContainerModule, CamundaBpmnEditorComponent, CamundaBpmnEditorModule, CamundaBpmnViewerComponent, CamundaBpmnViewerModule, CellComponentBase, CellConfigBase, ChangeFilter, CodeEditorComponent, CodeEditorModule, CustomTemplateDirective, DataGridComponent, DataGridFactory, DataGridModule, DataGridService, DrawerComponent, DrawerModule, DrawerService, DxNativeElementPipe, DynamicParamsComponent, DynamicParamsModule, FieldSelectorComponent, FormComponent, FormItemComponentBase, FormItemConfigBase, FormModule, FormService, FullscreenDirective, IconSelectorComponent, IconSelectorModule, ItemConfigComponent, ItemStyleComponent, ModalComponent, ModalComponentBase, ModalConfigBase, ModalModule, ModalService, PageItemComponentBase, PageItemConfigBase, PdfViewerComponent, PluginManager, RowButtonsTemplateDirective, TooltipContentTemplateDirective, WebsocketModule, WebsocketService, addWatermark, deepClone, download_file, evaluateFilter, file_type_icon, filename_from_disposition, format_file_size, localeSortMethod, notify_error, notify_success, notify_warning, openBrowserTab, support_preview_ext, validate, validate_group, validate_group_by_name };
5132
+ export { BoxContainerComponent, BoxContainerModule, CamundaBpmnEditorComponent, CamundaBpmnEditorModule, CamundaBpmnViewerComponent, CamundaBpmnViewerModule, CellComponentBase, CellConfigBase, ChangeFilter, CodeEditorComponent, CodeEditorModule, CustomTemplateDirective, DataGridComponent, DataGridFactory, DataGridModule, DataGridService, DrawerComponent, DrawerModule, DrawerService, DxNativeElementPipe, DynamicParamsComponent, DynamicParamsModule, FieldSelectorComponent, FormComponent, FormItemComponentBase, FormItemConfigBase, FormModule, FormService, FullscreenDirective, IconSelectorComponent, IconSelectorModule, ItemConfigComponent, ItemStyleComponent, MarkItemComponentBase, MarkItemConfigBase, ModalComponent, ModalComponentBase, ModalConfigBase, ModalModule, ModalService, NodeComponent, PageItemComponentBase, PageItemConfigBase, PdfViewerComponent, PluginManager, RowButtonsTemplateDirective, SectionComponent, SectionModule, SectionService, TooltipContentTemplateDirective, WebsocketModule, WebsocketService, WordDesignerComponent, WordDesignerModule, WordEditorComponent, WordEditorModule, addWatermark, deepClone, downloadFile, evaluateFilter, fileTypeIcon, filenameFromDisposition, formatFileSize, localeSortMethod, notifyError, notifySuccess, notifyWarning, openBrowserTab, supportPreviewExt, validate, validateGroup, validateGroupByName };
4124
5133
  //# sourceMappingURL=ngx-rs-ant.mjs.map