@dialpad/dialtone 9.150.1 → 9.150.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.
- package/dist/css/dialtone-default-theme.css +0 -3
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +0 -3
- package/dist/css/dialtone.min.css +1 -1
- package/dist/js/dialtone_health_check/deprecated_icons.cjs +105 -0
- package/dist/js/dialtone_health_check/index.cjs +82 -0
- package/dist/js/dialtone_health_check/non_dialtone_properties.cjs +44 -0
- package/dist/js/dialtone_migrate_flex_to_stack/examples-edge-cases.vue +329 -0
- package/dist/js/dialtone_migrate_flex_to_stack/index.mjs +1377 -0
- package/dist/js/dialtone_migration_helper/configs/box-shadows.mjs +19 -0
- package/dist/js/dialtone_migration_helper/configs/colors.mjs +69 -0
- package/dist/js/dialtone_migration_helper/configs/fonts.mjs +49 -0
- package/dist/js/dialtone_migration_helper/configs/size-and-space.mjs +124 -0
- package/dist/js/dialtone_migration_helper/helpers.mjs +212 -0
- package/dist/js/dialtone_migration_helper/index.mjs +135 -0
- package/dist/tokens/doc.json +51865 -51865
- package/dist/vue3/common/utils/index.cjs +1 -1
- package/dist/vue3/common/utils/index.cjs.map +1 -1
- package/dist/vue3/common/utils/index.js +67 -62
- package/dist/vue3/common/utils/index.js.map +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +79 -75
- package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/vue3/lib/toggle/toggle.cjs +1 -1
- package/dist/vue3/lib/toggle/toggle.cjs.map +1 -1
- package/dist/vue3/lib/toggle/toggle.js +1 -1
- package/dist/vue3/lib/toggle/toggle.js.map +1 -1
- package/dist/vue3/types/common/utils/index.d.ts +3 -3
- package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -3
- package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +1 -3
- package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -3
- package/dist/vue3/types/components/toast/toast.vue.d.ts +2 -6
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +7 -0
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +1 -3
- package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -3
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -3
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +1 -3
- package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox-multi-select.cjs","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 @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-on=\"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 { 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 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 input: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n keydown: event => {\n this.onInputKeyDown(event);\n },\n\n keyup: event => {\n this.$emit('keyup', event);\n },\n\n click: () => {\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 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","t","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","input","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","_createBlock","_component_dt_recipe_combobox_with_popover","$props","$data","$options","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_openBlock","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_mergeProps","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot","_ctx"],"mappings":"ijBAoIKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,8BAEN,WAAY,6BACVC,EAAAA,QACA,QAAAC,EAAAA,QACA,OAAAC,EAAAA,QACA,qBAAAC,EAAAA,SAGF,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,IAOZ,aAAc,CACZ,KAAM,QACN,QAAS,IAMX,YAAa,CACX,KAAM,OACN,QAAS,IAMX,YAAa,CACX,KAAM,OACN,QAAS,8BAMX,cAAe,CACb,KAAM,MACN,QA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ASgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EAxFlBE,EAAAA,cAwFQ,IAAA,CAAA,EAAkB,CAAA,SAAA,CAAA,KAGTxB,EAAA,uBAGTU,EAAAA,mBAKM,MALNe,EAKMN,EAAAA,gBADDnB,EAAA,cAAc,EAAA,CAAA,GARnB0B,EAAAA,WAGEC,iBA7FV,IAAA,CAAA,CAAA,UAAA,EAAA,IA2EY1B,EAAA,eAAe0B,EAAA,OAAO,MAAM,GA3ExC,KA4EO,SA5EP,GAAAvB,EAAAA,QA8EM,IAEM,CAFNE,EAAAA,mBAEM,MAFNV,EAEM,CADJ8B,aAAsBC,EAAA,OAAA,QAAA,UA/E9B,IAAA,KAAA,OAyGY1B,EAAA,eAAe0B,EAAA,OAAO,MAAM,GAzGxC,KA0GO,SA1GP,GAAAvB,EAAAA,QA4GM,IAEM,CAFNE,EAAAA,mBAEM,MAFNT,EAEM,CADJ6B,aAAsBC,EAAA,OAAA,QAAA,UA7G9B,IAAA,KAAA"}
|
|
1
|
+
{"version":3,"file":"combobox-multi-select.cjs","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","t","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":"ijBAqIKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,8BAEN,WAAY,6BACVC,EAAAA,QACA,QAAAC,EAAAA,QACA,OAAAC,EAAAA,QACA,qBAAAC,EAAAA,SAGF,aAAc,GAEd,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,IAOZ,aAAc,CACZ,KAAM,QACN,QAAS,IAMX,YAAa,CACX,KAAM,OACN,QAAS,IAMX,YAAa,CACX,KAAM,OACN,QAAS,8BAMX,cAAe,CACb,KAAM,MACN,QAAS,IAAM,CAAA,EACf,UAAWC,GACFC,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AAeC,EAAA,gFAgBX,eACT,IAeM,CAfNM,EAAAA,mBAeM,MAAA,CAdJ,IAAI,OACJ,MAAM,uCACL,YAASc,EAAA,CAAA,IAAAA,EAAA,CAAA,EAzFlBE,EAAAA,cAyFQ,IAAA,CAAA,EAAkB,CAAA,SAAA,CAAA,KAGTvB,EAAA,uBAGTU,EAAAA,mBAKM,MALNc,EAKMN,EAAAA,gBADDlB,EAAA,cAAc,EAAA,CAAA,GARnByB,EAAAA,WAGEtB,iBA9FV,IAAA,CAAA,CAAA,UAAA,EAAA,IA4EYF,EAAA,eAAeE,EAAA,OAAO,MAAM,GA5ExC,KA6EO,SA7EP,GAAAE,EAAAA,QA+EM,IAEM,CAFNE,EAAAA,mBAEM,MAFNb,EAEM,CADJ+B,aAAsBtB,EAAA,OAAA,QAAA,UAhF9B,IAAA,KAAA,OA0GYF,EAAA,eAAeE,EAAA,OAAO,MAAM,GA1GxC,KA2GO,SA3GP,GAAAE,EAAAA,QA6GM,IAEM,CAFNE,EAAAA,mBAEM,MAFNZ,EAEM,CADJ8B,aAAsBtB,EAAA,OAAA,QAAA,UA9G9B,IAAA,KAAA"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import v from "../combobox-with-popover/combobox-with-popover.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { validationMessageValidator as
|
|
6
|
-
import { returnFirstEl as
|
|
7
|
-
import { POPOVER_APPEND_TO_VALUES as
|
|
8
|
-
import { CHIP_TOP_POSITION as
|
|
9
|
-
import { resolveComponent as h, createBlock as
|
|
10
|
-
import { _ as
|
|
11
|
-
const
|
|
2
|
+
import _ from "../input/input.js";
|
|
3
|
+
import L from "../chip/chip.js";
|
|
4
|
+
import W from "../validation-messages/validation-messages.js";
|
|
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";
|
|
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";
|
|
10
|
+
import { _ as U } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
+
const j = {
|
|
12
12
|
compatConfig: { MODE: 3 },
|
|
13
13
|
name: "DtRecipeComboboxMultiSelect",
|
|
14
14
|
components: {
|
|
15
15
|
DtRecipeComboboxWithPopover: v,
|
|
16
|
-
DtInput:
|
|
17
|
-
DtChip:
|
|
18
|
-
DtValidationMessages:
|
|
16
|
+
DtInput: _,
|
|
17
|
+
DtChip: L,
|
|
18
|
+
DtValidationMessages: W
|
|
19
19
|
},
|
|
20
|
+
inheritAttrs: !1,
|
|
20
21
|
props: {
|
|
21
22
|
/**
|
|
22
23
|
* String to use for the input label.
|
|
@@ -53,7 +54,7 @@ const N = {
|
|
|
53
54
|
inputMessages: {
|
|
54
55
|
type: Array,
|
|
55
56
|
default: () => [],
|
|
56
|
-
validator: (t) =>
|
|
57
|
+
validator: (t) => M(t)
|
|
57
58
|
},
|
|
58
59
|
/**
|
|
59
60
|
* Show input validation message
|
|
@@ -140,7 +141,7 @@ const N = {
|
|
|
140
141
|
size: {
|
|
141
142
|
type: String,
|
|
142
143
|
default: "md",
|
|
143
|
-
validator: (t) => Object.values(
|
|
144
|
+
validator: (t) => Object.values(H).includes(t)
|
|
144
145
|
},
|
|
145
146
|
/**
|
|
146
147
|
* Sets the element to which the popover is going to append to.
|
|
@@ -150,7 +151,7 @@ const N = {
|
|
|
150
151
|
appendTo: {
|
|
151
152
|
type: [HTMLElement, String],
|
|
152
153
|
default: "body",
|
|
153
|
-
validator: (t) =>
|
|
154
|
+
validator: (t) => B.includes(t) || t instanceof HTMLElement
|
|
154
155
|
},
|
|
155
156
|
/**
|
|
156
157
|
* Named transition when the content display is toggled.
|
|
@@ -271,8 +272,8 @@ const N = {
|
|
|
271
272
|
showValidationMessages: !1,
|
|
272
273
|
resizeWindowObserver: null,
|
|
273
274
|
initialInputHeight: null,
|
|
274
|
-
CHIP_SIZES:
|
|
275
|
-
hasSlotContent:
|
|
275
|
+
CHIP_SIZES: k,
|
|
276
|
+
hasSlotContent: P,
|
|
276
277
|
inputFocused: !1,
|
|
277
278
|
hideInputText: !1
|
|
278
279
|
};
|
|
@@ -291,16 +292,17 @@ const N = {
|
|
|
291
292
|
},
|
|
292
293
|
inputListeners() {
|
|
293
294
|
return {
|
|
294
|
-
|
|
295
|
+
...T(this.$attrs),
|
|
296
|
+
onInput: (t) => {
|
|
295
297
|
this.$emit("input", t), this.hasSuggestionList && this.showComboboxList();
|
|
296
298
|
},
|
|
297
|
-
|
|
299
|
+
onKeydown: (t) => {
|
|
298
300
|
this.onInputKeyDown(t);
|
|
299
301
|
},
|
|
300
|
-
|
|
302
|
+
onKeyup: (t) => {
|
|
301
303
|
this.$emit("keyup", t);
|
|
302
304
|
},
|
|
303
|
-
|
|
305
|
+
onClick: () => {
|
|
304
306
|
this.hasSuggestionList && this.showComboboxList();
|
|
305
307
|
}
|
|
306
308
|
};
|
|
@@ -347,6 +349,7 @@ const N = {
|
|
|
347
349
|
(t = this.resizeWindowObserver) == null || t.unobserve(document.body);
|
|
348
350
|
},
|
|
349
351
|
methods: {
|
|
352
|
+
extractNonListeners: O,
|
|
350
353
|
comboboxHighlight(t) {
|
|
351
354
|
this.$emit("combobox-highlight", t);
|
|
352
355
|
},
|
|
@@ -369,10 +372,10 @@ const N = {
|
|
|
369
372
|
this.showList == null && ((t = this.$refs.comboboxWithPopover) == null || t.closeComboboxList());
|
|
370
373
|
},
|
|
371
374
|
getChipButtons() {
|
|
372
|
-
return this.$refs.chips && this.$refs.chips.map((t) =>
|
|
375
|
+
return this.$refs.chips && this.$refs.chips.map((t) => m(t.$el).querySelector("button"));
|
|
373
376
|
},
|
|
374
377
|
getChips() {
|
|
375
|
-
return this.$refs.chips && this.$refs.chips.map((t) =>
|
|
378
|
+
return this.$refs.chips && this.$refs.chips.map((t) => m(t.$el));
|
|
376
379
|
},
|
|
377
380
|
getLastChipButton() {
|
|
378
381
|
return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];
|
|
@@ -410,22 +413,22 @@ const N = {
|
|
|
410
413
|
this.getLastChipButton().blur(), (t = this.$refs.input) == null || t.focus(), this.showComboboxList();
|
|
411
414
|
},
|
|
412
415
|
navigateBetweenChips(t, i) {
|
|
413
|
-
var
|
|
414
|
-
const e = this.getChipButtons().indexOf(t),
|
|
415
|
-
|
|
416
|
+
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());
|
|
416
419
|
},
|
|
417
420
|
setChipsTopPosition() {
|
|
418
421
|
const t = this.getInput();
|
|
419
422
|
if (!t) return;
|
|
420
|
-
const i = this.$refs.inputSlotWrapper, e = t.getBoundingClientRect().top - i.getBoundingClientRect().top,
|
|
421
|
-
|
|
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";
|
|
422
425
|
},
|
|
423
426
|
setInputPadding() {
|
|
424
427
|
const t = this.getLastChip(), i = this.getInput(), e = this.$refs.chipsWrapper;
|
|
425
428
|
if (!i || (this.revertInputPadding(i), this.popoverOffset = [0, 4], !t) || this.collapseOnFocusOut && !this.inputFocused) return;
|
|
426
|
-
const
|
|
427
|
-
|
|
428
|
-
const
|
|
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;
|
|
429
432
|
i.style.paddingTop = `${c}px`;
|
|
430
433
|
},
|
|
431
434
|
revertInputPadding(t) {
|
|
@@ -459,38 +462,39 @@ const N = {
|
|
|
459
462
|
}
|
|
460
463
|
}
|
|
461
464
|
}
|
|
462
|
-
},
|
|
465
|
+
}, Z = { ref: "header" }, $ = {
|
|
463
466
|
key: 1,
|
|
464
467
|
class: "d-recipe-combobox-multi-select__list--loading"
|
|
465
|
-
},
|
|
466
|
-
function
|
|
467
|
-
const u = h("dt-chip"), c = h("dt-input"),
|
|
468
|
-
return p(),
|
|
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({
|
|
469
472
|
ref: "comboboxWithPopover",
|
|
470
473
|
label: e.label,
|
|
471
474
|
"show-list": e.showList,
|
|
472
475
|
"max-height": e.listMaxHeight,
|
|
473
476
|
"max-width": e.listMaxWidth,
|
|
474
|
-
"popover-offset":
|
|
477
|
+
"popover-offset": o.popoverOffset,
|
|
475
478
|
"has-suggestion-list": e.hasSuggestionList,
|
|
476
479
|
"content-width": "anchor",
|
|
477
480
|
"append-to": e.appendTo,
|
|
478
|
-
transition: e.transition
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
481
|
+
transition: e.transition
|
|
482
|
+
}, s.extractNonListeners(t.$attrs), {
|
|
483
|
+
onSelect: s.onComboboxSelect,
|
|
484
|
+
onHighlight: s.comboboxHighlight
|
|
485
|
+
}), R({
|
|
486
|
+
input: l(({ onInput: w }) => [
|
|
483
487
|
a("span", {
|
|
484
488
|
ref: "inputSlotWrapper",
|
|
485
489
|
class: "d-recipe-combobox-multi-select__input-wrapper",
|
|
486
|
-
onFocusin: i[1] || (i[1] = (...n) =>
|
|
487
|
-
onFocusout: i[2] || (i[2] = (...n) =>
|
|
490
|
+
onFocusin: i[1] || (i[1] = (...n) => s.handleInputFocusIn && s.handleInputFocusIn(...n)),
|
|
491
|
+
onFocusout: i[2] || (i[2] = (...n) => s.handleInputFocusOut && s.handleInputFocusOut(...n))
|
|
488
492
|
}, [
|
|
489
493
|
a("span", {
|
|
490
494
|
ref: "chipsWrapper",
|
|
491
|
-
class: z(["d-recipe-combobox-multi-select__chip-wrapper",
|
|
495
|
+
class: z(["d-recipe-combobox-multi-select__chip-wrapper", s.chipWrapperClass])
|
|
492
496
|
}, [
|
|
493
|
-
(p(!0),
|
|
497
|
+
(p(!0), b(E, null, D(e.selectedItems, (n) => (p(), f(u, d({
|
|
494
498
|
ref_for: !0,
|
|
495
499
|
ref: "chips",
|
|
496
500
|
key: n,
|
|
@@ -500,77 +504,77 @@ function q(t, i, e, l, s, o) {
|
|
|
500
504
|
{ "d-recipe-combobox-multi-select__chip--truncate": !!e.chipMaxWidth }
|
|
501
505
|
],
|
|
502
506
|
style: { maxWidth: e.chipMaxWidth },
|
|
503
|
-
size:
|
|
504
|
-
},
|
|
505
|
-
onKeydown:
|
|
506
|
-
onClose: (
|
|
507
|
+
size: o.CHIP_SIZES[e.size]
|
|
508
|
+
}, K(s.chipListeners), {
|
|
509
|
+
onKeydown: N((S) => s.onChipRemove(n), ["backspace"]),
|
|
510
|
+
onClose: (S) => s.onChipRemove(n)
|
|
507
511
|
}), {
|
|
508
|
-
default:
|
|
509
|
-
A(
|
|
512
|
+
default: l(() => [
|
|
513
|
+
A(C(n), 1)
|
|
510
514
|
]),
|
|
511
515
|
_: 2
|
|
512
516
|
}, 1040, ["class", "style", "size", "onKeydown", "onClose"]))), 128))
|
|
513
517
|
], 2),
|
|
514
|
-
|
|
518
|
+
y(c, d({
|
|
515
519
|
ref: "input",
|
|
516
|
-
modelValue:
|
|
517
|
-
"onUpdate:modelValue": i[0] || (i[0] = (n) =>
|
|
520
|
+
modelValue: o.value,
|
|
521
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => o.value = n),
|
|
518
522
|
class: "d-recipe-combobox-multi-select__input",
|
|
519
523
|
"input-class": [
|
|
520
524
|
e.inputClass,
|
|
521
525
|
{
|
|
522
|
-
"d-recipe-combobox-multi-select__input--hidden":
|
|
526
|
+
"d-recipe-combobox-multi-select__input--hidden": o.hideInputText
|
|
523
527
|
}
|
|
524
528
|
],
|
|
525
529
|
"input-wrapper-class": e.inputWrapperClass,
|
|
526
530
|
"aria-label": e.label,
|
|
527
531
|
label: e.labelVisible ? e.label : "",
|
|
528
532
|
description: e.description,
|
|
529
|
-
placeholder:
|
|
533
|
+
placeholder: s.inputPlaceHolder,
|
|
530
534
|
"show-messages": e.showInputMessages,
|
|
531
535
|
messages: e.inputMessages,
|
|
532
536
|
size: e.size
|
|
533
|
-
},
|
|
534
|
-
|
|
537
|
+
}, s.inputListeners, { onInput: w }), null, 16, ["modelValue", "input-class", "input-wrapper-class", "aria-label", "label", "description", "placeholder", "show-messages", "messages", "size", "onInput"]),
|
|
538
|
+
y(x, {
|
|
535
539
|
"validation-messages": e.maxSelectedMessage,
|
|
536
|
-
"show-messages":
|
|
540
|
+
"show-messages": o.showValidationMessages
|
|
537
541
|
}, null, 8, ["validation-messages", "show-messages"])
|
|
538
542
|
], 544)
|
|
539
543
|
]),
|
|
540
|
-
list:
|
|
544
|
+
list: l(() => [
|
|
541
545
|
a("div", {
|
|
542
546
|
ref: "list",
|
|
543
547
|
class: "d-recipe-combobox-multi-select__list",
|
|
544
|
-
onMousedown: i[3] || (i[3] =
|
|
548
|
+
onMousedown: i[3] || (i[3] = V(() => {
|
|
545
549
|
}, ["prevent"]))
|
|
546
550
|
}, [
|
|
547
|
-
e.loading ? (p(),
|
|
551
|
+
e.loading ? (p(), b("div", $, C(e.loadingMessage), 1)) : g(t.$slots, "list", { key: 0 })
|
|
548
552
|
], 544)
|
|
549
553
|
]),
|
|
550
554
|
_: 2
|
|
551
555
|
}, [
|
|
552
|
-
|
|
556
|
+
o.hasSlotContent(t.$slots.header) ? {
|
|
553
557
|
name: "header",
|
|
554
|
-
fn:
|
|
555
|
-
a("div",
|
|
556
|
-
|
|
558
|
+
fn: l(() => [
|
|
559
|
+
a("div", Z, [
|
|
560
|
+
g(t.$slots, "header")
|
|
557
561
|
], 512)
|
|
558
562
|
]),
|
|
559
563
|
key: "0"
|
|
560
564
|
} : void 0,
|
|
561
|
-
|
|
565
|
+
o.hasSlotContent(t.$slots.footer) ? {
|
|
562
566
|
name: "footer",
|
|
563
|
-
fn:
|
|
564
|
-
a("div",
|
|
565
|
-
|
|
567
|
+
fn: l(() => [
|
|
568
|
+
a("div", q, [
|
|
569
|
+
g(t.$slots, "footer")
|
|
566
570
|
], 512)
|
|
567
571
|
]),
|
|
568
572
|
key: "1"
|
|
569
573
|
} : void 0
|
|
570
|
-
]),
|
|
574
|
+
]), 1040, ["label", "show-list", "max-height", "max-width", "popover-offset", "has-suggestion-list", "append-to", "transition", "onSelect", "onHighlight"]);
|
|
571
575
|
}
|
|
572
|
-
const
|
|
576
|
+
const rt = /* @__PURE__ */ U(j, [["render", G]]);
|
|
573
577
|
export {
|
|
574
|
-
|
|
578
|
+
rt as default
|
|
575
579
|
};
|
|
576
580
|
//# sourceMappingURL=combobox-multi-select.js.map
|