@dialpad/dialtone 9.98.0 → 9.99.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dialtone-default-theme.css +92 -85
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +92 -85
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +21788 -21788
- package/dist/vue2/component-documentation.json +1 -1
- package/dist/vue2/components/item_layout/item_layout.vue.cjs +63 -1
- package/dist/vue2/components/item_layout/item_layout.vue.cjs.map +1 -1
- package/dist/vue2/components/item_layout/item_layout.vue.js +63 -1
- package/dist/vue2/components/item_layout/item_layout.vue.js.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.cjs +12 -13
- package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue2/components/list_item/list_item.vue.js +12 -13
- package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs +5 -1
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs.map +1 -1
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js +5 -1
- package/dist/vue2/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +15 -0
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +15 -0
- package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +10 -10
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +10 -10
- package/dist/vue2/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +2 -4
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +2 -4
- package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +4 -4
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +4 -4
- package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue2/types/components/item_layout/item_layout.vue.d.ts +66 -1
- package/dist/vue2/types/components/item_layout/item_layout.vue.d.ts.map +1 -1
- package/dist/vue2/types/components/list_item/list_item.vue.d.ts +1 -22
- package/dist/vue2/types/components/list_item/list_item.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +11 -0
- package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
- package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
- package/dist/vue3/component-documentation.json +1 -1
- package/dist/vue3/components/avatar/avatar.vue.cjs +1 -0
- package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
- package/dist/vue3/components/avatar/avatar.vue.js +1 -0
- package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
- package/dist/vue3/components/badge/badge.vue.cjs +1 -0
- package/dist/vue3/components/badge/badge.vue.cjs.map +1 -1
- package/dist/vue3/components/badge/badge.vue.js +1 -0
- package/dist/vue3/components/badge/badge.vue.js.map +1 -1
- package/dist/vue3/components/banner/banner.vue.cjs +1 -0
- package/dist/vue3/components/banner/banner.vue.cjs.map +1 -1
- package/dist/vue3/components/banner/banner.vue.js +1 -0
- package/dist/vue3/components/banner/banner.vue.js.map +1 -1
- package/dist/vue3/components/breadcrumbs/breadcrumbs.vue.cjs +1 -0
- package/dist/vue3/components/breadcrumbs/breadcrumbs.vue.cjs.map +1 -1
- package/dist/vue3/components/breadcrumbs/breadcrumbs.vue.js +1 -0
- package/dist/vue3/components/breadcrumbs/breadcrumbs.vue.js.map +1 -1
- package/dist/vue3/components/button/button.vue.cjs +1 -0
- package/dist/vue3/components/button/button.vue.cjs.map +1 -1
- package/dist/vue3/components/button/button.vue.js +1 -0
- package/dist/vue3/components/button/button.vue.js.map +1 -1
- package/dist/vue3/components/button_group/button_group.vue.cjs +1 -0
- package/dist/vue3/components/button_group/button_group.vue.cjs.map +1 -1
- package/dist/vue3/components/button_group/button_group.vue.js +1 -0
- package/dist/vue3/components/button_group/button_group.vue.js.map +1 -1
- package/dist/vue3/components/card/card.vue.cjs +1 -0
- package/dist/vue3/components/card/card.vue.cjs.map +1 -1
- package/dist/vue3/components/card/card.vue.js +1 -0
- package/dist/vue3/components/card/card.vue.js.map +1 -1
- package/dist/vue3/components/checkbox/checkbox.vue.cjs +1 -0
- package/dist/vue3/components/checkbox/checkbox.vue.cjs.map +1 -1
- package/dist/vue3/components/checkbox/checkbox.vue.js +1 -0
- package/dist/vue3/components/checkbox/checkbox.vue.js.map +1 -1
- package/dist/vue3/components/checkbox_group/checkbox_group.vue.cjs +1 -0
- package/dist/vue3/components/checkbox_group/checkbox_group.vue.cjs.map +1 -1
- package/dist/vue3/components/checkbox_group/checkbox_group.vue.js +1 -0
- package/dist/vue3/components/checkbox_group/checkbox_group.vue.js.map +1 -1
- package/dist/vue3/components/chip/chip.vue.cjs +1 -0
- package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
- package/dist/vue3/components/chip/chip.vue.js +1 -0
- package/dist/vue3/components/chip/chip.vue.js.map +1 -1
- package/dist/vue3/components/codeblock/codeblock.vue.cjs +1 -0
- package/dist/vue3/components/codeblock/codeblock.vue.cjs.map +1 -1
- package/dist/vue3/components/codeblock/codeblock.vue.js +1 -0
- package/dist/vue3/components/codeblock/codeblock.vue.js.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.cjs +1 -0
- package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
- package/dist/vue3/components/collapsible/collapsible.vue.js +1 -0
- package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
- package/dist/vue3/components/combobox/combobox.vue.cjs +1 -0
- package/dist/vue3/components/combobox/combobox.vue.cjs.map +1 -1
- package/dist/vue3/components/combobox/combobox.vue.js +1 -0
- package/dist/vue3/components/combobox/combobox.vue.js.map +1 -1
- package/dist/vue3/components/description_list/description_list.vue.cjs +1 -0
- package/dist/vue3/components/description_list/description_list.vue.cjs.map +1 -1
- package/dist/vue3/components/description_list/description_list.vue.js +1 -0
- package/dist/vue3/components/description_list/description_list.vue.js.map +1 -1
- package/dist/vue3/components/dropdown/dropdown.vue.cjs +1 -0
- package/dist/vue3/components/dropdown/dropdown.vue.cjs.map +1 -1
- package/dist/vue3/components/dropdown/dropdown.vue.js +1 -0
- package/dist/vue3/components/dropdown/dropdown.vue.js.map +1 -1
- package/dist/vue3/components/dropdown/dropdown_separator.vue.cjs +1 -0
- package/dist/vue3/components/dropdown/dropdown_separator.vue.cjs.map +1 -1
- package/dist/vue3/components/dropdown/dropdown_separator.vue.js +1 -0
- package/dist/vue3/components/dropdown/dropdown_separator.vue.js.map +1 -1
- package/dist/vue3/components/emoji/emoji.vue.cjs +1 -0
- package/dist/vue3/components/emoji/emoji.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji/emoji.vue.js +1 -0
- package/dist/vue3/components/emoji/emoji.vue.js.map +1 -1
- package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.cjs +1 -0
- package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.cjs.map +1 -1
- package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.js +1 -0
- package/dist/vue3/components/emoji_text_wrapper/emoji_text_wrapper.vue.js.map +1 -1
- package/dist/vue3/components/icon/icon.vue.cjs +1 -0
- package/dist/vue3/components/icon/icon.vue.cjs.map +1 -1
- package/dist/vue3/components/icon/icon.vue.js +1 -0
- package/dist/vue3/components/icon/icon.vue.js.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +1 -0
- package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
- package/dist/vue3/components/image_viewer/image_viewer.vue.js +1 -0
- package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
- package/dist/vue3/components/input/input.vue.cjs +1 -0
- package/dist/vue3/components/input/input.vue.cjs.map +1 -1
- package/dist/vue3/components/input/input.vue.js +1 -0
- package/dist/vue3/components/input/input.vue.js.map +1 -1
- package/dist/vue3/components/input_group/input_group.vue.cjs +1 -0
- package/dist/vue3/components/input_group/input_group.vue.cjs.map +1 -1
- package/dist/vue3/components/input_group/input_group.vue.js +1 -0
- package/dist/vue3/components/input_group/input_group.vue.js.map +1 -1
- package/dist/vue3/components/item_layout/item_layout.vue.cjs +1 -0
- package/dist/vue3/components/item_layout/item_layout.vue.cjs.map +1 -1
- package/dist/vue3/components/item_layout/item_layout.vue.js +1 -0
- package/dist/vue3/components/item_layout/item_layout.vue.js.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +1 -0
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +1 -0
- package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
- package/dist/vue3/components/lazy_show/lazy_show.vue.cjs +1 -0
- package/dist/vue3/components/lazy_show/lazy_show.vue.cjs.map +1 -1
- package/dist/vue3/components/lazy_show/lazy_show.vue.js +1 -0
- package/dist/vue3/components/lazy_show/lazy_show.vue.js.map +1 -1
- package/dist/vue3/components/link/link.vue.cjs +1 -0
- package/dist/vue3/components/link/link.vue.cjs.map +1 -1
- package/dist/vue3/components/link/link.vue.js +1 -0
- package/dist/vue3/components/link/link.vue.js.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.cjs +1 -0
- package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
- package/dist/vue3/components/list_item/list_item.vue.js +1 -0
- package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
- package/dist/vue3/components/list_item_group/list_item_group.vue.cjs +1 -0
- package/dist/vue3/components/list_item_group/list_item_group.vue.cjs.map +1 -1
- package/dist/vue3/components/list_item_group/list_item_group.vue.js +1 -0
- package/dist/vue3/components/list_item_group/list_item_group.vue.js.map +1 -1
- package/dist/vue3/components/modal/modal.vue.cjs +1 -0
- package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
- package/dist/vue3/components/modal/modal.vue.js +1 -0
- package/dist/vue3/components/modal/modal.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice.vue.cjs +1 -0
- package/dist/vue3/components/notice/notice.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice.vue.js +1 -0
- package/dist/vue3/components/notice/notice.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.cjs +1 -0
- package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_action.vue.js +1 -0
- package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_content.vue.cjs +1 -0
- package/dist/vue3/components/notice/notice_content.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_content.vue.js +1 -0
- package/dist/vue3/components/notice/notice_content.vue.js.map +1 -1
- package/dist/vue3/components/notice/notice_icon.vue.cjs +1 -0
- package/dist/vue3/components/notice/notice_icon.vue.cjs.map +1 -1
- package/dist/vue3/components/notice/notice_icon.vue.js +1 -0
- package/dist/vue3/components/notice/notice_icon.vue.js.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.cjs +1 -0
- package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
- package/dist/vue3/components/pagination/pagination.vue.js +1 -0
- package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
- package/dist/vue3/components/popover/popover.vue.cjs +1 -0
- package/dist/vue3/components/popover/popover.vue.cjs.map +1 -1
- package/dist/vue3/components/popover/popover.vue.js +1 -0
- package/dist/vue3/components/popover/popover.vue.js.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs +1 -0
- package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
- package/dist/vue3/components/popover/popover_header_footer.vue.js +1 -0
- package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
- package/dist/vue3/components/presence/presence.vue.cjs +1 -0
- package/dist/vue3/components/presence/presence.vue.cjs.map +1 -1
- package/dist/vue3/components/presence/presence.vue.js +1 -0
- package/dist/vue3/components/presence/presence.vue.js.map +1 -1
- package/dist/vue3/components/radio/radio.vue.cjs +1 -0
- package/dist/vue3/components/radio/radio.vue.cjs.map +1 -1
- package/dist/vue3/components/radio/radio.vue.js +1 -0
- package/dist/vue3/components/radio/radio.vue.js.map +1 -1
- package/dist/vue3/components/radio_group/radio_group.vue.cjs +1 -0
- package/dist/vue3/components/radio_group/radio_group.vue.cjs.map +1 -1
- package/dist/vue3/components/radio_group/radio_group.vue.js +1 -0
- package/dist/vue3/components/radio_group/radio_group.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelComponent.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelComponent.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelComponent.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelComponent.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionComponent.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionComponent.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionComponent.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionComponent.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map +1 -1
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs +1 -0
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js +1 -0
- package/dist/vue3/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
- package/dist/vue3/components/root_layout/root_layout.vue.cjs +1 -0
- package/dist/vue3/components/root_layout/root_layout.vue.cjs.map +1 -1
- package/dist/vue3/components/root_layout/root_layout.vue.js +1 -0
- package/dist/vue3/components/root_layout/root_layout.vue.js.map +1 -1
- package/dist/vue3/components/select_menu/select_menu.vue.cjs +1 -0
- package/dist/vue3/components/select_menu/select_menu.vue.cjs.map +1 -1
- package/dist/vue3/components/select_menu/select_menu.vue.js +1 -0
- package/dist/vue3/components/select_menu/select_menu.vue.js.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-list-item.vue.cjs +1 -0
- package/dist/vue3/components/skeleton/skeleton-list-item.vue.cjs.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-list-item.vue.js +1 -0
- package/dist/vue3/components/skeleton/skeleton-list-item.vue.js.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-paragraph.vue.cjs +1 -0
- package/dist/vue3/components/skeleton/skeleton-paragraph.vue.cjs.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-paragraph.vue.js +1 -0
- package/dist/vue3/components/skeleton/skeleton-paragraph.vue.js.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-shape.vue.cjs +1 -0
- package/dist/vue3/components/skeleton/skeleton-shape.vue.cjs.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-shape.vue.js +1 -0
- package/dist/vue3/components/skeleton/skeleton-shape.vue.js.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-text.vue.cjs +1 -0
- package/dist/vue3/components/skeleton/skeleton-text.vue.cjs.map +1 -1
- package/dist/vue3/components/skeleton/skeleton-text.vue.js +1 -0
- package/dist/vue3/components/skeleton/skeleton-text.vue.js.map +1 -1
- package/dist/vue3/components/skeleton/skeleton.vue.cjs +1 -0
- package/dist/vue3/components/skeleton/skeleton.vue.cjs.map +1 -1
- package/dist/vue3/components/skeleton/skeleton.vue.js +1 -0
- package/dist/vue3/components/skeleton/skeleton.vue.js.map +1 -1
- package/dist/vue3/components/split_button/split_button-alpha.vue.cjs +1 -0
- package/dist/vue3/components/split_button/split_button-alpha.vue.cjs.map +1 -1
- package/dist/vue3/components/split_button/split_button-alpha.vue.js +1 -0
- package/dist/vue3/components/split_button/split_button-alpha.vue.js.map +1 -1
- package/dist/vue3/components/split_button/split_button-omega.vue.cjs +1 -0
- package/dist/vue3/components/split_button/split_button-omega.vue.cjs.map +1 -1
- package/dist/vue3/components/split_button/split_button-omega.vue.js +1 -0
- package/dist/vue3/components/split_button/split_button-omega.vue.js.map +1 -1
- package/dist/vue3/components/split_button/split_button.vue.cjs +1 -0
- package/dist/vue3/components/split_button/split_button.vue.cjs.map +1 -1
- package/dist/vue3/components/split_button/split_button.vue.js +1 -0
- package/dist/vue3/components/split_button/split_button.vue.js.map +1 -1
- package/dist/vue3/components/stack/stack.vue.cjs +1 -0
- package/dist/vue3/components/stack/stack.vue.cjs.map +1 -1
- package/dist/vue3/components/stack/stack.vue.js +1 -0
- package/dist/vue3/components/stack/stack.vue.js.map +1 -1
- package/dist/vue3/components/tab/tab.vue.cjs +1 -0
- package/dist/vue3/components/tab/tab.vue.cjs.map +1 -1
- package/dist/vue3/components/tab/tab.vue.js +1 -0
- package/dist/vue3/components/tab/tab.vue.js.map +1 -1
- package/dist/vue3/components/tab/tab_group.vue.cjs +1 -0
- package/dist/vue3/components/tab/tab_group.vue.cjs.map +1 -1
- package/dist/vue3/components/tab/tab_group.vue.js +1 -0
- package/dist/vue3/components/tab/tab_group.vue.js.map +1 -1
- package/dist/vue3/components/tab/tab_panel.vue.cjs +1 -0
- package/dist/vue3/components/tab/tab_panel.vue.cjs.map +1 -1
- package/dist/vue3/components/tab/tab_panel.vue.js +1 -0
- package/dist/vue3/components/tab/tab_panel.vue.js.map +1 -1
- package/dist/vue3/components/toast/toast.vue.cjs +1 -0
- package/dist/vue3/components/toast/toast.vue.cjs.map +1 -1
- package/dist/vue3/components/toast/toast.vue.js +1 -0
- package/dist/vue3/components/toast/toast.vue.js.map +1 -1
- package/dist/vue3/components/toggle/toggle.vue.cjs +1 -0
- package/dist/vue3/components/toggle/toggle.vue.cjs.map +1 -1
- package/dist/vue3/components/toggle/toggle.vue.js +1 -0
- package/dist/vue3/components/toggle/toggle.vue.js.map +1 -1
- package/dist/vue3/components/tooltip/tooltip.vue.cjs +1 -0
- package/dist/vue3/components/tooltip/tooltip.vue.cjs.map +1 -1
- package/dist/vue3/components/tooltip/tooltip.vue.js +1 -0
- package/dist/vue3/components/tooltip/tooltip.vue.js.map +1 -1
- package/dist/vue3/components/validation_messages/validation_messages.vue.cjs +1 -0
- package/dist/vue3/components/validation_messages/validation_messages.vue.cjs.map +1 -1
- package/dist/vue3/components/validation_messages/validation_messages.vue.js +1 -0
- package/dist/vue3/components/validation_messages/validation_messages.vue.js.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.cjs +1 -0
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.js +1 -0
- package/dist/vue3/recipes/buttons/callbar_button/callbar_button.vue.js.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +1 -0
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +1 -0
- package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs +1 -0
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js +1 -0
- package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.cjs +1 -0
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.cjs.map +1 -1
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.js +1 -0
- package/dist/vue3/recipes/chips/grouped_chip/grouped_chip.vue.js.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +1 -0
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +1 -0
- package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs +1 -0
- package/dist/vue3/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs.map +1 -1
- package/dist/vue3/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js +1 -0
- package/dist/vue3/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +16 -0
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +16 -0
- package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/emoji_row/emoji_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_button.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_link.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/message_input/message_input_topbar.vue.js.map +1 -1
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.cjs +1 -0
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.js +1 -0
- package/dist/vue3/recipes/conversation_view/time_pill/time_pill.vue.js.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +1 -0
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +1 -0
- package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +1 -0
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +1 -0
- package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +1 -0
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +1 -0
- package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs +1 -0
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js +1 -0
- package/dist/vue3/recipes/leftbar/contact_centers_row/contact_centers_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +1 -0
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +1 -0
- package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +1 -0
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +1 -0
- package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +1 -0
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +1 -0
- package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +1 -0
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +1 -0
- package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +1 -0
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js +1 -0
- package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.cjs +1 -0
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.cjs.map +1 -1
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.js +1 -0
- package/dist/vue3/recipes/notices/top_banner_info/top_banner_info.vue.js.map +1 -1
- package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/card/card.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/input/input.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/input_group/input_group.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/item_layout/item_layout.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/lazy_show/lazy_show.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_content.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/notice/notice_icon.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/radio/radio.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/toggle/toggle.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/validation_messages/validation_messages.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +11 -0
- package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
- package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rich_text_editor.vue.js","sources":["../../../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div>\n <!-- why the hell is this visibility: hidden by default??? -->\n <bubble-menu\n v-if=\"editor && link && !hideLinkBubbleMenu\"\n :editor=\"editor\"\n :should-show=\"bubbleMenuShouldShow\"\n :tippy-options=\"tippyOptions\"\n style=\"visibility: visible;\"\n >\n <div class=\"d-popover__dialog\">\n <dt-stack\n direction=\"row\"\n class=\"d-rich-text-editor-bubble-menu__button-stack\"\n gap=\"0\"\n >\n <dt-button\n kind=\"muted\"\n importance=\"clear\"\n @click=\"editLink\"\n >\n Edit\n </dt-button>\n <dt-button\n kind=\"muted\"\n importance=\"clear\"\n @click=\"openLink\"\n >\n Open link\n </dt-button>\n <dt-button\n kind=\"danger\"\n importance=\"clear\"\n @click=\"removeLink\"\n >\n Remove\n </dt-button>\n </dt-stack>\n </div>\n </bubble-menu>\n <editor-content\n ref=\"editor\"\n :editor=\"editor\"\n class=\"d-rich-text-editor\"\n data-qa=\"dt-rich-text-editor\"\n v-bind=\"attrs\"\n />\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent, BubbleMenu } from '@tiptap/vue-3';\nimport { Extension } from '@tiptap/core';\nimport { DtButton } from '../button';\nimport { DtStack } from '../stack';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Code from '@tiptap/extension-code';\nimport Document from '@tiptap/extension-document';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Bold from '@tiptap/extension-bold';\nimport BulletList from '@tiptap/extension-bullet-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport ListItem from '@tiptap/extension-list-item';\nimport OrderedList from '@tiptap/extension-ordered-list';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport History from '@tiptap/extension-history';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport ConfigurableImage from './extensions/image';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport {\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted } from '@/common/utils';\nimport deepEqual from 'deep-equal';\n\nexport default {\n name: 'DtRichTextEditor',\n\n components: {\n EditorContent,\n BubbleMenu,\n DtButton,\n DtStack,\n },\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n modelValue: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n * line breaks can still be entered by pressing shift+enter.\n */\n allowLineBreaks: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'html',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Enables the TipTap Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the custom link extension at the same time.\n */\n link: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * Enables the Custom Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the built in TipTap link extension at the same time.\n *\n * The custom link does some additional things on top of the built in TipTap link\n * extension such as styling phone numbers and IP adresses as links, and allows you\n * to linkify text without having to type a space after the link. Currently it is missing some\n * functionality such as editing links and will likely require more work to be fully usable,\n * so it is recommended to use the built in TipTap link for now.\n */\n customLink: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n * Note that slash commands only work when they are the first word in the input.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows inline code (wrapped in backticks).\n */\n allowCode: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows inline images to be rendered.\n */\n allowInlineImages: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional TipTap extensions to be added to the editor.\n */\n additionalExtensions: {\n type: Array,\n default: () => [],\n },\n\n /**\n * Manually hide the link bubble menu. The link bubble menu is shown when a link is selected via the cursor.\n * There are some cases when you may want the link to remain selected but hide the bubble menu such as when You\n * are showing a custom link editor popup.\n */\n hideLinkBubbleMenu: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Editor input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Input event always in JSON format.\n * @event input\n * @type {JSON}\n */\n 'json-input',\n\n /**\n * Input event always in HTML format.\n * @event input\n * @type {HTML}\n */\n 'html-input',\n\n /**\n * Input event always in text format.\n * @event input\n * @type {String}\n */\n 'text-input',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Editor blur event\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Editor focus event\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Enter was pressed. Note that shift enter must be pressed to line break the input.\n * @event enter\n * @type {String}\n */\n 'enter',\n\n /**\n * \"Edit link\" button was clicked. Fires an event for the consuming component to handle the editing of the link.\n * event contains the link object with two properties href and text.\n * @event edit-link\n * @type {Object}\n */\n 'edit-link',\n\n /**\n * \"Selected\" event is fired when the user selects text in the editor. returns the currently selected text.\n * If the selected text is partially a link, the full link text is returned.\n * @event selected\n * @type {String}\n */\n 'selected',\n ],\n\n data () {\n return {\n editor: null,\n tippyOptions: {\n appendTo: () => this.$refs.editor.$el.getRootNode()?.querySelector('body'),\n placement: 'top-start',\n },\n };\n },\n\n computed: {\n attrs () {\n return {\n ...this.$attrs,\n onInput: () => {},\n onFocus: () => {},\n onBlur: () => {},\n };\n },\n\n // eslint-disable-next-line complexity\n extensions () {\n // These are the default extensions needed just for plain text.\n const extensions = [Document, Paragraph, Text, History, HardBreak];\n\n if (this.allowBlockquote) {\n extensions.push(Blockquote);\n }\n if (this.allowBold) {\n extensions.push(Bold);\n }\n if (this.allowBulletList) {\n extensions.push(BulletList);\n extensions.push(ListItem.extend({\n renderText ({ node }) {\n return node.textContent;\n },\n }));\n extensions.push(OrderedList);\n }\n if (this.allowItalic) {\n extensions.push(Italic);\n }\n if (this.allowStrike) {\n extensions.push(Strike);\n }\n if (this.allowUnderline) {\n extensions.push(Underline);\n }\n\n // Enable placeholderText\n if (this.placeholder) {\n extensions.push(\n Placeholder.configure({ placeholder: this.placeholder }),\n );\n }\n\n const self = this;\n const ShiftEnter = Extension.create({\n addKeyboardShortcuts () {\n return {\n 'Shift-Enter': ({ editor }) => {\n if (self.allowLineBreaks) {\n return false;\n }\n editor.commands.first(({ commands }) => [\n () => commands.newlineInCode(),\n () => self.allowBulletList && commands.splitListItem('listItem'),\n () => commands.createParagraphNear(),\n () => commands.liftEmptyBlock(),\n () => commands.splitBlock(),\n ]);\n return true;\n },\n Enter: () => {\n if (self.allowLineBreaks) {\n return false;\n }\n self.$emit('enter');\n return true;\n },\n };\n },\n });\n extensions.push(ShiftEnter);\n\n if (this.link) {\n extensions.push(TipTapLink.extend({ inclusive: false }).configure({\n HTMLAttributes: {\n class: 'd-link d-wb-break-all',\n },\n openOnClick: false,\n autolink: true,\n protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n }));\n }\n if (this.customLink) {\n extensions.push(this.getExtension(CustomLink, this.customLink));\n }\n\n if (this.mentionSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.channelSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.slashCommandSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n extensions.push(SlashCommandPlugin.configure({ suggestion: suggestionObject }));\n }\n\n // Emoji has some interactions with Enter key\n // hence this should be done last otherwise the enter wont add a emoji.\n extensions.push(Emoji);\n\n extensions.push(TextAlign.configure({\n types: ['paragraph'],\n defaultAlignment: 'left',\n }));\n\n if (this.allowCode) {\n extensions.push(Code);\n }\n\n if (this.allowCodeblock) {\n extensions.push(CodeBlock.extend({\n renderText ({ node }) {\n return `\\`\\`\\`\\n${node.textContent}\\n\\`\\`\\``;\n },\n }).configure({\n HTMLAttributes: {\n class: 'd-rich-text-editor__code-block',\n },\n }));\n }\n\n if (this.allowInlineImages) {\n extensions.push(ConfigurableImage);\n }\n\n if (this.additionalExtensions.length) {\n extensions.push(...this.additionalExtensions);\n }\n\n return extensions;\n },\n\n inputAttrs () {\n const attrs = {\n 'aria-label': this.inputAriaLabel,\n 'aria-multiline': true,\n role: 'textbox',\n };\n if (!this.editable) {\n attrs['aria-readonly'] = true;\n }\n return attrs;\n },\n },\n\n /**\n * Because the Editor instance is initialized when mounted it does not get\n * updated props automatically, so the ones that can change after mount have\n * to be hooked up to the Editor's own API.\n */\n watch: {\n editable (isEditable) {\n this.editor.setEditable(isEditable);\n this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n },\n\n inputClass (newClass) {\n this.updateEditorAttributes({ class: newClass });\n },\n\n inputAriaLabel (newLabel) {\n this.updateEditorAttributes({ 'aria-label': newLabel });\n },\n\n extensions () {\n // Extensions can't be registered on the fly, so just recreate the editor.\n // https://github.com/ueberdosis/tiptap/issues/1044\n this.destroyEditor();\n this.createEditor();\n },\n\n modelValue (newValue) {\n this.processValue(newValue);\n },\n },\n\n created () {\n this.createEditor();\n },\n\n beforeUnmount () {\n this.destroyEditor();\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n this.processValue(this.modelValue, false);\n },\n\n methods: {\n\n createEditor () {\n // For all available options, see https://tiptap.dev/api/editor#settings\n this.editor = new Editor({\n autofocus: this.autoFocus,\n content: this.modelValue,\n editable: this.editable,\n extensions: this.extensions,\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n },\n\n // Moves the <br /> tags inside the previous closing tag to avoid\n // Prosemirror wrapping them within another </p> tag.\n transformPastedHTML (html) {\n return html.replace(/(<\\/\\w+>)((<br \\/>)+)/g, '$2$3$1');\n },\n },\n });\n this.addEditorListeners();\n },\n\n bubbleMenuShouldShow ({ editor, view, state, oldState, from, to }) {\n return editor.isActive('link');\n },\n\n /**\n * If the selection contains a link, return the existing link text.\n * Otherwise, use just the selected text.\n * @param editor the editor instance.\n */\n getSelectedLinkText (editor) {\n const { view, state } = editor;\n const { from, to } = view.state.selection;\n const text = state.doc.textBetween(from, to, '');\n const linkNode = this.editor.state.doc.nodeAt(from);\n if (linkNode && linkNode.marks?.at(0)?.type?.name === 'link') {\n return linkNode.textContent;\n } else {\n return text;\n }\n },\n\n editLink () {\n const linkText = this.getSelectedLinkText(this.editor);\n\n const link = {\n href: this.editor.getAttributes('link').href,\n text: linkText,\n };\n this.$emit('edit-link', link);\n },\n\n removeLink () {\n this.editor?.chain()?.focus()?.unsetLink()?.run();\n },\n\n openLink () {\n this.editor?.chain()?.focus();\n const link = this.editor.getAttributes('link').href;\n window.open(link, '_blank');\n },\n\n // eslint-disable-next-line complexity\n setLink (linkInput, linkText, linkOptions, linkProtocols = RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n defaultPrefix) {\n if (!linkInput) {\n // If link text is set to empty string,\n // remove any existing links.\n this.removeLink();\n return;\n }\n\n // Check if input matches any of the supported link formats\n const prefix = linkProtocols.find(prefixRegex => prefixRegex.test(linkInput));\n\n if (!prefix) {\n // If no matching pattern is found, prepend default prefix\n linkInput = `${defaultPrefix}${linkInput}`;\n }\n\n this.editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .run();\n\n const selection = this.editor?.view?.state?.selection;\n\n this.editor\n .chain()\n .focus()\n .insertContent(linkText)\n .setTextSelection({ from: selection.from, to: selection.from + linkText.length })\n .setLink({ href: linkInput, class: linkOptions.class })\n .run();\n },\n\n // eslint-disable-next-line complexity\n processValue (newValue, returnIfEqual = true) {\n const currentValue = this.getOutput();\n\n if (returnIfEqual && deepEqual(newValue, currentValue)) {\n // The new value came from this component and was passed back down\n // through the parent, so don't do anything here.\n return;\n }\n\n // If the text contains emoji characters convert them to emoji component tags\n if (typeof newValue === 'string' && this.outputFormat === 'text') {\n const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n newValue = newValue?.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n }\n\n // Otherwise replace the content (resets the cursor position).\n this.editor.commands.setContent(newValue, false);\n },\n\n destroyEditor () {\n this.editor.destroy();\n },\n\n triggerInputChangeEvents () {\n const value = this.getOutput();\n this.$emit('input', value);\n this.$emit('update:modelValue', value);\n\n // Always output JSON in a separate event\n const jsonValue = this.editor.getJSON();\n this.$emit('json-input', jsonValue);\n\n // Always output HTML in a separate event\n const htmlValue = this.editor.getHTML();\n this.$emit('html-input', htmlValue);\n\n // Always output HTML in a separate event\n const textValue = this.editor.getText({ blockSeparator: '\\n' });\n this.$emit('text-input', textValue);\n },\n\n /**\n * The Editor exposes event hooks that we have to map our emits into. See\n * https://tiptap.dev/api/events for all events.\n */\n addEditorListeners () {\n this.editor.on('create', () => {\n this.triggerInputChangeEvents();\n });\n // The content has changed.\n this.editor.on('update', () => {\n // When preventTyping is true and user wants to type, we revert to last value\n // If Backspace (keyCode = 8) is pressed, we allow updating the text\n if (this.preventTyping && this.editor.view?.input?.lastKeyCode !== 8) {\n this.editor.commands.setContent(this.value, false);\n return;\n }\n this.triggerInputChangeEvents();\n });\n\n this.editor.on('selectionUpdate', ({ editor }) => {\n this.$emit('selected', this.getSelectedLinkText(editor));\n });\n\n // The editor is focused.\n this.editor.on('focus', ({ event }) => {\n this.$emit('focus', event);\n });\n\n // The editor isn’t focused anymore.\n this.editor.on('blur', ({ event }) => {\n this.$emit('blur', event);\n });\n },\n\n getOutput () {\n switch (this.outputFormat) {\n case 'json':\n return this.editor.getJSON();\n case 'html':\n return this.editor.getHTML();\n case 'text':\n default:\n return this.editor.getText({ blockSeparator: '\\n' });\n }\n },\n\n getExtension (extension, options) {\n if (typeof options === 'boolean') {\n return extension;\n }\n return extension.configure?.(options);\n },\n\n updateEditorAttributes (attributes) {\n this.editor.setOptions({\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n ...attributes,\n },\n },\n });\n },\n\n focusEditor () {\n this.editor.commands.focus();\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_createBlock","_withCtx","_createElementVNode","_createVNode","_createTextVNode","_createCommentVNode","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,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3BJC,YA0BW,qBAAA;AAAA,YAzBT,WAAU;AAAA,YACV,OAAM;AAAA,YACN,KAAI;AAAA;YAjBd,SAAAF,QAmBU,MAMY;AAAA,cANZE,YAMY,sBAAA;AAAA,gBALV,MAAK;AAAA,gBACL,YAAW;AAAA,gBACV,SAAO,SAAQ;AAAA;gBAtB5B,SAAAF,QAuBW,MAED;AAAA,kBAzBVG,gBAuBW,QAED;AAAA;gBAzBV,GAAA;AAAA;cA0BUD,YAMY,sBAAA;AAAA,gBALV,MAAK;AAAA,gBACL,YAAW;AAAA,gBACV,SAAO,SAAQ;AAAA;gBA7B5B,SAAAF,QA8BW,MAED;AAAA,kBAhCVG,gBA8BW,aAED;AAAA;gBAhCV,GAAA;AAAA;cAiCUD,YAMY,sBAAA;AAAA,gBALV,MAAK;AAAA,gBACL,YAAW;AAAA,gBACV,SAAO,SAAU;AAAA;gBApC9B,SAAAF,QAqCW,MAED;AAAA,kBAvCVG,gBAqCW,UAED;AAAA;gBAvCV,GAAA;AAAA;;YAAA,GAAA;AAAA;;;MAAA,GAAA;AAAA,yDAAAC,mBAAA,IAAA,IAAA;AAAA,IA2CIF,YAME,2BANFG,WAME;AAAA,MALA,KAAI;AAAA,MACH,QAAQ,MAAM;AAAA,MACf,OAAM;AAAA,MACN,WAAQ;AAAA,OACA,SAAK,KAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"rich_text_editor.vue.js","sources":["../../../components/rich_text_editor/rich_text_editor.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div>\n <!-- why the hell is this visibility: hidden by default??? -->\n <bubble-menu\n v-if=\"editor && link && !hideLinkBubbleMenu\"\n :editor=\"editor\"\n :should-show=\"bubbleMenuShouldShow\"\n :tippy-options=\"tippyOptions\"\n style=\"visibility: visible;\"\n >\n <div class=\"d-popover__dialog\">\n <dt-stack\n direction=\"row\"\n class=\"d-rich-text-editor-bubble-menu__button-stack\"\n gap=\"0\"\n >\n <dt-button\n kind=\"muted\"\n importance=\"clear\"\n @click=\"editLink\"\n >\n Edit\n </dt-button>\n <dt-button\n kind=\"muted\"\n importance=\"clear\"\n @click=\"openLink\"\n >\n Open link\n </dt-button>\n <dt-button\n kind=\"danger\"\n importance=\"clear\"\n @click=\"removeLink\"\n >\n Remove\n </dt-button>\n </dt-stack>\n </div>\n </bubble-menu>\n <editor-content\n ref=\"editor\"\n :editor=\"editor\"\n class=\"d-rich-text-editor\"\n data-qa=\"dt-rich-text-editor\"\n v-bind=\"attrs\"\n />\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { Editor, EditorContent, BubbleMenu } from '@tiptap/vue-3';\nimport { Extension } from '@tiptap/core';\nimport { DtButton } from '../button';\nimport { DtStack } from '../stack';\nimport Blockquote from '@tiptap/extension-blockquote';\nimport CodeBlock from '@tiptap/extension-code-block';\nimport Code from '@tiptap/extension-code';\nimport Document from '@tiptap/extension-document';\nimport HardBreak from '@tiptap/extension-hard-break';\nimport Paragraph from '@tiptap/extension-paragraph';\nimport Placeholder from '@tiptap/extension-placeholder';\nimport Bold from '@tiptap/extension-bold';\nimport BulletList from '@tiptap/extension-bullet-list';\nimport Italic from '@tiptap/extension-italic';\nimport TipTapLink from '@tiptap/extension-link';\nimport ListItem from '@tiptap/extension-list-item';\nimport OrderedList from '@tiptap/extension-ordered-list';\nimport Strike from '@tiptap/extension-strike';\nimport Underline from '@tiptap/extension-underline';\nimport Text from '@tiptap/extension-text';\nimport TextAlign from '@tiptap/extension-text-align';\nimport History from '@tiptap/extension-history';\nimport Emoji from './extensions/emoji';\nimport CustomLink from './extensions/custom_link';\nimport ConfigurableImage from './extensions/image';\nimport { MentionPlugin } from './extensions/mentions/mention';\nimport { ChannelPlugin } from './extensions/channels/channel';\nimport { SlashCommandPlugin } from './extensions/slash_command/slash_command';\nimport {\n RICH_TEXT_EDITOR_OUTPUT_FORMATS,\n RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,\n RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n} from './rich_text_editor_constants';\nimport { emojiPattern } from 'regex-combined-emojis';\n\nimport mentionSuggestion from './extensions/mentions/suggestion';\nimport channelSuggestion from './extensions/channels/suggestion';\nimport slashCommandSuggestion from './extensions/slash_command/suggestion';\nimport { warnIfUnmounted } from '@/common/utils';\nimport deepEqual from 'deep-equal';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRichTextEditor',\n\n components: {\n EditorContent,\n BubbleMenu,\n DtButton,\n DtStack,\n },\n\n props: {\n /**\n * Value of the input. The object format should match TipTap's JSON\n * document structure: https://tiptap.dev/guide/output#option-1-json\n */\n modelValue: {\n type: [Object, String],\n default: '',\n },\n\n /**\n * Whether the input is editable\n */\n editable: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Prevents the user from typing any further. Deleting text will still work.\n */\n preventTyping: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether the input allows for line breaks to be introduced in the text by pressing enter. If this is disabled,\n * line breaks can still be entered by pressing shift+enter.\n */\n allowLineBreaks: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Descriptive label for the input element\n */\n inputAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Additional class name for the input element. Only accepts a String value\n * because this is passed to the editor via options. For multiple classes,\n * join them into one string, e.g. \"d-p8 d-hmx96\"\n */\n inputClass: {\n type: String,\n default: '',\n },\n\n /**\n * Whether the input should receive focus after the component has been\n * mounted. Either one of `start`, `end`, `all` or a Boolean or a Number.\n * - `start` Sets the focus to the beginning of the input\n * - `end` Sets the focus to the end of the input\n * - `all` Selects the whole contents of the input\n * - `Number` Sets the focus to a specific position in the input\n * - `true` Defaults to `start`\n * - `false` Disables autofocus\n * @values true, false, start, end, all, number\n */\n autoFocus: {\n type: [Boolean, String, Number],\n default: false,\n validator (autoFocus) {\n if (typeof autoFocus === 'string') {\n return RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(autoFocus);\n }\n return true;\n },\n },\n\n /**\n * The output format that the editor uses when emitting the \"@input\" event.\n * One of `text`, `json`, `html`. See https://tiptap.dev/guide/output for\n * examples.\n * @values text, json, html\n */\n outputFormat: {\n type: String,\n default: 'html',\n validator (outputFormat) {\n return RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);\n },\n },\n\n /**\n * Placeholder text\n */\n placeholder: {\n type: String,\n default: '',\n },\n\n /**\n * Enables the TipTap Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the custom link extension at the same time.\n */\n link: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * Enables the Custom Link extension and optionally passes configurations to it\n *\n * It is not recommended to use this and the built in TipTap link extension at the same time.\n *\n * The custom link does some additional things on top of the built in TipTap link\n * extension such as styling phone numbers and IP adresses as links, and allows you\n * to linkify text without having to type a space after the link. Currently it is missing some\n * functionality such as editing links and will likely require more work to be fully usable,\n * so it is recommended to use the built in TipTap link for now.\n */\n customLink: {\n type: [Boolean, Object],\n default: false,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the contacts for suggestion.\n * items({ query }) => { return [ContactObject]; }\n * ContactObject format:\n * { name: string, avatarSrc: string, id: string }\n *\n * When null, it does not add the plugin.\n */\n mentionSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the channels for suggestion.\n * items({ query }) => { return [ChannelObject]; }\n * ChannelObject format:\n * { name: string, id: string, locked: boolean }\n *\n * When null, it does not add the plugin. Setting locked to true will display a lock rather than hash.\n */\n channelSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * suggestion object containing the items query function.\n * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion\n *\n * The only required key is the items function which is used to query the slash commands for suggestion.\n * items({ query }) => { return [SlashCommandObject]; }\n * SlashCommandObject format:\n * { command: string, description: string, parametersExample?: string }\n * The \"parametersExample\" parameter is optional, and describes an example\n * of the parameters that command can take.\n *\n * When null, it does not add the plugin.\n * Note that slash commands only work when they are the first word in the input.\n */\n slashCommandSuggestion: {\n type: Object,\n default: null,\n },\n\n /**\n * Whether the input allows for block quote.\n */\n allowBlockquote: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bold to be introduced in the text.\n */\n allowBold: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for bullet list to be introduced in the text.\n */\n allowBulletList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for italic to be introduced in the text.\n */\n allowItalic: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for strike to be introduced in the text.\n */\n allowStrike: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows for underline to be introduced in the text.\n */\n allowUnderline: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows inline code (wrapped in backticks).\n */\n allowCode: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows codeblock to be introduced in the text.\n */\n allowCodeblock: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the input allows inline images to be rendered.\n */\n allowInlineImages: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional TipTap extensions to be added to the editor.\n */\n additionalExtensions: {\n type: Array,\n default: () => [],\n },\n\n /**\n * Manually hide the link bubble menu. The link bubble menu is shown when a link is selected via the cursor.\n * There are some cases when you may want the link to remain selected but hide the bubble menu such as when You\n * are showing a custom link editor popup.\n */\n hideLinkBubbleMenu: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Editor input event\n * @event input\n * @type {String|JSON}\n */\n 'input',\n\n /**\n * Input event always in JSON format.\n * @event input\n * @type {JSON}\n */\n 'json-input',\n\n /**\n * Input event always in HTML format.\n * @event input\n * @type {HTML}\n */\n 'html-input',\n\n /**\n * Input event always in text format.\n * @event input\n * @type {String}\n */\n 'text-input',\n\n /**\n * Event to sync the value with the parent\n * @event update:value\n * @type {String|JSON}\n */\n 'update:modelValue',\n\n /**\n * Editor blur event\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Editor focus event\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Enter was pressed. Note that shift enter must be pressed to line break the input.\n * @event enter\n * @type {String}\n */\n 'enter',\n\n /**\n * \"Edit link\" button was clicked. Fires an event for the consuming component to handle the editing of the link.\n * event contains the link object with two properties href and text.\n * @event edit-link\n * @type {Object}\n */\n 'edit-link',\n\n /**\n * \"Selected\" event is fired when the user selects text in the editor. returns the currently selected text.\n * If the selected text is partially a link, the full link text is returned.\n * @event selected\n * @type {String}\n */\n 'selected',\n ],\n\n data () {\n return {\n editor: null,\n tippyOptions: {\n appendTo: () => this.$refs.editor.$el.getRootNode()?.querySelector('body'),\n placement: 'top-start',\n },\n };\n },\n\n computed: {\n attrs () {\n return {\n ...this.$attrs,\n onInput: () => {},\n onFocus: () => {},\n onBlur: () => {},\n };\n },\n\n // eslint-disable-next-line complexity\n extensions () {\n // These are the default extensions needed just for plain text.\n const extensions = [Document, Paragraph, Text, History, HardBreak];\n\n if (this.allowBlockquote) {\n extensions.push(Blockquote);\n }\n if (this.allowBold) {\n extensions.push(Bold);\n }\n if (this.allowBulletList) {\n extensions.push(BulletList);\n extensions.push(ListItem.extend({\n renderText ({ node }) {\n return node.textContent;\n },\n }));\n extensions.push(OrderedList);\n }\n if (this.allowItalic) {\n extensions.push(Italic);\n }\n if (this.allowStrike) {\n extensions.push(Strike);\n }\n if (this.allowUnderline) {\n extensions.push(Underline);\n }\n\n // Enable placeholderText\n if (this.placeholder) {\n extensions.push(\n Placeholder.configure({ placeholder: this.placeholder }),\n );\n }\n\n const self = this;\n const ShiftEnter = Extension.create({\n addKeyboardShortcuts () {\n return {\n 'Shift-Enter': ({ editor }) => {\n if (self.allowLineBreaks) {\n return false;\n }\n editor.commands.first(({ commands }) => [\n () => commands.newlineInCode(),\n () => self.allowBulletList && commands.splitListItem('listItem'),\n () => commands.createParagraphNear(),\n () => commands.liftEmptyBlock(),\n () => commands.splitBlock(),\n ]);\n return true;\n },\n Enter: () => {\n if (self.allowLineBreaks) {\n return false;\n }\n self.$emit('enter');\n return true;\n },\n };\n },\n });\n extensions.push(ShiftEnter);\n\n if (this.link) {\n extensions.push(TipTapLink.extend({ inclusive: false }).configure({\n HTMLAttributes: {\n class: 'd-link d-wb-break-all',\n },\n openOnClick: false,\n autolink: true,\n protocols: RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n }));\n }\n if (this.customLink) {\n extensions.push(this.getExtension(CustomLink, this.customLink));\n }\n\n if (this.mentionSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.mentionSuggestion, ...mentionSuggestion };\n extensions.push(MentionPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.channelSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.channelSuggestion, ...channelSuggestion };\n extensions.push(ChannelPlugin.configure({ suggestion: suggestionObject }));\n }\n\n if (this.slashCommandSuggestion) {\n // Add both the suggestion plugin as well as means for user to add suggestion items to the plugin\n const suggestionObject = { ...this.slashCommandSuggestion, ...slashCommandSuggestion };\n extensions.push(SlashCommandPlugin.configure({ suggestion: suggestionObject }));\n }\n\n // Emoji has some interactions with Enter key\n // hence this should be done last otherwise the enter wont add a emoji.\n extensions.push(Emoji);\n\n extensions.push(TextAlign.configure({\n types: ['paragraph'],\n defaultAlignment: 'left',\n }));\n\n if (this.allowCode) {\n extensions.push(Code);\n }\n\n if (this.allowCodeblock) {\n extensions.push(CodeBlock.extend({\n renderText ({ node }) {\n return `\\`\\`\\`\\n${node.textContent}\\n\\`\\`\\``;\n },\n }).configure({\n HTMLAttributes: {\n class: 'd-rich-text-editor__code-block',\n },\n }));\n }\n\n if (this.allowInlineImages) {\n extensions.push(ConfigurableImage);\n }\n\n if (this.additionalExtensions.length) {\n extensions.push(...this.additionalExtensions);\n }\n\n return extensions;\n },\n\n inputAttrs () {\n const attrs = {\n 'aria-label': this.inputAriaLabel,\n 'aria-multiline': true,\n role: 'textbox',\n };\n if (!this.editable) {\n attrs['aria-readonly'] = true;\n }\n return attrs;\n },\n },\n\n /**\n * Because the Editor instance is initialized when mounted it does not get\n * updated props automatically, so the ones that can change after mount have\n * to be hooked up to the Editor's own API.\n */\n watch: {\n editable (isEditable) {\n this.editor.setEditable(isEditable);\n this.updateEditorAttributes({ 'aria-readonly': !isEditable });\n },\n\n inputClass (newClass) {\n this.updateEditorAttributes({ class: newClass });\n },\n\n inputAriaLabel (newLabel) {\n this.updateEditorAttributes({ 'aria-label': newLabel });\n },\n\n extensions () {\n // Extensions can't be registered on the fly, so just recreate the editor.\n // https://github.com/ueberdosis/tiptap/issues/1044\n this.destroyEditor();\n this.createEditor();\n },\n\n modelValue (newValue) {\n this.processValue(newValue);\n },\n },\n\n created () {\n this.createEditor();\n },\n\n beforeUnmount () {\n this.destroyEditor();\n },\n\n mounted () {\n warnIfUnmounted(this.$el, this.$options.name);\n this.processValue(this.modelValue, false);\n },\n\n methods: {\n\n createEditor () {\n // For all available options, see https://tiptap.dev/api/editor#settings\n this.editor = new Editor({\n autofocus: this.autoFocus,\n content: this.modelValue,\n editable: this.editable,\n extensions: this.extensions,\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n },\n\n // Moves the <br /> tags inside the previous closing tag to avoid\n // Prosemirror wrapping them within another </p> tag.\n transformPastedHTML (html) {\n return html.replace(/(<\\/\\w+>)((<br \\/>)+)/g, '$2$3$1');\n },\n },\n });\n this.addEditorListeners();\n },\n\n bubbleMenuShouldShow ({ editor, view, state, oldState, from, to }) {\n return editor.isActive('link');\n },\n\n /**\n * If the selection contains a link, return the existing link text.\n * Otherwise, use just the selected text.\n * @param editor the editor instance.\n */\n getSelectedLinkText (editor) {\n const { view, state } = editor;\n const { from, to } = view.state.selection;\n const text = state.doc.textBetween(from, to, '');\n const linkNode = this.editor.state.doc.nodeAt(from);\n if (linkNode && linkNode.marks?.at(0)?.type?.name === 'link') {\n return linkNode.textContent;\n } else {\n return text;\n }\n },\n\n editLink () {\n const linkText = this.getSelectedLinkText(this.editor);\n\n const link = {\n href: this.editor.getAttributes('link').href,\n text: linkText,\n };\n this.$emit('edit-link', link);\n },\n\n removeLink () {\n this.editor?.chain()?.focus()?.unsetLink()?.run();\n },\n\n openLink () {\n this.editor?.chain()?.focus();\n const link = this.editor.getAttributes('link').href;\n window.open(link, '_blank');\n },\n\n // eslint-disable-next-line complexity\n setLink (linkInput, linkText, linkOptions, linkProtocols = RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS,\n defaultPrefix) {\n if (!linkInput) {\n // If link text is set to empty string,\n // remove any existing links.\n this.removeLink();\n return;\n }\n\n // Check if input matches any of the supported link formats\n const prefix = linkProtocols.find(prefixRegex => prefixRegex.test(linkInput));\n\n if (!prefix) {\n // If no matching pattern is found, prepend default prefix\n linkInput = `${defaultPrefix}${linkInput}`;\n }\n\n this.editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .run();\n\n const selection = this.editor?.view?.state?.selection;\n\n this.editor\n .chain()\n .focus()\n .insertContent(linkText)\n .setTextSelection({ from: selection.from, to: selection.from + linkText.length })\n .setLink({ href: linkInput, class: linkOptions.class })\n .run();\n },\n\n // eslint-disable-next-line complexity\n processValue (newValue, returnIfEqual = true) {\n const currentValue = this.getOutput();\n\n if (returnIfEqual && deepEqual(newValue, currentValue)) {\n // The new value came from this component and was passed back down\n // through the parent, so don't do anything here.\n return;\n }\n\n // If the text contains emoji characters convert them to emoji component tags\n if (typeof newValue === 'string' && this.outputFormat === 'text') {\n const inputUnicodeRegex = new RegExp(`(${emojiPattern})`, 'g');\n newValue = newValue?.replace(inputUnicodeRegex, '<emoji-component code=\"$1\"></emoji-component>');\n }\n\n // Otherwise replace the content (resets the cursor position).\n this.editor.commands.setContent(newValue, false);\n },\n\n destroyEditor () {\n this.editor.destroy();\n },\n\n triggerInputChangeEvents () {\n const value = this.getOutput();\n this.$emit('input', value);\n this.$emit('update:modelValue', value);\n\n // Always output JSON in a separate event\n const jsonValue = this.editor.getJSON();\n this.$emit('json-input', jsonValue);\n\n // Always output HTML in a separate event\n const htmlValue = this.editor.getHTML();\n this.$emit('html-input', htmlValue);\n\n // Always output HTML in a separate event\n const textValue = this.editor.getText({ blockSeparator: '\\n' });\n this.$emit('text-input', textValue);\n },\n\n /**\n * The Editor exposes event hooks that we have to map our emits into. See\n * https://tiptap.dev/api/events for all events.\n */\n addEditorListeners () {\n this.editor.on('create', () => {\n this.triggerInputChangeEvents();\n });\n // The content has changed.\n this.editor.on('update', () => {\n // When preventTyping is true and user wants to type, we revert to last value\n // If Backspace (keyCode = 8) is pressed, we allow updating the text\n if (this.preventTyping && this.editor.view?.input?.lastKeyCode !== 8) {\n this.editor.commands.setContent(this.value, false);\n return;\n }\n this.triggerInputChangeEvents();\n });\n\n this.editor.on('selectionUpdate', ({ editor }) => {\n this.$emit('selected', this.getSelectedLinkText(editor));\n });\n\n // The editor is focused.\n this.editor.on('focus', ({ event }) => {\n this.$emit('focus', event);\n });\n\n // The editor isn’t focused anymore.\n this.editor.on('blur', ({ event }) => {\n this.$emit('blur', event);\n });\n },\n\n getOutput () {\n switch (this.outputFormat) {\n case 'json':\n return this.editor.getJSON();\n case 'html':\n return this.editor.getHTML();\n case 'text':\n default:\n return this.editor.getText({ blockSeparator: '\\n' });\n }\n },\n\n getExtension (extension, options) {\n if (typeof options === 'boolean') {\n return extension;\n }\n return extension.configure?.(options);\n },\n\n updateEditorAttributes (attributes) {\n this.editor.setOptions({\n editorProps: {\n attributes: {\n ...this.inputAttrs,\n class: this.inputClass,\n ...attributes,\n },\n },\n });\n },\n\n focusEditor () {\n this.editor.commands.focus();\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_createBlock","_withCtx","_createElementVNode","_createVNode","_createTextVNode","_createCommentVNode","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,eAAe;AAAA,MACb,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaD,WAAW;AAAA,MACT,MAAM,CAAC,SAAS,QAAQ,MAAM;AAAA,MAC9B,SAAS;AAAA,MACT,UAAW,WAAW;AACpB,YAAI,OAAO,cAAc,UAAU;AACjC,iBAAO,iCAAiC,SAAS,SAAS;AAAA,QAC5D;AACA,eAAO;AAAA,MACR;AAAA,IACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;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A,gBACV,SAAO,SAAU;AAAA;gBApC9B,SAAAF,QAqCW,MAED;AAAA,kBAvCVG,gBAqCW,UAED;AAAA;gBAvCV,GAAA;AAAA;;YAAA,GAAA;AAAA;;;MAAA,GAAA;AAAA,yDAAAC,mBAAA,IAAA,IAAA;AAAA,IA2CIF,YAME,2BANFG,WAME;AAAA,MALA,KAAI;AAAA,MACH,QAAQ,MAAM;AAAA,MACf,OAAM;AAAA,MACN,WAAQ;AAAA,OACA,SAAK,KAAA,GAAA,MAAA,IAAA,CAAA,QAAA,CAAA;AAAA;;;"}
|
|
@@ -4,6 +4,7 @@ const root_layout_constants = require("./root_layout_constants.cjs");
|
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
6
6
|
const _sfc_main = {
|
|
7
|
+
compatConfig: { MODE: 3 },
|
|
7
8
|
name: "DtRootLayout",
|
|
8
9
|
props: {
|
|
9
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root_layout.vue.cjs","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n [`d-root-layout__responsive--${responsiveBreakpoint}`]: !!responsiveBreakpoint,\n },\n ]\"\n data-qa=\"dt-root-layout\"\n >\n <header\n :class=\"['d-root-layout__header', { 'd-root-layout__header--sticky': headerSticky }, headerClass]\"\n data-qa=\"dt-root-layout-header\"\n >\n <!-- @slot Slot for header content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"header\" />\n </header>\n <aside\n ref=\"root-layout-sidebar\"\n tabindex=\"0\"\n :class=\"['d-root-layout__sidebar', sidebarClass]\"\n data-qa=\"dt-root-layout-sidebar\"\n >\n <!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->\n <slot name=\"sidebar\" />\n </aside>\n <main\n ref=\"root-layout-content\"\n :class=\"['d-root-layout__content', contentClass]\"\n data-qa=\"dt-root-layout-content\"\n tabindex=\"0\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </main>\n <footer\n :class=\"['d-root-layout__footer', footerClass]\"\n data-qa=\"dt-root-layout-footer\"\n >\n <!-- @slot Slot for footer content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script>\nimport { ROOT_LAYOUT_SIDEBAR_POSITIONS, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS } from './root_layout_constants';\n\n/**\n * A root layout provides a standardized group of containers to display content at the root level.\n */\nexport default {\n name: 'DtRootLayout',\n\n props: {\n /**\n * When true, the header, footer and sidebar will be locked in position and the content will\n * be scrollable. When false the header, footer and sidebar will scroll out of view.\n * @values true, false\n */\n fixed: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the header element\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n headerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Scroll the header with the page\n * @values true, false\n */\n headerSticky: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the body\n */\n bodyClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content element\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the sidebar element\n */\n sidebarClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the width of the inner element instead.\n */\n sidebarWidth: {\n type: String,\n default: '256px',\n },\n\n /**\n * Whether the sidebar is on the left or right side\n * Possible options: 'left', 'right'\n * @values left, right\n */\n sidebarPosition: {\n type: String,\n default: 'left',\n validator: (s) => Object.values(ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(s),\n },\n\n /**\n * Additional class name for the footer element\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n footerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Defines the breakpoint when the root layout will change to responsive version\n * @values 'sm', 'md', 'lg', null\n */\n responsiveBreakpoint: {\n type: String,\n default: null,\n validator: (bp) => ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(bp),\n },\n },\n\n computed: {\n isInverted () {\n return this.sidebarPosition === ROOT_LAYOUT_SIDEBAR_POSITIONS.RIGHT;\n },\n },\n};\n</script>\n"],"names":["ROOT_LAYOUT_SIDEBAR_POSITIONS","ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot"],"mappings":";;;;;AAwDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,MAAM,OAAO,OAAOA,mDAA6B,EAAE,SAAS,CAAC;AAAA,IAC1E;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,OAAOC,yDAAmC,SAAS,EAAE;AAAA,IAClE;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,aAAc;AACZ,aAAO,KAAK,oBAAoBD,sBAA6B,8BAAC;AAAA,IAC/D;AAAA,EACF;AACH;;
|
|
1
|
+
{"version":3,"file":"root_layout.vue.cjs","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n [`d-root-layout__responsive--${responsiveBreakpoint}`]: !!responsiveBreakpoint,\n },\n ]\"\n data-qa=\"dt-root-layout\"\n >\n <header\n :class=\"['d-root-layout__header', { 'd-root-layout__header--sticky': headerSticky }, headerClass]\"\n data-qa=\"dt-root-layout-header\"\n >\n <!-- @slot Slot for header content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"header\" />\n </header>\n <aside\n ref=\"root-layout-sidebar\"\n tabindex=\"0\"\n :class=\"['d-root-layout__sidebar', sidebarClass]\"\n data-qa=\"dt-root-layout-sidebar\"\n >\n <!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->\n <slot name=\"sidebar\" />\n </aside>\n <main\n ref=\"root-layout-content\"\n :class=\"['d-root-layout__content', contentClass]\"\n data-qa=\"dt-root-layout-content\"\n tabindex=\"0\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </main>\n <footer\n :class=\"['d-root-layout__footer', footerClass]\"\n data-qa=\"dt-root-layout-footer\"\n >\n <!-- @slot Slot for footer content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script>\nimport { ROOT_LAYOUT_SIDEBAR_POSITIONS, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS } from './root_layout_constants';\n\n/**\n * A root layout provides a standardized group of containers to display content at the root level.\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRootLayout',\n\n props: {\n /**\n * When true, the header, footer and sidebar will be locked in position and the content will\n * be scrollable. When false the header, footer and sidebar will scroll out of view.\n * @values true, false\n */\n fixed: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the header element\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n headerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Scroll the header with the page\n * @values true, false\n */\n headerSticky: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the body\n */\n bodyClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content element\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the sidebar element\n */\n sidebarClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the width of the inner element instead.\n */\n sidebarWidth: {\n type: String,\n default: '256px',\n },\n\n /**\n * Whether the sidebar is on the left or right side\n * Possible options: 'left', 'right'\n * @values left, right\n */\n sidebarPosition: {\n type: String,\n default: 'left',\n validator: (s) => Object.values(ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(s),\n },\n\n /**\n * Additional class name for the footer element\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n footerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Defines the breakpoint when the root layout will change to responsive version\n * @values 'sm', 'md', 'lg', null\n */\n responsiveBreakpoint: {\n type: String,\n default: null,\n validator: (bp) => ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(bp),\n },\n },\n\n computed: {\n isInverted () {\n return this.sidebarPosition === ROOT_LAYOUT_SIDEBAR_POSITIONS.RIGHT;\n },\n },\n};\n</script>\n"],"names":["ROOT_LAYOUT_SIDEBAR_POSITIONS","ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS","_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot"],"mappings":";;;;;AAwDA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAA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AY,YAAA,CAAA;AAAA,MAC/C,WAAQ;AAAA;MAGRE,eAAuB,KAAA,QAAA,SAAA;AAAA;IAEzBD,IAAAA,mBAQO,QAAA;AAAA,MAPL,KAAI;AAAA,MACH,OAhCPD,IAAAA,0CAgCyC,OAAY,YAAA,CAAA;AAAA,MAC/C,WAAQ;AAAA,MACR,UAAS;AAAA;MAGTE,eAAQ,KAAA,QAAA,SAAA;AAAA;IAEVD,IAAAA,mBAOS,UAAA;AAAA,MANN,OAxCPD,IAAAA,yCAwCwC,OAAW,WAAA,CAAA;AAAA,MAC7C,WAAQ;AAAA;MAIRE,eAAsB,KAAA,QAAA,QAAA;AAAA;;;;;"}
|
|
@@ -2,6 +2,7 @@ import { ROOT_LAYOUT_SIDEBAR_POSITIONS, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS } fro
|
|
|
2
2
|
import { openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot } from "vue";
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const _sfc_main = {
|
|
5
|
+
compatConfig: { MODE: 3 },
|
|
5
6
|
name: "DtRootLayout",
|
|
6
7
|
props: {
|
|
7
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root_layout.vue.js","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n [`d-root-layout__responsive--${responsiveBreakpoint}`]: !!responsiveBreakpoint,\n },\n ]\"\n data-qa=\"dt-root-layout\"\n >\n <header\n :class=\"['d-root-layout__header', { 'd-root-layout__header--sticky': headerSticky }, headerClass]\"\n data-qa=\"dt-root-layout-header\"\n >\n <!-- @slot Slot for header content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"header\" />\n </header>\n <aside\n ref=\"root-layout-sidebar\"\n tabindex=\"0\"\n :class=\"['d-root-layout__sidebar', sidebarClass]\"\n data-qa=\"dt-root-layout-sidebar\"\n >\n <!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->\n <slot name=\"sidebar\" />\n </aside>\n <main\n ref=\"root-layout-content\"\n :class=\"['d-root-layout__content', contentClass]\"\n data-qa=\"dt-root-layout-content\"\n tabindex=\"0\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </main>\n <footer\n :class=\"['d-root-layout__footer', footerClass]\"\n data-qa=\"dt-root-layout-footer\"\n >\n <!-- @slot Slot for footer content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script>\nimport { ROOT_LAYOUT_SIDEBAR_POSITIONS, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS } from './root_layout_constants';\n\n/**\n * A root layout provides a standardized group of containers to display content at the root level.\n */\nexport default {\n name: 'DtRootLayout',\n\n props: {\n /**\n * When true, the header, footer and sidebar will be locked in position and the content will\n * be scrollable. When false the header, footer and sidebar will scroll out of view.\n * @values true, false\n */\n fixed: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the header element\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n headerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Scroll the header with the page\n * @values true, false\n */\n headerSticky: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the body\n */\n bodyClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content element\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the sidebar element\n */\n sidebarClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the width of the inner element instead.\n */\n sidebarWidth: {\n type: String,\n default: '256px',\n },\n\n /**\n * Whether the sidebar is on the left or right side\n * Possible options: 'left', 'right'\n * @values left, right\n */\n sidebarPosition: {\n type: String,\n default: 'left',\n validator: (s) => Object.values(ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(s),\n },\n\n /**\n * Additional class name for the footer element\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n footerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Defines the breakpoint when the root layout will change to responsive version\n * @values 'sm', 'md', 'lg', null\n */\n responsiveBreakpoint: {\n type: String,\n default: null,\n validator: (bp) => ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(bp),\n },\n },\n\n computed: {\n isInverted () {\n return this.sidebarPosition === ROOT_LAYOUT_SIDEBAR_POSITIONS.RIGHT;\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot"],"mappings":";;;AAwDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,MAAM,OAAO,OAAO,6BAA6B,EAAE,SAAS,CAAC;AAAA,IAC1E;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,sBAAsB;AAAA,MACpB,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,OAAO,mCAAmC,SAAS,EAAE;AAAA,IAClE;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,aAAc;AACZ,aAAO,KAAK,oBAAoB,8BAA8B;AAAA,IAC/D;AAAA,EACF;AACH;;
|
|
1
|
+
{"version":3,"file":"root_layout.vue.js","sources":["../../../components/root_layout/root_layout.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'root-layout',\n 'd-root-layout',\n {\n 'd-root-layout--fixed': fixed,\n 'd-root-layout--inverted': isInverted,\n [`d-root-layout__responsive--${responsiveBreakpoint}`]: !!responsiveBreakpoint,\n },\n ]\"\n data-qa=\"dt-root-layout\"\n >\n <header\n :class=\"['d-root-layout__header', { 'd-root-layout__header--sticky': headerSticky }, headerClass]\"\n data-qa=\"dt-root-layout-header\"\n >\n <!-- @slot Slot for header content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"header\" />\n </header>\n <aside\n ref=\"root-layout-sidebar\"\n tabindex=\"0\"\n :class=\"['d-root-layout__sidebar', sidebarClass]\"\n data-qa=\"dt-root-layout-sidebar\"\n >\n <!-- @slot Slot for sidebar content, be sure to set a width on the element within this. -->\n <slot name=\"sidebar\" />\n </aside>\n <main\n ref=\"root-layout-content\"\n :class=\"['d-root-layout__content', contentClass]\"\n data-qa=\"dt-root-layout-content\"\n tabindex=\"0\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </main>\n <footer\n :class=\"['d-root-layout__footer', footerClass]\"\n data-qa=\"dt-root-layout-footer\"\n >\n <!-- @slot Slot for footer content, be sure to set a height on the element inside this\n if you want a fixed height. -->\n <slot name=\"footer\" />\n </footer>\n </div>\n</template>\n\n<script>\nimport { ROOT_LAYOUT_SIDEBAR_POSITIONS, ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS } from './root_layout_constants';\n\n/**\n * A root layout provides a standardized group of containers to display content at the root level.\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRootLayout',\n\n props: {\n /**\n * When true, the header, footer and sidebar will be locked in position and the content will\n * be scrollable. When false the header, footer and sidebar will scroll out of view.\n * @values true, false\n */\n fixed: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the header element\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n headerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Scroll the header with the page\n * @values true, false\n */\n headerSticky: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the body\n */\n bodyClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content element\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the sidebar element\n */\n sidebarClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the width of the inner element instead.\n */\n sidebarWidth: {\n type: String,\n default: '256px',\n },\n\n /**\n * Whether the sidebar is on the left or right side\n * Possible options: 'left', 'right'\n * @values left, right\n */\n sidebarPosition: {\n type: String,\n default: 'left',\n validator: (s) => Object.values(ROOT_LAYOUT_SIDEBAR_POSITIONS).includes(s),\n },\n\n /**\n * Additional class name for the footer element\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * DEPRECATED: set the height of the inner element instead.\n */\n footerHeight: {\n type: String,\n default: '64px',\n },\n\n /**\n * Defines the breakpoint when the root layout will change to responsive version\n * @values 'sm', 'md', 'lg', null\n */\n responsiveBreakpoint: {\n type: String,\n default: null,\n validator: (bp) => ROOT_LAYOUT_RESPONSIVE_BREAKPOINTS.includes(bp),\n },\n },\n\n computed: {\n isInverted () {\n return this.sidebarPosition === ROOT_LAYOUT_SIDEBAR_POSITIONS.RIGHT;\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_createElementVNode","_renderSlot"],"mappings":";;;AAwDA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,WAAW;AAAA,MACT,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAA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A;IAEzBD,mBAQO,QAAA;AAAA,MAPL,KAAI;AAAA,MACH,OAhCPD,0CAgCyC,OAAY,YAAA,CAAA;AAAA,MAC/C,WAAQ;AAAA,MACR,UAAS;AAAA;MAGTE,WAAQ,KAAA,QAAA,SAAA;AAAA;IAEVD,mBAOS,UAAA;AAAA,MANN,OAxCPD,yCAwCwC,OAAW,WAAA,CAAA;AAAA,MAC7C,WAAQ;AAAA;MAIRE,WAAsB,KAAA,QAAA,QAAA;AAAA;;;;"}
|
|
@@ -9,6 +9,7 @@ const select_menu_validators = require("./select_menu_validators.cjs");
|
|
|
9
9
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
10
10
|
const validation_messages = require("../validation_messages/validation_messages.vue.cjs");
|
|
11
11
|
const _sfc_main = {
|
|
12
|
+
compatConfig: { MODE: 3 },
|
|
12
13
|
name: "DtSelectMenu",
|
|
13
14
|
components: { DtValidationMessages: validation_messages.default },
|
|
14
15
|
mixins: [input.MessagesMixin],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select_menu.vue.cjs","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div>\n <label>\n <div\n v-if=\"hasSlotContent($slots.label) || label\"\n :aria-details=\"labelAriaDetails\"\n :class=\"[\n 'd-label',\n LABEL_SIZE_MODIFIERS[size],\n labelClass,\n ]\"\n v-bind=\"labelChildProps\"\n data-qa=\"dt-select-label\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n :id=\"descriptionKey\"\n :class=\"[\n 'd-description',\n DESCRIPTION_SIZE_MODIFIERS[size],\n descriptionClass,\n ]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"dt-select-description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n :class=\"[\n 'd-select',\n SELECT_SIZE_MODIFIERS[size],\n selectClass,\n { 'd-select--disabled': disabled },\n ]\"\n data-qa=\"dt-select-wrapper\"\n >\n <select\n ref=\"selectElement\"\n :class=\"[\n 'd-select__input',\n SELECT_STATE_MODIFIERS[state],\n ]\"\n v-bind=\"$attrs\"\n data-qa=\"dt-select\"\n :disabled=\"disabled\"\n v-on=\"selectListeners\"\n >\n <!-- @slot Slot for select menu options, defaults to options prop -->\n <slot>\n <option\n v-for=\"option in options\"\n :key=\"getOptionKey(option.value)\"\n :value=\"option.value\"\n :class=\"optionClass\"\n v-bind=\"optionChildProps\"\n >\n {{ option.label }}\n </option>\n </slot>\n </select>\n </div>\n </label>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-select-messages\"\n />\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n} from '@/common/constants';\nimport {\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n} from './select_menu_constants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n} from '@/common/utils';\nimport { MessagesMixin } from '@/common/mixins/input';\nimport { optionsValidator } from './select_menu_validators.js';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * A select menu is an input control that allows users to choose one option from a list.\n * @property {Boolean} disabled attribute\n * @property {String} name attribute\n * @property {String} value attribute\n * @see https://dialtone.dialpad.com/components/select.html\n */\nexport default {\n name: 'DtSelectMenu',\n\n components: { DtValidationMessages },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Label for the select\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Description for the select\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Select Menu Options, overridden by default slot. Each option has the following structure:\n * `{ index: number (optional), value: number || string (required), label: string (required) }`\n * @param {Object[]} options - Optional - A list that can be used to create a list of select menu options\n * @param {number} options[].index - Optional - The index of the option\n * @param {number|string} options[].value - Required - The option value\n * @param {string} options[].label - Required - The option Label\n */\n options: {\n type: Array,\n default: () => [],\n validator: options => optionsValidator(options),\n },\n\n /**\n * Controls the size of the select\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(SELECT_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the select\n */\n selectClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize each option, should options be provided via prop\n */\n optionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into each option, should options be provided via prop\n */\n optionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Disabled state of the select\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native change event\n *\n * @event change\n * @type {String | Number}\n */\n 'change',\n ],\n\n data () {\n return {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n hasSlotContent,\n };\n },\n\n computed: {\n selectListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice (once on the select element and once by the\n * emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target.value, event),\n };\n },\n\n state () {\n return getValidationState(this.formattedMessages);\n },\n\n selectKey () {\n return getUniqueString();\n },\n\n descriptionKey () {\n return `select-${this.selectKey}-description`;\n },\n\n labelAriaDetails () {\n if (this.$slots.description || this.description) {\n return this.descriptionKey;\n }\n\n return this.$attrs['aria-details'];\n },\n },\n\n watch: {\n // whenever question changes, this function will run\n options () {\n this.$nextTick(() => {\n this.emitValue(this.$refs.selectElement.value, null);\n });\n },\n },\n\n mounted () {\n this.emitValue(this.$refs.selectElement.value, null);\n this.validateOptionsPresence();\n },\n\n beforeUpdate () {\n this.validateOptionsPresence();\n },\n\n methods: {\n emitValue (value, event) {\n this.$emit('input', value, event);\n this.$emit('change', value, event);\n },\n\n getOptionKey (value) {\n return `select-${this.selectKey}-option-${value}`;\n },\n\n validateOptionsPresence () {\n if (this.options?.length < 1 && !this.$slots.default) {\n warn('Options are expected to be provided via prop or slot', this);\n }\n },\n },\n};\n</script>\n"],"names":["DtValidationMessages","MessagesMixin","optionsValidator","SELECT_SIZE_MODIFIERS","LABEL_SIZE_MODIFIERS","DESCRIPTION_SIZE_MODIFIERS","SELECT_STATE_MODIFIERS","hasSlotContent","getValidationState","getUniqueString","warn","_createElementBlock","_createElementVNode","_openBlock","_mergeProps","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","_createVNode"],"mappings":";;;;;;;;;;AAsGA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAEA,sBAAAA,oBAAAA,QAAsB;AAAA,EAEpC,QAAQ,CAACC,MAAAA,aAAa;AAAA,EAEtB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,SAAS;AAAA,M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+BMN,IAAAA,mBAiCM,OAAA;AAAA,QAhCH,OAhCTO,IAAAA,eAAA;AAAA;UAgCkD,MAAA,sBAAsB,OAAI,IAAA;AAAA,UAAa,OAAW;AAAA,kCAAoC,OAAQ,SAAA;AAAA;QAMxI,WAAQ;AAAA;QAERP,IAAA,mBAuBS,UAvBTE,eAuBS;AAAA,UAtBP,KAAI;AAAA,UACH,OAAK;AAAA;YAA+C,MAAA,uBAAuB,SAAK,KAAA;AAAA;WAIzE,KAAM,QAAA;AAAA,UACd,WAAQ;AAAA,UACP,UAAU,OAAQ;AAAA,QACnB,GAAAM,IAAA,WAAsB,SAAD,iBAAA,IAAA,CAAA,GAAA;AAAA,UAGrBL,IAAAA,WAUO,4BAVP,MAUO;AAAA,aATLF,cAAA,IAAA,GAAAF,IAAAA,mBAQSU,IA7DrB,UAAA,MAAAC,IAAAA,WAsD+B,OAAO,SAtDtC,CAsDqB,WAAM;AADf,qBAAAT,cAAA,GAAAF,uBAQS,UARTG,IAAAA,WAQS;AAAA,gBANN,KAAK,SAAA,aAAa,OAAO,KAAK;AAAA,gBAC9B,OAAO,OAAO;AAAA,gBACd,OAAO,OAAW;AAAA,cACX,GAAA,OAAA,gBAAgB,GAErBG,IAAA,gBAAA,OAAO,KAAK,GA5D7B,IAAA,UAAA;AAAA;;QAAA,GAAA,IAAA,UAAA;AAAA;;IAkEIM,IAAA,YAME,mCANFT,eAME;AAAA,MALC,uBAAqB,KAAiB;AAAA,MACtC,iBAAe,KAAY;AAAA,MAC3B,OAAO,KAAa;AAAA,OACb,KAAkB,oBAAA,EAC1B,WAAQ,qBAAoB,CAAA,GAAA,MAAA,IAAA,CAAA,uBAAA,iBAAA,OAAA,CAAA;AAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"select_menu.vue.cjs","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div>\n <label>\n <div\n v-if=\"hasSlotContent($slots.label) || label\"\n :aria-details=\"labelAriaDetails\"\n :class=\"[\n 'd-label',\n LABEL_SIZE_MODIFIERS[size],\n labelClass,\n ]\"\n v-bind=\"labelChildProps\"\n data-qa=\"dt-select-label\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n :id=\"descriptionKey\"\n :class=\"[\n 'd-description',\n DESCRIPTION_SIZE_MODIFIERS[size],\n descriptionClass,\n ]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"dt-select-description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n :class=\"[\n 'd-select',\n SELECT_SIZE_MODIFIERS[size],\n selectClass,\n { 'd-select--disabled': disabled },\n ]\"\n data-qa=\"dt-select-wrapper\"\n >\n <select\n ref=\"selectElement\"\n :class=\"[\n 'd-select__input',\n SELECT_STATE_MODIFIERS[state],\n ]\"\n v-bind=\"$attrs\"\n data-qa=\"dt-select\"\n :disabled=\"disabled\"\n v-on=\"selectListeners\"\n >\n <!-- @slot Slot for select menu options, defaults to options prop -->\n <slot>\n <option\n v-for=\"option in options\"\n :key=\"getOptionKey(option.value)\"\n :value=\"option.value\"\n :class=\"optionClass\"\n v-bind=\"optionChildProps\"\n >\n {{ option.label }}\n </option>\n </slot>\n </select>\n </div>\n </label>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-select-messages\"\n />\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n} from '@/common/constants';\nimport {\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n} from './select_menu_constants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n} from '@/common/utils';\nimport { MessagesMixin } from '@/common/mixins/input';\nimport { optionsValidator } from './select_menu_validators.js';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * A select menu is an input control that allows users to choose one option from a list.\n * @property {Boolean} disabled attribute\n * @property {String} name attribute\n * @property {String} value attribute\n * @see https://dialtone.dialpad.com/components/select.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSelectMenu',\n\n components: { DtValidationMessages },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Label for the select\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Description for the select\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Select Menu Options, overridden by default slot. Each option has the following structure:\n * `{ index: number (optional), value: number || string (required), label: string (required) }`\n * @param {Object[]} options - Optional - A list that can be used to create a list of select menu options\n * @param {number} options[].index - Optional - The index of the option\n * @param {number|string} options[].value - Required - The option value\n * @param {string} options[].label - Required - The option Label\n */\n options: {\n type: Array,\n default: () => [],\n validator: options => optionsValidator(options),\n },\n\n /**\n * Controls the size of the select\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(SELECT_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the select\n */\n selectClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize each option, should options be provided via prop\n */\n optionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into each option, should options be provided via prop\n */\n optionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Disabled state of the select\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native change event\n *\n * @event change\n * @type {String | Number}\n */\n 'change',\n ],\n\n data () {\n return {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n hasSlotContent,\n };\n },\n\n computed: {\n selectListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice (once on the select element and once by the\n * emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target.value, event),\n };\n },\n\n state () {\n return getValidationState(this.formattedMessages);\n },\n\n selectKey () {\n return getUniqueString();\n },\n\n descriptionKey () {\n return `select-${this.selectKey}-description`;\n },\n\n labelAriaDetails () {\n if (this.$slots.description || this.description) {\n return this.descriptionKey;\n }\n\n return this.$attrs['aria-details'];\n },\n },\n\n watch: {\n // whenever question changes, this function will run\n options () {\n this.$nextTick(() => {\n this.emitValue(this.$refs.selectElement.value, null);\n });\n },\n },\n\n mounted () {\n this.emitValue(this.$refs.selectElement.value, null);\n this.validateOptionsPresence();\n },\n\n beforeUpdate () {\n this.validateOptionsPresence();\n },\n\n methods: {\n emitValue (value, event) {\n this.$emit('input', value, event);\n this.$emit('change', value, event);\n },\n\n getOptionKey (value) {\n return `select-${this.selectKey}-option-${value}`;\n },\n\n validateOptionsPresence () {\n if (this.options?.length < 1 && !this.$slots.default) {\n warn('Options are expected to be provided via prop or slot', this);\n }\n },\n },\n};\n</script>\n"],"names":["DtValidationMessages","MessagesMixin","optionsValidator","SELECT_SIZE_MODIFIERS","LABEL_SIZE_MODIFIERS","DESCRIPTION_SIZE_MODIFIERS","SELECT_STATE_MODIFIERS","hasSlotContent","getValidationState","getUniqueString","warn","_createElementBlock","_createElementVNode","_openBlock","_mergeProps","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers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AAA,gBAAA,OAAO,KAAK,GA5D7B,IAAA,UAAA;AAAA;;QAAA,GAAA,IAAA,UAAA;AAAA;;IAkEIM,IAAA,YAME,mCANFT,eAME;AAAA,MALC,uBAAqB,KAAiB;AAAA,MACtC,iBAAe,KAAY;AAAA,MAC3B,OAAO,KAAa;AAAA,OACb,KAAkB,oBAAA,EAC1B,WAAQ,qBAAoB,CAAA,GAAA,MAAA,IAAA,CAAA,uBAAA,iBAAA,OAAA,CAAA;AAAA;;;;"}
|
|
@@ -7,6 +7,7 @@ import { optionsValidator } from "./select_menu_validators.js";
|
|
|
7
7
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
8
8
|
import DtValidationMessages from "../validation_messages/validation_messages.vue.js";
|
|
9
9
|
const _sfc_main = {
|
|
10
|
+
compatConfig: { MODE: 3 },
|
|
10
11
|
name: "DtSelectMenu",
|
|
11
12
|
components: { DtValidationMessages },
|
|
12
13
|
mixins: [MessagesMixin],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select_menu.vue.js","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div>\n <label>\n <div\n v-if=\"hasSlotContent($slots.label) || label\"\n :aria-details=\"labelAriaDetails\"\n :class=\"[\n 'd-label',\n LABEL_SIZE_MODIFIERS[size],\n labelClass,\n ]\"\n v-bind=\"labelChildProps\"\n data-qa=\"dt-select-label\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n :id=\"descriptionKey\"\n :class=\"[\n 'd-description',\n DESCRIPTION_SIZE_MODIFIERS[size],\n descriptionClass,\n ]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"dt-select-description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n :class=\"[\n 'd-select',\n SELECT_SIZE_MODIFIERS[size],\n selectClass,\n { 'd-select--disabled': disabled },\n ]\"\n data-qa=\"dt-select-wrapper\"\n >\n <select\n ref=\"selectElement\"\n :class=\"[\n 'd-select__input',\n SELECT_STATE_MODIFIERS[state],\n ]\"\n v-bind=\"$attrs\"\n data-qa=\"dt-select\"\n :disabled=\"disabled\"\n v-on=\"selectListeners\"\n >\n <!-- @slot Slot for select menu options, defaults to options prop -->\n <slot>\n <option\n v-for=\"option in options\"\n :key=\"getOptionKey(option.value)\"\n :value=\"option.value\"\n :class=\"optionClass\"\n v-bind=\"optionChildProps\"\n >\n {{ option.label }}\n </option>\n </slot>\n </select>\n </div>\n </label>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-select-messages\"\n />\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n} from '@/common/constants';\nimport {\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n} from './select_menu_constants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n} from '@/common/utils';\nimport { MessagesMixin } from '@/common/mixins/input';\nimport { optionsValidator } from './select_menu_validators.js';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * A select menu is an input control that allows users to choose one option from a list.\n * @property {Boolean} disabled attribute\n * @property {String} name attribute\n * @property {String} value attribute\n * @see https://dialtone.dialpad.com/components/select.html\n */\nexport default {\n name: 'DtSelectMenu',\n\n components: { DtValidationMessages },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Label for the select\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Description for the select\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Select Menu Options, overridden by default slot. Each option has the following structure:\n * `{ index: number (optional), value: number || string (required), label: string (required) }`\n * @param {Object[]} options - Optional - A list that can be used to create a list of select menu options\n * @param {number} options[].index - Optional - The index of the option\n * @param {number|string} options[].value - Required - The option value\n * @param {string} options[].label - Required - The option Label\n */\n options: {\n type: Array,\n default: () => [],\n validator: options => optionsValidator(options),\n },\n\n /**\n * Controls the size of the select\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(SELECT_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the select\n */\n selectClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize each option, should options be provided via prop\n */\n optionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into each option, should options be provided via prop\n */\n optionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Disabled state of the select\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native change event\n *\n * @event change\n * @type {String | Number}\n */\n 'change',\n ],\n\n data () {\n return {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n hasSlotContent,\n };\n },\n\n computed: {\n selectListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice (once on the select element and once by the\n * emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target.value, event),\n };\n },\n\n state () {\n return getValidationState(this.formattedMessages);\n },\n\n selectKey () {\n return getUniqueString();\n },\n\n descriptionKey () {\n return `select-${this.selectKey}-description`;\n },\n\n labelAriaDetails () {\n if (this.$slots.description || this.description) {\n return this.descriptionKey;\n }\n\n return this.$attrs['aria-details'];\n },\n },\n\n watch: {\n // whenever question changes, this function will run\n options () {\n this.$nextTick(() => {\n this.emitValue(this.$refs.selectElement.value, null);\n });\n },\n },\n\n mounted () {\n this.emitValue(this.$refs.selectElement.value, null);\n this.validateOptionsPresence();\n },\n\n beforeUpdate () {\n this.validateOptionsPresence();\n },\n\n methods: {\n emitValue (value, event) {\n this.$emit('input', value, event);\n this.$emit('change', value, event);\n },\n\n getOptionKey (value) {\n return `select-${this.selectKey}-option-${value}`;\n },\n\n validateOptionsPresence () {\n if (this.options?.length < 1 && !this.$slots.default) {\n warn('Options are expected to be provided via prop or slot', this);\n }\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_createElementVNode","_openBlock","_mergeProps","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","_createVNode"],"mappings":";;;;;;;;AAsGA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY,EAAE,qBAAsB;AAAA,EAEpC,QAAQ,CAAC,aAAa;AAAA,EAEtB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,aAAW,iBAAiB,OAAO;AAAA,IAC/C;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,MAAM,OAAO,K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,UAGrBL,WAUO,4BAVP,MAUO;AAAA,aATLF,UAAA,IAAA,GAAAF,mBAQSU,UA7DrB,MAAAC,WAsD+B,OAAO,SAtDtC,CAsDqB,WAAM;AADf,qBAAAT,UAAA,GAAAF,mBAQS,UARTG,WAQS;AAAA,gBANN,KAAK,SAAA,aAAa,OAAO,KAAK;AAAA,gBAC9B,OAAO,OAAO;AAAA,gBACd,OAAO,OAAW;AAAA,cACX,GAAA,OAAA,gBAAgB,GAErBG,gBAAA,OAAO,KAAK,GA5D7B,IAAA,UAAA;AAAA;;QAAA,GAAA,IAAA,UAAA;AAAA;;IAkEIM,YAME,mCANFT,WAME;AAAA,MALC,uBAAqB,KAAiB;AAAA,MACtC,iBAAe,KAAY;AAAA,MAC3B,OAAO,KAAa;AAAA,OACb,KAAkB,oBAAA,EAC1B,WAAQ,qBAAoB,CAAA,GAAA,MAAA,IAAA,CAAA,uBAAA,iBAAA,OAAA,CAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"select_menu.vue.js","sources":["../../../components/select_menu/select_menu.vue"],"sourcesContent":["<template>\n <div>\n <label>\n <div\n v-if=\"hasSlotContent($slots.label) || label\"\n :aria-details=\"labelAriaDetails\"\n :class=\"[\n 'd-label',\n LABEL_SIZE_MODIFIERS[size],\n labelClass,\n ]\"\n v-bind=\"labelChildProps\"\n data-qa=\"dt-select-label\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">{{ label }}</slot>\n </div>\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n :id=\"descriptionKey\"\n :class=\"[\n 'd-description',\n DESCRIPTION_SIZE_MODIFIERS[size],\n descriptionClass,\n ]\"\n v-bind=\"descriptionChildProps\"\n data-qa=\"dt-select-description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n :class=\"[\n 'd-select',\n SELECT_SIZE_MODIFIERS[size],\n selectClass,\n { 'd-select--disabled': disabled },\n ]\"\n data-qa=\"dt-select-wrapper\"\n >\n <select\n ref=\"selectElement\"\n :class=\"[\n 'd-select__input',\n SELECT_STATE_MODIFIERS[state],\n ]\"\n v-bind=\"$attrs\"\n data-qa=\"dt-select\"\n :disabled=\"disabled\"\n v-on=\"selectListeners\"\n >\n <!-- @slot Slot for select menu options, defaults to options prop -->\n <slot>\n <option\n v-for=\"option in options\"\n :key=\"getOptionKey(option.value)\"\n :value=\"option.value\"\n :class=\"optionClass\"\n v-bind=\"optionChildProps\"\n >\n {{ option.label }}\n </option>\n </slot>\n </select>\n </div>\n </label>\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-select-messages\"\n />\n </div>\n</template>\n\n<script>\nimport { warn } from 'vue';\nimport {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n} from '@/common/constants';\nimport {\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n} from './select_menu_constants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n} from '@/common/utils';\nimport { MessagesMixin } from '@/common/mixins/input';\nimport { optionsValidator } from './select_menu_validators.js';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * A select menu is an input control that allows users to choose one option from a list.\n * @property {Boolean} disabled attribute\n * @property {String} name attribute\n * @property {String} value attribute\n * @see https://dialtone.dialpad.com/components/select.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSelectMenu',\n\n components: { DtValidationMessages },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Label for the select\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Description for the select\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Select Menu Options, overridden by default slot. Each option has the following structure:\n * `{ index: number (optional), value: number || string (required), label: string (required) }`\n * @param {Object[]} options - Optional - A list that can be used to create a list of select menu options\n * @param {number} options[].index - Optional - The index of the option\n * @param {number|string} options[].value - Required - The option value\n * @param {string} options[].label - Required - The option Label\n */\n options: {\n type: Array,\n default: () => [],\n validator: options => optionsValidator(options),\n },\n\n /**\n * Controls the size of the select\n * @values xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(SELECT_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the select\n */\n selectClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize each option, should options be provided via prop\n */\n optionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into the description container\n */\n descriptionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * A set of props that are passed into each option, should options be provided via prop\n */\n optionChildProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Disabled state of the select\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String | Number}\n */\n 'input',\n\n /**\n * Native change event\n *\n * @event change\n * @type {String | Number}\n */\n 'change',\n ],\n\n data () {\n return {\n LABEL_SIZE_MODIFIERS,\n DESCRIPTION_SIZE_MODIFIERS,\n SELECT_SIZE_MODIFIERS,\n SELECT_STATE_MODIFIERS,\n hasSlotContent,\n };\n },\n\n computed: {\n selectListeners () {\n return {\n /*\n * Override input listener to as no-op. Prevents parent input listeners from being passed through onto the input\n * element which will result in the handler being called twice (once on the select element and once by the\n * emitted input event by the change listener).\n */\n input: () => {},\n change: event => this.emitValue(event.target.value, event),\n };\n },\n\n state () {\n return getValidationState(this.formattedMessages);\n },\n\n selectKey () {\n return getUniqueString();\n },\n\n descriptionKey () {\n return `select-${this.selectKey}-description`;\n },\n\n labelAriaDetails () {\n if (this.$slots.description || this.description) {\n return this.descriptionKey;\n }\n\n return this.$attrs['aria-details'];\n },\n },\n\n watch: {\n // whenever question changes, this function will run\n options () {\n this.$nextTick(() => {\n this.emitValue(this.$refs.selectElement.value, null);\n });\n },\n },\n\n mounted () {\n this.emitValue(this.$refs.selectElement.value, null);\n this.validateOptionsPresence();\n },\n\n beforeUpdate () {\n this.validateOptionsPresence();\n },\n\n methods: {\n emitValue (value, event) {\n this.$emit('input', value, event);\n this.$emit('change', value, event);\n },\n\n getOptionKey (value) {\n return `select-${this.selectKey}-option-${value}`;\n },\n\n validateOptionsPresence () {\n if (this.options?.length < 1 && !this.$slots.default) {\n warn('Options are expected to be provided via prop or slot', this);\n }\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_createElementVNode","_openBlock","_mergeProps","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_normalizeClass","_toHandlers","_Fragment","_renderList","_createVNode"],"mappings":";;;;;;;;AAsGA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY,EAAE,qBAAsB;AAAA,EAEpC,QAAQ,CAAC,aAAa;AAAA,EAEtB,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS,MAAM,CAAE;AAAA,MACjB,WAAW,aAAW,iBAAiB,OAAO;AAAA,IAC/C;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,M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BAAA,IAAA,CAAA,GAAA;AAAA,UAGrBL,WAUO,4BAVP,MAUO;AAAA,aATLF,UAAA,IAAA,GAAAF,mBAQSU,UA7DrB,MAAAC,WAsD+B,OAAO,SAtDtC,CAsDqB,WAAM;AADf,qBAAAT,UAAA,GAAAF,mBAQS,UARTG,WAQS;AAAA,gBANN,KAAK,SAAA,aAAa,OAAO,KAAK;AAAA,gBAC9B,OAAO,OAAO;AAAA,gBACd,OAAO,OAAW;AAAA,cACX,GAAA,OAAA,gBAAgB,GAErBG,gBAAA,OAAO,KAAK,GA5D7B,IAAA,UAAA;AAAA;;QAAA,GAAA,IAAA,UAAA;AAAA;;IAkEIM,YAME,mCANFT,WAME;AAAA,MALC,uBAAqB,KAAiB;AAAA,MACtC,iBAAe,KAAY;AAAA,MAC3B,OAAO,KAAa;AAAA,OACb,KAAkB,oBAAA,EAC1B,WAAQ,qBAAoB,CAAA,GAAA,MAAA,IAAA,CAAA,uBAAA,iBAAA,OAAA,CAAA;AAAA;;;"}
|
|
@@ -6,6 +6,7 @@ const skeletonParagraph = require("./skeleton-paragraph.vue.cjs");
|
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
8
8
|
const _sfc_main = {
|
|
9
|
+
compatConfig: { MODE: 3 },
|
|
9
10
|
name: "DtSkeletonListItem",
|
|
10
11
|
components: {
|
|
11
12
|
DtSkeletonShape: skeletonShape.default,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-list-item.vue.cjs","sources":["../../../components/skeleton/skeleton-list-item.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"skeleton-list-item\"\n :class=\"[\n 'd-skeleton-list-item',\n {\n 'd-skeleton-list-item--single': paragraphs.rows === 1,\n },\n contentClass,\n ]\"\n >\n <dt-skeleton-shape\n class=\"d-skeleton-list-item__shape\"\n :size=\"shapeSize\"\n :shape=\"shape\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n :content-class=\"shapeClass\"\n />\n <div class=\"d-skeleton-list-item__paragraph-container\">\n <dt-skeleton-paragraph\n v-bind=\"paragraphs\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { SKELETON_SHAPES } from './skeleton_constants';\nimport DtSkeletonShape from './skeleton-shape.vue';\nimport DtSkeletonParagraph from './skeleton-paragraph.vue';\n\nexport default {\n name: 'DtSkeletonListItem',\n\n components: {\n DtSkeletonShape,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Defines the shape of the skeleton, accepts circle or square.\n * @values circle, square\n */\n shape: {\n type: String,\n default: 'circle',\n validator: shape => Object.keys(SKELETON_SHAPES).includes(shape),\n },\n\n /**\n * Size of the shape\n * @values xs, sm, md, lg, xl\n */\n shapeSize: {\n type: String,\n default: 'md',\n },\n\n /**\n * Object containing quantity of paragraphs to display\n * and a randomWidth boolean.\n */\n paragraphs: {\n type: Object,\n default: () => ({ rows: 3, randomWidth: true }),\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Additional class name for the shape.\n */\n shapeClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n },\n};\n</script>\n"],"names":["DtSkeletonShape","DtSkeletonParagraph","SKELETON_SHAPES","_createElementBlock","_normalizeClass","_createVNode","_createElementVNode","_mergeProps"],"mappings":";;;;;;;AAoCA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,iBAAAA,cAAe;AAAA,IACf,qBAAAC,kBAAmB;AAAA,EACpB;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,WAAS,OAAO,KAAKC,mBAAAA,eAAe,EAAE,SAAS,KAAK;AAAA,IAChE;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS,OAAO,EAAE,MAAM,GAAG,aAAa,KAAG;AAAA,IAC5C;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AACH;
|
|
1
|
+
{"version":3,"file":"skeleton-list-item.vue.cjs","sources":["../../../components/skeleton/skeleton-list-item.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"skeleton-list-item\"\n :class=\"[\n 'd-skeleton-list-item',\n {\n 'd-skeleton-list-item--single': paragraphs.rows === 1,\n },\n contentClass,\n ]\"\n >\n <dt-skeleton-shape\n class=\"d-skeleton-list-item__shape\"\n :size=\"shapeSize\"\n :shape=\"shape\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n :content-class=\"shapeClass\"\n />\n <div class=\"d-skeleton-list-item__paragraph-container\">\n <dt-skeleton-paragraph\n v-bind=\"paragraphs\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { SKELETON_SHAPES } from './skeleton_constants';\nimport DtSkeletonShape from './skeleton-shape.vue';\nimport DtSkeletonParagraph from './skeleton-paragraph.vue';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSkeletonListItem',\n\n components: {\n DtSkeletonShape,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Defines the shape of the skeleton, accepts circle or square.\n * @values circle, square\n */\n shape: {\n type: String,\n default: 'circle',\n validator: shape => Object.keys(SKELETON_SHAPES).includes(shape),\n },\n\n /**\n * Size of the shape\n * @values xs, sm, md, lg, xl\n */\n shapeSize: {\n type: String,\n default: 'md',\n },\n\n /**\n * Object containing quantity of paragraphs to display\n * and a randomWidth boolean.\n */\n paragraphs: {\n type: Object,\n default: () => ({ rows: 3, randomWidth: true }),\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Additional class name for the shape.\n */\n shapeClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n },\n};\n</script>\n"],"names":["DtSkeletonShape","DtSkeletonParagraph","SKELETON_SHAPES","_createElementBlock","_normalizeClass","_createVNode","_createElementVNode","_mergeProps"],"mappings":";;;;;;;AAoCA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,iBAAAA,cAAe;AAAA,IACf,qBAAAC,kBAAmB;AAAA,EACpB;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,WAAS,OAAO,KAAKC,mBAAAA,eAAe,EAAE,SAAS,KAAK;AAAA,IAChE;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS,OAAO,EAAE,MAAM,GAAG,aAAa,KAAG;AAAA,IAC5C;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AACH;AApGS,MAAA,aAAA,EAAA,OAAM,4CAA2C;;;;0BAnBxDC,IA2BM,mBAAA,OAAA;AAAA,IA1BJ,WAAQ;AAAA,IACP,OAHLC,IAAAA,eAAA;AAAA;;QAG4F,gCAAA,OAAA,WAAW,SAAI;AAAA;MAAuB,OAAY;AAAA;;IAQ1IC,IAAAA,YAQE,8BAAA;AAAA,MAPA,OAAM;AAAA,MACL,MAAM,OAAS;AAAA,MACf,OAAO,OAAK;AAAA,MACZ,sBAAoB,OAAiB;AAAA,MACrC,SAAS,OAAO;AAAA,MAChB,QAAQ,OAAM;AAAA,MACd,iBAAe,OAAU;AAAA;IAE5BC,IAAA,mBAOM,OAPN,YAOM;AAAA,MANJD,IAAAA,YAKE,kCALFE,eACU,OAAU,YAAA;AAAA,QACjB,sBAAoB,OAAiB;AAAA,QACrC,SAAS,OAAO;AAAA,QAChB,QAAQ,OAAM;AAAA;;;;;;"}
|
|
@@ -4,6 +4,7 @@ import DtSkeletonParagraph from "./skeleton-paragraph.vue.js";
|
|
|
4
4
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createVNode, createElementVNode, mergeProps } from "vue";
|
|
5
5
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
6
6
|
const _sfc_main = {
|
|
7
|
+
compatConfig: { MODE: 3 },
|
|
7
8
|
name: "DtSkeletonListItem",
|
|
8
9
|
components: {
|
|
9
10
|
DtSkeletonShape,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-list-item.vue.js","sources":["../../../components/skeleton/skeleton-list-item.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"skeleton-list-item\"\n :class=\"[\n 'd-skeleton-list-item',\n {\n 'd-skeleton-list-item--single': paragraphs.rows === 1,\n },\n contentClass,\n ]\"\n >\n <dt-skeleton-shape\n class=\"d-skeleton-list-item__shape\"\n :size=\"shapeSize\"\n :shape=\"shape\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n :content-class=\"shapeClass\"\n />\n <div class=\"d-skeleton-list-item__paragraph-container\">\n <dt-skeleton-paragraph\n v-bind=\"paragraphs\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { SKELETON_SHAPES } from './skeleton_constants';\nimport DtSkeletonShape from './skeleton-shape.vue';\nimport DtSkeletonParagraph from './skeleton-paragraph.vue';\n\nexport default {\n name: 'DtSkeletonListItem',\n\n components: {\n DtSkeletonShape,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Defines the shape of the skeleton, accepts circle or square.\n * @values circle, square\n */\n shape: {\n type: String,\n default: 'circle',\n validator: shape => Object.keys(SKELETON_SHAPES).includes(shape),\n },\n\n /**\n * Size of the shape\n * @values xs, sm, md, lg, xl\n */\n shapeSize: {\n type: String,\n default: 'md',\n },\n\n /**\n * Object containing quantity of paragraphs to display\n * and a randomWidth boolean.\n */\n paragraphs: {\n type: Object,\n default: () => ({ rows: 3, randomWidth: true }),\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Additional class name for the shape.\n */\n shapeClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_createVNode","_createElementVNode","_mergeProps"],"mappings":";;;;;AAoCA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,WAAS,OAAO,KAAK,eAAe,EAAE,SAAS,KAAK;AAAA,IAChE;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS,OAAO,EAAE,MAAM,GAAG,aAAa,KAAG;AAAA,IAC5C;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AACH;
|
|
1
|
+
{"version":3,"file":"skeleton-list-item.vue.js","sources":["../../../components/skeleton/skeleton-list-item.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"skeleton-list-item\"\n :class=\"[\n 'd-skeleton-list-item',\n {\n 'd-skeleton-list-item--single': paragraphs.rows === 1,\n },\n contentClass,\n ]\"\n >\n <dt-skeleton-shape\n class=\"d-skeleton-list-item__shape\"\n :size=\"shapeSize\"\n :shape=\"shape\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n :content-class=\"shapeClass\"\n />\n <div class=\"d-skeleton-list-item__paragraph-container\">\n <dt-skeleton-paragraph\n v-bind=\"paragraphs\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { SKELETON_SHAPES } from './skeleton_constants';\nimport DtSkeletonShape from './skeleton-shape.vue';\nimport DtSkeletonParagraph from './skeleton-paragraph.vue';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSkeletonListItem',\n\n components: {\n DtSkeletonShape,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Defines the shape of the skeleton, accepts circle or square.\n * @values circle, square\n */\n shape: {\n type: String,\n default: 'circle',\n validator: shape => Object.keys(SKELETON_SHAPES).includes(shape),\n },\n\n /**\n * Size of the shape\n * @values xs, sm, md, lg, xl\n */\n shapeSize: {\n type: String,\n default: 'md',\n },\n\n /**\n * Object containing quantity of paragraphs to display\n * and a randomWidth boolean.\n */\n paragraphs: {\n type: Object,\n default: () => ({ rows: 3, randomWidth: true }),\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Additional class name for the shape.\n */\n shapeClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_createVNode","_createElementVNode","_mergeProps"],"mappings":";;;;;AAoCA,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,OAAO;AAAA,MACL,MAAM;AAAA,MACN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,SAAS,OAAO;AAAA,QAChB,QAAQ,OAAM;AAAA;;;;;"}
|
|
@@ -5,6 +5,7 @@ const vue = require("vue");
|
|
|
5
5
|
const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
|
|
6
6
|
const validator = (number) => number !== "" && !Number.isNaN(Number(number));
|
|
7
7
|
const _sfc_main = {
|
|
8
|
+
compatConfig: { MODE: 3 },
|
|
8
9
|
name: "DtSkeletonParagraph",
|
|
9
10
|
components: {
|
|
10
11
|
DtSkeletonText: skeletonText.default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-paragraph.vue.cjs","sources":["../../../components/skeleton/skeleton-paragraph.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-skeleton-paragraph',\n contentClass,\n ]\"\n contentClass\n data-qa=\"skeleton-paragraph\"\n >\n <dt-skeleton-text\n v-for=\"row in integerRows\"\n :key=\"row\"\n data-qa=\"skeleton-paragraph-row\"\n :content-class=\"rowClass\"\n :animate=\"animate\"\n :offset=\"offset\"\n :animation-duration=\"animationDuration\"\n :width=\"getSizeParagraphRow(row)\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonText from './skeleton-text.vue';\n\nconst validator = number => number !== '' && !Number.isNaN(Number(number));\nexport default {\n name: 'DtSkeletonParagraph',\n components: {\n DtSkeletonText,\n },\n\n props: {\n /**\n * Quantity of rows to display\n */\n rows: {\n type: [Number, String],\n default: 3,\n validator,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls the min width of paragraphs\n */\n minWidth: {\n type: [Number, String],\n default: 30,\n validator,\n },\n\n /**\n * Controls the max width of paragraphs\n */\n maxWidth: {\n type: [Number, String],\n default: 100,\n validator,\n },\n\n /**\n * Controls the width of paragraphs\n */\n width: {\n type: [String, Array],\n default: null,\n },\n\n /**\n * If true, row widths will be random\n * @values true, false\n */\n randomWidth: {\n type: Boolean,\n default: false,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the row.\n */\n rowClass: {\n type: String,\n default: '',\n },\n },\n\n computed: {\n integerRows () {\n return Number(this.rows);\n },\n },\n\n methods: {\n randomWidthPercentage () {\n const min = Math.min(this.minWidth, this.maxWidth);\n const max = Math.max(this.minWidth, this.maxWidth);\n return `${Math.round(Math.random() * (max - min)) + min}%`;\n },\n\n getSizeParagraphRow (row) {\n const paragraphWidth = this.width;\n const isArrayWidth = Array.isArray(paragraphWidth);\n const currentWidth = paragraphWidth?.[row - 1];\n const isLastRow = row === this.rows;\n\n if (this.randomWidth) {\n return this.randomWidthPercentage();\n }\n\n if (paragraphWidth && !isArrayWidth) {\n return paragraphWidth;\n }\n\n if (paragraphWidth && isArrayWidth && currentWidth) {\n return currentWidth;\n }\n\n return isLastRow ? '38%' : '100%';\n },\n },\n};\n</script>\n"],"names":["DtSkeletonText","_createElementBlock","_normalizeClass","_openBlock","_Fragment","_renderList","_createBlock"],"mappings":";;;;;AAyBA,MAAM,YAAY,YAAU,WAAW,MAAM,CAAC,OAAO,MAAM,OAAO,MAAM,CAAC;AACzE,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,gBAAAA,aAAc;AAAA,EACf;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM;AAAA,MACJ,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AAAA,IACD;AAAA;AA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B,YAAM,eAAe,MAAM,QAAQ,cAAc;AACjD,YAAM,eAAe,iDAAiB,MAAM;AAC5C,YAAM,YAAY,QAAQ,KAAK;AAE/B,UAAI,KAAK,aAAa;AACpB,eAAO,KAAK;MACd;AAEA,UAAI,kBAAkB,CAAC,cAAc;AACnC,eAAO;AAAA,MACT;AAEA,UAAI,kBAAkB,gBAAgB,cAAc;AAClD,eAAO;AAAA,MACT;AAEA,aAAO,YAAY,QAAQ;AAAA,IAC5B;AAAA,EACF;AACH;;;
|
|
1
|
+
{"version":3,"file":"skeleton-paragraph.vue.cjs","sources":["../../../components/skeleton/skeleton-paragraph.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-skeleton-paragraph',\n contentClass,\n ]\"\n contentClass\n data-qa=\"skeleton-paragraph\"\n >\n <dt-skeleton-text\n v-for=\"row in integerRows\"\n :key=\"row\"\n data-qa=\"skeleton-paragraph-row\"\n :content-class=\"rowClass\"\n :animate=\"animate\"\n :offset=\"offset\"\n :animation-duration=\"animationDuration\"\n :width=\"getSizeParagraphRow(row)\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonText from './skeleton-text.vue';\n\nconst validator = number => number !== '' && !Number.isNaN(Number(number));\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSkeletonParagraph',\n components: {\n DtSkeletonText,\n },\n\n props: {\n /**\n * Quantity of rows to display\n */\n rows: {\n type: [Number, String],\n default: 3,\n validator,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls the min width of paragraphs\n */\n minWidth: {\n type: [Number, String],\n default: 30,\n validator,\n },\n\n /**\n * Controls the max width of paragraphs\n */\n maxWidth: {\n type: [Number, String],\n default: 100,\n validator,\n },\n\n /**\n * Controls the width of paragraphs\n */\n width: {\n type: [String, Array],\n default: null,\n },\n\n /**\n * If true, row widths will be random\n * @values true, false\n */\n randomWidth: {\n type: Boolean,\n default: false,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the row.\n */\n rowClass: {\n type: String,\n default: '',\n },\n },\n\n computed: {\n integerRows () {\n return Number(this.rows);\n },\n },\n\n methods: {\n randomWidthPercentage () {\n const min = Math.min(this.minWidth, this.maxWidth);\n const max = Math.max(this.minWidth, this.maxWidth);\n return `${Math.round(Math.random() * (max - min)) + min}%`;\n },\n\n getSizeParagraphRow (row) {\n const paragraphWidth = this.width;\n const isArrayWidth = Array.isArray(paragraphWidth);\n const currentWidth = paragraphWidth?.[row - 1];\n const isLastRow = row === this.rows;\n\n if (this.randomWidth) {\n return this.randomWidthPercentage();\n }\n\n if (paragraphWidth && !isArrayWidth) {\n return paragraphWidth;\n }\n\n if (paragraphWidth && isArrayWidth && currentWidth) {\n return currentWidth;\n }\n\n return isLastRow ? '38%' : '100%';\n },\n },\n};\n</script>\n"],"names":["DtSkeletonText","_createElementBlock","_normalizeClass","_openBlock","_Fragment","_renderList","_createBlock"],"mappings":";;;;;AAyBA,MAAM,YAAY,YAAU,WAAW,MAAM,CAAC,OAAO,MAAM,OAAO,MAAM,CAAC;AACzE,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EACN,YAAY;AAAA,IACV,gBAAAA,aAAc;AAAA,EACf;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM;AAAA,MACJ,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AA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AAiB,KAAK;AAC5B,YAAM,eAAe,MAAM,QAAQ,cAAc;AACjD,YAAM,eAAe,iDAAiB,MAAM;AAC5C,YAAM,YAAY,QAAQ,KAAK;AAE/B,UAAI,KAAK,aAAa;AACpB,eAAO,KAAK;MACd;AAEA,UAAI,kBAAkB,CAAC,cAAc;AACnC,eAAO;AAAA,MACT;AAEA,UAAI,kBAAkB,gBAAgB,cAAc;AAClD,eAAO;AAAA,MACT;AAEA,aAAO,YAAY,QAAQ;AAAA,IAC5B;AAAA,EACF;AACH;;;0BA9JEC,IAkBM,mBAAA,OAAA;AAAA,IAjBH,OAFLC,IAAAA,eAAA;AAAA;MAEkD,OAAY;AAAA;IAI1D,cAAA;AAAA,IACA,WAAQ;AAAA;KAERC,cAAA,IAAA,GAAAF,IAAAA,mBASEG,IAlBN,UAAA,MAAAC,IAAAA,WAUoB,SAAW,aAV/B,CAUa,QAAG;8BADZC,IASE,YAAA,6BAAA;AAAA,QAPC,KAAK;AAAA,QACN,WAAQ;AAAA,QACP,iBAAe,OAAQ;AAAA,QACvB,SAAS,OAAO;AAAA,QAChB,QAAQ,OAAM;AAAA,QACd,sBAAoB,OAAiB;AAAA,QACrC,OAAO,SAAmB,oBAAC,GAAG;AAAA;;;;;;"}
|
|
@@ -3,6 +3,7 @@ import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragme
|
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const validator = (number) => number !== "" && !Number.isNaN(Number(number));
|
|
5
5
|
const _sfc_main = {
|
|
6
|
+
compatConfig: { MODE: 3 },
|
|
6
7
|
name: "DtSkeletonParagraph",
|
|
7
8
|
components: {
|
|
8
9
|
DtSkeletonText
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton-paragraph.vue.js","sources":["../../../components/skeleton/skeleton-paragraph.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-skeleton-paragraph',\n contentClass,\n ]\"\n contentClass\n data-qa=\"skeleton-paragraph\"\n >\n <dt-skeleton-text\n v-for=\"row in integerRows\"\n :key=\"row\"\n data-qa=\"skeleton-paragraph-row\"\n :content-class=\"rowClass\"\n :animate=\"animate\"\n :offset=\"offset\"\n :animation-duration=\"animationDuration\"\n :width=\"getSizeParagraphRow(row)\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonText from './skeleton-text.vue';\n\nconst validator = number => number !== '' && !Number.isNaN(Number(number));\nexport default {\n name: 'DtSkeletonParagraph',\n components: {\n DtSkeletonText,\n },\n\n props: {\n /**\n * Quantity of rows to display\n */\n rows: {\n type: [Number, String],\n default: 3,\n validator,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls the min width of paragraphs\n */\n minWidth: {\n type: [Number, String],\n default: 30,\n validator,\n },\n\n /**\n * Controls the max width of paragraphs\n */\n maxWidth: {\n type: [Number, String],\n default: 100,\n validator,\n },\n\n /**\n * Controls the width of paragraphs\n */\n width: {\n type: [String, Array],\n default: null,\n },\n\n /**\n * If true, row widths will be random\n * @values true, false\n */\n randomWidth: {\n type: Boolean,\n default: false,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the row.\n */\n rowClass: {\n type: String,\n default: '',\n },\n },\n\n computed: {\n integerRows () {\n return Number(this.rows);\n },\n },\n\n methods: {\n randomWidthPercentage () {\n const min = Math.min(this.minWidth, this.maxWidth);\n const max = Math.max(this.minWidth, this.maxWidth);\n return `${Math.round(Math.random() * (max - min)) + min}%`;\n },\n\n getSizeParagraphRow (row) {\n const paragraphWidth = this.width;\n const isArrayWidth = Array.isArray(paragraphWidth);\n const currentWidth = paragraphWidth?.[row - 1];\n const isLastRow = row === this.rows;\n\n if (this.randomWidth) {\n return this.randomWidthPercentage();\n }\n\n if (paragraphWidth && !isArrayWidth) {\n return paragraphWidth;\n }\n\n if (paragraphWidth && isArrayWidth && currentWidth) {\n return currentWidth;\n }\n\n return isLastRow ? '38%' : '100%';\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_openBlock","_Fragment","_renderList","_createBlock"],"mappings":";;;AAyBA,MAAM,YAAY,YAAU,WAAW,MAAM,CAAC,OAAO,MAAM,OAAO,MAAM,CAAC;AACzE,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM;AAAA,MACJ,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AAAA,IACD;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,KAAK;AAAA,MACpB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAUD,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,mBAAmB;AAAA,MACjB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,UAAU;AAAA,IACR,cAAe;AACb,aAAO,OAAO,KAAK,IAAI;AAAA,IACxB;AAAA,EACF;AAAA,EAED,SAAS;AAAA,IACP,wBAAyB;AACvB,YAAM,MAAM,KAAK,IAAI,KAAK,UAAU,KAAK,QAAQ;AACjD,YAAM,MAAM,KAAK,IAAI,KAAK,UAAU,KAAK,QAAQ;AACjD,aAAO,GAAG,KAAK,MAAM,KAAK,OAAM,KAAM,MAAM,IAAI,IAAI,GAAG;AAAA,IACxD;AAAA,IAED,oBAAqB,KAAK;AACxB,YAAM,iBAAiB,KAAK;AAC5B,YAAM,eAAe,MAAM,QAAQ,cAAc;AACjD,YAAM,eAAe,iDAAiB,MAAM;AAC5C,YAAM,YAAY,QAAQ,KAAK;AAE/B,UAAI,KAAK,aAAa;AACpB,eAAO,KAAK;MACd;AAEA,UAAI,kBAAkB,CAAC,cAAc;AACnC,eAAO;AAAA,MACT;AAEA,UAAI,kBAAkB,gBAAgB,cAAc;AAClD,eAAO;AAAA,MACT;AAEA,aAAO,YAAY,QAAQ;AAAA,IAC5B;AAAA,EACF;AACH;;;
|
|
1
|
+
{"version":3,"file":"skeleton-paragraph.vue.js","sources":["../../../components/skeleton/skeleton-paragraph.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'd-skeleton-paragraph',\n contentClass,\n ]\"\n contentClass\n data-qa=\"skeleton-paragraph\"\n >\n <dt-skeleton-text\n v-for=\"row in integerRows\"\n :key=\"row\"\n data-qa=\"skeleton-paragraph-row\"\n :content-class=\"rowClass\"\n :animate=\"animate\"\n :offset=\"offset\"\n :animation-duration=\"animationDuration\"\n :width=\"getSizeParagraphRow(row)\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonText from './skeleton-text.vue';\n\nconst validator = number => number !== '' && !Number.isNaN(Number(number));\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtSkeletonParagraph',\n components: {\n DtSkeletonText,\n },\n\n props: {\n /**\n * Quantity of rows to display\n */\n rows: {\n type: [Number, String],\n default: 3,\n validator,\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls the min width of paragraphs\n */\n minWidth: {\n type: [Number, String],\n default: 30,\n validator,\n },\n\n /**\n * Controls the max width of paragraphs\n */\n maxWidth: {\n type: [Number, String],\n default: 100,\n validator,\n },\n\n /**\n * Controls the width of paragraphs\n */\n width: {\n type: [String, Array],\n default: null,\n },\n\n /**\n * If true, row widths will be random\n * @values true, false\n */\n randomWidth: {\n type: Boolean,\n default: false,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Additional class name for the content.\n */\n contentClass: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the row.\n */\n rowClass: {\n type: String,\n default: '',\n },\n },\n\n computed: {\n integerRows () {\n return Number(this.rows);\n },\n },\n\n methods: {\n randomWidthPercentage () {\n const min = Math.min(this.minWidth, this.maxWidth);\n const max = Math.max(this.minWidth, this.maxWidth);\n return `${Math.round(Math.random() * (max - min)) + min}%`;\n },\n\n getSizeParagraphRow (row) {\n const paragraphWidth = this.width;\n const isArrayWidth = Array.isArray(paragraphWidth);\n const currentWidth = paragraphWidth?.[row - 1];\n const isLastRow = row === this.rows;\n\n if (this.randomWidth) {\n return this.randomWidthPercentage();\n }\n\n if (paragraphWidth && !isArrayWidth) {\n return paragraphWidth;\n }\n\n if (paragraphWidth && isArrayWidth && currentWidth) {\n return currentWidth;\n }\n\n return isLastRow ? '38%' : '100%';\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_openBlock","_Fragment","_renderList","_createBlock"],"mappings":";;;AAyBA,MAAM,YAAY,YAAU,WAAW,MAAM,CAAC,OAAO,MAAM,OAAO,MAAM,CAAC;AACzE,MAAK,YAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,MAAM;AAAA,MACJ,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AAAA,IACD;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,SAAS;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,MACT;AAAA,IACD;AAAA;AAAA;AAAA;AAAA,IAKD,OAAO;AAAA,MACL,MAAM,CAAC,QAAQ,KAAK;AAAA,MACpB,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,I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