@fluid-topics/ft-reader-toc 0.3.71 → 1.0.0-alpha.1
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/build/ft-reader-toc.css.d.ts +0 -1
- package/build/ft-reader-toc.css.js +0 -1
- package/build/ft-reader-toc.d.ts +1 -2
- package/build/ft-reader-toc.js +12 -11
- package/build/ft-reader-toc.light.js +174 -174
- package/build/ft-reader-toc.min.js +176 -186
- package/build/ft-reader-toc.properties.d.ts +0 -1
- package/build/ft-reader-toc.properties.js +0 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/package.json +8 -8
package/build/ft-reader-toc.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare class FtReaderToc extends FtReaderComponent implements FtReaderTo
|
|
|
15
15
|
expandCollapseAllTrailingIcon: boolean;
|
|
16
16
|
expandCollapseAllAlignment: "left" | "right" | "center" | "justify";
|
|
17
17
|
expandCollapseAllHideIcon: boolean;
|
|
18
|
-
expandCollapseAllIconVariant
|
|
18
|
+
expandCollapseAllIconVariant?: FtIconVariants;
|
|
19
19
|
collapseAllIcon: string;
|
|
20
20
|
expandAllIcon: string;
|
|
21
21
|
autoCollapse: boolean;
|
|
@@ -45,4 +45,3 @@ export declare class FtReaderToc extends FtReaderComponent implements FtReaderTo
|
|
|
45
45
|
private toggleExpandCollapseAll;
|
|
46
46
|
private getExpandCollapseAllTooltipPosition;
|
|
47
47
|
}
|
|
48
|
-
//# sourceMappingURL=ft-reader-toc.d.ts.map
|
package/build/ft-reader-toc.js
CHANGED
|
@@ -18,7 +18,7 @@ import { FtButton } from "@fluid-topics/ft-button";
|
|
|
18
18
|
import { FtSizeCategory, FtSizeWatcher } from "@fluid-topics/ft-size-watcher";
|
|
19
19
|
import { DEFAULT_LABELS } from "./ft-reader-toc.properties";
|
|
20
20
|
import { FtReaderTocCssVariables, styles } from "./ft-reader-toc.css";
|
|
21
|
-
|
|
21
|
+
class FtReaderToc extends FtReaderComponent {
|
|
22
22
|
constructor() {
|
|
23
23
|
super(...arguments);
|
|
24
24
|
this.expanded = false;
|
|
@@ -30,7 +30,6 @@ export class FtReaderToc extends FtReaderComponent {
|
|
|
30
30
|
this.expandCollapseAllTrailingIcon = false;
|
|
31
31
|
this.expandCollapseAllAlignment = "left";
|
|
32
32
|
this.expandCollapseAllHideIcon = false;
|
|
33
|
-
this.expandCollapseAllIconVariant = FtIconVariants.fluid_topics;
|
|
34
33
|
this.collapseAllIcon = "ICON_COLLAPSE";
|
|
35
34
|
this.expandAllIcon = "ICON_EXPAND";
|
|
36
35
|
this.autoCollapse = false;
|
|
@@ -126,7 +125,7 @@ export class FtReaderToc extends FtReaderComponent {
|
|
|
126
125
|
round hideTooltip
|
|
127
126
|
?dense=${this.viewportSize !== FtSizeCategory.S}
|
|
128
127
|
label="${this.labelResolver.resolve(isExpanded ? "collapse" : "expand", node.title)}"
|
|
129
|
-
iconVariant="${this.iconVariant}"
|
|
128
|
+
.iconVariant="${this.iconVariant}"
|
|
130
129
|
icon="${isExpanded ? (this.collapseIcon || "MINUS") : (this.expandIcon || "PLUS")}"
|
|
131
130
|
@click=${() => this.manuallyToggle(node.tocId, isExpanded)}
|
|
132
131
|
data-expand-node="${node.tocId}"
|
|
@@ -260,22 +259,24 @@ __decorate([
|
|
|
260
259
|
jsonProperty({})
|
|
261
260
|
], FtReaderToc.prototype, "labels", void 0);
|
|
262
261
|
__decorate([
|
|
263
|
-
redux(
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
262
|
+
redux({
|
|
263
|
+
selector: (s, self) => {
|
|
264
|
+
var _a, _b, _c;
|
|
265
|
+
if (self.isCurrentPageToc) {
|
|
266
|
+
return ((_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc) ? (_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.toc : undefined;
|
|
267
|
+
}
|
|
268
|
+
return ((_c = s.paginationConfiguration) === null || _c === void 0 ? void 0 : _c.splitCurrentPageToc) ? s.pagesToc : s.toc;
|
|
267
269
|
}
|
|
268
|
-
return ((_c = s.paginationConfiguration) === null || _c === void 0 ? void 0 : _c.splitCurrentPageToc) ? s.pagesToc : s.toc;
|
|
269
270
|
})
|
|
270
271
|
], FtReaderToc.prototype, "toc", void 0);
|
|
271
272
|
__decorate([
|
|
272
|
-
redux((s) => { var _a; return (_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc; })
|
|
273
|
+
redux({ selector: (s) => { var _a; return (_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc; } })
|
|
273
274
|
], FtReaderToc.prototype, "splitToc", void 0);
|
|
274
275
|
__decorate([
|
|
275
276
|
redux()
|
|
276
277
|
], FtReaderToc.prototype, "currentPage", void 0);
|
|
277
278
|
__decorate([
|
|
278
|
-
redux((s, self) => { var _a, _b; return ((_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc) && !self.isCurrentPageToc ? [(_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.rootTocId] : s.visibleTopics; })
|
|
279
|
+
redux({ selector: (s, self) => { var _a, _b; return ((_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc) && !self.isCurrentPageToc ? [(_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.rootTocId] : s.visibleTopics; } })
|
|
279
280
|
], FtReaderToc.prototype, "highlightedTocIds", void 0);
|
|
280
281
|
__decorate([
|
|
281
282
|
state({ hasChanged: (value, oldValue) => !deepEqual(value, oldValue) })
|
|
@@ -292,4 +293,4 @@ __decorate([
|
|
|
292
293
|
__decorate([
|
|
293
294
|
state()
|
|
294
295
|
], FtReaderToc.prototype, "viewportSize", void 0);
|
|
295
|
-
|
|
296
|
+
export { FtReaderToc };
|