vue-intergrall-plugins 0.0.264 → 0.0.266

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.
@@ -1868,6 +1868,46 @@ var createPopper = /*#__PURE__*/popperGenerator({
1868
1868
  //
1869
1869
  //
1870
1870
  //
1871
+ //
1872
+ //
1873
+ //
1874
+ //
1875
+ //
1876
+ //
1877
+ //
1878
+ //
1879
+ //
1880
+ //
1881
+ //
1882
+ //
1883
+ //
1884
+ //
1885
+ //
1886
+ //
1887
+ //
1888
+ //
1889
+ //
1890
+ //
1891
+ //
1892
+ //
1893
+ //
1894
+ //
1895
+ //
1896
+ //
1897
+ //
1898
+ //
1899
+ //
1900
+ //
1901
+ //
1902
+ //
1903
+ //
1904
+ //
1905
+ //
1906
+ //
1907
+ //
1908
+ //
1909
+ //
1910
+ //
1871
1911
  var script$y = {
1872
1912
  data: function data() {
1873
1913
  return {
@@ -1875,7 +1915,9 @@ var script$y = {
1875
1915
  regexVars: /{{var_\d}}/g,
1876
1916
  lastVar: 0,
1877
1917
  htmlInputString: "<input type='text' class='input-var input-var-".concat(this.identifier, "' autocomplete='off' />"),
1878
- varListValues: ""
1918
+ varListValues: "",
1919
+ acceptedExtensions: "audio/aac, audio/mp4, audio/mpeg, audio/amr, audio/ogg, text/plain, application/pdf, application/vnd.ms-powerpoint, application/msword, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreasheetml.sheet, image/jpeg, image/png, video/mp4, video/3gp, image/webp",
1920
+ headerFiles: []
1879
1921
  };
1880
1922
  },
1881
1923
  props: {
@@ -1907,12 +1949,35 @@ var script$y = {
1907
1949
  required: true
1908
1950
  }
1909
1951
  },
1952
+ computed: {
1953
+ hasFooterComponent: function hasFooterComponent() {
1954
+ if (!this.template.components || !this.template.components.length) return false;
1955
+ var types = [];
1956
+ this.template.components.forEach(function (_ref) {
1957
+ var type = _ref.type;
1958
+ return types.push(type);
1959
+ });
1960
+ if (types.includes('footer')) return true;
1961
+ return false;
1962
+ },
1963
+ hasButtonOrFooterComponent: function hasButtonOrFooterComponent() {
1964
+ if (!this.template.components || !this.template.components.length) return false;
1965
+ var types = [];
1966
+ this.template.components.forEach(function (_ref2) {
1967
+ var type = _ref2.type;
1968
+ return types.push(type);
1969
+ });
1970
+ if (types.includes('button')) return true;
1971
+ return this.hasFooterComponent;
1972
+ }
1973
+ },
1910
1974
  created: function created() {
1911
1975
  this.$root.$refs["template-single-".concat(this.identifier)] = this;
1912
1976
  },
1913
1977
  mounted: function mounted() {
1914
1978
  if (this.allVariables) this.getListOpts();
1915
1979
  this.setInputs();
1980
+ this.setImageVar(false);
1916
1981
  },
1917
1982
  updated: function updated() {
1918
1983
  this.lastVar = 0;
@@ -1941,42 +2006,163 @@ var script$y = {
1941
2006
  target: input
1942
2007
  }, input.id.replace(/[{}]+/g, ''));
1943
2008
  });
2009
+ this.setImageVar(false);
1944
2010
  },
1945
2011
  getListOpts: function getListOpts() {
1946
2012
  this.varListValues = "<ul class=\"ts-dropdown\">\n <li> nome </li>\n ".concat(this.allVariables ? '<li> telefone </li>' : '', "\n </ul>");
1947
2013
  },
1948
- setInputs: function setInputs() {
2014
+ fileUpload: function fileUpload(event) {
1949
2015
  var _this2 = this;
1950
2016
 
2017
+ try {
2018
+ var allFiles = event.target.files ? event.target.files : event.dataTransfer.files ? event.dataTransfer.files : false;
2019
+ if (!allFiles || !allFiles.length) return this.setImageVar(false);
2020
+
2021
+ if (allFiles.length > 1) {
2022
+ this.$toasted.global.defaultInfo({
2023
+ msg: "Limite de 1 arquivo por vez"
2024
+ });
2025
+ return this.setImageVar(false);
2026
+ }
2027
+
2028
+ var file = allFiles[0];
2029
+ var type = file.type,
2030
+ name = file.name;
2031
+ var validTypes = ['audio/aac', 'audio/mp4', 'audio/mpeg', 'audio/amr', 'audio/ogg', 'text/plain', 'application/pdf', 'application/vnd.ms-powerpoint', 'application/msword', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.openxmlformats-officedocument.spreasheetml.sheet', 'image/jpeg', 'image/png', 'video/mp4', 'video/3gp', 'image/webp'];
2032
+
2033
+ if (!validTypes.includes(type)) {
2034
+ this.$toasted.global.defaultInfo({
2035
+ msg: "(".concat(type, ") ").concat(this.dictionary.msg_arquivo_invalido)
2036
+ });
2037
+ return this.setImageVar(false);
2038
+ }
2039
+
2040
+ var returnArrType = function returnArrType(str) {
2041
+ var arr = [];
2042
+ validTypes.forEach(function (currentType) {
2043
+ if (currentType.indexOf(str) > -1) arr.push(currentType);
2044
+ });
2045
+ return arr;
2046
+ };
2047
+
2048
+ var imageTypes = returnArrType('image/');
2049
+ var docTypes = returnArrType('application/');
2050
+ var audioTypes = returnArrType('audio/');
2051
+ var videoTypes = returnArrType('video/');
2052
+ var isPdf = type.indexOf('application/pdf') > -1;
2053
+ var sizeInBytes = 0;
2054
+ Array.from(allFiles).forEach(function (file) {
2055
+ return sizeInBytes += file.size;
2056
+ });
2057
+ var sizeInMb = parseFloat((sizeInBytes / (1024 * 1024)).toFixed(2));
2058
+
2059
+ if (sizeInMb == 0 && sizeInBytes == 0) {
2060
+ this.$toasted.global.defaultInfo({
2061
+ msg: this.dictionary.msg_arquivo_invalido
2062
+ });
2063
+ return this.setImageVar(false);
2064
+ }
2065
+
2066
+ var max = imageTypes.includes(type) ? 5 : 15;
2067
+
2068
+ if (sizeInMb >= max) {
2069
+ this.$toasted.global.defaultInfo({
2070
+ msg: "Limite de ".concat(max, " MB por arquivo")
2071
+ });
2072
+ return this.setImageVar(false);
2073
+ }
2074
+
2075
+ var fileReader = new FileReader();
2076
+ var current_icon = 'file-alt',
2077
+ current_color = 'blue',
2078
+ setValues = true;
2079
+
2080
+ if (imageTypes.includes(type)) {
2081
+ setValues = false;
2082
+ fileReader.readAsDataURL(file);
2083
+
2084
+ fileReader.onload = function () {
2085
+ var image_preview = fileReader.result;
2086
+ current_icon = 'image';
2087
+ current_color = 'purple';
2088
+ _this2.headerFiles[0] = {
2089
+ file: file,
2090
+ image_preview: image_preview,
2091
+ current_icon: current_icon,
2092
+ current_color: current_color,
2093
+ name: name
2094
+ };
2095
+
2096
+ _this2.$forceUpdate();
2097
+
2098
+ _this2.setImageVar(file);
2099
+ };
2100
+ } else if (docTypes.includes(type) && isPdf) {
2101
+ current_icon = 'file-pdf';
2102
+ current_color = 'red';
2103
+ } else if (audioTypes.includes(type)) {
2104
+ current_icon = 'microphone';
2105
+ current_color = 'black';
2106
+ } else if (videoTypes.includes(type)) {
2107
+ current_icon = 'video', current_color = 'black';
2108
+ }
2109
+
2110
+ if (setValues) {
2111
+ this.headerFiles[0] = {
2112
+ file: file,
2113
+ current_icon: current_icon,
2114
+ current_color: current_color,
2115
+ name: name
2116
+ };
2117
+ this.$forceUpdate();
2118
+ this.setImageVar(file);
2119
+ }
2120
+ } catch (error) {
2121
+ console.error("Erro file upload: ", error);
2122
+ }
2123
+ },
2124
+ triggerInputFile: function triggerInputFile(origin) {
2125
+ if (this.$refs["ts-input-".concat(origin)]) {
2126
+ var elem = this.$refs["ts-input-".concat(origin)][0] ? this.$refs["ts-input-".concat(origin)][0] : this.$refs["ts-input-".concat(origin)];
2127
+ elem && elem.click();
2128
+ }
2129
+ },
2130
+ setInputs: function setInputs() {
2131
+ var _this3 = this;
2132
+
1951
2133
  var qtdInputs = 0;
1952
2134
  var header = document.querySelector("#template_header");
1953
2135
  var body = document.querySelector("#template_body");
1954
2136
  var footer = document.querySelector("#template_footer");
2137
+ var hasText = false;
1955
2138
 
1956
2139
  if (header !== null) {
1957
2140
  header.querySelectorAll(".input-var-".concat(this.identifier)).forEach(function (input) {
1958
- _this2.setEvent(input);
2141
+ _this3.setEvent(input);
1959
2142
  });
1960
2143
  qtdInputs += header.querySelectorAll(".input-var-".concat(this.identifier)).length;
2144
+ if (qtdInputs > 0 && header.innerText) hasText = true;
1961
2145
  }
1962
2146
 
1963
2147
  if (this.lastVar === 0) this.lastVar += 1;
1964
2148
 
1965
2149
  if (body !== null) {
1966
2150
  body.querySelectorAll(".input-var-".concat(this.identifier)).forEach(function (input) {
1967
- _this2.setEvent(input);
2151
+ _this3.setEvent(input);
1968
2152
  });
1969
2153
  qtdInputs += body.querySelectorAll(".input-var-".concat(this.identifier)).length;
2154
+ if (qtdInputs > 0 && body.innerText) hasText = true;
1970
2155
  }
1971
2156
 
1972
2157
  if (footer !== null) {
1973
2158
  footer.querySelectorAll(".input-var-".concat(this.identifier)).forEach(function (input) {
1974
- _this2.setEvent(input);
2159
+ _this3.setEvent(input);
1975
2160
  });
1976
2161
  qtdInputs += footer.querySelectorAll(".input-var-".concat(this.identifier)).length;
2162
+ if (qtdInputs > 0 && footer.innerText) hasText = true;
1977
2163
  }
1978
2164
 
1979
- if (qtdInputs === 1) {
2165
+ if (qtdInputs === 1 && !hasText) {
1980
2166
  document.querySelector(".input-var-".concat(this.identifier)).parentElement.style.width = "100%";
1981
2167
  document.querySelector(".input-var-".concat(this.identifier)).style.width = "100%";
1982
2168
  } else if (qtdInputs === 0) {
@@ -1984,14 +2170,14 @@ var script$y = {
1984
2170
  }
1985
2171
  },
1986
2172
  setEvent: function setEvent(input) {
1987
- var _this3 = this;
2173
+ var _this4 = this;
1988
2174
 
1989
2175
  var varList = input.nextSibling;
1990
2176
  var currentInstance = this;
1991
2177
  input.setAttribute("placeholder", "{{var_".concat(this.lastVar, "}}"));
1992
2178
  input.setAttribute("id", "{{var_".concat(this.lastVar, "}}"));
1993
2179
  input.addEventListener("input", function (event) {
1994
- _this3.setVar(event, "var_".concat(_this3.lastVar), true);
2180
+ _this4.setVar(event, "var_".concat(_this4.lastVar), true);
1995
2181
 
1996
2182
  if (varList) varList.classList.remove("visible");
1997
2183
  });
@@ -2014,7 +2200,7 @@ var script$y = {
2014
2200
  });
2015
2201
  }
2016
2202
 
2017
- if (!stop && _this3.$refs["template-single-button"]) _this3.$refs["template-single-button"].focus();
2203
+ if (!stop && _this4.$refs["template-single-button"]) _this4.$refs["template-single-button"].focus();
2018
2204
  };
2019
2205
 
2020
2206
  for (var i = 0; i < varList.children.length; i++) {
@@ -2040,7 +2226,7 @@ var script$y = {
2040
2226
  });
2041
2227
  input.addEventListener("blur", function () {
2042
2228
  if (input.value) {
2043
- if (_this3.isValid(input.value)) {
2229
+ if (_this4.isValid(input.value)) {
2044
2230
  input.classList.add("active");
2045
2231
  } else {
2046
2232
  input.classList.add("invalid");
@@ -2053,7 +2239,7 @@ var script$y = {
2053
2239
  if (varList) varList.classList.remove("visible");
2054
2240
  });
2055
2241
  input.addEventListener("keydown", function (event) {
2056
- if (event.keyCode == 13 && _this3.hasButton) _this3.$emit("click-trigger");
2242
+ if (event.keyCode == 13 && _this4.hasButton) _this4.$emit("click-trigger");
2057
2243
  });
2058
2244
  this.lastVar += 1;
2059
2245
  },
@@ -2085,6 +2271,22 @@ var script$y = {
2085
2271
 
2086
2272
  return isValueValid;
2087
2273
  },
2274
+ setImageVar: function setImageVar(file) {
2275
+ var _this5 = this;
2276
+
2277
+ this.$emit("set-file-var", file);
2278
+
2279
+ if (!file) {
2280
+ this.headerFiles = [];
2281
+ return this.$forceUpdate();
2282
+ } else {
2283
+ if (this.lastVar == 0) return this.$emit("set-vars", this.template);
2284
+ if (Object.keys(this.varValues).length) return this.$emit("set-vars", this.varValues);
2285
+ this.$nextTick(function () {
2286
+ return _this5.handleInitialFocus();
2287
+ });
2288
+ }
2289
+ },
2088
2290
  setVar: function setVar(event, key, notificar) {
2089
2291
  if (event && event.target) {
2090
2292
  key = event.target.id.replace(/[{}]+/g, '');
@@ -2189,17 +2391,55 @@ var __vue_render__$y = function __vue_render__() {
2189
2391
 
2190
2392
  return _c('div', {
2191
2393
  staticClass: "ts-container"
2192
- }, [_vm._ssrNode("<div class=\"ts-content\">" + _vm._ssrList(_vm.template.components, function (component, cIndex) {
2193
- return "<div>" + (component.type === 'header' ? "<header id=\"template_header\">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2194
- return "<div>" + (param.type === 'text' ? _vm.regexVars.test(param.text) ? "<div>" + _vm._s(param.text.replace(_vm.regexVars, "<div class='ts-content__var'>" + _vm.htmlInputString + _vm.varListValues + "</div>")) + "</div>" : "<p>" + _vm._s(param.text) + "</p>" : "<!---->") + "</div>";
2195
- }) + "</header>" : "<!---->") + " " + (component.type === 'body' ? "<section id=\"template_body\"" + _vm._ssrClass(null, {
2196
- 'margin-bottom': _vm.template.components.length === 2
2197
- }) + ">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2394
+ }, [_vm._ssrNode("<div class=\"ts-content\">", "</div>", _vm._l(_vm.template.components, function (component, cIndex) {
2395
+ return _vm._ssrNode("<div" + _vm._ssrClass(null, "" + (component.type == 'footer' ? 'order-1 custom-box-shadow-bottom' : '') + (_vm.template.components.length == 1 ? 'custom-box-shadow-bottom' : '')) + ">", "</div>", [component.type === 'header' ? _vm._ssrNode("<header id=\"template_header\"" + _vm._ssrClass(null, "" + (_vm.template.components.length == 1 ? 'border-radius-5 custom-border-gray' : '')) + ">", "</header>", _vm._l(component.parameters, function (param, pIndex) {
2396
+ return _vm._ssrNode("<div>", "</div>", [param.type === 'text' ? [_vm._ssrNode(_vm.regexVars.test(param.text) ? "<div>" + _vm._s(param.text.replace(_vm.regexVars, "<div class='ts-content__var'>" + _vm.htmlInputString + _vm.varListValues + "</div>")) + "</div>" : "<p>" + _vm._s(param.text) + "</p>")] : param.type == 'image' ? _vm._ssrNode("<div class=\"ts-image-type\">", "</div>", [_vm._ssrNode("<input type=\"file\"" + _vm._ssrAttr("accept", _vm.acceptedExtensions) + " class=\"d-none\"> "), _vm.headerFiles[0] ? [_c('fa-icon', {
2397
+ directives: [{
2398
+ name: "tippy",
2399
+ rawName: "v-tippy",
2400
+ value: {
2401
+ placement: 'right'
2402
+ },
2403
+ expression: "{placement: 'right'}"
2404
+ }],
2405
+ class: "color-" + _vm.headerFiles[0].current_color,
2406
+ attrs: {
2407
+ "icon": ['fas', _vm.headerFiles[0].current_icon],
2408
+ "content": _vm.headerFiles[0].image_preview ? "<div class='custom-tooltip-image'>\n <img src='" + _vm.headerFiles[0].image_preview + "' alt='" + _vm.headerFiles[0].name + "' />\n </div>" : _vm.headerFiles[0].name
2409
+ },
2410
+ on: {
2411
+ "click": function click($event) {
2412
+ return _vm.triggerInputFile("header-" + pIndex);
2413
+ }
2414
+ }
2415
+ })] : _c('fa-icon', {
2416
+ directives: [{
2417
+ name: "tippy",
2418
+ rawName: "v-tippy",
2419
+ value: {
2420
+ placement: 'right'
2421
+ },
2422
+ expression: "{placement: 'right'}"
2423
+ }],
2424
+ staticClass: "select-image",
2425
+ attrs: {
2426
+ "icon": ['fas', 'image'],
2427
+ "content": "Selecionar anexo"
2428
+ },
2429
+ on: {
2430
+ "click": function click($event) {
2431
+ return _vm.triggerInputFile("header-" + pIndex);
2432
+ }
2433
+ }
2434
+ })], 2) : _vm._e()], 2);
2435
+ }), 0) : _vm._e(), _vm._ssrNode(" " + (component.type === 'body' ? "<section id=\"template_body\"" + _vm._ssrClass(null, (_vm.template.components.length == 1 ? 'border-radius-5 custom-border-gray' : '') + " " + (!_vm.hasButtonOrFooterComponent ? 'custom-footer-style custom-box-shadow-bottom custom-border-gray' : '')) + ">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2198
2436
  return "<div>" + (param.type === 'text' ? _vm.regexVars.test(param.text) ? "<div>" + _vm._s(param.text.replace(_vm.regexVars, "<div class='ts-content__var'>" + _vm.htmlInputString + _vm.varListValues + "</div>")) + "</div>" : "<p>" + _vm._s(param.text) + "</p>" : "<!---->") + "</div>";
2199
- }) + "</section>" : "<!---->") + " " + (component.type == 'footer' ? "<footer id=\"template_footer\">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2437
+ }) + "</section>" : "<!---->") + " " + (component.type == 'button' ? "<section id=\"template_buttons\"" + _vm._ssrClass(null, (_vm.template.components.length == 1 ? 'border-radius-5 custom-border-gray' : '') + " " + (!_vm.hasFooterComponent ? 'custom-footer-style custom-box-shadow-bottom' : '')) + ">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2438
+ return "<div class=\"ts-button\">" + (param.text ? "<p>" + _vm._s(param.text) + "</p>" : "<!---->") + "</div>";
2439
+ }) + "</section>" : "<!---->") + " " + (component.type == 'footer' ? "<footer id=\"template_footer\"" + _vm._ssrClass(null, "" + (_vm.template.components.length == 1 ? 'border-radius-5 custom-border-gray' : '')) + ">" + _vm._ssrList(component.parameters, function (param, pIndex) {
2200
2440
  return "<div>" + (param.type == 'text' ? "<small>" + _vm._s(param.text) + "</small>" : "<!---->") + "</div>";
2201
- }) + "</footer>" : "<!---->") + "</div>";
2202
- }) + "</div> "), _vm.hasButton ? _vm._ssrNode("<div" + _vm._ssrClass("tg-btn", {
2441
+ }) + "</footer>" : "<!---->"))], 2);
2442
+ }), 0), _vm._ssrNode(" "), _vm.hasButton ? _vm._ssrNode("<div" + _vm._ssrClass("tg-btn", {
2203
2443
  'small-btn': _vm.iconButton
2204
2444
  }) + ">", "</div>", [_vm._ssrNode("<button>", "</button>", [!_vm.iconButton ? [_c('fa-icon', {
2205
2445
  attrs: {
@@ -2221,7 +2461,7 @@ var __vue_inject_styles__$y = undefined;
2221
2461
  var __vue_scope_id__$y = undefined;
2222
2462
  /* module identifier */
2223
2463
 
2224
- var __vue_module_identifier__$y = "data-v-6048207e";
2464
+ var __vue_module_identifier__$y = "data-v-c988759e";
2225
2465
  /* functional template */
2226
2466
 
2227
2467
  var __vue_is_functional_template__$y = false;
@@ -9349,7 +9589,7 @@ var __vue_render__$i = function __vue_render__() {
9349
9589
  return _c('div', {
9350
9590
  staticClass: "ts-container"
9351
9591
  }, [_vm._ssrNode("<div class=\"ts-content\">", "</div>", [_vm._ssrNode("<section" + _vm._ssrClass(null, {
9352
- 'tm-container': _vm.hasButton
9592
+ 'tm-container custom-box-shadow-bottom': _vm.hasButton
9353
9593
  }) + ">", "</section>", [_c('TextFooter', {
9354
9594
  ref: "text-footer-template-message",
9355
9595
  attrs: {
@@ -9382,7 +9622,7 @@ var __vue_inject_styles__$i = undefined;
9382
9622
  var __vue_scope_id__$i = undefined;
9383
9623
  /* module identifier */
9384
9624
 
9385
- var __vue_module_identifier__$i = "data-v-6d6117ca";
9625
+ var __vue_module_identifier__$i = "data-v-5971fd9f";
9386
9626
  /* functional template */
9387
9627
 
9388
9628
  var __vue_is_functional_template__$i = false;
@@ -9452,7 +9692,8 @@ var script$h = {
9452
9692
  return {
9453
9693
  templateOptions: [],
9454
9694
  codTemplate: {},
9455
- selectedTemplate: null
9695
+ selectedTemplate: null,
9696
+ hasFile: false
9456
9697
  };
9457
9698
  },
9458
9699
  mounted: function mounted() {
@@ -9519,7 +9760,8 @@ var script$h = {
9519
9760
  });
9520
9761
  } else {
9521
9762
  this.selectedTemplate = null;
9522
- }
9763
+ } // if(this.hasFile) this.setFileVar(false)
9764
+
9523
9765
 
9524
9766
  this.adjustOnSelect();
9525
9767
  },
@@ -9572,8 +9814,8 @@ var script$h = {
9572
9814
 
9573
9815
  if (message.text.indexOf(varName) != -1) {
9574
9816
  /**Gerando os obejetos de parametros da notificacao para o component */
9575
- if (component.type === "header") {
9576
- _this2.selectedTemplate['parameters'][component.type] = {}; //Header s? pode ter uma vari?vel
9817
+ if (component.type === "header" && !_this2.selectedTemplate['parameters'][component.type]) {
9818
+ _this2.selectedTemplate['parameters'][component.type] = {}; //Header so pode ter uma vari?vel
9577
9819
 
9578
9820
  _this2.selectedTemplate['parameters'][component.type] = {
9579
9821
  tipo: "text",
@@ -9594,6 +9836,18 @@ var script$h = {
9594
9836
  keyIndex++;
9595
9837
  }
9596
9838
  });
9839
+ } else if (component.type == 'header' && component.parameters.seq) {
9840
+ if (_this2.hasFile) {
9841
+ if (!_this2.selectedTemplate['parameters'][component.type]) _this2.selectedTemplate['parameters'][component.type] = new Array();
9842
+
9843
+ _this2.selectedTemplate['parameters'][component.type].push({
9844
+ tipo: 'image',
9845
+ template: component.parameters.seq,
9846
+ link: ''
9847
+ });
9848
+ } else {
9849
+ delete _this2.selectedTemplate['parameters'][component.type];
9850
+ }
9597
9851
  }
9598
9852
  });
9599
9853
  }
@@ -9602,6 +9856,11 @@ var script$h = {
9602
9856
 
9603
9857
  this.$emit("template-data", this.selectedTemplate);
9604
9858
  },
9859
+ setFileVar: function setFileVar(file) {
9860
+ this.hasFile = file ? true : false;
9861
+ this.$emit("set-file-var", file);
9862
+ if (file) this.$emit("template-data", this.selectedTemplate);
9863
+ },
9605
9864
  setMessage: function setMessage(message) {
9606
9865
  this.$emit("static-message", message);
9607
9866
  }
@@ -9649,6 +9908,7 @@ var __vue_render__$h = function __vue_render__() {
9649
9908
  },
9650
9909
  slot: "no-options"
9651
9910
  })])], 2), _vm._ssrNode(" "), _vm.selectedTemplate ? [_vm.selectedTemplate.components ? _vm._ssrNode("<div class=\"tg-component\">", "</div>", [_c('TemplateSingle', {
9911
+ key: _vm.codTemplate,
9652
9912
  attrs: {
9653
9913
  "template": _vm.selectedTemplate,
9654
9914
  "hasButton": _vm.hasButton,
@@ -9659,6 +9919,7 @@ var __vue_render__$h = function __vue_render__() {
9659
9919
  },
9660
9920
  on: {
9661
9921
  "set-vars": _vm.setFinalMessage,
9922
+ "set-file-var": _vm.setFileVar,
9662
9923
  "click-trigger": function clickTrigger($event) {
9663
9924
  return _vm.$emit('click-trigger');
9664
9925
  }
@@ -9683,8 +9944,8 @@ var __vue_staticRenderFns__$h = [];
9683
9944
 
9684
9945
  var __vue_inject_styles__$h = function __vue_inject_styles__(inject) {
9685
9946
  if (!inject) return;
9686
- inject("data-v-37a18a28_0", {
9687
- 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.vs__dropdown-option--selected{background-color:#1a5fad!important;color:#fff}.vs__dropdown-menu li{padding:10px 15px}.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 3px;font-size:.8rem;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{border:unset;display:block;min-width:180px;height:35px;padding:0 10px;font-weight:500;background-color:#007bff;color:#fff;transition:transform .3s ease-in-out;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:2px solid #000}.tg-btn.small-btn{width:auto;margin:0 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}",
9947
+ inject("data-v-5b32f202_0", {
9948
+ 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}.ts-image-type{display:flex;align-items:center}.ts-image-type img{cursor:pointer}.ts-image-type svg{font-size:25px;cursor:pointer}.ts-image-type .select-image{color:#838383}.color-red{color:#e74c3c}.color-blue{color:#007bff}.color-black{color:#333}.color-purple{color:#a312a3}.custom-tooltip-image{display:flex;justify-content:center;align-items:center;overflow:visible;padding:5px}.custom-tooltip-image img{max-width:75px;max-height:75px}.ts-button{background-color:#fff;border-radius:10px;display:flex;justify-content:center;align-items:center;padding:3px 15px;transition:background-color 150ms ease-in-out}.ts-button:hover{background-color:#fdfdfd}.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}.vs__dropdown-option.vs__dropdown-option--selected{background-color:#1a5fad!important;color:#fff}.vs__dropdown-menu li{padding:10px 15px}.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;--border-radius:5px;flex:2;font-size:.7rem;padding:10px 0;display:flex;flex-direction:column}.order-1{order:1}.custom-box-shadow-bottom{box-shadow:0 3px 4px -3px rgba(0,0,0,.3)}.custom-border-gray{border:1px solid var(--border-color)!important}.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:var(--border-radius);border-top-right-radius:var(--border-radius);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:var(--border-radius);border-bottom-right-radius:var(--border-radius);border-bottom:1px solid var(--border-color)}.custom-footer-style,.ts-content footer{border:1px solid var(--border-color);border-top:unset;border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.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 3px;font-size:.8rem;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{border:unset;display:block;min-width:180px;height:35px;padding:0 10px;font-weight:500;background-color:#007bff;color:#fff;transition:transform .3s ease-in-out;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:2px solid #000}.tg-btn.small-btn{width:auto;margin:0 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:5px;display:flex}",
9688
9949
  map: undefined,
9689
9950
  media: undefined
9690
9951
  });
@@ -9695,7 +9956,7 @@ var __vue_inject_styles__$h = function __vue_inject_styles__(inject) {
9695
9956
  var __vue_scope_id__$h = undefined;
9696
9957
  /* module identifier */
9697
9958
 
9698
- var __vue_module_identifier__$h = "data-v-37a18a28";
9959
+ var __vue_module_identifier__$h = "data-v-5b32f202";
9699
9960
  /* functional template */
9700
9961
 
9701
9962
  var __vue_is_functional_template__$h = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.264",
3
+ "version": "0.0.266",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",