@dialpad/dialtone-vue 3.123.4 → 3.124.0
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/dialtone-vue.cjs +4 -0
- package/dist/dialtone-vue.cjs.map +1 -1
- package/dist/dialtone-vue.js +4 -0
- package/dist/dialtone-vue.js.map +1 -1
- package/dist/lib/contact-centers-row.cjs +229 -0
- package/dist/lib/contact-centers-row.cjs.map +1 -0
- package/dist/lib/contact-centers-row.js +229 -0
- package/dist/lib/contact-centers-row.js.map +1 -0
- package/dist/style.css +310 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +96 -0
- package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -0
- package/dist/types/recipes/leftbar/contact_centers_row/index.d.ts +2 -0
- package/dist/types/recipes/leftbar/contact_centers_row/index.d.ts.map +1 -0
- package/dist/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
- package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
- package/dist/types/recipes/leftbar/group_row/group_row.vue.d.ts +1 -1
- package/package.json +3 -3
package/dist/dialtone-vue.cjs
CHANGED
|
@@ -83,6 +83,7 @@ const lib_timePill = require("./lib/time-pill.cjs");
|
|
|
83
83
|
const lib_settingsMenuButton = require("./lib/settings-menu-button.cjs");
|
|
84
84
|
const lib_contactInfo = require("./lib/contact-info.cjs");
|
|
85
85
|
const lib_callbox = require("./lib/callbox.cjs");
|
|
86
|
+
const lib_contactCentersRow = require("./lib/contact-centers-row.cjs");
|
|
86
87
|
const lib_contactRow = require("./lib/contact-row.cjs");
|
|
87
88
|
const lib_generalRow = require("./lib/general-row.cjs");
|
|
88
89
|
const lib_groupRow = require("./lib/group-row.cjs");
|
|
@@ -121,6 +122,8 @@ require("@tiptap/suggestion");
|
|
|
121
122
|
require("@tiptap/extension-mention");
|
|
122
123
|
require("@dialpad/dialtone-icons/vue3/hash");
|
|
123
124
|
require("@dialpad/dialtone-icons/vue3/lock");
|
|
125
|
+
require("@dialpad/dialtone-icons/vue3/headphones");
|
|
126
|
+
require("@dialpad/dialtone-icons/vue3/chevron-down");
|
|
124
127
|
exports.DEFAULT_VALIDATION_MESSAGE_TYPE = common_constants.DEFAULT_VALIDATION_MESSAGE_TYPE;
|
|
125
128
|
exports.DESCRIPTION_SIZE_TYPES = common_constants.DESCRIPTION_SIZE_TYPES;
|
|
126
129
|
exports.VALIDATION_MESSAGE_TYPES = common_constants.VALIDATION_MESSAGE_TYPES;
|
|
@@ -361,6 +364,7 @@ exports.DtRecipeContactInfo = lib_contactInfo.DtRecipeContactInfo;
|
|
|
361
364
|
exports.CALLBOX_BADGE_COLORS = lib_callbox.CALLBOX_BADGE_COLORS;
|
|
362
365
|
exports.CALLBOX_BORDER_COLORS = lib_callbox.CALLBOX_BORDER_COLORS;
|
|
363
366
|
exports.DtRecipeCallbox = lib_callbox.DtRecipeCallbox;
|
|
367
|
+
exports.DtRecipeContactCentersRow = lib_contactCentersRow.DtRecipeContactCentersRow;
|
|
364
368
|
exports.DtRecipeContactRow = lib_contactRow.DtRecipeContactRow;
|
|
365
369
|
exports.DtRecipeGeneralRow = lib_generalRow.DtRecipeGeneralRow;
|
|
366
370
|
exports.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS = lib_generalRow.LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialtone-vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialtone-vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/dialtone-vue.js
CHANGED
|
@@ -81,6 +81,7 @@ import { DtRecipeTimePill } from "./lib/time-pill.js";
|
|
|
81
81
|
import { DtRecipeSettingsMenuButton } from "./lib/settings-menu-button.js";
|
|
82
82
|
import { DtRecipeContactInfo } from "./lib/contact-info.js";
|
|
83
83
|
import { CALLBOX_BADGE_COLORS, CALLBOX_BORDER_COLORS, DtRecipeCallbox } from "./lib/callbox.js";
|
|
84
|
+
import { DtRecipeContactCentersRow } from "./lib/contact-centers-row.js";
|
|
84
85
|
import { DtRecipeContactRow } from "./lib/contact-row.js";
|
|
85
86
|
import { DtRecipeGeneralRow, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_COLORS, LEFTBAR_GENERAL_ROW_CONTACT_CENTER_VALIDATION_ERROR, LEFTBAR_GENERAL_ROW_ICON_MAPPING, LEFTBAR_GENERAL_ROW_ICON_SIZES, LEFTBAR_GENERAL_ROW_TYPES } from "./lib/general-row.js";
|
|
86
87
|
import { DtRecipeGroupRow } from "./lib/group-row.js";
|
|
@@ -119,6 +120,8 @@ import "@tiptap/suggestion";
|
|
|
119
120
|
import "@tiptap/extension-mention";
|
|
120
121
|
import "@dialpad/dialtone-icons/vue3/hash";
|
|
121
122
|
import "@dialpad/dialtone-icons/vue3/lock";
|
|
123
|
+
import "@dialpad/dialtone-icons/vue3/headphones";
|
|
124
|
+
import "@dialpad/dialtone-icons/vue3/chevron-down";
|
|
122
125
|
export {
|
|
123
126
|
ARROW_KEYS,
|
|
124
127
|
AVATAR_COLORS,
|
|
@@ -210,6 +213,7 @@ export {
|
|
|
210
213
|
DtRecipeCallbox,
|
|
211
214
|
DtRecipeComboboxMultiSelect,
|
|
212
215
|
DtRecipeComboboxWithPopover,
|
|
216
|
+
DtRecipeContactCentersRow,
|
|
213
217
|
DtRecipeContactInfo,
|
|
214
218
|
DtRecipeContactRow,
|
|
215
219
|
DtRecipeEmojiRow,
|
package/dist/dialtone-vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialtone-vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dialtone-vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const DtIconHeadphones = require("@dialpad/dialtone-icons/vue3/headphones");
|
|
4
|
+
const DtIconChevronDown = require("@dialpad/dialtone-icons/vue3/chevron-down");
|
|
5
|
+
const lib_emojiTextWrapper = require("./emoji-text-wrapper.cjs");
|
|
6
|
+
const common_utils = require("../common/utils.cjs");
|
|
7
|
+
const vue = require("vue");
|
|
8
|
+
const _pluginVue_exportHelper = require("../chunks/_plugin-vue_export-helper-fhnQq0tA.js");
|
|
9
|
+
const lib_button = require("./button.cjs");
|
|
10
|
+
const lib_badge = require("./badge.cjs");
|
|
11
|
+
require("../common/emoji.cjs");
|
|
12
|
+
require("emoji-regex");
|
|
13
|
+
require("@dialpad/dialtone-emojis");
|
|
14
|
+
require("../chunks/icon_constants-QYpmdE0R.js");
|
|
15
|
+
require("@dialpad/dialtone-icons/icons.json");
|
|
16
|
+
require("./emoji.cjs");
|
|
17
|
+
require("./skeleton.cjs");
|
|
18
|
+
require("../common/constants.cjs");
|
|
19
|
+
require("../chunks/link_constants-Huj7D_hm.js");
|
|
20
|
+
require("./icon.cjs");
|
|
21
|
+
require("@dialpad/dialtone-icons/vue3");
|
|
22
|
+
const _sfc_main = {
|
|
23
|
+
name: "DtRecipeGeneralRow",
|
|
24
|
+
components: {
|
|
25
|
+
DtButton: lib_button.DtButton,
|
|
26
|
+
DtBadge: lib_badge.DtBadge,
|
|
27
|
+
DtEmojiTextWrapper: lib_emojiTextWrapper.DtEmojiTextWrapper,
|
|
28
|
+
DtIconHeadphones,
|
|
29
|
+
DtIconChevronDown
|
|
30
|
+
},
|
|
31
|
+
inheritAttrs: false,
|
|
32
|
+
props: {
|
|
33
|
+
/**
|
|
34
|
+
* Will be read out by a screen reader upon focus of this row. If not defined "description" will be read.
|
|
35
|
+
*/
|
|
36
|
+
ariaLabel: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
* Text displayed next to the icon. Required.
|
|
42
|
+
*/
|
|
43
|
+
description: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: true
|
|
46
|
+
},
|
|
47
|
+
/**
|
|
48
|
+
* Determines if the row is selected
|
|
49
|
+
*/
|
|
50
|
+
selected: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* Number of unread messages
|
|
56
|
+
*/
|
|
57
|
+
unreadCount: {
|
|
58
|
+
type: Number,
|
|
59
|
+
default: 0
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* Aria label for the menu button.
|
|
63
|
+
*/
|
|
64
|
+
menuButtonAriaLabel: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: true
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
emits: [
|
|
70
|
+
/**
|
|
71
|
+
* Native click event on the row itself
|
|
72
|
+
*
|
|
73
|
+
* @event click
|
|
74
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
75
|
+
*/
|
|
76
|
+
"click",
|
|
77
|
+
/**
|
|
78
|
+
* Menu button clicked
|
|
79
|
+
*
|
|
80
|
+
* @event call
|
|
81
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
82
|
+
*/
|
|
83
|
+
"click-menu"
|
|
84
|
+
],
|
|
85
|
+
data() {
|
|
86
|
+
return {
|
|
87
|
+
labelWidth: "auto"
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
computed: {
|
|
91
|
+
leftbarContactCentersRowClasses() {
|
|
92
|
+
return [
|
|
93
|
+
"dt-leftbar-row",
|
|
94
|
+
"dt-leftbar-row--contact-centers",
|
|
95
|
+
{
|
|
96
|
+
"dt-leftbar-row--unread-count": this.showUnreadCount,
|
|
97
|
+
"dt-leftbar-row--selected": this.selected
|
|
98
|
+
}
|
|
99
|
+
];
|
|
100
|
+
},
|
|
101
|
+
getAriaLabel() {
|
|
102
|
+
return this.ariaLabel ? this.ariaLabel : common_utils.safeConcatStrings([this.description, this.unreadCountTooltip]);
|
|
103
|
+
},
|
|
104
|
+
contactRowListeners() {
|
|
105
|
+
return common_utils.extractVueListeners(this.$attrs);
|
|
106
|
+
},
|
|
107
|
+
showUnreadCount() {
|
|
108
|
+
return this.unreadCount > 0;
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
watch: {
|
|
112
|
+
$props: {
|
|
113
|
+
deep: true,
|
|
114
|
+
handler() {
|
|
115
|
+
this.adjustLabelWidth();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
mounted() {
|
|
120
|
+
this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);
|
|
121
|
+
this.resizeObserver.observe(this.$el);
|
|
122
|
+
this.adjustLabelWidth();
|
|
123
|
+
},
|
|
124
|
+
beforeUnmount: function() {
|
|
125
|
+
this.resizeObserver.disconnect();
|
|
126
|
+
},
|
|
127
|
+
methods: {
|
|
128
|
+
adjustLabelWidth() {
|
|
129
|
+
var _a, _b, _c, _d, _e, _f;
|
|
130
|
+
const labelWidth = ((_b = (_a = this.$el) == null ? void 0 : _a.querySelector(".dt-leftbar-row__primary")) == null ? void 0 : _b.clientWidth) || 0;
|
|
131
|
+
const omegaWidth = ((_d = (_c = this.$el) == null ? void 0 : _c.querySelector(".dt-leftbar-row__omega")) == null ? void 0 : _d.clientWidth) || 0;
|
|
132
|
+
const alphaWidth = ((_f = (_e = this.$el) == null ? void 0 : _e.querySelector(".dt-leftbar-row__alpha")) == null ? void 0 : _f.clientWidth) || 0;
|
|
133
|
+
const paddings = 12;
|
|
134
|
+
this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + "px";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const _hoisted_1 = ["data-qa", "aria-label", "title", "href"];
|
|
139
|
+
const _hoisted_2 = { class: "dt-leftbar-row__alpha" };
|
|
140
|
+
const _hoisted_3 = { class: "dt-leftbar-row__omega" };
|
|
141
|
+
const _hoisted_4 = { class: "dt-leftbar-row__action-container" };
|
|
142
|
+
const _hoisted_5 = { class: "dt-leftbar-row__bottom" };
|
|
143
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
144
|
+
const _component_dt_icon_headphones = vue.resolveComponent("dt-icon-headphones");
|
|
145
|
+
const _component_dt_emoji_text_wrapper = vue.resolveComponent("dt-emoji-text-wrapper");
|
|
146
|
+
const _component_dt_badge = vue.resolveComponent("dt-badge");
|
|
147
|
+
const _component_dt_icon_chevron_down = vue.resolveComponent("dt-icon-chevron-down");
|
|
148
|
+
const _component_dt_button = vue.resolveComponent("dt-button");
|
|
149
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
150
|
+
class: vue.normalizeClass([
|
|
151
|
+
"dt-leftbar-row__container",
|
|
152
|
+
{ "dt-leftbar-row__container--off-duty": _ctx.$slots.timer }
|
|
153
|
+
])
|
|
154
|
+
}, [
|
|
155
|
+
vue.createElementVNode("div", {
|
|
156
|
+
class: vue.normalizeClass($options.leftbarContactCentersRowClasses),
|
|
157
|
+
"data-qa": "dt-recipe-contact-centers-row"
|
|
158
|
+
}, [
|
|
159
|
+
vue.createElementVNode("a", vue.mergeProps({
|
|
160
|
+
class: "dt-leftbar-row__primary",
|
|
161
|
+
"data-qa": _ctx.$attrs["data-qa"] ?? "dt-leftbar-row-link",
|
|
162
|
+
"aria-label": $options.getAriaLabel,
|
|
163
|
+
title: $props.description,
|
|
164
|
+
href: _ctx.$attrs.href ?? "javascript:void(0)"
|
|
165
|
+
}, _ctx.$attrs, vue.toHandlers($options.contactRowListeners, true), {
|
|
166
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
167
|
+
}), [
|
|
168
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
169
|
+
vue.createVNode(_component_dt_icon_headphones, {
|
|
170
|
+
size: "300",
|
|
171
|
+
"data-qa": "dt-leftbar-row-icon"
|
|
172
|
+
})
|
|
173
|
+
]),
|
|
174
|
+
vue.createElementVNode("div", {
|
|
175
|
+
class: "dt-leftbar-row__label",
|
|
176
|
+
style: vue.normalizeStyle(`flex-basis: ${$data.labelWidth}`)
|
|
177
|
+
}, [
|
|
178
|
+
vue.createVNode(_component_dt_emoji_text_wrapper, {
|
|
179
|
+
class: "dt-leftbar-row__description",
|
|
180
|
+
"data-qa": "dt-leftbar-row-description",
|
|
181
|
+
size: "200"
|
|
182
|
+
}, {
|
|
183
|
+
default: vue.withCtx(() => [
|
|
184
|
+
vue.createTextVNode(vue.toDisplayString($props.description), 1)
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
})
|
|
188
|
+
], 4)
|
|
189
|
+
], 16, _hoisted_1),
|
|
190
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
191
|
+
vue.renderSlot(_ctx.$slots, "right", {}, void 0, true),
|
|
192
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
193
|
+
$options.showUnreadCount ? (vue.openBlock(), vue.createBlock(_component_dt_badge, {
|
|
194
|
+
key: 0,
|
|
195
|
+
class: "dt-leftbar-row__unread-badge",
|
|
196
|
+
"data-qa": "dt-leftbar-row-unread-badge",
|
|
197
|
+
kind: "count",
|
|
198
|
+
type: "bulletin"
|
|
199
|
+
}, {
|
|
200
|
+
default: vue.withCtx(() => [
|
|
201
|
+
vue.createTextVNode(vue.toDisplayString($props.unreadCount), 1)
|
|
202
|
+
]),
|
|
203
|
+
_: 1
|
|
204
|
+
})) : vue.createCommentVNode("", true),
|
|
205
|
+
vue.createVNode(_component_dt_button, {
|
|
206
|
+
class: "dt-leftbar-row__action",
|
|
207
|
+
"data-qa": "dt-leftbar-row-action-button",
|
|
208
|
+
"aria-label": $props.menuButtonAriaLabel,
|
|
209
|
+
importance: "clear",
|
|
210
|
+
size: "xs",
|
|
211
|
+
circle: "",
|
|
212
|
+
onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => _ctx.$emit("click-menu", $event), ["stop"]))
|
|
213
|
+
}, {
|
|
214
|
+
icon: vue.withCtx(() => [
|
|
215
|
+
vue.createVNode(_component_dt_icon_chevron_down, { size: "100" })
|
|
216
|
+
]),
|
|
217
|
+
_: 1
|
|
218
|
+
}, 8, ["aria-label"])
|
|
219
|
+
])
|
|
220
|
+
])
|
|
221
|
+
], 2),
|
|
222
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
223
|
+
vue.renderSlot(_ctx.$slots, "timer", {}, void 0, true)
|
|
224
|
+
])
|
|
225
|
+
], 2);
|
|
226
|
+
}
|
|
227
|
+
const contact_centers_row = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-094eaef1"]]);
|
|
228
|
+
exports.DtRecipeContactCentersRow = contact_centers_row;
|
|
229
|
+
//# sourceMappingURL=contact-centers-row.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-centers-row.cjs","sources":["../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'dt-leftbar-row__container',\n { 'dt-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"contactRowListeners\"\n @click=\"$emit('click', $event)\"\n >\n <div class=\"dt-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div class=\"dt-leftbar-row__omega\">\n <slot name=\"right\" />\n <div class=\"dt-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"dt-leftbar-row__unread-badge\"\n data-qa=\"dt-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action-button\"\n :aria-label=\"menuButtonAriaLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"dt-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport DtIconHeadphones from '@dialpad/dialtone-icons/vue3/headphones';\nimport DtIconChevronDown from '@dialpad/dialtone-icons/vue3/chevron-down';\nimport DtEmojiTextWrapper from '@/components/emoji_text_wrapper/emoji_text_wrapper.vue';\nimport { safeConcatStrings, extractVueListeners } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: Number,\n default: 0,\n },\n\n /**\n * Aria label for the menu button.\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'dt-leftbar-row',\n 'dt-leftbar-row--contact-centers',\n {\n 'dt-leftbar-row--unread-count': this.showUnreadCount,\n 'dt-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([this.description, this.unreadCountTooltip]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n showUnreadCount () {\n return this.unreadCount > 0;\n },\n },\n\n watch: {\n $props: {\n deep: true,\n handler () {\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeUnmount: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":["DtButton","DtBadge","DtEmojiTextWrapper","safeConcatStrings","extractVueListeners","_createElementBlock","_normalizeClass","_createElementVNode","_mergeProps","_toHandlers","_createVNode","_renderSlot","_createBlock","_withModifiers"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA,WAAQ;AAAA,IACR,SAAAC,UAAO;AAAA,IACP,oBAAAC,qBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAA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vBK,IAQW,YAAA,qBAAA;AAAA;YANT,OAAM;AAAA,YACN,WAAQ;AAAA,YACR,MAAK;AAAA,YACL,MAAK;AAAA;iCAEL,MAAiB;AAAA,sDAAd,OAAW,WAAA,GAAA,CAAA;AAAA;;;UAEhBF,IAAAA,YAYY,sBAAA;AAAA,YAXV,OAAM;AAAA,YACN,WAAQ;AAAA,YACP,cAAY,OAAmB;AAAA,YAChC,YAAW;AAAA,YACX,MAAK;AAAA,YACL,QAAA;AAAA,YACC,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAG,kBAAA,YAAO,KAAK,MAAA,cAAe,MAAM,GAAA,CAAA,MAAA,CAAA;AAAA;YAE5B,kBACT,MAAmC;AAAA,cAAnCH,IAAAA,YAAmC,iCAAA,EAAb,MAAK,MAAK,CAAA;AAAA;;;;;;IAM1CH,IAAA,mBAEM,OAFN,YAEM;AAAA,MADJI,IAAqB,WAAA,KAAA,QAAA,SAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;;"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import DtIconHeadphones from "@dialpad/dialtone-icons/vue3/headphones";
|
|
2
|
+
import DtIconChevronDown from "@dialpad/dialtone-icons/vue3/chevron-down";
|
|
3
|
+
import { DtEmojiTextWrapper as _sfc_main$1 } from "./emoji-text-wrapper.js";
|
|
4
|
+
import { safeConcatStrings, extractVueListeners } from "../common/utils.js";
|
|
5
|
+
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, mergeProps, toHandlers, createVNode, normalizeStyle, withCtx, createTextVNode, toDisplayString, renderSlot, createBlock, createCommentVNode, withModifiers } from "vue";
|
|
6
|
+
import { _export_sfc } from "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
|
|
7
|
+
import { DtButton } from "./button.js";
|
|
8
|
+
import { DtBadge } from "./badge.js";
|
|
9
|
+
import "../common/emoji.js";
|
|
10
|
+
import "emoji-regex";
|
|
11
|
+
import "@dialpad/dialtone-emojis";
|
|
12
|
+
import "../chunks/icon_constants-Dy4MEUJL.js";
|
|
13
|
+
import "@dialpad/dialtone-icons/icons.json";
|
|
14
|
+
import "./emoji.js";
|
|
15
|
+
import "./skeleton.js";
|
|
16
|
+
import "../common/constants.js";
|
|
17
|
+
import "../chunks/link_constants-nWVlXQBs.js";
|
|
18
|
+
import "./icon.js";
|
|
19
|
+
import "@dialpad/dialtone-icons/vue3";
|
|
20
|
+
const _sfc_main = {
|
|
21
|
+
name: "DtRecipeGeneralRow",
|
|
22
|
+
components: {
|
|
23
|
+
DtButton,
|
|
24
|
+
DtBadge,
|
|
25
|
+
DtEmojiTextWrapper: _sfc_main$1,
|
|
26
|
+
DtIconHeadphones,
|
|
27
|
+
DtIconChevronDown
|
|
28
|
+
},
|
|
29
|
+
inheritAttrs: false,
|
|
30
|
+
props: {
|
|
31
|
+
/**
|
|
32
|
+
* Will be read out by a screen reader upon focus of this row. If not defined "description" will be read.
|
|
33
|
+
*/
|
|
34
|
+
ariaLabel: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: ""
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Text displayed next to the icon. Required.
|
|
40
|
+
*/
|
|
41
|
+
description: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: true
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Determines if the row is selected
|
|
47
|
+
*/
|
|
48
|
+
selected: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
/**
|
|
53
|
+
* Number of unread messages
|
|
54
|
+
*/
|
|
55
|
+
unreadCount: {
|
|
56
|
+
type: Number,
|
|
57
|
+
default: 0
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* Aria label for the menu button.
|
|
61
|
+
*/
|
|
62
|
+
menuButtonAriaLabel: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
emits: [
|
|
68
|
+
/**
|
|
69
|
+
* Native click event on the row itself
|
|
70
|
+
*
|
|
71
|
+
* @event click
|
|
72
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
73
|
+
*/
|
|
74
|
+
"click",
|
|
75
|
+
/**
|
|
76
|
+
* Menu button clicked
|
|
77
|
+
*
|
|
78
|
+
* @event call
|
|
79
|
+
* @type {PointerEvent | KeyboardEvent}
|
|
80
|
+
*/
|
|
81
|
+
"click-menu"
|
|
82
|
+
],
|
|
83
|
+
data() {
|
|
84
|
+
return {
|
|
85
|
+
labelWidth: "auto"
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
computed: {
|
|
89
|
+
leftbarContactCentersRowClasses() {
|
|
90
|
+
return [
|
|
91
|
+
"dt-leftbar-row",
|
|
92
|
+
"dt-leftbar-row--contact-centers",
|
|
93
|
+
{
|
|
94
|
+
"dt-leftbar-row--unread-count": this.showUnreadCount,
|
|
95
|
+
"dt-leftbar-row--selected": this.selected
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
},
|
|
99
|
+
getAriaLabel() {
|
|
100
|
+
return this.ariaLabel ? this.ariaLabel : safeConcatStrings([this.description, this.unreadCountTooltip]);
|
|
101
|
+
},
|
|
102
|
+
contactRowListeners() {
|
|
103
|
+
return extractVueListeners(this.$attrs);
|
|
104
|
+
},
|
|
105
|
+
showUnreadCount() {
|
|
106
|
+
return this.unreadCount > 0;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
watch: {
|
|
110
|
+
$props: {
|
|
111
|
+
deep: true,
|
|
112
|
+
handler() {
|
|
113
|
+
this.adjustLabelWidth();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
mounted() {
|
|
118
|
+
this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);
|
|
119
|
+
this.resizeObserver.observe(this.$el);
|
|
120
|
+
this.adjustLabelWidth();
|
|
121
|
+
},
|
|
122
|
+
beforeUnmount: function() {
|
|
123
|
+
this.resizeObserver.disconnect();
|
|
124
|
+
},
|
|
125
|
+
methods: {
|
|
126
|
+
adjustLabelWidth() {
|
|
127
|
+
var _a, _b, _c, _d, _e, _f;
|
|
128
|
+
const labelWidth = ((_b = (_a = this.$el) == null ? void 0 : _a.querySelector(".dt-leftbar-row__primary")) == null ? void 0 : _b.clientWidth) || 0;
|
|
129
|
+
const omegaWidth = ((_d = (_c = this.$el) == null ? void 0 : _c.querySelector(".dt-leftbar-row__omega")) == null ? void 0 : _d.clientWidth) || 0;
|
|
130
|
+
const alphaWidth = ((_f = (_e = this.$el) == null ? void 0 : _e.querySelector(".dt-leftbar-row__alpha")) == null ? void 0 : _f.clientWidth) || 0;
|
|
131
|
+
const paddings = 12;
|
|
132
|
+
this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + "px";
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const _hoisted_1 = ["data-qa", "aria-label", "title", "href"];
|
|
137
|
+
const _hoisted_2 = { class: "dt-leftbar-row__alpha" };
|
|
138
|
+
const _hoisted_3 = { class: "dt-leftbar-row__omega" };
|
|
139
|
+
const _hoisted_4 = { class: "dt-leftbar-row__action-container" };
|
|
140
|
+
const _hoisted_5 = { class: "dt-leftbar-row__bottom" };
|
|
141
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
142
|
+
const _component_dt_icon_headphones = resolveComponent("dt-icon-headphones");
|
|
143
|
+
const _component_dt_emoji_text_wrapper = resolveComponent("dt-emoji-text-wrapper");
|
|
144
|
+
const _component_dt_badge = resolveComponent("dt-badge");
|
|
145
|
+
const _component_dt_icon_chevron_down = resolveComponent("dt-icon-chevron-down");
|
|
146
|
+
const _component_dt_button = resolveComponent("dt-button");
|
|
147
|
+
return openBlock(), createElementBlock("div", {
|
|
148
|
+
class: normalizeClass([
|
|
149
|
+
"dt-leftbar-row__container",
|
|
150
|
+
{ "dt-leftbar-row__container--off-duty": _ctx.$slots.timer }
|
|
151
|
+
])
|
|
152
|
+
}, [
|
|
153
|
+
createElementVNode("div", {
|
|
154
|
+
class: normalizeClass($options.leftbarContactCentersRowClasses),
|
|
155
|
+
"data-qa": "dt-recipe-contact-centers-row"
|
|
156
|
+
}, [
|
|
157
|
+
createElementVNode("a", mergeProps({
|
|
158
|
+
class: "dt-leftbar-row__primary",
|
|
159
|
+
"data-qa": _ctx.$attrs["data-qa"] ?? "dt-leftbar-row-link",
|
|
160
|
+
"aria-label": $options.getAriaLabel,
|
|
161
|
+
title: $props.description,
|
|
162
|
+
href: _ctx.$attrs.href ?? "javascript:void(0)"
|
|
163
|
+
}, _ctx.$attrs, toHandlers($options.contactRowListeners, true), {
|
|
164
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
165
|
+
}), [
|
|
166
|
+
createElementVNode("div", _hoisted_2, [
|
|
167
|
+
createVNode(_component_dt_icon_headphones, {
|
|
168
|
+
size: "300",
|
|
169
|
+
"data-qa": "dt-leftbar-row-icon"
|
|
170
|
+
})
|
|
171
|
+
]),
|
|
172
|
+
createElementVNode("div", {
|
|
173
|
+
class: "dt-leftbar-row__label",
|
|
174
|
+
style: normalizeStyle(`flex-basis: ${$data.labelWidth}`)
|
|
175
|
+
}, [
|
|
176
|
+
createVNode(_component_dt_emoji_text_wrapper, {
|
|
177
|
+
class: "dt-leftbar-row__description",
|
|
178
|
+
"data-qa": "dt-leftbar-row-description",
|
|
179
|
+
size: "200"
|
|
180
|
+
}, {
|
|
181
|
+
default: withCtx(() => [
|
|
182
|
+
createTextVNode(toDisplayString($props.description), 1)
|
|
183
|
+
]),
|
|
184
|
+
_: 1
|
|
185
|
+
})
|
|
186
|
+
], 4)
|
|
187
|
+
], 16, _hoisted_1),
|
|
188
|
+
createElementVNode("div", _hoisted_3, [
|
|
189
|
+
renderSlot(_ctx.$slots, "right", {}, void 0, true),
|
|
190
|
+
createElementVNode("div", _hoisted_4, [
|
|
191
|
+
$options.showUnreadCount ? (openBlock(), createBlock(_component_dt_badge, {
|
|
192
|
+
key: 0,
|
|
193
|
+
class: "dt-leftbar-row__unread-badge",
|
|
194
|
+
"data-qa": "dt-leftbar-row-unread-badge",
|
|
195
|
+
kind: "count",
|
|
196
|
+
type: "bulletin"
|
|
197
|
+
}, {
|
|
198
|
+
default: withCtx(() => [
|
|
199
|
+
createTextVNode(toDisplayString($props.unreadCount), 1)
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
})) : createCommentVNode("", true),
|
|
203
|
+
createVNode(_component_dt_button, {
|
|
204
|
+
class: "dt-leftbar-row__action",
|
|
205
|
+
"data-qa": "dt-leftbar-row-action-button",
|
|
206
|
+
"aria-label": $props.menuButtonAriaLabel,
|
|
207
|
+
importance: "clear",
|
|
208
|
+
size: "xs",
|
|
209
|
+
circle: "",
|
|
210
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(($event) => _ctx.$emit("click-menu", $event), ["stop"]))
|
|
211
|
+
}, {
|
|
212
|
+
icon: withCtx(() => [
|
|
213
|
+
createVNode(_component_dt_icon_chevron_down, { size: "100" })
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
}, 8, ["aria-label"])
|
|
217
|
+
])
|
|
218
|
+
])
|
|
219
|
+
], 2),
|
|
220
|
+
createElementVNode("div", _hoisted_5, [
|
|
221
|
+
renderSlot(_ctx.$slots, "timer", {}, void 0, true)
|
|
222
|
+
])
|
|
223
|
+
], 2);
|
|
224
|
+
}
|
|
225
|
+
const contact_centers_row = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-094eaef1"]]);
|
|
226
|
+
export {
|
|
227
|
+
contact_centers_row as DtRecipeContactCentersRow
|
|
228
|
+
};
|
|
229
|
+
//# sourceMappingURL=contact-centers-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-centers-row.js","sources":["../../recipes/leftbar/contact_centers_row/contact_centers_row.vue"],"sourcesContent":["<template>\n <div\n :class=\"[\n 'dt-leftbar-row__container',\n { 'dt-leftbar-row__container--off-duty': $slots.timer },\n ]\"\n >\n <div\n :class=\"leftbarContactCentersRowClasses\"\n data-qa=\"dt-recipe-contact-centers-row\"\n >\n <a\n class=\"dt-leftbar-row__primary\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-leftbar-row-link'\"\n :aria-label=\"getAriaLabel\"\n :title=\"description\"\n :href=\"$attrs.href ?? 'javascript:void(0)'\"\n v-bind=\"$attrs\"\n v-on=\"contactRowListeners\"\n @click=\"$emit('click', $event)\"\n >\n <div class=\"dt-leftbar-row__alpha\">\n <dt-icon-headphones\n size=\"300\"\n data-qa=\"dt-leftbar-row-icon\"\n />\n </div>\n <div\n class=\"dt-leftbar-row__label\"\n :style=\"`flex-basis: ${labelWidth}`\"\n >\n <dt-emoji-text-wrapper\n class=\"dt-leftbar-row__description\"\n data-qa=\"dt-leftbar-row-description\"\n size=\"200\"\n >\n {{ description }}\n </dt-emoji-text-wrapper>\n </div>\n </a>\n <div class=\"dt-leftbar-row__omega\">\n <slot name=\"right\" />\n <div class=\"dt-leftbar-row__action-container\">\n <dt-badge\n v-if=\"showUnreadCount\"\n class=\"dt-leftbar-row__unread-badge\"\n data-qa=\"dt-leftbar-row-unread-badge\"\n kind=\"count\"\n type=\"bulletin\"\n >\n {{ unreadCount }}\n </dt-badge>\n <dt-button\n class=\"dt-leftbar-row__action\"\n data-qa=\"dt-leftbar-row-action-button\"\n :aria-label=\"menuButtonAriaLabel\"\n importance=\"clear\"\n size=\"xs\"\n circle\n @click.stop=\"$emit('click-menu', $event)\"\n >\n <template #icon>\n <dt-icon-chevron-down size=\"100\" />\n </template>\n </dt-button>\n </div>\n </div>\n </div>\n <div class=\"dt-leftbar-row__bottom\">\n <slot name=\"timer\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { DtBadge } from '@/components/badge';\nimport { DtButton } from '@/components/button';\nimport DtIconHeadphones from '@dialpad/dialtone-icons/vue3/headphones';\nimport DtIconChevronDown from '@dialpad/dialtone-icons/vue3/chevron-down';\nimport DtEmojiTextWrapper from '@/components/emoji_text_wrapper/emoji_text_wrapper.vue';\nimport { safeConcatStrings, extractVueListeners } from '@/common/utils';\n\nexport default {\n name: 'DtRecipeGeneralRow',\n\n components: {\n DtButton,\n DtBadge,\n DtEmojiTextWrapper,\n DtIconHeadphones,\n DtIconChevronDown,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Will be read out by a screen reader upon focus of this row. If not defined \"description\" will be read.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Text displayed next to the icon. Required.\n */\n description: {\n type: String,\n required: true,\n },\n\n /**\n * Determines if the row is selected\n */\n selected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Number of unread messages\n */\n unreadCount: {\n type: Number,\n default: 0,\n },\n\n /**\n * Aria label for the menu button.\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Native click event on the row itself\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Menu button clicked\n *\n * @event call\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click-menu',\n ],\n\n data () {\n return {\n labelWidth: 'auto',\n };\n },\n\n computed: {\n leftbarContactCentersRowClasses () {\n return [\n 'dt-leftbar-row',\n 'dt-leftbar-row--contact-centers',\n {\n 'dt-leftbar-row--unread-count': this.showUnreadCount,\n 'dt-leftbar-row--selected': this.selected,\n },\n ];\n },\n\n getAriaLabel () {\n return this.ariaLabel\n ? this.ariaLabel\n : safeConcatStrings([this.description, this.unreadCountTooltip]);\n },\n\n contactRowListeners () {\n return extractVueListeners(this.$attrs);\n },\n\n showUnreadCount () {\n return this.unreadCount > 0;\n },\n },\n\n watch: {\n $props: {\n deep: true,\n handler () {\n this.adjustLabelWidth();\n },\n },\n },\n\n mounted () {\n this.resizeObserver = new ResizeObserver(this.adjustLabelWidth);\n this.resizeObserver.observe(this.$el);\n this.adjustLabelWidth();\n },\n\n beforeUnmount: function () {\n this.resizeObserver.disconnect();\n },\n\n methods: {\n adjustLabelWidth () {\n const labelWidth = this.$el?.querySelector('.dt-leftbar-row__primary')?.clientWidth || 0;\n const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;\n const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;\n const paddings = 12;\n this.labelWidth = labelWidth - (omegaWidth + alphaWidth + paddings) + 'px';\n },\n },\n};\n</script>\n\n<style lang=\"less\" scoped>\n@import \"../style/leftbar_row.less\";\n</style>\n"],"names":["DtEmojiTextWrapper","_createElementBlock","_normalizeClass","_createElementVNode","_mergeProps","_toHandlers","_createVNode","_renderSlot","_createBlock","_withModifiers"],"mappings":";;;;;;;;;;;;;;;;;;;AAkFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA,oBAAAA;AAAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,cAAc;AAAA,EAEd,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA;AAAA;AAAA;AAAA,IAKD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,qBAAqB;AAAA,MACnB,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAA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,YACX,MAAK;AAAA,YACL,QAAA;AAAA,YACC,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAG,cAAA,YAAO,KAAK,MAAA,cAAe,MAAM,GAAA,CAAA,MAAA,CAAA;AAAA;YAE5B,cACT,MAAmC;AAAA,cAAnCH,YAAmC,iCAAA,EAAb,MAAK,MAAK,CAAA;AAAA;;;;;;IAM1CH,mBAEM,OAFN,YAEM;AAAA,MADJI,WAAqB,KAAA,QAAA,SAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;"}
|
package/dist/style.css
CHANGED
|
@@ -494,6 +494,25 @@
|
|
|
494
494
|
line-height: var(--dt-font-line-height-400);
|
|
495
495
|
font-weight: var(--dt-font-weight-medium);
|
|
496
496
|
}
|
|
497
|
+
.dt-leftbar-row__container--off-duty[data-v-49d75ce6] {
|
|
498
|
+
border-radius: var(--dt-size-radius-500);
|
|
499
|
+
background-color: var(--dt-badge-color-background-critical);
|
|
500
|
+
border: var(--dt-size-100) solid var(--dt-color-border-subtle);
|
|
501
|
+
}
|
|
502
|
+
.dt-leftbar-row__container--off-duty[data-v-49d75ce6] .dt-leftbar-row__primary {
|
|
503
|
+
margin: calc(var(--dt-size-100) * -1);
|
|
504
|
+
}
|
|
505
|
+
.dt-leftbar-row--contact-centers[data-v-49d75ce6] .dt-leftbar-row__alpha {
|
|
506
|
+
padding-right: var(--dt-space-450);
|
|
507
|
+
padding-left: var(--dt-space-450);
|
|
508
|
+
}
|
|
509
|
+
.dt-leftbar-row--contact-centers .dt-leftbar-row__action-container[data-v-49d75ce6] {
|
|
510
|
+
display: inline-flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
justify-content: flex-end;
|
|
513
|
+
min-width: var(--dt-size-600);
|
|
514
|
+
height: var(--dt-size-500);
|
|
515
|
+
}
|
|
497
516
|
.dt-leftbar-row[data-v-49d75ce6] .dt-leftbar-row__description {
|
|
498
517
|
display: block;
|
|
499
518
|
font-weight: var(--leftbar-row-description-font-weight);
|
|
@@ -575,6 +594,297 @@
|
|
|
575
594
|
opacity: 90%;
|
|
576
595
|
}
|
|
577
596
|
}
|
|
597
|
+
.dt-leftbar-row[data-v-094eaef1] {
|
|
598
|
+
--leftbar-row-color-foreground: var(--dt-theme-sidebar-color-foreground);
|
|
599
|
+
--leftbar-row-color-background: var(--dt-theme-sidebar-row-color-background);
|
|
600
|
+
--leftbar-row-radius: var(--dt-size-radius-pill);
|
|
601
|
+
--leftbar-row-opacity: 100%;
|
|
602
|
+
--leftbar-row-alpha-color-foreground: var(--dt-theme-sidebar-icon-color-foreground);
|
|
603
|
+
--leftbar-row-alpha-width: calc(var(--dt-size-300) * 10);
|
|
604
|
+
--leftbar-row-alpha-height: calc(var(--dt-size-300) * 9);
|
|
605
|
+
--leftbar-row-omega-height: var(--leftbar-row-alpha-height);
|
|
606
|
+
--leftbar-row-unread-badge-display: inline-flex;
|
|
607
|
+
--leftbar-row-description-color-foreground: var(--dt-theme-sidebar-color-foreground);
|
|
608
|
+
--leftbar-row-description-font-weight: var(--dt-font-weight-normal);
|
|
609
|
+
--leftbar-row-description-font-size: var(--dt-font-size-200);
|
|
610
|
+
--leftbar-row-description-line-height: var(--dt-font-line-height-200);
|
|
611
|
+
--leftbar-row-status-color-foreground: var(--dt-theme-sidebar-status-color-foreground);
|
|
612
|
+
--leftbar-row-status-font-size: var(--dt-font-size-100);
|
|
613
|
+
--leftbar-row-status-line-height: var(--dt-font-line-height-100);
|
|
614
|
+
--leftbar-row-action-position-right: var(--dt-size-400);
|
|
615
|
+
--leftbar-row-action-position-bottom: 50%;
|
|
616
|
+
--leftbar-row-action-width: var(--dt-size-550);
|
|
617
|
+
--leftbar-row-action-height: var(--leftbar-row-action-width);
|
|
618
|
+
position: relative;
|
|
619
|
+
opacity: var(--leftbar-row-opacity);
|
|
620
|
+
display: flex;
|
|
621
|
+
background-color: var(--dt-theme-sidebar-row-color-background);
|
|
622
|
+
border-radius: var(--leftbar-row-radius);
|
|
623
|
+
transition-duration: var(--td200);
|
|
624
|
+
transition-property: background-color, border, box-shadow;
|
|
625
|
+
transition-timing-function: var(--ttf-out-quint);
|
|
626
|
+
cursor: pointer;
|
|
627
|
+
}
|
|
628
|
+
.dt-leftbar-row[data-v-094eaef1]:not(.dt-leftbar-row--no-action):hover,
|
|
629
|
+
.dt-leftbar-row[data-v-094eaef1]:not(.dt-leftbar-row--no-action):focus-within {
|
|
630
|
+
--leftbar-row-unread-badge-display: none;
|
|
631
|
+
}
|
|
632
|
+
.dt-leftbar-row[data-v-094eaef1]:not(.dt-leftbar-row--no-action):hover .dt-leftbar-row__action,
|
|
633
|
+
.dt-leftbar-row[data-v-094eaef1]:not(.dt-leftbar-row--no-action):focus-within .dt-leftbar-row__action {
|
|
634
|
+
display: inline-flex;
|
|
635
|
+
}
|
|
636
|
+
.dt-leftbar-row[data-v-094eaef1]:not(.dt-leftbar-row--no-action):hover .dt-leftbar-row__action-button,
|
|
637
|
+
.dt-leftbar-row[data-v-094eaef1]:not(.dt-leftbar-row--no-action):focus-within .dt-leftbar-row__action-button {
|
|
638
|
+
opacity: 1;
|
|
639
|
+
}
|
|
640
|
+
.dt-leftbar-row[data-v-094eaef1]:hover,
|
|
641
|
+
.dt-leftbar-row[data-v-094eaef1]:focus-within {
|
|
642
|
+
--leftbar-row-color-background: var(--dt-theme-sidebar-row-color-background-hover);
|
|
643
|
+
}
|
|
644
|
+
.dt-leftbar-row[data-v-094eaef1]:hover .d-presence,
|
|
645
|
+
.dt-leftbar-row[data-v-094eaef1]:focus-within .d-presence {
|
|
646
|
+
--presence-color-border-base: var(--dt-color-black-200);
|
|
647
|
+
}
|
|
648
|
+
.dt-leftbar-row[data-v-094eaef1]:hover .d-avatar__count,
|
|
649
|
+
.dt-leftbar-row[data-v-094eaef1]:focus-within .d-avatar__count {
|
|
650
|
+
--avatar-count-color-shadow: var(--dt-theme-sidebar-selected-row-color-background);
|
|
651
|
+
}
|
|
652
|
+
.dt-leftbar-row--has-unread[data-v-094eaef1] {
|
|
653
|
+
--leftbar-row-description-font-weight: var(--dt-font-weight-bold);
|
|
654
|
+
--leftbar-row-description-color-foreground: var(--dt-theme-sidebar-color-foreground-unread);
|
|
655
|
+
--leftbar-row-alpha-color-foreground: var(--dt-theme-sidebar-color-foreground-unread);
|
|
656
|
+
}
|
|
657
|
+
.dt-leftbar-row--unread-count[data-v-094eaef1] .dt-leftbar-row__action {
|
|
658
|
+
display: none;
|
|
659
|
+
}
|
|
660
|
+
.dt-leftbar-row--muted[data-v-094eaef1] {
|
|
661
|
+
--leftbar-row-opacity: 60%;
|
|
662
|
+
}
|
|
663
|
+
.dt-leftbar-row--selected[data-v-094eaef1] {
|
|
664
|
+
--leftbar-row-color-background: var(--dt-theme-sidebar-selected-row-color-background);
|
|
665
|
+
--leftbar-row-description-color-foreground: var(--dt-theme-sidebar-selected-row-color-foreground);
|
|
666
|
+
}
|
|
667
|
+
.dt-leftbar-row--selected[data-v-094eaef1] .d-presence {
|
|
668
|
+
--presence-color-border-base: var(--dt-color-black-200);
|
|
669
|
+
}
|
|
670
|
+
.dt-leftbar-row--selected[data-v-094eaef1] .d-avatar__count {
|
|
671
|
+
--avatar-count-color-shadow: var(--dt-theme-sidebar-selected-row-color-background);
|
|
672
|
+
}
|
|
673
|
+
.dt-leftbar-row__is-typing[data-v-094eaef1] {
|
|
674
|
+
--is-typing-size-shape: var(--dt-size-550);
|
|
675
|
+
height: var(--is-typing-size-shape);
|
|
676
|
+
width: var(--is-typing-size-shape);
|
|
677
|
+
position: absolute;
|
|
678
|
+
display: flex;
|
|
679
|
+
align-items: center;
|
|
680
|
+
justify-content: center;
|
|
681
|
+
gap: 2px;
|
|
682
|
+
border-radius: var(--dt-size-radius-pill);
|
|
683
|
+
opacity: 0.75;
|
|
684
|
+
}
|
|
685
|
+
.dt-leftbar-row__is-typing span[data-v-094eaef1] {
|
|
686
|
+
transition: all 500ms ease;
|
|
687
|
+
background: var(--dt-color-surface-strong);
|
|
688
|
+
height: 4px;
|
|
689
|
+
width: 4px;
|
|
690
|
+
display: inline-block;
|
|
691
|
+
padding: 0;
|
|
692
|
+
opacity: 0.3;
|
|
693
|
+
border-radius: var(--dt-size-radius-pill);
|
|
694
|
+
animation: wave-094eaef1 1.5s ease infinite;
|
|
695
|
+
}
|
|
696
|
+
.dt-leftbar-row__is-typing span[data-v-094eaef1]:nth-child(1) {
|
|
697
|
+
animation-delay: 0ms;
|
|
698
|
+
}
|
|
699
|
+
.dt-leftbar-row__is-typing span[data-v-094eaef1]:nth-child(2) {
|
|
700
|
+
animation-delay: var(--td100);
|
|
701
|
+
}
|
|
702
|
+
.dt-leftbar-row__is-typing span[data-v-094eaef1]:nth-child(3) {
|
|
703
|
+
animation-delay: var(--td200);
|
|
704
|
+
}
|
|
705
|
+
.dt-leftbar-row__primary[data-v-094eaef1] {
|
|
706
|
+
display: flex;
|
|
707
|
+
align-items: center;
|
|
708
|
+
flex: 1;
|
|
709
|
+
width: 100%;
|
|
710
|
+
text-align: left;
|
|
711
|
+
background-color: var(--leftbar-row-color-background);
|
|
712
|
+
color: var(--leftbar-row-color-foreground);
|
|
713
|
+
text-decoration: none;
|
|
714
|
+
appearance: none;
|
|
715
|
+
font-size: inherit;
|
|
716
|
+
line-height: inherit;
|
|
717
|
+
margin: 0;
|
|
718
|
+
border: 0;
|
|
719
|
+
padding: 0;
|
|
720
|
+
border-radius: var(--leftbar-row-radius);
|
|
721
|
+
}
|
|
722
|
+
.dt-leftbar-row__primary[data-v-094eaef1]:active {
|
|
723
|
+
--leftbar-row-color-background: var(--dt-theme-sidebar-row-color-background-active);
|
|
724
|
+
}
|
|
725
|
+
.dt-leftbar-row__primary[data-v-094eaef1]:focus-visible {
|
|
726
|
+
box-shadow: var(--dt-shadow-focus-inset);
|
|
727
|
+
}
|
|
728
|
+
.dt-leftbar-row__action-button[data-v-094eaef1] {
|
|
729
|
+
opacity: 0;
|
|
730
|
+
width: var(--leftbar-row-action-width);
|
|
731
|
+
height: var(--leftbar-row-action-height);
|
|
732
|
+
}
|
|
733
|
+
.dt-leftbar-row__alpha[data-v-094eaef1] {
|
|
734
|
+
color: var(--leftbar-row-alpha-color-foreground);
|
|
735
|
+
display: flex;
|
|
736
|
+
box-sizing: border-box;
|
|
737
|
+
justify-content: center;
|
|
738
|
+
align-items: center;
|
|
739
|
+
padding-left: var(--dt-space-400);
|
|
740
|
+
padding-right: var(--dt-space-400);
|
|
741
|
+
width: var(--leftbar-row-alpha-width);
|
|
742
|
+
height: var(--leftbar-row-alpha-height);
|
|
743
|
+
border-radius: var(--leftbar-row-radius) 0 0 var(--leftbar-row-radius);
|
|
744
|
+
}
|
|
745
|
+
.dt-leftbar-row__label[data-v-094eaef1] {
|
|
746
|
+
flex: 0 1;
|
|
747
|
+
min-width: 0;
|
|
748
|
+
}
|
|
749
|
+
.dt-leftbar-row__omega[data-v-094eaef1] {
|
|
750
|
+
position: absolute;
|
|
751
|
+
display: flex;
|
|
752
|
+
right: var(--leftbar-row-action-position-right);
|
|
753
|
+
top: var(--leftbar-row-action-position-bottom);
|
|
754
|
+
transform: translateY(calc(var(--leftbar-row-action-position-bottom) * -1));
|
|
755
|
+
gap: var(--dt-space-300);
|
|
756
|
+
justify-content: flex-end;
|
|
757
|
+
align-items: center;
|
|
758
|
+
box-sizing: border-box;
|
|
759
|
+
border-radius: var(--leftbar-row-radius);
|
|
760
|
+
}
|
|
761
|
+
.dt-leftbar-row__unread-badge[data-v-094eaef1] {
|
|
762
|
+
display: var(--leftbar-row-unread-badge-display);
|
|
763
|
+
}
|
|
764
|
+
.dt-leftbar-row__active-voice[data-v-094eaef1] {
|
|
765
|
+
color: var(--dt-color-purple-400);
|
|
766
|
+
display: inline-flex;
|
|
767
|
+
-webkit-animation-name: opacity-pulsate-094eaef1;
|
|
768
|
+
-webkit-animation-duration: 1s;
|
|
769
|
+
-webkit-animation-iteration-count: infinite;
|
|
770
|
+
-webkit-animation-fill-mode: both;
|
|
771
|
+
-moz-animation-name: opacity-pulsate-094eaef1;
|
|
772
|
+
-moz-animation-duration: 1s;
|
|
773
|
+
-moz-animation-iteration-count: infinite;
|
|
774
|
+
-moz-animation-fill-mode: both;
|
|
775
|
+
animation-name: opacity-pulsate-094eaef1;
|
|
776
|
+
animation-duration: 1s;
|
|
777
|
+
animation-iteration-count: infinite;
|
|
778
|
+
animation-fill-mode: both;
|
|
779
|
+
}
|
|
780
|
+
.dt-leftbar-row__dnd[data-v-094eaef1] {
|
|
781
|
+
padding-top: var(--dt-space-200);
|
|
782
|
+
padding-right: var(--dt-space-300);
|
|
783
|
+
color: var(--dt-color-foreground-tertiary);
|
|
784
|
+
font-size: var(--dt-font-size-100);
|
|
785
|
+
line-height: var(--dt-font-line-height-400);
|
|
786
|
+
font-weight: var(--dt-font-weight-medium);
|
|
787
|
+
}
|
|
788
|
+
.dt-leftbar-row__container--off-duty[data-v-094eaef1] {
|
|
789
|
+
border-radius: var(--dt-size-radius-500);
|
|
790
|
+
background-color: var(--dt-badge-color-background-critical);
|
|
791
|
+
border: var(--dt-size-100) solid var(--dt-color-border-subtle);
|
|
792
|
+
}
|
|
793
|
+
.dt-leftbar-row__container--off-duty[data-v-094eaef1] .dt-leftbar-row__primary {
|
|
794
|
+
margin: calc(var(--dt-size-100) * -1);
|
|
795
|
+
}
|
|
796
|
+
.dt-leftbar-row--contact-centers[data-v-094eaef1] .dt-leftbar-row__alpha {
|
|
797
|
+
padding-right: var(--dt-space-450);
|
|
798
|
+
padding-left: var(--dt-space-450);
|
|
799
|
+
}
|
|
800
|
+
.dt-leftbar-row--contact-centers .dt-leftbar-row__action-container[data-v-094eaef1] {
|
|
801
|
+
display: inline-flex;
|
|
802
|
+
align-items: center;
|
|
803
|
+
justify-content: flex-end;
|
|
804
|
+
min-width: var(--dt-size-600);
|
|
805
|
+
height: var(--dt-size-500);
|
|
806
|
+
}
|
|
807
|
+
.dt-leftbar-row[data-v-094eaef1] .dt-leftbar-row__description {
|
|
808
|
+
display: block;
|
|
809
|
+
font-weight: var(--leftbar-row-description-font-weight);
|
|
810
|
+
font-size: var(--leftbar-row-description-font-size);
|
|
811
|
+
line-height: var(--leftbar-row-description-line-height);
|
|
812
|
+
color: var(--leftbar-row-description-color-foreground);
|
|
813
|
+
overflow: hidden;
|
|
814
|
+
text-overflow: ellipsis;
|
|
815
|
+
white-space: nowrap;
|
|
816
|
+
}
|
|
817
|
+
.dt-leftbar-row[data-v-094eaef1] .dt-leftbar-row__status {
|
|
818
|
+
display: block;
|
|
819
|
+
color: var(--leftbar-row-status-color-foreground);
|
|
820
|
+
font-size: var(--leftbar-row-status-font-size);
|
|
821
|
+
line-height: var(--leftbar-row-status-line-height);
|
|
822
|
+
padding-bottom: var(--dt-space-100);
|
|
823
|
+
overflow: hidden;
|
|
824
|
+
text-overflow: ellipsis;
|
|
825
|
+
white-space: nowrap;
|
|
826
|
+
}
|
|
827
|
+
.dt-leftbar-row[data-v-094eaef1] .dt-leftbar-row__meta-context ~ .dt-leftbar-row__meta-custom:not(:empty):before {
|
|
828
|
+
content: ' • ';
|
|
829
|
+
color: var(--dt-theme-sidebar-status-color-foreground);
|
|
830
|
+
}
|
|
831
|
+
.dt-leftbar-row__icon-cc[data-v-094eaef1] {
|
|
832
|
+
border-radius: var(--dt-size-200);
|
|
833
|
+
width: calc(var(--dt-size-300) * 3.5);
|
|
834
|
+
height: calc(var(--dt-size-300) * 3.5);
|
|
835
|
+
}
|
|
836
|
+
.opacity-pulsate[data-v-094eaef1] {
|
|
837
|
+
-webkit-animation-name: opacity-pulsate-094eaef1;
|
|
838
|
+
-webkit-animation-duration: 1s;
|
|
839
|
+
-webkit-animation-iteration-count: infinite;
|
|
840
|
+
-webkit-animation-fill-mode: both;
|
|
841
|
+
-moz-animation-name: opacity-pulsate-094eaef1;
|
|
842
|
+
-moz-animation-duration: 1s;
|
|
843
|
+
-moz-animation-iteration-count: infinite;
|
|
844
|
+
-moz-animation-fill-mode: both;
|
|
845
|
+
animation-name: opacity-pulsate-094eaef1;
|
|
846
|
+
animation-duration: 1s;
|
|
847
|
+
animation-iteration-count: infinite;
|
|
848
|
+
animation-fill-mode: both;
|
|
849
|
+
}
|
|
850
|
+
@-webkit-keyframes opacity-pulsate-094eaef1 {
|
|
851
|
+
0%,
|
|
852
|
+
100% {
|
|
853
|
+
opacity: 0.2;
|
|
854
|
+
}
|
|
855
|
+
50% {
|
|
856
|
+
opacity: 1;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
@-moz-keyframes opacity-pulsate-094eaef1 {
|
|
860
|
+
0%,
|
|
861
|
+
100% {
|
|
862
|
+
opacity: 0.2;
|
|
863
|
+
}
|
|
864
|
+
50% {
|
|
865
|
+
opacity: 1;
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
@keyframes opacity-pulsate-094eaef1 {
|
|
869
|
+
0%,
|
|
870
|
+
100% {
|
|
871
|
+
opacity: 0.2;
|
|
872
|
+
}
|
|
873
|
+
50% {
|
|
874
|
+
opacity: 1;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
@keyframes wave-094eaef1 {
|
|
878
|
+
0%,
|
|
879
|
+
50%,
|
|
880
|
+
100% {
|
|
881
|
+
transform: translate(0, 0);
|
|
882
|
+
}
|
|
883
|
+
10% {
|
|
884
|
+
transform: translate(0, -5px);
|
|
885
|
+
opacity: 90%;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
578
888
|
.dt-recipe-callbox[data-v-ef08f46e] {
|
|
579
889
|
padding: 0;
|
|
580
890
|
color: var(--dt-color-foreground-primary);
|
package/dist/types/index.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export * from "./recipes/conversation_view/time_pill";
|
|
|
66
66
|
export * from "./recipes/header/settings_menu_button";
|
|
67
67
|
export * from "./recipes/item_layout/contact_info";
|
|
68
68
|
export * from "./recipes/leftbar/callbox";
|
|
69
|
+
export * from "./recipes/leftbar/contact_centers_row";
|
|
69
70
|
export * from "./recipes/leftbar/contact_row";
|
|
70
71
|
export * from "./recipes/leftbar/general_row";
|
|
71
72
|
export * from "./recipes/leftbar/group_row";
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
/**
|
|
3
|
+
* Will be read out by a screen reader upon focus of this row. If not defined "description" will be read.
|
|
4
|
+
*/
|
|
5
|
+
ariaLabel: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Text displayed next to the icon. Required.
|
|
11
|
+
*/
|
|
12
|
+
description: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Determines if the row is selected
|
|
18
|
+
*/
|
|
19
|
+
selected: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: boolean;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Number of unread messages
|
|
25
|
+
*/
|
|
26
|
+
unreadCount: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Aria label for the menu button.
|
|
32
|
+
*/
|
|
33
|
+
menuButtonAriaLabel: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
}, any, {
|
|
38
|
+
labelWidth: string;
|
|
39
|
+
}, {
|
|
40
|
+
leftbarContactCentersRowClasses(): (string | {
|
|
41
|
+
'dt-leftbar-row--unread-count': boolean;
|
|
42
|
+
'dt-leftbar-row--selected': boolean;
|
|
43
|
+
})[];
|
|
44
|
+
getAriaLabel(): string;
|
|
45
|
+
contactRowListeners(): {
|
|
46
|
+
[k: string]: any;
|
|
47
|
+
};
|
|
48
|
+
showUnreadCount(): boolean;
|
|
49
|
+
}, {
|
|
50
|
+
adjustLabelWidth(): void;
|
|
51
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "click-menu")[], "click" | "click-menu", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
52
|
+
/**
|
|
53
|
+
* Will be read out by a screen reader upon focus of this row. If not defined "description" will be read.
|
|
54
|
+
*/
|
|
55
|
+
ariaLabel: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Text displayed next to the icon. Required.
|
|
61
|
+
*/
|
|
62
|
+
description: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
required: true;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Determines if the row is selected
|
|
68
|
+
*/
|
|
69
|
+
selected: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: boolean;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Number of unread messages
|
|
75
|
+
*/
|
|
76
|
+
unreadCount: {
|
|
77
|
+
type: NumberConstructor;
|
|
78
|
+
default: number;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Aria label for the menu button.
|
|
82
|
+
*/
|
|
83
|
+
menuButtonAriaLabel: {
|
|
84
|
+
type: StringConstructor;
|
|
85
|
+
required: true;
|
|
86
|
+
};
|
|
87
|
+
}>> & {
|
|
88
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
89
|
+
"onClick-menu"?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
}, {
|
|
91
|
+
ariaLabel: string;
|
|
92
|
+
selected: boolean;
|
|
93
|
+
unreadCount: number;
|
|
94
|
+
}, {}>;
|
|
95
|
+
export default _default;
|
|
96
|
+
//# sourceMappingURL=contact_centers_row.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact_centers_row.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/leftbar/contact_centers_row/contact_centers_row.vue.js"],"names":[],"mappings":";IAuBI;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;IAlCH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../recipes/leftbar/contact_centers_row/index.js"],"names":[],"mappings":""}
|
|
@@ -236,9 +236,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
236
236
|
selected: boolean;
|
|
237
237
|
avatarSrc: string;
|
|
238
238
|
avatarSeed: string;
|
|
239
|
-
hasUnreads: boolean;
|
|
240
239
|
unreadCount: string;
|
|
241
240
|
unreadCountTooltip: string;
|
|
241
|
+
hasUnreads: boolean;
|
|
242
242
|
hasCallButton: boolean;
|
|
243
243
|
callButtonTooltip: string;
|
|
244
244
|
isTyping: boolean;
|
|
@@ -269,9 +269,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
269
269
|
iconSize: string;
|
|
270
270
|
muted: boolean;
|
|
271
271
|
selected: boolean;
|
|
272
|
-
hasUnreads: boolean;
|
|
273
272
|
unreadCount: string;
|
|
274
273
|
unreadCountTooltip: string;
|
|
274
|
+
hasUnreads: boolean;
|
|
275
275
|
activeVoiceChat: boolean;
|
|
276
276
|
dndText: string;
|
|
277
277
|
dndTextTooltip: string;
|
|
@@ -107,9 +107,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
107
107
|
};
|
|
108
108
|
}>> & {}, {
|
|
109
109
|
selected: boolean;
|
|
110
|
-
hasUnreads: boolean;
|
|
111
110
|
unreadCount: string;
|
|
112
111
|
unreadCountTooltip: string;
|
|
112
|
+
hasUnreads: boolean;
|
|
113
113
|
isTyping: boolean;
|
|
114
114
|
groupCountText: string;
|
|
115
115
|
}, {}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dialpad/dialtone-vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.124.0",
|
|
4
4
|
"description": "Vue component library for Dialpad's design system Dialtone",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"vue-tsc": "^1.8.25",
|
|
80
80
|
"yo": "^5.0.0",
|
|
81
81
|
"yorkie": "^2.0.0",
|
|
82
|
-
"@dialpad/
|
|
83
|
-
"@dialpad/dialtone
|
|
82
|
+
"@dialpad/dialtone-css": "8.31.1",
|
|
83
|
+
"@dialpad/generator-dialtone": "0.1.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"vue": ">=3.2",
|