@dialpad/dialtone 9.75.0 → 9.77.0-beta.1
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/tokens/doc.json +11989 -11989
- package/dist/vue2/common/sr_only_close_button.vue.cjs +3 -3
- package/dist/vue2/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/vue2/common/sr_only_close_button.vue.js +3 -3
- package/dist/vue2/common/sr_only_close_button.vue.js.map +1 -1
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/components/avatar/avatar.vue.cjs +13 -24
- package/dist/vue2/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/vue2/components/avatar/avatar.vue.js +13 -24
- package/dist/vue2/components/avatar/avatar.vue.js.map +1 -1
- package/dist/vue2/components/badge/badge.vue.cjs +13 -34
- package/dist/vue2/components/badge/badge.vue.cjs.map +1 -1
- package/dist/vue2/components/badge/badge.vue.js +13 -34
- package/dist/vue2/components/badge/badge.vue.js.map +1 -1
- package/dist/vue2/components/chip/chip.vue.cjs +4 -4
- package/dist/vue2/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue2/components/chip/chip.vue.js +4 -4
- package/dist/vue2/components/chip/chip.vue.js.map +1 -1
- package/dist/vue2/components/collapsible/collapsible.vue.cjs +4 -3
- package/dist/vue2/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue2/components/collapsible/collapsible.vue.js +4 -3
- package/dist/vue2/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs +14 -6
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js +14 -6
- package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +6 -5
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +6 -5
- package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +23 -14
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +23 -14
- package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/vue2/components/empty_state/empty_state.vue.cjs +20 -80
- package/dist/vue2/components/empty_state/empty_state.vue.cjs.map +1 -1
- package/dist/vue2/components/empty_state/empty_state.vue.js +21 -81
- package/dist/vue2/components/empty_state/empty_state.vue.js.map +1 -1
- package/dist/vue2/components/empty_state/empty_state_constants.cjs +18 -0
- package/dist/vue2/components/empty_state/empty_state_constants.cjs.map +1 -1
- package/dist/vue2/components/empty_state/empty_state_constants.js +18 -0
- package/dist/vue2/components/empty_state/empty_state_constants.js.map +1 -1
- package/dist/vue2/components/icon/icon.vue.cjs +2 -2
- package/dist/vue2/components/icon/icon.vue.js +2 -2
- package/dist/vue2/components/illustration/illustration.vue.cjs +2 -2
- package/dist/vue2/components/illustration/illustration.vue.js +2 -2
- package/dist/vue2/components/image_viewer/image_viewer.vue.cjs +4 -4
- package/dist/vue2/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue2/components/image_viewer/image_viewer.vue.js +4 -4
- package/dist/vue2/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +24 -9
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +22 -7
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +8 -14
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js +9 -15
- package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.cjs +3 -3
- package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.js +3 -3
- package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue2/components/modal/modal.vue.cjs +4 -4
- package/dist/vue2/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue2/components/modal/modal.vue.js +4 -4
- package/dist/vue2/components/modal/modal.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice_action.vue.cjs +4 -4
- package/dist/vue2/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice_action.vue.js +4 -4
- package/dist/vue2/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue2/components/notice/notice_icon.vue.cjs +12 -8
- package/dist/vue2/components/notice/notice_icon.vue.cjs.map +1 -1
- package/dist/vue2/components/notice/notice_icon.vue.js +12 -8
- package/dist/vue2/components/notice/notice_icon.vue.js.map +1 -1
- package/dist/vue2/components/pagination/pagination.vue.cjs +11 -5
- package/dist/vue2/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue2/components/pagination/pagination.vue.js +11 -5
- package/dist/vue2/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue2/components/popover/popover_header_footer.vue.cjs +4 -4
- package/dist/vue2/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue2/components/popover/popover_header_footer.vue.js +4 -4
- package/dist/vue2/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue2/dialtone-vue.cjs +0 -3
- package/dist/vue2/dialtone-vue.cjs.map +1 -1
- package/dist/vue2/dialtone-vue.js +2 -5
- package/dist/vue2/lib/general-row.cjs +0 -1
- package/dist/vue2/lib/general-row.cjs.map +1 -1
- package/dist/vue2/lib/general-row.js +1 -2
- package/dist/vue2/lib/keyboard-shortcut.cjs +0 -2
- package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue2/lib/keyboard-shortcut.js +2 -4
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -5
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -5
- package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs +25 -5
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js +26 -6
- package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +16 -2
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +16 -2
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +5 -4
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +5 -4
- package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +3 -3
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +3 -3
- package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +35 -22
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +35 -22
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -6
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +7 -6
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +9 -17
- package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +9 -17
- package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +6 -5
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +6 -5
- package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs +22 -11
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js +22 -11
- package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -6
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -6
- package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +14 -10
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +14 -10
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs +6 -3
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js +6 -3
- package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs +6 -5
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js +6 -5
- package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs +8 -7
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js +8 -7
- package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs +0 -17
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js +0 -17
- package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +36 -4
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +37 -5
- package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs +3 -3
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js +3 -3
- package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs +4 -3
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js +4 -3
- package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/vue2/style.css +139 -132
- package/dist/vue2/types/components/avatar/avatar.vue.d.ts +4 -34
- package/dist/vue2/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/badge/badge.vue.d.ts +16 -45
- package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts +1 -1
- package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +1 -67
- package/dist/vue2/types/components/empty_state/empty_state_constants.d.ts +27 -0
- package/dist/vue2/types/components/keyboard_shortcut/index.d.ts +1 -1
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +7 -15
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +0 -11
- package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
- package/dist/vue2/types/components/modal/modal.vue.d.ts +4 -6
- package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts +5 -4
- package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/notice/notice_icon.vue.d.ts +1 -1
- package/dist/vue2/types/components/notice/notice_icon.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/split_button/split_button-omega.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +8 -8
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +0 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +2 -16
- package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +4 -6
- package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -16
- package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -1
- package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts +0 -6
- package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/index.d.ts +1 -1
- package/dist/vue2/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
- package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
- package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
- package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/avatar/avatar.vue.cjs +30 -41
- package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/vue3/components/avatar/avatar.vue.js +32 -43
- package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
- package/dist/vue3/components/badge/badge.vue.cjs +22 -39
- package/dist/vue3/components/badge/badge.vue.cjs.map +1 -1
- package/dist/vue3/components/badge/badge.vue.js +23 -40
- package/dist/vue3/components/badge/badge.vue.js.map +1 -1
- package/dist/vue3/components/chip/chip.vue.cjs +4 -7
- package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue3/components/chip/chip.vue.js +4 -7
- package/dist/vue3/components/chip/chip.vue.js.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.cjs +12 -6
- package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.js +12 -6
- package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +5 -17
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +5 -17
- package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +4 -9
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +5 -10
- package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +11 -14
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +12 -15
- package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
- package/dist/vue3/components/empty_state/empty_state.vue.cjs +19 -92
- package/dist/vue3/components/empty_state/empty_state.vue.cjs.map +1 -1
- package/dist/vue3/components/empty_state/empty_state.vue.js +20 -93
- package/dist/vue3/components/empty_state/empty_state.vue.js.map +1 -1
- package/dist/vue3/components/empty_state/empty_state_constants.cjs +18 -0
- package/dist/vue3/components/empty_state/empty_state_constants.cjs.map +1 -1
- package/dist/vue3/components/empty_state/empty_state_constants.js +18 -0
- package/dist/vue3/components/empty_state/empty_state_constants.js.map +1 -1
- package/dist/vue3/components/icon/icon.vue.cjs +2 -2
- package/dist/vue3/components/icon/icon.vue.js +2 -2
- package/dist/vue3/components/illustration/illustration.vue.cjs +2 -2
- package/dist/vue3/components/illustration/illustration.vue.js +2 -2
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +4 -5
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.js +4 -5
- package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +24 -11
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +23 -10
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +8 -14
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js +9 -15
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.cjs +4 -5
- package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.js +4 -5
- package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue3/components/modal/modal.vue.cjs +4 -7
- package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue3/components/modal/modal.vue.js +4 -7
- package/dist/vue3/components/modal/modal.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.cjs +4 -7
- package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.js +4 -7
- package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_icon.vue.cjs +12 -12
- package/dist/vue3/components/notice/notice_icon.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_icon.vue.js +13 -13
- package/dist/vue3/components/notice/notice_icon.vue.js.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.cjs +10 -15
- package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.js +10 -15
- package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs +4 -7
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.js +4 -7
- package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue3/dialtone-vue.cjs +0 -3
- package/dist/vue3/dialtone-vue.cjs.map +1 -1
- package/dist/vue3/dialtone-vue.js +2 -5
- package/dist/vue3/lib/general-row.cjs +0 -1
- package/dist/vue3/lib/general-row.cjs.map +1 -1
- package/dist/vue3/lib/general-row.js +1 -2
- package/dist/vue3/lib/keyboard-shortcut.cjs +0 -2
- package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
- package/dist/vue3/lib/keyboard-shortcut.js +2 -4
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +4 -5
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +4 -5
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs +27 -11
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js +29 -13
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +18 -3
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +18 -3
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +7 -11
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +7 -11
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +4 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +4 -7
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +33 -25
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +34 -26
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +14 -7
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +15 -8
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +23 -25
- package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +24 -26
- package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +8 -12
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +8 -12
- package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +29 -18
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +29 -18
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -12
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -12
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +33 -13
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +34 -14
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +13 -4
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +14 -5
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +13 -7
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +14 -8
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +9 -13
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +9 -13
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs +0 -17
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js +0 -17
- package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +39 -11
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +41 -13
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +4 -7
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +4 -7
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +11 -6
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js +12 -7
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/vue3/style.css +139 -132
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts +5 -33
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/badge/badge.vue.d.ts +17 -34
- package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
- package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts +4 -0
- package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/empty_state/empty_state_constants.d.ts +27 -0
- package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/index.d.ts +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +210 -15
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +0 -11
- package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts +2 -8
- package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts +5 -4
- package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_icon.vue.d.ts +30 -1
- package/dist/vue3/types/components/notice/notice_icon.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +30 -1
- package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +240 -8
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +0 -1
- package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +31 -16
- package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +4 -6
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -16
- package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -1
- package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts +0 -6
- package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +30 -1
- package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/vue2/common/storybook_utils.cjs +0 -8
- package/dist/vue2/common/storybook_utils.cjs.map +0 -1
- package/dist/vue2/common/storybook_utils.js +0 -8
- package/dist/vue2/common/storybook_utils.js.map +0 -1
- package/dist/vue2/types/common/storybook_utils.d.ts +0 -35
- package/dist/vue2/types/common/storybook_utils.d.ts.map +0 -1
- package/dist/vue3/common/storybook_utils.cjs +0 -8
- package/dist/vue3/common/storybook_utils.cjs.map +0 -1
- package/dist/vue3/common/storybook_utils.js +0 -8
- package/dist/vue3/common/storybook_utils.js.map +0 -1
- package/dist/vue3/types/common/storybook_utils.d.ts +0 -25
- package/dist/vue3/types/common/storybook_utils.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox_multi_select.vue.js","sources":["../../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<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 :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\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=\"combobox__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['combobox__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=\"combobox__chip\"\n :close-button-props=\"{ ariaLabel: 'close' }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.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=\"combobox__input\"\n :input-class=\"{ 'd-fc-transparent': hideInputText }\"\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 @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"combobox__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 } 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';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\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 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 * 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 keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', 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 keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`combobox__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 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 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 => chip.$el.querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => 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 onChipKeyup (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 onInputKeyup (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 (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 await this.$nextTick();\n this.setInputPadding();\n this.hideInputText = false;\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\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.hideInputText = true;\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n\n<style scoped lang=\"less\">\n.combobox__input-wrapper {\n position: relative;\n display: block;\n}\n\n.combobox__chip-wrapper {\n position: absolute;\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n padding-left: var(--dt-space-100);\n max-width: calc(var(--dt-size-100-percent) - var(--dt-space-400));\n max-height: initial;\n overflow-y: visible;\n}\n\n.combobox__chip-wrapper-md--collapsed {\n max-height: 2.8rem;\n overflow-y: hidden;\n}\n\n.combobox__chip-wrapper-sm--collapsed,\n.combobox__chip-wrapper-xs--collapsed {\n max-height: 2.5rem;\n overflow-y: hidden;\n}\n\n.combobox__chip {\n margin-top: var(--dt-space-300);\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n z-index: var(--zi-base1);\n max-width: var(--dt-size-100-percent);\n}\n\n.combobox__input {\n flex-grow: 1;\n}\n\n.combobox__list--loading {\n text-align: center;\n padding-top: var(--dt-space-500);\n padding-bottom: var(--dt-space-500);\n}\n</style>\n"],"names":["_createBlock","_withCtx","_createElementVNode","_createElementBlock","_Fragment","_renderList","_openBlock","_mergeProps","_toHandlers","_withKeys","_createVNode","_renderSlot","_toDisplayString"],"mappings":";;;;;;;;;;;;AA8HA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,QAAQ,CAAC,sBAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa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C7B,iBAAe,OAAiB;AAAA,UAChC,UAAU,OAAa;AAAA,UACvB,MAAM,OAAI;AAAA,QACX,GAAAC,WAAM,SAAe,cAAD,GACnB,EAAA,QAAc,CAAA,GAAA,MAAA,IAAA,CAAA,cAAA,eAAA,cAAA,SAAA,eAAA,eAAA,iBAAA,YAAA,QAAA,SAAA,CAAA;AAAA,QAGjBE,YAGE,mCAAA;AAAA,UAFC,uBAAqB,OAAkB;AAAA,UACvC,iBAAe,MAAsB;AAAA;;;IAgBjC,cACT,MAcM;AAAA,MAdNR,mBAcM,OAAA;AAAA,QAbJ,KAAI;AAAA,QACH,qDAAD,MAAkB;AAAA,QAAA,GAAA,CAAA,SAAA,CAAA;AAAA;SAGT,OAAO,UADhBS,WAGE,KAAA,QAAA,QAAA,EAAA,KAAA,EAAA,GAAA,QAAA,IAAA,kBACFR,mBAKM,OALN,YAKMS,gBADD,OAAc,cAAA,GAAA,CAAA;AAAA;;;;IAtBf,MAAc,eAAC,KAAM,OAAC,MAAM;YACjC;AAAA,kBAED,MAEM;AAAA,QAFNV,mBAEM,OAFN,YAEM;AAAA,UADJS,WAAsB,KAAA,QAAA,UAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;IAyBlB,MAAc,eAAC,KAAM,OAAC,MAAM;YACjC;AAAA,kBAED,MAEM;AAAA,QAFNT,mBAEM,OAFN,YAEM;AAAA,UADJS,WAAsB,KAAA,QAAA,UAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"combobox_multi_select.vue.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 :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\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=\"combobox__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['combobox__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=\"['combobox__chip', { 'combobox__chip--truncate': !!chipMaxWidth }]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :close-button-props=\"{ ariaLabel: 'close' }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.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=\"combobox__input\"\n :input-class=\"{ 'd-fc-transparent': hideInputText }\"\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 @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"combobox__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 } 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';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\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 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 * 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 keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', 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 keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`combobox__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 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 => chip.$el.querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => 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 onChipKeyup (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 onInputKeyup (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 (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 await this.$nextTick();\n this.setInputPadding();\n this.hideInputText = false;\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\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.hideInputText = true;\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n\n<style scoped lang=\"less\">\n.combobox__input-wrapper {\n position: relative;\n display: block;\n}\n\n.combobox__chip-wrapper {\n position: absolute;\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n padding-left: var(--dt-space-100);\n max-width: calc(var(--dt-size-100-percent) - var(--dt-space-400));\n max-height: initial;\n overflow-y: visible;\n}\n\n.combobox__chip-wrapper-md--collapsed {\n max-height: 2.8rem;\n overflow-y: hidden;\n}\n\n.combobox__chip-wrapper-sm--collapsed,\n.combobox__chip-wrapper-xs--collapsed {\n max-height: 2.5rem;\n overflow-y: hidden;\n}\n\n.combobox__chip {\n margin-top: var(--dt-space-300);\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n z-index: var(--zi-base1);\n max-width: var(--dt-size-100-percent);\n}\n\n.combobox__input {\n flex-grow: 1;\n}\n\n.combobox__list--loading {\n text-align: center;\n padding-top: var(--dt-space-500);\n padding-bottom: var(--dt-space-500);\n}\n\n.combobox__chip--truncate {\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n</style>\n"],"names":["_createBlock","_withCtx","_createElementVNode","_createElementBlock","_Fragment","_renderList","_openBlock","_mergeProps","_toHandlers","_withKeys","_createVNode","_renderSlot","_toDisplayString"],"mappings":";;;;;;;;;;;;AAgIA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,QAAQ,CAAC,sBAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AA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ue3 = require("@dialpad/dialtone-icons/vue3");
|
|
2
3
|
const image_carousel = require("./media_components/image_carousel.vue.cjs");
|
|
3
4
|
const vue = require("vue");
|
|
4
5
|
;/* empty css */
|
|
5
6
|
const _pluginVue_exportHelper = require("../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
6
7
|
const button = require("../../../components/button/button.vue.cjs");
|
|
7
|
-
const icon = require("../../../components/icon/icon.vue.cjs");
|
|
8
8
|
const MEDIA_ITEM_WIDTH = 64;
|
|
9
9
|
const _sfc_main = {
|
|
10
10
|
name: "DtRecipeAttachmentCarousel",
|
|
11
11
|
components: {
|
|
12
12
|
DtButton: button,
|
|
13
|
-
|
|
13
|
+
DtIconArrowRight: vue3.DtIconArrowRight,
|
|
14
|
+
DtIconArrowLeft: vue3.DtIconArrowLeft,
|
|
14
15
|
DtImageCarousel: image_carousel
|
|
15
16
|
},
|
|
16
17
|
mixins: [],
|
|
@@ -123,8 +124,9 @@ const _hoisted_1 = {
|
|
|
123
124
|
role: "presentation"
|
|
124
125
|
};
|
|
125
126
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
126
|
-
const
|
|
127
|
+
const _component_dt_icon_arrow_left = vue.resolveComponent("dt-icon-arrow-left");
|
|
127
128
|
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
129
|
+
const _component_dt_icon_arrow_right = vue.resolveComponent("dt-icon-arrow-right");
|
|
128
130
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
129
131
|
$props.mediaList.length > 0 ? (vue.openBlock(), vue.createElementBlock("ul", {
|
|
130
132
|
key: 0,
|
|
@@ -155,10 +157,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
155
157
|
onClick: $options.leftScroll
|
|
156
158
|
}, {
|
|
157
159
|
icon: vue.withCtx(() => [
|
|
158
|
-
vue.createVNode(
|
|
159
|
-
name: "arrow-left",
|
|
160
|
-
size: "100"
|
|
161
|
-
})
|
|
160
|
+
vue.createVNode(_component_dt_icon_arrow_left, { size: "100" })
|
|
162
161
|
]),
|
|
163
162
|
_: 1
|
|
164
163
|
}, 8, ["aria-label", "onClick"]), [
|
|
@@ -174,10 +173,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
174
173
|
onClick: $options.rightScroll
|
|
175
174
|
}, {
|
|
176
175
|
icon: vue.withCtx(() => [
|
|
177
|
-
vue.createVNode(
|
|
178
|
-
name: "arrow-right",
|
|
179
|
-
size: "100"
|
|
180
|
-
})
|
|
176
|
+
vue.createVNode(_component_dt_icon_arrow_right, { size: "100" })
|
|
181
177
|
]),
|
|
182
178
|
_: 1
|
|
183
179
|
}, 8, ["aria-label", "onClick"]), [
|
package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment_carousel.vue.cjs","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"attachment_carousel.vue.cjs","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-carousel {\n position: relative;\n max-height: 100px;\n width: var(--dt-space-1000);\n}\n\n.dt-attachment-carousel__media-list {\n display: flex;\n flex-direction: row;\n padding-left: 0px;\n overflow-x: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n}\n\n.dt-attachment-carousel__arrow {\n position: absolute;\n opacity: 0;\n\n .dt-attachment-carousel:hover & {\n opacity: 1;\n }\n background-color: var(--dt-color-neutral-white);\n top: var(--dt-space-30-percent);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-100);\n border-color: var(--bc-default);\n}\n.dt-attachment-carousel__arrow--left {\n left: var(--dt-space-300);\n}\n.dt-attachment-carousel__arrow--right {\n right: var(--dt-space-300);\n}\n\n.dt-attachment-carousel__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border-radius: var(--br4);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["DtButton","DtIconArrowRight","DtIconArrowLeft","DtImageCarousel","_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_createVNode"],"mappings":";;;;;;;AAoEA,MAAM,mBAAmB;AAEzB,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA;AAAAA,IACA,kBAAAC,KAAgB;AAAA,IAChB,iBAAAC,KAAe;AAAA,IACf,iBAAAC;AAAAA,EACD;AAAA,EAED,QAAQ,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV,OAAO;AA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AAW;AAAA;;;uBAKzBC,IAeY,YAAA,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAkB;AAAA,MAC/B,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAU;AAAA;MAEP,kBACT,MAEE;AAAA,QAFFA,IAAAA,YAEE,+BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;kBAXN,MAAa,aAAA;AAAA;uBAevBA,IAeY,YAAA,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAmB;AAAA,MAChC,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAW;AAAA;MAER,kBACT,MAEE;AAAA,QAFFA,IAAAA,YAEE,gCAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;kBAXN,MAAc,cAAA;AAAA;;;;;"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { DtIconArrowRight, DtIconArrowLeft } from "@dialpad/dialtone-icons/vue3";
|
|
1
2
|
import DtImageCarousel from "./media_components/image_carousel.vue.js";
|
|
2
3
|
import { resolveComponent, openBlock, createElementBlock, Fragment, renderList, createBlock, resolveDynamicComponent, createCommentVNode, withDirectives, createVNode, withCtx, vShow } from "vue";
|
|
3
4
|
/* empty css */
|
|
4
5
|
import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
6
|
import DtButton from "../../../components/button/button.vue.js";
|
|
6
|
-
import DtIcon from "../../../components/icon/icon.vue.js";
|
|
7
7
|
const MEDIA_ITEM_WIDTH = 64;
|
|
8
8
|
const _sfc_main = {
|
|
9
9
|
name: "DtRecipeAttachmentCarousel",
|
|
10
10
|
components: {
|
|
11
11
|
DtButton,
|
|
12
|
-
|
|
12
|
+
DtIconArrowRight,
|
|
13
|
+
DtIconArrowLeft,
|
|
13
14
|
DtImageCarousel
|
|
14
15
|
},
|
|
15
16
|
mixins: [],
|
|
@@ -122,8 +123,9 @@ const _hoisted_1 = {
|
|
|
122
123
|
role: "presentation"
|
|
123
124
|
};
|
|
124
125
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
125
|
-
const
|
|
126
|
+
const _component_dt_icon_arrow_left = resolveComponent("dt-icon-arrow-left");
|
|
126
127
|
const _component_dt_button = resolveComponent("dt-button");
|
|
128
|
+
const _component_dt_icon_arrow_right = resolveComponent("dt-icon-arrow-right");
|
|
127
129
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
128
130
|
$props.mediaList.length > 0 ? (openBlock(), createElementBlock("ul", {
|
|
129
131
|
key: 0,
|
|
@@ -154,10 +156,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
154
156
|
onClick: $options.leftScroll
|
|
155
157
|
}, {
|
|
156
158
|
icon: withCtx(() => [
|
|
157
|
-
createVNode(
|
|
158
|
-
name: "arrow-left",
|
|
159
|
-
size: "100"
|
|
160
|
-
})
|
|
159
|
+
createVNode(_component_dt_icon_arrow_left, { size: "100" })
|
|
161
160
|
]),
|
|
162
161
|
_: 1
|
|
163
162
|
}, 8, ["aria-label", "onClick"]), [
|
|
@@ -173,10 +172,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
173
172
|
onClick: $options.rightScroll
|
|
174
173
|
}, {
|
|
175
174
|
icon: withCtx(() => [
|
|
176
|
-
createVNode(
|
|
177
|
-
name: "arrow-right",
|
|
178
|
-
size: "100"
|
|
179
|
-
})
|
|
175
|
+
createVNode(_component_dt_icon_arrow_right, { size: "100" })
|
|
180
176
|
]),
|
|
181
177
|
_: 1
|
|
182
178
|
}, 8, ["aria-label", "onClick"]), [
|
package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachment_carousel.vue.js","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"attachment_carousel.vue.js","sources":["../../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<template>\n <div\n class=\"dt-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"dt-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"dt-attachment-carousel__arrow dt-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-carousel {\n position: relative;\n max-height: 100px;\n width: var(--dt-space-1000);\n}\n\n.dt-attachment-carousel__media-list {\n display: flex;\n flex-direction: row;\n padding-left: 0px;\n overflow-x: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n}\n\n.dt-attachment-carousel__arrow {\n position: absolute;\n opacity: 0;\n\n .dt-attachment-carousel:hover & {\n opacity: 1;\n }\n background-color: var(--dt-color-neutral-white);\n top: var(--dt-space-30-percent);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-100);\n border-color: var(--bc-default);\n}\n.dt-attachment-carousel__arrow--left {\n left: var(--dt-space-300);\n}\n.dt-attachment-carousel__arrow--right {\n right: var(--dt-space-300);\n}\n\n.dt-attachment-carousel__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border-radius: var(--br4);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_createVNode"],"mappings":";;;;;;AAoEA,MAAM,mBAAmB;AAEzB,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,QAAQ,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQV,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,IAClB;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,iBAAiB,CAAE;AAAA,MACnB,gBAAgB;AAAA,MAChB,eAAe;AAAA,MACf,WAAW;AAAA;EAEd;AAAA,EAED,UAAU;AAAA,IACR,oBAAqB;AACnB,aAAO,KAAK,UA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AAA;AAAA;MAjBH,KAAI;AAAA,MACJ,OAAM;AAAA,MACL,iDAAQ,SAAY,gBAAA,SAAA,aAAA,GAAA,IAAA;AAAA;OAGrBD,UAAA,IAAA,GAAAC,mBAWEC,UAT6B,MAAAC,WAAA,SAAA,mBAArB,CAAA,WAAW,UAAK;AAF1B,eAAAH,UAAA,GAAAI,YAWEC,wBAVK,SAAA,eAAe,UAAU,IAAI,CAAA,GAAA;AAAA,UAEjC,cAAc,KAAK;AAAA,UACnB;AAAA,UACA,cAAY;AAAA,UACZ,oBAAkB,OAAc;AAAA,UAChC,4BAA0B,OAAoB;AAAA,UAC9C,0BAAwB,OAAoB;AAAA,UAC5C,eAAY,YAAE,SAAe,gBAAC,KAAK;AAAA,UACnC,WAAS,SAAW;AAAA;;;mBAKzBC,YAeY,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAkB;AAAA,MAC/B,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAU;AAAA;MAEP,cACT,MAEE;AAAA,QAFFA,YAEE,+BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;cAXN,MAAa,aAAA;AAAA;mBAevBA,YAeY,sBAAA;AAAA,MAbV,UAAS;AAAA,MACR,cAAY,OAAmB;AAAA,MAChC,OAAM;AAAA,MACN,QAAA;AAAA,MACA,MAAK;AAAA,MACL,YAAW;AAAA,MACV,SAAO,SAAW;AAAA;MAER,cACT,MAEE;AAAA,QAFFA,YAEE,gCAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;cAXN,MAAc,cAAA;AAAA;;;;"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
const vue3 = require("@dialpad/dialtone-icons/vue3");
|
|
2
3
|
const progress_bar = require("./progress_bar.vue.cjs");
|
|
3
4
|
const vue = require("vue");
|
|
4
5
|
;/* empty css */
|
|
5
6
|
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.cjs");
|
|
6
7
|
const image_viewer = require("../../../../components/image_viewer/image_viewer.vue.cjs");
|
|
7
8
|
const button = require("../../../../components/button/button.vue.cjs");
|
|
8
|
-
const icon = require("../../../../components/icon/icon.vue.cjs");
|
|
9
9
|
const _sfc_main = {
|
|
10
10
|
name: "DtImageCarousel",
|
|
11
11
|
components: {
|
|
12
12
|
DtImageViewer: image_viewer,
|
|
13
13
|
DtButton: button,
|
|
14
|
-
|
|
14
|
+
DtIconClose: vue3.DtIconClose,
|
|
15
15
|
DtProgressBar: progress_bar
|
|
16
16
|
},
|
|
17
17
|
props: {
|
|
@@ -56,7 +56,7 @@ const _hoisted_2 = { class: "dt-attachment-image__top-right" };
|
|
|
56
56
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
57
57
|
const _component_dt_image_viewer = vue.resolveComponent("dt-image-viewer");
|
|
58
58
|
const _component_dt_progress_bar = vue.resolveComponent("dt-progress-bar");
|
|
59
|
-
const
|
|
59
|
+
const _component_dt_icon_close = vue.resolveComponent("dt-icon-close");
|
|
60
60
|
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
61
61
|
return vue.openBlock(), vue.createElementBlock("li", _hoisted_1, [
|
|
62
62
|
vue.createVNode(_component_dt_image_viewer, {
|
|
@@ -84,10 +84,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
84
84
|
onClick: _cache[0] || (_cache[0] = ($event) => $options.removeMediaItem($props.index))
|
|
85
85
|
}, {
|
|
86
86
|
icon: vue.withCtx(() => [
|
|
87
|
-
vue.createVNode(
|
|
88
|
-
name: "close",
|
|
89
|
-
size: "200"
|
|
90
|
-
})
|
|
87
|
+
vue.createVNode(_component_dt_icon_close, { size: "200" })
|
|
91
88
|
]),
|
|
92
89
|
_: 1
|
|
93
90
|
}, 8, ["id", "aria-label"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image_carousel.vue.cjs","sources":["../../../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue"],"sourcesContent":["<template>\n <li\n class=\"dt-attachment-image\"\n >\n <dt-image-viewer\n image-button-class=\"dt-attachment-image__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"dt-attachment-image__top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"dt-attachment-image__progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"dt-attachment-image__close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"image_carousel.vue.cjs","sources":["../../../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue"],"sourcesContent":["<template>\n <li\n class=\"dt-attachment-image\"\n >\n <dt-image-viewer\n image-button-class=\"dt-attachment-image__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"dt-attachment-image__top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"dt-attachment-image__progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"dt-attachment-image__close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIconClose,\n DtProgressBar,\n },\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-image {\n position: relative;\n\n &:focus-within .dt-attachment-image__close-button, &:hover .dt-attachment-image__close-button {\n opacity: 1;\n }\n}\n.dt-attachment-image__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border: var(--dt-space-100) solid;\n border-radius: var(--br4);\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n object-fit: cover;\n}\n.dt-attachment-image__top-right {\n position: absolute;\n top: var(--dt-size-100);\n right: var(--dt-size-100);\n}\n.dt-attachment-image__close-button {\n opacity: 0;\n position: absolute;\n top: inherit;\n right: inherit;\n color: var(--dt-color-neutral-white);\n background-color: var(--dt-color-black-400);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-neutral-white);\n}\n.dt-attachment-image__progress-bar {\n position: absolute;\n top: inherit;\n right: inherit;\n background-color: var(--dt-color-neutral-white);\n border-radius: 50%;\n display: flex;\n transform: rotate(-90deg);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["DtImageViewer","DtButton","DtIconClose","DtProgressBar","_openBlock","_createElementBlock","_createVNode","_createElementVNode","_createBlock"],"mappings":";;;;;;;;AAiDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,mBACVA;AAAAA,IACA,UAAAC;AAAAA,iBACAC,KAAW;AAAA,mBACXC;AAAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,SAAS;AAAA,IACP,gBAAiB,OAAO;AACtB,WAAK,MAAM,gBAAgB,KAAK;AAAA,IACjC;AAAA,EACF;AACH;AAnGI,MAAA,aAAA,EAAA,OAAM,sBAAqB;AAYzB,MAAA,aAAA,EAAA,OAAM,iCAAgC;;;;;;AAb1C,SAAAC,cAAA,GAAAC,uBAsCK,MAtCL,YAsCK;AAAA,IAnCHC,IAAAA,YAME,4BAAA;AAAA,MALA,sBAAmB;AAAA,MAClB,aAAW,OAAS,UAAC;AAAA,MACrB,aAAW,OAAS,UAAC;AAAA,MACrB,oBAAkB,OAAc;AAAA,MAChC,cAAY,OAAoB;AAAA;IAInCC,IAAA,mBAyBM,OAzBN,YAyBM;AAAA,MArBI,OAAA,UAAU,gCADlBC,IAKE,YAAA,4BAAA;AAAA;QAHA,OAAM;AAAA,QACL,UAAU,OAAS,UAAC;AAAA,QACpB,0BAAwB,OAAoB;AAAA;MAE/CF,IAAAA,YAeY,sBAAA;AAAA,QAdT,mBAAmB,OAAK,KAAA;AAAA,QACzB,UAAS;AAAA,QACT,OAAM;AAAA,QACN,QAAA;AAAA,QACA,MAAK;AAAA,QACL,YAAW;AAAA,QACV,cAAY,OAAc;AAAA,QAC1B,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,SAAe,gBAAC,OAAK,KAAA;AAAA;QAElB,kBACT,MAEE;AAAA,UAFFA,IAAAA,YAEE,0BAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;;;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { DtIconClose } from "@dialpad/dialtone-icons/vue3";
|
|
1
2
|
import DtProgressBar from "./progress_bar.vue.js";
|
|
2
3
|
import { resolveComponent, openBlock, createElementBlock, createVNode, createElementVNode, createBlock, createCommentVNode, withCtx } from "vue";
|
|
3
4
|
/* empty css */
|
|
4
5
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
5
6
|
import DtImageViewer from "../../../../components/image_viewer/image_viewer.vue.js";
|
|
6
7
|
import DtButton from "../../../../components/button/button.vue.js";
|
|
7
|
-
import DtIcon from "../../../../components/icon/icon.vue.js";
|
|
8
8
|
const _sfc_main = {
|
|
9
9
|
name: "DtImageCarousel",
|
|
10
10
|
components: {
|
|
11
11
|
DtImageViewer,
|
|
12
12
|
DtButton,
|
|
13
|
-
|
|
13
|
+
DtIconClose,
|
|
14
14
|
DtProgressBar
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
@@ -55,7 +55,7 @@ const _hoisted_2 = { class: "dt-attachment-image__top-right" };
|
|
|
55
55
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
56
56
|
const _component_dt_image_viewer = resolveComponent("dt-image-viewer");
|
|
57
57
|
const _component_dt_progress_bar = resolveComponent("dt-progress-bar");
|
|
58
|
-
const
|
|
58
|
+
const _component_dt_icon_close = resolveComponent("dt-icon-close");
|
|
59
59
|
const _component_dt_button = resolveComponent("dt-button");
|
|
60
60
|
return openBlock(), createElementBlock("li", _hoisted_1, [
|
|
61
61
|
createVNode(_component_dt_image_viewer, {
|
|
@@ -83,10 +83,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
83
83
|
onClick: _cache[0] || (_cache[0] = ($event) => $options.removeMediaItem($props.index))
|
|
84
84
|
}, {
|
|
85
85
|
icon: withCtx(() => [
|
|
86
|
-
createVNode(
|
|
87
|
-
name: "close",
|
|
88
|
-
size: "200"
|
|
89
|
-
})
|
|
86
|
+
createVNode(_component_dt_icon_close, { size: "200" })
|
|
90
87
|
]),
|
|
91
88
|
_: 1
|
|
92
89
|
}, 8, ["id", "aria-label"])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image_carousel.vue.js","sources":["../../../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue"],"sourcesContent":["<template>\n <li\n class=\"dt-attachment-image\"\n >\n <dt-image-viewer\n image-button-class=\"dt-attachment-image__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"dt-attachment-image__top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"dt-attachment-image__progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"dt-attachment-image__close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon
|
|
1
|
+
{"version":3,"file":"image_carousel.vue.js","sources":["../../../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue"],"sourcesContent":["<template>\n <li\n class=\"dt-attachment-image\"\n >\n <dt-image-viewer\n image-button-class=\"dt-attachment-image__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"dt-attachment-image__top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"dt-attachment-image__progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"dt-attachment-image__close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIconClose,\n DtProgressBar,\n },\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.dt-attachment-image {\n position: relative;\n\n &:focus-within .dt-attachment-image__close-button, &:hover .dt-attachment-image__close-button {\n opacity: 1;\n }\n}\n.dt-attachment-image__image-viewer {\n height: var(--dt-size-700);\n width: var(--dt-size-700);\n border: var(--dt-space-100) solid;\n border-radius: var(--br4);\n border-width: var(--dt-size-350);\n border-color: var(--dt-color-border-subtle);\n object-fit: cover;\n}\n.dt-attachment-image__top-right {\n position: absolute;\n top: var(--dt-size-100);\n right: var(--dt-size-100);\n}\n.dt-attachment-image__close-button {\n opacity: 0;\n position: absolute;\n top: inherit;\n right: inherit;\n color: var(--dt-color-neutral-white);\n background-color: var(--dt-color-black-400);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-neutral-white);\n}\n.dt-attachment-image__progress-bar {\n position: absolute;\n top: inherit;\n right: inherit;\n background-color: var(--dt-color-neutral-white);\n border-radius: 50%;\n display: flex;\n transform: rotate(-90deg);\n border: var(--dt-space-100) solid;\n border-width: var(--dt-size-200);\n border-color: var(--dt-color-border-subtle);\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_createElementVNode","_createBlock"],"mappings":";;;;;;;AAiDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA,IACL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IAED,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA,EACD;AAAA,EAED,SAAS;AAAA,IACP,gBAAiB,OAAO;AACtB,WAAK,MAAM,gBAAgB,KAAK;AAAA,IACjC;AAAA,EACF;AACH;AAnGI,MAAA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