tg-controls_cli 0.0.97 → 0.0.98
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.
- package/dist/myLib.common.js +454 -44
- package/dist/myLib.common.js.map +1 -1
- package/dist/myLib.css +1 -1
- package/dist/myLib.umd.js +454 -44
- package/dist/myLib.umd.js.map +1 -1
- package/dist/myLib.umd.min.js +5 -5
- package/dist/myLib.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/myLib.common.js
CHANGED
|
@@ -24300,6 +24300,17 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
24300
24300
|
}
|
|
24301
24301
|
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
24302
24302
|
|
|
24303
|
+
/***/ }),
|
|
24304
|
+
|
|
24305
|
+
/***/ "663a":
|
|
24306
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
24307
|
+
|
|
24308
|
+
"use strict";
|
|
24309
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_c293aa98_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("fffa");
|
|
24310
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_c293aa98_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_c293aa98_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
24311
|
+
/* unused harmony reexport * */
|
|
24312
|
+
|
|
24313
|
+
|
|
24303
24314
|
/***/ }),
|
|
24304
24315
|
|
|
24305
24316
|
/***/ "68df":
|
|
@@ -26061,13 +26072,6 @@ module.exports = function (argument) {
|
|
|
26061
26072
|
|
|
26062
26073
|
/***/ }),
|
|
26063
26074
|
|
|
26064
|
-
/***/ "a354":
|
|
26065
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
26066
|
-
|
|
26067
|
-
// extracted by mini-css-extract-plugin
|
|
26068
|
-
|
|
26069
|
-
/***/ }),
|
|
26070
|
-
|
|
26071
26075
|
/***/ "a395":
|
|
26072
26076
|
/***/ (function(module, exports, __webpack_require__) {
|
|
26073
26077
|
|
|
@@ -36223,17 +36227,6 @@ module.exports = function (key) {
|
|
|
36223
36227
|
};
|
|
36224
36228
|
|
|
36225
36229
|
|
|
36226
|
-
/***/ }),
|
|
36227
|
-
|
|
36228
|
-
/***/ "f9c7":
|
|
36229
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
36230
|
-
|
|
36231
|
-
"use strict";
|
|
36232
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("a354");
|
|
36233
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_7_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_7_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_7_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_Autocomplete_vue_vue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__);
|
|
36234
|
-
/* unused harmony reexport * */
|
|
36235
|
-
|
|
36236
|
-
|
|
36237
36230
|
/***/ }),
|
|
36238
36231
|
|
|
36239
36232
|
/***/ "fae6":
|
|
@@ -36316,7 +36309,7 @@ if (typeof window !== 'undefined') {
|
|
|
36316
36309
|
// Indicate to webpack that this file can be concatenated
|
|
36317
36310
|
/* harmony default export */ var setPublicPath = (null);
|
|
36318
36311
|
|
|
36319
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/DynamicForm.vue?vue&type=template&id=
|
|
36312
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/DynamicForm.vue?vue&type=template&id=25cf8cc7
|
|
36320
36313
|
var render = function render() {
|
|
36321
36314
|
var _vm = this,
|
|
36322
36315
|
_c = _vm._self._c;
|
|
@@ -36469,7 +36462,7 @@ var render = function render() {
|
|
|
36469
36462
|
};
|
|
36470
36463
|
var staticRenderFns = [];
|
|
36471
36464
|
|
|
36472
|
-
// CONCATENATED MODULE: ./src/components/DynamicForm.vue?vue&type=template&id=
|
|
36465
|
+
// CONCATENATED MODULE: ./src/components/DynamicForm.vue?vue&type=template&id=25cf8cc7
|
|
36473
36466
|
|
|
36474
36467
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
36475
36468
|
var es_array_push = __webpack_require__("14d9");
|
|
@@ -42671,6 +42664,414 @@ var FileField_component = normalizeComponent(
|
|
|
42671
42664
|
)
|
|
42672
42665
|
|
|
42673
42666
|
/* harmony default export */ var FileField = (FileField_component.exports);
|
|
42667
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/NormalFileField.vue?vue&type=template&id=53457fd3
|
|
42668
|
+
var NormalFileFieldvue_type_template_id_53457fd3_render = function render() {
|
|
42669
|
+
var _vm = this,
|
|
42670
|
+
_c = _vm._self._c;
|
|
42671
|
+
return _c('div', {
|
|
42672
|
+
staticClass: "col-12 p-0 fileFieldAttachment",
|
|
42673
|
+
attrs: {
|
|
42674
|
+
"id": 'File_' + _vm.fieldInfo.name
|
|
42675
|
+
}
|
|
42676
|
+
}, [_c('div', {
|
|
42677
|
+
staticClass: "custom-file"
|
|
42678
|
+
}, [_c('input', {
|
|
42679
|
+
staticClass: "custom-file-input",
|
|
42680
|
+
attrs: {
|
|
42681
|
+
"type": "file",
|
|
42682
|
+
"id": 'NormalFile_' + _vm.fieldInfo.name,
|
|
42683
|
+
"disabled": _vm.fieldInfo.disabled,
|
|
42684
|
+
"multiple": _vm.canUploadMultipleFile(),
|
|
42685
|
+
"aria-describedby": 'NormalFile_' + _vm.fieldInfo.name
|
|
42686
|
+
},
|
|
42687
|
+
on: {
|
|
42688
|
+
"change": function ($event) {
|
|
42689
|
+
return _vm.onChange($event);
|
|
42690
|
+
}
|
|
42691
|
+
}
|
|
42692
|
+
}), _c('label', {
|
|
42693
|
+
staticClass: "custom-file-label",
|
|
42694
|
+
attrs: {
|
|
42695
|
+
"for": 'NormalFile_' + _vm.fieldInfo.name
|
|
42696
|
+
}
|
|
42697
|
+
}, [_vm._v("Choose file")])]), _vm.errors.length > 0 ? _c('div', _vm._l(_vm.errors, function (error, index) {
|
|
42698
|
+
return _c('div', {
|
|
42699
|
+
key: index,
|
|
42700
|
+
staticClass: "file-upload__error"
|
|
42701
|
+
}, [_c('span', [_vm._v(_vm._s(error))])]);
|
|
42702
|
+
}), 0) : _vm._e()]);
|
|
42703
|
+
};
|
|
42704
|
+
var NormalFileFieldvue_type_template_id_53457fd3_staticRenderFns = [];
|
|
42705
|
+
|
|
42706
|
+
// CONCATENATED MODULE: ./src/components/NormalFileField.vue?vue&type=template&id=53457fd3
|
|
42707
|
+
|
|
42708
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/NormalFileField.vue?vue&type=script&lang=js
|
|
42709
|
+
|
|
42710
|
+
|
|
42711
|
+
/* harmony default export */ var NormalFileFieldvue_type_script_lang_js = ({
|
|
42712
|
+
components: {
|
|
42713
|
+
Field: ValidationProvider
|
|
42714
|
+
},
|
|
42715
|
+
props: {
|
|
42716
|
+
lang: {
|
|
42717
|
+
type: String,
|
|
42718
|
+
default: 'en'
|
|
42719
|
+
},
|
|
42720
|
+
fieldInfo: {
|
|
42721
|
+
type: Object,
|
|
42722
|
+
required: true
|
|
42723
|
+
}
|
|
42724
|
+
},
|
|
42725
|
+
data: function () {
|
|
42726
|
+
return {
|
|
42727
|
+
isDragging: false,
|
|
42728
|
+
maxSize: 0,
|
|
42729
|
+
accept: '',
|
|
42730
|
+
reject: '',
|
|
42731
|
+
errors: [],
|
|
42732
|
+
file: {
|
|
42733
|
+
name: "",
|
|
42734
|
+
size: 0,
|
|
42735
|
+
type: "",
|
|
42736
|
+
fileExtention: "",
|
|
42737
|
+
url: "",
|
|
42738
|
+
isImage: false,
|
|
42739
|
+
isUploaded: false
|
|
42740
|
+
},
|
|
42741
|
+
previewFiles: []
|
|
42742
|
+
};
|
|
42743
|
+
},
|
|
42744
|
+
mounted: function () {
|
|
42745
|
+
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
42746
|
+
if (this.fieldInfo.placeholder) {
|
|
42747
|
+
this.fileName = this.fieldInfo.placeholder;
|
|
42748
|
+
}
|
|
42749
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('maxSize')) {
|
|
42750
|
+
this.maxSize = this.fieldInfo.config.maxSize;
|
|
42751
|
+
}
|
|
42752
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('accept')) {
|
|
42753
|
+
this.accept = Array.prototype.map.call(this.fieldInfo.config.accept, function (item) {
|
|
42754
|
+
return item.fileType;
|
|
42755
|
+
}).join(",");
|
|
42756
|
+
}
|
|
42757
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('reject')) {
|
|
42758
|
+
this.reject = Array.prototype.map.call(this.fieldInfo.config.reject, function (item) {
|
|
42759
|
+
return item.fileType;
|
|
42760
|
+
}).join(",");
|
|
42761
|
+
}
|
|
42762
|
+
},
|
|
42763
|
+
methods: {
|
|
42764
|
+
openFilePopup() {
|
|
42765
|
+
document.querySelectorAll('#File_' + this.fieldInfo.name + ' [type="file"]')[0].click();
|
|
42766
|
+
},
|
|
42767
|
+
RemoveFile(event, index) {
|
|
42768
|
+
event.stopPropagation();
|
|
42769
|
+
const dt = new DataTransfer();
|
|
42770
|
+
const input = document.querySelectorAll('#File_' + this.fieldInfo.name + ' [type="file"]')[0];
|
|
42771
|
+
const {
|
|
42772
|
+
files
|
|
42773
|
+
} = input;
|
|
42774
|
+
this.previewFiles = [];
|
|
42775
|
+
for (let i = 0; i < files.length; i++) {
|
|
42776
|
+
const file = files[i];
|
|
42777
|
+
if (index !== i) {
|
|
42778
|
+
dt.items.add(file);
|
|
42779
|
+
var fileExtention = file.name.split(".").pop();
|
|
42780
|
+
var isImage = ["jpg", "jpeg", "png", "gif"].includes(fileExtention);
|
|
42781
|
+
let reader = new FileReader();
|
|
42782
|
+
reader.addEventListener("load", () => {
|
|
42783
|
+
// Set file data
|
|
42784
|
+
this.file = {
|
|
42785
|
+
name: file.name.split(".").shift(),
|
|
42786
|
+
size: Math.round(file.size / 1024 / 1024 * 100) / 100,
|
|
42787
|
+
type: file.type,
|
|
42788
|
+
fileExtention: fileExtention,
|
|
42789
|
+
isImage: isImage,
|
|
42790
|
+
url: reader.result,
|
|
42791
|
+
isUploaded: true
|
|
42792
|
+
};
|
|
42793
|
+
this.previewFiles.push(this.file);
|
|
42794
|
+
}, false);
|
|
42795
|
+
// Read uploaded file
|
|
42796
|
+
reader.readAsDataURL(file);
|
|
42797
|
+
}
|
|
42798
|
+
// here you exclude the file. thus removing it.
|
|
42799
|
+
}
|
|
42800
|
+
input.files = dt.files; // Assign the updates list
|
|
42801
|
+
|
|
42802
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onRemoveFile) {
|
|
42803
|
+
this.fieldInfo.config.onRemoveFile(event, index, this.fieldInfo);
|
|
42804
|
+
}
|
|
42805
|
+
},
|
|
42806
|
+
onChange(e) {
|
|
42807
|
+
this.errors = [];
|
|
42808
|
+
// Check if file is selected
|
|
42809
|
+
if (e.target.files && e.target.files[0]) {
|
|
42810
|
+
// Check if file is valid
|
|
42811
|
+
for (let index = 0; index < e.target.files.length; index++) {
|
|
42812
|
+
const file = e.target.files[index];
|
|
42813
|
+
if (this.isFileValid(file)) {
|
|
42814
|
+
// Get uploaded file
|
|
42815
|
+
// Get file size
|
|
42816
|
+
var fileSize = Math.round(file.size / 1024 / 1024 * 100) / 100;
|
|
42817
|
+
// Get file extention
|
|
42818
|
+
var fileExtention = file.name.split(".").pop();
|
|
42819
|
+
// Get file name
|
|
42820
|
+
var fileName = file.name.split(".").shift();
|
|
42821
|
+
// Check if file is an image
|
|
42822
|
+
var isImage = ["jpg", "jpeg", "png", "gif"].includes(fileExtention);
|
|
42823
|
+
// Print to console
|
|
42824
|
+
console.log(fileSize, fileExtention, fileName, isImage);
|
|
42825
|
+
// Load the FileReader API
|
|
42826
|
+
let reader = new FileReader();
|
|
42827
|
+
reader.addEventListener("load", () => {
|
|
42828
|
+
// Set file data
|
|
42829
|
+
this.file = {
|
|
42830
|
+
name: fileName,
|
|
42831
|
+
size: fileSize,
|
|
42832
|
+
type: file.type,
|
|
42833
|
+
fileExtention: fileExtention,
|
|
42834
|
+
isImage: isImage,
|
|
42835
|
+
url: reader.result,
|
|
42836
|
+
isUploaded: true
|
|
42837
|
+
};
|
|
42838
|
+
if (this.canUploadMultipleFile() == false) {
|
|
42839
|
+
this.previewFiles = [];
|
|
42840
|
+
}
|
|
42841
|
+
this.previewFiles.push(this.file);
|
|
42842
|
+
}, false);
|
|
42843
|
+
// Read uploaded file
|
|
42844
|
+
reader.readAsDataURL(file);
|
|
42845
|
+
} else {
|
|
42846
|
+
console.log("Invalid file");
|
|
42847
|
+
}
|
|
42848
|
+
}
|
|
42849
|
+
var fileName = document.getElementById('NormalFile_' + this.fieldInfo.name).files[0].name;
|
|
42850
|
+
var nextSibling = e.target.nextElementSibling;
|
|
42851
|
+
nextSibling.innerText = fileName;
|
|
42852
|
+
if (this.errors.length == 0) {
|
|
42853
|
+
this.fieldInfo.value = e.target.files;
|
|
42854
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
42855
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
42856
|
+
}
|
|
42857
|
+
}
|
|
42858
|
+
}
|
|
42859
|
+
},
|
|
42860
|
+
isFileSizeValid(fileSize) {
|
|
42861
|
+
if (fileSize <= this.maxSize) {
|
|
42862
|
+
console.log("File size is valid");
|
|
42863
|
+
} else {
|
|
42864
|
+
this.errors.push(`File size should be less than ${this.maxSize} MB`);
|
|
42865
|
+
}
|
|
42866
|
+
},
|
|
42867
|
+
isFileTypeValid(fileExtention) {
|
|
42868
|
+
if (this.reject != "" && this.reject.split(",").length > 0 && this.reject.split(",").includes(fileExtention)) {
|
|
42869
|
+
this.errors.push(`File type should not be ${this.reject}`);
|
|
42870
|
+
}
|
|
42871
|
+
if (this.accept != "" && this.accept.split(",").length > 0) {
|
|
42872
|
+
if (this.accept.split(",").includes(fileExtention)) {
|
|
42873
|
+
console.log("File type is valid");
|
|
42874
|
+
} else {
|
|
42875
|
+
this.errors.push(`File type should be ${this.accept}`);
|
|
42876
|
+
}
|
|
42877
|
+
}
|
|
42878
|
+
},
|
|
42879
|
+
isFileValid(file) {
|
|
42880
|
+
this.isFileSizeValid(Math.round(file.size / 1024 / 1024 * 100) / 100);
|
|
42881
|
+
this.isFileTypeValid(file.name.split(".").pop());
|
|
42882
|
+
if (this.errors.length === 0) {
|
|
42883
|
+
return true;
|
|
42884
|
+
} else {
|
|
42885
|
+
return false;
|
|
42886
|
+
}
|
|
42887
|
+
},
|
|
42888
|
+
canUploadMultipleFile() {
|
|
42889
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('multiple')) {
|
|
42890
|
+
return this.fieldInfo.config.multiple;
|
|
42891
|
+
}
|
|
42892
|
+
return false;
|
|
42893
|
+
},
|
|
42894
|
+
getSelectedFile: function () {
|
|
42895
|
+
try {
|
|
42896
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('showSelectedFiles')) {
|
|
42897
|
+
return this.fieldInfo.config.showSelectedFiles;
|
|
42898
|
+
}
|
|
42899
|
+
return [];
|
|
42900
|
+
} catch (ex) {
|
|
42901
|
+
console.log(ex);
|
|
42902
|
+
return [];
|
|
42903
|
+
}
|
|
42904
|
+
},
|
|
42905
|
+
isShowCrossOnSelectedFile: function () {
|
|
42906
|
+
try {
|
|
42907
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('showCrossOnSelectedFiles')) {
|
|
42908
|
+
return this.fieldInfo.config.showCrossOnSelectedFiles;
|
|
42909
|
+
}
|
|
42910
|
+
return true;
|
|
42911
|
+
} catch (ex) {
|
|
42912
|
+
console.log(ex);
|
|
42913
|
+
return true;
|
|
42914
|
+
}
|
|
42915
|
+
},
|
|
42916
|
+
getFileName: function (name) {
|
|
42917
|
+
try {
|
|
42918
|
+
let arr = name.split(".");
|
|
42919
|
+
let path = arr[0].length > 4 ? arr[0].substring(0, 4) + "..." + arr[1] : arr[0] + "." + arr[1];
|
|
42920
|
+
return path;
|
|
42921
|
+
} catch (ex) {
|
|
42922
|
+
return name;
|
|
42923
|
+
}
|
|
42924
|
+
},
|
|
42925
|
+
getFileIcon: function (name) {
|
|
42926
|
+
let arr = name.split(".");
|
|
42927
|
+
let icon = "";
|
|
42928
|
+
switch (arr[1]) {
|
|
42929
|
+
case "jpg":
|
|
42930
|
+
case "png":
|
|
42931
|
+
case "jpeg":
|
|
42932
|
+
case "gif":
|
|
42933
|
+
icon = "fa-file-image-o";
|
|
42934
|
+
break;
|
|
42935
|
+
case "doc":
|
|
42936
|
+
case "docs":
|
|
42937
|
+
icon = "fa-file-word-o";
|
|
42938
|
+
break;
|
|
42939
|
+
case "pdf":
|
|
42940
|
+
icon = "fa-file-pdf-o";
|
|
42941
|
+
break;
|
|
42942
|
+
case "xlsx":
|
|
42943
|
+
case "xlsm":
|
|
42944
|
+
case "xlsb":
|
|
42945
|
+
case "xltx":
|
|
42946
|
+
case "xls":
|
|
42947
|
+
case "xlt":
|
|
42948
|
+
icon = "fa-file-excel-o";
|
|
42949
|
+
break;
|
|
42950
|
+
case "mp4":
|
|
42951
|
+
case "mov":
|
|
42952
|
+
case "wmv":
|
|
42953
|
+
case "flv":
|
|
42954
|
+
case "avi":
|
|
42955
|
+
case "webm":
|
|
42956
|
+
case "mkv":
|
|
42957
|
+
case "avchd":
|
|
42958
|
+
icon = "fa-file-video-o";
|
|
42959
|
+
break;
|
|
42960
|
+
case "pptx":
|
|
42961
|
+
icon = "fa-file-powerpoint-o";
|
|
42962
|
+
break;
|
|
42963
|
+
case "mp3":
|
|
42964
|
+
case "aac":
|
|
42965
|
+
case "wav":
|
|
42966
|
+
case "aiff":
|
|
42967
|
+
case "dsd":
|
|
42968
|
+
case "pcm":
|
|
42969
|
+
icon = "fa-file-audio-o";
|
|
42970
|
+
break;
|
|
42971
|
+
default:
|
|
42972
|
+
icon = "fa-file-o";
|
|
42973
|
+
}
|
|
42974
|
+
return icon;
|
|
42975
|
+
},
|
|
42976
|
+
onDelete: function (item) {
|
|
42977
|
+
try {
|
|
42978
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('onDeleteSelectedFiles')) {
|
|
42979
|
+
this.fieldInfo.config.onDeleteSelectedFiles(item);
|
|
42980
|
+
}
|
|
42981
|
+
} catch (ex) {
|
|
42982
|
+
console.log(ex);
|
|
42983
|
+
}
|
|
42984
|
+
},
|
|
42985
|
+
onClickSelectedFile: function (item) {
|
|
42986
|
+
try {
|
|
42987
|
+
if (this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('onClickSelectedFiles')) {
|
|
42988
|
+
this.fieldInfo.config.onClickSelectedFiles(item);
|
|
42989
|
+
}
|
|
42990
|
+
} catch (ex) {
|
|
42991
|
+
console.log(ex);
|
|
42992
|
+
}
|
|
42993
|
+
},
|
|
42994
|
+
dragOver: function () {
|
|
42995
|
+
this.isDragging = true;
|
|
42996
|
+
},
|
|
42997
|
+
dragLeave: function () {
|
|
42998
|
+
this.isDragging = false;
|
|
42999
|
+
},
|
|
43000
|
+
handleDrop: function (event) {
|
|
43001
|
+
event.preventDefault();
|
|
43002
|
+
this.isDragging = false;
|
|
43003
|
+
const files = event.target.files || event.dataTransfer.files;
|
|
43004
|
+
if (files.length) {
|
|
43005
|
+
for (let index = 0; index < files.length; index++) {
|
|
43006
|
+
const file = files[index];
|
|
43007
|
+
if (this.isFileValid(file)) {
|
|
43008
|
+
// Get uploaded file
|
|
43009
|
+
// Get file size
|
|
43010
|
+
var fileSize = Math.round(file.size / 1024 / 1024 * 100) / 100;
|
|
43011
|
+
// Get file extention
|
|
43012
|
+
var fileExtention = file.name.split(".").pop();
|
|
43013
|
+
// Get file name
|
|
43014
|
+
var fileName = file.name.split(".").shift();
|
|
43015
|
+
// Check if file is an image
|
|
43016
|
+
var isImage = ["jpg", "jpeg", "png", "gif"].includes(fileExtention);
|
|
43017
|
+
// Print to console
|
|
43018
|
+
console.log(fileSize, fileExtention, fileName, isImage);
|
|
43019
|
+
// Load the FileReader API
|
|
43020
|
+
let reader = new FileReader();
|
|
43021
|
+
reader.addEventListener("load", () => {
|
|
43022
|
+
// Set file data
|
|
43023
|
+
this.file = {
|
|
43024
|
+
name: fileName,
|
|
43025
|
+
size: fileSize,
|
|
43026
|
+
type: file.type,
|
|
43027
|
+
fileExtention: fileExtention,
|
|
43028
|
+
isImage: isImage,
|
|
43029
|
+
url: reader.result,
|
|
43030
|
+
isUploaded: true
|
|
43031
|
+
};
|
|
43032
|
+
if (this.canUploadMultipleFile() == false) {
|
|
43033
|
+
this.previewFiles = [];
|
|
43034
|
+
}
|
|
43035
|
+
this.previewFiles.push(this.file);
|
|
43036
|
+
}, false);
|
|
43037
|
+
// Read uploaded file
|
|
43038
|
+
reader.readAsDataURL(file);
|
|
43039
|
+
} else {
|
|
43040
|
+
console.log("Invalid file");
|
|
43041
|
+
}
|
|
43042
|
+
}
|
|
43043
|
+
if (this.errors.length == 0) {
|
|
43044
|
+
this.fieldInfo.value = files;
|
|
43045
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
43046
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
43047
|
+
}
|
|
43048
|
+
}
|
|
43049
|
+
}
|
|
43050
|
+
}
|
|
43051
|
+
}
|
|
43052
|
+
});
|
|
43053
|
+
// CONCATENATED MODULE: ./src/components/NormalFileField.vue?vue&type=script&lang=js
|
|
43054
|
+
/* harmony default export */ var components_NormalFileFieldvue_type_script_lang_js = (NormalFileFieldvue_type_script_lang_js);
|
|
43055
|
+
// CONCATENATED MODULE: ./src/components/NormalFileField.vue
|
|
43056
|
+
|
|
43057
|
+
|
|
43058
|
+
|
|
43059
|
+
|
|
43060
|
+
|
|
43061
|
+
/* normalize component */
|
|
43062
|
+
|
|
43063
|
+
var NormalFileField_component = normalizeComponent(
|
|
43064
|
+
components_NormalFileFieldvue_type_script_lang_js,
|
|
43065
|
+
NormalFileFieldvue_type_template_id_53457fd3_render,
|
|
43066
|
+
NormalFileFieldvue_type_template_id_53457fd3_staticRenderFns,
|
|
43067
|
+
false,
|
|
43068
|
+
null,
|
|
43069
|
+
null,
|
|
43070
|
+
null
|
|
43071
|
+
|
|
43072
|
+
)
|
|
43073
|
+
|
|
43074
|
+
/* harmony default export */ var NormalFileField = (NormalFileField_component.exports);
|
|
42674
43075
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/TreeSelectField.vue?vue&type=template&id=4975b454
|
|
42675
43076
|
var TreeSelectFieldvue_type_template_id_4975b454_render = function render() {
|
|
42676
43077
|
var _vm = this,
|
|
@@ -42913,8 +43314,8 @@ var SlotField_component = normalizeComponent(
|
|
|
42913
43314
|
)
|
|
42914
43315
|
|
|
42915
43316
|
/* harmony default export */ var SlotField = (SlotField_component.exports);
|
|
42916
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchableSelectField.vue?vue&type=template&id=
|
|
42917
|
-
var
|
|
43317
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchableSelectField.vue?vue&type=template&id=6f324aae
|
|
43318
|
+
var SearchableSelectFieldvue_type_template_id_6f324aae_render = function render() {
|
|
42918
43319
|
var _vm = this,
|
|
42919
43320
|
_c = _vm._self._c;
|
|
42920
43321
|
return _c('Field', {
|
|
@@ -42929,7 +43330,7 @@ var SearchableSelectFieldvue_type_template_id_b5b1bf16_render = function render(
|
|
|
42929
43330
|
errors
|
|
42930
43331
|
}) {
|
|
42931
43332
|
return [_c('div', {
|
|
42932
|
-
staticClass: "w-100
|
|
43333
|
+
staticClass: "w-100"
|
|
42933
43334
|
}, [_c('SearchableSelect', {
|
|
42934
43335
|
attrs: {
|
|
42935
43336
|
"items": _vm.fieldInfo.config.OptionsForBind,
|
|
@@ -42947,7 +43348,7 @@ var SearchableSelectFieldvue_type_template_id_b5b1bf16_render = function render(
|
|
|
42947
43348
|
},
|
|
42948
43349
|
on: {
|
|
42949
43350
|
"change": function ($event) {
|
|
42950
|
-
return _vm.onSearchableChange($event, _vm.
|
|
43351
|
+
return _vm.onSearchableChange($event, _vm.fieldInfo);
|
|
42951
43352
|
}
|
|
42952
43353
|
},
|
|
42953
43354
|
model: {
|
|
@@ -42964,9 +43365,9 @@ var SearchableSelectFieldvue_type_template_id_b5b1bf16_render = function render(
|
|
|
42964
43365
|
}])
|
|
42965
43366
|
});
|
|
42966
43367
|
};
|
|
42967
|
-
var
|
|
43368
|
+
var SearchableSelectFieldvue_type_template_id_6f324aae_staticRenderFns = [];
|
|
42968
43369
|
|
|
42969
|
-
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue?vue&type=template&id=
|
|
43370
|
+
// CONCATENATED MODULE: ./src/components/SearchableSelectField.vue?vue&type=template&id=6f324aae
|
|
42970
43371
|
|
|
42971
43372
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SearchableSelect.vue?vue&type=template&id=688f213e&scoped=true
|
|
42972
43373
|
var SearchableSelectvue_type_template_id_688f213e_scoped_true_render = function render() {
|
|
@@ -43018,8 +43419,8 @@ var SearchableSelectvue_type_template_id_688f213e_scoped_true_staticRenderFns =
|
|
|
43018
43419
|
|
|
43019
43420
|
// CONCATENATED MODULE: ./src/components/SearchableSelect.vue?vue&type=template&id=688f213e&scoped=true
|
|
43020
43421
|
|
|
43021
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Autocomplete.vue?vue&type=template&id=
|
|
43022
|
-
var
|
|
43422
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"4289e630-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/Autocomplete.vue?vue&type=template&id=c293aa98&scoped=true
|
|
43423
|
+
var Autocompletevue_type_template_id_c293aa98_scoped_true_render = function render() {
|
|
43023
43424
|
var _vm = this,
|
|
43024
43425
|
_c = _vm._self._c;
|
|
43025
43426
|
return _c('div', {
|
|
@@ -43132,14 +43533,14 @@ var Autocompletevue_type_template_id_723cadb2_scoped_true_render = function rend
|
|
|
43132
43533
|
}, [_vm.groupFields.length > 0 ? _c('div', {
|
|
43133
43534
|
staticClass: "d-flex flex-column"
|
|
43134
43535
|
}, [_c('div', {
|
|
43135
|
-
staticClass: "font-weight-bold"
|
|
43136
|
-
}, [_vm._v(_vm._s(group.group))]), _c('div', {
|
|
43536
|
+
staticClass: "font-weight-bold font-14"
|
|
43537
|
+
}, [_vm._v(_vm._s(group.group))]), _vm.groupFields.length > 1 ? _c('div', {
|
|
43137
43538
|
staticClass: "small text-muted mt-1"
|
|
43138
43539
|
}, _vm._l(_vm.groupFields, function (field, idx) {
|
|
43139
43540
|
return _c('span', {
|
|
43140
43541
|
key: field
|
|
43141
43542
|
}, [idx > 0 ? _c('span', [_vm._v(" • ")]) : _vm._e(), _vm.getGroupFieldValue(group, field) ? _c('span', [_vm._v(_vm._s(field) + ": " + _vm._s(_vm.getGroupFieldValue(group, field)))]) : _vm._e()]);
|
|
43142
|
-
}), 0)]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43543
|
+
}), 0) : _vm._e()]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43143
43544
|
staticClass: "list-group list-group-flush"
|
|
43144
43545
|
}, _vm._l(group.items, function (item, itemIndex) {
|
|
43145
43546
|
return _c('li', {
|
|
@@ -43478,14 +43879,14 @@ var Autocompletevue_type_template_id_723cadb2_scoped_true_render = function rend
|
|
|
43478
43879
|
}, [_vm.groupFields.length > 0 ? _c('div', {
|
|
43479
43880
|
staticClass: "d-flex flex-column"
|
|
43480
43881
|
}, [_c('div', {
|
|
43481
|
-
staticClass: "font-weight-bold"
|
|
43482
|
-
}, [_vm._v(_vm._s(group.group))]), _c('div', {
|
|
43882
|
+
staticClass: "font-weight-bold font-14"
|
|
43883
|
+
}, [_vm._v(_vm._s(group.group))]), _vm.groupFields.length > 1 ? _c('div', {
|
|
43483
43884
|
staticClass: "small text-muted mt-1"
|
|
43484
43885
|
}, _vm._l(_vm.groupFields, function (field, idx) {
|
|
43485
43886
|
return _c('span', {
|
|
43486
43887
|
key: field
|
|
43487
43888
|
}, [idx > 0 ? _c('span', [_vm._v(" • ")]) : _vm._e(), _vm.getGroupFieldValue(group, field) ? _c('span', [_vm._v(_vm._s(field) + ": " + _vm._s(_vm.getGroupFieldValue(group, field)))]) : _vm._e()]);
|
|
43488
|
-
}), 0)]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43889
|
+
}), 0) : _vm._e()]) : _c('div', [_vm._v(_vm._s(group.group))])]), _c('ul', {
|
|
43489
43890
|
staticClass: "list-group list-group-flush"
|
|
43490
43891
|
}, _vm._l(group.items, function (item, itemIndex) {
|
|
43491
43892
|
return _c('li', {
|
|
@@ -43622,7 +44023,7 @@ var Autocompletevue_type_template_id_723cadb2_scoped_true_render = function rend
|
|
|
43622
44023
|
}, [_vm._v(_vm._s(error))]);
|
|
43623
44024
|
}), 0) : _vm._e()]);
|
|
43624
44025
|
};
|
|
43625
|
-
var
|
|
44026
|
+
var Autocompletevue_type_template_id_c293aa98_scoped_true_staticRenderFns = [function () {
|
|
43626
44027
|
var _vm = this,
|
|
43627
44028
|
_c = _vm._self._c;
|
|
43628
44029
|
return _c('div', {
|
|
@@ -43646,7 +44047,7 @@ var Autocompletevue_type_template_id_723cadb2_scoped_true_staticRenderFns = [fun
|
|
|
43646
44047
|
}, [_vm._v("Loading...")])]);
|
|
43647
44048
|
}];
|
|
43648
44049
|
|
|
43649
|
-
// CONCATENATED MODULE: ./src/components/Autocomplete.vue?vue&type=template&id=
|
|
44050
|
+
// CONCATENATED MODULE: ./src/components/Autocomplete.vue?vue&type=template&id=c293aa98&scoped=true
|
|
43650
44051
|
|
|
43651
44052
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.every.js
|
|
43652
44053
|
var es_iterator_every = __webpack_require__("d866");
|
|
@@ -44508,8 +44909,8 @@ var es_set_union_v2 = __webpack_require__("72c3");
|
|
|
44508
44909
|
});
|
|
44509
44910
|
// CONCATENATED MODULE: ./src/components/Autocomplete.vue?vue&type=script&lang=js
|
|
44510
44911
|
/* harmony default export */ var components_Autocompletevue_type_script_lang_js = (Autocompletevue_type_script_lang_js);
|
|
44511
|
-
// EXTERNAL MODULE: ./src/components/Autocomplete.vue?vue&type=style&index=0&id=
|
|
44512
|
-
var
|
|
44912
|
+
// EXTERNAL MODULE: ./src/components/Autocomplete.vue?vue&type=style&index=0&id=c293aa98&prod&scoped=true&lang=css
|
|
44913
|
+
var Autocompletevue_type_style_index_0_id_c293aa98_prod_scoped_true_lang_css = __webpack_require__("663a");
|
|
44513
44914
|
|
|
44514
44915
|
// CONCATENATED MODULE: ./src/components/Autocomplete.vue
|
|
44515
44916
|
|
|
@@ -44522,11 +44923,11 @@ var Autocompletevue_type_style_index_0_id_723cadb2_prod_scoped_true_lang_css = _
|
|
|
44522
44923
|
|
|
44523
44924
|
var Autocomplete_component = normalizeComponent(
|
|
44524
44925
|
components_Autocompletevue_type_script_lang_js,
|
|
44525
|
-
|
|
44526
|
-
|
|
44926
|
+
Autocompletevue_type_template_id_c293aa98_scoped_true_render,
|
|
44927
|
+
Autocompletevue_type_template_id_c293aa98_scoped_true_staticRenderFns,
|
|
44527
44928
|
false,
|
|
44528
44929
|
null,
|
|
44529
|
-
"
|
|
44930
|
+
"c293aa98",
|
|
44530
44931
|
null
|
|
44531
44932
|
|
|
44532
44933
|
)
|
|
@@ -45302,7 +45703,7 @@ var SearchableSelect_component = normalizeComponent(
|
|
|
45302
45703
|
},
|
|
45303
45704
|
onSearchableChange: function (x, field, e) {
|
|
45304
45705
|
if (field && field.hasOwnProperty("config") && field.config.hasOwnProperty("onChange")) {
|
|
45305
|
-
field.onChange(field, x);
|
|
45706
|
+
field.config.onChange(field, x);
|
|
45306
45707
|
}
|
|
45307
45708
|
},
|
|
45308
45709
|
RenderOptions() {
|
|
@@ -45339,8 +45740,8 @@ var SearchableSelect_component = normalizeComponent(
|
|
|
45339
45740
|
|
|
45340
45741
|
var SearchableSelectField_component = normalizeComponent(
|
|
45341
45742
|
components_SearchableSelectFieldvue_type_script_lang_js,
|
|
45342
|
-
|
|
45343
|
-
|
|
45743
|
+
SearchableSelectFieldvue_type_template_id_6f324aae_render,
|
|
45744
|
+
SearchableSelectFieldvue_type_template_id_6f324aae_staticRenderFns,
|
|
45344
45745
|
false,
|
|
45345
45746
|
null,
|
|
45346
45747
|
null,
|
|
@@ -45371,6 +45772,7 @@ var SearchableSelectField_component = normalizeComponent(
|
|
|
45371
45772
|
|
|
45372
45773
|
|
|
45373
45774
|
|
|
45775
|
+
|
|
45374
45776
|
|
|
45375
45777
|
|
|
45376
45778
|
//import { getFormValidationRules } from "./validationMessages.vue"
|
|
@@ -45391,6 +45793,7 @@ var SearchableSelectField_component = normalizeComponent(
|
|
|
45391
45793
|
TextAreaField: TextAreaField,
|
|
45392
45794
|
ColorField: ColorField,
|
|
45393
45795
|
FileField: FileField,
|
|
45796
|
+
NormalFileField: NormalFileField,
|
|
45394
45797
|
TreeSelectField: TreeSelectField,
|
|
45395
45798
|
SlotField: SlotField,
|
|
45396
45799
|
PasswordField: PasswordField,
|
|
@@ -46115,6 +46518,13 @@ function isSymbol(value) {
|
|
|
46115
46518
|
module.exports = isSymbol;
|
|
46116
46519
|
|
|
46117
46520
|
|
|
46521
|
+
/***/ }),
|
|
46522
|
+
|
|
46523
|
+
/***/ "fffa":
|
|
46524
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
46525
|
+
|
|
46526
|
+
// extracted by mini-css-extract-plugin
|
|
46527
|
+
|
|
46118
46528
|
/***/ })
|
|
46119
46529
|
|
|
46120
46530
|
/******/ });
|