vue-intergrall-plugins 1.1.10 → 1.1.12

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 (44) hide show
  1. package/README.md +220 -220
  2. package/dist/vue-intergrall-plugins.esm.js +54 -50
  3. package/dist/vue-intergrall-plugins.min.js +1 -1
  4. package/dist/vue-intergrall-plugins.ssr.js +126 -122
  5. package/package.json +66 -66
  6. package/src/lib-components/Buttons/IconButton.vue +27 -27
  7. package/src/lib-components/Buttons/SimpleButton.vue +140 -140
  8. package/src/lib-components/Cards/Card.vue +490 -490
  9. package/src/lib-components/Cards/CardCheck.vue +35 -35
  10. package/src/lib-components/Cards/CardFile.vue +163 -163
  11. package/src/lib-components/Chat/BtnDownloadAllFiles.vue +36 -36
  12. package/src/lib-components/Chat/BtnEmojis.vue +118 -118
  13. package/src/lib-components/Chat/BtnExpand.vue +17 -17
  14. package/src/lib-components/Chat/BtnFiles.vue +486 -486
  15. package/src/lib-components/Chat/BtnMic.vue +60 -60
  16. package/src/lib-components/Chat/BtnScreenShare.vue +31 -31
  17. package/src/lib-components/Chat/BtnStandardMessages.vue +17 -17
  18. package/src/lib-components/Chat/ExpandTextarea.vue +427 -427
  19. package/src/lib-components/Chat/MultipleFilePreview.vue +291 -291
  20. package/src/lib-components/Chat/Picker.vue +405 -405
  21. package/src/lib-components/Chat/RemainingCharacters.vue +28 -28
  22. package/src/lib-components/Chat/SingleFilePreview.vue +94 -94
  23. package/src/lib-components/Chat/SkeletonPicker.vue +110 -110
  24. package/src/lib-components/Chat/StandardMessages.vue +252 -252
  25. package/src/lib-components/Chat/TextFooter.vue +1007 -1007
  26. package/src/lib-components/Email/EmailExpanded.vue +270 -270
  27. package/src/lib-components/Email/EmailFile.vue +192 -192
  28. package/src/lib-components/Email/EmailFrom.vue +66 -66
  29. package/src/lib-components/Email/EmailItem.vue +937 -933
  30. package/src/lib-components/Email/EmailTo.vue +57 -57
  31. package/src/lib-components/Loader/Loader.vue +78 -78
  32. package/src/lib-components/Messages/AnexoMensagem.vue +415 -415
  33. package/src/lib-components/Messages/CardAttachment.vue +61 -61
  34. package/src/lib-components/Messages/CardMessages.vue +687 -684
  35. package/src/lib-components/Messages/InteratividadeBotoes.vue +199 -199
  36. package/src/lib-components/Messages/InteratividadeContato.vue +32 -32
  37. package/src/lib-components/Messages/InteratividadeContatoItem.vue +213 -213
  38. package/src/lib-components/Messages/InteratividadeFormulario.vue +334 -334
  39. package/src/lib-components/Messages/InteratividadePopup.vue +95 -95
  40. package/src/lib-components/Messages/LinkPreview.vue +176 -176
  41. package/src/lib-components/Scroll/ScrollContent.vue +166 -166
  42. package/src/lib-components/Templates/TemplateGenerator.vue +640 -640
  43. package/src/lib-components/Templates/TemplateMessage.vue +83 -83
  44. package/src/lib-components/Templates/TemplateSingle.vue +478 -478
@@ -1,199 +1,199 @@
1
- <template>
2
- <div class="interatividade">
3
- <div v-if="
4
- interatividade &&
5
- interatividade.parameters &&
6
- interatividade.parameters.button &&
7
- interatividade.parameters.button.length
8
- ">
9
- <div v-for="(button, index) in interatividade.parameters.button" :key="index" class="interatividade-btn">
10
- <p v-if="!button.url" v-html="button.text" class="interatividade-titulo"></p>
11
- <a v-else :href="button.url" target="_blank" rel="noreferrer noopener" class="interatividade-link">
12
- <p v-html="button.text" class="interatividade-titulo"></p>
13
- <fa-icon :icon="['fas', 'external-link-square-alt']" />
14
- </a>
15
- </div>
16
- </div>
17
-
18
- <!-- Tudo aqui abaixo TEORICAMENTE e antigo e nao devera mais cair nas situacoes -->
19
- <div v-if="
20
- interatividade &&
21
- interatividade.parameters &&
22
- interatividade.parameters.button &&
23
- (interatividade.parameters.button.type === 'dynamicURL' ||
24
- interatividade.parameters.button.type === 'staticURL')
25
- " class="interatividade-btn">
26
- <a :href="interatividade.parameters.button.text" target="_blank" rel="noreferrer noopener"
27
- class="interatividade-link">
28
- Acessar <fa-icon :icon="['fas', 'external-link-square-alt']" />
29
- </a>
30
- </div>
31
- <div v-if="
32
- interatividade &&
33
- interatividade.parameters &&
34
- interatividade.parameters.button &&
35
- interatividade.parameters.button.type === 'phoneNumber'
36
- " class="interatividade-btn">
37
- <p class="interatividade-titulo"
38
- :title="`${interatividade.parameters.button.text} (${interatividade.parameters.button.phoneNumber})`" v-text="`${interatividade.parameters.button.text} (${interatividade.parameters.button.phoneNumber})`
39
- "></p>
40
- </div>
41
- <div v-if="
42
- interatividade &&
43
- interatividade.parameters &&
44
- interatividade.parameters.button &&
45
- interatividade.parameters.button.type === 'quickReply'
46
- " class="interatividade-btn">
47
- <p class="interatividade-titulo" :title="`${interatividade.parameters.button.text}`"
48
- v-text="`${interatividade.parameters.button.text}`"></p>
49
- </div>
50
- <transition name="show-x">
51
- <InteratividadePopup v-if="listaEstaAberta" :lista="listaExpandida" :titulo="objItens.list.title"
52
- @close="listaEstaAberta = false" />
53
- </transition>
54
- <template v-if="arrBotoes.length">
55
- <div v-for="(btn, index) in arrBotoes" :key="index" :title="btn.titulo" class="interatividade-btn">
56
- <p v-html="btn.titulo" class="interatividade-titulo"></p>
57
- </div>
58
- </template>
59
- <template v-else-if="Object.keys(objItens).length">
60
- <div class="interatividade-lista" :class="tipoBotoes == 'listItem' ? 'bg-none' : ''">
61
- <div class="interatividade-lista-conteudo"
62
- :class="tipoBotoes == 'listItem' ? 'border-bottom-none padding-none' : ''">
63
- <p v-if="objItens.header && objItens.header.text" v-html="objItens.header.text"
64
- class="interatividade-lista-titulo"></p>
65
- <p v-if="objItens.body && objItens.body.text" v-html="objItens.body.text" class="interatividade-lista-corpo">
66
- </p>
67
- <p v-if="objItens.footer && objItens.footer.text" v-html="objItens.footer.text"
68
- class="interatividade-lista-rodape"></p>
69
- </div>
70
- <p v-if="objItens.list && objItens.list.title" v-html="objItens.list.title" @click="expandirLista"
71
- :class="tipoBotoes == 'listItem' ? 'bg-white border-radius-5 mt-5' : ''" class="interatividade-lista-link">
72
- </p>
73
- </div>
74
- </template>
75
- </div>
76
- </template>
77
-
78
- <script>
79
- import InteratividadePopup from "./InteratividadePopup";
80
-
81
- export default {
82
- components: { InteratividadePopup },
83
- data() {
84
- return {
85
- listaEstaAberta: false,
86
- };
87
- },
88
- props: {
89
- interatividade: {
90
- type: Object,
91
- required: true,
92
- },
93
- },
94
- computed: {
95
- tipoBotoes() {
96
- return this.interatividade.tipo;
97
- },
98
- arrBotoes() {
99
- const { botoes } = this.interatividade;
100
- return botoes ? botoes : [];
101
- },
102
- objItens() {
103
- const { itens } = this.interatividade;
104
- return itens ? itens : {};
105
- },
106
- listaExpandida() {
107
- try {
108
- const { list } = this.objItens;
109
- const { sections } = list;
110
- return sections ? sections : [];
111
- } catch (e) {
112
- console.error("Erro ao definir a lista a ser expandida");
113
- console.error(e);
114
- return [];
115
- }
116
- },
117
- },
118
- methods: {
119
- expandirLista() {
120
- this.listaEstaAberta = !this.listaEstaAberta;
121
- },
122
- },
123
- };
124
- </script>
125
-
126
- <style>
127
- .interatividade-btn {
128
- width: 100%;
129
- display: flex;
130
- justify-content: center;
131
- align-items: center;
132
- background-color: #fff;
133
- color: #111b21;
134
- padding: 10px 12px;
135
- border-radius: 5px;
136
- margin-bottom: 10px;
137
- }
138
-
139
- .interatividade-link {
140
- color: #0c5c8f !important;
141
- text-decoration: none;
142
- display: flex;
143
- align-items: center;
144
- justify-content: center;
145
- width: 100%;
146
- gap: 5px;
147
- }
148
-
149
- .interatividade-btn:nth-child(1) {
150
- margin-top: 10px;
151
- }
152
-
153
- .interatividade-titulo {
154
- white-space: nowrap;
155
- text-overflow: ellipsis;
156
- overflow: hidden;
157
- max-width: 100%;
158
- margin: 0;
159
- padding: 0;
160
- }
161
-
162
- .interatividade-lista {
163
- width: 100%;
164
- min-width: 200px;
165
- border-radius: 15px;
166
- background-color: #fff;
167
- color: #333;
168
- margin: 10px 0;
169
- }
170
-
171
- .interatividade-lista-conteudo {
172
- padding: 10px;
173
- border-bottom: 1px solid #d7d7d7;
174
- }
175
-
176
- .interatividade-lista-titulo {
177
- font-weight: bold;
178
- font-size: 19.2px;
179
- margin-bottom: 10px;
180
- }
181
-
182
- .interatividade-lista-rodape {
183
- color: #818181;
184
- margin-top: 5px;
185
- }
186
-
187
- .interatividade-lista-link {
188
- width: 100%;
189
- text-align: center;
190
- padding: 10px;
191
- color: rgb(0, 110, 255);
192
- cursor: pointer;
193
- transition: color 200ms ease-in-out;
194
- }
195
-
196
- .interatividade-lista-link:hover {
197
- color: rgb(0, 98, 143);
198
- }
199
- </style>
1
+ <template>
2
+ <div class="interatividade">
3
+ <div v-if="
4
+ interatividade &&
5
+ interatividade.parameters &&
6
+ interatividade.parameters.button &&
7
+ interatividade.parameters.button.length
8
+ ">
9
+ <div v-for="(button, index) in interatividade.parameters.button" :key="index" class="interatividade-btn">
10
+ <p v-if="!button.url" v-html="button.text" class="interatividade-titulo"></p>
11
+ <a v-else :href="button.url" target="_blank" rel="noreferrer noopener" class="interatividade-link">
12
+ <p v-html="button.text" class="interatividade-titulo"></p>
13
+ <fa-icon :icon="['fas', 'external-link-square-alt']" />
14
+ </a>
15
+ </div>
16
+ </div>
17
+
18
+ <!-- Tudo aqui abaixo TEORICAMENTE e antigo e nao devera mais cair nas situacoes -->
19
+ <div v-if="
20
+ interatividade &&
21
+ interatividade.parameters &&
22
+ interatividade.parameters.button &&
23
+ (interatividade.parameters.button.type === 'dynamicURL' ||
24
+ interatividade.parameters.button.type === 'staticURL')
25
+ " class="interatividade-btn">
26
+ <a :href="interatividade.parameters.button.text" target="_blank" rel="noreferrer noopener"
27
+ class="interatividade-link">
28
+ Acessar <fa-icon :icon="['fas', 'external-link-square-alt']" />
29
+ </a>
30
+ </div>
31
+ <div v-if="
32
+ interatividade &&
33
+ interatividade.parameters &&
34
+ interatividade.parameters.button &&
35
+ interatividade.parameters.button.type === 'phoneNumber'
36
+ " class="interatividade-btn">
37
+ <p class="interatividade-titulo"
38
+ :title="`${interatividade.parameters.button.text} (${interatividade.parameters.button.phoneNumber})`" v-text="`${interatividade.parameters.button.text} (${interatividade.parameters.button.phoneNumber})`
39
+ "></p>
40
+ </div>
41
+ <div v-if="
42
+ interatividade &&
43
+ interatividade.parameters &&
44
+ interatividade.parameters.button &&
45
+ interatividade.parameters.button.type === 'quickReply'
46
+ " class="interatividade-btn">
47
+ <p class="interatividade-titulo" :title="`${interatividade.parameters.button.text}`"
48
+ v-text="`${interatividade.parameters.button.text}`"></p>
49
+ </div>
50
+ <transition name="show-x">
51
+ <InteratividadePopup v-if="listaEstaAberta" :lista="listaExpandida" :titulo="objItens.list.title"
52
+ @close="listaEstaAberta = false" />
53
+ </transition>
54
+ <template v-if="arrBotoes.length">
55
+ <div v-for="(btn, index) in arrBotoes" :key="index" :title="btn.titulo" class="interatividade-btn">
56
+ <p v-html="btn.titulo" class="interatividade-titulo"></p>
57
+ </div>
58
+ </template>
59
+ <template v-else-if="Object.keys(objItens).length">
60
+ <div class="interatividade-lista" :class="tipoBotoes == 'listItem' ? 'bg-none' : ''">
61
+ <div class="interatividade-lista-conteudo"
62
+ :class="tipoBotoes == 'listItem' ? 'border-bottom-none padding-none' : ''">
63
+ <p v-if="objItens.header && objItens.header.text" v-html="objItens.header.text"
64
+ class="interatividade-lista-titulo"></p>
65
+ <p v-if="objItens.body && objItens.body.text" v-html="objItens.body.text" class="interatividade-lista-corpo">
66
+ </p>
67
+ <p v-if="objItens.footer && objItens.footer.text" v-html="objItens.footer.text"
68
+ class="interatividade-lista-rodape"></p>
69
+ </div>
70
+ <p v-if="objItens.list && objItens.list.title" v-html="objItens.list.title" @click="expandirLista"
71
+ :class="tipoBotoes == 'listItem' ? 'bg-white border-radius-5 mt-5' : ''" class="interatividade-lista-link">
72
+ </p>
73
+ </div>
74
+ </template>
75
+ </div>
76
+ </template>
77
+
78
+ <script>
79
+ import InteratividadePopup from "./InteratividadePopup";
80
+
81
+ export default {
82
+ components: { InteratividadePopup },
83
+ data() {
84
+ return {
85
+ listaEstaAberta: false,
86
+ };
87
+ },
88
+ props: {
89
+ interatividade: {
90
+ type: Object,
91
+ required: true,
92
+ },
93
+ },
94
+ computed: {
95
+ tipoBotoes() {
96
+ return this.interatividade.tipo;
97
+ },
98
+ arrBotoes() {
99
+ const { botoes } = this.interatividade;
100
+ return botoes ? botoes : [];
101
+ },
102
+ objItens() {
103
+ const { itens } = this.interatividade;
104
+ return itens ? itens : {};
105
+ },
106
+ listaExpandida() {
107
+ try {
108
+ const { list } = this.objItens;
109
+ const { sections } = list;
110
+ return sections ? sections : [];
111
+ } catch (e) {
112
+ console.error("Erro ao definir a lista a ser expandida");
113
+ console.error(e);
114
+ return [];
115
+ }
116
+ },
117
+ },
118
+ methods: {
119
+ expandirLista() {
120
+ this.listaEstaAberta = !this.listaEstaAberta;
121
+ },
122
+ },
123
+ };
124
+ </script>
125
+
126
+ <style>
127
+ .interatividade-btn {
128
+ width: 100%;
129
+ display: flex;
130
+ justify-content: center;
131
+ align-items: center;
132
+ background-color: #fff;
133
+ color: #111b21;
134
+ padding: 10px 12px;
135
+ border-radius: 5px;
136
+ margin-bottom: 10px;
137
+ }
138
+
139
+ .interatividade-link {
140
+ color: #0c5c8f !important;
141
+ text-decoration: none;
142
+ display: flex;
143
+ align-items: center;
144
+ justify-content: center;
145
+ width: 100%;
146
+ gap: 5px;
147
+ }
148
+
149
+ .interatividade-btn:nth-child(1) {
150
+ margin-top: 10px;
151
+ }
152
+
153
+ .interatividade-titulo {
154
+ white-space: nowrap;
155
+ text-overflow: ellipsis;
156
+ overflow: hidden;
157
+ max-width: 100%;
158
+ margin: 0;
159
+ padding: 0;
160
+ }
161
+
162
+ .interatividade-lista {
163
+ width: 100%;
164
+ min-width: 200px;
165
+ border-radius: 15px;
166
+ background-color: #fff;
167
+ color: #333;
168
+ margin: 10px 0;
169
+ }
170
+
171
+ .interatividade-lista-conteudo {
172
+ padding: 10px;
173
+ border-bottom: 1px solid #d7d7d7;
174
+ }
175
+
176
+ .interatividade-lista-titulo {
177
+ font-weight: bold;
178
+ font-size: 19.2px;
179
+ margin-bottom: 10px;
180
+ }
181
+
182
+ .interatividade-lista-rodape {
183
+ color: #818181;
184
+ margin-top: 5px;
185
+ }
186
+
187
+ .interatividade-lista-link {
188
+ width: 100%;
189
+ text-align: center;
190
+ padding: 10px;
191
+ color: rgb(0, 110, 255);
192
+ cursor: pointer;
193
+ transition: color 200ms ease-in-out;
194
+ }
195
+
196
+ .interatividade-lista-link:hover {
197
+ color: rgb(0, 98, 143);
198
+ }
199
+ </style>
@@ -1,32 +1,32 @@
1
- <template>
2
- <div>
3
- <InteratividadeContatoItem v-for="(item, index) in interatividade" :key="index" :item="item"
4
- :dictionary="dictionary" :emitContactClick="emitContactClick" @contact-click="emitData" />
5
- </div>
6
- </template>
7
- <script>
8
- import InteratividadeContatoItem from "./InteratividadeContatoItem";
9
-
10
- export default {
11
- components: { InteratividadeContatoItem },
12
- props: {
13
- interatividade: {
14
- type: Array,
15
- required: true,
16
- },
17
- dictionary: {
18
- type: Object,
19
- required: true,
20
- },
21
- emitContactClick: {
22
- type: Boolean,
23
- default: false,
24
- }
25
- },
26
- methods: {
27
- emitData(props) {
28
- this.$emit("contact-click", props);
29
- }
30
- }
31
- };
32
- </script>
1
+ <template>
2
+ <div>
3
+ <InteratividadeContatoItem v-for="(item, index) in interatividade" :key="index" :item="item"
4
+ :dictionary="dictionary" :emitContactClick="emitContactClick" @contact-click="emitData" />
5
+ </div>
6
+ </template>
7
+ <script>
8
+ import InteratividadeContatoItem from "./InteratividadeContatoItem";
9
+
10
+ export default {
11
+ components: { InteratividadeContatoItem },
12
+ props: {
13
+ interatividade: {
14
+ type: Array,
15
+ required: true,
16
+ },
17
+ dictionary: {
18
+ type: Object,
19
+ required: true,
20
+ },
21
+ emitContactClick: {
22
+ type: Boolean,
23
+ default: false,
24
+ }
25
+ },
26
+ methods: {
27
+ emitData(props) {
28
+ this.$emit("contact-click", props);
29
+ }
30
+ }
31
+ };
32
+ </script>