@dialpad/dialtone-vue 3.92.1 → 3.93.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.
Files changed (34) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/dist/component-documentation.json +1 -1
  4. package/dist/dialtone-vue.cjs +5 -5
  5. package/dist/dialtone-vue.js +2540 -2247
  6. package/dist/directives.cjs +1 -1
  7. package/dist/directives.js +32 -63
  8. package/dist/emoji-125c2250.cjs +1 -0
  9. package/dist/{emoji-8734fb7e.js → emoji-ee056efb.js} +237 -228
  10. package/dist/emoji.cjs +1 -1
  11. package/dist/emoji.js +3 -3
  12. package/dist/{message_input-42cfff5f.js → message_input-08860f81.js} +2 -2
  13. package/dist/{message_input-15d74c9c.cjs → message_input-ab3be145.cjs} +1 -1
  14. package/dist/message_input.cjs +1 -1
  15. package/dist/message_input.js +3 -3
  16. package/dist/style.css +1 -1
  17. package/dist/{tooltip-5fcb8c80.js → tooltip-02b802bc.js} +504 -475
  18. package/dist/tooltip-3390fc3b.cjs +25 -0
  19. package/dist/types/common/dates.d.ts +49 -0
  20. package/dist/types/common/dates.d.ts.map +1 -0
  21. package/dist/types/common/utils.d.ts +8 -0
  22. package/dist/types/common/utils.d.ts.map +1 -1
  23. package/dist/types/components/button/button.vue.d.ts +2 -1
  24. package/dist/types/components/button/button.vue.d.ts.map +1 -1
  25. package/dist/types/components/tooltip/tooltip.vue.d.ts +23 -1
  26. package/dist/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  27. package/dist/types/components/tooltip/tooltip_variants.vue.d.ts +0 -1
  28. package/dist/types/directives/tooltip/tooltip.d.ts.map +1 -1
  29. package/dist/types/index.d.ts +1 -0
  30. package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +9 -0
  31. package/dist/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
  32. package/package.json +3 -3
  33. package/dist/emoji-1de73abd.cjs +0 -1
  34. package/dist/tooltip-a095f59b.cjs +0 -25
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./tooltip-a095f59b.cjs"),r=require("vue"),E={name:"dt-tooltip-directive",install(a){const d=document.createElement("div");document.body.appendChild(d);const u="top",i=r.createApp({name:"DtTooltipDirectiveApp",components:{DtTooltip:n.DtTooltip},data(){return{tooltips:[]}},methods:{addTooltip(t,o,e){this.tooltips.push({id:t,message:o,placement:e,show:!1})},hideTooltip(t){const o=this.tooltips.findIndex(e=>e.id===t);this.tooltips[o].show=!1},removeTooltip(t){this.tooltips=this.tooltips.filter(o=>o.id!==t)},showTooltip(t){const o=this.tooltips.findIndex(e=>e.id===t);this.tooltips[o].show=!0}},render(){return r.h("div",this.tooltips.map(({id:t,message:o,placement:e,show:s})=>r.h(n.DtTooltip,{key:t,message:o,placement:e,show:s,externalAnchor:`[data-dt-tooltip-id="${t}"]`})))}});i.mount(d);const v=t=>typeof t=="string"&&(t==null?void 0:t.trim()),f=t=>t===void 0||n.TOOLTIP_DIRECTIONS.includes(t);function l(t){var e;const o=t.target.getAttribute("data-dt-tooltip-id");(e=i._instance)==null||e.ctx.showTooltip(o)}function p(t){var e;if(t.type==="keydown"&&t.code!=="Escape")return;const o=t.target.getAttribute("data-dt-tooltip-id");(e=i._instance)==null||e.ctx.hideTooltip(o)}function m(t){["focusin","mouseenter"].forEach(o=>{t.addEventListener(o,e=>l(e))}),["focusout","mouseleave","keydown"].forEach(o=>{t.addEventListener(o,e=>p(e))})}function T(t){["focusin","mouseenter"].forEach(o=>{t.removeEventListener(o,e=>l(e))}),["focusout","mouseleave","keydown"].forEach(o=>{t.removeEventListener(o,e=>p(e))})}a.directive("dt-tooltip",{beforeMount(t,o){var c;if(!v(o.value)){console.warn("Missing value for v-dt-tooltip directive on: ",t,"received value: ",o.value);return}if(!f(o.arg)){console.warn("Wrong placement value provided for v-dt-tooltip directive on: ",t,"received value: ",o.arg);return}const e=n.getUniqueString(),s=o.value,h=o.arg||u;t.setAttribute("data-dt-tooltip-id",e),(c=i._instance)==null||c.ctx.addTooltip(e,s,h),m(t)},unmounted(t){var o;T(t),(o=i._instance)==null||o.ctx.removeTooltip(t.getAttribute("data-dt-tooltip-id"))}})}};exports.DtTooltipDirective=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./tooltip-3390fc3b.cjs"),n=require("vue"),m={name:"dt-tooltip-directive",install(d){const l=document.createElement("div");document.body.appendChild(l);const s="top",r=n.createApp({name:"DtTooltipDirectiveApp",components:{DtTooltip:i.DtTooltip},data(){return{tooltips:[]}},methods:{addTooltip(t,e,o){this.tooltips.push({id:t,message:e,placement:o})},removeTooltip(t){this.tooltips=this.tooltips.filter(e=>e.id!==t)}},render(){return n.h("div",this.tooltips.map(({id:t,message:e,placement:o})=>n.h(i.DtTooltip,{key:t,message:e,placement:o,delay:process.env.NODE_ENV!=="test",externalAnchor:`[data-dt-tooltip-id="${t}"]`})))}});r.mount(l);const c=t=>typeof t=="string"&&(t==null?void 0:t.trim()),a=t=>t===void 0||i.TOOLTIP_DIRECTIONS.includes(t);d.directive("dt-tooltip",{beforeMount(t,e){var p;if(!c(e.value)){console.warn("Missing value for v-dt-tooltip directive on: ",t,"received value: ",e.value);return}if(!a(e.arg)){console.warn("Wrong placement value provided for v-dt-tooltip directive on: ",t,"received value: ",e.arg);return}const o=i.getUniqueString(),u=e.value,v=e.arg||s;t.setAttribute("data-dt-tooltip-id",o),(p=r._instance)==null||p.ctx.addTooltip(o,u,v)},unmounted(t){var e;(e=r._instance)==null||e.ctx.removeTooltip(t.getAttribute("data-dt-tooltip-id"))}})}};exports.DtTooltipDirective=m;
@@ -1,11 +1,11 @@
1
- import { D as p, g as E, T as g } from "./tooltip-5fcb8c80.js";
2
- import { createApp as A, h as c } from "vue";
3
- const L = {
1
+ import { D as p, g as v, T } from "./tooltip-02b802bc.js";
2
+ import { createApp as D, h as s } from "vue";
3
+ const A = {
4
4
  name: "dt-tooltip-directive",
5
- install(a) {
6
- const s = document.createElement("div");
7
- document.body.appendChild(s);
8
- const u = "top", i = A({
5
+ install(d) {
6
+ const r = document.createElement("div");
7
+ document.body.appendChild(r);
8
+ const l = "top", i = D({
9
9
  name: "DtTooltipDirectiveApp",
10
10
  components: { DtTooltip: p },
11
11
  data() {
@@ -14,93 +14,62 @@ const L = {
14
14
  };
15
15
  },
16
16
  methods: {
17
- addTooltip(t, o, e) {
18
- this.tooltips.push({ id: t, message: o, placement: e, show: !1 });
19
- },
20
- hideTooltip(t) {
21
- const o = this.tooltips.findIndex((e) => e.id === t);
22
- this.tooltips[o].show = !1;
17
+ addTooltip(t, e, o) {
18
+ this.tooltips.push({ id: t, message: e, placement: o });
23
19
  },
24
20
  removeTooltip(t) {
25
- this.tooltips = this.tooltips.filter((o) => o.id !== t);
26
- },
27
- showTooltip(t) {
28
- const o = this.tooltips.findIndex((e) => e.id === t);
29
- this.tooltips[o].show = !0;
21
+ this.tooltips = this.tooltips.filter((e) => e.id !== t);
30
22
  }
31
23
  },
32
24
  render() {
33
- return c(
25
+ return s(
34
26
  "div",
35
- this.tooltips.map(({ id: t, message: o, placement: e, show: n }) => c(p, {
27
+ this.tooltips.map(({ id: t, message: e, placement: o }) => s(p, {
36
28
  key: t,
37
- message: o,
38
- placement: e,
39
- show: n,
29
+ message: e,
30
+ placement: o,
31
+ /**
32
+ * Set the delay to false when running tests only.
33
+ */
34
+ delay: process.env.NODE_ENV !== "test",
40
35
  externalAnchor: `[data-dt-tooltip-id="${t}"]`
41
36
  }))
42
37
  );
43
38
  }
44
39
  });
45
- i.mount(s);
46
- const m = (t) => typeof t == "string" && (t == null ? void 0 : t.trim()), f = (t) => t === void 0 || g.includes(t);
47
- function d(t) {
48
- var e;
49
- const o = t.target.getAttribute("data-dt-tooltip-id");
50
- (e = i._instance) == null || e.ctx.showTooltip(o);
51
- }
52
- function r(t) {
53
- var e;
54
- if (t.type === "keydown" && t.code !== "Escape")
55
- return;
56
- const o = t.target.getAttribute("data-dt-tooltip-id");
57
- (e = i._instance) == null || e.ctx.hideTooltip(o);
58
- }
59
- function v(t) {
60
- ["focusin", "mouseenter"].forEach((o) => {
61
- t.addEventListener(o, (e) => d(e));
62
- }), ["focusout", "mouseleave", "keydown"].forEach((o) => {
63
- t.addEventListener(o, (e) => r(e));
64
- });
65
- }
66
- function h(t) {
67
- ["focusin", "mouseenter"].forEach((o) => {
68
- t.removeEventListener(o, (e) => d(e));
69
- }), ["focusout", "mouseleave", "keydown"].forEach((o) => {
70
- t.removeEventListener(o, (e) => r(e));
71
- });
72
- }
73
- a.directive("dt-tooltip", {
74
- beforeMount(t, o) {
75
- var l;
76
- if (!m(o.value)) {
40
+ i.mount(r);
41
+ const a = (t) => typeof t == "string" && (t == null ? void 0 : t.trim()), c = (t) => t === void 0 || T.includes(t);
42
+ d.directive("dt-tooltip", {
43
+ beforeMount(t, e) {
44
+ var n;
45
+ if (!a(e.value)) {
77
46
  console.warn(
78
47
  "Missing value for v-dt-tooltip directive on: ",
79
48
  t,
80
49
  "received value: ",
81
- o.value
50
+ e.value
82
51
  );
83
52
  return;
84
53
  }
85
- if (!f(o.arg)) {
54
+ if (!c(e.arg)) {
86
55
  console.warn(
87
56
  "Wrong placement value provided for v-dt-tooltip directive on: ",
88
57
  t,
89
58
  "received value: ",
90
- o.arg
59
+ e.arg
91
60
  );
92
61
  return;
93
62
  }
94
- const e = E(), n = o.value, T = o.arg || u;
95
- t.setAttribute("data-dt-tooltip-id", e), (l = i._instance) == null || l.ctx.addTooltip(e, n, T), v(t);
63
+ const o = v(), m = e.value, u = e.arg || l;
64
+ t.setAttribute("data-dt-tooltip-id", o), (n = i._instance) == null || n.ctx.addTooltip(o, m, u);
96
65
  },
97
66
  unmounted(t) {
98
- var o;
99
- h(t), (o = i._instance) == null || o.ctx.removeTooltip(t.getAttribute("data-dt-tooltip-id"));
67
+ var e;
68
+ (e = i._instance) == null || e.ctx.removeTooltip(t.getAttribute("data-dt-tooltip-id"));
100
69
  }
101
70
  });
102
71
  }
103
72
  };
104
73
  export {
105
- L as DtTooltipDirective
74
+ A as DtTooltipDirective
106
75
  };