vue-intergrall-plugins 0.0.222 → 0.0.223

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.
@@ -3550,6 +3550,22 @@ var script$n = {
3550
3550
  if (this.fileSettings.multiple) return "isMultiple";
3551
3551
  if (this.isDoc) return "isDoc";
3552
3552
  return "isMsg";
3553
+ },
3554
+ acceptedExtensions: function acceptedExtensions() {
3555
+ var str = "";
3556
+
3557
+ if (this.fileSettings.docsExtensions && this.fileSettings.imagesExtensions) {
3558
+ str = "".concat(this.fileSettings.docsExtensions.split("|").join(',')).concat(this.fileSettings.imagesExtensions.split("|").join(','));
3559
+ } else if (this.fileSettings.docsExtensions) {
3560
+ str = this.fileSettings.docsExtensions.split("|").join(',');
3561
+ } else if (this.fileSettings.imagesExtensions) {
3562
+ str = this.fileSettings.imagesExtensions.split("|").join(',');
3563
+ }
3564
+
3565
+ str = str && str.endsWith(",") ? str.slice(0, -1) : str;
3566
+ if (this.fileSettings.multiple) return str ? str : "image/*,application/*";
3567
+ if (this.isDoc) return str ? str : "application/*";
3568
+ return str ? str : "image/*";
3553
3569
  }
3554
3570
  },
3555
3571
  watch: {
@@ -3914,7 +3930,7 @@ var __vue_render__$n = function __vue_render__() {
3914
3930
  attrs: {
3915
3931
  "icon": ['fas', 'server']
3916
3932
  }
3917
- })], 1) : _vm._e()], 2) : _vm._e()]), _vm._ssrNode(" <div class=\"files-pointers d-none\">" + (_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "both-" + _vm.textId) + " accept=\"image/*,application/*\" multiple=\"multiple\">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "img-" + _vm.textId) + " accept=\"image/*\">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "doc-" + _vm.textId) + " accept=\"application/*\">" : "<!---->") + "</div> "), _c('transition', {
3933
+ })], 1) : _vm._e()], 2) : _vm._e()]), _vm._ssrNode(" <div class=\"files-pointers d-none\">" + (_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "both-" + _vm.textId) + _vm._ssrAttr("accept", _vm.acceptedExtensions) + " multiple=\"multiple\">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "img-" + _vm.textId) + _vm._ssrAttr("accept", _vm.acceptedExtensions) + ">" : "<!---->") + " " + (!_vm.fileSettings.multiple ? "<input type=\"file\"" + _vm._ssrAttr("id", "doc-" + _vm.textId) + _vm._ssrAttr("accept", _vm.acceptedExtensions) + ">" : "<!---->") + "</div> "), _c('transition', {
3918
3934
  attrs: {
3919
3935
  "name": "fade"
3920
3936
  }
@@ -3973,7 +3989,7 @@ var __vue_staticRenderFns__$n = [];
3973
3989
 
3974
3990
  var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
3975
3991
  if (!inject) return;
3976
- inject("data-v-71c7f64d_0", {
3992
+ inject("data-v-40b9b88c_0", {
3977
3993
  source: ".fade-enter-active,.fade-leave-active{transition:opacity .3s}.fade-enter,.fade-leave-to{opacity:0}.files-counter{position:absolute;top:unset;transform:translate(17.5px,-15px);background-color:#888;z-index:1;font-size:.5rem;width:15px;height:15px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer;opacity:.9;transition:all .3s;color:#fff;font-weight:900}.files-counter:hover{opacity:1}",
3978
3994
  map: undefined,
3979
3995
  media: undefined
@@ -3985,7 +4001,7 @@ var __vue_inject_styles__$n = function __vue_inject_styles__(inject) {
3985
4001
  var __vue_scope_id__$n = undefined;
3986
4002
  /* module identifier */
3987
4003
 
3988
- var __vue_module_identifier__$n = "data-v-71c7f64d";
4004
+ var __vue_module_identifier__$n = "data-v-40b9b88c";
3989
4005
  /* functional template */
3990
4006
 
3991
4007
  var __vue_is_functional_template__$n = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-intergrall-plugins",
3
- "version": "0.0.222",
3
+ "version": "0.0.223",
4
4
  "description": "",
5
5
  "main": "dist/vue-intergrall-plugins.ssr.js",
6
6
  "browser": "dist/vue-intergrall-plugins.esm.js",
@@ -24,9 +24,9 @@
24
24
  </div>
25
25
  </transition>
26
26
  <div class="files-pointers d-none">
27
- <input v-if="fileSettings.multiple" type="file" :id="`both-${textId}`" accept="image/*,application/*" multiple @change="fileUpload($event, 'both')" />
28
- <input v-if="!fileSettings.multiple" type="file" :id="`img-${textId}`" accept="image/*" @change="fileUpload($event, 'img')" />
29
- <input v-if="!fileSettings.multiple" type="file" :id="`doc-${textId}`" accept="application/*" @change="fileUpload($event, 'doc')" />
27
+ <input v-if="fileSettings.multiple" type="file" :id="`both-${textId}`" :accept="acceptedExtensions" multiple @change="fileUpload($event, 'both')" />
28
+ <input v-if="!fileSettings.multiple" type="file" :id="`img-${textId}`" :accept="acceptedExtensions" @change="fileUpload($event, 'img')" />
29
+ <input v-if="!fileSettings.multiple" type="file" :id="`doc-${textId}`" :accept="acceptedExtensions" @change="fileUpload($event, 'doc')" />
30
30
  </div>
31
31
  <transition name="fade">
32
32
  <div class="text-footer-preview-container" @click.stop v-show="showFilePreview" :class="[previewContainerClass]" v-on-clickaway="away">
@@ -147,7 +147,21 @@ export default {
147
147
  if(this.fileSettings.multiple) return "isMultiple"
148
148
  if(this.isDoc) return "isDoc"
149
149
  return "isMsg"
150
- }
150
+ },
151
+ acceptedExtensions() {
152
+ let str = ""
153
+ if(this.fileSettings.docsExtensions && this.fileSettings.imagesExtensions) {
154
+ str = `${this.fileSettings.docsExtensions.split("|").join(',')}${this.fileSettings.imagesExtensions.split("|").join(',')}`
155
+ }else if(this.fileSettings.docsExtensions) {
156
+ str = this.fileSettings.docsExtensions.split("|").join(',')
157
+ }else if(this.fileSettings.imagesExtensions) {
158
+ str = this.fileSettings.imagesExtensions.split("|").join(',')
159
+ }
160
+ str = str && str.endsWith(",") ? str.slice(0, -1) : str
161
+ if(this.fileSettings.multiple) return str ? str : "image/*,application/*"
162
+ if(this.isDoc) return str ? str : "application/*"
163
+ return str ? str : "image/*"
164
+ },
151
165
  },
152
166
  watch: {
153
167
  externalFiles() {