vue-intergrall-plugins 1.0.93 → 1.0.95

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.
@@ -4806,12 +4806,12 @@ var __vue_component__$x = /*#__PURE__*/normalizeComponent({
4806
4806
  render: __vue_render__$o,
4807
4807
  staticRenderFns: __vue_staticRenderFns__$o
4808
4808
  }, __vue_inject_styles__$o, __vue_script__$o, __vue_scope_id__$o, __vue_is_functional_template__$o, __vue_module_identifier__$o, false, undefined, undefined, undefined);
4809
- var RemainingCharacters = __vue_component__$x;var domain = window.location.hostname == 'localhost' ? "https://linux07" : "https://".concat(window.location.hostname) + "/im";
4809
+ var RemainingCharacters = __vue_component__$x;var domain = window.location.hostname == "localhost" ? "https://linux07" : "https://".concat(window.location.hostname) + "/im";
4810
4810
  var route = "/smartChannel/v1/api.php";
4811
4811
  // const route = `atdHumano/middleware/smartchannel_api.php`
4812
4812
 
4813
4813
  var baseURL = "".concat(domain).concat(route);
4814
- var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var standardMessages = {
4814
+ var dev = window.location.hostname == "localhost" ? "&teste=eloteste" : "";var standardMessages = {
4815
4815
  methods: {
4816
4816
  getStandardMessages: function getStandardMessages(type, token) {
4817
4817
  var _this = this;
@@ -4820,7 +4820,7 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
4820
4820
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4821
4821
  while (1) switch (_context.prev = _context.next) {
4822
4822
  case 0:
4823
- url = "".concat(baseURL, "/messages/").concat(type, "?token_cliente=").concat(token).concat(dev);
4823
+ url = "".concat(baseURL, "/messages/").concat(type, "?token_cliente=").concat(token).concat(_this.$root.$reqTeste || dev);
4824
4824
  if (_this.$root.$httpRequest) {
4825
4825
  _context.next = 3;
4826
4826
  break;
@@ -4837,19 +4837,20 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
4837
4837
  break;
4838
4838
  }
4839
4839
  return _context.abrupt("return", {
4840
- msg_ret: 'Retorno incorreto das mensagens formatadas'
4840
+ msg_ret: "Retorno incorreto das mensagens formatadas",
4841
+ error: true
4841
4842
  });
4842
4843
  case 9:
4843
4844
  data = response.data;
4844
4845
  tipo = data.tipo, nivel = data.nivel, conteudo = data.conteudo, msg_ret = data.msg_ret, st_ret = data.st_ret;
4845
- if (tipo) _this.$emit('set-message-type', tipo);
4846
- if (!(st_ret === 'OK')) {
4846
+ if (tipo) _this.$emit("set-message-type", tipo);
4847
+ if (!(st_ret === "OK")) {
4847
4848
  _context.next = 16;
4848
4849
  break;
4849
4850
  }
4850
4851
  return _context.abrupt("return", conteudo ? conteudo : nivel);
4851
4852
  case 16:
4852
- if (!(st_ret === 'AVISO')) {
4853
+ if (!(st_ret === "AVISO")) {
4853
4854
  _context.next = 20;
4854
4855
  break;
4855
4856
  }
@@ -4858,8 +4859,12 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
4858
4859
  });
4859
4860
  case 20:
4860
4861
  return _context.abrupt("return", msg_ret ? {
4861
- msg_ret: msg_ret
4862
- } : false);
4862
+ msg_ret: msg_ret,
4863
+ error: true
4864
+ } : {
4865
+ msg_ret: "Erro ao buscar mensagens formatadas",
4866
+ error: true
4867
+ });
4863
4868
  case 21:
4864
4869
  _context.next = 27;
4865
4870
  break;
@@ -4868,7 +4873,8 @@ var dev = window.location.hostname == 'localhost' ? '&teste=levchat2' : '';var s
4868
4873
  _context.t0 = _context["catch"](3);
4869
4874
  console.error("Erro na requisicao para o servidor (2)", _context.t0);
4870
4875
  return _context.abrupt("return", {
4871
- msg_ret: _context.t0.message ? _context.t0.message : _context.t0
4876
+ msg_ret: _context.t0.message ? _context.t0.message : _context.t0,
4877
+ error: true
4872
4878
  });
4873
4879
  case 27:
4874
4880
  case "end":
@@ -4966,15 +4972,20 @@ var script$n = {
4966
4972
  this.getStandardMessages(cod, this.token_cliente).then(function (data) {
4967
4973
  _this.loadingReq = false;
4968
4974
  if (data) {
4969
- if (data.msg_ret) return _this.$toasted.global.defaultInfo({
4970
- msg: data.msg_ret
4971
- });
4975
+ if (data.msg_ret) {
4976
+ if (data.error) throw new Error(data.msg_ret);
4977
+ return _this.$toasted.global.defaultInfo({
4978
+ msg: data.msg_ret
4979
+ });
4980
+ }
4972
4981
  return _this.showFormattedMessage(data, selectionIndex);
4973
4982
  }
4974
4983
  _this.$toasted.global.defaultError({
4975
4984
  msg: data && data.msg_ret ? data.msg_ret : 'Problema com as mensagens formatadas. Contate o suporte.'
4976
4985
  });
4977
4986
  _this.$emit("error-standard-message");
4987
+ _this.closeStandardMessages();
4988
+ _this.loadingReq = false;
4978
4989
  }).catch(function (e) {
4979
4990
  _this.loadingReq = false;
4980
4991
  _this.$toasted.global.defaultError({
@@ -5166,7 +5177,7 @@ var __vue_staticRenderFns__$n = [];
5166
5177
  /* style */
5167
5178
  var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
5168
5179
  if (!inject) return;
5169
- inject("data-v-7bb3f22b_0", {
5180
+ inject("data-v-7abf5d83_0", {
5170
5181
  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}",
5171
5182
  map: undefined,
5172
5183
  media: undefined
@@ -5175,7 +5186,7 @@ var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
5175
5186
  /* scoped */
5176
5187
  var __vue_scope_id__$n = undefined;
5177
5188
  /* module identifier */
5178
- var __vue_module_identifier__$n = "data-v-7bb3f22b";
5189
+ var __vue_module_identifier__$n = "data-v-7abf5d83";
5179
5190
  /* functional template */
5180
5191
  var __vue_is_functional_template__$n = false;
5181
5192
  /* style inject shadow dom */
@@ -6331,6 +6342,10 @@ var script$j = {
6331
6342
  type: Boolean,
6332
6343
  required: false
6333
6344
  },
6345
+ externalFiles: {
6346
+ type: Array,
6347
+ required: false
6348
+ },
6334
6349
  buttons: {
6335
6350
  type: Object,
6336
6351
  default: function _default() {
@@ -6566,6 +6581,12 @@ var script$j = {
6566
6581
  console.error("Erro ao inserir emoji");
6567
6582
  console.error(e);
6568
6583
  }
6584
+ },
6585
+ openFileSystem: function openFileSystem() {
6586
+ this.$emit("open-file-system");
6587
+ },
6588
+ resetFileSystem: function resetFileSystem() {
6589
+ this.$emit("reset-file-system");
6569
6590
  }
6570
6591
  }
6571
6592
  };/* script */
@@ -6616,11 +6637,20 @@ var __vue_render__$j = function __vue_render__() {
6616
6637
  attrs: {
6617
6638
  "textId": _vm.identifier,
6618
6639
  "dictionary": _vm.dictionary,
6619
- "fileSettings": _vm.fileSettings
6640
+ "fileSettings": _vm.fileSettings,
6641
+ "externalFiles": _vm.externalFiles
6620
6642
  },
6621
6643
  on: {
6622
6644
  "set-file-vars": _vm.setFileVars,
6623
- "open-image": _vm.openImage
6645
+ "open-image": _vm.openImage,
6646
+ "open-file-system": _vm.openFileSystem,
6647
+ "reset-file-system": _vm.resetFileSystem,
6648
+ "handle-file-preview": function handleFilePreview($event) {
6649
+ return _vm.$emit('handle-file-preview');
6650
+ },
6651
+ "handle-file-click": function handleFileClick($event) {
6652
+ return _vm.$emit('handle-file-click');
6653
+ }
6624
6654
  }
6625
6655
  }) : _vm._e(), _vm._ssrNode(" "), _vm._t("btn-1"), _vm._ssrNode(" "), _vm._t("btn-2")], 2)], 2)], 2);
6626
6656
  };
@@ -6629,7 +6659,7 @@ var __vue_staticRenderFns__$j = [];
6629
6659
  /* style */
6630
6660
  var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
6631
6661
  if (!inject) return;
6632
- inject("data-v-10a72dda_0", {
6662
+ inject("data-v-dfb9c5ae_0", {
6633
6663
  source: ".expand-textarea{position:relative;width:90%;height:90%;z-index:1}.expand-textarea-content{overflow-x:hidden;overflow-y:auto;background-color:#fff;width:100%;height:100%;display:flex;flex-direction:column}.expand-textarea-title{padding:2.5px 8px;min-height:38px;display:flex;align-items:center;width:100%;font-size:20.8px;background-color:#222;color:#fff}.expand-textarea-content textarea{padding:10px;flex:1;width:100%;border:unset;resize:none;outline:0;overflow-x:hidden}.expand-textarea-content textarea:active,.expand-textarea-content textarea:hover{outline:0}.expand-textarea-footer{display:flex;justify-content:flex-end;align-items:center;padding:10px;background-color:#f7f7f7;position:relative}.expand-textarea-footer .old-footer-preview-container{position:absolute;top:-200px;right:145px;height:200px;background:#f7f7f7}.expand-textarea-footer .text-footer-actions--btn{width:36px;height:36px;border-radius:50%;background-color:rgba(255,255,255,0);color:#333;padding:2.5px;margin:0 15px 0 10px;display:flex;justify-content:center;align-items:center;font-size:20.8px;cursor:pointer;opacity:.9;transition:all .3s}.expand-textarea-footer .text-footer-actions--btn:hover{opacity:1;background-color:rgba(30,30,30,.1)}.expand-textarea-button{width:125px;height:30px;display:flex;justify-content:center;align-items:center;transition-duration:.3s;user-select:none;cursor:pointer;box-shadow:inset 0 -2px rgba(0,0,0,.2);opacity:.9;border-radius:5px;padding:5px 10px;border-radius:2.5px;position:relative}.expand-textarea-button.green{background-color:#2a963a;color:#fff;margin-right:10px}.expand-textarea-button.red{background-color:#e74c3c;color:#fff}.expand-textarea-button:hover{opacity:1}.expand-textarea-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)}.expand-textarea-button.carregando{background-color:#777}",
6634
6664
  map: undefined,
6635
6665
  media: undefined
@@ -6638,7 +6668,7 @@ var __vue_inject_styles__$j = function __vue_inject_styles__(inject) {
6638
6668
  /* scoped */
6639
6669
  var __vue_scope_id__$j = undefined;
6640
6670
  /* module identifier */
6641
- var __vue_module_identifier__$j = "data-v-10a72dda";
6671
+ var __vue_module_identifier__$j = "data-v-dfb9c5ae";
6642
6672
  /* functional template */
6643
6673
  var __vue_is_functional_template__$j = false;
6644
6674
  /* style inject shadow dom */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -10,7 +10,9 @@
10
10
  <BtnEmojis v-show="buttons.hasEmojis" :ref="`${identifier}-emojis`" :emojiId="`${identifier}-em`" :left="false"
11
11
  @insert-emoji="insertEmoji" />
12
12
  <BtnFiles v-if="buttons.hasFiles" :textId="identifier" :dictionary="dictionary" :fileSettings="fileSettings"
13
- :ref="`${identifier}-file`" @set-file-vars="setFileVars" @open-image="openImage" />
13
+ :ref="`${identifier}-file`" :externalFiles="externalFiles" @set-file-vars="setFileVars"
14
+ @open-image="openImage" @open-file-system="openFileSystem" @reset-file-system="resetFileSystem"
15
+ @handle-file-preview="$emit('handle-file-preview')" @handle-file-click="$emit('handle-file-click')" />
14
16
  <slot name="btn-1"></slot>
15
17
  <slot name="btn-2"></slot>
16
18
  <!-- "expand-textarea-button" -->
@@ -23,7 +25,6 @@
23
25
  import Clickaway from "@/directives/clickaway";
24
26
  import BtnEmojis from "./BtnEmojis";
25
27
  import BtnFiles from "./BtnFiles";
26
- import { returnMessageWithHexa } from "../../services/textFormatting";
27
28
 
28
29
  export default {
29
30
  components: { BtnEmojis, BtnFiles },
@@ -43,6 +44,10 @@ export default {
43
44
  type: Boolean,
44
45
  required: false,
45
46
  },
47
+ externalFiles: {
48
+ type: Array,
49
+ required: false,
50
+ },
46
51
  buttons: {
47
52
  type: Object,
48
53
  default: () => {
@@ -279,6 +284,12 @@ export default {
279
284
  console.error(e);
280
285
  }
281
286
  },
287
+ openFileSystem() {
288
+ this.$emit("open-file-system");
289
+ },
290
+ resetFileSystem() {
291
+ this.$emit("reset-file-system");
292
+ },
282
293
  },
283
294
  };
284
295
  </script>
@@ -141,11 +141,17 @@ export default {
141
141
  this.getStandardMessages(cod, this.token_cliente).then((data) => {
142
142
  this.loadingReq = false
143
143
  if (data) {
144
- if (data.msg_ret) return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
144
+ if (data.msg_ret) {
145
+ if (data.error) throw new Error(data.msg_ret)
146
+
147
+ return this.$toasted.global.defaultInfo({ msg: data.msg_ret })
148
+ }
145
149
  return this.showFormattedMessage(data, selectionIndex)
146
150
  }
147
151
  this.$toasted.global.defaultError({ msg: data && data.msg_ret ? data.msg_ret : 'Problema com as mensagens formatadas. Contate o suporte.' })
148
152
  this.$emit("error-standard-message")
153
+ this.closeStandardMessages()
154
+ this.loadingReq = false
149
155
  }).catch(e => {
150
156
  this.loadingReq = false
151
157
  this.$toasted.global.defaultError({ msg: e && e.message ? e.message : e })