publishing_platform_publishing_components 0.1.0
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.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.md +2 -0
- data/Rakefile +41 -0
- data/app/assets/builds/gemkeep +0 -0
- data/app/assets/config/publishing_platform_publishing_components_manifest.js +2 -0
- data/app/assets/images/publishing_platform_publishing_components/gemkeep +0 -0
- data/app/assets/stylesheets/publishing_platform_publishing_components/_all_components.scss +3 -0
- data/app/assets/stylesheets/publishing_platform_publishing_components/components/_attachment.scss +117 -0
- data/app/assets/stylesheets/publishing_platform_publishing_components/components/_summary-list.scss +169 -0
- data/app/controllers/publishing_platform_publishing_components/application_controller.rb +4 -0
- data/app/helpers/publishing_platform_publishing_components/application_helper.rb +4 -0
- data/app/models/publishing_platform_publishing_components/component_doc.rb +90 -0
- data/app/models/publishing_platform_publishing_components/component_docs.rb +57 -0
- data/app/models/publishing_platform_publishing_components/component_example.rb +104 -0
- data/app/models/publishing_platform_publishing_components/shared_accessibility_criteria.rb +37 -0
- data/app/views/publishing_platform_publishing_components/component_doc/_component_output.html.erb +15 -0
- data/app/views/publishing_platform_publishing_components/components/_attachment.html.erb +91 -0
- data/app/views/publishing_platform_publishing_components/components/_error_summary.html.erb +38 -0
- data/app/views/publishing_platform_publishing_components/components/_summary_list.html.erb +135 -0
- data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_document.html.erb +3 -0
- data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_external.html.erb +3 -0
- data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_generic.html.erb +4 -0
- data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_html.html.erb +3 -0
- data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_pdf.html.erb +3 -0
- data/app/views/publishing_platform_publishing_components/components/attachment/_thumbnail_spreadsheet.html.erb +5 -0
- data/app/views/publishing_platform_publishing_components/components/docs/attachment.yml +104 -0
- data/app/views/publishing_platform_publishing_components/components/docs/error_summary.yml +51 -0
- data/app/views/publishing_platform_publishing_components/components/docs/summary_list.yml +137 -0
- data/config/initializers/assets.rb +24 -0
- data/config/routes.rb +2 -0
- data/lib/publishing_platform_publishing_components/config.rb +25 -0
- data/lib/publishing_platform_publishing_components/engine.rb +5 -0
- data/lib/publishing_platform_publishing_components/presenters/attachment_helper.rb +176 -0
- data/lib/publishing_platform_publishing_components/presenters/component_wrapper_helper.rb +290 -0
- data/lib/publishing_platform_publishing_components/presenters/shared_helper.rb +24 -0
- data/lib/publishing_platform_publishing_components/version.rb +3 -0
- data/lib/publishing_platform_publishing_components.rb +10 -0
- data/lib/tasks/publishing_platform_publishing_components_tasks.rake +4 -0
- data/node_modules/bootstrap/LICENSE +21 -0
- data/node_modules/bootstrap/README.md +246 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.css +4085 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.min.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css +4084 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.css +601 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css +598 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.css +5406 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.min.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css +5397 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap.css +12048 -0
- data/node_modules/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap.min.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap.rtl.css +12021 -0
- data/node_modules/bootstrap/dist/css/bootstrap.rtl.css.map +1 -0
- data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
- data/node_modules/bootstrap/dist/css/bootstrap.rtl.min.css.map +1 -0
- data/node_modules/bootstrap/dist/js/bootstrap.bundle.js +6312 -0
- data/node_modules/bootstrap/dist/js/bootstrap.bundle.js.map +1 -0
- data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js +7 -0
- data/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -0
- data/node_modules/bootstrap/dist/js/bootstrap.esm.js +4447 -0
- data/node_modules/bootstrap/dist/js/bootstrap.esm.js.map +1 -0
- data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js +7 -0
- data/node_modules/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -0
- data/node_modules/bootstrap/dist/js/bootstrap.js +4494 -0
- data/node_modules/bootstrap/dist/js/bootstrap.js.map +1 -0
- data/node_modules/bootstrap/dist/js/bootstrap.min.js +7 -0
- data/node_modules/bootstrap/dist/js/bootstrap.min.js.map +1 -0
- data/node_modules/bootstrap/js/dist/alert.js +90 -0
- data/node_modules/bootstrap/js/dist/alert.js.map +1 -0
- data/node_modules/bootstrap/js/dist/base-component.js +86 -0
- data/node_modules/bootstrap/js/dist/base-component.js.map +1 -0
- data/node_modules/bootstrap/js/dist/button.js +79 -0
- data/node_modules/bootstrap/js/dist/button.js.map +1 -0
- data/node_modules/bootstrap/js/dist/carousel.js +388 -0
- data/node_modules/bootstrap/js/dist/carousel.js.map +1 -0
- data/node_modules/bootstrap/js/dist/collapse.js +249 -0
- data/node_modules/bootstrap/js/dist/collapse.js.map +1 -0
- data/node_modules/bootstrap/js/dist/dom/data.js +63 -0
- data/node_modules/bootstrap/js/dist/dom/data.js.map +1 -0
- data/node_modules/bootstrap/js/dist/dom/event-handler.js +237 -0
- data/node_modules/bootstrap/js/dist/dom/event-handler.js.map +1 -0
- data/node_modules/bootstrap/js/dist/dom/manipulator.js +72 -0
- data/node_modules/bootstrap/js/dist/dom/manipulator.js.map +1 -0
- data/node_modules/bootstrap/js/dist/dom/selector-engine.js +104 -0
- data/node_modules/bootstrap/js/dist/dom/selector-engine.js.map +1 -0
- data/node_modules/bootstrap/js/dist/dropdown.js +402 -0
- data/node_modules/bootstrap/js/dist/dropdown.js.map +1 -0
- data/node_modules/bootstrap/js/dist/modal.js +320 -0
- data/node_modules/bootstrap/js/dist/modal.js.map +1 -0
- data/node_modules/bootstrap/js/dist/offcanvas.js +246 -0
- data/node_modules/bootstrap/js/dist/offcanvas.js.map +1 -0
- data/node_modules/bootstrap/js/dist/popover.js +96 -0
- data/node_modules/bootstrap/js/dist/popover.js.map +1 -0
- data/node_modules/bootstrap/js/dist/scrollspy.js +275 -0
- data/node_modules/bootstrap/js/dist/scrollspy.js.map +1 -0
- data/node_modules/bootstrap/js/dist/tab.js +285 -0
- data/node_modules/bootstrap/js/dist/tab.js.map +1 -0
- data/node_modules/bootstrap/js/dist/toast.js +198 -0
- data/node_modules/bootstrap/js/dist/toast.js.map +1 -0
- data/node_modules/bootstrap/js/dist/tooltip.js +546 -0
- data/node_modules/bootstrap/js/dist/tooltip.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/backdrop.js +139 -0
- data/node_modules/bootstrap/js/dist/util/backdrop.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/component-functions.js +42 -0
- data/node_modules/bootstrap/js/dist/util/component-functions.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/config.js +68 -0
- data/node_modules/bootstrap/js/dist/util/config.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/focustrap.js +113 -0
- data/node_modules/bootstrap/js/dist/util/focustrap.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/index.js +281 -0
- data/node_modules/bootstrap/js/dist/util/index.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/sanitizer.js +113 -0
- data/node_modules/bootstrap/js/dist/util/sanitizer.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/scrollbar.js +113 -0
- data/node_modules/bootstrap/js/dist/util/scrollbar.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/swipe.js +135 -0
- data/node_modules/bootstrap/js/dist/util/swipe.js.map +1 -0
- data/node_modules/bootstrap/js/dist/util/template-factory.js +151 -0
- data/node_modules/bootstrap/js/dist/util/template-factory.js.map +1 -0
- data/node_modules/bootstrap/js/index.esm.js +19 -0
- data/node_modules/bootstrap/js/index.umd.js +34 -0
- data/node_modules/bootstrap/js/src/alert.js +87 -0
- data/node_modules/bootstrap/js/src/base-component.js +86 -0
- data/node_modules/bootstrap/js/src/button.js +72 -0
- data/node_modules/bootstrap/js/src/carousel.js +474 -0
- data/node_modules/bootstrap/js/src/collapse.js +297 -0
- data/node_modules/bootstrap/js/src/dom/data.js +55 -0
- data/node_modules/bootstrap/js/src/dom/event-handler.js +317 -0
- data/node_modules/bootstrap/js/src/dom/manipulator.js +71 -0
- data/node_modules/bootstrap/js/src/dom/selector-engine.js +126 -0
- data/node_modules/bootstrap/js/src/dropdown.js +455 -0
- data/node_modules/bootstrap/js/src/modal.js +378 -0
- data/node_modules/bootstrap/js/src/offcanvas.js +282 -0
- data/node_modules/bootstrap/js/src/popover.js +97 -0
- data/node_modules/bootstrap/js/src/scrollspy.js +296 -0
- data/node_modules/bootstrap/js/src/tab.js +315 -0
- data/node_modules/bootstrap/js/src/toast.js +224 -0
- data/node_modules/bootstrap/js/src/tooltip.js +633 -0
- data/node_modules/bootstrap/js/src/util/backdrop.js +151 -0
- data/node_modules/bootstrap/js/src/util/component-functions.js +35 -0
- data/node_modules/bootstrap/js/src/util/config.js +65 -0
- data/node_modules/bootstrap/js/src/util/focustrap.js +115 -0
- data/node_modules/bootstrap/js/src/util/index.js +306 -0
- data/node_modules/bootstrap/js/src/util/sanitizer.js +116 -0
- data/node_modules/bootstrap/js/src/util/scrollbar.js +114 -0
- data/node_modules/bootstrap/js/src/util/swipe.js +146 -0
- data/node_modules/bootstrap/js/src/util/template-factory.js +160 -0
- data/node_modules/bootstrap/package.json +210 -0
- data/node_modules/bootstrap/scss/_accordion.scss +153 -0
- data/node_modules/bootstrap/scss/_alert.scss +68 -0
- data/node_modules/bootstrap/scss/_badge.scss +38 -0
- data/node_modules/bootstrap/scss/_breadcrumb.scss +40 -0
- data/node_modules/bootstrap/scss/_button-group.scss +147 -0
- data/node_modules/bootstrap/scss/_buttons.scss +216 -0
- data/node_modules/bootstrap/scss/_card.scss +238 -0
- data/node_modules/bootstrap/scss/_carousel.scss +226 -0
- data/node_modules/bootstrap/scss/_close.scss +66 -0
- data/node_modules/bootstrap/scss/_containers.scss +41 -0
- data/node_modules/bootstrap/scss/_dropdown.scss +250 -0
- data/node_modules/bootstrap/scss/_forms.scss +9 -0
- data/node_modules/bootstrap/scss/_functions.scss +302 -0
- data/node_modules/bootstrap/scss/_grid.scss +39 -0
- data/node_modules/bootstrap/scss/_helpers.scss +12 -0
- data/node_modules/bootstrap/scss/_images.scss +42 -0
- data/node_modules/bootstrap/scss/_list-group.scss +199 -0
- data/node_modules/bootstrap/scss/_maps.scss +174 -0
- data/node_modules/bootstrap/scss/_mixins.scss +42 -0
- data/node_modules/bootstrap/scss/_modal.scss +240 -0
- data/node_modules/bootstrap/scss/_nav.scss +197 -0
- data/node_modules/bootstrap/scss/_navbar.scss +289 -0
- data/node_modules/bootstrap/scss/_offcanvas.scss +147 -0
- data/node_modules/bootstrap/scss/_pagination.scss +109 -0
- data/node_modules/bootstrap/scss/_placeholders.scss +51 -0
- data/node_modules/bootstrap/scss/_popover.scss +196 -0
- data/node_modules/bootstrap/scss/_progress.scss +68 -0
- data/node_modules/bootstrap/scss/_reboot.scss +617 -0
- data/node_modules/bootstrap/scss/_root.scss +187 -0
- data/node_modules/bootstrap/scss/_spinners.scss +86 -0
- data/node_modules/bootstrap/scss/_tables.scss +171 -0
- data/node_modules/bootstrap/scss/_toasts.scss +73 -0
- data/node_modules/bootstrap/scss/_tooltip.scss +119 -0
- data/node_modules/bootstrap/scss/_transitions.scss +27 -0
- data/node_modules/bootstrap/scss/_type.scss +106 -0
- data/node_modules/bootstrap/scss/_utilities.scss +806 -0
- data/node_modules/bootstrap/scss/_variables-dark.scss +102 -0
- data/node_modules/bootstrap/scss/_variables.scss +1753 -0
- data/node_modules/bootstrap/scss/bootstrap-grid.scss +62 -0
- data/node_modules/bootstrap/scss/bootstrap-reboot.scss +10 -0
- data/node_modules/bootstrap/scss/bootstrap-utilities.scss +19 -0
- data/node_modules/bootstrap/scss/bootstrap.scss +52 -0
- data/node_modules/bootstrap/scss/forms/_floating-labels.scss +97 -0
- data/node_modules/bootstrap/scss/forms/_form-check.scss +189 -0
- data/node_modules/bootstrap/scss/forms/_form-control.scss +214 -0
- data/node_modules/bootstrap/scss/forms/_form-range.scss +91 -0
- data/node_modules/bootstrap/scss/forms/_form-select.scss +80 -0
- data/node_modules/bootstrap/scss/forms/_form-text.scss +11 -0
- data/node_modules/bootstrap/scss/forms/_input-group.scss +132 -0
- data/node_modules/bootstrap/scss/forms/_labels.scss +36 -0
- data/node_modules/bootstrap/scss/forms/_validation.scss +12 -0
- data/node_modules/bootstrap/scss/helpers/_clearfix.scss +3 -0
- data/node_modules/bootstrap/scss/helpers/_color-bg.scss +7 -0
- data/node_modules/bootstrap/scss/helpers/_colored-links.scss +30 -0
- data/node_modules/bootstrap/scss/helpers/_focus-ring.scss +5 -0
- data/node_modules/bootstrap/scss/helpers/_icon-link.scss +25 -0
- data/node_modules/bootstrap/scss/helpers/_position.scss +36 -0
- data/node_modules/bootstrap/scss/helpers/_ratio.scss +26 -0
- data/node_modules/bootstrap/scss/helpers/_stacks.scss +15 -0
- data/node_modules/bootstrap/scss/helpers/_stretched-link.scss +15 -0
- data/node_modules/bootstrap/scss/helpers/_text-truncation.scss +7 -0
- data/node_modules/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
- data/node_modules/bootstrap/scss/helpers/_vr.scss +8 -0
- data/node_modules/bootstrap/scss/mixins/_alert.scss +18 -0
- data/node_modules/bootstrap/scss/mixins/_backdrop.scss +14 -0
- data/node_modules/bootstrap/scss/mixins/_banner.scss +7 -0
- data/node_modules/bootstrap/scss/mixins/_border-radius.scss +78 -0
- data/node_modules/bootstrap/scss/mixins/_box-shadow.scss +24 -0
- data/node_modules/bootstrap/scss/mixins/_breakpoints.scss +127 -0
- data/node_modules/bootstrap/scss/mixins/_buttons.scss +70 -0
- data/node_modules/bootstrap/scss/mixins/_caret.scss +69 -0
- data/node_modules/bootstrap/scss/mixins/_clearfix.scss +9 -0
- data/node_modules/bootstrap/scss/mixins/_color-mode.scss +21 -0
- data/node_modules/bootstrap/scss/mixins/_color-scheme.scss +7 -0
- data/node_modules/bootstrap/scss/mixins/_container.scss +11 -0
- data/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
- data/node_modules/bootstrap/scss/mixins/_forms.scss +163 -0
- data/node_modules/bootstrap/scss/mixins/_gradients.scss +47 -0
- data/node_modules/bootstrap/scss/mixins/_grid.scss +151 -0
- data/node_modules/bootstrap/scss/mixins/_image.scss +16 -0
- data/node_modules/bootstrap/scss/mixins/_list-group.scss +26 -0
- data/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
- data/node_modules/bootstrap/scss/mixins/_pagination.scss +10 -0
- data/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
- data/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
- data/node_modules/bootstrap/scss/mixins/_table-variants.scss +24 -0
- data/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
- data/node_modules/bootstrap/scss/mixins/_transition.scss +26 -0
- data/node_modules/bootstrap/scss/mixins/_utilities.scss +97 -0
- data/node_modules/bootstrap/scss/mixins/_visually-hidden.scss +38 -0
- data/node_modules/bootstrap/scss/utilities/_api.scss +47 -0
- data/node_modules/bootstrap/scss/vendor/_rfs.scss +348 -0
- metadata +448 -0
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Bootstrap tooltip.js v5.3.8 (https://getbootstrap.com/)
|
|
3
|
+
* Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
4
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5
|
+
*/
|
|
6
|
+
(function (global, factory) {
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core'), require('./base-component.js'), require('./dom/event-handler.js'), require('./dom/manipulator.js'), require('./util/index.js'), require('./util/sanitizer.js'), require('./util/template-factory.js')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['@popperjs/core', './base-component', './dom/event-handler', './dom/manipulator', './util/index', './util/sanitizer', './util/template-factory'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global["@popperjs/core"], global.BaseComponent, global.EventHandler, global.Manipulator, global.Index, global.Sanitizer, global.TemplateFactory));
|
|
10
|
+
})(this, (function (Popper, BaseComponent, EventHandler, Manipulator, index_js, sanitizer_js, TemplateFactory) { 'use strict';
|
|
11
|
+
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
13
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
14
|
+
if (e) {
|
|
15
|
+
for (const k in e) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: () => e[k]
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const Popper__namespace = /*#__PURE__*/_interopNamespaceDefault(Popper);
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* --------------------------------------------------------------------------
|
|
33
|
+
* Bootstrap tooltip.js
|
|
34
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
35
|
+
* --------------------------------------------------------------------------
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Constants
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
const NAME = 'tooltip';
|
|
44
|
+
const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
|
|
45
|
+
const CLASS_NAME_FADE = 'fade';
|
|
46
|
+
const CLASS_NAME_MODAL = 'modal';
|
|
47
|
+
const CLASS_NAME_SHOW = 'show';
|
|
48
|
+
const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
|
|
49
|
+
const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;
|
|
50
|
+
const EVENT_MODAL_HIDE = 'hide.bs.modal';
|
|
51
|
+
const TRIGGER_HOVER = 'hover';
|
|
52
|
+
const TRIGGER_FOCUS = 'focus';
|
|
53
|
+
const TRIGGER_CLICK = 'click';
|
|
54
|
+
const TRIGGER_MANUAL = 'manual';
|
|
55
|
+
const EVENT_HIDE = 'hide';
|
|
56
|
+
const EVENT_HIDDEN = 'hidden';
|
|
57
|
+
const EVENT_SHOW = 'show';
|
|
58
|
+
const EVENT_SHOWN = 'shown';
|
|
59
|
+
const EVENT_INSERTED = 'inserted';
|
|
60
|
+
const EVENT_CLICK = 'click';
|
|
61
|
+
const EVENT_FOCUSIN = 'focusin';
|
|
62
|
+
const EVENT_FOCUSOUT = 'focusout';
|
|
63
|
+
const EVENT_MOUSEENTER = 'mouseenter';
|
|
64
|
+
const EVENT_MOUSELEAVE = 'mouseleave';
|
|
65
|
+
const AttachmentMap = {
|
|
66
|
+
AUTO: 'auto',
|
|
67
|
+
TOP: 'top',
|
|
68
|
+
RIGHT: index_js.isRTL() ? 'left' : 'right',
|
|
69
|
+
BOTTOM: 'bottom',
|
|
70
|
+
LEFT: index_js.isRTL() ? 'right' : 'left'
|
|
71
|
+
};
|
|
72
|
+
const Default = {
|
|
73
|
+
allowList: sanitizer_js.DefaultAllowlist,
|
|
74
|
+
animation: true,
|
|
75
|
+
boundary: 'clippingParents',
|
|
76
|
+
container: false,
|
|
77
|
+
customClass: '',
|
|
78
|
+
delay: 0,
|
|
79
|
+
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
|
80
|
+
html: false,
|
|
81
|
+
offset: [0, 6],
|
|
82
|
+
placement: 'top',
|
|
83
|
+
popperConfig: null,
|
|
84
|
+
sanitize: true,
|
|
85
|
+
sanitizeFn: null,
|
|
86
|
+
selector: false,
|
|
87
|
+
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
|
|
88
|
+
title: '',
|
|
89
|
+
trigger: 'hover focus'
|
|
90
|
+
};
|
|
91
|
+
const DefaultType = {
|
|
92
|
+
allowList: 'object',
|
|
93
|
+
animation: 'boolean',
|
|
94
|
+
boundary: '(string|element)',
|
|
95
|
+
container: '(string|element|boolean)',
|
|
96
|
+
customClass: '(string|function)',
|
|
97
|
+
delay: '(number|object)',
|
|
98
|
+
fallbackPlacements: 'array',
|
|
99
|
+
html: 'boolean',
|
|
100
|
+
offset: '(array|string|function)',
|
|
101
|
+
placement: '(string|function)',
|
|
102
|
+
popperConfig: '(null|object|function)',
|
|
103
|
+
sanitize: 'boolean',
|
|
104
|
+
sanitizeFn: '(null|function)',
|
|
105
|
+
selector: '(string|boolean)',
|
|
106
|
+
template: 'string',
|
|
107
|
+
title: '(string|element|function)',
|
|
108
|
+
trigger: 'string'
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Class definition
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
class Tooltip extends BaseComponent {
|
|
116
|
+
constructor(element, config) {
|
|
117
|
+
if (typeof Popper__namespace === 'undefined') {
|
|
118
|
+
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
|
|
119
|
+
}
|
|
120
|
+
super(element, config);
|
|
121
|
+
|
|
122
|
+
// Private
|
|
123
|
+
this._isEnabled = true;
|
|
124
|
+
this._timeout = 0;
|
|
125
|
+
this._isHovered = null;
|
|
126
|
+
this._activeTrigger = {};
|
|
127
|
+
this._popper = null;
|
|
128
|
+
this._templateFactory = null;
|
|
129
|
+
this._newContent = null;
|
|
130
|
+
|
|
131
|
+
// Protected
|
|
132
|
+
this.tip = null;
|
|
133
|
+
this._setListeners();
|
|
134
|
+
if (!this._config.selector) {
|
|
135
|
+
this._fixTitle();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Getters
|
|
140
|
+
static get Default() {
|
|
141
|
+
return Default;
|
|
142
|
+
}
|
|
143
|
+
static get DefaultType() {
|
|
144
|
+
return DefaultType;
|
|
145
|
+
}
|
|
146
|
+
static get NAME() {
|
|
147
|
+
return NAME;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Public
|
|
151
|
+
enable() {
|
|
152
|
+
this._isEnabled = true;
|
|
153
|
+
}
|
|
154
|
+
disable() {
|
|
155
|
+
this._isEnabled = false;
|
|
156
|
+
}
|
|
157
|
+
toggleEnabled() {
|
|
158
|
+
this._isEnabled = !this._isEnabled;
|
|
159
|
+
}
|
|
160
|
+
toggle() {
|
|
161
|
+
if (!this._isEnabled) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (this._isShown()) {
|
|
165
|
+
this._leave();
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this._enter();
|
|
169
|
+
}
|
|
170
|
+
dispose() {
|
|
171
|
+
clearTimeout(this._timeout);
|
|
172
|
+
EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
|
173
|
+
if (this._element.getAttribute('data-bs-original-title')) {
|
|
174
|
+
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
|
|
175
|
+
}
|
|
176
|
+
this._disposePopper();
|
|
177
|
+
super.dispose();
|
|
178
|
+
}
|
|
179
|
+
show() {
|
|
180
|
+
if (this._element.style.display === 'none') {
|
|
181
|
+
throw new Error('Please use show on visible elements');
|
|
182
|
+
}
|
|
183
|
+
if (!(this._isWithContent() && this._isEnabled)) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW));
|
|
187
|
+
const shadowRoot = index_js.findShadowRoot(this._element);
|
|
188
|
+
const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);
|
|
189
|
+
if (showEvent.defaultPrevented || !isInTheDom) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
// TODO: v6 remove this or make it optional
|
|
194
|
+
this._disposePopper();
|
|
195
|
+
const tip = this._getTipElement();
|
|
196
|
+
this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
|
|
197
|
+
const {
|
|
198
|
+
container
|
|
199
|
+
} = this._config;
|
|
200
|
+
if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
|
|
201
|
+
container.append(tip);
|
|
202
|
+
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));
|
|
203
|
+
}
|
|
204
|
+
this._popper = this._createPopper(tip);
|
|
205
|
+
tip.classList.add(CLASS_NAME_SHOW);
|
|
206
|
+
|
|
207
|
+
// If this is a touch-enabled device we add extra
|
|
208
|
+
// empty mouseover listeners to the body's immediate children;
|
|
209
|
+
// only needed because of broken event delegation on iOS
|
|
210
|
+
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
|
211
|
+
if ('ontouchstart' in document.documentElement) {
|
|
212
|
+
for (const element of [].concat(...document.body.children)) {
|
|
213
|
+
EventHandler.on(element, 'mouseover', index_js.noop);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
const complete = () => {
|
|
217
|
+
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN));
|
|
218
|
+
if (this._isHovered === false) {
|
|
219
|
+
this._leave();
|
|
220
|
+
}
|
|
221
|
+
this._isHovered = false;
|
|
222
|
+
};
|
|
223
|
+
this._queueCallback(complete, this.tip, this._isAnimated());
|
|
224
|
+
}
|
|
225
|
+
hide() {
|
|
226
|
+
if (!this._isShown()) {
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE));
|
|
230
|
+
if (hideEvent.defaultPrevented) {
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const tip = this._getTipElement();
|
|
234
|
+
tip.classList.remove(CLASS_NAME_SHOW);
|
|
235
|
+
|
|
236
|
+
// If this is a touch-enabled device we remove the extra
|
|
237
|
+
// empty mouseover listeners we added for iOS support
|
|
238
|
+
if ('ontouchstart' in document.documentElement) {
|
|
239
|
+
for (const element of [].concat(...document.body.children)) {
|
|
240
|
+
EventHandler.off(element, 'mouseover', index_js.noop);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
this._activeTrigger[TRIGGER_CLICK] = false;
|
|
244
|
+
this._activeTrigger[TRIGGER_FOCUS] = false;
|
|
245
|
+
this._activeTrigger[TRIGGER_HOVER] = false;
|
|
246
|
+
this._isHovered = null; // it is a trick to support manual triggering
|
|
247
|
+
|
|
248
|
+
const complete = () => {
|
|
249
|
+
if (this._isWithActiveTrigger()) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (!this._isHovered) {
|
|
253
|
+
this._disposePopper();
|
|
254
|
+
}
|
|
255
|
+
this._element.removeAttribute('aria-describedby');
|
|
256
|
+
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN));
|
|
257
|
+
};
|
|
258
|
+
this._queueCallback(complete, this.tip, this._isAnimated());
|
|
259
|
+
}
|
|
260
|
+
update() {
|
|
261
|
+
if (this._popper) {
|
|
262
|
+
this._popper.update();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Protected
|
|
267
|
+
_isWithContent() {
|
|
268
|
+
return Boolean(this._getTitle());
|
|
269
|
+
}
|
|
270
|
+
_getTipElement() {
|
|
271
|
+
if (!this.tip) {
|
|
272
|
+
this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
|
|
273
|
+
}
|
|
274
|
+
return this.tip;
|
|
275
|
+
}
|
|
276
|
+
_createTipElement(content) {
|
|
277
|
+
const tip = this._getTemplateFactory(content).toHtml();
|
|
278
|
+
|
|
279
|
+
// TODO: remove this check in v6
|
|
280
|
+
if (!tip) {
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW);
|
|
284
|
+
// TODO: v6 the following can be achieved with CSS only
|
|
285
|
+
tip.classList.add(`bs-${this.constructor.NAME}-auto`);
|
|
286
|
+
const tipId = index_js.getUID(this.constructor.NAME).toString();
|
|
287
|
+
tip.setAttribute('id', tipId);
|
|
288
|
+
if (this._isAnimated()) {
|
|
289
|
+
tip.classList.add(CLASS_NAME_FADE);
|
|
290
|
+
}
|
|
291
|
+
return tip;
|
|
292
|
+
}
|
|
293
|
+
setContent(content) {
|
|
294
|
+
this._newContent = content;
|
|
295
|
+
if (this._isShown()) {
|
|
296
|
+
this._disposePopper();
|
|
297
|
+
this.show();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
_getTemplateFactory(content) {
|
|
301
|
+
if (this._templateFactory) {
|
|
302
|
+
this._templateFactory.changeContent(content);
|
|
303
|
+
} else {
|
|
304
|
+
this._templateFactory = new TemplateFactory({
|
|
305
|
+
...this._config,
|
|
306
|
+
// the `content` var has to be after `this._config`
|
|
307
|
+
// to override config.content in case of popover
|
|
308
|
+
content,
|
|
309
|
+
extraClass: this._resolvePossibleFunction(this._config.customClass)
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
return this._templateFactory;
|
|
313
|
+
}
|
|
314
|
+
_getContentForTemplate() {
|
|
315
|
+
return {
|
|
316
|
+
[SELECTOR_TOOLTIP_INNER]: this._getTitle()
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
_getTitle() {
|
|
320
|
+
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Private
|
|
324
|
+
_initializeOnDelegatedTarget(event) {
|
|
325
|
+
return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());
|
|
326
|
+
}
|
|
327
|
+
_isAnimated() {
|
|
328
|
+
return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE);
|
|
329
|
+
}
|
|
330
|
+
_isShown() {
|
|
331
|
+
return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW);
|
|
332
|
+
}
|
|
333
|
+
_createPopper(tip) {
|
|
334
|
+
const placement = index_js.execute(this._config.placement, [this, tip, this._element]);
|
|
335
|
+
const attachment = AttachmentMap[placement.toUpperCase()];
|
|
336
|
+
return Popper__namespace.createPopper(this._element, tip, this._getPopperConfig(attachment));
|
|
337
|
+
}
|
|
338
|
+
_getOffset() {
|
|
339
|
+
const {
|
|
340
|
+
offset
|
|
341
|
+
} = this._config;
|
|
342
|
+
if (typeof offset === 'string') {
|
|
343
|
+
return offset.split(',').map(value => Number.parseInt(value, 10));
|
|
344
|
+
}
|
|
345
|
+
if (typeof offset === 'function') {
|
|
346
|
+
return popperData => offset(popperData, this._element);
|
|
347
|
+
}
|
|
348
|
+
return offset;
|
|
349
|
+
}
|
|
350
|
+
_resolvePossibleFunction(arg) {
|
|
351
|
+
return index_js.execute(arg, [this._element, this._element]);
|
|
352
|
+
}
|
|
353
|
+
_getPopperConfig(attachment) {
|
|
354
|
+
const defaultBsPopperConfig = {
|
|
355
|
+
placement: attachment,
|
|
356
|
+
modifiers: [{
|
|
357
|
+
name: 'flip',
|
|
358
|
+
options: {
|
|
359
|
+
fallbackPlacements: this._config.fallbackPlacements
|
|
360
|
+
}
|
|
361
|
+
}, {
|
|
362
|
+
name: 'offset',
|
|
363
|
+
options: {
|
|
364
|
+
offset: this._getOffset()
|
|
365
|
+
}
|
|
366
|
+
}, {
|
|
367
|
+
name: 'preventOverflow',
|
|
368
|
+
options: {
|
|
369
|
+
boundary: this._config.boundary
|
|
370
|
+
}
|
|
371
|
+
}, {
|
|
372
|
+
name: 'arrow',
|
|
373
|
+
options: {
|
|
374
|
+
element: `.${this.constructor.NAME}-arrow`
|
|
375
|
+
}
|
|
376
|
+
}, {
|
|
377
|
+
name: 'preSetPlacement',
|
|
378
|
+
enabled: true,
|
|
379
|
+
phase: 'beforeMain',
|
|
380
|
+
fn: data => {
|
|
381
|
+
// Pre-set Popper's placement attribute in order to read the arrow sizes properly.
|
|
382
|
+
// Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement
|
|
383
|
+
this._getTipElement().setAttribute('data-popper-placement', data.state.placement);
|
|
384
|
+
}
|
|
385
|
+
}]
|
|
386
|
+
};
|
|
387
|
+
return {
|
|
388
|
+
...defaultBsPopperConfig,
|
|
389
|
+
...index_js.execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
_setListeners() {
|
|
393
|
+
const triggers = this._config.trigger.split(' ');
|
|
394
|
+
for (const trigger of triggers) {
|
|
395
|
+
if (trigger === 'click') {
|
|
396
|
+
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => {
|
|
397
|
+
const context = this._initializeOnDelegatedTarget(event);
|
|
398
|
+
context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK]);
|
|
399
|
+
context.toggle();
|
|
400
|
+
});
|
|
401
|
+
} else if (trigger !== TRIGGER_MANUAL) {
|
|
402
|
+
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN);
|
|
403
|
+
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT);
|
|
404
|
+
EventHandler.on(this._element, eventIn, this._config.selector, event => {
|
|
405
|
+
const context = this._initializeOnDelegatedTarget(event);
|
|
406
|
+
context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
|
|
407
|
+
context._enter();
|
|
408
|
+
});
|
|
409
|
+
EventHandler.on(this._element, eventOut, this._config.selector, event => {
|
|
410
|
+
const context = this._initializeOnDelegatedTarget(event);
|
|
411
|
+
context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
|
|
412
|
+
context._leave();
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
this._hideModalHandler = () => {
|
|
417
|
+
if (this._element) {
|
|
418
|
+
this.hide();
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
|
422
|
+
}
|
|
423
|
+
_fixTitle() {
|
|
424
|
+
const title = this._element.getAttribute('title');
|
|
425
|
+
if (!title) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
|
|
429
|
+
this._element.setAttribute('aria-label', title);
|
|
430
|
+
}
|
|
431
|
+
this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
|
|
432
|
+
this._element.removeAttribute('title');
|
|
433
|
+
}
|
|
434
|
+
_enter() {
|
|
435
|
+
if (this._isShown() || this._isHovered) {
|
|
436
|
+
this._isHovered = true;
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
this._isHovered = true;
|
|
440
|
+
this._setTimeout(() => {
|
|
441
|
+
if (this._isHovered) {
|
|
442
|
+
this.show();
|
|
443
|
+
}
|
|
444
|
+
}, this._config.delay.show);
|
|
445
|
+
}
|
|
446
|
+
_leave() {
|
|
447
|
+
if (this._isWithActiveTrigger()) {
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
450
|
+
this._isHovered = false;
|
|
451
|
+
this._setTimeout(() => {
|
|
452
|
+
if (!this._isHovered) {
|
|
453
|
+
this.hide();
|
|
454
|
+
}
|
|
455
|
+
}, this._config.delay.hide);
|
|
456
|
+
}
|
|
457
|
+
_setTimeout(handler, timeout) {
|
|
458
|
+
clearTimeout(this._timeout);
|
|
459
|
+
this._timeout = setTimeout(handler, timeout);
|
|
460
|
+
}
|
|
461
|
+
_isWithActiveTrigger() {
|
|
462
|
+
return Object.values(this._activeTrigger).includes(true);
|
|
463
|
+
}
|
|
464
|
+
_getConfig(config) {
|
|
465
|
+
const dataAttributes = Manipulator.getDataAttributes(this._element);
|
|
466
|
+
for (const dataAttribute of Object.keys(dataAttributes)) {
|
|
467
|
+
if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {
|
|
468
|
+
delete dataAttributes[dataAttribute];
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
config = {
|
|
472
|
+
...dataAttributes,
|
|
473
|
+
...(typeof config === 'object' && config ? config : {})
|
|
474
|
+
};
|
|
475
|
+
config = this._mergeConfigObj(config);
|
|
476
|
+
config = this._configAfterMerge(config);
|
|
477
|
+
this._typeCheckConfig(config);
|
|
478
|
+
return config;
|
|
479
|
+
}
|
|
480
|
+
_configAfterMerge(config) {
|
|
481
|
+
config.container = config.container === false ? document.body : index_js.getElement(config.container);
|
|
482
|
+
if (typeof config.delay === 'number') {
|
|
483
|
+
config.delay = {
|
|
484
|
+
show: config.delay,
|
|
485
|
+
hide: config.delay
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
if (typeof config.title === 'number') {
|
|
489
|
+
config.title = config.title.toString();
|
|
490
|
+
}
|
|
491
|
+
if (typeof config.content === 'number') {
|
|
492
|
+
config.content = config.content.toString();
|
|
493
|
+
}
|
|
494
|
+
return config;
|
|
495
|
+
}
|
|
496
|
+
_getDelegateConfig() {
|
|
497
|
+
const config = {};
|
|
498
|
+
for (const [key, value] of Object.entries(this._config)) {
|
|
499
|
+
if (this.constructor.Default[key] !== value) {
|
|
500
|
+
config[key] = value;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
config.selector = false;
|
|
504
|
+
config.trigger = 'manual';
|
|
505
|
+
|
|
506
|
+
// In the future can be replaced with:
|
|
507
|
+
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
|
|
508
|
+
// `Object.fromEntries(keysWithDifferentValues)`
|
|
509
|
+
return config;
|
|
510
|
+
}
|
|
511
|
+
_disposePopper() {
|
|
512
|
+
if (this._popper) {
|
|
513
|
+
this._popper.destroy();
|
|
514
|
+
this._popper = null;
|
|
515
|
+
}
|
|
516
|
+
if (this.tip) {
|
|
517
|
+
this.tip.remove();
|
|
518
|
+
this.tip = null;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// Static
|
|
523
|
+
static jQueryInterface(config) {
|
|
524
|
+
return this.each(function () {
|
|
525
|
+
const data = Tooltip.getOrCreateInstance(this, config);
|
|
526
|
+
if (typeof config !== 'string') {
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
if (typeof data[config] === 'undefined') {
|
|
530
|
+
throw new TypeError(`No method named "${config}"`);
|
|
531
|
+
}
|
|
532
|
+
data[config]();
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* jQuery
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
index_js.defineJQueryPlugin(Tooltip);
|
|
542
|
+
|
|
543
|
+
return Tooltip;
|
|
544
|
+
|
|
545
|
+
}));
|
|
546
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["../src/tooltip.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport Manipulator from './dom/manipulator.js'\nimport {\n defineJQueryPlugin, execute, findShadowRoot, getElement, getUID, isRTL, noop\n} from './util/index.js'\nimport { DefaultAllowlist } from './util/sanitizer.js'\nimport TemplateFactory from './util/template-factory.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'tooltip'\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\nconst SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`\n\nconst EVENT_MODAL_HIDE = 'hide.bs.modal'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\nconst EVENT_HIDE = 'hide'\nconst EVENT_HIDDEN = 'hidden'\nconst EVENT_SHOW = 'show'\nconst EVENT_SHOWN = 'shown'\nconst EVENT_INSERTED = 'inserted'\nconst EVENT_CLICK = 'click'\nconst EVENT_FOCUSIN = 'focusin'\nconst EVENT_FOCUSOUT = 'focusout'\nconst EVENT_MOUSEENTER = 'mouseenter'\nconst EVENT_MOUSELEAVE = 'mouseleave'\n\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n}\n\nconst Default = {\n allowList: DefaultAllowlist,\n animation: true,\n boundary: 'clippingParents',\n container: false,\n customClass: '',\n delay: 0,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n html: false,\n offset: [0, 6],\n placement: 'top',\n popperConfig: null,\n sanitize: true,\n sanitizeFn: null,\n selector: false,\n template: '<div class=\"tooltip\" role=\"tooltip\">' +\n '<div class=\"tooltip-arrow\"></div>' +\n '<div class=\"tooltip-inner\"></div>' +\n '</div>',\n title: '',\n trigger: 'hover focus'\n}\n\nconst DefaultType = {\n allowList: 'object',\n animation: 'boolean',\n boundary: '(string|element)',\n container: '(string|element|boolean)',\n customClass: '(string|function)',\n delay: '(number|object)',\n fallbackPlacements: 'array',\n html: 'boolean',\n offset: '(array|string|function)',\n placement: '(string|function)',\n popperConfig: '(null|object|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n selector: '(string|boolean)',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string'\n}\n\n/**\n * Class definition\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org/docs/v2/)')\n }\n\n super(element, config)\n\n // Private\n this._isEnabled = true\n this._timeout = 0\n this._isHovered = null\n this._activeTrigger = {}\n this._popper = null\n this._templateFactory = null\n this._newContent = null\n\n // Protected\n this.tip = null\n\n this._setListeners()\n\n if (!this._config.selector) {\n this._fixTitle()\n }\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle() {\n if (!this._isEnabled) {\n return\n }\n\n if (this._isShown()) {\n this._leave()\n return\n }\n\n this._enter()\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n\n if (this._element.getAttribute('data-bs-original-title')) {\n this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'))\n }\n\n this._disposePopper()\n super.dispose()\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n if (!(this._isWithContent() && this._isEnabled)) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW))\n const shadowRoot = findShadowRoot(this._element)\n const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element)\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return\n }\n\n // TODO: v6 remove this or make it optional\n this._disposePopper()\n\n const tip = this._getTipElement()\n\n this._element.setAttribute('aria-describedby', tip.getAttribute('id'))\n\n const { container } = this._config\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip)\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED))\n }\n\n this._popper = this._createPopper(tip)\n\n tip.classList.add(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop)\n }\n }\n\n const complete = () => {\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN))\n\n if (this._isHovered === false) {\n this._leave()\n }\n\n this._isHovered = false\n }\n\n this._queueCallback(complete, this.tip, this._isAnimated())\n }\n\n hide() {\n if (!this._isShown()) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE))\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const tip = this._getTipElement()\n tip.classList.remove(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop)\n }\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false\n this._activeTrigger[TRIGGER_FOCUS] = false\n this._activeTrigger[TRIGGER_HOVER] = false\n this._isHovered = null // it is a trick to support manual triggering\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return\n }\n\n if (!this._isHovered) {\n this._disposePopper()\n }\n\n this._element.removeAttribute('aria-describedby')\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN))\n }\n\n this._queueCallback(complete, this.tip, this._isAnimated())\n }\n\n update() {\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Protected\n _isWithContent() {\n return Boolean(this._getTitle())\n }\n\n _getTipElement() {\n if (!this.tip) {\n this.tip = this._createTipElement(this._newContent || this._getContentForTemplate())\n }\n\n return this.tip\n }\n\n _createTipElement(content) {\n const tip = this._getTemplateFactory(content).toHtml()\n\n // TODO: remove this check in v6\n if (!tip) {\n return null\n }\n\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n // TODO: v6 the following can be achieved with CSS only\n tip.classList.add(`bs-${this.constructor.NAME}-auto`)\n\n const tipId = getUID(this.constructor.NAME).toString()\n\n tip.setAttribute('id', tipId)\n\n if (this._isAnimated()) {\n tip.classList.add(CLASS_NAME_FADE)\n }\n\n return tip\n }\n\n setContent(content) {\n this._newContent = content\n if (this._isShown()) {\n this._disposePopper()\n this.show()\n }\n }\n\n _getTemplateFactory(content) {\n if (this._templateFactory) {\n this._templateFactory.changeContent(content)\n } else {\n this._templateFactory = new TemplateFactory({\n ...this._config,\n // the `content` var has to be after `this._config`\n // to override config.content in case of popover\n content,\n extraClass: this._resolvePossibleFunction(this._config.customClass)\n })\n }\n\n return this._templateFactory\n }\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n }\n }\n\n _getTitle() {\n return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title')\n }\n\n // Private\n _initializeOnDelegatedTarget(event) {\n return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())\n }\n\n _isAnimated() {\n return this._config.animation || (this.tip && this.tip.classList.contains(CLASS_NAME_FADE))\n }\n\n _isShown() {\n return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW)\n }\n\n _createPopper(tip) {\n const placement = execute(this._config.placement, [this, tip, this._element])\n const attachment = AttachmentMap[placement.toUpperCase()]\n return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _resolvePossibleFunction(arg) {\n return execute(arg, [this._element, this._element])\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n },\n {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n },\n {\n name: 'preSetPlacement',\n enabled: true,\n phase: 'beforeMain',\n fn: data => {\n // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n this._getTipElement().setAttribute('data-popper-placement', data.state.placement)\n }\n }\n ]\n }\n\n return {\n ...defaultBsPopperConfig,\n ...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])\n }\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ')\n\n for (const trigger of triggers) {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event)\n context._activeTrigger[TRIGGER_CLICK] = !(context._isShown() && context._activeTrigger[TRIGGER_CLICK])\n context.toggle()\n })\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ?\n this.constructor.eventName(EVENT_MOUSEENTER) :\n this.constructor.eventName(EVENT_FOCUSIN)\n const eventOut = trigger === TRIGGER_HOVER ?\n this.constructor.eventName(EVENT_MOUSELEAVE) :\n this.constructor.eventName(EVENT_FOCUSOUT)\n\n EventHandler.on(this._element, eventIn, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event)\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true\n context._enter()\n })\n EventHandler.on(this._element, eventOut, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event)\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] =\n context._element.contains(event.relatedTarget)\n\n context._leave()\n })\n }\n }\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide()\n }\n }\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title')\n\n if (!title) {\n return\n }\n\n if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n this._element.setAttribute('aria-label', title)\n }\n\n this._element.setAttribute('data-bs-original-title', title) // DO NOT USE IT. Is only for backwards compatibility\n this._element.removeAttribute('title')\n }\n\n _enter() {\n if (this._isShown() || this._isHovered) {\n this._isHovered = true\n return\n }\n\n this._isHovered = true\n\n this._setTimeout(() => {\n if (this._isHovered) {\n this.show()\n }\n }, this._config.delay.show)\n }\n\n _leave() {\n if (this._isWithActiveTrigger()) {\n return\n }\n\n this._isHovered = false\n\n this._setTimeout(() => {\n if (!this._isHovered) {\n this.hide()\n }\n }, this._config.delay.hide)\n }\n\n _setTimeout(handler, timeout) {\n clearTimeout(this._timeout)\n this._timeout = setTimeout(handler, timeout)\n }\n\n _isWithActiveTrigger() {\n return Object.values(this._activeTrigger).includes(true)\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n for (const dataAttribute of Object.keys(dataAttributes)) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n delete dataAttributes[dataAttribute]\n }\n }\n\n config = {\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n }\n config = this._mergeConfigObj(config)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n _configAfterMerge(config) {\n config.container = config.container === false ? document.body : getElement(config.container)\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n for (const [key, value] of Object.entries(this._config)) {\n if (this.constructor.Default[key] !== value) {\n config[key] = value\n }\n }\n\n config.selector = false\n config.trigger = 'manual'\n\n // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n return config\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n\n if (this.tip) {\n this.tip.remove()\n this.tip = null\n }\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Tooltip)\n\nexport default Tooltip\n"],"names":["NAME","DISALLOWED_ATTRIBUTES","Set","CLASS_NAME_FADE","CLASS_NAME_MODAL","CLASS_NAME_SHOW","SELECTOR_TOOLTIP_INNER","SELECTOR_MODAL","EVENT_MODAL_HIDE","TRIGGER_HOVER","TRIGGER_FOCUS","TRIGGER_CLICK","TRIGGER_MANUAL","EVENT_HIDE","EVENT_HIDDEN","EVENT_SHOW","EVENT_SHOWN","EVENT_INSERTED","EVENT_CLICK","EVENT_FOCUSIN","EVENT_FOCUSOUT","EVENT_MOUSEENTER","EVENT_MOUSELEAVE","AttachmentMap","AUTO","TOP","RIGHT","isRTL","BOTTOM","LEFT","Default","allowList","DefaultAllowlist","animation","boundary","container","customClass","delay","fallbackPlacements","html","offset","placement","popperConfig","sanitize","sanitizeFn","selector","template","title","trigger","DefaultType","Tooltip","BaseComponent","constructor","element","config","Popper","TypeError","_isEnabled","_timeout","_isHovered","_activeTrigger","_popper","_templateFactory","_newContent","tip","_setListeners","_config","_fixTitle","enable","disable","toggleEnabled","toggle","_isShown","_leave","_enter","dispose","clearTimeout","EventHandler","off","_element","closest","_hideModalHandler","getAttribute","setAttribute","_disposePopper","show","style","display","Error","_isWithContent","showEvent","eventName","shadowRoot","findShadowRoot","isInTheDom","ownerDocument","documentElement","contains","defaultPrevented","_getTipElement","append","_createPopper","classList","add","document","concat","body","children","on","noop","complete","_queueCallback","_isAnimated","hide","hideEvent","remove","_isWithActiveTrigger","removeAttribute","update","Boolean","_getTitle","_createTipElement","_getContentForTemplate","content","_getTemplateFactory","toHtml","tipId","getUID","toString","setContent","changeContent","TemplateFactory","extraClass","_resolvePossibleFunction","_initializeOnDelegatedTarget","event","getOrCreateInstance","delegateTarget","_getDelegateConfig","execute","attachment","toUpperCase","createPopper","_getPopperConfig","_getOffset","split","map","value","Number","parseInt","popperData","arg","defaultBsPopperConfig","modifiers","name","options","enabled","phase","fn","data","state","undefined","triggers","context","eventIn","eventOut","type","relatedTarget","textContent","trim","_setTimeout","handler","timeout","setTimeout","Object","values","includes","_getConfig","dataAttributes","Manipulator","getDataAttributes","dataAttribute","keys","has","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","getElement","key","entries","destroy","jQueryInterface","each","defineJQueryPlugin"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAYA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,SAAS;EACtB,MAAMC,qBAAqB,GAAG,IAAIC,GAAG,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;EAE9E,MAAMC,eAAe,GAAG,MAAM;EAC9B,MAAMC,gBAAgB,GAAG,OAAO;EAChC,MAAMC,eAAe,GAAG,MAAM;EAE9B,MAAMC,sBAAsB,GAAG,gBAAgB;EAC/C,MAAMC,cAAc,GAAG,CAAA,CAAA,EAAIH,gBAAgB,CAAA,CAAE;EAE7C,MAAMI,gBAAgB,GAAG,eAAe;EAExC,MAAMC,aAAa,GAAG,OAAO;EAC7B,MAAMC,aAAa,GAAG,OAAO;EAC7B,MAAMC,aAAa,GAAG,OAAO;EAC7B,MAAMC,cAAc,GAAG,QAAQ;EAE/B,MAAMC,UAAU,GAAG,MAAM;E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