@salesforcedevs/docs-components 1.17.6-hover-edit → 1.17.6-redoc2
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 +1 -2
- package/package.json +5 -1
- package/src/modules/doc/componentPlayground/componentPlayground.css +1 -1
- package/src/modules/doc/componentPlayground/componentPlayground.html +2 -2
- package/src/modules/doc/componentPlayground/componentPlayground.ts +13 -0
- package/src/modules/doc/flexReference/constants.ts +20 -0
- package/src/modules/doc/flexReference/flexReference.css +52 -0
- package/src/modules/doc/flexReference/flexReference.html +62 -0
- package/src/modules/doc/flexReference/flexReference.ts +1090 -0
- package/src/modules/doc/flexReference/types.ts +80 -0
- package/src/modules/doc/xmlContent/xmlContent.html +9 -1
- package/src/modules/doc/xmlContent/xmlContent.ts +18 -8
- package/src/modules/doc/markdownEditor/markdownEditor.css +0 -225
- package/src/modules/doc/markdownEditor/markdownEditor.html +0 -80
- package/src/modules/doc/markdownEditor/markdownEditor.ts +0 -148
- package/src/modules/doc/textSelectionSearch/README.md +0 -185
- package/src/modules/doc/textSelectionSearch/textSelectionSearch.css +0 -286
- package/src/modules/doc/textSelectionSearch/textSelectionSearch.html +0 -90
- package/src/modules/doc/textSelectionSearch/textSelectionSearch.js +0 -236
- package/src/modules/doc/textSelectionSearch/textSelectionSearch.ts +0 -257
package/lwc.config.json
CHANGED
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
"doc/contentLayout",
|
|
15
15
|
"doc/contentMedia",
|
|
16
16
|
"doc/docXmlContent",
|
|
17
|
+
"doc/flexReference",
|
|
17
18
|
"doc/lwcContentLayout",
|
|
18
19
|
"doc/header",
|
|
19
20
|
"doc/heading",
|
|
20
21
|
"doc/headingAnchor",
|
|
21
|
-
"doc/markdownEditor",
|
|
22
|
-
"doc/textSelectionSearch",
|
|
23
22
|
"doc/overview",
|
|
24
23
|
"doc/phase",
|
|
25
24
|
"doc/specificationContent",
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.17.6-
|
|
3
|
+
"version": "1.17.6-redoc2",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": "20.x"
|
|
9
9
|
},
|
|
10
|
+
"volta": {
|
|
11
|
+
"node": "20.18.2",
|
|
12
|
+
"yarn": "1.22.19"
|
|
13
|
+
},
|
|
10
14
|
"publishConfig": {
|
|
11
15
|
"access": "public"
|
|
12
16
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="container" lwc:if={playgroundAvailable}>
|
|
2
|
+
<div class="playground-container" lwc:if={playgroundAvailable}>
|
|
3
3
|
<dx-spinner
|
|
4
4
|
size="large"
|
|
5
5
|
variant="brand"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<iframe
|
|
9
9
|
src={playgroundSrc}
|
|
10
10
|
onload={handleIframeLoad}
|
|
11
|
-
title=
|
|
11
|
+
title={playgroundTitle}
|
|
12
12
|
allow="clipboard-write"
|
|
13
13
|
></iframe>
|
|
14
14
|
</div>
|
|
@@ -8,6 +8,19 @@ export default class ComponentPlayground extends LightningElement {
|
|
|
8
8
|
|
|
9
9
|
isLoading = true;
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Returns a formatted title for the component playground
|
|
13
|
+
* Maps 'aura' model to 'Aura' and 'lwc' model to 'Lightning'
|
|
14
|
+
* Capitalizes the first letter of the component name
|
|
15
|
+
* @returns {string} Formatted playground title
|
|
16
|
+
*/
|
|
17
|
+
get playgroundTitle() {
|
|
18
|
+
const modelName = this.model === "aura" ? "Aura" : "Lightning";
|
|
19
|
+
const componentName =
|
|
20
|
+
this.component.charAt(0).toUpperCase() + this.component.slice(1);
|
|
21
|
+
return `Example previews and code for ${modelName} ${componentName} component`;
|
|
22
|
+
}
|
|
23
|
+
|
|
11
24
|
get playgroundAvailable() {
|
|
12
25
|
return (
|
|
13
26
|
this.playgroundAppUrl &&
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const REFERENCE_TYPES = {
|
|
2
|
+
markdown: "markdown",
|
|
3
|
+
raml: "rest-raml",
|
|
4
|
+
oa2: "rest-oa2",
|
|
5
|
+
oa3: "rest-oa3"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const oldReferenceIdNewReferenceIdMap: Record<string, string> = {
|
|
9
|
+
"commerce-api-assignments": "assignments",
|
|
10
|
+
"commerce-api-campaigns": "campaigns",
|
|
11
|
+
"commerce-api-catalogs": "catalogs",
|
|
12
|
+
"cdn-zones": "cdn-api-process-apis",
|
|
13
|
+
"inventory-impex": "impex",
|
|
14
|
+
"inventory-reservations": "inventory-reservation-service",
|
|
15
|
+
"shopper-login-and-api-access-service": "shopper-login",
|
|
16
|
+
"shopper-login-and-api-access-service-admin": "slas-admin",
|
|
17
|
+
"einstein-recommendations": "einstein-api-quick-start-guide"
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { oldReferenceIdNewReferenceIdMap };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@import "docHelpers/amfStyle";
|
|
2
|
+
|
|
3
|
+
:host {
|
|
4
|
+
--reference-container-margin-top: var(--dx-g-spacing-sm);
|
|
5
|
+
--api-documentation-margin-top: var(--dx-g-spacing-3xl);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* 1. We need to scroll to top from the tablet size as side nav bar and content in side by side from tablet size
|
|
10
|
+
* 2. Consider global nav height, doc header height and content margins to scroll to the right position
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
@media screen and (min-width: 769px) {
|
|
14
|
+
.redoc-container {
|
|
15
|
+
scroll-margin-top: calc(
|
|
16
|
+
var(--dx-g-global-header-height) + var(--dx-g-doc-header-height) +
|
|
17
|
+
var(--reference-container-margin-top) +
|
|
18
|
+
var(--api-documentation-margin-top)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.redoc-container {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
/* Ensure Redoc content is scrollable within the content layout */
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Loading state styles */
|
|
31
|
+
.loading-container {
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
height: 200px;
|
|
36
|
+
font-size: 16px;
|
|
37
|
+
color: var(--dx-g-color-text-secondary);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Error state styles */
|
|
41
|
+
.error-container {
|
|
42
|
+
padding: 20px;
|
|
43
|
+
background-color: var(--dx-g-color-background-error);
|
|
44
|
+
border: 1px solid var(--dx-g-color-border-error);
|
|
45
|
+
border-radius: 4px;
|
|
46
|
+
margin: 20px 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.error-message {
|
|
50
|
+
color: var(--dx-g-color-text-error);
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<doc-content-layout
|
|
3
|
+
lwc:if={isVersionFetched}
|
|
4
|
+
use-old-sidebar={useOldSidebar}
|
|
5
|
+
class="content-type content-type-reference"
|
|
6
|
+
coveo-organization-id={coveoOrganizationId}
|
|
7
|
+
coveo-public-access-token={coveoPublicAccessToken}
|
|
8
|
+
coveo-analytics-token={coveoAnalyticsToken}
|
|
9
|
+
coveo-search-hub={coveoSearchHub}
|
|
10
|
+
coveo-advanced-query-config={coveoAdvancedQueryConfig}
|
|
11
|
+
breadcrumbs={breadcrumbs}
|
|
12
|
+
sidebar-header={sidebarHeader}
|
|
13
|
+
sidebar-value={selectedSidebarValue}
|
|
14
|
+
sidebar-content={navigation}
|
|
15
|
+
onselect={onNavSelect}
|
|
16
|
+
onexpandcollapse={onExpandCollapse}
|
|
17
|
+
toc-title={tocTitle}
|
|
18
|
+
toc-options={tocOptions}
|
|
19
|
+
enable-slot-change="true"
|
|
20
|
+
languages={languages}
|
|
21
|
+
language={language}
|
|
22
|
+
show-footer={enableFooter}
|
|
23
|
+
>
|
|
24
|
+
<doc-phase
|
|
25
|
+
slot="doc-phase"
|
|
26
|
+
lwc:if={docPhaseInfo}
|
|
27
|
+
doc-phase-info={docPhaseInfo}
|
|
28
|
+
></doc-phase>
|
|
29
|
+
<doc-phase
|
|
30
|
+
slot="version-banner"
|
|
31
|
+
lwc:if={showVersionBanner}
|
|
32
|
+
doc-phase-info={oldVersionInfo}
|
|
33
|
+
icon-name="warning"
|
|
34
|
+
dismissible="true"
|
|
35
|
+
ondismissphase={handleDismissVersionBanner}
|
|
36
|
+
></doc-phase>
|
|
37
|
+
<div lwc:if={isVersionEnabled} slot="sidebar-header">
|
|
38
|
+
<doc-version-picker
|
|
39
|
+
onchange={handleVersionChange}
|
|
40
|
+
data-type="version"
|
|
41
|
+
versions={versions}
|
|
42
|
+
selected-version={selectedVersion}
|
|
43
|
+
latest-version={latestVersion}
|
|
44
|
+
></doc-version-picker>
|
|
45
|
+
</div>
|
|
46
|
+
<template lwc:if={showSpecBasedReference}>
|
|
47
|
+
<div class="container">
|
|
48
|
+
<div class="api-documentation">
|
|
49
|
+
<!-- Replace doc-amf-topic with Redoc container -->
|
|
50
|
+
<div
|
|
51
|
+
class="redoc-container"
|
|
52
|
+
lwc:dom="manual"
|
|
53
|
+
data-redoc-container
|
|
54
|
+
></div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
<template lwc:else>
|
|
59
|
+
<slot></slot>
|
|
60
|
+
</template>
|
|
61
|
+
</doc-content-layout>
|
|
62
|
+
</template>
|