@fluid-topics/ft-reader-toc 1.2.35 → 1.2.36
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.d.ts +1 -0
- package/build/ft-reader-toc.js +15 -5
- package/build/ft-reader-toc.light.js +172 -141
- package/build/ft-reader-toc.min.js +178 -147
- package/package.json +7 -7
package/build/ft-reader-toc.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare class FtReaderToc extends FtReaderToc_base implements FtReaderToc
|
|
|
31
31
|
toc?: Array<TocNode>;
|
|
32
32
|
currentPage?: FtReaderPage;
|
|
33
33
|
highlightedTocIds?: string[];
|
|
34
|
+
private translationLoading?;
|
|
34
35
|
automaticallyExpandedNodes: Set<string>;
|
|
35
36
|
manuallyExpandedNodes: Set<string>;
|
|
36
37
|
manuallyCollapsedNodes: Set<string>;
|
package/build/ft-reader-toc.js
CHANGED
|
@@ -17,6 +17,7 @@ import { FtIcon, FtIconVariants } from "@fluid-topics/ft-icon";
|
|
|
17
17
|
import { FtButton } from "@fluid-topics/ft-button";
|
|
18
18
|
import { FtSizeCategory, FtSizeWatcher } from "@fluid-topics/ft-size-watcher";
|
|
19
19
|
import { FtReaderTocCssVariables, styles } from "./ft-reader-toc.styles";
|
|
20
|
+
import { FtSkeleton } from "@fluid-topics/ft-skeleton";
|
|
20
21
|
import { withI18n } from "@fluid-topics/ft-i18n";
|
|
21
22
|
import { readerToc, readerTocDefaultMessages } from "./FtReaderTocMessages";
|
|
22
23
|
class FtReaderToc extends withI18n(FtReaderComponent) {
|
|
@@ -140,11 +141,16 @@ class FtReaderToc extends withI18n(FtReaderComponent) {
|
|
|
140
141
|
` : this.getLeafNodeIcon()}
|
|
141
142
|
</div>
|
|
142
143
|
` : !canDisplayChildren ? this.getLeafNodeIcon() : nothing}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
144
|
+
${this.translationLoading
|
|
145
|
+
? html `
|
|
146
|
+
<ft-skeleton></ft-skeleton>`
|
|
147
|
+
: html `
|
|
148
|
+
<ft-reader-internal-link part="node-link"
|
|
149
|
+
tocId="${node.tocId}"
|
|
150
|
+
removeStyle>
|
|
151
|
+
<ft-typography part="node-label" variant="body2">${node.title}</ft-typography>
|
|
152
|
+
</ft-reader-internal-link>
|
|
153
|
+
`}
|
|
148
154
|
</div>
|
|
149
155
|
${canDisplayChildren ? html `
|
|
150
156
|
<div id="${node.tocId}-children"
|
|
@@ -214,6 +220,7 @@ FtReaderToc.elementDefinitions = {
|
|
|
214
220
|
"ft-reader-internal-link": FtReaderInternalLink,
|
|
215
221
|
"ft-size-watcher": FtSizeWatcher,
|
|
216
222
|
"ft-typography": FtTypography,
|
|
223
|
+
"ft-skeleton": FtSkeleton
|
|
217
224
|
};
|
|
218
225
|
// language=CSS
|
|
219
226
|
FtReaderToc.styles = styles;
|
|
@@ -295,6 +302,9 @@ __decorate([
|
|
|
295
302
|
}
|
|
296
303
|
})
|
|
297
304
|
], FtReaderToc.prototype, "highlightedTocIds", void 0);
|
|
305
|
+
__decorate([
|
|
306
|
+
redux({ selector: (s) => s.translation.isLoading })
|
|
307
|
+
], FtReaderToc.prototype, "translationLoading", void 0);
|
|
298
308
|
__decorate([
|
|
299
309
|
state({ hasChanged })
|
|
300
310
|
], FtReaderToc.prototype, "automaticallyExpandedNodes", void 0);
|