workflow-editor 0.0.81-up-tmp8 → 0.0.81-up-tmp9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.min.js +142 -138
- package/es/index.mjs +13 -15
- package/es/style.css +181 -181
- package/es/workflow-editor/index.mjs +10 -0
- package/lib/index.cjs +4 -4
- package/lib/style.css +122 -122
- package/lib/workflow-editor/index.cjs +7 -0
- package/package.json +1 -1
package/dist/index.full.min.js
CHANGED
|
@@ -2794,28 +2794,32 @@
|
|
|
2794
2794
|
const a2 = r.resolveComponent("wf-history-canvas");
|
|
2795
2795
|
return r.openBlock(), r.createElementBlock("div", Vr, [r.createElementVNode("div", yr, [r.createElementVNode("section", null, [r.createVNode(a2, { onselectstart: "return false", process: e2.process, histories: e2.histories, "current-tasks": e2.currentTasks, "all-process-i18n": e2.allProcessI18n, "show-history": true, class: "canvas", onContextmenu: r.withModifiers(i2.showContextMenu, ["prevent"]) }, null, 8, ["process", "histories", "current-tasks", "all-process-i18n", "onContextmenu"])])])], 512);
|
|
2796
2796
|
}], ["__scopeId", "data-v-6658e14b"]]);
|
|
2797
|
-
function
|
|
2798
|
-
|
|
2797
|
+
ur.install = function(e2) {
|
|
2798
|
+
e2.component(ur.name, ur), e2.component(vr.name, vr);
|
|
2799
|
+
};
|
|
2800
|
+
const Tr = { WorkflowEditor: ur, WorkflowHistory: vr, wfEditorStore: pr };
|
|
2801
|
+
function Nr() {
|
|
2802
|
+
return Nr = Object.assign ? Object.assign.bind() : function(e2) {
|
|
2799
2803
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
2800
2804
|
var o2 = arguments[t2];
|
|
2801
2805
|
for (var l2 in o2)
|
|
2802
2806
|
Object.prototype.hasOwnProperty.call(o2, l2) && (e2[l2] = o2[l2]);
|
|
2803
2807
|
}
|
|
2804
2808
|
return e2;
|
|
2805
|
-
},
|
|
2809
|
+
}, Nr.apply(this, arguments);
|
|
2806
2810
|
}
|
|
2807
|
-
function
|
|
2808
|
-
return
|
|
2811
|
+
function xr(e2) {
|
|
2812
|
+
return xr = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e3) {
|
|
2809
2813
|
return e3.__proto__ || Object.getPrototypeOf(e3);
|
|
2810
|
-
},
|
|
2814
|
+
}, xr(e2);
|
|
2811
2815
|
}
|
|
2812
|
-
function
|
|
2813
|
-
return
|
|
2816
|
+
function Er(e2, t2) {
|
|
2817
|
+
return Er = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e3, t3) {
|
|
2814
2818
|
return e3.__proto__ = t3, e3;
|
|
2815
|
-
},
|
|
2819
|
+
}, Er(e2, t2);
|
|
2816
2820
|
}
|
|
2817
|
-
function
|
|
2818
|
-
return
|
|
2821
|
+
function Sr(e2, t2, o2) {
|
|
2822
|
+
return Sr = function() {
|
|
2819
2823
|
if ("undefined" == typeof Reflect || !Reflect.construct)
|
|
2820
2824
|
return false;
|
|
2821
2825
|
if (Reflect.construct.sham)
|
|
@@ -2832,12 +2836,12 @@
|
|
|
2832
2836
|
var l2 = [null];
|
|
2833
2837
|
l2.push.apply(l2, t3);
|
|
2834
2838
|
var r2 = new (Function.bind.apply(e3, l2))();
|
|
2835
|
-
return o3 &&
|
|
2836
|
-
},
|
|
2839
|
+
return o3 && Er(r2, o3.prototype), r2;
|
|
2840
|
+
}, Sr.apply(null, arguments);
|
|
2837
2841
|
}
|
|
2838
|
-
function
|
|
2842
|
+
function Mr(e2) {
|
|
2839
2843
|
var t2 = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0;
|
|
2840
|
-
return
|
|
2844
|
+
return Mr = function(e3) {
|
|
2841
2845
|
if (null === e3 || (o2 = e3, -1 === Function.toString.call(o2).indexOf("[native code]")))
|
|
2842
2846
|
return e3;
|
|
2843
2847
|
var o2;
|
|
@@ -2849,14 +2853,14 @@
|
|
|
2849
2853
|
t2.set(e3, l2);
|
|
2850
2854
|
}
|
|
2851
2855
|
function l2() {
|
|
2852
|
-
return
|
|
2856
|
+
return Sr(e3, arguments, xr(this).constructor);
|
|
2853
2857
|
}
|
|
2854
|
-
return l2.prototype = Object.create(e3.prototype, { constructor: { value: l2, enumerable: false, writable: true, configurable: true } }),
|
|
2855
|
-
},
|
|
2858
|
+
return l2.prototype = Object.create(e3.prototype, { constructor: { value: l2, enumerable: false, writable: true, configurable: true } }), Er(l2, e3);
|
|
2859
|
+
}, Mr(e2);
|
|
2856
2860
|
}
|
|
2857
|
-
var
|
|
2861
|
+
var Dr = /%[sdj%]/g, Fr = function() {
|
|
2858
2862
|
};
|
|
2859
|
-
function
|
|
2863
|
+
function $r(e2) {
|
|
2860
2864
|
if (!e2 || !e2.length)
|
|
2861
2865
|
return null;
|
|
2862
2866
|
var t2 = {};
|
|
@@ -2865,11 +2869,11 @@
|
|
|
2865
2869
|
t2[o2] = t2[o2] || [], t2[o2].push(e3);
|
|
2866
2870
|
}), t2;
|
|
2867
2871
|
}
|
|
2868
|
-
function
|
|
2872
|
+
function Pr(e2) {
|
|
2869
2873
|
for (var t2 = arguments.length, o2 = new Array(t2 > 1 ? t2 - 1 : 0), l2 = 1; l2 < t2; l2++)
|
|
2870
2874
|
o2[l2 - 1] = arguments[l2];
|
|
2871
2875
|
var r2 = 0, n2 = o2.length;
|
|
2872
|
-
return "function" == typeof e2 ? e2.apply(null, o2) : "string" == typeof e2 ? e2.replace(
|
|
2876
|
+
return "function" == typeof e2 ? e2.apply(null, o2) : "string" == typeof e2 ? e2.replace(Dr, function(e3) {
|
|
2873
2877
|
if ("%%" === e3)
|
|
2874
2878
|
return "%";
|
|
2875
2879
|
if (r2 >= n2)
|
|
@@ -2891,12 +2895,12 @@
|
|
|
2891
2895
|
}
|
|
2892
2896
|
}) : e2;
|
|
2893
2897
|
}
|
|
2894
|
-
function
|
|
2898
|
+
function Br(e2, t2) {
|
|
2895
2899
|
return null == e2 || (!("array" !== t2 || !Array.isArray(e2) || e2.length) || !(!function(e3) {
|
|
2896
2900
|
return "string" === e3 || "url" === e3 || "hex" === e3 || "email" === e3 || "date" === e3 || "pattern" === e3;
|
|
2897
2901
|
}(t2) || "string" != typeof e2 || e2));
|
|
2898
2902
|
}
|
|
2899
|
-
function
|
|
2903
|
+
function Or(e2, t2, o2) {
|
|
2900
2904
|
var l2 = 0, r2 = e2.length;
|
|
2901
2905
|
!function n2(i2) {
|
|
2902
2906
|
if (i2 && i2.length)
|
|
@@ -2907,20 +2911,20 @@
|
|
|
2907
2911
|
}
|
|
2908
2912
|
}([]);
|
|
2909
2913
|
}
|
|
2910
|
-
"undefined" != typeof process && process.env && "production" !== process.env.NODE_ENV && "undefined" != typeof window && "undefined" != typeof document && (
|
|
2914
|
+
"undefined" != typeof process && process.env && "production" !== process.env.NODE_ENV && "undefined" != typeof window && "undefined" != typeof document && (Fr = function(e2, t2) {
|
|
2911
2915
|
"undefined" != typeof console && console.warn && "undefined" == typeof ASYNC_VALIDATOR_NO_WARNING && t2.every(function(e3) {
|
|
2912
2916
|
return "string" == typeof e3;
|
|
2913
2917
|
});
|
|
2914
2918
|
});
|
|
2915
|
-
var
|
|
2919
|
+
var Ir = function(e2) {
|
|
2916
2920
|
var t2, o2;
|
|
2917
2921
|
function l2(t3, o3) {
|
|
2918
2922
|
var l3;
|
|
2919
2923
|
return (l3 = e2.call(this, "Async Validation Error") || this).errors = t3, l3.fields = o3, l3;
|
|
2920
2924
|
}
|
|
2921
|
-
return o2 = e2, (t2 = l2).prototype = Object.create(o2.prototype), t2.prototype.constructor = t2,
|
|
2922
|
-
}(
|
|
2923
|
-
function
|
|
2925
|
+
return o2 = e2, (t2 = l2).prototype = Object.create(o2.prototype), t2.prototype.constructor = t2, Er(t2, o2), l2;
|
|
2926
|
+
}(Mr(Error));
|
|
2927
|
+
function _r(e2, t2, o2, l2, r2) {
|
|
2924
2928
|
if (t2.first) {
|
|
2925
2929
|
var n2 = new Promise(function(t3, n3) {
|
|
2926
2930
|
var i3 = function(e3) {
|
|
@@ -2929,8 +2933,8 @@
|
|
|
2929
2933
|
t4.push.apply(t4, e3[o3] || []);
|
|
2930
2934
|
}), t4;
|
|
2931
2935
|
}(e2);
|
|
2932
|
-
|
|
2933
|
-
return l2(e3), e3.length ? n3(new
|
|
2936
|
+
Or(i3, o2, function(e3) {
|
|
2937
|
+
return l2(e3), e3.length ? n3(new Ir(e3, $r(e3))) : t3(r2);
|
|
2934
2938
|
});
|
|
2935
2939
|
});
|
|
2936
2940
|
return n2.catch(function(e3) {
|
|
@@ -2940,11 +2944,11 @@
|
|
|
2940
2944
|
var i2 = true === t2.firstFields ? Object.keys(e2) : t2.firstFields || [], a2 = Object.keys(e2), s2 = a2.length, d2 = 0, c2 = [], m2 = new Promise(function(t3, n3) {
|
|
2941
2945
|
var m3 = function(e3) {
|
|
2942
2946
|
if (c2.push.apply(c2, e3), ++d2 === s2)
|
|
2943
|
-
return l2(c2), c2.length ? n3(new
|
|
2947
|
+
return l2(c2), c2.length ? n3(new Ir(c2, $r(c2))) : t3(r2);
|
|
2944
2948
|
};
|
|
2945
2949
|
a2.length || (l2(c2), t3(r2)), a2.forEach(function(t4) {
|
|
2946
2950
|
var l3 = e2[t4];
|
|
2947
|
-
-1 !== i2.indexOf(t4) ?
|
|
2951
|
+
-1 !== i2.indexOf(t4) ? Or(l3, o2, m3) : function(e3, t5, o3) {
|
|
2948
2952
|
var l4 = [], r3 = 0, n4 = e3.length;
|
|
2949
2953
|
function i3(e4) {
|
|
2950
2954
|
l4.push.apply(l4, e4 || []), ++r3 === n4 && o3(l4);
|
|
@@ -2959,7 +2963,7 @@
|
|
|
2959
2963
|
return e3;
|
|
2960
2964
|
}), m2;
|
|
2961
2965
|
}
|
|
2962
|
-
function
|
|
2966
|
+
function Rr(e2, t2) {
|
|
2963
2967
|
return function(o2) {
|
|
2964
2968
|
var l2, r2;
|
|
2965
2969
|
return l2 = e2.fullFields ? function(e3, t3) {
|
|
@@ -2972,22 +2976,22 @@
|
|
|
2972
2976
|
}(t2, e2.fullFields) : t2[o2.field || e2.fullField], (r2 = o2) && void 0 !== r2.message ? (o2.field = o2.field || e2.fullField, o2.fieldValue = l2, o2) : { message: "function" == typeof o2 ? o2() : o2, fieldValue: l2, field: o2.field || e2.fullField };
|
|
2973
2977
|
};
|
|
2974
2978
|
}
|
|
2975
|
-
function
|
|
2979
|
+
function Ar(e2, t2) {
|
|
2976
2980
|
if (t2) {
|
|
2977
2981
|
for (var o2 in t2)
|
|
2978
2982
|
if (t2.hasOwnProperty(o2)) {
|
|
2979
2983
|
var l2 = t2[o2];
|
|
2980
|
-
"object" == typeof l2 && "object" == typeof e2[o2] ? e2[o2] =
|
|
2984
|
+
"object" == typeof l2 && "object" == typeof e2[o2] ? e2[o2] = Nr({}, e2[o2], l2) : e2[o2] = l2;
|
|
2981
2985
|
}
|
|
2982
2986
|
}
|
|
2983
2987
|
return e2;
|
|
2984
2988
|
}
|
|
2985
|
-
var
|
|
2986
|
-
!e2.required || o2.hasOwnProperty(e2.field) && !
|
|
2987
|
-
},
|
|
2988
|
-
return
|
|
2989
|
+
var Ur, Lr = function(e2, t2, o2, l2, r2, n2) {
|
|
2990
|
+
!e2.required || o2.hasOwnProperty(e2.field) && !Br(t2, n2 || e2.type) || l2.push(Pr(r2.messages.required, e2.fullField));
|
|
2991
|
+
}, Hr = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/, jr = /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i, zr = { integer: function(e2) {
|
|
2992
|
+
return zr.number(e2) && parseInt(e2, 10) === e2;
|
|
2989
2993
|
}, float: function(e2) {
|
|
2990
|
-
return
|
|
2994
|
+
return zr.number(e2) && !zr.integer(e2);
|
|
2991
2995
|
}, array: function(e2) {
|
|
2992
2996
|
return Array.isArray(e2);
|
|
2993
2997
|
}, regexp: function(e2) {
|
|
@@ -3003,15 +3007,15 @@
|
|
|
3003
3007
|
}, number: function(e2) {
|
|
3004
3008
|
return !isNaN(e2) && "number" == typeof e2;
|
|
3005
3009
|
}, object: function(e2) {
|
|
3006
|
-
return "object" == typeof e2 && !
|
|
3010
|
+
return "object" == typeof e2 && !zr.array(e2);
|
|
3007
3011
|
}, method: function(e2) {
|
|
3008
3012
|
return "function" == typeof e2;
|
|
3009
3013
|
}, email: function(e2) {
|
|
3010
|
-
return "string" == typeof e2 && e2.length <= 320 && !!e2.match(
|
|
3014
|
+
return "string" == typeof e2 && e2.length <= 320 && !!e2.match(Hr);
|
|
3011
3015
|
}, url: function(e2) {
|
|
3012
3016
|
return "string" == typeof e2 && e2.length <= 2048 && !!e2.match(function() {
|
|
3013
|
-
if (
|
|
3014
|
-
return
|
|
3017
|
+
if (Ur)
|
|
3018
|
+
return Ur;
|
|
3015
3019
|
var e3 = "[a-fA-F\\d:]", t2 = function(t3) {
|
|
3016
3020
|
return t3 && t3.includeBoundaries ? "(?:(?<=\\s|^)(?=" + e3 + ")|(?<=" + e3 + ")(?=\\s|$))" : "";
|
|
3017
3021
|
}, o2 = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", l2 = "[a-fA-F\\d]{1,4}", r2 = ("\n(?:\n(?:" + l2 + ":){7}(?:" + l2 + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + l2 + ":){6}(?:" + o2 + "|:" + l2 + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + l2 + ":){5}(?::" + o2 + "|(?::" + l2 + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + l2 + ":){4}(?:(?::" + l2 + "){0,1}:" + o2 + "|(?::" + l2 + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + l2 + ":){3}(?:(?::" + l2 + "){0,2}:" + o2 + "|(?::" + l2 + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + l2 + ":){2}(?:(?::" + l2 + "){0,3}:" + o2 + "|(?::" + l2 + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + l2 + ":){1}(?:(?::" + l2 + "){0,4}:" + o2 + "|(?::" + l2 + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + l2 + "){0,5}:" + o2 + "|(?::" + l2 + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), n2 = new RegExp("(?:^" + o2 + "$)|(?:^" + r2 + "$)"), i2 = new RegExp("^" + o2 + "$"), a2 = new RegExp("^" + r2 + "$"), s2 = function(e4) {
|
|
@@ -3023,96 +3027,96 @@
|
|
|
3023
3027
|
return e4 && e4.exact ? a2 : new RegExp("" + t2(e4) + r2 + t2(e4), "g");
|
|
3024
3028
|
};
|
|
3025
3029
|
var d2 = s2.v4().source, c2 = s2.v6().source;
|
|
3026
|
-
return
|
|
3030
|
+
return Ur = new RegExp("(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|" + d2 + "|" + c2 + '|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)', "i");
|
|
3027
3031
|
}());
|
|
3028
3032
|
}, hex: function(e2) {
|
|
3029
|
-
return "string" == typeof e2 && !!e2.match(
|
|
3030
|
-
} },
|
|
3031
|
-
(/^\s+$/.test(t2) || "" === t2) && l2.push(
|
|
3033
|
+
return "string" == typeof e2 && !!e2.match(jr);
|
|
3034
|
+
} }, Wr = "enum", Jr = { required: Lr, whitespace: function(e2, t2, o2, l2, r2) {
|
|
3035
|
+
(/^\s+$/.test(t2) || "" === t2) && l2.push(Pr(r2.messages.whitespace, e2.fullField));
|
|
3032
3036
|
}, type: function(e2, t2, o2, l2, r2) {
|
|
3033
3037
|
if (e2.required && void 0 === t2)
|
|
3034
|
-
|
|
3038
|
+
Lr(e2, t2, o2, l2, r2);
|
|
3035
3039
|
else {
|
|
3036
3040
|
var n2 = e2.type;
|
|
3037
|
-
["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(n2) > -1 ?
|
|
3041
|
+
["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"].indexOf(n2) > -1 ? zr[n2](t2) || l2.push(Pr(r2.messages.types[n2], e2.fullField, e2.type)) : n2 && typeof t2 !== e2.type && l2.push(Pr(r2.messages.types[n2], e2.fullField, e2.type));
|
|
3038
3042
|
}
|
|
3039
3043
|
}, range: function(e2, t2, o2, l2, r2) {
|
|
3040
3044
|
var n2 = "number" == typeof e2.len, i2 = "number" == typeof e2.min, a2 = "number" == typeof e2.max, s2 = t2, d2 = null, c2 = "number" == typeof t2, m2 = "string" == typeof t2, u2 = Array.isArray(t2);
|
|
3041
3045
|
if (c2 ? d2 = "number" : m2 ? d2 = "string" : u2 && (d2 = "array"), !d2)
|
|
3042
3046
|
return false;
|
|
3043
|
-
u2 && (s2 = t2.length), m2 && (s2 = t2.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length), n2 ? s2 !== e2.len && l2.push(
|
|
3047
|
+
u2 && (s2 = t2.length), m2 && (s2 = t2.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length), n2 ? s2 !== e2.len && l2.push(Pr(r2.messages[d2].len, e2.fullField, e2.len)) : i2 && !a2 && s2 < e2.min ? l2.push(Pr(r2.messages[d2].min, e2.fullField, e2.min)) : a2 && !i2 && s2 > e2.max ? l2.push(Pr(r2.messages[d2].max, e2.fullField, e2.max)) : i2 && a2 && (s2 < e2.min || s2 > e2.max) && l2.push(Pr(r2.messages[d2].range, e2.fullField, e2.min, e2.max));
|
|
3044
3048
|
}, enum: function(e2, t2, o2, l2, r2) {
|
|
3045
|
-
e2[
|
|
3049
|
+
e2[Wr] = Array.isArray(e2[Wr]) ? e2[Wr] : [], -1 === e2[Wr].indexOf(t2) && l2.push(Pr(r2.messages[Wr], e2.fullField, e2[Wr].join(", ")));
|
|
3046
3050
|
}, pattern: function(e2, t2, o2, l2, r2) {
|
|
3047
3051
|
if (e2.pattern) {
|
|
3048
3052
|
if (e2.pattern instanceof RegExp)
|
|
3049
|
-
e2.pattern.lastIndex = 0, e2.pattern.test(t2) || l2.push(
|
|
3053
|
+
e2.pattern.lastIndex = 0, e2.pattern.test(t2) || l2.push(Pr(r2.messages.pattern.mismatch, e2.fullField, t2, e2.pattern));
|
|
3050
3054
|
else if ("string" == typeof e2.pattern) {
|
|
3051
|
-
new RegExp(e2.pattern).test(t2) || l2.push(
|
|
3055
|
+
new RegExp(e2.pattern).test(t2) || l2.push(Pr(r2.messages.pattern.mismatch, e2.fullField, t2, e2.pattern));
|
|
3052
3056
|
}
|
|
3053
3057
|
}
|
|
3054
|
-
} },
|
|
3058
|
+
} }, qr = function(e2, t2, o2, l2, r2) {
|
|
3055
3059
|
var n2 = e2.type, i2 = [];
|
|
3056
3060
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3057
|
-
if (
|
|
3061
|
+
if (Br(t2, n2) && !e2.required)
|
|
3058
3062
|
return o2();
|
|
3059
|
-
|
|
3063
|
+
Jr.required(e2, t2, l2, i2, r2, n2), Br(t2, n2) || Jr.type(e2, t2, l2, i2, r2);
|
|
3060
3064
|
}
|
|
3061
3065
|
o2(i2);
|
|
3062
|
-
},
|
|
3066
|
+
}, Gr = { string: function(e2, t2, o2, l2, r2) {
|
|
3063
3067
|
var n2 = [];
|
|
3064
3068
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3065
|
-
if (
|
|
3069
|
+
if (Br(t2, "string") && !e2.required)
|
|
3066
3070
|
return o2();
|
|
3067
|
-
|
|
3071
|
+
Jr.required(e2, t2, l2, n2, r2, "string"), Br(t2, "string") || (Jr.type(e2, t2, l2, n2, r2), Jr.range(e2, t2, l2, n2, r2), Jr.pattern(e2, t2, l2, n2, r2), true === e2.whitespace && Jr.whitespace(e2, t2, l2, n2, r2));
|
|
3068
3072
|
}
|
|
3069
3073
|
o2(n2);
|
|
3070
3074
|
}, method: function(e2, t2, o2, l2, r2) {
|
|
3071
3075
|
var n2 = [];
|
|
3072
3076
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3073
|
-
if (
|
|
3077
|
+
if (Br(t2) && !e2.required)
|
|
3074
3078
|
return o2();
|
|
3075
|
-
|
|
3079
|
+
Jr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Jr.type(e2, t2, l2, n2, r2);
|
|
3076
3080
|
}
|
|
3077
3081
|
o2(n2);
|
|
3078
3082
|
}, number: function(e2, t2, o2, l2, r2) {
|
|
3079
3083
|
var n2 = [];
|
|
3080
3084
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3081
|
-
if ("" === t2 && (t2 = void 0),
|
|
3085
|
+
if ("" === t2 && (t2 = void 0), Br(t2) && !e2.required)
|
|
3082
3086
|
return o2();
|
|
3083
|
-
|
|
3087
|
+
Jr.required(e2, t2, l2, n2, r2), void 0 !== t2 && (Jr.type(e2, t2, l2, n2, r2), Jr.range(e2, t2, l2, n2, r2));
|
|
3084
3088
|
}
|
|
3085
3089
|
o2(n2);
|
|
3086
3090
|
}, boolean: function(e2, t2, o2, l2, r2) {
|
|
3087
3091
|
var n2 = [];
|
|
3088
3092
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3089
|
-
if (
|
|
3093
|
+
if (Br(t2) && !e2.required)
|
|
3090
3094
|
return o2();
|
|
3091
|
-
|
|
3095
|
+
Jr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Jr.type(e2, t2, l2, n2, r2);
|
|
3092
3096
|
}
|
|
3093
3097
|
o2(n2);
|
|
3094
3098
|
}, regexp: function(e2, t2, o2, l2, r2) {
|
|
3095
3099
|
var n2 = [];
|
|
3096
3100
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3097
|
-
if (
|
|
3101
|
+
if (Br(t2) && !e2.required)
|
|
3098
3102
|
return o2();
|
|
3099
|
-
|
|
3103
|
+
Jr.required(e2, t2, l2, n2, r2), Br(t2) || Jr.type(e2, t2, l2, n2, r2);
|
|
3100
3104
|
}
|
|
3101
3105
|
o2(n2);
|
|
3102
3106
|
}, integer: function(e2, t2, o2, l2, r2) {
|
|
3103
3107
|
var n2 = [];
|
|
3104
3108
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3105
|
-
if (
|
|
3109
|
+
if (Br(t2) && !e2.required)
|
|
3106
3110
|
return o2();
|
|
3107
|
-
|
|
3111
|
+
Jr.required(e2, t2, l2, n2, r2), void 0 !== t2 && (Jr.type(e2, t2, l2, n2, r2), Jr.range(e2, t2, l2, n2, r2));
|
|
3108
3112
|
}
|
|
3109
3113
|
o2(n2);
|
|
3110
3114
|
}, float: function(e2, t2, o2, l2, r2) {
|
|
3111
3115
|
var n2 = [];
|
|
3112
3116
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3113
|
-
if (
|
|
3117
|
+
if (Br(t2) && !e2.required)
|
|
3114
3118
|
return o2();
|
|
3115
|
-
|
|
3119
|
+
Jr.required(e2, t2, l2, n2, r2), void 0 !== t2 && (Jr.type(e2, t2, l2, n2, r2), Jr.range(e2, t2, l2, n2, r2));
|
|
3116
3120
|
}
|
|
3117
3121
|
o2(n2);
|
|
3118
3122
|
}, array: function(e2, t2, o2, l2, r2) {
|
|
@@ -3120,64 +3124,64 @@
|
|
|
3120
3124
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3121
3125
|
if (null == t2 && !e2.required)
|
|
3122
3126
|
return o2();
|
|
3123
|
-
|
|
3127
|
+
Jr.required(e2, t2, l2, n2, r2, "array"), null != t2 && (Jr.type(e2, t2, l2, n2, r2), Jr.range(e2, t2, l2, n2, r2));
|
|
3124
3128
|
}
|
|
3125
3129
|
o2(n2);
|
|
3126
3130
|
}, object: function(e2, t2, o2, l2, r2) {
|
|
3127
3131
|
var n2 = [];
|
|
3128
3132
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3129
|
-
if (
|
|
3133
|
+
if (Br(t2) && !e2.required)
|
|
3130
3134
|
return o2();
|
|
3131
|
-
|
|
3135
|
+
Jr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Jr.type(e2, t2, l2, n2, r2);
|
|
3132
3136
|
}
|
|
3133
3137
|
o2(n2);
|
|
3134
3138
|
}, enum: function(e2, t2, o2, l2, r2) {
|
|
3135
3139
|
var n2 = [];
|
|
3136
3140
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3137
|
-
if (
|
|
3141
|
+
if (Br(t2) && !e2.required)
|
|
3138
3142
|
return o2();
|
|
3139
|
-
|
|
3143
|
+
Jr.required(e2, t2, l2, n2, r2), void 0 !== t2 && Jr.enum(e2, t2, l2, n2, r2);
|
|
3140
3144
|
}
|
|
3141
3145
|
o2(n2);
|
|
3142
3146
|
}, pattern: function(e2, t2, o2, l2, r2) {
|
|
3143
3147
|
var n2 = [];
|
|
3144
3148
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3145
|
-
if (
|
|
3149
|
+
if (Br(t2, "string") && !e2.required)
|
|
3146
3150
|
return o2();
|
|
3147
|
-
|
|
3151
|
+
Jr.required(e2, t2, l2, n2, r2), Br(t2, "string") || Jr.pattern(e2, t2, l2, n2, r2);
|
|
3148
3152
|
}
|
|
3149
3153
|
o2(n2);
|
|
3150
3154
|
}, date: function(e2, t2, o2, l2, r2) {
|
|
3151
3155
|
var n2 = [];
|
|
3152
3156
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3153
|
-
if (
|
|
3157
|
+
if (Br(t2, "date") && !e2.required)
|
|
3154
3158
|
return o2();
|
|
3155
3159
|
var i2;
|
|
3156
|
-
if (
|
|
3157
|
-
i2 = t2 instanceof Date ? t2 : new Date(t2),
|
|
3160
|
+
if (Jr.required(e2, t2, l2, n2, r2), !Br(t2, "date"))
|
|
3161
|
+
i2 = t2 instanceof Date ? t2 : new Date(t2), Jr.type(e2, i2, l2, n2, r2), i2 && Jr.range(e2, i2.getTime(), l2, n2, r2);
|
|
3158
3162
|
}
|
|
3159
3163
|
o2(n2);
|
|
3160
|
-
}, url:
|
|
3164
|
+
}, url: qr, hex: qr, email: qr, required: function(e2, t2, o2, l2, r2) {
|
|
3161
3165
|
var n2 = [], i2 = Array.isArray(t2) ? "array" : typeof t2;
|
|
3162
|
-
|
|
3166
|
+
Jr.required(e2, t2, l2, n2, r2, i2), o2(n2);
|
|
3163
3167
|
}, any: function(e2, t2, o2, l2, r2) {
|
|
3164
3168
|
var n2 = [];
|
|
3165
3169
|
if (e2.required || !e2.required && l2.hasOwnProperty(e2.field)) {
|
|
3166
|
-
if (
|
|
3170
|
+
if (Br(t2) && !e2.required)
|
|
3167
3171
|
return o2();
|
|
3168
|
-
|
|
3172
|
+
Jr.required(e2, t2, l2, n2, r2);
|
|
3169
3173
|
}
|
|
3170
3174
|
o2(n2);
|
|
3171
3175
|
} };
|
|
3172
|
-
function
|
|
3176
|
+
function Kr() {
|
|
3173
3177
|
return { default: "Validation error on field %s", required: "%s is required", enum: "%s must be one of %s", whitespace: "%s cannot be empty", date: { format: "%s date %s is invalid for format %s", parse: "%s date could not be parsed, %s is invalid ", invalid: "%s date %s is invalid" }, types: { string: "%s is not a %s", method: "%s is not a %s (function)", array: "%s is not an %s", object: "%s is not an %s", number: "%s is not a %s", date: "%s is not a %s", boolean: "%s is not a %s", integer: "%s is not an %s", float: "%s is not a %s", regexp: "%s is not a valid %s", email: "%s is not a valid %s", url: "%s is not a valid %s", hex: "%s is not a valid %s" }, string: { len: "%s must be exactly %s characters", min: "%s must be at least %s characters", max: "%s cannot be longer than %s characters", range: "%s must be between %s and %s characters" }, number: { len: "%s must equal %s", min: "%s cannot be less than %s", max: "%s cannot be greater than %s", range: "%s must be between %s and %s" }, array: { len: "%s must be exactly %s in length", min: "%s cannot be less than %s in length", max: "%s cannot be greater than %s in length", range: "%s must be between %s and %s in length" }, pattern: { mismatch: "%s value %s does not match pattern %s" }, clone: function() {
|
|
3174
3178
|
var e2 = JSON.parse(JSON.stringify(this));
|
|
3175
3179
|
return e2.clone = this.clone, e2;
|
|
3176
3180
|
} };
|
|
3177
3181
|
}
|
|
3178
|
-
var
|
|
3182
|
+
var Xr = Kr(), Yr = function() {
|
|
3179
3183
|
function e2(e3) {
|
|
3180
|
-
this.rules = null, this._messages =
|
|
3184
|
+
this.rules = null, this._messages = Xr, this.define(e3);
|
|
3181
3185
|
}
|
|
3182
3186
|
var t2 = e2.prototype;
|
|
3183
3187
|
return t2.define = function(e3) {
|
|
@@ -3191,7 +3195,7 @@
|
|
|
3191
3195
|
t3.rules[o2] = Array.isArray(l2) ? l2 : [l2];
|
|
3192
3196
|
});
|
|
3193
3197
|
}, t2.messages = function(e3) {
|
|
3194
|
-
return e3 && (this._messages =
|
|
3198
|
+
return e3 && (this._messages = Ar(Kr(), e3)), this._messages;
|
|
3195
3199
|
}, t2.validate = function(t3, o2, l2) {
|
|
3196
3200
|
var r2 = this;
|
|
3197
3201
|
void 0 === o2 && (o2 = {}), void 0 === l2 && (l2 = function() {
|
|
@@ -3201,7 +3205,7 @@
|
|
|
3201
3205
|
return a2 && a2(null, n2), Promise.resolve(n2);
|
|
3202
3206
|
if (i2.messages) {
|
|
3203
3207
|
var s2 = this.messages();
|
|
3204
|
-
s2 ===
|
|
3208
|
+
s2 === Xr && (s2 = Kr()), Ar(s2, i2.messages), i2.messages = s2;
|
|
3205
3209
|
} else
|
|
3206
3210
|
i2.messages = this.messages();
|
|
3207
3211
|
var d2 = {};
|
|
@@ -3209,29 +3213,29 @@
|
|
|
3209
3213
|
var o3 = r2.rules[e3], l3 = n2[e3];
|
|
3210
3214
|
o3.forEach(function(o4) {
|
|
3211
3215
|
var i3 = o4;
|
|
3212
|
-
"function" == typeof i3.transform && (n2 === t3 && (n2 =
|
|
3216
|
+
"function" == typeof i3.transform && (n2 === t3 && (n2 = Nr({}, n2)), l3 = n2[e3] = i3.transform(l3)), (i3 = "function" == typeof i3 ? { validator: i3 } : Nr({}, i3)).validator = r2.getValidationMethod(i3), i3.validator && (i3.field = e3, i3.fullField = i3.fullField || e3, i3.type = r2.getType(i3), d2[e3] = d2[e3] || [], d2[e3].push({ rule: i3, value: l3, source: n2, field: e3 }));
|
|
3213
3217
|
});
|
|
3214
3218
|
});
|
|
3215
3219
|
var c2 = {};
|
|
3216
|
-
return
|
|
3220
|
+
return _r(d2, i2, function(t4, o3) {
|
|
3217
3221
|
var l3, r3 = t4.rule, a3 = !("object" !== r3.type && "array" !== r3.type || "object" != typeof r3.fields && "object" != typeof r3.defaultField);
|
|
3218
3222
|
function s3(e3, t5) {
|
|
3219
|
-
return
|
|
3223
|
+
return Nr({}, t5, { fullField: r3.fullField + "." + e3, fullFields: r3.fullFields ? [].concat(r3.fullFields, [e3]) : [e3] });
|
|
3220
3224
|
}
|
|
3221
3225
|
function d3(l4) {
|
|
3222
3226
|
void 0 === l4 && (l4 = []);
|
|
3223
3227
|
var d4 = Array.isArray(l4) ? l4 : [l4];
|
|
3224
3228
|
!i2.suppressWarning && d4.length && e2.warning("async-validator:", d4), d4.length && void 0 !== r3.message && (d4 = [].concat(r3.message));
|
|
3225
|
-
var m2 = d4.map(
|
|
3229
|
+
var m2 = d4.map(Rr(r3, n2));
|
|
3226
3230
|
if (i2.first && m2.length)
|
|
3227
3231
|
return c2[r3.field] = 1, o3(m2);
|
|
3228
3232
|
if (a3) {
|
|
3229
3233
|
if (r3.required && !t4.value)
|
|
3230
|
-
return void 0 !== r3.message ? m2 = [].concat(r3.message).map(
|
|
3234
|
+
return void 0 !== r3.message ? m2 = [].concat(r3.message).map(Rr(r3, n2)) : i2.error && (m2 = [i2.error(r3, Pr(i2.messages.required, r3.field))]), o3(m2);
|
|
3231
3235
|
var u2 = {};
|
|
3232
3236
|
r3.defaultField && Object.keys(t4.value).map(function(e3) {
|
|
3233
3237
|
u2[e3] = r3.defaultField;
|
|
3234
|
-
}), u2 =
|
|
3238
|
+
}), u2 = Nr({}, u2, t4.rule.fields);
|
|
3235
3239
|
var p2 = {};
|
|
3236
3240
|
Object.keys(u2).forEach(function(e3) {
|
|
3237
3241
|
var t5 = u2[e3], o4 = Array.isArray(t5) ? t5 : [t5];
|
|
@@ -3271,25 +3275,25 @@
|
|
|
3271
3275
|
}
|
|
3272
3276
|
for (var r3 = 0; r3 < e4.length; r3++)
|
|
3273
3277
|
l3(e4[r3]);
|
|
3274
|
-
t4.length ? (o3 =
|
|
3278
|
+
t4.length ? (o3 = $r(t4), a2(t4, o3)) : a2(null, n2);
|
|
3275
3279
|
}(e3);
|
|
3276
3280
|
}, n2);
|
|
3277
3281
|
}, t2.getType = function(e3) {
|
|
3278
|
-
if (void 0 === e3.type && e3.pattern instanceof RegExp && (e3.type = "pattern"), "function" != typeof e3.validator && e3.type && !
|
|
3279
|
-
throw new Error(
|
|
3282
|
+
if (void 0 === e3.type && e3.pattern instanceof RegExp && (e3.type = "pattern"), "function" != typeof e3.validator && e3.type && !Gr.hasOwnProperty(e3.type))
|
|
3283
|
+
throw new Error(Pr("Unknown rule type %s", e3.type));
|
|
3280
3284
|
return e3.type || "string";
|
|
3281
3285
|
}, t2.getValidationMethod = function(e3) {
|
|
3282
3286
|
if ("function" == typeof e3.validator)
|
|
3283
3287
|
return e3.validator;
|
|
3284
3288
|
var t3 = Object.keys(e3), o2 = t3.indexOf("message");
|
|
3285
|
-
return -1 !== o2 && t3.splice(o2, 1), 1 === t3.length && "required" === t3[0] ?
|
|
3289
|
+
return -1 !== o2 && t3.splice(o2, 1), 1 === t3.length && "required" === t3[0] ? Gr.required : Gr[this.getType(e3)] || void 0;
|
|
3286
3290
|
}, e2;
|
|
3287
3291
|
}();
|
|
3288
|
-
function
|
|
3292
|
+
function Qr(e2, t2) {
|
|
3289
3293
|
const o2 = {}, l2 = e2.dataType;
|
|
3290
|
-
return "DATE" === l2 || "TIME" === l2 ? (o2.type = "date",
|
|
3294
|
+
return "DATE" === l2 || "TIME" === l2 ? (o2.type = "date", Zr(o2), o2.message = e2.label + " " + h().t("workflowEditorMessage.requiredAndMustBeADate")) : "INTEGER" === l2 || "LONG" === l2 ? (o2.pattern = /^-?\d+$/, o2.message = e2.label + " " + h().t("workflowEditorMessage.requiredAndMustBeAnInteger")) : "FLOAT" === l2 || "DOUBLE" === l2 ? (o2.pattern = new RegExp("^(-?\\d+)(\\.\\d+)?$"), o2.message = e2.label + " " + h().t("workflowEditorMessage.requiredAndMustBeDecimal")) : "BOOLEAN" === l2 ? (o2.type = "boolean", o2.message = e2.label + " " + h().t("workflowEditorMessage.mustFill"), Zr(o2)) : o2.message = e2.label + " " + h().t("workflowEditorMessage.mustFill"), e2.canEdit && (o2.required = true, o2.trigger = "blur"), e2.rowIndexes && (o2.rowIndexes = e2.rowIndexes), e2.condition && (o2.condition = e2.condition), t2[e2.name] = e2.dataType, o2;
|
|
3291
3295
|
}
|
|
3292
|
-
function
|
|
3296
|
+
function Zr(e2) {
|
|
3293
3297
|
e2 && e2.type && "boolean" === e2.type ? e2.validator = function(e3, t2, o2) {
|
|
3294
3298
|
return null == t2 ? !e3.required : "number" == typeof t2 && (1 === t2 || 0 === t2) || "boolean" == typeof t2 && (true === t2 || false === t2);
|
|
3295
3299
|
} : e2 && e2.type && "date" === e2.type && (e2.validator = function(e3, t2, o2) {
|
|
@@ -3301,7 +3305,7 @@
|
|
|
3301
3305
|
}
|
|
3302
3306
|
});
|
|
3303
3307
|
}
|
|
3304
|
-
function
|
|
3308
|
+
function en(e2, t2, o2) {
|
|
3305
3309
|
let l2;
|
|
3306
3310
|
for (let r2 = 0; r2 < t2.length; r2++) {
|
|
3307
3311
|
const n2 = t2[r2];
|
|
@@ -3310,7 +3314,7 @@
|
|
|
3310
3314
|
}
|
|
3311
3315
|
return l2;
|
|
3312
3316
|
}
|
|
3313
|
-
function
|
|
3317
|
+
function tn(e2, t2, o2) {
|
|
3314
3318
|
let l2;
|
|
3315
3319
|
for (let r2 = 0; r2 < t2.length; r2++)
|
|
3316
3320
|
if (l2 = 0 === r2 ? e2[t2[r2]] : l2.fields[t2[r2]], r2 !== t2.length - 1) {
|
|
@@ -3319,7 +3323,7 @@
|
|
|
3319
3323
|
}
|
|
3320
3324
|
return l2;
|
|
3321
3325
|
}
|
|
3322
|
-
function
|
|
3326
|
+
function on(e2, t2, o2, l2, r2) {
|
|
3323
3327
|
let n2 = e2.name;
|
|
3324
3328
|
const i2 = n2.substring(0, n2.indexOf("."));
|
|
3325
3329
|
if (o2) {
|
|
@@ -3347,22 +3351,22 @@
|
|
|
3347
3351
|
const n4 = i3[o4];
|
|
3348
3352
|
let a2;
|
|
3349
3353
|
if (o4 === i3.length - 1)
|
|
3350
|
-
a2 =
|
|
3354
|
+
a2 = tn(r3, i3, n4), a2.fields[n4] = Qr(e3, l4);
|
|
3351
3355
|
else {
|
|
3352
3356
|
let e4;
|
|
3353
|
-
0 === o4 ? a2 = t3 : (e4 =
|
|
3357
|
+
0 === o4 ? a2 = t3 : (e4 = en(r3, i3, i3[o4 - 1]), a2 = e4.fields), a2[n4] || (a2[n4] = { type: "object", required: true, fields: {} }), 0 === o4 ? r3[n4] = a2[n4] : e4.fields[n4] = a2[n4];
|
|
3354
3358
|
}
|
|
3355
3359
|
}
|
|
3356
3360
|
}(e2, t2, 0, r2);
|
|
3357
3361
|
}
|
|
3358
3362
|
}
|
|
3359
|
-
function
|
|
3360
|
-
return
|
|
3363
|
+
function ln(e2, t2, o2, l2, r2, n2, i2) {
|
|
3364
|
+
return rn(e2, t2, o2, true, l2, r2, n2, i2);
|
|
3361
3365
|
}
|
|
3362
|
-
function
|
|
3366
|
+
function rn(e2, t2, o2, l2, r2, n2, i2, a2) {
|
|
3363
3367
|
let s2 = false;
|
|
3364
3368
|
let d2;
|
|
3365
|
-
if (new
|
|
3369
|
+
if (new Yr(t2).validate(e2, { first: true }, (a3, c2) => {
|
|
3366
3370
|
if (a3) {
|
|
3367
3371
|
const e3 = a3[0].message;
|
|
3368
3372
|
d2 = a3[0].field, s2 = null != o2 ? void 0 !== n2 && void 0 !== i2 ? h().t("workflowEditorMessage.pageRecordLine", { pageNum: n2, row: i2 }) + "," + e3 : h().t("workflowEditorMessage.recordLine", { row: o2 + 1 }) + "," + e3 : e3;
|
|
@@ -3371,7 +3375,7 @@
|
|
|
3371
3375
|
if (d2 && true === l2) {
|
|
3372
3376
|
if (void 0 !== r2 && true === r2 && /[A-Z]+/.test(d2) && void 0 !== e2[d2.toLowerCase()]) {
|
|
3373
3377
|
const l3 = JSON.parse(JSON.stringify(e2));
|
|
3374
|
-
l3[d2.toUpperCase()] = e2[d2.toLowerCase()], delete l3[d2.toLowerCase()], s2 =
|
|
3378
|
+
l3[d2.toUpperCase()] = e2[d2.toLowerCase()], delete l3[d2.toLowerCase()], s2 = rn(l3, t2, o2, false, r2, n2, i2);
|
|
3375
3379
|
}
|
|
3376
3380
|
}
|
|
3377
3381
|
}), a2) {
|
|
@@ -3380,7 +3384,7 @@
|
|
|
3380
3384
|
}
|
|
3381
3385
|
return s2;
|
|
3382
3386
|
}
|
|
3383
|
-
function
|
|
3387
|
+
function nn(e2, t2, l2, r2, n2, i2, a2, s2, d2) {
|
|
3384
3388
|
const c2 = function(e3) {
|
|
3385
3389
|
return e3 && e3.id ? e3.id : e3 && e3.ID ? e3.ID : void 0;
|
|
3386
3390
|
}(l2), m2 = {};
|
|
@@ -3399,20 +3403,20 @@
|
|
|
3399
3403
|
}
|
|
3400
3404
|
return m2;
|
|
3401
3405
|
}
|
|
3402
|
-
function
|
|
3406
|
+
function an(e2, t2, o2) {
|
|
3403
3407
|
let l2 = t2[o2];
|
|
3404
3408
|
return l2 || (l2 = []), 0 !== l2.length || !e2 || !e2[o2] || void 0 === e2[o2].required || true !== e2[o2].required || e2[o2].message;
|
|
3405
3409
|
}
|
|
3406
|
-
|
|
3410
|
+
Yr.register = function(e2, t2) {
|
|
3407
3411
|
if ("function" != typeof t2)
|
|
3408
3412
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
3409
|
-
|
|
3410
|
-
},
|
|
3411
|
-
const
|
|
3413
|
+
Gr[e2] = t2;
|
|
3414
|
+
}, Yr.warning = Fr, Yr.messages = Xr, Yr.validators = Gr;
|
|
3415
|
+
const sn = function(e2, t2, o2, l2, r2, n2, i2, a2) {
|
|
3412
3416
|
const s2 = Object.keys(t2);
|
|
3413
3417
|
if (s2.indexOf("rules") >= 0 && s2.indexOf("subRules") >= 0 && s2.indexOf("totalSubRules") >= 0) {
|
|
3414
3418
|
const s3 = t2.rules, d2 = t2.subRules, c2 = t2.totalSubRules, m2 = t2.dataTypeMap;
|
|
3415
|
-
let u2 =
|
|
3419
|
+
let u2 = ln(e2, s3, null, o2, null, null, a2);
|
|
3416
3420
|
return (!a2 && true === u2 || a2 && true === u2.msg) && (d2 || c2) && (u2 = function(e3, t3, o3, l3, r3, n3, i3, a3, s4, d3) {
|
|
3417
3421
|
let c3 = {};
|
|
3418
3422
|
if (o3 && (c3 = JSON.parse(JSON.stringify(o3))), t3) {
|
|
@@ -3421,13 +3425,13 @@
|
|
|
3421
3425
|
const u3 = o4[m3], p2 = t3[u3], h2 = Object.keys(p2);
|
|
3422
3426
|
let f2 = e3[u3];
|
|
3423
3427
|
f2 || (f2 = []);
|
|
3424
|
-
const w2 =
|
|
3428
|
+
const w2 = an(c3, e3, u3);
|
|
3425
3429
|
if (true !== w2)
|
|
3426
3430
|
return delete c3[u3], d3 ? { msg: w2, listCode: u3 } : w2;
|
|
3427
3431
|
let g2, C2 = [];
|
|
3428
3432
|
s4 && s4[u3] && (g2 = s4[u3].pageSize, C2 = s4[u3].fields || []);
|
|
3429
3433
|
for (let t4 = 0; t4 < f2.length; t4++) {
|
|
3430
|
-
const o5 = f2[t4], s5 =
|
|
3434
|
+
const o5 = f2[t4], s5 = nn(h2, p2, f2[t4], r3, e3, n3, i3, a3, C2);
|
|
3431
3435
|
let c4, m4;
|
|
3432
3436
|
void 0 !== g2 && g2 > 0 && (c4 = Math.ceil((t4 + 1) / g2), m4 = t4 + 1 - (c4 - 1) * g2), Object.keys(s5).forEach((l4) => {
|
|
3433
3437
|
const r4 = s5[l4];
|
|
@@ -3436,22 +3440,22 @@
|
|
|
3436
3440
|
"function" == typeof n4 && false === n4({ row: o5, parent: e3, rowIndex: t4 }) && (s5[l4] = []);
|
|
3437
3441
|
}
|
|
3438
3442
|
});
|
|
3439
|
-
const w3 =
|
|
3443
|
+
const w3 = ln(o5, s5, t4, l3, c4, m4, d3);
|
|
3440
3444
|
if (!d3 && true !== w3 || d3 && true !== w3.msg)
|
|
3441
3445
|
return d3 && (w3.listCode = u3), w3;
|
|
3442
3446
|
}
|
|
3443
3447
|
}
|
|
3444
3448
|
}
|
|
3445
3449
|
for (const t4 in c3) {
|
|
3446
|
-
const o4 =
|
|
3450
|
+
const o4 = an(c3, e3, t4);
|
|
3447
3451
|
if (true !== o4)
|
|
3448
3452
|
return d3 ? { msg: o4, listCode: t4 } : o4;
|
|
3449
3453
|
}
|
|
3450
3454
|
return !d3 || { msg: true };
|
|
3451
3455
|
}(e2, d2, c2, o2, m2, l2, r2, n2, i2, a2)), u2;
|
|
3452
3456
|
}
|
|
3453
|
-
return
|
|
3454
|
-
},
|
|
3457
|
+
return ln(e2, t2, null, o2, null, null, a2);
|
|
3458
|
+
}, dn = function(e2, t2, l2, r2, n2, i2) {
|
|
3455
3459
|
void 0 === l2 && (l2 = false);
|
|
3456
3460
|
const a2 = {}, s2 = {}, d2 = {}, c2 = {};
|
|
3457
3461
|
return e2 && e2.forEach((e3) => {
|
|
@@ -3475,26 +3479,26 @@
|
|
|
3475
3479
|
if (d3.name = s3, s3.indexOf(".") > 0) {
|
|
3476
3480
|
if (void 0 !== a3 && null === a3 && 0 === a3.length) {
|
|
3477
3481
|
const e5 = a3[0];
|
|
3478
|
-
|
|
3482
|
+
on(d3, t3[i3], e5, l3, r3);
|
|
3479
3483
|
}
|
|
3480
3484
|
} else
|
|
3481
|
-
t3[i3][s3] =
|
|
3482
|
-
}(e3, c2, t2, l2, s2) :
|
|
3485
|
+
t3[i3][s3] = Qr(d3, r3);
|
|
3486
|
+
}(e3, c2, t2, l2, s2) : on(e3, a2, t2, l2, s2);
|
|
3483
3487
|
else if (0 === m3.indexOf("$")) {
|
|
3484
3488
|
const t3 = m3.substring(m3.indexOf("$") + 1);
|
|
3485
3489
|
d2[t3] = { required: true, message: h().t("workflowEditorMessage.subTableMustInputDatas", { subTable: e3.label }) };
|
|
3486
3490
|
} else
|
|
3487
|
-
o2 =
|
|
3491
|
+
o2 = Qr(e3, s2), a2[m3] = o2;
|
|
3488
3492
|
}
|
|
3489
3493
|
}
|
|
3490
3494
|
}
|
|
3491
3495
|
}), Object.keys(c2).length > 0 || Object.keys(d2).length > 0 ? { rules: a2, subRules: c2, totalSubRules: d2, dataTypeMap: s2 } : a2;
|
|
3492
|
-
},
|
|
3493
|
-
e2.config.globalProperties.$formValidator =
|
|
3494
|
-
} },
|
|
3495
|
-
|
|
3496
|
+
}, cn = { install: function(e2, t2) {
|
|
3497
|
+
e2.config.globalProperties.$formValidator = sn, e2.config.globalProperties.$getValidator = dn;
|
|
3498
|
+
} }, mn = Tr.WorkflowEditor, un = Tr.WorkflowHistory, pn = Tr.wfEditorStore, hn = [mn, un], fn = function(e2) {
|
|
3499
|
+
fn.installed || (hn.forEach((t2) => {
|
|
3496
3500
|
e2.component(t2.name, t2);
|
|
3497
|
-
}), e2.use(
|
|
3501
|
+
}), e2.use(cn));
|
|
3498
3502
|
};
|
|
3499
|
-
e.WorkflowEditor =
|
|
3503
|
+
e.WorkflowEditor = mn, e.WorkflowHistory = un, e.wfEditorCn = d, e.wfEditorEn = s, e.wfEditorInstall = fn, e.wfEditorStore = pn, Object.defineProperty(e, Symbol.toStringTag, { value: "Module" });
|
|
3500
3504
|
});
|