@dialpad/dialtone-vue 2.171.3 → 2.173.0-beta.1

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 (89) hide show
  1. package/dist/component-documentation.json +1 -1
  2. package/dist/components/item_layout/item_layout.vue.cjs +63 -1
  3. package/dist/components/item_layout/item_layout.vue.cjs.map +1 -1
  4. package/dist/components/item_layout/item_layout.vue.js +63 -1
  5. package/dist/components/item_layout/item_layout.vue.js.map +1 -1
  6. package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +2 -2
  7. package/dist/components/keyboard_shortcut/keyboard_shortcut.vue.js +2 -2
  8. package/dist/components/list_item/list_item.vue.cjs +12 -13
  9. package/dist/components/list_item/list_item.vue.cjs.map +1 -1
  10. package/dist/components/list_item/list_item.vue.js +12 -13
  11. package/dist/components/list_item/list_item.vue.js.map +1 -1
  12. package/dist/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.cjs.map +1 -1
  13. package/dist/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.js.map +1 -1
  14. package/dist/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.cjs.map +1 -1
  15. package/dist/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.js.map +1 -1
  16. package/dist/components/rich_text_editor/rich_text_editor.vue.cjs +160 -17
  17. package/dist/components/rich_text_editor/rich_text_editor.vue.cjs.map +1 -1
  18. package/dist/components/rich_text_editor/rich_text_editor.vue.js +161 -18
  19. package/dist/components/rich_text_editor/rich_text_editor.vue.js.map +1 -1
  20. package/dist/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +1 -1
  21. package/dist/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  22. package/dist/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +1 -1
  23. package/dist/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  24. package/dist/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs +5 -1
  25. package/dist/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.cjs.map +1 -1
  26. package/dist/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js +5 -1
  27. package/dist/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.js.map +1 -1
  28. package/dist/recipes/conversation_view/editor/editor.vue.cjs +16 -1
  29. package/dist/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  30. package/dist/recipes/conversation_view/editor/editor.vue.js +16 -1
  31. package/dist/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  32. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs +10 -10
  33. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.cjs.map +1 -1
  34. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js +10 -10
  35. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.js.map +1 -1
  36. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +2 -4
  37. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  38. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +2 -4
  39. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  40. package/dist/recipes/conversation_view/message_input/last_active_nodes.cjs +87 -0
  41. package/dist/recipes/conversation_view/message_input/last_active_nodes.cjs.map +1 -0
  42. package/dist/recipes/conversation_view/message_input/last_active_nodes.js +87 -0
  43. package/dist/recipes/conversation_view/message_input/last_active_nodes.js.map +1 -0
  44. package/dist/recipes/conversation_view/message_input/message_input.vue.cjs +229 -46
  45. package/dist/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  46. package/dist/recipes/conversation_view/message_input/message_input.vue.js +229 -46
  47. package/dist/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  48. package/dist/recipes/conversation_view/message_input/message_input_button.vue.cjs +58 -0
  49. package/dist/recipes/conversation_view/message_input/message_input_button.vue.cjs.map +1 -0
  50. package/dist/recipes/conversation_view/message_input/message_input_button.vue.js +58 -0
  51. package/dist/recipes/conversation_view/message_input/message_input_button.vue.js.map +1 -0
  52. package/dist/recipes/conversation_view/message_input/message_input_link.vue.cjs +108 -0
  53. package/dist/recipes/conversation_view/message_input/message_input_link.vue.cjs.map +1 -0
  54. package/dist/recipes/conversation_view/message_input/message_input_link.vue.js +108 -0
  55. package/dist/recipes/conversation_view/message_input/message_input_link.vue.js.map +1 -0
  56. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.cjs +106 -0
  57. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.cjs.map +1 -0
  58. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.js +106 -0
  59. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.js.map +1 -0
  60. package/dist/recipes/item_layout/contact_info/contact_info.vue.cjs +4 -4
  61. package/dist/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  62. package/dist/recipes/item_layout/contact_info/contact_info.vue.js +4 -4
  63. package/dist/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  64. package/dist/types/components/item_layout/item_layout.vue.d.ts +66 -1
  65. package/dist/types/components/item_layout/item_layout.vue.d.ts.map +1 -1
  66. package/dist/types/components/list_item/list_item.vue.d.ts +1 -22
  67. package/dist/types/components/list_item/list_item.vue.d.ts.map +1 -1
  68. package/dist/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
  69. package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts.map +1 -1
  70. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +37 -1
  71. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  72. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  73. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  74. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +11 -0
  75. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  76. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  77. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  78. package/dist/types/recipes/conversation_view/message_input/last_active_nodes.d.ts +3 -0
  79. package/dist/types/recipes/conversation_view/message_input/last_active_nodes.d.ts.map +1 -0
  80. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +183 -60
  81. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  82. package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts +48 -0
  83. package/dist/types/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -0
  84. package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +38 -0
  85. package/dist/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -0
  86. package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +87 -0
  87. package/dist/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -0
  88. package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  89. package/package.json +7 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"last_active_nodes.cjs","sources":["../../../../recipes/conversation_view/message_input/last_active_nodes.js"],"sourcesContent":["/* eslint-disable complexity */\n/**\n * This function was taken from this thread and modified to work in pure JS:\n * https://github.com/ueberdosis/tiptap/issues/1058#issuecomment-778254557\n *\n * description: This helper, lastActiveNodes, finds the last (furthest from the root document)\n * matching types in your selection (ignoring nesting), you can give it either a list of args\n * similar to isActive or a group name, calling it like below. It will return a list of node\n * type names that are the last ones active in the selection, if the selection is 'empty'\n * (just the cursor) the returned list will only have at most one name.\n * This lets you build a UI for lists that works the same as most word processors.\n *\n * @param {Object} state the tiptap editor instance state\n * @param {*} typesOrGroup node types or node group name to consider\n * @returns {Array} node(s) that are the farthest from the root that matches the given type or group\n */\nexport default function lastActiveNodes (state, typesOrGroup) {\n if (!state) return [];\n\n const { from, to } = state.selection;\n let types;\n\n if (typeof typesOrGroup === 'string') {\n // types is a name of a node group\n types = Object.entries(state.schema.nodes)\n .filter(([name, nodeType]) => nodeType.groups.includes(typesOrGroup))\n .map(([name, nodeType]) => {\n return {\n type: nodeType,\n };\n });\n } else {\n // types is a list of LastActiveNodeItemOption\n types = typesOrGroup;\n for (const item of types) {\n item.type = item.type ? getNodeType(item.type, state.schema) : null;\n }\n }\n\n let lastNode = null;\n let lastMatchedType = null;\n const matchedTypes = new Set();\n const notFoundTypes = new Set(types);\n\n state.doc.nodesBetween(from, to, (node, pos, parent) => {\n if (notFoundTypes.size === 0) return false;\n if (!node.isText) {\n const matchedType = types.filter((item) => {\n if (!item.type) {\n return true;\n }\n if (typeof item.type === 'string') return false; // Typeguard, shouldn't happen\n return node.type.name === item.type.name;\n })\n .find(item => {\n if (!item.attributes) return true;\n return objectIncludes(node.attrs, item.attributes);\n });\n if (matchedType) {\n if (lastMatchedType && lastNode && (lastNode !== parent)) {\n notFoundTypes.delete(lastMatchedType);\n matchedTypes.add(lastMatchedType);\n }\n lastMatchedType = matchedType;\n }\n lastNode = node;\n }\n });\n\n if (lastMatchedType) {\n matchedTypes.add(lastMatchedType);\n }\n\n return [...matchedTypes.values()].map((item) => {\n if (item.key) {\n return item.key;\n } else if (typeof item.type === 'string') {\n return item.type;\n } else if (item.type?.name) {\n return item.type.name;\n } else {\n return '';\n }\n });\n}\n\nfunction getNodeType (nameOrType, schema) {\n if (typeof nameOrType === 'string') {\n if (!schema.nodes[nameOrType]) {\n throw Error(\n `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n );\n }\n\n return schema.nodes[nameOrType];\n }\n\n return nameOrType;\n}\n\nexport function objectIncludes (\n object1,\n object2,\n options,\n) {\n const keys = Object.keys(object2);\n\n if (!keys.length) {\n return true;\n }\n\n return keys.every(key => {\n if (options.strict) {\n return object2[key] === object1[key];\n }\n\n if (Object.prototype.toString.call(object2[key]) === '[object RegExp]') {\n return object2[key].test(object1[key]);\n }\n\n return object2[key] === object1[key];\n });\n}\n"],"names":[],"mappings":";;AAgBe,SAAS,gBAAiB,OAAO,cAAc;AAC5D,MAAI,CAAC,MAAO,QAAO;AAEnB,QAAM,EAAE,MAAM,OAAO,MAAM;AAC3B,MAAI;AAEJ,MAAI,OAAO,iBAAiB,UAAU;AAEpC,YAAQ,OAAO,QAAQ,MAAM,OAAO,KAAK,EACtC,OAAO,CAAC,CAAC,MAAM,QAAQ,MAAM,SAAS,OAAO,SAAS,YAAY,CAAC,EACnE,IAAI,CAAC,CAAC,MAAM,QAAQ,MAAM;AACzB,aAAO;AAAA,QACL,MAAM;AAAA,MAChB;AAAA,IACA,CAAO;AAAA,EACP,OAAS;AAEL,YAAQ;AACR,eAAW,QAAQ,OAAO;AACxB,WAAK,OAAO,KAAK,OAAO,YAAY,KAAK,MAAM,MAAM,MAAM,IAAI;AAAA,IAChE;AAAA,EACF;AAED,MAAI,WAAW;AACf,MAAI,kBAAkB;AACtB,QAAM,eAAe,oBAAI;AACzB,QAAM,gBAAgB,IAAI,IAAI,KAAK;AAEnC,QAAM,IAAI,aAAa,MAAM,IAAI,CAAC,MAAM,KAAK,WAAW;AACtD,QAAI,cAAc,SAAS,EAAG,QAAO;AACrC,QAAI,CAAC,KAAK,QAAQ;AAChB,YAAM,cAAc,MAAM,OAAO,CAAC,SAAS;AACzC,YAAI,CAAC,KAAK,MAAM;AACd,iBAAO;AAAA,QACR;AACD,YAAI,OAAO,KAAK,SAAS,SAAU,QAAO;AAC1C,eAAO,KAAK,KAAK,SAAS,KAAK,KAAK;AAAA,MAC5C,CAAO,EACE,KAAK,UAAQ;AACZ,YAAI,CAAC,KAAK,WAAY,QAAO;AAC7B,eAAO,eAAe,KAAK,OAAO,KAAK,UAAU;AAAA,MAC3D,CAAS;AACH,UAAI,aAAa;AACf,YAAI,mBAAmB,YAAa,aAAa,QAAS;AACxD,wBAAc,OAAO,eAAe;AACpC,uBAAa,IAAI,eAAe;AAAA,QACjC;AACD,0BAAkB;AAAA,MACnB;AACD,iBAAW;AAAA,IACZ;AAAA,EACL,CAAG;AAED,MAAI,iBAAiB;AACnB,iBAAa,IAAI,eAAe;AAAA,EACjC;AAED,SAAO,CAAC,GAAG,aAAa,OAAQ,CAAA,EAAE,IAAI,CAAC,SAAS;;AAC9C,QAAI,KAAK,KAAK;AACZ,aAAO,KAAK;AAAA,IACb,WAAU,OAAO,KAAK,SAAS,UAAU;AACxC,aAAO,KAAK;AAAA,IAClB,YAAe,UAAK,SAAL,mBAAW,MAAM;AAC1B,aAAO,KAAK,KAAK;AAAA,IACvB,OAAW;AACL,aAAO;AAAA,IACR;AAAA,EACL,CAAG;AACH;AAEA,SAAS,YAAa,YAAY,QAAQ;AACxC,MAAI,OAAO,eAAe,UAAU;AAClC,QAAI,CAAC,OAAO,MAAM,UAAU,GAAG;AAC7B,YAAM;AAAA,QACJ,gCAAgC,UAAU;AAAA,MAClD;AAAA,IACK;AAED,WAAO,OAAO,MAAM,UAAU;AAAA,EAC/B;AAED,SAAO;AACT;AAEO,SAAS,eACd,SACA,SACA,SACA;AACA,QAAM,OAAO,OAAO,KAAK,OAAO;AAEhC,MAAI,CAAC,KAAK,QAAQ;AAChB,WAAO;AAAA,EACR;AAED,SAAO,KAAK,MAAM,SAAO;AAKvB,QAAI,OAAO,UAAU,SAAS,KAAK,QAAQ,GAAG,CAAC,MAAM,mBAAmB;AACtE,aAAO,QAAQ,GAAG,EAAE,KAAK,QAAQ,GAAG,CAAC;AAAA,IACtC;AAED,WAAO,QAAQ,GAAG,MAAM,QAAQ,GAAG;AAAA,EACvC,CAAG;AACH;;;"}
@@ -0,0 +1,87 @@
1
+ function lastActiveNodes(state, typesOrGroup) {
2
+ if (!state) return [];
3
+ const { from, to } = state.selection;
4
+ let types;
5
+ if (typeof typesOrGroup === "string") {
6
+ types = Object.entries(state.schema.nodes).filter(([name, nodeType]) => nodeType.groups.includes(typesOrGroup)).map(([name, nodeType]) => {
7
+ return {
8
+ type: nodeType
9
+ };
10
+ });
11
+ } else {
12
+ types = typesOrGroup;
13
+ for (const item of types) {
14
+ item.type = item.type ? getNodeType(item.type, state.schema) : null;
15
+ }
16
+ }
17
+ let lastNode = null;
18
+ let lastMatchedType = null;
19
+ const matchedTypes = /* @__PURE__ */ new Set();
20
+ const notFoundTypes = new Set(types);
21
+ state.doc.nodesBetween(from, to, (node, pos, parent) => {
22
+ if (notFoundTypes.size === 0) return false;
23
+ if (!node.isText) {
24
+ const matchedType = types.filter((item) => {
25
+ if (!item.type) {
26
+ return true;
27
+ }
28
+ if (typeof item.type === "string") return false;
29
+ return node.type.name === item.type.name;
30
+ }).find((item) => {
31
+ if (!item.attributes) return true;
32
+ return objectIncludes(node.attrs, item.attributes);
33
+ });
34
+ if (matchedType) {
35
+ if (lastMatchedType && lastNode && lastNode !== parent) {
36
+ notFoundTypes.delete(lastMatchedType);
37
+ matchedTypes.add(lastMatchedType);
38
+ }
39
+ lastMatchedType = matchedType;
40
+ }
41
+ lastNode = node;
42
+ }
43
+ });
44
+ if (lastMatchedType) {
45
+ matchedTypes.add(lastMatchedType);
46
+ }
47
+ return [...matchedTypes.values()].map((item) => {
48
+ var _a;
49
+ if (item.key) {
50
+ return item.key;
51
+ } else if (typeof item.type === "string") {
52
+ return item.type;
53
+ } else if ((_a = item.type) == null ? void 0 : _a.name) {
54
+ return item.type.name;
55
+ } else {
56
+ return "";
57
+ }
58
+ });
59
+ }
60
+ function getNodeType(nameOrType, schema) {
61
+ if (typeof nameOrType === "string") {
62
+ if (!schema.nodes[nameOrType]) {
63
+ throw Error(
64
+ `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`
65
+ );
66
+ }
67
+ return schema.nodes[nameOrType];
68
+ }
69
+ return nameOrType;
70
+ }
71
+ function objectIncludes(object1, object2, options) {
72
+ const keys = Object.keys(object2);
73
+ if (!keys.length) {
74
+ return true;
75
+ }
76
+ return keys.every((key) => {
77
+ if (Object.prototype.toString.call(object2[key]) === "[object RegExp]") {
78
+ return object2[key].test(object1[key]);
79
+ }
80
+ return object2[key] === object1[key];
81
+ });
82
+ }
83
+ export {
84
+ lastActiveNodes as default,
85
+ objectIncludes
86
+ };
87
+ //# sourceMappingURL=last_active_nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"last_active_nodes.js","sources":["../../../../recipes/conversation_view/message_input/last_active_nodes.js"],"sourcesContent":["/* eslint-disable complexity */\n/**\n * This function was taken from this thread and modified to work in pure JS:\n * https://github.com/ueberdosis/tiptap/issues/1058#issuecomment-778254557\n *\n * description: This helper, lastActiveNodes, finds the last (furthest from the root document)\n * matching types in your selection (ignoring nesting), you can give it either a list of args\n * similar to isActive or a group name, calling it like below. It will return a list of node\n * type names that are the last ones active in the selection, if the selection is 'empty'\n * (just the cursor) the returned list will only have at most one name.\n * This lets you build a UI for lists that works the same as most word processors.\n *\n * @param {Object} state the tiptap editor instance state\n * @param {*} typesOrGroup node types or node group name to consider\n * @returns {Array} node(s) that are the farthest from the root that matches the given type or group\n */\nexport default function lastActiveNodes (state, typesOrGroup) {\n if (!state) return [];\n\n const { from, to } = state.selection;\n let types;\n\n if (typeof typesOrGroup === 'string') {\n // types is a name of a node group\n types = Object.entries(state.schema.nodes)\n .filter(([name, nodeType]) => nodeType.groups.includes(typesOrGroup))\n .map(([name, nodeType]) => {\n return {\n type: nodeType,\n };\n });\n } else {\n // types is a list of LastActiveNodeItemOption\n types = typesOrGroup;\n for (const item of types) {\n item.type = item.type ? getNodeType(item.type, state.schema) : null;\n }\n }\n\n let lastNode = null;\n let lastMatchedType = null;\n const matchedTypes = new Set();\n const notFoundTypes = new Set(types);\n\n state.doc.nodesBetween(from, to, (node, pos, parent) => {\n if (notFoundTypes.size === 0) return false;\n if (!node.isText) {\n const matchedType = types.filter((item) => {\n if (!item.type) {\n return true;\n }\n if (typeof item.type === 'string') return false; // Typeguard, shouldn't happen\n return node.type.name === item.type.name;\n })\n .find(item => {\n if (!item.attributes) return true;\n return objectIncludes(node.attrs, item.attributes);\n });\n if (matchedType) {\n if (lastMatchedType && lastNode && (lastNode !== parent)) {\n notFoundTypes.delete(lastMatchedType);\n matchedTypes.add(lastMatchedType);\n }\n lastMatchedType = matchedType;\n }\n lastNode = node;\n }\n });\n\n if (lastMatchedType) {\n matchedTypes.add(lastMatchedType);\n }\n\n return [...matchedTypes.values()].map((item) => {\n if (item.key) {\n return item.key;\n } else if (typeof item.type === 'string') {\n return item.type;\n } else if (item.type?.name) {\n return item.type.name;\n } else {\n return '';\n }\n });\n}\n\nfunction getNodeType (nameOrType, schema) {\n if (typeof nameOrType === 'string') {\n if (!schema.nodes[nameOrType]) {\n throw Error(\n `There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`,\n );\n }\n\n return schema.nodes[nameOrType];\n }\n\n return nameOrType;\n}\n\nexport function objectIncludes (\n object1,\n object2,\n options,\n) {\n const keys = Object.keys(object2);\n\n if (!keys.length) {\n return true;\n }\n\n return keys.every(key => {\n if (options.strict) {\n return object2[key] === object1[key];\n }\n\n if (Object.prototype.toString.call(object2[key]) === '[object RegExp]') {\n return object2[key].test(object1[key]);\n }\n\n return object2[key] === object1[key];\n });\n}\n"],"names":[],"mappings":"AAgBe,SAAS,gBAAiB,OAAO,cAAc;AAC5D,MAAI,CAAC,MAAO,QAAO;AAEnB,QAAM,EAAE,MAAM,OAAO,MAAM;AAC3B,MAAI;AAEJ,MAAI,OAAO,iBAAiB,UAAU;AAEpC,YAAQ,OAAO,QAAQ,MAAM,OAAO,KAAK,EACtC,OAAO,CAAC,CAAC,MAAM,QAAQ,MAAM,SAAS,OAAO,SAAS,YAAY,CAAC,EACnE,IAAI,CAAC,CAAC,MAAM,QAAQ,MAAM;AACzB,aAAO;AAAA,QACL,MAAM;AAAA,MAChB;AAAA,IACA,CAAO;AAAA,EACP,OAAS;AAEL,YAAQ;AACR,eAAW,QAAQ,OAAO;AACxB,WAAK,OAAO,KAAK,OAAO,YAAY,KAAK,MAAM,MAAM,MAAM,IAAI;AAAA,IAChE;AAAA,EACF;AAED,MAAI,WAAW;AACf,MAAI,kBAAkB;AACtB,QAAM,eAAe,oBAAI;AACzB,QAAM,gBAAgB,IAAI,IAAI,KAAK;AAEnC,QAAM,IAAI,aAAa,MAAM,IAAI,CAAC,MAAM,KAAK,WAAW;AACtD,QAAI,cAAc,SAAS,EAAG,QAAO;AACrC,QAAI,CAAC,KAAK,QAAQ;AAChB,YAAM,cAAc,MAAM,OAAO,CAAC,SAAS;AACzC,YAAI,CAAC,KAAK,MAAM;AACd,iBAAO;AAAA,QACR;AACD,YAAI,OAAO,KAAK,SAAS,SAAU,QAAO;AAC1C,eAAO,KAAK,KAAK,SAAS,KAAK,KAAK;AAAA,MAC5C,CAAO,EACE,KAAK,UAAQ;AACZ,YAAI,CAAC,KAAK,WAAY,QAAO;AAC7B,eAAO,eAAe,KAAK,OAAO,KAAK,UAAU;AAAA,MAC3D,CAAS;AACH,UAAI,aAAa;AACf,YAAI,mBAAmB,YAAa,aAAa,QAAS;AACxD,wBAAc,OAAO,eAAe;AACpC,uBAAa,IAAI,eAAe;AAAA,QACjC;AACD,0BAAkB;AAAA,MACnB;AACD,iBAAW;AAAA,IACZ;AAAA,EACL,CAAG;AAED,MAAI,iBAAiB;AACnB,iBAAa,IAAI,eAAe;AAAA,EACjC;AAED,SAAO,CAAC,GAAG,aAAa,OAAQ,CAAA,EAAE,IAAI,CAAC,SAAS;AAzElD;AA0EI,QAAI,KAAK,KAAK;AACZ,aAAO,KAAK;AAAA,IACb,WAAU,OAAO,KAAK,SAAS,UAAU;AACxC,aAAO,KAAK;AAAA,IAClB,YAAe,UAAK,SAAL,mBAAW,MAAM;AAC1B,aAAO,KAAK,KAAK;AAAA,IACvB,OAAW;AACL,aAAO;AAAA,IACR;AAAA,EACL,CAAG;AACH;AAEA,SAAS,YAAa,YAAY,QAAQ;AACxC,MAAI,OAAO,eAAe,UAAU;AAClC,QAAI,CAAC,OAAO,MAAM,UAAU,GAAG;AAC7B,YAAM;AAAA,QACJ,gCAAgC,UAAU;AAAA,MAClD;AAAA,IACK;AAED,WAAO,OAAO,MAAM,UAAU;AAAA,EAC/B;AAED,SAAO;AACT;AAEO,SAAS,eACd,SACA,SACA,SACA;AACA,QAAM,OAAO,OAAO,KAAK,OAAO;AAEhC,MAAI,CAAC,KAAK,QAAQ;AAChB,WAAO;AAAA,EACR;AAED,SAAO,KAAK,MAAM,SAAO;AAKvB,QAAI,OAAO,UAAU,SAAS,KAAK,QAAQ,GAAG,CAAC,MAAM,mBAAmB;AACtE,aAAO,QAAQ,GAAG,EAAE,KAAK,QAAQ,GAAG,CAAC;AAAA,IACtC;AAED,WAAO,QAAQ,GAAG,MAAM,QAAQ,GAAG;AAAA,EACvC,CAAG;AACH;"}
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const last_active_nodes = require("./last_active_nodes.cjs");
3
4
  const meeting_pill = require("./extensions/meeting_pill/meeting_pill.cjs");
4
5
  const vue2 = require("@dialpad/dialtone-icons/vue2");
6
+ const message_input_topbar = require("./message_input_topbar.vue.cjs");
7
+ const message_input_link = require("./message_input_link.vue.cjs");
8
+ const editor_constants = require("../editor/editor_constants.cjs");
5
9
  const _pluginVue2_normalizer = require("../../../_virtual/_plugin-vue2_normalizer.cjs");
6
10
  const button = require("../../../components/button/button.vue.cjs");
7
11
  const emoji_picker = require("../../../components/emoji_picker/emoji_picker.vue.cjs");
@@ -18,6 +22,8 @@ const _sfc_main = {
18
22
  DtEmojiPicker: emoji_picker.default,
19
23
  DtInput: input.default,
20
24
  DtPopover: popover.default,
25
+ DtRecipeMessageInputTopbar: message_input_topbar.default,
26
+ DtRecipeMessageInputLink: message_input_link.default,
21
27
  DtRichTextEditor: rich_text_editor.default,
22
28
  DtTooltip: tooltip.default,
23
29
  DtStack: stack.default,
@@ -29,6 +35,18 @@ const _sfc_main = {
29
35
  mixins: [],
30
36
  inheritAttrs: false,
31
37
  props: {
38
+ /**
39
+ * Displays all the buttons for rich text formatting above the message input, and enables it within the editor.
40
+ * Rich text formatting for the purposes of this component is defined as:
41
+ *
42
+ * bold, italic, strikethrough, lists, blockquotes, inline code tags, and code blocks.
43
+ *
44
+ * If you are sending a message to a phone rather than a Dialpad to Dialpad message, you should have this as false.
45
+ */
46
+ richText: {
47
+ type: Boolean,
48
+ default: true
49
+ },
32
50
  /**
33
51
  * Value of the input. The object format should match TipTap's JSON
34
52
  * document structure: https://tiptap.dev/guide/output#option-1-json
@@ -97,18 +115,11 @@ const _sfc_main = {
97
115
  */
98
116
  outputFormat: {
99
117
  type: String,
100
- default: "text",
118
+ default: "json",
101
119
  validator(outputFormat) {
102
120
  return rich_text_editor_constants.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(outputFormat);
103
121
  }
104
122
  },
105
- /**
106
- * Enables the Link extension and optionally passes configurations to it
107
- */
108
- link: {
109
- type: [Boolean, Object],
110
- default: true
111
- },
112
123
  /**
113
124
  * Placeholder text
114
125
  */
@@ -240,53 +251,139 @@ const _sfc_main = {
240
251
  default: null
241
252
  },
242
253
  /**
243
- * Whether the input allows for block quote.
254
+ * descriptive text fields for the bold button
255
+ *
256
+ * object format:
257
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
244
258
  */
245
- allowBlockquote: {
246
- type: Boolean,
247
- default: true
259
+ boldButtonOptions: {
260
+ type: Object,
261
+ default: () => ({
262
+ ariaLabel: "Toggle bold on selected text",
263
+ tooltipText: "Bold",
264
+ keyboardShortcutText: "Mod + B"
265
+ })
248
266
  },
249
267
  /**
250
- * Whether the input allows for bold to be introduced in the text.
268
+ * descriptive text fields for the italic button
269
+ *
270
+ * object format:
271
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
251
272
  */
252
- allowBold: {
253
- type: Boolean,
254
- default: true
273
+ italicButtonOptions: {
274
+ type: Object,
275
+ default: () => ({
276
+ ariaLabel: "Toggle italic on selected text",
277
+ tooltipText: "Italic",
278
+ keyboardShortcutText: "Mod + I"
279
+ })
255
280
  },
256
281
  /**
257
- * Whether the input allows for bullet list to be introduced in the text.
258
- */
259
- allowBulletList: {
260
- type: Boolean,
261
- default: true
282
+ * descriptive text fields for the strikethrough button
283
+ *
284
+ * object format:
285
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
286
+ */
287
+ strikeButtonOptions: {
288
+ type: Object,
289
+ default: () => ({
290
+ ariaLabel: "Toggle strikethrough on selected text",
291
+ tooltipText: "Strikethrough",
292
+ keyboardShortcutText: "Mod + Shift + S"
293
+ })
262
294
  },
263
295
  /**
264
- * Whether the input allows for italic to be introduced in the text.
296
+ * descriptive text fields for the link button
297
+ *
298
+ * object format:
299
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
265
300
  */
266
- allowItalic: {
267
- type: Boolean,
268
- default: true
301
+ linkButtonOptions: {
302
+ type: Object,
303
+ default: () => ({
304
+ ariaLabel: "Create or edit link on selected text",
305
+ tooltipText: "Link",
306
+ // TODO: implement mod k
307
+ keyboardShortcutText: "Mod + K",
308
+ dialogTitle: "Add a link",
309
+ textLabel: "Text to display (optional)",
310
+ linkLabel: "Link",
311
+ linkPlaceholder: "e.g. https://www.dialpad.com",
312
+ removeLabel: "Remove",
313
+ cancelLabel: "Cancel",
314
+ confirmLabel: "Done",
315
+ visuallyHiddenCloseText: "Close link dialog"
316
+ })
317
+ },
318
+ /**
319
+ * descriptive text fields for the bullet list button
320
+ *
321
+ * object format:
322
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
323
+ */
324
+ bulletListButtonOptions: {
325
+ type: Object,
326
+ default: () => ({
327
+ ariaLabel: "Toggle bullet list on selected text",
328
+ tooltipText: "Bullet list",
329
+ keyboardShortcutText: "Mod + Shift + 8"
330
+ })
269
331
  },
270
332
  /**
271
- * Whether the input allows for strike to be introduced in the text.
333
+ * descriptive text fields for the ordered list button
334
+ *
335
+ * object format:
336
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
272
337
  */
273
- allowStrike: {
274
- type: Boolean,
275
- default: true
338
+ orderedListButtonOptions: {
339
+ type: Object,
340
+ default: () => ({
341
+ ariaLabel: "Toggle ordered list on selected text",
342
+ tooltipText: "Ordered list",
343
+ keyboardShortcutText: "Mod + Shift + 7"
344
+ })
276
345
  },
277
346
  /**
278
- * Whether the input allows for underline to be introduced in the text.
347
+ * descriptive text fields for the italic button
348
+ *
349
+ * object format:
350
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
279
351
  */
280
- allowUnderline: {
281
- type: Boolean,
282
- default: true
352
+ blockQuoteButtonOptions: {
353
+ type: Object,
354
+ default: () => ({
355
+ ariaLabel: "Toggle Blockquote on selected text",
356
+ tooltipText: "Blockquote",
357
+ keyboardShortcutText: "Mod + Shift + B"
358
+ })
283
359
  },
284
360
  /**
285
- * Whether the input allows codeblock to be introduced in the text.
361
+ * descriptive text fields for the code button
362
+ *
363
+ * object format:
364
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
286
365
  */
287
- allowCodeblock: {
288
- type: Boolean,
289
- default: true
366
+ codeButtonOptions: {
367
+ type: Object,
368
+ default: () => ({
369
+ ariaLabel: "Toggle code tag on selected text",
370
+ tooltipText: "Code",
371
+ keyboardShortcutText: "Mod + E"
372
+ })
373
+ },
374
+ /**
375
+ * descriptive text fields for the code block button
376
+ *
377
+ * object format:
378
+ * { ariaLabel: string, tooltipText: string, keyboardShortcutText: string }
379
+ */
380
+ codeBlockButtonOptions: {
381
+ type: Object,
382
+ default: () => ({
383
+ ariaLabel: "Toggle code block on selected text",
384
+ tooltipText: "Code block",
385
+ keyboardShortcutText: "Mod + Alt + C"
386
+ })
290
387
  }
291
388
  },
292
389
  emits: [
@@ -358,16 +455,33 @@ const _sfc_main = {
358
455
  * @event update:value
359
456
  * @type {String|JSON}
360
457
  */
361
- "update:value"
458
+ "update:value",
459
+ /**
460
+ * Emitted when input changes, returns text content only
461
+ * @event text-input
462
+ * @type {String}
463
+ */
464
+ "text-input"
362
465
  ],
363
466
  data() {
364
467
  return {
468
+ // If an ordered list is nested within an unordered list, we only want to show the currently selected list as
469
+ // active. This function performs the logic to determine the farthest active node from the root.
470
+ lastActiveNodes: last_active_nodes.default,
365
471
  additionalExtensions: [meeting_pill.default],
366
472
  internalInputValue: this.value,
367
473
  // internal input content
368
474
  imagePickerFocus: false,
369
475
  emojiPickerFocus: false,
370
- emojiPickerOpened: false
476
+ emojiPickerOpened: false,
477
+ isFocused: false,
478
+ linkOptions: {
479
+ class: "d-link d-c-text d-d-inline-block"
480
+ },
481
+ linkDialogOpen: false,
482
+ selectedText: "",
483
+ text: "",
484
+ hideLinkBubbleMenu: false
371
485
  };
372
486
  },
373
487
  computed: {
@@ -375,7 +489,7 @@ const _sfc_main = {
375
489
  return !this.showSend.text;
376
490
  },
377
491
  inputLength() {
378
- return this.internalInputValue.length;
492
+ return this.text.length;
379
493
  },
380
494
  displayCharacterLimitWarning() {
381
495
  return Boolean(this.showCharacterLimit) && this.showCharacterLimit.count - this.inputLength <= this.showCharacterLimit.warning;
@@ -412,9 +526,68 @@ const _sfc_main = {
412
526
  created() {
413
527
  if (this.value && this.outputFormat === "text") {
414
528
  this.internalInputValue = this.value.replace(/\n/g, "<br>");
529
+ } else {
530
+ this.internalInputValue = this.value;
415
531
  }
416
532
  },
417
533
  methods: {
534
+ linkDialogOpened(value) {
535
+ var _a;
536
+ this.linkDialogOpen = value;
537
+ if (value === true) {
538
+ this.initLinkDialog();
539
+ } else {
540
+ this.hideLinkBubbleMenu = false;
541
+ (_a = this.$refs.richTextEditor) == null ? void 0 : _a.focusEditor();
542
+ }
543
+ },
544
+ // eslint-disable-next-line complexity
545
+ handleTopbarClick(type) {
546
+ var _a;
547
+ const editor = (_a = this.$refs.richTextEditor) == null ? void 0 : _a.editor;
548
+ const typeToCommandMap = {
549
+ bold: () => editor == null ? void 0 : editor.chain().focus().toggleBold().run(),
550
+ italic: () => editor == null ? void 0 : editor.chain().focus().toggleItalic().run(),
551
+ strike: () => editor == null ? void 0 : editor.chain().focus().toggleStrike().run(),
552
+ bulletList: () => editor == null ? void 0 : editor.chain().focus().toggleBulletList().run(),
553
+ orderedList: () => editor == null ? void 0 : editor.chain().focus().toggleOrderedList().run(),
554
+ blockquote: () => editor == null ? void 0 : editor.chain().focus().toggleBlockquote().run(),
555
+ code: () => editor == null ? void 0 : editor.chain().focus().toggleCode().run(),
556
+ codeBlock: () => editor == null ? void 0 : editor.chain().focus().toggleCodeBlock().run()
557
+ };
558
+ if (editor && typeToCommandMap[type]) {
559
+ typeToCommandMap[type]();
560
+ }
561
+ },
562
+ // Checks if the node currently selected is active ex/ the bold button is active if the selected text is bold
563
+ isSelectionActive(type) {
564
+ var _a, _b, _c, _d;
565
+ if (["bulletList", "orderedList"].includes(type)) {
566
+ return this.lastActiveNodes((_b = (_a = this.$refs.richTextEditor) == null ? void 0 : _a.editor) == null ? void 0 : _b.state, [{ type: "bulletList" }, { type: "orderedList" }]).includes(type) && this.isFocused;
567
+ }
568
+ return ((_d = (_c = this.$refs.richTextEditor) == null ? void 0 : _c.editor) == null ? void 0 : _d.isActive(type)) && this.isFocused;
569
+ },
570
+ initLinkDialog() {
571
+ var _a, _b, _c;
572
+ this.$refs.link.setInitialValues(this.selectedText, (_c = (_b = (_a = this.$refs.richTextEditor) == null ? void 0 : _a.editor) == null ? void 0 : _b.getAttributes("link")) == null ? void 0 : _c.href);
573
+ this.hideLinkBubbleMenu = true;
574
+ this.linkDialogOpen = true;
575
+ },
576
+ removeLink() {
577
+ var _a;
578
+ (_a = this.$refs.richTextEditor) == null ? void 0 : _a.removeLink();
579
+ this.linkDialogOpen = false;
580
+ },
581
+ setLink(linkText, linkInput) {
582
+ this.$refs.richTextEditor.setLink(
583
+ linkInput,
584
+ linkText,
585
+ this.linkOptions,
586
+ editor_constants.EDITOR_SUPPORTED_LINK_PROTOCOLS,
587
+ editor_constants.EDITOR_DEFAULT_LINK_PREFIX
588
+ );
589
+ this.linkDialogOpen = false;
590
+ },
418
591
  // Mousedown instead of click because it fires before the blur event.
419
592
  onMousedown(e) {
420
593
  const isWithinInput = this.$refs.richTextEditor.$el.querySelector(".tiptap").contains(e.target);
@@ -474,18 +647,30 @@ const _sfc_main = {
474
647
  },
475
648
  onInput(event) {
476
649
  this.$emit("update:value", event);
650
+ },
651
+ onTextInput(event) {
652
+ this.text = event;
653
+ this.$emit("text-input", event);
477
654
  }
478
655
  }
479
656
  };
480
657
  var _sfc_render = function render() {
481
658
  var _a;
482
659
  var _vm = this, _c = _vm._self._c;
483
- return _c("div", { class: ["d-recipe-message-input"], attrs: { "data-qa": "dt-recipe-message-input", "role": "presentation" }, on: { "dragover": function($event) {
660
+ return _c("div", { staticClass: "d-recipe-message-input", attrs: { "data-qa": "dt-recipe-message-input", "role": "presentation" }, on: { "dragover": function($event) {
484
661
  $event.preventDefault();
485
662
  }, "drop": function($event) {
486
663
  $event.preventDefault();
487
664
  return _vm.onDrop.apply(null, arguments);
488
- }, "paste": _vm.onPaste, "mousedown": _vm.onMousedown } }, [_vm._t("top"), _c("div", { directives: [{ name: "dt-scrollbar", rawName: "v-dt-scrollbar" }], staticClass: "d-recipe-message-input__editor-wrapper", style: { "max-height": _vm.maxHeight } }, [_c("dt-rich-text-editor", _vm._g(_vm._b({ ref: "richTextEditor", attrs: { "editable": _vm.editable, "input-aria-label": _vm.inputAriaLabel, "input-class": _vm.inputClass, "output-format": _vm.outputFormat, "auto-focus": _vm.autoFocus, "link": _vm.link, "placeholder": _vm.placeholder, "prevent-typing": _vm.preventTyping, "mention-suggestion": _vm.mentionSuggestion, "channel-suggestion": _vm.channelSuggestion, "slash-command-suggestion": _vm.slashCommandSuggestion, "allow-blockquote": _vm.allowBlockquote, "allow-bold": _vm.allowBold, "allow-bullet-list": _vm.allowBulletList, "allow-codeblock": _vm.allowCodeblock, "allow-italic": _vm.allowItalic, "allow-strike": _vm.allowStrike, "allow-underline": _vm.allowUnderline, "additional-extensions": _vm.additionalExtensions }, on: { "input": _vm.onInput, "enter": _vm.onSend }, model: { value: _vm.internalInputValue, callback: function($$v) {
665
+ }, "paste": _vm.onPaste, "mousedown": _vm.onMousedown } }, [_vm._t("top"), _vm.richText ? _c("dt-recipe-message-input-topbar", { key: _vm.selectedText, attrs: { "bold-button-options": _vm.boldButtonOptions, "italic-button-options": _vm.italicButtonOptions, "strike-button-options": _vm.strikeButtonOptions, "bullet-list-button-options": _vm.bulletListButtonOptions, "ordered-list-button-options": _vm.orderedListButtonOptions, "block-quote-button-options": _vm.blockQuoteButtonOptions, "code-button-options": _vm.codeButtonOptions, "code-block-button-options": _vm.codeBlockButtonOptions, "is-selection-active": _vm.isSelectionActive }, on: { "click": _vm.handleTopbarClick }, scopedSlots: _vm._u([{ key: "link", fn: function() {
666
+ return [_c("dt-recipe-message-input-link", { ref: "link", attrs: { "open": _vm.linkDialogOpen, "link-button-options": _vm.linkButtonOptions, "is-selection-active": _vm.isSelectionActive }, on: { "opened": _vm.linkDialogOpened, "set-link": _vm.setLink, "remove-link": _vm.removeLink } })];
667
+ }, proxy: true }], null, false, 1527282285) }) : _vm._e(), _c("div", { directives: [{ name: "dt-scrollbar", rawName: "v-dt-scrollbar" }], staticClass: "d-recipe-message-input__editor-wrapper", style: { "max-height": _vm.maxHeight } }, [_c("dt-rich-text-editor", _vm._g(_vm._b({ ref: "richTextEditor", attrs: { "editable": _vm.editable, "input-aria-label": _vm.inputAriaLabel, "input-class": _vm.inputClass, "output-format": _vm.outputFormat, "auto-focus": _vm.autoFocus, "link": _vm.richText, "placeholder": _vm.placeholder, "prevent-typing": _vm.preventTyping, "mention-suggestion": _vm.mentionSuggestion, "channel-suggestion": _vm.channelSuggestion, "slash-command-suggestion": _vm.slashCommandSuggestion, "allow-blockquote": _vm.richText, "allow-bold": _vm.richText, "allow-bullet-list": _vm.richText, "allow-code": _vm.richText, "allow-codeblock": _vm.richText, "allow-italic": _vm.richText, "allow-strike": _vm.richText, "allow-underline": _vm.richText, "additional-extensions": _vm.additionalExtensions, "hide-link-bubble-menu": _vm.hideLinkBubbleMenu }, on: { "input": _vm.onInput, "text-input": _vm.onTextInput, "enter": _vm.onSend, "selected": function($event) {
668
+ _vm.selectedText = $event;
669
+ }, "edit-link": _vm.initLinkDialog, "focus": function($event) {
670
+ _vm.isFocused = true;
671
+ }, "blur": function($event) {
672
+ _vm.isFocused = false;
673
+ } }, model: { value: _vm.internalInputValue, callback: function($$v) {
489
674
  _vm.internalInputValue = $$v;
490
675
  }, expression: "internalInputValue" } }, "dt-rich-text-editor", _vm.$attrs, false), _vm.$listeners))], 1), _vm._t("middle"), _c("section", { staticClass: "d-recipe-message-input__bottom-section" }, [_c("div", { staticClass: "d-recipe-message-input__bottom-section-left" }, [_c("dt-stack", { attrs: { "direction": "row", "gap": "200" } }, [_vm.showImagePicker ? _c("dt-button", { directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip:top-start", value: (_a = _vm.showImagePicker) == null ? void 0 : _a.tooltipLabel, expression: "showImagePicker?.tooltipLabel", arg: "top-start" }], staticClass: "d-recipe-message-input__button", attrs: { "data-qa": "dt-recipe-message-input-image-btn", "size": "sm", "kind": "muted", "importance": "clear", "aria-label": _vm.showImagePicker.ariaLabel }, on: { "click": _vm.onSelectImage, "mouseenter": function($event) {
491
676
  _vm.imagePickerFocus = true;
@@ -497,7 +682,7 @@ var _sfc_render = function render() {
497
682
  _vm.imagePickerFocus = false;
498
683
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
499
684
  return [_c("dt-icon-image", { attrs: { "size": "300" } })];
500
- }, proxy: true }], null, false, 4195307205) }) : _vm._e(), _c("dt-input", { ref: "messageInputImageUpload", staticClass: "d-recipe-message-input__image-input", attrs: { "data-qa": "dt-recipe-message-input-image-input", "accept": "image/*, video/*", "type": "file", "multiple": "", "hidden": "" }, on: { "input": _vm.onImageUpload } }), _vm.showEmojiPicker ? _c("dt-popover", { attrs: { "data-qa": "dt-recipe-message-input-emoji-picker-popover", "initial-focus-element": "#searchInput", "padding": "none" }, scopedSlots: _vm._u([{ key: "anchor", fn: function({ attrs }) {
685
+ }, proxy: true }], null, false, 4195307205) }) : _vm._e(), _c("dt-input", { ref: "messageInputImageUpload", staticClass: "d-recipe-message-input__image-input", attrs: { "data-qa": "dt-recipe-message-input-image-input", "accept": "image/*, video/*", "type": "file", "multiple": "", "hidden": "" }, on: { "input": _vm.onImageUpload } }), _vm.showEmojiPicker ? _c("dt-popover", { attrs: { "open.sync": "emojiPickerOpened", "data-qa": "dt-recipe-message-input-emoji-picker-popover", "initial-focus-element": "#searchInput", "padding": "none" }, scopedSlots: _vm._u([{ key: "anchor", fn: function({ attrs }) {
501
686
  return [_c("dt-button", _vm._b({ directives: [{ name: "dt-tooltip", rawName: "v-dt-tooltip", value: _vm.emojiTooltipMessage, expression: "emojiTooltipMessage" }], staticClass: "d-recipe-message-input__button", attrs: { "data-qa": "dt-recipe-message-input-emoji-picker-btn", "size": "sm", "kind": "muted", "importance": "clear", "aria-label": _vm.emojiButtonAriaLabel }, on: { "click": _vm.toggleEmojiPicker, "mouseenter": function($event) {
502
687
  _vm.emojiPickerFocus = true;
503
688
  }, "mouseleave": function($event) {
@@ -511,9 +696,7 @@ var _sfc_render = function render() {
511
696
  }, proxy: true }], null, true) }, "dt-button", attrs, false))];
512
697
  } }, { key: "content", fn: function({ close }) {
513
698
  return [_c("dt-emoji-picker", _vm._b({ on: { "skin-tone": _vm.onSkinTone, "selected-emoji": (emoji) => _vm.onSelectEmoji(emoji, close) } }, "dt-emoji-picker", _vm.emojiPickerProps, false))];
514
- } }], null, false, 3974835042), model: { value: _vm.emojiPickerOpened, callback: function($$v) {
515
- _vm.emojiPickerOpened = $$v;
516
- }, expression: "emojiPickerOpened" } }) : _vm._e(), _vm._t("emojiGiphyPicker")], 2)], 1), _c("div", { staticClass: "d-recipe-message-input__bottom-section-right" }, [_c("dt-stack", { attrs: { "direction": "row", "gap": "300" } }, [_c("div", { staticClass: "d-recipe-message-input__sms-count" }, [_vm._t("smsCount")], 2), Boolean(_vm.showCharacterLimit) ? _c("dt-tooltip", { staticClass: "d-recipe-message-input__remaining-char-tooltip", attrs: { "placement": "top-end", "enabled": _vm.characterLimitTooltipEnabled, "message": _vm.showCharacterLimit.message, "offset": [10, 8] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
699
+ } }], null, false, 3974835042) }) : _vm._e(), _vm._t("emojiGiphyPicker")], 2)], 1), _c("div", { staticClass: "d-recipe-message-input__bottom-section-right" }, [_c("dt-stack", { attrs: { "direction": "row", "gap": "300" } }, [_c("div", { staticClass: "d-recipe-message-input__sms-count" }, [_vm._t("smsCount")], 2), Boolean(_vm.showCharacterLimit) ? _c("dt-tooltip", { staticClass: "d-recipe-message-input__remaining-char-tooltip", attrs: { "placement": "top-end", "enabled": _vm.characterLimitTooltipEnabled, "message": _vm.showCharacterLimit.message, "offset": [10, 8] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
517
700
  return [_c("p", { directives: [{ name: "show", rawName: "v-show", value: _vm.displayCharacterLimitWarning, expression: "displayCharacterLimitWarning" }], staticClass: "d-recipe-message-input__remaining-char", attrs: { "data-qa": "dt-recipe-message-input-character-limit" } }, [_vm._v(" " + _vm._s(_vm.showCharacterLimit.count - _vm.inputLength) + " ")])];
518
701
  }, proxy: true }], null, false, 1021505058) }) : _vm._e(), _vm.showCancel ? _c("dt-button", { staticClass: "d-recipe-message-input__button d-recipe-message-input__cancel-button", attrs: { "data-qa": "dt-recipe-message-input-cancel-button", "size": "sm", "kind": "muted", "importance": "clear", "aria-label": _vm.showCancel.ariaLabel }, on: { "click": _vm.onCancel } }, [_c("p", [_vm._v(_vm._s(_vm.showCancel.text))])]) : _vm._e(), _vm._t("sendButton", function() {
519
702
  var _a2;