@dialpad/dialtone-vue 3.209.0 → 3.210.0-next.2
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/common/mixins/keyboard-list-navigation.cjs +1 -1
- package/dist/common/mixins/keyboard-list-navigation.cjs.map +1 -1
- package/dist/common/mixins/keyboard-list-navigation.js +7 -7
- package/dist/common/mixins/keyboard-list-navigation.js.map +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.cjs +1 -1
- package/dist/dialtone-vue.js +422 -386
- package/dist/dialtone-vue.js.map +1 -1
- package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
- package/dist/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
- package/dist/lib/attachment-carousel/attachment-carousel.js +64 -117
- package/dist/lib/attachment-carousel/attachment-carousel.js.map +1 -1
- package/dist/lib/avatar/avatar-constants.cjs +1 -1
- package/dist/lib/avatar/avatar-constants.cjs.map +1 -1
- package/dist/lib/avatar/avatar-constants.js +169 -43
- package/dist/lib/avatar/avatar-constants.js.map +1 -1
- package/dist/lib/avatar/avatar.cjs +1 -1
- package/dist/lib/avatar/avatar.cjs.map +1 -1
- package/dist/lib/avatar/avatar.js +185 -100
- package/dist/lib/avatar/avatar.js.map +1 -1
- package/dist/lib/avatar/index.cjs +1 -1
- package/dist/lib/avatar/index.js +16 -10
- package/dist/lib/badge/badge.cjs +1 -1
- package/dist/lib/badge/badge.cjs.map +1 -1
- package/dist/lib/badge/badge.js +47 -35
- package/dist/lib/badge/badge.js.map +1 -1
- package/dist/lib/button/button-constants.cjs +1 -1
- package/dist/lib/button/button-constants.cjs.map +1 -1
- package/dist/lib/button/button-constants.js +23 -19
- package/dist/lib/button/button-constants.js.map +1 -1
- package/dist/lib/button/button.cjs +1 -1
- package/dist/lib/button/button.cjs.map +1 -1
- package/dist/lib/button/button.js +138 -60
- package/dist/lib/button/button.js.map +1 -1
- package/dist/lib/callbar-button/callbar-button.cjs +1 -1
- package/dist/lib/callbar-button/callbar-button.cjs.map +1 -1
- package/dist/lib/callbar-button/callbar-button.js +8 -9
- package/dist/lib/callbar-button/callbar-button.js.map +1 -1
- package/dist/lib/callbox/callbox.cjs +1 -1
- package/dist/lib/callbox/callbox.cjs.map +1 -1
- package/dist/lib/callbox/callbox.js +47 -47
- package/dist/lib/callbox/callbox.js.map +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.js +31 -31
- package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
- package/dist/lib/contact-centers-row/contact-centers-row.cjs +1 -1
- package/dist/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
- package/dist/lib/contact-centers-row/contact-centers-row.js +33 -33
- package/dist/lib/contact-centers-row/contact-centers-row.js.map +1 -1
- package/dist/lib/contact-info/contact-info.cjs +1 -1
- package/dist/lib/contact-info/contact-info.cjs.map +1 -1
- package/dist/lib/contact-info/contact-info.js +56 -56
- package/dist/lib/contact-info/contact-info.js.map +1 -1
- package/dist/lib/contact-row/contact-row.cjs +1 -1
- package/dist/lib/contact-row/contact-row.cjs.map +1 -1
- package/dist/lib/contact-row/contact-row.js +1 -1
- package/dist/lib/contact-row/contact-row.js.map +1 -1
- package/dist/lib/datepicker/datepicker.cjs +1 -1
- package/dist/lib/datepicker/datepicker.cjs.map +1 -1
- package/dist/lib/datepicker/datepicker.js +11 -11
- package/dist/lib/datepicker/datepicker.js.map +1 -1
- package/dist/lib/editor/editor.cjs +1 -1
- package/dist/lib/editor/editor.cjs.map +1 -1
- package/dist/lib/editor/editor.js +13 -12
- package/dist/lib/editor/editor.js.map +1 -1
- package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/lib/emoji-picker/emoji-picker.cjs.map +1 -1
- package/dist/lib/emoji-picker/emoji-picker.js +2 -2
- package/dist/lib/emoji-picker/emoji-picker.js.map +1 -1
- package/dist/lib/feed-item-pill/feed-item-pill.cjs +1 -1
- package/dist/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
- package/dist/lib/feed-item-pill/feed-item-pill.js +56 -53
- package/dist/lib/feed-item-pill/feed-item-pill.js.map +1 -1
- package/dist/lib/feed-item-row/feed-item-row.cjs +1 -1
- package/dist/lib/feed-item-row/feed-item-row.cjs.map +1 -1
- package/dist/lib/feed-item-row/feed-item-row.js +11 -11
- package/dist/lib/feed-item-row/feed-item-row.js.map +1 -1
- package/dist/lib/filter-pill/filter-pill.cjs +2 -0
- package/dist/lib/filter-pill/filter-pill.cjs.map +1 -0
- package/dist/lib/filter-pill/filter-pill.js +346 -0
- package/dist/lib/filter-pill/filter-pill.js.map +1 -0
- package/dist/lib/filter-pill/index.cjs +2 -0
- package/dist/lib/filter-pill/index.cjs.map +1 -0
- package/dist/lib/filter-pill/index.js +5 -0
- package/dist/lib/filter-pill/index.js.map +1 -0
- package/dist/lib/general-row/general-row.cjs +1 -1
- package/dist/lib/general-row/general-row.cjs.map +1 -1
- package/dist/lib/general-row/general-row.js +153 -99
- package/dist/lib/general-row/general-row.js.map +1 -1
- package/dist/lib/group-row/group-row.cjs +1 -1
- package/dist/lib/group-row/group-row.cjs.map +1 -1
- package/dist/lib/group-row/group-row.js +1 -1
- package/dist/lib/group-row/group-row.js.map +1 -1
- package/dist/lib/grouped-chip/grouped-chip.cjs +1 -1
- package/dist/lib/grouped-chip/grouped-chip.cjs.map +1 -1
- package/dist/lib/grouped-chip/grouped-chip.js +31 -31
- package/dist/lib/grouped-chip/grouped-chip.js.map +1 -1
- package/dist/lib/input/input.cjs +1 -1
- package/dist/lib/input/input.cjs.map +1 -1
- package/dist/lib/input/input.js +53 -42
- package/dist/lib/input/input.js.map +1 -1
- package/dist/lib/item-layout/item-layout.cjs +3 -3
- package/dist/lib/item-layout/item-layout.cjs.map +1 -1
- package/dist/lib/item-layout/item-layout.js +74 -39
- package/dist/lib/item-layout/item-layout.js.map +1 -1
- package/dist/lib/kitchen-sink/kitchen-sink-view.cjs +2 -0
- package/dist/lib/kitchen-sink/kitchen-sink-view.cjs.map +1 -0
- package/dist/lib/kitchen-sink/kitchen-sink-view.js +263 -0
- package/dist/lib/kitchen-sink/kitchen-sink-view.js.map +1 -0
- package/dist/lib/link/link.cjs +1 -1
- package/dist/lib/link/link.cjs.map +1 -1
- package/dist/lib/link/link.js +21 -12
- package/dist/lib/link/link.js.map +1 -1
- package/dist/lib/list-item/list-item.cjs +1 -1
- package/dist/lib/list-item/list-item.cjs.map +1 -1
- package/dist/lib/list-item/list-item.js +25 -15
- package/dist/lib/list-item/list-item.js.map +1 -1
- package/dist/lib/loader/loader.cjs +13 -1
- package/dist/lib/loader/loader.cjs.map +1 -1
- package/dist/lib/loader/loader.js +31 -20
- package/dist/lib/loader/loader.js.map +1 -1
- package/dist/lib/message-input/message-input.cjs +1 -1
- package/dist/lib/message-input/message-input.cjs.map +1 -1
- package/dist/lib/message-input/message-input.js +44 -43
- package/dist/lib/message-input/message-input.js.map +1 -1
- package/dist/lib/mode-island/index.cjs +2 -0
- package/dist/lib/mode-island/index.cjs.map +1 -0
- package/dist/lib/mode-island/index.js +7 -0
- package/dist/lib/mode-island/index.js.map +1 -0
- package/dist/lib/mode-island/mode-island-constants.cjs +2 -0
- package/dist/lib/mode-island/mode-island-constants.cjs.map +1 -0
- package/dist/lib/mode-island/mode-island-constants.js +12 -0
- package/dist/lib/mode-island/mode-island-constants.js.map +1 -0
- package/dist/lib/mode-island/mode-island.cjs +2 -0
- package/dist/lib/mode-island/mode-island.cjs.map +1 -0
- package/dist/lib/mode-island/mode-island.js +130 -0
- package/dist/lib/mode-island/mode-island.js.map +1 -0
- package/dist/lib/mode-island/utils.cjs +2 -0
- package/dist/lib/mode-island/utils.cjs.map +1 -0
- package/dist/lib/mode-island/utils.js +32 -0
- package/dist/lib/mode-island/utils.js.map +1 -0
- package/dist/lib/mode-island/validators.cjs +2 -0
- package/dist/lib/mode-island/validators.cjs.map +1 -0
- package/dist/lib/mode-island/validators.js +12 -0
- package/dist/lib/mode-island/validators.js.map +1 -0
- package/dist/lib/pagination/pagination.cjs +1 -1
- package/dist/lib/pagination/pagination.cjs.map +1 -1
- package/dist/lib/pagination/pagination.js +15 -14
- package/dist/lib/pagination/pagination.js.map +1 -1
- package/dist/lib/popover/popover.cjs +1 -1
- package/dist/lib/popover/popover.cjs.map +1 -1
- package/dist/lib/popover/popover.js +1 -1
- package/dist/lib/popover/popover.js.map +1 -1
- package/dist/lib/progress-circle/index.cjs +2 -0
- package/dist/lib/progress-circle/index.cjs.map +1 -0
- package/dist/lib/progress-circle/index.js +10 -0
- package/dist/lib/progress-circle/index.js.map +1 -0
- package/dist/lib/progress-circle/progress-circle-constants.cjs +2 -0
- package/dist/lib/progress-circle/progress-circle-constants.cjs.map +1 -0
- package/dist/lib/progress-circle/progress-circle-constants.js +25 -0
- package/dist/lib/progress-circle/progress-circle-constants.js.map +1 -0
- package/dist/lib/progress-circle/progress-circle.cjs +2 -0
- package/dist/lib/progress-circle/progress-circle.cjs.map +1 -0
- package/dist/lib/progress-circle/progress-circle.js +136 -0
- package/dist/lib/progress-circle/progress-circle.js.map +1 -0
- package/dist/lib/rich-text-editor/rich-text-editor.cjs +2 -2
- package/dist/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.js +115 -97
- package/dist/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/lib/root-layout/root-layout-constants.cjs +1 -1
- package/dist/lib/root-layout/root-layout-constants.cjs.map +1 -1
- package/dist/lib/root-layout/root-layout-constants.js +4 -2
- package/dist/lib/root-layout/root-layout-constants.js.map +1 -1
- package/dist/lib/root-layout/root-layout.cjs +1 -1
- package/dist/lib/root-layout/root-layout.cjs.map +1 -1
- package/dist/lib/root-layout/root-layout.js +9 -10
- package/dist/lib/root-layout/root-layout.js.map +1 -1
- package/dist/lib/settings-menu-button/settings-menu-button.cjs +1 -1
- package/dist/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
- package/dist/lib/settings-menu-button/settings-menu-button.js +14 -15
- package/dist/lib/settings-menu-button/settings-menu-button.js.map +1 -1
- package/dist/lib/split-button/split-button-alpha.cjs +1 -1
- package/dist/lib/split-button/split-button-alpha.cjs.map +1 -1
- package/dist/lib/split-button/split-button-alpha.js +51 -28
- package/dist/lib/split-button/split-button-alpha.js.map +1 -1
- package/dist/lib/split-button/split-button.cjs +1 -1
- package/dist/lib/split-button/split-button.cjs.map +1 -1
- package/dist/lib/split-button/split-button.js +235 -89
- package/dist/lib/split-button/split-button.js.map +1 -1
- package/dist/lib/text/index.cjs +2 -0
- package/dist/lib/text/index.cjs.map +1 -0
- package/dist/lib/text/index.js +20 -0
- package/dist/lib/text/index.js.map +1 -0
- package/dist/lib/text/text-constants.cjs +2 -0
- package/dist/lib/text/text-constants.cjs.map +1 -0
- package/dist/lib/text/text-constants.js +69 -0
- package/dist/lib/text/text-constants.js.map +1 -0
- package/dist/lib/text/text-tone-tokens.cjs +2 -0
- package/dist/lib/text/text-tone-tokens.cjs.map +1 -0
- package/dist/lib/text/text-tone-tokens.js +33 -0
- package/dist/lib/text/text-tone-tokens.js.map +1 -0
- package/dist/lib/text/text.cjs +2 -0
- package/dist/lib/text/text.cjs.map +1 -0
- package/dist/lib/text/text.js +203 -0
- package/dist/lib/text/text.js.map +1 -0
- package/dist/lib/top-banner-info/top-banner-info.cjs +1 -1
- package/dist/lib/top-banner-info/top-banner-info.cjs.map +1 -1
- package/dist/lib/top-banner-info/top-banner-info.js +16 -16
- package/dist/lib/top-banner-info/top-banner-info.js.map +1 -1
- package/dist/localization/en-US.cjs +2 -0
- package/dist/localization/en-US.cjs.map +1 -1
- package/dist/localization/en-US.js +2 -0
- package/dist/localization/en-US.js.map +1 -1
- package/dist/localization/es-LA.cjs +1 -1
- package/dist/localization/es-LA.cjs.map +1 -1
- package/dist/localization/es-LA.js +1 -1
- package/dist/localization/es-LA.js.map +1 -1
- package/dist/localization/it-IT.cjs +3 -3
- package/dist/localization/it-IT.cjs.map +1 -1
- package/dist/localization/it-IT.js +3 -3
- package/dist/localization/it-IT.js.map +1 -1
- package/dist/localization/nl-NL.cjs +2 -2
- package/dist/localization/nl-NL.cjs.map +1 -1
- package/dist/localization/nl-NL.js +2 -2
- package/dist/localization/nl-NL.js.map +1 -1
- package/dist/localization/ru-RU.cjs +1 -1
- package/dist/localization/ru-RU.cjs.map +1 -1
- package/dist/localization/ru-RU.js +1 -1
- package/dist/localization/ru-RU.js.map +1 -1
- package/dist/localization/zh-CN.cjs +1 -1
- package/dist/localization/zh-CN.cjs.map +1 -1
- package/dist/localization/zh-CN.js +1 -1
- package/dist/localization/zh-CN.js.map +1 -1
- package/dist/node_modules/@tiptap/vue-3.cjs.map +1 -1
- package/dist/node_modules/@tiptap/vue-3.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/common/mixins/keyboard_list_navigation.d.ts.map +1 -1
- package/dist/types/common/sr_only_close_button.vue.d.ts +20 -2
- package/dist/types/components/avatar/avatar.vue.d.ts +71 -25
- package/dist/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/types/components/avatar/avatar_constants.d.ts +86 -29
- package/dist/types/components/avatar/avatar_constants.d.ts.map +1 -1
- package/dist/types/components/avatar/index.d.ts +1 -1
- package/dist/types/components/badge/badge.vue.d.ts.map +1 -1
- package/dist/types/components/banner/banner.vue.d.ts +40 -4
- package/dist/types/components/banner/banner.vue.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +9 -0
- package/dist/types/components/breadcrumbs/breadcrumb_item.vue.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs.vue.d.ts +9 -0
- package/dist/types/components/button/button.vue.d.ts +20 -2
- package/dist/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/types/components/button/button_constants.d.ts +4 -0
- package/dist/types/components/button/button_constants.d.ts.map +1 -1
- package/dist/types/components/chip/chip.vue.d.ts +20 -2
- package/dist/types/components/chip/chip.vue.d.ts.map +1 -1
- package/dist/types/components/collapsible/collapsible.vue.d.ts +20 -2
- package/dist/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox.vue.d.ts +79 -13
- package/dist/types/components/combobox/combobox.vue.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox_empty-list.vue.d.ts +39 -6
- package/dist/types/components/combobox/combobox_empty-list.vue.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox_loading-list.vue.d.ts +39 -6
- package/dist/types/components/combobox/combobox_loading-list.vue.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown.vue.d.ts +40 -4
- package/dist/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
- package/dist/types/components/filter_pill/filter_pill.vue.d.ts +2016 -0
- package/dist/types/components/filter_pill/filter_pill.vue.d.ts.map +1 -0
- package/dist/types/components/filter_pill/index.d.ts +2 -0
- package/dist/types/components/filter_pill/index.d.ts.map +1 -0
- package/dist/types/components/hovercard/hovercard.vue.d.ts +80 -8
- package/dist/types/components/hovercard/hovercard.vue.d.ts.map +1 -1
- package/dist/types/components/image_viewer/image_viewer.vue.d.ts +40 -4
- package/dist/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
- package/dist/types/components/input/input.vue.d.ts.map +1 -1
- package/dist/types/components/item_layout/item_layout.vue.d.ts +36 -5
- package/dist/types/components/item_layout/item_layout.vue.d.ts.map +1 -1
- package/dist/types/components/link/link.vue.d.ts +9 -0
- package/dist/types/components/list_item/list_item.vue.d.ts +39 -6
- package/dist/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/types/components/loader/loader.vue.d.ts +1 -32
- package/dist/types/components/loader/loader.vue.d.ts.map +1 -1
- package/dist/types/components/modal/modal.vue.d.ts +40 -4
- package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/types/components/mode_island/index.d.ts +3 -0
- package/dist/types/components/mode_island/index.d.ts.map +1 -0
- package/dist/types/components/mode_island/mode_island.vue.d.ts +3 -0
- package/dist/types/components/mode_island/mode_island.vue.d.ts.map +1 -0
- package/dist/types/components/mode_island/mode_island_constants.d.ts +10 -0
- package/dist/types/components/mode_island/mode_island_constants.d.ts.map +1 -0
- package/dist/types/components/mode_island/utils.d.ts +12 -0
- package/dist/types/components/mode_island/utils.d.ts.map +1 -0
- package/dist/types/components/mode_island/validators.d.ts +6 -0
- package/dist/types/components/mode_island/validators.d.ts.map +1 -0
- package/dist/types/components/notice/notice.vue.d.ts +40 -4
- package/dist/types/components/notice/notice.vue.d.ts.map +1 -1
- package/dist/types/components/notice/notice_action.vue.d.ts +40 -4
- package/dist/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination.vue.d.ts +20 -2
- package/dist/types/components/pagination/pagination.vue.d.ts.map +1 -1
- package/dist/types/components/popover/popover.vue.d.ts +40 -4
- package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/types/components/popover/popover_header_footer.vue.d.ts +20 -2
- package/dist/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/types/components/progress_circle/index.d.ts +3 -0
- package/dist/types/components/progress_circle/index.d.ts.map +1 -0
- package/dist/types/components/progress_circle/progress_circle.vue.d.ts +70 -0
- package/dist/types/components/progress_circle/progress_circle.vue.d.ts.map +1 -0
- package/dist/types/components/progress_circle/progress_circle_constants.d.ts +23 -0
- package/dist/types/components/progress_circle/progress_circle_constants.d.ts.map +1 -0
- package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +9 -0
- package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +9 -0
- package/dist/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +71 -25
- package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +39 -6
- package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts +61 -6
- package/dist/types/components/rich_text_editor/extensions/variable/VariableComponent.vue.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/variable/variable.d.ts.map +1 -1
- package/dist/types/components/root_layout/root_layout_constants.d.ts +2 -0
- package/dist/types/components/root_layout/root_layout_constants.d.ts.map +1 -1
- package/dist/types/components/split_button/split_button-alpha.vue.d.ts +21 -3
- package/dist/types/components/split_button/split_button-alpha.vue.d.ts.map +1 -1
- package/dist/types/components/split_button/split_button-omega.vue.d.ts +20 -2
- package/dist/types/components/split_button/split_button-omega.vue.d.ts.map +1 -1
- package/dist/types/components/split_button/split_button.vue.d.ts +214 -28
- package/dist/types/components/split_button/split_button.vue.d.ts.map +1 -1
- package/dist/types/components/tab/tab.vue.d.ts +20 -2
- package/dist/types/components/text/index.d.ts +3 -0
- package/dist/types/components/text/index.d.ts.map +1 -0
- package/dist/types/components/text/scripts/update-text-tone-tokens.d.cts +3 -0
- package/dist/types/components/text/scripts/update-text-tone-tokens.d.cts.map +1 -0
- package/dist/types/components/text/scripts/update_text_tone_tokens.d.cts +3 -0
- package/dist/types/components/text/scripts/update_text_tone_tokens.d.cts.map +1 -0
- package/dist/types/components/text/scripts/update_text_tone_tokens.d.ts +1 -0
- package/dist/types/components/text/scripts/update_text_tone_tokens.d.ts.map +1 -0
- package/dist/types/components/text/text.vue.d.ts +141 -0
- package/dist/types/components/text/text.vue.d.ts.map +1 -0
- package/dist/types/components/text/text_constants.d.ts +73 -0
- package/dist/types/components/text/text_constants.d.ts.map +1 -0
- package/dist/types/components/text/text_tone_tokens.d.ts +3 -0
- package/dist/types/components/text/text_tone_tokens.d.ts.map +1 -0
- package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +40 -4
- package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
- package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts +40 -4
- package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
- package/dist/types/components/toast/toast.vue.d.ts +160 -16
- package/dist/types/components/toast/toast.vue.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +20 -2
- package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts.map +1 -1
- package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +80 -8
- package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
- package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +80 -8
- package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
- package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +60 -6
- package/dist/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
- package/dist/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +20 -2
- package/dist/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
- package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +198 -30
- package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +124 -12
- package/dist/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +104 -10
- package/dist/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/editor/EditorToolbarButton.vue.d.ts +20 -2
- package/dist/types/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts +60 -6
- package/dist/types/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts +60 -6
- package/dist/types/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +20 -2
- package/dist/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +56 -7
- package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +110 -31
- package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +56 -7
- package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +20 -2
- package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +80 -8
- package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
- package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +20 -2
- package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
- package/dist/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +20 -2
- package/dist/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
- package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +107 -30
- package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts +71 -25
- package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +20 -2
- package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +449 -28
- package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +378 -3
- package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/leftbar/group_row/group_row.vue.d.ts +378 -3
- package/dist/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
- package/dist/types/recipes/notices/top_banner_info/top_banner_info.vue.d.ts.map +1 -1
- package/package.json +6 -5
- package/dist/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +0 -30
- package/dist/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-centers-row.js","sources":["../../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-recipe-leftbar-row__container',\n { 'd-recipe-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"contactRowListeners\"\n @click=\"$emit('click', $event)\"\n >\n <div class=\"d-recipe-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div\n v-if=\"!hideActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <slot name=\"right\" />\n <div class=\"d-recipe-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"d-recipe-leftbar-row__unread-badge\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action-button\"\n :aria-label=\"menuButtonLabel\"\n :title=\"menuButtonLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"d-recipe-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { extractVueListeners, safeConcatStrings, removeClassStyleAttrs, returnFirstEl, addClassStyleAttrs } from '@/common/utils';\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport { DtEmojiTextWrapper } from '@/components/emoji_text_wrapper';\nimport { DtIconChevronDown, DtIconHeadphones } from '@dialpad/dialtone-icons/vue3';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactCentersRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Making this true will hide the unread count badge, the chevron button, and the right slot\n */\n hideActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages, could be a string to support '99+'\n */\n unreadCount: {\n type: String,\n default: null,\n validator (value) {\n if (!value) return true;\n return /^\\d+\\+?$/.test(value);\n },\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n 'd-recipe-leftbar-row--contact-centers',\n {\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n const count = isNaN(this.unreadCount) ? this.unreadCount : Number(this.unreadCount);\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([\n this.description,\n this.i18n.$t('DIALTONE_UNREAD_MESSAGE_COUNT_TEXT', { unreadCount: count }),\n ]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n showUnreadCount () {\n return !!this.unreadCount;\n },\n\n menuButtonLabel () {\n return this.i18n.$t('DIALTONE_CONTACT_CENTERS_ROW_MENU_BUTTON_LABEL');\n },\n },\n\n watch: {\n $props: {\n deep: true,\n async handler () {\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(returnFirstEl(this.$el));\n this.adjustLabelWidth();\n },\n\n beforeUnmount: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n\n adjustLabelWidth () {\n const labelWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtBadge","DtEmojiTextWrapper","DtIconHeadphones","DtIconChevronDown","value","DialtoneLocalization","count","safeConcatStrings","extractVueListeners","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","labelWidth","_b","_a","omegaWidth","_d","_c","alphaWidth","_f","_e","paddings","_hoisted_2","_hoisted_4","_hoisted_5","_openBlock","_createElementBlock","_mergeProps","_ctx","$options","_createElementVNode","$props","_toHandlers","_cache","$event","_createVNode","_component_dt_icon_headphones","$data","_component_dt_emoji_text_wrapper","_hoisted_3","_renderSlot","_createBlock","_component_dt_badge","_component_dt_button","_withModifiers","_component_dt_icon_chevron_down"],"mappings":";;;;;;;;AAuFA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,oBAAAC;AAAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA;EAGF,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA;;;;IAMZ,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAA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<div\n :class=\"[\n 'd-recipe-leftbar-row__container',\n { 'd-recipe-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n v-bind=\"addClassStyleAttrs($attrs)\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"d-recipe-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'd-recipe-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"contactRowListeners\"\n @click=\"$emit('click', $event)\"\n >\n <div class=\"d-recipe-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-recipe-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"d-recipe-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div\n v-if=\"!hideActions\"\n class=\"d-recipe-leftbar-row__omega\"\n >\n <!-- @slot Slot for end content -->\n <slot\n v-if=\"$slots.end\"\n name=\"end\"\n />\n <!-- @slot @deprecated Use end -->\n <slot\n v-else\n name=\"right\"\n />\n <div class=\"d-recipe-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"d-recipe-leftbar-row__unread-badge\"\n data-qa=\"dt-recipe-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"d-recipe-leftbar-row__action\"\n data-qa=\"dt-recipe-leftbar-row-action-button\"\n :aria-label=\"menuButtonLabel\"\n :title=\"menuButtonLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"d-recipe-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { extractVueListeners, safeConcatStrings, removeClassStyleAttrs, returnFirstEl, addClassStyleAttrs } from '@/common/utils';\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport { DtEmojiTextWrapper } from '@/components/emoji_text_wrapper';\nimport { DtIconChevronDown, DtIconHeadphones } from '@dialpad/dialtone-icons/vue3';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactCentersRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Making this true will hide the unread count badge, the chevron button, and the right slot\n */\n hideActions: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages, could be a string to support '99+'\n */\n unreadCount: {\n type: String,\n default: null,\n validator (value) {\n if (!value) return true;\n return /^\\d+\\+?$/.test(value);\n },\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'd-recipe-leftbar-row',\n 'd-recipe-leftbar-row--contact-centers',\n {\n 'd-recipe-leftbar-row__unread-count': this.showUnreadCount,\n 'd-recipe-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n const count = isNaN(this.unreadCount) ? this.unreadCount : Number(this.unreadCount);\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([\n this.description,\n this.i18n.$t('DIALTONE_UNREAD_MESSAGE_COUNT_TEXT', { unreadCount: count }),\n ]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n showUnreadCount () {\n return !!this.unreadCount;\n },\n\n menuButtonLabel () {\n return this.i18n.$t('DIALTONE_CONTACT_CENTERS_ROW_MENU_BUTTON_LABEL');\n },\n },\n\n watch: {\n $props: {\n deep: true,\n async handler () {\n await this.$nextTick();\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(returnFirstEl(this.$el));\n this.adjustLabelWidth();\n },\n\n beforeUnmount: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n removeClassStyleAttrs,\n addClassStyleAttrs,\n\n adjustLabelWidth () {\n const labelWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = returnFirstEl(this.$el)?.querySelector('.d-recipe-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtBadge","DtEmojiTextWrapper","DtIconHeadphones","DtIconChevronDown","value","DialtoneLocalization","count","safeConcatStrings","extractVueListeners","returnFirstEl","removeClassStyleAttrs","addClassStyleAttrs","labelWidth","_b","_a","omegaWidth","_d","_c","alphaWidth","_f","_e","paddings","_hoisted_2","_hoisted_4","_hoisted_5","_openBlock","_createElementBlock","_mergeProps","_ctx","$options","_createElementVNode","$props","_toHandlers","_cache","$event","_createVNode","_component_dt_icon_headphones","$data","_component_dt_emoji_text_wrapper","_hoisted_3","_renderSlot","_createBlock","_component_dt_badge","_component_dt_button","_withModifiers","_component_dt_icon_chevron_down"],"mappings":";;;;;;;;AAgGA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,oBAAAC;AAAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA;EAGF,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA;;;;IAMZ,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAWC,GAAO;AAChB,eAAKA,IACE,WAAW,KAAKA,CAAK,IADT;AAAA,MAErB;AAAA;;EAIJ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA;EAGF,OAAQ;AACN,WAAO;AAAA,MACL,YAAY;AAAA,MACZ,MAAM,IAAIC,EAAoB;AAAA;EAElC;AAAA,EAEA,UAAU;AAAA,IACR,kCAAmC;AACjC,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,UACE,sCAAsC,KAAK;AAAA,UAC3C,kCAAkC,KAAK;AAAA;;IAG7C;AAAA,IAEA,eAAgB;AACd,YAAMC,IAAQ,MAAM,KAAK,WAAW,IAAI,KAAK,cAAc,OAAO,KAAK,WAAW;AAClF,aAAO,KAAK,YACR,K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M,EAAA,wBADRY,EAQWC,GAAA;AAAA;YANT,OAAM;AAAA,YACN,WAAQ;AAAA,YACR,MAAK;AAAA,YACL,MAAK;AAAA;uBAEL,MAAiB;AAAA,kBAAdX,EAAA,WAAW,GAAA,CAAA;AAAA;;;UAEhBI,EAaYQ,GAAA;AAAA,YAZV,OAAM;AAAA,YACN,WAAQ;AAAA,YACP,cAAYd,EAAA;AAAA,YACZ,OAAOA,EAAA;AAAA,YACR,YAAW;AAAA,YACX,MAAK;AAAA,YACL,QAAA;AAAA,YACC,SAAKI,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAW,EAAA,CAAAV,MAAON,EAAA,MAAK,cAAeM,CAAM,GAAA,CAAA,MAAA,CAAA;AAAA;YAE5B,QACT,MAAmC;AAAA,cAAnCC,EAAmCU,GAAA,EAAb,MAAK,MAAK,CAAA;AAAA;;;;;;IAM1Cf,EAEM,OAFNN,GAEM;AAAA,MADJgB,EAAqBZ,EAAA,QAAA,OAAA;AAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../item-layout/item-layout.cjs"),u=require("../avatar/avatar.cjs"),e=require("vue"),f=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m={compatConfig:{MODE:3},name:"DtRecipeContactInfo",components:{DtAvatar:u.default,DtItemLayout:d.default},props:{role:{type:String,default:""},showAvatar:{type:Boolean,default:!0},avatarSrc:{type:String,default:""},avatarSeed:{type:String,default:null},avatarFullName:{type:String,default:""},avatarSize:{type:String,default:"lg"},avatarLabelledBy:{type:String,default:""},avatarColor:{type:String,default:null},presence:{type:String,default:null},avatarList:{type:Array,default:null}},emits:["avatar-click"],methods:{avatarClick(){this.$emit("avatar-click")}}},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("../item-layout/item-layout.cjs"),u=require("../avatar/avatar.cjs"),e=require("vue"),f=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m={compatConfig:{MODE:3},name:"DtRecipeContactInfo",components:{DtAvatar:u.default,DtItemLayout:d.default},props:{role:{type:String,default:""},showAvatar:{type:Boolean,default:!0},avatarSrc:{type:String,default:""},avatarSeed:{type:String,default:null},avatarFullName:{type:String,default:""},avatarSize:{type:String,default:"lg"},avatarLabelledBy:{type:String,default:""},avatarColor:{type:String,default:null},presence:{type:String,default:null},avatarList:{type:Array,default:null}},emits:["avatar-click"],methods:{avatarClick(){this.$emit("avatar-click")}}},v=["aria-labelledby"],_={key:0,class:"d-recipe-contact-info__avatars"},y={class:"d-recipe-contact-info__header","data-qa":"contact-info-header"},k={class:"d-recipe-contact-info__subtitle","data-qa":"contact-info-subtitle"},S={class:"d-recipe-contact-info__bottom","data-qa":"contact-info-bottom"},h={"data-qa":"contact-info-right"};function g(t,n,a,p,C,l){const r=e.resolveComponent("dt-avatar"),i=e.resolveComponent("dt-item-layout");return e.openBlock(),e.createBlock(i,{role:a.role,"data-qa":"contact-info",class:"d-recipe-contact-info","content-class":"d-recipe-contact-info__content","end-class":"d-recipe-contact-info__right",unstyled:""},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",y,[e.renderSlot(t.$slots,"header")])]),subtitle:e.withCtx(()=>[e.createElementVNode("div",k,[e.renderSlot(t.$slots,"subtitle")])]),_:2},[a.showAvatar?{name:"start",fn:e.withCtx(()=>[e.createElementVNode("button",{class:"d-recipe-contact-info__left","data-qa":"contact-info-left","aria-labelledby":a.avatarLabelledBy,onClick:n[0]||(n[0]=(...o)=>l.avatarClick&&l.avatarClick(...o))},[a.avatarList?(e.openBlock(),e.createElementBlock("span",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.avatarList,(o,c)=>(e.openBlock(),e.createBlock(r,{key:c,size:a.avatarSize,seed:o.seed,"full-name":o.fullName,"image-src":o.src,"image-alt":"","overlay-text":o.text,"avatar-class":[{"d-recipe-contact-info__avatar-stacked":c>0,"d-recipe-contact-info__avatar-halo":!!o.halo}]},e.createSlots({icon:e.withCtx(({iconSize:s})=>[e.renderSlot(t.$slots,"avatarIcon",{iconSize:s})]),_:2},[o.icon?{name:"overlayIcon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.icon)))]),key:"0"}:void 0]),1032,["size","seed","full-name","image-src","overlay-text","avatar-class"]))),128))])):(e.openBlock(),e.createBlock(r,{key:1,size:a.avatarSize,"full-name":a.avatarFullName,"image-src":a.avatarSrc,"image-alt":"",seed:a.avatarSeed,color:a.avatarColor,presence:a.presence},{icon:e.withCtx(({iconSize:o})=>[e.renderSlot(t.$slots,"avatarIcon",{iconSize:o})]),_:3},8,["size","full-name","image-src","seed","color","presence"]))],8,v)]),key:"0"}:void 0,t.$slots.blockEnd||t.$slots.bottom?{name:"blockEnd",fn:e.withCtx(()=>[e.createElementVNode("div",S,[t.$slots.blockEnd?e.renderSlot(t.$slots,"blockEnd",{key:0}):e.renderSlot(t.$slots,"bottom",{key:1})])]),key:"1"}:void 0,t.$slots.end||t.$slots.right?{name:"end",fn:e.withCtx(()=>[e.createElementVNode("div",h,[t.$slots.end?e.renderSlot(t.$slots,"end",{key:0}):e.renderSlot(t.$slots,"right",{key:1})])]),key:"2"}:void 0]),1032,["role"])}const b=f._(m,[["render",g]]);exports.default=b;
|
|
2
2
|
//# sourceMappingURL=contact-info.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-info.cjs","sources":["../../../recipes/item_layout/contact_info/contact_info.vue"],"sourcesContent":["<template>\n <dt-item-layout\n :role=\"role\"\n data-qa=\"contact-info\"\n class=\"d-recipe-contact-info\"\n content-class=\"d-recipe-contact-info__content\"\n
|
|
1
|
+
{"version":3,"file":"contact-info.cjs","sources":["../../../recipes/item_layout/contact_info/contact_info.vue"],"sourcesContent":["<template>\n <dt-item-layout\n :role=\"role\"\n data-qa=\"contact-info\"\n class=\"d-recipe-contact-info\"\n content-class=\"d-recipe-contact-info__content\"\n end-class=\"d-recipe-contact-info__right\"\n unstyled\n >\n <template\n v-if=\"showAvatar\"\n #start\n >\n <button\n class=\"d-recipe-contact-info__left\"\n data-qa=\"contact-info-left\"\n :aria-labelledby=\"avatarLabelledBy\"\n @click=\"avatarClick\"\n >\n <span\n v-if=\"avatarList\"\n class=\"d-recipe-contact-info__avatars\"\n >\n <dt-avatar\n v-for=\"(avatar, index) in avatarList\"\n :key=\"index\"\n :size=\"avatarSize\"\n :seed=\"avatar.seed\"\n :full-name=\"avatar.fullName\"\n :image-src=\"avatar.src\"\n image-alt=\"\"\n :overlay-text=\"avatar.text\"\n :avatar-class=\"[\n {\n 'd-recipe-contact-info__avatar-stacked': index > 0,\n 'd-recipe-contact-info__avatar-halo': !!avatar.halo,\n },\n ]\"\n >\n <template #icon=\"{ iconSize }\">\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n <template\n v-if=\"avatar.icon\"\n #overlayIcon\n >\n <component :is=\"avatar.icon\" />\n </template>\n </dt-avatar>\n </span>\n <dt-avatar\n v-else\n :size=\"avatarSize\"\n :full-name=\"avatarFullName\"\n :image-src=\"avatarSrc\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n :color=\"avatarColor\"\n :presence=\"presence\"\n >\n <template #icon=\"{ iconSize }\">\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </button>\n </template>\n <template #default>\n <div\n class=\"d-recipe-contact-info__header\"\n data-qa=\"contact-info-header\"\n >\n <!-- @slot Slot for header information -->\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #subtitle>\n <div\n class=\"d-recipe-contact-info__subtitle\"\n data-qa=\"contact-info-subtitle\"\n >\n <!-- @slot Slot for subtitle information -->\n <slot name=\"subtitle\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.blockEnd || $slots.bottom\"\n #blockEnd\n >\n <div\n class=\"d-recipe-contact-info__bottom\"\n data-qa=\"contact-info-bottom\"\n >\n <!-- @slot Slot for block-end content -->\n <slot\n v-if=\"$slots.blockEnd\"\n name=\"blockEnd\"\n />\n <!-- @slot @deprecated Use blockEnd -->\n <slot\n v-else\n name=\"bottom\"\n />\n </div>\n </template>\n\n <template\n v-if=\"$slots.end || $slots.right\"\n #end\n >\n <div data-qa=\"contact-info-right\">\n <!-- @slot Slot for the end content -->\n <slot\n v-if=\"$slots.end\"\n name=\"end\"\n />\n <!-- @slot @deprecated Use end -->\n <slot\n v-else\n name=\"right\"\n />\n </div>\n </template>\n </dt-item-layout>\n</template>\n\n<script>\nimport DtItemLayout from '@/components/item_layout/item_layout.vue';\nimport DtAvatar from '@/components/avatar/avatar.vue';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactInfo',\n\n components: {\n DtAvatar,\n DtItemLayout,\n },\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 * String to use for the item's role.\n */\n role: {\n type: String,\n default: '',\n },\n\n /**\n * Display avatar if `showAvatar` property is true.\n */\n showAvatar: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Optional avatar image url.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar's full name, used to extract initials\n * to display in avatar if `avatarSrc` and `avatarIcon` are empty.\n */\n avatarFullName: {\n type: String,\n default: '',\n },\n\n /**\n * The size of the avatar\n * @values xs, sm, md, lg, xl\n */\n avatarSize: {\n type: String,\n default: 'lg',\n },\n\n /**\n * The aria-labelledby of the button containing avatars\n */\n avatarLabelledBy: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar color to display if `avatarSrc` is empty.\n */\n avatarColor: {\n type: String,\n default: null,\n },\n\n /**\n * Determines whether to show the presence indicator for\n * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',\n * or 'active'. By default, it's null and nothing is shown.\n * @values null, busy, away, offline, active\n */\n presence: {\n type: String,\n default: null,\n },\n\n /**\n * Showing multiple avatars in contact info.\n * The props of array items are: <br>\n * `src` - avatar image url (optional) <br>\n * `fullName` - full name, used to extract initials to display in avatar<br>\n * if `avatarSrc` and `avatarIcon` are empty<br>\n * `seed` - determines uniqueness of avatar background <br>\n * `text` - text that overlays the avatar (optional) <br>\n * `icon` - icon that overlays the avatar (optional) <br>\n * `halo` - halo highlight around the avatar. boolean true/false\n */\n avatarList: {\n type: Array,\n default: null,\n },\n },\n\n emits: ['avatar-click'],\n\n methods: {\n avatarClick () {\n this.$emit('avatar-click');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtAvatar","DtItemLayout","_hoisted_6","_createBlock","_component_dt_item_layout","$props","_createElementVNode","_hoisted_3","_renderSlot","_ctx","_hoisted_4","$options","args","_openBlock","_createElementBlock","_hoisted_2","_Fragment","_renderList","avatar","index","_component_dt_avatar","_withCtx","iconSize","_resolveDynamicComponent","_hoisted_5"],"mappings":"2QA2IKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,sBAEN,WAAY,CACV,SAAAC,EAAAA,qBACAC,EAAAA,SASF,MAAO,CAIL,KAAM,CACJ,KAAM,OACN,QAAS,IAMX,WAAY,CACV,KAAM,QACN,QAAS,IAMX,UAAW,CACT,KAAM,OACN,QAAS,IAMX,WAAY,CACV,KAAM,OACN,QAAS,MAOX,eAAgB,CACd,KAAM,OACN,QAAS,IAOX,WAAY,CACV,KAAM,OACN,QAAS,MAMX,iBAAkB,CAChB,KAAM,OACN,QAAS,IAMX,YAAa,CACX,KAAM,OACN,QAAS,MASX,SAAU,CACR,KAAM,OACN,QAAS,MAc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AED,IAA+B,gBAA/Bf,EAAAA,YAA+BoB,EAAAA,wBAAfL,EAAO,IAAI,CAAA,6HAIjCf,EAAAA,YAiBYiB,EAAA,OAfT,KAAMf,EAAA,WACN,YAAWA,EAAA,eACX,YAAWA,EAAA,UACZ,YAAU,GACT,KAAMA,EAAA,WACN,MAAOA,EAAA,YACP,SAAUA,EAAA,WAEA,KAAIgB,EAAAA,QAEb,CAGE,CALe,SAAAC,KAAQ,CAEzBd,EAAAA,WAGEC,EAAA,OAAA,aAAA,CADC,SAAWa,CAAQ,CAAA,gGA2BtBb,EAAA,OAAO,UAAYA,EAAA,OAAO,aAC/B,wBAED,IAcM,CAdNH,EAAAA,mBAcM,MAdNkB,EAcM,CARIf,EAAA,OAAO,SADfD,EAAAA,WAGEC,EAAA,OAAA,WAAA,CAAA,IAAA,CAAA,CAAA,EAEFD,EAAAA,WAGEC,EAAA,OAAA,SAAA,CAAA,IAAA,CAAA,CAAA,sBAKEA,EAAA,OAAO,KAAOA,EAAA,OAAO,YAC1B,mBAED,IAWM,CAXNH,EAAAA,mBAWM,MAXNJ,EAWM,CARIO,EAAA,OAAO,IADfD,EAAAA,WAGEC,EAAA,OAAA,MAAA,CAAA,IAAA,CAAA,CAAA,EAEFD,EAAAA,WAGEC,EAAA,OAAA,QAAA,CAAA,IAAA,CAAA,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { resolveComponent as m, openBlock as
|
|
4
|
-
import { _ as
|
|
1
|
+
import k from "../item-layout/item-layout.js";
|
|
2
|
+
import g from "../avatar/avatar.js";
|
|
3
|
+
import { resolveComponent as m, openBlock as l, createBlock as i, createSlots as u, withCtx as o, createElementVNode as c, renderSlot as n, createElementBlock as v, Fragment as b, renderList as h, resolveDynamicComponent as p } from "vue";
|
|
4
|
+
import { _ as S } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const C = {
|
|
6
6
|
compatConfig: { MODE: 3 },
|
|
7
7
|
name: "DtRecipeContactInfo",
|
|
8
8
|
components: {
|
|
9
|
-
DtAvatar:
|
|
10
|
-
DtItemLayout:
|
|
9
|
+
DtAvatar: g,
|
|
10
|
+
DtItemLayout: k
|
|
11
11
|
},
|
|
12
12
|
/* inheritAttrs: false is generally an option we want to set on library
|
|
13
13
|
components. This allows any attributes passed in that are not recognized
|
|
@@ -105,91 +105,91 @@ const C = {
|
|
|
105
105
|
this.$emit("avatar-click");
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
}, z = ["aria-labelledby"],
|
|
108
|
+
}, z = ["aria-labelledby"], E = {
|
|
109
109
|
key: 0,
|
|
110
110
|
class: "d-recipe-contact-info__avatars"
|
|
111
|
-
},
|
|
111
|
+
}, L = {
|
|
112
112
|
class: "d-recipe-contact-info__header",
|
|
113
113
|
"data-qa": "contact-info-header"
|
|
114
|
-
},
|
|
114
|
+
}, q = {
|
|
115
115
|
class: "d-recipe-contact-info__subtitle",
|
|
116
116
|
"data-qa": "contact-info-subtitle"
|
|
117
|
-
},
|
|
117
|
+
}, B = {
|
|
118
118
|
class: "d-recipe-contact-info__bottom",
|
|
119
119
|
"data-qa": "contact-info-bottom"
|
|
120
|
-
},
|
|
121
|
-
function
|
|
122
|
-
const d = m("dt-avatar"),
|
|
123
|
-
return
|
|
124
|
-
role:
|
|
120
|
+
}, D = { "data-qa": "contact-info-right" };
|
|
121
|
+
function I(t, r, e, $, A, s) {
|
|
122
|
+
const d = m("dt-avatar"), y = m("dt-item-layout");
|
|
123
|
+
return l(), i(y, {
|
|
124
|
+
role: e.role,
|
|
125
125
|
"data-qa": "contact-info",
|
|
126
126
|
class: "d-recipe-contact-info",
|
|
127
127
|
"content-class": "d-recipe-contact-info__content",
|
|
128
|
-
"
|
|
128
|
+
"end-class": "d-recipe-contact-info__right",
|
|
129
129
|
unstyled: ""
|
|
130
130
|
}, u({
|
|
131
131
|
default: o(() => [
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
c("div", L, [
|
|
133
|
+
n(t.$slots, "header")
|
|
134
134
|
])
|
|
135
135
|
]),
|
|
136
136
|
subtitle: o(() => [
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
c("div", q, [
|
|
138
|
+
n(t.$slots, "subtitle")
|
|
139
139
|
])
|
|
140
140
|
]),
|
|
141
141
|
_: 2
|
|
142
142
|
}, [
|
|
143
|
-
|
|
144
|
-
name: "
|
|
143
|
+
e.showAvatar ? {
|
|
144
|
+
name: "start",
|
|
145
145
|
fn: o(() => [
|
|
146
|
-
|
|
146
|
+
c("button", {
|
|
147
147
|
class: "d-recipe-contact-info__left",
|
|
148
148
|
"data-qa": "contact-info-left",
|
|
149
|
-
"aria-labelledby":
|
|
150
|
-
onClick: r[0] || (r[0] = (...
|
|
149
|
+
"aria-labelledby": e.avatarLabelledBy,
|
|
150
|
+
onClick: r[0] || (r[0] = (...a) => s.avatarClick && s.avatarClick(...a))
|
|
151
151
|
}, [
|
|
152
|
-
|
|
153
|
-
(
|
|
152
|
+
e.avatarList ? (l(), v("span", E, [
|
|
153
|
+
(l(!0), v(b, null, h(e.avatarList, (a, f) => (l(), i(d, {
|
|
154
154
|
key: f,
|
|
155
|
-
size:
|
|
156
|
-
seed:
|
|
157
|
-
"full-name":
|
|
158
|
-
"image-src":
|
|
155
|
+
size: e.avatarSize,
|
|
156
|
+
seed: a.seed,
|
|
157
|
+
"full-name": a.fullName,
|
|
158
|
+
"image-src": a.src,
|
|
159
159
|
"image-alt": "",
|
|
160
|
-
"overlay-text":
|
|
160
|
+
"overlay-text": a.text,
|
|
161
161
|
"avatar-class": [
|
|
162
162
|
{
|
|
163
163
|
"d-recipe-contact-info__avatar-stacked": f > 0,
|
|
164
|
-
"d-recipe-contact-info__avatar-halo": !!
|
|
164
|
+
"d-recipe-contact-info__avatar-halo": !!a.halo
|
|
165
165
|
}
|
|
166
166
|
]
|
|
167
167
|
}, u({
|
|
168
|
-
icon: o(({ iconSize:
|
|
169
|
-
|
|
168
|
+
icon: o(({ iconSize: _ }) => [
|
|
169
|
+
n(t.$slots, "avatarIcon", { iconSize: _ })
|
|
170
170
|
]),
|
|
171
171
|
_: 2
|
|
172
172
|
}, [
|
|
173
|
-
|
|
173
|
+
a.icon ? {
|
|
174
174
|
name: "overlayIcon",
|
|
175
175
|
fn: o(() => [
|
|
176
|
-
(
|
|
176
|
+
(l(), i(p(a.icon)))
|
|
177
177
|
]),
|
|
178
178
|
key: "0"
|
|
179
179
|
} : void 0
|
|
180
180
|
]), 1032, ["size", "seed", "full-name", "image-src", "overlay-text", "avatar-class"]))), 128))
|
|
181
|
-
])) : (
|
|
181
|
+
])) : (l(), i(d, {
|
|
182
182
|
key: 1,
|
|
183
|
-
size:
|
|
184
|
-
"full-name":
|
|
185
|
-
"image-src":
|
|
183
|
+
size: e.avatarSize,
|
|
184
|
+
"full-name": e.avatarFullName,
|
|
185
|
+
"image-src": e.avatarSrc,
|
|
186
186
|
"image-alt": "",
|
|
187
|
-
seed:
|
|
188
|
-
color:
|
|
189
|
-
presence:
|
|
187
|
+
seed: e.avatarSeed,
|
|
188
|
+
color: e.avatarColor,
|
|
189
|
+
presence: e.presence
|
|
190
190
|
}, {
|
|
191
|
-
icon: o(({ iconSize:
|
|
192
|
-
|
|
191
|
+
icon: o(({ iconSize: a }) => [
|
|
192
|
+
n(t.$slots, "avatarIcon", { iconSize: a })
|
|
193
193
|
]),
|
|
194
194
|
_: 3
|
|
195
195
|
}, 8, ["size", "full-name", "image-src", "seed", "color", "presence"]))
|
|
@@ -197,28 +197,28 @@ function A(a, r, t, N, w, s) {
|
|
|
197
197
|
]),
|
|
198
198
|
key: "0"
|
|
199
199
|
} : void 0,
|
|
200
|
-
|
|
201
|
-
name: "
|
|
200
|
+
t.$slots.blockEnd || t.$slots.bottom ? {
|
|
201
|
+
name: "blockEnd",
|
|
202
202
|
fn: o(() => [
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
c("div", B, [
|
|
204
|
+
t.$slots.blockEnd ? n(t.$slots, "blockEnd", { key: 0 }) : n(t.$slots, "bottom", { key: 1 })
|
|
205
205
|
])
|
|
206
206
|
]),
|
|
207
207
|
key: "1"
|
|
208
208
|
} : void 0,
|
|
209
|
-
|
|
210
|
-
name: "
|
|
209
|
+
t.$slots.end || t.$slots.right ? {
|
|
210
|
+
name: "end",
|
|
211
211
|
fn: o(() => [
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
c("div", D, [
|
|
213
|
+
t.$slots.end ? n(t.$slots, "end", { key: 0 }) : n(t.$slots, "right", { key: 1 })
|
|
214
214
|
])
|
|
215
215
|
]),
|
|
216
216
|
key: "2"
|
|
217
217
|
} : void 0
|
|
218
218
|
]), 1032, ["role"]);
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const O = /* @__PURE__ */ S(C, [["render", I]]);
|
|
221
221
|
export {
|
|
222
|
-
|
|
222
|
+
O as default
|
|
223
223
|
};
|
|
224
224
|
//# sourceMappingURL=contact-info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-info.js","sources":["../../../recipes/item_layout/contact_info/contact_info.vue"],"sourcesContent":["<template>\n <dt-item-layout\n :role=\"role\"\n data-qa=\"contact-info\"\n class=\"d-recipe-contact-info\"\n content-class=\"d-recipe-contact-info__content\"\n
|
|
1
|
+
{"version":3,"file":"contact-info.js","sources":["../../../recipes/item_layout/contact_info/contact_info.vue"],"sourcesContent":["<template>\n <dt-item-layout\n :role=\"role\"\n data-qa=\"contact-info\"\n class=\"d-recipe-contact-info\"\n content-class=\"d-recipe-contact-info__content\"\n end-class=\"d-recipe-contact-info__right\"\n unstyled\n >\n <template\n v-if=\"showAvatar\"\n #start\n >\n <button\n class=\"d-recipe-contact-info__left\"\n data-qa=\"contact-info-left\"\n :aria-labelledby=\"avatarLabelledBy\"\n @click=\"avatarClick\"\n >\n <span\n v-if=\"avatarList\"\n class=\"d-recipe-contact-info__avatars\"\n >\n <dt-avatar\n v-for=\"(avatar, index) in avatarList\"\n :key=\"index\"\n :size=\"avatarSize\"\n :seed=\"avatar.seed\"\n :full-name=\"avatar.fullName\"\n :image-src=\"avatar.src\"\n image-alt=\"\"\n :overlay-text=\"avatar.text\"\n :avatar-class=\"[\n {\n 'd-recipe-contact-info__avatar-stacked': index > 0,\n 'd-recipe-contact-info__avatar-halo': !!avatar.halo,\n },\n ]\"\n >\n <template #icon=\"{ iconSize }\">\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n <template\n v-if=\"avatar.icon\"\n #overlayIcon\n >\n <component :is=\"avatar.icon\" />\n </template>\n </dt-avatar>\n </span>\n <dt-avatar\n v-else\n :size=\"avatarSize\"\n :full-name=\"avatarFullName\"\n :image-src=\"avatarSrc\"\n image-alt=\"\"\n :seed=\"avatarSeed\"\n :color=\"avatarColor\"\n :presence=\"presence\"\n >\n <template #icon=\"{ iconSize }\">\n <!-- @slot Slot for avatar icon in a list -->\n <slot\n name=\"avatarIcon\"\n :icon-size=\"iconSize\"\n />\n </template>\n </dt-avatar>\n </button>\n </template>\n <template #default>\n <div\n class=\"d-recipe-contact-info__header\"\n data-qa=\"contact-info-header\"\n >\n <!-- @slot Slot for header information -->\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #subtitle>\n <div\n class=\"d-recipe-contact-info__subtitle\"\n data-qa=\"contact-info-subtitle\"\n >\n <!-- @slot Slot for subtitle information -->\n <slot name=\"subtitle\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.blockEnd || $slots.bottom\"\n #blockEnd\n >\n <div\n class=\"d-recipe-contact-info__bottom\"\n data-qa=\"contact-info-bottom\"\n >\n <!-- @slot Slot for block-end content -->\n <slot\n v-if=\"$slots.blockEnd\"\n name=\"blockEnd\"\n />\n <!-- @slot @deprecated Use blockEnd -->\n <slot\n v-else\n name=\"bottom\"\n />\n </div>\n </template>\n\n <template\n v-if=\"$slots.end || $slots.right\"\n #end\n >\n <div data-qa=\"contact-info-right\">\n <!-- @slot Slot for the end content -->\n <slot\n v-if=\"$slots.end\"\n name=\"end\"\n />\n <!-- @slot @deprecated Use end -->\n <slot\n v-else\n name=\"right\"\n />\n </div>\n </template>\n </dt-item-layout>\n</template>\n\n<script>\nimport DtItemLayout from '@/components/item_layout/item_layout.vue';\nimport DtAvatar from '@/components/avatar/avatar.vue';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactInfo',\n\n components: {\n DtAvatar,\n DtItemLayout,\n },\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 * String to use for the item's role.\n */\n role: {\n type: String,\n default: '',\n },\n\n /**\n * Display avatar if `showAvatar` property is true.\n */\n showAvatar: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Optional avatar image url.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar's full name, used to extract initials\n * to display in avatar if `avatarSrc` and `avatarIcon` are empty.\n */\n avatarFullName: {\n type: String,\n default: '',\n },\n\n /**\n * The size of the avatar\n * @values xs, sm, md, lg, xl\n */\n avatarSize: {\n type: String,\n default: 'lg',\n },\n\n /**\n * The aria-labelledby of the button containing avatars\n */\n avatarLabelledBy: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar color to display if `avatarSrc` is empty.\n */\n avatarColor: {\n type: String,\n default: null,\n },\n\n /**\n * Determines whether to show the presence indicator for\n * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',\n * or 'active'. By default, it's null and nothing is shown.\n * @values null, busy, away, offline, active\n */\n presence: {\n type: String,\n default: null,\n },\n\n /**\n * Showing multiple avatars in contact info.\n * The props of array items are: <br>\n * `src` - avatar image url (optional) <br>\n * `fullName` - full name, used to extract initials to display in avatar<br>\n * if `avatarSrc` and `avatarIcon` are empty<br>\n * `seed` - determines uniqueness of avatar background <br>\n * `text` - text that overlays the avatar (optional) <br>\n * `icon` - icon that overlays the avatar (optional) <br>\n * `halo` - halo highlight around the avatar. boolean true/false\n */\n avatarList: {\n type: Array,\n default: null,\n },\n },\n\n emits: ['avatar-click'],\n\n methods: {\n avatarClick () {\n this.$emit('avatar-click');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtAvatar","DtItemLayout","_hoisted_6","_createBlock","_component_dt_item_layout","$props","_createElementVNode","_hoisted_3","_renderSlot","_ctx","_hoisted_4","$options","args","_openBlock","_createElementBlock","_hoisted_2","_Fragment","_renderList","avatar","index","_component_dt_avatar","_withCtx","iconSize","_resolveDynamicComponent","_hoisted_5"],"mappings":";;;;AA2IA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,cAAAC;AAAA;;;;;;EASF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAOX,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAOX,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMX,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;;IASX,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;;;;;;;IAcX,YAAY;AAAA,MACV,MAAM;AAAA,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MAAIG,EAEb,CAGE,EALe,UAAAC,QAAQ;AAAA,gBAEzBd,EAGEC,EAAA,QAAA,cAAA,EADC,UAAWa,EAAQ,CAAA;AAAA;;;cAIhBJ,EAAO;sBACZ;AAAA,sBAED,MAA+B;AAAA,wBAA/Bf,EAA+BoB,EAAfL,EAAO,IAAI,CAAA;AAAA;;;;sBAIjCf,EAiBYiB,GAAA;AAAA;YAfT,MAAMf,EAAA;AAAA,YACN,aAAWA,EAAA;AAAA,YACX,aAAWA,EAAA;AAAA,YACZ,aAAU;AAAA,YACT,MAAMA,EAAA;AAAA,YACN,OAAOA,EAAA;AAAA,YACP,UAAUA,EAAA;AAAA;YAEA,MAAIgB,EAEb,CAGE,EALe,UAAAC,QAAQ;AAAA,cAEzBd,EAGEC,EAAA,QAAA,cAAA,EADC,UAAWa,EAAQ,CAAA;AAAA;;;;;;;IA2BtBb,EAAA,OAAO,YAAYA,EAAA,OAAO;YAC/B;AAAA,YAED,MAcM;AAAA,QAdNH,EAcM,OAdNkB,GAcM;AAAA,UARIf,EAAA,OAAO,WADfD,EAGEC,EAAA,QAAA,YAAA,EAAA,KAAA,EAAA,CAAA,IAEFD,EAGEC,EAAA,QAAA,UAAA,EAAA,KAAA,EAAA,CAAA;AAAA;;;;IAKEA,EAAA,OAAO,OAAOA,EAAA,OAAO;YAC1B;AAAA,YAED,MAWM;AAAA,QAXNH,EAWM,OAXNJ,GAWM;AAAA,UARIO,EAAA,OAAO,MADfD,EAGEC,EAAA,QAAA,OAAA,EAAA,KAAA,EAAA,CAAA,IAEFD,EAGEC,EAAA,QAAA,SAAA,EAAA,KAAA,EAAA,CAAA;AAAA;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../common/utils/index.cjs"),d=require("@dialpad/dialtone-icons/vue3"),e=require("vue"),p=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m=require("../emoji-text-wrapper/emoji-text-wrapper.cjs"),_=require("../general-row/general-row.cjs"),f=require("../avatar/avatar.cjs"),y={compatConfig:{MODE:3},name:"DtRecipeContactRow",components:{DtAvatar:f.default,DtRecipeGeneralRow:_.default,DtEmojiTextWrapper:m.default,DtIconUser:d.DtIconUser},inheritAttrs:!1,props:{avatarSrc:{type:String,default:""},avatarPresence:{type:String,default:null},avatarSeed:{type:String,default:null},avatarColor:{type:String,default:null},presenceText:{type:String,default:""},name:{type:String,required:!0},userStatus:{type:String,default:""},muted:{type:Boolean,default:!1},unreadCount:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},noInitials:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1},hasCallButton:{type:Boolean,default:!0}},emits:["call"],computed:{presenceFontColorClass(){return{active:"d-recipe-contact-row--active",busy:"d-recipe-contact-row--busy",away:"d-recipe-contact-row--away"}[this.avatarPresence]},contactRowListeners(){return s.extractVueListeners(this.$attrs)},contactDescription(){return s.safeConcatStrings([this.name,this.presenceText,this.userStatus])}}},w={class:"d-recipe-leftbar-row__status"};function g(a,n,t,v,S,r){const c=e.resolveComponent("dt-icon-user"),l=e.resolveComponent("dt-avatar"),o=e.resolveComponent("dt-emoji-text-wrapper"),i=e.resolveComponent("dt-recipe-general-row");return e.openBlock(),e.createBlock(i,e.mergeProps({"unread-count":t.unreadCount,description:r.contactDescription,"has-unreads":t.hasUnreads,selected:t.selected,"has-call-button":t.hasCallButton,muted:t.muted,"is-typing":t.isTyping},a.$attrs,{"data-qa":"contact-row"},e.toHandlers(r.contactRowListeners),{onCall:n[0]||(n[0]=u=>a.$emit("call",u))}),{
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("../../common/utils/index.cjs"),d=require("@dialpad/dialtone-icons/vue3"),e=require("vue"),p=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m=require("../emoji-text-wrapper/emoji-text-wrapper.cjs"),_=require("../general-row/general-row.cjs"),f=require("../avatar/avatar.cjs"),y={compatConfig:{MODE:3},name:"DtRecipeContactRow",components:{DtAvatar:f.default,DtRecipeGeneralRow:_.default,DtEmojiTextWrapper:m.default,DtIconUser:d.DtIconUser},inheritAttrs:!1,props:{avatarSrc:{type:String,default:""},avatarPresence:{type:String,default:null},avatarSeed:{type:String,default:null},avatarColor:{type:String,default:null},presenceText:{type:String,default:""},name:{type:String,required:!0},userStatus:{type:String,default:""},muted:{type:Boolean,default:!1},unreadCount:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},noInitials:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1},hasCallButton:{type:Boolean,default:!0}},emits:["call"],computed:{presenceFontColorClass(){return{active:"d-recipe-contact-row--active",busy:"d-recipe-contact-row--busy",away:"d-recipe-contact-row--away"}[this.avatarPresence]},contactRowListeners(){return s.extractVueListeners(this.$attrs)},contactDescription(){return s.safeConcatStrings([this.name,this.presenceText,this.userStatus])}}},w={class:"d-recipe-leftbar-row__status"};function g(a,n,t,v,S,r){const c=e.resolveComponent("dt-icon-user"),l=e.resolveComponent("dt-avatar"),o=e.resolveComponent("dt-emoji-text-wrapper"),i=e.resolveComponent("dt-recipe-general-row");return e.openBlock(),e.createBlock(i,e.mergeProps({"unread-count":t.unreadCount,description:r.contactDescription,"has-unreads":t.hasUnreads,selected:t.selected,"has-call-button":t.hasCallButton,muted:t.muted,"is-typing":t.isTyping},a.$attrs,{"data-qa":"contact-row"},e.toHandlers(r.contactRowListeners),{onCall:n[0]||(n[0]=u=>a.$emit("call",u))}),{start:e.withCtx(()=>[e.createVNode(l,{"full-name":t.name,"image-src":t.avatarSrc,color:t.avatarColor,"image-alt":"",size:"sm",seed:t.avatarSeed,presence:t.avatarPresence},e.createSlots({_:2},[t.noInitials?{name:"icon",fn:e.withCtx(()=>[e.createVNode(c,{size:"200"})]),key:"0"}:void 0]),1032,["full-name","image-src","color","seed","presence"])]),label:e.withCtx(()=>[e.createVNode(o,{class:"d-recipe-leftbar-row__description","data-qa":"dt-recipe-leftbar-row-description",size:"200"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.name),1)]),_:1}),e.createElementVNode("div",w,[t.presenceText?(e.openBlock(),e.createElementBlock("span",{key:0,"data-qa":"dt-recipe-leftbar-row-presence-text",class:e.normalizeClass(["d-recipe-leftbar-row__meta-context",r.presenceFontColorClass])},e.toDisplayString(t.presenceText),3)):e.createCommentVNode("",!0),t.userStatus?(e.openBlock(),e.createBlock(o,{key:1,size:"100","element-type":"span","data-qa":"dt-recipe-leftbar-row-user-status",class:"d-recipe-leftbar-row__meta-custom"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.userStatus),1)]),_:1})):e.createCommentVNode("",!0)])]),_:1},16,["unread-count","description","has-unreads","selected","has-call-button","muted","is-typing"])}const C=p._(y,[["render",g]]);exports.default=C;
|
|
2
2
|
//# sourceMappingURL=contact-row.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-row.cjs","sources":["../../../recipes/leftbar/contact_row/contact_row.vue"],"sourcesContent":["<template>\n <dt-recipe-general-row\n :unread-count=\"unreadCount\"\n :description=\"contactDescription\"\n :has-unreads=\"hasUnreads\"\n :selected=\"selected\"\n :has-call-button=\"hasCallButton\"\n :muted=\"muted\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n data-qa=\"contact-row\"\n v-on=\"contactRowListeners\"\n @call=\"$emit('call', $event)\"\n >\n <template #
|
|
1
|
+
{"version":3,"file":"contact-row.cjs","sources":["../../../recipes/leftbar/contact_row/contact_row.vue"],"sourcesContent":["<template>\n <dt-recipe-general-row\n :unread-count=\"unreadCount\"\n :description=\"contactDescription\"\n :has-unreads=\"hasUnreads\"\n :selected=\"selected\"\n :has-call-button=\"hasCallButton\"\n :muted=\"muted\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n data-qa=\"contact-row\"\n v-on=\"contactRowListeners\"\n @call=\"$emit('call', $event)\"\n >\n <template #start>\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :color=\"avatarColor\"\n image-alt=\"\"\n size=\"sm\"\n :seed=\"avatarSeed\"\n :presence=\"avatarPresence\"\n >\n <template\n v-if=\"noInitials\"\n #icon\n >\n <dt-icon-user\n size=\"200\"\n />\n </template>\n </dt-avatar>\n </template>\n <template #label>\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ name }}\n </dt-emoji-text-wrapper>\n <div class=\"d-recipe-leftbar-row__status\">\n <span\n v-if=\"presenceText\"\n data-qa=\"dt-recipe-leftbar-row-presence-text\"\n :class=\"['d-recipe-leftbar-row__meta-context', presenceFontColorClass]\"\n >\n {{ presenceText }}\n </span>\n <dt-emoji-text-wrapper\n v-if=\"userStatus\"\n size=\"100\"\n element-type=\"span\"\n data-qa=\"dt-recipe-leftbar-row-user-status\"\n class=\"d-recipe-leftbar-row__meta-custom\"\n >\n {{ userStatus }}\n </dt-emoji-text-wrapper>\n </div>\n </template>\n </dt-recipe-general-row>\n</template>\n\n<script>\nimport { DtRecipeGeneralRow } from '@/recipes/leftbar/general_row';\nimport { DtEmojiTextWrapper } from '@/components/emoji_text_wrapper';\nimport { DtAvatar } from '@/components/avatar';\nimport { extractVueListeners, safeConcatStrings } from '@/common/utils';\nimport { DtIconUser } from '@dialpad/dialtone-icons/vue3';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactRow',\n\n components: {\n DtAvatar,\n DtRecipeGeneralRow,\n DtEmojiTextWrapper,\n DtIconUser,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Optional avatar image url.\n * If not provided it will use the initial of the name.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Determines whether to show the presence indicator for\n * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',\n * or 'active'. By default, it's null and nothing is shown.\n * defer validation to avatar component.\n * @values null, busy, away, offline, active\n */\n avatarPresence: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar color to display if `avatarSrc` is empty.\n */\n avatarColor: {\n type: String,\n default: null,\n },\n\n /**\n * Text describing the user's presence, such as \"in a meeting\"\n */\n presenceText: {\n type: String,\n default: '',\n },\n\n /**\n * Name of the contact\n */\n name: {\n type: String,\n required: true,\n },\n\n /**\n * Status as set by the user.\n */\n userStatus: {\n type: String,\n default: '',\n },\n\n /**\n * Gives a faded style to be used when muted\n */\n muted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Styles the row with an increased font weight to convey it has unreads. This must be true to see\n * the unread count badge.\n */\n hasUnreads: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Initials will never be shown. Instead it will show a \"User\" icon.\n */\n noInitials: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows an \"is typing\" animation over the avatar when true.\n */\n isTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the contact row should display a call button when hovered.\n */\n hasCallButton: {\n type: Boolean,\n default: true,\n },\n },\n\n emits: [\n /**\n * Call button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'call',\n ],\n\n computed: {\n presenceFontColorClass () {\n const presenceFontColors = {\n active: 'd-recipe-contact-row--active',\n busy: 'd-recipe-contact-row--busy',\n away: 'd-recipe-contact-row--away',\n };\n\n return presenceFontColors[this.avatarPresence];\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n contactDescription () {\n return safeConcatStrings([this.name, this.presenceText, this.userStatus]);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtAvatar","DtRecipeGeneralRow","DtEmojiTextWrapper","DtIconUser","extractVueListeners","safeConcatStrings","_hoisted_1","_openBlock","_createBlock","_component_dt_recipe_general_row","_mergeProps","$props","$options","_ctx","_toHandlers","_cache","$event","_createVNode","_component_dt_avatar","_component_dt_icon_user","_component_dt_emoji_text_wrapper","_createElementVNode","_createElementBlock"],"mappings":"yZAuEKA,EAAU,CACb,aAAc,CAAE,KAAM,GACtB,KAAM,qBAEN,WAAY,CACV,SAAAC,EAAAA,QACA,mBAAAC,EAAAA,QACA,mBAAAC,EAAAA,mBACAC,EAAAA,YAGF,aAAc,GAEd,MAAO,CAKL,UAAW,CACT,KAAM,OACN,QAAS,IAUX,eAAgB,CACd,KAAM,OACN,QAAS,MAMX,WAAY,CACV,KAAM,OACN,QAAS,MAMX,YAAa,CACX,KAAM,OACN,QAAS,MAMX,aAAc,CACZ,KAAM,OACN,QAAS,IAMX,KAAM,CACJ,KAAM,OACN,SAAU,IAMZ,WAAY,CACV,KAAM,OACN,QAAS,IAMX,MAAO,CACL,KAAM,QACN,QAAS,IAMX,YAAa,CACX,KAAM,OACN,QAAS,MAOX,WAAY,CACV,KAAM,QACN,QAAS,IAMX,SAAU,CACR,KAAM,QACN,QAAS,IAMX,WAAY,CACV,KAAM,QACN,QAAS,IAMX,SAAU,CACR,KAAM,QACN,QAAS,IAMX,cAAe,CACb,KAAM,QACN,QAAS,KAIb,MAAO,CAOL,QAGF,SAAU,CACR,wBAA0B,CAOxB,MAN2B,CACzB,OAAQ,+BACR,KAAM,6BACN,KAAM,8BAGkB,KAAK,cAAc,CAC/C,EAEA,qBAAuB,CACrB,OAAOC,EAAAA,oBAAoB,KAAK,MAAM,CACxC,EAEA,oBAAsB,CACpB,OAAOC,EAAAA,kBAAkB,CAAC,KAAK,KAAM,KAAK,aAAc,KAAK,UAAU,CAAC,CAC1E,EAEJ,EA/LWC,EAAA,CAAA,MAAM,8BAA8B,mMAzC7C,OAAAC,YAAA,EAAAC,cA4DwBC,EA5DxBC,EAAAA,WA4DwB,CA3DrB,eAAcC,EAAA,YACd,YAAaC,EAAA,mBACb,cAAaD,EAAA,WACb,SAAUA,EAAA,SACV,kBAAiBA,EAAA,cACjB,MAAOA,EAAA,MACP,YAAWA,EAAA,QACJ,EAAAE,EAAA,QACR,UAAQ,aAAa,EACrBC,EAAAA,WAA0BF,EAApB,mBAAmB,EAAA,CACxB,OAAIG,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,GAAEH,EAAA,MAAK,OAASG,CAAM,MAEhB,gBACT,IAiBY,CAjBZC,EAAAA,YAiBYC,EAAA,CAhBT,YAAWP,EAAA,KACX,YAAWA,EAAA,UACX,MAAOA,EAAA,YACR,YAAU,GACV,KAAK,KACJ,KAAMA,EAAA,WACN,SAAUA,EAAA,qCAGHA,EAAA,iBACL,oBAED,IAEE,CAFFM,EAAAA,YAEEE,EAAA,CADA,KAAK,KAAK,CAAA,kFAKP,gBACT,IAMwB,CANxBF,EAAAA,YAMwBG,EAAA,CALtB,MAAM,oCACN,UAAQ,oCACR,KAAK,0BAEL,IAAU,qCAAPT,EAAA,IAAI,EAAA,CAAA,UAETU,EAAAA,mBAiBM,MAjBNf,EAiBM,CAfIK,EAAA,4BADRW,EAAAA,mBAMO,OAAA,OAJL,UAAQ,sCACP,6DAA8CV,EAAA,sBAAsB,CAAA,qBAElED,EAAA,YAAY,EAAA,CAAA,+BAGTA,EAAA,0BADRH,EAAAA,YAQwBY,EAAA,OANtB,KAAK,MACL,eAAa,OACb,UAAQ,oCACR,MAAM,wDAEN,IAAgB,qCAAbT,EAAA,UAAU,EAAA,CAAA"}
|
|
@@ -159,7 +159,7 @@ function V(r, l, e, E, F, n) {
|
|
|
159
159
|
}, r.$attrs, { "data-qa": "contact-row" }, v(n.contactRowListeners), {
|
|
160
160
|
onCall: l[0] || (l[0] = (y) => r.$emit("call", y))
|
|
161
161
|
}), {
|
|
162
|
-
|
|
162
|
+
start: t(() => [
|
|
163
163
|
s(p, {
|
|
164
164
|
"full-name": e.name,
|
|
165
165
|
"image-src": e.avatarSrc,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact-row.js","sources":["../../../recipes/leftbar/contact_row/contact_row.vue"],"sourcesContent":["<template>\n <dt-recipe-general-row\n :unread-count=\"unreadCount\"\n :description=\"contactDescription\"\n :has-unreads=\"hasUnreads\"\n :selected=\"selected\"\n :has-call-button=\"hasCallButton\"\n :muted=\"muted\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n data-qa=\"contact-row\"\n v-on=\"contactRowListeners\"\n @call=\"$emit('call', $event)\"\n >\n <template #
|
|
1
|
+
{"version":3,"file":"contact-row.js","sources":["../../../recipes/leftbar/contact_row/contact_row.vue"],"sourcesContent":["<template>\n <dt-recipe-general-row\n :unread-count=\"unreadCount\"\n :description=\"contactDescription\"\n :has-unreads=\"hasUnreads\"\n :selected=\"selected\"\n :has-call-button=\"hasCallButton\"\n :muted=\"muted\"\n :is-typing=\"isTyping\"\n v-bind=\"$attrs\"\n data-qa=\"contact-row\"\n v-on=\"contactRowListeners\"\n @call=\"$emit('call', $event)\"\n >\n <template #start>\n <dt-avatar\n :full-name=\"name\"\n :image-src=\"avatarSrc\"\n :color=\"avatarColor\"\n image-alt=\"\"\n size=\"sm\"\n :seed=\"avatarSeed\"\n :presence=\"avatarPresence\"\n >\n <template\n v-if=\"noInitials\"\n #icon\n >\n <dt-icon-user\n size=\"200\"\n />\n </template>\n </dt-avatar>\n </template>\n <template #label>\n <dt-emoji-text-wrapper\n class=\"d-recipe-leftbar-row__description\"\n data-qa=\"dt-recipe-leftbar-row-description\"\n size=\"200\"\n >\n {{ name }}\n </dt-emoji-text-wrapper>\n <div class=\"d-recipe-leftbar-row__status\">\n <span\n v-if=\"presenceText\"\n data-qa=\"dt-recipe-leftbar-row-presence-text\"\n :class=\"['d-recipe-leftbar-row__meta-context', presenceFontColorClass]\"\n >\n {{ presenceText }}\n </span>\n <dt-emoji-text-wrapper\n v-if=\"userStatus\"\n size=\"100\"\n element-type=\"span\"\n data-qa=\"dt-recipe-leftbar-row-user-status\"\n class=\"d-recipe-leftbar-row__meta-custom\"\n >\n {{ userStatus }}\n </dt-emoji-text-wrapper>\n </div>\n </template>\n </dt-recipe-general-row>\n</template>\n\n<script>\nimport { DtRecipeGeneralRow } from '@/recipes/leftbar/general_row';\nimport { DtEmojiTextWrapper } from '@/components/emoji_text_wrapper';\nimport { DtAvatar } from '@/components/avatar';\nimport { extractVueListeners, safeConcatStrings } from '@/common/utils';\nimport { DtIconUser } from '@dialpad/dialtone-icons/vue3';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeContactRow',\n\n components: {\n DtAvatar,\n DtRecipeGeneralRow,\n DtEmojiTextWrapper,\n DtIconUser,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Optional avatar image url.\n * If not provided it will use the initial of the name.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Determines whether to show the presence indicator for\n * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',\n * or 'active'. By default, it's null and nothing is shown.\n * defer validation to avatar component.\n * @values null, busy, away, offline, active\n */\n avatarPresence: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar color to display if `avatarSrc` is empty.\n */\n avatarColor: {\n type: String,\n default: null,\n },\n\n /**\n * Text describing the user's presence, such as \"in a meeting\"\n */\n presenceText: {\n type: String,\n default: '',\n },\n\n /**\n * Name of the contact\n */\n name: {\n type: String,\n required: true,\n },\n\n /**\n * Status as set by the user.\n */\n userStatus: {\n type: String,\n default: '',\n },\n\n /**\n * Gives a faded style to be used when muted\n */\n muted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: String,\n default: null,\n },\n\n /**\n * Styles the row with an increased font weight to convey it has unreads. This must be true to see\n * the unread count badge.\n */\n hasUnreads: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Initials will never be shown. Instead it will show a \"User\" icon.\n */\n noInitials: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows an \"is typing\" animation over the avatar when true.\n */\n isTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the contact row should display a call button when hovered.\n */\n hasCallButton: {\n type: Boolean,\n default: true,\n },\n },\n\n emits: [\n /**\n * Call button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'call',\n ],\n\n computed: {\n presenceFontColorClass () {\n const presenceFontColors = {\n active: 'd-recipe-contact-row--active',\n busy: 'd-recipe-contact-row--busy',\n away: 'd-recipe-contact-row--away',\n };\n\n return presenceFontColors[this.avatarPresence];\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n contactDescription () {\n return safeConcatStrings([this.name, this.presenceText, this.userStatus]);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtAvatar","DtRecipeGeneralRow","DtEmojiTextWrapper","DtIconUser","extractVueListeners","safeConcatStrings","_hoisted_1","_openBlock","_createBlock","_component_dt_recipe_general_row","_mergeProps","$props","$options","_ctx","_toHandlers","_cache","$event","_createVNode","_component_dt_avatar","_component_dt_icon_user","_component_dt_emoji_text_wrapper","_createElementVNode","_createElementBlock"],"mappings":";;;;;;;AAuEA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM;EACtB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAAA,IACA,YAAAC;AAAA;EAGF,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;;;;;;;;IAUX,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,SAAS;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AAA,IACb,UAAUA,EAAA;AAAA,IACV,mBAAiBA,EAAA;AAAA,IACjB,OAAOA,EAAA;AAAA,IACP,aAAWA,EAAA;AAAA,EACJ,GAAAE,EAAA,UACR,WAAQ,cAAa,GACrBC,EAA0BF,EAApB,mBAAmB,GAAA;AAAA,IACxB,QAAIG,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAEH,EAAA,MAAK,QAASG,CAAM;AAAA;IAEhB,SACT,MAiBY;AAAA,MAjBZC,EAiBYC,GAAA;AAAA,QAhBT,aAAWP,EAAA;AAAA,QACX,aAAWA,EAAA;AAAA,QACX,OAAOA,EAAA;AAAA,QACR,aAAU;AAAA,QACV,MAAK;AAAA,QACJ,MAAMA,EAAA;AAAA,QACN,UAAUA,EAAA;AAAA;QAGHA,EAAA;gBACL;AAAA,gBAED,MAEE;AAAA,YAFFM,EAEEE,GAAA,EADA,MAAK,MAAK,CAAA;AAAA;;;;;IAKP,SACT,MAMwB;AAAA,MANxBF,EAMwBG,GAAA;AAAA,QALtB,OAAM;AAAA,QACN,WAAQ;AAAA,QACR,MAAK;AAAA;mBAEL,MAAU;AAAA,cAAPT,EAAA,IAAI,GAAA,CAAA;AAAA;;;MAETU,EAiBM,OAjBNf,GAiBM;AAAA,QAfIK,EAAA,qBADRW,EAMO,QAAA;AAAA;UAJL,WAAQ;AAAA,UACP,gDAA8CV,EAAA,sBAAsB,CAAA;AAAA,aAElED,EAAA,YAAY,GAAA,CAAA;QAGTA,EAAA,mBADRH,EAQwBY,GAAA;AAAA;UANtB,MAAK;AAAA,UACL,gBAAa;AAAA,UACb,WAAQ;AAAA,UACR,OAAM;AAAA;qBAEN,MAAgB;AAAA,gBAAbT,EAAA,UAAU,GAAA,CAAA;AAAA;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),T=require("@dialpad/dialtone-icons/vue3"),c=require("date-fns"),w=require("./utils.cjs"),Y=require("./datepicker-constants.cjs"),v=require("../../common/utils/index.cjs"),P=require("../../localization/index.cjs"),M=require("../stack/stack.cjs"),x=require("../tooltip/tooltip.cjs"),$=require("../button/button.cjs");function V(n,o){const s=e.ref(c.getMonth(n.selectedDate)),a=e.ref(c.getYear(n.selectedDate)),r=e.ref(null),l=e.ref(0),m=e.ref([]),D=new P.DialtoneLocalization,p=e.computed(()=>w.getCalendarDays(s.value,a.value,r.value,n.minDate,n.maxDate,n.weekStartsOn)),k=e.computed(()=>{if(!n.minDate)return!1;const t=c.subMonths(new Date(a.value,s.value,1),1);return c.endOfMonth(t)<c.startOfDay(n.minDate)}),E=e.computed(()=>{if(!n.maxDate)return!1;const t=c.addMonths(new Date(a.value,s.value,1),1);return c.startOfMonth(t)>c.startOfDay(n.maxDate)}),b=e.computed(()=>{if(!n.minDate)return!1;const t=new Date(a.value-1,s.value,1);return c.endOfMonth(t)<c.startOfDay(n.minDate)}),y=e.computed(()=>{if(!n.maxDate)return!1;const t=new Date(a.value+1,s.value,1);return c.startOfMonth(t)>c.startOfDay(n.maxDate)});e.watch(s,()=>{N(),o("calendar-days",p.value)},{immediate:!0}),e.watch(a,()=>{N(),o("calendar-days",p.value)},{immediate:!0}),e.watch(()=>n.minDate,()=>{o("calendar-days",p.value)}),e.watch(()=>n.maxDate,()=>{o("calendar-days",p.value)});function u(t){return w.formatMonth(t,Y.INTL_MONTH_FORMAT,D.currentLocale)}function i(t){m.value.includes(t)||m.value.push(t)}function _(){v.returnFirstEl(m.value[0].$el).focus()}function f(t){switch(t.key){case"ArrowLeft":t.preventDefault(),l.value===0?(l.value=3,v.returnFirstEl(m.value[l.value].$el).focus()):(l.value--,v.returnFirstEl(m.value[l.value].$el).focus());break;case"ArrowRight":t.preventDefault(),l.value===3?(l.value=0,v.returnFirstEl(m.value[l.value].$el).focus()):(l.value++,v.returnFirstEl(m.value[l.value].$el).focus());break;case"ArrowDown":t.preventDefault(),o("focus-first-day");break;case"Tab":t.preventDefault(),o("focus-first-day");break;case"Escape":o("close-datepicker");break}}function N(){const t=c.getYear(n.selectedDate),g=c.getMonth(n.selectedDate);t!==a.value||g!==s.value?r.value=null:r.value=c.getDate(n.selectedDate)}function h(t){if(t===-1&&k.value||t===1&&E.value)return;(s.value===0&&t===-1||s.value===11&&t===1)&&(a.value+=t);const g=c.set(n.selectedDate,{month:s.value,year:a.value}),F=t===1?c.addMonths(g,1):c.subMonths(g,1);s.value=c.getMonth(F)}function A(t){t===-1&&b.value||t===1&&y.value||(a.value=a.value+t)}function C(){h(1)}function O(){h(-1)}function I(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR")} ${a.value-1}`}function L(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH")} ${u(s.value-1)}`}function R(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_NEXT_YEAR")} ${a.value+1}`}function d(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_NEXT_MONTH")} ${u(s.value+1)}`}return{selectMonth:s,selectYear:a,formattedMonth:u,setDayRef:i,focusMonthYearPicker:_,handleKeyDown:f,changeMonth:h,changeYear:A,goToNextMonth:C,goToPrevMonth:O,isPrevMonthDisabled:k,isNextMonthDisabled:E,isPrevYearDisabled:b,isNextYearDisabled:y,previousYearAriaLabel:I,previousMonthAriaLabel:L,nextYearAriaLabel:R,nextMonthAriaLabel:d}}const B={id:"calendar-heading",class:"d-datepicker__month-year-title"},K={__name:"month-year-picker",props:{selectedDate:{type:Date,required:!0},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},weekStartsOn:{type:Number,default:0,validator:n=>Number.isInteger(n)&&n>=0&&n<=6}},emits:["calendar-days","focus-first-day","focus-last-day","close-datepicker"],setup(n,{expose:o,emit:s}){const a=n,r=s,l=new P.DialtoneLocalization,{selectMonth:m,selectYear:D,formattedMonth:p,setDayRef:k,focusMonthYearPicker:E,handleKeyDown:b,changeMonth:y,changeYear:u,goToNextMonth:i,goToPrevMonth:_,isPrevMonthDisabled:f,isNextMonthDisabled:N,isPrevYearDisabled:h,isNextYearDisabled:A,previousYearAriaLabel:C,previousMonthAriaLabel:O,nextMonthAriaLabel:I,nextYearAriaLabel:L}=V(a,r);return e.onMounted(()=>{E()}),o({focusMonthYearPicker:E,goToNextMonth:i,goToPrevMonth:_}),(R,d)=>(e.openBlock(),e.createBlock(e.unref(M.default),{class:"d-datepicker__month-year",direction:"row",gap:"300"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.default),{as:"nav",class:"d-datepicker__nav",direction:"row",gap:"200"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.default),{"fallback-placements":["top-start","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"prevYearButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(C)(),circle:!0,disabled:e.unref(h),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[0]||(d[0]=t=>e.unref(u)(-1)),onKeydown:d[1]||(d[1]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronsLeft),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"]),e.createVNode(e.unref(x.default),{"fallback-placements":["top-start","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"prevMonthButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(O)(),circle:!0,disabled:e.unref(f),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[2]||(d[2]=t=>e.unref(y)(-1)),onKeydown:d[3]||(d[3]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronLeft),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"])]),_:1}),e.createElementVNode("div",B,e.toDisplayString(e.unref(p)(e.unref(m)))+" "+e.toDisplayString(e.unref(D)),1),e.createVNode(e.unref(M.default),{as:"nav",class:"d-datepicker__nav",direction:"row",gap:"200"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.default),{"fallback-placements":["top-end","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_NEXT_MONTH"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"nextMonthButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(I)(),circle:!0,disabled:e.unref(N),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[4]||(d[4]=t=>e.unref(y)(1)),onKeydown:d[5]||(d[5]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronRight),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"]),e.createVNode(e.unref(x.default),{"fallback-placements":["top-end","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_NEXT_YEAR"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"nextYearButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(L)(),circle:!0,disabled:e.unref(A),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[6]||(d[6]=t=>e.unref(u)(1)),onKeydown:d[7]||(d[7]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronsRight),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"])]),_:1})]),_:1}))}};function S(n,o){const s=e.ref(null),a=e.ref(0),r=e.ref([]),l=new P.DialtoneLocalization,m=e.computed(()=>w.getWeekDayNames(n.locale,n.weekStartsOn));e.watch(()=>n.calendarDays,()=>{a.value=0,r.value=[],s.value=null});function D(u){return l.$t("DIALTONE_DATEPICKER_SELECT_DAY")+` ${w.formatDate(u.value,Y.INTL_MONTH_FORMAT,l.currentLocale)}`}function p(u,i){!r.value.some(_=>_.el===u)&&!i.disabled&&r.value.push({el:u,day:i})}function k(u){switch(u.key){case"ArrowUp":u.preventDefault(),a.value-=7;try{v.returnFirstEl(r.value[a.value].el.$el).focus()}catch{const i=w.calculatePrevFocusDate(r.value[a.value+7].day.value);o("go-to-prev-month"),e.nextTick(()=>{v.returnFirstEl(r.value[i-1].el.$el).focus(),a.value+=i-1})}break;case"ArrowDown":u.preventDefault(),a.value+=7;try{v.returnFirstEl(r.value[a.value].el.$el).focus()}catch{const i=w.calculateNextFocusDate(r.value[a.value-7].day.value);o("go-to-next-month"),e.nextTick(()=>{v.returnFirstEl(r.value[i-1].el.$el).focus(),a.value+=i-1})}break;case"ArrowLeft":u.preventDefault(),a.value>0?(a.value-=1,v.returnFirstEl(r.value[a.value].el.$el).focus()):(o("go-to-prev-month"),b());break;case"ArrowRight":u.preventDefault(),a.value<r.value.length-1?(a.value+=1,v.returnFirstEl(r.value[a.value].el.$el).focus()):(o("go-to-next-month"),E());break;case"Tab":u.preventDefault(),o("focus-month-year-picker");break;case"Escape":o("close-datepicker");break}}function E(){a.value=0,e.nextTick(()=>{v.returnFirstEl(r.value[a.value].el.$el).focus()})}function b(){e.nextTick(()=>{a.value=r.value.length-1,v.returnFirstEl(r.value[a.value].el.$el).focus()})}function y(u){u.disabled||(s.value=u.text,o("select-date",u.value))}return{selectedDay:s,weekDays:m,dayAriaLabel:D,setDayRef:p,handleKeyDown:k,focusFirstDay:E,selectDay:y}}const z={class:"d-datepicker__calendar","aria-labelledby":"calendar-heading"},q=["title","aria-label"],H={__name:"calendar",props:{calendarDays:{type:Array,required:!0},weekStartsOn:{type:Number,default:0,validator:n=>Number.isInteger(n)&&n>=0&&n<=6}},emits:["select-date","focus-month-year-picker","close-datepicker","go-to-next-month","go-to-prev-month"],setup(n,{expose:o,emit:s}){const a=n,r=s,{selectedDay:l,weekDays:m,dayAriaLabel:D,setDayRef:p,handleKeyDown:k,focusFirstDay:E,selectDay:b}=S(a,r);return o({focusFirstDay:E}),(y,u)=>(e.openBlock(),e.createElementBlock("table",z,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),i=>(e.openBlock(),e.createElementBlock("th",{key:i,scope:"col",class:"d-datepicker__cell d-datepicker__cell--header"},[e.createElementVNode("span",{class:"d-datepicker__weekday",title:i,"aria-label":i},e.toDisplayString(i),9,q)]))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.calendarDays,(i,_)=>(e.openBlock(),e.createElementBlock("tr",{key:_},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.days,(f,N)=>(e.openBlock(),e.createElementBlock("td",{key:_+N,class:"d-datepicker__cell",role:"listbox"},[e.createVNode(e.unref($.default),{ref_for:!0,ref:h=>{h&&e.unref(p)(h,f)},class:e.normalizeClass(["d-datepicker__day",{"d-datepicker__day--disabled":f.disabled,"d-datepicker__day--selected":e.unref(l)?f.text===e.unref(l)&&!f.disabled:f.selected}]),circle:!0,size:"sm",importance:"clear",disabled:f.disabled,type:"button","aria-selected":e.unref(l)?f.text===e.unref(l)&&!f.disabled:f.selected,"aria-label":e.unref(D)(f),role:"option",onClick:h=>e.unref(b)(f),onKeydown:u[0]||(u[0]=h=>e.unref(k)(h))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.text),1)]),_:2},1032,["disabled","class","aria-selected","aria-label","onClick"])]))),128))]))),128))])]))}},G={class:"d-datepicker__hd"},U={class:"d-datepicker__bd"},X={__name:"datepicker",props:{selectedDate:{type:Date,default:()=>new Date},minDate:{type:Date,default:null},maxDate:{type:Date,default:null,validator:(n,o)=>n&&o.minDate&&n<o.minDate?(console.warn("[DtDatepicker]: maxDate must be after or equal to minDate."),!1):!0},weekStartsOn:{type:Number,default:0,validator:n=>Number.isInteger(n)&&n>=0&&n<=6}},emits:["selected-date","close-datepicker"],setup(n){const o=e.ref([]);function s(a){o.value=a}return e.onMounted(()=>{const a=e.getCurrentInstance();v.warnIfUnmounted(v.returnFirstEl(a.proxy.$el),"datepicker")}),(a,r)=>(e.openBlock(),e.createBlock(e.unref(M.default),{class:"d-datepicker",gap:"400"},{default:e.withCtx(()=>[e.createElementVNode("div",G,[e.createVNode(K,{ref:"monthYearPicker","selected-date":n.selectedDate,"min-date":n.minDate,"max-date":n.maxDate,"week-starts-on":n.weekStartsOn,onCalendarDays:s,onFocusFirstDay:r[0]||(r[0]=l=>a.$refs.calendar.focusFirstDay()),onFocusLastDay:r[1]||(r[1]=l=>a.$refs.calendar.focusLastDay()),onCloseDatepicker:r[2]||(r[2]=l=>a.$emit("close-datepicker"))},null,8,["selected-date","min-date","max-date","week-starts-on"])]),e.createElementVNode("div",U,[e.createVNode(H,{ref:"calendar","calendar-days":o.value,"week-starts-on":n.weekStartsOn,onSelectDate:r[3]||(r[3]=l=>a.$emit("selected-date",l)),onFocusMonthYearPicker:r[4]||(r[4]=l=>a.$refs.monthYearPicker.focusMonthYearPicker()),onCloseDatepicker:r[5]||(r[5]=l=>a.$emit("close-datepicker")),onGoToNextMonth:r[6]||(r[6]=l=>a.$refs.monthYearPicker.goToNextMonth()),onGoToPrevMonth:r[7]||(r[7]=l=>a.$refs.monthYearPicker.goToPrevMonth())},null,8,["calendar-days","week-starts-on"])])]),_:1}))}};exports.default=X;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),T=require("@dialpad/dialtone-icons/vue3"),c=require("date-fns"),w=require("./utils.cjs"),Y=require("./datepicker-constants.cjs"),v=require("../../common/utils/index.cjs"),P=require("../../localization/index.cjs"),M=require("../stack/stack.cjs"),x=require("../tooltip/tooltip.cjs"),$=require("../button/button.cjs");function V(n,o){const s=e.ref(c.getMonth(n.selectedDate)),a=e.ref(c.getYear(n.selectedDate)),r=e.ref(null),l=e.ref(0),m=e.ref([]),D=new P.DialtoneLocalization,h=e.computed(()=>w.getCalendarDays(s.value,a.value,r.value,n.minDate,n.maxDate,n.weekStartsOn)),k=e.computed(()=>{if(!n.minDate)return!1;const t=c.subMonths(new Date(a.value,s.value,1),1);return c.endOfMonth(t)<c.startOfDay(n.minDate)}),E=e.computed(()=>{if(!n.maxDate)return!1;const t=c.addMonths(new Date(a.value,s.value,1),1);return c.startOfMonth(t)>c.startOfDay(n.maxDate)}),b=e.computed(()=>{if(!n.minDate)return!1;const t=new Date(a.value-1,s.value,1);return c.endOfMonth(t)<c.startOfDay(n.minDate)}),y=e.computed(()=>{if(!n.maxDate)return!1;const t=new Date(a.value+1,s.value,1);return c.startOfMonth(t)>c.startOfDay(n.maxDate)});e.watch(s,()=>{N(),o("calendar-days",h.value)},{immediate:!0}),e.watch(a,()=>{N(),o("calendar-days",h.value)},{immediate:!0}),e.watch(()=>n.minDate,()=>{o("calendar-days",h.value)}),e.watch(()=>n.maxDate,()=>{o("calendar-days",h.value)});function u(t){return w.formatMonth(t,Y.INTL_MONTH_FORMAT,D.currentLocale)}function i(t){m.value.includes(t)||m.value.push(t)}function _(){v.returnFirstEl(m.value[0].$el).focus()}function f(t){switch(t.key){case"ArrowLeft":t.preventDefault(),l.value===0?(l.value=3,v.returnFirstEl(m.value[l.value].$el).focus()):(l.value--,v.returnFirstEl(m.value[l.value].$el).focus());break;case"ArrowRight":t.preventDefault(),l.value===3?(l.value=0,v.returnFirstEl(m.value[l.value].$el).focus()):(l.value++,v.returnFirstEl(m.value[l.value].$el).focus());break;case"ArrowDown":t.preventDefault(),o("focus-first-day");break;case"Tab":t.preventDefault(),o("focus-first-day");break;case"Escape":o("close-datepicker");break}}function N(){const t=c.getYear(n.selectedDate),g=c.getMonth(n.selectedDate);t!==a.value||g!==s.value?r.value=null:r.value=c.getDate(n.selectedDate)}function p(t){if(t===-1&&k.value||t===1&&E.value)return;(s.value===0&&t===-1||s.value===11&&t===1)&&(a.value+=t);const g=c.set(n.selectedDate,{month:s.value,year:a.value}),F=t===1?c.addMonths(g,1):c.subMonths(g,1);s.value=c.getMonth(F)}function A(t){t===-1&&b.value||t===1&&y.value||(a.value=a.value+t)}function C(){p(1)}function O(){p(-1)}function L(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR")} ${a.value-1}`}function I(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH")} ${u(s.value-1)}`}function R(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_NEXT_YEAR")} ${a.value+1}`}function d(){return`${D.$t("DIALTONE_DATEPICKER_CHANGE_TO")} ${D.$t("DIALTONE_DATEPICKER_NEXT_MONTH")} ${u(s.value+1)}`}return{selectMonth:s,selectYear:a,formattedMonth:u,setDayRef:i,focusMonthYearPicker:_,handleKeyDown:f,changeMonth:p,changeYear:A,goToNextMonth:C,goToPrevMonth:O,isPrevMonthDisabled:k,isNextMonthDisabled:E,isPrevYearDisabled:b,isNextYearDisabled:y,previousYearAriaLabel:L,previousMonthAriaLabel:I,nextYearAriaLabel:R,nextMonthAriaLabel:d}}const B={id:"calendar-heading",class:"d-datepicker__month-year-title"},K={__name:"month-year-picker",props:{selectedDate:{type:Date,required:!0},minDate:{type:Date,default:null},maxDate:{type:Date,default:null},weekStartsOn:{type:Number,default:0,validator:n=>Number.isInteger(n)&&n>=0&&n<=6}},emits:["calendar-days","focus-first-day","focus-last-day","close-datepicker"],setup(n,{expose:o,emit:s}){const a=n,r=s,l=new P.DialtoneLocalization,{selectMonth:m,selectYear:D,formattedMonth:h,setDayRef:k,focusMonthYearPicker:E,handleKeyDown:b,changeMonth:y,changeYear:u,goToNextMonth:i,goToPrevMonth:_,isPrevMonthDisabled:f,isNextMonthDisabled:N,isPrevYearDisabled:p,isNextYearDisabled:A,previousYearAriaLabel:C,previousMonthAriaLabel:O,nextMonthAriaLabel:L,nextYearAriaLabel:I}=V(a,r);return e.onMounted(()=>{E()}),o({focusMonthYearPicker:E,goToNextMonth:i,goToPrevMonth:_}),(R,d)=>(e.openBlock(),e.createBlock(e.unref(M.default),{class:"d-datepicker__month-year",direction:"row",gap:"300"},{default:e.withCtx(()=>[e.createVNode(e.unref(M.default),{as:"nav",class:"d-datepicker__nav",direction:"row",gap:"200"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.default),{"fallback-placements":["top-start","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_PREVIOUS_YEAR"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"prevYearButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(C)(),circle:!0,disabled:e.unref(p),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[0]||(d[0]=t=>e.unref(u)(-1)),onKeydown:d[1]||(d[1]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronsLeft),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"]),e.createVNode(e.unref(x.default),{"fallback-placements":["top-start","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_PREVIOUS_MONTH"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"prevMonthButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(O)(),circle:!0,disabled:e.unref(f),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[2]||(d[2]=t=>e.unref(y)(-1)),onKeydown:d[3]||(d[3]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronLeft),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"])]),_:1}),e.createElementVNode("div",B,e.toDisplayString(e.unref(h)(e.unref(m)))+" "+e.toDisplayString(e.unref(D)),1),e.createVNode(e.unref(M.default),{as:"nav",class:"d-datepicker__nav",direction:"row",gap:"200"},{default:e.withCtx(()=>[e.createVNode(e.unref(x.default),{"fallback-placements":["top-end","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_NEXT_MONTH"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"nextMonthButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(L)(),circle:!0,disabled:e.unref(N),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[4]||(d[4]=t=>e.unref(y)(1)),onKeydown:d[5]||(d[5]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronRight),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"]),e.createVNode(e.unref(x.default),{"fallback-placements":["top-end","auto"],message:e.unref(l).$t("DIALTONE_DATEPICKER_NEXT_YEAR"),placement:"top"},{anchor:e.withCtx(()=>[e.createVNode(e.unref($.default),{id:"nextYearButton",ref:t=>{t&&e.unref(k)(t)},"aria-label":e.unref(I)(),circle:!0,disabled:e.unref(A),class:"d-datepicker__nav-btn",importance:"clear",kind:"muted",size:"xs",type:"button",onClick:d[6]||(d[6]=t=>e.unref(u)(1)),onKeydown:d[7]||(d[7]=t=>e.unref(b)(t))},{default:e.withCtx(()=>[e.createVNode(e.unref(T.DtIconChevronsRight),{size:"200"})]),_:1},8,["aria-label","disabled"])]),_:1},8,["message"])]),_:1})]),_:1}))}};function S(n,o){const s=e.ref(null),a=e.ref(0),r=e.ref([]),l=new P.DialtoneLocalization,m=e.computed(()=>w.getWeekDayNames(l.currentLocale,n.weekStartsOn));e.watch(()=>n.calendarDays,()=>{a.value=0,r.value=[],s.value=null});function D(u){return l.$t("DIALTONE_DATEPICKER_SELECT_DAY")+` ${w.formatDate(u.value,Y.INTL_MONTH_FORMAT,l.currentLocale)}`}function h(u,i){!r.value.some(_=>_.el===u)&&!i.disabled&&r.value.push({el:u,day:i})}function k(u){switch(u.key){case"ArrowUp":u.preventDefault(),a.value-=7;try{v.returnFirstEl(r.value[a.value].el.$el).focus()}catch{const i=w.calculatePrevFocusDate(r.value[a.value+7].day.value);o("go-to-prev-month"),e.nextTick(()=>{v.returnFirstEl(r.value[i-1].el.$el).focus(),a.value+=i-1})}break;case"ArrowDown":u.preventDefault(),a.value+=7;try{v.returnFirstEl(r.value[a.value].el.$el).focus()}catch{const i=w.calculateNextFocusDate(r.value[a.value-7].day.value);o("go-to-next-month"),e.nextTick(()=>{v.returnFirstEl(r.value[i-1].el.$el).focus(),a.value+=i-1})}break;case"ArrowLeft":u.preventDefault(),a.value>0?(a.value-=1,v.returnFirstEl(r.value[a.value].el.$el).focus()):(o("go-to-prev-month"),b());break;case"ArrowRight":u.preventDefault(),a.value<r.value.length-1?(a.value+=1,v.returnFirstEl(r.value[a.value].el.$el).focus()):(o("go-to-next-month"),E());break;case"Tab":u.preventDefault(),o("focus-month-year-picker");break;case"Escape":o("close-datepicker");break}}function E(){a.value=0,e.nextTick(()=>{v.returnFirstEl(r.value[a.value].el.$el).focus()})}function b(){e.nextTick(()=>{a.value=r.value.length-1,v.returnFirstEl(r.value[a.value].el.$el).focus()})}function y(u){u.disabled||(s.value=u.text,o("select-date",u.value))}return{selectedDay:s,weekDays:m,dayAriaLabel:D,setDayRef:h,handleKeyDown:k,focusFirstDay:E,selectDay:y}}const z={class:"d-datepicker__calendar","aria-labelledby":"calendar-heading"},q=["title","aria-label"],H={__name:"calendar",props:{calendarDays:{type:Array,required:!0},weekStartsOn:{type:Number,default:0,validator:n=>Number.isInteger(n)&&n>=0&&n<=6}},emits:["select-date","focus-month-year-picker","close-datepicker","go-to-next-month","go-to-prev-month"],setup(n,{expose:o,emit:s}){const a=n,r=s,{selectedDay:l,weekDays:m,dayAriaLabel:D,setDayRef:h,handleKeyDown:k,focusFirstDay:E,selectDay:b}=S(a,r);return o({focusFirstDay:E}),(y,u)=>(e.openBlock(),e.createElementBlock("table",z,[e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),i=>(e.openBlock(),e.createElementBlock("th",{key:i,scope:"col",class:"d-datepicker__cell d-datepicker__cell--header"},[e.createElementVNode("span",{class:"d-datepicker__weekday",title:i,"aria-label":i},e.toDisplayString(i),9,q)]))),128))])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.calendarDays,(i,_)=>(e.openBlock(),e.createElementBlock("tr",{key:_},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.days,(f,N)=>(e.openBlock(),e.createElementBlock("td",{key:_+N,class:"d-datepicker__cell",role:"listbox"},[e.createVNode(e.unref($.default),{ref_for:!0,ref:p=>{p&&e.unref(h)(p,f)},class:e.normalizeClass(["d-datepicker__day",{"d-datepicker__day--disabled":f.disabled,"d-datepicker__day--selected":e.unref(l)?f.text===e.unref(l)&&!f.disabled:f.selected}]),circle:!0,size:"sm",importance:"clear",disabled:f.disabled,type:"button","aria-selected":e.unref(l)?f.text===e.unref(l)&&!f.disabled:f.selected,"aria-label":e.unref(D)(f),role:"option",onClick:p=>e.unref(b)(f),onKeydown:u[0]||(u[0]=p=>e.unref(k)(p))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.text),1)]),_:2},1032,["disabled","class","aria-selected","aria-label","onClick"])]))),128))]))),128))])]))}},G={class:"d-datepicker__hd"},U={class:"d-datepicker__bd"},X={__name:"datepicker",props:{selectedDate:{type:Date,default:()=>new Date},minDate:{type:Date,default:null},maxDate:{type:Date,default:null,validator:(n,o)=>n&&o.minDate&&n<o.minDate?(console.warn("[DtDatepicker]: maxDate must be after or equal to minDate."),!1):!0},weekStartsOn:{type:Number,default:0,validator:n=>Number.isInteger(n)&&n>=0&&n<=6}},emits:["selected-date","close-datepicker"],setup(n){const o=e.ref([]);function s(a){o.value=a}return e.onMounted(()=>{const a=e.getCurrentInstance();v.warnIfUnmounted(v.returnFirstEl(a.proxy.$el),"datepicker")}),(a,r)=>(e.openBlock(),e.createBlock(e.unref(M.default),{class:"d-datepicker",gap:"400"},{default:e.withCtx(()=>[e.createElementVNode("div",G,[e.createVNode(K,{ref:"monthYearPicker","selected-date":n.selectedDate,"min-date":n.minDate,"max-date":n.maxDate,"week-starts-on":n.weekStartsOn,onCalendarDays:s,onFocusFirstDay:r[0]||(r[0]=l=>a.$refs.calendar.focusFirstDay()),onFocusLastDay:r[1]||(r[1]=l=>a.$refs.calendar.focusLastDay()),onCloseDatepicker:r[2]||(r[2]=l=>a.$emit("close-datepicker"))},null,8,["selected-date","min-date","max-date","week-starts-on"])]),e.createElementVNode("div",U,[e.createVNode(H,{ref:"calendar","calendar-days":o.value,"week-starts-on":n.weekStartsOn,onSelectDate:r[3]||(r[3]=l=>a.$emit("selected-date",l)),onFocusMonthYearPicker:r[4]||(r[4]=l=>a.$refs.monthYearPicker.focusMonthYearPicker()),onCloseDatepicker:r[5]||(r[5]=l=>a.$emit("close-datepicker")),onGoToNextMonth:r[6]||(r[6]=l=>a.$refs.monthYearPicker.goToNextMonth()),onGoToPrevMonth:r[7]||(r[7]=l=>a.$refs.monthYearPicker.goToPrevMonth())},null,8,["calendar-days","week-starts-on"])])]),_:1}))}};exports.default=X;
|
|
2
2
|
//# sourceMappingURL=datepicker.cjs.map
|