inhabit-module-base
Advanced tools
Comparing version 1.3.7 to 1.3.8
{ | ||
"name": "inhabit-module-base", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"description": "A Base Module class for InHabit.", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -6,3 +6,13 @@ "use strict"; | ||
function InhabitModuleEvents() { | ||
this.interfaceMethod = function interfaceMethod() { | ||
console.log("this is interface method would be implemented later through the core"); | ||
}; | ||
/** | ||
* Configuration that will be passed to the analytics | ||
* @type {{name: string, version: string}} | ||
*/ | ||
this.moduleConfiguration = { | ||
"name":"ModuleName", | ||
"version":"0.0.1" | ||
} | ||
} | ||
@@ -12,6 +22,13 @@ InhabitModuleEvents.prototype = | ||
/** | ||
* Initializes module events, should be called first, before any interactions | ||
* @param {{name: string, version: string}} moduleConfiguration | ||
*/ | ||
init:function (moduleConfiguration) { | ||
this.moduleConfiguration = moduleConfiguration; | ||
}, | ||
/** | ||
* Fire this event when interactive module loaded all required resources and ready to be displayed to user | ||
* this triggers hides general preloader. | ||
*/ | ||
ready: undefined.interfaceMethod, | ||
ready: this.interfaceMethod, | ||
/** | ||
@@ -21,21 +38,19 @@ * In case of any error happens inside interactive, fire this event, this will trigger sequence that will hide current | ||
*/ | ||
error: undefined.interfaceMethod, | ||
error: this.interfaceMethod, | ||
/** | ||
* Fire this event when user started his interaction with you module. This event should be triggered once per lifetime | ||
*/ | ||
interactionStart: undefined.interfaceMethod, | ||
interactionStart: this.interfaceMethod, | ||
/** | ||
* Trigger this event when user starts new sequence in your module. | ||
*/ | ||
cycleStart: undefined.interfaceMethod, | ||
cycleStart: this.interfaceMethod, | ||
/** | ||
* Trigger this event when users completes cycle and about to start new one | ||
*/ | ||
cycleEnd: undefined.interfaceMethod, | ||
cycleEnd: this.interfaceMethod | ||
interfaceMethod: function interfaceMethod() { | ||
console.log("this is interface method would be implemented later through the core"); | ||
} | ||
}; | ||
module.exports = InhabitModuleEvents; |
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
35615
196