igot-cb-tour-guide 0.0.1-ang-13-17

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.
@@ -0,0 +1,670 @@
1
+ import { debounceTime } from 'rxjs/operators';
2
+ import * as i0 from '@angular/core';
3
+ import { PLATFORM_ID, Inject, Injectable, DOCUMENT, ViewChild, Input, ViewEncapsulation, Component, ErrorHandler, NgModule } from '@angular/core';
4
+ import { Subject, fromEvent } from 'rxjs';
5
+ import { cloneDeep } from 'lodash';
6
+ import * as i3 from '@angular/common';
7
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
8
+ import * as i4 from '@angular/material/icon';
9
+ import { MatIconModule } from '@angular/material/icon';
10
+
11
+ class Orientation {
12
+ static Bottom = 'bottom';
13
+ static BottomLeft = 'bottom-left';
14
+ static BottomRight = 'bottom-right';
15
+ static Center = 'center';
16
+ static Left = 'left';
17
+ static Right = 'right';
18
+ static Top = 'top';
19
+ static TopLeft = 'top-left';
20
+ static TopRight = 'top-right';
21
+ }
22
+ var ProgressIndicatorLocation;
23
+ (function (ProgressIndicatorLocation) {
24
+ ProgressIndicatorLocation["InsideNextButton"] = "inside-next-button";
25
+ ProgressIndicatorLocation["TopOfTourBlock"] = "top-of-tour-block";
26
+ ProgressIndicatorLocation["None"] = "none";
27
+ ProgressIndicatorLocation["Dots"] = "dots";
28
+ })(ProgressIndicatorLocation || (ProgressIndicatorLocation = {}));
29
+
30
+ function getWindow() {
31
+ return window;
32
+ }
33
+ function getMockWindow() {
34
+ return {
35
+ innerWidth: 0,
36
+ innerHeight: 0,
37
+ scrollY: 0,
38
+ scrollX: 0,
39
+ pageYOffset: 0,
40
+ pageXOffset: 0,
41
+ scroll: () => { },
42
+ scrollTo: () => { },
43
+ addEventListener: () => { },
44
+ removeEventListener: () => { },
45
+ };
46
+ }
47
+ class WindowRefService {
48
+ isBrowser = false;
49
+ get nativeWindow() {
50
+ if (this.isBrowser) {
51
+ return getWindow();
52
+ }
53
+ else {
54
+ return getMockWindow();
55
+ }
56
+ }
57
+ constructor(platformId) {
58
+ this.isBrowser = isPlatformBrowser(platformId);
59
+ }
60
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WindowRefService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
61
+ /** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WindowRefService });
62
+ }
63
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: WindowRefService, decorators: [{
64
+ type: Injectable
65
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
66
+ type: Inject,
67
+ args: [PLATFORM_ID]
68
+ }] }] });
69
+
70
+ class GuidedTourService {
71
+ errorHandler;
72
+ windowRef;
73
+ dom;
74
+ guidedTourCurrentStepStream;
75
+ guidedTourOrbShowingStream;
76
+ _guidedTourCurrentStepSubject = new Subject();
77
+ _guidedTourOrbShowingSubject = new Subject();
78
+ _currentTourStepIndex = 0;
79
+ _currentTour = null;
80
+ _onFirstStep = true;
81
+ _onLastStep = true;
82
+ _onResizeMessage = false;
83
+ constructor(errorHandler, windowRef, dom) {
84
+ this.errorHandler = errorHandler;
85
+ this.windowRef = windowRef;
86
+ this.dom = dom;
87
+ this.guidedTourCurrentStepStream = this._guidedTourCurrentStepSubject.asObservable();
88
+ this.guidedTourOrbShowingStream = this._guidedTourOrbShowingSubject.asObservable();
89
+ fromEvent(this.windowRef.nativeWindow, 'resize').pipe(debounceTime(200)).subscribe(() => {
90
+ if (this._currentTour && this._currentTourStepIndex > -1) {
91
+ if (this._currentTour.minimumScreenSize && this._currentTour.minimumScreenSize >= this.windowRef.nativeWindow.innerWidth) {
92
+ this._onResizeMessage = true;
93
+ const dialog = this._currentTour.resizeDialog || {
94
+ title: 'Please resize',
95
+ content: 'You have resized the tour to a size that is too small to continue. Please resize the browser to a larger size to continue the tour or close the tour.'
96
+ };
97
+ this._guidedTourCurrentStepSubject.next(dialog);
98
+ }
99
+ else {
100
+ this._onResizeMessage = false;
101
+ this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));
102
+ }
103
+ }
104
+ });
105
+ }
106
+ nextStep() {
107
+ if (this._currentTour.steps[this._currentTourStepIndex].closeAction) {
108
+ this._currentTour.steps[this._currentTourStepIndex].closeAction();
109
+ }
110
+ if (this._currentTour.steps[this._currentTourStepIndex + 1]) {
111
+ this._currentTourStepIndex++;
112
+ this._setFirstAndLast();
113
+ if (this._currentTour.steps[this._currentTourStepIndex].action) {
114
+ this._currentTour.steps[this._currentTourStepIndex].action();
115
+ // Usually an action is opening something so we need to give it time to render.
116
+ setTimeout(() => {
117
+ if (this._checkSelectorValidity()) {
118
+ this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));
119
+ }
120
+ else {
121
+ this.nextStep();
122
+ }
123
+ });
124
+ }
125
+ else {
126
+ if (this._checkSelectorValidity()) {
127
+ this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));
128
+ }
129
+ else {
130
+ this.nextStep();
131
+ }
132
+ }
133
+ if (this._currentTour.nextCallback) {
134
+ this._currentTour.nextCallback(this._currentTourStepIndex, this._currentTour.steps[this._currentTourStepIndex]);
135
+ }
136
+ }
137
+ else {
138
+ if (this._currentTour.completeCallback) {
139
+ this._currentTour.completeCallback();
140
+ }
141
+ this.resetTour();
142
+ }
143
+ }
144
+ backStep() {
145
+ if (this._currentTour.steps[this._currentTourStepIndex].closeAction) {
146
+ this._currentTour.steps[this._currentTourStepIndex].closeAction();
147
+ }
148
+ if (this._currentTour.steps[this._currentTourStepIndex - 1]) {
149
+ this._currentTourStepIndex--;
150
+ this._setFirstAndLast();
151
+ if (this._currentTour.steps[this._currentTourStepIndex].action) {
152
+ this._currentTour.steps[this._currentTourStepIndex].action();
153
+ setTimeout(() => {
154
+ if (this._checkSelectorValidity()) {
155
+ this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));
156
+ }
157
+ else {
158
+ this.backStep();
159
+ }
160
+ });
161
+ }
162
+ else {
163
+ if (this._checkSelectorValidity()) {
164
+ this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));
165
+ }
166
+ else {
167
+ this.backStep();
168
+ }
169
+ }
170
+ if (this._currentTour.nextCallback) {
171
+ this._currentTour.prevCallback(this._currentTourStepIndex, this._currentTour.steps[this._currentTourStepIndex]);
172
+ }
173
+ }
174
+ else {
175
+ this.resetTour();
176
+ }
177
+ }
178
+ skipTour() {
179
+ if (this._currentTour.skipCallback) {
180
+ this._currentTour.skipCallback(this._currentTourStepIndex);
181
+ }
182
+ this.resetTour();
183
+ }
184
+ resetTour() {
185
+ this.dom.body.classList.remove('tour-open');
186
+ this._currentTour = null;
187
+ this._currentTourStepIndex = 0;
188
+ this._guidedTourCurrentStepSubject.next(null);
189
+ }
190
+ startTour(tour) {
191
+ this._currentTour = cloneDeep(tour);
192
+ this._currentTour.steps = this._currentTour.steps.filter(step => !step.skipStep);
193
+ this._currentTourStepIndex = 0;
194
+ this._setFirstAndLast();
195
+ this._guidedTourOrbShowingSubject.next(this._currentTour.useOrb);
196
+ if (this._currentTour.steps.length > 0
197
+ && (!this._currentTour.minimumScreenSize
198
+ || (this.windowRef.nativeWindow.innerWidth >= this._currentTour.minimumScreenSize))) {
199
+ if (!this._currentTour.useOrb) {
200
+ this.dom.body.classList.add('tour-open');
201
+ }
202
+ if (this._currentTour.steps[this._currentTourStepIndex].action) {
203
+ this._currentTour.steps[this._currentTourStepIndex].action();
204
+ }
205
+ if (this._checkSelectorValidity()) {
206
+ this._guidedTourCurrentStepSubject.next(this.getPreparedTourStep(this._currentTourStepIndex));
207
+ }
208
+ else {
209
+ this.nextStep();
210
+ }
211
+ }
212
+ }
213
+ activateOrb() {
214
+ this._guidedTourOrbShowingSubject.next(false);
215
+ this.dom.body.classList.add('tour-open');
216
+ }
217
+ _setFirstAndLast() {
218
+ this._onLastStep = (this._currentTour.steps.length - 1) === this._currentTourStepIndex;
219
+ this._onFirstStep = this._currentTourStepIndex === 0;
220
+ }
221
+ _checkSelectorValidity() {
222
+ if (this._currentTour.steps[this._currentTourStepIndex].selector) {
223
+ const selectedElement = this.dom.querySelector(this._currentTour.steps[this._currentTourStepIndex].selector);
224
+ if (!selectedElement) {
225
+ this.errorHandler.handleError(
226
+ // If error handler is configured this should not block the browser.
227
+ new Error(`Error finding selector ${this._currentTour.steps[this._currentTourStepIndex].selector} on step ${this._currentTourStepIndex + 1} during guided tour: ${this._currentTour.tourId}`));
228
+ return false;
229
+ }
230
+ }
231
+ return true;
232
+ }
233
+ get onLastStep() {
234
+ return this._onLastStep;
235
+ }
236
+ get onFirstStep() {
237
+ return this._onFirstStep;
238
+ }
239
+ get onResizeMessage() {
240
+ return this._onResizeMessage;
241
+ }
242
+ get currentTourStepDisplay() {
243
+ return this._currentTourStepIndex + 1;
244
+ }
245
+ get currentTourStepCount() {
246
+ return this._currentTour && this._currentTour.steps ? this._currentTour.steps.length : 0;
247
+ }
248
+ get preventBackdropFromAdvancing() {
249
+ return this._currentTour && this._currentTour.preventBackdropFromAdvancing;
250
+ }
251
+ getPreparedTourStep(index) {
252
+ return this.setTourOrientation(this._currentTour.steps[index]);
253
+ }
254
+ setTourOrientation(step) {
255
+ const convertedStep = cloneDeep(step);
256
+ if (convertedStep.orientation
257
+ && !(typeof convertedStep.orientation === 'string')
258
+ && convertedStep.orientation.length) {
259
+ convertedStep.orientation.sort((a, b) => {
260
+ if (!b.maximumSize) {
261
+ return 1;
262
+ }
263
+ if (!a.maximumSize) {
264
+ return -1;
265
+ }
266
+ return b.maximumSize - a.maximumSize;
267
+ });
268
+ let currentOrientation = Orientation.Top;
269
+ convertedStep.orientation.forEach((orientationConfig) => {
270
+ if (!orientationConfig.maximumSize || this.windowRef.nativeWindow.innerWidth <= orientationConfig.maximumSize) {
271
+ currentOrientation = orientationConfig.orientationDirection;
272
+ }
273
+ });
274
+ convertedStep.orientation = currentOrientation;
275
+ }
276
+ return convertedStep;
277
+ }
278
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourService, deps: [{ token: i0.ErrorHandler }, { token: WindowRefService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
279
+ /** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourService });
280
+ }
281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourService, decorators: [{
282
+ type: Injectable
283
+ }], ctorParameters: () => [{ type: i0.ErrorHandler }, { type: WindowRefService }, { type: undefined, decorators: [{
284
+ type: Inject,
285
+ args: [DOCUMENT]
286
+ }] }] });
287
+
288
+ class GuidedTourComponent {
289
+ guidedTourService;
290
+ windowRef;
291
+ dom;
292
+ topOfPageAdjustment = 0;
293
+ tourStepWidth = 300;
294
+ minimalTourStepWidth = 200;
295
+ skipText = 'Skip';
296
+ nextText = 'Next';
297
+ doneText = 'Done';
298
+ closeText = 'Close';
299
+ backText = 'Back';
300
+ progressIndicatorLocation = ProgressIndicatorLocation.InsideNextButton;
301
+ progressIndicator = undefined;
302
+ tourStep;
303
+ highlightPadding = 4;
304
+ currentTourStep = null;
305
+ selectedElementRect = null;
306
+ isOrbShowing = false;
307
+ progressIndicatorLocations = ProgressIndicatorLocation;
308
+ resizeSubscription;
309
+ scrollSubscription;
310
+ constructor(guidedTourService, windowRef, dom) {
311
+ this.guidedTourService = guidedTourService;
312
+ this.windowRef = windowRef;
313
+ this.dom = dom;
314
+ }
315
+ get maxWidthAdjustmentForTourStep() {
316
+ return this.tourStepWidth - this.minimalTourStepWidth;
317
+ }
318
+ get widthAdjustmentForScreenBound() {
319
+ if (!this.tourStep) {
320
+ return 0;
321
+ }
322
+ let adjustment = 0;
323
+ if (this.calculatedLeftPosition < 0) {
324
+ adjustment = -this.calculatedLeftPosition;
325
+ }
326
+ if (this.calculatedLeftPosition > this.windowRef.nativeWindow.innerWidth - this.tourStepWidth) {
327
+ adjustment = this.calculatedLeftPosition - (this.windowRef.nativeWindow.innerWidth - this.tourStepWidth);
328
+ }
329
+ return Math.min(this.maxWidthAdjustmentForTourStep, adjustment);
330
+ }
331
+ get calculatedTourStepWidth() {
332
+ return this.tourStepWidth - this.widthAdjustmentForScreenBound;
333
+ }
334
+ ngAfterViewInit() {
335
+ this.guidedTourService.guidedTourCurrentStepStream.subscribe((step) => {
336
+ this.currentTourStep = step;
337
+ if (step && step.selector) {
338
+ const selectedElement = this.dom.querySelector(step.selector);
339
+ if (selectedElement) {
340
+ this.scrollToAndSetElement();
341
+ }
342
+ else {
343
+ this.selectedElementRect = null;
344
+ }
345
+ }
346
+ else {
347
+ this.selectedElementRect = null;
348
+ }
349
+ });
350
+ this.guidedTourService.guidedTourOrbShowingStream.subscribe((value) => {
351
+ this.isOrbShowing = value;
352
+ });
353
+ this.resizeSubscription = fromEvent(this.windowRef.nativeWindow, 'resize').subscribe(() => {
354
+ this.updateStepLocation();
355
+ });
356
+ this.scrollSubscription = fromEvent(this.windowRef.nativeWindow, 'scroll').subscribe(() => {
357
+ this.updateStepLocation();
358
+ });
359
+ }
360
+ ngOnDestroy() {
361
+ this.resizeSubscription.unsubscribe();
362
+ this.scrollSubscription.unsubscribe();
363
+ }
364
+ scrollToAndSetElement() {
365
+ this.updateStepLocation();
366
+ // Allow things to render to scroll to the correct location
367
+ setTimeout(() => {
368
+ if (!this.isOrbShowing && !this.isTourOnScreen()) {
369
+ if (this.selectedElementRect && this.isBottom()) {
370
+ // Scroll so the element is on the top of the screen.
371
+ const topPos = ((this.windowRef.nativeWindow.scrollY + this.selectedElementRect.top) - this.topOfPageAdjustment)
372
+ - (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)
373
+ + this.getStepScreenAdjustment();
374
+ try {
375
+ this.windowRef.nativeWindow.scrollTo({
376
+ left: null,
377
+ top: topPos,
378
+ behavior: 'smooth'
379
+ });
380
+ }
381
+ catch (err) {
382
+ if (err instanceof TypeError) {
383
+ this.windowRef.nativeWindow.scroll(0, topPos);
384
+ }
385
+ else {
386
+ throw err;
387
+ }
388
+ }
389
+ }
390
+ else {
391
+ // Scroll so the element is on the bottom of the screen.
392
+ const topPos = (this.windowRef.nativeWindow.scrollY + this.selectedElementRect.top + this.selectedElementRect.height)
393
+ - this.windowRef.nativeWindow.innerHeight
394
+ + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)
395
+ - this.getStepScreenAdjustment();
396
+ try {
397
+ this.windowRef.nativeWindow.scrollTo({
398
+ left: null,
399
+ top: topPos,
400
+ behavior: 'smooth'
401
+ });
402
+ }
403
+ catch (err) {
404
+ if (err instanceof TypeError) {
405
+ this.windowRef.nativeWindow.scroll(0, topPos);
406
+ }
407
+ else {
408
+ throw err;
409
+ }
410
+ }
411
+ }
412
+ }
413
+ });
414
+ }
415
+ handleOrb() {
416
+ this.guidedTourService.activateOrb();
417
+ if (this.currentTourStep && this.currentTourStep.selector) {
418
+ this.scrollToAndSetElement();
419
+ }
420
+ }
421
+ isTourOnScreen() {
422
+ return this.tourStep
423
+ && this.elementInViewport(this.dom.querySelector(this.currentTourStep.selector))
424
+ && this.elementInViewport(this.tourStep.nativeElement);
425
+ }
426
+ // Modified from https://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
427
+ elementInViewport(element) {
428
+ let top = element.offsetTop;
429
+ const height = element.offsetHeight;
430
+ while (element.offsetParent) {
431
+ element = element.offsetParent;
432
+ top += element.offsetTop;
433
+ }
434
+ if (this.isBottom()) {
435
+ return (top >= (this.windowRef.nativeWindow.pageYOffset
436
+ + this.topOfPageAdjustment
437
+ + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)
438
+ + this.getStepScreenAdjustment())
439
+ && (top + height) <= (this.windowRef.nativeWindow.pageYOffset + this.windowRef.nativeWindow.innerHeight));
440
+ }
441
+ else {
442
+ return (top >= (this.windowRef.nativeWindow.pageYOffset + this.topOfPageAdjustment - this.getStepScreenAdjustment())
443
+ && (top + height + (this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0)) <= (this.windowRef.nativeWindow.pageYOffset + this.windowRef.nativeWindow.innerHeight));
444
+ }
445
+ }
446
+ backdropClick(event) {
447
+ if (this.guidedTourService.preventBackdropFromAdvancing) {
448
+ event.stopPropagation();
449
+ }
450
+ else {
451
+ this.guidedTourService.nextStep();
452
+ }
453
+ }
454
+ updateStepLocation() {
455
+ if (this.currentTourStep && this.currentTourStep.selector) {
456
+ const selectedElement = this.dom.querySelector(this.currentTourStep.selector);
457
+ if (selectedElement && typeof selectedElement.getBoundingClientRect === 'function') {
458
+ this.selectedElementRect = selectedElement.getBoundingClientRect();
459
+ }
460
+ else {
461
+ this.selectedElementRect = null;
462
+ }
463
+ }
464
+ else {
465
+ this.selectedElementRect = null;
466
+ }
467
+ }
468
+ isBottom() {
469
+ return this.currentTourStep.orientation
470
+ && (this.currentTourStep.orientation === Orientation.Bottom
471
+ || this.currentTourStep.orientation === Orientation.BottomLeft
472
+ || this.currentTourStep.orientation === Orientation.BottomRight);
473
+ }
474
+ get topPosition() {
475
+ const paddingAdjustment = this.getHighlightPadding();
476
+ if (this.isBottom()) {
477
+ return this.selectedElementRect.top + this.selectedElementRect.height + paddingAdjustment;
478
+ }
479
+ return this.selectedElementRect.top - this.getHighlightPadding();
480
+ }
481
+ get orbTopPosition() {
482
+ if (this.isBottom()) {
483
+ return this.selectedElementRect.top + this.selectedElementRect.height;
484
+ }
485
+ if (this.currentTourStep.orientation === Orientation.Right
486
+ || this.currentTourStep.orientation === Orientation.Left) {
487
+ return (this.selectedElementRect.top + (this.selectedElementRect.height / 2));
488
+ }
489
+ return this.selectedElementRect.top;
490
+ }
491
+ get calculatedLeftPosition() {
492
+ const paddingAdjustment = this.getHighlightPadding();
493
+ if (this.currentTourStep.orientation === Orientation.TopRight
494
+ || this.currentTourStep.orientation === Orientation.BottomRight) {
495
+ return (this.selectedElementRect.right - this.tourStepWidth);
496
+ }
497
+ if (this.currentTourStep.orientation === Orientation.TopLeft
498
+ || this.currentTourStep.orientation === Orientation.BottomLeft) {
499
+ return (this.selectedElementRect.left);
500
+ }
501
+ if (this.currentTourStep.orientation === Orientation.Left) {
502
+ return this.selectedElementRect.left - this.tourStepWidth - paddingAdjustment;
503
+ }
504
+ if (this.currentTourStep.orientation === Orientation.Right) {
505
+ return (this.selectedElementRect.left + this.selectedElementRect.width + paddingAdjustment);
506
+ }
507
+ return (this.selectedElementRect.right - (this.selectedElementRect.width / 2) - (this.tourStepWidth / 2));
508
+ }
509
+ get leftPosition() {
510
+ if (this.calculatedLeftPosition >= 0) {
511
+ return this.calculatedLeftPosition;
512
+ }
513
+ const adjustment = Math.max(0, -this.calculatedLeftPosition);
514
+ const maxAdjustment = Math.min(this.maxWidthAdjustmentForTourStep, adjustment);
515
+ return this.calculatedLeftPosition + maxAdjustment;
516
+ }
517
+ get orbLeftPosition() {
518
+ if (this.currentTourStep.orientation === Orientation.TopRight
519
+ || this.currentTourStep.orientation === Orientation.BottomRight) {
520
+ return this.selectedElementRect.right;
521
+ }
522
+ if (this.currentTourStep.orientation === Orientation.TopLeft
523
+ || this.currentTourStep.orientation === Orientation.BottomLeft) {
524
+ return this.selectedElementRect.left;
525
+ }
526
+ if (this.currentTourStep.orientation === Orientation.Left) {
527
+ return this.selectedElementRect.left;
528
+ }
529
+ if (this.currentTourStep.orientation === Orientation.Right) {
530
+ return (this.selectedElementRect.left + this.selectedElementRect.width);
531
+ }
532
+ return (this.selectedElementRect.right - (this.selectedElementRect.width / 2));
533
+ }
534
+ get transform() {
535
+ if (!this.currentTourStep.orientation
536
+ || this.currentTourStep.orientation === Orientation.Top
537
+ || this.currentTourStep.orientation === Orientation.TopRight
538
+ || this.currentTourStep.orientation === Orientation.TopLeft) {
539
+ return 'translateY(-100%)';
540
+ }
541
+ return null;
542
+ }
543
+ get orbTransform() {
544
+ if (!this.currentTourStep.orientation
545
+ || this.currentTourStep.orientation === Orientation.Top
546
+ || this.currentTourStep.orientation === Orientation.Bottom
547
+ || this.currentTourStep.orientation === Orientation.TopLeft
548
+ || this.currentTourStep.orientation === Orientation.BottomLeft) {
549
+ return 'translateY(-50%)';
550
+ }
551
+ if (this.currentTourStep.orientation === Orientation.TopRight
552
+ || this.currentTourStep.orientation === Orientation.BottomRight) {
553
+ return 'translate(-100%, -50%)';
554
+ }
555
+ if (this.currentTourStep.orientation === Orientation.Right
556
+ || this.currentTourStep.orientation === Orientation.Left) {
557
+ return 'translate(-50%, -50%)';
558
+ }
559
+ return null;
560
+ }
561
+ get overlayTop() {
562
+ if (this.selectedElementRect) {
563
+ return this.selectedElementRect.top - this.getHighlightPadding();
564
+ }
565
+ return 0;
566
+ }
567
+ get overlayLeft() {
568
+ if (this.selectedElementRect) {
569
+ return this.selectedElementRect.left - this.getHighlightPadding();
570
+ }
571
+ return 0;
572
+ }
573
+ get overlayHeight() {
574
+ if (this.selectedElementRect) {
575
+ return this.selectedElementRect.height + (this.getHighlightPadding() * 2);
576
+ }
577
+ return 0;
578
+ }
579
+ get overlayWidth() {
580
+ if (this.selectedElementRect) {
581
+ return this.selectedElementRect.width + (this.getHighlightPadding() * 2);
582
+ }
583
+ return 0;
584
+ }
585
+ getHighlightPadding() {
586
+ let paddingAdjustment = this.currentTourStep.useHighlightPadding ? this.highlightPadding : 0;
587
+ if (this.currentTourStep.highlightPadding) {
588
+ paddingAdjustment = this.currentTourStep.highlightPadding;
589
+ }
590
+ return paddingAdjustment;
591
+ }
592
+ // This calculates a value to add or subtract so the step should not be off screen.
593
+ getStepScreenAdjustment() {
594
+ if (this.currentTourStep.orientation === Orientation.Left
595
+ || this.currentTourStep.orientation === Orientation.Right) {
596
+ return 0;
597
+ }
598
+ const scrollAdjustment = this.currentTourStep.scrollAdjustment ? this.currentTourStep.scrollAdjustment : 0;
599
+ const tourStepHeight = typeof this.tourStep.nativeElement.getBoundingClientRect === 'function' ? this.tourStep.nativeElement.getBoundingClientRect().height : 0;
600
+ const elementHeight = this.selectedElementRect.height + scrollAdjustment + tourStepHeight;
601
+ if ((this.windowRef.nativeWindow.innerHeight - this.topOfPageAdjustment) < elementHeight) {
602
+ return elementHeight - (this.windowRef.nativeWindow.innerHeight - this.topOfPageAdjustment);
603
+ }
604
+ return 0;
605
+ }
606
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourComponent, deps: [{ token: GuidedTourService }, { token: WindowRefService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
607
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: GuidedTourComponent, isStandalone: false, selector: "ngx-guided-tour", inputs: { topOfPageAdjustment: "topOfPageAdjustment", tourStepWidth: "tourStepWidth", minimalTourStepWidth: "minimalTourStepWidth", skipText: "skipText", nextText: "nextText", doneText: "doneText", closeText: "closeText", backText: "backText", progressIndicatorLocation: "progressIndicatorLocation", progressIndicator: "progressIndicator" }, viewQueries: [{ propertyName: "tourStep", first: true, predicate: ["tourStep"], descendants: true }], ngImport: i0, template: "<div *ngIf=\"currentTourStep && selectedElementRect && isOrbShowing\" (mouseenter)=\"handleOrb()\"\n class=\"tour-orb tour-{{ currentTourStep.orientation }}\" [style.top.px]=\"orbTopPosition\"\n [style.left.px]=\"orbLeftPosition\" [style.transform]=\"orbTransform\">\n <div class=\"tour-orb-ring\"></div>\n</div>\n<div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div class=\"guided-tour-user-input-mask\" (click)=\"backdropClick($event)\"></div>\n <div class=\"\" [attr.class]=\"'guided-tour-spotlight-overlay ' + currentTourStep?.class\" [style.top.px]=\"overlayTop\"\n [style.left.px]=\"overlayLeft\" [style.height.px]=\"overlayHeight\" [style.width.px]=\"overlayWidth\">\n </div>\n</div>\n<div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div #tourStep *ngIf=\"currentTourStep\"\n class=\"tour-step tour-{{ currentTourStep.orientation}} {{currentTourStep?.containerClass}}\" [ngClass]=\"{\n 'page-tour-step': !currentTourStep.selector,\n 'right-panel': currentTourStep.connectorDirection == 'right',\n 'left-panel': currentTourStep.connectorDirection == 'left',\n 'bottom-panel': currentTourStep.connectorDirection == 'bottom',\n 'top-panel': currentTourStep.connectorDirection == 'top'\n }\" [style.top.px]=\"(currentTourStep.selector && selectedElementRect ? topPosition : null)\"\n [style.left.px]=\"(currentTourStep.selector && selectedElementRect ? leftPosition : null)\"\n [style.width.px]=\"(currentTourStep.selector && selectedElementRect ? calculatedTourStepWidth : null)\"\n [style.transform]=\"(currentTourStep.selector && selectedElementRect ? transform : null)\">\n\n <div *ngIf=\"currentTourStep.isMobile && currentTourStep.connectorDirection == 'bottom'\" class=\"tour-buttons tour-button-container\">\n <div class=\"tour-actions-button-container\">\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n [attr.class]=\"currentTourStep?.backBtnClass + ' back-button'\" (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\" class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\" [attr.class]=\"currentTourStep?.nextBtnClass + ' next-button'\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n <button *ngIf=\"guidedTourService.onResizeMessage\" class=\"next-button\" (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n\n </div>\n\n <div *ngIf=\"currentTourStep.selector\" class=\"tour-arrow\"></div>\n <div class=\"tour-block\">\n <div class=\"arrow\" [ngClass]=\"{\n 'right-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'right'),\n 'left-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'left'),\n 'bottom-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'bottom'),\n 'top-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'top')\n }\">\n <div class=\"circle\"></div>\n <div class=\"circle-start-dot\"></div>\n <div class=\"triangle\"></div>\n </div>\n\n <div *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.TopOfTourBlock\n && !guidedTourService.onResizeMessage\" class=\"tour-progress-indicator\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </div>\n <div class=\"tour-image\" *ngIf=\"currentTourStep.icon && currentTourStep.selector\">\n <mat-icon>{{currentTourStep.icon}}</mat-icon>\n </div>\n <h3 class=\"tour-title\" *ngIf=\"currentTourStep.title && currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h3>\n <h2 class=\"tour-title\" *ngIf=\"currentTourStep.title && !currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h2>\n <div class=\"tour-content\" [innerHTML]=\"currentTourStep.content\"></div>\n <div *ngIf=\"!currentTourStep.isMobile\" class=\"tour-buttons tour-button-container\">\n <!-- <div class=\"tour-skip-container\">\n <button *ngIf=\"!guidedTourService.onResizeMessage\"\n (click)=\"guidedTourService.skipTour()\"\n [attr.class]=\"currentTourStep?.skipBtnClass + ' skip-button link-button'\">\n {{ skipText }}\n </button>\n </div> -->\n <div class=\"tour-actions-button-container\">\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n [attr.class]=\"currentTourStep?.backBtnClass + ' back-button'\" (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\" class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\" [attr.class]=\"currentTourStep?.nextBtnClass + ' next-button'\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n <button *ngIf=\"guidedTourService.onResizeMessage\" class=\"next-button\" (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n\n </div>\n\n\n <div class=\"progress-container\">\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.Dots\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </div>\n\n </div>\n <div *ngIf=\"currentTourStep.isMobile && currentTourStep.connectorDirection != 'bottom'\" class=\"tour-buttons tour-button-container\">\n <div class=\"tour-actions-button-container\">\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n [attr.class]=\"currentTourStep?.backBtnClass + ' back-button'\" (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\" class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\" [attr.class]=\"currentTourStep?.nextBtnClass + ' next-button'\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n <button *ngIf=\"guidedTourService.onResizeMessage\" class=\"next-button\" (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n\n </div>\n </div>\n <ng-template #progress>\n <ng-container *ngTemplateOutlet=\"\n progressIndicator || defaultProgressIndicator; \n context: { currentStepNumber: guidedTourService.currentTourStepDisplay, totalSteps: guidedTourService.currentTourStepCount }\n \"></ng-container>\n </ng-template>\n <ng-template #defaultProgressIndicator let-currentStepNumber=\"currentStepNumber\" let-totalSteps=\"totalSteps\">\n <!-- <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">&nbsp;</ng-container>{{ currentStepNumber }}/{{ totalSteps }} -->\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.Dots\">\n <div class=\"pagination\">\n <li class=\"nav-dots\">\n <ng-container *ngFor=\"let dot of [].constructor(totalSteps); first as isFirst; index as i\">\n <label [ngClass]=\"(currentStepNumber == (i+1)) ? 'nav-dot-active': ''\" class=\"nav-dot\"\n id=\"img-dot-+{{i}}+{{currentStepNumber}}\"></label>\n </ng-container>\n </li>\n </div>\n </ng-container>\n </ng-template>", styles: ["ngx-guided-tour .guided-tour-user-input-mask{position:fixed;top:0;left:0;display:block;height:100%;width:100%;max-height:100vh;text-align:center;opacity:0}ngx-guided-tour .guided-tour-spotlight-overlay{position:fixed;box-shadow:0 0 0 9999px #000000b3,0 0 1.5rem #00000080}ngx-guided-tour .tour-orb{position:fixed;width:20px;height:20px;border-radius:50%}ngx-guided-tour .tour-orb .tour-orb-ring{width:35px;height:35px;position:relative;top:50%;left:50%;transform:translate(-50%,-50%);animation:pulse 2s linear infinite}ngx-guided-tour .tour-orb .tour-orb-ring:after{content:\"\";display:inline-block;height:100%;width:100%;border-radius:50%}@keyframes pulse{0%{transform:translate(-50%,-50%) scale(.45);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:0}}ngx-guided-tour .tour-step{position:fixed}ngx-guided-tour .tour-step.page-tour-step{max-width:400px;width:50%;left:50%;top:50%;transform:translate(-50%,-50%)}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before{position:absolute}ngx-guided-tour .tour-step.tour-bottom .tour-block,ngx-guided-tour .tour-step.tour-bottom-right .tour-block,ngx-guided-tour .tour-step.tour-bottom-left .tour-block{margin-top:10px}ngx-guided-tour .tour-step.tour-top,ngx-guided-tour .tour-step.tour-top-right,ngx-guided-tour .tour-step.tour-top-left{margin-bottom:10px}ngx-guided-tour .tour-step.tour-top .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{position:absolute;bottom:0}ngx-guided-tour .tour-step.tour-top .tour-block,ngx-guided-tour .tour-step.tour-top-right .tour-block,ngx-guided-tour .tour-step.tour-top-left .tour-block{margin-bottom:10px}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-top .tour-arrow:before{transform:translate(-50%);left:50%}ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before{transform:translate(-100%);left:calc(100% - 5px)}ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{left:5px}ngx-guided-tour .tour-step.tour-left .tour-arrow:before{position:absolute;left:100%;transform:translate(-100%);top:5px}ngx-guided-tour .tour-step.tour-left .tour-block{margin-right:10px}ngx-guided-tour .tour-step.tour-right .tour-arrow:before{position:absolute;left:0;top:5px}ngx-guided-tour .tour-step.tour-right .tour-block{margin-left:10px}ngx-guided-tour .tour-step .tour-block{padding:15px 25px}ngx-guided-tour .tour-step .tour-progress-indicator{padding-bottom:15px}ngx-guided-tour .tour-step .tour-title{font-weight:700!important;padding-bottom:20px}ngx-guided-tour .tour-step h3.tour-title{font-size:20px}ngx-guided-tour .tour-step h2.tour-title{font-size:30px}ngx-guided-tour .tour-step .tour-content{min-height:80px;padding-bottom:30px;font-size:15px}ngx-guided-tour .tour-step .tour-buttons{overflow:hidden}ngx-guided-tour .tour-step .tour-buttons button.link-button{font-size:15px;font-weight:700;max-width:none!important;cursor:pointer;text-align:center;white-space:nowrap;vertical-align:middle;border:1px solid transparent;line-height:1.5;background-color:transparent;position:relative;outline:none;padding:0 15px;-webkit-appearance:button}ngx-guided-tour .tour-step .tour-buttons button.skip-button.link-button{padding-left:0;border-left:0}ngx-guided-tour .tour-step .tour-buttons .back-button{cursor:pointer;border-radius:1px;font-size:14px;border:none;outline:none;padding-left:10px;padding-right:10px}ngx-guided-tour .tour-step .tour-buttons .next-button{cursor:pointer;border-radius:1px;font-size:14px;border:none;outline:none;padding-left:10px;padding-right:10px}.arrow{position:absolute;left:-50px;top:-13px}.right-connector{transform:scaleX(-1);left:0;right:-46px}.circle{position:absolute;box-sizing:border-box;height:118px;width:100px;border:7px solid #000;border-radius:50%;-webkit-clip-path:inset(0 50% 0 0);clip-path:inset(0 50% 0 0);border-style:dotted}.triangle{position:absolute;width:20px;height:15px;background:#000;margin-top:-6px;margin-left:38px;-webkit-clip-path:polygon(50% 0,0% 100%,100% 100%);clip-path:polygon(50% 0,0% 100%,100% 100%);-moz-transform:rotate(90deg);-webkit-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.circle-start-dot{display:inline;width:16px;height:16px;background-color:#f3962e;content:\"\";border-radius:50%;position:absolute;margin-top:108px;margin-left:40px}.tour-step.left-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;position:absolute;content:\"\";overflow:hidden;top:10px}.tour-step.right-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;right:0;position:absolute;content:\"\";overflow:hidden;top:10px}.tour-step.top-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;right:0;position:absolute;content:\"\";overflow:hidden;top:10px}.tour-step.bottom-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;right:0;position:absolute;content:\"\";overflow:hidden;top:10px}.progress-container{display:flex;justify-content:center;align-items:center}.pagination{display:flex;justify-content:center;align-items:center;padding:.5rem}.nav-dots{display:inline-block;position:relative;width:auto;height:10px;border-radius:50%;cursor:default;margin:2px}.nav-dots .nav-dot{top:-5px;width:11px;height:11px;margin:0 4px;position:relative;border-radius:100%;display:inline-block;background-color:#d3d3d3}.nav-dot-active{background:#113463}.top-connector{top:-116px!important;right:173px!important}.top-connector .circle{top:50px;left:80px;transform:rotate(180deg);width:50px;height:70px}.top-connector .circle-start-dot{margin-left:100px}.top-connector .triangle{left:63px;top:49px;transform:rotate(44deg)!important}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], encapsulation: i0.ViewEncapsulation.None });
608
+ }
609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourComponent, decorators: [{
610
+ type: Component,
611
+ args: [{ selector: 'ngx-guided-tour', encapsulation: ViewEncapsulation.None, standalone: false, template: "<div *ngIf=\"currentTourStep && selectedElementRect && isOrbShowing\" (mouseenter)=\"handleOrb()\"\n class=\"tour-orb tour-{{ currentTourStep.orientation }}\" [style.top.px]=\"orbTopPosition\"\n [style.left.px]=\"orbLeftPosition\" [style.transform]=\"orbTransform\">\n <div class=\"tour-orb-ring\"></div>\n</div>\n<div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div class=\"guided-tour-user-input-mask\" (click)=\"backdropClick($event)\"></div>\n <div class=\"\" [attr.class]=\"'guided-tour-spotlight-overlay ' + currentTourStep?.class\" [style.top.px]=\"overlayTop\"\n [style.left.px]=\"overlayLeft\" [style.height.px]=\"overlayHeight\" [style.width.px]=\"overlayWidth\">\n </div>\n</div>\n<div *ngIf=\"currentTourStep && !isOrbShowing\">\n <div #tourStep *ngIf=\"currentTourStep\"\n class=\"tour-step tour-{{ currentTourStep.orientation}} {{currentTourStep?.containerClass}}\" [ngClass]=\"{\n 'page-tour-step': !currentTourStep.selector,\n 'right-panel': currentTourStep.connectorDirection == 'right',\n 'left-panel': currentTourStep.connectorDirection == 'left',\n 'bottom-panel': currentTourStep.connectorDirection == 'bottom',\n 'top-panel': currentTourStep.connectorDirection == 'top'\n }\" [style.top.px]=\"(currentTourStep.selector && selectedElementRect ? topPosition : null)\"\n [style.left.px]=\"(currentTourStep.selector && selectedElementRect ? leftPosition : null)\"\n [style.width.px]=\"(currentTourStep.selector && selectedElementRect ? calculatedTourStepWidth : null)\"\n [style.transform]=\"(currentTourStep.selector && selectedElementRect ? transform : null)\">\n\n <div *ngIf=\"currentTourStep.isMobile && currentTourStep.connectorDirection == 'bottom'\" class=\"tour-buttons tour-button-container\">\n <div class=\"tour-actions-button-container\">\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n [attr.class]=\"currentTourStep?.backBtnClass + ' back-button'\" (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\" class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\" [attr.class]=\"currentTourStep?.nextBtnClass + ' next-button'\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n <button *ngIf=\"guidedTourService.onResizeMessage\" class=\"next-button\" (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n\n </div>\n\n <div *ngIf=\"currentTourStep.selector\" class=\"tour-arrow\"></div>\n <div class=\"tour-block\">\n <div class=\"arrow\" [ngClass]=\"{\n 'right-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'right'),\n 'left-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'left'),\n 'bottom-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'bottom'),\n 'top-connector': (currentTourStep.selector && currentTourStep.connectorDirection == 'top')\n }\">\n <div class=\"circle\"></div>\n <div class=\"circle-start-dot\"></div>\n <div class=\"triangle\"></div>\n </div>\n\n <div *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.TopOfTourBlock\n && !guidedTourService.onResizeMessage\" class=\"tour-progress-indicator\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </div>\n <div class=\"tour-image\" *ngIf=\"currentTourStep.icon && currentTourStep.selector\">\n <mat-icon>{{currentTourStep.icon}}</mat-icon>\n </div>\n <h3 class=\"tour-title\" *ngIf=\"currentTourStep.title && currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h3>\n <h2 class=\"tour-title\" *ngIf=\"currentTourStep.title && !currentTourStep.selector\">\n {{ currentTourStep.title }}\n </h2>\n <div class=\"tour-content\" [innerHTML]=\"currentTourStep.content\"></div>\n <div *ngIf=\"!currentTourStep.isMobile\" class=\"tour-buttons tour-button-container\">\n <!-- <div class=\"tour-skip-container\">\n <button *ngIf=\"!guidedTourService.onResizeMessage\"\n (click)=\"guidedTourService.skipTour()\"\n [attr.class]=\"currentTourStep?.skipBtnClass + ' skip-button link-button'\">\n {{ skipText }}\n </button>\n </div> -->\n <div class=\"tour-actions-button-container\">\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n [attr.class]=\"currentTourStep?.backBtnClass + ' back-button'\" (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\" class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\" [attr.class]=\"currentTourStep?.nextBtnClass + ' next-button'\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n <button *ngIf=\"guidedTourService.onResizeMessage\" class=\"next-button\" (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n\n </div>\n\n\n <div class=\"progress-container\">\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.Dots\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </div>\n\n </div>\n <div *ngIf=\"currentTourStep.isMobile && currentTourStep.connectorDirection != 'bottom'\" class=\"tour-buttons tour-button-container\">\n <div class=\"tour-actions-button-container\">\n <button *ngIf=\"!guidedTourService.onFirstStep && !guidedTourService.onResizeMessage\"\n [attr.class]=\"currentTourStep?.backBtnClass + ' back-button'\" (click)=\"guidedTourService.backStep()\">\n {{ backText }}\n </button>\n </div>\n <button *ngIf=\"!guidedTourService.onLastStep && !guidedTourService.onResizeMessage\" class=\"next-button\"\n (click)=\"guidedTourService.nextStep()\">\n {{ nextText }}\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">\n <ng-container *ngTemplateOutlet=\"progress\"></ng-container>\n </ng-container>\n </button>\n <button *ngIf=\"guidedTourService.onLastStep\" [attr.class]=\"currentTourStep?.nextBtnClass + ' next-button'\"\n (click)=\"guidedTourService.nextStep()\">\n {{ doneText }}\n </button>\n <button *ngIf=\"guidedTourService.onResizeMessage\" class=\"next-button\" (click)=\"guidedTourService.resetTour()\">\n {{ closeText }}\n </button>\n\n </div>\n </div>\n <ng-template #progress>\n <ng-container *ngTemplateOutlet=\"\n progressIndicator || defaultProgressIndicator; \n context: { currentStepNumber: guidedTourService.currentTourStepDisplay, totalSteps: guidedTourService.currentTourStepCount }\n \"></ng-container>\n </ng-template>\n <ng-template #defaultProgressIndicator let-currentStepNumber=\"currentStepNumber\" let-totalSteps=\"totalSteps\">\n <!-- <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.InsideNextButton\">&nbsp;</ng-container>{{ currentStepNumber }}/{{ totalSteps }} -->\n <ng-container *ngIf=\"progressIndicatorLocation === progressIndicatorLocations.Dots\">\n <div class=\"pagination\">\n <li class=\"nav-dots\">\n <ng-container *ngFor=\"let dot of [].constructor(totalSteps); first as isFirst; index as i\">\n <label [ngClass]=\"(currentStepNumber == (i+1)) ? 'nav-dot-active': ''\" class=\"nav-dot\"\n id=\"img-dot-+{{i}}+{{currentStepNumber}}\"></label>\n </ng-container>\n </li>\n </div>\n </ng-container>\n </ng-template>", styles: ["ngx-guided-tour .guided-tour-user-input-mask{position:fixed;top:0;left:0;display:block;height:100%;width:100%;max-height:100vh;text-align:center;opacity:0}ngx-guided-tour .guided-tour-spotlight-overlay{position:fixed;box-shadow:0 0 0 9999px #000000b3,0 0 1.5rem #00000080}ngx-guided-tour .tour-orb{position:fixed;width:20px;height:20px;border-radius:50%}ngx-guided-tour .tour-orb .tour-orb-ring{width:35px;height:35px;position:relative;top:50%;left:50%;transform:translate(-50%,-50%);animation:pulse 2s linear infinite}ngx-guided-tour .tour-orb .tour-orb-ring:after{content:\"\";display:inline-block;height:100%;width:100%;border-radius:50%}@keyframes pulse{0%{transform:translate(-50%,-50%) scale(.45);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:0}}ngx-guided-tour .tour-step{position:fixed}ngx-guided-tour .tour-step.page-tour-step{max-width:400px;width:50%;left:50%;top:50%;transform:translate(-50%,-50%)}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before{position:absolute}ngx-guided-tour .tour-step.tour-bottom .tour-block,ngx-guided-tour .tour-step.tour-bottom-right .tour-block,ngx-guided-tour .tour-step.tour-bottom-left .tour-block{margin-top:10px}ngx-guided-tour .tour-step.tour-top,ngx-guided-tour .tour-step.tour-top-right,ngx-guided-tour .tour-step.tour-top-left{margin-bottom:10px}ngx-guided-tour .tour-step.tour-top .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{position:absolute;bottom:0}ngx-guided-tour .tour-step.tour-top .tour-block,ngx-guided-tour .tour-step.tour-top-right .tour-block,ngx-guided-tour .tour-step.tour-top-left .tour-block{margin-bottom:10px}ngx-guided-tour .tour-step.tour-bottom .tour-arrow:before,ngx-guided-tour .tour-step.tour-top .tour-arrow:before{transform:translate(-50%);left:50%}ngx-guided-tour .tour-step.tour-bottom-right .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-right .tour-arrow:before{transform:translate(-100%);left:calc(100% - 5px)}ngx-guided-tour .tour-step.tour-bottom-left .tour-arrow:before,ngx-guided-tour .tour-step.tour-top-left .tour-arrow:before{left:5px}ngx-guided-tour .tour-step.tour-left .tour-arrow:before{position:absolute;left:100%;transform:translate(-100%);top:5px}ngx-guided-tour .tour-step.tour-left .tour-block{margin-right:10px}ngx-guided-tour .tour-step.tour-right .tour-arrow:before{position:absolute;left:0;top:5px}ngx-guided-tour .tour-step.tour-right .tour-block{margin-left:10px}ngx-guided-tour .tour-step .tour-block{padding:15px 25px}ngx-guided-tour .tour-step .tour-progress-indicator{padding-bottom:15px}ngx-guided-tour .tour-step .tour-title{font-weight:700!important;padding-bottom:20px}ngx-guided-tour .tour-step h3.tour-title{font-size:20px}ngx-guided-tour .tour-step h2.tour-title{font-size:30px}ngx-guided-tour .tour-step .tour-content{min-height:80px;padding-bottom:30px;font-size:15px}ngx-guided-tour .tour-step .tour-buttons{overflow:hidden}ngx-guided-tour .tour-step .tour-buttons button.link-button{font-size:15px;font-weight:700;max-width:none!important;cursor:pointer;text-align:center;white-space:nowrap;vertical-align:middle;border:1px solid transparent;line-height:1.5;background-color:transparent;position:relative;outline:none;padding:0 15px;-webkit-appearance:button}ngx-guided-tour .tour-step .tour-buttons button.skip-button.link-button{padding-left:0;border-left:0}ngx-guided-tour .tour-step .tour-buttons .back-button{cursor:pointer;border-radius:1px;font-size:14px;border:none;outline:none;padding-left:10px;padding-right:10px}ngx-guided-tour .tour-step .tour-buttons .next-button{cursor:pointer;border-radius:1px;font-size:14px;border:none;outline:none;padding-left:10px;padding-right:10px}.arrow{position:absolute;left:-50px;top:-13px}.right-connector{transform:scaleX(-1);left:0;right:-46px}.circle{position:absolute;box-sizing:border-box;height:118px;width:100px;border:7px solid #000;border-radius:50%;-webkit-clip-path:inset(0 50% 0 0);clip-path:inset(0 50% 0 0);border-style:dotted}.triangle{position:absolute;width:20px;height:15px;background:#000;margin-top:-6px;margin-left:38px;-webkit-clip-path:polygon(50% 0,0% 100%,100% 100%);clip-path:polygon(50% 0,0% 100%,100% 100%);-moz-transform:rotate(90deg);-webkit-transform:rotate(90deg);-o-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.circle-start-dot{display:inline;width:16px;height:16px;background-color:#f3962e;content:\"\";border-radius:50%;position:absolute;margin-top:108px;margin-left:40px}.tour-step.left-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;position:absolute;content:\"\";overflow:hidden;top:10px}.tour-step.right-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;right:0;position:absolute;content:\"\";overflow:hidden;top:10px}.tour-step.top-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;right:0;position:absolute;content:\"\";overflow:hidden;top:10px}.tour-step.bottom-panel:after{display:inline;width:8px;height:-webkit-fill-available;background-color:green;right:0;position:absolute;content:\"\";overflow:hidden;top:10px}.progress-container{display:flex;justify-content:center;align-items:center}.pagination{display:flex;justify-content:center;align-items:center;padding:.5rem}.nav-dots{display:inline-block;position:relative;width:auto;height:10px;border-radius:50%;cursor:default;margin:2px}.nav-dots .nav-dot{top:-5px;width:11px;height:11px;margin:0 4px;position:relative;border-radius:100%;display:inline-block;background-color:#d3d3d3}.nav-dot-active{background:#113463}.top-connector{top:-116px!important;right:173px!important}.top-connector .circle{top:50px;left:80px;transform:rotate(180deg);width:50px;height:70px}.top-connector .circle-start-dot{margin-left:100px}.top-connector .triangle{left:63px;top:49px;transform:rotate(44deg)!important}\n"] }]
612
+ }], ctorParameters: () => [{ type: GuidedTourService }, { type: WindowRefService }, { type: undefined, decorators: [{
613
+ type: Inject,
614
+ args: [DOCUMENT]
615
+ }] }], propDecorators: { topOfPageAdjustment: [{
616
+ type: Input
617
+ }], tourStepWidth: [{
618
+ type: Input
619
+ }], minimalTourStepWidth: [{
620
+ type: Input
621
+ }], skipText: [{
622
+ type: Input
623
+ }], nextText: [{
624
+ type: Input
625
+ }], doneText: [{
626
+ type: Input
627
+ }], closeText: [{
628
+ type: Input
629
+ }], backText: [{
630
+ type: Input
631
+ }], progressIndicatorLocation: [{
632
+ type: Input
633
+ }], progressIndicator: [{
634
+ type: Input
635
+ }], tourStep: [{
636
+ type: ViewChild,
637
+ args: ['tourStep', { static: false }]
638
+ }] } });
639
+
640
+ class GuidedTourModule {
641
+ static forRoot() {
642
+ return {
643
+ ngModule: GuidedTourModule,
644
+ providers: [ErrorHandler, GuidedTourService],
645
+ };
646
+ }
647
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
648
+ /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourModule, declarations: [GuidedTourComponent], imports: [CommonModule, MatIconModule], exports: [GuidedTourComponent] });
649
+ /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourModule, providers: [WindowRefService], imports: [CommonModule, MatIconModule] });
650
+ }
651
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: GuidedTourModule, decorators: [{
652
+ type: NgModule,
653
+ args: [{
654
+ declarations: [GuidedTourComponent],
655
+ imports: [CommonModule, MatIconModule],
656
+ providers: [WindowRefService],
657
+ exports: [GuidedTourComponent]
658
+ }]
659
+ }] });
660
+
661
+ /*
662
+ * Public API Surface of ngx-guided-tour
663
+ */
664
+
665
+ /**
666
+ * Generated bundle index. Do not edit.
667
+ */
668
+
669
+ export { GuidedTourComponent, GuidedTourModule, GuidedTourService, Orientation, ProgressIndicatorLocation, WindowRefService };
670
+ //# sourceMappingURL=igot-cb-tour-guide.mjs.map