@xwiki/cristal-browser-electron 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/default/index.es.js +18 -18
- package/dist/default/index.umd.js +1 -1
- package/dist/default/index.umd.js.map +1 -1
- package/dist/main/index.es.js +18 -18
- package/dist/main/index.umd.js +1 -1
- package/dist/main/index.umd.js.map +1 -1
- package/dist/preload/index.es.js +18 -18
- package/dist/preload/index.umd.js +1 -1
- package/dist/preload/index.umd.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @xwiki/cristal-browser-electron
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Cristal 0.18 Release
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @xwiki/cristal-api@0.18.0
|
|
13
|
+
- @xwiki/cristal-browser-api@0.18.0
|
|
14
|
+
- @xwiki/cristal-electron-state@0.18.0
|
|
15
|
+
|
|
3
16
|
## 0.17.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/default/index.es.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { injectable as
|
|
2
|
-
import { name as
|
|
3
|
-
var
|
|
4
|
-
for (var
|
|
5
|
-
(
|
|
6
|
-
return
|
|
1
|
+
import { injectable as l } from "inversify";
|
|
2
|
+
import { name as i } from "@xwiki/cristal-browser-api";
|
|
3
|
+
var p = Object.getOwnPropertyDescriptor, w = (o, e, c, s) => {
|
|
4
|
+
for (var r = s > 1 ? void 0 : s ? p(e, c) : e, t = o.length - 1, a; t >= 0; t--)
|
|
5
|
+
(a = o[t]) && (r = a(r) || r);
|
|
6
|
+
return r;
|
|
7
7
|
};
|
|
8
|
-
let
|
|
9
|
-
switchLocation(
|
|
10
|
-
this.setLocation(
|
|
8
|
+
let n = class {
|
|
9
|
+
switchLocation(o) {
|
|
10
|
+
this.setLocation(o), browserElectron.reloadBrowser();
|
|
11
11
|
}
|
|
12
12
|
reload() {
|
|
13
13
|
browserElectron.reloadBrowser();
|
|
14
14
|
}
|
|
15
15
|
onClose() {
|
|
16
16
|
}
|
|
17
|
-
setLocation(
|
|
18
|
-
window.localStorage.setItem("currentApp",
|
|
17
|
+
setLocation(o) {
|
|
18
|
+
window.localStorage.setItem("currentApp", o.name), browserElectron.setStorageRoot(o.storageRoot);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
],
|
|
24
|
-
class
|
|
25
|
-
constructor(
|
|
26
|
-
|
|
21
|
+
n = w([
|
|
22
|
+
l()
|
|
23
|
+
], n);
|
|
24
|
+
class g {
|
|
25
|
+
constructor(e) {
|
|
26
|
+
e.bind(i).to(n).inSingletonScope();
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
g as ComponentInit
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("inversify"),require("@xwiki/cristal-browser-api")):typeof define=="function"&&define.amd?define(["exports","inversify","@xwiki/cristal-browser-api"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e.cristal_browser={},e.inversify,e.cristalBrowserApi))})(this,function(e,o,l){"use strict";var p=Object.getOwnPropertyDescriptor,f=(r,t,d,c)=>{for(var n=c>1?void 0:c?p(t,d):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(n=a(n)||n);return n};let i=class{switchLocation(r){this.setLocation(r),browserElectron.reloadBrowser()}reload(){browserElectron.reloadBrowser()}onClose(){}setLocation(r){window.localStorage.setItem("currentApp",r.name),browserElectron.setStorageRoot(r.storageRoot)}};i=f([o.injectable()],i);class w{constructor(t){t.bind(l.name).to(i).inSingletonScope()}}e.ComponentInit=w,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../src/components/browser-api-electron.ts","../../src/componentsInit.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\nimport { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\n\ndeclare const browserElectron: APITypes;\n\n/**\n * Remembers the current location in the locale storage, then reload the\n * browser.\n */\n@injectable()\nexport class BrowserApiElectron implements BrowserApi {\n switchLocation(wikiConfig: WikiConfig): void {\n this.setLocation(wikiConfig);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\n }\n\n onClose(): void {\n // TODO: CRISTAL-429 we did not find a viable implementation to intercept the close action and display a confirm\n // dialog to ask for the user if the confirm closing the page.\n }\n\n setLocation(wikiConfig: WikiConfig): void {\n window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.setStorageRoot(wikiConfig.storageRoot);\n }\n}\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\nimport type { Container } from \"inversify\";\n\nexport class ComponentInit {\n constructor(container: Container) {\n container.bind<BrowserApi>(name).to(BrowserApiElectron).inSingletonScope();\n }\n}\n"],"names":["BrowserApiElectron","wikiConfig","__decorateClass","injectable","ComponentInit","container","name"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../src/components/browser-api-electron.ts","../../src/componentsInit.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\nimport { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\n\ndeclare const browserElectron: APITypes;\n\n/**\n * Remembers the current location in the locale storage, then reload the\n * browser.\n */\n@injectable()\nexport class BrowserApiElectron implements BrowserApi {\n switchLocation(wikiConfig: WikiConfig): void {\n this.setLocation(wikiConfig);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\n }\n\n onClose(): void {\n // TODO: CRISTAL-429 we did not find a viable implementation to intercept the close action and display a confirm\n // dialog to ask for the user if the confirm closing the page.\n }\n\n setLocation(wikiConfig: WikiConfig): void {\n window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.setStorageRoot(wikiConfig.storageRoot);\n }\n}\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\nimport type { Container } from \"inversify\";\n\nexport class ComponentInit {\n constructor(container: Container) {\n container.bind<BrowserApi>(name).to(BrowserApiElectron).inSingletonScope();\n }\n}\n"],"names":["BrowserApiElectron","wikiConfig","__decorateClass","injectable","ComponentInit","container","name"],"mappings":"2fAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,KAAK,YAAYA,CAAU,EAC3B,gBAAgB,cAAc,CAAA,CAGhC,QAAe,CACb,gBAAgB,cAAc,CAAA,CAGhC,SAAgB,CAAA,CAKhB,YAAYA,EAA8B,CACxC,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzC,gBAAA,eAAeA,EAAW,WAAW,CAAA,CAEzD,EAnBaD,EAANE,EAAA,CADNC,EAAW,WAAA,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,EAAI,IAAA,EAAE,GAAGN,CAAkB,EAAE,iBAAiB,CAAA,CAE7E"}
|
package/dist/main/index.es.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { injectable as
|
|
2
|
-
import { name as
|
|
3
|
-
var
|
|
4
|
-
for (var
|
|
5
|
-
(
|
|
6
|
-
return
|
|
1
|
+
import { injectable as l } from "inversify";
|
|
2
|
+
import { name as i } from "@xwiki/cristal-browser-api";
|
|
3
|
+
var p = Object.getOwnPropertyDescriptor, w = (o, e, c, s) => {
|
|
4
|
+
for (var r = s > 1 ? void 0 : s ? p(e, c) : e, t = o.length - 1, a; t >= 0; t--)
|
|
5
|
+
(a = o[t]) && (r = a(r) || r);
|
|
6
|
+
return r;
|
|
7
7
|
};
|
|
8
|
-
let
|
|
9
|
-
switchLocation(
|
|
10
|
-
this.setLocation(
|
|
8
|
+
let n = class {
|
|
9
|
+
switchLocation(o) {
|
|
10
|
+
this.setLocation(o), browserElectron.reloadBrowser();
|
|
11
11
|
}
|
|
12
12
|
reload() {
|
|
13
13
|
browserElectron.reloadBrowser();
|
|
14
14
|
}
|
|
15
15
|
onClose() {
|
|
16
16
|
}
|
|
17
|
-
setLocation(
|
|
18
|
-
window.localStorage.setItem("currentApp",
|
|
17
|
+
setLocation(o) {
|
|
18
|
+
window.localStorage.setItem("currentApp", o.name), browserElectron.setStorageRoot(o.storageRoot);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
],
|
|
24
|
-
class
|
|
25
|
-
constructor(
|
|
26
|
-
|
|
21
|
+
n = w([
|
|
22
|
+
l()
|
|
23
|
+
], n);
|
|
24
|
+
class g {
|
|
25
|
+
constructor(e) {
|
|
26
|
+
e.bind(i).to(n).inSingletonScope();
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
g as ComponentInit
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=index.es.js.map
|
package/dist/main/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("inversify"),require("@xwiki/cristal-browser-api")):typeof define=="function"&&define.amd?define(["exports","inversify","@xwiki/cristal-browser-api"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e.cristal_browser={},e.inversify,e.cristalBrowserApi))})(this,function(e,o,l){"use strict";var p=Object.getOwnPropertyDescriptor,f=(r,t,d,c)=>{for(var n=c>1?void 0:c?p(t,d):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(n=a(n)||n);return n};let i=class{switchLocation(r){this.setLocation(r),browserElectron.reloadBrowser()}reload(){browserElectron.reloadBrowser()}onClose(){}setLocation(r){window.localStorage.setItem("currentApp",r.name),browserElectron.setStorageRoot(r.storageRoot)}};i=f([o.injectable()],i);class w{constructor(t){t.bind(l.name).to(i).inSingletonScope()}}e.ComponentInit=w,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../src/components/browser-api-electron.ts","../../src/componentsInit.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\nimport { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\n\ndeclare const browserElectron: APITypes;\n\n/**\n * Remembers the current location in the locale storage, then reload the\n * browser.\n */\n@injectable()\nexport class BrowserApiElectron implements BrowserApi {\n switchLocation(wikiConfig: WikiConfig): void {\n this.setLocation(wikiConfig);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\n }\n\n onClose(): void {\n // TODO: CRISTAL-429 we did not find a viable implementation to intercept the close action and display a confirm\n // dialog to ask for the user if the confirm closing the page.\n }\n\n setLocation(wikiConfig: WikiConfig): void {\n window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.setStorageRoot(wikiConfig.storageRoot);\n }\n}\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\nimport type { Container } from \"inversify\";\n\nexport class ComponentInit {\n constructor(container: Container) {\n container.bind<BrowserApi>(name).to(BrowserApiElectron).inSingletonScope();\n }\n}\n"],"names":["BrowserApiElectron","wikiConfig","__decorateClass","injectable","ComponentInit","container","name"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../src/components/browser-api-electron.ts","../../src/componentsInit.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\nimport { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\n\ndeclare const browserElectron: APITypes;\n\n/**\n * Remembers the current location in the locale storage, then reload the\n * browser.\n */\n@injectable()\nexport class BrowserApiElectron implements BrowserApi {\n switchLocation(wikiConfig: WikiConfig): void {\n this.setLocation(wikiConfig);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\n }\n\n onClose(): void {\n // TODO: CRISTAL-429 we did not find a viable implementation to intercept the close action and display a confirm\n // dialog to ask for the user if the confirm closing the page.\n }\n\n setLocation(wikiConfig: WikiConfig): void {\n window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.setStorageRoot(wikiConfig.storageRoot);\n }\n}\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\nimport type { Container } from \"inversify\";\n\nexport class ComponentInit {\n constructor(container: Container) {\n container.bind<BrowserApi>(name).to(BrowserApiElectron).inSingletonScope();\n }\n}\n"],"names":["BrowserApiElectron","wikiConfig","__decorateClass","injectable","ComponentInit","container","name"],"mappings":"2fAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,KAAK,YAAYA,CAAU,EAC3B,gBAAgB,cAAc,CAAA,CAGhC,QAAe,CACb,gBAAgB,cAAc,CAAA,CAGhC,SAAgB,CAAA,CAKhB,YAAYA,EAA8B,CACxC,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzC,gBAAA,eAAeA,EAAW,WAAW,CAAA,CAEzD,EAnBaD,EAANE,EAAA,CADNC,EAAW,WAAA,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,EAAI,IAAA,EAAE,GAAGN,CAAkB,EAAE,iBAAiB,CAAA,CAE7E"}
|
package/dist/preload/index.es.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { injectable as
|
|
2
|
-
import { name as
|
|
3
|
-
var
|
|
4
|
-
for (var
|
|
5
|
-
(
|
|
6
|
-
return
|
|
1
|
+
import { injectable as l } from "inversify";
|
|
2
|
+
import { name as i } from "@xwiki/cristal-browser-api";
|
|
3
|
+
var p = Object.getOwnPropertyDescriptor, w = (o, e, c, s) => {
|
|
4
|
+
for (var r = s > 1 ? void 0 : s ? p(e, c) : e, t = o.length - 1, a; t >= 0; t--)
|
|
5
|
+
(a = o[t]) && (r = a(r) || r);
|
|
6
|
+
return r;
|
|
7
7
|
};
|
|
8
|
-
let
|
|
9
|
-
switchLocation(
|
|
10
|
-
this.setLocation(
|
|
8
|
+
let n = class {
|
|
9
|
+
switchLocation(o) {
|
|
10
|
+
this.setLocation(o), browserElectron.reloadBrowser();
|
|
11
11
|
}
|
|
12
12
|
reload() {
|
|
13
13
|
browserElectron.reloadBrowser();
|
|
14
14
|
}
|
|
15
15
|
onClose() {
|
|
16
16
|
}
|
|
17
|
-
setLocation(
|
|
18
|
-
window.localStorage.setItem("currentApp",
|
|
17
|
+
setLocation(o) {
|
|
18
|
+
window.localStorage.setItem("currentApp", o.name), browserElectron.setStorageRoot(o.storageRoot);
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
],
|
|
24
|
-
class
|
|
25
|
-
constructor(
|
|
26
|
-
|
|
21
|
+
n = w([
|
|
22
|
+
l()
|
|
23
|
+
], n);
|
|
24
|
+
class g {
|
|
25
|
+
constructor(e) {
|
|
26
|
+
e.bind(i).to(n).inSingletonScope();
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
g as ComponentInit
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(e,
|
|
1
|
+
(function(e,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("inversify"),require("@xwiki/cristal-browser-api")):typeof define=="function"&&define.amd?define(["exports","inversify","@xwiki/cristal-browser-api"],o):(e=typeof globalThis<"u"?globalThis:e||self,o(e.cristal_browser={},e.inversify,e.cristalBrowserApi))})(this,function(e,o,l){"use strict";var p=Object.getOwnPropertyDescriptor,f=(r,t,d,c)=>{for(var n=c>1?void 0:c?p(t,d):t,s=r.length-1,a;s>=0;s--)(a=r[s])&&(n=a(n)||n);return n};let i=class{switchLocation(r){this.setLocation(r),browserElectron.reloadBrowser()}reload(){browserElectron.reloadBrowser()}onClose(){}setLocation(r){window.localStorage.setItem("currentApp",r.name),browserElectron.setStorageRoot(r.storageRoot)}};i=f([o.injectable()],i);class w{constructor(t){t.bind(l.name).to(i).inSingletonScope()}}e.ComponentInit=w,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../src/components/browser-api-electron.ts","../../src/componentsInit.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\nimport { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\n\ndeclare const browserElectron: APITypes;\n\n/**\n * Remembers the current location in the locale storage, then reload the\n * browser.\n */\n@injectable()\nexport class BrowserApiElectron implements BrowserApi {\n switchLocation(wikiConfig: WikiConfig): void {\n this.setLocation(wikiConfig);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\n }\n\n onClose(): void {\n // TODO: CRISTAL-429 we did not find a viable implementation to intercept the close action and display a confirm\n // dialog to ask for the user if the confirm closing the page.\n }\n\n setLocation(wikiConfig: WikiConfig): void {\n window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.setStorageRoot(wikiConfig.storageRoot);\n }\n}\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\nimport type { Container } from \"inversify\";\n\nexport class ComponentInit {\n constructor(container: Container) {\n container.bind<BrowserApi>(name).to(BrowserApiElectron).inSingletonScope();\n }\n}\n"],"names":["BrowserApiElectron","wikiConfig","__decorateClass","injectable","ComponentInit","container","name"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../src/components/browser-api-electron.ts","../../src/componentsInit.ts"],"sourcesContent":["/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\nimport { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\n\ndeclare const browserElectron: APITypes;\n\n/**\n * Remembers the current location in the locale storage, then reload the\n * browser.\n */\n@injectable()\nexport class BrowserApiElectron implements BrowserApi {\n switchLocation(wikiConfig: WikiConfig): void {\n this.setLocation(wikiConfig);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\n }\n\n onClose(): void {\n // TODO: CRISTAL-429 we did not find a viable implementation to intercept the close action and display a confirm\n // dialog to ask for the user if the confirm closing the page.\n }\n\n setLocation(wikiConfig: WikiConfig): void {\n window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.setStorageRoot(wikiConfig.storageRoot);\n }\n}\n","/*\n * See the LICENSE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation; either version 2.1 of\n * the License, or (at your option) any later version.\n *\n * This software is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this software; if not, write to the Free\n * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n */\n\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\nimport type { Container } from \"inversify\";\n\nexport class ComponentInit {\n constructor(container: Container) {\n container.bind<BrowserApi>(name).to(BrowserApiElectron).inSingletonScope();\n }\n}\n"],"names":["BrowserApiElectron","wikiConfig","__decorateClass","injectable","ComponentInit","container","name"],"mappings":"2fAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,KAAK,YAAYA,CAAU,EAC3B,gBAAgB,cAAc,CAAA,CAGhC,QAAe,CACb,gBAAgB,cAAc,CAAA,CAGhC,SAAgB,CAAA,CAKhB,YAAYA,EAA8B,CACxC,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzC,gBAAA,eAAeA,EAAW,WAAW,CAAA,CAEzD,EAnBaD,EAANE,EAAA,CADNC,EAAW,WAAA,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,EAAI,IAAA,EAAE,GAAGN,CAAkB,EAAE,iBAAiB,CAAA,CAE7E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-browser-electron",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"license": "LGPL 2.1",
|
|
5
5
|
"author": "XWiki Org Community <contact@xwiki.org>",
|
|
6
6
|
"homepage": "https://cristal.xwiki.org/",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
},
|
|
33
33
|
"main": "./dist/main/index.es.js",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"inversify": "7.5.
|
|
36
|
-
"@xwiki/cristal-
|
|
37
|
-
"@xwiki/cristal-api": "0.
|
|
38
|
-
"@xwiki/cristal-
|
|
35
|
+
"inversify": "7.5.1",
|
|
36
|
+
"@xwiki/cristal-api": "0.18.0",
|
|
37
|
+
"@xwiki/cristal-browser-api": "0.18.0",
|
|
38
|
+
"@xwiki/cristal-electron-state": "0.18.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"electron": "
|
|
41
|
+
"electron": "36.0.0",
|
|
42
42
|
"reflect-metadata": "0.2.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"reflect-metadata": "0.2.2",
|
|
46
|
-
"typescript": "5.8.
|
|
47
|
-
"vite": "6.
|
|
48
|
-
"@xwiki/cristal-dev-config": "0.
|
|
46
|
+
"typescript": "5.8.3",
|
|
47
|
+
"vite": "6.3.5",
|
|
48
|
+
"@xwiki/cristal-dev-config": "0.18.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsc --project tsconfig.json && vite build && vite build -c vite.preload.config.ts && vite build -c vite.main.config.ts",
|