@salesforcedevs/arch-components 1.20.17-alpha4 → 1.20.17-alpha6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/{modules/common → common}/context/context.ts +21 -21
- package/src/{modules/common → common}/effectAdapter/__tests__/effectAdapter.test.ts +4 -4
- package/src/common/effectAdapter/effectAdapter.ts +18 -0
- package/src/{modules/common → common}/reflectedElement/__tests__/reflectedElement.test.ts +5 -5
- package/src/{modules/common → common}/reflectedElement/reflectedElement.ts +1 -1
- package/src/{modules/common → common}/slot/__tests__/slot.test.ts +12 -12
- package/src/{modules/common → common}/slot/slot.ts +3 -4
- package/src/{modules/sa → sa}/coverage/coverage.ts +46 -44
- package/src/{modules/sa → sa}/coverage/types.d.ts +12 -16
- package/src/{modules/sa → sa}/explorer/explorer.ts +53 -53
- package/src/{modules/sa → sa}/gallery/gallery.ts +30 -30
- package/src/{modules/sa → sa}/socialShare/socialShare.ts +3 -3
- package/src/modules/common/effectAdapter/effectAdapter.ts +0 -24
- package/src/modules/shared/a11y/a11y.ts +0 -25
- package/src/modules/shared/children/children.ts +0 -29
- package/src/modules/shared/color/color.ts +0 -52
- package/src/modules/shared/debounce/debounce.ts +0 -32
- package/src/modules/shared/dialog/dialog.ts +0 -154
- package/src/modules/shared/elements/__tests__/overflow.test.ts +0 -39
- package/src/modules/shared/elements/overflow.ts +0 -71
- package/src/modules/shared/fetch/fetch.ts +0 -52
- package/src/modules/shared/helpers/helpers.ts +0 -141
- package/src/modules/shared/i18n/i18n.ts +0 -74
- package/src/modules/shared/labels/__tests__/helpers.test.ts +0 -107
- package/src/modules/shared/labels/__tests__/pointHelpers.test.ts +0 -33
- package/src/modules/shared/labels/__tests__/timeHelpers.test.ts +0 -89
- package/src/modules/shared/labels/helpers.ts +0 -23
- package/src/modules/shared/labels/pointHelpers.ts +0 -47
- package/src/modules/shared/labels/timeHelpers.ts +0 -182
- package/src/modules/shared/labels/types.d.ts +0 -5
- package/src/modules/shared/logger/logger.ts +0 -33
- package/src/modules/shared/menu/menu.ts +0 -239
- package/src/modules/shared/overflow/__tests__/overflow.test.ts +0 -39
- package/src/modules/shared/overflow/overflow.ts +0 -71
- package/src/modules/shared/polling-request.ts +0 -97
- package/src/modules/shared/testutils.ts +0 -118
- package/src/modules/shared/track/track.ts +0 -23
- package/src/modules/shared/trailhead.ts +0 -123
- package/src/modules/shared/types.d.ts +0 -1
- package/src/modules/shared/useEffectAttr.ts +0 -16
- package/src/modules/shared/withState.ts +0 -21
- package/src/modules/tds/appLauncher/__fixtures__/index.ts +0 -34
- package/src/modules/tds/appLauncher/__tests__/appLauncher.test.ts +0 -119
- package/src/modules/tds/appLauncher/appLauncher.css +0 -65
- package/src/modules/tds/appLauncher/appLauncher.html +0 -38
- package/src/modules/tds/appLauncher/appLauncher.stories.ts +0 -39
- package/src/modules/tds/appLauncher/appLauncher.ts +0 -79
- package/src/modules/tds/appLauncher/types.ts +0 -8
- package/src/modules/tds/avatar/__tests__/avatar.test.ts +0 -11
- package/src/modules/tds/avatar/avatar.css +0 -77
- package/src/modules/tds/avatar/avatar.html +0 -36
- package/src/modules/tds/avatar/avatar.stories.ts +0 -64
- package/src/modules/tds/avatar/avatar.ts +0 -50
- package/src/modules/tds/badge/__tests__/badge.test.js +0 -11
- package/src/modules/tds/badge/badge.css +0 -22
- package/src/modules/tds/badge/badge.html +0 -5
- package/src/modules/tds/badge/badge.stories.ts +0 -10
- package/src/modules/tds/badge/badge.ts +0 -9
- package/src/modules/tds/button/__tests__/button.test.ts +0 -52
- package/src/modules/tds/button/button.css +0 -1
- package/src/modules/tds/button/button.html +0 -20
- package/src/modules/tds/button/button.stories.js +0 -54
- package/src/modules/tds/button/button.ts +0 -59
- package/src/modules/tds/buttonIcon/__tests__/buttonIcon.test.ts +0 -17
- package/src/modules/tds/buttonIcon/buttonIcon.css +0 -1
- package/src/modules/tds/buttonIcon/buttonIcon.html +0 -12
- package/src/modules/tds/buttonIcon/buttonIcon.stories.js +0 -38
- package/src/modules/tds/buttonIcon/buttonIcon.ts +0 -6
- package/src/modules/tds/buttonIconLink/buttonIconLink.css +0 -1
- package/src/modules/tds/buttonIconLink/buttonIconLink.html +0 -14
- package/src/modules/tds/buttonIconLink/buttonIconLink.stories.ts +0 -32
- package/src/modules/tds/buttonIconLink/buttonIconLink.ts +0 -9
- package/src/modules/tds/buttonLink/__tests__/buttonLink.test.ts +0 -17
- package/src/modules/tds/buttonLink/buttonLink.css +0 -1
- package/src/modules/tds/buttonLink/buttonLink.html +0 -19
- package/src/modules/tds/buttonLink/buttonLink.stories.js +0 -24
- package/src/modules/tds/buttonLink/buttonLink.ts +0 -8
- package/src/modules/tds/buttonStyles/buttonStyles.css +0 -232
- package/src/modules/tds/childSummary/__tests__/childSummary.test.js +0 -99
- package/src/modules/tds/childSummary/childSummary.css +0 -74
- package/src/modules/tds/childSummary/childSummary.html +0 -38
- package/src/modules/tds/childSummary/childSummary.stories.ts +0 -40
- package/src/modules/tds/childSummary/childSummary.ts +0 -63
- package/src/modules/tds/childSummary/types.d.ts +0 -10
- package/src/modules/tds/contentChildListItem/__tests__/contentChildListItem.test.ts +0 -32
- package/src/modules/tds/contentChildListItem/contentChildListItem.css +0 -1
- package/src/modules/tds/contentChildListItem/contentChildListItem.html +0 -10
- package/src/modules/tds/contentChildListItem/contentChildListItem.stories.ts +0 -46
- package/src/modules/tds/contentChildListItem/contentChildListItem.ts +0 -34
- package/src/modules/tds/contentIcon/contentIcon.css +0 -47
- package/src/modules/tds/contentIcon/contentIcon.html +0 -15
- package/src/modules/tds/contentIcon/contentIcon.stories.js +0 -110
- package/src/modules/tds/contentIcon/contentIcon.ts +0 -66
- package/src/modules/tds/contextAdapter/__tests__/contextAdapter.test.ts +0 -76
- package/src/modules/tds/contextAdapter/constants.ts +0 -1
- package/src/modules/tds/contextAdapter/contextAdapter.html +0 -1
- package/src/modules/tds/contextAdapter/contextAdapter.ts +0 -54
- package/src/modules/tds/dialogStyles/dialogStyles.css +0 -90
- package/src/modules/tds/footerLinks/__tests__/__snapshots__/footerLinks.test.ts.snap +0 -3
- package/src/modules/tds/footerLinks/__tests__/footerLinks.test.ts +0 -142
- package/src/modules/tds/footerLinks/footerLinks.css +0 -80
- package/src/modules/tds/footerLinks/footerLinks.html +0 -30
- package/src/modules/tds/footerLinks/footerLinks.ts +0 -48
- package/src/modules/tds/footerLinks/types.ts +0 -11
- package/src/modules/tds/footerMfe/footerMfe.html +0 -3
- package/src/modules/tds/footerMfe/footerMfe.ts +0 -19
- package/src/modules/tds/headerAvatar/__tests__/headerAvatar.test.ts +0 -43
- package/src/modules/tds/headerAvatar/headerAvatar.css +0 -45
- package/src/modules/tds/headerAvatar/headerAvatar.html +0 -25
- package/src/modules/tds/headerAvatar/headerAvatar.ts +0 -15
- package/src/modules/tds/headerHelpButton/__tests__/headerHelpButton.test.ts +0 -32
- package/src/modules/tds/headerHelpButton/headerHelpButton.css +0 -14
- package/src/modules/tds/headerHelpButton/headerHelpButton.html +0 -19
- package/src/modules/tds/headerHelpButton/headerHelpButton.ts +0 -12
- package/src/modules/tds/heading/__tests__/heading.test.ts +0 -50
- package/src/modules/tds/heading/heading.css +0 -1
- package/src/modules/tds/heading/heading.html +0 -9
- package/src/modules/tds/heading/heading.stories.ts +0 -36
- package/src/modules/tds/heading/heading.ts +0 -36
- package/src/modules/tds/icon/icon.css +0 -28
- package/src/modules/tds/icon/icon.html +0 -17
- package/src/modules/tds/icon/icon.stories.js +0 -18
- package/src/modules/tds/icon/icon.ts +0 -79
- package/src/modules/tds/input/__tests__/input.test.ts +0 -41
- package/src/modules/tds/input/input.css +0 -34
- package/src/modules/tds/input/input.html +0 -12
- package/src/modules/tds/input/input.stories.ts +0 -25
- package/src/modules/tds/input/input.ts +0 -41
- package/src/modules/tds/instrumentation/instrumentation.css +0 -0
- package/src/modules/tds/instrumentation/instrumentation.html +0 -1
- package/src/modules/tds/instrumentation/instrumentation.ts +0 -113
- package/src/modules/tds/pbCard/pbCard.css +0 -28
- package/src/modules/tds/pbCard/pbCard.html +0 -21
- package/src/modules/tds/pbCard/pbCard.ts +0 -18
- package/src/modules/tds/pill/__tests__/pill.test.ts +0 -56
- package/src/modules/tds/pill/pill.css +0 -70
- package/src/modules/tds/pill/pill.html +0 -17
- package/src/modules/tds/pill/pill.stories.ts +0 -41
- package/src/modules/tds/pill/pill.ts +0 -34
- package/src/modules/tds/progressBar/__tests__/progressBar.test.js +0 -11
- package/src/modules/tds/progressBar/progressBar.css +0 -42
- package/src/modules/tds/progressBar/progressBar.html +0 -14
- package/src/modules/tds/progressBar/progressBar.stories.ts +0 -24
- package/src/modules/tds/progressBar/progressBar.ts +0 -14
- package/src/modules/tds/radio/__tests__/radio.test.ts +0 -29
- package/src/modules/tds/radio/radio.css +0 -89
- package/src/modules/tds/radio/radio.html +0 -17
- package/src/modules/tds/radio/radio.stories.ts +0 -31
- package/src/modules/tds/radio/radio.ts +0 -32
- package/src/modules/tds/reset/reset.css +0 -39
- package/src/modules/tds/search/__fixtures__/index.ts +0 -32
- package/src/modules/tds/search/__tests__/search.test.ts +0 -235
- package/src/modules/tds/search/lib/__tests__/__snapshots__/listbox.test.ts.snap +0 -115
- package/src/modules/tds/search/lib/__tests__/listbox.test.ts +0 -192
- package/src/modules/tds/search/lib/listbox.ts +0 -209
- package/src/modules/tds/search/search.css +0 -122
- package/src/modules/tds/search/search.html +0 -21
- package/src/modules/tds/search/search.stories.ts +0 -20
- package/src/modules/tds/search/search.ts +0 -107
- package/src/modules/tds/search/types.d.ts +0 -22
- package/src/modules/tds/searchList/searchList.css +0 -120
- package/src/modules/tds/searchList/searchList.html +0 -43
- package/src/modules/tds/searchList/searchList.stories.ts +0 -10
- package/src/modules/tds/searchList/searchList.ts +0 -53
- package/src/modules/tds/select/__tests__/select.test.ts +0 -150
- package/src/modules/tds/select/select.css +0 -42
- package/src/modules/tds/select/select.html +0 -24
- package/src/modules/tds/select/select.stories.ts +0 -59
- package/src/modules/tds/select/select.ts +0 -60
- package/src/modules/tds/spinner/__tests__/spinner.test.ts +0 -11
- package/src/modules/tds/spinner/spinner.css +0 -194
- package/src/modules/tds/spinner/spinner.html +0 -9
- package/src/modules/tds/spinner/spinner.stories.ts +0 -20
- package/src/modules/tds/spinner/spinner.ts +0 -15
- package/src/modules/tds/styles/styles.css +0 -24
- package/src/modules/tds/summary/__tests__/summary.test.ts +0 -135
- package/src/modules/tds/summary/summary.css +0 -135
- package/src/modules/tds/summary/summary.html +0 -69
- package/src/modules/tds/summary/summary.stories.js +0 -148
- package/src/modules/tds/summary/summary.ts +0 -95
- package/src/modules/tds/tab/__tests__/tab.test.ts +0 -25
- package/src/modules/tds/tab/tab.css +0 -3
- package/src/modules/tds/tab/tab.html +0 -5
- package/src/modules/tds/tab/tab.ts +0 -46
- package/src/modules/tds/tabset/__tests__/tabset.test.ts +0 -108
- package/src/modules/tds/tabset/tabset.css +0 -112
- package/src/modules/tds/tabset/tabset.html +0 -63
- package/src/modules/tds/tabset/tabset.stories.ts +0 -32
- package/src/modules/tds/tabset/tabset.ts +0 -232
- package/src/modules/tds/themeProvider/themeProvider.css +0 -502
- package/src/modules/tds/themeProvider/themeProvider.html +0 -3
- package/src/modules/tds/themeProvider/themeProvider.ts +0 -37
- package/src/modules/tds/tile/tile.css +0 -23
- package/src/modules/tds/tile/tile.html +0 -5
- package/src/modules/tds/tile/tile.stories.js +0 -14
- package/src/modules/tds/tile/tile.ts +0 -12
- package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.html +0 -1
- package/src/modules/tds/xsfMfeEvents/xsfMfeEvents.ts +0 -47
- package/src/modules/th/contextAdapter/__tests__/contextAdapter.test.ts +0 -104
- package/src/modules/th/contextAdapter/contextAdapter.html +0 -1
- package/src/modules/th/contextAdapter/contextAdapter.ts +0 -49
- package/src/modules/th/favoriteButton/__tests__/favoriteButton.test.ts +0 -56
- package/src/modules/th/favoriteButton/favoriteButton.css +0 -3
- package/src/modules/th/favoriteButton/favoriteButton.html +0 -15
- package/src/modules/th/favoriteButton/favoriteButton.stories.js +0 -30
- package/src/modules/th/favoriteButton/favoriteButton.ts +0 -84
- package/src/modules/th/favoriteButton/mocks/index.ts +0 -12
- package/src/modules/th/search/__fixtures__/index.ts +0 -14
- package/src/modules/th/search/__tests__/search.test.ts +0 -233
- package/src/modules/th/search/constants.ts +0 -2
- package/src/modules/th/search/mocks/index.ts +0 -30
- package/src/modules/th/search/mocks/responses.ts +0 -54
- package/src/modules/th/search/search.css +0 -4
- package/src/modules/th/search/search.html +0 -12
- package/src/modules/th/search/search.ts +0 -172
- package/src/modules/th/search/types.d.ts +0 -29
- package/src/modules/tm/card/__tests__/card.test.ts +0 -65
- package/src/modules/tm/card/card.css +0 -131
- package/src/modules/tm/card/card.html +0 -81
- package/src/modules/tm/card/card.ts +0 -269
- package/src/modules/tm/cardBase/cardBase.css +0 -11
- package/src/modules/tm/cardGridA/cardGridA.css +0 -11
- package/src/modules/tm/cardGridA/cardGridA.html +0 -21
- package/src/modules/tm/cardGridA/cardGridA.stories.js +0 -107
- package/src/modules/tm/cardGridA/cardGridA.ts +0 -24
- package/src/modules/tm/cardGridB/cardGridB.css +0 -88
- package/src/modules/tm/cardGridB/cardGridB.html +0 -20
- package/src/modules/tm/cardGridB/cardGridB.stories.js +0 -58
- package/src/modules/tm/cardGridB/cardGridB.ts +0 -19
- package/src/modules/tm/cardGridC/cardGridC.css +0 -24
- package/src/modules/tm/cardGridC/cardGridC.html +0 -22
- package/src/modules/tm/cardGridC/cardGridC.stories.js +0 -42
- package/src/modules/tm/cardGridC/cardGridC.ts +0 -11
- package/src/modules/tm/cardGridD/cardGridD.css +0 -17
- package/src/modules/tm/cardGridD/cardGridD.html +0 -20
- package/src/modules/tm/cardGridD/cardGridD.stories.js +0 -34
- package/src/modules/tm/cardGridD/cardGridD.ts +0 -7
- package/src/modules/tm/cardNew/cardNew.css +0 -31
- package/src/modules/tm/cardNew/cardNew.html +0 -29
- package/src/modules/tm/cardNew/cardNew.ts +0 -66
- package/src/modules/tm/content/__fixtures__/index.ts +0 -884
- package/src/modules/tm/content/__tests__/content.test.ts +0 -95
- package/src/modules/tm/content/content.css +0 -641
- package/src/modules/tm/content/content.html +0 -53
- package/src/modules/tm/content/content.stories.js +0 -14
- package/src/modules/tm/content/content.ts +0 -171
- package/src/modules/tm/endCapA/__tests__/endCapA.test.ts +0 -52
- package/src/modules/tm/endCapA/endCapA.css +0 -64
- package/src/modules/tm/endCapA/endCapA.html +0 -21
- package/src/modules/tm/endCapA/endCapA.stories.js +0 -37
- package/src/modules/tm/endCapA/endCapA.ts +0 -23
- package/src/modules/tm/eventsA/eventsA.css +0 -107
- package/src/modules/tm/eventsA/eventsA.html +0 -26
- package/src/modules/tm/eventsA/eventsA.stories.js +0 -51
- package/src/modules/tm/eventsA/eventsA.ts +0 -48
- package/src/modules/tm/faqA/faqA.css +0 -87
- package/src/modules/tm/faqA/faqA.html +0 -27
- package/src/modules/tm/faqA/faqA.stories.js +0 -25
- package/src/modules/tm/faqA/faqA.ts +0 -40
- package/src/modules/tm/featureGridA/__tests__/featureGridA.test.ts +0 -116
- package/src/modules/tm/featureGridA/featureGridA.css +0 -95
- package/src/modules/tm/featureGridA/featureGridA.html +0 -34
- package/src/modules/tm/featureGridA/featureGridA.stories.js +0 -45
- package/src/modules/tm/featureGridA/featureGridA.ts +0 -59
- package/src/modules/tm/footnote/footnote.css +0 -28
- package/src/modules/tm/footnote/footnote.html +0 -3
- package/src/modules/tm/footnote/footnote.stories.js +0 -29
- package/src/modules/tm/footnote/footnote.ts +0 -35
- package/src/modules/tm/heroA/__tests__/heroA.test.ts +0 -51
- package/src/modules/tm/heroA/heroA.css +0 -116
- package/src/modules/tm/heroA/heroA.html +0 -27
- package/src/modules/tm/heroA/heroA.stories.js +0 -49
- package/src/modules/tm/heroA/heroA.ts +0 -56
- package/src/modules/tm/heroB/heroB.css +0 -78
- package/src/modules/tm/heroB/heroB.html +0 -26
- package/src/modules/tm/heroB/heroB.stories.js +0 -44
- package/src/modules/tm/heroB/heroB.ts +0 -26
- package/src/modules/tm/page/__tests__/page.test.ts +0 -35
- package/src/modules/tm/page/page.css +0 -3
- package/src/modules/tm/page/page.html +0 -3
- package/src/modules/tm/page/page.stories.js +0 -10
- package/src/modules/tm/page/page.ts +0 -3
- package/src/modules/tm/pageHeaderA/pageHeaderA.css +0 -82
- package/src/modules/tm/pageHeaderA/pageHeaderA.html +0 -24
- package/src/modules/tm/pageHeaderA/pageHeaderA.stories.js +0 -18
- package/src/modules/tm/pageHeaderA/pageHeaderA.ts +0 -51
- package/src/modules/tm/pageNavigationA/pageNavigationA.css +0 -41
- package/src/modules/tm/pageNavigationA/pageNavigationA.html +0 -9
- package/src/modules/tm/pageNavigationA/pageNavigationA.stories.js +0 -34
- package/src/modules/tm/pageNavigationA/pageNavigationA.ts +0 -18
- package/src/modules/tm/promoA/__tests__/promoA.test.ts +0 -89
- package/src/modules/tm/promoA/promoA.css +0 -95
- package/src/modules/tm/promoA/promoA.html +0 -22
- package/src/modules/tm/promoA/promoA.stories.js +0 -38
- package/src/modules/tm/promoA/promoA.ts +0 -62
- package/src/modules/tm/sectionA/sectionA.css +0 -64
- package/src/modules/tm/sectionA/sectionA.html +0 -21
- package/src/modules/tm/sectionA/sectionA.stories.js +0 -18
- package/src/modules/tm/sectionA/sectionA.ts +0 -27
- package/src/modules/tm/sectionSpacer/sectionSpacer.css +0 -4
- package/src/modules/tm/sectionSpacer/sectionSpacer.html +0 -1
- package/src/modules/tm/sectionSpacer/sectionSpacer.ts +0 -3
- package/src/modules/tm/skillsCardA/skillsCardA.css +0 -73
- package/src/modules/tm/skillsCardA/skillsCardA.html +0 -37
- package/src/modules/tm/skillsCardA/skillsCardA.ts +0 -38
- package/src/modules/tm/skillsGridA/skillsGridA.css +0 -12
- package/src/modules/tm/skillsGridA/skillsGridA.html +0 -5
- package/src/modules/tm/skillsGridA/skillsGridA.stories.ts +0 -65
- package/src/modules/tm/skillsGridA/skillsGridA.ts +0 -3
- package/src/modules/tm/statsA/statsA.css +0 -26
- package/src/modules/tm/statsA/statsA.html +0 -10
- package/src/modules/tm/statsA/statsA.stories.js +0 -29
- package/src/modules/tm/statsA/statsA.ts +0 -20
- package/src/modules/tm/textItem/textItem.css +0 -53
- package/src/modules/tm/textItem/textItem.html +0 -18
- package/src/modules/tm/textItem/textItem.ts +0 -32
- package/src/modules/tm/textItemGridA/textItemGridA.css +0 -11
- package/src/modules/tm/textItemGridA/textItemGridA.html +0 -15
- package/src/modules/tm/textItemGridA/textItemGridA.stories.js +0 -67
- package/src/modules/tm/textItemGridA/textItemGridA.ts +0 -20
- package/src/modules/tm/threeCardGrid/threeCardGrid.css +0 -6
- package/src/modules/tm/threeCardGrid/threeCardGrid.html +0 -5
- package/src/modules/tm/threeCardGrid/threeCardGrid.ts +0 -3
- package/src/modules/tm/trailblazersA/trailblazersA.css +0 -70
- package/src/modules/tm/trailblazersA/trailblazersA.html +0 -42
- package/src/modules/tm/trailblazersA/trailblazersA.stories.js +0 -52
- package/src/modules/tm/trailblazersA/trailblazersA.ts +0 -43
- package/src/modules/tm/utils/utils.ts +0 -18
- package/src/modules/tm/youtube/youtube.css +0 -7
- package/src/modules/tm/youtube/youtube.html +0 -10
- package/src/modules/tm/youtube/youtube.stories.js +0 -15
- package/src/modules/tm/youtube/youtube.ts +0 -27
- package/src/modules/ui/focusTrap/focusTrap.html +0 -5
- package/src/modules/ui/focusTrap/focusTrap.ts +0 -104
- package/src/modules/ui/focusVisible/__tests__/focusVisible.test.ts +0 -95
- package/src/modules/ui/focusVisible/focusVisible.html +0 -3
- package/src/modules/ui/focusVisible/focusVisible.ts +0 -46
- /package/src/{modules/common → common}/context/context.html +0 -0
- /package/src/{modules/common → common}/effectAdapter/effectAdapter.html +0 -0
- /package/src/{modules/common → common}/reflectedElement/__tests__/modules/test/select/select.html +0 -0
- /package/src/{modules/common → common}/reflectedElement/__tests__/modules/test/select/select.ts +0 -0
- /package/src/{modules/common → common}/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.html +0 -0
- /package/src/{modules/common → common}/reflectedElement/__tests__/modules/test/selectTransform/selectTransform.ts +0 -0
- /package/src/{modules/sa → sa}/coverage/coverage.css +0 -0
- /package/src/{modules/sa → sa}/coverage/coverage.html +0 -0
- /package/src/{modules/sa → sa}/expandableSection/expandableSection.css +0 -0
- /package/src/{modules/sa → sa}/expandableSection/expandableSection.html +0 -0
- /package/src/{modules/sa → sa}/expandableSection/expandableSection.stories.ts +0 -0
- /package/src/{modules/sa → sa}/expandableSection/expandableSection.ts +0 -0
- /package/src/{modules/sa → sa}/explorer/explorer.css +0 -0
- /package/src/{modules/sa → sa}/explorer/explorer.html +0 -0
- /package/src/{modules/sa → sa}/explorer/types.d.ts +0 -0
- /package/src/{modules/sa → sa}/gallery/gallery.css +0 -0
- /package/src/{modules/sa → sa}/gallery/gallery.html +0 -0
- /package/src/{modules/sa → sa}/gallery/types.d.ts +0 -0
- /package/src/{modules/sa → sa}/socialShare/socialShare.css +0 -0
- /package/src/{modules/sa → sa}/socialShare/socialShare.html +0 -0
|
@@ -10,7 +10,7 @@ import { sendInteractionEvent, InteractionEventTypes } from 'shared/helpers';
|
|
|
10
10
|
export default class Explorer extends LightningElement {
|
|
11
11
|
|
|
12
12
|
// get the inuts from the calling page
|
|
13
|
-
_content
|
|
13
|
+
_content;
|
|
14
14
|
|
|
15
15
|
// lets get the inputs from the form
|
|
16
16
|
private _keywordFilter: string = '';
|
|
@@ -24,8 +24,8 @@ export default class Explorer extends LightningElement {
|
|
|
24
24
|
private isLoading = true;
|
|
25
25
|
private filterData = '/assets/data/wa_framework.json';
|
|
26
26
|
private feedbackURL = 'https://docs.google.com/forms/d/e/1FAIpQLSf172WosVDuSjMnTS2tGL8024TyBswpWTv4vNjwfbwces0HlQ/viewform';
|
|
27
|
-
@api private version: string
|
|
28
|
-
private frameworkArr
|
|
27
|
+
@api private version: string;
|
|
28
|
+
private frameworkArr;
|
|
29
29
|
private trustedArr: Behavior[] = [];
|
|
30
30
|
private easyArr: Behavior[] = [];
|
|
31
31
|
private adaptableArr: Behavior[] = [];
|
|
@@ -39,7 +39,7 @@ export default class Explorer extends LightningElement {
|
|
|
39
39
|
|
|
40
40
|
// vars for pdf export
|
|
41
41
|
private logoURL = '/assets/images/architects_logo_horizontal_bg.png';
|
|
42
|
-
private logoImageData
|
|
42
|
+
private logoImageData;
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
// lets set the pattern data (this includes anti-patterns)
|
|
@@ -83,8 +83,8 @@ export default class Explorer extends LightningElement {
|
|
|
83
83
|
this.checkURLParams();
|
|
84
84
|
this.applyFilters();
|
|
85
85
|
|
|
86
|
-
} catch (error
|
|
87
|
-
console.error("An error occurred fetching the library:", error
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error("An error occurred fetching the library:", error.message);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
private removeEmptyFilterOptions = () => {
|
|
@@ -99,20 +99,20 @@ export default class Explorer extends LightningElement {
|
|
|
99
99
|
private sortPatterns(arr: any[]) {
|
|
100
100
|
return arr.sort((a, b) => {
|
|
101
101
|
// Compare by CapabilityWeight
|
|
102
|
-
if (a.CapabilityWeight > b.CapabilityWeight)
|
|
103
|
-
if (a.CapabilityWeight < b.CapabilityWeight)
|
|
102
|
+
if (a.CapabilityWeight > b.CapabilityWeight) return -1;
|
|
103
|
+
if (a.CapabilityWeight < b.CapabilityWeight) return 1;
|
|
104
104
|
|
|
105
105
|
// If CapabilityWeight is equal, compare by BehaviorWeight
|
|
106
|
-
if (a.BehaviorWeight > b.BehaviorWeight)
|
|
107
|
-
if (a.BehaviorWeight < b.BehaviorWeight)
|
|
106
|
+
if (a.BehaviorWeight > b.BehaviorWeight) return -1;
|
|
107
|
+
if (a.BehaviorWeight < b.BehaviorWeight) return 1;
|
|
108
108
|
|
|
109
109
|
// If BehaviorWeight is equal, compare by DimensionWeight
|
|
110
|
-
if (a.DimensionWeight > b.DimensionWeight)
|
|
111
|
-
if (a.DimensionWeight < b.DimensionWeight)
|
|
110
|
+
if (a.DimensionWeight > b.DimensionWeight) return -1;
|
|
111
|
+
if (a.DimensionWeight < b.DimensionWeight) return 1;
|
|
112
112
|
|
|
113
113
|
// If DimensionWeight is equal, compare by ConsiderationWeight
|
|
114
|
-
if (a.ConsiderationWeight > b.ConsiderationWeight)
|
|
115
|
-
if (a.ConsiderationWeight < b.ConsiderationWeight)
|
|
114
|
+
if (a.ConsiderationWeight > b.ConsiderationWeight) return -1;
|
|
115
|
+
if (a.ConsiderationWeight < b.ConsiderationWeight) return 1;
|
|
116
116
|
|
|
117
117
|
// If all properties are equal, consider the elements equal in this sort context
|
|
118
118
|
return 0;
|
|
@@ -141,13 +141,13 @@ export default class Explorer extends LightningElement {
|
|
|
141
141
|
this.frameworkArr = data.values[0][0].Capabilities;
|
|
142
142
|
|
|
143
143
|
// populate the framework dropdowns
|
|
144
|
-
this.trustedArr = this.frameworkArr.filter(
|
|
145
|
-
this.trustedArr.forEach((behavior) => behavior.Dimensions.map(
|
|
144
|
+
this.trustedArr = this.frameworkArr.filter(capability => capability.Name === "Trusted")[0].Behaviors.sort((a, b) => b.Weight - a.Weight);
|
|
145
|
+
this.trustedArr.forEach((behavior) => behavior.Dimensions.map(dim => dim.isDisabled = false));
|
|
146
146
|
|
|
147
|
-
this.easyArr = this.frameworkArr.filter(
|
|
148
|
-
this.easyArr.forEach((behavior) => behavior.Dimensions.map(
|
|
147
|
+
this.easyArr = this.frameworkArr.filter(capability => capability.Name === "Easy")[0].Behaviors.sort((a, b) => b.Weight - a.Weight);
|
|
148
|
+
this.easyArr.forEach((behavior) => behavior.Dimensions.map(dim => dim.isDisabled = false));
|
|
149
149
|
|
|
150
|
-
this.adaptableArr = this.frameworkArr.filter(
|
|
150
|
+
this.adaptableArr = this.frameworkArr.filter(capability => capability.Name === "Adaptable")[0].Behaviors.sort((a, b) => b.Weight - a.Weight);
|
|
151
151
|
this.adaptableArr.forEach((behavior) => behavior.Dimensions.map(dim => dim.isDisabled = false));
|
|
152
152
|
|
|
153
153
|
this.locationsArr.push(...data.values[0][0].Locations);
|
|
@@ -158,32 +158,32 @@ export default class Explorer extends LightningElement {
|
|
|
158
158
|
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
-
} catch (error
|
|
162
|
-
console.error("An error occurred getting the filter list:", error
|
|
161
|
+
} catch (error) {
|
|
162
|
+
console.error("An error occurred getting the filter list:", error.message);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
filterChange(evt
|
|
166
|
+
filterChange(evt) {
|
|
167
167
|
if (evt.detail == "-1")
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
return;
|
|
169
|
+
else {
|
|
170
|
+
let newFilter: Filter = {
|
|
171
171
|
Type: evt.target.id,
|
|
172
172
|
Name: evt.detail
|
|
173
173
|
};
|
|
174
174
|
// Check if the filter already exists in the array
|
|
175
|
-
|
|
175
|
+
let filterExists = this.selectedFilters.some(filter => filter.Type === newFilter.Type && filter.Name === newFilter.Name);
|
|
176
176
|
if (!filterExists) {
|
|
177
177
|
this.selectedFilters.push(newFilter);
|
|
178
178
|
this.setDimensionOption(newFilter.Type, newFilter.Name, true);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
this.applyFilters();
|
|
182
|
-
|
|
182
|
+
}
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
removeFilter(evt
|
|
186
|
-
|
|
185
|
+
removeFilter(evt) {
|
|
186
|
+
let index = this.selectedFilters.findIndex(filter => filter.Name === evt.target.innerText);
|
|
187
187
|
this.setDimensionOption(this.selectedFilters[index].Type, this.selectedFilters[index].Name, false);
|
|
188
188
|
this.selectedFilters.splice(index, 1);
|
|
189
189
|
this.applyFilters();
|
|
@@ -205,9 +205,9 @@ export default class Explorer extends LightningElement {
|
|
|
205
205
|
try {
|
|
206
206
|
this.filteredPatterns = [...this.allPatterns];
|
|
207
207
|
this.filteredAntiPatterns = [...this.allAntiPatterns];
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
let frameworkFilters = this.selectedFilters.filter(filter => filter.Type !== 'Location' && filter.Type !== 'ProductArea');
|
|
209
|
+
let locationFilters = this.selectedFilters.filter(filter => filter.Type === 'Location');
|
|
210
|
+
let productAreaFilters = this.selectedFilters.filter(filter => filter.Type === 'ProductArea');
|
|
211
211
|
|
|
212
212
|
if (frameworkFilters.length > 0) {
|
|
213
213
|
this.filteredPatterns = this.filteredPatterns.filter(pattern =>
|
|
@@ -258,8 +258,8 @@ export default class Explorer extends LightningElement {
|
|
|
258
258
|
this.currentPageIndex = 0;
|
|
259
259
|
this.udpateSearchParams();
|
|
260
260
|
|
|
261
|
-
} catch (error
|
|
262
|
-
console.error("An error occurred applying the filters:", error
|
|
261
|
+
} catch (error) {
|
|
262
|
+
console.error("An error occurred applying the filters:", error.message);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
|
|
@@ -296,19 +296,19 @@ export default class Explorer extends LightningElement {
|
|
|
296
296
|
});
|
|
297
297
|
|
|
298
298
|
if (this._keywordFilter.length > 0 && this._keywordFilter !== '')
|
|
299
|
-
|
|
299
|
+
params.set('keywords', this._keywordFilter);
|
|
300
300
|
|
|
301
301
|
const paramsString = params.toString();
|
|
302
302
|
let updatedUrl = window.location.pathname;
|
|
303
303
|
|
|
304
304
|
if (paramsString)
|
|
305
|
-
|
|
305
|
+
updatedUrl += `?${paramsString}`;
|
|
306
306
|
|
|
307
307
|
history.replaceState(history.state, document.title, updatedUrl);
|
|
308
308
|
this.shareUrl = `${window.location.protocol}//${window.location.hostname}${updatedUrl}`;
|
|
309
309
|
|
|
310
|
-
} catch (error
|
|
311
|
-
console.error("An error occured applying the url params:", error
|
|
310
|
+
} catch (error) {
|
|
311
|
+
console.error("An error occured applying the url params:", error.message);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
|
|
@@ -423,7 +423,7 @@ export default class Explorer extends LightningElement {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
private get totalPages() {
|
|
426
|
-
|
|
426
|
+
let totPages = (this.activeTab == 'pattern') ? Math.ceil(this.filteredPatterns.length / this.pageSize) : Math.ceil(this.filteredAntiPatterns.length / this.pageSize);
|
|
427
427
|
return totPages;
|
|
428
428
|
}
|
|
429
429
|
|
|
@@ -437,16 +437,16 @@ export default class Explorer extends LightningElement {
|
|
|
437
437
|
|
|
438
438
|
//#region EXPORT FUNCTIONS
|
|
439
439
|
|
|
440
|
-
loadImage(url
|
|
440
|
+
loadImage(url) {
|
|
441
441
|
// Function to load an image and convert it to a base64 string
|
|
442
442
|
return new Promise((resolve, reject) => {
|
|
443
443
|
const img = new Image();
|
|
444
444
|
img.crossOrigin = 'Anonymous';
|
|
445
445
|
img.onload = () => {
|
|
446
|
-
|
|
446
|
+
let canvas = document.createElement('canvas');
|
|
447
447
|
canvas.width = img.width;
|
|
448
448
|
canvas.height = img.height;
|
|
449
|
-
|
|
449
|
+
let ctx = canvas.getContext('2d');
|
|
450
450
|
ctx?.drawImage(img, 0, 0);
|
|
451
451
|
resolve(canvas.toDataURL('image/png'));
|
|
452
452
|
};
|
|
@@ -469,7 +469,7 @@ export default class Explorer extends LightningElement {
|
|
|
469
469
|
|
|
470
470
|
async handlePdfClick() {
|
|
471
471
|
|
|
472
|
-
|
|
472
|
+
let fileMeta = this.getExportFileMetaData();
|
|
473
473
|
|
|
474
474
|
const margins = {
|
|
475
475
|
top: 20,
|
|
@@ -497,7 +497,7 @@ export default class Explorer extends LightningElement {
|
|
|
497
497
|
const pageWidth = doc.internal.pageSize.width;
|
|
498
498
|
const expLinkXPosition = pageWidth - expLinkWidth - margins.left;
|
|
499
499
|
|
|
500
|
-
const header = (doc
|
|
500
|
+
const header = (doc) => {
|
|
501
501
|
// Add header content, e.g., a title or an image
|
|
502
502
|
if (this.logoImageData) {
|
|
503
503
|
doc.addImage(this.logoImageData, 'png', margins.top, margins.left, 200, 19);
|
|
@@ -511,7 +511,7 @@ export default class Explorer extends LightningElement {
|
|
|
511
511
|
// get the up footer vars once
|
|
512
512
|
const pageHeight = doc.internal.pageSize.height;
|
|
513
513
|
|
|
514
|
-
const footer = (doc
|
|
514
|
+
const footer = (doc) => {
|
|
515
515
|
|
|
516
516
|
// link to the release page
|
|
517
517
|
doc.setTextColor("0070d2");
|
|
@@ -559,18 +559,18 @@ export default class Explorer extends LightningElement {
|
|
|
559
559
|
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
addHtmlToPdf(doc
|
|
562
|
+
addHtmlToPdf(doc, htmlContent, options = {}) {
|
|
563
563
|
return new Promise((resolve) => {
|
|
564
564
|
doc.html(htmlContent, {
|
|
565
565
|
...options,
|
|
566
|
-
callback: function (doc
|
|
566
|
+
callback: function (doc) {
|
|
567
567
|
resolve(doc);
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
572
|
|
|
573
|
-
makeHTMLTable(tableName
|
|
573
|
+
makeHTMLTable(tableName, tableArr) {
|
|
574
574
|
let htmlTable = `
|
|
575
575
|
<table width="100%" style="font-family:Helvetica; border-collapse: collapse;">
|
|
576
576
|
<colgroup>
|
|
@@ -587,7 +587,7 @@ export default class Explorer extends LightningElement {
|
|
|
587
587
|
</thead>
|
|
588
588
|
<tbody>`;
|
|
589
589
|
|
|
590
|
-
tableArr.forEach((pattern
|
|
590
|
+
tableArr.forEach((pattern, index) => {
|
|
591
591
|
const backgroundColor = (index % 2 === 0) ? '#fafaf9' : '#ffffff'; // Add background color to even rows
|
|
592
592
|
const description = (typeof pattern.Name === 'undefined' || pattern.Name === null || pattern.Name === '') ? pattern.Description : `${pattern.Name}<br/>${pattern.Description}`;
|
|
593
593
|
|
|
@@ -609,7 +609,7 @@ export default class Explorer extends LightningElement {
|
|
|
609
609
|
|
|
610
610
|
async handleCsvClick() {
|
|
611
611
|
|
|
612
|
-
|
|
612
|
+
let fileMeta = this.getExportFileMetaData()
|
|
613
613
|
|
|
614
614
|
if (this.activeTab == 'pattern') {
|
|
615
615
|
this.exportToCSV('What Good Looks Like,Where to Look,Learn More','Pattern,Product Area | Location,Dimension | Consideration' , this.filteredPatterns, fileMeta.fileName);
|
|
@@ -619,14 +619,14 @@ export default class Explorer extends LightningElement {
|
|
|
619
619
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
|
-
exportToCSV(headers
|
|
622
|
+
exportToCSV(headers,subheaders, patArray, filename) {
|
|
623
623
|
// Convert Array to CSV
|
|
624
624
|
const csv: String[] = [];
|
|
625
625
|
csv.push(headers); // Add headers row
|
|
626
626
|
csv.push(subheaders);
|
|
627
627
|
patArray.forEach(pattern => {
|
|
628
628
|
|
|
629
|
-
|
|
629
|
+
let row: String[] = [];
|
|
630
630
|
const description = (typeof pattern.Name === 'undefined' || pattern.Name === '') ? pattern.Description : `${pattern.Name} ${pattern.Description}`;
|
|
631
631
|
row.push(this.escapeCSVField(description));
|
|
632
632
|
row.push(this.escapeCSVField(`${pattern.ProductArea} | ${pattern.Location}`));
|
|
@@ -649,7 +649,7 @@ export default class Explorer extends LightningElement {
|
|
|
649
649
|
|
|
650
650
|
}
|
|
651
651
|
|
|
652
|
-
escapeCSVField(field
|
|
652
|
+
escapeCSVField(field) {
|
|
653
653
|
if (field.includes(',') || field.includes('"') || field.includes('\n')) {
|
|
654
654
|
// Escape double quotes
|
|
655
655
|
field = field.replace(/"/g, '""');
|
|
@@ -5,13 +5,13 @@ import { sendInteractionEvent, InteractionEventTypes } from 'shared/helpers';
|
|
|
5
5
|
import { debounce } from 'shared/debounce';
|
|
6
6
|
|
|
7
7
|
// function to get the cards array from the json payload
|
|
8
|
-
async function getGridCards(data
|
|
8
|
+
async function getGridCards(data, imageHash) {
|
|
9
9
|
const parsedData = JSON.parse(data);
|
|
10
10
|
// Sort the data based on the `sort` value
|
|
11
|
-
parsedData.sort((a
|
|
11
|
+
parsedData.sort((a, b) => a.sort - b.sort);
|
|
12
12
|
// load the gallery cards
|
|
13
|
-
return await parsedData.map((item
|
|
14
|
-
const card:
|
|
13
|
+
return await parsedData.map((item) => {
|
|
14
|
+
const card: Card = {
|
|
15
15
|
assistiveText: "Click here to go to this resource",
|
|
16
16
|
//ctaTitle: "Read More",
|
|
17
17
|
ctaTarget: null,
|
|
@@ -27,7 +27,7 @@ async function getGridCards(data: string, imageHash: string) {
|
|
|
27
27
|
card.ctaHref = item[prop];
|
|
28
28
|
break;
|
|
29
29
|
default:
|
|
30
|
-
|
|
30
|
+
card[prop] = item[prop];
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -46,17 +46,17 @@ export default class gallery extends LightningElement {
|
|
|
46
46
|
|
|
47
47
|
// get the inputs from the config
|
|
48
48
|
_content: string | null = null;
|
|
49
|
-
_filterData
|
|
50
|
-
_filterProperty
|
|
51
|
-
_filterLabel
|
|
52
|
-
_searchTitle
|
|
49
|
+
_filterData;
|
|
50
|
+
_filterProperty;
|
|
51
|
+
_filterLabel;
|
|
52
|
+
_searchTitle;
|
|
53
53
|
_imageHash: string | null = null;
|
|
54
|
-
@api containerId: string
|
|
54
|
+
@api containerId: string;
|
|
55
55
|
|
|
56
56
|
// second filter drop down is optional and pulled from the json data set
|
|
57
57
|
_showMetaFilter = false;
|
|
58
|
-
_metaFilterProperty
|
|
59
|
-
_metaFilterLabel
|
|
58
|
+
_metaFilterProperty;
|
|
59
|
+
_metaFilterLabel;
|
|
60
60
|
|
|
61
61
|
// get the inputs from the form
|
|
62
62
|
_selectFilter: string = '';
|
|
@@ -90,8 +90,8 @@ export default class gallery extends LightningElement {
|
|
|
90
90
|
const response = await fetch(this._filterData);
|
|
91
91
|
const data = await response.json();
|
|
92
92
|
this.filterOptions = data as FilterOption[];
|
|
93
|
-
} catch (error
|
|
94
|
-
console.error("An error occurred getting the filter list:", error
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error("An error occurred getting the filter list:", error.message);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -121,28 +121,28 @@ export default class gallery extends LightningElement {
|
|
|
121
121
|
|
|
122
122
|
// update the gallery based on filtering
|
|
123
123
|
async applyFilters() {
|
|
124
|
-
this.filteredCards = this.allCards.filter((card
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
this.filteredCards = this.allCards.filter((card) => {
|
|
125
|
+
let isFilterMatch = (this._selectFilter === '' || card[this._filterProperty]?.toLowerCase().includes(this._selectFilter.toLocaleLowerCase()));
|
|
126
|
+
let isMetaMatch = ((this._showMetaFilter) ? ((this._selectMetaFilter === '' || card[this._metaFilterProperty]?.toLowerCase().includes(this._selectMetaFilter.toLocaleLowerCase()))) : true);
|
|
127
|
+
let isKeywordMatch = (this._keywordFilter === ''
|
|
128
128
|
|| (card.pretitle && card.pretitle.toLowerCase().includes(this._keywordFilter.toLowerCase()))
|
|
129
129
|
|| (card.title && card.title.toLowerCase().includes(this._keywordFilter.toLowerCase()))
|
|
130
130
|
|| (card.description && card.description.toLowerCase().includes(this._keywordFilter.toLowerCase()))
|
|
131
131
|
);
|
|
132
132
|
|
|
133
133
|
if (isFilterMatch && isMetaMatch && isKeywordMatch)
|
|
134
|
-
|
|
134
|
+
return card;
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
// Update page state so that we track filters in URL params
|
|
138
138
|
const params = new URLSearchParams();
|
|
139
139
|
|
|
140
140
|
if (this._selectFilter !== '')
|
|
141
|
-
|
|
141
|
+
params.set(this._filterLabel, this._selectFilter);
|
|
142
142
|
if (this._showMetaFilter && this._selectMetaFilter !== '')
|
|
143
|
-
|
|
143
|
+
params.set(this._metaFilterLabel, this._selectMetaFilter);
|
|
144
144
|
if (this._keywordFilter !== '')
|
|
145
|
-
|
|
145
|
+
params.set('keywords', this._keywordFilter);
|
|
146
146
|
|
|
147
147
|
const paramsString = params.toString();
|
|
148
148
|
let updatedUrl = window.location.pathname;
|
|
@@ -151,9 +151,9 @@ export default class gallery extends LightningElement {
|
|
|
151
151
|
const hash = this.containerId ? `#${this.containerId}` : window.location.hash.split('?')[0];
|
|
152
152
|
|
|
153
153
|
if (hash)
|
|
154
|
-
|
|
154
|
+
updatedUrl += hash;
|
|
155
155
|
if (paramsString)
|
|
156
|
-
|
|
156
|
+
updatedUrl += `?${paramsString}`;
|
|
157
157
|
|
|
158
158
|
history.replaceState(history.state, document.title, updatedUrl);
|
|
159
159
|
this.shareUrl = `${window.location.protocol}//${window.location.hostname}${updatedUrl}`;
|
|
@@ -208,15 +208,15 @@ export default class gallery extends LightningElement {
|
|
|
208
208
|
getGridCards(this._content, this._imageHash).then((res) => {
|
|
209
209
|
this.allCards = this.filteredCards = res;
|
|
210
210
|
if (this._showMetaFilter) {
|
|
211
|
-
|
|
212
|
-
typesArr.sort((a
|
|
213
|
-
this.metaFilterOptions = typesArr.map(
|
|
211
|
+
let typesArr = [...new Set(this.allCards.map(item => item.type))];
|
|
212
|
+
typesArr.sort((a, b) => a.localeCompare(b));
|
|
213
|
+
this.metaFilterOptions = typesArr.map(type => ({ label: type, value: type })) as FilterOption[];
|
|
214
214
|
}
|
|
215
215
|
if (this.checkURLParams())
|
|
216
|
-
|
|
216
|
+
this.applyFilters();
|
|
217
217
|
});
|
|
218
|
-
} catch (error
|
|
219
|
-
console.error("An error occurred getting the cards:", error
|
|
218
|
+
} catch (error) {
|
|
219
|
+
console.error("An error occurred getting the cards:", error.message);
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -2,12 +2,12 @@ import { LightningElement, api } from 'lwc';
|
|
|
2
2
|
import { sendInteractionEvent, InteractionEventTypes } from 'shared/helpers';
|
|
3
3
|
|
|
4
4
|
export default class extends LightningElement {
|
|
5
|
-
@api title: string = '';
|
|
5
|
+
@api title: string | null = '';
|
|
6
6
|
@api url: string = window.location.href;
|
|
7
7
|
|
|
8
8
|
private get shareTwitter() {
|
|
9
9
|
return `https://twitter.com/intent/tweet/?text=${encodeURIComponent(
|
|
10
|
-
this.title
|
|
10
|
+
this.title
|
|
11
11
|
)}&url=${encodeURIComponent(this.url)}&via=SalesforceArchs`;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -22,7 +22,7 @@ export default class extends LightningElement {
|
|
|
22
22
|
this.url
|
|
23
23
|
)}`;
|
|
24
24
|
}
|
|
25
|
-
handleClick(e
|
|
25
|
+
handleClick(e){
|
|
26
26
|
sendInteractionEvent('Social Share Click', InteractionEventTypes.CLICK, e, e.currentTarget);
|
|
27
27
|
|
|
28
28
|
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { WireAdapter } from 'lwc';
|
|
2
|
-
|
|
3
|
-
export type EffectAdapterConfig = {};
|
|
4
|
-
|
|
5
|
-
export class EffectAdapter
|
|
6
|
-
implements
|
|
7
|
-
WireAdapter<EffectAdapterConfig, Record<string, any>>
|
|
8
|
-
{
|
|
9
|
-
constructor(private setValue: (value: EffectAdapterConfig) => void) {
|
|
10
|
-
// Constructor required for WireAdapter interface
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
connect() {
|
|
14
|
-
// Required by WireAdapter interface
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
disconnect() {
|
|
18
|
-
// Required by WireAdapter interface
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
update(config: EffectAdapterConfig) {
|
|
22
|
-
this.setValue(config);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -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
|
-
const 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
|
-
const cmin = Math.min(r, g, b);
|
|
22
|
-
const cmax = Math.max(r, g, b);
|
|
23
|
-
const 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
|
-
const [r, g, b] = hexToRGB(hex);
|
|
50
|
-
const [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
|
-
}
|