@fluid-topics/ft-reader-toc 1.2.16 → 1.2.19
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 +18 -14
- package/build/ft-reader-toc.js +2 -2
- package/build/ft-reader-toc.light.js +3 -3
- package/build/ft-reader-toc.min.js +62 -62
- package/package.json +7 -7
package/build/ft-reader-toc.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { PropertyValues, TemplateResult } from "lit";
|
|
2
|
-
import { ElementDefinitionsMap } from "@fluid-topics/ft-wc-utils";
|
|
3
|
-
import { FtReaderComponent } from "@fluid-topics/ft-reader-context/build/registration";
|
|
2
|
+
import { ElementDefinitionsMap, ParametrizedLabelResolver } from "@fluid-topics/ft-wc-utils";
|
|
3
|
+
import { FtReaderComponent, FtReaderPage, FtReaderTocNode } from "@fluid-topics/ft-reader-context/build/registration";
|
|
4
4
|
import { FtIconVariants } from "@fluid-topics/ft-icon";
|
|
5
|
+
import { FtSizeCategory } from "@fluid-topics/ft-size-watcher";
|
|
5
6
|
import { FtReaderTocLabels, FtReaderTocProperties } from "./ft-reader-toc.properties";
|
|
7
|
+
import { FtPagesTocNode } from "@fluid-topics/ft-reader-context/build/store/model";
|
|
8
|
+
type TocNode = FtReaderTocNode | FtPagesTocNode;
|
|
6
9
|
export declare class FtReaderToc extends FtReaderComponent implements FtReaderTocProperties {
|
|
7
10
|
static elementDefinitions: ElementDefinitionsMap;
|
|
8
11
|
static styles: import("lit").CSSResult;
|
|
@@ -25,19 +28,19 @@ export declare class FtReaderToc extends FtReaderComponent implements FtReaderTo
|
|
|
25
28
|
scope: FtReaderTocProperties["scope"];
|
|
26
29
|
empty: boolean;
|
|
27
30
|
labels: FtReaderTocLabels;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
labelResolver: ParametrizedLabelResolver<FtReaderTocLabels>;
|
|
32
|
+
toc?: Array<TocNode>;
|
|
33
|
+
currentPage?: FtReaderPage;
|
|
34
|
+
highlightedTocIds?: string[];
|
|
35
|
+
automaticallyExpandedNodes: Set<string>;
|
|
36
|
+
manuallyExpandedNodes: Set<string>;
|
|
37
|
+
manuallyCollapsedNodes: Set<string>;
|
|
38
|
+
expandAll: boolean;
|
|
39
|
+
viewportSize: FtSizeCategory;
|
|
40
|
+
nodesToExpandExist: boolean;
|
|
38
41
|
get isCurrentPageToc(): boolean;
|
|
39
|
-
protected update(changedProperties: PropertyValues): void;
|
|
40
|
-
protected contentAvailableCallback(props: PropertyValues): void;
|
|
42
|
+
protected update(changedProperties: PropertyValues<FtReaderToc>): void;
|
|
43
|
+
protected contentAvailableCallback(props: PropertyValues<FtReaderToc>): void;
|
|
41
44
|
protected render(): TemplateResult<1>;
|
|
42
45
|
private renderExpandCollapseAll;
|
|
43
46
|
private renderNode;
|
|
@@ -48,3 +51,4 @@ export declare class FtReaderToc extends FtReaderComponent implements FtReaderTo
|
|
|
48
51
|
private getExpandCollapseAllTooltipPosition;
|
|
49
52
|
private getLeafNodeIcon;
|
|
50
53
|
}
|
|
54
|
+
export {};
|
package/build/ft-reader-toc.js
CHANGED
|
@@ -70,7 +70,7 @@ class FtReaderToc extends FtReaderComponent {
|
|
|
70
70
|
if (this.scrollCurrentTopicIntoView && props.has("highlightedTocIds") && this.highlightedTocIds && ((_a = this.highlightedTocIds) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
71
71
|
const target = (_b = this.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(`[tocId="${this.highlightedTocIds[0]}"]`);
|
|
72
72
|
if (target) {
|
|
73
|
-
scrollHelper.scrollIntoViewIfPossible(target, { behavior: "
|
|
73
|
+
scrollHelper.scrollIntoViewIfPossible(target, { behavior: "instant", position: .25 });
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -298,7 +298,7 @@ __decorate([
|
|
|
298
298
|
selector: (s, self) => {
|
|
299
299
|
var _a, _b;
|
|
300
300
|
return ((_a = s.paginationConfiguration) === null || _a === void 0 ? void 0 : _a.splitCurrentPageToc) && !self.isCurrentPageToc
|
|
301
|
-
?
|
|
301
|
+
? (((_b = s.currentPage) === null || _b === void 0 ? void 0 : _b.rootTocId) ? [s.currentPage.rootTocId] : [])
|
|
302
302
|
: s.visibleTopics;
|
|
303
303
|
}
|
|
304
304
|
})
|
|
@@ -132,7 +132,7 @@ Also for action icons.`,r.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
132
132
|
@click=${n=>this.onLinkClick(n)}>
|
|
133
133
|
<slot></slot>
|
|
134
134
|
</a>
|
|
135
|
-
`}onLinkClick(o){var a;!o.ctrlKey&&!o.metaKey&&(o.stopPropagation(),o.preventDefault(),performance.mark(`fluid_topics__reader_link_click__${this.tocId}`),(a=this.stateManager)===null||a===void 0||a.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}};dt.styles=Dr;$e([(0,pe.property)()],dt.prototype,"tocId",void 0);$e([(0,pe.property)()],dt.prototype,"section",void 0);$e([(0,pe.property)({type:Number})],dt.prototype,"pageNumber",void 0);$e([(0,pe.property)({type:Boolean})],dt.prototype,"removeStyle",void 0);(0,Mr.customElement)("ft-reader-internal-link")(dt);var Xr=b(w());var fe=b(z()),kt=b(lt()),jr=b(w()),Yr=b(Kr());var Be;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.EYE="",e.SHARE="󨃱",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE=""})(Be||(Be={}));var g;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(g||(g={}));var wd=new Map([...["abw"].map(e=>[e,g.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,g.AUDIO]),...["avi"].map(e=>[e,g.AVI]),...["chm","xhs"].map(e=>[e,g.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,g.CODE]),...["csv"].map(e=>[e,g.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,g.DITA]),...["epub"].map(e=>[e,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,g.EXCEL]),...["flac"].map(e=>[e,g.FLAC]),...["gif"].map(e=>[e,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,g.GZIP]),...["html","htm","xhtml"].map(e=>[e,g.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,g.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,g.JPEG]),...["json"].map(e=>[e,g.JSON]),...["m4a","m4p"].map(e=>[e,g.M4A]),...["mov","qt"].map(e=>[e,g.MOV]),...["mp3"].map(e=>[e,g.MP3]),...["mp4","m4v"].map(e=>[e,g.MP4]),...["ogg","oga"].map(e=>[e,g.OGG]),...["pdf","ps"].map(e=>[e,g.PDF]),...["png"].map(e=>[e,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,g.POWERPOINT]),...["rar"].map(e=>[e,g.RAR]),...["stp"].map(e=>[e,g.STP]),...["txt","rtf","md","mdown"].map(e=>[e,g.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,g.VIDEO]),...["wav"].map(e=>[e,g.WAV]),...["wma"].map(e=>[e,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,g.WORD]),...["xml","xsl","rdf"].map(e=>[e,g.XML]),...["yaml","yml","x-yaml"].map(e=>[e,g.YAML]),...["zip"].map(e=>[e,g.ZIP])]);var Ld={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Fr=b(z()),xt=b(w()),X={size:xt.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:xt.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",xt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:xt.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",xt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:xt.FtCssVariableFactory.extend("--ft-icon-material-font-family","",xt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:xt.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Vr=Fr.css`
|
|
135
|
+
`}onLinkClick(o){var a;!o.ctrlKey&&!o.metaKey&&(o.stopPropagation(),o.preventDefault(),performance.mark(`fluid_topics__reader_link_click__${this.tocId}`),(a=this.stateManager)===null||a===void 0||a.navigateToTopic(this.tocId,this.section,this.pageNumber),this.click())}};dt.styles=Dr;$e([(0,pe.property)()],dt.prototype,"tocId",void 0);$e([(0,pe.property)()],dt.prototype,"section",void 0);$e([(0,pe.property)({type:Number})],dt.prototype,"pageNumber",void 0);$e([(0,pe.property)({type:Boolean})],dt.prototype,"removeStyle",void 0);(0,Mr.customElement)("ft-reader-internal-link")(dt);var Xr=b(w());var fe=b(z()),kt=b(lt()),jr=b(w()),Yr=b(Kr());var Be;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.EXPAND="",e.COMPRESS="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.PAPER_PLANE_SLASH="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROW_ROTATE_LEFT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.EYE="",e.SHARE="󨃱",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE=""})(Be||(Be={}));var g;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(g||(g={}));var wd=new Map([...["abw"].map(e=>[e,g.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,g.AUDIO]),...["avi"].map(e=>[e,g.AVI]),...["chm","xhs"].map(e=>[e,g.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,g.CODE]),...["csv"].map(e=>[e,g.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,g.DITA]),...["epub"].map(e=>[e,g.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,g.EXCEL]),...["flac"].map(e=>[e,g.FLAC]),...["gif"].map(e=>[e,g.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,g.GZIP]),...["html","htm","xhtml"].map(e=>[e,g.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,g.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,g.JPEG]),...["json"].map(e=>[e,g.JSON]),...["m4a","m4p"].map(e=>[e,g.M4A]),...["mov","qt"].map(e=>[e,g.MOV]),...["mp3"].map(e=>[e,g.MP3]),...["mp4","m4v"].map(e=>[e,g.MP4]),...["ogg","oga"].map(e=>[e,g.OGG]),...["pdf","ps"].map(e=>[e,g.PDF]),...["png"].map(e=>[e,g.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,g.POWERPOINT]),...["rar"].map(e=>[e,g.RAR]),...["stp"].map(e=>[e,g.STP]),...["txt","rtf","md","mdown"].map(e=>[e,g.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,g.VIDEO]),...["wav"].map(e=>[e,g.WAV]),...["wma"].map(e=>[e,g.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,g.WORD]),...["xml","xsl","rdf"].map(e=>[e,g.XML]),...["yaml","yml","x-yaml"].map(e=>[e,g.YAML]),...["zip"].map(e=>[e,g.ZIP])]);var Ld={[g.ABW]:"#91ABC6",[g.AUDIO]:"#1795E3",[g.AVI]:"#E63324",[g.CHM]:"#71C3EB",[g.CODE]:"#71C3EB",[g.CSV]:"#1F7345",[g.DITA]:"#71C3EB",[g.EPUB]:"#85B926",[g.EXCEL]:"#1F7345",[g.FLAC]:"#1795E3",[g.GIF]:"#59B031",[g.GZIP]:"#F8AB36",[g.HTML]:"#71C3EB",[g.IMAGE]:"#59B031",[g.JPEG]:"#59B031",[g.JSON]:"#71C3EB",[g.M4A]:"#1795E3",[g.MOV]:"#E63324",[g.MP3]:"#1795E3",[g.MP4]:"#E63324",[g.OGG]:"#1795E3",[g.PDF]:"#E44948",[g.PNG]:"#59B031",[g.POWERPOINT]:"#B54A2B",[g.RAR]:"#F8AB36",[g.STP]:"#3764B1",[g.TEXT]:"#3162AB",[g.UNKNOWN]:"#999999",[g.VIDEO]:"#E63324",[g.WAV]:"#1795E3",[g.WMA]:"#1795E3",[g.WORD]:"#3162AB",[g.XML]:"#71C3EB",[g.YAML]:"#71C3EB",[g.ZIP]:"#F8AB36"};var Fr=b(z()),xt=b(w()),X={size:xt.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:xt.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",xt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:xt.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",xt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:xt.FtCssVariableFactory.extend("--ft-icon-material-font-family","",xt.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:xt.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},Vr=Fr.css`
|
|
136
136
|
:host, i.ft-icon {
|
|
137
137
|
display: inline-flex;
|
|
138
138
|
align-items: center;
|
|
@@ -1178,7 +1178,7 @@ Also for action icons.`,r.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
1178
1178
|
.ft-reader-toc-expand-collapse-all-justify ft-button {
|
|
1179
1179
|
flex-grow: 1;
|
|
1180
1180
|
}
|
|
1181
|
-
`;var A=function(e,o,a,n){var l=arguments.length,c=l<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,a):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,o,a,n);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(c=(l<3?s(c):l>3?s(o,a,c):s(o,a))||c);return l>3&&c&&Object.defineProperty(o,a,c),c},N=class extends Gt{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=at.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.leafNodeIconVariant=at.fluid_topics,this.leafNodeIcon="DOT",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scrollCurrentTopicIntoView=!1,this.scope="pages",this.empty=!0,this.labels={},this.labelResolver=new q.ParametrizedLabelResolver(mo,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=ot.M,this.nodesToExpandExist=!1}get isCurrentPageToc(){return this.scope==="current-page"}update(o){var a,n,l;super.update(o),o.has("toc")&&(this.nodesToExpandExist=((a=this.toc)!==null&&a!==void 0?a:[]).some(c=>c.children.length>0)),o.has("labels")&&(this.labelResolver=new q.ParametrizedLabelResolver(mo,this.labels)),o.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes((n=this.highlightedTocIds)!==null&&n!==void 0?n:[])),this.empty=((l=this.toc)!==null&&l!==void 0?l:[]).length===0}contentAvailableCallback(o){var a,n;if(super.contentAvailableCallback(o),this.scrollCurrentTopicIntoView&&o.has("highlightedTocIds")&&this.highlightedTocIds&&((a=this.highlightedTocIds)===null||a===void 0?void 0:a.length)>0){let l=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`[tocId="${this.highlightedTocIds[0]}"]`);l&&q.scrollHelper.scrollIntoViewIfPossible(l,{behavior:"
|
|
1181
|
+
`;var A=function(e,o,a,n){var l=arguments.length,c=l<3?o:n===null?n=Object.getOwnPropertyDescriptor(o,a):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,o,a,n);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(c=(l<3?s(c):l>3?s(o,a,c):s(o,a))||c);return l>3&&c&&Object.defineProperty(o,a,c),c},N=class extends Gt{constructor(){super(...arguments),this.expanded=!1,this.iconVariant=at.fluid_topics,this.collapseIcon="MINUS",this.expandIcon="PLUS",this.leafNodeIconVariant=at.fluid_topics,this.leafNodeIcon="DOT",this.expandCollapseAll=!1,this.expandCollapseAllHideLabel=!1,this.expandCollapseAllTrailingIcon=!1,this.expandCollapseAllAlignment="left",this.expandCollapseAllHideIcon=!1,this.collapseAllIcon="ICON_COLLAPSE",this.expandAllIcon="ICON_EXPAND",this.autoCollapse=!1,this.scrollCurrentTopicIntoView=!1,this.scope="pages",this.empty=!0,this.labels={},this.labelResolver=new q.ParametrizedLabelResolver(mo,{}),this.automaticallyExpandedNodes=new Set,this.manuallyExpandedNodes=new Set,this.manuallyCollapsedNodes=new Set,this.expandAll=!1,this.viewportSize=ot.M,this.nodesToExpandExist=!1}get isCurrentPageToc(){return this.scope==="current-page"}update(o){var a,n,l;super.update(o),o.has("toc")&&(this.nodesToExpandExist=((a=this.toc)!==null&&a!==void 0?a:[]).some(c=>c.children.length>0)),o.has("labels")&&(this.labelResolver=new q.ParametrizedLabelResolver(mo,this.labels)),o.has("highlightedTocIds")&&!this.expanded&&(this.automaticallyExpandedNodes=this.buildAutomaticallyExpandedNodes((n=this.highlightedTocIds)!==null&&n!==void 0?n:[])),this.empty=((l=this.toc)!==null&&l!==void 0?l:[]).length===0}contentAvailableCallback(o){var a,n;if(super.contentAvailableCallback(o),this.scrollCurrentTopicIntoView&&o.has("highlightedTocIds")&&this.highlightedTocIds&&((a=this.highlightedTocIds)===null||a===void 0?void 0:a.length)>0){let l=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(`[tocId="${this.highlightedTocIds[0]}"]`);l&&q.scrollHelper.scrollIntoViewIfPossible(l,{behavior:"instant",position:.25})}}render(){var o;let a={"ft-reader-toc":!0,"ft-reader-toc-mobile":this.viewportSize===ot.S,"ft-reader-toc-desktop":this.viewportSize!==ot.S,"ft-reader-toc-loaded":this.currentPage!=null,"ft-reader-toc-expanded":this.expanded};return st.html`
|
|
1182
1182
|
<div class=${(0,Qa.classMap)(a)}>
|
|
1183
1183
|
<ft-size-watcher @change=${this.onViewportSizeChange}></ft-size-watcher>
|
|
1184
1184
|
${this.renderExpandCollapseAll()}
|
|
@@ -1238,7 +1238,7 @@ Also for action icons.`,r.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
|
|
|
1238
1238
|
part="leaf-node-icon"
|
|
1239
1239
|
.variant="${this.leafNodeIconVariant}"
|
|
1240
1240
|
.value="${this.leafNodeIcon}"></ft-icon>
|
|
1241
|
-
`}};N.elementDefinitions={"ft-button":ft,"ft-icon":Q,"ft-reader-internal-link":dt,"ft-size-watcher":it,"ft-typography":rt};N.styles=qa;A([(0,I.property)({type:Boolean})],N.prototype,"expanded",void 0);A([(0,I.property)()],N.prototype,"iconVariant",void 0);A([(0,I.property)()],N.prototype,"collapseIcon",void 0);A([(0,I.property)()],N.prototype,"expandIcon",void 0);A([(0,I.property)()],N.prototype,"leafNodeIconVariant",void 0);A([(0,I.property)()],N.prototype,"leafNodeIcon",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAll",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAllHideLabel",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAllTrailingIcon",void 0);A([(0,I.property)()],N.prototype,"expandCollapseAllAlignment",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAllHideIcon",void 0);A([(0,I.property)()],N.prototype,"expandCollapseAllIconVariant",void 0);A([(0,I.property)()],N.prototype,"collapseAllIcon",void 0);A([(0,I.property)()],N.prototype,"expandAllIcon",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"autoCollapse",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"scrollCurrentTopicIntoView",void 0);A([(0,I.property)()],N.prototype,"scope",void 0);A([(0,I.property)({type:Boolean,reflect:!0})],N.prototype,"empty",void 0);A([(0,q.jsonProperty)({})],N.prototype,"labels",void 0);A([(0,q.redux)({selector:(e,o)=>{var a,n,l;return o.isCurrentPageToc?!((a=e.paginationConfiguration)===null||a===void 0)&&a.splitCurrentPageToc?(n=e.currentPage)===null||n===void 0?void 0:n.toc:void 0:!((l=e.paginationConfiguration)===null||l===void 0)&&l.splitCurrentPageToc?e.pagesToc:e.toc}})],N.prototype,"toc",void 0);A([(0,q.redux)()],N.prototype,"currentPage",void 0);A([(0,q.redux)({selector:(e,o)=>{var a,n;return!((a=e.paginationConfiguration)===null||a===void 0)&&a.splitCurrentPageToc&&!o.isCurrentPageToc
|
|
1241
|
+
`}};N.elementDefinitions={"ft-button":ft,"ft-icon":Q,"ft-reader-internal-link":dt,"ft-size-watcher":it,"ft-typography":rt};N.styles=qa;A([(0,I.property)({type:Boolean})],N.prototype,"expanded",void 0);A([(0,I.property)()],N.prototype,"iconVariant",void 0);A([(0,I.property)()],N.prototype,"collapseIcon",void 0);A([(0,I.property)()],N.prototype,"expandIcon",void 0);A([(0,I.property)()],N.prototype,"leafNodeIconVariant",void 0);A([(0,I.property)()],N.prototype,"leafNodeIcon",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAll",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAllHideLabel",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAllTrailingIcon",void 0);A([(0,I.property)()],N.prototype,"expandCollapseAllAlignment",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"expandCollapseAllHideIcon",void 0);A([(0,I.property)()],N.prototype,"expandCollapseAllIconVariant",void 0);A([(0,I.property)()],N.prototype,"collapseAllIcon",void 0);A([(0,I.property)()],N.prototype,"expandAllIcon",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"autoCollapse",void 0);A([(0,I.property)({type:Boolean})],N.prototype,"scrollCurrentTopicIntoView",void 0);A([(0,I.property)()],N.prototype,"scope",void 0);A([(0,I.property)({type:Boolean,reflect:!0})],N.prototype,"empty",void 0);A([(0,q.jsonProperty)({})],N.prototype,"labels",void 0);A([(0,q.redux)({selector:(e,o)=>{var a,n,l;return o.isCurrentPageToc?!((a=e.paginationConfiguration)===null||a===void 0)&&a.splitCurrentPageToc?(n=e.currentPage)===null||n===void 0?void 0:n.toc:void 0:!((l=e.paginationConfiguration)===null||l===void 0)&&l.splitCurrentPageToc?e.pagesToc:e.toc}})],N.prototype,"toc",void 0);A([(0,q.redux)()],N.prototype,"currentPage",void 0);A([(0,q.redux)({selector:(e,o)=>{var a,n;return!((a=e.paginationConfiguration)===null||a===void 0)&&a.splitCurrentPageToc&&!o.isCurrentPageToc?!((n=e.currentPage)===null||n===void 0)&&n.rootTocId?[e.currentPage.rootTocId]:[]:e.visibleTopics}})],N.prototype,"highlightedTocIds",void 0);A([(0,I.state)({hasChanged:q.hasChanged})],N.prototype,"automaticallyExpandedNodes",void 0);A([(0,I.state)({hasChanged:q.hasChanged})],N.prototype,"manuallyExpandedNodes",void 0);A([(0,I.state)({hasChanged:q.hasChanged})],N.prototype,"manuallyCollapsedNodes",void 0);A([(0,I.state)()],N.prototype,"expandAll",void 0);A([(0,I.state)()],N.prototype,"viewportSize",void 0);(0,tn.customElement)("ft-reader-toc")(N);})();
|
|
1242
1242
|
/*! Bundled license information:
|
|
1243
1243
|
|
|
1244
1244
|
lit-html/lit-html.js:
|