@dialpad/dialtone-vue 3.123.3 → 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/lib/datepicker.cjs +8 -4
- package/dist/lib/datepicker.cjs.map +1 -1
- package/dist/lib/datepicker.js +8 -4
- package/dist/lib/datepicker.js.map +1 -1
- 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 +1 -1
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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AA,KAAA,QAAA,SAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QACrBJ,IAAA,mBAuBM,OAvBN,YAuBM;AAAA,UArBI,SAAe,oCADvBK,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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AA;;;UAEhBF,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,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/lib/datepicker.cjs
CHANGED
|
@@ -298,7 +298,8 @@ const _sfc_main$2 = {
|
|
|
298
298
|
default: vue.withCtx(() => [
|
|
299
299
|
vue.createVNode(vue.unref(lib_tooltip.DtTooltip), {
|
|
300
300
|
message: __props.prevYearLabel,
|
|
301
|
-
placement: "top"
|
|
301
|
+
placement: "top",
|
|
302
|
+
"fallback-placements": ["top-start", "auto"]
|
|
302
303
|
}, {
|
|
303
304
|
anchor: vue.withCtx(() => [
|
|
304
305
|
vue.createVNode(vue.unref(lib_button.DtButton), {
|
|
@@ -330,7 +331,8 @@ const _sfc_main$2 = {
|
|
|
330
331
|
}, 8, ["message"]),
|
|
331
332
|
vue.createVNode(vue.unref(lib_tooltip.DtTooltip), {
|
|
332
333
|
message: __props.prevMonthLabel,
|
|
333
|
-
placement: "top"
|
|
334
|
+
placement: "top",
|
|
335
|
+
"fallback-placements": ["top-end", "auto"]
|
|
334
336
|
}, {
|
|
335
337
|
anchor: vue.withCtx(() => [
|
|
336
338
|
vue.createVNode(vue.unref(lib_button.DtButton), {
|
|
@@ -373,7 +375,8 @@ const _sfc_main$2 = {
|
|
|
373
375
|
default: vue.withCtx(() => [
|
|
374
376
|
vue.createVNode(vue.unref(lib_tooltip.DtTooltip), {
|
|
375
377
|
message: __props.nextMonthLabel,
|
|
376
|
-
placement: "top"
|
|
378
|
+
placement: "top",
|
|
379
|
+
"fallback-placements": ["top-start", "auto"]
|
|
377
380
|
}, {
|
|
378
381
|
anchor: vue.withCtx(() => [
|
|
379
382
|
vue.createVNode(vue.unref(lib_button.DtButton), {
|
|
@@ -405,7 +408,8 @@ const _sfc_main$2 = {
|
|
|
405
408
|
}, 8, ["message"]),
|
|
406
409
|
vue.createVNode(vue.unref(lib_tooltip.DtTooltip), {
|
|
407
410
|
message: __props.nextYearLabel,
|
|
408
|
-
placement: "top"
|
|
411
|
+
placement: "top",
|
|
412
|
+
"fallback-placements": ["top-end", "auto"]
|
|
409
413
|
}, {
|
|
410
414
|
anchor: vue.withCtx(() => [
|
|
411
415
|
vue.createVNode(vue.unref(lib_button.DtButton), {
|