@dialpad/dialtone-vue 2.8.1 → 2.10.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.common.js +96 -42
- package/dist/dialtone-vue.umd.js +96 -42
- package/dist/dialtone-vue.umd.min.js +1 -1
- package/package.json +1 -1
|
@@ -12642,12 +12642,12 @@ var list_section_component = normalizeComponent(
|
|
|
12642
12642
|
/* harmony default export */ const list_section = (list_section_component.exports);
|
|
12643
12643
|
;// CONCATENATED MODULE: ./components/list_section/index.js
|
|
12644
12644
|
|
|
12645
|
-
;// 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/list_item/list_item.vue?vue&type=template&id=
|
|
12646
|
-
var
|
|
12645
|
+
;// 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/list_item/list_item.vue?vue&type=template&id=78ac4fcc&
|
|
12646
|
+
var list_itemvue_type_template_id_78ac4fcc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.elementType,_vm._g({tag:"component",class:['dt-list-item d-ls-none focus-visible', {
|
|
12647
12647
|
'dt-list-item--focusable': _vm.isFocusable,
|
|
12648
12648
|
'dt-list-item--highlighted': _vm.isHighlighted,
|
|
12649
|
-
}],attrs:{"id":_vm.id,"tabindex":_vm.isFocusable ? 0 : -1,"role":_vm.role,"aria-selected":_vm.isHighlighted}
|
|
12650
|
-
var
|
|
12649
|
+
}],attrs:{"id":_vm.id,"tabindex":_vm.isFocusable ? 0 : -1,"role":_vm.role,"aria-selected":_vm.isHighlighted}},_vm.listItemListeners),[(_vm.listItemType)?_c(_vm.listItemType,{tag:"component",scopedSlots:_vm._u([_vm._l((_vm.$slots),function(_,slotName){return {key:slotName,fn:function(){return [_vm._t(slotName)]},proxy:true}})],null,true)}):_vm._t("default")],2)}
|
|
12650
|
+
var list_itemvue_type_template_id_78ac4fcc_staticRenderFns = []
|
|
12651
12651
|
|
|
12652
12652
|
|
|
12653
12653
|
;// 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/list_item/default_list_item.vue?vue&type=template&id=4c89d4ed&
|
|
@@ -12759,10 +12759,6 @@ var default_list_item_component = normalizeComponent(
|
|
|
12759
12759
|
//
|
|
12760
12760
|
//
|
|
12761
12761
|
//
|
|
12762
|
-
//
|
|
12763
|
-
//
|
|
12764
|
-
//
|
|
12765
|
-
//
|
|
12766
12762
|
|
|
12767
12763
|
|
|
12768
12764
|
|
|
@@ -12830,7 +12826,7 @@ var default_list_item_component = normalizeComponent(
|
|
|
12830
12826
|
validator: t => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t)
|
|
12831
12827
|
}
|
|
12832
12828
|
},
|
|
12833
|
-
emits: ['click'],
|
|
12829
|
+
emits: ['click', 'keydown', 'mousemove', 'mouseleave'],
|
|
12834
12830
|
|
|
12835
12831
|
data() {
|
|
12836
12832
|
return {
|
|
@@ -12850,6 +12846,26 @@ var default_list_item_component = normalizeComponent(
|
|
|
12850
12846
|
}
|
|
12851
12847
|
},
|
|
12852
12848
|
|
|
12849
|
+
listItemListeners() {
|
|
12850
|
+
return { ...this.$listeners,
|
|
12851
|
+
keydown: event => {
|
|
12852
|
+
if (['enter', 'space'].includes(event.code.toLowerCase())) {
|
|
12853
|
+
this.onClick(event);
|
|
12854
|
+
}
|
|
12855
|
+
|
|
12856
|
+
this.$emit('keydown', event);
|
|
12857
|
+
},
|
|
12858
|
+
mousemove: event => {
|
|
12859
|
+
this.onMouseHover(event);
|
|
12860
|
+
this.$emit('mousemove', event);
|
|
12861
|
+
},
|
|
12862
|
+
mouseleave: event => {
|
|
12863
|
+
this.onMouseLeave(event);
|
|
12864
|
+
this.$emit('mouseleave', event);
|
|
12865
|
+
}
|
|
12866
|
+
};
|
|
12867
|
+
},
|
|
12868
|
+
|
|
12853
12869
|
/**
|
|
12854
12870
|
* For keyboard navigation, whether or not this item is currently highlighted.
|
|
12855
12871
|
* An injected highlightId will override the default mouseover highlight.
|
|
@@ -12876,8 +12892,8 @@ var default_list_item_component = normalizeComponent(
|
|
|
12876
12892
|
|
|
12877
12893
|
},
|
|
12878
12894
|
methods: {
|
|
12879
|
-
onClick() {
|
|
12880
|
-
this.$emit('click');
|
|
12895
|
+
onClick(e) {
|
|
12896
|
+
this.$emit('click', e);
|
|
12881
12897
|
},
|
|
12882
12898
|
|
|
12883
12899
|
onMouseHover() {
|
|
@@ -12907,8 +12923,8 @@ var list_itemvue_type_style_index_0_lang_less_ = __webpack_require__(502);
|
|
|
12907
12923
|
|
|
12908
12924
|
var list_item_component = normalizeComponent(
|
|
12909
12925
|
list_item_list_itemvue_type_script_lang_js_,
|
|
12910
|
-
|
|
12911
|
-
|
|
12926
|
+
list_itemvue_type_template_id_78ac4fcc_render,
|
|
12927
|
+
list_itemvue_type_template_id_78ac4fcc_staticRenderFns,
|
|
12912
12928
|
false,
|
|
12913
12929
|
null,
|
|
12914
12930
|
null,
|
|
@@ -14861,18 +14877,20 @@ var select_menu_component = normalizeComponent(
|
|
|
14861
14877
|
;// CONCATENATED MODULE: ./components/select_menu/index.js
|
|
14862
14878
|
|
|
14863
14879
|
|
|
14864
|
-
;// 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/toast/toast.vue?vue&type=template&id=
|
|
14865
|
-
var
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
var
|
|
14880
|
+
;// 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/toast/toast.vue?vue&type=template&id=7c8c2d2a&
|
|
14881
|
+
var toastvue_type_template_id_7c8c2d2a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isShown)?_c('div',{class:[
|
|
14882
|
+
'd-toast',
|
|
14883
|
+
_vm.kindClass,
|
|
14884
|
+
{ 'd-toast--important': _vm.important } ],attrs:{"data-qa":"dt-toast","aria-hidden":(!_vm.isShown).toString()}},[_c('div',{staticClass:"d-toast__dialog"},[_c('dt-notice-icon',_vm._g({attrs:{"kind":_vm.kind}},_vm.$listeners),[_vm._t("icon")],2),_c('dt-notice-content',_vm._g({attrs:{"title-id":_vm.titleId,"content-id":_vm.contentId,"title":_vm.title,"role":_vm.role},scopedSlots:_vm._u([{key:"titleOverride",fn:function(){return [_vm._t("titleOverride")]},proxy:true}],null,true)},_vm.$listeners),[_vm._t("default",function(){return [_vm._v(" "+_vm._s(_vm.message)+" ")]})],2),_c('dt-notice-action',_vm._g({attrs:{"hide-close":_vm.hideClose,"close-button-props":_vm.closeButtonProps}},_vm.noticeActionListeners),[_vm._t("action")],2)],1)]):_vm._e()}
|
|
14885
|
+
var toastvue_type_template_id_7c8c2d2a_staticRenderFns = []
|
|
14870
14886
|
|
|
14871
14887
|
|
|
14872
14888
|
;// CONCATENATED MODULE: ./components/toast/toast_constants.js
|
|
14873
14889
|
const TOAST_ROLES = ['status', 'alert'];
|
|
14890
|
+
const TOAST_MIN_DURATION = 6000;
|
|
14874
14891
|
/* harmony default export */ const toast_constants = ({
|
|
14875
|
-
TOAST_ROLES
|
|
14892
|
+
TOAST_ROLES,
|
|
14893
|
+
TOAST_MIN_DURATION
|
|
14876
14894
|
});
|
|
14877
14895
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40[0].rules[0].use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/toast/toast.vue?vue&type=script&lang=js&
|
|
14878
14896
|
//
|
|
@@ -14923,8 +14941,6 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
14923
14941
|
//
|
|
14924
14942
|
//
|
|
14925
14943
|
//
|
|
14926
|
-
//
|
|
14927
|
-
//
|
|
14928
14944
|
|
|
14929
14945
|
|
|
14930
14946
|
|
|
@@ -15012,6 +15028,17 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15012
15028
|
default: false
|
|
15013
15029
|
},
|
|
15014
15030
|
|
|
15031
|
+
/**
|
|
15032
|
+
* Controls whether the toast is shown. If a valid duration is provided, the toast will disappear
|
|
15033
|
+
* after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update
|
|
15034
|
+
* the data in your component.
|
|
15035
|
+
* Supports .sync modifier
|
|
15036
|
+
*/
|
|
15037
|
+
show: {
|
|
15038
|
+
type: Boolean,
|
|
15039
|
+
default: false
|
|
15040
|
+
},
|
|
15041
|
+
|
|
15015
15042
|
/**
|
|
15016
15043
|
* Props for the toast close button.
|
|
15017
15044
|
*/
|
|
@@ -15030,13 +15057,14 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15030
15057
|
|
|
15031
15058
|
/**
|
|
15032
15059
|
* The duration in ms the toast will display before disappearing.
|
|
15033
|
-
*
|
|
15060
|
+
* The toast won't disappear if the duration is not provided.
|
|
15061
|
+
* If it's provided, it should be equal to or greater than 6000.
|
|
15034
15062
|
*/
|
|
15035
15063
|
duration: {
|
|
15036
15064
|
type: Number,
|
|
15037
|
-
default:
|
|
15065
|
+
default: null,
|
|
15038
15066
|
validator: duration => {
|
|
15039
|
-
return duration >=
|
|
15067
|
+
return duration >= TOAST_MIN_DURATION;
|
|
15040
15068
|
}
|
|
15041
15069
|
}
|
|
15042
15070
|
},
|
|
@@ -15044,7 +15072,8 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15044
15072
|
|
|
15045
15073
|
data() {
|
|
15046
15074
|
return {
|
|
15047
|
-
|
|
15075
|
+
isShown: false,
|
|
15076
|
+
minDuration: TOAST_MIN_DURATION
|
|
15048
15077
|
};
|
|
15049
15078
|
},
|
|
15050
15079
|
|
|
@@ -15058,29 +15087,54 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15058
15087
|
base: 'd-toast--base'
|
|
15059
15088
|
};
|
|
15060
15089
|
return kindClasses[this.kind];
|
|
15090
|
+
},
|
|
15091
|
+
|
|
15092
|
+
noticeActionListeners() {
|
|
15093
|
+
return { // eslint-disable-next-line vue/no-deprecated-dollar-listeners-api
|
|
15094
|
+
...this.$listeners,
|
|
15095
|
+
close: event => {
|
|
15096
|
+
this.isShown = false;
|
|
15097
|
+
this.$emit('update:show', false);
|
|
15098
|
+
this.$emit('close', event);
|
|
15099
|
+
}
|
|
15100
|
+
};
|
|
15101
|
+
},
|
|
15102
|
+
|
|
15103
|
+
shouldSetTimeout() {
|
|
15104
|
+
return !!this.duration && this.duration >= this.minDuration;
|
|
15061
15105
|
}
|
|
15062
15106
|
|
|
15063
15107
|
},
|
|
15108
|
+
watch: {
|
|
15109
|
+
show: {
|
|
15110
|
+
handler: function (show) {
|
|
15111
|
+
this.isShown = show;
|
|
15112
|
+
|
|
15113
|
+
if (show) {
|
|
15114
|
+
this.setTimeout();
|
|
15115
|
+
} else {
|
|
15116
|
+
clearTimeout(this.displayTimer);
|
|
15117
|
+
}
|
|
15118
|
+
},
|
|
15119
|
+
immediate: true
|
|
15120
|
+
}
|
|
15121
|
+
},
|
|
15064
15122
|
|
|
15065
|
-
/* TODO Vue 3 Migration
|
|
15066
|
-
* destroyed() should be updated to unmounted() when migrating to Vue 3.
|
|
15067
|
-
*/
|
|
15068
15123
|
// eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle
|
|
15069
15124
|
destroyed() {
|
|
15070
|
-
|
|
15125
|
+
if (this.shouldSetTimeout) {
|
|
15126
|
+
clearTimeout(this.displayTimer);
|
|
15127
|
+
}
|
|
15071
15128
|
},
|
|
15072
15129
|
|
|
15073
15130
|
methods: {
|
|
15074
|
-
|
|
15075
|
-
this.
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
close() {
|
|
15082
|
-
this.hidden = true;
|
|
15083
|
-
clearTimeout(this.displayTimer);
|
|
15131
|
+
setTimeout() {
|
|
15132
|
+
if (this.shouldSetTimeout) {
|
|
15133
|
+
this.displayTimer = setTimeout(() => {
|
|
15134
|
+
this.isShown = false;
|
|
15135
|
+
this.$emit('update:show', false);
|
|
15136
|
+
}, this.duration);
|
|
15137
|
+
}
|
|
15084
15138
|
}
|
|
15085
15139
|
|
|
15086
15140
|
}
|
|
@@ -15097,8 +15151,8 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15097
15151
|
;
|
|
15098
15152
|
var toast_component = normalizeComponent(
|
|
15099
15153
|
toast_toastvue_type_script_lang_js_,
|
|
15100
|
-
|
|
15101
|
-
|
|
15154
|
+
toastvue_type_template_id_7c8c2d2a_render,
|
|
15155
|
+
toastvue_type_template_id_7c8c2d2a_staticRenderFns,
|
|
15102
15156
|
false,
|
|
15103
15157
|
null,
|
|
15104
15158
|
null,
|
package/dist/dialtone-vue.umd.js
CHANGED
|
@@ -12660,12 +12660,12 @@ var list_section_component = normalizeComponent(
|
|
|
12660
12660
|
/* harmony default export */ const list_section = (list_section_component.exports);
|
|
12661
12661
|
;// CONCATENATED MODULE: ./components/list_section/index.js
|
|
12662
12662
|
|
|
12663
|
-
;// 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/list_item/list_item.vue?vue&type=template&id=
|
|
12664
|
-
var
|
|
12663
|
+
;// 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/list_item/list_item.vue?vue&type=template&id=78ac4fcc&
|
|
12664
|
+
var list_itemvue_type_template_id_78ac4fcc_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.elementType,_vm._g({tag:"component",class:['dt-list-item d-ls-none focus-visible', {
|
|
12665
12665
|
'dt-list-item--focusable': _vm.isFocusable,
|
|
12666
12666
|
'dt-list-item--highlighted': _vm.isHighlighted,
|
|
12667
|
-
}],attrs:{"id":_vm.id,"tabindex":_vm.isFocusable ? 0 : -1,"role":_vm.role,"aria-selected":_vm.isHighlighted}
|
|
12668
|
-
var
|
|
12667
|
+
}],attrs:{"id":_vm.id,"tabindex":_vm.isFocusable ? 0 : -1,"role":_vm.role,"aria-selected":_vm.isHighlighted}},_vm.listItemListeners),[(_vm.listItemType)?_c(_vm.listItemType,{tag:"component",scopedSlots:_vm._u([_vm._l((_vm.$slots),function(_,slotName){return {key:slotName,fn:function(){return [_vm._t(slotName)]},proxy:true}})],null,true)}):_vm._t("default")],2)}
|
|
12668
|
+
var list_itemvue_type_template_id_78ac4fcc_staticRenderFns = []
|
|
12669
12669
|
|
|
12670
12670
|
|
|
12671
12671
|
;// 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/list_item/default_list_item.vue?vue&type=template&id=4c89d4ed&
|
|
@@ -12777,10 +12777,6 @@ var default_list_item_component = normalizeComponent(
|
|
|
12777
12777
|
//
|
|
12778
12778
|
//
|
|
12779
12779
|
//
|
|
12780
|
-
//
|
|
12781
|
-
//
|
|
12782
|
-
//
|
|
12783
|
-
//
|
|
12784
12780
|
|
|
12785
12781
|
|
|
12786
12782
|
|
|
@@ -12848,7 +12844,7 @@ var default_list_item_component = normalizeComponent(
|
|
|
12848
12844
|
validator: t => Object.values(LIST_ITEM_NAVIGATION_TYPES).includes(t)
|
|
12849
12845
|
}
|
|
12850
12846
|
},
|
|
12851
|
-
emits: ['click'],
|
|
12847
|
+
emits: ['click', 'keydown', 'mousemove', 'mouseleave'],
|
|
12852
12848
|
|
|
12853
12849
|
data() {
|
|
12854
12850
|
return {
|
|
@@ -12868,6 +12864,26 @@ var default_list_item_component = normalizeComponent(
|
|
|
12868
12864
|
}
|
|
12869
12865
|
},
|
|
12870
12866
|
|
|
12867
|
+
listItemListeners() {
|
|
12868
|
+
return { ...this.$listeners,
|
|
12869
|
+
keydown: event => {
|
|
12870
|
+
if (['enter', 'space'].includes(event.code.toLowerCase())) {
|
|
12871
|
+
this.onClick(event);
|
|
12872
|
+
}
|
|
12873
|
+
|
|
12874
|
+
this.$emit('keydown', event);
|
|
12875
|
+
},
|
|
12876
|
+
mousemove: event => {
|
|
12877
|
+
this.onMouseHover(event);
|
|
12878
|
+
this.$emit('mousemove', event);
|
|
12879
|
+
},
|
|
12880
|
+
mouseleave: event => {
|
|
12881
|
+
this.onMouseLeave(event);
|
|
12882
|
+
this.$emit('mouseleave', event);
|
|
12883
|
+
}
|
|
12884
|
+
};
|
|
12885
|
+
},
|
|
12886
|
+
|
|
12871
12887
|
/**
|
|
12872
12888
|
* For keyboard navigation, whether or not this item is currently highlighted.
|
|
12873
12889
|
* An injected highlightId will override the default mouseover highlight.
|
|
@@ -12894,8 +12910,8 @@ var default_list_item_component = normalizeComponent(
|
|
|
12894
12910
|
|
|
12895
12911
|
},
|
|
12896
12912
|
methods: {
|
|
12897
|
-
onClick() {
|
|
12898
|
-
this.$emit('click');
|
|
12913
|
+
onClick(e) {
|
|
12914
|
+
this.$emit('click', e);
|
|
12899
12915
|
},
|
|
12900
12916
|
|
|
12901
12917
|
onMouseHover() {
|
|
@@ -12925,8 +12941,8 @@ var list_itemvue_type_style_index_0_lang_less_ = __webpack_require__(285);
|
|
|
12925
12941
|
|
|
12926
12942
|
var list_item_component = normalizeComponent(
|
|
12927
12943
|
list_item_list_itemvue_type_script_lang_js_,
|
|
12928
|
-
|
|
12929
|
-
|
|
12944
|
+
list_itemvue_type_template_id_78ac4fcc_render,
|
|
12945
|
+
list_itemvue_type_template_id_78ac4fcc_staticRenderFns,
|
|
12930
12946
|
false,
|
|
12931
12947
|
null,
|
|
12932
12948
|
null,
|
|
@@ -14879,18 +14895,20 @@ var select_menu_component = normalizeComponent(
|
|
|
14879
14895
|
;// CONCATENATED MODULE: ./components/select_menu/index.js
|
|
14880
14896
|
|
|
14881
14897
|
|
|
14882
|
-
;// 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/toast/toast.vue?vue&type=template&id=
|
|
14883
|
-
var
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
var
|
|
14898
|
+
;// 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/toast/toast.vue?vue&type=template&id=7c8c2d2a&
|
|
14899
|
+
var toastvue_type_template_id_7c8c2d2a_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isShown)?_c('div',{class:[
|
|
14900
|
+
'd-toast',
|
|
14901
|
+
_vm.kindClass,
|
|
14902
|
+
{ 'd-toast--important': _vm.important } ],attrs:{"data-qa":"dt-toast","aria-hidden":(!_vm.isShown).toString()}},[_c('div',{staticClass:"d-toast__dialog"},[_c('dt-notice-icon',_vm._g({attrs:{"kind":_vm.kind}},_vm.$listeners),[_vm._t("icon")],2),_c('dt-notice-content',_vm._g({attrs:{"title-id":_vm.titleId,"content-id":_vm.contentId,"title":_vm.title,"role":_vm.role},scopedSlots:_vm._u([{key:"titleOverride",fn:function(){return [_vm._t("titleOverride")]},proxy:true}],null,true)},_vm.$listeners),[_vm._t("default",function(){return [_vm._v(" "+_vm._s(_vm.message)+" ")]})],2),_c('dt-notice-action',_vm._g({attrs:{"hide-close":_vm.hideClose,"close-button-props":_vm.closeButtonProps}},_vm.noticeActionListeners),[_vm._t("action")],2)],1)]):_vm._e()}
|
|
14903
|
+
var toastvue_type_template_id_7c8c2d2a_staticRenderFns = []
|
|
14888
14904
|
|
|
14889
14905
|
|
|
14890
14906
|
;// CONCATENATED MODULE: ./components/toast/toast_constants.js
|
|
14891
14907
|
const TOAST_ROLES = ['status', 'alert'];
|
|
14908
|
+
const TOAST_MIN_DURATION = 6000;
|
|
14892
14909
|
/* harmony default export */ const toast_constants = ({
|
|
14893
|
-
TOAST_ROLES
|
|
14910
|
+
TOAST_ROLES,
|
|
14911
|
+
TOAST_MIN_DURATION
|
|
14894
14912
|
});
|
|
14895
14913
|
;// 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!./components/toast/toast.vue?vue&type=script&lang=js&
|
|
14896
14914
|
//
|
|
@@ -14941,8 +14959,6 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
14941
14959
|
//
|
|
14942
14960
|
//
|
|
14943
14961
|
//
|
|
14944
|
-
//
|
|
14945
|
-
//
|
|
14946
14962
|
|
|
14947
14963
|
|
|
14948
14964
|
|
|
@@ -15030,6 +15046,17 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15030
15046
|
default: false
|
|
15031
15047
|
},
|
|
15032
15048
|
|
|
15049
|
+
/**
|
|
15050
|
+
* Controls whether the toast is shown. If a valid duration is provided, the toast will disappear
|
|
15051
|
+
* after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update
|
|
15052
|
+
* the data in your component.
|
|
15053
|
+
* Supports .sync modifier
|
|
15054
|
+
*/
|
|
15055
|
+
show: {
|
|
15056
|
+
type: Boolean,
|
|
15057
|
+
default: false
|
|
15058
|
+
},
|
|
15059
|
+
|
|
15033
15060
|
/**
|
|
15034
15061
|
* Props for the toast close button.
|
|
15035
15062
|
*/
|
|
@@ -15048,13 +15075,14 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15048
15075
|
|
|
15049
15076
|
/**
|
|
15050
15077
|
* The duration in ms the toast will display before disappearing.
|
|
15051
|
-
*
|
|
15078
|
+
* The toast won't disappear if the duration is not provided.
|
|
15079
|
+
* If it's provided, it should be equal to or greater than 6000.
|
|
15052
15080
|
*/
|
|
15053
15081
|
duration: {
|
|
15054
15082
|
type: Number,
|
|
15055
|
-
default:
|
|
15083
|
+
default: null,
|
|
15056
15084
|
validator: duration => {
|
|
15057
|
-
return duration >=
|
|
15085
|
+
return duration >= TOAST_MIN_DURATION;
|
|
15058
15086
|
}
|
|
15059
15087
|
}
|
|
15060
15088
|
},
|
|
@@ -15062,7 +15090,8 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15062
15090
|
|
|
15063
15091
|
data() {
|
|
15064
15092
|
return {
|
|
15065
|
-
|
|
15093
|
+
isShown: false,
|
|
15094
|
+
minDuration: TOAST_MIN_DURATION
|
|
15066
15095
|
};
|
|
15067
15096
|
},
|
|
15068
15097
|
|
|
@@ -15076,29 +15105,54 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15076
15105
|
base: 'd-toast--base'
|
|
15077
15106
|
};
|
|
15078
15107
|
return kindClasses[this.kind];
|
|
15108
|
+
},
|
|
15109
|
+
|
|
15110
|
+
noticeActionListeners() {
|
|
15111
|
+
return { // eslint-disable-next-line vue/no-deprecated-dollar-listeners-api
|
|
15112
|
+
...this.$listeners,
|
|
15113
|
+
close: event => {
|
|
15114
|
+
this.isShown = false;
|
|
15115
|
+
this.$emit('update:show', false);
|
|
15116
|
+
this.$emit('close', event);
|
|
15117
|
+
}
|
|
15118
|
+
};
|
|
15119
|
+
},
|
|
15120
|
+
|
|
15121
|
+
shouldSetTimeout() {
|
|
15122
|
+
return !!this.duration && this.duration >= this.minDuration;
|
|
15079
15123
|
}
|
|
15080
15124
|
|
|
15081
15125
|
},
|
|
15126
|
+
watch: {
|
|
15127
|
+
show: {
|
|
15128
|
+
handler: function (show) {
|
|
15129
|
+
this.isShown = show;
|
|
15130
|
+
|
|
15131
|
+
if (show) {
|
|
15132
|
+
this.setTimeout();
|
|
15133
|
+
} else {
|
|
15134
|
+
clearTimeout(this.displayTimer);
|
|
15135
|
+
}
|
|
15136
|
+
},
|
|
15137
|
+
immediate: true
|
|
15138
|
+
}
|
|
15139
|
+
},
|
|
15082
15140
|
|
|
15083
|
-
/* TODO Vue 3 Migration
|
|
15084
|
-
* destroyed() should be updated to unmounted() when migrating to Vue 3.
|
|
15085
|
-
*/
|
|
15086
15141
|
// eslint-disable-next-line vue/no-deprecated-destroyed-lifecycle
|
|
15087
15142
|
destroyed() {
|
|
15088
|
-
|
|
15143
|
+
if (this.shouldSetTimeout) {
|
|
15144
|
+
clearTimeout(this.displayTimer);
|
|
15145
|
+
}
|
|
15089
15146
|
},
|
|
15090
15147
|
|
|
15091
15148
|
methods: {
|
|
15092
|
-
|
|
15093
|
-
this.
|
|
15094
|
-
|
|
15095
|
-
|
|
15096
|
-
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
close() {
|
|
15100
|
-
this.hidden = true;
|
|
15101
|
-
clearTimeout(this.displayTimer);
|
|
15149
|
+
setTimeout() {
|
|
15150
|
+
if (this.shouldSetTimeout) {
|
|
15151
|
+
this.displayTimer = setTimeout(() => {
|
|
15152
|
+
this.isShown = false;
|
|
15153
|
+
this.$emit('update:show', false);
|
|
15154
|
+
}, this.duration);
|
|
15155
|
+
}
|
|
15102
15156
|
}
|
|
15103
15157
|
|
|
15104
15158
|
}
|
|
@@ -15115,8 +15169,8 @@ const TOAST_ROLES = ['status', 'alert'];
|
|
|
15115
15169
|
;
|
|
15116
15170
|
var toast_component = normalizeComponent(
|
|
15117
15171
|
toast_toastvue_type_script_lang_js_,
|
|
15118
|
-
|
|
15119
|
-
|
|
15172
|
+
toastvue_type_template_id_7c8c2d2a_render,
|
|
15173
|
+
toastvue_type_template_id_7c8c2d2a_staticRenderFns,
|
|
15120
15174
|
false,
|
|
15121
15175
|
null,
|
|
15122
15176
|
null,
|