Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat(core): ouverture des disclosures à partir des ancres, état disabled désactive disclosure [DS-2805, DS-2533] #532

Merged
merged 24 commits into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
435ac0c
fix(core): ajout de la fonctionnalité d'ouverture des disclosures ave…
lab9fr Nov 14, 2022
bf08d86
fix(header,skiplink): correction ancres
lab9fr Nov 14, 2022
56731b3
Update src/core/script/disclosure/disclosure.js
lab9fr Nov 15, 2022
3697767
fix(disclosure): état disabled du bouton primaire désactive le disclo…
lab9fr Nov 16, 2022
366e0ae
fix(disclosure): ajustements
lab9fr Nov 16, 2022
a0e2827
fix(disclosure): changes
lab9fr Nov 16, 2022
52998ab
fix(core): scrollIntoView
lab9fr Nov 17, 2022
f3f0788
fix(tab): ouverture au rechargement de la page
lab9fr Nov 17, 2022
36387b9
Update src/core/script/disclosure/disclosures-group.js
lab9fr Nov 21, 2022
9c1dc98
fix(core): bouton primaire
lab9fr Jun 2, 2023
73205e4
fix(core): wip
lab9fr Jun 6, 2023
bbee32c
refactor(analytics): répartition de l'integration + collapse selector
lab9fr Jun 8, 2023
db12314
fix(core): wup
lab9fr Jun 14, 2023
20bd789
fix(global): implémentation des primary
lab9fr Jun 15, 2023
6b992a4
fix(breadcrumb): primary
lab9fr Jun 15, 2023
ee8b861
Merge branch 'dev-1.10.0' into fix/hash
lab9fr Jun 15, 2023
1bb67e5
Merge branch 'fix/hash' of github.com:GouvernementFR/dsfr into fix/hash
lab9fr Jun 15, 2023
3591c8f
fix(tab): primary
lab9fr Jun 15, 2023
7bdf02e
feat(core): spotlight -> ouverture des parents si ouvert par hash
lab9fr Jun 15, 2023
825e44f
fix(core): corrige current undefined
lab9fr Jun 16, 2023
f13353f
fix(core): corrige spotlight
lab9fr Jun 16, 2023
39840bd
fix(core): corrige current
lab9fr Jun 16, 2023
3dce4ef
refactor(core): sanitize hash
lab9fr Jun 16, 2023
1487968
Merge branch 'dev-1.10.0' into fix/hash
lab9fr Jun 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/analytics/script/integration/component/accordion/integrate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import api from '../../../../api';
import { AccordionActionee } from './accordion-actionee';

const integrateAccordion = () => {
if (api.accordion) {
api.internals.register(api.accordion.AccordionSelector.COLLAPSE, AccordionActionee);
}
};

export default integrateAccordion;
9 changes: 9 additions & 0 deletions src/analytics/script/integration/component/alert/integrate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { AlertSelector } from './alert-selector';
import { AlertActionee } from './alert-actionee';

const integrateAlert = () => {
api.internals.register(AlertSelector.ALERT, AlertActionee);
};

export default integrateAlert;
9 changes: 9 additions & 0 deletions src/analytics/script/integration/component/badge/integrate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { BadgeSelector } from './badge-selector';
import { BadgeActionee } from './badge-actionee';

const integrateBadge = () => {
api.internals.register(BadgeSelector.BADGE, BadgeActionee);
};

export default integrateBadge;
13 changes: 13 additions & 0 deletions src/analytics/script/integration/component/breadcrumb/integrate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import api from '../../../../api';
import { BreadcrumbSelector } from './breadcrumb-selector';
import { BreadcrumbActionee } from './breadcrumb-actionee';
import { BreadcrumbLinkActionee } from './breadcrumb-link-actionee';

const integrateBreadcrumb = () => {
if (api.breadcrumb) {
api.internals.register(BreadcrumbSelector.COLLAPSE, BreadcrumbActionee);
api.internals.register(BreadcrumbSelector.LINK, BreadcrumbLinkActionee);
}
};

export default integrateBreadcrumb;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { ButtonSelector } from './button-selector';
import { ButtonActionee } from './button-actionee';

const integrateButton = () => {
api.internals.register(ButtonSelector.BUTTON, ButtonActionee);
};

export default integrateButton;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { CalloutSelector } from './callout-selector';
import { CalloutActionee } from './callout-actionee';

const integrateCallout = () => {
api.internals.register(CalloutSelector.CALLOUT, CalloutActionee);
};

export default integrateCallout;
9 changes: 9 additions & 0 deletions src/analytics/script/integration/component/card/integrate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { CardSelector } from './card-selector';
import { CardActionee } from './card-actionee';

const integrateCard = () => {
api.internals.register(CardSelector.CARD, CardActionee);
};

export default integrateCard;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { CheckboxSelector } from './checkbox-selector';
import { CheckboxActionee } from './checkbox-actionee';

const integrateCheckbox = () => {
api.internals.register(CheckboxSelector.INPUT, CheckboxActionee);
};

export default integrateCheckbox;
264 changes: 76 additions & 188 deletions src/analytics/script/integration/component/components.js
Original file line number Diff line number Diff line change
@@ -1,194 +1,82 @@
import api from '../../../api';
import { AccordionActionee } from './accordion/accordion-actionee';
import { BreadcrumbSelector } from './breadcrumb/breadcrumb-selector';
import { BreadcrumbActionee } from './breadcrumb/breadcrumb-actionee';
import { BreadcrumbLinkActionee } from './breadcrumb/breadcrumb-link-actionee';
import { ButtonSelector } from './button/button-selector';
import { ButtonActionee } from './button/button-actionee';
import { AlertSelector } from './alert/alert-selector';
import { AlertActionee } from './alert/alert-actionee';
import { BadgeSelector } from './badge/badge-selector';
import { BadgeActionee } from './badge/badge-actionee';
import { CalloutSelector } from './callout/callout-selector';
import { CalloutActionee } from './callout/callout-actionee';
import { ConnectSelector } from './connect/connect-selector';
import { ConnectActionee } from './connect/connect-actionee';
import { ConnectLinkActionee } from './connect/connect-link-actionee';
import { ContentSelector } from './content/content-selector';
import { ContentActionee } from './content/content-actionee';
import { ConsentSelector } from './consent/consent-selector';
import { ConsentActionee } from './consent/consent-actionee';
import { CardSelector } from './card/card-selector';
import { CardActionee } from './card/card-actionee';
import { CheckboxSelector } from './checkbox/checkbox-selector';
import { CheckboxActionee } from './checkbox/checkbox-actionee';
import { DownloadSelector } from './download/download-selector';
import { DownloadActionee } from './download/download-actionee';
import { FooterSelector } from './footer/footer-selector';
import { FooterActionee } from './footer/footer-actionee';
import { FollowSelector } from './follow/follow-selector';
import { FollowActionee } from './follow/follow-actionee';
import { FooterLinkActionee } from './footer/footer-link-actionee';
import { HeaderActionee } from './header/header-actionee';
import { HeaderSelector } from './header/header-selector';
import { HeaderModalActionee } from './header/header-modal-actionee';
import { HeaderToolsButtonActionee } from './header/header-tools-button-actionee';
import { HeaderMenuButtonActionee } from './header/header-menu-button-actionee';
import { HighlightSelector } from './highlight/highlight-selector';
import { HighlightActionee } from './highlight/highlight-actionee';
import { InputSelector } from './input/input-selector';
import { InputActionee } from './input/input-actionee';
import { LinkSelector } from './link/link-selector';
import { LinkActionee } from './link/link-actionee';
import { ModalActionee } from './modal/modal-actionee';
import { NavigationSelector } from './navigation/navigation-selector';
import { NavigationActionee } from './navigation/navigation-actionee';
import { NavigationSectionActionee } from './navigation/navigation-section-actionee';
import { NavigationLinkActionee } from './navigation/navigation-link-actionee';
import { NoticeSelector } from './notice/notice-selector';
import { NoticeActionee } from './notice/notice-actionee';
import { PaginationSelector } from './pagination/pagination-selector';
import { PaginationActionee } from './pagination/pagination-actionee';
import { PaginationLinkActionee } from './pagination/pagination-link-actionee';
import { RadioSelector } from './radio/radio-selector';
import { RadioActionee } from './radio/radio-actionee';
import { QuoteSelector } from './quote/quote-selector';
import { QuoteActionee } from './quote/quote-actionee';
import { SearchSelector } from './search/search-selector';
import { SearchActionee } from './search/search-actionee';
import { SelectSelector } from './select/select-selector';
import { SelectActionee } from './select/select-actionee';
import { SidemenuSelector } from './sidemenu/sidemenu-selector';
import { SidemenuActionee } from './sidemenu/sidemenu-actionee';
import { SidemenuLinkActionee } from './sidemenu/sidemenu-link-actionee';
import { SidemenuSectionActionee } from './sidemenu/sidemenu-section-actionee';
import { ShareSelector } from './share/share-selector';
import { ShareActionee } from './share/share-actionee';
import { StepperSelector } from './stepper/stepper-selector';
import { StepperActionee } from './stepper/stepper-actionee';
import { SummarySelector } from './summary/summary-selector';
import { SummaryActionee } from './summary/summary-actionee';
import { SummaryLinkActionee } from './summary/summary-link-actionee';
import { SummarySectionActionee } from './summary/summary-section-actionee';
import { TabActionee } from './tab/tab-actionee';
import { TableSelector } from './table/table-selector';
import { TableActionee } from './table/table-actionee';
import { TileSelector } from './tile/tile-selector';
import { TileActionee } from './tile/tile-actionee';
import { ToggleSelector } from './toggle/toggle-selector';
import { ToggleActionee } from './toggle/toggle-actionee';
import { TagSelector } from './tag/tag-selector';
import { TagActionee } from './tag/tag-actionee';
import { TranscriptionSelector } from './transcription/transcription-selector';
import { TranscriptionActionee } from './transcription/transcription-actionee';
import { TranslateSelector } from './translate/translate-selector';
import { TranslateActionee } from './translate/translate-actionee';
import { UploadSelector } from './upload/upload-selector';
import { UploadActionee } from './upload/upload-actionee';
import integrateAccordion from './accordion/integrate';
import integrateAlert from './alert/integrate';
import integrateBreadcrumb from './breadcrumb/integrate';
import integrateBadge from './badge/integrate';
import integrateButton from './button/integrate';
import integrateCallout from './callout/integrate';
import integrateCard from './card/integrate';
import integrateCheckbox from './checkbox/integrate';
import integrateConnect from './connect/integrate';
import integrateConsent from './consent/integrate';
import integrateContent from './content/integrate';
import integrateDownload from './download/integrate';
import integrateFollow from './follow/integrate';
import integrateFooter from './footer/integrate';
import integrateHeader from './header/integrate';
import integrateHighlight from './highlight/integrate';
import integrateLink from './link/integrate';
import integrateInput from './input/integrate';
import integrateModal from './modal/integrate';
import integrateNavigation from './navigation/integrate';
import integrateNotice from './notice/integrate';
import integratePagination from './pagination/integrate';
import integrateQuote from './quote/integrate';
import integrateRadio from './radio/integrate';
import integrateSearch from './search/integrate';
import integrateSelect from './select/integrate';
import integrateShare from './share/integrate';
import integrateSidemenu from './sidemenu/integrate';
import integrateStepper from './stepper/integrate';
import integrateSummary from './summary/integrate';
import integrateTab from './tab/integrate';
import integrateTable from './table/integrate';
import integrateTag from './tag/integrate';
import integrateTile from './tile/integrate';
import integrateToggle from './toggle/integrate';
import integrateTranscription from './transcription/integrate';
import integrateTranslate from './translate/integrate';
import integrateUpload from './upload/integrate';

const integrateComponents = () => {
if (api.accordion) {
api.internals.register(api.accordion.AccordionSelector.COLLAPSE, AccordionActionee);
}

if (api.breadcrumb) {
api.internals.register(BreadcrumbSelector.COLLAPSE, BreadcrumbActionee);
api.internals.register(BreadcrumbSelector.LINK, BreadcrumbLinkActionee);
}

api.internals.register(AlertSelector.ALERT, AlertActionee);

api.internals.register(BadgeSelector.BADGE, BadgeActionee);

api.internals.register(ButtonSelector.BUTTON, ButtonActionee);

api.internals.register(CalloutSelector.CALLOUT, CalloutActionee);

api.internals.register(ConnectSelector.CONNECT, ConnectActionee);
api.internals.register(ConnectSelector.LINK, ConnectLinkActionee);

api.internals.register(ContentSelector.CONTENT, ContentActionee);

api.internals.register(ConsentSelector.BANNER, ConsentActionee);

api.internals.register(CardSelector.CARD, CardActionee);

api.internals.register(InputSelector.INPUT, InputActionee);

api.internals.register(CheckboxSelector.INPUT, CheckboxActionee);

api.internals.register(DownloadSelector.LINK, DownloadActionee);

api.internals.register(FooterSelector.FOOTER, FooterActionee);
api.internals.register(FooterSelector.FOOTER_LINKS, FooterLinkActionee);

api.internals.register(FollowSelector.FOLLOW, FollowActionee);

if (api.header) {
api.internals.register(api.header.HeaderSelector.HEADER, HeaderActionee);
api.internals.register(api.header.HeaderSelector.MODALS, HeaderModalActionee);
api.internals.register(HeaderSelector.TOOLS_BUTTON, HeaderToolsButtonActionee);
api.internals.register(HeaderSelector.MENU_BUTTON, HeaderMenuButtonActionee);
}

api.internals.register(HighlightSelector.HIGHLIGHT, HighlightActionee);

api.internals.register(LinkSelector.LINK, LinkActionee);

if (api.modal) {
api.internals.register(api.modal.ModalSelector.MODAL, ModalActionee);
}

if (api.navigation) {
api.internals.register(api.navigation.NavigationSelector.NAVIGATION, NavigationActionee);
api.internals.register(NavigationSelector.LINK, NavigationLinkActionee);
api.internals.register(api.navigation.NavigationSelector.COLLAPSE, NavigationSectionActionee);
}

api.internals.register(NoticeSelector.NOTICE, NoticeActionee);

api.internals.register(PaginationSelector.PAGINATION, PaginationActionee);
api.internals.register(PaginationSelector.LINK, PaginationLinkActionee);

api.internals.register(QuoteSelector.QUOTE, QuoteActionee);

api.internals.register(RadioSelector.INPUT, RadioActionee);

api.internals.register(SearchSelector.SEARCH_BAR, SearchActionee);

api.internals.register(SelectSelector.SELECT, SelectActionee);

if (api.sidemenu) {
api.internals.register(SidemenuSelector.SIDEMENU, SidemenuActionee);
api.internals.register(SidemenuSelector.LINK, SidemenuLinkActionee);
api.internals.register(api.sidemenu.SidemenuSelector.COLLAPSE, SidemenuSectionActionee);
}

api.internals.register(ShareSelector.SHARE, ShareActionee);

api.internals.register(StepperSelector.STEPPER, StepperActionee);

api.internals.register(SummarySelector.SUMMARY, SummaryActionee);
api.internals.register(SummarySelector.LINK, SummaryLinkActionee);
api.internals.register(SummarySelector.ITEM, SummarySectionActionee);

if (api.tab) {
api.internals.register(api.tab.TabSelector.PANEL, TabActionee);
}

api.internals.register(TableSelector.TABLE, TableActionee);

api.internals.register(TagSelector.TAG, TagActionee);

api.internals.register(TileSelector.TILE, TileActionee);

api.internals.register(ToggleSelector.INPUT, ToggleActionee);

api.internals.register(TranscriptionSelector.COLLAPSE, TranscriptionActionee);

api.internals.register(TranslateSelector.COLLAPSE, TranslateActionee);

api.internals.register(UploadSelector.UPLOAD, UploadActionee);
integrateAccordion();
integrateBreadcrumb();
integrateAlert();
integrateBadge();
integrateButton();
integrateCallout();
integrateConnect();
integrateConsent();
integrateContent();
integrateCard();
integrateInput();
integrateCheckbox();
integrateDownload();
integrateFooter();
integrateFollow();
integrateHeader();
integrateHighlight();
integrateLink();
integrateModal();
integrateNavigation();
integrateNotice();
integratePagination();
integrateQuote();
integrateRadio();
integrateSearch();
integrateSelect();
integrateShare();
integrateSidemenu();
integrateStepper();
integrateSummary();
integrateTab();
integrateTable();
integrateTag();
integrateTile();
integrateToggle();
integrateTranscription();
integrateTranslate();
integrateUpload();
lab9fr marked this conversation as resolved.
Show resolved Hide resolved
};

export default integrateComponents;
11 changes: 11 additions & 0 deletions src/analytics/script/integration/component/connect/integrate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import api from '../../../../api';
import { ConnectSelector } from './connect-selector';
import { ConnectActionee } from './connect-actionee';
import { ConnectLinkActionee } from './connect-link-actionee';

const integrateConnect = () => {
api.internals.register(ConnectSelector.CONNECT, ConnectActionee);
api.internals.register(ConnectSelector.LINK, ConnectLinkActionee);
};

export default integrateConnect;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { ConsentSelector } from './consent-selector';
import { ConsentActionee } from './consent-actionee';

const integrateConsent = () => {
api.internals.register(ConsentSelector.BANNER, ConsentActionee);
};

export default integrateConsent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { ContentSelector } from './content-selector';
import { ContentActionee } from './content-actionee';

const integrateContent = () => {
api.internals.register(ContentSelector.CONTENT, ContentActionee);
};

export default integrateContent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import api from '../../../../api';
import { DownloadSelector } from './download-selector';
import { DownloadActionee } from './download-actionee';

const integrateDownload = () => {
api.internals.register(DownloadSelector.LINK, DownloadActionee);
};

export default integrateDownload;
Loading