@dialpad/dialtone-vue 2.124.0 → 2.125.1-alpha.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/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +33 -0
- package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +1 -0
- package/dist/chunks/dropdown-SMWaTWyF.js +357 -0
- package/dist/chunks/dropdown-SMWaTWyF.js.map +1 -0
- package/dist/chunks/dropdown_constants-EUcDxBrX.js +9 -0
- package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +1 -0
- package/dist/chunks/icon_constants-OpYAAKwF.js +16 -0
- package/dist/chunks/icon_constants-OpYAAKwF.js.map +1 -0
- package/dist/chunks/index-nIyl_PL6.js +372 -0
- package/dist/chunks/index-nIyl_PL6.js.map +1 -0
- package/dist/chunks/index-o4OMWMuv.js +244 -0
- package/dist/chunks/index-o4OMWMuv.js.map +1 -0
- package/dist/chunks/input-1tm09l_-.js +273 -0
- package/dist/chunks/input-1tm09l_-.js.map +1 -0
- package/dist/chunks/input_group-zcAq3DQl.js +141 -0
- package/dist/chunks/input_group-zcAq3DQl.js.map +1 -0
- package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +197 -0
- package/dist/chunks/keyboard_list_navigation-F0O8nht0.js.map +1 -0
- package/dist/chunks/link_constants-vIUB92L4.js +16 -0
- package/dist/chunks/link_constants-vIUB92L4.js.map +1 -0
- package/dist/chunks/list_item_constants-LTUc74pD.js +13 -0
- package/dist/chunks/list_item_constants-LTUc74pD.js.map +1 -0
- package/dist/chunks/modal-VuMFkZFH.js +82 -0
- package/dist/chunks/modal-VuMFkZFH.js.map +1 -0
- package/dist/chunks/notice_action-9NmtQRai.js +182 -0
- package/dist/chunks/notice_action-9NmtQRai.js.map +1 -0
- package/dist/chunks/notice_constants-c--hBFQw.js +6 -0
- package/dist/chunks/notice_constants-c--hBFQw.js.map +1 -0
- package/dist/chunks/popover_constants-qjlEkroB.js +114 -0
- package/dist/chunks/popover_constants-qjlEkroB.js.map +1 -0
- package/dist/chunks/sr_only_close_button-JGole5Xi.js +86 -0
- package/dist/chunks/sr_only_close_button-JGole5Xi.js.map +1 -0
- package/dist/chunks/stack_constants-u7tNqGtc.js +13 -0
- package/dist/chunks/stack_constants-u7tNqGtc.js.map +1 -0
- package/dist/chunks/tab-Qm9LVkYj.js +346 -0
- package/dist/chunks/tab-Qm9LVkYj.js.map +1 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.js +356 -10364
- package/dist/dialtone-vue.js.map +1 -0
- package/dist/lib/attachment-carousel.js +250 -0
- package/dist/lib/attachment-carousel.js.map +1 -0
- package/dist/lib/avatar.js +369 -0
- package/dist/lib/avatar.js.map +1 -0
- package/dist/lib/badge.js +169 -0
- package/dist/lib/badge.js.map +1 -0
- package/dist/lib/banner.js +200 -0
- package/dist/lib/banner.js.map +1 -0
- package/dist/lib/breadcrumbs.js +138 -0
- package/dist/lib/breadcrumbs.js.map +1 -0
- package/dist/lib/button-group.js +45 -0
- package/dist/lib/button-group.js.map +1 -0
- package/dist/lib/button.js +328 -0
- package/dist/lib/button.js.map +1 -0
- package/dist/lib/callbar-button-with-popover.js +235 -0
- package/dist/lib/callbar-button-with-popover.js.map +1 -0
- package/dist/lib/callbar-button.js +175 -0
- package/dist/lib/callbar-button.js.map +1 -0
- package/dist/lib/callbox.js +142 -0
- package/dist/lib/callbox.js.map +1 -0
- package/dist/lib/card.js +72 -0
- package/dist/lib/card.js.map +1 -0
- package/dist/lib/checkbox-group.js +117 -0
- package/dist/lib/checkbox-group.js.map +1 -0
- package/dist/lib/checkbox.js +117 -0
- package/dist/lib/checkbox.js.map +1 -0
- package/dist/lib/chip.js +186 -0
- package/dist/lib/chip.js.map +1 -0
- package/dist/lib/codeblock.js +29 -0
- package/dist/lib/codeblock.js.map +1 -0
- package/dist/lib/collapsible.js +313 -0
- package/dist/lib/collapsible.js.map +1 -0
- package/dist/lib/combobox-multi-select.js +433 -0
- package/dist/lib/combobox-multi-select.js.map +1 -0
- package/dist/lib/combobox-with-popover.js +341 -0
- package/dist/lib/combobox-with-popover.js.map +1 -0
- package/dist/lib/combobox.js +19 -0
- package/dist/lib/combobox.js.map +1 -0
- package/dist/lib/constants.js +53 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/contact-info.js +145 -0
- package/dist/lib/contact-info.js.map +1 -0
- package/dist/lib/contact-row.js +203 -0
- package/dist/lib/contact-row.js.map +1 -0
- package/dist/lib/datepicker.js +552 -0
- package/dist/lib/datepicker.js.map +1 -0
- package/dist/lib/dates.js +57 -0
- package/dist/lib/dates.js.map +1 -0
- package/dist/lib/description-list.js +83 -0
- package/dist/lib/description-list.js.map +1 -0
- package/dist/lib/dropdown.js +45 -0
- package/dist/lib/dropdown.js.map +1 -0
- package/dist/lib/editor.js +527 -0
- package/dist/lib/editor.js.map +1 -0
- package/dist/{emoji_picker-kiTOKaq8.js → lib/emoji-picker.js} +30 -11
- package/dist/lib/emoji-picker.js.map +1 -0
- package/dist/lib/emoji-row.js +83 -0
- package/dist/lib/emoji-row.js.map +1 -0
- package/dist/{emoji_text_wrapper-48ClwKvf.js → lib/emoji-text-wrapper.js} +19 -13
- package/dist/lib/emoji-text-wrapper.js.map +1 -0
- package/dist/lib/emoji.js +11 -0
- package/dist/lib/emoji.js.map +1 -0
- package/dist/lib/feed-item-row.js +207 -0
- package/dist/lib/feed-item-row.js.map +1 -0
- package/dist/lib/feed-pill.js +142 -0
- package/dist/lib/feed-pill.js.map +1 -0
- package/dist/lib/general-row.js +379 -0
- package/dist/lib/general-row.js.map +1 -0
- package/dist/lib/group-row.js +115 -0
- package/dist/lib/group-row.js.map +1 -0
- package/dist/lib/grouped-chip.js +45 -0
- package/dist/lib/grouped-chip.js.map +1 -0
- package/dist/lib/hovercard.js +194 -0
- package/dist/lib/hovercard.js.map +1 -0
- package/dist/lib/icon.js +82 -0
- package/dist/lib/icon.js.map +1 -0
- package/dist/lib/image-viewer.js +171 -0
- package/dist/lib/image-viewer.js.map +1 -0
- package/dist/lib/input-group.js +90 -0
- package/dist/lib/input-group.js.map +1 -0
- package/dist/lib/input.js +455 -0
- package/dist/lib/input.js.map +1 -0
- package/dist/lib/item-layout.js +39 -0
- package/dist/lib/item-layout.js.map +1 -0
- package/dist/lib/ivr-node.js +195 -0
- package/dist/lib/ivr-node.js.map +1 -0
- package/dist/lib/keyboard-shortcut.js +100 -0
- package/dist/lib/keyboard-shortcut.js.map +1 -0
- package/dist/lib/lazy-show.js +77 -0
- package/dist/lib/lazy-show.js.map +1 -0
- package/dist/lib/link.js +69 -0
- package/dist/lib/link.js.map +1 -0
- package/dist/lib/list-item-group.js +59 -0
- package/dist/lib/list-item-group.js.map +1 -0
- package/dist/lib/list-item.js +195 -0
- package/dist/lib/list-item.js.map +1 -0
- package/dist/{message_input.js → lib/message-input.js} +107 -55
- package/dist/lib/message-input.js.map +1 -0
- package/dist/lib/mixins.js +17 -0
- package/dist/lib/mixins.js.map +1 -0
- package/dist/lib/modal.js +324 -0
- package/dist/lib/modal.js.map +1 -0
- package/dist/lib/notice.js +158 -0
- package/dist/lib/notice.js.map +1 -0
- package/dist/lib/pagination.js +142 -0
- package/dist/lib/pagination.js.map +1 -0
- package/dist/lib/popover.js +779 -0
- package/dist/lib/popover.js.map +1 -0
- package/dist/lib/presence.js +60 -0
- package/dist/lib/presence.js.map +1 -0
- package/dist/lib/radio-group.js +97 -0
- package/dist/lib/radio-group.js.map +1 -0
- package/dist/lib/radio.js +111 -0
- package/dist/lib/radio.js.map +1 -0
- package/dist/lib/rich-text-editor.js +920 -0
- package/dist/lib/rich-text-editor.js.map +1 -0
- package/dist/lib/root-layout.js +127 -0
- package/dist/lib/root-layout.js.map +1 -0
- package/dist/lib/select-menu.js +243 -0
- package/dist/lib/select-menu.js.map +1 -0
- package/dist/lib/settings-menu-button.js +65 -0
- package/dist/lib/settings-menu-button.js.map +1 -0
- package/dist/lib/skeleton.js +574 -0
- package/dist/lib/skeleton.js.map +1 -0
- package/dist/lib/stack.js +118 -0
- package/dist/lib/stack.js.map +1 -0
- package/dist/lib/tabs.js +93 -0
- package/dist/lib/tabs.js.map +1 -0
- package/dist/lib/time-pill.js +43 -0
- package/dist/lib/time-pill.js.map +1 -0
- package/dist/lib/toast.js +226 -0
- package/dist/lib/toast.js.map +1 -0
- package/dist/lib/toggle.js +169 -0
- package/dist/lib/toggle.js.map +1 -0
- package/dist/{directives.js → lib/tooltip-directive.js} +24 -17
- package/dist/lib/tooltip-directive.js.map +1 -0
- package/dist/lib/tooltip.js +376 -0
- package/dist/lib/tooltip.js.map +1 -0
- package/dist/lib/top-banner-info.js +60 -0
- package/dist/lib/top-banner-info.js.map +1 -0
- package/dist/lib/unread-pill.js +61 -0
- package/dist/lib/unread-pill.js.map +1 -0
- package/dist/lib/utils.js +175 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/validation-messages.js +83 -0
- package/dist/lib/validation-messages.js.map +1 -0
- package/dist/lib/validators.js +12 -0
- package/dist/lib/validators.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types/common/{constants.d.ts → constants/index.d.ts} +1 -1
- package/dist/types/common/constants/index.d.ts.map +1 -0
- package/dist/types/common/{dates.d.ts → dates/index.d.ts} +1 -1
- package/dist/types/common/dates/index.d.ts.map +1 -0
- package/dist/types/common/{emoji.d.ts → emoji/index.d.ts} +1 -1
- package/dist/types/common/{emoji.d.ts.map → emoji/index.d.ts.map} +1 -1
- package/dist/types/common/{utils.d.ts → utils/index.d.ts} +1 -1
- package/dist/types/common/utils/index.d.ts.map +1 -0
- package/dist/types/common/{validators.d.ts → validators/index.d.ts} +1 -1
- package/dist/types/common/validators/index.d.ts.map +1 -0
- package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
- package/dist/types/components/button/button.vue.d.ts +2 -2
- package/dist/types/components/card/card.vue.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.vue.d.ts +7 -7
- package/dist/types/components/checkbox/checkbox.vue.d.ts.map +1 -1
- package/dist/types/components/chip/chip.vue.d.ts +2 -2
- package/dist/types/components/collapsible/collapsible.vue.d.ts +3 -3
- package/dist/types/components/combobox/combobox.vue.d.ts +7 -8
- package/dist/types/components/combobox/combobox.vue.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown.vue.d.ts +1 -1
- package/dist/types/components/emoji/emoji.vue.d.ts +1 -1
- package/dist/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -219
- package/dist/types/components/icon/icon.vue.d.ts +20 -16
- package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
- package/dist/types/components/icon/icon_constants.d.ts +2 -0
- package/dist/types/components/icon/icon_constants.d.ts.map +1 -1
- package/dist/types/components/icon/index.d.ts +1 -1
- package/dist/types/components/input_group/input_group.vue.d.ts +15 -6
- package/dist/types/components/input_group/input_group.vue.d.ts.map +1 -1
- package/dist/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
- package/dist/types/components/modal/modal.vue.d.ts +7 -2
- package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
- package/dist/types/components/notice/notice_action.vue.d.ts +3 -1
- package/dist/types/components/notice/notice_action.vue.d.ts.map +1 -1
- package/dist/types/components/popover/popover_header_footer.vue.d.ts +1 -1
- package/dist/types/components/radio/radio.vue.d.ts +2 -12
- package/dist/types/components/radio/radio.vue.d.ts.map +1 -1
- package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +1 -1
- package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
- package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
- package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton-text.vue.d.ts +8 -3
- package/dist/types/components/skeleton/skeleton-text.vue.d.ts.map +1 -1
- package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
- package/dist/types/components/toggle/toggle.vue.d.ts +1 -1
- package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
- package/dist/types/index.d.ts +36 -29
- package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
- package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +2 -2
- package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
- package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
- package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +9 -0
- package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
- package/package.json +19 -59
- package/CHANGELOG.json +0 -1
- package/CHANGELOG.md +0 -2890
- package/dist/dialtone-vue.cjs +0 -5
- package/dist/directives.cjs +0 -1
- package/dist/emoji.cjs +0 -1
- package/dist/emoji.js +0 -35
- package/dist/emoji_picker-njWWAm6V.cjs +0 -1
- package/dist/emoji_text_wrapper-ZlynvHnd.cjs +0 -1
- package/dist/index-OF94C6nQ.js +0 -142833
- package/dist/index-Wx7Jagcr.cjs +0 -1
- package/dist/message_input.cjs +0 -1
- package/dist/rich_text_editor-9sMob7ck.js +0 -16478
- package/dist/rich_text_editor-Eh5kYokw.cjs +0 -97
- package/dist/tooltip-88U5vFMA.js +0 -2516
- package/dist/tooltip-i2wxFIIi.cjs +0 -21
- package/dist/types/common/constants.d.ts.map +0 -1
- package/dist/types/common/dates.d.ts.map +0 -1
- package/dist/types/common/utils.d.ts.map +0 -1
- package/dist/types/common/validators.d.ts.map +0 -1
- package/dist/types/components/emoji_picker/emojis/index.d.ts +0 -50
- package/dist/types/components/emoji_picker/emojis/index.d.ts.map +0 -1
- package/dist/types/directives.d.ts +0 -2
- package/dist/types/directives.d.ts.map +0 -1
- package/dist/types/emoji.d.ts +0 -5
- package/dist/types/emoji.d.ts.map +0 -1
- package/dist/types/message_input.d.ts +0 -3
- package/dist/types/message_input.d.ts.map +0 -1
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { D as p, C as u, a as d, L as f } from "../chunks/index-nIyl_PL6.js";
|
|
2
|
+
import { getUniqueString as l } from "./utils.js";
|
|
3
|
+
import { a as m } from "../chunks/sr_only_close_button-JGole5Xi.js";
|
|
4
|
+
import { n as h } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
|
|
5
|
+
import { DtPopover as c } from "./popover.js";
|
|
6
|
+
import { D as a } from "../chunks/dropdown_constants-EUcDxBrX.js";
|
|
7
|
+
import { c as y, e as b } from "../chunks/popover_constants-qjlEkroB.js";
|
|
8
|
+
import "../chunks/keyboard_list_navigation-F0O8nht0.js";
|
|
9
|
+
import "./list-item.js";
|
|
10
|
+
import "../chunks/list_item_constants-LTUc74pD.js";
|
|
11
|
+
import "./item-layout.js";
|
|
12
|
+
import "./icon.js";
|
|
13
|
+
import "@dialpad/dialtone-icons/vue2";
|
|
14
|
+
import "../chunks/icon_constants-OpYAAKwF.js";
|
|
15
|
+
import "@dialpad/dialtone-icons/icons.json";
|
|
16
|
+
import "./skeleton.js";
|
|
17
|
+
import "./constants.js";
|
|
18
|
+
import "vue";
|
|
19
|
+
import "./button.js";
|
|
20
|
+
import "../chunks/link_constants-vIUB92L4.js";
|
|
21
|
+
import "@linusborg/vue-simple-portal";
|
|
22
|
+
import "../chunks/modal-VuMFkZFH.js";
|
|
23
|
+
import "./lazy-show.js";
|
|
24
|
+
import "tippy.js";
|
|
25
|
+
const g = {
|
|
26
|
+
name: "DtRecipeComboboxWithPopover",
|
|
27
|
+
components: {
|
|
28
|
+
DtCombobox: p,
|
|
29
|
+
DtPopover: c,
|
|
30
|
+
ComboboxLoadingList: u,
|
|
31
|
+
ComboboxEmptyList: d
|
|
32
|
+
},
|
|
33
|
+
mixins: [m],
|
|
34
|
+
props: {
|
|
35
|
+
/**
|
|
36
|
+
* String to use for the input label.
|
|
37
|
+
*/
|
|
38
|
+
label: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: !0
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Determines visibility of input label.
|
|
44
|
+
* @values true, false
|
|
45
|
+
*/
|
|
46
|
+
labelVisible: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: !0
|
|
49
|
+
},
|
|
50
|
+
/**
|
|
51
|
+
* Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`
|
|
52
|
+
* @values null, xs, sm, md, lg, xl
|
|
53
|
+
*/
|
|
54
|
+
size: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: null,
|
|
57
|
+
validator: (e) => Object.values(f).includes(e)
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* Description for the input
|
|
61
|
+
*/
|
|
62
|
+
description: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ""
|
|
65
|
+
},
|
|
66
|
+
/**
|
|
67
|
+
* Determines when to show the list element and also controls the aria-expanded attribute.
|
|
68
|
+
* Leaving this null will have the combobox trigger on input focus by default.
|
|
69
|
+
* If you set this value, the default trigger behavior will be disabled and you can
|
|
70
|
+
* control it as you need.
|
|
71
|
+
*/
|
|
72
|
+
showList: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: null
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* Sets an ID on the list element of the component. Used by several aria attributes
|
|
78
|
+
* as well as when deriving the IDs for each item.
|
|
79
|
+
*/
|
|
80
|
+
listId: {
|
|
81
|
+
type: String,
|
|
82
|
+
default() {
|
|
83
|
+
return l();
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
/**
|
|
87
|
+
* Additional class for the wrapper list element.
|
|
88
|
+
*/
|
|
89
|
+
listClass: {
|
|
90
|
+
type: [String, Array, Object],
|
|
91
|
+
default: ""
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* A method that will be called when the selection goes past the beginning of the list.
|
|
95
|
+
*/
|
|
96
|
+
onBeginningOfList: {
|
|
97
|
+
type: Function,
|
|
98
|
+
default: null
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* A method that will be called when the selection goes past the end of the list.
|
|
102
|
+
*/
|
|
103
|
+
onEndOfList: {
|
|
104
|
+
type: Function,
|
|
105
|
+
default: null
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Determines maximum height for the popover before overflow.
|
|
109
|
+
* Possible units rem|px|em
|
|
110
|
+
*/
|
|
111
|
+
maxHeight: {
|
|
112
|
+
type: String,
|
|
113
|
+
default: ""
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* Determines maximum width for the popover before overflow.
|
|
117
|
+
* Possible units rem|px|%|em
|
|
118
|
+
*/
|
|
119
|
+
maxWidth: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: ""
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* Vertical padding size around the list element.
|
|
125
|
+
*/
|
|
126
|
+
padding: {
|
|
127
|
+
type: String,
|
|
128
|
+
default: "small",
|
|
129
|
+
validator: (e) => Object.keys(a).some((t) => t === e)
|
|
130
|
+
},
|
|
131
|
+
/**
|
|
132
|
+
* Width configuration for the popover content. When its value is 'anchor',
|
|
133
|
+
* the popover content will have the same width as the anchor.
|
|
134
|
+
*/
|
|
135
|
+
contentWidth: {
|
|
136
|
+
type: String,
|
|
137
|
+
default: null,
|
|
138
|
+
validator: (e) => y.includes(e)
|
|
139
|
+
},
|
|
140
|
+
/**
|
|
141
|
+
* If the list should be shown by pressing up or down arrow key on the input element.
|
|
142
|
+
* This can be set when not passing showList prop.
|
|
143
|
+
*/
|
|
144
|
+
openWithArrowKeys: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: !1
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Displaces the popover content box from its anchor element
|
|
150
|
+
* by the specified number of pixels.
|
|
151
|
+
*/
|
|
152
|
+
popoverOffset: {
|
|
153
|
+
type: Array,
|
|
154
|
+
default: () => [0, 4]
|
|
155
|
+
},
|
|
156
|
+
/**
|
|
157
|
+
* If the popover sticks to the input.
|
|
158
|
+
*/
|
|
159
|
+
popoverSticky: {
|
|
160
|
+
type: [Boolean, String],
|
|
161
|
+
default: !1
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* Displays the list when the combobox is focused, before the user has typed anything.
|
|
165
|
+
* When this is enabled the list will not close after selection.
|
|
166
|
+
*/
|
|
167
|
+
hasSuggestionList: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: !0
|
|
170
|
+
},
|
|
171
|
+
/**
|
|
172
|
+
* Determines when to show the skeletons and also controls aria-busy attribute.
|
|
173
|
+
*/
|
|
174
|
+
loading: {
|
|
175
|
+
type: Boolean,
|
|
176
|
+
default: !1
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.
|
|
180
|
+
*/
|
|
181
|
+
emptyList: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: !1
|
|
184
|
+
},
|
|
185
|
+
/**
|
|
186
|
+
* Message to show when the list is empty
|
|
187
|
+
*/
|
|
188
|
+
emptyStateMessage: {
|
|
189
|
+
type: String,
|
|
190
|
+
default: ""
|
|
191
|
+
},
|
|
192
|
+
/**
|
|
193
|
+
* Sets the element to which the popover is going to append to.
|
|
194
|
+
* 'body' will append to the nearest body (supports shadow DOM).
|
|
195
|
+
* @values 'body', 'parent', HTMLElement,
|
|
196
|
+
*/
|
|
197
|
+
appendTo: {
|
|
198
|
+
type: [HTMLElement, String],
|
|
199
|
+
default: "body",
|
|
200
|
+
validator: (e) => b.includes(e) || e instanceof HTMLElement
|
|
201
|
+
},
|
|
202
|
+
/**
|
|
203
|
+
* Named transition when the content display is toggled.
|
|
204
|
+
* @see DtLazyShow
|
|
205
|
+
*/
|
|
206
|
+
transition: {
|
|
207
|
+
type: String,
|
|
208
|
+
default: "fade"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
emits: [
|
|
212
|
+
/**
|
|
213
|
+
* Event fired when item selected
|
|
214
|
+
*
|
|
215
|
+
* @event select
|
|
216
|
+
* @type {Number}
|
|
217
|
+
*/
|
|
218
|
+
"select",
|
|
219
|
+
/**
|
|
220
|
+
* Event fired when 'escape' key is pressed
|
|
221
|
+
*
|
|
222
|
+
* @event escape
|
|
223
|
+
*/
|
|
224
|
+
"escape",
|
|
225
|
+
/**
|
|
226
|
+
* Event fired when an item is highlighted
|
|
227
|
+
*
|
|
228
|
+
* @event highlight
|
|
229
|
+
* @type {Number}
|
|
230
|
+
*/
|
|
231
|
+
"highlight",
|
|
232
|
+
/**
|
|
233
|
+
* Emitted when items are shown or hidden
|
|
234
|
+
*
|
|
235
|
+
* @event opened
|
|
236
|
+
* @type {Boolean | Array}
|
|
237
|
+
*/
|
|
238
|
+
"opened"
|
|
239
|
+
],
|
|
240
|
+
data() {
|
|
241
|
+
return {
|
|
242
|
+
DROPDOWN_PADDING_CLASSES: a,
|
|
243
|
+
isListShown: !1,
|
|
244
|
+
isInputFocused: !1,
|
|
245
|
+
isListFocused: !1,
|
|
246
|
+
externalAnchor: l()
|
|
247
|
+
};
|
|
248
|
+
},
|
|
249
|
+
computed: {
|
|
250
|
+
comboboxListeners() {
|
|
251
|
+
return {
|
|
252
|
+
...this.$listeners,
|
|
253
|
+
select: this.onSelect,
|
|
254
|
+
escape: this.onEscape,
|
|
255
|
+
highlight: this.onHighlight
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
watch: {
|
|
260
|
+
showList: {
|
|
261
|
+
handler: function(e) {
|
|
262
|
+
e !== null && (this.isListShown = e);
|
|
263
|
+
},
|
|
264
|
+
immediate: !0
|
|
265
|
+
},
|
|
266
|
+
isListShown(e) {
|
|
267
|
+
e ? window.addEventListener("mousedown", this.onFocusOut) : window.removeEventListener("mousedown", this.onFocusOut), this.onOpened(e);
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
methods: {
|
|
271
|
+
handleDisplayList(e) {
|
|
272
|
+
!this.hasSuggestionList && e && this.showComboboxList(), !this.hasSuggestionList && !e && this.closeComboboxList();
|
|
273
|
+
},
|
|
274
|
+
showComboboxList() {
|
|
275
|
+
this.showList == null && (this.isListShown = !0);
|
|
276
|
+
},
|
|
277
|
+
closeComboboxList() {
|
|
278
|
+
this.showList == null && (this.isListShown = !1);
|
|
279
|
+
},
|
|
280
|
+
onSelect(e) {
|
|
281
|
+
this.loading || (this.$emit("select", e), this.hasSuggestionList || this.closeComboboxList());
|
|
282
|
+
},
|
|
283
|
+
onEscape() {
|
|
284
|
+
this.$emit("escape"), this.closeComboboxList();
|
|
285
|
+
},
|
|
286
|
+
onHighlight(e) {
|
|
287
|
+
this.loading || this.$emit("highlight", e);
|
|
288
|
+
},
|
|
289
|
+
onOpened(e) {
|
|
290
|
+
this.$emit("opened", e);
|
|
291
|
+
},
|
|
292
|
+
onFocusIn(e) {
|
|
293
|
+
var t;
|
|
294
|
+
this.hasSuggestionList && e && ((t = this.$refs.input) == null ? void 0 : t.querySelector("input")) === e.target && this.showComboboxList();
|
|
295
|
+
},
|
|
296
|
+
onFocusOut(e) {
|
|
297
|
+
var s, o, n;
|
|
298
|
+
const t = (o = (s = this.$refs.popover) == null ? void 0 : s.tip) == null ? void 0 : o.popper, i = this.$refs.input;
|
|
299
|
+
(n = e.composedPath()) != null && n.some((r) => [t, i].includes(r)) || this.closeComboboxList();
|
|
300
|
+
},
|
|
301
|
+
openOnArrowKeyPress() {
|
|
302
|
+
this.showList !== null || this.isListShown || !this.openWithArrowKeys || this.showComboboxList();
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
var L = function() {
|
|
307
|
+
var t = this, i = t._self._c;
|
|
308
|
+
return i("dt-combobox", t._g({ ref: "combobox", attrs: { loading: t.loading, label: t.label, "label-visible": t.labelVisible, size: t.size, description: t.description, "empty-list": t.emptyList, "empty-state-message": t.emptyStateMessage, "show-list": t.isListShown, "on-beginning-of-list": t.onBeginningOfList, "on-end-of-list": t.onEndOfList, "list-rendered-outside": !0, "list-id": t.listId, "data-qa": "dt-combobox" }, scopedSlots: t._u([{ key: "input", fn: function({ inputProps: s }) {
|
|
309
|
+
return [i("div", { ref: "input", attrs: { id: t.externalAnchor }, on: { focusin: t.onFocusIn, keydown: [function(o) {
|
|
310
|
+
return !o.type.indexOf("key") && t._k(o.keyCode, "up", 38, o.key, ["Up", "ArrowUp"]) ? null : t.openOnArrowKeyPress(o);
|
|
311
|
+
}, function(o) {
|
|
312
|
+
return !o.type.indexOf("key") && t._k(o.keyCode, "down", 40, o.key, ["Down", "ArrowDown"]) ? null : t.openOnArrowKeyPress(o);
|
|
313
|
+
}] } }, [t._t("input", null, { inputProps: s, onInput: t.handleDisplayList })], 2)];
|
|
314
|
+
} }, { key: "list", fn: function({ opened: s, listProps: o, clearHighlightIndex: n }) {
|
|
315
|
+
return [i("dt-popover", { ref: "popover", attrs: { open: t.isListShown, "hide-on-click": !1, "max-height": t.maxHeight, "max-width": t.maxWidth, offset: t.popoverOffset, sticky: t.popoverSticky, placement: "bottom-start", "initial-focus-element": "none", padding: "none", role: "listbox", "external-anchor": t.externalAnchor, "content-width": t.contentWidth, "content-appear": !0, "content-tabindex": null, modal: !1, "auto-focus": !1, "append-to": t.appendTo, transition: t.transition, "visually-hidden-close-label": t.visuallyHiddenCloseLabel, "visually-hidden-close": t.visuallyHiddenClose }, on: { "update:open": function(r) {
|
|
316
|
+
t.isListShown = r;
|
|
317
|
+
}, opened: function(r) {
|
|
318
|
+
return s(r, arguments[1]);
|
|
319
|
+
} }, scopedSlots: t._u([t.$slots.header ? { key: "headerContent", fn: function() {
|
|
320
|
+
return [i("div", { ref: "header" }, [t._t("header")], 2)];
|
|
321
|
+
}, proxy: !0 } : null, { key: "content", fn: function() {
|
|
322
|
+
return [i("div", { ref: "listWrapper", class: [t.DROPDOWN_PADDING_CLASSES[t.padding], t.listClass], on: { mouseleave: n, focusout: n } }, [t.loading ? i("combobox-loading-list", t._b({}, "combobox-loading-list", o, !1)) : t.emptyList && t.emptyStateMessage ? i("combobox-empty-list", t._b({ attrs: { message: t.emptyStateMessage } }, "combobox-empty-list", o, !1)) : t._t("list", null, { listProps: o })], 2)];
|
|
323
|
+
}, proxy: !0 }, t.$slots.footer ? { key: "footerContent", fn: function() {
|
|
324
|
+
return [i("div", { ref: "footer" }, [t._t("footer")], 2)];
|
|
325
|
+
}, proxy: !0 } : null], null, !0) })];
|
|
326
|
+
} }], null, !0) }, t.comboboxListeners));
|
|
327
|
+
}, S = [], x = /* @__PURE__ */ h(
|
|
328
|
+
g,
|
|
329
|
+
L,
|
|
330
|
+
S,
|
|
331
|
+
!1,
|
|
332
|
+
null,
|
|
333
|
+
null,
|
|
334
|
+
null,
|
|
335
|
+
null
|
|
336
|
+
);
|
|
337
|
+
const $ = x.exports;
|
|
338
|
+
export {
|
|
339
|
+
$ as DtRecipeComboboxWithPopover
|
|
340
|
+
};
|
|
341
|
+
//# sourceMappingURL=combobox-with-popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-with-popover.js","sources":["../../recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-on=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n :open.sync=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n @opened=\"opened($event, arguments[1]);\"\n >\n <template\n v-if=\"$slots.header\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[DROPDOWN_PADDING_CLASSES[padding], listClass]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"$slots.footer\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n name: 'DtRecipeComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n },\n\n emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$listeners,\n\n select: this.onSelect,\n\n escape: this.onEscape,\n\n highlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtCombobox","DtPopover","ComboboxLoadingList","ComboboxEmptyList","SrOnlyCloseButtonMixin","t","LABEL_SIZES","getUniqueString","padding","DROPDOWN_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","appendTo","POPOVER_APPEND_TO_VALUES","show","val","value","highlightIndex","opened","_a","popoverEl","_b","comboboxEl","_c","el"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyHA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,mBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAA,OAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAE,EAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,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, L as A } from "../chunks/index-nIyl_PL6.js";
|
|
2
|
+
import "../chunks/keyboard_list_navigation-F0O8nht0.js";
|
|
3
|
+
import "./utils.js";
|
|
4
|
+
import "./constants.js";
|
|
5
|
+
import "vue";
|
|
6
|
+
import "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
|
|
7
|
+
import "./list-item.js";
|
|
8
|
+
import "../chunks/list_item_constants-LTUc74pD.js";
|
|
9
|
+
import "./item-layout.js";
|
|
10
|
+
import "./icon.js";
|
|
11
|
+
import "@dialpad/dialtone-icons/vue2";
|
|
12
|
+
import "../chunks/icon_constants-OpYAAKwF.js";
|
|
13
|
+
import "@dialpad/dialtone-icons/icons.json";
|
|
14
|
+
import "./skeleton.js";
|
|
15
|
+
export {
|
|
16
|
+
f as DtCombobox,
|
|
17
|
+
A as LABEL_SIZES
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=combobox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const E = {
|
|
2
|
+
ERROR: "error",
|
|
3
|
+
WARNING: "warning",
|
|
4
|
+
SUCCESS: "success"
|
|
5
|
+
}, e = {
|
|
6
|
+
LARGE: "lg",
|
|
7
|
+
EXTRA_LARGE: "xl"
|
|
8
|
+
}, s = {
|
|
9
|
+
xs: "",
|
|
10
|
+
sm: "",
|
|
11
|
+
md: "",
|
|
12
|
+
lg: "d-description--lg",
|
|
13
|
+
xl: "d-description--xl"
|
|
14
|
+
}, t = {
|
|
15
|
+
xs: "d-label--xs",
|
|
16
|
+
sm: "d-label--sm",
|
|
17
|
+
md: "",
|
|
18
|
+
lg: "d-label--lg",
|
|
19
|
+
xl: "d-label--xl"
|
|
20
|
+
}, a = {
|
|
21
|
+
esc: "Esc",
|
|
22
|
+
escape: "Escape",
|
|
23
|
+
tab: "Tab",
|
|
24
|
+
enter: "Enter",
|
|
25
|
+
space: "Space",
|
|
26
|
+
spacebar: "Spacebar",
|
|
27
|
+
up: "Up",
|
|
28
|
+
arrowup: "ArrowUp",
|
|
29
|
+
left: "Left",
|
|
30
|
+
arrowleft: "ArrowLeft",
|
|
31
|
+
right: "Right",
|
|
32
|
+
arrowright: "ArrowRight",
|
|
33
|
+
down: "Down",
|
|
34
|
+
arrowdown: "ArrowDown",
|
|
35
|
+
home: "Home",
|
|
36
|
+
end: "End"
|
|
37
|
+
}, r = E.ERROR, o = "dt", l = {
|
|
38
|
+
VALIDATION_MESSAGE_TYPES: E,
|
|
39
|
+
DESCRIPTION_SIZE_TYPES: e,
|
|
40
|
+
DEFAULT_VALIDATION_MESSAGE_TYPE: r,
|
|
41
|
+
DEFAULT_PREFIX: o
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
o as DEFAULT_PREFIX,
|
|
45
|
+
r as DEFAULT_VALIDATION_MESSAGE_TYPE,
|
|
46
|
+
s as DESCRIPTION_SIZE_MODIFIERS,
|
|
47
|
+
e as DESCRIPTION_SIZE_TYPES,
|
|
48
|
+
a as EVENT_KEYNAMES,
|
|
49
|
+
t as LABEL_SIZE_MODIFIERS,
|
|
50
|
+
E as VALIDATION_MESSAGE_TYPES,
|
|
51
|
+
l as default
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../common/constants/index.js"],"sourcesContent":["/* TODO: Move and sort these in a constants directory\n\nExample:\n constants/\n forms.js\n defaults.js\n ...\n*/\n\n// Types of messages, also dictates what is the current state of the input.\nexport const VALIDATION_MESSAGE_TYPES = {\n ERROR: 'error',\n WARNING: 'warning',\n SUCCESS: 'success',\n};\n\n// Description size variants\nexport const DESCRIPTION_SIZE_TYPES = {\n LARGE: 'lg',\n EXTRA_LARGE: 'xl',\n};\n\n// Description size variants\nexport const DESCRIPTION_SIZE_MODIFIERS = {\n xs: '',\n sm: '',\n md: '',\n lg: 'd-description--lg',\n xl: 'd-description--xl',\n};\n\n// Label size variants\nexport const LABEL_SIZE_MODIFIERS = {\n xs: 'd-label--xs',\n sm: 'd-label--sm',\n md: '',\n lg: 'd-label--lg',\n xl: 'd-label--xl',\n};\n\nexport const EVENT_KEYNAMES = {\n esc: 'Esc',\n escape: 'Escape',\n tab: 'Tab',\n enter: 'Enter',\n space: 'Space',\n spacebar: 'Spacebar',\n up: 'Up',\n arrowup: 'ArrowUp',\n left: 'Left',\n arrowleft: 'ArrowLeft',\n right: 'Right',\n arrowright: 'ArrowRight',\n down: 'Down',\n arrowdown: 'ArrowDown',\n home: 'Home',\n end: 'End',\n};\n\n/*\n * Any string message or message object in the messages prop that do not specify\n * a 'type' attributes will default to 'DEFAULT_MESSAGE_TYPE'.\n */\nexport const DEFAULT_VALIDATION_MESSAGE_TYPE = VALIDATION_MESSAGE_TYPES.ERROR;\n\n// Default prefix used for ids\nexport const DEFAULT_PREFIX = 'dt';\n\nexport default {\n VALIDATION_MESSAGE_TYPES,\n DESCRIPTION_SIZE_TYPES,\n DEFAULT_VALIDATION_MESSAGE_TYPE,\n DEFAULT_PREFIX,\n};\n"],"names":["VALIDATION_MESSAGE_TYPES","DESCRIPTION_SIZE_TYPES","DESCRIPTION_SIZE_MODIFIERS","LABEL_SIZE_MODIFIERS","EVENT_KEYNAMES","DEFAULT_VALIDATION_MESSAGE_TYPE","DEFAULT_PREFIX","index"],"mappings":"AAUY,MAACA,IAA2B;AAAA,EACtC,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AACX,GAGaC,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,aAAa;AACf,GAGaC,IAA6B;AAAA,EACxC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAGaC,IAAuB;AAAA,EAClC,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAiB;AAAA,EAC5B,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,IAAI;AAAA,EACJ,SAAS;AAAA,EACT,MAAM;AAAA,EACN,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,MAAM;AAAA,EACN,WAAW;AAAA,EACX,MAAM;AAAA,EACN,KAAK;AACP,GAMaC,IAAkCL,EAAyB,OAG3DM,IAAiB,MAEfC,IAAA;AAAA,EACb,0BAAAP;AAAA,EACA,wBAAAC;AAAA,EACA,iCAAAI;AAAA,EACA,gBAAAC;AACF;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { DtItemLayout as n } from "./item-layout.js";
|
|
2
|
+
import { DtAvatar as o } from "./avatar.js";
|
|
3
|
+
import { n as l } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
|
|
4
|
+
import "./utils.js";
|
|
5
|
+
import "./constants.js";
|
|
6
|
+
import "vue";
|
|
7
|
+
import "@dialpad/dialtone-icons/icons.json";
|
|
8
|
+
import "../chunks/icon_constants-OpYAAKwF.js";
|
|
9
|
+
import "./presence.js";
|
|
10
|
+
import "./icon.js";
|
|
11
|
+
import "@dialpad/dialtone-icons/vue2";
|
|
12
|
+
import "./skeleton.js";
|
|
13
|
+
const i = {
|
|
14
|
+
name: "DtRecipeContactInfo",
|
|
15
|
+
components: {
|
|
16
|
+
DtAvatar: o,
|
|
17
|
+
DtItemLayout: n
|
|
18
|
+
},
|
|
19
|
+
/* inheritAttrs: false is generally an option we want to set on library
|
|
20
|
+
components. This allows any attributes passed in that are not recognized
|
|
21
|
+
as props to be passed down to another element or component using v-bind:$attrs
|
|
22
|
+
more info: https://vuejs.org/v2/api/#inheritAttrs */
|
|
23
|
+
// inheritAttrs: false,
|
|
24
|
+
props: {
|
|
25
|
+
/**
|
|
26
|
+
* String to use for the item's role.
|
|
27
|
+
*/
|
|
28
|
+
role: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Display avatar if `showAvatar` property is true.
|
|
34
|
+
*/
|
|
35
|
+
showAvatar: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: !0
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Optional avatar image url.
|
|
41
|
+
*/
|
|
42
|
+
avatarSrc: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ""
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.
|
|
48
|
+
*/
|
|
49
|
+
avatarSeed: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: null
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Avatar's full name, used to extract initials
|
|
55
|
+
* to display in avatar if `avatarSrc` and `avatarIcon` are empty.
|
|
56
|
+
*/
|
|
57
|
+
avatarFullName: {
|
|
58
|
+
type: String,
|
|
59
|
+
default: ""
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* Avatar icon to display if `avatarSrc` is empty.
|
|
63
|
+
*/
|
|
64
|
+
avatarIcon: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: null
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* The size of the avatar
|
|
70
|
+
* @values xs, sm, md, lg, xl
|
|
71
|
+
*/
|
|
72
|
+
avatarSize: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: "lg"
|
|
75
|
+
},
|
|
76
|
+
/**
|
|
77
|
+
* The aria-labelledby of the button containing avatars
|
|
78
|
+
*/
|
|
79
|
+
avatarLabelledBy: {
|
|
80
|
+
type: String,
|
|
81
|
+
default: ""
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Determines whether to show the presence indicator for
|
|
85
|
+
* Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',
|
|
86
|
+
* or 'active'. By default, it's null and nothing is shown.
|
|
87
|
+
* @values null, busy, away, offline, active
|
|
88
|
+
*/
|
|
89
|
+
presence: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: null
|
|
92
|
+
},
|
|
93
|
+
/**
|
|
94
|
+
* Showing multiple avatars in contact info.
|
|
95
|
+
* The props of array items are: <br>
|
|
96
|
+
* `src` - avatar image url (optional) <br>
|
|
97
|
+
* `fullName` - full name, used to extract initials to display in avatar<br>
|
|
98
|
+
* if `avatarSrc` and `avatarIcon` are empty<br>
|
|
99
|
+
* `seed` - determines uniqueness of avatar background <br>
|
|
100
|
+
* `text` - text that overlays the avatar (optional) <br>
|
|
101
|
+
* `icon` - icon that overlays the avatar (optional) <br>
|
|
102
|
+
* `halo` - halo highlight around the avatar. boolean true/false
|
|
103
|
+
*/
|
|
104
|
+
avatarList: {
|
|
105
|
+
type: Array,
|
|
106
|
+
default: null
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
emits: ["avatar-click"],
|
|
110
|
+
methods: {
|
|
111
|
+
avatarClick() {
|
|
112
|
+
this.$emit("avatar-click");
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
var c = function() {
|
|
117
|
+
var t = this, a = t._self._c;
|
|
118
|
+
return a("dt-item-layout", { staticClass: "dt-contact-info", attrs: { role: t.role, "data-qa": "contact-info" }, scopedSlots: t._u([t.showAvatar ? { key: "left", fn: function() {
|
|
119
|
+
return [a("button", { staticClass: "dt-contact-info__left", attrs: { "data-qa": "contact-info-left", "aria-labelledby": t.avatarLabelledBy }, on: { click: t.avatarClick } }, [t.avatarList ? a("span", { staticClass: "dt-contact-info--avatars" }, t._l(t.avatarList, function(e, r) {
|
|
120
|
+
return a("dt-avatar", { key: r, attrs: { size: t.avatarSize, seed: e.seed, "full-name": e.fullName, "image-src": e.src, "image-alt": "", "icon-name": t.avatarIcon, "overlay-icon": e.icon, "overlay-text": e.text, "avatar-class": [{ "d-mln24": r > 0, "d-bc-brand": !!e.halo }] } });
|
|
121
|
+
}), 1) : a("dt-avatar", { attrs: { size: t.avatarSize, "full-name": t.avatarFullName, "image-src": t.avatarSrc, "image-alt": "", "icon-name": t.avatarIcon, seed: t.avatarSeed, presence: t.presence } })], 1)];
|
|
122
|
+
}, proxy: !0 } : null, { key: "default", fn: function() {
|
|
123
|
+
return [a("div", { attrs: { "data-qa": "contact-info-header" } }, [t._t("header")], 2)];
|
|
124
|
+
}, proxy: !0 }, { key: "subtitle", fn: function() {
|
|
125
|
+
return [a("div", { attrs: { "data-qa": "contact-info-subtitle" } }, [t._t("subtitle")], 2)];
|
|
126
|
+
}, proxy: !0 }, t.$slots.bottom ? { key: "bottom", fn: function() {
|
|
127
|
+
return [a("div", { attrs: { "data-qa": "contact-info-bottom" } }, [t._t("bottom")], 2)];
|
|
128
|
+
}, proxy: !0 } : null, t.$slots.right ? { key: "right", fn: function() {
|
|
129
|
+
return [a("div", { attrs: { "data-qa": "contact-info-right" } }, [t._t("right")], 2)];
|
|
130
|
+
}, proxy: !0 } : null], null, !0) });
|
|
131
|
+
}, s = [], u = /* @__PURE__ */ l(
|
|
132
|
+
i,
|
|
133
|
+
c,
|
|
134
|
+
s,
|
|
135
|
+
!1,
|
|
136
|
+
null,
|
|
137
|
+
"a3c913d1",
|
|
138
|
+
null,
|
|
139
|
+
null
|
|
140
|
+
);
|
|
141
|
+
const C = u.exports;
|
|
142
|
+
export {
|
|
143
|
+
C as DtRecipeContactInfo
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=contact-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-info.js","sources":["../../recipes/item_layout/contact_info/contact_info.vue"],"sourcesContent":["<template>\n <dt-item-layout\n :role=\"role\"\n data-qa=\"contact-info\"\n class=\"dt-contact-info\"\n >\n <template\n v-if=\"showAvatar\"\n #left\n >\n <button\n class=\"dt-contact-info__left\"\n data-qa=\"contact-info-left\"\n :aria-labelledby=\"avatarLabelledBy\"\n @click=\"avatarClick\"\n >\n <span\n v-if=\"avatarList\"\n class=\"dt-contact-info--avatars\"\n >\n <dt-avatar\n v-for=\"(avatar, index) in avatarList\"\n :key=\"index\"\n :size=\"avatarSize\"\n :seed=\"avatar.seed\"\n :full-name=\"avatar.fullName\"\n :image-src=\"avatar.src\"\n image-alt=\"\"\n :icon-name=\"avatarIcon\"\n :overlay-icon=\"avatar.icon\"\n :overlay-text=\"avatar.text\"\n :avatar-class=\"[{ 'd-mln24': index > 0, 'd-bc-brand': !!avatar.halo }]\"\n />\n </span>\n <dt-avatar\n v-else\n :size=\"avatarSize\"\n :full-name=\"avatarFullName\"\n :image-src=\"avatarSrc\"\n image-alt=\"\"\n :icon-name=\"avatarIcon\"\n :seed=\"avatarSeed\"\n :presence=\"presence\"\n />\n </button>\n </template>\n <template #default>\n <div data-qa=\"contact-info-header\">\n <!-- @slot Slot for header information -->\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #subtitle>\n <div data-qa=\"contact-info-subtitle\">\n <!-- @slot Slot for subtitle information -->\n <slot name=\"subtitle\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.bottom\"\n #bottom\n >\n <div data-qa=\"contact-info-bottom\">\n <!-- @slot Slot for information at the bottom -->\n <slot name=\"bottom\" />\n </div>\n </template>\n\n <template\n v-if=\"$slots.right\"\n #right\n >\n <div data-qa=\"contact-info-right\">\n <!-- @slot Slot for the right content -->\n <slot name=\"right\" />\n </div>\n </template>\n </dt-item-layout>\n</template>\n\n<script>\nimport DtItemLayout from '@/components/item_layout/item_layout.vue';\nimport DtAvatar from '@/components/avatar/avatar.vue';\n\nexport default {\n name: 'DtRecipeContactInfo',\n\n components: {\n DtAvatar,\n DtItemLayout,\n },\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * String to use for the item's role.\n */\n role: {\n type: String,\n default: '',\n },\n\n /**\n * Display avatar if `showAvatar` property is true.\n */\n showAvatar: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Optional avatar image url.\n */\n avatarSrc: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar seed, set this to the user's ID to get the same avatar background gradient each time it is displayed.\n */\n avatarSeed: {\n type: String,\n default: null,\n },\n\n /**\n * Avatar's full name, used to extract initials\n * to display in avatar if `avatarSrc` and `avatarIcon` are empty.\n */\n avatarFullName: {\n type: String,\n default: '',\n },\n\n /**\n * Avatar icon to display if `avatarSrc` is empty.\n */\n avatarIcon: {\n type: String,\n default: null,\n },\n\n /**\n * The size of the avatar\n * @values xs, sm, md, lg, xl\n */\n avatarSize: {\n type: String,\n default: 'lg',\n },\n\n /**\n * The aria-labelledby of the button containing avatars\n */\n avatarLabelledBy: {\n type: String,\n default: '',\n },\n\n /**\n * Determines whether to show the presence indicator for\n * Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',\n * or 'active'. By default, it's null and nothing is shown.\n * @values null, busy, away, offline, active\n */\n presence: {\n type: String,\n default: null,\n },\n\n /**\n * Showing multiple avatars in contact info.\n * The props of array items are: <br>\n * `src` - avatar image url (optional) <br>\n * `fullName` - full name, used to extract initials to display in avatar<br>\n * if `avatarSrc` and `avatarIcon` are empty<br>\n * `seed` - determines uniqueness of avatar background <br>\n * `text` - text that overlays the avatar (optional) <br>\n * `icon` - icon that overlays the avatar (optional) <br>\n * `halo` - halo highlight around the avatar. boolean true/false\n */\n avatarList: {\n type: Array,\n default: null,\n },\n },\n\n emits: ['avatar-click'],\n\n methods: {\n avatarClick () {\n this.$emit('avatar-click');\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n.dt-contact-info {\n --contact-info-avatar-border-color: var(--dt-color-surface-primary);\n\n display: flex;\n\n &:deep(.dt-item-layout) {\n flex: 1 1 0;\n }\n\n &:deep(.dt-item-layout--content) {\n /*\n DP-74536: Add `min-width` to make the width of \"contact info\" adjustable.\n */\n min-width: var(--dt-space-825);\n }\n\n &:deep(.dt-item-layout--left) {\n /*\n DP-74536: To make 'Avatar' in fixed position when resizing the window.\n */\n min-width: var(--dt-space-650);\n justify-content: flex-start;\n align-items: center;\n }\n\n &:deep(.dt-item-layout--right) {\n /*\n DP-74536: Remove `min-width` which cause extra unused empty space on the right of \"contact info\".\n */\n min-width: 0;\n align-items: center;\n }\n\n &__left {\n position: relative;\n background-color: transparent;\n background-image: none;\n border-width: 0;\n cursor: pointer;\n }\n\n &--avatars {\n margin-right: var(--dt-space-300-negative);\n display: flex;\n flex-direction: row;\n\n .d-avatar {\n border-radius: var(--dt-size-radius-pill);\n border: var(--dt-size-300) solid var(--contact-info-avatar-border-color);\n box-sizing: unset;\n }\n }\n}\n</style>\n"],"names":["_sfc_main","DtAvatar","DtItemLayout"],"mappings":";;;;;;;;;;;;AAsFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,cAAAC;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;A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