@salesforcedevs/arch-components 1.20.17-alpha1 → 1.20.17-alpha11

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 (363) hide show
  1. package/lwc.config.json +3 -1
  2. package/package.json +45 -2
  3. package/src/modules/{common → arch}/context/context.ts +10 -10
  4. package/src/modules/common/effectAdapter/__tests__/effectAdapter.test.ts +0 -12
  5. package/src/modules/common/effectAdapter/effectAdapter.html +0 -1
  6. package/src/modules/common/effectAdapter/effectAdapter.ts +0 -18
  7. package/src/modules/common/reflectedElement/__tests__/modules/test/select/select.html +0 -3
  8. package/src/modules/common/reflectedElement/__tests__/modules/test/select/select.ts +0 -7
  9. package/src/modules/common/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.html +0 -3
  10. package/src/modules/common/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.ts +0 -18
  11. package/src/modules/common/reflectedElement/__tests__/reflectedElement.test.ts +0 -75
  12. package/src/modules/common/reflectedElement/reflectedElement.ts +0 -50
  13. package/src/modules/common/slot/__tests__/slot.test.ts +0 -96
  14. package/src/modules/common/slot/slot.ts +0 -20
  15. package/src/modules/sa/coverage/coverage.css +0 -35
  16. package/src/modules/sa/coverage/coverage.html +0 -15
  17. package/src/modules/sa/coverage/coverage.ts +0 -406
  18. package/src/modules/sa/coverage/types.d.ts +0 -26
  19. package/src/modules/sa/expandableSection/expandableSection.css +0 -24
  20. package/src/modules/sa/expandableSection/expandableSection.html +0 -20
  21. package/src/modules/sa/expandableSection/expandableSection.stories.ts +0 -37
  22. package/src/modules/sa/expandableSection/expandableSection.ts +0 -24
  23. package/src/modules/sa/explorer/explorer.css +0 -303
  24. package/src/modules/sa/explorer/explorer.html +0 -403
  25. package/src/modules/sa/explorer/explorer.ts +0 -664
  26. package/src/modules/sa/explorer/types.d.ts +0 -60
  27. package/src/modules/sa/gallery/gallery.css +0 -358
  28. package/src/modules/sa/gallery/gallery.html +0 -65
  29. package/src/modules/sa/gallery/gallery.ts +0 -300
  30. package/src/modules/sa/gallery/types.d.ts +0 -35
  31. package/src/modules/sa/socialShare/socialShare.css +0 -49
  32. package/src/modules/sa/socialShare/socialShare.html +0 -56
  33. package/src/modules/sa/socialShare/socialShare.ts +0 -29
  34. package/src/modules/shared/a11y/a11y.ts +0 -25
  35. package/src/modules/shared/children/children.ts +0 -29
  36. package/src/modules/shared/color/color.ts +0 -52
  37. package/src/modules/shared/debounce/debounce.ts +0 -32
  38. package/src/modules/shared/dialog/dialog.ts +0 -154
  39. package/src/modules/shared/elements/__tests__/overflow.test.ts +0 -39
  40. package/src/modules/shared/elements/overflow.ts +0 -71
  41. package/src/modules/shared/fetch/fetch.ts +0 -52
  42. package/src/modules/shared/helpers/helpers.ts +0 -141
  43. package/src/modules/shared/i18n/i18n.ts +0 -74
  44. package/src/modules/shared/labels/__tests__/helpers.test.ts +0 -107
  45. package/src/modules/shared/labels/__tests__/pointHelpers.test.ts +0 -33
  46. package/src/modules/shared/labels/__tests__/timeHelpers.test.ts +0 -89
  47. package/src/modules/shared/labels/helpers.ts +0 -23
  48. package/src/modules/shared/labels/pointHelpers.ts +0 -47
  49. package/src/modules/shared/labels/timeHelpers.ts +0 -182
  50. package/src/modules/shared/labels/types.d.ts +0 -5
  51. package/src/modules/shared/logger/logger.ts +0 -33
  52. package/src/modules/shared/menu/menu.ts +0 -239
  53. package/src/modules/shared/overflow/__tests__/overflow.test.ts +0 -39
  54. package/src/modules/shared/overflow/overflow.ts +0 -71
  55. package/src/modules/shared/polling-request.ts +0 -97
  56. package/src/modules/shared/testutils.ts +0 -118
  57. package/src/modules/shared/track/track.ts +0 -23
  58. package/src/modules/shared/trailhead.ts +0 -123
  59. package/src/modules/shared/types.d.ts +0 -1
  60. package/src/modules/shared/useEffectAttr.ts +0 -16
  61. package/src/modules/shared/withState.ts +0 -21
  62. package/src/modules/tds/appLauncher/__fixtures__/index.ts +0 -34
  63. package/src/modules/tds/appLauncher/__tests__/appLauncher.test.ts +0 -119
  64. package/src/modules/tds/appLauncher/appLauncher.css +0 -65
  65. package/src/modules/tds/appLauncher/appLauncher.html +0 -38
  66. package/src/modules/tds/appLauncher/appLauncher.stories.ts +0 -39
  67. package/src/modules/tds/appLauncher/appLauncher.ts +0 -79
  68. package/src/modules/tds/appLauncher/types.ts +0 -8
  69. package/src/modules/tds/avatar/__tests__/avatar.test.ts +0 -11
  70. package/src/modules/tds/avatar/avatar.css +0 -77
  71. package/src/modules/tds/avatar/avatar.html +0 -36
  72. package/src/modules/tds/avatar/avatar.stories.ts +0 -64
  73. package/src/modules/tds/avatar/avatar.ts +0 -50
  74. package/src/modules/tds/badge/__tests__/badge.test.js +0 -11
  75. package/src/modules/tds/badge/badge.css +0 -22
  76. package/src/modules/tds/badge/badge.html +0 -5
  77. package/src/modules/tds/badge/badge.stories.ts +0 -10
  78. package/src/modules/tds/badge/badge.ts +0 -9
  79. package/src/modules/tds/button/__tests__/button.test.ts +0 -52
  80. package/src/modules/tds/button/button.css +0 -1
  81. package/src/modules/tds/button/button.html +0 -20
  82. package/src/modules/tds/button/button.stories.js +0 -54
  83. package/src/modules/tds/button/button.ts +0 -59
  84. package/src/modules/tds/buttonIcon/__tests__/buttonIcon.test.ts +0 -17
  85. package/src/modules/tds/buttonIcon/buttonIcon.css +0 -1
  86. package/src/modules/tds/buttonIcon/buttonIcon.html +0 -12
  87. package/src/modules/tds/buttonIcon/buttonIcon.stories.js +0 -38
  88. package/src/modules/tds/buttonIcon/buttonIcon.ts +0 -6
  89. package/src/modules/tds/buttonIconLink/buttonIconLink.css +0 -1
  90. package/src/modules/tds/buttonIconLink/buttonIconLink.html +0 -14
  91. package/src/modules/tds/buttonIconLink/buttonIconLink.stories.ts +0 -32
  92. package/src/modules/tds/buttonIconLink/buttonIconLink.ts +0 -9
  93. package/src/modules/tds/buttonLink/__tests__/buttonLink.test.ts +0 -17
  94. package/src/modules/tds/buttonLink/buttonLink.css +0 -1
  95. package/src/modules/tds/buttonLink/buttonLink.html +0 -19
  96. package/src/modules/tds/buttonLink/buttonLink.stories.js +0 -24
  97. package/src/modules/tds/buttonLink/buttonLink.ts +0 -8
  98. package/src/modules/tds/buttonStyles/buttonStyles.css +0 -232
  99. package/src/modules/tds/childSummary/__tests__/childSummary.test.js +0 -99
  100. package/src/modules/tds/childSummary/childSummary.css +0 -74
  101. package/src/modules/tds/childSummary/childSummary.html +0 -38
  102. package/src/modules/tds/childSummary/childSummary.stories.ts +0 -40
  103. package/src/modules/tds/childSummary/childSummary.ts +0 -63
  104. package/src/modules/tds/childSummary/types.d.ts +0 -10
  105. package/src/modules/tds/contentChildListItem/__tests__/contentChildListItem.test.ts +0 -32
  106. package/src/modules/tds/contentChildListItem/contentChildListItem.css +0 -1
  107. package/src/modules/tds/contentChildListItem/contentChildListItem.html +0 -10
  108. package/src/modules/tds/contentChildListItem/contentChildListItem.stories.ts +0 -46
  109. package/src/modules/tds/contentChildListItem/contentChildListItem.ts +0 -34
  110. package/src/modules/tds/contentIcon/contentIcon.css +0 -47
  111. package/src/modules/tds/contentIcon/contentIcon.html +0 -15
  112. package/src/modules/tds/contentIcon/contentIcon.stories.js +0 -110
  113. package/src/modules/tds/contentIcon/contentIcon.ts +0 -66
  114. package/src/modules/tds/contextAdapter/__tests__/contextAdapter.test.ts +0 -76
  115. package/src/modules/tds/contextAdapter/constants.ts +0 -1
  116. package/src/modules/tds/contextAdapter/contextAdapter.html +0 -1
  117. package/src/modules/tds/contextAdapter/contextAdapter.ts +0 -54
  118. package/src/modules/tds/dialogStyles/dialogStyles.css +0 -90
  119. package/src/modules/tds/footerLinks/__tests__/__snapshots__/footerLinks.test.ts.snap +0 -3
  120. package/src/modules/tds/footerLinks/__tests__/footerLinks.test.ts +0 -142
  121. package/src/modules/tds/footerLinks/footerLinks.css +0 -80
  122. package/src/modules/tds/footerLinks/footerLinks.html +0 -30
  123. package/src/modules/tds/footerLinks/footerLinks.ts +0 -48
  124. package/src/modules/tds/footerLinks/types.ts +0 -11
  125. package/src/modules/tds/footerMfe/footerMfe.html +0 -3
  126. package/src/modules/tds/footerMfe/footerMfe.ts +0 -19
  127. package/src/modules/tds/headerAvatar/__tests__/headerAvatar.test.ts +0 -43
  128. package/src/modules/tds/headerAvatar/headerAvatar.css +0 -45
  129. package/src/modules/tds/headerAvatar/headerAvatar.html +0 -25
  130. package/src/modules/tds/headerAvatar/headerAvatar.ts +0 -15
  131. package/src/modules/tds/headerHelpButton/__tests__/headerHelpButton.test.ts +0 -32
  132. package/src/modules/tds/headerHelpButton/headerHelpButton.css +0 -14
  133. package/src/modules/tds/headerHelpButton/headerHelpButton.html +0 -19
  134. package/src/modules/tds/headerHelpButton/headerHelpButton.ts +0 -12
  135. package/src/modules/tds/heading/__tests__/heading.test.ts +0 -50
  136. package/src/modules/tds/heading/heading.css +0 -1
  137. package/src/modules/tds/heading/heading.html +0 -9
  138. package/src/modules/tds/heading/heading.stories.ts +0 -36
  139. package/src/modules/tds/heading/heading.ts +0 -36
  140. package/src/modules/tds/icon/icon.css +0 -28
  141. package/src/modules/tds/icon/icon.html +0 -17
  142. package/src/modules/tds/icon/icon.stories.js +0 -18
  143. package/src/modules/tds/icon/icon.ts +0 -79
  144. package/src/modules/tds/input/__tests__/input.test.ts +0 -41
  145. package/src/modules/tds/input/input.css +0 -34
  146. package/src/modules/tds/input/input.html +0 -12
  147. package/src/modules/tds/input/input.stories.ts +0 -25
  148. package/src/modules/tds/input/input.ts +0 -41
  149. package/src/modules/tds/instrumentation/instrumentation.css +0 -0
  150. package/src/modules/tds/instrumentation/instrumentation.html +0 -1
  151. package/src/modules/tds/instrumentation/instrumentation.ts +0 -113
  152. package/src/modules/tds/pbCard/pbCard.css +0 -28
  153. package/src/modules/tds/pbCard/pbCard.html +0 -21
  154. package/src/modules/tds/pbCard/pbCard.ts +0 -18
  155. package/src/modules/tds/pill/__tests__/pill.test.ts +0 -56
  156. package/src/modules/tds/pill/pill.css +0 -70
  157. package/src/modules/tds/pill/pill.html +0 -17
  158. package/src/modules/tds/pill/pill.stories.ts +0 -41
  159. package/src/modules/tds/pill/pill.ts +0 -34
  160. package/src/modules/tds/progressBar/__tests__/progressBar.test.js +0 -11
  161. package/src/modules/tds/progressBar/progressBar.css +0 -42
  162. package/src/modules/tds/progressBar/progressBar.html +0 -14
  163. package/src/modules/tds/progressBar/progressBar.stories.ts +0 -24
  164. package/src/modules/tds/progressBar/progressBar.ts +0 -14
  165. package/src/modules/tds/radio/__tests__/radio.test.ts +0 -29
  166. package/src/modules/tds/radio/radio.css +0 -89
  167. package/src/modules/tds/radio/radio.html +0 -17
  168. package/src/modules/tds/radio/radio.stories.ts +0 -31
  169. package/src/modules/tds/radio/radio.ts +0 -32
  170. package/src/modules/tds/reset/reset.css +0 -39
  171. package/src/modules/tds/search/__fixtures__/index.ts +0 -32
  172. package/src/modules/tds/search/__tests__/search.test.ts +0 -235
  173. package/src/modules/tds/search/lib/__tests__/__snapshots__/listbox.test.ts.snap +0 -115
  174. package/src/modules/tds/search/lib/__tests__/listbox.test.ts +0 -192
  175. package/src/modules/tds/search/lib/listbox.ts +0 -209
  176. package/src/modules/tds/search/search.css +0 -122
  177. package/src/modules/tds/search/search.html +0 -21
  178. package/src/modules/tds/search/search.stories.ts +0 -20
  179. package/src/modules/tds/search/search.ts +0 -107
  180. package/src/modules/tds/search/types.d.ts +0 -22
  181. package/src/modules/tds/searchList/searchList.css +0 -120
  182. package/src/modules/tds/searchList/searchList.html +0 -43
  183. package/src/modules/tds/searchList/searchList.stories.ts +0 -10
  184. package/src/modules/tds/searchList/searchList.ts +0 -53
  185. package/src/modules/tds/select/__tests__/select.test.ts +0 -150
  186. package/src/modules/tds/select/select.css +0 -42
  187. package/src/modules/tds/select/select.html +0 -24
  188. package/src/modules/tds/select/select.stories.ts +0 -59
  189. package/src/modules/tds/select/select.ts +0 -60
  190. package/src/modules/tds/spinner/__tests__/spinner.test.ts +0 -11
  191. package/src/modules/tds/spinner/spinner.css +0 -194
  192. package/src/modules/tds/spinner/spinner.html +0 -9
  193. package/src/modules/tds/spinner/spinner.stories.ts +0 -20
  194. package/src/modules/tds/spinner/spinner.ts +0 -15
  195. package/src/modules/tds/styles/styles.css +0 -24
  196. package/src/modules/tds/summary/__tests__/summary.test.ts +0 -135
  197. package/src/modules/tds/summary/summary.css +0 -135
  198. package/src/modules/tds/summary/summary.html +0 -69
  199. package/src/modules/tds/summary/summary.stories.js +0 -148
  200. package/src/modules/tds/summary/summary.ts +0 -95
  201. package/src/modules/tds/tab/__tests__/tab.test.ts +0 -25
  202. package/src/modules/tds/tab/tab.css +0 -3
  203. package/src/modules/tds/tab/tab.html +0 -5
  204. package/src/modules/tds/tab/tab.ts +0 -46
  205. package/src/modules/tds/tabset/__tests__/tabset.test.ts +0 -108
  206. package/src/modules/tds/tabset/tabset.css +0 -112
  207. package/src/modules/tds/tabset/tabset.html +0 -63
  208. package/src/modules/tds/tabset/tabset.stories.ts +0 -32
  209. package/src/modules/tds/tabset/tabset.ts +0 -232
  210. package/src/modules/tds/themeProvider/themeProvider.css +0 -502
  211. package/src/modules/tds/themeProvider/themeProvider.html +0 -3
  212. package/src/modules/tds/themeProvider/themeProvider.ts +0 -37
  213. package/src/modules/tds/tile/tile.css +0 -23
  214. package/src/modules/tds/tile/tile.html +0 -5
  215. package/src/modules/tds/tile/tile.stories.js +0 -14
  216. package/src/modules/tds/tile/tile.ts +0 -12
  217. package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.html +0 -1
  218. package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.ts +0 -47
  219. package/src/modules/th/contextAdapter/__tests__/contextAdapter.test.ts +0 -104
  220. package/src/modules/th/contextAdapter/contextAdapter.html +0 -1
  221. package/src/modules/th/contextAdapter/contextAdapter.ts +0 -49
  222. package/src/modules/th/favoriteButton/__tests__/favoriteButton.test.ts +0 -56
  223. package/src/modules/th/favoriteButton/favoriteButton.css +0 -3
  224. package/src/modules/th/favoriteButton/favoriteButton.html +0 -15
  225. package/src/modules/th/favoriteButton/favoriteButton.stories.js +0 -30
  226. package/src/modules/th/favoriteButton/favoriteButton.ts +0 -84
  227. package/src/modules/th/favoriteButton/mocks/index.ts +0 -12
  228. package/src/modules/th/search/__fixtures__/index.ts +0 -14
  229. package/src/modules/th/search/__tests__/search.test.ts +0 -233
  230. package/src/modules/th/search/constants.ts +0 -2
  231. package/src/modules/th/search/mocks/index.ts +0 -30
  232. package/src/modules/th/search/mocks/responses.ts +0 -54
  233. package/src/modules/th/search/search.css +0 -4
  234. package/src/modules/th/search/search.html +0 -12
  235. package/src/modules/th/search/search.ts +0 -172
  236. package/src/modules/th/search/types.d.ts +0 -29
  237. package/src/modules/th/tbid/__tests__/__snapshots__/tbid.test.ts.snap +0 -3
  238. package/src/modules/th/tbid/__tests__/tbid.test.ts +0 -242
  239. package/src/modules/th/tbid/tbid.html +0 -1
  240. package/src/modules/th/tbid/tbid.stories.mdx +0 -25
  241. package/src/modules/th/tbid/tbid.ts +0 -215
  242. package/src/modules/tm/card/__tests__/card.test.ts +0 -65
  243. package/src/modules/tm/card/card.css +0 -131
  244. package/src/modules/tm/card/card.html +0 -81
  245. package/src/modules/tm/card/card.ts +0 -269
  246. package/src/modules/tm/cardBase/cardBase.css +0 -11
  247. package/src/modules/tm/cardGridA/cardGridA.css +0 -11
  248. package/src/modules/tm/cardGridA/cardGridA.html +0 -21
  249. package/src/modules/tm/cardGridA/cardGridA.stories.js +0 -107
  250. package/src/modules/tm/cardGridA/cardGridA.ts +0 -24
  251. package/src/modules/tm/cardGridB/cardGridB.css +0 -88
  252. package/src/modules/tm/cardGridB/cardGridB.html +0 -20
  253. package/src/modules/tm/cardGridB/cardGridB.stories.js +0 -58
  254. package/src/modules/tm/cardGridB/cardGridB.ts +0 -19
  255. package/src/modules/tm/cardGridC/cardGridC.css +0 -24
  256. package/src/modules/tm/cardGridC/cardGridC.html +0 -22
  257. package/src/modules/tm/cardGridC/cardGridC.stories.js +0 -42
  258. package/src/modules/tm/cardGridC/cardGridC.ts +0 -11
  259. package/src/modules/tm/cardGridD/cardGridD.css +0 -17
  260. package/src/modules/tm/cardGridD/cardGridD.html +0 -20
  261. package/src/modules/tm/cardGridD/cardGridD.stories.js +0 -34
  262. package/src/modules/tm/cardGridD/cardGridD.ts +0 -7
  263. package/src/modules/tm/cardNew/cardNew.css +0 -31
  264. package/src/modules/tm/cardNew/cardNew.html +0 -29
  265. package/src/modules/tm/cardNew/cardNew.ts +0 -66
  266. package/src/modules/tm/content/__fixtures__/index.ts +0 -884
  267. package/src/modules/tm/content/__tests__/content.test.ts +0 -95
  268. package/src/modules/tm/content/content.css +0 -641
  269. package/src/modules/tm/content/content.html +0 -53
  270. package/src/modules/tm/content/content.stories.js +0 -14
  271. package/src/modules/tm/content/content.ts +0 -171
  272. package/src/modules/tm/endCapA/__tests__/endCapA.test.ts +0 -52
  273. package/src/modules/tm/endCapA/endCapA.css +0 -64
  274. package/src/modules/tm/endCapA/endCapA.html +0 -21
  275. package/src/modules/tm/endCapA/endCapA.stories.js +0 -37
  276. package/src/modules/tm/endCapA/endCapA.ts +0 -23
  277. package/src/modules/tm/eventsA/eventsA.css +0 -107
  278. package/src/modules/tm/eventsA/eventsA.html +0 -26
  279. package/src/modules/tm/eventsA/eventsA.stories.js +0 -51
  280. package/src/modules/tm/eventsA/eventsA.ts +0 -48
  281. package/src/modules/tm/faqA/faqA.css +0 -87
  282. package/src/modules/tm/faqA/faqA.html +0 -27
  283. package/src/modules/tm/faqA/faqA.stories.js +0 -25
  284. package/src/modules/tm/faqA/faqA.ts +0 -40
  285. package/src/modules/tm/featureGridA/__tests__/featureGridA.test.ts +0 -116
  286. package/src/modules/tm/featureGridA/featureGridA.css +0 -95
  287. package/src/modules/tm/featureGridA/featureGridA.html +0 -34
  288. package/src/modules/tm/featureGridA/featureGridA.stories.js +0 -45
  289. package/src/modules/tm/featureGridA/featureGridA.ts +0 -59
  290. package/src/modules/tm/footnote/footnote.css +0 -28
  291. package/src/modules/tm/footnote/footnote.html +0 -3
  292. package/src/modules/tm/footnote/footnote.stories.js +0 -29
  293. package/src/modules/tm/footnote/footnote.ts +0 -35
  294. package/src/modules/tm/heroA/__tests__/heroA.test.ts +0 -51
  295. package/src/modules/tm/heroA/heroA.css +0 -116
  296. package/src/modules/tm/heroA/heroA.html +0 -27
  297. package/src/modules/tm/heroA/heroA.stories.js +0 -49
  298. package/src/modules/tm/heroA/heroA.ts +0 -56
  299. package/src/modules/tm/heroB/heroB.css +0 -78
  300. package/src/modules/tm/heroB/heroB.html +0 -26
  301. package/src/modules/tm/heroB/heroB.stories.js +0 -44
  302. package/src/modules/tm/heroB/heroB.ts +0 -26
  303. package/src/modules/tm/page/__tests__/page.test.ts +0 -35
  304. package/src/modules/tm/page/page.css +0 -3
  305. package/src/modules/tm/page/page.html +0 -3
  306. package/src/modules/tm/page/page.stories.js +0 -10
  307. package/src/modules/tm/page/page.ts +0 -3
  308. package/src/modules/tm/pageHeaderA/pageHeaderA.css +0 -82
  309. package/src/modules/tm/pageHeaderA/pageHeaderA.html +0 -24
  310. package/src/modules/tm/pageHeaderA/pageHeaderA.stories.js +0 -18
  311. package/src/modules/tm/pageHeaderA/pageHeaderA.ts +0 -51
  312. package/src/modules/tm/pageNavigationA/pageNavigationA.css +0 -41
  313. package/src/modules/tm/pageNavigationA/pageNavigationA.html +0 -9
  314. package/src/modules/tm/pageNavigationA/pageNavigationA.stories.js +0 -34
  315. package/src/modules/tm/pageNavigationA/pageNavigationA.ts +0 -18
  316. package/src/modules/tm/promoA/__tests__/promoA.test.ts +0 -89
  317. package/src/modules/tm/promoA/promoA.css +0 -95
  318. package/src/modules/tm/promoA/promoA.html +0 -22
  319. package/src/modules/tm/promoA/promoA.stories.js +0 -38
  320. package/src/modules/tm/promoA/promoA.ts +0 -62
  321. package/src/modules/tm/sectionA/sectionA.css +0 -64
  322. package/src/modules/tm/sectionA/sectionA.html +0 -21
  323. package/src/modules/tm/sectionA/sectionA.stories.js +0 -18
  324. package/src/modules/tm/sectionA/sectionA.ts +0 -27
  325. package/src/modules/tm/sectionSpacer/sectionSpacer.css +0 -4
  326. package/src/modules/tm/sectionSpacer/sectionSpacer.html +0 -1
  327. package/src/modules/tm/sectionSpacer/sectionSpacer.ts +0 -3
  328. package/src/modules/tm/skillsCardA/skillsCardA.css +0 -73
  329. package/src/modules/tm/skillsCardA/skillsCardA.html +0 -37
  330. package/src/modules/tm/skillsCardA/skillsCardA.ts +0 -38
  331. package/src/modules/tm/skillsGridA/skillsGridA.css +0 -12
  332. package/src/modules/tm/skillsGridA/skillsGridA.html +0 -5
  333. package/src/modules/tm/skillsGridA/skillsGridA.stories.ts +0 -65
  334. package/src/modules/tm/skillsGridA/skillsGridA.ts +0 -3
  335. package/src/modules/tm/statsA/statsA.css +0 -26
  336. package/src/modules/tm/statsA/statsA.html +0 -10
  337. package/src/modules/tm/statsA/statsA.stories.js +0 -29
  338. package/src/modules/tm/statsA/statsA.ts +0 -20
  339. package/src/modules/tm/textItem/textItem.css +0 -53
  340. package/src/modules/tm/textItem/textItem.html +0 -18
  341. package/src/modules/tm/textItem/textItem.ts +0 -32
  342. package/src/modules/tm/textItemGridA/textItemGridA.css +0 -11
  343. package/src/modules/tm/textItemGridA/textItemGridA.html +0 -15
  344. package/src/modules/tm/textItemGridA/textItemGridA.stories.js +0 -67
  345. package/src/modules/tm/textItemGridA/textItemGridA.ts +0 -20
  346. package/src/modules/tm/threeCardGrid/threeCardGrid.css +0 -6
  347. package/src/modules/tm/threeCardGrid/threeCardGrid.html +0 -5
  348. package/src/modules/tm/threeCardGrid/threeCardGrid.ts +0 -3
  349. package/src/modules/tm/trailblazersA/trailblazersA.css +0 -70
  350. package/src/modules/tm/trailblazersA/trailblazersA.html +0 -42
  351. package/src/modules/tm/trailblazersA/trailblazersA.stories.js +0 -52
  352. package/src/modules/tm/trailblazersA/trailblazersA.ts +0 -43
  353. package/src/modules/tm/utils/utils.ts +0 -18
  354. package/src/modules/tm/youtube/youtube.css +0 -7
  355. package/src/modules/tm/youtube/youtube.html +0 -10
  356. package/src/modules/tm/youtube/youtube.stories.js +0 -15
  357. package/src/modules/tm/youtube/youtube.ts +0 -27
  358. package/src/modules/ui/focusTrap/focusTrap.html +0 -5
  359. package/src/modules/ui/focusTrap/focusTrap.ts +0 -104
  360. package/src/modules/ui/focusVisible/__tests__/focusVisible.test.ts +0 -95
  361. package/src/modules/ui/focusVisible/focusVisible.html +0 -3
  362. package/src/modules/ui/focusVisible/focusVisible.ts +0 -46
  363. /package/src/modules/{common → arch}/context/context.html +0 -0
@@ -1,300 +0,0 @@
1
- import { LightningElement, api, track } from 'lwc';
2
- import { Card } from 'tm/card';
3
- import { FilterOption } from './types';
4
- import { sendInteractionEvent, InteractionEventTypes } from 'shared/helpers';
5
- import { debounce } from 'shared/debounce';
6
-
7
- // function to get the cards array from the json payload
8
- async function getGridCards(data: string, imageHash: string) {
9
- const parsedData = JSON.parse(data);
10
- // Sort the data based on the `sort` value
11
- parsedData.sort((a: any, b: any) => a.sort - b.sort);
12
- // load the gallery cards
13
- return await parsedData.map((item: any) => {
14
- const card: any = {
15
- assistiveText: "Click here to go to this resource",
16
- //ctaTitle: "Read More",
17
- ctaTarget: null,
18
- pretitleHref: null,
19
- pretitleHrefText: null
20
- }
21
-
22
- // Dynamically set all other properties based on the data object
23
- for (const prop in item) {
24
- if (item.hasOwnProperty(prop)) {
25
- switch (prop) {
26
- case "url":
27
- card.ctaHref = item[prop];
28
- break;
29
- default:
30
- (card as any)[prop] = item[prop];
31
- }
32
- }
33
-
34
- // Set imgSrc to thumbnail if it exists, otherwise use image
35
- if (item.thumbnail) {
36
- card.imgSrc = `/1/asset/immutable/s/${imageHash}${item.thumbnail}`;
37
- } else if (item.image) {
38
- card.imgSrc = item.image;
39
- }
40
- }
41
-
42
- return card;
43
- });
44
- }
45
- export default class gallery extends LightningElement {
46
-
47
- // get the inputs from the config
48
- _content: string | null = null;
49
- _filterData: any;
50
- _filterProperty: any;
51
- _filterLabel: any;
52
- _searchTitle: any;
53
- _imageHash: string | null = null;
54
- @api containerId: string = '';
55
-
56
- // second filter drop down is optional and pulled from the json data set
57
- _showMetaFilter = false;
58
- _metaFilterProperty: any;
59
- _metaFilterLabel: any;
60
-
61
- // get the inputs from the form
62
- _selectFilter: string = '';
63
- _keywordFilter: string = '';
64
- _selectMetaFilter: string = '';
65
-
66
- // set up the outputs
67
- allCards: Card[] = [];
68
- filteredCards: Card[] = [];
69
- shareUrl = window.location.href;
70
-
71
- // prep the filters options
72
- filterOptions: FilterOption[] = [];
73
- metaFilterOptions: FilterOption[] = [];
74
-
75
- // populate the filter drop down
76
- connectedCallback() {
77
- // Check if we're on the data model gallery page
78
- if (this.containerId === 'data-model-gallery' && window.location.hash === '#data-model-gallery') {
79
- window.location.href = 'https://developer.salesforce.com/docs/platform/data-models/guide/get-started.html';
80
- }
81
- }
82
- get socialTitle(){
83
- //Search title is plurar, removing last letter to make the title singular (should be a letter S)
84
- return `${this._searchTitle.substring(0, this._searchTitle.length - 1)} Gallery`;
85
- }
86
-
87
- // fetch the filter data from a url
88
- async fetchFilterData() {
89
- try {
90
- const response = await fetch(this._filterData);
91
- const data = await response.json();
92
- this.filterOptions = data as FilterOption[];
93
- } catch (error: any) {
94
- console.error("An error occurred getting the filter list:", error?.message || String(error));
95
- }
96
- }
97
-
98
- // handle the filter selection change
99
- filterChange(evt: { detail: string }) {
100
- this._selectFilter = evt.detail;
101
- this.applyFilters();
102
- }
103
-
104
- private sendInteractionEvent = debounce((event,target)=>{
105
- sendInteractionEvent("Gallery Search",InteractionEventTypes.INPUT_CHANGE,event,target);
106
- },1000);
107
-
108
- // handle typing in the search box
109
- keywordFilterChange(evt: InputEvent) {
110
- const target = (evt.currentTarget as HTMLInputElement);
111
- this.sendInteractionEvent(evt,target);
112
- this._keywordFilter = (evt.currentTarget as HTMLInputElement).value;
113
- this.applyFilters();
114
- }
115
-
116
- // handle the filter selection change
117
- metaFilterChange(evt: { detail: string }) {
118
- this._selectMetaFilter = evt.detail;
119
- this.applyFilters();
120
- }
121
-
122
- // update the gallery based on filtering
123
- async applyFilters() {
124
- this.filteredCards = this.allCards.filter((card: any) => {
125
- let isFilterMatch = (this._selectFilter === '' || (card as any)[this._filterProperty]?.toLowerCase().includes(this._selectFilter.toLocaleLowerCase()));
126
- let isMetaMatch = ((this._showMetaFilter) ? ((this._selectMetaFilter === '' || (card as any)[this._metaFilterProperty]?.toLowerCase().includes(this._selectMetaFilter.toLocaleLowerCase()))) : true);
127
- let isKeywordMatch = (this._keywordFilter === ''
128
- || (card.pretitle && card.pretitle.toLowerCase().includes(this._keywordFilter.toLowerCase()))
129
- || (card.title && card.title.toLowerCase().includes(this._keywordFilter.toLowerCase()))
130
- || (card.description && card.description.toLowerCase().includes(this._keywordFilter.toLowerCase()))
131
- );
132
-
133
- if (isFilterMatch && isMetaMatch && isKeywordMatch)
134
- return card;
135
- });
136
-
137
- // Update page state so that we track filters in URL params
138
- const params = new URLSearchParams();
139
-
140
- if (this._selectFilter !== '')
141
- params.set(this._filterLabel, this._selectFilter);
142
- if (this._showMetaFilter && this._selectMetaFilter !== '')
143
- params.set(this._metaFilterLabel, this._selectMetaFilter);
144
- if (this._keywordFilter !== '')
145
- params.set('keywords', this._keywordFilter);
146
-
147
- const paramsString = params.toString();
148
- let updatedUrl = window.location.pathname;
149
-
150
- // Update the hash to the containerId if it's been filtered or from the URL on load
151
- const hash = this.containerId ? `#${this.containerId}` : window.location.hash.split('?')[0];
152
-
153
- if (hash)
154
- updatedUrl += hash;
155
- if (paramsString)
156
- updatedUrl += `?${paramsString}`;
157
-
158
- history.replaceState(history.state, document.title, updatedUrl);
159
- this.shareUrl = `${window.location.protocol}//${window.location.hostname}${updatedUrl}`;
160
-
161
- // Scrolls to container element to keep new data in focus.
162
- if (hash) {
163
- const targetElement = document.querySelector(`#${this.containerId}`);
164
- // Scroll to the target element if it exists
165
- if (targetElement) {
166
- targetElement.scrollIntoView({ behavior: "smooth" });
167
- }
168
- }
169
- }
170
-
171
- checkURLParams() {
172
- // Load filters from URL params
173
- let requireFilterUpdate = false;
174
- const url = new URL(window.location.href.replace('#', ''));
175
- const params = url.searchParams;
176
- for (const [key, value] of params.entries()) {
177
- switch (key) {
178
- case this._filterLabel:
179
- this._selectFilter = value;
180
- requireFilterUpdate = true;
181
- break;
182
- case this._metaFilterLabel:
183
- this._selectMetaFilter = value;
184
- requireFilterUpdate = true;
185
- break;
186
- case 'keywords':
187
- this._keywordFilter = value;
188
- requireFilterUpdate = true;
189
- break;
190
- default:
191
- break;
192
- }
193
- };
194
-
195
- return requireFilterUpdate;
196
- }
197
-
198
- handleResetFiltersClick() {
199
- this._selectFilter = '';
200
- (this._showMetaFilter) ? this._selectMetaFilter = '' : true;
201
- this._keywordFilter = '';
202
- this.applyFilters();
203
- }
204
-
205
- private updateCards() {
206
- if (this._content && this._imageHash) {
207
- try {
208
- getGridCards(this._content, this._imageHash).then((res) => {
209
- this.allCards = this.filteredCards = res;
210
- if (this._showMetaFilter) {
211
- let typesArr = [...new Set(this.allCards.map((item: any) => (item as any).type))];
212
- typesArr.sort((a: string, b: string) => a.localeCompare(b));
213
- this.metaFilterOptions = typesArr.map((type: string) => ({ label: type, value: type })) as FilterOption[];
214
- }
215
- if (this.checkURLParams())
216
- this.applyFilters();
217
- });
218
- } catch (error: any) {
219
- console.error("An error occurred getting the cards:", error?.message || String(error));
220
- }
221
- }
222
- }
223
-
224
- // bind the config to the variables
225
- @api
226
- set searchtitle(value) {
227
- if (this._searchTitle !== value) {
228
- this._searchTitle = value;
229
- }
230
- }
231
- get searchtitle() {
232
- return this._searchTitle;
233
- }
234
-
235
- @api
236
- set imageHash(value) {
237
- this._imageHash = value;
238
- this.updateCards();
239
- }
240
- get imageHash() {
241
- return this._imageHash;
242
- }
243
-
244
- @api
245
- set content(value) {
246
- this._content = value;
247
- this.updateCards();
248
- }
249
- get content() {
250
- return this._content;
251
- }
252
-
253
- @api
254
- set filter(value) {
255
- if (this._filterData !== value) {
256
- this._filterData = value;
257
- if (!this._filterData.endsWith('.json')) {
258
- this.filterOptions = JSON.parse(this._filterData) as FilterOption[];
259
- } else {
260
- this.fetchFilterData();
261
- }
262
- }
263
- }
264
- get filter() {
265
- return this._filterData;
266
- }
267
-
268
- @api
269
- set property(value) {
270
- if (this._filterProperty !== value) {
271
- this._filterProperty = value;
272
- }
273
- }
274
- get property() {
275
- return this._filterProperty;
276
- }
277
-
278
- @api
279
- set label(value) {
280
- if (this._filterLabel !== value) {
281
- this._filterLabel = value;
282
- }
283
- }
284
- get label() {
285
- return this._filterLabel;
286
- }
287
-
288
- // below is for getting and setting the optional second filter
289
- @api
290
- set metafilters(value) {
291
- if (this._metaFilterProperty !== value) {
292
- this._showMetaFilter = true;
293
- this._metaFilterProperty = value;
294
- this._metaFilterLabel = value.charAt(0).toUpperCase() + value.slice(1);
295
- }
296
- }
297
- get metafilters() {
298
- return this._metaFilterProperty;
299
- }
300
- }
@@ -1,35 +0,0 @@
1
- export type GalleryCard = {
2
- id?: string;
3
- pretitle: string | null;
4
- title: string;
5
- description: string;
6
- image: string | null;
7
- status?: string | null;
8
- sort: number | null;
9
- updated?: Date | null;
10
- productAreas: string[];
11
- url: string | null;
12
- };
13
-
14
- export type CardAttribute = string | null;
15
- export type Card = {
16
- assistiveText: CardAttribute;
17
- ctaHref: CardAttribute;
18
- ctaTarget: CardAttribute;
19
- ctaTitle: CardAttribute;
20
- description: CardAttribute;
21
- imgSrc: CardAttribute;
22
- pretitle: CardAttribute;
23
- pretitleHref: CardAttribute;
24
- pretitleHrefText: CardAttribute;
25
- title: CardAttribute;
26
- };
27
-
28
- export type GalleryCards = {
29
- items: Card[];
30
- }
31
-
32
- export type FilterOption = {
33
- label: string;
34
- value: string;
35
- };
@@ -1,49 +0,0 @@
1
- @import 'tds/reset';
2
-
3
- :host {
4
- display: flex;
5
- align-items: center;
6
- justify-content: space-between;
7
- }
8
-
9
- .actions {
10
- align-items: center;
11
- display: grid;
12
- grid-auto-flow: column;
13
- grid-column-gap: var(--tds-spacing-2);
14
- }
15
-
16
- @media screen and (max-width: 800px) {
17
- .actions {
18
- width: 120px;
19
- }
20
- }
21
-
22
- .actions a {
23
- margin-right: 1rem;
24
- }
25
- .actions a:last-of-type {
26
- margin-right: 0;
27
- }
28
-
29
- .actions svg {
30
- height: 1rem;
31
- }
32
-
33
- .actions svg.fill {
34
- fill: var(--tds-color-meteorite);
35
- }
36
-
37
- .actions svg.fill:hover {
38
- fill: var(--tds-color-brand);
39
- }
40
-
41
- .actions svg.stroke {
42
- stroke: var(--tds-color-meteorite);
43
- fill: var(--tds-color-meteorite);
44
- }
45
-
46
- .actions svg.stroke:hover {
47
- stroke: var(--tds-color-brand);
48
- fill: var(--tds-color-brand);
49
- }
@@ -1,56 +0,0 @@
1
- <template>
2
- <div class="actions">
3
- <a
4
- onclick={handleClick}
5
- href={shareTwitter}
6
- target="_blank"
7
- rel="noopener"
8
- id="Share-on-Twitter"
9
- name="Share on Twitter"
10
- aria-label="Share on Twitter (opens new tab)"
11
- class="fill"
12
- ><svg
13
- viewBox="0 0 18 14"
14
- class="fill"
15
- xmlns="http://www.w3.org/2000/svg"
16
- >
17
- <path
18
- d="M17.308 2.325a7.333 7.333 0 01-2.041.52 3.396 3.396 0 001.565-1.836 7.374 7.374 0 01-2.258.808c-.33-.33-.73-.595-1.176-.775a3.767 3.767 0 00-1.412-.274 3.75 3.75 0 00-2.518.995A3.218 3.218 0 008.43 4.108c.002.254.033.507.094.755A10.658 10.658 0 014.46 3.847a9.912 9.912 0 01-3.256-2.471 3.128 3.128 0 00-.39 2.419c.205.823.738 1.544 1.494 2.017A3.678 3.678 0 01.72 5.39a.124.124 0 000 .053c.005.767.294 1.509.82 2.101.525.592 1.254 1 2.065 1.153-.326.071-.66.1-.995.087a4.39 4.39 0 01-.671 0 3.36 3.36 0 001.265 1.638c.594.412 1.31.645 2.052.666a7.475 7.475 0 01-4.413 1.423 8.92 8.92 0 01-.844-.08 10.571 10.571 0 005.445 1.49c6.526 0 10.096-5.057 10.096-9.446v-.434a6.933 6.933 0 001.767-1.717z"
19
- ></path></svg>
20
- </a>
21
- <a
22
- onclick={handleClick}
23
- href={shareLinkedIn}
24
- target="_blank"
25
- rel="noopener"
26
- id="Share-on-LinkedIn"
27
- name="Share on LinkedIn"
28
- aria-label="Share on LinkedIn (opens new tab)"
29
- ><svg
30
- viewBox="0 0 16 17"
31
- class="fill"
32
- xmlns="http://www.w3.org/2000/svg"
33
- >
34
- <path
35
- d="M15.923 10.187v6.428H12.51v-5.998c0-1.506-.493-2.535-1.729-2.535-.943 0-1.504.693-1.75 1.364-.09.24-.114.573-.114.908v6.261H5.503s.046-10.158 0-11.21h3.414v1.588l-.023.037h.023v-.037c.453-.762 1.263-1.852 3.076-1.852 2.246 0 3.93 1.602 3.93 5.046zM1.932 0C.764 0 0 .837 0 1.937c0 1.076.742 1.938 1.887 1.938h.022c1.19 0 1.931-.862 1.931-1.938C3.818.837 3.1 0 1.932 0zM.202 16.615h3.413V5.405H.203v11.21z"
36
- ></path></svg>
37
- </a>
38
- <a
39
- onclick={handleClick}
40
- href={shareFacebook}
41
- target="_blank"
42
- rel="noopener"
43
- id="Share-on-Facebook"
44
- name="Share on Facebook"
45
- aria-label="Share on Facebook (opens new tab)"
46
- ><svg
47
- viewBox="0 0 9 18"
48
- class="stroke"
49
- xmlns="http://www.w3.org/2000/svg"
50
- >
51
- <path
52
- d="M6.115 0c-2.173 0-3.66 1.5-3.66 4.23v2.363H0v3.195h2.455V18h2.926V9.788h2.45l.37-3.195H5.38V4.545c0-.922.236-1.545 1.42-1.545h1.507V.128A18.2 18.2 0 006.115 0z"
53
- ></path></svg>
54
- </a>
55
- </div>
56
- </template>
@@ -1,29 +0,0 @@
1
- import { LightningElement, api } from 'lwc';
2
- import { sendInteractionEvent, InteractionEventTypes } from 'shared/helpers';
3
-
4
- export default class extends LightningElement {
5
- @api title: string = '';
6
- @api url: string = window.location.href;
7
-
8
- private get shareTwitter() {
9
- return `https://twitter.com/intent/tweet/?text=${encodeURIComponent(
10
- this.title || ''
11
- )}&url=${encodeURIComponent(this.url)}&via=SalesforceArchs`;
12
- }
13
-
14
- private get shareLinkedIn() {
15
- return `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURI(
16
- this.url
17
- )}`;
18
- }
19
-
20
- private get shareFacebook() {
21
- return `https://www.facebook.com/sharer/sharer.php?u=${encodeURI(
22
- this.url
23
- )}`;
24
- }
25
- handleClick(e: any){
26
- sendInteractionEvent('Social Share Click', InteractionEventTypes.CLICK, e, e.currentTarget);
27
-
28
- }
29
- }
@@ -1,25 +0,0 @@
1
- import { isDisabled, isHidden } from '@a11y/focus-trap';
2
-
3
- export function getFocusableElements(node: Element): HTMLElement[] {
4
- const focusableTags = new Set(
5
- ['a', 'button', 'input', 'select', 'textarea'].map((t) =>
6
- t.toUpperCase()
7
- )
8
- );
9
- if (
10
- focusableTags.has(node.tagName) &&
11
- !isDisabled(node as HTMLElement) &&
12
- !isHidden(node as HTMLElement)
13
- )
14
- return [node] as HTMLElement[];
15
- if (node.shadowRoot)
16
- return Array.from(node.shadowRoot.children).flatMap(
17
- getFocusableElements
18
- );
19
- if (node instanceof HTMLSlotElement) {
20
- let assignedElements = node.assignedElements();
21
- if (assignedElements.length)
22
- return assignedElements.flatMap(getFocusableElements);
23
- }
24
- return Array.from(node.children).flatMap(getFocusableElements);
25
- }
@@ -1,29 +0,0 @@
1
- import { track, LightningElement } from 'lwc';
2
-
3
- export abstract class ChildrenElement<T> extends LightningElement {
4
- private observer!: MutationObserver;
5
-
6
- @track items: T[] = [];
7
- abstract extractor: (element: Element) => T;
8
-
9
- connectedCallback() {
10
- this.observer = new MutationObserver(() => {
11
- this.setItems();
12
- });
13
- this.observer.observe(this.template.host, {
14
- childList: true,
15
- subtree: true
16
- });
17
- this.setItems();
18
- }
19
-
20
- disconnectedCallback() {
21
- this.observer.disconnect();
22
- }
23
-
24
- setItems() {
25
- this.items = Array.from(this.template.host.children).map(
26
- this.extractor
27
- );
28
- }
29
- }
@@ -1,52 +0,0 @@
1
- export function hexToRGB(h: string) {
2
- let r = 0;
3
- let g = 0;
4
- let b = 0;
5
- if (h.length == 4) {
6
- r = +('0x' + h[1] + h[1]);
7
- g = +('0x' + h[2] + h[2]);
8
- b = +('0x' + h[3] + h[3]);
9
- } else if (h.length == 7) {
10
- r = +('0x' + h[1] + h[2]);
11
- g = +('0x' + h[3] + h[4]);
12
- b = +('0x' + h[5] + h[6]);
13
- }
14
- return [r, g, b];
15
- }
16
-
17
- export function RGBToHSL(r: number, g: number, b: number) {
18
- r /= 255;
19
- g /= 255;
20
- b /= 255;
21
- let cmin = Math.min(r, g, b);
22
- let cmax = Math.max(r, g, b);
23
- let delta = cmax - cmin;
24
- let h = 0;
25
- let s = 0;
26
- let l = 0;
27
- if (delta === 0) h = 0;
28
- else if (cmax === r) h = ((g - b) / delta) % 6;
29
- else if (cmax === g) h = (b - r) / delta + 2;
30
- else h = (r - g) / delta + 4;
31
- h = Math.round(h * 60);
32
- if (h < 0) h += 360;
33
- l = (cmax + cmin) / 2;
34
- s = delta == 0 ? 0 : delta / (1 - Math.abs(2 * l - 1));
35
- s = +s.toFixed(1);
36
- l = +l.toFixed(1);
37
- return [h, s, l];
38
- }
39
-
40
- export function rgb(r: number, g: number, b: number) {
41
- return `rgb(${r},${g},${b})`;
42
- }
43
-
44
- export function hsl(h: number, s: number, l: number) {
45
- return `hsl(${h},${s * 100}%,${l * 100}%)`;
46
- }
47
-
48
- export function lightenHex(hex: string, by: number) {
49
- let [r, g, b] = hexToRGB(hex);
50
- let [h, s, l] = RGBToHSL(r, g, b);
51
- return hsl(h, s, l + by);
52
- }
@@ -1,32 +0,0 @@
1
- type Procedure = (...args: any[]) => void;
2
-
3
- type Options = {
4
- isImmediate: boolean;
5
- };
6
-
7
- export function debounce<F extends Procedure>(
8
- func: F,
9
- waitMilliseconds = 50,
10
- options: Options = {
11
- isImmediate: false
12
- }
13
- ): F {
14
- let timeoutId: ReturnType<typeof setTimeout> | undefined;
15
- return function (this: any, ...args: any[]) {
16
- const context = this;
17
- const doLater = function () {
18
- timeoutId = undefined;
19
- if (!options.isImmediate) {
20
- func.apply(context, args);
21
- }
22
- };
23
- const shouldCallNow = options.isImmediate && timeoutId === undefined;
24
- if (timeoutId !== undefined) {
25
- clearTimeout(timeoutId);
26
- }
27
- timeoutId = setTimeout(doLater, waitMilliseconds);
28
- if (shouldCallNow) {
29
- func.apply(context, args);
30
- }
31
- } as any;
32
- }