@salesforcedevs/docs-components 0.17.0 → 0.17.12-search-alpha
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 +18 -3
- package/package.json +18 -7
- package/src/modules/README.md +41 -0
- package/src/modules/doc/amfModelParser/amfModelParser.ts +674 -0
- package/src/modules/doc/amfReference/amfReference.css +25 -0
- package/src/modules/doc/amfReference/amfReference.html +55 -0
- package/src/modules/doc/amfReference/amfReference.ts +1467 -0
- package/src/modules/doc/amfReference/constants.ts +76 -0
- package/src/modules/doc/amfReference/types.ts +125 -0
- package/src/modules/doc/amfTopic/amfTopic.css +21 -0
- package/src/modules/doc/amfTopic/amfTopic.html +3 -0
- package/src/modules/doc/amfTopic/amfTopic.ts +111 -0
- package/src/modules/doc/amfTopic/types.ts +56 -0
- package/src/modules/doc/amfTopic/utils.ts +136 -0
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.css +51 -0
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.html +5 -0
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.ts +71 -0
- package/src/modules/doc/breadcrumbs/breadcrumbs.css +27 -0
- package/src/modules/doc/breadcrumbs/breadcrumbs.html +58 -0
- package/src/modules/doc/breadcrumbs/breadcrumbs.ts +183 -0
- package/src/modules/doc/componentPlayground/componentPlayground.css +22 -0
- package/src/modules/doc/componentPlayground/componentPlayground.html +20 -0
- package/src/modules/doc/componentPlayground/componentPlayground.ts +42 -0
- package/src/modules/doc/content/content.css +89 -70
- package/src/modules/doc/content/content.html +1 -0
- package/src/modules/doc/content/content.ts +188 -195
- package/src/modules/doc/contentCallout/contentCallout.css +17 -23
- package/src/modules/doc/contentCallout/contentCallout.html +13 -4
- package/src/modules/doc/contentCallout/contentCallout.ts +16 -3
- package/src/modules/doc/contentLayout/contentLayout.css +1 -0
- package/src/modules/doc/contentLayout/contentLayout.html +46 -0
- package/src/modules/doc/contentLayout/contentLayout.ts +524 -0
- package/src/modules/doc/doDont/doDont.css +47 -0
- package/src/modules/doc/doDont/doDont.html +27 -0
- package/src/modules/doc/doDont/doDont.ts +17 -0
- package/src/modules/doc/header/header.css +70 -37
- package/src/modules/doc/header/header.html +41 -138
- package/src/modules/doc/header/header.ts +56 -78
- package/src/modules/doc/heading/heading.css +33 -0
- package/src/modules/doc/heading/heading.html +14 -0
- package/src/modules/doc/heading/heading.ts +67 -0
- package/src/modules/doc/headingAnchor/headingAnchor.css +3 -3
- package/src/modules/doc/headingAnchor/headingAnchor.ts +2 -2
- package/src/modules/doc/headingContent/headingContent.css +53 -0
- package/src/modules/doc/headingContent/headingContent.html +13 -0
- package/src/modules/doc/headingContent/headingContent.ts +30 -0
- package/src/modules/doc/lwcContentLayout/lwcContentLayout.css +1 -0
- package/src/modules/doc/lwcContentLayout/lwcContentLayout.html +45 -0
- package/src/modules/doc/lwcContentLayout/lwcContentLayout.ts +256 -0
- package/src/modules/doc/overview/overview.css +40 -0
- package/src/modules/doc/overview/overview.html +34 -0
- package/src/modules/doc/overview/overview.ts +12 -0
- package/src/modules/doc/phase/phase.css +70 -0
- package/src/modules/doc/phase/phase.html +38 -0
- package/src/modules/doc/phase/phase.ts +93 -0
- package/src/modules/doc/specificationContent/specificationContent.css +36 -0
- package/src/modules/doc/specificationContent/specificationContent.html +167 -0
- package/src/modules/doc/specificationContent/specificationContent.ts +127 -0
- package/src/modules/doc/sprigSurvey/sprigSurvey.html +20 -0
- package/src/modules/doc/sprigSurvey/sprigSurvey.scoped.css +16 -0
- package/src/modules/doc/sprigSurvey/sprigSurvey.ts +16 -0
- package/src/modules/doc/toc/toc.ts +1 -1
- package/src/modules/doc/versionPicker/versionPicker.css +64 -0
- package/src/modules/doc/versionPicker/versionPicker.html +38 -0
- package/src/modules/doc/versionPicker/versionPicker.ts +65 -0
- package/src/modules/doc/xmlContent/types.ts +120 -0
- package/src/modules/doc/xmlContent/utils.ts +163 -0
- package/src/modules/doc/xmlContent/xmlContent.css +54 -0
- package/src/modules/doc/xmlContent/xmlContent.html +54 -0
- package/src/modules/doc/xmlContent/xmlContent.ts +763 -0
- package/src/modules/docHelpers/amfStyle/amfStyle.css +355 -0
- package/src/modules/docHelpers/contentLayoutStyle/contentLayoutStyle.css +131 -0
- package/src/modules/docHelpers/imgStyle/imgStyle.css +59 -0
- package/src/modules/docHelpers/status/status.css +22 -0
- package/src/modules/docUtils/searchSyncer/searchSyncer.ts +86 -0
- package/src/modules/docUtils/utils/__mocks__/coveo.analytics.ts +16 -0
- package/src/modules/docUtils/utils/coveo.analytics.d.ts +10 -0
- package/src/modules/docUtils/utils/utils.ts +32 -0
- package/LICENSE +0 -12
- package/src/modules/doc/content/__tests__/content.test.ts +0 -312
- package/src/modules/doc/content/__tests__/mockDocContent.ts +0 -348
- package/src/modules/doc/content/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/content/__tests__/mockSidebar.ts +0 -81
- package/src/modules/doc/content/content.stories.ts +0 -148
- package/src/modules/doc/contentCallout/__tests__/contentCallout.test.ts +0 -80
- package/src/modules/doc/contentCallout/__tests__/mockProps.ts +0 -14
- package/src/modules/doc/contentCallout/contentCallout.stories.ts +0 -29
- package/src/modules/doc/contentMedia/__tests__/contentMedia.test.ts +0 -97
- package/src/modules/doc/contentMedia/contentMedia.stories.ts +0 -113
- package/src/modules/doc/header/__tests__/coveoConfig.ts +0 -12
- package/src/modules/doc/header/__tests__/header.test.ts +0 -445
- package/src/modules/doc/header/__tests__/mockNavDevelopers.ts +0 -427
- package/src/modules/doc/header/__tests__/mockNavs.ts +0 -115
- package/src/modules/doc/header/__tests__/mockProps.ts +0 -152
- package/src/modules/doc/header/header.stories.ts +0 -190
- package/src/modules/doc/headingAnchor/__tests__/headingAnchor.test.ts +0 -111
- package/src/modules/doc/headingAnchor/headingAnchor.stories.ts +0 -33
- package/src/modules/doc/nav/__tests__/mockAvailableLanguages.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockAvailableVersions.ts +0 -122
- package/src/modules/doc/nav/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockPdfUrl.ts +0 -1
- package/src/modules/doc/nav/__tests__/mockSelectedLanguage.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockSelectedVersion.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockToc.ts +0 -146
- package/src/modules/doc/nav/__tests__/nav.test.ts +0 -58
- package/src/modules/doc/toc/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/toc/__tests__/mockToc.ts +0 -146
- package/src/modules/doc/toc/__tests__/toc.test.ts +0 -29
- package/src/modules/doc/toolbar/__tests__/mockAvailableLanguages.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/mockAvailableVersions.ts +0 -122
- package/src/modules/doc/toolbar/__tests__/mockPdfUrl.ts +0 -1
- package/src/modules/doc/toolbar/__tests__/mockSelectedLanguage.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/mockSelectedVersion.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/toolbar.test.ts +0 -44
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import Nav from "doc/nav";
|
|
2
|
-
import mockAvailableLanguages from "./mockAvailableLanguages";
|
|
3
|
-
import mockAvailableVersions from "./mockAvailableVersions";
|
|
4
|
-
import mockSelectedLanguage from "./mockSelectedLanguage";
|
|
5
|
-
import mockSelectedVersion from "./mockSelectedVersion";
|
|
6
|
-
import mockPdfUrl from "./mockPdfUrl";
|
|
7
|
-
import mockToc from "./mockToc";
|
|
8
|
-
import mockPageReference from "./mockPageReference";
|
|
9
|
-
import { createRenderComponent } from "utils/tests";
|
|
10
|
-
|
|
11
|
-
const MOCK_PARAMETERS = {
|
|
12
|
-
selectedLanguage: mockSelectedLanguage,
|
|
13
|
-
selectedVersion: mockSelectedVersion,
|
|
14
|
-
availableLanguages: mockAvailableLanguages,
|
|
15
|
-
availableVersions: mockAvailableVersions,
|
|
16
|
-
pdfUrl: mockPdfUrl,
|
|
17
|
-
toc: mockToc,
|
|
18
|
-
pageReference: mockPageReference
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const TAG = "doc-nav";
|
|
22
|
-
const render = createRenderComponent(TAG, Nav);
|
|
23
|
-
|
|
24
|
-
describe("doc-nav", () => {
|
|
25
|
-
it("renders the content", () => {
|
|
26
|
-
const component = render(MOCK_PARAMETERS);
|
|
27
|
-
|
|
28
|
-
const tocEl = component.shadowRoot.querySelector("dx-sidebar");
|
|
29
|
-
expect(tocEl).not.toBeNull();
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it("fires the event", () => {
|
|
33
|
-
const component = render(MOCK_PARAMETERS);
|
|
34
|
-
|
|
35
|
-
const tocEl: HTMLElement = component.shadowRoot.querySelector(
|
|
36
|
-
"dx-sidebar"
|
|
37
|
-
);
|
|
38
|
-
const mockNavClick = jest.fn();
|
|
39
|
-
component.addEventListener("navclick", mockNavClick);
|
|
40
|
-
tocEl.dispatchEvent(
|
|
41
|
-
new CustomEvent("select", {
|
|
42
|
-
detail: {
|
|
43
|
-
name: "apex_dev_guide-hashtest"
|
|
44
|
-
},
|
|
45
|
-
bubbles: true,
|
|
46
|
-
composed: true
|
|
47
|
-
})
|
|
48
|
-
);
|
|
49
|
-
expect(mockNavClick).toHaveBeenCalledTimes(1);
|
|
50
|
-
expect(mockNavClick.mock.calls[0][0].detail).toEqual({
|
|
51
|
-
pageReference: {
|
|
52
|
-
...mockPageReference,
|
|
53
|
-
contentDocumentId: "apex_dev_guide.htm",
|
|
54
|
-
hash: "hashtest"
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
});
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
{
|
|
3
|
-
children: [
|
|
4
|
-
{
|
|
5
|
-
text: "Overview",
|
|
6
|
-
a_attr: {
|
|
7
|
-
href: "actions_intro_overview.htm"
|
|
8
|
-
},
|
|
9
|
-
id: "actions_intro_overview"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
text: "Invoking Actions",
|
|
13
|
-
a_attr: {
|
|
14
|
-
href: "actions_intro_invoking.htm"
|
|
15
|
-
},
|
|
16
|
-
id: "actions_intro_invoking"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
text: "Available Actions",
|
|
20
|
-
a_attr: {
|
|
21
|
-
href: "actions_intro_list.htm"
|
|
22
|
-
},
|
|
23
|
-
id: "actions_intro_list"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
text: "Introducing Actions",
|
|
27
|
-
a_attr: {
|
|
28
|
-
href: "actions_intro.htm"
|
|
29
|
-
},
|
|
30
|
-
id: "actions_intro"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
children: [
|
|
34
|
-
{
|
|
35
|
-
text: "Apex Actions",
|
|
36
|
-
a_attr: {
|
|
37
|
-
href: "actions_obj_apex.htm"
|
|
38
|
-
},
|
|
39
|
-
id: "actions_obj_apex"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
text: "Create Service Report Actions",
|
|
43
|
-
a_attr: {
|
|
44
|
-
href: "actions_obj_create_service_report.htm"
|
|
45
|
-
},
|
|
46
|
-
id: "actions_obj_create_service_report"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
text: "Custom Notification Actions",
|
|
50
|
-
a_attr: {
|
|
51
|
-
href: "actions_obj_custom_notification.htm"
|
|
52
|
-
},
|
|
53
|
-
id: "actions_obj_custom_notification"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
text: "Email Alert Actions",
|
|
57
|
-
a_attr: {
|
|
58
|
-
href: "actions_obj_email_alert.htm"
|
|
59
|
-
},
|
|
60
|
-
id: "actions_obj_email_alert"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
text: "Flow Actions",
|
|
64
|
-
a_attr: {
|
|
65
|
-
href: "actions_obj_flow.htm"
|
|
66
|
-
},
|
|
67
|
-
id: "actions_obj_flow"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
text: "Generate Work Orders Actions",
|
|
71
|
-
a_attr: {
|
|
72
|
-
href: "actions_obj_generate_work_orders.htm"
|
|
73
|
-
},
|
|
74
|
-
id: "actions_obj_generate_work_orders"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
text: "Knowledge Actions",
|
|
78
|
-
a_attr: {
|
|
79
|
-
href: "actions_obj_knowledge.htm"
|
|
80
|
-
},
|
|
81
|
-
id: "actions_obj_knowledge"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
text: "Omni-Channel Action",
|
|
85
|
-
a_attr: {
|
|
86
|
-
href: "actions_obj_omni_channel.htm"
|
|
87
|
-
},
|
|
88
|
-
id: "actions_obj_omni_channel"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
text: "PlatformAction",
|
|
92
|
-
a_attr: {
|
|
93
|
-
href: "sforce_api_objects_platformaction.htm"
|
|
94
|
-
},
|
|
95
|
-
id: "sforce_api_objects_platformaction"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
text: "Post to Chatter Actions",
|
|
99
|
-
a_attr: {
|
|
100
|
-
href: "actions_obj_post_to_chatter.htm"
|
|
101
|
-
},
|
|
102
|
-
id: "actions_obj_post_to_chatter"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
text: "Quick Actions",
|
|
106
|
-
a_attr: {
|
|
107
|
-
href: "actions_obj_quick_action.htm"
|
|
108
|
-
},
|
|
109
|
-
id: "actions_obj_quick_action"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
text: "Refresh Metric Actions",
|
|
113
|
-
a_attr: {
|
|
114
|
-
href: "actions_obj_refresh_metric.htm"
|
|
115
|
-
},
|
|
116
|
-
id: "actions_obj_refresh_metric"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
text: "Salesforce Order Management Actions",
|
|
120
|
-
a_attr: {
|
|
121
|
-
href: "actions_obj_order_management.htm"
|
|
122
|
-
},
|
|
123
|
-
id: "actions_obj_order_management"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
text: "Simple Email Actions",
|
|
127
|
-
a_attr: {
|
|
128
|
-
href: "actions_obj_email_simple.htm"
|
|
129
|
-
},
|
|
130
|
-
id: "actions_obj_email_simple"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
text: "Submit for Approval Actions",
|
|
134
|
-
a_attr: {
|
|
135
|
-
href: "actions_obj_submit_for_approval.htm"
|
|
136
|
-
},
|
|
137
|
-
id: "actions_obj_submit_for_approval"
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
text: "Action Objects",
|
|
141
|
-
a_attr: {
|
|
142
|
-
href: "actions_obj.htm"
|
|
143
|
-
},
|
|
144
|
-
id: "actions_obj"
|
|
145
|
-
}
|
|
146
|
-
];
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { createElement } from "lwc";
|
|
2
|
-
import Toc from "../toc";
|
|
3
|
-
import mockToc from "./mockToc";
|
|
4
|
-
import mockPageReference from "./mockPageReference";
|
|
5
|
-
|
|
6
|
-
const create = (props?: object) => {
|
|
7
|
-
const component = createElement("doc-toc", {
|
|
8
|
-
is: Toc
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
Object.assign(component, {
|
|
12
|
-
toc: mockToc,
|
|
13
|
-
pageReference: mockPageReference,
|
|
14
|
-
...(props || {})
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
return component;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
describe("doc-toc", () => {
|
|
21
|
-
it("renders the navigation", () => {
|
|
22
|
-
const component = create();
|
|
23
|
-
document.body.appendChild(component);
|
|
24
|
-
const containerEl = component.shadowRoot.querySelector(
|
|
25
|
-
".doc-toc-container"
|
|
26
|
-
);
|
|
27
|
-
expect(containerEl).not.toBeNull();
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
{
|
|
3
|
-
version_text: "Winter '21 (API version 50.0)",
|
|
4
|
-
release_version: "50.0",
|
|
5
|
-
doc_version: "228.0",
|
|
6
|
-
version_url: "atlas.en-us.apexcode.meta"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
version_text: "Summer '20 (API version 49.0)",
|
|
10
|
-
release_version: "49.0",
|
|
11
|
-
doc_version: "226.0",
|
|
12
|
-
version_url: "atlas.en-us.226.0.apexcode.meta"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
version_text: "Spring '20 (API version 48.0)",
|
|
16
|
-
release_version: "48.0",
|
|
17
|
-
doc_version: "224.0",
|
|
18
|
-
version_url: "atlas.en-us.224.0.apexcode.meta"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
version_text: "Winter '20 (API version 47.0)",
|
|
22
|
-
release_version: "47.0",
|
|
23
|
-
doc_version: "222.0",
|
|
24
|
-
version_url: "atlas.en-us.222.0.apexcode.meta"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
version_text: "Summer '19 (API version 46.0)",
|
|
28
|
-
release_version: "46.0",
|
|
29
|
-
doc_version: "220.0",
|
|
30
|
-
version_url: "atlas.en-us.220.0.apexcode.meta"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
version_text: "Spring '19 (API version 45.0)",
|
|
34
|
-
release_version: "45.0",
|
|
35
|
-
doc_version: "218.0",
|
|
36
|
-
version_url: "atlas.en-us.218.0.apexcode.meta"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
version_text: "Winter '19 (API version 44.0)",
|
|
40
|
-
release_version: "44.0",
|
|
41
|
-
doc_version: "216.0",
|
|
42
|
-
version_url: "atlas.en-us.216.0.apexcode.meta"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
version_text: "Summer '18 (API version 43.0)",
|
|
46
|
-
release_version: "43.0",
|
|
47
|
-
doc_version: "214.0",
|
|
48
|
-
version_url: "atlas.en-us.214.0.apexcode.meta"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
version_text: "Spring '18 (API version 42.0)",
|
|
52
|
-
release_version: "42.0",
|
|
53
|
-
doc_version: "212.0",
|
|
54
|
-
version_url: "atlas.en-us.212.0.apexcode.meta"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
version_text: "Winter '18 (API version 41.0)",
|
|
58
|
-
release_version: "41.0",
|
|
59
|
-
doc_version: "210.0",
|
|
60
|
-
version_url: "atlas.en-us.210.0.apexcode.meta"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
version_text: "Summer '17 (API version 40.0)",
|
|
64
|
-
release_version: "40.0",
|
|
65
|
-
doc_version: "208.0",
|
|
66
|
-
version_url: "atlas.en-us.208.0.apexcode.meta"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
version_text: "Spring '17 (API version 39.0)",
|
|
70
|
-
release_version: "39.0",
|
|
71
|
-
doc_version: "206.0",
|
|
72
|
-
version_url: "atlas.en-us.206.0.apexcode.meta"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
version_text: "Winter '17 (API version 38.0)",
|
|
76
|
-
release_version: "38.0",
|
|
77
|
-
doc_version: "204.0",
|
|
78
|
-
version_url: "atlas.en-us.204.0.apexcode.meta"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
version_text: "Summer '16 (API version 37.0)",
|
|
82
|
-
release_version: "37.0",
|
|
83
|
-
doc_version: "202.0",
|
|
84
|
-
version_url: "atlas.en-us.202.0.apexcode.meta"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
version_text: "Spring '16 (API version 36.0)",
|
|
88
|
-
release_version: "36.0",
|
|
89
|
-
doc_version: "200.0",
|
|
90
|
-
version_url: "atlas.en-us.200.0.apexcode.meta"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
version_text: "Winter '16 (API version 35.0)",
|
|
94
|
-
release_version: "35.0",
|
|
95
|
-
doc_version: "198.0",
|
|
96
|
-
version_url: "atlas.en-us.198.0.apexcode.meta"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
version_text: "Summer '15 (API version 34.0)",
|
|
100
|
-
release_version: "34.0",
|
|
101
|
-
doc_version: "196.0",
|
|
102
|
-
version_url: "atlas.en-us.196.0.apexcode.meta"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
version_text: "Spring '15 (API version 33.0)",
|
|
106
|
-
release_version: "33.0",
|
|
107
|
-
doc_version: "194.0",
|
|
108
|
-
version_url: "atlas.en-us.194.0.apexcode.meta"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
version_text: "Winter '15 (API version 32.0)",
|
|
112
|
-
release_version: "32.0",
|
|
113
|
-
doc_version: "192.0",
|
|
114
|
-
version_url: "atlas.en-us.192.0.apexcode.meta"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
version_text: "Spring '14 (API version 30.0)",
|
|
118
|
-
release_version: "30.0",
|
|
119
|
-
doc_version: "188.0",
|
|
120
|
-
version_url: "atlas.en-us.188.0.apexcode.meta"
|
|
121
|
-
}
|
|
122
|
-
];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default "https://resources.docs.salesforce.com/228/latest/en-us/sfdc/pdf/salesforce_apex_language_reference.pdf";
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { createElement } from "lwc";
|
|
2
|
-
import Toolbar from "../toolbar";
|
|
3
|
-
import mockAvailableLanguages from "./mockAvailableLanguages";
|
|
4
|
-
import mockAvailableVersions from "./mockAvailableVersions";
|
|
5
|
-
import mockSelectedLanguage from "./mockSelectedLanguage";
|
|
6
|
-
import mockSelectedVersion from "./mockSelectedVersion";
|
|
7
|
-
import mockPdfUrl from "./mockPdfUrl";
|
|
8
|
-
|
|
9
|
-
const create = (props?: object) => {
|
|
10
|
-
const component = createElement("doc-toolbar", {
|
|
11
|
-
is: Toolbar
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
Object.assign(component, {
|
|
15
|
-
selectedLanguage: mockSelectedLanguage,
|
|
16
|
-
selectedVersion: mockSelectedVersion,
|
|
17
|
-
availableLanguages: mockAvailableLanguages,
|
|
18
|
-
availableVersions: mockAvailableVersions,
|
|
19
|
-
pdfUrl: mockPdfUrl,
|
|
20
|
-
...(props || {})
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
return component;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
describe("doc-toolbar", () => {
|
|
27
|
-
it("renders the container div when created", () => {
|
|
28
|
-
const component = create();
|
|
29
|
-
document.body.appendChild(component);
|
|
30
|
-
const containerEl = component.shadowRoot.querySelector(
|
|
31
|
-
".doc-toolbar-container"
|
|
32
|
-
);
|
|
33
|
-
expect(containerEl).not.toBeNull();
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it("renders all selects", () => {
|
|
37
|
-
const component = create();
|
|
38
|
-
document.body.appendChild(component);
|
|
39
|
-
const selectEls = component.shadowRoot.querySelectorAll(
|
|
40
|
-
".doc-toolbar-item"
|
|
41
|
-
);
|
|
42
|
-
expect(selectEls.length).toEqual(2);
|
|
43
|
-
});
|
|
44
|
-
});
|