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

4 lines
62 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) */
!function(){"use strict";var t="fr",e="dsfr",i=window[e],n=i.internals.ns.selector("accordion"),s=i.internals.ns.selector("collapse"),o={GROUP:i.internals.ns.selector("accordions-group"),ACCORDION:n,COLLAPSE:n+" > "+s+", "+n+" > *:not("+n+"):not("+s+") > "+s+", "+n+" > *:not("+n+"):not("+s+") > *:not("+n+"):not("+s+") > "+s,COLLAPSE_LEGACY:n+" "+s,BUTTON:n+"__btn"},r=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var i={collapsePrimary:{configurable:!0}},n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Accordion"},i.collapsePrimary.get=function(){return this.element.children.map((function(t){return t.getInstance("CollapseButton")})).filter((function(t){return null!==t&&t.hasClass(o.BUTTON)}))[0]},Object.defineProperties(e.prototype,i),Object.defineProperties(e,n),e}(i.core.Instance),a=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"AccordionsGroup"},e.prototype.validate=function(e){var n=e.node.matches(i.internals.legacy.isLegacy?o.COLLAPSE_LEGACY:o.COLLAPSE);return t.prototype.validate.call(this,e)&&n},Object.defineProperties(e,n),e}(i.core.CollapsesGroup);i.accordion={Accordion:r,AccordionSelector:o,AccordionsGroup:a},i.internals.register(i.accordion.AccordionSelector.GROUP,i.accordion.AccordionsGroup),i.internals.register(i.accordion.AccordionSelector.ACCORDION,i.accordion.Accordion);var c={EQUISIZED_BUTTON:i.internals.ns.selector("btns-group--equisized")+" "+i.internals.ns.selector("btn"),EQUISIZED_GROUP:i.internals.ns.selector("btns-group--equisized")};i.button={ButtonSelector:c},i.internals.register(i.button.ButtonSelector.EQUISIZED_BUTTON,i.core.Equisized),i.internals.register(i.button.ButtonSelector.EQUISIZED_GROUP,i.core.EquisizedsGroup);var l=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"CardDownload"},e.prototype.init=function(){var t=this;this.addAscent(i.core.AssessEmission.UPDATE,(function(e){t.descend(i.core.AssessEmission.UPDATE,e)})),this.addAscent(i.core.AssessEmission.ADDED,(function(){t.descend(i.core.AssessEmission.ADDED)}))},Object.defineProperties(e,n),e}(i.core.Instance),p={DOWNLOAD:i.internals.ns.selector("card--download"),DOWNLOAD_DETAIL:i.internals.ns.selector("card--download")+" "+i.internals.ns.selector("card__end")+" "+i.internals.ns.selector("card__detail")};i.card={CardSelector:p,CardDownload:l},i.internals.register(i.card.CardSelector.DOWNLOAD,i.card.CardDownload),i.internals.register(i.card.CardSelector.DOWNLOAD_DETAIL,i.core.AssessDetail);var h={SEGMENTED:i.internals.ns.selector("segmented"),SEGMENTED_ELEMENTS:i.internals.ns.selector("segmented__elements"),SEGMENTED_ELEMENT:i.internals.ns.selector("segmented__element input"),SEGMENTED_LEGEND:i.internals.ns.selector("segmented__legend")},u={ADDED:i.internals.ns.emission("segmented","added"),REMOVED:i.internals.ns.emission("segmented","removed")},d=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={instanceClassName:{configurable:!0}};return n.instanceClassName.get=function(){return"Segmented"},e.prototype.init=function(){this.elements=this.node.querySelector(h.SEGMENTED_ELEMENTS),this.legend=this.node.querySelector(h.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(i.prefix+"-segmented__legend--inline"),this.isResizing=!0},e.prototype.resize=function(){var t=i.prefix+"-segmented--vertical",e=i.prefix+"-segmented__legend--inline";this.removeClass(t),this._isLegendInline&&(this.legend.classList.add(e),(this.node.offsetWidth>this.node.par
//# sourceMappingURL=component.nomodule.min.js.map