{"version":3,"sources":["node_modules/ngx-quill/fesm2022/ngx-quill-config.mjs","node_modules/@angular/core/fesm2022/rxjs-interop.mjs","node_modules/ngx-quill/fesm2022/ngx-quill.mjs","src/app/components/UI/text-editor/text-editor.service.ts","src/app/components/UI/text-editor/text-editor.component.ts","src/app/components/UI/text-editor/text-editor.component.html","src/app/components/UI/email-composer/EmailComposer.ts","src/app/components/UI/email-composer/email-composer.component.ts","src/app/components/UI/email-composer/email-composer.component.html","src/app/components/pages/test-page/test-page.component.ts","src/app/components/pages/test-page/test-page.component.html"],"sourcesContent":["import * as i0 from '@angular/core';\nimport { InjectionToken, NgModule, makeEnvironmentProviders } from '@angular/core';\nconst defaultModules = {\n toolbar: [['bold', 'italic', 'underline', 'strike'],\n // toggled buttons\n ['blockquote', 'code-block'], [{\n header: 1\n }, {\n header: 2\n }],\n // custom button values\n [{\n list: 'ordered'\n }, {\n list: 'bullet'\n }], [{\n script: 'sub'\n }, {\n script: 'super'\n }],\n // superscript/subscript\n [{\n indent: '-1'\n }, {\n indent: '+1'\n }],\n // outdent/indent\n [{\n direction: 'rtl'\n }],\n // text direction\n [{\n size: ['small', false, 'large', 'huge']\n }],\n // custom dropdown\n [{\n header: [1, 2, 3, 4, 5, 6, false]\n }], [{\n color: []\n }, {\n background: []\n }],\n // dropdown with defaults from theme\n [{\n font: []\n }], [{\n align: []\n }], ['clean'],\n // remove formatting button\n ['link', 'image', 'video'],\n // link and image, video\n ['table']]\n};\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst QUILL_CONFIG_TOKEN = new InjectionToken('config', {\n providedIn: 'root',\n factory: () => ({\n modules: defaultModules\n })\n});\n\n/**\n * This `NgModule` provides a global Quill config on the root level, e.g., in `AppModule`.\n * But this eliminates the need to import the entire `ngx-quill` library into the main bundle.\n * The `quill-editor` itself may be rendered in any lazy-loaded module, but importing `QuillModule`\n * into the `AppModule` will bundle the `ngx-quill` into the vendor.\n */\nlet QuillConfigModule = /*#__PURE__*/(() => {\n class QuillConfigModule {\n static forRoot(config) {\n return {\n ngModule: QuillConfigModule,\n providers: [{\n provide: QUILL_CONFIG_TOKEN,\n useValue: config\n }]\n };\n }\n static {\n this.ɵfac = function QuillConfigModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || QuillConfigModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: QuillConfigModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return QuillConfigModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Provides Quill configuration at the root level:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideQuillConfig(...)]\n * });\n * ```\n */\nconst provideQuillConfig = config => makeEnvironmentProviders([{\n provide: QUILL_CONFIG_TOKEN,\n useValue: config\n}]);\n\n/*\n * Public API Surface of ngx-quill/config\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { QUILL_CONFIG_TOKEN, QuillConfigModule, defaultModules, provideQuillConfig };\n","/**\n * @license Angular v18.2.9\n * (c) 2010-2024 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { assertInInjectionContext, inject, DestroyRef, ɵRuntimeError, ɵgetOutputDestroyRef, Injector, effect, untracked, assertNotInReactiveContext, signal, computed } from '@angular/core';\nimport { Observable, ReplaySubject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Operator which completes the Observable when the calling context (component, directive, service,\n * etc) is destroyed.\n *\n * @param destroyRef optionally, the `DestroyRef` representing the current context. This can be\n * passed explicitly to use `takeUntilDestroyed` outside of an [injection\n * context](guide/di/dependency-injection-context). Otherwise, the current `DestroyRef` is injected.\n *\n * @developerPreview\n */\nfunction takeUntilDestroyed(destroyRef) {\n if (!destroyRef) {\n assertInInjectionContext(takeUntilDestroyed);\n destroyRef = inject(DestroyRef);\n }\n const destroyed$ = new Observable(observer => {\n const unregisterFn = destroyRef.onDestroy(observer.next.bind(observer));\n return unregisterFn;\n });\n return source => {\n return source.pipe(takeUntil(destroyed$));\n };\n}\n\n/**\n * Implementation of `OutputRef` that emits values from\n * an RxJS observable source.\n *\n * @internal\n */\nclass OutputFromObservableRef {\n constructor(source) {\n this.source = source;\n this.destroyed = false;\n this.destroyRef = inject(DestroyRef);\n this.destroyRef.onDestroy(() => {\n this.destroyed = true;\n });\n }\n subscribe(callbackFn) {\n if (this.destroyed) {\n throw new ɵRuntimeError(953 /* ɵRuntimeErrorCode.OUTPUT_REF_DESTROYED */, ngDevMode && 'Unexpected subscription to destroyed `OutputRef`. ' + 'The owning directive/component is destroyed.');\n }\n // Stop yielding more values when the directive/component is already destroyed.\n const subscription = this.source.pipe(takeUntilDestroyed(this.destroyRef)).subscribe({\n next: value => callbackFn(value)\n });\n return {\n unsubscribe: () => subscription.unsubscribe()\n };\n }\n}\n/**\n * Declares an Angular output that is using an RxJS observable as a source\n * for events dispatched to parent subscribers.\n *\n * The behavior for an observable as source is defined as followed:\n * 1. New values are forwarded to the Angular output (next notifications).\n * 2. Errors notifications are not handled by Angular. You need to handle these manually.\n * For example by using `catchError`.\n * 3. Completion notifications stop the output from emitting new values.\n *\n * @usageNotes\n * Initialize an output in your directive by declaring a\n * class field and initializing it with the `outputFromObservable()` function.\n *\n * ```ts\n * @Directive({..})\n * export class MyDir {\n * nameChange$ = ;\n * nameChange = outputFromObservable(this.nameChange$);\n * }\n * ```\n *\n * @developerPreview\n */\nfunction outputFromObservable(observable, opts) {\n ngDevMode && assertInInjectionContext(outputFromObservable);\n return new OutputFromObservableRef(observable);\n}\n\n/**\n * Converts an Angular output declared via `output()` or `outputFromObservable()`\n * to an observable.\n *\n * You can subscribe to the output via `Observable.subscribe` then.\n *\n * @developerPreview\n */\nfunction outputToObservable(ref) {\n const destroyRef = ɵgetOutputDestroyRef(ref);\n return new Observable(observer => {\n // Complete the observable upon directive/component destroy.\n // Note: May be `undefined` if an `EventEmitter` is declared outside\n // of an injection context.\n destroyRef?.onDestroy(() => observer.complete());\n const subscription = ref.subscribe(v => observer.next(v));\n return () => subscription.unsubscribe();\n });\n}\n\n/**\n * Exposes the value of an Angular `Signal` as an RxJS `Observable`.\n *\n * The signal's value will be propagated into the `Observable`'s subscribers using an `effect`.\n *\n * `toObservable` must be called in an injection context unless an injector is provided via options.\n *\n * @developerPreview\n */\nfunction toObservable(source, options) {\n !options?.injector && assertInInjectionContext(toObservable);\n const injector = options?.injector ?? inject(Injector);\n const subject = new ReplaySubject(1);\n const watcher = effect(() => {\n let value;\n try {\n value = source();\n } catch (err) {\n untracked(() => subject.error(err));\n return;\n }\n untracked(() => subject.next(value));\n }, {\n injector,\n manualCleanup: true\n });\n injector.get(DestroyRef).onDestroy(() => {\n watcher.destroy();\n subject.complete();\n });\n return subject.asObservable();\n}\n\n/**\n * Get the current value of an `Observable` as a reactive `Signal`.\n *\n * `toSignal` returns a `Signal` which provides synchronous reactive access to values produced\n * by the given `Observable`, by subscribing to that `Observable`. The returned `Signal` will always\n * have the most recent value emitted by the subscription, and will throw an error if the\n * `Observable` errors.\n *\n * With `requireSync` set to `true`, `toSignal` will assert that the `Observable` produces a value\n * immediately upon subscription. No `initialValue` is needed in this case, and the returned signal\n * does not include an `undefined` type.\n *\n * By default, the subscription will be automatically cleaned up when the current [injection\n * context](guide/di/dependency-injection-context) is destroyed. For example, when `toSignal` is\n * called during the construction of a component, the subscription will be cleaned up when the\n * component is destroyed. If an injection context is not available, an explicit `Injector` can be\n * passed instead.\n *\n * If the subscription should persist until the `Observable` itself completes, the `manualCleanup`\n * option can be specified instead, which disables the automatic subscription teardown. No injection\n * context is needed in this configuration as well.\n *\n * @developerPreview\n */\nfunction toSignal(source, options) {\n ngDevMode && assertNotInReactiveContext(toSignal, 'Invoking `toSignal` causes new subscriptions every time. ' + 'Consider moving `toSignal` outside of the reactive context and read the signal value where needed.');\n const requiresCleanup = !options?.manualCleanup;\n requiresCleanup && !options?.injector && assertInInjectionContext(toSignal);\n const cleanupRef = requiresCleanup ? options?.injector?.get(DestroyRef) ?? inject(DestroyRef) : null;\n const equal = makeToSignalEqual(options?.equal);\n // Note: T is the Observable value type, and U is the initial value type. They don't have to be\n // the same - the returned signal gives values of type `T`.\n let state;\n if (options?.requireSync) {\n // Initially the signal is in a `NoValue` state.\n state = signal({\n kind: 0 /* StateKind.NoValue */\n }, {\n equal\n });\n } else {\n // If an initial value was passed, use it. Otherwise, use `undefined` as the initial value.\n state = signal({\n kind: 1 /* StateKind.Value */,\n value: options?.initialValue\n }, {\n equal\n });\n }\n // Note: This code cannot run inside a reactive context (see assertion above). If we'd support\n // this, we would subscribe to the observable outside of the current reactive context, avoiding\n // that side-effect signal reads/writes are attribute to the current consumer. The current\n // consumer only needs to be notified when the `state` signal changes through the observable\n // subscription. Additional context (related to async pipe):\n // https://github.com/angular/angular/pull/50522.\n const sub = source.subscribe({\n next: value => state.set({\n kind: 1 /* StateKind.Value */,\n value\n }),\n error: error => {\n if (options?.rejectErrors) {\n // Kick the error back to RxJS. It will be caught and rethrown in a macrotask, which causes\n // the error to end up as an uncaught exception.\n throw error;\n }\n state.set({\n kind: 2 /* StateKind.Error */,\n error\n });\n }\n // Completion of the Observable is meaningless to the signal. Signals don't have a concept of\n // \"complete\".\n });\n if (options?.requireSync && state().kind === 0 /* StateKind.NoValue */) {\n throw new ɵRuntimeError(601 /* ɵRuntimeErrorCode.REQUIRE_SYNC_WITHOUT_SYNC_EMIT */, (typeof ngDevMode === 'undefined' || ngDevMode) && '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.');\n }\n // Unsubscribe when the current context is destroyed, if requested.\n cleanupRef?.onDestroy(sub.unsubscribe.bind(sub));\n // The actual returned signal is a `computed` of the `State` signal, which maps the various states\n // to either values or errors.\n return computed(() => {\n const current = state();\n switch (current.kind) {\n case 1 /* StateKind.Value */:\n return current.value;\n case 2 /* StateKind.Error */:\n throw current.error;\n case 0 /* StateKind.NoValue */:\n // This shouldn't really happen because the error is thrown on creation.\n throw new ɵRuntimeError(601 /* ɵRuntimeErrorCode.REQUIRE_SYNC_WITHOUT_SYNC_EMIT */, (typeof ngDevMode === 'undefined' || ngDevMode) && '`toSignal()` called with `requireSync` but `Observable` did not emit synchronously.');\n }\n }, {\n equal: options?.equal\n });\n}\nfunction makeToSignalEqual(userEquality = Object.is) {\n return (a, b) => a.kind === 1 /* StateKind.Value */ && b.kind === 1 /* StateKind.Value */ && userEquality(a.value, b.value);\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { outputFromObservable, outputToObservable, takeUntilDestroyed, toObservable, toSignal };\n","import { defaultModules, QUILL_CONFIG_TOKEN } from 'ngx-quill/config';\nconst _c0 = [[[\"\", \"above-quill-editor-toolbar\", \"\"]], [[\"\", \"quill-editor-toolbar\", \"\"]], [[\"\", \"below-quill-editor-toolbar\", \"\"]]];\nconst _c1 = [\"[above-quill-editor-toolbar]\", \"[quill-editor-toolbar]\", \"[below-quill-editor-toolbar]\"];\nfunction QuillEditorComponent_Conditional_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n}\nfunction QuillEditorComponent_Conditional_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n}\nexport * from 'ngx-quill/config';\nimport * as i0 from '@angular/core';\nimport { Injectable, Optional, Inject, input, EventEmitter, signal, inject, ElementRef, ChangeDetectorRef, PLATFORM_ID, Renderer2, NgZone, DestroyRef, SecurityContext, Directive, Output, forwardRef, Component, ViewEncapsulation, NgModule } from '@angular/core';\nimport { DOCUMENT, isPlatformServer, NgClass } from '@angular/common';\nimport * as i1 from '@angular/platform-browser';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Observable, defer, isObservable, firstValueFrom, Subscription, fromEvent } from 'rxjs';\nimport { shareReplay, mergeMap, debounceTime } from 'rxjs/operators';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';\nconst getFormat = (format, configFormat) => {\n const passedFormat = format || configFormat;\n return passedFormat || 'html';\n};\nconst raf$ = () => {\n return new Observable(subscriber => {\n const rafId = requestAnimationFrame(() => {\n subscriber.next();\n subscriber.complete();\n });\n return () => cancelAnimationFrame(rafId);\n });\n};\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nlet QuillService = /*#__PURE__*/(() => {\n class QuillService {\n constructor(injector, config) {\n this.config = config;\n this.quill$ = defer(async () => {\n if (!this.Quill) {\n // Quill adds events listeners on import https://github.com/quilljs/quill/blob/develop/core/emitter.js#L8\n // We'd want to use the unpatched `addEventListener` method to have all event callbacks to be run outside of zone.\n // We don't know yet if the `zone.js` is used or not, just save the value to restore it back further.\n const maybePatchedAddEventListener = this.document.addEventListener;\n // There're 2 types of Angular applications:\n // 1) zone-full (by default)\n // 2) zone-less\n // The developer can avoid importing the `zone.js` package and tells Angular that he/she is responsible for running\n // the change detection by himself. This is done by \"nooping\" the zone through `CompilerOptions` when bootstrapping\n // the root module. We fallback to `document.addEventListener` if `__zone_symbol__addEventListener` is not defined,\n // this means the `zone.js` is not imported.\n // The `__zone_symbol__addEventListener` is basically a native DOM API, which is not patched by zone.js, thus not even going\n // through the `zone.js` task lifecycle. You can also access the native DOM API as follows `target[Zone.__symbol__('methodName')]`.\n this.document.addEventListener =\n // eslint-disable-next-line @typescript-eslint/dot-notation\n this.document['__zone_symbol__addEventListener'] || this.document.addEventListener;\n const quillImport = await import('quill');\n this.document.addEventListener = maybePatchedAddEventListener;\n this.Quill =\n // seems like esmodules have nested \"default\"\n quillImport.default?.default ?? quillImport.default ?? quillImport;\n }\n // Only register custom options and modules once\n this.config.customOptions?.forEach(customOption => {\n const newCustomOption = this.Quill.import(customOption.import);\n newCustomOption.whitelist = customOption.whitelist;\n this.Quill.register(newCustomOption, true, this.config.suppressGlobalRegisterWarning);\n });\n return await this.registerCustomModules(this.Quill, this.config.customModules, this.config.suppressGlobalRegisterWarning);\n }).pipe(shareReplay({\n bufferSize: 1,\n refCount: true\n }));\n this.document = injector.get(DOCUMENT);\n if (!this.config) {\n this.config = {\n modules: defaultModules\n };\n }\n }\n getQuill() {\n return this.quill$;\n }\n /**\n * Marked as internal so it won't be available for `ngx-quill` consumers, this is only\n * internal method to be used within the library.\n *\n * @internal\n */\n async registerCustomModules(Quill, customModules, suppressGlobalRegisterWarning) {\n if (Array.isArray(customModules)) {\n // eslint-disable-next-line prefer-const\n for (let {\n implementation,\n path\n } of customModules) {\n // The `implementation` might be an observable that resolves the actual implementation,\n // e.g. if it should be lazy loaded.\n if (isObservable(implementation)) {\n implementation = await firstValueFrom(implementation);\n }\n Quill.register(path, implementation, suppressGlobalRegisterWarning);\n }\n }\n // Return `Quill` constructor so we'll be able to re-use its return value except of using\n // `map` operators, etc.\n return Quill;\n }\n static {\n this.ɵfac = function QuillService_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || QuillService)(i0.ɵɵinject(i0.Injector), i0.ɵɵinject(QUILL_CONFIG_TOKEN, 8));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: QuillService,\n factory: QuillService.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return QuillService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line @angular-eslint/directive-class-suffix\nlet QuillEditorBase = /*#__PURE__*/(() => {\n class QuillEditorBase {\n constructor() {\n this.format = input(undefined);\n this.theme = input(undefined);\n this.modules = input(undefined);\n this.debug = input(false);\n this.readOnly = input(false);\n this.placeholder = input(undefined);\n this.maxLength = input(undefined);\n this.minLength = input(undefined);\n this.required = input(false);\n this.formats = input(undefined);\n this.customToolbarPosition = input('top');\n this.sanitize = input(undefined);\n this.beforeRender = input(undefined);\n this.styles = input(null);\n this.registry = input(undefined);\n this.bounds = input(undefined);\n this.customOptions = input([]);\n this.customModules = input([]);\n this.trackChanges = input(undefined);\n this.classes = input(undefined);\n this.trimOnValidation = input(false);\n this.linkPlaceholder = input(undefined);\n this.compareValues = input(false);\n this.filterNull = input(false);\n this.debounceTime = input(undefined);\n /*\n https://github.com/KillerCodeMonkey/ngx-quill/issues/1257 - fix null value set\n provide default empty value\n by default null\n e.g. defaultEmptyValue=\"\" - empty string\n \n */\n this.defaultEmptyValue = input(null);\n this.onEditorCreated = new EventEmitter();\n this.onEditorChanged = new EventEmitter();\n this.onContentChanged = new EventEmitter();\n this.onSelectionChanged = new EventEmitter();\n this.onFocus = new EventEmitter();\n this.onBlur = new EventEmitter();\n this.onNativeFocus = new EventEmitter();\n this.onNativeBlur = new EventEmitter();\n this.disabled = false; // used to store initial value before ViewInit\n this.toolbarPosition = signal('top');\n this.subscription = null;\n this.quillSubscription = null;\n this.elementRef = inject(ElementRef);\n this.document = inject(DOCUMENT);\n this.cd = inject(ChangeDetectorRef);\n this.domSanitizer = inject(DomSanitizer);\n this.platformId = inject(PLATFORM_ID);\n this.renderer = inject(Renderer2);\n this.zone = inject(NgZone);\n this.service = inject(QuillService);\n this.destroyRef = inject(DestroyRef);\n this.valueGetter = input(quillEditor => {\n let html = quillEditor.getSemanticHTML();\n if (this.isEmptyValue(html)) {\n html = this.defaultEmptyValue();\n }\n let modelValue = html;\n const format = getFormat(this.format(), this.service.config.format);\n if (format === 'text') {\n modelValue = quillEditor.getText();\n } else if (format === 'object') {\n modelValue = quillEditor.getContents();\n } else if (format === 'json') {\n try {\n modelValue = JSON.stringify(quillEditor.getContents());\n } catch (e) {\n modelValue = quillEditor.getText();\n }\n }\n return modelValue;\n });\n this.valueSetter = input((quillEditor, value) => {\n const format = getFormat(this.format(), this.service.config.format);\n if (format === 'html') {\n const sanitize = [true, false].includes(this.sanitize()) ? this.sanitize() : this.service.config.sanitize || false;\n if (sanitize) {\n value = this.domSanitizer.sanitize(SecurityContext.HTML, value);\n }\n return quillEditor.clipboard.convert({\n html: value\n });\n } else if (format === 'json') {\n try {\n return JSON.parse(value);\n } catch (e) {\n return [{\n insert: value\n }];\n }\n }\n return value;\n });\n this.selectionChangeHandler = (range, oldRange, source) => {\n const trackChanges = this.trackChanges() || this.service.config.trackChanges;\n const shouldTriggerOnModelTouched = !range && !!this.onModelTouched && (source === 'user' || trackChanges && trackChanges === 'all');\n // only emit changes when there's any listener\n if (!this.onBlur.observed && !this.onFocus.observed && !this.onSelectionChanged.observed && !shouldTriggerOnModelTouched) {\n return;\n }\n this.zone.run(() => {\n if (range === null) {\n this.onBlur.emit({\n editor: this.quillEditor,\n source\n });\n } else if (oldRange === null) {\n this.onFocus.emit({\n editor: this.quillEditor,\n source\n });\n }\n this.onSelectionChanged.emit({\n editor: this.quillEditor,\n oldRange,\n range,\n source\n });\n if (shouldTriggerOnModelTouched) {\n this.onModelTouched();\n }\n this.cd.markForCheck();\n });\n };\n this.textChangeHandler = (delta, oldDelta, source) => {\n // only emit changes emitted by user interactions\n const text = this.quillEditor.getText();\n const content = this.quillEditor.getContents();\n let html = this.quillEditor.getSemanticHTML();\n if (this.isEmptyValue(html)) {\n html = this.defaultEmptyValue();\n }\n const trackChanges = this.trackChanges() || this.service.config.trackChanges;\n const shouldTriggerOnModelChange = (source === 'user' || trackChanges && trackChanges === 'all') && !!this.onModelChange;\n // only emit changes when there's any listener\n if (!this.onContentChanged.observed && !shouldTriggerOnModelChange) {\n return;\n }\n this.zone.run(() => {\n if (shouldTriggerOnModelChange) {\n const valueGetter = this.valueGetter();\n this.onModelChange(valueGetter(this.quillEditor));\n }\n this.onContentChanged.emit({\n content,\n delta,\n editor: this.quillEditor,\n html,\n oldDelta,\n source,\n text\n });\n this.cd.markForCheck();\n });\n };\n // eslint-disable-next-line max-len\n this.editorChangeHandler = (event, current, old, source) => {\n // only emit changes when there's any listener\n if (!this.onEditorChanged.observed) {\n return;\n }\n // only emit changes emitted by user interactions\n if (event === 'text-change') {\n const text = this.quillEditor.getText();\n const content = this.quillEditor.getContents();\n let html = this.quillEditor.getSemanticHTML();\n if (this.isEmptyValue(html)) {\n html = this.defaultEmptyValue();\n }\n this.zone.run(() => {\n this.onEditorChanged.emit({\n content,\n delta: current,\n editor: this.quillEditor,\n event,\n html,\n oldDelta: old,\n source,\n text\n });\n this.cd.markForCheck();\n });\n } else {\n this.zone.run(() => {\n this.onEditorChanged.emit({\n editor: this.quillEditor,\n event,\n oldRange: old,\n range: current,\n source\n });\n this.cd.markForCheck();\n });\n }\n };\n }\n static normalizeClassNames(classes) {\n const classList = classes.trim().split(' ');\n return classList.reduce((prev, cur) => {\n const trimmed = cur.trim();\n if (trimmed) {\n prev.push(trimmed);\n }\n return prev;\n }, []);\n }\n ngOnInit() {\n this.toolbarPosition.set(this.customToolbarPosition());\n }\n ngAfterViewInit() {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n // The `quill-editor` component might be destroyed before the `quill` chunk is loaded and its code is executed\n // this will lead to runtime exceptions, since the code will be executed on DOM nodes that don't exist within the tree.\n this.quillSubscription = this.service.getQuill().pipe(mergeMap(Quill => {\n const promises = [this.service.registerCustomModules(Quill, this.customModules())];\n const beforeRender = this.beforeRender() ?? this.service.config.beforeRender;\n if (beforeRender) {\n promises.push(beforeRender());\n }\n return Promise.all(promises).then(() => Quill);\n })).subscribe(Quill => {\n this.editorElem = this.elementRef.nativeElement.querySelector('[quill-editor-element]');\n const toolbarElem = this.elementRef.nativeElement.querySelector('[quill-editor-toolbar]');\n const modules = Object.assign({}, this.modules() || this.service.config.modules);\n if (toolbarElem) {\n modules.toolbar = toolbarElem;\n } else if (modules.toolbar === undefined) {\n modules.toolbar = defaultModules.toolbar;\n }\n let placeholder = this.placeholder() !== undefined ? this.placeholder() : this.service.config.placeholder;\n if (placeholder === undefined) {\n placeholder = 'Insert text here ...';\n }\n const styles = this.styles();\n if (styles) {\n Object.keys(styles).forEach(key => {\n this.renderer.setStyle(this.editorElem, key, styles[key]);\n });\n }\n if (this.classes()) {\n this.addClasses(this.classes());\n }\n this.customOptions().forEach(customOption => {\n const newCustomOption = Quill.import(customOption.import);\n newCustomOption.whitelist = customOption.whitelist;\n Quill.register(newCustomOption, true);\n });\n let bounds = this.bounds() && this.bounds() === 'self' ? this.editorElem : this.bounds();\n if (!bounds) {\n bounds = this.service.config.bounds ? this.service.config.bounds : this.document.body;\n }\n let debug = this.debug();\n if (!debug && debug !== false && this.service.config.debug) {\n debug = this.service.config.debug;\n }\n let readOnly = this.readOnly();\n if (!readOnly && this.readOnly() !== false) {\n readOnly = this.service.config.readOnly !== undefined ? this.service.config.readOnly : false;\n }\n let formats = this.formats();\n if (!formats && formats === undefined) {\n formats = this.service.config.formats ? [...this.service.config.formats] : this.service.config.formats === null ? null : undefined;\n }\n this.zone.runOutsideAngular(() => {\n this.quillEditor = new Quill(this.editorElem, {\n bounds,\n debug,\n formats,\n modules,\n placeholder,\n readOnly,\n registry: this.registry(),\n theme: this.theme() || (this.service.config.theme ? this.service.config.theme : 'snow')\n });\n if (this.onNativeBlur.observed) {\n // https://github.com/quilljs/quill/issues/2186#issuecomment-533401328\n this.quillEditor.scroll.domNode.addEventListener('blur', () => this.onNativeBlur.next({\n editor: this.quillEditor,\n source: 'dom'\n }));\n // https://github.com/quilljs/quill/issues/2186#issuecomment-803257538\n const toolbar = this.quillEditor.getModule('toolbar');\n toolbar.container?.addEventListener('mousedown', e => e.preventDefault());\n }\n if (this.onNativeFocus.observed) {\n this.quillEditor.scroll.domNode.addEventListener('focus', () => this.onNativeFocus.next({\n editor: this.quillEditor,\n source: 'dom'\n }));\n }\n // Set optional link placeholder, Quill has no native API for it so using workaround\n if (this.linkPlaceholder()) {\n const tooltip = this.quillEditor?.theme?.tooltip;\n const input = tooltip?.root?.querySelector('input[data-link]');\n if (input?.dataset) {\n input.dataset.link = this.linkPlaceholder();\n }\n }\n });\n if (this.content) {\n const format = getFormat(this.format(), this.service.config.format);\n if (format === 'text') {\n this.quillEditor.setText(this.content, 'silent');\n } else {\n const valueSetter = this.valueSetter();\n const newValue = valueSetter(this.quillEditor, this.content);\n this.quillEditor.setContents(newValue, 'silent');\n }\n const history = this.quillEditor.getModule('history');\n history.clear();\n }\n // initialize disabled status based on this.disabled as default value\n this.setDisabledState();\n this.addQuillEventListeners();\n // The `requestAnimationFrame` triggers change detection. There's no sense to invoke the `requestAnimationFrame` if anyone is\n // listening to the `onEditorCreated` event inside the template, for instance ``.\n if (!this.onEditorCreated.observed && !this.onValidatorChanged) {\n return;\n }\n // The `requestAnimationFrame` will trigger change detection and `onEditorCreated` will also call `markDirty()`\n // internally, since Angular wraps template event listeners into `listener` instruction. We're using the `requestAnimationFrame`\n // to prevent the frame drop and avoid `ExpressionChangedAfterItHasBeenCheckedError` error.\n raf$().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n if (this.onValidatorChanged) {\n this.onValidatorChanged();\n }\n this.onEditorCreated.emit(this.quillEditor);\n });\n });\n }\n ngOnDestroy() {\n this.dispose();\n this.quillSubscription?.unsubscribe();\n this.quillSubscription = null;\n }\n ngOnChanges(changes) {\n if (!this.quillEditor) {\n return;\n }\n /* eslint-disable @typescript-eslint/dot-notation */\n if (changes.readOnly) {\n this.quillEditor.enable(!changes.readOnly.currentValue);\n }\n if (changes.placeholder) {\n this.quillEditor.root.dataset.placeholder = changes.placeholder.currentValue;\n }\n if (changes.styles) {\n const currentStyling = changes.styles.currentValue;\n const previousStyling = changes.styles.previousValue;\n if (previousStyling) {\n Object.keys(previousStyling).forEach(key => {\n this.renderer.removeStyle(this.editorElem, key);\n });\n }\n if (currentStyling) {\n Object.keys(currentStyling).forEach(key => {\n this.renderer.setStyle(this.editorElem, key, this.styles()[key]);\n });\n }\n }\n if (changes.classes) {\n const currentClasses = changes.classes.currentValue;\n const previousClasses = changes.classes.previousValue;\n if (previousClasses) {\n this.removeClasses(previousClasses);\n }\n if (currentClasses) {\n this.addClasses(currentClasses);\n }\n }\n // We'd want to re-apply event listeners if the `debounceTime` binding changes to apply the\n // `debounceTime` operator or vice-versa remove it.\n if (changes.debounceTime) {\n this.addQuillEventListeners();\n }\n /* eslint-enable @typescript-eslint/dot-notation */\n }\n addClasses(classList) {\n QuillEditorBase.normalizeClassNames(classList).forEach(c => {\n this.renderer.addClass(this.editorElem, c);\n });\n }\n removeClasses(classList) {\n QuillEditorBase.normalizeClassNames(classList).forEach(c => {\n this.renderer.removeClass(this.editorElem, c);\n });\n }\n writeValue(currentValue) {\n // optional fix for https://github.com/angular/angular/issues/14988\n if (this.filterNull() && currentValue === null) {\n return;\n }\n this.content = currentValue;\n if (!this.quillEditor) {\n return;\n }\n const format = getFormat(this.format(), this.service.config.format);\n const valueSetter = this.valueSetter();\n const newValue = valueSetter(this.quillEditor, currentValue);\n if (this.compareValues()) {\n const currentEditorValue = this.quillEditor.getContents();\n if (JSON.stringify(currentEditorValue) === JSON.stringify(newValue)) {\n return;\n }\n }\n if (currentValue) {\n if (format === 'text') {\n this.quillEditor.setText(currentValue);\n } else {\n this.quillEditor.setContents(newValue);\n }\n return;\n }\n this.quillEditor.setText('');\n }\n setDisabledState(isDisabled = this.disabled) {\n // store initial value to set appropriate disabled status after ViewInit\n this.disabled = isDisabled;\n if (this.quillEditor) {\n if (isDisabled) {\n this.quillEditor.disable();\n this.renderer.setAttribute(this.elementRef.nativeElement, 'disabled', 'disabled');\n } else {\n if (!this.readOnly()) {\n this.quillEditor.enable();\n }\n this.renderer.removeAttribute(this.elementRef.nativeElement, 'disabled');\n }\n }\n }\n registerOnChange(fn) {\n this.onModelChange = fn;\n }\n registerOnTouched(fn) {\n this.onModelTouched = fn;\n }\n registerOnValidatorChange(fn) {\n this.onValidatorChanged = fn;\n }\n validate() {\n if (!this.quillEditor) {\n return null;\n }\n const err = {};\n let valid = true;\n const text = this.quillEditor.getText();\n // trim text if wanted + handle special case that an empty editor contains a new line\n const textLength = this.trimOnValidation() ? text.trim().length : text.length === 1 && text.trim().length === 0 ? 0 : text.length - 1;\n const deltaOperations = this.quillEditor.getContents().ops;\n const onlyEmptyOperation = !!deltaOperations && deltaOperations.length === 1 && ['\\n', ''].includes(deltaOperations[0].insert?.toString());\n if (this.minLength() && textLength && textLength < this.minLength()) {\n err.minLengthError = {\n given: textLength,\n minLength: this.minLength()\n };\n valid = false;\n }\n if (this.maxLength() && textLength > this.maxLength()) {\n err.maxLengthError = {\n given: textLength,\n maxLength: this.maxLength()\n };\n valid = false;\n }\n if (this.required() && !textLength && onlyEmptyOperation) {\n err.requiredError = {\n empty: true\n };\n valid = false;\n }\n return valid ? null : err;\n }\n addQuillEventListeners() {\n this.dispose();\n // We have to enter the `` zone when adding event listeners, so `debounceTime` will spawn the\n // `AsyncAction` there w/o triggering change detections. We still re-enter the Angular's zone through\n // `zone.run` when we emit an event to the parent component.\n this.zone.runOutsideAngular(() => {\n this.subscription = new Subscription();\n this.subscription.add(\n // mark model as touched if editor lost focus\n fromEvent(this.quillEditor, 'selection-change').subscribe(([range, oldRange, source]) => {\n this.selectionChangeHandler(range, oldRange, source);\n }));\n // The `fromEvent` supports passing JQuery-style event targets, the editor has `on` and `off` methods which\n // will be invoked upon subscription and teardown.\n let textChange$ = fromEvent(this.quillEditor, 'text-change');\n let editorChange$ = fromEvent(this.quillEditor, 'editor-change');\n if (typeof this.debounceTime() === 'number') {\n textChange$ = textChange$.pipe(debounceTime(this.debounceTime()));\n editorChange$ = editorChange$.pipe(debounceTime(this.debounceTime()));\n }\n this.subscription.add(\n // update model if text changes\n textChange$.subscribe(([delta, oldDelta, source]) => {\n this.textChangeHandler(delta, oldDelta, source);\n }));\n this.subscription.add(\n // triggered if selection or text changed\n editorChange$.subscribe(([event, current, old, source]) => {\n this.editorChangeHandler(event, current, old, source);\n }));\n });\n }\n dispose() {\n if (this.subscription !== null) {\n this.subscription.unsubscribe();\n this.subscription = null;\n }\n }\n isEmptyValue(html) {\n return html === '

' || html === '
' || html === '


' || html === '

';\n }\n static {\n this.ɵfac = function QuillEditorBase_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || QuillEditorBase)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: QuillEditorBase,\n inputs: {\n format: [1, \"format\"],\n theme: [1, \"theme\"],\n modules: [1, \"modules\"],\n debug: [1, \"debug\"],\n readOnly: [1, \"readOnly\"],\n placeholder: [1, \"placeholder\"],\n maxLength: [1, \"maxLength\"],\n minLength: [1, \"minLength\"],\n required: [1, \"required\"],\n formats: [1, \"formats\"],\n customToolbarPosition: [1, \"customToolbarPosition\"],\n sanitize: [1, \"sanitize\"],\n beforeRender: [1, \"beforeRender\"],\n styles: [1, \"styles\"],\n registry: [1, \"registry\"],\n bounds: [1, \"bounds\"],\n customOptions: [1, \"customOptions\"],\n customModules: [1, \"customModules\"],\n trackChanges: [1, \"trackChanges\"],\n classes: [1, \"classes\"],\n trimOnValidation: [1, \"trimOnValidation\"],\n linkPlaceholder: [1, \"linkPlaceholder\"],\n compareValues: [1, \"compareValues\"],\n filterNull: [1, \"filterNull\"],\n debounceTime: [1, \"debounceTime\"],\n defaultEmptyValue: [1, \"defaultEmptyValue\"],\n valueGetter: [1, \"valueGetter\"],\n valueSetter: [1, \"valueSetter\"]\n },\n outputs: {\n onEditorCreated: \"onEditorCreated\",\n onEditorChanged: \"onEditorChanged\",\n onContentChanged: \"onContentChanged\",\n onSelectionChanged: \"onSelectionChanged\",\n onFocus: \"onFocus\",\n onBlur: \"onBlur\",\n onNativeFocus: \"onNativeFocus\",\n onNativeBlur: \"onNativeBlur\"\n },\n features: [i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return QuillEditorBase;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet QuillEditorComponent = /*#__PURE__*/(() => {\n class QuillEditorComponent extends QuillEditorBase {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵQuillEditorComponent_BaseFactory;\n return function QuillEditorComponent_Factory(__ngFactoryType__) {\n return (ɵQuillEditorComponent_BaseFactory || (ɵQuillEditorComponent_BaseFactory = i0.ɵɵgetInheritedFactory(QuillEditorComponent)))(__ngFactoryType__ || QuillEditorComponent);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: QuillEditorComponent,\n selectors: [[\"quill-editor\"]],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n useExisting: forwardRef(() => QuillEditorComponent)\n }, {\n multi: true,\n provide: NG_VALIDATORS,\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n useExisting: forwardRef(() => QuillEditorComponent)\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c1,\n decls: 5,\n vars: 2,\n consts: [[\"quill-editor-element\", \"\"]],\n template: function QuillEditorComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵtemplate(0, QuillEditorComponent_Conditional_0_Template, 1, 0, \"div\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵprojection(2, 1);\n i0.ɵɵprojection(3, 2);\n i0.ɵɵtemplate(4, QuillEditorComponent_Conditional_4_Template, 1, 0, \"div\", 0);\n }\n if (rf & 2) {\n i0.ɵɵconditional(ctx.toolbarPosition() !== \"top\" ? 0 : -1);\n i0.ɵɵadvance(4);\n i0.ɵɵconditional(ctx.toolbarPosition() === \"top\" ? 4 : -1);\n }\n },\n styles: [\"[_nghost-%COMP%]{display:inline-block}\"]\n });\n }\n }\n return QuillEditorComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet QuillViewHTMLComponent = /*#__PURE__*/(() => {\n class QuillViewHTMLComponent {\n constructor(sanitizer, service) {\n this.sanitizer = sanitizer;\n this.service = service;\n this.content = input('');\n this.theme = input(undefined);\n this.sanitize = input(undefined);\n this.innerHTML = signal('');\n this.themeClass = signal('ql-snow');\n }\n ngOnChanges(changes) {\n if (changes.theme) {\n const theme = changes.theme.currentValue || (this.service.config.theme ? this.service.config.theme : 'snow');\n this.themeClass.set(`ql-${theme} ngx-quill-view-html`);\n } else if (!this.theme()) {\n const theme = this.service.config.theme ? this.service.config.theme : 'snow';\n this.themeClass.set(`ql-${theme} ngx-quill-view-html`);\n }\n if (changes.content) {\n const content = changes.content.currentValue;\n const sanitize = [true, false].includes(this.sanitize()) ? this.sanitize() : this.service.config.sanitize || false;\n const innerHTML = sanitize ? content : this.sanitizer.bypassSecurityTrustHtml(content);\n this.innerHTML.set(innerHTML);\n }\n }\n static {\n this.ɵfac = function QuillViewHTMLComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || QuillViewHTMLComponent)(i0.ɵɵdirectiveInject(i1.DomSanitizer), i0.ɵɵdirectiveInject(QuillService));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: QuillViewHTMLComponent,\n selectors: [[\"quill-view-html\"]],\n inputs: {\n content: [1, \"content\"],\n theme: [1, \"theme\"],\n sanitize: [1, \"sanitize\"]\n },\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n decls: 2,\n vars: 2,\n consts: [[1, \"ql-container\", 3, \"ngClass\"], [1, \"ql-editor\", 3, \"innerHTML\"]],\n template: function QuillViewHTMLComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 0);\n i0.ɵɵelement(1, \"div\", 1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"ngClass\", ctx.themeClass());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"innerHTML\", ctx.innerHTML(), i0.ɵɵsanitizeHtml);\n }\n },\n dependencies: [NgClass],\n styles: [\".ql-container.ngx-quill-view-html{border:0}\\n\"],\n encapsulation: 2\n });\n }\n }\n return QuillViewHTMLComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nlet QuillViewComponent = /*#__PURE__*/(() => {\n class QuillViewComponent {\n constructor(elementRef, renderer, zone, service, domSanitizer, platformId) {\n this.elementRef = elementRef;\n this.renderer = renderer;\n this.zone = zone;\n this.service = service;\n this.domSanitizer = domSanitizer;\n this.platformId = platformId;\n this.format = input(undefined);\n this.theme = input(undefined);\n this.modules = input(undefined);\n this.debug = input(false);\n this.formats = input(undefined);\n this.sanitize = input(undefined);\n this.beforeRender = input(undefined);\n this.strict = input(true);\n this.content = input();\n this.customModules = input([]);\n this.customOptions = input([]);\n this.onEditorCreated = new EventEmitter();\n this.quillSubscription = null;\n this.destroyRef = inject(DestroyRef);\n this.valueSetter = (quillEditor, value) => {\n const format = getFormat(this.format(), this.service.config.format);\n let content = value;\n if (format === 'text') {\n quillEditor.setText(content);\n } else {\n if (format === 'html') {\n const sanitize = [true, false].includes(this.sanitize()) ? this.sanitize() : this.service.config.sanitize || false;\n if (sanitize) {\n value = this.domSanitizer.sanitize(SecurityContext.HTML, value);\n }\n content = quillEditor.clipboard.convert({\n html: value\n });\n } else if (format === 'json') {\n try {\n content = JSON.parse(value);\n } catch (e) {\n content = [{\n insert: value\n }];\n }\n }\n quillEditor.setContents(content);\n }\n };\n }\n ngOnChanges(changes) {\n if (!this.quillEditor) {\n return;\n }\n if (changes.content) {\n this.valueSetter(this.quillEditor, changes.content.currentValue);\n }\n }\n ngAfterViewInit() {\n if (isPlatformServer(this.platformId)) {\n return;\n }\n this.quillSubscription = this.service.getQuill().pipe(mergeMap(Quill => {\n const promises = [this.service.registerCustomModules(Quill, this.customModules())];\n const beforeRender = this.beforeRender() ?? this.service.config.beforeRender;\n if (beforeRender) {\n promises.push(beforeRender());\n }\n return Promise.all(promises).then(() => Quill);\n })).subscribe(Quill => {\n const modules = Object.assign({}, this.modules() || this.service.config.modules);\n modules.toolbar = false;\n this.customOptions().forEach(customOption => {\n const newCustomOption = Quill.import(customOption.import);\n newCustomOption.whitelist = customOption.whitelist;\n Quill.register(newCustomOption, true);\n });\n let debug = this.debug();\n if (!debug && debug !== false && this.service.config.debug) {\n debug = this.service.config.debug;\n }\n let formats = this.formats();\n if (!formats && formats === undefined) {\n formats = this.service.config.formats ? [...this.service.config.formats] : this.service.config.formats === null ? null : undefined;\n }\n const theme = this.theme() || (this.service.config.theme ? this.service.config.theme : 'snow');\n this.editorElem = this.elementRef.nativeElement.querySelector('[quill-view-element]');\n this.zone.runOutsideAngular(() => {\n this.quillEditor = new Quill(this.editorElem, {\n debug,\n formats,\n modules,\n readOnly: true,\n strict: this.strict(),\n theme\n });\n });\n this.renderer.addClass(this.editorElem, 'ngx-quill-view');\n if (this.content()) {\n this.valueSetter(this.quillEditor, this.content());\n }\n // The `requestAnimationFrame` triggers change detection. There's no sense to invoke the `requestAnimationFrame` if anyone is\n // listening to the `onEditorCreated` event inside the template, for instance ``.\n if (!this.onEditorCreated.observed) {\n return;\n }\n // The `requestAnimationFrame` will trigger change detection and `onEditorCreated` will also call `markDirty()`\n // internally, since Angular wraps template event listeners into `listener` instruction. We're using the `requestAnimationFrame`\n // to prevent the frame drop and avoid `ExpressionChangedAfterItHasBeenCheckedError` error.\n raf$().pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.onEditorCreated.emit(this.quillEditor);\n });\n });\n }\n ngOnDestroy() {\n this.quillSubscription?.unsubscribe();\n this.quillSubscription = null;\n }\n static {\n this.ɵfac = function QuillViewComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || QuillViewComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(QuillService), i0.ɵɵdirectiveInject(i1.DomSanitizer), i0.ɵɵdirectiveInject(PLATFORM_ID));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: QuillViewComponent,\n selectors: [[\"quill-view\"]],\n inputs: {\n format: [1, \"format\"],\n theme: [1, \"theme\"],\n modules: [1, \"modules\"],\n debug: [1, \"debug\"],\n formats: [1, \"formats\"],\n sanitize: [1, \"sanitize\"],\n beforeRender: [1, \"beforeRender\"],\n strict: [1, \"strict\"],\n content: [1, \"content\"],\n customModules: [1, \"customModules\"],\n customOptions: [1, \"customOptions\"]\n },\n outputs: {\n onEditorCreated: \"onEditorCreated\"\n },\n standalone: true,\n features: [i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n decls: 1,\n vars: 0,\n consts: [[\"quill-view-element\", \"\"]],\n template: function QuillViewComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"div\", 0);\n }\n },\n styles: [\".ql-container.ngx-quill-view{border:0}\\n\"],\n encapsulation: 2\n });\n }\n }\n return QuillViewComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet QuillModule = /*#__PURE__*/(() => {\n class QuillModule {\n static forRoot(config) {\n return {\n ngModule: QuillModule,\n providers: [{\n provide: QUILL_CONFIG_TOKEN,\n useValue: config\n }]\n };\n }\n static {\n this.ɵfac = function QuillModule_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || QuillModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: QuillModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return QuillModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/*\n * Public API Surface of ngx-quill\n */\n// Re-export everything from the secondary entry-point so we can be backwards-compatible\n// and don't introduce breaking changes for consumers.\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { QuillEditorBase, QuillEditorComponent, QuillModule, QuillService, QuillViewComponent, QuillViewHTMLComponent };\n","import { EventEmitter, Injectable } from \"@angular/core\";\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TextEditorService {\r\n private _content: string = '';\r\n \r\n getContent: EventEmitter = new EventEmitter();\r\n contentChanged: EventEmitter = new EventEmitter();\r\n\r\n setContent(value: string): void {\r\n this._content = value;\r\n this.getContent.emit(this._content);\r\n }\r\n\r\n updateContent(value: string): void {\r\n this._content = value;\r\n this.contentChanged.emit(this._content);\r\n }\r\n\r\n get content(): string {\r\n return this._content;\r\n }\r\n}\r\n","import { AfterViewInit, Component, inject, EventEmitter, Output, ViewChild } from '@angular/core';\r\nimport { QuillEditorComponent, QuillModule, QuillModules } from 'ngx-quill';\r\nimport { TextEditorService } from './text-editor.service';\r\n\r\n@Component({\r\n selector: 'app-text-editor',\r\n standalone: true,\r\n imports: [QuillEditorComponent, QuillModule],\r\n templateUrl: './text-editor.component.html',\r\n styleUrl: './text-editor.component.scss'\r\n})\r\nexport class TextEditorComponent implements AfterViewInit{\r\n txtSvc = inject(TextEditorService);\r\n\r\n\r\n @ViewChild('editor', { static: false }) editor!: QuillEditorComponent;\r\n QuillConfiguration: QuillModules = {}\r\n\r\n @Output() send: EventEmitter = new EventEmitter();\r\n\r\n participants = {\r\n from: 'sondre@datalexsoftware.no',\r\n to: 'espen@datalexsoftware.no',\r\n cc: 'christer@datalexsoftware.no'\r\n }\r\n\r\n sendEmail(){\r\n this.send.emit({content: this.content, participants: this.participants})\r\n }\r\n\r\n content: string | null = null;\r\n \r\n ngAfterViewInit(): void {\r\n\r\n this.editor.onContentChanged.subscribe((data) => {\r\n this.content = data.html\r\n })\r\n\r\n\r\n this.txtSvc.getContent.subscribe((data) => {\r\n this.editor.writeValue(data)\r\n })\r\n\r\n this.txtSvc.contentChanged.subscribe((data) => {\r\n this.editor.writeValue(data)\r\n \r\n })\r\n\r\n }\r\n \r\n}\r\n","","export interface Recipient {\r\n emailAddress: {\r\n address: string;\r\n name?: string;\r\n };\r\n}\r\n\r\nexport interface ItemBody {\r\n contentType: 'Text' | 'HTML';\r\n content: string;\r\n}\r\n\r\nexport interface Attachment {\r\n \"@odata.type\": \"#microsoft.graph.fileAttachment\" | \"#microsoft.graph.itemAttachment\" | \"#microsoft.graph.referenceAttachment\";\r\n name: string;\r\n contentType: string;\r\n contentBytes?: string;\r\n contentId?: string;\r\n isInline?: boolean;\r\n}\r\n\r\nexport interface Message {\r\n subject: string;\r\n body: ItemBody;\r\n toRecipients: Recipient[];\r\n ccRecipients?: Recipient[];\r\n bccRecipients?: Recipient[];\r\n attachments?: Attachment[];\r\n importance?: 'Low' | 'Normal' | 'High';\r\n replyTo?: Recipient[];\r\n from?: Recipient;\r\n isReadReceiptRequested?: boolean;\r\n isDeliveryReceiptRequested?: boolean;\r\n}\r\n\r\nexport interface SendMailRequest {\r\n message: Message;\r\n saveToSentItems?: boolean;\r\n}\r\n\r\nexport class EmailComposer {\r\n private message: Message = {\r\n subject: \"\",\r\n body: { contentType: \"Text\", content: \"\" },\r\n toRecipients: []\r\n };\r\n private saveToSentItems: boolean = true;\r\n\r\n constructor({contentType = 'HTML'}: {contentType?: 'Text' | 'HTML'} = {}) {\r\n this.message = {\r\n subject: \"\",\r\n body: { contentType: contentType, content: \"\" },\r\n toRecipients: []\r\n };\r\n }\r\n\r\n setSubject({ subject }: { subject: string }): EmailComposer {\r\n this.message.subject = subject;\r\n return this;\r\n }\r\n\r\n setBody({ content, contentType = 'Text' }: { content: string; contentType?: 'Text' | 'HTML' }): EmailComposer {\r\n this.message.body = { contentType, content };\r\n return this;\r\n }\r\n\r\n setFrom({ address, name }: { address: string; name?: string }): EmailComposer {\r\n this.message.from = { emailAddress: { address, name } };\r\n return this;\r\n }\r\n\r\n addToRecipient({ address, name }: { address: string; name?: string }): EmailComposer {\r\n this.message.toRecipients.push({ emailAddress: { address, name } });\r\n return this;\r\n }\r\n\r\n addToRecipients(recipients: { address: string; name?: string }[]): EmailComposer {\r\n const formattedRecipients = recipients.map(recipient => ({\r\n emailAddress: { address: recipient.address, name: recipient.name }\r\n }));\r\n this.message.toRecipients.push(...formattedRecipients);\r\n return this;\r\n }\r\n\r\n addCcRecipient({ address, name }: { address: string; name?: string }): EmailComposer {\r\n if (!this.message.ccRecipients) this.message.ccRecipients = [];\r\n this.message.ccRecipients.push({ emailAddress: { address, name } });\r\n return this;\r\n }\r\n\r\n addCcRecipients(recipients: { address: string; name?: string }[]): EmailComposer {\r\n if (!this.message.ccRecipients) this.message.ccRecipients = [];\r\n const formattedRecipients = recipients.map(recipient => ({\r\n emailAddress: { address: recipient.address, name: recipient.name }\r\n }));\r\n this.message.ccRecipients.push(...formattedRecipients);\r\n return this;\r\n }\r\n\r\n addBccRecipient({ address, name }: { address: string; name?: string }): EmailComposer {\r\n if (!this.message.bccRecipients) this.message.bccRecipients = [];\r\n this.message.bccRecipients.push({ emailAddress: { address, name } });\r\n return this;\r\n }\r\n\r\n addBccRecipients(recipients: { address: string; name?: string }[]): EmailComposer {\r\n if (!this.message.bccRecipients) this.message.bccRecipients = [];\r\n const formattedRecipients = recipients.map(recipient => ({\r\n emailAddress: { address: recipient.address, name: recipient.name }\r\n }));\r\n this.message.bccRecipients.push(...formattedRecipients);\r\n return this;\r\n }\r\n\r\n addAttachment({ name, contentType, contentBytes, isInline = false }: \r\n { name: string; contentType: string; contentBytes: string; isInline?: boolean }): EmailComposer {\r\n if (!this.message.attachments) this.message.attachments = [];\r\n this.message.attachments.push({\r\n \"@odata.type\": \"#microsoft.graph.fileAttachment\",\r\n name,\r\n contentType,\r\n contentBytes,\r\n isInline\r\n });\r\n return this;\r\n }\r\n\r\n setImportance({ level }: { level: 'Low' | 'Normal' | 'High' }): EmailComposer {\r\n this.message.importance = level;\r\n return this;\r\n }\r\n\r\n setReplyTo({ address, name }: { address: string; name?: string }): EmailComposer {\r\n if (!this.message.replyTo) this.message.replyTo = [];\r\n this.message.replyTo.push({ emailAddress: { address, name } });\r\n return this;\r\n }\r\n\r\n setSaveToSentItems({ save }: { save: boolean }): EmailComposer {\r\n this.saveToSentItems = save;\r\n return this;\r\n }\r\n\r\n requestReadReceipt({ request }: { request: boolean }): EmailComposer {\r\n this.message.isReadReceiptRequested = request;\r\n return this;\r\n }\r\n requestDeliveryReceipt({ request }: { request: boolean }): EmailComposer {\r\n this.message.isDeliveryReceiptRequested = request;\r\n return this;\r\n }\r\n\r\n getEmail(): SendMailRequest {\r\n return {\r\n message: this.message,\r\n saveToSentItems: this.saveToSentItems\r\n };\r\n }\r\n}\r\n","import { Component, inject, Input, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DatalexClient, ICaseBE, ICaseContactBE, IContactBE, IDocumentBE, IDocumentLimitedBE } from '@datalex-software-as/datalex-client';\r\nimport { SystemCacheService } from 'src/app/services/system-cache.service';\r\nimport { Attachment, EmailComposer, Recipient, SendMailRequest } from './EmailComposer';\r\nimport { TextEditorComponent } from \"../text-editor/text-editor.component\";\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MicrosoftGraph } from 'src/app/classes/MicrosoftGraph';\r\nimport { DlxIconComponent } from \"../dlx-icon/dlx-icon.component\";\r\n\r\n\r\n@Component({\r\n selector: 'dlx-email-composer',\r\n standalone: true,\r\n imports: [CommonModule, FormsModule, TextEditorComponent, DlxIconComponent],\r\n templateUrl: './email-composer.component.html',\r\n styleUrl: './email-composer.component.scss'\r\n})\r\nexport class EmailComposerComponent implements OnInit {\r\n dlxClient = inject(DatalexClient);\r\n sys = inject(SystemCacheService);\r\n\r\n _composer = new EmailComposer();\r\n\r\n showparticipantsMore = false;\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n ngOnInit(): void {\r\n try {\r\n this.initialize()\r\n } catch (error) {\r\n this.sys.isReady.subscribe({\r\n next: () => this.initialize(),\r\n })\r\n }\r\n }\r\n\r\n initialize() {\r\n this.from = { emailAddress: { address: this.sys.loggedinUserContact.EmailAddress, name: this.reorderName(this.sys.loggedinUserContact.Name) } };\r\n }\r\n\r\n\r\n\r\n @Input() contacts: ICaseContactBE[] | null = null;\r\n @Input() documents: IDocumentLimitedBE[] | null = null;\r\n _caseBe: ICaseBE | null = null;\r\n @Input() set caseBe(value: ICaseBE | null) {\r\n this._caseBe = value;\r\n this.saveOnCase = true;\r\n this.saveOnContact = false;\r\n }\r\n get caseBe() {\r\n return this._caseBe;\r\n }\r\n _contactBe: IContactBE | null = null;\r\n @Input() set contactBe(value: IContactBE | null) {\r\n this._contactBe = value;\r\n this.saveOnCase = false;\r\n this.saveOnContact = true;\r\n }\r\n\r\n\r\n\r\n from: Recipient = { emailAddress: { address: \"\", name: \"\" } };\r\n toRecipients: Recipient[] = [];\r\n ccRecipients: Recipient[] = [];\r\n bccRecipients: Recipient[] = [];\r\n requestDeliveredReceipt = false;\r\n requestReadReceipt = false;\r\n attachments: Attachment[] = [\r\n {\r\n name: \"test.pdf\", contentType: \"application/pdf\", contentBytes: \"dGVzdA==\", isInline: false,\r\n '@odata.type': '#microsoft.graph.fileAttachment'\r\n },\r\n {\r\n name: \"test.pdf\", contentType: \"application/pdf\", contentBytes: \"dGVzdA==\", isInline: false,\r\n '@odata.type': '#microsoft.graph.fileAttachment'\r\n },\r\n {\r\n name: \"test.pdf\", contentType: \"application/pdf\", contentBytes: \"dGVzdA==\", isInline: false,\r\n '@odata.type': '#microsoft.graph.fileAttachment'\r\n },\r\n {\r\n name: \"test.pdf\", contentType: \"application/pdf\", contentBytes: \"dGVzdA==\", isInline: false,\r\n '@odata.type': '#microsoft.graph.fileAttachment'\r\n }\r\n ];\r\n\r\n saveOnCase = false;\r\n saveOnContact = false;\r\n\r\n recipientLookUp(event: Event, type: 'to' | 'cc' | 'bcc') {\r\n const target = event.target as HTMLElement | null;\r\n\r\n if (target) {\r\n const userInput = target.innerText;\r\n const recipients = this.contacts?.filter(contact => {\r\n return contact.ContactName.toLowerCase().includes(userInput.trim().toLowerCase())\r\n }\r\n ) ?? [];\r\n\r\n\r\n // console.log(recipients);\r\n\r\n if (recipients.length === 1) {\r\n if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(recipients[0].Email)) return;\r\n\r\n switch (type) {\r\n case 'to':\r\n if (this.toRecipients.find(r => r.emailAddress.address === recipients[0].Email)) break;\r\n this.toRecipients.push({ emailAddress: { address: recipients[0].Email, name: this.reorderName(recipients[0].ContactName) } });\r\n target.innerText = \"\";\r\n break;\r\n case 'cc':\r\n if (this.ccRecipients.find(r => r.emailAddress.address === recipients[0].Email)) break;\r\n this.ccRecipients.push({ emailAddress: { address: recipients[0].Email, name: this.reorderName(recipients[0].ContactName) } });\r\n target.innerText = \"\";\r\n break;\r\n case 'bcc':\r\n if (this.bccRecipients.find(r => r.emailAddress.address === recipients[0].Email)) break;\r\n this.bccRecipients.push({ emailAddress: { address: recipients[0].Email, name: this.reorderName(recipients[0].ContactName) } });\r\n target.innerText = \"\";\r\n break;\r\n }\r\n\r\n\r\n }\r\n }\r\n }\r\n\r\n removeRecipient(event: Event, type: 'to' | 'cc' | 'bcc') {\r\n try {\r\n const target = event.target as HTMLElement;\r\n switch (type) {\r\n case 'to':\r\n this.toRecipients = this.toRecipients.filter(r => r.emailAddress.address !== target.parentElement?.dataset['email']);\r\n break;\r\n case 'cc':\r\n this.ccRecipients = this.ccRecipients.filter(r => r.emailAddress.address !== target.parentElement?.dataset['email']);\r\n break;\r\n case 'bcc':\r\n this.bccRecipients = this.bccRecipients.filter(r => r.emailAddress.address !== target.parentElement?.dataset['email']);\r\n break;\r\n }\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n\r\n removeAttachment(event: Event) {\r\n try {\r\n const target = event.target as HTMLElement;\r\n const index = target.parentElement?.dataset['index'];\r\n if (index === undefined) return;\r\n this.attachments = this.attachments.filter((a, i) => i !== parseInt(index));\r\n } catch (error) {\r\n console.error(error);\r\n }\r\n }\r\n\r\n setSubject(event: Event) {\r\n const target = event.target as HTMLDivElement;\r\n this._composer.setSubject({ subject: target.innerText });\r\n }\r\n\r\n\r\n showDocuments() {\r\n\r\n }\r\n\r\n addAttachment(doc: IDocumentLimitedBE) {\r\n this.attachments.push({\r\n name: doc.DocumentName,\r\n contentType: \"\",\r\n contentBytes: \"\",\r\n isInline: false,\r\n '@odata.type': '#microsoft.graph.fileAttachment'\r\n\r\n })\r\n }\r\n\r\n\r\n sendEmail() {\r\n this._composer\r\n .setFrom({ address: this.from.emailAddress.address, name: this.from.emailAddress.name })\r\n .addToRecipients(this.toRecipients.map(r => ({ address: r.emailAddress.address, name: r.emailAddress.name })))\r\n .addCcRecipients(this.ccRecipients.map(r => ({ address: r.emailAddress.address, name: r.emailAddress.name })))\r\n .requestReadReceipt({ request: this.requestReadReceipt })\r\n .requestDeliveryReceipt({ request: this.requestReadReceipt })\r\n .addBccRecipients(this.bccRecipients.map(r => ({ address: r.emailAddress.address, name: r.emailAddress.name })))\r\n .setBody({ content: \"

Dette er en epost sendt fra DatalexWeb

\", contentType: 'HTML' });\r\n\r\n\r\n this.onSend(this._composer.getEmail());\r\n }\r\n\r\n logComponent() {\r\n }\r\n\r\n\r\n reorderName(fullName: string) {\r\n const nameParts = fullName.split(\" \");\r\n if (nameParts.length > 1) {\r\n return [...nameParts.slice(1), nameParts[0]].join(\" \");\r\n }\r\n return fullName;\r\n\r\n }\r\n\r\n\r\n onSend(sendMailRequest: SendMailRequest) {\r\n\r\n if (!this.sys.microsoftGraphClientConfig) {\r\n throw new Error('Microsoft Graph Client Config not found in system cache');\r\n }\r\n\r\n const client = new MicrosoftGraph({\r\n authority: this.sys.microsoftGraphClientConfig.authority,\r\n clientId: this.sys.microsoftGraphClientConfig.clientId,\r\n scopes: this.sys.microsoftGraphClientConfig.clientScopes\r\n });\r\n\r\n\r\n try {\r\n client.initiateClient().then(async (status) => {\r\n\r\n const sendt = await client.client?.api('/me/sendMail')\r\n .post(sendMailRequest);\r\n\r\n })\r\n } catch (error) {\r\n console.log(error);\r\n }\r\n\r\n\r\n }\r\n\r\n}\r\n","
\n
\n
\n \n \n Send\n
\n\n
\n attachment\n
\n\n\n
\n
\n @if(showparticipantsMore) {\n
FRA:\n {{from.emailAddress.name}}\n ({{from.emailAddress.address}})\n
\n\n }\n
TIL:\n @for (recipient of toRecipients; track $index) {\n {{recipient.emailAddress.name}} close\n }\n
\n
\n\n
CC:\n @for (recipient of ccRecipients; track $index) {\n {{recipient.emailAddress.name}} close\n }\n
\n
\n\n @if(showparticipantsMore) {\n
BCC:\n @for (recipient of bccRecipients; track $index) {\n {{recipient.emailAddress.name}} close\n }\n
\n
\n
\n @if(contactBe) {\n
\n \n \n
\n }\n @if(caseBe) {\n
\n \n \n
\n }\n\n
\n \n \n
\n
\n \n \n
\n \n
\n }\n\n\n
\n
\n @for(attachment of attachments; track $index) {\n
{{attachment.name}}close
\n }\n
\n
\n\n
\n\n
\n {{showparticipantsMore ? 'unfold_less' :\n 'unfold_more'}}\n {{showparticipantsMore ? 'mindre' : 'mer'}}\n
\n\n
\n\n
\n
Emne:\n
\n
\n
\n\n\n\n\n","import { Component, OnInit, ViewChild, inject } from \"@angular/core\";\r\n\r\nimport { DatalexClient, ICaseBE, ICaseContactBE, IContactBE, IDocumentBE, IDocumentLimitedBE, } from \"@datalex-software-as/datalex-client\";\r\n\r\nimport { FormsModule } from \"@angular/forms\";\r\nimport { QuillModule } from \"ngx-quill\";\r\nimport { TextEditorComponent } from \"../../UI/text-editor/text-editor.component\";\r\nimport { MicrosoftGraph } from \"src/app/classes/MicrosoftGraph\";\r\nimport { SystemCacheService } from \"src/app/services/system-cache.service\";\r\nimport { TextEditorService } from \"../../UI/text-editor/text-editor.service\";\r\nimport { EmailComposerComponent } from \"../../UI/email-composer/email-composer.component\";\r\nimport { firstValueFrom } from \"rxjs\";\r\nimport { all, endExpression } from \"@igniteui/material-icons-extended\";\r\n\r\nconst _PORT_ = 3000;\r\nconst _PROTOCOL_ = 'http';\r\n\r\n\r\n\r\n@Component({\r\n selector: 'app-test-page',\r\n templateUrl: './test-page.component.html',\r\n styleUrls: ['./test-page.component.scss'],\r\n imports: [FormsModule, QuillModule, TextEditorComponent, EmailComposerComponent],\r\n standalone: true,\r\n})\r\nexport class TestPageComponent implements OnInit {\r\n dlxClient = inject(DatalexClient);\r\n sys = inject(SystemCacheService);\r\n // txtSvc = inject(TextEditorService);\r\n\r\n // client: MicrosoftGraph | null = null;\r\n\r\n // folders: any[] = [];\r\n\r\n contact: IContactBE | null = null;\r\n case: ICaseBE | null = null;\r\n documents: IDocumentLimitedBE[] = [];\r\n caseContacts: ICaseContactBE[] = [];\r\n\r\n\r\n ngOnInit(): void {\r\n\r\n\r\n try {\r\n this.initialize();\r\n } catch (error) {\r\n console.log(error);\r\n\r\n this.sys.isReady.subscribe(() => {\r\n this.initialize();\r\n })\r\n }\r\n\r\n }\r\n\r\n async initialize() {\r\n this.getInbox();\r\n try {\r\n this.case = await firstValueFrom(this.dlxClient.GetCase(\"e029113f-f951-4887-860a-d0c0c3a7c761\", false));\r\n this.documents = await firstValueFrom(this.dlxClient.FindDocuments(null, null, \"e029113f-f951-4887-860a-d0c0c3a7c761\", null, null, null, [], null, null, null, \"\", \"\", \"\", null, \"\", null, null, null, null));\r\n this.caseContacts = await firstValueFrom(this.dlxClient.GetCaseContactsByCaseId(\"e029113f-f951-4887-860a-d0c0c3a7c761\"))\r\n } catch (error) {\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n getInbox() {\r\n\r\n if (!this.sys.microsoftGraphClientConfig) {\r\n throw new Error('Microsoft Graph Client Config not found in system cache');\r\n }\r\n\r\n const client = new MicrosoftGraph({\r\n authority: this.sys.microsoftGraphClientConfig.authority,\r\n clientId: this.sys.microsoftGraphClientConfig.clientId,\r\n scopes: this.sys.microsoftGraphClientConfig.clientScopes\r\n });\r\n\r\n\r\n\r\n try {\r\n client.initiateClient().then(async (status) => {\r\n const data: any[] = [];\r\n let nextUrl = (folder: string) => `/me/mailFolders/${folder}/messages`;\r\n const start = +new Date();\r\n const folders_Info = [];\r\n const groups_Info = [];\r\n const users_info = [];\r\n const availableMailboxes = [];\r\n const availableMailFolderForMailboxes = []\r\n\r\n const groups = await client.client?.api('/me/memberOf')\r\n .select(\"id,displayName,mail,mailEnabled\")\r\n .get();\r\n\r\n for (const group of groups.value) {\r\n if (group.mailEnabled && group.mail) {\r\n groups_Info.push({ mailEnabled: group.mailEnabled, mail: group.mail });\r\n }\r\n }\r\n\r\n console.log(groups_Info);\r\n const users = await client.client?.api('/users').get();\r\n \r\n // const users = await client.client?.api('/users').get();\r\n // for (const user of users.value) {\r\n // if (user.mail) {\r\n // users_info.push(user);\r\n // try {\r\n\r\n // let messagesRequest = await client.client?.api(`/users/${user.id}/messages`).top(1).get();\r\n // if (messagesRequest.value.length > 0) {\r\n\r\n // const mailFolders = await client.client?.api(`/users/${user.id}/mailFolders`).get();\r\n\r\n // for (const folder of mailFolders.value) {\r\n\r\n // const message = await client.client?.api(`/users/${user.id}/mailFolders/${folder.id}/messages`).top(1).get();\r\n\r\n // if(message.value.length > 0) {\r\n\r\n // availableMailFolderForMailboxes.push({ user: user, folder: folder });\r\n\r\n // }\r\n // }\r\n \r\n // }\r\n // } catch (error) {\r\n\r\n // }\r\n // } \r\n // }\r\n\r\n // console.log(availableMailFolderForMailboxes);\r\n\r\n\r\n // allMailboxes.forEach((mailbox) => {\r\n // console.log(\"account:\", mailbox.user.mail, \"name:\", mailbox.folder.displayName, \"childCount:\", mailbox.folder.childFolderCount)\r\n // })\r\n\r\n // try {\r\n \r\n // let index = 0;\r\n // const result: any = [];\r\n // const currentSet: any[] = [];\r\n // let currentUser = availableMailFolderForMailboxes[0].user.id;\r\n // availableMailFolderForMailboxes.forEach((set) => {\r\n // if(currentUser !== set.user.id) {\r\n // index++;\r\n // currentSet.splice(0, currentSet.length);\r\n // } \r\n // result[index].push(set);\r\n // })\r\n \r\n // console.log(result);\r\n // } catch (error) {\r\n // console.log(error)\r\n // }\r\n\r\n // console.log(result);\r\n\r\n\r\n\r\n \r\n let message1 = await client.client?.api(`/me/mailFolders/AAMkADk5YjBlOGI5LTkyNTMtNDBmNC1iNDkxLTBjMjc3NDZlMjc2MQAuAAAAAAAZFwJuEa13TqrF94vZMzt3AQBzos1t1suRRI3Od8mqy4arAAAAAKmOAAA=/messages`).top(1).select('subject, internetMessageId').get();\r\n console.log(\"monitis\", message1.value[0].subject, message1.value[0].internetMessageId);\r\n let message2 = await client.client?.api(`/me/mailFolders/AAMkADk5YjBlOGI5LTkyNTMtNDBmNC1iNDkxLTBjMjc3NDZlMjc2MQAuAAAAAAAZFwJuEa13TqrF94vZMzt3AQBzos1t1suRRI3Od8mqy4arAAAAAAEMAAA=/messages`).top(1).select('subject, internetMessageId').get();\r\n console.log('Innboks:', message2.value[0].subject, message2.value[0].internetMessageId);\r\n \r\n \r\n \r\n \r\n // console.log(folders_Info);\r\n\r\n\r\n\r\n // folderIds.forEach(async folder => {\r\n // while(nextUrl) {\r\n // try {\r\n\r\n // let messagesRequest = client.client?.api(nextUrl(folder))\r\n\r\n // // Check if `$select` is already in `nextUrl`\r\n // if (messagesRequest && !decodeURIComponent(nextUrl(folder)).includes('$select=')) {\r\n // messagesRequest = messagesRequest.select('id, subject, bodyPreview, receivedDateTime');\r\n // }\r\n\r\n // if (messagesRequest && !decodeURIComponent(nextUrl(folder)).includes('$top=')) {\r\n // messagesRequest = messagesRequest.top(50);\r\n // }\r\n // const datalexRef = '(Datalex ref:';\r\n // const filterDate = '2024-10-01T00:00:00Z';\r\n // if (messagesRequest && !decodeURIComponent(nextUrl(folder)).includes('$filter=')) {\r\n // messagesRequest = messagesRequest.filter(`contains(subject, '${datalexRef}') and receivedDateTime ge ${filterDate}`);\r\n\r\n // }\r\n\r\n\r\n\r\n // const messages = await messagesRequest!.get();\r\n\r\n // if(messages.value.length > 0) {\r\n // console.log(messages.value);\r\n // data.push(...messages.value);\r\n // }\r\n // nextUrl = messages['@odata.nextLink'] || undefined; \r\n // } catch (error) {\r\n\r\n // }\r\n // }\r\n // console.log(data);\r\n // })\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n })\r\n } catch (error) {\r\n\r\n }\r\n\r\n\r\n // try {\r\n // client.initiateClient().then(async (status) => {\r\n\r\n // // const messages = await client.client?.api('/me/messages').get()\r\n // const driveId = 'b!fCJVS4YRLEKCQLACW8HhEbgZ77CR7yhNnYrT-_ipuMEpfcKbZmHlQathZcNoeMZ_'\r\n // const itemPath = 'DATALEXTEST/Sak/0000004897/0000009838/000002/'\r\n // const filename = 'oslo.pdf'\r\n\r\n // try {\r\n // const item = await client.client?.api(`/drives/${driveId}/root:/${itemPath}${filename}`).expand('listItem').get();\r\n // debugger\r\n // const fileId = item.eTag.split('\"')[1].split(',')[0].replace('{','').replace('}','') as string;\r\n // const siteId = item.listItem?.parentReference?.siteId.split(',')[1];\r\n // const listId = item.listItem?.parentReference?.id;\r\n\r\n // const webUrl = 'https://datalexsoftwareas.sharepoint.com';\r\n // const fileName = filename;\r\n\r\n // const user = await client.client?.api('/me').get();\r\n // debugger\r\n // const userEmail = user.mail;\r\n // const userId = user.id;\r\n // const odopenUrl = `odopen://openFile/?fileId=${fileId}&siteId={${siteId}}&listId={${listId}}&userEmail=${userEmail}&userId=${userId}&webUrl=${webUrl}&fileName=${fileName}`;\r\n // console.log('ODOpen URL:', odopenUrl);\r\n // window.open(odopenUrl, '_blank');\r\n // } catch (error) {\r\n\r\n // }\r\n // })\r\n\r\n // } catch (error) {\r\n // console.log(error);\r\n // }\r\n\r\n\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n}\r\n\r\n\r\n// API_URL = `${_PROTOCOL_}://localhost:${_PORT_}/api/`;\r\n// dlxMsal = inject(DatalexMsalService);\r\n// router = inject(Router)\r\n\r\n// messages: IMessageLimited[] = [];\r\n// selectedMessage: IMessageLimited | null = null;\r\n\r\n// public navItems = [\r\n// { icon: 'inbox', name: \"inbox\", text: 'Innboks' },\r\n// { icon: 'drafts', name: \"drafts\", text: 'Kladd' },\r\n// { icon: 'send', name: \"sent\", text: 'Sendt' }\r\n// ];\r\n\r\n// public selected = 'Innboks';\r\n\r\n// public navigate(item: { name: string, text: string }) {\r\n// this.selected = item.text;\r\n// this.router.navigate([`test/${item.name}`]);\r\n// }\r\n\r\n// driveId: string = \"\";\r\n// itemId: string = \"\";\r\n// msusers: any = [];\r\n// selectedUsers: any = [];\r\n\r\n// driveItem: any;\r\n\r\n// ngOnInit() {\r\n// }\r\n\r\n// getDrives() {\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// getDrives(this.API_URL, token).then((data) => {\r\n// console.log(data)\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }\r\n\r\n// uploadFile(e: HTMLInputElement) {\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// uploadFileToPersonalDrive(this.API_URL, token, e).then((data) => {\r\n// console.log(data)\r\n// this.itemId = data.id;\r\n// this.driveId = data.parentReference.driveId\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }\r\n// uploadFile2(e: HTMLInputElement) {\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// uploadFileToDrive(this.API_URL, token, e).then((data) => {\r\n// console.log(data)\r\n// this.itemId = data.id;\r\n// this.driveId = data.parentReference.driveId\r\n\r\n// this.driveItem = data;\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }\r\n\r\n// deleteFile(){\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// deleteFile(this.API_URL, token, this.itemId).then((data) => {\r\n// console.log(data)\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }\r\n// openFile(){\r\n// console.log(this.driveItem)\r\n// window.open(`${applicationURL.ms_word_rw}https://datalexsoftwareas.sharepoint.com/SondreTemp/CaseNumber/DocumentNumber/${this.driveItem.name}`, '_blank');\r\n// }\r\n\r\n// getDriveItemPermissions() {\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// getPermissions(this.API_URL, token, this.driveId, this.itemId).then((data) => {\r\n// console.log(data)\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }\r\n// putDriveItemPermissions() {\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// putPermissions(this.API_URL, token, this.driveId, this.itemId, [this.selectedUsers[0].id]).then((data) => {\r\n// console.log(data)\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }\r\n// getMicrosoftUsers() {\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// getUsers(this.API_URL, token).then((data) => {\r\n// this.msusers = data.value;\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }\r\n// getMicrosoftGroups() {\r\n// this.dlxMsal.useToken(this.router.url).subscribe({\r\n// next: (token) => {\r\n// getGroups(this.API_URL, token).then((data) => {\r\n// data.value.forEach((group: any) => {\r\n// if (group.onPremisesDomainName === null) {\r\n// console.log(group)\r\n// }\r\n// })\r\n// })\r\n\r\n// }\r\n\r\n// })\r\n// }","\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"],"mappings":"g5BAEA,IAAMA,EAAiB,CACrB,QAAS,CAAC,CAAC,OAAQ,SAAU,YAAa,QAAQ,EAElD,CAAC,aAAc,YAAY,EAAG,CAAC,CAC7B,OAAQ,CACV,EAAG,CACD,OAAQ,CACV,CAAC,EAED,CAAC,CACC,KAAM,SACR,EAAG,CACD,KAAM,QACR,CAAC,EAAG,CAAC,CACH,OAAQ,KACV,EAAG,CACD,OAAQ,OACV,CAAC,EAED,CAAC,CACC,OAAQ,IACV,EAAG,CACD,OAAQ,IACV,CAAC,EAED,CAAC,CACC,UAAW,KACb,CAAC,EAED,CAAC,CACC,KAAM,CAAC,QAAS,GAAO,QAAS,MAAM,CACxC,CAAC,EAED,CAAC,CACC,OAAQ,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAK,CAClC,CAAC,EAAG,CAAC,CACH,MAAO,CAAC,CACV,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F,iDAhPW1D,EAAiB,CAAA,+BAAjBA,EAAiB4D,UAAA,CAAA,CAAA,eAAA,CAAA,EAAAC,WAAA,GAAAC,SAAA,CAAAC,CAAA,EAAAC,MAAA,EAAAC,KAAA,EAAAC,OAAA,CAAA,CAAA,EAAA,YAAA,SAAA,YAAA,UAAA,CAAA,EAAAC,SAAA,SAAAC,EAAAC,EAAA,CAAAD,EAAA,GC1B9BE,EAAA,EAAA,qBAAA,CAAA,OAAoBC,EAAA,YAAAF,EAAA9D,OAAA,EAAqB,SAAA8D,EAAA7D,IAAA,EAAgB,YAAA6D,EAAA5D,SAAA,EAAwB,WAAA4D,EAAA3D,YAAA,iBDuBrE8D,EAAaC,GAAkCC,EAAsB,EAAAC,OAAA,CAAA;6DAAA,CAAA,CAAA,CAAA,SAGpE3E,CAAiB,GAAA","names":["defaultModules","QUILL_CONFIG_TOKEN","InjectionToken","takeUntilDestroyed","destroyRef","assertInInjectionContext","inject","DestroyRef","destroyed$","Observable","observer","source","takeUntil","_c0","_c1","QuillEditorComponent_Conditional_0_Template","rf","ctx","ɵɵelement","QuillEditorComponent_Conditional_4_Template","getFormat","format","configFormat","raf$","Observable","subscriber","rafId","QuillService","injector","config","defer","__async","maybePatchedAddEventListener","quillImport","customOption","newCustomOption","shareReplay","DOCUMENT","defaultModules","Quill","customModules","suppressGlobalRegisterWarning","implementation","path","isObservable","firstValueFrom","__ngFactoryType__","ɵɵinject","Injector","QUILL_CONFIG_TOKEN","ɵɵdefineInjectable","QuillEditorBase","input","EventEmitter","signal","inject","ElementRef","ChangeDetectorRef","DomSanitizer","PLATFORM_ID","Renderer2","NgZone","DestroyRef","quillEditor","html","modelValue","value","SecurityContext","range","oldRange","source","trackChanges","shouldTriggerOnModelTouched","delta","oldDelta","text","content","shouldTriggerOnModelChange","valueGetter","event","current","old","classes","prev","cur","trimmed","isPlatformServer","mergeMap","promises","beforeRender","toolbarElem","modules","placeholder","styles","key","bounds","debug","readOnly","formats","e","newValue","takeUntilDestroyed","changes","currentStyling","previousStyling","currentClasses","previousClasses","classList","c","currentValue","currentEditorValue","isDisabled","fn","err","valid","textLength","deltaOperations","onlyEmptyOperation","Subscription","fromEvent","textChange$","editorChange$","debounceTime","ɵɵdefineDirective","ɵɵNgOnChangesFeature","QuillEditorComponent","ɵQuillEditorComponent_BaseFactory","ɵɵgetInheritedFactory","ɵɵdefineComponent","ɵɵProvidersFeature","NG_VALUE_ACCESSOR","forwardRef","NG_VALIDATORS","ɵɵInheritDefinitionFeature","ɵɵStandaloneFeature","ɵɵprojectionDef","ɵɵtemplate","ɵɵprojection","ɵɵconditional","ɵɵadvance","QuillModule","config","QUILL_CONFIG_TOKEN","__ngFactoryType__","ɵɵdefineNgModule","ɵɵdefineInjector","TextEditorService","constructor","_content","getContent","EventEmitter","contentChanged","setContent","value","emit","updateContent","content","factory","ɵfac","providedIn","TextEditorComponent","constructor","txtSvc","inject","TextEditorService","QuillConfiguration","send","EventEmitter","participants","from","to","cc","content","sendEmail","emit","ngAfterViewInit","editor","onContentChanged","subscribe","data","html","getContent","writeValue","contentChanged","selectors","viewQuery","rf","ctx","ɵɵelement","ɵɵproperty","QuillEditorComponent","QuillModule","styles","EmailComposer","constructor","contentType","message","subject","body","content","toRecipients","saveToSentItems","setSubject","setBody","setFrom","address","name","from","emailAddress","addToRecipient","push","addToRecipients","recipients","formattedRecipients","map","recipient","addCcRecipient","ccRecipients","addCcRecipients","addBccRecipient","bccRecipients","addBccRecipients","addAttachment","contentBytes","isInline","attachments","setImportance","level","importance","setReplyTo","replyTo","setSaveToSentItems","save","requestReadReceipt","request","isReadReceiptRequested","requestDeliveryReceipt","isDeliveryReceiptRequested","getEmail","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵadvance","ɵɵtextInterpolate2","ctx_r0","from","emailAddress","name","address","ɵɵlistener","$event","ɵɵrestoreView","_r2","ɵɵnextContext","ɵɵresetView","removeRecipient","ɵɵtextInterpolate1","recipient_r3","_r4","recipient_r5","_r7","recipient_r8","ɵɵtwoWayListener","_r9","i0","ɵɵtwoWayBindingSet","saveOnContact","ɵɵtwoWayProperty","_r10","saveOnCase","ɵɵrepeaterCreate","EmailComposerComponent_Conditional_21_For_3_Template","ɵɵrepeaterTrackByIndex","_r6","recipientLookUp","ɵɵtemplate","EmailComposerComponent_Conditional_21_Conditional_6_Template","EmailComposerComponent_Conditional_21_Conditional_7_Template","requestDeliveredReceipt","requestReadReceipt","logComponent","ɵɵrepeater","bccRecipients","ɵɵconditional","contactBe","caseBe","_r11","removeAttachment","ɵɵtextInterpolate","attachment_r12","EmailComposerComponent","constructor","dlxClient","inject","DatalexClient","sys","SystemCacheService","_composer","EmailComposer","showparticipantsMore","contacts","documents","_caseBe","_contactBe","toRecipients","ccRecipients","attachments","contentType","contentBytes","isInline","ngOnInit","initialize","isReady","subscribe","next","loggedinUserContact","EmailAddress","reorderName","Name","value","event","type","target","userInput","innerText","recipients","filter","contact","ContactName","toLowerCase","includes","trim","length","test","Email","find","r","push","parentElement","dataset","error","console","index","undefined","a","i","parseInt","setSubject","subject","showDocuments","addAttachment","doc","DocumentName","sendEmail","setFrom","addToRecipients","map","addCcRecipients","request","requestDeliveryReceipt","addBccRecipients","setBody","content","onSend","getEmail","fullName","nameParts","split","slice","join","sendMailRequest","microsoftGraphClientConfig","Error","client","MicrosoftGraph","authority","clientId","scopes","clientScopes","initiateClient","then","status","__async","sendt","api","post","log","selectors","inputs","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵelement","EmailComposerComponent_Conditional_10_Template","EmailComposerComponent_For_14_Template","EmailComposerComponent_For_19_Template","EmailComposerComponent_Conditional_21_Template","EmailComposerComponent_For_25_Template","CommonModule","FormsModule","CheckboxControlValueAccessor","NgControlStatus","NgModel","TextEditorComponent","DlxIconComponent","styles","TestPageComponent","constructor","dlxClient","inject","DatalexClient","sys","SystemCacheService","contact","case","documents","caseContacts","ngOnInit","initialize","error","console","log","isReady","subscribe","__async","getInbox","firstValueFrom","GetCase","FindDocuments","GetCaseContactsByCaseId","microsoftGraphClientConfig","Error","client","MicrosoftGraph","authority","clientId","scopes","clientScopes","initiateClient","then","status","data","nextUrl","folder","start","Date","folders_Info","groups_Info","users_info","availableMailboxes","availableMailFolderForMailboxes","groups","api","select","get","group","value","mailEnabled","mail","push","users","message1","top","subject","internetMessageId","message2","selectors","standalone","features","ɵɵStandaloneFeature","decls","vars","consts","template","rf","ctx","ɵɵelement","ɵɵproperty","FormsModule","QuillModule","EmailComposerComponent","styles"],"x_google_ignoreList":[0,1,2]}