@acorex/components 18.12.42 → 18.12.44-next.0
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/notification/lib/notification.service.mjs +60 -58
- package/esm2022/side-menu/lib/side-menu.component.mjs +2 -2
- package/esm2022/toast/lib/toast.service.mjs +65 -64
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +20 -16
- package/fesm2022/acorex-components-notification.mjs +59 -58
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-side-menu.mjs +2 -2
- package/fesm2022/acorex-components-side-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +63 -63
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +19 -15
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/notification/lib/notification.service.d.ts +3 -3
- package/package.json +1 -1
- package/toast/lib/toast.service.d.ts +3 -3
- package/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.d.ts +2 -3
@@ -2,13 +2,13 @@ import { MXBaseComponent, AXClosbaleComponent } from '@acorex/components/common'
|
|
2
2
|
import * as i1 from '@angular/cdk/dialog';
|
3
3
|
import { DIALOG_DATA, Dialog, DialogModule } from '@angular/cdk/dialog';
|
4
4
|
import * as i0 from '@angular/core';
|
5
|
-
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, InjectionToken, inject,
|
5
|
+
import { Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, HostBinding, InjectionToken, inject, Injectable, NgModule } from '@angular/core';
|
6
6
|
import * as i2 from '@acorex/components/decorators';
|
7
7
|
import { AXDecoratorModule } from '@acorex/components/decorators';
|
8
8
|
import * as i3 from '@angular/common';
|
9
9
|
import { CommonModule } from '@angular/common';
|
10
10
|
import * as i4 from '@acorex/core/translation';
|
11
|
-
import { AXTranslationModule } from '@acorex/core/translation';
|
11
|
+
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
12
12
|
import { AX_GLOBAL_CONFIG } from '@acorex/core/config';
|
13
13
|
import { set } from 'lodash-es';
|
14
14
|
import { AXButtonModule } from '@acorex/components/button';
|
@@ -121,23 +121,16 @@ class AXToastService {
|
|
121
121
|
constructor(scrollStrategyOptions) {
|
122
122
|
this.scrollStrategyOptions = scrollStrategyOptions;
|
123
123
|
this.dialog = inject(Dialog);
|
124
|
+
this.translationService = inject(AXTranslationService);
|
124
125
|
this.defaultConfig = inject(AX_TOAST_CONFIG);
|
125
|
-
this.activeToasts =
|
126
|
-
this.reservedToasts =
|
127
|
-
this.toastCounterElement =
|
128
|
-
this.moreToastsColor =
|
129
|
-
this.moreToastsLocation =
|
130
|
-
this.reserveCounter =
|
131
|
-
this.#effect = effect(() => {
|
132
|
-
if (this.defaultConfig.limit <= 0)
|
133
|
-
return;
|
134
|
-
this.handleShowReservedToast();
|
135
|
-
this.handleShowReservedToastCounter();
|
136
|
-
this.handleReserveCounter();
|
137
|
-
}, { allowSignalWrites: true });
|
126
|
+
this.activeToasts = [];
|
127
|
+
this.reservedToasts = [];
|
128
|
+
this.toastCounterElement = null;
|
129
|
+
this.moreToastsColor = 'primary';
|
130
|
+
this.moreToastsLocation = 'bottom-center';
|
131
|
+
this.reserveCounter = 0;
|
138
132
|
this.scrollStrategy = this.scrollStrategyOptions.noop();
|
139
133
|
}
|
140
|
-
#effect;
|
141
134
|
primary(content) {
|
142
135
|
this.show({
|
143
136
|
timeOut: this.defaultConfig.timeOut,
|
@@ -174,27 +167,27 @@ class AXToastService {
|
|
174
167
|
});
|
175
168
|
}
|
176
169
|
show(config) {
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
},
|
190
|
-
};
|
191
|
-
}
|
170
|
+
config = { ...this.defaultConfig, ...config };
|
171
|
+
this.moreToastsColor = config.color;
|
172
|
+
this.moreToastsLocation = config.location;
|
173
|
+
if (this.defaultConfig.limit > 0 && this.activeToasts.length >= this.defaultConfig.limit) {
|
174
|
+
const reservedRef = {
|
175
|
+
close: () => {
|
176
|
+
console.warn('Reserved notification cannot be closed until it is displayed.');
|
177
|
+
},
|
178
|
+
};
|
179
|
+
this.reservedToasts.push({ config, reservedRef });
|
180
|
+
this.handleReservedToastCounter();
|
181
|
+
return reservedRef;
|
192
182
|
}
|
183
|
+
return this.displayToast(config);
|
184
|
+
}
|
185
|
+
displayToast(config) {
|
193
186
|
const gap = this.defaultConfig.gap;
|
194
|
-
const pos = this.getPosition(
|
195
|
-
const positionStrategy = this.getPositionStrategy(new GlobalPositionStrategy(),
|
187
|
+
const pos = this.getPosition(config.location) + gap + 'px';
|
188
|
+
const positionStrategy = this.getPositionStrategy(new GlobalPositionStrategy(), config.location, pos, gap);
|
196
189
|
const dialogRef = this.dialog.open(AXToastComponent, {
|
197
|
-
data:
|
190
|
+
data: config,
|
198
191
|
autoFocus: '__no_element__',
|
199
192
|
restoreFocus: true,
|
200
193
|
role: 'dialog',
|
@@ -206,12 +199,15 @@ class AXToastService {
|
|
206
199
|
positionStrategy,
|
207
200
|
scrollStrategy: this.scrollStrategy,
|
208
201
|
});
|
209
|
-
this.activeToasts.
|
202
|
+
this.activeToasts.push(dialogRef.id);
|
203
|
+
this.handleReservedToastCounter();
|
210
204
|
const toastRef = dialogRef.componentInstance;
|
211
205
|
dialogRef.closed.subscribe(() => {
|
212
|
-
this.activeToasts
|
206
|
+
this.activeToasts = this.activeToasts.filter((id) => id !== dialogRef.id);
|
207
|
+
this.handleShowReservedToast();
|
208
|
+
this.handleReservedToastCounter();
|
213
209
|
setTimeout(() => {
|
214
|
-
this.reposition(
|
210
|
+
this.reposition(config.location, gap);
|
215
211
|
}, 0);
|
216
212
|
});
|
217
213
|
return {
|
@@ -222,40 +218,45 @@ class AXToastService {
|
|
222
218
|
}
|
223
219
|
hideAll() {
|
224
220
|
this.dialog.closeAll();
|
221
|
+
this.reserveCounter = 0;
|
222
|
+
this.reservedToasts = [];
|
223
|
+
this.activeToasts = [];
|
224
|
+
this.handleReservedToastCounter();
|
225
225
|
}
|
226
226
|
handleShowReservedToast() {
|
227
|
-
if (this.activeToasts
|
227
|
+
if (this.activeToasts.length > this.defaultConfig.limit - 1)
|
228
228
|
return;
|
229
|
-
if (!this.reservedToasts
|
229
|
+
if (!this.reservedToasts.length)
|
230
230
|
return;
|
231
|
-
this.
|
232
|
-
this.
|
233
|
-
|
234
|
-
|
235
|
-
return toasts;
|
236
|
-
});
|
237
|
-
}
|
238
|
-
handleShowReservedToastCounter() {
|
239
|
-
if (this.reservedToasts().length === this.reserveCounter())
|
240
|
-
return;
|
241
|
-
this.reserveCounter.set(this.reservedToasts().length);
|
242
|
-
if (this.toastCounterElement() !== null)
|
243
|
-
this.toastCounterElement().close();
|
244
|
-
this.createReservedCounterToast();
|
231
|
+
const { config, reservedRef } = this.reservedToasts.shift();
|
232
|
+
const displayedRef = this.displayToast(config);
|
233
|
+
this.handleReservedToastCounter();
|
234
|
+
reservedRef.close = displayedRef.close;
|
245
235
|
}
|
246
|
-
|
247
|
-
|
236
|
+
handleReservedToastCounter() {
|
237
|
+
const reservedCount = this.reservedToasts.length;
|
238
|
+
if (reservedCount === this.reserveCounter)
|
248
239
|
return;
|
249
|
-
|
240
|
+
this.reserveCounter = reservedCount;
|
241
|
+
if (reservedCount === 0 && this.toastCounterElement !== null) {
|
242
|
+
this.toastCounterElement.close();
|
250
243
|
return;
|
251
|
-
|
244
|
+
}
|
245
|
+
if (reservedCount > 0) {
|
246
|
+
if (this.toastCounterElement !== null) {
|
247
|
+
this.toastCounterElement.close();
|
248
|
+
}
|
249
|
+
this.createReservedCounterToast();
|
250
|
+
}
|
252
251
|
}
|
253
|
-
createReservedCounterToast() {
|
252
|
+
async createReservedCounterToast() {
|
254
253
|
const opt = {
|
255
254
|
closeButton: false,
|
256
|
-
color: this.moreToastsColor
|
257
|
-
location: this.moreToastsLocation
|
258
|
-
title:
|
255
|
+
color: this.moreToastsColor,
|
256
|
+
location: this.moreToastsLocation,
|
257
|
+
title: await this.translationService.translateAsync('more-toast', {
|
258
|
+
params: { number: this.reserveCounter },
|
259
|
+
}),
|
259
260
|
timeOutProgress: false,
|
260
261
|
};
|
261
262
|
const gap = this.defaultConfig.gap;
|
@@ -274,7 +275,7 @@ class AXToastService {
|
|
274
275
|
positionStrategy,
|
275
276
|
scrollStrategy: this.scrollStrategy,
|
276
277
|
});
|
277
|
-
this.toastCounterElement
|
278
|
+
this.toastCounterElement = dialogRef.componentInstance;
|
278
279
|
}
|
279
280
|
reposition(toastLocation, gap) {
|
280
281
|
const list = this.dialog.openDialogs
|
@@ -282,7 +283,6 @@ class AXToastService {
|
|
282
283
|
.filter((c) => c.config?.location == toastLocation);
|
283
284
|
list.forEach((element, index) => {
|
284
285
|
const pos = this.getRepositionPosition(index, gap, list, toastLocation);
|
285
|
-
console.log(index, element);
|
286
286
|
this.getPositionStrategy(element.dialogRef.config.positionStrategy, toastLocation, pos, gap).apply();
|
287
287
|
});
|
288
288
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../libs/components/toast/src/lib/toast.component.ts","../../../../libs/components/toast/src/lib/toast.component.html","../../../../libs/components/toast/src/lib/toast.config.ts","../../../../libs/components/toast/src/lib/toast.service.ts","../../../../libs/components/toast/src/lib/toast.module.ts","../../../../libs/components/toast/src/acorex-components-toast.ts"],"sourcesContent":["import { AXButtonItem } from '@acorex/components/button';\nimport { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXToastData } from './toast.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\n})\nexport class AXToastComponent extends MXBaseComponent implements OnInit {\n /** @ignore */\n protected _toastWidth = 100;\n\n /** @ignore */\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXToastData,\n public dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /** @ignore */\n override ngOnInit() {\n super.ngOnInit();\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n /** @ignore */\n _handleButtonClick(button: AXButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n /** @ignore */\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span class=\"ax-toast-icon ax-icon-solid {{ _icon }}\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title | translate | async }}\n </div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n@if(config.closeButton){\n<ax-close-button></ax-close-button>\n}\n@if(config.timeOutProgress && config.timeOut){\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"></div>\n}","import { AXLocation } from '@acorex/components/common';\nimport { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\n\nexport interface AXToastConfig {\n gap: number;\n timeOut: number;\n timeOutProgress: boolean;\n location: AXLocation;\n limit: number;\n}\n\nexport const AX_TOAST_CONFIG = new InjectionToken<AXToastConfig>('AX_TOAST_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'layout.toast', AX_TOAST_CONFIG);\n return AXToastDefaultConfig;\n },\n});\n\nexport const AXToastDefaultConfig: AXToastConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n location: 'bottom-center',\n limit: 3,\n};\n\nexport type PartialToastConfig = Partial<AXToastConfig>;\n\nexport function toastConfig(config: PartialToastConfig = {}): AXToastConfig {\n const result = {\n ...AXToastDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXLocation, AXStyleColorType } from '@acorex/components/common';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy, ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { Injectable, effect, inject, signal } from '@angular/core';\nimport { AXToastData, AXToastDisplayConfig, AXToastRef } from './toast.class';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastConfig, AX_TOAST_CONFIG } from './toast.config';\n\n@Injectable()\nexport class AXToastService {\n private dialog: Dialog = inject(Dialog);\n private defaultConfig: AXToastConfig = inject(AX_TOAST_CONFIG);\n private activeToasts = signal<string[]>([]);\n private reservedToasts = signal<AXToastDisplayConfig[]>([]);\n private toastCounterElement = signal<AXToastComponent | null>(null);\n private moreToastsColor = signal<AXStyleColorType>('primary');\n private moreToastsLocation = signal<AXLocation>('bottom-center');\n private reserveCounter = signal(0);\n\n scrollStrategy: ScrollStrategy;\n\n constructor(private readonly scrollStrategyOptions: ScrollStrategyOptions) {\n this.scrollStrategy = this.scrollStrategyOptions.noop();\n }\n\n #effect = effect(\n () => {\n if (this.defaultConfig.limit <= 0) return;\n this.handleShowReservedToast();\n this.handleShowReservedToastCounter();\n this.handleReserveCounter();\n },\n { allowSignalWrites: true },\n );\n\n primary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'primary',\n content: content,\n });\n }\n secondary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'secondary',\n content: content,\n });\n }\n success(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'success',\n content: content,\n });\n }\n warning(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'warning',\n content: content,\n });\n }\n danger(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'danger',\n content: content,\n });\n }\n\n show(config: AXToastDisplayConfig): AXToastRef {\n const opt = Object.assign(\n {\n closeButton: true,\n location: this.defaultConfig.location ?? 'bottom-center',\n },\n config,\n );\n this.moreToastsColor.set(opt.color);\n this.moreToastsLocation.set(opt.location);\n\n if (this.defaultConfig.limit > 0) {\n if (this.activeToasts().length >= this.defaultConfig.limit) {\n this.reservedToasts.update((value) => [...value, opt]);\n return {\n close: () => {\n //TODO close reserved toast\n },\n };\n }\n }\n\n const gap = this.defaultConfig.gap;\n const pos = this.getPosition(opt.location) + gap + 'px';\n const positionStrategy = this.getPositionStrategy(new GlobalPositionStrategy(), opt.location, pos, gap);\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: opt,\n autoFocus: '__no_element__',\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n });\n\n this.activeToasts.update((value) => [...value, dialogRef.id]);\n\n const toastRef = dialogRef.componentInstance as AXToastComponent;\n dialogRef.closed.subscribe(() => {\n this.activeToasts.update((value) => [...value].filter((dialogID) => dialogID !== dialogRef.id));\n setTimeout(() => {\n this.reposition(opt.location, gap);\n }, 0);\n });\n\n return {\n close: () => {\n toastRef.close();\n },\n };\n }\n\n hideAll() {\n this.dialog.closeAll();\n }\n\n private handleShowReservedToast() {\n if (this.activeToasts().length > this.defaultConfig.limit - 1) return;\n if (!this.reservedToasts().length) return;\n this.show(this.reservedToasts()[0]);\n this.reservedToasts.update((value) => {\n const toasts = [...value];\n toasts.shift();\n return toasts;\n });\n }\n\n private handleShowReservedToastCounter() {\n if (this.reservedToasts().length === this.reserveCounter()) return;\n this.reserveCounter.set(this.reservedToasts().length);\n if (this.toastCounterElement() !== null) this.toastCounterElement().close();\n this.createReservedCounterToast();\n }\n\n private handleReserveCounter() {\n if (this.reserveCounter() !== 0) return;\n if (this.toastCounterElement() === null) return;\n this.toastCounterElement().close();\n }\n\n private createReservedCounterToast() {\n const opt: AXToastData = {\n closeButton: false,\n color: this.moreToastsColor(),\n location: this.moreToastsLocation(),\n title: `And ${this.reserveCounter()} more...`,\n timeOutProgress: false,\n };\n const gap = this.defaultConfig.gap;\n const pos = this.getPosition(opt.location) + gap + 'px';\n const positionStrategy = this.getPositionStrategy(new GlobalPositionStrategy(), opt.location, pos, gap);\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: opt,\n autoFocus: '__no_element__',\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n });\n this.toastCounterElement.set(dialogRef.componentInstance as AXToastComponent);\n }\n\n private reposition(toastLocation: AXLocation, gap: number): void {\n const list = this.dialog.openDialogs\n .map((c) => c.componentInstance as AXToastComponent)\n .filter((c) => c.config?.location == toastLocation);\n\n list.forEach((element, index) => {\n const pos = this.getRepositionPosition(index, gap, list, toastLocation);\n console.log(index, element);\n\n this.getPositionStrategy(\n element.dialogRef.config.positionStrategy as GlobalPositionStrategy,\n toastLocation,\n pos,\n gap,\n ).apply();\n });\n }\n\n private getRepositionPosition(index: number, gap: number, list: AXToastComponent[], toastLocation: string) {\n if (index === 0) return gap + 'px';\n const previouseElement = list[index - 1];\n if (toastLocation.split('-')[0] == 'bottom') {\n return window.innerHeight - previouseElement.getHostElement().offsetTop + gap + 'px';\n }\n return (\n previouseElement.getHostElement().offsetTop +\n previouseElement.getHostElement().offsetHeight +\n gap +\n 'px'\n );\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs\n .map((c) => c.componentInstance as AXToastComponent)\n .filter((c) => c.config?.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n }\n return (\n list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight\n );\n }\n\n private getPositionStrategy(\n positionStrategy: GlobalPositionStrategy,\n location: AXLocation,\n pos: string,\n gap: number,\n ) {\n switch (location) {\n case 'bottom-center':\n return positionStrategy.bottom(pos).centerHorizontally();\n break;\n case 'bottom-end':\n return positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n return positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n return positionStrategy.top(pos).centerHorizontally();\n break;\n case 'top-end':\n return positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n return positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n return positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n return positionStrategy.centerVertically().right(gap + 'px');\n break;\n }\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastService } from './toast.service';\n\nconst COMPONENT = [AXToastComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXToastService],\n})\nexport class AXToastModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AAaA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,eAAe,CAAA;AAOnD;;AAEG;IACH,WAES,CAAA,MAAmB,EACnB,SAA2C,EAAA;AAElD,QAAA,KAAK,EAAE;QAHA,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAS,CAAA,SAAA,GAAT,SAAS;;QAXR,IAAW,CAAA,WAAA,GAAG,GAAG;;;IAiBlB,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE;AAChB,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACvB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE;AACd,aAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;;AAEzB,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AACrB,YAAA,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK;AACvB,gBAAA,KAAK,SAAS;AACZ,oBAAA,IAAI,CAAC,KAAK,GAAG,8BAA8B;oBAC3C;AACF,gBAAA,KAAK,SAAS;AACZ,oBAAA,IAAI,CAAC,KAAK,GAAG,yBAAyB;oBACtC;AACF,gBAAA,KAAK,QAAQ;AACX,oBAAA,IAAI,CAAC,KAAK,GAAG,uBAAuB;oBACpC;AACF,gBAAA,KAAK,MAAM;AACT,oBAAA,IAAI,CAAC,KAAK,GAAG,sBAAsB;oBACnC;AACF,gBAAA;oBACE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,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AAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EATP,YAAA,EAAA,CAAA,gBAAgB,CAClB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,aADjG,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAFb,SAAA,EAAA,CAAC,cAAc,CAAC,YAFd,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA;;;AClBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-components-toast.mjs","sources":["../../../../libs/components/toast/src/lib/toast.component.ts","../../../../libs/components/toast/src/lib/toast.component.html","../../../../libs/components/toast/src/lib/toast.config.ts","../../../../libs/components/toast/src/lib/toast.service.ts","../../../../libs/components/toast/src/lib/toast.module.ts","../../../../libs/components/toast/src/acorex-components-toast.ts"],"sourcesContent":["import { AXButtonItem } from '@acorex/components/button';\nimport { AXClosbaleComponent, AXComponentCloseEvent, MXBaseComponent } from '@acorex/components/common';\nimport { DIALOG_DATA, DialogRef } from '@angular/cdk/dialog';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n Inject,\n OnInit,\n ViewEncapsulation,\n} from '@angular/core';\nimport { AXToastData } from './toast.class';\n\n/**\n * The Button is a component which detects user interaction and triggers a corresponding event\n *\n * @category Components\n */\n@Component({\n selector: 'ax-toast',\n templateUrl: './toast.component.html',\n styleUrls: ['./toast.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: AXClosbaleComponent, useExisting: AXToastComponent }],\n})\nexport class AXToastComponent extends MXBaseComponent implements OnInit {\n /** @ignore */\n protected _toastWidth = 100;\n\n /** @ignore */\n protected _icon: string;\n\n /**\n * @ignore\n */\n constructor(\n @Inject(DIALOG_DATA)\n public config: AXToastData,\n public dialogRef: DialogRef<AXComponentCloseEvent>,\n ) {\n super();\n }\n\n /** @ignore */\n override ngOnInit() {\n super.ngOnInit();\n if (this.config.timeOut) {\n setTimeout(() => {\n this.close();\n }, this.config.timeOut);\n }\n if (!this.config.icon) {\n switch (this.config.color) {\n case 'success':\n this._icon = 'ax-icon ax-icon-check-circle';\n break;\n case 'warning':\n this._icon = 'ax-icon ax-icon-warning';\n break;\n case 'danger':\n this._icon = 'ax-icon ax-icon-error';\n break;\n case 'info':\n this._icon = 'ax-icon ax-icon-info';\n break;\n default:\n this._icon = this.config.icon || 'ax-icon ax-icon-check-circle';\n break;\n }\n } else {\n this._icon = this.config.icon;\n }\n }\n\n /** @ignore */\n _handleButtonClick(button: AXButtonItem) {\n if (button.onClick) {\n button.onClick({ source: button });\n }\n }\n\n /** @ignore */\n @HostBinding('class')\n private get __hostClass(): string {\n return `ax-${this.config.color}`;\n }\n\n /** @ignore */\n close() {\n this.dialogRef.close({\n component: this,\n htmlElement: this.getHostElement(),\n });\n }\n}\n","<span class=\"ax-toast-icon ax-icon-solid {{ _icon }}\"></span>\n<div class=\"ax-toast-content\">\n <div class=\"ax-toast-title\" [class.ax-mb-2]=\"config.title && config.content\">{{ config.title | translate | async }}\n </div>\n <div class=\"ax-toast-content\" [innerHTML]=\"config.content\"></div>\n</div>\n@if(config.closeButton){\n<ax-close-button></ax-close-button>\n}\n@if(config.timeOutProgress && config.timeOut){\n<div class=\"ax-toast-progress\" [style.animation-duration.ms]=\"config.timeOut\"></div>\n}","import { AXLocation } from '@acorex/components/common';\nimport { AX_GLOBAL_CONFIG } from '@acorex/core/config';\nimport { InjectionToken, inject } from '@angular/core';\nimport { set } from 'lodash-es';\n\nexport interface AXToastConfig {\n gap: number;\n timeOut: number;\n timeOutProgress: boolean;\n location: AXLocation;\n limit: number;\n}\n\nexport const AX_TOAST_CONFIG = new InjectionToken<AXToastConfig>('AX_TOAST_CONFIG', {\n providedIn: 'root',\n factory: () => {\n const global = inject(AX_GLOBAL_CONFIG);\n set(global, 'layout.toast', AX_TOAST_CONFIG);\n return AXToastDefaultConfig;\n },\n});\n\nexport const AXToastDefaultConfig: AXToastConfig = {\n gap: 5,\n timeOut: 2500,\n timeOutProgress: true,\n location: 'bottom-center',\n limit: 3,\n};\n\nexport type PartialToastConfig = Partial<AXToastConfig>;\n\nexport function toastConfig(config: PartialToastConfig = {}): AXToastConfig {\n const result = {\n ...AXToastDefaultConfig,\n ...config,\n };\n return result;\n}\n","import { AXLocation, AXStyleColorType } from '@acorex/components/common';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Dialog } from '@angular/cdk/dialog';\nimport { GlobalPositionStrategy, ScrollStrategy, ScrollStrategyOptions } from '@angular/cdk/overlay';\nimport { Injectable, inject } from '@angular/core';\nimport { AXToastData, AXToastDisplayConfig, AXToastRef } from './toast.class';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastConfig, AX_TOAST_CONFIG } from './toast.config';\n\ntype AXReservedToasts = {\n config: AXToastDisplayConfig;\n reservedRef: {\n close: () => void;\n };\n};\n\n@Injectable()\nexport class AXToastService {\n private dialog: Dialog = inject(Dialog);\n private translationService: AXTranslationService = inject(AXTranslationService);\n private defaultConfig: AXToastConfig = inject(AX_TOAST_CONFIG);\n private activeToasts: string[] = [];\n private reservedToasts: AXReservedToasts[] = [];\n private toastCounterElement: AXToastComponent | null = null;\n private moreToastsColor: AXStyleColorType = 'primary';\n private moreToastsLocation: AXLocation = 'bottom-center';\n private reserveCounter = 0;\n\n scrollStrategy: ScrollStrategy;\n\n constructor(private readonly scrollStrategyOptions: ScrollStrategyOptions) {\n this.scrollStrategy = this.scrollStrategyOptions.noop();\n }\n\n primary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'primary',\n content: content,\n });\n }\n secondary(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'secondary',\n content: content,\n });\n }\n success(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'success',\n content: content,\n });\n }\n warning(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'warning',\n content: content,\n });\n }\n danger(content: string) {\n this.show({\n timeOut: this.defaultConfig.timeOut,\n color: 'danger',\n content: content,\n });\n }\n\n show(config: AXToastDisplayConfig): AXToastRef {\n config = { ...this.defaultConfig, ...config };\n\n this.moreToastsColor = config.color;\n this.moreToastsLocation = config.location;\n\n if (this.defaultConfig.limit > 0 && this.activeToasts.length >= this.defaultConfig.limit) {\n const reservedRef = {\n close: () => {\n console.warn('Reserved notification cannot be closed until it is displayed.');\n },\n };\n this.reservedToasts.push({ config, reservedRef });\n this.handleReservedToastCounter();\n return reservedRef;\n }\n\n return this.displayToast(config);\n }\n\n private displayToast(config: AXToastDisplayConfig): AXToastRef {\n const gap = this.defaultConfig.gap;\n const pos = this.getPosition(config.location) + gap + 'px';\n const positionStrategy = this.getPositionStrategy(\n new GlobalPositionStrategy(),\n config.location,\n pos,\n gap,\n );\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: config,\n autoFocus: '__no_element__',\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n });\n\n this.activeToasts.push(dialogRef.id);\n this.handleReservedToastCounter();\n\n const toastRef = dialogRef.componentInstance as AXToastComponent;\n dialogRef.closed.subscribe(() => {\n this.activeToasts = this.activeToasts.filter((id) => id !== dialogRef.id);\n\n this.handleShowReservedToast();\n this.handleReservedToastCounter();\n\n setTimeout(() => {\n this.reposition(config.location, gap);\n }, 0);\n });\n\n return {\n close: () => {\n toastRef.close();\n },\n };\n }\n\n hideAll() {\n this.dialog.closeAll();\n this.reserveCounter = 0;\n this.reservedToasts = [];\n this.activeToasts = [];\n this.handleReservedToastCounter();\n }\n\n private handleShowReservedToast() {\n if (this.activeToasts.length > this.defaultConfig.limit - 1) return;\n if (!this.reservedToasts.length) return;\n\n const { config, reservedRef } = this.reservedToasts.shift();\n\n const displayedRef = this.displayToast(config);\n this.handleReservedToastCounter();\n reservedRef.close = displayedRef.close;\n }\n\n private handleReservedToastCounter() {\n const reservedCount = this.reservedToasts.length;\n\n if (reservedCount === this.reserveCounter) return;\n\n this.reserveCounter = reservedCount;\n\n if (reservedCount === 0 && this.toastCounterElement !== null) {\n this.toastCounterElement.close();\n return;\n }\n\n if (reservedCount > 0) {\n if (this.toastCounterElement !== null) {\n this.toastCounterElement.close();\n }\n this.createReservedCounterToast();\n }\n }\n\n private async createReservedCounterToast() {\n const opt: AXToastData = {\n closeButton: false,\n color: this.moreToastsColor,\n location: this.moreToastsLocation,\n title: await this.translationService.translateAsync('more-toast', {\n params: { number: this.reserveCounter },\n }),\n timeOutProgress: false,\n };\n const gap = this.defaultConfig.gap;\n const pos = this.getPosition(opt.location) + gap + 'px';\n const positionStrategy = this.getPositionStrategy(new GlobalPositionStrategy(), opt.location, pos, gap);\n const dialogRef = this.dialog.open(AXToastComponent, {\n data: opt,\n autoFocus: '__no_element__',\n restoreFocus: true,\n role: 'dialog',\n ariaModal: true,\n closeOnNavigation: true,\n closeOnDestroy: true,\n hasBackdrop: false,\n panelClass: ['ax-animate-animated', 'ax-animate-fadeIn', 'ax-animate-faster'],\n positionStrategy,\n scrollStrategy: this.scrollStrategy,\n });\n this.toastCounterElement = dialogRef.componentInstance as AXToastComponent;\n }\n\n private reposition(toastLocation: AXLocation, gap: number): void {\n const list = this.dialog.openDialogs\n .map((c) => c.componentInstance as AXToastComponent)\n .filter((c) => c.config?.location == toastLocation);\n\n list.forEach((element, index) => {\n const pos = this.getRepositionPosition(index, gap, list, toastLocation);\n\n this.getPositionStrategy(\n element.dialogRef.config.positionStrategy as GlobalPositionStrategy,\n toastLocation,\n pos,\n gap,\n ).apply();\n });\n }\n\n private getRepositionPosition(index: number, gap: number, list: AXToastComponent[], toastLocation: string) {\n if (index === 0) return gap + 'px';\n const previouseElement = list[index - 1];\n if (toastLocation.split('-')[0] == 'bottom') {\n return window.innerHeight - previouseElement.getHostElement().offsetTop + gap + 'px';\n }\n return (\n previouseElement.getHostElement().offsetTop +\n previouseElement.getHostElement().offsetHeight +\n gap +\n 'px'\n );\n }\n\n private getPosition(location: string) {\n const list = this.dialog.openDialogs\n .map((c) => c.componentInstance as AXToastComponent)\n .filter((c) => c.config?.location == location);\n if (list.length == 0) return 0;\n if (location.split('-')[0] == 'bottom') {\n return window.innerHeight - list[list.length - 1].getHostElement().offsetTop;\n }\n return (\n list[list.length - 1].getHostElement().offsetTop + list[list.length - 1].getHostElement().offsetHeight\n );\n }\n\n private getPositionStrategy(\n positionStrategy: GlobalPositionStrategy,\n location: AXLocation,\n pos: string,\n gap: number,\n ) {\n switch (location) {\n case 'bottom-center':\n return positionStrategy.bottom(pos).centerHorizontally();\n break;\n case 'bottom-end':\n return positionStrategy.bottom(pos).right(gap + 'px');\n break;\n case 'bottom-start':\n return positionStrategy.bottom(pos).left(gap + 'px');\n break;\n case 'top-center':\n return positionStrategy.top(pos).centerHorizontally();\n break;\n case 'top-end':\n return positionStrategy.top(pos).right(gap + 'px');\n break;\n case 'top-start':\n return positionStrategy.top(pos).left(gap + 'px');\n break;\n case 'center-start':\n return positionStrategy.centerVertically().left(gap + 'px');\n break;\n case 'center-end':\n return positionStrategy.centerVertically().right(gap + 'px');\n break;\n }\n }\n}\n","import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { DialogModule } from '@angular/cdk/dialog';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AXToastComponent } from './toast.component';\nimport { AXToastService } from './toast.service';\n\nconst COMPONENT = [AXToastComponent];\nconst MODULES = [CommonModule, AXButtonModule, AXDecoratorModule, AXLoadingModule, DialogModule, AXTranslationModule];\n\n@NgModule({\n declarations: [...COMPONENT],\n imports: [...MODULES],\n exports: [...COMPONENT],\n providers: [AXToastService],\n})\nexport class AXToastModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;AAaA;;;;AAIG;AASG,MAAO,gBAAiB,SAAQ,eAAe,CAAA;AAOnD;;AAEG;IACH,WAES,CAAA,MAAmB,EACnB,SAA2C,EAAA;AAElD,QAAA,KAAK,EAAE;QAHA,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAS,CAAA,SAAA,GAAT,SAAS;;QAXR,IAAW,CAAA,WAAA,GAAG,GAAG;;;IAiBlB,QAAQ,GAAA;QACf,KAAK,CAAC,QAAQ,EAAE;AAChB,QAAA,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YACvB,UAAU,CAAC,MAAK;gBACd,IAAI,CAAC,KAAK,EAAE;AACd,aAAC,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;;AAEzB,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;AACrB,YAA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,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,CAAC;MAQxG,aAAa,CAAA;8GAAb,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EATP,YAAA,EAAA,CAAA,gBAAgB,CAClB,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,aADjG,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAStB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,EAFb,SAAA,EAAA,CAAC,cAAc,CAAC,YAFd,OAAO,CAAA,EAAA,CAAA,CAAA;;2FAIT,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,GAAG,SAAS,CAAC;AAC5B,oBAAA,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC;AACrB,oBAAA,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;oBACvB,SAAS,EAAE,CAAC,cAAc,CAAC;AAC5B,iBAAA;;;AClBD;;AAEG;;;;"}
|
@@ -55,6 +55,7 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
55
55
|
*
|
56
56
|
*/
|
57
57
|
this.placeHolder = input();
|
58
|
+
this.isQuillLoaded = signal(false);
|
58
59
|
this.#init = afterNextRender(() => {
|
59
60
|
const view = this.getHostElement().querySelector('ax-wysiwyg-view');
|
60
61
|
this.zone.runOutsideAngular(async () => {
|
@@ -64,28 +65,29 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
64
65
|
readOnly: true,
|
65
66
|
});
|
66
67
|
this.service.wysiwyg.set(newWysiwyg);
|
68
|
+
this.isQuillLoaded.set(true);
|
67
69
|
}
|
68
70
|
});
|
69
71
|
});
|
70
72
|
this.#effect1 = effect(() => {
|
71
|
-
if (this.
|
73
|
+
if (!this.isQuillLoaded())
|
74
|
+
return;
|
75
|
+
if (this.placeHolder()) {
|
72
76
|
this.service.wysiwyg().quillObj().root.setAttribute('data-placeholder', this.placeHolder());
|
73
77
|
}
|
74
|
-
else
|
78
|
+
else {
|
75
79
|
this.service.wysiwyg().quillObj().root.setAttribute('data-placeholder', 'Write Your Message ...');
|
76
80
|
}
|
77
81
|
});
|
78
82
|
this.#effect2 = effect(() => {
|
79
|
-
if (this.
|
83
|
+
if (this.isQuillLoaded() && this.value) {
|
80
84
|
this.service.wysiwyg().quillObj().root.innerHTML = this.value;
|
81
85
|
}
|
82
86
|
});
|
83
87
|
this.#effect3 = effect(() => {
|
84
|
-
if (this.
|
88
|
+
if (this.isQuillLoaded()) {
|
85
89
|
this.service.wysiwyg().quillObj().on('text-change', this.changeHandler.bind(this));
|
86
|
-
this.
|
87
|
-
this.service.wysiwyg()?.quillObj().enable();
|
88
|
-
}, 1000);
|
90
|
+
this.service.wysiwyg()?.quillObj().enable();
|
89
91
|
}
|
90
92
|
});
|
91
93
|
}
|
@@ -101,6 +103,7 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
101
103
|
const value = this.service.wysiwyg()?.quillObj().root.innerHTML;
|
102
104
|
if (value === '<p><br></p>' || !value) {
|
103
105
|
this.commitValue(null);
|
106
|
+
this.quillChangeTriggred.set(false);
|
104
107
|
if (this.service.isEditorClean())
|
105
108
|
return;
|
106
109
|
this.service.isEditorClean.set(true);
|
@@ -110,25 +113,26 @@ class AXWysiwygContainerComponent extends classes((MXInputBaseValueComponent), M
|
|
110
113
|
const cfg = { inlineStyles: true };
|
111
114
|
const converter = new QuillDeltaToHtmlConverter(delta, cfg);
|
112
115
|
const html = converter.convert();
|
113
|
-
this.commitValue(html);
|
116
|
+
this.commitValue(html, true);
|
117
|
+
this.quillChangeTriggred.set(false);
|
114
118
|
if (!this.service.isEditorClean())
|
115
119
|
return;
|
116
120
|
this.service.isEditorClean.set(false);
|
117
121
|
}
|
118
|
-
this.quillChangeTriggred.set(false);
|
119
|
-
}
|
120
|
-
/** @ignore */
|
121
|
-
ngOnDestroy() {
|
122
|
-
this.service.wysiwyg()?.quillObj().off('text-change', this.changeHandler);
|
123
|
-
clearTimeout(this.setTimeOut);
|
124
122
|
}
|
125
123
|
internalValueChanged(value) {
|
124
|
+
if (!this.isQuillLoaded())
|
125
|
+
return;
|
126
126
|
if (this.quillChangeTriggred())
|
127
127
|
return;
|
128
128
|
this.ngModleChangeTriggred.set(true);
|
129
|
-
this.service.wysiwyg()
|
129
|
+
this.service.wysiwyg().quillObj().root.innerHTML = value;
|
130
130
|
this.ngModleChangeTriggred.set(false);
|
131
131
|
}
|
132
|
+
/** @ignore */
|
133
|
+
ngOnDestroy() {
|
134
|
+
this.service.wysiwyg()?.quillObj().off('text-change', this.changeHandler);
|
135
|
+
}
|
132
136
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: AXWysiwygContainerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
133
137
|
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: [
|
134
138
|
AXWysiwygService,
|