@xwiki/cristal-browser-electron 0.10.0 → 0.12.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 CHANGED
@@ -1,5 +1,29 @@
1
1
  # @xwiki/cristal-browser-electron
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 681a9b7: Cristal 0.12 Release
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [681a9b7]
12
+ - @xwiki/cristal-api@0.12.0
13
+ - @xwiki/cristal-browser-api@0.12.0
14
+
15
+ ## 0.11.0
16
+
17
+ ### Minor Changes
18
+
19
+ - d54422d: Cristal 0.11 Release
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [d54422d]
24
+ - @xwiki/cristal-api@0.11.0
25
+ - @xwiki/cristal-browser-api@0.11.0
26
+
3
27
  ## 0.10.0
4
28
 
5
29
  ### Minor Changes
@@ -1,10 +1,10 @@
1
- import { BrowserApi } from '@xwiki/cristal-browser-api';
2
1
  import { WikiConfig } from '@xwiki/cristal-api';
3
-
2
+ import { BrowserApi } from '@xwiki/cristal-browser-api';
4
3
  /**
5
4
  * Remembers the current location in the locale storage, then reload the
6
5
  * browser.
7
6
  */
8
7
  export declare class BrowserApiElectron implements BrowserApi {
9
8
  switchLocation(wikiConfig: WikiConfig): void;
9
+ reload(): void;
10
10
  }
@@ -1,5 +1,4 @@
1
1
  import { Container } from 'inversify';
2
-
3
2
  export declare class ComponentInit {
4
3
  constructor(container: Container);
5
4
  }
@@ -1,3 +1,2 @@
1
1
  import { ComponentInit } from './componentsInit';
2
-
3
2
  export { ComponentInit };
@@ -1,24 +1,27 @@
1
1
  import { injectable as p } from "inversify";
2
- import { name as i } from "@xwiki/cristal-browser-api";
3
- var a = Object.defineProperty, m = Object.getOwnPropertyDescriptor, w = (o, e, n, t) => {
4
- for (var r = t > 1 ? void 0 : t ? m(e, n) : e, c = o.length - 1, s; c >= 0; c--)
5
- (s = o[c]) && (r = (t ? s(e, n, r) : s(r)) || r);
6
- return t && r && a(e, n, r), r;
2
+ import { name as a } from "@xwiki/cristal-browser-api";
3
+ var i = Object.defineProperty, w = Object.getOwnPropertyDescriptor, m = (o, e, n, t) => {
4
+ for (var r = t > 1 ? void 0 : t ? w(e, n) : e, l = o.length - 1, s; l >= 0; l--)
5
+ (s = o[l]) && (r = (t ? s(e, n, r) : s(r)) || r);
6
+ return t && r && i(e, n, r), r;
7
7
  };
8
- let l = class {
8
+ let c = class {
9
9
  switchLocation(o) {
10
10
  window.localStorage.setItem("currentApp", o.name), browserElectron.reloadBrowser();
11
11
  }
12
+ reload() {
13
+ browserElectron.reloadBrowser();
14
+ }
12
15
  };
13
- l = w([
16
+ c = m([
14
17
  p()
15
- ], l);
16
- class _ {
18
+ ], c);
19
+ class v {
17
20
  constructor(e) {
18
- e.bind(i).to(l).inSingletonScope();
21
+ e.bind(a).to(c).inSingletonScope();
19
22
  }
20
23
  }
21
24
  export {
22
- _ as ComponentInit
25
+ v as ComponentInit
23
26
  };
24
27
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.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 { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\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 type { Container } from \"inversify\";\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\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":";;;;;;;AAgCO,IAAMA,IAAN,MAA+C;AAAA,EACpD,eAAeC,GAA8B;AAC3C,WAAO,aAAa,QAAQ,cAAcA,EAAW,IAAI,GACzD,gBAAgB,cAAc;AAAA,EAChC;AACF;AALaD,IAANE,EAAA;AAAA,EADNC,EAAW;AAAA,GACCH,CAAA;ACRN,MAAMI,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAiBC,CAAI,EAAE,GAAGN,CAAkB,EAAE;EAC1D;AACF;"}
1
+ {"version":3,"file":"index.es.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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\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":";;;;;;;AAgCO,IAAMA,IAAN,MAA+C;AAAA,EACpD,eAAeC,GAA8B;AAC3C,WAAO,aAAa,QAAQ,cAAcA,EAAW,IAAI,GACzD,gBAAgB,cAAc;AAAA,EAChC;AAAA,EAEA,SAAe;AACb,oBAAgB,cAAc;AAAA,EAChC;AACF;AATaD,IAANE,EAAA;AAAA,EADNC,EAAW;AAAA,GACCH,CAAA;ACRN,MAAMI,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAiBC,CAAI,EAAE,GAAGN,CAAkB,EAAE;EAC1D;AACF;"}
@@ -1,2 +1,2 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("inversify"),require("@xwiki/cristal-browser-api")):typeof define=="function"&&define.amd?define(["exports","inversify","@xwiki/cristal-browser-api"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.cristal_browser={},e.inversify,e.cristalBrowserApi))})(this,function(e,n,l){"use strict";var a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,w=(t,i,c,o)=>{for(var r=o>1?void 0:o?u(i,c):i,p=t.length-1,f;p>=0;p--)(f=t[p])&&(r=(o?f(i,c,r):f(r))||r);return o&&r&&a(i,c,r),r};let s=class{switchLocation(t){window.localStorage.setItem("currentApp",t.name),browserElectron.reloadBrowser()}};s=w([n.injectable()],s);class d{constructor(i){i.bind(l.name).to(s).inSingletonScope()}}e.ComponentInit=d,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
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,f){"use strict";var a=Object.defineProperty,w=Object.getOwnPropertyDescriptor,u=(n,i,c,t)=>{for(var r=t>1?void 0:t?w(i,c):i,l=n.length-1,p;l>=0;l--)(p=n[l])&&(r=(t?p(i,c,r):p(r))||r);return t&&r&&a(i,c,r),r};let s=class{switchLocation(n){window.localStorage.setItem("currentApp",n.name),browserElectron.reloadBrowser()}reload(){browserElectron.reloadBrowser()}};s=u([o.injectable()],s);class d{constructor(i){i.bind(f.name).to(s).inSingletonScope()}}e.ComponentInit=d,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 { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\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 type { Container } from \"inversify\";\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\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":"+iBAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzD,gBAAgB,cAAc,CAChC,CACF,EALaD,EAANE,EAAA,CADNC,aAAW,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,MAAI,EAAE,GAAGN,CAAkB,EAAE,kBAC1D,CACF"}
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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\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":"+iBAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzD,gBAAgB,cAAc,CAChC,CAEA,QAAe,CACb,gBAAgB,cAAc,CAChC,CACF,EATaD,EAANE,EAAA,CADNC,aAAW,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,MAAI,EAAE,GAAGN,CAAkB,EAAE,kBAC1D,CACF"}
@@ -1,10 +1,10 @@
1
- import { BrowserApi } from '@xwiki/cristal-browser-api';
2
1
  import { WikiConfig } from '@xwiki/cristal-api';
3
-
2
+ import { BrowserApi } from '@xwiki/cristal-browser-api';
4
3
  /**
5
4
  * Remembers the current location in the locale storage, then reload the
6
5
  * browser.
7
6
  */
8
7
  export declare class BrowserApiElectron implements BrowserApi {
9
8
  switchLocation(wikiConfig: WikiConfig): void;
9
+ reload(): void;
10
10
  }
@@ -1,5 +1,4 @@
1
1
  import { Container } from 'inversify';
2
-
3
2
  export declare class ComponentInit {
4
3
  constructor(container: Container);
5
4
  }
@@ -1,3 +1,2 @@
1
1
  import { ComponentInit } from './componentsInit';
2
-
3
2
  export { ComponentInit };
@@ -1,24 +1,27 @@
1
1
  import { injectable as p } from "inversify";
2
- import { name as i } from "@xwiki/cristal-browser-api";
3
- var a = Object.defineProperty, m = Object.getOwnPropertyDescriptor, w = (o, e, n, t) => {
4
- for (var r = t > 1 ? void 0 : t ? m(e, n) : e, c = o.length - 1, s; c >= 0; c--)
5
- (s = o[c]) && (r = (t ? s(e, n, r) : s(r)) || r);
6
- return t && r && a(e, n, r), r;
2
+ import { name as a } from "@xwiki/cristal-browser-api";
3
+ var i = Object.defineProperty, w = Object.getOwnPropertyDescriptor, m = (o, e, n, t) => {
4
+ for (var r = t > 1 ? void 0 : t ? w(e, n) : e, l = o.length - 1, s; l >= 0; l--)
5
+ (s = o[l]) && (r = (t ? s(e, n, r) : s(r)) || r);
6
+ return t && r && i(e, n, r), r;
7
7
  };
8
- let l = class {
8
+ let c = class {
9
9
  switchLocation(o) {
10
10
  window.localStorage.setItem("currentApp", o.name), browserElectron.reloadBrowser();
11
11
  }
12
+ reload() {
13
+ browserElectron.reloadBrowser();
14
+ }
12
15
  };
13
- l = w([
16
+ c = m([
14
17
  p()
15
- ], l);
16
- class _ {
18
+ ], c);
19
+ class v {
17
20
  constructor(e) {
18
- e.bind(i).to(l).inSingletonScope();
21
+ e.bind(a).to(c).inSingletonScope();
19
22
  }
20
23
  }
21
24
  export {
22
- _ as ComponentInit
25
+ v as ComponentInit
23
26
  };
24
27
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.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 { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\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 type { Container } from \"inversify\";\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\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":";;;;;;;AAgCO,IAAMA,IAAN,MAA+C;AAAA,EACpD,eAAeC,GAA8B;AAC3C,WAAO,aAAa,QAAQ,cAAcA,EAAW,IAAI,GACzD,gBAAgB,cAAc;AAAA,EAChC;AACF;AALaD,IAANE,EAAA;AAAA,EADNC,EAAW;AAAA,GACCH,CAAA;ACRN,MAAMI,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAiBC,CAAI,EAAE,GAAGN,CAAkB,EAAE;EAC1D;AACF;"}
1
+ {"version":3,"file":"index.es.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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\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":";;;;;;;AAgCO,IAAMA,IAAN,MAA+C;AAAA,EACpD,eAAeC,GAA8B;AAC3C,WAAO,aAAa,QAAQ,cAAcA,EAAW,IAAI,GACzD,gBAAgB,cAAc;AAAA,EAChC;AAAA,EAEA,SAAe;AACb,oBAAgB,cAAc;AAAA,EAChC;AACF;AATaD,IAANE,EAAA;AAAA,EADNC,EAAW;AAAA,GACCH,CAAA;ACRN,MAAMI,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAiBC,CAAI,EAAE,GAAGN,CAAkB,EAAE;EAC1D;AACF;"}
@@ -1,2 +1,2 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("inversify"),require("@xwiki/cristal-browser-api")):typeof define=="function"&&define.amd?define(["exports","inversify","@xwiki/cristal-browser-api"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.cristal_browser={},e.inversify,e.cristalBrowserApi))})(this,function(e,n,l){"use strict";var a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,w=(t,i,c,o)=>{for(var r=o>1?void 0:o?u(i,c):i,p=t.length-1,f;p>=0;p--)(f=t[p])&&(r=(o?f(i,c,r):f(r))||r);return o&&r&&a(i,c,r),r};let s=class{switchLocation(t){window.localStorage.setItem("currentApp",t.name),browserElectron.reloadBrowser()}};s=w([n.injectable()],s);class d{constructor(i){i.bind(l.name).to(s).inSingletonScope()}}e.ComponentInit=d,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
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,f){"use strict";var a=Object.defineProperty,w=Object.getOwnPropertyDescriptor,u=(n,i,c,t)=>{for(var r=t>1?void 0:t?w(i,c):i,l=n.length-1,p;l>=0;l--)(p=n[l])&&(r=(t?p(i,c,r):p(r))||r);return t&&r&&a(i,c,r),r};let s=class{switchLocation(n){window.localStorage.setItem("currentApp",n.name),browserElectron.reloadBrowser()}reload(){browserElectron.reloadBrowser()}};s=u([o.injectable()],s);class d{constructor(i){i.bind(f.name).to(s).inSingletonScope()}}e.ComponentInit=d,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 { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\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 type { Container } from \"inversify\";\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\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":"+iBAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzD,gBAAgB,cAAc,CAChC,CACF,EALaD,EAANE,EAAA,CADNC,aAAW,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,MAAI,EAAE,GAAGN,CAAkB,EAAE,kBAC1D,CACF"}
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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\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":"+iBAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzD,gBAAgB,cAAc,CAChC,CAEA,QAAe,CACb,gBAAgB,cAAc,CAChC,CACF,EATaD,EAANE,EAAA,CADNC,aAAW,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,MAAI,EAAE,GAAGN,CAAkB,EAAE,kBAC1D,CACF"}
@@ -1,10 +1,10 @@
1
- import { BrowserApi } from '@xwiki/cristal-browser-api';
2
1
  import { WikiConfig } from '@xwiki/cristal-api';
3
-
2
+ import { BrowserApi } from '@xwiki/cristal-browser-api';
4
3
  /**
5
4
  * Remembers the current location in the locale storage, then reload the
6
5
  * browser.
7
6
  */
8
7
  export declare class BrowserApiElectron implements BrowserApi {
9
8
  switchLocation(wikiConfig: WikiConfig): void;
9
+ reload(): void;
10
10
  }
@@ -1,5 +1,4 @@
1
1
  import { Container } from 'inversify';
2
-
3
2
  export declare class ComponentInit {
4
3
  constructor(container: Container);
5
4
  }
@@ -1,3 +1,2 @@
1
1
  import { ComponentInit } from './componentsInit';
2
-
3
2
  export { ComponentInit };
@@ -1,24 +1,27 @@
1
1
  import { injectable as p } from "inversify";
2
- import { name as i } from "@xwiki/cristal-browser-api";
3
- var a = Object.defineProperty, m = Object.getOwnPropertyDescriptor, w = (o, e, n, t) => {
4
- for (var r = t > 1 ? void 0 : t ? m(e, n) : e, c = o.length - 1, s; c >= 0; c--)
5
- (s = o[c]) && (r = (t ? s(e, n, r) : s(r)) || r);
6
- return t && r && a(e, n, r), r;
2
+ import { name as a } from "@xwiki/cristal-browser-api";
3
+ var i = Object.defineProperty, w = Object.getOwnPropertyDescriptor, m = (o, e, n, t) => {
4
+ for (var r = t > 1 ? void 0 : t ? w(e, n) : e, l = o.length - 1, s; l >= 0; l--)
5
+ (s = o[l]) && (r = (t ? s(e, n, r) : s(r)) || r);
6
+ return t && r && i(e, n, r), r;
7
7
  };
8
- let l = class {
8
+ let c = class {
9
9
  switchLocation(o) {
10
10
  window.localStorage.setItem("currentApp", o.name), browserElectron.reloadBrowser();
11
11
  }
12
+ reload() {
13
+ browserElectron.reloadBrowser();
14
+ }
12
15
  };
13
- l = w([
16
+ c = m([
14
17
  p()
15
- ], l);
16
- class _ {
18
+ ], c);
19
+ class v {
17
20
  constructor(e) {
18
- e.bind(i).to(l).inSingletonScope();
21
+ e.bind(a).to(c).inSingletonScope();
19
22
  }
20
23
  }
21
24
  export {
22
- _ as ComponentInit
25
+ v as ComponentInit
23
26
  };
24
27
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.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 { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\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 type { Container } from \"inversify\";\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\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":";;;;;;;AAgCO,IAAMA,IAAN,MAA+C;AAAA,EACpD,eAAeC,GAA8B;AAC3C,WAAO,aAAa,QAAQ,cAAcA,EAAW,IAAI,GACzD,gBAAgB,cAAc;AAAA,EAChC;AACF;AALaD,IAANE,EAAA;AAAA,EADNC,EAAW;AAAA,GACCH,CAAA;ACRN,MAAMI,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAiBC,CAAI,EAAE,GAAGN,CAAkB,EAAE;EAC1D;AACF;"}
1
+ {"version":3,"file":"index.es.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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\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":";;;;;;;AAgCO,IAAMA,IAAN,MAA+C;AAAA,EACpD,eAAeC,GAA8B;AAC3C,WAAO,aAAa,QAAQ,cAAcA,EAAW,IAAI,GACzD,gBAAgB,cAAc;AAAA,EAChC;AAAA,EAEA,SAAe;AACb,oBAAgB,cAAc;AAAA,EAChC;AACF;AATaD,IAANE,EAAA;AAAA,EADNC,EAAW;AAAA,GACCH,CAAA;ACRN,MAAMI,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EAAU,KAAiBC,CAAI,EAAE,GAAGN,CAAkB,EAAE;EAC1D;AACF;"}
@@ -1,2 +1,2 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("inversify"),require("@xwiki/cristal-browser-api")):typeof define=="function"&&define.amd?define(["exports","inversify","@xwiki/cristal-browser-api"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.cristal_browser={},e.inversify,e.cristalBrowserApi))})(this,function(e,n,l){"use strict";var a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,w=(t,i,c,o)=>{for(var r=o>1?void 0:o?u(i,c):i,p=t.length-1,f;p>=0;p--)(f=t[p])&&(r=(o?f(i,c,r):f(r))||r);return o&&r&&a(i,c,r),r};let s=class{switchLocation(t){window.localStorage.setItem("currentApp",t.name),browserElectron.reloadBrowser()}};s=w([n.injectable()],s);class d{constructor(i){i.bind(l.name).to(s).inSingletonScope()}}e.ComponentInit=d,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
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,f){"use strict";var a=Object.defineProperty,w=Object.getOwnPropertyDescriptor,u=(n,i,c,t)=>{for(var r=t>1?void 0:t?w(i,c):i,l=n.length-1,p;l>=0;l--)(p=n[l])&&(r=(t?p(i,c,r):p(r))||r);return t&&r&&a(i,c,r),r};let s=class{switchLocation(n){window.localStorage.setItem("currentApp",n.name),browserElectron.reloadBrowser()}reload(){browserElectron.reloadBrowser()}};s=u([o.injectable()],s);class d{constructor(i){i.bind(f.name).to(s).inSingletonScope()}}e.ComponentInit=d,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 { BrowserApi } from \"@xwiki/cristal-browser-api\";\nimport { injectable } from \"inversify\";\nimport { APITypes } from \"../electron/preload/apiTypes\";\nimport { WikiConfig } from \"@xwiki/cristal-api\";\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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\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 type { Container } from \"inversify\";\nimport { BrowserApiElectron } from \"./components/browser-api-electron\";\nimport { BrowserApi, name } from \"@xwiki/cristal-browser-api\";\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":"+iBAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzD,gBAAgB,cAAc,CAChC,CACF,EALaD,EAANE,EAAA,CADNC,aAAW,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,MAAI,EAAE,GAAGN,CAAkB,EAAE,kBAC1D,CACF"}
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 window.localStorage.setItem(\"currentApp\", wikiConfig.name);\n browserElectron.reloadBrowser();\n }\n\n reload(): void {\n browserElectron.reloadBrowser();\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":"+iBAgCO,IAAMA,EAAN,KAA+C,CACpD,eAAeC,EAA8B,CAC3C,OAAO,aAAa,QAAQ,aAAcA,EAAW,IAAI,EACzD,gBAAgB,cAAc,CAChC,CAEA,QAAe,CACb,gBAAgB,cAAc,CAChC,CACF,EATaD,EAANE,EAAA,CADNC,aAAW,CAAA,EACCH,CAAA,ECRN,MAAMI,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EAAU,KAAiBC,MAAI,EAAE,GAAGN,CAAkB,EAAE,kBAC1D,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-browser-electron",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -32,16 +32,16 @@
32
32
  },
33
33
  "main": "./dist/main/index.es.js",
34
34
  "dependencies": {
35
- "inversify": "6.0.2",
36
- "@xwiki/cristal-api": "0.10.0",
37
- "@xwiki/cristal-browser-api": "0.10.0"
35
+ "inversify": "6.0.3",
36
+ "@xwiki/cristal-api": "0.12.0",
37
+ "@xwiki/cristal-browser-api": "0.12.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "electron": "31.0.2"
40
+ "electron": "33.0.2"
41
41
  },
42
42
  "scripts": {
43
- "clean": "rimraf dist",
44
43
  "build": "tsc --project tsconfig.json && vite build && vite build -c vite.preload.config.ts && vite build -c vite.main.config.ts",
44
+ "clean": "rimraf dist",
45
45
  "lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
46
46
  },
47
47
  "types": "./dist/main/index.d.ts"
@@ -18,10 +18,10 @@
18
18
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  */
20
20
 
21
- import { BrowserApi } from "@xwiki/cristal-browser-api";
22
- import { injectable } from "inversify";
23
21
  import { APITypes } from "../electron/preload/apiTypes";
24
22
  import { WikiConfig } from "@xwiki/cristal-api";
23
+ import { BrowserApi } from "@xwiki/cristal-browser-api";
24
+ import { injectable } from "inversify";
25
25
 
26
26
  declare const browserElectron: APITypes;
27
27
 
@@ -35,4 +35,8 @@ export class BrowserApiElectron implements BrowserApi {
35
35
  window.localStorage.setItem("currentApp", wikiConfig.name);
36
36
  browserElectron.reloadBrowser();
37
37
  }
38
+
39
+ reload(): void {
40
+ browserElectron.reloadBrowser();
41
+ }
38
42
  }
@@ -18,9 +18,9 @@
18
18
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  */
20
20
 
21
- import type { Container } from "inversify";
22
21
  import { BrowserApiElectron } from "./components/browser-api-electron";
23
22
  import { BrowserApi, name } from "@xwiki/cristal-browser-api";
23
+ import type { Container } from "inversify";
24
24
 
25
25
  export class ComponentInit {
26
26
  constructor(container: Container) {
@@ -18,13 +18,13 @@
18
18
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  */
20
20
 
21
- import { ipcMain, app } from "electron";
22
- import BrowserWindow = Electron.BrowserWindow;
21
+ import { app, ipcMain } from "electron";
23
22
  import { resolve } from "node:path";
23
+ import BrowserWindow = Electron.BrowserWindow;
24
24
 
25
25
  /**
26
26
  * Reload the browser by reloading the index file.
27
- * @param window
27
+ * @param window - the window instance in which the default index page is loaded
28
28
  */
29
29
  function reloadBrowser(window: BrowserWindow) {
30
30
  window.loadFile(resolve(app.getAppPath(), "./renderer/dist/index.html"));
@@ -18,8 +18,8 @@
18
18
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
19
  */
20
20
 
21
- import { contextBridge, ipcRenderer } from "electron";
22
21
  import { APITypes } from "./apiTypes";
22
+ import { contextBridge, ipcRenderer } from "electron";
23
23
 
24
24
  const api: APITypes = {
25
25
  reloadBrowser() {