vue-intergrall-plugins 0.0.193 → 0.0.194

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.
@@ -11185,7 +11185,7 @@ var InteratividadeBotoes = __vue_component__$8;var script$4 = {
11185
11185
  var _this2 = this;
11186
11186
 
11187
11187
  return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
11188
- var url, encodedURL, response, data, st_ret, msg_ret, raspagem, description, og, theme_color, author;
11188
+ var url, encodedURL, response, data, st_ret, msg_ret, raspagem, description, og, theme_color, image, site_name, title, author;
11189
11189
  return regeneratorRuntime.wrap(function _callee$(_context) {
11190
11190
  while (1) {
11191
11191
  switch (_context.prev = _context.next) {
@@ -11241,26 +11241,32 @@ var InteratividadeBotoes = __vue_component__$8;var script$4 = {
11241
11241
  throw "".concat(st_ret, " - ").concat(msg_ret, " | (Raspagem nao encontrada no retorno)");
11242
11242
 
11243
11243
  case 16:
11244
- description = raspagem.description, og = raspagem.og, theme_color = raspagem.theme_color, author = raspagem.author;
11245
- if (author) _this2.linkPreview.author = author;
11244
+ description = raspagem.description, og = raspagem.og, theme_color = raspagem.theme_color;
11246
11245
  if (description) _this2.linkPreview.description = description;
11247
- if (og && og.image) _this2.linkPreview.imageSource = og.image;
11246
+
11247
+ if (og) {
11248
+ image = og.image, site_name = og.site_name, title = og.title, author = og.author;
11249
+ if (image) _this2.linkPreview.imageSource = image;
11250
+ if (author || site_name || title) _this2.linkPreview.author = author ? author : site_name ? site_name : title;
11251
+ if (og.description) _this2.linkPreview.description = og.description;
11252
+ }
11253
+
11248
11254
  if (theme_color) _this2.linkPreview.colorTheme = theme_color;
11249
11255
  if (_this2.linkPreview.description || _this2.linkPreview.imageSource) _this2.linkPreview.isValid = true;
11250
- _context.next = 27;
11256
+ _context.next = 26;
11251
11257
  break;
11252
11258
 
11253
- case 24:
11254
- _context.prev = 24;
11259
+ case 23:
11260
+ _context.prev = 23;
11255
11261
  _context.t0 = _context["catch"](0);
11256
11262
  console.error("Erro ao gerar o preview do link: ", _context.t0);
11257
11263
 
11258
- case 27:
11264
+ case 26:
11259
11265
  case "end":
11260
11266
  return _context.stop();
11261
11267
  }
11262
11268
  }
11263
- }, _callee, null, [[0, 24]]);
11269
+ }, _callee, null, [[0, 23]]);
11264
11270
  }))();
11265
11271
  },
11266
11272
  openUrl: function openUrl() {
@@ -11290,7 +11296,7 @@ var __vue_render__$4 = function __vue_render__() {
11290
11296
  return _vm.openUrl();
11291
11297
  }
11292
11298
  }
11293
- }, [_vm._ssrNode((_vm.linkPreview.imageSource ? "<div class=\"link-preview-image\"" + _vm._ssrStyle(null, _vm.linkPreview.colorTheme ? "background-color: " + _vm.linkPreview.colorTheme : '', null) + " data-v-87545f64><img" + _vm._ssrAttr("src", _vm.linkPreview.imageSource) + " alt=\"Imagem referente ao link\" data-v-87545f64></div>" : "<!---->") + " " + (_vm.linkPreview.author ? "<div class=\"link-preview-author\" data-v-87545f64><h1 data-v-87545f64>" + _vm._ssrEscape(_vm._s(_vm.linkPreview.author)) + "</h1></div>" : "<!---->") + " " + (_vm.linkPreview.description ? "<div class=\"link-preview-infos\" data-v-87545f64>" + (_vm.linkPreview.description ? "<p data-v-87545f64>" + _vm._ssrEscape(_vm._s(_vm.linkPreview.description)) + "</p>" : "<!---->") + "</div>" : "<!---->"))]) : _vm._e();
11299
+ }, [_vm._ssrNode((_vm.linkPreview.imageSource ? "<div class=\"link-preview-image\"" + _vm._ssrStyle(null, _vm.linkPreview.colorTheme ? "background-color: " + _vm.linkPreview.colorTheme : '', null) + " data-v-0d92e314><img" + _vm._ssrAttr("src", _vm.linkPreview.imageSource) + " alt=\"Imagem referente ao link\" data-v-0d92e314></div>" : "<!---->") + " " + (_vm.linkPreview.author ? "<div class=\"link-preview-author\" data-v-0d92e314><h1 data-v-0d92e314>" + _vm._ssrEscape(_vm._s(_vm.linkPreview.author)) + "</h1></div>" : "<!---->") + " " + (_vm.linkPreview.description ? "<div class=\"link-preview-infos\" data-v-0d92e314>" + (_vm.linkPreview.description ? "<p data-v-0d92e314>" + _vm._ssrEscape(_vm._s(_vm.linkPreview.description)) + "</p>" : "<!---->") + "</div>" : "<!---->"))]) : _vm._e();
11294
11300
  };
11295
11301
 
11296
11302
  var __vue_staticRenderFns__$4 = [];
@@ -11298,8 +11304,8 @@ var __vue_staticRenderFns__$4 = [];
11298
11304
 
11299
11305
  var __vue_inject_styles__$4 = function __vue_inject_styles__(inject) {
11300
11306
  if (!inject) return;
11301
- inject("data-v-87545f64_0", {
11302
- source: ".link-preview[data-v-87545f64]{display:flex;flex-direction:column;background-color:#eee;color:#333;cursor:pointer;margin-bottom:5px;border-radius:5px}.link-preview-image[data-v-87545f64]{display:flex;justify-content:center;align-items:center;padding:10px;margin-bottom:5px}.link-preview-author[data-v-87545f64]{margin:5px;font-size:.625em}.link-preview-image img[data-v-87545f64]{min-width:100px;max-width:200px}.link-preview-infos[data-v-87545f64]{background-color:rgba(38,38%,38%,10%);padding:5px;margin:0 5px 5px 5px;font-size:.8rem;border-radius:5px}",
11307
+ inject("data-v-0d92e314_0", {
11308
+ source: ".link-preview[data-v-0d92e314]{display:flex;flex-direction:column;background-color:#eee;color:#333;cursor:pointer;margin-bottom:5px;border-radius:5px}.link-preview-image[data-v-0d92e314]{display:flex;justify-content:center;align-items:center;padding:10px;margin-bottom:5px}.link-preview-author[data-v-0d92e314]{margin:5px;font-size:.625em}.link-preview-image img[data-v-0d92e314]{min-width:100px;max-width:200px}.link-preview-infos[data-v-0d92e314]{background-color:#2626261a;padding:5px;margin:0 5px 5px 5px;font-size:.8rem;border-radius:5px}",
11303
11309
  map: undefined,
11304
11310
  media: undefined
11305
11311
  });
@@ -11307,10 +11313,10 @@ var __vue_inject_styles__$4 = function __vue_inject_styles__(inject) {
11307
11313
  /* scoped */
11308
11314
 
11309
11315
 
11310
- var __vue_scope_id__$4 = "data-v-87545f64";
11316
+ var __vue_scope_id__$4 = "data-v-0d92e314";
11311
11317
  /* module identifier */
11312
11318
 
11313
- var __vue_module_identifier__$4 = "data-v-87545f64";
11319
+ var __vue_module_identifier__$4 = "data-v-0d92e314";
11314
11320
  /* functional template */
11315
11321
 
11316
11322
  var __vue_is_functional_template__$4 = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.193",
3
+ "version": "0.0.194",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -76,10 +76,14 @@ export default {
76
76
  const { st_ret, msg_ret, raspagem } = data
77
77
  if(st_ret != "OK") throw `${st_ret} - ${msg_ret}`
78
78
  if(!raspagem) throw `${st_ret} - ${msg_ret} | (Raspagem nao encontrada no retorno)`
79
- const { description, og, theme_color, author } = raspagem
80
- if(author) this.linkPreview.author = author
79
+ const { description, og, theme_color } = raspagem
81
80
  if(description) this.linkPreview.description = description
82
- if(og && og.image) this.linkPreview.imageSource = og.image
81
+ if(og) {
82
+ const { image, site_name, title, author } = og
83
+ if(image) this.linkPreview.imageSource = image
84
+ if(author || site_name || title) this.linkPreview.author = author ? author : site_name ? site_name : title
85
+ if(og.description) this.linkPreview.description = og.description
86
+ }
83
87
  if(theme_color) this.linkPreview.colorTheme = theme_color
84
88
 
85
89
  if(this.linkPreview.description || this.linkPreview.imageSource) this.linkPreview.isValid = true
@@ -126,7 +130,7 @@ export default {
126
130
  }
127
131
 
128
132
  .link-preview-infos {
129
- background-color: rgba(38, 38, 38, 10%);
133
+ background-color: #2626261a;
130
134
  padding: 5px;
131
135
  margin: 0 5px 5px 5px;
132
136
  font-size: .8rem;