x-runtime-lib 0.9.39 → 0.9.40
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.
|
@@ -247,6 +247,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
|
|
|
247
247
|
max: "Max",
|
|
248
248
|
maxErrors: "Max Errors",
|
|
249
249
|
maxHeight: "Max Height",
|
|
250
|
+
maxLength: "Max Length",
|
|
250
251
|
maxRows: "Max Rows",
|
|
251
252
|
maxWidth: "Max Width",
|
|
252
253
|
medium: "Medium",
|
|
@@ -258,6 +259,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
|
|
|
258
259
|
middle: "Middle",
|
|
259
260
|
min: "Min",
|
|
260
261
|
minHeight: "Min Height",
|
|
262
|
+
minLength: "Min Length",
|
|
261
263
|
minWidth: "Min Width",
|
|
262
264
|
misc: "Misc",
|
|
263
265
|
mode: "Mode",
|
|
@@ -329,6 +331,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
|
|
|
329
331
|
regular: "Regular",
|
|
330
332
|
relative: "Relative",
|
|
331
333
|
renderSwitch: "Render Switch",
|
|
334
|
+
required: "Required",
|
|
332
335
|
reset: "Reset",
|
|
333
336
|
resetValidation: "Reset Validation",
|
|
334
337
|
result: "Result",
|
|
@@ -247,6 +247,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
|
|
|
247
247
|
max: "最大值",
|
|
248
248
|
maxErrors: "最大错误数",
|
|
249
249
|
maxHeight: "最大高度",
|
|
250
|
+
maxLength: "最大长度",
|
|
250
251
|
maxRows: "最大行数",
|
|
251
252
|
maxWidth: "最大宽度",
|
|
252
253
|
medium: "中",
|
|
@@ -258,6 +259,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
|
|
|
258
259
|
middle: "中",
|
|
259
260
|
min: "最小值",
|
|
260
261
|
minHeight: "最小高度",
|
|
262
|
+
minLength: "最小长度",
|
|
261
263
|
minWidth: "最小宽度",
|
|
262
264
|
misc: "杂项",
|
|
263
265
|
mode: "模式",
|
|
@@ -329,6 +331,7 @@ var t = /* @__PURE__ */ e({ default: () => n }), n = { "x-runtime-lib": {
|
|
|
329
331
|
regular: "常规",
|
|
330
332
|
relative: "相对",
|
|
331
333
|
renderSwitch: "渲染开关",
|
|
334
|
+
required: "必填",
|
|
332
335
|
reset: "重置",
|
|
333
336
|
resetValidation: "重置验证",
|
|
334
337
|
result: "结果",
|
package/dist/index.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ export declare function getNodeLite(nodeLites: NodeLite[], id: string): NodeLite
|
|
|
188
188
|
|
|
189
189
|
export declare function getPropertyDefault(property: ZProperty): any;
|
|
190
190
|
|
|
191
|
-
export declare function getPropertyDefaultArray(property: ZProperty): any[] | string[] | number[] | boolean[];
|
|
191
|
+
export declare function getPropertyDefaultArray(property: ZProperty): any[] | string[] | number[] | boolean[] | ("" | "required" | "email" | "minLength" | "maxLength" | "length")[];
|
|
192
192
|
|
|
193
193
|
export declare function getRadius(val: unknown): string | undefined;
|
|
194
194
|
|
|
@@ -491,6 +491,8 @@ export declare function regTypes(key: ZTypesKey, types: ZType[]): void;
|
|
|
491
491
|
|
|
492
492
|
export declare const reverseBreakpoints: readonly ["xl", "lg", "md", "sm", "xs"];
|
|
493
493
|
|
|
494
|
+
export declare const rules: readonly ["required", "email", "minLength", "maxLength", "length"];
|
|
495
|
+
|
|
494
496
|
declare class Sandbox {
|
|
495
497
|
kind: SandboxKind;
|
|
496
498
|
nodeId: string;
|
|
@@ -900,7 +902,7 @@ declare type ZPropertyNumber = {
|
|
|
900
902
|
|
|
901
903
|
declare type ZPropertyRule = {
|
|
902
904
|
ui: 'rule';
|
|
903
|
-
default:
|
|
905
|
+
default: ZRule | '';
|
|
904
906
|
} & ZPropertyBase;
|
|
905
907
|
|
|
906
908
|
declare type ZPropertySelect = {
|
|
@@ -948,6 +950,8 @@ declare type ZPropertyTransient<T extends Type> = {
|
|
|
948
950
|
};
|
|
949
951
|
}[T];
|
|
950
952
|
|
|
953
|
+
export declare type ZRule = (typeof rules)[number];
|
|
954
|
+
|
|
951
955
|
export declare type ZSlot = {
|
|
952
956
|
key: string;
|
|
953
957
|
name: string;
|