@omnsight/osint-entity-components 0.2.4 → 0.2.6
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/index.js +8 -8
- package/dist/index.mjs +796 -781
- package/package.json +15 -2
- package/src/App.tsx +397 -141
- package/src/avatars/layouts/AvatarDropdown.tsx +1 -1
- package/src/avatars/layouts/AvatarSpan.tsx +7 -2
- package/src/forms/BaseForm.tsx +138 -0
- package/src/forms/EditableAttributes.tsx +131 -0
- package/src/forms/EventForm/EditableForm.tsx +78 -0
- package/src/forms/EventForm/EditingForm.tsx +401 -0
- package/src/forms/EventForm/IconFormSection.tsx +54 -0
- package/src/forms/EventForm/StaticForm.tsx +272 -0
- package/src/forms/EventForm/index.ts +1 -0
- package/src/forms/InsightForm/EditableForm.tsx +70 -0
- package/src/forms/InsightForm/EditingForm.tsx +79 -0
- package/src/forms/InsightForm/StaticForm.tsx +139 -0
- package/src/forms/InsightForm/index.ts +1 -0
- package/src/forms/MonitoringSourceForm/EditableForm.tsx +59 -0
- package/src/forms/MonitoringSourceForm/EditingForm.tsx +192 -0
- package/src/forms/MonitoringSourceForm/StaticForm.tsx +107 -0
- package/src/forms/MonitoringSourceForm/index.ts +1 -0
- package/src/forms/OrganizationForm/EditableForm.tsx +74 -0
- package/src/forms/OrganizationForm/EditingForm.tsx +177 -0
- package/src/forms/OrganizationForm/IconFormSection.tsx +60 -0
- package/src/forms/OrganizationForm/StaticForm.tsx +209 -0
- package/src/forms/OrganizationForm/index.ts +1 -0
- package/src/forms/PersonForm/EditableForm.tsx +74 -0
- package/src/forms/PersonForm/EditingForm.tsx +187 -0
- package/src/forms/PersonForm/IconFormSection.tsx +54 -0
- package/src/forms/PersonForm/StaticForm.tsx +202 -0
- package/src/forms/PersonForm/index.ts +1 -0
- package/src/forms/RelationForm/EditableForm.tsx +74 -0
- package/src/forms/RelationForm/EditingForm.tsx +147 -0
- package/src/forms/RelationForm/StaticForm.tsx +182 -0
- package/src/forms/RelationForm/index.ts +1 -0
- package/src/forms/SourceForm/EditableForm.tsx +74 -0
- package/src/forms/SourceForm/EditingForm.tsx +199 -0
- package/src/forms/SourceForm/IconFormSection.tsx +54 -0
- package/src/forms/SourceForm/StaticForm.tsx +209 -0
- package/src/forms/SourceForm/index.ts +1 -0
- package/src/forms/WebsiteForm/EditableForm.tsx +74 -0
- package/src/forms/WebsiteForm/EditingForm.tsx +216 -0
- package/src/forms/WebsiteForm/IconFormSection.tsx +54 -0
- package/src/forms/WebsiteForm/StaticForm.tsx +225 -0
- package/src/forms/WebsiteForm/index.ts +1 -0
- package/src/forms/accessLevel.ts +48 -0
- package/src/forms/index.ts +8 -0
- package/src/icons/Event/Select.tsx +7 -6
- package/src/icons/Organization/Select.tsx +7 -6
- package/src/icons/Person/Select.tsx +7 -6
- package/src/icons/Source/Select.tsx +7 -6
- package/src/icons/Website/Select.tsx +9 -8
- package/src/inputs/CountrySelect.tsx +45 -0
- package/src/inputs/CustomDatePicker.tsx +51 -0
- package/src/inputs/CustomDateTimePicker.tsx +51 -0
- package/src/inputs/RangeDatePicker.tsx +99 -0
- package/src/inputs/TimezoneSelect.tsx +20 -0
- package/src/locales/en.json +135 -0
- package/src/locales/zh.json +135 -0
- package/src/main.tsx +20 -4
|
@@ -27,8 +27,8 @@ export const SourceIconSelector: React.FC<SourceIconSelectorProps> = ({
|
|
|
27
27
|
return (
|
|
28
28
|
<Select
|
|
29
29
|
leftSection={<SourceIcon source={data} />}
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
value={value}
|
|
31
|
+
placeholder={t("input.icon")}
|
|
32
32
|
onChange={onChange}
|
|
33
33
|
data={translatedOptions}
|
|
34
34
|
error={error}
|
|
@@ -37,7 +37,7 @@ export const SourceIconSelector: React.FC<SourceIconSelectorProps> = ({
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
interface SourceColorSelectorProps {
|
|
40
|
-
value?: string
|
|
40
|
+
value?: string;
|
|
41
41
|
onChange: (value: string | null) => void;
|
|
42
42
|
error?: string;
|
|
43
43
|
}
|
|
@@ -47,6 +47,7 @@ export const SourceColorSelector: React.FC<SourceColorSelectorProps> = ({
|
|
|
47
47
|
onChange,
|
|
48
48
|
error,
|
|
49
49
|
}) => {
|
|
50
|
+
const { t } = useTranslation();
|
|
50
51
|
const colors = [
|
|
51
52
|
"#ababab",
|
|
52
53
|
"#0089ff",
|
|
@@ -59,8 +60,8 @@ export const SourceColorSelector: React.FC<SourceColorSelectorProps> = ({
|
|
|
59
60
|
|
|
60
61
|
return (
|
|
61
62
|
<ColorInput
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
value={value}
|
|
64
|
+
placeholder={t("input.color")}
|
|
64
65
|
onChange={onChange}
|
|
65
66
|
swatches={colors}
|
|
66
67
|
error={error}
|
|
@@ -96,7 +97,7 @@ export const SourceIconSelect: React.FC<SourceIconSelectProps> = ({
|
|
|
96
97
|
onChange={handleTypeChange}
|
|
97
98
|
/>
|
|
98
99
|
<SourceColorSelector
|
|
99
|
-
value={
|
|
100
|
+
value={value.attributes?.icon_color as string | undefined}
|
|
100
101
|
onChange={handleColorChange}
|
|
101
102
|
/>
|
|
102
103
|
</Group>
|
|
@@ -27,8 +27,8 @@ export const WebsiteIconSelector: React.FC<WebsiteIconSelectorProps> = ({
|
|
|
27
27
|
return (
|
|
28
28
|
<Select
|
|
29
29
|
leftSection={<WebsiteIcon website={data} />}
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
value={value}
|
|
31
|
+
placeholder={t("input.icon")}
|
|
32
32
|
onChange={onChange}
|
|
33
33
|
data={translatedOptions}
|
|
34
34
|
error={error}
|
|
@@ -37,7 +37,7 @@ export const WebsiteIconSelector: React.FC<WebsiteIconSelectorProps> = ({
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
interface WebsiteColorSelectorProps {
|
|
40
|
-
value?: string
|
|
40
|
+
value?: string;
|
|
41
41
|
onChange: (value: string | null) => void;
|
|
42
42
|
error?: string;
|
|
43
43
|
}
|
|
@@ -47,6 +47,7 @@ export const WebsiteColorSelector: React.FC<WebsiteColorSelectorProps> = ({
|
|
|
47
47
|
onChange,
|
|
48
48
|
error,
|
|
49
49
|
}) => {
|
|
50
|
+
const { t } = useTranslation();
|
|
50
51
|
const colors = [
|
|
51
52
|
"#0089ff",
|
|
52
53
|
"#ff0000",
|
|
@@ -59,8 +60,8 @@ export const WebsiteColorSelector: React.FC<WebsiteColorSelectorProps> = ({
|
|
|
59
60
|
|
|
60
61
|
return (
|
|
61
62
|
<ColorInput
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
value={value}
|
|
64
|
+
placeholder={t("input.color")}
|
|
64
65
|
onChange={onChange}
|
|
65
66
|
swatches={colors}
|
|
66
67
|
error={error}
|
|
@@ -78,7 +79,7 @@ export const WebsiteIconSelect: React.FC<WebsiteIconSelectProps> = ({
|
|
|
78
79
|
onChange,
|
|
79
80
|
}) => {
|
|
80
81
|
const handleTypeChange = (type: string | null) => {
|
|
81
|
-
onChange({ ...value,
|
|
82
|
+
onChange({ ...value, type: type || undefined });
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
const handleColorChange = (color: string | null) => {
|
|
@@ -92,11 +93,11 @@ export const WebsiteIconSelect: React.FC<WebsiteIconSelectProps> = ({
|
|
|
92
93
|
<Group>
|
|
93
94
|
<WebsiteIconSelector
|
|
94
95
|
data={value}
|
|
95
|
-
value={value.
|
|
96
|
+
value={value.type}
|
|
96
97
|
onChange={handleTypeChange}
|
|
97
98
|
/>
|
|
98
99
|
<WebsiteColorSelector
|
|
99
|
-
value={
|
|
100
|
+
value={value.attributes?.icon_color as string | undefined}
|
|
100
101
|
onChange={handleColorChange}
|
|
101
102
|
/>
|
|
102
103
|
</Group>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Select } from '@mantine/core';
|
|
3
|
+
import { useTranslation } from 'react-i18next';
|
|
4
|
+
import countries from 'i18n-iso-countries';
|
|
5
|
+
import enLocale from 'i18n-iso-countries/langs/en.json';
|
|
6
|
+
import zhLocale from 'i18n-iso-countries/langs/zh.json';
|
|
7
|
+
|
|
8
|
+
// Register locales
|
|
9
|
+
countries.registerLocale(enLocale);
|
|
10
|
+
countries.registerLocale(zhLocale);
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
country?: string;
|
|
14
|
+
setCountry: (country: string) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const CountrySelect: React.FC<Props> = ({ country, setCountry }) => {
|
|
18
|
+
const { i18n, t } = useTranslation();
|
|
19
|
+
|
|
20
|
+
const countryOptions = useMemo(() => {
|
|
21
|
+
// Map i18next language code to i18n-iso-countries language code
|
|
22
|
+
// 'zh' in i18next -> 'zh' in i18n-iso-countries
|
|
23
|
+
const lang = i18n.language.startsWith('zh') ? 'zh' : 'en';
|
|
24
|
+
const countryObj = countries.getNames(lang, { select: 'official' });
|
|
25
|
+
|
|
26
|
+
return Object.entries(countryObj)
|
|
27
|
+
.map(([code, name]) => ({
|
|
28
|
+
value: code,
|
|
29
|
+
label: name,
|
|
30
|
+
}))
|
|
31
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
|
32
|
+
}, [i18n.language]);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Select
|
|
36
|
+
placeholder={t('components.inputs.CountrySelect.select')}
|
|
37
|
+
data={countryOptions}
|
|
38
|
+
value={country}
|
|
39
|
+
onChange={(val) => val && setCountry(val)}
|
|
40
|
+
searchable
|
|
41
|
+
clearable
|
|
42
|
+
style={{ width: 200 }}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { DatePickerInput } from '@mantine/dates';
|
|
3
|
+
import { Group } from '@mantine/core';
|
|
4
|
+
import { TimezoneSelectComponent } from './TimezoneSelect';
|
|
5
|
+
import { toZonedTime, fromZonedTime } from 'date-fns-tz';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
value: Date | null;
|
|
9
|
+
onChange: (date: Date | null) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CustomDatePicker: React.FC<Props> = ({ value, onChange, placeholder, error }) => {
|
|
15
|
+
const [timezone, setTimezone] = useState(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
16
|
+
const [zonedDate, setZonedDate] = useState<Date | null>(null);
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (value) {
|
|
20
|
+
setZonedDate(toZonedTime(value, timezone));
|
|
21
|
+
} else {
|
|
22
|
+
setZonedDate(null);
|
|
23
|
+
}
|
|
24
|
+
}, [value, timezone]);
|
|
25
|
+
|
|
26
|
+
const handleDateChange = (date: Date | string | null) => {
|
|
27
|
+
if (date) {
|
|
28
|
+
const dateObj = new Date(date);
|
|
29
|
+
if (!isNaN(dateObj.getTime())) {
|
|
30
|
+
const utcDate = fromZonedTime(dateObj, timezone);
|
|
31
|
+
onChange(utcDate);
|
|
32
|
+
} else {
|
|
33
|
+
onChange(null);
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
onChange(null);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Group grow>
|
|
42
|
+
<DatePickerInput
|
|
43
|
+
value={zonedDate}
|
|
44
|
+
onChange={handleDateChange}
|
|
45
|
+
placeholder={placeholder}
|
|
46
|
+
error={error}
|
|
47
|
+
/>
|
|
48
|
+
<TimezoneSelectComponent timezone={timezone} setTimezone={setTimezone} />
|
|
49
|
+
</Group>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import { DateTimePicker } from '@mantine/dates';
|
|
3
|
+
import { Group } from '@mantine/core';
|
|
4
|
+
import { TimezoneSelectComponent } from './TimezoneSelect';
|
|
5
|
+
import { toZonedTime, fromZonedTime } from 'date-fns-tz';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
value: Date | null;
|
|
9
|
+
onChange: (date: Date | null) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const CustomDateTimePicker: React.FC<Props> = ({ value, onChange, placeholder, error }) => {
|
|
15
|
+
const [timezone, setTimezone] = useState(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
16
|
+
const [zonedDate, setZonedDate] = useState<Date | null>(null);
|
|
17
|
+
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (value) {
|
|
20
|
+
setZonedDate(toZonedTime(value, timezone));
|
|
21
|
+
} else {
|
|
22
|
+
setZonedDate(null);
|
|
23
|
+
}
|
|
24
|
+
}, [value, timezone]);
|
|
25
|
+
|
|
26
|
+
const handleDateChange = (date: string | null) => {
|
|
27
|
+
if (date) {
|
|
28
|
+
const dateObj = new Date(date);
|
|
29
|
+
if (!isNaN(dateObj.getTime())) {
|
|
30
|
+
const utcDate = fromZonedTime(dateObj, timezone);
|
|
31
|
+
onChange(utcDate);
|
|
32
|
+
} else {
|
|
33
|
+
onChange(null);
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
onChange(null);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Group grow>
|
|
42
|
+
<DateTimePicker
|
|
43
|
+
value={zonedDate}
|
|
44
|
+
onChange={handleDateChange}
|
|
45
|
+
placeholder={placeholder}
|
|
46
|
+
error={error}
|
|
47
|
+
/>
|
|
48
|
+
<TimezoneSelectComponent timezone={timezone} setTimezone={setTimezone} />
|
|
49
|
+
</Group>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Group, Button, Stack, Text } from '@mantine/core';
|
|
3
|
+
import { DatePicker } from '@mantine/dates';
|
|
4
|
+
import { notifications } from '@mantine/notifications';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
dateRange: [Date | undefined, Date | undefined];
|
|
9
|
+
setDateRange: (val: [Date | undefined, Date | undefined]) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const RangeDatePicker: React.FC<Props> = ({ dateRange, setDateRange }) => {
|
|
13
|
+
const { i18n, t } = useTranslation();
|
|
14
|
+
|
|
15
|
+
const handleDateChange = (val: [string | null, string | null]) => {
|
|
16
|
+
if (val[0] && val[1]) {
|
|
17
|
+
const [sYear, sMonth, sDay] = val[0].split('-').map(Number);
|
|
18
|
+
const [eYear, eMonth, eDay] = val[1].split('-').map(Number);
|
|
19
|
+
const start = new Date(sYear, sMonth - 1, sDay);
|
|
20
|
+
const end = new Date(eYear, eMonth - 1, eDay);
|
|
21
|
+
end.setHours(23, 59, 59, 999);
|
|
22
|
+
|
|
23
|
+
const maxEndDate = new Date(start);
|
|
24
|
+
maxEndDate.setMonth(maxEndDate.getMonth() + 1);
|
|
25
|
+
|
|
26
|
+
if (end > maxEndDate) {
|
|
27
|
+
notifications.show({
|
|
28
|
+
title: t('components.inputs.RangeDatePicker.dateLimitExceeded'),
|
|
29
|
+
message: t('components.inputs.RangeDatePicker.dateLimitMessage'),
|
|
30
|
+
color: 'orange',
|
|
31
|
+
});
|
|
32
|
+
setDateRange([start, maxEndDate]);
|
|
33
|
+
} else {
|
|
34
|
+
setDateRange([start, end]);
|
|
35
|
+
}
|
|
36
|
+
} else {
|
|
37
|
+
setDateRange([undefined, undefined]);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const applyPreset = (type: 'today' | 'yesterday' | 'lastWeek' | 'lastMonth') => {
|
|
42
|
+
const end = new Date();
|
|
43
|
+
const start = new Date();
|
|
44
|
+
|
|
45
|
+
start.setHours(0, 0, 0, 0);
|
|
46
|
+
end.setHours(23, 59, 59, 999);
|
|
47
|
+
|
|
48
|
+
switch (type) {
|
|
49
|
+
case 'today':
|
|
50
|
+
// start and end are already today
|
|
51
|
+
break;
|
|
52
|
+
case 'yesterday':
|
|
53
|
+
start.setDate(start.getDate() - 1);
|
|
54
|
+
end.setDate(end.getDate() - 1);
|
|
55
|
+
break;
|
|
56
|
+
case 'lastWeek':
|
|
57
|
+
start.setDate(start.getDate() - 7);
|
|
58
|
+
break;
|
|
59
|
+
case 'lastMonth':
|
|
60
|
+
start.setMonth(start.getMonth() - 1);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
setDateRange([start, end]);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<Group align="flex-start">
|
|
68
|
+
<Stack gap="xs">
|
|
69
|
+
<Text size="sm" fw={500} mb={5}>
|
|
70
|
+
{t('components.inputs.RangeDatePicker.dateRange')}
|
|
71
|
+
</Text>
|
|
72
|
+
<Button variant="light" size="xs" onClick={() => applyPreset('today')}>
|
|
73
|
+
{t('components.inputs.RangeDatePicker.today')}
|
|
74
|
+
</Button>
|
|
75
|
+
<Button variant="light" size="xs" onClick={() => applyPreset('yesterday')}>
|
|
76
|
+
{t('components.inputs.RangeDatePicker.yesterday')}
|
|
77
|
+
</Button>
|
|
78
|
+
<Button variant="light" size="xs" onClick={() => applyPreset('lastWeek')}>
|
|
79
|
+
{t('components.inputs.RangeDatePicker.lastWeek')}
|
|
80
|
+
</Button>
|
|
81
|
+
<Button variant="light" size="xs" onClick={() => applyPreset('lastMonth')}>
|
|
82
|
+
{t('components.inputs.RangeDatePicker.lastMonth')}
|
|
83
|
+
</Button>
|
|
84
|
+
</Stack>
|
|
85
|
+
<Stack gap="xs">
|
|
86
|
+
<Text size="sm" fw={500} mb={5}>
|
|
87
|
+
{t('components.inputs.RangeDatePicker.selectDateRange')}
|
|
88
|
+
</Text>
|
|
89
|
+
<DatePicker
|
|
90
|
+
type="range"
|
|
91
|
+
locale={i18n.language}
|
|
92
|
+
value={dateRange[0] && dateRange[1] && [dateRange[0], dateRange[1]]}
|
|
93
|
+
onChange={handleDateChange}
|
|
94
|
+
numberOfColumns={2}
|
|
95
|
+
/>
|
|
96
|
+
</Stack>
|
|
97
|
+
</Group>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import TimezoneSelect from 'react-timezone-select';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
timezone: string;
|
|
7
|
+
setTimezone: (timezone: string) => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const TimezoneSelectComponent: React.FC<Props> = ({ timezone, setTimezone }) => {
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<TimezoneSelect
|
|
15
|
+
value={timezone}
|
|
16
|
+
onChange={(tz) => setTimezone(tz.value)}
|
|
17
|
+
placeholder={t('components.inputs.TimezoneSelect.select')}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
package/src/locales/en.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"access": {
|
|
3
|
+
"public": "Public",
|
|
4
|
+
"platform": "Platform User",
|
|
5
|
+
"paid": "Paid Users",
|
|
6
|
+
"private": "Private"
|
|
7
|
+
},
|
|
2
8
|
"source": {
|
|
3
9
|
"type": {
|
|
4
10
|
"news": "News",
|
|
@@ -76,5 +82,134 @@
|
|
|
76
82
|
"confidence": "Confidence",
|
|
77
83
|
"createdDate": "Created Date",
|
|
78
84
|
"updatedDate": "Updated Date"
|
|
85
|
+
},
|
|
86
|
+
"common": {
|
|
87
|
+
"error": "Error",
|
|
88
|
+
"reset": "Reset",
|
|
89
|
+
"apply": "Apply",
|
|
90
|
+
"create": "Create",
|
|
91
|
+
"entity": {
|
|
92
|
+
"Person": "Person",
|
|
93
|
+
"Organization": "Organization",
|
|
94
|
+
"Event": "Event",
|
|
95
|
+
"Website": "Website",
|
|
96
|
+
"Source": "Source"
|
|
97
|
+
},
|
|
98
|
+
"required": "This field is required",
|
|
99
|
+
"types": {
|
|
100
|
+
"text": "text",
|
|
101
|
+
"number": "number",
|
|
102
|
+
"toggle": "toggle"
|
|
103
|
+
},
|
|
104
|
+
"remove": "Remove",
|
|
105
|
+
"add": "Add Attribute",
|
|
106
|
+
"confirm": "Confirm",
|
|
107
|
+
"cancel": "Cancel",
|
|
108
|
+
"save": "Save",
|
|
109
|
+
"warning": "Warning"
|
|
110
|
+
},
|
|
111
|
+
"components": {
|
|
112
|
+
"inputs": {
|
|
113
|
+
"TimezoneSelect": {
|
|
114
|
+
"select": "Select a timezone"
|
|
115
|
+
},
|
|
116
|
+
"RangeDatePicker": {
|
|
117
|
+
"dateLimitExceeded": "Date range exceeds limit",
|
|
118
|
+
"dateLimitMessage": "Date range exceeds limit, max 1 month",
|
|
119
|
+
"dateRange": "Date Range",
|
|
120
|
+
"today": "Today",
|
|
121
|
+
"yesterday": "Yesterday",
|
|
122
|
+
"lastWeek": "Last Week",
|
|
123
|
+
"lastMonth": "Last Month",
|
|
124
|
+
"selectDateRange": "Select Date Range"
|
|
125
|
+
},
|
|
126
|
+
"CountrySelect": {
|
|
127
|
+
"select": "Select a country"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"forms": {
|
|
131
|
+
"WebsiteForm": {
|
|
132
|
+
"title": "Edit Website"
|
|
133
|
+
},
|
|
134
|
+
"SourceForm": {
|
|
135
|
+
"title": "Source Title",
|
|
136
|
+
"sourceDescription": "Enter source description"
|
|
137
|
+
},
|
|
138
|
+
"RelationForm": {
|
|
139
|
+
"title": "Edit Relation",
|
|
140
|
+
"namePattern": "Can only contain letters, underscores, and hyphens"
|
|
141
|
+
},
|
|
142
|
+
"PersonForm": {
|
|
143
|
+
"title": "Edit Person",
|
|
144
|
+
"name": "Name"
|
|
145
|
+
},
|
|
146
|
+
"OrganizationForm": {
|
|
147
|
+
"title": "Edit Organization",
|
|
148
|
+
"name": "Organization Name"
|
|
149
|
+
},
|
|
150
|
+
"MonitoringSourceForm": {
|
|
151
|
+
"title": "Edit Monitoring Source",
|
|
152
|
+
"name": "Source Name"
|
|
153
|
+
},
|
|
154
|
+
"InsightForm": {
|
|
155
|
+
"title": "Edit Insight"
|
|
156
|
+
},
|
|
157
|
+
"EventForm": {
|
|
158
|
+
"title": "Event Title",
|
|
159
|
+
"eventDescription": "event description",
|
|
160
|
+
"minLatitude": "Latitude cannot be less than -90",
|
|
161
|
+
"maxLatitude": "Latitude cannot be greater than 90",
|
|
162
|
+
"minLongitude": "Longitude cannot be less than -180",
|
|
163
|
+
"maxLongitude": "Longitude cannot be greater than 180",
|
|
164
|
+
"mustIncludeAdmin": "Must include admin"
|
|
165
|
+
},
|
|
166
|
+
"BaseForm": {
|
|
167
|
+
"discardChanges": "Discard Changes And Exit",
|
|
168
|
+
"unsavedChangesWarning": "Are you sure you want to discard the changes?"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"input": {
|
|
173
|
+
"color": "Select A Color",
|
|
174
|
+
"icon": "Select An Icon"
|
|
175
|
+
},
|
|
176
|
+
"placeholder": {
|
|
177
|
+
"title": "Title",
|
|
178
|
+
"url": "URL",
|
|
179
|
+
"description": "Description",
|
|
180
|
+
"type": "Type",
|
|
181
|
+
"foundedDate": "Founded Date",
|
|
182
|
+
"discoveredDate": "Discovered Date",
|
|
183
|
+
"tags": "Tags",
|
|
184
|
+
"attributes": "Attributes",
|
|
185
|
+
"reliability": "Reliability",
|
|
186
|
+
"label": "Label",
|
|
187
|
+
"name": "Name",
|
|
188
|
+
"confidence": "Confidence",
|
|
189
|
+
"role": "Role",
|
|
190
|
+
"nationality": "Nationality",
|
|
191
|
+
"birthDate": "Birth Date",
|
|
192
|
+
"source": {
|
|
193
|
+
"type": "Source Type"
|
|
194
|
+
},
|
|
195
|
+
"lastReviewed": "Last Reviewed",
|
|
196
|
+
"enter": "Enter",
|
|
197
|
+
"date": "Date",
|
|
198
|
+
"location": "Location",
|
|
199
|
+
"address": "Address",
|
|
200
|
+
"locality": "Locality",
|
|
201
|
+
"subLocality": "Sub Locality (optional)",
|
|
202
|
+
"adminArea": "Administrative Area",
|
|
203
|
+
"subAdminArea": "Sub Administrative Area (optional)",
|
|
204
|
+
"latitude": "Latitude",
|
|
205
|
+
"longitude": "Longitude",
|
|
206
|
+
"country": "Country",
|
|
207
|
+
"postalCode": "Postal Code",
|
|
208
|
+
"key": "Key",
|
|
209
|
+
"value": "Value",
|
|
210
|
+
"unknown": "Unknown",
|
|
211
|
+
"accessLabel": "Access Control",
|
|
212
|
+
"readAccess": "Read Access",
|
|
213
|
+
"writeAccess": "Write Access"
|
|
79
214
|
}
|
|
80
215
|
}
|
package/src/locales/zh.json
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
+
"access": {
|
|
3
|
+
"public": "公开",
|
|
4
|
+
"platform": "平台用户",
|
|
5
|
+
"paid": "付费",
|
|
6
|
+
"private": "私密"
|
|
7
|
+
},
|
|
2
8
|
"source": {
|
|
3
9
|
"type": {
|
|
4
10
|
"news": "新闻",
|
|
@@ -76,5 +82,134 @@
|
|
|
76
82
|
"confidence": "置信度",
|
|
77
83
|
"createdDate": "创建日期",
|
|
78
84
|
"updatedDate": "更新日期"
|
|
85
|
+
},
|
|
86
|
+
"common": {
|
|
87
|
+
"error": "错误",
|
|
88
|
+
"reset": "重置",
|
|
89
|
+
"apply": "应用",
|
|
90
|
+
"create": "创建",
|
|
91
|
+
"entity": {
|
|
92
|
+
"Person": "个人",
|
|
93
|
+
"Organization": "组织",
|
|
94
|
+
"Event": "事件",
|
|
95
|
+
"Website": "网站",
|
|
96
|
+
"Source": "信源"
|
|
97
|
+
},
|
|
98
|
+
"required": "此项为必填项",
|
|
99
|
+
"types": {
|
|
100
|
+
"text": "文本",
|
|
101
|
+
"number": "数字",
|
|
102
|
+
"toggle": "开关"
|
|
103
|
+
},
|
|
104
|
+
"remove": "删除",
|
|
105
|
+
"add": "添加",
|
|
106
|
+
"confirm": "确认",
|
|
107
|
+
"cancel": "取消",
|
|
108
|
+
"save": "保存",
|
|
109
|
+
"warning": "警告"
|
|
110
|
+
},
|
|
111
|
+
"components": {
|
|
112
|
+
"inputs": {
|
|
113
|
+
"TimezoneSelect": {
|
|
114
|
+
"select": "请选择时区"
|
|
115
|
+
},
|
|
116
|
+
"RangeDatePicker": {
|
|
117
|
+
"dateLimitExceeded": "日期范围超出限制",
|
|
118
|
+
"dateLimitMessage": "日期范围超出限制,最多选择一个月",
|
|
119
|
+
"dateRange": "日期范围",
|
|
120
|
+
"today": "今天",
|
|
121
|
+
"yesterday": "昨天",
|
|
122
|
+
"lastWeek": "上周",
|
|
123
|
+
"lastMonth": "上个月",
|
|
124
|
+
"selectDateRange": "选择日期范围"
|
|
125
|
+
},
|
|
126
|
+
"CountrySelect": {
|
|
127
|
+
"select": "请选择国家"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"forms": {
|
|
131
|
+
"WebsiteForm": {
|
|
132
|
+
"title": "编辑网站消息"
|
|
133
|
+
},
|
|
134
|
+
"SourceForm": {
|
|
135
|
+
"title": "编辑信源",
|
|
136
|
+
"sourceDescription": "请输入信源详情"
|
|
137
|
+
},
|
|
138
|
+
"RelationForm": {
|
|
139
|
+
"title": "编辑关系",
|
|
140
|
+
"namePattern": "只能包含字母、下划线和减号"
|
|
141
|
+
},
|
|
142
|
+
"PersonForm": {
|
|
143
|
+
"title": "编辑个人信息",
|
|
144
|
+
"name": "姓名"
|
|
145
|
+
},
|
|
146
|
+
"OrganizationForm": {
|
|
147
|
+
"title": "编辑组织信息",
|
|
148
|
+
"name": "组织名称"
|
|
149
|
+
},
|
|
150
|
+
"MonitoringSourceForm": {
|
|
151
|
+
"title": "编辑监控信源",
|
|
152
|
+
"name": "信源名称"
|
|
153
|
+
},
|
|
154
|
+
"InsightForm": {
|
|
155
|
+
"title": "编辑专栏"
|
|
156
|
+
},
|
|
157
|
+
"EventForm": {
|
|
158
|
+
"title": "事件标题",
|
|
159
|
+
"eventDescription": "事件详细描述",
|
|
160
|
+
"minLatitude": "纬度不能小于-90",
|
|
161
|
+
"maxLatitude": "纬度不能大于90",
|
|
162
|
+
"minLongitude": "经度不能小于-180",
|
|
163
|
+
"maxLongitude": "经度不能大于180",
|
|
164
|
+
"mustIncludeAdmin": "必须包含私有权限"
|
|
165
|
+
},
|
|
166
|
+
"BaseForm": {
|
|
167
|
+
"discardChanges": "放弃修改并退出",
|
|
168
|
+
"unsavedChangesWarning": "是否确认放弃修改?注意:所有未保存的修改将丢失。"
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"input": {
|
|
173
|
+
"color": "请选择颜色",
|
|
174
|
+
"icon": "请选择图标"
|
|
175
|
+
},
|
|
176
|
+
"placeholder": {
|
|
177
|
+
"title": "标题",
|
|
178
|
+
"url": "链接",
|
|
179
|
+
"description": "描述",
|
|
180
|
+
"type": "类型",
|
|
181
|
+
"foundedDate": "成立日期",
|
|
182
|
+
"discoveredDate": "发现日期",
|
|
183
|
+
"tags": "标签",
|
|
184
|
+
"attributes": "其它属性",
|
|
185
|
+
"reliability": "可靠性",
|
|
186
|
+
"label": "标签",
|
|
187
|
+
"name": "名称",
|
|
188
|
+
"confidence": "置信度",
|
|
189
|
+
"role": "角色",
|
|
190
|
+
"nationality": "国籍",
|
|
191
|
+
"birthDate": "出生日期",
|
|
192
|
+
"source": {
|
|
193
|
+
"type": "信源类型"
|
|
194
|
+
},
|
|
195
|
+
"lastReviewed": "上次检查",
|
|
196
|
+
"enter": "输入",
|
|
197
|
+
"date": "日期",
|
|
198
|
+
"location": "位置",
|
|
199
|
+
"address": "地址",
|
|
200
|
+
"locality": "城市",
|
|
201
|
+
"subLocality": "次级区域(可选)",
|
|
202
|
+
"adminArea": "行政区域",
|
|
203
|
+
"subAdminArea": "次级行政区域(可选)",
|
|
204
|
+
"latitude": "纬度",
|
|
205
|
+
"longitude": "经度",
|
|
206
|
+
"country": "国家",
|
|
207
|
+
"postalCode": "邮政编码",
|
|
208
|
+
"key": "标签",
|
|
209
|
+
"value": "内容",
|
|
210
|
+
"unknown": "未知",
|
|
211
|
+
"accessLabel": "访问权限",
|
|
212
|
+
"readAccess": "读取权限",
|
|
213
|
+
"writeAccess": "写入权限"
|
|
79
214
|
}
|
|
80
215
|
}
|