vue-intergrall-plugins 0.0.209 → 0.0.212

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.
@@ -9,17 +9,14 @@
9
9
  </span>
10
10
  <div class="text-footer-invalid-format" v-if="fileFormatError" key="mfp-invalid-format">
11
11
  <h3 v-text="dictionary.titulo_msg_formato_invalido"></h3>
12
- <h4 v-html="validFileFormats"></h4>
12
+ <h4 v-html="validFileFormats" :title="validFileFormats"></h4>
13
13
  </div>
14
14
  </template>
15
15
  <template v-else>
16
16
  <div class="file-preview" v-for="(singleFile, index) in file" :key="index">
17
- <p class="file-title">
17
+ <p class="file-title" :title="!singleFile.invalid ? singleFile.name : `${dictionary.titulo_msg_formato_invalido ? dictionary.titulo_msg_formato_invalido : 'Arquivo invalido'} - ${singleFile.name}`" :class="{'red' : singleFile.invalid}">
18
18
  <fa-icon :icon="icon(singleFile.imgOrDoc)" />
19
- {{ singleFile.name }}
20
- </p>
21
- <p v-if="singleFile.invalid" class="file-title red">
22
- {{ dictionary.titulo_msg_formato_invalido ? dictionary.titulo_msg_formato_invalido : "Arquivo invalido" }}
19
+ {{ !singleFile.invalid ? singleFile.name : `${dictionary.titulo_msg_formato_invalido ? dictionary.titulo_msg_formato_invalido : "Arquivo invalido"} - ${singleFile.name}` }}
23
20
  </p>
24
21
  <div class="small-img">
25
22
  <span class="img-container" v-if="singleFile.imgOrDoc === 'img' && !isPdf(singleFile.type)">
@@ -33,8 +30,11 @@
33
30
  <span class="pdf" v-else-if="isPdf(singleFile.type)">
34
31
  <fa-icon :icon="['fas', 'file-pdf']" />
35
32
  </span>
33
+ <span class="doc" v-else>
34
+ <fa-icon :icon="['fas', 'file-alt']" />
35
+ </span>
36
36
  </div>
37
- <span @click="deleteSpecificFile(singleFile.name, index)" :title="dictionary.msg_excluir_anexo" class="delete-file">
37
+ <span @click="deleteSpecificFile(singleFile.name, index)" v-tippy="{placement: 'left'}" :content="dictionary.msg_excluir_anexo" :title="dictionary.msg_excluir_anexo" class="delete-file">
38
38
  <fa-icon :icon="['fas', 'trash-alt']" />
39
39
  </span>
40
40
  </div>
@@ -145,9 +145,13 @@ export default {
145
145
  padding: 10px;
146
146
  }
147
147
  .text-footer-invalid-format h3 {
148
+ text-overflow: ellipsis;
149
+ overflow: hidden;
148
150
  font-weight: 500;
149
151
  }
150
152
  .text-footer-invalid-format h4 {
153
+ text-overflow: ellipsis;
154
+ overflow: hidden;
151
155
  font-size: .9rem;
152
156
  }
153
157
 
@@ -197,10 +201,11 @@ export default {
197
201
  }
198
202
  .file-title.red {
199
203
  color: #E74C3C;
200
- margin-left:5px;
204
+ margin-right: 5px;
201
205
  }
202
206
  .file-title > svg {
203
- margin-right: 5px
207
+ margin-right: 5px;
208
+ color: #333;
204
209
  }
205
210
 
206
211
  .small-img {
@@ -215,17 +220,22 @@ export default {
215
220
  height: 40px;
216
221
  cursor: pointer;
217
222
  }
218
- .small-img .pdf {
223
+ .small-img .pdf, .small-img .doc {
219
224
  display: flex;
220
225
  justify-content: center;
221
226
  align-items: center;
222
227
  font-size: 30px;
228
+ }
229
+ .small-img .pdf {
223
230
  color: #E74C3C;
224
231
  }
225
- .small-img .pdf svg{
232
+ .small-img .doc {
233
+ color: #006bc9;
234
+ }
235
+ .small-img .pdf svg, .small-img .doc svg{
226
236
  z-index: 1;
227
237
  }
228
- .small-img .pdf::after {
238
+ .small-img .pdf::after, .small-img .doc::after {
229
239
  content: "";
230
240
  position: absolute;
231
241
  bottom: 2px;
@@ -6,10 +6,10 @@
6
6
  </span>
7
7
  <div class="text-footer-invalid-format" v-if="fileFormatError">
8
8
  <h3 v-text="dictionary.titulo_msg_formato_invalido"></h3>
9
- <h4 v-text="validFileFormats"></h4>
9
+ <h4 v-text="validFileFormats" :title="validFileFormats"></h4>
10
10
  </div>
11
11
  <template v-else>
12
- <h3 v-if="file.name" class="text-footer-preview-title">
12
+ <h3 v-if="file.name" class="text-footer-preview-title" :title="file.name">
13
13
  <fa-icon :icon="['fas', 'file-alt']" v-if="isDoc" />
14
14
  <fa-icon :icon="['fas', 'image']" v-else />
15
15
  {{ file.name }}
@@ -139,7 +139,7 @@ export default {
139
139
  this.loadingReq = true
140
140
  this.getStandardMessages(cod, this.token_cliente).then((data) => {
141
141
  this.loadingReq = false
142
- if(data.msg_ret) return this.$toasted.global.emConstrucao({ msg: data.msg_ret })
142
+ if(data.msg_ret) return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
143
143
  if(data) return this.showFormattedMessage(data, selectionIndex)
144
144
  this.$toasted.global.defaultError()
145
145
  }).catch(e => {
@@ -157,7 +157,7 @@ export default {
157
157
  try {
158
158
  let success = false
159
159
  if(Array.isArray(messageData)) success = true
160
- if(!success && selectionIndex != 4) this.$toasted.global.emConstrucao({ msg: messageData ? messageData.msg : "Nao foi possível obter mensagens" })
160
+ if(!success && selectionIndex != 4) this.$toasted.global.defaultInfo({ msg: messageData ? messageData.msg : "Nao foi possível obter mensagens" })
161
161
 
162
162
  switch (selectionIndex) {
163
163
  case 2:
@@ -177,7 +177,7 @@ export default {
177
177
  case 3:
178
178
  if(!success) {
179
179
  this.formatted_messages_3.push(messageData)
180
- this.$toasted.global.emConstrucao({msg: this.dictionary.msg_erro_sem_msg_formatada})
180
+ this.$toasted.global.defaultInfo({msg: this.dictionary.msg_erro_sem_msg_formatada})
181
181
  this.$emit("close-blocker-standard-message")
182
182
  }else{
183
183
  if(messageData.length){
@@ -143,7 +143,7 @@ export default {
143
143
  },
144
144
  fileSettings: {
145
145
  type: Object,
146
- default: () => { return { docsExtensions: "", imagesExtensions: "", multiple: false, systemButton: false } },
146
+ default: () => { return { docsExtensions: "", imagesExtensions: "", multiple: false, systemButton: false, max: 3 } },
147
147
  required: false
148
148
  },
149
149
  textId: {
@@ -211,7 +211,7 @@ export default {
211
211
  if(event.data == '' && this.showStandardMessages){
212
212
  this.closeBlockerStandardMessage()
213
213
  this.toggleStandardMessages()
214
- this.$toasted.global.emConstrucao({msg: this.dictionary.msg_erro_sem_msg_formatada})
214
+ this.$toasted.global.defaultInfo({msg: this.dictionary.msg_erro_sem_msg_formatada})
215
215
  }else if(typeof event.data === "string" && this.showStandardMessages){
216
216
  this.message = event.data
217
217
  this.focusTextarea()
@@ -271,7 +271,7 @@ export default {
271
271
 
272
272
  if(this.textareaSettings.disabled) return false
273
273
 
274
- if(this.fileFormatError) {
274
+ if(this.fileFormatError && this.hasAnyFile) {
275
275
  if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
276
276
  const str = {
277
277
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
@@ -383,13 +383,14 @@ export default {
383
383
  this.audioSource = ""
384
384
  },
385
385
  returnFileType(file, stopAlert) {
386
+ if(!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions) return false
386
387
  const imgRegex = new RegExp("\.("+this.fileSettings.imagesExtensions+")", "i")
387
388
  if(imgRegex.test(file.name)) return "img"
388
389
 
389
390
  const docRegex = new RegExp("\.("+this.fileSettings.docsExtensions+")", "i")
390
391
  if(docRegex.test(file.name)) return "doc"
391
392
 
392
- if(!stopAlert) return
393
+ if(!stopAlert) return false
393
394
  if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({ msg: this.dictionary.msg_formato_invalido })
394
395
  const str = {
395
396
  img: this.fileSettings.imagesExtensions.split("|").join(", "),
@@ -717,6 +718,7 @@ ul {
717
718
  }
718
719
 
719
720
  .text-footer-container .text-footer-preview-container {
721
+ width: 100%;
720
722
  cursor: default;
721
723
  position: absolute;
722
724
  left: 0;
@@ -123,6 +123,7 @@ export default {
123
123
  .anexo-container{
124
124
  width: 100%;
125
125
  margin-top: 5px;
126
+ overflow: hidden;
126
127
  }
127
128
  .anexo-container a, .anexo-container .arquivo-erro{
128
129
  padding: 10px 15px 15px 15px;
@@ -130,6 +131,10 @@ export default {
130
131
  justify-content: center;
131
132
  align-items: center;
132
133
  }
134
+ .anexo-container p {
135
+ text-overflow: ellipsis;
136
+ overflow: hidden;
137
+ }
133
138
  .anexo-container p, .anexo-container .arquivo-erro{
134
139
  margin: 0;
135
140
  margin-left: 15px;