@xwiki/cristal-hierarchy-nextcloud 0.14.0 → 0.16.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,33 @@
1
1
  # @xwiki/cristal-hierarchy-nextcloud
2
2
 
3
+ ## 0.16.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Cristal 0.16 Release
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @xwiki/cristal-api@0.16.0
13
+ - @xwiki/cristal-hierarchy-api@0.16.0
14
+ - @xwiki/cristal-hierarchy-default@0.16.0
15
+ - @xwiki/cristal-model-api@0.16.0
16
+
17
+ ## 0.15.0
18
+
19
+ ### Minor Changes
20
+
21
+ - Cristal 0.15 Release
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+ - @xwiki/cristal-api@0.15.0
27
+ - @xwiki/cristal-hierarchy-api@0.15.0
28
+ - @xwiki/cristal-hierarchy-default@0.15.0
29
+ - @xwiki/cristal-model-api@0.15.0
30
+
3
31
  ## 0.14.0
4
32
 
5
33
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -1,11 +1,11 @@
1
- import { name as n } from "@xwiki/cristal-hierarchy-api";
1
+ import { name as p } from "@xwiki/cristal-hierarchy-api";
2
2
  import { getPageHierarchyFromPath as g } from "@xwiki/cristal-hierarchy-default";
3
3
  import { injectable as h, inject as l } from "inversify";
4
4
  var m = Object.defineProperty, f = Object.getOwnPropertyDescriptor, u = (r, e, a, o) => {
5
5
  for (var t = o > 1 ? void 0 : o ? f(e, a) : e, i = r.length - 1, s; i >= 0; i--)
6
6
  (s = r[i]) && (t = (o ? s(e, a, t) : s(t)) || t);
7
7
  return o && t && m(e, a, t), t;
8
- }, p = (r, e) => (a, o) => e(a, o, r);
8
+ }, n = (r, e) => (a, o) => e(a, o, r);
9
9
  let c = class {
10
10
  constructor(r, e) {
11
11
  this.logger = r, this.logger.setModule("storage.components.NextcloudPageHierarchyResolver"), this.cristalApp = e;
@@ -28,12 +28,12 @@ let c = class {
28
28
  };
29
29
  c = u([
30
30
  h(),
31
- p(0, l("Logger")),
32
- p(1, l("CristalApp"))
31
+ n(0, l("Logger")),
32
+ n(1, l("CristalApp"))
33
33
  ], c);
34
34
  class d {
35
35
  constructor(e) {
36
- e.bind(n).to(c).inSingletonScope().whenTargetNamed("Nextcloud");
36
+ e.bind(p).to(c).inSingletonScope().whenNamed("Nextcloud");
37
37
  }
38
38
  }
39
39
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/components/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 { name } from \"@xwiki/cristal-hierarchy-api\";\nimport { getPageHierarchyFromPath } from \"@xwiki/cristal-hierarchy-default\";\nimport { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger, PageData } from \"@xwiki/cristal-api\";\nimport type {\n PageHierarchyItem,\n PageHierarchyResolver,\n} from \"@xwiki/cristal-hierarchy-api\";\n\n/**\n * Implementation of PageHierarchyResolver for Nextcloud backend.\n *\n * @since 0.10\n **/\n@injectable()\nclass NextcloudPageHierarchyResolver implements PageHierarchyResolver {\n private cristalApp: CristalApp;\n public logger: Logger;\n\n constructor(\n @inject<Logger>(\"Logger\") logger: Logger,\n @inject<CristalApp>(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.logger = logger;\n this.logger.setModule(\"storage.components.NextcloudPageHierarchyResolver\");\n this.cristalApp = cristalApp;\n }\n\n async getPageHierarchy(\n pageData: PageData,\n ): Promise<Array<PageHierarchyItem>> {\n let hierarchy: Array<PageHierarchyItem> = [\n {\n label: \"Home\",\n pageId: this.cristalApp.getWikiConfig().homePage,\n url: this.cristalApp.getRouter().resolve({\n name: \"view\",\n params: { page: this.cristalApp.getWikiConfig().homePage },\n }).href,\n },\n ];\n if (pageData != null) {\n hierarchy = hierarchy.concat(\n await getPageHierarchyFromPath(pageData, this.cristalApp),\n );\n }\n return hierarchy;\n }\n}\n\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<PageHierarchyResolver>(name)\n .to(NextcloudPageHierarchyResolver)\n .inSingletonScope()\n .whenTargetNamed(\"Nextcloud\");\n }\n}\n"],"names":["NextcloudPageHierarchyResolver","logger","cristalApp","pageData","hierarchy","getPageHierarchyFromPath","__decorateClass","injectable","__decorateParam","ComponentInit","container","name"],"mappings":";;;;;;;;AAmCA,IAAMA,IAAN,MAAsE;AAAA,EAIpE,YAC4BC,GACQC,GAClC;AACA,SAAK,SAASD,GACT,KAAA,OAAO,UAAU,mDAAmD,GACzE,KAAK,aAAaC;AAAA,EAAA;AAAA,EAGpB,MAAM,iBACJC,GACmC;AACnC,QAAIC,IAAsC;AAAA,MACxC;AAAA,QACE,OAAO;AAAA,QACP,QAAQ,KAAK,WAAW,cAAgB,EAAA;AAAA,QACxC,KAAK,KAAK,WAAW,UAAA,EAAY,QAAQ;AAAA,UACvC,MAAM;AAAA,UACN,QAAQ,EAAE,MAAM,KAAK,WAAW,gBAAgB,SAAS;AAAA,QAAA,CAC1D,EAAE;AAAA,MAAA;AAAA,IAEP;AACA,WAAID,KAAY,SACdC,IAAYA,EAAU;AAAA,MACpB,MAAMC,EAAyBF,GAAU,KAAK,UAAU;AAAA,IAC1D,IAEKC;AAAA,EAAA;AAEX;AAjCMJ,IAANM,EAAA;AAAA,EADCC,EAAW;AAAA,EAMPC,OAAe,QAAQ,CAAA;AAAA,EACvBA,OAAmB,YAAY,CAAA;AAAA,GAN9BR,CAAA;AAmCC,MAAMS,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAE7B,IAAAA,EAAA,KAA4BC,CAAI,EAChC,GAAGX,CAA8B,EACjC,iBAAA,EACA,gBAAgB,WAAW;AAAA,EAAA;AAElC;"}
1
+ {"version":3,"file":"index.es.js","sources":["../src/components/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 { name } from \"@xwiki/cristal-hierarchy-api\";\nimport { getPageHierarchyFromPath } from \"@xwiki/cristal-hierarchy-default\";\nimport { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger } from \"@xwiki/cristal-api\";\nimport type {\n PageHierarchyItem,\n PageHierarchyResolver,\n} from \"@xwiki/cristal-hierarchy-api\";\nimport type {\n DocumentReference,\n SpaceReference,\n} from \"@xwiki/cristal-model-api\";\n\n/**\n * Implementation of PageHierarchyResolver for Nextcloud backend.\n *\n * @since 0.10\n **/\n@injectable()\nclass NextcloudPageHierarchyResolver implements PageHierarchyResolver {\n private cristalApp: CristalApp;\n public logger: Logger;\n\n constructor(\n @inject(\"Logger\") logger: Logger,\n @inject(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.logger = logger;\n this.logger.setModule(\"storage.components.NextcloudPageHierarchyResolver\");\n this.cristalApp = cristalApp;\n }\n\n async getPageHierarchy(\n page: DocumentReference | SpaceReference,\n ): Promise<Array<PageHierarchyItem>> {\n let hierarchy: Array<PageHierarchyItem> = [\n {\n label: \"Home\",\n pageId: this.cristalApp.getWikiConfig().homePage,\n url: this.cristalApp.getRouter().resolve({\n name: \"view\",\n params: { page: this.cristalApp.getWikiConfig().homePage },\n }).href,\n },\n ];\n if (page != null) {\n hierarchy = hierarchy.concat(\n await getPageHierarchyFromPath(page, this.cristalApp),\n );\n }\n return hierarchy;\n }\n}\n\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<PageHierarchyResolver>(name)\n .to(NextcloudPageHierarchyResolver)\n .inSingletonScope()\n .whenNamed(\"Nextcloud\");\n }\n}\n"],"names":["NextcloudPageHierarchyResolver","logger","cristalApp","page","hierarchy","getPageHierarchyFromPath","__decorateClass","injectable","__decorateParam","ComponentInit","container","name"],"mappings":";;;;;;;;AAuCA,IAAMA,IAAN,MAAsE;AAAA,EAIpE,YACoBC,GACIC,GACtB;AACA,SAAK,SAASD,GACT,KAAA,OAAO,UAAU,mDAAmD,GACzE,KAAK,aAAaC;AAAA,EAAA;AAAA,EAGpB,MAAM,iBACJC,GACmC;AACnC,QAAIC,IAAsC;AAAA,MACxC;AAAA,QACE,OAAO;AAAA,QACP,QAAQ,KAAK,WAAW,cAAgB,EAAA;AAAA,QACxC,KAAK,KAAK,WAAW,UAAA,EAAY,QAAQ;AAAA,UACvC,MAAM;AAAA,UACN,QAAQ,EAAE,MAAM,KAAK,WAAW,gBAAgB,SAAS;AAAA,QAAA,CAC1D,EAAE;AAAA,MAAA;AAAA,IAEP;AACA,WAAID,KAAQ,SACVC,IAAYA,EAAU;AAAA,MACpB,MAAMC,EAAyBF,GAAM,KAAK,UAAU;AAAA,IACtD,IAEKC;AAAA,EAAA;AAEX;AAjCMJ,IAANM,EAAA;AAAA,EADCC,EAAW;AAAA,EAMPC,OAAO,QAAQ,CAAA;AAAA,EACfA,OAAO,YAAY,CAAA;AAAA,GANlBR,CAAA;AAmCC,MAAMS,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAE7B,IAAAA,EAAA,KAA4BC,CAAI,EAChC,GAAGX,CAA8B,EACjC,iBAAA,EACA,UAAU,WAAW;AAAA,EAAA;AAE5B;"}
package/dist/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- (function(r,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("@xwiki/cristal-hierarchy-api"),require("@xwiki/cristal-hierarchy-default"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","@xwiki/cristal-hierarchy-api","@xwiki/cristal-hierarchy-default","inversify"],c):(r=typeof globalThis<"u"?globalThis:r||self,c(r["cristal_hierarchy-nextcloud"]={},r.cristalHierarchyApi,r.cristalHierarchyDefault,r.inversify))})(this,function(r,c,u,o){"use strict";var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,d=(i,e,s,a)=>{for(var t=a>1?void 0:a?g(e,s):e,l=i.length-1,h;l>=0;l--)(h=i[l])&&(t=(a?h(e,s,t):h(t))||t);return a&&t&&f(e,s,t),t},p=(i,e)=>(s,a)=>e(s,a,i);let n=class{constructor(i,e){this.logger=i,this.logger.setModule("storage.components.NextcloudPageHierarchyResolver"),this.cristalApp=e}async getPageHierarchy(i){let e=[{label:"Home",pageId:this.cristalApp.getWikiConfig().homePage,url:this.cristalApp.getRouter().resolve({name:"view",params:{page:this.cristalApp.getWikiConfig().homePage}}).href}];return i!=null&&(e=e.concat(await u.getPageHierarchyFromPath(i,this.cristalApp))),e}};n=d([o.injectable(),p(0,o.inject("Logger")),p(1,o.inject("CristalApp"))],n);class y{constructor(e){e.bind(c.name).to(n).inSingletonScope().whenTargetNamed("Nextcloud")}}r.ComponentInit=y,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
1
+ (function(r,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("@xwiki/cristal-hierarchy-api"),require("@xwiki/cristal-hierarchy-default"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","@xwiki/cristal-hierarchy-api","@xwiki/cristal-hierarchy-default","inversify"],c):(r=typeof globalThis<"u"?globalThis:r||self,c(r["cristal_hierarchy-nextcloud"]={},r.cristalHierarchyApi,r.cristalHierarchyDefault,r.inversify))})(this,function(r,c,u,s){"use strict";var f=Object.defineProperty,d=Object.getOwnPropertyDescriptor,g=(i,e,n,a)=>{for(var t=a>1?void 0:a?d(e,n):e,l=i.length-1,h;l>=0;l--)(h=i[l])&&(t=(a?h(e,n,t):h(t))||t);return a&&t&&f(e,n,t),t},p=(i,e)=>(n,a)=>e(n,a,i);let o=class{constructor(i,e){this.logger=i,this.logger.setModule("storage.components.NextcloudPageHierarchyResolver"),this.cristalApp=e}async getPageHierarchy(i){let e=[{label:"Home",pageId:this.cristalApp.getWikiConfig().homePage,url:this.cristalApp.getRouter().resolve({name:"view",params:{page:this.cristalApp.getWikiConfig().homePage}}).href}];return i!=null&&(e=e.concat(await u.getPageHierarchyFromPath(i,this.cristalApp))),e}};o=g([s.injectable(),p(0,s.inject("Logger")),p(1,s.inject("CristalApp"))],o);class y{constructor(e){e.bind(c.name).to(o).inSingletonScope().whenNamed("Nextcloud")}}r.ComponentInit=y,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
2
2
  //# sourceMappingURL=index.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.umd.js","sources":["../src/components/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 { name } from \"@xwiki/cristal-hierarchy-api\";\nimport { getPageHierarchyFromPath } from \"@xwiki/cristal-hierarchy-default\";\nimport { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger, PageData } from \"@xwiki/cristal-api\";\nimport type {\n PageHierarchyItem,\n PageHierarchyResolver,\n} from \"@xwiki/cristal-hierarchy-api\";\n\n/**\n * Implementation of PageHierarchyResolver for Nextcloud backend.\n *\n * @since 0.10\n **/\n@injectable()\nclass NextcloudPageHierarchyResolver implements PageHierarchyResolver {\n private cristalApp: CristalApp;\n public logger: Logger;\n\n constructor(\n @inject<Logger>(\"Logger\") logger: Logger,\n @inject<CristalApp>(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.logger = logger;\n this.logger.setModule(\"storage.components.NextcloudPageHierarchyResolver\");\n this.cristalApp = cristalApp;\n }\n\n async getPageHierarchy(\n pageData: PageData,\n ): Promise<Array<PageHierarchyItem>> {\n let hierarchy: Array<PageHierarchyItem> = [\n {\n label: \"Home\",\n pageId: this.cristalApp.getWikiConfig().homePage,\n url: this.cristalApp.getRouter().resolve({\n name: \"view\",\n params: { page: this.cristalApp.getWikiConfig().homePage },\n }).href,\n },\n ];\n if (pageData != null) {\n hierarchy = hierarchy.concat(\n await getPageHierarchyFromPath(pageData, this.cristalApp),\n );\n }\n return hierarchy;\n }\n}\n\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<PageHierarchyResolver>(name)\n .to(NextcloudPageHierarchyResolver)\n .inSingletonScope()\n .whenTargetNamed(\"Nextcloud\");\n }\n}\n"],"names":["NextcloudPageHierarchyResolver","logger","cristalApp","pageData","hierarchy","getPageHierarchyFromPath","__decorateClass","injectable","__decorateParam","ComponentInit","container","name"],"mappings":"wsBAmCA,IAAMA,EAAN,KAAsE,CAIpE,YAC4BC,EACQC,EAClC,CACA,KAAK,OAASD,EACT,KAAA,OAAO,UAAU,mDAAmD,EACzE,KAAK,WAAaC,CAAA,CAGpB,MAAM,iBACJC,EACmC,CACnC,IAAIC,EAAsC,CACxC,CACE,MAAO,OACP,OAAQ,KAAK,WAAW,cAAgB,EAAA,SACxC,IAAK,KAAK,WAAW,UAAA,EAAY,QAAQ,CACvC,KAAM,OACN,OAAQ,CAAE,KAAM,KAAK,WAAW,gBAAgB,QAAS,CAAA,CAC1D,EAAE,IAAA,CAEP,EACA,OAAID,GAAY,OACdC,EAAYA,EAAU,OACpB,MAAMC,EAAA,yBAAyBF,EAAU,KAAK,UAAU,CAC1D,GAEKC,CAAA,CAEX,EAjCMJ,EAANM,EAAA,CADCC,aAAW,EAMPC,aAAe,QAAQ,CAAA,EACvBA,aAAmB,YAAY,CAAA,CAAA,EAN9BR,CAAA,EAmCC,MAAMS,CAAc,CACzB,YAAYC,EAAsB,CAE7BA,EAAA,KAA4BC,EAAI,IAAA,EAChC,GAAGX,CAA8B,EACjC,iBAAA,EACA,gBAAgB,WAAW,CAAA,CAElC"}
1
+ {"version":3,"file":"index.umd.js","sources":["../src/components/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 { name } from \"@xwiki/cristal-hierarchy-api\";\nimport { getPageHierarchyFromPath } from \"@xwiki/cristal-hierarchy-default\";\nimport { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger } from \"@xwiki/cristal-api\";\nimport type {\n PageHierarchyItem,\n PageHierarchyResolver,\n} from \"@xwiki/cristal-hierarchy-api\";\nimport type {\n DocumentReference,\n SpaceReference,\n} from \"@xwiki/cristal-model-api\";\n\n/**\n * Implementation of PageHierarchyResolver for Nextcloud backend.\n *\n * @since 0.10\n **/\n@injectable()\nclass NextcloudPageHierarchyResolver implements PageHierarchyResolver {\n private cristalApp: CristalApp;\n public logger: Logger;\n\n constructor(\n @inject(\"Logger\") logger: Logger,\n @inject(\"CristalApp\") cristalApp: CristalApp,\n ) {\n this.logger = logger;\n this.logger.setModule(\"storage.components.NextcloudPageHierarchyResolver\");\n this.cristalApp = cristalApp;\n }\n\n async getPageHierarchy(\n page: DocumentReference | SpaceReference,\n ): Promise<Array<PageHierarchyItem>> {\n let hierarchy: Array<PageHierarchyItem> = [\n {\n label: \"Home\",\n pageId: this.cristalApp.getWikiConfig().homePage,\n url: this.cristalApp.getRouter().resolve({\n name: \"view\",\n params: { page: this.cristalApp.getWikiConfig().homePage },\n }).href,\n },\n ];\n if (page != null) {\n hierarchy = hierarchy.concat(\n await getPageHierarchyFromPath(page, this.cristalApp),\n );\n }\n return hierarchy;\n }\n}\n\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<PageHierarchyResolver>(name)\n .to(NextcloudPageHierarchyResolver)\n .inSingletonScope()\n .whenNamed(\"Nextcloud\");\n }\n}\n"],"names":["NextcloudPageHierarchyResolver","logger","cristalApp","page","hierarchy","getPageHierarchyFromPath","__decorateClass","injectable","__decorateParam","ComponentInit","container","name"],"mappings":"wsBAuCA,IAAMA,EAAN,KAAsE,CAIpE,YACoBC,EACIC,EACtB,CACA,KAAK,OAASD,EACT,KAAA,OAAO,UAAU,mDAAmD,EACzE,KAAK,WAAaC,CAAA,CAGpB,MAAM,iBACJC,EACmC,CACnC,IAAIC,EAAsC,CACxC,CACE,MAAO,OACP,OAAQ,KAAK,WAAW,cAAgB,EAAA,SACxC,IAAK,KAAK,WAAW,UAAA,EAAY,QAAQ,CACvC,KAAM,OACN,OAAQ,CAAE,KAAM,KAAK,WAAW,gBAAgB,QAAS,CAAA,CAC1D,EAAE,IAAA,CAEP,EACA,OAAID,GAAQ,OACVC,EAAYA,EAAU,OACpB,MAAMC,EAAA,yBAAyBF,EAAM,KAAK,UAAU,CACtD,GAEKC,CAAA,CAEX,EAjCMJ,EAANM,EAAA,CADCC,aAAW,EAMPC,aAAO,QAAQ,CAAA,EACfA,aAAO,YAAY,CAAA,CAAA,EANlBR,CAAA,EAmCC,MAAMS,CAAc,CACzB,YAAYC,EAAsB,CAE7BA,EAAA,KAA4BC,EAAI,IAAA,EAChC,GAAGX,CAA8B,EACjC,iBAAA,EACA,UAAU,WAAW,CAAA,CAE5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-hierarchy-nextcloud",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -22,19 +22,20 @@
22
22
  },
23
23
  "main": "./dist/index.es.js",
24
24
  "dependencies": {
25
- "inversify": "6.2.1",
26
- "@xwiki/cristal-hierarchy-api": "0.14.0",
27
- "@xwiki/cristal-api": "0.14.0",
28
- "@xwiki/cristal-hierarchy-default": "0.14.0"
25
+ "inversify": "7.1.0",
26
+ "@xwiki/cristal-api": "0.16.0",
27
+ "@xwiki/cristal-hierarchy-default": "0.16.0",
28
+ "@xwiki/cristal-hierarchy-api": "0.16.0",
29
+ "@xwiki/cristal-model-api": "0.16.0"
29
30
  },
30
31
  "peerDependencies": {
31
32
  "reflect-metadata": "0.2.2"
32
33
  },
33
34
  "devDependencies": {
34
35
  "reflect-metadata": "0.2.2",
35
- "typescript": "5.7.3",
36
- "vite": "6.0.11",
37
- "@xwiki/cristal-dev-config": "0.14.0"
36
+ "typescript": "5.8.2",
37
+ "vite": "6.2.2",
38
+ "@xwiki/cristal-dev-config": "0.16.0"
38
39
  },
39
40
  "scripts": {
40
41
  "build": "tsc --project tsconfig.json && vite build",
@@ -21,11 +21,15 @@
21
21
  import { name } from "@xwiki/cristal-hierarchy-api";
22
22
  import { getPageHierarchyFromPath } from "@xwiki/cristal-hierarchy-default";
23
23
  import { Container, inject, injectable } from "inversify";
24
- import type { CristalApp, Logger, PageData } from "@xwiki/cristal-api";
24
+ import type { CristalApp, Logger } from "@xwiki/cristal-api";
25
25
  import type {
26
26
  PageHierarchyItem,
27
27
  PageHierarchyResolver,
28
28
  } from "@xwiki/cristal-hierarchy-api";
29
+ import type {
30
+ DocumentReference,
31
+ SpaceReference,
32
+ } from "@xwiki/cristal-model-api";
29
33
 
30
34
  /**
31
35
  * Implementation of PageHierarchyResolver for Nextcloud backend.
@@ -38,8 +42,8 @@ class NextcloudPageHierarchyResolver implements PageHierarchyResolver {
38
42
  public logger: Logger;
39
43
 
40
44
  constructor(
41
- @inject<Logger>("Logger") logger: Logger,
42
- @inject<CristalApp>("CristalApp") cristalApp: CristalApp,
45
+ @inject("Logger") logger: Logger,
46
+ @inject("CristalApp") cristalApp: CristalApp,
43
47
  ) {
44
48
  this.logger = logger;
45
49
  this.logger.setModule("storage.components.NextcloudPageHierarchyResolver");
@@ -47,7 +51,7 @@ class NextcloudPageHierarchyResolver implements PageHierarchyResolver {
47
51
  }
48
52
 
49
53
  async getPageHierarchy(
50
- pageData: PageData,
54
+ page: DocumentReference | SpaceReference,
51
55
  ): Promise<Array<PageHierarchyItem>> {
52
56
  let hierarchy: Array<PageHierarchyItem> = [
53
57
  {
@@ -59,9 +63,9 @@ class NextcloudPageHierarchyResolver implements PageHierarchyResolver {
59
63
  }).href,
60
64
  },
61
65
  ];
62
- if (pageData != null) {
66
+ if (page != null) {
63
67
  hierarchy = hierarchy.concat(
64
- await getPageHierarchyFromPath(pageData, this.cristalApp),
68
+ await getPageHierarchyFromPath(page, this.cristalApp),
65
69
  );
66
70
  }
67
71
  return hierarchy;
@@ -74,6 +78,6 @@ export class ComponentInit {
74
78
  .bind<PageHierarchyResolver>(name)
75
79
  .to(NextcloudPageHierarchyResolver)
76
80
  .inSingletonScope()
77
- .whenTargetNamed("Nextcloud");
81
+ .whenNamed("Nextcloud");
78
82
  }
79
83
  }