@ja-platform/parser-schema 0.0.0-dev-20261019214152 → 0.0.0-dev-20261021194038
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/@types/day/Day.d.ts +48 -4
- package/dist/@types/expressions/parseParameterValueProvider.d.ts +5 -0
- package/dist/@types/index.d.ts +6 -6
- package/dist/@types/schema/Schema.d.ts +6 -22
- package/dist/@types/schema/TypeFactory.d.ts +3 -4
- package/dist/@types/schema/fieldMetadata.d.ts +5 -0
- package/dist/@types/types/EnumOption.d.ts +0 -2
- package/dist/@types/types/Field.d.ts +24 -0
- package/dist/@types/types/Param.d.ts +4 -4
- package/dist/@types/types/SchemaModelType.d.ts +9 -25
- package/dist/@types/types/primitives/Date.d.ts +2 -1
- package/dist/day/Day.js +89 -97
- package/dist/day/Day.js.map +1 -1
- package/dist/expressions/parseParameterValueProvider.js +13 -0
- package/dist/expressions/parseParameterValueProvider.js.map +1 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/schema/Schema.js +7 -69
- package/dist/schema/Schema.js.map +1 -1
- package/dist/schema/TypeFactory.js.map +1 -1
- package/dist/schema/fieldMetadata.js +35 -0
- package/dist/schema/fieldMetadata.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/EnumOption.js.map +1 -1
- package/dist/types/Field.js +28 -0
- package/dist/types/Field.js.map +1 -0
- package/dist/types/Param.js +2 -12
- package/dist/types/Param.js.map +1 -1
- package/dist/types/SchemaModelType.js +4 -28
- package/dist/types/SchemaModelType.js.map +1 -1
- package/dist/types/primitives/Date.js +8 -7
- package/dist/types/primitives/Date.js.map +1 -1
- package/package.json +5 -8
- package/dist/@types/Version.d.ts +0 -19
- package/dist/@types/day/DayConstructorInterface.d.ts +0 -50
- package/dist/@types/day/DayInterface.d.ts +0 -34
- package/dist/@types/day/index.d.ts +0 -2
- package/dist/@types/schema/SchemaParserErrors.d.ts +0 -10
- package/dist/@types/schema/reservedNames.d.ts +0 -7
- package/dist/@types/schema/schemaParser.d.ts +0 -43
- package/dist/@types/schema/schemaSerializer.d.ts +0 -11
- package/dist/@types/types/FunctionType.d.ts +0 -15
- package/dist/@types/types/Variable.d.ts +0 -32
- package/dist/Version.js +0 -76
- package/dist/Version.js.map +0 -1
- package/dist/day/DayConstructorInterface.js +0 -3
- package/dist/day/DayConstructorInterface.js.map +0 -1
- package/dist/day/DayInterface.js +0 -3
- package/dist/day/DayInterface.js.map +0 -1
- package/dist/day/index.js +0 -19
- package/dist/day/index.js.map +0 -1
- package/dist/schema/SchemaParserErrors.js +0 -26
- package/dist/schema/SchemaParserErrors.js.map +0 -1
- package/dist/schema/reservedNames.js +0 -101
- package/dist/schema/reservedNames.js.map +0 -1
- package/dist/schema/schemaParser.js +0 -1135
- package/dist/schema/schemaParser.js.map +0 -1
- package/dist/schema/schemaSerializer.js +0 -181
- package/dist/schema/schemaSerializer.js.map +0 -1
- package/dist/types/FunctionType.js +0 -30
- package/dist/types/FunctionType.js.map +0 -1
- package/dist/types/Variable.js +0 -49
- package/dist/types/Variable.js.map +0 -1
package/dist/schema/Schema.js
CHANGED
|
@@ -1,59 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.Schema = void 0;
|
|
37
|
-
exports.parser2 = parser2;
|
|
38
|
-
exports.parser3 = parser3;
|
|
39
|
-
const Version_1 = require("../Version");
|
|
40
|
-
const FunctionType_1 = require("../types/FunctionType");
|
|
41
4
|
const Param_1 = require("../types/Param");
|
|
42
|
-
const
|
|
43
|
-
const Variable_1 = require("../types/Variable");
|
|
5
|
+
const Field_1 = require("../types/Field");
|
|
44
6
|
const Relationship_1 = require("../types/Relationship");
|
|
45
7
|
const SchemaModelType_1 = require("../types/SchemaModelType");
|
|
46
8
|
const primitives_1 = require("../types/primitives");
|
|
47
9
|
const TypeFactory_1 = require("./TypeFactory");
|
|
48
10
|
class Schema {
|
|
49
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Create an empty resolved schema, independently of its input format.
|
|
13
|
+
*/
|
|
50
14
|
constructor() {
|
|
51
15
|
this.typeFactories = {};
|
|
52
16
|
this.objects = {};
|
|
53
|
-
this.
|
|
54
|
-
this.registerTypeFactory(new Variable_1.VariableFactory());
|
|
17
|
+
this.registerTypeFactory(new Field_1.FieldFactory());
|
|
55
18
|
this.registerTypeFactory(new Param_1.ParamFactory());
|
|
56
|
-
this.registerTypeFactory(new FunctionType_1.FunctionTypeFactory());
|
|
57
19
|
this.registerTypeFactory(new SchemaModelType_1.SchemaModelTypeFactory());
|
|
58
20
|
this.registerTypeFactory(new Relationship_1.RelationshipTypeFactory());
|
|
59
21
|
// Register all the primitive types
|
|
@@ -67,9 +29,9 @@ class Schema {
|
|
|
67
29
|
getFactory(name) {
|
|
68
30
|
return this.typeFactories[name];
|
|
69
31
|
}
|
|
70
|
-
|
|
32
|
+
field(name, type) {
|
|
71
33
|
const _type = typeof type === 'string' ? this.getType(type) : type;
|
|
72
|
-
return this.getFactory(
|
|
34
|
+
return this.getFactory(Field_1.Field.TYPE).generate({ schema: this, name, type: _type });
|
|
73
35
|
}
|
|
74
36
|
param(name, type) {
|
|
75
37
|
const _type = typeof type === 'string' ? this.getType(type) : type;
|
|
@@ -81,9 +43,6 @@ class Schema {
|
|
|
81
43
|
newRelationship() {
|
|
82
44
|
return this.getFactory(Relationship_1.Relationship.TYPE).generate({ schema: this });
|
|
83
45
|
}
|
|
84
|
-
functionType() {
|
|
85
|
-
return this.getFactory(FunctionType_1.FunctionType.TYPE).generate({ schema: this });
|
|
86
|
-
}
|
|
87
46
|
// Given a type name, return the specified type. Returns `undefined` if the type is not found.
|
|
88
47
|
// The type name may refer to a primitive, or an object type defined in the schema.
|
|
89
48
|
getType(typeName) {
|
|
@@ -106,27 +65,6 @@ class Schema {
|
|
|
106
65
|
return null;
|
|
107
66
|
}
|
|
108
67
|
}
|
|
109
|
-
loadXml(rawxml, options = {}) {
|
|
110
|
-
const apiVersion = options.apiVersion || Version_1.DEFAULT; // Default to allowing only v2
|
|
111
|
-
let myParser = parser.parser(this, {
|
|
112
|
-
version: apiVersion,
|
|
113
|
-
recordSource: options.recordSource
|
|
114
|
-
});
|
|
115
|
-
myParser.parse(rawxml);
|
|
116
|
-
this.errors = myParser.getErrors();
|
|
117
|
-
return this;
|
|
118
|
-
}
|
|
119
|
-
toJSON() {
|
|
120
|
-
return {
|
|
121
|
-
objects: this.objects
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
68
|
}
|
|
125
69
|
exports.Schema = Schema;
|
|
126
|
-
function parser2(schema) {
|
|
127
|
-
return parser.parser(schema, { version: { v3: false } });
|
|
128
|
-
}
|
|
129
|
-
function parser3(schema) {
|
|
130
|
-
return parser.parser(schema, { version: { v3: true, v3_1: true } });
|
|
131
|
-
}
|
|
132
70
|
//# sourceMappingURL=Schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../src/schema/Schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Schema.js","sourceRoot":"","sources":["../../src/schema/Schema.ts"],"names":[],"mappings":";;;AAAA,0CAAqD;AACrD,0CAAqD;AACrD,wDAA8E;AAC9E,8DAAmF;AAEnF,oDAA0E;AAC1E,+CAAkE;AAQlE;IASE;;OAEG;IACH;QAXA,kBAAa,GAAmC,EAAE,CAAC;QAYjD,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAElB,IAAI,CAAC,mBAAmB,CAAC,IAAI,oBAAY,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,mBAAmB,CAAC,IAAI,oBAAY,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,mBAAmB,CAAC,IAAI,wCAAsB,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,mBAAmB,CAAC,IAAI,sCAAuB,EAAE,CAAC,CAAC;QAExD,mCAAmC;QACnC,KAAK,MAAM,aAAa,IAAI,MAAM,CAAC,IAAI,CAAC,6BAAgB,CAAC,EAAE,CAAC;YAC1D,IAAI,CAAC,mBAAmB,CAAC,IAAI,kCAAoB,CAAC,aAAkC,CAAC,CAAC,CAAC;QACzF,CAAC;I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mFAAmF;IACnF,OAAO,CAAuC,QAAW;QACvD,IAAI,QAAQ,IAAI,6BAAgB,EAAE,CAAC;YACjC,YAAY;YACZ,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAClC,CAAC;QACD,0CAA0C;QAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAoB,CAAC;IACnD,CAAC;IAED,SAAS,CAAuC,IAAO;QACrD,IAAI,CAAC,CAAC,IAAI,IAAI,6BAAgB,CAAC,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC5C,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;CACF","sourcesContent":["import { Param, ParamFactory } from '../types/Param';\nimport { Field, FieldFactory } from '../types/Field';\nimport { Relationship, RelationshipTypeFactory } from '../types/Relationship';\nimport { SchemaModelType, SchemaModelTypeFactory } from '../types/SchemaModelType';\nimport { Type } from '@ja-platform/parser-type-system';\nimport { PrimitiveTypeMap, PrimitiveTypeName } from '../types/primitives';\nimport { PrimitiveTypeFactory, TypeFactory } from './TypeFactory';\n\nexport type InferGetType<\n T extends string | PrimitiveTypeName,\n MAP extends { [key in PrimitiveTypeName]: new (...args: any[]) => Type } = PrimitiveTypeMap,\n Model extends SchemaModelType = SchemaModelType\n> = T extends PrimitiveTypeName ? InstanceType<MAP[T]> : Model;\n\nexport class Schema {\n typeFactories: { [key: string]: TypeFactory } = {};\n\n objects: { [index: string]: SchemaModelType };\n\n // these are used by the tern defs (legacy editor)\n apiVersion?;\n mobileUserType?;\n\n /**\n * Create an empty resolved schema, independently of its input format.\n */\n constructor() {\n this.objects = {};\n\n this.registerTypeFactory(new FieldFactory());\n this.registerTypeFactory(new ParamFactory());\n this.registerTypeFactory(new SchemaModelTypeFactory());\n this.registerTypeFactory(new RelationshipTypeFactory());\n\n // Register all the primitive types\n for (const primitiveName of Object.keys(PrimitiveTypeMap)) {\n this.registerTypeFactory(new PrimitiveTypeFactory(primitiveName as PrimitiveTypeName));\n }\n }\n\n registerTypeFactory(factory: TypeFactory) {\n this.typeFactories[factory.name] = factory;\n }\n\n getFactory(name: string) {\n return this.typeFactories[name];\n }\n\n /** Helper function to assist in creating variables */\n field<T extends Type = Type>(name?: string, type?: string): Field<T>;\n field<T extends Type = Type>(name?: string, type?: T): Field<T>;\n field<T extends Type = Type>(name?: string, type?: T | string): Field<T> {\n const _type = typeof type === 'string' ? this.getType(type) : type;\n return this.getFactory(Field.TYPE).generate<T>({ schema: this, name, type: _type });\n }\n\n param<T extends Type = Type>(name?: string, type?: string): Param<T>;\n param<T extends Type = Type>(name?: string, type?: T): Param<T>;\n param<T extends Type = Type>(name?: string, type?: T | string): Param<T> {\n const _type = typeof type === 'string' ? this.getType(type) : type;\n return this.getFactory(Param.TYPE).generate<T>({ schema: this, name, type: _type });\n }\n\n newObjectType(name?: string) {\n return this.getFactory(SchemaModelType.TYPE).generate({ schema: this, name }) as SchemaModelType;\n }\n\n newRelationship() {\n return this.getFactory(Relationship.TYPE).generate({ schema: this }) as Relationship;\n }\n\n // Given a type name, return the specified type. Returns `undefined` if the type is not found.\n // The type name may refer to a primitive, or an object type defined in the schema.\n getType<T extends string | PrimitiveTypeName>(typeName: T): InferGetType<T> {\n if (typeName in PrimitiveTypeMap) {\n // primitive\n return this.primitive(typeName);\n }\n // not a primitive - most likely an object\n return this.objects[typeName] as InferGetType<T>;\n }\n\n primitive<T extends string | PrimitiveTypeName>(name: T): InferGetType<T> {\n if (!(name in PrimitiveTypeMap)) {\n return null;\n }\n const factory = this.getFactory(name);\n if (factory) {\n return factory.generate({ schema: this });\n } else {\n return null;\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeFactory.js","sourceRoot":"","sources":["../../src/schema/TypeFactory.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TypeFactory.js","sourceRoot":"","sources":["../../src/schema/TypeFactory.ts"],"names":[],"mappings":";;;AAEA,oDAAiG;AAmBjG;IAME,YAAY,IAAoB;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAGF;;AAED;IAKE,YAAY,IAAuB;QACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,QAAQ,CAAC,KAAQ;QACf,MAAM,QAAQ,GAAG,IAAI,6BAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACnD,OAAO,QAAa,CAAC;IACvB,CAAC;CACF","sourcesContent":["import { SchemaModelType } from '../types/SchemaModelType';\nimport { Param } from '../types/Param';\nimport { PrimitiveTypeInstance, PrimitiveTypeMap, PrimitiveTypeName } from '../types/primitives';\nimport { Relationship } from '../types/Relationship';\nimport { Field } from '../types/Field';\nimport { Schema } from './Schema';\n\nexport interface TypeFactory<NAME extends string = string> {\n name: NAME;\n generate: <T>(event?: any) => any;\n}\n\nexport interface GenerateTypeEvent {\n schema: Schema;\n}\n\nexport type ObjectTypeInstance = Field<any> | Param | SchemaModelType | Relationship;\n\nexport type ObjectTypeName =\n typeof Param.TYPE | typeof Field.TYPE | typeof SchemaModelType.TYPE | typeof Relationship.TYPE;\n\nexport abstract class AbstractObjectTypeFactory<\n R extends ObjectTypeInstance = ObjectTypeInstance,\n E extends GenerateTypeEvent = GenerateTypeEvent\n> implements TypeFactory<ObjectTypeName> {\n name: ObjectTypeName;\n\n constructor(name: ObjectTypeName) {\n this.name = name;\n }\n\n abstract generate<T>(event: E): R;\n}\n\nexport class PrimitiveTypeFactory<\n T extends PrimitiveTypeInstance,\n E extends GenerateTypeEvent = GenerateTypeEvent\n> implements TypeFactory<PrimitiveTypeName> {\n name: PrimitiveTypeName;\n constructor(name: PrimitiveTypeName) {\n this.name = name;\n }\n generate(event: E): T {\n const instance = new PrimitiveTypeMap[this.name]();\n return instance as T;\n }\n}\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TEXT_SUBTYPES = exports.textSubtypeSpecs = exports.ATTACHMENT_MEDIA_TYPES = void 0;
|
|
4
|
+
exports.ATTACHMENT_MEDIA_TYPES = [
|
|
5
|
+
'image/png',
|
|
6
|
+
'image/jpeg',
|
|
7
|
+
'image/svg+xml',
|
|
8
|
+
'application/pdf',
|
|
9
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
10
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
11
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
12
|
+
'application/vnd.ms-excel',
|
|
13
|
+
'application/msword',
|
|
14
|
+
'application/vnd.anritsu',
|
|
15
|
+
'application/vnd.valvelink',
|
|
16
|
+
'application/xml',
|
|
17
|
+
'text/plain',
|
|
18
|
+
'text/csv',
|
|
19
|
+
'any'
|
|
20
|
+
];
|
|
21
|
+
exports.textSubtypeSpecs = {
|
|
22
|
+
email: 'text.email',
|
|
23
|
+
address: 'text.address',
|
|
24
|
+
name: 'text.name',
|
|
25
|
+
url: 'text.url',
|
|
26
|
+
paragraph: 'text.paragraph',
|
|
27
|
+
'signed-number': 'number',
|
|
28
|
+
number: 'number', // TODO: fix
|
|
29
|
+
'south-african-id': 'number.za_id',
|
|
30
|
+
'phone-number': 'phone',
|
|
31
|
+
'decimal-number': 'decimal',
|
|
32
|
+
password: 'password'
|
|
33
|
+
};
|
|
34
|
+
exports.TEXT_SUBTYPES = Object.keys(exports.textSubtypeSpecs);
|
|
35
|
+
//# sourceMappingURL=fieldMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fieldMetadata.js","sourceRoot":"","sources":["../../src/schema/fieldMetadata.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;IACpC,WAAW;IACX,YAAY;IACZ,eAAe;IACf,iBAAiB;IACjB,2EAA2E;IAC3E,mEAAmE;IACnE,yEAAyE;IACzE,0BAA0B;IAC1B,oBAAoB;IACpB,yBAAyB;IACzB,2BAA2B;IAC3B,iBAAiB;IACjB,YAAY;IACZ,UAAU;IACV,KAAK;CACN,CAAC;AAEW,QAAA,gBAAgB,GAAgC;IAC3D,KAAK,EAAE,YAAY;IACnB,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,UAAU;IACf,SAAS,EAAE,gBAAgB;IAC3B,eAAe,EAAE,QAAQ;IACzB,MAAM,EAAE,QAAQ,EAAE,YAAY;IAC9B,kBAAkB,EAAE,cAAc;IAClC,cAAc,EAAE,OAAO;IACvB,gBAAgB,EAAE,SAAS;IAC3B,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEW,QAAA,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,QAAA,gBAAgB,CAAC,CAAC","sourcesContent":["export const ATTACHMENT_MEDIA_TYPES = [\n 'image/png',\n 'image/jpeg',\n 'image/svg+xml',\n 'application/pdf',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.ms-excel',\n 'application/msword',\n 'application/vnd.anritsu',\n 'application/vnd.valvelink',\n 'application/xml',\n 'text/plain',\n 'text/csv',\n 'any'\n];\n\nexport const textSubtypeSpecs: { [index: string]: string } = {\n email: 'text.email',\n address: 'text.address',\n name: 'text.name',\n url: 'text.url',\n paragraph: 'text.paragraph',\n 'signed-number': 'number',\n number: 'number', // TODO: fix\n 'south-african-id': 'number.za_id',\n 'phone-number': 'phone',\n 'decimal-number': 'decimal',\n password: 'password'\n};\n\nexport const TEXT_SUBTYPES = Object.keys(textSubtypeSpecs);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"7.0.2","root":[89,[128,129],[143,161],[163,171],[183,188]],"packageJsons":["../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/package.json","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/package.json","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/package.json","../../../node_modules/.pnpm/moment@2.31.0/node_modules/moment/package.json","../../expressions/package.json","../package.json","../../type-system/package.json"],"missingPackageJsons":["../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/package.json","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/package.json","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/package.json","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/domparser/types/package.json","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/package.json","../../../node_modules/.pnpm/moment@2.31.0/node_modules/moment/ts3.1-typings/package.json","../node_modules/@journeyapps/domparser/types/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../src/Version.ts","../../expressions/dist/@types/tokens/AbstractToken.d.ts","../../expressions/dist/@types/tokens/text/TextToken.d.ts","../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/index.d.ts","../../expressions/dist/@types/tokens/code/CodeToken.d.ts","../../expressions/dist/@types/tokens/code/JSToken.d.ts","../../expressions/dist/@types/tokens/code/PrefixToken.d.ts","../../expressions/dist/@types/tokens/code/IdentifierToken.d.ts","../../type-system/dist/@types/Formatter.d.ts","../../type-system/dist/@types/Type.d.ts","../../type-system/dist/@types/ObjectType.d.ts","../../type-system/dist/@types/ArrayType.d.ts","../../type-system/dist/@types/UnknownType.d.ts","../../type-system/dist/@types/ScalarType.d.ts","../../type-system/dist/@types/TextType.d.ts","../../type-system/dist/@types/NumberType.d.ts","../../type-system/dist/@types/IntegerType.d.ts","../../type-system/dist/@types/BooleanType.d.ts","../../type-system/dist/@types/index.d.ts","../../expressions/dist/@types/definitions/ValidationContext.d.ts","../../expressions/dist/@types/expressions/AbstractExpression.d.ts","../../expressions/dist/@types/tokens/text/PlaceholderToken.d.ts","../../expressions/dist/@types/utils/tokenUtils.d.ts","../../expressions/dist/@types/tokens/index.d.ts","../../expressions/dist/@types/ExpressionParser.d.ts","../../expressions/dist/@types/CombinedParser.d.ts","../../expressions/dist/@types/expressions/EvaluatedExpression.d.ts","../../expressions/dist/@types/expressions/shorthand/ShorthandExpression.d.ts","../../expressions/dist/@types/expressions/shorthand/FormatShorthandExpression.d.ts","../../expressions/dist/@types/expressions/constant/ConstantExpression.d.ts","../../expressions/dist/@types/expressions/function/FunctionExpression.d.ts","../../expressions/dist/@types/expressions/text/AbstractFormatExpression.d.ts","../../expressions/dist/@types/expressions/text/FormatStringExpression.d.ts","../../expressions/dist/@types/expressions/index.d.ts","../../expressions/dist/@types/utils/parserUtils.d.ts","../../expressions/dist/@types/code-parsers/CodeParser.d.ts","../../expressions/dist/@types/code-parsers/JavaScriptParser.d.ts","../../expressions/dist/@types/utils/valueFormatting.d.ts","../../expressions/dist/@types/index.d.ts","../src/expressions/SchemaObjectDisplayExpression.ts","../src/types/QueryType.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLAttributePosition.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLPosition.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLLocator.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/sax.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLError.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/IterableNodeList.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLNode.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/DOMImplementation.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLDocument.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLAttribute.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLElement.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/types.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/types.d.ts","../src/types/Variable.ts","../src/types/Relationship.ts","../src/schema/ModelIndex.ts","../src/types/primitives/attachments/Attachment.ts","../src/types/primitives/Text.ts","../src/types/EnumOption.ts","../src/types/primitives/ChoiceType.ts","../src/types/primitives/Boolean.ts","../src/types/primitives/Location.ts","../src/types/primitives/GeoTrack.ts","../src/types/primitives/SingleChoice.ts","../src/types/primitives/SingleChoiceInteger.ts","../src/types/primitives/MultipleChoice.ts","../src/types/primitives/MultipleChoiceInteger.ts","../src/day/DayInterface.ts","../src/day/DayConstructorInterface.ts","../src/day/Day.ts","../src/day/utils.ts","../src/day/index.ts","../../../node_modules/.pnpm/moment@2.31.0/node_modules/moment/ts3.1-typings/moment.d.ts","../src/types/primitives/Date.ts","../src/types/primitives/Datetime.ts","../src/types/primitives/attachments/Photo.ts","../src/types/primitives/attachments/Signature.ts","../src/types/primitives/index.ts","../src/types/SchemaModelType.ts","../src/types/Param.ts","../src/schema/TypeFactory.ts","../src/types/FunctionType.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/DOMParser.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/XMLSerializer.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/index.d.ts","../../../node_modules/.pnpm/@journeyapps+domparser@0.4.1/node_modules/@journeyapps/domparser/lib/node.d.ts","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/utils.d.ts","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/xml.d.ts","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/ElementBuilder.d.ts","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/OrderedIncrementalUpdater.d.ts","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/UnorderedIncrementalUpdater.d.ts","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/pretty.d.ts","../../../node_modules/.pnpm/@journeyapps+common-xml@0.0.0-dev-20261019030214/node_modules/@journeyapps/common-xml/dist/@types/index.d.ts","../src/schema/SchemaParserErrors.ts","../src/schema/reservedNames.ts","../src/schema/schemaParser.ts","../src/schema/Schema.ts","../src/schema/schemaSerializer.ts","../src/index.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f8401654610325c21098f3bb1decfe9","signature":"7c8df1fe68bb3ec7e6ad602e0fe79649","impliedNodeFormat":1},"510b0b622fafd6eff2bf5d020de046ee","f25290e9ca5aee09a0210e2a454437f8",{"version":"3575b2b8e50b5a5b3acce219e08900c5","impliedNodeFormat":99},"968dbf07ccc13a1a84f319c26e9909b3","354fc88481ff608fcbbfaf7851a29043","bf6d579deb9596ec514083ea94789be0","3058c9c4ad1200a2ff62094072deed53","e5fb7990b84f5089ba92554ea3614810","770ee32ef332fd48bfef508442b30edb","5c1b5931ee0c894699ca56f5b573f88a","822b842ad7efa3485d65fbeb2f919865","89b6053090a8d01f57cb8f521fae777d","26302a8b72d74f944dcf8f6452e54f7c","bc95bdb594a5aece18248fbf4387dd2e","90125a76f2ae701181f7e09dea41f3ad","ac52bb76ccad935a013384d2a71ab267","2c96eeb69afb823580d4e1e5f1b188e0","c06213bcb24cd658dfcd1239777159bd","ada7f0921b6eace272ee48028595ff4e","e518fcc525a72f156f4235f97e942e72","cf3121ca4479d3afdaceb690d14cf086","d33a7d16b8bb10392237228466f959f8","6af0ffa3e62b22f41a12a99343633ffd","c0cbc64b7a419382086b8d30226b8f0f","bb9d86257bed6b06d027b9b561ba2c31","e62a96adf38e2e5adbeb996a1bbb0ca6","358284d17020fff7c8988fe49465ebce","788ca99c9132de5f347c0c196085cc16","74a85c95eb3b8b1bd5c7d0822fe65312","f85883c070822e429d13802a651146bc","038c82b1bfec7b11761d58241d68970f","fa4b9cdace3ba0abd1e6547b87390de6","f616c8f4ac91b2029f1e1d5cc2d36adf","6844f7dcecd5297f9a25fe55fe7aeacc","e78cf9dc5bca6011a220581f56da19cb","25aba7d58ecafcf7098f9bcca63ea72a","90506d77482148f93c56044616613958","3a5ea1baf065ad0e1794aeb15153114c",{"version":"f9bd850e5e3a05926dbfc2a68d393e2f","signature":"aa250c74fe5a950a7dea8c41eba97441","impliedNodeFormat":1},{"version":"e15b8a94bffca79fb19f767e7feb2f64","signature":"a2614d5bf8c8a719715fad139f7d2849","impliedNodeFormat":1},"f558f985ebe1ce42b72be8c912969573","ff7a061c5f435c80a2a349d543f86e72","50862e2a2492e03ea2824ab1875c52af","a76554591e266d416e25df96ac911bdf","27f67da5915ef51c4901cd12cb8767bf","9e17756d0a90ba551619bf6c7f907dba","27d998630587d149eab2e51e9b5d249c","602c19dc70ea3b6fbece33923474c211","7c7b58b88032b59dd38bbaa8b353d6a6","43ee9f0a165b6a87c0cdf92e88770223","0fad5fcec194217c0b3485d74acd3f4a","875041413fd7d117a27c13837cde555b","3e7c71bd537f0b84e79b1e7596f940ed",{"version":"3bc3d1a2fa6a79fc07be05699199e9f8","signature":"87adaff3add20b9bfaaa50b82078a827","impliedNodeFormat":1},{"version":"0ed54f86ee92c964f950c9d44df12feb","signature":"44ebda1090b59085d1eeda6c2c25e4af","impliedNodeFormat":1},{"version":"0973156bf9ac211846a3984519c9ff9a","signature":"2d1c84be972f91834168ee8b45ef3260","impliedNodeFormat":1},{"version":"d9ec3b9d0e317b6e05cfca6d17a72c5b","signature":"01d13385ca95028b548f57422632cd10","impliedNodeFormat":1},{"version":"56f99034e7ca1de3f11e3942d42866a0","signature":"e1421b701f3826a978db13ebc309e2db","impliedNodeFormat":1},{"version":"401787d9f9172d7da21fc6aa8db2588e","signature":"f4986ec56683001e6a8549f15d5bd543","impliedNodeFormat":1},{"version":"853e1f8841cceac171473411e2890199","signature":"a017252f6e0a3f0b8f7812273df80ece","impliedNodeFormat":1},{"version":"4a44098fe761e3d312038c4f38bba8cd","signature":"4fdad46f00f0e8c18ff903eacb5cab67","impliedNodeFormat":1},{"version":"0d42efa8d0b08642ce89e89ecbafcbf3","signature":"4538c220c4065a35c60d00ac0baa8e76","impliedNodeFormat":1},{"version":"73fe0aa7eb191e1180dca2b3bac48fcd","signature":"363c6b7126845050cea9bd1b53a77a66","impliedNodeFormat":1},{"version":"4d52f2f9aff3960fd8112462c999364c","signature":"0b856f0bab913d03af59d1f4f0f59562","impliedNodeFormat":1},{"version":"0ea802eee8d188d1c8159b0791d10f20","signature":"8264702ad4ee79cdcbea078c3da56f14","impliedNodeFormat":1},{"version":"4bd3004fb92e43c60401993de8f08ec8","signature":"5d7211f45479b46afb44d4d8e573535b","impliedNodeFormat":1},{"version":"76c75ada51f066eceb74736c546e0dc6","signature":"ec0bba0a0909104c137edc876deb700c","impliedNodeFormat":1},{"version":"c108d63f7f4d2e042d0ee4d416321e92","signature":"f2542409ff52ea0c1201c9b70eb9191e","impliedNodeFormat":1},{"version":"f0ff0476b6105d1824008ad358c39797","signature":"9a240e12482f797705580ca8bc2b50cf","impliedNodeFormat":1},{"version":"3f364ffa446f346fff8269bdb6766dad","signature":"c32c8efbf6fd44a308cdc838ff9e1dc1","impliedNodeFormat":1},{"version":"ecde8511f785827876f35c97838f2217","signature":"df8eef6e7eccf796eb60b204e7fb0f8c","impliedNodeFormat":1},"ea118bed5e5727f1df5b6a3d33f3c8a4","bdce55db2d0ce77261b470a9b7a64095",{"version":"1ce4fa0fb75df8760ae9f1622378c7d3","signature":"5191ff9a499cbe75cb5cea42e18e7366","impliedNodeFormat":1},{"version":"37716ac94c7c13750508fe67b1985b58","signature":"d964aada007f95d0dd07460963f68a0c","impliedNodeFormat":1},{"version":"efd1d130a0976975bd2013c01a9c2d30","signature":"402d2259e74ccac3588d639c08e81545","impliedNodeFormat":1},{"version":"edb60acfe3d08ded876343643d1f89bc","signature":"e95214003cc4a559b833b4ecf52f2d92","impliedNodeFormat":1},{"version":"6e7df691e9383dcc50b10a35e152c948","signature":"69f847a0a3ca0c866ac328c9348cbe04","impliedNodeFormat":1},{"version":"ec71d8db5ab118b767e675105dbabe10","signature":"1e4a29a7a8ab0ce9d9e78a520a8131f3","impliedNodeFormat":1},{"version":"5377ba60358b03ea2e8b139a66acf7e4","signature":"0cb2c57dfb2276f1dc0063e11c6902da","impliedNodeFormat":1},{"version":"4510a34b9f215ac81026c826dab21a27","signature":"8e466150c7c39f62a929ef74ee260bb3","impliedNodeFormat":1},{"version":"ef87e742f0aa427b486905bbcba063bf","signature":"e05087c482f56c94dd55c70dd7df3aea","impliedNodeFormat":1},"69ba01ec4a33c8126ed828da667571bd","b9959d639a18286be9e9d83b6b1da007","823c910f963471c65a1c04a121f9b4ab","3e15aa2a943c067de869e5c53f1a21b9","98aa14b495bd98e4614b3d50a2ef0cb8","6d6720001a8a47042cc706b38b299852","cf58352de20e355961e2a75cef58c108","20af2d9439a26ac69bab262902bfaafa","0e1277b2726522560754f70472573bfc","30a9bfe7853325a17d1af741ce338234","f5a016b71d7bfddcb7ea23b71ae69f49",{"version":"09e92d84563429c3eef4ad4ba73aa782","signature":"b00638854e8e46900e2ab0ed2a4da733","impliedNodeFormat":1},{"version":"7f9ec44168e788e7051fb08a1bd9f8d9","signature":"2e505e43504ce41f07046ce76a67b630","impliedNodeFormat":1},{"version":"79363875a189ed5e6998040f0fd61d28","signature":"70409422de5221ab5536caae8fa0ddba","impliedNodeFormat":1},{"version":"dbe38d025235e6596379613afe5c2b59","signature":"ef0ed7c4becf79df46049a697bc76679","impliedNodeFormat":1},{"version":"7ab0f94cc232e204182ddec528f1503f","signature":"4452187f753679744bc00b27bba870d4","impliedNodeFormat":1},{"version":"282d6da8b128549184d5d59d6e9e7d83","signature":"ae06b4e1aec0de1980582df1554f66a5","impliedNodeFormat":1}],"fileIdsList":[[142],[142,178],[176,177,178,179,180,181],[142,175,176],[136,138],[137,138],[136],[136,140],[132,134,135,136,137,140],[130,135,136,138,139],[131,132,133],[131],[135,138,140],[141,172,173],[174],[131,134,135,136,137,138,139,140],[141],[109,112,113],[109,112],[92,124],[107,112],[108,112],[107,109,112,113],[109,112,113,115],[109,115,116,117,118,119,120,121],[112,113,116],[107,108,109,112,113],[108,109,112,113],[112,115,116,120],[108,112,113,114,122,123,124,125,126],[90],[92,93],[90,91,93,94,95,96,110,111],[90,109],[112,122],[90,93,94],[107],[157,158],[157],[159,160],[127],[89,107,128,129,143,144,148,161,167,168,169,170,171,185,186,187],[89,107,142,143,144,167,168,169,170,171,182,185],[142,182],[143,144,167,168,169,171,186],[182],[107,127,128,129,142,143,145,167,168,169,171,182,183,184,186],[142,143,167,182,186],[107,143,170],[107,127,143,170],[168,170],[107,128,129,142,143,144,145,167,170,186],[107,142,168,170],[107,149],[107,148],[107,161,162],[107,162],[107,147],[149],[148,149],[146],[107,146,147,149,150,151,152,153,154,155,156,163,164,165,166],[98],[98,102],[97],[97,98,99,100,101,102,103,104,105,106]],"options":{"composite":true,"declaration":true,"declarationDir":"./@types","inlineSources":true,"module":199,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":false,"stripInternal":true,"sourceMap":true,"target":4,"tsBuildInfoFile":"./tsconfig.tsbuildinfo","esModuleInterop":true},"referencedMap":[[178,1],[179,2],[180,2],[182,3],[181,1],[176,1],[177,4],[137,5],[172,6],[135,7],[139,8],[138,9],[140,10],[134,11],[132,12],[136,13],[173,7],[174,14],[175,15],[141,16],[142,17],[114,18],[113,19],[125,20],[108,21],[109,22],[115,18],[118,23],[119,24],[122,25],[117,26],[116,27],[120,28],[121,29],[127,30],[93,31],[96,31],[94,32],[95,31],[112,33],[110,34],[91,31],[123,35],[111,36],[126,37],[159,38],[158,39],[161,40],[128,41],[188,42],[186,43],[183,44],[170,45],[184,46],[185,47],[187,48],[148,1],[171,49],[169,50],[129,37],[144,51],[168,52],[143,53],[150,54],[149,55],[163,56],[164,57],[152,37],[151,58],[155,59],[156,59],[153,59],[154,60],[147,37],[146,37],[165,61],[166,61],[167,62],[100,63],[106,64],[105,64],[104,64],[99,63],[102,63],[103,64],[98,65],[101,63],[107,66]],"latestChangedDtsFile":"./@types/index.d.ts"}
|
|
1
|
+
{"version":"7.0.2","root":[[130,147],[149,160]],"packageJsons":["../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/package.json","../../../node_modules/.pnpm/moment@2.31.0/node_modules/moment/package.json","../../expressions/package.json","../package.json","../../type-system/package.json"],"missingPackageJsons":["../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/package.json","../../../node_modules/.pnpm/moment@2.31.0/node_modules/moment/ts3.1-typings/package.json"],"fileNames":["lib.es5.d.ts","lib.es2015.d.ts","lib.es2016.d.ts","lib.es2017.d.ts","lib.es2018.d.ts","lib.es2019.d.ts","lib.es2020.d.ts","lib.es2021.d.ts","lib.es2022.d.ts","lib.es2023.d.ts","lib.es2024.d.ts","lib.es2025.d.ts","lib.esnext.d.ts","lib.dom.d.ts","lib.es2015.core.d.ts","lib.es2015.collection.d.ts","lib.es2015.generator.d.ts","lib.es2015.iterable.d.ts","lib.es2015.promise.d.ts","lib.es2015.proxy.d.ts","lib.es2015.reflect.d.ts","lib.es2015.symbol.d.ts","lib.es2015.symbol.wellknown.d.ts","lib.es2016.array.include.d.ts","lib.es2016.intl.d.ts","lib.es2017.arraybuffer.d.ts","lib.es2017.date.d.ts","lib.es2017.object.d.ts","lib.es2017.sharedmemory.d.ts","lib.es2017.string.d.ts","lib.es2017.intl.d.ts","lib.es2017.typedarrays.d.ts","lib.es2018.asyncgenerator.d.ts","lib.es2018.asynciterable.d.ts","lib.es2018.intl.d.ts","lib.es2018.promise.d.ts","lib.es2018.regexp.d.ts","lib.es2019.array.d.ts","lib.es2019.object.d.ts","lib.es2019.string.d.ts","lib.es2019.symbol.d.ts","lib.es2019.intl.d.ts","lib.es2020.bigint.d.ts","lib.es2020.date.d.ts","lib.es2020.promise.d.ts","lib.es2020.sharedmemory.d.ts","lib.es2020.string.d.ts","lib.es2020.symbol.wellknown.d.ts","lib.es2020.intl.d.ts","lib.es2020.number.d.ts","lib.es2021.promise.d.ts","lib.es2021.string.d.ts","lib.es2021.weakref.d.ts","lib.es2021.intl.d.ts","lib.es2022.array.d.ts","lib.es2022.error.d.ts","lib.es2022.intl.d.ts","lib.es2022.object.d.ts","lib.es2022.string.d.ts","lib.es2022.regexp.d.ts","lib.es2023.array.d.ts","lib.es2023.collection.d.ts","lib.es2023.intl.d.ts","lib.es2024.arraybuffer.d.ts","lib.es2024.collection.d.ts","lib.es2024.object.d.ts","lib.es2024.promise.d.ts","lib.es2024.regexp.d.ts","lib.es2024.sharedmemory.d.ts","lib.es2024.string.d.ts","lib.es2025.collection.d.ts","lib.es2025.float16.d.ts","lib.es2025.intl.d.ts","lib.es2025.iterator.d.ts","lib.es2025.promise.d.ts","lib.es2025.regexp.d.ts","lib.esnext.array.d.ts","lib.esnext.collection.d.ts","lib.esnext.date.d.ts","lib.esnext.decorators.d.ts","lib.esnext.disposable.d.ts","lib.esnext.error.d.ts","lib.esnext.intl.d.ts","lib.esnext.sharedmemory.d.ts","lib.esnext.temporal.d.ts","lib.esnext.typedarrays.d.ts","lib.decorators.d.ts","lib.decorators.legacy.d.ts","../../expressions/dist/@types/tokens/AbstractToken.d.ts","../../expressions/dist/@types/tokens/DelimiterToken.d.ts","../../expressions/dist/@types/tokens/EnumToken.d.ts","../../expressions/dist/@types/tokens/text/TextToken.d.ts","../../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/index.d.ts","../../expressions/dist/@types/tokens/code/CodeToken.d.ts","../../expressions/dist/@types/tokens/code/JSToken.d.ts","../../expressions/dist/@types/tokens/code/PrefixToken.d.ts","../../expressions/dist/@types/tokens/code/IdentifierToken.d.ts","../../type-system/dist/@types/Formatter.d.ts","../../type-system/dist/@types/Type.d.ts","../../type-system/dist/@types/ObjectType.d.ts","../../type-system/dist/@types/ArrayType.d.ts","../../type-system/dist/@types/UnknownType.d.ts","../../type-system/dist/@types/ScalarType.d.ts","../../type-system/dist/@types/TextType.d.ts","../../type-system/dist/@types/NumberType.d.ts","../../type-system/dist/@types/IntegerType.d.ts","../../type-system/dist/@types/BooleanType.d.ts","../../type-system/dist/@types/index.d.ts","../../expressions/dist/@types/definitions/ValidationContext.d.ts","../../expressions/dist/@types/expressions/AbstractExpression.d.ts","../../expressions/dist/@types/tokens/text/PlaceholderToken.d.ts","../../expressions/dist/@types/utils/tokenUtils.d.ts","../../expressions/dist/@types/tokens/index.d.ts","../../expressions/dist/@types/ExpressionParser.d.ts","../../expressions/dist/@types/CombinedParser.d.ts","../../expressions/dist/@types/expressions/ListExpression.d.ts","../../expressions/dist/@types/expressions/EvaluatedExpression.d.ts","../../expressions/dist/@types/expressions/shorthand/ShorthandExpression.d.ts","../../expressions/dist/@types/expressions/shorthand/FormatShorthandExpression.d.ts","../../expressions/dist/@types/expressions/constant/ConstantExpression.d.ts","../../expressions/dist/@types/expressions/function/FunctionExpression.d.ts","../../expressions/dist/@types/expressions/text/AbstractFormatExpression.d.ts","../../expressions/dist/@types/expressions/text/FormatStringExpression.d.ts","../../expressions/dist/@types/expressions/index.d.ts","../../expressions/dist/@types/utils/parserUtils.d.ts","../../expressions/dist/@types/code-parsers/CodeParser.d.ts","../../expressions/dist/@types/code-parsers/JavaScriptParser.d.ts","../../expressions/dist/@types/utils/valueFormatting.d.ts","../../expressions/dist/@types/index.d.ts","../src/expressions/SchemaObjectDisplayExpression.ts","../src/types/QueryType.ts","../src/types/Field.ts","../src/types/Relationship.ts","../src/schema/ModelIndex.ts","../src/types/primitives/attachments/Attachment.ts","../src/types/primitives/Text.ts","../src/types/EnumOption.ts","../src/types/primitives/ChoiceType.ts","../src/types/primitives/Boolean.ts","../src/types/primitives/Location.ts","../src/types/primitives/GeoTrack.ts","../src/types/primitives/SingleChoice.ts","../src/types/primitives/SingleChoiceInteger.ts","../src/types/primitives/MultipleChoice.ts","../src/types/primitives/MultipleChoiceInteger.ts","../src/day/utils.ts","../src/day/Day.ts","../../../node_modules/.pnpm/moment@2.31.0/node_modules/moment/ts3.1-typings/moment.d.ts","../src/types/primitives/Date.ts","../src/types/primitives/Datetime.ts","../src/types/primitives/attachments/Photo.ts","../src/types/primitives/attachments/Signature.ts","../src/types/primitives/index.ts","../src/types/SchemaModelType.ts","../src/schema/TypeFactory.ts","../src/types/Param.ts","../src/schema/Schema.ts","../src/schema/fieldMetadata.ts","../src/expressions/parseParameterValueProvider.ts","../src/index.ts"],"fileInfos":[{"version":"16934abaab7026ac114da441aabea1a0","affectsGlobalScope":true,"impliedNodeFormat":1},"d4306fb2e47f74835e8674ffac07d76f","e437c5c1302869326c3bb93da85bbbcf","e4324975a566567b21d350615f1fc6ac","333b1b9a2a9ac3b8497dba5c63b5ba50","6cffacd662b6eb5fa7a36aa2ea366bfa","b4c34f9c23304dbef2d23698637ed638","e5cb86a5fc491796ecd1d2dd348d208f","feb6c6fb19cdb246a5d8acb36a6901c7","9443a7f109277ffaa79d893ed2549995","793cee405385076e27c24f409659dccd","09f69c6610266eaee1ac9e3e30df2c71","62bad718844246b8e17547f37bad6085",{"version":"aae8996e8b5684814785a42cbbefcd79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"926204c28cd3d073865348473ae28d2e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f25e42c801b2cb3cf2b39792006a9beb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6344b55f26a4e81d9608777dbfb877dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3c0ed28e53d3695b363e256ec1c023fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4c2761daba7f17141c25baa0821ac5da","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b87656acabd63e69379ff6ffcfe52fc7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"597469522da047a5af5222cc6989f405","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1708ea4d34dc37fadadc63ca01127e80","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"55d97a8c6fbf34a30450a7b1e5f7a298","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0ee05eb59426d33e374226d8dcfa708b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e347c14030993906efcfbb88915b6a05","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b0231263857c9b6a03641acdc9280ceb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3b15c4a83b598cacb4067676e6f0abed","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b417d97b7934cef63b1889abec0bbfbf","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"09a6cf4032ebba60ce22a501e663f881","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2b056277dd138e8f5650fc04e20eaa8d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"e22cc07e3f3cc242ba52fa3f8ea1fc58","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2c45da767a1bfbb220848df1bc4029e4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b44c3e0fbaf2130cdcf6ac38b120ffa1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b612fb5cf8e5d964b92063a75207632a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"02705151a5e1551b9162a9ed8ab763f7","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"41025e398be9215d32e4337335da8f0b","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"52684c2b1f353a5538e4f275182a54cd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6dedb6a4f90d1df3a6fbe5693e44886c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ca3f36fe3562c07e0f0d71c2bebd3f6d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"409974d6129befbb8226ddd1c6558568","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4d9cfde2a1ae1b4925f1f9bc10848e5d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7e1daecc66dd564144e3bb1a0266b5fd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a8e1d9bb35fd0637f2f9fd2b2a54f2ec","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4f168501772a6543182765bfd5f2fbfe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a19c80aad1b2162103496f5ba293a732","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b69afa63cd5d059851c78adb2856ee09","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ae2fc5d954e9b0f5feee3d481b953c27","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1cfd3091a071d8b6feec15277643bafe","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1da2c1f258970fd3cc91184f69e91a9d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"a0d87491913d843139e0c993650a3235","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4ef72aa378127e7b7abba915b0110b1e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"3ec74c6a7d4463f0254db3a74cf75646","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"84c2bdfa470d075526cce6322d81b0b6","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0b3844c2b8c73e4e1ab91431411cad11","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"4fc71cf4a15b8d99675a31df77f26e07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d1b49564ddaeca3df5b6dbae925d2242","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6a25be566d60ccfc2d6e8b7bfdeefa83","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8a20e27646985dfd58c57ca6566553dd","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9969f02ad3cdcbf4f709405cda44167f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"9c9be4792a7a4f42c15ae7360bf28779","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"8cf777fe00349b71ee9c4b6f3fe7fd19","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"74f96bc192530c9723f572bfff3d3078","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1df91c56b25955c56387426f378173c5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"38856f70edcd2115c355d96ec77cc09e","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"de8700156c1275465bcd473c28b359aa","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d47cfdb6ede40518357bb5a4cd7cd9fb","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6e5773860cd9e5b15e683113f642ab47","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"30ff5fe1682f7fcd629880476ca3c2e0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"bf23d7d1b40b9015b694ddc2f011752f","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"2cc585d42e2c548f9f24a30a1989fd33","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"713906ce9d332d2242b7f05ed9304be3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"0219894bfe5042c7e1aa2d22e4a91ed0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"6009ffff7e43c93318804d2d28e37fe3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"03be89b227587594fbb50509fc1c2e45","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"b30df52dc24740c0bad7c55c3511df7d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"ab8d3c9b5ed5c2ab8f383607eef439f0","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d950ec671d0a8e07f3c1a31e94abed86","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1abef2ace5eccb02d60dd73cd5a5ee4c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f5f0a3044029d1cc081b5887eb4deb07","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d57c697f1446940ec4bfe669c962e2c4","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"be41035d7b941482a1e1ae6a5c5dcca5","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"10f7d9da7564f27f8ddf4a162b6da6d3","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"1d0520af549e0c3581f15173cc713ca1","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"d65083f97fd741cff028472563eddb79","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"da7f24f00653ebac660ac1c0821ed33d","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"7cb5ae9e65516ea2235f0721f6aac43c","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"f64453cbf9671f28158677fa5c43967a","affectsGlobalScope":true,"impliedNodeFormat":1},{"version":"33f317af5428801f944a478d2c1e38e5","affectsGlobalScope":true,"impliedNodeFormat":1},"510b0b622fafd6eff2bf5d020de046ee","ae63a2414b6a326b93ee65bba693d617","57845437bcd4011990eb52478f02c4a0","f25290e9ca5aee09a0210e2a454437f8",{"version":"3575b2b8e50b5a5b3acce219e08900c5","impliedNodeFormat":99},"968dbf07ccc13a1a84f319c26e9909b3","354fc88481ff608fcbbfaf7851a29043","bf6d579deb9596ec514083ea94789be0","3058c9c4ad1200a2ff62094072deed53","e5fb7990b84f5089ba92554ea3614810","770ee32ef332fd48bfef508442b30edb","5c1b5931ee0c894699ca56f5b573f88a","822b842ad7efa3485d65fbeb2f919865","89b6053090a8d01f57cb8f521fae777d","26302a8b72d74f944dcf8f6452e54f7c","bc95bdb594a5aece18248fbf4387dd2e","90125a76f2ae701181f7e09dea41f3ad","ac52bb76ccad935a013384d2a71ab267","2c96eeb69afb823580d4e1e5f1b188e0","c06213bcb24cd658dfcd1239777159bd","ada7f0921b6eace272ee48028595ff4e","e518fcc525a72f156f4235f97e942e72","cf3121ca4479d3afdaceb690d14cf086","d33a7d16b8bb10392237228466f959f8","e2bb800214278396da6f4dfb9210a507","c0cbc64b7a419382086b8d30226b8f0f","bb9d86257bed6b06d027b9b561ba2c31","ddac5ec2816a79b75ca0b28b073126c9","e62a96adf38e2e5adbeb996a1bbb0ca6","358284d17020fff7c8988fe49465ebce","788ca99c9132de5f347c0c196085cc16","74a85c95eb3b8b1bd5c7d0822fe65312","f85883c070822e429d13802a651146bc","038c82b1bfec7b11761d58241d68970f","fa4b9cdace3ba0abd1e6547b87390de6","b5fa992ef592b85d4851433a12195162","6844f7dcecd5297f9a25fe55fe7aeacc","e78cf9dc5bca6011a220581f56da19cb","25aba7d58ecafcf7098f9bcca63ea72a","90506d77482148f93c56044616613958","3a5ea1baf065ad0e1794aeb15153114c",{"version":"f9bd850e5e3a05926dbfc2a68d393e2f","signature":"aa250c74fe5a950a7dea8c41eba97441","impliedNodeFormat":1},{"version":"e15b8a94bffca79fb19f767e7feb2f64","signature":"a2614d5bf8c8a719715fad139f7d2849","impliedNodeFormat":1},{"version":"2e0f0b769b39a42a5a9133ad03d07faf","signature":"88ae61f99ea8bab323e2e743e4ee8a90","impliedNodeFormat":1},{"version":"0ed54f86ee92c964f950c9d44df12feb","signature":"44ebda1090b59085d1eeda6c2c25e4af","impliedNodeFormat":1},{"version":"0973156bf9ac211846a3984519c9ff9a","signature":"2d1c84be972f91834168ee8b45ef3260","impliedNodeFormat":1},{"version":"d9ec3b9d0e317b6e05cfca6d17a72c5b","signature":"01d13385ca95028b548f57422632cd10","impliedNodeFormat":1},{"version":"56f99034e7ca1de3f11e3942d42866a0","signature":"e1421b701f3826a978db13ebc309e2db","impliedNodeFormat":1},{"version":"b5f1e4e6e26ff0ce16a892c338a393fc","signature":"c5f116e28ed4d9b893b3bb22615c4a6e","impliedNodeFormat":1},{"version":"853e1f8841cceac171473411e2890199","signature":"a017252f6e0a3f0b8f7812273df80ece","impliedNodeFormat":1},{"version":"4a44098fe761e3d312038c4f38bba8cd","signature":"4fdad46f00f0e8c18ff903eacb5cab67","impliedNodeFormat":1},{"version":"0d42efa8d0b08642ce89e89ecbafcbf3","signature":"4538c220c4065a35c60d00ac0baa8e76","impliedNodeFormat":1},{"version":"73fe0aa7eb191e1180dca2b3bac48fcd","signature":"363c6b7126845050cea9bd1b53a77a66","impliedNodeFormat":1},{"version":"4d52f2f9aff3960fd8112462c999364c","signature":"0b856f0bab913d03af59d1f4f0f59562","impliedNodeFormat":1},{"version":"0ea802eee8d188d1c8159b0791d10f20","signature":"8264702ad4ee79cdcbea078c3da56f14","impliedNodeFormat":1},{"version":"4bd3004fb92e43c60401993de8f08ec8","signature":"5d7211f45479b46afb44d4d8e573535b","impliedNodeFormat":1},{"version":"76c75ada51f066eceb74736c546e0dc6","signature":"ec0bba0a0909104c137edc876deb700c","impliedNodeFormat":1},{"version":"ecde8511f785827876f35c97838f2217","signature":"df8eef6e7eccf796eb60b204e7fb0f8c","impliedNodeFormat":1},{"version":"44f604903f90b5463fa5141e449472c6","signature":"e18c2c8b2f19905e6ee32e3885543768","impliedNodeFormat":1},"bdce55db2d0ce77261b470a9b7a64095",{"version":"4184bcd819603715ed5412485b85ab04","signature":"96ee6501eee7a02a19ea7ff1f53d661c","impliedNodeFormat":1},{"version":"37716ac94c7c13750508fe67b1985b58","signature":"d964aada007f95d0dd07460963f68a0c","impliedNodeFormat":1},{"version":"efd1d130a0976975bd2013c01a9c2d30","signature":"402d2259e74ccac3588d639c08e81545","impliedNodeFormat":1},{"version":"edb60acfe3d08ded876343643d1f89bc","signature":"e95214003cc4a559b833b4ecf52f2d92","impliedNodeFormat":1},{"version":"6e7df691e9383dcc50b10a35e152c948","signature":"69f847a0a3ca0c866ac328c9348cbe04","impliedNodeFormat":1},{"version":"8153badb2a51a806f16d43fae7c7c8a5","signature":"632deda2127ca3a142ca076cf54d1143","impliedNodeFormat":1},{"version":"aaa9d7c5b41f6e1c523a780ec7912e10","signature":"4cb877c523b96073f4dd0de7f41e9803","impliedNodeFormat":1},{"version":"e3424277ca0424373630e388eb21ca6b","signature":"dcd337aeff86227b569df4951219b6b6","impliedNodeFormat":1},{"version":"dcf40ad0d91569bfa4257e29f227eb1d","signature":"699585d6b5731578b044e283b9363e6f","impliedNodeFormat":1},{"version":"8cc989ae5c82c1ff8840588694d62750","signature":"eb7b402991957b09b77be3d8046faa56","impliedNodeFormat":1},{"version":"3365c7d6a19dcfc162cb7fe14c8a16af","signature":"205c6187ac6e4ef53474b4a23ba47e42","impliedNodeFormat":1},{"version":"a546ca9348fea781d81bff8239a3b806","signature":"8ff324d87ffc8c78c0de87df2c82fa62","impliedNodeFormat":1}],"fileIdsList":[[110,113,114],[110,113],[93,126],[108,113],[109,113],[108,110,113,114],[110,113,114,117],[110,116,117,118,119,120,121,122,123],[113,114,118],[108,109,110,113,114],[109,110,113,114],[113,117,118,122],[109,113,114,115,124,125,126,127,128],[89],[93,94],[89,90,91,92,94,95,96,97,111,112],[89,110],[113,124],[89,94,95],[108],[146],[129],[108,130,131,132,133,134,137,146,147,153,154,155,156,157,158,159],[108,132,133,153,154,155,156],[132,133,153,154,156,157],[108,155],[108,129,132,155],[154,155],[108,130,131,132,133,134,153,155,157],[108,138],[108,137],[108,146,147,148],[108,148],[108,136],[138],[137,138],[135],[108,135,136,138,139,140,141,142,143,144,145,149,150,151,152],[99],[99,103],[98],[98,99,100,101,102,103,104,105,106,107]],"options":{"composite":true,"declaration":true,"declarationDir":"./@types","inlineSources":true,"module":199,"outDir":"./","rootDir":"../src","skipLibCheck":true,"strict":false,"stripInternal":true,"sourceMap":true,"target":4,"tsBuildInfoFile":"./tsconfig.tsbuildinfo","esModuleInterop":true},"referencedMap":[[115,1],[114,2],[127,3],[109,4],[110,5],[117,1],[116,1],[120,6],[121,7],[124,8],[119,9],[118,10],[122,11],[123,12],[129,13],[90,14],[91,14],[94,14],[97,14],[95,15],[96,14],[113,16],[111,17],[92,14],[125,18],[112,19],[128,20],[147,21],[130,22],[159,22],[160,23],[157,24],[155,25],[132,26],[156,27],[131,20],[133,28],[154,29],[139,30],[138,31],[149,32],[150,33],[141,20],[140,34],[144,35],[145,35],[142,35],[143,36],[136,20],[135,20],[151,37],[152,37],[153,38],[101,39],[107,40],[106,40],[105,40],[100,39],[103,39],[104,40],[99,41],[102,39],[108,42]],"latestChangedDtsFile":"./@types/index.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumOption.js","sourceRoot":"","sources":["../../src/types/EnumOption.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"EnumOption.js","sourceRoot":"","sources":["../../src/types/EnumOption.ts"],"names":[],"mappings":";;;AAAA;IAQE,MAAM,CAAC,YAAY,CAAC,KAAU;QAC5B,OAAO,CACL,KAAK,YAAY,UAAU,IAAI,CAAC,OAAO,KAAK,IAAI,QAAQ,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,IAAI,KAAK,CAAC,CACnH,CAAC;IACJ,CAAC;IAED,YAAY,GAA8B,EAAE,KAAa,EAAE,KAAc;QACvE,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,OAAO;YACL,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;CACF","sourcesContent":["export class EnumOption {\n /** They key */\n value: string | number | boolean;\n\n label: string;\n\n index: number;\n\n static isInstanceOf(value: any): value is EnumOption {\n return (\n value instanceof EnumOption || (typeof value == 'object' && value != null && 'value' in value && 'label' in value)\n );\n }\n\n constructor(key: string | number | boolean, label: string, index?: number) {\n this.value = key;\n this.label = label;\n this.index = index;\n }\n\n toJSON() {\n return {\n value: this.value,\n label: this.label,\n index: this.index\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldFactory = exports.Field = void 0;
|
|
4
|
+
const TypeFactory_1 = require("../schema/TypeFactory");
|
|
5
|
+
/**
|
|
6
|
+
* A named, resolved field and its schema metadata.
|
|
7
|
+
*/
|
|
8
|
+
class Field {
|
|
9
|
+
static isInstanceOf(obj) {
|
|
10
|
+
return obj instanceof Field || 'name' in obj;
|
|
11
|
+
}
|
|
12
|
+
constructor(name, type) {
|
|
13
|
+
this.name = name;
|
|
14
|
+
this.type = type;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Field = Field;
|
|
18
|
+
Field.TYPE = 'field';
|
|
19
|
+
class FieldFactory extends TypeFactory_1.AbstractObjectTypeFactory {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(Field.TYPE);
|
|
22
|
+
}
|
|
23
|
+
generate(event) {
|
|
24
|
+
return new Field(event.name, event.type);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.FieldFactory = FieldFactory;
|
|
28
|
+
//# sourceMappingURL=Field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../src/types/Field.ts"],"names":[],"mappings":";;;AAAA,uDAAqF;AAGrF;;GAEG;AACH;IAGE,MAAM,CAAC,YAAY,CAAC,GAAQ;QAC1B,OAAO,GAAG,YAAY,KAAK,IAAI,MAAM,IAAI,GAAG,CAAC;IAC/C,CAAC;IASD,YAAY,IAAY,EAAE,IAAc;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;;AAjBQ,UAAI,GAAG,OAAO,CAAC;AAwBxB,kBAAiD,SAAQ,uCAA0D;IACjH;QACE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,QAAQ,CAAwB,KAA4B;QAC1D,OAAO,IAAI,KAAK,CAAI,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;CACF","sourcesContent":["import { AbstractObjectTypeFactory, GenerateTypeEvent } from '../schema/TypeFactory';\nimport { Type } from '@ja-platform/parser-type-system';\n\n/**\n * A named, resolved field and its schema metadata.\n */\nexport class Field<T extends Type = Type> {\n static TYPE = 'field';\n\n static isInstanceOf(obj: any): obj is Field {\n return obj instanceof Field || 'name' in obj;\n }\n\n name: string;\n type: T | null;\n label?: string;\n relationship?: string;\n isRelationshipId?: boolean;\n isBelongsToId?: boolean;\n\n constructor(name: string, type: T | null) {\n this.name = name;\n this.type = type;\n }\n}\n\nexport interface GenerateFieldEvent<T extends Type> extends GenerateTypeEvent {\n name: string;\n type: T;\n}\n\nexport class FieldFactory<T extends Type = Type> extends AbstractObjectTypeFactory<Field<T>, GenerateFieldEvent<T>> {\n constructor() {\n super(Field.TYPE);\n }\n generate<T extends Type = Type>(event: GenerateFieldEvent<T>): Field<T> {\n return new Field<T>(event.name, event.type);\n }\n}\n"]}
|
package/dist/types/Param.js
CHANGED
|
@@ -2,21 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ParamFactory = exports.Param = void 0;
|
|
4
4
|
const TypeFactory_1 = require("../schema/TypeFactory");
|
|
5
|
-
const
|
|
6
|
-
class Param extends
|
|
5
|
+
const Field_1 = require("./Field");
|
|
6
|
+
class Param extends Field_1.Field {
|
|
7
7
|
static isInstanceOf(obj) {
|
|
8
8
|
return obj instanceof Param || (obj === null || obj === void 0 ? void 0 : obj.TYPE) == Param.TYPE;
|
|
9
9
|
}
|
|
10
|
-
toJSON() {
|
|
11
|
-
const result = super.toJSON();
|
|
12
|
-
if (this.required != null) {
|
|
13
|
-
result.required = this.required;
|
|
14
|
-
}
|
|
15
|
-
if (this.provideValue != null) {
|
|
16
|
-
result.provideValue = this.provideValue.raw();
|
|
17
|
-
}
|
|
18
|
-
return result;
|
|
19
|
-
}
|
|
20
10
|
}
|
|
21
11
|
exports.Param = Param;
|
|
22
12
|
Param.TYPE = 'parameter';
|
package/dist/types/Param.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Param.js","sourceRoot":"","sources":["../../src/types/Param.ts"],"names":[],"mappings":";;;AACA,uDAAkE;AAElE,
|
|
1
|
+
{"version":3,"file":"Param.js","sourceRoot":"","sources":["../../src/types/Param.ts"],"names":[],"mappings":";;;AACA,uDAAkE;AAElE,mCAAoD;AAEpD,WAA0C,SAAQ,aAAQ;IAGxD,MAAM,CAAC,YAAY,CAAC,GAAQ;QAC1B,OAAO,GAAG,YAAY,KAAK,IAAI,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,IAAI,KAAI,KAAK,CAAC,IAAI,CAAC;IACzD,CAAC;CAKF;;AATQ,UAAI,GAAG,WAAW,CAAC;AAgB5B,kBAAiD,SAAQ,uCAA0D;IACjH;QACE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAED,QAAQ,CAAwB,KAA4B;QAC1D,MAAM,KAAK,GAAG,IAAI,KAAK,CAAI,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACnD,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAChC,KAAK,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["import { FunctionExpression } from '@ja-platform/parser-expressions';\nimport { AbstractObjectTypeFactory } from '../schema/TypeFactory';\nimport { Type } from '@ja-platform/parser-type-system';\nimport { GenerateFieldEvent, Field } from './Field';\n\nexport class Param<T extends Type = Type> extends Field<T> {\n static TYPE = 'parameter';\n\n static isInstanceOf(obj: any): obj is Param {\n return obj instanceof Param || obj?.TYPE == Param.TYPE;\n }\n\n sourceTypeName?: string;\n required?: boolean;\n provideValue?: FunctionExpression;\n}\n\nexport interface GenerateParamEvent<T extends Type> extends GenerateFieldEvent<T> {\n required?: boolean;\n provideValue?: FunctionExpression;\n}\n\nexport class ParamFactory<T extends Type = Type> extends AbstractObjectTypeFactory<Param<T>, GenerateParamEvent<T>> {\n constructor() {\n super(Param.TYPE);\n }\n\n generate<T extends Type = Type>(event: GenerateParamEvent<T>): Param<T> {\n const param = new Param<T>(event.name, event.type);\n param.required = event.required;\n param.provideValue = event.provideValue;\n return param;\n }\n}\n"]}
|
|
@@ -22,7 +22,6 @@ class SchemaModelType extends parser_type_system_1.ObjectType {
|
|
|
22
22
|
this.hasManyVars = {};
|
|
23
23
|
this.indexes = [];
|
|
24
24
|
this.allIndexes = [];
|
|
25
|
-
this.errors = [];
|
|
26
25
|
this.webhooks = [];
|
|
27
26
|
this.notifyUsers = [];
|
|
28
27
|
}
|
|
@@ -30,7 +29,7 @@ class SchemaModelType extends parser_type_system_1.ObjectType {
|
|
|
30
29
|
this.attributes[attribute.name] = attribute;
|
|
31
30
|
}
|
|
32
31
|
setupVariables(schema) {
|
|
33
|
-
this.idVar = schema.
|
|
32
|
+
this.idVar = schema.field('id', primitives_1.PrimitiveType.TEXT);
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
36
35
|
* Attribute or relationship variable.
|
|
@@ -63,29 +62,6 @@ class SchemaModelType extends parser_type_system_1.ObjectType {
|
|
|
63
62
|
getAttributes() {
|
|
64
63
|
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.hasManyVars), this.belongsToIdVars), this.belongsToVars), this.attributes), { id: this.idVar });
|
|
65
64
|
}
|
|
66
|
-
toJSON() {
|
|
67
|
-
var _a;
|
|
68
|
-
var _b;
|
|
69
|
-
let belongsTo = {};
|
|
70
|
-
// hasMany is not populated yet
|
|
71
|
-
const hasMany = {};
|
|
72
|
-
for (let key in this.belongsTo) {
|
|
73
|
-
if (this.belongsTo.hasOwnProperty(key)) {
|
|
74
|
-
const rel = this.belongsTo[key];
|
|
75
|
-
belongsTo[rel.name] = {
|
|
76
|
-
type: rel.foreignType.name,
|
|
77
|
-
foreignName: rel.foreignName
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return {
|
|
82
|
-
label: this.label,
|
|
83
|
-
attributes: this.attributes,
|
|
84
|
-
belongsTo: belongsTo,
|
|
85
|
-
hasMany: hasMany,
|
|
86
|
-
display: (_b = (_a = this.displayFormat) === null || _a === void 0 ? void 0 : _a.raw()) !== null && _b !== void 0 ? _b : ''
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
65
|
addBelongsTo(options) {
|
|
90
66
|
const object = this;
|
|
91
67
|
const schema = options.schema;
|
|
@@ -114,9 +90,9 @@ class SchemaModelType extends parser_type_system_1.ObjectType {
|
|
|
114
90
|
else {
|
|
115
91
|
object.belongsTo[name] = rel;
|
|
116
92
|
// For type lookups
|
|
117
|
-
object.belongsToVars[name] = schema.
|
|
93
|
+
object.belongsToVars[name] = schema.field(name, rel.foreignType);
|
|
118
94
|
object.belongsToVars[name].relationship = name;
|
|
119
|
-
const idVar = schema.
|
|
95
|
+
const idVar = schema.field(name + '_id', primitives_1.PrimitiveType.TEXT);
|
|
120
96
|
idVar.relationship = name;
|
|
121
97
|
idVar.isBelongsToId = true;
|
|
122
98
|
object.belongsToIdVars[idVar.name] = idVar;
|
|
@@ -124,7 +100,7 @@ class SchemaModelType extends parser_type_system_1.ObjectType {
|
|
|
124
100
|
if (foreignName != null) {
|
|
125
101
|
rel.foreignName = foreignName;
|
|
126
102
|
rel.foreignType.hasMany[foreignName] = rel;
|
|
127
|
-
rel.foreignType.hasManyVars[foreignName] = schema.
|
|
103
|
+
rel.foreignType.hasManyVars[foreignName] = schema.field(foreignName, new QueryType_1.QueryType(object));
|
|
128
104
|
}
|
|
129
105
|
return rel;
|
|
130
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaModelType.js","sourceRoot":"","sources":["../../src/types/SchemaModelType.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AACxC,wEAAmE;AAMnE,6CA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;YACD,OAAO,GAAG,CAAC;QACb,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;;AAvKiB,oBAAI,GAAG,QAAQ,AAAX,CAAY;AA6KlC,4BAAoC,SAAQ,uCAAwE;IAClH;QACE,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,QAAQ,CAAC,KAAmC;QAC1C,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjD,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","sourcesContent":["import { SchemaObjectDisplayExpression } from '../expressions/SchemaObjectDisplayExpression';\nimport { QueryType } from './QueryType';\nimport { ObjectType, Type } from '@ja-platform/parser-type-system';\nimport { Variable } from './Variable';\nimport { Relationship } from './Relationship';\nimport { Schema } from '../schema/Schema';\nimport { XMLElement } from '@journeyapps/domparser/types';\nimport { ModelIndex } from '../schema/ModelIndex';\nimport { PrimitiveType, TextType } from './primitives';\nimport { AbstractObjectTypeFactory, GenerateTypeEvent } from '../schema/TypeFactory';\n\nexport interface NotificationConfig {\n message: SchemaObjectDisplayExpression;\n recipient: string;\n received: string;\n badgeCount: string;\n}\n\nexport class SchemaModelType extends ObjectType {\n static readonly TYPE = 'object';\n\n readonly isPrimitiveType = false;\n readonly isObject = true;\n attributes: Record<string, Variable> = {};\n\n static isInstanceOf(type: any): type is SchemaModelType {\n return type?._typeName === SchemaModelType.TYPE;\n }\n\n displayFormat: SchemaObjectDisplayExpression | null;\n displaySource?: XMLElement;\n label: string;\n\n belongsTo: { [index: string]: Relationship };\n hasMany: { [index: string]: Relationship };\n\n belongsToVars: { [index: string]: Variable };\n belongsToIdVars: { [index: string]: Variable };\n hasManyVars: { [index: string]: Variable };\n idVar: Variable<TextType>;\n\n /**\n * App and Cloud indexes.\n */\n allIndexes: ModelIndex[];\n /**\n * App indexes.\n */\n indexes: ModelIndex[];\n errors: any[]; // TODO\n webhooks: any[]; // TODO\n notifyUsers: NotificationConfig[];\n\n sourceElement: XMLElement;\n\n constructor(name?: string) {\n super(name);\n\n this.displayFormat = null;\n this.belongsTo = {};\n this.hasMany = {};\n this.belongsToVars = {};\n this.belongsToIdVars = {};\n this.hasManyVars = {};\n this.indexes = [];\n this.allIndexes = [];\n this.errors = [];\n this.webhooks = [];\n\n this.notifyUsers = [];\n }\n\n addAttribute(attribute: Variable): void {\n this.attributes[attribute.name] = attribute;\n }\n\n setupVariables(schema: Schema) {\n this.idVar = schema.variable('id', PrimitiveType.TEXT);\n }\n\n /**\n * Attribute or relationship variable.\n */\n getAttribute(name: string): Variable | null {\n if (Object.prototype.hasOwnProperty.call(this.attributes, name)) {\n return this.attributes[name];\n } else if (Object.prototype.hasOwnProperty.call(this.belongsToVars, name)) {\n return this.belongsToVars[name];\n } else if (Object.prototype.hasOwnProperty.call(this.belongsToIdVars, name)) {\n return this.belongsToIdVars[name];\n } else if (Object.prototype.hasOwnProperty.call(this.hasManyVars, name)) {\n return this.hasManyVars[name];\n } else if (name == 'id') {\n return this.idVar;\n } else {\n return null;\n }\n }\n\n getField(name: string): Type | null {\n return this.getAttribute(name)?.type ?? null;\n }\n\n getAttributes(): { [index: string]: Variable } {\n return {\n ...this.hasManyVars,\n ...this.belongsToIdVars,\n ...this.belongsToVars,\n ...this.attributes,\n id: this.idVar\n };\n }\n\n toJSON() {\n let belongsTo: {\n [index: string]: { type: string; foreignName: string };\n } = {};\n // hasMany is not populated yet\n const hasMany = {};\n\n for (let key in this.belongsTo) {\n if (this.belongsTo.hasOwnProperty(key)) {\n const rel = this.belongsTo[key];\n belongsTo[rel.name] = {\n type: rel.foreignType.name,\n foreignName: rel.foreignName\n };\n }\n }\n\n return {\n label: this.label,\n attributes: this.attributes,\n belongsTo: belongsTo,\n hasMany: hasMany,\n display: this.displayFormat?.raw() ?? ''\n };\n }\n\n addBelongsTo(options: { schema: Schema; type?: string; foreignName?: string; name: string }) {\n const object = this;\n const schema = options.schema;\n let err;\n const rel = schema.newRelationship();\n const typeName = options.type;\n const foreignName = options.foreignName;\n if (typeName != null) {\n let name = options.name;\n if (name == null || name === '') {\n name = typeName;\n }\n rel.name = name;\n rel.objectType = object;\n rel.foreignType = schema.objects[typeName];\n if (rel.foreignType == null) {\n err = new Error(\"Object '\" + typeName + \"' is not defined\");\n (err as any).attribute = 'type';\n throw err;\n }\n\n if (object.belongsTo.hasOwnProperty(name)) {\n err = new Error(\"Relationship '\" + name + \"' is already defined\");\n (err as any).attribute = 'name';\n throw err;\n } else {\n object.belongsTo[name] = rel;\n\n // For type lookups\n object.belongsToVars[name] = schema.variable(name, rel.foreignType);\n object.belongsToVars[name].relationship = name;\n\n const idVar = schema.variable(name + '_id', PrimitiveType.TEXT);\n idVar.relationship = name;\n idVar.isBelongsToId = true;\n object.belongsToIdVars[idVar.name] = idVar;\n }\n\n if (foreignName != null) {\n rel.foreignName = foreignName;\n rel.foreignType.hasMany[foreignName] = rel;\n rel.foreignType.hasManyVars[foreignName] = schema.variable(foreignName, new QueryType(object));\n }\n return rel;\n }\n return null;\n }\n}\n\nexport interface GenerateSchemaModelTypeEvent extends GenerateTypeEvent {\n name?: string;\n}\n\nexport class SchemaModelTypeFactory extends AbstractObjectTypeFactory<SchemaModelType, GenerateSchemaModelTypeEvent> {\n constructor() {\n super(SchemaModelType.TYPE);\n }\n\n generate(event: GenerateSchemaModelTypeEvent) {\n const instance = new SchemaModelType(event.name);\n instance.setupVariables(event.schema);\n return instance;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SchemaModelType.js","sourceRoot":"","sources":["../../src/types/SchemaModelType.ts"],"names":[],"mappings":";;;AACA,2CAAwC;AACxC,wEAAmE;AAKnE,6CAAuD;AACvD,uDAAqF;AASrF,qBAA6B,SAAQ,+BAAU;IAO7C,MAAM,CAAC,YAAY,CAAC,IAAS;QAC3B,OAAO,CAAA,IAAI,aAAJ,IAAI,uB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IAAI,CAAC,GAAG,KAAK,CAAC;YAC7C,CAAC;YAED,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;gBACxB,GAAG,CAAC,WAAW,GAAG,WAAW,CAAC;gBAC9B,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,GAAG,CAAC;gBAC3C,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,qBAAS,CAAC,MAAM,CAAC,CAAC,CAAC;YAC9F,CAAC;YACD,OAAO,GAAG,CAAC;QACb,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;;AAxIiB,oBAAI,GAAG,QAAQ,AAAX,CAAY;AA8IlC,4BAAoC,SAAQ,uCAAwE;IAClH;QACE,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAED,QAAQ,CAAC,KAAmC;QAC1C,MAAM,QAAQ,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjD,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF","sourcesContent":["import { SchemaObjectDisplayExpression } from '../expressions/SchemaObjectDisplayExpression';\nimport { QueryType } from './QueryType';\nimport { ObjectType, Type } from '@ja-platform/parser-type-system';\nimport { Field } from './Field';\nimport { Relationship } from './Relationship';\nimport { Schema } from '../schema/Schema';\nimport { ModelIndex } from '../schema/ModelIndex';\nimport { PrimitiveType, TextType } from './primitives';\nimport { AbstractObjectTypeFactory, GenerateTypeEvent } from '../schema/TypeFactory';\n\nexport interface NotificationConfig {\n message: SchemaObjectDisplayExpression;\n recipient: string;\n received: string;\n badgeCount: string;\n}\n\nexport class SchemaModelType extends ObjectType {\n static readonly TYPE = 'object';\n\n readonly isPrimitiveType = false;\n readonly isObject = true;\n attributes: Record<string, Field> = {};\n\n static isInstanceOf(type: any): type is SchemaModelType {\n return type?._typeName === SchemaModelType.TYPE;\n }\n\n displayFormat: SchemaObjectDisplayExpression | null;\n label: string;\n\n belongsTo: { [index: string]: Relationship };\n hasMany: { [index: string]: Relationship };\n\n belongsToVars: { [index: string]: Field };\n belongsToIdVars: { [index: string]: Field };\n hasManyVars: { [index: string]: Field };\n idVar: Field<TextType>;\n\n /**\n * App and Cloud indexes.\n */\n allIndexes: ModelIndex[];\n /**\n * App indexes.\n */\n indexes: ModelIndex[];\n webhooks: any[]; // TODO\n notifyUsers: NotificationConfig[];\n\n constructor(name?: string) {\n super(name);\n\n this.displayFormat = null;\n this.belongsTo = {};\n this.hasMany = {};\n this.belongsToVars = {};\n this.belongsToIdVars = {};\n this.hasManyVars = {};\n this.indexes = [];\n this.allIndexes = [];\n this.webhooks = [];\n\n this.notifyUsers = [];\n }\n\n addAttribute(attribute: Field): void {\n this.attributes[attribute.name] = attribute;\n }\n\n setupVariables(schema: Schema) {\n this.idVar = schema.field('id', PrimitiveType.TEXT);\n }\n\n /**\n * Attribute or relationship variable.\n */\n getAttribute(name: string): Field | null {\n if (Object.prototype.hasOwnProperty.call(this.attributes, name)) {\n return this.attributes[name];\n } else if (Object.prototype.hasOwnProperty.call(this.belongsToVars, name)) {\n return this.belongsToVars[name];\n } else if (Object.prototype.hasOwnProperty.call(this.belongsToIdVars, name)) {\n return this.belongsToIdVars[name];\n } else if (Object.prototype.hasOwnProperty.call(this.hasManyVars, name)) {\n return this.hasManyVars[name];\n } else if (name == 'id') {\n return this.idVar;\n } else {\n return null;\n }\n }\n\n getField(name: string): Type | null {\n return this.getAttribute(name)?.type ?? null;\n }\n\n getAttributes(): { [index: string]: Field } {\n return {\n ...this.hasManyVars,\n ...this.belongsToIdVars,\n ...this.belongsToVars,\n ...this.attributes,\n id: this.idVar\n };\n }\n\n addBelongsTo(options: { schema: Schema; type?: string; foreignName?: string; name: string }) {\n const object = this;\n const schema = options.schema;\n let err;\n const rel = schema.newRelationship();\n const typeName = options.type;\n const foreignName = options.foreignName;\n if (typeName != null) {\n let name = options.name;\n if (name == null || name === '') {\n name = typeName;\n }\n rel.name = name;\n rel.objectType = object;\n rel.foreignType = schema.objects[typeName];\n if (rel.foreignType == null) {\n err = new Error(\"Object '\" + typeName + \"' is not defined\");\n (err as any).attribute = 'type';\n throw err;\n }\n\n if (object.belongsTo.hasOwnProperty(name)) {\n err = new Error(\"Relationship '\" + name + \"' is already defined\");\n (err as any).attribute = 'name';\n throw err;\n } else {\n object.belongsTo[name] = rel;\n\n // For type lookups\n object.belongsToVars[name] = schema.field(name, rel.foreignType);\n object.belongsToVars[name].relationship = name;\n\n const idVar = schema.field(name + '_id', PrimitiveType.TEXT);\n idVar.relationship = name;\n idVar.isBelongsToId = true;\n object.belongsToIdVars[idVar.name] = idVar;\n }\n\n if (foreignName != null) {\n rel.foreignName = foreignName;\n rel.foreignType.hasMany[foreignName] = rel;\n rel.foreignType.hasManyVars[foreignName] = schema.field(foreignName, new QueryType(object));\n }\n return rel;\n }\n return null;\n }\n}\n\nexport interface GenerateSchemaModelTypeEvent extends GenerateTypeEvent {\n name?: string;\n}\n\nexport class SchemaModelTypeFactory extends AbstractObjectTypeFactory<SchemaModelType, GenerateSchemaModelTypeEvent> {\n constructor() {\n super(SchemaModelType.TYPE);\n }\n\n generate(event: GenerateSchemaModelTypeEvent) {\n const instance = new SchemaModelType(event.name);\n instance.setupVariables(event.schema);\n return instance;\n }\n}\n"]}
|
|
@@ -4,7 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.DateType = void 0;
|
|
7
|
-
const
|
|
7
|
+
const Day_1 = require("../../day/Day");
|
|
8
|
+
const utils_1 = require("../../day/utils");
|
|
8
9
|
const moment_1 = __importDefault(require("moment"));
|
|
9
10
|
const parser_type_system_1 = require("@ja-platform/parser-type-system");
|
|
10
11
|
class DateType extends parser_type_system_1.Type {
|
|
@@ -26,23 +27,23 @@ class DateType extends parser_type_system_1.Type {
|
|
|
26
27
|
}
|
|
27
28
|
format(value, format) {
|
|
28
29
|
// Works for Date and Day objects.
|
|
29
|
-
if (
|
|
30
|
+
if (Day_1.Day.isDay(value)) {
|
|
30
31
|
value = value.toDate();
|
|
31
32
|
}
|
|
32
33
|
const d = (0, moment_1.default)(value).utc();
|
|
33
34
|
return d.format(format !== null && format !== void 0 ? format : DateType.DEFAULT_FORMAT);
|
|
34
35
|
}
|
|
35
36
|
is(value) {
|
|
36
|
-
return this.isDay ?
|
|
37
|
+
return this.isDay ? Day_1.Day.isDay(value) : value instanceof Date;
|
|
37
38
|
}
|
|
38
39
|
parse(value) {
|
|
39
40
|
if (this.isDay) {
|
|
40
|
-
if (
|
|
41
|
+
if (Day_1.Day.isDay(value)) {
|
|
41
42
|
return value;
|
|
42
43
|
}
|
|
43
44
|
else if (value instanceof Date) {
|
|
44
45
|
// Convert from local timezone
|
|
45
|
-
return new
|
|
46
|
+
return new Day_1.Day(value);
|
|
46
47
|
}
|
|
47
48
|
else {
|
|
48
49
|
throw new Error(value + ' is not a Day');
|
|
@@ -51,9 +52,9 @@ class DateType extends parser_type_system_1.Type {
|
|
|
51
52
|
else {
|
|
52
53
|
if (value instanceof Date) {
|
|
53
54
|
// Assume UTC timezone
|
|
54
|
-
return (0,
|
|
55
|
+
return (0, utils_1.pureDate)(value);
|
|
55
56
|
}
|
|
56
|
-
else if (
|
|
57
|
+
else if (Day_1.Day.isDay(value)) {
|
|
57
58
|
return value.toDate();
|
|
58
59
|
}
|
|
59
60
|
else {
|