ngx-doc-viewer 21.0.6 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,426 +1,682 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, TemplateRef, ViewChildren, ContentChild, Input, Output, Component, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import { getViewerDetails, isLocalFile, replaceLocalUrl, getDocxToHtml, googleCheckSubscription, ViewerRecoveryController, iframeIsLoaded } from 'docviewhelper';
6
- export * from 'docviewhelper';
7
- import * as i1 from '@angular/platform-browser';
8
-
9
- class NgxDocViewerComponent {
10
- domSanitizer;
11
- ngZone;
12
- cdr;
13
- loaded = new EventEmitter();
14
- loading = new EventEmitter();
15
- error = new EventEmitter();
16
- phaseChange = new EventEmitter();
17
- url = '';
18
- queryParams = '';
19
- viewerUrl = '';
20
- googleCheckInterval = 3000;
21
- googleMaxChecks = 5;
22
- googleFinalRetryDelay = 0;
23
- disableContent = 'none';
24
- googleCheckContentLoaded = true;
25
- viewer = 'google';
26
- overrideLocalhost = '';
27
- loadingText = 'Loading document...';
28
- errorTextOverride = '';
29
- retryButtonText = 'Retry';
30
- officeAutoRetry = false;
31
- officeRetryDelay = 3000;
32
- officeReloadButtonText = '↻';
33
- officeReloadButtonTitle = 'Reload document';
34
- secondaryActionText = '';
35
- secondaryActionMode = 'open';
36
- loadingTemplate;
37
- errorTemplate;
38
- errorActionsTemplate;
39
- officeReloadTemplate;
40
- iframes = undefined;
41
- fullUrl = undefined;
42
- externalViewer = false;
43
- docHtml = '';
44
- configuredViewer = 'google';
45
- showIframe = true;
46
- renderPhase = 'idle';
47
- errorText = '';
48
- failedUrl = '';
49
- retryNonce = 0;
50
- loadingTemplateContext = this.createTemplateContext();
51
- errorTemplateContext = this.createTemplateContext();
52
- checkIFrameSubscription = undefined;
53
- loadVersion = 0;
54
- recovery = undefined;
55
- lastEmittedPhase = undefined;
56
- constructor(domSanitizer, ngZone, cdr) {
57
- this.domSanitizer = domSanitizer;
58
- this.ngZone = ngZone;
59
- this.cdr = cdr;
60
- }
61
- ngOnDestroy() {
62
- this.recovery?.dispose();
63
- if (this.checkIFrameSubscription) {
64
- this.checkIFrameSubscription.unsubscribe();
65
- }
66
- }
67
- async ngOnChanges(changes) {
68
- if (changes &&
69
- changes['retryNonce'] &&
70
- changes['retryNonce'].firstChange) {
71
- return;
72
- }
73
- if (changes &&
74
- changes['viewer'] &&
75
- (changes['viewer'].firstChange ||
76
- changes['viewer'].currentValue !== changes['viewer'].previousValue)) {
77
- if (this.viewer !== 'google' &&
78
- this.viewer !== 'office' &&
79
- this.viewer !== 'mammoth' &&
80
- this.viewer !== 'pdf' &&
81
- this.viewer !== 'url') {
82
- console.error(`Unsupported viewer: '${this.viewer}'. Supported viewers: google, office, mammoth and pdf`);
83
- }
84
- this.configuredViewer = this.viewer;
85
- this.updateTemplateContexts();
86
- }
87
- if ((changes['url'] &&
88
- changes['url'].currentValue !== changes['url'].previousValue) ||
89
- (changes['viewer'] &&
90
- changes['viewer'].currentValue !== changes['viewer'].previousValue) ||
91
- (changes['viewerUrl'] &&
92
- changes['viewerUrl'].currentValue !==
93
- changes['viewerUrl'].previousValue)) {
94
- let viewerDetails = getViewerDetails(this.url, this.configuredViewer, this.queryParams, this.viewerUrl);
95
- const loadVersion = ++this.loadVersion;
96
- const recovery = this.ensureRecovery();
97
- recovery.clearTimers();
98
- this.externalViewer = viewerDetails.externalViewer;
99
- if (viewerDetails.externalViewer &&
100
- this.overrideLocalhost &&
101
- isLocalFile(this.url)) {
102
- const newUrl = replaceLocalUrl(this.url, this.overrideLocalhost);
103
- viewerDetails = getViewerDetails(newUrl, this.configuredViewer, this.queryParams, this.viewerUrl);
104
- }
105
- recovery.trackSource(viewerDetails.url);
106
- this.docHtml = '';
107
- this.errorText = '';
108
- this.failedUrl = this.url;
109
- this.updateTemplateContexts();
110
- if (this.checkIFrameSubscription) {
111
- this.checkIFrameSubscription.unsubscribe();
112
- }
113
- if (!this.url) {
114
- this.fullUrl = undefined;
115
- this.showIframe = false;
116
- this.externalViewer = false;
117
- this.setRenderPhase('idle');
118
- this.updateTemplateContexts();
119
- }
120
- else if (viewerDetails.externalViewer ||
121
- this.configuredViewer === 'url' ||
122
- this.configuredViewer === 'pdf') {
123
- this.setRenderPhase('loading');
124
- const iframeUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(viewerDetails.url);
125
- this.fullUrl = undefined;
126
- this.showIframe = false;
127
- this.cdr.detectChanges();
128
- this.fullUrl = iframeUrl;
129
- this.showIframe = true;
130
- this.updateTemplateContexts();
131
- const plan = recovery.beginExternalLoad(() => loadVersion === this.loadVersion);
132
- this.cdr.detectChanges();
133
- if (plan.modes.includes('google-probe')) {
134
- this.scheduleGoogleProbe();
135
- }
136
- }
137
- else if (this.configuredViewer === 'mammoth') {
138
- this.setRenderPhase('loading');
139
- this.externalViewer = false;
140
- this.fullUrl = undefined;
141
- this.showIframe = false;
142
- try {
143
- const docHtml = await getDocxToHtml(this.url);
144
- if (loadVersion !== this.loadVersion) {
145
- return;
146
- }
147
- this.ngZone.run(() => {
148
- this.docHtml = docHtml;
149
- this.setRenderPhase('ready');
150
- this.updateTemplateContexts();
151
- this.cdr.detectChanges();
152
- });
153
- }
154
- catch (error) {
155
- if (loadVersion !== this.loadVersion) {
156
- return;
157
- }
158
- this.ngZone.run(() => {
159
- this.errorText =
160
- error instanceof Error ? error.message : 'Unable to load document.';
161
- this.setRenderPhase('error');
162
- this.updateTemplateContexts();
163
- this.cdr.detectChanges();
164
- });
165
- }
166
- }
167
- }
168
- }
169
- retryLoad() {
170
- this.retryNonce += 1;
171
- const retryVersion = ++this.loadVersion;
172
- const recovery = this.ensureRecovery();
173
- recovery.clearTimers();
174
- this.errorText = '';
175
- this.setRenderPhase(this.url ? 'loading' : 'idle');
176
- this.updateTemplateContexts();
177
- if (!this.url) {
178
- return;
179
- }
180
- if (this.configuredViewer === 'mammoth') {
181
- this.docHtml = '';
182
- void this.reloadMammoth(retryVersion);
183
- return;
184
- }
185
- if (this.configuredViewer === 'google' ||
186
- this.configuredViewer === 'office' ||
187
- this.configuredViewer === 'url' ||
188
- this.configuredViewer === 'pdf') {
189
- const details = getViewerDetails(this.url, this.configuredViewer, this.queryParams, this.viewerUrl);
190
- const finalUrl = details.externalViewer && this.overrideLocalhost && isLocalFile(this.url)
191
- ? getViewerDetails(replaceLocalUrl(this.url, this.overrideLocalhost), this.configuredViewer, this.queryParams, this.viewerUrl).url
192
- : details.url;
193
- this.fullUrl = undefined;
194
- this.showIframe = false;
195
- this.cdr.detectChanges();
196
- this.fullUrl =
197
- this.domSanitizer.bypassSecurityTrustResourceUrl(finalUrl);
198
- this.showIframe = true;
199
- const plan = recovery.beginExternalLoad(() => retryVersion === this.loadVersion);
200
- if (plan.modes.includes('google-probe')) {
201
- this.scheduleGoogleProbe();
202
- }
203
- this.updateTemplateContexts();
204
- this.cdr.detectChanges();
205
- }
206
- }
207
- reloadIframe(iframe) {
208
- this.checkIFrameSubscription = googleCheckSubscription();
209
- this.checkIFrameSubscription.subscribe(iframe, this.googleCheckInterval, this.googleMaxChecks);
210
- }
211
- ensureRecovery() {
212
- if (!this.recovery) {
213
- this.recovery = new ViewerRecoveryController(this.buildRecoveryConfig(), {
214
- triggerRetry: () => this.ngZone.run(() => this.retryLoad()),
215
- reportTimeout: () => this.ngZone.run(() => {
216
- if (this.renderPhase !== 'loading') {
217
- return;
218
- }
219
- this.errorText = `The ${this.configuredViewer} viewer did not finish loading in time.`;
220
- this.setRenderPhase('error');
221
- this.updateTemplateContexts();
222
- this.cdr.detectChanges();
223
- }),
224
- });
225
- }
226
- this.recovery.configure(this.buildRecoveryConfig());
227
- return this.recovery;
228
- }
229
- buildRecoveryConfig() {
230
- return {
231
- viewer: this.configuredViewer,
232
- googleCheckContentLoaded: this.googleCheckContentLoaded,
233
- googleCheckInterval: this.googleCheckInterval,
234
- googleMaxChecks: this.googleMaxChecks,
235
- googleFinalRetryDelay: this.googleFinalRetryDelay,
236
- officeAutoRetry: this.officeAutoRetry,
237
- officeRetryDelay: this.officeRetryDelay,
238
- };
239
- }
240
- scheduleGoogleProbe() {
241
- // see:
242
- // https://stackoverflow.com/questions/40414039/google-docs-viewer-returning-204-responses-no-longer-working-alternatives
243
- // hack to reload iframe if it's not loaded.
244
- this.ngZone.runOutsideAngular(() => {
245
- window.setTimeout(() => {
246
- const iframe = this.iframes?.first?.nativeElement;
247
- if (iframe) {
248
- this.reloadIframe(iframe);
249
- }
250
- }, 0);
251
- });
252
- }
253
- iframeLoaded() {
254
- const iframe = this.iframes?.first?.nativeElement;
255
- if (iframe && iframeIsLoaded(iframe)) {
256
- this.recovery?.notifyLoaded();
257
- this.setRenderPhase('ready');
258
- this.updateTemplateContexts();
259
- this.loaded.emit(undefined);
260
- if (this.checkIFrameSubscription) {
261
- this.checkIFrameSubscription.unsubscribe();
262
- }
263
- }
264
- }
265
- objectLoaded() {
266
- this.recovery?.notifyLoaded();
267
- this.setRenderPhase('ready');
268
- this.updateTemplateContexts();
269
- }
270
- async reloadMammoth(loadVersion) {
271
- this.externalViewer = false;
272
- this.fullUrl = undefined;
273
- this.showIframe = false;
274
- try {
275
- const docHtml = await getDocxToHtml(this.url);
276
- if (loadVersion !== this.loadVersion) {
277
- return;
278
- }
279
- this.ngZone.run(() => {
280
- this.docHtml = docHtml;
281
- this.setRenderPhase('ready');
282
- this.updateTemplateContexts();
283
- this.cdr.detectChanges();
284
- });
285
- }
286
- catch (error) {
287
- if (loadVersion !== this.loadVersion) {
288
- return;
289
- }
290
- this.ngZone.run(() => {
291
- this.errorText =
292
- error instanceof Error ? error.message : 'Unable to load document.';
293
- this.setRenderPhase('error');
294
- this.updateTemplateContexts();
295
- this.cdr.detectChanges();
296
- });
297
- }
298
- }
299
- get displayedErrorText() {
300
- return this.errorTextOverride || this.errorText || 'Unable to load document.';
301
- }
302
- updateTemplateContexts() {
303
- const state = this.createStateContext();
304
- this.loadingTemplateContext = { $implicit: state, state };
305
- this.errorTemplateContext = { $implicit: state, state };
306
- }
307
- createTemplateContext() {
308
- const state = this.createStateContext();
309
- return { $implicit: state, state };
310
- }
311
- createStateContext() {
312
- return {
313
- viewer: this.configuredViewer,
314
- url: this.failedUrl || this.url,
315
- phase: this.renderPhase,
316
- errorText: this.displayedErrorText,
317
- retry: () => this.retryLoad(),
318
- actionUrl: this.failedUrl || this.url,
319
- };
320
- }
321
- setRenderPhase(phase) {
322
- this.renderPhase = phase;
323
- this.emitLifecycleIfNeeded();
324
- }
325
- emitLifecycleIfNeeded() {
326
- if (this.lastEmittedPhase === this.renderPhase) {
327
- return;
328
- }
329
- this.lastEmittedPhase = this.renderPhase;
330
- const state = this.createStateContext();
331
- this.phaseChange.emit(state);
332
- if (this.renderPhase === 'loading') {
333
- this.loading.emit(state);
334
- }
335
- if (this.renderPhase === 'error') {
336
- this.error.emit(state);
337
- }
338
- }
339
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: NgxDocViewerComponent, deps: [{ token: i1.DomSanitizer }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
340
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: NgxDocViewerComponent, isStandalone: true, selector: "ngx-doc-viewer", inputs: { url: "url", queryParams: "queryParams", viewerUrl: "viewerUrl", googleCheckInterval: "googleCheckInterval", googleMaxChecks: "googleMaxChecks", googleFinalRetryDelay: "googleFinalRetryDelay", disableContent: "disableContent", googleCheckContentLoaded: "googleCheckContentLoaded", viewer: "viewer", overrideLocalhost: "overrideLocalhost", loadingText: "loadingText", errorTextOverride: "errorTextOverride", retryButtonText: "retryButtonText", officeAutoRetry: "officeAutoRetry", officeRetryDelay: "officeRetryDelay", officeReloadButtonText: "officeReloadButtonText", officeReloadButtonTitle: "officeReloadButtonTitle", secondaryActionText: "secondaryActionText", secondaryActionMode: "secondaryActionMode" }, outputs: { loaded: "loaded", loading: "loading", error: "error", phaseChange: "phaseChange" }, queries: [{ propertyName: "loadingTemplate", first: true, predicate: ["loadingContent"], descendants: true, read: TemplateRef }, { propertyName: "errorTemplate", first: true, predicate: ["errorContent"], descendants: true, read: TemplateRef }, { propertyName: "errorActionsTemplate", first: true, predicate: ["errorActions"], descendants: true, read: TemplateRef }, { propertyName: "officeReloadTemplate", first: true, predicate: ["officeReloadContent"], descendants: true, read: TemplateRef }], viewQueries: [{ propertyName: "iframes", predicate: ["iframe"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"container\">\n <div *ngIf=\"renderPhase === 'loading'\" class=\"loading-overlay\">\n <ng-container *ngIf=\"loadingTemplate; else defaultLoadingTemplate\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate; context: loadingTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultLoadingTemplate>{{ loadingText }}</ng-template>\n </div>\n <div *ngIf=\"renderPhase === 'error'\" class=\"error-overlay\">\n <ng-container *ngIf=\"errorTemplate; else defaultErrorTemplate\">\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: errorTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultErrorTemplate>\n <div>\n <div>{{ displayedErrorText }}</div>\n <div *ngIf=\"configuredViewer\" style=\"margin-top: 8px; color: #475569;\">\n Viewer: {{ configuredViewer }}\n </div>\n <div *ngIf=\"failedUrl\" style=\"margin-top: 4px; color: #64748b; font-size: 12px; word-break: break-word;\">\n {{ failedUrl }}\n </div>\n <ng-container *ngIf=\"errorActionsTemplate; else defaultErrorActions\">\n <ng-container *ngTemplateOutlet=\"errorActionsTemplate; context: errorTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultErrorActions>\n <div style=\"margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;\">\n <button\n type=\"button\"\n (click)=\"retryLoad()\"\n style=\"border: 1px solid #fecaca; background: #fff; color: #991b1b; border-radius: 999px; padding: 8px 14px; font: inherit; cursor: pointer;\"\n >\n {{ retryButtonText }}\n </button>\n <a\n *ngIf=\"secondaryActionText && failedUrl\"\n [href]=\"failedUrl\"\n [attr.target]=\"secondaryActionMode === 'open' ? '_blank' : null\"\n [attr.rel]=\"secondaryActionMode === 'open' ? 'noreferrer' : null\"\n [attr.download]=\"secondaryActionMode === 'download' ? '' : null\"\n style=\"border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: 8px 14px; text-decoration: none; font: inherit;\"\n >\n {{ secondaryActionText }}\n </a>\n </div>\n </ng-template>\n </div>\n </ng-template>\n </div>\n\n <ng-container *ngIf=\"!externalViewer\">\n <div *ngIf=\"configuredViewer !== 'pdf'\" class=\"inline-document-shell\">\n <div class=\"inline-document-page\" [innerHTML]=\"docHtml\"></div>\n </div>\n <object\n (load)=\"objectLoaded()\"\n *ngIf=\"fullUrl && configuredViewer === 'pdf'\"\n [data]=\"fullUrl\"\n type=\"application/pdf\"\n width=\"100%\"\n height=\"100%\"\n >\n <p>\n Your browser does not support PDFs.\n <a [href]=\"fullUrl\">Download the PDF</a>.\n </p>\n </object>\n </ng-container>\n\n <button\n *ngIf=\"configuredViewer === 'office' && renderPhase === 'ready'\"\n class=\"office-reload-btn\"\n type=\"button\"\n [attr.title]=\"officeReloadButtonTitle\"\n (click)=\"retryLoad()\"\n >\n <ng-container *ngIf=\"officeReloadTemplate; else defaultOfficeReloadTemplate\">\n <ng-container *ngTemplateOutlet=\"officeReloadTemplate; context: errorTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultOfficeReloadTemplate>{{ officeReloadButtonText }}</ng-template>\n </button>\n\n <ng-container *ngIf=\"externalViewer\">\n <iframe\n (load)=\"iframeLoaded()\"\n *ngIf=\"fullUrl && showIframe && disableContent === 'none'\"\n #iframe\n id=\"iframe-doc-viewer\"\n frameBorder=\"0\"\n allow=\"clipboard-read; clipboard-write\"\n [src]=\"fullUrl\"\n ></iframe>\n <div class=\"container\" *ngIf=\"disableContent !== 'none'\">\n <div\n [class.overlay-full]=\"disableContent === 'all'\"\n [class.overlay-popout-google]=\"\n configuredViewer === 'google' &&\n (disableContent === 'popout' || disableContent === 'popout-hide')\n \"\n [class.overlay-popout-office]=\"\n configuredViewer === 'office' &&\n (disableContent === 'popout' || disableContent === 'popout-hide')\n \"\n [style.background-color]=\"\n disableContent === 'popout-hide' ? '#fff' : 'transparent'\n \"\n ></div>\n <iframe\n (load)=\"iframeLoaded()\"\n *ngIf=\"fullUrl && showIframe\"\n #iframe\n id=\"iframe\"\n frameBorder=\"0\"\n allow=\"clipboard-read; clipboard-write\"\n [src]=\"fullUrl\"\n ></iframe>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block}.container{width:100%;height:100%;position:relative}.inline-document-shell{width:100%;height:100%;overflow:auto;background:linear-gradient(180deg,#eef2f7,#f8fafc);padding:24px}.inline-document-page{max-width:900px;min-height:100%;margin:0 auto;background:#fff;border:1px solid #dbe4f0;border-radius:18px;box-shadow:0 18px 40px -24px #0f172a4d,0 6px 18px -10px #0f172a2e;padding:40px 48px}.inline-document-page,.inline-document-page *{box-sizing:border-box}.inline-document-page{color:#1e293b;font-family:Georgia,Cambria,Times New Roman,Times,serif;font-size:18px;line-height:1.7}.inline-document-page p,.inline-document-page ul,.inline-document-page ol,.inline-document-page blockquote,.inline-document-page table{margin:0 0 1.1em}.inline-document-page h1,.inline-document-page h2,.inline-document-page h3,.inline-document-page h4,.inline-document-page h5,.inline-document-page h6{margin:1.4em 0 .65em;color:#0f172a;line-height:1.25}.inline-document-page h1:first-child,.inline-document-page h2:first-child,.inline-document-page h3:first-child,.inline-document-page p:first-child{margin-top:0}.inline-document-page table{width:100%;border-collapse:collapse}.inline-document-page td,.inline-document-page th{padding:6px 10px;vertical-align:top}.inline-document-page img{max-width:100%;height:auto}.inline-document-page hr{border:0;border-top:1px solid #dbe4f0;margin:1.5em 0}.loading-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#ffffffe0;color:#475569;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.error-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#fffffff0;color:#991b1b;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.overlay-popout-google{width:40px;height:40px;right:26px;top:11.5px;position:absolute;z-index:1000}.overlay-popout-office{width:100px;height:20px;right:0;bottom:0;position:absolute;z-index:1000}.office-reload-btn{position:absolute;top:8px;right:8px;z-index:1001;width:32px;height:32px;border-radius:50%;border:1px solid rgba(0,0,0,.12);background:#ffffffd9;color:#475569;font-size:16px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:.5;transition:opacity .15s;padding:0}.office-reload-btn:hover{opacity:1}.overlay-full{width:100%;height:100%;right:0;top:0;position:absolute;z-index:1000}iframe{width:100%;height:100%}@media(max-width:768px){.inline-document-shell{padding:12px}.inline-document-page{border-radius:12px;padding:22px 18px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
341
- }
342
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: NgxDocViewerComponent, decorators: [{
343
- type: Component,
344
- args: [{ selector: 'ngx-doc-viewer', standalone: true, imports: [CommonModule], template: "<div class=\"container\">\n <div *ngIf=\"renderPhase === 'loading'\" class=\"loading-overlay\">\n <ng-container *ngIf=\"loadingTemplate; else defaultLoadingTemplate\">\n <ng-container *ngTemplateOutlet=\"loadingTemplate; context: loadingTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultLoadingTemplate>{{ loadingText }}</ng-template>\n </div>\n <div *ngIf=\"renderPhase === 'error'\" class=\"error-overlay\">\n <ng-container *ngIf=\"errorTemplate; else defaultErrorTemplate\">\n <ng-container *ngTemplateOutlet=\"errorTemplate; context: errorTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultErrorTemplate>\n <div>\n <div>{{ displayedErrorText }}</div>\n <div *ngIf=\"configuredViewer\" style=\"margin-top: 8px; color: #475569;\">\n Viewer: {{ configuredViewer }}\n </div>\n <div *ngIf=\"failedUrl\" style=\"margin-top: 4px; color: #64748b; font-size: 12px; word-break: break-word;\">\n {{ failedUrl }}\n </div>\n <ng-container *ngIf=\"errorActionsTemplate; else defaultErrorActions\">\n <ng-container *ngTemplateOutlet=\"errorActionsTemplate; context: errorTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultErrorActions>\n <div style=\"margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;\">\n <button\n type=\"button\"\n (click)=\"retryLoad()\"\n style=\"border: 1px solid #fecaca; background: #fff; color: #991b1b; border-radius: 999px; padding: 8px 14px; font: inherit; cursor: pointer;\"\n >\n {{ retryButtonText }}\n </button>\n <a\n *ngIf=\"secondaryActionText && failedUrl\"\n [href]=\"failedUrl\"\n [attr.target]=\"secondaryActionMode === 'open' ? '_blank' : null\"\n [attr.rel]=\"secondaryActionMode === 'open' ? 'noreferrer' : null\"\n [attr.download]=\"secondaryActionMode === 'download' ? '' : null\"\n style=\"border: 1px solid #cbd5e1; background: #fff; color: #334155; border-radius: 999px; padding: 8px 14px; text-decoration: none; font: inherit;\"\n >\n {{ secondaryActionText }}\n </a>\n </div>\n </ng-template>\n </div>\n </ng-template>\n </div>\n\n <ng-container *ngIf=\"!externalViewer\">\n <div *ngIf=\"configuredViewer !== 'pdf'\" class=\"inline-document-shell\">\n <div class=\"inline-document-page\" [innerHTML]=\"docHtml\"></div>\n </div>\n <object\n (load)=\"objectLoaded()\"\n *ngIf=\"fullUrl && configuredViewer === 'pdf'\"\n [data]=\"fullUrl\"\n type=\"application/pdf\"\n width=\"100%\"\n height=\"100%\"\n >\n <p>\n Your browser does not support PDFs.\n <a [href]=\"fullUrl\">Download the PDF</a>.\n </p>\n </object>\n </ng-container>\n\n <button\n *ngIf=\"configuredViewer === 'office' && renderPhase === 'ready'\"\n class=\"office-reload-btn\"\n type=\"button\"\n [attr.title]=\"officeReloadButtonTitle\"\n (click)=\"retryLoad()\"\n >\n <ng-container *ngIf=\"officeReloadTemplate; else defaultOfficeReloadTemplate\">\n <ng-container *ngTemplateOutlet=\"officeReloadTemplate; context: errorTemplateContext\"></ng-container>\n </ng-container>\n <ng-template #defaultOfficeReloadTemplate>{{ officeReloadButtonText }}</ng-template>\n </button>\n\n <ng-container *ngIf=\"externalViewer\">\n <iframe\n (load)=\"iframeLoaded()\"\n *ngIf=\"fullUrl && showIframe && disableContent === 'none'\"\n #iframe\n id=\"iframe-doc-viewer\"\n frameBorder=\"0\"\n allow=\"clipboard-read; clipboard-write\"\n [src]=\"fullUrl\"\n ></iframe>\n <div class=\"container\" *ngIf=\"disableContent !== 'none'\">\n <div\n [class.overlay-full]=\"disableContent === 'all'\"\n [class.overlay-popout-google]=\"\n configuredViewer === 'google' &&\n (disableContent === 'popout' || disableContent === 'popout-hide')\n \"\n [class.overlay-popout-office]=\"\n configuredViewer === 'office' &&\n (disableContent === 'popout' || disableContent === 'popout-hide')\n \"\n [style.background-color]=\"\n disableContent === 'popout-hide' ? '#fff' : 'transparent'\n \"\n ></div>\n <iframe\n (load)=\"iframeLoaded()\"\n *ngIf=\"fullUrl && showIframe\"\n #iframe\n id=\"iframe\"\n frameBorder=\"0\"\n allow=\"clipboard-read; clipboard-write\"\n [src]=\"fullUrl\"\n ></iframe>\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:block}.container{width:100%;height:100%;position:relative}.inline-document-shell{width:100%;height:100%;overflow:auto;background:linear-gradient(180deg,#eef2f7,#f8fafc);padding:24px}.inline-document-page{max-width:900px;min-height:100%;margin:0 auto;background:#fff;border:1px solid #dbe4f0;border-radius:18px;box-shadow:0 18px 40px -24px #0f172a4d,0 6px 18px -10px #0f172a2e;padding:40px 48px}.inline-document-page,.inline-document-page *{box-sizing:border-box}.inline-document-page{color:#1e293b;font-family:Georgia,Cambria,Times New Roman,Times,serif;font-size:18px;line-height:1.7}.inline-document-page p,.inline-document-page ul,.inline-document-page ol,.inline-document-page blockquote,.inline-document-page table{margin:0 0 1.1em}.inline-document-page h1,.inline-document-page h2,.inline-document-page h3,.inline-document-page h4,.inline-document-page h5,.inline-document-page h6{margin:1.4em 0 .65em;color:#0f172a;line-height:1.25}.inline-document-page h1:first-child,.inline-document-page h2:first-child,.inline-document-page h3:first-child,.inline-document-page p:first-child{margin-top:0}.inline-document-page table{width:100%;border-collapse:collapse}.inline-document-page td,.inline-document-page th{padding:6px 10px;vertical-align:top}.inline-document-page img{max-width:100%;height:auto}.inline-document-page hr{border:0;border-top:1px solid #dbe4f0;margin:1.5em 0}.loading-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#ffffffe0;color:#475569;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.error-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#fffffff0;color:#991b1b;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.overlay-popout-google{width:40px;height:40px;right:26px;top:11.5px;position:absolute;z-index:1000}.overlay-popout-office{width:100px;height:20px;right:0;bottom:0;position:absolute;z-index:1000}.office-reload-btn{position:absolute;top:8px;right:8px;z-index:1001;width:32px;height:32px;border-radius:50%;border:1px solid rgba(0,0,0,.12);background:#ffffffd9;color:#475569;font-size:16px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:.5;transition:opacity .15s;padding:0}.office-reload-btn:hover{opacity:1}.overlay-full{width:100%;height:100%;right:0;top:0;position:absolute;z-index:1000}iframe{width:100%;height:100%}@media(max-width:768px){.inline-document-shell{padding:12px}.inline-document-page{border-radius:12px;padding:22px 18px}}\n"] }]
345
- }], ctorParameters: () => [{ type: i1.DomSanitizer }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { loaded: [{
346
- type: Output
347
- }], loading: [{
348
- type: Output
349
- }], error: [{
350
- type: Output
351
- }], phaseChange: [{
352
- type: Output
353
- }], url: [{
354
- type: Input
355
- }], queryParams: [{
356
- type: Input
357
- }], viewerUrl: [{
358
- type: Input
359
- }], googleCheckInterval: [{
360
- type: Input
361
- }], googleMaxChecks: [{
362
- type: Input
363
- }], googleFinalRetryDelay: [{
364
- type: Input
365
- }], disableContent: [{
366
- type: Input
367
- }], googleCheckContentLoaded: [{
368
- type: Input
369
- }], viewer: [{
370
- type: Input
371
- }], overrideLocalhost: [{
372
- type: Input
373
- }], loadingText: [{
374
- type: Input
375
- }], errorTextOverride: [{
376
- type: Input
377
- }], retryButtonText: [{
378
- type: Input
379
- }], officeAutoRetry: [{
380
- type: Input
381
- }], officeRetryDelay: [{
382
- type: Input
383
- }], officeReloadButtonText: [{
384
- type: Input
385
- }], officeReloadButtonTitle: [{
386
- type: Input
387
- }], secondaryActionText: [{
388
- type: Input
389
- }], secondaryActionMode: [{
390
- type: Input
391
- }], loadingTemplate: [{
392
- type: ContentChild,
393
- args: ['loadingContent', { read: TemplateRef }]
394
- }], errorTemplate: [{
395
- type: ContentChild,
396
- args: ['errorContent', { read: TemplateRef }]
397
- }], errorActionsTemplate: [{
398
- type: ContentChild,
399
- args: ['errorActions', { read: TemplateRef }]
400
- }], officeReloadTemplate: [{
401
- type: ContentChild,
402
- args: ['officeReloadContent', { read: TemplateRef }]
403
- }], iframes: [{
404
- type: ViewChildren,
405
- args: ['iframe']
406
- }] } });
407
-
408
- class NgxDocViewerModule {
409
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: NgxDocViewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
410
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: NgxDocViewerModule, imports: [CommonModule, NgxDocViewerComponent], exports: [NgxDocViewerComponent] });
411
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: NgxDocViewerModule, imports: [CommonModule, NgxDocViewerComponent] });
412
- }
413
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: NgxDocViewerModule, decorators: [{
414
- type: NgModule,
415
- args: [{
416
- imports: [CommonModule, NgxDocViewerComponent],
417
- exports: [NgxDocViewerComponent],
418
- }]
419
- }] });
420
-
421
- /**
422
- * Generated bundle index. Do not edit.
423
- */
424
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, Injector, NgModule, NgZone, TemplateRef, afterNextRender, computed, contentChild, inject, input, output, signal, viewChild } from "@angular/core";
3
+ import { CommonModule, NgTemplateOutlet } from "@angular/common";
4
+ import { DomSanitizer } from "@angular/platform-browser";
5
+ import { ViewerRecoveryController, getDisableContentOverlay, getDocxToHtml, googleCheckSubscription, iframeIsLoaded, resolveViewerDetails } from "docviewhelper";
6
+ export * from "docviewhelper";
7
+ const SUPPORTED_VIEWERS = [
8
+ "google",
9
+ "office",
10
+ "mammoth",
11
+ "pdf",
12
+ "url"
13
+ ];
14
+ const SOURCE_INPUTS = [
15
+ "url",
16
+ "viewer",
17
+ "viewerUrl",
18
+ "queryParams",
19
+ "overrideLocalhost"
20
+ ];
21
+ var NgxDocViewerComponent = class NgxDocViewerComponent {
22
+ domSanitizer = inject(DomSanitizer);
23
+ ngZone = inject(NgZone);
24
+ injector = inject(Injector);
25
+ loaded = output();
26
+ loading = output();
27
+ error = output();
28
+ phaseChange = output();
29
+ url = input("", ...ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []);
30
+ queryParams = input("", ...ngDevMode ? [{ debugName: "queryParams" }] : /* istanbul ignore next */ []);
31
+ viewerUrl = input("", ...ngDevMode ? [{ debugName: "viewerUrl" }] : /* istanbul ignore next */ []);
32
+ googleCheckInterval = input(3e3, ...ngDevMode ? [{ debugName: "googleCheckInterval" }] : /* istanbul ignore next */ []);
33
+ googleMaxChecks = input(5, ...ngDevMode ? [{ debugName: "googleMaxChecks" }] : /* istanbul ignore next */ []);
34
+ googleFinalRetryDelay = input(0, ...ngDevMode ? [{ debugName: "googleFinalRetryDelay" }] : /* istanbul ignore next */ []);
35
+ disableContent = input("none", ...ngDevMode ? [{ debugName: "disableContent" }] : /* istanbul ignore next */ []);
36
+ googleCheckContentLoaded = input(true, ...ngDevMode ? [{ debugName: "googleCheckContentLoaded" }] : /* istanbul ignore next */ []);
37
+ viewer = input("google", ...ngDevMode ? [{ debugName: "viewer" }] : /* istanbul ignore next */ []);
38
+ overrideLocalhost = input("", ...ngDevMode ? [{ debugName: "overrideLocalhost" }] : /* istanbul ignore next */ []);
39
+ loadingText = input("Loading document...", ...ngDevMode ? [{ debugName: "loadingText" }] : /* istanbul ignore next */ []);
40
+ errorTextOverride = input("", ...ngDevMode ? [{ debugName: "errorTextOverride" }] : /* istanbul ignore next */ []);
41
+ retryButtonText = input("Retry", ...ngDevMode ? [{ debugName: "retryButtonText" }] : /* istanbul ignore next */ []);
42
+ officeAutoRetry = input(false, ...ngDevMode ? [{ debugName: "officeAutoRetry" }] : /* istanbul ignore next */ []);
43
+ officeRetryDelay = input(3e3, ...ngDevMode ? [{ debugName: "officeRetryDelay" }] : /* istanbul ignore next */ []);
44
+ officeReloadButtonText = input("↻", ...ngDevMode ? [{ debugName: "officeReloadButtonText" }] : /* istanbul ignore next */ []);
45
+ officeReloadButtonTitle = input("Reload document", ...ngDevMode ? [{ debugName: "officeReloadButtonTitle" }] : /* istanbul ignore next */ []);
46
+ secondaryActionText = input("", ...ngDevMode ? [{ debugName: "secondaryActionText" }] : /* istanbul ignore next */ []);
47
+ secondaryActionMode = input("open", ...ngDevMode ? [{ debugName: "secondaryActionMode" }] : /* istanbul ignore next */ []);
48
+ loadingTemplate = contentChild("loadingContent", {
49
+ ...ngDevMode ? { debugName: "loadingTemplate" } : /* istanbul ignore next */ {},
50
+ read: TemplateRef
51
+ });
52
+ errorTemplate = contentChild("errorContent", {
53
+ ...ngDevMode ? { debugName: "errorTemplate" } : /* istanbul ignore next */ {},
54
+ read: TemplateRef
55
+ });
56
+ errorActionsTemplate = contentChild("errorActions", {
57
+ ...ngDevMode ? { debugName: "errorActionsTemplate" } : /* istanbul ignore next */ {},
58
+ read: TemplateRef
59
+ });
60
+ officeReloadTemplate = contentChild("officeReloadContent", {
61
+ ...ngDevMode ? { debugName: "officeReloadTemplate" } : /* istanbul ignore next */ {},
62
+ read: TemplateRef
63
+ });
64
+ iframe = viewChild("iframe", ...ngDevMode ? [{ debugName: "iframe" }] : /* istanbul ignore next */ []);
65
+ renderPhase = signal("idle", ...ngDevMode ? [{ debugName: "renderPhase" }] : /* istanbul ignore next */ []);
66
+ externalViewer = signal(false, ...ngDevMode ? [{ debugName: "externalViewer" }] : /* istanbul ignore next */ []);
67
+ fullUrl = signal(void 0, ...ngDevMode ? [{ debugName: "fullUrl" }] : /* istanbul ignore next */ []);
68
+ docHtml = signal("", ...ngDevMode ? [{ debugName: "docHtml" }] : /* istanbul ignore next */ []);
69
+ errorText = signal("", ...ngDevMode ? [{ debugName: "errorText" }] : /* istanbul ignore next */ []);
70
+ sourceUrl = signal("", ...ngDevMode ? [{ debugName: "sourceUrl" }] : /* istanbul ignore next */ []);
71
+ loadKey = signal(0, ...ngDevMode ? [{ debugName: "loadKey" }] : /* istanbul ignore next */ []);
72
+ loadKeys = computed(() => this.fullUrl() ? [this.loadKey()] : [], ...ngDevMode ? [{ debugName: "loadKeys" }] : /* istanbul ignore next */ []);
73
+ displayedErrorText = computed(() => this.errorTextOverride() || this.errorText() || "Unable to load document.", ...ngDevMode ? [{ debugName: "displayedErrorText" }] : /* istanbul ignore next */ []);
74
+ overlayClass = computed(() => {
75
+ const overlay = getDisableContentOverlay(this.viewer(), this.disableContent());
76
+ return overlay ? `overlay overlay-${overlay}` : void 0;
77
+ }, ...ngDevMode ? [{ debugName: "overlayClass" }] : /* istanbul ignore next */ []);
78
+ templateContext = computed(() => {
79
+ const state = {
80
+ viewer: this.viewer(),
81
+ url: this.sourceUrl() || this.url(),
82
+ phase: this.renderPhase(),
83
+ errorText: this.displayedErrorText(),
84
+ retry: () => this.retryLoad(),
85
+ actionUrl: this.sourceUrl() || this.url()
86
+ };
87
+ return {
88
+ $implicit: state,
89
+ state
90
+ };
91
+ }, ...ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []);
92
+ checkIFrameSubscription = void 0;
93
+ googleProbe = void 0;
94
+ recovery = void 0;
95
+ lastEmittedPhase = void 0;
96
+ ngOnDestroy() {
97
+ this.recovery?.dispose();
98
+ this.stopGoogleProbe();
99
+ }
100
+ ngOnChanges(changes) {
101
+ if (changes["viewer"] && !SUPPORTED_VIEWERS.includes(this.viewer())) console.error(`Unsupported viewer: '${this.viewer()}'. Supported viewers: ${SUPPORTED_VIEWERS.join(", ")}`);
102
+ if (SOURCE_INPUTS.some((name) => changes[name] && changes[name].currentValue !== changes[name].previousValue)) this.load();
103
+ }
104
+ retryLoad() {
105
+ this.load();
106
+ }
107
+ iframeLoaded() {
108
+ const iframe = this.iframe()?.nativeElement;
109
+ if (iframe && iframeIsLoaded(iframe)) {
110
+ this.recovery?.notifyLoaded();
111
+ this.checkIFrameSubscription?.unsubscribe();
112
+ this.setRenderPhase("ready");
113
+ }
114
+ }
115
+ objectLoaded() {
116
+ this.recovery?.notifyLoaded();
117
+ this.setRenderPhase("ready");
118
+ }
119
+ load() {
120
+ const loadKey = this.loadKey() + 1;
121
+ const isActive = () => loadKey === this.loadKey();
122
+ this.loadKey.set(loadKey);
123
+ const recovery = this.ensureRecovery();
124
+ this.stopGoogleProbe();
125
+ const url = this.url();
126
+ const viewer = this.viewer();
127
+ const details = resolveViewerDetails({
128
+ url,
129
+ viewer,
130
+ queryParams: this.queryParams(),
131
+ viewerUrl: this.viewerUrl(),
132
+ overrideLocalhost: this.overrideLocalhost()
133
+ });
134
+ recovery.trackSource(details.url);
135
+ this.externalViewer.set(!!url && details.externalViewer);
136
+ this.fullUrl.set(void 0);
137
+ this.docHtml.set("");
138
+ this.errorText.set("");
139
+ this.sourceUrl.set(url);
140
+ if (!url) {
141
+ recovery.clearTimers();
142
+ this.setRenderPhase("idle");
143
+ return;
144
+ }
145
+ this.setRenderPhase("loading");
146
+ if (viewer === "mammoth") {
147
+ recovery.beginInlineLoad(isActive);
148
+ getDocxToHtml(details.url).then((html) => {
149
+ if (!isActive()) return;
150
+ recovery.notifyLoaded();
151
+ this.docHtml.set(html);
152
+ this.setRenderPhase("ready");
153
+ }, (error) => {
154
+ if (!isActive()) return;
155
+ recovery.clearTimers();
156
+ this.errorText.set(error instanceof Error ? error.message : "Unable to load document.");
157
+ this.setRenderPhase("error");
158
+ });
159
+ return;
160
+ }
161
+ this.fullUrl.set(this.domSanitizer.bypassSecurityTrustResourceUrl(details.url));
162
+ if (recovery.beginExternalLoad(isActive).modes.includes("google-probe")) this.startGoogleProbe(isActive);
163
+ }
164
+ ensureRecovery() {
165
+ if (!this.recovery) this.recovery = new ViewerRecoveryController(this.buildRecoveryConfig(), {
166
+ triggerRetry: () => this.retryLoad(),
167
+ reportTimeout: () => {
168
+ if (this.renderPhase() !== "loading") return;
169
+ this.errorText.set(`The ${this.viewer()} viewer did not finish loading in time.`);
170
+ this.setRenderPhase("error");
171
+ }
172
+ });
173
+ this.recovery.configure(this.buildRecoveryConfig());
174
+ return this.recovery;
175
+ }
176
+ buildRecoveryConfig() {
177
+ return {
178
+ viewer: this.viewer(),
179
+ googleCheckContentLoaded: this.googleCheckContentLoaded(),
180
+ googleCheckInterval: this.googleCheckInterval(),
181
+ googleMaxChecks: this.googleMaxChecks(),
182
+ googleFinalRetryDelay: this.googleFinalRetryDelay(),
183
+ officeAutoRetry: this.officeAutoRetry(),
184
+ officeRetryDelay: this.officeRetryDelay()
185
+ };
186
+ }
187
+ startGoogleProbe(isActive) {
188
+ this.googleProbe = afterNextRender(() => {
189
+ this.googleProbe = void 0;
190
+ const iframe = this.iframe()?.nativeElement;
191
+ if (!isActive() || !iframe) return;
192
+ this.checkIFrameSubscription = googleCheckSubscription();
193
+ this.ngZone.runOutsideAngular(() => this.checkIFrameSubscription?.subscribe(iframe, this.googleCheckInterval(), this.googleMaxChecks()));
194
+ }, { injector: this.injector });
195
+ }
196
+ stopGoogleProbe() {
197
+ this.googleProbe?.destroy();
198
+ this.googleProbe = void 0;
199
+ this.checkIFrameSubscription?.unsubscribe();
200
+ this.checkIFrameSubscription = void 0;
201
+ }
202
+ setRenderPhase(phase) {
203
+ this.renderPhase.set(phase);
204
+ if (this.lastEmittedPhase === phase) return;
205
+ this.lastEmittedPhase = phase;
206
+ const { state } = this.templateContext();
207
+ this.phaseChange.emit(state);
208
+ if (phase === "loading") this.loading.emit(state);
209
+ if (phase === "error") this.error.emit(state);
210
+ if (phase === "ready") this.loaded.emit();
211
+ }
212
+ static ɵfac = i0.ɵɵngDeclareFactory({
213
+ minVersion: "12.0.0",
214
+ version: "22.2.3",
215
+ ngImport: i0,
216
+ type: NgxDocViewerComponent,
217
+ deps: [],
218
+ target: i0.ɵɵFactoryTarget.Component
219
+ });
220
+ static ɵcmp = i0.ɵɵngDeclareComponent({
221
+ minVersion: "17.0.0",
222
+ version: "22.2.3",
223
+ type: NgxDocViewerComponent,
224
+ isStandalone: true,
225
+ selector: "ngx-doc-viewer",
226
+ inputs: {
227
+ url: {
228
+ classPropertyName: "url",
229
+ publicName: "url",
230
+ isSignal: true,
231
+ isRequired: false,
232
+ transformFunction: null
233
+ },
234
+ queryParams: {
235
+ classPropertyName: "queryParams",
236
+ publicName: "queryParams",
237
+ isSignal: true,
238
+ isRequired: false,
239
+ transformFunction: null
240
+ },
241
+ viewerUrl: {
242
+ classPropertyName: "viewerUrl",
243
+ publicName: "viewerUrl",
244
+ isSignal: true,
245
+ isRequired: false,
246
+ transformFunction: null
247
+ },
248
+ googleCheckInterval: {
249
+ classPropertyName: "googleCheckInterval",
250
+ publicName: "googleCheckInterval",
251
+ isSignal: true,
252
+ isRequired: false,
253
+ transformFunction: null
254
+ },
255
+ googleMaxChecks: {
256
+ classPropertyName: "googleMaxChecks",
257
+ publicName: "googleMaxChecks",
258
+ isSignal: true,
259
+ isRequired: false,
260
+ transformFunction: null
261
+ },
262
+ googleFinalRetryDelay: {
263
+ classPropertyName: "googleFinalRetryDelay",
264
+ publicName: "googleFinalRetryDelay",
265
+ isSignal: true,
266
+ isRequired: false,
267
+ transformFunction: null
268
+ },
269
+ disableContent: {
270
+ classPropertyName: "disableContent",
271
+ publicName: "disableContent",
272
+ isSignal: true,
273
+ isRequired: false,
274
+ transformFunction: null
275
+ },
276
+ googleCheckContentLoaded: {
277
+ classPropertyName: "googleCheckContentLoaded",
278
+ publicName: "googleCheckContentLoaded",
279
+ isSignal: true,
280
+ isRequired: false,
281
+ transformFunction: null
282
+ },
283
+ viewer: {
284
+ classPropertyName: "viewer",
285
+ publicName: "viewer",
286
+ isSignal: true,
287
+ isRequired: false,
288
+ transformFunction: null
289
+ },
290
+ overrideLocalhost: {
291
+ classPropertyName: "overrideLocalhost",
292
+ publicName: "overrideLocalhost",
293
+ isSignal: true,
294
+ isRequired: false,
295
+ transformFunction: null
296
+ },
297
+ loadingText: {
298
+ classPropertyName: "loadingText",
299
+ publicName: "loadingText",
300
+ isSignal: true,
301
+ isRequired: false,
302
+ transformFunction: null
303
+ },
304
+ errorTextOverride: {
305
+ classPropertyName: "errorTextOverride",
306
+ publicName: "errorTextOverride",
307
+ isSignal: true,
308
+ isRequired: false,
309
+ transformFunction: null
310
+ },
311
+ retryButtonText: {
312
+ classPropertyName: "retryButtonText",
313
+ publicName: "retryButtonText",
314
+ isSignal: true,
315
+ isRequired: false,
316
+ transformFunction: null
317
+ },
318
+ officeAutoRetry: {
319
+ classPropertyName: "officeAutoRetry",
320
+ publicName: "officeAutoRetry",
321
+ isSignal: true,
322
+ isRequired: false,
323
+ transformFunction: null
324
+ },
325
+ officeRetryDelay: {
326
+ classPropertyName: "officeRetryDelay",
327
+ publicName: "officeRetryDelay",
328
+ isSignal: true,
329
+ isRequired: false,
330
+ transformFunction: null
331
+ },
332
+ officeReloadButtonText: {
333
+ classPropertyName: "officeReloadButtonText",
334
+ publicName: "officeReloadButtonText",
335
+ isSignal: true,
336
+ isRequired: false,
337
+ transformFunction: null
338
+ },
339
+ officeReloadButtonTitle: {
340
+ classPropertyName: "officeReloadButtonTitle",
341
+ publicName: "officeReloadButtonTitle",
342
+ isSignal: true,
343
+ isRequired: false,
344
+ transformFunction: null
345
+ },
346
+ secondaryActionText: {
347
+ classPropertyName: "secondaryActionText",
348
+ publicName: "secondaryActionText",
349
+ isSignal: true,
350
+ isRequired: false,
351
+ transformFunction: null
352
+ },
353
+ secondaryActionMode: {
354
+ classPropertyName: "secondaryActionMode",
355
+ publicName: "secondaryActionMode",
356
+ isSignal: true,
357
+ isRequired: false,
358
+ transformFunction: null
359
+ }
360
+ },
361
+ outputs: {
362
+ loaded: "loaded",
363
+ loading: "loading",
364
+ error: "error",
365
+ phaseChange: "phaseChange"
366
+ },
367
+ queries: [
368
+ {
369
+ propertyName: "loadingTemplate",
370
+ first: true,
371
+ predicate: ["loadingContent"],
372
+ descendants: true,
373
+ read: TemplateRef,
374
+ isSignal: true
375
+ },
376
+ {
377
+ propertyName: "errorTemplate",
378
+ first: true,
379
+ predicate: ["errorContent"],
380
+ descendants: true,
381
+ read: TemplateRef,
382
+ isSignal: true
383
+ },
384
+ {
385
+ propertyName: "errorActionsTemplate",
386
+ first: true,
387
+ predicate: ["errorActions"],
388
+ descendants: true,
389
+ read: TemplateRef,
390
+ isSignal: true
391
+ },
392
+ {
393
+ propertyName: "officeReloadTemplate",
394
+ first: true,
395
+ predicate: ["officeReloadContent"],
396
+ descendants: true,
397
+ read: TemplateRef,
398
+ isSignal: true
399
+ }
400
+ ],
401
+ viewQueries: [{
402
+ propertyName: "iframe",
403
+ first: true,
404
+ predicate: ["iframe"],
405
+ descendants: true,
406
+ isSignal: true
407
+ }],
408
+ usesOnChanges: true,
409
+ ngImport: i0,
410
+ template: "<div class=\"container\">\n @if (renderPhase() === 'loading') {\n <div class=\"loading-overlay\">\n @if (loadingTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n {{ loadingText() }}\n }\n </div>\n }\n @if (renderPhase() === 'error') {\n <div class=\"error-overlay\">\n @if (errorTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n <div>\n <div>{{ displayedErrorText() }}</div>\n <div class=\"error-viewer\">Viewer: {{ viewer() }}</div>\n @if (sourceUrl()) {\n <div class=\"error-url\">{{ sourceUrl() }}</div>\n }\n @if (errorActionsTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n <div class=\"error-actions\">\n <button type=\"button\" class=\"retry-btn\" (click)=\"retryLoad()\">\n {{ retryButtonText() }}\n </button>\n @if (secondaryActionText() && sourceUrl()) {\n <a\n class=\"secondary-action-btn\"\n [href]=\"sourceUrl()\"\n [attr.target]=\"secondaryActionMode() === 'open' ? '_blank' : null\"\n [attr.rel]=\"secondaryActionMode() === 'open' ? 'noreferrer' : null\"\n [attr.download]=\"secondaryActionMode() === 'download' ? '' : null\"\n >\n {{ secondaryActionText() }}\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (externalViewer()) {\n @for (key of loadKeys(); track key) {\n <iframe\n #iframe\n class=\"ngx-doc-viewer-iframe\"\n title=\"Document viewer\"\n frameBorder=\"0\"\n allow=\"clipboard-read; clipboard-write\"\n [src]=\"fullUrl()\"\n (load)=\"iframeLoaded()\"\n ></iframe>\n }\n @if (overlayClass(); as overlay) {\n <div\n [class]=\"overlay\"\n [style.background-color]=\"disableContent() === 'popout-hide' ? '#fff' : 'transparent'\"\n ></div>\n }\n } @else if (viewer() === 'pdf') {\n @for (key of loadKeys(); track key) {\n <object\n class=\"ngx-doc-viewer-object\"\n type=\"application/pdf\"\n width=\"100%\"\n height=\"100%\"\n [data]=\"fullUrl()\"\n (load)=\"objectLoaded()\"\n >\n <p>\n Your browser does not support PDFs.\n <a [href]=\"fullUrl()\">Download the PDF</a>.\n </p>\n </object>\n }\n } @else {\n <div class=\"inline-document-shell\">\n <div class=\"inline-document-page\" [innerHTML]=\"docHtml()\"></div>\n </div>\n }\n\n @if (viewer() === 'office' && renderPhase() === 'ready') {\n <button\n class=\"office-reload-btn\"\n type=\"button\"\n [attr.title]=\"officeReloadButtonTitle()\"\n (click)=\"retryLoad()\"\n >\n @if (officeReloadTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n {{ officeReloadButtonText() }}\n }\n </button>\n }\n</div>\n",
411
+ styles: [":host{display:block}.container{width:100%;height:100%;position:relative}.inline-document-shell{width:100%;height:100%;overflow:auto;background:linear-gradient(180deg,#eef2f7,#f8fafc);padding:24px}.inline-document-page{max-width:900px;min-height:100%;margin:0 auto;background:#fff;border:1px solid #dbe4f0;border-radius:18px;box-shadow:0 18px 40px -24px #0f172a4d,0 6px 18px -10px #0f172a2e;padding:40px 48px}.inline-document-page,.inline-document-page *{box-sizing:border-box}.inline-document-page{color:#1e293b;font-family:Georgia,Cambria,Times New Roman,Times,serif;font-size:18px;line-height:1.7}.inline-document-page p,.inline-document-page ul,.inline-document-page ol,.inline-document-page blockquote,.inline-document-page table{margin:0 0 1.1em}.inline-document-page h1,.inline-document-page h2,.inline-document-page h3,.inline-document-page h4,.inline-document-page h5,.inline-document-page h6{margin:1.4em 0 .65em;color:#0f172a;line-height:1.25}.inline-document-page h1:first-child,.inline-document-page h2:first-child,.inline-document-page h3:first-child,.inline-document-page p:first-child{margin-top:0}.inline-document-page table{width:100%;border-collapse:collapse}.inline-document-page td,.inline-document-page th{padding:6px 10px;vertical-align:top}.inline-document-page img{max-width:100%;height:auto}.inline-document-page hr{border:0;border-top:1px solid #dbe4f0;margin:1.5em 0}.loading-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#ffffffe0;color:#475569;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.error-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#fffffff0;color:#991b1b;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.error-viewer{margin-top:8px;color:#475569}.error-url{margin-top:4px;color:#64748b;font-size:12px;word-break:break-word}.error-actions{margin-top:14px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.retry-btn{border:1px solid #fecaca;background:#fff;color:#991b1b;border-radius:999px;padding:8px 14px;font:inherit;cursor:pointer}.secondary-action-btn{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:999px;padding:8px 14px;text-decoration:none;font:inherit}.overlay{position:absolute;z-index:1000}.overlay-popout-google{width:40px;height:40px;right:26px;top:11.5px}.overlay-popout-office{width:100px;height:20px;right:0;bottom:0}.overlay-full{width:100%;height:100%;right:0;top:0}.office-reload-btn{position:absolute;top:8px;right:8px;z-index:1001;width:32px;height:32px;border-radius:50%;border:1px solid rgba(0,0,0,.12);background:#ffffffd9;color:#475569;font-size:16px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:.5;transition:opacity .15s;padding:0}.office-reload-btn:hover{opacity:1}iframe,object{display:block;width:100%;height:100%}@media(max-width:768px){.inline-document-shell{padding:12px}.inline-document-page{border-radius:12px;padding:22px 18px}}\n"],
412
+ dependencies: [{
413
+ kind: "directive",
414
+ type: NgTemplateOutlet,
415
+ selector: "[ngTemplateOutlet]",
416
+ inputs: [
417
+ "ngTemplateOutletContext",
418
+ "ngTemplateOutlet",
419
+ "ngTemplateOutletInjector"
420
+ ]
421
+ }]
422
+ });
423
+ };
424
+ i0.ɵɵngDeclareClassMetadata({
425
+ minVersion: "12.0.0",
426
+ version: "22.2.3",
427
+ ngImport: i0,
428
+ type: NgxDocViewerComponent,
429
+ decorators: [{
430
+ type: Component,
431
+ args: [{
432
+ selector: "ngx-doc-viewer",
433
+ standalone: true,
434
+ imports: [NgTemplateOutlet],
435
+ template: "<div class=\"container\">\n @if (renderPhase() === 'loading') {\n <div class=\"loading-overlay\">\n @if (loadingTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n {{ loadingText() }}\n }\n </div>\n }\n @if (renderPhase() === 'error') {\n <div class=\"error-overlay\">\n @if (errorTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n <div>\n <div>{{ displayedErrorText() }}</div>\n <div class=\"error-viewer\">Viewer: {{ viewer() }}</div>\n @if (sourceUrl()) {\n <div class=\"error-url\">{{ sourceUrl() }}</div>\n }\n @if (errorActionsTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n <div class=\"error-actions\">\n <button type=\"button\" class=\"retry-btn\" (click)=\"retryLoad()\">\n {{ retryButtonText() }}\n </button>\n @if (secondaryActionText() && sourceUrl()) {\n <a\n class=\"secondary-action-btn\"\n [href]=\"sourceUrl()\"\n [attr.target]=\"secondaryActionMode() === 'open' ? '_blank' : null\"\n [attr.rel]=\"secondaryActionMode() === 'open' ? 'noreferrer' : null\"\n [attr.download]=\"secondaryActionMode() === 'download' ? '' : null\"\n >\n {{ secondaryActionText() }}\n </a>\n }\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (externalViewer()) {\n @for (key of loadKeys(); track key) {\n <iframe\n #iframe\n class=\"ngx-doc-viewer-iframe\"\n title=\"Document viewer\"\n frameBorder=\"0\"\n allow=\"clipboard-read; clipboard-write\"\n [src]=\"fullUrl()\"\n (load)=\"iframeLoaded()\"\n ></iframe>\n }\n @if (overlayClass(); as overlay) {\n <div\n [class]=\"overlay\"\n [style.background-color]=\"disableContent() === 'popout-hide' ? '#fff' : 'transparent'\"\n ></div>\n }\n } @else if (viewer() === 'pdf') {\n @for (key of loadKeys(); track key) {\n <object\n class=\"ngx-doc-viewer-object\"\n type=\"application/pdf\"\n width=\"100%\"\n height=\"100%\"\n [data]=\"fullUrl()\"\n (load)=\"objectLoaded()\"\n >\n <p>\n Your browser does not support PDFs.\n <a [href]=\"fullUrl()\">Download the PDF</a>.\n </p>\n </object>\n }\n } @else {\n <div class=\"inline-document-shell\">\n <div class=\"inline-document-page\" [innerHTML]=\"docHtml()\"></div>\n </div>\n }\n\n @if (viewer() === 'office' && renderPhase() === 'ready') {\n <button\n class=\"office-reload-btn\"\n type=\"button\"\n [attr.title]=\"officeReloadButtonTitle()\"\n (click)=\"retryLoad()\"\n >\n @if (officeReloadTemplate(); as template) {\n <ng-container *ngTemplateOutlet=\"template; context: templateContext()\" />\n } @else {\n {{ officeReloadButtonText() }}\n }\n </button>\n }\n</div>\n",
436
+ styles: [":host{display:block}.container{width:100%;height:100%;position:relative}.inline-document-shell{width:100%;height:100%;overflow:auto;background:linear-gradient(180deg,#eef2f7,#f8fafc);padding:24px}.inline-document-page{max-width:900px;min-height:100%;margin:0 auto;background:#fff;border:1px solid #dbe4f0;border-radius:18px;box-shadow:0 18px 40px -24px #0f172a4d,0 6px 18px -10px #0f172a2e;padding:40px 48px}.inline-document-page,.inline-document-page *{box-sizing:border-box}.inline-document-page{color:#1e293b;font-family:Georgia,Cambria,Times New Roman,Times,serif;font-size:18px;line-height:1.7}.inline-document-page p,.inline-document-page ul,.inline-document-page ol,.inline-document-page blockquote,.inline-document-page table{margin:0 0 1.1em}.inline-document-page h1,.inline-document-page h2,.inline-document-page h3,.inline-document-page h4,.inline-document-page h5,.inline-document-page h6{margin:1.4em 0 .65em;color:#0f172a;line-height:1.25}.inline-document-page h1:first-child,.inline-document-page h2:first-child,.inline-document-page h3:first-child,.inline-document-page p:first-child{margin-top:0}.inline-document-page table{width:100%;border-collapse:collapse}.inline-document-page td,.inline-document-page th{padding:6px 10px;vertical-align:top}.inline-document-page img{max-width:100%;height:auto}.inline-document-page hr{border:0;border-top:1px solid #dbe4f0;margin:1.5em 0}.loading-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#ffffffe0;color:#475569;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.error-overlay{position:absolute;inset:0;z-index:1001;display:flex;align-items:center;justify-content:center;background:#fffffff0;color:#991b1b;font-size:14px;font-weight:600;letter-spacing:.02em;text-align:center;padding:16px}.error-viewer{margin-top:8px;color:#475569}.error-url{margin-top:4px;color:#64748b;font-size:12px;word-break:break-word}.error-actions{margin-top:14px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.retry-btn{border:1px solid #fecaca;background:#fff;color:#991b1b;border-radius:999px;padding:8px 14px;font:inherit;cursor:pointer}.secondary-action-btn{border:1px solid #cbd5e1;background:#fff;color:#334155;border-radius:999px;padding:8px 14px;text-decoration:none;font:inherit}.overlay{position:absolute;z-index:1000}.overlay-popout-google{width:40px;height:40px;right:26px;top:11.5px}.overlay-popout-office{width:100px;height:20px;right:0;bottom:0}.overlay-full{width:100%;height:100%;right:0;top:0}.office-reload-btn{position:absolute;top:8px;right:8px;z-index:1001;width:32px;height:32px;border-radius:50%;border:1px solid rgba(0,0,0,.12);background:#ffffffd9;color:#475569;font-size:16px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:.5;transition:opacity .15s;padding:0}.office-reload-btn:hover{opacity:1}iframe,object{display:block;width:100%;height:100%}@media(max-width:768px){.inline-document-shell{padding:12px}.inline-document-page{border-radius:12px;padding:22px 18px}}\n"]
437
+ }]
438
+ }],
439
+ propDecorators: {
440
+ loaded: [{
441
+ type: i0.Output,
442
+ args: ["loaded"]
443
+ }],
444
+ loading: [{
445
+ type: i0.Output,
446
+ args: ["loading"]
447
+ }],
448
+ error: [{
449
+ type: i0.Output,
450
+ args: ["error"]
451
+ }],
452
+ phaseChange: [{
453
+ type: i0.Output,
454
+ args: ["phaseChange"]
455
+ }],
456
+ url: [{
457
+ type: i0.Input,
458
+ args: [{
459
+ isSignal: true,
460
+ alias: "url",
461
+ required: false
462
+ }]
463
+ }],
464
+ queryParams: [{
465
+ type: i0.Input,
466
+ args: [{
467
+ isSignal: true,
468
+ alias: "queryParams",
469
+ required: false
470
+ }]
471
+ }],
472
+ viewerUrl: [{
473
+ type: i0.Input,
474
+ args: [{
475
+ isSignal: true,
476
+ alias: "viewerUrl",
477
+ required: false
478
+ }]
479
+ }],
480
+ googleCheckInterval: [{
481
+ type: i0.Input,
482
+ args: [{
483
+ isSignal: true,
484
+ alias: "googleCheckInterval",
485
+ required: false
486
+ }]
487
+ }],
488
+ googleMaxChecks: [{
489
+ type: i0.Input,
490
+ args: [{
491
+ isSignal: true,
492
+ alias: "googleMaxChecks",
493
+ required: false
494
+ }]
495
+ }],
496
+ googleFinalRetryDelay: [{
497
+ type: i0.Input,
498
+ args: [{
499
+ isSignal: true,
500
+ alias: "googleFinalRetryDelay",
501
+ required: false
502
+ }]
503
+ }],
504
+ disableContent: [{
505
+ type: i0.Input,
506
+ args: [{
507
+ isSignal: true,
508
+ alias: "disableContent",
509
+ required: false
510
+ }]
511
+ }],
512
+ googleCheckContentLoaded: [{
513
+ type: i0.Input,
514
+ args: [{
515
+ isSignal: true,
516
+ alias: "googleCheckContentLoaded",
517
+ required: false
518
+ }]
519
+ }],
520
+ viewer: [{
521
+ type: i0.Input,
522
+ args: [{
523
+ isSignal: true,
524
+ alias: "viewer",
525
+ required: false
526
+ }]
527
+ }],
528
+ overrideLocalhost: [{
529
+ type: i0.Input,
530
+ args: [{
531
+ isSignal: true,
532
+ alias: "overrideLocalhost",
533
+ required: false
534
+ }]
535
+ }],
536
+ loadingText: [{
537
+ type: i0.Input,
538
+ args: [{
539
+ isSignal: true,
540
+ alias: "loadingText",
541
+ required: false
542
+ }]
543
+ }],
544
+ errorTextOverride: [{
545
+ type: i0.Input,
546
+ args: [{
547
+ isSignal: true,
548
+ alias: "errorTextOverride",
549
+ required: false
550
+ }]
551
+ }],
552
+ retryButtonText: [{
553
+ type: i0.Input,
554
+ args: [{
555
+ isSignal: true,
556
+ alias: "retryButtonText",
557
+ required: false
558
+ }]
559
+ }],
560
+ officeAutoRetry: [{
561
+ type: i0.Input,
562
+ args: [{
563
+ isSignal: true,
564
+ alias: "officeAutoRetry",
565
+ required: false
566
+ }]
567
+ }],
568
+ officeRetryDelay: [{
569
+ type: i0.Input,
570
+ args: [{
571
+ isSignal: true,
572
+ alias: "officeRetryDelay",
573
+ required: false
574
+ }]
575
+ }],
576
+ officeReloadButtonText: [{
577
+ type: i0.Input,
578
+ args: [{
579
+ isSignal: true,
580
+ alias: "officeReloadButtonText",
581
+ required: false
582
+ }]
583
+ }],
584
+ officeReloadButtonTitle: [{
585
+ type: i0.Input,
586
+ args: [{
587
+ isSignal: true,
588
+ alias: "officeReloadButtonTitle",
589
+ required: false
590
+ }]
591
+ }],
592
+ secondaryActionText: [{
593
+ type: i0.Input,
594
+ args: [{
595
+ isSignal: true,
596
+ alias: "secondaryActionText",
597
+ required: false
598
+ }]
599
+ }],
600
+ secondaryActionMode: [{
601
+ type: i0.Input,
602
+ args: [{
603
+ isSignal: true,
604
+ alias: "secondaryActionMode",
605
+ required: false
606
+ }]
607
+ }],
608
+ loadingTemplate: [{
609
+ type: i0.ContentChild,
610
+ args: ["loadingContent", {
611
+ read: TemplateRef,
612
+ isSignal: true
613
+ }]
614
+ }],
615
+ errorTemplate: [{
616
+ type: i0.ContentChild,
617
+ args: ["errorContent", {
618
+ read: TemplateRef,
619
+ isSignal: true
620
+ }]
621
+ }],
622
+ errorActionsTemplate: [{
623
+ type: i0.ContentChild,
624
+ args: ["errorActions", {
625
+ read: TemplateRef,
626
+ isSignal: true
627
+ }]
628
+ }],
629
+ officeReloadTemplate: [{
630
+ type: i0.ContentChild,
631
+ args: ["officeReloadContent", {
632
+ read: TemplateRef,
633
+ isSignal: true
634
+ }]
635
+ }],
636
+ iframe: [{
637
+ type: i0.ViewChild,
638
+ args: ["iframe", { isSignal: true }]
639
+ }]
640
+ }
641
+ });
642
+ var NgxDocViewerModule = class NgxDocViewerModule {
643
+ static ɵfac = i0.ɵɵngDeclareFactory({
644
+ minVersion: "12.0.0",
645
+ version: "22.2.3",
646
+ ngImport: i0,
647
+ type: NgxDocViewerModule,
648
+ deps: [],
649
+ target: i0.ɵɵFactoryTarget.NgModule
650
+ });
651
+ static ɵmod = i0.ɵɵngDeclareNgModule({
652
+ minVersion: "14.0.0",
653
+ version: "22.2.3",
654
+ ngImport: i0,
655
+ type: NgxDocViewerModule,
656
+ imports: [CommonModule, NgxDocViewerComponent],
657
+ exports: [NgxDocViewerComponent]
658
+ });
659
+ static ɵinj = i0.ɵɵngDeclareInjector({
660
+ minVersion: "12.0.0",
661
+ version: "22.2.3",
662
+ ngImport: i0,
663
+ type: NgxDocViewerModule,
664
+ imports: [CommonModule]
665
+ });
666
+ };
667
+ i0.ɵɵngDeclareClassMetadata({
668
+ minVersion: "12.0.0",
669
+ version: "22.2.3",
670
+ ngImport: i0,
671
+ type: NgxDocViewerModule,
672
+ decorators: [{
673
+ type: NgModule,
674
+ args: [{
675
+ imports: [CommonModule, NgxDocViewerComponent],
676
+ exports: [NgxDocViewerComponent]
677
+ }]
678
+ }]
679
+ });
425
680
  export { NgxDocViewerComponent, NgxDocViewerModule };
426
- //# sourceMappingURL=ngx-doc-viewer.mjs.map
681
+
682
+ //# sourceMappingURL=ngx-doc-viewer.mjs.map