@tachybase/schema 0.23.41 → 0.23.47
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/core/effects/index.d.ts +2 -0
- package/lib/core/effects/index.js +23 -0
- package/lib/core/effects/onFieldEffects.d.ts +27 -0
- package/lib/core/effects/onFieldEffects.js +158 -0
- package/lib/core/effects/onFormEffects.d.ts +24 -0
- package/lib/core/effects/onFormEffects.js +117 -0
- package/lib/core/global.d.js +0 -0
- package/lib/core/index.d.ts +4 -0
- package/lib/core/index.js +27 -0
- package/lib/core/models/ArrayField.d.ts +17 -0
- package/lib/core/models/ArrayField.js +145 -0
- package/lib/core/models/BaseField.d.ts +72 -0
- package/lib/core/models/BaseField.js +285 -0
- package/lib/core/models/Field.d.ts +70 -0
- package/lib/core/models/Field.js +426 -0
- package/lib/core/models/Form.d.ts +102 -0
- package/lib/core/models/Form.js +483 -0
- package/lib/core/models/Graph.d.ts +8 -0
- package/lib/core/models/Graph.js +77 -0
- package/lib/core/models/Heart.d.ts +16 -0
- package/lib/core/models/Heart.js +91 -0
- package/lib/core/models/LifeCycle.d.ts +14 -0
- package/lib/core/models/LifeCycle.js +64 -0
- package/lib/core/models/ObjectField.d.ts +12 -0
- package/lib/core/models/ObjectField.js +64 -0
- package/lib/core/models/Query.d.ts +18 -0
- package/lib/core/models/Query.js +105 -0
- package/lib/core/models/VoidField.d.ts +14 -0
- package/lib/core/models/VoidField.js +117 -0
- package/lib/core/models/index.d.ts +9 -0
- package/lib/core/models/index.js +37 -0
- package/lib/core/models/types.d.ts +9 -0
- package/lib/core/models/types.js +15 -0
- package/lib/core/shared/checkers.d.ts +117 -0
- package/lib/core/shared/checkers.js +109 -0
- package/lib/core/shared/constants.d.ts +48 -0
- package/lib/core/shared/constants.js +86 -0
- package/lib/core/shared/effective.d.ts +9 -0
- package/lib/core/shared/effective.js +91 -0
- package/lib/core/shared/externals.d.ts +8 -0
- package/lib/core/shared/externals.js +87 -0
- package/lib/core/shared/internals.d.ts +54 -0
- package/lib/core/shared/internals.js +956 -0
- package/lib/core/types.d.ts +275 -0
- package/lib/core/types.js +76 -0
- package/lib/grid/index.d.ts +67 -0
- package/lib/grid/index.js +378 -0
- package/lib/grid/observer.d.ts +19 -0
- package/lib/grid/observer.js +107 -0
- package/lib/index.d.ts +12 -24
- package/lib/index.js +27 -244
- package/lib/json-schema/compiler.d.ts +8 -0
- package/lib/json-schema/compiler.js +129 -0
- package/lib/json-schema/global.d.js +0 -0
- package/lib/json-schema/index.d.ts +2 -0
- package/lib/json-schema/index.js +23 -0
- package/lib/json-schema/patches.d.ts +5 -0
- package/lib/json-schema/patches.js +68 -0
- package/lib/json-schema/polyfills/SPECIFICATION_1_0.d.ts +2 -0
- package/lib/json-schema/polyfills/SPECIFICATION_1_0.js +132 -0
- package/lib/json-schema/polyfills/index.d.ts +1 -0
- package/lib/json-schema/polyfills/index.js +21 -0
- package/lib/json-schema/schema.d.ts +88 -0
- package/lib/json-schema/schema.js +231 -0
- package/lib/json-schema/shared.d.ts +62 -0
- package/lib/json-schema/shared.js +232 -0
- package/lib/json-schema/transformer.d.ts +4 -0
- package/lib/json-schema/transformer.js +238 -0
- package/lib/json-schema/types.d.ts +119 -0
- package/lib/json-schema/types.js +15 -0
- package/lib/path/contexts.d.ts +10 -0
- package/lib/path/contexts.js +49 -0
- package/lib/path/destructor.d.ts +15 -0
- package/lib/path/destructor.js +151 -0
- package/lib/path/index.d.ts +51 -0
- package/lib/path/index.js +513 -0
- package/lib/path/matcher.d.ts +33 -0
- package/lib/path/matcher.js +197 -0
- package/lib/path/parser.d.ts +33 -0
- package/lib/path/parser.js +379 -0
- package/lib/path/shared.d.ts +13 -0
- package/lib/path/shared.js +121 -0
- package/lib/path/tokenizer.d.ts +27 -0
- package/lib/path/tokenizer.js +269 -0
- package/lib/path/tokens.d.ts +27 -0
- package/lib/path/tokens.js +216 -0
- package/lib/path/types.d.ts +88 -0
- package/lib/path/types.js +63 -0
- package/lib/react/components/ArrayField.d.ts +6 -0
- package/lib/react/components/ArrayField.js +44 -0
- package/lib/react/components/ExpressionScope.d.ts +2 -0
- package/lib/react/components/ExpressionScope.js +35 -0
- package/lib/react/components/Field.d.ts +5 -0
- package/lib/react/components/Field.js +45 -0
- package/lib/react/components/FormConsumer.d.ts +2 -0
- package/lib/react/components/FormConsumer.js +36 -0
- package/lib/react/components/FormProvider.d.ts +2 -0
- package/lib/react/components/FormProvider.js +35 -0
- package/lib/react/components/ObjectField.d.ts +6 -0
- package/lib/react/components/ObjectField.js +39 -0
- package/lib/react/components/ReactiveField.d.ts +11 -0
- package/lib/react/components/ReactiveField.js +115 -0
- package/lib/react/components/RecordScope.d.ts +2 -0
- package/lib/react/components/RecordScope.js +65 -0
- package/lib/react/components/RecordsScope.d.ts +2 -0
- package/lib/react/components/RecordsScope.js +43 -0
- package/lib/react/components/RecursionField.d.ts +2 -0
- package/lib/react/components/RecursionField.js +105 -0
- package/lib/react/components/SchemaField.d.ts +41 -0
- package/lib/react/components/SchemaField.js +154 -0
- package/lib/react/components/VoidField.d.ts +5 -0
- package/lib/react/components/VoidField.js +39 -0
- package/lib/react/components/index.d.ts +11 -0
- package/lib/react/components/index.js +41 -0
- package/lib/react/global.d.js +0 -0
- package/lib/react/hooks/index.d.ts +6 -0
- package/lib/react/hooks/index.js +31 -0
- package/lib/react/hooks/useAttach.d.ts +6 -0
- package/lib/react/hooks/useAttach.js +35 -0
- package/lib/react/hooks/useExpressionScope.d.ts +1 -0
- package/lib/react/hooks/useExpressionScope.js +30 -0
- package/lib/react/hooks/useField.d.ts +2 -0
- package/lib/react/hooks/useField.js +32 -0
- package/lib/react/hooks/useFieldSchema.d.ts +2 -0
- package/lib/react/hooks/useFieldSchema.js +32 -0
- package/lib/react/hooks/useForm.d.ts +2 -0
- package/lib/react/hooks/useForm.js +32 -0
- package/lib/react/hooks/useFormEffects.d.ts +2 -0
- package/lib/react/hooks/useFormEffects.js +42 -0
- package/lib/react/hooks/useParentForm.d.ts +2 -0
- package/lib/react/hooks/useParentForm.js +40 -0
- package/lib/react/index.d.ts +5 -0
- package/lib/react/index.js +29 -0
- package/lib/react/shared/connect.d.ts +9 -0
- package/lib/react/shared/connect.js +118 -0
- package/lib/react/shared/context.d.ts +14 -0
- package/lib/react/shared/context.js +74 -0
- package/lib/react/shared/index.d.ts +2 -0
- package/lib/react/shared/index.js +23 -0
- package/lib/react/shared/render.d.ts +2 -0
- package/lib/react/shared/render.js +69 -0
- package/lib/react/types.d.ts +84 -0
- package/lib/react/types.js +15 -0
- package/lib/reactive/action.d.ts +2 -0
- package/lib/reactive/action.js +48 -0
- package/lib/reactive/annotations/box.d.ts +7 -0
- package/lib/reactive/annotations/box.js +76 -0
- package/lib/reactive/annotations/computed.d.ts +12 -0
- package/lib/reactive/annotations/computed.js +154 -0
- package/lib/reactive/annotations/index.d.ts +5 -0
- package/lib/reactive/annotations/index.js +29 -0
- package/lib/reactive/annotations/observable.d.ts +4 -0
- package/lib/reactive/annotations/observable.js +67 -0
- package/lib/reactive/annotations/ref.d.ts +6 -0
- package/lib/reactive/annotations/ref.js +78 -0
- package/lib/reactive/annotations/shallow.d.ts +2 -0
- package/lib/reactive/annotations/shallow.js +67 -0
- package/lib/reactive/array.d.ts +12 -0
- package/lib/reactive/array.js +83 -0
- package/lib/reactive/autorun.d.ts +7 -0
- package/lib/reactive/autorun.js +155 -0
- package/lib/reactive/batch.d.ts +2 -0
- package/lib/reactive/batch.js +40 -0
- package/lib/reactive/checkers.d.ts +10 -0
- package/lib/reactive/checkers.js +60 -0
- package/lib/reactive/environment.d.ts +28 -0
- package/lib/reactive/environment.js +76 -0
- package/lib/reactive/externals.d.ts +10 -0
- package/lib/reactive/externals.js +156 -0
- package/lib/reactive/global.d.js +0 -0
- package/lib/reactive/handlers.d.ts +4 -0
- package/lib/reactive/handlers.js +246 -0
- package/lib/reactive/index.d.ts +10 -0
- package/lib/reactive/index.js +39 -0
- package/lib/reactive/internals.d.ts +17 -0
- package/lib/reactive/internals.js +139 -0
- package/lib/reactive/model.d.ts +3 -0
- package/lib/reactive/model.js +68 -0
- package/lib/reactive/observable.d.ts +9 -0
- package/lib/reactive/observable.js +50 -0
- package/lib/reactive/observe.d.ts +2 -0
- package/lib/reactive/observe.js +58 -0
- package/lib/reactive/reaction.d.ts +21 -0
- package/lib/reactive/reaction.js +278 -0
- package/lib/reactive/tracker.d.ts +7 -0
- package/lib/reactive/tracker.js +63 -0
- package/lib/reactive/tree.d.ts +25 -0
- package/lib/reactive/tree.js +106 -0
- package/lib/reactive/types.d.ts +79 -0
- package/lib/reactive/types.js +21 -0
- package/lib/reactive/untracked.d.ts +4 -0
- package/lib/reactive/untracked.js +29 -0
- package/lib/reactive-react/hooks/index.d.ts +9 -0
- package/lib/reactive-react/hooks/index.js +48 -0
- package/lib/reactive-react/hooks/useCompatEffect.d.ts +2 -0
- package/lib/reactive-react/hooks/useCompatEffect.js +60 -0
- package/lib/reactive-react/hooks/useCompatFactory.d.ts +3 -0
- package/lib/reactive-react/hooks/useCompatFactory.js +74 -0
- package/lib/reactive-react/hooks/useDidUpdate.d.ts +1 -0
- package/lib/reactive-react/hooks/useDidUpdate.js +38 -0
- package/lib/reactive-react/hooks/useForceUpdate.d.ts +1 -0
- package/lib/reactive-react/hooks/useForceUpdate.js +76 -0
- package/lib/reactive-react/hooks/useLayoutEffect.d.ts +2 -0
- package/lib/reactive-react/hooks/useLayoutEffect.js +28 -0
- package/lib/reactive-react/hooks/useObserver.d.ts +2 -0
- package/lib/reactive-react/hooks/useObserver.js +43 -0
- package/lib/reactive-react/index.d.ts +3 -0
- package/lib/reactive-react/index.js +25 -0
- package/lib/reactive-react/observer.d.ts +8 -0
- package/lib/reactive-react/observer.js +64 -0
- package/lib/reactive-react/shared/gc.d.ts +8 -0
- package/lib/reactive-react/shared/gc.js +59 -0
- package/lib/reactive-react/shared/global.d.ts +1 -0
- package/lib/reactive-react/shared/global.js +50 -0
- package/lib/reactive-react/shared/immediate.d.ts +1 -0
- package/lib/reactive-react/shared/immediate.js +40 -0
- package/lib/reactive-react/shared/index.d.ts +2 -0
- package/lib/reactive-react/shared/index.js +23 -0
- package/lib/reactive-react/types.d.ts +14 -0
- package/lib/reactive-react/types.js +15 -0
- package/lib/shared/array.d.ts +35 -0
- package/lib/shared/array.js +189 -0
- package/lib/shared/case.d.ts +6 -0
- package/lib/shared/case.js +39 -0
- package/lib/shared/checkers.d.ts +21 -0
- package/lib/shared/checkers.js +77 -0
- package/lib/shared/clone.d.ts +2 -0
- package/lib/shared/clone.js +97 -0
- package/lib/shared/compare.d.ts +1 -0
- package/lib/shared/compare.js +129 -0
- package/lib/shared/defaults.d.ts +6 -0
- package/lib/shared/defaults.js +63 -0
- package/lib/shared/deprecate.d.ts +1 -0
- package/lib/shared/deprecate.js +42 -0
- package/lib/shared/global.d.ts +1 -0
- package/lib/shared/global.js +50 -0
- package/lib/shared/index.d.ts +16 -0
- package/lib/shared/index.js +51 -0
- package/lib/shared/instanceof.d.ts +1 -0
- package/lib/shared/instanceof.js +36 -0
- package/lib/shared/isEmpty.d.ts +3 -0
- package/lib/shared/isEmpty.js +94 -0
- package/lib/shared/merge.d.ts +12 -0
- package/lib/shared/merge.js +214 -0
- package/lib/shared/middleware.d.ts +4 -0
- package/lib/shared/middleware.js +41 -0
- package/lib/shared/path.d.ts +3 -0
- package/lib/shared/path.js +27 -0
- package/lib/shared/string.d.ts +1 -0
- package/lib/shared/string.js +38 -0
- package/lib/shared/subscribable.d.ts +11 -0
- package/lib/shared/subscribable.js +74 -0
- package/lib/shared/uid.d.ts +1 -0
- package/lib/shared/uid.js +35 -0
- package/lib/validator/formats.d.ts +16 -0
- package/lib/validator/formats.js +40 -0
- package/lib/validator/index.d.ts +4 -0
- package/lib/validator/index.js +27 -0
- package/lib/validator/locale.d.ts +219 -0
- package/lib/validator/locale.js +240 -0
- package/lib/validator/parser.d.ts +5 -0
- package/lib/validator/parser.js +153 -0
- package/lib/validator/registry.d.ts +15 -0
- package/lib/validator/registry.js +116 -0
- package/lib/validator/rules.d.ts +3 -0
- package/lib/validator/rules.js +154 -0
- package/lib/validator/template.d.ts +2 -0
- package/lib/validator/template.js +42 -0
- package/lib/validator/types.d.ts +62 -0
- package/lib/validator/types.js +28 -0
- package/lib/validator/validator.d.ts +2 -0
- package/lib/validator/validator.js +63 -0
- package/package.json +16 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stringLength: (input: string) => any;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var string_exports = {};
|
|
20
|
+
__export(string_exports, {
|
|
21
|
+
stringLength: () => stringLength
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(string_exports);
|
|
24
|
+
const ansiRegex = /* @__PURE__ */ __name(() => {
|
|
25
|
+
const pattern = [
|
|
26
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)",
|
|
27
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"
|
|
28
|
+
].join("|");
|
|
29
|
+
return new RegExp(pattern, "g");
|
|
30
|
+
}, "ansiRegex");
|
|
31
|
+
const regex = "[\uD800-\uDBFF][\uDC00-\uDFFF]";
|
|
32
|
+
const astralRegex = /* @__PURE__ */ __name((opts) => opts && opts.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, "g"), "astralRegex");
|
|
33
|
+
const stripAnsi = /* @__PURE__ */ __name((input) => typeof input === "string" ? input.replace(ansiRegex(), "") : input, "stripAnsi");
|
|
34
|
+
const stringLength = /* @__PURE__ */ __name((input) => stripAnsi(input).replace(astralRegex(), " ").length, "stringLength");
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
stringLength
|
|
38
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Subscriber, Subscription } from './checkers';
|
|
2
|
+
export declare class Subscribable<Payload = any> {
|
|
3
|
+
subscribers: {
|
|
4
|
+
index?: number;
|
|
5
|
+
[key: number]: Subscriber<Payload>;
|
|
6
|
+
};
|
|
7
|
+
subscription: Subscription<Payload>;
|
|
8
|
+
subscribe: (callback?: Subscriber<Payload>) => number;
|
|
9
|
+
unsubscribe: (index?: number) => void;
|
|
10
|
+
notify: (payload?: Payload, silent?: boolean) => void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var subscribable_exports = {};
|
|
20
|
+
__export(subscribable_exports, {
|
|
21
|
+
Subscribable: () => Subscribable
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(subscribable_exports);
|
|
24
|
+
var import_array = require("./array");
|
|
25
|
+
var import_checkers = require("./checkers");
|
|
26
|
+
const _Subscribable = class _Subscribable {
|
|
27
|
+
constructor() {
|
|
28
|
+
this.subscribers = {
|
|
29
|
+
index: 0
|
|
30
|
+
};
|
|
31
|
+
this.subscribe = /* @__PURE__ */ __name((callback) => {
|
|
32
|
+
if ((0, import_checkers.isFn)(callback)) {
|
|
33
|
+
const index = this.subscribers.index + 1;
|
|
34
|
+
this.subscribers[index] = callback;
|
|
35
|
+
this.subscribers.index++;
|
|
36
|
+
return index;
|
|
37
|
+
}
|
|
38
|
+
}, "subscribe");
|
|
39
|
+
this.unsubscribe = /* @__PURE__ */ __name((index) => {
|
|
40
|
+
if (this.subscribers[index]) {
|
|
41
|
+
delete this.subscribers[index];
|
|
42
|
+
} else if (!index) {
|
|
43
|
+
this.subscribers = {
|
|
44
|
+
index: 0
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}, "unsubscribe");
|
|
48
|
+
this.notify = /* @__PURE__ */ __name((payload, silent) => {
|
|
49
|
+
if (this.subscription) {
|
|
50
|
+
if (this.subscription && (0, import_checkers.isFn)(this.subscription.notify)) {
|
|
51
|
+
if (this.subscription.notify.call(this, payload) === false) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
if (silent) return;
|
|
57
|
+
const filter = /* @__PURE__ */ __name((payload2) => {
|
|
58
|
+
if (this.subscription && (0, import_checkers.isFn)(this.subscription.filter)) {
|
|
59
|
+
return this.subscription.filter.call(this, payload2);
|
|
60
|
+
}
|
|
61
|
+
return payload2;
|
|
62
|
+
}, "filter");
|
|
63
|
+
(0, import_array.each)(this.subscribers, (callback) => {
|
|
64
|
+
if ((0, import_checkers.isFn)(callback)) callback(filter(payload));
|
|
65
|
+
});
|
|
66
|
+
}, "notify");
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
__name(_Subscribable, "Subscribable");
|
|
70
|
+
let Subscribable = _Subscribable;
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
Subscribable
|
|
74
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function uid(len?: number): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var uid_exports = {};
|
|
20
|
+
__export(uid_exports, {
|
|
21
|
+
uid: () => uid
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(uid_exports);
|
|
24
|
+
let IDX = 36, HEX = "";
|
|
25
|
+
while (IDX--) HEX += IDX.toString(36);
|
|
26
|
+
function uid(len) {
|
|
27
|
+
let str = "", num = len || 11;
|
|
28
|
+
while (num--) str += HEX[Math.random() * 36 | 0];
|
|
29
|
+
return str;
|
|
30
|
+
}
|
|
31
|
+
__name(uid, "uid");
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
uid
|
|
35
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
url: RegExp;
|
|
3
|
+
email: RegExp;
|
|
4
|
+
ipv6: RegExp;
|
|
5
|
+
ipv4: RegExp;
|
|
6
|
+
number: RegExp;
|
|
7
|
+
integer: RegExp;
|
|
8
|
+
qq: RegExp;
|
|
9
|
+
phone: RegExp;
|
|
10
|
+
idcard: RegExp;
|
|
11
|
+
money: RegExp;
|
|
12
|
+
zh: RegExp;
|
|
13
|
+
date: RegExp;
|
|
14
|
+
zip: RegExp;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var formats_exports = {};
|
|
19
|
+
__export(formats_exports, {
|
|
20
|
+
default: () => formats_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(formats_exports);
|
|
23
|
+
var formats_default = {
|
|
24
|
+
url: new RegExp(
|
|
25
|
+
// protocol identifier
|
|
26
|
+
"^(?:(?:(?:https?|ftp|rtmp):)?//)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:22[0-3]|2[01]\\d|[1-9]\\d?|1\\d\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1?\\d{1,2})){2}(?:\\.(?:25[0-4]|2[0-4]\\d|1\\d\\d|[1-9]\\d?))|(?:(?:[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*)?$"
|
|
27
|
+
),
|
|
28
|
+
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
|
|
29
|
+
ipv6: /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,
|
|
30
|
+
ipv4: /^((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})$/,
|
|
31
|
+
number: /^[+-]?\d+(\.\d+)?$/,
|
|
32
|
+
integer: /^[+-]?\d+$/,
|
|
33
|
+
qq: /^(\+?[1-9]\d*|0)$/,
|
|
34
|
+
phone: /^\d{3}-\d{8}$|^\d{4}-\d{7}$|^\d{11}$/,
|
|
35
|
+
idcard: /^\d{15}$|^\d{17}(\d|x|X)$/,
|
|
36
|
+
money: /^([\u0024\u00A2\u00A3\u00A4\u20AC\u00A5\u20B1\u20B9\uFFE5]\s*)(\d+,?)+(\.\d+)?\s*$/,
|
|
37
|
+
zh: /^[\u4e00-\u9fa5]+$/,
|
|
38
|
+
date: /^[0-9]+[./-][0-9]+[./-][0-9]+\s*(?:[0-9]+\s*:\s*[0-9]+\s*:\s*[0-9]+)?$/,
|
|
39
|
+
zip: /^[0-9]{6}$/
|
|
40
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var validator_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(validator_exports);
|
|
17
|
+
__reExport(validator_exports, require("./validator"), module.exports);
|
|
18
|
+
__reExport(validator_exports, require("./parser"), module.exports);
|
|
19
|
+
__reExport(validator_exports, require("./registry"), module.exports);
|
|
20
|
+
__reExport(validator_exports, require("./types"), module.exports);
|
|
21
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
22
|
+
0 && (module.exports = {
|
|
23
|
+
...require("./validator"),
|
|
24
|
+
...require("./parser"),
|
|
25
|
+
...require("./registry"),
|
|
26
|
+
...require("./types")
|
|
27
|
+
});
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
pattern: string;
|
|
4
|
+
invalid: string;
|
|
5
|
+
required: string;
|
|
6
|
+
number: string;
|
|
7
|
+
integer: string;
|
|
8
|
+
url: string;
|
|
9
|
+
email: string;
|
|
10
|
+
ipv6: string;
|
|
11
|
+
ipv4: string;
|
|
12
|
+
idcard: string;
|
|
13
|
+
qq: string;
|
|
14
|
+
phone: string;
|
|
15
|
+
money: string;
|
|
16
|
+
zh: string;
|
|
17
|
+
date: string;
|
|
18
|
+
zip: string;
|
|
19
|
+
len: string;
|
|
20
|
+
min: string;
|
|
21
|
+
minLength: string;
|
|
22
|
+
minItems: string;
|
|
23
|
+
maximum: string;
|
|
24
|
+
exclusiveMaximum: string;
|
|
25
|
+
minimum: string;
|
|
26
|
+
exclusiveMinimum: string;
|
|
27
|
+
max: string;
|
|
28
|
+
maxLength: string;
|
|
29
|
+
maxItems: string;
|
|
30
|
+
whitespace: string;
|
|
31
|
+
enum: string;
|
|
32
|
+
const: string;
|
|
33
|
+
multipleOf: string;
|
|
34
|
+
maxProperties: string;
|
|
35
|
+
minProperties: string;
|
|
36
|
+
uniqueItems: string;
|
|
37
|
+
};
|
|
38
|
+
zh: {
|
|
39
|
+
pattern: string;
|
|
40
|
+
invalid: string;
|
|
41
|
+
required: string;
|
|
42
|
+
number: string;
|
|
43
|
+
integer: string;
|
|
44
|
+
url: string;
|
|
45
|
+
email: string;
|
|
46
|
+
ipv6: string;
|
|
47
|
+
ipv4: string;
|
|
48
|
+
idcard: string;
|
|
49
|
+
qq: string;
|
|
50
|
+
phone: string;
|
|
51
|
+
money: string;
|
|
52
|
+
zh: string;
|
|
53
|
+
date: string;
|
|
54
|
+
zip: string;
|
|
55
|
+
len: string;
|
|
56
|
+
min: string;
|
|
57
|
+
minLength: string;
|
|
58
|
+
minItems: string;
|
|
59
|
+
max: string;
|
|
60
|
+
maxLength: string;
|
|
61
|
+
maxItems: string;
|
|
62
|
+
maximum: string;
|
|
63
|
+
exclusiveMaximum: string;
|
|
64
|
+
minimum: string;
|
|
65
|
+
exclusiveMinimum: string;
|
|
66
|
+
whitespace: string;
|
|
67
|
+
enum: string;
|
|
68
|
+
const: string;
|
|
69
|
+
multipleOf: string;
|
|
70
|
+
maxProperties: string;
|
|
71
|
+
minProperties: string;
|
|
72
|
+
uniqueItems: string;
|
|
73
|
+
};
|
|
74
|
+
'en-US': {
|
|
75
|
+
pattern: string;
|
|
76
|
+
invalid: string;
|
|
77
|
+
required: string;
|
|
78
|
+
number: string;
|
|
79
|
+
integer: string;
|
|
80
|
+
url: string;
|
|
81
|
+
email: string;
|
|
82
|
+
ipv6: string;
|
|
83
|
+
ipv4: string;
|
|
84
|
+
idcard: string;
|
|
85
|
+
qq: string;
|
|
86
|
+
phone: string;
|
|
87
|
+
money: string;
|
|
88
|
+
zh: string;
|
|
89
|
+
date: string;
|
|
90
|
+
zip: string;
|
|
91
|
+
len: string;
|
|
92
|
+
min: string;
|
|
93
|
+
minLength: string;
|
|
94
|
+
minItems: string;
|
|
95
|
+
maximum: string;
|
|
96
|
+
exclusiveMaximum: string;
|
|
97
|
+
minimum: string;
|
|
98
|
+
exclusiveMinimum: string;
|
|
99
|
+
max: string;
|
|
100
|
+
maxLength: string;
|
|
101
|
+
maxItems: string;
|
|
102
|
+
whitespace: string;
|
|
103
|
+
enum: string;
|
|
104
|
+
const: string;
|
|
105
|
+
multipleOf: string;
|
|
106
|
+
maxProperties: string;
|
|
107
|
+
minProperties: string;
|
|
108
|
+
uniqueItems: string;
|
|
109
|
+
};
|
|
110
|
+
'zh-CN': {
|
|
111
|
+
pattern: string;
|
|
112
|
+
invalid: string;
|
|
113
|
+
required: string;
|
|
114
|
+
number: string;
|
|
115
|
+
integer: string;
|
|
116
|
+
url: string;
|
|
117
|
+
email: string;
|
|
118
|
+
ipv6: string;
|
|
119
|
+
ipv4: string;
|
|
120
|
+
idcard: string;
|
|
121
|
+
qq: string;
|
|
122
|
+
phone: string;
|
|
123
|
+
money: string;
|
|
124
|
+
zh: string;
|
|
125
|
+
date: string;
|
|
126
|
+
zip: string;
|
|
127
|
+
len: string;
|
|
128
|
+
min: string;
|
|
129
|
+
minLength: string;
|
|
130
|
+
minItems: string;
|
|
131
|
+
maxLength: string;
|
|
132
|
+
maxItems: string;
|
|
133
|
+
max: string;
|
|
134
|
+
maximum: string;
|
|
135
|
+
exclusiveMaximum: string;
|
|
136
|
+
minimum: string;
|
|
137
|
+
exclusiveMinimum: string;
|
|
138
|
+
whitespace: string;
|
|
139
|
+
enum: string;
|
|
140
|
+
const: string;
|
|
141
|
+
multipleOf: string;
|
|
142
|
+
maxProperties: string;
|
|
143
|
+
minProperties: string;
|
|
144
|
+
uniqueItems: string;
|
|
145
|
+
};
|
|
146
|
+
'zh-TW': {
|
|
147
|
+
pattern: string;
|
|
148
|
+
invalid: string;
|
|
149
|
+
required: string;
|
|
150
|
+
number: string;
|
|
151
|
+
integer: string;
|
|
152
|
+
url: string;
|
|
153
|
+
email: string;
|
|
154
|
+
ipv6: string;
|
|
155
|
+
ipv4: string;
|
|
156
|
+
idcard: string;
|
|
157
|
+
qq: string;
|
|
158
|
+
phone: string;
|
|
159
|
+
money: string;
|
|
160
|
+
zh: string;
|
|
161
|
+
date: string;
|
|
162
|
+
zip: string;
|
|
163
|
+
len: string;
|
|
164
|
+
min: string;
|
|
165
|
+
minItems: string;
|
|
166
|
+
minLength: string;
|
|
167
|
+
max: string;
|
|
168
|
+
maxItems: string;
|
|
169
|
+
maxLength: string;
|
|
170
|
+
maximum: string;
|
|
171
|
+
exclusiveMaximum: string;
|
|
172
|
+
minimum: string;
|
|
173
|
+
exclusiveMinimum: string;
|
|
174
|
+
whitespace: string;
|
|
175
|
+
enum: string;
|
|
176
|
+
const: string;
|
|
177
|
+
multipleOf: string;
|
|
178
|
+
maxProperties: string;
|
|
179
|
+
minProperties: string;
|
|
180
|
+
uniqueItems: string;
|
|
181
|
+
};
|
|
182
|
+
ja: {
|
|
183
|
+
url: string;
|
|
184
|
+
whitespace: string;
|
|
185
|
+
zh: string;
|
|
186
|
+
zip: string;
|
|
187
|
+
date: string;
|
|
188
|
+
email: string;
|
|
189
|
+
exclusiveMaximum: string;
|
|
190
|
+
exclusiveMinimum: string;
|
|
191
|
+
idcard: string;
|
|
192
|
+
integer: string;
|
|
193
|
+
ipv4: string;
|
|
194
|
+
ipv6: string;
|
|
195
|
+
len: string;
|
|
196
|
+
max: string;
|
|
197
|
+
maxItems: string;
|
|
198
|
+
maxLength: string;
|
|
199
|
+
maximum: string;
|
|
200
|
+
min: string;
|
|
201
|
+
minItems: string;
|
|
202
|
+
minLength: string;
|
|
203
|
+
minimum: string;
|
|
204
|
+
money: string;
|
|
205
|
+
number: string;
|
|
206
|
+
pattern: string;
|
|
207
|
+
invalid: string;
|
|
208
|
+
phone: string;
|
|
209
|
+
qq: string;
|
|
210
|
+
required: string;
|
|
211
|
+
enum: string;
|
|
212
|
+
cons: string;
|
|
213
|
+
multipleOf: string;
|
|
214
|
+
maxProperties: string;
|
|
215
|
+
minProperties: string;
|
|
216
|
+
uniqueItems: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
export default _default;
|