Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordizzy <diosmosis@users.noreply.github.com>2021-10-08 08:55:23 +0300
committerGitHub <noreply@github.com>2021-10-08 08:55:23 +0300
commit61f6b2da14fdb2c93c2106a2a6f008f4716f26ee (patch)
treebf4b58bcbdd050089cf9628c7e373434aed0c14f /plugins/CoreVue/types/index.d.ts
parent52caa6e3bcfe4b9d66cf42825f5523510664c53e (diff)
[Vue] Migrate ajaxHelper.ts + piwik-url service (#18104)
Diffstat (limited to 'plugins/CoreVue/types/index.d.ts')
-rw-r--r--plugins/CoreVue/types/index.d.ts60
1 files changed, 60 insertions, 0 deletions
diff --git a/plugins/CoreVue/types/index.d.ts b/plugins/CoreVue/types/index.d.ts
index 733b7ab13f..3291b42ad8 100644
--- a/plugins/CoreVue/types/index.d.ts
+++ b/plugins/CoreVue/types/index.d.ts
@@ -1,8 +1,68 @@
interface PiwikGlobal {
timezoneOffset: number;
addCustomPeriod: <T>(name: string, periodClass: T) => void;
+ shouldPropagateTokenAuth: boolean;
+ token_auth: string;
+ idSite: string|number;
+ period: string;
+ currentDateString: string;
}
let piwik: PiwikGlobal;
function _pk_translate(translationStringId: string, values: string[]): string;
+
+/**
+ * global ajax queue
+ *
+ * @type {Array} array holding XhrRequests with automatic cleanup
+ */
+interface GlobalAjaxQueue extends Array<XMLHttpRequest|null> {
+ active:number;
+
+ /**
+ * Removes all finished requests from the queue.
+ *
+ * @return {void}
+ */
+ clean();
+
+ /**
+ * Extend Array.push with automatic cleanup for finished requests
+ *
+ * @return {Object}
+ */
+ push();
+
+ /**
+ * Extend with abort function to abort all queued requests
+ *
+ * @return {void}
+ */
+ abort();
+}
+
+interface Window {
+ globalAjaxQueue: GlobalAjaxQueue;
+}
+
+interface PiwikPopoverGlobal {
+ isOpen();
+}
+
+let Piwik_Popover: PiwikPopoverGlobal;
+
+interface PiwikHelperGlobal {
+ escape(text: string): string;
+ redirect(params: any);
+}
+
+let piwikHelper: PiwikHelperGlobal;
+
+interface BroadcastGlobal {
+ getValueFromUrl(paramName: string, url?: string): string;
+ getValueFromHash(paramName: string, url?: string): string;
+ isWidgetizeRequestWithoutSession(): boolean;
+}
+
+let broadcast: BroadcastGlobal;