vue-intergrall-plugins 1.0.21 → 1.0.23

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.
@@ -4903,18 +4903,12 @@ const standardMessages = {
4903
4903
  methods: {
4904
4904
  async getStandardMessages(type, token) {
4905
4905
  const url = `${baseURL}/messages/${type}?token_cliente=${token}${dev}`;
4906
+ if (!this.$root.$httpRequest) return false;
4906
4907
  try {
4907
- const response = await fetch(url, {
4908
- method: 'GET'
4909
- // headers: {
4910
- // Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VUUnd3aW00bDV3d0piTHczb2xPYWtTbWxab283Q1F2MDY3V3pWR2E3VkhDQ2FMUEdsS2VQIiwibWFuYWdlciI6Ik1LVXFCcGtGUjNCTkhrbTZ5Znd3aW00bDV3d0l2Tlk0MDZrMzQ3SVdkRnNnRUY4Y3RIaDlQdngiLCJoYXNfaW5mb3MiOnRydWUsIm5yb3MiOltdLCJhdXRoIjoiTUtVdXdGZjdjMXd3eGI0NGF3d1F4eGlia3N2NW5YR2FxOWZVNkxMYnAzQ0tkS1NHa0RvbWV4ZiIsImlhdCI6MTY0ODgxMjYzOSwiZXhwIjoxNjQ4ODk5MDM5fQ.IMpYYLoxiX566-Y2fqNlJu0qBkEyOOTWZ25UqeOyPUs"
4911
- // }
4912
- });
4913
- if (!response.ok) {
4914
- console.error('Erro na requisicao para o servidor (1)', response.statusText);
4915
- return false;
4916
- }
4917
- const value = await response.json();
4908
+ const response = await this.$root.$httpRequest.get(url);
4909
+ if (typeof response != "object" || typeof response.data != "object") return {
4910
+ msg_ret: 'Retorno incorreto das mensagens formatadas'
4911
+ };
4918
4912
  const {
4919
4913
  data
4920
4914
  } = value;
@@ -5034,7 +5028,7 @@ var script$l = {
5034
5028
  return this.showFormattedMessage(data, selectionIndex);
5035
5029
  }
5036
5030
  this.$toasted.global.defaultError({
5037
- msg: 'Problema com as mensagens formatadas. Contate o suporte.'
5031
+ msg: data && data.msg_ret ? data.msg_ret : 'Problema com as mensagens formatadas. Contate o suporte.'
5038
5032
  });
5039
5033
  this.$emit("error-standard-message");
5040
5034
  }).catch(e => {
@@ -5232,7 +5226,7 @@ var __vue_staticRenderFns__$l = [];
5232
5226
  /* style */
5233
5227
  const __vue_inject_styles__$l = function (inject) {
5234
5228
  if (!inject) return;
5235
- inject("data-v-5427991a_0", {
5229
+ inject("data-v-7bb3f22b_0", {
5236
5230
  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}",
5237
5231
  map: undefined,
5238
5232
  media: undefined
@@ -9170,13 +9164,9 @@ var script$6 = {
9170
9164
  try {
9171
9165
  const url = this.returnURL();
9172
9166
  if (!url) return;
9167
+ if (!this.$root.$httpRequest) return;
9173
9168
  const encodedURL = Buffer(url).toString("base64");
9174
- const response = await fetch(`${baseURL}/preview?url=${encodedURL}${dev}`, {
9175
- method: "get"
9176
- // headers: {
9177
- // Authorization: "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdGQiOiJNS1VGWnBQeEV1UHc5UXdvN21HU2tWNEl4VHN0blM3MHNyZUJTTWt3d3hiNDRhd3dDcWwxd09jIiwibWFuYWdlciI6Ik1LVXRhd3dpbTRsNXd3WW1LMWFJYXd3aW00bDV3d3d3eGI0NGF3d0s0a2pveHBPMnl6TFZ3dXBud3d4YjQ0YXd3cmxNNHRqZ3FKTExsTjMiLCJoYXNfaW5mb3MiOnRydWUsIm5yb3MiOlsiMjczIl0sImF1dGgiOiJNS1VncmxDdkdRbElGbXZVTERCSGplV0wyOXFVUHdyOVlSMVMyeXdJanlLOUNteCIsImlhdCI6MTY0ODQ3MzYxNSwiZXhwIjoxNjQ4NTYwMDE1fQ.KSG_6_9NfQhk5br7hnXzeLyVZuT69XLaEYF9XkdgmmQ"
9178
- // }
9179
- });
9169
+ const response = await this.$root.$httpRequest.get(`${baseURL}/preview?url=${encodedURL}${dev}`);
9180
9170
  if (typeof response != "object" || typeof response.data != "object") throw "Retorno incorreto";
9181
9171
  const {
9182
9172
  data
@@ -9268,7 +9258,7 @@ var __vue_staticRenderFns__$6 = [];
9268
9258
  /* style */
9269
9259
  const __vue_inject_styles__$6 = function (inject) {
9270
9260
  if (!inject) return;
9271
- inject("data-v-2e1c7e66_0", {
9261
+ inject("data-v-d1f3ac6c_0", {
9272
9262
  source: ".link-preview{display:flex;flex-direction:column;background-color:#eee;color:#333;cursor:pointer;margin:5px 0;border-radius:5px;opacity:.95;transition:opacity .3s ease-in-out;font-size:13.6px}.link-preview-image{display:flex;justify-content:center;align-items:center;padding:1px;border-top-left-radius:5px;border-top-right-radius:5px}.link-preview-author{margin:5px;font-size:.615em;font-weight:700}.link-preview-author.mb-0{margin-bottom:0}.link-preview-author h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.link-preview-image img{min-width:100px;max-width:200px;border-top-left-radius:5px;border-top-right-radius:5px}.link-preview-infos{background-color:#2626261a;padding:5px;margin:5px;font-size:.83em;border-radius:5px}.link-preview:hover{opacity:1}.link-preview:hover .link-preview-infos p{text-decoration:underline}",
9273
9263
  map: undefined,
9274
9264
  media: undefined