@dignite-ng/expand.ck-editor 3.0.0-rc.3 → 3.0.0-rc.30

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 (42) hide show
  1. package/README.md +117 -13
  2. package/esm2022/config/ck-editor-config.module.mjs +1 -1
  3. package/esm2022/config/dignite-ng-expand.ck-editor-config.mjs +1 -1
  4. package/esm2022/config/enums/index.mjs +1 -1
  5. package/esm2022/config/enums/route-names.mjs +1 -1
  6. package/esm2022/config/providers/index.mjs +1 -1
  7. package/esm2022/config/providers/route.provider.mjs +1 -1
  8. package/esm2022/config/public-api.mjs +1 -1
  9. package/esm2022/dignite-ng-expand.ck-editor.mjs +1 -1
  10. package/esm2022/lib/adapter/ckEditorUpload.mjs +1 -1
  11. package/esm2022/lib/adapter/index.mjs +1 -1
  12. package/esm2022/lib/ck-editor-routing.module.mjs +1 -1
  13. package/esm2022/lib/ck-editor.module.mjs +5 -2
  14. package/esm2022/lib/dynamic-form/ck-editor/ck-editor-config.component.mjs +12 -7
  15. package/esm2022/lib/dynamic-form/ck-editor/ck-editor-config.mjs +3 -1
  16. package/esm2022/lib/dynamic-form/ck-editor/ck-editor-control.component.mjs +25 -10
  17. package/esm2022/lib/dynamic-form/ck-editor/ck-editor-view.component.mjs +39 -0
  18. package/esm2022/lib/dynamic-form/ck-editor/ckEditorUpload.mjs +1 -1
  19. package/esm2022/lib/dynamic-form/ck-editor/index.mjs +2 -1
  20. package/esm2022/lib/dynamic-form/form-control-group.mjs +3 -2
  21. package/esm2022/lib/dynamic-form/index.mjs +1 -1
  22. package/esm2022/lib/enums/ck-editor-mode.enum.mjs +8 -0
  23. package/esm2022/lib/enums/languages-map.mjs +1 -1
  24. package/esm2022/lib/interfaces/form-config-interfaces.mjs +1 -1
  25. package/esm2022/lib/interfaces/index.mjs +1 -1
  26. package/esm2022/lib/object/ck-editor-object.mjs +341 -340
  27. package/esm2022/lib/services/index.mjs +1 -1
  28. package/esm2022/lib/services/set-ck-editor-configs.service.mjs +5 -3
  29. package/esm2022/public-api.mjs +2 -1
  30. package/fesm2022/dignite-ng-expand.ck-editor-config.mjs.map +1 -1
  31. package/fesm2022/dignite-ng-expand.ck-editor.mjs +425 -360
  32. package/fesm2022/dignite-ng-expand.ck-editor.mjs.map +1 -1
  33. package/lib/ck-editor.module.d.ts +6 -5
  34. package/lib/dynamic-form/ck-editor/ck-editor-config.component.d.ts +3 -0
  35. package/lib/dynamic-form/ck-editor/ck-editor-config.d.ts +2 -0
  36. package/lib/dynamic-form/ck-editor/ck-editor-control.component.d.ts +2 -0
  37. package/lib/dynamic-form/ck-editor/ck-editor-view.component.d.ts +17 -0
  38. package/lib/dynamic-form/ck-editor/index.d.ts +1 -0
  39. package/lib/enums/ck-editor-mode.enum.d.ts +5 -0
  40. package/lib/object/ck-editor-object.d.ts +4 -8
  41. package/package.json +12 -10
  42. package/public-api.d.ts +1 -0
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { NgModule, inject, ChangeDetectorRef, Component, Input, ViewChild, Injectable } from '@angular/core';
2
+ import { NgModule, inject, ChangeDetectorRef, ViewChild, Input, Component, Injectable } from '@angular/core';
3
3
  import * as i1 from '@angular/router';
4
4
  import { RouterModule } from '@angular/router';
5
- import * as i2 from '@abp/ng.core';
6
- import { ConfigStateService, RestService, LazyLoadService, SubscriptionService, LOADING_STRATEGY, CoreModule } from '@abp/ng.core';
5
+ import * as i3 from '@abp/ng.core';
6
+ import { mapEnumToOptions, ConfigStateService, RestService, LazyLoadService, SubscriptionService, LOADING_STRATEGY, CoreModule } from '@abp/ng.core';
7
7
  import { ThemeSharedModule } from '@abp/ng.theme.shared';
8
8
  import * as i1$1 from '@angular/forms';
9
9
  import { FormBuilder, Validators } from '@angular/forms';
10
- import * as i3 from '@ngx-validate/core';
11
10
  import * as i1$2 from '@angular/common';
12
- import * as i4 from '@ckeditor/ckeditor5-angular';
11
+ import * as i4 from '@ngx-validate/core';
12
+ import * as i4$1 from '@ckeditor/ckeditor5-angular';
13
13
  import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
14
14
 
15
15
  const routes = [];
@@ -28,6 +28,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
28
28
 
29
29
  class CkEditorConfig {
30
30
  constructor(data) {
31
+ /**类型 */
32
+ this['Ckeditor.Mode'] = ['', []];
31
33
  /**文件容器名称 */
32
34
  // placeholder: any = new FormControl('', Validators.required);
33
35
  this['Ckeditor.ImagesContainerName'] = ['', []];
@@ -44,9 +46,18 @@ class CkEditorConfig {
44
46
  }
45
47
  }
46
48
 
49
+ var CkEditorModeEnum;
50
+ (function (CkEditorModeEnum) {
51
+ CkEditorModeEnum[CkEditorModeEnum["Simple"] = 0] = "Simple";
52
+ CkEditorModeEnum[CkEditorModeEnum["Classic"] = 1] = "Classic";
53
+ })(CkEditorModeEnum || (CkEditorModeEnum = {}));
54
+ const CkEditorModeEnumOptions = mapEnumToOptions(CkEditorModeEnum);
55
+
47
56
  class CkEditorConfigComponent {
48
57
  constructor(fb) {
49
58
  this.fb = fb;
59
+ this.CkEditorModeEnum = CkEditorModeEnum;
60
+ this.CkEditorModeEnumOptions = CkEditorModeEnumOptions;
50
61
  this.cdr = inject(ChangeDetectorRef);
51
62
  }
52
63
  set Entity(v) {
@@ -61,7 +72,7 @@ class CkEditorConfigComponent {
61
72
  this._type = v;
62
73
  // this.dataLoaded()
63
74
  }
64
- //
75
+ //
65
76
  get formConfiguration() {
66
77
  return this._Entity.get('formConfiguration');
67
78
  }
@@ -84,11 +95,11 @@ class CkEditorConfigComponent {
84
95
  });
85
96
  }
86
97
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, deps: [{ token: i1$1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
87
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorConfigComponent, selector: "ck-editor-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2.LocalizationPipe, name: "abpLocalization" }] }); }
98
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorConfigComponent, selector: "ck-editor-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode' | abpLocalization}}</label>\n <!-- <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.Mode\"> -->\n <select class=\"form-select\" formControlName=\"Ckeditor.Mode\" >\n <ng-container *ngFor=\"let item of CkEditorModeEnumOptions\">\n <option [value]=\"item.value\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode.' + item.key|abpLocalization}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i3.LocalizationPipe, name: "abpLocalization" }] }); }
88
99
  }
89
100
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, decorators: [{
90
101
  type: Component,
91
- args: [{ selector: 'ck-editor-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>" }]
102
+ args: [{ selector: 'ck-editor-config', template: "<form [formGroup]=\"_Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode' | abpLocalization}}</label>\n <!-- <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.Mode\"> -->\n <select class=\"form-select\" formControlName=\"Ckeditor.Mode\" >\n <ng-container *ngFor=\"let item of CkEditorModeEnumOptions\">\n <option [value]=\"item.value\">{{'DigniteAbpDynamicFormsCkEditor::EditorMode.' + item.key|abpLocalization}}</option>\n </ng-container>\n </select>\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-3\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>" }]
92
103
  }], ctorParameters: () => [{ type: i1$1.FormBuilder }], propDecorators: { Entity: [{
93
104
  type: Input
94
105
  }], selected: [{
@@ -151,82 +162,7 @@ let isBase64UploadAdapter$1 = class isBase64UploadAdapter {
151
162
  }
152
163
  };
153
164
 
154
- var easy = {
155
- toolbar: {
156
- items: [
157
- 'undo',
158
- 'redo',
159
- '|',
160
- 'heading',
161
- '|',
162
- 'link',
163
- 'bold',
164
- 'italic',
165
- 'underline',
166
- ],
167
- shouldNotGroupWhenFull: false,
168
- },
169
- plugins: [],
170
- heading: {
171
- options: [
172
- {
173
- model: 'paragraph',
174
- title: 'Paragraph',
175
- class: 'ck-heading_paragraph',
176
- },
177
- {
178
- model: 'heading1',
179
- view: 'h1',
180
- title: 'Heading 1',
181
- class: 'ck-heading_heading1',
182
- },
183
- {
184
- model: 'heading2',
185
- view: 'h2',
186
- title: 'Heading 2',
187
- class: 'ck-heading_heading2',
188
- },
189
- {
190
- model: 'heading3',
191
- view: 'h3',
192
- title: 'Heading 3',
193
- class: 'ck-heading_heading3',
194
- },
195
- {
196
- model: 'heading4',
197
- view: 'h4',
198
- title: 'Heading 4',
199
- class: 'ck-heading_heading4',
200
- },
201
- {
202
- model: 'heading5',
203
- view: 'h5',
204
- title: 'Heading 5',
205
- class: 'ck-heading_heading5',
206
- },
207
- {
208
- model: 'heading6',
209
- view: 'h6',
210
- title: 'Heading 6',
211
- class: 'ck-heading_heading6',
212
- },
213
- ],
214
- },
215
- link: {
216
- addTargetToExternalLinks: true,
217
- defaultProtocol: 'https://',
218
- decorators: {
219
- toggleDownloadable: {
220
- mode: 'manual',
221
- label: 'Downloadable',
222
- attributes: {
223
- download: 'file',
224
- },
225
- },
226
- },
227
- },
228
- };
229
- var defaults = {
165
+ var Simple = {
230
166
  toolbar: {
231
167
  items: [
232
168
  'undo',
@@ -234,17 +170,11 @@ var defaults = {
234
170
  '|',
235
171
  'heading',
236
172
  '|',
237
- 'fontSize',
238
- 'fontFamily',
239
- 'fontColor',
240
- 'fontBackgroundColor',
241
173
  'link',
242
- '|',
243
174
  'bold',
244
175
  'italic',
245
176
  'underline',
246
- '|',
247
- 'insertImage',
177
+ 'insertImage'
248
178
  ],
249
179
  shouldNotGroupWhenFull: false,
250
180
  },
@@ -294,9 +224,6 @@ var defaults = {
294
224
  },
295
225
  ],
296
226
  },
297
- fontSize: {
298
- options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
299
- },
300
227
  link: {
301
228
  addTargetToExternalLinks: true,
302
229
  defaultProtocol: 'https://',
@@ -310,256 +237,341 @@ var defaults = {
310
237
  },
311
238
  },
312
239
  },
313
- image: {
314
- toolbar: [
315
- 'toggleImageCaption',
316
- 'imageTextAlternative',
317
- '|',
318
- 'imageStyle:inline',
319
- 'imageStyle:wrapText',
320
- 'imageStyle:breakText',
321
- '|',
322
- 'resizeImage',
323
- ],
324
- styles: {
325
- options: [
326
- 'inline', 'alignLeft', 'alignRight',
327
- 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
328
- 'block', 'side'
329
- ]
330
- },
331
- resizeOptions: [{
332
- name: 'resizeImage:original',
333
- label: 'Original',
334
- value: null
335
- },
336
- {
337
- name: 'resizeImage:25',
338
- label: '25%',
339
- value: '25'
340
- },
341
- {
342
- name: 'resizeImage:50',
343
- label: '50%',
344
- value: '50'
345
- },
346
- {
347
- name: 'resizeImage:75',
348
- label: '75%',
349
- value: '75'
350
- }
351
- ],
352
- },
353
240
  };
354
- var standard = {
355
- toolbar: {
356
- items: [
357
- 'undo',
358
- 'redo',
359
- '|',
360
- 'heading',
361
- '|',
362
- 'fontSize',
363
- 'fontFamily',
364
- 'fontColor',
365
- 'fontBackgroundColor',
366
- '|',
367
- 'bold',
368
- 'italic',
369
- 'underline',
370
- 'strikethrough',
371
- '|',
372
- 'link',
373
- 'insertImage',
374
- 'insertTable',
375
- '|',
376
- 'alignment',
377
- '|',
378
- 'bulletedList',
379
- 'numberedList',
380
- ],
381
- shouldNotGroupWhenFull: false,
382
- },
383
- plugins: [],
384
- fontSize: {
385
- options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
386
- supportAllValues: true,
387
- },
388
- heading: {
389
- options: [
390
- {
391
- model: 'paragraph',
392
- title: 'Paragraph',
393
- class: 'ck-heading_paragraph',
394
- },
395
- {
396
- model: 'heading1',
397
- view: 'h1',
398
- title: 'Heading 1',
399
- class: 'ck-heading_heading1',
400
- },
401
- {
402
- model: 'heading2',
403
- view: 'h2',
404
- title: 'Heading 2',
405
- class: 'ck-heading_heading2',
406
- },
407
- {
408
- model: 'heading3',
409
- view: 'h3',
410
- title: 'Heading 3',
411
- class: 'ck-heading_heading3',
412
- },
413
- {
414
- model: 'heading4',
415
- view: 'h4',
416
- title: 'Heading 4',
417
- class: 'ck-heading_heading4',
418
- },
419
- {
420
- model: 'heading5',
421
- view: 'h5',
422
- title: 'Heading 5',
423
- class: 'ck-heading_heading5',
424
- },
425
- {
426
- model: 'heading6',
427
- view: 'h6',
428
- title: 'Heading 6',
429
- class: 'ck-heading_heading6',
430
- },
431
- ],
432
- },
433
- htmlSupport: {
434
- allow: [
435
- {
436
- name: /^.*$/,
437
- styles: true,
438
- attributes: true,
439
- classes: true,
440
- },
441
- ],
442
- },
443
- image: {
444
- toolbar: [
445
- 'toggleImageCaption',
446
- 'imageTextAlternative',
447
- '|',
448
- 'imageStyle:inline',
449
- 'imageStyle:wrapText',
450
- 'imageStyle:breakText',
451
- '|',
452
- 'resizeImage',
453
- ],
454
- styles: {
455
- options: [
456
- 'inline', 'alignLeft', 'alignRight',
457
- 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
458
- 'block', 'side'
459
- ]
460
- },
461
- resizeOptions: [{
462
- name: 'resizeImage:original',
463
- label: 'Original',
464
- value: null
465
- },
466
- {
467
- name: 'resizeImage:25',
468
- label: '25%',
469
- value: '25'
470
- },
471
- {
472
- name: 'resizeImage:50',
473
- label: '50%',
474
- value: '50'
475
- },
476
- {
477
- name: 'resizeImage:75',
478
- label: '75%',
479
- value: '75'
480
- }
481
- ],
482
- },
483
- link: {
484
- addTargetToExternalLinks: true,
485
- defaultProtocol: 'https://',
486
- decorators: {
487
- toggleDownloadable: {
488
- mode: 'manual',
489
- label: 'Downloadable',
490
- attributes: {
491
- download: 'file',
492
- },
493
- },
494
- },
495
- },
496
- list: {
497
- properties: {
498
- styles: true,
499
- startIndex: true,
500
- reversed: true,
501
- },
502
- },
503
- style: {
504
- definitions: [
505
- {
506
- name: 'Article category',
507
- element: 'h3',
508
- classes: ['category'],
509
- },
510
- {
511
- name: 'Title',
512
- element: 'h2',
513
- classes: ['document-title'],
514
- },
515
- {
516
- name: 'Subtitle',
517
- element: 'h3',
518
- classes: ['document-subtitle'],
519
- },
520
- {
521
- name: 'Info box',
522
- element: 'p',
523
- classes: ['info-box'],
524
- },
525
- {
526
- name: 'Side quote',
527
- element: 'blockquote',
528
- classes: ['side-quote'],
529
- },
530
- {
531
- name: 'Marker',
532
- element: 'span',
533
- classes: ['marker'],
534
- },
535
- {
536
- name: 'Spoiler',
537
- element: 'span',
538
- classes: ['spoiler'],
539
- },
540
- {
541
- name: 'Code (dark)',
542
- element: 'pre',
543
- classes: ['fancy-code', 'fancy-code-dark'],
544
- },
545
- {
546
- name: 'Code (bright)',
547
- element: 'pre',
548
- classes: ['fancy-code', 'fancy-code-bright'],
549
- },
550
- ],
551
- },
552
- table: {
553
- contentToolbar: [
554
- 'tableColumn',
555
- 'tableRow',
556
- 'mergeTableCells',
557
- 'tableProperties',
558
- 'tableCellProperties',
559
- ],
560
- },
561
- };
562
- var full = {
241
+ // export var defaults: any= {
242
+ // toolbar: {
243
+ // items: [
244
+ // 'undo',
245
+ // 'redo',
246
+ // '|',
247
+ // 'heading',
248
+ // '|',
249
+ // 'fontSize',
250
+ // 'fontFamily',
251
+ // 'fontColor',
252
+ // 'fontBackgroundColor',
253
+ // 'link',
254
+ // '|',
255
+ // 'bold',
256
+ // 'italic',
257
+ // 'underline',
258
+ // '|',
259
+ // 'insertImage',
260
+ // ],
261
+ // shouldNotGroupWhenFull: false,
262
+ // },
263
+ // plugins: [],
264
+ // heading: {
265
+ // options: [
266
+ // {
267
+ // model: 'paragraph',
268
+ // title: 'Paragraph',
269
+ // class: 'ck-heading_paragraph',
270
+ // },
271
+ // {
272
+ // model: 'heading1',
273
+ // view: 'h1',
274
+ // title: 'Heading 1',
275
+ // class: 'ck-heading_heading1',
276
+ // },
277
+ // {
278
+ // model: 'heading2',
279
+ // view: 'h2',
280
+ // title: 'Heading 2',
281
+ // class: 'ck-heading_heading2',
282
+ // },
283
+ // {
284
+ // model: 'heading3',
285
+ // view: 'h3',
286
+ // title: 'Heading 3',
287
+ // class: 'ck-heading_heading3',
288
+ // },
289
+ // {
290
+ // model: 'heading4',
291
+ // view: 'h4',
292
+ // title: 'Heading 4',
293
+ // class: 'ck-heading_heading4',
294
+ // },
295
+ // {
296
+ // model: 'heading5',
297
+ // view: 'h5',
298
+ // title: 'Heading 5',
299
+ // class: 'ck-heading_heading5',
300
+ // },
301
+ // {
302
+ // model: 'heading6',
303
+ // view: 'h6',
304
+ // title: 'Heading 6',
305
+ // class: 'ck-heading_heading6',
306
+ // },
307
+ // ],
308
+ // },
309
+ // fontSize: {
310
+ // options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
311
+ // },
312
+ // link: {
313
+ // addTargetToExternalLinks: true,
314
+ // defaultProtocol: 'https://',
315
+ // decorators: {
316
+ // toggleDownloadable: {
317
+ // mode: 'manual',
318
+ // label: 'Downloadable',
319
+ // attributes: {
320
+ // download: 'file',
321
+ // },
322
+ // },
323
+ // },
324
+ // },
325
+ // image: {
326
+ // toolbar: [
327
+ // 'toggleImageCaption',
328
+ // 'imageTextAlternative',
329
+ // '|',
330
+ // 'imageStyle:inline',
331
+ // 'imageStyle:wrapText',
332
+ // 'imageStyle:breakText',
333
+ // '|',
334
+ // 'resizeImage',
335
+ // ],
336
+ // styles: {
337
+ // options: [
338
+ // 'inline', 'alignLeft', 'alignRight',
339
+ // 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
340
+ // 'block', 'side'
341
+ // ]
342
+ // },
343
+ // resizeOptions: [{
344
+ // name: 'resizeImage:original',
345
+ // label: 'Original',
346
+ // value: null
347
+ // },
348
+ // {
349
+ // name: 'resizeImage:25',
350
+ // label: '25%',
351
+ // value: '25'
352
+ // },
353
+ // {
354
+ // name: 'resizeImage:50',
355
+ // label: '50%',
356
+ // value: '50'
357
+ // },
358
+ // {
359
+ // name: 'resizeImage:75',
360
+ // label: '75%',
361
+ // value: '75'
362
+ // }
363
+ // ],
364
+ // },
365
+ // }
366
+ // export var standard: any= {
367
+ // toolbar: {
368
+ // items: [
369
+ // 'undo',
370
+ // 'redo',
371
+ // '|',
372
+ // 'heading',
373
+ // '|',
374
+ // 'fontSize',
375
+ // 'fontFamily',
376
+ // 'fontColor',
377
+ // 'fontBackgroundColor',
378
+ // '|',
379
+ // 'bold',
380
+ // 'italic',
381
+ // 'underline',
382
+ // 'strikethrough',
383
+ // '|',
384
+ // 'link',
385
+ // 'insertImage',
386
+ // 'insertTable',
387
+ // '|',
388
+ // 'alignment',
389
+ // '|',
390
+ // 'bulletedList',
391
+ // 'numberedList',
392
+ // ],
393
+ // shouldNotGroupWhenFull: false,
394
+ // },
395
+ // plugins: [],
396
+ // fontSize: {
397
+ // options: [10, 12, 14, 'default', 18, 20, 22, 24, 26, 28, 30, 32],
398
+ // supportAllValues: true,
399
+ // },
400
+ // heading: {
401
+ // options: [
402
+ // {
403
+ // model: 'paragraph',
404
+ // title: 'Paragraph',
405
+ // class: 'ck-heading_paragraph',
406
+ // },
407
+ // {
408
+ // model: 'heading1',
409
+ // view: 'h1',
410
+ // title: 'Heading 1',
411
+ // class: 'ck-heading_heading1',
412
+ // },
413
+ // {
414
+ // model: 'heading2',
415
+ // view: 'h2',
416
+ // title: 'Heading 2',
417
+ // class: 'ck-heading_heading2',
418
+ // },
419
+ // {
420
+ // model: 'heading3',
421
+ // view: 'h3',
422
+ // title: 'Heading 3',
423
+ // class: 'ck-heading_heading3',
424
+ // },
425
+ // {
426
+ // model: 'heading4',
427
+ // view: 'h4',
428
+ // title: 'Heading 4',
429
+ // class: 'ck-heading_heading4',
430
+ // },
431
+ // {
432
+ // model: 'heading5',
433
+ // view: 'h5',
434
+ // title: 'Heading 5',
435
+ // class: 'ck-heading_heading5',
436
+ // },
437
+ // {
438
+ // model: 'heading6',
439
+ // view: 'h6',
440
+ // title: 'Heading 6',
441
+ // class: 'ck-heading_heading6',
442
+ // },
443
+ // ],
444
+ // },
445
+ // htmlSupport: {
446
+ // allow: [
447
+ // {
448
+ // name: /^.*$/,
449
+ // styles: true,
450
+ // attributes: true,
451
+ // classes: true,
452
+ // },
453
+ // ],
454
+ // },
455
+ // image: {
456
+ // toolbar: [
457
+ // 'toggleImageCaption',
458
+ // 'imageTextAlternative',
459
+ // '|',
460
+ // 'imageStyle:inline',
461
+ // 'imageStyle:wrapText',
462
+ // 'imageStyle:breakText',
463
+ // '|',
464
+ // 'resizeImage',
465
+ // ],
466
+ // styles: {
467
+ // options: [
468
+ // 'inline', 'alignLeft', 'alignRight',
469
+ // 'alignCenter', 'alignBlockLeft', 'alignBlockRight',
470
+ // 'block', 'side'
471
+ // ]
472
+ // },
473
+ // resizeOptions: [{
474
+ // name: 'resizeImage:original',
475
+ // label: 'Original',
476
+ // value: null
477
+ // },
478
+ // {
479
+ // name: 'resizeImage:25',
480
+ // label: '25%',
481
+ // value: '25'
482
+ // },
483
+ // {
484
+ // name: 'resizeImage:50',
485
+ // label: '50%',
486
+ // value: '50'
487
+ // },
488
+ // {
489
+ // name: 'resizeImage:75',
490
+ // label: '75%',
491
+ // value: '75'
492
+ // }
493
+ // ],
494
+ // },
495
+ // link: {
496
+ // addTargetToExternalLinks: true,
497
+ // defaultProtocol: 'https://',
498
+ // decorators: {
499
+ // toggleDownloadable: {
500
+ // mode: 'manual',
501
+ // label: 'Downloadable',
502
+ // attributes: {
503
+ // download: 'file',
504
+ // },
505
+ // },
506
+ // },
507
+ // },
508
+ // list: {
509
+ // properties: {
510
+ // styles: true,
511
+ // startIndex: true,
512
+ // reversed: true,
513
+ // },
514
+ // },
515
+ // style: {
516
+ // definitions: [
517
+ // {
518
+ // name: 'Article category',
519
+ // element: 'h3',
520
+ // classes: ['category'],
521
+ // },
522
+ // {
523
+ // name: 'Title',
524
+ // element: 'h2',
525
+ // classes: ['document-title'],
526
+ // },
527
+ // {
528
+ // name: 'Subtitle',
529
+ // element: 'h3',
530
+ // classes: ['document-subtitle'],
531
+ // },
532
+ // {
533
+ // name: 'Info box',
534
+ // element: 'p',
535
+ // classes: ['info-box'],
536
+ // },
537
+ // {
538
+ // name: 'Side quote',
539
+ // element: 'blockquote',
540
+ // classes: ['side-quote'],
541
+ // },
542
+ // {
543
+ // name: 'Marker',
544
+ // element: 'span',
545
+ // classes: ['marker'],
546
+ // },
547
+ // {
548
+ // name: 'Spoiler',
549
+ // element: 'span',
550
+ // classes: ['spoiler'],
551
+ // },
552
+ // {
553
+ // name: 'Code (dark)',
554
+ // element: 'pre',
555
+ // classes: ['fancy-code', 'fancy-code-dark'],
556
+ // },
557
+ // {
558
+ // name: 'Code (bright)',
559
+ // element: 'pre',
560
+ // classes: ['fancy-code', 'fancy-code-bright'],
561
+ // },
562
+ // ],
563
+ // },
564
+ // table: {
565
+ // contentToolbar: [
566
+ // 'tableColumn',
567
+ // 'tableRow',
568
+ // 'mergeTableCells',
569
+ // 'tableProperties',
570
+ // 'tableCellProperties',
571
+ // ],
572
+ // },
573
+ // }
574
+ var Classic = {
563
575
  toolbar: {
564
576
  items: [
565
577
  'undo',
@@ -782,10 +794,10 @@ var full = {
782
794
  },
783
795
  };
784
796
  var CkEditorTypesObject = {
785
- default: defaults,
786
- easy: easy,
787
- standard: standard,
788
- full: full
797
+ // default: defaults,
798
+ Simple: Simple,
799
+ // standard: standard,
800
+ Classic: Classic
789
801
  };
790
802
 
791
803
  var LanguagesMap;
@@ -810,12 +822,13 @@ var LanguagesMap;
810
822
  LanguagesMap["vi"] = "vi";
811
823
  })(LanguagesMap || (LanguagesMap = {}));
812
824
 
825
+ // import { CkEditorModeEnum } from '../enums/ck-editor-mode-enum';
813
826
  class SetCkEditorConfigsService {
814
827
  constructor() { }
815
828
  async get(input) {
816
- let { language } = input;
829
+ let { language, type } = input;
817
830
  return new Promise(async (resolve, rejects) => {
818
- let configs = CkEditorTypesObject['easy'];
831
+ let configs = CkEditorTypesObject[CkEditorModeEnum[type]];
819
832
  let { AccessibilityHelp, Highlight, Alignment, Autoformat, AutoImage, Autosave, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Code, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, GeneralHtmlSupport, Heading, HorizontalLine, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, RemoveFormat, SelectAll, SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, TodoList, Underline, Undo } = await import('ckeditor5');
820
833
  configs.plugins = [AccessibilityHelp, Highlight, Alignment, Autoformat, AutoImage, Autosave, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Code, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, GeneralHtmlSupport, Heading, HorizontalLine, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, RemoveFormat, SelectAll, SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, TodoList, Underline, Undo];
821
834
  configs.language = LanguagesMap[language];
@@ -841,6 +854,7 @@ class CkEditorControlComponent {
841
854
  this.ckEditorValue = '';
842
855
  /**系统语言 */
843
856
  this.currentCulture = this.config.getOne('localization')?.currentCulture?.name;
857
+ this.CkEditorModeEnum = CkEditorModeEnum;
844
858
  this.fb = inject(FormBuilder);
845
859
  /**字段配置列表 */
846
860
  this._fields = '';
@@ -851,7 +865,6 @@ class CkEditorControlComponent {
851
865
  this.invalidfeedback = false;
852
866
  /**图片容器名称 */
853
867
  this.imagesContainerName = '';
854
- this.loadckeditor();
855
868
  }
856
869
  onReady(editor) {
857
870
  let _this = this;
@@ -877,7 +890,7 @@ class CkEditorControlComponent {
877
890
  this.dataLoaded();
878
891
  }
879
892
  get extraProperties() {
880
- return this._entity.get('extraProperties');
893
+ return this._entity?.get('extraProperties');
881
894
  }
882
895
  get ckeditorInput() {
883
896
  return this.extraProperties.get(this._fields.field.name);
@@ -890,18 +903,35 @@ class CkEditorControlComponent {
890
903
  this._selected || this._fields.field.formConfiguration['Ckeditor.InitialContent'];
891
904
  this.setckeditorInput(this.ckEditorValue);
892
905
  this.cdr.detectChanges(); // 手动触发变更检测
906
+ await this.loadckeditor();
893
907
  this.submitclick?.nativeElement?.click();
894
908
  }
895
909
  }
896
910
  loadckeditor() {
897
911
  let _that = this;
912
+ let formConfiguration = this._fields.field.formConfiguration;
898
913
  return new Promise(async (resolve) => {
899
914
  await import('ckeditor5').then(async (res) => {
900
915
  this.loadStyle();
901
- _that.Editor = res.ClassicEditor;
916
+ if (formConfiguration['Ckeditor.Mode'] == CkEditorModeEnum.Simple) {
917
+ _that.Editor = res.InlineEditor;
918
+ }
919
+ else if (formConfiguration['Ckeditor.Mode'] == CkEditorModeEnum.Classic) {
920
+ _that.Editor = res.ClassicEditor;
921
+ }
922
+ else {
923
+ formConfiguration['Ckeditor.Mode'] = CkEditorModeEnum.Simple;
924
+ _that.Editor = res.InlineEditor;
925
+ }
902
926
  let configs = await _that._SetCkEditorConfigsService.get({
903
927
  language: _that.currentCulture,
928
+ type: formConfiguration['Ckeditor.Mode']
904
929
  });
930
+ if (!this.imagesContainerName) {
931
+ if (configs?.toolbar?.items?.indexOf('insertImage') != -1) {
932
+ configs?.toolbar?.items?.splice(configs?.toolbar?.items?.indexOf('insertImage'), 1);
933
+ }
934
+ }
905
935
  _that.ckOptions = configs;
906
936
  });
907
937
  resolve(true);
@@ -928,18 +958,15 @@ class CkEditorControlComponent {
928
958
  this.extraProperties.setControl(this._fields.field.name, newControl);
929
959
  this.imagesContainerName =
930
960
  this._fields.field.formConfiguration['Ckeditor.ImagesContainerName'];
931
- if (!this.imagesContainerName) {
932
- this.ckOptions?.toolbar?.items?.splice(this.ckOptions?.toolbar?.items?.indexOf('insertImage'), 1);
933
- }
934
961
  resolve(true);
935
962
  });
936
963
  }
937
964
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
938
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorControlComponent, selector: "ck-editor-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n\n <ckeditor [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }] }); }
965
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorControlComponent, selector: "ck-editor-control", inputs: { fields: "fields", parentFiledName: "parentFiledName", selected: "selected", entity: "entity" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n <ckeditor class=\"form-textarea\" [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["@charset \"UTF-8\";:root .ck.ck-editor__editable_inline{min-height:160px!important}.ck.ck-editor__main>.ck-editor__editable{background:var(--bs-body-bg)!important}.ck.ck-toolbar,.ck.ck-button.ck-list-item-button,.ck.ck-button.ck-list-item-button.ck-on,.ck.ck-dropdown__panel{background:var(--bs-body-bg)!important}.ck.ck-editor__editable_inline{border-color:var(--ck-color-base-border)!important}\n"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i4.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i4.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4$1.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }] }); }
939
966
  }
940
967
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorControlComponent, decorators: [{
941
968
  type: Component,
942
- args: [{ selector: 'ck-editor-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n\n <ckeditor [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>" }]
969
+ args: [{ selector: 'ck-editor-control', template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-3\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ng-container *ngIf=\"ckOptions\">\n <ckeditor class=\"form-textarea\" [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\"\n [formControlName]=\"_fields.field.name\">\n </ckeditor>\n </ng-container>\n <small class=\"form-text text-muted d-block\"\n *ngIf=\"_fields.field.description\">{{_fields.field.description}}</small>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: ["@charset \"UTF-8\";:root .ck.ck-editor__editable_inline{min-height:160px!important}.ck.ck-editor__main>.ck-editor__editable{background:var(--bs-body-bg)!important}.ck.ck-toolbar,.ck.ck-button.ck-list-item-button,.ck.ck-button.ck-list-item-button.ck-on,.ck.ck-dropdown__panel{background:var(--bs-body-bg)!important}.ck.ck-editor__editable_inline{border-color:var(--ck-color-base-border)!important}\n"] }]
943
970
  }], ctorParameters: () => [], propDecorators: { fields: [{
944
971
  type: Input
945
972
  }], parentFiledName: [{
@@ -953,6 +980,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
953
980
  args: ['submitclick', { static: true }]
954
981
  }] } });
955
982
 
983
+ class CkEditorViewComponent {
984
+ constructor() {
985
+ /**展示则内容 */
986
+ this.showValue = '';
987
+ /**是否显示再列表 */
988
+ this.showInList = false;
989
+ /**表单控件Value */
990
+ this._value = '';
991
+ }
992
+ set value(v) {
993
+ this._value = v;
994
+ }
995
+ async ngAfterContentInit() {
996
+ //Called after ngOnInit when the component's or directive's content has been initialized.
997
+ //Add 'implements AfterContentInit' to the class.
998
+ let valueOptions = this._value;
999
+ if (this.type && valueOptions) {
1000
+ this.showValue = valueOptions;
1001
+ }
1002
+ }
1003
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1004
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.5", type: CkEditorViewComponent, selector: "ck-ck-editor-view", inputs: { showInList: "showInList", fields: "fields", type: "type", value: "value" }, ngImport: i0, template: "@if(showInList){\r\n {{showValue}}\r\n } @else{\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n </div>\r\n }", styles: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1005
+ }
1006
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorViewComponent, decorators: [{
1007
+ type: Component,
1008
+ args: [{ selector: 'ck-ck-editor-view', template: "@if(showInList){\r\n {{showValue}}\r\n } @else{\r\n <div class=\"mb-3\">\r\n <label class=\"form-label\" *ngIf=\"fields.displayName\">{{ fields.displayName }}</label>\r\n <div>\r\n {{showValue}}\r\n </div>\r\n </div>\r\n }" }]
1009
+ }], propDecorators: { showInList: [{
1010
+ type: Input
1011
+ }], fields: [{
1012
+ type: Input
1013
+ }], type: [{
1014
+ type: Input
1015
+ }], value: [{
1016
+ type: Input
1017
+ }] } });
1018
+
956
1019
  /**
957
1020
  * 表单控件分组-包含配置,控件,显示的数组
958
1021
  */
@@ -962,7 +1025,7 @@ const ckEditorFieldControlGroup = [
962
1025
  name: 'CkEditor',
963
1026
  fieldConfigComponent: CkEditorConfigComponent,
964
1027
  fieldComponent: CkEditorControlComponent,
965
- // fieldViewComponent:TextBoxViewComponent,
1028
+ fieldViewComponent: CkEditorViewComponent,
966
1029
  },
967
1030
  ];
968
1031
  function getExcludeAssignControl(typeName) {
@@ -976,7 +1039,8 @@ function AddFieldControlGroup(array = []) {
976
1039
  class CkEditorModule {
977
1040
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
978
1041
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, declarations: [CkEditorControlComponent,
979
- CkEditorConfigComponent], imports: [CoreModule,
1042
+ CkEditorConfigComponent,
1043
+ CkEditorViewComponent], imports: [CoreModule,
980
1044
  ThemeSharedModule,
981
1045
  CkEditorRoutingModule,
982
1046
  CKEditorModule] }); }
@@ -991,6 +1055,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
991
1055
  declarations: [
992
1056
  CkEditorControlComponent,
993
1057
  CkEditorConfigComponent,
1058
+ CkEditorViewComponent,
994
1059
  ],
995
1060
  imports: [
996
1061
  CoreModule,
@@ -1070,5 +1135,5 @@ class isBase64UploadAdapter {
1070
1135
  * Generated bundle index. Do not edit.
1071
1136
  */
1072
1137
 
1073
- export { AddFieldControlGroup, CkEditorModule, SetCkEditorConfigsService, ckEditorFieldControlGroup, getExcludeAssignControl, isBase64UploadAdapter };
1138
+ export { AddFieldControlGroup, CkEditorModeEnum, CkEditorModeEnumOptions, CkEditorModule, SetCkEditorConfigsService, ckEditorFieldControlGroup, getExcludeAssignControl, isBase64UploadAdapter };
1074
1139
  //# sourceMappingURL=dignite-ng-expand.ck-editor.mjs.map