@dialpad/dialtone 9.91.1 → 9.92.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.
Files changed (34) hide show
  1. package/dist/tokens/doc.json +23151 -23151
  2. package/dist/vue2/component-documentation.json +1 -1
  3. package/dist/vue2/components/hovercard/hovercard.vue.cjs +32 -12
  4. package/dist/vue2/components/hovercard/hovercard.vue.cjs.map +1 -1
  5. package/dist/vue2/components/hovercard/hovercard.vue.js +33 -13
  6. package/dist/vue2/components/hovercard/hovercard.vue.js.map +1 -1
  7. package/dist/vue2/components/popover/popover.vue.cjs +21 -43
  8. package/dist/vue2/components/popover/popover.vue.cjs.map +1 -1
  9. package/dist/vue2/components/popover/popover.vue.js +21 -43
  10. package/dist/vue2/components/popover/popover.vue.js.map +1 -1
  11. package/dist/vue2/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
  12. package/dist/vue3/component-documentation.json +1 -1
  13. package/dist/vue3/components/hovercard/hovercard.vue.cjs +30 -4
  14. package/dist/vue3/components/hovercard/hovercard.vue.cjs.map +1 -1
  15. package/dist/vue3/components/hovercard/hovercard.vue.js +32 -6
  16. package/dist/vue3/components/hovercard/hovercard.vue.js.map +1 -1
  17. package/dist/vue3/components/popover/popover.vue.cjs +23 -45
  18. package/dist/vue3/components/popover/popover.vue.cjs.map +1 -1
  19. package/dist/vue3/components/popover/popover.vue.js +23 -45
  20. package/dist/vue3/components/popover/popover.vue.js.map +1 -1
  21. package/dist/vue3/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
  22. package/package.json +1 -1
  23. package/dist/vue2/components/hovercard/timer.cjs +0 -59
  24. package/dist/vue2/components/hovercard/timer.cjs.map +0 -1
  25. package/dist/vue2/components/hovercard/timer.js +0 -59
  26. package/dist/vue2/components/hovercard/timer.js.map +0 -1
  27. package/dist/vue2/types/components/hovercard/timer.d.ts +0 -3
  28. package/dist/vue2/types/components/hovercard/timer.d.ts.map +0 -1
  29. package/dist/vue3/components/hovercard/timer.cjs +0 -60
  30. package/dist/vue3/components/hovercard/timer.cjs.map +0 -1
  31. package/dist/vue3/components/hovercard/timer.js +0 -60
  32. package/dist/vue3/components/hovercard/timer.js.map +0 -1
  33. package/dist/vue3/types/components/hovercard/timer.d.ts +0 -3
  34. package/dist/vue3/types/components/hovercard/timer.d.ts.map +0 -1
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const common_utils = require("../../common/utils.cjs");
4
- const timer = require("./timer.cjs");
5
4
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
6
5
  const popover = require("../popover/popover.vue.cjs");
7
6
  const tooltip_constants = require("../tooltip/tooltip_constants.cjs");
@@ -13,10 +12,20 @@ const _sfc_main = {
13
12
  },
14
13
  props: {
15
14
  /**
16
- * Fade transition when the content display is toggled.
17
- * @type boolean
18
- * @values true, false
19
- */
15
+ * Controls whether the hovercard is shown. Leaving this null will have the hovercard trigger on hover by default.
16
+ * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.
17
+ * Supports .sync modifier
18
+ * @values null, true, false
19
+ */
20
+ open: {
21
+ type: Boolean,
22
+ default: null
23
+ },
24
+ /**
25
+ * Fade transition when the content display is toggled.
26
+ * @type boolean
27
+ * @values true, false
28
+ */
20
29
  transition: {
21
30
  type: Boolean,
22
31
  default: false
@@ -116,6 +125,22 @@ const _sfc_main = {
116
125
  validator: (appendTo) => {
117
126
  return popover_constants.POPOVER_APPEND_TO_VALUES.includes(appendTo) || appendTo instanceof HTMLElement;
118
127
  }
128
+ },
129
+ /**
130
+ * The enter delay in milliseconds before the hovercard is shown.
131
+ * @type number
132
+ */
133
+ enterDelay: {
134
+ type: Number,
135
+ default: tooltip_constants.TOOLTIP_DELAY_MS
136
+ },
137
+ /**
138
+ * The leave delay in milliseconds before the hovercard is hidden.
139
+ * @type number
140
+ */
141
+ leaveDelay: {
142
+ type: Number,
143
+ default: tooltip_constants.TOOLTIP_DELAY_MS
119
144
  }
120
145
  },
121
146
  emits: [
@@ -126,16 +151,11 @@ const _sfc_main = {
126
151
  * @type {Boolean | Array}
127
152
  */
128
153
  "opened"
129
- ],
130
- data() {
131
- return {
132
- timer: timer.default()
133
- };
134
- }
154
+ ]
135
155
  };
136
156
  var _sfc_render = function render() {
137
157
  var _vm = this, _c = _vm._self._c;
138
- return _c("dt-popover", { attrs: { "id": _vm.id, "placement": _vm.placement, "content-class": _vm.contentClass, "fallback-placements": _vm.fallbackPlacements, "padding": _vm.padding, "transition": _vm.transition ? "fade" : null, "offset": _vm.offset, "modal": false, "initial-focus-element": "none", "header-class": _vm.headerClass, "footer-class": _vm.footerClass, "append-to": _vm.appendTo, "hovercard": true, "timer": _vm.timer, "data-qa": "dt-hovercard" }, on: { "opened": (e) => _vm.$emit("opened", e) }, scopedSlots: _vm._u([{ key: "anchor", fn: function({ attrs }) {
158
+ return _c("dt-popover", { attrs: { "id": _vm.id, "placement": _vm.placement, "content-class": _vm.contentClass, "fallback-placements": _vm.fallbackPlacements, "padding": _vm.padding, "transition": _vm.transition ? "fade" : null, "offset": _vm.offset, "modal": false, "initial-focus-element": "none", "header-class": _vm.headerClass, "footer-class": _vm.footerClass, "append-to": _vm.appendTo, "hovercard": true, "data-qa": "dt-hovercard", "open": _vm.open, "enter-delay": _vm.enterDelay, "leave-delay": _vm.leaveDelay }, on: { "opened": (e) => _vm.$emit("opened", e) }, scopedSlots: _vm._u([{ key: "anchor", fn: function({ attrs }) {
139
159
  return [_vm._t("anchor", null, null, attrs)];
140
160
  } }, { key: "content", fn: function() {
141
161
  return [_vm._t("content")];
@@ -1 +1 @@
1
- {"version":3,"file":"hovercard.vue.cjs","sources":["../../../components/hovercard/hovercard.vue"],"sourcesContent":["<!-- eslint-disable vue/multi-word-component-names -->\n<template>\n <dt-popover\n :id=\"id\"\n :placement=\"placement\"\n :content-class=\"contentClass\"\n :fallback-placements=\"fallbackPlacements\"\n :padding=\"padding\"\n :transition=\"transition ? 'fade' : null\"\n :offset=\"offset\"\n :modal=\"false\"\n initial-focus-element=\"none\"\n :header-class=\"headerClass\"\n :footer-class=\"footerClass\"\n :append-to=\"appendTo\"\n :hovercard=\"true\"\n :timer=\"timer\"\n data-qa=\"dt-hovercard\"\n @opened=\"(e) => ($emit('opened', e))\"\n >\n <template #anchor=\"{ attrs }\">\n <slot\n name=\"anchor\"\n v-bind=\"attrs\"\n />\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n</template>\n\n<script>\nimport { POPOVER_APPEND_TO_VALUES, POPOVER_PADDING_CLASSES, DtPopover } from '@/components/popover/index.js';\nimport { TOOLTIP_DIRECTIONS } from '@/components/tooltip/index.js';\nimport { getUniqueString } from '@/common/utils';\nimport useTimer from './timer';\n\nexport default {\n name: 'DtHovercard',\n\n components: {\n DtPopover,\n },\n\n props: {\n /**\n * Fade transition when the content display is toggled.\n * @type boolean\n * @values true, false\n */\n transition: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * @see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top-start',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n timer: useTimer(),\n };\n },\n};\n</script>\n"],"names":["DtPopover","TOOLTIP_DIRECTIONS","POPOVER_PADDING_CLASSES","getUniqueString","POPOVER_APPEND_TO_VALUES","useTimer"],"mappings":";;;;;;;;AA6CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,WAAAA,QAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAA,CAAA,MAAA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;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,OAAAC,MAAAA,QAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"hovercard.vue.cjs","sources":["../../../components/hovercard/hovercard.vue"],"sourcesContent":["<!-- eslint-disable vue/multi-word-component-names -->\n<template>\n <dt-popover\n :id=\"id\"\n :placement=\"placement\"\n :content-class=\"contentClass\"\n :fallback-placements=\"fallbackPlacements\"\n :padding=\"padding\"\n :transition=\"transition ? 'fade' : null\"\n :offset=\"offset\"\n :modal=\"false\"\n initial-focus-element=\"none\"\n :header-class=\"headerClass\"\n :footer-class=\"footerClass\"\n :append-to=\"appendTo\"\n :hovercard=\"true\"\n data-qa=\"dt-hovercard\"\n :open=\"open\"\n :enter-delay=\"enterDelay\"\n :leave-delay=\"leaveDelay\"\n @opened=\"(e) => ($emit('opened', e))\"\n >\n <template #anchor=\"{ attrs }\">\n <slot\n name=\"anchor\"\n v-bind=\"attrs\"\n />\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n</template>\n\n<script>\nimport { POPOVER_APPEND_TO_VALUES, POPOVER_PADDING_CLASSES, DtPopover } from '@/components/popover/index.js';\nimport { TOOLTIP_DIRECTIONS, TOOLTIP_DELAY_MS } from '@/components/tooltip/index.js';\nimport { getUniqueString } from '@/common/utils';\n\nexport default {\n name: 'DtHovercard',\n\n components: {\n DtPopover,\n },\n\n props: {\n /**\n * Controls whether the hovercard is shown. Leaving this null will have the hovercard trigger on hover by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Fade transition when the content display is toggled.\n * @type boolean\n * @values true, false\n */\n transition: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * @see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top-start',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * The enter delay in milliseconds before the hovercard is shown.\n * @type number\n */\n enterDelay: {\n type: Number,\n default: TOOLTIP_DELAY_MS,\n },\n\n /**\n * The leave delay in milliseconds before the hovercard is hidden.\n * @type number\n */\n leaveDelay: {\n type: Number,\n default: TOOLTIP_DELAY_MS,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n};\n</script>\n"],"names":["DtPopover","TOOLTIP_DIRECTIONS","POPOVER_PADDING_CLASSES","getUniqueString","POPOVER_APPEND_TO_VALUES","TOOLTIP_DELAY_MS"],"mappings":";;;;;;;AA8CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,WAAAA,QAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,WAAA;AACA,eAAAC,kBAAA,mBAAA,SAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,YAAA;AACA,eAAA,OAAA,KAAAC,yCAAA,EAAA,KAAA,CAA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niqueString } from "../../common/utils.js";
2
- import useTimer from "./timer.js";
3
2
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
4
3
  import DtPopover from "../popover/popover.vue.js";
5
- import { TOOLTIP_DIRECTIONS } from "../tooltip/tooltip_constants.js";
4
+ import { TOOLTIP_DIRECTIONS, TOOLTIP_DELAY_MS } from "../tooltip/tooltip_constants.js";
6
5
  import { POPOVER_PADDING_CLASSES, POPOVER_APPEND_TO_VALUES } from "../popover/popover_constants.js";
7
6
  const _sfc_main = {
8
7
  name: "DtHovercard",
@@ -11,10 +10,20 @@ const _sfc_main = {
11
10
  },
12
11
  props: {
13
12
  /**
14
- * Fade transition when the content display is toggled.
15
- * @type boolean
16
- * @values true, false
17
- */
13
+ * Controls whether the hovercard is shown. Leaving this null will have the hovercard trigger on hover by default.
14
+ * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.
15
+ * Supports .sync modifier
16
+ * @values null, true, false
17
+ */
18
+ open: {
19
+ type: Boolean,
20
+ default: null
21
+ },
22
+ /**
23
+ * Fade transition when the content display is toggled.
24
+ * @type boolean
25
+ * @values true, false
26
+ */
18
27
  transition: {
19
28
  type: Boolean,
20
29
  default: false
@@ -114,6 +123,22 @@ const _sfc_main = {
114
123
  validator: (appendTo) => {
115
124
  return POPOVER_APPEND_TO_VALUES.includes(appendTo) || appendTo instanceof HTMLElement;
116
125
  }
126
+ },
127
+ /**
128
+ * The enter delay in milliseconds before the hovercard is shown.
129
+ * @type number
130
+ */
131
+ enterDelay: {
132
+ type: Number,
133
+ default: TOOLTIP_DELAY_MS
134
+ },
135
+ /**
136
+ * The leave delay in milliseconds before the hovercard is hidden.
137
+ * @type number
138
+ */
139
+ leaveDelay: {
140
+ type: Number,
141
+ default: TOOLTIP_DELAY_MS
117
142
  }
118
143
  },
119
144
  emits: [
@@ -124,16 +149,11 @@ const _sfc_main = {
124
149
  * @type {Boolean | Array}
125
150
  */
126
151
  "opened"
127
- ],
128
- data() {
129
- return {
130
- timer: useTimer()
131
- };
132
- }
152
+ ]
133
153
  };
134
154
  var _sfc_render = function render() {
135
155
  var _vm = this, _c = _vm._self._c;
136
- return _c("dt-popover", { attrs: { "id": _vm.id, "placement": _vm.placement, "content-class": _vm.contentClass, "fallback-placements": _vm.fallbackPlacements, "padding": _vm.padding, "transition": _vm.transition ? "fade" : null, "offset": _vm.offset, "modal": false, "initial-focus-element": "none", "header-class": _vm.headerClass, "footer-class": _vm.footerClass, "append-to": _vm.appendTo, "hovercard": true, "timer": _vm.timer, "data-qa": "dt-hovercard" }, on: { "opened": (e) => _vm.$emit("opened", e) }, scopedSlots: _vm._u([{ key: "anchor", fn: function({ attrs }) {
156
+ return _c("dt-popover", { attrs: { "id": _vm.id, "placement": _vm.placement, "content-class": _vm.contentClass, "fallback-placements": _vm.fallbackPlacements, "padding": _vm.padding, "transition": _vm.transition ? "fade" : null, "offset": _vm.offset, "modal": false, "initial-focus-element": "none", "header-class": _vm.headerClass, "footer-class": _vm.footerClass, "append-to": _vm.appendTo, "hovercard": true, "data-qa": "dt-hovercard", "open": _vm.open, "enter-delay": _vm.enterDelay, "leave-delay": _vm.leaveDelay }, on: { "opened": (e) => _vm.$emit("opened", e) }, scopedSlots: _vm._u([{ key: "anchor", fn: function({ attrs }) {
137
157
  return [_vm._t("anchor", null, null, attrs)];
138
158
  } }, { key: "content", fn: function() {
139
159
  return [_vm._t("content")];
@@ -1 +1 @@
1
- {"version":3,"file":"hovercard.vue.js","sources":["../../../components/hovercard/hovercard.vue"],"sourcesContent":["<!-- eslint-disable vue/multi-word-component-names -->\n<template>\n <dt-popover\n :id=\"id\"\n :placement=\"placement\"\n :content-class=\"contentClass\"\n :fallback-placements=\"fallbackPlacements\"\n :padding=\"padding\"\n :transition=\"transition ? 'fade' : null\"\n :offset=\"offset\"\n :modal=\"false\"\n initial-focus-element=\"none\"\n :header-class=\"headerClass\"\n :footer-class=\"footerClass\"\n :append-to=\"appendTo\"\n :hovercard=\"true\"\n :timer=\"timer\"\n data-qa=\"dt-hovercard\"\n @opened=\"(e) => ($emit('opened', e))\"\n >\n <template #anchor=\"{ attrs }\">\n <slot\n name=\"anchor\"\n v-bind=\"attrs\"\n />\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n</template>\n\n<script>\nimport { POPOVER_APPEND_TO_VALUES, POPOVER_PADDING_CLASSES, DtPopover } from '@/components/popover/index.js';\nimport { TOOLTIP_DIRECTIONS } from '@/components/tooltip/index.js';\nimport { getUniqueString } from '@/common/utils';\nimport useTimer from './timer';\n\nexport default {\n name: 'DtHovercard',\n\n components: {\n DtPopover,\n },\n\n props: {\n /**\n * Fade transition when the content display is toggled.\n * @type boolean\n * @values true, false\n */\n transition: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * @see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top-start',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n timer: useTimer(),\n };\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;AA6CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAWA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,WAAA;AACA,eAAA,mBAAA,SAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,YAAA;AACA,eAAA,OAAA,KAAA,uBAAA,EAAA,KAAA,CAAA,SAAA,SAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,MAAA,CAAA,aAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,cAAA;AACA,eAAA,yBAAA,SAAA,QAAA,KACA,oBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,OAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"hovercard.vue.js","sources":["../../../components/hovercard/hovercard.vue"],"sourcesContent":["<!-- eslint-disable vue/multi-word-component-names -->\n<template>\n <dt-popover\n :id=\"id\"\n :placement=\"placement\"\n :content-class=\"contentClass\"\n :fallback-placements=\"fallbackPlacements\"\n :padding=\"padding\"\n :transition=\"transition ? 'fade' : null\"\n :offset=\"offset\"\n :modal=\"false\"\n initial-focus-element=\"none\"\n :header-class=\"headerClass\"\n :footer-class=\"footerClass\"\n :append-to=\"appendTo\"\n :hovercard=\"true\"\n data-qa=\"dt-hovercard\"\n :open=\"open\"\n :enter-delay=\"enterDelay\"\n :leave-delay=\"leaveDelay\"\n @opened=\"(e) => ($emit('opened', e))\"\n >\n <template #anchor=\"{ attrs }\">\n <slot\n name=\"anchor\"\n v-bind=\"attrs\"\n />\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n <template #headerContent>\n <slot name=\"headerContent\" />\n </template>\n\n <template #footerContent>\n <slot name=\"footerContent\" />\n </template>\n </dt-popover>\n</template>\n\n<script>\nimport { POPOVER_APPEND_TO_VALUES, POPOVER_PADDING_CLASSES, DtPopover } from '@/components/popover/index.js';\nimport { TOOLTIP_DIRECTIONS, TOOLTIP_DELAY_MS } from '@/components/tooltip/index.js';\nimport { getUniqueString } from '@/common/utils';\n\nexport default {\n name: 'DtHovercard',\n\n components: {\n DtPopover,\n },\n\n props: {\n /**\n * Controls whether the hovercard is shown. Leaving this null will have the hovercard trigger on hover by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Fade transition when the content display is toggled.\n * @type boolean\n * @values true, false\n */\n transition: {\n type: Boolean,\n default: false,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * @see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top-start',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * @see https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n */\n offset: {\n type: Array,\n default: () => [0, 16],\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * The enter delay in milliseconds before the hovercard is shown.\n * @type number\n */\n enterDelay: {\n type: Number,\n default: TOOLTIP_DELAY_MS,\n },\n\n /**\n * The leave delay in milliseconds before the hovercard is hidden.\n * @type number\n */\n leaveDelay: {\n type: Number,\n default: TOOLTIP_DELAY_MS,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'op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AA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,UAAA;AAAA,MACA,MAAA,CAAA,aAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,cAAA;AACA,eAAA,yBAAA,SAAA,QAAA,KACA,oBAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
@@ -347,17 +347,20 @@ const _sfc_main = {
347
347
  default: false
348
348
  },
349
349
  /**
350
- * The timer is used only when the hovercard prop is true.
351
- * It defines the delays when opening several hovercards.
352
- * It must have the keys: enter, leave and current.
353
- * If null, the default delay of 300ms will be used.
350
+ * The enter delay in milliseconds before the hovercard is shown.
351
+ * @type number
354
352
  */
355
- timer: {
356
- type: [Object, null],
357
- default: null,
358
- validator: (timer) => {
359
- return timer === null || timer.enter && timer.leave && Object.keys(timer).includes("current");
360
- }
353
+ enterDelay: {
354
+ type: Number,
355
+ default: tooltip_constants.TOOLTIP_DELAY_MS
356
+ },
357
+ /**
358
+ * The leave delay in milliseconds before the hovercard is hidden.
359
+ * @type number
360
+ */
361
+ leaveDelay: {
362
+ type: Number,
363
+ default: tooltip_constants.TOOLTIP_DELAY_MS
361
364
  }
362
365
  },
363
366
  emits: [
@@ -413,10 +416,6 @@ const _sfc_main = {
413
416
  },
414
417
  labelledBy() {
415
418
  return this.ariaLabelledby || !this.ariaLabel && common_utils.getUniqueString("DtPopover__anchor");
416
- },
417
- currentHovercard() {
418
- var _a;
419
- return (_a = this.timer) == null ? void 0 : _a.current.value;
420
419
  }
421
420
  },
422
421
  watch: {
@@ -479,15 +478,6 @@ const _sfc_main = {
479
478
  this.removeEventListeners();
480
479
  this.tip.hide();
481
480
  }
482
- },
483
- currentHovercard() {
484
- if (this.hovercard && this.timer) {
485
- if (this.currentHovercard === this.id) {
486
- this.isOpen = true;
487
- } else {
488
- this.isOpen = false;
489
- }
490
- }
491
481
  }
492
482
  },
493
483
  mounted() {
@@ -800,38 +790,26 @@ const _sfc_main = {
800
790
  setInTimer() {
801
791
  this.inTimer = setTimeout(() => {
802
792
  this.isOpen = true;
803
- }, tooltip_constants.TOOLTIP_DELAY_MS);
793
+ }, this.enterDelay);
804
794
  },
805
795
  setOutTimer() {
806
796
  this.outTimer = setTimeout(() => {
807
797
  this.isOpen = false;
808
- }, tooltip_constants.TOOLTIP_DELAY_MS);
798
+ }, this.leaveDelay);
809
799
  },
810
- onEnterAnchor() {
800
+ openHovercard() {
811
801
  if (!this.hovercard) return;
812
- if (this.timer) this.timer.enter(this.id);
813
- else {
802
+ if (this.open === null || this.open === void 0) {
814
803
  clearTimeout(this.outTimer);
815
804
  this.setInTimer();
816
805
  }
817
806
  },
818
- onLeaveAnchor() {
807
+ closeHovercard() {
819
808
  if (!this.hovercard) return;
820
- if (this.timer) this.timer.leave();
821
- else {
809
+ if (this.open === null || this.open === void 0) {
822
810
  clearTimeout(this.inTimer);
823
811
  this.setOutTimer();
824
812
  }
825
- },
826
- onEnterContent() {
827
- if (!this.hovercard) return;
828
- if (this.timer) this.timer.enter(this.id);
829
- else clearTimeout(this.outTimer);
830
- },
831
- onLeaveContent() {
832
- if (!this.hovercard) return;
833
- if (this.timer) this.timer.leave();
834
- else this.setOutTimer();
835
813
  }
836
814
  // ============================================================================
837
815
  // $ HOVERCARD
@@ -856,14 +834,14 @@ var _sfc_render = function render() {
856
834
  }], "!keydown": function($event) {
857
835
  if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "escape", void 0, $event.key, void 0)) return null;
858
836
  return _vm.closePopover.apply(null, arguments);
859
- }, "mouseenter": _vm.onEnterAnchor, "mouseleave": _vm.onLeaveAnchor } }, [_vm._t("anchor", null, { "attrs": {
837
+ }, "mouseenter": _vm.openHovercard, "mouseleave": _vm.closeHovercard } }, [_vm._t("anchor", null, { "attrs": {
860
838
  "aria-expanded": _vm.isOpen.toString(),
861
839
  "aria-controls": _vm.id,
862
840
  "aria-haspopup": _vm.role
863
841
  } })], 2), _c("dt-lazy-show", _vm._g({ ref: "content", class: ["d-popover__dialog", { "d-popover__dialog--modal": _vm.modal }, _vm.dialogClass], style: {
864
842
  "max-height": _vm.calculatedMaxHeight,
865
843
  "max-width": _vm.maxWidth
866
- }, attrs: { "id": _vm.id, "role": _vm.role, "data-qa": _vm.$attrs["data-qa"] ? `${_vm.$attrs["data-qa"]}__dialog` : "dt-popover", "aria-hidden": `${!_vm.isOpen}`, "aria-labelledby": _vm.labelledBy, "aria-label": _vm.ariaLabel, "aria-modal": `${!_vm.modal}`, "transition": _vm.transition, "show": _vm.isOpen, "tabindex": _vm.contentTabindex, "appear": "" }, on: { "mouseenter": _vm.onEnterContent, "mouseleave": _vm.onLeaveContent } }, _vm.popoverListeners), [_vm.$slots.headerContent || _vm.showCloseButton ? _c("popover-header-footer", { ref: "popover__header", class: _vm.POPOVER_HEADER_FOOTER_PADDING_CLASSES[_vm.padding], attrs: { "content-class": _vm.headerClass, "type": "header", "show-close-button": _vm.showCloseButton, "close-button-props": _vm.closeButtonProps }, on: { "close": _vm.closePopover }, scopedSlots: _vm._u([{ key: "content", fn: function() {
844
+ }, attrs: { "id": _vm.id, "role": _vm.role, "data-qa": _vm.$attrs["data-qa"] ? `${_vm.$attrs["data-qa"]}__dialog` : "dt-popover", "aria-hidden": `${!_vm.isOpen}`, "aria-labelledby": _vm.labelledBy, "aria-label": _vm.ariaLabel, "aria-modal": `${!_vm.modal}`, "transition": _vm.transition, "show": _vm.isOpen, "tabindex": _vm.contentTabindex, "appear": "" }, on: { "mouseenter": _vm.openHovercard, "mouseleave": _vm.closeHovercard } }, _vm.popoverListeners), [_vm.$slots.headerContent || _vm.showCloseButton ? _c("popover-header-footer", { ref: "popover__header", class: _vm.POPOVER_HEADER_FOOTER_PADDING_CLASSES[_vm.padding], attrs: { "content-class": _vm.headerClass, "type": "header", "show-close-button": _vm.showCloseButton, "close-button-props": _vm.closeButtonProps }, on: { "close": _vm.closePopover }, scopedSlots: _vm._u([{ key: "content", fn: function() {
867
845
  return [_vm._t("headerContent", null, { "close": _vm.closePopover })];
868
846
  }, proxy: true }], null, true) }) : _vm._e(), _c("div", { ref: "popover__content", class: [
869
847
  "d-popover__content",
@@ -1 +1 @@
1
- {"version":3,"file":"popover.vue.cjs","sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <portal v-if=\"modal && isOpen\">\n <div\n class=\"d-modal--transparent\"\n :aria-hidden=\"modal && isOpen ? 'false' : 'true'\"\n @click.prevent.stop\n />\n </portal>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n v-on=\"$listeners\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up.prevent=\"onArrowKeyPress\"\n @keydown.down.prevent=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :tabindex=\"contentTabindex\"\n appear\n v-on=\"popoverListeners\"\n @mouseenter=\"onEnterContent\"\n @mouseleave=\"onLeaveContent\"\n >\n <popover-header-footer\n v-if=\"$slots.headerContent || showCloseButton\"\n ref=\"popover__header\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n :close-button-props=\"closeButtonProps\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"$slots.footerContent\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"showVisuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './popover_constants';\nimport { getUniqueString, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { Portal } from '@linusborg/vue-simple-portal';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.vue';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { TOOLTIP_DELAY_MS } from '@/components/tooltip/index.js';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n Portal,\n },\n\n mixins: [ModalMixin, SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property, when the header popover is visible\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * Determines if the popover hides upon clicking the\n * anchor or outside the content box.\n * @values true, false\n */\n hideOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTMLElement],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\n * @values 'body', 'parent', 'root', HTMLElement\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Set this prop to true and popover component will support hovercard behaviour\n * It will open on mouseenter and close on mouseleave with timer delay of 300ms\n */\n hovercard: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The timer is used only when the hovercard prop is true.\n * It defines the delays when opening several hovercards.\n * It must have the keys: enter, leave and current.\n * If null, the default delay of 300ms will be used.\n */\n timer: {\n type: [Object, null],\n default: null,\n validator: timer => {\n return timer === null || (timer.enter && timer.leave && Object.keys(timer).includes('current'));\n },\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted to sync value with parent\n *\n * @event update:opened\n * @type {Boolean | Array}\n */\n 'update:open',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n anchorEl: null,\n popoverContentEl: null,\n inTimer: null,\n outTimer: null,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n ...this.$listeners,\n\n keydown: event => {\n this.onKeydown(event);\n this.$emit('keydown', event);\n },\n\n 'after-leave': event => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': event => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-space-300))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor'));\n },\n\n currentHovercard () {\n return this.timer?.current.value;\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\n this.initTippyInstance();\n this.tip.show();\n } else if (!isOpen && isPrev !== isOpen) {\n this.removeEventListeners();\n this.tip.hide();\n }\n },\n\n currentHovercard () {\n if (this.hovercard && this.timer) {\n if (this.currentHovercard === this.id) {\n this.isOpen = true;\n } else {\n this.isOpen = false;\n }\n }\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n\n const externalAnchorEl = this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null;\n this.anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n this.popoverContentEl = this.$refs.content?.$el;\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip.show();\n }\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-space-300) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeDestroy () {\n this.tip?.destroy();\n this.intersectionObserver.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.hovercard) { return; }\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n this.open ?? (this.anchorEl?.contains(e.target) && !this.anchorEl?.disabled && this.toggleOpen());\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n if (this.open !== null) { return; }\n\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n async onLeaveTransitionComplete () {\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n this.enableScrolling();\n }\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n focusInitialElement () {\n if (this.initialFocusElement === 'dialog') {\n this.$refs.content?.$el?.focus();\n }\n // find by ID\n if (this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n this.focusFirstElementIfNeeded(this.$refs.popover__content);\n }\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = this.$refs.content?.$el?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n }\n result ? result.focus() : this.$refs.content?.$el.focus();\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.hideOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n if (e.key === 'Tab') {\n if (this.modal) {\n this.focusTrappedTabPress(e, this.popoverContentEl);\n }\n }\n if (e.key === 'Escape') {\n this.closePopover();\n }\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n focusFirstElementIfNeeded (domEl) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n this.focusFirstElement(domEl);\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n this.$refs.content?.$el.focus();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n internalAppendTo = this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n // ============================================================================\n // $ HOVERCARD\n // ----------------------------------------------------------------------------\n\n setInTimer () {\n this.inTimer = setTimeout(() => {\n this.isOpen = true;\n }, TOOLTIP_DELAY_MS);\n },\n\n setOutTimer () {\n this.outTimer = setTimeout(() => {\n this.isOpen = false;\n }, TOOLTIP_DELAY_MS);\n },\n\n onEnterAnchor () {\n if (!this.hovercard) return;\n if (this.timer) this.timer.enter(this.id);\n else {\n clearTimeout(this.outTimer);\n this.setInTimer();\n }\n },\n\n onLeaveAnchor () {\n if (!this.hovercard) return;\n if (this.timer) this.timer.leave();\n else {\n clearTimeout(this.inTimer);\n this.setOutTimer();\n }\n },\n\n onEnterContent () {\n if (!this.hovercard) return;\n if (this.timer) this.timer.enter(this.id);\n else clearTimeout(this.outTimer);\n },\n\n onLeaveContent () {\n if (!this.hovercard) return;\n if (this.timer) this.timer.leave();\n else this.setOutTimer();\n },\n\n // ============================================================================\n // $ HOVERCARD\n // ----------------------------------------------------------------------------\n },\n};\n</script>\n"],"names":["SrOnlyCloseButton","DtLazyShow","PopoverHeaderFooter","Portal","ModalMixin","SrOnlyCloseButtonMixin","POPOVER_ROLES","POPOVER_PADDING_CLASSES","POPOVER_CONTENT_WIDTHS","getUniqueString","POPOVER_STICKY_VALUES","POPOVER_INITIAL_FOCUS_STRINGS","POPOVER_APPEND_TO_VALUES","POPOVER_HEADER_FOOTER_PADDING_CLASSES","modal","warnIfUnmounted","isOutOfViewPort","getPopperOptions","disableRootScrolling","enableRootScrolling","createTippyPopover","TOOLTIP_DELAY_MS"],"mappings":";;;;;;;;;;;;;AAkJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAA;AAAA,IACA,mBAAAA,qBAAA;AAAA,IACA,YAAAC,UAAA;AAAA,IACA,qBAAAC,sBAAA;AAAA,IACA,QAAAC,gBAAA;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,MAAA,SAAAC,8BAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IAC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AA;AAAA,QACA,QAAA,KAAA,QAAA,MAAA,KAAA,sBAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,QAAA,KAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAMA,aAAA;AACA,WAAA,UAAA,WAAA,MAAA;AACA,aAAA,SAAA;AAAA,MACA,GAAAC,kBAAA,gBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AACA,WAAA,WAAA,WAAA,MAAA;AACA,aAAA,SAAA;AAAA,MACA,GAAAA,kBAAA,gBAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,UAAA,CAAA,KAAA,UAAA;AACA,UAAA,KAAA,MAAA,MAAA,MAAA,MAAA,KAAA,EAAA;AAAA,WACA;AACA,qBAAA,KAAA,QAAA;AACA,aAAA,WAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,UAAA,CAAA,KAAA,UAAA;AACA,UAAA,KAAA,MAAA,MAAA,MAAA,MAAA;AAAA,WACA;AACA,qBAAA,KAAA,OAAA;AACA,aAAA,YAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,UAAA,CAAA,KAAA,UAAA;AACA,UAAA,KAAA,MAAA,MAAA,MAAA,MAAA,KAAA,EAAA;AAAA,UACA,cAAA,KAAA,QAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,UAAA,CAAA,KAAA,UAAA;AACA,UAAA,KAAA,MAAA,MAAA,MAAA,MAAA;AAAA,UACA,MAAA,YAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAKA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"popover.vue.cjs","sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <portal v-if=\"modal && isOpen\">\n <div\n class=\"d-modal--transparent\"\n :aria-hidden=\"modal && isOpen ? 'false' : 'true'\"\n @click.prevent.stop\n />\n </portal>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n v-on=\"$listeners\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up.prevent=\"onArrowKeyPress\"\n @keydown.down.prevent=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @mouseenter=\"openHovercard\"\n @mouseleave=\"closeHovercard\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :tabindex=\"contentTabindex\"\n appear\n v-on=\"popoverListeners\"\n @mouseenter=\"openHovercard\"\n @mouseleave=\"closeHovercard\"\n >\n <popover-header-footer\n v-if=\"$slots.headerContent || showCloseButton\"\n ref=\"popover__header\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n :close-button-props=\"closeButtonProps\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"$slots.footerContent\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"showVisuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './popover_constants';\nimport { getUniqueString, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { Portal } from '@linusborg/vue-simple-portal';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.vue';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { TOOLTIP_DELAY_MS } from '@/components/tooltip/index.js';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n Portal,\n },\n\n mixins: [ModalMixin, SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. Leaving this null will have the popover trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property, when the header popover is visible\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * Determines if the popover hides upon clicking the\n * anchor or outside the content box.\n * @values true, false\n */\n hideOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\".\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTMLElement],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\n * @values 'body', 'parent', 'root', HTMLElement\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Set this prop to true and popover component will support hovercard behaviour\n * It will open on mouseenter and close on mouseleave with timer delay of 300ms\n */\n hovercard: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The enter delay in milliseconds before the hovercard is shown.\n * @type number\n */\n enterDelay: {\n type: Number,\n default: TOOLTIP_DELAY_MS,\n },\n\n /**\n * The leave delay in milliseconds before the hovercard is hidden.\n * @type number\n */\n leaveDelay: {\n type: Number,\n default: TOOLTIP_DELAY_MS,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted to sync value with parent\n *\n * @event update:opened\n * @type {Boolean | Array}\n */\n 'update:open',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n anchorEl: null,\n popoverContentEl: null,\n inTimer: null,\n outTimer: null,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n ...this.$listeners,\n\n keydown: event => {\n this.onKeydown(event);\n this.$emit('keydown', event);\n },\n\n 'after-leave': event => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': event => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-space-300))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor'));\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\n this.initTippyInstance();\n this.tip.show();\n } else if (!isOpen && isPrev !== isOpen) {\n this.removeEventListeners();\n this.tip.hide();\n }\n },\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n\n const externalAnchorEl = this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null;\n this.anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n this.popoverContentEl = this.$refs.content?.$el;\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip.show();\n }\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-space-300) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeDestroy () {\n this.tip?.destroy();\n this.intersectionObserver.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.hovercard) { return; }\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n this.open ?? (this.anchorEl?.contains(e.target) && !this.anchorEl?.disabled && this.toggleOpen());\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n if (this.open !== null) { return; }\n\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n async onLeaveTransitionComplete () {\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n this.enableScrolling();\n }\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n focusInitialElement () {\n if (this.initialFocusElement === 'dialog') {\n this.$refs.content?.$el?.focus();\n }\n // find by ID\n if (this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n this.focusFirstElementIfNeeded(this.$refs.popover__content);\n }\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = this.$refs.content?.$el?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n }\n result ? result.focus() : this.$refs.content?.$el.focus();\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.hideOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n if (e.key === 'Tab') {\n if (this.modal) {\n this.focusTrappedTabPress(e, this.popoverContentEl);\n }\n }\n if (e.key === 'Escape') {\n this.closePopover();\n }\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n focusFirstElementIfNeeded (domEl) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n this.focusFirstElement(domEl);\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n this.$refs.content?.$el.focus();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n internalAppendTo = this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n // ============================================================================\n // $ HOVERCARD\n // ----------------------------------------------------------------------------\n\n setInTimer () {\n this.inTimer = setTimeout(() => {\n this.isOpen = true;\n }, this.enterDelay);\n },\n\n setOutTimer () {\n this.outTimer = setTimeout(() => {\n this.isOpen = false;\n }, this.leaveDelay);\n },\n\n openHovercard () {\n if (!this.hovercard) return;\n if (this.open === null || this.open === undefined) {\n clearTimeout(this.outTimer);\n this.setInTimer();\n }\n },\n\n closeHovercard () {\n if (!this.hovercard) return;\n if (this.open === null || this.open === undefined) {\n clearTimeout(this.inTimer);\n this.setOutTimer();\n }\n },\n\n // ============================================================================\n // $ HOVERCARD\n // ----------------------------------------------------------------------------\n },\n};\n</script>\n"],"names":["SrOnlyCloseButton","DtLazyShow","PopoverHeaderFooter","Portal","ModalMixin","SrOnlyCloseButtonMixin","POPOVER_ROLES","POPOVER_PADDING_CLASSES","POPOVER_CONTENT_WIDTHS","getUniqueString","POPOVER_STICKY_VALUES","POPOVER_INITIAL_FOCUS_STRINGS","POPOVER_APPEND_TO_VALUES","TOOLTIP_DELAY_MS","POPOVER_HEADER_FOOTER_PADDING_CLASSES","modal","warnIfUnmounted","isOutOfViewPort","getPopperOptions","disableRootScrolling","enableRootScrolling","createTippyPopover"],"mappings":";;;;;;;;;;;;;AAkJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAA;AAAA,IACA,mBAAAA,qBAAA;AAAA,IACA,YAAAC,UAAA;AAAA,IACA,qBAAAC,sBAAA;AAAA,IACA,QAAAC,gBAAA;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,MAAA,SAAAC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