@weni/unnnic-system 3.2.5 → 3.2.7-alpha.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.
- package/CHANGELOG.md +16 -0
- package/dist/components/Accordion/Accordion.vue.d.ts +1 -1
- package/dist/components/Alert/Alert.vue.d.ts +5 -5
- package/dist/components/Alert/Version1dot1.vue.d.ts +2 -2
- package/dist/components/AudioRecorder/AudioHandler.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioPlayer.vue.d.ts +1 -1
- package/dist/components/AudioRecorder/AudioRecorder.vue.d.ts +3 -3
- package/dist/components/AvatarIcon/AvatarIcon.vue.d.ts +2 -2
- package/dist/components/Banner/Banner.vue.d.ts +1 -1
- package/dist/components/Banner/InfoBanner.vue.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +1 -1
- package/dist/components/Button/Button.vue.d.ts +2 -2
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/ButtonIcon.vue.d.ts +1 -1
- package/dist/components/Button/types.d.ts +1 -1
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/AccountCard.vue.d.ts +3 -3
- package/dist/components/Card/BlankCard.vue.d.ts +1 -1
- package/dist/components/Card/Card.vue.d.ts +20 -20
- package/dist/components/Card/CardCompany.vue.d.ts +7 -7
- package/dist/components/Card/CardData.vue.d.ts +1 -1
- package/dist/components/Card/CardStatusesContainer.vue.d.ts +3 -3
- package/dist/components/Card/ContentCard.vue.d.ts +2 -2
- package/dist/components/Card/DashCard.vue.d.ts +4 -4
- package/dist/components/Card/DefaultCard.vue.d.ts +1 -1
- package/dist/components/Card/MarketplaceCard.vue.d.ts +2 -2
- package/dist/components/Card/SimpleCard.vue.d.ts +2 -2
- package/dist/components/Card/StatusCard.vue.d.ts +2 -2
- package/dist/components/Card/TitleCard.vue.d.ts +1 -1
- package/dist/components/CardImage/CardImage.vue.d.ts +16 -7
- package/dist/components/CardInformation/CardInformation.vue.d.ts +3 -3
- package/dist/components/CardProject/CardProject.vue.d.ts +11 -2
- package/dist/components/Carousel/Carousel.vue.d.ts +10 -10
- package/dist/components/Carousel/TagCarousel.vue.d.ts +8 -8
- package/dist/components/ChartBar/ChartBar.vue.d.ts +7 -7
- package/dist/components/ChatText/ChatText.vue.d.ts +1 -1
- package/dist/components/ChatsContact/ChatsContact.vue.d.ts +14 -14
- package/dist/components/ChatsDashboardTagLive/ChatsDashboardTagLive.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts +1 -1
- package/dist/components/ChatsHeader/ChatsHeader.vue.d.ts.map +1 -1
- package/dist/components/ChatsMessage/ChatsMessage.vue.d.ts +4 -4
- package/dist/components/ChatsMessage/ChatsMessageStatusBackdrop.vue.d.ts +2 -2
- package/dist/components/ChatsNavbar/ChatsNavbar.vue.d.ts +1 -1
- package/dist/components/ChatsUserAvatar/ChatsUserAvatar.vue.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/Comment/Comment.vue.d.ts +1 -1
- package/dist/components/DataArea/DataArea.vue.d.ts +1 -1
- package/dist/components/DataTable/index.vue.d.ts +3 -1
- package/dist/components/DataTable/index.vue.d.ts.map +1 -1
- package/dist/components/DateFilter/DateFilter.vue.d.ts +182 -27
- package/dist/components/DatePicker/DatePicker.vue.d.ts +8 -8
- package/dist/components/Drawer/Drawer.vue.d.ts +7 -7
- package/dist/components/DropArea/DropArea.vue.d.ts +2 -0
- package/dist/components/DropArea/DropArea.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.vue.d.ts +9 -0
- package/dist/components/Dropdown/LanguageSelect.vue.d.ts +3 -3
- package/dist/components/Flag.vue.d.ts +2 -2
- package/dist/components/FormElement/FormElement.vue.d.ts +38 -32
- package/dist/components/FormElement/FormElement.vue.d.ts.map +1 -1
- package/dist/components/Icon.vue.d.ts +1 -1
- package/dist/components/IconLoading/IconLoading.vue.d.ts +1 -1
- package/dist/components/ImportCard/ImportCard.vue.d.ts +7 -7
- package/dist/components/Input/BaseInput.vue.d.ts +10 -1
- package/dist/components/Input/BaseInput.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +182 -27
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/TextInput.vue.d.ts +31 -13
- package/dist/components/InputDatePicker/InputDatePicker.vue.d.ts +192 -37
- package/dist/components/InputNext/InputNext.vue.d.ts +3 -3
- package/dist/components/Modal/Modal.vue.d.ts +2 -2
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts +10 -10
- package/dist/components/ModalDialog/ModalDialog.vue.d.ts.map +1 -1
- package/dist/components/ModalNext/ModalNext.vue.d.ts +189 -34
- package/dist/components/ModalUpload/ModalUpload.vue.d.ts +20 -14
- package/dist/components/MultiSelect/MultiSelect.vue.d.ts +7 -7
- package/dist/components/Pagination/Pagination.vue.d.ts +6 -6
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +1 -1
- package/dist/components/Radio/Radio.vue.d.ts +2 -2
- package/dist/components/SelectSmart/SelectSmart.vue.d.ts +45 -26
- package/dist/components/SelectSmart/SelectSmartMultipleHeader.vue.d.ts +7 -7
- package/dist/components/SelectSmart/SelectSmartOption.vue.d.ts +4 -4
- package/dist/components/SelectTime/index.vue.d.ts +31 -13
- package/dist/components/Slider/Slider.vue.d.ts +1 -1
- package/dist/components/StarRating/StarRating.vue.d.ts +1 -1
- package/dist/components/Switch/Switch.vue.d.ts +2 -2
- package/dist/components/Tab/Tab.vue.d.ts +1 -1
- package/dist/components/TableNext/TableBodyCell.vue.d.ts +2 -2
- package/dist/components/TableNext/TablePagination.vue.d.ts +6 -6
- package/dist/components/TabsExpanded/TabsExpanded.vue.d.ts +1 -1
- package/dist/components/Tag/BrandTag.vue.d.ts +2 -2
- package/dist/components/Tag/DefaultTag.vue.d.ts +2 -2
- package/dist/components/Tag/IndicatorTag.vue.d.ts +1 -1
- package/dist/components/Tag/Tag.vue.d.ts +7 -7
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts +9 -0
- package/dist/components/TemplatePreview/TemplatePreview.vue.d.ts.map +1 -0
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts +15 -0
- package/dist/components/TemplatePreview/TemplatePreviewModal.vue.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.vue.d.ts +38 -32
- package/dist/components/TextArea/TextArea.vue.d.ts.map +1 -1
- package/dist/components/Tour/Tour.vue.d.ts +6 -6
- package/dist/components/Tour/TourPopover.vue.d.ts +6 -6
- package/dist/components/UploadArea/UploadArea.vue.d.ts +13 -7
- package/dist/components/index.d.ts +2071 -767
- package/dist/components/index.d.ts.map +1 -1
- package/dist/{es-a07e7553.mjs → es-a147ef18.mjs} +1 -1
- package/dist/{index-93aafec9.mjs → index-802ab669.mjs} +8035 -7832
- package/dist/{pt-br-a81c613f.mjs → pt-br-cdc64aa4.mjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/unnnic.mjs +123 -119
- package/dist/unnnic.umd.js +42 -41
- package/package.json +2 -2
- package/src/assets/img/previews/doc-preview.png +0 -0
- package/src/assets/img/previews/image-preview.png +0 -0
- package/src/assets/img/previews/video-preview.png +0 -0
- package/src/components/Button/Button.vue +57 -108
- package/src/components/Button/types.ts +0 -1
- package/src/components/DataTable/index.vue +26 -14
- package/src/components/DropArea/DropArea.vue +26 -2
- package/src/components/Dropdown/Dropdown.vue +6 -0
- package/src/components/Dropdown/__tests__/Dropdown.spec.js +57 -0
- package/src/components/FormElement/FormElement.vue +50 -90
- package/src/components/Input/BaseInput.vue +10 -12
- package/src/components/Input/Input.scss +17 -20
- package/src/components/Input/Input.vue +86 -28
- package/src/components/Input/TextInput.vue +27 -35
- package/src/components/Input/__test__/TextInput.spec.js +5 -5
- package/src/components/Input/__test__/__snapshots__/Input.spec.js.snap +12 -3
- package/src/components/Input/__test__/__snapshots__/TextInput.spec.js.snap +1 -1
- package/src/components/ModalDialog/ModalDialog.vue +27 -29
- package/src/components/ModalDialog/__tests__/__snapshots__/ModalDialog.spec.js.snap +1 -1
- package/src/components/SelectSmart/SelectSmart.vue +3 -1
- package/src/components/SelectSmart/__tests__/SelectSmart.spec.js +45 -0
- package/src/components/TableNext/__test__/__snapshots__/TableNext.spec.js.snap +2 -2
- package/src/components/TableNext/__test__/__snapshots__/TablePagination.spec.js.snap +2 -2
- package/src/components/TemplatePreview/TemplatePreview.vue +249 -0
- package/src/components/TemplatePreview/TemplatePreviewModal.vue +51 -0
- package/src/components/TemplatePreview/types.d.ts +16 -0
- package/src/components/TextArea/TextArea.vue +14 -9
- package/src/components/TextArea/__test__/__snapshots__/TextArea.spec.js.snap +7 -2
- package/src/components/index.ts +11 -3
- package/src/stories/Button.stories.js +1 -10
- package/src/stories/DataTable.stories.js +2 -2
- package/src/stories/Input.stories.js +17 -3
- package/src/stories/TemplatePreview.stories.js +94 -0
- package/src/stories/TemplatePreviewModal.stories.js +110 -0
|
@@ -2,8 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`Input.vue > matches the snapshot 1`] = `
|
|
4
4
|
"<div data-v-d890ad85="" class="unnnic-form md">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
<section data-v-d890ad85="" class="unnnic-form__label">
|
|
6
|
+
<p data-v-d890ad85="">Sample Label</p>
|
|
7
|
+
<!--v-if-->
|
|
8
|
+
</section>
|
|
9
|
+
<div data-v-a0d36167="" data-v-d890ad85="" class="text-input size--md unnnic-form-input" mask="####-####"><input data-v-86533b41="" data-v-a0d36167="" class="unnnic-form-input input-itself input size-md normal input--has-icon-left input--has-icon-right unnnic-form-input input-itself" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" hascloudycolor="false" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>
|
|
10
|
+
<section data-v-d890ad85="" class="unnnic-form__hints-container">
|
|
11
|
+
<section data-v-d890ad85="" class="unnnic-form__message-container">
|
|
12
|
+
<p data-v-d890ad85="" class="unnnic-form__message">Error message</p>
|
|
13
|
+
<!--v-if-->
|
|
14
|
+
</section>
|
|
15
|
+
<!--v-if-->
|
|
16
|
+
</section>
|
|
8
17
|
</div>"
|
|
9
18
|
`;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`TextInput.vue > matches the snapshot 1`] = `"<div data-v-a0d36167="" class="text-input size--md
|
|
3
|
+
exports[`TextInput.vue > matches the snapshot 1`] = `"<div data-v-a0d36167="" class="text-input size--md"><input data-v-86533b41="" data-v-a0d36167="" placeholder="Enter text" iconleft="search" iconright="clear" iconleftclickable="true" iconrightclickable="true" allowtogglepassword="false" hascloudycolor="false" class="input-itself input size-md normal input--has-icon-left input--has-icon-right input-itself" type="text" value=""><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic--clickable icon-left clickable" data-testid="material-icon" translate="no">search</span><span data-v-26446d8e="" data-v-a0d36167="" class="material-symbols-rounded unnnic-icon-scheme--fg-base unnnic-icon-size--ant unnnic--clickable icon-right clickable" data-testid="material-icon" translate="no">clear</span></div>"`;
|
|
@@ -24,10 +24,7 @@
|
|
|
24
24
|
</section>
|
|
25
25
|
|
|
26
26
|
<section class="unnnic-modal-dialog__container__body">
|
|
27
|
-
<header
|
|
28
|
-
v-if="title"
|
|
29
|
-
class="unnnic-modal-dialog__container__header"
|
|
30
|
-
>
|
|
27
|
+
<header v-if="title" class="unnnic-modal-dialog__container__header">
|
|
31
28
|
<section class="unnnic-modal-dialog__container__title-container">
|
|
32
29
|
<UnnnicIcon
|
|
33
30
|
v-if="icon || type"
|
|
@@ -49,6 +46,7 @@
|
|
|
49
46
|
data-testid="close-icon"
|
|
50
47
|
icon="close"
|
|
51
48
|
clickable
|
|
49
|
+
scheme="neutral-cloudy"
|
|
52
50
|
@click="close()"
|
|
53
51
|
/>
|
|
54
52
|
</header>
|
|
@@ -98,12 +96,12 @@
|
|
|
98
96
|
</template>
|
|
99
97
|
|
|
100
98
|
<script>
|
|
101
|
-
import UnnnicIcon from
|
|
102
|
-
import UnnnicButton from
|
|
103
|
-
import UnnnicI18n from
|
|
99
|
+
import UnnnicIcon from "../Icon.vue";
|
|
100
|
+
import UnnnicButton from "../Button/Button.vue";
|
|
101
|
+
import UnnnicI18n from "../../mixins/i18n";
|
|
104
102
|
|
|
105
103
|
export default {
|
|
106
|
-
name:
|
|
104
|
+
name: "UnnnicModalDialog",
|
|
107
105
|
components: {
|
|
108
106
|
UnnnicIcon,
|
|
109
107
|
UnnnicButton,
|
|
@@ -120,29 +118,29 @@ export default {
|
|
|
120
118
|
},
|
|
121
119
|
type: {
|
|
122
120
|
type: String,
|
|
123
|
-
default:
|
|
121
|
+
default: "",
|
|
124
122
|
validate(type) {
|
|
125
|
-
return [
|
|
123
|
+
return ["success", "warning", "attention"].includes(type);
|
|
126
124
|
},
|
|
127
125
|
},
|
|
128
126
|
size: {
|
|
129
127
|
type: String,
|
|
130
|
-
default:
|
|
128
|
+
default: "md",
|
|
131
129
|
validate(size) {
|
|
132
|
-
return [
|
|
130
|
+
return ["sm", "md", "lg"].includes(size);
|
|
133
131
|
},
|
|
134
132
|
},
|
|
135
133
|
title: {
|
|
136
134
|
type: String,
|
|
137
|
-
default:
|
|
135
|
+
default: "",
|
|
138
136
|
},
|
|
139
137
|
icon: {
|
|
140
138
|
type: String,
|
|
141
|
-
default:
|
|
139
|
+
default: "",
|
|
142
140
|
},
|
|
143
141
|
iconScheme: {
|
|
144
142
|
type: String,
|
|
145
|
-
default:
|
|
143
|
+
default: "",
|
|
146
144
|
},
|
|
147
145
|
showCloseIcon: {
|
|
148
146
|
type: Boolean,
|
|
@@ -165,26 +163,26 @@ export default {
|
|
|
165
163
|
default: () => ({}),
|
|
166
164
|
},
|
|
167
165
|
},
|
|
168
|
-
emits: [
|
|
166
|
+
emits: ["primaryButtonClick", "secondaryButtonClick", "update:modelValue"],
|
|
169
167
|
|
|
170
168
|
data() {
|
|
171
169
|
return {
|
|
172
170
|
defaultTranslations: {
|
|
173
171
|
cancel: {
|
|
174
|
-
|
|
175
|
-
en:
|
|
176
|
-
es:
|
|
172
|
+
"pt-br": "Cancelar",
|
|
173
|
+
en: "Cancel",
|
|
174
|
+
es: "Cancelar",
|
|
177
175
|
},
|
|
178
176
|
},
|
|
179
177
|
iconsMapper: {
|
|
180
|
-
success: { icon:
|
|
181
|
-
warning: { icon:
|
|
182
|
-
attention: { icon:
|
|
178
|
+
success: { icon: "check_circle", scheme: "aux-green-500" },
|
|
179
|
+
warning: { icon: "warning", scheme: "aux-red-500" },
|
|
180
|
+
attention: { icon: "error", scheme: "aux-yellow-500" },
|
|
183
181
|
},
|
|
184
182
|
primaryButtonTypeMapper: {
|
|
185
|
-
success:
|
|
186
|
-
warning:
|
|
187
|
-
attention:
|
|
183
|
+
success: "primary",
|
|
184
|
+
warning: "warning",
|
|
185
|
+
attention: "attention",
|
|
188
186
|
},
|
|
189
187
|
};
|
|
190
188
|
},
|
|
@@ -195,17 +193,17 @@ export default {
|
|
|
195
193
|
},
|
|
196
194
|
methods: {
|
|
197
195
|
close() {
|
|
198
|
-
this.$emit(
|
|
196
|
+
this.$emit("update:modelValue", false);
|
|
199
197
|
},
|
|
200
198
|
updateBodyOverflow(isHidden) {
|
|
201
|
-
document.body.style.overflow = isHidden ?
|
|
199
|
+
document.body.style.overflow = isHidden ? "hidden" : "";
|
|
202
200
|
},
|
|
203
201
|
},
|
|
204
202
|
};
|
|
205
203
|
</script>
|
|
206
204
|
|
|
207
205
|
<style lang="scss" scoped>
|
|
208
|
-
@use
|
|
206
|
+
@use "@/assets/scss/unnnic" as *;
|
|
209
207
|
* {
|
|
210
208
|
margin: 0;
|
|
211
209
|
padding: 0;
|
|
@@ -312,7 +310,7 @@ export default {
|
|
|
312
310
|
&__actions {
|
|
313
311
|
display: grid;
|
|
314
312
|
grid-template-columns: 1fr 1fr;
|
|
315
|
-
grid-template-areas:
|
|
313
|
+
grid-template-areas: "secondary-button primary-button";
|
|
316
314
|
gap: $unnnic-spacing-sm;
|
|
317
315
|
padding: $unnnic-spacing-md;
|
|
318
316
|
flex-shrink: 0;
|
|
@@ -11,7 +11,7 @@ exports[`ModalDialog.vue > Elements rendering > matches the snapshot 1`] = `
|
|
|
11
11
|
<unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="test-icon" clickable="false" size="md" scheme="neutral-darkest" data-testid="title-icon" class="unnnic-modal-dialog__container__title-icon"></unnnic-icon-stub>
|
|
12
12
|
<h1 data-v-68ebadeb="" class="unnnic-modal-dialog__container__title-text" data-testid="title-text">Test Title</h1>
|
|
13
13
|
</section>
|
|
14
|
-
<unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="close" clickable="true" size="md" scheme="neutral-
|
|
14
|
+
<unnnic-icon-stub data-v-68ebadeb="" filled="false" next="false" icon="close" clickable="true" size="md" scheme="neutral-cloudy" data-testid="close-icon"></unnnic-icon-stub>
|
|
15
15
|
</header>
|
|
16
16
|
<section data-v-68ebadeb="" class="unnnic-modal-dialog__container__content"></section>
|
|
17
17
|
<section data-v-68ebadeb="" data-testid="actions-section" class="unnnic-modal-dialog__container__actions">
|
|
@@ -214,7 +214,7 @@ export default {
|
|
|
214
214
|
},
|
|
215
215
|
},
|
|
216
216
|
|
|
217
|
-
emits: ['update:searchValue', 'onChange', 'update:modelValue'],
|
|
217
|
+
emits: ['update:searchValue', 'onChange', 'update:modelValue', 'onActiveChange'],
|
|
218
218
|
|
|
219
219
|
data() {
|
|
220
220
|
return {
|
|
@@ -303,6 +303,8 @@ export default {
|
|
|
303
303
|
active(newValue) {
|
|
304
304
|
this.$refs['dropdown-skeleton'].calculatePosition();
|
|
305
305
|
|
|
306
|
+
this.$emit('onActiveChange', newValue);
|
|
307
|
+
|
|
306
308
|
this.$nextTick(() => {
|
|
307
309
|
if (newValue && !this.multiple) {
|
|
308
310
|
const activeOptionIndex = this.getOptionIndex('active');
|
|
@@ -238,6 +238,51 @@ describe('SelectSmart.vue', () => {
|
|
|
238
238
|
});
|
|
239
239
|
});
|
|
240
240
|
|
|
241
|
+
describe('onActiveChange Event', () => {
|
|
242
|
+
it('should emit onActiveChange when dropdown opens', async () => {
|
|
243
|
+
await input().trigger('click');
|
|
244
|
+
|
|
245
|
+
expect(wrapper.emitted('onActiveChange')).toBeTruthy();
|
|
246
|
+
expect(wrapper.emitted('onActiveChange')[0][0]).toBe(true);
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
it('should emit onActiveChange when dropdown closes', async () => {
|
|
250
|
+
wrapper.vm.active = true;
|
|
251
|
+
await nextTick();
|
|
252
|
+
|
|
253
|
+
wrapper.vm.active = false;
|
|
254
|
+
await nextTick();
|
|
255
|
+
|
|
256
|
+
expect(wrapper.emitted('onActiveChange')).toBeTruthy();
|
|
257
|
+
expect(wrapper.emitted('onActiveChange')[1][0]).toBe(false);
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
it('should emit onActiveChange when toggling dropdown visibility', async () => {
|
|
261
|
+
// Open dropdown
|
|
262
|
+
await input().trigger('click');
|
|
263
|
+
|
|
264
|
+
// Close dropdown
|
|
265
|
+
await input().trigger('click');
|
|
266
|
+
|
|
267
|
+
const emittedEvents = wrapper.emitted('onActiveChange');
|
|
268
|
+
expect(emittedEvents).toBeTruthy();
|
|
269
|
+
expect(emittedEvents.length).toBe(2);
|
|
270
|
+
expect(emittedEvents[0][0]).toBe(true); // opened
|
|
271
|
+
expect(emittedEvents[1][0]).toBe(false); // closed
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
it('should emit onActiveChange when closing dropdown with escape key', async () => {
|
|
275
|
+
await input().trigger('click');
|
|
276
|
+
expect(wrapper.emitted('onActiveChange')[0][0]).toBe(true);
|
|
277
|
+
|
|
278
|
+
await selectSmart().trigger('keydown', { key: 'Escape' });
|
|
279
|
+
|
|
280
|
+
const emittedEvents = wrapper.emitted('onActiveChange');
|
|
281
|
+
expect(emittedEvents.length).toBe(2);
|
|
282
|
+
expect(emittedEvents[1][0]).toBe(false);
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
|
|
241
286
|
describe('Secondary Type', () => {
|
|
242
287
|
beforeEach(() => {
|
|
243
288
|
mountWrapper({
|
|
@@ -42,7 +42,7 @@ exports[`TableNext.vue > matches the snapshot 1`] = `
|
|
|
42
42
|
<p data-v-e29458bb="" class="table-pagination__count" data-testid="count">1 - 1 of 1</p>
|
|
43
43
|
<div data-v-0eeff8cb="" data-v-e29458bb="" class="pagination"><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="previous-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
44
44
|
<!--v-if-->
|
|
45
|
-
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
45
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
|
|
46
46
|
<path d="M26.8368 35.0005C26.5868 35.0005 26.3506 34.903 26.1743 34.7255L12.7743 21.3255C12.4206 20.9717 12.2256 20.5017 12.2256 20.0017C12.2256 19.5017 12.4193 19.0305 12.7731 18.6767L26.1743 5.27549C26.3506 5.09799 26.5868 5.00049 26.8368 5.00049C27.0868 5.00049 27.3231 5.09799 27.4993 5.27549C27.6768 5.45174 27.7743 5.68799 27.7743 5.93799C27.7743 6.18799 27.6768 6.42424 27.4993 6.60049L14.0993 20.0005L27.4993 33.4005C27.6768 33.578 27.7743 33.813 27.7743 34.063C27.7743 34.313 27.6768 34.5492 27.4993 34.7255C27.3218 34.9017 27.0868 35.0005 26.8368 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
47
47
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
48
48
|
<!--v-if-->
|
|
@@ -53,7 +53,7 @@ exports[`TableNext.vue > matches the snapshot 1`] = `
|
|
|
53
53
|
<!--v-if-->
|
|
54
54
|
</button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="next-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
55
55
|
<!--v-if-->
|
|
56
|
-
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
56
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
|
|
57
57
|
<path d="M13.1635 35.0005C12.9135 35.0005 12.6772 34.903 12.501 34.7255C12.136 34.3605 12.136 33.7655 12.501 33.3992L25.901 20.0005L12.501 6.60049C12.3235 6.42424 12.226 6.18799 12.226 5.93799C12.226 5.68799 12.3235 5.45174 12.501 5.27549C12.6772 5.09799 12.9135 5.00049 13.1635 5.00049C13.4135 5.00049 13.6497 5.09799 13.826 5.27549L27.226 18.6755C27.956 19.4055 27.9572 20.5942 27.2272 21.3242L13.826 34.7255C13.6497 34.903 13.4135 35.0005 13.1635 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
58
58
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
59
59
|
<!--v-if-->
|
|
@@ -5,7 +5,7 @@ exports[`TablePagination.vue > matches the snapshot 1`] = `
|
|
|
5
5
|
<p data-v-e29458bb="" class="table-pagination__count" data-testid="count">1 - 10 of 100</p>
|
|
6
6
|
<div data-v-0eeff8cb="" data-v-e29458bb="" class="pagination"><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="previous-button" disabled="" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
7
7
|
<!--v-if-->
|
|
8
|
-
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
8
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-clean" data-testid="icon-center" style="visibility: visible;">
|
|
9
9
|
<path d="M26.8368 35.0005C26.5868 35.0005 26.3506 34.903 26.1743 34.7255L12.7743 21.3255C12.4206 20.9717 12.2256 20.5017 12.2256 20.0017C12.2256 19.5017 12.4193 19.0305 12.7731 18.6767L26.1743 5.27549C26.3506 5.09799 26.5868 5.00049 26.8368 5.00049C27.0868 5.00049 27.3231 5.09799 27.4993 5.27549C27.6768 5.45174 27.7743 5.68799 27.7743 5.93799C27.7743 6.18799 27.6768 6.42424 27.4993 6.60049L14.0993 20.0005L27.4993 33.4005C27.6768 33.578 27.7743 33.813 27.7743 34.063C27.7743 34.313 27.6768 34.5492 27.4993 34.7255C27.3218 34.9017 27.0868 35.0005 26.8368 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
10
10
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
11
11
|
<!--v-if-->
|
|
@@ -36,7 +36,7 @@ exports[`TablePagination.vue > matches the snapshot 1`] = `
|
|
|
36
36
|
<!--v-if-->
|
|
37
37
|
</button><button data-v-ceff2a60="" data-v-0eeff8cb="" data-test="next-button" class="unnnic-button unnnic-button--size-small unnnic-button--tertiary unnnic-button--icon-on-center">
|
|
38
38
|
<!--v-if-->
|
|
39
|
-
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--
|
|
39
|
+
<!--v-if--><svg data-v-26446d8e="" data-v-ceff2a60="" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" class="unnnic-icon unnnic-icon__size--ant unnnic-icon-scheme--neutral-dark" data-testid="icon-center" style="visibility: visible;">
|
|
40
40
|
<path d="M13.1635 35.0005C12.9135 35.0005 12.6772 34.903 12.501 34.7255C12.136 34.3605 12.136 33.7655 12.501 33.3992L25.901 20.0005L12.501 6.60049C12.3235 6.42424 12.226 6.18799 12.226 5.93799C12.226 5.68799 12.3235 5.45174 12.501 5.27549C12.6772 5.09799 12.9135 5.00049 13.1635 5.00049C13.4135 5.00049 13.6497 5.09799 13.826 5.27549L27.226 18.6755C27.956 19.4055 27.9572 20.5942 27.2272 21.3242L13.826 34.7255C13.6497 34.903 13.4135 35.0005 13.1635 35.0005Z" fill="#3B414D" class="primary"></path>
|
|
41
41
|
</svg><span data-v-ceff2a60="" class="unnnic-button__label" style="visibility: visible;" data-testid="button-label"> </span>
|
|
42
42
|
<!--v-if-->
|
|
@@ -0,0 +1,249 @@
|
|
|
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>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UnnnicModalDialog
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
@update:modelValue="$event === false && $emit('close')"
|
|
5
|
+
:title="defaultTranslations.title[props.locale]"
|
|
6
|
+
:show-close-icon="true"
|
|
7
|
+
class="unnnic-template-preview-modal"
|
|
8
|
+
>
|
|
9
|
+
<UnnnicTemplatePreview :template="template" />
|
|
10
|
+
</UnnnicModalDialog>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script lang="ts" setup>
|
|
14
|
+
import UnnnicTemplatePreview from "./TemplatePreview.vue";
|
|
15
|
+
import UnnnicModalDialog from "../ModalDialog/ModalDialog.vue";
|
|
16
|
+
|
|
17
|
+
import type { Template } from "./types";
|
|
18
|
+
|
|
19
|
+
const defaultTranslations = {
|
|
20
|
+
title: {
|
|
21
|
+
"pt-br": "Visualizar modelo",
|
|
22
|
+
en: "Template preview",
|
|
23
|
+
es: "Vista previa de plantilla",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
interface Props {
|
|
28
|
+
locale?: string;
|
|
29
|
+
template: Template;
|
|
30
|
+
modelValue: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
34
|
+
locale: "en",
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
defineEmits<{
|
|
38
|
+
close: void;
|
|
39
|
+
}>();
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss" scoped>
|
|
43
|
+
@use "@/assets/scss/unnnic" as *;
|
|
44
|
+
|
|
45
|
+
:deep(.unnnic-modal-dialog__container__content) {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
background-color: $unnnic-color-neutral-lightest;
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Template {
|
|
2
|
+
header: {
|
|
3
|
+
type: "TEXT" | "MEDIA";
|
|
4
|
+
mediaType?: "IMAGE" | "VIDEO" | "DOCUMENT";
|
|
5
|
+
text?: string | null;
|
|
6
|
+
src?: string | null;
|
|
7
|
+
};
|
|
8
|
+
body?: string;
|
|
9
|
+
footer?: string;
|
|
10
|
+
buttons?: Array<{
|
|
11
|
+
type: "QUICK_REPLY" | "PHONE_NUMBER";
|
|
12
|
+
text: string;
|
|
13
|
+
countryCode?: string;
|
|
14
|
+
phoneNumber?: string;
|
|
15
|
+
}>;
|
|
16
|
+
}
|