@salesforcedevs/dx-components 0.0.0

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 (327) hide show
  1. package/LICENSE +12 -0
  2. package/lwc.config.json +96 -0
  3. package/package.json +32 -0
  4. package/src/assets/icons/action-sprite/svg/symbols.svg +1 -0
  5. package/src/assets/icons/brand-sprite/svg/symbols.svg +1381 -0
  6. package/src/assets/icons/custom-sprite/svg/symbols.svg +1 -0
  7. package/src/assets/icons/doctype-sprite/svg/symbols.svg +1 -0
  8. package/src/assets/icons/general-sprite/svg/symbols.svg +3013 -0
  9. package/src/assets/icons/salesforcebrand-sprite/svg/symbols.svg +608 -0
  10. package/src/assets/icons/standard-sprite/svg/symbols.svg +1 -0
  11. package/src/assets/icons/utility-sprite/svg/symbols.svg +1 -0
  12. package/src/assets/svg/card-news-learn-moar.svg +415 -0
  13. package/src/assets/svg/cloud-1.svg +24 -0
  14. package/src/assets/svg/cloud-2.svg +18 -0
  15. package/src/assets/svg/codey.svg +93 -0
  16. package/src/assets/svg/command.svg +9 -0
  17. package/src/assets/svg/control.svg +10 -0
  18. package/src/assets/svg/docs-empty-state-small.svg +72 -0
  19. package/src/assets/svg/docs-empty-state.svg +86 -0
  20. package/src/assets/svg/dsc-home-news-bear.svg +3 -0
  21. package/src/assets/svg/dsc-home-news-community.png +0 -0
  22. package/src/assets/svg/dsc-home-news-goatbear.svg +257 -0
  23. package/src/assets/svg/dsc-home-news-samplegallery.svg +76 -0
  24. package/src/assets/svg/empty-state-assistant.svg +1 -0
  25. package/src/assets/svg/fch-blog-cloud-1.png +0 -0
  26. package/src/assets/svg/fch-blog-cloud-2.png +0 -0
  27. package/src/assets/svg/fch-blog-planet.png +0 -0
  28. package/src/assets/svg/feature-backdrop1.svg +10 -0
  29. package/src/assets/svg/feature-backdrop2.svg +10 -0
  30. package/src/assets/svg/featured-demo-art-blank.svg +76 -0
  31. package/src/assets/svg/featured-demo-art-eBikes.svg +77 -0
  32. package/src/assets/svg/footer-graphic-large.svg +207 -0
  33. package/src/assets/svg/footer-graphic-mountains-small.svg +17 -0
  34. package/src/assets/svg/footer-graphic-mountains.svg +21 -0
  35. package/src/assets/svg/footer-graphic-trees-small.svg +33 -0
  36. package/src/assets/svg/footer-graphic-trees.svg +62 -0
  37. package/src/assets/svg/lake-mountain.svg +79 -0
  38. package/src/assets/svg/no-results-combined.svg +80 -0
  39. package/src/assets/svg/podcast-subscription-clouds-small.svg +49 -0
  40. package/src/assets/svg/podcast-subscription-clouds.svg +57 -0
  41. package/src/assets/svg/podcasts-subscription-apple.svg +164 -0
  42. package/src/assets/svg/podcasts-subscription-google.svg +29 -0
  43. package/src/assets/svg/podcasts-subscription-spotify.svg +11 -0
  44. package/src/assets/svg/salesforce-cloud.svg +7 -0
  45. package/src/assets/svg/salesforce-logo-corporate.svg +21 -0
  46. package/src/assets/svg/salesforce-logo.svg +14 -0
  47. package/src/assets/svg/sidebar-item-loading.svg +3 -0
  48. package/src/assets/svg/sidebar-loading.svg +34 -0
  49. package/src/assets/svg/slack-cta-podcast-background-left.svg +28 -0
  50. package/src/assets/svg/slack-cta-podcast-background-right.svg +38 -0
  51. package/src/assets/svg/subscribe-background-left.svg +14 -0
  52. package/src/assets/svg/subscribe-background-right.svg +11 -0
  53. package/src/assets/svg/trees.svg +42 -0
  54. package/src/modules/dx/banner/banner.css +46 -0
  55. package/src/modules/dx/banner/banner.html +13 -0
  56. package/src/modules/dx/banner/banner.ts +12 -0
  57. package/src/modules/dx/brandThemeProvider/brandCssVars.ts +10 -0
  58. package/src/modules/dx/brandThemeProvider/brandThemeProvider.html +3 -0
  59. package/src/modules/dx/brandThemeProvider/brandThemeProvider.ts +46 -0
  60. package/src/modules/dx/breadcrumbs/breadcrumbs.css +111 -0
  61. package/src/modules/dx/breadcrumbs/breadcrumbs.html +44 -0
  62. package/src/modules/dx/breadcrumbs/breadcrumbs.ts +123 -0
  63. package/src/modules/dx/button/button.css +198 -0
  64. package/src/modules/dx/button/button.html +43 -0
  65. package/src/modules/dx/button/button.ts +68 -0
  66. package/src/modules/dx/cardBlogPost/cardBlogPost.css +13 -0
  67. package/src/modules/dx/cardBlogPost/cardBlogPost.html +24 -0
  68. package/src/modules/dx/cardBlogPost/cardBlogPost.ts +23 -0
  69. package/src/modules/dx/cardCallout/cardCallout.css +57 -0
  70. package/src/modules/dx/cardCallout/cardCallout.html +15 -0
  71. package/src/modules/dx/cardCallout/cardCallout.ts +41 -0
  72. package/src/modules/dx/cardContent/cardContent.css +52 -0
  73. package/src/modules/dx/cardContent/cardContent.html +62 -0
  74. package/src/modules/dx/cardContent/cardContent.ts +68 -0
  75. package/src/modules/dx/cardDemo/cardDemo.css +1 -0
  76. package/src/modules/dx/cardDemo/cardDemo.html +12 -0
  77. package/src/modules/dx/cardDemo/cardDemo.ts +11 -0
  78. package/src/modules/dx/cardDocs/cardDocs.css +50 -0
  79. package/src/modules/dx/cardDocs/cardDocs.html +23 -0
  80. package/src/modules/dx/cardDocs/cardDocs.ts +30 -0
  81. package/src/modules/dx/cardEvent/cardEvent.css +107 -0
  82. package/src/modules/dx/cardEvent/cardEvent.html +94 -0
  83. package/src/modules/dx/cardEvent/cardEvent.ts +42 -0
  84. package/src/modules/dx/cardExpanded/cardExpanded.css +50 -0
  85. package/src/modules/dx/cardExpanded/cardExpanded.html +36 -0
  86. package/src/modules/dx/cardExpanded/cardExpanded.ts +44 -0
  87. package/src/modules/dx/cardGridDocs/cardGridDocs.css +74 -0
  88. package/src/modules/dx/cardGridDocs/cardGridDocs.html +67 -0
  89. package/src/modules/dx/cardGridDocs/cardGridDocs.ts +86 -0
  90. package/src/modules/dx/cardMinimal/cardMinimal.css +31 -0
  91. package/src/modules/dx/cardMinimal/cardMinimal.html +13 -0
  92. package/src/modules/dx/cardMinimal/cardMinimal.ts +3 -0
  93. package/src/modules/dx/cardNews/cardNews.css +159 -0
  94. package/src/modules/dx/cardNews/cardNews.html +39 -0
  95. package/src/modules/dx/cardNews/cardNews.ts +77 -0
  96. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.css +19 -0
  97. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.html +36 -0
  98. package/src/modules/dx/cardPodcastEpisode/cardPodcastEpisode.ts +36 -0
  99. package/src/modules/dx/cardSmall/cardSmall.css +32 -0
  100. package/src/modules/dx/cardSmall/cardSmall.html +42 -0
  101. package/src/modules/dx/cardSmall/cardSmall.ts +38 -0
  102. package/src/modules/dx/cardTitle/cardTitle.css +43 -0
  103. package/src/modules/dx/cardTitle/cardTitle.html +20 -0
  104. package/src/modules/dx/cardTitle/cardTitle.ts +27 -0
  105. package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.css +24 -0
  106. package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.html +20 -0
  107. package/src/modules/dx/cardTrailheadModule/cardTrailheadModule.ts +18 -0
  108. package/src/modules/dx/cardTrial/cardTrial.css +71 -0
  109. package/src/modules/dx/cardTrial/cardTrial.html +31 -0
  110. package/src/modules/dx/cardTrial/cardTrial.ts +34 -0
  111. package/src/modules/dx/cardVideoPreview/cardVideoPreview.css +14 -0
  112. package/src/modules/dx/cardVideoPreview/cardVideoPreview.html +27 -0
  113. package/src/modules/dx/cardVideoPreview/cardVideoPreview.ts +13 -0
  114. package/src/modules/dx/checkbox/checkbox.css +172 -0
  115. package/src/modules/dx/checkbox/checkbox.html +26 -0
  116. package/src/modules/dx/checkbox/checkbox.ts +56 -0
  117. package/src/modules/dx/checkboxGroup/checkboxGroup.css +12 -0
  118. package/src/modules/dx/checkboxGroup/checkboxGroup.html +15 -0
  119. package/src/modules/dx/checkboxGroup/checkboxGroup.ts +77 -0
  120. package/src/modules/dx/checkboxNative/checkboxNative.css +21 -0
  121. package/src/modules/dx/checkboxNative/checkboxNative.html +14 -0
  122. package/src/modules/dx/checkboxNative/checkboxNative.ts +39 -0
  123. package/src/modules/dx/codeBlock/codeBlock.css +128 -0
  124. package/src/modules/dx/codeBlock/codeBlock.html +79 -0
  125. package/src/modules/dx/codeBlock/codeBlock.ts +222 -0
  126. package/src/modules/dx/codeBlock/darkTheme.css +88 -0
  127. package/src/modules/dx/codeBlock/lightTheme.css +72 -0
  128. package/src/modules/dx/dropdown/dropdown.css +93 -0
  129. package/src/modules/dx/dropdown/dropdown.html +73 -0
  130. package/src/modules/dx/dropdown/dropdown.ts +193 -0
  131. package/src/modules/dx/dropdownOption/dropdownOption.css +179 -0
  132. package/src/modules/dx/dropdownOption/dropdownOption.html +57 -0
  133. package/src/modules/dx/dropdownOption/dropdownOption.ts +67 -0
  134. package/src/modules/dx/emptyState/emptyState.css +64 -0
  135. package/src/modules/dx/emptyState/emptyState.html +9 -0
  136. package/src/modules/dx/emptyState/emptyState.ts +20 -0
  137. package/src/modules/dx/feature/feature.css +135 -0
  138. package/src/modules/dx/feature/feature.html +33 -0
  139. package/src/modules/dx/feature/feature.ts +34 -0
  140. package/src/modules/dx/featureGrid/featureGrid.html +3 -0
  141. package/src/modules/dx/featureGrid/featureGrid.ts +15 -0
  142. package/src/modules/dx/featuredContentHeader/featuredContentHeader.css +468 -0
  143. package/src/modules/dx/featuredContentHeader/featuredContentHeader.html +109 -0
  144. package/src/modules/dx/featuredContentHeader/featuredContentHeader.ts +102 -0
  145. package/src/modules/dx/featuredContentHeader/svgs.ts +35 -0
  146. package/src/modules/dx/featuresList/featuresList.css +24 -0
  147. package/src/modules/dx/featuresList/featuresList.html +20 -0
  148. package/src/modules/dx/featuresList/featuresList.ts +21 -0
  149. package/src/modules/dx/filterMenu/filterMenu.css +138 -0
  150. package/src/modules/dx/filterMenu/filterMenu.html +116 -0
  151. package/src/modules/dx/filterMenu/filterMenu.ts +119 -0
  152. package/src/modules/dx/footer/footer.css +405 -0
  153. package/src/modules/dx/footer/footer.html +150 -0
  154. package/src/modules/dx/footer/footer.ts +129 -0
  155. package/src/modules/dx/footer/links.ts +206 -0
  156. package/src/modules/dx/footerOption/footerOption.css +4 -0
  157. package/src/modules/dx/footerOption/footerOption.html +12 -0
  158. package/src/modules/dx/footerOption/footerOption.ts +19 -0
  159. package/src/modules/dx/formattedDateTime/formattedDateTime.html +1 -0
  160. package/src/modules/dx/formattedDateTime/formattedDateTime.ts +77 -0
  161. package/src/modules/dx/grid/grid.css +48 -0
  162. package/src/modules/dx/grid/grid.html +3 -0
  163. package/src/modules/dx/grid/grid.md +14 -0
  164. package/src/modules/dx/grid/grid.ts +74 -0
  165. package/src/modules/dx/groupText/groupText.css +119 -0
  166. package/src/modules/dx/groupText/groupText.html +68 -0
  167. package/src/modules/dx/groupText/groupText.ts +111 -0
  168. package/src/modules/dx/header/__benchmarks__/header.benchmark.js +45 -0
  169. package/src/modules/dx/header/header.css +99 -0
  170. package/src/modules/dx/header/header.html +122 -0
  171. package/src/modules/dx/header/header.ts +13 -0
  172. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.css +160 -0
  173. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.html +73 -0
  174. package/src/modules/dx/headerMobileNavMenu/headerMobileNavMenu.ts +102 -0
  175. package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.css +5 -0
  176. package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.html +14 -0
  177. package/src/modules/dx/headerMobileNavMenuOption/headerMobileNavMenuOption.ts +20 -0
  178. package/src/modules/dx/headerNav/headerNav.css +31 -0
  179. package/src/modules/dx/headerNav/headerNav.html +48 -0
  180. package/src/modules/dx/headerNav/headerNav.ts +56 -0
  181. package/src/modules/dx/headerSearch/headerSearch.css +62 -0
  182. package/src/modules/dx/headerSearch/headerSearch.html +62 -0
  183. package/src/modules/dx/headerSearch/headerSearch.ts +159 -0
  184. package/src/modules/dx/helmet/helmet.css +83 -0
  185. package/src/modules/dx/helmet/helmet.html +39 -0
  186. package/src/modules/dx/helmet/helmet.ts +27 -0
  187. package/src/modules/dx/hr/hr.css +56 -0
  188. package/src/modules/dx/hr/hr.html +23 -0
  189. package/src/modules/dx/hr/hr.ts +45 -0
  190. package/src/modules/dx/icon/icon.css +14 -0
  191. package/src/modules/dx/icon/icon.html +11 -0
  192. package/src/modules/dx/icon/icon.ts +85 -0
  193. package/src/modules/dx/iconBadge/iconBadge.css +52 -0
  194. package/src/modules/dx/iconBadge/iconBadge.html +5 -0
  195. package/src/modules/dx/iconBadge/iconBadge.ts +52 -0
  196. package/src/modules/dx/imageAndLabel/imageAndLabel.css +54 -0
  197. package/src/modules/dx/imageAndLabel/imageAndLabel.html +22 -0
  198. package/src/modules/dx/imageAndLabel/imageAndLabel.ts +16 -0
  199. package/src/modules/dx/input/input.css +181 -0
  200. package/src/modules/dx/input/input.html +62 -0
  201. package/src/modules/dx/input/input.ts +246 -0
  202. package/src/modules/dx/input/validators.ts +5 -0
  203. package/src/modules/dx/logo/logo.css +33 -0
  204. package/src/modules/dx/logo/logo.html +6 -0
  205. package/src/modules/dx/logo/logo.ts +8 -0
  206. package/src/modules/dx/modalDrawer/modalDrawer.css +41 -0
  207. package/src/modules/dx/modalDrawer/modalDrawer.html +11 -0
  208. package/src/modules/dx/modalDrawer/modalDrawer.ts +27 -0
  209. package/src/modules/dx/pagination/pagination.css +51 -0
  210. package/src/modules/dx/pagination/pagination.html +45 -0
  211. package/src/modules/dx/pagination/pagination.ts +135 -0
  212. package/src/modules/dx/podcastHost/podcastHost.css +62 -0
  213. package/src/modules/dx/podcastHost/podcastHost.html +28 -0
  214. package/src/modules/dx/podcastHost/podcastHost.ts +13 -0
  215. package/src/modules/dx/podcastPlayer/podcastPlayer.css +10 -0
  216. package/src/modules/dx/podcastPlayer/podcastPlayer.html +3 -0
  217. package/src/modules/dx/podcastPlayer/podcastPlayer.ts +5 -0
  218. package/src/modules/dx/popover/popover.css +65 -0
  219. package/src/modules/dx/popover/popover.html +16 -0
  220. package/src/modules/dx/popover/popover.ts +306 -0
  221. package/src/modules/dx/radioGroup/radioGroup.css +12 -0
  222. package/src/modules/dx/radioGroup/radioGroup.html +16 -0
  223. package/src/modules/dx/radioGroup/radioGroup.ts +65 -0
  224. package/src/modules/dx/relativeDateTime/relativeDateTime.html +3 -0
  225. package/src/modules/dx/relativeDateTime/relativeDateTime.ts +113 -0
  226. package/src/modules/dx/searchResults/coveo.css +18989 -0
  227. package/src/modules/dx/searchResults/searchResults.css +387 -0
  228. package/src/modules/dx/searchResults/searchResults.html +104 -0
  229. package/src/modules/dx/searchResults/searchResults.ts +187 -0
  230. package/src/modules/dx/section/section.css +130 -0
  231. package/src/modules/dx/section/section.html +66 -0
  232. package/src/modules/dx/section/section.ts +41 -0
  233. package/src/modules/dx/sectionSignup/sectionSignup.css +43 -0
  234. package/src/modules/dx/sectionSignup/sectionSignup.html +23 -0
  235. package/src/modules/dx/sectionSignup/sectionSignup.ts +44 -0
  236. package/src/modules/dx/select/select.css +221 -0
  237. package/src/modules/dx/select/select.html +57 -0
  238. package/src/modules/dx/select/select.ts +141 -0
  239. package/src/modules/dx/sidebar/sidebar.css +48 -0
  240. package/src/modules/dx/sidebar/sidebar.html +95 -0
  241. package/src/modules/dx/sidebar/sidebar.ts +258 -0
  242. package/src/modules/dx/sidebarOld/sidebarOld.css +16 -0
  243. package/src/modules/dx/sidebarOld/sidebarOld.html +74 -0
  244. package/src/modules/dx/sidebarOld/sidebarOld.ts +194 -0
  245. package/src/modules/dx/sidebarSearch/sidebarSearch.css +3 -0
  246. package/src/modules/dx/sidebarSearch/sidebarSearch.html +26 -0
  247. package/src/modules/dx/sidebarSearch/sidebarSearch.ts +463 -0
  248. package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.css +36 -0
  249. package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.html +14 -0
  250. package/src/modules/dx/sidebarSearchResult/sidebarSearchResult.ts +70 -0
  251. package/src/modules/dx/skipNavLink/skipNavLink.css +21 -0
  252. package/src/modules/dx/skipNavLink/skipNavLink.html +3 -0
  253. package/src/modules/dx/skipNavLink/skipNavLink.ts +3 -0
  254. package/src/modules/dx/socials/socials.css +35 -0
  255. package/src/modules/dx/socials/socials.html +22 -0
  256. package/src/modules/dx/socials/socials.ts +81 -0
  257. package/src/modules/dx/spinner/spinner.css +743 -0
  258. package/src/modules/dx/spinner/spinner.html +6 -0
  259. package/src/modules/dx/spinner/spinner.ts +20 -0
  260. package/src/modules/dx/tab/tab.css +106 -0
  261. package/src/modules/dx/tab/tab.html +13 -0
  262. package/src/modules/dx/tab/tab.ts +52 -0
  263. package/src/modules/dx/toc/toc.css +106 -0
  264. package/src/modules/dx/toc/toc.html +29 -0
  265. package/src/modules/dx/toc/toc.ts +77 -0
  266. package/src/modules/dx/tooltip/microtip.css +269 -0
  267. package/src/modules/dx/tooltip/tooltip.css +37 -0
  268. package/src/modules/dx/tooltip/tooltip.html +5 -0
  269. package/src/modules/dx/tooltip/tooltip.ts +6 -0
  270. package/src/modules/dx/topics/topics.css +26 -0
  271. package/src/modules/dx/topics/topics.html +12 -0
  272. package/src/modules/dx/topics/topics.ts +25 -0
  273. package/src/modules/dx/tree/tree.css +5 -0
  274. package/src/modules/dx/tree/tree.html +11 -0
  275. package/src/modules/dx/tree/tree.ts +80 -0
  276. package/src/modules/dx/tree/treeHandler.ts +101 -0
  277. package/src/modules/dx/treeItem/treeItem.css +25 -0
  278. package/src/modules/dx/treeItem/treeItem.html +29 -0
  279. package/src/modules/dx/treeItem/treeItem.ts +146 -0
  280. package/src/modules/dx/treeTile/treeTile.css +190 -0
  281. package/src/modules/dx/treeTile/treeTile.html +27 -0
  282. package/src/modules/dx/treeTile/treeTile.ts +60 -0
  283. package/src/modules/dx/typeBadge/typeBadge.css +74 -0
  284. package/src/modules/dx/typeBadge/typeBadge.html +5 -0
  285. package/src/modules/dx/typeBadge/typeBadge.ts +65 -0
  286. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.css +12 -0
  287. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.html +11 -0
  288. package/src/modules/dx/typeBadgeGroup/typeBadgeGroup.ts +18 -0
  289. package/src/modules/dx/vimeoPlayer/vimeoPlayer.css +1 -0
  290. package/src/modules/dx/vimeoPlayer/vimeoPlayer.html +3 -0
  291. package/src/modules/dx/vimeoPlayer/vimeoPlayer.ts +31 -0
  292. package/src/modules/dxBaseElements/archiveCard/archiveCard.ts +35 -0
  293. package/src/modules/dxBaseElements/headerBase/headerBase.ts +205 -0
  294. package/src/modules/dxBaseElements/matchMediaElement/matchMediaElement.ts +59 -0
  295. package/src/modules/dxBaseElements/sidebarBase/sidebarBase.ts +65 -0
  296. package/src/modules/dxHelpers/animations/animations.css +15 -0
  297. package/src/modules/dxHelpers/button/button.css +4 -0
  298. package/src/modules/dxHelpers/card/card.css +263 -0
  299. package/src/modules/dxHelpers/code/code.css +296 -0
  300. package/src/modules/dxHelpers/commonHeader/commonHeader.css +130 -0
  301. package/src/modules/dxHelpers/commonSidebar/commonSidebar.css +145 -0
  302. package/src/modules/dxHelpers/commonTreeItem/commonTreeItem.css +21 -0
  303. package/src/modules/dxHelpers/reset/reset.css +559 -0
  304. package/src/modules/dxHelpers/scrollbar/scrollbar.css +31 -0
  305. package/src/modules/dxHelpers/table/table.css +110 -0
  306. package/src/modules/dxHelpers/text/text.css +197 -0
  307. package/src/modules/dxUtils/analytics/analytics.ts +24 -0
  308. package/src/modules/dxUtils/browser/browser.ts +17 -0
  309. package/src/modules/dxUtils/constants/breakpoints.ts +9 -0
  310. package/src/modules/dxUtils/constants/constants.ts +1 -0
  311. package/src/modules/dxUtils/coveo/coveo.ts +70 -0
  312. package/src/modules/dxUtils/css/css.ts +43 -0
  313. package/src/modules/dxUtils/dates/dates.ts +60 -0
  314. package/src/modules/dxUtils/devices/devices.ts +1 -0
  315. package/src/modules/dxUtils/highlight/highlight.ts +32 -0
  316. package/src/modules/dxUtils/language/language.ts +21 -0
  317. package/src/modules/dxUtils/lwc/lwc.ts +9 -0
  318. package/src/modules/dxUtils/normalizers/normalizers.ts +80 -0
  319. package/src/modules/dxUtils/options/options.ts +43 -0
  320. package/src/modules/dxUtils/prismjs/prismjs.html +3 -0
  321. package/src/modules/dxUtils/prismjs/prismjs.ts +3937 -0
  322. package/src/modules/dxUtils/queryCoordinator/queryCoordinator.ts +43 -0
  323. package/src/modules/dxUtils/recentSearches/recentSearches.ts +57 -0
  324. package/src/modules/dxUtils/regexps/regexps.ts +5 -0
  325. package/src/modules/dxUtils/seo/seo.ts +4 -0
  326. package/src/modules/dxUtils/slot/slot.ts +17 -0
  327. package/src/modules/dxUtils/wordpress/wordpress.ts +13 -0
@@ -0,0 +1,206 @@
1
+ import { OptionWithRequiredNested } from "typings/custom";
2
+
3
+ export const generalLinksRaw: OptionWithRequiredNested[] = [
4
+ {
5
+ id: "Developer Centers",
6
+ label: "Developer Centers",
7
+ options: [
8
+ {
9
+ link: { href: "https://devcenter.heroku.com/" },
10
+ label: "Heroku",
11
+ id: "Heroku"
12
+ },
13
+ {
14
+ link: { href: "https://developer.mulesoft.com/" },
15
+ label: "MuleSoft",
16
+ id: "MuleSoft"
17
+ },
18
+ {
19
+ link: { href: "https://www.tableau.com/developer" },
20
+ label: "Tableau",
21
+ id: "Tableau"
22
+ },
23
+ {
24
+ link: { href: "https://developer.commercecloud.com/s/" },
25
+ label: "Commerce Cloud",
26
+ id: "Commerce Cloud"
27
+ },
28
+ {
29
+ link: { href: "https://www.lightningdesignsystem.com/" },
30
+ label: "Lightning Design System",
31
+ id: "Lightning Design System"
32
+ },
33
+ {
34
+ link: { href: "https://metamind.readme.io/" },
35
+ label: "Einstein",
36
+ id: "Einstein"
37
+ },
38
+ {
39
+ link: { href: "https://salesforce.quip.com/dev" },
40
+ label: "Quip",
41
+ id: "Quip"
42
+ }
43
+ ]
44
+ },
45
+ {
46
+ id: "Popular Resources",
47
+ label: "Popular Resources",
48
+ options: [
49
+ {
50
+ link: { href: "/docs" },
51
+ label: "Documentation",
52
+ id: "Documentation"
53
+ },
54
+ {
55
+ link: { href: "/docs/component-library" },
56
+ label: "Component Library",
57
+ id: "Component Library"
58
+ },
59
+ { link: { href: "/docs/apis" }, label: "APIs", id: "APIs" },
60
+ {
61
+ link: { href: "https://trailhead.salesforce.com/" },
62
+ label: "Trailhead",
63
+ id: "Trailhead"
64
+ },
65
+ {
66
+ link: { href: "/code-samples-and-sdks" },
67
+ label: "Code Samples and SDKs",
68
+ id: "Code Samples and SDKs"
69
+ },
70
+ { link: { href: "/podcast" }, label: "Podcasts", id: "Podcasts" },
71
+ {
72
+ link: { href: "https://appexchange.salesforce.com/" },
73
+ label: "AppExchange",
74
+ id: "AppExchange"
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ label: "Community",
80
+ id: "Community",
81
+ options: [
82
+ {
83
+ link: {
84
+ href: "https://trailhead.salesforce.com/trailblazer-community/feed"
85
+ },
86
+ label: "Trailblazer Community",
87
+ id: "Trailblazer Community"
88
+ },
89
+ {
90
+ link: {
91
+ href: "/forums#!/feedtype=RECENT&criteria=ALLQUESTIONS&"
92
+ },
93
+ label: "Forums",
94
+ id: "Forums"
95
+ },
96
+ {
97
+ link: { href: "/events" },
98
+ label: "Events and Calendar",
99
+ id: "Events and Calendar"
100
+ },
101
+ {
102
+ link: { href: "https://go.appexchange.com/partnerprogram" },
103
+ label: "Partner Community",
104
+ id: "Partner Community"
105
+ },
106
+ { link: { href: "/blogs" }, label: "Blog", id: "Blog" },
107
+ {
108
+ link: { href: "https://admin.salesforce.com/" },
109
+ label: "Salesforce Admins",
110
+ id: "Salesforce Admins"
111
+ },
112
+ {
113
+ link: { href: "https://architect.salesforce.com/" },
114
+ label: "Salesforce Architects",
115
+ id: "Salesforce Architects"
116
+ }
117
+ ]
118
+ }
119
+ ];
120
+
121
+ export const defaultGeneralLinks = generalLinksRaw.map((section) => ({
122
+ ...section,
123
+ options: section.options.map((option) => {
124
+ if (!option.link) {
125
+ return option;
126
+ }
127
+ const external = option.link.href.startsWith("http");
128
+ return {
129
+ ...option,
130
+ link: {
131
+ ...option.link,
132
+ iconSymbol: external ? "new_window" : null,
133
+ target: external ? "_blank" : null
134
+ }
135
+ };
136
+ })
137
+ }));
138
+
139
+ export const privacyHref = "https://www.salesforce.com/company/privacy/";
140
+
141
+ export const intellectualHref =
142
+ "https://www.salesforce.com/company/legal/intellectual/";
143
+
144
+ const openOneTrustInfoDisplay = () => {
145
+ if (window.OneTrust && window.OneTrust.ToggleInfoDisplay) {
146
+ window.OneTrust.ToggleInfoDisplay();
147
+ }
148
+ };
149
+
150
+ export const termsLinks = [
151
+ { href: privacyHref, label: "Privacy Statement" },
152
+ {
153
+ href: "https://trailblazer.me/resource/documents/documents/pdf/TermsOfUse_en_US.pdf",
154
+ label: "Terms of Use"
155
+ },
156
+ {
157
+ href: "https://www.salesforce.com/company/privacy/full_privacy/#nav_info",
158
+ label: "Use of Cookies"
159
+ },
160
+ { href: "https://trust.salesforce.com/en/", label: "Trust" },
161
+ {
162
+ href: "#",
163
+ rel: "nofollow",
164
+ label: "Cookie Preferences",
165
+ onclick: openOneTrustInfoDisplay
166
+ }
167
+ ];
168
+
169
+ export const socialLinks = [
170
+ {
171
+ href: "https://github.com/trailheadapps",
172
+ iconSymbol: "github",
173
+ iconSprite: "brand",
174
+ label: "Github"
175
+ },
176
+ {
177
+ href: "https://www.facebook.com/salesforcedevs",
178
+ iconSymbol: "facebook-f",
179
+ iconSprite: "brand",
180
+ label: "Facebook"
181
+ },
182
+ {
183
+ href: "https://twitter.com/salesforcedevs",
184
+ iconSymbol: "twitter",
185
+ iconSprite: "brand",
186
+ label: "Twitter"
187
+ },
188
+ {
189
+ href: "https://www.linkedin.com/showcase/salesforce-developers",
190
+ iconSymbol: "linkedin-in",
191
+ iconSprite: "brand",
192
+ label: "LinkedIn"
193
+ },
194
+ {
195
+ href: "https://www.youtube.com/user/DeveloperForce",
196
+ iconSymbol: "youtube",
197
+ iconSprite: "brand",
198
+ label: "Youtube"
199
+ },
200
+ {
201
+ href: "https://developer.salesforce.com/blogs/feed",
202
+ iconSymbol: "rss",
203
+ iconSprite: "general",
204
+ label: "RSS"
205
+ }
206
+ ];
@@ -0,0 +1,4 @@
1
+ dx-button {
2
+ --dx-c-button-primary-color: var(--dx-g-blue-vibrant-40);
3
+ --dx-c-button-inline-color-hover: var(--dx-g-blue-vibrant-20);
4
+ }
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <dx-button
3
+ href={href}
4
+ icon-symbol={iconSymbol}
5
+ target={target}
6
+ font="sans"
7
+ variant="inline"
8
+ onclick={sendGtm}
9
+ >
10
+ {label}
11
+ </dx-button>
12
+ </template>
@@ -0,0 +1,19 @@
1
+ import { LightningElement, api } from "lwc";
2
+ import { track } from "dxUtils/analytics";
3
+
4
+ export default class FooterOption extends LightningElement {
5
+ @api href: string | null = null;
6
+ @api generalLabel: string | null = null;
7
+ @api label: string | null = null;
8
+ @api iconSymbol: string | null = null;
9
+ @api target: string | null = null;
10
+
11
+ sendGtm(e: PointerEvent) {
12
+ track(e.currentTarget, "custEv_bottomNavLinkClick", {
13
+ navHeading: this.generalLabel || undefined,
14
+ navSubHeading: this.label || undefined,
15
+ clickText: this.href || undefined,
16
+ pageLocation: window.location.pathname || undefined
17
+ });
18
+ }
19
+ }
@@ -0,0 +1 @@
1
+ <template>{value}</template>
@@ -0,0 +1,77 @@
1
+ import { LightningElement, api } from "lwc";
2
+ import {
3
+ formattedDateDay,
4
+ formattedDateHour,
5
+ formattedDateMinute,
6
+ formattedDateMonth,
7
+ formattedDateOptions,
8
+ formattedDateSecond,
9
+ formattedDateTimeZoneName,
10
+ formattedDateWeekday,
11
+ formattedDateYear
12
+ } from "typings/custom";
13
+
14
+ export default class FormattedDateTime extends LightningElement {
15
+ @api weekday: formattedDateWeekday;
16
+ @api year: formattedDateYear;
17
+ @api month: formattedDateMonth;
18
+ @api day: formattedDateDay;
19
+ @api hour: formattedDateHour;
20
+ @api minute: formattedDateMinute;
21
+ @api second: formattedDateSecond;
22
+ @api timeZoneName: formattedDateTimeZoneName;
23
+ @api
24
+ set value(value) {
25
+ if (!value) {
26
+ console.error("Value provided to FormattedDateTime is invalid");
27
+ return;
28
+ }
29
+
30
+ this._unformattedDate = new Date(value);
31
+
32
+ if (this._unformattedDate.toString() === "Invalid Date") {
33
+ // this is a fix for Safari since it doesn't support date strings with 'yyyy/mm/dd' patterns
34
+ this._unformattedDate = new Date(value.replace(/-/g, "/"));
35
+ }
36
+ }
37
+ get value() {
38
+ const options = this.getOptions();
39
+ this._formattedDate = this.formatDate(this._unformattedDate, options);
40
+ return this._formattedDate;
41
+ }
42
+
43
+ private _formattedDate!: string;
44
+ private _unformattedDate!: Date;
45
+
46
+ formatDate(unformattedDate: Date, options: formattedDateOptions) {
47
+ const locale = navigator.language;
48
+ let formattedDateTime = Intl.DateTimeFormat(locale, options).format(
49
+ unformattedDate
50
+ ) as String;
51
+ formattedDateTime = this.updateDayPeriodFormatting(formattedDateTime);
52
+ return formattedDateTime;
53
+ }
54
+
55
+ updateDayPeriodFormatting(formattedDateTime: String) {
56
+ if (formattedDateTime.includes("AM")) {
57
+ formattedDateTime = formattedDateTime.replace(" AM", "am");
58
+ } else if (formattedDateTime.includes("PM")) {
59
+ formattedDateTime = formattedDateTime.replace(" PM", "pm");
60
+ }
61
+ return formattedDateTime;
62
+ }
63
+
64
+ getOptions() {
65
+ const options = {
66
+ weekday: this.weekday || undefined,
67
+ year: this.year || undefined,
68
+ month: this.month || undefined,
69
+ day: this.day || undefined,
70
+ hour: this.hour || undefined,
71
+ minute: this.minute || undefined,
72
+ second: this.second,
73
+ timeZoneName: this.timeZoneName || undefined
74
+ };
75
+ return options;
76
+ }
77
+ }
@@ -0,0 +1,48 @@
1
+ .container {
2
+ --one-third-width: calc((100% - 2 * var(--dx-g-page-grid-gap)) / 3);
3
+
4
+ display: grid;
5
+ gap: var(--dx-g-page-grid-gap);
6
+ grid-template-rows: repeat(auto-fill, 1fr);
7
+ grid-template-columns: 1fr;
8
+ justify-items: stretch;
9
+ align-items: stretch;
10
+ position: relative;
11
+ }
12
+
13
+ .col-one {
14
+ /* This class intentionally left blank. */
15
+ }
16
+
17
+ @media (min-width: 600px) {
18
+ .col-two,
19
+ .col-three,
20
+ .col-four {
21
+ grid-template-columns: repeat(2, 1fr);
22
+ }
23
+ }
24
+
25
+ @media (min-width: 768px) {
26
+ .col-two-slim-left {
27
+ grid-template-columns: var(--one-third-width) calc(
28
+ 2 * var(--one-third-width) + var(--dx-g-page-grid-gap)
29
+ );
30
+ }
31
+
32
+ .col-three {
33
+ grid-template-columns: repeat(3, 1fr);
34
+ }
35
+
36
+ .col-two-slim-right {
37
+ grid-template-columns:
38
+ calc(2 * var(--one-third-width) + var(--dx-g-page-grid-gap))
39
+ var(--one-third-width);
40
+ }
41
+ }
42
+
43
+ /* special breakpoint for four col */
44
+ @media (min-width: 1200px) {
45
+ .col-four {
46
+ grid-template-columns: repeat(4, 1fr);
47
+ }
48
+ }
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <div class={className}><slot onslotchange={onSlotChange}></slot></div>
3
+ </template>
@@ -0,0 +1,14 @@
1
+ # Breakpoint Guidelines for Card Grids
2
+
3
+ _Mobile (599 or less)_ --> One col
4
+ _Small Tablet (600 - 767)_ --> Two col max
5
+ _Tablet & Desktop (768 and up)_ --> 3 col min / 3 & 4 col
6
+ _Widescreen (1920 and up)_ --> 4 col min / 4 & 5 col.
7
+
8
+ # Dynamic columns
9
+
10
+ Dynamic column mode will only assign 3 or 4 cols for desktop as anything less makes cards far too large (stretches imagery, etc).
11
+
12
+ # Naming strategy
13
+
14
+ Column namings are desktop-oriented, i.e. 4 col refers to layout that is 4 columns on desktop -- but this layout would be actually 2 column on tablet and 1 column on mobile.
@@ -0,0 +1,74 @@
1
+ import { LightningElement, api } from "lwc";
2
+ import cx from "classnames";
3
+ import { GridVariant, LightningSlotElement } from "typings/custom";
4
+
5
+ const DEFAULT_COLUMNS = "three";
6
+
7
+ export default class Grid extends LightningElement {
8
+ @api
9
+ get columns() {
10
+ if (this._columns.includes("dynamic") && this._itemCount) {
11
+ return this.dynamicColumns;
12
+ }
13
+ return this._columns || DEFAULT_COLUMNS;
14
+ }
15
+ set columns(value: GridVariant) {
16
+ this._columns = value;
17
+ }
18
+
19
+ _columns!: GridVariant;
20
+ _itemCount: number | null = null;
21
+
22
+ private get className(): string {
23
+ return cx("container", `col-${this.columns}`);
24
+ }
25
+
26
+ private isMoreIdyllicColumnNum = (a: number, b: number): boolean => {
27
+ if (!this._itemCount) {
28
+ return false;
29
+ }
30
+ const remA = this._itemCount % a;
31
+ const remB = this._itemCount % b;
32
+ const relRemA = a - remA;
33
+ const relRemB = b - remB;
34
+ if (remA === 0 && remB === 0) {
35
+ return b > a;
36
+ }
37
+ if (remA === 0) {
38
+ return false;
39
+ }
40
+ if (remB === 0) {
41
+ return true;
42
+ }
43
+ return relRemB < relRemA;
44
+ };
45
+
46
+ private get dynamicColumns(): GridVariant {
47
+ if (!this._itemCount) {
48
+ return DEFAULT_COLUMNS;
49
+ }
50
+
51
+ const possibleColumns = [4, 3];
52
+
53
+ let ideal = possibleColumns[0];
54
+ for (let i = 1; i < possibleColumns.length; i++) {
55
+ if (this.isMoreIdyllicColumnNum(ideal, possibleColumns[i])) {
56
+ ideal = possibleColumns[i];
57
+ }
58
+ }
59
+
60
+ // @ts-ignore (no clue why "two" isn't being seen as a GridVariant type)
61
+ return (
62
+ {
63
+ 4: "four",
64
+ 3: "three"
65
+ }[ideal] || DEFAULT_COLUMNS
66
+ );
67
+ }
68
+
69
+ onSlotChange(e: Event) {
70
+ this._itemCount = (
71
+ e.target as LightningSlotElement
72
+ ).assignedElements().length;
73
+ }
74
+ }
@@ -0,0 +1,119 @@
1
+ @import "dxHelpers/reset";
2
+ @import "dxHelpers/text";
3
+
4
+ :host {
5
+ display: block;
6
+ }
7
+
8
+ .text-group {
9
+ display: flex;
10
+ flex-direction: column;
11
+
12
+ --dx-group-text-spacing-vertical-xl: var(--dx-g-spacing-2xl);
13
+ --dx-group-text-spacing-vertical-lg: var(--dx-g-spacing-lg);
14
+ --dx-group-text-spacing-vertical-sm: var(--dx-g-spacing-sm);
15
+ }
16
+
17
+ .hide-slot .slot-container {
18
+ display: none;
19
+ }
20
+
21
+ .text-group:not(.hide-slot) .slot-container {
22
+ margin-top: var(--dx-group-text-spacing-vertical-xl);
23
+ }
24
+
25
+ .label {
26
+ margin-bottom: var(--dx-group-text-spacing-vertical-lg);
27
+ }
28
+
29
+ /* subtitle */
30
+
31
+ .subtitle {
32
+ display: flex;
33
+ flex-wrap: wrap;
34
+ align-items: center;
35
+ margin-top: var(--dx-group-text-spacing-vertical-lg);
36
+ }
37
+
38
+ .subtitle > span {
39
+ position: relative;
40
+ white-space: nowrap;
41
+ }
42
+
43
+ .subtitle > *:not(:last-child) {
44
+ margin-right: var(--dx-g-spacing-lg);
45
+ }
46
+
47
+ .subtitle > *:not(:last-child)::after {
48
+ content: "";
49
+ position: absolute;
50
+ right: -12px;
51
+ top: calc(40% - 1px);
52
+ height: 2px;
53
+ width: 2px;
54
+ background: var(--dx-g-blue-vibrant-20);
55
+ }
56
+
57
+ /* body */
58
+
59
+ .body {
60
+ margin-top: var(--dx-group-text-spacing-vertical-lg);
61
+ }
62
+
63
+ /* button group */
64
+
65
+ .button-group {
66
+ display: flex;
67
+ flex-wrap: wrap;
68
+ width: 100%;
69
+ margin-top: var(--dx-group-text-spacing-vertical-xl);
70
+ }
71
+
72
+ .button-group > dx-button:not(:last-of-type) {
73
+ margin-right: var(--dx-g-spacing-sm);
74
+ }
75
+
76
+ /* breakpoints tablet */
77
+
78
+ @media screen and (max-width: 1024px) {
79
+ .title.dx-text-heading-2 {
80
+ font-size: var(--dx-g-text-3xl);
81
+ line-height: var(--dx-g-spacing-2xl);
82
+ }
83
+
84
+ .subtitle.dx-text-heading-6 {
85
+ font-size: var(--dx-g-text-sm);
86
+ }
87
+
88
+ .body.dx-text-body-1 {
89
+ font-size: var(--dx-g-text-base);
90
+ line-height: var(--dx-g-spacing-lg);
91
+ }
92
+
93
+ .title.dx-text-heading-3 {
94
+ font-size: var(--dx-g-text-2xl);
95
+ line-height: var(--dx-g-spacing-xl);
96
+ }
97
+
98
+ .subtitle.dx-text-heading-7 {
99
+ font-size: var(--dx-g-text-xs);
100
+ }
101
+
102
+ .body.dx-text-body-2 {
103
+ font-size: var(--dx-g-text-sm);
104
+ line-height: var(--dx-g-spacing-lg);
105
+ }
106
+ }
107
+
108
+ /* breakpoints mobile */
109
+
110
+ @media screen and (max-width: 768px) {
111
+ .button-group > dx-button {
112
+ width: 100%;
113
+ }
114
+
115
+ .button-group > dx-button:not(:last-of-type) {
116
+ margin-right: 0;
117
+ margin-bottom: var(--dx-g-spacing-sm);
118
+ }
119
+ }
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div class={className}>
3
+ <span if:true={label} class="label dx-text-heading-6">{label}</span>
4
+ <div class={titleClassname} role="heading" aria-level={titleAriaLevel}>
5
+ {title}
6
+ </div>
7
+ <span class={subtitleClassname} if:true={hasSubtitle}>
8
+ <span if:true={owner}>{owner}</span>
9
+ <span if:true={attributionLink}>
10
+ By&nbsp;
11
+ <dx-button
12
+ href={attributionLink.href}
13
+ target={attributionLink.target}
14
+ size="large"
15
+ variant="inline-inherit"
16
+ >
17
+ {attributionLink.label}
18
+ </dx-button>
19
+ </span>
20
+ <span>
21
+ {dateText}
22
+ <dx-formatted-date-time
23
+ value={dateTime}
24
+ day="numeric"
25
+ month="long"
26
+ year="numeric"
27
+ ></dx-formatted-date-time>
28
+ </span>
29
+ </span>
30
+ <span class="body dx-text-body-1" if:true={body}>{body}</span>
31
+ <div class="slot-container">
32
+ <slot onslotchange={onSlotChange}></slot>
33
+ </div>
34
+ <div class="button-group" if:true={hasButtonGroup}>
35
+ <dx-button
36
+ if:true={primaryLink}
37
+ href={primaryLink.href}
38
+ target={primaryLink.target}
39
+ variant="primary"
40
+ size="large"
41
+ onclick={trackClick}
42
+ >
43
+ {primaryLink.label}
44
+ </dx-button>
45
+ <dx-button
46
+ if:true={secondaryLink}
47
+ href={secondaryLink.href}
48
+ target={secondaryLink.target}
49
+ variant="secondary"
50
+ size="large"
51
+ onclick={trackClick}
52
+ >
53
+ {secondaryLink.label}
54
+ </dx-button>
55
+ <dx-button
56
+ if:true={tertiaryLink}
57
+ href={tertiaryLink.href}
58
+ target={tertiaryLink.target}
59
+ variant="tertiary"
60
+ size="large"
61
+ icon-symbol="chevronright"
62
+ onclick={trackClick}
63
+ >
64
+ {tertiaryLink.label}
65
+ </dx-button>
66
+ </div>
67
+ </div>
68
+ </template>