@dialpad/dialtone-vue 3.196.3 → 3.197.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,10 +3,10 @@ import _ from "../input/input.js";
3
3
  import L from "../chip/chip.js";
4
4
  import W from "../validation-messages/validation-messages.js";
5
5
  import { validationMessageValidator as M } from "../../common/validators/index.js";
6
- import { extractNonListeners as O, returnFirstEl as m, extractVueListeners as T, hasSlotContent as P } from "../../common/utils/index.js";
7
- import { POPOVER_APPEND_TO_VALUES as B } from "../popover/popover-constants.js";
6
+ import { extractNonListeners as O, returnFirstEl as f, extractVueListeners as T, hasSlotContent as B } from "../../common/utils/index.js";
7
+ import { POPOVER_APPEND_TO_VALUES as P } from "../popover/popover-constants.js";
8
8
  import { CHIP_TOP_POSITION as F, CHIP_SIZES as k, MULTI_SELECT_SIZES as H } from "./combobox-multi-select-constants.js";
9
- import { resolveComponent as h, createBlock as f, openBlock as p, mergeProps as d, createSlots as R, withCtx as l, createElementVNode as a, withModifiers as V, renderSlot as g, createElementBlock as b, toDisplayString as C, createVNode as y, normalizeClass as z, Fragment as E, renderList as D, toHandlers as K, withKeys as N, createTextVNode as A } from "vue";
9
+ import { resolveComponent as h, createBlock as m, openBlock as p, mergeProps as c, createSlots as R, withCtx as a, createElementVNode as r, withModifiers as V, renderSlot as g, createElementBlock as b, toDisplayString as C, createVNode as y, normalizeClass as z, Fragment as E, renderList as D, toHandlers as K, withKeys as N, createTextVNode as A } from "vue";
10
10
  import { _ as U } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
11
11
  const j = {
12
12
  compatConfig: { MODE: 3 },
@@ -151,7 +151,7 @@ const j = {
151
151
  appendTo: {
152
152
  type: [HTMLElement, String],
153
153
  default: "body",
154
- validator: (t) => B.includes(t) || t instanceof HTMLElement
154
+ validator: (t) => P.includes(t) || t instanceof HTMLElement
155
155
  },
156
156
  /**
157
157
  * Named transition when the content display is toggled.
@@ -212,6 +212,13 @@ const j = {
212
212
  inputWrapperClass: {
213
213
  type: [String, Object, Array],
214
214
  default: ""
215
+ },
216
+ /**
217
+ * When true, disables the underlying input.
218
+ */
219
+ disabled: {
220
+ type: Boolean,
221
+ default: !1
215
222
  }
216
223
  },
217
224
  emits: [
@@ -273,7 +280,7 @@ const j = {
273
280
  resizeWindowObserver: null,
274
281
  initialInputHeight: null,
275
282
  CHIP_SIZES: k,
276
- hasSlotContent: P,
283
+ hasSlotContent: B,
277
284
  inputFocused: !1,
278
285
  hideInputText: !1
279
286
  };
@@ -372,10 +379,10 @@ const j = {
372
379
  this.showList == null && ((t = this.$refs.comboboxWithPopover) == null || t.closeComboboxList());
373
380
  },
374
381
  getChipButtons() {
375
- return this.$refs.chips && this.$refs.chips.map((t) => m(t.$el).querySelector("button"));
382
+ return this.$refs.chips && this.$refs.chips.map((t) => f(t.$el).querySelector("button"));
376
383
  },
377
384
  getChips() {
378
- return this.$refs.chips && this.$refs.chips.map((t) => m(t.$el));
385
+ return this.$refs.chips && this.$refs.chips.map((t) => f(t.$el));
379
386
  },
380
387
  getLastChipButton() {
381
388
  return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];
@@ -414,22 +421,22 @@ const j = {
414
421
  },
415
422
  navigateBetweenChips(t, i) {
416
423
  var o;
417
- const e = this.getChipButtons().indexOf(t), r = i ? e - 1 : e + 1;
418
- r < 0 || r >= ((o = this.$refs.chips) == null ? void 0 : o.length) || (this.getChipButtons()[e].blur(), this.getChipButtons()[r].focus(), this.closeComboboxList());
424
+ const e = this.getChipButtons().indexOf(t), l = i ? e - 1 : e + 1;
425
+ l < 0 || l >= ((o = this.$refs.chips) == null ? void 0 : o.length) || (this.getChipButtons()[e].blur(), this.getChipButtons()[l].focus(), this.closeComboboxList());
419
426
  },
420
427
  setChipsTopPosition() {
421
428
  const t = this.getInput();
422
429
  if (!t) return;
423
- const i = this.$refs.inputSlotWrapper, e = t.getBoundingClientRect().top - i.getBoundingClientRect().top, r = this.$refs.chipsWrapper;
424
- r.style.top = e - F[this.size] + "px";
430
+ const i = this.$refs.inputSlotWrapper, e = t.getBoundingClientRect().top - i.getBoundingClientRect().top, l = this.$refs.chipsWrapper;
431
+ l.style.top = e - F[this.size] + "px";
425
432
  },
426
433
  setInputPadding() {
427
434
  const t = this.getLastChip(), i = this.getInput(), e = this.$refs.chipsWrapper;
428
435
  if (!i || (this.revertInputPadding(i), this.popoverOffset = [0, 4], !t) || this.collapseOnFocusOut && !this.inputFocused) return;
429
- const r = t.offsetLeft + this.getFullWidth(t), o = i.getBoundingClientRect().width - r;
430
- o > this.reservedRightSpace ? i.style.paddingLeft = r + "px" : i.style.paddingLeft = "4px";
431
- const s = e.getBoundingClientRect().height - 4, u = t.getBoundingClientRect().height - 4, c = o > this.reservedRightSpace ? t.offsetTop + 2 : s + u - 9;
432
- i.style.paddingTop = `${c}px`;
436
+ const l = t.offsetLeft + this.getFullWidth(t), o = i.getBoundingClientRect().width - l;
437
+ o > this.reservedRightSpace ? i.style.paddingLeft = l + "px" : i.style.paddingLeft = "4px";
438
+ const s = e.getBoundingClientRect().height - 4, u = t.getBoundingClientRect().height - 4, d = o > this.reservedRightSpace ? t.offsetTop + 2 : s + u - 9;
439
+ i.style.paddingTop = `${d}px`;
433
440
  },
434
441
  revertInputPadding(t) {
435
442
  t.style.paddingLeft = "", t.style.paddingTop = "", t.style.paddingBottom = "";
@@ -462,13 +469,13 @@ const j = {
462
469
  }
463
470
  }
464
471
  }
465
- }, Z = { ref: "header" }, $ = {
472
+ }, Z = { ref: "header" }, q = {
466
473
  key: 1,
467
474
  class: "d-recipe-combobox-multi-select__list--loading"
468
- }, q = { ref: "footer" };
469
- function G(t, i, e, r, o, s) {
470
- const u = h("dt-chip"), c = h("dt-input"), x = h("dt-validation-messages"), I = h("dt-recipe-combobox-with-popover");
471
- return p(), f(I, d({
475
+ }, $ = { ref: "footer" };
476
+ function G(t, i, e, l, o, s) {
477
+ const u = h("dt-chip"), d = h("dt-input"), x = h("dt-validation-messages"), I = h("dt-recipe-combobox-with-popover");
478
+ return p(), m(I, c({
472
479
  ref: "comboboxWithPopover",
473
480
  label: e.label,
474
481
  "show-list": e.showList,
@@ -483,18 +490,18 @@ function G(t, i, e, r, o, s) {
483
490
  onSelect: s.onComboboxSelect,
484
491
  onHighlight: s.comboboxHighlight
485
492
  }), R({
486
- input: l(({ onInput: w }) => [
487
- a("span", {
493
+ input: a(({ onInput: w }) => [
494
+ r("span", {
488
495
  ref: "inputSlotWrapper",
489
496
  class: "d-recipe-combobox-multi-select__input-wrapper",
490
497
  onFocusin: i[1] || (i[1] = (...n) => s.handleInputFocusIn && s.handleInputFocusIn(...n)),
491
498
  onFocusout: i[2] || (i[2] = (...n) => s.handleInputFocusOut && s.handleInputFocusOut(...n))
492
499
  }, [
493
- a("span", {
500
+ r("span", {
494
501
  ref: "chipsWrapper",
495
502
  class: z(["d-recipe-combobox-multi-select__chip-wrapper", s.chipWrapperClass])
496
503
  }, [
497
- (p(!0), b(E, null, D(e.selectedItems, (n) => (p(), f(u, d({
504
+ (p(!0), b(E, null, D(e.selectedItems, (n) => (p(), m(u, c({
498
505
  ref_for: !0,
499
506
  ref: "chips",
500
507
  key: n,
@@ -504,18 +511,19 @@ function G(t, i, e, r, o, s) {
504
511
  { "d-recipe-combobox-multi-select__chip--truncate": !!e.chipMaxWidth }
505
512
  ],
506
513
  style: { maxWidth: e.chipMaxWidth },
507
- size: o.CHIP_SIZES[e.size]
514
+ size: o.CHIP_SIZES[e.size],
515
+ disabled: e.disabled
508
516
  }, K(s.chipListeners), {
509
517
  onKeydown: N((S) => s.onChipRemove(n), ["backspace"]),
510
518
  onClose: (S) => s.onChipRemove(n)
511
519
  }), {
512
- default: l(() => [
520
+ default: a(() => [
513
521
  A(C(n), 1)
514
522
  ]),
515
523
  _: 2
516
- }, 1040, ["class", "style", "size", "onKeydown", "onClose"]))), 128))
524
+ }, 1040, ["class", "style", "size", "disabled", "onKeydown", "onClose"]))), 128))
517
525
  ], 2),
518
- y(c, d({
526
+ y(d, c({
519
527
  ref: "input",
520
528
  modelValue: o.value,
521
529
  "onUpdate:modelValue": i[0] || (i[0] = (n) => o.value = n),
@@ -527,6 +535,7 @@ function G(t, i, e, r, o, s) {
527
535
  }
528
536
  ],
529
537
  "input-wrapper-class": e.inputWrapperClass,
538
+ disabled: e.disabled,
530
539
  "aria-label": e.label,
531
540
  label: e.labelVisible ? e.label : "",
532
541
  description: e.description,
@@ -534,29 +543,29 @@ function G(t, i, e, r, o, s) {
534
543
  "show-messages": e.showInputMessages,
535
544
  messages: e.inputMessages,
536
545
  size: e.size
537
- }, s.inputListeners, { onInput: w }), null, 16, ["modelValue", "input-class", "input-wrapper-class", "aria-label", "label", "description", "placeholder", "show-messages", "messages", "size", "onInput"]),
546
+ }, s.inputListeners, { onInput: w }), null, 16, ["modelValue", "input-class", "input-wrapper-class", "disabled", "aria-label", "label", "description", "placeholder", "show-messages", "messages", "size", "onInput"]),
538
547
  y(x, {
539
548
  "validation-messages": e.maxSelectedMessage,
540
549
  "show-messages": o.showValidationMessages
541
550
  }, null, 8, ["validation-messages", "show-messages"])
542
551
  ], 544)
543
552
  ]),
544
- list: l(() => [
545
- a("div", {
553
+ list: a(() => [
554
+ r("div", {
546
555
  ref: "list",
547
556
  class: "d-recipe-combobox-multi-select__list",
548
557
  onMousedown: i[3] || (i[3] = V(() => {
549
558
  }, ["prevent"]))
550
559
  }, [
551
- e.loading ? (p(), b("div", $, C(e.loadingMessage), 1)) : g(t.$slots, "list", { key: 0 })
560
+ e.loading ? (p(), b("div", q, C(e.loadingMessage), 1)) : g(t.$slots, "list", { key: 0 })
552
561
  ], 544)
553
562
  ]),
554
563
  _: 2
555
564
  }, [
556
565
  o.hasSlotContent(t.$slots.header) ? {
557
566
  name: "header",
558
- fn: l(() => [
559
- a("div", Z, [
567
+ fn: a(() => [
568
+ r("div", Z, [
560
569
  g(t.$slots, "header")
561
570
  ], 512)
562
571
  ]),
@@ -564,8 +573,8 @@ function G(t, i, e, r, o, s) {
564
573
  } : void 0,
565
574
  o.hasSlotContent(t.$slots.footer) ? {
566
575
  name: "footer",
567
- fn: l(() => [
568
- a("div", q, [
576
+ fn: a(() => [
577
+ r("div", $, [
569
578
  g(t.$slots, "footer")
570
579
  ], 512)
571
580
  ]),
@@ -573,8 +582,8 @@ function G(t, i, e, r, o, s) {
573
582
  } : void 0
574
583
  ]), 1040, ["label", "show-list", "max-height", "max-width", "popover-offset", "has-suggestion-list", "append-to", "transition", "onSelect", "onHighlight"]);
575
584
  }
576
- const rt = /* @__PURE__ */ U(j, [["render", G]]);
585
+ const lt = /* @__PURE__ */ U(j, [["render", G]]);
577
586
  export {
578
- rt as default
587
+ lt as default
579
588
  };
580
589
  //# sourceMappingURL=combobox-multi-select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n v-bind=\"extractNonListeners($attrs)\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keydown.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-bind=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { extractVueListeners, extractNonListeners, hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keydown: event => {\n this.onChipKeyDown(event);\n this.$emit('keydown', event);\n },\n };\n },\n\n inputListeners () {\n return {\n ...extractVueListeners(this.$attrs),\n onInput: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n onKeydown: event => {\n this.onInputKeyDown(event);\n },\n\n onKeyup: event => {\n this.$emit('keyup', event);\n },\n\n onClick: () => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n extractNonListeners,\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyDown (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyDown (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n // if there is selected text, do not focus the last chip\n if (event.target.selectionEnd !== event.target.selectionStart) {\n return;\n }\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","inputMessages","validationMessageValidator","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","extractVueListeners","input","extractNonListeners","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_openBlock","_createBlock","_component_dt_recipe_combobox_with_popover","_mergeProps","$props","$data","$options","_ctx","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot"],"mappings":";;;;;;;;;;AAqIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,6BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,sBAAAC;AAAA;EAGF,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA;;;;;IAOZ,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAA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,OAFNZ,GAEM;AAAA,UADJ8B,EAAsBtB,EAAA,QAAA,QAAA;AAAA;;MA9G9B,KAAA;AAAA,QAAA;AAAA;;;"}
1
+ {"version":3,"file":"combobox-multi-select.js","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n v-bind=\"extractNonListeners($attrs)\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :size=\"CHIP_SIZES[size]\"\n :disabled=\"disabled\"\n v-on=\"chipListeners\"\n @keydown.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :disabled=\"disabled\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-bind=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { extractVueListeners, extractNonListeners, hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * When true, disables the underlying input.\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keydown: event => {\n this.onChipKeyDown(event);\n this.$emit('keydown', event);\n },\n };\n },\n\n inputListeners () {\n return {\n ...extractVueListeners(this.$attrs),\n onInput: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n onKeydown: event => {\n this.onInputKeyDown(event);\n },\n\n onKeyup: event => {\n this.$emit('keyup', event);\n },\n\n onClick: () => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n extractNonListeners,\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyDown (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyDown (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n // if there is selected text, do not focus the last chip\n if (event.target.selectionEnd !== event.target.selectionStart) {\n return;\n }\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","inputMessages","validationMessageValidator","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","extractVueListeners","input","extractNonListeners","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_openBlock","_createBlock","_component_dt_recipe_combobox_with_popover","_mergeProps","$props","$data","$options","_ctx","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot"],"mappings":";;;;;;;;;;AAuIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,6BAAAC;AAAA,IACA,SAAAC;AAAA,IACA,QAAAC;AAAA,IACA,sBAAAC;AAAA;EAGF,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA;;;;;IAOZ,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS,MAAM,CAAA;AAAA,MACf,WAAW,CAAAC,MACFC,EAA2BD,CAAa;AAAA;;;;IAOnD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;;;;;IAaX,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;;IASX,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;;I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
3
3
  declare const _default: import('vue').DefineComponent<{
4
+ disabled: {
5
+ type: BooleanConstructor;
6
+ default: boolean;
7
+ };
4
8
  hideClose: {
5
9
  type: BooleanConstructor;
6
10
  default: boolean;
@@ -47,6 +51,10 @@ declare const _default: import('vue').DefineComponent<{
47
51
  chipCloseButtonClasses(): any[];
48
52
  onClose(): void;
49
53
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("click" | "close" | "keydown" | "keyup")[], "click" | "close" | "keydown" | "keyup", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
54
+ disabled: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
50
58
  hideClose: {
51
59
  type: BooleanConstructor;
52
60
  default: boolean;
@@ -82,6 +90,7 @@ declare const _default: import('vue').DefineComponent<{
82
90
  onKeydown?: ((...args: any[]) => any) | undefined;
83
91
  onKeyup?: ((...args: any[]) => any) | undefined;
84
92
  }, {
93
+ disabled: boolean;
85
94
  id: string;
86
95
  size: string;
87
96
  ariaLabel: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chip.vue.d.ts","sourceRoot":"","sources":["../../../../components/chip/chip.vue"],"names":[],"mappings":"AAqDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAwPgD,gBAAgB;qCAC3B,gBAAgB"}
1
+ {"version":3,"file":"chip.vue.d.ts","sourceRoot":"","sources":["../../../../components/chip/chip.vue"],"names":[],"mappings":"AAyDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAuQgD,gBAAgB;qCAC3B,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"file":"combobox_multi_select.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"names":[],"mappings":"AAmHA;"}
1
+ {"version":3,"file":"combobox_multi_select.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"names":[],"mappings":"AAqHA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone-vue",
3
- "version": "3.196.3",
3
+ "version": "3.197.0",
4
4
  "description": "Vue component library for Dialpad's design system Dialtone",
5
5
  "files": [
6
6
  "dist"
@@ -57,12 +57,12 @@
57
57
  "react": "^18.3.1",
58
58
  "storybook-dark-mode": "^3.0.3",
59
59
  "vue": "^3.3.4",
60
- "@dialpad/dialtone-css": "8.70.3",
60
+ "@dialpad/dialtone-css": "8.71.0",
61
61
  "@dialpad/generator-dialtone": "0.1.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "vue": ">=3.2",
65
- "@dialpad/dialtone-css": "^8.70.3"
65
+ "@dialpad/dialtone-css": "^8.71.0"
66
66
  },
67
67
  "bugs": {
68
68
  "email": "dialtone@dialpad.com"