@dialpad/dialtone-vue 3.94.0 → 3.94.2
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 +14 -0
- package/dist/dialtone-vue.cjs +5 -5
- package/dist/dialtone-vue.js +3742 -2164
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +3 -4
- package/dist/emoji-36138d23.cjs +1 -0
- package/dist/{emoji-fa0ee549.js → emoji-eca45193.js} +14629 -1044
- package/dist/emoji.cjs +1 -1
- package/dist/emoji.js +29 -31
- package/dist/message_input-adace257.js +16421 -0
- package/dist/message_input-cd4bb4eb.cjs +93 -0
- package/dist/message_input.cjs +1 -1
- package/dist/message_input.js +4 -18
- package/dist/style.css +1 -1
- package/dist/tooltip-4736031b.cjs +25 -0
- package/dist/tooltip-e2013b2a.js +2575 -0
- package/dist/types/components/icon/icon.vue.d.ts +1 -1
- package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
- package/package.json +2 -3
- package/dist/emoji-2ba641cd.cjs +0 -1
- package/dist/message_input-104c4579.js +0 -3619
- package/dist/message_input-4d2df135.cjs +0 -2
- package/dist/tooltip-0cdd1500.js +0 -738
- package/dist/tooltip-e88ebb8c.cjs +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const f=require("/home/runner/work/dialtone-vue/dialtone-vue/node_modules/tippy.js/dist/tippy.esm.js"),o=require("vue"),l={ERROR:"error",WARNING:"warning",SUCCESS:"success"},Y={LARGE:"lg",EXTRA_LARGE:"xl"},j={xs:"",sm:"",md:"",lg:"d-description--lg",xl:"d-description--xl"},K={xs:"d-label--xs",sm:"d-label--sm",md:"",lg:"d-label--lg",xl:"d-label--xl"},H={esc:"Esc",escape:"Escape",tab:"Tab",enter:"Enter",space:"Space",spacebar:"Spacebar",up:"Up",arrowup:"ArrowUp",left:"Left",arrowleft:"ArrowLeft",right:"Right",arrowright:"ArrowRight",down:"Down",arrowdown:"ArrowDown",home:"Home",end:"End"},E=l.ERROR,q="dt";let $=0,m;const G=typeof setImmediate=="function"?setImmediate:setTimeout;function u(e=q){return`${e}${$++}`}function g(e,t){if(t){const n=Z(t);return e[Math.abs(n)%e.length]}else return e[S(e.length)]}function Z(e){let t;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function S(e){return Math.floor(Math.random()*e)}function w(e){return e?e.map(t=>typeof t=="string"?{message:t,type:E}:t):[]}function A(e){const t=h(e);return!e||!t?[]:e.filter(n=>!!n.message&&n.type===t)}function h(e){return e?c(e,l.ERROR)?l.ERROR:c(e,l.WARNING)?l.WARNING:c(e,l.SUCCESS)?l.SUCCESS:null:null}function c(e,t){return!e||!t?!1:e.some(n=>(n==null?void 0:n.type)===t)}const W=e=>o.h("div",{innerHTML:e.html}),Q=()=>new Promise(e=>{G(e)});function T(e,t={}){return e?e(t).some(n=>n.type===o.Comment||Array.isArray(n.children)&&!n.children.length?!1:n.type!==o.Text||typeof n.children=="string"&&n.children.trim()!==""):!1}const X=e=>e==null?void 0:e.toLowerCase().split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),I=e=>{const t=Object.entries(e).filter(([n])=>n.startsWith("on"));return Object.fromEntries(t)};function J(e,t=300){clearTimeout(m),m=setTimeout(e,t)}function _(e){const t=e.getBoundingClientRect(),n={top:t.top<0,left:t.left<0,bottom:t.bottom>(window.innerHeight||document.documentElement.clientHeight),right:t.right>(window.innerWidth||document.documentElement.clientWidth)};return n.any=Object.values(n).some(i=>i),n.all=Object.values(n).every(i=>i),n}const ee=/(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/,te=new RegExp("(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)"),ne=new RegExp("(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])"),y=new RegExp("(?:"+[[ee.source,te.source].join("+"),ne.source].join("|")+")"),oe=/(?:(?:[;/][^#?<>\s]*)?)/,L=/(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/,O=new RegExp("\\b"+[y.source,oe.source,L.source,"(?!\\w)"].join("+")),R=/\b[a-z\d.-]+:\/\/[^<>\s]+/,P=new RegExp("(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@"+[y.source,L.source].join("+")+"(?!\\w)");function d(e=7,t=15){let n=!0;try{RegExp("(?<=\\W)")}catch{n=!1}return new RegExp(`${n?"(?:^|(?<=\\W))":""}(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${e},${t}})(?=\\b)(?=\\W(?=\\W|$)|\\s|$)`)}const x=d(),b=new RegExp([O.source,R.source,P.source,x.source].join("|"),"gi");function re(e){var t;return!e||!["string","number"].includes(typeof e)?!1:(e=e.toString(),((t=x.exec(e))==null?void 0:t[0])===e)}function ie(e){var t,n;return!e||typeof e!="string"?!1:((t=O.exec(e))==null?void 0:t[0])===e||((n=R.exec(e))==null?void 0:n[0])===e}function se(e){var t;return!e||typeof e!="string"?!1:((t=P.exec(e))==null?void 0:t[0])===e}function v(e){return e.filter(t=>!!t).join(" ")}function C(e,t="en-US"){return e.replace(/^\p{CWU}/u,n=>n.toLocaleUpperCase(t))}const ae={getUniqueString:u,getRandomElement:g,getRandomInt:S,formatMessages:w,filterFormattedMessages:A,hasFormattedMessageOfType:c,getValidationState:h,htmlFragment:W,flushPromises:Q,kebabCaseToPascalCase:X,extractVueListeners:I,debounce:J,isOutOfViewPort:_,getPhoneNumberRegex:d,linkRegex:b,isEmailAddress:se,isPhoneNumber:re,isURL:ie,safeConcatStrings:v,capitalizeFirstLetter:C},p=(e,t)=>{const n=e.__vccOpts||e;for(const[i,s]of t)n[i]=s;return n},le={name:"DtLazyShow",inheritAttrs:!1,props:{show:{type:Boolean,default:!1},transition:{type:String,default:null},appear:{type:Boolean,default:!1}},data(){return{initialized:!!this.show}},computed:{isCSSEnabled(){return process.env.NODE_ENV!=="test"}},watch:{show:function(e){!e||this.initialized||(this.initialized=!0)}}};function ce(e,t,n,i,s,r){return o.openBlock(),o.createBlock(o.Transition,o.mergeProps({name:n.transition,appear:n.appear},e.$attrs,{css:r.isCSSEnabled}),{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("div",o.normalizeProps(o.guardReactiveProps(e.$attrs)),[s.initialized?o.renderSlot(e.$slots,"default",{key:0}):o.createCommentVNode("",!0)],16),[[o.vShow,n.show]])]),_:3},16,["name","appear","css"])}const N=p(le,[["render",ce]]),ue=e=>({name:"arrowDetected",enabled:!0,phase:"main",fn:e,requiresIfExists:["offset"]}),he=["bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","top","top-start","top-end"],D=[!0,!1,"reference","popper"],k=(e,t)=>{const{contentElement:n}={...t};return delete t.contentElement,f(e,{...t,plugins:[f.sticky],render:()=>fe(n)})},V=({boundary:e="clippingParents",fallbackPlacements:t=[],onChangePlacement:n=()=>{},hasHideModifierEnabled:i=!1,tether:s=!0}={})=>({modifiers:[{name:"flip",options:{fallbackPlacements:t,boundary:e}},{name:"hide",enabled:i},{name:"preventOverflow",options:{altAxis:!s,tether:s}},ue(({state:r})=>{n(r.placement)})]}),de=e=>{const t=document.createElement("span");return t.innerText=e.innerText||"",e.innerText="",e.appendChild(t),t},pe=e=>{const t=e==null?void 0:e.children[0];return t||de(e)},fe=e=>{const t=document.createElement("div");return t.className="tippy-box d-ps-absolute",t.appendChild(e),{popper:t}},M=[...he],z=300,U={hover:"d-tooltip--hover",show:"d-tooltip--show",inverted:"d-tooltip--inverted",hide:"d-tooltip--hide"},F=[...D],me=[!0,!1,"toggle"];const Ee={name:"DtTooltip",components:{DtLazyShow:N},props:{id:{type:String,default(){return u()}},fallbackPlacements:{type:Array,default:()=>["auto"]},inverted:{type:Boolean,default:!1},offset:{type:Array,default:()=>[0,-4]},placement:{type:String,default:"top",validator(e){return M.includes(e)}},sticky:{type:[Boolean,String],default:!1,validator:e=>F.includes(e)},contentClass:{type:[String,Object,Array],default:""},message:{type:String,default:""},enabled:{type:Boolean,default:!0},show:{type:Boolean,default:null},transition:{type:String,default:"fade"},contentAppear:{type:Boolean,default:!1},delay:{type:Boolean,default:!0},externalAnchor:{type:String,default:null}},emits:["update:show","shown"],data(){return{TOOLTIP_KIND_MODIFIERS:U,hasSlotContent:T,tip:null,inTimer:null,isShown:!1,currentPlacement:this.placement}},computed:{isVisible(){return this.isShown&&this.enabled&&(!!this.message.trim()||!!this.$slots.default)},tooltipListeners(){return{"after-leave":()=>{this.onLeaveTransitionComplete()},"after-enter":()=>{this.onEnterTransitionComplete()}}},tippyProps(){return{offset:this.offset,interactive:!1,trigger:"manual",placement:this.placement,sticky:this.sticky,popperOptions:V({fallbackPlacements:this.fallbackPlacements,hasHideModifierEnabled:!0,onChangePlacement:this.onChangePlacement})}},anchor(){return this.externalAnchor?document.body.querySelector(this.externalAnchor):pe(this.$refs.anchor)}},watch:{tippyProps:{handler:"setProps",deep:!0},show:{handler:function(e){e!==null&&(this.isShown=e)},immediate:!0},isShown(e){e?(this.setProps(),this.tip.show()):this.tip.hide()},sticky(e){this.tip.setProps({sticky:e})}},mounted(){!this.enabled&&this.show!=null&&(console.warn("Tooltip: You cannot use both the enabled and show props at the same time."),console.warn("The show prop will be ignored.")),this.externalAnchor&&this.addExternalAnchorEventListeners(),this.tip=k(this.anchor,this.initOptions()),this.isShown&&this.tip.show()},beforeUnmount(){var e;this.externalAnchor&&this.removeExternalAnchorEventListeners(),this.tip&&((e=this.tip)==null||e.destroy())},methods:{calculateAnchorZindex(){return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]')||this.$el.closest(".d-zi-drawer")?651:400},hasVisibleFocus(){return this.anchor.matches(":focus-visible")},onEnterAnchor(e){this.delay?this.inTimer=setTimeout((function(t){this.triggerShow(t)}).bind(this,e),z):this.triggerShow(e)},triggerShow(e){e.type==="focusin"?this.show===null&&this.hasVisibleFocus()&&(this.isShown=!0):this.show===null&&(this.isShown=!0)},onLeaveAnchor(e){e.type==="keydown"&&e.code!=="Escape"||(clearTimeout(this.inTimer),this.triggerHide())},triggerHide(){this.show===null&&(this.isShown=!1)},onChangePlacement(e){this.currentPlacement=e},onLeaveTransitionComplete(){var e;(e=this.tip)==null||e.unmount(),this.$emit("shown",!1),this.show!==null&&this.$emit("update:show",!1)},onEnterTransitionComplete(){this.$emit("shown",!0),this.show!==null&&this.$emit("update:show",!0)},setProps(){this.tip&&this.tip.setProps&&this.tip.setProps({...this.tippyProps,zIndex:this.calculateAnchorZindex()})},onMount(){this.setProps()},initOptions(){return{contentElement:this.$refs.content.$el,allowHTML:!0,zIndex:this.calculateAnchorZindex(),onMount:this.onMount,...this.tippyProps}},addExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{this.anchor.addEventListener(e,t=>this.onEnterAnchor(t))}),["focusout","mouseleave","keydown"].forEach(e=>{this.anchor.addEventListener(e,t=>this.onLeaveAnchor(t))})},removeExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{this.anchor.removeEventListener(e,t=>this.onEnterAnchor(t))}),["focusout","mouseleave","keydown"].forEach(e=>{this.anchor.removeEventListener(e,t=>this.onLeaveAnchor(t))})}}},ge={"data-qa":"dt-tooltip-container"};function Se(e,t,n,i,s,r){const B=o.resolveComponent("dt-lazy-show");return o.openBlock(),o.createElementBlock("div",ge,[n.externalAnchor?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",{key:0,ref:"anchor","data-qa":"dt-tooltip-anchor",onFocusin:t[0]||(t[0]=(...a)=>r.onEnterAnchor&&r.onEnterAnchor(...a)),onFocusout:t[1]||(t[1]=(...a)=>r.onLeaveAnchor&&r.onLeaveAnchor(...a)),onMouseenter:t[2]||(t[2]=(...a)=>r.onEnterAnchor&&r.onEnterAnchor(...a)),onMouseleave:t[3]||(t[3]=(...a)=>r.onLeaveAnchor&&r.onLeaveAnchor(...a)),onKeydown:t[4]||(t[4]=o.withKeys((...a)=>r.onLeaveAnchor&&r.onLeaveAnchor(...a),["esc"]))},[o.renderSlot(e.$slots,"anchor")],544)),o.createVNode(B,o.mergeProps({id:n.id,ref:"content",show:r.isVisible,role:"tooltip","aria-hidden":"false","data-qa":"dt-tooltip",appear:n.contentAppear,transition:n.transition,class:["d-tooltip",`d-tooltip__arrow-tippy--${s.currentPlacement}`,{[s.TOOLTIP_KIND_MODIFIERS.inverted]:n.inverted},n.contentClass]},o.toHandlers(r.tooltipListeners)),{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{},()=>[o.createTextVNode(o.toDisplayString(n.message),1)])]),_:3},16,["id","show","appear","transition","class"])])}const we=p(Ee,[["render",Se]]);exports.DEFAULT_VALIDATION_MESSAGE_TYPE=E;exports.DESCRIPTION_SIZE_MODIFIERS=j;exports.DESCRIPTION_SIZE_TYPES=Y;exports.DtLazyShow=N;exports.DtTooltip=we;exports.EVENT_KEYNAMES=H;exports.LABEL_SIZE_MODIFIERS=K;exports.TIPPY_STICKY_VALUES=D;exports.TOOLTIP_DELAY_MS=z;exports.TOOLTIP_DIRECTIONS=M;exports.TOOLTIP_HIDE_ON_CLICK_VARIANTS=me;exports.TOOLTIP_KIND_MODIFIERS=U;exports.TOOLTIP_STICKY_VALUES=F;exports.VALIDATION_MESSAGE_TYPES=l;exports._export_sfc=p;exports.capitalizeFirstLetter=C;exports.createTippy=k;exports.extractVueListeners=I;exports.filterFormattedMessages=A;exports.formatMessages=w;exports.getPhoneNumberRegex=d;exports.getPopperOptions=V;exports.getRandomElement=g;exports.getUniqueString=u;exports.getValidationState=h;exports.hasSlotContent=T;exports.isOutOfViewPort=_;exports.linkRegex=b;exports.safeConcatStrings=v;exports.utils=ae;
|