Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
define("core/local/collapsable_section/events",["exports","core/event_dispatcher"],(function(_exports,_event_dispatcher){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.notifyCollapsableSectionShown=_exports.notifyCollapsableSectionHidden=_exports.eventTypes=void 0;
2
/**
3
   * The collapsable section events.
4
   *
5
   * This module wraps the standard bootstrap collapsable events, but for collapsable sections.
6
   *
7
   * @module     core/local/collapsable_section/events
8
   * @copyright  2024 Ferran Recio <ferran@moodle.com>
9
   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
10
   *
11
   * @example <caption>Example of listening to a collapsable section events.</caption>
12
   * import {eventTypes as collapsableSectionEventTypes} from 'core/local/collapsable_section/events';
13
   *
14
   * document.addEventListener(collapsableSectionEventTypes.shown, event => {
15
   *     window.console.log(event.target); // The HTMLElement relating to the block whose content was updated.
16
   * });
17
   */
18
const eventTypes={shown:"core_collapsable_section_shown",hidden:"core_collapsable_section_hidden",hideBsCollapse:"hide.bs.collapse",hiddenBsCollapse:"hidden.bs.collapse",showBsCollapse:"show.bs.collapse",shownBsCollapse:"shown.bs.collapse"};_exports.eventTypes=eventTypes;_exports.notifyCollapsableSectionShown=element=>(0,_event_dispatcher.dispatchEvent)(eventTypes.shown,{},element);_exports.notifyCollapsableSectionHidden=element=>(0,_event_dispatcher.dispatchEvent)(eventTypes.hidden,{},element)}));
19
 
20
//# sourceMappingURL=events.min.js.map