@dialpad/dialtone-vue 2.128.0 → 2.130.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 (41) hide show
  1. package/dist/common/utils.cjs +8 -1
  2. package/dist/common/utils.cjs.map +1 -1
  3. package/dist/common/utils.js +8 -1
  4. package/dist/common/utils.js.map +1 -1
  5. package/dist/component-documentation.json +1 -1
  6. package/dist/lib/message-input.cjs +37 -3
  7. package/dist/lib/message-input.cjs.map +1 -1
  8. package/dist/lib/message-input.js +37 -3
  9. package/dist/lib/message-input.js.map +1 -1
  10. package/dist/lib/notice.cjs +10 -1
  11. package/dist/lib/notice.cjs.map +1 -1
  12. package/dist/lib/notice.js +10 -1
  13. package/dist/lib/notice.js.map +1 -1
  14. package/dist/lib/rich-text-editor.cjs +462 -66
  15. package/dist/lib/rich-text-editor.cjs.map +1 -1
  16. package/dist/lib/rich-text-editor.js +463 -67
  17. package/dist/lib/rich-text-editor.js.map +1 -1
  18. package/dist/types/common/utils/index.d.ts.map +1 -1
  19. package/dist/types/components/notice/notice.vue.d.ts +19 -0
  20. package/dist/types/components/notice/notice.vue.d.ts.map +1 -1
  21. package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts +2 -1
  22. package/dist/types/components/rich_text_editor/extensions/channels/channel.d.ts.map +1 -1
  23. package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts +1 -0
  24. package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
  25. package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts +2 -1
  26. package/dist/types/components/rich_text_editor/extensions/mentions/mention.d.ts.map +1 -1
  27. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +47 -0
  28. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts.map +1 -0
  29. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts +17 -0
  30. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts.map +1 -0
  31. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts +2 -0
  32. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map +1 -0
  33. package/dist/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts +12 -0
  34. package/dist/types/components/rich_text_editor/extensions/slash_command/suggestion.d.ts.map +1 -0
  35. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +48 -1
  36. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  37. package/dist/types/components/rich_text_editor/slash_command_suggestion.d.ts +15 -0
  38. package/dist/types/components/rich_text_editor/slash_command_suggestion.d.ts.map +1 -0
  39. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +38 -2
  40. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  41. package/package.json +25 -25
@@ -108,6 +108,23 @@ declare const _default: import("vue").DefineComponent<{
108
108
  type: ObjectConstructor;
109
109
  default: null;
110
110
  };
111
+ /**
112
+ * suggestion object containing the items query function.
113
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
114
+ *
115
+ * The only required key is the items function which is used to query the slash commands for suggestion.
116
+ * items({ query }) => { return [SlashCommandObject]; }
117
+ * SlashCommandObject format:
118
+ * { command: string, description: string, parametersExample?: string }
119
+ * The "parametersExample" parameter is optional, and describes an example
120
+ * of the parameters that command can take.
121
+ *
122
+ * When null, it does not add the plugin.
123
+ */
124
+ slashCommandSuggestion: {
125
+ type: ObjectConstructor;
126
+ default: null;
127
+ };
111
128
  /**
112
129
  * Whether the input allows for block quote.
113
130
  */
@@ -153,6 +170,7 @@ declare const _default: import("vue").DefineComponent<{
153
170
  }, {}, {
154
171
  editor: null;
155
172
  popoverOpened: boolean;
173
+ internalValue: any;
156
174
  }, {
157
175
  extensions(): import("@tiptap/vue-2").Node<any, any>[];
158
176
  inputAttrs(): {
@@ -161,7 +179,18 @@ declare const _default: import("vue").DefineComponent<{
161
179
  role: string;
162
180
  };
163
181
  }, {
182
+ onSelectedCommand(command: any): void;
164
183
  createEditor(): void;
184
+ /**
185
+ * This function is necessary as tiptap doesn't render the content passed
186
+ * directly through `editor.commands.setContent` the content passed down to it
187
+ * should be already parsed. So We're parsing the elements into it's corresponding
188
+ * HTML version before setting it.
189
+ */
190
+ insertContent(): void;
191
+ parseEmojis(): void;
192
+ parseChannels(): void;
193
+ parseMentions(): void;
165
194
  destroyEditor(): void;
166
195
  /**
167
196
  * The Editor exposes event hooks that we have to map our emits into. See
@@ -282,6 +311,23 @@ declare const _default: import("vue").DefineComponent<{
282
311
  type: ObjectConstructor;
283
312
  default: null;
284
313
  };
314
+ /**
315
+ * suggestion object containing the items query function.
316
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
317
+ *
318
+ * The only required key is the items function which is used to query the slash commands for suggestion.
319
+ * items({ query }) => { return [SlashCommandObject]; }
320
+ * SlashCommandObject format:
321
+ * { command: string, description: string, parametersExample?: string }
322
+ * The "parametersExample" parameter is optional, and describes an example
323
+ * of the parameters that command can take.
324
+ *
325
+ * When null, it does not add the plugin.
326
+ */
327
+ slashCommandSuggestion: {
328
+ type: ObjectConstructor;
329
+ default: null;
330
+ };
285
331
  /**
286
332
  * Whether the input allows for block quote.
287
333
  */
@@ -329,12 +375,13 @@ declare const _default: import("vue").DefineComponent<{
329
375
  value: string | Record<string, any>;
330
376
  inputClass: string;
331
377
  placeholder: string;
378
+ mentionSuggestion: Record<string, any>;
332
379
  channelSuggestion: Record<string, any>;
380
+ slashCommandSuggestion: Record<string, any>;
333
381
  editable: boolean;
334
382
  allowLineBreaks: boolean;
335
383
  autoFocus: string | number | boolean;
336
384
  outputFormat: string;
337
- mentionSuggestion: Record<string, any>;
338
385
  allowBlockquote: boolean;
339
386
  allowBold: boolean;
340
387
  allowBulletList: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"rich_text_editor.vue.d.ts","sourceRoot":"","sources":["../../../../components/rich_text_editor/rich_text_editor.vue.js"],"names":[],"mappings":";IAyCI;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;IA4NH;;;OAGG;;;;;;;IAxYH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
1
+ {"version":3,"file":"rich_text_editor.vue.d.ts","sourceRoot":"","sources":["../../../../components/rich_text_editor/rich_text_editor.vue.js"],"names":[],"mappings":";IA8CI;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;;;OAYG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;IAoOH;;;;;OAKG;;;;;;IA2DH;;;OAGG;;;;;;;IAleH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;;;OAYG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
@@ -0,0 +1,15 @@
1
+ declare namespace _default {
2
+ function items({ query }: {
3
+ query: any;
4
+ }): ({
5
+ command: string;
6
+ description: string;
7
+ parametersExample?: undefined;
8
+ } | {
9
+ command: string;
10
+ parametersExample: string;
11
+ description: string;
12
+ })[];
13
+ }
14
+ export default _default;
15
+ //# sourceMappingURL=slash_command_suggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slash_command_suggestion.d.ts","sourceRoot":"","sources":["../../../../components/rich_text_editor/slash_command_suggestion.js"],"names":[],"mappings":";IACE;;;;;;;;;;SAwBC"}
@@ -179,6 +179,23 @@ declare const _default: import("vue").DefineComponent<{
179
179
  type: ObjectConstructor;
180
180
  default: null;
181
181
  };
182
+ /**
183
+ * suggestion object containing the items query function.
184
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
185
+ *
186
+ * The only required key is the items function which is used to query the slash commands for suggestion.
187
+ * items({ query }) => { return [SlashCommandObject]; }
188
+ * SlashCommandObject format:
189
+ * { command: string, description: string, parametersExample?: string }
190
+ * The "parametersExample" parameter is optional, and describes an example
191
+ * of the parameters that command can take.
192
+ *
193
+ * When null, it does not add the plugin.
194
+ */
195
+ slashCommandSuggestion: {
196
+ type: ObjectConstructor;
197
+ default: null;
198
+ };
182
199
  /**
183
200
  * Whether the input allows for block quote.
184
201
  */
@@ -243,6 +260,7 @@ declare const _default: import("vue").DefineComponent<{
243
260
  onPaste(e: any): void;
244
261
  onSkinTone(skinTone: any): void;
245
262
  onSelectEmoji(emoji: any): void;
263
+ onSelectedCommand(command: any): void;
246
264
  onSelectImage(): void;
247
265
  onImageUpload(): void;
248
266
  toggleEmojiPicker(): void;
@@ -251,7 +269,7 @@ declare const _default: import("vue").DefineComponent<{
251
269
  onFocus(event: any): void;
252
270
  onBlur(event: any): void;
253
271
  onInput(event: any): void;
254
- }, never, import("vue/types/v3-component-options.js").ComponentOptionsMixin, ("input" | "focus" | "submit" | "blur" | "cancel" | "selected-emoji" | "skin-tone" | "select-media" | "add-media" | "paste-media")[], string, Readonly<import("vue").ExtractPropTypes<{
272
+ }, never, import("vue/types/v3-component-options.js").ComponentOptionsMixin, ("input" | "focus" | "submit" | "blur" | "cancel" | "selected-emoji" | "skin-tone" | "selected-command" | "update:value" | "select-media" | "add-media" | "paste-media")[], string, Readonly<import("vue").ExtractPropTypes<{
255
273
  /**
256
274
  * Value of the input. The object format should match TipTap's JSON
257
275
  * document structure: https://tiptap.dev/guide/output#option-1-json
@@ -432,6 +450,23 @@ declare const _default: import("vue").DefineComponent<{
432
450
  type: ObjectConstructor;
433
451
  default: null;
434
452
  };
453
+ /**
454
+ * suggestion object containing the items query function.
455
+ * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
456
+ *
457
+ * The only required key is the items function which is used to query the slash commands for suggestion.
458
+ * items({ query }) => { return [SlashCommandObject]; }
459
+ * SlashCommandObject format:
460
+ * { command: string, description: string, parametersExample?: string }
461
+ * The "parametersExample" parameter is optional, and describes an example
462
+ * of the parameters that command can take.
463
+ *
464
+ * When null, it does not add the plugin.
465
+ */
466
+ slashCommandSuggestion: {
467
+ type: ObjectConstructor;
468
+ default: null;
469
+ };
435
470
  /**
436
471
  * Whether the input allows for block quote.
437
472
  */
@@ -480,12 +515,13 @@ declare const _default: import("vue").DefineComponent<{
480
515
  maxHeight: string;
481
516
  inputClass: string;
482
517
  placeholder: string;
518
+ mentionSuggestion: Record<string, any>;
483
519
  channelSuggestion: Record<string, any>;
520
+ slashCommandSuggestion: Record<string, any>;
484
521
  editable: boolean;
485
522
  inputAriaLabel: string;
486
523
  autoFocus: string | number | boolean;
487
524
  outputFormat: string;
488
- mentionSuggestion: Record<string, any>;
489
525
  allowBlockquote: boolean;
490
526
  allowBold: boolean;
491
527
  allowBulletList: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"message_input.vue.d.ts","sourceRoot":"","sources":["../../../../../recipes/conversation_view/message_input/message_input.vue.js"],"names":[],"mappings":";IAiCI;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;;;;;IAYH;;OAEG;;;;;;IAeH;;OAEG;;;;;IAOH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;IAWH;;OAEG;;;;;;;IAMH;;OAEG;;;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAxPH;;;OAGG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;;IAOH;;;;OAIG;;;;;IAMH;;;;;;;;;;OAUG;;;;;;IAYH;;;;;OAKG;;;;;;IASH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;;;;;IAYH;;O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;;;IAWH;;OAEG;;;;;;;IAMH;;OAEG;;;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;OAUG;;;;;IAMH;;;;;;;;;;;;OAYG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;MAEE;;;;;IAMF;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG"}
package/package.json CHANGED
@@ -1,39 +1,39 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone-vue",
3
- "version": "2.128.0",
3
+ "version": "2.130.0",
4
4
  "description": "Vue component library for Dialpad's design system Dialtone",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
8
  "dependencies": {
9
9
  "@linusborg/vue-simple-portal": "0.1.5",
10
- "@tiptap/core": "2.2.6",
11
- "@tiptap/extension-blockquote": "2.2.6",
12
- "@tiptap/extension-bold": "2.2.6",
13
- "@tiptap/extension-bullet-list": "2.2.6",
14
- "@tiptap/extension-code-block": "2.2.6",
15
- "@tiptap/extension-document": "2.2.6",
16
- "@tiptap/extension-hard-break": "2.2.6",
17
- "@tiptap/extension-italic": "2.2.6",
18
- "@tiptap/extension-link": "2.2.6",
19
- "@tiptap/extension-list-item": "2.2.6",
20
- "@tiptap/extension-mention": "2.2.6",
21
- "@tiptap/extension-ordered-list": "2.2.6",
22
- "@tiptap/extension-paragraph": "2.1.16",
23
- "@tiptap/extension-placeholder": "2.2.6",
24
- "@tiptap/extension-strike": "2.2.6",
25
- "@tiptap/extension-text": "2.2.6",
26
- "@tiptap/extension-text-align": "2.2.6",
27
- "@tiptap/extension-underline": "2.2.6",
28
- "@tiptap/pm": "2.2.6",
29
- "@tiptap/suggestion": "2.2.6",
30
- "@tiptap/vue-2": "2.2.6",
10
+ "@tiptap/core": "2.3.0",
11
+ "@tiptap/extension-blockquote": "2.3.0",
12
+ "@tiptap/extension-bold": "2.3.0",
13
+ "@tiptap/extension-bullet-list": "2.3.0",
14
+ "@tiptap/extension-code-block": "2.3.0",
15
+ "@tiptap/extension-document": "2.3.0",
16
+ "@tiptap/extension-hard-break": "2.3.0",
17
+ "@tiptap/extension-italic": "2.3.0",
18
+ "@tiptap/extension-link": "2.3.0",
19
+ "@tiptap/extension-list-item": "2.3.0",
20
+ "@tiptap/extension-mention": "2.3.0",
21
+ "@tiptap/extension-ordered-list": "2.3.0",
22
+ "@tiptap/extension-paragraph": "2.3.0",
23
+ "@tiptap/extension-placeholder": "2.3.0",
24
+ "@tiptap/extension-strike": "2.3.0",
25
+ "@tiptap/extension-text": "2.3.0",
26
+ "@tiptap/extension-text-align": "2.3.0",
27
+ "@tiptap/extension-underline": "2.3.0",
28
+ "@tiptap/pm": "2.3.0",
29
+ "@tiptap/suggestion": "2.3.0",
30
+ "@tiptap/vue-2": "2.3.0",
31
31
  "date-fns": "2.30.0",
32
32
  "emoji-regex": "10.3.0",
33
33
  "emoji-toolkit": "8.0.0",
34
34
  "tippy.js": "6.3.7",
35
35
  "@dialpad/dialtone-emojis": "1.0.2",
36
- "@dialpad/dialtone-icons": "4.13.1"
36
+ "@dialpad/dialtone-icons": "4.14.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@percy/cli": "1.28.2",
@@ -81,12 +81,12 @@
81
81
  "vue-tsc": "^1.8.25",
82
82
  "yo": "^5.0.0",
83
83
  "yorkie": "^2.0.0",
84
- "@dialpad/dialtone-css": "8.30.0",
84
+ "@dialpad/dialtone-css": "8.31.0",
85
85
  "@dialpad/generator-dialtone": "0.1.0"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "vue": ">=2.6",
89
- "@dialpad/dialtone-css": "^8.30.0"
89
+ "@dialpad/dialtone-css": "^8.31.0"
90
90
  },
91
91
  "bugs": {
92
92
  "email": "dialtone@dialpad.com"