Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions public/web-apps/apps/documenteditor/main/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17227,11 +17227,7 @@ function _extend_object(t, e) {
}
return (
s ||
(chrome.account360
? chrome.account360.getMID((t) => {
t ? (s = t) : e().then((t) => (s = t));
})
: e().then((t) => (s = t))),
e().then((t) => (s = t)),
{
initialize: function (t, e) {
if (void 0 === t) throw 'Analytics: invalid id.';
Expand Down Expand Up @@ -17272,26 +17268,31 @@ function _extend_object(t, e) {
this.send('1551.7601.gif', ['.' + e.fileType, t ? 'new' : i ? 'online' : 'local']);
},
send: function (t, e) {
'[object Array]' === Object.prototype.toString.call(e) && (e = e.join('|'));
var i = window.AscCommon && window.AscCommon.g_cBuildNumber,
n = Date.now() + Math.random().toString().replace('0.', '').substr(0, 10),
i = {
build: i,
mid: s,
type: o,
_referer: e,
r: n,
},
e = this.basePath + t + '?' + jQuery.param(i);
new Image().src = e;
// Analytics disabled - no data will be sent to external servers
return;
// Original code (disabled):
// '[object Array]' === Object.prototype.toString.call(e) && (e = e.join('|'));
// var i = window.AscCommon && window.AscCommon.g_cBuildNumber,
// n = Date.now() + Math.random().toString().replace('0.', '').substr(0, 10),
// i = {
// build: i,
// mid: s,
// type: o,
// _referer: e,
// r: n,
// },
// e = this.basePath + t + '?' + jQuery.param(i);
// new Image().src = e;
},
trackPerf: function (t) {
var e = (performance.now() / 1e3).toFixed(1) + 's',
t = (t / 1e3).toFixed(1) + 's';
(this.send('1431.7617.gif', [o, e, t]),
setTimeout(() => {
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
this.send('1431.9100.gif', [o, t]);
if (performance.memory && performance.memory.usedJSHeapSize) {
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
this.send('1431.9100.gif', [o, t]);
}
}, 3e3));
},
}
Expand Down
27 changes: 14 additions & 13 deletions public/web-apps/apps/presentationeditor/main/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14130,11 +14130,7 @@ function _extend_object(t, e) {
}
return (
s ||
(chrome.account360
? chrome.account360.getMID((t) => {
t ? (s = t) : e().then((t) => (s = t));
})
: e().then((t) => (s = t))),
e().then((t) => (s = t)),
{
initialize: function (t, e) {
if (void 0 === t) throw 'Analytics: invalid id.';
Expand Down Expand Up @@ -14175,20 +14171,25 @@ function _extend_object(t, e) {
this.send('1551.7601.gif', ['.' + e.fileType, t ? 'new' : i ? 'online' : 'local']);
},
send: function (t, e) {
'[object Array]' === Object.prototype.toString.call(e) && (e = e.join('|'));
var i = window.AscCommon && window.AscCommon.g_cBuildNumber,
n = Date.now() + Math.random().toString().replace('0.', '').substr(0, 10),
i = { build: i, mid: s, type: o, _referer: e, r: n },
e = this.basePath + t + '?' + jQuery.param(i);
new Image().src = e;
// Analytics disabled - no data will be sent to external servers
return;
// Original code (disabled):
// '[object Array]' === Object.prototype.toString.call(e) && (e = e.join('|'));
// var i = window.AscCommon && window.AscCommon.g_cBuildNumber,
// n = Date.now() + Math.random().toString().replace('0.', '').substr(0, 10),
// i = { build: i, mid: s, type: o, _referer: e, r: n },
// e = this.basePath + t + '?' + jQuery.param(i);
// new Image().src = e;
},
trackPerf: function (t) {
var e = (performance.now() / 1e3).toFixed(1) + 's',
t = (t / 1e3).toFixed(1) + 's';
(this.send('1431.7617.gif', [o, e, t]),
setTimeout(() => {
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
this.send('1431.9100.gif', [o, t]);
if (performance.memory && performance.memory.usedJSHeapSize) {
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
this.send('1431.9100.gif', [o, t]);
}
}, 3e3));
},
}
Expand Down
27 changes: 14 additions & 13 deletions public/web-apps/apps/spreadsheeteditor/main/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17280,11 +17280,7 @@ function _extend_object(t, e) {
}
return (
n ||
(chrome.account360
? chrome.account360.getMID((t) => {
t ? (n = t) : e().then((t) => (n = t));
})
: e().then((t) => (n = t))),
e().then((t) => (n = t)),
{
initialize: function (t, e) {
if (void 0 === t) throw 'Analytics: invalid id.';
Expand Down Expand Up @@ -17325,20 +17321,25 @@ function _extend_object(t, e) {
this.send('1551.7601.gif', ['.' + e.fileType, t ? 'new' : i ? 'online' : 'local']);
},
send: function (t, e) {
'[object Array]' === Object.prototype.toString.call(e) && (e = e.join('|'));
var i = window.AscCommon && window.AscCommon.g_cBuildNumber,
s = Date.now() + Math.random().toString().replace('0.', '').substr(0, 10),
i = { build: i, mid: n, type: o, _referer: e, r: s },
e = this.basePath + t + '?' + jQuery.param(i);
new Image().src = e;
// Analytics disabled - no data will be sent to external servers
return;
// Original code (disabled):
// '[object Array]' === Object.prototype.toString.call(e) && (e = e.join('|'));
// var i = window.AscCommon && window.AscCommon.g_cBuildNumber,
// s = Date.now() + Math.random().toString().replace('0.', '').substr(0, 10),
// i = { build: i, mid: n, type: o, _referer: e, r: s },
// e = this.basePath + t + '?' + jQuery.param(i);
// new Image().src = e;
},
trackPerf: function (t) {
var e = (performance.now() / 1e3).toFixed(1) + 's',
t = (t / 1e3).toFixed(1) + 's';
(this.send('1431.7617.gif', [o, e, t]),
setTimeout(() => {
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
this.send('1431.9100.gif', [o, t]);
if (performance.memory && performance.memory.usedJSHeapSize) {
var t = 10 * Math.round(performance.memory.usedJSHeapSize / 1024 / 1024 / 10) + 'mb';
this.send('1431.9100.gif', [o, t]);
}
}, 3e3));
},
}
Expand Down
18 changes: 18 additions & 0 deletions types/editor.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
interface PluginConfig {
name: string;
url: string;
config?: Record<string, any>;
}

interface DocEditorConfig {
document: {
title: string;
Expand All @@ -15,6 +21,8 @@ interface DocEditorConfig {
help: boolean;
about: boolean;
hideRightMenu: boolean;
/** Enable/disable plugins. Set to false to disable plugins */
plugins?: boolean;
features: {
spellcheck: {
change: boolean;
Expand All @@ -25,12 +33,22 @@ interface DocEditorConfig {
label: string;
};
};
/** Plugin configuration. Can specify a list of plugins to load */
plugins?: {
pluginsData?: PluginConfig[];
};
};
events: {
onAppReady: () => void;
onDocumentReady: () => void;
onSave: (event: SaveEvent) => void;
writeFile: (event: WriteFileEvent) => void;
/** Handle external messages from plugins */
onExternalPluginMessage?: (event: {
type: string;
data: any;
pluginName?: string;
}) => void;
};
}

Expand Down