@acorex/components 18.12.1 → 18.12.2

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 (19) hide show
  1. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +42 -34
  2. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +11 -5
  3. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-alignment/wysiwyg-alignment.component.mjs +7 -12
  4. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-colors/wysiwyg-colors.component.mjs +6 -11
  5. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-font-style/wysiwyg-font-style.component.mjs +23 -28
  6. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-history/wysiwyg-history.component.mjs +5 -11
  7. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-insert/wysiwyg-insert.component.mjs +4 -10
  8. package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-list/wysiwyg-list.component.mjs +10 -15
  9. package/fesm2022/acorex-components-wysiwyg.mjs +92 -110
  10. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  11. package/package.json +30 -30
  12. package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +3 -8
  13. package/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.d.ts +1 -0
  14. package/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-alignment/wysiwyg-alignment.component.d.ts +0 -3
  15. package/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-colors/wysiwyg-colors.component.d.ts +0 -3
  16. package/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-font-style/wysiwyg-font-style.component.d.ts +0 -3
  17. package/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-history/wysiwyg-history.component.d.ts +0 -5
  18. package/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-insert/wysiwyg-insert.component.d.ts +0 -5
  19. package/wysiwyg/lib/wysiwyg/wysiwyg-tools/wysiwyg-list/wysiwyg-list.component.d.ts +0 -3
@@ -10,6 +10,7 @@ import * as i3$1 from '@angular/forms';
10
10
  import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
11
11
  import { AXWysiwyg } from '@acorex/cdk/wysiwyg';
12
12
  import { MXInputBaseValueComponent, MXLookComponent, AXComponent, AXFocusableComponent, AXClearableComponent, AXValuableComponent } from '@acorex/components/common';
13
+ import { isBrowser } from '@acorex/core/platform';
13
14
  import { classes } from 'polytype';
14
15
  import { QuillDeltaToHtmlConverter } from 'quill-delta-to-html';
15
16
  import * as i4 from '@acorex/components/color-palette';
@@ -39,51 +40,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
39
40
  * @category Components
40
41
  */
41
42
  class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), MXLookComponent) {
42
- /** @ignore */
43
43
  constructor() {
44
- super();
45
- /** @ignore */
46
- this.zone = inject(NgZone);
47
- this.wysiwyg = signal(null);
48
- /** @ignore */
49
- this.view = signal(null);
44
+ super(...arguments);
50
45
  /** @ignore */
51
46
  this.service = inject(AXWysiwygService);
47
+ /** @ignore */
48
+ this.zone = inject(NgZone);
52
49
  /**
53
50
  * Specifies the placeholder text.
54
51
  *
55
52
  */
56
53
  this.placeHolder = input();
57
- afterNextRender(() => {
58
- this.view.set(this.getHostElement().querySelector('ax-wysiwyg-view'));
59
- this.zone.runOutsideAngular(() => {
60
- this.wysiwyg.set(new AXWysiwyg(this.view(), {
61
- readOnly: true,
62
- }));
63
- this.wysiwyg().wysiwygObj.on('text-change', this.changeHandler.bind(this));
54
+ this.#init = afterNextRender(() => {
55
+ const view = this.getHostElement().querySelector('ax-wysiwyg-view');
56
+ this.zone.runOutsideAngular(async () => {
57
+ if (isBrowser()) {
58
+ const newWysiwyg = new AXWysiwyg();
59
+ await newWysiwyg.init(view, {
60
+ readOnly: true,
61
+ });
62
+ this.service.wysiwyg.set(newWysiwyg);
63
+ }
64
64
  });
65
- this.service.wysiwyg.set(this.wysiwyg());
66
- this.setTimeOut = setTimeout(() => {
67
- this.wysiwyg().wysiwygObj.enable();
68
- }, 1000);
69
65
  });
70
- effect(() => {
71
- if (this.placeHolder() && this.wysiwyg()) {
72
- this.wysiwyg().wysiwygObj.root.setAttribute('data-placeholder', this.placeHolder());
66
+ this.#effect1 = effect(() => {
67
+ if (this.placeHolder() && this.service.wysiwyg()?.quillObj()) {
68
+ this.service.wysiwyg().quillObj().root.setAttribute('data-placeholder', this.placeHolder());
73
69
  }
74
- else {
75
- this.wysiwyg().wysiwygObj.root.setAttribute('data-placeholder', 'Write Your Message ...');
70
+ else if (this.service.wysiwyg()?.quillObj()) {
71
+ this.service.wysiwyg().quillObj().root.setAttribute('data-placeholder', 'Write Your Message ...');
76
72
  }
77
73
  });
78
- effect(() => {
79
- if (this.value) {
80
- this.wysiwyg().wysiwygObj.root.innerHTML = this.value;
74
+ this.#effect2 = effect(() => {
75
+ if (this.value && this.service.wysiwyg()?.quillObj()) {
76
+ this.service.wysiwyg().quillObj().root.innerHTML = this.value;
81
77
  }
82
- }, { allowSignalWrites: true });
78
+ });
79
+ this.#effect3 = effect(() => {
80
+ if (this.service.wysiwyg()?.quillObj()) {
81
+ this.service.wysiwyg().quillObj().on('text-change', this.changeHandler.bind(this));
82
+ this.setTimeOut = setTimeout(() => {
83
+ this.service.wysiwyg()?.quillObj().enable();
84
+ }, 1000);
85
+ }
86
+ });
83
87
  }
88
+ #init;
89
+ #effect1;
90
+ #effect2;
91
+ #effect3;
84
92
  /** @ignore */
85
93
  changeHandler() {
86
- const value = this.wysiwyg().wysiwygObj.root.innerHTML;
94
+ const value = this.service.wysiwyg()?.quillObj().root.innerHTML;
87
95
  if (value === '<p><br></p>' || !value) {
88
96
  this.commitValue(null);
89
97
  if (this.service.isEditorClean())
@@ -91,7 +99,7 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
91
99
  this.service.isEditorClean.set(true);
92
100
  }
93
101
  else {
94
- const delta = this.wysiwyg().wysiwygObj.editor.delta.ops;
102
+ const delta = this.service.wysiwyg()?.quillObj().editor.delta.ops;
95
103
  const cfg = { inlineStyles: true };
96
104
  const converter = new QuillDeltaToHtmlConverter(delta, cfg);
97
105
  const html = converter.convert();
@@ -103,10 +111,10 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
103
111
  }
104
112
  /** @ignore */
105
113
  ngOnDestroy() {
106
- this.wysiwyg().wysiwygObj.off('text-change', this.changeHandler);
114
+ this.service.wysiwyg()?.quillObj().off('text-change', this.changeHandler);
107
115
  clearTimeout(this.setTimeOut);
108
116
  }
109
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
117
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
110
118
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.0", type: AXWysiwygContainerComponent, selector: "ax-wysiwyg-container", inputs: { look: { classPropertyName: "look", publicName: "look", isSignal: false, isRequired: false, transformFunction: null }, placeHolder: { classPropertyName: "placeHolder", publicName: "placeHolder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onValueChanged: "onValueChanged" }, providers: [
111
119
  { provide: AXComponent, useExisting: AXWysiwygContainerComponent },
112
120
  { provide: AXFocusableComponent, useExisting: AXWysiwygContainerComponent },
@@ -132,20 +140,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
132
140
  multi: true,
133
141
  },
134
142
  ], template: "<div class=\"ax-editor-container ax-look-{{ look }}\">\n <ng-content></ng-content>\n <ng-content select=\"ax-validation-rule\"> </ng-content>\n</div>\n<div class=\"ax-error-container\"></div>\n", styles: [".ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:\"\\2022\"}.ql-editor li[data-list=checked]>.ql-ui:before{content:\"\\2611\"}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:\"\\2610\"}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0,decimal) \". \"}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-set:list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-reset:list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-8{counter-increment:list-8}.ql-editor li[data-list=ordered].ql-indent-8>.ql-ui:before{content:counter(list-8,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-set:list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-reset:list-9}}.ql-editor li[data-list=ordered].ql-indent-9{counter-increment:list-9}.ql-editor li[data-list=ordered].ql-indent-9>.ql-ui:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor li.ql-direction-rtl{padding-right:1.5em}.ql-editor li.ql-direction-rtl>.ql-ui:before{margin-left:.3em;margin-right:-1.5em;text-align:left}.ql-editor table{table-layout:fixed;width:100%}.ql-editor table td{outline:none}.ql-editor .ql-code-block-container{font-family:monospace}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor .ql-ui{position:absolute}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}ax-wysiwyg-container{width:100%;display:block}ax-wysiwyg-container>.ax-editor-container{display:block;height:auto!important}\n/*! Bundled license information:\n\nquill/dist/quill.core.css:\n (*!\n * Quill Editor v2.0.2\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n"] }]
135
- }], ctorParameters: () => [] });
143
+ }] });
136
144
 
137
145
  /**
138
146
  * A toolbar component for the WYSIWYG editor, providing various formatting options.
139
147
  * @category Components
140
148
  */
141
149
  class AXWysiwygToolbarComponent {
150
+ get __hostClass() {
151
+ return `ax-sm`;
152
+ }
142
153
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
143
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygToolbarComponent, selector: "ax-wysiwyg-toolbar", ngImport: i0, template: "<div class=\"ax-wysiwyg-tool-container ax-sm\">\r\n <ng-content select=\"ax-prefix\"></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select=\"ax-suffix\"></ng-content>\r\n</div>\r\n", styles: ["ax-wysiwyg-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container{padding-block:.5rem;overflow:hidden;display:flex;flex-wrap:wrap;justify-content:center}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-button{margin-inline:.1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-select-box{margin-inline:.5rem}ax-wysiwyg-toolbar ax-select-box{width:auto!important}\n"], encapsulation: i0.ViewEncapsulation.None }); }
154
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygToolbarComponent, selector: "ax-wysiwyg-toolbar", host: { properties: { "class": "this.__hostClass" } }, ngImport: i0, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-wysiwyg-tools\"><ng-content></ng-content></div>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n", styles: ["ax-wysiwyg-toolbar{overflow:hidden;display:flex;flex-wrap:wrap;justify-content:space-between;padding:.5rem}ax-wysiwyg-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-wysiwyg-toolbar ax-button{margin-inline:.1rem}ax-wysiwyg-toolbar ax-select-box{margin-inline:.5rem}ax-wysiwyg-toolbar .ax-wysiwyg-tools{display:flex;flex-wrap:wrap}ax-wysiwyg-toolbar ax-select-box{width:auto!important}\n"], encapsulation: i0.ViewEncapsulation.None }); }
144
155
  }
145
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygToolbarComponent, decorators: [{
146
157
  type: Component,
147
- args: [{ selector: 'ax-wysiwyg-toolbar', encapsulation: ViewEncapsulation.None, template: "<div class=\"ax-wysiwyg-tool-container ax-sm\">\r\n <ng-content select=\"ax-prefix\"></ng-content>\r\n <ng-content></ng-content>\r\n <ng-content select=\"ax-suffix\"></ng-content>\r\n</div>\r\n", styles: ["ax-wysiwyg-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container{padding-block:.5rem;overflow:hidden;display:flex;flex-wrap:wrap;justify-content:center}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-button{margin-inline:.1rem}ax-wysiwyg-toolbar .ax-wysiwyg-tool-container ax-select-box{margin-inline:.5rem}ax-wysiwyg-toolbar ax-select-box{width:auto!important}\n"] }]
148
- }] });
158
+ args: [{ selector: 'ax-wysiwyg-toolbar', encapsulation: ViewEncapsulation.None, template: "<ng-content select=\"ax-prefix\"></ng-content>\r\n<div class=\"ax-wysiwyg-tools\"><ng-content></ng-content></div>\r\n<ng-content select=\"ax-suffix\"></ng-content>\r\n", styles: ["ax-wysiwyg-toolbar{overflow:hidden;display:flex;flex-wrap:wrap;justify-content:space-between;padding:.5rem}ax-wysiwyg-toolbar .ax-icon{font-weight:900;font-size:1rem}ax-wysiwyg-toolbar ax-button{margin-inline:.1rem}ax-wysiwyg-toolbar ax-select-box{margin-inline:.5rem}ax-wysiwyg-toolbar .ax-wysiwyg-tools{display:flex;flex-wrap:wrap}ax-wysiwyg-toolbar ax-select-box{width:auto!important}\n"] }]
159
+ }], propDecorators: { __hostClass: [{
160
+ type: HostBinding,
161
+ args: ['class']
162
+ }] } });
149
163
 
150
164
  /**
151
165
  * A container component for WYSIWYG (What You See Is What You Get) editor functionality.
@@ -159,8 +173,6 @@ class AXWysiwygAlignmentComponent {
159
173
  /** @ignore */
160
174
  this.alignState = signal('');
161
175
  /** @ignore */
162
- this.wysiwyg = signal(null);
163
- /** @ignore */
164
176
  this.popoverOption = {
165
177
  openOn: 'click',
166
178
  closeOn: 'clickOut',
@@ -169,30 +181,27 @@ class AXWysiwygAlignmentComponent {
169
181
  offsetY: 0,
170
182
  };
171
183
  effect(() => {
172
- if (!this.wysiwyg())
184
+ if (!this.service.wysiwyg())
173
185
  return;
174
186
  switch (this.service.currentSelectedElemAlign()) {
175
187
  case 'ql-align-center':
176
188
  this.alignState.set('center');
177
- this.wysiwyg().align('center');
189
+ this.service.wysiwyg().align('center');
178
190
  break;
179
191
  case 'ql-align-right':
180
192
  this.alignState.set('right');
181
- this.wysiwyg().align('right');
193
+ this.service.wysiwyg().align('right');
182
194
  break;
183
195
  default:
184
196
  this.alignState.set('left');
185
- this.wysiwyg().align('left');
197
+ this.service.wysiwyg().align('left');
186
198
  }
187
199
  }, { allowSignalWrites: true });
188
- afterNextRender(() => {
189
- this.wysiwyg.set(this.service.wysiwyg());
190
- });
191
200
  }
192
201
  /** @ignore */
193
202
  alignStateHandler(e) {
194
203
  this.alignState.set(e);
195
- this.wysiwyg().align(e);
204
+ this.service.wysiwyg().align(e);
196
205
  }
197
206
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygAlignmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
198
207
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygAlignmentComponent, selector: "ax-wysiwyg-alignment", ngImport: i0, template: "<ax-button look=\"blank\" #alignPop>\n <ax-icon class=\"ax-icon ax-icon-align-left\"></ax-icon>\n</ax-button>\n<ax-popover [openOn]=\"popoverOption.openOn\" [closeOn]=\"popoverOption.closeOn\" [target]=\"alignPop\" [placement]=\"popoverOption.placement\">\n <div class=\"ax-overlay-pane ax-alignment-cotainer ax-sm\">\n <ax-button (click)=\"alignStateHandler('left')\" look=\"blank\" [selected]=\"alignState() === 'left' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-left\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"alignStateHandler('center')\" look=\"blank\" [selected]=\"alignState() === 'center' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-center\"></ax-icon>\n </ax-button>\n\n <ax-button (click)=\"alignStateHandler('right')\" look=\"blank\" [selected]=\"alignState() === 'right' ? true : false\">\n <ax-icon class=\"ax-icon ax-icon-align-right\"></ax-icon>\n </ax-button>\n </div>\n</ax-popover>\n", styles: [".ax-alignment-cotainer{padding:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }] }); }
@@ -212,8 +221,6 @@ class AXWysiwygColorsComponent {
212
221
  /** @ignore */
213
222
  this.service = inject(AXWysiwygService);
214
223
  /** @ignore */
215
- this.wysiwyg = signal(null);
216
- /** @ignore */
217
224
  this.selectedColor = signal('rgb(151, 148, 148)');
218
225
  /** @ignore */
219
226
  this.selectedHighlightColor = signal('rgba(223, 223, 24, 0.5)');
@@ -229,9 +236,6 @@ class AXWysiwygColorsComponent {
229
236
  offsetX: 0,
230
237
  offsetY: 0,
231
238
  };
232
- afterNextRender(() => {
233
- this.wysiwyg.set(this.service.wysiwyg());
234
- });
235
239
  effect(() => {
236
240
  if (this.service.isEditorClean()) {
237
241
  this.selectedHighlightColor.set('rgba(223, 223, 24, 0.5)');
@@ -244,28 +248,28 @@ class AXWysiwygColorsComponent {
244
248
  if (!this.userInteractColor())
245
249
  return;
246
250
  this.selectedColor.set(e);
247
- this.wysiwyg().color(e);
251
+ this.service.wysiwyg().color(e);
248
252
  }
249
253
  /** @ignore */
250
254
  changeHighlightColorHandler(e) {
251
255
  if (!this.userInteractHighligh())
252
256
  return;
253
257
  this.selectedHighlightColor.set(e);
254
- this.wysiwyg().background(e);
258
+ this.service.wysiwyg().background(e);
255
259
  }
256
260
  /** @ignore */
257
261
  initialHighlightHandler() {
258
262
  if (this.userInteractHighligh())
259
263
  return;
260
264
  this.userInteractHighligh.set(true);
261
- this.wysiwyg().background('rgba(223, 223, 24, 0.5)');
265
+ this.service.wysiwyg().background('rgba(223, 223, 24, 0.5)');
262
266
  }
263
267
  /** @ignore */
264
268
  initialColorHandler() {
265
269
  if (this.userInteractColor())
266
270
  return;
267
271
  this.userInteractColor.set(true);
268
- this.wysiwyg().color('rgb(151, 148, 148)');
272
+ this.service.wysiwyg().color('rgb(151, 148, 148)');
269
273
  }
270
274
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygColorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
271
275
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygColorsComponent, selector: "ax-wysiwyg-colors", ngImport: i0, template: "<div class=\"ax-color-picker-wysiwyg-container\">\n <div (click)=\"initialColorHandler()\" class=\"ax-color-flex-wysiwyg-container\">\n <div [style]=\"{ backgroundColor: selectedColor() }\" class=\"ax-submit-color\"></div>\n <ax-button #colorBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-color-palette\"></ax-icon>\n </ax-button>\n </div>\n\n <div (click)=\"initialHighlightHandler()\" class=\"ax-color-flex-wysiwyg-container\">\n <div [style]=\"{ backgroundColor: selectedHighlightColor() }\" class=\"ax-submit-color\"></div>\n <ax-button #highlightBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-highlight\"></ax-icon>\n </ax-button>\n </div>\n</div>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"colorBtn\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-color-palette (ngModelChange)=\"changeColorHandler($event)\" [ngModel]=\"selectedColor()\">\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n</ax-popover>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"highlightBtn\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane\">\n <ax-color-palette\n (ngModelChange)=\"changeHighlightColorHandler($event)\"\n [ngModel]=\"selectedHighlightColor()\"\n >\n <ax-color-palette-preview></ax-color-palette-preview>\n <ax-color-palette-picker></ax-color-palette-picker>\n <ax-color-palette-input></ax-color-palette-input>\n </ax-color-palette>\n </div>\n</ax-popover>\n", styles: [".ax-color-picker-wysiwyg-container{display:flex;align-items:center}.ax-color-picker-wysiwyg-container .ax-color-flex-wysiwyg-container{display:flex;align-items:center;cursor:pointer}.ax-color-picker-wysiwyg-container .ax-submit-color{border:1px solid rgb(var(--ax-color-text-default));width:.6rem;height:.6rem;border-radius:1000vmax}\n"], dependencies: [{ kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.AXColorPalleteComponent, selector: "ax-color-palette", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "checked"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i4.AXColorPalettePreviewComponent, selector: "ax-color-palette-preview" }, { kind: "component", type: i4.AXColorPaletteInputComponent, selector: "ax-color-palette-input" }, { kind: "component", type: i4.AXColorPalettePickerComponent, selector: "ax-color-palette-picker" }, { kind: "component", type: i3.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], encapsulation: i0.ViewEncapsulation.None }); }
@@ -285,8 +289,6 @@ class AXWysiwygFontStyleComponent {
285
289
  /** @ignore */
286
290
  this.parent = inject(AXWysiwygContainerComponent);
287
291
  /** @ignore */
288
- this.wysiwyg = signal(null);
289
- /** @ignore */
290
292
  this.boldState = signal(false);
291
293
  /** @ignore */
292
294
  this.italicState = signal(false);
@@ -299,97 +301,94 @@ class AXWysiwygFontStyleComponent {
299
301
  /** @ignore */
300
302
  this.service = inject(AXWysiwygService);
301
303
  effect(() => {
302
- if (!this.wysiwyg())
304
+ if (!this.service.wysiwyg())
303
305
  return;
304
306
  this.service.currentSelectedElemArray().forEach((item) => {
305
307
  switch (item) {
306
308
  case 'U':
307
- this.wysiwyg().underLine(true);
309
+ this.service.wysiwyg().underLine(true);
308
310
  this.underLineState.set(true);
309
311
  break;
310
312
  case 'S':
311
- this.wysiwyg().strike(true);
313
+ this.service.wysiwyg().strike(true);
312
314
  this.strikeLineState.set(true);
313
315
  break;
314
316
  case 'EM':
315
- this.wysiwyg().italic(true);
317
+ this.service.wysiwyg().italic(true);
316
318
  this.italicState.set(true);
317
319
  break;
318
320
  case 'STRONG':
319
- this.wysiwyg().bold(true);
321
+ this.service.wysiwyg().bold(true);
320
322
  this.boldState.set(true);
321
323
  break;
322
324
  default:
323
325
  if (this.boldState())
324
- this.wysiwyg().bold(true);
326
+ this.service.wysiwyg().bold(true);
325
327
  if (this.italicState())
326
- this.wysiwyg().italic(true);
328
+ this.service.wysiwyg().italic(true);
327
329
  if (this.strikeLineState())
328
- this.wysiwyg().strike(true);
330
+ this.service.wysiwyg().strike(true);
329
331
  if (this.underLineState())
330
- this.wysiwyg().underLine(true);
332
+ this.service.wysiwyg().underLine(true);
331
333
  }
332
334
  });
333
335
  }, { allowSignalWrites: true });
334
- afterNextRender(() => {
335
- this.wysiwyg.set(this.service.wysiwyg());
336
- });
337
336
  }
338
337
  /** @ignore */
339
338
  bold() {
340
339
  if (this.boldState()) {
341
- this.wysiwyg().bold(false);
340
+ this.service.wysiwyg().bold(false);
342
341
  this.boldState.set(false);
343
342
  }
344
343
  else {
345
- this.wysiwyg().bold(true);
344
+ this.service.wysiwyg().bold(true);
346
345
  this.boldState.set(true);
347
346
  }
348
347
  }
349
348
  /** @ignore */
350
349
  italic() {
351
350
  if (this.italicState()) {
352
- this.wysiwyg().italic(false);
351
+ this.service.wysiwyg().italic(false);
353
352
  this.italicState.set(false);
354
353
  }
355
354
  else {
356
- this.wysiwyg().italic(true);
355
+ this.service.wysiwyg().italic(true);
357
356
  this.italicState.set(true);
358
357
  }
359
358
  }
360
359
  /** @ignore */
361
360
  underLine() {
362
361
  if (this.underLineState()) {
363
- this.wysiwyg().underLine(false);
362
+ this.service.wysiwyg().underLine(false);
364
363
  this.underLineState.set(false);
365
364
  }
366
365
  else {
367
- this.wysiwyg().underLine(true);
366
+ this.service.wysiwyg().underLine(true);
368
367
  this.underLineState.set(true);
369
368
  }
370
369
  }
371
370
  /** @ignore */
372
371
  strike() {
373
372
  if (this.strikeLineState()) {
374
- this.wysiwyg().strike(false);
373
+ this.service.wysiwyg().strike(false);
375
374
  this.strikeLineState.set(false);
376
375
  }
377
376
  else {
378
- this.wysiwyg().strike(true);
377
+ this.service.wysiwyg().strike(true);
379
378
  this.strikeLineState.set(true);
380
379
  }
381
380
  }
382
381
  /** @ignore */
383
382
  fontSizeHandler(e) {
384
- const range = this.wysiwyg().wysiwygObj.getSelection();
385
- if (!range.length)
383
+ const range = this.service.wysiwyg()?.quillObj().getSelection();
384
+ if (!range?.length)
386
385
  return;
387
386
  if (e === 'medium') {
388
- this.wysiwyg().fontSize(false, range);
387
+ this.service.wysiwyg().fontSize(false, range);
389
388
  this.selectedFont.set('medium');
390
389
  }
391
390
  else {
392
- this.wysiwyg().fontSize(e, range);
391
+ this.service.wysiwyg().fontSize(e, range);
393
392
  this.selectedFont.set(e);
394
393
  }
395
394
  }
@@ -406,23 +405,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
406
405
  * @category Components
407
406
  */
408
407
  class AXWysiwygHistoryComponent {
409
- /** @ignore */
410
408
  constructor() {
411
409
  /** @ignore */
412
410
  this.service = inject(AXWysiwygService);
413
- /** @ignore */
414
- this.wysiwyg = signal(null);
415
- afterNextRender(() => {
416
- this.wysiwyg.set(this.service.wysiwyg());
417
- });
418
411
  }
419
412
  /** @ignore */
420
413
  undo() {
421
- this.wysiwyg().undo();
414
+ this.service.wysiwyg().undo();
422
415
  }
423
416
  /** @ignore */
424
417
  redo() {
425
- this.wysiwyg().redo();
418
+ this.service.wysiwyg().redo();
426
419
  }
427
420
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
428
421
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygHistoryComponent, selector: "ax-wysiwyg-history", ngImport: i0, template: "<ax-button class=\"\" (click)=\"undo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-button class=\"\" (click)=\"redo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n</ax-button>\n", styles: [""], dependencies: [{ kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }], encapsulation: i0.ViewEncapsulation.None }); }
@@ -430,20 +423,17 @@ class AXWysiwygHistoryComponent {
430
423
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygHistoryComponent, decorators: [{
431
424
  type: Component,
432
425
  args: [{ selector: 'ax-wysiwyg-history', encapsulation: ViewEncapsulation.None, template: "<ax-button class=\"\" (click)=\"undo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-undo\"></ax-icon>\n</ax-button>\n\n<ax-button class=\"\" (click)=\"redo()\" look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-redo\"></ax-icon>\n</ax-button>\n" }]
433
- }], ctorParameters: () => [] });
426
+ }] });
434
427
 
435
428
  /**
436
429
  * A container component for WYSIWYG (What You See Is What You Get) editor functionality.
437
430
  * @category Components
438
431
  */
439
432
  class AXWysiwygInsertComponent {
440
- /** @ignore */
441
433
  constructor() {
442
434
  /** @ignore */
443
435
  this.service = inject(AXWysiwygService);
444
436
  /** @ignore */
445
- this.wysiwyg = signal(null);
446
- /** @ignore */
447
437
  this.textBoxOptions = {
448
438
  text: '',
449
439
  placeholder: 'Enter yor url ...',
@@ -457,13 +447,10 @@ class AXWysiwygInsertComponent {
457
447
  offsetX: 0,
458
448
  offsetY: 0,
459
449
  };
460
- afterNextRender(() => {
461
- this.wysiwyg.set(this.service.wysiwyg());
462
- });
463
450
  }
464
451
  /** @ignore */
465
452
  submitLink() {
466
- this.wysiwyg().addImage(this.textBoxOptions.text);
453
+ this.service.wysiwyg().addImage(this.textBoxOptions.text);
467
454
  }
468
455
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygInsertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
469
456
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", type: AXWysiwygInsertComponent, selector: "ax-wysiwyg-insert", ngImport: i0, template: "<ax-button #linkBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-image\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"linkBtn\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane ax-insert-container\">\n <ax-text-box\n class=\"{{ textBoxOptions.size }}\"\n [(ngModel)]=\"textBoxOptions.text\"\n [placeholder]=\"textBoxOptions.placeholder\"\n >\n <ax-suffix>\n <ax-button (click)=\"submitLink()\" class=\"ax-sm\" color=\"secondary\" text=\"Add\"> </ax-button>\n </ax-suffix>\n </ax-text-box>\n </div>\n</ax-popover>\n", styles: [".ax-insert-container{display:flex;padding:.5rem}\n"], dependencies: [{ kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "responsiveOn", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "responsiveOnChange", "loadingTextChange"] }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-sub-title, ax-placeholder, ax-overlay" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.AXPopoverComponent, selector: "ax-popover", inputs: ["offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: i5.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }], encapsulation: i0.ViewEncapsulation.None }); }
@@ -471,7 +458,7 @@ class AXWysiwygInsertComponent {
471
458
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygInsertComponent, decorators: [{
472
459
  type: Component,
473
460
  args: [{ selector: 'ax-wysiwyg-insert', encapsulation: ViewEncapsulation.None, template: "<ax-button #linkBtn look=\"blank\">\n <ax-icon class=\"ax-icon ax-icon-image\"></ax-icon>\n</ax-button>\n\n<ax-popover\n [openOn]=\"popoverOption.openOn\"\n [closeOn]=\"popoverOption.closeOn\"\n [target]=\"linkBtn\"\n [placement]=\"popoverOption.placement\"\n>\n <div class=\"ax-overlay-pane ax-insert-container\">\n <ax-text-box\n class=\"{{ textBoxOptions.size }}\"\n [(ngModel)]=\"textBoxOptions.text\"\n [placeholder]=\"textBoxOptions.placeholder\"\n >\n <ax-suffix>\n <ax-button (click)=\"submitLink()\" class=\"ax-sm\" color=\"secondary\" text=\"Add\"> </ax-button>\n </ax-suffix>\n </ax-text-box>\n </div>\n</ax-popover>\n", styles: [".ax-insert-container{display:flex;padding:.5rem}\n"] }]
474
- }], ctorParameters: () => [] });
461
+ }] });
475
462
 
476
463
  /**
477
464
  * A container component for WYSIWYG (What You See Is What You Get) editor functionality.
@@ -483,49 +470,44 @@ class AXWysiwygListComponent {
483
470
  /** @ignore */
484
471
  this.service = inject(AXWysiwygService);
485
472
  /** @ignore */
486
- this.wysiwyg = signal(null);
487
- /** @ignore */
488
473
  this.listState = signal('');
489
474
  effect(() => {
490
- if (!this.wysiwyg())
475
+ if (!this.service.wysiwyg())
491
476
  return;
492
477
  switch (this.service.currentSelectedElemList()) {
493
478
  case 'ordered':
494
- this.wysiwyg().list('ordered');
479
+ this.service.wysiwyg().list('ordered');
495
480
  this.listState.set('ordered');
496
481
  break;
497
482
  case 'bullet':
498
- this.wysiwyg().list('bullet');
483
+ this.service.wysiwyg().list('bullet');
499
484
  this.listState.set('bullet');
500
485
  break;
501
486
  default:
502
- this.wysiwyg().list('');
487
+ this.service.wysiwyg().list('');
503
488
  this.listState.set('');
504
489
  }
505
490
  }, { allowSignalWrites: true });
506
- afterNextRender(() => {
507
- this.wysiwyg.set(this.service.wysiwyg());
508
- });
509
491
  }
510
492
  /** @ignore */
511
493
  orderList() {
512
494
  if (!this.listState() || this.listState() === 'bullet') {
513
- this.wysiwyg().list('ordered');
495
+ this.service.wysiwyg().list('ordered');
514
496
  this.listState.set('ordered');
515
497
  }
516
498
  else {
517
- this.wysiwyg().list('');
499
+ this.service.wysiwyg().list('');
518
500
  this.listState.set('');
519
501
  }
520
502
  }
521
503
  /** @ignore */
522
504
  unOrderList() {
523
505
  if (!this.listState() || this.listState() === 'ordered') {
524
- this.wysiwyg().list('bullet');
506
+ this.service.wysiwyg().list('bullet');
525
507
  this.listState.set('bullet');
526
508
  }
527
509
  else {
528
- this.wysiwyg().list('');
510
+ this.service.wysiwyg().list('');
529
511
  this.listState.set('');
530
512
  }
531
513
  }