add TableDisplay node

This commit is contained in:
falsycat 2025-07-12 19:34:57 +09:00
parent 84a2a50922
commit 532fc0c006
5 changed files with 23 additions and 2 deletions

View File

@ -13,6 +13,10 @@
"nodes": { "nodes": {
"fetch_ToshoListed": { "fetch_ToshoListed": {
"title": "東証上場銘柄一覧" "title": "東証上場銘柄一覧"
},
"present_TableDisplay": {
"title": "銘柄一覧表示",
"open": "開く"
} }
} }
} }

View File

@ -8,10 +8,11 @@ import { History, Impl as HistoryImpl } from "./context/History";
const nodeTypes = { const nodeTypes = {
fetch_ToshoListed: node.fetch.ToshoListed, fetch_ToshoListed: node.fetch.ToshoListed,
present_TableDisplay: node.present.TableDisplay,
}; };
const initialNodes: Node[] = [ const initialNodes: Node[] = [
{id: "n1", type: "fetch_ToshoListed", position: {x:0, y:0}, data: {prime: true, standard: true, growth: true}}, {id: "n1", type: "fetch_ToshoListed", position: {x:0, y:0}, data: {prime: true, standard: true, growth: true}},
{id: "n2", position: {x:0, y:100}, data: {label: "hi"}}, {id: "n2", type: "present_TableDisplay", position: {x:0, y:100}, data: {}},
{id: "n3", position: {x:0, y:200}, data: {label: "hello"}}, {id: "n3", position: {x:0, y:200}, data: {label: "hello"}},
]; ];

View File

@ -9,7 +9,7 @@ export type ToshoListed = Node<{
prime: boolean, prime: boolean,
standard: boolean, standard: boolean,
growth: boolean, growth: boolean,
}, "ToshoListed">; }, "fetch_ToshoListed">;
export function ToshoListed({id, data}: NodeProps<ToshoListed>) { export function ToshoListed({id, data}: NodeProps<ToshoListed>) {
const {t} = useTranslation(); const {t} = useTranslation();

View File

@ -1,2 +1,3 @@
export { default as Base } from "./Base"; export { default as Base } from "./Base";
export * as fetch from "./fetch"; export * as fetch from "./fetch";
export * as present from "./present";

View File

@ -0,0 +1,15 @@
import { useTranslation } from "react-i18next";
import { Handle, Position } from "@xyflow/react";
import Base from "./Base";
export function TableDisplay() {
const {t} = useTranslation();
return (
<Base title={t("pages.screening.nodes.present_TableDisplay.title")}>
<div>
<div><a href="#">{t("pages.screening.nodes.present_TableDisplay.open")}</a></div>
</div>
<Handle type="target" position={Position.Left}/>
</Base>
);
}