vue-intergrall-plugins 1.1.90 → 1.2.18

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 (46) hide show
  1. package/README.md +220 -220
  2. package/dist/dist/vue-intergrall-plugins.css +1 -1
  3. package/dist/vue-intergrall-plugins.esm.js +223 -89
  4. package/dist/vue-intergrall-plugins.min.js +11 -11
  5. package/dist/vue-intergrall-plugins.ssr.js +276 -147
  6. package/package.json +1 -1
  7. package/src/lib-components/Buttons/IconButton.vue +27 -27
  8. package/src/lib-components/Buttons/SimpleButton.vue +140 -140
  9. package/src/lib-components/Cards/Card.vue +490 -490
  10. package/src/lib-components/Cards/CardCheck.vue +35 -35
  11. package/src/lib-components/Cards/CardFile.vue +163 -163
  12. package/src/lib-components/Chat/BtnDownloadAllFiles.vue +36 -36
  13. package/src/lib-components/Chat/BtnEmojis.vue +118 -118
  14. package/src/lib-components/Chat/BtnExpand.vue +17 -17
  15. package/src/lib-components/Chat/BtnFiles.vue +486 -486
  16. package/src/lib-components/Chat/BtnMic.vue +60 -60
  17. package/src/lib-components/Chat/BtnScreenShare.vue +31 -31
  18. package/src/lib-components/Chat/BtnStandardMessages.vue +17 -17
  19. package/src/lib-components/Chat/ExpandTextarea.vue +427 -427
  20. package/src/lib-components/Chat/MultipleFilePreview.vue +291 -291
  21. package/src/lib-components/Chat/Picker.vue +525 -525
  22. package/src/lib-components/Chat/RemainingCharacters.vue +28 -28
  23. package/src/lib-components/Chat/SingleFilePreview.vue +94 -94
  24. package/src/lib-components/Chat/SkeletonPicker.vue +110 -110
  25. package/src/lib-components/Chat/StandardMessages.vue +252 -252
  26. package/src/lib-components/Chat/TextFooter.vue +1007 -1007
  27. package/src/lib-components/Email/EmailExpanded.vue +270 -270
  28. package/src/lib-components/Email/EmailFile.vue +192 -192
  29. package/src/lib-components/Email/EmailFrom.vue +66 -66
  30. package/src/lib-components/Email/EmailItem.vue +867 -850
  31. package/src/lib-components/Email/EmailTo.vue +64 -64
  32. package/src/lib-components/Loader/Loader.vue +78 -78
  33. package/src/lib-components/Messages/AnexoMensagem.vue +625 -497
  34. package/src/lib-components/Messages/CardAttachment.vue +61 -61
  35. package/src/lib-components/Messages/CardMessages.vue +687 -687
  36. package/src/lib-components/Messages/ChatMessages.vue +259 -78
  37. package/src/lib-components/Messages/InteratividadeBotoes.vue +197 -197
  38. package/src/lib-components/Messages/InteratividadeContato.vue +32 -32
  39. package/src/lib-components/Messages/InteratividadeContatoItem.vue +235 -235
  40. package/src/lib-components/Messages/InteratividadeFormulario.vue +334 -334
  41. package/src/lib-components/Messages/InteratividadePopup.vue +95 -95
  42. package/src/lib-components/Messages/LinkPreview.vue +176 -176
  43. package/src/lib-components/Scroll/ScrollContent.vue +166 -166
  44. package/src/lib-components/Templates/TemplateGenerator.vue +640 -640
  45. package/src/lib-components/Templates/TemplateMessage.vue +83 -83
  46. package/src/lib-components/Templates/TemplateSingle.vue +478 -478
@@ -1,236 +1,236 @@
1
- <template>
2
- <div class="contact-card" ref="contactCard">
3
- <div class="contact-header">
4
- <div class="header-content">
5
- <span class="badge">{{ getInitials(item.name) }}</span>
6
- <h3>{{ item.name.formatted_name }}</h3>
7
- </div>
8
- <ul v-if="item.org" class="contact-list">
9
- <li v-if="item.org.company">{{ item.org.company }}</li>
10
- <li v-if="item.org.title">{{ item.org.title }}</li>
11
- </ul>
12
- </div>
13
- <div class="contact-content">
14
- <div class="contact-section">
15
- <h4>
16
- <fa-icon :icon="['fas', 'phone-alt']" />
17
- Telefones
18
- </h4>
19
- <ul class="contact-list">
20
- <li v-for="phone in item.phones" :key="phone.phone">
21
- {{ dictionary[`${phone.type}_phone`] || phone.type }}: {{ phone.phone }}
22
- <button v-if="emitContactClick" @click="emitData(phone.phone, 'phone')" title="Adicionar contato">
23
- <fa-icon :icon="['fas', 'user-plus']" />
24
- </button>
25
- </li>
26
- </ul>
27
- </div>
28
- <div class="contact-section" v-if="item.emails && item.emails.length">
29
- <h4><fa-icon :icon="['fas', 'envelope']" />Emails</h4>
30
- <ul class="contact-list">
31
- <li v-for="email in item.emails" :key="email.email">
32
- {{ dictionary[`${email.type}_email`] || email.type }}: {{ email.email }}
33
- <button v-if="emitContactClick" @click="emitData(email.email, 'email')" title="Adicionar contato">
34
- <fa-icon :icon="['fas', 'user-plus']" />
35
- </button>
36
- </li>
37
- </ul>
38
- </div>
39
- <div class="contact-section" v-if="hasInfos">
40
- <h4>
41
- <fa-icon :icon="['fas', 'info']" /> {{ dictionary.titulo_informacoes }} adicionais
42
- </h4>
43
- <ul class="contact-list">
44
- <template v-if="item.addresses && item.addresses.length">
45
- <li v-for="address in item.addresses" :key="address.street">
46
- {{ dictionary[`${address.type}_address`] || address.type }}: {{ address.street }}, {{ address.city }} - {{
47
- address.state ? address.state.toUpperCase() : '(vazio)' }} - {{
48
- address.country }}, {{
49
- address.zip }}
50
- </li>
51
- </template>
52
- <template v-if="item.urls && item.urls.length">
53
- <li v-for="url in item.urls" :key="url.url">
54
- {{ dictionary[url.type] || url.type }}: <a
55
- :href="`${url.url.startsWith('https://') ? url.url : `https://${url.url}`}`" target="_blank">{{ url.url
56
- }}</a>
57
- </li>
58
- </template>
59
- <li v-if="item.birthday">{{ dictionary.birthday }}: {{ formatBirthday(item.birthday) }}</li>
60
- <template v-if="additionals && additionals.length">
61
- <li v-for="(value, key) in additionals" :key="key">
62
- {{ key }}: {{ value }}
63
- </li>
64
- </template>
65
- </ul>
66
- </div>
67
- </div>
68
- </div>
69
- </template>
70
-
71
- <script>
72
-
73
- export default {
74
- props: {
75
- item: {
76
- type: Object,
77
- required: true,
78
- },
79
- dictionary: {
80
- type: Object,
81
- required: true,
82
- },
83
- emitContactClick: {
84
- type: Boolean,
85
- default: false,
86
- }
87
- },
88
- data() {
89
- return {
90
- additionals: [],
91
- hasInfos: false,
92
- }
93
- },
94
- mounted() {
95
- this.additionals = this.getAdditionalInfo(JSON.parse(JSON.stringify(this.item)));
96
- this.verifyHasInfos()
97
- },
98
- methods: {
99
- getInitials(name) {
100
- try {
101
- if (!name) return ''
102
- let initials = ''
103
- if (name.first_name) {
104
- initials = name.first_name.charAt(0);
105
- }
106
- if (name.last_name) {
107
- return initials + name.last_name.charAt(0);
108
- }
109
- if(!initials && name.formatted_name) {
110
- const parts = name.formatted_name.split(' ');
111
- initials = parts.map(part => part.charAt(0)).join('');
112
- }
113
- return initials;
114
- } catch(err) {
115
- console.error('Error getting initials:', err);
116
- return '';
117
- }
118
- },
119
- formatBirthday(birthday) {
120
- try {
121
- if (!birthday) return '';
122
- const values = birthday.split('-');
123
- const month = values[values.length - 2]
124
- const day = values[values.length - 1]
125
- const months = [
126
- 'janeiro', 'fevereiro', `mar${this.dictionary.c_dil}o`, 'abril', 'maio', 'junho',
127
- 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'
128
- ];
129
- return `${parseInt(day)} de ${months[parseInt(month) - 1]}`;
130
- } catch(err) {
131
- console.error('Error formatting birthday:', err);
132
- return '';
133
- }
134
- },
135
- emitData(contact, type) {
136
- this.$emit('contact-click', {
137
- contact,
138
- type,
139
- data: JSON.parse(JSON.stringify(this.item))
140
- });
141
- },
142
- verifyHasInfos() {
143
- const keysToInclude = ['addresses', 'urls', 'birthday'];
144
- this.hasInfos = Object.keys(this.item).some(key => {
145
- if (keysToInclude.includes(key)) {
146
- return this.item[key] && this.item[key].length > 0;
147
- }
148
- return false;
149
- });
150
- },
151
- getAdditionalInfo(item) {
152
- const keysToExclude = ['name', 'org', 'phones', 'emails', 'addresses', 'urls', 'birthday'];
153
- return Object.keys(item)
154
- .filter(key => !keysToExclude.includes(key))
155
- .reduce((obj, key) => {
156
- obj[key] = item[key];
157
- return obj;
158
- }, {});
159
- }
160
- },
161
- };
162
- </script>
163
-
164
- <style scoped>
165
- .contact-card {
166
- border: 1px solid rgba(0, 0, 0, 0.1);
167
- background-color: rgba(255, 255, 255, 0.9);
168
- border-radius: 5px;
169
- padding: 5px;
170
- margin-bottom: 10px;
171
- }
172
-
173
- .contact-header {
174
- margin-bottom: 16px;
175
- }
176
-
177
- .header-content {
178
- display: flex;
179
- align-items: center;
180
- gap: 5px;
181
- }
182
-
183
- .header-content h3 {
184
- margin: 0;
185
- }
186
-
187
- .contact-list {
188
- list-style: none;
189
- padding: 0;
190
- margin: 0;
191
- display: flex;
192
- flex-direction: column;
193
- gap: 5px;
194
- margin: 10px 0;
195
- }
196
-
197
- .contact-list li>button {
198
- background-color: transparent;
199
- border: none;
200
- cursor: pointer;
201
- font-size: 14px;
202
- color: var(--konecta-success);
203
- }
204
-
205
- .contact-list li>button:hover {
206
- color: var(--konecta-success-hover);
207
- }
208
-
209
- .badge {
210
- display: flex;
211
- justify-content: center;
212
- align-items: center;
213
- width: 30px;
214
- height: 30px;
215
- border-radius: 50%;
216
- background-color: var(--message-color);
217
- color: var(--text-color);
218
- text-align: center;
219
- line-height: 24px;
220
- font-size: 14px;
221
- font-weight: bold;
222
- }
223
-
224
- .contact-section {
225
- margin-bottom: 16px;
226
- }
227
-
228
- .contact-section h4 {
229
- margin: 0;
230
- font-size: 14px;
231
- font-weight: bold;
232
- display: flex;
233
- align-items: center;
234
- gap: 5px;
235
- }
1
+ <template>
2
+ <div class="contact-card" ref="contactCard">
3
+ <div class="contact-header">
4
+ <div class="header-content">
5
+ <span class="badge">{{ getInitials(item.name) }}</span>
6
+ <h3>{{ item.name.formatted_name }}</h3>
7
+ </div>
8
+ <ul v-if="item.org" class="contact-list">
9
+ <li v-if="item.org.company">{{ item.org.company }}</li>
10
+ <li v-if="item.org.title">{{ item.org.title }}</li>
11
+ </ul>
12
+ </div>
13
+ <div class="contact-content">
14
+ <div class="contact-section">
15
+ <h4>
16
+ <fa-icon :icon="['fas', 'phone-alt']" />
17
+ Telefones
18
+ </h4>
19
+ <ul class="contact-list">
20
+ <li v-for="phone in item.phones" :key="phone.phone">
21
+ {{ dictionary[`${phone.type}_phone`] || phone.type }}: {{ phone.phone }}
22
+ <button v-if="emitContactClick" @click="emitData(phone.phone, 'phone')" title="Adicionar contato">
23
+ <fa-icon :icon="['fas', 'user-plus']" />
24
+ </button>
25
+ </li>
26
+ </ul>
27
+ </div>
28
+ <div class="contact-section" v-if="item.emails && item.emails.length">
29
+ <h4><fa-icon :icon="['fas', 'envelope']" />Emails</h4>
30
+ <ul class="contact-list">
31
+ <li v-for="email in item.emails" :key="email.email">
32
+ {{ dictionary[`${email.type}_email`] || email.type }}: {{ email.email }}
33
+ <button v-if="emitContactClick" @click="emitData(email.email, 'email')" title="Adicionar contato">
34
+ <fa-icon :icon="['fas', 'user-plus']" />
35
+ </button>
36
+ </li>
37
+ </ul>
38
+ </div>
39
+ <div class="contact-section" v-if="hasInfos">
40
+ <h4>
41
+ <fa-icon :icon="['fas', 'info']" /> {{ dictionary.titulo_informacoes }} adicionais
42
+ </h4>
43
+ <ul class="contact-list">
44
+ <template v-if="item.addresses && item.addresses.length">
45
+ <li v-for="address in item.addresses" :key="address.street">
46
+ {{ dictionary[`${address.type}_address`] || address.type }}: {{ address.street }}, {{ address.city }} - {{
47
+ address.state ? address.state.toUpperCase() : '(vazio)' }} - {{
48
+ address.country }}, {{
49
+ address.zip }}
50
+ </li>
51
+ </template>
52
+ <template v-if="item.urls && item.urls.length">
53
+ <li v-for="url in item.urls" :key="url.url">
54
+ {{ dictionary[url.type] || url.type }}: <a
55
+ :href="`${url.url.startsWith('https://') ? url.url : `https://${url.url}`}`" target="_blank">{{ url.url
56
+ }}</a>
57
+ </li>
58
+ </template>
59
+ <li v-if="item.birthday">{{ dictionary.birthday }}: {{ formatBirthday(item.birthday) }}</li>
60
+ <template v-if="additionals && additionals.length">
61
+ <li v-for="(value, key) in additionals" :key="key">
62
+ {{ key }}: {{ value }}
63
+ </li>
64
+ </template>
65
+ </ul>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </template>
70
+
71
+ <script>
72
+
73
+ export default {
74
+ props: {
75
+ item: {
76
+ type: Object,
77
+ required: true,
78
+ },
79
+ dictionary: {
80
+ type: Object,
81
+ required: true,
82
+ },
83
+ emitContactClick: {
84
+ type: Boolean,
85
+ default: false,
86
+ }
87
+ },
88
+ data() {
89
+ return {
90
+ additionals: [],
91
+ hasInfos: false,
92
+ }
93
+ },
94
+ mounted() {
95
+ this.additionals = this.getAdditionalInfo(JSON.parse(JSON.stringify(this.item)));
96
+ this.verifyHasInfos()
97
+ },
98
+ methods: {
99
+ getInitials(name) {
100
+ try {
101
+ if (!name) return ''
102
+ let initials = ''
103
+ if (name.first_name) {
104
+ initials = name.first_name.charAt(0);
105
+ }
106
+ if (name.last_name) {
107
+ return initials + name.last_name.charAt(0);
108
+ }
109
+ if(!initials && name.formatted_name) {
110
+ const parts = name.formatted_name.split(' ');
111
+ initials = parts.map(part => part.charAt(0)).join('');
112
+ }
113
+ return initials;
114
+ } catch(err) {
115
+ console.error('Error getting initials:', err);
116
+ return '';
117
+ }
118
+ },
119
+ formatBirthday(birthday) {
120
+ try {
121
+ if (!birthday) return '';
122
+ const values = birthday.split('-');
123
+ const month = values[values.length - 2]
124
+ const day = values[values.length - 1]
125
+ const months = [
126
+ 'janeiro', 'fevereiro', `mar${this.dictionary.c_dil}o`, 'abril', 'maio', 'junho',
127
+ 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'
128
+ ];
129
+ return `${parseInt(day)} de ${months[parseInt(month) - 1]}`;
130
+ } catch(err) {
131
+ console.error('Error formatting birthday:', err);
132
+ return '';
133
+ }
134
+ },
135
+ emitData(contact, type) {
136
+ this.$emit('contact-click', {
137
+ contact,
138
+ type,
139
+ data: JSON.parse(JSON.stringify(this.item))
140
+ });
141
+ },
142
+ verifyHasInfos() {
143
+ const keysToInclude = ['addresses', 'urls', 'birthday'];
144
+ this.hasInfos = Object.keys(this.item).some(key => {
145
+ if (keysToInclude.includes(key)) {
146
+ return this.item[key] && this.item[key].length > 0;
147
+ }
148
+ return false;
149
+ });
150
+ },
151
+ getAdditionalInfo(item) {
152
+ const keysToExclude = ['name', 'org', 'phones', 'emails', 'addresses', 'urls', 'birthday'];
153
+ return Object.keys(item)
154
+ .filter(key => !keysToExclude.includes(key))
155
+ .reduce((obj, key) => {
156
+ obj[key] = item[key];
157
+ return obj;
158
+ }, {});
159
+ }
160
+ },
161
+ };
162
+ </script>
163
+
164
+ <style scoped>
165
+ .contact-card {
166
+ border: 1px solid rgba(0, 0, 0, 0.1);
167
+ background-color: rgba(255, 255, 255, 0.9);
168
+ border-radius: 5px;
169
+ padding: 5px;
170
+ margin-bottom: 10px;
171
+ }
172
+
173
+ .contact-header {
174
+ margin-bottom: 16px;
175
+ }
176
+
177
+ .header-content {
178
+ display: flex;
179
+ align-items: center;
180
+ gap: 5px;
181
+ }
182
+
183
+ .header-content h3 {
184
+ margin: 0;
185
+ }
186
+
187
+ .contact-list {
188
+ list-style: none;
189
+ padding: 0;
190
+ margin: 0;
191
+ display: flex;
192
+ flex-direction: column;
193
+ gap: 5px;
194
+ margin: 10px 0;
195
+ }
196
+
197
+ .contact-list li>button {
198
+ background-color: transparent;
199
+ border: none;
200
+ cursor: pointer;
201
+ font-size: 14px;
202
+ color: var(--konecta-success);
203
+ }
204
+
205
+ .contact-list li>button:hover {
206
+ color: var(--konecta-success-hover);
207
+ }
208
+
209
+ .badge {
210
+ display: flex;
211
+ justify-content: center;
212
+ align-items: center;
213
+ width: 30px;
214
+ height: 30px;
215
+ border-radius: 50%;
216
+ background-color: var(--message-color);
217
+ color: var(--text-color);
218
+ text-align: center;
219
+ line-height: 24px;
220
+ font-size: 14px;
221
+ font-weight: bold;
222
+ }
223
+
224
+ .contact-section {
225
+ margin-bottom: 16px;
226
+ }
227
+
228
+ .contact-section h4 {
229
+ margin: 0;
230
+ font-size: 14px;
231
+ font-weight: bold;
232
+ display: flex;
233
+ align-items: center;
234
+ gap: 5px;
235
+ }
236
236
  </style>