@salesforcedevs/dx-components 0.26.2 → 0.26.3-alpha.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.
Files changed (261) hide show
  1. package/lwc.config.json +2 -1
  2. package/package.json +2 -7
  3. package/src/modules/{utils-internal → base-elements}/archiveCard/archiveCard.ts +0 -0
  4. package/src/modules/{utils-internal → base-elements}/headerBase/headerBase.ts +0 -0
  5. package/src/modules/dx/cardBlogPostProvider/cardBlogPostProvider.ts +1 -1
  6. package/src/modules/dx/cardCallout/cardCallout.ts +1 -1
  7. package/src/modules/dx/cardContent/cardContent.ts +2 -2
  8. package/src/modules/dx/cardDocs/cardDocs.ts +1 -1
  9. package/src/modules/dx/cardExpanded/cardExpanded.ts +1 -1
  10. package/src/modules/dx/cardMinimal/cardMinimal.ts +1 -1
  11. package/src/modules/dx/cardNews/cardNews.ts +1 -1
  12. package/src/modules/dx/cardPodcastEpisodeProvider/cardPodcastEpisodeProvider.ts +1 -1
  13. package/src/modules/dx/cardSmall/cardSmall.ts +1 -1
  14. package/src/modules/dx/codeBlock/codeBlock.ts +1 -1
  15. package/src/modules/dx/dropdown/dropdown.ts +1 -1
  16. package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +1 -1
  17. package/src/modules/dx/groupText/groupText.ts +1 -1
  18. package/src/modules/dx/header/header.ts +1 -1
  19. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +1 -1
  20. package/src/modules/dx/headerSearch/headerSearch.ts +1 -1
  21. package/src/modules/dx/icon/icon.ts +1 -1
  22. package/src/modules/dx/iconBadge/iconBadge.ts +1 -1
  23. package/src/modules/dx/input/input.ts +1 -1
  24. package/src/modules/dx/modalDrawer/modalDrawer.css +40 -0
  25. package/src/modules/dx/modalDrawer/modalDrawer.html +11 -0
  26. package/src/modules/dx/modalDrawer/modalDrawer.ts +27 -0
  27. package/src/modules/dx/newsletterForm/newsletterForm.html +3 -3
  28. package/src/modules/dx/popover/popover.ts +1 -1
  29. package/src/modules/dx/section/section.ts +1 -1
  30. package/src/modules/dx/sidebar/sidebar.ts +1 -1
  31. package/src/modules/dx/sidebarOld/sidebarOld.html +1 -1
  32. package/src/modules/dx/sidebarOld/sidebarOld.ts +22 -7
  33. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +41 -25
  34. package/src/modules/dx/slackCta/slackCta.css +1 -1
  35. package/src/modules/dx/tooltip/microtip.css +1 -0
  36. package/src/modules/dx/tooltip/tooltip.css +1 -0
  37. package/src/modules/dx/typeBadge/typeBadge.ts +1 -1
  38. package/src/modules/{utils-internal → utils}/coveo/coveo.ts +0 -0
  39. package/src/modules/{utils-internal → utils}/css/css.ts +0 -0
  40. package/src/modules/{utils-internal → utils}/devices/devices.ts +0 -0
  41. package/src/modules/utils/highlight/highlight.ts +28 -15
  42. package/src/modules/{utils-internal → utils}/options/options.ts +0 -0
  43. package/src/modules/{utils-internal → utils}/prismjs/prismjs.html +0 -0
  44. package/src/modules/{utils-internal → utils}/prismjs/prismjs.ts +0 -0
  45. package/src/modules/{utils-internal → utils}/recentSearches/recentSearches.ts +0 -0
  46. package/src/modules/utils/regexps/regexps.ts +12 -0
  47. package/src/modules/{utils-internal → utils}/seo/seo.ts +0 -0
  48. package/src/modules/{utils-internal → utils}/slot/slot.ts +0 -0
  49. package/src/modules/{utils-internal → utils}/wordpress/wordpress.ts +0 -0
  50. package/LICENSE +0 -12
  51. package/src/modules/dx/banner/__tests__/banner.test.ts +0 -33
  52. package/src/modules/dx/brandThemeProvider/__tests__/brandThemeProvider.test.ts +0 -49
  53. package/src/modules/dx/brandThemeProvider/brandThemeProvider.stories.ts +0 -321
  54. package/src/modules/dx/breadcrumbs/__tests__/breadcrumbs.test.ts +0 -140
  55. package/src/modules/dx/breadcrumbs/__tests__/mockProps.ts +0 -28
  56. package/src/modules/dx/breadcrumbs/breadcrumbs.stories.ts +0 -39
  57. package/src/modules/dx/button/__tests__/button.test.ts +0 -107
  58. package/src/modules/dx/button/button.stories.ts +0 -150
  59. package/src/modules/dx/cardBlogPost/__tests__/cardBlogPost.test.ts +0 -26
  60. package/src/modules/dx/cardBlogPost/__tests__/mockProps.ts +0 -12
  61. package/src/modules/dx/cardBlogPost/cardBlogPost.stories.ts +0 -164
  62. package/src/modules/dx/cardBlogPostProvider/__tests__/cardBlogPostProvider.test.ts +0 -34
  63. package/src/modules/dx/cardBlogPostProvider/__tests__/mockWordpressPosts.ts +0 -44
  64. package/src/modules/dx/cardCallout/__tests__/cardCallout.test.ts +0 -20
  65. package/src/modules/dx/cardCallout/__tests__/mockProps.ts +0 -7
  66. package/src/modules/dx/cardCallout/cardCallout.stories.ts +0 -33
  67. package/src/modules/dx/cardContent/__tests__/cardContent.test.ts +0 -100
  68. package/src/modules/dx/cardContent/__tests__/mockProps.ts +0 -13
  69. package/src/modules/dx/cardContent/cardContent.stories.ts +0 -127
  70. package/src/modules/dx/cardDemo/cardDemo.stories.ts +0 -115
  71. package/src/modules/dx/cardDocs/__tests__/cardDocs.test.ts +0 -48
  72. package/src/modules/dx/cardDocs/__tests__/mockProps.ts +0 -9
  73. package/src/modules/dx/cardDocs/cardDocs.stories.ts +0 -299
  74. package/src/modules/dx/cardEvent/__tests__/cardEvent.test.ts +0 -95
  75. package/src/modules/dx/cardEvent/__tests__/mockProps.ts +0 -10
  76. package/src/modules/dx/cardEvent/cardEvent.stories.ts +0 -153
  77. package/src/modules/dx/cardExpanded/__tests__/cardExpanded.test.ts +0 -193
  78. package/src/modules/dx/cardExpanded/__tests__/mockProps.ts +0 -21
  79. package/src/modules/dx/cardExpanded/cardExpanded.stories.ts +0 -59
  80. package/src/modules/dx/cardGrid/__tests__/cardMockProps.ts +0 -431
  81. package/src/modules/dx/cardGrid/__tests__/mockProps.ts +0 -15
  82. package/src/modules/dx/cardGrid/cardGrid.stories.ts +0 -111
  83. package/src/modules/dx/cardMinimal/__tests__/cardMinimal.test.ts +0 -87
  84. package/src/modules/dx/cardMinimal/__tests__/mockProps.ts +0 -10
  85. package/src/modules/dx/cardMinimal/cardMinimal.stories.ts +0 -32
  86. package/src/modules/dx/cardNews/__tests__/cardNews.test.ts +0 -58
  87. package/src/modules/dx/cardNews/__tests__/mockProps.ts +0 -7
  88. package/src/modules/dx/cardNews/cardNews.stories.ts +0 -115
  89. package/src/modules/dx/cardPodcastEpisode/__tests__/cardPodcastEpisode.test.ts +0 -68
  90. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.stories.ts +0 -31
  91. package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/cardPodcastEpisodeProvider.test.ts +0 -36
  92. package/src/modules/dx/cardPodcastEpisodeProvider/__tests__/mockWordpressEpisodes.ts +0 -50
  93. package/src/modules/dx/cardSmall/__tests__/cardSmall.test.ts +0 -66
  94. package/src/modules/dx/cardSmall/__tests__/mockProps.ts +0 -8
  95. package/src/modules/dx/cardSmall/cardSmall.stories.ts +0 -166
  96. package/src/modules/dx/cardTitle/__tests__/cardTitle.test.ts +0 -46
  97. package/src/modules/dx/cardTrailheadModule/__tests__/cardTrailheadModule.test.ts +0 -18
  98. package/src/modules/dx/cardTrailheadModule/__tests__/mockProps.ts +0 -11
  99. package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.stories.ts +0 -122
  100. package/src/modules/dx/cardVideoPreview/__tests__/cardVideoPreview.test.ts +0 -22
  101. package/src/modules/dx/cardVideoPreview/__tests__/mockProps.ts +0 -11
  102. package/src/modules/dx/cardVideoPreview/cardVideoPreview.stories.ts +0 -147
  103. package/src/modules/dx/checkbox/__tests__/checkbox.test.ts +0 -85
  104. package/src/modules/dx/checkbox/__tests__/mockProps.ts +0 -5
  105. package/src/modules/dx/checkbox/checkbox.stories.ts +0 -38
  106. package/src/modules/dx/checkboxGroup/__tests__/checkboxGroup.test.ts +0 -80
  107. package/src/modules/dx/checkboxGroup/__tests__/mockProps.ts +0 -14
  108. package/src/modules/dx/checkboxGroup/checkboxGroup.stories.ts +0 -33
  109. package/src/modules/dx/codeBlock/__tests__/codeBlock.test.ts +0 -238
  110. package/src/modules/dx/codeBlock/__tests__/mockProps.ts +0 -160
  111. package/src/modules/dx/codeBlock/codeBlock.stories.ts +0 -143
  112. package/src/modules/dx/dropdown/__tests__/dropdown.test.ts +0 -165
  113. package/src/modules/dx/dropdown/__tests__/mockNestedOptions.ts +0 -96
  114. package/src/modules/dx/dropdown/__tests__/mockOptions.ts +0 -10
  115. package/src/modules/dx/dropdown/__tests__/mockProps.ts +0 -6
  116. package/src/modules/dx/dropdown/dropdown.stories.ts +0 -89
  117. package/src/modules/dx/dropdownOption/__tests__/dropdownOption.test.ts +0 -112
  118. package/src/modules/dx/dropdownOption/__tests__/mockProps.ts +0 -20
  119. package/src/modules/dx/emptyState/__tests__/emptyState.test.ts +0 -52
  120. package/src/modules/dx/emptyState/__tests__/mockProps.ts +0 -4
  121. package/src/modules/dx/emptyState/emptyState.stories.ts +0 -45
  122. package/src/modules/dx/feature/__tests__/feature.test.ts +0 -51
  123. package/src/modules/dx/feature/__tests__/mockProps.ts +0 -8
  124. package/src/modules/dx/featureGrid/__tests__/featureGrid.test.ts +0 -21
  125. package/src/modules/dx/featureGrid/featureGrid.stories.ts +0 -120
  126. package/src/modules/dx/featuredContentHeader/__tests__/featuredContentHeader.test.ts +0 -178
  127. package/src/modules/dx/featuredContentHeader/__tests__/mockProps.ts +0 -73
  128. package/src/modules/dx/featuredContentHeader/featuredContentHeader.stories.ts +0 -153
  129. package/src/modules/dx/featuresList/__tests__/featuresList.test.ts +0 -43
  130. package/src/modules/dx/featuresList/__tests__/mockProps.ts +0 -17
  131. package/src/modules/dx/featuresList/featuresList.stories.ts +0 -30
  132. package/src/modules/dx/footer/__tests__/footer.test.ts +0 -147
  133. package/src/modules/dx/footer/__tests__/mockLocales.ts +0 -7
  134. package/src/modules/dx/footer/footer.stories.ts +0 -88
  135. package/src/modules/dx/footerOption/__tests__/footerOption.test.ts +0 -34
  136. package/src/modules/dx/footerOption/__tests__/mockProps.ts +0 -7
  137. package/src/modules/dx/formattedDateTime/__tests__/formattedDateTime.test.ts +0 -25
  138. package/src/modules/dx/formattedDateTime/__tests__/mockProps.ts +0 -13
  139. package/src/modules/dx/formattedDateTime/formattedDateTime.stories.ts +0 -103
  140. package/src/modules/dx/grid/__tests__/grid.test.ts +0 -32
  141. package/src/modules/dx/grid/grid.stories.ts +0 -134
  142. package/src/modules/dx/groupBio/__tests__/groupBio.test.ts +0 -82
  143. package/src/modules/dx/groupBio/__tests__/mockProps.ts +0 -15
  144. package/src/modules/dx/groupBio/groupBio.stories.ts +0 -66
  145. package/src/modules/dx/groupText/__tests__/groupText.test.ts +0 -69
  146. package/src/modules/dx/groupText/__tests__/mockProps.ts +0 -35
  147. package/src/modules/dx/groupText/groupText.stories.ts +0 -81
  148. package/src/modules/dx/header/__tests__/header.test.ts +0 -236
  149. package/src/modules/dx/header/__tests__/mockNavArchitects.ts +0 -169
  150. package/src/modules/dx/header/__tests__/mockNavDevelopers.ts +0 -419
  151. package/src/modules/dx/header/__tests__/mockNavs.ts +0 -115
  152. package/src/modules/dx/header/__tests__/mockProps.ts +0 -164
  153. package/src/modules/dx/header/header.stories.ts +0 -172
  154. package/src/modules/dx/headerMobileNavMenu/__tests__/headerMobileNavMenu.test.ts +0 -123
  155. package/src/modules/dx/headerMobileNavMenuOption/__tests__/headerMobileNavMenuOption.test.ts +0 -38
  156. package/src/modules/dx/headerNav/__tests__/headerNav.test.ts +0 -49
  157. package/src/modules/dx/headerSearch/__tests__/headerSearch.test.ts +0 -182
  158. package/src/modules/dx/headerSearch/__tests__/mockData.ts +0 -11
  159. package/src/modules/dx/headerSearch/__tests__/mockProps.ts +0 -6
  160. package/src/modules/dx/helmet/__tests__/helmet.test.ts +0 -52
  161. package/src/modules/dx/helmet/helmet.stories.ts +0 -53
  162. package/src/modules/dx/hr/__tests__/hr.test.ts +0 -53
  163. package/src/modules/dx/hr/__tests__/mockProps.ts +0 -16
  164. package/src/modules/dx/hr/hr.stories.ts +0 -50
  165. package/src/modules/dx/icon/__tests__/icon.test.ts +0 -54
  166. package/src/modules/dx/icon/icon.stories.ts +0 -100
  167. package/src/modules/dx/iconBadge/__tests__/iconBadge.test.ts +0 -17
  168. package/src/modules/dx/iconBadge/iconBadge.stories.ts +0 -32
  169. package/src/modules/dx/imageAndLabel/__tests__/imageAndLabel.test.ts +0 -39
  170. package/src/modules/dx/imageAndLabel/__tests__/mockProps.ts +0 -6
  171. package/src/modules/dx/imageAndLabel/imageAndLabel.stories.ts +0 -48
  172. package/src/modules/dx/input/__tests__/input.test.ts +0 -357
  173. package/src/modules/dx/input/input.stories.ts +0 -102
  174. package/src/modules/dx/instrumentation/__tests__/instrumentation.test.ts +0 -86
  175. package/src/modules/dx/interactiveImage/__tests__/interactiveImage.test.ts +0 -83
  176. package/src/modules/dx/interactiveImage/__tests__/mockProps.ts +0 -39
  177. package/src/modules/dx/interactiveImage/interactiveImage.stories.ts +0 -31
  178. package/src/modules/dx/lazy/__tests__/lazy.test.ts +0 -43
  179. package/src/modules/dx/lazy/lazy.stories.ts +0 -132
  180. package/src/modules/dx/pagination/__tests__/pagination.test.ts +0 -121
  181. package/src/modules/dx/pagination/pagination.stories.ts +0 -88
  182. package/src/modules/dx/podcastHost/__tests__/mockProps.ts +0 -8
  183. package/src/modules/dx/podcastHost/__tests__/podcastHost.test.ts +0 -21
  184. package/src/modules/dx/podcastHost/podcastHost.stories.ts +0 -17
  185. package/src/modules/dx/podcastPlayer/__tests__/podcastPlayer.test.ts +0 -20
  186. package/src/modules/dx/podcastPlayer/podcastPlayer.stories.ts +0 -13
  187. package/src/modules/dx/podcastSubscription/__tests__/podcastSubscription.test.ts +0 -16
  188. package/src/modules/dx/podcastSubscription/podcastSubscription.stories.ts +0 -23
  189. package/src/modules/dx/popover/__tests__/mockProps.ts +0 -8
  190. package/src/modules/dx/popover/__tests__/popover.test.ts +0 -313
  191. package/src/modules/dx/popover/popover.stories.ts +0 -82
  192. package/src/modules/dx/radioGroup/__tests__/mockProps.ts +0 -12
  193. package/src/modules/dx/radioGroup/__tests__/radioGroup.test.ts +0 -42
  194. package/src/modules/dx/radioGroup/radioGroup.stories.ts +0 -25
  195. package/src/modules/dx/relativeDateTime/__tests__/mockProps.ts +0 -55
  196. package/src/modules/dx/relativeDateTime/__tests__/relativeDateTime.test.ts +0 -52
  197. package/src/modules/dx/relativeDateTime/relativeDateTime.stories.ts +0 -83
  198. package/src/modules/dx/searchResults/searchResults.stories.ts +0 -36
  199. package/src/modules/dx/section/__tests__/section.test.ts +0 -17
  200. package/src/modules/dx/section/section.stories.ts +0 -381
  201. package/src/modules/dx/sectionSignup/__tests__/sectionSignup.test.ts +0 -66
  202. package/src/modules/dx/sectionSignup/sectionSignup.stories.ts +0 -49
  203. package/src/modules/dx/select/select.stories.ts +0 -59
  204. package/src/modules/dx/sidebar/__tests__/mockProps.ts +0 -181
  205. package/src/modules/dx/sidebar/__tests__/mockSearchChangeEmptyEvent.ts +0 -6
  206. package/src/modules/dx/sidebar/__tests__/mockSearchChangeEvent.ts +0 -527
  207. package/src/modules/dx/sidebar/__tests__/sidebar.test.ts +0 -568
  208. package/src/modules/dx/sidebar/sidebar.stories.ts +0 -188
  209. package/src/modules/dx/sidebarOld/__tests__/mockProps.ts +0 -178
  210. package/src/modules/dx/sidebarOld/__tests__/sidebarOld.test.ts +0 -570
  211. package/src/modules/dx/sidebarOld/sidebarOld.stories.ts +0 -139
  212. package/src/modules/dx/sidebarSearch/__tests__/mockPreloadedState.ts +0 -1686
  213. package/src/modules/dx/sidebarSearch/__tests__/sidebarSearch.test.ts +0 -175
  214. package/src/modules/dx/sidebarSearchResult/__tests__/sidebarSearchResult.test.ts +0 -96
  215. package/src/modules/dx/slackCta/__tests__/slackCta.test.ts +0 -36
  216. package/src/modules/dx/slackCta/slackCta.stories.ts +0 -25
  217. package/src/modules/dx/socials/__tests__/socials.test.ts +0 -114
  218. package/src/modules/dx/socials/socials.stories.ts +0 -24
  219. package/src/modules/dx/spinner/__tests__/spinner.test.ts +0 -37
  220. package/src/modules/dx/spinner/spinner.stories.ts +0 -69
  221. package/src/modules/dx/tab/__tests__/tab.test.ts +0 -129
  222. package/src/modules/dx/tab/tab.stories.ts +0 -57
  223. package/src/modules/dx/toc/__tests__/mockProps.ts +0 -28
  224. package/src/modules/dx/toc/__tests__/toc.test.ts +0 -109
  225. package/src/modules/dx/toc/toc.stories.ts +0 -26
  226. package/src/modules/dx/tooltip/__tests__/tooltip.test.ts +0 -22
  227. package/src/modules/dx/tooltip/tooltip.stories.ts +0 -46
  228. package/src/modules/dx/topics/__tests__/mockProps.ts +0 -3
  229. package/src/modules/dx/topics/__tests__/topics.test.ts +0 -31
  230. package/src/modules/dx/tree/__tests__/mockProps.ts +0 -215
  231. package/src/modules/dx/tree/__tests__/tree.test.ts +0 -346
  232. package/src/modules/dx/tree/__tests__/treeHandler.test.ts +0 -194
  233. package/src/modules/dx/tree/tree.stories.ts +0 -65
  234. package/src/modules/dx/treeItem/__tests__/mockProps.ts +0 -46
  235. package/src/modules/dx/treeItem/__tests__/treeItem.test.ts +0 -377
  236. package/src/modules/dx/treeTile/__tests__/mockProps.ts +0 -16
  237. package/src/modules/dx/treeTile/__tests__/treeTile.test.ts +0 -168
  238. package/src/modules/dx/typeBadge/__tests__/typeBadge.test.ts +0 -77
  239. package/src/modules/dx/typeBadge/typeBadge.stories.ts +0 -114
  240. package/src/modules/dx/typeBadgeGroup/__tests__/mockProps.ts +0 -11
  241. package/src/modules/dx/typeBadgeGroup/__tests__/typeBadgeGroup.test.ts +0 -72
  242. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.stories.ts +0 -19
  243. package/src/modules/test-components/buttonTest/buttonTest.html +0 -3
  244. package/src/modules/test-components/buttonTest/buttonTest.ts +0 -3
  245. package/src/modules/test-components/codeBlockTest/codeBlockTest.js +0 -4
  246. package/src/modules/test-components/featureGridTest/featureGridTest.html +0 -7
  247. package/src/modules/test-components/featureGridTest/featureGridTest.ts +0 -5
  248. package/src/modules/test-components/instrumentationTest/instrumentationTest.html +0 -4
  249. package/src/modules/test-components/instrumentationTest/instrumentationTest.ts +0 -8
  250. package/src/modules/test-components/popoverTest/popoverTest.html +0 -6
  251. package/src/modules/test-components/popoverTest/popoverTest.ts +0 -5
  252. package/src/modules/test-components/slackCtaTest/slackCtaTest.html +0 -3
  253. package/src/modules/test-components/slackCtaTest/slackCtaTest.ts +0 -3
  254. package/src/modules/utils/highlight/__tests__/highlight.test.ts +0 -108
  255. package/src/modules/utils/highlight/__tests__/mockProps.ts +0 -45
  256. package/src/modules/utils-internal/jest/jest.ts +0 -58
  257. package/src/modules/utils-internal/recentSearches/__tests__/recentSearches.test.ts +0 -83
  258. package/src/modules/utils-internal/regexps/regexps.ts +0 -5
  259. package/src/modules/utils-internal/storybook/storybook.ts +0 -32
  260. package/src/modules/utils-internal/tests/tests.ts +0 -38
  261. package/src/modules/utils-internal/wordpress/__tests__/wordpress.test.ts +0 -15
@@ -1,35 +0,0 @@
1
- const dateTime = new Date(0, 0, 1, 9, 0, 0).toISOString();
2
-
3
- export default {
4
- label: "Featured API",
5
- title: "Create powerful ecommerce experiences",
6
- owner: "REST API",
7
- attributionLink: JSON.stringify({
8
- label: "Commerce Cloud",
9
- href:
10
- "https://appexchange.salesforce.com/mktcollections/curated/c19response?d=cta-nav-external",
11
- target: "_blank"
12
- }),
13
- dateTime: dateTime,
14
- dateText: "Last updated on",
15
- body:
16
- "Set up, create, and customize a sample app using the Commerce API. We give you the tools to build and embed commerce experiences across every customer touchpoint.",
17
- primaryLink: JSON.stringify({
18
- label: "Learn More about the Cloud API",
19
- href:
20
- "https://appexchange.salesforce.com/mktcollections/curated/c19response?d=cta-nav-external",
21
- target: "_blank"
22
- }),
23
- secondaryLink: JSON.stringify({
24
- label: "View API Reference",
25
- href:
26
- "https://appexchange.salesforce.com/mktcollections/curated/c19response?d=cta-nav-external",
27
- target: "_blank"
28
- }),
29
- tertiaryLink: JSON.stringify({
30
- label: "Buy",
31
- href:
32
- "https://appexchange.salesforce.com/mktcollections/curated/c19response?d=cta-nav-external",
33
- target: "_blank"
34
- })
35
- };
@@ -1,81 +0,0 @@
1
- import { html } from "lit-html";
2
- import mockProps from "./__tests__/mockProps";
3
- import featureListMockProps from "../featuresList/__tests__/mockProps";
4
- import { renderStyle } from "../../utils-internal/storybook/storybook";
5
-
6
- export default {
7
- title: "dx/dx-group-text",
8
- component: "dx-group-text"
9
- };
10
-
11
- const featureOptions = JSON.stringify(featureListMockProps.options);
12
-
13
- export const Base = () => html`
14
- ${renderStyle("dx-group-text")}
15
- <span>Large</span>
16
- <dx-group-text
17
- label="Featured API"
18
- title="Create powerful ecommerce experiences"
19
- body="Set up, create, and customize a sample app using the Commerce API. We give you the tools to build and embed commerce experiences across every customer touchpoint."
20
- ></dx-group-text>
21
-
22
- <span>Medium</span>
23
- <dx-group-text
24
- label="Featured API"
25
- title="Create powerful ecommerce experiences"
26
- body="Set up, create, and customize a sample app using the Commerce API. We give you the tools to build and embed commerce experiences across every customer touchpoint."
27
- size="medium"
28
- ></dx-group-text>
29
- `;
30
-
31
- export const BasePlusSubtitle = (args: any) => html`
32
- ${renderStyle("dx-group-text")}
33
- <span>Large</span>
34
- <dx-group-text
35
- title="Create powerful ecommerce experiences"
36
- owner="REST API"
37
- dateTime="${args.dateTime}"
38
- date-text="Last updated on"
39
- attribution-link="${args.attributionLink}"
40
- ></dx-group-text>
41
-
42
- <span>Medium</span>
43
- <dx-group-text
44
- title="Create powerful ecommerce experiences"
45
- owner="REST API"
46
- dateTime="${args.dateTime}"
47
- date-text="Last updated on"
48
- attribution-link="${args.attributionLink}"
49
- size="medium"
50
- ></dx-group-text>
51
- `;
52
-
53
- export const Slotted = (args: any) => html`
54
- ${renderStyle("dx-group-text")}
55
- <span>Large</span>
56
- <dx-group-text
57
- label="Featured API"
58
- title="${args.title}"
59
- primary-link="${args.primaryLink}"
60
- secondary-link="${args.secondaryLink}"
61
- tertiary-link="${args.tertiaryLink}"
62
- >
63
- <dx-features-list options="${featureOptions}"></dx-features-list>
64
- </dx-group-text>
65
-
66
- <span>Medium</span>
67
- <dx-group-text
68
- label="Featured API"
69
- title="${args.title}"
70
- primary-link="${args.primaryLink}"
71
- secondary-link="${args.secondaryLink}"
72
- tertiary-link="${args.tertiaryLink}"
73
- size="medium"
74
- >
75
- <dx-features-list options="${featureOptions}"></dx-features-list>
76
- </dx-group-text>
77
- `;
78
-
79
- BasePlusSubtitle.args = mockProps;
80
- Slotted.args = mockProps;
81
- Slotted.story = { parameters: { docs: { disable: true } } };
@@ -1,236 +0,0 @@
1
- import Button from "dx/button";
2
- import Dropdown from "dx/dropdown";
3
- import Header from "dx/header";
4
- import Icon from "dx/icon";
5
- import { createRenderComponent } from "utils-internal/tests";
6
- import { ANALYTICS_INFO } from "utils-internal/headerBase";
7
- import { track } from "dx/instrumentation";
8
- import {
9
- mockPropsDevelopers,
10
- mockPropsEmployees,
11
- mockPropsNoNavigation
12
- } from "./mockProps";
13
-
14
- const TAG = "dx-header";
15
- const render = createRenderComponent(TAG, Header);
16
-
17
- jest.mock("dx/instrumentation");
18
-
19
- describe("dx-header", () => {
20
- it("renders", () => {
21
- const subtitle = "testsubtitle";
22
- const element = render({ ...mockPropsDevelopers, subtitle });
23
- const subtitleEl = element.shadowRoot.querySelector(".subtitle");
24
- const buttons: Array<HTMLElement> =
25
- element.shadowRoot.querySelectorAll("dx-button");
26
- const dropdown = element.shadowRoot.querySelector("dx-dropdown");
27
- const headerEl = element.shadowRoot.querySelector("dx-header-nav");
28
-
29
- expect(subtitleEl.textContent).toEqual(subtitle);
30
- expect(headerEl).not.toBeNull();
31
- expect(buttons).toHaveLength(2);
32
- expect(dropdown).toBeNull();
33
-
34
- const brandIcon = element.shadowRoot.querySelector(".brand-icon");
35
- expect(brandIcon).toBeNull();
36
- return expect(element).toBeAccessible();
37
- });
38
-
39
- it("doesn't render subnav when navitems is empty", () => {
40
- const element = render(mockPropsNoNavigation);
41
-
42
- const els = element.querySelectorAll(
43
- "dx-header-mobile-nav-menu, .header_l2_group-nav"
44
- );
45
-
46
- expect(els).toHaveLength(0);
47
- });
48
-
49
- it("renders the brand icon when a brand has an icon associated", () => {
50
- const element = render(mockPropsEmployees);
51
-
52
- const brandIcon: Icon = element.shadowRoot.querySelector(".brand-icon");
53
- expect(brandIcon).not.toBeNull();
54
- expect(brandIcon.symbol).toBe(mockPropsEmployees.brand);
55
- });
56
-
57
- it("doesn't render brand icon when no brand is provided", () => {
58
- const element = render({ ...mockPropsDevelopers, brand: undefined });
59
-
60
- const brandIcon: Icon = element.shadowRoot.querySelector(".brand-icon");
61
- expect(brandIcon).toBeNull();
62
- });
63
-
64
- it("receives breadcrumbs", () => {
65
- const breadcrumbs = [
66
- {
67
- href: "/apis/salesforce",
68
- label: "Apis",
69
- last: true,
70
- asLink: false
71
- }
72
- ];
73
-
74
- const element = render({ ...mockPropsDevelopers, breadcrumbs });
75
- const breadcrumb = element.shadowRoot.querySelector("dx-breadcrumbs");
76
-
77
- expect(breadcrumb.breadcrumbs).toEqual(breadcrumbs);
78
- expect(breadcrumb).not.toBeNull();
79
- return expect(element).toBeAccessible();
80
- });
81
-
82
- it("receives versions", () => {
83
- const version = { id: "123", label: "Test" };
84
- const element = render({
85
- ...mockPropsDevelopers,
86
- versions: JSON.stringify([version])
87
- });
88
- const dropdown: Dropdown =
89
- element.shadowRoot.querySelector("dx-dropdown");
90
- expect(dropdown).not.toBeNull();
91
- expect(dropdown.options).toHaveLength(1);
92
-
93
- const [option] = dropdown.options;
94
- expect(option).toHaveProperty("id", version.id);
95
- expect(option).toHaveProperty("label", version.label);
96
-
97
- return expect(element).toBeAccessible();
98
- });
99
-
100
- it("triggers event on version change", () => {
101
- const versionsListParameter = [{ id: "123", label: "Test" }];
102
- const element = render({
103
- ...mockPropsDevelopers,
104
- versions: JSON.stringify(versionsListParameter)
105
- });
106
- const dropdown: HTMLElement = element.shadowRoot.querySelector(
107
- ".header_version-dropdown"
108
- );
109
- const mockVersionChange = jest.fn();
110
- element.addEventListener("versionchange", mockVersionChange);
111
-
112
- dropdown.dispatchEvent(new CustomEvent("change", { detail: "123" }));
113
- expect(mockVersionChange).toBeCalledTimes(1);
114
- expect(mockVersionChange.mock.calls[0][0].detail).toEqual("123");
115
- return expect(element).toBeAccessible();
116
- });
117
-
118
- it("triggers event onrequestopennav", () => {
119
- const element = render({
120
- ...mockPropsDevelopers
121
- });
122
- const headerEl = element.shadowRoot.querySelector("dx-header-nav");
123
- const headerMobile = element.shadowRoot.querySelector(
124
- "dx-header-mobile-nav-menu"
125
- );
126
-
127
- headerEl.dispatchEvent(
128
- new CustomEvent("requestopennavmenu", { detail: "123" })
129
- );
130
-
131
- return Promise.resolve().then(() => {
132
- expect(headerMobile.value).toEqual("123");
133
- expect(headerMobile.open).toEqual(true);
134
- });
135
- });
136
-
137
- it("tests toggle button", () => {
138
- const element = render({
139
- ...mockPropsDevelopers
140
- });
141
- const button: HTMLElement = element.shadowRoot.querySelector(
142
- ".header_l2_group-nav_menu-button"
143
- );
144
- const header = element.shadowRoot.querySelector(
145
- "dx-header-mobile-nav-menu"
146
- );
147
- const toggleStatus = header.open;
148
-
149
- button.click();
150
-
151
- return Promise.resolve().then(() =>
152
- expect(header.open).toEqual(!toggleStatus)
153
- );
154
- });
155
-
156
- it("tests mobile nav change", () => {
157
- const element = render({
158
- ...mockPropsDevelopers
159
- });
160
- const headerMobile = element.shadowRoot.querySelector(
161
- "dx-header-mobile-nav-menu"
162
- );
163
-
164
- headerMobile.dispatchEvent(
165
- new CustomEvent("change", { detail: "test" })
166
- );
167
- return Promise.resolve().then(() => {
168
- expect(headerMobile.value).toEqual("test");
169
- });
170
- });
171
-
172
- it("renders signup button and has bailLink", () => {
173
- const element = render({
174
- ...mockPropsDevelopers,
175
- bailHref: "test",
176
- bailLabel: "test",
177
- signupLink: "/"
178
- });
179
- const buttons: Array<Button> =
180
- element.shadowRoot.querySelectorAll("dx-button");
181
-
182
- expect(buttons[0].href).toEqual("/");
183
- expect(buttons[2].href).toEqual("test");
184
- return expect(element).toBeAccessible();
185
- });
186
-
187
- it("won't render search if any coveo properties are missing", () => {
188
- const element = render({
189
- subtitle: mockPropsDevelopers.subtitle,
190
- navItems: mockPropsDevelopers.navItems
191
- });
192
- const headerSearch =
193
- element.shadowRoot.querySelector("dx-header-search");
194
-
195
- expect(headerSearch).toBeNull();
196
- return expect(element).toBeAccessible();
197
- });
198
-
199
- it("signup button track is being called", () => {
200
- const element = render(mockPropsDevelopers);
201
-
202
- const button: HTMLElement =
203
- element.shadowRoot.querySelector("dx-button");
204
-
205
- button.click();
206
-
207
- expect(track).toBeCalledTimes(1);
208
- expect(track).toBeCalledWith(button, "custEv_signupStart", {
209
- ...ANALYTICS_INFO,
210
- clickUrl: "/sign-up"
211
- });
212
- });
213
-
214
- it("hides signup button when signupLink property is empty", () => {
215
- const updatedMockPropsDevelopers = {
216
- ...mockPropsDevelopers,
217
- signupLink: ""
218
- };
219
- const element = render(updatedMockPropsDevelopers);
220
- const signupButtonContainer: HTMLElement =
221
- element.shadowRoot.querySelector(".header-login-signup");
222
- expect(signupButtonContainer).toBeNull();
223
- });
224
-
225
- it("hides banner when banner markup is empty", () => {
226
- const bannerMarkup = "";
227
- const updatedMockPropsDevelopers = {
228
- ...mockPropsDevelopers,
229
- bannerMarkup
230
- };
231
- const element = render(updatedMockPropsDevelopers);
232
- const bannerElement: HTMLElement =
233
- element.shadowRoot.querySelector("dx-banner");
234
- expect(bannerElement).toBeNull();
235
- });
236
- });
@@ -1,169 +0,0 @@
1
- export default [
2
- {
3
- id: "home",
4
- label: "Home",
5
- link: {
6
- href: "/architects",
7
- target: null
8
- }
9
- },
10
- {
11
- id: "design",
12
- label: "Design",
13
- link: {
14
- href: "/architects/design",
15
- target: null
16
- }
17
- },
18
- {
19
- id: "deliver",
20
- label: "Deliver",
21
- link: {
22
- href: "/architects/deliver",
23
- target: null
24
- }
25
- },
26
- {
27
- id: "govern",
28
- label: "Govern",
29
- link: {
30
- href: "/architects/govern",
31
- target: null
32
- }
33
- },
34
- {
35
- id: "roadmap",
36
- label: "Roadmap",
37
- link: {
38
- href: "/architects/roadmap",
39
- target: null
40
- }
41
- },
42
- {
43
- id: "covid-19",
44
- label: "COVID-19",
45
- options: [
46
- {
47
- id: "covid-resources",
48
- label: "COVID-19 Resources",
49
- options: [
50
- {
51
- id: "covid19-work",
52
- label: "Work.com",
53
- link: {
54
- href: "https://www.salesforce.com/work",
55
- target: "_blank"
56
- }
57
- },
58
- {
59
- id: "covid19-leading-through-change-with-data",
60
- label: "Leading Through Change with Data",
61
- link: {
62
- href:
63
- "https://www.tableau.com/leading-through-change?placement=homepage&utm_medium=Referral&utm_source=Salesforce",
64
- target: "_blank"
65
- }
66
- },
67
- {
68
- id: "covid19-data-hub",
69
- label: "COVID-19 Data Hub",
70
- link: {
71
- href:
72
- "https://www.tableau.com/covid-19-coronavirus-data-resources?placement=homepage&utm_medium=Referral&utm_source=Salesforce",
73
- target: "_blank"
74
- }
75
- },
76
- {
77
- id: "covid19-global-daily-tracker",
78
- label: "COVID-19 Global Daily Tracker",
79
- link: {
80
- href:
81
- "https://www.tableau.com/covid-19-coronavirus-data-resources/global-tracker?placement=homepage&utm_medium=Referral&utm_source=Salesforce",
82
- target: "_blank"
83
- }
84
- },
85
- {
86
- id: "covid19-global-economy-data-track",
87
- label: "Global Economy Data Track",
88
- link: {
89
- href:
90
- "https://www.tableau.com/covid-19-coronavirus-data-resources/economy-data-track?placement=homepage&utm_medium=Referral&utm_source=Salesforce",
91
- target: "_blank"
92
- }
93
- },
94
- {
95
- id: "covid19-government-data-track",
96
- label: "Government Data Track",
97
- link: {
98
- href:
99
- "https://www.tableau.com/covid-19-coronavirus-data-resources/government-data-track?placement=homepage&utm_medium=Referral&utm_source=Salesforce",
100
- target: "_blank"
101
- }
102
- },
103
- {
104
- id: "covid19-healthcare-data-track",
105
- label: "Healthcare Data Track",
106
- link: {
107
- href:
108
- "https://www.tableau.com/covid-19-coronavirus-data-resources/healthcare-data-track?placement=homepage&utm_medium=Referral&utm_source=Salesforce",
109
- target: "_blank"
110
- }
111
- },
112
- {
113
- id: "covid19-b-well-together",
114
- label: "B-Well Together",
115
- link: {
116
- href:
117
- "https://www.salesforce.com/resources/videos/be-well/?d=cta-glob-nav-5",
118
- target: "_blank"
119
- }
120
- },
121
- {
122
- id: "covid19-leading-through-change",
123
- label: "Leading Through Change",
124
- link: {
125
- href:
126
- "https://www.salesforce.com/resources/leading-through-change/#!page=1",
127
- target: "_blank"
128
- }
129
- },
130
- {
131
- id: "covid19-salesforce-care",
132
- label: "Salesforce Care",
133
- link: {
134
- href:
135
- "https://www.salesforce.com/solutions/covid-19-response/overview/?d=cta-glob-nav-7",
136
- target: "_blank"
137
- }
138
- },
139
- {
140
- id: "covid19-trailhead-resources",
141
- label: "Trailhead Resources",
142
- link: {
143
- href:
144
- "https://trailhead.salesforce.com/users/strailhead/trailmixes/trailhead-resources-during-covid-19?utm_source=salesforce_properties&utm_medium=global_nav&utm_campaign=covid19&utm_content=covid_resources_trailmix",
145
- target: "_blank"
146
- }
147
- },
148
- {
149
- id: "covid19-appexchange-resources",
150
- label: "AppExchange Resources",
151
- link: {
152
- href:
153
- "https://appexchange.salesforce.com/mktcollections/curated/c19response?d=cta-nav-external",
154
- target: "_blank"
155
- }
156
- },
157
- {
158
- id: "covid19-mulesoft-resources",
159
- label: "MuleSoft Resources",
160
- link: {
161
- href: "https://www.mulesoft.com/resources/covid-19",
162
- target: "_blank"
163
- }
164
- }
165
- ]
166
- }
167
- ]
168
- }
169
- ];