tg-controls_cli 0.0.22 → 0.0.23
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 +51 -30
- package/dist/myLib.common.js.map +1 -1
- package/dist/myLib.umd.js +51 -30
- 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
|
@@ -32265,8 +32265,8 @@ var component = normalizeComponent(
|
|
|
32265
32265
|
)
|
|
32266
32266
|
|
|
32267
32267
|
/* harmony default export */ var NumericField = (component.exports);
|
|
32268
|
-
// 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=
|
|
32269
|
-
var
|
|
32268
|
+
// 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=3e7676e6&
|
|
32269
|
+
var SelectFieldvue_type_template_id_3e7676e6_render = function render() {
|
|
32270
32270
|
var _vm = this,
|
|
32271
32271
|
_c = _vm._self._c;
|
|
32272
32272
|
return _c('Field', {
|
|
@@ -32343,9 +32343,9 @@ var SelectFieldvue_type_template_id_1cb9fd6d_render = function render() {
|
|
|
32343
32343
|
}])
|
|
32344
32344
|
});
|
|
32345
32345
|
};
|
|
32346
|
-
var
|
|
32346
|
+
var SelectFieldvue_type_template_id_3e7676e6_staticRenderFns = [];
|
|
32347
32347
|
|
|
32348
|
-
// CONCATENATED MODULE: ./src/components/SelectField.vue?vue&type=template&id=
|
|
32348
|
+
// CONCATENATED MODULE: ./src/components/SelectField.vue?vue&type=template&id=3e7676e6&
|
|
32349
32349
|
|
|
32350
32350
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
32351
32351
|
var es_array_push = __webpack_require__("14d9");
|
|
@@ -32382,34 +32382,14 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32382
32382
|
await this.GetSelectOptions();
|
|
32383
32383
|
},
|
|
32384
32384
|
mounted: function () {
|
|
32385
|
+
this.FillDependentDropDown(this.fieldInfo.value);
|
|
32385
32386
|
this.fieldInfo.validationRules = getValidationRules(this.fieldInfo.validationRules, this.lang);
|
|
32386
32387
|
},
|
|
32387
32388
|
methods: {
|
|
32388
32389
|
onChange(e) {
|
|
32389
32390
|
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.onChange) {
|
|
32390
|
-
|
|
32391
|
-
|
|
32392
|
-
var optionList = [];
|
|
32393
|
-
this.fieldInfo.config.dependent_request_urls.forEach(async requestInfo => {
|
|
32394
|
-
for (var request in requestInfo) {
|
|
32395
|
-
await axios_default.a.get(this.fieldInfo.config.dependent_request_urls + requestInfo[request], {
|
|
32396
|
-
headers: {
|
|
32397
|
-
"Authorization": `Bearer ${this.fieldInfo.config.token}`
|
|
32398
|
-
}
|
|
32399
|
-
}).then(res => {
|
|
32400
|
-
if (res.data) {
|
|
32401
|
-
optionList = res.data;
|
|
32402
|
-
this.dependentOptions.push({
|
|
32403
|
-
request: optionList
|
|
32404
|
-
});
|
|
32405
|
-
}
|
|
32406
|
-
}).catch(error => {
|
|
32407
|
-
console.log('Error on binding slect option in tg-control- ' + error);
|
|
32408
|
-
});
|
|
32409
|
-
}
|
|
32410
|
-
});
|
|
32411
|
-
}
|
|
32412
|
-
this.fieldInfo.config.onChange(e, this.fieldInfo, this.dependentOptions);
|
|
32391
|
+
this.FillDependentDropDown(e.target.value);
|
|
32392
|
+
this.fieldInfo.config.onChange(e, this.fieldInfo);
|
|
32413
32393
|
}
|
|
32414
32394
|
},
|
|
32415
32395
|
showAddIcon: function () {
|
|
@@ -32452,7 +32432,9 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32452
32432
|
}
|
|
32453
32433
|
}).then(res => {
|
|
32454
32434
|
console.log(res.data);
|
|
32455
|
-
if (res.data) {
|
|
32435
|
+
if (res.data && res.data.hasOwnProperty('DATA')) {
|
|
32436
|
+
optionList = res.data.DATA;
|
|
32437
|
+
} else {
|
|
32456
32438
|
optionList = res.data;
|
|
32457
32439
|
}
|
|
32458
32440
|
}).catch(error => {
|
|
@@ -32514,6 +32496,45 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32514
32496
|
}
|
|
32515
32497
|
}
|
|
32516
32498
|
return array;
|
|
32499
|
+
},
|
|
32500
|
+
FillDependentDropDown(id) {
|
|
32501
|
+
console.log(id);
|
|
32502
|
+
if (this.fieldInfo && this.fieldInfo.config && this.fieldInfo.config.hasOwnProperty('dependent_request_urls') && id) {
|
|
32503
|
+
debugger;
|
|
32504
|
+
var optionList = [];
|
|
32505
|
+
this.dependentOptions = [];
|
|
32506
|
+
this.fieldInfo.config.dependent_request_urls.forEach(async requestInfo => {
|
|
32507
|
+
for (var request in requestInfo) {
|
|
32508
|
+
await axios_default.a.get(requestInfo[request] + id, {
|
|
32509
|
+
headers: {
|
|
32510
|
+
"Authorization": `Bearer ${this.fieldInfo.config.token}`
|
|
32511
|
+
}
|
|
32512
|
+
}).then(res => {
|
|
32513
|
+
if (res.data) {
|
|
32514
|
+
optionList = res.data;
|
|
32515
|
+
this.dependentOptions.push({
|
|
32516
|
+
request: optionList
|
|
32517
|
+
});
|
|
32518
|
+
}
|
|
32519
|
+
if (this.dependentOptions.length > 0) {
|
|
32520
|
+
this.dependentOptions.forEach(optionInfo => {
|
|
32521
|
+
for (var name in optionInfo) {
|
|
32522
|
+
this.$parent.schema.forEach(schema => {
|
|
32523
|
+
schema.Data.forEach(field => {
|
|
32524
|
+
if (name == field.name) {
|
|
32525
|
+
field.config.options = optionInfo[name];
|
|
32526
|
+
}
|
|
32527
|
+
});
|
|
32528
|
+
});
|
|
32529
|
+
}
|
|
32530
|
+
});
|
|
32531
|
+
}
|
|
32532
|
+
}).catch(error => {
|
|
32533
|
+
console.log('Error on binding slect option in tg-control- ' + error);
|
|
32534
|
+
});
|
|
32535
|
+
}
|
|
32536
|
+
});
|
|
32537
|
+
}
|
|
32517
32538
|
}
|
|
32518
32539
|
}
|
|
32519
32540
|
});
|
|
@@ -32529,8 +32550,8 @@ var axios_default = /*#__PURE__*/__webpack_require__.n(axios);
|
|
|
32529
32550
|
|
|
32530
32551
|
var SelectField_component = normalizeComponent(
|
|
32531
32552
|
components_SelectFieldvue_type_script_lang_js_,
|
|
32532
|
-
|
|
32533
|
-
|
|
32553
|
+
SelectFieldvue_type_template_id_3e7676e6_render,
|
|
32554
|
+
SelectFieldvue_type_template_id_3e7676e6_staticRenderFns,
|
|
32534
32555
|
false,
|
|
32535
32556
|
null,
|
|
32536
32557
|
null,
|