vue-intergrall-plugins 0.0.158 → 0.0.161

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.
@@ -3266,7 +3266,7 @@ var script$k = {
3266
3266
  required: true
3267
3267
  },
3268
3268
  file: {
3269
- type: File,
3269
+ type: Array,
3270
3270
  required: true
3271
3271
  },
3272
3272
  fileFormatError: {
@@ -3400,7 +3400,7 @@ var __vue_staticRenderFns__$k = [];
3400
3400
 
3401
3401
  var __vue_inject_styles__$k = function __vue_inject_styles__(inject) {
3402
3402
  if (!inject) return;
3403
- inject("data-v-7c17339e_0", {
3403
+ inject("data-v-55cbc293_0", {
3404
3404
  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::-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;border-radius:50%;background-color:#fff;min-width:1rem;min-height:1rem;cursor:pointer}.delete-file>svg{font-size:1rem;color:#e74c3c}",
3405
3405
  map: undefined,
3406
3406
  media: undefined
@@ -3412,7 +3412,7 @@ var __vue_inject_styles__$k = function __vue_inject_styles__(inject) {
3412
3412
  var __vue_scope_id__$k = undefined;
3413
3413
  /* module identifier */
3414
3414
 
3415
- var __vue_module_identifier__$k = "data-v-7c17339e";
3415
+ var __vue_module_identifier__$k = "data-v-55cbc293";
3416
3416
  /* functional template */
3417
3417
 
3418
3418
  var __vue_is_functional_template__$k = false;
@@ -3455,6 +3455,7 @@ var script$j = {
3455
3455
  data: function data() {
3456
3456
  return {
3457
3457
  file: [],
3458
+ fileSize: 0,
3458
3459
  openFiles: false,
3459
3460
  showFilePreview: false,
3460
3461
  imagePreview: "",
@@ -3487,9 +3488,10 @@ var script$j = {
3487
3488
  this.openFiles = !this.openFiles;
3488
3489
  },
3489
3490
  openSelectFileHandler: function openSelectFileHandler(type) {
3490
- if (type == "system") {
3491
- this.$emit("open-file-system", true);
3492
- return false;
3491
+ if (type == "system") return this.$emit("open-file-system");
3492
+
3493
+ if (this.fileSettings.multiple) {
3494
+ type = 'both';
3493
3495
  }
3494
3496
 
3495
3497
  var fileInput = document.querySelector("#".concat(type, "-").concat(this.textId));
@@ -3518,12 +3520,14 @@ var script$j = {
3518
3520
  },
3519
3521
  fileUpload: function fileUpload(event, type, externalCall) {
3520
3522
  try {
3523
+ this.fileSize = 0;
3521
3524
  if (this.fileFormatError) this.file = [];
3522
3525
  this.openFiles = false;
3523
3526
  var filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event;
3524
3527
  this.file = filesAux.length ? filesAux : this.file;
3525
3528
  if (!this.file.length) return;
3526
3529
  this.hasAnyFile = true;
3530
+ this.fileSize = this.file.length;
3527
3531
 
3528
3532
  if (!this.fileSettings.multiple) {
3529
3533
  this.file = this.file[0];
@@ -3673,13 +3677,13 @@ var __vue_render__$j = function __vue_render__() {
3673
3677
  attrs: {
3674
3678
  "name": "fade"
3675
3679
  }
3676
- }, [_vm.file.length ? _c('span', {
3680
+ }, [_vm.fileSize > 0 ? _c('span', {
3677
3681
  staticClass: "files-counter",
3678
3682
  attrs: {
3679
3683
  "title": _vm.dictionary.msg_abrir_anexos
3680
3684
  },
3681
3685
  domProps: {
3682
- "textContent": _vm._s(_vm.file.length)
3686
+ "textContent": _vm._s(_vm.fileSize)
3683
3687
  },
3684
3688
  on: {
3685
3689
  "click": function click($event) {
@@ -3802,7 +3806,7 @@ var __vue_staticRenderFns__$j = [];
3802
3806
 
3803
3807
  var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
3804
3808
  if (!inject) return;
3805
- inject("data-v-d44243ce_0", {
3809
+ inject("data-v-6af671cf_0", {
3806
3810
  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}",
3807
3811
  map: undefined,
3808
3812
  media: undefined
@@ -3814,7 +3818,7 @@ var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
3814
3818
  var __vue_scope_id__$j = undefined;
3815
3819
  /* module identifier */
3816
3820
 
3817
- var __vue_module_identifier__$j = "data-v-d44243ce";
3821
+ var __vue_module_identifier__$j = "data-v-6af671cf";
3818
3822
  /* functional template */
3819
3823
 
3820
3824
  var __vue_is_functional_template__$j = false;
@@ -7833,7 +7837,8 @@ var script$g = {
7833
7837
  formatted_messages_2: [],
7834
7838
  key_2: "",
7835
7839
  formatted_messages_3: [],
7836
- key_3: ""
7840
+ key_3: "",
7841
+ loadingReq: false
7837
7842
  };
7838
7843
  },
7839
7844
  mounted: function mounted() {
@@ -7849,12 +7854,34 @@ var script$g = {
7849
7854
  return popper.destroy();
7850
7855
  };
7851
7856
  },
7857
+ inputSelectKey1: function inputSelectKey1() {
7858
+ if (!this.key_1) {
7859
+ if (this.formatted_messages_2.length) this.formatted_messages_2 = [];
7860
+ if (this.key_2) this.key_2 = "";
7861
+ return;
7862
+ }
7863
+
7864
+ this.receiveValueFormattedMessage(this.key_1, 2);
7865
+ },
7866
+ inputSelectKey2: function inputSelectKey2() {
7867
+ if (!this.key_2) {
7868
+ if (this.formatted_messages_3.length) this.formatted_messages_3 = [];
7869
+ if (this.key_3) this.key_3 = "";
7870
+ return;
7871
+ }
7872
+
7873
+ if (this.formatted_messages_3.length) this.formatted_messages_3 = [];
7874
+ if (this.key_3) this.key_3 = "";
7875
+ this.receiveValueFormattedMessage("T/".concat(this.key_2), 3);
7876
+ },
7852
7877
  receiveValueFormattedMessage: function receiveValueFormattedMessage(cod, selectionIndex) {
7853
7878
  var _this = this;
7854
7879
 
7855
7880
  try {
7856
7881
  if (!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ");
7882
+ this.loadingReq = true;
7857
7883
  this.getStandardMessages(cod, this.token_cliente).then(function (data) {
7884
+ _this.loadingReq = false;
7858
7885
  if (data && typeof data == 'string') return _this.$toasted.global.emConstrucao({
7859
7886
  msg: data
7860
7887
  });
@@ -7862,9 +7889,11 @@ var script$g = {
7862
7889
 
7863
7890
  _this.$toasted.global.defaultError();
7864
7891
  }).catch(function (e) {
7892
+ _this.loadingReq = false;
7865
7893
  console.error("Error in getStandardMessages: ", e);
7866
7894
  });
7867
7895
  } catch (e) {
7896
+ this.loadingReq = false;
7868
7897
  console.error("Error in receiveValueFormattedMessage: ", e);
7869
7898
  }
7870
7899
  },
@@ -7887,7 +7916,7 @@ var script$g = {
7887
7916
  if (this.formatted_messages_2.length == 1) {
7888
7917
  if (this.formatted_messages_2[0].cod) {
7889
7918
  this.key_2 = this.formatted_messages_2[0].cod;
7890
- this.receiveValueFormattedMessage(this.key_2, 3);
7919
+ this.receiveValueFormattedMessage("T/".concat(this.key_2), 3);
7891
7920
  }
7892
7921
  }
7893
7922
  }
@@ -7988,9 +8017,7 @@ var __vue_render__$g = function __vue_render__() {
7988
8017
  }
7989
8018
  },
7990
8019
  on: {
7991
- "input": function input($event) {
7992
- _vm.key_1 ? _vm.receiveValueFormattedMessage(_vm.key_1, 2) : false;
7993
- }
8020
+ "input": _vm.inputSelectKey1
7994
8021
  },
7995
8022
  model: {
7996
8023
  value: _vm.key_1,
@@ -8004,7 +8031,12 @@ var __vue_render__$g = function __vue_render__() {
8004
8031
  "slot": "no-options"
8005
8032
  },
8006
8033
  slot: "no-options"
8007
- }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm.formatted_messages_2.length && _vm.key_1 ? _c('v-select', {
8034
+ }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm._ssrNode("<div class=\"transition-selects\">", "</div>", [_c('transition', {
8035
+ attrs: {
8036
+ "name": "fade",
8037
+ "mode": "out-in"
8038
+ }
8039
+ }, [_vm.formatted_messages_2.length && _vm.key_1 ? _c('div', [_c('v-select', {
8008
8040
  staticClass: "text-footer-v-select",
8009
8041
  style: "background-color: " + _vm.backgroundColor,
8010
8042
  attrs: {
@@ -8017,9 +8049,7 @@ var __vue_render__$g = function __vue_render__() {
8017
8049
  }
8018
8050
  },
8019
8051
  on: {
8020
- "input": function input($event) {
8021
- return _vm.receiveValueFormattedMessage(_vm.key_2, 3);
8022
- }
8052
+ "input": _vm.inputSelectKey2
8023
8053
  },
8024
8054
  model: {
8025
8055
  value: _vm.key_2,
@@ -8033,7 +8063,16 @@ var __vue_render__$g = function __vue_render__() {
8033
8063
  "slot": "no-options"
8034
8064
  },
8035
8065
  slot: "no-options"
8036
- }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]) : _vm._e(), _vm._ssrNode(" "), _vm.formatted_messages_3.length && _vm.key_2 ? _vm._ssrNode("<div class=\"text-footer-select-03\">", "</div>", [_c('v-select', {
8066
+ }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])])], 1) : _vm.key_1 && _vm.loadingReq ? _c('div', {
8067
+ staticClass: "loader-select"
8068
+ }, [_c('VueLoader')], 1) : _vm._e()]), _vm._ssrNode(" "), _c('transition', {
8069
+ attrs: {
8070
+ "name": "fade",
8071
+ "mode": "out-in"
8072
+ }
8073
+ }, [_vm.formatted_messages_3.length && _vm.key_2 ? _c('div', {
8074
+ staticClass: "text-footer-select-03"
8075
+ }, [_c('v-select', {
8037
8076
  staticClass: "text-footer-v-select",
8038
8077
  style: "background-color: " + _vm.backgroundColor,
8039
8078
  attrs: {
@@ -8060,40 +8099,66 @@ var __vue_render__$g = function __vue_render__() {
8060
8099
  "slot": "no-options"
8061
8100
  },
8062
8101
  slot: "no-options"
8063
- }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._ssrNode(" "), _vm.key_3.cod ? [_vm.messageType == 1 ? _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_btn_preencher_msg_formatada) + " class=\"text-footer--btn-select-03\">", "</span>", [_c('fa-icon', {
8102
+ }, [_vm._v(" " + _vm._s(_vm.dictionary.msg_sem_resultados) + " ")])]), _vm._v(" "), _vm.key_3.cod ? [_vm.messageType == 1 ? _c('span', {
8103
+ staticClass: "text-footer--btn-select-03",
8104
+ attrs: {
8105
+ "title": _vm.dictionary.title_btn_preencher_msg_formatada
8106
+ },
8107
+ on: {
8108
+ "click": function click($event) {
8109
+ return _vm.insertFormattedMessage(_vm.key_3);
8110
+ }
8111
+ }
8112
+ }, [_c('fa-icon', {
8064
8113
  attrs: {
8065
8114
  "icon": ['fas', 'level-up-alt']
8066
8115
  }
8067
- })], 1) : _vm.messageType == 2 ? _vm._ssrNode("<span" + _vm._ssrAttr("title", _vm.dictionary.title_btn_abrir_msg_tipo_2) + " class=\"text-footer--btn-select-03\">", "</span>", [_c('fa-icon', {
8116
+ })], 1) : _vm.messageType == 2 ? _c('span', {
8117
+ staticClass: "text-footer--btn-select-03",
8118
+ attrs: {
8119
+ "title": _vm.dictionary.title_btn_abrir_msg_tipo_2
8120
+ },
8121
+ on: {
8122
+ "click": function click($event) {
8123
+ return _vm.openFormattedMsgType2(_vm.key_3);
8124
+ }
8125
+ }
8126
+ }, [_c('fa-icon', {
8068
8127
  attrs: {
8069
8128
  "icon": ['fas', 'file-alt']
8070
8129
  }
8071
- })], 1) : _vm._e()] : _vm._e()], 2) : _vm._e()], 2);
8130
+ })], 1) : _vm._e()] : _vm._e()], 2) : _vm.key_2 && _vm.loadingReq ? _c('div', {
8131
+ staticClass: "loader-select"
8132
+ }, [_c('VueLoader')], 1) : _vm._e()])], 2)], 2);
8072
8133
  };
8073
8134
 
8074
8135
  var __vue_staticRenderFns__$g = [];
8075
8136
  /* style */
8076
8137
 
8077
- var __vue_inject_styles__$g = undefined;
8138
+ var __vue_inject_styles__$g = function __vue_inject_styles__(inject) {
8139
+ if (!inject) return;
8140
+ inject("data-v-9fe38344_0", {
8141
+ 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}",
8142
+ map: undefined,
8143
+ media: undefined
8144
+ });
8145
+ };
8078
8146
  /* scoped */
8079
8147
 
8148
+
8080
8149
  var __vue_scope_id__$g = undefined;
8081
8150
  /* module identifier */
8082
8151
 
8083
- var __vue_module_identifier__$g = "data-v-2f993f01";
8152
+ var __vue_module_identifier__$g = "data-v-9fe38344";
8084
8153
  /* functional template */
8085
8154
 
8086
8155
  var __vue_is_functional_template__$g = false;
8087
- /* style inject */
8088
-
8089
- /* style inject SSR */
8090
-
8091
8156
  /* style inject shadow dom */
8092
8157
 
8093
8158
  var __vue_component__$n = /*#__PURE__*/normalizeComponent({
8094
8159
  render: __vue_render__$g,
8095
8160
  staticRenderFns: __vue_staticRenderFns__$g
8096
- }, __vue_inject_styles__$g, __vue_script__$g, __vue_scope_id__$g, __vue_is_functional_template__$g, __vue_module_identifier__$g, false, undefined, undefined, undefined);
8161
+ }, __vue_inject_styles__$g, __vue_script__$g, __vue_scope_id__$g, __vue_is_functional_template__$g, __vue_module_identifier__$g, false, undefined, createInjectorSSR, undefined);
8097
8162
 
8098
8163
  var StandardMessages = __vue_component__$n;//
8099
8164
  var script$f = {
@@ -8383,8 +8448,8 @@ var script$f = {
8383
8448
  openImage: function openImage(imagePreview) {
8384
8449
  this.$emit("open-image", imagePreview);
8385
8450
  },
8386
- openFileSystem: function openFileSystem(status) {
8387
- this.$emit("open-file-system", status);
8451
+ openFileSystem: function openFileSystem() {
8452
+ this.$emit("open-file-system");
8388
8453
  },
8389
8454
  setAudio: function setAudio(audioObj) {
8390
8455
  var audioFile = audioObj.audioFile,
@@ -8671,7 +8736,7 @@ var __vue_staticRenderFns__$f = [];
8671
8736
 
8672
8737
  var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
8673
8738
  if (!inject) return;
8674
- inject("data-v-6d9479b5_0", {
8739
+ inject("data-v-26af6246_0", {
8675
8740
  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;margin-right:5px}.text-footer-container .text-footer-files-container .files-btn.system{background-color:#49a349}.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}",
8676
8741
  map: undefined,
8677
8742
  media: undefined
@@ -8683,7 +8748,7 @@ var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
8683
8748
  var __vue_scope_id__$f = undefined;
8684
8749
  /* module identifier */
8685
8750
 
8686
- var __vue_module_identifier__$f = "data-v-6d9479b5";
8751
+ var __vue_module_identifier__$f = "data-v-26af6246";
8687
8752
  /* functional template */
8688
8753
 
8689
8754
  var __vue_is_functional_template__$f = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.158",
3
+ "version": "0.0.161",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <span class="text-footer-actions--btn" :class="{'files-activated' : openFiles || file.length}" @click="openFilesByClip()">
3
3
  <transition name="fade">
4
- <span v-if="file.length" class="files-counter" v-text="file.length" @click.stop="toggleFilePreview" :title="dictionary.msg_abrir_anexos"></span>
4
+ <span v-if="fileSize > 0" class="files-counter" v-text="fileSize" @click.stop="toggleFilePreview" :title="dictionary.msg_abrir_anexos"></span>
5
5
  </transition>
6
6
  <fa-icon :icon="['fas', 'paperclip']" :title="dictionary.title_selecionar_anexo" />
7
7
  <transition name="show">
@@ -117,6 +117,7 @@ export default {
117
117
  data() {
118
118
  return {
119
119
  file: [],
120
+ fileSize: 0,
120
121
  openFiles: false,
121
122
  showFilePreview: false,
122
123
  imagePreview: "",
@@ -148,7 +149,8 @@ export default {
148
149
  this.openFiles = !this.openFiles
149
150
  },
150
151
  openSelectFileHandler(type) {
151
- if(type == "system"){ this.$emit("open-file-system", true); return false }
152
+ if(type == "system") return this.$emit("open-file-system")
153
+ if(this.fileSettings.multiple){ type = 'both' }
152
154
  const fileInput = document.querySelector(`#${type}-${this.textId}`)
153
155
  if(fileInput) fileInput.click()
154
156
  if(!fileInput) if (!document.querySelector(".toasted.toasted-primary.error")) this.$toasted.global.defaultError()
@@ -172,6 +174,7 @@ export default {
172
174
  },
173
175
  fileUpload(event, type, externalCall) {
174
176
  try {
177
+ this.fileSize = 0
175
178
  if(this.fileFormatError) this.file = []
176
179
  this.openFiles = false
177
180
  let filesAux = !externalCall ? event.target.files ? event.target.files : event.dataTransfer.files : event
@@ -179,6 +182,7 @@ export default {
179
182
 
180
183
  if(!this.file.length) return
181
184
  this.hasAnyFile = true
185
+ this.fileSize = this.file.length
182
186
  if(!this.fileSettings.multiple) {
183
187
  this.file = this.file[0]
184
188
  this.singleFileUpload(type, this.file.name)
@@ -70,7 +70,7 @@ export default {
70
70
  },
71
71
  props: {
72
72
  dictionary: { type: Object, required: true },
73
- file: { type: File, required: true },
73
+ file: { type: Array, required: true },
74
74
  fileFormatError: { type: Boolean, required: false },
75
75
  validFileFormats: { type: String, required: false, default: "" }
76
76
  },
@@ -9,50 +9,72 @@
9
9
  label="value"
10
10
  v-model="key_1"
11
11
  :reduce="formatted_messages_1 => formatted_messages_1.cod"
12
- @input="key_1 ? receiveValueFormattedMessage(key_1, 2) : false"
12
+ @input="inputSelectKey1"
13
13
  >
14
14
  <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
15
15
  </v-select>
16
- <v-select
17
- v-if="formatted_messages_2.length && key_1"
18
- :style="`background-color: ${backgroundColor}`"
19
- appendToBody
20
- :calculatePosition="calculateSelectPosition"
21
- class="text-footer-v-select"
22
- :options="formatted_messages_2"
23
- label="value"
24
- v-model="key_2"
25
- :reduce="formatted_messages_2 => formatted_messages_2.cod"
26
- @input="receiveValueFormattedMessage(key_2, 3)"
27
- >
28
- <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
29
- </v-select>
30
- <div class="text-footer-select-03" v-if="formatted_messages_3.length && key_2">
31
- <v-select
32
- :style="`background-color: ${backgroundColor}`"
33
- appendToBody
34
- :calculatePosition="calculateSelectPosition"
35
- class="text-footer-v-select"
36
- :options="formatted_messages_3"
37
- label="value"
38
- :clearable="false"
39
- @input="openMsg()"
40
- v-model="key_3"
41
- >
42
- <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
43
- </v-select>
44
- <template v-if="key_3.cod">
45
- <span class="text-footer--btn-select-03" v-if="messageType == 1" :title="dictionary.title_btn_preencher_msg_formatada" @click="insertFormattedMessage(key_3)">
46
- <fa-icon :icon="['fas', 'level-up-alt']" />
47
- </span>
48
- <span class="text-footer--btn-select-03" v-else-if="messageType == 2" :title="dictionary.title_btn_abrir_msg_tipo_2" @click="openFormattedMsgType2(key_3)">
49
- <fa-icon :icon="['fas', 'file-alt']" />
50
- </span>
51
- </template>
16
+ <div class="transition-selects">
17
+ <transition name="fade" mode="out-in">
18
+ <div v-if="formatted_messages_2.length && key_1">
19
+ <v-select
20
+ :style="`background-color: ${backgroundColor}`"
21
+ appendToBody
22
+ :calculatePosition="calculateSelectPosition"
23
+ class="text-footer-v-select"
24
+ :options="formatted_messages_2"
25
+ label="value"
26
+ v-model="key_2"
27
+ :reduce="formatted_messages_2 => formatted_messages_2.cod"
28
+ @input="inputSelectKey2"
29
+ >
30
+ <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
31
+ </v-select>
32
+ </div>
33
+ <div class="loader-select" v-else-if="key_1 && loadingReq">
34
+ <VueLoader />
35
+ </div>
36
+ </transition>
37
+ <transition name="fade" mode="out-in">
38
+ <div class="text-footer-select-03" v-if="formatted_messages_3.length && key_2">
39
+ <v-select
40
+ :style="`background-color: ${backgroundColor}`"
41
+ appendToBody
42
+ :calculatePosition="calculateSelectPosition"
43
+ class="text-footer-v-select"
44
+ :options="formatted_messages_3"
45
+ label="value"
46
+ :clearable="false"
47
+ @input="openMsg()"
48
+ v-model="key_3"
49
+ >
50
+ <div slot="no-options"> {{ dictionary.msg_sem_resultados }} </div>
51
+ </v-select>
52
+ <template v-if="key_3.cod">
53
+ <span class="text-footer--btn-select-03" v-if="messageType == 1" :title="dictionary.title_btn_preencher_msg_formatada" @click="insertFormattedMessage(key_3)">
54
+ <fa-icon :icon="['fas', 'level-up-alt']" />
55
+ </span>
56
+ <span class="text-footer--btn-select-03" v-else-if="messageType == 2" :title="dictionary.title_btn_abrir_msg_tipo_2" @click="openFormattedMsgType2(key_3)">
57
+ <fa-icon :icon="['fas', 'file-alt']" />
58
+ </span>
59
+ </template>
60
+ </div>
61
+ <div class="loader-select" v-else-if="key_2 && loadingReq">
62
+ <VueLoader />
63
+ </div>
64
+ </transition>
52
65
  </div>
53
66
  </div>
54
67
  </template>
55
68
 
69
+ <style>
70
+ .transition-selects {
71
+ min-height: 80px;display: flex; flex-direction: column; width: 100%;
72
+ }
73
+ .loader-select {
74
+ position: relative; min-height: 35px;background: #FFF;width: 100%; border: 1px solid #ccc;border-radius: 5px;z-index: 1;
75
+ }
76
+ </style>
77
+
56
78
  <script>
57
79
 
58
80
  import { createPopper } from "@popperjs/core"
@@ -95,7 +117,8 @@ export default {
95
117
  formatted_messages_2: [],
96
118
  key_2: "",
97
119
  formatted_messages_3: [],
98
- key_3: ""
120
+ key_3: "",
121
+ loadingReq: false
99
122
  }
100
123
  },
101
124
  mounted() {
@@ -109,15 +132,39 @@ export default {
109
132
  })
110
133
  return () => popper.destroy()
111
134
  },
135
+ inputSelectKey1() {
136
+ if(!this.key_1) {
137
+ if(this.formatted_messages_2.length) this.formatted_messages_2 = []
138
+ if(this.key_2) this.key_2 = ""
139
+ return
140
+ }
141
+ this.receiveValueFormattedMessage(this.key_1, 2)
142
+ },
143
+ inputSelectKey2() {
144
+ if(!this.key_2) {
145
+ if(this.formatted_messages_3.length) this.formatted_messages_3 = []
146
+ if(this.key_3) this.key_3 = ""
147
+ return
148
+ }
149
+ if(this.formatted_messages_3.length) this.formatted_messages_3 = []
150
+ if(this.key_3) this.key_3 = ""
151
+ this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
152
+ },
112
153
  receiveValueFormattedMessage(cod, selectionIndex) {
113
154
  try {
114
155
  if(!this.token_cliente) throw new Error("Informe token_cliente como chave na propriedade formattedMessageSettings que ocorre na chamada componente TextFooter ")
156
+ this.loadingReq = true
115
157
  this.getStandardMessages(cod, this.token_cliente).then((data) => {
158
+ this.loadingReq = false
116
159
  if(data && typeof(data) == 'string') return this.$toasted.global.emConstrucao({msg: data})
117
160
  if(data) return this.showFormattedMessage(data, selectionIndex)
118
161
  this.$toasted.global.defaultError()
119
- }).catch(e => { console.error("Error in getStandardMessages: ", e) })
162
+ }).catch(e => {
163
+ this.loadingReq = false
164
+ console.error("Error in getStandardMessages: ", e)
165
+ })
120
166
  }catch(e) {
167
+ this.loadingReq = false
121
168
  console.error("Error in receiveValueFormattedMessage: ", e)
122
169
  }
123
170
  },
@@ -137,7 +184,7 @@ export default {
137
184
  if(this.formatted_messages_2.length == 1) {
138
185
  if(this.formatted_messages_2[0].cod) {
139
186
  this.key_2 = this.formatted_messages_2[0].cod
140
- this.receiveValueFormattedMessage(this.key_2, 3)
187
+ this.receiveValueFormattedMessage(`T/${this.key_2}`, 3)
141
188
  }
142
189
  }
143
190
  }
@@ -345,8 +345,8 @@ export default {
345
345
  openImage(imagePreview) {
346
346
  this.$emit("open-image", imagePreview)
347
347
  },
348
- openFileSystem(status) {
349
- this.$emit("open-file-system", status)
348
+ openFileSystem() {
349
+ this.$emit("open-file-system")
350
350
  },
351
351
  setAudio(audioObj) {
352
352
  const { audioFile, audioSource } = audioObj