vue-intergrall-plugins 0.0.209 → 0.0.210

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.
@@ -3228,7 +3228,7 @@ var __vue_render__$n = function __vue_render__() {
3228
3228
  attrs: {
3229
3229
  "icon": ['fas', 'trash-alt']
3230
3230
  }
3231
- })], 1), _vm._ssrNode(" "), _vm.fileFormatError ? _vm._ssrNode("<div class=\"text-footer-invalid-format\">", "</div>", [_vm._ssrNode("<h3>" + _vm._ssrEscape(_vm._s(_vm.dictionary.titulo_msg_formato_invalido)) + "</h3> <h4>" + _vm._ssrEscape(_vm._s(_vm.validFileFormats)) + "</h4>")], 2) : [_vm.file.name ? _vm._ssrNode("<h3 class=\"text-footer-preview-title\">", "</h3>", [_vm.isDoc ? _c('fa-icon', {
3231
+ })], 1), _vm._ssrNode(" "), _vm.fileFormatError ? _vm._ssrNode("<div class=\"text-footer-invalid-format\">", "</div>", [_vm._ssrNode("<h3>" + _vm._ssrEscape(_vm._s(_vm.dictionary.titulo_msg_formato_invalido)) + "</h3> <h4" + _vm._ssrAttr("title", _vm.validFileFormats) + ">" + _vm._ssrEscape(_vm._s(_vm.validFileFormats)) + "</h4>")], 2) : [_vm.file.name ? _vm._ssrNode("<h3" + _vm._ssrAttr("title", _vm.file.name) + " class=\"text-footer-preview-title\">", "</h3>", [_vm.isDoc ? _c('fa-icon', {
3232
3232
  attrs: {
3233
3233
  "icon": ['fas', 'file-alt']
3234
3234
  }
@@ -3244,7 +3244,7 @@ var __vue_staticRenderFns__$n = [];
3244
3244
 
3245
3245
  var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
3246
3246
  if (!inject) return;
3247
- inject("data-v-bd51f352_0", {
3247
+ inject("data-v-a5119ba8_0", {
3248
3248
  source: ".single-file-preview .close-icon{color:#e74c3c;cursor:pointer;opacity:.9;transition:opacity .3s}.single-file-preview .close-icon:hover{opacity:1}.text-footer-invalid-format{color:#222;padding:10px}.text-footer-invalid-format h3{font-weight:500}.text-footer-invalid-format h4{font-size:.9rem}.text-footer-preview-title{font-size:1rem;padding:10px 0 0 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.text-footer-image-preview{display:flex;justify-content:center;align-items:center;width:100%}.text-footer-image-preview img{cursor:pointer;max-width:98%;max-height:98%;padding:2%}",
3249
3249
  map: undefined,
3250
3250
  media: undefined
@@ -3256,7 +3256,7 @@ var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
3256
3256
  var __vue_scope_id__$n = undefined;
3257
3257
  /* module identifier */
3258
3258
 
3259
- var __vue_module_identifier__$n = "data-v-bd51f352";
3259
+ var __vue_module_identifier__$n = "data-v-a5119ba8";
3260
3260
  /* functional template */
3261
3261
 
3262
3262
  var __vue_is_functional_template__$n = false;
@@ -3393,6 +3393,9 @@ var __vue_render__$m = function __vue_render__() {
3393
3393
  "textContent": _vm._s(_vm.dictionary.titulo_msg_formato_invalido)
3394
3394
  }
3395
3395
  }), _vm._v(" "), _c('h4', {
3396
+ attrs: {
3397
+ "title": _vm.validFileFormats
3398
+ },
3396
3399
  domProps: {
3397
3400
  "innerHTML": _vm._s(_vm.validFileFormats)
3398
3401
  }
@@ -3401,7 +3404,10 @@ var __vue_render__$m = function __vue_render__() {
3401
3404
  key: index,
3402
3405
  staticClass: "file-preview"
3403
3406
  }, [_c('p', {
3404
- staticClass: "file-title"
3407
+ staticClass: "file-title",
3408
+ attrs: {
3409
+ "title": singleFile.name
3410
+ }
3405
3411
  }, [_c('fa-icon', {
3406
3412
  attrs: {
3407
3413
  "icon": _vm.icon(singleFile.imgOrDoc)
@@ -3429,9 +3435,24 @@ var __vue_render__$m = function __vue_render__() {
3429
3435
  attrs: {
3430
3436
  "icon": ['fas', 'file-pdf']
3431
3437
  }
3432
- })], 1) : _vm._e()]), _vm._v(" "), _c('span', {
3438
+ })], 1) : _c('span', {
3439
+ staticClass: "doc"
3440
+ }, [_c('fa-icon', {
3441
+ attrs: {
3442
+ "icon": ['fas', 'file-alt']
3443
+ }
3444
+ })], 1)]), _vm._v(" "), _c('span', {
3445
+ directives: [{
3446
+ name: "tippy",
3447
+ rawName: "v-tippy",
3448
+ value: {
3449
+ placement: 'left'
3450
+ },
3451
+ expression: "{placement: 'left'}"
3452
+ }],
3433
3453
  staticClass: "delete-file",
3434
3454
  attrs: {
3455
+ "content": _vm.dictionary.msg_excluir_anexo,
3435
3456
  "title": _vm.dictionary.msg_excluir_anexo
3436
3457
  },
3437
3458
  on: {
@@ -3452,8 +3473,8 @@ var __vue_staticRenderFns__$m = [];
3452
3473
 
3453
3474
  var __vue_inject_styles__$m = function __vue_inject_styles__(inject) {
3454
3475
  if (!inject) return;
3455
- inject("data-v-28d9ba6f_0", {
3456
- source: ".multiple-file-preview{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;border-top-left-radius:2.5px;border-top-right-radius:2.5px;transition:background-color 150ms;scrollbar-color:#888 rgba(0,0,0,.2);scrollbar-width:4px}.multiple-file-preview::-webkit-scrollbar{width:4px}.multiple-file-preview .close-icon{color:#e74c3c;cursor:pointer;opacity:.9;transition:opacity .3s}.multiple-file-preview .close-icon:hover{opacity:1}.multiple-file-preview::-webkit-scrollbar-track{background-color:rgba(0,0,0,.2)}.multiple-file-preview::-webkit-scrollbar-thumb{transition-duration:.5s;background-color:#222}.multiple-file-preview::-webkit-scrollbar-thumb:hover{background-color:#555}.text-footer-invalid-format{color:#222;padding:10px}.text-footer-invalid-format h3{font-weight:500}.text-footer-invalid-format h4{font-size:.9rem}.text-footer-exclude-file{position:absolute;top:5px;right:5px;cursor:pointer;display:flex;justify-content:center;align-items:center;min-width:1rem;min-height:1rem;background-color:#fff;border-radius:50%}.text-footer-exclude-file svg{transition:color .2s;color:#e9594a}.text-footer-exclude-file svg:hover{color:#e74c3c}.file-preview{display:flex;width:100%;align-items:center;padding:5px 10px;transition:background-color 150ms}.file-preview:hover{background-color:rgba(0,0,0,.1)}.file-title{color:#222;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:4px 10px;background-color:#fff;border-radius:30px;display:inline-block}.file-title.red{color:#e74c3c;margin-left:5px}.file-title>svg{margin-right:5px}.small-img{flex:1;margin:0 15px;display:flex;justify-content:center;align-items:center;position:relative}.small-img img{height:40px;cursor:pointer}.small-img .pdf{display:flex;justify-content:center;align-items:center;font-size:30px;color:#e74c3c}.small-img .pdf svg{z-index:1}.small-img .pdf::after{content:\"\";position:absolute;bottom:2px;transform:translateY(2px);width:20px;height:20px;background-color:#fff}.img-container{padding:5px;border-radius:2.5px;background-color:rgba(0,0,0,.15);display:flex;justify-content:center;align-items:center}.delete-file{display:flex;justify-content:center;align-items:center;cursor:pointer}.delete-file>svg{font-size:1rem;color:#e74c3c}",
3476
+ inject("data-v-f3de3970_0", {
3477
+ source: ".multiple-file-preview{position:relative;display:flex;flex-direction:column;width:100%;height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;border-top-left-radius:2.5px;border-top-right-radius:2.5px;transition:background-color 150ms;scrollbar-color:#888 rgba(0,0,0,.2);scrollbar-width:4px}.multiple-file-preview::-webkit-scrollbar{width:4px}.multiple-file-preview .close-icon{color:#e74c3c;cursor:pointer;opacity:.9;transition:opacity .3s}.multiple-file-preview .close-icon:hover{opacity:1}.multiple-file-preview::-webkit-scrollbar-track{background-color:rgba(0,0,0,.2)}.multiple-file-preview::-webkit-scrollbar-thumb{transition-duration:.5s;background-color:#222}.multiple-file-preview::-webkit-scrollbar-thumb:hover{background-color:#555}.text-footer-invalid-format{color:#222;padding:10px}.text-footer-invalid-format h3{text-overflow:ellipsis;overflow:hidden;font-weight:500}.text-footer-invalid-format h4{text-overflow:ellipsis;overflow:hidden;font-size:.9rem}.text-footer-exclude-file{position:absolute;top:5px;right:5px;cursor:pointer;display:flex;justify-content:center;align-items:center;min-width:1rem;min-height:1rem;background-color:#fff;border-radius:50%}.text-footer-exclude-file svg{transition:color .2s;color:#e9594a}.text-footer-exclude-file svg:hover{color:#e74c3c}.file-preview{display:flex;width:100%;align-items:center;padding:5px 10px;transition:background-color 150ms}.file-preview:hover{background-color:rgba(0,0,0,.1)}.file-title{color:#222;display:flex;align-items:center;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding:4px 10px;background-color:#fff;border-radius:30px;display:inline-block}.file-title.red{color:#e74c3c;margin-left:5px}.file-title>svg{margin-right:5px;color:#333}.small-img{flex:1;margin:0 15px;display:flex;justify-content:center;align-items:center;position:relative}.small-img img{height:40px;cursor:pointer}.small-img .doc,.small-img .pdf{display:flex;justify-content:center;align-items:center;font-size:30px}.small-img .pdf{color:#e74c3c}.small-img .doc{color:#006bc9}.small-img .doc svg,.small-img .pdf svg{z-index:1}.small-img .doc::after,.small-img .pdf::after{content:\"\";position:absolute;bottom:2px;transform:translateY(2px);width:20px;height:20px;background-color:#fff}.img-container{padding:5px;border-radius:2.5px;background-color:rgba(0,0,0,.15);display:flex;justify-content:center;align-items:center}.delete-file{display:flex;justify-content:center;align-items:center;cursor:pointer}.delete-file>svg{font-size:1rem;color:#e74c3c}",
3457
3478
  map: undefined,
3458
3479
  media: undefined
3459
3480
  });
@@ -3464,7 +3485,7 @@ var __vue_inject_styles__$m = function __vue_inject_styles__(inject) {
3464
3485
  var __vue_scope_id__$m = undefined;
3465
3486
  /* module identifier */
3466
3487
 
3467
- var __vue_module_identifier__$m = "data-v-28d9ba6f";
3488
+ var __vue_module_identifier__$m = "data-v-f3de3970";
3468
3489
  /* functional template */
3469
3490
 
3470
3491
  var __vue_is_functional_template__$m = false;
@@ -3562,6 +3583,14 @@ var script$l = {
3562
3583
  if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
3563
3584
  },
3564
3585
  isFileValid: function isFileValid(type, fileName) {
3586
+ if (type == "img" && !this.fileSettings.imagesExtensions || type == "doc" && !this.fileSettings.docsExtensions) {
3587
+ this.$toasted.global.defaultInfo({
3588
+ msg: this.dictionary.sem_extensoes_parametrizadas
3589
+ });
3590
+ this.hasAnyFile = false;
3591
+ return false;
3592
+ }
3593
+
3565
3594
  var extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions;
3566
3595
  var regex = new RegExp("(" + extensions + ")", "i");
3567
3596
  if (regex.test(fileName)) return true;
@@ -3589,6 +3618,14 @@ var script$l = {
3589
3618
  var filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event;
3590
3619
  this.file = filesAux.length ? filesAux : this.file;
3591
3620
  if (!this.file.length) return;
3621
+
3622
+ if (this.file.length > this.fileSettings.max) {
3623
+ this.file = [];
3624
+ return this.$toasted.global.defaultInfo({
3625
+ msg: "Limite de ".concat(this.fileSettings.max, " arquivos")
3626
+ });
3627
+ }
3628
+
3592
3629
  this.hasAnyFile = true;
3593
3630
  this.fileSize = this.file.length;
3594
3631
 
@@ -3604,6 +3641,7 @@ var script$l = {
3604
3641
  }
3605
3642
  },
3606
3643
  returnFileType: function returnFileType(file) {
3644
+ if (!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions) return "";
3607
3645
  var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
3608
3646
  if (imgRegex.test(file.name)) return "img";
3609
3647
  var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
@@ -3613,63 +3651,87 @@ var script$l = {
3613
3651
  multipleFileUpload: function multipleFileUpload() {
3614
3652
  var _this = this;
3615
3653
 
3654
+ var hasImgExt = this.fileSettings.imagesExtensions ? true : false;
3655
+ var hasDocExt = this.fileSettings.docsExtensions ? true : false;
3656
+
3657
+ if (!hasImgExt && !hasDocExt) {
3658
+ this.file = [];
3659
+ this.fileSize = 0;
3660
+ return this.$toasted.global.defaultInfo({
3661
+ msg: this.dictionary.sem_extensoes_parametrizadas
3662
+ });
3663
+ }
3664
+
3616
3665
  var waitForImageLoad = false;
3617
3666
  this.file = Array.from(this.file);
3618
3667
  this.file.forEach(function (file) {
3619
- var fileReader = new FileReader();
3620
-
3621
3668
  var singleFileType = _this.returnFileType(file);
3622
3669
 
3623
3670
  if (!singleFileType) file.invalid = true;
3624
3671
  file.imgOrDoc = singleFileType ? singleFileType : "";
3625
- if (file.imgOrDoc === "doc") _this.isDoc = true;
3626
3672
 
3627
- if (file.imgOrDoc === "img") {
3628
- waitForImageLoad = true;
3673
+ if (_this.isFileValid(file.imgOrDoc, file.name)) {
3674
+ if (file.imgOrDoc == "img") {
3675
+ var fileReader = new FileReader();
3676
+ waitForImageLoad = true;
3629
3677
 
3630
- fileReader.onload = function () {
3631
- return file.src = fileReader.result;
3632
- };
3678
+ fileReader.onload = function () {
3679
+ return file.src = fileReader.result;
3680
+ };
3633
3681
 
3634
- fileReader.onloadend = function () {
3635
- return _this.emitFileVars(true);
3636
- };
3637
- }
3682
+ fileReader.onloadend = function () {
3683
+ return _this.emitFileVars(true);
3684
+ };
3638
3685
 
3639
- if (_this.isFileValid(file.imgOrDoc, file.name)) {
3640
- if (file.imgOrDoc === "img") fileReader.readAsDataURL(file);
3686
+ fileReader.readAsDataURL(file);
3687
+ }
3688
+
3689
+ if (file.imgOrDoc === "doc") _this.isDoc = true;
3641
3690
  file.invalid = false;
3642
3691
  _this.fileFormatError = false;
3643
3692
  } else {
3644
3693
  file.invalid = true;
3645
3694
  _this.fileFormatError = true;
3646
- _this.validFileFormats = "Imgs: ".concat(_this.fileSettings.imagesExtensions.split("|").join(", "), " <br> Docs: ").concat(_this.fileSettings.docsExtensions.split("|").join(", "), " ").concat(_this.dictionary.msg_extensoes_aceitas);
3695
+ if (hasImgExt && !hasDocExt) _this.validFileFormats = "Imagens: ".concat(_this.fileSettings.imagesExtensions.split("|").join(", "));
3696
+ if (hasDocExt && hasImgExt) _this.validFileFormats = "Documentos: ".concat(_this.fileSettings.docsExtensions.split("|").join(", "));
3697
+ if (hasImgExt && hasDocExt) _this.validFileFormats = "Imagens: ".concat(_this.fileSettings.imagesExtensions.split("|").join(", "), " - Documentos: ").concat(_this.fileSettings.docsExtensions.split("|").join(", "));
3647
3698
  }
3648
3699
  });
3700
+
3701
+ if (this.fileFormatError) {
3702
+ this.file = [];
3703
+ this.fileSize = 0;
3704
+ }
3705
+
3649
3706
  if (this.isDoc && !waitForImageLoad) this.emitFileVars();
3650
3707
  },
3651
3708
  singleFileUpload: function singleFileUpload(type, fileName) {
3652
3709
  var _this2 = this;
3653
3710
 
3654
- var fileReader = new FileReader();
3711
+ if (this.isFileValid(type, fileName)) {
3712
+ var fileReader = new FileReader();
3655
3713
 
3656
- if (type === "img") {
3657
- fileReader.onload = function () {
3658
- return _this2.imagePreview = fileReader.result;
3659
- };
3714
+ if (type === "img") {
3715
+ fileReader.onload = function () {
3716
+ return _this2.imagePreview = fileReader.result;
3717
+ };
3660
3718
 
3661
- fileReader.onloadend = function () {
3662
- return _this2.emitFileVars();
3663
- };
3664
- }
3719
+ fileReader.onloadend = function () {
3720
+ return _this2.emitFileVars();
3721
+ };
3722
+
3723
+ fileReader.readAsDataURL(this.file);
3724
+ }
3665
3725
 
3666
- if (this.isFileValid(type, fileName)) {
3667
- if (type === "img") fileReader.readAsDataURL(this.file);
3668
3726
  if (type === "doc") this.isDoc = true;
3669
3727
  this.fileFormatError = false;
3670
3728
  } else {
3671
3729
  this.fileFormatError = true;
3672
- this.validFileFormats = "Imgs: ".concat(this.fileSettings.imagesExtensions.split("|").join(", "), " <br> Docs: ").concat(this.fileSettings.docsExtensions.split("|").join(", "), " ").concat(this.dictionary.msg_extensoes_aceitas);
3730
+ var hasImgExt = this.fileSettings.imagesExtensions ? true : false;
3731
+ var hasDocExt = this.fileSettings.docsExtensions ? true : false;
3732
+ if (hasImgExt && !hasDocExt) this.validFileFormats = "Imagens: ".concat(this.fileSettings.imagesExtensions);
3733
+ if (hasDocExt && hasImgExt) this.validFileFormats = "Documentos: ".concat(this.fileSettings.docsExtensions);
3734
+ if (hasImgExt && hasDocExt) this.validFileFormats = "Imagens: ".concat(this.fileSettings.imagesExtensions, " - Documentos: ").concat(this.fileSettings.docsExtensions);
3673
3735
  }
3674
3736
 
3675
3737
  if (this.isDoc) this.emitFileVars();
@@ -3893,7 +3955,7 @@ var __vue_staticRenderFns__$l = [];
3893
3955
 
3894
3956
  var __vue_inject_styles__$l = function __vue_inject_styles__(inject) {
3895
3957
  if (!inject) return;
3896
- inject("data-v-d44e0484_0", {
3958
+ inject("data-v-451fb0c4_0", {
3897
3959
  source: ".fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}.files-counter{position:absolute;top:unset;transform:translate(17.5px,-15px);background-color:#888;z-index:1;font-size:.5rem;width:15px;height:15px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;opacity:.9;transition:all .3s;color:#fff;font-weight:900}.files-counter:hover{opacity:1}",
3898
3960
  map: undefined,
3899
3961
  media: undefined
@@ -3905,7 +3967,7 @@ var __vue_inject_styles__$l = function __vue_inject_styles__(inject) {
3905
3967
  var __vue_scope_id__$l = undefined;
3906
3968
  /* module identifier */
3907
3969
 
3908
- var __vue_module_identifier__$l = "data-v-d44e0484";
3970
+ var __vue_module_identifier__$l = "data-v-451fb0c4";
3909
3971
  /* functional template */
3910
3972
 
3911
3973
  var __vue_is_functional_template__$l = false;
@@ -7974,7 +8036,7 @@ var script$i = {
7974
8036
  this.loadingReq = true;
7975
8037
  this.getStandardMessages(cod, this.token_cliente).then(function (data) {
7976
8038
  _this.loadingReq = false;
7977
- if (data.msg_ret) return _this.$toasted.global.emConstrucao({
8039
+ if (data.msg_ret) return _this.$toasted.global.defaultInfo({
7978
8040
  msg: data.msg_ret
7979
8041
  });
7980
8042
  if (data) return _this.showFormattedMessage(data, selectionIndex);
@@ -7998,7 +8060,7 @@ var script$i = {
7998
8060
  try {
7999
8061
  var success = false;
8000
8062
  if (Array.isArray(messageData)) success = true;
8001
- if (!success && selectionIndex != 4) this.$toasted.global.emConstrucao({
8063
+ if (!success && selectionIndex != 4) this.$toasted.global.defaultInfo({
8002
8064
  msg: messageData ? messageData.msg : "Nao foi possível obter mensagens"
8003
8065
  });
8004
8066
 
@@ -8023,7 +8085,7 @@ var script$i = {
8023
8085
  case 3:
8024
8086
  if (!success) {
8025
8087
  this.formatted_messages_3.push(messageData);
8026
- this.$toasted.global.emConstrucao({
8088
+ this.$toasted.global.defaultInfo({
8027
8089
  msg: this.dictionary.msg_erro_sem_msg_formatada
8028
8090
  });
8029
8091
  this.$emit("close-blocker-standard-message");
@@ -8183,7 +8245,7 @@ var __vue_staticRenderFns__$i = [];
8183
8245
 
8184
8246
  var __vue_inject_styles__$i = function __vue_inject_styles__(inject) {
8185
8247
  if (!inject) return;
8186
- inject("data-v-4e81952e_0", {
8248
+ inject("data-v-324084df_0", {
8187
8249
  source: ".transition-selects{min-height:80px;display:flex;flex-direction:column;width:100%}.loader-select{position:relative;min-height:35px;background:#fff;width:100%;border:1px solid #ccc;border-radius:5px;z-index:1}.loading-message{background-color:#555!important}",
8188
8250
  map: undefined,
8189
8251
  media: undefined
@@ -8195,7 +8257,7 @@ var __vue_inject_styles__$i = function __vue_inject_styles__(inject) {
8195
8257
  var __vue_scope_id__$i = undefined;
8196
8258
  /* module identifier */
8197
8259
 
8198
- var __vue_module_identifier__$i = "data-v-4e81952e";
8260
+ var __vue_module_identifier__$i = "data-v-324084df";
8199
8261
  /* functional template */
8200
8262
 
8201
8263
  var __vue_is_functional_template__$i = false;
@@ -8285,7 +8347,8 @@ var script$h = {
8285
8347
  docsExtensions: "",
8286
8348
  imagesExtensions: "",
8287
8349
  multiple: false,
8288
- systemButton: false
8350
+ systemButton: false,
8351
+ max: 3
8289
8352
  };
8290
8353
  },
8291
8354
  required: false
@@ -8354,7 +8417,7 @@ var script$h = {
8354
8417
  if (event.data == '' && this.showStandardMessages) {
8355
8418
  this.closeBlockerStandardMessage();
8356
8419
  this.toggleStandardMessages();
8357
- this.$toasted.global.emConstrucao({
8420
+ this.$toasted.global.defaultInfo({
8358
8421
  msg: this.dictionary.msg_erro_sem_msg_formatada
8359
8422
  });
8360
8423
  } else if (typeof event.data === "string" && this.showStandardMessages) {
@@ -8535,11 +8598,12 @@ var script$h = {
8535
8598
  this.audioSource = "";
8536
8599
  },
8537
8600
  returnFileType: function returnFileType(file, stopAlert) {
8601
+ if (!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions) return false;
8538
8602
  var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
8539
8603
  if (imgRegex.test(file.name)) return "img";
8540
8604
  var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
8541
8605
  if (docRegex.test(file.name)) return "doc";
8542
- if (!stopAlert) return;
8606
+ if (!stopAlert) return false;
8543
8607
  if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
8544
8608
  msg: this.dictionary.msg_formato_invalido
8545
8609
  });
@@ -8815,8 +8879,8 @@ var __vue_staticRenderFns__$h = [];
8815
8879
 
8816
8880
  var __vue_inject_styles__$h = function __vue_inject_styles__(inject) {
8817
8881
  if (!inject) return;
8818
- inject("data-v-48659e85_0", {
8819
- source: ".toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}.text-footer-container{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;position:relative}.text-footer-container .text-footer{min-height:48px;box-shadow:0 3px 7px -2px rgba(0,0,0,.45);position:relative;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;padding:5px 2px 5px 5px;border-radius:5px}.text-footer-container .text-footer.full{width:100%}.text-footer-container .text-footer.almostFull{width:95%}.text-footer-container .text-footer.medium{width:75%}.text-footer-container.bigger .text-footer{height:80px}.text-footer-container.bigger .text-footer>textarea{font-size:.875rem;height:75px;max-height:75px;min-height:75px}.text-footer-container textarea{margin:0 5px;border:unset;flex:1;resize:none;min-height:30px;max-height:60px;font-size:.875rem;font-family:inherit;background:inherit}.text-footer-container textarea:focus{outline:unset}.text-footer-container textarea::placeholder{font-size:.75rem}.text-footer-container .text-footer-audio{flex:1;display:flex;justify-content:center;align-items:center}.text-footer-container audio{flex:1;outline:unset;width:auto;height:38px}.text-footer-container .delete-audio{display:flex;justify-content:center;align-items:center;color:#e74c3c;transition:background .3s;border-radius:50%;font-size:1rem;padding:10px;cursor:pointer;margin:0 5px;width:31px;height:31px}.text-footer-container .delete-audio:hover{background-color:rgba(208,0,0,.2)}.text-footer-container .max-characters{font-size:.575rem;z-index:1;color:#444;position:relative;top:30px;left:-30px}.text-footer-container .max-characters.no-width{width:0}.text-footer-container .text-footer-actions{display:flex}.text-footer-container .text-footer-actions.outside-buttons{display:flex;align-items:center;justify-content:flex-end;position:absolute;top:-42px;right:2px;background-color:#ddd;box-shadow:inset 0 -10px 5px -11px rgba(0,0,0,.5)}.text-footer-container .text-footer-actions .text-footer-actions--btn{display:flex;justify-content:center;align-items:center;color:#777;border-radius:50%;transition:background .3s;padding:10px;font-size:1rem;width:36px;height:36px;cursor:pointer;margin-right:2.5px}.text-footer-container .text-footer-actions .text-footer-actions--btn:last-child{margin-right:unset}.text-footer-container .text-footer-actions .text-footer-actions--btn:hover{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated{background-color:rgba(208,0,0,.7);color:#fff}.text-footer-container .text-footer-actions .text-footer-actions--btn.left-button{position:absolute;left:0}.text-footer-container .text-footer-hsm-container{margin:12px 0 7px 0}.text-footer-container .text-footer-hsm-container.full{width:100%}.text-footer-container .text-footer-hsm-container.almostFull{width:95%}.text-footer-container .text-footer-hsm-container.medium{width:75%}.text-footer-container .text-footer-hsm-container .text-footer-v-select{border-radius:5px;margin-bottom:5px}.text-footer-container .text-footer-hsm-container .text-footer-select-03{display:flex;align-items:center;flex:1;width:100%}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer-v-select{flex:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03{transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -3px rgba(0,0,0,.2);opacity:.9;border-radius:2.5px;display:flex;justify-content:center;align-items:center;margin-left:5px;margin-bottom:5px;background-color:#f7fe72;width:32px;height:32px}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:hover{opacity:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 svg{font-size:1rem}.text-footer-container .text-footer-files-container{position:absolute;right:0;top:-55px;padding:5px;background-color:rgba(0,0,0,.4);border-radius:5px;display:flex;align-items:center;justify-content:space-between;z-index:1}.text-footer-container .text-footer-files-container.horizontal{right:-55px;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn{transition-duration:.3s;transition-property:opacity;opacity:.8;cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:10px;padding:3px;width:40px;height:40px;font-size:1rem;color:#fff}.text-footer-container .text-footer-files-container .files-btn:hover{opacity:1}.text-footer-container .text-footer-files-container .files-btn svg{color:#fff}.text-footer-container .text-footer-files-container .files-btn.images{background-color:#9575cd;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.images.margin-bottom{margin-right:unset;margin-bottom:5px}.text-footer-container .text-footer-files-container .files-btn.docs{background-color:#7986cb}.text-footer-container .text-footer-files-container .files-btn.system{background-color:#49a349;margin-left:5px}.text-footer-container .text-footer-files-container .files-btn.both{font-size:.95rem;background-color:#5555ec;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(1){transform:translateX(5px)}.text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(2){transform:translateX(-5px)}.text-footer-container .text-footer-preview-container{cursor:default;position:absolute;left:0;background-color:#f1f1f1;border:2px solid #ccc;border-bottom:unset;border-top-left-radius:2.5px;border-top-right-radius:2.5px}.text-footer-container .text-footer-preview-container.isDoc{top:-50px;width:100%;height:45px}.text-footer-container .text-footer-preview-container.isImg,.text-footer-container .text-footer-preview-container.isMultiple{top:-205px;width:100%;height:200px}.text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview{height:170px}.text-footer-container .text-footer-preview-container.isError{top:-80px;width:100%;height:75px}.text-footer-container .text-footer-alt{margin-top:-12px;width:100%;padding:0 10px}.text-footer-container .text-footer-alt .text-footer-out-session{margin-top:12px}.text-footer-container .text-footer-alt .text-footer-sem-24h{font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#dd7f0c;margin-top:5px;position:absolute;right:0}.text-footer-container .text-footer-alt .sem-templates{margin-top:10px;font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#921e12}.text-footer-container .text-footer-alt .text-footer-templates{position:relative;width:100%}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection{width:100%;display:flex;align-items:center}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection h4{margin-right:5px}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection .sm__select{flex:1}.vs__dropdown-menu{font-size:.85rem!important}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
8882
+ inject("data-v-54b5cd94_0", {
8883
+ source: ".toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}.text-footer-container{display:flex;justify-content:center;align-items:center;flex-direction:column;width:100%;position:relative}.text-footer-container .text-footer{min-height:48px;box-shadow:0 3px 7px -2px rgba(0,0,0,.45);position:relative;display:flex;justify-content:center;align-items:center;border:1px solid #ccc;padding:5px 2px 5px 5px;border-radius:5px}.text-footer-container .text-footer.full{width:100%}.text-footer-container .text-footer.almostFull{width:95%}.text-footer-container .text-footer.medium{width:75%}.text-footer-container.bigger .text-footer{height:80px}.text-footer-container.bigger .text-footer>textarea{font-size:.875rem;height:75px;max-height:75px;min-height:75px}.text-footer-container textarea{margin:0 5px;border:unset;flex:1;resize:none;min-height:30px;max-height:60px;font-size:.875rem;font-family:inherit;background:inherit}.text-footer-container textarea:focus{outline:unset}.text-footer-container textarea::placeholder{font-size:.75rem}.text-footer-container .text-footer-audio{flex:1;display:flex;justify-content:center;align-items:center}.text-footer-container audio{flex:1;outline:unset;width:auto;height:38px}.text-footer-container .delete-audio{display:flex;justify-content:center;align-items:center;color:#e74c3c;transition:background .3s;border-radius:50%;font-size:1rem;padding:10px;cursor:pointer;margin:0 5px;width:31px;height:31px}.text-footer-container .delete-audio:hover{background-color:rgba(208,0,0,.2)}.text-footer-container .max-characters{font-size:.575rem;z-index:1;color:#444;position:relative;top:30px;left:-30px}.text-footer-container .max-characters.no-width{width:0}.text-footer-container .text-footer-actions{display:flex}.text-footer-container .text-footer-actions.outside-buttons{display:flex;align-items:center;justify-content:flex-end;position:absolute;top:-42px;right:2px;background-color:#ddd;box-shadow:inset 0 -10px 5px -11px rgba(0,0,0,.5)}.text-footer-container .text-footer-actions .text-footer-actions--btn{display:flex;justify-content:center;align-items:center;color:#777;border-radius:50%;transition:background .3s;padding:10px;font-size:1rem;width:36px;height:36px;cursor:pointer;margin-right:2.5px}.text-footer-container .text-footer-actions .text-footer-actions--btn:last-child{margin-right:unset}.text-footer-container .text-footer-actions .text-footer-actions--btn:hover{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.files-activated{background-color:rgba(0,0,0,.1)}.text-footer-container .text-footer-actions .text-footer-actions--btn.audio-activated{background-color:rgba(208,0,0,.7);color:#fff}.text-footer-container .text-footer-actions .text-footer-actions--btn.left-button{position:absolute;left:0}.text-footer-container .text-footer-hsm-container{margin:12px 0 7px 0}.text-footer-container .text-footer-hsm-container.full{width:100%}.text-footer-container .text-footer-hsm-container.almostFull{width:95%}.text-footer-container .text-footer-hsm-container.medium{width:75%}.text-footer-container .text-footer-hsm-container .text-footer-v-select{border-radius:5px;margin-bottom:5px}.text-footer-container .text-footer-hsm-container .text-footer-select-03{display:flex;align-items:center;flex:1;width:100%}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer-v-select{flex:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03{transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -3px rgba(0,0,0,.2);opacity:.9;border-radius:2.5px;display:flex;justify-content:center;align-items:center;margin-left:5px;margin-bottom:5px;background-color:#f7fe72;width:32px;height:32px}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:hover{opacity:1}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03:active{opacity:1;box-shadow:inset 0 -1px rgba(0,0,0,.2);-webkit-transform:translateY(1px);-moz-transform:translateY(1px);-o-transform:translateY(1px);-ms-transform:translateY(1px);transform:translateY(1px)}.text-footer-container .text-footer-hsm-container .text-footer-select-03 .text-footer--btn-select-03 svg{font-size:1rem}.text-footer-container .text-footer-files-container{position:absolute;right:0;top:-55px;padding:5px;background-color:rgba(0,0,0,.4);border-radius:5px;display:flex;align-items:center;justify-content:space-between;z-index:1}.text-footer-container .text-footer-files-container.horizontal{right:-55px;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn{transition-duration:.3s;transition-property:opacity;opacity:.8;cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:10px;padding:3px;width:40px;height:40px;font-size:1rem;color:#fff}.text-footer-container .text-footer-files-container .files-btn:hover{opacity:1}.text-footer-container .text-footer-files-container .files-btn svg{color:#fff}.text-footer-container .text-footer-files-container .files-btn.images{background-color:#9575cd;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.images.margin-bottom{margin-right:unset;margin-bottom:5px}.text-footer-container .text-footer-files-container .files-btn.docs{background-color:#7986cb}.text-footer-container .text-footer-files-container .files-btn.system{background-color:#49a349;margin-left:5px}.text-footer-container .text-footer-files-container .files-btn.both{font-size:.95rem;background-color:#5555ec;flex-direction:column}.text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(1){transform:translateX(5px)}.text-footer-container .text-footer-files-container .files-btn.both svg:nth-child(2){transform:translateX(-5px)}.text-footer-container .text-footer-preview-container{width:100%;cursor:default;position:absolute;left:0;background-color:#f1f1f1;border:2px solid #ccc;border-bottom:unset;border-top-left-radius:2.5px;border-top-right-radius:2.5px}.text-footer-container .text-footer-preview-container.isDoc{top:-50px;width:100%;height:45px}.text-footer-container .text-footer-preview-container.isImg,.text-footer-container .text-footer-preview-container.isMultiple{top:-205px;width:100%;height:200px}.text-footer-container .text-footer-preview-container.isImg .text-footer-image-preview{height:170px}.text-footer-container .text-footer-preview-container.isError{top:-80px;width:100%;height:75px}.text-footer-container .text-footer-alt{margin-top:-12px;width:100%;padding:0 10px}.text-footer-container .text-footer-alt .text-footer-out-session{margin-top:12px}.text-footer-container .text-footer-alt .text-footer-sem-24h{font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#dd7f0c;margin-top:5px;position:absolute;right:0}.text-footer-container .text-footer-alt .sem-templates{margin-top:10px;font-size:.8rem;text-align:right;font-weight:600;letter-spacing:-.5px;color:#921e12}.text-footer-container .text-footer-alt .text-footer-templates{position:relative;width:100%}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection{width:100%;display:flex;align-items:center}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection h4{margin-right:5px}.text-footer-container .text-footer-alt .text-footer-templates .text-footer-group-selection .sm__select{flex:1}.vs__dropdown-menu{font-size:.85rem!important}.emoji-mart-anchor,.emoji-mart-emoji span{cursor:pointer!important}.emoji-mart{z-index:2!important}.emoji-mart-scroll{overflow-x:hidden}",
8820
8884
  map: undefined,
8821
8885
  media: undefined
8822
8886
  });
@@ -8827,7 +8891,7 @@ var __vue_inject_styles__$h = function __vue_inject_styles__(inject) {
8827
8891
  var __vue_scope_id__$h = undefined;
8828
8892
  /* module identifier */
8829
8893
 
8830
- var __vue_module_identifier__$h = "data-v-48659e85";
8894
+ var __vue_module_identifier__$h = "data-v-54b5cd94";
8831
8895
  /* functional template */
8832
8896
 
8833
8897
  var __vue_is_functional_template__$h = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.209",
3
+ "version": "0.0.210",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -176,9 +176,13 @@ export default {
176
176
  if(!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError()
177
177
  },
178
178
  isFileValid(type, fileName) {
179
+ if((type == "img" && !this.fileSettings.imagesExtensions) || (type == "doc" && !this.fileSettings.docsExtensions)) {
180
+ this.$toasted.global.defaultInfo({ msg: this.dictionary.sem_extensoes_parametrizadas })
181
+ this.hasAnyFile = false
182
+ return false
183
+ }
179
184
  const extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions
180
185
  const regex = new RegExp("("+extensions+")", "i")
181
-
182
186
  if(regex.test(fileName)) return true
183
187
  this.hasAnyFile = false
184
188
  this.showToastedValidFormats()
@@ -197,10 +201,15 @@ export default {
197
201
  this.fileSize = 0
198
202
  if(this.fileFormatError) this.file = []
199
203
  this.openFiles = false
200
- let filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event
204
+ const filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event
201
205
  this.file = filesAux.length ? filesAux : this.file
202
206
 
203
207
  if(!this.file.length) return
208
+ if(this.file.length > this.fileSettings.max) {
209
+ this.file = []
210
+ return this.$toasted.global.defaultInfo({ msg: `Limite de ${this.fileSettings.max} arquivos` })
211
+ }
212
+
204
213
  this.hasAnyFile = true
205
214
  this.fileSize = this.file.length
206
215
  if(!this.fileSettings.multiple) {
@@ -215,6 +224,8 @@ export default {
215
224
  }
216
225
  },
217
226
  returnFileType(file) {
227
+ if(!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions) return ""
228
+
218
229
  const imgRegex = new RegExp("\.("+this.fileSettings.imagesExtensions+")", "i")
219
230
  if(imgRegex.test(file.name)) return "img"
220
231
 
@@ -224,50 +235,64 @@ export default {
224
235
  return ""
225
236
  },
226
237
  multipleFileUpload() {
238
+ const hasImgExt = this.fileSettings.imagesExtensions ? true : false
239
+ const hasDocExt = this.fileSettings.docsExtensions ? true : false
240
+ if(!hasImgExt && !hasDocExt) {
241
+ this.file = []
242
+ this.fileSize = 0
243
+ return this.$toasted.global.defaultInfo({ msg: this.dictionary.sem_extensoes_parametrizadas })
244
+ }
227
245
  let waitForImageLoad = false
228
246
  this.file = Array.from(this.file)
229
247
  this.file.forEach(file => {
230
- const fileReader = new FileReader();
231
-
232
248
  const singleFileType = this.returnFileType(file)
233
249
  if(!singleFileType) file.invalid = true
234
250
  file.imgOrDoc = singleFileType ? singleFileType : ""
235
-
236
- if(file.imgOrDoc === "doc") this.isDoc = true
237
- if(file.imgOrDoc === "img") {
238
- waitForImageLoad = true
239
- fileReader.onload = () => file.src = fileReader.result
240
- fileReader.onloadend = () => this.emitFileVars(true)
241
- }
242
-
243
251
  if(this.isFileValid(file.imgOrDoc, file.name)) {
244
- if(file.imgOrDoc === "img") fileReader.readAsDataURL(file)
252
+ if(file.imgOrDoc == "img") {
253
+ const fileReader = new FileReader();
254
+ waitForImageLoad = true
255
+ fileReader.onload = () => file.src = fileReader.result
256
+ fileReader.onloadend = () => this.emitFileVars(true)
257
+ fileReader.readAsDataURL(file)
258
+ }
259
+ if(file.imgOrDoc === "doc") this.isDoc = true
245
260
  file.invalid = false
246
261
  this.fileFormatError = false
247
262
  }else{
248
263
  file.invalid = true
249
264
  this.fileFormatError = true
250
- this.validFileFormats = `Imgs: ${this.fileSettings.imagesExtensions.split("|").join(", ")} <br> Docs: ${this.fileSettings.docsExtensions.split("|").join(", ")} ${this.dictionary.msg_extensoes_aceitas}`
265
+ if(hasImgExt && !hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions.split("|").join(", ")}`
266
+ if(hasDocExt && hasImgExt) this.validFileFormats = `Documentos: ${this.fileSettings.docsExtensions.split("|").join(", ")}`
267
+ if(hasImgExt && hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions.split("|").join(", ")} - Documentos: ${this.fileSettings.docsExtensions.split("|").join(", ")}`
251
268
  }
252
269
  })
270
+
271
+ if(this.fileFormatError) {
272
+ this.file = []
273
+ this.fileSize = 0
274
+ }
253
275
 
254
276
  if(this.isDoc && !waitForImageLoad) this.emitFileVars()
255
277
  },
256
278
  singleFileUpload(type, fileName) {
257
- const fileReader = new FileReader()
258
- if(type === "img") {
259
- fileReader.onload = () => this.imagePreview = fileReader.result
260
- fileReader.onloadend = () => this.emitFileVars()
261
- }
262
-
263
279
  if(this.isFileValid(type, fileName)) {
264
- if(type === "img") fileReader.readAsDataURL(this.file)
280
+ const fileReader = new FileReader()
281
+ if(type === "img") {
282
+ fileReader.onload = () => this.imagePreview = fileReader.result
283
+ fileReader.onloadend = () => this.emitFileVars()
284
+ fileReader.readAsDataURL(this.file)
285
+ }
265
286
  if(type === "doc") this.isDoc = true
266
287
 
267
288
  this.fileFormatError = false
268
289
  }else {
269
290
  this.fileFormatError = true
270
- this.validFileFormats = `Imgs: ${this.fileSettings.imagesExtensions.split("|").join(", ")} <br> Docs: ${this.fileSettings.docsExtensions.split("|").join(", ")} ${this.dictionary.msg_extensoes_aceitas}`
291
+ const hasImgExt = this.fileSettings.imagesExtensions ? true : false
292
+ const hasDocExt = this.fileSettings.docsExtensions ? true : false
293
+ if(hasImgExt && !hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions}`
294
+ if(hasDocExt && hasImgExt) this.validFileFormats = `Documentos: ${this.fileSettings.docsExtensions}`
295
+ if(hasImgExt && hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions} - Documentos: ${this.fileSettings.docsExtensions}`
271
296
  }
272
297
 
273
298
  if(this.isDoc) this.emitFileVars()
@@ -9,12 +9,12 @@
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.name">
18
18
  <fa-icon :icon="icon(singleFile.imgOrDoc)" />
19
19
  {{ singleFile.name }}
20
20
  </p>
@@ -33,8 +33,11 @@
33
33
  <span class="pdf" v-else-if="isPdf(singleFile.type)">
34
34
  <fa-icon :icon="['fas', 'file-pdf']" />
35
35
  </span>
36
+ <span class="doc" v-else>
37
+ <fa-icon :icon="['fas', 'file-alt']" />
38
+ </span>
36
39
  </div>
37
- <span @click="deleteSpecificFile(singleFile.name, index)" :title="dictionary.msg_excluir_anexo" class="delete-file">
40
+ <span @click="deleteSpecificFile(singleFile.name, index)" v-tippy="{placement: 'left'}" :content="dictionary.msg_excluir_anexo" :title="dictionary.msg_excluir_anexo" class="delete-file">
38
41
  <fa-icon :icon="['fas', 'trash-alt']" />
39
42
  </span>
40
43
  </div>
@@ -145,9 +148,13 @@ export default {
145
148
  padding: 10px;
146
149
  }
147
150
  .text-footer-invalid-format h3 {
151
+ text-overflow: ellipsis;
152
+ overflow: hidden;
148
153
  font-weight: 500;
149
154
  }
150
155
  .text-footer-invalid-format h4 {
156
+ text-overflow: ellipsis;
157
+ overflow: hidden;
151
158
  font-size: .9rem;
152
159
  }
153
160
 
@@ -200,7 +207,8 @@ export default {
200
207
  margin-left:5px;
201
208
  }
202
209
  .file-title > svg {
203
- margin-right: 5px
210
+ margin-right: 5px;
211
+ color: #333;
204
212
  }
205
213
 
206
214
  .small-img {
@@ -215,17 +223,22 @@ export default {
215
223
  height: 40px;
216
224
  cursor: pointer;
217
225
  }
218
- .small-img .pdf {
226
+ .small-img .pdf, .small-img .doc {
219
227
  display: flex;
220
228
  justify-content: center;
221
229
  align-items: center;
222
230
  font-size: 30px;
231
+ }
232
+ .small-img .pdf {
223
233
  color: #E74C3C;
224
234
  }
225
- .small-img .pdf svg{
235
+ .small-img .doc {
236
+ color: #006bc9;
237
+ }
238
+ .small-img .pdf svg, .small-img .doc svg{
226
239
  z-index: 1;
227
240
  }
228
- .small-img .pdf::after {
241
+ .small-img .pdf::after, .small-img .doc::after {
229
242
  content: "";
230
243
  position: absolute;
231
244
  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){