@covalent/guided-tour 4.0.0-beta.4 → 4.1.0-develop.4

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.
@@ -117,7 +117,9 @@ class CovalentGuidedTour extends TourButtonsActions {
117
117
  };
118
118
  let stepTotal = 0;
119
119
  const steps = originalSteps.map((step) => {
120
- let showProgress;
120
+ let showProgress = () => {
121
+ //
122
+ };
121
123
  if (step.attachToOptions?.skipFromStepCount === true) {
122
124
  showProgress = function () {
123
125
  return;
@@ -180,11 +182,15 @@ class CovalentGuidedTour extends TourButtonsActions {
180
182
  this.shepherdTour.back();
181
183
  }
182
184
  },
183
- classes: step.advanceOnOptions?.allowGoBack === false ? MAT_BUTTON_INVISIBLE : MAT_ICON_BUTTON,
185
+ classes: step.advanceOnOptions?.allowGoBack === false
186
+ ? MAT_BUTTON_INVISIBLE
187
+ : MAT_ICON_BUTTON,
184
188
  };
185
189
  // check if highlight was provided for the step, else fallback into shepherds usage
186
190
  step.highlightClass =
187
- step.attachToOptions && step.attachToOptions.highlight ? 'shepherd-highlight' : step.highlightClass;
191
+ step.attachToOptions && step.attachToOptions.highlight
192
+ ? 'shepherd-highlight'
193
+ : step.highlightClass;
188
194
  // Adding buttons in the steps if no buttons are defined
189
195
  if (!step.buttons || step.buttons.length === 0) {
190
196
  if (index === 0) {
@@ -204,11 +210,14 @@ class CovalentGuidedTour extends TourButtonsActions {
204
210
  // remove the shepherd "advanceOn" infavor of ours if the event is part of our list
205
211
  if ((typeof advanceOn === 'object' &&
206
212
  !Array.isArray(advanceOn) &&
213
+ advanceOn.event &&
207
214
  overriddenEvents.indexOf(advanceOn.event.split('.')[0]) > -1) ||
208
215
  advanceOn instanceof Array) {
209
216
  step.advanceOn = undefined;
210
217
  step.buttons =
211
- step.advanceOnOptions && step.advanceOnOptions.allowGoBack ? [backButton, voidButton] : [voidButton];
218
+ step.advanceOnOptions && step.advanceOnOptions.allowGoBack
219
+ ? [backButton, voidButton]
220
+ : [voidButton];
212
221
  }
213
222
  // adds a default beforeShowPromise function
214
223
  step.beforeShowPromise = () => {
@@ -223,7 +232,7 @@ class CovalentGuidedTour extends TourButtonsActions {
223
232
  const advanceEvent$ = new Subject();
224
233
  advanceArr$.push(advanceEvent$);
225
234
  // we start a timer of attempts to find an element in the dom
226
- this._bindEvent(advanceOn[i], step.advanceOnOptions, advanceEvent$, destroyedEvent$);
235
+ this._bindEvent(_, step.advanceOnOptions, advanceEvent$, destroyedEvent$);
227
236
  });
228
237
  const advanceSubs = forkJoin(...advanceArr$)
229
238
  .pipe(takeUntil(merge(destroyedEvent$, backEvent$)))
@@ -263,31 +272,37 @@ class CovalentGuidedTour extends TourButtonsActions {
263
272
  if (typeof step.attachTo === 'string') {
264
273
  id = step.attachTo;
265
274
  }
266
- else if (typeof step.attachTo === 'object' && typeof step.attachTo.element === 'string') {
275
+ else if (typeof step.attachTo === 'object' &&
276
+ typeof step.attachTo.element === 'string') {
267
277
  id = step.attachTo.element;
268
278
  }
269
279
  // if we have an id as a string in either case, we use it (we ignore it if its HTMLElement)
270
280
  if (id) {
271
281
  // if current step is the first step of the tour, we set the buttons to be only "next"
272
282
  // we had to use `any` since the tour doesnt expose the steps in any fashion nor a way to check if we have modified them at all
273
- if (this.shepherdTour.getCurrentStep() === this.shepherdTour.steps[0]) {
274
- this.shepherdTour.getCurrentStep().updateStepOptions({
275
- buttons: originalSteps[index].advanceOn ? [voidButton] : [nextButton],
283
+ if (this.shepherdTour.getCurrentStep() ===
284
+ this.shepherdTour.steps[0]) {
285
+ this.shepherdTour.getCurrentStep()?.updateStepOptions({
286
+ buttons: originalSteps[index].advanceOn
287
+ ? [voidButton]
288
+ : [nextButton],
276
289
  });
277
290
  }
278
291
  // register to the attempts observable to notify deeveloper when number has been reached
279
292
  _retryAttempts$
280
293
  .pipe(skip(1), takeUntil(merge(_stopTimer$.asObservable(), destroyedEvent$)), skipWhile((val) => {
281
- if (step.attachToOptions && step.attachToOptions.retries !== undefined) {
294
+ if (step.attachToOptions &&
295
+ step.attachToOptions.retries !== undefined) {
282
296
  return val < step.attachToOptions.retries;
283
297
  }
284
298
  return val < SHEPHERD_DEFAULT_FIND_ATTEMPTS;
285
299
  }))
286
300
  .subscribe((attempts) => {
287
- _retriesReached$.next();
301
+ _retriesReached$.next(1);
288
302
  _retriesReached$.complete();
289
303
  // if attempts have been reached, we check "skipIfNotFound" to move on to the next step
290
- if (step.attachToOptions && step.attachToOptions.skipIfNotFound) {
304
+ if (step.attachToOptions &&
305
+ step.attachToOptions.skipIfNotFound) {
291
306
  // if we get to this step coming back from a step and it wasnt found
292
307
  // then we either check if its the first step and try going forward
293
308
  // or we keep going back until we find a step that actually exists
@@ -303,9 +318,9 @@ class CovalentGuidedTour extends TourButtonsActions {
303
318
  else {
304
319
  // destroys current step if we need to skip it to remove it from the tour
305
320
  const currentStep = this.shepherdTour.getCurrentStep();
306
- currentStep.destroy();
321
+ currentStep?.destroy();
307
322
  this.shepherdTour.next();
308
- this.shepherdTour.removeStep(currentStep.id);
323
+ this.shepherdTour.removeStep(currentStep?.id ?? '');
309
324
  }
310
325
  }
311
326
  else if (step.attachToOptions && step.attachToOptions.else) {
@@ -320,12 +335,14 @@ class CovalentGuidedTour extends TourButtonsActions {
320
335
  }
321
336
  });
322
337
  // we start a timer of attempts to find an element in the dom
323
- timer((step.attachToOptions && step.attachToOptions.timeBeforeShow) || SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW, (step.attachToOptions && step.attachToOptions.interval) || SHEPHERD_DEFAULT_FIND_INTERVAL)
338
+ timer((step.attachToOptions && step.attachToOptions.timeBeforeShow) ||
339
+ SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW, (step.attachToOptions && step.attachToOptions.interval) ||
340
+ SHEPHERD_DEFAULT_FIND_INTERVAL)
324
341
  .pipe(
325
342
  // the timer will continue either until we find the element or the number of attempts has been reached
326
343
  takeUntil(merge(_stopTimer$, _retriesReached$, destroyedEvent$)))
327
344
  .subscribe(() => {
328
- const element = document.querySelector(id);
345
+ const element = document.querySelector(id ?? '');
329
346
  // if the element has been found, we stop the timer and resolve the promise
330
347
  if (element) {
331
348
  _stopTimer$.next();
@@ -341,13 +358,14 @@ class CovalentGuidedTour extends TourButtonsActions {
341
358
  destroyedEvent$.subscribe(() => {
342
359
  _stopTimer$.next();
343
360
  _stopTimer$.complete();
344
- _retriesReached$.next();
361
+ _retriesReached$.next(1);
345
362
  _retriesReached$.complete();
346
363
  });
347
364
  }
348
365
  else {
349
366
  // resolve observable until the timeBeforeShow has passsed or use default
350
- timer((step.attachToOptions && step.attachToOptions.timeBeforeShow) || SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW)
367
+ timer((step.attachToOptions && step.attachToOptions.timeBeforeShow) ||
368
+ SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW)
351
369
  .pipe(takeUntil(merge(destroyedEvent$)))
352
370
  .subscribe(() => {
353
371
  resolve();
@@ -359,10 +377,12 @@ class CovalentGuidedTour extends TourButtonsActions {
359
377
  return steps;
360
378
  }
361
379
  _bindEvent(eventOn, eventOnOptions, event$, destroyedEvent$) {
362
- const selector = eventOn.selector;
380
+ const selector = eventOn.selector ?? '';
363
381
  const event = eventOn.event;
364
382
  // we start a timer of attempts to find an element in the dom
365
- const timerSubs = timer((eventOnOptions && eventOnOptions.timeBeforeShow) || SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW, (eventOnOptions && eventOnOptions.interval) || SHEPHERD_DEFAULT_FIND_INTERVAL)
383
+ const timerSubs = timer((eventOnOptions && eventOnOptions.timeBeforeShow) ||
384
+ SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW, (eventOnOptions && eventOnOptions.interval) ||
385
+ SHEPHERD_DEFAULT_FIND_INTERVAL)
366
386
  .pipe(takeUntil(destroyedEvent$))
367
387
  .subscribe(() => {
368
388
  const element = document.querySelector(selector);
@@ -376,10 +396,10 @@ class CovalentGuidedTour extends TourButtonsActions {
376
396
  }
377
397
  else if (event === ITourEvent.click ||
378
398
  event === ITourEvent.pointerover ||
379
- event.indexOf(ITourEvent.keyup) > -1) {
399
+ (event && event.indexOf(ITourEvent.keyup) > -1)) {
380
400
  // we use normal listeners for mouseevents
381
- const mainEvent = event.split('.')[0];
382
- const subEvent = event.split('.')[1];
401
+ const mainEvent = event?.split('.')[0];
402
+ const subEvent = event?.split('.')[1];
383
403
  fromEvent(element, mainEvent)
384
404
  .pipe(takeUntil(merge(event$.asObservable(), destroyedEvent$)), filter(($event) => {
385
405
  // only trigger if the event is a keyboard event and part of out list
@@ -412,7 +432,11 @@ class CovalentGuidedTour extends TourButtonsActions {
412
432
  observer.disconnect();
413
433
  });
414
434
  // observe for any DOM interaction in the element
415
- observer.observe(element, { childList: true, subtree: true, attributes: true });
435
+ observer.observe(element, {
436
+ childList: true,
437
+ subtree: true,
438
+ attributes: true,
439
+ });
416
440
  }
417
441
  }
418
442
  });
@@ -441,9 +465,10 @@ class CovalentGuidedTourService extends CovalentGuidedTour {
441
465
  this._toursMap = new Map();
442
466
  this._tourStepURLs = new Map();
443
467
  _router.events
444
- .pipe(filter((event) => event instanceof NavigationStart && event.navigationTrigger === 'popstate'))
445
- .subscribe((event) => {
446
- if (this.shepherdTour.isActive) {
468
+ .pipe(filter((event) => event instanceof NavigationStart &&
469
+ event.navigationTrigger === 'popstate'))
470
+ .subscribe(() => {
471
+ if (this.shepherdTour.isActive()) {
447
472
  this.shepherdTour.cancel();
448
473
  }
449
474
  });
@@ -487,6 +512,7 @@ class CovalentGuidedTourService extends CovalentGuidedTour {
487
512
  else {
488
513
  // tslint:disable-next-line:no-console
489
514
  console.warn(`Tour ${tourName} does not exist. Please try another tour.`);
515
+ return undefined;
490
516
  }
491
517
  }
492
518
  // Finds the right registered tour by using queryParams
@@ -501,7 +527,10 @@ class CovalentGuidedTourService extends CovalentGuidedTour {
501
527
  // delete tour queryParam
502
528
  searchParams.delete(queryParam);
503
529
  // build new URL string without it
504
- let url = window.location.protocol + '//' + window.location.host + window.location.pathname;
530
+ let url = window.location.protocol +
531
+ '//' +
532
+ window.location.host +
533
+ window.location.pathname;
505
534
  if (searchParams.toString()) {
506
535
  url += '?' + searchParams.toString();
507
536
  }
@@ -512,13 +541,14 @@ class CovalentGuidedTourService extends CovalentGuidedTour {
512
541
  }
513
542
  setNextBtnDisability(stepId, isDisabled) {
514
543
  if (this.shepherdTour.getById(stepId)) {
515
- const stepOptions = this.shepherdTour.getById(stepId).options;
516
- stepOptions.buttons.forEach((button) => {
544
+ const stepOptions = this.shepherdTour.getById(stepId)
545
+ .options;
546
+ stepOptions.buttons?.forEach((button) => {
517
547
  if (button.text === 'chevron_right') {
518
548
  button.disabled = isDisabled;
519
549
  }
520
550
  });
521
- this.shepherdTour.getById(stepId).updateStepOptions(stepOptions);
551
+ this.shepherdTour.getById(stepId)?.updateStepOptions(stepOptions);
522
552
  }
523
553
  }
524
554
  async _loadTour(tourUrl) {
@@ -545,7 +575,9 @@ class CovalentGuidedTourService extends CovalentGuidedTour {
545
575
  if (step.beforeShowPromise) {
546
576
  const beforeShowPromise = step.beforeShowPromise;
547
577
  step.beforeShowPromise = () => {
548
- return this._router.navigate([route], step.routing.extras).then(() => {
578
+ return this._router
579
+ .navigate([route], step.routing?.extras)
580
+ .then(() => {
549
581
  return beforeShowPromise();
550
582
  });
551
583
  };
@@ -558,27 +590,26 @@ class CovalentGuidedTourService extends CovalentGuidedTour {
558
590
  return routedSteps;
559
591
  }
560
592
  }
561
- /** @nocollapse */ /** @nocollapse */ CovalentGuidedTourService.ɵfac = function CovalentGuidedTourService_Factory(t) { return new (t || CovalentGuidedTourService)(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i1.ActivatedRoute), i0.ɵɵinject(i2.HttpClient)); };
562
- /** @nocollapse */ /** @nocollapse */ CovalentGuidedTourService.ɵprov = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjectable({ token: CovalentGuidedTourService, factory: CovalentGuidedTourService.ɵfac });
563
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentGuidedTourService, [{
564
- type: Injectable
565
- }], function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.HttpClient }]; }, null); })();
593
+ CovalentGuidedTourService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentGuidedTourService, deps: [{ token: i1.Router }, { token: i1.ActivatedRoute }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
594
+ CovalentGuidedTourService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentGuidedTourService });
595
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentGuidedTourService, decorators: [{
596
+ type: Injectable
597
+ }], ctorParameters: function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.HttpClient }]; } });
566
598
 
567
599
  class CovalentGuidedTourModule {
568
600
  }
569
- /** @nocollapse */ /** @nocollapse */ CovalentGuidedTourModule.ɵfac = function CovalentGuidedTourModule_Factory(t) { return new (t || CovalentGuidedTourModule)(); };
570
- /** @nocollapse */ /** @nocollapse */ CovalentGuidedTourModule.ɵmod = /** @pureOrBreakMyCode */ i0.ɵɵdefineNgModule({ type: CovalentGuidedTourModule });
571
- /** @nocollapse */ /** @nocollapse */ CovalentGuidedTourModule.ɵinj = /** @pureOrBreakMyCode */ i0.ɵɵdefineInjector({ providers: [CovalentGuidedTourService], imports: [[CommonModule]] });
572
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CovalentGuidedTourModule, [{
573
- type: NgModule,
574
- args: [{
575
- imports: [CommonModule],
576
- providers: [CovalentGuidedTourService],
577
- declarations: [],
578
- exports: [],
579
- }]
580
- }], null, null); })();
581
- (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(CovalentGuidedTourModule, { imports: [CommonModule] }); })();
601
+ CovalentGuidedTourModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentGuidedTourModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
602
+ CovalentGuidedTourModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentGuidedTourModule, imports: [CommonModule] });
603
+ CovalentGuidedTourModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentGuidedTourModule, providers: [CovalentGuidedTourService], imports: [[CommonModule]] });
604
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.2", ngImport: i0, type: CovalentGuidedTourModule, decorators: [{
605
+ type: NgModule,
606
+ args: [{
607
+ imports: [CommonModule],
608
+ providers: [CovalentGuidedTourService],
609
+ declarations: [],
610
+ exports: [],
611
+ }]
612
+ }] });
582
613
 
583
614
  /**
584
615
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"covalent-guided-tour.mjs","sources":["../../../../src/platform/guided-tour/guided.tour.ts","../../../../src/platform/guided-tour/guided-tour.service.ts","../../../../src/platform/guided-tour/guided-tour.module.ts","../../../../src/platform/guided-tour/covalent-guided-tour.ts"],"sourcesContent":["import Shepherd from 'shepherd.js';\nimport { timer, Subject, BehaviorSubject, merge, Subscription, fromEvent, forkJoin } from 'rxjs';\nimport { takeUntil, skipWhile, filter, skip, first } from 'rxjs/operators';\n\nexport type TourStep = Shepherd.Step.StepOptions;\nexport type TourStepButton = Shepherd.Step.StepOptionsButton;\n\nexport enum ITourEvent {\n 'click' = 'click',\n 'pointerover' = 'pointerover',\n 'keyup' = 'keyup',\n 'added' = 'added', // added to DOM\n 'removed' = 'removed', // removed from DOM\n}\n\nexport interface ITourEventOn {\n selector?: string; // css selector\n event?: keyof typeof ITourEvent; // click, pointerover, keyup, added, removed\n}\n\nexport interface ITourEventOnOptions {\n timeBeforeShow?: number; // delay before step is displayed\n interval?: number; // time between searches for element, defaults to 500ms\n}\n\nexport interface ITourAbortOn extends ITourEventOn {}\n\nexport interface ITourOptions extends Shepherd.Tour.TourOptions {\n abortOn?: ITourAbortOn[]; // events to abort on\n}\n\nexport interface ITourStepAttachToOptions extends ITourEventOnOptions {\n highlight?: boolean;\n retries?: number; // # num of attempts to find element\n skipIfNotFound?: boolean; // if element is not found after n retries, move on to next step\n else?: string; // if element is not found, go to step with this id\n goBackTo?: string; // back button goes back to step with this id\n skipFromStepCount?: boolean; // show/hide progress on step\n}\n\nexport interface ITourStepAdvanceOn extends ITourEventOn {}\n\nexport interface ITourStepAdvanceOnOptions extends ITourEventOnOptions {\n jumpTo?: string; // next button will jump to step with this id\n allowGoBack?: boolean; // allow back within this step\n}\n\nexport interface ITourStep extends TourStep {\n attachToOptions?: ITourStepAttachToOptions;\n advanceOnOptions?: ITourStepAdvanceOnOptions;\n advanceOn?: ITourStepAdvanceOn[] | ITourStepAdvanceOn | any;\n abortOn?: ITourAbortOn[];\n count?: number;\n}\n\nabstract class TourButtonsActions {\n abstract next(): void;\n\n abstract back(): void;\n\n abstract cancel(): void;\n\n abstract finish(): void;\n}\n\nconst SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW: number = 100;\nconst SHEPHERD_DEFAULT_FIND_INTERVAL: number = 500;\nconst SHEPHERD_DEFAULT_FIND_ATTEMPTS: number = 20;\n\nconst overriddenEvents: string[] = [\n ITourEvent.click,\n ITourEvent.pointerover,\n ITourEvent.removed,\n ITourEvent.added,\n ITourEvent.keyup,\n];\n\nconst keyEvents: Map<number, string> = new Map<number, string>([\n [13, 'enter'],\n [27, 'esc'],\n]);\n\nconst defaultStepOptions: TourStep = {\n scrollTo: { behavior: 'smooth', block: 'center' },\n cancelIcon: {\n enabled: true,\n },\n};\n\nconst MAT_ICON_BUTTON: string = 'mat-icon-button material-icons mat-button-base';\nconst MAT_BUTTON: string = 'mat-button-base mat-button';\nconst MAT_BUTTON_INVISIBLE: string = 'shepherd-void-button';\n\nexport class CovalentGuidedTour extends TourButtonsActions {\n private _destroyedEvent$: Subject<void>;\n\n shepherdTour: Shepherd.Tour;\n stepOptions: ITourStep;\n\n constructor(stepOptions: ITourStep = defaultStepOptions) {\n super();\n\n this.stepOptions = stepOptions;\n this.newTour();\n }\n\n newTour(opts?: ITourOptions): void {\n this.shepherdTour = new Shepherd.Tour(\n Object.assign(\n {\n defaultStepOptions: this.stepOptions,\n },\n opts,\n ),\n );\n\n this._destroyedEvent$ = new Subject<void>();\n // listen to cancel and complete to clean up abortOn events\n merge(fromEvent(this.shepherdTour, 'cancel'), fromEvent(this.shepherdTour, 'complete'))\n .pipe(first())\n .subscribe(() => {\n this._destroyedEvent$.next();\n this._destroyedEvent$.complete();\n });\n\n // if abortOn was passed, we bind the event and execute complete\n if (opts && opts.abortOn) {\n const abortArr$: Subject<void>[] = [];\n opts.abortOn.forEach((abortOn: ITourAbortOn) => {\n const abortEvent$: Subject<void> = new Subject<void>();\n abortArr$.push(abortEvent$);\n this._bindEvent(abortOn, undefined, abortEvent$, this._destroyedEvent$);\n });\n\n const abortSubs: Subscription = merge(...abortArr$)\n .pipe(takeUntil(this._destroyedEvent$))\n .subscribe(() => {\n this.shepherdTour.complete();\n abortSubs.unsubscribe();\n });\n }\n }\n\n back(): void {\n this.shepherdTour.back();\n }\n\n cancel(): void {\n this.shepherdTour.cancel();\n }\n\n next(): void {\n this.shepherdTour.next();\n }\n\n finish(): void {\n this.shepherdTour.complete();\n }\n\n addSteps(steps: ITourStep[]): void {\n this.shepherdTour.addSteps(this._prepareTour(steps));\n }\n\n start(): void {\n this.shepherdTour.start();\n }\n\n protected _prepareTour(originalSteps: ITourStep[], finishLabel: string = 'finish'): ITourStep[] {\n // create Subjects for back and forward events\n const backEvent$: Subject<void> = new Subject<void>();\n const forwardEvent$: Subject<void> = new Subject<void>();\n let _backFlow: boolean = false;\n // create Subject for your end\n const destroyedEvent$: Subject<void> = new Subject<void>();\n /**\n * This function adds the step progress in the footer of the shepherd tooltip\n */\n const appendProgressFunc: Function = function (): void {\n // get all the footers that are available in the DOM\n const footers: Element[] = Array.from<Element>(document.querySelectorAll('.shepherd-footer'));\n // get the last footer since Shepherd always puts the active one at the end\n const footer: Element = footers[footers.length - 1];\n // generate steps html element\n const progress: HTMLSpanElement = document.createElement('span');\n progress.className = 'shepherd-progress';\n progress.innerText = `${this.shepherdTour.currentStep.options.count}/${stepTotal}`;\n // insert into the footer before the first button\n footer.insertBefore(progress, footer.querySelector('.shepherd-button'));\n };\n\n let stepTotal: number = 0;\n const steps: ITourStep[] = originalSteps.map((step: ITourStep) => {\n let showProgress: Function;\n if (step.attachToOptions?.skipFromStepCount === true) {\n showProgress = function (): void {\n return;\n };\n } else if (\n step.attachToOptions?.skipFromStepCount === undefined ||\n step.attachToOptions?.skipFromStepCount === false\n ) {\n step.count = ++stepTotal;\n showProgress = appendProgressFunc.bind(this);\n }\n return Object.assign({}, step, {\n when: {\n show: showProgress,\n },\n });\n });\n\n const finishButton: TourStepButton = {\n text: finishLabel,\n action: this['finish'].bind(this),\n classes: MAT_BUTTON,\n };\n\n const voidButton: TourStepButton = {\n text: '',\n action(): void {\n return;\n },\n classes: MAT_BUTTON_INVISIBLE,\n };\n\n // listen to the destroyed event to clean up all the streams\n this._destroyedEvent$.pipe(first()).subscribe(() => {\n backEvent$.complete();\n forwardEvent$.complete();\n destroyedEvent$.next();\n destroyedEvent$.complete();\n });\n\n const totalSteps: number = steps.length;\n steps.forEach((step: ITourStep, index: number) => {\n // create buttons specific for the step\n // this is done to create more control on events\n const nextButton: TourStepButton = {\n text: 'chevron_right',\n action: () => {\n // intercept the next action and trigger event\n forwardEvent$.next();\n this.shepherdTour.next();\n },\n classes: MAT_ICON_BUTTON,\n };\n const backButton: TourStepButton = {\n text: 'chevron_left',\n action: () => {\n // intercept the back action and trigger event\n backEvent$.next();\n _backFlow = true;\n // check if 'goBackTo' is set to jump to a particular step, else just go back\n if (step.attachToOptions && step.attachToOptions.goBackTo) {\n this.shepherdTour.show(step.attachToOptions.goBackTo, false);\n } else {\n this.shepherdTour.back();\n }\n },\n classes: step.advanceOnOptions?.allowGoBack === false ? MAT_BUTTON_INVISIBLE : MAT_ICON_BUTTON,\n };\n\n // check if highlight was provided for the step, else fallback into shepherds usage\n step.highlightClass =\n step.attachToOptions && step.attachToOptions.highlight ? 'shepherd-highlight' : step.highlightClass;\n\n // Adding buttons in the steps if no buttons are defined\n if (!step.buttons || step.buttons.length === 0) {\n if (index === 0) {\n // first step\n step.buttons = [nextButton];\n } else if (index === totalSteps - 1) {\n // last step\n step.buttons = [backButton, finishButton];\n } else {\n step.buttons = [backButton, nextButton];\n }\n }\n\n // checks \"advanceOn\" to override listeners\n let advanceOn: ITourStepAdvanceOn[] | ITourStepAdvanceOn = step.advanceOn;\n // remove the shepherd \"advanceOn\" infavor of ours if the event is part of our list\n if (\n (typeof advanceOn === 'object' &&\n !Array.isArray(advanceOn) &&\n overriddenEvents.indexOf(advanceOn.event.split('.')[0]) > -1) ||\n advanceOn instanceof Array\n ) {\n step.advanceOn = undefined;\n step.buttons =\n step.advanceOnOptions && step.advanceOnOptions.allowGoBack ? [backButton, voidButton] : [voidButton];\n }\n // adds a default beforeShowPromise function\n step.beforeShowPromise = () => {\n return new Promise((resolve: (value?: any) => void) => {\n const additionalCapabilitiesSetup: Function = () => {\n if (advanceOn && !step.advanceOn) {\n if (!Array.isArray(advanceOn)) {\n advanceOn = [advanceOn];\n }\n\n const advanceArr$: Subject<void>[] = [];\n advanceOn.forEach((_: any, i: number) => {\n const advanceEvent$: Subject<void> = new Subject<void>();\n advanceArr$.push(advanceEvent$);\n // we start a timer of attempts to find an element in the dom\n this._bindEvent(advanceOn[i], step.advanceOnOptions, advanceEvent$, destroyedEvent$);\n });\n const advanceSubs: Subscription = forkJoin(...advanceArr$)\n .pipe(takeUntil(merge(destroyedEvent$, backEvent$)))\n .subscribe(() => {\n // check if we need to advance to a specific step, else advance to next step\n if (step.advanceOnOptions && step.advanceOnOptions.jumpTo) {\n this.shepherdTour.show(step.advanceOnOptions.jumpTo);\n } else {\n this.shepherdTour.next();\n }\n forwardEvent$.next();\n advanceSubs.unsubscribe();\n });\n }\n\n // if abortOn was passed on the step, we bind the event and execute complete\n if (step.abortOn) {\n const abortArr$: Subject<void>[] = [];\n step.abortOn.forEach((abortOn: ITourAbortOn) => {\n const abortEvent$: Subject<void> = new Subject<void>();\n abortArr$.push(abortEvent$);\n this._bindEvent(abortOn, undefined, abortEvent$, destroyedEvent$);\n });\n\n const abortSubs: Subscription = merge(...abortArr$)\n .pipe(takeUntil(merge(destroyedEvent$, backEvent$, forwardEvent$)))\n .subscribe(() => {\n this.shepherdTour.complete();\n abortSubs.unsubscribe();\n });\n }\n };\n\n const _stopTimer$: Subject<void> = new Subject<void>();\n const _retriesReached$: Subject<number> = new Subject<number>();\n const _retryAttempts$: BehaviorSubject<number> = new BehaviorSubject<number>(-1);\n\n let id: string;\n // checks if \"attachTo\" is a string or an object to get the id of an element\n if (typeof step.attachTo === 'string') {\n id = step.attachTo;\n } else if (typeof step.attachTo === 'object' && typeof step.attachTo.element === 'string') {\n id = step.attachTo.element;\n }\n // if we have an id as a string in either case, we use it (we ignore it if its HTMLElement)\n if (id) {\n // if current step is the first step of the tour, we set the buttons to be only \"next\"\n // we had to use `any` since the tour doesnt expose the steps in any fashion nor a way to check if we have modified them at all\n if (this.shepherdTour.getCurrentStep() === (<any>this.shepherdTour).steps[0]) {\n this.shepherdTour.getCurrentStep().updateStepOptions({\n buttons: originalSteps[index].advanceOn ? [voidButton] : [nextButton],\n });\n }\n // register to the attempts observable to notify deeveloper when number has been reached\n _retryAttempts$\n .pipe(\n skip(1),\n takeUntil(merge(_stopTimer$.asObservable(), destroyedEvent$)),\n skipWhile((val: number) => {\n if (step.attachToOptions && step.attachToOptions.retries !== undefined) {\n return val < step.attachToOptions.retries;\n }\n return val < SHEPHERD_DEFAULT_FIND_ATTEMPTS;\n }),\n )\n .subscribe((attempts: number) => {\n _retriesReached$.next();\n _retriesReached$.complete();\n // if attempts have been reached, we check \"skipIfNotFound\" to move on to the next step\n if (step.attachToOptions && step.attachToOptions.skipIfNotFound) {\n // if we get to this step coming back from a step and it wasnt found\n // then we either check if its the first step and try going forward\n // or we keep going back until we find a step that actually exists\n if (_backFlow) {\n if ((<any>this.shepherdTour).steps.indexOf(this.shepherdTour.getCurrentStep()) === 0) {\n this.shepherdTour.next();\n } else {\n this.shepherdTour.back();\n }\n _backFlow = false;\n } else {\n // destroys current step if we need to skip it to remove it from the tour\n const currentStep: Shepherd.Step = this.shepherdTour.getCurrentStep();\n currentStep.destroy();\n this.shepherdTour.next();\n this.shepherdTour.removeStep((<Shepherd.Step.StepOptions>currentStep).id);\n }\n } else if (step.attachToOptions && step.attachToOptions.else) {\n // if \"skipIfNotFound\" is not true, then we check if \"else\" has been set to jump to a specific step\n this.shepherdTour.show(step.attachToOptions.else);\n } else {\n // tslint:disable-next-line:no-console\n console.warn(`Retries reached trying to find ${id}. Retried ${attempts} times.`);\n // else we show the step regardless\n resolve();\n }\n });\n\n // we start a timer of attempts to find an element in the dom\n timer(\n (step.attachToOptions && step.attachToOptions.timeBeforeShow) || SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW,\n (step.attachToOptions && step.attachToOptions.interval) || SHEPHERD_DEFAULT_FIND_INTERVAL,\n )\n .pipe(\n // the timer will continue either until we find the element or the number of attempts has been reached\n takeUntil(merge(_stopTimer$, _retriesReached$, destroyedEvent$)),\n )\n .subscribe(() => {\n const element: HTMLElement = document.querySelector(id);\n // if the element has been found, we stop the timer and resolve the promise\n if (element) {\n _stopTimer$.next();\n _stopTimer$.complete();\n additionalCapabilitiesSetup();\n resolve();\n } else {\n _retryAttempts$.next(_retryAttempts$.value + 1);\n }\n });\n\n // stop find interval if user stops the tour\n destroyedEvent$.subscribe(() => {\n _stopTimer$.next();\n _stopTimer$.complete();\n _retriesReached$.next();\n _retriesReached$.complete();\n });\n } else {\n // resolve observable until the timeBeforeShow has passsed or use default\n timer(\n (step.attachToOptions && step.attachToOptions.timeBeforeShow) || SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW,\n )\n .pipe(takeUntil(merge(destroyedEvent$)))\n .subscribe(() => {\n resolve();\n });\n }\n });\n };\n });\n return steps;\n }\n\n private _bindEvent(\n eventOn: ITourEventOn,\n eventOnOptions: ITourEventOnOptions,\n event$: Subject<void>,\n destroyedEvent$: Subject<void>,\n ): void {\n const selector: string = eventOn.selector;\n const event: string = eventOn.event;\n // we start a timer of attempts to find an element in the dom\n const timerSubs: Subscription = timer(\n (eventOnOptions && eventOnOptions.timeBeforeShow) || SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW,\n (eventOnOptions && eventOnOptions.interval) || SHEPHERD_DEFAULT_FIND_INTERVAL,\n )\n .pipe(takeUntil(destroyedEvent$))\n .subscribe(() => {\n const element: HTMLElement = document.querySelector(selector);\n // if the element has been found, we stop the timer and resolve the promise\n if (element) {\n timerSubs.unsubscribe();\n\n if (event === ITourEvent.added) {\n // if event is \"Added\" trigger a soon as this is attached.\n event$.next();\n event$.complete();\n } else if (\n event === ITourEvent.click ||\n event === ITourEvent.pointerover ||\n event.indexOf(ITourEvent.keyup) > -1\n ) {\n // we use normal listeners for mouseevents\n const mainEvent: string = event.split('.')[0];\n const subEvent: string = event.split('.')[1];\n fromEvent(element, mainEvent)\n .pipe(\n takeUntil(merge(event$.asObservable(), destroyedEvent$)),\n filter(($event: Event) => {\n // only trigger if the event is a keyboard event and part of out list\n if ($event instanceof KeyboardEvent) {\n if (keyEvents.get($event.keyCode) === subEvent) {\n return true;\n }\n return false;\n } else {\n return true;\n }\n }),\n )\n .subscribe(() => {\n event$.next();\n event$.complete();\n });\n } else if (event === ITourEvent.removed) {\n // and we will use MutationObserver for DOM events\n const observer: MutationObserver = new MutationObserver(() => {\n if (!document.body.contains(element)) {\n event$.next();\n event$.complete();\n observer.disconnect();\n }\n });\n\n // stop listenining if tour is closed\n destroyedEvent$.subscribe(() => {\n observer.disconnect();\n });\n // observe for any DOM interaction in the element\n observer.observe(element, { childList: true, subtree: true, attributes: true });\n }\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport {\n Router,\n ActivatedRoute,\n ParamMap,\n NavigationExtras,\n NavigationStart,\n Event as NavigationEvent,\n} from '@angular/router';\nimport Shepherd from 'shepherd.js';\nimport { tap, map, filter } from 'rxjs/operators';\nimport { Observable, fromEvent } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { CovalentGuidedTour, ITourStep, ITourOptions, TourStepButton } from './guided.tour';\n\nexport interface IGuidedTour extends ITourOptions {\n steps: IGuidedTourStep[];\n finishButtonText?: string;\n}\n\nexport interface IGuidedTourStep extends ITourStep {\n routing?: {\n route: string;\n extras?: NavigationExtras;\n };\n}\n\n/**\n * Router enabled Shepherd tour\n */\nexport enum TourEvents {\n complete = 'complete',\n cancel = 'cancel',\n hide = 'hide',\n show = 'show',\n start = 'start',\n active = 'active',\n inactive = 'inactive',\n}\n\nexport interface IGuidedTourEvent {\n step: any;\n previous: any;\n tour: any;\n}\n\n@Injectable()\nexport class CovalentGuidedTourService extends CovalentGuidedTour {\n private _toursMap: Map<string, IGuidedTour> = new Map<string, IGuidedTour>();\n private _tourStepURLs: Map<string, string> = new Map<string, string>();\n constructor(private _router: Router, private _route: ActivatedRoute, private _httpClient: HttpClient) {\n super();\n _router.events\n .pipe(\n filter((event: NavigationEvent) => event instanceof NavigationStart && event.navigationTrigger === 'popstate'),\n )\n .subscribe((event: NavigationEvent) => {\n if (this.shepherdTour.isActive) {\n this.shepherdTour.cancel();\n }\n });\n }\n\n tourEvent$(str: TourEvents): Observable<IGuidedTourEvent> {\n return fromEvent(this.shepherdTour, str);\n }\n\n async registerTour(tourName: string, tour: IGuidedTour | string): Promise<void> {\n const guidedTour: IGuidedTour = typeof tour === 'string' ? await this._loadTour(tour) : tour;\n this._toursMap.set(tourName, guidedTour);\n }\n\n startTour(tourName: string): Shepherd.Tour {\n const guidedTour: IGuidedTour = this._getTour(tourName);\n this.finish();\n if (guidedTour && guidedTour.steps && guidedTour.steps.length) {\n // remove steps from tour since we need to preprocess them first\n this.newTour(Object.assign({}, guidedTour, { steps: undefined }));\n const tourInstance: Shepherd.Tour = this.shepherdTour.addSteps(\n this._configureRoutesForSteps(this._prepareTour(guidedTour.steps, guidedTour.finishButtonText)),\n );\n // init route transition if step URL is different then the current location.\n this.tourEvent$(TourEvents.show).subscribe((tourEvent: IGuidedTourEvent) => {\n const currentURL: string = this._router.url.split(/[?#]/)[0];\n const {\n step: { id, options },\n } = tourEvent;\n if (this._tourStepURLs.has(id)) {\n const stepRoute: string = this._tourStepURLs.get(id);\n if (stepRoute !== currentURL) {\n this._router.navigate([stepRoute]);\n }\n } else {\n if (options && options.routing) {\n this._tourStepURLs.set(id, options.routing.route);\n } else {\n this._tourStepURLs.set(id, currentURL);\n }\n }\n });\n this.start();\n return tourInstance;\n } else {\n // tslint:disable-next-line:no-console\n console.warn(`Tour ${tourName} does not exist. Please try another tour.`);\n }\n }\n\n // Finds the right registered tour by using queryParams\n // finishes any other tour and starts the new one.\n initializeOnQueryParams(queryParam: string = 'tour'): Observable<ParamMap> {\n return this._route.queryParamMap.pipe(\n debounceTime(100),\n tap((params: ParamMap) => {\n const tourParam: string = params.get(queryParam);\n if (tourParam) {\n this.startTour(tourParam);\n // get current search parameters\n const searchParams: URLSearchParams = new URLSearchParams(window.location.search);\n // delete tour queryParam\n searchParams.delete(queryParam);\n // build new URL string without it\n let url: string = window.location.protocol + '//' + window.location.host + window.location.pathname;\n if (searchParams.toString()) {\n url += '?' + searchParams.toString();\n }\n // replace state in history without triggering a navigation\n window.history.replaceState({ path: url }, '', url);\n }\n }),\n );\n }\n\n setNextBtnDisability(stepId: string, isDisabled: boolean): void {\n if (this.shepherdTour.getById(stepId)) {\n const stepOptions: ITourStep = (this.shepherdTour.getById(stepId) as any).options;\n stepOptions.buttons.forEach((button: TourStepButton) => {\n if (button.text === 'chevron_right') {\n button.disabled = isDisabled;\n }\n });\n this.shepherdTour.getById(stepId).updateStepOptions(stepOptions);\n }\n }\n\n private async _loadTour(tourUrl: string): Promise<any> {\n const request: Observable<object> = this._httpClient.get(tourUrl);\n try {\n return await request\n .pipe(\n map((resultSet: any) => {\n return JSON.parse(JSON.stringify(resultSet));\n }),\n )\n .toPromise();\n } catch {\n return undefined;\n }\n }\n\n private _getTour(key: string): IGuidedTour {\n return this._toursMap.get(key);\n }\n\n private _configureRoutesForSteps(routedSteps: IGuidedTourStep[]): IGuidedTourStep[] {\n routedSteps.forEach((step: IGuidedTourStep) => {\n if (step.routing) {\n const route: string = step.routing.route;\n // if there is a beforeShowPromise, then we save it and call it after the navigation\n if (step.beforeShowPromise) {\n const beforeShowPromise: () => Promise<void> = step.beforeShowPromise;\n step.beforeShowPromise = () => {\n return this._router.navigate([route], step.routing.extras).then(() => {\n return beforeShowPromise();\n });\n };\n } else {\n step.beforeShowPromise = () => this._router.navigate([route]);\n }\n }\n });\n\n return routedSteps;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CovalentGuidedTourService } from './guided-tour.service';\n\n@NgModule({\n imports: [CommonModule],\n providers: [CovalentGuidedTourService],\n declarations: [],\n exports: [],\n})\nexport class CovalentGuidedTourModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;IAOY;AAAZ,WAAY,UAAU;IACpB,6BAAiB,CAAA;IACjB,yCAA6B,CAAA;IAC7B,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;AACvB,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AA0CD,MAAe,kBAAkB;CAQhC;AAED,MAAM,sCAAsC,GAAW,GAAG,CAAC;AAC3D,MAAM,8BAA8B,GAAW,GAAG,C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AO,WAAW,CAAC;KACpB;;wIAxIU,yBAAyB;iIAAzB,yBAAyB,WAAzB,yBAAyB;uFAAzB,yBAAyB;cADrC,UAAU;;;MCrCE,wBAAwB;;sIAAxB,wBAAwB;4HAAxB,wBAAwB;iIAJxB,CAAC,yBAAyB,CAAC,YAD7B,CAAC,YAAY,CAAC;uFAKZ,wBAAwB;cANpC,QAAQ;eAAC;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,SAAS,EAAE,CAAC,yBAAyB,CAAC;gBACtC,YAAY,EAAE,EAAE;gBAChB,OAAO,EAAE,EAAE;aACZ;;wFACY,wBAAwB,cALzB,YAAY;;ACLxB;;;;;;"}
1
+ {"version":3,"file":"covalent-guided-tour.mjs","sources":["../../../../libs/angular-guided-tour/src/lib/guided.tour.ts","../../../../libs/angular-guided-tour/src/lib/guided-tour.service.ts","../../../../libs/angular-guided-tour/src/lib/guided-tour.module.ts","../../../../libs/angular-guided-tour/src/covalent-guided-tour.ts"],"sourcesContent":["import Shepherd from 'shepherd.js';\nimport {\n timer,\n Subject,\n BehaviorSubject,\n merge,\n Subscription,\n fromEvent,\n forkJoin,\n} from 'rxjs';\nimport { takeUntil, skipWhile, filter, skip, first } from 'rxjs/operators';\n\nexport type TourStep = Shepherd.Step.StepOptions;\nexport type TourStepButton = Shepherd.Step.StepOptionsButton;\n\nexport enum ITourEvent {\n 'click' = 'click',\n 'pointerover' = 'pointerover',\n 'keyup' = 'keyup',\n 'added' = 'added', // added to DOM\n 'removed' = 'removed', // removed from DOM\n}\n\nexport interface ITourEventOn {\n selector?: string; // css selector\n event?: keyof typeof ITourEvent; // click, pointerover, keyup, added, removed\n}\n\nexport interface ITourEventOnOptions {\n timeBeforeShow?: number; // delay before step is displayed\n interval?: number; // time between searches for element, defaults to 500ms\n}\n\nexport interface ITourOptions extends Shepherd.Tour.TourOptions {\n abortOn?: ITourEventOn[]; // events to abort on\n}\n\nexport interface ITourStepAttachToOptions extends ITourEventOnOptions {\n highlight?: boolean;\n retries?: number; // # num of attempts to find element\n skipIfNotFound?: boolean; // if element is not found after n retries, move on to next step\n else?: string; // if element is not found, go to step with this id\n goBackTo?: string; // back button goes back to step with this id\n skipFromStepCount?: boolean; // show/hide progress on step\n}\n\nexport interface ITourStepAdvanceOnOptions extends ITourEventOnOptions {\n jumpTo?: string; // next button will jump to step with this id\n allowGoBack?: boolean; // allow back within this step\n}\n\nexport interface ITourStep extends TourStep {\n attachToOptions?: ITourStepAttachToOptions;\n advanceOnOptions?: ITourStepAdvanceOnOptions;\n advanceOn?: ITourEventOn[] | ITourEventOn | any;\n abortOn?: ITourEventOn[];\n count?: number;\n}\n\nabstract class TourButtonsActions {\n abstract next(): void;\n\n abstract back(): void;\n\n abstract cancel(): void;\n\n abstract finish(): void;\n}\n\nconst SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW = 100;\nconst SHEPHERD_DEFAULT_FIND_INTERVAL = 500;\nconst SHEPHERD_DEFAULT_FIND_ATTEMPTS = 20;\n\nconst overriddenEvents: string[] = [\n ITourEvent.click,\n ITourEvent.pointerover,\n ITourEvent.removed,\n ITourEvent.added,\n ITourEvent.keyup,\n];\n\nconst keyEvents: Map<number, string> = new Map<number, string>([\n [13, 'enter'],\n [27, 'esc'],\n]);\n\nconst defaultStepOptions: TourStep = {\n scrollTo: { behavior: 'smooth', block: 'center' },\n cancelIcon: {\n enabled: true,\n },\n};\n\nconst MAT_ICON_BUTTON = 'mat-icon-button material-icons mat-button-base';\nconst MAT_BUTTON = 'mat-button-base mat-button';\nconst MAT_BUTTON_INVISIBLE = 'shepherd-void-button';\n\nexport class CovalentGuidedTour extends TourButtonsActions {\n private _destroyedEvent$!: Subject<void>;\n\n shepherdTour!: Shepherd.Tour;\n stepOptions: ITourStep;\n\n constructor(stepOptions: ITourStep = defaultStepOptions) {\n super();\n\n this.stepOptions = stepOptions;\n this.newTour();\n }\n\n newTour(opts?: ITourOptions): void {\n this.shepherdTour = new Shepherd.Tour(\n Object.assign(\n {\n defaultStepOptions: this.stepOptions,\n },\n opts\n )\n );\n\n this._destroyedEvent$ = new Subject<void>();\n // listen to cancel and complete to clean up abortOn events\n merge(\n fromEvent(this.shepherdTour, 'cancel'),\n fromEvent(this.shepherdTour, 'complete')\n )\n .pipe(first())\n .subscribe(() => {\n this._destroyedEvent$.next();\n this._destroyedEvent$.complete();\n });\n\n // if abortOn was passed, we bind the event and execute complete\n if (opts && opts.abortOn) {\n const abortArr$: Subject<void>[] = [];\n opts.abortOn.forEach((abortOn: ITourEventOn) => {\n const abortEvent$: Subject<void> = new Subject<void>();\n abortArr$.push(abortEvent$);\n this._bindEvent(abortOn, undefined, abortEvent$, this._destroyedEvent$);\n });\n\n const abortSubs: Subscription = merge(...abortArr$)\n .pipe(takeUntil(this._destroyedEvent$))\n .subscribe(() => {\n this.shepherdTour.complete();\n abortSubs.unsubscribe();\n });\n }\n }\n\n back(): void {\n this.shepherdTour.back();\n }\n\n cancel(): void {\n this.shepherdTour.cancel();\n }\n\n next(): void {\n this.shepherdTour.next();\n }\n\n finish(): void {\n this.shepherdTour.complete();\n }\n\n addSteps(steps: ITourStep[]): void {\n this.shepherdTour.addSteps(this._prepareTour(steps));\n }\n\n start(): void {\n this.shepherdTour.start();\n }\n\n protected _prepareTour(\n originalSteps: ITourStep[],\n finishLabel: string = 'finish'\n ): ITourStep[] {\n // create Subjects for back and forward events\n const backEvent$: Subject<void> = new Subject<void>();\n const forwardEvent$: Subject<void> = new Subject<void>();\n let _backFlow = false;\n // create Subject for your end\n const destroyedEvent$: Subject<void> = new Subject<void>();\n /**\n * This function adds the step progress in the footer of the shepherd tooltip\n */\n const appendProgressFunc = function (this: any): void {\n // get all the footers that are available in the DOM\n const footers: Element[] = Array.from<Element>(\n document.querySelectorAll('.shepherd-footer')\n );\n // get the last footer since Shepherd always puts the active one at the end\n const footer: Element = footers[footers.length - 1];\n // generate steps html element\n const progress: HTMLSpanElement = document.createElement('span');\n progress.className = 'shepherd-progress';\n progress.innerText = `${this.shepherdTour.currentStep.options.count}/${stepTotal}`;\n // insert into the footer before the first button\n footer.insertBefore(progress, footer.querySelector('.shepherd-button'));\n };\n\n let stepTotal = 0;\n const steps: ITourStep[] = originalSteps.map((step: ITourStep) => {\n let showProgress: () => void = () => {\n //\n };\n if (step.attachToOptions?.skipFromStepCount === true) {\n showProgress = function (): void {\n return;\n };\n } else if (\n step.attachToOptions?.skipFromStepCount === undefined ||\n step.attachToOptions?.skipFromStepCount === false\n ) {\n step.count = ++stepTotal;\n showProgress = appendProgressFunc.bind(this);\n }\n return Object.assign({}, step, {\n when: {\n show: showProgress,\n },\n });\n });\n\n const finishButton: TourStepButton = {\n text: finishLabel,\n action: this['finish'].bind(this),\n classes: MAT_BUTTON,\n };\n\n const voidButton: TourStepButton = {\n text: '',\n action(): void {\n return;\n },\n classes: MAT_BUTTON_INVISIBLE,\n };\n\n // listen to the destroyed event to clean up all the streams\n this._destroyedEvent$.pipe(first()).subscribe(() => {\n backEvent$.complete();\n forwardEvent$.complete();\n destroyedEvent$.next();\n destroyedEvent$.complete();\n });\n\n const totalSteps: number = steps.length;\n steps.forEach((step: ITourStep, index: number) => {\n // create buttons specific for the step\n // this is done to create more control on events\n const nextButton: TourStepButton = {\n text: 'chevron_right',\n action: () => {\n // intercept the next action and trigger event\n forwardEvent$.next();\n this.shepherdTour.next();\n },\n classes: MAT_ICON_BUTTON,\n };\n const backButton: TourStepButton = {\n text: 'chevron_left',\n action: () => {\n // intercept the back action and trigger event\n backEvent$.next();\n _backFlow = true;\n // check if 'goBackTo' is set to jump to a particular step, else just go back\n if (step.attachToOptions && step.attachToOptions.goBackTo) {\n this.shepherdTour.show(step.attachToOptions.goBackTo, false);\n } else {\n this.shepherdTour.back();\n }\n },\n classes:\n step.advanceOnOptions?.allowGoBack === false\n ? MAT_BUTTON_INVISIBLE\n : MAT_ICON_BUTTON,\n };\n\n // check if highlight was provided for the step, else fallback into shepherds usage\n step.highlightClass =\n step.attachToOptions && step.attachToOptions.highlight\n ? 'shepherd-highlight'\n : step.highlightClass;\n\n // Adding buttons in the steps if no buttons are defined\n if (!step.buttons || step.buttons.length === 0) {\n if (index === 0) {\n // first step\n step.buttons = [nextButton];\n } else if (index === totalSteps - 1) {\n // last step\n step.buttons = [backButton, finishButton];\n } else {\n step.buttons = [backButton, nextButton];\n }\n }\n\n // checks \"advanceOn\" to override listeners\n let advanceOn: ITourEventOn[] | ITourEventOn = step.advanceOn;\n // remove the shepherd \"advanceOn\" infavor of ours if the event is part of our list\n if (\n (typeof advanceOn === 'object' &&\n !Array.isArray(advanceOn) &&\n advanceOn.event &&\n overriddenEvents.indexOf(advanceOn.event.split('.')[0]) > -1) ||\n advanceOn instanceof Array\n ) {\n step.advanceOn = undefined;\n step.buttons =\n step.advanceOnOptions && step.advanceOnOptions.allowGoBack\n ? [backButton, voidButton]\n : [voidButton];\n }\n // adds a default beforeShowPromise function\n step.beforeShowPromise = () => {\n return new Promise((resolve: (value?: any) => void) => {\n const additionalCapabilitiesSetup: () => void = () => {\n if (advanceOn && !step.advanceOn) {\n if (!Array.isArray(advanceOn)) {\n advanceOn = [advanceOn];\n }\n\n const advanceArr$: Subject<void>[] = [];\n advanceOn.forEach((_: any, i: number) => {\n const advanceEvent$: Subject<void> = new Subject<void>();\n advanceArr$.push(advanceEvent$);\n\n // we start a timer of attempts to find an element in the dom\n this._bindEvent(\n _,\n step.advanceOnOptions,\n advanceEvent$,\n destroyedEvent$\n );\n });\n const advanceSubs: Subscription = forkJoin(...advanceArr$)\n .pipe(takeUntil(merge(destroyedEvent$, backEvent$)))\n .subscribe(() => {\n // check if we need to advance to a specific step, else advance to next step\n if (step.advanceOnOptions && step.advanceOnOptions.jumpTo) {\n this.shepherdTour.show(step.advanceOnOptions.jumpTo);\n } else {\n this.shepherdTour.next();\n }\n forwardEvent$.next();\n advanceSubs.unsubscribe();\n });\n }\n\n // if abortOn was passed on the step, we bind the event and execute complete\n if (step.abortOn) {\n const abortArr$: Subject<void>[] = [];\n step.abortOn.forEach((abortOn: ITourEventOn) => {\n const abortEvent$: Subject<void> = new Subject<void>();\n abortArr$.push(abortEvent$);\n this._bindEvent(\n abortOn,\n undefined,\n abortEvent$,\n destroyedEvent$\n );\n });\n\n const abortSubs: Subscription = merge(...abortArr$)\n .pipe(\n takeUntil(merge(destroyedEvent$, backEvent$, forwardEvent$))\n )\n .subscribe(() => {\n this.shepherdTour.complete();\n abortSubs.unsubscribe();\n });\n }\n };\n\n const _stopTimer$: Subject<void> = new Subject<void>();\n const _retriesReached$: Subject<number> = new Subject<number>();\n const _retryAttempts$: BehaviorSubject<number> =\n new BehaviorSubject<number>(-1);\n\n let id: string | undefined;\n // checks if \"attachTo\" is a string or an object to get the id of an element\n if (typeof step.attachTo === 'string') {\n id = step.attachTo;\n } else if (\n typeof step.attachTo === 'object' &&\n typeof step.attachTo.element === 'string'\n ) {\n id = step.attachTo.element;\n }\n // if we have an id as a string in either case, we use it (we ignore it if its HTMLElement)\n if (id) {\n // if current step is the first step of the tour, we set the buttons to be only \"next\"\n // we had to use `any` since the tour doesnt expose the steps in any fashion nor a way to check if we have modified them at all\n if (\n this.shepherdTour.getCurrentStep() ===\n (<any>this.shepherdTour).steps[0]\n ) {\n this.shepherdTour.getCurrentStep()?.updateStepOptions({\n buttons: originalSteps[index].advanceOn\n ? [voidButton]\n : [nextButton],\n });\n }\n // register to the attempts observable to notify deeveloper when number has been reached\n _retryAttempts$\n .pipe(\n skip(1),\n takeUntil(merge(_stopTimer$.asObservable(), destroyedEvent$)),\n skipWhile((val: number) => {\n if (\n step.attachToOptions &&\n step.attachToOptions.retries !== undefined\n ) {\n return val < step.attachToOptions.retries;\n }\n return val < SHEPHERD_DEFAULT_FIND_ATTEMPTS;\n })\n )\n .subscribe((attempts: number) => {\n _retriesReached$.next(1);\n _retriesReached$.complete();\n // if attempts have been reached, we check \"skipIfNotFound\" to move on to the next step\n if (\n step.attachToOptions &&\n step.attachToOptions.skipIfNotFound\n ) {\n // if we get to this step coming back from a step and it wasnt found\n // then we either check if its the first step and try going forward\n // or we keep going back until we find a step that actually exists\n if (_backFlow) {\n if (\n (<any>this.shepherdTour).steps.indexOf(\n this.shepherdTour.getCurrentStep()\n ) === 0\n ) {\n this.shepherdTour.next();\n } else {\n this.shepherdTour.back();\n }\n _backFlow = false;\n } else {\n // destroys current step if we need to skip it to remove it from the tour\n const currentStep = this.shepherdTour.getCurrentStep();\n currentStep?.destroy();\n this.shepherdTour.next();\n this.shepherdTour.removeStep(currentStep?.id ?? '');\n }\n } else if (step.attachToOptions && step.attachToOptions.else) {\n // if \"skipIfNotFound\" is not true, then we check if \"else\" has been set to jump to a specific step\n this.shepherdTour.show(step.attachToOptions.else);\n } else {\n // tslint:disable-next-line:no-console\n console.warn(\n `Retries reached trying to find ${id}. Retried ${attempts} times.`\n );\n // else we show the step regardless\n resolve();\n }\n });\n\n // we start a timer of attempts to find an element in the dom\n timer(\n (step.attachToOptions && step.attachToOptions.timeBeforeShow) ||\n SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW,\n (step.attachToOptions && step.attachToOptions.interval) ||\n SHEPHERD_DEFAULT_FIND_INTERVAL\n )\n .pipe(\n // the timer will continue either until we find the element or the number of attempts has been reached\n takeUntil(merge(_stopTimer$, _retriesReached$, destroyedEvent$))\n )\n .subscribe(() => {\n const element = document.querySelector(id ?? '');\n // if the element has been found, we stop the timer and resolve the promise\n if (element) {\n _stopTimer$.next();\n _stopTimer$.complete();\n additionalCapabilitiesSetup();\n resolve();\n } else {\n _retryAttempts$.next(_retryAttempts$.value + 1);\n }\n });\n\n // stop find interval if user stops the tour\n destroyedEvent$.subscribe(() => {\n _stopTimer$.next();\n _stopTimer$.complete();\n _retriesReached$.next(1);\n _retriesReached$.complete();\n });\n } else {\n // resolve observable until the timeBeforeShow has passsed or use default\n timer(\n (step.attachToOptions && step.attachToOptions.timeBeforeShow) ||\n SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW\n )\n .pipe(takeUntil(merge(destroyedEvent$)))\n .subscribe(() => {\n resolve();\n });\n }\n });\n };\n });\n return steps;\n }\n\n private _bindEvent(\n eventOn: ITourEventOn,\n eventOnOptions: ITourEventOnOptions | undefined,\n event$: Subject<void>,\n destroyedEvent$: Subject<void>\n ): void {\n const selector = eventOn.selector ?? '';\n const event = eventOn.event;\n // we start a timer of attempts to find an element in the dom\n const timerSubs: Subscription = timer(\n (eventOnOptions && eventOnOptions.timeBeforeShow) ||\n SHEPHERD_DEFAULT_FIND_TIME_BEFORE_SHOW,\n (eventOnOptions && eventOnOptions.interval) ||\n SHEPHERD_DEFAULT_FIND_INTERVAL\n )\n .pipe(takeUntil(destroyedEvent$))\n .subscribe(() => {\n const element = document.querySelector(selector);\n // if the element has been found, we stop the timer and resolve the promise\n if (element) {\n timerSubs.unsubscribe();\n\n if (event === ITourEvent.added) {\n // if event is \"Added\" trigger a soon as this is attached.\n event$.next();\n event$.complete();\n } else if (\n event === ITourEvent.click ||\n event === ITourEvent.pointerover ||\n (event && event.indexOf(ITourEvent.keyup) > -1)\n ) {\n // we use normal listeners for mouseevents\n const mainEvent = event?.split('.')[0];\n const subEvent = event?.split('.')[1];\n fromEvent(element, mainEvent)\n .pipe(\n takeUntil(merge(event$.asObservable(), destroyedEvent$)),\n filter(($event: Event) => {\n // only trigger if the event is a keyboard event and part of out list\n if ($event instanceof KeyboardEvent) {\n if (keyEvents.get($event.keyCode) === subEvent) {\n return true;\n }\n return false;\n } else {\n return true;\n }\n })\n )\n .subscribe(() => {\n event$.next();\n event$.complete();\n });\n } else if (event === ITourEvent.removed) {\n // and we will use MutationObserver for DOM events\n const observer: MutationObserver = new MutationObserver(() => {\n if (!document.body.contains(element)) {\n event$.next();\n event$.complete();\n observer.disconnect();\n }\n });\n\n // stop listenining if tour is closed\n destroyedEvent$.subscribe(() => {\n observer.disconnect();\n });\n // observe for any DOM interaction in the element\n observer.observe(element, {\n childList: true,\n subtree: true,\n attributes: true,\n });\n }\n }\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport {\n Router,\n ActivatedRoute,\n ParamMap,\n NavigationExtras,\n NavigationStart,\n Event as NavigationEvent,\n} from '@angular/router';\nimport Shepherd from 'shepherd.js';\nimport { tap, map, filter } from 'rxjs/operators';\nimport { Observable, fromEvent } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport {\n CovalentGuidedTour,\n ITourStep,\n ITourOptions,\n TourStepButton,\n} from './guided.tour';\n\nexport interface IGuidedTour extends ITourOptions {\n steps: IGuidedTourStep[];\n finishButtonText?: string;\n}\n\nexport interface IGuidedTourStep extends ITourStep {\n routing?: {\n route: string;\n extras?: NavigationExtras;\n };\n}\n\n/**\n * Router enabled Shepherd tour\n */\nexport enum TourEvents {\n complete = 'complete',\n cancel = 'cancel',\n hide = 'hide',\n show = 'show',\n start = 'start',\n active = 'active',\n inactive = 'inactive',\n}\n\nexport interface IGuidedTourEvent {\n step: any;\n previous: any;\n tour: any;\n}\n\n@Injectable()\nexport class CovalentGuidedTourService extends CovalentGuidedTour {\n private _toursMap: Map<string, IGuidedTour> = new Map<string, IGuidedTour>();\n private _tourStepURLs: Map<string, string> = new Map<string, string>();\n constructor(\n private _router: Router,\n private _route: ActivatedRoute,\n private _httpClient: HttpClient\n ) {\n super();\n _router.events\n .pipe(\n filter(\n (event: NavigationEvent) =>\n event instanceof NavigationStart &&\n event.navigationTrigger === 'popstate'\n )\n )\n .subscribe(() => {\n if (this.shepherdTour.isActive()) {\n this.shepherdTour.cancel();\n }\n });\n }\n\n tourEvent$(str: TourEvents): Observable<IGuidedTourEvent> {\n return fromEvent(this.shepherdTour, str);\n }\n\n async registerTour(\n tourName: string,\n tour: IGuidedTour | string\n ): Promise<void> {\n const guidedTour: IGuidedTour =\n typeof tour === 'string' ? await this._loadTour(tour) : tour;\n this._toursMap.set(tourName, guidedTour);\n }\n\n startTour(tourName: string): Shepherd.Tour | undefined {\n const guidedTour = this._getTour(tourName);\n this.finish();\n if (guidedTour && guidedTour.steps && guidedTour.steps.length) {\n // remove steps from tour since we need to preprocess them first\n this.newTour(Object.assign({}, guidedTour, { steps: undefined }));\n const tourInstance: Shepherd.Tour = this.shepherdTour.addSteps(\n this._configureRoutesForSteps(\n this._prepareTour(guidedTour.steps, guidedTour.finishButtonText)\n )\n );\n // init route transition if step URL is different then the current location.\n this.tourEvent$(TourEvents.show).subscribe(\n (tourEvent: IGuidedTourEvent) => {\n const currentURL: string = this._router.url.split(/[?#]/)[0];\n const {\n step: { id, options },\n } = tourEvent;\n if (this._tourStepURLs.has(id)) {\n const stepRoute = this._tourStepURLs.get(id);\n if (stepRoute !== currentURL) {\n this._router.navigate([stepRoute]);\n }\n } else {\n if (options && options.routing) {\n this._tourStepURLs.set(id, options.routing.route);\n } else {\n this._tourStepURLs.set(id, currentURL);\n }\n }\n }\n );\n this.start();\n return tourInstance;\n } else {\n // tslint:disable-next-line:no-console\n console.warn(`Tour ${tourName} does not exist. Please try another tour.`);\n return undefined;\n }\n }\n\n // Finds the right registered tour by using queryParams\n // finishes any other tour and starts the new one.\n initializeOnQueryParams(queryParam: string = 'tour'): Observable<ParamMap> {\n return this._route.queryParamMap.pipe(\n debounceTime(100),\n tap((params: ParamMap) => {\n const tourParam = params.get(queryParam);\n if (tourParam) {\n this.startTour(tourParam);\n // get current search parameters\n const searchParams: URLSearchParams = new URLSearchParams(\n window.location.search\n );\n // delete tour queryParam\n searchParams.delete(queryParam);\n // build new URL string without it\n let url: string =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname;\n if (searchParams.toString()) {\n url += '?' + searchParams.toString();\n }\n // replace state in history without triggering a navigation\n window.history.replaceState({ path: url }, '', url);\n }\n })\n );\n }\n\n setNextBtnDisability(stepId: string, isDisabled: boolean): void {\n if (this.shepherdTour.getById(stepId)) {\n const stepOptions: ITourStep = (this.shepherdTour.getById(stepId) as any)\n .options;\n stepOptions.buttons?.forEach((button: TourStepButton) => {\n if (button.text === 'chevron_right') {\n button.disabled = isDisabled;\n }\n });\n this.shepherdTour.getById(stepId)?.updateStepOptions(stepOptions);\n }\n }\n\n private async _loadTour(tourUrl: string): Promise<any> {\n const request: Observable<object> = this._httpClient.get(tourUrl);\n try {\n return await request\n .pipe(\n map((resultSet: any) => {\n return JSON.parse(JSON.stringify(resultSet));\n })\n )\n .toPromise();\n } catch {\n return undefined;\n }\n }\n\n private _getTour(key: string): IGuidedTour | undefined {\n return this._toursMap.get(key);\n }\n\n private _configureRoutesForSteps(\n routedSteps: IGuidedTourStep[]\n ): IGuidedTourStep[] {\n routedSteps.forEach((step: IGuidedTourStep) => {\n if (step.routing) {\n const route: string = step.routing.route;\n // if there is a beforeShowPromise, then we save it and call it after the navigation\n if (step.beforeShowPromise) {\n const beforeShowPromise: () => Promise<void> = step.beforeShowPromise;\n step.beforeShowPromise = () => {\n return this._router\n .navigate([route], step.routing?.extras)\n .then(() => {\n return beforeShowPromise();\n });\n };\n } else {\n step.beforeShowPromise = () => this._router.navigate([route]);\n }\n }\n });\n\n return routedSteps;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CovalentGuidedTourService } from './guided-tour.service';\n\n@NgModule({\n imports: [CommonModule],\n providers: [CovalentGuidedTourService],\n declarations: [],\n exports: [],\n})\nexport class CovalentGuidedTourModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;IAeY;AAAZ,WAAY,UAAU;IACpB,6BAAiB,CAAA;IACjB,yCAA6B,CAAA;IAC7B,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;AACvB,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAsCD,MAAe,kBAAkB;CAQhC;AAED,MAAM,sCAAsC,GAAG,GAAG,CAAC;AACnD,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAC3C,MAAM,8BAA8B,GAAG,EAAE,CAAC;AAE1C,MAAM,gBAAgB,GAAa;IACjC,UAAU,CAAC,K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EH,OAAO,WAAW,CAAC;KACpB;;sHApKU,yBAAyB;0HAAzB,yBAAyB;2FAAzB,yBAAyB;kBADrC,UAAU;;;MC1CE,wBAAwB;;qHAAxB,wBAAwB;sHAAxB,wBAAwB,YALzB,YAAY;sHAKX,wBAAwB,aAJxB,CAAC,yBAAyB,CAAC,YAD7B,CAAC,YAAY,CAAC;2FAKZ,wBAAwB;kBANpC,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,SAAS,EAAE,CAAC,yBAAyB,CAAC;oBACtC,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,EAAE;iBACZ;;;ACTD;;;;;;"}
@@ -40,7 +40,7 @@ export declare class CovalentGuidedTourService extends CovalentGuidedTour {
40
40
  constructor(_router: Router, _route: ActivatedRoute, _httpClient: HttpClient);
41
41
  tourEvent$(str: TourEvents): Observable<IGuidedTourEvent>;
42
42
  registerTour(tourName: string, tour: IGuidedTour | string): Promise<void>;
43
- startTour(tourName: string): Shepherd.Tour;
43
+ startTour(tourName: string): Shepherd.Tour | undefined;
44
44
  initializeOnQueryParams(queryParam?: string): Observable<ParamMap>;
45
45
  setNextBtnDisability(stepId: string, isDisabled: boolean): void;
46
46
  private _loadTour;
@@ -16,10 +16,8 @@ export interface ITourEventOnOptions {
16
16
  timeBeforeShow?: number;
17
17
  interval?: number;
18
18
  }
19
- export interface ITourAbortOn extends ITourEventOn {
20
- }
21
19
  export interface ITourOptions extends Shepherd.Tour.TourOptions {
22
- abortOn?: ITourAbortOn[];
20
+ abortOn?: ITourEventOn[];
23
21
  }
24
22
  export interface ITourStepAttachToOptions extends ITourEventOnOptions {
25
23
  highlight?: boolean;
@@ -29,8 +27,6 @@ export interface ITourStepAttachToOptions extends ITourEventOnOptions {
29
27
  goBackTo?: string;
30
28
  skipFromStepCount?: boolean;
31
29
  }
32
- export interface ITourStepAdvanceOn extends ITourEventOn {
33
- }
34
30
  export interface ITourStepAdvanceOnOptions extends ITourEventOnOptions {
35
31
  jumpTo?: string;
36
32
  allowGoBack?: boolean;
@@ -38,8 +34,8 @@ export interface ITourStepAdvanceOnOptions extends ITourEventOnOptions {
38
34
  export interface ITourStep extends TourStep {
39
35
  attachToOptions?: ITourStepAttachToOptions;
40
36
  advanceOnOptions?: ITourStepAdvanceOnOptions;
41
- advanceOn?: ITourStepAdvanceOn[] | ITourStepAdvanceOn | any;
42
- abortOn?: ITourAbortOn[];
37
+ advanceOn?: ITourEventOn[] | ITourEventOn | any;
38
+ abortOn?: ITourEventOn[];
43
39
  count?: number;
44
40
  }
45
41
  declare abstract class TourButtonsActions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covalent/guided-tour",
3
- "version": "4.0.0-beta.4",
3
+ "version": "4.1.0-develop.4",
4
4
  "description": "Covalent Guided Tour Module",
5
5
  "keywords": [
6
6
  "angular",
@@ -10,20 +10,15 @@
10
10
  "guide",
11
11
  "guided tour"
12
12
  ],
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/teradata/covalent.git"
16
- },
17
- "bugs": {
18
- "url": "https://github.com/teradata/covalent/issues"
19
- },
20
- "license": "MIT",
21
13
  "peerDependencies": {
22
- "shepherd.js": "^7.1.0",
23
- "@angular/core": "^12.0.0-0 || ^13.0.0-0",
24
- "@angular/common": "^12.0.0-0 || ^13.0.0-0",
25
- "@angular/material": "^12.0.0-0 || ^13.0.0-0",
26
- "@angular/cdk": "^12.0.0-0 || ^13.0.0-0"
14
+ "@angular/common": "^13.2.0",
15
+ "@angular/core": "^13.2.0",
16
+ "shepherd.js": "^9.0.0",
17
+ "@angular/router": "^13.2.0",
18
+ "rxjs": "~7.4.0"
19
+ },
20
+ "dependencies": {
21
+ "tslib": "^2.0.0"
27
22
  },
28
23
  "module": "fesm2015/covalent-guided-tour.mjs",
29
24
  "es2020": "fesm2020/covalent-guided-tour.mjs",
@@ -44,11 +39,5 @@
44
39
  "default": "./fesm2020/covalent-guided-tour.mjs"
45
40
  }
46
41
  },
47
- "sideEffects": false,
48
- "dependencies": {
49
- "tslib": "^2.3.0"
50
- },
51
- "scripts": {
52
- "prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode. This is not allowed.\\nPlease delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.\\n')\" && exit 1"
53
- }
54
- }
42
+ "sideEffects": false
43
+ }
@@ -0,0 +1,3 @@
1
+ export * from './lib/guided-tour.module';
2
+ export * from './lib/guided-tour.service';
3
+ export * from './lib/guided.tour';
File without changes