tycho-components 0.0.11-SNAPSHOT-10 → 0.0.11-SNAPSHOT-12

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.
@@ -12,11 +12,17 @@ export type Comment = {
12
12
  name: string;
13
13
  user: string;
14
14
  picture: string;
15
- lexicon: string;
16
- entry: string;
15
+ lexicon?: string;
16
+ entry?: string;
17
+ corpus?: string;
18
+ document?: string;
19
+ page?: string;
20
+ sentence?: string;
21
+ cid?: string;
17
22
  requested?: UserComment;
18
23
  read?: boolean;
19
24
  keywords?: Record<string, string>;
25
+ type?: string;
20
26
  };
21
27
  export type UserComment = {
22
28
  uid: string;
@@ -5,8 +5,6 @@ export const EMPTY_COMMENT = {
5
5
  user: '',
6
6
  name: '',
7
7
  picture: '',
8
- entry: '',
9
- lexicon: '',
10
8
  };
11
9
  export const EMPTY_COMMENT_REQUEST = {
12
10
  value: '',
@@ -2,6 +2,8 @@ import { addSeconds, parseISO } from 'date-fns';
2
2
  import { format } from 'date-fns-tz';
3
3
  const millis = () => new Date().getTime();
4
4
  const formatDateTime = (isoDateStr, outputFormat) => {
5
+ if (!isoDateStr)
6
+ return '';
5
7
  try {
6
8
  const parsedDate = parseISO(isoDateStr);
7
9
  return format(parsedDate, outputFormat);
@@ -12,7 +14,6 @@ const formatDateTime = (isoDateStr, outputFormat) => {
12
14
  }
13
15
  };
14
16
  const formatDate = (date, fmt) => {
15
- console.log(typeof date);
16
17
  if (!date)
17
18
  return '';
18
19
  return format(date, fmt);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.0.11-SNAPSHOT-10",
4
+ "version": "0.0.11-SNAPSHOT-12",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {