@vunk/form 2.18.2 → 2.19.1
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/components/_plugin-vue_export-helper.cjs +1 -11
- package/components/api-tables-select/index.cjs +1 -467
- package/components/api-tables-select/index.mjs +56 -413
- package/components/api-tables-select/src/ctx.d.ts +147 -173
- package/components/api-tables-select/src/index.vue.d.ts +390 -983
- package/components/button/index.cjs +1 -112
- package/components/button/index.mjs +56 -85
- package/components/button/src/ctx.d.ts +28 -113
- package/components/button/src/index.vue.d.ts +314 -621
- package/components/card-input-collection/index.cjs +1 -370
- package/components/card-input-collection/index.mjs +175 -277
- package/components/card-input-collection/src/core.vue.d.ts +57 -950
- package/components/card-input-collection/src/ctx.d.ts +19 -49
- package/components/card-input-collection/src/index.vue.d.ts +49 -112
- package/components/cascader/index.cjs +1 -150
- package/components/cascader/index.mjs +88 -116
- package/components/cascader/src/ctx.d.ts +148 -207
- package/components/cascader/src/index.vue.d.ts +335 -525
- package/components/cascader/src/use.d.ts +1 -1
- package/components/checkbox/index.cjs +1 -152
- package/components/checkbox/index.mjs +75 -119
- package/components/checkbox/src/ctx.d.ts +46 -69
- package/components/checkbox/src/index.vue.d.ts +445 -1012
- package/components/cloneDeep.cjs +1 -2106
- package/components/color-picker/index.cjs +1 -80
- package/components/color-picker/index.mjs +46 -69
- package/components/color-picker/src/ctx.d.ts +138 -107
- package/components/color-picker/src/index.vue.d.ts +305 -255
- package/components/date-picker/index.cjs +1 -119
- package/components/date-picker/index.mjs +63 -97
- package/components/date-picker/src/ctx.d.ts +131 -206
- package/components/date-picker/src/index.vue.d.ts +287 -1359
- package/components/date-picker/src/types.d.ts +7 -7
- package/components/date-picker-range/index.cjs +1 -177
- package/components/date-picker-range/index.mjs +62 -113
- package/components/date-picker-range/src/ctx.d.ts +139 -207
- package/components/date-picker-range/src/index.vue.d.ts +896 -450
- package/components/debounce.cjs +1 -0
- package/components/dialog/index.cjs +1 -126
- package/components/dialog/index.mjs +65 -99
- package/components/dialog/src/ctx.d.ts +17 -108
- package/components/dialog/src/index.vue.d.ts +77 -1070
- package/components/dialog-input-collection/index.cjs +1 -624
- package/components/dialog-input-collection/index.mjs +276 -498
- package/components/dialog-input-collection/src/ctx.d.ts +20 -50
- package/components/dialog-input-collection/src/dialog-form.vue.d.ts +28 -6366
- package/components/dialog-input-collection/src/index.vue.d.ts +66 -7629
- package/components/dialog-input-collection/src/layout.vue.d.ts +16 -72
- package/components/download-plus/index.cjs +1 -456
- package/components/download-plus/index.mjs +214 -358
- package/components/download-plus/src/ctx.d.ts +20 -50
- package/components/download-plus/src/index.vue.d.ts +434 -1171
- package/components/editable-text/index.cjs +1 -295
- package/components/editable-text/index.mjs +113 -239
- package/components/editable-text/src/ctx.d.ts +20 -50
- package/components/editable-text/src/index.vue.d.ts +62 -3257
- package/components/el-slider/index.cjs +1 -0
- package/components/el-slider/index.d.ts +5 -0
- package/components/el-slider/index.mjs +475 -0
- package/components/el-slider/src/button.d.ts +36 -0
- package/components/el-slider/src/button.vue.d.ts +42 -0
- package/components/el-slider/src/composables/index.cjs +1 -0
- package/components/el-slider/src/composables/index.d.ts +6 -0
- package/components/el-slider/src/composables/index.mjs +9 -0
- package/components/el-slider/src/composables/use-lifecycle.d.ts +4 -0
- package/components/el-slider/src/composables/use-marks.d.ts +7 -0
- package/components/el-slider/src/composables/use-slide.d.ts +23 -0
- package/components/el-slider/src/composables/use-slider-button.d.ts +18 -0
- package/components/el-slider/src/composables/use-stops.d.ts +8 -0
- package/components/el-slider/src/composables/use-watch.d.ts +4 -0
- package/components/el-slider/src/constants.d.ts +14 -0
- package/components/el-slider/src/marker.d.ts +37 -0
- package/components/el-slider/src/slider-core.vue.d.ts +219 -0
- package/components/el-slider/src/slider.d.ts +175 -0
- package/components/esri-input-geojson/index.cjs +2 -1604
- package/components/esri-input-geojson/index.mjs +666 -1289
- package/components/esri-input-geojson/src/append.vue.d.ts +225 -1084
- package/components/esri-input-geojson/src/const.d.ts +1 -1
- package/components/esri-input-geojson/src/ctx.d.ts +62 -158
- package/components/esri-input-geojson/src/default-view.vue.d.ts +12 -132
- package/components/esri-input-geojson/src/index.vue.d.ts +1470 -789
- package/components/esri-input-geojson/src/viewer.vue.d.ts +424 -287
- package/components/fieldset/index.cjs +1 -110
- package/components/fieldset/index.mjs +62 -77
- package/components/fieldset/src/ctx.d.ts +4 -4
- package/components/fieldset/src/index.vue.d.ts +10 -9
- package/components/form/index.cjs +1 -248
- package/components/form/index.mjs +107 -161
- package/components/form/src/ctx.d.ts +15 -64
- package/components/form/src/index.vue.d.ts +360 -2416
- package/components/form-item/index.cjs +1 -294
- package/components/form-item/index.mjs +139 -229
- package/components/form-item/src/core.vue.d.ts +33 -1853
- package/components/form-item/src/ctx.d.ts +17 -47
- package/components/form-item/src/index.vue.d.ts +41 -103
- package/components/form-item-renderer/index.cjs +1 -193
- package/components/form-item-renderer/index.mjs +102 -162
- package/components/form-item-renderer/src/core.vue.d.ts +12 -11
- package/components/form-item-renderer/src/ctx.d.ts +3 -3
- package/components/form-item-renderer/src/index.vue.d.ts +25 -73
- package/components/form-item-renderer-template/index.cjs +1 -47
- package/components/form-item-renderer-template/index.mjs +19 -33
- package/components/form-item-renderer-template/src/index.vue.d.ts +4 -3
- package/components/forms-provider/index.cjs +1 -99
- package/components/forms-provider/index.mjs +44 -73
- package/components/forms-provider/src/core.d.ts +3 -2
- package/components/forms-provider/src/index.vue.d.ts +5 -2
- package/components/forms-provider/src/segment.vue.d.ts +12 -8
- package/components/forms-provider/src/view.vue.d.ts +17 -3
- package/components/index.cjs +1 -399
- package/components/index2.cjs +1 -17
- package/components/information/index.cjs +1 -65
- package/components/information/index.mjs +28 -38
- package/components/information/src/ctx.d.ts +2 -2
- package/components/information/src/index.vue.d.ts +7 -6
- package/components/information-collection/index.cjs +1 -81
- package/components/information-collection/index.mjs +44 -48
- package/components/information-collection/src/ctx.d.ts +20 -50
- package/components/information-collection/src/index.vue.d.ts +49 -112
- package/components/information-renderer/index.cjs +1 -16
- package/components/information-renderer/index.mjs +9 -10
- package/components/information-tag/index.cjs +1 -101
- package/components/information-tag/index.mjs +44 -54
- package/components/information-tag/src/ctx.d.ts +5 -19
- package/components/information-tag/src/index.vue.d.ts +24 -51
- package/components/information-templates-default/index.cjs +1 -101
- package/components/information-templates-default/index.mjs +63 -73
- package/components/information-templates-default/src/index.vue.d.ts +2 -1
- package/components/input/index.cjs +1 -115
- package/components/input/index.mjs +60 -83
- package/components/input/src/ctx.d.ts +50 -151
- package/components/input/src/index.vue.d.ts +389 -947
- package/components/input-array/index.cjs +1 -310
- package/components/input-array/index.mjs +114 -244
- package/components/input-array/src/ctx.d.ts +19 -49
- package/components/input-array/src/form-template.vue.d.ts +2 -901
- package/components/input-array/src/index.vue.d.ts +45 -731
- package/components/input-collection/index.cjs +1 -452
- package/components/input-collection/index.mjs +195 -355
- package/components/input-collection/src/core.vue.d.ts +59 -1019
- package/components/input-collection/src/ctx.d.ts +19 -49
- package/components/input-collection/src/index.vue.d.ts +47 -110
- package/components/input-file/index.cjs +1 -142
- package/components/input-file/index.mjs +68 -100
- package/components/input-file/src/ctx.d.ts +8 -29
- package/components/input-file/src/index.vue.d.ts +447 -76
- package/components/input-file/src/template.vue.d.ts +2 -124
- package/components/input-link/index.cjs +1 -167
- package/components/input-link/index.mjs +60 -83
- package/components/input-link/src/ctx.d.ts +48 -135
- package/components/input-link/src/index.vue.d.ts +835 -312
- package/components/input-number/index.cjs +1 -119
- package/components/input-number/index.mjs +73 -87
- package/components/input-number/src/ctx.d.ts +38 -131
- package/components/input-number/src/index.vue.d.ts +321 -682
- package/components/input-tag/index.cjs +1 -100
- package/components/input-tag/index.mjs +51 -78
- package/components/input-tag/src/ctx.d.ts +41 -143
- package/components/input-tag/src/index.vue.d.ts +322 -775
- package/components/isObject.cjs +1 -165
- package/components/monaco-editor/index.cjs +1 -83
- package/components/monaco-editor/index.mjs +40 -59
- package/components/monaco-editor/src/ctx.d.ts +19 -44
- package/components/monaco-editor/src/index.vue.d.ts +212 -111
- package/components/radio/index.cjs +1 -267
- package/components/radio/index.mjs +110 -209
- package/components/radio/src/ctx.d.ts +27 -91
- package/components/radio/src/index.vue.d.ts +299 -1279
- package/components/radio/src/option.vue.d.ts +28 -878
- package/components/radio/src/wraper.vue.d.ts +67 -198
- package/components/renderer-data/index.cjs +1 -41
- package/components/renderer-data/index.mjs +19 -26
- package/components/renderer-data/src/ctx.d.ts +1 -1
- package/components/renderer-data/src/index.vue.d.ts +5 -4
- package/components/select/index.cjs +1 -311
- package/components/select/index.mjs +156 -214
- package/components/select/src/core.vue.d.ts +446 -1028
- package/components/select/src/ctx.d.ts +60 -215
- package/components/select/src/index.vue.d.ts +318 -593
- package/components/select/src/options.vue.d.ts +4 -3
- package/components/slider/index.cjs +1 -88
- package/components/slider/index.mjs +41 -70
- package/components/slider/src/ctx.d.ts +63 -174
- package/components/slider/src/index.vue.d.ts +154 -419
- package/components/style.css +1 -0
- package/components/switch/index.cjs +1 -88
- package/components/switch/index.mjs +37 -69
- package/components/switch/src/ctx.d.ts +30 -109
- package/components/switch/src/index.vue.d.ts +90 -697
- package/components/switch/src/types.d.ts +2 -2
- package/components/tables-select/index.cjs +1 -263
- package/components/tables-select/index.mjs +101 -172
- package/components/tables-select/src/ctx.d.ts +68 -99
- package/components/tables-select/src/index.vue.d.ts +233 -4988
- package/components/template-instances-provider/index.cjs +1 -31
- package/components/template-instances-provider/index.mjs +18 -22
- package/components/template-instances-provider/src/index.vue.d.ts +5 -4
- package/components/templates-default/index.cjs +1 -235
- package/components/templates-default/index.mjs +152 -211
- package/components/templates-default/src/ctx.d.ts +2 -2
- package/components/templates-default/src/index.vue.d.ts +7337 -145
- package/components/templates-element-plus/index.cjs +1 -112
- package/components/templates-element-plus/index.mjs +49 -91
- package/components/templates-element-plus/src/ctx.d.ts +1 -1
- package/components/templates-element-plus/src/index.vue.d.ts +59 -251
- package/components/templates-esri/index.cjs +1 -65
- package/components/templates-esri/index.mjs +29 -39
- package/components/templates-esri/src/ctx.d.ts +1 -1
- package/components/templates-esri/src/index.vue.d.ts +2184 -25
- package/components/templates-layout/index.cjs +1 -137
- package/components/templates-layout/index.mjs +78 -116
- package/components/templates-layout/src/ctx.d.ts +1 -1
- package/components/templates-layout/src/index.vue.d.ts +73 -404
- package/components/templates-variant/index.cjs +1 -70
- package/components/templates-variant/index.mjs +33 -43
- package/components/templates-variant/src/ctx.d.ts +1 -1
- package/components/templates-variant/src/index.vue.d.ts +1272 -25
- package/components/time-picker/index.cjs +1 -104
- package/components/time-picker/index.mjs +57 -87
- package/components/time-picker/src/ctx.d.ts +130 -212
- package/components/time-picker/src/index.vue.d.ts +283 -1371
- package/components/upload/index.cjs +1 -663
- package/components/upload/index.mjs +343 -537
- package/components/upload/src/ctx.d.ts +106 -191
- package/components/upload/src/file.vue.d.ts +168 -745
- package/components/upload/src/index.vue.d.ts +647 -1888
- package/components/upload/src/types.d.ts +1 -1
- package/components/upload/src/wraper.vue.d.ts +233 -407
- package/components/upload-plus/index.cjs +21 -18673
- package/components/upload-plus/index.mjs +4566 -18366
- package/components/upload-plus/src/api.d.ts +1 -1
- package/components/upload-plus/src/ctx.d.ts +21 -51
- package/components/upload-plus/src/index.vue.d.ts +53 -1657
- package/components/use-watch.cjs +1 -0
- package/components/van-cascader/index.cjs +1 -125
- package/components/van-cascader/index.mjs +51 -96
- package/components/van-cascader/src/ctx.d.ts +143 -203
- package/components/van-cascader/src/index.vue.d.ts +332 -988
- package/components/var-datetime-picker/index.cjs +1 -333
- package/components/var-datetime-picker/index.mjs +173 -254
- package/components/var-datetime-picker/src/ctx.d.ts +18 -48
- package/components/var-datetime-picker/src/index.vue.d.ts +628 -1090
- package/components/vditor/index.cjs +1 -86
- package/components/vditor/index.mjs +40 -66
- package/components/vditor/src/ctx.d.ts +15 -45
- package/components/vditor/src/index.vue.d.ts +195 -120
- package/composables/element-plus/index.cjs +1 -23
- package/composables/element-plus/index.mjs +14 -18
- package/composables/index.cjs +1 -161
- package/composables/index.d.ts +1 -0
- package/composables/index.mjs +100 -135
- package/composables/useForm.d.ts +2 -2
- package/composables/useRtl.d.ts +18 -0
- package/composables/useTemplateInstances.d.ts +3 -3
- package/index.css +1 -562
- package/index.d.ts +0 -3
- package/index.esm.js +23 -48
- package/locale/index.cjs +1 -102
- package/locale/index.mjs +34 -34
- package/locale/lang/index.cjs +1 -2
- package/locale/lang/index.d.ts +1 -0
- package/package.json +14 -85
- package/shared/const/index.cjs +1 -59
- package/shared/const/index.d.ts +1 -1
- package/shared/const/index.mjs +18 -20
- package/shared/element-plus/ctx.d.ts +40 -37
- package/shared/element-plus/index.cjs +1 -211
- package/shared/element-plus/index.mjs +93 -161
- package/shared/element-plus/instances.d.ts +224 -321
- package/shared/form/index.cjs +1 -33
- package/shared/form/index.mjs +23 -25
- package/shared/helper/index.cjs +1 -11
- package/shared/helper/index.mjs +7 -8
- package/shared/index.cjs +1 -8
- package/shared/index.mjs +5 -1
- package/shared/infer-prop/index.cjs +1 -36
- package/shared/infer-prop/index.mjs +22 -28
- package/shared/progress-it/index.cjs +1 -42
- package/shared/progress-it/index.mjs +15 -31
- package/shared/rules/index.cjs +1 -56
- package/shared/rules/index.mjs +19 -18
- package/shared/types/form/index.cjs +1 -2
- package/shared/types/index.cjs +1 -2
- package/shared/types/source/index.cjs +1 -2
- package/shared/types/source-manager/index.cjs +1 -2
- package/shared/upload/index.cjs +1 -774
- package/shared/upload/index.mjs +180 -764
- package/component.d.ts +0 -3
- package/components/_plugin-vue_export-helper.mjs +0 -9
- package/components/card-input-collection/index.css +0 -21
- package/components/cascader/index.css +0 -9
- package/components/checkbox/index.css +0 -30
- package/components/cloneDeep.mjs +0 -2104
- package/components/date-picker-range/index.css +0 -18
- package/components/dialog-input-collection/index.css +0 -21
- package/components/download-plus/index.css +0 -68
- package/components/editable-text/index.css +0 -9
- package/components/esri-input-geojson/index.css +0 -32
- package/components/fieldset/index.css +0 -5
- package/components/form-item/index.css +0 -35
- package/components/index.mjs +0 -378
- package/components/index2.mjs +0 -14
- package/components/information-tag/index.css +0 -6
- package/components/information-templates-default/index.css +0 -16
- package/components/input-array/index.css +0 -14
- package/components/input-collection/index.css +0 -20
- package/components/input-link/index.css +0 -4
- package/components/input-number/index.css +0 -13
- package/components/isObject.mjs +0 -158
- package/components/monaco-editor/index.css +0 -4
- package/components/radio/index.css +0 -40
- package/components/select/index.css +0 -15
- package/components/switch/index.css +0 -10
- package/components/tables-select/index.css +0 -3
- package/components/templates-layout/index.css +0 -3
- package/components/upload/index.css +0 -34
- package/components/upload-plus/index.css +0 -84
- package/components/van-cascader/index.css +0 -6
- package/components/var-datetime-picker/index.css +0 -17
- package/defaults.d.ts +0 -5
package/shared/form/index.cjs
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var elementPlus = require('element-plus');
|
|
4
|
-
|
|
5
|
-
const validateCatch = (err, init = {}) => {
|
|
6
|
-
let msg = "";
|
|
7
|
-
msg += init.prefix || "";
|
|
8
|
-
for (const key in err) {
|
|
9
|
-
err[key].forEach((v) => {
|
|
10
|
-
msg += v.message + ";";
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
msg += init.suffix || "";
|
|
14
|
-
elementPlus.ElMessage({
|
|
15
|
-
type: "warning",
|
|
16
|
-
message: msg
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
const genTemplateIfFunc = (templateIfRaw) => {
|
|
20
|
-
if (typeof templateIfRaw === "boolean") {
|
|
21
|
-
const flag = templateIfRaw;
|
|
22
|
-
return () => flag;
|
|
23
|
-
} else if (typeof templateIfRaw === "string") {
|
|
24
|
-
const templateIf = new Function("data", templateIfRaw);
|
|
25
|
-
return templateIf;
|
|
26
|
-
} else if (typeof templateIfRaw === "function") {
|
|
27
|
-
return templateIfRaw;
|
|
28
|
-
}
|
|
29
|
-
return () => true;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
exports.genTemplateIfFunc = genTemplateIfFunc;
|
|
33
|
-
exports.validateCatch = validateCatch;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("element-plus"),c=(e,n={})=>{let t="";t+=n.prefix||"";for(const s in e)e[s].forEach(o=>{t+=o.message+";"});t+=n.suffix||"",r.ElMessage({type:"warning",message:t})},u=e=>{if(typeof e=="boolean"){const n=e;return()=>n}else{if(typeof e=="string")return new Function("data",e);if(typeof e=="function")return e}return()=>!0};exports.genTemplateIfFunc=u;exports.validateCatch=c;
|
package/shared/form/index.mjs
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import { ElMessage } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
msg += v.message + ";";
|
|
1
|
+
import { ElMessage as r } from "element-plus";
|
|
2
|
+
const c = (e, n = {}) => {
|
|
3
|
+
let o = "";
|
|
4
|
+
o += n.prefix || "";
|
|
5
|
+
for (const t in e)
|
|
6
|
+
e[t].forEach((s) => {
|
|
7
|
+
o += s.message + ";";
|
|
9
8
|
});
|
|
10
|
-
|
|
11
|
-
msg += init.suffix || "";
|
|
12
|
-
ElMessage({
|
|
9
|
+
o += n.suffix || "", r({
|
|
13
10
|
type: "warning",
|
|
14
|
-
message:
|
|
11
|
+
message: o
|
|
15
12
|
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return templateIfRaw;
|
|
13
|
+
}, i = (e) => {
|
|
14
|
+
if (typeof e == "boolean") {
|
|
15
|
+
const n = e;
|
|
16
|
+
return () => n;
|
|
17
|
+
} else {
|
|
18
|
+
if (typeof e == "string")
|
|
19
|
+
return new Function("data", e);
|
|
20
|
+
if (typeof e == "function")
|
|
21
|
+
return e;
|
|
26
22
|
}
|
|
27
|
-
return () =>
|
|
23
|
+
return () => !0;
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
i as genTemplateIfFunc,
|
|
27
|
+
c as validateCatch
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
export { genTemplateIfFunc, validateCatch };
|
package/shared/helper/index.cjs
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const createDefaultSlots = (o) => {
|
|
4
|
-
return {
|
|
5
|
-
default: Array.isArray(o) ? o : [
|
|
6
|
-
o
|
|
7
|
-
]
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
exports.createDefaultSlots = createDefaultSlots;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>({default:Array.isArray(e)?e:[e]});exports.createDefaultSlots=t;
|
package/shared/helper/index.mjs
CHANGED
package/shared/index.cjs
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var index = require('./const/index.cjs');
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.CORE_FORM_TEMPLATE_OPTIONS = index.CORE_FORM_TEMPLATE_OPTIONS;
|
|
8
|
-
exports.CORE_FORM_TEMPLATE_REFLECT = index.CORE_FORM_TEMPLATE_REFLECT;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./const/index.cjs");exports.CORE_FORM_TEMPLATE_OPTIONS=E.CORE_FORM_TEMPLATE_OPTIONS;exports.CORE_FORM_TEMPLATE_REFLECT=E.CORE_FORM_TEMPLATE_REFLECT;
|
package/shared/index.mjs
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { CORE_FORM_TEMPLATE_OPTIONS as T, CORE_FORM_TEMPLATE_REFLECT as _ } from "./const/index.mjs";
|
|
2
|
+
export {
|
|
3
|
+
T as CORE_FORM_TEMPLATE_OPTIONS,
|
|
4
|
+
_ as CORE_FORM_TEMPLATE_REFLECT
|
|
5
|
+
};
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const inferString = (item) => ({
|
|
4
|
-
prop: item.prop,
|
|
5
|
-
type: "String"
|
|
6
|
-
});
|
|
7
|
-
const inferBoolean = (item) => ({
|
|
8
|
-
prop: item.prop,
|
|
9
|
-
type: "Boolean"
|
|
10
|
-
});
|
|
11
|
-
const inferNumber = (item) => {
|
|
12
|
-
const info = {
|
|
13
|
-
prop: item.prop,
|
|
14
|
-
type: "Number"
|
|
15
|
-
};
|
|
16
|
-
if (item.precision) {
|
|
17
|
-
info.precision = item.precision;
|
|
18
|
-
}
|
|
19
|
-
return info;
|
|
20
|
-
};
|
|
21
|
-
const inferDate = (item) => ({
|
|
22
|
-
prop: item.prop,
|
|
23
|
-
type: "Date"
|
|
24
|
-
});
|
|
25
|
-
const propInfoAction = {
|
|
26
|
-
VkfSelect: inferString,
|
|
27
|
-
VkfRadio: inferString,
|
|
28
|
-
VkfCheckbox: inferString,
|
|
29
|
-
VkfColorPicker: inferString,
|
|
30
|
-
VkfInputNumber: inferNumber,
|
|
31
|
-
VkfSwitch: inferBoolean,
|
|
32
|
-
VkfUpload: inferString,
|
|
33
|
-
VkfDatePicker: inferDate
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
exports.propInfoAction = propInfoAction;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=o=>({prop:o.prop,type:"String"}),p=o=>({prop:o.prop,type:"Boolean"}),n=o=>{const e={prop:o.prop,type:"Number"};return o.precision&&(e.precision=o.precision),e},t=o=>({prop:o.prop,type:"Date"}),i={VkfSelect:r,VkfRadio:r,VkfCheckbox:r,VkfColorPicker:r,VkfInputNumber:n,VkfSwitch:p,VkfUpload:r,VkfDatePicker:t};exports.propInfoAction=i;
|
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
const
|
|
2
|
-
prop:
|
|
1
|
+
const p = (o) => ({
|
|
2
|
+
prop: o.prop,
|
|
3
3
|
type: "String"
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
prop: item.prop,
|
|
4
|
+
}), e = (o) => ({
|
|
5
|
+
prop: o.prop,
|
|
7
6
|
type: "Boolean"
|
|
8
|
-
})
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
prop: item.prop,
|
|
7
|
+
}), n = (o) => {
|
|
8
|
+
const r = {
|
|
9
|
+
prop: o.prop,
|
|
12
10
|
type: "Number"
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return info;
|
|
18
|
-
};
|
|
19
|
-
const inferDate = (item) => ({
|
|
20
|
-
prop: item.prop,
|
|
12
|
+
return o.precision && (r.precision = o.precision), r;
|
|
13
|
+
}, t = (o) => ({
|
|
14
|
+
prop: o.prop,
|
|
21
15
|
type: "Date"
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
16
|
+
}), i = {
|
|
17
|
+
VkfSelect: p,
|
|
18
|
+
VkfRadio: p,
|
|
19
|
+
VkfCheckbox: p,
|
|
20
|
+
VkfColorPicker: p,
|
|
21
|
+
VkfInputNumber: n,
|
|
22
|
+
VkfSwitch: e,
|
|
23
|
+
VkfUpload: p,
|
|
24
|
+
VkfDatePicker: t
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
i as propInfoAction
|
|
32
28
|
};
|
|
33
|
-
|
|
34
|
-
export { propInfoAction };
|
|
@@ -1,42 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const ifElse = (fn1, fn2, fn3) => (x) => fn1(x) ? fn2(x) : fn3(x);
|
|
6
|
-
const progress = (effect, option) => (state) => {
|
|
7
|
-
const $data = {
|
|
8
|
-
interval: 100,
|
|
9
|
-
speed: 0.01,
|
|
10
|
-
...option,
|
|
11
|
-
percent: 0,
|
|
12
|
-
timeLine: 0,
|
|
13
|
-
timer: void 0
|
|
14
|
-
};
|
|
15
|
-
const $stateInitFlow = ($data2) => ifElse(
|
|
16
|
-
(state2) => Boolean(state2),
|
|
17
|
-
(state2) => effect(1, state2),
|
|
18
|
-
(state2) => setInterval(() => {
|
|
19
|
-
$data2.timeLine++;
|
|
20
|
-
$data2.percent = state2 ? 1 : (-1 / ($data2.speed * $data2.timeLine + 1) + 1) * 1;
|
|
21
|
-
effect($data2.percent, state2);
|
|
22
|
-
}, $data2.interval)
|
|
23
|
-
);
|
|
24
|
-
$data.timer = $stateInitFlow($data)(state);
|
|
25
|
-
const setter = (newState) => {
|
|
26
|
-
if (typeof newState !== "boolean") {
|
|
27
|
-
$data.timer && clearInterval($data.timer);
|
|
28
|
-
$data.percent = 1;
|
|
29
|
-
effect($data.percent, "fail");
|
|
30
|
-
return setter;
|
|
31
|
-
}
|
|
32
|
-
if (newState) {
|
|
33
|
-
$data.timer && clearInterval($data.timer);
|
|
34
|
-
$data.percent = 1;
|
|
35
|
-
effect($data.percent, newState);
|
|
36
|
-
}
|
|
37
|
-
return setter;
|
|
38
|
-
};
|
|
39
|
-
return setter;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
exports.default = progress;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=(t,i,l)=>e=>t(e)?i(e):l(e),p=(t,i)=>l=>{const e={interval:100,speed:.01,...i,percent:0,timeLine:0,timer:void 0},s=r=>c(n=>!!n,n=>t(1,n),n=>setInterval(()=>{r.timeLine++,r.percent=n?1:(-1/(r.speed*r.timeLine+1)+1)*1,t(r.percent,n)},r.interval));e.timer=s(e)(l);const o=r=>typeof r!="boolean"?(e.timer&&clearInterval(e.timer),e.percent=1,t(e.percent,"fail"),o):(r&&(e.timer&&clearInterval(e.timer),e.percent=1,t(e.percent,r)),o);return o};exports.default=p;
|
|
@@ -1,38 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const $data = {
|
|
1
|
+
const p = (t, i, o) => (e) => t(e) ? i(e) : o(e), c = (t, i) => (o) => {
|
|
2
|
+
const e = {
|
|
4
3
|
interval: 100,
|
|
5
4
|
speed: 0.01,
|
|
6
|
-
...
|
|
5
|
+
...i,
|
|
7
6
|
percent: 0,
|
|
8
7
|
timeLine: 0,
|
|
9
8
|
timer: void 0
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
$data2.percent = state2 ? 1 : (-1 / ($data2.speed * $data2.timeLine + 1) + 1) * 1;
|
|
17
|
-
effect($data2.percent, state2);
|
|
18
|
-
}, $data2.interval)
|
|
9
|
+
}, s = (r) => p(
|
|
10
|
+
(n) => !!n,
|
|
11
|
+
(n) => t(1, n),
|
|
12
|
+
(n) => setInterval(() => {
|
|
13
|
+
r.timeLine++, r.percent = n ? 1 : (-1 / (r.speed * r.timeLine + 1) + 1) * 1, t(r.percent, n);
|
|
14
|
+
}, r.interval)
|
|
19
15
|
);
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return setter;
|
|
27
|
-
}
|
|
28
|
-
if (newState) {
|
|
29
|
-
$data.timer && clearInterval($data.timer);
|
|
30
|
-
$data.percent = 1;
|
|
31
|
-
effect($data.percent, newState);
|
|
32
|
-
}
|
|
33
|
-
return setter;
|
|
34
|
-
};
|
|
35
|
-
return setter;
|
|
16
|
+
e.timer = s(e)(o);
|
|
17
|
+
const l = (r) => typeof r != "boolean" ? (e.timer && clearInterval(e.timer), e.percent = 1, t(e.percent, "fail"), l) : (r && (e.timer && clearInterval(e.timer), e.percent = 1, t(e.percent, r)), l);
|
|
18
|
+
return l;
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
c as default
|
|
36
22
|
};
|
|
37
|
-
|
|
38
|
-
export { progress as default };
|
package/shared/rules/index.cjs
CHANGED
|
@@ -1,56 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const PATTERN = {
|
|
4
|
-
/**
|
|
5
|
-
* 由数字、26个英文字母或者下划线以及中文组成的字符串
|
|
6
|
-
*/
|
|
7
|
-
normal: /^[\u4e00-\u9fa5_a-zA-Z0-9]+$/,
|
|
8
|
-
/**
|
|
9
|
-
* 只能由 中文 和 英文 组成
|
|
10
|
-
*/
|
|
11
|
-
normalName: /^[\u4e00-\u9fa5_a-zA-Z]+$/,
|
|
12
|
-
/**
|
|
13
|
-
* 只能由数字、字母、下划线组成, 且不能以下划线和数字开头
|
|
14
|
-
*/
|
|
15
|
-
code: /^[a-zA-Z][a-zA-Z0-9_]*$/,
|
|
16
|
-
/**
|
|
17
|
-
* 只能由数字或字母组成, 且不能以数字开头
|
|
18
|
-
*/
|
|
19
|
-
strictCode: /^[a-zA-Z][a-zA-Z0-9]*$/,
|
|
20
|
-
/**
|
|
21
|
-
* 只能由字母、数字或特殊字符组成,且长度在8到16之间
|
|
22
|
-
*/
|
|
23
|
-
password: /^[a-zA-Z0-9~!@#$%^&*()_+|<>?:{}\.]{8,16}$/,
|
|
24
|
-
/**
|
|
25
|
-
* 要求密码必须同时包含至少一个小写字母、大写字母和数字,且长度在8到16之间。
|
|
26
|
-
*/
|
|
27
|
-
strictPassword: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/,
|
|
28
|
-
/**
|
|
29
|
-
* 正确的手机号码
|
|
30
|
-
*/
|
|
31
|
-
phone: /^1[3456789]\d{9}$/
|
|
32
|
-
};
|
|
33
|
-
const PATTERN_OPTIONS = [
|
|
34
|
-
{ label: "\u5E38\u89C4", value: PATTERN.normal, title: "\u7531\u6570\u5B57\u300126\u4E2A\u82F1\u6587\u5B57\u6BCD\u6216\u8005\u4E0B\u5212\u7EBF\u4EE5\u53CA\u4E2D\u6587\u7EC4\u6210\u7684\u5B57\u7B26\u4E32" },
|
|
35
|
-
{
|
|
36
|
-
label: "\u5E38\u89C4\u59D3\u540D",
|
|
37
|
-
value: PATTERN.normalName,
|
|
38
|
-
title: "\u53EA\u80FD\u7531 \u4E2D\u6587 \u548C \u82F1\u6587 \u7EC4\u6210"
|
|
39
|
-
},
|
|
40
|
-
{ label: "\u5BC6\u7801", value: PATTERN.password, title: "\u53EA\u80FD\u7531\u5B57\u6BCD\u3001\u6570\u5B57\u6216\u7279\u6B8A\u5B57\u7B26\u7EC4\u6210\uFF0C\u4E14\u957F\u5EA6\u57288\u523016\u4E4B\u95F4" },
|
|
41
|
-
{ label: "\u4E25\u683C\u5BC6\u7801", value: PATTERN.strictPassword, title: "\u8981\u6C42\u5BC6\u7801\u5FC5\u987B\u540C\u65F6\u5305\u542B\u81F3\u5C11\u4E00\u4E2A\u5C0F\u5199\u5B57\u6BCD\u3001\u5927\u5199\u5B57\u6BCD\u548C\u6570\u5B57\uFF0C\u4E14\u957F\u5EA6\u57288\u523016\u4E4B\u95F4\u3002" },
|
|
42
|
-
{ label: "\u624B\u673A\u53F7", value: PATTERN.phone, title: "\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801" },
|
|
43
|
-
{
|
|
44
|
-
label: "\u7F16\u7801",
|
|
45
|
-
value: PATTERN.code,
|
|
46
|
-
title: "\u53EA\u80FD\u7531\u6570\u5B57\u3001\u5B57\u6BCD\u3001\u4E0B\u5212\u7EBF\u7EC4\u6210, \u4E14\u4E0D\u80FD\u4EE5\u4E0B\u5212\u7EBF\u548C\u6570\u5B57\u5F00\u5934"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
label: "\u4E25\u683C\u7F16\u7801",
|
|
50
|
-
value: PATTERN.strictCode,
|
|
51
|
-
title: "\u53EA\u80FD\u7531\u6570\u5B57\u6216\u5B57\u6BCD\u7EC4\u6210, \u4E14\u4E0D\u80FD\u4EE5\u6570\u5B57\u5F00\u5934"
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
exports.PATTERN = PATTERN;
|
|
56
|
-
exports.PATTERN_OPTIONS = PATTERN_OPTIONS;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={normal:/^[\u4e00-\u9fa5_a-zA-Z0-9]+$/,normalName:/^[\u4e00-\u9fa5_a-zA-Z]+$/,code:/^[a-zA-Z][a-zA-Z0-9_]*$/,strictCode:/^[a-zA-Z][a-zA-Z0-9]*$/,password:/^[a-zA-Z0-9~!@#$%^&*()_+|<>?:{}\.]{8,16}$/,strictPassword:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{8,16}$/,phone:/^1[3456789]\d{9}$/},a=[{label:"常规",value:e.normal,title:"由数字、26个英文字母或者下划线以及中文组成的字符串"},{label:"常规姓名",value:e.normalName,title:"只能由 中文 和 英文 组成"},{label:"密码",value:e.password,title:"只能由字母、数字或特殊字符组成,且长度在8到16之间"},{label:"严格密码",value:e.strictPassword,title:"要求密码必须同时包含至少一个小写字母、大写字母和数字,且长度在8到16之间。"},{label:"手机号",value:e.phone,title:"正确的手机号码"},{label:"编码",value:e.code,title:"只能由数字、字母、下划线组成, 且不能以下划线和数字开头"},{label:"严格编码",value:e.strictCode,title:"只能由数字或字母组成, 且不能以数字开头"}];exports.PATTERN=e;exports.PATTERN_OPTIONS=a;
|
package/shared/rules/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a = {
|
|
2
2
|
/**
|
|
3
3
|
* 由数字、26个英文字母或者下划线以及中文组成的字符串
|
|
4
4
|
*/
|
|
@@ -27,27 +27,28 @@ const PATTERN = {
|
|
|
27
27
|
* 正确的手机号码
|
|
28
28
|
*/
|
|
29
29
|
phone: /^1[3456789]\d{9}$/
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
{ label: "\u5E38\u89C4", value: PATTERN.normal, title: "\u7531\u6570\u5B57\u300126\u4E2A\u82F1\u6587\u5B57\u6BCD\u6216\u8005\u4E0B\u5212\u7EBF\u4EE5\u53CA\u4E2D\u6587\u7EC4\u6210\u7684\u5B57\u7B26\u4E32" },
|
|
30
|
+
}, e = [
|
|
31
|
+
{ label: "常规", value: a.normal, title: "由数字、26个英文字母或者下划线以及中文组成的字符串" },
|
|
33
32
|
{
|
|
34
|
-
label: "
|
|
35
|
-
value:
|
|
36
|
-
title: "
|
|
33
|
+
label: "常规姓名",
|
|
34
|
+
value: a.normalName,
|
|
35
|
+
title: "只能由 中文 和 英文 组成"
|
|
37
36
|
},
|
|
38
|
-
{ label: "
|
|
39
|
-
{ label: "
|
|
40
|
-
{ label: "
|
|
37
|
+
{ label: "密码", value: a.password, title: "只能由字母、数字或特殊字符组成,且长度在8到16之间" },
|
|
38
|
+
{ label: "严格密码", value: a.strictPassword, title: "要求密码必须同时包含至少一个小写字母、大写字母和数字,且长度在8到16之间。" },
|
|
39
|
+
{ label: "手机号", value: a.phone, title: "正确的手机号码" },
|
|
41
40
|
{
|
|
42
|
-
label: "
|
|
43
|
-
value:
|
|
44
|
-
title: "
|
|
41
|
+
label: "编码",
|
|
42
|
+
value: a.code,
|
|
43
|
+
title: "只能由数字、字母、下划线组成, 且不能以下划线和数字开头"
|
|
45
44
|
},
|
|
46
45
|
{
|
|
47
|
-
label: "
|
|
48
|
-
value:
|
|
49
|
-
title: "
|
|
46
|
+
label: "严格编码",
|
|
47
|
+
value: a.strictCode,
|
|
48
|
+
title: "只能由数字或字母组成, 且不能以数字开头"
|
|
50
49
|
}
|
|
51
50
|
];
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
export {
|
|
52
|
+
a as PATTERN,
|
|
53
|
+
e as PATTERN_OPTIONS
|
|
54
|
+
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
package/shared/types/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|