@pbkware/fielded-text-web 0.1.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.
- package/dist/api/ft-reader.js +59 -0
- package/dist/api/ft-reader.js.map +1 -0
- package/dist/api/ft-serialization.js +147 -0
- package/dist/api/ft-serialization.js.map +1 -0
- package/dist/api/ft-writer-settings.js +31 -0
- package/dist/api/ft-writer-settings.js.map +1 -0
- package/dist/api/ft-writer.js +22 -0
- package/dist/api/ft-writer.js.map +1 -0
- package/dist/factory/ft-field-factory.js +86 -0
- package/dist/factory/ft-field-factory.js.map +1 -0
- package/dist/factory/ft-meta-constructor.js +16 -0
- package/dist/factory/ft-meta-constructor.js.map +1 -0
- package/dist/factory/ft-meta-factory.js +30 -0
- package/dist/factory/ft-meta-factory.js.map +1 -0
- package/dist/factory/ft-sequence-constructor.js +11 -0
- package/dist/factory/ft-sequence-constructor.js.map +1 -0
- package/dist/factory/ft-sequence-factory.js +18 -0
- package/dist/factory/ft-sequence-factory.js.map +1 -0
- package/dist/factory/ft-sequence-item-constructor.js +11 -0
- package/dist/factory/ft-sequence-item-constructor.js.map +1 -0
- package/dist/factory/ft-sequence-item-factory.js +18 -0
- package/dist/factory/ft-sequence-item-factory.js.map +1 -0
- package/dist/factory/ft-sequence-redirect-constructor.js +13 -0
- package/dist/factory/ft-sequence-redirect-constructor.js.map +1 -0
- package/dist/factory/ft-sequence-redirect-factory.js +176 -0
- package/dist/factory/ft-sequence-redirect-factory.js.map +1 -0
- package/dist/factory/ft-substitution-constructor.js +23 -0
- package/dist/factory/ft-substitution-constructor.js.map +1 -0
- package/dist/factory/ft-substitution-factory.js +37 -0
- package/dist/factory/ft-substitution-factory.js.map +1 -0
- package/dist/fields/definitions/ft-boolean-field-definition.js +36 -0
- package/dist/fields/definitions/ft-boolean-field-definition.js.map +1 -0
- package/dist/fields/definitions/ft-date-time-field-definition.js +39 -0
- package/dist/fields/definitions/ft-date-time-field-definition.js.map +1 -0
- package/dist/fields/definitions/ft-decimal-field-definition.js +32 -0
- package/dist/fields/definitions/ft-decimal-field-definition.js.map +1 -0
- package/dist/fields/definitions/ft-field-definition-list.js +26 -0
- package/dist/fields/definitions/ft-field-definition-list.js.map +1 -0
- package/dist/fields/definitions/ft-field-definition.js +245 -0
- package/dist/fields/definitions/ft-field-definition.js.map +1 -0
- package/dist/fields/definitions/ft-float-field-definition.js +32 -0
- package/dist/fields/definitions/ft-float-field-definition.js.map +1 -0
- package/dist/fields/definitions/ft-generic-field-definition.js +30 -0
- package/dist/fields/definitions/ft-generic-field-definition.js.map +1 -0
- package/dist/fields/definitions/ft-integer-field-definition.js +33 -0
- package/dist/fields/definitions/ft-integer-field-definition.js.map +1 -0
- package/dist/fields/definitions/ft-string-field-definition.js +21 -0
- package/dist/fields/definitions/ft-string-field-definition.js.map +1 -0
- package/dist/fields/instances/ft-boolean-field.js +38 -0
- package/dist/fields/instances/ft-boolean-field.js.map +1 -0
- package/dist/fields/instances/ft-date-time-field.js +35 -0
- package/dist/fields/instances/ft-date-time-field.js.map +1 -0
- package/dist/fields/instances/ft-decimal-field.js +35 -0
- package/dist/fields/instances/ft-decimal-field.js.map +1 -0
- package/dist/fields/instances/ft-field-list.js +56 -0
- package/dist/fields/instances/ft-field-list.js.map +1 -0
- package/dist/fields/instances/ft-field.js +561 -0
- package/dist/fields/instances/ft-field.js.map +1 -0
- package/dist/fields/instances/ft-float-field.js +35 -0
- package/dist/fields/instances/ft-float-field.js.map +1 -0
- package/dist/fields/instances/ft-generic-field.js +173 -0
- package/dist/fields/instances/ft-generic-field.js.map +1 -0
- package/dist/fields/instances/ft-integer-field.js +35 -0
- package/dist/fields/instances/ft-integer-field.js.map +1 -0
- package/dist/fields/instances/ft-string-field.js +34 -0
- package/dist/fields/instances/ft-string-field.js.map +1 -0
- package/dist/index.d.ts +3483 -0
- package/dist/index.js +133 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/fields/ft-boolean-meta-field.js +65 -0
- package/dist/meta/fields/ft-boolean-meta-field.js.map +1 -0
- package/dist/meta/fields/ft-date-time-meta-field.js +55 -0
- package/dist/meta/fields/ft-date-time-meta-field.js.map +1 -0
- package/dist/meta/fields/ft-decimal-meta-field.js +55 -0
- package/dist/meta/fields/ft-decimal-meta-field.js.map +1 -0
- package/dist/meta/fields/ft-float-meta-field.js +55 -0
- package/dist/meta/fields/ft-float-meta-field.js.map +1 -0
- package/dist/meta/fields/ft-generic-meta-field.js +32 -0
- package/dist/meta/fields/ft-generic-meta-field.js.map +1 -0
- package/dist/meta/fields/ft-integer-meta-field.js +55 -0
- package/dist/meta/fields/ft-integer-meta-field.js.map +1 -0
- package/dist/meta/fields/ft-meta-field-list.js +183 -0
- package/dist/meta/fields/ft-meta-field-list.js.map +1 -0
- package/dist/meta/fields/ft-meta-field.js +351 -0
- package/dist/meta/fields/ft-meta-field.js.map +1 -0
- package/dist/meta/fields/ft-string-meta-field.js +27 -0
- package/dist/meta/fields/ft-string-meta-field.js.map +1 -0
- package/dist/meta/ft-meta-defaults.js +152 -0
- package/dist/meta/ft-meta-defaults.js.map +1 -0
- package/dist/meta/ft-meta.js +391 -0
- package/dist/meta/ft-meta.js.map +1 -0
- package/dist/meta/sequences/core/ft-meta-sequence-item-list.js +82 -0
- package/dist/meta/sequences/core/ft-meta-sequence-item-list.js.map +1 -0
- package/dist/meta/sequences/core/ft-meta-sequence-item.js +62 -0
- package/dist/meta/sequences/core/ft-meta-sequence-item.js.map +1 -0
- package/dist/meta/sequences/core/ft-meta-sequence-list.js +164 -0
- package/dist/meta/sequences/core/ft-meta-sequence-list.js.map +1 -0
- package/dist/meta/sequences/core/ft-meta-sequence.js +96 -0
- package/dist/meta/sequences/core/ft-meta-sequence.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-boolean-meta-sequence-redirect.js +40 -0
- package/dist/meta/sequences/redirects/ft-boolean-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-case-insensitive-string-meta-sequence-redirect.js +40 -0
- package/dist/meta/sequences/redirects/ft-case-insensitive-string-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-date-meta-sequence-redirect.js +45 -0
- package/dist/meta/sequences/redirects/ft-date-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-exact-date-time-meta-sequence-redirect.js +40 -0
- package/dist/meta/sequences/redirects/ft-exact-date-time-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-exact-decimal-meta-sequence-redirect.js +40 -0
- package/dist/meta/sequences/redirects/ft-exact-decimal-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-exact-float-meta-sequence-redirect.js +40 -0
- package/dist/meta/sequences/redirects/ft-exact-float-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-exact-integer-meta-sequence-redirect.js +40 -0
- package/dist/meta/sequences/redirects/ft-exact-integer-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-exact-string-meta-sequence-redirect.js +40 -0
- package/dist/meta/sequences/redirects/ft-exact-string-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-meta-sequence-redirect-list.js +85 -0
- package/dist/meta/sequences/redirects/ft-meta-sequence-redirect-list.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-meta-sequence-redirect.js +68 -0
- package/dist/meta/sequences/redirects/ft-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/sequences/redirects/ft-null-meta-sequence-redirect.js +21 -0
- package/dist/meta/sequences/redirects/ft-null-meta-sequence-redirect.js.map +1 -0
- package/dist/meta/substitutions/ft-meta-substitution-list.js +51 -0
- package/dist/meta/substitutions/ft-meta-substitution-list.js.map +1 -0
- package/dist/meta-serialization/format/ft-json-meta-serialization.js +283 -0
- package/dist/meta-serialization/format/ft-json-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/format/ft-xml-meta-serialization.js +706 -0
- package/dist/meta-serialization/format/ft-xml-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/format/meta-serializer-options.js +12 -0
- package/dist/meta-serialization/format/meta-serializer-options.js.map +1 -0
- package/dist/meta-serialization/ft-meta-serialization.js +59 -0
- package/dist/meta-serialization/ft-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/styles/ft-boolean-styles-meta-serialization.js +83 -0
- package/dist/meta-serialization/styles/ft-boolean-styles-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/styles/ft-date-time-styles-meta-serialization.js +54 -0
- package/dist/meta-serialization/styles/ft-date-time-styles-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/styles/ft-number-styles-meta-serialization.js +199 -0
- package/dist/meta-serialization/styles/ft-number-styles-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/boolean-meta-serialization.js +39 -0
- package/dist/meta-serialization/types/boolean-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/char-meta-serialization.js +32 -0
- package/dist/meta-serialization/types/char-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/date-time-meta-serialization.js +227 -0
- package/dist/meta-serialization/types/date-time-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/decimal-meta-serialization.js +12 -0
- package/dist/meta-serialization/types/decimal-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/data-type-meta-serialisation.js +55 -0
- package/dist/meta-serialization/types/enums/data-type-meta-serialisation.js.map +1 -0
- package/dist/meta-serialization/types/enums/end-of-line-auto-write-type-meta-serialization.js +50 -0
- package/dist/meta-serialization/types/enums/end-of-line-auto-write-type-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/end-of-line-type-meta-serialization.js +49 -0
- package/dist/meta-serialization/types/enums/end-of-line-type-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/heading-constraint-meta-serialization.js +55 -0
- package/dist/meta-serialization/types/enums/heading-constraint-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/last-line-ended-type-meta-serialization.js +48 -0
- package/dist/meta-serialization/types/enums/last-line-ended-type-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/pad-alignment-meta-serialization.js +52 -0
- package/dist/meta-serialization/types/enums/pad-alignment-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/pad-char-type-meta-serialization.js +52 -0
- package/dist/meta-serialization/types/enums/pad-char-type-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/quoted-type-meta-serialization.js +52 -0
- package/dist/meta-serialization/types/enums/quoted-type-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/sequence-invokation-delay-meta-serialization.js +47 -0
- package/dist/meta-serialization/types/enums/sequence-invokation-delay-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/sequence-redirect-type-meta-serialisation.js +88 -0
- package/dist/meta-serialization/types/enums/sequence-redirect-type-meta-serialisation.js.map +1 -0
- package/dist/meta-serialization/types/enums/substitution-type-meta-serialization.js +47 -0
- package/dist/meta-serialization/types/enums/substitution-type-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/enums/truncate-type-meta-serialization.js +56 -0
- package/dist/meta-serialization/types/enums/truncate-type-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/float-meta-serialization.js +99 -0
- package/dist/meta-serialization/types/float-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/integer-float-meta-serialization.js +52 -0
- package/dist/meta-serialization/types/integer-float-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/integer-meta-serialization.js +50 -0
- package/dist/meta-serialization/types/integer-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/types/string-meta-serialization.js +35 -0
- package/dist/meta-serialization/types/string-meta-serialization.js.map +1 -0
- package/dist/meta-serialization/utils/implicit-explicit-index-sorter.js +57 -0
- package/dist/meta-serialization/utils/implicit-explicit-index-sorter.js.map +1 -0
- package/dist/meta-serialization/utils/meta-serialization-redirect-sequence-resolver.js +33 -0
- package/dist/meta-serialization/utils/meta-serialization-redirect-sequence-resolver.js.map +1 -0
- package/dist/meta-serialization/utils/meta-serialization-sequence-name-resolver.js +67 -0
- package/dist/meta-serialization/utils/meta-serialization-sequence-name-resolver.js.map +1 -0
- package/dist/meta-serialization/utils/sequence-item-field-indices.js +70 -0
- package/dist/meta-serialization/utils/sequence-item-field-indices.js.map +1 -0
- package/dist/sequences/core/ft-sequence-invokation-list.js +91 -0
- package/dist/sequences/core/ft-sequence-invokation-list.js.map +1 -0
- package/dist/sequences/core/ft-sequence-invokation.js +143 -0
- package/dist/sequences/core/ft-sequence-invokation.js.map +1 -0
- package/dist/sequences/core/ft-sequence-item-list.js +34 -0
- package/dist/sequences/core/ft-sequence-item-list.js.map +1 -0
- package/dist/sequences/core/ft-sequence-item.js +46 -0
- package/dist/sequences/core/ft-sequence-item.js.map +1 -0
- package/dist/sequences/core/ft-sequence-list.js +62 -0
- package/dist/sequences/core/ft-sequence-list.js.map +1 -0
- package/dist/sequences/core/ft-sequence.js +59 -0
- package/dist/sequences/core/ft-sequence.js.map +1 -0
- package/dist/sequences/redirects/ft-boolean-sequence-redirect.js +33 -0
- package/dist/sequences/redirects/ft-boolean-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-case-insensitive-string-sequence-redirect.js +33 -0
- package/dist/sequences/redirects/ft-case-insensitive-string-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-date-sequence-redirect.js +37 -0
- package/dist/sequences/redirects/ft-date-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-exact-date-time-sequence-redirect.js +33 -0
- package/dist/sequences/redirects/ft-exact-date-time-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-exact-decimal-sequence-redirect.js +33 -0
- package/dist/sequences/redirects/ft-exact-decimal-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-exact-float-sequence-redirect.js +33 -0
- package/dist/sequences/redirects/ft-exact-float-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-exact-integer-sequence-redirect.js +33 -0
- package/dist/sequences/redirects/ft-exact-integer-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-exact-string-sequence-redirect.js +33 -0
- package/dist/sequences/redirects/ft-exact-string-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-null-sequence-redirect.js +20 -0
- package/dist/sequences/redirects/ft-null-sequence-redirect.js.map +1 -0
- package/dist/sequences/redirects/ft-sequence-redirect-list.js +35 -0
- package/dist/sequences/redirects/ft-sequence-redirect-list.js.map +1 -0
- package/dist/sequences/redirects/ft-sequence-redirect.js +47 -0
- package/dist/sequences/redirects/ft-sequence-redirect.js.map +1 -0
- package/dist/serialization/char-reader.js +178 -0
- package/dist/serialization/char-reader.js.map +1 -0
- package/dist/serialization/declaration-parser.js +176 -0
- package/dist/serialization/declaration-parser.js.map +1 -0
- package/dist/serialization/delimited-field-parser.js +278 -0
- package/dist/serialization/delimited-field-parser.js.map +1 -0
- package/dist/serialization/embedded-meta-parser.js +129 -0
- package/dist/serialization/embedded-meta-parser.js.map +1 -0
- package/dist/serialization/fixed-width-field-parser.js +196 -0
- package/dist/serialization/fixed-width-field-parser.js.map +1 -0
- package/dist/serialization/formatting/ft-boolean-field-formatter.js +113 -0
- package/dist/serialization/formatting/ft-boolean-field-formatter.js.map +1 -0
- package/dist/serialization/formatting/ft-date-time-field-formatter.js +54 -0
- package/dist/serialization/formatting/ft-date-time-field-formatter.js.map +1 -0
- package/dist/serialization/formatting/ft-decimal-field-formatter.js +46 -0
- package/dist/serialization/formatting/ft-decimal-field-formatter.js.map +1 -0
- package/dist/serialization/formatting/ft-declared-parameters-formatter.js +52 -0
- package/dist/serialization/formatting/ft-declared-parameters-formatter.js.map +1 -0
- package/dist/serialization/formatting/ft-field-formatter.js +15 -0
- package/dist/serialization/formatting/ft-field-formatter.js.map +1 -0
- package/dist/serialization/formatting/ft-float-field-formatter.js +46 -0
- package/dist/serialization/formatting/ft-float-field-formatter.js.map +1 -0
- package/dist/serialization/formatting/ft-integer-field-formatter.js +47 -0
- package/dist/serialization/formatting/ft-integer-field-formatter.js.map +1 -0
- package/dist/serialization/formatting/ft-string-field-formatter.js +14 -0
- package/dist/serialization/formatting/ft-string-field-formatter.js.map +1 -0
- package/dist/serialization/ft-declared-parameters.js +199 -0
- package/dist/serialization/ft-declared-parameters.js.map +1 -0
- package/dist/serialization/ft-serialization-reader.js +865 -0
- package/dist/serialization/ft-serialization-reader.js.map +1 -0
- package/dist/serialization/ft-serialization-writer.js +633 -0
- package/dist/serialization/ft-serialization-writer.js.map +1 -0
- package/dist/serialization/ft-text-reader.js +48 -0
- package/dist/serialization/ft-text-reader.js.map +1 -0
- package/dist/serialization/ft-text-writer.js +46 -0
- package/dist/serialization/ft-text-writer.js.map +1 -0
- package/dist/serialization/heading-line-record-parser.js +253 -0
- package/dist/serialization/heading-line-record-parser.js.map +1 -0
- package/dist/serialization/line-parser.js +205 -0
- package/dist/serialization/line-parser.js.map +1 -0
- package/dist/serialization/serialization-core.js +551 -0
- package/dist/serialization/serialization-core.js.map +1 -0
- package/dist/substitutions/ft-substitution-list.js +54 -0
- package/dist/substitutions/ft-substitution-list.js.map +1 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/types/enums/ft-boolean-styles.js +12 -0
- package/dist/types/enums/ft-boolean-styles.js.map +1 -0
- package/dist/types/enums/ft-data-type.js +12 -0
- package/dist/types/enums/ft-data-type.js.map +1 -0
- package/dist/types/enums/ft-end-of-line-auto-write-type.js +10 -0
- package/dist/types/enums/ft-end-of-line-auto-write-type.js.map +1 -0
- package/dist/types/enums/ft-end-of-line-type.js +9 -0
- package/dist/types/enums/ft-end-of-line-type.js.map +1 -0
- package/dist/types/enums/ft-heading-constraint.js +11 -0
- package/dist/types/enums/ft-heading-constraint.js.map +1 -0
- package/dist/types/enums/ft-last-line-ended-type.js +9 -0
- package/dist/types/enums/ft-last-line-ended-type.js.map +1 -0
- package/dist/types/enums/ft-line-type.js +13 -0
- package/dist/types/enums/ft-line-type.js.map +1 -0
- package/dist/types/enums/ft-meta-element-type.js +12 -0
- package/dist/types/enums/ft-meta-element-type.js.map +1 -0
- package/dist/types/enums/ft-meta-reference-type.js +10 -0
- package/dist/types/enums/ft-meta-reference-type.js.map +1 -0
- package/dist/types/enums/ft-meta-serialization-format.js +15 -0
- package/dist/types/enums/ft-meta-serialization-format.js.map +1 -0
- package/dist/types/enums/ft-pad-alignment.js +9 -0
- package/dist/types/enums/ft-pad-alignment.js.map +1 -0
- package/dist/types/enums/ft-pad-char-type.js +9 -0
- package/dist/types/enums/ft-pad-char-type.js.map +1 -0
- package/dist/types/enums/ft-quoted-type.js +9 -0
- package/dist/types/enums/ft-quoted-type.js.map +1 -0
- package/dist/types/enums/ft-read-record-result.js +9 -0
- package/dist/types/enums/ft-read-record-result.js.map +1 -0
- package/dist/types/enums/ft-sequence-invokation-delay.js +8 -0
- package/dist/types/enums/ft-sequence-invokation-delay.js.map +1 -0
- package/dist/types/enums/ft-sequence-redirect-type.js +15 -0
- package/dist/types/enums/ft-sequence-redirect-type.js.map +1 -0
- package/dist/types/enums/ft-substitution-type.js +12 -0
- package/dist/types/enums/ft-substitution-type.js.map +1 -0
- package/dist/types/enums/ft-truncate-type.js +11 -0
- package/dist/types/enums/ft-truncate-type.js.map +1 -0
- package/dist/types/errors/ft-internal-error.js +14 -0
- package/dist/types/errors/ft-internal-error.js.map +1 -0
- package/dist/types/errors/ft-serialization-error.js +49 -0
- package/dist/types/errors/ft-serialization-error.js.map +1 -0
- package/dist/types/errors/ft-serialization-exception.js +78 -0
- package/dist/types/errors/ft-serialization-exception.js.map +1 -0
- package/dist/types/events/ft-field-heading-ready-event-args.js +2 -0
- package/dist/types/events/ft-field-heading-ready-event-args.js.map +1 -0
- package/dist/types/events/ft-field-value-ready-event-args.js +2 -0
- package/dist/types/events/ft-field-value-ready-event-args.js.map +1 -0
- package/dist/types/events/ft-heading-line-finished-event-args.js +2 -0
- package/dist/types/events/ft-heading-line-finished-event-args.js.map +1 -0
- package/dist/types/events/ft-heading-line-started-event-args.js +2 -0
- package/dist/types/events/ft-heading-line-started-event-args.js.map +1 -0
- package/dist/types/events/ft-record-finished-event-args.js +2 -0
- package/dist/types/events/ft-record-finished-event-args.js.map +1 -0
- package/dist/types/events/ft-record-started-event-args.js +2 -0
- package/dist/types/events/ft-record-started-event-args.js.map +1 -0
- package/dist/types/events/ft-sequence-redirected-event-args.js +2 -0
- package/dist/types/events/ft-sequence-redirected-event-args.js.map +1 -0
- package/package.json +84 -0
- package/src/api/ft-reader.ts +106 -0
- package/src/api/ft-serialization.ts +216 -0
- package/src/api/ft-writer-settings.ts +76 -0
- package/src/api/ft-writer.ts +26 -0
- package/src/factory/ft-field-factory.ts +94 -0
- package/src/factory/ft-meta-constructor.ts +16 -0
- package/src/factory/ft-meta-factory.ts +34 -0
- package/src/factory/ft-sequence-constructor.ts +11 -0
- package/src/factory/ft-sequence-factory.ts +22 -0
- package/src/factory/ft-sequence-item-constructor.ts +11 -0
- package/src/factory/ft-sequence-item-factory.ts +22 -0
- package/src/factory/ft-sequence-redirect-constructor.ts +19 -0
- package/src/factory/ft-sequence-redirect-factory.ts +197 -0
- package/src/factory/ft-substitution-constructor.ts +24 -0
- package/src/factory/ft-substitution-factory.ts +43 -0
- package/src/fields/definitions/ft-boolean-field-definition.ts +49 -0
- package/src/fields/definitions/ft-date-time-field-definition.ts +52 -0
- package/src/fields/definitions/ft-decimal-field-definition.ts +43 -0
- package/src/fields/definitions/ft-field-definition-list.ts +33 -0
- package/src/fields/definitions/ft-field-definition.ts +276 -0
- package/src/fields/definitions/ft-float-field-definition.ts +43 -0
- package/src/fields/definitions/ft-generic-field-definition.ts +49 -0
- package/src/fields/definitions/ft-integer-field-definition.ts +44 -0
- package/src/fields/definitions/ft-string-field-definition.ts +26 -0
- package/src/fields/instances/ft-boolean-field.ts +49 -0
- package/src/fields/instances/ft-date-time-field.ts +44 -0
- package/src/fields/instances/ft-decimal-field.ts +44 -0
- package/src/fields/instances/ft-field-list.ts +68 -0
- package/src/fields/instances/ft-field.ts +691 -0
- package/src/fields/instances/ft-float-field.ts +44 -0
- package/src/fields/instances/ft-generic-field.ts +219 -0
- package/src/fields/instances/ft-integer-field.ts +44 -0
- package/src/fields/instances/ft-string-field.ts +40 -0
- package/src/index.ts +185 -0
- package/src/meta/fields/ft-boolean-meta-field.ts +79 -0
- package/src/meta/fields/ft-date-time-meta-field.ts +68 -0
- package/src/meta/fields/ft-decimal-meta-field.ts +68 -0
- package/src/meta/fields/ft-float-meta-field.ts +68 -0
- package/src/meta/fields/ft-generic-meta-field.ts +38 -0
- package/src/meta/fields/ft-integer-meta-field.ts +68 -0
- package/src/meta/fields/ft-meta-field-list.ts +208 -0
- package/src/meta/fields/ft-meta-field.ts +399 -0
- package/src/meta/fields/ft-string-meta-field.ts +34 -0
- package/src/meta/ft-meta-defaults.ts +151 -0
- package/src/meta/ft-meta.ts +453 -0
- package/src/meta/sequences/core/ft-meta-sequence-item-list.ts +97 -0
- package/src/meta/sequences/core/ft-meta-sequence-item.ts +78 -0
- package/src/meta/sequences/core/ft-meta-sequence-list.ts +203 -0
- package/src/meta/sequences/core/ft-meta-sequence.ts +127 -0
- package/src/meta/sequences/redirects/ft-boolean-meta-sequence-redirect.ts +49 -0
- package/src/meta/sequences/redirects/ft-case-insensitive-string-meta-sequence-redirect.ts +49 -0
- package/src/meta/sequences/redirects/ft-date-meta-sequence-redirect.ts +54 -0
- package/src/meta/sequences/redirects/ft-exact-date-time-meta-sequence-redirect.ts +49 -0
- package/src/meta/sequences/redirects/ft-exact-decimal-meta-sequence-redirect.ts +49 -0
- package/src/meta/sequences/redirects/ft-exact-float-meta-sequence-redirect.ts +49 -0
- package/src/meta/sequences/redirects/ft-exact-integer-meta-sequence-redirect.ts +49 -0
- package/src/meta/sequences/redirects/ft-exact-string-meta-sequence-redirect.ts +49 -0
- package/src/meta/sequences/redirects/ft-meta-sequence-redirect-list.ts +99 -0
- package/src/meta/sequences/redirects/ft-meta-sequence-redirect.ts +89 -0
- package/src/meta/sequences/redirects/ft-null-meta-sequence-redirect.ts +25 -0
- package/src/meta/substitutions/ft-meta-substitution-list.ts +54 -0
- package/src/meta-serialization/format/ft-json-meta-serialization.ts +288 -0
- package/src/meta-serialization/format/ft-xml-meta-serialization.ts +885 -0
- package/src/meta-serialization/format/meta-serializer-options.ts +21 -0
- package/src/meta-serialization/ft-meta-serialization.ts +60 -0
- package/src/meta-serialization/styles/ft-boolean-styles-meta-serialization.ts +88 -0
- package/src/meta-serialization/styles/ft-date-time-styles-meta-serialization.ts +50 -0
- package/src/meta-serialization/styles/ft-number-styles-meta-serialization.ts +212 -0
- package/src/meta-serialization/types/boolean-meta-serialization.ts +36 -0
- package/src/meta-serialization/types/char-meta-serialization.ts +28 -0
- package/src/meta-serialization/types/date-time-meta-serialization.ts +220 -0
- package/src/meta-serialization/types/decimal-meta-serialization.ts +13 -0
- package/src/meta-serialization/types/enums/data-type-meta-serialisation.ts +52 -0
- package/src/meta-serialization/types/enums/end-of-line-auto-write-type-meta-serialization.ts +47 -0
- package/src/meta-serialization/types/enums/end-of-line-type-meta-serialization.ts +46 -0
- package/src/meta-serialization/types/enums/heading-constraint-meta-serialization.ts +52 -0
- package/src/meta-serialization/types/enums/last-line-ended-type-meta-serialization.ts +45 -0
- package/src/meta-serialization/types/enums/meta-element-type-meta-serialization.ts +36 -0
- package/src/meta-serialization/types/enums/pad-alignment-meta-serialization.ts +54 -0
- package/src/meta-serialization/types/enums/pad-char-type-meta-serialization.ts +54 -0
- package/src/meta-serialization/types/enums/quoted-type-meta-serialization.ts +54 -0
- package/src/meta-serialization/types/enums/sequence-invokation-delay-meta-serialization.ts +44 -0
- package/src/meta-serialization/types/enums/sequence-redirect-type-meta-serialisation.ts +86 -0
- package/src/meta-serialization/types/enums/substitution-type-meta-serialization.ts +44 -0
- package/src/meta-serialization/types/enums/truncate-type-meta-serialization.ts +58 -0
- package/src/meta-serialization/types/float-meta-serialization.ts +96 -0
- package/src/meta-serialization/types/integer-float-meta-serialization.ts +46 -0
- package/src/meta-serialization/types/integer-meta-serialization.ts +44 -0
- package/src/meta-serialization/types/string-meta-serialization.ts +32 -0
- package/src/meta-serialization/utils/implicit-explicit-index-sorter.ts +61 -0
- package/src/meta-serialization/utils/meta-serialization-redirect-sequence-resolver.ts +43 -0
- package/src/meta-serialization/utils/meta-serialization-sequence-name-resolver.ts +85 -0
- package/src/meta-serialization/utils/sequence-item-field-indices.ts +76 -0
- package/src/sequences/core/ft-sequence-invokation-list.ts +109 -0
- package/src/sequences/core/ft-sequence-invokation.ts +166 -0
- package/src/sequences/core/ft-sequence-item-list.ts +40 -0
- package/src/sequences/core/ft-sequence-item.ts +59 -0
- package/src/sequences/core/ft-sequence-list.ts +73 -0
- package/src/sequences/core/ft-sequence.ts +75 -0
- package/src/sequences/redirects/ft-boolean-sequence-redirect.ts +42 -0
- package/src/sequences/redirects/ft-case-insensitive-string-sequence-redirect.ts +46 -0
- package/src/sequences/redirects/ft-date-sequence-redirect.ts +48 -0
- package/src/sequences/redirects/ft-exact-date-time-sequence-redirect.ts +46 -0
- package/src/sequences/redirects/ft-exact-decimal-sequence-redirect.ts +46 -0
- package/src/sequences/redirects/ft-exact-float-sequence-redirect.ts +46 -0
- package/src/sequences/redirects/ft-exact-integer-sequence-redirect.ts +46 -0
- package/src/sequences/redirects/ft-exact-string-sequence-redirect.ts +46 -0
- package/src/sequences/redirects/ft-null-sequence-redirect.ts +27 -0
- package/src/sequences/redirects/ft-sequence-redirect-list.ts +42 -0
- package/src/sequences/redirects/ft-sequence-redirect.ts +68 -0
- package/src/serialization/char-reader.ts +203 -0
- package/src/serialization/declaration-parser.ts +203 -0
- package/src/serialization/delimited-field-parser.ts +296 -0
- package/src/serialization/embedded-meta-parser.ts +147 -0
- package/src/serialization/fixed-width-field-parser.ts +220 -0
- package/src/serialization/formatting/ft-boolean-field-formatter.ts +114 -0
- package/src/serialization/formatting/ft-date-time-field-formatter.ts +61 -0
- package/src/serialization/formatting/ft-decimal-field-formatter.ts +52 -0
- package/src/serialization/formatting/ft-declared-parameters-formatter.ts +60 -0
- package/src/serialization/formatting/ft-field-formatter.ts +18 -0
- package/src/serialization/formatting/ft-float-field-formatter.ts +52 -0
- package/src/serialization/formatting/ft-integer-field-formatter.ts +53 -0
- package/src/serialization/formatting/ft-string-field-formatter.ts +15 -0
- package/src/serialization/formatting/index.ts +7 -0
- package/src/serialization/ft-declared-parameters.ts +232 -0
- package/src/serialization/ft-serialization-reader.ts +953 -0
- package/src/serialization/ft-serialization-writer.ts +760 -0
- package/src/serialization/ft-text-reader.ts +64 -0
- package/src/serialization/ft-text-writer.ts +61 -0
- package/src/serialization/heading-line-record-parser.ts +285 -0
- package/src/serialization/line-parser.ts +231 -0
- package/src/serialization/serialization-core.ts +632 -0
- package/src/substitutions/ft-substitution-list.ts +60 -0
- package/src/types/enums/ft-boolean-styles.ts +17 -0
- package/src/types/enums/ft-data-type.ts +21 -0
- package/src/types/enums/ft-end-of-line-auto-write-type.ts +14 -0
- package/src/types/enums/ft-end-of-line-type.ts +13 -0
- package/src/types/enums/ft-heading-constraint.ts +15 -0
- package/src/types/enums/ft-last-line-ended-type.ts +13 -0
- package/src/types/enums/ft-line-type.ts +17 -0
- package/src/types/enums/ft-meta-element-type.ts +16 -0
- package/src/types/enums/ft-meta-reference-type.ts +14 -0
- package/src/types/enums/ft-meta-serialization-format.ts +19 -0
- package/src/types/enums/ft-pad-alignment.ts +13 -0
- package/src/types/enums/ft-pad-char-type.ts +13 -0
- package/src/types/enums/ft-quoted-type.ts +13 -0
- package/src/types/enums/ft-read-record-result.ts +13 -0
- package/src/types/enums/ft-sequence-invokation-delay.ts +12 -0
- package/src/types/enums/ft-sequence-redirect-type.ts +19 -0
- package/src/types/enums/ft-substitution-type.ts +16 -0
- package/src/types/enums/ft-truncate-type.ts +15 -0
- package/src/types/errors/ft-internal-error.ts +15 -0
- package/src/types/errors/ft-serialization-error.ts +53 -0
- package/src/types/errors/ft-serialization-exception.ts +86 -0
- package/src/types/events/ft-field-heading-ready-event-args.ts +9 -0
- package/src/types/events/ft-field-value-ready-event-args.ts +9 -0
- package/src/types/events/ft-heading-line-finished-event-args.ts +6 -0
- package/src/types/events/ft-heading-line-started-event-args.ts +6 -0
- package/src/types/events/ft-record-finished-event-args.ts +6 -0
- package/src/types/events/ft-record-started-event-args.ts +6 -0
- package/src/types/events/ft-sequence-redirected-event-args.ts +9 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3483 @@
|
|
|
1
|
+
import { DotNetDateTimeStyleFlags } from '@pbkware/dot-net-date-number-formatting';
|
|
2
|
+
import { DotNetDateTimeStyles } from '@pbkware/dot-net-date-number-formatting';
|
|
3
|
+
import { DotNetLocaleSettings } from '@pbkware/dot-net-date-number-formatting';
|
|
4
|
+
import { DotNetNumberStyleFlags } from '@pbkware/dot-net-date-number-formatting';
|
|
5
|
+
import { DotNetNumberStyles } from '@pbkware/dot-net-date-number-formatting';
|
|
6
|
+
import { Result } from '@pbkware/js-utils';
|
|
7
|
+
|
|
8
|
+
export { DotNetDateTimeStyleFlags }
|
|
9
|
+
|
|
10
|
+
export { DotNetDateTimeStyles }
|
|
11
|
+
|
|
12
|
+
export { DotNetLocaleSettings }
|
|
13
|
+
|
|
14
|
+
export { DotNetNumberStyleFlags }
|
|
15
|
+
|
|
16
|
+
export { DotNetNumberStyles }
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Exception thrown to abort serialization from an event handler.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare class FtAbortSerializationException extends Error {
|
|
23
|
+
constructor(message?: string);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Field for boolean values.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export declare class FtBooleanField extends FtGenericField<boolean> {
|
|
31
|
+
private static readonly VALUE_TEXT_NULL_TRIMMABLE;
|
|
32
|
+
constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, definition: FtBooleanFieldDefinition);
|
|
33
|
+
get definition(): FtBooleanFieldDefinition;
|
|
34
|
+
get falseText(): string;
|
|
35
|
+
get trueText(): string;
|
|
36
|
+
get styles(): FtBooleanStyles;
|
|
37
|
+
get nullableValue(): boolean | null;
|
|
38
|
+
set nullableValue(value: boolean | null);
|
|
39
|
+
protected isValueEqual(left: boolean, right: boolean): boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Field definition for boolean fields.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare class FtBooleanFieldDefinition extends FtGenericFieldDefinition<boolean> {
|
|
47
|
+
static readonly AUTO_LEFT_PAD = false;
|
|
48
|
+
protected formatter: FtBooleanFieldFormatter;
|
|
49
|
+
constructor(index: number);
|
|
50
|
+
get falseText(): string;
|
|
51
|
+
get trueText(): string;
|
|
52
|
+
get styles(): FtBooleanStyles;
|
|
53
|
+
loadMeta(metaField: FtBooleanMetaField, myCulture: DotNetLocaleSettings | undefined, myMainHeadingIndex: number): void;
|
|
54
|
+
getValueText(value: boolean): string;
|
|
55
|
+
parseValueText(text: string): boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Formatter for boolean fields.
|
|
60
|
+
* Supports various parsing styles including case sensitivity, partial matching, and more.
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
export declare class FtBooleanFieldFormatter extends FtFieldFormatter {
|
|
64
|
+
private _falseText;
|
|
65
|
+
private _trueText;
|
|
66
|
+
private _styles;
|
|
67
|
+
get falseText(): string;
|
|
68
|
+
set falseText(value: string);
|
|
69
|
+
get trueText(): string;
|
|
70
|
+
set trueText(value: string);
|
|
71
|
+
get styles(): FtBooleanStyles;
|
|
72
|
+
set styles(value: FtBooleanStyles);
|
|
73
|
+
toText(value: boolean): string;
|
|
74
|
+
parse(text: string): boolean;
|
|
75
|
+
private compareText;
|
|
76
|
+
private toUpperCaseChar;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Meta field for boolean values.
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
export declare class FtBooleanMetaField extends FtGenericMetaField<boolean> {
|
|
84
|
+
static readonly DATA_TYPE: "Boolean";
|
|
85
|
+
static readonly DEFAULT_FALSE_TEXT = "False";
|
|
86
|
+
static readonly DEFAULT_TRUE_TEXT = "True";
|
|
87
|
+
static readonly DEFAULT_STYLES: number;
|
|
88
|
+
static readonly DEFAULT_VALUE = false;
|
|
89
|
+
static readonly DEFAULT_SEQUENCE_REDIRECT_TYPE: "Boolean";
|
|
90
|
+
private _falseText;
|
|
91
|
+
private _trueText;
|
|
92
|
+
private _styles;
|
|
93
|
+
constructor(headingCount?: number);
|
|
94
|
+
get falseText(): string;
|
|
95
|
+
set falseText(value: string);
|
|
96
|
+
get trueText(): string;
|
|
97
|
+
set trueText(value: string);
|
|
98
|
+
get styles(): FtBooleanStyles;
|
|
99
|
+
set styles(value: FtBooleanStyles);
|
|
100
|
+
static isBooleanMetaField(field: FtMetaField): field is FtBooleanMetaField;
|
|
101
|
+
loadDefaults(leaveNameAsIs?: boolean): void;
|
|
102
|
+
createCopy(): FtMetaField;
|
|
103
|
+
protected getDefaultSequenceRedirectType(): FtSequenceRedirectType;
|
|
104
|
+
protected assignFrom(source: FtMetaField): void;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Meta sequence redirect that triggers when a field value matches a specific boolean value.
|
|
109
|
+
* Used in metadata to define sequence transitions based on boolean field values.
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export declare class FtBooleanMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
113
|
+
/** The standard type identifier for boolean redirects */
|
|
114
|
+
static readonly TYPE: "Boolean";
|
|
115
|
+
/** Default boolean value */
|
|
116
|
+
static readonly DEFAULT_VALUE = false;
|
|
117
|
+
private _value;
|
|
118
|
+
constructor();
|
|
119
|
+
/** The boolean value to match for triggering the redirect */
|
|
120
|
+
get value(): boolean;
|
|
121
|
+
set value(val: boolean);
|
|
122
|
+
loadDefaults(): void;
|
|
123
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
124
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Sequence redirect that triggers when a field equals a specific boolean value.
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
|
+
export declare class FtBooleanSequenceRedirect extends FtSequenceRedirect {
|
|
132
|
+
static readonly TYPE: "Boolean";
|
|
133
|
+
private _value;
|
|
134
|
+
constructor(index: number);
|
|
135
|
+
get value(): boolean;
|
|
136
|
+
checkTriggered(field: FtField): boolean;
|
|
137
|
+
/** @internal */
|
|
138
|
+
loadMeta(metaSequenceRedirect: FtBooleanMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Flags enum for boolean parsing styles
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
export declare const FtBooleanStyles: {
|
|
146
|
+
readonly IgnoreCase: number;
|
|
147
|
+
readonly MatchFirstCharOnly: number;
|
|
148
|
+
readonly IgnoreTrailingChars: number;
|
|
149
|
+
readonly FalseIfNotMatchTrue: number;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* @public
|
|
154
|
+
*/
|
|
155
|
+
export declare type FtBooleanStyles = (typeof FtBooleanStyles)[keyof typeof FtBooleanStyles];
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Callback-based text writer for simple output accumulation.
|
|
159
|
+
* @public
|
|
160
|
+
*/
|
|
161
|
+
export declare class FtCallbackTextWriter implements FtTextWriter {
|
|
162
|
+
private readonly callback;
|
|
163
|
+
private readonly closeCallback?;
|
|
164
|
+
constructor(callback: (text: string) => void, closeCallback?: (() => void) | undefined);
|
|
165
|
+
write(text: string): void;
|
|
166
|
+
flush(): void;
|
|
167
|
+
close(): void;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Meta sequence redirect that triggers when a field value matches a specific string (case-insensitive).
|
|
172
|
+
* Used in metadata to define sequence transitions based on string field values without case sensitivity.
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
export declare class FtCaseInsensitiveStringMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
176
|
+
/** The standard type identifier for case-insensitive string redirects */
|
|
177
|
+
static readonly TYPE: "CaseInsensitiveString";
|
|
178
|
+
/** Default string value */
|
|
179
|
+
static readonly DEFAULT_VALUE = "";
|
|
180
|
+
private _value;
|
|
181
|
+
constructor();
|
|
182
|
+
/** The string value to match (case-insensitive) for triggering the redirect */
|
|
183
|
+
get value(): string;
|
|
184
|
+
set value(val: string);
|
|
185
|
+
loadDefaults(): void;
|
|
186
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
187
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Sequence redirect that triggers when a field equals a specific string value (case-insensitive).
|
|
192
|
+
* @public
|
|
193
|
+
*/
|
|
194
|
+
export declare class FtCaseInsensitiveStringSequenceRedirect extends FtSequenceRedirect {
|
|
195
|
+
static readonly TYPE: "CaseInsensitiveString";
|
|
196
|
+
private _value;
|
|
197
|
+
constructor(index: number);
|
|
198
|
+
get value(): string;
|
|
199
|
+
checkTriggered(field: FtField): boolean;
|
|
200
|
+
/** @internal */
|
|
201
|
+
loadMeta(metaSequenceRedirect: FtCaseInsensitiveStringMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* @public
|
|
206
|
+
*/
|
|
207
|
+
export declare const FtDataType: {
|
|
208
|
+
readonly String: "String";
|
|
209
|
+
readonly Boolean: "Boolean";
|
|
210
|
+
readonly Integer: "Integer";
|
|
211
|
+
readonly Float: "Float";
|
|
212
|
+
readonly Decimal: "Decimal";
|
|
213
|
+
readonly DateTime: "DateTime";
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @public
|
|
218
|
+
*/
|
|
219
|
+
export declare type FtDataType = (typeof FtDataType)[keyof typeof FtDataType];
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Meta sequence redirect that triggers when a field's date part matches a specific date (ignoring time).
|
|
223
|
+
* Used in metadata to define sequence transitions based on date field values (time component ignored).
|
|
224
|
+
* @public
|
|
225
|
+
*/
|
|
226
|
+
export declare class FtDateMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
227
|
+
/** The standard type identifier for date redirects */
|
|
228
|
+
static readonly TYPE: "Date";
|
|
229
|
+
/** Default date value (Unix epoch) */
|
|
230
|
+
static readonly DEFAULT_VALUE: Date;
|
|
231
|
+
private _value;
|
|
232
|
+
constructor();
|
|
233
|
+
/** The date value to match (time component ignored) for triggering the redirect */
|
|
234
|
+
get value(): Date;
|
|
235
|
+
set value(val: Date);
|
|
236
|
+
loadDefaults(): void;
|
|
237
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
238
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Sequence redirect that triggers when a field's date component equals a specific date value (time ignored).
|
|
243
|
+
* @public
|
|
244
|
+
*/
|
|
245
|
+
export declare class FtDateSequenceRedirect extends FtSequenceRedirect {
|
|
246
|
+
static readonly TYPE: "Date";
|
|
247
|
+
private _value;
|
|
248
|
+
constructor(index: number);
|
|
249
|
+
get value(): Date;
|
|
250
|
+
checkTriggered(field: FtField): boolean;
|
|
251
|
+
/** @internal */
|
|
252
|
+
loadMeta(metaSequenceRedirect: FtDateMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Field for DateTime values.
|
|
257
|
+
* @public
|
|
258
|
+
*/
|
|
259
|
+
export declare class FtDateTimeField extends FtGenericField<Date> {
|
|
260
|
+
private static readonly VALUE_TEXT_NULL_TRIMMABLE;
|
|
261
|
+
constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, definition: FtDateTimeFieldDefinition);
|
|
262
|
+
get definition(): FtDateTimeFieldDefinition;
|
|
263
|
+
get format(): string;
|
|
264
|
+
get styles(): number;
|
|
265
|
+
get nullableValue(): Date | null;
|
|
266
|
+
set nullableValue(value: Date | null);
|
|
267
|
+
protected isValueEqual(left: Date, right: Date): boolean;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Field definition for DateTime fields.
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
274
|
+
export declare class FtDateTimeFieldDefinition extends FtGenericFieldDefinition<Date> {
|
|
275
|
+
static readonly AUTO_LEFT_PAD = true;
|
|
276
|
+
protected formatter: FtDateTimeFieldFormatter;
|
|
277
|
+
private _constantValue;
|
|
278
|
+
constructor(index: number);
|
|
279
|
+
get format(): string;
|
|
280
|
+
get styles(): DotNetDateTimeStyles;
|
|
281
|
+
get constantValue(): Date;
|
|
282
|
+
loadMeta(metaField: FtMetaField, myCulture: DotNetLocaleSettings | undefined, myMainHeadingIndex: number): void;
|
|
283
|
+
getValueText(value: Date): string;
|
|
284
|
+
parseValueText(text: string): Date;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Formatter for DateTime fields using .NET-compatible formatting.
|
|
289
|
+
* Implementation delegates to DotNetDateTimeFormatter from dot-net-date-number-formatting package.
|
|
290
|
+
* @public
|
|
291
|
+
*/
|
|
292
|
+
export declare class FtDateTimeFieldFormatter extends FtFieldFormatter {
|
|
293
|
+
private _format;
|
|
294
|
+
private _styles;
|
|
295
|
+
private _formatter;
|
|
296
|
+
constructor();
|
|
297
|
+
get format(): string;
|
|
298
|
+
set format(value: string);
|
|
299
|
+
get styles(): DotNetDateTimeStyles;
|
|
300
|
+
set styles(value: DotNetDateTimeStyles);
|
|
301
|
+
toText(value: Date): string;
|
|
302
|
+
parse(text: string): Date;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* Meta field for Date/Time values.
|
|
307
|
+
* @public
|
|
308
|
+
*/
|
|
309
|
+
export declare class FtDateTimeMetaField extends FtGenericMetaField<Date> {
|
|
310
|
+
static readonly DATA_TYPE: "DateTime";
|
|
311
|
+
static readonly DEFAULT_FORMAT = "yyyyMMdd";
|
|
312
|
+
static readonly DEFAULT_STYLES: 0;
|
|
313
|
+
static readonly DEFAULT_VALUE: Date;
|
|
314
|
+
static readonly DEFAULT_SEQUENCE_REDIRECT_TYPE: "ExactDateTime";
|
|
315
|
+
private _format;
|
|
316
|
+
private _styles;
|
|
317
|
+
constructor(headingCount?: number);
|
|
318
|
+
get format(): string;
|
|
319
|
+
set format(value: string);
|
|
320
|
+
get styles(): DotNetDateTimeStyles;
|
|
321
|
+
set styles(value: DotNetDateTimeStyles);
|
|
322
|
+
static isDateTimeMetaField(field: FtMetaField): field is FtDateTimeMetaField;
|
|
323
|
+
loadDefaults(leaveNameAsIs?: boolean): void;
|
|
324
|
+
createCopy(): FtMetaField;
|
|
325
|
+
protected getDefaultSequenceRedirectType(): FtSequenceRedirectType;
|
|
326
|
+
protected assignFrom(source: FtMetaField): void;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/** @public */
|
|
330
|
+
export declare class FtDateTimeStylesMetaSerialization {
|
|
331
|
+
static allowInnerWhiteMetaValue: string;
|
|
332
|
+
static allowWhiteSpacesMetaValue: string;
|
|
333
|
+
static lowerCaseAllowInnerWhiteMetaValue: string;
|
|
334
|
+
static lowerCaseAllowWhiteSpacesMetaValue: string;
|
|
335
|
+
static serialize(styles: DotNetDateTimeStyles): string | undefined;
|
|
336
|
+
static deserialize(value: unknown, warnings: string[]): DotNetDateTimeStyles;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Field for decimal values.
|
|
341
|
+
* @public
|
|
342
|
+
*/
|
|
343
|
+
export declare class FtDecimalField extends FtGenericField<number> {
|
|
344
|
+
private static readonly VALUE_TEXT_NULL_TRIMMABLE;
|
|
345
|
+
constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, definition: FtDecimalFieldDefinition);
|
|
346
|
+
get definition(): FtDecimalFieldDefinition;
|
|
347
|
+
get format(): string;
|
|
348
|
+
get styles(): number;
|
|
349
|
+
get nullableValue(): number | null;
|
|
350
|
+
set nullableValue(value: number | null);
|
|
351
|
+
protected isValueEqual(left: number, right: number): boolean;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Field definition for decimal fields.
|
|
356
|
+
* @public
|
|
357
|
+
*/
|
|
358
|
+
export declare class FtDecimalFieldDefinition extends FtGenericFieldDefinition<number> {
|
|
359
|
+
static readonly AUTO_LEFT_PAD = true;
|
|
360
|
+
protected formatter: FtDecimalFieldFormatter;
|
|
361
|
+
constructor(index: number);
|
|
362
|
+
get format(): string;
|
|
363
|
+
get styles(): DotNetNumberStyles;
|
|
364
|
+
loadMeta(metaField: FtDecimalMetaField, myCulture: DotNetLocaleSettings | undefined, myMainHeadingIndex: number): void;
|
|
365
|
+
getValueText(value: number): string;
|
|
366
|
+
parseValueText(text: string): number;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Formatter for decimal fields using .NET-compatible formatting.
|
|
371
|
+
* Implementation delegates to DotNetDecimalFormatter from dot-net-date-number-formatting package.
|
|
372
|
+
* @public
|
|
373
|
+
*/
|
|
374
|
+
export declare class FtDecimalFieldFormatter extends FtFieldFormatter {
|
|
375
|
+
private _styles;
|
|
376
|
+
private _format;
|
|
377
|
+
private _formatter;
|
|
378
|
+
get styles(): DotNetNumberStyles;
|
|
379
|
+
set styles(value: DotNetNumberStyles);
|
|
380
|
+
get format(): string;
|
|
381
|
+
set format(value: string);
|
|
382
|
+
toText(value: number): string;
|
|
383
|
+
parse(text: string): number;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Meta field for decimal values.
|
|
388
|
+
* @public
|
|
389
|
+
*/
|
|
390
|
+
export declare class FtDecimalMetaField extends FtGenericMetaField<number> {
|
|
391
|
+
static readonly DATA_TYPE: "Decimal";
|
|
392
|
+
static readonly DEFAULT_FORMAT = "G";
|
|
393
|
+
static readonly DEFAULT_STYLES: number;
|
|
394
|
+
static readonly DEFAULT_VALUE = 0;
|
|
395
|
+
static readonly DEFAULT_SEQUENCE_REDIRECT_TYPE: "ExactDecimal";
|
|
396
|
+
private _format;
|
|
397
|
+
private _styles;
|
|
398
|
+
constructor(headingCount?: number);
|
|
399
|
+
get format(): string;
|
|
400
|
+
set format(value: string);
|
|
401
|
+
get styles(): DotNetNumberStyles;
|
|
402
|
+
set styles(value: DotNetNumberStyles);
|
|
403
|
+
static isDecimalMetaField(field: FtMetaField): field is FtDecimalMetaField;
|
|
404
|
+
loadDefaults(leaveNameAsIs?: boolean): void;
|
|
405
|
+
createCopy(): FtMetaField;
|
|
406
|
+
protected getDefaultSequenceRedirectType(): FtSequenceRedirectType;
|
|
407
|
+
protected assignFrom(source: FtMetaField): void;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Parameter record for declared parameters.
|
|
412
|
+
* @public
|
|
413
|
+
*/
|
|
414
|
+
export declare interface FtDeclaredParameterRec {
|
|
415
|
+
name: string;
|
|
416
|
+
value: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* Container for declared parameters in .ftx file headers.
|
|
421
|
+
* Manages version and meta reference parameters.
|
|
422
|
+
* @public
|
|
423
|
+
*/
|
|
424
|
+
export declare class FtDeclaredParameters {
|
|
425
|
+
private static readonly VERSION_PARAMETER_NAME;
|
|
426
|
+
private static readonly VERSION_PARTS_SEPARATOR;
|
|
427
|
+
private static readonly META_URL_PARAMETER_NAME;
|
|
428
|
+
private static readonly META_FILE_PARAMETER_NAME;
|
|
429
|
+
private static readonly META_EMBEDDED_PARAMETER_NAME;
|
|
430
|
+
private static readonly META_EMBEDDED_PARAMETER_VALUE;
|
|
431
|
+
private _list;
|
|
432
|
+
get count(): number;
|
|
433
|
+
getName(idx: number): string;
|
|
434
|
+
getValue(idx: number): string;
|
|
435
|
+
add(name: string, value: string): void;
|
|
436
|
+
remove(name: string): void;
|
|
437
|
+
clear(): void;
|
|
438
|
+
indexOfName(name: string): number;
|
|
439
|
+
indexOfVersion(): number;
|
|
440
|
+
setVersion(major: number, minor: number, comment?: string): void;
|
|
441
|
+
tryGetVersion(): Result<Version, boolean>;
|
|
442
|
+
getMetaReference(): {
|
|
443
|
+
type: FtMetaReferenceType;
|
|
444
|
+
reference: string;
|
|
445
|
+
};
|
|
446
|
+
setMetaReference(type: FtMetaReferenceType, reference: string): void;
|
|
447
|
+
tryGetVersionRec(): {
|
|
448
|
+
success: boolean;
|
|
449
|
+
rec: FtDeclaredParameterRec;
|
|
450
|
+
};
|
|
451
|
+
getAllRecsExceptVersion(): FtDeclaredParameterRec[];
|
|
452
|
+
private versionToText;
|
|
453
|
+
private parseVersionValue;
|
|
454
|
+
private parseMajorMinorVersionText;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Formatter for declared parameters in .ftx file headers.
|
|
459
|
+
* @public
|
|
460
|
+
*/
|
|
461
|
+
export declare class FtDeclaredParametersFormatter {
|
|
462
|
+
private static readonly NAME_VALUE_SEPARATOR;
|
|
463
|
+
private static readonly QUOTE_CHAR;
|
|
464
|
+
private static readonly DOUBLE_QUOTE_STRING;
|
|
465
|
+
private static readonly SPACE_CHARACTER;
|
|
466
|
+
/**
|
|
467
|
+
* Format the signature line (first declaration line with version).
|
|
468
|
+
*/
|
|
469
|
+
static toSignatureLineText(parameters: FtDeclaredParameters): string;
|
|
470
|
+
/**
|
|
471
|
+
* Format the second declaration line (all parameters except version).
|
|
472
|
+
*/
|
|
473
|
+
static toLine2Text(parameters: FtDeclaredParameters): string;
|
|
474
|
+
/**
|
|
475
|
+
* Convert parameter records to text format.
|
|
476
|
+
*/
|
|
477
|
+
private static toText;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* @public
|
|
482
|
+
*/
|
|
483
|
+
export declare const FtEndOfLineAutoWriteType: {
|
|
484
|
+
readonly CrLf: "CrLf";
|
|
485
|
+
readonly Cr: "Cr";
|
|
486
|
+
readonly Lf: "Lf";
|
|
487
|
+
readonly Local: "Local";
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* @public
|
|
492
|
+
*/
|
|
493
|
+
export declare type FtEndOfLineAutoWriteType = (typeof FtEndOfLineAutoWriteType)[keyof typeof FtEndOfLineAutoWriteType];
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* @public
|
|
497
|
+
*/
|
|
498
|
+
export declare const FtEndOfLineType: {
|
|
499
|
+
readonly Auto: "Auto";
|
|
500
|
+
readonly Char: "Char";
|
|
501
|
+
readonly CrLf: "CrLf";
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @public
|
|
506
|
+
*/
|
|
507
|
+
export declare type FtEndOfLineType = (typeof FtEndOfLineType)[keyof typeof FtEndOfLineType];
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Meta sequence redirect that triggers when a field value exactly matches a specific date-time value.
|
|
511
|
+
* Used in metadata to define sequence transitions based on exact date-time field values (including time component).
|
|
512
|
+
* @public
|
|
513
|
+
*/
|
|
514
|
+
export declare class FtExactDateTimeMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
515
|
+
/** The standard type identifier for exact date-time redirects */
|
|
516
|
+
static readonly TYPE: "ExactDateTime";
|
|
517
|
+
/** Default date-time value (Unix epoch) */
|
|
518
|
+
static readonly DEFAULT_VALUE: Date;
|
|
519
|
+
private _value;
|
|
520
|
+
constructor();
|
|
521
|
+
/** The date-time value to match exactly for triggering the redirect */
|
|
522
|
+
get value(): Date;
|
|
523
|
+
set value(val: Date);
|
|
524
|
+
loadDefaults(): void;
|
|
525
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
526
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Sequence redirect that triggers when a field exactly equals a specific datetime value.
|
|
531
|
+
* @public
|
|
532
|
+
*/
|
|
533
|
+
export declare class FtExactDateTimeSequenceRedirect extends FtSequenceRedirect {
|
|
534
|
+
static readonly TYPE: "ExactDateTime";
|
|
535
|
+
private _value;
|
|
536
|
+
constructor(index: number);
|
|
537
|
+
get value(): Date;
|
|
538
|
+
checkTriggered(field: FtField): boolean;
|
|
539
|
+
/** @internal */
|
|
540
|
+
loadMeta(metaSequenceRedirect: FtExactDateTimeMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Meta sequence redirect that triggers when a field value exactly matches a specific decimal value.
|
|
545
|
+
* Used in metadata to define sequence transitions based on decimal field values.
|
|
546
|
+
* @public
|
|
547
|
+
*/
|
|
548
|
+
export declare class FtExactDecimalMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
549
|
+
/** The standard type identifier for exact decimal redirects */
|
|
550
|
+
static readonly TYPE: "ExactDecimal";
|
|
551
|
+
/** Default decimal value */
|
|
552
|
+
static readonly DEFAULT_VALUE = 0;
|
|
553
|
+
private _value;
|
|
554
|
+
constructor();
|
|
555
|
+
/** The decimal value to match exactly for triggering the redirect */
|
|
556
|
+
get value(): number;
|
|
557
|
+
set value(val: number);
|
|
558
|
+
loadDefaults(): void;
|
|
559
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
560
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Sequence redirect that triggers when a field exactly equals a specific decimal value.
|
|
565
|
+
* @public
|
|
566
|
+
*/
|
|
567
|
+
export declare class FtExactDecimalSequenceRedirect extends FtSequenceRedirect {
|
|
568
|
+
static readonly TYPE: "ExactDecimal";
|
|
569
|
+
private _value;
|
|
570
|
+
constructor(index: number);
|
|
571
|
+
get value(): number;
|
|
572
|
+
checkTriggered(field: FtField): boolean;
|
|
573
|
+
/** @internal */
|
|
574
|
+
loadMeta(metaSequenceRedirect: FtExactDecimalMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Meta sequence redirect that triggers when a field value exactly matches a specific float value.
|
|
579
|
+
* Used in metadata to define sequence transitions based on floating-point field values.
|
|
580
|
+
* @public
|
|
581
|
+
*/
|
|
582
|
+
export declare class FtExactFloatMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
583
|
+
/** The standard type identifier for exact float redirects */
|
|
584
|
+
static readonly TYPE: "ExactFloat";
|
|
585
|
+
/** Default float value */
|
|
586
|
+
static readonly DEFAULT_VALUE = 0;
|
|
587
|
+
private _value;
|
|
588
|
+
constructor();
|
|
589
|
+
/** The float value to match exactly for triggering the redirect */
|
|
590
|
+
get value(): number;
|
|
591
|
+
set value(val: number);
|
|
592
|
+
loadDefaults(): void;
|
|
593
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
594
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* Sequence redirect that triggers when a field exactly equals a specific float (number) value.
|
|
599
|
+
* @public
|
|
600
|
+
*/
|
|
601
|
+
export declare class FtExactFloatSequenceRedirect extends FtSequenceRedirect {
|
|
602
|
+
static readonly TYPE: "ExactFloat";
|
|
603
|
+
private _value;
|
|
604
|
+
constructor(index: number);
|
|
605
|
+
get value(): number;
|
|
606
|
+
checkTriggered(field: FtField): boolean;
|
|
607
|
+
/** @internal */
|
|
608
|
+
loadMeta(metaSequenceRedirect: FtExactFloatMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Meta sequence redirect that triggers when a field value exactly matches a specific integer value.
|
|
613
|
+
* Used in metadata to define sequence transitions based on integer field values.
|
|
614
|
+
* @public
|
|
615
|
+
*/
|
|
616
|
+
export declare class FtExactIntegerMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
617
|
+
/** The standard type identifier for exact integer redirects */
|
|
618
|
+
static readonly TYPE: "ExactInteger";
|
|
619
|
+
/** Default integer value */
|
|
620
|
+
static readonly DEFAULT_VALUE = 0n;
|
|
621
|
+
private _value;
|
|
622
|
+
constructor();
|
|
623
|
+
/** The integer value to match exactly for triggering the redirect */
|
|
624
|
+
get value(): bigint;
|
|
625
|
+
set value(val: bigint);
|
|
626
|
+
loadDefaults(): void;
|
|
627
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
628
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Sequence redirect that triggers when a field exactly equals a specific integer value.
|
|
633
|
+
* @public
|
|
634
|
+
*/
|
|
635
|
+
export declare class FtExactIntegerSequenceRedirect extends FtSequenceRedirect {
|
|
636
|
+
static readonly TYPE: "ExactInteger";
|
|
637
|
+
private _value;
|
|
638
|
+
constructor(index: number);
|
|
639
|
+
get value(): bigint;
|
|
640
|
+
checkTriggered(field: FtField): boolean;
|
|
641
|
+
/** @internal */
|
|
642
|
+
loadMeta(metaSequenceRedirect: FtExactIntegerMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Meta sequence redirect that triggers when a field value exactly matches a specific string (case-sensitive).
|
|
647
|
+
* Used in metadata to define sequence transitions based on exact string field values.
|
|
648
|
+
* @public
|
|
649
|
+
*/
|
|
650
|
+
export declare class FtExactStringMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
651
|
+
/** The standard type identifier for exact string redirects */
|
|
652
|
+
static readonly TYPE: "ExactString";
|
|
653
|
+
/** Default string value */
|
|
654
|
+
static readonly DEFAULT_VALUE = "";
|
|
655
|
+
private _value;
|
|
656
|
+
constructor();
|
|
657
|
+
/** The string value to match exactly for triggering the redirect */
|
|
658
|
+
get value(): string;
|
|
659
|
+
set value(val: string);
|
|
660
|
+
loadDefaults(): void;
|
|
661
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
662
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Sequence redirect that triggers when a field exactly equals a specific string value (case-sensitive).
|
|
667
|
+
* @public
|
|
668
|
+
*/
|
|
669
|
+
export declare class FtExactStringSequenceRedirect extends FtSequenceRedirect {
|
|
670
|
+
static readonly TYPE: "ExactString";
|
|
671
|
+
private _value;
|
|
672
|
+
constructor(index: number);
|
|
673
|
+
get value(): string;
|
|
674
|
+
checkTriggered(field: FtField): boolean;
|
|
675
|
+
/** @internal */
|
|
676
|
+
loadMeta(metaSequenceRedirect: FtExactStringMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* Abstract base class for all field instances.
|
|
681
|
+
* Fields represent runtime field values during reading or writing.
|
|
682
|
+
* @public
|
|
683
|
+
*/
|
|
684
|
+
export declare abstract class FtField {
|
|
685
|
+
static readonly NO_FIELDS_AFFECTED_INDEX = -1;
|
|
686
|
+
protected static readonly IGNORED_SEQUENCE_INVOKATION_DELAY: "AfterSequence";
|
|
687
|
+
sequenceRedirectEvent: FtSequenceRedirectDelegate | undefined;
|
|
688
|
+
protected valueAssigned: boolean;
|
|
689
|
+
protected quoted: boolean;
|
|
690
|
+
private _index;
|
|
691
|
+
private _definition;
|
|
692
|
+
private _sequence;
|
|
693
|
+
private _sequenceItem;
|
|
694
|
+
private _sequenceRedirectList;
|
|
695
|
+
private _sequenceInvokation;
|
|
696
|
+
private _sidelined;
|
|
697
|
+
private _name;
|
|
698
|
+
private _headings;
|
|
699
|
+
private _valueTextNullTrimmable;
|
|
700
|
+
private _valueIsNull;
|
|
701
|
+
private _loadedPosition;
|
|
702
|
+
private _loadedLength;
|
|
703
|
+
private _loadedRawOffset;
|
|
704
|
+
private _loadedRawLength;
|
|
705
|
+
private _loadedValueText;
|
|
706
|
+
protected constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, valueTextNullTrimmable: boolean);
|
|
707
|
+
get definition_(): FtFieldDefinition;
|
|
708
|
+
get index(): number;
|
|
709
|
+
set index(value: number);
|
|
710
|
+
get sidelined(): boolean;
|
|
711
|
+
set sidelined(value: boolean);
|
|
712
|
+
get definition(): FtFieldDefinition;
|
|
713
|
+
get sequence(): FtSequence;
|
|
714
|
+
get sequenceItem(): FtSequenceItem;
|
|
715
|
+
get sequenceRedirectList(): FtSequenceRedirectList;
|
|
716
|
+
get sequenceInvokation(): FtSequenceInvokation;
|
|
717
|
+
get headingCount(): number;
|
|
718
|
+
get headings(): string[];
|
|
719
|
+
get valueAssigned_(): boolean;
|
|
720
|
+
get loadedValueText(): string;
|
|
721
|
+
get dataType(): FtDataType;
|
|
722
|
+
get id(): number | undefined;
|
|
723
|
+
get name(): string;
|
|
724
|
+
get metaHeadings(): string[];
|
|
725
|
+
get mainHeadingIndex(): number;
|
|
726
|
+
get culture(): DotNetLocaleSettings | undefined;
|
|
727
|
+
get fixedWidth(): boolean;
|
|
728
|
+
get width(): number;
|
|
729
|
+
get constant(): boolean;
|
|
730
|
+
get valueQuotedType(): FtQuotedType;
|
|
731
|
+
get valueAlwaysWriteOptionalQuote(): boolean;
|
|
732
|
+
get valueWritePrefixSpace(): boolean;
|
|
733
|
+
get valuePadAlignment(): FtPadAlignment;
|
|
734
|
+
get valuePadCharType(): FtPadCharType;
|
|
735
|
+
get valuePadChar(): string;
|
|
736
|
+
get valueTruncateType(): FtTruncateType;
|
|
737
|
+
get valueTruncateChar(): string;
|
|
738
|
+
get valueEndOfValueChar(): string;
|
|
739
|
+
get valueNullChar(): string;
|
|
740
|
+
get headingConstraint(): FtHeadingConstraint;
|
|
741
|
+
get headingQuotedType(): FtQuotedType;
|
|
742
|
+
get headingAlwaysWriteOptionalQuote(): boolean;
|
|
743
|
+
get headingWritePrefixSpace(): boolean;
|
|
744
|
+
get headingPadAlignment(): FtPadAlignment;
|
|
745
|
+
get headingPadCharType(): FtPadCharType;
|
|
746
|
+
get headingPadChar(): string;
|
|
747
|
+
get headingTruncateType(): FtTruncateType;
|
|
748
|
+
get headingTruncateChar(): string;
|
|
749
|
+
get headingEndOfValueChar(): string;
|
|
750
|
+
get valueType(): string;
|
|
751
|
+
/** @internal */
|
|
752
|
+
get asRedirectString(): string;
|
|
753
|
+
/** @internal */
|
|
754
|
+
get asRedirectBoolean(): boolean;
|
|
755
|
+
/** @internal */
|
|
756
|
+
get asRedirectInteger(): bigint;
|
|
757
|
+
/** @internal */
|
|
758
|
+
get asRedirectFloat(): number;
|
|
759
|
+
/** @internal */
|
|
760
|
+
get asRedirectDateTime(): Date;
|
|
761
|
+
/** @internal */
|
|
762
|
+
get asRedirectDecimal(): number;
|
|
763
|
+
get asValueText(): string | null;
|
|
764
|
+
set asValueText(value: string | null);
|
|
765
|
+
get asObject(): unknown;
|
|
766
|
+
set asObject(value: unknown);
|
|
767
|
+
get asString(): string | null;
|
|
768
|
+
set asString(value: string | null);
|
|
769
|
+
get asBoolean(): boolean;
|
|
770
|
+
set asBoolean(value: boolean);
|
|
771
|
+
get asInteger(): number;
|
|
772
|
+
set asInteger(value: number);
|
|
773
|
+
get asBigInt(): bigint;
|
|
774
|
+
set asBigInt(value: bigint);
|
|
775
|
+
get asFloat(): number;
|
|
776
|
+
set asFloat(value: number);
|
|
777
|
+
get asDateTime(): Date;
|
|
778
|
+
set asDateTime(value: Date);
|
|
779
|
+
get asDecimal(): number;
|
|
780
|
+
set asDecimal(value: number);
|
|
781
|
+
get asNullableBoolean(): boolean | null;
|
|
782
|
+
set asNullableBoolean(value: boolean | null);
|
|
783
|
+
get asNullableInteger(): number | null;
|
|
784
|
+
set asNullableInteger(value: number | null);
|
|
785
|
+
get asNullableBigInt(): bigint | null;
|
|
786
|
+
set asNullableBigInt(value: bigint | null);
|
|
787
|
+
get asNullableFloat(): number | null;
|
|
788
|
+
set asNullableFloat(value: number | null);
|
|
789
|
+
get asNullableDateTime(): Date | null;
|
|
790
|
+
set asNullableDateTime(value: Date | null);
|
|
791
|
+
get asNullableDecimal(): number | null;
|
|
792
|
+
set asNullableDecimal(value: number | null);
|
|
793
|
+
isNull(): boolean;
|
|
794
|
+
setNull(): number;
|
|
795
|
+
loadHeadings(value: string[]): void;
|
|
796
|
+
loadHeading(idx: number, headingText: string): void;
|
|
797
|
+
/** @internal */
|
|
798
|
+
checkNullSequenceRedirect(): number;
|
|
799
|
+
/** @internal */
|
|
800
|
+
resetValue(): void;
|
|
801
|
+
/** @internal */
|
|
802
|
+
loadPosition(position: number, length: number, rawOffset: number, rawLength: number): void;
|
|
803
|
+
/** @internal */
|
|
804
|
+
loadDelimitedValue(valueText: string, quoted: boolean): void;
|
|
805
|
+
/** @internal */
|
|
806
|
+
loadFixedWidthValue(valueText: string): void;
|
|
807
|
+
/** @internal */
|
|
808
|
+
loadNullValue(): void;
|
|
809
|
+
/**
|
|
810
|
+
* Get the field value as text (for writing). Public accessor for protected method.
|
|
811
|
+
* @internal
|
|
812
|
+
*/
|
|
813
|
+
getValueText(): string;
|
|
814
|
+
/**
|
|
815
|
+
* Check if the field value has been assigned. Public accessor for protected property.
|
|
816
|
+
* @internal
|
|
817
|
+
*/
|
|
818
|
+
isValueAssigned(): boolean;
|
|
819
|
+
protected onSequenceRedirect(sequence: FtSequence | undefined, delay: FtSequenceInvokationDelay): number;
|
|
820
|
+
protected clearNonConstantNull(): void;
|
|
821
|
+
private setAsNonNullValueText;
|
|
822
|
+
private setAsValueText;
|
|
823
|
+
private setAsObject;
|
|
824
|
+
private setAsString;
|
|
825
|
+
protected abstract getAsNonNullValueText(): string;
|
|
826
|
+
protected abstract loadNonNullValue(valueText: string): void;
|
|
827
|
+
protected abstract getAsNonNullObject(): unknown;
|
|
828
|
+
protected abstract getAsNonNullString(): string;
|
|
829
|
+
protected abstract getAsBoolean(): boolean;
|
|
830
|
+
protected abstract getAsInteger(): number;
|
|
831
|
+
protected abstract getAsBigInt(): bigint;
|
|
832
|
+
protected abstract getAsFloat(): number;
|
|
833
|
+
protected abstract getAsDateTime(): Date;
|
|
834
|
+
protected abstract getAsDecimal(): number;
|
|
835
|
+
protected abstract setAsNonNullObject(newValue: unknown): void;
|
|
836
|
+
protected abstract setAsNonNullString(newValue: string): void;
|
|
837
|
+
protected abstract setAsBoolean(newValue: boolean): void;
|
|
838
|
+
protected abstract setAsInteger(newValue: number): void;
|
|
839
|
+
protected abstract setAsBigInt(newValue: bigint): void;
|
|
840
|
+
protected abstract setAsFloat(newValue: number): void;
|
|
841
|
+
protected abstract setAsDateTime(newValue: Date): void;
|
|
842
|
+
protected abstract setAsDecimal(newValue: number): void;
|
|
843
|
+
protected abstract getAsRedirectBoolean(): boolean;
|
|
844
|
+
protected abstract getAsRedirectInteger(): bigint;
|
|
845
|
+
protected abstract getAsRedirectFloat(): number;
|
|
846
|
+
protected abstract getAsRedirectDateTime(): Date;
|
|
847
|
+
protected abstract getAsRedirectDecimal(): number;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
/**
|
|
851
|
+
* Abstract base class for all field definitions.
|
|
852
|
+
* Field definitions hold metadata and configuration for fields in fielded text.
|
|
853
|
+
* @public
|
|
854
|
+
*/
|
|
855
|
+
export declare abstract class FtFieldDefinition {
|
|
856
|
+
readonly dataType: FtDataType;
|
|
857
|
+
readonly valueType: string;
|
|
858
|
+
readonly autoLeftPad: boolean;
|
|
859
|
+
protected readonly formatter: FtFieldFormatter;
|
|
860
|
+
private _index;
|
|
861
|
+
private _id;
|
|
862
|
+
private _metaName;
|
|
863
|
+
private _metaHeadings;
|
|
864
|
+
private _mainHeadingIndex;
|
|
865
|
+
private _culture;
|
|
866
|
+
private _fixedWidth;
|
|
867
|
+
private _width;
|
|
868
|
+
private _constant;
|
|
869
|
+
private _null;
|
|
870
|
+
private _valueQuotedType;
|
|
871
|
+
private _valueAlwaysWriteOptionalQuote;
|
|
872
|
+
private _valueWritePrefixSpace;
|
|
873
|
+
private _valuePadAlignment;
|
|
874
|
+
private _valuePadCharType;
|
|
875
|
+
private _valuePadChar;
|
|
876
|
+
private _valueTruncateType;
|
|
877
|
+
private _valueTruncateChar;
|
|
878
|
+
private _valueEndOfValueChar;
|
|
879
|
+
private _valueNullChar;
|
|
880
|
+
private _headingConstraint;
|
|
881
|
+
private _headingQuotedType;
|
|
882
|
+
private _headingAlwaysWriteOptionalQuote;
|
|
883
|
+
private _headingWritePrefixSpace;
|
|
884
|
+
private _headingPadAlignment;
|
|
885
|
+
private _headingPadCharType;
|
|
886
|
+
private _headingPadChar;
|
|
887
|
+
private _headingTruncateType;
|
|
888
|
+
private _headingTruncateChar;
|
|
889
|
+
private _headingEndOfValueChar;
|
|
890
|
+
private _autoPadChar;
|
|
891
|
+
private _headingLeftPad;
|
|
892
|
+
private _valueLeftPad;
|
|
893
|
+
private _fixedWidthNullValueText;
|
|
894
|
+
protected constructor(dataType: FtDataType, valueType: string, formatter: FtFieldFormatter, autoLeftPad: boolean, index: number);
|
|
895
|
+
get index(): number;
|
|
896
|
+
get id(): number | undefined;
|
|
897
|
+
get metaName(): string;
|
|
898
|
+
get metaHeadings(): string[];
|
|
899
|
+
get metaHeadingCount(): number;
|
|
900
|
+
get mainHeadingIndex(): number;
|
|
901
|
+
get culture(): DotNetLocaleSettings | undefined;
|
|
902
|
+
get fixedWidth(): boolean;
|
|
903
|
+
get width(): number;
|
|
904
|
+
get constant(): boolean;
|
|
905
|
+
get null(): boolean;
|
|
906
|
+
get valueQuotedType(): FtQuotedType;
|
|
907
|
+
get valueAlwaysWriteOptionalQuote(): boolean;
|
|
908
|
+
get valueWritePrefixSpace(): boolean;
|
|
909
|
+
get valuePadAlignment(): FtPadAlignment;
|
|
910
|
+
get valuePadCharType(): FtPadCharType;
|
|
911
|
+
get valuePadChar(): string;
|
|
912
|
+
get valueTruncateType(): FtTruncateType;
|
|
913
|
+
get valueTruncateChar(): string;
|
|
914
|
+
get valueEndOfValueChar(): string;
|
|
915
|
+
get valueNullChar(): string;
|
|
916
|
+
get headingConstraint(): FtHeadingConstraint;
|
|
917
|
+
get headingQuotedType(): FtQuotedType;
|
|
918
|
+
get headingAlwaysWriteOptionalQuote(): boolean;
|
|
919
|
+
get headingWritePrefixSpace(): boolean;
|
|
920
|
+
get headingPadAlignment(): FtPadAlignment;
|
|
921
|
+
get headingPadCharType(): FtPadCharType;
|
|
922
|
+
get headingPadChar(): string;
|
|
923
|
+
get headingTruncateType(): FtTruncateType;
|
|
924
|
+
get headingTruncateChar(): string;
|
|
925
|
+
get headingEndOfValueChar(): string;
|
|
926
|
+
get autoPadChar(): string;
|
|
927
|
+
get headingLeftPad(): boolean;
|
|
928
|
+
get valueLeftPad(): boolean;
|
|
929
|
+
get fixedWidthNullValueText(): string;
|
|
930
|
+
/**
|
|
931
|
+
* Load metadata from a meta field.
|
|
932
|
+
* @param metaField - The meta field containing configuration
|
|
933
|
+
* @param myCulture - The culture settings for formatting
|
|
934
|
+
* @param myMainHeadingIndex - Index of the main heading
|
|
935
|
+
*/
|
|
936
|
+
loadMeta(metaField: FtMetaField, myCulture: DotNetLocaleSettings | undefined, myMainHeadingIndex: number): void;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* List of field definitions.
|
|
941
|
+
* @public
|
|
942
|
+
*/
|
|
943
|
+
export declare class FtFieldDefinitionList {
|
|
944
|
+
private _items;
|
|
945
|
+
get count(): number;
|
|
946
|
+
get(index: number): FtFieldDefinition;
|
|
947
|
+
add(definition: FtFieldDefinition): void;
|
|
948
|
+
new(dataType: FtDataType): FtFieldDefinition;
|
|
949
|
+
clear(): void;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Factory for creating field instances based on their definitions.
|
|
954
|
+
* @public
|
|
955
|
+
*/
|
|
956
|
+
export declare class FtFieldFactory {
|
|
957
|
+
static createFieldDefinition(dataType: FtDataType, index: number): FtFieldDefinition;
|
|
958
|
+
static createField(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem): FtField;
|
|
959
|
+
static createMetaField(dataType: FtDataType, headingCount: number): FtMetaField;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Abstract base class for all field formatters.
|
|
964
|
+
* Concrete formatters handle type-specific formatting and parsing.
|
|
965
|
+
* @public
|
|
966
|
+
*/
|
|
967
|
+
export declare abstract class FtFieldFormatter {
|
|
968
|
+
private _culture;
|
|
969
|
+
get culture(): DotNetLocaleSettings | undefined;
|
|
970
|
+
set culture(value: DotNetLocaleSettings | undefined);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* @public
|
|
975
|
+
*/
|
|
976
|
+
export declare interface FtFieldHeadingReadyEventArgs {
|
|
977
|
+
field: FtField;
|
|
978
|
+
lineIndex: number;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* @public
|
|
983
|
+
*/
|
|
984
|
+
declare class FtFieldList {
|
|
985
|
+
private list;
|
|
986
|
+
get count(): number;
|
|
987
|
+
get(index: number): FtField;
|
|
988
|
+
getByName(name: string): FtField | undefined;
|
|
989
|
+
indexOf(field: FtField): number;
|
|
990
|
+
indexOfName(name: string): number;
|
|
991
|
+
indexOfId(id: number): number;
|
|
992
|
+
clear(): void;
|
|
993
|
+
trim(fromIndex: number): void;
|
|
994
|
+
add(field: FtField): void;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
/**
|
|
998
|
+
* @public
|
|
999
|
+
*/
|
|
1000
|
+
export declare interface FtFieldValueReadyEventArgs {
|
|
1001
|
+
field: FtField;
|
|
1002
|
+
recordIndex: number;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Field for float (number) values.
|
|
1007
|
+
* @public
|
|
1008
|
+
*/
|
|
1009
|
+
export declare class FtFloatField extends FtGenericField<number> {
|
|
1010
|
+
private static readonly VALUE_TEXT_NULL_TRIMMABLE;
|
|
1011
|
+
constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, definition: FtFloatFieldDefinition);
|
|
1012
|
+
get definition(): FtFloatFieldDefinition;
|
|
1013
|
+
get format(): string;
|
|
1014
|
+
get styles(): number;
|
|
1015
|
+
get nullableValue(): number | null;
|
|
1016
|
+
set nullableValue(value: number | null);
|
|
1017
|
+
protected isValueEqual(left: number, right: number): boolean;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Field definition for float (number) fields.
|
|
1022
|
+
* @public
|
|
1023
|
+
*/
|
|
1024
|
+
export declare class FtFloatFieldDefinition extends FtGenericFieldDefinition<number> {
|
|
1025
|
+
static readonly AUTO_LEFT_PAD = true;
|
|
1026
|
+
protected formatter: FtFloatFieldFormatter;
|
|
1027
|
+
constructor(index: number);
|
|
1028
|
+
get format(): string;
|
|
1029
|
+
get styles(): number;
|
|
1030
|
+
loadMeta(metaField: FtFloatMetaField, myCulture: DotNetLocaleSettings | undefined, myMainHeadingIndex: number): void;
|
|
1031
|
+
getValueText(value: number): string;
|
|
1032
|
+
parseValueText(text: string): number;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* Formatter for float (number) fields using .NET-compatible formatting.
|
|
1037
|
+
* Implementation delegates to DotNetFloatFormatter from dot-net-date-number-formatting package.
|
|
1038
|
+
* @public
|
|
1039
|
+
*/
|
|
1040
|
+
export declare class FtFloatFieldFormatter extends FtFieldFormatter {
|
|
1041
|
+
private _styles;
|
|
1042
|
+
private _format;
|
|
1043
|
+
private _formatter;
|
|
1044
|
+
get styles(): DotNetNumberStyles;
|
|
1045
|
+
set styles(value: DotNetNumberStyles);
|
|
1046
|
+
get format(): string;
|
|
1047
|
+
set format(value: string);
|
|
1048
|
+
toText(value: number): string;
|
|
1049
|
+
parse(text: string): number;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Meta field for float (number) values.
|
|
1054
|
+
* @public
|
|
1055
|
+
*/
|
|
1056
|
+
export declare class FtFloatMetaField extends FtGenericMetaField<number> {
|
|
1057
|
+
static readonly DATA_TYPE: "Float";
|
|
1058
|
+
static readonly DEFAULT_FORMAT = "G";
|
|
1059
|
+
static readonly DEFAULT_STYLES: number;
|
|
1060
|
+
static readonly DEFAULT_VALUE = 0;
|
|
1061
|
+
static readonly DEFAULT_SEQUENCE_REDIRECT_TYPE: "ExactFloat";
|
|
1062
|
+
private _format;
|
|
1063
|
+
private _styles;
|
|
1064
|
+
constructor(headingCount?: number);
|
|
1065
|
+
get format(): string;
|
|
1066
|
+
set format(value: string);
|
|
1067
|
+
get styles(): DotNetNumberStyles;
|
|
1068
|
+
set styles(value: DotNetNumberStyles);
|
|
1069
|
+
static isFloatMetaField(field: FtMetaField): field is FtFloatMetaField;
|
|
1070
|
+
loadDefaults(leaveNameAsIs?: boolean): void;
|
|
1071
|
+
createCopy(): FtMetaField;
|
|
1072
|
+
protected getDefaultSequenceRedirectType(): FtSequenceRedirectType;
|
|
1073
|
+
protected assignFrom(source: FtMetaField): void;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
/**
|
|
1077
|
+
* Generic base class for typed fields.
|
|
1078
|
+
* Provides type-safe value access and implements conversion methods.
|
|
1079
|
+
* @public
|
|
1080
|
+
*/
|
|
1081
|
+
export declare abstract class FtGenericField<T> extends FtField {
|
|
1082
|
+
private _value;
|
|
1083
|
+
protected constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, valueTextNullTrimmable: boolean, definition: FtGenericFieldDefinition<T>);
|
|
1084
|
+
get definition_(): FtGenericFieldDefinition<T>;
|
|
1085
|
+
get value(): T;
|
|
1086
|
+
set value(val: T);
|
|
1087
|
+
setValue(val: T): number;
|
|
1088
|
+
protected getAsNonNullValueText(): string;
|
|
1089
|
+
protected getAsNonNullObject(): unknown;
|
|
1090
|
+
protected getAsNonNullString(): string;
|
|
1091
|
+
protected getAsBoolean(): boolean;
|
|
1092
|
+
protected getAsInteger(): number;
|
|
1093
|
+
protected getAsBigInt(): bigint;
|
|
1094
|
+
protected getAsFloat(): number;
|
|
1095
|
+
protected getAsDateTime(): Date;
|
|
1096
|
+
protected getAsDecimal(): number;
|
|
1097
|
+
protected setAsNonNullObject(newValue: unknown): void;
|
|
1098
|
+
protected setAsNonNullString(newValue: string): void;
|
|
1099
|
+
protected setAsBoolean(newValue: boolean): void;
|
|
1100
|
+
protected setAsInteger(newValue: number): void;
|
|
1101
|
+
protected setAsBigInt(newValue: bigint): void;
|
|
1102
|
+
protected setAsFloat(newValue: number): void;
|
|
1103
|
+
protected setAsDateTime(newValue: Date): void;
|
|
1104
|
+
protected setAsDecimal(newValue: number): void;
|
|
1105
|
+
protected getAsRedirectBoolean(): boolean;
|
|
1106
|
+
protected getAsRedirectInteger(): bigint;
|
|
1107
|
+
protected getAsRedirectFloat(): number;
|
|
1108
|
+
protected getAsRedirectDateTime(): Date;
|
|
1109
|
+
protected getAsRedirectDecimal(): number;
|
|
1110
|
+
protected loadNonNullValue(valueText: string): void;
|
|
1111
|
+
private getValueOrThrowNull;
|
|
1112
|
+
private checkValueSequenceRedirect;
|
|
1113
|
+
/**
|
|
1114
|
+
* Check if two values are equal.
|
|
1115
|
+
* @param left - Left value
|
|
1116
|
+
* @param right - Right value
|
|
1117
|
+
* @returns true if values are equal
|
|
1118
|
+
*/
|
|
1119
|
+
protected abstract isValueEqual(left: T, right: T): boolean;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
/**
|
|
1123
|
+
* Generic base class for field definitions with typed values.
|
|
1124
|
+
* Extends FtFieldDefinition to add type-specific value handling.
|
|
1125
|
+
* @public
|
|
1126
|
+
*/
|
|
1127
|
+
export declare abstract class FtGenericFieldDefinition<T> extends FtFieldDefinition {
|
|
1128
|
+
private _value;
|
|
1129
|
+
get value(): T;
|
|
1130
|
+
/**
|
|
1131
|
+
* Load metadata from a meta field.
|
|
1132
|
+
* @param metaField - The meta field containing configuration
|
|
1133
|
+
* @param myCulture - The culture settings for formatting
|
|
1134
|
+
* @param myMainHeadingIndex - Index of the main heading
|
|
1135
|
+
*/
|
|
1136
|
+
loadMeta(metaField: FtMetaField, myCulture: DotNetLocaleSettings | undefined, myMainHeadingIndex: number): void;
|
|
1137
|
+
/**
|
|
1138
|
+
* Convert a typed value to its text representation.
|
|
1139
|
+
* @param value - The value to convert
|
|
1140
|
+
* @returns The text representation
|
|
1141
|
+
*/
|
|
1142
|
+
abstract getValueText(value: T): string;
|
|
1143
|
+
/**
|
|
1144
|
+
* Parse text into a typed value.
|
|
1145
|
+
* @param text - The text to parse
|
|
1146
|
+
* @returns The parsed value
|
|
1147
|
+
*/
|
|
1148
|
+
abstract parseValueText(text: string): T;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Generic base class for typed meta fields.
|
|
1153
|
+
* Provides value storage and management for fields with a specific value type.
|
|
1154
|
+
* @public
|
|
1155
|
+
*/
|
|
1156
|
+
export declare abstract class FtGenericMetaField<T> extends FtMetaField {
|
|
1157
|
+
private _defaultValue;
|
|
1158
|
+
private _value;
|
|
1159
|
+
protected constructor(dataType: FtDataType, headingCount: number, defaultValue: T);
|
|
1160
|
+
get value(): T;
|
|
1161
|
+
set value(val: T);
|
|
1162
|
+
loadDefaults(leaveNameAsIs?: boolean): void;
|
|
1163
|
+
protected assignFrom(source: FtMetaField): void;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* @public
|
|
1168
|
+
*/
|
|
1169
|
+
export declare const FtHeadingConstraint: {
|
|
1170
|
+
readonly None: "None";
|
|
1171
|
+
readonly AllConstant: "AllConstant";
|
|
1172
|
+
readonly MainConstant: "MainConstant";
|
|
1173
|
+
readonly NameConstant: "NameConstant";
|
|
1174
|
+
readonly NameIsMain: "NameIsMain";
|
|
1175
|
+
};
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* @public
|
|
1179
|
+
*/
|
|
1180
|
+
export declare type FtHeadingConstraint = (typeof FtHeadingConstraint)[keyof typeof FtHeadingConstraint];
|
|
1181
|
+
|
|
1182
|
+
/**
|
|
1183
|
+
* @public
|
|
1184
|
+
*/
|
|
1185
|
+
export declare interface FtHeadingLineFinishedEventArgs {
|
|
1186
|
+
lineIndex: number;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* @public
|
|
1191
|
+
*/
|
|
1192
|
+
export declare interface FtHeadingLineStartedEventArgs {
|
|
1193
|
+
lineIndex: number;
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* Field for integer (bigint) values.
|
|
1198
|
+
* @public
|
|
1199
|
+
*/
|
|
1200
|
+
export declare class FtIntegerField extends FtGenericField<bigint> {
|
|
1201
|
+
private static readonly VALUE_TEXT_NULL_TRIMMABLE;
|
|
1202
|
+
constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, definition: FtIntegerFieldDefinition);
|
|
1203
|
+
get definition(): FtIntegerFieldDefinition;
|
|
1204
|
+
get format(): string;
|
|
1205
|
+
get styles(): number;
|
|
1206
|
+
get nullableValue(): bigint | null;
|
|
1207
|
+
set nullableValue(value: bigint | null);
|
|
1208
|
+
protected isValueEqual(left: bigint, right: bigint): boolean;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
/**
|
|
1212
|
+
* Field definition for integer (bigint) fields.
|
|
1213
|
+
* In TypeScript we use bigint for precision but also support number.
|
|
1214
|
+
* @public
|
|
1215
|
+
*/
|
|
1216
|
+
export declare class FtIntegerFieldDefinition extends FtGenericFieldDefinition<bigint> {
|
|
1217
|
+
static readonly AUTO_LEFT_PAD = true;
|
|
1218
|
+
protected formatter: FtIntegerFieldFormatter;
|
|
1219
|
+
constructor(index: number);
|
|
1220
|
+
get format(): string;
|
|
1221
|
+
get styles(): number;
|
|
1222
|
+
loadMeta(metaField: FtIntegerMetaField, myCulture: DotNetLocaleSettings | undefined, myMainHeadingIndex: number): void;
|
|
1223
|
+
getValueText(value: bigint): string;
|
|
1224
|
+
parseValueText(text: string): bigint;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Formatter for integer (long) fields using .NET-compatible formatting.
|
|
1229
|
+
* Implementation delegates to DotNetIntegerFormatter from dot-net-date-number-formatting package.
|
|
1230
|
+
* @public
|
|
1231
|
+
*/
|
|
1232
|
+
export declare class FtIntegerFieldFormatter extends FtFieldFormatter {
|
|
1233
|
+
private _styles;
|
|
1234
|
+
private _format;
|
|
1235
|
+
private _formatter;
|
|
1236
|
+
get styles(): DotNetNumberStyles;
|
|
1237
|
+
set styles(value: DotNetNumberStyles);
|
|
1238
|
+
get format(): string;
|
|
1239
|
+
set format(value: string);
|
|
1240
|
+
toText(value: bigint | number): string;
|
|
1241
|
+
parse(text: string): bigint;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
/**
|
|
1245
|
+
* Meta field for integer (bigint) values.
|
|
1246
|
+
* @public
|
|
1247
|
+
*/
|
|
1248
|
+
export declare class FtIntegerMetaField extends FtGenericMetaField<bigint> {
|
|
1249
|
+
static readonly DATA_TYPE: "Integer";
|
|
1250
|
+
static readonly DEFAULT_FORMAT = "G";
|
|
1251
|
+
static readonly DEFAULT_STYLES: number;
|
|
1252
|
+
static readonly DEFAULT_VALUE = 0n;
|
|
1253
|
+
static readonly DEFAULT_SEQUENCE_REDIRECT_TYPE: "ExactInteger";
|
|
1254
|
+
private _format;
|
|
1255
|
+
private _styles;
|
|
1256
|
+
constructor(headingCount?: number);
|
|
1257
|
+
get format(): string;
|
|
1258
|
+
set format(value: string);
|
|
1259
|
+
get styles(): DotNetNumberStyles;
|
|
1260
|
+
set styles(value: DotNetNumberStyles);
|
|
1261
|
+
static isIntegerMetaField(field: FtMetaField): field is FtIntegerMetaField;
|
|
1262
|
+
loadDefaults(leaveNameAsIs?: boolean): void;
|
|
1263
|
+
createCopy(): FtMetaField;
|
|
1264
|
+
protected getDefaultSequenceRedirectType(): FtSequenceRedirectType;
|
|
1265
|
+
protected assignFrom(source: FtMetaField): void;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Serializes and deserializes FtMeta to/from JSON format.
|
|
1270
|
+
* This provides a simpler alternative to XML serialization.
|
|
1271
|
+
* @public
|
|
1272
|
+
*/
|
|
1273
|
+
export declare class FtJsonMetaSerialization {
|
|
1274
|
+
/**
|
|
1275
|
+
* Serialize an FtMeta object to JSON string.
|
|
1276
|
+
*/
|
|
1277
|
+
serialize(meta: FtMeta, _options?: FtMetaSerializerOptions): string;
|
|
1278
|
+
/**
|
|
1279
|
+
* Deserialize JSON string to an FtMeta object.
|
|
1280
|
+
*/
|
|
1281
|
+
deserialize(json: string, _warnings?: string[]): FtMeta;
|
|
1282
|
+
private serializeField;
|
|
1283
|
+
private deserializeFieldProperties;
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/** @public */
|
|
1287
|
+
export declare namespace FtJsonMetaSerialization {
|
|
1288
|
+
export function serialize(meta: FtMeta, options?: FtMetaSerializerOptions): string;
|
|
1289
|
+
export function deserialize(json: string, warnings?: string[]): FtMeta;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* @public
|
|
1294
|
+
*/
|
|
1295
|
+
export declare const FtLastLineEndedType: {
|
|
1296
|
+
readonly Never: "Never";
|
|
1297
|
+
readonly Always: "Always";
|
|
1298
|
+
readonly Optional: "Optional";
|
|
1299
|
+
};
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* @public
|
|
1303
|
+
*/
|
|
1304
|
+
export declare type FtLastLineEndedType = (typeof FtLastLineEndedType)[keyof typeof FtLastLineEndedType];
|
|
1305
|
+
|
|
1306
|
+
/**
|
|
1307
|
+
* @public
|
|
1308
|
+
*/
|
|
1309
|
+
export declare const FtLineType: {
|
|
1310
|
+
readonly Comment: "Comment";
|
|
1311
|
+
readonly Signature: "Signature";
|
|
1312
|
+
readonly Declaration2: "Declaration2";
|
|
1313
|
+
readonly EmbeddedMeta: "EmbeddedMeta";
|
|
1314
|
+
readonly Heading: "Heading";
|
|
1315
|
+
readonly Blank: "Blank";
|
|
1316
|
+
readonly Record: "Record";
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
/**
|
|
1320
|
+
* @public
|
|
1321
|
+
*/
|
|
1322
|
+
export declare type FtLineType = (typeof FtLineType)[keyof typeof FtLineType];
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* @public
|
|
1326
|
+
*/
|
|
1327
|
+
export declare class FtMeta {
|
|
1328
|
+
static readonly DefaultCultureName = "";
|
|
1329
|
+
static readonly DefaultEndOfLineType: "Auto";
|
|
1330
|
+
static readonly DefaultEndOfLineChar = ";";
|
|
1331
|
+
static readonly DefaultEndOfLineAutoWriteType: "Local";
|
|
1332
|
+
static readonly DefaultLastLineEndedType: "Optional";
|
|
1333
|
+
static readonly DefaultQuoteChar = "\"";
|
|
1334
|
+
static readonly DefaultDelimiterChar = ",";
|
|
1335
|
+
static readonly DefaultLineCommentChar = "\u0004";
|
|
1336
|
+
static readonly DefaultAllowEndOfLineCharInQuotes = true;
|
|
1337
|
+
static readonly DefaultIgnoreBlankLines = true;
|
|
1338
|
+
static readonly DefaultIgnoreExtraChars = true;
|
|
1339
|
+
static readonly DefaultAllowIncompleteRecords = false;
|
|
1340
|
+
static readonly DefaultStuffedEmbeddedQuotes = true;
|
|
1341
|
+
static readonly DefaultSubstitutionsEnabled = false;
|
|
1342
|
+
static readonly DefaultSubstitutionChar = "\\";
|
|
1343
|
+
static readonly DefaultHeadingLineCount = 0;
|
|
1344
|
+
static readonly DefaultMainHeadingLineIndex = 0;
|
|
1345
|
+
static readonly DefaultHeadingQuotedType: "Optional";
|
|
1346
|
+
static readonly DefaultHeadingAlwaysWriteOptionalQuote = false;
|
|
1347
|
+
static readonly DefaultHeadingWritePrefixSpace = false;
|
|
1348
|
+
static readonly DefaultHeadingConstraint: "None";
|
|
1349
|
+
static readonly DefaultHeadingPadAlignment: "Auto";
|
|
1350
|
+
static readonly DefaultHeadingPadCharType: "EndOfValue";
|
|
1351
|
+
static readonly DefaultHeadingPadChar = " ";
|
|
1352
|
+
static readonly DefaultHeadingTruncateType: "Right";
|
|
1353
|
+
static readonly DefaultHeadingTruncateChar = "#";
|
|
1354
|
+
static readonly DefaultHeadingEndOfValueChar = "\u0003";
|
|
1355
|
+
culture: DotNetLocaleSettings;
|
|
1356
|
+
endOfLineType: FtEndOfLineType;
|
|
1357
|
+
endOfLineChar: string;
|
|
1358
|
+
endOfLineAutoWriteType: FtEndOfLineAutoWriteType;
|
|
1359
|
+
lastLineEndedType: FtLastLineEndedType;
|
|
1360
|
+
quoteChar: string;
|
|
1361
|
+
delimiterChar: string;
|
|
1362
|
+
lineCommentChar: string;
|
|
1363
|
+
allowEndOfLineCharInQuotes: boolean;
|
|
1364
|
+
ignoreBlankLines: boolean;
|
|
1365
|
+
ignoreExtraChars: boolean;
|
|
1366
|
+
allowIncompleteRecords: boolean;
|
|
1367
|
+
stuffedEmbeddedQuotes: boolean;
|
|
1368
|
+
substitutionsEnabled: boolean;
|
|
1369
|
+
substitutionChar: string;
|
|
1370
|
+
mainHeadingLineIndex: number;
|
|
1371
|
+
headingConstraint: FtHeadingConstraint;
|
|
1372
|
+
headingQuotedType: FtQuotedType;
|
|
1373
|
+
headingAlwaysWriteOptionalQuote: boolean;
|
|
1374
|
+
headingWritePrefixSpace: boolean;
|
|
1375
|
+
headingPadAlignment: FtPadAlignment;
|
|
1376
|
+
headingPadCharType: FtPadCharType;
|
|
1377
|
+
headingPadChar: string;
|
|
1378
|
+
headingTruncateType: FtTruncateType;
|
|
1379
|
+
headingTruncateChar: string;
|
|
1380
|
+
headingEndOfValueChar: string;
|
|
1381
|
+
private _fieldList;
|
|
1382
|
+
private _sequenceList;
|
|
1383
|
+
private _substitutionList;
|
|
1384
|
+
private _headingLineCount;
|
|
1385
|
+
constructor();
|
|
1386
|
+
get fieldList(): FtMetaFieldList;
|
|
1387
|
+
get sequenceList(): FtMetaSequenceList;
|
|
1388
|
+
get substitutionList(): FtMetaSubstitutionList;
|
|
1389
|
+
get headingLineCount(): number;
|
|
1390
|
+
set headingLineCount(value: number);
|
|
1391
|
+
static create(): FtMeta;
|
|
1392
|
+
reset(): void;
|
|
1393
|
+
createCopy(): FtMeta;
|
|
1394
|
+
assign(source: FtMeta): void;
|
|
1395
|
+
validate(): {
|
|
1396
|
+
valid: boolean;
|
|
1397
|
+
errorMessage: string;
|
|
1398
|
+
};
|
|
1399
|
+
private handleFieldListBeforeRemove;
|
|
1400
|
+
private handleFieldListBeforeClear;
|
|
1401
|
+
private validateEndOfLineTypeChar;
|
|
1402
|
+
private endOfLineTypeCharToString;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* Base constructor class for creating FtMeta instances.
|
|
1407
|
+
* Can be extended to provide custom meta creation logic.
|
|
1408
|
+
* @public
|
|
1409
|
+
*/
|
|
1410
|
+
export declare class FtMetaConstructor {
|
|
1411
|
+
/**
|
|
1412
|
+
* Create a new FtMeta instance.
|
|
1413
|
+
* Override this method in derived classes to provide custom initialization.
|
|
1414
|
+
*/
|
|
1415
|
+
createMeta(): FtMeta;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* @public
|
|
1420
|
+
*/
|
|
1421
|
+
export declare namespace FtMetaDefaults {
|
|
1422
|
+
export namespace Root {
|
|
1423
|
+
const CultureName = "";
|
|
1424
|
+
const EndOfLineType: "Auto";
|
|
1425
|
+
const EndOfLineChar = ";";
|
|
1426
|
+
const EndOfLineAutoWriteType: "Local";
|
|
1427
|
+
const LastLineEndedType: "Optional";
|
|
1428
|
+
const QuoteChar = "\"";
|
|
1429
|
+
const DelimiterChar = ",";
|
|
1430
|
+
const LineCommentChar = "\u0004";
|
|
1431
|
+
const AllowEndOfLineCharInQuotes = true;
|
|
1432
|
+
const IgnoreBlankLines = true;
|
|
1433
|
+
const IgnoreExtraChars = true;
|
|
1434
|
+
const AllowIncompleteRecords = false;
|
|
1435
|
+
const StuffedEmbeddedQuotes = true;
|
|
1436
|
+
const SubstitutionsEnabled = false;
|
|
1437
|
+
const SubstitutionChar = "\\";
|
|
1438
|
+
const HeadingLineCount = 0;
|
|
1439
|
+
const MainHeadingLineIndex = 0;
|
|
1440
|
+
const HeadingConstraint: "None";
|
|
1441
|
+
const HeadingQuotedType: "Optional";
|
|
1442
|
+
const HeadingAlwaysWriteOptionalQuote = false;
|
|
1443
|
+
const HeadingWritePrefixSpace = false;
|
|
1444
|
+
const HeadingPadAlignment: "Auto";
|
|
1445
|
+
const HeadingPadCharType: "EndOfValue";
|
|
1446
|
+
const HeadingPadChar = " ";
|
|
1447
|
+
const HeadingTruncateType: "Right";
|
|
1448
|
+
const HeadingTruncateChar = "#";
|
|
1449
|
+
const HeadingEndOfValueChar = "\u0003";
|
|
1450
|
+
}
|
|
1451
|
+
export namespace Field {
|
|
1452
|
+
const Id = 0;
|
|
1453
|
+
const Name = "";
|
|
1454
|
+
const DataType: "String";
|
|
1455
|
+
const FixedWidth = false;
|
|
1456
|
+
const Width = 1;
|
|
1457
|
+
const Constant = false;
|
|
1458
|
+
const Null = false;
|
|
1459
|
+
const ValueQuotedType: "Optional";
|
|
1460
|
+
const ValueAlwaysWriteOptionalQuote = false;
|
|
1461
|
+
const ValueWritePrefixSpace = false;
|
|
1462
|
+
const ValuePadAlignment: "Auto";
|
|
1463
|
+
const ValuePadCharType: "EndOfValue";
|
|
1464
|
+
const ValuePadChar = " ";
|
|
1465
|
+
const ValueTruncateType: "Exception";
|
|
1466
|
+
const ValueTruncateChar = "#";
|
|
1467
|
+
const ValueEndOfValueChar = "\u0003";
|
|
1468
|
+
const ValueNullChar = "*";
|
|
1469
|
+
export namespace RootOverriding {
|
|
1470
|
+
const HeadingConstraint: "None";
|
|
1471
|
+
const HeadingQuotedType: "Optional";
|
|
1472
|
+
const HeadingAlwaysWriteOptionalQuote = false;
|
|
1473
|
+
const HeadingWritePrefixSpace = false;
|
|
1474
|
+
const HeadingPadAlignment: "Auto";
|
|
1475
|
+
const HeadingPadCharType: "EndOfValue";
|
|
1476
|
+
const HeadingPadChar = " ";
|
|
1477
|
+
const HeadingTruncateType: "Right";
|
|
1478
|
+
const HeadingTruncateChar = "#";
|
|
1479
|
+
const HeadingEndOfValueChar = "\u0003";
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
export namespace StringField {
|
|
1483
|
+
const Value = "";
|
|
1484
|
+
const SequenceRedirectType: "ExactString";
|
|
1485
|
+
}
|
|
1486
|
+
export namespace BooleanField {
|
|
1487
|
+
const FalseText = "False";
|
|
1488
|
+
const TrueText = "True";
|
|
1489
|
+
const Styles: number;
|
|
1490
|
+
const Value = false;
|
|
1491
|
+
const SequenceRedirectType: "Boolean";
|
|
1492
|
+
}
|
|
1493
|
+
export namespace IntegerField {
|
|
1494
|
+
const Styles: number;
|
|
1495
|
+
const Format = "G";
|
|
1496
|
+
const Value = 0n;
|
|
1497
|
+
const SequenceRedirectType: "ExactInteger";
|
|
1498
|
+
}
|
|
1499
|
+
export namespace FloatField {
|
|
1500
|
+
const Styles: number;
|
|
1501
|
+
const Format = "G";
|
|
1502
|
+
const Value = 0;
|
|
1503
|
+
const SequenceRedirectType: "ExactFloat";
|
|
1504
|
+
}
|
|
1505
|
+
export namespace DecimalField {
|
|
1506
|
+
const Styles: number;
|
|
1507
|
+
const Format = "G";
|
|
1508
|
+
const Value = 0;
|
|
1509
|
+
const SequenceRedirectType: "ExactDecimal";
|
|
1510
|
+
}
|
|
1511
|
+
export namespace DateTimeField {
|
|
1512
|
+
const Styles: 0;
|
|
1513
|
+
const Format = "yyyyMMdd";
|
|
1514
|
+
const Value: Date;
|
|
1515
|
+
const SequenceRedirectType: "ExactDateTime";
|
|
1516
|
+
const DateFormat = "yyyyMMdd";
|
|
1517
|
+
const DateFormatLength: number;
|
|
1518
|
+
const TimeFormat = "HHmmss";
|
|
1519
|
+
const TimeFormatLength: number;
|
|
1520
|
+
const DateTimeFormat: string;
|
|
1521
|
+
const DateTimeFormatLength: number;
|
|
1522
|
+
const FractionFormat = "fffffff";
|
|
1523
|
+
const MaxFractionLength: number;
|
|
1524
|
+
const TimeAndFractionSeparatorChar = ".";
|
|
1525
|
+
const TimeWithFractionFormat: string;
|
|
1526
|
+
const DateTimeWithFractionFormat: string;
|
|
1527
|
+
}
|
|
1528
|
+
export namespace Substitution {
|
|
1529
|
+
const Token = "\\";
|
|
1530
|
+
const Type: "String";
|
|
1531
|
+
}
|
|
1532
|
+
export namespace Sequence {
|
|
1533
|
+
const Root = false;
|
|
1534
|
+
}
|
|
1535
|
+
export namespace SequenceRedirect {
|
|
1536
|
+
const InvokationDelay: "AfterField";
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* @public
|
|
1542
|
+
*/
|
|
1543
|
+
export declare const FtMetaElementType: {
|
|
1544
|
+
readonly FieldedText: "FieldedText";
|
|
1545
|
+
readonly Substitution: "Substitution";
|
|
1546
|
+
readonly Field: "Field";
|
|
1547
|
+
readonly Sequence: "Sequence";
|
|
1548
|
+
readonly SequenceItem: "SequenceItem";
|
|
1549
|
+
readonly SequenceRedirect: "SequenceRedirect";
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* @public
|
|
1554
|
+
*/
|
|
1555
|
+
export declare type FtMetaElementType = (typeof FtMetaElementType)[keyof typeof FtMetaElementType];
|
|
1556
|
+
|
|
1557
|
+
/**
|
|
1558
|
+
* Factory for creating FtMeta instances.
|
|
1559
|
+
* Provides a global constructor that can be replaced to customize meta creation.
|
|
1560
|
+
* @public
|
|
1561
|
+
*/
|
|
1562
|
+
export declare class FtMetaFactory {
|
|
1563
|
+
private static _constructor;
|
|
1564
|
+
/**
|
|
1565
|
+
* Get the current meta constructor.
|
|
1566
|
+
*/
|
|
1567
|
+
static getConstructor(): FtMetaConstructor;
|
|
1568
|
+
/**
|
|
1569
|
+
* Set a custom meta constructor.
|
|
1570
|
+
* Use this to provide custom initialization logic for all meta instances.
|
|
1571
|
+
*/
|
|
1572
|
+
static setConstructor(value: FtMetaConstructor): void;
|
|
1573
|
+
/**
|
|
1574
|
+
* Create a new FtMeta instance using the current constructor.
|
|
1575
|
+
*/
|
|
1576
|
+
static createMeta(): FtMeta;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
/**
|
|
1580
|
+
* Abstract base class for meta field definitions.
|
|
1581
|
+
* Meta fields define the structure and formatting of fields in a fielded text document.
|
|
1582
|
+
* @public
|
|
1583
|
+
*/
|
|
1584
|
+
export declare abstract class FtMetaField {
|
|
1585
|
+
onDefaultHeadingConstraintRequired: (() => FtHeadingConstraint) | undefined;
|
|
1586
|
+
onDefaultHeadingQuotedTypeRequired: (() => FtQuotedType) | undefined;
|
|
1587
|
+
onDefaultHeadingAlwaysWriteOptionalQuoteRequired: (() => boolean) | undefined;
|
|
1588
|
+
onDefaultHeadingWritePrefixSpaceRequired: (() => boolean) | undefined;
|
|
1589
|
+
onDefaultHeadingPadAlignmentRequired: (() => FtPadAlignment) | undefined;
|
|
1590
|
+
onDefaultHeadingPadCharTypeRequired: (() => FtPadCharType) | undefined;
|
|
1591
|
+
onDefaultHeadingPadCharRequired: (() => string) | undefined;
|
|
1592
|
+
onDefaultHeadingTruncateTypeRequired: (() => FtTruncateType) | undefined;
|
|
1593
|
+
onDefaultHeadingTruncateCharRequired: (() => string) | undefined;
|
|
1594
|
+
onDefaultHeadingEndOfValueCharRequired: (() => string) | undefined;
|
|
1595
|
+
private _index;
|
|
1596
|
+
private _dataType;
|
|
1597
|
+
private _id;
|
|
1598
|
+
private _name;
|
|
1599
|
+
private _headings;
|
|
1600
|
+
private _fixedWidth;
|
|
1601
|
+
private _width;
|
|
1602
|
+
private _constant;
|
|
1603
|
+
private _null;
|
|
1604
|
+
private _valueQuotedType;
|
|
1605
|
+
private _valueAlwaysWriteOptionalQuote;
|
|
1606
|
+
private _valueWritePrefixSpace;
|
|
1607
|
+
private _valuePadAlignment;
|
|
1608
|
+
private _valuePadCharType;
|
|
1609
|
+
private _valuePadChar;
|
|
1610
|
+
private _valueTruncateType;
|
|
1611
|
+
private _valueTruncateChar;
|
|
1612
|
+
private _valueEndOfValueChar;
|
|
1613
|
+
private _valueNullChar;
|
|
1614
|
+
private _headingConstraint;
|
|
1615
|
+
private _headingQuotedType;
|
|
1616
|
+
private _headingAlwaysWriteOptionalQuote;
|
|
1617
|
+
private _headingWritePrefixSpace;
|
|
1618
|
+
private _headingPadAlignment;
|
|
1619
|
+
private _headingPadCharType;
|
|
1620
|
+
private _headingPadChar;
|
|
1621
|
+
private _headingTruncateType;
|
|
1622
|
+
private _headingTruncateChar;
|
|
1623
|
+
private _headingEndOfValueChar;
|
|
1624
|
+
protected constructor(dataType: FtDataType, headingCount: number);
|
|
1625
|
+
get index(): number;
|
|
1626
|
+
set index(value: number);
|
|
1627
|
+
get dataType(): FtDataType;
|
|
1628
|
+
set dataType(value: FtDataType);
|
|
1629
|
+
get id(): number | undefined;
|
|
1630
|
+
set id(value: number | undefined);
|
|
1631
|
+
get name(): string;
|
|
1632
|
+
set name(value: string);
|
|
1633
|
+
get headings(): string[];
|
|
1634
|
+
set headings(value: string[]);
|
|
1635
|
+
get fixedWidth(): boolean;
|
|
1636
|
+
set fixedWidth(value: boolean);
|
|
1637
|
+
get width(): number;
|
|
1638
|
+
set width(value: number);
|
|
1639
|
+
get constant(): boolean;
|
|
1640
|
+
set constant(value: boolean);
|
|
1641
|
+
get null(): boolean;
|
|
1642
|
+
set null(value: boolean);
|
|
1643
|
+
get valueQuotedType(): FtQuotedType;
|
|
1644
|
+
set valueQuotedType(value: FtQuotedType);
|
|
1645
|
+
get valueAlwaysWriteOptionalQuote(): boolean;
|
|
1646
|
+
set valueAlwaysWriteOptionalQuote(value: boolean);
|
|
1647
|
+
get valueWritePrefixSpace(): boolean;
|
|
1648
|
+
set valueWritePrefixSpace(value: boolean);
|
|
1649
|
+
get valuePadAlignment(): FtPadAlignment;
|
|
1650
|
+
set valuePadAlignment(value: FtPadAlignment);
|
|
1651
|
+
get valuePadCharType(): FtPadCharType;
|
|
1652
|
+
set valuePadCharType(value: FtPadCharType);
|
|
1653
|
+
get valuePadChar(): string;
|
|
1654
|
+
set valuePadChar(value: string);
|
|
1655
|
+
get valueTruncateType(): FtTruncateType;
|
|
1656
|
+
set valueTruncateType(value: FtTruncateType);
|
|
1657
|
+
get valueTruncateChar(): string;
|
|
1658
|
+
set valueTruncateChar(value: string);
|
|
1659
|
+
get valueEndOfValueChar(): string;
|
|
1660
|
+
set valueEndOfValueChar(value: string);
|
|
1661
|
+
get valueNullChar(): string;
|
|
1662
|
+
set valueNullChar(value: string);
|
|
1663
|
+
get headingConstraint(): FtHeadingConstraint;
|
|
1664
|
+
set headingConstraint(value: FtHeadingConstraint);
|
|
1665
|
+
get headingQuotedType(): FtQuotedType;
|
|
1666
|
+
set headingQuotedType(value: FtQuotedType);
|
|
1667
|
+
get headingAlwaysWriteOptionalQuote(): boolean;
|
|
1668
|
+
set headingAlwaysWriteOptionalQuote(value: boolean);
|
|
1669
|
+
get headingWritePrefixSpace(): boolean;
|
|
1670
|
+
set headingWritePrefixSpace(value: boolean);
|
|
1671
|
+
get headingPadAlignment(): FtPadAlignment;
|
|
1672
|
+
set headingPadAlignment(value: FtPadAlignment);
|
|
1673
|
+
get headingPadCharType(): FtPadCharType;
|
|
1674
|
+
set headingPadCharType(value: FtPadCharType);
|
|
1675
|
+
get headingPadChar(): string;
|
|
1676
|
+
set headingPadChar(value: string);
|
|
1677
|
+
get headingTruncateType(): FtTruncateType;
|
|
1678
|
+
set headingTruncateType(value: FtTruncateType);
|
|
1679
|
+
get headingTruncateChar(): string;
|
|
1680
|
+
set headingTruncateChar(value: string);
|
|
1681
|
+
get headingEndOfValueChar(): string;
|
|
1682
|
+
set headingEndOfValueChar(value: string);
|
|
1683
|
+
get headingCount(): number;
|
|
1684
|
+
getDefaultHeadings(): string[];
|
|
1685
|
+
loadDefaults(leaveNameAsIs?: boolean): void;
|
|
1686
|
+
/** @internal */
|
|
1687
|
+
setHeadingCount(value: number): void;
|
|
1688
|
+
validateEndOfLineTypeChar(eolTypeChar: string, headingLineCount: number): {
|
|
1689
|
+
valid: boolean;
|
|
1690
|
+
errorMessage: string;
|
|
1691
|
+
};
|
|
1692
|
+
protected assignFrom(source: FtMetaField): void;
|
|
1693
|
+
private endOfLineTypeCharToString;
|
|
1694
|
+
abstract createCopy(): FtMetaField;
|
|
1695
|
+
protected abstract getDefaultSequenceRedirectType(): FtSequenceRedirectType;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
/**
|
|
1699
|
+
* @public
|
|
1700
|
+
*/
|
|
1701
|
+
export declare class FtMetaFieldList {
|
|
1702
|
+
/** @internal */
|
|
1703
|
+
onBeforeRemove: ((fieldIdx: number) => void) | undefined;
|
|
1704
|
+
/** @internal */
|
|
1705
|
+
onBeforeClear: (() => void) | undefined;
|
|
1706
|
+
/** @internal */
|
|
1707
|
+
onDefaultHeadingConstraintRequired: (() => FtHeadingConstraint) | undefined;
|
|
1708
|
+
/** @internal */
|
|
1709
|
+
onDefaultHeadingQuotedTypeRequired: (() => FtQuotedType) | undefined;
|
|
1710
|
+
/** @internal */
|
|
1711
|
+
onDefaultHeadingAlwaysWriteOptionalQuoteRequired: (() => boolean) | undefined;
|
|
1712
|
+
/** @internal */
|
|
1713
|
+
onDefaultHeadingWritePrefixSpaceRequired: (() => boolean) | undefined;
|
|
1714
|
+
/** @internal */
|
|
1715
|
+
onDefaultHeadingPadAlignmentRequired: (() => FtPadAlignment) | undefined;
|
|
1716
|
+
/** @internal */
|
|
1717
|
+
onDefaultHeadingPadCharTypeRequired: (() => FtPadCharType) | undefined;
|
|
1718
|
+
/** @internal */
|
|
1719
|
+
onDefaultHeadingPadCharRequired: (() => string) | undefined;
|
|
1720
|
+
/** @internal */
|
|
1721
|
+
onDefaultHeadingTruncateTypeRequired: (() => FtTruncateType) | undefined;
|
|
1722
|
+
/** @internal */
|
|
1723
|
+
onDefaultHeadingTruncateCharRequired: (() => string) | undefined;
|
|
1724
|
+
/** @internal */
|
|
1725
|
+
onDefaultHeadingEndOfValueCharRequired: (() => string) | undefined;
|
|
1726
|
+
/** @internal */
|
|
1727
|
+
private fields;
|
|
1728
|
+
/** @internal */
|
|
1729
|
+
private _headingCount;
|
|
1730
|
+
get count(): number;
|
|
1731
|
+
get headingCount(): number;
|
|
1732
|
+
set headingCount(value: number);
|
|
1733
|
+
get(index: number): FtMetaField;
|
|
1734
|
+
indexOf(field: FtMetaField): number;
|
|
1735
|
+
findById(id: number): FtMetaField | undefined;
|
|
1736
|
+
find(name: string): FtMetaField | undefined;
|
|
1737
|
+
new(dataType: FtDataType): FtMetaField;
|
|
1738
|
+
removeAt(index: number): void;
|
|
1739
|
+
remove(field: FtMetaField): void;
|
|
1740
|
+
clear(): void;
|
|
1741
|
+
set(value: FtMetaField[]): void;
|
|
1742
|
+
assign(source: FtMetaFieldList): void;
|
|
1743
|
+
private add;
|
|
1744
|
+
private bindFieldEvents;
|
|
1745
|
+
private unbindFieldEvents;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
/**
|
|
1749
|
+
* @public
|
|
1750
|
+
*/
|
|
1751
|
+
export declare const FtMetaPropertyId: {
|
|
1752
|
+
readonly Culture: "Culture";
|
|
1753
|
+
readonly EndOfLineType: "EndOfLineType";
|
|
1754
|
+
readonly EndOfLineChar: "EndOfLineChar";
|
|
1755
|
+
readonly EndOfLineAutoWriteType: "EndOfLineAutoWriteType";
|
|
1756
|
+
readonly LastLineEndedType: "LastLineEndedType";
|
|
1757
|
+
readonly QuoteChar: "QuoteChar";
|
|
1758
|
+
readonly DelimiterChar: "DelimiterChar";
|
|
1759
|
+
readonly LineCommentChar: "LineCommentChar";
|
|
1760
|
+
readonly AllowEndOfLineCharInQuotes: "AllowEndOfLineCharInQuotes";
|
|
1761
|
+
readonly IgnoreBlankLines: "IgnoreBlankLines";
|
|
1762
|
+
readonly IgnoreExtraChars: "IgnoreExtraChars";
|
|
1763
|
+
readonly AllowIncompleteRecords: "AllowIncompleteRecords";
|
|
1764
|
+
readonly StuffedEmbeddedQuotes: "StuffedEmbeddedQuotes";
|
|
1765
|
+
readonly SubstitutionsEnabled: "SubstitutionsEnabled";
|
|
1766
|
+
readonly SubstitutionChar: "SubstitutionChar";
|
|
1767
|
+
readonly HeadingLineCount: "HeadingLineCount";
|
|
1768
|
+
readonly MainHeadingLineIndex: "MainHeadingLineIndex";
|
|
1769
|
+
readonly HeadingConstraint: "HeadingConstraint";
|
|
1770
|
+
readonly HeadingQuotedType: "HeadingQuotedType";
|
|
1771
|
+
readonly HeadingAlwaysWriteOptionalQuote: "HeadingAlwaysWriteOptionalQuote";
|
|
1772
|
+
readonly HeadingWritePrefixSpace: "HeadingWritePrefixSpace";
|
|
1773
|
+
readonly HeadingPadAlignment: "HeadingPadAlignment";
|
|
1774
|
+
readonly HeadingPadCharType: "HeadingPadCharType";
|
|
1775
|
+
readonly HeadingPadChar: "HeadingPadChar";
|
|
1776
|
+
readonly HeadingTruncateType: "HeadingTruncateType";
|
|
1777
|
+
readonly HeadingTruncateChar: "HeadingTruncateChar";
|
|
1778
|
+
readonly HeadingEndOfValueChar: "HeadingEndOfValueChar";
|
|
1779
|
+
readonly LegacyEndOfLineIsSeparator: "LegacyEndOfLineIsSeparator";
|
|
1780
|
+
readonly LegacyIncompleteRecordsAllowed: "LegacyIncompleteRecordsAllowed";
|
|
1781
|
+
};
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* @public
|
|
1785
|
+
*/
|
|
1786
|
+
export declare type FtMetaPropertyId = (typeof FtMetaPropertyId)[keyof typeof FtMetaPropertyId];
|
|
1787
|
+
|
|
1788
|
+
/**
|
|
1789
|
+
* @public
|
|
1790
|
+
*/
|
|
1791
|
+
export declare const FtMetaReferenceType: {
|
|
1792
|
+
readonly None: "None";
|
|
1793
|
+
readonly Embedded: "Embedded";
|
|
1794
|
+
readonly File: "File";
|
|
1795
|
+
readonly Url: "Url";
|
|
1796
|
+
};
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* @public
|
|
1800
|
+
*/
|
|
1801
|
+
export declare type FtMetaReferenceType = (typeof FtMetaReferenceType)[keyof typeof FtMetaReferenceType];
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* @public
|
|
1805
|
+
*/
|
|
1806
|
+
export declare class FtMetaSequence {
|
|
1807
|
+
rootedEvent: RootedEventHandler | undefined;
|
|
1808
|
+
private readonly _itemList;
|
|
1809
|
+
private _name;
|
|
1810
|
+
private _root;
|
|
1811
|
+
constructor();
|
|
1812
|
+
get name(): string;
|
|
1813
|
+
set name(value: string);
|
|
1814
|
+
get root(): boolean;
|
|
1815
|
+
set root(value: boolean);
|
|
1816
|
+
get itemList(): FtMetaSequenceItemList;
|
|
1817
|
+
static sameName(left: string, right: string): boolean;
|
|
1818
|
+
setItemList(items: readonly FtMetaSequenceItem[]): void;
|
|
1819
|
+
loadDefaults(): void;
|
|
1820
|
+
removeItemsWithField(field: FtMetaField): void;
|
|
1821
|
+
removeAllItems(): void;
|
|
1822
|
+
createCopyExcludingRedirects(fieldList: FtMetaFieldList, sourceFieldList: FtMetaFieldList): FtMetaSequence;
|
|
1823
|
+
assignExcludingRedirects(source: FtMetaSequence, fieldList: FtMetaFieldList, sourceFieldList: FtMetaFieldList): void;
|
|
1824
|
+
assignRedirects(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
1825
|
+
anyItemWithUndefinedField(): {
|
|
1826
|
+
found: boolean;
|
|
1827
|
+
itemIndex: number;
|
|
1828
|
+
};
|
|
1829
|
+
anyItemWithConstantFieldHasRedirects(): {
|
|
1830
|
+
found: boolean;
|
|
1831
|
+
itemIndex: number;
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* @public
|
|
1837
|
+
*/
|
|
1838
|
+
export declare class FtMetaSequenceItem {
|
|
1839
|
+
private readonly _redirectList;
|
|
1840
|
+
private _field;
|
|
1841
|
+
constructor(field: FtMetaField);
|
|
1842
|
+
get field(): FtMetaField;
|
|
1843
|
+
set field(value: FtMetaField);
|
|
1844
|
+
get redirectList(): FtMetaSequenceRedirectList;
|
|
1845
|
+
setRedirectList(redirects: readonly FtMetaSequenceRedirect[]): void;
|
|
1846
|
+
loadDefaults(): void;
|
|
1847
|
+
createCopyExcludingRedirects(fieldList: FtMetaFieldList, sourceFieldList: FtMetaFieldList): FtMetaSequenceItem;
|
|
1848
|
+
assignRedirects(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
1849
|
+
hasConstantFieldAndHasRedirects(): boolean;
|
|
1850
|
+
private assignExcludingRedirects;
|
|
1851
|
+
private findSourceField;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* @public
|
|
1856
|
+
*/
|
|
1857
|
+
export declare class FtMetaSequenceItemList {
|
|
1858
|
+
private readonly _list;
|
|
1859
|
+
get count(): number;
|
|
1860
|
+
get(index: number): FtMetaSequenceItem;
|
|
1861
|
+
set(items: readonly FtMetaSequenceItem[]): void;
|
|
1862
|
+
new(field: FtMetaField): FtMetaSequenceItem;
|
|
1863
|
+
remove(item: FtMetaSequenceItem): void;
|
|
1864
|
+
removeAt(index: number): void;
|
|
1865
|
+
clear(): void;
|
|
1866
|
+
moveItemToBefore(fromIndex: number, beforeIndex: number): void;
|
|
1867
|
+
moveItemToAfter(fromIndex: number, afterIndex: number): void;
|
|
1868
|
+
assignExcludingRedirects(source: FtMetaSequenceItemList, fieldList: FtMetaFieldList, sourceFieldList: FtMetaFieldList): void;
|
|
1869
|
+
assignRedirects(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
1870
|
+
private add;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* @public
|
|
1875
|
+
*/
|
|
1876
|
+
export declare class FtMetaSequenceList {
|
|
1877
|
+
private readonly _list;
|
|
1878
|
+
get count(): number;
|
|
1879
|
+
get(index: number): FtMetaSequence;
|
|
1880
|
+
getByName(name: string): FtMetaSequence;
|
|
1881
|
+
set(value: readonly FtMetaSequence[]): void;
|
|
1882
|
+
new(name?: string): FtMetaSequence;
|
|
1883
|
+
removeAt(index: number): void;
|
|
1884
|
+
remove(sequence: FtMetaSequence): void;
|
|
1885
|
+
clear(): void;
|
|
1886
|
+
removeField(field: FtMetaField): void;
|
|
1887
|
+
removeAllFields(): void;
|
|
1888
|
+
indexOf(sequence: FtMetaSequence): number;
|
|
1889
|
+
indexOfName(name: string): number;
|
|
1890
|
+
indexOfRoot(): number;
|
|
1891
|
+
assign(source: FtMetaSequenceList, fieldList: FtMetaFieldList, sourceFieldList: FtMetaFieldList): void;
|
|
1892
|
+
isMoreThanOneRoot(): {
|
|
1893
|
+
found: boolean;
|
|
1894
|
+
firstRootSequenceName: string;
|
|
1895
|
+
secondRootSequenceName: string;
|
|
1896
|
+
};
|
|
1897
|
+
hasDuplicateName(): {
|
|
1898
|
+
found: boolean;
|
|
1899
|
+
duplicateName: string;
|
|
1900
|
+
};
|
|
1901
|
+
anyItemWithUndefinedField(sequenceIndex: number): {
|
|
1902
|
+
found: boolean;
|
|
1903
|
+
itemIndex: number;
|
|
1904
|
+
};
|
|
1905
|
+
anyItemWithConstantFieldHasRedirects(sequenceIndex: number): {
|
|
1906
|
+
found: boolean;
|
|
1907
|
+
itemIndex: number;
|
|
1908
|
+
};
|
|
1909
|
+
private add;
|
|
1910
|
+
private bindSequenceEvents;
|
|
1911
|
+
private unbindSequenceEvents;
|
|
1912
|
+
private handleSequenceRootedEvent;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* Abstract base class for meta sequence redirects.
|
|
1917
|
+
* Sequence redirects define conditional transitions from one sequence to another
|
|
1918
|
+
* based on field values in the metadata.
|
|
1919
|
+
* @public
|
|
1920
|
+
*/
|
|
1921
|
+
export declare abstract class FtMetaSequenceRedirect {
|
|
1922
|
+
private readonly _type;
|
|
1923
|
+
private _sequence;
|
|
1924
|
+
private _invokationDelay;
|
|
1925
|
+
protected constructor(type: FtSequenceRedirectType);
|
|
1926
|
+
/** The type identifier for this redirect */
|
|
1927
|
+
get type(): FtSequenceRedirectType;
|
|
1928
|
+
/** The target sequence to redirect to when this redirect is triggered */
|
|
1929
|
+
get sequence(): FtMetaSequence | undefined;
|
|
1930
|
+
set sequence(value: FtMetaSequence | undefined);
|
|
1931
|
+
/** When the redirect should be invoked relative to field processing */
|
|
1932
|
+
get invokationDelay(): FtSequenceInvokationDelay;
|
|
1933
|
+
set invokationDelay(value: FtSequenceInvokationDelay);
|
|
1934
|
+
/** Reset this redirect to default values */
|
|
1935
|
+
loadDefaults(): void;
|
|
1936
|
+
/**
|
|
1937
|
+
* Assign values from another redirect to this one.
|
|
1938
|
+
* @param source - The source redirect to copy from
|
|
1939
|
+
* @param sequenceList - The destination sequence list
|
|
1940
|
+
* @param sourceSequenceList - The source sequence list
|
|
1941
|
+
* @internal
|
|
1942
|
+
*/
|
|
1943
|
+
protected assign(source: FtMetaSequenceRedirect, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
1944
|
+
/**
|
|
1945
|
+
* Create a deep copy of this redirect.
|
|
1946
|
+
* @param sequenceList - The destination sequence list
|
|
1947
|
+
* @param sourceSequenceList - The source sequence list
|
|
1948
|
+
* @returns A new redirect instance with copied values
|
|
1949
|
+
*/
|
|
1950
|
+
abstract createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* List of meta sequence redirects for a sequence item.
|
|
1955
|
+
* Manages the collection of redirects that determine when to switch sequences.
|
|
1956
|
+
* @public
|
|
1957
|
+
*/
|
|
1958
|
+
export declare class FtMetaSequenceRedirectList {
|
|
1959
|
+
private readonly _list;
|
|
1960
|
+
get count(): number;
|
|
1961
|
+
get(index: number): FtMetaSequenceRedirect;
|
|
1962
|
+
set(redirects: readonly FtMetaSequenceRedirect[]): void;
|
|
1963
|
+
new(type: FtSequenceRedirectType): FtMetaSequenceRedirect;
|
|
1964
|
+
remove(redirect: FtMetaSequenceRedirect): void;
|
|
1965
|
+
removeAt(index: number): void;
|
|
1966
|
+
clear(): void;
|
|
1967
|
+
assign(source: FtMetaSequenceRedirectList, sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): void;
|
|
1968
|
+
private add;
|
|
1969
|
+
private createMetaSequenceRedirect;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
/**
|
|
1973
|
+
* API for serializing and deserializing FtMeta objects.
|
|
1974
|
+
* Provides a unified interface for both XML and JSON formats.
|
|
1975
|
+
* @public
|
|
1976
|
+
*/
|
|
1977
|
+
export declare class FtMetaSerialization {
|
|
1978
|
+
/**
|
|
1979
|
+
* Deserialize an FtMeta object from a string.
|
|
1980
|
+
* @param content - The serialized meta content (XML or JSON)
|
|
1981
|
+
* @param format - The format of the content (default: auto-detect)
|
|
1982
|
+
* @param warnings - Optional array to collect warnings during deserialization
|
|
1983
|
+
* @returns The deserialized FtMeta object
|
|
1984
|
+
*/
|
|
1985
|
+
deserialize(content: string, warnings?: string[], format?: FtMetaSerializationFormat): FtMeta;
|
|
1986
|
+
/**
|
|
1987
|
+
* Serialize an FtMeta object to a string.
|
|
1988
|
+
* @param meta - The FtMeta object to serialize
|
|
1989
|
+
* @param format - The output format (default: XML)
|
|
1990
|
+
* @returns The serialized string
|
|
1991
|
+
*/
|
|
1992
|
+
serialize(meta: FtMeta, options?: FtMetaSerializerOptions, format?: FtMetaSerializationFormat): string;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
/** @public */
|
|
1996
|
+
export declare namespace FtMetaSerialization {
|
|
1997
|
+
export function serialize(meta: FtMeta, options?: FtMetaSerializerOptions, format?: FtMetaSerializationFormat): string;
|
|
1998
|
+
export function deserialize(content: string, warnings?: string[], format?: FtMetaSerializationFormat): FtMeta;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* Meta serialization format.
|
|
2003
|
+
* @public
|
|
2004
|
+
*/
|
|
2005
|
+
export declare const FtMetaSerializationFormat: {
|
|
2006
|
+
/**
|
|
2007
|
+
* XML format (compatible with Standard 0.9).
|
|
2008
|
+
*/
|
|
2009
|
+
readonly XML: "XML";
|
|
2010
|
+
/**
|
|
2011
|
+
* JSON format (Alternative for experimental use).
|
|
2012
|
+
*/
|
|
2013
|
+
readonly JSON: "JSON";
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* @public
|
|
2018
|
+
*/
|
|
2019
|
+
export declare type FtMetaSerializationFormat = (typeof FtMetaSerializationFormat)[keyof typeof FtMetaSerializationFormat];
|
|
2020
|
+
|
|
2021
|
+
/**
|
|
2022
|
+
* Options for serialization formatting.
|
|
2023
|
+
* @public
|
|
2024
|
+
*/
|
|
2025
|
+
export declare interface FtMetaSerializerOptions {
|
|
2026
|
+
explicitIndices?: boolean;
|
|
2027
|
+
indent?: boolean;
|
|
2028
|
+
indentChars?: string;
|
|
2029
|
+
newLineOnAttributes?: boolean;
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
* Default values for meta serialization formatting.
|
|
2034
|
+
* @public
|
|
2035
|
+
*/
|
|
2036
|
+
export declare namespace FtMetaSerializerOptions {
|
|
2037
|
+
const DEFAULT_EXPLICIT_INDICES = false;
|
|
2038
|
+
const DEFAULT_INDENT = true;
|
|
2039
|
+
const DEFAULT_INDENT_CHARS = " ";
|
|
2040
|
+
const DEFAULT_NEW_LINE_ON_ATTRIBUTES = false;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
/**
|
|
2044
|
+
* @public
|
|
2045
|
+
*/
|
|
2046
|
+
export declare class FtMetaSubstitution {
|
|
2047
|
+
id: number;
|
|
2048
|
+
token: string;
|
|
2049
|
+
type: FtSubstitutionType;
|
|
2050
|
+
value: string;
|
|
2051
|
+
constructor(id?: number, token?: string, type?: FtSubstitutionType, value?: string);
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
/**
|
|
2055
|
+
* @public
|
|
2056
|
+
*/
|
|
2057
|
+
export declare class FtMetaSubstitutionList {
|
|
2058
|
+
private substitutions;
|
|
2059
|
+
get count(): number;
|
|
2060
|
+
get(index: number): FtMetaSubstitution;
|
|
2061
|
+
new(type?: FtSubstitutionType, token?: string, value?: string): FtMetaSubstitution;
|
|
2062
|
+
clear(): void;
|
|
2063
|
+
assign(source: FtMetaSubstitutionList): void;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
/**
|
|
2067
|
+
* Meta sequence redirect that triggers when a field value is null.
|
|
2068
|
+
* Used in metadata to define sequence transitions based on null field values.
|
|
2069
|
+
* @public
|
|
2070
|
+
*/
|
|
2071
|
+
export declare class FtNullMetaSequenceRedirect extends FtMetaSequenceRedirect {
|
|
2072
|
+
/** The standard type identifier for null redirects */
|
|
2073
|
+
static readonly TYPE: "Null";
|
|
2074
|
+
constructor();
|
|
2075
|
+
createCopy(sequenceList: FtMetaSequenceList, sourceSequenceList: FtMetaSequenceList): FtMetaSequenceRedirect;
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
/**
|
|
2079
|
+
* Sequence redirect that triggers when a field is null.
|
|
2080
|
+
* @public
|
|
2081
|
+
*/
|
|
2082
|
+
export declare class FtNullSequenceRedirect extends FtSequenceRedirect {
|
|
2083
|
+
static readonly TYPE: "Null";
|
|
2084
|
+
constructor(index: number);
|
|
2085
|
+
checkTriggered(field: FtField): boolean;
|
|
2086
|
+
/** @internal */
|
|
2087
|
+
loadMeta(metaSequenceRedirect: FtNullMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* @public
|
|
2092
|
+
*/
|
|
2093
|
+
declare type FtNumberDataType = typeof FtDataType.Integer | typeof FtDataType.Float | typeof FtDataType.Decimal;
|
|
2094
|
+
|
|
2095
|
+
/** @public */
|
|
2096
|
+
export declare class FtNumberStylesMetaSerialization {
|
|
2097
|
+
static allowInnerWhiteMetaValue: string;
|
|
2098
|
+
static allowWhiteSpacesMetaValue: string;
|
|
2099
|
+
static lowerCaseAllowInnerWhiteMetaValue: string;
|
|
2100
|
+
static lowerCaseAllowWhiteSpacesMetaValue: string;
|
|
2101
|
+
static serialize(styles: DotNetNumberStyles, dataType: FtNumberDataType): string | undefined;
|
|
2102
|
+
static deserialize(value: unknown, dataType: FtNumberDataType, warnings: string[]): DotNetNumberStyles;
|
|
2103
|
+
private static getDefaultNumberStyles;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* @public
|
|
2108
|
+
*/
|
|
2109
|
+
export declare const FtPadAlignment: {
|
|
2110
|
+
readonly Auto: "Auto";
|
|
2111
|
+
readonly Left: "Left";
|
|
2112
|
+
readonly Right: "Right";
|
|
2113
|
+
};
|
|
2114
|
+
|
|
2115
|
+
/**
|
|
2116
|
+
* @public
|
|
2117
|
+
*/
|
|
2118
|
+
export declare type FtPadAlignment = (typeof FtPadAlignment)[keyof typeof FtPadAlignment];
|
|
2119
|
+
|
|
2120
|
+
/**
|
|
2121
|
+
* @public
|
|
2122
|
+
*/
|
|
2123
|
+
export declare const FtPadCharType: {
|
|
2124
|
+
readonly Auto: "Auto";
|
|
2125
|
+
readonly Specified: "Specified";
|
|
2126
|
+
readonly EndOfValue: "EndOfValue";
|
|
2127
|
+
};
|
|
2128
|
+
|
|
2129
|
+
/**
|
|
2130
|
+
* @public
|
|
2131
|
+
*/
|
|
2132
|
+
export declare type FtPadCharType = (typeof FtPadCharType)[keyof typeof FtPadCharType];
|
|
2133
|
+
|
|
2134
|
+
/**
|
|
2135
|
+
* @public
|
|
2136
|
+
*/
|
|
2137
|
+
export declare const FtQuotedType: {
|
|
2138
|
+
readonly Never: "Never";
|
|
2139
|
+
readonly Always: "Always";
|
|
2140
|
+
readonly Optional: "Optional";
|
|
2141
|
+
};
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* @public
|
|
2145
|
+
*/
|
|
2146
|
+
export declare type FtQuotedType = (typeof FtQuotedType)[keyof typeof FtQuotedType];
|
|
2147
|
+
|
|
2148
|
+
/**
|
|
2149
|
+
* High-level reader for fielded text files.
|
|
2150
|
+
* Provides a convenient API for reading CSV and other delimited/fixed-width text.
|
|
2151
|
+
* This is a thin wrapper around SerializationReader with simpler constructors.
|
|
2152
|
+
* @public
|
|
2153
|
+
*/
|
|
2154
|
+
export declare class FtReader extends FtSerializationReader {
|
|
2155
|
+
/**
|
|
2156
|
+
* Create a reader with or without metadata.
|
|
2157
|
+
* If metadata is provided, it will be loaded immediately. If not, you must call loadMeta() before reading.
|
|
2158
|
+
* You must call open() before reading.
|
|
2159
|
+
* @param meta - The metadata defining the file structure
|
|
2160
|
+
*/
|
|
2161
|
+
constructor(meta?: FtMeta);
|
|
2162
|
+
/**
|
|
2163
|
+
* Create a reader with metadata and input text.
|
|
2164
|
+
* You must call open() before reading.
|
|
2165
|
+
* @param meta - The metadata defining the file structure
|
|
2166
|
+
* @param input - The text content to read
|
|
2167
|
+
* @param immediatelyReadHeader - Whether to automatically read header lines (default: true)
|
|
2168
|
+
*/
|
|
2169
|
+
constructor(meta: FtMeta, input: string, immediatelyReadHeader?: boolean);
|
|
2170
|
+
/**
|
|
2171
|
+
* Create a reader with metadata and a TextReader.
|
|
2172
|
+
* @param meta - The metadata defining the file structure
|
|
2173
|
+
* @param textReader - The TextReader to read from
|
|
2174
|
+
* @param immediatelyReadHeader - Whether to automatically read header lines (default: true)
|
|
2175
|
+
*/
|
|
2176
|
+
constructor(meta: FtMeta, textReader: FtTextReader, immediatelyReadHeader?: boolean);
|
|
2177
|
+
/**
|
|
2178
|
+
* Create a reader with input text but no metadata.
|
|
2179
|
+
* You must call loadMeta() before reading.
|
|
2180
|
+
* @param input - The text content to read
|
|
2181
|
+
* @param immediatelyReadHeader - Whether to automatically read header lines (default: true)
|
|
2182
|
+
*/
|
|
2183
|
+
constructor(input: string, immediatelyReadHeader?: boolean);
|
|
2184
|
+
/**
|
|
2185
|
+
* Create a reader with a TextReader but no metadata.
|
|
2186
|
+
* You must call loadMeta() before reading.
|
|
2187
|
+
* @param textReader - The TextReader to read from
|
|
2188
|
+
* @param immediatelyReadHeader - Whether to automatically read header lines (default: true)
|
|
2189
|
+
*/
|
|
2190
|
+
constructor(textReader: FtTextReader, immediatelyReadHeader?: boolean);
|
|
2191
|
+
/**
|
|
2192
|
+
* Open the reader with a text string.
|
|
2193
|
+
* @param textReaderOrText - Text reader or string providing the data to read
|
|
2194
|
+
* @param immediatelyReadHeader - Whether to automatically read header lines (default: true)
|
|
2195
|
+
*/
|
|
2196
|
+
open(textReaderOrText: FtTextReader | string, immediatelyReadHeader?: boolean): void;
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
/**
|
|
2200
|
+
* @public
|
|
2201
|
+
*/
|
|
2202
|
+
export declare const FtReadRecordResult: {
|
|
2203
|
+
readonly SameTable: "SameTable";
|
|
2204
|
+
readonly NewTable: "NewTable";
|
|
2205
|
+
readonly NoMoreRecords: "NoMoreRecords";
|
|
2206
|
+
};
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* @public
|
|
2210
|
+
*/
|
|
2211
|
+
export declare type FtReadRecordResult = (typeof FtReadRecordResult)[keyof typeof FtReadRecordResult];
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* @public
|
|
2215
|
+
*/
|
|
2216
|
+
export declare interface FtRecordFinishedEventArgs {
|
|
2217
|
+
recordIndex: number;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* @public
|
|
2222
|
+
*/
|
|
2223
|
+
export declare interface FtRecordStartedEventArgs {
|
|
2224
|
+
recordIndex: number;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
/**
|
|
2228
|
+
* Represents a sequence of fielded text items.
|
|
2229
|
+
* A sequence defines a pattern of fields that can be repeated.
|
|
2230
|
+
* @public
|
|
2231
|
+
*/
|
|
2232
|
+
export declare class FtSequence {
|
|
2233
|
+
private static readonly AUTO_ROOT_NAME;
|
|
2234
|
+
private _index;
|
|
2235
|
+
private _name;
|
|
2236
|
+
private _root;
|
|
2237
|
+
private _itemList;
|
|
2238
|
+
constructor(index: number);
|
|
2239
|
+
get index(): number;
|
|
2240
|
+
get name(): string;
|
|
2241
|
+
get root(): boolean;
|
|
2242
|
+
get itemList(): FtSequenceItemList;
|
|
2243
|
+
/** @internal */
|
|
2244
|
+
setRoot(value: boolean): void;
|
|
2245
|
+
/** @internal */
|
|
2246
|
+
loadMeta(metaSequence: FtMetaSequence, metaFieldList: FtMetaFieldList, fieldDefinitionList: FtFieldDefinitionList): void;
|
|
2247
|
+
/** @internal */
|
|
2248
|
+
loadMetaSequenceRedirects(metaSequence: FtMetaSequence, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
2249
|
+
/** @internal */
|
|
2250
|
+
loadRootFieldDefinitionList(fieldDefinitionList: FtFieldDefinitionList): void;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
/**
|
|
2254
|
+
* Constructor for creating sequence instances.
|
|
2255
|
+
* @public
|
|
2256
|
+
*/
|
|
2257
|
+
export declare class FtSequenceConstructor {
|
|
2258
|
+
createSequence(index: number): FtSequence;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
/**
|
|
2262
|
+
* Factory for creating sequences.
|
|
2263
|
+
* @public
|
|
2264
|
+
*/
|
|
2265
|
+
export declare class FtSequenceFactory {
|
|
2266
|
+
private static _constructor;
|
|
2267
|
+
static getConstructor(): FtSequenceConstructor;
|
|
2268
|
+
static setConstructor(value: FtSequenceConstructor): void;
|
|
2269
|
+
static createSequence(index: number): FtSequence;
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2272
|
+
/**
|
|
2273
|
+
* Represents an invokation of a sequence during reading or writing.
|
|
2274
|
+
* Manages the fields that make up an instance of a sequence pattern.
|
|
2275
|
+
* @public
|
|
2276
|
+
*/
|
|
2277
|
+
export declare class FtSequenceInvokation {
|
|
2278
|
+
sequenceRedirectEvent: FtSequenceRedirectDelegate | undefined;
|
|
2279
|
+
private _index;
|
|
2280
|
+
private _sequence;
|
|
2281
|
+
private _startFieldIndex;
|
|
2282
|
+
private _fieldList;
|
|
2283
|
+
private _fieldsSidelinedFromIndex;
|
|
2284
|
+
private _redirectingField;
|
|
2285
|
+
constructor(index: number, sequence: FtSequence, startFieldIndex: number);
|
|
2286
|
+
get index(): number;
|
|
2287
|
+
get sequence(): FtSequence;
|
|
2288
|
+
get startFieldIndex(): number;
|
|
2289
|
+
get fieldCount(): number;
|
|
2290
|
+
get fieldsSidelinedFromIndex(): number;
|
|
2291
|
+
get redirectingField(): FtField | undefined;
|
|
2292
|
+
getField(index: number): FtField;
|
|
2293
|
+
/** @internal */
|
|
2294
|
+
createPreviousCopy(): FtSequenceInvokation;
|
|
2295
|
+
/** @internal */
|
|
2296
|
+
matches(other: FtSequenceInvokation): boolean;
|
|
2297
|
+
/** @internal */
|
|
2298
|
+
resetFields(startFieldIndex: number): void;
|
|
2299
|
+
/** @internal */
|
|
2300
|
+
sidelineFields(): void;
|
|
2301
|
+
/** @internal */
|
|
2302
|
+
sidelineFieldsOverload(fromFieldIndex: number): void;
|
|
2303
|
+
/** @internal */
|
|
2304
|
+
unsidelineFields(): void;
|
|
2305
|
+
/** @internal */
|
|
2306
|
+
restart(startFieldIndex: number): void;
|
|
2307
|
+
private handleSequenceRedirectEvent;
|
|
2308
|
+
private sidelineFieldsFrom;
|
|
2309
|
+
}
|
|
2310
|
+
|
|
2311
|
+
/**
|
|
2312
|
+
* @public
|
|
2313
|
+
*/
|
|
2314
|
+
export declare const FtSequenceInvokationDelay: {
|
|
2315
|
+
readonly AfterField: "AfterField";
|
|
2316
|
+
readonly AfterSequence: "AfterSequence";
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
/**
|
|
2320
|
+
* @public
|
|
2321
|
+
*/
|
|
2322
|
+
export declare type FtSequenceInvokationDelay = (typeof FtSequenceInvokationDelay)[keyof typeof FtSequenceInvokationDelay];
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* @public
|
|
2326
|
+
*/
|
|
2327
|
+
declare class FtSequenceInvokationList {
|
|
2328
|
+
sequenceRedirectEvent?: FtSequenceRedirectDelegate;
|
|
2329
|
+
private list;
|
|
2330
|
+
private _count;
|
|
2331
|
+
get count(): number;
|
|
2332
|
+
get predictCount(): number;
|
|
2333
|
+
get(index: number): FtSequenceInvokation;
|
|
2334
|
+
new(sequence: FtSequence, fieldIndex: number): FtSequenceInvokation;
|
|
2335
|
+
clear(): void;
|
|
2336
|
+
trim(fromIndex: number): void;
|
|
2337
|
+
tryPredictedNew(index: number, sequence: FtSequence, fieldIndex: number): FtSequenceInvokation | undefined;
|
|
2338
|
+
predictTrim(fromIndex: number): void;
|
|
2339
|
+
matches(other: FtSequenceInvokationList): boolean;
|
|
2340
|
+
assign(other: FtSequenceInvokationList): void;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
/**
|
|
2344
|
+
* Represents an item in a sequence.
|
|
2345
|
+
* Each sequence item references a field definition and has optional redirects.
|
|
2346
|
+
* @public
|
|
2347
|
+
*/
|
|
2348
|
+
export declare class FtSequenceItem {
|
|
2349
|
+
private _index;
|
|
2350
|
+
private _fieldDefinition;
|
|
2351
|
+
private _redirectList;
|
|
2352
|
+
constructor(index: number);
|
|
2353
|
+
get index(): number;
|
|
2354
|
+
get fieldDefinition(): FtFieldDefinition | undefined;
|
|
2355
|
+
get redirectList(): FtSequenceRedirectList;
|
|
2356
|
+
/** @internal */
|
|
2357
|
+
loadMeta(metaSequenceItem: FtMetaSequenceItem, metaFieldList: FtMetaFieldList, fieldDefinitionList: FtFieldDefinitionList): void;
|
|
2358
|
+
/** @internal */
|
|
2359
|
+
loadMetaSequenceRedirects(metaSequenceItem: FtMetaSequenceItem, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
2360
|
+
/** @internal */
|
|
2361
|
+
setFieldDefinition(definition: FtFieldDefinition): void;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
/**
|
|
2365
|
+
* Constructor for creating sequence item instances.
|
|
2366
|
+
* @public
|
|
2367
|
+
*/
|
|
2368
|
+
export declare class FtSequenceItemConstructor {
|
|
2369
|
+
createSequenceItem(index: number): FtSequenceItem;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
/**
|
|
2373
|
+
* Factory for creating sequence items.
|
|
2374
|
+
* @public
|
|
2375
|
+
*/
|
|
2376
|
+
export declare class FtSequenceItemFactory {
|
|
2377
|
+
private static _constructor;
|
|
2378
|
+
static getConstructor(): FtSequenceItemConstructor;
|
|
2379
|
+
static setConstructor(value: FtSequenceItemConstructor): void;
|
|
2380
|
+
static createSequenceItem(index: number): FtSequenceItem;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
/**
|
|
2384
|
+
* List of sequence items.
|
|
2385
|
+
* @public
|
|
2386
|
+
*/
|
|
2387
|
+
export declare class FtSequenceItemList {
|
|
2388
|
+
private _list;
|
|
2389
|
+
get count(): number;
|
|
2390
|
+
/** @internal */
|
|
2391
|
+
get capacity(): number;
|
|
2392
|
+
set capacity(value: number);
|
|
2393
|
+
get(index: number): FtSequenceItem;
|
|
2394
|
+
/** @internal */
|
|
2395
|
+
clear(): void;
|
|
2396
|
+
/** @internal */
|
|
2397
|
+
new(): FtSequenceItem;
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
/**
|
|
2401
|
+
* List of sequences.
|
|
2402
|
+
* @public
|
|
2403
|
+
*/
|
|
2404
|
+
export declare class FtSequenceList {
|
|
2405
|
+
private _list;
|
|
2406
|
+
get count(): number;
|
|
2407
|
+
/** @internal */
|
|
2408
|
+
get capacity(): number;
|
|
2409
|
+
set capacity(value: number);
|
|
2410
|
+
get(index: number): FtSequence;
|
|
2411
|
+
getByName(name: string): FtSequence;
|
|
2412
|
+
/** @internal */
|
|
2413
|
+
clear(): void;
|
|
2414
|
+
/** @internal */
|
|
2415
|
+
new(fieldDefinitionList?: FtFieldDefinitionList): FtSequence;
|
|
2416
|
+
indexOfName(name: string): number;
|
|
2417
|
+
indexOfRoot(): number;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
/**
|
|
2421
|
+
* Abstract base class for sequence redirects.
|
|
2422
|
+
* Redirects determine when to switch from one sequence to another based on field values.
|
|
2423
|
+
* These are the runtime instances that use metadata definitions to perform actual redirections.
|
|
2424
|
+
* @public
|
|
2425
|
+
*/
|
|
2426
|
+
export declare abstract class FtSequenceRedirect {
|
|
2427
|
+
private _index;
|
|
2428
|
+
private _type;
|
|
2429
|
+
private _sequence;
|
|
2430
|
+
private _invokationDelay;
|
|
2431
|
+
protected constructor(index: number, type: FtSequenceRedirectType);
|
|
2432
|
+
get index(): number;
|
|
2433
|
+
get type(): FtSequenceRedirectType;
|
|
2434
|
+
get sequence(): FtSequence | undefined;
|
|
2435
|
+
get invokationDelay(): FtSequenceInvokationDelay;
|
|
2436
|
+
/** @internal */
|
|
2437
|
+
loadMeta(metaSequenceRedirect: FtMetaSequenceRedirect, metaSequenceList: FtMetaSequenceList, sequenceList: FtSequenceList): void;
|
|
2438
|
+
/**
|
|
2439
|
+
* Check if this redirect is triggered based on the field's current state.
|
|
2440
|
+
* @param field - The field to check
|
|
2441
|
+
* @returns true if redirect should be triggered
|
|
2442
|
+
*/
|
|
2443
|
+
abstract checkTriggered(field: FtField): boolean;
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
/**
|
|
2447
|
+
* Abstract base class for sequence redirect constructors.
|
|
2448
|
+
* @public
|
|
2449
|
+
*/
|
|
2450
|
+
export declare abstract class FtSequenceRedirectConstructor {
|
|
2451
|
+
get sequenceRedirectType(): FtSequenceRedirectType;
|
|
2452
|
+
get sequenceRedirectTypeName(): string;
|
|
2453
|
+
abstract createSequenceRedirect(index: number): FtSequenceRedirect;
|
|
2454
|
+
protected abstract getSequenceRedirectType(): FtSequenceRedirectType;
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
/**
|
|
2458
|
+
* Delegate for sequence redirect events.
|
|
2459
|
+
* @public
|
|
2460
|
+
*/
|
|
2461
|
+
export declare type FtSequenceRedirectDelegate = (field: FtField, sequence: FtSequence | undefined, delay: FtSequenceInvokationDelay) => number;
|
|
2462
|
+
|
|
2463
|
+
/**
|
|
2464
|
+
* @public
|
|
2465
|
+
*/
|
|
2466
|
+
export declare interface FtSequenceRedirectedEventArgs {
|
|
2467
|
+
redirectingField: FtField;
|
|
2468
|
+
fieldsAffectedFromIndex: number;
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2471
|
+
/**
|
|
2472
|
+
* Factory for creating sequence redirects.
|
|
2473
|
+
* Manages a registry of redirect types and their constructors.
|
|
2474
|
+
* @public
|
|
2475
|
+
*/
|
|
2476
|
+
export declare class FtSequenceRedirectFactory {
|
|
2477
|
+
private static constructorList;
|
|
2478
|
+
private static initialized;
|
|
2479
|
+
static registerConstructor(constructor: FtSequenceRedirectConstructor): void;
|
|
2480
|
+
static getRegisteredConstructors(): FtSequenceRedirectConstructor[];
|
|
2481
|
+
static unregisterAllConstructors(): void;
|
|
2482
|
+
static unregisterConstructor(constructorOrType: FtSequenceRedirectConstructor | FtSequenceRedirectType | string): void;
|
|
2483
|
+
static createSequenceRedirect(index: number, typeOrName: FtSequenceRedirectType | string): FtSequenceRedirect;
|
|
2484
|
+
static getName(type: FtSequenceRedirectType): string;
|
|
2485
|
+
static tryGetType(typeName: string): Result<FtSequenceRedirectType, boolean>;
|
|
2486
|
+
private static tryFindConstructorByType;
|
|
2487
|
+
private static tryFindConstructorByName;
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* List of sequence redirects for a sequence item.
|
|
2492
|
+
* @public
|
|
2493
|
+
*/
|
|
2494
|
+
export declare class FtSequenceRedirectList {
|
|
2495
|
+
private _items;
|
|
2496
|
+
get count(): number;
|
|
2497
|
+
/** @internal */
|
|
2498
|
+
get capacity(): number;
|
|
2499
|
+
set capacity(value: number);
|
|
2500
|
+
get(index: number): FtSequenceRedirect;
|
|
2501
|
+
/** @internal */
|
|
2502
|
+
clear(): void;
|
|
2503
|
+
/** @internal */
|
|
2504
|
+
new(type: FtSequenceRedirectType): FtSequenceRedirect;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* @public
|
|
2509
|
+
*/
|
|
2510
|
+
export declare const FtSequenceRedirectType: {
|
|
2511
|
+
readonly Null: "Null";
|
|
2512
|
+
readonly ExactString: "ExactString";
|
|
2513
|
+
readonly CaseInsensitiveString: "CaseInsensitiveString";
|
|
2514
|
+
readonly Boolean: "Boolean";
|
|
2515
|
+
readonly ExactInteger: "ExactInteger";
|
|
2516
|
+
readonly ExactFloat: "ExactFloat";
|
|
2517
|
+
readonly ExactDateTime: "ExactDateTime";
|
|
2518
|
+
readonly Date: "Date";
|
|
2519
|
+
readonly ExactDecimal: "ExactDecimal";
|
|
2520
|
+
};
|
|
2521
|
+
|
|
2522
|
+
/**
|
|
2523
|
+
* @public
|
|
2524
|
+
*/
|
|
2525
|
+
export declare type FtSequenceRedirectType = (typeof FtSequenceRedirectType)[keyof typeof FtSequenceRedirectType];
|
|
2526
|
+
|
|
2527
|
+
/**
|
|
2528
|
+
* High-level API for event-driven serialization and deserialization of fielded text.
|
|
2529
|
+
* Simplifies reading and writing by hooking into field and record events.
|
|
2530
|
+
* @public
|
|
2531
|
+
*/
|
|
2532
|
+
export declare class FtSerialization {
|
|
2533
|
+
static readonly VERSION_MAJOR = 1;
|
|
2534
|
+
static readonly VERSION_MINOR = 1;
|
|
2535
|
+
static readonly PREFIX_SPACE_CHAR = " ";
|
|
2536
|
+
onFieldHeadingReadReady: ((args: FtFieldHeadingReadyEventArgs) => void) | undefined;
|
|
2537
|
+
onFieldHeadingWriteReady: ((args: FtFieldHeadingReadyEventArgs) => void) | undefined;
|
|
2538
|
+
onFieldValueReadReady: ((args: FtFieldValueReadyEventArgs) => void) | undefined;
|
|
2539
|
+
onFieldValueWriteReady: ((args: FtFieldValueReadyEventArgs) => void) | undefined;
|
|
2540
|
+
onHeadingLineStarted: ((args: FtHeadingLineStartedEventArgs) => void) | undefined;
|
|
2541
|
+
onHeadingLineFinished: ((args: FtHeadingLineFinishedEventArgs) => void) | undefined;
|
|
2542
|
+
onRecordStarted: ((args: FtRecordStartedEventArgs) => void) | undefined;
|
|
2543
|
+
onRecordFinished: ((args: FtRecordFinishedEventArgs) => void) | undefined;
|
|
2544
|
+
onSequenceRedirected: ((args: FtSequenceRedirectedEventArgs) => void) | undefined;
|
|
2545
|
+
private _meta;
|
|
2546
|
+
private _core;
|
|
2547
|
+
constructor(meta: FtMeta);
|
|
2548
|
+
get fieldDefinitionList(): FtFieldDefinitionList | undefined;
|
|
2549
|
+
get fieldList(): FtFieldList | undefined;
|
|
2550
|
+
get substitutionList(): FtSubstitutionList | undefined;
|
|
2551
|
+
get sequenceList(): FtSequenceList | undefined;
|
|
2552
|
+
get sequenceInvokationList(): FtSequenceInvokationList | undefined;
|
|
2553
|
+
get rootSequence(): FtSequence | undefined;
|
|
2554
|
+
get rootFieldCount(): number;
|
|
2555
|
+
get rootSequenceInvokation(): FtSequenceInvokation | undefined;
|
|
2556
|
+
get recordCount(): number;
|
|
2557
|
+
get tableCount(): number;
|
|
2558
|
+
/**
|
|
2559
|
+
* Read all records from a reader, invoking events for each field and record.
|
|
2560
|
+
* @param reader - The reader to deserialize from
|
|
2561
|
+
*/
|
|
2562
|
+
deserialize(reader: FtReader): void;
|
|
2563
|
+
/**
|
|
2564
|
+
* Read all records from text input, invoking events for each field and record.
|
|
2565
|
+
* @param input - The text content to deserialize
|
|
2566
|
+
*/
|
|
2567
|
+
deserialize(input: string): void;
|
|
2568
|
+
/**
|
|
2569
|
+
* Write records until aborted by throwing FtAbortSerializationException from an event handler.
|
|
2570
|
+
* @param writer - The writer to serialize to
|
|
2571
|
+
*/
|
|
2572
|
+
serialize(writer: FtWriter): void;
|
|
2573
|
+
/**
|
|
2574
|
+
* Write records until aborted by throwing FtAbortSerializationException from an event handler.
|
|
2575
|
+
* @param output - The TextWriter to serialize to
|
|
2576
|
+
* @param settings - Optional writer settings
|
|
2577
|
+
*/
|
|
2578
|
+
serialize(output: FtTextWriter, settings?: FtWriterSettings): void;
|
|
2579
|
+
private setCore;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* Enumeration of serialization error codes.
|
|
2584
|
+
* @public
|
|
2585
|
+
*/
|
|
2586
|
+
export declare const FtSerializationError: {
|
|
2587
|
+
readonly Abort: "Abort";
|
|
2588
|
+
readonly DeclarationParameterNameIsZeroLength: "DeclarationParameterNameIsZeroLength";
|
|
2589
|
+
readonly DeclaredParameterNameContainsSeparator: "DeclaredParameterNameContainsSeparator";
|
|
2590
|
+
readonly DeclarationParameterNameNotTerminated: "DeclarationParameterNameNotTerminated";
|
|
2591
|
+
readonly DeclarationParameterMissingValue: "DeclarationParameterMissingValue";
|
|
2592
|
+
readonly DeclarationParameterValueNotQuoted: "DeclarationParameterValueNotQuoted";
|
|
2593
|
+
readonly DeclarationParameterValueNotTerminated: "DeclarationParameterValueNotTerminated";
|
|
2594
|
+
readonly DeclarationParametersMissingVersion: "DeclarationParametersMissingVersion";
|
|
2595
|
+
readonly DeclarationParameterVersionIsNotFirst: "DeclarationParameterVersionIsNotFirst";
|
|
2596
|
+
readonly DeclarationParameterInvalidVersion: "DeclarationParameterInvalidVersion";
|
|
2597
|
+
readonly EmbeddedMetaNotFound: "EmbeddedMetaNotFound";
|
|
2598
|
+
readonly IncompleteEmbeddedMeta: "IncompleteEmbeddedMeta";
|
|
2599
|
+
readonly HeadingLineNotEnoughFields: "HeadingLineNotEnoughFields";
|
|
2600
|
+
readonly RecordNotEnoughFields: "RecordNotEnoughFields";
|
|
2601
|
+
readonly HeadingLineTooManyFields: "HeadingLineTooManyFields";
|
|
2602
|
+
readonly RecordTooManyFields: "RecordTooManyFields";
|
|
2603
|
+
readonly HeadingQuotedFieldMissingEndQuoteChar: "HeadingQuotedFieldMissingEndQuoteChar";
|
|
2604
|
+
readonly ValueQuotedFieldMissingEndQuoteChar: "ValueQuotedFieldMissingEndQuoteChar";
|
|
2605
|
+
readonly HeadingNonWhiteSpaceCharBeforeQuotesOpened: "HeadingNonWhiteSpaceCharBeforeQuotesOpened";
|
|
2606
|
+
readonly ValueNonWhiteSpaceCharBeforeQuotesOpened: "ValueNonWhiteSpaceCharBeforeQuotesOpened";
|
|
2607
|
+
readonly HeadingNonWhiteSpaceCharAfterQuotesClosed: "HeadingNonWhiteSpaceCharAfterQuotesClosed";
|
|
2608
|
+
readonly ValueNonWhiteSpaceCharAfterQuotesClosed: "ValueNonWhiteSpaceCharAfterQuotesClosed";
|
|
2609
|
+
readonly HeadingWidthNotReached: "HeadingWidthNotReached";
|
|
2610
|
+
readonly ValueWidthNotReached: "ValueWidthNotReached";
|
|
2611
|
+
readonly HeadingWidthExceeded: "HeadingWidthExceeded";
|
|
2612
|
+
readonly ValueWidthExceeded: "ValueWidthExceeded";
|
|
2613
|
+
readonly FieldValueToText: "FieldValueToText";
|
|
2614
|
+
readonly FieldTruncated: "FieldTruncated";
|
|
2615
|
+
readonly FieldConstantValueMismatch: "FieldConstantValueMismatch";
|
|
2616
|
+
readonly FieldConstNameHeadingMismatch: "FieldConstNameHeadingMismatch";
|
|
2617
|
+
readonly FieldTextParse: "FieldTextParse";
|
|
2618
|
+
readonly MoreThanOneRootSequence: "MoreThanOneRootSequence";
|
|
2619
|
+
readonly HeaderAlreadyWritten: "HeaderAlreadyWritten";
|
|
2620
|
+
readonly LastLineEndedError: "LastLineEndedError";
|
|
2621
|
+
readonly IncompleteDeclaration: "IncompleteDeclaration";
|
|
2622
|
+
readonly InsufficientHeadingLines: "InsufficientHeadingLines";
|
|
2623
|
+
readonly InvalidMeta: "InvalidMeta";
|
|
2624
|
+
readonly LoadMetaFromText: "LoadMetaFromText";
|
|
2625
|
+
readonly MetaReferenceFileNoHandler: "MetaReferenceFileNoHandler";
|
|
2626
|
+
readonly LoadMetaFromFile: "LoadMetaFromFile";
|
|
2627
|
+
readonly MetaReferenceUrlNoHandler: "MetaReferenceUrlNoHandler";
|
|
2628
|
+
readonly LoadMetaFromUrl: "LoadMetaFromUrl";
|
|
2629
|
+
};
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* @public
|
|
2633
|
+
*/
|
|
2634
|
+
export declare type FtSerializationError = (typeof FtSerializationError)[keyof typeof FtSerializationError];
|
|
2635
|
+
|
|
2636
|
+
/**
|
|
2637
|
+
* Exception thrown during fielded text serialization/deserialization.
|
|
2638
|
+
* @public
|
|
2639
|
+
*/
|
|
2640
|
+
export declare class FtSerializationException extends Error {
|
|
2641
|
+
private readonly _error;
|
|
2642
|
+
private readonly _fieldName;
|
|
2643
|
+
private readonly _fieldIndex;
|
|
2644
|
+
private readonly _sequenceName;
|
|
2645
|
+
private readonly _sequenceItemIndex;
|
|
2646
|
+
constructor(error: FtSerializationError, fieldOrMessage: FtField | string | undefined, messageOrInner?: string | Error, innerException?: Error);
|
|
2647
|
+
get error(): FtSerializationError;
|
|
2648
|
+
get fieldName(): string | undefined;
|
|
2649
|
+
get fieldIndex(): number;
|
|
2650
|
+
get sequenceName(): string | undefined;
|
|
2651
|
+
get sequenceItemIndex(): number;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
/**
|
|
2655
|
+
* Reader for fielded text streams. Coordinates all parsing components.
|
|
2656
|
+
* @public
|
|
2657
|
+
*/
|
|
2658
|
+
export declare class FtSerializationReader extends SerializationCore {
|
|
2659
|
+
/**
|
|
2660
|
+
* Event fired when seeking through records.
|
|
2661
|
+
*/
|
|
2662
|
+
onRecordSeeked: FtSerializationReader.OnRecordSeeked | undefined;
|
|
2663
|
+
/**
|
|
2664
|
+
* Event fired when needing to access file to get meta. This library is browser-compatible and does not have direct file system access, so this event allows the consumer to provide file content as text.
|
|
2665
|
+
*/
|
|
2666
|
+
onRequireFileMetaAsText: FtSerializationReader.OnRequireFileMetaAsText | undefined;
|
|
2667
|
+
/**
|
|
2668
|
+
* Event fired when needing to access URL to get meta. Deferred to consumer as need to handle encoding and also must be returned synchronously
|
|
2669
|
+
*/
|
|
2670
|
+
onRequireUrlMetaAsText: FtSerializationReader.OnRequireUrlMetaAsText | undefined;
|
|
2671
|
+
private readonly _charReader;
|
|
2672
|
+
private readonly _lineParser;
|
|
2673
|
+
private readonly _declarationParser;
|
|
2674
|
+
private readonly _declaredParameters;
|
|
2675
|
+
private readonly _embeddedMetaParser;
|
|
2676
|
+
private readonly _headingLineParser;
|
|
2677
|
+
private readonly _recordParser;
|
|
2678
|
+
private readonly _lineBuilder;
|
|
2679
|
+
private _headerRead;
|
|
2680
|
+
private _declarationRead;
|
|
2681
|
+
private _embeddedMetaRead;
|
|
2682
|
+
private _headingLineReadCount;
|
|
2683
|
+
private _headingLinesRead;
|
|
2684
|
+
private _finished;
|
|
2685
|
+
private _declared;
|
|
2686
|
+
private _metaReferenceType;
|
|
2687
|
+
private _metaReference;
|
|
2688
|
+
private _metaEmbedded;
|
|
2689
|
+
private _newTableStarted;
|
|
2690
|
+
private _tableStartSuspended;
|
|
2691
|
+
private _tableStartRecordPeeked;
|
|
2692
|
+
private _lineType;
|
|
2693
|
+
private _autoNextTable;
|
|
2694
|
+
constructor();
|
|
2695
|
+
/**
|
|
2696
|
+
* Gets or sets whether Read() will automatically continue reading records when new tables begin.
|
|
2697
|
+
*/
|
|
2698
|
+
get autoNextTable(): boolean;
|
|
2699
|
+
set autoNextTable(value: boolean);
|
|
2700
|
+
/**
|
|
2701
|
+
* Gets whether the fielded text stream was declared (has |!Fielded Text^| signature).
|
|
2702
|
+
*/
|
|
2703
|
+
get declared(): boolean;
|
|
2704
|
+
/**
|
|
2705
|
+
* Gets the number of heading lines read.
|
|
2706
|
+
*/
|
|
2707
|
+
get headingLineReadCount(): number;
|
|
2708
|
+
/**
|
|
2709
|
+
* Gets whether the header has been fully read.
|
|
2710
|
+
*/
|
|
2711
|
+
get headerRead(): boolean;
|
|
2712
|
+
/**
|
|
2713
|
+
* Gets the meta reference type.
|
|
2714
|
+
*/
|
|
2715
|
+
get metaReferenceType(): FtMetaReferenceType;
|
|
2716
|
+
/**
|
|
2717
|
+
* Gets the meta reference (file path or URL).
|
|
2718
|
+
*/
|
|
2719
|
+
get metaReference(): string;
|
|
2720
|
+
/**
|
|
2721
|
+
* Gets the type of the last line read.
|
|
2722
|
+
*/
|
|
2723
|
+
get lineType(): FtLineType;
|
|
2724
|
+
/**
|
|
2725
|
+
* Gets the last line read as a string.
|
|
2726
|
+
*/
|
|
2727
|
+
get line(): string;
|
|
2728
|
+
/**
|
|
2729
|
+
* Gets whether the last record read was the start of a new table.
|
|
2730
|
+
*/
|
|
2731
|
+
get newTableStarted(): boolean;
|
|
2732
|
+
/**
|
|
2733
|
+
* Gets the number of records read (accounting for table start peeking).
|
|
2734
|
+
*/
|
|
2735
|
+
get recordCount(): number;
|
|
2736
|
+
/**
|
|
2737
|
+
* Gets the number of tables read (accounting for table start suspension).
|
|
2738
|
+
*/
|
|
2739
|
+
get tableCount(): number;
|
|
2740
|
+
/**
|
|
2741
|
+
* Gets the active field index for the current line.
|
|
2742
|
+
*/
|
|
2743
|
+
get activeFieldIndex(): number;
|
|
2744
|
+
/**
|
|
2745
|
+
* Gets the line position where extra characters started being ignored.
|
|
2746
|
+
*/
|
|
2747
|
+
get ignoreExtraCharsLinePosition(): number;
|
|
2748
|
+
/**
|
|
2749
|
+
* Gets whether the reader is closed.
|
|
2750
|
+
*/
|
|
2751
|
+
get isClosed(): boolean;
|
|
2752
|
+
/**
|
|
2753
|
+
* Close the reader and reset state.
|
|
2754
|
+
*/
|
|
2755
|
+
close(): void;
|
|
2756
|
+
/**
|
|
2757
|
+
* Read the header (declaration, embedded meta, heading lines).
|
|
2758
|
+
*/
|
|
2759
|
+
readHeader(): void;
|
|
2760
|
+
/**
|
|
2761
|
+
* Read the next line from the stream.
|
|
2762
|
+
* Always reads regardless of table boundaries.
|
|
2763
|
+
* @returns true if a line was read, false if at end of stream.
|
|
2764
|
+
*/
|
|
2765
|
+
readLine(): boolean;
|
|
2766
|
+
/**
|
|
2767
|
+
* Read the next record from the stream.
|
|
2768
|
+
* Respects autoNextTable setting for table boundaries.
|
|
2769
|
+
* @returns true if a record was read, false otherwise.
|
|
2770
|
+
*/
|
|
2771
|
+
read(): boolean;
|
|
2772
|
+
/**
|
|
2773
|
+
* Read all remaining records.
|
|
2774
|
+
* Normally used with event handlers.
|
|
2775
|
+
*/
|
|
2776
|
+
readToEnd(): void;
|
|
2777
|
+
/**
|
|
2778
|
+
* Read the next record and indicate table boundaries.
|
|
2779
|
+
* Always reads regardless of table boundaries.
|
|
2780
|
+
* @returns Result indicating same table, new table, or no more records.
|
|
2781
|
+
*/
|
|
2782
|
+
readRecord(): FtReadRecordResult;
|
|
2783
|
+
/**
|
|
2784
|
+
* Move to the next table in the stream.
|
|
2785
|
+
* @returns true if a new table was found, false if at end of stream.
|
|
2786
|
+
*/
|
|
2787
|
+
nextTable(): boolean;
|
|
2788
|
+
/**
|
|
2789
|
+
* Alias for nextTable() (IDataReader compatibility).
|
|
2790
|
+
* @returns true if a new table was found, false if at end of stream.
|
|
2791
|
+
*/
|
|
2792
|
+
nextResult(): boolean;
|
|
2793
|
+
/**
|
|
2794
|
+
* Seek to a specific record offset.
|
|
2795
|
+
* @param offset - The 1-based record offset to seek to.
|
|
2796
|
+
* @returns true if seek succeeded, false if offset beyond end.
|
|
2797
|
+
*/
|
|
2798
|
+
seek(offset: number): boolean;
|
|
2799
|
+
/**
|
|
2800
|
+
* Seek to the end of the stream.
|
|
2801
|
+
*/
|
|
2802
|
+
seekEnd(): void;
|
|
2803
|
+
/**
|
|
2804
|
+
* Get a field object by index.
|
|
2805
|
+
*/
|
|
2806
|
+
getField(idx: number): FtField;
|
|
2807
|
+
/**
|
|
2808
|
+
* Get a field object by name.
|
|
2809
|
+
*/
|
|
2810
|
+
getFieldByName(name: string): FtField | undefined;
|
|
2811
|
+
/**
|
|
2812
|
+
* Get a field value by index.
|
|
2813
|
+
*/
|
|
2814
|
+
getFieldValue(idx: number): unknown;
|
|
2815
|
+
/**
|
|
2816
|
+
* Get a field value by name.
|
|
2817
|
+
*/
|
|
2818
|
+
getFieldValueByName(name: string): unknown;
|
|
2819
|
+
/**
|
|
2820
|
+
* Load metadata from a pre-parsed FtMeta object.
|
|
2821
|
+
* @param meta - The metadata to load.
|
|
2822
|
+
*/
|
|
2823
|
+
loadMetaFromObject(meta: FtMeta): void;
|
|
2824
|
+
protected reset(): void;
|
|
2825
|
+
/**
|
|
2826
|
+
* Open the reader with a TextReader.
|
|
2827
|
+
* @param textReader - The text reader to read from.
|
|
2828
|
+
* @param immediatelyReadHeader - Whether to immediately read the header.
|
|
2829
|
+
*/
|
|
2830
|
+
protected open(textReader: FtTextReader, immediatelyReadHeader: boolean): void;
|
|
2831
|
+
protected getFileMetaAsText(fileMetaReference: string): FtSerializationReader.FileMetaAsTextResult | string;
|
|
2832
|
+
protected getUrlMetaAsText(urlMetaReference: string): FtSerializationReader.FileMetaAsTextResult | string;
|
|
2833
|
+
private internalReadLine;
|
|
2834
|
+
private parseChar;
|
|
2835
|
+
private calculateStartLineType;
|
|
2836
|
+
private finish;
|
|
2837
|
+
private finishLastLine;
|
|
2838
|
+
private readDeclaration;
|
|
2839
|
+
private readEmbeddedMeta;
|
|
2840
|
+
private readHeadingLines;
|
|
2841
|
+
private finishDeclaration;
|
|
2842
|
+
private finishEmbeddedMeta;
|
|
2843
|
+
private finishHeadingLine;
|
|
2844
|
+
private finishRecord;
|
|
2845
|
+
private checkCompleteness;
|
|
2846
|
+
private loadMetaFromText;
|
|
2847
|
+
}
|
|
2848
|
+
|
|
2849
|
+
/** @public */
|
|
2850
|
+
export declare namespace FtSerializationReader {
|
|
2851
|
+
export type OnRecordSeeked = (this: void) => void;
|
|
2852
|
+
export type OnRequireFileMetaAsText = (this: void, filePath: string) => FtSerializationReader.FileMetaAsTextResult | string;
|
|
2853
|
+
export type OnRequireUrlMetaAsText = (this: void, url: string) => FtSerializationReader.UrlMetaAsTextResult | string;
|
|
2854
|
+
export interface FileMetaAsTextResult {
|
|
2855
|
+
content: string;
|
|
2856
|
+
format: FtMetaSerializationFormat;
|
|
2857
|
+
}
|
|
2858
|
+
export interface UrlMetaAsTextResult {
|
|
2859
|
+
content: string;
|
|
2860
|
+
format: FtMetaSerializationFormat;
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
/**
|
|
2865
|
+
* Writer for fielded text streams. Coordinates all writing logic.
|
|
2866
|
+
* @public
|
|
2867
|
+
*/
|
|
2868
|
+
export declare class FtSerializationWriter extends SerializationCore {
|
|
2869
|
+
private static readonly DECLARATION_LINE2_BEFORE_COMMENT_CHARS;
|
|
2870
|
+
private static readonly EMBEDDED_META_BEFORE_COMMENT_CHARS;
|
|
2871
|
+
private _loadedMeta;
|
|
2872
|
+
private _writer;
|
|
2873
|
+
private _settings;
|
|
2874
|
+
private readonly _encodeBuilder;
|
|
2875
|
+
private readonly _matchBuilder;
|
|
2876
|
+
private _endOfLineText;
|
|
2877
|
+
private _lastLineEnded;
|
|
2878
|
+
private _headerWritten;
|
|
2879
|
+
private _endOfLinePending;
|
|
2880
|
+
private _activeFieldIndex;
|
|
2881
|
+
constructor(meta: FtMeta);
|
|
2882
|
+
/**
|
|
2883
|
+
* Gets the underlying text writer.
|
|
2884
|
+
*/
|
|
2885
|
+
get baseWriter(): FtTextWriter | undefined;
|
|
2886
|
+
/**
|
|
2887
|
+
* Gets whether the writer is closed.
|
|
2888
|
+
*/
|
|
2889
|
+
get isClosed(): boolean;
|
|
2890
|
+
/**
|
|
2891
|
+
* Open the writer with a FtTextWriter and optional settings.
|
|
2892
|
+
* @param textWriter - The FtTextWriter to write to
|
|
2893
|
+
* @param settings - Optional writer settings (default: \{\})
|
|
2894
|
+
*/
|
|
2895
|
+
open(textWriter: FtTextWriter, settings?: FtWriterSettings): void;
|
|
2896
|
+
/**
|
|
2897
|
+
* Close the writer.
|
|
2898
|
+
*/
|
|
2899
|
+
close(): void;
|
|
2900
|
+
/**
|
|
2901
|
+
* Write the header (declaration, embedded meta, heading lines).
|
|
2902
|
+
*/
|
|
2903
|
+
writeHeader(): void;
|
|
2904
|
+
/**
|
|
2905
|
+
* Write a record.
|
|
2906
|
+
*/
|
|
2907
|
+
write(): void;
|
|
2908
|
+
/**
|
|
2909
|
+
* Write a comment line.
|
|
2910
|
+
*/
|
|
2911
|
+
writeComment(comment: string, beforeCommentChars?: string): void;
|
|
2912
|
+
/**
|
|
2913
|
+
* Flush the writer.
|
|
2914
|
+
*/
|
|
2915
|
+
flush(): void;
|
|
2916
|
+
/**
|
|
2917
|
+
* Set a field value by index.
|
|
2918
|
+
*/
|
|
2919
|
+
setFieldValue(idx: number, value: unknown): void;
|
|
2920
|
+
/**
|
|
2921
|
+
* Set a field value by name.
|
|
2922
|
+
*/
|
|
2923
|
+
setFieldValueByName(name: string, value: unknown): void;
|
|
2924
|
+
/**
|
|
2925
|
+
* Set a field to null.
|
|
2926
|
+
*/
|
|
2927
|
+
setNull(idx: number): void;
|
|
2928
|
+
/**
|
|
2929
|
+
* Set a boolean field.
|
|
2930
|
+
*/
|
|
2931
|
+
setBoolean(idx: number, value: boolean): void;
|
|
2932
|
+
/**
|
|
2933
|
+
* Set a date/time field.
|
|
2934
|
+
*/
|
|
2935
|
+
setDateTime(idx: number, value: Date): void;
|
|
2936
|
+
/**
|
|
2937
|
+
* Set a decimal field.
|
|
2938
|
+
*/
|
|
2939
|
+
setDecimal(idx: number, value: number): void;
|
|
2940
|
+
/**
|
|
2941
|
+
* Set a float field.
|
|
2942
|
+
*/
|
|
2943
|
+
setFloat(idx: number, value: number): void;
|
|
2944
|
+
/**
|
|
2945
|
+
* Set an integer field.
|
|
2946
|
+
*/
|
|
2947
|
+
setInteger(idx: number, value: number | bigint): void;
|
|
2948
|
+
/**
|
|
2949
|
+
* Set a string field.
|
|
2950
|
+
*/
|
|
2951
|
+
setString(idx: number, value: string): void;
|
|
2952
|
+
/**
|
|
2953
|
+
* Set multiple field values.
|
|
2954
|
+
*/
|
|
2955
|
+
setValues(values: unknown[]): void;
|
|
2956
|
+
protected reset(): void;
|
|
2957
|
+
/**
|
|
2958
|
+
* Internal load metadata. Override from SerializationCore.
|
|
2959
|
+
*/
|
|
2960
|
+
protected internalLoadMeta(meta: FtMeta): void;
|
|
2961
|
+
/**
|
|
2962
|
+
* Write a single heading line by index.
|
|
2963
|
+
* @param headingLineIndex - The 0-based index of the heading line to write.
|
|
2964
|
+
*/
|
|
2965
|
+
private writeHeadingLine;
|
|
2966
|
+
/**
|
|
2967
|
+
* Write a comment line with a specific comment character.
|
|
2968
|
+
* @internal
|
|
2969
|
+
*/
|
|
2970
|
+
private writeCommentWithChar;
|
|
2971
|
+
private calculateEndOfLineText;
|
|
2972
|
+
private finishRecord;
|
|
2973
|
+
private doesTextRequireQuotes;
|
|
2974
|
+
private checkWritePendingEndOfLine;
|
|
2975
|
+
private writeOrPendEndOfLine;
|
|
2976
|
+
private writeDeclaration;
|
|
2977
|
+
private writeEmbeddedMeta;
|
|
2978
|
+
private writeHeadingLines;
|
|
2979
|
+
private writeHeadingField;
|
|
2980
|
+
private writeRecord;
|
|
2981
|
+
private writeRecordField;
|
|
2982
|
+
private encodeDelimitedValueHeadingText;
|
|
2983
|
+
private applySubstitutions;
|
|
2984
|
+
private appendToEncodeBuilder;
|
|
2985
|
+
private encodeFixedWidthValueText;
|
|
2986
|
+
private encodeFixedWidthHeadingText;
|
|
2987
|
+
private padFixedWidthText;
|
|
2988
|
+
private truncateFixedWidthText;
|
|
2989
|
+
}
|
|
2990
|
+
|
|
2991
|
+
/**
|
|
2992
|
+
* Field for string values.
|
|
2993
|
+
* @public
|
|
2994
|
+
*/
|
|
2995
|
+
export declare class FtStringField extends FtGenericField<string> {
|
|
2996
|
+
private static readonly VALUE_TEXT_NULL_TRIMMABLE;
|
|
2997
|
+
constructor(sequenceInvokation: FtSequenceInvokation, sequenceItem: FtSequenceItem, definition: FtStringFieldDefinition);
|
|
2998
|
+
get nullableValue(): string | null;
|
|
2999
|
+
set nullableValue(value: string | null);
|
|
3000
|
+
setValue(value: string | null): number;
|
|
3001
|
+
protected isValueEqual(left: string, right: string): boolean;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
/**
|
|
3005
|
+
* Field definition for string fields.
|
|
3006
|
+
* @public
|
|
3007
|
+
*/
|
|
3008
|
+
export declare class FtStringFieldDefinition extends FtGenericFieldDefinition<string> {
|
|
3009
|
+
static readonly AUTO_LEFT_PAD = false;
|
|
3010
|
+
protected formatter: FtStringFieldFormatter;
|
|
3011
|
+
constructor(index: number);
|
|
3012
|
+
getValueText(value: string): string;
|
|
3013
|
+
parseValueText(text: string): string;
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
/**
|
|
3017
|
+
* Formatter for string fields.
|
|
3018
|
+
* @public
|
|
3019
|
+
*/
|
|
3020
|
+
export declare class FtStringFieldFormatter extends FtFieldFormatter {
|
|
3021
|
+
toText(value: string): string;
|
|
3022
|
+
parse(text: string): string;
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
/**
|
|
3026
|
+
* Meta field for string values.
|
|
3027
|
+
* @public
|
|
3028
|
+
*/
|
|
3029
|
+
export declare class FtStringMetaField extends FtGenericMetaField<string> {
|
|
3030
|
+
static readonly DATA_TYPE: "String";
|
|
3031
|
+
static readonly DEFAULT_VALUE = "";
|
|
3032
|
+
static readonly DEFAULT_SEQUENCE_REDIRECT_TYPE: "ExactString";
|
|
3033
|
+
constructor(headingCount?: number);
|
|
3034
|
+
static isStringMetaField(field: FtMetaField): field is FtStringMetaField;
|
|
3035
|
+
createCopy(): FtMetaField;
|
|
3036
|
+
protected getDefaultSequenceRedirectType(): FtSequenceRedirectType;
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
/**
|
|
3040
|
+
* A TextReader implementation that reads from a string.
|
|
3041
|
+
* @public
|
|
3042
|
+
*/
|
|
3043
|
+
export declare class FtStringReader implements FtTextReader {
|
|
3044
|
+
private _text;
|
|
3045
|
+
private _position;
|
|
3046
|
+
/**
|
|
3047
|
+
* Creates a new FtStringReader.
|
|
3048
|
+
* @param text - The string to read from.
|
|
3049
|
+
*/
|
|
3050
|
+
constructor(text: string);
|
|
3051
|
+
/**
|
|
3052
|
+
* Reads the next character from the string and advances the character position by one.
|
|
3053
|
+
* @returns The character read as a number (charCode), or -1 if the end of the string has been reached.
|
|
3054
|
+
*/
|
|
3055
|
+
read(): number;
|
|
3056
|
+
/**
|
|
3057
|
+
* Closes the FtStringReader and releases resources.
|
|
3058
|
+
*/
|
|
3059
|
+
close(): void;
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3062
|
+
/**
|
|
3063
|
+
* Simple text writer that accumulates to a string array.
|
|
3064
|
+
* @public
|
|
3065
|
+
*/
|
|
3066
|
+
export declare class FtStringWriter implements FtTextWriter {
|
|
3067
|
+
private _parts;
|
|
3068
|
+
write(text: string): void;
|
|
3069
|
+
flush(): void;
|
|
3070
|
+
toString(): string;
|
|
3071
|
+
clear(): void;
|
|
3072
|
+
close(): void;
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3075
|
+
/**
|
|
3076
|
+
* @public
|
|
3077
|
+
*/
|
|
3078
|
+
export declare class FtSubstitution {
|
|
3079
|
+
id: number;
|
|
3080
|
+
token: string;
|
|
3081
|
+
value: string;
|
|
3082
|
+
constructor(id: number, token?: string, value?: string);
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
/**
|
|
3086
|
+
* Base constructor class for creating substitution instances.
|
|
3087
|
+
* Can be extended to provide custom substitution creation logic.
|
|
3088
|
+
* @public
|
|
3089
|
+
*/
|
|
3090
|
+
export declare class FtSubstitutionConstructor {
|
|
3091
|
+
/**
|
|
3092
|
+
* Create a new FtSubstitution instance for runtime use.
|
|
3093
|
+
* @param index - The index of the substitution in the list
|
|
3094
|
+
*/
|
|
3095
|
+
createSubstitution(index: number): FtSubstitution;
|
|
3096
|
+
/**
|
|
3097
|
+
* Create a new FtMetaSubstitution instance for metadata definition.
|
|
3098
|
+
*/
|
|
3099
|
+
createMetaSubstitution(): FtMetaSubstitution;
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3102
|
+
/**
|
|
3103
|
+
* Factory for creating substitution instances.
|
|
3104
|
+
* Provides a global constructor that can be replaced to customize substitution creation.
|
|
3105
|
+
* @public
|
|
3106
|
+
*/
|
|
3107
|
+
export declare class FtSubstitutionFactory {
|
|
3108
|
+
private static _constructor;
|
|
3109
|
+
/**
|
|
3110
|
+
* Get the current substitution constructor.
|
|
3111
|
+
*/
|
|
3112
|
+
static getConstructor(): FtSubstitutionConstructor;
|
|
3113
|
+
/**
|
|
3114
|
+
* Set a custom substitution constructor.
|
|
3115
|
+
* Use this to provide custom initialization logic for all substitution instances.
|
|
3116
|
+
*/
|
|
3117
|
+
static setConstructor(value: FtSubstitutionConstructor): void;
|
|
3118
|
+
/**
|
|
3119
|
+
* Create a new FtSubstitution instance using the current constructor.
|
|
3120
|
+
* @param index - The index of the substitution in the list
|
|
3121
|
+
*/
|
|
3122
|
+
static createSubstitution(index: number): FtSubstitution;
|
|
3123
|
+
/**
|
|
3124
|
+
* Create a new FtMetaSubstitution instance using the current constructor.
|
|
3125
|
+
*/
|
|
3126
|
+
static createMetaSubstitution(): FtMetaSubstitution;
|
|
3127
|
+
}
|
|
3128
|
+
|
|
3129
|
+
/**
|
|
3130
|
+
* @public
|
|
3131
|
+
*/
|
|
3132
|
+
declare class FtSubstitutionList {
|
|
3133
|
+
private list;
|
|
3134
|
+
get count(): number;
|
|
3135
|
+
get(index: number): FtSubstitution;
|
|
3136
|
+
clear(): void;
|
|
3137
|
+
new(): FtSubstitution;
|
|
3138
|
+
tryGetValue(token: string): {
|
|
3139
|
+
found: boolean;
|
|
3140
|
+
value: string;
|
|
3141
|
+
};
|
|
3142
|
+
tryGetFirstMatching(text: string, startIndex: number): {
|
|
3143
|
+
found: boolean;
|
|
3144
|
+
token: string;
|
|
3145
|
+
valueLength: number;
|
|
3146
|
+
};
|
|
3147
|
+
}
|
|
3148
|
+
|
|
3149
|
+
/**
|
|
3150
|
+
* Specifies substitution type
|
|
3151
|
+
* @public
|
|
3152
|
+
*/
|
|
3153
|
+
export declare const FtSubstitutionType: {
|
|
3154
|
+
/**
|
|
3155
|
+
* Substitution Type where Substitution Pair (Character and Token) are replaced by a string
|
|
3156
|
+
*/
|
|
3157
|
+
readonly String: "String";
|
|
3158
|
+
readonly AutoEndOfLine: "AutoEndOfLine";
|
|
3159
|
+
};
|
|
3160
|
+
|
|
3161
|
+
/**
|
|
3162
|
+
* @public
|
|
3163
|
+
*/
|
|
3164
|
+
export declare type FtSubstitutionType = (typeof FtSubstitutionType)[keyof typeof FtSubstitutionType];
|
|
3165
|
+
|
|
3166
|
+
/**
|
|
3167
|
+
* Interface for reading characters from a text source.
|
|
3168
|
+
* Mirrors .NET's TextReader for compatibility with C# implementation.
|
|
3169
|
+
* @public
|
|
3170
|
+
*/
|
|
3171
|
+
export declare interface FtTextReader {
|
|
3172
|
+
/**
|
|
3173
|
+
* Reads the next character from the text reader and advances the character position by one character.
|
|
3174
|
+
* @returns The character read as a number (charCode), or -1 if the end of the text has been reached.
|
|
3175
|
+
*/
|
|
3176
|
+
read(): number;
|
|
3177
|
+
}
|
|
3178
|
+
|
|
3179
|
+
/**
|
|
3180
|
+
* Namespace merged with TextReader interface to provide static constants.
|
|
3181
|
+
* @public
|
|
3182
|
+
*/
|
|
3183
|
+
export declare namespace FtTextReader {
|
|
3184
|
+
/**
|
|
3185
|
+
* Value returned by read() when the end of the text reader has been reached.
|
|
3186
|
+
* Matches .NET's TextReader behavior.
|
|
3187
|
+
*/
|
|
3188
|
+
const EofReadResult = -1;
|
|
3189
|
+
}
|
|
3190
|
+
|
|
3191
|
+
/**
|
|
3192
|
+
* Writer interface for outputting text.
|
|
3193
|
+
* @public
|
|
3194
|
+
*/
|
|
3195
|
+
export declare interface FtTextWriter {
|
|
3196
|
+
write(text: string): void;
|
|
3197
|
+
flush(): void;
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
/**
|
|
3201
|
+
* @public
|
|
3202
|
+
*/
|
|
3203
|
+
export declare const FtTruncateType: {
|
|
3204
|
+
readonly Left: "Left";
|
|
3205
|
+
readonly Right: "Right";
|
|
3206
|
+
readonly TruncateChar: "TruncateChar";
|
|
3207
|
+
readonly NullChar: "NullChar";
|
|
3208
|
+
readonly Exception: "Exception";
|
|
3209
|
+
};
|
|
3210
|
+
|
|
3211
|
+
/**
|
|
3212
|
+
* @public
|
|
3213
|
+
*/
|
|
3214
|
+
export declare type FtTruncateType = (typeof FtTruncateType)[keyof typeof FtTruncateType];
|
|
3215
|
+
|
|
3216
|
+
/**
|
|
3217
|
+
* High-level writer for fielded text files.
|
|
3218
|
+
* Provides a convenient API for writing CSV and other delimited/fixed-width text.
|
|
3219
|
+
* This is a thin wrapper around SerializationWriter with simpler constructors.
|
|
3220
|
+
* @public
|
|
3221
|
+
*/
|
|
3222
|
+
export declare class FtWriter extends FtSerializationWriter {
|
|
3223
|
+
/**
|
|
3224
|
+
* Create a writer with metadata and output writer.
|
|
3225
|
+
* @param meta - The metadata defining the file structure
|
|
3226
|
+
* @param textWriter - The FtTextWriter to write to. If not provided, FtWriter will be created but not opened (you must call open() before writing).
|
|
3227
|
+
* @param settings - Optional writer settings
|
|
3228
|
+
*/
|
|
3229
|
+
constructor(meta: FtMeta, textWriter?: FtTextWriter, settings?: FtWriterSettings);
|
|
3230
|
+
}
|
|
3231
|
+
|
|
3232
|
+
/**
|
|
3233
|
+
* Settings for writing fielded text streams.
|
|
3234
|
+
* @public
|
|
3235
|
+
*/
|
|
3236
|
+
export declare interface FtWriterSettings {
|
|
3237
|
+
/**
|
|
3238
|
+
* Whether to write the |!Fielded Text^| declaration header.
|
|
3239
|
+
*/
|
|
3240
|
+
declared?: boolean;
|
|
3241
|
+
/**
|
|
3242
|
+
* Type of meta reference to write.
|
|
3243
|
+
*/
|
|
3244
|
+
metaReferenceType?: FtMetaReferenceType;
|
|
3245
|
+
/**
|
|
3246
|
+
* Meta reference (file path or URL).
|
|
3247
|
+
*/
|
|
3248
|
+
metaReference?: string;
|
|
3249
|
+
/**
|
|
3250
|
+
* Format of embedded meta to write.
|
|
3251
|
+
*/
|
|
3252
|
+
embeddedMetaFormat?: FtMetaSerializationFormat;
|
|
3253
|
+
/**
|
|
3254
|
+
* Whether to include explicit index attributes for fields in embedded meta.
|
|
3255
|
+
*/
|
|
3256
|
+
embeddedMetaExplicitIndices?: boolean;
|
|
3257
|
+
/**
|
|
3258
|
+
* Whether to indent embedded XML metadata.
|
|
3259
|
+
*/
|
|
3260
|
+
embeddedMetaIndent?: boolean;
|
|
3261
|
+
/**
|
|
3262
|
+
* Characters to use for indenting embedded XML metadata.
|
|
3263
|
+
*/
|
|
3264
|
+
embeddedMetaIndentChars?: string;
|
|
3265
|
+
/**
|
|
3266
|
+
* Whether to write XML attributes on separate lines.
|
|
3267
|
+
*/
|
|
3268
|
+
embeddedMetaNewLineOnAttributes?: boolean;
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
/** @public */
|
|
3272
|
+
export declare namespace FtWriterSettings {
|
|
3273
|
+
const DEFAULT_DECLARED = false;
|
|
3274
|
+
const DEFAULT_META_REFERENCE_TYPE: "None";
|
|
3275
|
+
const DEFAULT_META_REFERENCE = "";
|
|
3276
|
+
const DEFAULT_EMBEDDED_META_FORMAT: "XML";
|
|
3277
|
+
const DEFAULT_EMBEDDED_META_EXPLICIT_INDICES = false;
|
|
3278
|
+
const DEFAULT_EMBEDDED_META_INDENT = true;
|
|
3279
|
+
const DEFAULT_EMBEDDED_META_INDENT_CHARS = " ";
|
|
3280
|
+
const DEFAULT_EMBEDDED_META_NEW_LINE_ON_ATTRIBUTES = false;
|
|
3281
|
+
export function loadMetaSerializerOptions(settings: FtWriterSettings, options: Partial<FtMetaSerializerOptions>): void;
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* Serializes and deserializes FtMeta to/from XML format.
|
|
3286
|
+
* Compatible with the C# XmlMetaSerializationWriter/Reader implementation.
|
|
3287
|
+
*
|
|
3288
|
+
* Note: The "\@_" prefix is used by fast-xml-parser to distinguish XML attributes
|
|
3289
|
+
* from XML elements. Properties starting with "\@_" become XML attributes when
|
|
3290
|
+
* serialized, and XML attributes are prefixed with "\@_" when deserialized.
|
|
3291
|
+
* @public
|
|
3292
|
+
*/
|
|
3293
|
+
export declare class FtXmlMetaSerialization {
|
|
3294
|
+
/**
|
|
3295
|
+
* Serialize an FtMeta object to XML string.
|
|
3296
|
+
*/
|
|
3297
|
+
serialize(meta: FtMeta, options?: FtMetaSerializerOptions): string;
|
|
3298
|
+
/**
|
|
3299
|
+
* Deserialize XML string to an FtMeta object.
|
|
3300
|
+
*/
|
|
3301
|
+
deserialize(xml: string, warnings?: string[]): FtMeta;
|
|
3302
|
+
private serializeSubstitution;
|
|
3303
|
+
private serializeField;
|
|
3304
|
+
private serializeSequence;
|
|
3305
|
+
private serializeSequenceItem;
|
|
3306
|
+
private serializeRedirect;
|
|
3307
|
+
private deserializeRootProperties;
|
|
3308
|
+
private deserializeField;
|
|
3309
|
+
private deserializeSequence;
|
|
3310
|
+
private deserializeSequenceItem;
|
|
3311
|
+
private deserializeRedirect;
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
/** @public */
|
|
3315
|
+
export declare namespace FtXmlMetaSerialization {
|
|
3316
|
+
export function serialize(meta: FtMeta, options?: FtMetaSerializerOptions): string;
|
|
3317
|
+
export function deserialize(xml: string, warnings?: string[]): FtMeta;
|
|
3318
|
+
}
|
|
3319
|
+
|
|
3320
|
+
export { Result }
|
|
3321
|
+
|
|
3322
|
+
/**
|
|
3323
|
+
* @public
|
|
3324
|
+
*/
|
|
3325
|
+
declare type RootedEventHandler = (sequence: FtMetaSequence) => void;
|
|
3326
|
+
|
|
3327
|
+
/**
|
|
3328
|
+
* Base class for serialization (reading/writing).
|
|
3329
|
+
* Manages configuration, field lists, sequences, and events.
|
|
3330
|
+
* @public
|
|
3331
|
+
*/
|
|
3332
|
+
declare abstract class SerializationCore {
|
|
3333
|
+
static readonly VersionMajor = 1;
|
|
3334
|
+
static readonly VersionMinor = 1;
|
|
3335
|
+
static readonly PrefixSpaceChar = " ";
|
|
3336
|
+
protected static readonly Signature = "|!Fielded Text^|";
|
|
3337
|
+
protected static readonly VersionLabel = "Version";
|
|
3338
|
+
protected static readonly VersionSeparator = ".";
|
|
3339
|
+
protected static readonly CarriageReturnChar = "\r";
|
|
3340
|
+
protected static readonly LineFeedChar = "\n";
|
|
3341
|
+
protected static readonly CarriageReturnLineFeedString = "\r\n";
|
|
3342
|
+
onFieldHeadingReadReady?: (args: FtFieldHeadingReadyEventArgs) => void;
|
|
3343
|
+
onFieldHeadingWriteReady?: (args: FtFieldHeadingReadyEventArgs) => void;
|
|
3344
|
+
onFieldValueReadReady?: (args: FtFieldValueReadyEventArgs) => void;
|
|
3345
|
+
onFieldValueWriteReady?: (args: FtFieldValueReadyEventArgs) => void;
|
|
3346
|
+
onHeadingLineStarted?: (args: FtHeadingLineStartedEventArgs) => void;
|
|
3347
|
+
onHeadingLineFinished?: (args: FtHeadingLineFinishedEventArgs) => void;
|
|
3348
|
+
onRecordStarted?: (args: FtRecordStartedEventArgs) => void;
|
|
3349
|
+
onRecordFinished?: (args: FtRecordFinishedEventArgs) => void;
|
|
3350
|
+
onSequenceRedirected?: (args: FtSequenceRedirectedEventArgs) => void;
|
|
3351
|
+
protected _recordCount: number;
|
|
3352
|
+
protected _tableCount: number;
|
|
3353
|
+
private _fieldDefinitionList;
|
|
3354
|
+
private _fieldList;
|
|
3355
|
+
private _substitutionList;
|
|
3356
|
+
private _sequenceList;
|
|
3357
|
+
private _culture;
|
|
3358
|
+
private _endOfLineType;
|
|
3359
|
+
private _endOfLineChar;
|
|
3360
|
+
private _endOfLineAutoWriteType;
|
|
3361
|
+
private _lastLineEndedType;
|
|
3362
|
+
private _quoteChar;
|
|
3363
|
+
private _delimiterChar;
|
|
3364
|
+
private _lineCommentChar;
|
|
3365
|
+
private _allowEndOfLineCharInQuotes;
|
|
3366
|
+
private _ignoreBlankLines;
|
|
3367
|
+
private _ignoreExtraChars;
|
|
3368
|
+
private _allowIncompleteRecords;
|
|
3369
|
+
private _stuffedEmbeddedQuotes;
|
|
3370
|
+
private _substitutionsEnabled;
|
|
3371
|
+
private _substitutionChar;
|
|
3372
|
+
private _headingLineCount;
|
|
3373
|
+
private _mainHeadingLineIndex;
|
|
3374
|
+
private _headingConstraint;
|
|
3375
|
+
private _headingQuotedType;
|
|
3376
|
+
private _headingAlwaysWriteOptionalQuote;
|
|
3377
|
+
private _headingWritePrefixSpace;
|
|
3378
|
+
private _headingPadAlignment;
|
|
3379
|
+
private _headingPadCharType;
|
|
3380
|
+
private _headingPadChar;
|
|
3381
|
+
private _headingTruncateType;
|
|
3382
|
+
private _headingTruncateChar;
|
|
3383
|
+
private _headingEndOfValueChar;
|
|
3384
|
+
private _rootSequence;
|
|
3385
|
+
private _rootFieldCount;
|
|
3386
|
+
private _sequenceInvokationList;
|
|
3387
|
+
private _previousRecordSequenceInvokationList;
|
|
3388
|
+
private _rootSequenceInvokation;
|
|
3389
|
+
private _seeking;
|
|
3390
|
+
protected constructor();
|
|
3391
|
+
get fieldDefinitionList(): FtFieldDefinitionList;
|
|
3392
|
+
get fieldList(): FtFieldList;
|
|
3393
|
+
get substitutionList(): FtSubstitutionList;
|
|
3394
|
+
get sequenceList(): FtSequenceList;
|
|
3395
|
+
get sequenceInvokationList(): FtSequenceInvokationList;
|
|
3396
|
+
get previousRecordSequenceInvokationList(): FtSequenceInvokationList;
|
|
3397
|
+
get rootSequence(): FtSequence | undefined;
|
|
3398
|
+
get rootFieldCount(): number;
|
|
3399
|
+
get rootSequenceInvokation(): FtSequenceInvokation | undefined;
|
|
3400
|
+
get seeking(): boolean;
|
|
3401
|
+
get recordCount(): number;
|
|
3402
|
+
get tableCount(): number;
|
|
3403
|
+
get culture(): DotNetLocaleSettings;
|
|
3404
|
+
get endOfLineType(): FtEndOfLineType;
|
|
3405
|
+
get endOfLineChar(): string;
|
|
3406
|
+
get endOfLineAutoWriteType(): FtEndOfLineAutoWriteType;
|
|
3407
|
+
get lastLineEndedType(): FtLastLineEndedType;
|
|
3408
|
+
get quoteChar(): string;
|
|
3409
|
+
get delimiterChar(): string;
|
|
3410
|
+
get lineCommentChar(): string;
|
|
3411
|
+
get allowEndOfLineCharInQuotes(): boolean;
|
|
3412
|
+
get ignoreBlankLines(): boolean;
|
|
3413
|
+
get ignoreExtraChars(): boolean;
|
|
3414
|
+
get allowIncompleteRecords(): boolean;
|
|
3415
|
+
get stuffedEmbeddedQuotes(): boolean;
|
|
3416
|
+
get substitutionsEnabled(): boolean;
|
|
3417
|
+
get substitutionChar(): string;
|
|
3418
|
+
get headingLineCount(): number;
|
|
3419
|
+
get mainHeadingLineIndex(): number;
|
|
3420
|
+
get headingConstraint(): FtHeadingConstraint;
|
|
3421
|
+
get headingQuotedType(): FtQuotedType;
|
|
3422
|
+
get headingAlwaysWriteOptionalQuote(): boolean;
|
|
3423
|
+
get headingWritePrefixSpace(): boolean;
|
|
3424
|
+
get headingPadAlignment(): FtPadAlignment;
|
|
3425
|
+
get headingPadCharType(): FtPadCharType;
|
|
3426
|
+
get headingPadChar(): string;
|
|
3427
|
+
get headingTruncateType(): FtTruncateType;
|
|
3428
|
+
get headingTruncateChar(): string;
|
|
3429
|
+
get headingEndOfValueChar(): string;
|
|
3430
|
+
get fieldCount(): number;
|
|
3431
|
+
get depth(): number;
|
|
3432
|
+
abstract get isClosed(): boolean;
|
|
3433
|
+
getName(idx: number): string;
|
|
3434
|
+
getOrdinal(name: string): number;
|
|
3435
|
+
getValueType(idx: number): string;
|
|
3436
|
+
isDBNull(idx: number): boolean;
|
|
3437
|
+
tryGetSubstitutionValue(token: string): {
|
|
3438
|
+
found: boolean;
|
|
3439
|
+
value: string;
|
|
3440
|
+
};
|
|
3441
|
+
/**
|
|
3442
|
+
* Load configuration from FtMeta.
|
|
3443
|
+
*/
|
|
3444
|
+
loadMeta(meta: FtMeta): void;
|
|
3445
|
+
/**
|
|
3446
|
+
* Invoke the root sequence to begin reading/writing.
|
|
3447
|
+
* @internal For testing purposes, can be called to initialize field list.
|
|
3448
|
+
*/
|
|
3449
|
+
invokeRootSequence(): void;
|
|
3450
|
+
/** @internal */
|
|
3451
|
+
fireFieldHeadingReadReady(field: FtField, lineIndex: number): void;
|
|
3452
|
+
/** @internal */
|
|
3453
|
+
fireFieldValueReadReady(field: FtField, recordIndex: number): void;
|
|
3454
|
+
protected internalLoadMeta(meta: FtMeta): void;
|
|
3455
|
+
protected setSeeking(value: boolean): void;
|
|
3456
|
+
protected setLineCommentChar(aChar: string): void;
|
|
3457
|
+
protected redirect(redirectingField: FtField, invokedSequence: FtSequence, invokationDelay: FtSequenceInvokationDelay): number;
|
|
3458
|
+
protected unredirect(unredirectingField: FtField): number;
|
|
3459
|
+
protected fireFieldHeadingWriteReady(field: FtField, lineIndex: number): void;
|
|
3460
|
+
protected fireFieldValueWriteReady(field: FtField, recordIndex: number): void;
|
|
3461
|
+
protected fireHeadingLineStarted(lineIndex: number): void;
|
|
3462
|
+
protected fireHeadingLineFinished(lineIndex: number): void;
|
|
3463
|
+
protected fireRecordStarted(recordIndex: number): void;
|
|
3464
|
+
protected fireRecordFinished(recordIndex: number): void;
|
|
3465
|
+
protected fireSequenceRedirected(redirectingField: FtField, fieldsAffectedFromIndex: number): void;
|
|
3466
|
+
/**
|
|
3467
|
+
* Reset serialization state.
|
|
3468
|
+
*/
|
|
3469
|
+
protected reset(): void;
|
|
3470
|
+
private resetAllFieldValues;
|
|
3471
|
+
private resetFieldValues;
|
|
3472
|
+
private handleSequenceRedirectEvent;
|
|
3473
|
+
private calculateAutoEndOfLineSubstitutionValue;
|
|
3474
|
+
abstract close(): void;
|
|
3475
|
+
}
|
|
3476
|
+
|
|
3477
|
+
declare interface Version {
|
|
3478
|
+
major: number;
|
|
3479
|
+
minor: number;
|
|
3480
|
+
comment: string;
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
export { }
|