@salesforcedevs/docs-components 0.53.6 → 0.54.0-alpha01

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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Represents the URL reference meta on Reference page.
3
+ * Contains information on selected Reference ID, Topic ID, and Topic Type
4
+ * separated by ":"
5
+ */
6
+ export class RouteMeta {
7
+ meta: string;
8
+ referenceId = "";
9
+ topicId = "";
10
+ type = "";
11
+
12
+ constructor(meta: string) {
13
+ this.meta = meta;
14
+
15
+ if (meta && meta.includes(":")) {
16
+ const [referenceId, type, topicId] = meta.split(":");
17
+ this.referenceId = referenceId;
18
+ this.topicId = topicId || type;
19
+ this.type = type;
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,88 @@
1
+ import { Json } from "@lwrjs/types";
2
+
3
+ export interface AmfTopicType {
4
+ referenceId: string;
5
+ amfId: string;
6
+ elementId: string;
7
+ type: string;
8
+ }
9
+
10
+ export interface AmfMetadataTopic extends AmfTopicType {
11
+ meta: string;
12
+ identifier: string;
13
+ }
14
+
15
+ export interface AmfMetaTopicType extends AmfTopicType {
16
+ meta: string;
17
+ }
18
+
19
+ export interface NavItem {
20
+ name: string;
21
+ label: string;
22
+ // TODO: Better type here
23
+ children?: ({ id: string; label?: string; method: string; domId: string } & {
24
+ name: string;
25
+ label: string;
26
+ })[];
27
+ isExpanded?: boolean;
28
+ }
29
+
30
+ export type AmfModel = Json;
31
+
32
+ export interface AmfParser {
33
+ parse(): void;
34
+ parsedModel: any;
35
+ }
36
+
37
+ export interface AmfModelRecord {
38
+ model: AmfModel;
39
+ parser: AmfParser;
40
+ parsedModel: Json;
41
+ }
42
+
43
+ export type DocPhase = "pilot" | "dev-preview" | "beta";
44
+
45
+ export type DocPhaseEntry = {
46
+ phase: DocPhase;
47
+ title: string;
48
+ body: string;
49
+ };
50
+
51
+ export interface AmfConfig extends AmfModelRecord {
52
+ id: string;
53
+ amf: string;
54
+ version?: string;
55
+ docPhase?: DocPhaseEntry;
56
+ }
57
+
58
+ export interface ParsedTopicModel {
59
+ id: string;
60
+ label: string;
61
+ domId: string;
62
+ indent?: number;
63
+ methods?: {
64
+ id: string;
65
+ label?: string;
66
+ method: string;
67
+ domId: string;
68
+ }[];
69
+ }
70
+ export interface TopicModel {
71
+ id: string;
72
+ type: string;
73
+ amf: AmfModel;
74
+ parser: AmfParser;
75
+ }
76
+
77
+ export interface ReferenceVersion {
78
+ id: string;
79
+ label: string;
80
+ deprecated?: boolean;
81
+ selected?: boolean;
82
+ }
83
+
84
+ export interface ReferenceSetConfig {
85
+ versionToRefMap?: Map<string, Array<AmfConfig>>;
86
+ refList: Array<AmfConfig>;
87
+ versions?: Array<ReferenceVersion>;
88
+ }