@salesforcedevs/docs-components 1.3.18 → 1.3.20-content-image-1

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.3.18",
3
+ "version": "1.3.20-content-image-1",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -24,5 +24,5 @@
24
24
  "@types/lodash.orderby": "^4.6.7",
25
25
  "@types/lodash.uniqby": "^4.7.7"
26
26
  },
27
- "gitHead": "a45e1a97eefa6646c36a6fa5d24ad6c10a775d04"
27
+ "gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
28
28
  }
@@ -59,11 +59,6 @@ img.content-image {
59
59
  margin-right: auto;
60
60
  }
61
61
 
62
- td > img.content-image:first-child:last-child[alt="Yes"],
63
- td > img.content-image:first-child:last-child[alt="No"] {
64
- width: var(--dx-g-spacing-md);
65
- }
66
-
67
62
  h1 {
68
63
  font-family: var(--dx-g-font-display);
69
64
  font-size: var(--dx-g-text-4xl);
@@ -283,27 +278,6 @@ a:hover,
283
278
  text-decoration: underline;
284
279
  }
285
280
 
286
- @media (max-width: 640px) {
287
- /* Mobile */
288
- img.content-image {
289
- max-width: 95vw;
290
- }
291
- }
292
-
293
- @media (min-width: 641px) {
294
- /* Tablet (medium) */
295
- img.content-image {
296
- max-width: 80vw;
297
- }
298
- }
299
-
300
- @media (min-width: 769px) {
301
- /* Desktop */
302
- img.content-image {
303
- max-width: min(60vw, 650px);
304
- }
305
- }
306
-
307
281
  ul,
308
282
  ol {
309
283
  margin-left: var(--dx-g-spacing-lg);
@@ -37,7 +37,9 @@
37
37
  <div style={docContentStyle}>
38
38
  <slot onslotchange={onSlotChange}></slot>
39
39
  </div>
40
- <doc-sprig-survey></doc-sprig-survey>
40
+ <doc-sprig-survey
41
+ if:true={shouldDisplayFeedback}
42
+ ></doc-sprig-survey>
41
43
  </div>
42
44
  <div class="right-nav-bar is-sticky">
43
45
  <dx-toc
@@ -7,6 +7,8 @@ import { track as sendGtm } from "dxUtils/analytics";
7
7
 
8
8
  type AnchorMap = { [key: string]: { intersect: boolean; id: string } };
9
9
 
10
+ declare const Sprig: (eventType: string, eventNme: string) => void;
11
+
10
12
  const TOC_HEADER_TAG = "DOC-HEADING";
11
13
  const HIGHLIGHTABLE_SELECTOR = [
12
14
  "p",
@@ -80,6 +82,11 @@ export default class ContentLayout extends LightningElement {
80
82
  private lastScrollPosition: number;
81
83
  private observer?: IntersectionObserver;
82
84
  private hasRendered: boolean = false;
85
+ private contentLoaded: boolean = false;
86
+
87
+ get shouldDisplayFeedback() {
88
+ return this.contentLoaded && typeof Sprig !== "undefined";
89
+ }
83
90
 
84
91
  private searchSyncer = new SearchSyncer({
85
92
  callbacks: {
@@ -286,6 +293,7 @@ export default class ContentLayout extends LightningElement {
286
293
  ).assignedElements();
287
294
 
288
295
  if (slotElements.length) {
296
+ this.contentLoaded = true;
289
297
  const slotContentElement = slotElements[0];
290
298
  const headingElements =
291
299
  slotContentElement.ownerDocument?.getElementsByTagName(
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.