@eightyfourthousand/data-access 2026.4.0 → 2026.4.2
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/index.js +18 -0
- package/index.js.map +1 -0
- package/lib/auth.d.ts +59 -0
- package/lib/auth.js +134 -0
- package/lib/auth.js.map +1 -0
- package/lib/bibliography.d.ts +9 -0
- package/lib/bibliography.js +30 -0
- package/lib/bibliography.js.map +1 -0
- package/lib/client-browser.d.ts +1 -0
- package/lib/client-browser.js +10 -0
- package/lib/client-browser.js.map +1 -0
- package/lib/client-server.d.ts +4 -0
- package/lib/client-server.js +19 -0
- package/lib/client-server.js.map +1 -0
- package/lib/client-ssr.d.ts +1 -0
- package/lib/client-ssr.js +23 -0
- package/lib/client-ssr.js.map +1 -0
- package/lib/client-token.d.ts +7 -0
- package/lib/client-token.js +21 -0
- package/lib/client-token.js.map +1 -0
- package/lib/feedback.d.ts +6 -0
- package/lib/feedback.js +45 -0
- package/lib/feedback.js.map +1 -0
- package/lib/folio.d.ts +11 -0
- package/lib/folio.js +31 -0
- package/lib/folio.js.map +1 -0
- package/lib/glossary/batch.d.ts +5 -0
- package/lib/glossary/batch.js +22 -0
- package/lib/glossary/batch.js.map +1 -0
- package/lib/glossary/index.js +5 -0
- package/lib/glossary/index.js.map +1 -0
- package/lib/glossary/instance.d.ts +10 -0
- package/lib/glossary/instance.js +28 -0
- package/lib/glossary/instance.js.map +1 -0
- package/lib/glossary/landing.d.ts +5 -0
- package/lib/glossary/landing.js +32 -0
- package/lib/glossary/landing.js.map +1 -0
- package/lib/glossary/pagination.d.ts +55 -0
- package/lib/glossary/pagination.js +254 -0
- package/lib/glossary/pagination.js.map +1 -0
- package/lib/imprint.d.ts +10 -0
- package/lib/imprint.js +23 -0
- package/lib/imprint.js.map +1 -0
- package/lib/library.d.ts +58 -0
- package/lib/library.js +118 -0
- package/lib/library.js.map +1 -0
- package/lib/local-storage.d.ts +10 -0
- package/lib/local-storage.js +25 -0
- package/lib/local-storage.js.map +1 -0
- package/lib/lookup-entity.d.ts +7 -0
- package/lib/lookup-entity.js +93 -0
- package/lib/lookup-entity.js.map +1 -0
- package/lib/panel-url.d.ts +10 -0
- package/lib/panel-url.js +23 -0
- package/lib/panel-url.js.map +1 -0
- package/lib/passage/batch.d.ts +17 -0
- package/lib/passage/batch.js +155 -0
- package/lib/passage/batch.js.map +1 -0
- package/lib/passage/index.js +6 -0
- package/lib/passage/index.js.map +1 -0
- package/lib/passage/pagination.d.ts +43 -0
- package/lib/passage/pagination.js +167 -0
- package/lib/passage/pagination.js.map +1 -0
- package/lib/passage/read.d.ts +15 -0
- package/lib/passage/read.js +59 -0
- package/lib/passage/read.js.map +1 -0
- package/lib/passage/replace-persistence.d.ts +46 -0
- package/lib/passage/replace-persistence.js +93 -0
- package/lib/passage/replace-persistence.js.map +1 -0
- package/lib/passage/save.d.ts +16 -0
- package/lib/passage/save.js +227 -0
- package/lib/passage/save.js.map +1 -0
- package/lib/proxy.d.ts +7 -0
- package/lib/proxy.js +45 -0
- package/lib/proxy.js.map +1 -0
- package/lib/publications.d.ts +86 -0
- package/lib/publications.js +223 -0
- package/lib/publications.js.map +1 -0
- package/lib/replace.d.ts +31 -0
- package/lib/replace.js +151 -0
- package/lib/replace.js.map +1 -0
- package/lib/storage.d.ts +7 -0
- package/lib/storage.js +10 -0
- package/lib/storage.js.map +1 -0
- package/lib/types/alignment.d.ts +18 -0
- package/lib/types/alignment.js +13 -0
- package/lib/types/alignment.js.map +1 -0
- package/lib/types/annotation/abbreviation.d.ts +3 -0
- package/lib/types/annotation/abbreviation.js +20 -0
- package/lib/types/annotation/abbreviation.js.map +1 -0
- package/lib/types/annotation/annotation-type.d.ts +31 -0
- package/lib/types/annotation/annotation-type.js +81 -0
- package/lib/types/annotation/annotation-type.js.map +1 -0
- package/lib/types/annotation/annotation.d.ts +142 -0
- package/lib/types/annotation/annotation.js +23 -0
- package/lib/types/annotation/annotation.js.map +1 -0
- package/lib/types/annotation/audio.d.ts +3 -0
- package/lib/types/annotation/audio.js +24 -0
- package/lib/types/annotation/audio.js.map +1 -0
- package/lib/types/annotation/blockquote.d.ts +3 -0
- package/lib/types/annotation/blockquote.js +8 -0
- package/lib/types/annotation/blockquote.js.map +1 -0
- package/lib/types/annotation/code.d.ts +3 -0
- package/lib/types/annotation/code.js +8 -0
- package/lib/types/annotation/code.js.map +1 -0
- package/lib/types/annotation/deprecated.d.ts +3 -0
- package/lib/types/annotation/deprecated.js +8 -0
- package/lib/types/annotation/deprecated.js.map +1 -0
- package/lib/types/annotation/end-note-link.d.ts +3 -0
- package/lib/types/annotation/end-note-link.js +23 -0
- package/lib/types/annotation/end-note-link.js.map +1 -0
- package/lib/types/annotation/export.d.ts +3 -0
- package/{src/lib/types/annotation/export.ts → lib/types/annotation/export.js} +34 -36
- package/lib/types/annotation/export.js.map +1 -0
- package/lib/types/annotation/glossary-instance.d.ts +3 -0
- package/lib/types/annotation/glossary-instance.js +23 -0
- package/lib/types/annotation/glossary-instance.js.map +1 -0
- package/lib/types/annotation/has-abbreviation.d.ts +3 -0
- package/lib/types/annotation/has-abbreviation.js +20 -0
- package/lib/types/annotation/has-abbreviation.js.map +1 -0
- package/lib/types/annotation/heading.d.ts +3 -0
- package/lib/types/annotation/heading.js +26 -0
- package/lib/types/annotation/heading.js.map +1 -0
- package/lib/types/annotation/image.d.ts +3 -0
- package/lib/types/annotation/image.js +20 -0
- package/lib/types/annotation/image.js.map +1 -0
- package/lib/types/annotation/indent.d.ts +3 -0
- package/lib/types/annotation/indent.js +8 -0
- package/lib/types/annotation/indent.js.map +1 -0
- package/lib/types/annotation/index.js +5 -0
- package/lib/types/annotation/index.js.map +1 -0
- package/lib/types/annotation/inline-title.d.ts +3 -0
- package/lib/types/annotation/inline-title.js +21 -0
- package/lib/types/annotation/inline-title.js.map +1 -0
- package/lib/types/annotation/internal-link.d.ts +3 -0
- package/lib/types/annotation/internal-link.js +62 -0
- package/lib/types/annotation/internal-link.js.map +1 -0
- package/lib/types/annotation/leading-space.d.ts +3 -0
- package/lib/types/annotation/leading-space.js +8 -0
- package/lib/types/annotation/leading-space.js.map +1 -0
- package/lib/types/annotation/line-group.d.ts +3 -0
- package/lib/types/annotation/line-group.js +8 -0
- package/lib/types/annotation/line-group.js.map +1 -0
- package/lib/types/annotation/line.d.ts +3 -0
- package/lib/types/annotation/line.js +8 -0
- package/lib/types/annotation/line.js.map +1 -0
- package/lib/types/annotation/link.d.ts +3 -0
- package/lib/types/annotation/link.js +27 -0
- package/lib/types/annotation/link.js.map +1 -0
- package/lib/types/annotation/list-item.d.ts +3 -0
- package/lib/types/annotation/list-item.js +8 -0
- package/lib/types/annotation/list-item.js.map +1 -0
- package/lib/types/annotation/list.d.ts +3 -0
- package/lib/types/annotation/list.js +31 -0
- package/lib/types/annotation/list.js.map +1 -0
- package/lib/types/annotation/mantra.d.ts +3 -0
- package/lib/types/annotation/mantra.js +21 -0
- package/lib/types/annotation/mantra.js.map +1 -0
- package/lib/types/annotation/mention.d.ts +3 -0
- package/lib/types/annotation/mention.js +50 -0
- package/lib/types/annotation/mention.js.map +1 -0
- package/lib/types/annotation/paragraph.d.ts +3 -0
- package/lib/types/annotation/paragraph.js +8 -0
- package/lib/types/annotation/paragraph.js.map +1 -0
- package/lib/types/annotation/quote.d.ts +3 -0
- package/lib/types/annotation/quote.js +21 -0
- package/lib/types/annotation/quote.js.map +1 -0
- package/lib/types/annotation/quoted.d.ts +3 -0
- package/lib/types/annotation/quoted.js +21 -0
- package/lib/types/annotation/quoted.js.map +1 -0
- package/lib/types/annotation/reference.d.ts +3 -0
- package/lib/types/annotation/reference.js +8 -0
- package/lib/types/annotation/reference.js.map +1 -0
- package/lib/types/annotation/span.d.ts +3 -0
- package/lib/types/annotation/span.js +29 -0
- package/lib/types/annotation/span.js.map +1 -0
- package/lib/types/annotation/table-body-data.d.ts +3 -0
- package/lib/types/annotation/table-body-data.js +8 -0
- package/lib/types/annotation/table-body-data.js.map +1 -0
- package/lib/types/annotation/table-body-header.d.ts +3 -0
- package/lib/types/annotation/table-body-header.js +8 -0
- package/lib/types/annotation/table-body-header.js.map +1 -0
- package/lib/types/annotation/table-body-row.d.ts +3 -0
- package/lib/types/annotation/table-body-row.js +8 -0
- package/lib/types/annotation/table-body-row.js.map +1 -0
- package/lib/types/annotation/table.d.ts +3 -0
- package/lib/types/annotation/table.js +8 -0
- package/lib/types/annotation/table.js.map +1 -0
- package/lib/types/annotation/trailer.d.ts +3 -0
- package/lib/types/annotation/trailer.js +8 -0
- package/lib/types/annotation/trailer.js.map +1 -0
- package/lib/types/annotation/transform.d.ts +6 -0
- package/lib/types/annotation/transform.js +109 -0
- package/lib/types/annotation/transform.js.map +1 -0
- package/lib/types/annotation/unknown.d.ts +3 -0
- package/lib/types/annotation/unknown.js +8 -0
- package/lib/types/annotation/unknown.js.map +1 -0
- package/lib/types/bibliography.d.ts +41 -0
- package/lib/types/bibliography.js +29 -0
- package/lib/types/bibliography.js.map +1 -0
- package/{src/lib/types/client.ts → lib/types/client.d.ts} +0 -1
- package/lib/types/client.js +2 -0
- package/lib/types/client.js.map +1 -0
- package/{src/lib/types/editor-content.ts → lib/types/editor-content.d.ts} +7 -11
- package/lib/types/editor-content.js +2 -0
- package/lib/types/editor-content.js.map +1 -0
- package/lib/types/folio.d.ts +17 -0
- package/lib/types/folio.js +11 -0
- package/lib/types/folio.js.map +1 -0
- package/lib/types/glossary-page.d.ts +48 -0
- package/lib/types/glossary-page.js +21 -0
- package/lib/types/glossary-page.js.map +1 -0
- package/lib/types/glossary.d.ts +76 -0
- package/lib/types/glossary.js +32 -0
- package/lib/types/glossary.js.map +1 -0
- package/lib/types/imprint.d.ts +78 -0
- package/lib/types/imprint.js +78 -0
- package/lib/types/imprint.js.map +1 -0
- package/lib/types/index.js +20 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/language.d.ts +9 -0
- package/lib/types/language.js +41 -0
- package/lib/types/language.js.map +1 -0
- package/lib/types/layout.d.ts +5 -0
- package/lib/types/layout.js +23 -0
- package/lib/types/layout.js.map +1 -0
- package/lib/types/library.d.ts +19 -0
- package/lib/types/library.js +8 -0
- package/lib/types/library.js.map +1 -0
- package/lib/types/passage.d.ts +73 -0
- package/lib/types/passage.js +123 -0
- package/lib/types/passage.js.map +1 -0
- package/lib/types/semver.js +2 -0
- package/lib/types/semver.js.map +1 -0
- package/lib/types/title.d.ts +21 -0
- package/lib/types/title.js +21 -0
- package/lib/types/title.js.map +1 -0
- package/lib/types/toh.js +2 -0
- package/lib/types/toh.js.map +1 -0
- package/{src/lib/types/translation.ts → lib/types/translation.d.ts} +5 -7
- package/lib/types/translation.js +2 -0
- package/lib/types/translation.js.map +1 -0
- package/{src/lib/types/user.ts → lib/types/user.d.ts} +2 -11
- package/lib/types/user.js +9 -0
- package/lib/types/user.js.map +1 -0
- package/lib/types/work.d.ts +37 -0
- package/lib/types/work.js +12 -0
- package/lib/types/work.js.map +1 -0
- package/lib/use-bookmark.d.ts +10 -0
- package/lib/use-bookmark.js +30 -0
- package/lib/use-bookmark.js.map +1 -0
- package/package.json +25 -3
- package/ssr.js +6 -0
- package/ssr.js.map +1 -0
- package/.babelrc +0 -12
- package/.eslintrc.json +0 -18
- package/README.md +0 -9
- package/jest.config.ts +0 -10
- package/project.json +0 -21
- package/src/lib/auth.ts +0 -203
- package/src/lib/bibliography.ts +0 -57
- package/src/lib/client-browser.ts +0 -12
- package/src/lib/client-server.ts +0 -30
- package/src/lib/client-ssr.ts +0 -24
- package/src/lib/client-token.ts +0 -24
- package/src/lib/feedback.ts +0 -71
- package/src/lib/folio.ts +0 -57
- package/src/lib/glossary/batch.ts +0 -35
- package/src/lib/glossary/instance.ts +0 -54
- package/src/lib/glossary/landing.ts +0 -50
- package/src/lib/glossary/pagination.ts +0 -471
- package/src/lib/imprint.ts +0 -42
- package/src/lib/library.ts +0 -209
- package/src/lib/local-storage.ts +0 -33
- package/src/lib/lookup-entity.ts +0 -122
- package/src/lib/panel-url.ts +0 -43
- package/src/lib/passage/batch.ts +0 -229
- package/src/lib/passage/pagination.ts +0 -277
- package/src/lib/passage/read.ts +0 -100
- package/src/lib/passage/replace-persistence.ts +0 -153
- package/src/lib/passage/save.ts +0 -324
- package/src/lib/proxy.ts +0 -68
- package/src/lib/publications.ts +0 -381
- package/src/lib/replace.spec.ts +0 -154
- package/src/lib/replace.ts +0 -244
- package/src/lib/storage.ts +0 -23
- package/src/lib/types/alignment.ts +0 -32
- package/src/lib/types/annotation/abbreviation.ts +0 -30
- package/src/lib/types/annotation/annotation-type.ts +0 -219
- package/src/lib/types/annotation/annotation.ts +0 -244
- package/src/lib/types/annotation/audio.ts +0 -33
- package/src/lib/types/annotation/blockquote.ts +0 -18
- package/src/lib/types/annotation/code.ts +0 -16
- package/src/lib/types/annotation/deprecated.ts +0 -18
- package/src/lib/types/annotation/end-note-link.ts +0 -35
- package/src/lib/types/annotation/glossary-instance.ts +0 -34
- package/src/lib/types/annotation/has-abbreviation.ts +0 -30
- package/src/lib/types/annotation/heading.ts +0 -37
- package/src/lib/types/annotation/image.ts +0 -29
- package/src/lib/types/annotation/indent.ts +0 -16
- package/src/lib/types/annotation/inline-title.ts +0 -34
- package/src/lib/types/annotation/internal-link.ts +0 -86
- package/src/lib/types/annotation/leading-space.ts +0 -18
- package/src/lib/types/annotation/line-group.ts +0 -18
- package/src/lib/types/annotation/line.ts +0 -16
- package/src/lib/types/annotation/link.ts +0 -38
- package/src/lib/types/annotation/list-item.ts +0 -16
- package/src/lib/types/annotation/list.ts +0 -43
- package/src/lib/types/annotation/mantra.ts +0 -31
- package/src/lib/types/annotation/mention.ts +0 -64
- package/src/lib/types/annotation/paragraph.ts +0 -18
- package/src/lib/types/annotation/quote.ts +0 -30
- package/src/lib/types/annotation/quoted.ts +0 -30
- package/src/lib/types/annotation/reference.ts +0 -18
- package/src/lib/types/annotation/span.ts +0 -39
- package/src/lib/types/annotation/table-body-data.ts +0 -18
- package/src/lib/types/annotation/table-body-header.ts +0 -18
- package/src/lib/types/annotation/table-body-row.ts +0 -18
- package/src/lib/types/annotation/table.ts +0 -16
- package/src/lib/types/annotation/trailer.ts +0 -16
- package/src/lib/types/annotation/transform.ts +0 -140
- package/src/lib/types/annotation/unknown.ts +0 -16
- package/src/lib/types/bibliography.ts +0 -86
- package/src/lib/types/folio.ts +0 -28
- package/src/lib/types/glossary-page.ts +0 -86
- package/src/lib/types/glossary.ts +0 -115
- package/src/lib/types/imprint.ts +0 -159
- package/src/lib/types/language.ts +0 -64
- package/src/lib/types/layout.ts +0 -37
- package/src/lib/types/library.ts +0 -29
- package/src/lib/types/passage.ts +0 -220
- package/src/lib/types/title.ts +0 -47
- package/src/lib/types/work.ts +0 -38
- package/src/lib/use-bookmark.ts +0 -45
- package/tsconfig.json +0 -20
- package/tsconfig.lib.json +0 -26
- package/tsconfig.spec.json +0 -22
- /package/{src/index.ts → index.d.ts} +0 -0
- /package/{src/lib/glossary/index.ts → lib/glossary/index.d.ts} +0 -0
- /package/{src/lib/passage/index.ts → lib/passage/index.d.ts} +0 -0
- /package/{src/lib/types/annotation/index.ts → lib/types/annotation/index.d.ts} +0 -0
- /package/{src/lib/types/index.ts → lib/types/index.d.ts} +0 -0
- /package/{src/lib/types/semver.ts → lib/types/semver.d.ts} +0 -0
- /package/{src/lib/types/toh.ts → lib/types/toh.d.ts} +0 -0
- /package/{src/ssr.ts → ssr.d.ts} +0 -0
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { ExtendedTranslationLanguage } from '../language';
|
|
2
|
-
import {
|
|
3
|
-
AnnotationBase,
|
|
4
|
-
AnnotationDTO,
|
|
5
|
-
annotationTypeFromDTO,
|
|
6
|
-
annotationTypeToDTO,
|
|
7
|
-
} from './annotation-type';
|
|
8
|
-
|
|
9
|
-
export type AbbreviationAnnotation = AnnotationBase & {
|
|
10
|
-
type: 'abbreviation';
|
|
11
|
-
abbreviation: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type AudioAnnotation = AnnotationBase & {
|
|
15
|
-
type: 'audio';
|
|
16
|
-
src: string;
|
|
17
|
-
mediaType: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export type BlockquoteAnnotation = AnnotationBase & {
|
|
21
|
-
type: 'blockquote';
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type CodeAnnotation = AnnotationBase & {
|
|
25
|
-
type: 'code';
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export type DeprecatedAnnotation = AnnotationBase & {
|
|
29
|
-
type: 'deprecated';
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export type EndNoteLinkAnnotation = AnnotationBase & {
|
|
33
|
-
type: 'endNoteLink';
|
|
34
|
-
endNote: string;
|
|
35
|
-
label?: string;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export type GlossaryInstanceAnnotation = AnnotationBase & {
|
|
39
|
-
type: 'glossaryInstance';
|
|
40
|
-
glossary: string;
|
|
41
|
-
authority: string;
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export type HasAbbreviationAnnotation = AnnotationBase & {
|
|
45
|
-
type: 'hasAbbreviation';
|
|
46
|
-
abbreviation: string;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type HeadingClass =
|
|
50
|
-
| 'section-label'
|
|
51
|
-
| 'section-title'
|
|
52
|
-
| 'supplementary'
|
|
53
|
-
| 'table-label';
|
|
54
|
-
|
|
55
|
-
export type HeadingAnnotation = AnnotationBase & {
|
|
56
|
-
type: 'heading';
|
|
57
|
-
level: number;
|
|
58
|
-
class?: HeadingClass;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export type ImageAnnotation = AnnotationBase & {
|
|
62
|
-
type: 'image';
|
|
63
|
-
src: string;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export type IndentAnnotation = AnnotationBase & {
|
|
67
|
-
type: 'indent';
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export type InlineTitleAnnotation = AnnotationBase & {
|
|
71
|
-
type: 'inlineTitle';
|
|
72
|
-
lang: ExtendedTranslationLanguage;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export type InternalLinkAnnotation = AnnotationBase & {
|
|
76
|
-
type: 'internalLink';
|
|
77
|
-
linkType: string;
|
|
78
|
-
href?: string;
|
|
79
|
-
label?: string;
|
|
80
|
-
entity?: string;
|
|
81
|
-
isPending?: boolean;
|
|
82
|
-
isSameWork?: boolean;
|
|
83
|
-
subtype?: string;
|
|
84
|
-
linkToh?: string;
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export type LeadingSpaceAnnotation = AnnotationBase & {
|
|
88
|
-
type: 'leadingSpace';
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
export type LineGroupAnnotation = AnnotationBase & {
|
|
92
|
-
type: 'lineGroup';
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export type LineAnnotation = AnnotationBase & {
|
|
96
|
-
type: 'line';
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export type LinkAnnotation = AnnotationBase & {
|
|
100
|
-
type: 'link';
|
|
101
|
-
href: string;
|
|
102
|
-
text: string;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export type ListItemAnnotation = AnnotationBase & {
|
|
106
|
-
type: 'listItem';
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export type ListAnnotation = AnnotationBase & {
|
|
110
|
-
type: 'list';
|
|
111
|
-
spacing?: string;
|
|
112
|
-
nesting?: number;
|
|
113
|
-
itemStyle?: string;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export type MantraAnnotation = AnnotationBase & {
|
|
117
|
-
type: 'mantra';
|
|
118
|
-
lang: ExtendedTranslationLanguage;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export type MentionAnnotation = AnnotationBase & {
|
|
122
|
-
type: 'mention';
|
|
123
|
-
entity: string;
|
|
124
|
-
linkType: string;
|
|
125
|
-
text?: string;
|
|
126
|
-
displayText?: string;
|
|
127
|
-
isSameWork?: boolean;
|
|
128
|
-
subtype?: string;
|
|
129
|
-
linkToh?: string;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
export type ParagraphAnnotation = AnnotationBase & {
|
|
133
|
-
type: 'paragraph';
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
export type QuoteAnnotation = AnnotationBase & {
|
|
137
|
-
type: 'quote';
|
|
138
|
-
quote?: string;
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export type QuotedAnnotation = AnnotationBase & {
|
|
142
|
-
type: 'quoted';
|
|
143
|
-
quote?: string;
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
export type ReferenceAnnotation = AnnotationBase & {
|
|
147
|
-
type: 'reference';
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
export type SpanAnnotation = AnnotationBase & {
|
|
151
|
-
type: 'span';
|
|
152
|
-
textStyle?: string;
|
|
153
|
-
lang?: ExtendedTranslationLanguage;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
export type TableAnnotation = AnnotationBase & {
|
|
157
|
-
type: 'table';
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
export type TableBodyDataAnnotation = AnnotationBase & {
|
|
161
|
-
type: 'tableBodyData';
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export type TableBodyHeaderAnnotation = AnnotationBase & {
|
|
165
|
-
type: 'tableBodyHeader';
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
export type TableBodyRowAnnotation = AnnotationBase & {
|
|
169
|
-
type: 'tableBodyRow';
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
export type TrailerAnnotation = AnnotationBase & {
|
|
173
|
-
type: 'trailer';
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export type UnknownAnnotation = AnnotationBase & {
|
|
177
|
-
type: 'unknown';
|
|
178
|
-
};
|
|
179
|
-
|
|
180
|
-
export type Annotation =
|
|
181
|
-
| AbbreviationAnnotation
|
|
182
|
-
| AudioAnnotation
|
|
183
|
-
| BlockquoteAnnotation
|
|
184
|
-
| CodeAnnotation
|
|
185
|
-
| DeprecatedAnnotation
|
|
186
|
-
| EndNoteLinkAnnotation
|
|
187
|
-
| GlossaryInstanceAnnotation
|
|
188
|
-
| HasAbbreviationAnnotation
|
|
189
|
-
| HeadingAnnotation
|
|
190
|
-
| ImageAnnotation
|
|
191
|
-
| IndentAnnotation
|
|
192
|
-
| InlineTitleAnnotation
|
|
193
|
-
| InternalLinkAnnotation
|
|
194
|
-
| LeadingSpaceAnnotation
|
|
195
|
-
| LineAnnotation
|
|
196
|
-
| LineGroupAnnotation
|
|
197
|
-
| LinkAnnotation
|
|
198
|
-
| ListAnnotation
|
|
199
|
-
| ListItemAnnotation
|
|
200
|
-
| MantraAnnotation
|
|
201
|
-
| MentionAnnotation
|
|
202
|
-
| ParagraphAnnotation
|
|
203
|
-
| QuoteAnnotation
|
|
204
|
-
| QuotedAnnotation
|
|
205
|
-
| ReferenceAnnotation
|
|
206
|
-
| SpanAnnotation
|
|
207
|
-
| TableAnnotation
|
|
208
|
-
| TableBodyDataAnnotation
|
|
209
|
-
| TableBodyHeaderAnnotation
|
|
210
|
-
| TableBodyRowAnnotation
|
|
211
|
-
| TrailerAnnotation
|
|
212
|
-
| UnknownAnnotation;
|
|
213
|
-
|
|
214
|
-
export type Annotations = Annotation[];
|
|
215
|
-
|
|
216
|
-
export type AnnotationTransformer = (dto: AnnotationDTO) => Annotation;
|
|
217
|
-
|
|
218
|
-
export const baseAnnotationFromDTO = (dto: AnnotationDTO): AnnotationBase => {
|
|
219
|
-
const passageUuid = dto.passage_uuid || dto.passageUuid || '';
|
|
220
|
-
|
|
221
|
-
return {
|
|
222
|
-
uuid: dto.uuid,
|
|
223
|
-
start: dto.start,
|
|
224
|
-
end: dto.end,
|
|
225
|
-
type: annotationTypeFromDTO(dto.type),
|
|
226
|
-
toh: dto.toh,
|
|
227
|
-
passageUuid,
|
|
228
|
-
validated: true,
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
export type AnnotationExporter = (annotation: Annotation) => AnnotationDTO;
|
|
233
|
-
|
|
234
|
-
export const baseAnnotationToDto = (
|
|
235
|
-
annotation: AnnotationBase,
|
|
236
|
-
): AnnotationDTO => ({
|
|
237
|
-
end: annotation.end,
|
|
238
|
-
start: annotation.start,
|
|
239
|
-
type: annotationTypeToDTO(annotation.type),
|
|
240
|
-
uuid: annotation.uuid,
|
|
241
|
-
passage_uuid: annotation.passageUuid,
|
|
242
|
-
toh: annotation.toh,
|
|
243
|
-
content: [],
|
|
244
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type AnnotationExporter,
|
|
3
|
-
type AnnotationTransformer,
|
|
4
|
-
type AudioAnnotation,
|
|
5
|
-
baseAnnotationFromDTO,
|
|
6
|
-
baseAnnotationToDto,
|
|
7
|
-
} from './annotation';
|
|
8
|
-
import { AnnotationDTO, AnnotationDTOContent } from './annotation-type';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (dto): AudioAnnotation => {
|
|
11
|
-
const baseAnnotation = baseAnnotationFromDTO(dto);
|
|
12
|
-
const audio = baseAnnotation as AudioAnnotation;
|
|
13
|
-
dto.content.forEach((content) => {
|
|
14
|
-
if (content.src) {
|
|
15
|
-
audio.src = content.src as string;
|
|
16
|
-
}
|
|
17
|
-
if (content['media-type']) {
|
|
18
|
-
audio.mediaType = content['media-type'] as string;
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
return audio;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
26
|
-
const { src, mediaType } = annotation as AudioAnnotation;
|
|
27
|
-
const dto = baseAnnotationToDto(annotation);
|
|
28
|
-
dto.content.push({
|
|
29
|
-
src,
|
|
30
|
-
'media-type': mediaType,
|
|
31
|
-
} as AnnotationDTOContent);
|
|
32
|
-
return dto;
|
|
33
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type BlockquoteAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): BlockquoteAnnotation => {
|
|
13
|
-
return baseAnnotationFromDTO(dto) as BlockquoteAnnotation;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
17
|
-
return baseAnnotationToDto(annotation);
|
|
18
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type CodeAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (dto): CodeAnnotation => {
|
|
11
|
-
return baseAnnotationFromDTO(dto) as CodeAnnotation;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
15
|
-
return baseAnnotationToDto(annotation);
|
|
16
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type DeprecatedAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): DeprecatedAnnotation => {
|
|
13
|
-
return baseAnnotationFromDTO(dto) as DeprecatedAnnotation;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
17
|
-
return baseAnnotationToDto(annotation);
|
|
18
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type EndNoteLinkAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): EndNoteLinkAnnotation => {
|
|
13
|
-
const baseAnnotation = baseAnnotationFromDTO(dto);
|
|
14
|
-
const endNote = baseAnnotation as EndNoteLinkAnnotation;
|
|
15
|
-
dto.content.forEach((content) => {
|
|
16
|
-
if (content.uuid) {
|
|
17
|
-
endNote.endNote = content.uuid as string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (content.label) {
|
|
21
|
-
endNote.label = content.label as string;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return endNote;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
29
|
-
const { endNote: uuid } = annotation as EndNoteLinkAnnotation;
|
|
30
|
-
const dto = baseAnnotationToDto(annotation);
|
|
31
|
-
dto.content.push({
|
|
32
|
-
uuid,
|
|
33
|
-
});
|
|
34
|
-
return dto;
|
|
35
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type GlossaryInstanceAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): GlossaryInstanceAnnotation => {
|
|
13
|
-
const baseAnnotation = baseAnnotationFromDTO(dto);
|
|
14
|
-
const glossaryInstance = baseAnnotation as GlossaryInstanceAnnotation;
|
|
15
|
-
dto.content.forEach((content) => {
|
|
16
|
-
if (content.uuid) {
|
|
17
|
-
glossaryInstance.glossary = content.uuid as string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (content.authority) {
|
|
21
|
-
glossaryInstance.authority = content.authority as string
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return glossaryInstance;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
28
|
-
const { glossary: uuid } = annotation as GlossaryInstanceAnnotation;
|
|
29
|
-
const dto = baseAnnotationToDto(annotation);
|
|
30
|
-
dto.content.push({
|
|
31
|
-
uuid,
|
|
32
|
-
});
|
|
33
|
-
return dto;
|
|
34
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type HasAbbreviationAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): HasAbbreviationAnnotation => {
|
|
13
|
-
const baseAnnotation = baseAnnotationFromDTO(dto);
|
|
14
|
-
const hasAbbreviation = baseAnnotation as HasAbbreviationAnnotation;
|
|
15
|
-
dto.content.forEach((content) => {
|
|
16
|
-
if (content.uuid) {
|
|
17
|
-
hasAbbreviation.abbreviation = content.uuid as string;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return hasAbbreviation;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
24
|
-
const { abbreviation: uuid } = annotation as HasAbbreviationAnnotation;
|
|
25
|
-
const dto = baseAnnotationToDto(annotation);
|
|
26
|
-
dto.content.push({
|
|
27
|
-
uuid,
|
|
28
|
-
});
|
|
29
|
-
return dto;
|
|
30
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type HeadingAnnotation,
|
|
6
|
-
HeadingClass,
|
|
7
|
-
baseAnnotationFromDTO,
|
|
8
|
-
baseAnnotationToDto,
|
|
9
|
-
} from './annotation';
|
|
10
|
-
|
|
11
|
-
export const transformer: AnnotationTransformer = (dto): HeadingAnnotation => {
|
|
12
|
-
const heading = baseAnnotationFromDTO(dto) as HeadingAnnotation;
|
|
13
|
-
dto.content.forEach((content) => {
|
|
14
|
-
if (content['heading-level']) {
|
|
15
|
-
const headerStr = content['heading-level'] as string;
|
|
16
|
-
const levelStr = headerStr.replace('h', '');
|
|
17
|
-
const level = parseInt(levelStr, 10);
|
|
18
|
-
heading.level = level;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (content['heading-type']) {
|
|
22
|
-
heading.class = content['heading-type'] as HeadingClass;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
return heading;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
30
|
-
const { level, class: headingClass } = annotation as HeadingAnnotation;
|
|
31
|
-
const dto = baseAnnotationToDto(annotation);
|
|
32
|
-
dto.content.push({
|
|
33
|
-
'heading-level': `h${level}`,
|
|
34
|
-
...(headingClass ? { 'heading-type': headingClass } : {}),
|
|
35
|
-
});
|
|
36
|
-
return dto;
|
|
37
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type ImageAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (dto): ImageAnnotation => {
|
|
11
|
-
const baseAnnotation = baseAnnotationFromDTO(dto);
|
|
12
|
-
const image = baseAnnotation as ImageAnnotation;
|
|
13
|
-
dto.content.forEach((content) => {
|
|
14
|
-
if (content.src) {
|
|
15
|
-
image.src = content.src as string;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
return image;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
23
|
-
const { src } = annotation as ImageAnnotation;
|
|
24
|
-
const dto = baseAnnotationToDto(annotation);
|
|
25
|
-
dto.content.push({
|
|
26
|
-
src,
|
|
27
|
-
});
|
|
28
|
-
return dto;
|
|
29
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type IndentAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (dto): IndentAnnotation => {
|
|
11
|
-
return baseAnnotationFromDTO(dto) as IndentAnnotation;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
15
|
-
return baseAnnotationToDto(annotation);
|
|
16
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type InlineTitleAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
import { TranslationLanguage } from '../language';
|
|
10
|
-
|
|
11
|
-
export const transformer: AnnotationTransformer = (
|
|
12
|
-
dto,
|
|
13
|
-
): InlineTitleAnnotation => {
|
|
14
|
-
const inlineTitle = baseAnnotationFromDTO(dto) as InlineTitleAnnotation;
|
|
15
|
-
dto.content.forEach((content) => {
|
|
16
|
-
if (content.lang) {
|
|
17
|
-
inlineTitle.lang = content.lang as TranslationLanguage;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
return inlineTitle;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
25
|
-
const { lang } = annotation as InlineTitleAnnotation;
|
|
26
|
-
const dto = baseAnnotationToDto(annotation);
|
|
27
|
-
|
|
28
|
-
if (lang) {
|
|
29
|
-
dto.content.push({
|
|
30
|
-
lang,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
return dto;
|
|
34
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type InternalLinkAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): InternalLinkAnnotation => {
|
|
13
|
-
const internalLink = baseAnnotationFromDTO(dto) as InternalLinkAnnotation;
|
|
14
|
-
dto.content.forEach((content) => {
|
|
15
|
-
if (content.href) {
|
|
16
|
-
internalLink.href = content.href as string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (content['link-type']) {
|
|
20
|
-
internalLink.isPending = true;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (content.type) {
|
|
24
|
-
internalLink.linkType = content['type'] as string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (content.label) {
|
|
28
|
-
internalLink.label = content.label as string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (content.uuid) {
|
|
32
|
-
internalLink.entity = content.uuid as string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (content.same_work !== undefined) {
|
|
36
|
-
internalLink.isSameWork = !!content.same_work;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (content.subtype) {
|
|
40
|
-
internalLink.subtype = content.subtype as string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (content.toh) {
|
|
44
|
-
internalLink.linkToh = content.toh as string;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return internalLink;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
52
|
-
const { entity, linkType, href, label, isPending } =
|
|
53
|
-
annotation as InternalLinkAnnotation;
|
|
54
|
-
const dto = baseAnnotationToDto(annotation);
|
|
55
|
-
dto.content = [
|
|
56
|
-
{
|
|
57
|
-
href,
|
|
58
|
-
},
|
|
59
|
-
];
|
|
60
|
-
|
|
61
|
-
if (isPending) {
|
|
62
|
-
dto.content.push({
|
|
63
|
-
'link-type': 'pending',
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (label) {
|
|
68
|
-
dto.content.push({
|
|
69
|
-
label,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (entity) {
|
|
74
|
-
dto.content.push({
|
|
75
|
-
uuid: entity,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (linkType) {
|
|
80
|
-
dto.content.push({
|
|
81
|
-
type: linkType,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return dto;
|
|
86
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type LeadingSpaceAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): LeadingSpaceAnnotation => {
|
|
13
|
-
return baseAnnotationFromDTO(dto) as LeadingSpaceAnnotation;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
17
|
-
return baseAnnotationToDto(annotation);
|
|
18
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type LineGroupAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (
|
|
11
|
-
dto,
|
|
12
|
-
): LineGroupAnnotation => {
|
|
13
|
-
return baseAnnotationFromDTO(dto) as LineGroupAnnotation;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
17
|
-
return baseAnnotationToDto(annotation);
|
|
18
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AnnotationDTO } from './annotation-type';
|
|
2
|
-
import {
|
|
3
|
-
type AnnotationExporter,
|
|
4
|
-
type AnnotationTransformer,
|
|
5
|
-
type LineAnnotation,
|
|
6
|
-
baseAnnotationFromDTO,
|
|
7
|
-
baseAnnotationToDto,
|
|
8
|
-
} from './annotation';
|
|
9
|
-
|
|
10
|
-
export const transformer: AnnotationTransformer = (dto): LineAnnotation => {
|
|
11
|
-
return baseAnnotationFromDTO(dto) as LineAnnotation;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export const exporter: AnnotationExporter = (annotation): AnnotationDTO => {
|
|
15
|
-
return baseAnnotationToDto(annotation);
|
|
16
|
-
};
|