@salesforcedevs/dx-components 0.26.0 → 0.26.1-alpha.10
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 +5 -4
- package/src/modules/dx/.DS_Store +0 -0
- package/src/modules/helpers/table/table.css +1 -1
- package/LICENSE +0 -12
- package/src/assets/icons/action-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/brand-sprite/svg/symbols.svg +0 -1381
- package/src/assets/icons/custom-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/doctype-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/general-sprite/svg/symbols.svg +0 -3013
- package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +0 -257
- package/src/assets/icons/standard-sprite/svg/symbols.svg +0 -1
- package/src/assets/icons/utility-sprite/svg/symbols.svg +0 -1
- package/src/assets/svg/card-news-learn-moar.svg +0 -415
- package/src/assets/svg/cloud-1.svg +0 -24
- package/src/assets/svg/cloud-2.svg +0 -18
- package/src/assets/svg/codey.svg +0 -93
- package/src/assets/svg/command.svg +0 -9
- package/src/assets/svg/control.svg +0 -10
- package/src/assets/svg/docs-empty-state-small.svg +0 -72
- package/src/assets/svg/docs-empty-state.svg +0 -86
- package/src/assets/svg/dsc-home-news-bear.svg +0 -3
- package/src/assets/svg/dsc-home-news-community.png +0 -0
- package/src/assets/svg/dsc-home-news-goatbear.svg +0 -257
- package/src/assets/svg/dsc-home-news-samplegallery.svg +0 -76
- package/src/assets/svg/empty-state-assistant.svg +0 -1
- package/src/assets/svg/fch-blog-cloud-1.png +0 -0
- package/src/assets/svg/fch-blog-cloud-2.png +0 -0
- package/src/assets/svg/fch-blog-planet.png +0 -0
- package/src/assets/svg/feature-backdrop1.svg +0 -10
- package/src/assets/svg/feature-backdrop2.svg +0 -10
- package/src/assets/svg/featured-demo-art-blank.svg +0 -76
- package/src/assets/svg/featured-demo-art-eBikes.svg +0 -77
- package/src/assets/svg/footer-graphic-large.svg +0 -207
- package/src/assets/svg/footer-graphic-mountains-small.svg +0 -17
- package/src/assets/svg/footer-graphic-mountains.svg +0 -21
- package/src/assets/svg/footer-graphic-trees-small.svg +0 -33
- package/src/assets/svg/footer-graphic-trees.svg +0 -62
- package/src/assets/svg/lake-mountain.svg +0 -79
- package/src/assets/svg/podcast-subscription-clouds-small.svg +0 -49
- package/src/assets/svg/podcast-subscription-clouds.svg +0 -57
- package/src/assets/svg/podcasts-subscription-apple.svg +0 -164
- package/src/assets/svg/podcasts-subscription-google.svg +0 -29
- package/src/assets/svg/podcasts-subscription-spotify.svg +0 -11
- package/src/assets/svg/salesforce-cloud.svg +0 -7
- package/src/assets/svg/salesforce-logo-corporate.svg +0 -21
- package/src/assets/svg/salesforce-logo.svg +0 -14
- package/src/assets/svg/sidebar-loading.svg +0 -34
- package/src/assets/svg/slack-cta-podcast-background-left.svg +0 -28
- package/src/assets/svg/slack-cta-podcast-background-right.svg +0 -38
- package/src/assets/svg/trees.svg +0 -42
- package/src/modules/test-components/buttonTest/buttonTest.html +0 -3
- package/src/modules/test-components/buttonTest/buttonTest.ts +0 -3
- package/src/modules/test-components/codeBlockTest/codeBlockTest.js +0 -4
- package/src/modules/test-components/featureGridTest/featureGridTest.html +0 -7
- package/src/modules/test-components/featureGridTest/featureGridTest.ts +0 -5
- package/src/modules/test-components/instrumentationTest/instrumentationTest.html +0 -4
- package/src/modules/test-components/instrumentationTest/instrumentationTest.ts +0 -8
- package/src/modules/test-components/popoverTest/popoverTest.html +0 -6
- package/src/modules/test-components/popoverTest/popoverTest.ts +0 -5
- package/src/modules/utils-internal/archiveCard/archiveCard.ts +0 -35
- package/src/modules/utils-internal/coveo/coveo.ts +0 -70
- package/src/modules/utils-internal/css/css.ts +0 -43
- package/src/modules/utils-internal/devices/devices.ts +0 -1
- package/src/modules/utils-internal/headerBase/headerBase.ts +0 -204
- package/src/modules/utils-internal/jest/jest.ts +0 -58
- package/src/modules/utils-internal/options/options.ts +0 -39
- package/src/modules/utils-internal/prismjs/prismjs.html +0 -3
- package/src/modules/utils-internal/prismjs/prismjs.ts +0 -3321
- package/src/modules/utils-internal/recentSearches/__tests__/recentSearches.test.ts +0 -83
- package/src/modules/utils-internal/recentSearches/recentSearches.ts +0 -57
- package/src/modules/utils-internal/regexps/regexps.ts +0 -5
- package/src/modules/utils-internal/seo/seo.ts +0 -4
- package/src/modules/utils-internal/slot/slot.ts +0 -17
- package/src/modules/utils-internal/storybook/storybook.ts +0 -32
- package/src/modules/utils-internal/tests/tests.ts +0 -38
- package/src/modules/utils-internal/wordpress/__tests__/wordpress.test.ts +0 -15
- package/src/modules/utils-internal/wordpress/wordpress.ts +0 -13
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="156px" height="83px" viewBox="0 0 156 83" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>podcast-cta-graphic-right</title>
|
|
4
|
-
<g id="Slack-App-CTA" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
|
5
|
-
<g id="Podcast" transform="translate(-888.000000, -3624.000000)" stroke="#8FD0FE" stroke-width="2">
|
|
6
|
-
<g id="CTA-signup" transform="translate(52.000000, 3441.500000)">
|
|
7
|
-
<g id="podcast-cta-graphic-right" transform="translate(837.000000, 183.500000)">
|
|
8
|
-
<g id="tree-3" transform="translate(100.000000, 33.000600)">
|
|
9
|
-
<line x1="8.66354655" y1="14.0094" x2="18.2225465" y2="18.7884" id="Stroke-1"></line>
|
|
10
|
-
<path d="M36.6263465,25.983 C36.6263465,22.958 35.0753465,20.293 32.7303465,18.728 C33.8543465,17.559 34.5543465,15.98 34.5543465,14.235 C34.5543465,10.654 31.6413465,7.74 28.0573465,7.74 C27.3923465,7.74 26.7623465,7.87 26.1563465,8.056 C26.0433465,3.597 22.3983465,0 17.9113465,0 C13.5013465,0 9.88634655,3.474 9.65834655,7.83 C9.30234655,7.77 8.93834655,7.74 8.57034655,7.74 C4.98934655,7.74 2.07534655,10.654 2.07534655,14.235 C2.07534655,15.98 2.77534655,17.56 3.89934655,18.728 C3.42434655,19.046 2.96934655,19.402 2.55434655,19.817 C0.570346547,21.803 -0.323653453,24.549 0.105346547,27.35 C0.607346547,30.633 3.01434655,33.34 6.13234655,34.307 L18.0263465,39.307 L31.0963465,34.102 L31.0893465,34.082 C34.3243465,32.805 36.6263465,29.666 36.6263465,25.983 Z" id="Stroke-2"></path>
|
|
11
|
-
<line x1="27.4877465" y1="14.0094" x2="17.9287465" y2="18.7884" id="Stroke-4"></line>
|
|
12
|
-
<line x1="8.66354655" y1="25.6402" x2="18.2225465" y2="30.4192" id="Stroke-6"></line>
|
|
13
|
-
<line x1="27.4877465" y1="25.6402" x2="17.9287465" y2="30.4192" id="Stroke-8"></line>
|
|
14
|
-
<line x1="18.3197465" y1="9.6207" x2="18.3197465" y2="47.9747" id="Stroke-10"></line>
|
|
15
|
-
</g>
|
|
16
|
-
<g id="tree-2" transform="translate(50.000247, 42.000000)">
|
|
17
|
-
<path d="M27.3664984,9.39600248 C27.2895938,9.39600248 27.2184571,9.41646246 27.1415525,9.41841103 C27.1578947,9.19432553 27.208844,8.97998288 27.208844,8.75102595 C27.208844,3.91759913 23.3424658,0 18.5743812,0 C13.8053353,0 9.93991829,3.91759913 9.93991829,8.75102595 C9.93991829,9.01992855 9.99471281,9.27421688 10.0177842,9.53727377 C9.5640471,9.46225385 9.10934871,9.39600248 8.63542418,9.39600248 C3.86637827,9.39600248 0,13.3136016 0,18.1460541 C0,22.979481 3.86637827,26.8970801 8.63542418,26.8970801 C9.21605383,26.8970801 9.78322519,26.8347259 10.333093,26.7236574 C11.3914924,30.3431254 14.6599375,33 18.5743812,33 C22.4474886,33 25.6861331,30.3976853 26.7810622,26.8376487 C26.9781303,26.8512887 27.1655852,26.8970801 27.3664984,26.8970801 C32.134583,26.8970801 36,22.979481 36,18.1460541 C36,13.3136016 32.134583,9.39600248 27.3664984,9.39600248 Z" id="Stroke-1"></path>
|
|
18
|
-
<polyline id="Stroke-3" points="25 18 18.000488 25 11 18"></polyline>
|
|
19
|
-
<line x1="18.5" y1="11" x2="18.5" y2="39" id="Stroke-5"></line>
|
|
20
|
-
</g>
|
|
21
|
-
<g id="tree-1" transform="translate(0.000000, 33.000600)">
|
|
22
|
-
<line x1="8.66354655" y1="14.0094" x2="18.2225465" y2="18.7884" id="Stroke-1"></line>
|
|
23
|
-
<g id="Group-12">
|
|
24
|
-
<path d="M36.6263465,25.983 C36.6263465,22.958 35.0753465,20.293 32.7303465,18.728 C33.8543465,17.559 34.5543465,15.98 34.5543465,14.235 C34.5543465,10.654 31.6413465,7.74 28.0573465,7.74 C27.3923465,7.74 26.7623465,7.87 26.1563465,8.056 C26.0433465,3.597 22.3983465,0 17.9113465,0 C13.5013465,0 9.88634655,3.474 9.65834655,7.83 C9.30234655,7.77 8.93834655,7.74 8.57034655,7.74 C4.98934655,7.74 2.07534655,10.654 2.07534655,14.235 C2.07534655,15.98 2.77534655,17.56 3.89934655,18.728 C3.42434655,19.046 2.96934655,19.402 2.55434655,19.817 C0.570346547,21.803 -0.323653453,24.549 0.105346547,27.35 C0.607346547,30.633 3.01434655,33.34 6.13234655,34.307 L18.0263465,39.307 L31.0963465,34.102 L31.0893465,34.082 C34.3243465,32.805 36.6263465,29.666 36.6263465,25.983 Z" id="Stroke-2"></path>
|
|
25
|
-
<line x1="27.4877465" y1="14.0094" x2="17.9287465" y2="18.7884" id="Stroke-4"></line>
|
|
26
|
-
<line x1="8.66354655" y1="25.6402" x2="18.2225465" y2="30.4192" id="Stroke-6"></line>
|
|
27
|
-
<line x1="27.4877465" y1="25.6402" x2="17.9287465" y2="30.4192" id="Stroke-8"></line>
|
|
28
|
-
<line x1="18.3197465" y1="9.6207" x2="18.3197465" y2="47.9747" id="Stroke-10"></line>
|
|
29
|
-
</g>
|
|
30
|
-
</g>
|
|
31
|
-
<path d="M148.368697,17.4393933 L147.41455,20.0170007 C147.347052,20.201175 147.202055,20.3470145 147.017892,20.4145173 L144.439612,21.3687237 C143.853791,21.5853994 143.853791,22.4146006 144.439612,22.6312763 L147.017892,23.5854827 C147.202055,23.6538189 147.347052,23.798825 147.41455,23.9829993 L148.368697,26.5606067 C148.586193,27.1464644 149.414509,27.1464644 149.632004,26.5606067 L150.585318,23.9829993 C150.65365,23.798825 150.798647,23.6538189 150.983643,23.5854827 L153.560256,22.6312763 C154.14691,22.4146006 154.14691,21.5853994 153.560256,21.3687237 L150.983643,20.4145173 C150.798647,20.3470145 150.65365,20.201175 150.585318,20.0170007 L149.632004,17.4393933 C149.414509,16.8535356 148.586193,16.8535356 148.368697,17.4393933 Z" id="Stroke-150"></path>
|
|
32
|
-
<path d="M66.3695305,0.439393308 L65.4145504,3.01700071 C65.3470518,3.20117505 65.2020548,3.34701446 65.017892,3.41451727 L62.4396124,4.3687237 C61.8537913,4.58539939 61.8537913,5.41460061 62.4396124,5.6312763 L65.017892,6.58548273 C65.2020548,6.65381891 65.3470518,6.79882495 65.4145504,6.98299929 L66.3695305,9.56060669 C66.5861927,10.1464644 67.4153421,10.1464644 67.6320042,9.56060669 L68.5853177,6.98299929 C68.6536496,6.79882495 68.7986466,6.65381891 68.9836427,6.58548273 L71.5602557,5.6312763 C72.1469102,5.41460061 72.1469102,4.58539939 71.5602557,4.3687237 L68.9836427,3.41451727 C68.7986466,3.34701446 68.6536496,3.20117505 68.5853177,3.01700071 L67.6320042,0.439393308 C67.4153421,-0.146464436 66.5861927,-0.146464436 66.3695305,0.439393308 Z" id="Stroke-152"></path>
|
|
33
|
-
<path d="M50.0002465,20 C50.0002465,18.3436725 48.6572963,17 46.9997812,17 C45.3431968,17 44.0002465,18.3436725 44.0002465,20 C44.0002465,21.6572581 45.3431968,23 46.9997812,23 C48.6572963,23 50.0002465,21.6572581 50.0002465,20 Z" id="Stroke-158"></path>
|
|
34
|
-
</g>
|
|
35
|
-
</g>
|
|
36
|
-
</g>
|
|
37
|
-
</g>
|
|
38
|
-
</svg>
|
package/src/assets/svg/trees.svg
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="156px" height="83px" viewBox="0 0 156 83" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<title>trees</title>
|
|
4
|
-
<g id="Salesforce-Developers" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
|
5
|
-
<g id="Podcast" transform="translate(-901.000000, -593.000000)" stroke="#1A96FF" stroke-width="2">
|
|
6
|
-
<g id="header-bg" transform="translate(0.000000, 116.000000)">
|
|
7
|
-
<g id="Graphics" transform="translate(676.000000, 0.000000)">
|
|
8
|
-
<g id="trees" transform="translate(225.999753, 478.000000)">
|
|
9
|
-
<g id="tree-3" transform="translate(100.000247, 32.000000)">
|
|
10
|
-
<line x1="8.6633" y1="15.01" x2="18.2223" y2="19.789" id="Stroke-1"></line>
|
|
11
|
-
<g id="Group-12" transform="translate(0.000000, 0.975600)">
|
|
12
|
-
<path d="M36.6261,26.008 C36.6261,22.983 35.0751,20.318 32.7301,18.753 C33.8541,17.584 34.5541,16.005 34.5541,14.26 C34.5541,10.679 31.6411,7.765 28.0571,7.765 C27.3921,7.765 26.7621,7.895 26.1561,8.081 C26.0431,3.622 22.3981,0.025 17.9111,0.025 C13.5011,0.025 9.8861,3.499 9.6581,7.855 C9.3021,7.795 8.9381,7.765 8.5701,7.765 C4.9891,7.765 2.0751,10.679 2.0751,14.26 C2.0751,16.005 2.7751,17.585 3.8991,18.753 C3.4241,19.071 2.9691,19.427 2.5541,19.842 C0.5701,21.828 -0.3239,24.574 0.1051,27.375 C0.6071,30.658 3.0141,33.365 6.1321,34.332 L18.0261,39.332 L31.0961,34.127 L31.0891,34.107 C34.3241,32.83 36.6261,29.691 36.6261,26.008 Z" id="Stroke-2"></path>
|
|
13
|
-
<line x1="27.4875" y1="14.0344" x2="17.9285" y2="18.8134" id="Stroke-4"></line>
|
|
14
|
-
<line x1="8.6633" y1="25.6652" x2="18.2223" y2="30.4442" id="Stroke-6"></line>
|
|
15
|
-
<line x1="27.4875" y1="25.6652" x2="17.9285" y2="30.4442" id="Stroke-8"></line>
|
|
16
|
-
<line x1="18.3195" y1="9.6457" x2="18.3195" y2="47.9997" id="Stroke-10"></line>
|
|
17
|
-
</g>
|
|
18
|
-
</g>
|
|
19
|
-
<g id="tree-2" transform="translate(50.000247, 39.000000)">
|
|
20
|
-
<path d="M27.3664984,9.39600248 C27.2895938,9.39600248 27.2184571,9.41646246 27.1415525,9.41841103 C27.1578947,9.19432553 27.208844,8.97998288 27.208844,8.75102595 C27.208844,3.91759913 23.3424658,0 18.5743812,0 C13.8053353,0 9.93991829,3.91759913 9.93991829,8.75102595 C9.93991829,9.01992855 9.99471281,9.27421688 10.0177842,9.53727377 C9.5640471,9.46225385 9.10934871,9.39600248 8.63542418,9.39600248 C3.86637827,9.39600248 0,13.3136016 0,18.1460541 C0,22.979481 3.86637827,26.8970801 8.63542418,26.8970801 C9.21605383,26.8970801 9.78322519,26.8347259 10.333093,26.7236574 C11.3914924,30.3431254 14.6599375,33 18.5743812,33 C22.4474886,33 25.6861331,30.3976853 26.7810622,26.8376487 C26.9781303,26.8512887 27.1655852,26.8970801 27.3664984,26.8970801 C32.134583,26.8970801 36,22.979481 36,18.1460541 C36,13.3136016 32.134583,9.39600248 27.3664984,9.39600248 Z" id="Stroke-1"></path>
|
|
21
|
-
<polyline id="Stroke-3" points="25 18 18.000488 25 11 18"></polyline>
|
|
22
|
-
<line x1="18.5" y1="11" x2="18.5" y2="39" id="Stroke-5"></line>
|
|
23
|
-
</g>
|
|
24
|
-
<g id="tree-1" transform="translate(0.000000, 33.000600)">
|
|
25
|
-
<line x1="8.66354655" y1="14.0094" x2="18.2225465" y2="18.7884" id="Stroke-1"></line>
|
|
26
|
-
<g id="Group-12">
|
|
27
|
-
<path d="M36.6263465,25.983 C36.6263465,22.958 35.0753465,20.293 32.7303465,18.728 C33.8543465,17.559 34.5543465,15.98 34.5543465,14.235 C34.5543465,10.654 31.6413465,7.74 28.0573465,7.74 C27.3923465,7.74 26.7623465,7.87 26.1563465,8.056 C26.0433465,3.597 22.3983465,0 17.9113465,0 C13.5013465,0 9.88634655,3.474 9.65834655,7.83 C9.30234655,7.77 8.93834655,7.74 8.57034655,7.74 C4.98934655,7.74 2.07534655,10.654 2.07534655,14.235 C2.07534655,15.98 2.77534655,17.56 3.89934655,18.728 C3.42434655,19.046 2.96934655,19.402 2.55434655,19.817 C0.570346547,21.803 -0.323653453,24.549 0.105346547,27.35 C0.607346547,30.633 3.01434655,33.34 6.13234655,34.307 L18.0263465,39.307 L31.0963465,34.102 L31.0893465,34.082 C34.3243465,32.805 36.6263465,29.666 36.6263465,25.983 Z" id="Stroke-2"></path>
|
|
28
|
-
<line x1="27.4877465" y1="14.0094" x2="17.9287465" y2="18.7884" id="Stroke-4"></line>
|
|
29
|
-
<line x1="8.66354655" y1="25.6402" x2="18.2225465" y2="30.4192" id="Stroke-6"></line>
|
|
30
|
-
<line x1="27.4877465" y1="25.6402" x2="17.9287465" y2="30.4192" id="Stroke-8"></line>
|
|
31
|
-
<line x1="18.3197465" y1="9.6207" x2="18.3197465" y2="47.9747" id="Stroke-10"></line>
|
|
32
|
-
</g>
|
|
33
|
-
</g>
|
|
34
|
-
<path d="M148.368697,17.4393933 L147.41455,20.0170007 C147.347052,20.201175 147.202055,20.3470145 147.017892,20.4145173 L144.439612,21.3687237 C143.853791,21.5853994 143.853791,22.4146006 144.439612,22.6312763 L147.017892,23.5854827 C147.202055,23.6538189 147.347052,23.798825 147.41455,23.9829993 L148.368697,26.5606067 C148.586193,27.1464644 149.414509,27.1464644 149.632004,26.5606067 L150.585318,23.9829993 C150.65365,23.798825 150.798647,23.6538189 150.983643,23.5854827 L153.560256,22.6312763 C154.14691,22.4146006 154.14691,21.5853994 153.560256,21.3687237 L150.983643,20.4145173 C150.798647,20.3470145 150.65365,20.201175 150.585318,20.0170007 L149.632004,17.4393933 C149.414509,16.8535356 148.586193,16.8535356 148.368697,17.4393933 Z" id="Stroke-150"></path>
|
|
35
|
-
<path d="M66.3695305,0.439393308 L65.4145504,3.01700071 C65.3470518,3.20117505 65.2020548,3.34701446 65.017892,3.41451727 L62.4396124,4.3687237 C61.8537913,4.58539939 61.8537913,5.41460061 62.4396124,5.6312763 L65.017892,6.58548273 C65.2020548,6.65381891 65.3470518,6.79882495 65.4145504,6.98299929 L66.3695305,9.56060669 C66.5861927,10.1464644 67.4153421,10.1464644 67.6320042,9.56060669 L68.5853177,6.98299929 C68.6536496,6.79882495 68.7986466,6.65381891 68.9836427,6.58548273 L71.5602557,5.6312763 C72.1469102,5.41460061 72.1469102,4.58539939 71.5602557,4.3687237 L68.9836427,3.41451727 C68.7986466,3.34701446 68.6536496,3.20117505 68.5853177,3.01700071 L67.6320042,0.439393308 C67.4153421,-0.146464436 66.5861927,-0.146464436 66.3695305,0.439393308 Z" id="Stroke-152"></path>
|
|
36
|
-
<path d="M50.0002465,20 C50.0002465,18.3436725 48.6572963,17 46.9997812,17 C45.3431968,17 44.0002465,18.3436725 44.0002465,20 C44.0002465,21.6572581 45.3431968,23 46.9997812,23 C48.6572963,23 50.0002465,21.6572581 50.0002465,20 Z" id="Stroke-158"></path>
|
|
37
|
-
</g>
|
|
38
|
-
</g>
|
|
39
|
-
</g>
|
|
40
|
-
</g>
|
|
41
|
-
</g>
|
|
42
|
-
</svg>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<dx-feature-grid>
|
|
3
|
-
<dx-feature button-label="Feature 1" title="Feature 1"></dx-feature>
|
|
4
|
-
<dx-feature button-label="Feature 2" title="Feature 2"></dx-feature>
|
|
5
|
-
<dx-feature button-label="Feature 3" title="Feature 3"></dx-feature>
|
|
6
|
-
</dx-feature-grid>
|
|
7
|
-
</template>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LightningElement } from "lwc";
|
|
2
|
-
import { track } from "dx/instrumentation";
|
|
3
|
-
|
|
4
|
-
export default class InstrumentationTest extends LightningElement {
|
|
5
|
-
handleButtonClick(e: MouseEvent) {
|
|
6
|
-
track(e.currentTarget, "buttonClick", { buttonName: "default" });
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
import { LinkTarget, Color } from "typings/custom";
|
|
3
|
-
|
|
4
|
-
const MOBILE_QUERY = "(max-width: 640px)";
|
|
5
|
-
|
|
6
|
-
export abstract class ArchiveCard extends LightningElement {
|
|
7
|
-
@api contentType: "Blog" | "Podcast" = "Blog";
|
|
8
|
-
@api href!: string;
|
|
9
|
-
@api title!: string;
|
|
10
|
-
@api target: LinkTarget = "_self";
|
|
11
|
-
|
|
12
|
-
private matchMedia!: MediaQueryList;
|
|
13
|
-
protected mobile = false;
|
|
14
|
-
|
|
15
|
-
protected get badgeColor(): Color {
|
|
16
|
-
return this.contentType === "Blog" ? "teal" : "blue";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
connectedCallback(): void {
|
|
20
|
-
this.matchMedia = window.matchMedia(MOBILE_QUERY);
|
|
21
|
-
this.onMediaChange(this.matchMedia);
|
|
22
|
-
this.matchMedia.addEventListener("change", this.onMediaChange);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
disconnectedCallback(): void {
|
|
26
|
-
this.matchMedia.removeEventListener("change", this.onMediaChange);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private onMediaChange = (e: MediaQueryListEvent | MediaQueryList) =>
|
|
30
|
-
(this.mobile = e.matches);
|
|
31
|
-
|
|
32
|
-
protected get badgeSize(): string {
|
|
33
|
-
return (this.mobile && "small") || "default";
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildSearchEngine as _buildSearchEngine,
|
|
3
|
-
SearchAppState,
|
|
4
|
-
SearchEngineOptions
|
|
5
|
-
} from "@coveo/headless";
|
|
6
|
-
|
|
7
|
-
export const buildSearchEngine = ({
|
|
8
|
-
organizationId,
|
|
9
|
-
preloadedState,
|
|
10
|
-
publicAccessToken,
|
|
11
|
-
searchHub,
|
|
12
|
-
searchPipeline
|
|
13
|
-
}: {
|
|
14
|
-
organizationId: string;
|
|
15
|
-
publicAccessToken: string;
|
|
16
|
-
searchPipeline?: string;
|
|
17
|
-
searchHub: string;
|
|
18
|
-
preloadedState?: SearchAppState;
|
|
19
|
-
}) => {
|
|
20
|
-
const search = searchPipeline
|
|
21
|
-
? { pipeline: searchPipeline, searchHub }
|
|
22
|
-
: { searchHub };
|
|
23
|
-
|
|
24
|
-
const configuration = {
|
|
25
|
-
accessToken: publicAccessToken,
|
|
26
|
-
organizationId,
|
|
27
|
-
search
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const engineConfiguration: SearchEngineOptions = preloadedState
|
|
31
|
-
? { configuration, preloadedState }
|
|
32
|
-
: { configuration };
|
|
33
|
-
|
|
34
|
-
return _buildSearchEngine(engineConfiguration);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const getSidebarSearchParams = () =>
|
|
38
|
-
new URLSearchParams(window.location.search).get("q");
|
|
39
|
-
|
|
40
|
-
const coveoOrganizationId = "coveosalesforcetestakshatha";
|
|
41
|
-
const coveoPublicAccessToken = "xxfeb39525-e402-4e41-a870-7132441f7875";
|
|
42
|
-
|
|
43
|
-
export const coveoHeaderConfig = {
|
|
44
|
-
coveoOrganizationId,
|
|
45
|
-
coveoPublicAccessToken,
|
|
46
|
-
coveoSearchPipeline: "salesforcedevdoc",
|
|
47
|
-
coveoSearchHub: "salesforcedevdoc"
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const coveoXMLDocsConfig = {
|
|
51
|
-
coveoOrganizationId,
|
|
52
|
-
coveoPublicAccessToken,
|
|
53
|
-
coveoSearchHub: "Developer_Docs_SS",
|
|
54
|
-
coveoAdvancedQueryConfig: JSON.stringify({
|
|
55
|
-
objecttype: "HTDeveloperDocumentsC",
|
|
56
|
-
sflocale__c: "en_US",
|
|
57
|
-
sfrelease__c: "232.0",
|
|
58
|
-
sfdelivarable__c: "apexcode"
|
|
59
|
-
})
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export const coveoSFDocsConfig = {
|
|
63
|
-
coveoOrganizationId,
|
|
64
|
-
coveoPublicAccessToken,
|
|
65
|
-
coveoSearchHub: "Developer_MdDocs_SS",
|
|
66
|
-
coveoAdvancedQueryConfig: JSON.stringify({
|
|
67
|
-
source: "Sitemap - Developer Docs",
|
|
68
|
-
path_segment_3: "pardot"
|
|
69
|
-
})
|
|
70
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Color } from "typings/custom";
|
|
2
|
-
|
|
3
|
-
const LABEL_TO_DX_VAR: { [key: string]: string } = {
|
|
4
|
-
blue: "blue-vibrant",
|
|
5
|
-
"cloud-blue": "cloud-blue-vibrant",
|
|
6
|
-
green: "green-vibrant",
|
|
7
|
-
"hot-orange": "hot-orange-vibrant",
|
|
8
|
-
indigo: "indigo-vibrant",
|
|
9
|
-
orange: "orange-vibrant",
|
|
10
|
-
pink: "pink-vibrant",
|
|
11
|
-
purple: "purple-vibrant",
|
|
12
|
-
red: "red-vibrant",
|
|
13
|
-
teal: "teal-natural",
|
|
14
|
-
violet: "violet-vibrant",
|
|
15
|
-
yellow: "yellow-natural"
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const DEFAULT_BACKGROUND_LEVEL = 95;
|
|
19
|
-
const DEFAULT_COLOR_LEVEL = 40;
|
|
20
|
-
|
|
21
|
-
export const colorToDxColors = (
|
|
22
|
-
color?: Color
|
|
23
|
-
): {
|
|
24
|
-
background: string;
|
|
25
|
-
color: string;
|
|
26
|
-
} | null => {
|
|
27
|
-
if (!color) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const dxVarColor = LABEL_TO_DX_VAR[color];
|
|
32
|
-
if (!dxVarColor) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
background: `--dx-g-${dxVarColor}-${DEFAULT_BACKGROUND_LEVEL}`,
|
|
38
|
-
color: `--dx-g-${dxVarColor}-${DEFAULT_COLOR_LEVEL}`
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export const toDxColor = (color: string) =>
|
|
43
|
-
["white", "transparent"].includes(color) ? color : `var(--dx-g-${color})`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const isMac = () => navigator.userAgent.indexOf("Mac OS X") !== -1;
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { LightningElement, api } from "lwc";
|
|
2
|
-
import cx from "classnames";
|
|
3
|
-
import { Brand, Option } from "typings/custom";
|
|
4
|
-
import { toJson } from "utils/normalizers";
|
|
5
|
-
import { track } from "dx/instrumentation";
|
|
6
|
-
|
|
7
|
-
const VALID_BRANDS = [
|
|
8
|
-
"analytics",
|
|
9
|
-
"commerce",
|
|
10
|
-
"employees",
|
|
11
|
-
"industries",
|
|
12
|
-
"integration",
|
|
13
|
-
"learning",
|
|
14
|
-
"marketing",
|
|
15
|
-
"partners",
|
|
16
|
-
"platform",
|
|
17
|
-
"sales",
|
|
18
|
-
"service",
|
|
19
|
-
"success"
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
export const ANALYTICS_INFO = {
|
|
23
|
-
clickText: "Sign Up",
|
|
24
|
-
itemTitle: "Sign Up Header Button",
|
|
25
|
-
elementType: "button",
|
|
26
|
-
destinationType: "internal",
|
|
27
|
-
ctaClick: true
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export abstract class HeaderBase extends LightningElement {
|
|
31
|
-
@api bailHref?: string | null = null;
|
|
32
|
-
@api bailLabel?: string | null = null;
|
|
33
|
-
@api brand: Brand | null = null;
|
|
34
|
-
@api coveoOrganizationId: string | null = null;
|
|
35
|
-
@api coveoPublicAccessToken: string | null = null;
|
|
36
|
-
@api coveoSearchHub: string | null = null;
|
|
37
|
-
@api coveoSearchPipeline: string | null = null;
|
|
38
|
-
@api signupLink?: string | null = null;
|
|
39
|
-
@api href = null;
|
|
40
|
-
@api subtitle!: string;
|
|
41
|
-
@api title: string = "Salesforce";
|
|
42
|
-
@api version?: string | null = null;
|
|
43
|
-
@api bannerMarkup =
|
|
44
|
-
'<span><a href="https://forms.gle/TdSyKFPHXoBx7seM9" target="blank">Share your feedback</a>about our new site.</span>';
|
|
45
|
-
|
|
46
|
-
@api
|
|
47
|
-
get navItems() {
|
|
48
|
-
return this._navItems;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
set navItems(value) {
|
|
52
|
-
this._navItems = toJson(value);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@api
|
|
56
|
-
get versions() {
|
|
57
|
-
return this._versions;
|
|
58
|
-
}
|
|
59
|
-
set versions(value) {
|
|
60
|
-
this._versions = toJson(value);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
private _navItems!: Option[];
|
|
64
|
-
private _versions!: Option[];
|
|
65
|
-
private matchMedia!: MediaQueryList;
|
|
66
|
-
protected mobile: boolean = false;
|
|
67
|
-
private mobileNavMenuValue: string | null = null;
|
|
68
|
-
private showMobileNavMenu: boolean = false;
|
|
69
|
-
private showNavScrollShadow: boolean = false;
|
|
70
|
-
protected isSearchOpen: boolean = false;
|
|
71
|
-
|
|
72
|
-
get url() {
|
|
73
|
-
return this.href ? new URL(this.href!) : window.location;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
get hasBailLink(): boolean {
|
|
77
|
-
return !!(this.bailHref && this.bailLabel);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
get hasSearch() {
|
|
81
|
-
return (
|
|
82
|
-
this.coveoOrganizationId &&
|
|
83
|
-
this.coveoPublicAccessToken &&
|
|
84
|
-
this.coveoSearchHub &&
|
|
85
|
-
this.coveoSearchPipeline
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
get pathname() {
|
|
90
|
-
return this.url.pathname;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
get className() {
|
|
94
|
-
return cx(
|
|
95
|
-
this.hasNavItems && "has-nav-items",
|
|
96
|
-
this.showMobileNavMenu && "state-show-mobile-nav",
|
|
97
|
-
this.showNavScrollShadow &&
|
|
98
|
-
!this.showMobileNavMenu &&
|
|
99
|
-
"has-navscrollshadow",
|
|
100
|
-
this.additionalClasses()
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
get versionLabel() {
|
|
105
|
-
const selectedVersion = (this.versions || []).find(
|
|
106
|
-
(v) => v.id === this.version
|
|
107
|
-
);
|
|
108
|
-
return selectedVersion ? selectedVersion.label : "";
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
get mobileMenuIconSymbol() {
|
|
112
|
-
return this.showMobileNavMenu ? "close" : "rows";
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
get isValidBrand() {
|
|
116
|
-
return this.brand && VALID_BRANDS.includes(this.brand);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
get hasNavItems(): boolean {
|
|
120
|
-
return this.navItems && this.navItems.length > 0;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
connectedCallback() {
|
|
124
|
-
this.matchMedia = window.matchMedia(
|
|
125
|
-
`(max-width: ${this.mobileBreakpoint()})`
|
|
126
|
-
);
|
|
127
|
-
this.onMediaChange(this.matchMedia);
|
|
128
|
-
this.matchMedia.addEventListener("change", this.onMediaChange);
|
|
129
|
-
this.hashLinkScroll();
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
disconnectedCallback() {
|
|
133
|
-
this.matchMedia.removeEventListener("change", this.onMediaChange);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Temporary solution to restore native anchor scrolling
|
|
137
|
-
private hashLinkScroll() {
|
|
138
|
-
const hash = window.location.hash;
|
|
139
|
-
|
|
140
|
-
if (hash !== "") {
|
|
141
|
-
// Push onto callback queue so it runs after the DOM is updated
|
|
142
|
-
setTimeout(() => {
|
|
143
|
-
const id = hash.replace("#", "");
|
|
144
|
-
const element = document.getElementById(id);
|
|
145
|
-
if (element && element.scrollIntoView) {
|
|
146
|
-
element.scrollIntoView();
|
|
147
|
-
}
|
|
148
|
-
}, 0);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
private handleStateChange(event: CustomEvent<boolean>) {
|
|
153
|
-
event.stopPropagation();
|
|
154
|
-
this.isSearchOpen = event.detail;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
onVersionChange(e: CustomEvent) {
|
|
158
|
-
this.dispatchEvent(
|
|
159
|
-
new CustomEvent("versionchange", {
|
|
160
|
-
detail: e.detail
|
|
161
|
-
})
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
onRequestOpenNavMenu(e: { detail: string }) {
|
|
166
|
-
this.mobileNavMenuValue = e.detail;
|
|
167
|
-
this.showMobileNavMenu = true;
|
|
168
|
-
}
|
|
169
|
-
private onMobileNavMenuChange(e: { detail: string }) {
|
|
170
|
-
this.mobileNavMenuValue = e.detail;
|
|
171
|
-
}
|
|
172
|
-
private toggleMobileNavMenu() {
|
|
173
|
-
this.showMobileNavMenu = !this.showMobileNavMenu;
|
|
174
|
-
}
|
|
175
|
-
private closeMobileNavMenu() {
|
|
176
|
-
this.showMobileNavMenu = false;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
private onNavScroll(e: Event) {
|
|
180
|
-
this.showNavScrollShadow =
|
|
181
|
-
(<HTMLElement>e.currentTarget).scrollLeft > 4;
|
|
182
|
-
}
|
|
183
|
-
private onMediaChange = (e: MediaQueryListEvent | MediaQueryList) => {
|
|
184
|
-
if (!e.matches) {
|
|
185
|
-
this.mobile = false;
|
|
186
|
-
this.closeMobileNavMenu();
|
|
187
|
-
} else {
|
|
188
|
-
this.mobile = true;
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
private handleSignUpClick(e: PointerEvent) {
|
|
193
|
-
track(e.currentTarget!, "custEv_signupStart", {
|
|
194
|
-
...ANALYTICS_INFO,
|
|
195
|
-
clickUrl: this.signupLink
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
protected additionalClasses(): string {
|
|
200
|
-
return "";
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
protected abstract mobileBreakpoint(): string;
|
|
204
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const mockMediaMatch = (matches: boolean) => (query: string) => ({
|
|
2
|
-
matches,
|
|
3
|
-
media: query,
|
|
4
|
-
onchange: null,
|
|
5
|
-
addListener: jest.fn(),
|
|
6
|
-
removeListener: jest.fn(),
|
|
7
|
-
addEventListener: jest.fn(),
|
|
8
|
-
removeEventListener: jest.fn(),
|
|
9
|
-
dispatchEvent: jest.fn()
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export const createMediaMock = (
|
|
13
|
-
defaultMatch = false,
|
|
14
|
-
matchesList: Array<boolean> = []
|
|
15
|
-
) => {
|
|
16
|
-
const mediaMock = jest.fn(mockMediaMatch(defaultMatch));
|
|
17
|
-
matchesList.forEach((value) =>
|
|
18
|
-
mediaMock.mockImplementationOnce(mockMediaMatch(value))
|
|
19
|
-
);
|
|
20
|
-
return mediaMock;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const matchMediaMock = createMediaMock();
|
|
24
|
-
|
|
25
|
-
export const mockLocalStorage = function () {
|
|
26
|
-
let store: { [key: string]: string } = {};
|
|
27
|
-
return {
|
|
28
|
-
getItem: function (key: string) {
|
|
29
|
-
return store[key] || null;
|
|
30
|
-
},
|
|
31
|
-
setItem: function (key: string, value: string) {
|
|
32
|
-
store[key] = value.toString();
|
|
33
|
-
},
|
|
34
|
-
removeItem: function (key: string) {
|
|
35
|
-
delete store[key];
|
|
36
|
-
},
|
|
37
|
-
clear: function () {
|
|
38
|
-
store = {};
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const mockQueryParameter = (q: string): void => {
|
|
44
|
-
global.window = Object.create(window);
|
|
45
|
-
const search = q ? `?q=${q}` : "";
|
|
46
|
-
const href = `http://dummy.com${search}`;
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
delete window.location.value;
|
|
49
|
-
Object.defineProperty(window, "location", {
|
|
50
|
-
value: {
|
|
51
|
-
href,
|
|
52
|
-
search
|
|
53
|
-
},
|
|
54
|
-
writable: true
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const unmockQueryParameter = () => mockQueryParameter("");
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Option } from "typings/custom";
|
|
2
|
-
|
|
3
|
-
const deepmapper = (
|
|
4
|
-
_options: Option[],
|
|
5
|
-
_callback: (option: Option, lavel: number) => Option,
|
|
6
|
-
level: number = 0
|
|
7
|
-
): Option[] => {
|
|
8
|
-
const _level = level + 1;
|
|
9
|
-
return _options?.map((option: Option) =>
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11
|
-
option.options
|
|
12
|
-
? {
|
|
13
|
-
...option,
|
|
14
|
-
options: deepmapper(option.options, _callback, _level)
|
|
15
|
-
}
|
|
16
|
-
: _callback(option, _level)
|
|
17
|
-
);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const deepmapOptions = (
|
|
21
|
-
options: Option[],
|
|
22
|
-
callback: (option: Option, index: number, level: number) => Option
|
|
23
|
-
): Option[] => {
|
|
24
|
-
let index = 0;
|
|
25
|
-
return deepmapper(options, (option, level) => {
|
|
26
|
-
const newOption = callback(option, index, level);
|
|
27
|
-
index += 1;
|
|
28
|
-
return newOption;
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const getOptionsCount = (options: Option[]) => {
|
|
33
|
-
let count = 0;
|
|
34
|
-
deepmapper(options, (option) => {
|
|
35
|
-
count += 1;
|
|
36
|
-
return option;
|
|
37
|
-
});
|
|
38
|
-
return count;
|
|
39
|
-
};
|