@weni/unnnic-system 3.2.7-alpha.0 → 3.2.8

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 (190) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
  3. package/dist/components/Alert/Alert.vue.d.ts +5 -5
  4. package/dist/components/Alert/Version1dot1.vue.d.ts +2 -2
  5. package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +2 -2
  6. package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
  7. package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +5 -5
  8. package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +2 -2
  9. package/dist/components/Banner/Banner.vue.d.ts +1 -1
  10. package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
  11. package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
  12. package/dist/components/Button/Button.vue.d.ts +2 -2
  13. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  14. package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
  15. package/dist/components/Button/types.d.ts +1 -1
  16. package/dist/components/Button/types.d.ts.map +1 -1
  17. package/dist/components/Card/AccountCard.vue.d.ts +3 -3
  18. package/dist/components/Card/BlankCard.vue.d.ts +1 -1
  19. package/dist/components/Card/Card.vue.d.ts +21 -21
  20. package/dist/components/Card/CardCompany.vue.d.ts +8 -8
  21. package/dist/components/Card/CardData.vue.d.ts +1 -1
  22. package/dist/components/Card/CardStatusesContainer.vue.d.ts +4 -4
  23. package/dist/components/Card/ContentCard.vue.d.ts +2 -2
  24. package/dist/components/Card/DashCard.vue.d.ts +4 -4
  25. package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
  26. package/dist/components/Card/MarketplaceCard.vue.d.ts +2 -2
  27. package/dist/components/Card/SimpleCard.vue.d.ts +3 -3
  28. package/dist/components/Card/StatusCard.vue.d.ts +2 -2
  29. package/dist/components/Card/TitleCard.vue.d.ts +2 -2
  30. package/dist/components/CardImage/CardImage.vue.d.ts +8 -8
  31. package/dist/components/CardInformation/CardInformation.vue.d.ts +4 -4
  32. package/dist/components/CardProject/CardProject.vue.d.ts +3 -3
  33. package/dist/components/Carousel/Carousel.vue.d.ts +11 -11
  34. package/dist/components/Carousel/TagCarousel.vue.d.ts +9 -9
  35. package/dist/components/ChartBar/ChartBar.vue.d.ts +8 -8
  36. package/dist/components/ChartLine/ChartLine.vue.d.ts +1 -1
  37. package/dist/components/ChatText/ChatText.vue.d.ts +2 -2
  38. package/dist/components/ChatsContact/ChatsContact.vue.d.ts +15 -15
  39. package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
  40. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
  41. package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
  42. package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +5 -5
  43. package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
  44. package/dist/components/ChatsMessage/ChatsMessageText.vue.d.ts.map +1 -1
  45. package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
  46. package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
  47. package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
  48. package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
  49. package/dist/components/Comment/Comment.vue.d.ts +1 -1
  50. package/dist/components/DataArea/DataArea.vue.d.ts +2 -2
  51. package/dist/components/DataTable/index.vue.d.ts +1 -1
  52. package/dist/components/DataTable/index.vue.d.ts.map +1 -1
  53. package/dist/components/DateFilter/DateFilter.vue.d.ts +27 -182
  54. package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
  55. package/dist/components/DatePicker/DatePicker.vue.d.ts.map +1 -1
  56. package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
  57. package/dist/components/Drawer/Drawer.vue.d.ts.map +1 -1
  58. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -1
  59. package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
  60. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
  61. package/dist/components/Flag.vue.d.ts +2 -2
  62. package/dist/components/FormElement/FormElement.vue.d.ts +32 -38
  63. package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
  64. package/dist/components/Icon.vue.d.ts +1 -1
  65. package/dist/components/Icon.vue.d.ts.map +1 -1
  66. package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
  67. package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
  68. package/dist/components/Input/BaseInput.vue.d.ts +1 -10
  69. package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
  70. package/dist/components/Input/Input.vue.d.ts +27 -182
  71. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  72. package/dist/components/Input/TextInput.vue.d.ts +13 -31
  73. package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +37 -192
  74. package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
  75. package/dist/components/Modal/Modal.vue.d.ts +2 -2
  76. package/dist/components/ModalDialog/ModalDialog.vue.d.ts +10 -10
  77. package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
  78. package/dist/components/ModalNext/ModalNext.vue.d.ts +34 -189
  79. package/dist/components/ModalUpload/ModalUpload.vue.d.ts +14 -14
  80. package/dist/components/MoodRating/MoodRating.vue.d.ts +1 -1
  81. package/dist/components/MultiSelect/MultiSelect.vue.d.ts +7 -7
  82. package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
  83. package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
  84. package/dist/components/Radio/Radio.vue.d.ts +2 -2
  85. package/dist/components/SelectSmart/SelectSmart.vue.d.ts +27 -45
  86. package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +8 -8
  87. package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +4 -4
  88. package/dist/components/SelectTime/index.vue.d.ts +13 -31
  89. package/dist/components/Slider/Slider.vue.d.ts +2 -2
  90. package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
  91. package/dist/components/Switch/Switch.vue.d.ts +2 -2
  92. package/dist/components/Tab/Tab.vue.d.ts +2 -2
  93. package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
  94. package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
  95. package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
  96. package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
  97. package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
  98. package/dist/components/Tag/IndicatorTag.vue.d.ts +2 -2
  99. package/dist/components/Tag/Tag.vue.d.ts +8 -8
  100. package/dist/components/Tag/TagNext.vue.d.ts.map +1 -1
  101. package/dist/components/TextArea/TextArea.vue.d.ts +32 -38
  102. package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
  103. package/dist/components/ToolTip/ToolTip.vue.d.ts +1 -1
  104. package/dist/components/Tour/Tour.vue.d.ts +6 -6
  105. package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
  106. package/dist/components/UploadArea/UploadArea.vue.d.ts +7 -7
  107. package/dist/components/index.d.ts +890 -2158
  108. package/dist/components/index.d.ts.map +1 -1
  109. package/dist/{es-a147ef18.mjs → es-b3e51efa.js} +1 -1
  110. package/dist/{index-802ab669.mjs → index-b9e3c5e9.js} +7649 -7812
  111. package/dist/{pt-br-cdc64aa4.mjs → pt-br-20887b32.js} +1 -1
  112. package/dist/style.css +1 -1
  113. package/dist/unnnic.js +182 -0
  114. package/dist/{unnnic.umd.js → unnnic.umd.cjs} +41 -42
  115. package/package.json +10 -9
  116. package/src/assets/icons/script-to-convert-svg-to-vue.js +4 -7
  117. package/src/components/AudioRecorder/AudioRecorder.vue +3 -2
  118. package/src/components/Button/Button.vue +109 -58
  119. package/src/components/Button/__tests__/Button.spec.js +2 -2
  120. package/src/components/Button/types.ts +2 -1
  121. package/src/components/Card/Card.vue +4 -1
  122. package/src/components/ChartMultiLine/Line/Line.vue +2 -1
  123. package/src/components/ChatsContact/ChatsContact.vue +1 -1
  124. package/src/components/ChatsHeader/ChatsHeader.vue +4 -2
  125. package/src/components/ChatsMessage/ChatsMessageText.vue +5 -5
  126. package/src/components/Chip/Chip.vue +62 -57
  127. package/src/components/Chip/__tests__/Chip.spec.js +18 -18
  128. package/src/components/DataTable/index.vue +8 -5
  129. package/src/components/DatePicker/DatePicker.vue +29 -16
  130. package/src/components/Drawer/Drawer.vue +4 -1
  131. package/src/components/Drawer/__tests__/Drawer.spec.js +9 -3
  132. package/src/components/DropArea/DropArea.vue +1 -1
  133. package/src/components/Dropdown/__tests__/Dropdown.spec.js +17 -17
  134. package/src/components/EmojiPicker/EmojiPicker.vue +57 -48
  135. package/src/components/EmojiPicker/__tests__/EmojiPicker.spec.js +84 -23
  136. package/src/components/Flag.vue +0 -1
  137. package/src/components/FormElement/FormElement.vue +91 -51
  138. package/src/components/Icon/types.ts +2 -2
  139. package/src/components/Icon.vue +3 -1
  140. package/src/components/Input/BaseInput.vue +12 -10
  141. package/src/components/Input/Input.scss +20 -17
  142. package/src/components/Input/Input.vue +28 -86
  143. package/src/components/Input/TextInput.vue +35 -27
  144. package/src/components/Input/__test__/TextInput.spec.js +5 -5
  145. package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +3 -12
  146. package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
  147. package/src/components/InputDatePicker/InputDatePicker.vue +1 -1
  148. package/src/components/Label/Label.vue +2 -2
  149. package/src/components/ModalDialog/ModalDialog.vue +29 -27
  150. package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
  151. package/src/components/ModalNext/ModalNext.vue +2 -2
  152. package/src/components/SelectSmart/SelectSmart.vue +15 -4
  153. package/src/components/SelectSmart/__tests__/SelectSmart.spec.js +2 -2
  154. package/src/components/Switch/__tests__/Switch.spec.js +6 -2
  155. package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
  156. package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
  157. package/src/components/Tag/TagNext.vue +2 -8
  158. package/src/components/TextArea/TextArea.vue +9 -14
  159. package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +2 -7
  160. package/src/components/Tour/TourPopover.vue +1 -1
  161. package/src/components/__tests__/Icon.spec.js +2 -2
  162. package/src/components/index.ts +88 -96
  163. package/src/index.ts +1 -1
  164. package/src/main.ts +1 -1
  165. package/src/stories/Button.stories.js +11 -2
  166. package/src/stories/ChatsHeader.stories.js +1 -1
  167. package/src/stories/ChatsMessage.stories.js +0 -1
  168. package/src/stories/Chip.stories.js +7 -4
  169. package/src/stories/Input.stories.js +3 -17
  170. package/src/stories/SelectSmart.stories.js +1 -1
  171. package/src/stories/TableNext.stories.js +1 -1
  172. package/src/types/index.d.ts +2 -2
  173. package/src/types/scheme-colors.d.ts +1 -2
  174. package/src/types/unnnic-utils.d.ts +87 -87
  175. package/src/types/vue-shims.d.ts +1 -1
  176. package/src/types/vueuse-overrides.d.ts +2 -2
  177. package/src/utils/plugins/i18n.js +0 -1
  178. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +0 -9
  179. package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +0 -1
  180. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +0 -15
  181. package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +0 -1
  182. package/dist/unnnic.mjs +0 -186
  183. package/src/assets/img/previews/doc-preview.png +0 -0
  184. package/src/assets/img/previews/image-preview.png +0 -0
  185. package/src/assets/img/previews/video-preview.png +0 -0
  186. package/src/components/TemplatePreview/TemplatePreview.vue +0 -249
  187. package/src/components/TemplatePreview/TemplatePreviewModal.vue +0 -51
  188. package/src/components/TemplatePreview/types.d.ts +0 -16
  189. package/src/stories/TemplatePreview.stories.js +0 -94
  190. package/src/stories/TemplatePreviewModal.stories.js +0 -110
@@ -1,88 +1,88 @@
1
1
  export type UnnnicColorToken =
2
- | "background-solo"
3
- | "background-sky"
4
- | "background-grass"
5
- | "background-carpet"
6
- | "background-snow"
7
- | "background-lightest"
8
- | "background-white"
9
- | "neutral-black"
10
- | "neutral-darkest"
11
- | "neutral-dark"
12
- | "neutral-cloudy"
13
- | "neutral-cleanest"
14
- | "neutral-clean"
15
- | "neutral-soft"
16
- | "neutral-lightest"
17
- | "neutral-light"
18
- | "neutral-white"
19
- | "neutral-snow"
20
- | "feedback-red"
21
- | "feedback-green"
22
- | "feedback-yellow"
23
- | "feedback-blue"
24
- | "feedback-grey"
25
- | "aux-blue"
26
- | "aux-purple"
27
- | "aux-orange"
28
- | "aux-lemon"
29
- | "aux-pink"
30
- | "aux-baby-blue"
31
- | "aux-baby-yellow"
32
- | "aux-baby-red"
33
- | "aux-baby-green"
34
- | "aux-baby-pink"
35
- | "aux-green-100"
36
- | "aux-green-300"
37
- | "aux-green-500"
38
- | "aux-green-700"
39
- | "aux-green-900"
40
- | "aux-blue-100"
41
- | "aux-blue-300"
42
- | "aux-blue-500"
43
- | "aux-blue-700"
44
- | "aux-blue-900"
45
- | "aux-purple-100"
46
- | "aux-purple-300"
47
- | "aux-purple-500"
48
- | "aux-purple-700"
49
- | "aux-purple-900"
50
- | "aux-red-100"
51
- | "aux-red-300"
52
- | "aux-red-500"
53
- | "aux-red-700"
54
- | "aux-red-900"
55
- | "aux-orange-100"
56
- | "aux-orange-300"
57
- | "aux-orange-500"
58
- | "aux-orange-700"
59
- | "aux-orange-900"
60
- | "aux-yellow-100"
61
- | "aux-yellow-300"
62
- | "aux-yellow-500"
63
- | "aux-yellow-700"
64
- | "aux-yellow-900"
65
- | "floweditor-blue"
66
- | "floweditor-purple"
67
- | "floweditor-wine"
68
- | "floweditor-orange"
69
- | "floweditor-pink"
70
- | "floweditor-turquoise"
71
- | "floweditor-green"
72
- | "weni-50"
73
- | "weni-100"
74
- | "weni-200"
75
- | "weni-300"
76
- | "weni-400"
77
- | "weni-500"
78
- | "weni-600"
79
- | "weni-700"
80
- | "weni-800"
81
- | "weni-900"
82
- | "weni-950"
83
- | "brand-weni"
84
- | "brand-weni-dark"
85
- | "brand-weni-soft"
86
- | "brand-sec-dark"
87
- | "brand-sec-soft"
88
- | "brand-sec";
2
+ | 'background-solo'
3
+ | 'background-sky'
4
+ | 'background-grass'
5
+ | 'background-carpet'
6
+ | 'background-snow'
7
+ | 'background-lightest'
8
+ | 'background-white'
9
+ | 'neutral-black'
10
+ | 'neutral-darkest'
11
+ | 'neutral-dark'
12
+ | 'neutral-cloudy'
13
+ | 'neutral-cleanest'
14
+ | 'neutral-clean'
15
+ | 'neutral-soft'
16
+ | 'neutral-lightest'
17
+ | 'neutral-light'
18
+ | 'neutral-white'
19
+ | 'neutral-snow'
20
+ | 'feedback-red'
21
+ | 'feedback-green'
22
+ | 'feedback-yellow'
23
+ | 'feedback-blue'
24
+ | 'feedback-grey'
25
+ | 'aux-blue'
26
+ | 'aux-purple'
27
+ | 'aux-orange'
28
+ | 'aux-lemon'
29
+ | 'aux-pink'
30
+ | 'aux-baby-blue'
31
+ | 'aux-baby-yellow'
32
+ | 'aux-baby-red'
33
+ | 'aux-baby-green'
34
+ | 'aux-baby-pink'
35
+ | 'aux-green-100'
36
+ | 'aux-green-300'
37
+ | 'aux-green-500'
38
+ | 'aux-green-700'
39
+ | 'aux-green-900'
40
+ | 'aux-blue-100'
41
+ | 'aux-blue-300'
42
+ | 'aux-blue-500'
43
+ | 'aux-blue-700'
44
+ | 'aux-blue-900'
45
+ | 'aux-purple-100'
46
+ | 'aux-purple-300'
47
+ | 'aux-purple-500'
48
+ | 'aux-purple-700'
49
+ | 'aux-purple-900'
50
+ | 'aux-red-100'
51
+ | 'aux-red-300'
52
+ | 'aux-red-500'
53
+ | 'aux-red-700'
54
+ | 'aux-red-900'
55
+ | 'aux-orange-100'
56
+ | 'aux-orange-300'
57
+ | 'aux-orange-500'
58
+ | 'aux-orange-700'
59
+ | 'aux-orange-900'
60
+ | 'aux-yellow-100'
61
+ | 'aux-yellow-300'
62
+ | 'aux-yellow-500'
63
+ | 'aux-yellow-700'
64
+ | 'aux-yellow-900'
65
+ | 'floweditor-blue'
66
+ | 'floweditor-purple'
67
+ | 'floweditor-wine'
68
+ | 'floweditor-orange'
69
+ | 'floweditor-pink'
70
+ | 'floweditor-turquoise'
71
+ | 'floweditor-green'
72
+ | 'weni-50'
73
+ | 'weni-100'
74
+ | 'weni-200'
75
+ | 'weni-300'
76
+ | 'weni-400'
77
+ | 'weni-500'
78
+ | 'weni-600'
79
+ | 'weni-700'
80
+ | 'weni-800'
81
+ | 'weni-900'
82
+ | 'weni-950'
83
+ | 'brand-weni'
84
+ | 'brand-weni-dark'
85
+ | 'brand-weni-soft'
86
+ | 'brand-sec-dark'
87
+ | 'brand-sec-soft'
88
+ | 'brand-sec';
@@ -2,4 +2,4 @@ declare module '*.vue' {
2
2
  import type { DefineComponent } from 'vue';
3
3
  const component: DefineComponent<{}, {}, any>;
4
4
  export default component;
5
- }
5
+ }
@@ -2,6 +2,6 @@ declare module '@vueuse/components' {
2
2
  export interface OnClickOutsideOptions {
3
3
  [key: string]: any;
4
4
  }
5
-
5
+
6
6
  export const vOnClickOutside: any;
7
- }
7
+ }
@@ -1,4 +1,3 @@
1
- /* eslint-disable camelcase */
2
1
  import { createI18n } from 'vue-i18n';
3
2
 
4
3
  import en from '../../locales/en.json';
@@ -1,9 +0,0 @@
1
- import { Template } from './types';
2
- interface Props {
3
- template?: Template | null;
4
- }
5
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
6
- template: Template | null;
7
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
8
- export default _default;
9
- //# sourceMappingURL=TemplatePreview.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TemplatePreview.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TemplatePreview/TemplatePreview.vue"],"names":[],"mappings":"AAgGA;AA6PA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQxC,UAAU,KAAK;IACb,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC5B;;cADY,QAAQ,GAAG,IAAI;;AAkN5B,wBAQG"}
@@ -1,15 +0,0 @@
1
- import { Template } from './types';
2
- interface Props {
3
- locale?: string;
4
- template: Template;
5
- modelValue: boolean;
6
- }
7
- declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
- close: () => any;
9
- }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
10
- onClose?: (() => any) | undefined;
11
- }>, {
12
- locale: string;
13
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
- export default _default;
15
- //# sourceMappingURL=TemplatePreviewModal.vue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TemplatePreviewModal.vue.d.ts","sourceRoot":"","sources":["../../../src/components/TemplatePreview/TemplatePreviewModal.vue"],"names":[],"mappings":"AAWA;AAwDA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAUxC,UAAU,KAAK;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;;;;;;YAHU,MAAM;;AAgGjB,wBASG"}
package/dist/unnnic.mjs DELETED
@@ -1,186 +0,0 @@
1
- import { bf as c, bb as s, bG as e, aQ as r, bm as t, bp as u, aI as o, aJ as U, bc as b, bd as l, aV as d, aX as C, aY as m, aZ as p, a$ as g, bA as T, a_ as h, bi as I, bC as S, bS as D, bD as M, bQ as A, bB as P, by as v, bJ as w, bK as x, bL as B, bM as R, bO as L, bP as N, b0 as k, c0 as F, bH as E, b1 as f, bn as j, bs as y, b$ as z, bx as H, bo as q, bT as G, bU as J, bu as K, aO as O, aP as Q, bR as V, aD as W, aE as X, aR as Y, aT as Z, aS as _, bw as $, bg as nn, aF as an, aH as cn, aG as sn, bj as en, b4 as rn, b5 as tn, b6 as un, b7 as on, bE as Un, ba as bn, bX as ln, bt as dn, bI as Cn, b2 as mn, bN as pn, b9 as gn, b8 as Tn, bY as hn, aK as In, aL as Sn, aW as Dn, bh as Mn, br as An, bF as Pn, bq as vn, bk as wn, aM as xn, bV as Bn, aN as Rn, bl as Ln, be as Nn, bZ as kn, b_ as Fn, bz as En, aU as fn, bW as jn, bv as yn, b3 as zn, c as Hn, U as qn, Q as Gn, M as Jn, ag as Kn, o as On, Y as Qn, $ as Vn, f as Wn, g as Xn, N as Yn, O as Zn, t as _n, w as $n, x as na, y as aa, A as ia, aa as ca, z as sa, T as ea, ac as ra, as as ta, ad as ua, aq as oa, ab as Ua, a8 as ba, aj as la, ak as da, al as Ca, am as ma, ao as pa, ap as ga, B as Ta, aC as ha, ah as Ia, C as Sa, Z as Da, a2 as Ma, aB as Aa, a7 as Pa, _ as va, at as wa, au as xa, a4 as Ba, m as Ra, n as La, ar as Na, u as ka, a as Fa, p as Ea, r as fa, q as ja, a6 as ya, R as za, b as Ha, e as qa, d as Ga, V as Ja, F as Ka, G as Oa, H as Qa, I as Va, ae as Wa, L as Xa, ax as Ya, a3 as Za, ai as _a, D as $a, an as ni, K as ai, J as ii, ay as ci, i as si, j as ei, v as ri, S as ti, a1 as ui, af as oi, a0 as Ui, W as bi, k as li, av as di, l as Ci, X as mi, P as pi, az as gi, aA as Ti, a9 as hi, s as Ii, aw as Si, a5 as Di, E as Mi } from "./index-802ab669.mjs";
2
- import "vue";
3
- export {
4
- c as UnnnicAccordion,
5
- s as UnnnicAlert,
6
- e as UnnnicAudioRecorder,
7
- r as UnnnicAvatarIcon,
8
- t as UnnnicBanner,
9
- u as UnnnicBreadcrumb,
10
- o as UnnnicButton,
11
- U as UnnnicButtonIcon,
12
- b as UnnnicCallAlert,
13
- l as UnnnicCallModal,
14
- d as UnnnicCard,
15
- C as UnnnicCardCompany,
16
- m as UnnnicCardData,
17
- p as UnnnicCardImage,
18
- g as UnnnicCardInformation,
19
- T as UnnnicCardNumber,
20
- h as UnnnicCardProject,
21
- I as UnnnicCarousel,
22
- S as UnnnicChartBar,
23
- D as UnnnicChartFunnel,
24
- M as UnnnicChartLine,
25
- A as UnnnicChartMultiLine,
26
- P as UnnnicChartRainbow,
27
- v as UnnnicChatText,
28
- w as UnnnicChatsContact,
29
- x as UnnnicChatsDashboardTagLive,
30
- B as UnnnicChatsHeader,
31
- R as UnnnicChatsMessage,
32
- L as UnnnicChatsNavbar,
33
- N as UnnnicChatsUserAvatar,
34
- k as UnnnicCheckbox,
35
- F as UnnnicChip,
36
- E as UnnnicCircleProgressBar,
37
- f as UnnnicCollapse,
38
- j as UnnnicComment,
39
- y as UnnnicDataArea,
40
- z as UnnnicDataTable,
41
- H as UnnnicDateFilter,
42
- q as UnnnicDatePicker,
43
- G as UnnnicDisclaimer,
44
- J as UnnnicDrawer,
45
- K as UnnnicDropArea,
46
- O as UnnnicDropdown,
47
- Q as UnnnicDropdownItem,
48
- V as UnnnicEmojiPicker,
49
- W as UnnnicFontSize,
50
- X as UnnnicFormElement,
51
- Y as UnnnicIcon,
52
- Z as UnnnicIconLoading,
53
- _ as UnnnicIconSvg,
54
- $ as UnnnicImportCard,
55
- nn as UnnnicIndicator,
56
- an as UnnnicInput,
57
- cn as UnnnicInputDatePicker,
58
- sn as UnnnicInputNext,
59
- en as UnnnicLabel,
60
- rn as UnnnicModal,
61
- tn as UnnnicModalDialog,
62
- un as UnnnicModalNext,
63
- on as UnnnicModalUpload,
64
- Un as UnnnicMoodRating,
65
- bn as UnnnicMultiSelect,
66
- ln as UnnnicNavigator,
67
- dn as UnnnicPagination,
68
- Cn as UnnnicProgressBar,
69
- mn as UnnnicRadio,
70
- pn as UnnnicReplyMessage,
71
- gn as UnnnicSelectItem,
72
- Tn as UnnnicSelectSmart,
73
- hn as UnnnicSelectTime,
74
- In as UnnnicSidebar,
75
- Sn as UnnnicSidebarItem,
76
- Dn as UnnnicSimpleCard,
77
- Mn as UnnnicSkeletonLoading,
78
- An as UnnnicSlider,
79
- Pn as UnnnicStarRating,
80
- vn as UnnnicSwitch,
81
- wn as UnnnicTab,
82
- xn as UnnnicTable,
83
- Bn as UnnnicTableNext,
84
- Rn as UnnnicTableRow,
85
- Ln as UnnnicTabsExpanded,
86
- Nn as UnnnicTag,
87
- kn as UnnnicTemplatePreview,
88
- Fn as UnnnicTemplatePreviewModal,
89
- En as UnnnicTextArea,
90
- fn as UnnnicToolTip,
91
- jn as UnnnicTour,
92
- yn as UnnnicUploadArea,
93
- zn as UnnniclanguageSelect,
94
- Hn as components,
95
- qn as default,
96
- Gn as unnnicAccordion,
97
- Jn as unnnicAlert,
98
- Kn as unnnicAudioRecorder,
99
- On as unnnicAvatarIcon,
100
- Qn as unnnicBanner,
101
- Vn as unnnicBreadcrumb,
102
- Wn as unnnicButton,
103
- Xn as unnnicButtonIcon,
104
- Yn as unnnicCallAlert,
105
- Zn as unnnicCallModal,
106
- _n as unnnicCard,
107
- $n as unnnicCardCompany,
108
- na as unnnicCardData,
109
- aa as unnnicCardImage,
110
- ia as unnnicCardInformation,
111
- ca as unnnicCardNumber,
112
- sa as unnnicCardProject,
113
- ea as unnnicCarousel,
114
- ra as unnnicChartBar,
115
- ta as unnnicChartFunnel,
116
- ua as unnnicChartLine,
117
- oa as unnnicChartMultiLine,
118
- Ua as unnnicChartRainbow,
119
- ba as unnnicChatText,
120
- la as unnnicChatsContact,
121
- da as unnnicChatsDashboardTagLive,
122
- Ca as unnnicChatsHeader,
123
- ma as unnnicChatsMessage,
124
- pa as unnnicChatsNavbar,
125
- ga as unnnicChatsUserAvatar,
126
- Ta as unnnicCheckbox,
127
- ha as unnnicChip,
128
- Ia as unnnicCircleProgressBar,
129
- Sa as unnnicCollapse,
130
- Da as unnnicComment,
131
- Ma as unnnicDataArea,
132
- Aa as unnnicDataTable,
133
- Pa as unnnicDateFilter,
134
- va as unnnicDatePicker,
135
- wa as unnnicDisclaimer,
136
- xa as unnnicDrawer,
137
- Ba as unnnicDropArea,
138
- Ra as unnnicDropdown,
139
- La as unnnicDropdownItem,
140
- Na as unnnicEmojiPicker,
141
- ka as unnnicFontSize,
142
- Fa as unnnicFormElement,
143
- Ea as unnnicIcon,
144
- fa as unnnicIconLoading,
145
- ja as unnnicIconSvg,
146
- ya as unnnicImportCard,
147
- za as unnnicIndicator,
148
- Ha as unnnicInput,
149
- qa as unnnicInputDatePicker,
150
- Ga as unnnicInputNext,
151
- Ja as unnnicLabel,
152
- Ka as unnnicModal,
153
- Oa as unnnicModalDialog,
154
- Qa as unnnicModalNext,
155
- Va as unnnicModalUpload,
156
- Wa as unnnicMoodRating,
157
- Xa as unnnicMultiSelect,
158
- Ya as unnnicNavigator,
159
- Za as unnnicPagination,
160
- _a as unnnicProgressBar,
161
- $a as unnnicRadio,
162
- ni as unnnicReplyMessage,
163
- ai as unnnicSelectItem,
164
- ii as unnnicSelectSmart,
165
- ci as unnnicSelectTime,
166
- si as unnnicSidebar,
167
- ei as unnnicSidebarItem,
168
- ri as unnnicSimpleCard,
169
- ti as unnnicSkeletonLoading,
170
- ui as unnnicSlider,
171
- oi as unnnicStarRating,
172
- Ui as unnnicSwitch,
173
- bi as unnnicTab,
174
- li as unnnicTable,
175
- di as unnnicTableNext,
176
- Ci as unnnicTableRow,
177
- mi as unnnicTabsExpanded,
178
- pi as unnnicTag,
179
- gi as unnnicTemplatePreview,
180
- Ti as unnnicTemplatePreviewModal,
181
- hi as unnnicTextArea,
182
- Ii as unnnicToolTip,
183
- Si as unnnicTour,
184
- Di as unnnicUploadArea,
185
- Mi as unnniclanguageSelect
186
- };
@@ -1,249 +0,0 @@
1
- <template>
2
- <section class="unnnic-template-preview">
3
- <section
4
- :class="[
5
- 'unnnic-template-preview__content',
6
- { 'unnnic-template-preview__content--has-media': hasHeaderMedia },
7
- ]"
8
- >
9
- <header
10
- v-if="hasHeader"
11
- :class="`unnnic-template-preview__header__${
12
- template?.header.type === 'TEXT' ? 'text' : 'media'
13
- }`"
14
- >
15
- <img
16
- class="unnnic-template-preview__header__media__preview"
17
- v-if="
18
- template?.header.type === 'MEDIA' &&
19
- template?.header.mediaType === 'IMAGE'
20
- "
21
- :src="template.header.src || imagePreview"
22
- />
23
- <template
24
- v-else-if="
25
- template?.header.type === 'MEDIA' &&
26
- template?.header.mediaType === 'VIDEO'
27
- "
28
- >
29
- <video
30
- v-if="template.header.src"
31
- class="unnnic-template-preview__header__media__preview"
32
- :src="template.header.src"
33
- controls
34
- />
35
- <img
36
- v-else
37
- class="unnnic-template-preview__header__media__preview"
38
- :src="videoPreview"
39
- />
40
- </template>
41
- <template
42
- v-else-if="
43
- template?.header.type === 'MEDIA' &&
44
- template?.header.mediaType === 'DOCUMENT'
45
- "
46
- >
47
- <img
48
- class="unnnic-template-preview__header__media__preview"
49
- :src="documentPreview"
50
- />
51
- </template>
52
- <h1
53
- class="unnnic-template-preview__header__text__preview"
54
- v-else-if="template?.header.type === 'TEXT'"
55
- >
56
- {{ template.header.text }}
57
- </h1>
58
- </header>
59
- <section
60
- v-if="hasBody"
61
- :class="[
62
- 'unnnic-template-preview__body',
63
- { 'unnnic-template-preview__body--has-media': hasHeaderMedia },
64
- ]"
65
- >
66
- <section v-html="parsedBody"></section>
67
- </section>
68
- <footer
69
- v-if="hasFooter"
70
- :class="[
71
- 'unnnic-template-preview__footer',
72
- { 'unnnic-template-preview__footer--has-media': hasHeaderMedia },
73
- ]"
74
- >
75
- {{ template?.footer }}
76
- </footer>
77
- </section>
78
- <footer v-if="hasButtons" class="unnnic-template-preview__buttons">
79
- <section
80
- v-for="(button, index) in template?.buttons"
81
- :key="`button-${index}`"
82
- class="unnnic-template-preview__buttons__button"
83
- >
84
- <UnnnicIcon
85
- class="unnnic-template-preview__buttons__button__icon"
86
- :icon="getButtonIcon(button.type)"
87
- scheme="aux-blue-500"
88
- size="ant"
89
- />
90
- <p class="unnnic-template-preview__buttons__button__text">
91
- {{ button.text }}
92
- </p>
93
- </section>
94
- </footer>
95
- </section>
96
- </template>
97
-
98
- <script lang="ts" setup>
99
- import { computed } from "vue";
100
-
101
- import type { Template } from "./types";
102
-
103
- import imagePreview from "../../assets/img/previews/image-preview.png";
104
- import documentPreview from "../../assets/img/previews/doc-preview.png";
105
- import videoPreview from "../../assets/img/previews/video-preview.png";
106
-
107
- import UnnnicIcon from "../Icon.vue";
108
-
109
- interface Props {
110
- template?: Template | null;
111
- }
112
-
113
- const props = withDefaults(defineProps<Props>(), {
114
- template: null,
115
- });
116
-
117
- const hasHeader = computed(
118
- () => props.template?.header && props.template.header.type
119
- );
120
- const hasHeaderMedia = computed(
121
- () => !!props.template?.header && props.template.header.type === "MEDIA"
122
- );
123
- const hasBody = computed(
124
- () => !!props.template?.body && props.template.body.length > 0
125
- );
126
- const hasFooter = computed(
127
- () => !!props.template?.footer && props.template.footer.length > 0
128
- );
129
- const hasButtons = computed(
130
- () => !!props.template?.buttons && props.template.buttons.length > 0
131
- );
132
- const parsedBody = computed(() => {
133
- if (!hasBody.value) return "";
134
-
135
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
136
- const result = props
137
- .template!.body!.replaceAll("\n", "<br/>")
138
- .replaceAll(/(?:\*)([^*<\n]+)(?:\*)/g, "<strong>$1</strong>")
139
- .replaceAll(/(?:_)([^_<\n]+)(?:_)/g, "<i>$1</i>")
140
- .replaceAll(/(?:~)([^~<\n]+)(?:~)/g, "<s>$1</s>")
141
- .replaceAll(/(?:```)([^```<\n]+)(?:```)/g, "<tt>$1</tt>")
142
- .replaceAll(/{{.*?}}/g, (match) => `<strong>${match}</strong>`);
143
-
144
- return result;
145
- });
146
-
147
- const getButtonIcon = (buttonType) => {
148
- const buttonMapper = {
149
- PHONE_NUMBER: "phone",
150
- URL: "open_in_new",
151
- COPY_CODE: "content_copy",
152
- FLOW: "",
153
- QUICK_REPLY: "reply",
154
- };
155
-
156
- return buttonMapper[buttonType] || "";
157
- };
158
- </script>
159
-
160
- <style lang="scss" scoped>
161
- @use "@/assets/scss/unnnic" as *;
162
-
163
- .unnnic-template-preview {
164
- display: flex;
165
- flex-direction: column;
166
- box-shadow: $unnnic-shadow-level-near;
167
- background-color: $unnnic-color-background-white;
168
- width: 368px;
169
- border-radius: $unnnic-border-radius-md;
170
-
171
- &__content {
172
- display: flex;
173
- flex-direction: column;
174
- gap: $unnnic-space-3;
175
- padding: $unnnic-space-4 $unnnic-space-3;
176
-
177
- &--has-media {
178
- padding: $unnnic-space-1;
179
- }
180
- }
181
-
182
- &__header {
183
- &__text {
184
- &__preview {
185
- font-family: $unnnic-font-family-secondary;
186
- font-weight: $unnnic-font-weight-bold;
187
- font-size: $unnnic-font-size-body-gt;
188
- line-height: $unnnic-font-size-body-gt + $unnnic-line-height-medium;
189
- color: $unnnic-color-neutral-dark;
190
-
191
- margin: $unnnic-space-0;
192
- }
193
- }
194
-
195
- &__media {
196
- &__preview {
197
- width: 100%;
198
- object-fit: cover;
199
- }
200
- }
201
- }
202
-
203
- &__body {
204
- font-family: $unnnic-font-family-secondary;
205
- font-weight: $unnnic-font-weight-regular;
206
- font-size: $unnnic-font-size-body-gt;
207
- line-height: $unnnic-font-size-body-gt + $unnnic-line-height-medium;
208
- color: $unnnic-color-neutral-cloudy;
209
-
210
- &--has-media {
211
- padding: $unnnic-space-0 $unnnic-space-2;
212
- }
213
- }
214
-
215
- &__footer {
216
- font-family: $unnnic-font-family-secondary;
217
- font-weight: $unnnic-font-weight-regular;
218
- font-size: $unnnic-font-size-body-md;
219
- line-height: $unnnic-font-size-body-md + $unnnic-line-height-medium;
220
- color: $unnnic-color-neutral-clean;
221
-
222
- &--has-media {
223
- padding: $unnnic-space-0 $unnnic-space-3 $unnnic-space-2;
224
- }
225
- }
226
-
227
- &__buttons {
228
- font-family: $unnnic-font-family-secondary;
229
- font-weight: $unnnic-font-weight-bold;
230
- font-size: $unnnic-font-size-body-gt;
231
- line-height: $unnnic-font-size-body-gt + $unnnic-line-height-medium;
232
-
233
- &__button {
234
- margin: 0;
235
- display: flex;
236
- align-items: center;
237
- justify-content: center;
238
- gap: $unnnic-space-2;
239
- padding: $unnnic-space-3;
240
- border-top: 1px solid $unnnic-color-neutral-light;
241
-
242
- &__text {
243
- color: $unnnic-color-aux-blue-500;
244
- margin: $unnnic-space-0;
245
- }
246
- }
247
- }
248
- }
249
- </style>