ecinc-cloud-wappaio 9.7.35 → 9.7.37
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/lib/ecwappaio.common.js +2260 -139
- package/lib/ecwappaio.umd.js +2260 -139
- package/lib/ecwappaio.umd.min.js +1 -1
- package/package.json +1 -1
package/lib/ecwappaio.common.js
CHANGED
|
@@ -33233,7 +33233,7 @@ var TextRecognition_PDFInjector = PDFInjector;
|
|
|
33233
33233
|
|
|
33234
33234
|
/***/ }),
|
|
33235
33235
|
|
|
33236
|
-
/***/
|
|
33236
|
+
/***/ 8614:
|
|
33237
33237
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33238
33238
|
|
|
33239
33239
|
"use strict";
|
|
@@ -42598,8 +42598,8 @@ var ModifyWflogSubmitFile_component = (0,componentNormalizer/* default */.A)(
|
|
|
42598
42598
|
)
|
|
42599
42599
|
|
|
42600
42600
|
/* harmony default export */ var ModifyWflogSubmitFile = (ModifyWflogSubmitFile_component.exports);
|
|
42601
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=template&id=
|
|
42602
|
-
var
|
|
42601
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=template&id=54a6b143&scoped=true
|
|
42602
|
+
var ModifyWfNodelogvue_type_template_id_54a6b143_scoped_true_render = function render() {
|
|
42603
42603
|
var _vm = this,
|
|
42604
42604
|
_c = _vm._self._c;
|
|
42605
42605
|
return _c('div', {
|
|
@@ -42969,7 +42969,25 @@ var ModifyWfNodelogvue_type_template_id_46e09427_scoped_true_render = function r
|
|
|
42969
42969
|
return _vm.btnAddWfUserClick(scope.row);
|
|
42970
42970
|
}
|
|
42971
42971
|
}
|
|
42972
|
-
}, [_vm._v("新增")]) : _vm._e(),
|
|
42972
|
+
}, [_vm._v("新增")]) : _vm._e(), scope.row.status == 9 && _vm.modifyType == 'flowadmin' ? _c('el-link', {
|
|
42973
|
+
directives: [{
|
|
42974
|
+
name: "text-lbl",
|
|
42975
|
+
rawName: "v-text-lbl",
|
|
42976
|
+
value: 'PageBtns.callback',
|
|
42977
|
+
expression: "'PageBtns.callback'"
|
|
42978
|
+
}],
|
|
42979
|
+
attrs: {
|
|
42980
|
+
"underline": false,
|
|
42981
|
+
"type": "primary",
|
|
42982
|
+
"icon": "el-icon-plus"
|
|
42983
|
+
},
|
|
42984
|
+
on: {
|
|
42985
|
+
"click": function click($event) {
|
|
42986
|
+
$event.stopPropagation();
|
|
42987
|
+
return _vm.btnCallbackClick(scope.row);
|
|
42988
|
+
}
|
|
42989
|
+
}
|
|
42990
|
+
}, [_vm._v("收回")]) : _vm._e(), (scope.row.status <= 5 || scope.row.status == 8) && (_vm.modifyType == 'flowadmin' || _vm.modifyType == 'donext' && _vm.callTNID == scope.row.parentId) ? _c('el-link', {
|
|
42973
42991
|
directives: [{
|
|
42974
42992
|
name: "text-lbl",
|
|
42975
42993
|
rawName: "v-text-lbl",
|
|
@@ -43051,10 +43069,10 @@ var ModifyWfNodelogvue_type_template_id_46e09427_scoped_true_render = function r
|
|
|
43051
43069
|
}
|
|
43052
43070
|
}, [_vm._v("删除")]) : _vm._e()]];
|
|
43053
43071
|
}
|
|
43054
|
-
}], null, false,
|
|
43072
|
+
}], null, false, 131143405)
|
|
43055
43073
|
}) : _vm._e()], 1) : _vm._e()], 1) : _vm._e(), _c('ModifyWflogAddUser'), _c('WflogAddReader'), _c('ModifyWflogSubmitFile'), _c('ModifyWflogIdea'), _c('WriteToReadIdea'), _c('ModifyFormTrace')], 1);
|
|
43056
43074
|
};
|
|
43057
|
-
var
|
|
43075
|
+
var ModifyWfNodelogvue_type_template_id_54a6b143_scoped_true_staticRenderFns = [];
|
|
43058
43076
|
|
|
43059
43077
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=script&lang=js
|
|
43060
43078
|
function ModifyWfNodelogvue_type_script_lang_js_typeof(o) { "@babel/helpers - typeof"; return ModifyWfNodelogvue_type_script_lang_js_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, ModifyWfNodelogvue_type_script_lang_js_typeof(o); }
|
|
@@ -43230,9 +43248,12 @@ function ModifyWfNodelogvue_type_script_lang_js_asyncToGenerator(n) { return fun
|
|
|
43230
43248
|
}
|
|
43231
43249
|
},
|
|
43232
43250
|
// 收回文件
|
|
43233
|
-
btnCallbackClick: function btnCallbackClick() {
|
|
43251
|
+
btnCallbackClick: function btnCallbackClick(row) {
|
|
43234
43252
|
var _this4 = this;
|
|
43235
|
-
if (this.
|
|
43253
|
+
if (this.modifyType == 'flowadmin' && row.id) {
|
|
43254
|
+
this.selTNID = [];
|
|
43255
|
+
this.callTNID = row.id;
|
|
43256
|
+
} else if (this.selTNID.length === 0 && this.$el.querySelectorAll('.callback-chk').length > 0) {
|
|
43236
43257
|
this.$alert(this.$tx('ecwapp.Wflowform.ModifyWfNodelog.canBeretRieved', '没有能够收回的处理环节!'), '操作提示');
|
|
43237
43258
|
return;
|
|
43238
43259
|
}
|
|
@@ -43262,6 +43283,9 @@ function ModifyWfNodelogvue_type_script_lang_js_asyncToGenerator(n) { return fun
|
|
|
43262
43283
|
} else {
|
|
43263
43284
|
reqParams.sendSms = _this4.callbackSendsms;
|
|
43264
43285
|
}
|
|
43286
|
+
if (_this4.modifyType == 'flowadmin' && row.id) {
|
|
43287
|
+
reqParams.modifyType = 'callback'; //管理员强制收回
|
|
43288
|
+
}
|
|
43265
43289
|
_this4.$http({
|
|
43266
43290
|
method: 'PUT',
|
|
43267
43291
|
contentType: 'application/x-www-form-urlencoded',
|
|
@@ -43680,9 +43704,9 @@ function ModifyWfNodelogvue_type_script_lang_js_asyncToGenerator(n) { return fun
|
|
|
43680
43704
|
});
|
|
43681
43705
|
;// CONCATENATED MODULE: ./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=script&lang=js
|
|
43682
43706
|
/* harmony default export */ var src_ModifyWfNodelogvue_type_script_lang_js = (ModifyWfNodelogvue_type_script_lang_js);
|
|
43683
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=style&index=0&id=
|
|
43684
|
-
var
|
|
43685
|
-
;// CONCATENATED MODULE: ./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=style&index=0&id=
|
|
43707
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=style&index=0&id=54a6b143&prod&scoped=true&lang=scss
|
|
43708
|
+
var ModifyWfNodelogvue_type_style_index_0_id_54a6b143_prod_scoped_true_lang_scss = __webpack_require__(55159);
|
|
43709
|
+
;// CONCATENATED MODULE: ./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue?vue&type=style&index=0&id=54a6b143&prod&scoped=true&lang=scss
|
|
43686
43710
|
|
|
43687
43711
|
;// CONCATENATED MODULE: ./packages/ecwapp/Wflowform/src/ModifyWfNodelog.vue
|
|
43688
43712
|
|
|
@@ -43695,11 +43719,11 @@ var ModifyWfNodelogvue_type_style_index_0_id_46e09427_prod_scoped_true_lang_scss
|
|
|
43695
43719
|
|
|
43696
43720
|
var ModifyWfNodelog_component = (0,componentNormalizer/* default */.A)(
|
|
43697
43721
|
src_ModifyWfNodelogvue_type_script_lang_js,
|
|
43698
|
-
|
|
43699
|
-
|
|
43722
|
+
ModifyWfNodelogvue_type_template_id_54a6b143_scoped_true_render,
|
|
43723
|
+
ModifyWfNodelogvue_type_template_id_54a6b143_scoped_true_staticRenderFns,
|
|
43700
43724
|
false,
|
|
43701
43725
|
null,
|
|
43702
|
-
"
|
|
43726
|
+
"54a6b143",
|
|
43703
43727
|
null
|
|
43704
43728
|
|
|
43705
43729
|
)
|
|
@@ -50760,6 +50784,7 @@ module.exports = {
|
|
|
50760
50784
|
PageBtns: {
|
|
50761
50785
|
sure: 'OK',
|
|
50762
50786
|
choice: 'Select',
|
|
50787
|
+
callback: 'Callback',
|
|
50763
50788
|
del: 'Delete',
|
|
50764
50789
|
resend: 'Resend'
|
|
50765
50790
|
},
|
|
@@ -51300,6 +51325,7 @@ module.exports = {
|
|
|
51300
51325
|
PageBtns: {
|
|
51301
51326
|
sure: '确定',
|
|
51302
51327
|
choice: '选择',
|
|
51328
|
+
callback: '收回',
|
|
51303
51329
|
del: '删 除'
|
|
51304
51330
|
},
|
|
51305
51331
|
PdfTools: {
|
|
@@ -166058,7 +166084,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".CodeMirror-hints,.CodeMirror-lint-too
|
|
|
166058
166084
|
|
|
166059
166085
|
/***/ }),
|
|
166060
166086
|
|
|
166061
|
-
/***/
|
|
166087
|
+
/***/ 61272:
|
|
166062
166088
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
166063
166089
|
|
|
166064
166090
|
"use strict";
|
|
@@ -166079,7 +166105,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".form_item .el-date-editor .el-input__
|
|
|
166079
166105
|
|
|
166080
166106
|
/***/ }),
|
|
166081
166107
|
|
|
166082
|
-
/***/
|
|
166108
|
+
/***/ 876:
|
|
166083
166109
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
166084
166110
|
|
|
166085
166111
|
"use strict";
|
|
@@ -166093,7 +166119,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
166093
166119
|
|
|
166094
166120
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
166095
166121
|
// Module
|
|
166096
|
-
___CSS_LOADER_EXPORT___.push([module.id, "span[data-v-
|
|
166122
|
+
___CSS_LOADER_EXPORT___.push([module.id, "span[data-v-4ca23f1c]{white-space:pre-wrap}[data-v-4ca23f1c] .el-upload--text{width:100%}[data-v-4ca23f1c] .el-divider--horizontal{margin:10px 0}.form_item .el-link[data-v-4ca23f1c]{margin-left:6px}.form_item[data-v-4ca23f1c] .el-radio__label{display:inline-block;padding:3px 5px}", ""]);
|
|
166097
166123
|
// Exports
|
|
166098
166124
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
166099
166125
|
|
|
@@ -166294,7 +166320,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".list-border .more-btn-drop{padding:10
|
|
|
166294
166320
|
|
|
166295
166321
|
/***/ }),
|
|
166296
166322
|
|
|
166297
|
-
/***/
|
|
166323
|
+
/***/ 56495:
|
|
166298
166324
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
166299
166325
|
|
|
166300
166326
|
"use strict";
|
|
@@ -166308,7 +166334,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
166308
166334
|
|
|
166309
166335
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
166310
166336
|
// Module
|
|
166311
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".content-column[data-v-
|
|
166337
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".content-column[data-v-89fdb540]{cursor:pointer}.column_operate[data-v-89fdb540]{background-color:#fff}.column_operate[data-v-89fdb540],.column_operate[data-v-89fdb540] .cell{white-space:nowrap!important;overflow:hidden!important;word-break:keep-all}.el-pagination-container[data-v-89fdb540]{text-align:right;margin-top:10px}.el-pagination-container .selected-rows[data-v-89fdb540]{float:left;color:#606266;font-size:13px;line-height:28px}.el-pagination[data-v-89fdb540]{padding-right:0;font-weight:400}.el-icon[data-v-89fdb540]:before{padding-right:3px}[data-v-89fdb540] th>.cell{word-break:keep-all;white-space:nowrap}[data-v-89fdb540] .el-table__header .is-fixed{color:#333;background-color:#f2f5fb}[data-v-89fdb540] .close-tooltip .cell{word-break:normal}[data-v-89fdb540] .el-table__body-wrapper::-webkit-scrollbar{width:6px;height:6px}[data-v-89fdb540] .el-table--scrollable-x{padding-right:2px}[data-v-89fdb540] .el-table--scrollable-x .el-table__body-wrapper{padding-bottom:2px;margin-bottom:2px;cursor:pointer}[data-v-89fdb540] .el-table--scrollable-x .el-table__body-wrapper .el-table__body{cursor:default}[data-v-89fdb540] .el-table__body-wrapper::-webkit-scrollbar-thumb{border-radius:4px;background-color:hsla(220,4%,58%,.3)}[data-v-89fdb540] .el-table__body-wrapper::-webkit-scrollbar-thumb:hover{background-color:hsla(220,4%,58%,.5);margin-right:2px}#card-table[data-v-89fdb540]{padding:10px 0 10px 0}#card-table .card-item[data-v-89fdb540]{background:#f7f9ff;border-radius:2px 0 0 2px;padding:20px;margin-bottom:15px;cursor:pointer}#card-table .card-item .card-top[data-v-89fdb540]{color:#333;font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;line-height:21px}#card-table .card-item .card-top .card-top-left[data-v-89fdb540],#card-table .card-item .card-top .card-top-right[data-v-89fdb540]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#card-table .card-item .card-top .card-top-right[data-v-89fdb540]{text-align:end}#card-table .card-item .card-bottom[data-v-89fdb540]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;line-height:17px;margin-top:10px;color:#999;font-size:13px}#card-table .card-item .card-bottom[data-v-89fdb540],#card-table .card-item .card-bottom .card-bottom-left[data-v-89fdb540]{display:-webkit-box;display:-ms-flexbox;display:flex}#card-table .card-item .card-bottom .card-bottom-left .span-item[data-v-89fdb540]{margin-right:30px}#card-table .card-item .card-bottom .card-bottom-right[data-v-89fdb540]{display:-webkit-box;display:-ms-flexbox;display:flex}#card-table .card-item .card-bottom .card-bottom-right .span-item[data-v-89fdb540]{margin-left:30px}#card-table .card-item[data-v-89fdb540]:hover{background:#eef3ff}#card-table .card-item[data-v-89fdb540]:last-child{margin-bottom:0}#card-table .card-empty[data-v-89fdb540]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}#card-table .card-empty .empty-message[data-v-89fdb540]{color:#999;margin-top:10px}", ""]);
|
|
166312
166338
|
// Exports
|
|
166313
166339
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
166314
166340
|
|
|
@@ -166903,7 +166929,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".img-view-dialog[data-v-208a9735]{posi
|
|
|
166903
166929
|
|
|
166904
166930
|
/***/ }),
|
|
166905
166931
|
|
|
166906
|
-
/***/
|
|
166932
|
+
/***/ 21081:
|
|
166907
166933
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
166908
166934
|
|
|
166909
166935
|
"use strict";
|
|
@@ -166917,7 +166943,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
166917
166943
|
|
|
166918
166944
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
166919
166945
|
// Module
|
|
166920
|
-
___CSS_LOADER_EXPORT___.push([module.id, "[data-v-
|
|
166946
|
+
___CSS_LOADER_EXPORT___.push([module.id, "[data-v-54a6b143] .el-dialog__body{min-height:500px}[data-v-54a6b143] .el-dialog__body .handwritingIdea{width:100px}[data-v-54a6b143] .el-table__row .cell{line-height:18px;white-space:pre-wrap}[data-v-54a6b143] .el-table__row td{padding:5px 0}[data-v-54a6b143] .el-table__row .el-checkbox__label{display:none}.el-table-toolbar[data-v-54a6b143]{margin:0 0 10px 0}.el-table-toolbar .el-row[data-v-54a6b143]{height:32px;line-height:32px}.el-table-toolbar-right[data-v-54a6b143]{text-align:right}.el-table-toolbar-right[data-v-54a6b143] .el-checkbox__input+.el-checkbox__label{color:inherit;margin-right:10px}", ""]);
|
|
166921
166947
|
// Exports
|
|
166922
166948
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
166923
166949
|
|
|
@@ -263278,35 +263304,35 @@ var update = add("f9ee0d56", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
263278
263304
|
|
|
263279
263305
|
/***/ }),
|
|
263280
263306
|
|
|
263281
|
-
/***/
|
|
263307
|
+
/***/ 10526:
|
|
263282
263308
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
263283
263309
|
|
|
263284
263310
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
263285
263311
|
|
|
263286
263312
|
// load the styles
|
|
263287
|
-
var content = __webpack_require__(
|
|
263313
|
+
var content = __webpack_require__(61272);
|
|
263288
263314
|
if(content.__esModule) content = content.default;
|
|
263289
263315
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
263290
263316
|
if(content.locals) module.exports = content.locals;
|
|
263291
263317
|
// add the styles to the DOM
|
|
263292
263318
|
var add = (__webpack_require__(99548)/* ["default"] */ .A)
|
|
263293
|
-
var update = add("
|
|
263319
|
+
var update = add("90e82fc4", content, true, {"sourceMap":false,"shadowMode":false});
|
|
263294
263320
|
|
|
263295
263321
|
/***/ }),
|
|
263296
263322
|
|
|
263297
|
-
/***/
|
|
263323
|
+
/***/ 65094:
|
|
263298
263324
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
263299
263325
|
|
|
263300
263326
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
263301
263327
|
|
|
263302
263328
|
// load the styles
|
|
263303
|
-
var content = __webpack_require__(
|
|
263329
|
+
var content = __webpack_require__(876);
|
|
263304
263330
|
if(content.__esModule) content = content.default;
|
|
263305
263331
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
263306
263332
|
if(content.locals) module.exports = content.locals;
|
|
263307
263333
|
// add the styles to the DOM
|
|
263308
263334
|
var add = (__webpack_require__(99548)/* ["default"] */ .A)
|
|
263309
|
-
var update = add("
|
|
263335
|
+
var update = add("5a27ecea", content, true, {"sourceMap":false,"shadowMode":false});
|
|
263310
263336
|
|
|
263311
263337
|
/***/ }),
|
|
263312
263338
|
|
|
@@ -263454,19 +263480,19 @@ var update = add("28e5668b", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
263454
263480
|
|
|
263455
263481
|
/***/ }),
|
|
263456
263482
|
|
|
263457
|
-
/***/
|
|
263483
|
+
/***/ 20789:
|
|
263458
263484
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
263459
263485
|
|
|
263460
263486
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
263461
263487
|
|
|
263462
263488
|
// load the styles
|
|
263463
|
-
var content = __webpack_require__(
|
|
263489
|
+
var content = __webpack_require__(56495);
|
|
263464
263490
|
if(content.__esModule) content = content.default;
|
|
263465
263491
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
263466
263492
|
if(content.locals) module.exports = content.locals;
|
|
263467
263493
|
// add the styles to the DOM
|
|
263468
263494
|
var add = (__webpack_require__(99548)/* ["default"] */ .A)
|
|
263469
|
-
var update = add("
|
|
263495
|
+
var update = add("2bda0078", content, true, {"sourceMap":false,"shadowMode":false});
|
|
263470
263496
|
|
|
263471
263497
|
/***/ }),
|
|
263472
263498
|
|
|
@@ -263918,19 +263944,19 @@ var update = add("116b361c", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
263918
263944
|
|
|
263919
263945
|
/***/ }),
|
|
263920
263946
|
|
|
263921
|
-
/***/
|
|
263947
|
+
/***/ 55159:
|
|
263922
263948
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
263923
263949
|
|
|
263924
263950
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
263925
263951
|
|
|
263926
263952
|
// load the styles
|
|
263927
|
-
var content = __webpack_require__(
|
|
263953
|
+
var content = __webpack_require__(21081);
|
|
263928
263954
|
if(content.__esModule) content = content.default;
|
|
263929
263955
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
263930
263956
|
if(content.locals) module.exports = content.locals;
|
|
263931
263957
|
// add the styles to the DOM
|
|
263932
263958
|
var add = (__webpack_require__(99548)/* ["default"] */ .A)
|
|
263933
|
-
var update = add("
|
|
263959
|
+
var update = add("b1cc0b3a", content, true, {"sourceMap":false,"shadowMode":false});
|
|
263934
263960
|
|
|
263935
263961
|
/***/ }),
|
|
263936
263962
|
|
|
@@ -274367,8 +274393,8 @@ var DynamicFormvue_type_template_id_2bb3f766_render = function render() {
|
|
|
274367
274393
|
};
|
|
274368
274394
|
var DynamicFormvue_type_template_id_2bb3f766_staticRenderFns = [];
|
|
274369
274395
|
|
|
274370
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=template&id=
|
|
274371
|
-
var
|
|
274396
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=template&id=4ca23f1c&scoped=true
|
|
274397
|
+
var FormItemvue_type_template_id_4ca23f1c_scoped_true_render = function render() {
|
|
274372
274398
|
var _vm = this,
|
|
274373
274399
|
_c = _vm._self._c;
|
|
274374
274400
|
return _vm.formItem.propName ? _c('div', {
|
|
@@ -274488,7 +274514,21 @@ var FormItemvue_type_template_id_26aedf1c_scoped_true_render = function render()
|
|
|
274488
274514
|
return _vm.removeFormfile(_vm.formItem.attachId);
|
|
274489
274515
|
}
|
|
274490
274516
|
}
|
|
274491
|
-
}) : _vm._e()], 2) : _vm.formItem.
|
|
274517
|
+
}) : _vm._e()], 2) : _vm.formItem.elementType === 'datetimeRange' ? _c('datetime-range', {
|
|
274518
|
+
attrs: {
|
|
274519
|
+
"vo": _vm.vo,
|
|
274520
|
+
"type": _vm.formItem.pickerType,
|
|
274521
|
+
"v-model-start": _vm.formItem.vModelStart,
|
|
274522
|
+
"v-model-end": _vm.formItem.vModelEnd,
|
|
274523
|
+
"can-edit": _vm.canEdit,
|
|
274524
|
+
"default-time-start": _vm.formItem.defaultTimeStart,
|
|
274525
|
+
"default-time-end": _vm.formItem.defaultTimeEnd,
|
|
274526
|
+
"placeholder-start": _vm.formItem.emptyMessageStart,
|
|
274527
|
+
"placeholder-end": _vm.formItem.emptyMessageEnd,
|
|
274528
|
+
"required": _vm.formItem.isRequired === 1,
|
|
274529
|
+
"format": _vm.formItem.textFormatter
|
|
274530
|
+
}
|
|
274531
|
+
}) : _vm.formItem.elementCanEdit === 0 && _vm.formItem.elementType !== 'html' && !_vm.formItem.disabled && _vm.formItem.propName !== 'resRoles' ? _c('div', {
|
|
274492
274532
|
class: _vm.formItem.className
|
|
274493
274533
|
}, [_vm.formItem.textFormatter == 'password' ? _c('span', [_vm._v("******")]) : _vm.formItem.value != null ? _c('span', {
|
|
274494
274534
|
directives: [{
|
|
@@ -274512,20 +274552,6 @@ var FormItemvue_type_template_id_26aedf1c_scoped_true_render = function render()
|
|
|
274512
274552
|
domProps: {
|
|
274513
274553
|
"innerHTML": _vm._s(_vm.formItem.htmlContent)
|
|
274514
274554
|
}
|
|
274515
|
-
}) : _vm.formItem.elementType === 'datetimeRange' ? _c('datetime-range', {
|
|
274516
|
-
attrs: {
|
|
274517
|
-
"vo": _vm.vo,
|
|
274518
|
-
"type": _vm.formItem.pickerType,
|
|
274519
|
-
"v-model-start": _vm.formItem.vModelStart,
|
|
274520
|
-
"v-model-end": _vm.formItem.vModelEnd,
|
|
274521
|
-
"can-edit": _vm.canEdit,
|
|
274522
|
-
"default-time-start": _vm.formItem.defaultTimeStart,
|
|
274523
|
-
"default-time-end": _vm.formItem.defaultTimeEnd,
|
|
274524
|
-
"placeholder-start": _vm.formItem.emptyMessageStart,
|
|
274525
|
-
"placeholder-end": _vm.formItem.emptyMessageEnd,
|
|
274526
|
-
"required": _vm.formItem.isRequired === 1,
|
|
274527
|
-
"format": _vm.formItem.textFormatter
|
|
274528
|
-
}
|
|
274529
274555
|
}) : _c('validation-provider', {
|
|
274530
274556
|
class: (_vm.formItem.value == null || _vm.formItem.value == '') && _vm.formItem.isRequired ? ' form_item_required' : '',
|
|
274531
274557
|
attrs: {
|
|
@@ -275007,7 +275033,7 @@ var FormItemvue_type_template_id_26aedf1c_scoped_true_render = function render()
|
|
|
275007
275033
|
}], null, false, 2420013376)
|
|
275008
275034
|
})], 1) : _vm._e();
|
|
275009
275035
|
};
|
|
275010
|
-
var
|
|
275036
|
+
var FormItemvue_type_template_id_4ca23f1c_scoped_true_staticRenderFns = [];
|
|
275011
275037
|
|
|
275012
275038
|
;// CONCATENATED MODULE: ./src/global/filters/index.js
|
|
275013
275039
|
|
|
@@ -276406,13 +276432,13 @@ var FormItemvue_type_script_lang_js_moment = __webpack_require__(95093);
|
|
|
276406
276432
|
});
|
|
276407
276433
|
;// CONCATENATED MODULE: ./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=script&lang=js
|
|
276408
276434
|
/* harmony default export */ var src_FormItemvue_type_script_lang_js = (FormItemvue_type_script_lang_js);
|
|
276409
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=0&id=
|
|
276410
|
-
var
|
|
276411
|
-
;// CONCATENATED MODULE: ./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=0&id=
|
|
276435
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=0&id=4ca23f1c&prod&lang=scss
|
|
276436
|
+
var FormItemvue_type_style_index_0_id_4ca23f1c_prod_lang_scss = __webpack_require__(10526);
|
|
276437
|
+
;// CONCATENATED MODULE: ./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=0&id=4ca23f1c&prod&lang=scss
|
|
276412
276438
|
|
|
276413
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=1&id=
|
|
276414
|
-
var
|
|
276415
|
-
;// CONCATENATED MODULE: ./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=1&id=
|
|
276439
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=1&id=4ca23f1c&prod&lang=scss&scoped=true
|
|
276440
|
+
var FormItemvue_type_style_index_1_id_4ca23f1c_prod_lang_scss_scoped_true = __webpack_require__(65094);
|
|
276441
|
+
;// CONCATENATED MODULE: ./packages/ecwapp/Basicform/src/FormItem.vue?vue&type=style&index=1&id=4ca23f1c&prod&lang=scss&scoped=true
|
|
276416
276442
|
|
|
276417
276443
|
;// CONCATENATED MODULE: ./packages/ecwapp/Basicform/src/FormItem.vue
|
|
276418
276444
|
|
|
@@ -276426,11 +276452,11 @@ var FormItemvue_type_style_index_1_id_26aedf1c_prod_lang_scss_scoped_true = __we
|
|
|
276426
276452
|
|
|
276427
276453
|
var FormItem_component = (0,componentNormalizer/* default */.A)(
|
|
276428
276454
|
src_FormItemvue_type_script_lang_js,
|
|
276429
|
-
|
|
276430
|
-
|
|
276455
|
+
FormItemvue_type_template_id_4ca23f1c_scoped_true_render,
|
|
276456
|
+
FormItemvue_type_template_id_4ca23f1c_scoped_true_staticRenderFns,
|
|
276431
276457
|
false,
|
|
276432
276458
|
null,
|
|
276433
|
-
"
|
|
276459
|
+
"4ca23f1c",
|
|
276434
276460
|
null
|
|
276435
276461
|
|
|
276436
276462
|
)
|
|
@@ -276648,8 +276674,8 @@ FormItem.install = function (Vue) {
|
|
|
276648
276674
|
var Basicform = Basicform_src;
|
|
276649
276675
|
var Basicform_DynamicForm = DynamicForm;
|
|
276650
276676
|
var Basicform_FormItem = FormItem;
|
|
276651
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DataTable/src/index.vue?vue&type=template&id=
|
|
276652
|
-
var
|
|
276677
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DataTable/src/index.vue?vue&type=template&id=89fdb540&scoped=true
|
|
276678
|
+
var srcvue_type_template_id_89fdb540_scoped_true_render = function render() {
|
|
276653
276679
|
var _vm = this,
|
|
276654
276680
|
_c = _vm._self._c;
|
|
276655
276681
|
return _c('div', {
|
|
@@ -276976,7 +277002,7 @@ var srcvue_type_template_id_43bd1516_scoped_true_render = function render() {
|
|
|
276976
277002
|
}
|
|
276977
277003
|
})], 1) : _vm._e(), _vm.showResPermission ? _c('ResPermission') : _vm._e(), _vm._t("default"), _c('DoingDialog')], 2);
|
|
276978
277004
|
};
|
|
276979
|
-
var
|
|
277005
|
+
var srcvue_type_template_id_89fdb540_scoped_true_staticRenderFns = [];
|
|
276980
277006
|
|
|
276981
277007
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DataTable/src/TableColumn.vue?vue&type=template&id=05b11df8&scoped=true
|
|
276982
277008
|
var TableColumnvue_type_template_id_05b11df8_scoped_true_render = function render() {
|
|
@@ -279544,13 +279570,13 @@ var PAGE_INFO = {
|
|
|
279544
279570
|
};
|
|
279545
279571
|
}());
|
|
279546
279572
|
},
|
|
279547
|
-
/**
|
|
279548
|
-
* 计算新的宽度
|
|
279549
|
-
*
|
|
279550
|
-
* @param originalWidth 原始宽度,单位为像素
|
|
279551
|
-
* @param type 返回值类型
|
|
279552
|
-
* @param uiFontSize UI 字体大小,用于判断是否调整宽度
|
|
279553
|
-
* @returns 返回计算后的新宽度,以字符串形式返回,包含单位'px'
|
|
279573
|
+
/**
|
|
279574
|
+
* 计算新的宽度
|
|
279575
|
+
*
|
|
279576
|
+
* @param originalWidth 原始宽度,单位为像素
|
|
279577
|
+
* @param type 返回值类型
|
|
279578
|
+
* @param uiFontSize UI 字体大小,用于判断是否调整宽度
|
|
279579
|
+
* @returns 返回计算后的新宽度,以字符串形式返回,包含单位'px'
|
|
279554
279580
|
*/
|
|
279555
279581
|
calculateNewWidth: function calculateNewWidth(originalWidth, uiFontSize, type) {
|
|
279556
279582
|
var newWidth = parseInt(originalWidth);
|
|
@@ -280507,8 +280533,8 @@ var PAGE_INFO = {
|
|
|
280507
280533
|
_this.$bus.emit('openResPermissionForm', ids, visitType, resEntityName, permissionCode, orgCode, sysCode);
|
|
280508
280534
|
});
|
|
280509
280535
|
},
|
|
280510
|
-
/**
|
|
280511
|
-
* 批量导出数据项SQL脚本文件
|
|
280536
|
+
/**
|
|
280537
|
+
* 批量导出数据项SQL脚本文件
|
|
280512
280538
|
*/
|
|
280513
280539
|
exportData: function exportData(tbName) {
|
|
280514
280540
|
var _this17 = this;
|
|
@@ -280573,8 +280599,8 @@ var PAGE_INFO = {
|
|
|
280573
280599
|
}
|
|
280574
280600
|
}, null, null, this.$tx('ecwapp.DataTable.targetDatabaseType', '请选择目标数据库类型:'));
|
|
280575
280601
|
},
|
|
280576
|
-
/**
|
|
280577
|
-
* 批量导出流程表单EXCEL文件
|
|
280602
|
+
/**
|
|
280603
|
+
* 批量导出流程表单EXCEL文件
|
|
280578
280604
|
*/
|
|
280579
280605
|
exportWform: function exportWform(filename, exportAll) {
|
|
280580
280606
|
var _this18 = this;
|
|
@@ -280708,6 +280734,12 @@ var PAGE_INFO = {
|
|
|
280708
280734
|
},
|
|
280709
280735
|
batchSaveAllFiles: function batchSaveAllFiles(tozip) {
|
|
280710
280736
|
var _this19 = this;
|
|
280737
|
+
if (!this.pageInfo.list || this.pageInfo.list.length === 0) {
|
|
280738
|
+
this.$alert(this.$tx('ecwapp.DataTable.noDownloadFiles', '没有可下载的文件'), this.$tx('common.operationTip', '操作提示'), {
|
|
280739
|
+
type: 'info'
|
|
280740
|
+
});
|
|
280741
|
+
return;
|
|
280742
|
+
}
|
|
280711
280743
|
this.$bus.emit('showDoingDialog', null, false);
|
|
280712
280744
|
var orderBy = this.pageInfo.orderBy || this.moduleInfo.listDefaultOrderBy;
|
|
280713
280745
|
this.setPageInfo(this.searchMap, this.searchAndOr, null, orderBy);
|
|
@@ -280722,7 +280754,7 @@ var PAGE_INFO = {
|
|
|
280722
280754
|
if (param.urlsearch) {
|
|
280723
280755
|
param.urlsearch += ';id in ' + ids.join(',');
|
|
280724
280756
|
} else {
|
|
280725
|
-
param.urlsearch
|
|
280757
|
+
param.urlsearch = 'id in ' + ids.join(',');
|
|
280726
280758
|
}
|
|
280727
280759
|
} else {
|
|
280728
280760
|
// 下载全部,服务端默认不打包zip
|
|
@@ -280741,7 +280773,39 @@ var PAGE_INFO = {
|
|
|
280741
280773
|
var i = 0;
|
|
280742
280774
|
var downloading = false;
|
|
280743
280775
|
var total = res.body.ids.length;
|
|
280744
|
-
var eventid =
|
|
280776
|
+
var eventid = null;
|
|
280777
|
+
var finishBatchDownload = function finishBatchDownload(res2) {
|
|
280778
|
+
if (eventid !== null) {
|
|
280779
|
+
clearInterval(eventid);
|
|
280780
|
+
eventid = null;
|
|
280781
|
+
}
|
|
280782
|
+
_this19.$bus.emit('closeDoingDialog');
|
|
280783
|
+
// 仅看最后一次:成功则提示下载成功,失败则提示失败
|
|
280784
|
+
if (!res2 || res2.code !== 'success') {
|
|
280785
|
+
_this19.$alert(_this19.$tx('ecwapp.DataTable.downloadAllFailed', '文件下载失败'), _this19.$tx('common.operationTip', '操作提示'), {
|
|
280786
|
+
type: 'error'
|
|
280787
|
+
});
|
|
280788
|
+
return;
|
|
280789
|
+
}
|
|
280790
|
+
var resultBody = res2.body || {};
|
|
280791
|
+
_this19.loadListdata();
|
|
280792
|
+
var downloadUrl = '';
|
|
280793
|
+
if (resultBody.zipurl) {
|
|
280794
|
+
downloadUrl = '<br/>下载文件:<a href="' + "/apigw" + '/' + encodeURI(resultBody.zipurl) + '" target="_blank">' + (resultBody.zipname || resultBody.zipurl) + '</a>';
|
|
280795
|
+
} else if (resultBody.filepath) {
|
|
280796
|
+
downloadUrl = '<br/>服务端文件路径:' + resultBody.filepath;
|
|
280797
|
+
}
|
|
280798
|
+
_this19.$alert((res.message || '') + downloadUrl, _this19.$tx('common.operationTip', '操作提示'), {
|
|
280799
|
+
type: 'success',
|
|
280800
|
+
dangerouslyUseHTMLString: true,
|
|
280801
|
+
callback: function callback(action) {
|
|
280802
|
+
if (action === 'confirm' && resultBody.zipurl) {
|
|
280803
|
+
window.open("/apigw" + '/' + resultBody.zipurl, '_blank');
|
|
280804
|
+
}
|
|
280805
|
+
}
|
|
280806
|
+
});
|
|
280807
|
+
};
|
|
280808
|
+
eventid = setInterval(function () {
|
|
280745
280809
|
if (!downloading) {
|
|
280746
280810
|
downloading = true;
|
|
280747
280811
|
var busiDataId = res.body.ids[i++];
|
|
@@ -280759,36 +280823,32 @@ var PAGE_INFO = {
|
|
|
280759
280823
|
url: _this19.moduleInfo.listDataUrl.split('/')[0] + '/webForm/downloadFileToLocal'
|
|
280760
280824
|
}).then(function (res2) {
|
|
280761
280825
|
downloading = false;
|
|
280762
|
-
if (
|
|
280763
|
-
|
|
280764
|
-
|
|
280765
|
-
|
|
280766
|
-
|
|
280767
|
-
|
|
280768
|
-
|
|
280769
|
-
|
|
280770
|
-
|
|
280771
|
-
|
|
280772
|
-
|
|
280773
|
-
dangerouslyUseHTMLString: true,
|
|
280774
|
-
callback: function callback(action) {
|
|
280775
|
-
if (action === 'confirm' && res2.body.zipurl) {
|
|
280776
|
-
window.open("/apigw" + '/' + res2.body.zipurl, '_black');
|
|
280777
|
-
}
|
|
280778
|
-
}
|
|
280779
|
-
});
|
|
280780
|
-
} else {
|
|
280781
|
-
_this19.$bus.emit('showDoingDialog', '正在打包待下载文件,共' + res.body.count + '份,当前第' + i + '份', false);
|
|
280782
|
-
}
|
|
280826
|
+
if (isLast) {
|
|
280827
|
+
finishBatchDownload(res2);
|
|
280828
|
+
} else {
|
|
280829
|
+
_this19.$bus.emit('showDoingDialog', '正在打包待下载文件,共' + total + '份,当前第' + i + '份', false);
|
|
280830
|
+
}
|
|
280831
|
+
}).catch(function () {
|
|
280832
|
+
downloading = false;
|
|
280833
|
+
if (isLast) {
|
|
280834
|
+
finishBatchDownload(null);
|
|
280835
|
+
} else {
|
|
280836
|
+
_this19.$bus.emit('showDoingDialog', '正在打包待下载文件,共' + total + '份,当前第' + i + '份', false);
|
|
280783
280837
|
}
|
|
280784
280838
|
});
|
|
280785
280839
|
}
|
|
280786
280840
|
}, 500);
|
|
280787
280841
|
} else {
|
|
280842
|
+
_this19.$bus.emit('closeDoingDialog');
|
|
280788
280843
|
_this19.$alert(res.message, _this19.$tx('common.operationTip', '操作提示'), {
|
|
280789
280844
|
type: 'error'
|
|
280790
280845
|
});
|
|
280791
280846
|
}
|
|
280847
|
+
}).catch(function () {
|
|
280848
|
+
_this19.$bus.emit('closeDoingDialog');
|
|
280849
|
+
_this19.$alert(_this19.$tx('ecwapp.DataTable.downloadAllFailed', '文件下载失败'), _this19.$tx('common.operationTip', '操作提示'), {
|
|
280850
|
+
type: 'error'
|
|
280851
|
+
});
|
|
280792
280852
|
});
|
|
280793
280853
|
},
|
|
280794
280854
|
batchSaveFiles: function batchSaveFiles() {
|
|
@@ -280846,9 +280906,9 @@ var PAGE_INFO = {
|
|
|
280846
280906
|
});
|
|
280847
280907
|
;// CONCATENATED MODULE: ./packages/ecwapp/DataTable/src/index.vue?vue&type=script&lang=js
|
|
280848
280908
|
/* harmony default export */ var ecwapp_DataTable_srcvue_type_script_lang_js = (DataTable_srcvue_type_script_lang_js);
|
|
280849
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DataTable/src/index.vue?vue&type=style&index=0&id=
|
|
280850
|
-
var
|
|
280851
|
-
;// CONCATENATED MODULE: ./packages/ecwapp/DataTable/src/index.vue?vue&type=style&index=0&id=
|
|
280909
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DataTable/src/index.vue?vue&type=style&index=0&id=89fdb540&prod&lang=scss&scoped=true
|
|
280910
|
+
var srcvue_type_style_index_0_id_89fdb540_prod_lang_scss_scoped_true = __webpack_require__(20789);
|
|
280911
|
+
;// CONCATENATED MODULE: ./packages/ecwapp/DataTable/src/index.vue?vue&type=style&index=0&id=89fdb540&prod&lang=scss&scoped=true
|
|
280852
280912
|
|
|
280853
280913
|
;// CONCATENATED MODULE: ./packages/ecwapp/DataTable/src/index.vue
|
|
280854
280914
|
|
|
@@ -280861,11 +280921,11 @@ var srcvue_type_style_index_0_id_43bd1516_prod_lang_scss_scoped_true = __webpack
|
|
|
280861
280921
|
|
|
280862
280922
|
var src_component = (0,componentNormalizer/* default */.A)(
|
|
280863
280923
|
ecwapp_DataTable_srcvue_type_script_lang_js,
|
|
280864
|
-
|
|
280865
|
-
|
|
280924
|
+
srcvue_type_template_id_89fdb540_scoped_true_render,
|
|
280925
|
+
srcvue_type_template_id_89fdb540_scoped_true_staticRenderFns,
|
|
280866
280926
|
false,
|
|
280867
280927
|
null,
|
|
280868
|
-
"
|
|
280928
|
+
"89fdb540",
|
|
280869
280929
|
null
|
|
280870
280930
|
|
|
280871
280931
|
)
|
|
@@ -280982,22 +281042,22 @@ RenderAttachColumn.install = function (Vue) {
|
|
|
280982
281042
|
var DataTable = DataTable_src;
|
|
280983
281043
|
var DataTable_Toolbar = Toolbar;
|
|
280984
281044
|
var DataTable_RenderAttachColumn = RenderAttachColumn;
|
|
280985
|
-
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DatetimeRange/src/index.vue?vue&type=template&id=
|
|
280986
|
-
var
|
|
281045
|
+
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DatetimeRange/src/index.vue?vue&type=template&id=156ddf3c&scoped=true
|
|
281046
|
+
var srcvue_type_template_id_156ddf3c_scoped_true_render = function render() {
|
|
280987
281047
|
var _vm = this,
|
|
280988
281048
|
_c = _vm._self._c;
|
|
280989
|
-
return _c('el-row', [_vm.canEdit
|
|
281049
|
+
return _c('el-row', [_vm.canEdit !== 1 && _vm.vo ? _c('el-col', {
|
|
280990
281050
|
attrs: {
|
|
280991
281051
|
"span": 24
|
|
280992
281052
|
}
|
|
280993
|
-
}, [_vm._v(" " + _vm._s(_vm._f("formatTime")(_vm.
|
|
281053
|
+
}, [_vm._v(" " + _vm._s(_vm._f("formatTime")(_vm.rangeStartTime, _vm.format)) + " "), _c('span', {
|
|
280994
281054
|
directives: [{
|
|
280995
281055
|
name: "text-lbl",
|
|
280996
281056
|
rawName: "v-text-lbl",
|
|
280997
281057
|
value: 'common.to',
|
|
280998
281058
|
expression: "'common.to'"
|
|
280999
281059
|
}]
|
|
281000
|
-
}, [_vm._v("至")]), _vm._v(" " + _vm._s(_vm._f("formatTime")(_vm.
|
|
281060
|
+
}, [_vm._v("至")]), _vm._v(" " + _vm._s(_vm._f("formatTime")(_vm.rangeEndTime, _vm.format)) + " ")]) : _vm._e(), _vm.canEdit === 1 ? _c('el-col', {
|
|
281001
281061
|
staticStyle: {
|
|
281002
281062
|
"position": "absolute",
|
|
281003
281063
|
"left": "0px",
|
|
@@ -281024,7 +281084,7 @@ var srcvue_type_template_id_3607ce9c_scoped_true_render = function render() {
|
|
|
281024
281084
|
"name": _vm.$tx('fields.startTime', '开始时间'),
|
|
281025
281085
|
"rules": {
|
|
281026
281086
|
required: _vm.required,
|
|
281027
|
-
before: _vm
|
|
281087
|
+
before: _vm.rangeEndTime
|
|
281028
281088
|
}
|
|
281029
281089
|
},
|
|
281030
281090
|
scopedSlots: _vm._u([{
|
|
@@ -281081,7 +281141,7 @@ var srcvue_type_template_id_3607ce9c_scoped_true_render = function render() {
|
|
|
281081
281141
|
"name": _vm.$tx('fields.endTime', '结束时间'),
|
|
281082
281142
|
"rules": {
|
|
281083
281143
|
required: _vm.required,
|
|
281084
|
-
after: _vm
|
|
281144
|
+
after: _vm.rangeStartTime
|
|
281085
281145
|
}
|
|
281086
281146
|
},
|
|
281087
281147
|
scopedSlots: _vm._u([{
|
|
@@ -281128,9 +281188,2051 @@ var srcvue_type_template_id_3607ce9c_scoped_true_render = function render() {
|
|
|
281128
281188
|
}], null, false, 2421030280)
|
|
281129
281189
|
})], 1) : _vm._e()], 1);
|
|
281130
281190
|
};
|
|
281131
|
-
var
|
|
281191
|
+
var srcvue_type_template_id_156ddf3c_scoped_true_staticRenderFns = [];
|
|
281192
|
+
|
|
281193
|
+
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
281194
|
+
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(74100);
|
|
281195
|
+
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
281196
|
+
;// CONCATENATED MODULE: ./node_modules/vee-validate/dist/vee-validate.esm.js
|
|
281197
|
+
/**
|
|
281198
|
+
* vee-validate v3.4.15
|
|
281199
|
+
* (c) 2023 Abdelrahman Awad
|
|
281200
|
+
* @license MIT
|
|
281201
|
+
*/
|
|
281202
|
+
|
|
281203
|
+
|
|
281204
|
+
/*! *****************************************************************************
|
|
281205
|
+
Copyright (c) Microsoft Corporation.
|
|
281206
|
+
|
|
281207
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
281208
|
+
purpose with or without fee is hereby granted.
|
|
281209
|
+
|
|
281210
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
281211
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
281212
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
281213
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
281214
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
281215
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
281216
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
281217
|
+
***************************************************************************** */
|
|
281218
|
+
|
|
281219
|
+
var __assign = function() {
|
|
281220
|
+
__assign = Object.assign || function __assign(t) {
|
|
281221
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
281222
|
+
s = arguments[i];
|
|
281223
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
281224
|
+
}
|
|
281225
|
+
return t;
|
|
281226
|
+
};
|
|
281227
|
+
return __assign.apply(this, arguments);
|
|
281228
|
+
};
|
|
281229
|
+
|
|
281230
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
281231
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
281232
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
281233
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
281234
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
281235
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
281236
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
281237
|
+
});
|
|
281238
|
+
}
|
|
281239
|
+
|
|
281240
|
+
function __generator(thisArg, body) {
|
|
281241
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
281242
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
281243
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
281244
|
+
function step(op) {
|
|
281245
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
281246
|
+
while (_) try {
|
|
281247
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
281248
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
281249
|
+
switch (op[0]) {
|
|
281250
|
+
case 0: case 1: t = op; break;
|
|
281251
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
281252
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
281253
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
281254
|
+
default:
|
|
281255
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
281256
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
281257
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
281258
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
281259
|
+
if (t[2]) _.ops.pop();
|
|
281260
|
+
_.trys.pop(); continue;
|
|
281261
|
+
}
|
|
281262
|
+
op = body.call(thisArg, _);
|
|
281263
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
281264
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
281265
|
+
}
|
|
281266
|
+
}
|
|
281267
|
+
|
|
281268
|
+
function __spreadArrays() {
|
|
281269
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
281270
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
281271
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
281272
|
+
r[k] = a[j];
|
|
281273
|
+
return r;
|
|
281274
|
+
}
|
|
281275
|
+
|
|
281276
|
+
function vee_validate_esm_isNaN(value) {
|
|
281277
|
+
// NaN is the one value that does not equal itself.
|
|
281278
|
+
// eslint-disable-next-line
|
|
281279
|
+
return value !== value;
|
|
281280
|
+
}
|
|
281281
|
+
function isNullOrUndefined(value) {
|
|
281282
|
+
return value === null || value === undefined;
|
|
281283
|
+
}
|
|
281284
|
+
function isEmptyArray(arr) {
|
|
281285
|
+
return Array.isArray(arr) && arr.length === 0;
|
|
281286
|
+
}
|
|
281287
|
+
var vee_validate_esm_isObject = function (obj) {
|
|
281288
|
+
return obj !== null && obj && typeof obj === 'object' && !Array.isArray(obj);
|
|
281289
|
+
};
|
|
281290
|
+
/**
|
|
281291
|
+
* A reference comparison function with NaN support
|
|
281292
|
+
*/
|
|
281293
|
+
function isRefEqual(lhs, rhs) {
|
|
281294
|
+
if (vee_validate_esm_isNaN(lhs) && vee_validate_esm_isNaN(rhs)) {
|
|
281295
|
+
return true;
|
|
281296
|
+
}
|
|
281297
|
+
return lhs === rhs;
|
|
281298
|
+
}
|
|
281299
|
+
// Checks if a given value is not an empty string or null or undefined.
|
|
281300
|
+
function isSpecified(val) {
|
|
281301
|
+
if (val === '') {
|
|
281302
|
+
return false;
|
|
281303
|
+
}
|
|
281304
|
+
return !isNullOrUndefined(val);
|
|
281305
|
+
}
|
|
281306
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
281307
|
+
function isCallable(fn) {
|
|
281308
|
+
return typeof fn === 'function';
|
|
281309
|
+
}
|
|
281310
|
+
function isLocator(value) {
|
|
281311
|
+
return isCallable(value) && !!value.__locatorRef;
|
|
281312
|
+
}
|
|
281313
|
+
|
|
281314
|
+
function findIndex(arrayLike, predicate) {
|
|
281315
|
+
var array = Array.isArray(arrayLike) ? arrayLike : vee_validate_esm_toArray(arrayLike);
|
|
281316
|
+
if (isCallable(array.findIndex)) {
|
|
281317
|
+
return array.findIndex(predicate);
|
|
281318
|
+
}
|
|
281319
|
+
/* istanbul ignore next */
|
|
281320
|
+
for (var i = 0; i < array.length; i++) {
|
|
281321
|
+
if (predicate(array[i], i)) {
|
|
281322
|
+
return i;
|
|
281323
|
+
}
|
|
281324
|
+
}
|
|
281325
|
+
/* istanbul ignore next */
|
|
281326
|
+
return -1;
|
|
281327
|
+
}
|
|
281328
|
+
/**
|
|
281329
|
+
* finds the first element that satisfies the predicate callback, polyfills array.find
|
|
281330
|
+
*/
|
|
281331
|
+
function find(arrayLike, predicate) {
|
|
281332
|
+
var array = Array.isArray(arrayLike) ? arrayLike : vee_validate_esm_toArray(arrayLike);
|
|
281333
|
+
var idx = findIndex(array, predicate);
|
|
281334
|
+
return idx === -1 ? undefined : array[idx];
|
|
281335
|
+
}
|
|
281336
|
+
function includes(collection, item) {
|
|
281337
|
+
return collection.indexOf(item) !== -1;
|
|
281338
|
+
}
|
|
281339
|
+
/**
|
|
281340
|
+
* Converts an array-like object to array, provides a simple polyfill for Array.from
|
|
281341
|
+
*/
|
|
281342
|
+
function vee_validate_esm_toArray(arrayLike) {
|
|
281343
|
+
if (isCallable(Array.from)) {
|
|
281344
|
+
return Array.from(arrayLike);
|
|
281345
|
+
}
|
|
281346
|
+
/* istanbul ignore next */
|
|
281347
|
+
return _copyArray(arrayLike);
|
|
281348
|
+
}
|
|
281349
|
+
/* istanbul ignore next */
|
|
281350
|
+
function _copyArray(arrayLike) {
|
|
281351
|
+
var array = [];
|
|
281352
|
+
var length = arrayLike.length;
|
|
281353
|
+
for (var i = 0; i < length; i++) {
|
|
281354
|
+
array.push(arrayLike[i]);
|
|
281355
|
+
}
|
|
281356
|
+
return array;
|
|
281357
|
+
}
|
|
281358
|
+
function values(obj) {
|
|
281359
|
+
if (isCallable(Object.values)) {
|
|
281360
|
+
return Object.values(obj);
|
|
281361
|
+
}
|
|
281362
|
+
// fallback to keys()
|
|
281363
|
+
/* istanbul ignore next */
|
|
281364
|
+
return Object.keys(obj).map(function (k) { return obj[k]; });
|
|
281365
|
+
}
|
|
281366
|
+
function vee_validate_esm_merge(target, source) {
|
|
281367
|
+
Object.keys(source).forEach(function (key) {
|
|
281368
|
+
if (vee_validate_esm_isObject(source[key])) {
|
|
281369
|
+
if (!target[key]) {
|
|
281370
|
+
target[key] = {};
|
|
281371
|
+
}
|
|
281372
|
+
vee_validate_esm_merge(target[key], source[key]);
|
|
281373
|
+
return;
|
|
281374
|
+
}
|
|
281375
|
+
target[key] = source[key];
|
|
281376
|
+
});
|
|
281377
|
+
return target;
|
|
281378
|
+
}
|
|
281379
|
+
|
|
281380
|
+
function createFlags() {
|
|
281381
|
+
return {
|
|
281382
|
+
untouched: true,
|
|
281383
|
+
touched: false,
|
|
281384
|
+
dirty: false,
|
|
281385
|
+
pristine: true,
|
|
281386
|
+
valid: false,
|
|
281387
|
+
invalid: false,
|
|
281388
|
+
validated: false,
|
|
281389
|
+
pending: false,
|
|
281390
|
+
required: false,
|
|
281391
|
+
changed: false,
|
|
281392
|
+
passed: false,
|
|
281393
|
+
failed: false
|
|
281394
|
+
};
|
|
281395
|
+
}
|
|
281396
|
+
|
|
281397
|
+
function identity(x) {
|
|
281398
|
+
return x;
|
|
281399
|
+
}
|
|
281400
|
+
function debounce(fn, wait, token) {
|
|
281401
|
+
if (wait === void 0) { wait = 0; }
|
|
281402
|
+
if (token === void 0) { token = { cancelled: false }; }
|
|
281403
|
+
if (wait === 0) {
|
|
281404
|
+
return fn;
|
|
281405
|
+
}
|
|
281406
|
+
var timeout;
|
|
281407
|
+
return function () {
|
|
281408
|
+
var args = [];
|
|
281409
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
281410
|
+
args[_i] = arguments[_i];
|
|
281411
|
+
}
|
|
281412
|
+
var later = function () {
|
|
281413
|
+
timeout = undefined;
|
|
281414
|
+
// check if the fn call was cancelled.
|
|
281415
|
+
if (!token.cancelled)
|
|
281416
|
+
fn.apply(void 0, args);
|
|
281417
|
+
};
|
|
281418
|
+
// because we might want to use Node.js setTimout for SSR.
|
|
281419
|
+
clearTimeout(timeout);
|
|
281420
|
+
timeout = setTimeout(later, wait);
|
|
281421
|
+
};
|
|
281422
|
+
}
|
|
281423
|
+
|
|
281424
|
+
/**
|
|
281425
|
+
* Emits a warning to the console
|
|
281426
|
+
*/
|
|
281427
|
+
function warn(message) {
|
|
281428
|
+
console.warn("[vee-validate] " + message);
|
|
281429
|
+
}
|
|
281430
|
+
/**
|
|
281431
|
+
* Replaces placeholder values in a string with their actual values
|
|
281432
|
+
*/
|
|
281433
|
+
function interpolate(template, values) {
|
|
281434
|
+
return template.replace(/{([^}]+)}/g, function (_, p) {
|
|
281435
|
+
return p in values ? values[p] : "{" + p + "}";
|
|
281436
|
+
});
|
|
281437
|
+
}
|
|
281438
|
+
|
|
281439
|
+
var RULES = {};
|
|
281440
|
+
function normalizeSchema(schema) {
|
|
281441
|
+
var _a;
|
|
281442
|
+
if ((_a = schema.params) === null || _a === void 0 ? void 0 : _a.length) {
|
|
281443
|
+
schema.params = schema.params.map(function (param) {
|
|
281444
|
+
if (typeof param === 'string') {
|
|
281445
|
+
return { name: param };
|
|
281446
|
+
}
|
|
281447
|
+
return param;
|
|
281448
|
+
});
|
|
281449
|
+
}
|
|
281450
|
+
return schema;
|
|
281451
|
+
}
|
|
281452
|
+
var RuleContainer = /** @class */ (function () {
|
|
281453
|
+
function RuleContainer() {
|
|
281454
|
+
}
|
|
281455
|
+
RuleContainer.extend = function (name, schema) {
|
|
281456
|
+
// if rule already exists, overwrite it.
|
|
281457
|
+
var rule = normalizeSchema(schema);
|
|
281458
|
+
if (RULES[name]) {
|
|
281459
|
+
RULES[name] = vee_validate_esm_merge(RULES[name], schema);
|
|
281460
|
+
return;
|
|
281461
|
+
}
|
|
281462
|
+
RULES[name] = __assign({ lazy: false, computesRequired: false }, rule);
|
|
281463
|
+
};
|
|
281464
|
+
RuleContainer.isLazy = function (name) {
|
|
281465
|
+
var _a;
|
|
281466
|
+
return !!((_a = RULES[name]) === null || _a === void 0 ? void 0 : _a.lazy);
|
|
281467
|
+
};
|
|
281468
|
+
RuleContainer.isRequireRule = function (name) {
|
|
281469
|
+
var _a;
|
|
281470
|
+
return !!((_a = RULES[name]) === null || _a === void 0 ? void 0 : _a.computesRequired);
|
|
281471
|
+
};
|
|
281472
|
+
RuleContainer.getRuleDefinition = function (ruleName) {
|
|
281473
|
+
return RULES[ruleName];
|
|
281474
|
+
};
|
|
281475
|
+
return RuleContainer;
|
|
281476
|
+
}());
|
|
281477
|
+
/**
|
|
281478
|
+
* Adds a custom validator to the list of validation rules.
|
|
281479
|
+
*/
|
|
281480
|
+
function vee_validate_esm_extend(name, schema) {
|
|
281481
|
+
// makes sure new rules are properly formatted.
|
|
281482
|
+
guardExtend(name, schema);
|
|
281483
|
+
// Full schema object.
|
|
281484
|
+
if (typeof schema === 'object') {
|
|
281485
|
+
RuleContainer.extend(name, schema);
|
|
281486
|
+
return;
|
|
281487
|
+
}
|
|
281488
|
+
RuleContainer.extend(name, {
|
|
281489
|
+
validate: schema
|
|
281490
|
+
});
|
|
281491
|
+
}
|
|
281492
|
+
/**
|
|
281493
|
+
* Guards from extension violations.
|
|
281494
|
+
*/
|
|
281495
|
+
function guardExtend(name, validator) {
|
|
281496
|
+
if (isCallable(validator)) {
|
|
281497
|
+
return;
|
|
281498
|
+
}
|
|
281499
|
+
if (isCallable(validator.validate)) {
|
|
281500
|
+
return;
|
|
281501
|
+
}
|
|
281502
|
+
if (RuleContainer.getRuleDefinition(name)) {
|
|
281503
|
+
return;
|
|
281504
|
+
}
|
|
281505
|
+
throw new Error("Extension Error: The validator '" + name + "' must be a function or have a 'validate' method.");
|
|
281506
|
+
}
|
|
281507
|
+
|
|
281508
|
+
var DEFAULT_CONFIG = {
|
|
281509
|
+
defaultMessage: "{_field_} is not valid.",
|
|
281510
|
+
skipOptional: true,
|
|
281511
|
+
classes: {
|
|
281512
|
+
touched: 'touched',
|
|
281513
|
+
untouched: 'untouched',
|
|
281514
|
+
valid: 'valid',
|
|
281515
|
+
invalid: 'invalid',
|
|
281516
|
+
pristine: 'pristine',
|
|
281517
|
+
dirty: 'dirty' // control has been interacted with
|
|
281518
|
+
},
|
|
281519
|
+
bails: true,
|
|
281520
|
+
mode: 'aggressive',
|
|
281521
|
+
useConstraintAttrs: true
|
|
281522
|
+
};
|
|
281523
|
+
var currentConfig = __assign({}, DEFAULT_CONFIG);
|
|
281524
|
+
var getConfig = function () { return currentConfig; };
|
|
281525
|
+
var setConfig = function (newConf) {
|
|
281526
|
+
currentConfig = __assign(__assign({}, currentConfig), newConf);
|
|
281527
|
+
};
|
|
281528
|
+
var configure = function (cfg) {
|
|
281529
|
+
setConfig(cfg);
|
|
281530
|
+
};
|
|
281531
|
+
|
|
281532
|
+
/**
|
|
281533
|
+
* Normalizes the given rules expression.
|
|
281534
|
+
*/
|
|
281535
|
+
function normalizeRules(rules) {
|
|
281536
|
+
// if falsy value return an empty object.
|
|
281537
|
+
var acc = {};
|
|
281538
|
+
Object.defineProperty(acc, '_$$isNormalized', {
|
|
281539
|
+
value: true,
|
|
281540
|
+
writable: false,
|
|
281541
|
+
enumerable: false,
|
|
281542
|
+
configurable: false
|
|
281543
|
+
});
|
|
281544
|
+
if (!rules) {
|
|
281545
|
+
return acc;
|
|
281546
|
+
}
|
|
281547
|
+
// Object is already normalized, skip.
|
|
281548
|
+
if (vee_validate_esm_isObject(rules) && rules._$$isNormalized) {
|
|
281549
|
+
return rules;
|
|
281550
|
+
}
|
|
281551
|
+
if (vee_validate_esm_isObject(rules)) {
|
|
281552
|
+
return Object.keys(rules).reduce(function (prev, curr) {
|
|
281553
|
+
var params = [];
|
|
281554
|
+
if (rules[curr] === true) {
|
|
281555
|
+
params = [];
|
|
281556
|
+
}
|
|
281557
|
+
else if (Array.isArray(rules[curr])) {
|
|
281558
|
+
params = rules[curr];
|
|
281559
|
+
}
|
|
281560
|
+
else if (vee_validate_esm_isObject(rules[curr])) {
|
|
281561
|
+
params = rules[curr];
|
|
281562
|
+
}
|
|
281563
|
+
else {
|
|
281564
|
+
params = [rules[curr]];
|
|
281565
|
+
}
|
|
281566
|
+
if (rules[curr] !== false) {
|
|
281567
|
+
prev[curr] = buildParams(curr, params);
|
|
281568
|
+
}
|
|
281569
|
+
return prev;
|
|
281570
|
+
}, acc);
|
|
281571
|
+
}
|
|
281572
|
+
/* istanbul ignore if */
|
|
281573
|
+
if (typeof rules !== 'string') {
|
|
281574
|
+
warn('rules must be either a string or an object.');
|
|
281575
|
+
return acc;
|
|
281576
|
+
}
|
|
281577
|
+
return rules.split('|').reduce(function (prev, rule) {
|
|
281578
|
+
var parsedRule = parseRule(rule);
|
|
281579
|
+
if (!parsedRule.name) {
|
|
281580
|
+
return prev;
|
|
281581
|
+
}
|
|
281582
|
+
prev[parsedRule.name] = buildParams(parsedRule.name, parsedRule.params);
|
|
281583
|
+
return prev;
|
|
281584
|
+
}, acc);
|
|
281585
|
+
}
|
|
281586
|
+
function buildParams(ruleName, provided) {
|
|
281587
|
+
var ruleSchema = RuleContainer.getRuleDefinition(ruleName);
|
|
281588
|
+
if (!ruleSchema) {
|
|
281589
|
+
return provided;
|
|
281590
|
+
}
|
|
281591
|
+
var params = {};
|
|
281592
|
+
if (!ruleSchema.params && !Array.isArray(provided)) {
|
|
281593
|
+
throw new Error('You provided an object params to a rule that has no defined schema.');
|
|
281594
|
+
}
|
|
281595
|
+
// Rule probably uses an array for their args, keep it as is.
|
|
281596
|
+
if (Array.isArray(provided) && !ruleSchema.params) {
|
|
281597
|
+
return provided;
|
|
281598
|
+
}
|
|
281599
|
+
var definedParams;
|
|
281600
|
+
// collect the params schema.
|
|
281601
|
+
if (!ruleSchema.params || (ruleSchema.params.length < provided.length && Array.isArray(provided))) {
|
|
281602
|
+
var lastDefinedParam_1;
|
|
281603
|
+
// collect any additional parameters in the last item.
|
|
281604
|
+
definedParams = provided.map(function (_, idx) {
|
|
281605
|
+
var _a;
|
|
281606
|
+
var param = (_a = ruleSchema.params) === null || _a === void 0 ? void 0 : _a[idx];
|
|
281607
|
+
lastDefinedParam_1 = param || lastDefinedParam_1;
|
|
281608
|
+
if (!param) {
|
|
281609
|
+
param = lastDefinedParam_1;
|
|
281610
|
+
}
|
|
281611
|
+
return param;
|
|
281612
|
+
});
|
|
281613
|
+
}
|
|
281614
|
+
else {
|
|
281615
|
+
definedParams = ruleSchema.params;
|
|
281616
|
+
}
|
|
281617
|
+
// Match the provided array length with a temporary schema.
|
|
281618
|
+
for (var i = 0; i < definedParams.length; i++) {
|
|
281619
|
+
var options = definedParams[i];
|
|
281620
|
+
var value = options.default;
|
|
281621
|
+
// if the provided is an array, map element value.
|
|
281622
|
+
if (Array.isArray(provided)) {
|
|
281623
|
+
if (i in provided) {
|
|
281624
|
+
value = provided[i];
|
|
281625
|
+
}
|
|
281626
|
+
}
|
|
281627
|
+
else {
|
|
281628
|
+
// If the param exists in the provided object.
|
|
281629
|
+
if (options.name in provided) {
|
|
281630
|
+
value = provided[options.name];
|
|
281631
|
+
// if the provided is the first param value.
|
|
281632
|
+
}
|
|
281633
|
+
else if (definedParams.length === 1) {
|
|
281634
|
+
value = provided;
|
|
281635
|
+
}
|
|
281636
|
+
}
|
|
281637
|
+
// if the param is a target, resolve the target value.
|
|
281638
|
+
if (options.isTarget) {
|
|
281639
|
+
value = createLocator(value, options.cast);
|
|
281640
|
+
}
|
|
281641
|
+
// A target param using interpolation
|
|
281642
|
+
if (typeof value === 'string' && value[0] === '@') {
|
|
281643
|
+
value = createLocator(value.slice(1), options.cast);
|
|
281644
|
+
}
|
|
281645
|
+
// If there is a transformer defined.
|
|
281646
|
+
if (!isLocator(value) && options.cast) {
|
|
281647
|
+
value = options.cast(value);
|
|
281648
|
+
}
|
|
281649
|
+
// already been set, probably multiple values.
|
|
281650
|
+
if (params[options.name]) {
|
|
281651
|
+
params[options.name] = Array.isArray(params[options.name]) ? params[options.name] : [params[options.name]];
|
|
281652
|
+
params[options.name].push(value);
|
|
281653
|
+
}
|
|
281654
|
+
else {
|
|
281655
|
+
// set the value.
|
|
281656
|
+
params[options.name] = value;
|
|
281657
|
+
}
|
|
281658
|
+
}
|
|
281659
|
+
return params;
|
|
281660
|
+
}
|
|
281661
|
+
/**
|
|
281662
|
+
* Parses a rule string expression.
|
|
281663
|
+
*/
|
|
281664
|
+
var parseRule = function (rule) {
|
|
281665
|
+
var params = [];
|
|
281666
|
+
var name = rule.split(':')[0];
|
|
281667
|
+
if (includes(rule, ':')) {
|
|
281668
|
+
params = rule
|
|
281669
|
+
.split(':')
|
|
281670
|
+
.slice(1)
|
|
281671
|
+
.join(':')
|
|
281672
|
+
.split(',');
|
|
281673
|
+
}
|
|
281674
|
+
return { name: name, params: params };
|
|
281675
|
+
};
|
|
281676
|
+
function createLocator(value, castFn) {
|
|
281677
|
+
var locator = function (crossTable) {
|
|
281678
|
+
var val = crossTable[value];
|
|
281679
|
+
return castFn ? castFn(val) : val;
|
|
281680
|
+
};
|
|
281681
|
+
locator.__locatorRef = value;
|
|
281682
|
+
return locator;
|
|
281683
|
+
}
|
|
281684
|
+
function extractLocators(params) {
|
|
281685
|
+
if (Array.isArray(params)) {
|
|
281686
|
+
return params.filter(function (param) {
|
|
281687
|
+
return isLocator(param) || (typeof param === 'string' && param[0] === '@');
|
|
281688
|
+
});
|
|
281689
|
+
}
|
|
281690
|
+
return Object.keys(params)
|
|
281691
|
+
.filter(function (key) { return isLocator(params[key]); })
|
|
281692
|
+
.map(function (key) { return params[key]; });
|
|
281693
|
+
}
|
|
281694
|
+
|
|
281695
|
+
/**
|
|
281696
|
+
* Validates a value against the rules.
|
|
281697
|
+
*/
|
|
281698
|
+
function validate(value, rules, options) {
|
|
281699
|
+
if (options === void 0) { options = {}; }
|
|
281700
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281701
|
+
var shouldBail, skipIfEmpty, field, result, errors, failedRules, regenerateMap;
|
|
281702
|
+
return __generator(this, function (_a) {
|
|
281703
|
+
switch (_a.label) {
|
|
281704
|
+
case 0:
|
|
281705
|
+
shouldBail = options === null || options === void 0 ? void 0 : options.bails;
|
|
281706
|
+
skipIfEmpty = options === null || options === void 0 ? void 0 : options.skipIfEmpty;
|
|
281707
|
+
field = {
|
|
281708
|
+
name: (options === null || options === void 0 ? void 0 : options.name) || '{field}',
|
|
281709
|
+
rules: normalizeRules(rules),
|
|
281710
|
+
bails: shouldBail !== null && shouldBail !== void 0 ? shouldBail : true,
|
|
281711
|
+
skipIfEmpty: skipIfEmpty !== null && skipIfEmpty !== void 0 ? skipIfEmpty : true,
|
|
281712
|
+
forceRequired: false,
|
|
281713
|
+
crossTable: (options === null || options === void 0 ? void 0 : options.values) || {},
|
|
281714
|
+
names: (options === null || options === void 0 ? void 0 : options.names) || {},
|
|
281715
|
+
customMessages: (options === null || options === void 0 ? void 0 : options.customMessages) || {}
|
|
281716
|
+
};
|
|
281717
|
+
return [4 /*yield*/, _validate(field, value, options)];
|
|
281718
|
+
case 1:
|
|
281719
|
+
result = _a.sent();
|
|
281720
|
+
errors = [];
|
|
281721
|
+
failedRules = {};
|
|
281722
|
+
regenerateMap = {};
|
|
281723
|
+
result.errors.forEach(function (e) {
|
|
281724
|
+
var msg = e.msg();
|
|
281725
|
+
errors.push(msg);
|
|
281726
|
+
failedRules[e.rule] = msg;
|
|
281727
|
+
regenerateMap[e.rule] = e.msg;
|
|
281728
|
+
});
|
|
281729
|
+
return [2 /*return*/, {
|
|
281730
|
+
valid: result.valid,
|
|
281731
|
+
required: result.required,
|
|
281732
|
+
errors: errors,
|
|
281733
|
+
failedRules: failedRules,
|
|
281734
|
+
regenerateMap: regenerateMap
|
|
281735
|
+
}];
|
|
281736
|
+
}
|
|
281737
|
+
});
|
|
281738
|
+
});
|
|
281739
|
+
}
|
|
281740
|
+
/**
|
|
281741
|
+
* Starts the validation process.
|
|
281742
|
+
*/
|
|
281743
|
+
function _validate(field, value, _a) {
|
|
281744
|
+
var _b = (_a === void 0 ? {} : _a).isInitial, isInitial = _b === void 0 ? false : _b;
|
|
281745
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281746
|
+
var _c, shouldSkip, required, errors, rules, length, i, rule, result;
|
|
281747
|
+
return __generator(this, function (_d) {
|
|
281748
|
+
switch (_d.label) {
|
|
281749
|
+
case 0: return [4 /*yield*/, _shouldSkip(field, value)];
|
|
281750
|
+
case 1:
|
|
281751
|
+
_c = _d.sent(), shouldSkip = _c.shouldSkip, required = _c.required, errors = _c.errors;
|
|
281752
|
+
if (shouldSkip) {
|
|
281753
|
+
return [2 /*return*/, {
|
|
281754
|
+
valid: !errors.length,
|
|
281755
|
+
required: required,
|
|
281756
|
+
errors: errors
|
|
281757
|
+
}];
|
|
281758
|
+
}
|
|
281759
|
+
rules = Object.keys(field.rules).filter(function (rule) { return !RuleContainer.isRequireRule(rule); });
|
|
281760
|
+
length = rules.length;
|
|
281761
|
+
i = 0;
|
|
281762
|
+
_d.label = 2;
|
|
281763
|
+
case 2:
|
|
281764
|
+
if (!(i < length)) return [3 /*break*/, 5];
|
|
281765
|
+
if (isInitial && RuleContainer.isLazy(rules[i])) {
|
|
281766
|
+
return [3 /*break*/, 4];
|
|
281767
|
+
}
|
|
281768
|
+
rule = rules[i];
|
|
281769
|
+
return [4 /*yield*/, _test(field, value, {
|
|
281770
|
+
name: rule,
|
|
281771
|
+
params: field.rules[rule]
|
|
281772
|
+
})];
|
|
281773
|
+
case 3:
|
|
281774
|
+
result = _d.sent();
|
|
281775
|
+
if (!result.valid && result.error) {
|
|
281776
|
+
errors.push(result.error);
|
|
281777
|
+
if (field.bails) {
|
|
281778
|
+
return [2 /*return*/, {
|
|
281779
|
+
valid: false,
|
|
281780
|
+
required: required,
|
|
281781
|
+
errors: errors
|
|
281782
|
+
}];
|
|
281783
|
+
}
|
|
281784
|
+
}
|
|
281785
|
+
_d.label = 4;
|
|
281786
|
+
case 4:
|
|
281787
|
+
i++;
|
|
281788
|
+
return [3 /*break*/, 2];
|
|
281789
|
+
case 5: return [2 /*return*/, {
|
|
281790
|
+
valid: !errors.length,
|
|
281791
|
+
required: required,
|
|
281792
|
+
errors: errors
|
|
281793
|
+
}];
|
|
281794
|
+
}
|
|
281795
|
+
});
|
|
281796
|
+
});
|
|
281797
|
+
}
|
|
281798
|
+
function _shouldSkip(field, value) {
|
|
281799
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281800
|
+
var requireRules, length, errors, isEmpty, isEmptyAndOptional, isRequired, i, rule, result;
|
|
281801
|
+
return __generator(this, function (_a) {
|
|
281802
|
+
switch (_a.label) {
|
|
281803
|
+
case 0:
|
|
281804
|
+
requireRules = Object.keys(field.rules).filter(RuleContainer.isRequireRule);
|
|
281805
|
+
length = requireRules.length;
|
|
281806
|
+
errors = [];
|
|
281807
|
+
isEmpty = isNullOrUndefined(value) || value === '' || isEmptyArray(value);
|
|
281808
|
+
isEmptyAndOptional = isEmpty && field.skipIfEmpty;
|
|
281809
|
+
i = 0;
|
|
281810
|
+
_a.label = 1;
|
|
281811
|
+
case 1:
|
|
281812
|
+
if (!(i < length)) return [3 /*break*/, 4];
|
|
281813
|
+
rule = requireRules[i];
|
|
281814
|
+
return [4 /*yield*/, _test(field, value, {
|
|
281815
|
+
name: rule,
|
|
281816
|
+
params: field.rules[rule]
|
|
281817
|
+
})];
|
|
281818
|
+
case 2:
|
|
281819
|
+
result = _a.sent();
|
|
281820
|
+
if (!vee_validate_esm_isObject(result)) {
|
|
281821
|
+
throw new Error('Require rules has to return an object (see docs)');
|
|
281822
|
+
}
|
|
281823
|
+
if (result.required !== undefined) {
|
|
281824
|
+
isRequired = result.required;
|
|
281825
|
+
}
|
|
281826
|
+
if (!result.valid && result.error) {
|
|
281827
|
+
errors.push(result.error);
|
|
281828
|
+
// Exit early as the field is required and failed validation.
|
|
281829
|
+
if (field.bails) {
|
|
281830
|
+
return [2 /*return*/, {
|
|
281831
|
+
shouldSkip: true,
|
|
281832
|
+
required: result.required,
|
|
281833
|
+
errors: errors
|
|
281834
|
+
}];
|
|
281835
|
+
}
|
|
281836
|
+
}
|
|
281837
|
+
_a.label = 3;
|
|
281838
|
+
case 3:
|
|
281839
|
+
i++;
|
|
281840
|
+
return [3 /*break*/, 1];
|
|
281841
|
+
case 4:
|
|
281842
|
+
if (isEmpty && !isRequired && !field.skipIfEmpty) {
|
|
281843
|
+
return [2 /*return*/, {
|
|
281844
|
+
shouldSkip: false,
|
|
281845
|
+
required: isRequired,
|
|
281846
|
+
errors: errors
|
|
281847
|
+
}];
|
|
281848
|
+
}
|
|
281849
|
+
// field is configured to run through the pipeline regardless
|
|
281850
|
+
if (!field.bails && !isEmptyAndOptional) {
|
|
281851
|
+
return [2 /*return*/, {
|
|
281852
|
+
shouldSkip: false,
|
|
281853
|
+
required: isRequired,
|
|
281854
|
+
errors: errors
|
|
281855
|
+
}];
|
|
281856
|
+
}
|
|
281857
|
+
// skip if the field is not required and has an empty value.
|
|
281858
|
+
return [2 /*return*/, {
|
|
281859
|
+
shouldSkip: !isRequired && isEmpty,
|
|
281860
|
+
required: isRequired,
|
|
281861
|
+
errors: errors
|
|
281862
|
+
}];
|
|
281863
|
+
}
|
|
281864
|
+
});
|
|
281865
|
+
});
|
|
281866
|
+
}
|
|
281867
|
+
/**
|
|
281868
|
+
* Tests a single input value against a rule.
|
|
281869
|
+
*/
|
|
281870
|
+
function _test(field, value, rule) {
|
|
281871
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
281872
|
+
var ruleSchema, normalizedValue, params, result, values_1;
|
|
281873
|
+
return __generator(this, function (_a) {
|
|
281874
|
+
switch (_a.label) {
|
|
281875
|
+
case 0:
|
|
281876
|
+
ruleSchema = RuleContainer.getRuleDefinition(rule.name);
|
|
281877
|
+
if (!ruleSchema || !ruleSchema.validate) {
|
|
281878
|
+
throw new Error("No such validator '" + rule.name + "' exists.");
|
|
281879
|
+
}
|
|
281880
|
+
normalizedValue = ruleSchema.castValue ? ruleSchema.castValue(value) : value;
|
|
281881
|
+
params = fillTargetValues(rule.params, field.crossTable);
|
|
281882
|
+
return [4 /*yield*/, ruleSchema.validate(normalizedValue, params)];
|
|
281883
|
+
case 1:
|
|
281884
|
+
result = _a.sent();
|
|
281885
|
+
if (typeof result === 'string') {
|
|
281886
|
+
values_1 = __assign(__assign({}, (params || {})), { _field_: field.name, _value_: value, _rule_: rule.name });
|
|
281887
|
+
return [2 /*return*/, {
|
|
281888
|
+
valid: false,
|
|
281889
|
+
error: { rule: rule.name, msg: function () { return interpolate(result, values_1); } }
|
|
281890
|
+
}];
|
|
281891
|
+
}
|
|
281892
|
+
if (!vee_validate_esm_isObject(result)) {
|
|
281893
|
+
result = { valid: result };
|
|
281894
|
+
}
|
|
281895
|
+
return [2 /*return*/, {
|
|
281896
|
+
valid: result.valid,
|
|
281897
|
+
required: result.required,
|
|
281898
|
+
error: result.valid ? undefined : _generateFieldError(field, value, ruleSchema, rule.name, params)
|
|
281899
|
+
}];
|
|
281900
|
+
}
|
|
281901
|
+
});
|
|
281902
|
+
});
|
|
281903
|
+
}
|
|
281904
|
+
/**
|
|
281905
|
+
* Generates error messages.
|
|
281906
|
+
*/
|
|
281907
|
+
function _generateFieldError(field, value, ruleSchema, ruleName, params) {
|
|
281908
|
+
var _a;
|
|
281909
|
+
var message = (_a = field.customMessages[ruleName]) !== null && _a !== void 0 ? _a : ruleSchema.message;
|
|
281910
|
+
var ruleTargets = _getRuleTargets(field, ruleSchema, ruleName);
|
|
281911
|
+
var _b = _getUserTargets(field, ruleSchema, ruleName, message), userTargets = _b.userTargets, userMessage = _b.userMessage;
|
|
281912
|
+
var values = __assign(__assign(__assign(__assign({}, (params || {})), { _field_: field.name, _value_: value, _rule_: ruleName }), ruleTargets), userTargets);
|
|
281913
|
+
return {
|
|
281914
|
+
msg: function () { return _normalizeMessage(userMessage || getConfig().defaultMessage, field.name, values); },
|
|
281915
|
+
rule: ruleName
|
|
281916
|
+
};
|
|
281917
|
+
}
|
|
281918
|
+
function _getRuleTargets(field, ruleSchema, ruleName) {
|
|
281919
|
+
var params = ruleSchema.params;
|
|
281920
|
+
if (!params) {
|
|
281921
|
+
return {};
|
|
281922
|
+
}
|
|
281923
|
+
var numTargets = params.filter(function (param) { return param.isTarget; }).length;
|
|
281924
|
+
if (numTargets <= 0) {
|
|
281925
|
+
return {};
|
|
281926
|
+
}
|
|
281927
|
+
var names = {};
|
|
281928
|
+
var ruleConfig = field.rules[ruleName];
|
|
281929
|
+
if (!Array.isArray(ruleConfig) && vee_validate_esm_isObject(ruleConfig)) {
|
|
281930
|
+
ruleConfig = params.map(function (param) {
|
|
281931
|
+
return ruleConfig[param.name];
|
|
281932
|
+
});
|
|
281933
|
+
}
|
|
281934
|
+
for (var index = 0; index < params.length; index++) {
|
|
281935
|
+
var param = params[index];
|
|
281936
|
+
var key = ruleConfig[index];
|
|
281937
|
+
if (!isLocator(key)) {
|
|
281938
|
+
continue;
|
|
281939
|
+
}
|
|
281940
|
+
key = key.__locatorRef;
|
|
281941
|
+
var name_1 = field.names[key] || key;
|
|
281942
|
+
names[param.name] = name_1;
|
|
281943
|
+
names["_" + param.name + "_"] = field.crossTable[key];
|
|
281944
|
+
}
|
|
281945
|
+
return names;
|
|
281946
|
+
}
|
|
281947
|
+
function _getUserTargets(field, ruleSchema, ruleName, userMessage) {
|
|
281948
|
+
var userTargets = {};
|
|
281949
|
+
var rules = field.rules[ruleName];
|
|
281950
|
+
var params = ruleSchema.params || [];
|
|
281951
|
+
// early return if no rules
|
|
281952
|
+
if (!rules) {
|
|
281953
|
+
return {};
|
|
281954
|
+
}
|
|
281955
|
+
// check all rules to convert targets
|
|
281956
|
+
Object.keys(rules).forEach(function (key, index) {
|
|
281957
|
+
// get the rule
|
|
281958
|
+
var rule = rules[key];
|
|
281959
|
+
if (!isLocator(rule)) {
|
|
281960
|
+
return {};
|
|
281961
|
+
}
|
|
281962
|
+
// get associated parameter
|
|
281963
|
+
var param = params[index];
|
|
281964
|
+
if (!param) {
|
|
281965
|
+
return {};
|
|
281966
|
+
}
|
|
281967
|
+
// grab the name of the target
|
|
281968
|
+
var name = rule.__locatorRef;
|
|
281969
|
+
userTargets[param.name] = field.names[name] || name;
|
|
281970
|
+
userTargets["_" + param.name + "_"] = field.crossTable[name];
|
|
281971
|
+
});
|
|
281972
|
+
return {
|
|
281973
|
+
userTargets: userTargets,
|
|
281974
|
+
userMessage: userMessage
|
|
281975
|
+
};
|
|
281976
|
+
}
|
|
281977
|
+
function _normalizeMessage(template, field, values) {
|
|
281978
|
+
if (typeof template === 'function') {
|
|
281979
|
+
return template(field, values);
|
|
281980
|
+
}
|
|
281981
|
+
return interpolate(template, __assign(__assign({}, values), { _field_: field }));
|
|
281982
|
+
}
|
|
281983
|
+
function fillTargetValues(params, crossTable) {
|
|
281984
|
+
if (Array.isArray(params)) {
|
|
281985
|
+
return params.map(function (param) {
|
|
281986
|
+
var targetPart = typeof param === 'string' && param[0] === '@' ? param.slice(1) : param;
|
|
281987
|
+
if (targetPart in crossTable) {
|
|
281988
|
+
return crossTable[targetPart];
|
|
281989
|
+
}
|
|
281990
|
+
return param;
|
|
281991
|
+
});
|
|
281992
|
+
}
|
|
281993
|
+
var values = {};
|
|
281994
|
+
var normalize = function (value) {
|
|
281995
|
+
if (isLocator(value)) {
|
|
281996
|
+
return value(crossTable);
|
|
281997
|
+
}
|
|
281998
|
+
return value;
|
|
281999
|
+
};
|
|
282000
|
+
Object.keys(params).forEach(function (param) {
|
|
282001
|
+
values[param] = normalize(params[param]);
|
|
282002
|
+
});
|
|
282003
|
+
return values;
|
|
282004
|
+
}
|
|
282005
|
+
|
|
282006
|
+
var aggressive = function () { return ({
|
|
282007
|
+
on: ['input', 'blur']
|
|
282008
|
+
}); };
|
|
282009
|
+
var lazy = function () { return ({
|
|
282010
|
+
on: ['change', 'blur']
|
|
282011
|
+
}); };
|
|
282012
|
+
var eager = function (_a) {
|
|
282013
|
+
var errors = _a.errors;
|
|
282014
|
+
if (errors.length) {
|
|
282015
|
+
return {
|
|
282016
|
+
on: ['input', 'change']
|
|
282017
|
+
};
|
|
282018
|
+
}
|
|
282019
|
+
return {
|
|
282020
|
+
on: ['change', 'blur']
|
|
282021
|
+
};
|
|
282022
|
+
};
|
|
282023
|
+
var passive = function () { return ({
|
|
282024
|
+
on: []
|
|
282025
|
+
}); };
|
|
282026
|
+
var modes = {
|
|
282027
|
+
aggressive: aggressive,
|
|
282028
|
+
eager: eager,
|
|
282029
|
+
passive: passive,
|
|
282030
|
+
lazy: lazy
|
|
282031
|
+
};
|
|
282032
|
+
var setInteractionMode = function (mode, implementation) {
|
|
282033
|
+
setConfig({ mode: mode });
|
|
282034
|
+
if (!implementation) {
|
|
282035
|
+
return;
|
|
282036
|
+
}
|
|
282037
|
+
if (!isCallable(implementation)) {
|
|
282038
|
+
throw new Error('A mode implementation must be a function');
|
|
282039
|
+
}
|
|
282040
|
+
modes[mode] = implementation;
|
|
282041
|
+
};
|
|
282042
|
+
|
|
282043
|
+
var EVENT_BUS = new (external_commonjs_vue_commonjs2_vue_root_Vue_default())();
|
|
282044
|
+
function localeChanged() {
|
|
282045
|
+
EVENT_BUS.$emit('change:locale');
|
|
282046
|
+
}
|
|
282047
|
+
|
|
282048
|
+
var Dictionary = /** @class */ (function () {
|
|
282049
|
+
function Dictionary(locale, dictionary) {
|
|
282050
|
+
this.container = {};
|
|
282051
|
+
this.locale = locale;
|
|
282052
|
+
this.merge(dictionary);
|
|
282053
|
+
}
|
|
282054
|
+
Dictionary.prototype.resolve = function (field, rule, values) {
|
|
282055
|
+
return this.format(this.locale, field, rule, values);
|
|
282056
|
+
};
|
|
282057
|
+
Dictionary.prototype.format = function (locale, field, rule, values) {
|
|
282058
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
282059
|
+
var message;
|
|
282060
|
+
// find if specific message for that field was specified.
|
|
282061
|
+
var fieldContainer = (_c = (_b = (_a = this.container[locale]) === null || _a === void 0 ? void 0 : _a.fields) === null || _b === void 0 ? void 0 : _b[field]) === null || _c === void 0 ? void 0 : _c[rule];
|
|
282062
|
+
var messageContainer = (_e = (_d = this.container[locale]) === null || _d === void 0 ? void 0 : _d.messages) === null || _e === void 0 ? void 0 : _e[rule];
|
|
282063
|
+
message = fieldContainer || messageContainer || '';
|
|
282064
|
+
if (!message) {
|
|
282065
|
+
message = '{_field_} is not valid';
|
|
282066
|
+
}
|
|
282067
|
+
field = (_h = (_g = (_f = this.container[locale]) === null || _f === void 0 ? void 0 : _f.names) === null || _g === void 0 ? void 0 : _g[field]) !== null && _h !== void 0 ? _h : field;
|
|
282068
|
+
return isCallable(message) ? message(field, values) : interpolate(message, __assign(__assign({}, values), { _field_: field }));
|
|
282069
|
+
};
|
|
282070
|
+
Dictionary.prototype.merge = function (dictionary) {
|
|
282071
|
+
vee_validate_esm_merge(this.container, dictionary);
|
|
282072
|
+
};
|
|
282073
|
+
Dictionary.prototype.hasRule = function (name) {
|
|
282074
|
+
var _a, _b;
|
|
282075
|
+
return !!((_b = (_a = this.container[this.locale]) === null || _a === void 0 ? void 0 : _a.messages) === null || _b === void 0 ? void 0 : _b[name]);
|
|
282076
|
+
};
|
|
282077
|
+
return Dictionary;
|
|
282078
|
+
}());
|
|
282079
|
+
var DICTIONARY;
|
|
282080
|
+
function localize(locale, dictionary) {
|
|
282081
|
+
var _a;
|
|
282082
|
+
if (!DICTIONARY) {
|
|
282083
|
+
DICTIONARY = new Dictionary('en', {});
|
|
282084
|
+
setConfig({
|
|
282085
|
+
defaultMessage: function (field, values) {
|
|
282086
|
+
return DICTIONARY.resolve(field, values === null || values === void 0 ? void 0 : values._rule_, values || {});
|
|
282087
|
+
}
|
|
282088
|
+
});
|
|
282089
|
+
}
|
|
282090
|
+
if (typeof locale === 'string') {
|
|
282091
|
+
DICTIONARY.locale = locale;
|
|
282092
|
+
if (dictionary) {
|
|
282093
|
+
DICTIONARY.merge((_a = {}, _a[locale] = dictionary, _a));
|
|
282094
|
+
}
|
|
282095
|
+
localeChanged();
|
|
282096
|
+
return;
|
|
282097
|
+
}
|
|
282098
|
+
DICTIONARY.merge(locale);
|
|
282099
|
+
}
|
|
282100
|
+
|
|
282101
|
+
// do not edit .js files directly - edit src/index.jst
|
|
282102
|
+
|
|
282103
|
+
|
|
282104
|
+
|
|
282105
|
+
var fastDeepEqual = function equal(a, b) {
|
|
282106
|
+
if (a === b) return true;
|
|
282107
|
+
|
|
282108
|
+
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
282109
|
+
if (a.constructor !== b.constructor) return false;
|
|
282110
|
+
|
|
282111
|
+
var length, i, keys;
|
|
282112
|
+
if (Array.isArray(a)) {
|
|
282113
|
+
length = a.length;
|
|
282114
|
+
if (length != b.length) return false;
|
|
282115
|
+
for (i = length; i-- !== 0;)
|
|
282116
|
+
if (!equal(a[i], b[i])) return false;
|
|
282117
|
+
return true;
|
|
282118
|
+
}
|
|
282119
|
+
|
|
282120
|
+
|
|
282121
|
+
|
|
282122
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
282123
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
282124
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
282125
|
+
|
|
282126
|
+
keys = Object.keys(a);
|
|
282127
|
+
length = keys.length;
|
|
282128
|
+
if (length !== Object.keys(b).length) return false;
|
|
282129
|
+
|
|
282130
|
+
for (i = length; i-- !== 0;)
|
|
282131
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
282132
|
+
|
|
282133
|
+
for (i = length; i-- !== 0;) {
|
|
282134
|
+
var key = keys[i];
|
|
282135
|
+
|
|
282136
|
+
if (!equal(a[key], b[key])) return false;
|
|
282137
|
+
}
|
|
282138
|
+
|
|
282139
|
+
return true;
|
|
282140
|
+
}
|
|
282141
|
+
|
|
282142
|
+
// true if both NaN, false otherwise
|
|
282143
|
+
return a!==a && b!==b;
|
|
282144
|
+
};
|
|
282145
|
+
|
|
282146
|
+
var isEvent = function (evt) {
|
|
282147
|
+
if (!evt) {
|
|
282148
|
+
return false;
|
|
282149
|
+
}
|
|
282150
|
+
if (typeof Event !== 'undefined' && isCallable(Event) && evt instanceof Event) {
|
|
282151
|
+
return true;
|
|
282152
|
+
}
|
|
282153
|
+
// this is for IE
|
|
282154
|
+
/* istanbul ignore next */
|
|
282155
|
+
if (evt && evt.srcElement) {
|
|
282156
|
+
return true;
|
|
282157
|
+
}
|
|
282158
|
+
return false;
|
|
282159
|
+
};
|
|
282160
|
+
function normalizeEventValue(value) {
|
|
282161
|
+
var _a, _b;
|
|
282162
|
+
if (!isEvent(value)) {
|
|
282163
|
+
return value;
|
|
282164
|
+
}
|
|
282165
|
+
var input = value.target;
|
|
282166
|
+
if (input.type === 'file' && input.files) {
|
|
282167
|
+
return vee_validate_esm_toArray(input.files);
|
|
282168
|
+
}
|
|
282169
|
+
// If the input has a `v-model.number` modifier applied.
|
|
282170
|
+
if ((_a = input._vModifiers) === null || _a === void 0 ? void 0 : _a.number) {
|
|
282171
|
+
// as per the spec the v-model.number uses parseFloat
|
|
282172
|
+
var valueAsNumber = parseFloat(input.value);
|
|
282173
|
+
if (vee_validate_esm_isNaN(valueAsNumber)) {
|
|
282174
|
+
return input.value;
|
|
282175
|
+
}
|
|
282176
|
+
return valueAsNumber;
|
|
282177
|
+
}
|
|
282178
|
+
if ((_b = input._vModifiers) === null || _b === void 0 ? void 0 : _b.trim) {
|
|
282179
|
+
var trimmedValue = typeof input.value === 'string' ? input.value.trim() : input.value;
|
|
282180
|
+
return trimmedValue;
|
|
282181
|
+
}
|
|
282182
|
+
return input.value;
|
|
282183
|
+
}
|
|
282184
|
+
|
|
282185
|
+
var isTextInput = function (vnode) {
|
|
282186
|
+
var _a;
|
|
282187
|
+
var attrs = ((_a = vnode.data) === null || _a === void 0 ? void 0 : _a.attrs) || vnode.elm;
|
|
282188
|
+
// it will fallback to being a text input per browsers spec.
|
|
282189
|
+
if (vnode.tag === 'input' && (!attrs || !attrs.type)) {
|
|
282190
|
+
return true;
|
|
282191
|
+
}
|
|
282192
|
+
if (vnode.tag === 'textarea') {
|
|
282193
|
+
return true;
|
|
282194
|
+
}
|
|
282195
|
+
return includes(['text', 'password', 'search', 'email', 'tel', 'url', 'number'], attrs === null || attrs === void 0 ? void 0 : attrs.type);
|
|
282196
|
+
};
|
|
282197
|
+
// export const isCheckboxOrRadioInput = (vnode: VNode): boolean => {
|
|
282198
|
+
// const attrs = (vnode.data && vnode.data.attrs) || vnode.elm;
|
|
282199
|
+
// return includes(['radio', 'checkbox'], attrs && attrs.type);
|
|
282200
|
+
// };
|
|
282201
|
+
// Gets the model object on the vnode.
|
|
282202
|
+
function findModel(vnode) {
|
|
282203
|
+
if (!vnode.data) {
|
|
282204
|
+
return undefined;
|
|
282205
|
+
}
|
|
282206
|
+
// Component Model
|
|
282207
|
+
// THIS IS NOT TYPED IN OFFICIAL VUE TYPINGS
|
|
282208
|
+
// eslint-disable-next-line
|
|
282209
|
+
var nonStandardVNodeData = vnode.data;
|
|
282210
|
+
if ('model' in nonStandardVNodeData) {
|
|
282211
|
+
return nonStandardVNodeData.model;
|
|
282212
|
+
}
|
|
282213
|
+
if (!vnode.data.directives) {
|
|
282214
|
+
return undefined;
|
|
282215
|
+
}
|
|
282216
|
+
return find(vnode.data.directives, function (d) { return d.name === 'model'; });
|
|
282217
|
+
}
|
|
282218
|
+
function findValue(vnode) {
|
|
282219
|
+
var _a, _b;
|
|
282220
|
+
var model = findModel(vnode);
|
|
282221
|
+
if (model) {
|
|
282222
|
+
return { value: model.value };
|
|
282223
|
+
}
|
|
282224
|
+
var config = findModelConfig(vnode);
|
|
282225
|
+
var prop = (config === null || config === void 0 ? void 0 : config.prop) || 'value';
|
|
282226
|
+
if (((_a = vnode.componentOptions) === null || _a === void 0 ? void 0 : _a.propsData) && prop in vnode.componentOptions.propsData) {
|
|
282227
|
+
var propsDataWithValue = vnode.componentOptions.propsData;
|
|
282228
|
+
return { value: propsDataWithValue[prop] };
|
|
282229
|
+
}
|
|
282230
|
+
if (((_b = vnode.data) === null || _b === void 0 ? void 0 : _b.domProps) && 'value' in vnode.data.domProps) {
|
|
282231
|
+
return { value: vnode.data.domProps.value };
|
|
282232
|
+
}
|
|
282233
|
+
return undefined;
|
|
282234
|
+
}
|
|
282235
|
+
function extractChildren(vnode) {
|
|
282236
|
+
if (Array.isArray(vnode)) {
|
|
282237
|
+
return vnode;
|
|
282238
|
+
}
|
|
282239
|
+
if (Array.isArray(vnode.children)) {
|
|
282240
|
+
return vnode.children;
|
|
282241
|
+
}
|
|
282242
|
+
/* istanbul ignore next */
|
|
282243
|
+
if (vnode.componentOptions && Array.isArray(vnode.componentOptions.children)) {
|
|
282244
|
+
return vnode.componentOptions.children;
|
|
282245
|
+
}
|
|
282246
|
+
return [];
|
|
282247
|
+
}
|
|
282248
|
+
function findInputNodes(vnode) {
|
|
282249
|
+
if (!Array.isArray(vnode) && findValue(vnode) !== undefined) {
|
|
282250
|
+
return [vnode];
|
|
282251
|
+
}
|
|
282252
|
+
var children = extractChildren(vnode);
|
|
282253
|
+
return children.reduce(function (nodes, node) {
|
|
282254
|
+
var candidates = findInputNodes(node);
|
|
282255
|
+
if (candidates.length) {
|
|
282256
|
+
nodes.push.apply(nodes, candidates);
|
|
282257
|
+
}
|
|
282258
|
+
return nodes;
|
|
282259
|
+
}, []);
|
|
282260
|
+
}
|
|
282261
|
+
// Resolves v-model config if exists.
|
|
282262
|
+
function findModelConfig(vnode) {
|
|
282263
|
+
/* istanbul ignore next */
|
|
282264
|
+
if (!vnode.componentOptions)
|
|
282265
|
+
return null;
|
|
282266
|
+
// This is also not typed in the standard Vue TS.
|
|
282267
|
+
return vnode.componentOptions.Ctor.options.model;
|
|
282268
|
+
}
|
|
282269
|
+
// Adds a listener to vnode listener object.
|
|
282270
|
+
function mergeVNodeListeners(obj, eventName, handler) {
|
|
282271
|
+
// no listener at all.
|
|
282272
|
+
if (isNullOrUndefined(obj[eventName])) {
|
|
282273
|
+
obj[eventName] = [handler];
|
|
282274
|
+
return;
|
|
282275
|
+
}
|
|
282276
|
+
// Is an invoker.
|
|
282277
|
+
if (isCallable(obj[eventName]) && obj[eventName].fns) {
|
|
282278
|
+
var invoker = obj[eventName];
|
|
282279
|
+
invoker.fns = Array.isArray(invoker.fns) ? invoker.fns : [invoker.fns];
|
|
282280
|
+
if (!includes(invoker.fns, handler)) {
|
|
282281
|
+
invoker.fns.push(handler);
|
|
282282
|
+
}
|
|
282283
|
+
return;
|
|
282284
|
+
}
|
|
282285
|
+
if (isCallable(obj[eventName])) {
|
|
282286
|
+
var prev = obj[eventName];
|
|
282287
|
+
obj[eventName] = [prev];
|
|
282288
|
+
}
|
|
282289
|
+
if (Array.isArray(obj[eventName]) && !includes(obj[eventName], handler)) {
|
|
282290
|
+
obj[eventName].push(handler);
|
|
282291
|
+
}
|
|
282292
|
+
}
|
|
282293
|
+
// Adds a listener to a native HTML vnode.
|
|
282294
|
+
function addNativeNodeListener(node, eventName, handler) {
|
|
282295
|
+
/* istanbul ignore next */
|
|
282296
|
+
if (!node.data) {
|
|
282297
|
+
node.data = {};
|
|
282298
|
+
}
|
|
282299
|
+
if (isNullOrUndefined(node.data.on)) {
|
|
282300
|
+
node.data.on = {};
|
|
282301
|
+
}
|
|
282302
|
+
mergeVNodeListeners(node.data.on, eventName, handler);
|
|
282303
|
+
}
|
|
282304
|
+
// Adds a listener to a Vue component vnode.
|
|
282305
|
+
function addComponentNodeListener(node, eventName, handler) {
|
|
282306
|
+
/* istanbul ignore next */
|
|
282307
|
+
if (!node.componentOptions) {
|
|
282308
|
+
return;
|
|
282309
|
+
}
|
|
282310
|
+
/* istanbul ignore next */
|
|
282311
|
+
if (!node.componentOptions.listeners) {
|
|
282312
|
+
node.componentOptions.listeners = {};
|
|
282313
|
+
}
|
|
282314
|
+
mergeVNodeListeners(node.componentOptions.listeners, eventName, handler);
|
|
282315
|
+
}
|
|
282316
|
+
function addVNodeListener(vnode, eventName, handler) {
|
|
282317
|
+
if (vnode.componentOptions) {
|
|
282318
|
+
addComponentNodeListener(vnode, eventName, handler);
|
|
282319
|
+
return;
|
|
282320
|
+
}
|
|
282321
|
+
addNativeNodeListener(vnode, eventName, handler);
|
|
282322
|
+
}
|
|
282323
|
+
// Determines if `change` should be used over `input` for listeners.
|
|
282324
|
+
function getInputEventName(vnode, model) {
|
|
282325
|
+
var _a;
|
|
282326
|
+
// Is a component.
|
|
282327
|
+
if (vnode.componentOptions) {
|
|
282328
|
+
var event_1 = (findModelConfig(vnode) || { event: 'input' }).event;
|
|
282329
|
+
return event_1 || 'input';
|
|
282330
|
+
}
|
|
282331
|
+
// Lazy Models typically use change event
|
|
282332
|
+
if ((_a = model === null || model === void 0 ? void 0 : model.modifiers) === null || _a === void 0 ? void 0 : _a.lazy) {
|
|
282333
|
+
return 'change';
|
|
282334
|
+
}
|
|
282335
|
+
// is a textual-type input.
|
|
282336
|
+
if (isTextInput(vnode)) {
|
|
282337
|
+
return 'input';
|
|
282338
|
+
}
|
|
282339
|
+
return 'change';
|
|
282340
|
+
}
|
|
282341
|
+
function isHTMLNode(node) {
|
|
282342
|
+
return includes(['input', 'select', 'textarea'], node.tag);
|
|
282343
|
+
}
|
|
282344
|
+
// TODO: Type this one properly.
|
|
282345
|
+
function normalizeSlots(slots, ctx) {
|
|
282346
|
+
var acc = [];
|
|
282347
|
+
return Object.keys(slots).reduce(function (arr, key) {
|
|
282348
|
+
slots[key].forEach(function (vnode) {
|
|
282349
|
+
if (!vnode.context) {
|
|
282350
|
+
slots[key].context = ctx;
|
|
282351
|
+
if (!vnode.data) {
|
|
282352
|
+
vnode.data = {};
|
|
282353
|
+
}
|
|
282354
|
+
vnode.data.slot = key;
|
|
282355
|
+
}
|
|
282356
|
+
});
|
|
282357
|
+
return arr.concat(slots[key]);
|
|
282358
|
+
}, acc);
|
|
282359
|
+
}
|
|
282360
|
+
function resolveTextualRules(vnode) {
|
|
282361
|
+
var _a;
|
|
282362
|
+
var attrs = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.attrs;
|
|
282363
|
+
var rules = {};
|
|
282364
|
+
if (!attrs)
|
|
282365
|
+
return rules;
|
|
282366
|
+
if (attrs.type === 'email' && RuleContainer.getRuleDefinition('email')) {
|
|
282367
|
+
rules.email = ['multiple' in attrs];
|
|
282368
|
+
}
|
|
282369
|
+
if (attrs.pattern && RuleContainer.getRuleDefinition('regex')) {
|
|
282370
|
+
rules.regex = attrs.pattern;
|
|
282371
|
+
}
|
|
282372
|
+
if (attrs.maxlength >= 0 && RuleContainer.getRuleDefinition('max')) {
|
|
282373
|
+
rules.max = attrs.maxlength;
|
|
282374
|
+
}
|
|
282375
|
+
if (attrs.minlength >= 0 && RuleContainer.getRuleDefinition('min')) {
|
|
282376
|
+
rules.min = attrs.minlength;
|
|
282377
|
+
}
|
|
282378
|
+
if (attrs.type === 'number') {
|
|
282379
|
+
if (isSpecified(attrs.min) && RuleContainer.getRuleDefinition('min_value')) {
|
|
282380
|
+
rules.min_value = Number(attrs.min);
|
|
282381
|
+
}
|
|
282382
|
+
if (isSpecified(attrs.max) && RuleContainer.getRuleDefinition('max_value')) {
|
|
282383
|
+
rules.max_value = Number(attrs.max);
|
|
282384
|
+
}
|
|
282385
|
+
}
|
|
282386
|
+
return rules;
|
|
282387
|
+
}
|
|
282388
|
+
function resolveRules(vnode) {
|
|
282389
|
+
var _a;
|
|
282390
|
+
var htmlTags = ['input', 'select', 'textarea'];
|
|
282391
|
+
var attrs = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.attrs;
|
|
282392
|
+
if (!includes(htmlTags, vnode.tag) || !attrs) {
|
|
282393
|
+
return {};
|
|
282394
|
+
}
|
|
282395
|
+
var rules = {};
|
|
282396
|
+
if ('required' in attrs && attrs.required !== false && RuleContainer.getRuleDefinition('required')) {
|
|
282397
|
+
rules.required = attrs.type === 'checkbox' ? [true] : true;
|
|
282398
|
+
}
|
|
282399
|
+
if (isTextInput(vnode)) {
|
|
282400
|
+
return normalizeRules(__assign(__assign({}, rules), resolveTextualRules(vnode)));
|
|
282401
|
+
}
|
|
282402
|
+
return normalizeRules(rules);
|
|
282403
|
+
}
|
|
282404
|
+
function normalizeChildren(context, slotProps) {
|
|
282405
|
+
if (context.$scopedSlots.default) {
|
|
282406
|
+
return context.$scopedSlots.default(slotProps) || [];
|
|
282407
|
+
}
|
|
282408
|
+
return context.$slots.default || [];
|
|
282409
|
+
}
|
|
282410
|
+
|
|
282411
|
+
/**
|
|
282412
|
+
* Determines if a provider needs to run validation.
|
|
282413
|
+
*/
|
|
282414
|
+
function shouldValidate(ctx, value) {
|
|
282415
|
+
// when an immediate/initial validation is needed and wasn't done before.
|
|
282416
|
+
if (!ctx._ignoreImmediate && ctx.immediate) {
|
|
282417
|
+
return true;
|
|
282418
|
+
}
|
|
282419
|
+
// when the value changes for whatever reason.
|
|
282420
|
+
if (!isRefEqual(ctx.value, value) && ctx.normalizedEvents.length) {
|
|
282421
|
+
return true;
|
|
282422
|
+
}
|
|
282423
|
+
// when it needs validation due to props/cross-fields changes.
|
|
282424
|
+
if (ctx._needsValidation) {
|
|
282425
|
+
return true;
|
|
282426
|
+
}
|
|
282427
|
+
// when the initial value is undefined and the field wasn't rendered yet.
|
|
282428
|
+
if (!ctx.initialized && value === undefined) {
|
|
282429
|
+
return true;
|
|
282430
|
+
}
|
|
282431
|
+
return false;
|
|
282432
|
+
}
|
|
282433
|
+
function createValidationCtx(ctx) {
|
|
282434
|
+
return __assign(__assign({}, ctx.flags), { errors: ctx.errors, classes: ctx.classes, failedRules: ctx.failedRules, reset: function () { return ctx.reset(); }, validate: function () {
|
|
282435
|
+
var args = [];
|
|
282436
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
282437
|
+
args[_i] = arguments[_i];
|
|
282438
|
+
}
|
|
282439
|
+
return ctx.validate.apply(ctx, args);
|
|
282440
|
+
}, ariaInput: {
|
|
282441
|
+
'aria-invalid': ctx.flags.invalid ? 'true' : 'false',
|
|
282442
|
+
'aria-required': ctx.isRequired ? 'true' : 'false',
|
|
282443
|
+
'aria-errormessage': "vee_" + ctx.id
|
|
282444
|
+
}, ariaMsg: {
|
|
282445
|
+
id: "vee_" + ctx.id,
|
|
282446
|
+
'aria-live': ctx.errors.length ? 'assertive' : 'off'
|
|
282447
|
+
} });
|
|
282448
|
+
}
|
|
282449
|
+
function onRenderUpdate(vm, value) {
|
|
282450
|
+
if (!vm.initialized) {
|
|
282451
|
+
vm.initialValue = value;
|
|
282452
|
+
}
|
|
282453
|
+
var validateNow = shouldValidate(vm, value);
|
|
282454
|
+
vm._needsValidation = false;
|
|
282455
|
+
vm.value = value;
|
|
282456
|
+
vm._ignoreImmediate = true;
|
|
282457
|
+
if (!validateNow) {
|
|
282458
|
+
return;
|
|
282459
|
+
}
|
|
282460
|
+
var validate = function () {
|
|
282461
|
+
if (vm.immediate || vm.flags.validated) {
|
|
282462
|
+
return triggerThreadSafeValidation(vm);
|
|
282463
|
+
}
|
|
282464
|
+
vm.validateSilent();
|
|
282465
|
+
};
|
|
282466
|
+
if (vm.initialized) {
|
|
282467
|
+
validate();
|
|
282468
|
+
return;
|
|
282469
|
+
}
|
|
282470
|
+
vm.$once('hook:mounted', function () { return validate(); });
|
|
282471
|
+
}
|
|
282472
|
+
function computeModeSetting(ctx) {
|
|
282473
|
+
var compute = (isCallable(ctx.mode) ? ctx.mode : modes[ctx.mode]);
|
|
282474
|
+
return compute(ctx);
|
|
282475
|
+
}
|
|
282476
|
+
function triggerThreadSafeValidation(vm) {
|
|
282477
|
+
var pendingPromise = vm.validateSilent();
|
|
282478
|
+
// avoids race conditions between successive validations.
|
|
282479
|
+
vm._pendingValidation = pendingPromise;
|
|
282480
|
+
return pendingPromise.then(function (result) {
|
|
282481
|
+
if (pendingPromise === vm._pendingValidation) {
|
|
282482
|
+
vm.applyResult(result);
|
|
282483
|
+
vm._pendingValidation = undefined;
|
|
282484
|
+
}
|
|
282485
|
+
return result;
|
|
282486
|
+
});
|
|
282487
|
+
}
|
|
282488
|
+
// Creates the common handlers for a validatable context.
|
|
282489
|
+
function createCommonHandlers(vm) {
|
|
282490
|
+
if (!vm.$veeOnInput) {
|
|
282491
|
+
vm.$veeOnInput = function (e) {
|
|
282492
|
+
vm.syncValue(e); // track and keep the value updated.
|
|
282493
|
+
vm.setFlags({ dirty: true, pristine: false });
|
|
282494
|
+
};
|
|
282495
|
+
}
|
|
282496
|
+
var onInput = vm.$veeOnInput;
|
|
282497
|
+
if (!vm.$veeOnBlur) {
|
|
282498
|
+
vm.$veeOnBlur = function () {
|
|
282499
|
+
vm.setFlags({ touched: true, untouched: false });
|
|
282500
|
+
};
|
|
282501
|
+
}
|
|
282502
|
+
// Blur event listener.
|
|
282503
|
+
var onBlur = vm.$veeOnBlur;
|
|
282504
|
+
var onValidate = vm.$veeHandler;
|
|
282505
|
+
var mode = computeModeSetting(vm);
|
|
282506
|
+
// Handle debounce changes.
|
|
282507
|
+
if (!onValidate || vm.$veeDebounce !== vm.debounce) {
|
|
282508
|
+
onValidate = debounce(function () {
|
|
282509
|
+
vm.$nextTick(function () {
|
|
282510
|
+
if (!vm._pendingReset) {
|
|
282511
|
+
triggerThreadSafeValidation(vm);
|
|
282512
|
+
}
|
|
282513
|
+
vm._pendingReset = false;
|
|
282514
|
+
});
|
|
282515
|
+
}, mode.debounce || vm.debounce);
|
|
282516
|
+
// Cache the handler so we don't create it each time.
|
|
282517
|
+
vm.$veeHandler = onValidate;
|
|
282518
|
+
// cache the debounce value so we detect if it was changed.
|
|
282519
|
+
vm.$veeDebounce = vm.debounce;
|
|
282520
|
+
}
|
|
282521
|
+
return { onInput: onInput, onBlur: onBlur, onValidate: onValidate };
|
|
282522
|
+
}
|
|
282523
|
+
// Adds all plugin listeners to the vnode.
|
|
282524
|
+
function addListeners(vm, node) {
|
|
282525
|
+
var value = findValue(node);
|
|
282526
|
+
// cache the input eventName.
|
|
282527
|
+
vm._inputEventName = vm._inputEventName || getInputEventName(node, findModel(node));
|
|
282528
|
+
onRenderUpdate(vm, value === null || value === void 0 ? void 0 : value.value);
|
|
282529
|
+
var _a = createCommonHandlers(vm), onInput = _a.onInput, onBlur = _a.onBlur, onValidate = _a.onValidate;
|
|
282530
|
+
addVNodeListener(node, vm._inputEventName, onInput);
|
|
282531
|
+
addVNodeListener(node, 'blur', onBlur);
|
|
282532
|
+
// add the validation listeners.
|
|
282533
|
+
vm.normalizedEvents.forEach(function (evt) {
|
|
282534
|
+
addVNodeListener(node, evt, onValidate);
|
|
282535
|
+
});
|
|
282536
|
+
vm.initialized = true;
|
|
282537
|
+
}
|
|
282538
|
+
|
|
282539
|
+
var PROVIDER_COUNTER = 0;
|
|
282540
|
+
function data$1() {
|
|
282541
|
+
var errors = [];
|
|
282542
|
+
var fieldName = '';
|
|
282543
|
+
var defaultValues = {
|
|
282544
|
+
errors: errors,
|
|
282545
|
+
value: undefined,
|
|
282546
|
+
initialized: false,
|
|
282547
|
+
initialValue: undefined,
|
|
282548
|
+
flags: createFlags(),
|
|
282549
|
+
failedRules: {},
|
|
282550
|
+
isActive: true,
|
|
282551
|
+
fieldName: fieldName,
|
|
282552
|
+
id: ''
|
|
282553
|
+
};
|
|
282554
|
+
return defaultValues;
|
|
282555
|
+
}
|
|
282556
|
+
var ValidationProvider = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
|
|
282557
|
+
name: 'ValidationProvider',
|
|
282558
|
+
inject: {
|
|
282559
|
+
$_veeObserver: {
|
|
282560
|
+
from: '$_veeObserver',
|
|
282561
|
+
default: function () {
|
|
282562
|
+
if (!this.$vnode.context.$_veeObserver) {
|
|
282563
|
+
this.$vnode.context.$_veeObserver = createObserver();
|
|
282564
|
+
}
|
|
282565
|
+
return this.$vnode.context.$_veeObserver;
|
|
282566
|
+
}
|
|
282567
|
+
}
|
|
282568
|
+
},
|
|
282569
|
+
props: {
|
|
282570
|
+
vid: {
|
|
282571
|
+
type: String,
|
|
282572
|
+
default: ''
|
|
282573
|
+
},
|
|
282574
|
+
name: {
|
|
282575
|
+
type: String,
|
|
282576
|
+
default: null
|
|
282577
|
+
},
|
|
282578
|
+
mode: {
|
|
282579
|
+
type: [String, Function],
|
|
282580
|
+
default: function () {
|
|
282581
|
+
return getConfig().mode;
|
|
282582
|
+
}
|
|
282583
|
+
},
|
|
282584
|
+
rules: {
|
|
282585
|
+
type: [Object, String],
|
|
282586
|
+
default: null
|
|
282587
|
+
},
|
|
282588
|
+
immediate: {
|
|
282589
|
+
type: Boolean,
|
|
282590
|
+
default: false
|
|
282591
|
+
},
|
|
282592
|
+
bails: {
|
|
282593
|
+
type: Boolean,
|
|
282594
|
+
default: function () { return getConfig().bails; }
|
|
282595
|
+
},
|
|
282596
|
+
skipIfEmpty: {
|
|
282597
|
+
type: Boolean,
|
|
282598
|
+
default: function () { return getConfig().skipOptional; }
|
|
282599
|
+
},
|
|
282600
|
+
debounce: {
|
|
282601
|
+
type: Number,
|
|
282602
|
+
default: 0
|
|
282603
|
+
},
|
|
282604
|
+
tag: {
|
|
282605
|
+
type: String,
|
|
282606
|
+
default: 'span'
|
|
282607
|
+
},
|
|
282608
|
+
slim: {
|
|
282609
|
+
type: Boolean,
|
|
282610
|
+
default: false
|
|
282611
|
+
},
|
|
282612
|
+
disabled: {
|
|
282613
|
+
type: Boolean,
|
|
282614
|
+
default: false
|
|
282615
|
+
},
|
|
282616
|
+
customMessages: {
|
|
282617
|
+
type: Object,
|
|
282618
|
+
default: function () {
|
|
282619
|
+
return {};
|
|
282620
|
+
}
|
|
282621
|
+
},
|
|
282622
|
+
detectInput: {
|
|
282623
|
+
type: Boolean,
|
|
282624
|
+
default: true
|
|
282625
|
+
}
|
|
282626
|
+
},
|
|
282627
|
+
watch: {
|
|
282628
|
+
rules: {
|
|
282629
|
+
deep: true,
|
|
282630
|
+
handler: function (val, oldVal) {
|
|
282631
|
+
this._needsValidation = !fastDeepEqual(val, oldVal);
|
|
282632
|
+
}
|
|
282633
|
+
}
|
|
282634
|
+
},
|
|
282635
|
+
data: data$1,
|
|
282636
|
+
computed: {
|
|
282637
|
+
fieldDeps: function () {
|
|
282638
|
+
var _this = this;
|
|
282639
|
+
return Object.keys(this.normalizedRules).reduce(function (acc, rule) {
|
|
282640
|
+
var deps = extractLocators(_this.normalizedRules[rule]).map(function (dep) {
|
|
282641
|
+
return isLocator(dep) ? dep.__locatorRef : dep.slice(1);
|
|
282642
|
+
});
|
|
282643
|
+
acc.push.apply(acc, deps);
|
|
282644
|
+
deps.forEach(function (depName) {
|
|
282645
|
+
watchCrossFieldDep(_this, depName);
|
|
282646
|
+
});
|
|
282647
|
+
return acc;
|
|
282648
|
+
}, []);
|
|
282649
|
+
},
|
|
282650
|
+
normalizedEvents: function () {
|
|
282651
|
+
var _this = this;
|
|
282652
|
+
var on = computeModeSetting(this).on;
|
|
282653
|
+
return (on || []).map(function (e) {
|
|
282654
|
+
if (e === 'input') {
|
|
282655
|
+
return _this._inputEventName;
|
|
282656
|
+
}
|
|
282657
|
+
return e;
|
|
282658
|
+
});
|
|
282659
|
+
},
|
|
282660
|
+
isRequired: function () {
|
|
282661
|
+
var rules = __assign(__assign({}, this._resolvedRules), this.normalizedRules);
|
|
282662
|
+
var isRequired = Object.keys(rules).some(RuleContainer.isRequireRule);
|
|
282663
|
+
this.flags.required = !!isRequired;
|
|
282664
|
+
return isRequired;
|
|
282665
|
+
},
|
|
282666
|
+
classes: function () {
|
|
282667
|
+
var names = getConfig().classes;
|
|
282668
|
+
return computeClassObj(names, this.flags);
|
|
282669
|
+
},
|
|
282670
|
+
normalizedRules: function () {
|
|
282671
|
+
return normalizeRules(this.rules);
|
|
282672
|
+
}
|
|
282673
|
+
},
|
|
282674
|
+
mounted: function () {
|
|
282675
|
+
var _this = this;
|
|
282676
|
+
var onLocaleChanged = function () {
|
|
282677
|
+
if (!_this.flags.validated) {
|
|
282678
|
+
return;
|
|
282679
|
+
}
|
|
282680
|
+
var regenerateMap = _this._regenerateMap;
|
|
282681
|
+
if (regenerateMap) {
|
|
282682
|
+
var errors_1 = [];
|
|
282683
|
+
var failedRules_1 = {};
|
|
282684
|
+
Object.keys(regenerateMap).forEach(function (rule) {
|
|
282685
|
+
var msg = regenerateMap[rule]();
|
|
282686
|
+
errors_1.push(msg);
|
|
282687
|
+
failedRules_1[rule] = msg;
|
|
282688
|
+
});
|
|
282689
|
+
_this.applyResult({ errors: errors_1, failedRules: failedRules_1, regenerateMap: regenerateMap });
|
|
282690
|
+
return;
|
|
282691
|
+
}
|
|
282692
|
+
_this.validate();
|
|
282693
|
+
};
|
|
282694
|
+
EVENT_BUS.$on('change:locale', onLocaleChanged);
|
|
282695
|
+
this.$on('hook:beforeDestroy', function () {
|
|
282696
|
+
EVENT_BUS.$off('change:locale', onLocaleChanged);
|
|
282697
|
+
});
|
|
282698
|
+
},
|
|
282699
|
+
render: function (h) {
|
|
282700
|
+
var _this = this;
|
|
282701
|
+
this.registerField();
|
|
282702
|
+
var ctx = createValidationCtx(this);
|
|
282703
|
+
var children = normalizeChildren(this, ctx);
|
|
282704
|
+
// Automatic v-model detection
|
|
282705
|
+
if (this.detectInput) {
|
|
282706
|
+
var inputs = findInputNodes(children);
|
|
282707
|
+
if (inputs.length) {
|
|
282708
|
+
inputs.forEach(function (input, idx) {
|
|
282709
|
+
var _a, _b, _c, _d, _e, _f;
|
|
282710
|
+
// If the elements are not checkboxes and there are more input nodes
|
|
282711
|
+
if (!includes(['checkbox', 'radio'], (_b = (_a = input.data) === null || _a === void 0 ? void 0 : _a.attrs) === null || _b === void 0 ? void 0 : _b.type) && idx > 0) {
|
|
282712
|
+
return;
|
|
282713
|
+
}
|
|
282714
|
+
var resolved = getConfig().useConstraintAttrs ? resolveRules(input) : {};
|
|
282715
|
+
if (!fastDeepEqual(_this._resolvedRules, resolved)) {
|
|
282716
|
+
_this._needsValidation = true;
|
|
282717
|
+
}
|
|
282718
|
+
if (isHTMLNode(input)) {
|
|
282719
|
+
_this.fieldName = ((_d = (_c = input.data) === null || _c === void 0 ? void 0 : _c.attrs) === null || _d === void 0 ? void 0 : _d.name) || ((_f = (_e = input.data) === null || _e === void 0 ? void 0 : _e.attrs) === null || _f === void 0 ? void 0 : _f.id);
|
|
282720
|
+
}
|
|
282721
|
+
_this._resolvedRules = resolved;
|
|
282722
|
+
addListeners(_this, input);
|
|
282723
|
+
});
|
|
282724
|
+
}
|
|
282725
|
+
}
|
|
282726
|
+
return this.slim && children.length <= 1 ? children[0] : h(this.tag, children);
|
|
282727
|
+
},
|
|
282728
|
+
beforeDestroy: function () {
|
|
282729
|
+
// cleanup reference.
|
|
282730
|
+
this.$_veeObserver.unobserve(this.id);
|
|
282731
|
+
},
|
|
282732
|
+
activated: function () {
|
|
282733
|
+
this.isActive = true;
|
|
282734
|
+
},
|
|
282735
|
+
deactivated: function () {
|
|
282736
|
+
this.isActive = false;
|
|
282737
|
+
},
|
|
282738
|
+
methods: {
|
|
282739
|
+
setFlags: function (flags) {
|
|
282740
|
+
var _this = this;
|
|
282741
|
+
Object.keys(flags).forEach(function (flag) {
|
|
282742
|
+
_this.flags[flag] = flags[flag];
|
|
282743
|
+
});
|
|
282744
|
+
},
|
|
282745
|
+
syncValue: function (v) {
|
|
282746
|
+
var value = normalizeEventValue(v);
|
|
282747
|
+
this.value = value;
|
|
282748
|
+
this.flags.changed = !fastDeepEqual(this.initialValue, value);
|
|
282749
|
+
},
|
|
282750
|
+
reset: function () {
|
|
282751
|
+
var _this = this;
|
|
282752
|
+
this.errors = [];
|
|
282753
|
+
this.initialValue = this.value;
|
|
282754
|
+
var flags = createFlags();
|
|
282755
|
+
flags.required = this.isRequired;
|
|
282756
|
+
this.setFlags(flags);
|
|
282757
|
+
this.failedRules = {};
|
|
282758
|
+
this.validateSilent();
|
|
282759
|
+
this._pendingValidation = undefined;
|
|
282760
|
+
this._pendingReset = true;
|
|
282761
|
+
setTimeout(function () {
|
|
282762
|
+
_this._pendingReset = false;
|
|
282763
|
+
}, this.debounce);
|
|
282764
|
+
},
|
|
282765
|
+
validate: function () {
|
|
282766
|
+
var args = [];
|
|
282767
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
282768
|
+
args[_i] = arguments[_i];
|
|
282769
|
+
}
|
|
282770
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
282771
|
+
return __generator(this, function (_a) {
|
|
282772
|
+
if (args.length > 0) {
|
|
282773
|
+
this.syncValue(args[0]);
|
|
282774
|
+
}
|
|
282775
|
+
return [2 /*return*/, triggerThreadSafeValidation(this)];
|
|
282776
|
+
});
|
|
282777
|
+
});
|
|
282778
|
+
},
|
|
282779
|
+
validateSilent: function () {
|
|
282780
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
282781
|
+
var rules, result;
|
|
282782
|
+
return __generator(this, function (_a) {
|
|
282783
|
+
switch (_a.label) {
|
|
282784
|
+
case 0:
|
|
282785
|
+
this.setFlags({ pending: true });
|
|
282786
|
+
rules = __assign(__assign({}, this._resolvedRules), this.normalizedRules);
|
|
282787
|
+
Object.defineProperty(rules, '_$$isNormalized', {
|
|
282788
|
+
value: true,
|
|
282789
|
+
writable: false,
|
|
282790
|
+
enumerable: false,
|
|
282791
|
+
configurable: false
|
|
282792
|
+
});
|
|
282793
|
+
return [4 /*yield*/, validate(this.value, rules, __assign(__assign({ name: this.name || this.fieldName }, createLookup(this)), { bails: this.bails, skipIfEmpty: this.skipIfEmpty, isInitial: !this.initialized, customMessages: this.customMessages }))];
|
|
282794
|
+
case 1:
|
|
282795
|
+
result = _a.sent();
|
|
282796
|
+
this.setFlags({
|
|
282797
|
+
pending: false,
|
|
282798
|
+
valid: result.valid,
|
|
282799
|
+
invalid: !result.valid
|
|
282800
|
+
});
|
|
282801
|
+
if (result.required !== undefined) {
|
|
282802
|
+
this.setFlags({
|
|
282803
|
+
required: result.required
|
|
282804
|
+
});
|
|
282805
|
+
}
|
|
282806
|
+
return [2 /*return*/, result];
|
|
282807
|
+
}
|
|
282808
|
+
});
|
|
282809
|
+
});
|
|
282810
|
+
},
|
|
282811
|
+
setErrors: function (errors) {
|
|
282812
|
+
this.applyResult({ errors: errors, failedRules: {} });
|
|
282813
|
+
},
|
|
282814
|
+
applyResult: function (_a) {
|
|
282815
|
+
var errors = _a.errors, failedRules = _a.failedRules, regenerateMap = _a.regenerateMap;
|
|
282816
|
+
this.errors = errors;
|
|
282817
|
+
this._regenerateMap = regenerateMap;
|
|
282818
|
+
this.failedRules = __assign({}, (failedRules || {}));
|
|
282819
|
+
this.setFlags({
|
|
282820
|
+
valid: !errors.length,
|
|
282821
|
+
passed: !errors.length,
|
|
282822
|
+
invalid: !!errors.length,
|
|
282823
|
+
failed: !!errors.length,
|
|
282824
|
+
validated: true,
|
|
282825
|
+
changed: !fastDeepEqual(this.value, this.initialValue)
|
|
282826
|
+
});
|
|
282827
|
+
},
|
|
282828
|
+
registerField: function () {
|
|
282829
|
+
updateRenderingContextRefs(this);
|
|
282830
|
+
},
|
|
282831
|
+
checkComputesRequiredState: function () {
|
|
282832
|
+
var rules = __assign(__assign({}, this._resolvedRules), this.normalizedRules);
|
|
282833
|
+
var isRequired = Object.keys(rules).some(RuleContainer.isRequireRule);
|
|
282834
|
+
return isRequired;
|
|
282835
|
+
}
|
|
282836
|
+
}
|
|
282837
|
+
});
|
|
282838
|
+
function computeClassObj(names, flags) {
|
|
282839
|
+
var acc = {};
|
|
282840
|
+
var keys = Object.keys(flags);
|
|
282841
|
+
var length = keys.length;
|
|
282842
|
+
var _loop_1 = function (i) {
|
|
282843
|
+
var flag = keys[i];
|
|
282844
|
+
var className = (names && names[flag]) || flag;
|
|
282845
|
+
var value = flags[flag];
|
|
282846
|
+
if (isNullOrUndefined(value)) {
|
|
282847
|
+
return "continue";
|
|
282848
|
+
}
|
|
282849
|
+
if ((flag === 'valid' || flag === 'invalid') && !flags.validated) {
|
|
282850
|
+
return "continue";
|
|
282851
|
+
}
|
|
282852
|
+
if (typeof className === 'string') {
|
|
282853
|
+
acc[className] = value;
|
|
282854
|
+
}
|
|
282855
|
+
else if (Array.isArray(className)) {
|
|
282856
|
+
className.forEach(function (cls) {
|
|
282857
|
+
acc[cls] = value;
|
|
282858
|
+
});
|
|
282859
|
+
}
|
|
282860
|
+
};
|
|
282861
|
+
for (var i = 0; i < length; i++) {
|
|
282862
|
+
_loop_1(i);
|
|
282863
|
+
}
|
|
282864
|
+
return acc;
|
|
282865
|
+
}
|
|
282866
|
+
function createLookup(vm) {
|
|
282867
|
+
var providers = vm.$_veeObserver.refs;
|
|
282868
|
+
var reduced = {
|
|
282869
|
+
names: {},
|
|
282870
|
+
values: {}
|
|
282871
|
+
};
|
|
282872
|
+
return vm.fieldDeps.reduce(function (acc, depName) {
|
|
282873
|
+
if (!providers[depName]) {
|
|
282874
|
+
return acc;
|
|
282875
|
+
}
|
|
282876
|
+
acc.values[depName] = providers[depName].value;
|
|
282877
|
+
acc.names[depName] = providers[depName].name;
|
|
282878
|
+
return acc;
|
|
282879
|
+
}, reduced);
|
|
282880
|
+
}
|
|
282881
|
+
function extractId(vm) {
|
|
282882
|
+
if (vm.vid) {
|
|
282883
|
+
return vm.vid;
|
|
282884
|
+
}
|
|
282885
|
+
if (vm.name) {
|
|
282886
|
+
return vm.name;
|
|
282887
|
+
}
|
|
282888
|
+
if (vm.id) {
|
|
282889
|
+
return vm.id;
|
|
282890
|
+
}
|
|
282891
|
+
if (vm.fieldName) {
|
|
282892
|
+
return vm.fieldName;
|
|
282893
|
+
}
|
|
282894
|
+
PROVIDER_COUNTER++;
|
|
282895
|
+
return "_vee_" + PROVIDER_COUNTER;
|
|
282896
|
+
}
|
|
282897
|
+
function updateRenderingContextRefs(vm) {
|
|
282898
|
+
var providedId = extractId(vm);
|
|
282899
|
+
var id = vm.id;
|
|
282900
|
+
// Nothing has changed.
|
|
282901
|
+
if (!vm.isActive || (id === providedId && vm.$_veeObserver.refs[id])) {
|
|
282902
|
+
return;
|
|
282903
|
+
}
|
|
282904
|
+
// vid was changed.
|
|
282905
|
+
if (id !== providedId && vm.$_veeObserver.refs[id] === vm) {
|
|
282906
|
+
vm.$_veeObserver.unobserve(id);
|
|
282907
|
+
}
|
|
282908
|
+
vm.id = providedId;
|
|
282909
|
+
vm.$_veeObserver.observe(vm);
|
|
282910
|
+
}
|
|
282911
|
+
function createObserver() {
|
|
282912
|
+
return {
|
|
282913
|
+
refs: {},
|
|
282914
|
+
observe: function (vm) {
|
|
282915
|
+
this.refs[vm.id] = vm;
|
|
282916
|
+
},
|
|
282917
|
+
unobserve: function (id) {
|
|
282918
|
+
delete this.refs[id];
|
|
282919
|
+
}
|
|
282920
|
+
};
|
|
282921
|
+
}
|
|
282922
|
+
function watchCrossFieldDep(ctx, depName, withHooks) {
|
|
282923
|
+
if (withHooks === void 0) { withHooks = true; }
|
|
282924
|
+
var providers = ctx.$_veeObserver.refs;
|
|
282925
|
+
if (!ctx._veeWatchers) {
|
|
282926
|
+
ctx._veeWatchers = {};
|
|
282927
|
+
}
|
|
282928
|
+
if (!providers[depName] && withHooks) {
|
|
282929
|
+
return ctx.$once('hook:mounted', function () {
|
|
282930
|
+
watchCrossFieldDep(ctx, depName, false);
|
|
282931
|
+
});
|
|
282932
|
+
}
|
|
282933
|
+
if (!isCallable(ctx._veeWatchers[depName]) && providers[depName]) {
|
|
282934
|
+
ctx._veeWatchers[depName] = providers[depName].$watch('value', function () {
|
|
282935
|
+
var isComputesRequired = ctx.checkComputesRequiredState();
|
|
282936
|
+
if (ctx.flags.validated) {
|
|
282937
|
+
ctx._needsValidation = true;
|
|
282938
|
+
ctx.validate();
|
|
282939
|
+
}
|
|
282940
|
+
// Validate dependent field silently if it has rules with computesRequired
|
|
282941
|
+
if (isComputesRequired && !ctx.flags.validated) {
|
|
282942
|
+
ctx.validateSilent();
|
|
282943
|
+
}
|
|
282944
|
+
});
|
|
282945
|
+
}
|
|
282946
|
+
}
|
|
282947
|
+
|
|
282948
|
+
var FLAGS_STRATEGIES = [
|
|
282949
|
+
['pristine', 'every'],
|
|
282950
|
+
['dirty', 'some'],
|
|
282951
|
+
['touched', 'some'],
|
|
282952
|
+
['untouched', 'every'],
|
|
282953
|
+
['valid', 'every'],
|
|
282954
|
+
['invalid', 'some'],
|
|
282955
|
+
['pending', 'some'],
|
|
282956
|
+
['validated', 'every'],
|
|
282957
|
+
['changed', 'some'],
|
|
282958
|
+
['passed', 'every'],
|
|
282959
|
+
['failed', 'some']
|
|
282960
|
+
];
|
|
282961
|
+
var OBSERVER_COUNTER = 0;
|
|
282962
|
+
function data() {
|
|
282963
|
+
var refs = {};
|
|
282964
|
+
var errors = {};
|
|
282965
|
+
var flags = createObserverFlags();
|
|
282966
|
+
var fields = {};
|
|
282967
|
+
// FIXME: Not sure of this one can be typed, circular type reference.
|
|
282968
|
+
var observers = [];
|
|
282969
|
+
return {
|
|
282970
|
+
id: '',
|
|
282971
|
+
refs: refs,
|
|
282972
|
+
observers: observers,
|
|
282973
|
+
errors: errors,
|
|
282974
|
+
flags: flags,
|
|
282975
|
+
fields: fields
|
|
282976
|
+
};
|
|
282977
|
+
}
|
|
282978
|
+
function provideSelf() {
|
|
282979
|
+
return {
|
|
282980
|
+
$_veeObserver: this
|
|
282981
|
+
};
|
|
282982
|
+
}
|
|
282983
|
+
var ValidationObserver = external_commonjs_vue_commonjs2_vue_root_Vue_default().extend({
|
|
282984
|
+
name: 'ValidationObserver',
|
|
282985
|
+
provide: provideSelf,
|
|
282986
|
+
inject: {
|
|
282987
|
+
$_veeObserver: {
|
|
282988
|
+
from: '$_veeObserver',
|
|
282989
|
+
default: function () {
|
|
282990
|
+
if (!this.$vnode.context.$_veeObserver) {
|
|
282991
|
+
return null;
|
|
282992
|
+
}
|
|
282993
|
+
return this.$vnode.context.$_veeObserver;
|
|
282994
|
+
}
|
|
282995
|
+
}
|
|
282996
|
+
},
|
|
282997
|
+
props: {
|
|
282998
|
+
tag: {
|
|
282999
|
+
type: String,
|
|
283000
|
+
default: 'span'
|
|
283001
|
+
},
|
|
283002
|
+
vid: {
|
|
283003
|
+
type: String,
|
|
283004
|
+
default: function () {
|
|
283005
|
+
return "obs_" + OBSERVER_COUNTER++;
|
|
283006
|
+
}
|
|
283007
|
+
},
|
|
283008
|
+
slim: {
|
|
283009
|
+
type: Boolean,
|
|
283010
|
+
default: false
|
|
283011
|
+
},
|
|
283012
|
+
disabled: {
|
|
283013
|
+
type: Boolean,
|
|
283014
|
+
default: false
|
|
283015
|
+
}
|
|
283016
|
+
},
|
|
283017
|
+
data: data,
|
|
283018
|
+
created: function () {
|
|
283019
|
+
var _this = this;
|
|
283020
|
+
this.id = this.vid;
|
|
283021
|
+
register(this);
|
|
283022
|
+
var onChange = debounce(function (_a) {
|
|
283023
|
+
var errors = _a.errors, flags = _a.flags, fields = _a.fields;
|
|
283024
|
+
_this.errors = errors;
|
|
283025
|
+
_this.flags = flags;
|
|
283026
|
+
_this.fields = fields;
|
|
283027
|
+
}, 16);
|
|
283028
|
+
this.$watch(computeObserverState, onChange);
|
|
283029
|
+
},
|
|
283030
|
+
activated: function () {
|
|
283031
|
+
register(this);
|
|
283032
|
+
},
|
|
283033
|
+
deactivated: function () {
|
|
283034
|
+
unregister(this);
|
|
283035
|
+
},
|
|
283036
|
+
beforeDestroy: function () {
|
|
283037
|
+
unregister(this);
|
|
283038
|
+
},
|
|
283039
|
+
render: function (h) {
|
|
283040
|
+
var children = normalizeChildren(this, prepareSlotProps(this));
|
|
283041
|
+
return this.slim && children.length <= 1 ? children[0] : h(this.tag, { on: this.$listeners }, children);
|
|
283042
|
+
},
|
|
283043
|
+
methods: {
|
|
283044
|
+
observe: function (subscriber, kind) {
|
|
283045
|
+
var _a;
|
|
283046
|
+
if (kind === void 0) { kind = 'provider'; }
|
|
283047
|
+
if (kind === 'observer') {
|
|
283048
|
+
this.observers.push(subscriber);
|
|
283049
|
+
return;
|
|
283050
|
+
}
|
|
283051
|
+
this.refs = __assign(__assign({}, this.refs), (_a = {}, _a[subscriber.id] = subscriber, _a));
|
|
283052
|
+
},
|
|
283053
|
+
unobserve: function (id, kind) {
|
|
283054
|
+
if (kind === void 0) { kind = 'provider'; }
|
|
283055
|
+
if (kind === 'provider') {
|
|
283056
|
+
var provider = this.refs[id];
|
|
283057
|
+
if (!provider) {
|
|
283058
|
+
return;
|
|
283059
|
+
}
|
|
283060
|
+
this.$delete(this.refs, id);
|
|
283061
|
+
return;
|
|
283062
|
+
}
|
|
283063
|
+
var idx = findIndex(this.observers, function (o) { return o.id === id; });
|
|
283064
|
+
if (idx !== -1) {
|
|
283065
|
+
this.observers.splice(idx, 1);
|
|
283066
|
+
}
|
|
283067
|
+
},
|
|
283068
|
+
validateWithInfo: function (_a) {
|
|
283069
|
+
var _b = (_a === void 0 ? {} : _a).silent, silent = _b === void 0 ? false : _b;
|
|
283070
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
283071
|
+
var results, isValid, _c, errors, flags, fields;
|
|
283072
|
+
return __generator(this, function (_d) {
|
|
283073
|
+
switch (_d.label) {
|
|
283074
|
+
case 0: return [4 /*yield*/, Promise.all(__spreadArrays(values(this.refs)
|
|
283075
|
+
.filter(function (r) { return !r.disabled; })
|
|
283076
|
+
.map(function (ref) { return ref[silent ? 'validateSilent' : 'validate']().then(function (r) { return r.valid; }); }), this.observers.filter(function (o) { return !o.disabled; }).map(function (obs) { return obs.validate({ silent: silent }); })))];
|
|
283077
|
+
case 1:
|
|
283078
|
+
results = _d.sent();
|
|
283079
|
+
isValid = results.every(function (r) { return r; });
|
|
283080
|
+
_c = computeObserverState.call(this), errors = _c.errors, flags = _c.flags, fields = _c.fields;
|
|
283081
|
+
this.errors = errors;
|
|
283082
|
+
this.flags = flags;
|
|
283083
|
+
this.fields = fields;
|
|
283084
|
+
return [2 /*return*/, {
|
|
283085
|
+
errors: errors,
|
|
283086
|
+
flags: flags,
|
|
283087
|
+
fields: fields,
|
|
283088
|
+
isValid: isValid
|
|
283089
|
+
}];
|
|
283090
|
+
}
|
|
283091
|
+
});
|
|
283092
|
+
});
|
|
283093
|
+
},
|
|
283094
|
+
validate: function (_a) {
|
|
283095
|
+
var _b = (_a === void 0 ? {} : _a).silent, silent = _b === void 0 ? false : _b;
|
|
283096
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
283097
|
+
var isValid;
|
|
283098
|
+
return __generator(this, function (_c) {
|
|
283099
|
+
switch (_c.label) {
|
|
283100
|
+
case 0: return [4 /*yield*/, this.validateWithInfo({ silent: silent })];
|
|
283101
|
+
case 1:
|
|
283102
|
+
isValid = (_c.sent()).isValid;
|
|
283103
|
+
return [2 /*return*/, isValid];
|
|
283104
|
+
}
|
|
283105
|
+
});
|
|
283106
|
+
});
|
|
283107
|
+
},
|
|
283108
|
+
handleSubmit: function (cb) {
|
|
283109
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
283110
|
+
var isValid;
|
|
283111
|
+
return __generator(this, function (_a) {
|
|
283112
|
+
switch (_a.label) {
|
|
283113
|
+
case 0: return [4 /*yield*/, this.validate()];
|
|
283114
|
+
case 1:
|
|
283115
|
+
isValid = _a.sent();
|
|
283116
|
+
if (!isValid || !cb) {
|
|
283117
|
+
return [2 /*return*/];
|
|
283118
|
+
}
|
|
283119
|
+
return [2 /*return*/, cb()];
|
|
283120
|
+
}
|
|
283121
|
+
});
|
|
283122
|
+
});
|
|
283123
|
+
},
|
|
283124
|
+
reset: function () {
|
|
283125
|
+
return __spreadArrays(values(this.refs), this.observers).forEach(function (ref) { return ref.reset(); });
|
|
283126
|
+
},
|
|
283127
|
+
setErrors: function (errors) {
|
|
283128
|
+
var _this = this;
|
|
283129
|
+
Object.keys(errors).forEach(function (key) {
|
|
283130
|
+
var provider = _this.refs[key];
|
|
283131
|
+
if (!provider)
|
|
283132
|
+
return;
|
|
283133
|
+
var errorArr = errors[key] || [];
|
|
283134
|
+
errorArr = typeof errorArr === 'string' ? [errorArr] : errorArr;
|
|
283135
|
+
provider.setErrors(errorArr);
|
|
283136
|
+
});
|
|
283137
|
+
this.observers.forEach(function (observer) {
|
|
283138
|
+
observer.setErrors(errors);
|
|
283139
|
+
});
|
|
283140
|
+
}
|
|
283141
|
+
}
|
|
283142
|
+
});
|
|
283143
|
+
function unregister(vm) {
|
|
283144
|
+
if (vm.$_veeObserver) {
|
|
283145
|
+
vm.$_veeObserver.unobserve(vm.id, 'observer');
|
|
283146
|
+
}
|
|
283147
|
+
}
|
|
283148
|
+
function register(vm) {
|
|
283149
|
+
if (vm.$_veeObserver) {
|
|
283150
|
+
vm.$_veeObserver.observe(vm, 'observer');
|
|
283151
|
+
}
|
|
283152
|
+
}
|
|
283153
|
+
function prepareSlotProps(vm) {
|
|
283154
|
+
return __assign(__assign({}, vm.flags), { errors: vm.errors, fields: vm.fields, validate: vm.validate, validateWithInfo: vm.validateWithInfo, passes: vm.handleSubmit, handleSubmit: vm.handleSubmit, reset: vm.reset });
|
|
283155
|
+
}
|
|
283156
|
+
// Creates a modified version of validation flags
|
|
283157
|
+
function createObserverFlags() {
|
|
283158
|
+
return __assign(__assign({}, createFlags()), { valid: true, invalid: false });
|
|
283159
|
+
}
|
|
283160
|
+
function computeObserverState() {
|
|
283161
|
+
var vms = __spreadArrays(values(this.refs), this.observers.filter(function (o) { return !o.disabled; }));
|
|
283162
|
+
var errors = {};
|
|
283163
|
+
var flags = createObserverFlags();
|
|
283164
|
+
var fields = {};
|
|
283165
|
+
var length = vms.length;
|
|
283166
|
+
for (var i = 0; i < length; i++) {
|
|
283167
|
+
var vm = vms[i];
|
|
283168
|
+
// validation provider
|
|
283169
|
+
if (Array.isArray(vm.errors)) {
|
|
283170
|
+
errors[vm.id] = vm.errors;
|
|
283171
|
+
fields[vm.id] = __assign({ id: vm.id, name: vm.name, failedRules: vm.failedRules }, vm.flags);
|
|
283172
|
+
continue;
|
|
283173
|
+
}
|
|
283174
|
+
// Nested observer, merge errors and fields
|
|
283175
|
+
errors = __assign(__assign({}, errors), vm.errors);
|
|
283176
|
+
fields = __assign(__assign({}, fields), vm.fields);
|
|
283177
|
+
}
|
|
283178
|
+
FLAGS_STRATEGIES.forEach(function (_a) {
|
|
283179
|
+
var flag = _a[0], method = _a[1];
|
|
283180
|
+
flags[flag] = vms[method](function (vm) { return vm.flags[flag]; });
|
|
283181
|
+
});
|
|
283182
|
+
return { errors: errors, flags: flags, fields: fields };
|
|
283183
|
+
}
|
|
283184
|
+
|
|
283185
|
+
function withValidation(component, mapProps) {
|
|
283186
|
+
var _a;
|
|
283187
|
+
if (mapProps === void 0) { mapProps = identity; }
|
|
283188
|
+
var options = 'options' in component ? component.options : component;
|
|
283189
|
+
var providerOpts = ValidationProvider.options;
|
|
283190
|
+
var hoc = {
|
|
283191
|
+
name: (options.name || 'AnonymousHoc') + "WithValidation",
|
|
283192
|
+
props: __assign({}, providerOpts.props),
|
|
283193
|
+
data: providerOpts.data,
|
|
283194
|
+
computed: __assign({}, providerOpts.computed),
|
|
283195
|
+
methods: __assign({}, providerOpts.methods),
|
|
283196
|
+
beforeDestroy: providerOpts.beforeDestroy,
|
|
283197
|
+
inject: providerOpts.inject
|
|
283198
|
+
};
|
|
283199
|
+
var eventName = ((_a = options === null || options === void 0 ? void 0 : options.model) === null || _a === void 0 ? void 0 : _a.event) || 'input';
|
|
283200
|
+
hoc.render = function (h) {
|
|
283201
|
+
var _a;
|
|
283202
|
+
this.registerField();
|
|
283203
|
+
var vctx = createValidationCtx(this);
|
|
283204
|
+
var listeners = __assign({}, this.$listeners);
|
|
283205
|
+
var model = findModel(this.$vnode);
|
|
283206
|
+
this._inputEventName = this._inputEventName || getInputEventName(this.$vnode, model);
|
|
283207
|
+
var value = findValue(this.$vnode);
|
|
283208
|
+
onRenderUpdate(this, value === null || value === void 0 ? void 0 : value.value);
|
|
283209
|
+
var _b = createCommonHandlers(this), onInput = _b.onInput, onBlur = _b.onBlur, onValidate = _b.onValidate;
|
|
283210
|
+
mergeVNodeListeners(listeners, eventName, onInput);
|
|
283211
|
+
mergeVNodeListeners(listeners, 'blur', onBlur);
|
|
283212
|
+
this.normalizedEvents.forEach(function (evt) {
|
|
283213
|
+
mergeVNodeListeners(listeners, evt, onValidate);
|
|
283214
|
+
});
|
|
283215
|
+
// Props are any attrs not associated with ValidationProvider Plus the model prop.
|
|
283216
|
+
// WARNING: Accidental prop overwrite will probably happen.
|
|
283217
|
+
var prop = (findModelConfig(this.$vnode) || { prop: 'value' }).prop;
|
|
283218
|
+
var props = __assign(__assign(__assign({}, this.$attrs), (_a = {}, _a[prop] = model === null || model === void 0 ? void 0 : model.value, _a)), mapProps(vctx));
|
|
283219
|
+
return h(options, {
|
|
283220
|
+
attrs: this.$attrs,
|
|
283221
|
+
props: props,
|
|
283222
|
+
on: listeners,
|
|
283223
|
+
scopedSlots: this.$scopedSlots
|
|
283224
|
+
}, normalizeSlots(this.$slots, this.$vnode.context));
|
|
283225
|
+
};
|
|
283226
|
+
return hoc;
|
|
283227
|
+
}
|
|
283228
|
+
|
|
283229
|
+
var version = '3.4.15';
|
|
283230
|
+
|
|
283231
|
+
|
|
281132
283232
|
|
|
281133
283233
|
;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecwapp/DatetimeRange/src/index.vue?vue&type=script&lang=js
|
|
283234
|
+
|
|
283235
|
+
|
|
281134
283236
|
/* harmony default export */ var DatetimeRange_srcvue_type_script_lang_js = ({
|
|
281135
283237
|
name: 'DatetimeRange',
|
|
281136
283238
|
components: {},
|
|
@@ -281196,6 +283298,28 @@ var srcvue_type_template_id_3607ce9c_scoped_true_staticRenderFns = [];
|
|
|
281196
283298
|
}
|
|
281197
283299
|
},
|
|
281198
283300
|
created: function created() {
|
|
283301
|
+
// 消息函数在生成时对 params.target(原始日期值)格式化为显示格式
|
|
283302
|
+
var self = this;
|
|
283303
|
+
var afterMessage = function afterMessage(field, values) {
|
|
283304
|
+
var target = values.target ? (0,utils/* formatTime */.fU)(values.target, self.format) : '';
|
|
283305
|
+
return "".concat(field, "\u5FC5\u987B\u5728").concat(target, "\u4E4B\u540E");
|
|
283306
|
+
};
|
|
283307
|
+
var beforeMessage = function beforeMessage(field, values) {
|
|
283308
|
+
var target = values.target ? (0,utils/* formatTime */.fU)(values.target, self.format) : '';
|
|
283309
|
+
return "".concat(field, "\u5FC5\u987B\u5728").concat(target, "\u4E4B\u524D");
|
|
283310
|
+
};
|
|
283311
|
+
vee_validate_esm_extend('after', {
|
|
283312
|
+
params: [{
|
|
283313
|
+
name: 'target'
|
|
283314
|
+
}],
|
|
283315
|
+
message: afterMessage
|
|
283316
|
+
});
|
|
283317
|
+
vee_validate_esm_extend('before', {
|
|
283318
|
+
params: [{
|
|
283319
|
+
name: 'target'
|
|
283320
|
+
}],
|
|
283321
|
+
message: beforeMessage
|
|
283322
|
+
});
|
|
281199
283323
|
if (this.type === 'date' && this.format === null) {
|
|
281200
283324
|
this.format = 'yyyy-MM-dd HH:mm:ss';
|
|
281201
283325
|
} else if (this.type === 'datetime' && this.format === null) {
|
|
@@ -281264,11 +283388,11 @@ var srcvue_type_template_id_3607ce9c_scoped_true_staticRenderFns = [];
|
|
|
281264
283388
|
;
|
|
281265
283389
|
var DatetimeRange_src_component = (0,componentNormalizer/* default */.A)(
|
|
281266
283390
|
ecwapp_DatetimeRange_srcvue_type_script_lang_js,
|
|
281267
|
-
|
|
281268
|
-
|
|
283391
|
+
srcvue_type_template_id_156ddf3c_scoped_true_render,
|
|
283392
|
+
srcvue_type_template_id_156ddf3c_scoped_true_staticRenderFns,
|
|
281269
283393
|
false,
|
|
281270
283394
|
null,
|
|
281271
|
-
"
|
|
283395
|
+
"156ddf3c",
|
|
281272
283396
|
null
|
|
281273
283397
|
|
|
281274
283398
|
)
|
|
@@ -286540,9 +288664,6 @@ WfNames_src.install = function (Vue) {
|
|
|
286540
288664
|
Vue.component(WfNames_src.name, WfNames_src);
|
|
286541
288665
|
};
|
|
286542
288666
|
/* harmony default export */ var WfNames = (WfNames_src);
|
|
286543
|
-
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
286544
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(74100);
|
|
286545
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
286546
288667
|
;// CONCATENATED MODULE: ./packages/common/directive/field-lbl/index.js
|
|
286547
288668
|
|
|
286548
288669
|
/**
|
|
@@ -287784,87 +289905,87 @@ var asyncComponents = [
|
|
|
287784
289905
|
}],
|
|
287785
289906
|
// ========== ecwapp/Wflowform 工作流表单子组件 → chunk: wflow-form ==========
|
|
287786
289907
|
['Attachment', function () {
|
|
287787
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289908
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287788
289909
|
return m.Attachment;
|
|
287789
289910
|
});
|
|
287790
289911
|
}], ['BodyFile', function () {
|
|
287791
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289912
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287792
289913
|
return m.BodyFile;
|
|
287793
289914
|
});
|
|
287794
289915
|
}], ['CommandBar', function () {
|
|
287795
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289916
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287796
289917
|
return m.CommandBar;
|
|
287797
289918
|
});
|
|
287798
289919
|
}], ['HandleIdea', function () {
|
|
287799
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289920
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287800
289921
|
return m.HandleIdea;
|
|
287801
289922
|
});
|
|
287802
289923
|
}], ['IdeaInputBox', function () {
|
|
287803
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289924
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287804
289925
|
return m.IdeaInputBox;
|
|
287805
289926
|
});
|
|
287806
289927
|
}], ['ModifyWflogAddUser', function () {
|
|
287807
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289928
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287808
289929
|
return m.ModifyWflogAddUser;
|
|
287809
289930
|
});
|
|
287810
289931
|
}], ['ModifyWflogIdea', function () {
|
|
287811
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289932
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287812
289933
|
return m.ModifyWflogIdea;
|
|
287813
289934
|
});
|
|
287814
289935
|
}], ['WriteToReadIdea', function () {
|
|
287815
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289936
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287816
289937
|
return m.WriteToReadIdea;
|
|
287817
289938
|
});
|
|
287818
289939
|
}], ['ModifyWflogSubmitFile', function () {
|
|
287819
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289940
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287820
289941
|
return m.ModifyWflogSubmitFile;
|
|
287821
289942
|
});
|
|
287822
289943
|
}], ['ModifyWfNodelog', function () {
|
|
287823
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289944
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287824
289945
|
return m.ModifyWfNodelog;
|
|
287825
289946
|
});
|
|
287826
289947
|
}], ['SelectOuterDeputy', function () {
|
|
287827
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289948
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287828
289949
|
return m.SelectOuterDeputy;
|
|
287829
289950
|
});
|
|
287830
289951
|
}], ['SubmitHandle', function () {
|
|
287831
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289952
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287832
289953
|
return m.SubmitHandle;
|
|
287833
289954
|
});
|
|
287834
289955
|
}], ['SubmitDialog', function () {
|
|
287835
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289956
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287836
289957
|
return m.SubmitDialog;
|
|
287837
289958
|
});
|
|
287838
289959
|
}], ['WfNodelogList', function () {
|
|
287839
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289960
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287840
289961
|
return m.WfNodelogList;
|
|
287841
289962
|
});
|
|
287842
289963
|
}], ['WflogAddReader', function () {
|
|
287843
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289964
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287844
289965
|
return m.WflogAddReader;
|
|
287845
289966
|
});
|
|
287846
289967
|
}], ['WflowView', function () {
|
|
287847
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289968
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287848
289969
|
return m.WflowView;
|
|
287849
289970
|
});
|
|
287850
289971
|
}], ['ImgView', function () {
|
|
287851
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289972
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287852
289973
|
return m.ImgView;
|
|
287853
289974
|
});
|
|
287854
289975
|
}], ['IdeaSignature', function () {
|
|
287855
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289976
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287856
289977
|
return m.IdeaSignature;
|
|
287857
289978
|
});
|
|
287858
289979
|
}], ['ReplaceFile', function () {
|
|
287859
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289980
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287860
289981
|
return m.ReplaceFile;
|
|
287861
289982
|
});
|
|
287862
289983
|
}], ['ViewBodyFile', function () {
|
|
287863
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289984
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287864
289985
|
return m.ViewBodyFile;
|
|
287865
289986
|
});
|
|
287866
289987
|
}], ['WformLayout', function () {
|
|
287867
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
289988
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614)).then(function (m) {
|
|
287868
289989
|
return m.WformLayout;
|
|
287869
289990
|
});
|
|
287870
289991
|
}],
|
|
@@ -288149,7 +290270,7 @@ var WfengineModule = function WfengineModule() {
|
|
|
288149
290270
|
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 88838));
|
|
288150
290271
|
};
|
|
288151
290272
|
var WflowformModule = function WflowformModule() {
|
|
288152
|
-
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__,
|
|
290273
|
+
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8614));
|
|
288153
290274
|
};
|
|
288154
290275
|
var WflowDesignerModule = function WflowDesignerModule() {
|
|
288155
290276
|
return Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4041));
|