@digigov/ui 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -1
- package/api/index.spec.js +112 -212
- package/app/App.js +6 -8
- package/app/Header/HeaderLogo.js +19 -39
- package/app/Header/HeaderSection.js +6 -43
- package/app/Header/HeaderTitle.js +14 -91
- package/app/Header/index.js +20 -67
- package/app/Header/index.spec.js +0 -1
- package/app/PageTitle.js +45 -81
- package/core/Accordion/index.js +103 -57
- package/core/Blockquote/index.js +17 -47
- package/core/Button/BackButton.js +20 -42
- package/core/Button/ButtonLink.js +28 -0
- package/core/Button/CallToAction.js +21 -12
- package/core/Button/Icon.js +5 -47
- package/core/Button/index.js +49 -99
- package/core/Details/index.js +22 -70
- package/core/Divider/index.js +9 -9
- package/core/ErrorSummary/index.js +8 -28
- package/core/List/List.js +8 -34
- package/core/List/ListItem.js +8 -38
- package/core/List/ListItemTitle.js +1 -3
- package/core/NavList/NavListItem.js +2 -2
- package/core/NotificationBanner/index.js +49 -48
- package/core/NotificationBanner/index.spec.js +3 -1
- package/core/ServiceBadge/index.js +17 -28
- package/core/SummaryList/index.js +57 -124
- package/core/Tabs/index.js +65 -98
- package/core/WarningText/index.js +8 -41
- package/es/api/index.spec.js +112 -209
- package/es/app/App.js +6 -8
- package/es/app/Header/HeaderLogo.js +15 -30
- package/es/app/Header/HeaderSection.js +5 -36
- package/es/app/Header/HeaderTitle.js +13 -78
- package/es/app/Header/index.js +6 -56
- package/es/app/Header/index.spec.js +0 -1
- package/es/app/PageTitle.js +46 -74
- package/es/core/Accordion/index.js +64 -52
- package/es/core/Blockquote/index.js +13 -39
- package/es/core/Button/BackButton.js +18 -36
- package/es/core/Button/ButtonLink.js +16 -0
- package/es/core/Button/CallToAction.js +19 -9
- package/es/core/Button/Icon.js +5 -35
- package/es/core/Button/index.js +26 -87
- package/es/core/Details/index.js +5 -62
- package/es/core/Divider/index.js +7 -6
- package/es/core/ErrorSummary/index.js +2 -21
- package/es/core/List/List.js +2 -26
- package/es/core/List/ListItem.js +2 -30
- package/es/core/List/ListItemTitle.js +1 -3
- package/es/core/NavList/NavListItem.js +1 -1
- package/es/core/NotificationBanner/index.js +27 -45
- package/es/core/NotificationBanner/index.spec.js +3 -1
- package/es/core/ServiceBadge/index.js +15 -25
- package/es/core/SummaryList/index.js +7 -119
- package/es/core/Tabs/index.js +33 -93
- package/es/core/WarningText/index.js +2 -33
- package/es/govgr/Footer/Copyright.js +14 -36
- package/es/govgr/Footer/HellenicRepublicLogo.js +2 -30
- package/es/govgr/Footer/LicenseCCSA.js +2 -17
- package/es/govgr/Footer/index.js +23 -69
- package/es/govgr/Logo/index.js +2 -14
- package/es/hooks/useTogglableSections.js +96 -0
- package/es/layouts/Basic/Bottom/index.js +3 -13
- package/es/layouts/Basic/Content/index.js +14 -51
- package/es/layouts/Basic/Content/index.mdx +1 -1
- package/es/layouts/Basic/Main/index.js +3 -21
- package/es/layouts/Basic/Masthead/index.js +4 -47
- package/es/layouts/Basic/Masthead/index.mdx +1 -1
- package/es/layouts/Basic/Side/index.js +6 -28
- package/es/layouts/Basic/Top/index.js +7 -36
- package/es/layouts/Basic/index.js +3 -49
- package/es/themes/grnet.js +1 -1
- package/es/typography/Caption.js +5 -21
- package/es/typography/NormalText.js +2 -10
- package/es/typography/Paragraph.js +1 -29
- package/es/typography/Title.js +40 -87
- package/es/utils/withDeprecation.js +93 -0
- package/esm/api/index.spec.js +112 -209
- package/esm/app/App.js +6 -8
- package/esm/app/Header/HeaderLogo.js +15 -30
- package/esm/app/Header/HeaderSection.js +5 -36
- package/esm/app/Header/HeaderTitle.js +13 -78
- package/esm/app/Header/index.js +6 -56
- package/esm/app/Header/index.spec.js +0 -1
- package/esm/app/PageTitle.js +46 -74
- package/esm/core/Accordion/index.js +64 -52
- package/esm/core/Blockquote/index.js +13 -39
- package/esm/core/Button/BackButton.js +18 -36
- package/esm/core/Button/ButtonLink.js +16 -0
- package/esm/core/Button/CallToAction.js +19 -9
- package/esm/core/Button/Icon.js +5 -35
- package/esm/core/Button/index.js +26 -87
- package/esm/core/Details/index.js +5 -62
- package/esm/core/Divider/index.js +7 -6
- package/esm/core/ErrorSummary/index.js +2 -21
- package/esm/core/List/List.js +2 -26
- package/esm/core/List/ListItem.js +2 -30
- package/esm/core/List/ListItemTitle.js +1 -3
- package/esm/core/NavList/NavListItem.js +1 -1
- package/esm/core/NotificationBanner/index.js +27 -45
- package/esm/core/NotificationBanner/index.spec.js +3 -1
- package/esm/core/ServiceBadge/index.js +15 -25
- package/esm/core/SummaryList/index.js +7 -119
- package/esm/core/Tabs/index.js +33 -93
- package/esm/core/WarningText/index.js +2 -33
- package/esm/govgr/Footer/Copyright.js +14 -36
- package/esm/govgr/Footer/HellenicRepublicLogo.js +2 -30
- package/esm/govgr/Footer/LicenseCCSA.js +2 -17
- package/esm/govgr/Footer/index.js +23 -69
- package/esm/govgr/Logo/index.js +2 -14
- package/esm/hooks/useTogglableSections.js +96 -0
- package/esm/index.js +1 -1
- package/esm/layouts/Basic/Bottom/index.js +3 -13
- package/esm/layouts/Basic/Content/index.js +14 -51
- package/esm/layouts/Basic/Content/index.mdx +1 -1
- package/esm/layouts/Basic/Main/index.js +3 -21
- package/esm/layouts/Basic/Masthead/index.js +4 -47
- package/esm/layouts/Basic/Masthead/index.mdx +1 -1
- package/esm/layouts/Basic/Side/index.js +6 -28
- package/esm/layouts/Basic/Top/index.js +7 -36
- package/esm/layouts/Basic/index.js +3 -49
- package/esm/themes/grnet.js +1 -1
- package/esm/typography/Caption.js +5 -21
- package/esm/typography/NormalText.js +2 -10
- package/esm/typography/Paragraph.js +1 -29
- package/esm/typography/Title.js +40 -87
- package/esm/utils/withDeprecation.js +93 -0
- package/govgr/Footer/Copyright.js +15 -42
- package/govgr/Footer/HellenicRepublicLogo.js +8 -39
- package/govgr/Footer/LicenseCCSA.js +2 -19
- package/govgr/Footer/index.js +23 -72
- package/govgr/Logo/index.js +9 -28
- package/hooks/useTogglableSections.js +108 -0
- package/layouts/Basic/Bottom/index.js +10 -19
- package/layouts/Basic/Content/index.js +17 -68
- package/layouts/Basic/Content/index.mdx +1 -1
- package/layouts/Basic/Main/index.js +10 -23
- package/layouts/Basic/Masthead/index.js +17 -54
- package/layouts/Basic/Masthead/index.mdx +1 -1
- package/layouts/Basic/Side/index.js +9 -35
- package/layouts/Basic/Top/index.js +7 -40
- package/layouts/Basic/index.js +4 -57
- package/{api → libs/ui/src/api}/APIErrors.d.ts +0 -0
- package/{api → libs/ui/src/api}/APIProvider.d.ts +0 -0
- package/{api → libs/ui/src/api}/fetchAPI.d.ts +0 -0
- package/{api → libs/ui/src/api}/index.d.ts +0 -0
- package/{api → libs/ui/src/api}/index.spec.d.ts +0 -0
- package/{api → libs/ui/src/api}/useResource.d.ts +0 -0
- package/{api → libs/ui/src/api}/useResourceAction.d.ts +0 -0
- package/{api → libs/ui/src/api}/useResourceQuery.d.ts +0 -0
- package/{api → libs/ui/src/api}/utils.d.ts +0 -0
- package/{app → libs/ui/src/app}/App.d.ts +0 -0
- package/libs/ui/src/app/Header/HeaderLogo.d.ts +3 -0
- package/libs/ui/src/app/Header/HeaderSection.d.ts +5 -0
- package/libs/ui/src/app/Header/HeaderTitle.d.ts +5 -0
- package/libs/ui/src/app/Header/index.d.ts +9 -0
- package/{app → libs/ui/src/app}/Header/index.spec.d.ts +0 -0
- package/{app → libs/ui/src/app}/NotFound/index.d.ts +0 -0
- package/{app → libs/ui/src/app}/OutdatedBrowserBanner.d.ts +0 -0
- package/libs/ui/src/app/PageTitle.d.ts +10 -0
- package/{app → libs/ui/src/app}/QrCodeScanner/index.d.ts +0 -0
- package/{app → libs/ui/src/app}/QrCodeScanner/index.spec.d.ts +0 -0
- package/{app → libs/ui/src/app}/i18n.d.ts +0 -0
- package/{app → libs/ui/src/app}/index.d.ts +0 -0
- package/libs/ui/src/core/Accordion/index.d.ts +21 -0
- package/{core → libs/ui/src/core}/Accordion/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Blockquote/index.d.ts +3 -0
- package/{core → libs/ui/src/core}/Blockquote/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Button/BackButton.d.ts +3 -0
- package/libs/ui/src/core/Button/ButtonLink.d.ts +4 -0
- package/libs/ui/src/core/Button/CallToAction.d.ts +7 -0
- package/libs/ui/src/core/Button/Icon.d.ts +2 -0
- package/libs/ui/src/core/Button/index.d.ts +14 -0
- package/{core → libs/ui/src/core}/Button/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Details/index.d.ts +5 -0
- package/{core → libs/ui/src/core}/Details/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Divider/index.d.ts +5 -0
- package/libs/ui/src/core/ErrorSummary/index.d.ts +3 -0
- package/{core → libs/ui/src/core}/ErrorSummary/index.spec.d.ts +0 -0
- package/{core → libs/ui/src/core}/Link/index.d.ts +0 -0
- package/{core → libs/ui/src/core}/Link/index.spec.d.ts +0 -0
- package/libs/ui/src/core/List/List.d.ts +3 -0
- package/libs/ui/src/core/List/ListItem.d.ts +3 -0
- package/{core → libs/ui/src/core}/List/ListItemContent.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/ListItemIcon.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/ListItemText.d.ts +1 -0
- package/{core → libs/ui/src/core}/List/ListItemTitle.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/index.d.ts +0 -0
- package/{core → libs/ui/src/core}/List/index.spec.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/NavList.d.ts +1 -1
- package/{core → libs/ui/src/core}/NavList/NavListContext.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/NavListItem.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/NavListItemBase.d.ts +1 -1
- package/{core → libs/ui/src/core}/NavList/NavListSubMenu.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/index.d.ts +0 -0
- package/{core → libs/ui/src/core}/NavList/index.spec.d.ts +0 -0
- package/libs/ui/src/core/NotificationBanner/index.d.ts +17 -0
- package/{core → libs/ui/src/core}/NotificationBanner/index.spec.d.ts +0 -0
- package/libs/ui/src/core/ServiceBadge/index.d.ts +8 -0
- package/libs/ui/src/core/SummaryList/index.d.ts +7 -0
- package/{core → libs/ui/src/core}/SummaryList/index.spec.d.ts +0 -0
- package/libs/ui/src/core/Tabs/index.d.ts +16 -0
- package/libs/ui/src/core/WarningText/index.d.ts +3 -0
- package/{core → libs/ui/src/core}/WarningText/index.spec.d.ts +0 -0
- package/{core → libs/ui/src/core}/index.d.ts +0 -0
- package/{govgr → libs/ui/src/govgr}/Footer/Copyright.d.ts +1 -1
- package/libs/ui/src/govgr/Footer/HellenicRepublicLogo.d.ts +3 -0
- package/{govgr → libs/ui/src/govgr}/Footer/LicenseCCSA.d.ts +0 -0
- package/{govgr → libs/ui/src/govgr}/Footer/index.d.ts +3 -3
- package/{govgr → libs/ui/src/govgr}/Footer/logo.d.ts +0 -0
- package/libs/ui/src/govgr/Footer/logos/logo-el.d.ts +2 -0
- package/libs/ui/src/govgr/Footer/logos/logo-en.d.ts +2 -0
- package/libs/ui/src/govgr/Logo/index.d.ts +3 -0
- package/{govgr → libs/ui/src/govgr}/Logo/logo.d.ts +0 -0
- package/{govgr → libs/ui/src/govgr}/index.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useDebounce.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useLatest.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useOutdatedBrowserCheck.d.ts +0 -0
- package/{hooks → libs/ui/src/hooks}/useSearch.d.ts +0 -0
- package/libs/ui/src/hooks/useTogglableSections.d.ts +18 -0
- package/{index.d.ts → libs/ui/src/index.d.ts} +0 -0
- package/libs/ui/src/layouts/Basic/Bottom/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/Content/index.d.ts +5 -0
- package/libs/ui/src/layouts/Basic/Main/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/Masthead/index.d.ts +4 -0
- package/libs/ui/src/layouts/Basic/Side/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/Top/index.d.ts +3 -0
- package/libs/ui/src/layouts/Basic/index.d.ts +8 -0
- package/{layouts → libs/ui/src/layouts}/Basic/index.spec.d.ts +0 -0
- package/{layouts → libs/ui/src/layouts}/index.d.ts +0 -0
- package/{locales → libs/ui/src/locales}/el.d.ts +0 -0
- package/{locales → libs/ui/src/locales}/en.d.ts +0 -0
- package/{router → libs/ui/src/router}/index.d.ts +0 -0
- package/{test-utils → libs/ui/src/test-utils}/delay.d.ts +0 -0
- package/{test-utils → libs/ui/src/test-utils}/mountWithTheme.d.ts +0 -0
- package/{themes → libs/ui/src/themes}/govgr.d.ts +0 -0
- package/{themes → libs/ui/src/themes}/grnet.d.ts +0 -0
- package/{themes → libs/ui/src/themes}/index.d.ts +0 -0
- package/libs/ui/src/typography/Caption.d.ts +7 -0
- package/libs/ui/src/typography/NormalText.d.ts +5 -0
- package/libs/ui/src/typography/Paragraph.d.ts +6 -0
- package/libs/ui/src/typography/Title.d.ts +9 -0
- package/{typography → libs/ui/src/typography}/index.d.ts +0 -0
- package/{utils → libs/ui/src/utils}/evaluateBrowserVersion.d.ts +0 -0
- package/libs/ui/src/utils/withDeprecation.d.ts +16 -0
- package/libs-ui/react-core/src/Accordion/index.d.ts +10 -0
- package/libs-ui/react-core/src/AccordionControls/index.d.ts +9 -0
- package/libs-ui/react-core/src/AccordionSection/index.d.ts +15 -0
- package/libs-ui/react-core/src/AccordionSectionContent/index.d.ts +10 -0
- package/libs-ui/react-core/src/AccordionSectionHeader/index.d.ts +9 -0
- package/libs-ui/react-core/src/Aside/index.d.ts +10 -0
- package/libs-ui/react-core/src/BackLink/index.d.ts +13 -0
- package/libs-ui/react-core/src/Blockquote/index.d.ts +9 -0
- package/libs-ui/react-core/src/Bottom/index.d.ts +9 -0
- package/libs-ui/react-core/src/Button/index.d.ts +21 -0
- package/libs-ui/react-core/src/ButtonLink/index.d.ts +17 -0
- package/libs-ui/react-core/src/CallToAction/index.d.ts +10 -0
- package/libs-ui/react-core/src/Container/index.d.ts +9 -0
- package/libs-ui/react-core/src/Copyright/index.d.ts +10 -0
- package/libs-ui/react-core/src/Details/index.d.ts +10 -0
- package/libs-ui/react-core/src/DetailsContent/index.d.ts +10 -0
- package/libs-ui/react-core/src/DetailsSummary/index.d.ts +9 -0
- package/libs-ui/react-core/src/ErrorSummary/index.d.ts +9 -0
- package/libs-ui/react-core/src/Footer/index.d.ts +9 -0
- package/libs-ui/react-core/src/FooterContainer/index.d.ts +9 -0
- package/libs-ui/react-core/src/FooterMeta/index.d.ts +11 -0
- package/libs-ui/react-core/src/FooterMetaItem/index.d.ts +14 -0
- package/libs-ui/react-core/src/GovGRLogo/index.d.ts +9 -0
- package/libs-ui/react-core/src/Grid/index.d.ts +20 -0
- package/libs-ui/react-core/src/Header/index.d.ts +10 -0
- package/libs-ui/react-core/src/HeaderLogo/index.d.ts +17 -0
- package/libs-ui/react-core/src/HeaderSection/index.d.ts +9 -0
- package/libs-ui/react-core/src/HeaderSubtitle/index.d.ts +9 -0
- package/libs-ui/react-core/src/HeaderTitle/index.d.ts +13 -0
- package/libs-ui/react-core/src/Heading/index.d.ts +21 -0
- package/libs-ui/react-core/src/HeadingCaption/index.d.ts +15 -0
- package/libs-ui/react-core/src/HellenicRepublicLogo/index.d.ts +20 -0
- package/{govgr/Footer/logos → libs-ui/react-core/src/HellenicRepublicLogo}/logo-el.d.ts +0 -0
- package/{govgr/Footer/logos → libs-ui/react-core/src/HellenicRepublicLogo}/logo-en.d.ts +0 -0
- package/libs-ui/react-core/src/Layout/index.d.ts +10 -0
- package/libs-ui/react-core/src/List/index.d.ts +18 -0
- package/libs-ui/react-core/src/ListItem/index.d.ts +9 -0
- package/libs-ui/react-core/src/Main/index.d.ts +9 -0
- package/libs-ui/react-core/src/Masthead/index.d.ts +9 -0
- package/libs-ui/react-core/src/MastheadBody/index.d.ts +9 -0
- package/libs-ui/react-core/src/NormalText/index.d.ts +28 -0
- package/libs-ui/react-core/src/NotificationBanner/index.d.ts +17 -0
- package/libs-ui/react-core/src/NotificationBannerContent/index.d.ts +12 -0
- package/libs-ui/react-core/src/NotificationBannerHeader/index.d.ts +11 -0
- package/libs-ui/react-core/src/NotificationBannerHeading/index.d.ts +11 -0
- package/libs-ui/react-core/src/Paragraph/index.d.ts +26 -0
- package/libs-ui/react-core/src/PhaseBanner/index.d.ts +15 -0
- package/libs-ui/react-core/src/PhaseBannerTag/index.d.ts +9 -0
- package/libs-ui/react-core/src/SectionBreak/index.d.ts +18 -0
- package/libs-ui/react-core/src/SummaryList/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItem/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItemAction/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItemKey/index.d.ts +10 -0
- package/libs-ui/react-core/src/SummaryListItemValue/index.d.ts +9 -0
- package/libs-ui/react-core/src/Tabs/index.d.ts +10 -0
- package/libs-ui/react-core/src/TabsHeading/index.d.ts +15 -0
- package/libs-ui/react-core/src/TabsList/index.d.ts +10 -0
- package/libs-ui/react-core/src/TabsListItem/index.d.ts +20 -0
- package/libs-ui/react-core/src/TabsPanel/index.d.ts +16 -0
- package/libs-ui/react-core/src/Top/index.d.ts +9 -0
- package/libs-ui/react-core/src/WarningText/index.d.ts +11 -0
- package/package.json +3 -2
- package/themes/grnet.js +1 -1
- package/typography/Caption.js +5 -25
- package/typography/NormalText.js +9 -16
- package/typography/Paragraph.js +3 -39
- package/typography/Title.js +42 -88
- package/utils/withDeprecation.js +105 -0
- package/app/Header/HeaderLogo.d.ts +0 -12
- package/app/Header/HeaderSection.d.ts +0 -6
- package/app/Header/HeaderTitle.d.ts +0 -26
- package/app/Header/index.d.ts +0 -20
- package/app/PageTitle.d.ts +0 -21
- package/core/Accordion/index.d.ts +0 -23
- package/core/Blockquote/index.d.ts +0 -9
- package/core/Button/BackButton.d.ts +0 -4
- package/core/Button/CallToAction.d.ts +0 -8
- package/core/Button/Icon.d.ts +0 -9
- package/core/Button/__snapshots__/index.spec.tsx.snap +0 -145
- package/core/Button/index.d.js +0 -1
- package/core/Button/index.d.ts +0 -26
- package/core/Details/index.d.ts +0 -17
- package/core/Divider/index.d.ts +0 -6
- package/core/ErrorSummary/index.d.ts +0 -8
- package/core/List/List.d.ts +0 -10
- package/core/List/ListItem.d.ts +0 -10
- package/core/NotificationBanner/index.d.ts +0 -7
- package/core/ServiceBadge/index.d.ts +0 -7
- package/core/SummaryList/index.d.ts +0 -29
- package/core/Tabs/index.d.ts +0 -21
- package/core/WarningText/index.d.ts +0 -8
- package/es/core/Button/__snapshots__/index.spec.tsx.snap +0 -145
- package/es/core/Button/index.d.js +0 -0
- package/esm/core/Button/__snapshots__/index.spec.tsx.snap +0 -145
- package/esm/core/Button/index.d.js +0 -0
- package/govgr/Footer/HellenicRepublicLogo.d.ts +0 -6
- package/govgr/Logo/index.d.ts +0 -3
- package/layouts/Basic/Bottom/index.d.ts +0 -5
- package/layouts/Basic/Content/index.d.ts +0 -9
- package/layouts/Basic/Main/index.d.ts +0 -8
- package/layouts/Basic/Masthead/index.d.ts +0 -7
- package/layouts/Basic/Side/index.d.ts +0 -14
- package/layouts/Basic/Top/index.d.ts +0 -13
- package/layouts/Basic/index.d.ts +0 -31
- package/typography/Caption.d.ts +0 -10
- package/typography/NormalText.d.ts +0 -6
- package/typography/Paragraph.d.ts +0 -7
- package/typography/Title.d.ts +0 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
# Change Log - @digigov/ui
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 30 Dec 2021 14:11:34 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 0.9.1
|
|
6
|
+
Thu, 30 Dec 2021 14:11:34 GMT
|
|
7
|
+
|
|
8
|
+
### Patches
|
|
9
|
+
|
|
10
|
+
- Change name for Content in withDeprecation
|
|
11
|
+
- Change the renames of components using withDeprecation
|
|
12
|
+
|
|
13
|
+
## 0.9.0
|
|
14
|
+
Thu, 30 Dec 2021 12:54:03 GMT
|
|
15
|
+
|
|
16
|
+
### Minor changes
|
|
17
|
+
|
|
18
|
+
- Integrate react-core components in @digigov/ui and start deprecating @materia-ui deps
|
|
19
|
+
- Refactor Copyright component
|
|
20
|
+
|
|
21
|
+
### Patches
|
|
22
|
+
|
|
23
|
+
- migrate ui components to use react-core
|
|
24
|
+
- Improve the error format in deprecation messages
|
|
25
|
+
|
|
26
|
+
## 0.8.4
|
|
27
|
+
Tue, 02 Nov 2021 13:03:39 GMT
|
|
28
|
+
|
|
29
|
+
_Version update only_
|
|
30
|
+
|
|
31
|
+
## 0.8.3
|
|
32
|
+
Tue, 02 Nov 2021 12:05:42 GMT
|
|
33
|
+
|
|
34
|
+
### Patches
|
|
35
|
+
|
|
36
|
+
- Fix versions released by mistakes
|
|
37
|
+
|
|
38
|
+
## 0.8.1
|
|
39
|
+
Tue, 02 Nov 2021 08:25:41 GMT
|
|
40
|
+
|
|
41
|
+
### Patches
|
|
42
|
+
|
|
43
|
+
- fix api tests
|
|
4
44
|
|
|
5
45
|
## 0.8.0
|
|
6
46
|
Wed, 20 Oct 2021 12:45:51 GMT
|
package/api/index.spec.js
CHANGED
|
@@ -20,7 +20,7 @@ var _fetchMock = _interopRequireDefault(require("fetch-mock"));
|
|
|
20
20
|
|
|
21
21
|
var _index = require("@digigov/ui/api/index");
|
|
22
22
|
|
|
23
|
-
var _delay = _interopRequireDefault(require("
|
|
23
|
+
var _delay = _interopRequireDefault(require("@digigov/ui/test-utils/delay"));
|
|
24
24
|
|
|
25
25
|
var _fetchAPI = _interopRequireDefault(require("@digigov/ui/api/fetchAPI"));
|
|
26
26
|
|
|
@@ -125,7 +125,7 @@ describe('fetchAPI', function () {
|
|
|
125
125
|
path = 'some_id';
|
|
126
126
|
|
|
127
127
|
_fetchMock["default"].mock.apply(_fetchMock["default"], (0, _toConsumableArray2["default"])(buildMockOptions({
|
|
128
|
-
resource: "".concat(resource, "/").concat(path),
|
|
128
|
+
resource: "".concat(resource, "/").concat(path, "/"),
|
|
129
129
|
response: {
|
|
130
130
|
value: 'SWR'
|
|
131
131
|
}
|
|
@@ -158,7 +158,7 @@ describe('useResource', function () {
|
|
|
158
158
|
beforeEach(_fetchMock["default"].resetBehavior);
|
|
159
159
|
beforeEach(_fetchMock["default"].resetHistory);
|
|
160
160
|
it('useResource should return data', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
161
|
-
var resource, Page, _render, container;
|
|
161
|
+
var resource, Page, _render, container, _container$firstChild, _container$firstChild2;
|
|
162
162
|
|
|
163
163
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
164
164
|
while (1) {
|
|
@@ -190,12 +190,12 @@ describe('useResource', function () {
|
|
|
190
190
|
break;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
193
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild = container.firstChild) === null || _container$firstChild === void 0 ? void 0 : _container$firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
194
194
|
_context2.next = 9;
|
|
195
195
|
return (0, _delay["default"])(DELAY);
|
|
196
196
|
|
|
197
197
|
case 9:
|
|
198
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
198
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild2 = container.firstChild) === null || _container$firstChild2 === void 0 ? void 0 : _container$firstChild2.textContent).toMatchInlineSnapshot("\"hello, SWR\"");
|
|
199
199
|
|
|
200
200
|
case 10:
|
|
201
201
|
expect(_fetchMock["default"].calls()).toHaveLength(1);
|
|
@@ -207,83 +207,20 @@ describe('useResource', function () {
|
|
|
207
207
|
}
|
|
208
208
|
}, _callee2);
|
|
209
209
|
})));
|
|
210
|
-
it('
|
|
211
|
-
var
|
|
210
|
+
it('should run duplicate request once', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
211
|
+
var _container$firstChild3, _container$firstChild4;
|
|
212
|
+
|
|
213
|
+
var resource, Page, _render2, container;
|
|
212
214
|
|
|
213
215
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
214
216
|
while (1) {
|
|
215
217
|
switch (_context3.prev = _context3.next) {
|
|
216
218
|
case 0:
|
|
217
219
|
Page = function _Page2() {
|
|
218
|
-
var _useResource2 = (0, _index.useResource)(resource),
|
|
219
|
-
data = _useResource2.data; // eslint-disable-next-line
|
|
220
|
-
// @ts-ignore
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
var _useResource3 = (0, _index.useResource)(resource2, function () {
|
|
224
|
-
return data.id;
|
|
225
|
-
}),
|
|
226
|
-
finalData = _useResource3.data;
|
|
227
|
-
|
|
228
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, "hello, ", finalData === null || finalData === void 0 ? void 0 : finalData.value);
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
resource = 'resource1';
|
|
232
|
-
resource2 = 'resource2';
|
|
233
|
-
|
|
234
|
-
_fetchMock["default"].mock.apply(_fetchMock["default"], (0, _toConsumableArray2["default"])(buildMockOptions({
|
|
235
|
-
resource: resource,
|
|
236
|
-
response: {
|
|
237
|
-
id: 'myid'
|
|
238
|
-
}
|
|
239
|
-
})));
|
|
240
|
-
|
|
241
|
-
_fetchMock["default"].mock.apply(_fetchMock["default"], (0, _toConsumableArray2["default"])(buildMockOptions({
|
|
242
|
-
resource: "".concat(resource2, "/myid"),
|
|
243
|
-
response: {
|
|
244
|
-
value: 'MyFriend'
|
|
245
|
-
}
|
|
246
|
-
})));
|
|
247
|
-
|
|
248
|
-
_render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(Page, null), {
|
|
249
|
-
wrapper: wrapper
|
|
250
|
-
}), container = _render2.container;
|
|
251
|
-
expect(container.firstChild).not.toBe(null);
|
|
252
|
-
|
|
253
|
-
if (!container.firstChild) {
|
|
254
|
-
_context3.next = 12;
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"something went wrong\"");
|
|
259
|
-
_context3.next = 11;
|
|
260
|
-
return (0, _delay["default"])(DELAY * 2);
|
|
261
|
-
|
|
262
|
-
case 11:
|
|
263
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"something went wrong\"");
|
|
264
|
-
|
|
265
|
-
case 12:
|
|
266
|
-
expect(_fetchMock["default"].calls()).toHaveLength(2);
|
|
267
|
-
|
|
268
|
-
case 13:
|
|
269
|
-
case "end":
|
|
270
|
-
return _context3.stop();
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}, _callee3);
|
|
274
|
-
})));
|
|
275
|
-
it('should run duplicate request once', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
276
|
-
var resource, Page, _render3, container;
|
|
277
|
-
|
|
278
|
-
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
279
|
-
while (1) {
|
|
280
|
-
switch (_context4.prev = _context4.next) {
|
|
281
|
-
case 0:
|
|
282
|
-
Page = function _Page3() {
|
|
283
220
|
(0, _index.useResource)(resource);
|
|
284
221
|
|
|
285
|
-
var
|
|
286
|
-
duplData =
|
|
222
|
+
var _useResource2 = (0, _index.useResource)(resource),
|
|
223
|
+
duplData = _useResource2.data;
|
|
287
224
|
|
|
288
225
|
return /*#__PURE__*/_react["default"].createElement("div", null, "hello, ", duplData === null || duplData === void 0 ? void 0 : duplData.value);
|
|
289
226
|
};
|
|
@@ -297,32 +234,24 @@ describe('useResource', function () {
|
|
|
297
234
|
}
|
|
298
235
|
})));
|
|
299
236
|
|
|
300
|
-
|
|
237
|
+
_render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(Page, null), {
|
|
301
238
|
wrapper: wrapper
|
|
302
|
-
}), container =
|
|
239
|
+
}), container = _render2.container;
|
|
303
240
|
expect(container.firstChild).not.toBe(null);
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
_context4.next = 10;
|
|
307
|
-
break;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
311
|
-
_context4.next = 9;
|
|
241
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild3 = container.firstChild) === null || _container$firstChild3 === void 0 ? void 0 : _container$firstChild3.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
242
|
+
_context3.next = 8;
|
|
312
243
|
return (0, _delay["default"])(DELAY);
|
|
313
244
|
|
|
314
|
-
case
|
|
315
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
316
|
-
|
|
317
|
-
case 10:
|
|
245
|
+
case 8:
|
|
246
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild4 = container.firstChild) === null || _container$firstChild4 === void 0 ? void 0 : _container$firstChild4.textContent).toMatchInlineSnapshot("\"hello, myvalue\"");
|
|
318
247
|
expect(_fetchMock["default"].calls()).toHaveLength(1);
|
|
319
248
|
|
|
320
|
-
case
|
|
249
|
+
case 10:
|
|
321
250
|
case "end":
|
|
322
|
-
return
|
|
251
|
+
return _context3.stop();
|
|
323
252
|
}
|
|
324
253
|
}
|
|
325
|
-
},
|
|
254
|
+
}, _callee3);
|
|
326
255
|
})));
|
|
327
256
|
});
|
|
328
257
|
describe('useResourceAction', function () {
|
|
@@ -332,14 +261,16 @@ describe('useResourceAction', function () {
|
|
|
332
261
|
});
|
|
333
262
|
beforeEach(_fetchMock["default"].resetBehavior);
|
|
334
263
|
beforeEach(_fetchMock["default"].resetHistory);
|
|
335
|
-
it('useResourceAction should return result ', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
336
|
-
var
|
|
264
|
+
it('useResourceAction should return result ', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
265
|
+
var _container$firstChild5, _container$firstChild6;
|
|
337
266
|
|
|
338
|
-
|
|
267
|
+
var resource, Page, _render3, container;
|
|
268
|
+
|
|
269
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
339
270
|
while (1) {
|
|
340
|
-
switch (
|
|
271
|
+
switch (_context4.prev = _context4.next) {
|
|
341
272
|
case 0:
|
|
342
|
-
Page = function
|
|
273
|
+
Page = function _Page3() {
|
|
343
274
|
var _useResourceAction = (0, _index.useResourceAction)(resource, undefined, 'POST', {
|
|
344
275
|
some: 'data'
|
|
345
276
|
}, undefined),
|
|
@@ -362,41 +293,35 @@ describe('useResourceAction', function () {
|
|
|
362
293
|
method: 'POST'
|
|
363
294
|
})));
|
|
364
295
|
|
|
365
|
-
|
|
296
|
+
_render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(Page, null), {
|
|
366
297
|
wrapper: wrapper
|
|
367
|
-
}), container =
|
|
298
|
+
}), container = _render3.container;
|
|
368
299
|
expect(container.firstChild).not.toBe(null);
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
_context5.next = 10;
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
376
|
-
_context5.next = 9;
|
|
300
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild5 = container.firstChild) === null || _container$firstChild5 === void 0 ? void 0 : _container$firstChild5.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
301
|
+
_context4.next = 8;
|
|
377
302
|
return (0, _delay["default"])(DELAY * 2);
|
|
378
303
|
|
|
379
|
-
case
|
|
380
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
381
|
-
|
|
382
|
-
case 10:
|
|
304
|
+
case 8:
|
|
305
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild6 = container.firstChild) === null || _container$firstChild6 === void 0 ? void 0 : _container$firstChild6.textContent).toMatchInlineSnapshot("\"hello, myvalue\"");
|
|
383
306
|
expect(_fetchMock["default"].calls()).toHaveLength(1);
|
|
384
307
|
|
|
385
|
-
case
|
|
308
|
+
case 10:
|
|
386
309
|
case "end":
|
|
387
|
-
return
|
|
310
|
+
return _context4.stop();
|
|
388
311
|
}
|
|
389
312
|
}
|
|
390
|
-
},
|
|
313
|
+
}, _callee4);
|
|
391
314
|
})));
|
|
392
|
-
it('useResourceAction should be invalidated and run twice', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
393
|
-
var
|
|
315
|
+
it('useResourceAction should be invalidated and run twice', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
316
|
+
var _container$firstChild7, _container$firstChild8, _container$firstChild9, _container$firstChild10;
|
|
394
317
|
|
|
395
|
-
|
|
318
|
+
var resource, Page, _render4, container;
|
|
319
|
+
|
|
320
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
396
321
|
while (1) {
|
|
397
|
-
switch (
|
|
322
|
+
switch (_context5.prev = _context5.next) {
|
|
398
323
|
case 0:
|
|
399
|
-
Page = function
|
|
324
|
+
Page = function _Page4() {
|
|
400
325
|
var _useResourceAction2 = (0, _index.useResourceAction)(resource, undefined, 'POST', {
|
|
401
326
|
some: 'data'
|
|
402
327
|
}, undefined),
|
|
@@ -428,42 +353,34 @@ describe('useResourceAction', function () {
|
|
|
428
353
|
method: 'POST'
|
|
429
354
|
})));
|
|
430
355
|
|
|
431
|
-
|
|
356
|
+
_render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(Page, null), {
|
|
432
357
|
wrapper: wrapper
|
|
433
|
-
}), container =
|
|
358
|
+
}), container = _render4.container;
|
|
434
359
|
expect(container.firstChild).not.toBe(null);
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
_context6.next = 16;
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
442
|
-
_context6.next = 9;
|
|
360
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild7 = container.firstChild) === null || _container$firstChild7 === void 0 ? void 0 : _container$firstChild7.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
361
|
+
_context5.next = 8;
|
|
443
362
|
return (0, _delay["default"])(DELAY);
|
|
444
363
|
|
|
445
|
-
case
|
|
446
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
447
|
-
|
|
364
|
+
case 8:
|
|
365
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild8 = container.firstChild) === null || _container$firstChild8 === void 0 ? void 0 : _container$firstChild8.textContent).toMatchInlineSnapshot("\"hello, myvalue\"");
|
|
366
|
+
_context5.next = 11;
|
|
448
367
|
return (0, _delay["default"])(DELAY);
|
|
449
368
|
|
|
450
|
-
case
|
|
451
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
452
|
-
|
|
369
|
+
case 11:
|
|
370
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild9 = container.firstChild) === null || _container$firstChild9 === void 0 ? void 0 : _container$firstChild9.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
371
|
+
_context5.next = 14;
|
|
453
372
|
return (0, _delay["default"])(DELAY * 2);
|
|
454
373
|
|
|
455
|
-
case
|
|
456
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, \"");
|
|
457
|
-
|
|
458
|
-
case 16:
|
|
374
|
+
case 14:
|
|
375
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild10 = container.firstChild) === null || _container$firstChild10 === void 0 ? void 0 : _container$firstChild10.textContent).toMatchInlineSnapshot("\"hello, myvalue\"");
|
|
459
376
|
expect(_fetchMock["default"].calls()).toHaveLength(2);
|
|
460
377
|
|
|
461
|
-
case
|
|
378
|
+
case 16:
|
|
462
379
|
case "end":
|
|
463
|
-
return
|
|
380
|
+
return _context5.stop();
|
|
464
381
|
}
|
|
465
382
|
}
|
|
466
|
-
},
|
|
383
|
+
}, _callee5);
|
|
467
384
|
})));
|
|
468
385
|
});
|
|
469
386
|
describe('useResourceMany', function () {
|
|
@@ -472,15 +389,18 @@ describe('useResourceMany', function () {
|
|
|
472
389
|
_fetchMock["default"].restore();
|
|
473
390
|
});
|
|
474
391
|
beforeEach(_fetchMock["default"].resetBehavior);
|
|
475
|
-
beforeEach(_fetchMock["default"].resetHistory);
|
|
476
|
-
it('useResourceMany should return data', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
477
|
-
var resource, Page, _render6, container;
|
|
392
|
+
beforeEach(_fetchMock["default"].resetHistory); //check this test again (loading/hello)
|
|
478
393
|
|
|
479
|
-
|
|
394
|
+
it('useResourceMany should return data', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
395
|
+
var _container$firstChild11, _container$firstChild12;
|
|
396
|
+
|
|
397
|
+
var resource, Page, _render5, container;
|
|
398
|
+
|
|
399
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
480
400
|
while (1) {
|
|
481
|
-
switch (
|
|
401
|
+
switch (_context6.prev = _context6.next) {
|
|
482
402
|
case 0:
|
|
483
|
-
Page = function
|
|
403
|
+
Page = function _Page5() {
|
|
484
404
|
var _useResourceMany = (0, _index.useResourceMany)(resource),
|
|
485
405
|
data = _useResourceMany.data;
|
|
486
406
|
|
|
@@ -504,41 +424,35 @@ describe('useResourceMany', function () {
|
|
|
504
424
|
}
|
|
505
425
|
})));
|
|
506
426
|
|
|
507
|
-
|
|
427
|
+
_render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(Page, null), {
|
|
508
428
|
wrapper: wrapper
|
|
509
|
-
}), container =
|
|
429
|
+
}), container = _render5.container;
|
|
510
430
|
expect(container.firstChild).not.toBe(null);
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
_context7.next = 10;
|
|
514
|
-
break;
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"Loading\"");
|
|
518
|
-
_context7.next = 9;
|
|
431
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild11 = container.firstChild) === null || _container$firstChild11 === void 0 ? void 0 : _container$firstChild11.textContent).toMatchInlineSnapshot("\"Loading\"");
|
|
432
|
+
_context6.next = 8;
|
|
519
433
|
return (0, _delay["default"])(DELAY * 2);
|
|
520
434
|
|
|
521
|
-
case
|
|
522
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"
|
|
523
|
-
|
|
524
|
-
case 10:
|
|
435
|
+
case 8:
|
|
436
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild12 = container.firstChild) === null || _container$firstChild12 === void 0 ? void 0 : _container$firstChild12.textContent).toMatchInlineSnapshot("\"hello, SWR\"");
|
|
525
437
|
expect(_fetchMock["default"].calls()).toHaveLength(1);
|
|
526
438
|
|
|
527
|
-
case
|
|
439
|
+
case 10:
|
|
528
440
|
case "end":
|
|
529
|
-
return
|
|
441
|
+
return _context6.stop();
|
|
530
442
|
}
|
|
531
443
|
}
|
|
532
|
-
},
|
|
444
|
+
}, _callee6);
|
|
533
445
|
})));
|
|
534
|
-
it('useResourceMany should handle hasNext, hasPrevious', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
535
|
-
var
|
|
446
|
+
it('useResourceMany should handle hasNext, hasPrevious', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
447
|
+
var _container$firstChild13, _container$firstChild14;
|
|
536
448
|
|
|
537
|
-
|
|
449
|
+
var resource, Page, _render6, container;
|
|
450
|
+
|
|
451
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
538
452
|
while (1) {
|
|
539
|
-
switch (
|
|
453
|
+
switch (_context7.prev = _context7.next) {
|
|
540
454
|
case 0:
|
|
541
|
-
Page = function
|
|
455
|
+
Page = function _Page6() {
|
|
542
456
|
var _useResourceMany2 = (0, _index.useResourceMany)(resource),
|
|
543
457
|
hasNext = _useResourceMany2.hasNext,
|
|
544
458
|
hasPrevious = _useResourceMany2.hasPrevious;
|
|
@@ -563,41 +477,35 @@ describe('useResourceMany', function () {
|
|
|
563
477
|
}
|
|
564
478
|
})));
|
|
565
479
|
|
|
566
|
-
|
|
480
|
+
_render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(Page, null), {
|
|
567
481
|
wrapper: wrapper
|
|
568
|
-
}), container =
|
|
482
|
+
}), container = _render6.container;
|
|
569
483
|
expect(container.firstChild).not.toBe(null);
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
_context8.next = 10;
|
|
573
|
-
break;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"Loading\"");
|
|
577
|
-
_context8.next = 9;
|
|
484
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild13 = container.firstChild) === null || _container$firstChild13 === void 0 ? void 0 : _container$firstChild13.textContent).toMatchInlineSnapshot("\"Loading\"");
|
|
485
|
+
_context7.next = 8;
|
|
578
486
|
return (0, _delay["default"])(DELAY);
|
|
579
487
|
|
|
580
|
-
case
|
|
581
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"
|
|
582
|
-
|
|
583
|
-
case 10:
|
|
488
|
+
case 8:
|
|
489
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild14 = container.firstChild) === null || _container$firstChild14 === void 0 ? void 0 : _container$firstChild14.textContent).toMatchInlineSnapshot("\"no next,no previous\"");
|
|
584
490
|
expect(_fetchMock["default"].calls()).toHaveLength(1);
|
|
585
491
|
|
|
586
|
-
case
|
|
492
|
+
case 10:
|
|
587
493
|
case "end":
|
|
588
|
-
return
|
|
494
|
+
return _context7.stop();
|
|
589
495
|
}
|
|
590
496
|
}
|
|
591
|
-
},
|
|
497
|
+
}, _callee7);
|
|
592
498
|
})));
|
|
593
|
-
it('useResourceMany should handle setPage with custom limit option', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
594
|
-
var
|
|
499
|
+
it('useResourceMany should handle setPage with custom limit option', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
500
|
+
var _container$firstChild15, _container$firstChild16, _container$firstChild17;
|
|
595
501
|
|
|
596
|
-
|
|
502
|
+
var resource, Page, _render7, container, getByText;
|
|
503
|
+
|
|
504
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
597
505
|
while (1) {
|
|
598
|
-
switch (
|
|
506
|
+
switch (_context8.prev = _context8.next) {
|
|
599
507
|
case 0:
|
|
600
|
-
Page = function
|
|
508
|
+
Page = function _Page7() {
|
|
601
509
|
var _useResourceMany3 = (0, _index.useResourceMany)(resource, {
|
|
602
510
|
limit: 10
|
|
603
511
|
}),
|
|
@@ -646,39 +554,31 @@ describe('useResourceMany', function () {
|
|
|
646
554
|
}
|
|
647
555
|
})));
|
|
648
556
|
|
|
649
|
-
|
|
557
|
+
_render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(Page, null), {
|
|
650
558
|
wrapper: wrapper
|
|
651
|
-
}), container =
|
|
559
|
+
}), container = _render7.container, getByText = _render7.getByText;
|
|
652
560
|
expect(container.firstChild).not.toBe(null);
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
_context9.next = 15;
|
|
656
|
-
break;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"Loading\"");
|
|
660
|
-
_context9.next = 10;
|
|
561
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild15 = container.firstChild) === null || _container$firstChild15 === void 0 ? void 0 : _container$firstChild15.textContent).toMatchInlineSnapshot("\"Loading\"");
|
|
562
|
+
_context8.next = 9;
|
|
661
563
|
return (0, _delay["default"])(DELAY);
|
|
662
564
|
|
|
663
|
-
case
|
|
664
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"
|
|
565
|
+
case 9:
|
|
566
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild16 = container.firstChild) === null || _container$firstChild16 === void 0 ? void 0 : _container$firstChild16.textContent).toMatchInlineSnapshot("\"hello, SWRnext\"");
|
|
665
567
|
|
|
666
568
|
_react2.fireEvent.click(getByText('next'));
|
|
667
569
|
|
|
668
|
-
|
|
669
|
-
return (0, _delay["default"])(DELAY);
|
|
670
|
-
|
|
671
|
-
case 14:
|
|
672
|
-
expect(container.firstChild.textContent).toMatchInlineSnapshot("\"hello, RWSnext\"");
|
|
570
|
+
_context8.next = 13;
|
|
571
|
+
return (0, _delay["default"])(DELAY * 2);
|
|
673
572
|
|
|
674
|
-
case
|
|
573
|
+
case 13:
|
|
574
|
+
expect(container === null || container === void 0 ? void 0 : (_container$firstChild17 = container.firstChild) === null || _container$firstChild17 === void 0 ? void 0 : _container$firstChild17.textContent).toMatchInlineSnapshot("\"hello, RWSnext\"");
|
|
675
575
|
expect(_fetchMock["default"].calls()).toHaveLength(2);
|
|
676
576
|
|
|
677
|
-
case
|
|
577
|
+
case 15:
|
|
678
578
|
case "end":
|
|
679
|
-
return
|
|
579
|
+
return _context8.stop();
|
|
680
580
|
}
|
|
681
581
|
}
|
|
682
|
-
},
|
|
582
|
+
}, _callee8);
|
|
683
583
|
})));
|
|
684
584
|
});
|
package/app/App.js
CHANGED
|
@@ -24,26 +24,24 @@ var useAppStyles = (0, _styles.makeStyles)({
|
|
|
24
24
|
});
|
|
25
25
|
exports.useAppStyles = useAppStyles;
|
|
26
26
|
|
|
27
|
-
var _ref2 = /*#__PURE__*/_react["default"].createElement(_CssBaseline["default"], null);
|
|
28
|
-
|
|
29
27
|
var App = function App(_ref) {
|
|
30
28
|
var theme = _ref.theme,
|
|
31
29
|
children = _ref.children;
|
|
32
30
|
return /*#__PURE__*/_react["default"].createElement(_styles.ThemeProvider, {
|
|
33
31
|
theme: theme
|
|
34
|
-
},
|
|
32
|
+
}, /*#__PURE__*/_react["default"].createElement(_react.Suspense, {
|
|
35
33
|
fallback: 'loading...'
|
|
36
34
|
}, children));
|
|
37
35
|
};
|
|
38
36
|
|
|
39
|
-
var
|
|
37
|
+
var _ref3 = /*#__PURE__*/_react["default"].createElement(_CssBaseline["default"], null);
|
|
40
38
|
|
|
41
|
-
var StaticApp = function StaticApp(
|
|
42
|
-
var theme =
|
|
43
|
-
children =
|
|
39
|
+
var StaticApp = function StaticApp(_ref2) {
|
|
40
|
+
var theme = _ref2.theme,
|
|
41
|
+
children = _ref2.children;
|
|
44
42
|
return /*#__PURE__*/_react["default"].createElement(_styles.ThemeProvider, {
|
|
45
43
|
theme: theme
|
|
46
|
-
},
|
|
44
|
+
}, _ref3, children);
|
|
47
45
|
};
|
|
48
46
|
|
|
49
47
|
exports.StaticApp = StaticApp;
|
package/app/Header/HeaderLogo.js
CHANGED
|
@@ -5,46 +5,26 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
8
|
+
exports["default"] = exports.HeaderLogo = void 0;
|
|
9
|
+
|
|
10
|
+
var _HeaderLogo = _interopRequireDefault(require("@digigov/react-core/HeaderLogo"));
|
|
11
|
+
|
|
12
|
+
var _withDeprecation = _interopRequireDefault(require("@digigov/ui/utils/withDeprecation"));
|
|
13
|
+
|
|
14
|
+
var HeaderLogo = (0, _withDeprecation["default"])(_HeaderLogo["default"], {
|
|
15
|
+
name: 'HeaderLogo',
|
|
16
|
+
props: {
|
|
17
|
+
height: {
|
|
18
|
+
warning: true
|
|
19
|
+
},
|
|
20
|
+
linkprops: {
|
|
21
|
+
warning: true
|
|
22
|
+
},
|
|
23
|
+
label: {
|
|
24
|
+
warning: true
|
|
25
|
+
}
|
|
26
|
+
}
|
|
24
27
|
});
|
|
25
|
-
exports.useHeaderLogoStyles = useHeaderLogoStyles;
|
|
26
|
-
|
|
27
|
-
var HeaderLogo = function HeaderLogo(_ref) {
|
|
28
|
-
var _ref$href = _ref.href,
|
|
29
|
-
href = _ref$href === void 0 ? '' : _ref$href,
|
|
30
|
-
src = _ref.src,
|
|
31
|
-
label = _ref.label,
|
|
32
|
-
height = _ref.height,
|
|
33
|
-
className = _ref.className,
|
|
34
|
-
children = _ref.children,
|
|
35
|
-
linkProps = _ref.linkProps;
|
|
36
|
-
var styles = useHeaderLogoStyles();
|
|
37
|
-
return /*#__PURE__*/_react["default"].createElement(_HeaderTitle["default"], {
|
|
38
|
-
linkComponent: "a",
|
|
39
|
-
href: href,
|
|
40
|
-
linkProps: linkProps,
|
|
41
|
-
className: (0, _clsx["default"])(className, styles.root)
|
|
42
|
-
}, src ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
43
|
-
src: src,
|
|
44
|
-
height: height || 40
|
|
45
|
-
}) : children || label || '');
|
|
46
|
-
};
|
|
47
|
-
|
|
48
28
|
exports.HeaderLogo = HeaderLogo;
|
|
49
29
|
var _default = HeaderLogo;
|
|
50
30
|
exports["default"] = _default;
|