@fluid-topics/ft-reader-toc 1.1.82 → 1.1.83
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.js +4 -4
- package/build/ft-reader-toc.light.js +1 -1
- package/build/ft-reader-toc.min.js +183 -183
- package/package.json +7 -7
package/build/ft-reader-toc.js
CHANGED
|
@@ -9,7 +9,7 @@ import { repeat } from "lit/directives/repeat.js";
|
|
|
9
9
|
import { classMap } from "lit/directives/class-map.js";
|
|
10
10
|
import { styleMap } from "lit/directives/style-map.js";
|
|
11
11
|
import { property, state } from "lit/decorators.js";
|
|
12
|
-
import {
|
|
12
|
+
import { hasChanged, jsonProperty, ParametrizedLabelResolver, redux } from "@fluid-topics/ft-wc-utils";
|
|
13
13
|
import { FtReaderComponent, } from "@fluid-topics/ft-reader-context/build/registration";
|
|
14
14
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
15
15
|
import { FtReaderInternalLink } from "@fluid-topics/ft-reader-internal-link";
|
|
@@ -292,13 +292,13 @@ __decorate([
|
|
|
292
292
|
})
|
|
293
293
|
], FtReaderToc.prototype, "highlightedTocIds", void 0);
|
|
294
294
|
__decorate([
|
|
295
|
-
state({ hasChanged
|
|
295
|
+
state({ hasChanged })
|
|
296
296
|
], FtReaderToc.prototype, "automaticallyExpandedNodes", void 0);
|
|
297
297
|
__decorate([
|
|
298
|
-
state({ hasChanged
|
|
298
|
+
state({ hasChanged })
|
|
299
299
|
], FtReaderToc.prototype, "manuallyExpandedNodes", void 0);
|
|
300
300
|
__decorate([
|
|
301
|
-
state({ hasChanged
|
|
301
|
+
state({ hasChanged })
|
|
302
302
|
], FtReaderToc.prototype, "manuallyCollapsedNodes", void 0);
|
|
303
303
|
__decorate([
|
|
304
304
|
state()
|
|
@@ -974,7 +974,7 @@ Also for action icons.`,n.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
974
974
|
`:at.nothing}
|
|
975
975
|
</div>
|
|
976
976
|
`}buildAutomaticallyExpandedNodes(o){var r,a;let i=new Set(this.autoCollapse?[]:this.automaticallyExpandedNodes);for(let l of o){let c=l;for(;c&&!i.has(c);)i.add(c),this.manuallyCollapsedNodes.delete(c),c=(a=(r=this.service)===null||r===void 0?void 0:r.getTocNodeNow(c))===null||a===void 0?void 0:a.parentTocId}return i}manuallyToggle(o,r){r?(this.manuallyCollapsedNodes.add(o),this.manuallyExpandedNodes.delete(o)):(this.manuallyExpandedNodes.add(o),this.manuallyCollapsedNodes.delete(o)),this.requestUpdate()}onViewportSizeChange(o){this.viewportSize=o.detail.category}toggleExpandCollapseAll(){this.expandAll=!this.expandAll,this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set}getExpandCollapseAllTooltipPosition(){switch(this.expandCollapseAllAlignment){case"right":return"left";case"left":return"right";default:return"bottom"}}getLeafNodeIcon(){return at.html`
|
|
977
|
-
<ft-icon class="ft-reader-toc--leaf-node-icon" part="leaf-node-icon" .variant="${this.leafNodeIconVariant}" .value="${this.leafNodeIcon}"></ft-icon>`}};C.elementDefinitions={"ft-button":ft,"ft-icon":Y,"ft-reader-internal-link":st,"ft-size-watcher":nt,"ft-typography":et};C.styles=Jn;L([(0,$.property)({type:Boolean})],C.prototype,"expanded",void 0);L([(0,$.property)()],C.prototype,"iconVariant",void 0);L([(0,$.property)()],C.prototype,"collapseIcon",void 0);L([(0,$.property)()],C.prototype,"expandIcon",void 0);L([(0,$.property)()],C.prototype,"leafNodeIconVariant",void 0);L([(0,$.property)()],C.prototype,"leafNodeIcon",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAll",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAllHideLabel",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAllTrailingIcon",void 0);L([(0,$.property)()],C.prototype,"expandCollapseAllAlignment",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAllHideIcon",void 0);L([(0,$.property)()],C.prototype,"expandCollapseAllIconVariant",void 0);L([(0,$.property)()],C.prototype,"collapseAllIcon",void 0);L([(0,$.property)()],C.prototype,"expandAllIcon",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"autoCollapse",void 0);L([(0,$.property)()],C.prototype,"scope",void 0);L([(0,$.property)({type:Boolean,reflect:!0})],C.prototype,"empty",void 0);L([(0,it.jsonProperty)({})],C.prototype,"labels",void 0);L([(0,it.redux)({selector:(e,o)=>{var r,a,i;return o.isCurrentPageToc?!((r=e.paginationConfiguration)===null||r===void 0)&&r.splitCurrentPageToc?(a=e.currentPage)===null||a===void 0?void 0:a.toc:void 0:!((i=e.paginationConfiguration)===null||i===void 0)&&i.splitCurrentPageToc?e.pagesToc:e.toc}})],C.prototype,"toc",void 0);L([(0,it.redux)()],C.prototype,"currentPage",void 0);L([(0,it.redux)({selector:(e,o)=>{var r,a;return!((r=e.paginationConfiguration)===null||r===void 0)&&r.splitCurrentPageToc&&!o.isCurrentPageToc?[(a=e.currentPage)===null||a===void 0?void 0:a.rootTocId]:e.visibleTopics}})],C.prototype,"highlightedTocIds",void 0);L([(0,$.state)({hasChanged:
|
|
977
|
+
<ft-icon class="ft-reader-toc--leaf-node-icon" part="leaf-node-icon" .variant="${this.leafNodeIconVariant}" .value="${this.leafNodeIcon}"></ft-icon>`}};C.elementDefinitions={"ft-button":ft,"ft-icon":Y,"ft-reader-internal-link":st,"ft-size-watcher":nt,"ft-typography":et};C.styles=Jn;L([(0,$.property)({type:Boolean})],C.prototype,"expanded",void 0);L([(0,$.property)()],C.prototype,"iconVariant",void 0);L([(0,$.property)()],C.prototype,"collapseIcon",void 0);L([(0,$.property)()],C.prototype,"expandIcon",void 0);L([(0,$.property)()],C.prototype,"leafNodeIconVariant",void 0);L([(0,$.property)()],C.prototype,"leafNodeIcon",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAll",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAllHideLabel",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAllTrailingIcon",void 0);L([(0,$.property)()],C.prototype,"expandCollapseAllAlignment",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"expandCollapseAllHideIcon",void 0);L([(0,$.property)()],C.prototype,"expandCollapseAllIconVariant",void 0);L([(0,$.property)()],C.prototype,"collapseAllIcon",void 0);L([(0,$.property)()],C.prototype,"expandAllIcon",void 0);L([(0,$.property)({type:Boolean})],C.prototype,"autoCollapse",void 0);L([(0,$.property)()],C.prototype,"scope",void 0);L([(0,$.property)({type:Boolean,reflect:!0})],C.prototype,"empty",void 0);L([(0,it.jsonProperty)({})],C.prototype,"labels",void 0);L([(0,it.redux)({selector:(e,o)=>{var r,a,i;return o.isCurrentPageToc?!((r=e.paginationConfiguration)===null||r===void 0)&&r.splitCurrentPageToc?(a=e.currentPage)===null||a===void 0?void 0:a.toc:void 0:!((i=e.paginationConfiguration)===null||i===void 0)&&i.splitCurrentPageToc?e.pagesToc:e.toc}})],C.prototype,"toc",void 0);L([(0,it.redux)()],C.prototype,"currentPage",void 0);L([(0,it.redux)({selector:(e,o)=>{var r,a;return!((r=e.paginationConfiguration)===null||r===void 0)&&r.splitCurrentPageToc&&!o.isCurrentPageToc?[(a=e.currentPage)===null||a===void 0?void 0:a.rootTocId]:e.visibleTopics}})],C.prototype,"highlightedTocIds",void 0);L([(0,$.state)({hasChanged:it.hasChanged})],C.prototype,"automaticallyExpandedNodes",void 0);L([(0,$.state)({hasChanged:it.hasChanged})],C.prototype,"manuallyExpandedNodes",void 0);L([(0,$.state)({hasChanged:it.hasChanged})],C.prototype,"manuallyCollapsedNodes",void 0);L([(0,$.state)()],C.prototype,"expandAll",void 0);L([(0,$.state)()],C.prototype,"viewportSize",void 0);(0,ea.customElement)("ft-reader-toc")(C);})();
|
|
978
978
|
/*! Bundled license information:
|
|
979
979
|
|
|
980
980
|
lit-html/lit-html.js:
|