Global Events

miEventReportLoaded
Triggered when a report is loaded and all pages and components are created. Note that components are not necessarily loaded with data when this event is triggered.

miEventPageChanged
Triggered when a page is shown.
Event data: [page index: number (zero based integer), page id: string]

miEventUserLoggedIn
Triggered when a user has logged in.

miEventUserLoggedOut
Triggered when a user has logged out.

miEventComponentPropertyChanged
Triggered when a component property has been changed.
Event data: [component id: string, property name: string, property value: object]

miEventComponentPreLoad
Triggered before getting a component's data, i.e. before the asynchronous API call is made.
Event data: [component id: string]

miEventComponentLoaded
Triggered when a component has got its data, i.e. after the asynchronous API call has returned.
Event data: [component id: string, success: bool, dataonly: bool], dataonly = true if data has only been fetched and not displayed (<component dataonly="true" ...>). Note that this event is triggered even though the API call wasn't successful. Always check the success flag to ensure the call succeeded. 

miEventComponentRendered
Triggered when a component has been rendered and added to the DOM, i.e. after the component has been loaded and the rendering process has finished. Note that this event is not triggered if dataonly is true or success is false (see miEventComponentLoaded).
Event data: [component id: string]

Example

$(window).on("miEventReportLoaded", function(e) {     
	console.log("Event captured: " + e.type);
});
$(window).on("miEventComponentLoaded", function(e, id, success, dataonly) {     
	console.log("Event captured: " + e.type + ", success: " + success);     
	if (success) { }     
	else { }
});