File tree Expand file tree Collapse file tree 5 files changed +13
-14
lines changed
shepherd-tester/src/app/shepherd Expand file tree Collapse file tree 5 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ at the app level ensures you only create one instance of Shepherd.**
6262In that component you will want to use ` AfterViewInit ` to ` addSteps ` to the Shepherd service.
6363
6464``` typescript
65- import { Component , AfterViewInit } from ' @angular/core' ;
65+ import { Component , type AfterViewInit } from ' @angular/core' ;
6666import { ShepherdService } from ' angular-shepherd' ;
6767import { steps as defaultSteps , defaultStepOptions } from ' ../data' ;
6868
Original file line number Diff line number Diff line change 1- import { Component , AfterViewInit } from '@angular/core' ;
1+ import { Component , type AfterViewInit } from '@angular/core' ;
22import { ShepherdService } from '../../../../shepherd/src/lib/shepherd.service' ;
3- import { steps as defaultSteps , defaultStepOptions } from '../data' ;
3+ import { steps as defaultSteps , defaultStepOptions } from '../data' ;
44
55@Component ( {
66 selector : 'app-shepherd' ,
77 templateUrl : './shepherd.component.html' ,
88 styleUrls : [ './shepherd.component.css' ] ,
9- standalone : true ,
9+ standalone : true
1010} )
1111export class ShepherdComponent implements AfterViewInit {
12-
13- constructor ( private shepherdService : ShepherdService ) { }
12+ constructor ( private shepherdService : ShepherdService ) { }
1413
1514 ngAfterViewInit ( ) {
1615 this . shepherdService . defaultStepOptions = defaultStepOptions ;
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ at the app level ensures you only create one instance of Shepherd.**
5959In that component you will want to use ` AfterViewInit ` to ` addSteps ` to the Shepherd service.
6060
6161``` typescript
62- import { Component , AfterViewInit } from ' @angular/core' ;
62+ import { Component , type AfterViewInit } from ' @angular/core' ;
6363import { ShepherdService } from ' angular-shepherd' ;
6464import { steps as defaultSteps , defaultStepOptions } from ' ../data' ;
6565
Original file line number Diff line number Diff line change 11import { Injectable } from '@angular/core' ;
2- import { Tour , type TourOptions , type StepOptions } from 'shepherd.js' ;
2+ import Shepherd , {
3+ type TourOptions ,
4+ type StepOptions ,
5+ type Tour
6+ } from 'shepherd.js' ;
37import { elementIsHidden } from './utils/dom' ;
48import { makeButton } from './utils/buttons' ;
59
@@ -151,7 +155,7 @@ export class ShepherdService {
151155 * Initializes the tour, creates a new Shepherd.Tour. sets options, and binds events
152156 */
153157 private _initialize ( ) {
154- const tourObject = new Tour ( {
158+ const tourObject = new Shepherd . Tour ( {
155159 confirmCancel : this . confirmCancel ,
156160 confirmCancelMessage : this . confirmCancelMessage ,
157161 defaultStepOptions : this . defaultStepOptions ,
@@ -164,6 +168,6 @@ export class ShepherdService {
164168 tourObject . on ( 'complete' , this . onTourFinish . bind ( this , 'complete' ) ) ;
165169 tourObject . on ( 'cancel' , this . onTourFinish . bind ( this , 'cancel' ) ) ;
166170
167- this . tourObject = tourObject as Tour ;
171+ this . tourObject = tourObject ;
168172 }
169173}
Original file line number Diff line number Diff line change 99 "esModuleInterop" : true ,
1010 "experimentalDecorators" : true ,
1111 "importHelpers" : true ,
12- "inlineSourceMap" : true ,
13- "inlineSources" : true ,
1412 "lib" : [" es2018" , " dom" ],
1513 "module" : " ESNext" ,
1614 "moduleResolution" : " bundler" ,
2119 // We don't want to include types dependencies in our compiled output, so tell TypeScript
2220 // to enforce using `import type` instead of `import` for Types.
2321 "verbatimModuleSyntax" : true ,
24- "allowJs" : true ,
2522 "strict" : true ,
26- "noUncheckedIndexedAccess" : true
2723 }
2824}
You can’t perform that action at this time.
0 commit comments