vue-intergrall-plugins 1.0.13 → 1.0.15

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.
@@ -9359,6 +9359,12 @@ var script$5 = {
9359
9359
  if (!this.showMenu || typeof this.showMenu !== "object") return false;
9360
9360
  for (let key in this.showMenu) {
9361
9361
  if (this.showMenu.hasOwnProperty(key) && this.showMenu[key] === true) return true;
9362
+ if (key === "customButtons") {
9363
+ const hasAny = this.showMenu[key].some(({
9364
+ use
9365
+ }) => use);
9366
+ if (hasAny) return true;
9367
+ }
9362
9368
  }
9363
9369
  return false;
9364
9370
  }
@@ -9401,17 +9407,6 @@ var script$5 = {
9401
9407
  if (this.isMenuOpen) this.closeMenu();
9402
9408
  this.isEmojisOpen = !this.isEmojisOpen;
9403
9409
  },
9404
- useGPTHandler() {
9405
- if (this.isMenuOpen) this.closeMenu();
9406
- const params = {
9407
- message: this.msg
9408
- };
9409
- if (this.showMenu.gptCallback && typeof this.showMenu.gptCallback === "function") {
9410
- this.showMenu.gptCallback(params);
9411
- return;
9412
- }
9413
- this.$emit("use-gpt", params);
9414
- },
9415
9410
  addReaction(emoji) {
9416
9411
  this.messageReaction = this.messageReaction && this.messageReaction.hexa === emoji.hexa ? "" : {
9417
9412
  hexa: emoji.hexa,
@@ -9556,6 +9551,24 @@ var script$5 = {
9556
9551
  const regex = /(\n| )/g;
9557
9552
  if (regex.test(msg)) msg = msg.replace(regex, "<br>");
9558
9553
  return msg;
9554
+ },
9555
+ returnParams(params) {
9556
+ const defaultParams = {
9557
+ message: this.msg
9558
+ };
9559
+ if (!params) return defaultParams;
9560
+ const keys = params.instanceKeys.split("|");
9561
+ if (!keys || !keys.length) return {
9562
+ defaultParams,
9563
+ ...params.values
9564
+ };
9565
+ const customParams = {
9566
+ ...params.values
9567
+ };
9568
+ keys.forEach(key => {
9569
+ if (this[key]) customParams[key] = this[key];else console.warn(`Cant find ${key} on 'this' instance`);
9570
+ });
9571
+ return Object.keys(customParams).length ? customParams : defaultParams;
9559
9572
  }
9560
9573
  }
9561
9574
  };
@@ -9907,23 +9920,33 @@ var __vue_render__$5 = function () {
9907
9920
  attrs: {
9908
9921
  "icon": ['fas', 'smile']
9909
9922
  }
9910
- })], 1) : _vm._e(), _vm._v(" "), _vm.showMenu.useGPT ? _c('span', {
9911
- directives: [{
9912
- name: "tippy",
9913
- rawName: "v-tippy"
9914
- }],
9915
- staticClass: "menu-mensagem",
9916
- attrs: {
9917
- "content": _vm.dictionary.tit_use_gpt
9918
- },
9919
- on: {
9920
- "click": _vm.useGPTHandler
9921
- }
9922
- }, [_c('fa-icon', {
9923
- attrs: {
9924
- "icon": ['fas', 'question-circle']
9925
- }
9926
- })], 1) : _vm._e()]) : _vm._e(), _vm._v(" "), _vm.isEmojisOpen ? _c('div', {
9923
+ })], 1) : _vm._e(), _vm._v(" "), _vm.showMenu.customButtons && _vm.showMenu.customButtons.length ? _vm._l(_vm.showMenu.customButtons, function (button, index) {
9924
+ return _c('span', {
9925
+ directives: [{
9926
+ name: "show",
9927
+ rawName: "v-show",
9928
+ value: button.use,
9929
+ expression: "button.use"
9930
+ }, {
9931
+ name: "tippy",
9932
+ rawName: "v-tippy"
9933
+ }],
9934
+ key: button.id || index,
9935
+ class: "" + (button.customClass || 'menu-mensagem'),
9936
+ attrs: {
9937
+ "content": button.tippyContent
9938
+ },
9939
+ on: {
9940
+ "click": function ($event) {
9941
+ button.callback(_vm.returnParams(button.params));
9942
+ }
9943
+ }
9944
+ }, [_c('fa-icon', {
9945
+ attrs: {
9946
+ "icon": ['fas', button.icon || 'question-circle']
9947
+ }
9948
+ })], 1);
9949
+ }) : _vm._e()], 2) : _vm._e(), _vm._v(" "), _vm.isEmojisOpen ? _c('div', {
9927
9950
  directives: [{
9928
9951
  name: "on-clickaway",
9929
9952
  rawName: "v-on-clickaway",
@@ -9990,7 +10013,7 @@ var __vue_staticRenderFns__$5 = [];
9990
10013
  /* style */
9991
10014
  const __vue_inject_styles__$5 = function (inject) {
9992
10015
  if (!inject) return;
9993
- inject("data-v-73ca470f_0", {
10016
+ inject("data-v-bb67a87c_0", {
9994
10017
  source: ":root{--message-color:#373737;--text-color:#fff;--files-bg:rgba(255, 255, 255, 0.1);--files-bg-hover:rgba(255, 255, 255, 0.1);--light:80;--threshold:60}.fade-enter-active,.fade-leave-active{transition:opacity .5s}.fade-enter,.fade-leave-to{opacity:0}.mensagem-reply{padding:5px 10px;font-size:12px;color:#666;transition:background-color 150ms ease-in-out;border-radius:5px;margin:5px 0;overflow:hidden;max-width:100%}.mensagem-reply p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-reply-principal{border-left:3px solid transparent;background-color:rgba(100,100,100,.1)}.message-reply-principal:hover{background-color:rgba(100,100,100,.2)}.message-reply-outros{background-color:#f5f5f5;border-left:3px solid var(--message-color)}.message-reply-outros:hover{background-color:#ebebeb}.mensagem-reply-vazia{display:flex;align-items:center}.mensagem-reply-vazia svg{margin-right:5px;color:#ba181b}.mensagem{padding:20px 7px 14px 7px;border-radius: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:12px;word-break:break-word;-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-moz-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mensagem.max-w-60{max-width:60%}.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:hover .menu-primario{visibility:visible;opacity:1}.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:9.6px;color:#67a332;width:14.4px;height:14.4px;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:11.2px}.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:6.4px;width:11.2px}.default-stick-size{width:180px;height:auto}.horario-envio{margin-right:15px;font-size:11.2px;position:absolute;left:10px;bottom:2px}.autor-mensagem{position:absolute;font-size:9.6px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:90%;font-weight:700;top:2px}.menu-primario{visibility:hidden;opacity:0;transition:opacity 150ms ease-in-out;position:absolute;font-size:11.2px;top:3px;display:flex;gap:5px;padding:2px 4px}.menu-primario.principal{left:4px;color:var(--text-color);background-color:var(--message-color)}.menu-primario.outros{right:4px;color:var(--text-color);background-color:#fff}.menu-primario.outros>span:nth-child(1){order:10}.menu-mensagem{cursor:pointer;padding:1px}.menu-flutuante{background-color:#fff;-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-moz-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);border-radius:10px;position:absolute;top:20px;width:120px;min-height:50px;height:50px;max-height:50px;overflow-x:hidden;overflow-y:auto;margin:0;padding:0;display:flex;flex-direction:column;z-index:1}.menu-flutuante.principal{left:3px}.menu-flutuante.outros{right:3px}.menu-flutuante li{transition:background-color .3s ease-in-out;width:100%;cursor:pointer;padding:5px 10px;display:flex;align-items:center}.menu-flutuante li:hover{background-color:#e9e9e9}.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:var(--text-color)}.mensagem__principal>.mensagem .horario-envio{color:var(--text-color)}.mensagem__principal>.mensagem .autor-mensagem{right:5px;color:var(--text-color)}.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:.85em}.info-mapa li.url{font-size:.85em}.tooltip-list{margin:0;padding:0;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.emoji-message-container{position:absolute;top:0;z-index:1;width:300px;height:250px}.emoji-message-container .sm-emoji-picker{width:300px;height:250px}.emoji-message-container .sm-emoji-picker .sm-emoji-header{overflow-x:auto;overflow-y:hidden}.reaction{position:absolute;bottom:0;border-radius:50%;display:flex;justify-content:center;align-items:center;background-color:rgba(100,100,100,.4);padding:5px;font-size:1.3em;min-width:1.8em;min-height:1.8em;max-width:1.8em;max-height:1.8em}.reaction>span{display:block;transform:translateY(-1px)}.mensagem__outros .reaction{right:-30px}.mensagem__principal .reaction{left:-30px}",
9995
10018
  map: undefined,
9996
10019
  media: undefined