@salesforcedevs/docs-components 1.3.205 → 1.3.209-alpha1
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/lwc.config.json +2 -0
- package/package.json +4 -2
- package/src/modules/doc/atlasContent/atlasContent.css +52 -0
- package/src/modules/doc/atlasContent/atlasContent.html +48 -0
- package/src/modules/doc/atlasContent/atlasContent.ts +116 -0
- package/src/modules/doc/contentCallout/contentCallout.css +5 -0
- package/src/modules/doc/xmlContent/baseContentElement.ts +787 -0
- package/src/modules/doc/xmlContent/types.ts +110 -0
- package/src/modules/doc/xmlContent/utils.ts +1 -1
- package/src/modules/doc/zoominContent/mockResponses.ts +5223 -0
- package/src/modules/doc/zoominContent/zoominContent.css +52 -0
- package/src/modules/doc/zoominContent/zoominContent.html +48 -0
- package/src/modules/doc/zoominContent/zoominContent.ts +476 -0
- package/src/modules/doc/zoominContent/zoominUtils.ts +88 -0
- package/LICENSE +0 -12
|
@@ -77,6 +77,17 @@ export type ApiNavItem = {
|
|
|
77
77
|
id: string;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
+
export type ZoominApiNavItem = {
|
|
81
|
+
bundle_id: string;
|
|
82
|
+
childEntries: Array<ZoominApiNavItem>;
|
|
83
|
+
id: string;
|
|
84
|
+
nav_path: string;
|
|
85
|
+
outputclasses: Array<string>;
|
|
86
|
+
title: string;
|
|
87
|
+
url: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
|
|
80
91
|
export type ApiDocData = {
|
|
81
92
|
available_languages: Array<ApiDocLanguage>;
|
|
82
93
|
available_versions: Array<ApiDocVersion>;
|
|
@@ -115,3 +126,102 @@ export type ContentApiOptions = {
|
|
|
115
126
|
};
|
|
116
127
|
|
|
117
128
|
export type TocMap = { [key: string]: TreeNode };
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
// ZOOMIN TYPES - START
|
|
134
|
+
|
|
135
|
+
export type ZoominTocNode = {
|
|
136
|
+
id: string;
|
|
137
|
+
bundle_id: string;
|
|
138
|
+
childEntries?: Array<ZoominTocNode> | [];
|
|
139
|
+
nav_path: string;
|
|
140
|
+
outputclasses: Array<string>,
|
|
141
|
+
title: string;
|
|
142
|
+
url: string;
|
|
143
|
+
parent?: ZoominTocNode;
|
|
144
|
+
isExpanded?: boolean;
|
|
145
|
+
};
|
|
146
|
+
interface Attachment {
|
|
147
|
+
all_attachments: null;
|
|
148
|
+
topic_attachments: any[];
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
interface Dates {
|
|
152
|
+
"Added on": string;
|
|
153
|
+
"Created on": string;
|
|
154
|
+
"Initial upload": string;
|
|
155
|
+
"Updated on": string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
interface Label {
|
|
159
|
+
aliases: any[];
|
|
160
|
+
hidden: boolean;
|
|
161
|
+
isSubjectHead: boolean;
|
|
162
|
+
key: string;
|
|
163
|
+
navtitle: string;
|
|
164
|
+
outputclasses: any[];
|
|
165
|
+
subjectHeadId: string;
|
|
166
|
+
subjectheadNavtitle: string;
|
|
167
|
+
visibility: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
interface Metadata {
|
|
171
|
+
description: string;
|
|
172
|
+
"mini-toc": string;
|
|
173
|
+
outputclasses: string;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
interface ReadTimeData {
|
|
177
|
+
char_count: number;
|
|
178
|
+
img_count: number;
|
|
179
|
+
read_time: number;
|
|
180
|
+
video_links: string[];
|
|
181
|
+
word_count: number;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
interface TopicCluster {
|
|
185
|
+
clustered_by: { enabled: boolean; type: string };
|
|
186
|
+
clustered_labels: any[];
|
|
187
|
+
clustered_topics: any[];
|
|
188
|
+
clustering_title: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export type ZoominDocContent = {
|
|
192
|
+
attachments: Attachment;
|
|
193
|
+
available_languages: string[];
|
|
194
|
+
breadcrumbs: any[];
|
|
195
|
+
breadcrumbs_html: string;
|
|
196
|
+
bundle_id: string;
|
|
197
|
+
bundle_landing_page: string;
|
|
198
|
+
bundle_subtitle: null;
|
|
199
|
+
bundle_title: string;
|
|
200
|
+
dates: Dates;
|
|
201
|
+
dislike_url: string;
|
|
202
|
+
dislikes: number;
|
|
203
|
+
es_archived_content: boolean;
|
|
204
|
+
is_in_fav: boolean;
|
|
205
|
+
is_liked: null;
|
|
206
|
+
is_watched: boolean;
|
|
207
|
+
keywords: string[];
|
|
208
|
+
labels: Label[];
|
|
209
|
+
labels_text: string;
|
|
210
|
+
like_url: string;
|
|
211
|
+
likes: number;
|
|
212
|
+
metadata: Metadata;
|
|
213
|
+
page_id: string;
|
|
214
|
+
page_key: number;
|
|
215
|
+
preprocessed_PDF: null;
|
|
216
|
+
rating: null;
|
|
217
|
+
read_time_data: ReadTimeData;
|
|
218
|
+
related_links: any[];
|
|
219
|
+
title: string;
|
|
220
|
+
topic_cluster: TopicCluster;
|
|
221
|
+
topic_html: string;
|
|
222
|
+
topic_language: string;
|
|
223
|
+
views: number;
|
|
224
|
+
your_rating: null;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// ZOOMIN TYPES - End
|
|
@@ -75,7 +75,7 @@ export class FetchContent {
|
|
|
75
75
|
`${this.apiDomain}/docs/get_document_content/${deliverable}/${contentId}/${options.language}/${options.version}`
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
private async fetchResource<T>(url: string): Promise<T> {
|
|
80
80
|
const response = await fetch(url);
|
|
81
81
|
if (!response.ok) {
|