Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.0-alpha.75 #1042

Merged
merged 11 commits into from
Oct 30, 2023
Merged
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@commitlint/cli": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@types/prettier": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"@vitest/coverage-v8": "^0.34.6",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
Expand All @@ -64,7 +64,7 @@
"lint-staged": "^14.0.1",
"pm2": "^5.3.0",
"prettier": "^3.0.3",
"terser": "^5.22.0",
"terser": "^5.23.0",
"typescript": "^5.2.2",
"vitest": "^0.34.6",
"webpack": "^5.89.0"
Expand Down
9 changes: 5 additions & 4 deletions packages/@liexp/backend/src/providers/tg/tg.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ export interface TGBotProvider {
upsertPinnedMessage: (
text: string,
) => TE.TaskEither<Error, TelegramBot.Message>;
post: (text: string) => TE.TaskEither<Error, any>;
post: (text: string, replyToMessageId?: number) => TE.TaskEither<Error, TelegramBot.Message>;
postPhoto: (
imageUrl: string | Stream,
caption: string,
) => TE.TaskEither<Error, any>;
) => TE.TaskEither<Error, TelegramBot.Message>;
postVideo: (
videoUrl: string | Stream,
caption: string,
opts?: TelegramBot.SendVideoOptions,
) => TE.TaskEither<Error, any>;
) => TE.TaskEither<Error, TelegramBot.Message>;
postMediaGroup: (
text: string,
media: readonly TelegramBot.InputMedia[],
Expand Down Expand Up @@ -99,9 +99,10 @@ export const TGBotProvider = (
}),
);
},
post: (text) => {
post: (text, replyToMessageId) => {
return liftTGTE(() =>
api.sendMessage(opts.chat, text, {
reply_to_message_id: replyToMessageId,
parse_mode: "HTML",
disable_web_page_preview: false,
}),
Expand Down
4 changes: 2 additions & 2 deletions packages/@liexp/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
"express": "^4.18.2",
"file-loader": "^6.2.0",
"filemanager-webpack-plugin": "^8.0.0",
"fork-ts-checker-webpack-plugin": "^9.0.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"html-replace-webpack-plugin": "^2.6.0",
"html-webpack-plugin": "^5.5.3",
"mini-css-extract-plugin": "^2.7.6",
"prettier": "^3.0.3",
"react-refresh": "^0.14.0",
"react-refresh-typescript": "^2.0.9",
"sass": "^1.69.3",
"sass": "^1.69.5",
"speed-measure-webpack-plugin": "^1.5.0",
"style-loader": "^3.3.3",
"ts-loader": "^9.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@liexp/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@databases/escape-identifier": "^1.0.3",
"@databases/sql": "^3.3.0",
"@liexp/core": "0.1.0",
"axios": "^1.5.1",
"axios": "^1.6.0",
"bs58": "^5.0.0",
"cheerio": "^1.0.0-rc.12",
"date-fns": "^2.30.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/@liexp/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
"@visx/tooltip": "^3.3.0",
"@visx/wordcloud": "^3.3.0",
"@visx/zoom": "^3.3.0",
"axios": "^1.5.1",
"axios": "^1.6.0",
"chroma-js": "^2.4.2",
"clsx": "^2.0.0",
"d3": "^7.8.5",
"d3-sankey": "^0.12.3",
"d3-sankey-circular": "^0.34.0",
"date-fns": "^2.30.0",
"fp-ts": "^2.16.1",
"geotiff": "^2.0.7",
"geotiff": "^2.1.0",
"io-ts": "^2.2.20",
"io-ts-types": "^0.5.19",
"is-plain-object": "^5.0.0",
Expand Down
29 changes: 29 additions & 0 deletions packages/@liexp/ui/src/components/Common/Icons/EventIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,35 @@ export const EventIcon: React.FC<EventIconProps> = ({ type, ...props }) => {
}
};

export const QuoteEventIcon: React.FC<Omit<EventIconProps, "type">> = (props) => (
<EventIcon type="Quote" {...props} />
);

export const ScientificStudyEventIcon: React.FC<Omit<EventIconProps, "type">> = (props) => (
<EventIcon type="ScientificStudy" {...props} />
);

export const DeathEventIcon: React.FC<Omit<EventIconProps, "type">> = (props) => (
<EventIcon type="Death" {...props} />
);

export const PatentEventIcon: React.FC<Omit<EventIconProps, "type">> = (props) => (
<EventIcon type="Patent" {...props} />
);

export const DocumentaryEventIcon: React.FC<Omit<EventIconProps, "type">> = (props) => (
<EventIcon type="Documentary" {...props} />
);

export const UncategorizedEventIcon: React.FC<Omit<EventIconProps, "type">> = (props) => (
<EventIcon type="Uncategorized" {...props} />
);

export const TransactionEventIcon: React.FC<Omit<EventIconProps, "type">> = (props) => (
<EventIcon type="Transaction" {...props} />
);


export const EventIconInSVG: React.FC<
EventIconProps & React.SVGProps<SVGTextElement>
> = ({ type, ...props }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@liexp/ui/src/components/EventPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const EventPageContent: React.FC<EventPageContentProps> = ({
>
<Box style={{ marginBottom: theme.spacing(3) }}>
{link ? (
<Link href={link.url} target="_blank">
<Link href={`/links/${link.id}`}>
{link.title}
</Link>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export const LinkEdit: React.FC = () => {
{isAdmin && <DangerZoneField />}
</Grid>
<Grid item md={6}>
<ReferenceArrayKeywordInput source="keywords" showAdd={false} />
<ReferenceArrayKeywordInput source="keywords" showAdd={true} />
{isAdmin && <ReferenceUserInput source="creator" />}
</Grid>
</Grid>
Expand Down
20 changes: 10 additions & 10 deletions packages/@liexp/ui/src/components/admin/media/MediaList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ export const MediaList: React.FC<ListProps> = (props) => {
return (
<Box>
<Box>
<Typography variant="h5" style={{ fontSize: 16 }}>{r.label}</Typography>
<Typography variant="body1">{r.description}</Typography>
</Box>
<Box>
<Typography variant="subtitle1">
{r.type}
{r.type === MP4Type.value &&
r.extra?.duration &&
` - ${toFormattedDuration(r.extra.duration)}`}
</Typography>
<Typography
variant="h6"
style={{
Expand All @@ -82,16 +92,6 @@ export const MediaList: React.FC<ListProps> = (props) => {
>
{url.hostname}
</Typography>
<Typography variant="subtitle1">
{r.type}
{r.type === MP4Type.value &&
r.extra?.duration &&
` - ${toFormattedDuration(r.extra.duration)}`}
</Typography>
</Box>
<Box>
<Typography variant="subtitle1">{r.label}</Typography>
<Typography variant="body1">{r.description}</Typography>
</Box>
</Box>
);
Expand Down
3 changes: 2 additions & 1 deletion packages/@liexp/ui/src/templates/EventTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const EventTemplateUI: React.FC<EventTemplateProps> = ({
onGroupMemberClick,
onKeywordClick,
onEventClick,
onLinkClick,
filters,
}) => {
const theme = useTheme();
Expand Down Expand Up @@ -333,7 +334,7 @@ export const EventTemplateUI: React.FC<EventTemplateProps> = ({
filter={{ ids: event.links }}
defaultExpanded={true}
column={2}
onItemClick={() => {}}
onItemClick={onLinkClick}
/>
</Box>
</SplitPageTemplate>
Expand Down
17 changes: 11 additions & 6 deletions packages/@liexp/ui/src/templates/links/LinkTemplateUI.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { type Keyword, type Link } from "@liexp/shared/lib/io/http";
import { type SearchEvent } from "@liexp/shared/lib/io/http/Events/SearchEvent";
import type * as http from "@liexp/shared/lib/io/http";
import * as React from "react";
import { KeywordsBox } from "../../components/KeywordsBox";
import MediaElement from "../../components/Media/MediaElement";
import { Box, Typography } from "../../components/mui";
import { Box, Typography, Link } from "../../components/mui";
import { EventsPanelBox } from "../../containers/EventsPanel";
import { SplitPageTemplate } from "../SplitPageTemplate";

export interface LinkTemplateUIProps {
link: Link.Link;
link: http.Link.Link;
tab: number;
onTabChange: (t: number) => void;
onEventClick: (e: SearchEvent) => void;
onKeywordClick: (k: Keyword.Keyword) => void;
onEventClick: (e: http.Events.SearchEvent.SearchEvent) => void;
onKeywordClick: (k: http.Keyword.Keyword) => void;
}

export const LinkTemplateUI: React.FC<LinkTemplateUIProps> = ({
Expand Down Expand Up @@ -64,6 +63,12 @@ export const LinkTemplateUI: React.FC<LinkTemplateUIProps> = ({
]}
>
<Box style={{ padding: 10 }}>
<Box style={{ paddingBottom: 10 }}>
<Link href={link.url} target="_blank">
{link.title}
</Link>
</Box>

<Typography style={{ marginBottom: 20 }}>{link.description}</Typography>
</Box>
<EventsPanelBox
Expand Down
4 changes: 2 additions & 2 deletions services/admin-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@types/webpack-bundle-analyzer": "^4.6.2",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"dotenv": "^16.3.1",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
Expand Down
10 changes: 8 additions & 2 deletions services/admin-web/src/AdminPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { apiProvider, authProvider } from "@liexp/ui/lib/client/api";
import { DeathEventIcon, DocumentaryEventIcon, PatentEventIcon, QuoteEventIcon, ScientificStudyEventIcon, TransactionEventIcon, UncategorizedEventIcon } from '@liexp/ui/lib/components/Common/Icons';
import {
EventSuggestionEdit,
EventSuggestionList,
Expand Down Expand Up @@ -26,7 +27,6 @@ import {
} from "@liexp/ui/lib/components/admin/stories/AdminStories";
import { i18nProvider } from "@liexp/ui/lib/i18n/i18n.provider";
import AssignmentIcon from "@mui/icons-material/Assignment";
import EventIcon from "@mui/icons-material/Event";
import GroupIcon from "@mui/icons-material/Group";
import LinkIcon from "@mui/icons-material/Link";
import MapIcon from "@mui/icons-material/Map";
Expand Down Expand Up @@ -169,46 +169,52 @@ const AdminPage: React.FC = () => {
list={EventList}
edit={EventEdit}
create={UncategorizedEventCreate}
icon={EventIcon}
icon={UncategorizedEventIcon}
/>

<Resource
name="deaths"
list={DeathList}
edit={DeathEdit}
create={DeathCreate}
icon={DeathEventIcon}
/>

<Resource
name="scientific-studies"
list={ScientificStudiesList}
edit={ScientificStudyEdit}
create={ScientificStudyCreate}
icon={ScientificStudyEventIcon}
/>
<Resource
name="patents"
list={PatentList}
edit={PatentEdit}
create={PatentCreate}
icon={PatentEventIcon}
/>
<Resource
name="documentaries"
list={DocumentaryList}
edit={DocumentaryEdit}
create={DocumentaryCreate}
icon={DocumentaryEventIcon}
/>
<Resource
name="transactions"
list={TransactionList}
edit={TransactionEdit}
create={TransactionCreate}
icon={TransactionEventIcon}
/>

<Resource
name="quotes"
list={QuoteList}
edit={QuoteEdit}
create={QuoteCreate}
icon={QuoteEventIcon}
/>
<Resource
name="links"
Expand Down
2 changes: 1 addition & 1 deletion services/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@liexp/backend": "0.1.0",
"@liexp/core": "0.1.0",
"@liexp/shared": "0.1.0",
"axios": "^1.5.1",
"axios": "^1.6.0",
"canvas": "^2.11.2",
"cors": "2.8.5",
"debug": "^4.3.4",
Expand Down
Loading