@fluid-topics/ft-reader-context 2.1.17 → 2.1.18

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.
@@ -90,28 +90,28 @@ class EnrichedTocBuilder {
90
90
  });
91
91
  }
92
92
  buildPage(node, parentTocId) {
93
- var _a, _b, _c, _d, _e, _f, _g;
94
- const rootTocId = (_a = node.tocId) !== null && _a !== void 0 ? _a : (_b = node.pageToc) === null || _b === void 0 ? void 0 : _b[0].tocId;
93
+ var _a, _b, _c, _d, _e, _f, _g, _h;
94
+ const rootTocId = (_a = node.tocId) !== null && _a !== void 0 ? _a : (_c = (_b = node.pageToc) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.tocId;
95
95
  const page = {
96
96
  number: this.pages.length + 1,
97
- title: (_c = node.title) !== null && _c !== void 0 ? _c : "",
97
+ title: (_d = node.title) !== null && _d !== void 0 ? _d : "",
98
98
  untranslatedTitle: node.untranslatedTitle,
99
99
  rootTocId: rootTocId !== null && rootTocId !== void 0 ? rootTocId : "root",
100
- toc: ((_d = node.pageToc) !== null && _d !== void 0 ? _d : []).map((n) => this.nodeByTocId[n.tocId]),
100
+ toc: ((_e = node.pageToc) !== null && _e !== void 0 ? _e : []).map((n) => this.nodeByTocId[n.tocId]),
101
101
  topics: [],
102
102
  hiddenTopics: [],
103
103
  rootDepth: rootTocId ? this.nodeByTocId[rootTocId].depth : 1,
104
104
  breadcrumb: parentTocId ? this.buildBreadcrumb(this.nodeByTocId[parentTocId]) : [],
105
105
  };
106
106
  const add = (tocId, visible) => (visible ? page.topics : page.hiddenTopics).push(tocId);
107
- const parentsVisibility = (_f = (_e = node.pageConfiguration) === null || _e === void 0 ? void 0 : _e.parentsVisibility) !== null && _f !== void 0 ? _f : [];
107
+ const parentsVisibility = (_g = (_f = node.pageConfiguration) === null || _f === void 0 ? void 0 : _f.parentsVisibility) !== null && _g !== void 0 ? _g : [];
108
108
  page.breadcrumb.forEach((tocId, index) => {
109
109
  add(tocId, parentsVisibility[index]);
110
110
  });
111
111
  if (node.tocId) {
112
112
  add(node.tocId, node.pageConfiguration.isVisible);
113
113
  }
114
- page.topics.push(...this.tocIds((_g = node.pageToc) !== null && _g !== void 0 ? _g : []));
114
+ page.topics.push(...this.tocIds((_h = node.pageToc) !== null && _h !== void 0 ? _h : []));
115
115
  const overridenRootTocId = this.resolveOverridenRootTocIdByParentForcedByPagination(page.breadcrumb, parentsVisibility);
116
116
  page.rootTocId = overridenRootTocId !== null && overridenRootTocId !== void 0 ? overridenRootTocId : page.rootTocId;
117
117
  page.rootDepth = overridenRootTocId ? this.nodeByTocId[overridenRootTocId].depth : page.rootDepth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-context",
3
- "version": "2.1.17",
3
+ "version": "2.1.18",
4
4
  "description": "Context block for integrated reader components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,12 +19,12 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "2.1.17",
23
- "@fluid-topics/ft-wc-utils": "2.1.17",
22
+ "@fluid-topics/ft-app-context": "2.1.18",
23
+ "@fluid-topics/ft-wc-utils": "2.1.18",
24
24
  "lit": "3.1.0"
25
25
  },
26
26
  "devDependencies": {
27
- "@fluid-topics/public-api": "1.0.131"
27
+ "@fluid-topics/public-api": "1.0.132"
28
28
  },
29
- "gitHead": "2ef8ba95ea8d846d66b2e817a97f9c0fe6f3075a"
29
+ "gitHead": "2effe252f9ab22ede85f961b8464ec8aa4d27870"
30
30
  }