vue-intergrall-plugins 1.1.11 → 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 +52 -48
  3. package/dist/vue-intergrall-plugins.min.js +1 -1
  4. package/dist/vue-intergrall-plugins.ssr.js +125 -121
  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 -687
  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,214 +1,214 @@
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
- if (!name) return '';
101
- const initials = name.first_name.charAt(0);
102
- if (name.last_name) {
103
- return initials + name.last_name.charAt(0);
104
- }
105
- return initials;
106
- },
107
- formatBirthday(birthday) {
108
- if (!birthday) return '';
109
- const values = birthday.split('-');
110
- const month = values[values.length - 2]
111
- const day = values[values.length - 1]
112
- const months = [
113
- 'janeiro', 'fevereiro', `mar${this.dictionary.c_dil}o`, 'abril', 'maio', 'junho',
114
- 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'
115
- ];
116
- return `${parseInt(day)} de ${months[parseInt(month) - 1]}`;
117
- },
118
- emitData(contact, type) {
119
- this.$emit('contact-click', {
120
- contact,
121
- type,
122
- data: JSON.parse(JSON.stringify(this.item))
123
- });
124
- },
125
- verifyHasInfos() {
126
- const keysToInclude = ['addresses', 'urls', 'birthday'];
127
- this.hasInfos = Object.keys(this.item).some(key => keysToInclude.includes(key));
128
- },
129
- getAdditionalInfo(item) {
130
- const keysToExclude = ['name', 'org', 'phones', 'emails', 'addresses', 'urls', 'birthday'];
131
- return Object.keys(item)
132
- .filter(key => !keysToExclude.includes(key))
133
- .reduce((obj, key) => {
134
- obj[key] = item[key];
135
- return obj;
136
- }, {});
137
- }
138
- },
139
- };
140
- </script>
141
-
142
- <style scoped>
143
- .contact-card {
144
- border: 1px solid rgba(0, 0, 0, 0.1);
145
- background-color: rgba(255, 255, 255, 0.9);
146
- border-radius: 5px;
147
- padding: 5px;
148
- margin-bottom: 10px;
149
- }
150
-
151
- .contact-header {
152
- margin-bottom: 16px;
153
- }
154
-
155
- .header-content {
156
- display: flex;
157
- align-items: center;
158
- gap: 5px;
159
- }
160
-
161
- .header-content h3 {
162
- margin: 0;
163
- }
164
-
165
- .contact-list {
166
- list-style: none;
167
- padding: 0;
168
- margin: 0;
169
- display: flex;
170
- flex-direction: column;
171
- gap: 5px;
172
- margin: 10px 0;
173
- }
174
-
175
- .contact-list li>button {
176
- background-color: transparent;
177
- border: none;
178
- cursor: pointer;
179
- font-size: 14px;
180
- color: var(--konecta-success);
181
- }
182
-
183
- .contact-list li>button:hover {
184
- color: var(--konecta-success-hover);
185
- }
186
-
187
- .badge {
188
- display: flex;
189
- justify-content: center;
190
- align-items: center;
191
- width: 30px;
192
- height: 30px;
193
- border-radius: 50%;
194
- background-color: var(--message-color);
195
- color: var(--text-color);
196
- text-align: center;
197
- line-height: 24px;
198
- font-size: 14px;
199
- font-weight: bold;
200
- }
201
-
202
- .contact-section {
203
- margin-bottom: 16px;
204
- }
205
-
206
- .contact-section h4 {
207
- margin: 0;
208
- font-size: 14px;
209
- font-weight: bold;
210
- display: flex;
211
- align-items: center;
212
- gap: 5px;
213
- }
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
+ if (!name) return '';
101
+ const initials = name.first_name.charAt(0);
102
+ if (name.last_name) {
103
+ return initials + name.last_name.charAt(0);
104
+ }
105
+ return initials;
106
+ },
107
+ formatBirthday(birthday) {
108
+ if (!birthday) return '';
109
+ const values = birthday.split('-');
110
+ const month = values[values.length - 2]
111
+ const day = values[values.length - 1]
112
+ const months = [
113
+ 'janeiro', 'fevereiro', `mar${this.dictionary.c_dil}o`, 'abril', 'maio', 'junho',
114
+ 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'
115
+ ];
116
+ return `${parseInt(day)} de ${months[parseInt(month) - 1]}`;
117
+ },
118
+ emitData(contact, type) {
119
+ this.$emit('contact-click', {
120
+ contact,
121
+ type,
122
+ data: JSON.parse(JSON.stringify(this.item))
123
+ });
124
+ },
125
+ verifyHasInfos() {
126
+ const keysToInclude = ['addresses', 'urls', 'birthday'];
127
+ this.hasInfos = Object.keys(this.item).some(key => keysToInclude.includes(key));
128
+ },
129
+ getAdditionalInfo(item) {
130
+ const keysToExclude = ['name', 'org', 'phones', 'emails', 'addresses', 'urls', 'birthday'];
131
+ return Object.keys(item)
132
+ .filter(key => !keysToExclude.includes(key))
133
+ .reduce((obj, key) => {
134
+ obj[key] = item[key];
135
+ return obj;
136
+ }, {});
137
+ }
138
+ },
139
+ };
140
+ </script>
141
+
142
+ <style scoped>
143
+ .contact-card {
144
+ border: 1px solid rgba(0, 0, 0, 0.1);
145
+ background-color: rgba(255, 255, 255, 0.9);
146
+ border-radius: 5px;
147
+ padding: 5px;
148
+ margin-bottom: 10px;
149
+ }
150
+
151
+ .contact-header {
152
+ margin-bottom: 16px;
153
+ }
154
+
155
+ .header-content {
156
+ display: flex;
157
+ align-items: center;
158
+ gap: 5px;
159
+ }
160
+
161
+ .header-content h3 {
162
+ margin: 0;
163
+ }
164
+
165
+ .contact-list {
166
+ list-style: none;
167
+ padding: 0;
168
+ margin: 0;
169
+ display: flex;
170
+ flex-direction: column;
171
+ gap: 5px;
172
+ margin: 10px 0;
173
+ }
174
+
175
+ .contact-list li>button {
176
+ background-color: transparent;
177
+ border: none;
178
+ cursor: pointer;
179
+ font-size: 14px;
180
+ color: var(--konecta-success);
181
+ }
182
+
183
+ .contact-list li>button:hover {
184
+ color: var(--konecta-success-hover);
185
+ }
186
+
187
+ .badge {
188
+ display: flex;
189
+ justify-content: center;
190
+ align-items: center;
191
+ width: 30px;
192
+ height: 30px;
193
+ border-radius: 50%;
194
+ background-color: var(--message-color);
195
+ color: var(--text-color);
196
+ text-align: center;
197
+ line-height: 24px;
198
+ font-size: 14px;
199
+ font-weight: bold;
200
+ }
201
+
202
+ .contact-section {
203
+ margin-bottom: 16px;
204
+ }
205
+
206
+ .contact-section h4 {
207
+ margin: 0;
208
+ font-size: 14px;
209
+ font-weight: bold;
210
+ display: flex;
211
+ align-items: center;
212
+ gap: 5px;
213
+ }
214
214
  </style>