TP_JO2024/home/dist/component/component.module.min.js

4 lines
46 KiB
JavaScript
Raw Permalink Normal View History

2024-03-27 17:19:37 +01:00
/*! DSFR v1.11.2 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions) */
const e="fr",t="dsfr",s=window[t],i=s.internals.ns.selector("accordion"),n=s.internals.ns.selector("collapse"),r={GROUP:s.internals.ns.selector("accordions-group"),ACCORDION:i,COLLAPSE:`${i} > ${n}, ${i} > *:not(${i}):not(${n}) > ${n}, ${i} > *:not(${i}):not(${n}) > *:not(${i}):not(${n}) > ${n}`,COLLAPSE_LEGACY:`${i} ${n}`,BUTTON:`${i}__btn`};class a extends s.core.Instance{static get instanceClassName(){return"Accordion"}get collapsePrimary(){return this.element.children.map((e=>e.getInstance("CollapseButton"))).filter((e=>null!==e&&e.hasClass(r.BUTTON)))[0]}}class o extends s.core.CollapsesGroup{static get instanceClassName(){return"AccordionsGroup"}validate(e){const t=e.node.matches(s.internals.legacy.isLegacy?r.COLLAPSE_LEGACY:r.COLLAPSE);return super.validate(e)&&t}}s.accordion={Accordion:a,AccordionSelector:r,AccordionsGroup:o},s.internals.register(s.accordion.AccordionSelector.GROUP,s.accordion.AccordionsGroup),s.internals.register(s.accordion.AccordionSelector.ACCORDION,s.accordion.Accordion);const l={EQUISIZED_BUTTON:`${s.internals.ns.selector("btns-group--equisized")} ${s.internals.ns.selector("btn")}`,EQUISIZED_GROUP:s.internals.ns.selector("btns-group--equisized")};s.button={ButtonSelector:l},s.internals.register(s.button.ButtonSelector.EQUISIZED_BUTTON,s.core.Equisized),s.internals.register(s.button.ButtonSelector.EQUISIZED_GROUP,s.core.EquisizedsGroup);class c extends s.core.Instance{static get instanceClassName(){return"CardDownload"}init(){this.addAscent(s.core.AssessEmission.UPDATE,(e=>{this.descend(s.core.AssessEmission.UPDATE,e)})),this.addAscent(s.core.AssessEmission.ADDED,(()=>{this.descend(s.core.AssessEmission.ADDED)}))}}const h={DOWNLOAD:s.internals.ns.selector("card--download"),DOWNLOAD_DETAIL:`${s.internals.ns.selector("card--download")} ${s.internals.ns.selector("card__end")} ${s.internals.ns.selector("card__detail")}`};s.card={CardSelector:h,CardDownload:c},s.internals.register(s.card.CardSelector.DOWNLOAD,s.card.CardDownload),s.internals.register(s.card.CardSelector.DOWNLOAD_DETAIL,s.core.AssessDetail);const d={SEGMENTED:s.internals.ns.selector("segmented"),SEGMENTED_ELEMENTS:s.internals.ns.selector("segmented__elements"),SEGMENTED_ELEMENT:s.internals.ns.selector("segmented__element input"),SEGMENTED_LEGEND:s.internals.ns.selector("segmented__legend")},u={ADDED:s.internals.ns.emission("segmented","added"),REMOVED:s.internals.ns.emission("segmented","removed")};class g extends s.core.Instance{static get instanceClassName(){return"Segmented"}init(){this.elements=this.node.querySelector(d.SEGMENTED_ELEMENTS),this.legend=this.node.querySelector(d.SEGMENTED_LEGEND),this.addAscent(u.ADDED,this.resize.bind(this)),this.addAscent(u.REMOVED,this.resize.bind(this)),this._isLegendInline=this.legend&&this.legend.classList.contains(`${s.prefix}-segmented__legend--inline`),this.isResizing=!0}resize(){const e=`${s.prefix}-segmented--vertical`,t=`${s.prefix}-segmented__legend--inline`;this.removeClass(e),this._isLegendInline&&(this.legend.classList.add(t),(this.node.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth+this.legend.offsetWidth+16>this.node.parentNode.offsetWidth)&&this.legend.classList.remove(t)),this.elements.offsetWidth>this.node.parentNode.offsetWidth||this.elements.scrollWidth>this.node.parentNode.offsetWidth?this.addClass(e):this.removeClass(e)}}class m extends s.core.Instance{static get instanceClassName(){return"SegmentedElement"}init(){this.ascend(u.ADDED)}dispose(){this.ascend(u.REMOVED)}}s.segmented={SegmentedSelector:d,SegmentedEmission:u,SegmentedElement:m,Segmented:g},s.internals.register(s.segmented.SegmentedSelector.SEGMENTED,s.segmented.Segmented),s.internals.register(s.segmented.SegmentedSelector.SEGMENTED_ELEMENT,s.segmented.SegmentedElement);const p={BREADCRUMB:s.internals.ns.selector("breadcrumb"),BUTTON:s.internals.ns.selector("breadcrumb__button")};class _ extends s.core.Instance{constructor(){super(),this.count=0,this.focusing=this.focus.bind(this)}static get instanceClassName(){return"Breadcrumb"}init(){this.getCollapse(),this.isResizing=!0}get proxy(
//# sourceMappingURL=component.module.min.js.map