vue-intergrall-plugins 0.0.205 → 0.0.208

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.
@@ -9089,37 +9089,39 @@ var script$f = {
9089
9089
  if (index === "components" && Array.isArray(this.selectedTemplate[index])) {
9090
9090
  var arrComponents = this.selectedTemplate[index];
9091
9091
  arrComponents.map(function (component) {
9092
- component.parameters.map(function (message) {
9093
- message.currentText = message.text;
9094
- var keyIndex = 0;
9092
+ if (component && component.parameters && component.parameters.length) {
9093
+ component.parameters.map(function (message) {
9094
+ message.currentText = message.text;
9095
+ var keyIndex = 0;
9095
9096
 
9096
- while (keyIndex < keys.length) {
9097
- var varName = "{{".concat(keys[keyIndex], "}}");
9097
+ while (keyIndex < keys.length) {
9098
+ var varName = "{{".concat(keys[keyIndex], "}}");
9098
9099
 
9099
- if (message.text.indexOf(varName) != -1) {
9100
- /**Gerando os obejetos de parametros da notifica??o para o component */
9101
- if (component.type === "header") {
9102
- _this.selectedTemplate['parameters'][component.type] = {}; //Header s? pode ter uma vari?vel
9100
+ if (message.text.indexOf(varName) != -1) {
9101
+ /**Gerando os obejetos de parametros da notificacao para o component */
9102
+ if (component.type === "header") {
9103
+ _this.selectedTemplate['parameters'][component.type] = {}; //Header s? pode ter uma vari?vel
9103
9104
 
9104
- _this.selectedTemplate['parameters'][component.type] = {
9105
- tipo: "text",
9106
- text: values[keyIndex]
9107
- };
9108
- } else if (!_this.selectedTemplate['parameters'][component.type]) {
9109
- _this.selectedTemplate['parameters'][component.type] = new Array();
9110
- } //Aplicando valores das v?riaveis dentro dos outros componentes com execess?o do header
9105
+ _this.selectedTemplate['parameters'][component.type] = {
9106
+ tipo: "text",
9107
+ text: values[keyIndex]
9108
+ };
9109
+ } else if (!_this.selectedTemplate['parameters'][component.type]) {
9110
+ _this.selectedTemplate['parameters'][component.type] = new Array();
9111
+ } //Aplicando valores das v?riaveis dentro dos outros componentes com execess?o do header
9111
9112
 
9112
9113
 
9113
- if (_this.selectedTemplate['parameters'][component.type] && component.type !== 'header') {
9114
- _this.selectedTemplate['parameters'][component.type].push(values[keyIndex]);
9114
+ if (_this.selectedTemplate['parameters'][component.type] && component.type !== 'header') {
9115
+ _this.selectedTemplate['parameters'][component.type].push(values[keyIndex]);
9116
+ }
9117
+
9118
+ message.currentText = message.currentText.replace(varName, values[keyIndex]);
9115
9119
  }
9116
9120
 
9117
- message.currentText = message.currentText.replace(varName, values[keyIndex]);
9121
+ keyIndex++;
9118
9122
  }
9119
-
9120
- keyIndex++;
9121
- }
9122
- });
9123
+ });
9124
+ }
9123
9125
  });
9124
9126
  }
9125
9127
  }
@@ -9206,7 +9208,7 @@ var __vue_staticRenderFns__$f = [];
9206
9208
 
9207
9209
  var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
9208
9210
  if (!inject) return;
9209
- inject("data-v-1c24c23b_0", {
9211
+ inject("data-v-0b0bc59a_0", {
9210
9212
  source: "*{box-sizing:border-box}.toasted svg{margin-right:10px}.d-none{display:none}ul{list-style-type:none}h1,h2,h3,h4,p{margin:0;padding:0}.tg-container{width:100%;max-width:800px;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto}.tg-options{width:100%;display:flex}.tg-options.column{flex-direction:column}.tg-options h4{margin-right:5px}.tg-select{flex:1;height:34px;overflow:hidden}.tg-select .vs__dropdown-toggle{background-color:#fff;height:34px;overflow:hidden;display:flex;align-items:center}.tg-select .vs__selected-options{height:34px;overflow:hidden}.tg-select .vs__selected-options>span{white-space:nowrap;text-overflow:ellipsis;flex:1}.tg-select .vs__selected-options>input{flex-grow:0}.vs__dropdown-option{transition:background-color 150ms;white-space:normal}.vs__dropdown-option:nth-child(odd){background-color:#f1f1f1}.vs__dropdown-option--highlight,.vs__dropdown-option--selected,.vs__dropdown-option:active,.vs__dropdown-option:focus,.vs__dropdown-option:hover{background-color:#5897fb!important;color:#fff}.tg-component{width:100%}.ts-container{width:100%;display:flex;justify-content:space-between}.ts-content{--border-color:#CCC;--background-color:#DFF0D8;--input-background-color:#FFF;--input-border-default:#007BFF;--input-border-error:#E74C3C;--placeholder-color:#BBB;flex:2;font-size:.7rem;padding:10px 0}.ts-content footer,.ts-content header,.ts-content section{padding:3px 5px;background-color:var(--background-color)}.ts-content header,.ts-content section{border-right:1px solid var(--border-color);border-left:1px solid var(--border-color)}.ts-content header{border-top-left-radius:2.5px;border-top-right-radius:2.5px;border-top:1px solid var(--border-color)}.ts-content header{font-weight:550}.ts-content section{line-height:25px}.ts-content section.margin-bottom{border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;border-bottom:1px solid var(--border-color)}.ts-content footer{border:1px solid var(--border-color);border-top:unset;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px}.ts-content input{border:1px solid transparent;outline:0;font-size:.8rem;padding:2.5px 5px;background-color:var(--input-background-color)}.ts-content input::placeholder{color:var(--placeholder-color)}.ts-content input.active,.ts-content input:focus{border:1px solid var(--input-border-default)}.ts-content input.invalid{border:1px solid var(--input-border-error)!important}.ts-content__var{display:inline-block;position:relative}.ts-dropdown{margin:0;padding:0;position:absolute;top:19px;left:0;background:#eee;width:100%;z-index:1;transition:all 150ms;visibility:hidden;opacity:0;list-style-type:none;border:1px solid #444;border-top:unset}.ts-dropdown li{width:100%;opacity:.9;cursor:pointer;font-weight:550;padding:2px 5px;transition:background-color 150ms}.ts-dropdown li:focus,.ts-dropdown li:focus-within,.ts-dropdown li:hover{opacity:1;background-color:#555;color:#fff}.ts-dropdown.visible{visibility:visible;opacity:1}.tg-btn{width:40%;display:flex;justify-content:center;align-items:center}.tg-btn button{outline:unset;border:unset;display:block;min-width:180px;height:35px;padding:0 10px;font-weight:500;background-color:#007bff;color:#fff;transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -2px rgba(0,0,0,.2);opacity:.9;border-radius:2.5px}.tg-btn button>svg{margin-right:5px;color:#003166}.tg-btn button:hover{opacity:1}.tg-btn button: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)}.tg-btn button: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)}.tg-btn button:active,.tg-btn button:focus{outline:unset}.tg-btn.small-btn{width:auto;margin-left:5px}.tg-btn.small-btn svg{margin-right:0}.tg-btn.small-btn button{min-width:35px;width:35px;padding:0;display:flex;justify-content:center;align-items:center}.tm-container{border:1px solid var(--border-color);border-radius:2.5px;display:flex}",
9211
9213
  map: undefined,
9212
9214
  media: undefined
@@ -9218,7 +9220,7 @@ var __vue_inject_styles__$f = function __vue_inject_styles__(inject) {
9218
9220
  var __vue_scope_id__$f = undefined;
9219
9221
  /* module identifier */
9220
9222
 
9221
- var __vue_module_identifier__$f = "data-v-1c24c23b";
9223
+ var __vue_module_identifier__$f = "data-v-0b0bc59a";
9222
9224
  /* functional template */
9223
9225
 
9224
9226
  var __vue_is_functional_template__$f = false;
@@ -10375,9 +10377,17 @@ var script$9 = {
10375
10377
  type: Object,
10376
10378
  required: true
10377
10379
  },
10380
+ dominio: {
10381
+ type: String,
10382
+ required: true
10383
+ },
10378
10384
  dictionary: {
10379
10385
  type: Object,
10380
10386
  required: true
10387
+ },
10388
+ anexos: {
10389
+ type: Array,
10390
+ required: false
10381
10391
  }
10382
10392
  },
10383
10393
  mounted: function mounted() {
@@ -10386,6 +10396,20 @@ var script$9 = {
10386
10396
  }
10387
10397
  },
10388
10398
  methods: {
10399
+ returnCurrentClass: function returnCurrentClass(isDoc) {
10400
+ return "fs-2 cursor-pointer ".concat(isDoc == 'pdf' ? 'text-red' : 'text-blue');
10401
+ },
10402
+ returnCurrentIcon: function returnCurrentIcon(isDoc) {
10403
+ return isDoc == 'pdf' ? ['fas', 'file-pdf'] : ['fas', 'file-alt'];
10404
+ },
10405
+ openFile: function openFile(url, isImg) {
10406
+ var width = window.innerWidth;
10407
+ var height = window.innerHeight;
10408
+ var options = !isImg ? "width=".concat(width, ",height=").concat(height) : "width=auto,height=auto";
10409
+ var urlformatted = "".concat(this.dominio, "/callcenter/docs.php?mku=").concat(url);
10410
+ console.log(urlformatted);
10411
+ window.open(urlformatted, "card-file", options);
10412
+ },
10389
10413
  validateInterativity: function validateInterativity() {
10390
10414
  try {
10391
10415
  if (this.interatividade.formulario && this.interatividade.formulario.length) {
@@ -10445,11 +10469,32 @@ var __vue_render__$9 = function __vue_render__() {
10445
10469
 
10446
10470
  return _c('div', {
10447
10471
  staticClass: "interatividade"
10448
- }, [_vm._ssrNode(_vm.informacao.length ? "<div class=\"interatividade-form-header\" data-v-7c3f68fa>" + _vm._ssrEscape("\n " + _vm._s(_vm.dictionary.msg_abertura_reclamacao) + "\n ") + "</div> <div class=\"interatividade-form-body\" data-v-7c3f68fa>" + _vm._ssrList(_vm.informacao, function (form) {
10449
- return "<div class=\"interatividade-info-form\" data-v-7c3f68fa>" + (form.TIPO_TEXTO < 1000 ? "<p class=\"interatividade-titulo-form\" data-v-7c3f68fa>" + _vm._ssrEscape(_vm._s(form.DESC_TIPO_TEXTO)) + "</p>" : "<!---->") + " " + (form.TIPO_TEXTO < 1000 ? "<p class=\"interatividade-description-form\" data-v-7c3f68fa>" + _vm._ssrEscape(_vm._s(form.TEXTO)) + "</p>" : "<!---->") + "</div>";
10450
- }) + " " + (_vm.informacaoAdicional.length ? "<div class=\"interatividade-form-header\" data-v-7c3f68fa>" + _vm._ssrEscape("\n " + _vm._s(_vm.dictionary.msg_info_adicional) + "\n ") + "</div>" : "<!---->") + " <div class=\"interatividade-form-body\" data-v-7c3f68fa>" + _vm._ssrList(_vm.informacaoAdicional, function (form) {
10451
- return "<div class=\"interatividade-add-info-form\" data-v-7c3f68fa><div class=\"divisor-form-info-aditional\" data-v-7c3f68fa><div class=\"info-aditional\" data-v-7c3f68fa>" + (form.TIPO_TEXTO > 999 ? "<p class=\"interatividade-titulo-form\" data-v-7c3f68fa>" + _vm._ssrEscape(_vm._s(form.DESC_TIPO_TEXTO + ': ')) + "</p>" : "<!---->") + "</div> <div class=\"info-aditional\" data-v-7c3f68fa>" + (form.TIPO_TEXTO > 999 ? "<p class=\"interatividade-description-form\" data-v-7c3f68fa>" + _vm._ssrEscape(_vm._s(form.TEXTO)) + "</p>" : "<!---->") + "</div></div></div>";
10452
- }) + "</div></div>" : "<!---->")]);
10472
+ }, [_vm.informacao.length ? [_vm._ssrNode("<div class=\"interatividade-form-header\" data-v-8dbb0508>" + _vm._ssrEscape("\n " + _vm._s(_vm.dictionary.msg_abertura_reclamacao) + "\n ") + "</div> "), _vm._ssrNode("<div class=\"interatividade-form-body\" data-v-8dbb0508>", "</div>", [_vm._ssrNode(_vm._ssrList(_vm.informacao, function (form) {
10473
+ return "<div class=\"interatividade-info-form\" data-v-8dbb0508>" + (form.TIPO_TEXTO < 1000 ? "<p class=\"interatividade-titulo-form\" data-v-8dbb0508>" + _vm._ssrEscape(_vm._s(form.DESC_TIPO_TEXTO)) + "</p>" : "<!---->") + " " + (form.TIPO_TEXTO < 1000 ? "<p class=\"interatividade-description-form\" data-v-8dbb0508>" + _vm._ssrEscape(_vm._s(form.TEXTO)) + "</p>" : "<!---->") + "</div>";
10474
+ }) + " " + (_vm.informacaoAdicional.length ? "<div class=\"interatividade-form-header\" data-v-8dbb0508>" + _vm._ssrEscape("\n " + _vm._s(_vm.dictionary.msg_info_adicional) + "\n ") + "</div>" : "<!---->") + " <div class=\"interatividade-form-body\" data-v-8dbb0508>" + _vm._ssrList(_vm.informacaoAdicional, function (form) {
10475
+ return "<div class=\"interatividade-add-info-form\" data-v-8dbb0508><div class=\"divisor-form-info-aditional\" data-v-8dbb0508><div class=\"info-aditional\" data-v-8dbb0508>" + (form.TIPO_TEXTO > 999 ? "<p class=\"interatividade-titulo-form\" data-v-8dbb0508>" + _vm._ssrEscape(_vm._s(form.DESC_TIPO_TEXTO + ': ')) + "</p>" : "<!---->") + "</div> <div class=\"info-aditional\" data-v-8dbb0508>" + (form.TIPO_TEXTO > 999 ? "<p class=\"interatividade-description-form\" data-v-8dbb0508>" + _vm._ssrEscape(_vm._s(form.TEXTO)) + "</p>" : "<!---->") + "</div></div></div>";
10476
+ }) + "</div> <h3 class=\"m-5 text-bold\" data-v-8dbb0508>" + _vm._ssrEscape(_vm._s("Anexos")) + "</h3> "), _vm._ssrNode("<div class=\"d-flex flex-wrap align-items-center\" data-v-8dbb0508>", "</div>", _vm._l(_vm.anexos, function (ref, fileIndex) {
10477
+ var name = ref.name;
10478
+ var type = ref.type;
10479
+ var mkuDownload = ref.mkuDownload;
10480
+ var mku = ref.mku;
10481
+ return _vm._ssrNode("<div class=\"mb-5 mx-5 d-flex\" data-v-8dbb0508>", "</div>", [!type ? _vm._ssrNode("<img" + _vm._ssrAttr("src", _vm.dominio + "/callcenter/docs.php?mku=" + mku) + _vm._ssrAttr("alt", name) + _vm._ssrAttr("title", name) + " class=\"box-shadow max-w-75px max-h-75px cursor-pointer\" data-v-8dbb0508>", "</img>") : _c('fa-icon', {
10482
+ class: _vm.returnCurrentClass(type),
10483
+ attrs: {
10484
+ "icon": _vm.returnCurrentIcon(type),
10485
+ "title": name
10486
+ },
10487
+ on: {
10488
+ "click": function click($event) {
10489
+ return _vm.openFile(mku, type);
10490
+ }
10491
+ }
10492
+ }), _vm._ssrNode(" "), _vm._ssrNode("<a" + _vm._ssrAttr("href", _vm.dominio + "/callcenter/docs.php?mku=" + mkuDownload) + _vm._ssrAttr("download", "" + name) + " target=\"_blank\" rel=\"noreferrer noopener\"" + _vm._ssrAttr("title", "Download " + name) + " class=\"d-flex align-items-end ml-3 text-dark\" data-v-8dbb0508>", "</a>", [_c('fa-icon', {
10493
+ attrs: {
10494
+ "icon": ['fas', 'download']
10495
+ }
10496
+ })], 1)], 2);
10497
+ }), 0), _vm._ssrNode(" " + (!_vm.anexos.length ? "<p class=\"text-center mb-5\" data-v-8dbb0508>" + _vm._ssrEscape(_vm._s("Sem anexos")) + "</p>" : "<!---->"))], 2)] : _vm._e()], 2);
10453
10498
  };
10454
10499
 
10455
10500
  var __vue_staticRenderFns__$9 = [];
@@ -10457,8 +10502,8 @@ var __vue_staticRenderFns__$9 = [];
10457
10502
 
10458
10503
  var __vue_inject_styles__$9 = function __vue_inject_styles__(inject) {
10459
10504
  if (!inject) return;
10460
- inject("data-v-7c3f68fa_0", {
10461
- source: ".show-x-enter-active[data-v-7c3f68fa],.show-x-leave-enter[data-v-7c3f68fa]{opacity:1;transform:translateX(0);transition:all .2s linear}.show-x-enter[data-v-7c3f68fa],.show-x-leave-to[data-v-7c3f68fa]{opacity:0;transform:translateX(5%)}.divisor-form-info-aditional[data-v-7c3f68fa]{display:flex;align-items:center;justify-content:space-around}.info-aditional[data-v-7c3f68fa]{border-bottom:1px solid #ccc;width:49%}.interatividade-form-header[data-v-7c3f68fa]{background-color:#efefef;margin-top:5px;border-top-right-radius:10px;border-top-left-radius:10px;padding-left:10px;padding-right:10px;padding-top:5px;padding-bottom:5px;justify-content:space-between;display:flex;color:#333;font-weight:700;font-size:.9rem}.interatividade-form-body[data-v-7c3f68fa]{padding:0 10px;background:#fff;border-right:1px solid #efefef;border-left:1px solid #efefef;border-bottom-left-radius:10px;border-bottom-right-radius:10px;padding-bottom:10px}.interatividade[data-v-7c3f68fa]{margin:10px 0}.interatividade-titulo-form[data-v-7c3f68fa]{white-space:nowrap;text-overflow:ellipsis;font-weight:700;overflow:hidden;max-width:100%;margin:0;padding:0;padding-top:5px}.interatividade-description-form[data-v-7c3f68fa]{overflow:hidden;max-width:100%;margin:0;padding:0}.interatividade-lista[data-v-7c3f68fa]{width:100%;min-width:200px;border-radius:15px;background-color:#fff;color:#333;margin:10px 0}.interatividade-lista-conteudo[data-v-7c3f68fa]{padding:10px;border-bottom:1px solid #d7d7d7}.interatividade-lista-titulo[data-v-7c3f68fa]{font-weight:700;font-size:1.2em;margin-bottom:10px}.interatividade-lista-rodape[data-v-7c3f68fa]{color:#818181;margin-top:5px}.interatividade-lista-link[data-v-7c3f68fa]{width:100%;text-align:center;padding:10px;color:#006eff;cursor:pointer;transition:color .2s ease-in-out}.interatividade-lista-link[data-v-7c3f68fa]:hover{color:#00628f}",
10505
+ inject("data-v-8dbb0508_0", {
10506
+ source: ".show-x-enter-active[data-v-8dbb0508],.show-x-leave-enter[data-v-8dbb0508]{opacity:1;transform:translateX(0);transition:all .2s linear}.show-x-enter[data-v-8dbb0508],.show-x-leave-to[data-v-8dbb0508]{opacity:0;transform:translateX(5%)}.divisor-form-info-aditional[data-v-8dbb0508]{display:flex;align-items:center;justify-content:space-around}.info-aditional[data-v-8dbb0508]{border-bottom:1px solid #ccc;width:49%}.interatividade-form-header[data-v-8dbb0508]{background-color:#efefef;margin-top:5px;border-top-right-radius:10px;border-top-left-radius:10px;padding-left:10px;padding-right:10px;padding-top:5px;padding-bottom:5px;justify-content:space-between;display:flex;color:#333;font-weight:700;font-size:.9rem}.interatividade-form-body[data-v-8dbb0508]{padding:0 10px;background:#fff;border-right:1px solid #efefef;border-left:1px solid #efefef;border-bottom-left-radius:10px;border-bottom-right-radius:10px;padding-bottom:10px}.interatividade[data-v-8dbb0508]{margin:10px 0}.interatividade-titulo-form[data-v-8dbb0508]{white-space:nowrap;text-overflow:ellipsis;font-weight:700;overflow:hidden;max-width:100%;margin:0;padding:0;padding-top:5px}.interatividade-description-form[data-v-8dbb0508]{overflow:hidden;max-width:100%;margin:0;padding:0}.interatividade-lista[data-v-8dbb0508]{width:100%;min-width:200px;border-radius:15px;background-color:#fff;color:#333;margin:10px 0}.interatividade-lista-conteudo[data-v-8dbb0508]{padding:10px;border-bottom:1px solid #d7d7d7}.interatividade-lista-titulo[data-v-8dbb0508]{font-weight:700;font-size:1.2em;margin-bottom:10px}.interatividade-lista-rodape[data-v-8dbb0508]{color:#818181;margin-top:5px}.interatividade-lista-link[data-v-8dbb0508]{width:100%;text-align:center;padding:10px;color:#006eff;cursor:pointer;transition:color .2s ease-in-out}.interatividade-lista-link[data-v-8dbb0508]:hover{color:#00628f}.text-blue[data-v-8dbb0508]{color:#294ed3}.text-red[data-v-8dbb0508]{color:#e74c3c}.text-dark[data-v-8dbb0508]{color:#333}.ml-3[data-v-8dbb0508]{margin-left:3px}.fs-2[data-v-8dbb0508]{font-size:2rem}.flex-wrap[data-v-8dbb0508]{-ms-flex-wrap:wrap;flex-wrap:wrap}.align-items-center[data-v-8dbb0508]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.d-flex[data-v-8dbb0508]{display:-webkit-box;display:-ms-flexbox;display:flex}.align-items-end[data-v-8dbb0508]{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.text-bold[data-v-8dbb0508]{font-weight:700}.m-5[data-v-8dbb0508]{margin:5px}.mb-5[data-v-8dbb0508]{margin-bottom:5px}.mx-5[data-v-8dbb0508]{margin-left:5px;margin-right:5px}.cursor-pointer[data-v-8dbb0508]{cursor:pointer}",
10462
10507
  map: undefined,
10463
10508
  media: undefined
10464
10509
  });
@@ -10466,10 +10511,10 @@ var __vue_inject_styles__$9 = function __vue_inject_styles__(inject) {
10466
10511
  /* scoped */
10467
10512
 
10468
10513
 
10469
- var __vue_scope_id__$9 = "data-v-7c3f68fa";
10514
+ var __vue_scope_id__$9 = "data-v-8dbb0508";
10470
10515
  /* module identifier */
10471
10516
 
10472
- var __vue_module_identifier__$9 = "data-v-7c3f68fa";
10517
+ var __vue_module_identifier__$9 = "data-v-8dbb0508";
10473
10518
  /* functional template */
10474
10519
 
10475
10520
  var __vue_is_functional_template__$9 = false;
@@ -11617,6 +11662,8 @@ var __vue_render__$3 = function __vue_render__() {
11617
11662
  }, [_vm.interatividade && _vm.validateInterativity() ? _c('InteratividadeFormulario', {
11618
11663
  attrs: {
11619
11664
  "interatividade": _vm.interatividade,
11665
+ "dominio": _vm.dominio,
11666
+ "anexos": _vm.anexos,
11620
11667
  "dictionary": _vm.dictionary
11621
11668
  }
11622
11669
  }) : _c('div', {
@@ -11882,7 +11929,7 @@ var __vue_staticRenderFns__$3 = [];
11882
11929
 
11883
11930
  var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
11884
11931
  if (!inject) return;
11885
- inject("data-v-257d4492_0", {
11932
+ inject("data-v-dded57e0_0", {
11886
11933
  source: ":root{--message-color:#373737}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.mensagem{padding:14px 7px;border-radius:2.5px;min-width:150px;min-height:60px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:relative;max-width:80%;margin-bottom:10px;font-size:.85rem;word-break:break-word}.mensagem.mapa{width:100%}.mensagem.hist-msg{animation:show 1s}.mensagem a{margin-right:5px;font-weight:550;color:inherit;text-decoration:none}.mensagem a:hover{text-decoration:underline}.message p{white-space:pre-wrap}.mensagem-anexo a,.mensagem-div-mapa a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.reply{cursor:pointer;position:absolute;right:53px;bottom:5px;font-size:.6rem;color:#67a332;width:.9rem;height:.9rem;display:flex;justify-content:center;align-items:center;border-radius:50%;background-color:#fff}.reply svg{margin-top:-1px;margin-right:-1px}.reply-with-2-icons{right:30px}.check{cursor:pointer;position:absolute;right:10px;bottom:2px;font-size:.7rem}.check.visualizado,.check.visualizado svg{color:#006daa}.check.verde,.check.verde svg{color:#4f772d}.check.vermelho,.check.vermelho svg{color:#ba181b}.check.cinza,.check.cinza svg{color:#999}.check.preto,.check.preto svg{color:#666}.star{cursor:pointer;position:absolute;right:30px;bottom:2px;font-size:.4rem;width:11.2px}.default-stick-size{width:180px;height:auto}.horario-envio{margin-right:15px;font-size:.7rem;position:absolute;left:10px;bottom:2px}.autor-mensagem{position:absolute;font-size:.6rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:90%;font-weight:700;top:2px}.mensagem__principal{width:100%;display:flex;justify-content:flex-end}.mensagem__principal>.mensagem::after{content:\"\";width:0;height:0;position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid var(--message-color);bottom:5px;right:-10px;transform:rotate(-90deg)}.mensagem__principal>.mensagem{background-color:var(--message-color);color:#fff}.mensagem__principal>.mensagem .horario-envio{color:#fff}.mensagem__principal>.mensagem .autor-mensagem{right:5px;color:#fff}.mensagem__outros{width:100%;display:flex}.mensagem__outros>.mensagem{background-color:#fff;color:#333}.mensagem__outros>.mensagem::after{content:\"\";width:0;height:0;position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px solid #fff;bottom:5px;left:-10px;transform:rotate(90deg)}.mensagem__outros>.autor-mensagem{left:5px;color:#333}.mensagem-div-mapa{width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;margin-bottom:5px}.msg-mapa{width:100%;min-height:225px;height:100%;box-sizing:initial}.msg-mapa img{max-width:none!important}.info-mapa{list-style-type:none}.info-mapa li.title{font-size:.85em}.info-mapa li.address,.info-mapa li.url{font-size:.7em}.info-mapa li.url{font-size:.7em}.tooltip-list{margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}",
11887
11934
  map: undefined,
11888
11935
  media: undefined
@@ -11894,7 +11941,7 @@ var __vue_inject_styles__$3 = function __vue_inject_styles__(inject) {
11894
11941
  var __vue_scope_id__$3 = undefined;
11895
11942
  /* module identifier */
11896
11943
 
11897
- var __vue_module_identifier__$3 = "data-v-257d4492";
11944
+ var __vue_module_identifier__$3 = "data-v-dded57e0";
11898
11945
  /* functional template */
11899
11946
 
11900
11947
  var __vue_is_functional_template__$3 = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.205",
3
+ "version": "0.0.208",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -3,6 +3,8 @@
3
3
  <InteratividadeFormulario
4
4
  v-if="interatividade && validateInterativity()"
5
5
  :interatividade="interatividade"
6
+ :dominio="dominio"
7
+ :anexos="anexos"
6
8
  :dictionary="dictionary"
7
9
  />
8
10
  <div v-else class="mensagem" :class="{mapa, 'hist-msg' : histMsg}">
@@ -24,6 +24,17 @@
24
24
  </div>
25
25
  </div>
26
26
  </div>
27
+ <h3 class="m-5 text-bold" v-text="`Anexos`"></h3>
28
+ <div class="d-flex flex-wrap align-items-center">
29
+ <div v-for="({ name, type, mkuDownload, mku }, fileIndex) in anexos" :key="`file-${fileIndex}`" class="mb-5 mx-5 d-flex">
30
+ <img class="box-shadow max-w-75px max-h-75px cursor-pointer" @click="openFile(mku, type)" v-if="!type" :src="`${dominio}/callcenter/docs.php?mku=${mku}`" :alt="name" :title="name" />
31
+ <fa-icon v-else :icon="returnCurrentIcon(type)" @click="openFile(mku, type)" :class="returnCurrentClass(type)" :title="name" />
32
+ <a class="d-flex align-items-end ml-3 text-dark" :href="`${dominio}/callcenter/docs.php?mku=${mkuDownload}`" :download="`${name}`" target="_blank" rel="noreferrer noopener" :title="`Download ${name}`">
33
+ <fa-icon :icon="['fas', 'download']" />
34
+ </a>
35
+ </div>
36
+ </div>
37
+ <p v-if="!anexos.length" class="text-center mb-5" v-text="`Sem anexos`"></p>
27
38
  </div>
28
39
  </template>
29
40
  </div>
@@ -44,9 +55,17 @@ export default {
44
55
  type: Object,
45
56
  required: true
46
57
  },
58
+ dominio: {
59
+ type: String,
60
+ required: true
61
+ },
47
62
  dictionary: {
48
63
  type: Object,
49
64
  required: true
65
+ },
66
+ anexos: {
67
+ type: Array,
68
+ required: false
50
69
  }
51
70
  },
52
71
  mounted(){
@@ -55,6 +74,20 @@ export default {
55
74
  }
56
75
  },
57
76
  methods: {
77
+ returnCurrentClass(isDoc) {
78
+ return `fs-2 cursor-pointer ${isDoc == 'pdf' ? 'text-red' : 'text-blue'}`
79
+ },
80
+ returnCurrentIcon(isDoc) {
81
+ return isDoc == 'pdf' ? ['fas', 'file-pdf'] : ['fas', 'file-alt']
82
+ },
83
+ openFile(url, isImg) {
84
+ const width = window.innerWidth
85
+ const height = window.innerHeight
86
+ const options = !isImg ? `width=${width},height=${height}` : "width=auto,height=auto"
87
+ let urlformatted = `${this.dominio}/callcenter/docs.php?mku=${url}`;
88
+ console.log(urlformatted)
89
+ window.open(urlformatted, "card-file", options)
90
+ },
58
91
  validateInterativity(){
59
92
  try {
60
93
  if(this.interatividade.formulario && this.interatividade.formulario.length){
@@ -190,5 +223,54 @@ export default {
190
223
  .interatividade-lista-link:hover {
191
224
  color: rgb(0, 98, 143);
192
225
  }
193
-
226
+ .text-blue {
227
+ color: #294ED3;
228
+ }
229
+ .text-red {
230
+ color: #E74C3C
231
+ }
232
+ .text-dark {
233
+ color: #333;
234
+ }
235
+ .ml-3 {
236
+ margin-left: 3px;
237
+ }
238
+ .fs-2 {
239
+ font-size: 2rem;
240
+ }
241
+ .flex-wrap {
242
+ -ms-flex-wrap: wrap;
243
+ flex-wrap: wrap;
244
+ }
245
+ .align-items-center {
246
+ -webkit-box-align: center;
247
+ -ms-flex-align: center;
248
+ align-items: center;
249
+ }
250
+ .d-flex {
251
+ display: -webkit-box;
252
+ display: -ms-flexbox;
253
+ display: flex;
254
+ }
255
+ .align-items-end {
256
+ -webkit-box-align: end;
257
+ -ms-flex-align: end;
258
+ align-items: flex-end;
259
+ }
260
+ .text-bold {
261
+ font-weight: bold;
262
+ }
263
+ .m-5 {
264
+ margin: 5px;
265
+ }
266
+ .mb-5 {
267
+ margin-bottom: 5px;
268
+ }
269
+ .mx-5 {
270
+ margin-left: 5px;
271
+ margin-right: 5px;
272
+ }
273
+ .cursor-pointer {
274
+ cursor: pointer;
275
+ }
194
276
  </style>
@@ -163,33 +163,34 @@
163
163
  if(index === "components" && Array.isArray(this.selectedTemplate[index])) {
164
164
  const arrComponents = this.selectedTemplate[index]
165
165
  arrComponents.map(component => {
166
- component.parameters.map(message => {
167
- message.currentText = message.text
168
-
169
- let keyIndex = 0
170
- while(keyIndex < keys.length) {
171
- const varName = `{{${keys[keyIndex]}}}`
172
- if(message.text.indexOf(varName) != -1) {
173
- /**Gerando os obejetos de parametros da notifica??o para o component */
174
- if(component.type === "header") {
175
- this.selectedTemplate['parameters'][component.type] = {}
176
- //Header s? pode ter uma vari?vel
177
- this.selectedTemplate['parameters'][component.type] = {
178
- tipo: "text",
179
- text: values[keyIndex]
166
+ if(component && component.parameters && component.parameters.length) {
167
+ component.parameters.map(message => {
168
+ message.currentText = message.text
169
+ let keyIndex = 0
170
+ while(keyIndex < keys.length) {
171
+ const varName = `{{${keys[keyIndex]}}}`
172
+ if(message.text.indexOf(varName) != -1) {
173
+ /**Gerando os obejetos de parametros da notificacao para o component */
174
+ if(component.type === "header") {
175
+ this.selectedTemplate['parameters'][component.type] = {}
176
+ //Header s? pode ter uma vari?vel
177
+ this.selectedTemplate['parameters'][component.type] = {
178
+ tipo: "text",
179
+ text: values[keyIndex]
180
+ }
181
+ } else if(!this.selectedTemplate['parameters'][component.type]) {
182
+ this.selectedTemplate['parameters'][component.type] = new Array()
180
183
  }
181
- } else if(!this.selectedTemplate['parameters'][component.type]) {
182
- this.selectedTemplate['parameters'][component.type] = new Array()
183
- }
184
- //Aplicando valores das v?riaveis dentro dos outros componentes com execess?o do header
185
- if(this.selectedTemplate['parameters'][component.type] && component.type !== 'header') {
186
- this.selectedTemplate['parameters'][component.type].push(values[keyIndex])
184
+ //Aplicando valores das v?riaveis dentro dos outros componentes com execess?o do header
185
+ if(this.selectedTemplate['parameters'][component.type] && component.type !== 'header') {
186
+ this.selectedTemplate['parameters'][component.type].push(values[keyIndex])
187
+ }
188
+ message.currentText = message.currentText.replace(varName, values[keyIndex])
187
189
  }
188
- message.currentText = message.currentText.replace(varName, values[keyIndex])
190
+ keyIndex++
189
191
  }
190
- keyIndex++
191
- }
192
- })
192
+ })
193
+ }
193
194
  })
194
195
  }
195
196
  }