@ja-platform/parser-schema 0.0.0-dev-20261019214152 → 0.0.0-stage

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.
Files changed (114) hide show
  1. package/README.md +3 -0
  2. package/package.json +3 -38
  3. package/dist/@types/Version.d.ts +0 -19
  4. package/dist/@types/day/Day.d.ts +0 -4
  5. package/dist/@types/day/DayConstructorInterface.d.ts +0 -50
  6. package/dist/@types/day/DayInterface.d.ts +0 -34
  7. package/dist/@types/day/index.d.ts +0 -2
  8. package/dist/@types/day/utils.d.ts +0 -4
  9. package/dist/@types/expressions/SchemaObjectDisplayExpression.d.ts +0 -17
  10. package/dist/@types/index.d.ts +0 -16
  11. package/dist/@types/schema/ModelIndex.d.ts +0 -19
  12. package/dist/@types/schema/Schema.d.ts +0 -51
  13. package/dist/@types/schema/SchemaParserErrors.d.ts +0 -10
  14. package/dist/@types/schema/TypeFactory.d.ts +0 -26
  15. package/dist/@types/schema/reservedNames.d.ts +0 -7
  16. package/dist/@types/schema/schemaParser.d.ts +0 -43
  17. package/dist/@types/schema/schemaSerializer.d.ts +0 -11
  18. package/dist/@types/types/EnumOption.d.ts +0 -15
  19. package/dist/@types/types/FunctionType.d.ts +0 -15
  20. package/dist/@types/types/Param.d.ts +0 -19
  21. package/dist/@types/types/QueryType.d.ts +0 -19
  22. package/dist/@types/types/Relationship.d.ts +0 -20
  23. package/dist/@types/types/SchemaModelType.d.ts +0 -89
  24. package/dist/@types/types/Variable.d.ts +0 -32
  25. package/dist/@types/types/primitives/Boolean.d.ts +0 -21
  26. package/dist/@types/types/primitives/ChoiceType.d.ts +0 -47
  27. package/dist/@types/types/primitives/Date.d.ts +0 -13
  28. package/dist/@types/types/primitives/Datetime.d.ts +0 -9
  29. package/dist/@types/types/primitives/GeoTrack.d.ts +0 -5
  30. package/dist/@types/types/primitives/Location.d.ts +0 -6
  31. package/dist/@types/types/primitives/MultipleChoice.d.ts +0 -5
  32. package/dist/@types/types/primitives/MultipleChoiceInteger.d.ts +0 -8
  33. package/dist/@types/types/primitives/SingleChoice.d.ts +0 -5
  34. package/dist/@types/types/primitives/SingleChoiceInteger.d.ts +0 -8
  35. package/dist/@types/types/primitives/Text.d.ts +0 -8
  36. package/dist/@types/types/primitives/attachments/Attachment.d.ts +0 -9
  37. package/dist/@types/types/primitives/attachments/Photo.d.ts +0 -6
  38. package/dist/@types/types/primitives/attachments/Signature.d.ts +0 -6
  39. package/dist/@types/types/primitives/index.d.ts +0 -67
  40. package/dist/Version.js +0 -76
  41. package/dist/Version.js.map +0 -1
  42. package/dist/day/Day.js +0 -112
  43. package/dist/day/Day.js.map +0 -1
  44. package/dist/day/DayConstructorInterface.js +0 -3
  45. package/dist/day/DayConstructorInterface.js.map +0 -1
  46. package/dist/day/DayInterface.js +0 -3
  47. package/dist/day/DayInterface.js.map +0 -1
  48. package/dist/day/index.js +0 -19
  49. package/dist/day/index.js.map +0 -1
  50. package/dist/day/utils.js +0 -43
  51. package/dist/day/utils.js.map +0 -1
  52. package/dist/expressions/SchemaObjectDisplayExpression.js +0 -40
  53. package/dist/expressions/SchemaObjectDisplayExpression.js.map +0 -1
  54. package/dist/index.js +0 -35
  55. package/dist/index.js.map +0 -1
  56. package/dist/schema/ModelIndex.js +0 -14
  57. package/dist/schema/ModelIndex.js.map +0 -1
  58. package/dist/schema/Schema.js +0 -132
  59. package/dist/schema/Schema.js.map +0 -1
  60. package/dist/schema/SchemaParserErrors.js +0 -26
  61. package/dist/schema/SchemaParserErrors.js.map +0 -1
  62. package/dist/schema/TypeFactory.js +0 -21
  63. package/dist/schema/TypeFactory.js.map +0 -1
  64. package/dist/schema/reservedNames.js +0 -101
  65. package/dist/schema/reservedNames.js.map +0 -1
  66. package/dist/schema/schemaParser.js +0 -1135
  67. package/dist/schema/schemaParser.js.map +0 -1
  68. package/dist/schema/schemaSerializer.js +0 -181
  69. package/dist/schema/schemaSerializer.js.map +0 -1
  70. package/dist/tsconfig.tsbuildinfo +0 -1
  71. package/dist/types/EnumOption.js +0 -22
  72. package/dist/types/EnumOption.js.map +0 -1
  73. package/dist/types/FunctionType.js +0 -30
  74. package/dist/types/FunctionType.js.map +0 -1
  75. package/dist/types/Param.js +0 -35
  76. package/dist/types/Param.js.map +0 -1
  77. package/dist/types/QueryType.js +0 -37
  78. package/dist/types/QueryType.js.map +0 -1
  79. package/dist/types/Relationship.js +0 -25
  80. package/dist/types/Relationship.js.map +0 -1
  81. package/dist/types/SchemaModelType.js +0 -147
  82. package/dist/types/SchemaModelType.js.map +0 -1
  83. package/dist/types/Variable.js +0 -49
  84. package/dist/types/Variable.js.map +0 -1
  85. package/dist/types/primitives/Boolean.js +0 -9
  86. package/dist/types/primitives/Boolean.js.map +0 -1
  87. package/dist/types/primitives/ChoiceType.js +0 -65
  88. package/dist/types/primitives/ChoiceType.js.map +0 -1
  89. package/dist/types/primitives/Date.js +0 -68
  90. package/dist/types/primitives/Date.js.map +0 -1
  91. package/dist/types/primitives/Datetime.js +0 -31
  92. package/dist/types/primitives/Datetime.js.map +0 -1
  93. package/dist/types/primitives/GeoTrack.js +0 -12
  94. package/dist/types/primitives/GeoTrack.js.map +0 -1
  95. package/dist/types/primitives/Location.js +0 -18
  96. package/dist/types/primitives/Location.js.map +0 -1
  97. package/dist/types/primitives/MultipleChoice.js +0 -12
  98. package/dist/types/primitives/MultipleChoice.js.map +0 -1
  99. package/dist/types/primitives/MultipleChoiceInteger.js +0 -34
  100. package/dist/types/primitives/MultipleChoiceInteger.js.map +0 -1
  101. package/dist/types/primitives/SingleChoice.js +0 -12
  102. package/dist/types/primitives/SingleChoice.js.map +0 -1
  103. package/dist/types/primitives/SingleChoiceInteger.js +0 -38
  104. package/dist/types/primitives/SingleChoiceInteger.js.map +0 -1
  105. package/dist/types/primitives/Text.js +0 -22
  106. package/dist/types/primitives/Text.js.map +0 -1
  107. package/dist/types/primitives/attachments/Attachment.js +0 -16
  108. package/dist/types/primitives/attachments/Attachment.js.map +0 -1
  109. package/dist/types/primitives/attachments/Photo.js +0 -16
  110. package/dist/types/primitives/attachments/Photo.js.map +0 -1
  111. package/dist/types/primitives/attachments/Signature.js +0 -16
  112. package/dist/types/primitives/attachments/Signature.js.map +0 -1
  113. package/dist/types/primitives/index.js +0 -85
  114. package/dist/types/primitives/index.js.map +0 -1
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SingleChoiceIntegerType = void 0;
4
- const EnumOption_1 = require("../EnumOption");
5
- const ChoiceType_1 = require("./ChoiceType");
6
- class SingleChoiceIntegerType extends ChoiceType_1.ChoiceType {
7
- constructor() {
8
- super(SingleChoiceIntegerType.TYPE, { multiple: false });
9
- }
10
- setOptionLabels(labels) {
11
- this.options = {};
12
- for (let i = 0; i < labels.length; i++) {
13
- this.addOption(i, labels[i], i);
14
- }
15
- }
16
- is(value) {
17
- return typeof value === 'number' && this.options[value] != null;
18
- }
19
- parse(value) {
20
- let option = null;
21
- if (typeof value == 'number') {
22
- option = value;
23
- }
24
- else if (EnumOption_1.EnumOption.isInstanceOf(value)) {
25
- // We convert enums to a plain integer
26
- option = value.value;
27
- }
28
- if (this.options[option] == null) {
29
- throw new Error(value + ' is not a valid enum value');
30
- }
31
- else {
32
- return option;
33
- }
34
- }
35
- }
36
- exports.SingleChoiceIntegerType = SingleChoiceIntegerType;
37
- SingleChoiceIntegerType.TYPE = 'single-choice-integer';
38
- //# sourceMappingURL=SingleChoiceInteger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SingleChoiceInteger.js","sourceRoot":"","sources":["../../../src/types/primitives/SingleChoiceInteger.ts"],"names":[],"mappings":";;;AAAA,8CAA2C;AAC3C,6CAA0C;AAE1C,6BAAqC,SAAQ,uBAAU;IAGrD;QACE,KAAK,CAAC,uBAAuB,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED,eAAe,CAAC,MAAgB;QAC9B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED,EAAE,CAAC,KAAU;QACX,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,KAAU;QACd,IAAI,MAAM,GAAW,IAAI,CAAC;QAC1B,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE,CAAC;YAC7B,MAAM,GAAG,KAAK,CAAC;QACjB,CAAC;aAAM,IAAI,uBAAU,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1C,sCAAsC;YACtC,MAAM,GAAG,KAAK,CAAC,KAAe,CAAC;QACjC,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,KAAK,GAAG,4BAA4B,CAAC,CAAC;QACxD,CAAC;aAAM,CAAC;YACN,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;CACF;;AA/BiB,4BAAI,GAAG,uBAAuB,CAAC","sourcesContent":["import { EnumOption } from '../EnumOption';\nimport { ChoiceType } from './ChoiceType';\n\nexport class SingleChoiceIntegerType extends ChoiceType {\n static readonly TYPE = 'single-choice-integer';\n\n constructor() {\n super(SingleChoiceIntegerType.TYPE, { multiple: false });\n }\n\n setOptionLabels(labels: string[]) {\n this.options = {};\n for (let i = 0; i < labels.length; i++) {\n this.addOption(i, labels[i], i);\n }\n }\n\n is(value: any): boolean {\n return typeof value === 'number' && this.options[value] != null;\n }\n\n parse(value: any) {\n let option: number = null;\n if (typeof value == 'number') {\n option = value;\n } else if (EnumOption.isInstanceOf(value)) {\n // We convert enums to a plain integer\n option = value.value as number;\n }\n if (this.options[option] == null) {\n throw new Error(value + ' is not a valid enum value');\n } else {\n return option;\n }\n }\n}\n"]}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TextType = void 0;
4
- const parser_type_system_1 = require("@ja-platform/parser-type-system");
5
- class TextType extends parser_type_system_1.TextType {
6
- static isInstanceOf(type) {
7
- return (type === null || type === void 0 ? void 0 : type._typeName) === TextType.TYPE;
8
- }
9
- toJSON() {
10
- const json = {};
11
- if (this.spec != null) {
12
- json.spec = this.spec;
13
- }
14
- if (this.subType != null) {
15
- json.subType = this.subType;
16
- }
17
- return json;
18
- }
19
- }
20
- exports.TextType = TextType;
21
- TextType.TYPE = 'text';
22
- //# sourceMappingURL=Text.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/types/primitives/Text.ts"],"names":[],"mappings":";;;AAAA,wEAAkF;AAElF,cAAsB,SAAQ,6BAAa;IAGzC,MAAM,CAAC,YAAY,CAAC,IAAU;QAC5B,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS,MAAK,QAAQ,CAAC,IAAI,CAAC;IAC3C,CAAC;IAKD,MAAM;QACJ,MAAM,IAAI,GAAG,EAAS,CAAC;QACvB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;YACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;;AAnBiB,aAAI,GAAG,MAAM,CAAC","sourcesContent":["import { Type, TextType as ValueTextType } from '@ja-platform/parser-type-system';\n\nexport class TextType extends ValueTextType {\n static readonly TYPE = 'text';\n\n static isInstanceOf(type: Type): type is TextType {\n return type?._typeName === TextType.TYPE;\n }\n\n spec?: string;\n subType?: string;\n\n toJSON() {\n const json = {} as any;\n if (this.spec != null) {\n json.spec = this.spec;\n }\n if (this.subType != null) {\n json.subType = this.subType;\n }\n return json;\n }\n}\n"]}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AttachmentType = void 0;
4
- const parser_type_system_1 = require("@ja-platform/parser-type-system");
5
- class AttachmentType extends parser_type_system_1.Type {
6
- static isInstanceOf(type) {
7
- return type.name === AttachmentType.TYPE;
8
- }
9
- constructor() {
10
- super(AttachmentType.TYPE);
11
- this._typeName = 'attachment';
12
- }
13
- }
14
- exports.AttachmentType = AttachmentType;
15
- AttachmentType.TYPE = 'attachment';
16
- //# sourceMappingURL=Attachment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Attachment.js","sourceRoot":"","sources":["../../../../src/types/primitives/attachments/Attachment.ts"],"names":[],"mappings":";;;AAAA,wEAAuD;AAEvD,oBAA4B,SAAQ,yBAAI;IAItC,MAAM,CAAC,YAAY,CAAC,IAAU;QAC5B,OAAO,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,CAAC;IAC3C,CAAC;IAKD;QACE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAXpB,cAAS,GAAG,YAAY,CAAC;IAYlC,CAAC;CACF;;AAZiB,mBAAI,GAAG,YAAY,AAAf,CAAgB","sourcesContent":["import { Type } from '@ja-platform/parser-type-system';\n\nexport class AttachmentType extends Type {\n readonly _typeName = 'attachment';\n static readonly TYPE = 'attachment';\n\n static isInstanceOf(type: Type): type is AttachmentType {\n return type.name === AttachmentType.TYPE;\n }\n\n media?: string;\n autoDownload?: boolean;\n\n constructor() {\n super(AttachmentType.TYPE);\n }\n}\n"]}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PhotoType = void 0;
4
- const Attachment_1 = require("./Attachment");
5
- class PhotoType extends Attachment_1.AttachmentType {
6
- constructor() {
7
- super();
8
- this.media = 'image/jpeg';
9
- }
10
- stringify() {
11
- return PhotoType.SUB_TYPE;
12
- }
13
- }
14
- exports.PhotoType = PhotoType;
15
- PhotoType.SUB_TYPE = 'photo';
16
- //# sourceMappingURL=Photo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Photo.js","sourceRoot":"","sources":["../../../../src/types/primitives/attachments/Photo.ts"],"names":[],"mappings":";;;AAAA,6CAA8C;AAE9C,eAAuB,SAAQ,2BAAc;IAG3C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IAC5B,CAAC;IAED,SAAS;QACP,OAAO,SAAS,CAAC,QAAQ,CAAC;IAC5B,CAAC;CACF;;AAViB,kBAAQ,GAAG,OAAO,CAAC","sourcesContent":["import { AttachmentType } from './Attachment';\n\nexport class PhotoType extends AttachmentType {\n static readonly SUB_TYPE = 'photo';\n\n constructor() {\n super();\n this.media = 'image/jpeg';\n }\n\n stringify(): string {\n return PhotoType.SUB_TYPE;\n }\n}\n"]}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SignatureType = void 0;
4
- const Attachment_1 = require("./Attachment");
5
- class SignatureType extends Attachment_1.AttachmentType {
6
- constructor() {
7
- super();
8
- this.media = 'image/svg+xml';
9
- }
10
- stringify() {
11
- return SignatureType.SUB_TYPE;
12
- }
13
- }
14
- exports.SignatureType = SignatureType;
15
- SignatureType.SUB_TYPE = 'signature';
16
- //# sourceMappingURL=Signature.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Signature.js","sourceRoot":"","sources":["../../../../src/types/primitives/attachments/Signature.ts"],"names":[],"mappings":";;;AAAA,6CAA8C;AAE9C,mBAA2B,SAAQ,2BAAc;IAG/C;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC;IAC/B,CAAC;IAED,SAAS;QACP,OAAO,aAAa,CAAC,QAAQ,CAAC;IAChC,CAAC;CACF;;AAViB,sBAAQ,GAAG,WAAW,CAAC","sourcesContent":["import { AttachmentType } from './Attachment';\n\nexport class SignatureType extends AttachmentType {\n static readonly SUB_TYPE = 'signature';\n\n constructor() {\n super();\n this.media = 'image/svg+xml';\n }\n\n stringify(): string {\n return SignatureType.SUB_TYPE;\n }\n}\n"]}
@@ -1,85 +0,0 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.NumberType = exports.IntegerType = exports.PrimitiveTypeMap = exports.PrimitiveType = void 0;
18
- const Attachment_1 = require("./attachments/Attachment");
19
- const Text_1 = require("./Text");
20
- const Boolean_1 = require("./Boolean");
21
- const Location_1 = require("./Location");
22
- const GeoTrack_1 = require("./GeoTrack");
23
- const SingleChoice_1 = require("./SingleChoice");
24
- const SingleChoiceInteger_1 = require("./SingleChoiceInteger");
25
- const MultipleChoice_1 = require("./MultipleChoice");
26
- const MultipleChoiceInteger_1 = require("./MultipleChoiceInteger");
27
- const parser_type_system_1 = require("@ja-platform/parser-type-system");
28
- const Date_1 = require("./Date");
29
- const Datetime_1 = require("./Datetime");
30
- const Photo_1 = require("./attachments/Photo");
31
- const Signature_1 = require("./attachments/Signature");
32
- exports.PrimitiveType = {
33
- ATTACHMENT: Attachment_1.AttachmentType.TYPE,
34
- BOOLEAN: Boolean_1.BooleanType.TYPE,
35
- DATE: Date_1.DateType.TYPE,
36
- DATETIME: Datetime_1.DatetimeType.TYPE,
37
- GEO_TRACK: GeoTrack_1.GeoTrackType.TYPE,
38
- INTEGER: parser_type_system_1.IntegerType.TYPE,
39
- LOCATION: Location_1.LocationType.TYPE,
40
- MULTIPLE_CHOICE_INTEGER: MultipleChoiceInteger_1.MultipleChoiceIntegerType.TYPE,
41
- MULTIPLE_CHOICE: MultipleChoice_1.MultipleChoiceType.TYPE,
42
- NUMBER: parser_type_system_1.NumberType.TYPE,
43
- SINGLE_CHOICE_INTEGER: SingleChoiceInteger_1.SingleChoiceIntegerType.TYPE,
44
- SINGLE_CHOICE: SingleChoice_1.SingleChoiceType.TYPE,
45
- TEXT: Text_1.TextType.TYPE,
46
- PHOTO: Photo_1.PhotoType.SUB_TYPE,
47
- SIGNATURE: Signature_1.SignatureType.SUB_TYPE
48
- };
49
- // Collection of primitive types.
50
- // Each type is a constructor creating a default instance of that type.
51
- exports.PrimitiveTypeMap = {
52
- [exports.PrimitiveType.ATTACHMENT]: Attachment_1.AttachmentType,
53
- [exports.PrimitiveType.BOOLEAN]: Boolean_1.BooleanType,
54
- [exports.PrimitiveType.DATE]: Date_1.DateType,
55
- [exports.PrimitiveType.DATETIME]: Datetime_1.DatetimeType,
56
- [exports.PrimitiveType.GEO_TRACK]: GeoTrack_1.GeoTrackType,
57
- [exports.PrimitiveType.INTEGER]: parser_type_system_1.IntegerType,
58
- [exports.PrimitiveType.LOCATION]: Location_1.LocationType,
59
- [exports.PrimitiveType.MULTIPLE_CHOICE_INTEGER]: MultipleChoiceInteger_1.MultipleChoiceIntegerType,
60
- [exports.PrimitiveType.MULTIPLE_CHOICE]: MultipleChoice_1.MultipleChoiceType,
61
- [exports.PrimitiveType.NUMBER]: parser_type_system_1.NumberType,
62
- [exports.PrimitiveType.SINGLE_CHOICE_INTEGER]: SingleChoiceInteger_1.SingleChoiceIntegerType,
63
- [exports.PrimitiveType.SINGLE_CHOICE]: SingleChoice_1.SingleChoiceType,
64
- [exports.PrimitiveType.TEXT]: Text_1.TextType,
65
- [exports.PrimitiveType.SIGNATURE]: Signature_1.SignatureType,
66
- [exports.PrimitiveType.PHOTO]: Photo_1.PhotoType
67
- };
68
- __exportStar(require("./Boolean"), exports);
69
- __exportStar(require("./Date"), exports);
70
- __exportStar(require("./Datetime"), exports);
71
- var parser_type_system_2 = require("@ja-platform/parser-type-system");
72
- Object.defineProperty(exports, "IntegerType", { enumerable: true, get: function () { return parser_type_system_2.IntegerType; } });
73
- Object.defineProperty(exports, "NumberType", { enumerable: true, get: function () { return parser_type_system_2.NumberType; } });
74
- __exportStar(require("./Text"), exports);
75
- __exportStar(require("./Location"), exports);
76
- __exportStar(require("./GeoTrack"), exports);
77
- __exportStar(require("./ChoiceType"), exports);
78
- __exportStar(require("./MultipleChoice"), exports);
79
- __exportStar(require("./MultipleChoiceInteger"), exports);
80
- __exportStar(require("./SingleChoice"), exports);
81
- __exportStar(require("./SingleChoiceInteger"), exports);
82
- __exportStar(require("./attachments/Attachment"), exports);
83
- __exportStar(require("./attachments/Photo"), exports);
84
- __exportStar(require("./attachments/Signature"), exports);
85
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/primitives/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yDAA0D;AAC1D,iCAAkC;AAClC,uCAAwC;AACxC,yCAA0C;AAC1C,yCAA0C;AAC1C,iDAAkD;AAClD,+DAAgE;AAChE,qDAAsD;AACtD,mEAAoE;AACpE,wEAA0E;AAC1E,iCAAkC;AAClC,yCAA0C;AAC1C,+CAAgD;AAChD,uDAAwD;AAE3C,QAAA,aAAa,GAAG;IAC3B,UAAU,EAAE,2BAAc,CAAC,IAAI;IAC/B,OAAO,EAAE,qBAAW,CAAC,IAAI;IACzB,IAAI,EAAE,eAAQ,CAAC,IAAI;IACnB,QAAQ,EAAE,uBAAY,CAAC,IAAI;IAC3B,SAAS,EAAE,uBAAY,CAAC,IAAI;IAC5B,OAAO,EAAE,gCAAW,CAAC,IAAI;IACzB,QAAQ,EAAE,uBAAY,CAAC,IAAI;IAC3B,uBAAuB,EAAE,iDAAyB,CAAC,IAAI;IACvD,eAAe,EAAE,mCAAkB,CAAC,IAAI;IACxC,MAAM,EAAE,+BAAU,CAAC,IAAI;IACvB,qBAAqB,EAAE,6CAAuB,CAAC,IAAI;IACnD,aAAa,EAAE,+BAAgB,CAAC,IAAI;IACpC,IAAI,EAAE,eAAQ,CAAC,IAAI;IACnB,KAAK,EAAE,iBAAS,CAAC,QAAQ;IACzB,SAAS,EAAE,yBAAa,CAAC,QAAQ;CACzB,CAAC;AAGX,iCAAiC;AACjC,uEAAuE;AAC1D,QAAA,gBAAgB,GAAG;IAC9B,CAAC,QAAA,aAAa,CAAC,UAAU,CAAC,EAAE,2BAAc;IAC1C,CAAC,QAAA,aAAa,CAAC,OAAO,CAAC,EAAE,qBAAW;IACpC,CAAC,QAAA,aAAa,CAAC,IAAI,CAAC,EAAE,eAAQ;IAC9B,CAAC,QAAA,aAAa,CAAC,QAAQ,CAAC,EAAE,uBAAY;IACtC,CAAC,QAAA,aAAa,CAAC,SAAS,CAAC,EAAE,uBAAY;IACvC,CAAC,QAAA,aAAa,CAAC,OAAO,CAAC,EAAE,gCAAW;IACpC,CAAC,QAAA,aAAa,CAAC,QAAQ,CAAC,EAAE,uBAAY;IACtC,CAAC,QAAA,aAAa,CAAC,uBAAuB,CAAC,EAAE,iDAAyB;IAClE,CAAC,QAAA,aAAa,CAAC,eAAe,CAAC,EAAE,mCAAkB;IACnD,CAAC,QAAA,aAAa,CAAC,MAAM,CAAC,EAAE,+BAAU;IAClC,CAAC,QAAA,aAAa,CAAC,qBAAqB,CAAC,EAAE,6CAAuB;IAC9D,CAAC,QAAA,aAAa,CAAC,aAAa,CAAC,EAAE,+BAAgB;IAC/C,CAAC,QAAA,aAAa,CAAC,IAAI,CAAC,EAAE,eAAQ;IAC9B,CAAC,QAAA,aAAa,CAAC,SAAS,CAAC,EAAE,yBAAa;IACxC,CAAC,QAAA,aAAa,CAAC,KAAK,CAAC,EAAE,iBAAS;CACxB,CAAC;AASX,4CAA0B;AAC1B,yCAAuB;AACvB,6CAA2B;AAC3B,sEAA0E;AAAjE,iHAAA,WAAW,OAAA;AAAE,gHAAA,UAAU,OAAA;AAChC,yCAAuB;AACvB,6CAA2B;AAC3B,6CAA2B;AAE3B,+CAA6B;AAC7B,mDAAiC;AACjC,0DAAwC;AACxC,iDAA+B;AAC/B,wDAAsC;AAEtC,2DAAyC;AACzC,sDAAoC;AACpC,0DAAwC","sourcesContent":["import { AttachmentType } from './attachments/Attachment';\nimport { TextType } from './Text';\nimport { BooleanType } from './Boolean';\nimport { LocationType } from './Location';\nimport { GeoTrackType } from './GeoTrack';\nimport { SingleChoiceType } from './SingleChoice';\nimport { SingleChoiceIntegerType } from './SingleChoiceInteger';\nimport { MultipleChoiceType } from './MultipleChoice';\nimport { MultipleChoiceIntegerType } from './MultipleChoiceInteger';\nimport { IntegerType, NumberType } from '@ja-platform/parser-type-system';\nimport { DateType } from './Date';\nimport { DatetimeType } from './Datetime';\nimport { PhotoType } from './attachments/Photo';\nimport { SignatureType } from './attachments/Signature';\n\nexport const PrimitiveType = {\n ATTACHMENT: AttachmentType.TYPE,\n BOOLEAN: BooleanType.TYPE,\n DATE: DateType.TYPE,\n DATETIME: DatetimeType.TYPE,\n GEO_TRACK: GeoTrackType.TYPE,\n INTEGER: IntegerType.TYPE,\n LOCATION: LocationType.TYPE,\n MULTIPLE_CHOICE_INTEGER: MultipleChoiceIntegerType.TYPE,\n MULTIPLE_CHOICE: MultipleChoiceType.TYPE,\n NUMBER: NumberType.TYPE,\n SINGLE_CHOICE_INTEGER: SingleChoiceIntegerType.TYPE,\n SINGLE_CHOICE: SingleChoiceType.TYPE,\n TEXT: TextType.TYPE,\n PHOTO: PhotoType.SUB_TYPE,\n SIGNATURE: SignatureType.SUB_TYPE\n} as const;\nexport type PrimitiveType = typeof PrimitiveType;\n\n// Collection of primitive types.\n// Each type is a constructor creating a default instance of that type.\nexport const PrimitiveTypeMap = {\n [PrimitiveType.ATTACHMENT]: AttachmentType,\n [PrimitiveType.BOOLEAN]: BooleanType,\n [PrimitiveType.DATE]: DateType,\n [PrimitiveType.DATETIME]: DatetimeType,\n [PrimitiveType.GEO_TRACK]: GeoTrackType,\n [PrimitiveType.INTEGER]: IntegerType,\n [PrimitiveType.LOCATION]: LocationType,\n [PrimitiveType.MULTIPLE_CHOICE_INTEGER]: MultipleChoiceIntegerType,\n [PrimitiveType.MULTIPLE_CHOICE]: MultipleChoiceType,\n [PrimitiveType.NUMBER]: NumberType,\n [PrimitiveType.SINGLE_CHOICE_INTEGER]: SingleChoiceIntegerType,\n [PrimitiveType.SINGLE_CHOICE]: SingleChoiceType,\n [PrimitiveType.TEXT]: TextType,\n [PrimitiveType.SIGNATURE]: SignatureType,\n [PrimitiveType.PHOTO]: PhotoType\n} as const;\n\nexport type PrimitiveTypeMap = typeof PrimitiveTypeMap;\n\n// Collection of primitive type names\nexport type PrimitiveTypeName = keyof typeof PrimitiveTypeMap;\n\nexport type PrimitiveTypeInstance = InstanceType<PrimitiveTypeMap[PrimitiveTypeName]>;\n\nexport * from './Boolean';\nexport * from './Date';\nexport * from './Datetime';\nexport { IntegerType, NumberType } from '@ja-platform/parser-type-system';\nexport * from './Text';\nexport * from './Location';\nexport * from './GeoTrack';\n\nexport * from './ChoiceType';\nexport * from './MultipleChoice';\nexport * from './MultipleChoiceInteger';\nexport * from './SingleChoice';\nexport * from './SingleChoiceInteger';\n\nexport * from './attachments/Attachment';\nexport * from './attachments/Photo';\nexport * from './attachments/Signature';\n"]}