Initial React project

This commit is contained in:
Johan
2026-03-23 07:49:45 +01:00
parent 8d33465f51
commit e204032b56
1353 changed files with 23853 additions and 50282 deletions

5
node_modules/ajv/lib/ajv.d.ts generated vendored
View File

@@ -203,11 +203,6 @@ declare namespace ajv {
logger?: CustomLogger | false;
nullable?: boolean;
serialize?: ((schema: object | boolean) => any) | false;
regExp?: (pattern: string) => RegExpLike;
}
interface RegExpLike {
test: (s: string) => boolean;
}
type FormatValidator = string | RegExp | ((data: string) => boolean | PromiseLike<any>);

View File

@@ -42,11 +42,6 @@ function compile(schema, root, localRefs, baseId) {
, defaultsHash = {}
, customRules = [];
function patternCode(i, patterns) {
var regExpCode = opts.regExp ? 'regExp' : 'new RegExp';
return 'var pattern' + i + ' = ' + regExpCode + '(' + util.toQuotedString(patterns[i]) + ');';
}
root = root || { schema: schema, refVal: refVal, refs: refs };
var c = checkCompiling.call(this, schema, root, baseId);
@@ -133,7 +128,6 @@ function compile(schema, root, localRefs, baseId) {
'equal',
'ucs2length',
'ValidationError',
'regExp',
sourceCode
);
@@ -147,8 +141,7 @@ function compile(schema, root, localRefs, baseId) {
customRules,
equal,
ucs2length,
ValidationError,
opts.regExp
ValidationError
);
refVal[0] = validate;
@@ -365,6 +358,11 @@ function compIndex(schema, root, baseId) {
}
function patternCode(i, patterns) {
return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';
}
function defaultCode(i) {
return 'var default' + i + ' = defaults[' + i + '];';
}

19
node_modules/ajv/lib/dot/pattern.jst generated vendored
View File

@@ -4,22 +4,11 @@
{{# def.$data }}
{{
var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp';
var $regexp = $isData
? '(new RegExp(' + $schemaValue + '))'
: it.usePattern($schema);
}}
{{? $isData }}
var {{=$valid}} = true;
try {
{{=$valid}} = {{=$regExpCode}}({{=$schemaValue}}).test({{=$data}});
} catch(e) {
{{=$valid}} = false;
}
if ({{# def.$dataNotType:'string' }} !{{=$valid}}) {
{{??}}
{{
var $regexp = it.usePattern($schema);
}}
if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
{{?}}
if ({{# def.$dataNotType:'string' }} !{{=$regexp}}.test({{=$data}}) ) {
{{# def.error:'pattern' }}
} {{? $breakOnError }} else { {{?}}

View File

@@ -8,7 +8,6 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
@@ -17,21 +16,12 @@ module.exports = function generate_pattern(it, $keyword, $ruleType) {
} else {
$schemaValue = $schema;
}
var $regExpCode = it.opts.regExp ? 'regExp' : 'new RegExp';
var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);
out += 'if ( ';
if ($isData) {
out += ' var ' + ($valid) + ' = true; try { ' + ($valid) + ' = ' + ($regExpCode) + '(' + ($schemaValue) + ').test(' + ($data) + '); } catch(e) { ' + ($valid) + ' = false; } if ( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
}
out += ' !' + ($valid) + ') {';
} else {
var $regexp = it.usePattern($schema);
out += ' if ( ';
if ($isData) {
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
}
out += ' !' + ($regexp) + '.test(' + ($data) + ') ) {';
out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || ';
}
out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */