@dialpad/dialtone-vue 3.222.2 → 3.222.3

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 (81) hide show
  1. package/dist/component-documentation.json +1 -1
  2. package/dist/components/combobox_with_popover/combobox_with_popover.vue.d.ts +18 -1
  3. package/dist/components/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  4. package/dist/components/dropdown/dropdown.vue.d.ts +18 -1
  5. package/dist/components/dropdown/dropdown.vue.d.ts.map +1 -1
  6. package/dist/components/hovercard/hovercard.vue.d.ts +40 -4
  7. package/dist/components/hovercard/hovercard.vue.d.ts.map +1 -1
  8. package/dist/components/popover/popover.vue.d.ts +18 -1
  9. package/dist/components/popover/popover.vue.d.ts.map +1 -1
  10. package/dist/components/popover/popover_constants.d.ts +2 -0
  11. package/dist/components/popover/popover_constants.d.ts.map +1 -1
  12. package/dist/components/popover/tippy_utils.d.ts +1 -1
  13. package/dist/components/popover/tippy_utils.d.ts.map +1 -1
  14. package/dist/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts +18 -1
  15. package/dist/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts.map +1 -1
  16. package/dist/components/split_button/split_button.vue.d.ts +18 -1
  17. package/dist/components/split_button/split_button.vue.d.ts.map +1 -1
  18. package/dist/components/tooltip/tooltip.vue.d.ts +2 -2
  19. package/dist/dialtone-vue.cjs +1 -1
  20. package/dist/dialtone-vue.js +2 -2
  21. package/dist/lib/editor/editor.cjs +1 -1
  22. package/dist/lib/editor/editor.js +1 -1
  23. package/dist/lib/message-input/index.cjs +1 -1
  24. package/dist/lib/message-input/index.js +1 -1
  25. package/dist/lib/message-input/message-input.cjs +1 -1
  26. package/dist/lib/message-input/message-input.js +1 -1
  27. package/dist/lib/popover/popover-constants.cjs +1 -1
  28. package/dist/lib/popover/popover-constants.cjs.map +1 -1
  29. package/dist/lib/popover/popover-constants.js +14 -9
  30. package/dist/lib/popover/popover-constants.js.map +1 -1
  31. package/dist/lib/popover/popover.cjs +1 -1
  32. package/dist/lib/popover/popover.cjs.map +1 -1
  33. package/dist/lib/popover/popover.js +55 -46
  34. package/dist/lib/popover/popover.js.map +1 -1
  35. package/dist/lib/popover/tippy-utils.cjs +1 -1
  36. package/dist/lib/popover/tippy-utils.cjs.map +1 -1
  37. package/dist/lib/popover/tippy-utils.js +2 -1
  38. package/dist/lib/popover/tippy-utils.js.map +1 -1
  39. package/dist/lib/rich-text-editor/index.cjs +1 -1
  40. package/dist/lib/rich-text-editor/index.js +1 -1
  41. package/dist/lib/rich-text-editor/markdownRenderer.js +1 -1
  42. package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  43. package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
  44. package/dist/markdownRenderer-DCgGQseq.cjs.map +1 -1
  45. package/dist/{markdownRenderer-D_P94RyM.js → markdownRenderer-vnndXQhE.js} +2 -2
  46. package/dist/{markdownRenderer-D_P94RyM.js.map → markdownRenderer-vnndXQhE.js.map} +1 -1
  47. package/dist/{message_input-DmLi63dh.cjs → message_input-B45NFtUx.cjs} +2 -2
  48. package/dist/{message_input-DmLi63dh.cjs.map → message_input-B45NFtUx.cjs.map} +1 -1
  49. package/dist/{message_input-B2fppje7.js → message_input-DQQ3d8vG.js} +2 -2
  50. package/dist/{message_input-B2fppje7.js.map → message_input-DQQ3d8vG.js.map} +1 -1
  51. package/dist/node_modules/@tiptap/vue-3.cjs.map +1 -1
  52. package/dist/node_modules/@tiptap/vue-3.js +1 -1
  53. package/dist/node_modules/@tiptap/vue-3.js.map +1 -1
  54. package/dist/recipes/buttons/callbar_button/callbar_button.vue.d.ts +2 -2
  55. package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +20 -3
  56. package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  57. package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +20 -3
  58. package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  59. package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts +18 -1
  60. package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  61. package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts +18 -1
  62. package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts.map +1 -1
  63. package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts +18 -1
  64. package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts.map +1 -1
  65. package/dist/recipes/conversation_view/editor/editor.vue.d.ts +56 -5
  66. package/dist/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  67. package/dist/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +2 -2
  68. package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts +42 -8
  69. package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  70. package/dist/recipes/conversation_view/message_input/message_input_button.vue.d.ts +2 -2
  71. package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts +20 -3
  72. package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  73. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +2 -2
  74. package/dist/recipes/leftbar/contact_row/contact_row.vue.d.ts +2 -2
  75. package/dist/recipes/leftbar/general_row/general_row.vue.d.ts +2 -2
  76. package/dist/recipes/leftbar/group_row/group_row.vue.d.ts +2 -2
  77. package/dist/{rich_text_editor-BhUKyR0E.js → rich_text_editor-COc4LaIk.js} +4 -3
  78. package/dist/{rich_text_editor-BhUKyR0E.js.map → rich_text_editor-COc4LaIk.js.map} +1 -1
  79. package/dist/{rich_text_editor-wvONcbYd.cjs → rich_text_editor-DWrdKcza.cjs} +2 -2
  80. package/dist/{rich_text_editor-wvONcbYd.cjs.map → rich_text_editor-DWrdKcza.cjs.map} +1 -1
  81. package/package.json +5 -5
@@ -5,17 +5,17 @@ import l from "../../common/mixins/modal.js";
5
5
  import u from "../../shared/sr_only_close_button.js";
6
6
  import d from "../lazy-show/lazy-show.js";
7
7
  import { createTippyPopover as f, getPopperOptions as p } from "./tippy-utils.js";
8
- import { POPOVER_APPEND_TO_VALUES as m, POPOVER_CONTENT_WIDTHS as h, POPOVER_HEADER_FOOTER_PADDING_CLASSES as g, POPOVER_INITIAL_FOCUS_STRINGS as _, POPOVER_PADDING_CLASSES as v, POPOVER_ROLES as y, POPOVER_STICKY_VALUES as b } from "./popover-constants.js";
9
- import x from "./popover-header-footer.js";
10
- import { Teleport as S, createBlock as C, createCommentVNode as w, createElementBlock as T, createElementVNode as E, createVNode as D, mergeProps as O, normalizeClass as k, openBlock as A, renderSlot as j, resolveComponent as M, resolveDynamicComponent as N, toHandlers as P, withCtx as F, withKeys as I, withModifiers as L } from "vue";
8
+ import { POPOVER_APPEND_TO_VALUES as m, POPOVER_BOUNDARY_VALUES as h, POPOVER_CONTENT_WIDTHS as g, POPOVER_HEADER_FOOTER_PADDING_CLASSES as _, POPOVER_INITIAL_FOCUS_STRINGS as v, POPOVER_PADDING_CLASSES as y, POPOVER_ROLES as b, POPOVER_STICKY_VALUES as x } from "./popover-constants.js";
9
+ import S from "./popover-header-footer.js";
10
+ import { Teleport as C, createBlock as w, createCommentVNode as T, createElementBlock as E, createElementVNode as D, createVNode as O, mergeProps as k, normalizeClass as A, openBlock as j, renderSlot as M, resolveComponent as N, resolveDynamicComponent as P, toHandlers as F, withCtx as I, withKeys as L, withModifiers as R } from "vue";
11
11
  //#region components/popover/popover.vue
12
- var R = {
12
+ var z = {
13
13
  compatConfig: { MODE: 3 },
14
14
  name: "DtPopover",
15
15
  components: {
16
16
  SrOnlyCloseButton: u,
17
17
  DtLazyShow: d,
18
- PopoverHeaderFooter: x
18
+ PopoverHeaderFooter: S
19
19
  },
20
20
  mixins: [l],
21
21
  props: {
@@ -38,7 +38,7 @@ var R = {
38
38
  role: {
39
39
  type: String,
40
40
  default: "dialog",
41
- validator: (e) => y.includes(e)
41
+ validator: (e) => b.includes(e)
42
42
  },
43
43
  ariaLabelledby: {
44
44
  type: String,
@@ -51,7 +51,7 @@ var R = {
51
51
  padding: {
52
52
  type: String,
53
53
  default: "large",
54
- validator: (e) => Object.keys(v).some((t) => t === e)
54
+ validator: (e) => Object.keys(y).some((t) => t === e)
55
55
  },
56
56
  contentClass: {
57
57
  type: [
@@ -64,7 +64,7 @@ var R = {
64
64
  contentWidth: {
65
65
  type: String,
66
66
  default: "",
67
- validator: (e) => h.includes(e)
67
+ validator: (e) => g.includes(e)
68
68
  },
69
69
  contentAppear: {
70
70
  type: Boolean,
@@ -104,6 +104,11 @@ var R = {
104
104
  type: Array,
105
105
  default: () => ["auto"]
106
106
  },
107
+ boundary: {
108
+ type: [String, e],
109
+ default: "clippingParents",
110
+ validator: (e) => h.includes(e) || e instanceof HTMLElement
111
+ },
107
112
  placement: {
108
113
  type: String,
109
114
  default: "bottom-end"
@@ -115,7 +120,7 @@ var R = {
115
120
  sticky: {
116
121
  type: [Boolean, String],
117
122
  default: !1,
118
- validator: (e) => b.includes(e)
123
+ validator: (e) => x.includes(e)
119
124
  },
120
125
  maxHeight: {
121
126
  type: String,
@@ -156,7 +161,7 @@ var R = {
156
161
  initialFocusElement: {
157
162
  type: [String, e],
158
163
  default: "first",
159
- validator: (e) => _.includes(e) || e instanceof HTMLElement || e.startsWith("#")
164
+ validator: (e) => v.includes(e) || e instanceof HTMLElement || e.startsWith("#")
160
165
  },
161
166
  openWithArrowKeys: {
162
167
  type: Boolean,
@@ -179,8 +184,8 @@ var R = {
179
184
  ],
180
185
  data() {
181
186
  return {
182
- POPOVER_PADDING_CLASSES: v,
183
- POPOVER_HEADER_FOOTER_PADDING_CLASSES: g,
187
+ POPOVER_PADDING_CLASSES: y,
188
+ POPOVER_HEADER_FOOTER_PADDING_CLASSES: _,
184
189
  intersectionObserver: null,
185
190
  mutationObserver: null,
186
191
  isOutsideViewport: !1,
@@ -235,6 +240,9 @@ var R = {
235
240
  tether() {
236
241
  this.tip?.setProps({ popperOptions: this.popperOptions() });
237
242
  },
243
+ boundary() {
244
+ this.tip?.setProps({ popperOptions: this.popperOptions() });
245
+ },
238
246
  externalAnchorElement() {
239
247
  this.updateAnchorEl();
240
248
  },
@@ -281,7 +289,8 @@ var R = {
281
289
  return p({
282
290
  fallbackPlacements: this.fallbackPlacements,
283
291
  tether: this.tether,
284
- hasHideModifierEnabled: !0
292
+ hasHideModifierEnabled: !0,
293
+ boundary: this.boundary
285
294
  });
286
295
  },
287
296
  validateProps() {
@@ -436,26 +445,26 @@ var R = {
436
445
  this.$emit("mouseleave-popover-anchor");
437
446
  }
438
447
  }
439
- }, z = [
448
+ }, B = [
440
449
  "id",
441
450
  "data-qa",
442
451
  "tabindex"
443
- ], B = ["data-qa"];
444
- function V(e, t, n, r, i, a) {
445
- let o = M("popover-header-footer"), s = M("sr-only-close-button"), c = M("dt-lazy-show");
446
- return A(), T("div", null, [n.modal && i.isOpen ? (A(), C(S, {
452
+ ], V = ["data-qa"];
453
+ function H(e, t, n, r, i, a) {
454
+ let o = N("popover-header-footer"), s = N("sr-only-close-button"), c = N("dt-lazy-show");
455
+ return j(), E("div", null, [n.modal && i.isOpen ? (j(), w(C, {
447
456
  key: 0,
448
457
  to: "body"
449
- }, [E("div", {
458
+ }, [D("div", {
450
459
  class: "d-modal--transparent",
451
460
  "aria-hidden": "false",
452
- onClick: t[0] || (t[0] = L(() => {}, ["prevent", "stop"]))
453
- })])) : w("", !0), (A(), C(N(n.elementType), {
461
+ onClick: t[0] || (t[0] = R(() => {}, ["prevent", "stop"]))
462
+ })])) : T("", !0), (j(), w(P(n.elementType), {
454
463
  ref: "popover",
455
- class: k(["d-popover", { "d-popover__anchor--opened": i.isOpen }]),
464
+ class: A(["d-popover", { "d-popover__anchor--opened": i.isOpen }]),
456
465
  "data-qa": "dt-popover-container"
457
466
  }, {
458
- default: F(() => [E("div", {
467
+ default: I(() => [D("div", {
459
468
  id: !n.ariaLabelledby && a.labelledBy,
460
469
  ref: "anchor",
461
470
  "data-qa": e.$attrs["data-qa"] ? `${e.$attrs["data-qa"]}-anchor` : "dt-popover-anchor",
@@ -463,19 +472,19 @@ function V(e, t, n, r, i, a) {
463
472
  onClickCapture: t[1] || (t[1] = (...e) => a.defaultToggleOpen && a.defaultToggleOpen(...e)),
464
473
  onContextmenu: t[2] || (t[2] = (...e) => a.onContext && a.onContext(...e)),
465
474
  onKeydown: [
466
- t[3] || (t[3] = I(L((...e) => a.onArrowKeyPress && a.onArrowKeyPress(...e), ["prevent"]), ["up"])),
467
- t[4] || (t[4] = I(L((...e) => a.onArrowKeyPress && a.onArrowKeyPress(...e), ["prevent"]), ["down"])),
468
- t[6] || (t[6] = I((t) => e.$emit("keydown", t), ["enter"])),
469
- t[7] || (t[7] = I((t) => e.$emit("keydown", t), ["space"]))
475
+ t[3] || (t[3] = L(R((...e) => a.onArrowKeyPress && a.onArrowKeyPress(...e), ["prevent"]), ["up"])),
476
+ t[4] || (t[4] = L(R((...e) => a.onArrowKeyPress && a.onArrowKeyPress(...e), ["prevent"]), ["down"])),
477
+ t[6] || (t[6] = L((t) => e.$emit("keydown", t), ["enter"])),
478
+ t[7] || (t[7] = L((t) => e.$emit("keydown", t), ["space"]))
470
479
  ],
471
- onKeydownCapture: t[5] || (t[5] = I((...e) => a.closePopover && a.closePopover(...e), ["escape"])),
480
+ onKeydownCapture: t[5] || (t[5] = L((...e) => a.closePopover && a.closePopover(...e), ["escape"])),
472
481
  onMouseenter: t[8] || (t[8] = (...e) => a.onMouseEnter && a.onMouseEnter(...e)),
473
482
  onMouseleave: t[9] || (t[9] = (...e) => a.onMouseLeave && a.onMouseLeave(...e))
474
- }, [j(e.$slots, "anchor", { attrs: {
483
+ }, [M(e.$slots, "anchor", { attrs: {
475
484
  "aria-expanded": i.isOpen.toString(),
476
485
  "aria-controls": n.id,
477
486
  "aria-haspopup": n.role
478
- } })], 40, z), D(c, O({
487
+ } })], 40, B), O(c, k({
479
488
  id: n.id,
480
489
  ref: "content",
481
490
  role: n.role,
@@ -498,48 +507,48 @@ function V(e, t, n, r, i, a) {
498
507
  },
499
508
  css: e.$attrs.css,
500
509
  tabindex: n.contentTabindex
501
- }, P(a.popoverListeners), {
510
+ }, F(a.popoverListeners), {
502
511
  onMouseenter: a.onMouseEnterAnchor,
503
512
  onMouseleave: a.onMouseLeaveAnchor
504
513
  }), {
505
- default: F(() => [
506
- i.hasSlotContent(e.$slots.headerContent) || n.showCloseButton ? (A(), C(o, {
514
+ default: I(() => [
515
+ i.hasSlotContent(e.$slots.headerContent) || n.showCloseButton ? (j(), w(o, {
507
516
  key: 0,
508
517
  ref: "popover__header",
509
- class: k(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding]),
518
+ class: A(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding]),
510
519
  "content-class": n.headerClass,
511
520
  type: "header",
512
521
  "show-close-button": n.showCloseButton,
513
522
  onClose: a.closePopover
514
523
  }, {
515
- content: F(() => [j(e.$slots, "headerContent", { close: a.closePopover })]),
524
+ content: I(() => [M(e.$slots, "headerContent", { close: a.closePopover })]),
516
525
  _: 3
517
526
  }, 8, [
518
527
  "class",
519
528
  "content-class",
520
529
  "show-close-button",
521
530
  "onClose"
522
- ])) : w("", !0),
523
- E("div", {
531
+ ])) : T("", !0),
532
+ D("div", {
524
533
  ref: "popover__content",
525
534
  "data-qa": e.$attrs["data-qa"] ? `${e.$attrs["data-qa"]}-content` : "dt-popover-content",
526
- class: k([
535
+ class: A([
527
536
  "d-popover__content",
528
537
  i.POPOVER_PADDING_CLASSES[n.padding],
529
538
  n.contentClass
530
539
  ])
531
- }, [j(e.$slots, "content", { close: a.closePopover })], 10, B),
532
- i.hasSlotContent(e.$slots.footerContent) ? (A(), C(o, {
540
+ }, [M(e.$slots, "content", { close: a.closePopover })], 10, V),
541
+ i.hasSlotContent(e.$slots.footerContent) ? (j(), w(o, {
533
542
  key: 1,
534
543
  ref: "popover__footer",
535
544
  type: "footer",
536
- class: k(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding]),
545
+ class: A(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding]),
537
546
  "content-class": n.footerClass
538
547
  }, {
539
- content: F(() => [j(e.$slots, "footerContent", { close: a.closePopover })]),
548
+ content: I(() => [M(e.$slots, "footerContent", { close: a.closePopover })]),
540
549
  _: 3
541
- }, 8, ["class", "content-class"])) : w("", !0),
542
- n.showCloseButton ? w("", !0) : (A(), C(s, {
550
+ }, 8, ["class", "content-class"])) : T("", !0),
551
+ n.showCloseButton ? T("", !0) : (j(), w(s, {
543
552
  key: 2,
544
553
  onClose: a.closePopover
545
554
  }, null, 8, ["onClose"]))
@@ -566,8 +575,8 @@ function V(e, t, n, r, i, a) {
566
575
  _: 3
567
576
  }, 8, ["class"]))]);
568
577
  }
569
- var H = /* @__PURE__ */ c(R, [["render", V]]);
578
+ var U = /* @__PURE__ */ c(z, [["render", H]]);
570
579
  //#endregion
571
- export { H as default };
580
+ export { U as default };
572
581
 
573
582
  //# sourceMappingURL=popover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":[],"sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n to=\"body\"\n >\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\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 @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\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 :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($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=\"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=\"hasSlotContent($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=\"!showCloseButton\"\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, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\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 compatConfig: { MODE: 3 },\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin],\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 v-model\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 * 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 * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\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 * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\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, HTML_ELEMENT_TYPE],\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: [HTML_ELEMENT_TYPE, 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 * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\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 externalAnchorElement () {\n this.updateAnchorEl();\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 if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\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(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\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 beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.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 updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\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 (returnFirstEl(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.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 if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\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 if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\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 if (this._isUnmounting) return;\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._isUnmounting) return;\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n if (this._isUnmounting) return;\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.enableScrolling();\n }\n if (this._isUnmounting) return;\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 if (this._isUnmounting) return;\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\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 returnFirstEl(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 = returnFirstEl(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 returnFirstEl(this.$refs.content?.$el)?.focus();\n }\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 this.$emit('keydown', e);\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 returnFirstEl(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?.destroy();\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 onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AAmJA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAKN,YAAY;EACV,mBAAA;EACA,YAAA;EAC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ADhD,EAgBwB,GAAA;;KAdtB,KAAI;KACH,OAAK,EAAE,EAAA,sCAAsC,EAAA,SAAO;KACpD,iBAAe,EAAA;KAChB,MAAK;KACJ,qBAAmB,EAAA;KACnB,SAAO,EAAA;;KAEG,SAAO,QAKd,CAHF,EAGE,EAAA,QAAA,iBAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,CAAA;;;;;;;;IAI1B,EAcM,OAAA;KAbJ,KAAI;KACH,WAAS,EAAA,OAAM,aAAA,GAAiB,EAAA,OAAM,WAAA,YAAA;KACtC,OAAK,EAAA;;MAAkD,EAAA,wBAAwB,EAAA;MAAsB,EAAA;;QAOtG,EAGE,EAAA,QAAA,WAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,EAAA,IAAA,EAAA;IAIhB,EAAA,eAAe,EAAA,OAAO,cAAa,IAAA,GAAA,EAD3C,EAcwB,GAAA;;KAZtB,KAAI;KACJ,MAAK;KACJ,OAAK,EAAE,EAAA,sCAAsC,EAAA,SAAO;KACpD,iBAAe,EAAA;;KAEL,SAAO,QAKd,CAHF,EAGE,EAAA,QAAA,iBAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,CAAA;;;IAKjB,EAAA,+BAAA,GAAA,EADT,EAGE,GAAA;;KADC,SAAO,EAAA"}
1
+ {"version":3,"file":"popover.js","names":[],"sources":["../../../components/popover/popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n to=\"body\"\n >\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\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 @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\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 :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($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=\"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=\"hasSlotContent($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=\"!showCloseButton\"\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_BOUNDARY_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, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport ModalMixin from '@/common/mixins/modal';\nimport { createTippyPopover, getPopperOptions } from './tippy_utils';\nimport PopoverHeaderFooter from './popover_header_footer.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\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 compatConfig: { MODE: 3 },\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin],\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 v-model\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 * 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 * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\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 * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: '',\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\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 element used to determine overflow boundaries for the popover.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/utils/detect-overflow/#boundary\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values clippingParents, viewport, document, HTMLElement\n */\n boundary: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'clippingParents',\n validator: boundary => {\n return POPOVER_BOUNDARY_VALUES.includes(boundary) ||\n (boundary instanceof HTMLElement);\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, HTML_ELEMENT_TYPE],\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: [HTML_ELEMENT_TYPE, 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 * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\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 boundary () {\n this.tip?.setProps({ popperOptions: this.popperOptions() });\n },\n\n externalAnchorElement () {\n this.updateAnchorEl();\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 if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\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(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\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 beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.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 updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n boundary: this.boundary,\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 (returnFirstEl(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.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 if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\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 if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\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 if (this._isUnmounting) return;\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._isUnmounting) return;\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n if (this._isUnmounting) return;\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.enableScrolling();\n }\n if (this._isUnmounting) return;\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 if (this._isUnmounting) return;\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\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 returnFirstEl(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 = returnFirstEl(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 returnFirstEl(this.$refs.content?.$el)?.focus();\n }\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 this.$emit('keydown', e);\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 returnFirstEl(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?.destroy();\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 onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;AAoJA,IAAK,IAAU;CACb,cAAc,EAAE,MAAM,GAAG;CACzB,MAAM;CAKN,YAAY;EACV,mBAAA;EACA,YAAA;EACA,qBAAA;EACD;CAED,QAAQ,CAAC,EAAW;CAEpB,OAAO;EAOL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAOD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,aAAa;GACX,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAc,SAAS,EAAK;GAEtC;EASD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,SAAS;GACP,MAAM;GACN,SAAS;GACT,YAAY,MACH,OAAO,KAAK,EAAwB,CAAC,MAAM,MAAS,MAAS,EAAQ;GAE/E;EAKD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAOD,cAAc;GACZ,MAAM;GACN,SAAS;GACT,YAAW,MAAgB,EAAuB,SAAS,EAAa;GACzE;EAKD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,iBAAiB;GACf,MAAM,UAAU;GAChB,SAAS;GACV;EAOD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAMD,uBAAuB;GACrB,MAAM;GACN,SAAS;GACV;EAKD,IAAI;GACF,MAAM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AAA,sCAAsC,EAAA,SAAO;KACpD,iBAAe,EAAA;;KAEL,SAAO,QAKd,CAHF,EAGE,EAAA,QAAA,iBAAA,EADC,OAAO,EAAA,cAAY,CAAA,CAAA,CAAA;;;IAKjB,EAAA,+BAAA,GAAA,EADT,EAGE,GAAA;;KADC,SAAO,EAAA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`tippy.js`);t=e.t(t);var n=[`bottom`,`bottom-start`,`bottom-end`,`right`,`right-start`,`right-end`,`left`,`left-start`,`left-end`,`top`,`top-start`,`top-end`],r=[!0,!1,`reference`,`popper`],i=(e,n)=>{let{contentElement:r}={...n};return delete n.contentElement,(0,t.default)(e,{...n,plugins:[t.sticky],render:()=>l(r)})},a=(e,n)=>(0,t.default)(e,{...n,plugins:[t.sticky]}),o=({boundary:e=`clippingParents`,fallbackPlacements:t=[],hasHideModifierEnabled:n=!1,tether:r=!0}={})=>({modifiers:[{name:`flip`,options:{fallbackPlacements:t,boundary:e}},{name:`hide`,enabled:n},{name:`preventOverflow`,options:{altAxis:!r,tether:r}}]}),s=e=>{let t=document.createElement(`span`);return t.innerText=e.innerText||``,e.innerText=``,e.appendChild(t),t},c=e=>{if(!e){console.warn(`No anchor wrapper provided. This may cause issues with the popover.`);return}return e.children[0]||s(e)},l=e=>{let t=document.createElement(`div`);return t.className=`tippy-box d-ps-absolute`,t.appendChild(e),{popper:t}};exports.BASE_TIPPY_DIRECTIONS=n,exports.TIPPY_STICKY_VALUES=r,exports.createTippy=a,exports.createTippyPopover=i,exports.getAnchor=c,exports.getContentWrapper=l,exports.getPopperOptions=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`tippy.js`);t=e.t(t);var n=[`bottom`,`bottom-start`,`bottom-end`,`right`,`right-start`,`right-end`,`left`,`left-start`,`left-end`,`top`,`top-start`,`top-end`],r=[!0,!1,`reference`,`popper`],i=(e,n)=>{let{contentElement:r}={...n};return delete n.contentElement,(0,t.default)(e,{...n,plugins:[t.sticky],render:()=>l(r)})},a=(e,n)=>(0,t.default)(e,{...n,plugins:[t.sticky]}),o=({boundary:e=`clippingParents`,fallbackPlacements:t=[],hasHideModifierEnabled:n=!1,tether:r=!0}={})=>({modifiers:[{name:`flip`,options:{fallbackPlacements:t,boundary:e}},{name:`hide`,enabled:n},{name:`preventOverflow`,options:{altAxis:!r,tether:r,boundary:e}}]}),s=e=>{let t=document.createElement(`span`);return t.innerText=e.innerText||``,e.innerText=``,e.appendChild(t),t},c=e=>{if(!e){console.warn(`No anchor wrapper provided. This may cause issues with the popover.`);return}return e.children[0]||s(e)},l=e=>{let t=document.createElement(`div`);return t.className=`tippy-box d-ps-absolute`,t.appendChild(e),{popper:t}};exports.BASE_TIPPY_DIRECTIONS=n,exports.TIPPY_STICKY_VALUES=r,exports.createTippy=a,exports.createTippyPopover=i,exports.getAnchor=c,exports.getContentWrapper=l,exports.getPopperOptions=o;
2
2
  //# sourceMappingURL=tippy-utils.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tippy-utils.cjs","names":["sticky"],"sources":["../../../components/popover/tippy_utils.js"],"sourcesContent":["import tippy, { sticky } from 'tippy.js';\n\nexport const BASE_TIPPY_DIRECTIONS = [\n 'bottom', 'bottom-start', 'bottom-end',\n 'right', 'right-start', 'right-end',\n 'left', 'left-start', 'left-end',\n 'top', 'top-start', 'top-end',\n];\n\nexport const TIPPY_STICKY_VALUES = [true, false, 'reference', 'popper'];\nexport const createTippyPopover = (anchorElement, options) => {\n const { contentElement } = { ...options };\n delete options.contentElement;\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n render: () => getContentWrapper(contentElement),\n });\n};\n\nexport const createTippy = (anchorElement, options) => {\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n });\n};\n\nexport const getPopperOptions = ({\n boundary = 'clippingParents',\n fallbackPlacements = [],\n hasHideModifierEnabled = false,\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 tether = true,\n} = {}) => {\n return {\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements,\n boundary,\n },\n },\n {\n name: 'hide',\n enabled: hasHideModifierEnabled,\n },\n {\n name: 'preventOverflow',\n options: {\n altAxis: !tether,\n tether,\n },\n },\n ],\n };\n};\n\nconst createAnchor = (anchorWrapper) => {\n const span = document.createElement('span');\n span.innerText = anchorWrapper.innerText || '';\n anchorWrapper.innerText = '';\n anchorWrapper.appendChild(span);\n return span;\n};\n\nexport const getAnchor = (anchorWrapper) => {\n if (!anchorWrapper) {\n console.warn('No anchor wrapper provided. This may cause issues with the popover.');\n return;\n }\n const anchor = anchorWrapper.children[0];\n if (!anchor) return createAnchor(anchorWrapper);\n return anchor;\n};\n\nexport const getContentWrapper = content => {\n // The recommended structure is to use the popper as an outer wrapper\n const popper = document.createElement('div');\n popper.className = 'tippy-box d-ps-absolute';\n popper.appendChild(content);\n return {\n popper,\n };\n};\n"],"mappings":"kJAEA,IAAa,EAAwB,CACnC,SAAU,eAAgB,aAC1B,QAAS,cAAe,YACxB,OAAQ,aAAc,WACtB,MAAO,YAAa,UACrB,CAEY,EAAsB,CAAC,GAAM,GAAO,YAAa,SAAS,CAC1D,GAAsB,EAAe,IAAY,CAC5D,GAAM,CAAE,kBAAmB,CAAE,GAAG,EAAS,CAEzC,OADA,OAAO,EAAQ,gBACf,EAAA,EAAA,SAAa,EAAe,CAC1B,GAAG,EACH,QAAS,CAACA,EAAAA,OAAO,CACjB,WAAc,EAAkB,EAAe,CAChD,CAAC,EAGS,GAAe,EAAe,KACzC,EAAA,EAAA,SAAa,EAAe,CAC1B,GAAG,EACH,QAAS,CAACA,EAAAA,OAAO,CAClB,CAAC,CAGS,GAAoB,CAC/B,WAAW,kBACX,qBAAqB,EAAE,CACvB,yBAAyB,GAGzB,SAAS,IACP,EAAE,IACG,CACL,UAAW,CACT,CACE,KAAM,OACN,QAAS,CACP,qBACA,WACD,CACF,CACD,CACE,KAAM,OACN,QAAS,EACV,CACD,CACE,KAAM,kBACN,QAAS,CACP,QAAS,CAAC,EACV,SACD,CACF,CACF,CACF,EAGG,EAAgB,GAAkB,CACtC,IAAM,EAAO,SAAS,cAAc,OAAO,CAI3C,MAHA,GAAK,UAAY,EAAc,WAAa,GAC5C,EAAc,UAAY,GAC1B,EAAc,YAAY,EAAK,CACxB,GAGI,EAAa,GAAkB,CAC1C,GAAI,CAAC,EAAe,CAClB,QAAQ,KAAK,sEAAsE,CACnF,OAIF,OAFe,EAAc,SAAS,IAClB,EAAa,EAAc,EAIpC,EAAoB,GAAW,CAE1C,IAAM,EAAS,SAAS,cAAc,MAAM,CAG5C,MAFA,GAAO,UAAY,0BACnB,EAAO,YAAY,EAAQ,CACpB,CACL,SACD"}
1
+ {"version":3,"file":"tippy-utils.cjs","names":["sticky"],"sources":["../../../components/popover/tippy_utils.js"],"sourcesContent":["import tippy, { sticky } from 'tippy.js';\n\nexport const BASE_TIPPY_DIRECTIONS = [\n 'bottom', 'bottom-start', 'bottom-end',\n 'right', 'right-start', 'right-end',\n 'left', 'left-start', 'left-end',\n 'top', 'top-start', 'top-end',\n];\n\nexport const TIPPY_STICKY_VALUES = [true, false, 'reference', 'popper'];\nexport const createTippyPopover = (anchorElement, options) => {\n const { contentElement } = { ...options };\n delete options.contentElement;\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n render: () => getContentWrapper(contentElement),\n });\n};\n\nexport const createTippy = (anchorElement, options) => {\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n });\n};\n\nexport const getPopperOptions = ({\n boundary = 'clippingParents',\n fallbackPlacements = [],\n hasHideModifierEnabled = false,\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 tether = true,\n} = {}) => {\n return {\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements,\n boundary,\n },\n },\n {\n name: 'hide',\n enabled: hasHideModifierEnabled,\n },\n {\n name: 'preventOverflow',\n options: {\n altAxis: !tether,\n tether,\n boundary,\n },\n },\n ],\n };\n};\n\nconst createAnchor = (anchorWrapper) => {\n const span = document.createElement('span');\n span.innerText = anchorWrapper.innerText || '';\n anchorWrapper.innerText = '';\n anchorWrapper.appendChild(span);\n return span;\n};\n\nexport const getAnchor = (anchorWrapper) => {\n if (!anchorWrapper) {\n console.warn('No anchor wrapper provided. This may cause issues with the popover.');\n return;\n }\n const anchor = anchorWrapper.children[0];\n if (!anchor) return createAnchor(anchorWrapper);\n return anchor;\n};\n\nexport const getContentWrapper = content => {\n // The recommended structure is to use the popper as an outer wrapper\n const popper = document.createElement('div');\n popper.className = 'tippy-box d-ps-absolute';\n popper.appendChild(content);\n return {\n popper,\n };\n};\n"],"mappings":"kJAEA,IAAa,EAAwB,CACnC,SAAU,eAAgB,aAC1B,QAAS,cAAe,YACxB,OAAQ,aAAc,WACtB,MAAO,YAAa,UACrB,CAEY,EAAsB,CAAC,GAAM,GAAO,YAAa,SAAS,CAC1D,GAAsB,EAAe,IAAY,CAC5D,GAAM,CAAE,kBAAmB,CAAE,GAAG,EAAS,CAEzC,OADA,OAAO,EAAQ,gBACf,EAAA,EAAA,SAAa,EAAe,CAC1B,GAAG,EACH,QAAS,CAACA,EAAAA,OAAO,CACjB,WAAc,EAAkB,EAAe,CAChD,CAAC,EAGS,GAAe,EAAe,KACzC,EAAA,EAAA,SAAa,EAAe,CAC1B,GAAG,EACH,QAAS,CAACA,EAAAA,OAAO,CAClB,CAAC,CAGS,GAAoB,CAC/B,WAAW,kBACX,qBAAqB,EAAE,CACvB,yBAAyB,GAGzB,SAAS,IACP,EAAE,IACG,CACL,UAAW,CACT,CACE,KAAM,OACN,QAAS,CACP,qBACA,WACD,CACF,CACD,CACE,KAAM,OACN,QAAS,EACV,CACD,CACE,KAAM,kBACN,QAAS,CACP,QAAS,CAAC,EACV,SACA,WACD,CACF,CACF,CACF,EAGG,EAAgB,GAAkB,CACtC,IAAM,EAAO,SAAS,cAAc,OAAO,CAI3C,MAHA,GAAK,UAAY,EAAc,WAAa,GAC5C,EAAc,UAAY,GAC1B,EAAc,YAAY,EAAK,CACxB,GAGI,EAAa,GAAkB,CAC1C,GAAI,CAAC,EAAe,CAClB,QAAQ,KAAK,sEAAsE,CACnF,OAIF,OAFe,EAAc,SAAS,IAClB,EAAa,EAAc,EAIpC,EAAoB,GAAW,CAE1C,IAAM,EAAS,SAAS,cAAc,MAAM,CAG5C,MAFA,GAAO,UAAY,0BACnB,EAAO,YAAY,EAAQ,CACpB,CACL,SACD"}
@@ -44,7 +44,8 @@ var n = [
44
44
  name: "preventOverflow",
45
45
  options: {
46
46
  altAxis: !r,
47
- tether: r
47
+ tether: r,
48
+ boundary: e
48
49
  }
49
50
  }
50
51
  ] }), s = (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"tippy-utils.js","names":[],"sources":["../../../components/popover/tippy_utils.js"],"sourcesContent":["import tippy, { sticky } from 'tippy.js';\n\nexport const BASE_TIPPY_DIRECTIONS = [\n 'bottom', 'bottom-start', 'bottom-end',\n 'right', 'right-start', 'right-end',\n 'left', 'left-start', 'left-end',\n 'top', 'top-start', 'top-end',\n];\n\nexport const TIPPY_STICKY_VALUES = [true, false, 'reference', 'popper'];\nexport const createTippyPopover = (anchorElement, options) => {\n const { contentElement } = { ...options };\n delete options.contentElement;\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n render: () => getContentWrapper(contentElement),\n });\n};\n\nexport const createTippy = (anchorElement, options) => {\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n });\n};\n\nexport const getPopperOptions = ({\n boundary = 'clippingParents',\n fallbackPlacements = [],\n hasHideModifierEnabled = false,\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 tether = true,\n} = {}) => {\n return {\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements,\n boundary,\n },\n },\n {\n name: 'hide',\n enabled: hasHideModifierEnabled,\n },\n {\n name: 'preventOverflow',\n options: {\n altAxis: !tether,\n tether,\n },\n },\n ],\n };\n};\n\nconst createAnchor = (anchorWrapper) => {\n const span = document.createElement('span');\n span.innerText = anchorWrapper.innerText || '';\n anchorWrapper.innerText = '';\n anchorWrapper.appendChild(span);\n return span;\n};\n\nexport const getAnchor = (anchorWrapper) => {\n if (!anchorWrapper) {\n console.warn('No anchor wrapper provided. This may cause issues with the popover.');\n return;\n }\n const anchor = anchorWrapper.children[0];\n if (!anchor) return createAnchor(anchorWrapper);\n return anchor;\n};\n\nexport const getContentWrapper = content => {\n // The recommended structure is to use the popper as an outer wrapper\n const popper = document.createElement('div');\n popper.className = 'tippy-box d-ps-absolute';\n popper.appendChild(content);\n return {\n popper,\n };\n};\n"],"mappings":";;AAEA,IAAa,IAAwB;CACnC;CAAU;CAAgB;CAC1B;CAAS;CAAe;CACxB;CAAQ;CAAc;CACtB;CAAO;CAAa;CACrB,EAEY,IAAsB;CAAC;CAAM;CAAO;CAAa;CAAS,EAC1D,KAAsB,GAAe,MAAY;CAC5D,IAAM,EAAE,sBAAmB,EAAE,GAAG,GAAS;AAEzC,QADA,OAAO,EAAQ,gBACR,EAAM,GAAe;EAC1B,GAAG;EACH,SAAS,CAAC,EAAO;EACjB,cAAc,EAAkB,EAAe;EAChD,CAAC;GAGS,KAAe,GAAe,MAClC,EAAM,GAAe;CAC1B,GAAG;CACH,SAAS,CAAC,EAAO;CAClB,CAAC,EAGS,KAAoB,EAC/B,cAAW,mBACX,wBAAqB,EAAE,EACvB,4BAAyB,IAGzB,YAAS,OACP,EAAE,MACG,EACL,WAAW;CACT;EACE,MAAM;EACN,SAAS;GACP;GACA;GACD;EACF;CACD;EACE,MAAM;EACN,SAAS;EACV;CACD;EACE,MAAM;EACN,SAAS;GACP,SAAS,CAAC;GACV;GACD;EACF;CACF,EACF,GAGG,KAAgB,MAAkB;CACtC,IAAM,IAAO,SAAS,cAAc,OAAO;AAI3C,QAHA,EAAK,YAAY,EAAc,aAAa,IAC5C,EAAc,YAAY,IAC1B,EAAc,YAAY,EAAK,EACxB;GAGI,KAAa,MAAkB;AAC1C,KAAI,CAAC,GAAe;AAClB,UAAQ,KAAK,sEAAsE;AACnF;;AAIF,QAFe,EAAc,SAAS,MAClB,EAAa,EAAc;GAIpC,KAAoB,MAAW;CAE1C,IAAM,IAAS,SAAS,cAAc,MAAM;AAG5C,QAFA,EAAO,YAAY,2BACnB,EAAO,YAAY,EAAQ,EACpB,EACL,WACD"}
1
+ {"version":3,"file":"tippy-utils.js","names":[],"sources":["../../../components/popover/tippy_utils.js"],"sourcesContent":["import tippy, { sticky } from 'tippy.js';\n\nexport const BASE_TIPPY_DIRECTIONS = [\n 'bottom', 'bottom-start', 'bottom-end',\n 'right', 'right-start', 'right-end',\n 'left', 'left-start', 'left-end',\n 'top', 'top-start', 'top-end',\n];\n\nexport const TIPPY_STICKY_VALUES = [true, false, 'reference', 'popper'];\nexport const createTippyPopover = (anchorElement, options) => {\n const { contentElement } = { ...options };\n delete options.contentElement;\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n render: () => getContentWrapper(contentElement),\n });\n};\n\nexport const createTippy = (anchorElement, options) => {\n return tippy(anchorElement, {\n ...options,\n plugins: [sticky],\n });\n};\n\nexport const getPopperOptions = ({\n boundary = 'clippingParents',\n fallbackPlacements = [],\n hasHideModifierEnabled = false,\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 tether = true,\n} = {}) => {\n return {\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements,\n boundary,\n },\n },\n {\n name: 'hide',\n enabled: hasHideModifierEnabled,\n },\n {\n name: 'preventOverflow',\n options: {\n altAxis: !tether,\n tether,\n boundary,\n },\n },\n ],\n };\n};\n\nconst createAnchor = (anchorWrapper) => {\n const span = document.createElement('span');\n span.innerText = anchorWrapper.innerText || '';\n anchorWrapper.innerText = '';\n anchorWrapper.appendChild(span);\n return span;\n};\n\nexport const getAnchor = (anchorWrapper) => {\n if (!anchorWrapper) {\n console.warn('No anchor wrapper provided. This may cause issues with the popover.');\n return;\n }\n const anchor = anchorWrapper.children[0];\n if (!anchor) return createAnchor(anchorWrapper);\n return anchor;\n};\n\nexport const getContentWrapper = content => {\n // The recommended structure is to use the popper as an outer wrapper\n const popper = document.createElement('div');\n popper.className = 'tippy-box d-ps-absolute';\n popper.appendChild(content);\n return {\n popper,\n };\n};\n"],"mappings":";;AAEA,IAAa,IAAwB;CACnC;CAAU;CAAgB;CAC1B;CAAS;CAAe;CACxB;CAAQ;CAAc;CACtB;CAAO;CAAa;CACrB,EAEY,IAAsB;CAAC;CAAM;CAAO;CAAa;CAAS,EAC1D,KAAsB,GAAe,MAAY;CAC5D,IAAM,EAAE,sBAAmB,EAAE,GAAG,GAAS;AAEzC,QADA,OAAO,EAAQ,gBACR,EAAM,GAAe;EAC1B,GAAG;EACH,SAAS,CAAC,EAAO;EACjB,cAAc,EAAkB,EAAe;EAChD,CAAC;GAGS,KAAe,GAAe,MAClC,EAAM,GAAe;CAC1B,GAAG;CACH,SAAS,CAAC,EAAO;CAClB,CAAC,EAGS,KAAoB,EAC/B,cAAW,mBACX,wBAAqB,EAAE,EACvB,4BAAyB,IAGzB,YAAS,OACP,EAAE,MACG,EACL,WAAW;CACT;EACE,MAAM;EACN,SAAS;GACP;GACA;GACD;EACF;CACD;EACE,MAAM;EACN,SAAS;EACV;CACD;EACE,MAAM;EACN,SAAS;GACP,SAAS,CAAC;GACV;GACA;GACD;EACF;CACF,EACF,GAGG,KAAgB,MAAkB;CACtC,IAAM,IAAO,SAAS,cAAc,OAAO;AAI3C,QAHA,EAAK,YAAY,EAAc,aAAa,IAC5C,EAAc,YAAY,IAC1B,EAAc,YAAY,EAAK,EACxB;GAGI,KAAa,MAAkB;AAC1C,KAAI,CAAC,GAAe;AAClB,UAAQ,KAAK,sEAAsE;AACnF;;AAIF,QAFe,EAAc,SAAS,MAClB,EAAa,EAAc;GAIpC,KAAoB,MAAW;CAE1C,IAAM,IAAS,SAAS,cAAc,MAAM;AAG5C,QAFA,EAAO,YAAY,2BACnB,EAAO,YAAY,EAAQ,EACpB,EACL,WACD"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../rich_text_editor-wvONcbYd.cjs`),t=require(`./rich-text-editor-constants.cjs`);exports.DtRichTextEditor=e.t,exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=t.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=t.RICH_TEXT_EDITOR_OUTPUT_FORMATS;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../rich_text_editor-DWrdKcza.cjs`),t=require(`./rich-text-editor-constants.cjs`);exports.DtRichTextEditor=e.t,exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=t.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=t.RICH_TEXT_EDITOR_OUTPUT_FORMATS;
@@ -1,3 +1,3 @@
1
- import { t as e } from "../../rich_text_editor-BhUKyR0E.js";
1
+ import { t as e } from "../../rich_text_editor-COc4LaIk.js";
2
2
  import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as t, RICH_TEXT_EDITOR_OUTPUT_FORMATS as n } from "./rich-text-editor-constants.js";
3
3
  export { e as DtRichTextEditor, t as RICH_TEXT_EDITOR_AUTOFOCUS_TYPES, n as RICH_TEXT_EDITOR_OUTPUT_FORMATS };
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../markdownRenderer-D_P94RyM.js";
1
+ import { t as e } from "../../markdownRenderer-vnndXQhE.js";
2
2
  export { e as renderEditorToMarkdown };
@@ -1 +1 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../rich_text_editor-wvONcbYd.cjs`);exports.default=e.t;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../rich_text_editor-DWrdKcza.cjs`);exports.default=e.t;
@@ -1,2 +1,2 @@
1
- import { t as e } from "../../rich_text_editor-BhUKyR0E.js";
1
+ import { t as e } from "../../rich_text_editor-COc4LaIk.js";
2
2
  export { e as default };