@dialpad/dialtone-vue 2.68.0 → 2.70.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/CHANGELOG.json +1 -1
- package/CHANGELOG.md +20 -0
- package/dist/component-documentation.json +1 -1
- package/dist/dialtone-vue.common.js +87 -45
- package/dist/dialtone-vue.umd.js +68 -26
- package/dist/dialtone-vue.umd.min.js +1 -1
- package/package.json +4 -4
package/dist/dialtone-vue.umd.js
CHANGED
|
@@ -2384,8 +2384,8 @@ if (typeof window !== 'undefined') {
|
|
|
2384
2384
|
// Indicate to webpack that this file can be concatenated
|
|
2385
2385
|
/* harmony default export */ const setPublicPath = (null);
|
|
2386
2386
|
|
|
2387
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/avatar/avatar.vue?vue&type=template&id=
|
|
2388
|
-
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.avatarClasses,style:(_vm.initialKindStyle),attrs:{"id":_vm.id,"data-qa":"dt-avatar"}},[_c('div',{ref:"canvas",
|
|
2387
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/avatar/avatar.vue?vue&type=template&id=24ef0d66&
|
|
2388
|
+
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.avatarClasses,style:(_vm.initialKindStyle),attrs:{"id":_vm.id,"data-qa":"dt-avatar"}},[_c('div',{ref:"canvas",class:[_vm.canvasClass, 'd-avatar__canvas']},[(_vm.showDefaultSlot)?_vm._t("default"):_vm._e(),(_vm.showInitials)?_c('span',{staticClass:"d-ps-absolute d-zi-base",class:_vm.AVATAR_KIND_MODIFIERS.initials},[_vm._v(" "+_vm._s(_vm.formattedInitials)+" ")]):_vm._e()],2),(_vm.showGroup)?_c('span',{staticClass:"d-avatar__count d-zi-base1",attrs:{"data-qa":"dt-avatar-count"}},[_vm._v(_vm._s(_vm.formattedGroup))]):_vm._e(),(_vm.presence && !_vm.showGroup)?_c('dt-presence',_vm._b({staticClass:"d-zi-base1",class:[
|
|
2389
2389
|
'd-avatar__presence',
|
|
2390
2390
|
_vm.AVATAR_PRESENCE_SIZE_MODIFIERS[_vm.size] ],attrs:{"presence":_vm.presence,"data-qa":"dt-presence"}},'dt-presence',_vm.presenceProps,false)):_vm._e()],1)}
|
|
2391
2391
|
var staticRenderFns = []
|
|
@@ -2613,6 +2613,25 @@ function debounce(func) {
|
|
|
2613
2613
|
clearTimeout(TIMER);
|
|
2614
2614
|
TIMER = setTimeout(func, timeout);
|
|
2615
2615
|
}
|
|
2616
|
+
/**
|
|
2617
|
+
* Checks if the element is out of the viewport
|
|
2618
|
+
* https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/
|
|
2619
|
+
* @param {HTMLElement} element The element to check
|
|
2620
|
+
* @return {Object} A set of booleans for each side of the element
|
|
2621
|
+
*/
|
|
2622
|
+
|
|
2623
|
+
function isOutOfViewPort(element) {
|
|
2624
|
+
const bounding = element.getBoundingClientRect();
|
|
2625
|
+
const isOut = {
|
|
2626
|
+
top: bounding.top < 0,
|
|
2627
|
+
left: bounding.left < 0,
|
|
2628
|
+
bottom: bounding.bottom > (window.innerHeight || document.documentElement.clientHeight),
|
|
2629
|
+
right: bounding.right > (window.innerWidth || document.documentElement.clientWidth)
|
|
2630
|
+
};
|
|
2631
|
+
isOut.any = Object.values(isOut).some(val => val);
|
|
2632
|
+
isOut.all = Object.values(isOut).every(val => val);
|
|
2633
|
+
return isOut;
|
|
2634
|
+
}
|
|
2616
2635
|
/* harmony default export */ const utils = ({
|
|
2617
2636
|
getUniqueString,
|
|
2618
2637
|
getRandomElement,
|
|
@@ -2623,7 +2642,8 @@ function debounce(func) {
|
|
|
2623
2642
|
htmlFragment,
|
|
2624
2643
|
flushPromises,
|
|
2625
2644
|
kebabCaseToPascalCase,
|
|
2626
|
-
debounce
|
|
2645
|
+
debounce,
|
|
2646
|
+
isOutOfViewPort
|
|
2627
2647
|
});
|
|
2628
2648
|
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/presence/presence.vue?vue&type=template&id=77957bb3&
|
|
2629
2649
|
var presencevue_type_template_id_77957bb3_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"d-presence",attrs:{"data-qa":"dt-presence","role":"status","aria-live":_vm.$attrs.ariaLive || 'off'}},[(_vm.srText)?_c('span',{staticClass:"sr-only",attrs:{"data-qa":"dt-presence-sr-text"}},[_vm._v(_vm._s(_vm.srText)+" ")]):_vm._e(),_c('div',{staticClass:"d-presence__inner",class:{
|
|
@@ -2972,6 +2992,14 @@ const AVATAR_GROUP_VALIDATOR = group => group > 1;
|
|
|
2972
2992
|
default: ''
|
|
2973
2993
|
},
|
|
2974
2994
|
|
|
2995
|
+
/**
|
|
2996
|
+
* Set classes on the avatar canvas. Wrapper around the core avatar image.
|
|
2997
|
+
*/
|
|
2998
|
+
canvasClass: {
|
|
2999
|
+
type: [String, Array, Object],
|
|
3000
|
+
default: ''
|
|
3001
|
+
},
|
|
3002
|
+
|
|
2975
3003
|
/**
|
|
2976
3004
|
* Determines whether to show the presence indicator for
|
|
2977
3005
|
* Avatar - accepts PRESENCE_STATES values: 'busy', 'away', 'offline',
|
|
@@ -8200,8 +8228,8 @@ return [_c('ul',{ref:"listWrapper",class:_vm.listClasses,attrs:{"id":_vm.listId,
|
|
|
8200
8228
|
var dropdownvue_type_template_id_359f1c8b_staticRenderFns = []
|
|
8201
8229
|
|
|
8202
8230
|
|
|
8203
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/popover/popover.vue?vue&type=template&id=
|
|
8204
|
-
var
|
|
8231
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/popover/popover.vue?vue&type=template&id=683dbc64&
|
|
8232
|
+
var popovervue_type_template_id_683dbc64_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.modal && _vm.isOpen)?_c('portal',[_c('div',{staticClass:"d-modal--transparent",attrs:{"aria-hidden":_vm.modal && _vm.isOpen ? 'false' : 'true'},on:{"click":function($event){$event.preventDefault();$event.stopPropagation();}}})]):_vm._e(),_c(_vm.elementType,_vm._g({ref:"popover",tag:"component",class:['d-popover', { 'd-popover__anchor--opened': _vm.isOpen }],attrs:{"data-qa":"dt-popover-container"}},_vm.$listeners),[_c('div',{ref:"anchor",attrs:{"id":!_vm.ariaLabelledby && _vm.labelledBy,"data-qa":"dt-popover-anchor","tabindex":_vm.openOnContext ? 0 : undefined},on:{"!click":function($event){return _vm.defaultToggleOpen.apply(null, arguments)},"contextmenu":_vm.onContext,"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"up",38,$event.key,["Up","ArrowUp"])){ return null; }$event.preventDefault();return _vm.onArrowKeyPress.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"down",40,$event.key,["Down","ArrowDown"])){ return null; }$event.preventDefault();return _vm.onArrowKeyPress.apply(null, arguments)}],"!keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"escape",undefined,$event.key,undefined)){ return null; }return _vm.closePopover.apply(null, arguments)}}},[_vm._t("anchor",null,{"attrs":{
|
|
8205
8233
|
'aria-expanded': _vm.isOpen.toString(),
|
|
8206
8234
|
'aria-controls': _vm.id,
|
|
8207
8235
|
'aria-haspopup': _vm.role,
|
|
@@ -8212,7 +8240,7 @@ var popovervue_type_template_id_cdba9054_render = function () {var _vm=this;var
|
|
|
8212
8240
|
'd-popover__content',
|
|
8213
8241
|
_vm.POPOVER_PADDING_CLASSES[_vm.padding],
|
|
8214
8242
|
_vm.contentClass ],attrs:{"data-qa":"dt-popover-content"}},[_vm._t("content",null,{"close":_vm.closePopover})],2),(_vm.$slots.footerContent)?_c('popover-header-footer',{ref:"popover__footer",class:_vm.POPOVER_HEADER_FOOTER_PADDING_CLASSES[_vm.padding],attrs:{"type":"footer","content-class":_vm.footerClass},scopedSlots:_vm._u([{key:"content",fn:function(){return [_vm._t("footerContent",null,{"close":_vm.closePopover})]},proxy:true}],null,true)}):_vm._e(),(_vm.showVisuallyHiddenClose)?_c('sr-only-close-button',{attrs:{"visually-hidden-close-label":_vm.visuallyHiddenCloseLabel},on:{"close":_vm.closePopover}}):_vm._e()],1)],1)],1)}
|
|
8215
|
-
var
|
|
8243
|
+
var popovervue_type_template_id_683dbc64_staticRenderFns = []
|
|
8216
8244
|
|
|
8217
8245
|
|
|
8218
8246
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
|
|
@@ -13627,6 +13655,7 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13627
13655
|
isOpen(isOpen, isPrev) {
|
|
13628
13656
|
if (isOpen) {
|
|
13629
13657
|
this.initTippyInstance();
|
|
13658
|
+
this.tip.show();
|
|
13630
13659
|
} else if (!isOpen && isPrev !== isOpen) {
|
|
13631
13660
|
this.removeEventListeners();
|
|
13632
13661
|
this.tip.hide();
|
|
@@ -13642,16 +13671,14 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13642
13671
|
|
|
13643
13672
|
if (this.isOpen) {
|
|
13644
13673
|
this.initTippyInstance();
|
|
13674
|
+
this.tip.show();
|
|
13645
13675
|
} // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which
|
|
13646
13676
|
// currently is var(--space-300) (4px). If not the intersectionObserver will continually trigger in an infinite
|
|
13647
13677
|
// loop.
|
|
13648
13678
|
// threshold 1.0 makes this trigger every time the dialog "touches" the edge of the viewport.
|
|
13649
13679
|
|
|
13650
13680
|
|
|
13651
|
-
this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport
|
|
13652
|
-
rootMargin: '-8px',
|
|
13653
|
-
threshold: 1.0
|
|
13654
|
-
});
|
|
13681
|
+
this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);
|
|
13655
13682
|
this.intersectionObserver.observe(this.popoverContentEl);
|
|
13656
13683
|
},
|
|
13657
13684
|
|
|
@@ -13669,8 +13696,12 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13669
13696
|
******************/
|
|
13670
13697
|
methods: {
|
|
13671
13698
|
hasIntersectedViewport(entries) {
|
|
13672
|
-
|
|
13673
|
-
|
|
13699
|
+
var _entries$;
|
|
13700
|
+
|
|
13701
|
+
const dialog = entries === null || entries === void 0 ? void 0 : (_entries$ = entries[0]) === null || _entries$ === void 0 ? void 0 : _entries$.target;
|
|
13702
|
+
if (!dialog) return;
|
|
13703
|
+
const isOut = isOutOfViewPort(dialog);
|
|
13704
|
+
this.isOutsideViewport = isOut.bottom || isOut.top;
|
|
13674
13705
|
},
|
|
13675
13706
|
|
|
13676
13707
|
popperOptions() {
|
|
@@ -13781,6 +13812,9 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13781
13812
|
|
|
13782
13813
|
if (element.tagName.toLowerCase() === 'body') {
|
|
13783
13814
|
element.classList.add('d-of-hidden');
|
|
13815
|
+
this.tip.setProps({
|
|
13816
|
+
offset: this.offset
|
|
13817
|
+
});
|
|
13784
13818
|
} else {
|
|
13785
13819
|
element.classList.add('d-zi-popover');
|
|
13786
13820
|
}
|
|
@@ -13798,6 +13832,9 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13798
13832
|
|
|
13799
13833
|
if (element.tagName.toLowerCase() === 'body') {
|
|
13800
13834
|
element.classList.remove('d-of-hidden');
|
|
13835
|
+
this.tip.setProps({
|
|
13836
|
+
offset: this.offset
|
|
13837
|
+
});
|
|
13801
13838
|
} else {
|
|
13802
13839
|
element.classList.remove('d-zi-popover');
|
|
13803
13840
|
}
|
|
@@ -13818,6 +13855,8 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13818
13855
|
if (this.contentWidth === null) {
|
|
13819
13856
|
this.popoverContentEl.style.width = 'auto';
|
|
13820
13857
|
}
|
|
13858
|
+
|
|
13859
|
+
this.addEventListeners();
|
|
13821
13860
|
},
|
|
13822
13861
|
|
|
13823
13862
|
async onLeaveTransitionComplete() {
|
|
@@ -13830,7 +13869,7 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13830
13869
|
}
|
|
13831
13870
|
|
|
13832
13871
|
(_this$tip8 = this.tip) === null || _this$tip8 === void 0 ? void 0 : _this$tip8.unmount();
|
|
13833
|
-
this.enableScrolling();
|
|
13872
|
+
await this.enableScrolling();
|
|
13834
13873
|
this.$emit('opened', false);
|
|
13835
13874
|
|
|
13836
13875
|
if (this.open !== null) {
|
|
@@ -13840,7 +13879,7 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13840
13879
|
|
|
13841
13880
|
async onEnterTransitionComplete() {
|
|
13842
13881
|
this.focusInitialElement();
|
|
13843
|
-
this.preventScrolling(); // await next tick in case the user wants to change focus themselves.
|
|
13882
|
+
await this.preventScrolling(); // await next tick in case the user wants to change focus themselves.
|
|
13844
13883
|
|
|
13845
13884
|
await this.$nextTick();
|
|
13846
13885
|
this.$emit('opened', true, this.$refs.popover__content);
|
|
@@ -13946,11 +13985,6 @@ var popover_header_footer_component = normalizeComponent(
|
|
|
13946
13985
|
onClickOutside: this.onClickOutside,
|
|
13947
13986
|
onShow: this.onShow
|
|
13948
13987
|
});
|
|
13949
|
-
this.tip.setProps({
|
|
13950
|
-
zIndex: this.modal ? 650 : this.calculateAnchorZindex()
|
|
13951
|
-
});
|
|
13952
|
-
this.tip.show();
|
|
13953
|
-
this.addEventListeners();
|
|
13954
13988
|
}
|
|
13955
13989
|
|
|
13956
13990
|
}
|
|
@@ -13972,8 +14006,8 @@ var popovervue_type_style_index_0_lang_less_ = __webpack_require__(532);
|
|
|
13972
14006
|
|
|
13973
14007
|
var popover_component = normalizeComponent(
|
|
13974
14008
|
popover_popovervue_type_script_lang_js_,
|
|
13975
|
-
|
|
13976
|
-
|
|
14009
|
+
popovervue_type_template_id_683dbc64_render,
|
|
14010
|
+
popovervue_type_template_id_683dbc64_staticRenderFns,
|
|
13977
14011
|
false,
|
|
13978
14012
|
null,
|
|
13979
14013
|
null,
|
|
@@ -24609,9 +24643,9 @@ var group_row_component = normalizeComponent(
|
|
|
24609
24643
|
/* harmony default export */ const group_row = (group_row_component.exports);
|
|
24610
24644
|
;// CONCATENATED MODULE: ./recipes/leftbar/group_row/index.js
|
|
24611
24645
|
|
|
24612
|
-
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/leftbar/contact_row/contact_row.vue?vue&type=template&id=
|
|
24613
|
-
var
|
|
24614
|
-
var
|
|
24646
|
+
;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/leftbar/contact_row/contact_row.vue?vue&type=template&id=5d3cfbea&
|
|
24647
|
+
var contact_rowvue_type_template_id_5d3cfbea_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('dt-recipe-general-row',_vm._g({attrs:{"unread-count":_vm.unreadCount,"description":(_vm.name + " " + _vm.presenceText + " " + _vm.userStatus),"has-unreads":_vm.hasUnreads,"selected":_vm.selected,"has-call-button":_vm.hasCallButton,"muted":_vm.muted,"is-typing":_vm.isTyping,"call-button-tooltip":_vm.callButtonTooltip,"unread-count-tooltip":_vm.unreadCountTooltip},scopedSlots:_vm._u([{key:"left",fn:function(){return [_c('dt-avatar',{attrs:{"size":"sm","seed":_vm.avatarSeed,"presence":_vm.avatarPresence}},[(_vm.avatarSrc)?_c('img',{attrs:{"data-qa":"dt-avatar-image","src":_vm.avatarSrc,"alt":_vm.name}}):(_vm.noInitials)?[_c('dt-icon',{attrs:{"name":"user","size":"200"}})]:[_vm._v(" "+_vm._s(_vm.avatarInitial)+" ")]],2)]},proxy:true},{key:"label",fn:function(){return [_c('dt-emoji-text-wrapper',{staticClass:"dt-leftbar-row__description",attrs:{"data-qa":"dt-leftbar-row-description","size":"200"}},[_vm._v(" "+_vm._s(_vm.name)+" ")]),_c('div',{staticClass:"dt-leftbar-row__status"},[(_vm.presenceText)?_c('span',{class:['dt-leftbar-row__meta-context', _vm.presenceColorClass],attrs:{"data-qa":"dt-leftbar-row-presence-text"}},[_vm._v(" "+_vm._s(_vm.presenceText)+" ")]):_vm._e(),(_vm.userStatus)?_c('dt-emoji-text-wrapper',{staticClass:"dt-leftbar-row__meta-custom",attrs:{"size":"100","element-type":"span","data-qa":"dt-leftbar-row-user-status"}},[_vm._v(" "+_vm._s(_vm.userStatus)+" ")]):_vm._e()],1)]},proxy:true}])},_vm.$listeners))}
|
|
24648
|
+
var contact_rowvue_type_template_id_5d3cfbea_staticRenderFns = []
|
|
24615
24649
|
|
|
24616
24650
|
|
|
24617
24651
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-80[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./recipes/leftbar/contact_row/contact_row.vue?vue&type=script&lang=js&
|
|
@@ -24796,6 +24830,14 @@ var contact_rowvue_type_template_id_6a63c490_staticRenderFns = []
|
|
|
24796
24830
|
default: false
|
|
24797
24831
|
},
|
|
24798
24832
|
|
|
24833
|
+
/**
|
|
24834
|
+
* Whether the contact row should display a call button when hovered.
|
|
24835
|
+
*/
|
|
24836
|
+
hasCallButton: {
|
|
24837
|
+
type: Boolean,
|
|
24838
|
+
default: true
|
|
24839
|
+
},
|
|
24840
|
+
|
|
24799
24841
|
/**
|
|
24800
24842
|
* Text shown when the call button is hovered.
|
|
24801
24843
|
*/
|
|
@@ -24864,8 +24906,8 @@ var contact_rowvue_type_template_id_6a63c490_staticRenderFns = []
|
|
|
24864
24906
|
;
|
|
24865
24907
|
var contact_row_component = normalizeComponent(
|
|
24866
24908
|
contact_row_contact_rowvue_type_script_lang_js_,
|
|
24867
|
-
|
|
24868
|
-
|
|
24909
|
+
contact_rowvue_type_template_id_5d3cfbea_render,
|
|
24910
|
+
contact_rowvue_type_template_id_5d3cfbea_staticRenderFns,
|
|
24869
24911
|
false,
|
|
24870
24912
|
null,
|
|
24871
24913
|
null,
|