vue-intergrall-plugins 1.1.90 → 1.2.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.
Files changed (45) 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 +193 -78
  4. package/dist/vue-intergrall-plugins.min.js +7 -7
  5. package/dist/vue-intergrall-plugins.ssr.js +245 -136
  6. package/package.json +61 -61
  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 +534 -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/InteratividadeBotoes.vue +197 -197
  37. package/src/lib-components/Messages/InteratividadeContato.vue +32 -32
  38. package/src/lib-components/Messages/InteratividadeContatoItem.vue +235 -235
  39. package/src/lib-components/Messages/InteratividadeFormulario.vue +334 -334
  40. package/src/lib-components/Messages/InteratividadePopup.vue +95 -95
  41. package/src/lib-components/Messages/LinkPreview.vue +176 -176
  42. package/src/lib-components/Scroll/ScrollContent.vue +166 -166
  43. package/src/lib-components/Templates/TemplateGenerator.vue +640 -640
  44. package/src/lib-components/Templates/TemplateMessage.vue +83 -83
  45. package/src/lib-components/Templates/TemplateSingle.vue +478 -478
@@ -1,291 +1,291 @@
1
- <template>
2
- <div class="multiple-file-preview">
3
- <fa-icon :icon="['fas', 'times-circle']" class="close-icon" @click="$emit('close')" />
4
- <transition-group name="fade">
5
- <Loader v-if="loading" key="mfp-loader" />
6
- <template v-else-if="fileFormatError">
7
- <span @click="deleteFile" :title="dictionary.msg_cancelar_anexo" class="text-footer-exclude-file"
8
- key="mfp-exlude-file">
9
- <fa-icon :icon="['fas', 'times-circle']" />
10
- </span>
11
- <div class="text-footer-invalid-format" v-if="fileFormatError" key="mfp-invalid-format">
12
- <h3 v-text="dictionary.titulo_msg_formato_invalido"></h3>
13
- <h4 v-html="validFileFormats" :title="validFileFormats"></h4>
14
- </div>
15
- </template>
16
- <template v-else>
17
- <div class="file-preview" v-for="(singleFile, index) in file" :key="index">
18
- <p class="file-title" :style="`max-width: ${isPdf(singleFile.type) ? '175px' : '75px'}`"
19
- :title="!singleFile.invalid ? singleFile.name : `${dictionary.titulo_msg_formato_invalido ? dictionary.titulo_msg_formato_invalido : 'Arquivo invalido'} - ${singleFile.name}`"
20
- :class="{ 'red': singleFile.invalid }">
21
- <fa-icon :icon="icon(singleFile.imgOrDoc)" />
22
- {{ !singleFile.invalid ? singleFile.name : `${dictionary.titulo_msg_formato_invalido ?
23
- dictionary.titulo_msg_formato_invalido : "Arquivo invalido"} - ${singleFile.name}` }}
24
- </p>
25
- <div class="small-img">
26
- <span class="img-container" v-if="singleFile.imgOrDoc === 'img' && !isPdf(singleFile.type)">
27
- <img :title="dictionary.titulo_visualizar_img" :src="singleFile.src" :alt="dictionary.alt_previa_img"
28
- @click="openImage(singleFile.src)" />
29
- </span>
30
- <span class="pdf" v-else-if="isPdf(singleFile.type)">
31
- <fa-icon :icon="['fas', 'file-pdf']" />
32
- </span>
33
- <span class="doc" v-else>
34
- <fa-icon :icon="['fas', 'file-alt']" />
35
- </span>
36
- </div>
37
- <span @click="deleteSpecificFile(singleFile.name, index)" v-tippy="{ placement: 'left' }"
38
- :content="dictionary.msg_excluir_anexo" :title="dictionary.msg_excluir_anexo" class="delete-file">
39
- <fa-icon :icon="['fas', 'trash-alt']" />
40
- </span>
41
- </div>
42
- </template>
43
- </transition-group>
44
- </div>
45
- </template>
46
-
47
- <script>
48
- import Loader from "../Loader/Loader"
49
-
50
- export default {
51
- components: { Loader },
52
- data() {
53
- return {
54
- loading: true,
55
- loadingTimeout: 0,
56
- ignoreNextUpdate: false
57
- }
58
- },
59
- mounted() {
60
- setTimeout(() => { this.loading = false; }, 500);
61
- },
62
- watch: {
63
- file() {
64
- if (!this.ignoreNextUpdate) {
65
- if (this.loadingTimeout) clearTimeout(this.loadingTimeout);
66
- this.loading = true;
67
- this.loadingTimeout = setTimeout(() => { this.loading = false; }, 500);
68
- this.ignoreNextUpdate = true
69
- }
70
- this.ignoreNextUpdate = false;
71
- }
72
- },
73
- props: {
74
- dictionary: { type: Object, required: true },
75
- file: { type: Array, required: true },
76
- fileFormatError: { type: Boolean, required: false },
77
- validFileFormats: { type: String, required: false, default: "" }
78
- },
79
- methods: {
80
- deleteFile() {
81
- this.$emit("delete-file");
82
- },
83
- deleteSpecificFile(fileName, index) {
84
- this.ignoreNextUpdate = true;
85
- this.$emit("delete-specific-file", { fileName, index });
86
- },
87
- openImage(image) {
88
- this.$emit("open-image", image);
89
- },
90
- icon(imgOrDoc) {
91
- if (!imgOrDoc) return ['fas', 'times-circle'];
92
- return imgOrDoc == 'doc' ? ['fas', 'file-alt'] : ['fas', 'image'];
93
- },
94
- isPdf(type) {
95
- return type === "application/pdf" ? true : false
96
- }
97
- }
98
- }
99
- </script>
100
-
101
- <style>
102
- .multiple-file-preview {
103
- position: relative;
104
- display: flex;
105
- flex-direction: column;
106
- width: 100%;
107
- height: 100%;
108
- max-height: 100%;
109
- overflow-y: auto;
110
- overflow-x: hidden;
111
- border-top-left-radius: 2.5px;
112
- border-top-right-radius: 2.5px;
113
- transition: background-color 150ms;
114
- scrollbar-color: #888 rgba(0, 0, 0, 0.2);
115
- scrollbar-width: 4px;
116
- }
117
-
118
- .multiple-file-preview::-webkit-scrollbar {
119
- width: 4px;
120
- }
121
-
122
- .multiple-file-preview .close-icon {
123
- color: #E74C3C;
124
- cursor: pointer;
125
- opacity: .9;
126
- transition: opacity 300ms;
127
- }
128
-
129
- .multiple-file-preview .close-icon:hover {
130
- opacity: 1;
131
- }
132
-
133
- .multiple-file-preview::-webkit-scrollbar-track {
134
- background-color: rgba(0, 0, 0, 0.2);
135
- }
136
-
137
- .multiple-file-preview::-webkit-scrollbar-thumb {
138
- transition-duration: .5s;
139
- background-color: #222
140
- }
141
-
142
- .multiple-file-preview::-webkit-scrollbar-thumb:hover {
143
- background-color: #555
144
- }
145
-
146
- .text-footer-invalid-format {
147
- color: #222;
148
- padding: 10px;
149
- }
150
-
151
- .text-footer-invalid-format h3 {
152
- text-overflow: ellipsis;
153
- overflow: hidden;
154
- font-weight: 500;
155
- }
156
-
157
- .text-footer-invalid-format h4 {
158
- text-overflow: ellipsis;
159
- overflow: hidden;
160
- font-size: 14.4px;
161
- }
162
-
163
- .text-footer-exclude-file {
164
- position: absolute;
165
- top: 5px;
166
- right: 5px;
167
- cursor: pointer;
168
- display: flex;
169
- justify-content: center;
170
- align-items: center;
171
- min-width: 16px;
172
- min-height: 16px;
173
- background-color: #FFF;
174
- border-radius: 50%;
175
- }
176
-
177
- .text-footer-exclude-file svg {
178
- transition: color 200ms;
179
- color: #e9594a;
180
- }
181
-
182
- .text-footer-exclude-file svg:hover {
183
- color: #E74C3C;
184
- }
185
-
186
- .file-preview {
187
- display: flex;
188
- width: calc(100% - 20px);
189
- align-items: center;
190
- padding: 5px 10px;
191
- transition: background-color 150ms;
192
- }
193
-
194
- .file-preview:hover {
195
- background-color: rgba(0, 0, 0, .1)
196
- }
197
-
198
- .file-title {
199
- color: #222;
200
- display: flex;
201
- align-items: center;
202
- white-space: nowrap;
203
- text-overflow: ellipsis;
204
- overflow: hidden;
205
- padding: 4px 10px;
206
- background-color: #FFF;
207
- border-radius: 30px;
208
- display: inline-block;
209
- max-width: 75px;
210
- }
211
-
212
- .file-title.red {
213
- color: #E74C3C;
214
- margin-right: 5px;
215
- }
216
-
217
- .file-title>svg {
218
- margin-right: 5px;
219
- color: #333;
220
- }
221
-
222
- .small-img {
223
- flex: 1;
224
- margin: 0 15px;
225
- display: flex;
226
- justify-content: center;
227
- align-items: center;
228
- position: relative;
229
- }
230
-
231
- .small-img img {
232
- width: 100%;
233
- height: 100%;
234
- max-height: 40px;
235
- max-width: 100px;
236
- cursor: pointer;
237
- }
238
-
239
- .small-img .pdf,
240
- .small-img .doc {
241
- display: flex;
242
- justify-content: center;
243
- align-items: center;
244
- font-size: 30px;
245
- }
246
-
247
- .small-img .pdf {
248
- color: #E74C3C;
249
- }
250
-
251
- .small-img .doc {
252
- color: #006bc9;
253
- }
254
-
255
- .small-img .pdf svg,
256
- .small-img .doc svg {
257
- z-index: 1;
258
- }
259
-
260
- .small-img .pdf::after,
261
- .small-img .doc::after {
262
- content: "";
263
- position: absolute;
264
- bottom: 2px;
265
- transform: translateY(2px);
266
- width: 20px;
267
- height: 20px;
268
- background-color: #FFF;
269
- }
270
-
271
- .img-container {
272
- padding: 5px;
273
- border-radius: 2.5px;
274
- background-color: rgba(0, 0, 0, .15);
275
- display: flex;
276
- justify-content: center;
277
- align-items: center;
278
- }
279
-
280
- .delete-file {
281
- display: flex;
282
- justify-content: center;
283
- align-items: center;
284
- cursor: pointer;
285
- }
286
-
287
- .delete-file>svg {
288
- font-size: 16px;
289
- color: #E74C3C;
290
- }
291
- </style>
1
+ <template>
2
+ <div class="multiple-file-preview">
3
+ <fa-icon :icon="['fas', 'times-circle']" class="close-icon" @click="$emit('close')" />
4
+ <transition-group name="fade">
5
+ <Loader v-if="loading" key="mfp-loader" />
6
+ <template v-else-if="fileFormatError">
7
+ <span @click="deleteFile" :title="dictionary.msg_cancelar_anexo" class="text-footer-exclude-file"
8
+ key="mfp-exlude-file">
9
+ <fa-icon :icon="['fas', 'times-circle']" />
10
+ </span>
11
+ <div class="text-footer-invalid-format" v-if="fileFormatError" key="mfp-invalid-format">
12
+ <h3 v-text="dictionary.titulo_msg_formato_invalido"></h3>
13
+ <h4 v-html="validFileFormats" :title="validFileFormats"></h4>
14
+ </div>
15
+ </template>
16
+ <template v-else>
17
+ <div class="file-preview" v-for="(singleFile, index) in file" :key="index">
18
+ <p class="file-title" :style="`max-width: ${isPdf(singleFile.type) ? '175px' : '75px'}`"
19
+ :title="!singleFile.invalid ? singleFile.name : `${dictionary.titulo_msg_formato_invalido ? dictionary.titulo_msg_formato_invalido : 'Arquivo invalido'} - ${singleFile.name}`"
20
+ :class="{ 'red': singleFile.invalid }">
21
+ <fa-icon :icon="icon(singleFile.imgOrDoc)" />
22
+ {{ !singleFile.invalid ? singleFile.name : `${dictionary.titulo_msg_formato_invalido ?
23
+ dictionary.titulo_msg_formato_invalido : "Arquivo invalido"} - ${singleFile.name}` }}
24
+ </p>
25
+ <div class="small-img">
26
+ <span class="img-container" v-if="singleFile.imgOrDoc === 'img' && !isPdf(singleFile.type)">
27
+ <img :title="dictionary.titulo_visualizar_img" :src="singleFile.src" :alt="dictionary.alt_previa_img"
28
+ @click="openImage(singleFile.src)" />
29
+ </span>
30
+ <span class="pdf" v-else-if="isPdf(singleFile.type)">
31
+ <fa-icon :icon="['fas', 'file-pdf']" />
32
+ </span>
33
+ <span class="doc" v-else>
34
+ <fa-icon :icon="['fas', 'file-alt']" />
35
+ </span>
36
+ </div>
37
+ <span @click="deleteSpecificFile(singleFile.name, index)" v-tippy="{ placement: 'left' }"
38
+ :content="dictionary.msg_excluir_anexo" :title="dictionary.msg_excluir_anexo" class="delete-file">
39
+ <fa-icon :icon="['fas', 'trash-alt']" />
40
+ </span>
41
+ </div>
42
+ </template>
43
+ </transition-group>
44
+ </div>
45
+ </template>
46
+
47
+ <script>
48
+ import Loader from "../Loader/Loader"
49
+
50
+ export default {
51
+ components: { Loader },
52
+ data() {
53
+ return {
54
+ loading: true,
55
+ loadingTimeout: 0,
56
+ ignoreNextUpdate: false
57
+ }
58
+ },
59
+ mounted() {
60
+ setTimeout(() => { this.loading = false; }, 500);
61
+ },
62
+ watch: {
63
+ file() {
64
+ if (!this.ignoreNextUpdate) {
65
+ if (this.loadingTimeout) clearTimeout(this.loadingTimeout);
66
+ this.loading = true;
67
+ this.loadingTimeout = setTimeout(() => { this.loading = false; }, 500);
68
+ this.ignoreNextUpdate = true
69
+ }
70
+ this.ignoreNextUpdate = false;
71
+ }
72
+ },
73
+ props: {
74
+ dictionary: { type: Object, required: true },
75
+ file: { type: Array, required: true },
76
+ fileFormatError: { type: Boolean, required: false },
77
+ validFileFormats: { type: String, required: false, default: "" }
78
+ },
79
+ methods: {
80
+ deleteFile() {
81
+ this.$emit("delete-file");
82
+ },
83
+ deleteSpecificFile(fileName, index) {
84
+ this.ignoreNextUpdate = true;
85
+ this.$emit("delete-specific-file", { fileName, index });
86
+ },
87
+ openImage(image) {
88
+ this.$emit("open-image", image);
89
+ },
90
+ icon(imgOrDoc) {
91
+ if (!imgOrDoc) return ['fas', 'times-circle'];
92
+ return imgOrDoc == 'doc' ? ['fas', 'file-alt'] : ['fas', 'image'];
93
+ },
94
+ isPdf(type) {
95
+ return type === "application/pdf" ? true : false
96
+ }
97
+ }
98
+ }
99
+ </script>
100
+
101
+ <style>
102
+ .multiple-file-preview {
103
+ position: relative;
104
+ display: flex;
105
+ flex-direction: column;
106
+ width: 100%;
107
+ height: 100%;
108
+ max-height: 100%;
109
+ overflow-y: auto;
110
+ overflow-x: hidden;
111
+ border-top-left-radius: 2.5px;
112
+ border-top-right-radius: 2.5px;
113
+ transition: background-color 150ms;
114
+ scrollbar-color: #888 rgba(0, 0, 0, 0.2);
115
+ scrollbar-width: 4px;
116
+ }
117
+
118
+ .multiple-file-preview::-webkit-scrollbar {
119
+ width: 4px;
120
+ }
121
+
122
+ .multiple-file-preview .close-icon {
123
+ color: #E74C3C;
124
+ cursor: pointer;
125
+ opacity: .9;
126
+ transition: opacity 300ms;
127
+ }
128
+
129
+ .multiple-file-preview .close-icon:hover {
130
+ opacity: 1;
131
+ }
132
+
133
+ .multiple-file-preview::-webkit-scrollbar-track {
134
+ background-color: rgba(0, 0, 0, 0.2);
135
+ }
136
+
137
+ .multiple-file-preview::-webkit-scrollbar-thumb {
138
+ transition-duration: .5s;
139
+ background-color: #222
140
+ }
141
+
142
+ .multiple-file-preview::-webkit-scrollbar-thumb:hover {
143
+ background-color: #555
144
+ }
145
+
146
+ .text-footer-invalid-format {
147
+ color: #222;
148
+ padding: 10px;
149
+ }
150
+
151
+ .text-footer-invalid-format h3 {
152
+ text-overflow: ellipsis;
153
+ overflow: hidden;
154
+ font-weight: 500;
155
+ }
156
+
157
+ .text-footer-invalid-format h4 {
158
+ text-overflow: ellipsis;
159
+ overflow: hidden;
160
+ font-size: 14.4px;
161
+ }
162
+
163
+ .text-footer-exclude-file {
164
+ position: absolute;
165
+ top: 5px;
166
+ right: 5px;
167
+ cursor: pointer;
168
+ display: flex;
169
+ justify-content: center;
170
+ align-items: center;
171
+ min-width: 16px;
172
+ min-height: 16px;
173
+ background-color: #FFF;
174
+ border-radius: 50%;
175
+ }
176
+
177
+ .text-footer-exclude-file svg {
178
+ transition: color 200ms;
179
+ color: #e9594a;
180
+ }
181
+
182
+ .text-footer-exclude-file svg:hover {
183
+ color: #E74C3C;
184
+ }
185
+
186
+ .file-preview {
187
+ display: flex;
188
+ width: calc(100% - 20px);
189
+ align-items: center;
190
+ padding: 5px 10px;
191
+ transition: background-color 150ms;
192
+ }
193
+
194
+ .file-preview:hover {
195
+ background-color: rgba(0, 0, 0, .1)
196
+ }
197
+
198
+ .file-title {
199
+ color: #222;
200
+ display: flex;
201
+ align-items: center;
202
+ white-space: nowrap;
203
+ text-overflow: ellipsis;
204
+ overflow: hidden;
205
+ padding: 4px 10px;
206
+ background-color: #FFF;
207
+ border-radius: 30px;
208
+ display: inline-block;
209
+ max-width: 75px;
210
+ }
211
+
212
+ .file-title.red {
213
+ color: #E74C3C;
214
+ margin-right: 5px;
215
+ }
216
+
217
+ .file-title>svg {
218
+ margin-right: 5px;
219
+ color: #333;
220
+ }
221
+
222
+ .small-img {
223
+ flex: 1;
224
+ margin: 0 15px;
225
+ display: flex;
226
+ justify-content: center;
227
+ align-items: center;
228
+ position: relative;
229
+ }
230
+
231
+ .small-img img {
232
+ width: 100%;
233
+ height: 100%;
234
+ max-height: 40px;
235
+ max-width: 100px;
236
+ cursor: pointer;
237
+ }
238
+
239
+ .small-img .pdf,
240
+ .small-img .doc {
241
+ display: flex;
242
+ justify-content: center;
243
+ align-items: center;
244
+ font-size: 30px;
245
+ }
246
+
247
+ .small-img .pdf {
248
+ color: #E74C3C;
249
+ }
250
+
251
+ .small-img .doc {
252
+ color: #006bc9;
253
+ }
254
+
255
+ .small-img .pdf svg,
256
+ .small-img .doc svg {
257
+ z-index: 1;
258
+ }
259
+
260
+ .small-img .pdf::after,
261
+ .small-img .doc::after {
262
+ content: "";
263
+ position: absolute;
264
+ bottom: 2px;
265
+ transform: translateY(2px);
266
+ width: 20px;
267
+ height: 20px;
268
+ background-color: #FFF;
269
+ }
270
+
271
+ .img-container {
272
+ padding: 5px;
273
+ border-radius: 2.5px;
274
+ background-color: rgba(0, 0, 0, .15);
275
+ display: flex;
276
+ justify-content: center;
277
+ align-items: center;
278
+ }
279
+
280
+ .delete-file {
281
+ display: flex;
282
+ justify-content: center;
283
+ align-items: center;
284
+ cursor: pointer;
285
+ }
286
+
287
+ .delete-file>svg {
288
+ font-size: 16px;
289
+ color: #E74C3C;
290
+ }
291
+ </style>