@dialpad/dialtone-vue
Version:
Vue component library for Dialpad's design system Dialtone
3 lines (2 loc) • 2.05 kB
JavaScript
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("@dialpad/dialtone-icons/vue2"),n=require("../../common/utils/index.cjs"),i=require("../../localization/index.cjs"),o=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),s=require("../general-row/general-row.cjs"),u={name:"DtRecipeGroupRow",components:{DtIconUsers:r.DtIconUsers,DtRecipeGeneralRow:s.default},inheritAttrs:!1,props:{names:{type:String,required:!0},unreadCount:{type:String,default:null},unreadMentionCount:{type:String,default:null},hasUnreads:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},isTyping:{type:Boolean,default:!1}},emits:["click"],data(){return{i18n:new i.DialtoneLocalization}},computed:{groupCount(){return this.names.split(",").length},messageCount(){return isNaN(this.unreadCount)?this.unreadCount:Number(this.unreadCount)},mentionCount(){return isNaN(this.unreadMentionCount)?this.unreadMentionCount:Number(this.unreadMentionCount)},unreadCountTooltip(){return n.safeConcatStrings([this.unreadCount&&this.i18n.$t("DIALTONE_UNREAD_MESSAGE_COUNT_TEXT",{unreadCount:this.messageCount}),this.unreadMentionCount&&this.i18n.$t("DIALTONE_UNREAD_MENTION_COUNT_TEXT",{unreadCount:this.mentionCount})])},typingTooltip(){return this.isTyping&&this.i18n.$t("DIALTONE_TYPING_TEXT")},ariaLabel(){return n.safeConcatStrings([this.typingTooltip,this.i18n.$t("DIALTONE_GROUP_ROW_GROUP_COUNT_TEXT",{count:this.groupCount}),this.names,this.unreadCountTooltip])}}};var a=function(){var e=this,t=e._self._c;return t("dt-recipe-general-row",e._g(e._b({attrs:{description:e.names,"aria-label":e.ariaLabel,"unread-count":e.unreadCount,"has-unreads":e.hasUnreads,"unread-mention-count":e.unreadMentionCount,selected:e.selected,"is-typing":e.isTyping},scopedSlots:e._u([{key:"left",fn:function(){return[t("dt-icon-users",{attrs:{size:"300"}})]},proxy:!0}])},"dt-recipe-general-row",e.$attrs,!1),e.$listeners))},l=[],d=o.n(u,a,l);const c=d.exports;exports.default=c;
//# sourceMappingURL=group-row.cjs.map