@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
package/package.json
CHANGED
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import { EffectAdapter } from 'common/effectAdapter';
|
|
11
11
|
|
|
12
|
-
export interface ContextWireAdapter<Value, Config
|
|
13
|
-
extends WireAdapter<Config, Context> {
|
|
12
|
+
export interface ContextWireAdapter<Value, Config, Context>
|
|
13
|
+
extends WireAdapter<Value, Config, Context> {
|
|
14
14
|
value: Value;
|
|
15
15
|
}
|
|
16
|
-
export interface ContextWireAdapterConstructor<Value, Config
|
|
16
|
+
export interface ContextWireAdapterConstructor<Value, Config, Context> {
|
|
17
17
|
new (setValue: (value: Value) => void): ContextWireAdapter<
|
|
18
18
|
Value,
|
|
19
19
|
Config,
|
|
@@ -23,7 +23,7 @@ export interface ContextWireAdapterConstructor<Value, Config extends Record<stri
|
|
|
23
23
|
setDefaultValue(value: Value): void;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export function createContextAdapter<Value, Config
|
|
26
|
+
export function createContextAdapter<Value, Config, Context>(
|
|
27
27
|
initDefaultValue: () => Value,
|
|
28
28
|
schema: Record<keyof Context, string>
|
|
29
29
|
): ContextWireAdapterConstructor<Value, Config, Context> {
|
|
@@ -86,13 +86,25 @@ export function createContextAdapter<Value, Config extends Record<string, any>,
|
|
|
86
86
|
function compactConfig<T>(config?: T) {
|
|
87
87
|
return Object.fromEntries(
|
|
88
88
|
Object.entries({ ...config }).filter(
|
|
89
|
-
([, value]) => typeof value !== 'undefined' && value !== null
|
|
89
|
+
([key, value]) => typeof value !== 'undefined' && value !== null
|
|
90
90
|
)
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
export function createBaseContextProviderElement<Value, Config, Context>(
|
|
95
|
+
adapterClass: ContextWireAdapterConstructor<Value, Config, Context>
|
|
96
|
+
) {
|
|
97
|
+
const contextualizer = createContextProvider(adapterClass);
|
|
98
|
+
|
|
99
|
+
return class ProviderElement extends BaseProvider<Context> {
|
|
100
|
+
public get contextualizer() {
|
|
101
|
+
return contextualizer;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
class BaseProvider<Context> extends LightningElement {
|
|
107
|
+
private consumers = new Set<ContextConsumer<Context>>();
|
|
96
108
|
|
|
97
109
|
public get contextualizer(): Contextualizer<Context> {
|
|
98
110
|
throw new Error('contextualizer not implenented');
|
|
@@ -101,8 +113,8 @@ class BaseProvider<Context extends Record<string, any>> extends LightningElement
|
|
|
101
113
|
@wire(EffectAdapter, {
|
|
102
114
|
localContext: '$localContext'
|
|
103
115
|
})
|
|
104
|
-
|
|
105
|
-
for (
|
|
116
|
+
private updateConsumers({ localContext }: { localContext: Context }) {
|
|
117
|
+
for (let consumer of this.consumers) {
|
|
106
118
|
consumer.provide(localContext);
|
|
107
119
|
}
|
|
108
120
|
}
|
|
@@ -123,15 +135,3 @@ class BaseProvider<Context extends Record<string, any>> extends LightningElement
|
|
|
123
135
|
});
|
|
124
136
|
}
|
|
125
137
|
}
|
|
126
|
-
|
|
127
|
-
export function createBaseContextProviderElement<Value, Config extends Record<string, any>, Context extends Record<string, any>>(
|
|
128
|
-
adapterClass: ContextWireAdapterConstructor<Value, Config, Context>
|
|
129
|
-
) {
|
|
130
|
-
const contextualizer = createContextProvider(adapterClass as any);
|
|
131
|
-
|
|
132
|
-
return class ProviderElement extends BaseProvider<Context> {
|
|
133
|
-
public get contextualizer() {
|
|
134
|
-
return contextualizer as Contextualizer<Context>;
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
}
|
|
@@ -2,10 +2,10 @@ import { EffectAdapter } from '../effectAdapter';
|
|
|
2
2
|
|
|
3
3
|
describe('EffectAdapter', () => {
|
|
4
4
|
it('calls the handler', async () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
let value = Symbol();
|
|
6
|
+
let setValue = jest.fn();
|
|
7
|
+
let adapter = new EffectAdapter(setValue);
|
|
8
|
+
let config = { value: value };
|
|
9
9
|
adapter.update(config);
|
|
10
10
|
expect(setValue).toHaveBeenCalledWith(config);
|
|
11
11
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WireAdapter } from 'lwc';
|
|
2
|
+
|
|
3
|
+
export type EffectAdapterConfig<T> = {};
|
|
4
|
+
|
|
5
|
+
export class EffectAdapter<T>
|
|
6
|
+
implements
|
|
7
|
+
WireAdapter<EffectAdapterConfig<T>, EffectAdapterConfig<T>, void>
|
|
8
|
+
{
|
|
9
|
+
constructor(private setValue: (value: EffectAdapterConfig<T>) => void) {}
|
|
10
|
+
|
|
11
|
+
connect() {}
|
|
12
|
+
|
|
13
|
+
disconnect() {}
|
|
14
|
+
|
|
15
|
+
update(config: EffectAdapterConfig<T>) {
|
|
16
|
+
this.setValue(config);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -16,7 +16,7 @@ describe('reflected-element', () => {
|
|
|
16
16
|
|
|
17
17
|
// Skip these snapshot tests as LWC slot content doesn't render consistently in tests
|
|
18
18
|
it.skip('reflects the innerHTML', async () => {
|
|
19
|
-
|
|
19
|
+
let element = renderIntoBody(
|
|
20
20
|
html`
|
|
21
21
|
<test-select>
|
|
22
22
|
<option value="a">A</option>
|
|
@@ -31,7 +31,7 @@ describe('reflected-element', () => {
|
|
|
31
31
|
}, 10000);
|
|
32
32
|
|
|
33
33
|
it.skip('transforms the innerHTML', async () => {
|
|
34
|
-
|
|
34
|
+
let element = renderIntoBody(
|
|
35
35
|
html`
|
|
36
36
|
<test-select-transform>
|
|
37
37
|
<option value="a">A</option>
|
|
@@ -46,14 +46,14 @@ describe('reflected-element', () => {
|
|
|
46
46
|
}, 10000);
|
|
47
47
|
|
|
48
48
|
it('renders components with reflected innerHTML', async () => {
|
|
49
|
-
|
|
49
|
+
let element = renderIntoBody(html`<test-select></test-select>`);
|
|
50
50
|
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
51
51
|
expect(element).toBeTruthy();
|
|
52
52
|
expect(element.shadowRoot!.querySelector('select')).toBeTruthy();
|
|
53
53
|
}, 10000);
|
|
54
54
|
|
|
55
55
|
it('calls innerHTMLSetCallback', async () => {
|
|
56
|
-
|
|
56
|
+
let element = renderIntoBody(
|
|
57
57
|
html`
|
|
58
58
|
<test-select-transform>
|
|
59
59
|
<option value="a">A</option>
|
|
@@ -70,6 +70,6 @@ describe('reflected-element', () => {
|
|
|
70
70
|
// Due to LWC slot limitations, the count might be 1 or 4
|
|
71
71
|
// Just verify the callback was called (count attribute exists)
|
|
72
72
|
expect(select).toHaveAttribute('data-count');
|
|
73
|
-
expect(parseInt(count
|
|
73
|
+
expect(parseInt(count!)).toBeGreaterThan(0);
|
|
74
74
|
}, 10000);
|
|
75
75
|
});
|
|
@@ -15,7 +15,7 @@ export class ReflectedElement extends LightningElement {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
connectedCallback() {
|
|
18
|
-
this.observer = new MutationObserver(() => {
|
|
18
|
+
this.observer = new MutationObserver((e) => {
|
|
19
19
|
this.setContent();
|
|
20
20
|
});
|
|
21
21
|
this.observer.observe(this.template.host, {
|
|
@@ -35,13 +35,13 @@ customElements.define(
|
|
|
35
35
|
describe('isSlotAssigned', () => {
|
|
36
36
|
describe('false', () => {
|
|
37
37
|
it('test-a', () => {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
let element = renderIntoBody(html` <test-a></test-a> `);
|
|
39
|
+
let slot = element.shadowRoot!.querySelector('slot')!;
|
|
40
40
|
expect(isSlotAssigned(slot)).toBe(false);
|
|
41
41
|
});
|
|
42
42
|
it('test-b', () => {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
let element = renderIntoBody(html` <test-a></test-a> `);
|
|
44
|
+
let slot = element
|
|
45
45
|
.shadowRoot!.querySelector('test-b')!
|
|
46
46
|
.shadowRoot!.querySelector('slot')!;
|
|
47
47
|
expect(isSlotAssigned(slot)).toBe(false);
|
|
@@ -49,21 +49,21 @@ describe('isSlotAssigned', () => {
|
|
|
49
49
|
});
|
|
50
50
|
describe('true', () => {
|
|
51
51
|
it('test-a', () => {
|
|
52
|
-
|
|
52
|
+
let element = renderIntoBody(html`
|
|
53
53
|
<test-a>
|
|
54
54
|
<h1>Hello</h1>
|
|
55
55
|
</test-a>
|
|
56
56
|
`);
|
|
57
|
-
|
|
57
|
+
let slot = element.shadowRoot!.querySelector('slot')!;
|
|
58
58
|
expect(isSlotAssigned(slot)).toBe(true);
|
|
59
59
|
});
|
|
60
60
|
it('test-b', () => {
|
|
61
|
-
|
|
61
|
+
let element = renderIntoBody(html`
|
|
62
62
|
<test-a>
|
|
63
63
|
<h1>Hello</h1>
|
|
64
64
|
</test-a>
|
|
65
65
|
`);
|
|
66
|
-
|
|
66
|
+
let slot = element
|
|
67
67
|
.shadowRoot!.querySelector('test-b')!
|
|
68
68
|
.shadowRoot!.querySelector('slot')!;
|
|
69
69
|
expect(isSlotAssigned(slot)).toBe(true);
|
|
@@ -73,23 +73,23 @@ describe('isSlotAssigned', () => {
|
|
|
73
73
|
|
|
74
74
|
describe('assignedSlotNames', () => {
|
|
75
75
|
it('test-a', () => {
|
|
76
|
-
|
|
76
|
+
let element = renderIntoBody(html`
|
|
77
77
|
<test-a>
|
|
78
78
|
<h1>Hello</h1>
|
|
79
79
|
<header slot="header"></header>
|
|
80
80
|
</test-a>
|
|
81
81
|
`);
|
|
82
|
-
|
|
82
|
+
let shadowRoot = element.shadowRoot!;
|
|
83
83
|
expect(assignedSlotNames(shadowRoot)).toEqual(['default', 'header']);
|
|
84
84
|
});
|
|
85
85
|
it('test-b', () => {
|
|
86
|
-
|
|
86
|
+
let element = renderIntoBody(html`
|
|
87
87
|
<test-a>
|
|
88
88
|
<h1>Hello</h1>
|
|
89
89
|
<header slot="header"></header>
|
|
90
90
|
</test-a>
|
|
91
91
|
`);
|
|
92
|
-
|
|
92
|
+
let shadowRoot =
|
|
93
93
|
element.shadowRoot!.querySelector('test-b')!.shadowRoot!;
|
|
94
94
|
expect(assignedSlotNames(shadowRoot)).toEqual(['default', 'header']);
|
|
95
95
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function assignedSlotNames(template: {
|
|
2
2
|
querySelectorAll(selector: string): NodeList;
|
|
3
3
|
}) {
|
|
4
|
-
|
|
4
|
+
let slots = Array.from(
|
|
5
5
|
template.querySelectorAll('slot')
|
|
6
6
|
) as HTMLSlotElement[];
|
|
7
7
|
return slots
|
|
@@ -10,11 +10,10 @@ export function assignedSlotNames(template: {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function isSlotAssigned(slot: HTMLSlotElement): boolean {
|
|
13
|
-
|
|
13
|
+
let [element] = slot.assignedElements();
|
|
14
14
|
if (element) {
|
|
15
|
-
if (element.tagName === 'SLOT')
|
|
15
|
+
if (element.tagName === 'SLOT')
|
|
16
16
|
return isSlotAssigned(element as HTMLSlotElement);
|
|
17
|
-
}
|
|
18
17
|
return true;
|
|
19
18
|
}
|
|
20
19
|
return slot.children.length > 0;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { LightningElement, api, track } from 'lwc';
|
|
2
|
-
import { ProductArea,
|
|
2
|
+
import { ProductArea, FeatureArea } from './types';
|
|
3
|
+
import { RoadmapFeature } from '../roadmap/types'
|
|
3
4
|
|
|
4
5
|
export default class coverage extends LightningElement {
|
|
5
6
|
|
|
6
7
|
// get the inputs from the config
|
|
7
|
-
_portfolio
|
|
8
|
-
_covered
|
|
9
|
-
_selected
|
|
8
|
+
_portfolio;
|
|
9
|
+
_covered;
|
|
10
|
+
_selected;
|
|
10
11
|
|
|
11
12
|
// hold the coverage data
|
|
12
13
|
portfolioData: ProductArea[] = [];
|
|
13
14
|
roadmapData: RoadmapFeature[] = [];
|
|
14
|
-
totalProductAreas
|
|
15
|
-
totalFeatureAreas
|
|
15
|
+
totalProductAreas;
|
|
16
|
+
totalFeatureAreas;
|
|
16
17
|
paCoverageCount: number = 0;
|
|
17
18
|
faCoverageCount: number = 0;
|
|
18
19
|
paCoveragePct: number = 0;
|
|
@@ -22,10 +23,10 @@ export default class coverage extends LightningElement {
|
|
|
22
23
|
scriptLoaded = false;
|
|
23
24
|
|
|
24
25
|
// holds the chartjs components
|
|
25
|
-
donutChart
|
|
26
|
-
barChart
|
|
27
|
-
@track productAreaTitle
|
|
28
|
-
@track featureAreaTitle
|
|
26
|
+
donutChart;
|
|
27
|
+
barChart;
|
|
28
|
+
@track productAreaTitle;
|
|
29
|
+
@track featureAreaTitle;
|
|
29
30
|
|
|
30
31
|
// chart settings
|
|
31
32
|
xlightCloudBlue: string = '#eaf5fe';
|
|
@@ -33,7 +34,11 @@ export default class coverage extends LightningElement {
|
|
|
33
34
|
medCloudBlue: string = '#0d9dda';
|
|
34
35
|
inactiveBg: string = '#dbdbdb';
|
|
35
36
|
inactiveHover: string = '#d3d3d3';
|
|
36
|
-
selectedPA: ProductArea
|
|
37
|
+
selectedPA: ProductArea;
|
|
38
|
+
|
|
39
|
+
constructor() {
|
|
40
|
+
super();
|
|
41
|
+
}
|
|
37
42
|
|
|
38
43
|
/// this function fires when a component is inserted into the DOM
|
|
39
44
|
/// we use this function to collect initial data and set up the page:
|
|
@@ -41,7 +46,7 @@ export default class coverage extends LightningElement {
|
|
|
41
46
|
/// gets roadmap feature data
|
|
42
47
|
/// adds the chartjs library
|
|
43
48
|
async connectedCallback() {
|
|
44
|
-
|
|
49
|
+
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
setupCharts() {
|
|
@@ -58,11 +63,11 @@ export default class coverage extends LightningElement {
|
|
|
58
63
|
}, 0);
|
|
59
64
|
|
|
60
65
|
// now update the coverage values in the portfolio data
|
|
61
|
-
this.paCoverageCount = this.portfolioData.filter(pa => pa.covered
|
|
66
|
+
this.paCoverageCount = this.portfolioData.filter(pa => pa.covered == true).length;
|
|
62
67
|
this.paCoveragePct = this.paCoverageCount / this.totalProductAreas * 100;
|
|
63
68
|
|
|
64
69
|
// add the chartsjs library to the dom
|
|
65
|
-
|
|
70
|
+
var script = document.createElement('script');
|
|
66
71
|
script.src = 'https://cdn.jsdelivr.net/npm/chart.js';
|
|
67
72
|
document.head.appendChild(script);
|
|
68
73
|
script.onload = () => {
|
|
@@ -73,8 +78,8 @@ export default class coverage extends LightningElement {
|
|
|
73
78
|
this.updateSelectedProductArea(this.donutChart);
|
|
74
79
|
};
|
|
75
80
|
|
|
76
|
-
} catch (error
|
|
77
|
-
console.error("An error occurred getting the portfolio data:", error
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.error("An error occurred getting the portfolio data:", error.message);
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
85
|
}
|
|
@@ -129,10 +134,10 @@ export default class coverage extends LightningElement {
|
|
|
129
134
|
display: false
|
|
130
135
|
},
|
|
131
136
|
callbacks: {
|
|
132
|
-
title: function(context
|
|
137
|
+
title: function(context) {
|
|
133
138
|
return context.label;
|
|
134
139
|
},
|
|
135
|
-
label: function(
|
|
140
|
+
label: function(context) {
|
|
136
141
|
return '';
|
|
137
142
|
}
|
|
138
143
|
}
|
|
@@ -150,17 +155,17 @@ export default class coverage extends LightningElement {
|
|
|
150
155
|
// Create the Donut chart
|
|
151
156
|
const chartCanvas = this.template.querySelector("#chartCanvas") as HTMLCanvasElement;
|
|
152
157
|
if (chartCanvas) {
|
|
153
|
-
this.donutChart = new
|
|
158
|
+
this.donutChart = new Chart(chartCanvas, configDonut);
|
|
154
159
|
}
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
// set up the plugin to place the % at the center of the donut
|
|
158
163
|
registerCenterLabelPlugin() {
|
|
159
|
-
|
|
164
|
+
Chart.register({
|
|
160
165
|
id: 'center-label',
|
|
161
|
-
afterDatasetsDraw: function(chart
|
|
162
|
-
if (chart.config.type
|
|
163
|
-
|
|
166
|
+
afterDatasetsDraw: function(chart) {
|
|
167
|
+
if (chart.config.type == 'doughnut') {
|
|
168
|
+
var text = chart.config.options.plugins.title.text;
|
|
164
169
|
const ctx = chart.ctx;
|
|
165
170
|
ctx.save();
|
|
166
171
|
const x = chart.getDatasetMeta(0).data[0].x;
|
|
@@ -187,17 +192,14 @@ export default class coverage extends LightningElement {
|
|
|
187
192
|
|
|
188
193
|
// build the datasets for the bar chart when one Prod Area is selected
|
|
189
194
|
getFeatureAreaChartForSelectedProductArea() {
|
|
190
|
-
if (!this.selectedPA) {
|
|
191
|
-
return this.getFeatureAreaChartForEntirePortfolio();
|
|
192
|
-
}
|
|
193
195
|
|
|
194
|
-
|
|
196
|
+
let dataVal = 100/this.selectedPA.feature_areas.length;
|
|
195
197
|
return {
|
|
196
198
|
labels: [`${this.selectedPA.feature_areas_covered} of ${this.selectedPA.feature_areas.length}`],
|
|
197
199
|
datasets: this.selectedPA.feature_areas.map(fa => ({
|
|
198
200
|
data: [dataVal],
|
|
199
201
|
label: fa.name,
|
|
200
|
-
backgroundColor: (fa.covered) ? this.selectedPA
|
|
202
|
+
backgroundColor: (fa.covered) ? this.selectedPA.colors.light : this.inactiveBg,
|
|
201
203
|
borderWidth: 2,
|
|
202
204
|
borderColor: 'white'
|
|
203
205
|
}))
|
|
@@ -221,7 +223,7 @@ export default class coverage extends LightningElement {
|
|
|
221
223
|
ticks: {
|
|
222
224
|
// forces step size to be 50 units
|
|
223
225
|
stepSize: 25,
|
|
224
|
-
callback: function (value
|
|
226
|
+
callback: function (value) {
|
|
225
227
|
return value + '%'; // Appending '%' to the tick value
|
|
226
228
|
}
|
|
227
229
|
}
|
|
@@ -254,19 +256,19 @@ export default class coverage extends LightningElement {
|
|
|
254
256
|
display: false
|
|
255
257
|
},
|
|
256
258
|
callbacks: {
|
|
257
|
-
title: function(context
|
|
259
|
+
title: function(context) {
|
|
258
260
|
if (context[0].label.includes(' of ')){
|
|
259
261
|
return context[0].dataset.label;
|
|
260
|
-
}
|
|
262
|
+
} else {
|
|
261
263
|
return context.label;
|
|
262
|
-
|
|
264
|
+
}
|
|
263
265
|
},
|
|
264
|
-
label: function(context
|
|
266
|
+
label: function(context) {
|
|
265
267
|
if (context.dataset.label) {
|
|
266
268
|
return '';
|
|
267
|
-
}
|
|
269
|
+
} else {
|
|
268
270
|
return `${context.formattedValue}%`;
|
|
269
|
-
|
|
271
|
+
}
|
|
270
272
|
}
|
|
271
273
|
}
|
|
272
274
|
}
|
|
@@ -283,13 +285,13 @@ export default class coverage extends LightningElement {
|
|
|
283
285
|
const barCanvas = this.template.querySelector("#barCanvas") as HTMLCanvasElement;
|
|
284
286
|
if (barCanvas) {
|
|
285
287
|
this.featureAreaTitle = `${this.faCoveragePct.toFixed(0)}% of all feature areas are in this roadmap`;
|
|
286
|
-
this.barChart = new
|
|
288
|
+
this.barChart = new Chart(barCanvas, configBar);
|
|
287
289
|
}
|
|
288
290
|
|
|
289
291
|
}
|
|
290
292
|
|
|
291
293
|
// handle product area selection change event
|
|
292
|
-
updateSelectedProductArea(chart
|
|
294
|
+
updateSelectedProductArea(chart) {
|
|
293
295
|
|
|
294
296
|
// reset the Donut chart
|
|
295
297
|
if (chart.getActiveElements().length > 0) {
|
|
@@ -303,12 +305,12 @@ export default class coverage extends LightningElement {
|
|
|
303
305
|
selectedIndex = chart.config.data.labels.indexOf(this._selected) as number;
|
|
304
306
|
|
|
305
307
|
// check if there is a selection
|
|
306
|
-
if (selectedIndex
|
|
308
|
+
if (selectedIndex != -1) {
|
|
307
309
|
// hide the center value
|
|
308
310
|
chart.config.options.plugins.title.text = '';
|
|
309
311
|
|
|
310
312
|
// now lets set the active settings on the selected prod area
|
|
311
|
-
this.selectedPA = this.portfolioData.find(area => area.name === this._selected);
|
|
313
|
+
this.selectedPA = this.portfolioData.find(area => area.name === this._selected) as ProductArea;
|
|
312
314
|
if (this.selectedPA) {
|
|
313
315
|
|
|
314
316
|
// update the non active items
|
|
@@ -344,7 +346,7 @@ export default class coverage extends LightningElement {
|
|
|
344
346
|
}
|
|
345
347
|
|
|
346
348
|
// update the bar chart when product area selection changes
|
|
347
|
-
updateSelectedFeatureArea(chart
|
|
349
|
+
updateSelectedFeatureArea(chart) {
|
|
348
350
|
|
|
349
351
|
// reset the chart
|
|
350
352
|
if (chart.getActiveElements().length > 0) {
|
|
@@ -353,7 +355,7 @@ export default class coverage extends LightningElement {
|
|
|
353
355
|
}
|
|
354
356
|
|
|
355
357
|
// check if there is a product area selected
|
|
356
|
-
if (this.selectedPA && this._selected
|
|
358
|
+
if (this.selectedPA && this._selected != '') {
|
|
357
359
|
chart.config.data = this.getFeatureAreaChartForSelectedProductArea();
|
|
358
360
|
} else {
|
|
359
361
|
chart.config.data = this.getFeatureAreaChartForEntirePortfolio();
|
|
@@ -366,7 +368,7 @@ export default class coverage extends LightningElement {
|
|
|
366
368
|
|
|
367
369
|
/// Below is the getters and setters for inputs
|
|
368
370
|
@api
|
|
369
|
-
set portfolio(value
|
|
371
|
+
set portfolio(value) {
|
|
370
372
|
if(this._portfolio !== value && value.length > 0) {
|
|
371
373
|
this._portfolio = [...value];
|
|
372
374
|
this.setupCharts();
|
|
@@ -377,7 +379,7 @@ export default class coverage extends LightningElement {
|
|
|
377
379
|
}
|
|
378
380
|
|
|
379
381
|
@api
|
|
380
|
-
set covered(value
|
|
382
|
+
set covered(value) {
|
|
381
383
|
if(this._covered !== value && value.length > 0) {
|
|
382
384
|
this._covered = [...value];
|
|
383
385
|
this.setupCharts();
|
|
@@ -388,7 +390,7 @@ export default class coverage extends LightningElement {
|
|
|
388
390
|
}
|
|
389
391
|
|
|
390
392
|
@api
|
|
391
|
-
set selected(value
|
|
393
|
+
set selected(value) {
|
|
392
394
|
if(this._selected !== value) {
|
|
393
395
|
this._selected = value;
|
|
394
396
|
if (this.scriptLoaded) {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
export type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export type ProductArea = {
|
|
2
|
+
name: string;
|
|
3
|
+
colors: Colors;
|
|
4
|
+
covered: boolean;
|
|
5
|
+
feature_areas_covered: number;
|
|
6
|
+
feature_area_coverage: number;
|
|
7
|
+
feature_areas: FeatureArea[];
|
|
8
|
+
};
|
|
5
9
|
|
|
6
10
|
export type FeatureArea = {
|
|
7
11
|
name: string;
|
|
@@ -12,15 +16,7 @@ export type FeatureArea = {
|
|
|
12
16
|
features: string[];
|
|
13
17
|
}
|
|
14
18
|
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
feature_areas_covered: number;
|
|
20
|
-
feature_area_coverage: number;
|
|
21
|
-
feature_areas: FeatureArea[];
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type RoadmapFeature = {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
};
|
|
19
|
+
export type Colors = {
|
|
20
|
+
xlight: string;
|
|
21
|
+
light: string;
|
|
22
|
+
}
|