@xwiki/cristal-navigation-tree-filesystem 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 +28 -0
- package/dist/components/componentsInit.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +10 -10
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +8 -7
- package/src/components/componentsInit.ts +9 -6
- package/tsdoc.json +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @xwiki/cristal-navigation-tree-filesystem
|
|
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-navigation-tree-api@0.12.0
|
|
14
|
+
- @xwiki/cristal-navigation-tree-default@0.12.0
|
|
15
|
+
- @xwiki/cristal-electron-storage@0.12.0
|
|
16
|
+
|
|
17
|
+
## 0.11.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- d54422d: Cristal 0.11 Release
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [d54422d]
|
|
26
|
+
- @xwiki/cristal-api@0.11.0
|
|
27
|
+
- @xwiki/cristal-navigation-tree-api@0.11.0
|
|
28
|
+
- @xwiki/cristal-navigation-tree-default@0.11.0
|
|
29
|
+
- @xwiki/cristal-electron-storage@0.11.0
|
|
30
|
+
|
|
3
31
|
## 0.10.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { injectable as g, inject as l } from "inversify";
|
|
2
1
|
import { name as m } from "@xwiki/cristal-navigation-tree-api";
|
|
3
|
-
import { getParentNodesIdFromPath as
|
|
2
|
+
import { getParentNodesIdFromPath as g } from "@xwiki/cristal-navigation-tree-default";
|
|
3
|
+
import { injectable as h, inject as l } from "inversify";
|
|
4
4
|
var d = Object.defineProperty, u = Object.getOwnPropertyDescriptor, f = (t, e, o, a) => {
|
|
5
5
|
for (var r = a > 1 ? void 0 : a ? u(e, o) : e, i = t.length - 1, n; i >= 0; i--)
|
|
6
6
|
(n = t[i]) && (r = (a ? n(e, o, r) : n(r)) || r);
|
|
7
7
|
return a && r && d(e, o, r), r;
|
|
8
8
|
}, p = (t, e) => (o, a) => e(o, a, t);
|
|
9
|
-
let
|
|
9
|
+
let c = class {
|
|
10
10
|
constructor(t, e) {
|
|
11
11
|
this.logger = t, this.logger.setModule(
|
|
12
12
|
"navigation-tree-filesystem.components.FileSystemNavigationTreeSource"
|
|
@@ -16,10 +16,10 @@ let s = class {
|
|
|
16
16
|
const e = t || "", o = [], { fileSystemStorage: a } = window, r = await a.listChildren(e);
|
|
17
17
|
for (const i of r)
|
|
18
18
|
if (i !== "attachments") {
|
|
19
|
-
const n = `${e}${e ? "/" : ""}${i}`,
|
|
19
|
+
const n = `${e}${e ? "/" : ""}${i}`, s = await this.cristalApp.getPage(n);
|
|
20
20
|
o.push({
|
|
21
21
|
id: n,
|
|
22
|
-
label:
|
|
22
|
+
label: s && s.name ? s.name : i,
|
|
23
23
|
location: n,
|
|
24
24
|
url: this.cristalApp.getRouter().resolve({
|
|
25
25
|
name: "view",
|
|
@@ -34,17 +34,17 @@ let s = class {
|
|
|
34
34
|
return o;
|
|
35
35
|
}
|
|
36
36
|
getParentNodesId(t) {
|
|
37
|
-
return
|
|
37
|
+
return g(t);
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
c = f([
|
|
41
|
+
h(),
|
|
42
42
|
p(0, l("Logger")),
|
|
43
43
|
p(1, l("CristalApp"))
|
|
44
|
-
],
|
|
44
|
+
], c);
|
|
45
45
|
class _ {
|
|
46
46
|
constructor(e) {
|
|
47
|
-
e.bind(m).to(
|
|
47
|
+
e.bind(m).to(c).inSingletonScope().whenTargetNamed("FileSystem");
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
export {
|
package/dist/index.es.js.map
CHANGED
|
@@ -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 { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger, PageData } from \"@xwiki/cristal-api\";\nimport {\n
|
|
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 as NavigationTreeSourceName } from \"@xwiki/cristal-navigation-tree-api\";\nimport { getParentNodesIdFromPath } from \"@xwiki/cristal-navigation-tree-default\";\nimport { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger, PageData } from \"@xwiki/cristal-api\";\nimport type {\n NavigationTreeNode,\n NavigationTreeSource,\n} from \"@xwiki/cristal-navigation-tree-api\";\n\n/**\n * Implementation of NavigationTreeSource for the FileSystem backend.\n *\n * @since 0.10\n **/\n@injectable()\nclass FileSystemNavigationTreeSource implements NavigationTreeSource {\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(\n \"navigation-tree-filesystem.components.FileSystemNavigationTreeSource\",\n );\n this.cristalApp = cristalApp;\n }\n\n async getChildNodes(id?: string): Promise<Array<NavigationTreeNode>> {\n const currentId = id ? id : \"\";\n const navigationTree: Array<NavigationTreeNode> = [];\n\n // eslint-disable-next-line\n const { fileSystemStorage } = window as any;\n const children = await fileSystemStorage.listChildren(currentId);\n\n for (const child of children) {\n // Remove attachments folders\n if (child !== \"attachments\") {\n const id = `${currentId}${currentId ? \"/\" : \"\"}${child}`;\n const currentPageData = await this.cristalApp.getPage(id);\n navigationTree.push({\n id: id,\n label:\n currentPageData && currentPageData.name\n ? currentPageData.name\n : child,\n location: id,\n url: this.cristalApp.getRouter().resolve({\n name: \"view\",\n params: {\n page: id,\n },\n }).href,\n has_children: true, // TODO: Detect empty folders.\n });\n }\n }\n\n return navigationTree;\n }\n\n getParentNodesId(page?: PageData): Array<string> {\n return getParentNodesIdFromPath(page);\n }\n}\n\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<NavigationTreeSource>(NavigationTreeSourceName)\n .to(FileSystemNavigationTreeSource)\n .inSingletonScope()\n .whenTargetNamed(\"FileSystem\");\n }\n}\n"],"names":["FileSystemNavigationTreeSource","logger","cristalApp","id","currentId","navigationTree","fileSystemStorage","children","child","currentPageData","page","getParentNodesIdFromPath","__decorateClass","injectable","__decorateParam","ComponentInit","container","NavigationTreeSourceName"],"mappings":";;;;;;;;AAmCA,IAAMA,IAAN,MAAqE;AAAA,EAInE,YAC4BC,GACQC,GAClC;AACA,SAAK,SAASD,GACd,KAAK,OAAO;AAAA,MACV;AAAA,IAAA,GAEF,KAAK,aAAaC;AAAA,EACpB;AAAA,EAEA,MAAM,cAAcC,GAAiD;AAC7D,UAAAC,IAAYD,KAAU,IACtBE,IAA4C,CAAA,GAG5C,EAAE,mBAAAC,EAAsB,IAAA,QACxBC,IAAW,MAAMD,EAAkB,aAAaF,CAAS;AAE/D,eAAWI,KAASD;AAElB,UAAIC,MAAU,eAAe;AACrBL,cAAAA,IAAK,GAAGC,CAAS,GAAGA,IAAY,MAAM,EAAE,GAAGI,CAAK,IAChDC,IAAkB,MAAM,KAAK,WAAW,QAAQN,CAAE;AACxD,QAAAE,EAAe,KAAK;AAAA,UAClB,IAAIF;AAAAA,UACJ,OACEM,KAAmBA,EAAgB,OAC/BA,EAAgB,OAChBD;AAAA,UACN,UAAUL;AAAAA,UACV,KAAK,KAAK,WAAW,UAAA,EAAY,QAAQ;AAAA,YACvC,MAAM;AAAA,YACN,QAAQ;AAAA,cACN,MAAMA;AAAAA,YACR;AAAA,UACD,CAAA,EAAE;AAAA,UACH,cAAc;AAAA;AAAA,QAAA,CACf;AAAA,MACH;AAGK,WAAAE;AAAA,EACT;AAAA,EAEA,iBAAiBK,GAAgC;AAC/C,WAAOC,EAAyBD,CAAI;AAAA,EACtC;AACF;AApDMV,IAANY,EAAA;AAAA,EADCC,EAAW;AAAA,EAMPC,OAAe,QAAQ,CAAA;AAAA,EACvBA,OAAmB,YAAY,CAAA;AAAA,GAN9Bd,CAAA;AAsDC,MAAMe,EAAc;AAAA,EACzB,YAAYC,GAAsB;AAE7B,IAAAA,EAAA,KAA2BC,CAAwB,EACnD,GAAGjB,CAA8B,EACjC,iBACA,EAAA,gBAAgB,YAAY;AAAA,EACjC;AACF;"}
|
package/dist/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(i,
|
|
1
|
+
(function(i,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("@xwiki/cristal-navigation-tree-api"),require("@xwiki/cristal-navigation-tree-default"),require("inversify")):typeof define=="function"&&define.amd?define(["exports","@xwiki/cristal-navigation-tree-api","@xwiki/cristal-navigation-tree-default","inversify"],c):(i=typeof globalThis<"u"?globalThis:i||self,c(i["cristal_navigation-tree-filesystem"]={},i.cristalNavigationTreeApi,i.cristalNavigationTreeDefault,i.inversify))})(this,function(i,c,f,l){"use strict";var g=Object.defineProperty,v=Object.getOwnPropertyDescriptor,m=(t,e,r,a)=>{for(var n=a>1?void 0:a?v(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(n=(a?o(e,r,n):o(n))||n);return a&&n&&g(e,r,n),n},d=(t,e)=>(r,a)=>e(r,a,t);let p=class{constructor(t,e){this.logger=t,this.logger.setModule("navigation-tree-filesystem.components.FileSystemNavigationTreeSource"),this.cristalApp=e}async getChildNodes(t){const e=t||"",r=[],{fileSystemStorage:a}=window,n=await a.listChildren(e);for(const s of n)if(s!=="attachments"){const o=`${e}${e?"/":""}${s}`,u=await this.cristalApp.getPage(o);r.push({id:o,label:u&&u.name?u.name:s,location:o,url:this.cristalApp.getRouter().resolve({name:"view",params:{page:o}}).href,has_children:!0})}return r}getParentNodesId(t){return f.getParentNodesIdFromPath(t)}};p=m([l.injectable(),d(0,l.inject("Logger")),d(1,l.inject("CristalApp"))],p);class h{constructor(e){e.bind(c.name).to(p).inSingletonScope().whenTargetNamed("FileSystem")}}i.ComponentInit=h,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|
package/dist/index.umd.js.map
CHANGED
|
@@ -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 { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger, PageData } from \"@xwiki/cristal-api\";\nimport {\n
|
|
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 as NavigationTreeSourceName } from \"@xwiki/cristal-navigation-tree-api\";\nimport { getParentNodesIdFromPath } from \"@xwiki/cristal-navigation-tree-default\";\nimport { Container, inject, injectable } from \"inversify\";\nimport type { CristalApp, Logger, PageData } from \"@xwiki/cristal-api\";\nimport type {\n NavigationTreeNode,\n NavigationTreeSource,\n} from \"@xwiki/cristal-navigation-tree-api\";\n\n/**\n * Implementation of NavigationTreeSource for the FileSystem backend.\n *\n * @since 0.10\n **/\n@injectable()\nclass FileSystemNavigationTreeSource implements NavigationTreeSource {\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(\n \"navigation-tree-filesystem.components.FileSystemNavigationTreeSource\",\n );\n this.cristalApp = cristalApp;\n }\n\n async getChildNodes(id?: string): Promise<Array<NavigationTreeNode>> {\n const currentId = id ? id : \"\";\n const navigationTree: Array<NavigationTreeNode> = [];\n\n // eslint-disable-next-line\n const { fileSystemStorage } = window as any;\n const children = await fileSystemStorage.listChildren(currentId);\n\n for (const child of children) {\n // Remove attachments folders\n if (child !== \"attachments\") {\n const id = `${currentId}${currentId ? \"/\" : \"\"}${child}`;\n const currentPageData = await this.cristalApp.getPage(id);\n navigationTree.push({\n id: id,\n label:\n currentPageData && currentPageData.name\n ? currentPageData.name\n : child,\n location: id,\n url: this.cristalApp.getRouter().resolve({\n name: \"view\",\n params: {\n page: id,\n },\n }).href,\n has_children: true, // TODO: Detect empty folders.\n });\n }\n }\n\n return navigationTree;\n }\n\n getParentNodesId(page?: PageData): Array<string> {\n return getParentNodesIdFromPath(page);\n }\n}\n\nexport class ComponentInit {\n constructor(container: Container) {\n container\n .bind<NavigationTreeSource>(NavigationTreeSourceName)\n .to(FileSystemNavigationTreeSource)\n .inSingletonScope()\n .whenTargetNamed(\"FileSystem\");\n }\n}\n"],"names":["FileSystemNavigationTreeSource","logger","cristalApp","id","currentId","navigationTree","fileSystemStorage","children","child","currentPageData","page","getParentNodesIdFromPath","__decorateClass","injectable","__decorateParam","ComponentInit","container","NavigationTreeSourceName"],"mappings":"ivBAmCA,IAAMA,EAAN,KAAqE,CAInE,YAC4BC,EACQC,EAClC,CACA,KAAK,OAASD,EACd,KAAK,OAAO,UACV,sEAAA,EAEF,KAAK,WAAaC,CACpB,CAEA,MAAM,cAAcC,EAAiD,CAC7D,MAAAC,EAAYD,GAAU,GACtBE,EAA4C,CAAA,EAG5C,CAAE,kBAAAC,CAAsB,EAAA,OACxBC,EAAW,MAAMD,EAAkB,aAAaF,CAAS,EAE/D,UAAWI,KAASD,EAElB,GAAIC,IAAU,cAAe,CACrBL,MAAAA,EAAK,GAAGC,CAAS,GAAGA,EAAY,IAAM,EAAE,GAAGI,CAAK,GAChDC,EAAkB,MAAM,KAAK,WAAW,QAAQN,CAAE,EACxDE,EAAe,KAAK,CAClB,GAAIF,EACJ,MACEM,GAAmBA,EAAgB,KAC/BA,EAAgB,KAChBD,EACN,SAAUL,EACV,IAAK,KAAK,WAAW,UAAA,EAAY,QAAQ,CACvC,KAAM,OACN,OAAQ,CACN,KAAMA,CACR,CACD,CAAA,EAAE,KACH,aAAc,EAAA,CACf,CACH,CAGK,OAAAE,CACT,CAEA,iBAAiBK,EAAgC,CAC/C,OAAOC,EAAAA,yBAAyBD,CAAI,CACtC,CACF,EApDMV,EAANY,EAAA,CADCC,aAAW,EAMPC,aAAe,QAAQ,CAAA,EACvBA,aAAmB,YAAY,CAAA,CAAA,EAN9Bd,CAAA,EAsDC,MAAMe,CAAc,CACzB,YAAYC,EAAsB,CAE7BA,EAAA,KAA2BC,EAAwB,IAAA,EACnD,GAAGjB,CAA8B,EACjC,iBACA,EAAA,gBAAgB,YAAY,CACjC,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xwiki/cristal-navigation-tree-filesystem",
|
|
3
|
-
"version": "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/",
|
|
@@ -22,15 +22,16 @@
|
|
|
22
22
|
},
|
|
23
23
|
"main": "./dist/index.es.js",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"inversify": "6.0.
|
|
26
|
-
"@xwiki/cristal-
|
|
27
|
-
"@xwiki/cristal-
|
|
28
|
-
"@xwiki/cristal-navigation-tree-
|
|
29
|
-
"@xwiki/cristal-navigation-tree-
|
|
25
|
+
"inversify": "6.0.3",
|
|
26
|
+
"@xwiki/cristal-electron-storage": "0.12.0",
|
|
27
|
+
"@xwiki/cristal-api": "0.12.0",
|
|
28
|
+
"@xwiki/cristal-navigation-tree-default": "0.12.0",
|
|
29
|
+
"@xwiki/cristal-navigation-tree-api": "0.12.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
+
"build": "tsc --project tsconfig.json && vite build",
|
|
32
33
|
"clean": "rimraf dist",
|
|
33
|
-
"
|
|
34
|
+
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
|
|
34
35
|
},
|
|
35
36
|
"types": "./dist/index.d.ts"
|
|
36
37
|
}
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
import { name as NavigationTreeSourceName } from "@xwiki/cristal-navigation-tree-api";
|
|
22
|
+
import { getParentNodesIdFromPath } from "@xwiki/cristal-navigation-tree-default";
|
|
21
23
|
import { Container, inject, injectable } from "inversify";
|
|
22
24
|
import type { CristalApp, Logger, PageData } from "@xwiki/cristal-api";
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type NavigationTreeSource,
|
|
25
|
+
import type {
|
|
26
|
+
NavigationTreeNode,
|
|
27
|
+
NavigationTreeSource,
|
|
27
28
|
} from "@xwiki/cristal-navigation-tree-api";
|
|
28
|
-
import { getParentNodesIdFromPath } from "@xwiki/cristal-navigation-tree-default";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Implementation of NavigationTreeSource for the FileSystem backend.
|
|
@@ -63,7 +63,10 @@ class FileSystemNavigationTreeSource implements NavigationTreeSource {
|
|
|
63
63
|
const currentPageData = await this.cristalApp.getPage(id);
|
|
64
64
|
navigationTree.push({
|
|
65
65
|
id: id,
|
|
66
|
-
label:
|
|
66
|
+
label:
|
|
67
|
+
currentPageData && currentPageData.name
|
|
68
|
+
? currentPageData.name
|
|
69
|
+
: child,
|
|
67
70
|
location: id,
|
|
68
71
|
url: this.cristalApp.getRouter().resolve({
|
|
69
72
|
name: "view",
|
package/tsdoc.json
ADDED