@salesforcedevs/docs-components 1.17.2 → 1.17.5-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.17.2",
3
+ "version": "1.17.5-search-alpha",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -25,5 +25,5 @@
25
25
  "@types/lodash.orderby": "4.6.9",
26
26
  "@types/lodash.uniqby": "4.7.9"
27
27
  },
28
- "gitHead": "456b8ad8b3162df223f9809e66a454cb66b4add0"
28
+ "gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
29
29
  }
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <doc-content-layout
3
3
  lwc:if={isVersionFetched}
4
- use-old-sidebar={useOldSidebar}
5
4
  class="content-type content-type-reference"
6
5
  coveo-organization-id={coveoOrganizationId}
7
6
  coveo-public-access-token={coveoPublicAccessToken}
@@ -45,7 +45,6 @@ export default class AmfReference extends LightningElement {
45
45
  @api coveoPublicAccessToken!: string;
46
46
  @api coveoAnalyticsToken!: string;
47
47
  @api coveoSearchHub!: string;
48
- @api useOldSidebar: boolean = false;
49
48
  @api tocTitle?: string;
50
49
  @api tocOptions?: string;
51
50
  @api languages!: OptionWithLink[];
@@ -17,6 +17,6 @@ iframe {
17
17
  border: 1px solid var(--dx-g-gray-90);
18
18
  }
19
19
 
20
- .container {
20
+ .playground-container {
21
21
  position: relative;
22
22
  }
@@ -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="Component Playground"
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 &&
@@ -1,43 +1,20 @@
1
1
  <template>
2
2
  <div class="content">
3
- <template lwc:if={useOldSidebar}>
4
- <dx-sidebar-old
5
- class="is-sticky left-nav-bar"
6
- trees={sidebarContent}
7
- value={sidebarValue}
8
- header={sidebarHeader}
9
- ontogglesidebar={onToggleSidebar}
10
- languages={languages}
11
- language={language}
12
- bail-href={bailHref}
13
- bail-label={bailLabel}
14
- dev-center={devCenter}
15
- brand={brand}
16
- >
17
- <slot name="sidebar-header" slot="version-picker"></slot>
18
- </dx-sidebar-old>
19
- </template>
20
- <template lwc:else>
21
- <dx-sidebar
22
- class="is-sticky left-nav-bar"
23
- trees={sidebarContent}
24
- value={sidebarValue}
25
- header={sidebarHeader}
26
- coveo-organization-id={coveoOrganizationId}
27
- coveo-public-access-token={coveoPublicAccessToken}
28
- coveo-search-hub={coveoSearchHub}
29
- coveo-advanced-query-config={coveoAdvancedQueryConfig}
30
- ontogglesidebar={onToggleSidebar}
31
- languages={languages}
32
- language={language}
33
- bail-href={bailHref}
34
- bail-label={bailLabel}
35
- dev-center={devCenter}
36
- brand={brand}
37
- >
38
- <slot name="sidebar-header" slot="version-picker"></slot>
39
- </dx-sidebar>
40
- </template>
3
+ <dx-sidebar-old
4
+ class="is-sticky left-nav-bar"
5
+ trees={sidebarContent}
6
+ value={sidebarValue}
7
+ header={sidebarHeader}
8
+ ontogglesidebar={onToggleSidebar}
9
+ languages={languages}
10
+ language={language}
11
+ bail-href={bailHref}
12
+ bail-label={bailLabel}
13
+ dev-center={devCenter}
14
+ brand={brand}
15
+ >
16
+ <slot name="sidebar-header" slot="version-picker"></slot>
17
+ </dx-sidebar-old>
41
18
  <div class="content-body-doc-phase-container">
42
19
  <slot name="doc-phase"></slot>
43
20
  <slot name="version-banner"></slot>
@@ -210,10 +210,7 @@ export default class ContentLayout extends LightningElement {
210
210
  We have to account for the global nav changing height due to animations.
211
211
  */
212
212
  adjustNavPosition = () => {
213
- const sidebarType = this.useOldSidebar
214
- ? "dx-sidebar-old"
215
- : "dx-sidebar";
216
- const sidebarEl = this.template.querySelector(sidebarType);
213
+ const sidebarEl = this.template.querySelector("dx-sidebar-old");
217
214
  const globalNavEl = document.querySelector(
218
215
  "hgf-c360nav"
219
216
  ) as HTMLElement;
@@ -1,43 +1,20 @@
1
1
  <template>
2
2
  <div class="content">
3
- <template lwc:if={useOldSidebar}>
4
- <dx-sidebar-old
5
- class="is-sticky left-nav-bar"
6
- trees={sidebarContent}
7
- value={sidebarValue}
8
- header={sidebarHeader}
9
- ontogglesidebar={onToggleSidebar}
10
- languages={languages}
11
- language={language}
12
- bail-href={bailHref}
13
- bail-label={bailLabel}
14
- dev-center={devCenter}
15
- brand={brand}
16
- >
17
- <slot name="sidebar-header" slot="version-picker"></slot>
18
- </dx-sidebar-old>
19
- </template>
20
- <template lwc:else>
21
- <dx-sidebar
22
- class="is-sticky left-nav-bar"
23
- trees={sidebarContent}
24
- value={sidebarValue}
25
- header={sidebarHeader}
26
- coveo-organization-id={coveoOrganizationId}
27
- coveo-public-access-token={coveoPublicAccessToken}
28
- coveo-search-hub={coveoSearchHub}
29
- coveo-advanced-query-config={coveoAdvancedQueryConfig}
30
- ontogglesidebar={onToggleSidebar}
31
- languages={languages}
32
- language={language}
33
- bail-href={bailHref}
34
- bail-label={bailLabel}
35
- dev-center={devCenter}
36
- brand={brand}
37
- >
38
- <slot name="sidebar-header" slot="version-picker"></slot>
39
- </dx-sidebar>
40
- </template>
3
+ <dx-sidebar-old
4
+ class="is-sticky left-nav-bar"
5
+ trees={sidebarContent}
6
+ value={sidebarValue}
7
+ header={sidebarHeader}
8
+ ontogglesidebar={onToggleSidebar}
9
+ languages={languages}
10
+ language={language}
11
+ bail-href={bailHref}
12
+ bail-label={bailLabel}
13
+ dev-center={devCenter}
14
+ brand={brand}
15
+ >
16
+ <slot name="sidebar-header" slot="version-picker"></slot>
17
+ </dx-sidebar-old>
41
18
  <div class="content-body-doc-phase-container">
42
19
  <slot name="doc-phase"></slot>
43
20
  <slot name="version-banner"></slot>
@@ -11,7 +11,6 @@
11
11
  sidebar-content={sidebarContent}
12
12
  sidebar-value={sidebarValue}
13
13
  onselect={handleSelect}
14
- use-old-sidebar={useOldSidebar}
15
14
  onlangchange={handleLanguageChange}
16
15
  languages={sidebarFooterContent.languages}
17
16
  language={sidebarFooterContent.language}
package/LICENSE DELETED
@@ -1,12 +0,0 @@
1
- Copyright (c) 2020, Salesforce.com, Inc.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
-
6
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
-
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
-
10
- * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.