angular-custom-tour
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"license": "MIT", | ||
@@ -11,0 +11,0 @@ "main": "bundles/angular-custom-tour.umd.min.js", |
import { HintService } from './hint.service'; | ||
export declare class MmHintComponent { | ||
export declare class HintComponent { | ||
hintService: HintService; | ||
@@ -4,0 +4,0 @@ show: boolean; |
@@ -13,4 +13,4 @@ "use strict"; | ||
var core_1 = require('@angular/core'); | ||
var MmHintComponent = (function () { | ||
function MmHintComponent(hintService) { | ||
var HintComponent = (function () { | ||
function HintComponent(hintService) { | ||
var _this = this; | ||
@@ -20,12 +20,12 @@ this.hintService = hintService; | ||
} | ||
MmHintComponent = __decorate([ | ||
HintComponent = __decorate([ | ||
core_1.Component({ | ||
selector: 'fwyl-hint', | ||
selector: 'hint', | ||
template: "<div class=\"hint-overlay\" *ngIf=\"show\"></div>", | ||
}), | ||
__metadata('design:paramtypes', [hint_service_1.HintService]) | ||
], MmHintComponent); | ||
return MmHintComponent; | ||
], HintComponent); | ||
return HintComponent; | ||
}()); | ||
exports.MmHintComponent = MmHintComponent; | ||
exports.HintComponent = HintComponent; | ||
//# sourceMappingURL=hint.component.js.map |
import { Subject } from 'rxjs/Subject'; | ||
import { MmTourComponent } from './intro-tour/tour.component'; | ||
import { TourComponent } from './intro-tour/tour.component'; | ||
import { HintOptions } from './options'; | ||
@@ -13,3 +13,3 @@ export interface Step { | ||
anchors: { | ||
[selector: string]: MmTourComponent; | ||
[selector: string]: TourComponent; | ||
}; | ||
@@ -45,5 +45,5 @@ overlay$: Subject<boolean>; | ||
* @param {string} selector binded to | ||
* @param {MmTourComponent} component itself | ||
* @param {TourComponent} component itself | ||
*/ | ||
register(selector: string, component: MmTourComponent): void; | ||
register(selector: string, component: TourComponent): void; | ||
/** | ||
@@ -50,0 +50,0 @@ * Is {Step} this.currentStep has next |
@@ -76,3 +76,3 @@ "use strict"; | ||
* @param {string} selector binded to | ||
* @param {MmTourComponent} component itself | ||
* @param {TourComponent} component itself | ||
*/ | ||
@@ -79,0 +79,0 @@ HintService.prototype.register = function (selector, component) { |
import { HintService } from './hint.service'; | ||
import { ModuleWithProviders } from '@angular/core'; | ||
export declare class MmHintModule { | ||
export declare class HintModule { | ||
static forRoot(): ModuleWithProviders; | ||
} | ||
export { HintService }; |
@@ -17,8 +17,8 @@ "use strict"; | ||
var tour_component_1 = require('./intro-tour/tour.component'); | ||
var MmHintModule = (function () { | ||
function MmHintModule() { | ||
var HintModule = (function () { | ||
function HintModule() { | ||
} | ||
MmHintModule.forRoot = function () { | ||
HintModule.forRoot = function () { | ||
return { | ||
ngModule: MmHintModule, | ||
ngModule: HintModule, | ||
providers: [ | ||
@@ -29,14 +29,14 @@ hint_service_1.HintService, | ||
}; | ||
MmHintModule = __decorate([ | ||
HintModule = __decorate([ | ||
core_1.NgModule({ | ||
declarations: [hint_component_1.MmHintComponent, tour_component_1.MmTourComponent], | ||
exports: [hint_component_1.MmHintComponent, tour_component_1.MmTourComponent], | ||
declarations: [hint_component_1.HintComponent, tour_component_1.TourComponent], | ||
exports: [hint_component_1.HintComponent, tour_component_1.TourComponent], | ||
imports: [common_1.CommonModule], | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], MmHintModule); | ||
return MmHintModule; | ||
], HintModule); | ||
return HintModule; | ||
}()); | ||
exports.MmHintModule = MmHintModule; | ||
exports.HintModule = HintModule; | ||
; | ||
//# sourceMappingURL=index.js.map |
import { OnInit } from '@angular/core'; | ||
import { HintService } from '../hint.service'; | ||
export declare class MmTourComponent implements OnInit { | ||
export declare class TourComponent implements OnInit { | ||
hintService: HintService; | ||
@@ -5,0 +5,0 @@ title: string; |
@@ -14,10 +14,10 @@ "use strict"; | ||
var variables_1 = require('../variables'); | ||
var MmTourComponent = (function () { | ||
function MmTourComponent(hintService) { | ||
var TourComponent = (function () { | ||
function TourComponent(hintService) { | ||
this.hintService = hintService; | ||
} | ||
MmTourComponent.prototype.ngOnInit = function () { | ||
TourComponent.prototype.ngOnInit = function () { | ||
this.hintService.register(this.selector, this); | ||
}; | ||
MmTourComponent.prototype.showStep = function () { | ||
TourComponent.prototype.showStep = function () { | ||
this.position = this.position || this.hintService.hintOptions.defaultPosition; | ||
@@ -62,3 +62,3 @@ this.order = +this.order || this.hintService.hintOptions.defaultOrder; | ||
}; | ||
MmTourComponent.prototype.hideStep = function () { | ||
TourComponent.prototype.hideStep = function () { | ||
var highlightedElement = document.getElementById(this.selector); | ||
@@ -68,14 +68,14 @@ highlightedElement.style.zIndex = '0'; | ||
}; | ||
MmTourComponent.prototype.exit = function () { | ||
TourComponent.prototype.exit = function () { | ||
this.hintService.end(); | ||
}; | ||
MmTourComponent.prototype.next = function () { | ||
TourComponent.prototype.next = function () { | ||
this.hideStep(); | ||
this.hintService.showNext(); | ||
}; | ||
MmTourComponent.prototype.prev = function () { | ||
TourComponent.prototype.prev = function () { | ||
this.hideStep(); | ||
this.hintService.showPrev(); | ||
}; | ||
MmTourComponent.prototype.disableClick = function (element) { | ||
TourComponent.prototype.disableClick = function (element) { | ||
element.classList.add('hint-disabled'); | ||
@@ -86,25 +86,25 @@ }; | ||
__metadata('design:type', String) | ||
], MmTourComponent.prototype, "title", void 0); | ||
], TourComponent.prototype, "title", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', String) | ||
], MmTourComponent.prototype, "selector", void 0); | ||
], TourComponent.prototype, "selector", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', Number) | ||
], MmTourComponent.prototype, "order", void 0); | ||
], TourComponent.prototype, "order", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata('design:type', String) | ||
], MmTourComponent.prototype, "position", void 0); | ||
MmTourComponent = __decorate([ | ||
], TourComponent.prototype, "position", void 0); | ||
TourComponent = __decorate([ | ||
core_1.Component({ | ||
selector: variables_1.HintConfig.HINT_TAG, | ||
templateUrl: 'tour.html', | ||
template: "<div class=\"intro-tour-hint-wrapper {{transformClass}}\" *ngIf=\"showme\" [ngStyle]=\"{'top': topPos+'px', 'left': leftPos+'px'}\" >\n <div class=\"header\" *ngIf=\"title\">{{title}}</div>\n <div class=\"content\"><ng-content></ng-content></div>\n <div class=\"footer\">\n <a class=\"navigate-btn\" *ngIf=\"hasPrev\" (click)=\"prev()\"> << </a>\n <a class=\"navigate-btn\" *ngIf=\"hasNext\" (click)=\"next()\"> >> </a>\n <a class=\"navigate-btn\" (click)=\"exit()\"> X </a>\n </div>\n </div>", | ||
}), | ||
__metadata('design:paramtypes', [hint_service_1.HintService]) | ||
], MmTourComponent); | ||
return MmTourComponent; | ||
], TourComponent); | ||
return TourComponent; | ||
}()); | ||
exports.MmTourComponent = MmTourComponent; | ||
exports.TourComponent = TourComponent; | ||
//# sourceMappingURL=tour.component.js.map |
"use strict"; | ||
// tslint:disable-next-line:variable-name | ||
exports.HintConfig = { | ||
HINT_TAG: 'fwyl-intro-tour', | ||
HINT_TAG: 'tour-step', | ||
DEFAULT_POSITION: 'bottom', | ||
@@ -6,0 +6,0 @@ Z_INDEX: '999', |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33286
574