jspurefix 3.4.0 → 4.0.0

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 (243) hide show
  1. package/appveyor.yml +1 -1
  2. package/dist/buffer/ascii/ascii-encoder.d.ts +2 -2
  3. package/dist/buffer/ascii/ascii-encoder.js +1 -1
  4. package/dist/buffer/ascii/ascii-encoder.js.map +1 -1
  5. package/dist/buffer/ascii/ascii-parser-state.d.ts +3 -2
  6. package/dist/buffer/ascii/ascii-parser-state.js +1 -2
  7. package/dist/buffer/ascii/ascii-parser-state.js.map +1 -1
  8. package/dist/buffer/ascii/ascii-parser.d.ts +1 -1
  9. package/dist/buffer/ascii/ascii-parser.js +5 -4
  10. package/dist/buffer/ascii/ascii-parser.js.map +1 -1
  11. package/dist/buffer/ascii/ascii-segment-parser.js.map +1 -1
  12. package/dist/buffer/ascii/ascii-view.d.ts +4 -3
  13. package/dist/buffer/ascii/ascii-view.js +8 -5
  14. package/dist/buffer/ascii/ascii-view.js.map +1 -1
  15. package/dist/buffer/encode-proxy.js +1 -1
  16. package/dist/buffer/encode-proxy.js.map +1 -1
  17. package/dist/buffer/fixml/fixml-encoder.d.ts +2 -2
  18. package/dist/buffer/fixml/fixml-encoder.js +1 -1
  19. package/dist/buffer/fixml/fixml-encoder.js.map +1 -1
  20. package/dist/buffer/fixml/fixml-parser.js +2 -2
  21. package/dist/buffer/fixml/fixml-parser.js.map +1 -1
  22. package/dist/buffer/fixml/fixml-view.d.ts +3 -2
  23. package/dist/buffer/fixml/fixml-view.js +5 -4
  24. package/dist/buffer/fixml/fixml-view.js.map +1 -1
  25. package/dist/buffer/msg-encoder.d.ts +2 -2
  26. package/dist/buffer/msg-encoder.js.map +1 -1
  27. package/dist/buffer/msg-view.d.ts +8 -6
  28. package/dist/buffer/msg-view.js +10 -8
  29. package/dist/buffer/msg-view.js.map +1 -1
  30. package/dist/buffer/segment/segment-description.d.ts +3 -3
  31. package/dist/buffer/segment/segment-description.js.map +1 -1
  32. package/dist/buffer/tag/tags.d.ts +2 -5
  33. package/dist/buffer/tag/tags.js +4 -5
  34. package/dist/buffer/tag/tags.js.map +1 -1
  35. package/dist/collections/collection.d.ts +0 -1
  36. package/dist/collections/collection.js.map +1 -1
  37. package/dist/collections/index.d.ts +0 -1
  38. package/dist/collections/index.js +0 -17
  39. package/dist/collections/index.js.map +1 -1
  40. package/dist/config/js-fix-config.d.ts +2 -1
  41. package/dist/config/js-fix-config.js +3 -3
  42. package/dist/config/js-fix-config.js.map +1 -1
  43. package/dist/dictionary/compiler/compiler-type.d.ts +3 -3
  44. package/dist/dictionary/compiler/compiler-type.js.map +1 -1
  45. package/dist/dictionary/compiler/enum-compiler.js +2 -2
  46. package/dist/dictionary/compiler/enum-compiler.js.map +1 -1
  47. package/dist/dictionary/compiler/msg-compiler.d.ts +1 -2
  48. package/dist/dictionary/compiler/msg-compiler.js +6 -7
  49. package/dist/dictionary/compiler/msg-compiler.js.map +1 -1
  50. package/dist/dictionary/contained/contained-component-field.d.ts +1 -1
  51. package/dist/dictionary/contained/contained-component-field.js.map +1 -1
  52. package/dist/dictionary/contained/contained-field-set.d.ts +9 -20
  53. package/dist/dictionary/contained/contained-field-set.js +16 -149
  54. package/dist/dictionary/contained/contained-field-set.js.map +1 -1
  55. package/dist/dictionary/contained/contained-group-field.d.ts +1 -1
  56. package/dist/dictionary/contained/contained-group-field.js.map +1 -1
  57. package/dist/dictionary/contained/contained-set-builder.d.ts +15 -0
  58. package/dist/dictionary/contained/contained-set-builder.js +142 -0
  59. package/dist/dictionary/contained/contained-set-builder.js.map +1 -0
  60. package/dist/dictionary/contained/contained-set.d.ts +32 -0
  61. package/dist/{types/FIX.5.0SP2/quickfix/xm_lnon_fix.js → dictionary/contained/contained-set.js} +1 -1
  62. package/dist/dictionary/contained/contained-set.js.map +1 -0
  63. package/dist/dictionary/contained/contained-simple-field.d.ts +1 -1
  64. package/dist/dictionary/contained/contained-simple-field.js.map +1 -1
  65. package/dist/dictionary/contained/index.d.ts +4 -1
  66. package/dist/dictionary/contained/index.js +4 -1
  67. package/dist/dictionary/contained/index.js.map +1 -1
  68. package/dist/dictionary/definition/category-simple-set.d.ts +1 -2
  69. package/dist/dictionary/definition/category-simple-set.js +1 -2
  70. package/dist/dictionary/definition/category-simple-set.js.map +1 -1
  71. package/dist/dictionary/definition/component-field-definition.d.ts +1 -1
  72. package/dist/dictionary/definition/component-field-definition.js +2 -2
  73. package/dist/dictionary/definition/component-field-definition.js.map +1 -1
  74. package/dist/dictionary/definition/fix-definitions.d.ts +8 -9
  75. package/dist/dictionary/definition/fix-definitions.js +22 -20
  76. package/dist/dictionary/definition/fix-definitions.js.map +1 -1
  77. package/dist/dictionary/definition/group-field-definition.d.ts +1 -1
  78. package/dist/dictionary/definition/group-field-definition.js +2 -2
  79. package/dist/dictionary/definition/group-field-definition.js.map +1 -1
  80. package/dist/dictionary/definition/message-definition.d.ts +1 -1
  81. package/dist/dictionary/definition/message-definition.js +2 -2
  82. package/dist/dictionary/definition/message-definition.js.map +1 -1
  83. package/dist/dictionary/definition/simple-field-definition.d.ts +2 -3
  84. package/dist/dictionary/definition/simple-field-definition.js +6 -7
  85. package/dist/dictionary/definition/simple-field-definition.js.map +1 -1
  86. package/dist/dictionary/parser/fix-repository/repository.js +20 -20
  87. package/dist/dictionary/parser/fix-repository/repository.js.map +1 -1
  88. package/dist/dictionary/parser/fixml/components-parser.js +18 -16
  89. package/dist/dictionary/parser/fixml/components-parser.js.map +1 -1
  90. package/dist/dictionary/parser/fixml/fields-parser.js +2 -3
  91. package/dist/dictionary/parser/fixml/fields-parser.js.map +1 -1
  92. package/dist/dictionary/parser/fixml/include-graph.js +8 -9
  93. package/dist/dictionary/parser/fixml/include-graph.js.map +1 -1
  94. package/dist/dictionary/parser/quickfix/field-definition-parser.js.map +1 -1
  95. package/dist/dictionary/parser/quickfix/message-parser.js +2 -1
  96. package/dist/dictionary/parser/quickfix/message-parser.js.map +1 -1
  97. package/dist/dictionary/parser/quickfix/node-parser.js +3 -2
  98. package/dist/dictionary/parser/quickfix/node-parser.js.map +1 -1
  99. package/dist/dictionary/parser/quickfix/parse-context.d.ts +3 -3
  100. package/dist/dictionary/parser/quickfix/parse-context.js.map +1 -1
  101. package/dist/dictionary/parser/quickfix/parse-progress.d.ts +1 -2
  102. package/dist/dictionary/parser/quickfix/parse-progress.js +2 -3
  103. package/dist/dictionary/parser/quickfix/parse-progress.js.map +1 -1
  104. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-builder.js +4 -5
  105. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-builder.js.map +1 -1
  106. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js +6 -6
  107. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js.map +1 -1
  108. package/dist/dictionary/parser/quickfix/quick-fix-xml-formatter.d.ts +1 -1
  109. package/dist/dictionary/parser/quickfix/quick-fix-xml-formatter.js.map +1 -1
  110. package/dist/dictionary/set-reduce.d.ts +2 -2
  111. package/dist/dictionary/set-reduce.js.map +1 -1
  112. package/dist/index.d.ts +0 -1
  113. package/dist/index.js +0 -1
  114. package/dist/index.js.map +1 -1
  115. package/dist/jsfix-cmd.js +4 -5
  116. package/dist/jsfix-cmd.js.map +1 -1
  117. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js +7 -8
  118. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js.map +1 -1
  119. package/dist/sample/tcp/trade-capture/trade-capture-client.js +3 -4
  120. package/dist/sample/tcp/trade-capture/trade-capture-client.js.map +1 -1
  121. package/dist/sample/tcp/trade-capture/trade-capture-server.js.map +1 -1
  122. package/dist/store/fix-msg-ascii-store-resend.d.ts +4 -3
  123. package/dist/store/fix-msg-ascii-store-resend.js +21 -5
  124. package/dist/store/fix-msg-ascii-store-resend.js.map +1 -1
  125. package/dist/store/fix-msg-memory-store.js +3 -4
  126. package/dist/store/fix-msg-memory-store.js.map +1 -1
  127. package/dist/store/fix-msg-store-record.js.map +1 -1
  128. package/dist/test/ascii/ascii-encoder.test.js.map +1 -1
  129. package/dist/test/ascii/ascii-store-replay.test.js +14 -1
  130. package/dist/test/ascii/ascii-store-replay.test.js.map +1 -1
  131. package/dist/test/ascii/fix-log-replay.test.js.map +1 -1
  132. package/dist/test/ascii/fix-repo-dict.test.js.map +1 -1
  133. package/dist/test/ascii/qf-50sp0-dict.test.js +7 -7
  134. package/dist/test/ascii/qf-50sp0-dict.test.js.map +1 -1
  135. package/dist/test/ascii/qf-50sp2-dict.test.js +5 -2
  136. package/dist/test/ascii/qf-50sp2-dict.test.js.map +1 -1
  137. package/dist/test/ascii/session.test.js +64 -15
  138. package/dist/test/ascii/session.test.js.map +1 -1
  139. package/dist/test/env/encoder-test.d.ts +3 -3
  140. package/dist/test/env/encoder-test.js.map +1 -1
  141. package/dist/test/env/set-constraint-helper.d.ts +4 -4
  142. package/dist/test/env/set-constraint-helper.js.map +1 -1
  143. package/dist/transport/ascii/ascii-msg-transmitter.js.map +1 -1
  144. package/dist/transport/ascii/ascii-session.js +5 -2
  145. package/dist/transport/ascii/ascii-session.js.map +1 -1
  146. package/dist/transport/fixml/fixml-session.js.map +1 -1
  147. package/dist/transport/http/http-acceptor.js +3 -4
  148. package/dist/transport/http/http-acceptor.js.map +1 -1
  149. package/dist/transport/http/http-json-sample-adapter.js +3 -4
  150. package/dist/transport/http/http-json-sample-adapter.js.map +1 -1
  151. package/dist/transport/session/dynamic-session-manager.d.ts +8 -0
  152. package/dist/transport/session/dynamic-session-manager.js +15 -0
  153. package/dist/transport/session/dynamic-session-manager.js.map +1 -0
  154. package/dist/transport/session/session-description.d.ts +9 -7
  155. package/dist/transport/session/session-description.js.map +1 -1
  156. package/dist/util/json-helper.d.ts +2 -2
  157. package/dist/util/json-helper.js.map +1 -1
  158. package/dist/util/message-generator.js +1 -1
  159. package/dist/util/message-generator.js.map +1 -1
  160. package/package.json +21 -21
  161. package/src/buffer/ascii/ascii-encoder.ts +7 -7
  162. package/src/buffer/ascii/ascii-parser-state.ts +4 -4
  163. package/src/buffer/ascii/ascii-parser.ts +6 -5
  164. package/src/buffer/ascii/ascii-segment-parser.ts +2 -2
  165. package/src/buffer/ascii/ascii-view.ts +9 -7
  166. package/src/buffer/encode-proxy.ts +9 -9
  167. package/src/buffer/fixml/fixml-encoder.ts +14 -10
  168. package/src/buffer/fixml/fixml-parser.ts +5 -5
  169. package/src/buffer/fixml/fixml-view.ts +5 -5
  170. package/src/buffer/msg-encoder.ts +3 -3
  171. package/src/buffer/msg-view.ts +18 -18
  172. package/src/buffer/segment/segment-description.ts +2 -2
  173. package/src/buffer/tag/tags.ts +4 -6
  174. package/src/collections/collection.ts +0 -1
  175. package/src/collections/index.ts +1 -1
  176. package/src/config/js-fix-config.ts +3 -2
  177. package/src/dictionary/compiler/compiler-type.ts +8 -2
  178. package/src/dictionary/compiler/enum-compiler.ts +2 -2
  179. package/src/dictionary/compiler/msg-compiler.ts +11 -12
  180. package/src/dictionary/contained/contained-component-field.ts +1 -1
  181. package/src/dictionary/contained/contained-field-set.ts +21 -176
  182. package/src/dictionary/contained/contained-group-field.ts +1 -1
  183. package/src/dictionary/contained/contained-set-builder.ts +164 -0
  184. package/src/dictionary/contained/contained-set.ts +83 -0
  185. package/src/dictionary/contained/contained-simple-field.ts +1 -1
  186. package/src/dictionary/contained/index.ts +4 -1
  187. package/src/dictionary/definition/category-simple-set.ts +1 -2
  188. package/src/dictionary/definition/component-field-definition.ts +1 -1
  189. package/src/dictionary/definition/fix-definitions.ts +28 -26
  190. package/src/dictionary/definition/group-field-definition.ts +1 -1
  191. package/src/dictionary/definition/message-definition.ts +6 -6
  192. package/src/dictionary/definition/simple-field-definition.ts +9 -10
  193. package/src/dictionary/parser/fix-repository/repository.ts +47 -40
  194. package/src/dictionary/parser/fixml/components-parser.ts +41 -38
  195. package/src/dictionary/parser/fixml/fields-parser.ts +3 -4
  196. package/src/dictionary/parser/fixml/include-graph.ts +13 -14
  197. package/src/dictionary/parser/quickfix/field-definition-parser.ts +5 -5
  198. package/src/dictionary/parser/quickfix/message-parser.ts +7 -5
  199. package/src/dictionary/parser/quickfix/node-parser.ts +13 -6
  200. package/src/dictionary/parser/quickfix/parse-context.ts +2 -2
  201. package/src/dictionary/parser/quickfix/parse-progress.ts +2 -3
  202. package/src/dictionary/parser/quickfix/quick-fix-xml-file-builder.ts +4 -5
  203. package/src/dictionary/parser/quickfix/quick-fix-xml-file-parser.ts +10 -12
  204. package/src/dictionary/parser/quickfix/quick-fix-xml-formatter.ts +1 -1
  205. package/src/dictionary/set-reduce.ts +3 -3
  206. package/src/index.ts +0 -1
  207. package/src/jsfix-cmd.ts +5 -6
  208. package/src/sample/tcp/recovering-skeleton/respawn-acceptor.ts +7 -8
  209. package/src/sample/tcp/trade-capture/trade-capture-client.ts +4 -5
  210. package/src/sample/tcp/trade-capture/trade-capture-server.ts +1 -1
  211. package/src/store/fix-msg-ascii-store-resend.ts +64 -8
  212. package/src/store/fix-msg-memory-store.ts +3 -4
  213. package/src/store/fix-msg-store-record.ts +1 -1
  214. package/src/transport/ascii/ascii-msg-transmitter.ts +6 -6
  215. package/src/transport/ascii/ascii-session.ts +11 -7
  216. package/src/transport/fixml/fixml-session.ts +3 -3
  217. package/src/transport/http/http-acceptor.ts +4 -5
  218. package/src/transport/http/http-json-sample-adapter.ts +3 -4
  219. package/src/transport/session/dynamic-session-manager.ts +16 -0
  220. package/src/transport/session/session-description.ts +10 -7
  221. package/src/util/json-helper.ts +3 -3
  222. package/src/util/message-generator.ts +4 -4
  223. package/dist/collections/dictionary.d.ts +0 -15
  224. package/dist/collections/dictionary.js +0 -57
  225. package/dist/collections/dictionary.js.map +0 -1
  226. package/dist/types/FIX.5.0SP2/quickfix/execution_acknowledgement.d.ts +0 -31
  227. package/dist/types/FIX.5.0SP2/quickfix/execution_acknowledgement.js +0 -3
  228. package/dist/types/FIX.5.0SP2/quickfix/execution_acknowledgement.js.map +0 -1
  229. package/dist/types/FIX.5.0SP2/quickfix/mass_quote_acknowledgement.d.ts +0 -26
  230. package/dist/types/FIX.5.0SP2/quickfix/mass_quote_acknowledgement.js +0 -3
  231. package/dist/types/FIX.5.0SP2/quickfix/mass_quote_acknowledgement.js.map +0 -1
  232. package/dist/types/FIX.5.0SP2/quickfix/set/hop_grp.d.ts +0 -5
  233. package/dist/types/FIX.5.0SP2/quickfix/set/hop_grp.js +0 -3
  234. package/dist/types/FIX.5.0SP2/quickfix/set/hop_grp.js.map +0 -1
  235. package/dist/types/FIX.5.0SP2/quickfix/set/msg_type_grp.d.ts +0 -8
  236. package/dist/types/FIX.5.0SP2/quickfix/set/msg_type_grp.js +0 -3
  237. package/dist/types/FIX.5.0SP2/quickfix/set/msg_type_grp.js.map +0 -1
  238. package/dist/types/FIX.5.0SP2/quickfix/set/not_affected_orders_grp.d.ts +0 -4
  239. package/dist/types/FIX.5.0SP2/quickfix/set/not_affected_orders_grp.js +0 -3
  240. package/dist/types/FIX.5.0SP2/quickfix/set/not_affected_orders_grp.js.map +0 -1
  241. package/dist/types/FIX.5.0SP2/quickfix/xm_lnon_fix.d.ts +0 -6
  242. package/dist/types/FIX.5.0SP2/quickfix/xm_lnon_fix.js.map +0 -1
  243. package/src/collections/dictionary.ts +0 -62
@@ -0,0 +1,32 @@
1
+ import { ContainedSimpleField } from './contained-simple-field';
2
+ import { ContainedField } from './contained-field';
3
+ import { INumericKeyed } from '../../collections/collection';
4
+ import { ContainedSetType } from '../contained-set-type';
5
+ export interface IContainedSet {
6
+ readonly groups: Map<string, IContainedSet>;
7
+ readonly components: Map<string, IContainedSet>;
8
+ readonly simple: Map<string, ContainedSimpleField>;
9
+ readonly fields: ContainedField[];
10
+ readonly containedTag: INumericKeyed<boolean>;
11
+ readonly flattenedTag: number[];
12
+ readonly containedLength: INumericKeyed<boolean>;
13
+ readonly localTag: INumericKeyed<ContainedSimpleField>;
14
+ readonly localRequired: INumericKeyed<ContainedSimpleField>;
15
+ readonly tagToSimple: INumericKeyed<ContainedSimpleField>;
16
+ readonly tagToField: INumericKeyed<ContainedField>;
17
+ readonly localNameToField: Map<string, ContainedField>;
18
+ readonly nameToLocalAttribute: Map<string, ContainedSimpleField>;
19
+ readonly localAttribute: ContainedSimpleField[];
20
+ readonly type: ContainedSetType;
21
+ readonly name: string;
22
+ readonly category: string | null;
23
+ readonly abbreviation: string | null;
24
+ readonly description: string | null;
25
+ firstSimple: (ContainedSimpleField | null);
26
+ containsRaw: boolean;
27
+ toString: () => string;
28
+ getPrefix: () => string;
29
+ getFieldName: (tag: number) => string;
30
+ getSet: (path: string) => IContainedSet | null;
31
+ keys: () => number[];
32
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=xm_lnon_fix.js.map
3
+ //# sourceMappingURL=contained-set.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contained-set.js","sourceRoot":"","sources":["../../../src/dictionary/contained/contained-set.ts"],"names":[],"mappings":"","sourcesContent":["import { ContainedSimpleField } from './contained-simple-field'\r\nimport { ContainedField } from './contained-field'\r\nimport { INumericKeyed } from '../../collections/collection'\r\nimport { ContainedSetType } from '../contained-set-type'\r\n\r\nexport interface IContainedSet {\r\n /**\r\n * index of name to any group that may be present within the field list\r\n */\r\n readonly groups: Map<string, IContainedSet>\r\n /**\r\n * index of name to any component that may be present within the field list\r\n */\r\n readonly components: Map<string, IContainedSet>\r\n /**\r\n * index of name to any simple field that may be present within the field list\r\n */\r\n readonly simple: Map<string, ContainedSimpleField>\r\n /**\r\n * sequence of fields representing this type - can be simple, group or component\r\n */\r\n readonly fields: ContainedField[]\r\n /**\r\n * any tag at any level i.e. does this set contain a tag\r\n */\r\n readonly containedTag: INumericKeyed<boolean>\r\n /**\r\n * any tag at any level ordered i.e. all tags flattened to list\r\n */\r\n readonly flattenedTag: number[]\r\n /**\r\n * any data tags contained length within this set.\r\n */\r\n readonly containedLength: INumericKeyed<boolean>\r\n /**\r\n * tags only in repository at this level, not from any at deeper levels\r\n */\r\n readonly localTag: INumericKeyed<ContainedSimpleField>\r\n /**\r\n * tags marked required at this level only\r\n */\r\n readonly localRequired: INumericKeyed<ContainedSimpleField>\r\n /**\r\n * all tags contained within this field set flattened from all levels\r\n */\r\n readonly tagToSimple: INumericKeyed<ContainedSimpleField>\r\n /**\r\n * direct any tag contained within this set to field one level down where it belongs.\r\n */\r\n readonly tagToField: INumericKeyed<ContainedField>\r\n /**\r\n * only repository directly in this set indexed by name\r\n */\r\n readonly localNameToField: Map<string, ContainedField>\r\n /**\r\n * for FixMl notation this set of fields appear as attributes i.e. <Pty ID=\"323\" R=\"38\">\r\n */\r\n readonly nameToLocalAttribute: Map<string, ContainedSimpleField>\r\n /**\r\n * all attributes in order of being declared\r\n */\r\n readonly localAttribute: ContainedSimpleField[]\r\n readonly type: ContainedSetType\r\n readonly name: string\r\n readonly category: string | null\r\n readonly abbreviation: string | null\r\n readonly description: string | null\r\n /**\r\n * at any level on this set, first declared simple field\r\n */\r\n firstSimple: (ContainedSimpleField | null)\r\n containsRaw: boolean\r\n\r\n toString: () => string\r\n\r\n getPrefix: () => string\r\n\r\n getFieldName: (tag: number) => string\r\n\r\n getSet: (path: string) => IContainedSet | null\r\n\r\n keys: () => number[]\r\n}\r\n"]}
@@ -1,5 +1,5 @@
1
1
  import { ContainedField } from './contained-field';
2
- import { SimpleFieldDefinition } from '../definition';
2
+ import { SimpleFieldDefinition } from '../definition/simple-field-definition';
3
3
  export declare class ContainedSimpleField extends ContainedField {
4
4
  readonly definition: SimpleFieldDefinition;
5
5
  readonly position: number;
@@ -1 +1 @@
1
- {"version":3,"file":"contained-simple-field.js","sourceRoot":"","sources":["../../../src/dictionary/contained/contained-simple-field.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAElD,iEAA2D;AAE3D,MAAa,oBAAqB,SAAQ,gCAAc;IACtD,YAA6B,UAAiC,EAC5C,QAAgB,EAChB,QAAiB,EACjB,SAAkB,EAClB,QAAiB;QACjC,KAAK,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,yCAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QALtD,eAAU,GAAV,UAAU,CAAuB;QAC5C,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAS;QACjB,cAAS,GAAT,SAAS,CAAS;QAClB,aAAQ,GAAR,QAAQ,CAAS;IAEnC,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,IAAI,CAAC,IAAI,GAAG,CAAA;IACrE,CAAC;CACF;AAZD,oDAYC","sourcesContent":["import { ContainedField } from './contained-field'\r\nimport { SimpleFieldDefinition } from '../definition'\r\nimport { ContainedFieldType } from './contained-field-type'\r\n\r\nexport class ContainedSimpleField extends ContainedField {\r\n constructor (public readonly definition: SimpleFieldDefinition,\r\n public readonly position: number,\r\n public readonly required: boolean,\r\n public readonly attribute: boolean,\r\n public readonly override?: string) {\r\n super(override ?? definition.name, position, ContainedFieldType.Simple, required)\r\n }\r\n\r\n public toString (): string {\r\n return `[${this.position}]=S.${this.definition.tag} (${this.name})`\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"contained-simple-field.js","sourceRoot":"","sources":["../../../src/dictionary/contained/contained-simple-field.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAElD,iEAA2D;AAE3D,MAAa,oBAAqB,SAAQ,gCAAc;IACtD,YAA6B,UAAiC,EAC5C,QAAgB,EAChB,QAAiB,EACjB,SAAkB,EAClB,QAAiB;QACjC,KAAK,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,yCAAkB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;QALtD,eAAU,GAAV,UAAU,CAAuB;QAC5C,aAAQ,GAAR,QAAQ,CAAQ;QAChB,aAAQ,GAAR,QAAQ,CAAS;QACjB,cAAS,GAAT,SAAS,CAAS;QAClB,aAAQ,GAAR,QAAQ,CAAS;IAEnC,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,IAAI,CAAC,QAAQ,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,KAAK,IAAI,CAAC,IAAI,GAAG,CAAA;IACrE,CAAC;CACF;AAZD,oDAYC","sourcesContent":["import { ContainedField } from './contained-field'\r\nimport { SimpleFieldDefinition } from '../definition/simple-field-definition'\r\nimport { ContainedFieldType } from './contained-field-type'\r\n\r\nexport class ContainedSimpleField extends ContainedField {\r\n constructor (public readonly definition: SimpleFieldDefinition,\r\n public readonly position: number,\r\n public readonly required: boolean,\r\n public readonly attribute: boolean,\r\n public readonly override?: string) {\r\n super(override ?? definition.name, position, ContainedFieldType.Simple, required)\r\n }\r\n\r\n public toString (): string {\r\n return `[${this.position}]=S.${this.definition.tag} (${this.name})`\r\n }\r\n}\r\n"]}
@@ -2,7 +2,10 @@ export * from './contained-component-field';
2
2
  export * from './contained-field-type';
3
3
  export * from './contained-field';
4
4
  export * from './contained-field-dispatch';
5
- export * from './contained-field-set';
5
+ export * from './fields-dispatch';
6
+ export * from './contained-set';
7
+ export * from './contained-set-builder';
6
8
  export * from './contained-group-field';
7
9
  export * from './contained-simple-field';
8
10
  export * from './fields-dispatch';
11
+ export * from './contained-set-builder';
@@ -18,8 +18,11 @@ __exportStar(require("./contained-component-field"), exports);
18
18
  __exportStar(require("./contained-field-type"), exports);
19
19
  __exportStar(require("./contained-field"), exports);
20
20
  __exportStar(require("./contained-field-dispatch"), exports);
21
- __exportStar(require("./contained-field-set"), exports);
21
+ __exportStar(require("./fields-dispatch"), exports);
22
+ __exportStar(require("./contained-set"), exports);
23
+ __exportStar(require("./contained-set-builder"), exports);
22
24
  __exportStar(require("./contained-group-field"), exports);
23
25
  __exportStar(require("./contained-simple-field"), exports);
24
26
  __exportStar(require("./fields-dispatch"), exports);
27
+ __exportStar(require("./contained-set-builder"), exports);
25
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dictionary/contained/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C;AAC3C,yDAAsC;AACtC,oDAAiC;AACjC,6DAA0C;AAC1C,wDAAqC;AACrC,0DAAuC;AACvC,2DAAwC;AACxC,oDAAiC","sourcesContent":["export * from './contained-component-field'\r\nexport * from './contained-field-type'\r\nexport * from './contained-field'\r\nexport * from './contained-field-dispatch'\r\nexport * from './contained-field-set'\r\nexport * from './contained-group-field'\r\nexport * from './contained-simple-field'\r\nexport * from './fields-dispatch'\r\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dictionary/contained/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C;AAC3C,yDAAsC;AACtC,oDAAiC;AACjC,6DAA0C;AAC1C,oDAAiC;AACjC,kDAA+B;AAC/B,0DAAuC;AACvC,0DAAuC;AACvC,2DAAwC;AACxC,oDAAiC;AACjC,0DAAuC","sourcesContent":["export * from './contained-component-field'\r\nexport * from './contained-field-type'\r\nexport * from './contained-field'\r\nexport * from './contained-field-dispatch'\r\nexport * from './fields-dispatch'\r\nexport * from './contained-set'\r\nexport * from './contained-set-builder'\r\nexport * from './contained-group-field'\r\nexport * from './contained-simple-field'\r\nexport * from './fields-dispatch'\r\nexport * from './contained-set-builder'\r\n"]}
@@ -1,7 +1,6 @@
1
1
  import { SimpleFieldDefinition } from './simple-field-definition';
2
- import { Dictionary } from '../../collections';
3
2
  export declare class CategorySimpleSet {
4
3
  readonly category: string;
5
- readonly simple: Dictionary<SimpleFieldDefinition>;
4
+ readonly simple: Map<string, SimpleFieldDefinition>;
6
5
  constructor(category: string);
7
6
  }
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CategorySimpleSet = void 0;
4
- const collections_1 = require("../../collections");
5
4
  class CategorySimpleSet {
6
5
  constructor(category) {
7
6
  this.category = category;
8
- this.simple = new collections_1.Dictionary();
7
+ this.simple = new Map();
9
8
  }
10
9
  }
11
10
  exports.CategorySimpleSet = CategorySimpleSet;
@@ -1 +1 @@
1
- {"version":3,"file":"category-simple-set.js","sourceRoot":"","sources":["../../../src/dictionary/definition/category-simple-set.ts"],"names":[],"mappings":";;;AACA,mDAA8C;AAE9C,MAAa,iBAAiB;IAE5B,YAA6B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAD7B,WAAM,GAAsC,IAAI,wBAAU,EAAyB,CAAA;IAEnG,CAAC;CACF;AAJD,8CAIC","sourcesContent":["import { SimpleFieldDefinition } from './simple-field-definition'\r\nimport { Dictionary } from '../../collections'\r\n\r\nexport class CategorySimpleSet {\r\n public readonly simple: Dictionary<SimpleFieldDefinition> = new Dictionary<SimpleFieldDefinition>()\r\n constructor (public readonly category: string) {\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"category-simple-set.js","sourceRoot":"","sources":["../../../src/dictionary/definition/category-simple-set.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAE5B,YAA6B,QAAgB;QAAhB,aAAQ,GAAR,QAAQ,CAAQ;QAD7B,WAAM,GAAuC,IAAI,GAAG,EAAiC,CAAA;IAErG,CAAC;CACF;AAJD,8CAIC","sourcesContent":["import { SimpleFieldDefinition } from './simple-field-definition'\r\n\r\nexport class CategorySimpleSet {\r\n public readonly simple: Map<string, SimpleFieldDefinition> = new Map<string, SimpleFieldDefinition>()\r\n constructor (public readonly category: string) {\r\n }\r\n}\r\n"]}
@@ -1,4 +1,4 @@
1
- import { ContainedFieldSet } from '../contained';
1
+ import { ContainedFieldSet } from '../contained/contained-field-set';
2
2
  export declare class ComponentFieldDefinition extends ContainedFieldSet {
3
3
  readonly name: string;
4
4
  readonly abbreviation: string;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ComponentFieldDefinition = void 0;
4
- const contained_1 = require("../contained");
4
+ const contained_field_set_1 = require("../contained/contained-field-set");
5
5
  const contained_set_type_1 = require("../contained-set-type");
6
- class ComponentFieldDefinition extends contained_1.ContainedFieldSet {
6
+ class ComponentFieldDefinition extends contained_field_set_1.ContainedFieldSet {
7
7
  constructor(name, abbreviation, category, description) {
8
8
  super(contained_set_type_1.ContainedSetType.Component, name, abbreviation, category, description);
9
9
  this.name = name;
@@ -1 +1 @@
1
- {"version":3,"file":"component-field-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/component-field-definition.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,8DAAwD;AAExD,MAAa,wBAAyB,SAAQ,6BAAiB;IAC7D,YAA6B,IAAY,EACvB,YAAoB,EACpB,QAAuB,EACvB,WAA0B;QAC1C,KAAK,CAAC,qCAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;QAJjD,SAAI,GAAJ,IAAI,CAAQ;QACvB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,aAAQ,GAAR,QAAQ,CAAe;QACvB,gBAAW,GAAX,WAAW,CAAe;IAE5C,CAAC;IAEM,SAAS;QACd,OAAO,GAAG,CAAA;IACZ,CAAC;CACF;AAXD,4DAWC","sourcesContent":["import { ContainedFieldSet } from '../contained'\r\nimport { ContainedSetType } from '../contained-set-type'\r\n\r\nexport class ComponentFieldDefinition extends ContainedFieldSet {\r\n constructor (public readonly name: string,\r\n public readonly abbreviation: string,\r\n public readonly category: string | null,\r\n public readonly description: string | null) {\r\n super(ContainedSetType.Component, name, abbreviation, category, description)\r\n }\r\n\r\n public getPrefix (): string {\r\n return 'C'\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"component-field-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/component-field-definition.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8DAAwD;AAExD,MAAa,wBAAyB,SAAQ,uCAAiB;IAC7D,YAA6B,IAAY,EACvB,YAAoB,EACpB,QAAuB,EACvB,WAA0B;QAC1C,KAAK,CAAC,qCAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;QAJjD,SAAI,GAAJ,IAAI,CAAQ;QACvB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,aAAQ,GAAR,QAAQ,CAAe;QACvB,gBAAW,GAAX,WAAW,CAAe;IAE5C,CAAC;IAEM,SAAS;QACd,OAAO,GAAG,CAAA;IACZ,CAAC;CACF;AAXD,4DAWC","sourcesContent":["import { ContainedFieldSet } from '../contained/contained-field-set'\r\nimport { ContainedSetType } from '../contained-set-type'\r\n\r\nexport class ComponentFieldDefinition extends ContainedFieldSet {\r\n constructor (public readonly name: string,\r\n public readonly abbreviation: string,\r\n public readonly category: string | null,\r\n public readonly description: string | null) {\r\n super(ContainedSetType.Component, name, abbreviation, category, description)\r\n }\r\n\r\n public getPrefix (): string {\r\n return 'C'\r\n }\r\n}\r\n"]}
@@ -1,30 +1,29 @@
1
1
  import { INumericKeyed } from '../../collections/collection';
2
- import { Dictionary } from '../../collections';
3
2
  import { ComponentFieldDefinition } from './component-field-definition';
4
3
  import { MessageDefinition } from './message-definition';
5
4
  import { SimpleFieldDefinition } from './simple-field-definition';
6
5
  import { FixVersion } from '../fix-versions';
7
6
  import { CategorySimpleSet } from './category-simple-set';
8
- import { ContainedFieldSet } from '../contained';
9
7
  import { FixDefinitionSource } from '../fix-definition-source';
8
+ import { IContainedSet } from '../contained/contained-set';
10
9
  export declare class FixDefinitions {
11
10
  readonly source: FixDefinitionSource;
12
11
  readonly version: FixVersion;
13
- readonly simple: Dictionary<SimpleFieldDefinition>;
14
- readonly component: Dictionary<ComponentFieldDefinition>;
15
- readonly message: Dictionary<MessageDefinition>;
12
+ readonly simple: Map<string, SimpleFieldDefinition>;
13
+ readonly component: Map<string, ComponentFieldDefinition>;
14
+ readonly message: Map<string, MessageDefinition>;
16
15
  readonly tagToSimple: INumericKeyed<SimpleFieldDefinition>;
17
- readonly categorySimple: Dictionary<CategorySimpleSet>;
16
+ readonly categorySimple: Map<string, CategorySimpleSet>;
18
17
  constructor(source: FixDefinitionSource, version: FixVersion);
19
18
  getMajor(): number;
20
19
  getMinor(): number;
21
20
  getServicePack(): number;
22
21
  toString(): string;
23
- containedSet(type: string): ContainedFieldSet | null;
24
- getSet(path: string): ContainedFieldSet | null;
22
+ containedSet(type: string): IContainedSet | undefined;
23
+ getSet(path: string): IContainedSet | undefined;
25
24
  addMessage(message: MessageDefinition): void;
26
25
  addComponentFieldDef(field: ComponentFieldDefinition): void;
27
- getSimple(name: string, cat?: string | null): SimpleFieldDefinition | null;
26
+ getSimple(name: string, cat?: string | null): SimpleFieldDefinition | undefined;
28
27
  addSimpleAlias(from: string, to: string): void;
29
28
  addSimpleFieldDef(field: SimpleFieldDefinition, typeName?: string | null): void;
30
29
  private assignCategory;
@@ -1,18 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FixDefinitions = void 0;
4
- const collections_1 = require("../../collections");
5
4
  const category_simple_set_1 = require("./category-simple-set");
6
5
  const fix_version_parser_1 = require("./fix-version-parser");
7
6
  class FixDefinitions {
8
7
  constructor(source, version) {
9
8
  this.source = source;
10
9
  this.version = version;
11
- this.simple = new collections_1.Dictionary();
12
- this.component = new collections_1.Dictionary();
13
- this.message = new collections_1.Dictionary();
10
+ this.simple = new Map();
11
+ this.component = new Map();
12
+ this.message = new Map();
14
13
  this.tagToSimple = {};
15
- this.categorySimple = new collections_1.Dictionary();
14
+ this.categorySimple = new Map();
16
15
  }
17
16
  getMajor() {
18
17
  return fix_version_parser_1.FixVersionParser.getMajor(this.version);
@@ -25,7 +24,10 @@ class FixDefinitions {
25
24
  }
26
25
  toString() {
27
26
  const msgs = this.message.values();
28
- const strs = msgs.map(m => m.toString());
27
+ const strs = [];
28
+ for (const message of msgs) {
29
+ strs.push(message.toString());
30
+ }
29
31
  return JSON.stringify(strs, null, 4);
30
32
  }
31
33
  containedSet(type) {
@@ -42,25 +44,25 @@ class FixDefinitions {
42
44
  else {
43
45
  return this.message.get(name);
44
46
  }
45
- return (_b = (_a = this.message.get(name)) === null || _a === void 0 ? void 0 : _a.getSet(path.substring(idx + 1))) !== null && _b !== void 0 ? _b : null;
47
+ return (_b = (_a = this.message.get(name)) === null || _a === void 0 ? void 0 : _a.getSet(path.substring(idx + 1))) !== null && _b !== void 0 ? _b : undefined;
46
48
  }
47
49
  addMessage(message) {
48
50
  const messages = this.message;
49
- messages.addUpdate(message.name, message);
51
+ messages.set(message.name, message);
50
52
  if (message.msgType && message.msgType !== message.name) {
51
- messages.addUpdate(message.msgType, message);
53
+ messages.set(message.msgType, message);
52
54
  }
53
55
  if (message.abbreviation) {
54
56
  if (message.abbreviation !== message.name) {
55
- messages.addUpdate(message.abbreviation, message);
57
+ messages.set(message.abbreviation, message);
56
58
  }
57
59
  }
58
60
  }
59
61
  addComponentFieldDef(field) {
60
- this.component.addUpdate(field.name, field);
62
+ this.component.set(field.name, field);
61
63
  }
62
64
  getSimple(name, cat) {
63
- let sf = null;
65
+ let sf;
64
66
  if (cat) {
65
67
  const category = this.categorySimple.get(cat);
66
68
  if (category) {
@@ -75,22 +77,22 @@ class FixDefinitions {
75
77
  addSimpleAlias(from, to) {
76
78
  const simple = this.simple.get(from);
77
79
  if (simple) {
78
- this.simple.addUpdate(to, simple);
80
+ this.simple.set(to, simple);
79
81
  }
80
82
  }
81
83
  addSimpleFieldDef(field, typeName = null) {
82
84
  this.assignCategory(field);
83
85
  const simple = this.simple;
84
- simple.addUpdate(field.num, field);
85
- simple.addUpdate(field.name, field);
86
+ simple.set(field.num, field);
87
+ simple.set(field.name, field);
86
88
  this.tagToSimple[field.tag] = field;
87
89
  if (field.abbreviation && field.abbreviation !== field.name) {
88
- if (!simple.containsKey(field.abbreviation)) {
89
- simple.addUpdate(field.abbreviation, field);
90
+ if (!simple.has(field.abbreviation)) {
91
+ simple.set(field.abbreviation, field);
90
92
  }
91
93
  }
92
94
  if (typeName && typeName !== field.name && field.name && field.type) {
93
- simple.addUpdate(typeName, field);
95
+ simple.set(typeName, field);
94
96
  }
95
97
  }
96
98
  assignCategory(field) {
@@ -98,9 +100,9 @@ class FixDefinitions {
98
100
  let category = this.categorySimple.get(field.baseCategory);
99
101
  if (!category) {
100
102
  category = new category_simple_set_1.CategorySimpleSet(field.baseCategory);
101
- this.categorySimple.add(field.baseCategory, category);
103
+ this.categorySimple.set(field.baseCategory, category);
102
104
  }
103
- category.simple.addUpdate(field.baseCategoryAbbreviation, field);
105
+ category.simple.set(field.baseCategoryAbbreviation, field);
104
106
  }
105
107
  }
106
108
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fix-definitions.js","sourceRoot":"","sources":["../../../src/dictionary/definition/fix-definitions.ts"],"names":[],"mappings":";;;AACA,mDAA8C;AAK9C,+DAAyD;AAGzD,6DAAuD;AAEvD,MAAa,cAAc;IA0BzB,YAA6B,MAA2B,EAAkB,OAAmB;QAAhE,WAAM,GAAN,MAAM,CAAqB;QAAkB,YAAO,GAAP,OAAO,CAAY;QArB7E,WAAM,GAAsC,IAAI,wBAAU,EAAyB,CAAA;QAKnF,cAAS,GAAyC,IAAI,wBAAU,EAA4B,CAAA;QAK5F,YAAO,GAAkC,IAAI,wBAAU,EAAqB,CAAA;QAK5E,gBAAW,GAAyC,EAAE,CAAA;QAItD,mBAAc,GAAkC,IAAI,wBAAU,EAAqB,CAAA;IAGnG,CAAC;IAEM,QAAQ;QACb,OAAO,qCAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChD,CAAC;IAEM,QAAQ;QACb,OAAO,qCAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAChD,CAAC;IAEM,cAAc;QACnB,OAAO,qC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AE,KAAK,CAAC,CAAA;QAClE,CAAC;IACH,CAAC;CACF;AA9JD,wCA8JC","sourcesContent":["import { INumericKeyed } from '../../collections/collection'\r\nimport { Dictionary } from '../../collections'\r\nimport { ComponentFieldDefinition } from './component-field-definition'\r\nimport { MessageDefinition } from './message-definition'\r\nimport { SimpleFieldDefinition } from './simple-field-definition'\r\nimport { FixVersion } from '../fix-versions'\r\nimport { CategorySimpleSet } from './category-simple-set'\r\nimport { ContainedFieldSet } from '../contained'\r\nimport { FixDefinitionSource } from '../fix-definition-source'\r\nimport { FixVersionParser } from './fix-version-parser'\r\n\r\nexport class FixDefinitions {\r\n /**\r\n * all simple fields defined from source definition indexed via name\r\n * e.g. 'BeginString'\r\n */\r\n public readonly simple: Dictionary<SimpleFieldDefinition> = new Dictionary<SimpleFieldDefinition>()\r\n /**\r\n * all components defined from source definition indexed via name\r\n * e.g. 'Instrument'\r\n */\r\n public readonly component: Dictionary<ComponentFieldDefinition> = new Dictionary<ComponentFieldDefinition>()\r\n /**\r\n * all messages defined from source definition indexed via name\r\n * e.g. 'Logon'\r\n */\r\n public readonly message: Dictionary<MessageDefinition> = new Dictionary<MessageDefinition>()\r\n /**\r\n * all messages defined from source definition indexed via tag id\r\n * e.g. 8\r\n */\r\n public readonly tagToSimple: INumericKeyed<SimpleFieldDefinition> = {}\r\n /**\r\n * all fields within a category indexed via name used for FIXML\r\n */\r\n public readonly categorySimple: Dictionary<CategorySimpleSet> = new Dictionary<CategorySimpleSet>()\r\n\r\n constructor (public readonly source: FixDefinitionSource, public readonly version: FixVersion) {\r\n }\r\n\r\n public getMajor (): number {\r\n return FixVersionParser.getMajor(this.version)\r\n }\r\n\r\n public getMinor (): number {\r\n return FixVersionParser.getMinor(this.version)\r\n }\r\n\r\n public getServicePack (): number {\r\n return FixVersionParser.getServicePack(this.version)\r\n }\r\n\r\n public toString (): string {\r\n const msgs = this.message.values()\r\n const strs: String[] = msgs.map(m => m.toString())\r\n return JSON.stringify(strs, null, 4)\r\n }\r\n\r\n public containedSet (type: string): ContainedFieldSet | null {\r\n return this.message.get(type) ?? this.component.get(type)\r\n }\r\n\r\n /**\r\n * utility method to return a set representing a message, group or field with\r\n * a dot denoted path starting with message name e.g.\r\n * 'SecurityList.SecListGrp.NoRelatedSym.SecurityTradingRules'\r\n * @param path dot denoted path too field set nested from root\r\n */\r\n public getSet (path: string): ContainedFieldSet | null {\r\n const idx = path.indexOf('.')\r\n let name: string = path\r\n if (idx > 0) {\r\n name = path.substring(0, idx)\r\n } else {\r\n return this.message.get(name)\r\n }\r\n return this.message.get(name)?.getSet(path.substring(idx + 1)) ?? null\r\n }\r\n\r\n /**\r\n * add a new defined message into definitions these are high level definitions\r\n * built from simple, component and group fields\r\n * @param message to add e.g. Logon definition\r\n */\r\n public addMessage (message: MessageDefinition): void {\r\n const messages = this.message\r\n messages.addUpdate(message.name, message)\r\n if (message.msgType && message.msgType !== message.name) {\r\n messages.addUpdate(message.msgType, message)\r\n }\r\n if (message.abbreviation) {\r\n if (message.abbreviation !== message.name) {\r\n messages.addUpdate(message.abbreviation, message)\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * add a new defined component from source definition used by parsers\r\n * @param field\r\n */\r\n public addComponentFieldDef (field: ComponentFieldDefinition): void {\r\n this.component.addUpdate(field.name, field)\r\n }\r\n\r\n /**\r\n * return a simple field definition either from global set or from\r\n * within a sub category on case of FIXML\r\n * @param name of the field to fetch\r\n * @param cat optional category from which field belongs\r\n */\r\n public getSimple (name: string, cat?: string | null): SimpleFieldDefinition | null {\r\n let sf: SimpleFieldDefinition | null = null\r\n if (cat) {\r\n const category: CategorySimpleSet | null = this.categorySimple.get(cat)\r\n if (category) {\r\n sf = category.simple.get(name)\r\n }\r\n }\r\n if (!sf) {\r\n sf = this.simple.get(name)\r\n }\r\n return sf\r\n }\r\n\r\n /**\r\n * add an alias for a simple field used by FIXML\r\n * @param from the original name\r\n * @param to the alias being used\r\n */\r\n public addSimpleAlias (from: string, to: string): void {\r\n const simple = this.simple.get(from)\r\n if (simple) {\r\n this.simple.addUpdate(to, simple)\r\n }\r\n }\r\n\r\n /**\r\n * add a simple field into the definition utility method used by FIX parsers\r\n * @param field the new field to add\r\n * @param typeName optional typename\r\n */\r\n\r\n public addSimpleFieldDef (field: SimpleFieldDefinition, typeName: string | null = null): void {\r\n this.assignCategory(field)\r\n const simple = this.simple\r\n simple.addUpdate(field.num, field)\r\n simple.addUpdate(field.name, field)\r\n this.tagToSimple[field.tag] = field\r\n if (field.abbreviation && field.abbreviation !== field.name) {\r\n if (!simple.containsKey(field.abbreviation)) {\r\n simple.addUpdate(field.abbreviation, field)\r\n }\r\n }\r\n if (typeName && typeName !== field.name && field.name && field.type) {\r\n simple.addUpdate(typeName, field)\r\n }\r\n }\r\n\r\n private assignCategory (field: SimpleFieldDefinition): void {\r\n if (field.baseCategory && field.baseCategoryAbbreviation) {\r\n let category: CategorySimpleSet | null = this.categorySimple.get(field.baseCategory)\r\n if (!category) {\r\n category = new CategorySimpleSet(field.baseCategory)\r\n this.categorySimple.add(field.baseCategory, category)\r\n }\r\n category.simple.addUpdate(field.baseCategoryAbbreviation, field)\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"fix-definitions.js","sourceRoot":"","sources":["../../../src/dictionary/definition/fix-definitions.ts"],"names":[],"mappings":";;;AAKA,+DAAyD;AAEzD,6DAAuD;AAGvD,MAAa,cAAc;IA0BzB,YAA6B,MAA2B,EAAkB,OAAmB;QAAhE,WAAM,GAAN,MAAM,CAAqB;QAAkB,YAAO,GAAP,OAAO,CAAY;QArB7E,WAAM,GAAuC,IAAI,GAAG,EAAiC,CAAA;QAKrF,cAAS,GAA0C,IAAI,GAAG,EAAoC,CAAA;QAK9F,YAAO,GAAmC,IAAI,GAAG,EAA6B,CAAA;QAK9E,gBAAW,GAAyC,EAAE,CAAA;QAItD,mBAAc,GAAmC,IAAI,GAAG,EAA6B,CAAA;IAGrG,CAAC;IAEM,QAAQ;QACb,OAAO,qCAAgB,CAA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,GAAG,IAAI,uCAAiB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;gBACpD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;YACvD,CAAC;YACD,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAA;QAC5D,CAAC;IACH,CAAC;CACF;AAjKD,wCAiKC","sourcesContent":["import { INumericKeyed } from '../../collections/collection'\r\nimport { ComponentFieldDefinition } from './component-field-definition'\r\nimport { MessageDefinition } from './message-definition'\r\nimport { SimpleFieldDefinition } from './simple-field-definition'\r\nimport { FixVersion } from '../fix-versions'\r\nimport { CategorySimpleSet } from './category-simple-set'\r\nimport { FixDefinitionSource } from '../fix-definition-source'\r\nimport { FixVersionParser } from './fix-version-parser'\r\nimport { IContainedSet } from '../contained/contained-set'\r\n\r\nexport class FixDefinitions {\r\n /**\r\n * all simple fields defined from source definition indexed via name\r\n * e.g. 'BeginString'\r\n */\r\n public readonly simple: Map<string, SimpleFieldDefinition> = new Map<string, SimpleFieldDefinition>()\r\n /**\r\n * all components defined from source definition indexed via name\r\n * e.g. 'Instrument'\r\n */\r\n public readonly component: Map<string, ComponentFieldDefinition> = new Map<string, ComponentFieldDefinition>()\r\n /**\r\n * all messages defined from source definition indexed via name\r\n * e.g. 'Logon'\r\n */\r\n public readonly message: Map<string, MessageDefinition> = new Map<string, MessageDefinition>()\r\n /**\r\n * all messages defined from source definition indexed via tag id\r\n * e.g. 8\r\n */\r\n public readonly tagToSimple: INumericKeyed<SimpleFieldDefinition> = {}\r\n /**\r\n * all fields within a category indexed via name used for FIXML\r\n */\r\n public readonly categorySimple: Map<string, CategorySimpleSet> = new Map<string, CategorySimpleSet>()\r\n\r\n constructor (public readonly source: FixDefinitionSource, public readonly version: FixVersion) {\r\n }\r\n\r\n public getMajor (): number {\r\n return FixVersionParser.getMajor(this.version)\r\n }\r\n\r\n public getMinor (): number {\r\n return FixVersionParser.getMinor(this.version)\r\n }\r\n\r\n public getServicePack (): number {\r\n return FixVersionParser.getServicePack(this.version)\r\n }\r\n\r\n public toString (): string {\r\n const msgs = this.message.values()\r\n const strs: String[] = []\r\n for (const message of msgs) {\r\n strs.push(message.toString())\r\n }\r\n return JSON.stringify(strs, null, 4)\r\n }\r\n\r\n public containedSet (type: string): IContainedSet | undefined {\r\n return this.message.get(type) ?? this.component.get(type)\r\n }\r\n\r\n /**\r\n * utility method to return a set representing a message, group or field with\r\n * a dot denoted path starting with message name e.g.\r\n * 'SecurityList.SecListGrp.NoRelatedSym.SecurityTradingRules'\r\n * @param path dot denoted path too field set nested from root\r\n */\r\n public getSet (path: string): IContainedSet | undefined {\r\n const idx = path.indexOf('.')\r\n let name: string = path\r\n if (idx > 0) {\r\n name = path.substring(0, idx)\r\n } else {\r\n return this.message.get(name)\r\n }\r\n return this.message.get(name)?.getSet(path.substring(idx + 1)) ?? undefined\r\n }\r\n\r\n /**\r\n * add a new defined message into definitions these are high level definitions\r\n * built from simple, component and group fields\r\n * @param message to add e.g. Logon definition\r\n */\r\n public addMessage (message: MessageDefinition): void {\r\n const messages = this.message\r\n messages.set(message.name, message)\r\n if (message.msgType && message.msgType !== message.name) {\r\n messages.set(message.msgType, message)\r\n }\r\n if (message.abbreviation) {\r\n if (message.abbreviation !== message.name) {\r\n messages.set(message.abbreviation, message)\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * add a new defined component from source definition used by parsers\r\n * @param field\r\n */\r\n public addComponentFieldDef (field: ComponentFieldDefinition): void {\r\n this.component.set(field.name, field)\r\n }\r\n\r\n /**\r\n * return a simple field definition either from global set or from\r\n * within a sub category on case of FIXML\r\n * @param name of the field to fetch\r\n * @param cat optional category from which field belongs\r\n */\r\n public getSimple (name: string, cat?: string | null): SimpleFieldDefinition | undefined {\r\n let sf: SimpleFieldDefinition | undefined\r\n if (cat) {\r\n const category = this.categorySimple.get(cat)\r\n if (category) {\r\n sf = category.simple.get(name)\r\n }\r\n }\r\n if (!sf) {\r\n sf = this.simple.get(name)\r\n }\r\n return sf\r\n }\r\n\r\n /**\r\n * add an alias for a simple field used by FIXML\r\n * @param from the original name\r\n * @param to the alias being used\r\n */\r\n public addSimpleAlias (from: string, to: string): void {\r\n const simple = this.simple.get(from)\r\n if (simple) {\r\n this.simple.set(to, simple)\r\n }\r\n }\r\n\r\n /**\r\n * add a simple field into the definition utility method used by FIX parsers\r\n * @param field the new field to add\r\n * @param typeName optional typename\r\n */\r\n\r\n public addSimpleFieldDef (field: SimpleFieldDefinition, typeName: string | null = null): void {\r\n this.assignCategory(field)\r\n const simple = this.simple\r\n simple.set(field.num, field)\r\n simple.set(field.name, field)\r\n this.tagToSimple[field.tag] = field\r\n if (field.abbreviation && field.abbreviation !== field.name) {\r\n if (!simple.has(field.abbreviation)) {\r\n simple.set(field.abbreviation, field)\r\n }\r\n }\r\n if (typeName && typeName !== field.name && field.name && field.type) {\r\n simple.set(typeName, field)\r\n }\r\n }\r\n\r\n private assignCategory (field: SimpleFieldDefinition): void {\r\n if (field.baseCategory && field.baseCategoryAbbreviation) {\r\n let category = this.categorySimple.get(field.baseCategory)\r\n if (!category) {\r\n category = new CategorySimpleSet(field.baseCategory)\r\n this.categorySimple.set(field.baseCategory, category)\r\n }\r\n category.simple.set(field.baseCategoryAbbreviation, field)\r\n }\r\n }\r\n}\r\n"]}
@@ -1,4 +1,4 @@
1
- import { ContainedFieldSet } from '../contained';
1
+ import { ContainedFieldSet } from '../contained/contained-field-set';
2
2
  import { SimpleFieldDefinition } from './simple-field-definition';
3
3
  export declare class GroupFieldDefinition extends ContainedFieldSet {
4
4
  readonly name: string;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GroupFieldDefinition = void 0;
4
- const contained_1 = require("../contained");
4
+ const contained_field_set_1 = require("../contained/contained-field-set");
5
5
  const contained_set_type_1 = require("../contained-set-type");
6
- class GroupFieldDefinition extends contained_1.ContainedFieldSet {
6
+ class GroupFieldDefinition extends contained_field_set_1.ContainedFieldSet {
7
7
  constructor(name, abbreviation, category, noOfField, description) {
8
8
  super(contained_set_type_1.ContainedSetType.Group, name, abbreviation, category, description);
9
9
  this.name = name;
@@ -1 +1 @@
1
- {"version":3,"file":"group-field-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/group-field-definition.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAEhD,8DAAwD;AAExD,MAAa,oBAAqB,SAAQ,6BAAiB;IACzD,YAA6B,IAAY,EACvB,YAAoB,EACpB,QAAuB,EACvB,SAAuC,EACvC,WAA0B;QAC1C,KAAK,CAAC,qCAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;QAL7C,SAAI,GAAJ,IAAI,CAAQ;QACvB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,aAAQ,GAAR,QAAQ,CAAe;QACvB,cAAS,GAAT,SAAS,CAA8B;QACvC,gBAAW,GAAX,WAAW,CAAe;QAE1C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;QAC9C,CAAC;IACH,CAAC;IAEM,SAAS;QACd,OAAO,GAAG,CAAA;IACZ,CAAC;CACF;AAfD,oDAeC","sourcesContent":["import { ContainedFieldSet } from '../contained'\r\nimport { SimpleFieldDefinition } from './simple-field-definition'\r\nimport { ContainedSetType } from '../contained-set-type'\r\n\r\nexport class GroupFieldDefinition extends ContainedFieldSet {\r\n constructor (public readonly name: string,\r\n public readonly abbreviation: string,\r\n public readonly category: string | null,\r\n public readonly noOfField: SimpleFieldDefinition | null,\r\n public readonly description: string | null) {\r\n super(ContainedSetType.Group, name, abbreviation, category, description)\r\n if (this.noOfField) {\r\n this.containedTag[this.noOfField.tag] = true\r\n }\r\n }\r\n\r\n public getPrefix (): string {\r\n return 'G'\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"group-field-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/group-field-definition.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AAEpE,8DAAwD;AAExD,MAAa,oBAAqB,SAAQ,uCAAiB;IACzD,YAA6B,IAAY,EACvB,YAAoB,EACpB,QAAuB,EACvB,SAAuC,EACvC,WAA0B;QAC1C,KAAK,CAAC,qCAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAA;QAL7C,SAAI,GAAJ,IAAI,CAAQ;QACvB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,aAAQ,GAAR,QAAQ,CAAe;QACvB,cAAS,GAAT,SAAS,CAA8B;QACvC,gBAAW,GAAX,WAAW,CAAe;QAE1C,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;QAC9C,CAAC;IACH,CAAC;IAEM,SAAS;QACd,OAAO,GAAG,CAAA;IACZ,CAAC;CACF;AAfD,oDAeC","sourcesContent":["import { ContainedFieldSet } from '../contained/contained-field-set'\r\nimport { SimpleFieldDefinition } from './simple-field-definition'\r\nimport { ContainedSetType } from '../contained-set-type'\r\n\r\nexport class GroupFieldDefinition extends ContainedFieldSet {\r\n constructor (public readonly name: string,\r\n public readonly abbreviation: string,\r\n public readonly category: string | null,\r\n public readonly noOfField: SimpleFieldDefinition | null,\r\n public readonly description: string | null) {\r\n super(ContainedSetType.Group, name, abbreviation, category, description)\r\n if (this.noOfField) {\r\n this.containedTag[this.noOfField.tag] = true\r\n }\r\n }\r\n\r\n public getPrefix (): string {\r\n return 'G'\r\n }\r\n}\r\n"]}
@@ -1,4 +1,4 @@
1
- import { ContainedFieldSet } from '../contained';
1
+ import { ContainedFieldSet } from '../contained/contained-field-set';
2
2
  export declare class MessageDefinition extends ContainedFieldSet {
3
3
  readonly name: string;
4
4
  readonly abbreviation: string;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MessageDefinition = void 0;
4
- const contained_1 = require("../contained");
4
+ const contained_field_set_1 = require("../contained/contained-field-set");
5
5
  const contained_set_type_1 = require("../contained-set-type");
6
- class MessageDefinition extends contained_1.ContainedFieldSet {
6
+ class MessageDefinition extends contained_field_set_1.ContainedFieldSet {
7
7
  constructor(name, abbreviation, msgType, category, description) {
8
8
  super(contained_set_type_1.ContainedSetType.Msg, name, category, abbreviation, description);
9
9
  this.name = name;
@@ -1 +1 @@
1
- {"version":3,"file":"message-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/message-definition.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAChD,8DAAwD;AAExD,MAAa,iBAAkB,SAAQ,6BAAiB;IACtD,YAA6B,IAAY,EACvB,YAAoB,EACpB,OAAe,EACf,QAAgB,EAChB,WAA0B;QAC1C,KAAK,CAAC,qCAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,CAAC,CAAA;QAL3C,SAAI,GAAJ,IAAI,CAAQ;QACvB,iBAAY,GAAZ,YAAY,CAAQ;QACpB,YAAO,GAAP,OAAO,CAAQ;QACf,aAAQ,GAAR,QAAQ,CAAQ;QAChB,gBAAW,GAAX,WAAW,CAAe;IAE5C,CAAC;IAEM,SAAS;QACd,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAA;IAC5B,CAAC;CACF;AAZD,8CAYC","sourcesContent":["import { ContainedFieldSet } from '../contained'\r\nimport { ContainedSetType } from '../contained-set-type'\r\n\r\nexport class MessageDefinition extends ContainedFieldSet {\r\n constructor (public readonly name: string,\r\n public readonly abbreviation: string,\r\n public readonly msgType: string,\r\n public readonly category: string,\r\n public readonly description: string | null) {\r\n super(ContainedSetType.Msg, name, category, abbreviation, description)\r\n }\r\n\r\n public getPrefix (): string {\r\n return `M.${this.msgType}`\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"message-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/message-definition.ts"],"names":[],"mappings":";;;AAAA,0EAAoE;AACpE,8DAAwD;AAExD,MAAa,iBAAkB,SAAQ,uCAAiB;IACtD,YAAsB,IAAY,EACvB,YAAoB,EACb,OAAe,EACtB,QAAgB,EAChB,WAA0B;QACnC,KAAK,CAAC,qCAAgB,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,CAAC,CAAA;QALlD,SAAI,GAAJ,IAAI,CAAQ;QACvB,iBAAY,GAAZ,YAAY,CAAQ;QACb,YAAO,GAAP,OAAO,CAAQ;QACtB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,gBAAW,GAAX,WAAW,CAAe;IAErC,CAAC;IAED,SAAS;QACP,OAAO,KAAK,IAAI,CAAC,OAAO,EAAE,CAAA;IAC5B,CAAC;CACF;AAZD,8CAYC","sourcesContent":["import { ContainedFieldSet } from '../contained/contained-field-set'\r\nimport { ContainedSetType } from '../contained-set-type'\r\n\r\nexport class MessageDefinition extends ContainedFieldSet {\r\n constructor (readonly name: string,\r\n readonly abbreviation: string,\r\n public readonly msgType: string,\r\n readonly category: string,\r\n readonly description: string | null) {\r\n super(ContainedSetType.Msg, name, category, abbreviation, description)\r\n }\r\n\r\n getPrefix (): string {\r\n return `M.${this.msgType}`\r\n }\r\n}\r\n"]}
@@ -1,4 +1,3 @@
1
- import { Dictionary } from '../../collections';
2
1
  import { FieldEnum } from '../field-enum';
3
2
  import { TagType } from '../../buffer/tag/tag-type';
4
3
  export declare class SimpleFieldDefinition {
@@ -11,8 +10,8 @@ export declare class SimpleFieldDefinition {
11
10
  readonly description: string | null;
12
11
  readonly tag: number;
13
12
  readonly tagType: TagType;
14
- enums: Dictionary<FieldEnum>;
15
- enumVals: Dictionary<boolean>;
13
+ enums: Map<string, FieldEnum>;
14
+ enumVals: Map<string, boolean>;
16
15
  constructor(num: string, name: string, abbreviation: string, baseCategory: string | null, baseCategoryAbbreviation: string | null, type: string, description: string | null);
17
16
  isEnum(): boolean;
18
17
  containsEnum(key: string): boolean;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SimpleFieldDefinition = void 0;
4
- const collections_1 = require("../../collections");
5
4
  const field_enum_1 = require("../field-enum");
6
5
  const tags_1 = require("../../buffer/tag/tags");
7
6
  const ascii_chars_1 = require("../../buffer/ascii/ascii-chars");
@@ -26,7 +25,7 @@ class SimpleFieldDefinition {
26
25
  if (!enums) {
27
26
  return false;
28
27
  }
29
- return enums.get(key) != null;
28
+ return enums.has(key);
30
29
  }
31
30
  resolveEnum(key) {
32
31
  const enums = this.enums;
@@ -48,7 +47,7 @@ class SimpleFieldDefinition {
48
47
  if (atDigit) {
49
48
  converted = `E${converted}`;
50
49
  }
51
- if (this.enumVals.containsKey(converted)) {
50
+ if (this.enumVals.has(converted)) {
52
51
  converted = `${converted}2`;
53
52
  }
54
53
  return converted;
@@ -57,14 +56,14 @@ class SimpleFieldDefinition {
57
56
  let enums = this.enums;
58
57
  let enumVals = this.enumVals;
59
58
  if (enums == null) {
60
- this.enums = enums = new collections_1.Dictionary();
61
- this.enumVals = enumVals = new collections_1.Dictionary();
59
+ this.enums = enums = new Map();
60
+ this.enumVals = enumVals = new Map();
62
61
  }
63
62
  if (!description)
64
63
  description = val;
65
64
  val = this.patchEnumValue(val);
66
- enums.add(key, new field_enum_1.FieldEnum(key, val, description !== null && description !== void 0 ? description : ''));
67
- enumVals.add(val, true);
65
+ enums.set(key, new field_enum_1.FieldEnum(key, val, description !== null && description !== void 0 ? description : ''));
66
+ enumVals.set(val, true);
68
67
  }
69
68
  toString() {
70
69
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"simple-field-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/sim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AAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;IACzB,CAAC;IAEM,QAAQ;;QACb,IAAI,YAAY,GAAW,EAAE,CAAA;QAC7B,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;YACzD,YAAY,GAAG,IAAI,IAAI,CAAC,YAAY,GAAG,CAAA;QACzC,CAAC;QACD,IAAI,wBAAwB,GAAW,EAAE,CAAA;QACzC,IAAI,IAAI,CAAC,wBAAwB,IAAI,IAAI,CAAC,wBAAwB,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACjF,wBAAwB,GAAG,IAAI,CAAC,wBAAwB,CAAA;QAC1D,CAAC;QACD,IAAI,wBAAwB,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YAC7D,wBAAwB,GAAG,GAAG,IAAI,CAAC,YAAY,IAAI,wBAAwB,EAAE,CAAA;QAC/E,CAAC;QACD,OAAO,GAAG,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,IAAI,YAAY,IAAI,wBAAwB,IAAI,IAAI,CAAC,IAAI,IAAI,MAAA,IAAI,CAAC,WAAW,mCAAI,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAA;IACvL,CAAC;CACF;AAnFD,sDAmFC","sourcesContent":["import { Dictionary } from '../../collections'\r\nimport { FieldEnum } from '../field-enum'\r\nimport { Tags } from '../../buffer/tag/tags'\r\nimport { AsciiChars } from '../../buffer/ascii/ascii-chars'\r\nimport * as _ from 'lodash'\r\nimport { TagType } from '../../buffer/tag/tag-type'\r\n\r\nexport class SimpleFieldDefinition {\r\n public readonly tag: number\r\n public readonly tagType: TagType\r\n public enums: Dictionary<FieldEnum>\r\n public enumVals: Dictionary<boolean>\r\n\r\n constructor (public readonly num: string,\r\n public readonly name: string,\r\n public readonly abbreviation: string,\r\n public readonly baseCategory: string | null,\r\n public readonly baseCategoryAbbreviation: string | null,\r\n public readonly type: string,\r\n public readonly description: string | null) {\r\n this.tag = parseInt(num, 10)\r\n this.tagType = Tags.toType(type)\r\n }\r\n\r\n public isEnum (): boolean {\r\n return this.enums != null\r\n }\r\n\r\n public containsEnum (key: string): boolean {\r\n const enums = this.enums\r\n if (!enums) {\r\n return false\r\n }\r\n return enums.get(key) != null\r\n }\r\n\r\n public resolveEnum (key: string): string {\r\n const enums = this.enums\r\n if (!enums) {\r\n return key\r\n }\r\n const e: FieldEnum | null = enums.get(key)\r\n if (e) {\r\n return e.val\r\n }\r\n return key\r\n }\r\n\r\n public patchEnumValue (v: string): string {\r\n let converted = _.upperFirst(_.camelCase(v))\r\n const charAtPos = converted.charCodeAt(0)\r\n const zero: number = AsciiChars.Zero\r\n const nine: number = AsciiChars.Nine\r\n const atDigit: boolean = charAtPos >= zero && charAtPos <= nine\r\n if (atDigit) {\r\n converted = `E${converted}`\r\n }\r\n if (this.enumVals.containsKey(converted)) {\r\n converted = `${converted}2`\r\n }\r\n return converted\r\n }\r\n\r\n public addEnum (key: string, val: string, description?: string): void {\r\n let enums = this.enums\r\n let enumVals = this.enumVals\r\n if (enums == null) {\r\n this.enums = enums = new Dictionary<FieldEnum>()\r\n this.enumVals = enumVals = new Dictionary<boolean>()\r\n }\r\n if (!description) description = val\r\n val = this.patchEnumValue(val)\r\n enums.add(key, new FieldEnum(key, val, description ?? ''))\r\n enumVals.add(val, true)\r\n }\r\n\r\n public toString (): string {\r\n let abbreviation: string = ''\r\n if (this.abbreviation && this.name !== this.abbreviation) {\r\n abbreviation = `(${this.abbreviation})`\r\n }\r\n let baseCategoryAbbreviation: string = ''\r\n if (this.baseCategoryAbbreviation && this.baseCategoryAbbreviation !== this.name) {\r\n baseCategoryAbbreviation = this.baseCategoryAbbreviation\r\n }\r\n if (baseCategoryAbbreviation.length > 0 && this.baseCategory) {\r\n baseCategoryAbbreviation = `${this.baseCategory} ${baseCategoryAbbreviation}`\r\n }\r\n return `${this.num} ${this.name} ${abbreviation} ${baseCategoryAbbreviation} ${this.type} ${this.description ?? ''} ${this.enums ? `enumerated = [ ${this.enums.toString()} ]` : ''}`\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"simple-field-definition.js","sourceRoot":"","sources":["../../../src/dictionary/definition/simple-field-definition.ts"],"names":[],"mappings":";;;AAAA,8CAAyC;AACzC,gDAA4C;AAC5C,gEAA2D;AAC3D,4BAA2B;AAG3B,MAAa,qBAAqB;IAMhC,YAA6B,GAAW,EACtB,IAAY,EACZ,YAAoB,EACpB,YAA2B,EAC3B,wBAAuC,EACvC,IAAY,EACZ,WAA0B;QANf,QAAG,GAAH,GAAG,CAAQ;QACtB,SAAI,GAAJ,IAAI,CAAQ;QACZ,iBAAY,GAAZ,YAAY,CAAQ;QACpB,iBAAY,GAAZ,YAAY,CAAe;QAC3B,6BAAwB,GAAxB,wBAAwB,CAAe;QACvC,SAAI,GAAJ,IAAI,CAAQ;QACZ,gBAAW,GAAX,WAAW,CAAe;QAC1C,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,WAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAClC,CAAC;IAEM,MAAM;QACX,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAA;IAC3B,CAAC;IAEM,YAAY,CAAE,GAAW;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QACxB,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,KAAK,CAAA;QACd,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IAEM,WAAW,CAAE,GAAW;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QACxB,IAAI,CAAC,K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sciiChars } from '../../buffer/ascii/ascii-chars'\r\nimport * as _ from 'lodash'\r\nimport { TagType } from '../../buffer/tag/tag-type'\r\n\r\nexport class SimpleFieldDefinition {\r\n public readonly tag: number\r\n public readonly tagType: TagType\r\n public enums: Map<string, FieldEnum>\r\n public enumVals: Map<string, boolean>\r\n\r\n constructor (public readonly num: string,\r\n public readonly name: string,\r\n public readonly abbreviation: string,\r\n public readonly baseCategory: string | null,\r\n public readonly baseCategoryAbbreviation: string | null,\r\n public readonly type: string,\r\n public readonly description: string | null) {\r\n this.tag = parseInt(num, 10)\r\n this.tagType = Tags.toType(type)\r\n }\r\n\r\n public isEnum (): boolean {\r\n return this.enums != null\r\n }\r\n\r\n public containsEnum (key: string): boolean {\r\n const enums = this.enums\r\n if (!enums) {\r\n return false\r\n }\r\n return enums.has(key)\r\n }\r\n\r\n public resolveEnum (key: string): string {\r\n const enums = this.enums\r\n if (!enums) {\r\n return key\r\n }\r\n const e: FieldEnum | undefined = enums.get(key)\r\n if (e) {\r\n return e.val\r\n }\r\n return key\r\n }\r\n\r\n public patchEnumValue (v: string): string {\r\n let converted = _.upperFirst(_.camelCase(v))\r\n const charAtPos = converted.charCodeAt(0)\r\n const zero: number = AsciiChars.Zero\r\n const nine: number = AsciiChars.Nine\r\n const atDigit: boolean = charAtPos >= zero && charAtPos <= nine\r\n if (atDigit) {\r\n converted = `E${converted}`\r\n }\r\n if (this.enumVals.has(converted)) {\r\n converted = `${converted}2`\r\n }\r\n return converted\r\n }\r\n\r\n public addEnum (key: string, val: string, description?: string): void {\r\n let enums = this.enums\r\n let enumVals = this.enumVals\r\n if (enums == null) {\r\n this.enums = enums = new Map<string, FieldEnum>()\r\n this.enumVals = enumVals = new Map<string, boolean>()\r\n }\r\n if (!description) description = val\r\n val = this.patchEnumValue(val)\r\n enums.set(key, new FieldEnum(key, val, description ?? ''))\r\n enumVals.set(val, true)\r\n }\r\n\r\n public toString (): string {\r\n let abbreviation: string = ''\r\n if (this.abbreviation && this.name !== this.abbreviation) {\r\n abbreviation = `(${this.abbreviation})`\r\n }\r\n let baseCategoryAbbreviation: string = ''\r\n if (this.baseCategoryAbbreviation && this.baseCategoryAbbreviation !== this.name) {\r\n baseCategoryAbbreviation = this.baseCategoryAbbreviation\r\n }\r\n if (baseCategoryAbbreviation.length > 0 && this.baseCategory) {\r\n baseCategoryAbbreviation = `${this.baseCategory} ${baseCategoryAbbreviation}`\r\n }\r\n return `${this.num} ${this.name} ${abbreviation} ${baseCategoryAbbreviation} ${this.type} ${this.description ?? ''} ${this.enums ? `enumerated = [ ${this.enums.toString()} ]` : ''}`\r\n }\r\n}\r\n"]}