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.
@@ -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,14 +3404,18 @@ 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
+ class: {
3409
+ 'red': singleFile.invalid
3410
+ },
3411
+ attrs: {
3412
+ "title": !singleFile.invalid ? singleFile.name : (_vm.dictionary.titulo_msg_formato_invalido ? _vm.dictionary.titulo_msg_formato_invalido : 'Arquivo invalido') + " - " + singleFile.name
3413
+ }
3405
3414
  }, [_c('fa-icon', {
3406
3415
  attrs: {
3407
3416
  "icon": _vm.icon(singleFile.imgOrDoc)
3408
3417
  }
3409
- }), _vm._v("\n " + _vm._s(singleFile.name) + "\n ")], 1), _vm._v(" "), singleFile.invalid ? _c('p', {
3410
- staticClass: "file-title red"
3411
- }, [_vm._v("\n " + _vm._s(_vm.dictionary.titulo_msg_formato_invalido ? _vm.dictionary.titulo_msg_formato_invalido : "Arquivo invalido") + "\n ")]) : _vm._e(), _vm._v(" "), _c('div', {
3418
+ }), _vm._v("\n " + _vm._s(!singleFile.invalid ? singleFile.name : (_vm.dictionary.titulo_msg_formato_invalido ? _vm.dictionary.titulo_msg_formato_invalido : "Arquivo invalido") + " - " + singleFile.name) + "\n ")], 1), _vm._v(" "), _c('div', {
3412
3419
  staticClass: "small-img"
3413
3420
  }, [singleFile.imgOrDoc === 'img' && !_vm.isPdf(singleFile.type) ? _c('span', {
3414
3421
  staticClass: "img-container"
@@ -3429,9 +3436,24 @@ var __vue_render__$m = function __vue_render__() {
3429
3436
  attrs: {
3430
3437
  "icon": ['fas', 'file-pdf']
3431
3438
  }
3432
- })], 1) : _vm._e()]), _vm._v(" "), _c('span', {
3439
+ })], 1) : _c('span', {
3440
+ staticClass: "doc"
3441
+ }, [_c('fa-icon', {
3442
+ attrs: {
3443
+ "icon": ['fas', 'file-alt']
3444
+ }
3445
+ })], 1)]), _vm._v(" "), _c('span', {
3446
+ directives: [{
3447
+ name: "tippy",
3448
+ rawName: "v-tippy",
3449
+ value: {
3450
+ placement: 'left'
3451
+ },
3452
+ expression: "{placement: 'left'}"
3453
+ }],
3433
3454
  staticClass: "delete-file",
3434
3455
  attrs: {
3456
+ "content": _vm.dictionary.msg_excluir_anexo,
3435
3457
  "title": _vm.dictionary.msg_excluir_anexo
3436
3458
  },
3437
3459
  on: {
@@ -3452,8 +3474,8 @@ var __vue_staticRenderFns__$m = [];
3452
3474
 
3453
3475
  var __vue_inject_styles__$m = function __vue_inject_styles__(inject) {
3454
3476
  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}",
3477
+ inject("data-v-131a11b5_0", {
3478
+ 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-right: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
3479
  map: undefined,
3458
3480
  media: undefined
3459
3481
  });
@@ -3464,7 +3486,7 @@ var __vue_inject_styles__$m = function __vue_inject_styles__(inject) {
3464
3486
  var __vue_scope_id__$m = undefined;
3465
3487
  /* module identifier */
3466
3488
 
3467
- var __vue_module_identifier__$m = "data-v-28d9ba6f";
3489
+ var __vue_module_identifier__$m = "data-v-131a11b5";
3468
3490
  /* functional template */
3469
3491
 
3470
3492
  var __vue_is_functional_template__$m = false;
@@ -3562,6 +3584,14 @@ var script$l = {
3562
3584
  if (!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError();
3563
3585
  },
3564
3586
  isFileValid: function isFileValid(type, fileName) {
3587
+ if (type == "img" && !this.fileSettings.imagesExtensions || type == "doc" && !this.fileSettings.docsExtensions) {
3588
+ this.$toasted.global.defaultInfo({
3589
+ msg: this.dictionary.sem_extensoes_parametrizadas
3590
+ });
3591
+ this.hasAnyFile = false;
3592
+ return false;
3593
+ }
3594
+
3565
3595
  var extensions = type === "img" ? this.fileSettings.imagesExtensions : this.fileSettings.docsExtensions;
3566
3596
  var regex = new RegExp("(" + extensions + ")", "i");
3567
3597
  if (regex.test(fileName)) return true;
@@ -3589,6 +3619,14 @@ var script$l = {
3589
3619
  var filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event;
3590
3620
  this.file = filesAux.length ? filesAux : this.file;
3591
3621
  if (!this.file.length) return;
3622
+
3623
+ if (this.file.length > this.fileSettings.max) {
3624
+ this.file = [];
3625
+ return this.$toasted.global.defaultInfo({
3626
+ msg: "Limite de ".concat(this.fileSettings.max, " arquivos")
3627
+ });
3628
+ }
3629
+
3592
3630
  this.hasAnyFile = true;
3593
3631
  this.fileSize = this.file.length;
3594
3632
 
@@ -3604,6 +3642,7 @@ var script$l = {
3604
3642
  }
3605
3643
  },
3606
3644
  returnFileType: function returnFileType(file) {
3645
+ if (!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions) return "";
3607
3646
  var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
3608
3647
  if (imgRegex.test(file.name)) return "img";
3609
3648
  var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
@@ -3613,63 +3652,89 @@ var script$l = {
3613
3652
  multipleFileUpload: function multipleFileUpload() {
3614
3653
  var _this = this;
3615
3654
 
3655
+ var hasImgExt = this.fileSettings.imagesExtensions ? true : false;
3656
+ var hasDocExt = this.fileSettings.docsExtensions ? true : false;
3657
+
3658
+ if (!hasImgExt && !hasDocExt) {
3659
+ this.file = [];
3660
+ this.fileSize = 0;
3661
+ return this.$toasted.global.defaultInfo({
3662
+ msg: this.dictionary.sem_extensoes_parametrizadas
3663
+ });
3664
+ }
3665
+
3616
3666
  var waitForImageLoad = false;
3667
+ var hasAnyInvalidFile = false;
3617
3668
  this.file = Array.from(this.file);
3618
3669
  this.file.forEach(function (file) {
3619
- var fileReader = new FileReader();
3620
-
3621
3670
  var singleFileType = _this.returnFileType(file);
3622
3671
 
3623
3672
  if (!singleFileType) file.invalid = true;
3624
3673
  file.imgOrDoc = singleFileType ? singleFileType : "";
3625
- if (file.imgOrDoc === "doc") _this.isDoc = true;
3626
3674
 
3627
- if (file.imgOrDoc === "img") {
3628
- waitForImageLoad = true;
3675
+ if (_this.isFileValid(file.imgOrDoc, file.name)) {
3676
+ if (file.imgOrDoc == "img") {
3677
+ var fileReader = new FileReader();
3678
+ waitForImageLoad = true;
3629
3679
 
3630
- fileReader.onload = function () {
3631
- return file.src = fileReader.result;
3632
- };
3680
+ fileReader.onload = function () {
3681
+ return file.src = fileReader.result;
3682
+ };
3633
3683
 
3634
- fileReader.onloadend = function () {
3635
- return _this.emitFileVars(true);
3636
- };
3637
- }
3684
+ fileReader.onloadend = function () {
3685
+ return _this.emitFileVars(true);
3686
+ };
3638
3687
 
3639
- if (_this.isFileValid(file.imgOrDoc, file.name)) {
3640
- if (file.imgOrDoc === "img") fileReader.readAsDataURL(file);
3688
+ fileReader.readAsDataURL(file);
3689
+ }
3690
+
3691
+ if (file.imgOrDoc === "doc") _this.isDoc = true;
3641
3692
  file.invalid = false;
3642
- _this.fileFormatError = false;
3693
+ _this.fileFormatError = !hasAnyInvalidFile ? false : true;
3643
3694
  } else {
3695
+ hasAnyInvalidFile = true;
3644
3696
  file.invalid = true;
3645
3697
  _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);
3698
+ if (hasImgExt && !hasDocExt) _this.validFileFormats = "Imagens: ".concat(_this.fileSettings.imagesExtensions.split("|").join(", "));
3699
+ if (hasDocExt && hasImgExt) _this.validFileFormats = "Documentos: ".concat(_this.fileSettings.docsExtensions.split("|").join(", "));
3700
+ if (hasImgExt && hasDocExt) _this.validFileFormats = "Imagens: ".concat(_this.fileSettings.imagesExtensions.split("|").join(", "), " - Documentos: ").concat(_this.fileSettings.docsExtensions.split("|").join(", "));
3647
3701
  }
3648
3702
  });
3703
+
3704
+ if (this.fileFormatError) {
3705
+ this.file = [];
3706
+ this.fileSize = 0;
3707
+ }
3708
+
3649
3709
  if (this.isDoc && !waitForImageLoad) this.emitFileVars();
3650
3710
  },
3651
3711
  singleFileUpload: function singleFileUpload(type, fileName) {
3652
3712
  var _this2 = this;
3653
3713
 
3654
- var fileReader = new FileReader();
3714
+ if (this.isFileValid(type, fileName)) {
3715
+ var fileReader = new FileReader();
3655
3716
 
3656
- if (type === "img") {
3657
- fileReader.onload = function () {
3658
- return _this2.imagePreview = fileReader.result;
3659
- };
3717
+ if (type === "img") {
3718
+ fileReader.onload = function () {
3719
+ return _this2.imagePreview = fileReader.result;
3720
+ };
3660
3721
 
3661
- fileReader.onloadend = function () {
3662
- return _this2.emitFileVars();
3663
- };
3664
- }
3722
+ fileReader.onloadend = function () {
3723
+ return _this2.emitFileVars();
3724
+ };
3725
+
3726
+ fileReader.readAsDataURL(this.file);
3727
+ }
3665
3728
 
3666
- if (this.isFileValid(type, fileName)) {
3667
- if (type === "img") fileReader.readAsDataURL(this.file);
3668
3729
  if (type === "doc") this.isDoc = true;
3669
3730
  this.fileFormatError = false;
3670
3731
  } else {
3671
3732
  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);
3733
+ var hasImgExt = this.fileSettings.imagesExtensions ? true : false;
3734
+ var hasDocExt = this.fileSettings.docsExtensions ? true : false;
3735
+ if (hasImgExt && !hasDocExt) this.validFileFormats = "Imagens: ".concat(this.fileSettings.imagesExtensions);
3736
+ if (hasDocExt && hasImgExt) this.validFileFormats = "Documentos: ".concat(this.fileSettings.docsExtensions);
3737
+ if (hasImgExt && hasDocExt) this.validFileFormats = "Imagens: ".concat(this.fileSettings.imagesExtensions, " - Documentos: ").concat(this.fileSettings.docsExtensions);
3673
3738
  }
3674
3739
 
3675
3740
  if (this.isDoc) this.emitFileVars();
@@ -3893,7 +3958,7 @@ var __vue_staticRenderFns__$l = [];
3893
3958
 
3894
3959
  var __vue_inject_styles__$l = function __vue_inject_styles__(inject) {
3895
3960
  if (!inject) return;
3896
- inject("data-v-d44e0484_0", {
3961
+ inject("data-v-402ae30b_0", {
3897
3962
  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
3963
  map: undefined,
3899
3964
  media: undefined
@@ -3905,7 +3970,7 @@ var __vue_inject_styles__$l = function __vue_inject_styles__(inject) {
3905
3970
  var __vue_scope_id__$l = undefined;
3906
3971
  /* module identifier */
3907
3972
 
3908
- var __vue_module_identifier__$l = "data-v-d44e0484";
3973
+ var __vue_module_identifier__$l = "data-v-402ae30b";
3909
3974
  /* functional template */
3910
3975
 
3911
3976
  var __vue_is_functional_template__$l = false;
@@ -7974,7 +8039,7 @@ var script$i = {
7974
8039
  this.loadingReq = true;
7975
8040
  this.getStandardMessages(cod, this.token_cliente).then(function (data) {
7976
8041
  _this.loadingReq = false;
7977
- if (data.msg_ret) return _this.$toasted.global.emConstrucao({
8042
+ if (data.msg_ret) return _this.$toasted.global.defaultInfo({
7978
8043
  msg: data.msg_ret
7979
8044
  });
7980
8045
  if (data) return _this.showFormattedMessage(data, selectionIndex);
@@ -7998,7 +8063,7 @@ var script$i = {
7998
8063
  try {
7999
8064
  var success = false;
8000
8065
  if (Array.isArray(messageData)) success = true;
8001
- if (!success && selectionIndex != 4) this.$toasted.global.emConstrucao({
8066
+ if (!success && selectionIndex != 4) this.$toasted.global.defaultInfo({
8002
8067
  msg: messageData ? messageData.msg : "Nao foi possível obter mensagens"
8003
8068
  });
8004
8069
 
@@ -8023,7 +8088,7 @@ var script$i = {
8023
8088
  case 3:
8024
8089
  if (!success) {
8025
8090
  this.formatted_messages_3.push(messageData);
8026
- this.$toasted.global.emConstrucao({
8091
+ this.$toasted.global.defaultInfo({
8027
8092
  msg: this.dictionary.msg_erro_sem_msg_formatada
8028
8093
  });
8029
8094
  this.$emit("close-blocker-standard-message");
@@ -8183,7 +8248,7 @@ var __vue_staticRenderFns__$i = [];
8183
8248
 
8184
8249
  var __vue_inject_styles__$i = function __vue_inject_styles__(inject) {
8185
8250
  if (!inject) return;
8186
- inject("data-v-4e81952e_0", {
8251
+ inject("data-v-324084df_0", {
8187
8252
  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
8253
  map: undefined,
8189
8254
  media: undefined
@@ -8195,7 +8260,7 @@ var __vue_inject_styles__$i = function __vue_inject_styles__(inject) {
8195
8260
  var __vue_scope_id__$i = undefined;
8196
8261
  /* module identifier */
8197
8262
 
8198
- var __vue_module_identifier__$i = "data-v-4e81952e";
8263
+ var __vue_module_identifier__$i = "data-v-324084df";
8199
8264
  /* functional template */
8200
8265
 
8201
8266
  var __vue_is_functional_template__$i = false;
@@ -8285,7 +8350,8 @@ var script$h = {
8285
8350
  docsExtensions: "",
8286
8351
  imagesExtensions: "",
8287
8352
  multiple: false,
8288
- systemButton: false
8353
+ systemButton: false,
8354
+ max: 3
8289
8355
  };
8290
8356
  },
8291
8357
  required: false
@@ -8354,7 +8420,7 @@ var script$h = {
8354
8420
  if (event.data == '' && this.showStandardMessages) {
8355
8421
  this.closeBlockerStandardMessage();
8356
8422
  this.toggleStandardMessages();
8357
- this.$toasted.global.emConstrucao({
8423
+ this.$toasted.global.defaultInfo({
8358
8424
  msg: this.dictionary.msg_erro_sem_msg_formatada
8359
8425
  });
8360
8426
  } else if (typeof event.data === "string" && this.showStandardMessages) {
@@ -8418,7 +8484,7 @@ var script$h = {
8418
8484
  if ((!this.message || !this.message.trim()) && !this.hasAnyFile && !this.audioFile) return false;
8419
8485
  if (this.textareaSettings.disabled) return false;
8420
8486
 
8421
- if (this.fileFormatError) {
8487
+ if (this.fileFormatError && this.hasAnyFile) {
8422
8488
  if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
8423
8489
  msg: this.dictionary.msg_formato_invalido
8424
8490
  });
@@ -8535,11 +8601,12 @@ var script$h = {
8535
8601
  this.audioSource = "";
8536
8602
  },
8537
8603
  returnFileType: function returnFileType(file, stopAlert) {
8604
+ if (!this.fileSettings.imagesExtensions && !this.fileSettings.docsExtensions) return false;
8538
8605
  var imgRegex = new RegExp("\.(" + this.fileSettings.imagesExtensions + ")", "i");
8539
8606
  if (imgRegex.test(file.name)) return "img";
8540
8607
  var docRegex = new RegExp("\.(" + this.fileSettings.docsExtensions + ")", "i");
8541
8608
  if (docRegex.test(file.name)) return "doc";
8542
- if (!stopAlert) return;
8609
+ if (!stopAlert) return false;
8543
8610
  if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError({
8544
8611
  msg: this.dictionary.msg_formato_invalido
8545
8612
  });
@@ -8815,8 +8882,8 @@ var __vue_staticRenderFns__$h = [];
8815
8882
 
8816
8883
  var __vue_inject_styles__$h = function __vue_inject_styles__(inject) {
8817
8884
  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}",
8885
+ inject("data-v-7910091a_0", {
8886
+ 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
8887
  map: undefined,
8821
8888
  media: undefined
8822
8889
  });
@@ -8827,7 +8894,7 @@ var __vue_inject_styles__$h = function __vue_inject_styles__(inject) {
8827
8894
  var __vue_scope_id__$h = undefined;
8828
8895
  /* module identifier */
8829
8896
 
8830
- var __vue_module_identifier__$h = "data-v-48659e85";
8897
+ var __vue_module_identifier__$h = "data-v-7910091a";
8831
8898
  /* functional template */
8832
8899
 
8833
8900
  var __vue_is_functional_template__$h = false;
@@ -9655,6 +9722,7 @@ var __vue_component__$k = __vue_component__$j;var textoLongo = {
9655
9722
  case "audio/mpga":
9656
9723
  case "mp3":
9657
9724
  case "audio/mp3":
9725
+ case "aac":
9658
9726
  tipoDoc = type;
9659
9727
  docAnexo = "".concat(dominio, "/callcenter/docs.php?mku=").concat(mku);
9660
9728
  nomeArquivo = name;
@@ -9664,6 +9732,7 @@ var __vue_component__$k = __vue_component__$j;var textoLongo = {
9664
9732
  case "video/mp4":
9665
9733
  case "video":
9666
9734
  case "mp4":
9735
+ case "m4v":
9667
9736
  tipoDoc = type;
9668
9737
  docAnexo = "".concat(dominio, "/callcenter/docs.php?mku=").concat(mku);
9669
9738
  nomeArquivo = name;
@@ -11077,8 +11146,8 @@ var __vue_staticRenderFns__$6 = [];
11077
11146
 
11078
11147
  var __vue_inject_styles__$6 = function __vue_inject_styles__(inject) {
11079
11148
  if (!inject) return;
11080
- inject("data-v-1a4340aa_0", {
11081
- source: ".fade-enter-active[data-v-1a4340aa],.fade-leave-active[data-v-1a4340aa]{transition:opacity .5s}.fade-enter[data-v-1a4340aa],.fade-leave-to[data-v-1a4340aa]{opacity:0}.mensagem-div-anexo[data-v-1a4340aa]{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;overflow:hidden}.anexo-container[data-v-1a4340aa]{width:100%;margin-top:5px}.anexo-container .arquivo-erro[data-v-1a4340aa],.anexo-container a[data-v-1a4340aa]{padding:10px 15px 15px 15px;display:flex;justify-content:center;align-items:center}.anexo-container .arquivo-erro[data-v-1a4340aa],.anexo-container p[data-v-1a4340aa]{margin:0;margin-left:15px;font-size:.9rem}.anexo-container svg[data-v-1a4340aa]{font-size:2rem}.anexo-container audio[data-v-1a4340aa]{outline:0;width:100%}.anexo-container video[data-v-1a4340aa]{width:100%;max-width:350px;cursor:pointer}.anexos-links-container[data-v-1a4340aa]{width:100%;display:flex;justify-content:center;align-items:center}.anexos-links-container a[data-v-1a4340aa]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-right:5px;font-weight:550;color:inherit;text-decoration:none}.anexos-links-container svg[data-v-1a4340aa]{cursor:pointer}.mensagem-div-anexo img[data-v-1a4340aa]{cursor:pointer;margin:10px 0;min-width:35px;width:100%;max-width:250px}.anexo-transition[data-v-1a4340aa]{width:100%;height:100%}.anexo-mensagem[data-v-1a4340aa]{display:flex;justify-content:center;align-items:center;flex-direction:column}.alert-danger[data-v-1a4340aa]{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert[data-v-1a4340aa]{position:relative;padding:.65rem 1.2rem;margin:5px 0;border:1px solid transparent;border-radius:.25rem;text-align:center}.alert svg[data-v-1a4340aa]{font-size:1.025em;margin-right:2px}.pdf[data-v-1a4340aa]{color:#e74c3c}.doc[data-v-1a4340aa]{color:#006bc9}",
11149
+ inject("data-v-d859545a_0", {
11150
+ source: ".fade-enter-active[data-v-d859545a],.fade-leave-active[data-v-d859545a]{transition:opacity .5s}.fade-enter[data-v-d859545a],.fade-leave-to[data-v-d859545a]{opacity:0}.mensagem-div-anexo[data-v-d859545a]{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;overflow:hidden}.anexo-container[data-v-d859545a]{width:100%;margin-top:5px;overflow:hidden}.anexo-container .arquivo-erro[data-v-d859545a],.anexo-container a[data-v-d859545a]{padding:10px 15px 15px 15px;display:flex;justify-content:center;align-items:center}.anexo-container p[data-v-d859545a]{text-overflow:ellipsis;overflow:hidden}.anexo-container .arquivo-erro[data-v-d859545a],.anexo-container p[data-v-d859545a]{margin:0;margin-left:15px;font-size:.9rem}.anexo-container svg[data-v-d859545a]{font-size:2rem}.anexo-container audio[data-v-d859545a]{outline:0;width:100%}.anexo-container video[data-v-d859545a]{width:100%;max-width:350px;cursor:pointer}.anexos-links-container[data-v-d859545a]{width:100%;display:flex;justify-content:center;align-items:center}.anexos-links-container a[data-v-d859545a]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-right:5px;font-weight:550;color:inherit;text-decoration:none}.anexos-links-container svg[data-v-d859545a]{cursor:pointer}.mensagem-div-anexo img[data-v-d859545a]{cursor:pointer;margin:10px 0;min-width:35px;width:100%;max-width:250px}.anexo-transition[data-v-d859545a]{width:100%;height:100%}.anexo-mensagem[data-v-d859545a]{display:flex;justify-content:center;align-items:center;flex-direction:column}.alert-danger[data-v-d859545a]{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert[data-v-d859545a]{position:relative;padding:.65rem 1.2rem;margin:5px 0;border:1px solid transparent;border-radius:.25rem;text-align:center}.alert svg[data-v-d859545a]{font-size:1.025em;margin-right:2px}.pdf[data-v-d859545a]{color:#e74c3c}.doc[data-v-d859545a]{color:#006bc9}",
11082
11151
  map: undefined,
11083
11152
  media: undefined
11084
11153
  });
@@ -11086,10 +11155,10 @@ var __vue_inject_styles__$6 = function __vue_inject_styles__(inject) {
11086
11155
  /* scoped */
11087
11156
 
11088
11157
 
11089
- var __vue_scope_id__$6 = "data-v-1a4340aa";
11158
+ var __vue_scope_id__$6 = "data-v-d859545a";
11090
11159
  /* module identifier */
11091
11160
 
11092
- var __vue_module_identifier__$6 = "data-v-1a4340aa";
11161
+ var __vue_module_identifier__$6 = "data-v-d859545a";
11093
11162
  /* functional template */
11094
11163
 
11095
11164
  var __vue_is_functional_template__$6 = 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.212",
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,66 @@ 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
246
+ let hasAnyInvalidFile = false
228
247
  this.file = Array.from(this.file)
229
248
  this.file.forEach(file => {
230
- const fileReader = new FileReader();
231
-
232
249
  const singleFileType = this.returnFileType(file)
233
250
  if(!singleFileType) file.invalid = true
234
251
  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
252
  if(this.isFileValid(file.imgOrDoc, file.name)) {
244
- if(file.imgOrDoc === "img") fileReader.readAsDataURL(file)
253
+ if(file.imgOrDoc == "img") {
254
+ const fileReader = new FileReader();
255
+ waitForImageLoad = true
256
+ fileReader.onload = () => file.src = fileReader.result
257
+ fileReader.onloadend = () => this.emitFileVars(true)
258
+ fileReader.readAsDataURL(file)
259
+ }
260
+ if(file.imgOrDoc === "doc") this.isDoc = true
245
261
  file.invalid = false
246
- this.fileFormatError = false
262
+ this.fileFormatError = !hasAnyInvalidFile ? false : true
247
263
  }else{
264
+ hasAnyInvalidFile = true
248
265
  file.invalid = true
249
266
  this.fileFormatError = true
250
- this.validFileFormats = `Imgs: ${this.fileSettings.imagesExtensions.split("|").join(", ")} <br> Docs: ${this.fileSettings.docsExtensions.split("|").join(", ")} ${this.dictionary.msg_extensoes_aceitas}`
267
+ if(hasImgExt && !hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions.split("|").join(", ")}`
268
+ if(hasDocExt && hasImgExt) this.validFileFormats = `Documentos: ${this.fileSettings.docsExtensions.split("|").join(", ")}`
269
+ if(hasImgExt && hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions.split("|").join(", ")} - Documentos: ${this.fileSettings.docsExtensions.split("|").join(", ")}`
251
270
  }
252
271
  })
253
272
 
273
+ if(this.fileFormatError) {
274
+ this.file = []
275
+ this.fileSize = 0
276
+ }
277
+
254
278
  if(this.isDoc && !waitForImageLoad) this.emitFileVars()
255
279
  },
256
280
  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
281
  if(this.isFileValid(type, fileName)) {
264
- if(type === "img") fileReader.readAsDataURL(this.file)
282
+ const fileReader = new FileReader()
283
+ if(type === "img") {
284
+ fileReader.onload = () => this.imagePreview = fileReader.result
285
+ fileReader.onloadend = () => this.emitFileVars()
286
+ fileReader.readAsDataURL(this.file)
287
+ }
265
288
  if(type === "doc") this.isDoc = true
266
289
 
267
290
  this.fileFormatError = false
268
291
  }else {
269
292
  this.fileFormatError = true
270
- this.validFileFormats = `Imgs: ${this.fileSettings.imagesExtensions.split("|").join(", ")} <br> Docs: ${this.fileSettings.docsExtensions.split("|").join(", ")} ${this.dictionary.msg_extensoes_aceitas}`
293
+ const hasImgExt = this.fileSettings.imagesExtensions ? true : false
294
+ const hasDocExt = this.fileSettings.docsExtensions ? true : false
295
+ if(hasImgExt && !hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions}`
296
+ if(hasDocExt && hasImgExt) this.validFileFormats = `Documentos: ${this.fileSettings.docsExtensions}`
297
+ if(hasImgExt && hasDocExt) this.validFileFormats = `Imagens: ${this.fileSettings.imagesExtensions} - Documentos: ${this.fileSettings.docsExtensions}`
271
298
  }
272
299
 
273
300
  if(this.isDoc) this.emitFileVars()