@xwiki/cristal-wiki-config-default 1.2.0 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-wiki-config-default",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -28,21 +28,21 @@
28
28
  "main": "./dist/index.es.js",
29
29
  "types": "./dist/index.d.ts",
30
30
  "dependencies": {
31
- "@xwiki/platform-api": "18.2.0",
32
- "@xwiki/platform-configuration-api": "18.2.0",
33
- "@xwiki/cristal-wiki-config-api": "1.2.0"
31
+ "@xwiki/platform-api": "18.4.0",
32
+ "@xwiki/platform-configuration-api": "18.4.0",
33
+ "@xwiki/cristal-wiki-config-api": "1.4.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "inversify": "7.x",
36
+ "inversify": "8.x",
37
37
  "reflect-metadata": "0.x",
38
38
  "vue": "3.x"
39
39
  },
40
40
  "devDependencies": {
41
- "inversify": "7.11.0",
41
+ "inversify": "8.1.0",
42
42
  "typescript": "5.9.3",
43
- "vite": "7.3.1",
43
+ "vite": "7.3.2",
44
44
  "vue": "3.5.30",
45
- "@xwiki/cristal-dev-config": "1.2.0"
45
+ "@xwiki/cristal-dev-config": "1.4.0"
46
46
  },
47
47
  "scripts": {
48
48
  "api-extractor:local": "api-extractor run --local",
@@ -1,17 +0,0 @@
1
- import { WikiConfigProxy } from '@xwiki/cristal-wiki-config-api';
2
- import { CristalApp, WikiConfig } from '@xwiki/platform-api';
3
- import { Configurations } from '@xwiki/platform-configuration-api';
4
- import { Ref } from 'vue';
5
- /**
6
- * Default implementation for {@link WikiConfigProxy}.
7
- * @since 0.18
8
- * @beta
9
- */
10
- export declare class DefaultWikiConfigProxy implements WikiConfigProxy {
11
- private readonly cristalApp;
12
- private configurationsRef;
13
- constructor(cristalApp: CristalApp);
14
- getAvailableConfigurations(): Ref<Map<string, WikiConfig>>;
15
- setAvailableConfigurations(config: Configurations): void;
16
- deleteAvailableConfiguration(configName: string): void;
17
- }
package/dist/index.d.cts DELETED
@@ -1,7 +0,0 @@
1
- import { Container } from 'inversify';
2
- /**
3
- * @beta
4
- */
5
- export declare class ComponentInit {
6
- constructor(container: Container);
7
- }
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import { Container } from 'inversify';
2
- /**
3
- * @beta
4
- */
5
- export declare class ComponentInit {
6
- constructor(container: Container);
7
- }
package/dist/index.es.js DELETED
@@ -1,37 +0,0 @@
1
- import { injectable as f, inject as c } from "inversify";
2
- import { shallowRef as g, triggerRef as l } from "vue";
3
- var p = Object.getOwnPropertyDescriptor, u = (i, t, r, e) => {
4
- for (var o = e > 1 ? void 0 : e ? p(t, r) : t, a = i.length - 1, s; a >= 0; a--)
5
- (s = i[a]) && (o = s(o) || o);
6
- return o;
7
- }, v = (i, t) => (r, e) => t(r, e, i);
8
- let n = class {
9
- constructor(i) {
10
- this.cristalApp = i, this.configurationsRef = g(
11
- this.cristalApp.getAvailableConfigurations()
12
- );
13
- }
14
- configurationsRef;
15
- getAvailableConfigurations() {
16
- return this.configurationsRef;
17
- }
18
- setAvailableConfigurations(i) {
19
- this.cristalApp.setAvailableConfigurations(i), l(this.configurationsRef);
20
- }
21
- deleteAvailableConfiguration(i) {
22
- this.cristalApp.deleteAvailableConfiguration(i), l(this.configurationsRef);
23
- }
24
- };
25
- n = u([
26
- f(),
27
- v(0, c("CristalApp"))
28
- ], n);
29
- class h {
30
- constructor(t) {
31
- t.bind("WikiConfigProxy").to(n).inSingletonScope();
32
- }
33
- }
34
- export {
35
- h as ComponentInit
36
- };
37
- //# sourceMappingURL=index.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/defaultWikiConfigProxy.ts","../src/index.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 { inject, injectable } from \"inversify\";\nimport { shallowRef, triggerRef } from \"vue\";\nimport type { WikiConfigProxy } from \"@xwiki/cristal-wiki-config-api\";\nimport type { CristalApp, WikiConfig } from \"@xwiki/platform-api\";\nimport type { Configurations } from \"@xwiki/platform-configuration-api\";\nimport type { Ref } from \"vue\";\n\n/**\n * Default implementation for {@link WikiConfigProxy}.\n * @since 0.18\n * @beta\n */\n@injectable()\nexport class DefaultWikiConfigProxy implements WikiConfigProxy {\n private configurationsRef: Ref<Map<string, WikiConfig>>;\n\n constructor(@inject(\"CristalApp\") private readonly cristalApp: CristalApp) {\n this.configurationsRef = shallowRef(\n this.cristalApp.getAvailableConfigurations(),\n );\n }\n\n getAvailableConfigurations(): Ref<Map<string, WikiConfig>> {\n return this.configurationsRef;\n }\n\n setAvailableConfigurations(config: Configurations): void {\n this.cristalApp.setAvailableConfigurations(config);\n triggerRef(this.configurationsRef);\n }\n\n deleteAvailableConfiguration(configName: string): void {\n this.cristalApp.deleteAvailableConfiguration(configName);\n triggerRef(this.configurationsRef);\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 { DefaultWikiConfigProxy } from \"./defaultWikiConfigProxy\";\nimport { Container } from \"inversify\";\nimport type { WikiConfigProxy } from \"@xwiki/cristal-wiki-config-api\";\n\n/**\n * @beta\n */\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<WikiConfigProxy>(\"WikiConfigProxy\")\n .to(DefaultWikiConfigProxy)\n .inSingletonScope();\n }\n}\n"],"names":["DefaultWikiConfigProxy","cristalApp","shallowRef","config","triggerRef","configName","__decorateClass","injectable","__decorateParam","ComponentInit","container"],"mappings":";;;;;;;AAiCO,IAAMA,IAAN,MAAwD;AAAA,EAG7D,YAAmDC,GAAwB;AAAxB,SAAA,aAAAA,GACjD,KAAK,oBAAoBC;AAAA,MACvB,KAAK,WAAW,2BAAA;AAAA,IAA2B;AAAA,EAE/C;AAAA,EANQ;AAAA,EAQR,6BAA2D;AACzD,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,2BAA2BC,GAA8B;AACvD,SAAK,WAAW,2BAA2BA,CAAM,GACjDC,EAAW,KAAK,iBAAiB;AAAA,EACnC;AAAA,EAEA,6BAA6BC,GAA0B;AACrD,SAAK,WAAW,6BAA6BA,CAAU,GACvDD,EAAW,KAAK,iBAAiB;AAAA,EACnC;AACF;AAtBaJ,IAANM,EAAA;AAAA,EADNC,EAAA;AAAA,EAIcC,OAAO,YAAY,CAAA;AAAA,GAHrBR,CAAA;ACNN,MAAMS,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAChC,IAAAA,EACG,KAAsB,iBAAiB,EACvC,GAAGV,CAAsB,EACzB,iBAAA;AAAA,EACL;AACF;"}
package/dist/index.umd.js DELETED
@@ -1,2 +0,0 @@
1
- (function(i,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("inversify"),require("vue")):typeof define=="function"&&define.amd?define(["exports","inversify","vue"],t):(i=typeof globalThis<"u"?globalThis:i||self,t(i["cristal_wiki-config-default"]={},i.inversify,i.vue))})(this,(function(i,t,s){"use strict";var c=Object.getOwnPropertyDescriptor,g=(e,n,f,o)=>{for(var r=o>1?void 0:o?c(n,f):n,l=e.length-1,u;l>=0;l--)(u=e[l])&&(r=u(r)||r);return r},p=(e,n)=>(f,o)=>n(f,o,e);let a=class{constructor(e){this.cristalApp=e,this.configurationsRef=s.shallowRef(this.cristalApp.getAvailableConfigurations())}configurationsRef;getAvailableConfigurations(){return this.configurationsRef}setAvailableConfigurations(e){this.cristalApp.setAvailableConfigurations(e),s.triggerRef(this.configurationsRef)}deleteAvailableConfiguration(e){this.cristalApp.deleteAvailableConfiguration(e),s.triggerRef(this.configurationsRef)}};a=g([t.injectable(),p(0,t.inject("CristalApp"))],a);class v{constructor(n){n.bind("WikiConfigProxy").to(a).inSingletonScope()}}i.ComponentInit=v,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})}));
2
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/defaultWikiConfigProxy.ts","../src/index.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 { inject, injectable } from \"inversify\";\nimport { shallowRef, triggerRef } from \"vue\";\nimport type { WikiConfigProxy } from \"@xwiki/cristal-wiki-config-api\";\nimport type { CristalApp, WikiConfig } from \"@xwiki/platform-api\";\nimport type { Configurations } from \"@xwiki/platform-configuration-api\";\nimport type { Ref } from \"vue\";\n\n/**\n * Default implementation for {@link WikiConfigProxy}.\n * @since 0.18\n * @beta\n */\n@injectable()\nexport class DefaultWikiConfigProxy implements WikiConfigProxy {\n private configurationsRef: Ref<Map<string, WikiConfig>>;\n\n constructor(@inject(\"CristalApp\") private readonly cristalApp: CristalApp) {\n this.configurationsRef = shallowRef(\n this.cristalApp.getAvailableConfigurations(),\n );\n }\n\n getAvailableConfigurations(): Ref<Map<string, WikiConfig>> {\n return this.configurationsRef;\n }\n\n setAvailableConfigurations(config: Configurations): void {\n this.cristalApp.setAvailableConfigurations(config);\n triggerRef(this.configurationsRef);\n }\n\n deleteAvailableConfiguration(configName: string): void {\n this.cristalApp.deleteAvailableConfiguration(configName);\n triggerRef(this.configurationsRef);\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 { DefaultWikiConfigProxy } from \"./defaultWikiConfigProxy\";\nimport { Container } from \"inversify\";\nimport type { WikiConfigProxy } from \"@xwiki/cristal-wiki-config-api\";\n\n/**\n * @beta\n */\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<WikiConfigProxy>(\"WikiConfigProxy\")\n .to(DefaultWikiConfigProxy)\n .inSingletonScope();\n }\n}\n"],"names":["DefaultWikiConfigProxy","cristalApp","shallowRef","config","triggerRef","configName","__decorateClass","injectable","__decorateParam","ComponentInit","container"],"mappings":"weAiCO,IAAMA,EAAN,KAAwD,CAG7D,YAAmDC,EAAwB,CAAxB,KAAA,WAAAA,EACjD,KAAK,kBAAoBC,EAAAA,WACvB,KAAK,WAAW,2BAAA,CAA2B,CAE/C,CANQ,kBAQR,4BAA2D,CACzD,OAAO,KAAK,iBACd,CAEA,2BAA2BC,EAA8B,CACvD,KAAK,WAAW,2BAA2BA,CAAM,EACjDC,EAAAA,WAAW,KAAK,iBAAiB,CACnC,CAEA,6BAA6BC,EAA0B,CACrD,KAAK,WAAW,6BAA6BA,CAAU,EACvDD,EAAAA,WAAW,KAAK,iBAAiB,CACnC,CACF,EAtBaJ,EAANM,EAAA,CADNC,aAAA,EAIcC,aAAO,YAAY,CAAA,CAAA,EAHrBR,CAAA,ECNN,MAAMS,CAAc,CACzB,YAAYC,EAAsB,CAChCA,EACG,KAAsB,iBAAiB,EACvC,GAAGV,CAAsB,EACzB,iBAAA,CACL,CACF"}