tg-controls_cli 0.0.22 → 0.0.24
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 +54 -31
- package/dist/myLib.common.js.map +1 -1
- package/dist/myLib.umd.js +54 -31
- 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.umd.js
CHANGED
|
@@ -32274,12 +32274,12 @@ var component = normalizeComponent(
|
|
|
32274
32274
|
)
|
|
32275
32275
|
|
|
32276
32276
|
/* harmony default export */ var NumericField = (component.exports);
|
|
32277
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6f2a365b-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/SelectField.vue?vue&type=template&id=
|
|
32278
|
-
var
|
|
32277
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"6f2a365b-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/SelectField.vue?vue&type=template&id=469186fe&
|
|
32278
|
+
var SelectFieldvue_type_template_id_469186fe_render = function render() {
|
|
32279
32279
|
var _vm = this,
|
|
32280
32280
|
_c = _vm._self._c;
|
|
32281
32281
|
return _c('Field', {
|
|
32282
|
-
staticClass: "
|
|
32282
|
+
staticClass: "w-100",
|
|
32283
32283
|
attrs: {
|
|
32284
32284
|
"name": _vm.fieldInfo.name,
|
|
32285
32285
|
"rules": _vm.fieldInfo.validationRules,
|
|
@@ -32352,9 +32352,9 @@ var SelectFieldvue_type_template_id_1cb9fd6d_render = function render() {
|
|
|
32352
32352
|
}])
|
|
32353
32353
|
});
|
|
32354
32354
|
};
|
|
32355
|
-
var
|
|
32355
|
+
var SelectFieldvue_type_template_id_469186fe_staticRenderFns = [];
|
|
32356
32356
|
|
|
32357
|
-
// CONCATENATED MODULE: ./src/components/SelectField.vue?vue&type=template&id=
|
|
32357
|
+
// CONCATENATED MODULE: ./src/components/SelectField.vue?vue&type=template&id=469186fe&
|
|
32358
32358
|
|
|
32359
32359
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
32360
32360
|
var es_array_push = __webpack_require__("14d9");
|
|
@@ -32391,34 +32391,14 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32391
32391
|
await this.GetSelectOptions();
|
|
32392
32392
|
},
|
|
32393
32393
|
mounted: function () {
|
|
32394
|
+
this.FillDependentDropDown(this.fieldInfo.value);
|
|
32394
32395
|
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
32395
32396
|
},
|
|
32396
32397
|
methods: {
|
|
32397
32398
|
onChange(e) {
|
|
32398
32399
|
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
32399
|
-
|
|
32400
|
-
|
|
32401
|
-
var optionList = [];
|
|
32402
|
-
this.fieldInfo.config.dependent_request_urls.forEach(async requestInfo => {
|
|
32403
|
-
for (var request in requestInfo) {
|
|
32404
|
-
await axios_default.a.get(this.fieldInfo.config.dependent_request_urls + requestInfo[request], {
|
|
32405
|
-
headers: {
|
|
32406
|
-
"Authorization": `Bearer ${this.fieldInfo.config.token}`
|
|
32407
|
-
}
|
|
32408
|
-
}).then(res => {
|
|
32409
|
-
if (res.data) {
|
|
32410
|
-
optionList = res.data;
|
|
32411
|
-
this.dependentOptions.push({
|
|
32412
|
-
request: optionList
|
|
32413
|
-
});
|
|
32414
|
-
}
|
|
32415
|
-
}).catch(error => {
|
|
32416
|
-
console.log('Error on binding slect option in tg-control- ' + error);
|
|
32417
|
-
});
|
|
32418
|
-
}
|
|
32419
|
-
});
|
|
32420
|
-
}
|
|
32421
|
-
this.fieldInfo.config.onChange(e, this.fieldInfo, this.dependentOptions);
|
|
32400
|
+
this.FillDependentDropDown(e.target.value);
|
|
32401
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
32422
32402
|
}
|
|
32423
32403
|
},
|
|
32424
32404
|
showAddIcon: function () {
|
|
@@ -32461,7 +32441,9 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32461
32441
|
}
|
|
32462
32442
|
}).then(res => {
|
|
32463
32443
|
console.log(res.data);
|
|
32464
|
-
if (res.data) {
|
|
32444
|
+
if (res.data && res.data.hasOwnProperty('DATA')) {
|
|
32445
|
+
optionList = res.data.DATA;
|
|
32446
|
+
} else {
|
|
32465
32447
|
optionList = res.data;
|
|
32466
32448
|
}
|
|
32467
32449
|
}).catch(error => {
|
|
@@ -32523,6 +32505,47 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32523
32505
|
}
|
|
32524
32506
|
}
|
|
32525
32507
|
return array;
|
|
32508
|
+
},
|
|
32509
|
+
FillDependentDropDown(id) {
|
|
32510
|
+
console.log(id);
|
|
32511
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('dependent_request_urls') && id) {
|
|
32512
|
+
debugger;
|
|
32513
|
+
var optionList = [];
|
|
32514
|
+
this.dependentOptions = [];
|
|
32515
|
+
this.fieldInfo.config.dependent_request_urls.forEach(async requestInfo => {
|
|
32516
|
+
for (var request in requestInfo) {
|
|
32517
|
+
await axios_default.a.get(requestInfo[request] + id, {
|
|
32518
|
+
headers: {
|
|
32519
|
+
"Authorization": `Bearer ${this.fieldInfo.config.token}`
|
|
32520
|
+
}
|
|
32521
|
+
}).then(res => {
|
|
32522
|
+
if (res.data && res.data.hasOwnProperty('DATA')) {
|
|
32523
|
+
optionList = res.data.DATA;
|
|
32524
|
+
} else {
|
|
32525
|
+
optionList = res.data;
|
|
32526
|
+
}
|
|
32527
|
+
this.dependentOptions.push({
|
|
32528
|
+
request: optionList
|
|
32529
|
+
});
|
|
32530
|
+
if (this.dependentOptions.length > 0) {
|
|
32531
|
+
this.dependentOptions.forEach(optionInfo => {
|
|
32532
|
+
for (var name in optionInfo) {
|
|
32533
|
+
this.$parent.schema.forEach(schema => {
|
|
32534
|
+
schema.Data.forEach(field => {
|
|
32535
|
+
if (name == field.name) {
|
|
32536
|
+
field.config.options = optionInfo[name];
|
|
32537
|
+
}
|
|
32538
|
+
});
|
|
32539
|
+
});
|
|
32540
|
+
}
|
|
32541
|
+
});
|
|
32542
|
+
}
|
|
32543
|
+
}).catch(error => {
|
|
32544
|
+
console.log('Error on binding slect option in tg-control- ' + error);
|
|
32545
|
+
});
|
|
32546
|
+
}
|
|
32547
|
+
});
|
|
32548
|
+
}
|
|
32526
32549
|
}
|
|
32527
32550
|
}
|
|
32528
32551
|
});
|
|
@@ -32538,8 +32561,8 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32538
32561
|
|
|
32539
32562
|
var SelectField_component = normalizeComponent(
|
|
32540
32563
|
components_SelectFieldvue_type_script_lang_js_,
|
|
32541
|
-
|
|
32542
|
-
|
|
32564
|
+
SelectFieldvue_type_template_id_469186fe_render,
|
|
32565
|
+
SelectFieldvue_type_template_id_469186fe_staticRenderFns,
|
|
32543
32566
|
false,
|
|
32544
32567
|
null,
|
|
32545
32568
|
null,
|