tg-controls_cli 0.1.1 → 0.1.2
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 +97 -50
- package/dist/myLib.common.js.map +1 -1
- package/dist/myLib.umd.js +97 -50
- package/dist/myLib.umd.js.map +1 -1
- package/dist/myLib.umd.min.js +1 -1
- package/dist/myLib.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/myLib.common.js
CHANGED
|
@@ -40050,8 +40050,8 @@ var TextField_component = normalizeComponent(
|
|
|
40050
40050
|
)
|
|
40051
40051
|
|
|
40052
40052
|
/* harmony default export */ var TextField = (TextField_component.exports);
|
|
40053
|
-
// 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/PasswordField.vue?vue&type=template&id=
|
|
40054
|
-
var
|
|
40053
|
+
// 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/PasswordField.vue?vue&type=template&id=43b8594f
|
|
40054
|
+
var PasswordFieldvue_type_template_id_43b8594f_render = function render() {
|
|
40055
40055
|
var _vm = this,
|
|
40056
40056
|
_c = _vm._self._c;
|
|
40057
40057
|
return _c('Field', {
|
|
@@ -40219,6 +40219,9 @@ var PasswordFieldvue_type_template_id_7484374a_render = function render() {
|
|
|
40219
40219
|
}
|
|
40220
40220
|
})])]) : _vm._e()]), errors[0] ? _c('span', {
|
|
40221
40221
|
staticClass: "invalid-feedback",
|
|
40222
|
+
staticStyle: {
|
|
40223
|
+
"display": "block"
|
|
40224
|
+
},
|
|
40222
40225
|
attrs: {
|
|
40223
40226
|
"name": _vm.fieldInfo.name
|
|
40224
40227
|
}
|
|
@@ -40227,9 +40230,9 @@ var PasswordFieldvue_type_template_id_7484374a_render = function render() {
|
|
|
40227
40230
|
}])
|
|
40228
40231
|
});
|
|
40229
40232
|
};
|
|
40230
|
-
var
|
|
40233
|
+
var PasswordFieldvue_type_template_id_43b8594f_staticRenderFns = [];
|
|
40231
40234
|
|
|
40232
|
-
// CONCATENATED MODULE: ./src/components/PasswordField.vue?vue&type=template&id=
|
|
40235
|
+
// CONCATENATED MODULE: ./src/components/PasswordField.vue?vue&type=template&id=43b8594f
|
|
40233
40236
|
|
|
40234
40237
|
// 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/PasswordField.vue?vue&type=script&lang=js
|
|
40235
40238
|
|
|
@@ -40321,8 +40324,8 @@ var PasswordFieldvue_type_template_id_7484374a_staticRenderFns = [];
|
|
|
40321
40324
|
|
|
40322
40325
|
var PasswordField_component = normalizeComponent(
|
|
40323
40326
|
components_PasswordFieldvue_type_script_lang_js,
|
|
40324
|
-
|
|
40325
|
-
|
|
40327
|
+
PasswordFieldvue_type_template_id_43b8594f_render,
|
|
40328
|
+
PasswordFieldvue_type_template_id_43b8594f_staticRenderFns,
|
|
40326
40329
|
false,
|
|
40327
40330
|
null,
|
|
40328
40331
|
null,
|
|
@@ -42666,48 +42669,83 @@ var FileField_component = normalizeComponent(
|
|
|
42666
42669
|
)
|
|
42667
42670
|
|
|
42668
42671
|
/* harmony default export */ var FileField = (FileField_component.exports);
|
|
42669
|
-
// 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=
|
|
42670
|
-
var
|
|
42672
|
+
// 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=70887aac
|
|
42673
|
+
var NormalFileFieldvue_type_template_id_70887aac_render = function render() {
|
|
42671
42674
|
var _vm = this,
|
|
42672
42675
|
_c = _vm._self._c;
|
|
42673
|
-
return _c('
|
|
42674
|
-
staticClass: "
|
|
42675
|
-
attrs: {
|
|
42676
|
-
"id": 'File_' + _vm.fieldInfo.name
|
|
42677
|
-
}
|
|
42678
|
-
}, [_c('div', {
|
|
42679
|
-
staticClass: "custom-file"
|
|
42680
|
-
}, [_c('input', {
|
|
42681
|
-
staticClass: "custom-file-input",
|
|
42676
|
+
return _c('Field', {
|
|
42677
|
+
staticClass: "w-100",
|
|
42682
42678
|
attrs: {
|
|
42683
|
-
"type": "file",
|
|
42684
|
-
"id": 'NormalFile_' + _vm.fieldInfo.name,
|
|
42685
42679
|
"disabled": _vm.fieldInfo.disabled,
|
|
42686
|
-
"
|
|
42687
|
-
"
|
|
42680
|
+
"name": _vm.GetDisplayLabel(_vm.fieldInfo),
|
|
42681
|
+
"rules": _vm.fieldInfo.validationRules
|
|
42688
42682
|
},
|
|
42689
|
-
|
|
42690
|
-
"
|
|
42691
|
-
|
|
42683
|
+
scopedSlots: _vm._u([{
|
|
42684
|
+
key: "default",
|
|
42685
|
+
fn: function ({
|
|
42686
|
+
field,
|
|
42687
|
+
errors
|
|
42688
|
+
}) {
|
|
42689
|
+
return [_c('div', {
|
|
42690
|
+
staticClass: "col-12 p-0 fileFieldAttachment",
|
|
42691
|
+
attrs: {
|
|
42692
|
+
"id": 'File_' + _vm.fieldInfo.name
|
|
42693
|
+
}
|
|
42694
|
+
}, [_c('div', {
|
|
42695
|
+
staticClass: "custom-file"
|
|
42696
|
+
}, [_c('input', _vm._b({
|
|
42697
|
+
attrs: {
|
|
42698
|
+
"type": "hidden"
|
|
42699
|
+
},
|
|
42700
|
+
domProps: {
|
|
42701
|
+
"value": _vm.fieldInfo.value
|
|
42702
|
+
}
|
|
42703
|
+
}, 'input', field, false)), _c('input', {
|
|
42704
|
+
staticClass: "custom-file-input",
|
|
42705
|
+
attrs: {
|
|
42706
|
+
"type": "file",
|
|
42707
|
+
"id": 'NormalFile_' + _vm.fieldInfo.name,
|
|
42708
|
+
"disabled": _vm.fieldInfo.disabled,
|
|
42709
|
+
"multiple": _vm.canUploadMultipleFile(),
|
|
42710
|
+
"aria-describedby": 'NormalFile_' + _vm.fieldInfo.name
|
|
42711
|
+
},
|
|
42712
|
+
on: {
|
|
42713
|
+
"change": function ($event) {
|
|
42714
|
+
return _vm.onChange($event);
|
|
42715
|
+
}
|
|
42716
|
+
}
|
|
42717
|
+
}), _c('label', {
|
|
42718
|
+
staticClass: "custom-file-label",
|
|
42719
|
+
style: _vm.errorsLocal.length > 0 || errors[0] ? 'border-color:#e71616 !important' : '',
|
|
42720
|
+
attrs: {
|
|
42721
|
+
"for": 'NormalFile_' + _vm.fieldInfo.name
|
|
42722
|
+
}
|
|
42723
|
+
}, [_vm._v("Choose file")])]), _vm.errorsLocal.length > 0 || errors[0] ? _c('div', [errors[0] && _vm.errorsLocal.length == 0 ? _c('span', {
|
|
42724
|
+
staticClass: "invalid-feedback",
|
|
42725
|
+
staticStyle: {
|
|
42726
|
+
"display": "block"
|
|
42727
|
+
},
|
|
42728
|
+
attrs: {
|
|
42729
|
+
"name": _vm.fieldInfo.name
|
|
42730
|
+
}
|
|
42731
|
+
}, [_vm._v(_vm._s(errors[0]))]) : _vm._e(), _vm._l(_vm.errorsLocal, function (error, index) {
|
|
42732
|
+
return _c('div', {
|
|
42733
|
+
key: index,
|
|
42734
|
+
staticClass: "file-upload__error"
|
|
42735
|
+
}, [_c('span', {
|
|
42736
|
+
staticClass: "invalid-feedback",
|
|
42737
|
+
staticStyle: {
|
|
42738
|
+
"display": "block"
|
|
42739
|
+
}
|
|
42740
|
+
}, [_vm._v(_vm._s(error))])]);
|
|
42741
|
+
})], 2) : _vm._e()])];
|
|
42692
42742
|
}
|
|
42693
|
-
}
|
|
42694
|
-
})
|
|
42695
|
-
staticClass: "custom-file-label",
|
|
42696
|
-
attrs: {
|
|
42697
|
-
"for": 'NormalFile_' + _vm.fieldInfo.name
|
|
42698
|
-
}
|
|
42699
|
-
}, [_vm._v("Choose file")])]), _vm.errors.length > 0 ? _c('div', _vm._l(_vm.errors, function (error, index) {
|
|
42700
|
-
return _c('div', {
|
|
42701
|
-
key: index,
|
|
42702
|
-
staticClass: "file-upload__error"
|
|
42703
|
-
}, [_c('span', {
|
|
42704
|
-
staticClass: "invalid-feedback"
|
|
42705
|
-
}, [_vm._v(_vm._s(error))])]);
|
|
42706
|
-
}), 0) : _vm._e()]);
|
|
42743
|
+
}])
|
|
42744
|
+
});
|
|
42707
42745
|
};
|
|
42708
|
-
var
|
|
42746
|
+
var NormalFileFieldvue_type_template_id_70887aac_staticRenderFns = [];
|
|
42709
42747
|
|
|
42710
|
-
// CONCATENATED MODULE: ./src/components/NormalFileField.vue?vue&type=template&id=
|
|
42748
|
+
// CONCATENATED MODULE: ./src/components/NormalFileField.vue?vue&type=template&id=70887aac
|
|
42711
42749
|
|
|
42712
42750
|
// 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
|
|
42713
42751
|
|
|
@@ -42732,7 +42770,7 @@ var NormalFileFieldvue_type_template_id_0df5834b_staticRenderFns = [];
|
|
|
42732
42770
|
maxSize: 0,
|
|
42733
42771
|
accept: '',
|
|
42734
42772
|
reject: '',
|
|
42735
|
-
|
|
42773
|
+
errorsLocal: [],
|
|
42736
42774
|
file: {
|
|
42737
42775
|
name: "",
|
|
42738
42776
|
size: 0,
|
|
@@ -42808,7 +42846,7 @@ var NormalFileFieldvue_type_template_id_0df5834b_staticRenderFns = [];
|
|
|
42808
42846
|
}
|
|
42809
42847
|
},
|
|
42810
42848
|
onChange(e) {
|
|
42811
|
-
this.
|
|
42849
|
+
this.errorsLocal = [];
|
|
42812
42850
|
// Check if file is selected
|
|
42813
42851
|
if (e.target.files && e.target.files[0]) {
|
|
42814
42852
|
// Check if file is valid
|
|
@@ -42853,7 +42891,7 @@ var NormalFileFieldvue_type_template_id_0df5834b_staticRenderFns = [];
|
|
|
42853
42891
|
var fileName = document.getElementById('NormalFile_' + this.fieldInfo.name).files[0].name;
|
|
42854
42892
|
var nextSibling = e.target.nextElementSibling;
|
|
42855
42893
|
nextSibling.innerText = fileName;
|
|
42856
|
-
if (this.
|
|
42894
|
+
if (this.errorsLocal.length == 0) {
|
|
42857
42895
|
this.fieldInfo.value = e.target.files;
|
|
42858
42896
|
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
42859
42897
|
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
@@ -42865,25 +42903,25 @@ var NormalFileFieldvue_type_template_id_0df5834b_staticRenderFns = [];
|
|
|
42865
42903
|
if (fileSize <= this.maxSize) {
|
|
42866
42904
|
console.log("File size is valid");
|
|
42867
42905
|
} else {
|
|
42868
|
-
this.
|
|
42906
|
+
this.errorsLocal.push(`File size should be less than ${this.maxSize} MB`);
|
|
42869
42907
|
}
|
|
42870
42908
|
},
|
|
42871
42909
|
isFileTypeValid(fileExtention) {
|
|
42872
42910
|
if (this.reject != "" && this.reject.split(",").length > 0 && this.reject.split(",").includes(fileExtention)) {
|
|
42873
|
-
this.
|
|
42911
|
+
this.errorsLocal.push(`File type should not be ${this.reject}`);
|
|
42874
42912
|
}
|
|
42875
42913
|
if (this.accept != "" && this.accept.split(",").length > 0) {
|
|
42876
42914
|
if (this.accept.split(",").includes(fileExtention)) {
|
|
42877
42915
|
console.log("File type is valid");
|
|
42878
42916
|
} else {
|
|
42879
|
-
this.
|
|
42917
|
+
this.errorsLocal.push(`File type should be ${this.accept}`);
|
|
42880
42918
|
}
|
|
42881
42919
|
}
|
|
42882
42920
|
},
|
|
42883
42921
|
isFileValid(file) {
|
|
42884
42922
|
this.isFileSizeValid(Math.round(file.size / 1024 / 1024 * 100) / 100);
|
|
42885
42923
|
this.isFileTypeValid(file.name.split(".").pop());
|
|
42886
|
-
if (this.
|
|
42924
|
+
if (this.errorsLocal.length === 0) {
|
|
42887
42925
|
return true;
|
|
42888
42926
|
} else {
|
|
42889
42927
|
return false;
|
|
@@ -43001,6 +43039,15 @@ var NormalFileFieldvue_type_template_id_0df5834b_staticRenderFns = [];
|
|
|
43001
43039
|
dragLeave: function () {
|
|
43002
43040
|
this.isDragging = false;
|
|
43003
43041
|
},
|
|
43042
|
+
GetDisplayLabel(field) {
|
|
43043
|
+
var labelName = '';
|
|
43044
|
+
if (field.hasOwnProperty('label') && field.label) {
|
|
43045
|
+
labelName = field.label;
|
|
43046
|
+
} else if (field.hasOwnProperty('display_name') && field.display_name) {
|
|
43047
|
+
labelName = field.display_name;
|
|
43048
|
+
}
|
|
43049
|
+
return labelName;
|
|
43050
|
+
},
|
|
43004
43051
|
handleDrop: function (event) {
|
|
43005
43052
|
event.preventDefault();
|
|
43006
43053
|
this.isDragging = false;
|
|
@@ -43044,7 +43091,7 @@ var NormalFileFieldvue_type_template_id_0df5834b_staticRenderFns = [];
|
|
|
43044
43091
|
console.log("Invalid file");
|
|
43045
43092
|
}
|
|
43046
43093
|
}
|
|
43047
|
-
if (this.
|
|
43094
|
+
if (this.errorsLocal.length == 0) {
|
|
43048
43095
|
this.fieldInfo.value = files;
|
|
43049
43096
|
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
43050
43097
|
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
@@ -43066,8 +43113,8 @@ var NormalFileFieldvue_type_template_id_0df5834b_staticRenderFns = [];
|
|
|
43066
43113
|
|
|
43067
43114
|
var NormalFileField_component = normalizeComponent(
|
|
43068
43115
|
components_NormalFileFieldvue_type_script_lang_js,
|
|
43069
|
-
|
|
43070
|
-
|
|
43116
|
+
NormalFileFieldvue_type_template_id_70887aac_render,
|
|
43117
|
+
NormalFileFieldvue_type_template_id_70887aac_staticRenderFns,
|
|
43071
43118
|
false,
|
|
43072
43119
|
null,
|
|
43073
43120
|
null,
|