treege 3.0.0-beta.31 → 3.0.0-beta.32
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/{ThemeContext-Cw-S1U8B.js → ThemeContext-CF4x2MjM.js} +1 -1
- package/dist/{editor-Bs1sHj4p.js → editor-Bu-BRxFn.js} +865 -865
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/{renderer-CsU2Y0iu.js → renderer-BTSDEkG-.js} +3 -3
- package/dist/renderer-native.js +2 -2
- package/dist/renderer.js +3 -3
- package/dist/{separator-B9rc85M6.js → separator-NOjYTDU_.js} +1 -1
- package/dist/{useRenderNode-IL6mmCOS.js → useRenderNode-B5u9MZKo.js} +1 -1
- package/package.json +2 -2
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, i, l as a, r as o, t as s, u as c } from "./ThemeContext-
|
|
2
|
-
import { C as l, D as u, E as d, F as f, M as p, N as m, O as h, P as g, S as _, T as v, _ as y, a as b, b as x, c as S, d as C, f as ee, g as te, h as
|
|
1
|
+
import { a as e, c as t, d as n, f as r, i, l as a, r as o, t as s, u as c } from "./ThemeContext-CF4x2MjM.js";
|
|
2
|
+
import { C as l, D as u, E as d, F as f, M as p, N as m, O as h, P as g, S as _, T as v, _ as y, a as b, b as x, c as S, d as C, f as ee, g as te, h as w, i as ne, j as T, k as E, l as D, m as re, n as O, o as ie, p as ae, r as k, s as oe, t as se, u as ce, v as A, w as le, x as ue, y as j } from "./separator-NOjYTDU_.js";
|
|
3
3
|
import { Background as de, BackgroundVariant as fe, BaseEdge as pe, Controls as me, EdgeLabelRenderer as he, Handle as ge, MiniMap as _e, NodeResizer as ve, Panel as ye, Position as be, ReactFlow as xe, ReactFlowProvider as Se, addEdge as Ce, getBezierPath as we, useEdges as Te, useNodes as Ee, useReactFlow as M } from "@xyflow/react";
|
|
4
4
|
import { createContext as De, memo as Oe, useCallback as N, useContext as ke, useEffect as Ae, useId as je, useMemo as P, useRef as Me, useState as F } from "react";
|
|
5
5
|
import { useForm as I } from "@tanstack/react-form";
|
|
6
|
-
import { AlignLeft as Ne, ArrowRightFromLine as Pe, Boxes as Fe, Calendar as Ie, CalendarRange as Le, CaseSensitive as Re, Check as ze, CheckSquare as Be, ChevronDown as Ve, ChevronsUpDown as
|
|
7
|
-
import { Slot as
|
|
8
|
-
import { cva as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import { Toaster as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import { useTheme as
|
|
6
|
+
import { AlignLeft as Ne, ArrowRightFromLine as Pe, Boxes as Fe, Calendar as Ie, CalendarRange as Le, CaseSensitive as Re, Check as ze, CheckSquare as Be, ChevronDown as Ve, ChevronsUpDown as He, CircleDot as Ue, Clock as We, Cloud as Ge, Copy as Ke, Download as qe, EllipsisVertical as Je, EyeOff as Ye, Hash as Xe, Heading as Ze, ImagePlus as Qe, KeyRound as $e, Link2 as et, ListFilter as tt, Loader2 as nt, MapPin as rt, Minus as it, MoreVertical as at, Paperclip as ot, Plus as L, PlusCircle as st, RectangleEllipsis as ct, Save as lt, Search as ut, Send as dt, Settings as ft, ToggleLeft as pt, Trash2 as mt, Upload as ht, Variable as gt, WandSparkles as _t, Waypoints as vt, X as R, XIcon as yt } from "lucide-react";
|
|
7
|
+
import { Slot as bt } from "@radix-ui/react-slot";
|
|
8
|
+
import { cva as xt } from "class-variance-authority";
|
|
9
|
+
import * as St from "@radix-ui/react-scroll-area";
|
|
10
|
+
import * as z from "@radix-ui/react-alert-dialog";
|
|
11
|
+
import * as B from "@radix-ui/react-dropdown-menu";
|
|
12
|
+
import { Toaster as Ct, toast as V } from "sonner";
|
|
13
|
+
import * as H from "@radix-ui/react-dialog";
|
|
14
|
+
import * as wt from "@radix-ui/react-collapsible";
|
|
15
|
+
import { useTheme as Tt } from "next-themes";
|
|
16
16
|
//#region src/editor/assets/img/treege-black.svg
|
|
17
|
-
var Tt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Et = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", W = r(), Dt = ({ theme: e = "dark" }) => /* @__PURE__ */ (0, W.jsx)("div", {
|
|
17
|
+
var Et = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1809_3434)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1303%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.455%2046.7988C17.0611%2047.1509%2017.7491%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34V41.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.251%20116.58%20138.64L151.39%2078.3401C151.741%2077.7316%20151.926%2077.0413%20151.926%2076.3386C151.926%2075.636%20151.74%2074.9458%20151.389%2074.3375C151.037%2073.7293%20150.531%2073.2244%20149.922%2072.8738C149.313%2072.5231%20148.623%2072.3391%20147.92%2072.3401H92.48C91.4191%2072.3401%2090.4017%2072.7615%2089.6516%2073.5117C88.9014%2074.2618%2088.48%2075.2792%2088.48%2076.3401V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.469C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.3201H3.99999C3.29819%2072.3208%202.60893%2072.5061%202.00143%2072.8575C1.39392%2073.2089%200.88955%2073.7139%200.538962%2074.3218C0.188375%2074.9298%200.00390931%2075.6193%200.00408949%2076.3211C0.00426966%2077.0229%200.189089%2077.7123%200.539989%2078.3201L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.489C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.3101C63.4773%2075.2509%2063.0547%2074.2361%2062.3049%2073.4881C61.555%2072.7401%2060.5391%2072.3201%2059.48%2072.3201V72.3201Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='black'/%3e%3cdefs%3e%3cclipPath%20id='clip0_1809_3434'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", Dt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%200%20462%20144'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2_65)'%3e%3cpath%20d='M137%2041.34L116.57%206C116.22%205.39399%20115.717%204.89037%20115.112%204.53942C114.507%204.18847%20113.82%204.00247%20113.12%204H38.83C38.1302%204.00247%2037.4434%204.18847%2036.838%204.53942C36.2326%204.89037%2035.7299%205.39399%2035.38%206L15%2041.34C14.6495%2041.947%2014.4647%2042.6355%2014.4641%2043.3365C14.4635%2044.0374%2014.6471%2044.7262%2014.9965%2045.3339C15.3459%2045.9416%2015.8488%2046.4467%2016.4549%2046.7988C17.061%2047.1509%2017.749%2047.3375%2018.45%2047.34H133.53C134.233%2047.341%20134.923%2047.157%20135.532%2046.8063C136.141%2046.4557%20136.647%2045.9508%20136.999%2045.3426C137.35%2044.7343%20137.536%2044.0441%20137.536%2043.3415C137.536%2042.6388%20137.351%2041.9485%20137%2041.34Z'%20fill='%2311D3B4'/%3e%3cpath%20d='M92.48%20140.64H113.1C113.805%20140.643%20114.498%20140.459%20115.109%20140.108C115.72%20139.757%20116.228%20139.25%20116.58%20138.64L151.39%2078.34C151.741%2077.7315%20151.926%2077.0412%20151.926%2076.3385C151.926%2075.6359%20151.74%2074.9457%20151.389%2074.3374C151.037%2073.7292%20150.531%2073.2243%20149.922%2072.8737C149.313%2072.523%20148.623%2072.339%20147.92%2072.34H92.48C91.4191%2072.34%2090.4017%2072.7614%2089.6516%2073.5116C88.9014%2074.2617%2088.48%2075.2791%2088.48%2076.34V136.64C88.48%20137.701%2088.9014%20138.718%2089.6516%20139.468C90.4017%20140.219%2091.4191%20140.64%2092.48%20140.64Z'%20fill='%23007EF6'/%3e%3cpath%20d='M59.48%2072.32H4C3.2982%2072.3207%202.60894%2072.5061%202.00143%2072.8574C1.39393%2073.2088%200.889558%2073.7138%200.53897%2074.3218C0.188382%2074.9297%200.00391694%2075.6192%200.00409712%2076.321C0.00427729%2077.0228%200.189097%2077.7122%200.539997%2078.32L35.38%20138.66C35.7299%20139.266%2036.2326%20139.77%2036.838%20140.121C37.4434%20140.472%2038.1302%20140.658%2038.83%20140.66H59.48C60.5409%20140.66%2061.5583%20140.239%2062.3084%20139.488C63.0586%20138.738%2063.48%20137.721%2063.48%20136.66V76.31C63.4773%2075.2509%2063.0548%2074.236%2062.3049%2073.488C61.555%2072.7401%2060.5391%2072.32%2059.48%2072.32Z'%20fill='%230164A8'/%3e%3c/g%3e%3cpath%20d='M207.52%20106.96C202.272%20106.96%20198.368%20105.584%20195.808%20102.832C193.312%20100.08%20192.064%2096.336%20192.064%2091.6V70.48H185.632V60.496H192.064V50.704L205.024%2046.864V60.496H216.544L215.776%2070.48H205.024V90.736C205.024%2093.232%20205.6%2094.96%20206.752%2095.92C207.904%2096.816%20209.696%2097.264%20212.128%2097.264C213.92%2097.264%20215.776%2096.944%20217.696%2096.304V105.232C216.288%20105.808%20214.752%20106.224%20213.088%20106.48C211.424%20106.8%20209.568%20106.96%20207.52%20106.96ZM224.347%20106V60.496H236.347L236.923%2065.2C238.971%2063.92%20241.499%2062.768%20244.507%2061.744C247.579%2060.656%20250.587%2059.92%20253.531%2059.536V69.328C251.803%2069.584%20249.915%2069.968%20247.867%2070.48C245.819%2070.992%20243.867%2071.568%20242.011%2072.208C240.155%2072.848%20238.587%2073.52%20237.307%2074.224V106H224.347ZM281.997%20106.96C274.125%20106.96%20267.885%20105.008%20263.277%20101.104C258.669%2097.136%20256.365%2091.152%20256.365%2083.152C256.365%2075.92%20258.285%2070.192%20262.125%2065.968C266.029%2061.68%20271.821%2059.536%20279.501%2059.536C286.541%2059.536%20291.917%2061.392%20295.629%2065.104C299.405%2068.752%20301.292%2073.552%20301.292%2079.504V87.76H268.365C269.069%2091.408%20270.733%2093.904%20273.357%2095.248C276.045%2096.592%20279.821%2097.264%20284.685%2097.264C287.117%2097.264%20289.581%2097.04%20292.077%2096.592C294.637%2096.144%20296.813%2095.568%20298.605%2094.864V104.08C296.493%20105.04%20294.029%20105.744%20291.213%20106.192C288.397%20106.704%20285.325%20106.96%20281.997%20106.96ZM268.365%2079.792H289.965V77.296C289.965%2074.672%20289.197%2072.624%20287.661%2071.152C286.125%2069.616%20283.533%2068.848%20279.885%2068.848C275.597%2068.848%20272.589%2069.712%20270.861%2071.44C269.197%2073.168%20268.365%2075.952%20268.365%2079.792ZM334.028%20106.96C326.156%20106.96%20319.916%20105.008%20315.308%20101.104C310.7%2097.136%20308.396%2091.152%20308.396%2083.152C308.396%2075.92%20310.316%2070.192%20314.156%2065.968C318.06%2061.68%20323.852%2059.536%20331.532%2059.536C338.572%2059.536%20343.948%2061.392%20347.66%2065.104C351.436%2068.752%20353.324%2073.552%20353.324%2079.504V87.76H320.396C321.1%2091.408%20322.764%2093.904%20325.388%2095.248C328.076%2096.592%20331.852%2097.264%20336.716%2097.264C339.148%2097.264%20341.612%2097.04%20344.108%2096.592C346.668%2096.144%20348.844%2095.568%20350.636%2094.864V104.08C348.524%20105.04%20346.06%20105.744%20343.244%20106.192C340.428%20106.704%20337.356%20106.96%20334.028%20106.96ZM320.396%2079.792H341.996V77.296C341.996%2074.672%20341.228%2072.624%20339.692%2071.152C338.156%2069.616%20335.564%2068.848%20331.916%2068.848C327.628%2068.848%20324.62%2069.712%20322.892%2071.44C321.228%2073.168%20320.396%2075.952%20320.396%2079.792ZM381.547%20122.896C378.155%20122.896%20374.667%20122.672%20371.083%20122.224C367.563%20121.776%20364.587%20121.136%20362.155%20120.304V110.608C364.715%20111.44%20367.723%20112.08%20371.179%20112.528C374.635%20113.04%20377.867%20113.296%20380.875%20113.296C385.291%20113.296%20388.491%20113.04%20390.475%20112.528C392.459%20112.08%20393.451%20111.248%20393.451%20110.032C393.451%20109.008%20393.003%20108.304%20392.107%20107.92C391.275%20107.536%20389.483%20107.344%20386.731%20107.344H374.347C366.219%20107.344%20362.155%20104.336%20362.155%2098.32C362.155%2096.464%20362.667%2094.768%20363.691%2093.232C364.715%2091.696%20366.347%2090.48%20368.587%2089.584C363.403%2086.96%20360.811%2082.544%20360.811%2076.336C360.811%2070.448%20362.635%2066.192%20366.283%2063.568C369.931%2060.88%20375.339%2059.536%20382.507%2059.536C383.979%2059.536%20385.579%2059.664%20387.307%2059.92C389.099%2060.112%20390.443%2060.304%20391.339%2060.496H408.427L408.139%2068.656H400.939C402.923%2070.512%20403.915%2073.104%20403.915%2076.432C403.915%2081.104%20402.443%2084.848%20399.499%2087.664C396.555%2090.416%20392.203%2091.792%20386.443%2091.792C385.419%2091.792%20384.427%2091.76%20383.467%2091.696C382.571%2091.568%20381.643%2091.44%20380.683%2091.312C378.763%2091.568%20377.131%2092.016%20375.787%2092.656C374.507%2093.296%20373.867%2094.16%20373.867%2095.248C373.867%2096.72%20375.179%2097.456%20377.803%2097.456H390.667C395.275%2097.456%20398.827%2098.512%20401.323%20100.624C403.819%20102.672%20405.067%20105.68%20405.067%20109.648C405.067%20114.128%20403.051%20117.456%20399.019%20119.632C394.987%20121.808%20389.163%20122.896%20381.547%20122.896ZM382.603%2084.496C386.443%2084.496%20389.099%2083.856%20390.571%2082.576C392.107%2081.232%20392.875%2078.992%20392.875%2075.856C392.875%2072.72%20392.107%2070.448%20390.571%2069.04C389.099%2067.632%20386.443%2066.928%20382.603%2066.928C378.955%2066.928%20376.331%2067.632%20374.731%2069.04C373.131%2070.384%20372.331%2072.656%20372.331%2075.856C372.331%2078.8%20373.067%2080.976%20374.539%2082.384C376.075%2083.792%20378.763%2084.496%20382.603%2084.496ZM439.028%20106.96C431.156%20106.96%20424.916%20105.008%20420.308%20101.104C415.7%2097.136%20413.396%2091.152%20413.396%2083.152C413.396%2075.92%20415.316%2070.192%20419.156%2065.968C423.06%2061.68%20428.852%2059.536%20436.532%2059.536C443.572%2059.536%20448.948%2061.392%20452.66%2065.104C456.436%2068.752%20458.324%2073.552%20458.324%2079.504V87.76H425.396C426.1%2091.408%20427.764%2093.904%20430.388%2095.248C433.076%2096.592%20436.852%2097.264%20441.716%2097.264C444.148%2097.264%20446.612%2097.04%20449.108%2096.592C451.668%2096.144%20453.844%2095.568%20455.636%2094.864V104.08C453.524%20105.04%20451.06%20105.744%20448.244%20106.192C445.428%20106.704%20442.356%20106.96%20439.028%20106.96ZM425.396%2079.792H446.996V77.296C446.996%2074.672%20446.228%2072.624%20444.692%2071.152C443.156%2069.616%20440.564%2068.848%20436.916%2068.848C432.628%2068.848%20429.62%2069.712%20427.892%2071.44C426.228%2073.168%20425.396%2075.952%20425.396%2079.792Z'%20fill='white'/%3e%3cdefs%3e%3cclipPath%20id='clip0_2_65'%3e%3crect%20width='151.93'%20height='136.64'%20fill='white'%20transform='translate(0%204)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e", U = r(), Ot = ({ theme: e = "dark" }) => /* @__PURE__ */ (0, U.jsx)("div", {
|
|
18
18
|
className: "absolute top-5 left-5 z-50 select-none",
|
|
19
|
-
children: /* @__PURE__ */ (0,
|
|
20
|
-
src: e === "dark" ?
|
|
19
|
+
children: /* @__PURE__ */ (0, U.jsx)("img", {
|
|
20
|
+
src: e === "dark" ? Dt : Et,
|
|
21
21
|
alt: "Treege",
|
|
22
22
|
className: "relative h-14 w-auto drop-shadow-[0_0px_35px] drop-shadow-blue-600"
|
|
23
23
|
})
|
|
24
|
-
}),
|
|
24
|
+
}), kt = (e) => {
|
|
25
25
|
let t = Ee(), n = Te();
|
|
26
26
|
return P(() => {
|
|
27
27
|
if (!e) return [];
|
|
@@ -44,7 +44,7 @@ var Tt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
|
|
|
44
44
|
t,
|
|
45
45
|
n
|
|
46
46
|
]);
|
|
47
|
-
},
|
|
47
|
+
}, At = De(null), jt = ({ children: e, value: t }) => {
|
|
48
48
|
let [n, r] = F(t?.flowId), [i, a] = F(!1), o = P(() => ({
|
|
49
49
|
...t,
|
|
50
50
|
...t?.aiConfig && { aiConfig: {
|
|
@@ -60,45 +60,45 @@ var Tt = "data:image/svg+xml,%3csvg%20width='462'%20height='144'%20viewBox='0%20
|
|
|
60
60
|
t,
|
|
61
61
|
i
|
|
62
62
|
]);
|
|
63
|
-
return /* @__PURE__ */ (0,
|
|
63
|
+
return /* @__PURE__ */ (0, U.jsx)(At.Provider, {
|
|
64
64
|
value: o,
|
|
65
65
|
children: e
|
|
66
66
|
});
|
|
67
|
-
},
|
|
67
|
+
}, Mt = () => ke(At) ?? {
|
|
68
68
|
flowId: void 0,
|
|
69
69
|
isNodeSheetOpen: !1,
|
|
70
70
|
language: "en",
|
|
71
71
|
setFlowId: () => {},
|
|
72
72
|
setIsNodeSheetOpen: () => {}
|
|
73
|
-
},
|
|
74
|
-
let n =
|
|
73
|
+
}, W = (t) => {
|
|
74
|
+
let n = Mt();
|
|
75
75
|
return e(t ?? n.language);
|
|
76
76
|
};
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/shared/components/ui/scroll-area.tsx
|
|
79
|
-
function
|
|
80
|
-
return /* @__PURE__ */ (0,
|
|
79
|
+
function Nt({ className: e, children: t, ...n }) {
|
|
80
|
+
return /* @__PURE__ */ (0, U.jsxs)(St.Root, {
|
|
81
81
|
"data-slot": "scroll-area",
|
|
82
82
|
className: f("relative", e),
|
|
83
83
|
...n,
|
|
84
84
|
children: [
|
|
85
|
-
/* @__PURE__ */ (0,
|
|
85
|
+
/* @__PURE__ */ (0, U.jsx)(St.Viewport, {
|
|
86
86
|
"data-slot": "scroll-area-viewport",
|
|
87
87
|
className: "size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
88
88
|
children: t
|
|
89
89
|
}),
|
|
90
|
-
/* @__PURE__ */ (0,
|
|
91
|
-
/* @__PURE__ */ (0,
|
|
90
|
+
/* @__PURE__ */ (0, U.jsx)(Pt, {}),
|
|
91
|
+
/* @__PURE__ */ (0, U.jsx)(St.Corner, {})
|
|
92
92
|
]
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
function
|
|
96
|
-
return /* @__PURE__ */ (0,
|
|
95
|
+
function Pt({ className: e, orientation: t = "vertical", ...n }) {
|
|
96
|
+
return /* @__PURE__ */ (0, U.jsx)(St.ScrollAreaScrollbar, {
|
|
97
97
|
"data-slot": "scroll-area-scrollbar",
|
|
98
98
|
orientation: t,
|
|
99
99
|
className: f("flex touch-none select-none p-px transition-colors", t === "vertical" && "h-full w-2.5 border-l border-l-transparent", t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", e),
|
|
100
100
|
...n,
|
|
101
|
-
children: /* @__PURE__ */ (0,
|
|
101
|
+
children: /* @__PURE__ */ (0, U.jsx)(St.ScrollAreaThumb, {
|
|
102
102
|
"data-slot": "scroll-area-thumb",
|
|
103
103
|
className: "relative flex-1 rounded-full bg-border"
|
|
104
104
|
})
|
|
@@ -106,7 +106,7 @@ function Nt({ className: e, orientation: t = "vertical", ...n }) {
|
|
|
106
106
|
}
|
|
107
107
|
//#endregion
|
|
108
108
|
//#region src/editor/constants/edgeTypes.ts
|
|
109
|
-
var
|
|
109
|
+
var Ft = {
|
|
110
110
|
conditional: Oe(({ id: e, target: t, sourceX: n, sourceY: r, targetX: a, targetY: o, sourcePosition: s, targetPosition: c, markerEnd: f, style: g, data: b }) => {
|
|
111
111
|
let [S, C, ee] = we({
|
|
112
112
|
sourcePosition: s,
|
|
@@ -115,10 +115,10 @@ var Pt = {
|
|
|
115
115
|
targetPosition: c,
|
|
116
116
|
targetX: a,
|
|
117
117
|
targetY: o
|
|
118
|
-
}), [te,
|
|
118
|
+
}), [te, w] = F(!1), { updateEdgeData: ne } = M(), D = kt(t), re = b?.conditions && b.conditions.length > 0, O = W(), { handleSubmit: ie, reset: ae, Field: k } = I({
|
|
119
119
|
defaultValues: {
|
|
120
120
|
conditions: b?.conditions || [{
|
|
121
|
-
field:
|
|
121
|
+
field: D[0]?.nodeId ?? "",
|
|
122
122
|
operator: "===",
|
|
123
123
|
value: ""
|
|
124
124
|
}],
|
|
@@ -132,7 +132,7 @@ var Pt = {
|
|
|
132
132
|
onChangeDebounceMs: 150
|
|
133
133
|
},
|
|
134
134
|
onSubmit: ({ value: t }) => {
|
|
135
|
-
|
|
135
|
+
ne(e, t);
|
|
136
136
|
}
|
|
137
137
|
}), oe = (e) => {
|
|
138
138
|
e.stopPropagation();
|
|
@@ -141,144 +141,144 @@ var Pt = {
|
|
|
141
141
|
conditions: [],
|
|
142
142
|
isFallback: !1,
|
|
143
143
|
label: ""
|
|
144
|
-
}),
|
|
144
|
+
}), ne(e, {
|
|
145
145
|
conditions: void 0,
|
|
146
146
|
isFallback: void 0,
|
|
147
147
|
label: void 0
|
|
148
148
|
});
|
|
149
149
|
}, ce = () => {
|
|
150
150
|
if (b?.isFallback) return b.label || O("editor.conditionalEdge.fallback");
|
|
151
|
-
if (!
|
|
151
|
+
if (!re) return null;
|
|
152
152
|
if (b.label) return b.label;
|
|
153
153
|
let e = b.conditions;
|
|
154
|
-
if (e.length === 1) return `${
|
|
154
|
+
if (e.length === 1) return `${D.find((t) => t.nodeId === e[0].field)?.label || e[0].field} ${e[0].operator} ${e[0].value}`;
|
|
155
155
|
let t = e.filter((e) => e.logicalOperator === i.AND).length, n = e.filter((e) => e.logicalOperator === i.OR).length;
|
|
156
156
|
return t > 0 && n === 0 ? `${e.length} ${O("editor.conditionalEdge.conditionsAnd")}` : n > 0 && t === 0 ? `${e.length} ${O("editor.conditionalEdge.conditionsOr")}` : `${e.length} ${O("editor.conditionalEdge.conditionsMixed")}`;
|
|
157
|
-
}, ue = () => b?.isFallback ? "var(--color-chart-4)" :
|
|
158
|
-
return /* @__PURE__ */ (0,
|
|
157
|
+
}, ue = () => b?.isFallback ? "var(--color-chart-4)" : re ? "var(--color-chart-2)" : "var(--color-chart-3)";
|
|
158
|
+
return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(pe, {
|
|
159
159
|
path: S,
|
|
160
160
|
markerEnd: f,
|
|
161
161
|
style: {
|
|
162
162
|
...g,
|
|
163
163
|
stroke: ue(),
|
|
164
164
|
strokeDasharray: b?.isFallback ? "5,5" : void 0,
|
|
165
|
-
strokeWidth:
|
|
165
|
+
strokeWidth: re || b?.isFallback ? 2 : g?.strokeWidth
|
|
166
166
|
}
|
|
167
|
-
}), /* @__PURE__ */ (0,
|
|
167
|
+
}), /* @__PURE__ */ (0, U.jsx)(he, { children: /* @__PURE__ */ (0, U.jsx)("div", {
|
|
168
168
|
className: "nodrag nopan absolute",
|
|
169
169
|
style: {
|
|
170
170
|
pointerEvents: "all",
|
|
171
171
|
transform: `translate(-50%, -50%) translate(${C}px,${ee}px)`
|
|
172
172
|
},
|
|
173
|
-
children: /* @__PURE__ */ (0,
|
|
173
|
+
children: /* @__PURE__ */ (0, U.jsxs)(le, {
|
|
174
174
|
open: te,
|
|
175
|
-
onOpenChange:
|
|
176
|
-
children: [/* @__PURE__ */ (0,
|
|
175
|
+
onOpenChange: w,
|
|
176
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
177
177
|
asChild: !0,
|
|
178
|
-
children: /* @__PURE__ */ (0,
|
|
179
|
-
variant:
|
|
178
|
+
children: /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
179
|
+
variant: re || b?.isFallback ? "default" : "secondary",
|
|
180
180
|
className: "h-8 px-2 text-xs",
|
|
181
181
|
onClick: oe,
|
|
182
|
-
children: [/* @__PURE__ */ (0,
|
|
182
|
+
children: [/* @__PURE__ */ (0, U.jsx)(vt, { className: "mr-1 h-3 w-3" }), re || b?.isFallback ? ce() : O("editor.conditionalEdge.condition")]
|
|
183
183
|
})
|
|
184
|
-
}), /* @__PURE__ */ (0,
|
|
184
|
+
}), /* @__PURE__ */ (0, U.jsx)(v, {
|
|
185
185
|
className: "w-96 p-1",
|
|
186
186
|
align: "center",
|
|
187
187
|
onClick: (e) => e.stopPropagation(),
|
|
188
|
-
children: /* @__PURE__ */ (0,
|
|
188
|
+
children: /* @__PURE__ */ (0, U.jsx)(Nt, {
|
|
189
189
|
className: "flex max-h-150 flex-col p-3",
|
|
190
|
-
children: /* @__PURE__ */ (0,
|
|
190
|
+
children: /* @__PURE__ */ (0, U.jsx)("form", {
|
|
191
191
|
onSubmit: (e) => {
|
|
192
192
|
e.preventDefault(), e.stopPropagation();
|
|
193
193
|
},
|
|
194
|
-
children: /* @__PURE__ */ (0,
|
|
194
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
195
195
|
className: "grid gap-5",
|
|
196
196
|
children: [
|
|
197
|
-
/* @__PURE__ */ (0,
|
|
197
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
198
198
|
className: "space-y-2",
|
|
199
|
-
children: [/* @__PURE__ */ (0,
|
|
199
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
200
200
|
className: "font-medium leading-none",
|
|
201
201
|
children: O("editor.conditionalEdge.displayConditions")
|
|
202
|
-
}), /* @__PURE__ */ (0,
|
|
202
|
+
}), /* @__PURE__ */ (0, U.jsx)("p", {
|
|
203
203
|
className: "text-muted-foreground text-sm",
|
|
204
204
|
children: O("editor.conditionalEdge.displayConditionsDesc")
|
|
205
205
|
})]
|
|
206
206
|
}),
|
|
207
|
-
/* @__PURE__ */ (0,
|
|
207
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
208
208
|
className: "grid gap-4",
|
|
209
209
|
children: [
|
|
210
|
-
/* @__PURE__ */ (0,
|
|
210
|
+
/* @__PURE__ */ (0, U.jsx)(k, {
|
|
211
211
|
name: "label",
|
|
212
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
213
|
-
/* @__PURE__ */ (0,
|
|
212
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
213
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
214
214
|
htmlFor: e.name,
|
|
215
215
|
children: O("editor.conditionalEdge.labelOptional")
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */ (0,
|
|
217
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
218
218
|
id: e.name,
|
|
219
219
|
placeholder: O("editor.conditionalEdge.labelPlaceholder"),
|
|
220
220
|
value: e.state.value,
|
|
221
221
|
onChange: (t) => e.handleChange(t.target.value)
|
|
222
222
|
}),
|
|
223
|
-
/* @__PURE__ */ (0,
|
|
223
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: O("editor.conditionalEdge.labelDesc") })
|
|
224
224
|
] })
|
|
225
225
|
}),
|
|
226
|
-
/* @__PURE__ */ (0,
|
|
226
|
+
/* @__PURE__ */ (0, U.jsx)(k, {
|
|
227
227
|
name: "isFallback",
|
|
228
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
228
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
229
229
|
className: "flex items-center gap-3 rounded-lg border bg-muted/20 p-3",
|
|
230
|
-
children: [/* @__PURE__ */ (0,
|
|
230
|
+
children: [/* @__PURE__ */ (0, U.jsx)(p, {
|
|
231
231
|
id: e.name,
|
|
232
232
|
checked: e.state.value,
|
|
233
233
|
onCheckedChange: (t) => e.handleChange(t)
|
|
234
|
-
}), /* @__PURE__ */ (0,
|
|
234
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
235
235
|
className: "flex flex-col gap-1",
|
|
236
|
-
children: [/* @__PURE__ */ (0,
|
|
236
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
237
237
|
htmlFor: e.name,
|
|
238
238
|
className: "cursor-pointer font-medium",
|
|
239
239
|
children: O("editor.conditionalEdge.fallbackPath")
|
|
240
|
-
}), /* @__PURE__ */ (0,
|
|
240
|
+
}), /* @__PURE__ */ (0, U.jsx)(E, {
|
|
241
241
|
className: "text-xs",
|
|
242
242
|
children: O("editor.conditionalEdge.fallbackPathDesc")
|
|
243
243
|
})]
|
|
244
244
|
})]
|
|
245
245
|
}) })
|
|
246
246
|
}),
|
|
247
|
-
/* @__PURE__ */ (0,
|
|
247
|
+
/* @__PURE__ */ (0, U.jsx)(k, {
|
|
248
248
|
name: "conditions",
|
|
249
249
|
mode: "array",
|
|
250
250
|
children: (e) => {
|
|
251
251
|
let t = e.form.getFieldValue("isFallback");
|
|
252
|
-
return /* @__PURE__ */ (0,
|
|
252
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
253
253
|
className: "space-y-3",
|
|
254
|
-
children: [/* @__PURE__ */ (0,
|
|
254
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
255
255
|
className: t ? "text-muted-foreground" : "",
|
|
256
256
|
children: O("editor.conditionalEdge.conditions")
|
|
257
|
-
}), /* @__PURE__ */ (0,
|
|
257
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
258
258
|
className: "space-y-2",
|
|
259
|
-
children: [e.state.value?.map((n, r) => /* @__PURE__ */ (0,
|
|
259
|
+
children: [e.state.value?.map((n, r) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
260
260
|
className: "space-y-2",
|
|
261
|
-
children: [/* @__PURE__ */ (0,
|
|
261
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
262
262
|
className: "space-y-2 rounded-lg border bg-muted/30 p-3",
|
|
263
263
|
children: [
|
|
264
|
-
/* @__PURE__ */ (0,
|
|
264
|
+
/* @__PURE__ */ (0, U.jsx)(k, {
|
|
265
265
|
name: `conditions[${r}].field`,
|
|
266
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
266
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
267
267
|
htmlFor: `field-${r}`,
|
|
268
268
|
children: O("editor.conditionalEdge.field")
|
|
269
|
-
}), /* @__PURE__ */ (0,
|
|
269
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
270
270
|
disabled: t,
|
|
271
271
|
value: e.state.value || "",
|
|
272
272
|
onValueChange: (t) => e.handleChange(t),
|
|
273
|
-
children: [/* @__PURE__ */ (0,
|
|
273
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
274
274
|
id: `field-${r}`,
|
|
275
275
|
className: "w-full",
|
|
276
|
-
children: /* @__PURE__ */ (0,
|
|
277
|
-
}), /* @__PURE__ */ (0,
|
|
276
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: O("editor.conditionalEdge.selectField") })
|
|
277
|
+
}), /* @__PURE__ */ (0, U.jsx)(A, { children: D.length === 0 ? /* @__PURE__ */ (0, U.jsx)(x, {
|
|
278
278
|
value: "none",
|
|
279
279
|
disabled: !0,
|
|
280
280
|
children: O("editor.conditionalEdge.noFieldsAvailable")
|
|
281
|
-
}) :
|
|
281
|
+
}) : D.map((e) => /* @__PURE__ */ (0, U.jsxs)(x, {
|
|
282
282
|
value: e.nodeId,
|
|
283
283
|
children: [
|
|
284
284
|
e.label,
|
|
@@ -289,55 +289,55 @@ var Pt = {
|
|
|
289
289
|
}, e.nodeId)) })]
|
|
290
290
|
})] })
|
|
291
291
|
}),
|
|
292
|
-
/* @__PURE__ */ (0,
|
|
292
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
293
293
|
className: "flex gap-2",
|
|
294
|
-
children: [/* @__PURE__ */ (0,
|
|
294
|
+
children: [/* @__PURE__ */ (0, U.jsx)(k, {
|
|
295
295
|
name: `conditions[${r}].operator`,
|
|
296
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
296
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
297
297
|
htmlFor: `operator-${r}`,
|
|
298
298
|
children: O("editor.conditionalEdge.operator")
|
|
299
|
-
}), /* @__PURE__ */ (0,
|
|
299
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
300
300
|
disabled: t,
|
|
301
301
|
value: e.state.value || "===",
|
|
302
302
|
onValueChange: (t) => e.handleChange(t),
|
|
303
|
-
children: [/* @__PURE__ */ (0,
|
|
303
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
304
304
|
id: `operator-${r}`,
|
|
305
|
-
children: /* @__PURE__ */ (0,
|
|
306
|
-
}), /* @__PURE__ */ (0,
|
|
307
|
-
/* @__PURE__ */ (0,
|
|
305
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, {})
|
|
306
|
+
}), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
|
|
307
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
308
308
|
value: "===",
|
|
309
309
|
children: "="
|
|
310
310
|
}),
|
|
311
|
-
/* @__PURE__ */ (0,
|
|
311
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
312
312
|
value: "!==",
|
|
313
313
|
children: "≠"
|
|
314
314
|
}),
|
|
315
|
-
/* @__PURE__ */ (0,
|
|
315
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
316
316
|
value: ">",
|
|
317
317
|
children: ">"
|
|
318
318
|
}),
|
|
319
|
-
/* @__PURE__ */ (0,
|
|
319
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
320
320
|
value: "<",
|
|
321
321
|
children: "<"
|
|
322
322
|
}),
|
|
323
|
-
/* @__PURE__ */ (0,
|
|
323
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
324
324
|
value: ">=",
|
|
325
325
|
children: ">="
|
|
326
326
|
}),
|
|
327
|
-
/* @__PURE__ */ (0,
|
|
327
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
328
328
|
value: "<=",
|
|
329
329
|
children: "<="
|
|
330
330
|
})
|
|
331
331
|
] })]
|
|
332
332
|
})] })
|
|
333
|
-
}), /* @__PURE__ */ (0,
|
|
333
|
+
}), /* @__PURE__ */ (0, U.jsx)(k, {
|
|
334
334
|
name: `conditions[${r}].value`,
|
|
335
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
335
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
336
336
|
className: "w-full",
|
|
337
|
-
children: [/* @__PURE__ */ (0,
|
|
337
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
338
338
|
htmlFor: `value-${r}`,
|
|
339
339
|
children: O("editor.conditionalEdge.value")
|
|
340
|
-
}), /* @__PURE__ */ (0,
|
|
340
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
341
341
|
disabled: t,
|
|
342
342
|
id: `value-${r}`,
|
|
343
343
|
placeholder: O("editor.conditionalEdge.valuePlaceholder"),
|
|
@@ -347,7 +347,7 @@ var Pt = {
|
|
|
347
347
|
})
|
|
348
348
|
})]
|
|
349
349
|
}),
|
|
350
|
-
e.state.value && e.state.value.length > 1 && /* @__PURE__ */ (0,
|
|
350
|
+
e.state.value && e.state.value.length > 1 && /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
351
351
|
disabled: t,
|
|
352
352
|
type: "button",
|
|
353
353
|
variant: "ghost",
|
|
@@ -356,31 +356,31 @@ var Pt = {
|
|
|
356
356
|
onClick: () => {
|
|
357
357
|
e.removeValue(r), ie().then();
|
|
358
358
|
},
|
|
359
|
-
children: [/* @__PURE__ */ (0,
|
|
359
|
+
children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "mr-1 h-4 w-4" }), O("editor.conditionalEdge.removeCondition")]
|
|
360
360
|
})
|
|
361
361
|
]
|
|
362
|
-
}), e.state.value && r < e.state.value.length - 1 && /* @__PURE__ */ (0,
|
|
362
|
+
}), e.state.value && r < e.state.value.length - 1 && /* @__PURE__ */ (0, U.jsx)(k, {
|
|
363
363
|
name: `conditions[${r}].logicalOperator`,
|
|
364
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
364
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)("div", {
|
|
365
365
|
className: "flex justify-center",
|
|
366
|
-
children: /* @__PURE__ */ (0,
|
|
366
|
+
children: /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
367
367
|
disabled: t,
|
|
368
368
|
value: e.state.value || i.AND,
|
|
369
369
|
onValueChange: (t) => e.handleChange(t),
|
|
370
|
-
children: [/* @__PURE__ */ (0,
|
|
370
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
371
371
|
className: "h-9 w-32 font-semibold",
|
|
372
|
-
children: /* @__PURE__ */ (0,
|
|
373
|
-
}), /* @__PURE__ */ (0,
|
|
372
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, {})
|
|
373
|
+
}), /* @__PURE__ */ (0, U.jsxs)(A, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
|
|
374
374
|
value: i.AND,
|
|
375
375
|
children: "AND"
|
|
376
|
-
}), /* @__PURE__ */ (0,
|
|
376
|
+
}), /* @__PURE__ */ (0, U.jsx)(x, {
|
|
377
377
|
value: i.OR,
|
|
378
378
|
children: "OR"
|
|
379
379
|
})] })]
|
|
380
380
|
})
|
|
381
381
|
})
|
|
382
382
|
})]
|
|
383
|
-
}, `condition-${r}`)), /* @__PURE__ */ (0,
|
|
383
|
+
}, `condition-${r}`)), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
384
384
|
disabled: t,
|
|
385
385
|
type: "button",
|
|
386
386
|
variant: "outline",
|
|
@@ -388,13 +388,13 @@ var Pt = {
|
|
|
388
388
|
className: "w-full",
|
|
389
389
|
onClick: () => {
|
|
390
390
|
e.pushValue({
|
|
391
|
-
field:
|
|
391
|
+
field: D[0]?.nodeId ?? "",
|
|
392
392
|
logicalOperator: i.AND,
|
|
393
393
|
operator: "===",
|
|
394
394
|
value: ""
|
|
395
395
|
}), ie().then();
|
|
396
396
|
},
|
|
397
|
-
children: [/* @__PURE__ */ (0,
|
|
397
|
+
children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), O("editor.conditionalEdge.addCondition")]
|
|
398
398
|
})]
|
|
399
399
|
})]
|
|
400
400
|
});
|
|
@@ -402,18 +402,18 @@ var Pt = {
|
|
|
402
402
|
})
|
|
403
403
|
]
|
|
404
404
|
}),
|
|
405
|
-
/* @__PURE__ */ (0,
|
|
405
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
406
406
|
className: "flex justify-end gap-2 pt-2",
|
|
407
|
-
children: [/* @__PURE__ */ (0,
|
|
407
|
+
children: [/* @__PURE__ */ (0, U.jsxs)(m, {
|
|
408
408
|
type: "button",
|
|
409
409
|
size: "sm",
|
|
410
410
|
variant: "outline",
|
|
411
411
|
onClick: se,
|
|
412
|
-
children: [/* @__PURE__ */ (0,
|
|
413
|
-
}), /* @__PURE__ */ (0,
|
|
412
|
+
children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "mr-1 h-4 w-4" }), O("common.clear")]
|
|
413
|
+
}), /* @__PURE__ */ (0, U.jsx)(m, {
|
|
414
414
|
type: "button",
|
|
415
415
|
size: "sm",
|
|
416
|
-
onClick: () =>
|
|
416
|
+
onClick: () => w(!1),
|
|
417
417
|
children: O("common.close")
|
|
418
418
|
})]
|
|
419
419
|
})
|
|
@@ -434,14 +434,14 @@ var Pt = {
|
|
|
434
434
|
targetX: r,
|
|
435
435
|
targetY: i
|
|
436
436
|
}), { setEdges: p } = M();
|
|
437
|
-
return /* @__PURE__ */ (0,
|
|
437
|
+
return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(pe, {
|
|
438
438
|
path: u,
|
|
439
439
|
markerEnd: c,
|
|
440
440
|
style: s
|
|
441
|
-
}), /* @__PURE__ */ (0,
|
|
441
|
+
}), /* @__PURE__ */ (0, U.jsx)(he, { children: l && /* @__PURE__ */ (0, U.jsx)("div", {
|
|
442
442
|
className: "button-edge__label nodrag nopan",
|
|
443
443
|
style: { transform: `translate(-50%, -50%) translate(${d}px,${f}px)` },
|
|
444
|
-
children: /* @__PURE__ */ (0,
|
|
444
|
+
children: /* @__PURE__ */ (0, U.jsx)("button", {
|
|
445
445
|
type: "button",
|
|
446
446
|
className: "button-edge__button",
|
|
447
447
|
onClick: () => {
|
|
@@ -452,7 +452,7 @@ var Pt = {
|
|
|
452
452
|
})
|
|
453
453
|
}) })] });
|
|
454
454
|
})
|
|
455
|
-
},
|
|
455
|
+
}, G = {
|
|
456
456
|
address: "address",
|
|
457
457
|
autocomplete: "autocomplete",
|
|
458
458
|
checkbox: "checkbox",
|
|
@@ -471,7 +471,7 @@ var Pt = {
|
|
|
471
471
|
textarea: "textarea",
|
|
472
472
|
time: "time",
|
|
473
473
|
timerange: "timerange"
|
|
474
|
-
},
|
|
474
|
+
}, It = { [o.input]: { type: G.text } }, K = () => {
|
|
475
475
|
let { setNodes: e, setEdges: t, getNodes: n } = M(), r = N(() => {
|
|
476
476
|
e((e) => e.map(({ selected: e, ...t }) => t)), t((e) => e.map(({ selected: e, ...t }) => t));
|
|
477
477
|
}, [t, e]), i = N((n) => {
|
|
@@ -490,7 +490,7 @@ var Pt = {
|
|
|
490
490
|
}, [e]), o = N((t, n) => {
|
|
491
491
|
e((e) => e.map((e) => e.id === t ? {
|
|
492
492
|
...e,
|
|
493
|
-
data:
|
|
493
|
+
data: It[n] ?? {},
|
|
494
494
|
type: n
|
|
495
495
|
} : e));
|
|
496
496
|
}, [e]), s = N((e) => {
|
|
@@ -515,14 +515,14 @@ var Pt = {
|
|
|
515
515
|
updateSelectedNodeData: c,
|
|
516
516
|
updateSelectedNodeType: s
|
|
517
517
|
};
|
|
518
|
-
},
|
|
519
|
-
let { language: i } =
|
|
518
|
+
}, Lt = ({ nodeId: e, label: t, placeholder: n, className: r }) => {
|
|
519
|
+
let { language: i } = Mt(), { updateNodeData: a } = K(), o = W(), s = t?.[i] ?? "", c = n || o("editor.treegeNode.labelPlaceholder"), l = (n) => {
|
|
520
520
|
a(e, { label: {
|
|
521
521
|
...t,
|
|
522
522
|
[i]: n.target.value
|
|
523
523
|
} });
|
|
524
524
|
}, u = (e) => e.stopPropagation();
|
|
525
|
-
return /* @__PURE__ */ (0,
|
|
525
|
+
return /* @__PURE__ */ (0, U.jsx)("input", {
|
|
526
526
|
type: "text",
|
|
527
527
|
value: s,
|
|
528
528
|
placeholder: c,
|
|
@@ -535,108 +535,108 @@ var Pt = {
|
|
|
535
535
|
};
|
|
536
536
|
//#endregion
|
|
537
537
|
//#region src/shared/components/ui/alert-dialog.tsx
|
|
538
|
-
function
|
|
539
|
-
return /* @__PURE__ */ (0,
|
|
538
|
+
function Rt({ ...e }) {
|
|
539
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Root, {
|
|
540
540
|
"data-slot": "alert-dialog",
|
|
541
541
|
...e
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
return /* @__PURE__ */ (0,
|
|
544
|
+
function zt({ ...e }) {
|
|
545
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Trigger, {
|
|
546
546
|
"data-slot": "alert-dialog-trigger",
|
|
547
547
|
...e
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
return /* @__PURE__ */ (0,
|
|
550
|
+
function Bt({ ...e }) {
|
|
551
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Portal, {
|
|
552
552
|
"data-slot": "alert-dialog-portal",
|
|
553
553
|
...e
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
|
-
function
|
|
557
|
-
return /* @__PURE__ */ (0,
|
|
556
|
+
function Vt({ className: e, ...t }) {
|
|
557
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Overlay, {
|
|
558
558
|
"data-slot": "alert-dialog-overlay",
|
|
559
559
|
className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
|
|
560
560
|
...t
|
|
561
561
|
});
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
return /* @__PURE__ */ (0,
|
|
563
|
+
function Ht({ className: e, ...t }) {
|
|
564
|
+
return /* @__PURE__ */ (0, U.jsxs)(Bt, { children: [/* @__PURE__ */ (0, U.jsx)(Vt, {}), /* @__PURE__ */ (0, U.jsx)(z.Content, {
|
|
565
565
|
"data-slot": "alert-dialog-content",
|
|
566
566
|
className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg", e),
|
|
567
567
|
...t
|
|
568
568
|
})] });
|
|
569
569
|
}
|
|
570
|
-
function
|
|
571
|
-
return /* @__PURE__ */ (0,
|
|
570
|
+
function Ut({ className: e, ...t }) {
|
|
571
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
572
572
|
"data-slot": "alert-dialog-header",
|
|
573
573
|
className: f("flex flex-col gap-2 text-center sm:text-left", e),
|
|
574
574
|
...t
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
return /* @__PURE__ */ (0,
|
|
577
|
+
function Wt({ className: e, ...t }) {
|
|
578
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
579
579
|
"data-slot": "alert-dialog-footer",
|
|
580
580
|
className: f("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
581
581
|
...t
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
|
-
function
|
|
585
|
-
return /* @__PURE__ */ (0,
|
|
584
|
+
function Gt({ className: e, ...t }) {
|
|
585
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Title, {
|
|
586
586
|
"data-slot": "alert-dialog-title",
|
|
587
587
|
className: f("font-semibold text-lg", e),
|
|
588
588
|
...t
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
return /* @__PURE__ */ (0,
|
|
591
|
+
function Kt({ className: e, ...t }) {
|
|
592
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Description, {
|
|
593
593
|
"data-slot": "alert-dialog-description",
|
|
594
594
|
className: f("text-muted-foreground text-sm", e),
|
|
595
595
|
...t
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
return /* @__PURE__ */ (0,
|
|
598
|
+
function qt({ className: e, ...t }) {
|
|
599
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Action, {
|
|
600
600
|
className: f(g(), e),
|
|
601
601
|
...t
|
|
602
602
|
});
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return /* @__PURE__ */ (0,
|
|
604
|
+
function Jt({ className: e, ...t }) {
|
|
605
|
+
return /* @__PURE__ */ (0, U.jsx)(z.Cancel, {
|
|
606
606
|
className: f(g({ variant: "outline" }), e),
|
|
607
607
|
...t
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
610
|
//#endregion
|
|
611
611
|
//#region src/shared/components/ui/dropdown-menu.tsx
|
|
612
|
-
function
|
|
613
|
-
return /* @__PURE__ */ (0,
|
|
612
|
+
function q({ ...e }) {
|
|
613
|
+
return /* @__PURE__ */ (0, U.jsx)(B.Root, {
|
|
614
614
|
"data-slot": "dropdown-menu",
|
|
615
615
|
...e
|
|
616
616
|
});
|
|
617
617
|
}
|
|
618
|
-
function
|
|
619
|
-
return /* @__PURE__ */ (0,
|
|
618
|
+
function J({ ...e }) {
|
|
619
|
+
return /* @__PURE__ */ (0, U.jsx)(B.Trigger, {
|
|
620
620
|
"data-slot": "dropdown-menu-trigger",
|
|
621
621
|
...e
|
|
622
622
|
});
|
|
623
623
|
}
|
|
624
|
-
function
|
|
625
|
-
return /* @__PURE__ */ (0,
|
|
624
|
+
function Y({ className: e, sideOffset: t = 4, ...n }) {
|
|
625
|
+
return /* @__PURE__ */ (0, U.jsx)(B.Portal, { children: /* @__PURE__ */ (0, U.jsx)(B.Content, {
|
|
626
626
|
"data-slot": "dropdown-menu-content",
|
|
627
627
|
sideOffset: t,
|
|
628
628
|
className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in", e),
|
|
629
629
|
...n
|
|
630
630
|
}) });
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
return /* @__PURE__ */ (0,
|
|
632
|
+
function Yt({ ...e }) {
|
|
633
|
+
return /* @__PURE__ */ (0, U.jsx)(B.Group, {
|
|
634
634
|
"data-slot": "dropdown-menu-group",
|
|
635
635
|
...e
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
return /* @__PURE__ */ (0,
|
|
638
|
+
function X({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
639
|
+
return /* @__PURE__ */ (0, U.jsx)(B.Item, {
|
|
640
640
|
"data-slot": "dropdown-menu-item",
|
|
641
641
|
"data-inset": t,
|
|
642
642
|
"data-variant": n,
|
|
@@ -644,16 +644,16 @@ function Z({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
|
644
644
|
...r
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
return /* @__PURE__ */ (0,
|
|
647
|
+
function Xt({ className: e, inset: t, ...n }) {
|
|
648
|
+
return /* @__PURE__ */ (0, U.jsx)(B.Label, {
|
|
649
649
|
"data-slot": "dropdown-menu-label",
|
|
650
650
|
"data-inset": t,
|
|
651
651
|
className: f("px-1.5 py-1 font-medium text-muted-foreground text-xs data-[inset]:pl-7", e),
|
|
652
652
|
...n
|
|
653
653
|
});
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
return /* @__PURE__ */ (0,
|
|
655
|
+
function Zt({ className: e, ...t }) {
|
|
656
|
+
return /* @__PURE__ */ (0, U.jsx)(B.Separator, {
|
|
657
657
|
"data-slot": "dropdown-menu-separator",
|
|
658
658
|
className: f("-mx-1 my-1 h-px bg-border", e),
|
|
659
659
|
...t
|
|
@@ -661,48 +661,48 @@ function Xt({ className: e, ...t }) {
|
|
|
661
661
|
}
|
|
662
662
|
//#endregion
|
|
663
663
|
//#region src/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.tsx
|
|
664
|
-
var
|
|
665
|
-
let { deleteNode: n, selectNode: r } =
|
|
666
|
-
|
|
667
|
-
}, u = () => {
|
|
668
|
-
n(e), s(!1);
|
|
669
|
-
};
|
|
670
|
-
return /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { children: [/* @__PURE__ */ (0, W.jsxs)(J, { children: [/* @__PURE__ */ (0, W.jsx)(Y, {
|
|
664
|
+
var Qt = ({ nodeId: e, className: t }) => {
|
|
665
|
+
let { deleteNode: n, selectNode: r } = K(), { setIsNodeSheetOpen: i } = Mt(), a = W(), [o, s] = F(!1), c = (e) => e.stopPropagation();
|
|
666
|
+
return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
671
667
|
asChild: !0,
|
|
672
668
|
onClick: c,
|
|
673
|
-
children: /* @__PURE__ */ (0,
|
|
669
|
+
children: /* @__PURE__ */ (0, U.jsx)("button", {
|
|
674
670
|
type: "button",
|
|
675
671
|
"aria-label": a("editor.nodeActionsSheet.editNode"),
|
|
676
672
|
className: f("nodrag nopan absolute top-2 right-2 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md opacity-60 transition-all hover:text-[--treege-color-primary] hover:opacity-100", t),
|
|
677
|
-
children: /* @__PURE__ */ (0,
|
|
673
|
+
children: /* @__PURE__ */ (0, U.jsx)(at, { className: "h-3.5 w-3.5" })
|
|
678
674
|
})
|
|
679
|
-
}), /* @__PURE__ */ (0,
|
|
675
|
+
}), /* @__PURE__ */ (0, U.jsxs)(Y, {
|
|
680
676
|
align: "end",
|
|
681
677
|
onClick: c,
|
|
682
678
|
children: [
|
|
683
|
-
/* @__PURE__ */ (0,
|
|
684
|
-
onClick:
|
|
685
|
-
|
|
679
|
+
/* @__PURE__ */ (0, U.jsxs)(X, {
|
|
680
|
+
onClick: () => {
|
|
681
|
+
r(e), i(!0);
|
|
682
|
+
},
|
|
683
|
+
children: [/* @__PURE__ */ (0, U.jsx)(ft, {}), a("common.settings")]
|
|
686
684
|
}),
|
|
687
|
-
/* @__PURE__ */ (0,
|
|
688
|
-
/* @__PURE__ */ (0,
|
|
685
|
+
/* @__PURE__ */ (0, U.jsx)(Zt, {}),
|
|
686
|
+
/* @__PURE__ */ (0, U.jsxs)(X, {
|
|
689
687
|
variant: "destructive",
|
|
690
688
|
onClick: () => s(!0),
|
|
691
|
-
children: [/* @__PURE__ */ (0,
|
|
689
|
+
children: [/* @__PURE__ */ (0, U.jsx)(mt, {}), a("common.delete")]
|
|
692
690
|
})
|
|
693
691
|
]
|
|
694
|
-
})] }), /* @__PURE__ */ (0,
|
|
692
|
+
})] }), /* @__PURE__ */ (0, U.jsx)(Rt, {
|
|
695
693
|
open: o,
|
|
696
694
|
onOpenChange: s,
|
|
697
|
-
children: /* @__PURE__ */ (0,
|
|
695
|
+
children: /* @__PURE__ */ (0, U.jsxs)(Ht, {
|
|
698
696
|
onClick: c,
|
|
699
|
-
children: [/* @__PURE__ */ (0,
|
|
700
|
-
onClick:
|
|
697
|
+
children: [/* @__PURE__ */ (0, U.jsxs)(Ut, { children: [/* @__PURE__ */ (0, U.jsx)(Gt, { children: a("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ (0, U.jsx)(Kt, { children: a("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ (0, U.jsxs)(Wt, { children: [/* @__PURE__ */ (0, U.jsx)(Jt, { children: a("common.cancel") }), /* @__PURE__ */ (0, U.jsx)(qt, {
|
|
698
|
+
onClick: () => {
|
|
699
|
+
n(e), s(!1);
|
|
700
|
+
},
|
|
701
701
|
children: a("common.delete")
|
|
702
702
|
})] })]
|
|
703
703
|
})
|
|
704
704
|
})] });
|
|
705
|
-
},
|
|
705
|
+
}, $t = xt("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
706
706
|
defaultVariants: { variant: "default" },
|
|
707
707
|
variants: { variant: {
|
|
708
708
|
blue: "bg-blue-500 text-white dark:bg-blue-600",
|
|
@@ -713,45 +713,45 @@ var Zt = ({ nodeId: e, className: t }) => {
|
|
|
713
713
|
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90"
|
|
714
714
|
} }
|
|
715
715
|
});
|
|
716
|
-
function
|
|
717
|
-
return /* @__PURE__ */ (0,
|
|
716
|
+
function en({ className: e, variant: t, asChild: n = !1, ...r }) {
|
|
717
|
+
return /* @__PURE__ */ (0, U.jsx)(n ? bt : "span", {
|
|
718
718
|
"data-slot": "badge",
|
|
719
|
-
className: f(
|
|
719
|
+
className: f($t({ variant: t }), e),
|
|
720
720
|
...r
|
|
721
721
|
});
|
|
722
722
|
}
|
|
723
|
-
var
|
|
724
|
-
/* @__PURE__ */ (0,
|
|
725
|
-
/* @__PURE__ */ (0,
|
|
723
|
+
var tn = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
724
|
+
/* @__PURE__ */ (0, U.jsx)(ve, {}),
|
|
725
|
+
/* @__PURE__ */ (0, U.jsx)("div", {
|
|
726
726
|
className: "-top-3.5 absolute left-6",
|
|
727
|
-
children: /* @__PURE__ */ (0,
|
|
727
|
+
children: /* @__PURE__ */ (0, U.jsxs)(en, {
|
|
728
728
|
className: "max-w-50 bg-chart-2",
|
|
729
|
-
children: [/* @__PURE__ */ (0,
|
|
729
|
+
children: [/* @__PURE__ */ (0, U.jsx)(Fe, { className: "!w-3 !h-3" }), /* @__PURE__ */ (0, U.jsx)(Lt, {
|
|
730
730
|
nodeId: t,
|
|
731
731
|
label: e?.label,
|
|
732
732
|
className: "min-w-0 flex-1 text-xs text-white placeholder:text-white/60"
|
|
733
733
|
})]
|
|
734
734
|
})
|
|
735
735
|
}),
|
|
736
|
-
/* @__PURE__ */ (0,
|
|
737
|
-
] })),
|
|
736
|
+
/* @__PURE__ */ (0, U.jsx)(Qt, { nodeId: t })
|
|
737
|
+
] })), nn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", rn = (e = 21) => {
|
|
738
738
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
739
|
-
for (; e--;) t +=
|
|
739
|
+
for (; e--;) t += nn[n[e] & 63];
|
|
740
740
|
return t;
|
|
741
|
-
},
|
|
741
|
+
}, an = {
|
|
742
742
|
data: { type: "text" },
|
|
743
|
-
id:
|
|
743
|
+
id: rn(),
|
|
744
744
|
position: {
|
|
745
745
|
x: 0,
|
|
746
746
|
y: 0
|
|
747
747
|
},
|
|
748
748
|
type: "input"
|
|
749
|
-
},
|
|
749
|
+
}, on = () => {
|
|
750
750
|
let { setNodes: e, setEdges: t, screenToFlowPosition: n, getNode: r, getNodes: i, getEdges: a } = M(), o = N((n, r, i = !1, o) => {
|
|
751
751
|
let s = n.id, l = a().filter((e) => e.source === s), u = c(n);
|
|
752
752
|
if (l.length > 0 && !u) return;
|
|
753
|
-
let d =
|
|
754
|
-
...
|
|
753
|
+
let d = rn(), f = {
|
|
754
|
+
...an,
|
|
755
755
|
...o && {
|
|
756
756
|
data: o.data ?? {},
|
|
757
757
|
type: o.type
|
|
@@ -767,7 +767,7 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
767
767
|
operator: "===",
|
|
768
768
|
value: ""
|
|
769
769
|
}] } : void 0,
|
|
770
|
-
id:
|
|
770
|
+
id: rn(),
|
|
771
771
|
source: s,
|
|
772
772
|
target: d,
|
|
773
773
|
type: t && u ? "conditional" : "default"
|
|
@@ -873,12 +873,12 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
873
873
|
onConnectEnd: u,
|
|
874
874
|
onEdgesDelete: d
|
|
875
875
|
};
|
|
876
|
-
},
|
|
876
|
+
}, Z = {
|
|
877
877
|
divider: "divider",
|
|
878
878
|
title: "title"
|
|
879
879
|
}, sn = ({ nodeId: e, isConnectable: t }) => {
|
|
880
|
-
let { onAddFromHandle: n } =
|
|
881
|
-
return /* @__PURE__ */ (0,
|
|
880
|
+
let { onAddFromHandle: n } = on(), r = W(), [i, a] = F(!1);
|
|
881
|
+
return /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(ge, {
|
|
882
882
|
type: "source",
|
|
883
883
|
position: be.Bottom,
|
|
884
884
|
isConnectable: t,
|
|
@@ -886,22 +886,22 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
886
886
|
e.defaultPrevented || a(!0);
|
|
887
887
|
},
|
|
888
888
|
className: "flex h-6! w-6! cursor-pointer items-center justify-center rounded-sm transition-colors hover:bg-primary/80!",
|
|
889
|
-
children: /* @__PURE__ */ (0,
|
|
890
|
-
}), /* @__PURE__ */ (0,
|
|
889
|
+
children: /* @__PURE__ */ (0, U.jsx)(L, { className: "h-4 w-4 text-primary-foreground" })
|
|
890
|
+
}), /* @__PURE__ */ (0, U.jsxs)(q, {
|
|
891
891
|
open: i,
|
|
892
892
|
onOpenChange: a,
|
|
893
|
-
children: [/* @__PURE__ */ (0,
|
|
893
|
+
children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
894
894
|
asChild: !0,
|
|
895
|
-
children: /* @__PURE__ */ (0,
|
|
895
|
+
children: /* @__PURE__ */ (0, U.jsx)("span", {
|
|
896
896
|
"aria-hidden": !0,
|
|
897
897
|
className: "-translate-x-1/2 pointer-events-none absolute bottom-0 left-1/2 h-0 w-0"
|
|
898
898
|
})
|
|
899
|
-
}), /* @__PURE__ */ (0,
|
|
899
|
+
}), /* @__PURE__ */ (0, U.jsxs)(Y, {
|
|
900
900
|
align: "center",
|
|
901
901
|
side: "bottom",
|
|
902
902
|
className: "treege-scrollbar max-h-80",
|
|
903
903
|
children: [
|
|
904
|
-
/* @__PURE__ */ (0,
|
|
904
|
+
/* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsx)(Xt, { children: r("editor.selectNodeType.options.input") }), Object.values(G).map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
|
|
905
905
|
onClick: () => n(e, {
|
|
906
906
|
data: { type: t },
|
|
907
907
|
type: o.input
|
|
@@ -909,8 +909,8 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
909
909
|
className: "capitalize",
|
|
910
910
|
children: t
|
|
911
911
|
}, t))] }),
|
|
912
|
-
/* @__PURE__ */ (0,
|
|
913
|
-
/* @__PURE__ */ (0,
|
|
912
|
+
/* @__PURE__ */ (0, U.jsx)(Zt, {}),
|
|
913
|
+
/* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsx)(Xt, { children: r("editor.selectNodeType.options.ui") }), Object.values(Z).map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
|
|
914
914
|
onClick: () => n(e, {
|
|
915
915
|
data: { type: t },
|
|
916
916
|
type: o.ui
|
|
@@ -918,8 +918,8 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
918
918
|
className: "capitalize",
|
|
919
919
|
children: t
|
|
920
920
|
}, t))] }),
|
|
921
|
-
/* @__PURE__ */ (0,
|
|
922
|
-
/* @__PURE__ */ (0,
|
|
921
|
+
/* @__PURE__ */ (0, U.jsx)(Zt, {}),
|
|
922
|
+
/* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsx)(Xt, { children: r("common.other") }), /* @__PURE__ */ (0, U.jsx)(X, {
|
|
923
923
|
onClick: () => n(e, {
|
|
924
924
|
data: {},
|
|
925
925
|
type: o.flow
|
|
@@ -930,53 +930,53 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
930
930
|
})]
|
|
931
931
|
})] });
|
|
932
932
|
}, cn = {
|
|
933
|
-
[
|
|
934
|
-
[
|
|
935
|
-
[
|
|
936
|
-
[
|
|
937
|
-
[
|
|
938
|
-
[
|
|
939
|
-
[
|
|
940
|
-
[
|
|
941
|
-
[
|
|
942
|
-
[
|
|
943
|
-
[
|
|
944
|
-
[
|
|
945
|
-
[
|
|
946
|
-
[
|
|
947
|
-
[
|
|
948
|
-
[
|
|
949
|
-
[
|
|
950
|
-
[
|
|
951
|
-
[
|
|
952
|
-
[
|
|
953
|
-
}, ln =
|
|
954
|
-
input: Object.values(
|
|
955
|
-
ui: Object.values(
|
|
933
|
+
[G.address]: rt,
|
|
934
|
+
[G.autocomplete]: ut,
|
|
935
|
+
[G.checkbox]: Be,
|
|
936
|
+
[G.date]: Ie,
|
|
937
|
+
[G.daterange]: Le,
|
|
938
|
+
[G.file]: ot,
|
|
939
|
+
[G.hidden]: Ye,
|
|
940
|
+
[G.http]: Ge,
|
|
941
|
+
[G.number]: Xe,
|
|
942
|
+
[G.password]: $e,
|
|
943
|
+
[G.radio]: Ue,
|
|
944
|
+
[G.select]: tt,
|
|
945
|
+
[G.submit]: dt,
|
|
946
|
+
[G.switch]: pt,
|
|
947
|
+
[G.text]: Re,
|
|
948
|
+
[G.textarea]: Ne,
|
|
949
|
+
[G.time]: We,
|
|
950
|
+
[G.timerange]: We,
|
|
951
|
+
[Z.divider]: it,
|
|
952
|
+
[Z.title]: Ze
|
|
953
|
+
}, ln = ct, un = (e) => e && cn[e] || ln, dn = {
|
|
954
|
+
input: Object.values(G),
|
|
955
|
+
ui: Object.values(Z)
|
|
956
956
|
}, fn = ({ nodeId: e, type: t, inputType: n }) => {
|
|
957
|
-
let { updateNodeData: r } =
|
|
958
|
-
return /* @__PURE__ */ (0,
|
|
957
|
+
let { updateNodeData: r } = K(), i = W(), a = dn[t], o = (e) => e.stopPropagation();
|
|
958
|
+
return /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
959
959
|
asChild: !0,
|
|
960
960
|
onClick: o,
|
|
961
|
-
children: /* @__PURE__ */ (0,
|
|
961
|
+
children: /* @__PURE__ */ (0, U.jsxs)(en, {
|
|
962
962
|
variant: "default",
|
|
963
963
|
className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
|
|
964
964
|
children: [
|
|
965
|
-
/* @__PURE__ */ (0,
|
|
965
|
+
/* @__PURE__ */ (0, U.jsx)(un(n), { className: "mt-0.5" }),
|
|
966
966
|
n || i("editor.selectInputType.type"),
|
|
967
|
-
/* @__PURE__ */ (0,
|
|
967
|
+
/* @__PURE__ */ (0, U.jsx)(Ve, {})
|
|
968
968
|
]
|
|
969
969
|
})
|
|
970
|
-
}), /* @__PURE__ */ (0,
|
|
970
|
+
}), /* @__PURE__ */ (0, U.jsx)(Y, {
|
|
971
971
|
align: "start",
|
|
972
972
|
className: "treege-scrollbar max-h-60",
|
|
973
973
|
onClick: o,
|
|
974
974
|
children: a.map((t) => {
|
|
975
975
|
let i = un(t);
|
|
976
|
-
return /* @__PURE__ */ (0,
|
|
976
|
+
return /* @__PURE__ */ (0, U.jsxs)(X, {
|
|
977
977
|
onClick: () => r(e, { type: t }),
|
|
978
978
|
className: f("capitalize", t === n && "bg-accent"),
|
|
979
|
-
children: [/* @__PURE__ */ (0,
|
|
979
|
+
children: [/* @__PURE__ */ (0, U.jsx)(i, {}), t]
|
|
980
980
|
}, t);
|
|
981
981
|
})
|
|
982
982
|
})] });
|
|
@@ -986,7 +986,7 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
986
986
|
"checkbox",
|
|
987
987
|
"autocomplete"
|
|
988
988
|
], mn = ({ nodeId: e, data: t }) => {
|
|
989
|
-
let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(""), { updateNodeData: c } =
|
|
989
|
+
let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(""), { updateNodeData: c } = K(), { language: l } = Mt(), f = W(), p = t && "type" in t ? t.type : void 0;
|
|
990
990
|
if (!(p && pn.includes(p))) return null;
|
|
991
991
|
let g = t.options ?? [], _ = () => {
|
|
992
992
|
a(""), s("");
|
|
@@ -1004,42 +1004,42 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
1004
1004
|
}, x = (e) => {
|
|
1005
1005
|
e.key === "Enter" && (e.preventDefault(), y());
|
|
1006
1006
|
}, S = (e) => e.stopPropagation();
|
|
1007
|
-
return /* @__PURE__ */ (0,
|
|
1007
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1008
1008
|
className: "nodrag nopan my-1 flex flex-col gap-0.5",
|
|
1009
1009
|
children: [g.map((e, t) => {
|
|
1010
1010
|
let n = f(e.label) || e.value || "—", r = `${e.value || "opt"}-${t}`;
|
|
1011
|
-
return /* @__PURE__ */ (0,
|
|
1011
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
1012
1012
|
className: "truncate text-muted-foreground text-xs",
|
|
1013
1013
|
children: n
|
|
1014
1014
|
}, r);
|
|
1015
|
-
}), /* @__PURE__ */ (0,
|
|
1015
|
+
}), /* @__PURE__ */ (0, U.jsxs)(le, {
|
|
1016
1016
|
open: n,
|
|
1017
1017
|
onOpenChange: b,
|
|
1018
|
-
children: [/* @__PURE__ */ (0,
|
|
1018
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
1019
1019
|
asChild: !0,
|
|
1020
1020
|
onClick: S,
|
|
1021
|
-
children: /* @__PURE__ */ (0,
|
|
1021
|
+
children: /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
1022
1022
|
type: "button",
|
|
1023
1023
|
variant: "link",
|
|
1024
1024
|
size: "xs",
|
|
1025
1025
|
className: "w-fit p-0!",
|
|
1026
|
-
children: [/* @__PURE__ */ (0,
|
|
1026
|
+
children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "size-3" }), f("editor.inputNodeForm.addOption")]
|
|
1027
1027
|
})
|
|
1028
|
-
}), /* @__PURE__ */ (0,
|
|
1028
|
+
}), /* @__PURE__ */ (0, U.jsx)(v, {
|
|
1029
1029
|
align: "start",
|
|
1030
1030
|
className: "w-64 p-3",
|
|
1031
1031
|
onClick: S,
|
|
1032
|
-
children: /* @__PURE__ */ (0,
|
|
1032
|
+
children: /* @__PURE__ */ (0, U.jsxs)("form", {
|
|
1033
1033
|
onSubmit: y,
|
|
1034
1034
|
className: "flex flex-col gap-2",
|
|
1035
1035
|
children: [
|
|
1036
|
-
/* @__PURE__ */ (0,
|
|
1036
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1037
1037
|
className: "flex flex-col gap-1",
|
|
1038
|
-
children: [/* @__PURE__ */ (0,
|
|
1038
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1039
1039
|
htmlFor: `${e}-option-label`,
|
|
1040
1040
|
className: "text-xs",
|
|
1041
1041
|
children: f("editor.inputNodeForm.optionLabel")
|
|
1042
|
-
}), /* @__PURE__ */ (0,
|
|
1042
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
1043
1043
|
id: `${e}-option-label`,
|
|
1044
1044
|
autoFocus: !0,
|
|
1045
1045
|
value: i,
|
|
@@ -1047,20 +1047,20 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
1047
1047
|
onKeyDown: x
|
|
1048
1048
|
})]
|
|
1049
1049
|
}),
|
|
1050
|
-
/* @__PURE__ */ (0,
|
|
1050
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1051
1051
|
className: "flex flex-col gap-1",
|
|
1052
|
-
children: [/* @__PURE__ */ (0,
|
|
1052
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1053
1053
|
htmlFor: `${e}-option-value`,
|
|
1054
1054
|
className: "text-xs",
|
|
1055
1055
|
children: f("editor.inputNodeForm.optionValue")
|
|
1056
|
-
}), /* @__PURE__ */ (0,
|
|
1056
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
1057
1057
|
id: `${e}-option-value`,
|
|
1058
1058
|
value: o,
|
|
1059
1059
|
onChange: (e) => s(e.target.value),
|
|
1060
1060
|
onKeyDown: x
|
|
1061
1061
|
})]
|
|
1062
1062
|
}),
|
|
1063
|
-
/* @__PURE__ */ (0,
|
|
1063
|
+
/* @__PURE__ */ (0, U.jsx)(m, {
|
|
1064
1064
|
type: "submit",
|
|
1065
1065
|
size: "sm",
|
|
1066
1066
|
disabled: !(i.trim() || o.trim()),
|
|
@@ -1072,12 +1072,12 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
1072
1072
|
})]
|
|
1073
1073
|
});
|
|
1074
1074
|
}, hn = ({ nodeId: e, required: t }) => {
|
|
1075
|
-
let { updateNodeData: n } =
|
|
1076
|
-
return /* @__PURE__ */ (0,
|
|
1075
|
+
let { updateNodeData: n } = K(), r = W();
|
|
1076
|
+
return /* @__PURE__ */ (0, U.jsx)(en, {
|
|
1077
1077
|
variant: t ? "destructive" : "outline",
|
|
1078
1078
|
asChild: !0,
|
|
1079
1079
|
className: "nodrag nopan cursor-pointer px-1.5 py-0 text-[10px] capitalize [&>svg]:size-2.5",
|
|
1080
|
-
children: /* @__PURE__ */ (0,
|
|
1080
|
+
children: /* @__PURE__ */ (0, U.jsx)("button", {
|
|
1081
1081
|
type: "button",
|
|
1082
1082
|
onClick: (r) => {
|
|
1083
1083
|
r.stopPropagation(), n(e, { required: !t });
|
|
@@ -1085,44 +1085,44 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
1085
1085
|
children: r(t ? "editor.inputNodeForm.required" : "editor.inputNodeForm.optional")
|
|
1086
1086
|
})
|
|
1087
1087
|
});
|
|
1088
|
-
}, gn = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ (0,
|
|
1088
|
+
}, gn = ({ children: e, inGroup: t, isSubmit: n }) => /* @__PURE__ */ (0, U.jsx)("div", {
|
|
1089
1089
|
className: f("react-flow__node__wrapper relative", t && "in-group", n && "submit-type"),
|
|
1090
1090
|
children: e
|
|
1091
1091
|
}), _n = Oe(({ data: e, isConnectable: t, parentId: n, type: r, id: i }) => {
|
|
1092
1092
|
let a = r === "input" || r === "ui" ? e?.type : void 0, o = r === "input" && e?.type === "submit", s = r === "input" ? e?.name : void 0;
|
|
1093
|
-
return /* @__PURE__ */ (0,
|
|
1093
|
+
return /* @__PURE__ */ (0, U.jsxs)(gn, {
|
|
1094
1094
|
inGroup: !!n,
|
|
1095
1095
|
isSubmit: o,
|
|
1096
1096
|
children: [
|
|
1097
|
-
/* @__PURE__ */ (0,
|
|
1098
|
-
/* @__PURE__ */ (0,
|
|
1097
|
+
/* @__PURE__ */ (0, U.jsx)(Qt, { nodeId: i }),
|
|
1098
|
+
/* @__PURE__ */ (0, U.jsx)(ge, {
|
|
1099
1099
|
type: "target",
|
|
1100
1100
|
position: be.Top,
|
|
1101
1101
|
isConnectable: t,
|
|
1102
1102
|
isConnectableStart: r === "ui"
|
|
1103
1103
|
}),
|
|
1104
|
-
/* @__PURE__ */ (0,
|
|
1104
|
+
/* @__PURE__ */ (0, U.jsx)(Lt, {
|
|
1105
1105
|
nodeId: i,
|
|
1106
1106
|
label: e?.label,
|
|
1107
1107
|
placeholder: s,
|
|
1108
1108
|
className: f("py-1", r === "ui" && "capitalize")
|
|
1109
1109
|
}),
|
|
1110
|
-
/* @__PURE__ */ (0,
|
|
1110
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1111
1111
|
className: "mb-1 flex gap-1",
|
|
1112
|
-
children: [(r === "input" || r === "ui") && /* @__PURE__ */ (0,
|
|
1112
|
+
children: [(r === "input" || r === "ui") && /* @__PURE__ */ (0, U.jsx)(fn, {
|
|
1113
1113
|
nodeId: i,
|
|
1114
1114
|
type: r,
|
|
1115
1115
|
inputType: a
|
|
1116
|
-
}), r === "input" && !o && /* @__PURE__ */ (0,
|
|
1116
|
+
}), r === "input" && !o && /* @__PURE__ */ (0, U.jsx)(hn, {
|
|
1117
1117
|
nodeId: i,
|
|
1118
1118
|
required: e?.required
|
|
1119
1119
|
})]
|
|
1120
1120
|
}),
|
|
1121
|
-
r === "input" && /* @__PURE__ */ (0,
|
|
1121
|
+
r === "input" && /* @__PURE__ */ (0, U.jsx)(mn, {
|
|
1122
1122
|
nodeId: i,
|
|
1123
1123
|
data: e
|
|
1124
1124
|
}),
|
|
1125
|
-
/* @__PURE__ */ (0,
|
|
1125
|
+
/* @__PURE__ */ (0, U.jsx)(sn, {
|
|
1126
1126
|
nodeId: i,
|
|
1127
1127
|
isConnectable: t
|
|
1128
1128
|
})
|
|
@@ -1130,7 +1130,7 @@ var en = Oe(({ data: e, id: t }) => /* @__PURE__ */ (0, W.jsxs)(W.Fragment, { ch
|
|
|
1130
1130
|
});
|
|
1131
1131
|
}), vn = {
|
|
1132
1132
|
[o.flow]: _n,
|
|
1133
|
-
[o.group]:
|
|
1133
|
+
[o.group]: tn,
|
|
1134
1134
|
[o.input]: _n,
|
|
1135
1135
|
[o.ui]: _n
|
|
1136
1136
|
}, yn = "You are a Treege decision tree generator. You must generate valid JSON structures for decision trees.\n\nIMPORTANT RULES:\n1. Always respond with valid JSON only, no markdown, no code blocks, no explanations outside the JSON\n2. The JSON must have this exact structure: { \"nodes\": [...], \"edges\": [...] }\n3. Every node must have: id (string), type (string), position ({ x: number, y: number }), data (object)\n4. Every edge must have: id (string), source (string), target (string)\n5. For regex patterns: ALWAYS use double backslashes (\\\\) for special characters (\\\\s, \\\\d, etc.)\n6. AVOID using \"pattern\" field unless specifically requested - prefer using simple validation\n7. For submit buttons, use type \"input\" with data.type \"submit\", NOT type \"flow\"\n8. For conditional logic, use conditional edges with proper operators (===, !==, >, <, >=, <=)\n\nNODE TYPES:\n- \"input\": Form input fields (text, number, select, checkbox, etc.)\n- \"ui\": UI elements (title, divider)\n- \"flow\": Navigation/flow control nodes\n- \"group\": Container for organizing nodes\n\nINPUT NODE TYPES (data.type):\n- \"text\", \"number\", \"textarea\", \"password\"\n- \"select\", \"radio\", \"checkbox\", \"switch\"\n- \"autocomplete\", \"date\", \"daterange\", \"time\", \"timerange\"\n- \"file\", \"address\", \"http\", \"hidden\", \"submit\"\n\nINPUT NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Field Label\",\n \"name\": \"fieldName\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter value...\",\n \"helperText\": \"Optional helper text\",\n \"pattern\": \"regex pattern (optional)\",\n \"errorMessage\": \"Error message if validation fails\",\n \"options\": [{ \"value\": \"val\", \"label\": \"Label\" }], // for select/radio/checkbox\n \"multiple\": false // for select/checkbox\n }\n}\n\nUI NODE TYPES (data.type):\n- \"title\": Display a title\n- \"divider\": Display a divider line\n\nUI NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"UI Element Label\",\n \"type\": \"title\" // or \"divider\"\n }\n}\n\nFLOW NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"flow\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Flow Step Label\",\n \"targetId\": \"next-node-id\" // optional\n }\n}\n\nGROUP NODE DATA STRUCTURE:\n{\n \"id\": \"unique-id\",\n \"type\": \"group\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": {\n \"label\": \"Group Label\"\n }\n}\n\nEDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"default\" // or \"conditional\" for conditional logic\n}\n\nCONDITIONAL EDGE STRUCTURE:\n{\n \"id\": \"edge-id\",\n \"source\": \"source-node-id\",\n \"target\": \"target-node-id\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If condition is true\", // optional label for the edge\n \"conditions\": [\n {\n \"field\": \"field-node-id\", // ID of the field to check\n \"operator\": \">=\", // operators: ===, !==, >, <, >=, <=\n \"value\": \"18\" // value to compare (as string)\n }\n ],\n \"operator\": \"AND\" // optional: \"AND\" or \"OR\" for multiple conditions (default: AND)\n }\n}\n\nIMPORTANT: For conditional edges, the value must ALWAYS be a string, even for numbers.\nExample: For \"age >= 18\", use \"value\": \"18\" (not value: 18)\n\nLAYOUT GUIDELINES:\n- Position nodes in a vertical flow (top to bottom)\n- Start at position { x: 0, y: 0 }\n- Space nodes vertically by exactly 250 pixels between each position (node height 150px + 100px spacing)\n- For horizontal spacing, use 350 pixels\n- Create logical flow from top to bottom\n- IMPORTANT: Keep consistent vertical spacing to avoid overlap\n- Each node position Y should increment by 250: first at y:0, second at y:250, third at y:500, etc.\n\nEXAMPLES:\n\nUser: \"Create a simple contact form with name, email and message\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Contact Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"email-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Email\",\n \"name\": \"email\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"your@email.com\"\n }\n },\n {\n \"id\": \"message-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Message\",\n \"name\": \"message\",\n \"type\": \"textarea\",\n \"required\": true,\n \"placeholder\": \"Enter your message\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"email-1\" },\n { \"id\": \"e3\", \"source\": \"email-1\", \"target\": \"message-1\" }\n ]\n}\n\nUser: \"Create a user registration form with age, address and country selector\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"User Registration\", \"type\": \"title\" }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"address-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Address\",\n \"name\": \"address\",\n \"type\": \"address\",\n \"required\": true,\n \"placeholder\": \"Enter your address\"\n }\n },\n {\n \"id\": \"country-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 750 },\n \"data\": {\n \"label\": \"Country\",\n \"name\": \"country\",\n \"type\": \"select\",\n \"required\": true,\n \"options\": [\n { \"value\": \"us\", \"label\": \"United States\" },\n { \"value\": \"ca\", \"label\": \"Canada\" },\n { \"value\": \"uk\", \"label\": \"United Kingdom\" },\n { \"value\": \"fr\", \"label\": \"France\" },\n { \"value\": \"de\", \"label\": \"Germany\" }\n ]\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"age-1\" },\n { \"id\": \"e2\", \"source\": \"age-1\", \"target\": \"address-1\" },\n { \"id\": \"e3\", \"source\": \"address-1\", \"target\": \"country-1\" },\n { \"id\": \"e4\", \"source\": \"country-1\", \"target\": \"submit-1\" }\n ]\n}\n\nUser: \"Create a form with name, age, and show different questions based on age (movie for 18+, color for under 18)\"\nResponse:\n{\n \"nodes\": [\n {\n \"id\": \"title-1\",\n \"type\": \"ui\",\n \"position\": { \"x\": 0, \"y\": 0 },\n \"data\": { \"label\": \"Survey Form\", \"type\": \"title\" }\n },\n {\n \"id\": \"name-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 250 },\n \"data\": {\n \"label\": \"Name\",\n \"name\": \"name\",\n \"type\": \"text\",\n \"required\": true,\n \"placeholder\": \"Enter your name\"\n }\n },\n {\n \"id\": \"age-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 500 },\n \"data\": {\n \"label\": \"Age\",\n \"name\": \"age\",\n \"type\": \"number\",\n \"required\": true,\n \"placeholder\": \"Enter your age\"\n }\n },\n {\n \"id\": \"movie-1\",\n \"type\": \"input\",\n \"position\": { \"x\": -350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Movie\",\n \"name\": \"favoriteMovie\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For adults 18 and over\"\n }\n },\n {\n \"id\": \"color-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 350, \"y\": 750 },\n \"data\": {\n \"label\": \"Favorite Color\",\n \"name\": \"favoriteColor\",\n \"type\": \"text\",\n \"required\": true,\n \"helperText\": \"For those under 18\"\n }\n },\n {\n \"id\": \"submit-1\",\n \"type\": \"input\",\n \"position\": { \"x\": 0, \"y\": 1000 },\n \"data\": {\n \"label\": \"Submit\",\n \"type\": \"submit\"\n }\n }\n ],\n \"edges\": [\n { \"id\": \"e1\", \"source\": \"title-1\", \"target\": \"name-1\" },\n { \"id\": \"e2\", \"source\": \"name-1\", \"target\": \"age-1\" },\n {\n \"id\": \"e3\",\n \"source\": \"age-1\",\n \"target\": \"movie-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If 18 or older\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \">=\",\n \"value\": \"18\"\n }\n ]\n }\n },\n {\n \"id\": \"e4\",\n \"source\": \"age-1\",\n \"target\": \"color-1\",\n \"type\": \"conditional\",\n \"data\": {\n \"label\": \"If under 18\",\n \"conditions\": [\n {\n \"field\": \"age-1\",\n \"operator\": \"<\",\n \"value\": \"18\"\n }\n ]\n }\n },\n { \"id\": \"e5\", \"source\": \"movie-1\", \"target\": \"submit-1\" },\n { \"id\": \"e6\", \"source\": \"color-1\", \"target\": \"submit-1\" }\n ]\n}\n\nRemember:\n- Always respond with ONLY valid JSON\n- No markdown code blocks\n- No explanations outside the JSON\n- Follow the exact structure shown above\n- For submit buttons, ALWAYS use type \"input\" with data.type \"submit\"\n- For conditional edges, ALWAYS specify the value as a string and use proper operators (>=, <, ===, etc.)\n- Never leave condition values empty - always provide the comparison value\n", bn = {
|
|
@@ -1266,13 +1266,13 @@ function Dn(e) {
|
|
|
1266
1266
|
//#endregion
|
|
1267
1267
|
//#region src/editor/features/TreegeEditor/panel/AIGeneratorDialog.tsx
|
|
1268
1268
|
var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
1269
|
-
let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(!1), c =
|
|
1269
|
+
let [n, r] = F(!1), [i, a] = F(""), [o, s] = F(!1), c = W(), l = async () => {
|
|
1270
1270
|
if (!i.trim()) {
|
|
1271
|
-
|
|
1271
|
+
V.error(c("editor.aiGenerator.enterDescription"));
|
|
1272
1272
|
return;
|
|
1273
1273
|
}
|
|
1274
1274
|
if (!e?.apiKey) {
|
|
1275
|
-
|
|
1275
|
+
V.error(c("editor.aiGenerator.missingApiKey"), { description: c("editor.aiGenerator.missingApiKeyDesc") });
|
|
1276
1276
|
return;
|
|
1277
1277
|
}
|
|
1278
1278
|
s(!0);
|
|
@@ -1284,43 +1284,43 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1284
1284
|
t({
|
|
1285
1285
|
edges: n.edges,
|
|
1286
1286
|
nodes: n.nodes
|
|
1287
|
-
}),
|
|
1287
|
+
}), V.success(c("editor.aiGenerator.successTitle"), { description: c("editor.aiGenerator.successDescription").replace("{nodes}", String(n.nodes.length)).replace("{edges}", String(n.edges.length)) }), a(""), r(!1);
|
|
1288
1288
|
} catch (e) {
|
|
1289
|
-
console.error("AI generation error:", e),
|
|
1289
|
+
console.error("AI generation error:", e), V.error(c("editor.aiGenerator.failedToGenerate"), { description: e instanceof Error ? e.message : c("editor.aiGenerator.unknownError") });
|
|
1290
1290
|
} finally {
|
|
1291
1291
|
s(!1);
|
|
1292
1292
|
}
|
|
1293
1293
|
};
|
|
1294
|
-
return /* @__PURE__ */ (0,
|
|
1294
|
+
return /* @__PURE__ */ (0, U.jsxs)(ce, {
|
|
1295
1295
|
open: n,
|
|
1296
1296
|
onOpenChange: r,
|
|
1297
|
-
children: [/* @__PURE__ */ (0,
|
|
1297
|
+
children: [/* @__PURE__ */ (0, U.jsx)(te, {
|
|
1298
1298
|
asChild: !0,
|
|
1299
|
-
children: /* @__PURE__ */ (0,
|
|
1299
|
+
children: /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
1300
1300
|
variant: "outline",
|
|
1301
1301
|
size: "sm",
|
|
1302
1302
|
disabled: !e?.apiKey,
|
|
1303
1303
|
children: [
|
|
1304
|
-
/* @__PURE__ */ (0,
|
|
1304
|
+
/* @__PURE__ */ (0, U.jsx)(_t, { className: "h-4 w-4 text-[#13d3b4]" }),
|
|
1305
1305
|
" ",
|
|
1306
1306
|
c("editor.aiGenerator.buttonLabel")
|
|
1307
1307
|
]
|
|
1308
1308
|
})
|
|
1309
|
-
}), /* @__PURE__ */ (0,
|
|
1309
|
+
}), /* @__PURE__ */ (0, U.jsxs)(C, {
|
|
1310
1310
|
className: "sm:max-w-[550px]",
|
|
1311
1311
|
children: [
|
|
1312
|
-
/* @__PURE__ */ (0,
|
|
1313
|
-
/* @__PURE__ */ (0,
|
|
1312
|
+
/* @__PURE__ */ (0, U.jsxs)(re, { children: [/* @__PURE__ */ (0, U.jsx)(w, { children: c("editor.aiGenerator.title") }), /* @__PURE__ */ (0, U.jsx)(ee, { children: c("editor.aiGenerator.titleDescription") })] }),
|
|
1313
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1314
1314
|
className: "grid gap-4 py-4",
|
|
1315
|
-
children: [/* @__PURE__ */ (0,
|
|
1315
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1316
1316
|
className: "grid gap-2",
|
|
1317
1317
|
children: [
|
|
1318
|
-
/* @__PURE__ */ (0,
|
|
1318
|
+
/* @__PURE__ */ (0, U.jsx)("label", {
|
|
1319
1319
|
htmlFor: "ai-prompt",
|
|
1320
1320
|
className: "font-medium text-sm",
|
|
1321
1321
|
children: c("editor.aiGenerator.description")
|
|
1322
1322
|
}),
|
|
1323
|
-
/* @__PURE__ */ (0,
|
|
1323
|
+
/* @__PURE__ */ (0, U.jsx)(D, {
|
|
1324
1324
|
placeholder: c("editor.aiGenerator.descriptionPlaceholder"),
|
|
1325
1325
|
value: i,
|
|
1326
1326
|
onChange: (e) => a(e.target.value),
|
|
@@ -1331,22 +1331,22 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1331
1331
|
disabled: o,
|
|
1332
1332
|
className: "resize-none"
|
|
1333
1333
|
}),
|
|
1334
|
-
/* @__PURE__ */ (0,
|
|
1334
|
+
/* @__PURE__ */ (0, U.jsx)("p", {
|
|
1335
1335
|
className: "text-muted-foreground text-xs",
|
|
1336
1336
|
children: c("editor.aiGenerator.keyboardShortcut").replace("{cmdEnter}", "⌘ Enter").replace("{ctrlEnter}", "Ctrl Enter")
|
|
1337
1337
|
})
|
|
1338
1338
|
]
|
|
1339
|
-
}), !e?.apiKey && /* @__PURE__ */ (0,
|
|
1339
|
+
}), !e?.apiKey && /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1340
1340
|
className: "rounded-md bg-muted p-3 text-sm",
|
|
1341
|
-
children: [/* @__PURE__ */ (0,
|
|
1341
|
+
children: [/* @__PURE__ */ (0, U.jsx)("p", {
|
|
1342
1342
|
className: "font-medium",
|
|
1343
1343
|
children: c("editor.aiGenerator.aiNotConfigured")
|
|
1344
|
-
}), /* @__PURE__ */ (0,
|
|
1344
|
+
}), /* @__PURE__ */ (0, U.jsxs)("p", {
|
|
1345
1345
|
className: "mt-1 text-muted-foreground text-xs",
|
|
1346
1346
|
children: [
|
|
1347
1347
|
c("editor.aiGenerator.aiNotConfiguredDesc").replace("{code}", ""),
|
|
1348
1348
|
" ",
|
|
1349
|
-
/* @__PURE__ */ (0,
|
|
1349
|
+
/* @__PURE__ */ (0, U.jsx)("code", {
|
|
1350
1350
|
className: "rounded bg-background px-1 py-0.5",
|
|
1351
1351
|
children: "aiConfig"
|
|
1352
1352
|
})
|
|
@@ -1354,28 +1354,28 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1354
1354
|
})]
|
|
1355
1355
|
})]
|
|
1356
1356
|
}),
|
|
1357
|
-
/* @__PURE__ */ (0,
|
|
1357
|
+
/* @__PURE__ */ (0, U.jsxs)(ae, { children: [/* @__PURE__ */ (0, U.jsx)(m, {
|
|
1358
1358
|
variant: "outline",
|
|
1359
1359
|
onClick: () => r(!1),
|
|
1360
1360
|
disabled: o,
|
|
1361
1361
|
children: c("editor.aiGenerator.cancel")
|
|
1362
|
-
}), /* @__PURE__ */ (0,
|
|
1362
|
+
}), /* @__PURE__ */ (0, U.jsx)(m, {
|
|
1363
1363
|
onClick: l,
|
|
1364
1364
|
disabled: o || !i.trim() || !e?.apiKey,
|
|
1365
|
-
children: o ? /* @__PURE__ */ (0,
|
|
1365
|
+
children: o ? /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(nt, { className: "h-4 w-4 animate-spin" }), c("editor.aiGenerator.generating")] }) : /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [/* @__PURE__ */ (0, U.jsx)(_t, { className: "h-4 w-4 text-[--treege-color-primary]" }), c("editor.aiGenerator.generate")] })
|
|
1366
1366
|
})] })
|
|
1367
1367
|
]
|
|
1368
1368
|
})]
|
|
1369
1369
|
});
|
|
1370
|
-
}, kn =
|
|
1371
|
-
let { flowId: n, setFlowId: r, aiConfig: i } =
|
|
1370
|
+
}, kn = rn(), An = ({ onExportJson: e, onSave: t }) => {
|
|
1371
|
+
let { flowId: n, setFlowId: r, aiConfig: i } = Mt(), { setNodes: a, setEdges: o, addNodes: s, screenToFlowPosition: c } = M(), l = n || kn, u = Ee(), d = Te(), f = Me(null), p = W(), h = () => {
|
|
1372
1372
|
let e = (window.innerWidth || 0) / 2, t = (window.innerHeight || 0) / 2, n = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-width"), 10), r = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--node-height"), 10), i = c({
|
|
1373
1373
|
x: e - n,
|
|
1374
1374
|
y: t - r
|
|
1375
1375
|
});
|
|
1376
1376
|
s([{
|
|
1377
|
-
...
|
|
1378
|
-
id:
|
|
1377
|
+
...an,
|
|
1378
|
+
id: rn(),
|
|
1379
1379
|
position: i,
|
|
1380
1380
|
selected: !0
|
|
1381
1381
|
}]);
|
|
@@ -1386,9 +1386,9 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1386
1386
|
n.onload = (e) => {
|
|
1387
1387
|
try {
|
|
1388
1388
|
let t = JSON.parse(e.target?.result);
|
|
1389
|
-
t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (a(t.nodes), o(t.edges),
|
|
1389
|
+
t && Array.isArray(t.nodes) && Array.isArray(t.edges) ? (a(t.nodes), o(t.edges), V.success(p("editor.actionsPanel.importSuccess"), { description: p("editor.actionsPanel.importSuccessDesc") })) : V.error(p("editor.actionsPanel.invalidJson"), { description: p("editor.actionsPanel.invalidJsonDesc") });
|
|
1390
1390
|
} catch (e) {
|
|
1391
|
-
console.warn(e),
|
|
1391
|
+
console.warn(e), V.error(p("editor.actionsPanel.parseError"), { description: p("editor.actionsPanel.parseErrorDesc") });
|
|
1392
1392
|
}
|
|
1393
1393
|
f.current && (f.current.value = "");
|
|
1394
1394
|
}, n.readAsText(t);
|
|
@@ -1398,7 +1398,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1398
1398
|
id: l,
|
|
1399
1399
|
nodes: u
|
|
1400
1400
|
}, i = new Blob([JSON.stringify(t, null, 2)], { type: "application/json" }), a = URL.createObjectURL(i), o = document.createElement("a");
|
|
1401
|
-
o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a),
|
|
1401
|
+
o.href = a, o.download = "treege.json", o.click(), URL.revokeObjectURL(a), V.success(p("editor.actionsPanel.downloadSuccess"), { description: p("editor.actionsPanel.downloadSuccessDesc") }), n || r?.(l), e?.(t);
|
|
1402
1402
|
}, v = N(() => {
|
|
1403
1403
|
n || r?.(l), t?.({
|
|
1404
1404
|
edges: d,
|
|
@@ -1420,101 +1420,101 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1420
1420
|
return window.addEventListener("keydown", e), () => {
|
|
1421
1421
|
window.removeEventListener("keydown", e);
|
|
1422
1422
|
};
|
|
1423
|
-
}, [v]), /* @__PURE__ */ (0,
|
|
1423
|
+
}, [v]), /* @__PURE__ */ (0, U.jsxs)(ye, {
|
|
1424
1424
|
position: "top-right",
|
|
1425
1425
|
className: "flex gap-2",
|
|
1426
1426
|
children: [
|
|
1427
|
-
/* @__PURE__ */ (0,
|
|
1427
|
+
/* @__PURE__ */ (0, U.jsx)(On, {
|
|
1428
1428
|
aiConfig: i,
|
|
1429
1429
|
onGenerate: (e) => {
|
|
1430
1430
|
a(e.nodes), o(e.edges);
|
|
1431
1431
|
}
|
|
1432
1432
|
}),
|
|
1433
|
-
/* @__PURE__ */ (0,
|
|
1433
|
+
/* @__PURE__ */ (0, U.jsxs)(m, {
|
|
1434
1434
|
variant: "outline",
|
|
1435
1435
|
size: "sm",
|
|
1436
1436
|
onClick: h,
|
|
1437
1437
|
children: [
|
|
1438
|
-
/* @__PURE__ */ (0,
|
|
1438
|
+
/* @__PURE__ */ (0, U.jsx)(L, {}),
|
|
1439
1439
|
" ",
|
|
1440
1440
|
p("editor.actionsPanel.addNode")
|
|
1441
1441
|
]
|
|
1442
1442
|
}),
|
|
1443
|
-
/* @__PURE__ */ (0,
|
|
1443
|
+
/* @__PURE__ */ (0, U.jsxs)(m, {
|
|
1444
1444
|
variant: "outline",
|
|
1445
1445
|
size: "sm",
|
|
1446
1446
|
onClick: v,
|
|
1447
1447
|
children: [
|
|
1448
|
-
/* @__PURE__ */ (0,
|
|
1448
|
+
/* @__PURE__ */ (0, U.jsx)(lt, {}),
|
|
1449
1449
|
" ",
|
|
1450
1450
|
p("common.save")
|
|
1451
1451
|
]
|
|
1452
1452
|
}),
|
|
1453
|
-
/* @__PURE__ */ (0,
|
|
1453
|
+
/* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
1454
1454
|
asChild: !0,
|
|
1455
|
-
children: /* @__PURE__ */ (0,
|
|
1455
|
+
children: /* @__PURE__ */ (0, U.jsx)(m, {
|
|
1456
1456
|
variant: "outline",
|
|
1457
1457
|
size: "sm",
|
|
1458
|
-
children: /* @__PURE__ */ (0,
|
|
1458
|
+
children: /* @__PURE__ */ (0, U.jsx)(Je, {})
|
|
1459
1459
|
})
|
|
1460
|
-
}), /* @__PURE__ */ (0,
|
|
1460
|
+
}), /* @__PURE__ */ (0, U.jsxs)(Y, {
|
|
1461
1461
|
align: "start",
|
|
1462
1462
|
children: [
|
|
1463
|
-
/* @__PURE__ */ (0,
|
|
1463
|
+
/* @__PURE__ */ (0, U.jsx)(Xt, {
|
|
1464
1464
|
className: "font-normal",
|
|
1465
|
-
children: /* @__PURE__ */ (0,
|
|
1465
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1466
1466
|
className: "flex flex-col gap-1",
|
|
1467
|
-
children: [/* @__PURE__ */ (0,
|
|
1467
|
+
children: [/* @__PURE__ */ (0, U.jsx)("span", {
|
|
1468
1468
|
className: "text-muted-foreground text-xs",
|
|
1469
1469
|
children: "Flow ID"
|
|
1470
|
-
}), /* @__PURE__ */ (0,
|
|
1470
|
+
}), /* @__PURE__ */ (0, U.jsxs)("button", {
|
|
1471
1471
|
onClick: async () => {
|
|
1472
1472
|
try {
|
|
1473
|
-
await navigator.clipboard.writeText(l),
|
|
1473
|
+
await navigator.clipboard.writeText(l), V.success(p("editor.actionsPanel.idCopied"), { description: l });
|
|
1474
1474
|
} catch {
|
|
1475
|
-
|
|
1475
|
+
V.error(p("editor.actionsPanel.copyFailed"));
|
|
1476
1476
|
}
|
|
1477
1477
|
},
|
|
1478
1478
|
className: "flex items-center gap-2 font-mono text-muted-foreground transition-colors hover:text-primary",
|
|
1479
1479
|
type: "button",
|
|
1480
|
-
children: [/* @__PURE__ */ (0,
|
|
1480
|
+
children: [/* @__PURE__ */ (0, U.jsx)(Ke, { className: "h-3 w-3" }), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
1481
1481
|
className: "truncate text-xs",
|
|
1482
1482
|
children: l
|
|
1483
1483
|
})]
|
|
1484
1484
|
})]
|
|
1485
1485
|
})
|
|
1486
1486
|
}),
|
|
1487
|
-
/* @__PURE__ */ (0,
|
|
1488
|
-
/* @__PURE__ */ (0,
|
|
1487
|
+
/* @__PURE__ */ (0, U.jsx)(Zt, {}),
|
|
1488
|
+
/* @__PURE__ */ (0, U.jsxs)(Yt, { children: [/* @__PURE__ */ (0, U.jsxs)(X, {
|
|
1489
1489
|
onClick: () => f?.current?.click(),
|
|
1490
1490
|
children: [
|
|
1491
|
-
/* @__PURE__ */ (0,
|
|
1491
|
+
/* @__PURE__ */ (0, U.jsx)(qe, {}),
|
|
1492
1492
|
" ",
|
|
1493
1493
|
p("editor.actionsPanel.importJson")
|
|
1494
1494
|
]
|
|
1495
|
-
}), /* @__PURE__ */ (0,
|
|
1495
|
+
}), /* @__PURE__ */ (0, U.jsxs)(X, {
|
|
1496
1496
|
onClick: _,
|
|
1497
1497
|
children: [
|
|
1498
|
-
/* @__PURE__ */ (0,
|
|
1498
|
+
/* @__PURE__ */ (0, U.jsx)(Pe, {}),
|
|
1499
1499
|
" ",
|
|
1500
1500
|
p("editor.actionsPanel.exportJson")
|
|
1501
1501
|
]
|
|
1502
1502
|
})] }),
|
|
1503
|
-
/* @__PURE__ */ (0,
|
|
1504
|
-
/* @__PURE__ */ (0,
|
|
1503
|
+
/* @__PURE__ */ (0, U.jsx)(Zt, {}),
|
|
1504
|
+
/* @__PURE__ */ (0, U.jsx)(Yt, { children: /* @__PURE__ */ (0, U.jsxs)(X, {
|
|
1505
1505
|
onClick: () => {
|
|
1506
|
-
a([]), o([]),
|
|
1506
|
+
a([]), o([]), V.success(p("editor.actionsPanel.clearSuccess"), { description: p("editor.actionsPanel.clearSuccessDesc") });
|
|
1507
1507
|
},
|
|
1508
1508
|
className: "text-destructive focus:text-destructive",
|
|
1509
1509
|
children: [
|
|
1510
|
-
/* @__PURE__ */ (0,
|
|
1510
|
+
/* @__PURE__ */ (0, U.jsx)(mt, { className: "text-destructive" }),
|
|
1511
1511
|
" ",
|
|
1512
1512
|
p("editor.actionsPanel.clear")
|
|
1513
1513
|
]
|
|
1514
1514
|
}) })
|
|
1515
1515
|
]
|
|
1516
1516
|
})] }),
|
|
1517
|
-
/* @__PURE__ */ (0,
|
|
1517
|
+
/* @__PURE__ */ (0, U.jsx)("input", {
|
|
1518
1518
|
type: "file",
|
|
1519
1519
|
accept: "application/json,.json",
|
|
1520
1520
|
className: "hidden",
|
|
@@ -1531,13 +1531,13 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1531
1531
|
fr: "fr",
|
|
1532
1532
|
it: "it",
|
|
1533
1533
|
pt: "pt"
|
|
1534
|
-
}, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ (0,
|
|
1534
|
+
}, Q = ({ value: e = "en", onValueChange: t }) => /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
1535
1535
|
value: e,
|
|
1536
1536
|
onValueChange: t,
|
|
1537
|
-
children: [/* @__PURE__ */ (0,
|
|
1537
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
1538
1538
|
className: "uppercase",
|
|
1539
|
-
children: /* @__PURE__ */ (0,
|
|
1540
|
-
}), /* @__PURE__ */ (0,
|
|
1539
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: "" })
|
|
1540
|
+
}), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsx)(j, { children: Object.values(jn).map((e) => /* @__PURE__ */ (0, U.jsx)(x, {
|
|
1541
1541
|
value: e,
|
|
1542
1542
|
className: "uppercase",
|
|
1543
1543
|
children: e
|
|
@@ -1552,7 +1552,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1552
1552
|
selectedNodes: n
|
|
1553
1553
|
};
|
|
1554
1554
|
}, Mn = () => {
|
|
1555
|
-
let [e, t] = F("en"), { updateSelectedNodeData: n } =
|
|
1555
|
+
let [e, t] = F("en"), { updateSelectedNodeData: n } = K(), { selectedNode: r } = $(), i = W(), { Field: a } = I({
|
|
1556
1556
|
defaultValues: {
|
|
1557
1557
|
label: r?.data?.label || { en: "" },
|
|
1558
1558
|
targetId: r?.data?.targetId || ""
|
|
@@ -1567,22 +1567,22 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1567
1567
|
n(e);
|
|
1568
1568
|
}
|
|
1569
1569
|
});
|
|
1570
|
-
return /* @__PURE__ */ (0,
|
|
1570
|
+
return /* @__PURE__ */ (0, U.jsx)("form", {
|
|
1571
1571
|
onSubmit: (e) => {
|
|
1572
1572
|
e.preventDefault(), e.stopPropagation();
|
|
1573
1573
|
},
|
|
1574
|
-
children: /* @__PURE__ */ (0,
|
|
1574
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1575
1575
|
className: "grid gap-6",
|
|
1576
|
-
children: [/* @__PURE__ */ (0,
|
|
1576
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1577
1577
|
className: "flex items-end gap-2",
|
|
1578
|
-
children: [/* @__PURE__ */ (0,
|
|
1578
|
+
children: [/* @__PURE__ */ (0, U.jsx)(a, {
|
|
1579
1579
|
name: "label",
|
|
1580
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
1580
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
1581
1581
|
className: "flex-1",
|
|
1582
|
-
children: [/* @__PURE__ */ (0,
|
|
1582
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1583
1583
|
htmlFor: t.name,
|
|
1584
1584
|
children: i("editor.flowNodeForm.label")
|
|
1585
|
-
}), /* @__PURE__ */ (0,
|
|
1585
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
1586
1586
|
id: t.name,
|
|
1587
1587
|
name: t.name,
|
|
1588
1588
|
value: t.state.value?.[e] || "",
|
|
@@ -1595,31 +1595,31 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
})]
|
|
1597
1597
|
})
|
|
1598
|
-
}), /* @__PURE__ */ (0,
|
|
1598
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
1599
1599
|
value: e,
|
|
1600
1600
|
onValueChange: t
|
|
1601
1601
|
})]
|
|
1602
|
-
}), /* @__PURE__ */ (0,
|
|
1602
|
+
}), /* @__PURE__ */ (0, U.jsx)(a, {
|
|
1603
1603
|
name: "targetId",
|
|
1604
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1605
|
-
/* @__PURE__ */ (0,
|
|
1604
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
1605
|
+
/* @__PURE__ */ (0, U.jsxs)(u, {
|
|
1606
1606
|
htmlFor: e.name,
|
|
1607
1607
|
children: [i("editor.flowNodeForm.targetId"), " (Flow ID)"]
|
|
1608
1608
|
}),
|
|
1609
|
-
/* @__PURE__ */ (0,
|
|
1609
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
1610
1610
|
id: e.name,
|
|
1611
1611
|
name: e.name,
|
|
1612
1612
|
value: e.state.value,
|
|
1613
1613
|
onBlur: e.handleBlur,
|
|
1614
1614
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
1615
1615
|
}),
|
|
1616
|
-
/* @__PURE__ */ (0,
|
|
1616
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: "Unique identifier of the target flow." })
|
|
1617
1617
|
] })
|
|
1618
1618
|
})]
|
|
1619
1619
|
})
|
|
1620
1620
|
});
|
|
1621
1621
|
}, Nn = () => {
|
|
1622
|
-
let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } =
|
|
1622
|
+
let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), { Field: i } = I({
|
|
1623
1623
|
defaultValues: { label: n?.data?.label || { en: "" } },
|
|
1624
1624
|
listeners: {
|
|
1625
1625
|
onChange: ({ formApi: e }) => {
|
|
@@ -1631,20 +1631,20 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1631
1631
|
r(e);
|
|
1632
1632
|
}
|
|
1633
1633
|
});
|
|
1634
|
-
return /* @__PURE__ */ (0,
|
|
1634
|
+
return /* @__PURE__ */ (0, U.jsx)("form", {
|
|
1635
1635
|
onSubmit: (e) => {
|
|
1636
1636
|
e.preventDefault(), e.stopPropagation();
|
|
1637
1637
|
},
|
|
1638
|
-
children: /* @__PURE__ */ (0,
|
|
1638
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1639
1639
|
className: "flex items-end gap-2",
|
|
1640
|
-
children: [/* @__PURE__ */ (0,
|
|
1640
|
+
children: [/* @__PURE__ */ (0, U.jsx)(i, {
|
|
1641
1641
|
name: "label",
|
|
1642
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
1642
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
1643
1643
|
className: "flex-1",
|
|
1644
|
-
children: [/* @__PURE__ */ (0,
|
|
1644
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1645
1645
|
htmlFor: t.name,
|
|
1646
1646
|
children: "Label"
|
|
1647
|
-
}), /* @__PURE__ */ (0,
|
|
1647
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
1648
1648
|
id: t.name,
|
|
1649
1649
|
name: t.name,
|
|
1650
1650
|
value: t.state.value?.[e] || "",
|
|
@@ -1657,7 +1657,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1657
1657
|
}
|
|
1658
1658
|
})]
|
|
1659
1659
|
})
|
|
1660
|
-
}), /* @__PURE__ */ (0,
|
|
1660
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
1661
1661
|
value: e,
|
|
1662
1662
|
onValueChange: t
|
|
1663
1663
|
})]
|
|
@@ -1668,7 +1668,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1668
1668
|
"PUT",
|
|
1669
1669
|
"PATCH"
|
|
1670
1670
|
], Fn = ({ value: e, onChange: t }) => {
|
|
1671
|
-
let { selectedNode: n } = $(), r =
|
|
1671
|
+
let { selectedNode: n } = $(), r = W(), i = kt(n?.id), { handleSubmit: a, Field: o, Subscribe: s } = I({
|
|
1672
1672
|
defaultValues: {
|
|
1673
1673
|
body: e?.body || "",
|
|
1674
1674
|
fetchOnMount: e?.fetchOnMount ?? !e?.searchParam,
|
|
@@ -1694,19 +1694,19 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1694
1694
|
t(e);
|
|
1695
1695
|
}
|
|
1696
1696
|
});
|
|
1697
|
-
return /* @__PURE__ */ (0,
|
|
1697
|
+
return /* @__PURE__ */ (0, U.jsx)("div", { children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1698
1698
|
className: "grid gap-6",
|
|
1699
1699
|
children: [
|
|
1700
|
-
/* @__PURE__ */ (0,
|
|
1700
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1701
1701
|
name: "url",
|
|
1702
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1703
|
-
/* @__PURE__ */ (0,
|
|
1702
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
1703
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1704
1704
|
htmlFor: e.name,
|
|
1705
1705
|
children: r("editor.httpConfigForm.apiUrl")
|
|
1706
1706
|
}),
|
|
1707
|
-
/* @__PURE__ */ (0,
|
|
1707
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1708
1708
|
className: "flex gap-2",
|
|
1709
|
-
children: [/* @__PURE__ */ (0,
|
|
1709
|
+
children: [/* @__PURE__ */ (0, U.jsx)(h, {
|
|
1710
1710
|
id: e.name,
|
|
1711
1711
|
name: e.name,
|
|
1712
1712
|
value: e.state.value,
|
|
@@ -1714,30 +1714,30 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1714
1714
|
onChange: ({ target: t }) => e.handleChange(t.value),
|
|
1715
1715
|
placeholder: r("editor.httpConfigForm.apiUrlPlaceholder"),
|
|
1716
1716
|
className: "flex-1"
|
|
1717
|
-
}), /* @__PURE__ */ (0,
|
|
1717
|
+
}), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
1718
1718
|
asChild: !0,
|
|
1719
|
-
children: /* @__PURE__ */ (0,
|
|
1719
|
+
children: /* @__PURE__ */ (0, U.jsx)(m, {
|
|
1720
1720
|
type: "button",
|
|
1721
1721
|
variant: "outline",
|
|
1722
1722
|
size: "icon",
|
|
1723
|
-
children: /* @__PURE__ */ (0,
|
|
1723
|
+
children: /* @__PURE__ */ (0, U.jsx)(gt, { className: "h-4 w-4" })
|
|
1724
1724
|
})
|
|
1725
|
-
}), /* @__PURE__ */ (0,
|
|
1725
|
+
}), /* @__PURE__ */ (0, U.jsx)(Y, {
|
|
1726
1726
|
align: "end",
|
|
1727
|
-
children: i.length === 0 ? /* @__PURE__ */ (0,
|
|
1727
|
+
children: i.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
|
|
1728
1728
|
disabled: !0,
|
|
1729
1729
|
children: r("editor.httpConfigForm.noFieldsAvailable")
|
|
1730
|
-
}) : i.map((t) => /* @__PURE__ */ (0,
|
|
1730
|
+
}) : i.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
|
|
1731
1731
|
onClick: () => {
|
|
1732
1732
|
let n = `{{${t.nodeId}}}`, r = e.state.value || "";
|
|
1733
1733
|
e.handleChange(r + n);
|
|
1734
1734
|
},
|
|
1735
|
-
children: /* @__PURE__ */ (0,
|
|
1735
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1736
1736
|
className: "flex flex-col",
|
|
1737
|
-
children: [/* @__PURE__ */ (0,
|
|
1737
|
+
children: [/* @__PURE__ */ (0, U.jsx)("span", {
|
|
1738
1738
|
className: "font-medium",
|
|
1739
1739
|
children: t.label
|
|
1740
|
-
}), /* @__PURE__ */ (0,
|
|
1740
|
+
}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
1741
1741
|
className: "text-muted-foreground text-xs",
|
|
1742
1742
|
children: `{{${t.nodeId}}}`
|
|
1743
1743
|
})]
|
|
@@ -1745,87 +1745,87 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1745
1745
|
}, t.nodeId))
|
|
1746
1746
|
})] })]
|
|
1747
1747
|
}),
|
|
1748
|
-
/* @__PURE__ */ (0,
|
|
1748
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.apiUrlDesc") })
|
|
1749
1749
|
] })
|
|
1750
1750
|
}),
|
|
1751
|
-
/* @__PURE__ */ (0,
|
|
1751
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1752
1752
|
name: "method",
|
|
1753
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1753
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1754
1754
|
htmlFor: e.name,
|
|
1755
1755
|
children: r("editor.httpConfigForm.httpMethod")
|
|
1756
|
-
}), /* @__PURE__ */ (0,
|
|
1756
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
1757
1757
|
value: e.state.value,
|
|
1758
1758
|
onValueChange: (t) => e.handleChange(t),
|
|
1759
|
-
children: [/* @__PURE__ */ (0,
|
|
1759
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
1760
1760
|
id: e.name,
|
|
1761
|
-
children: /* @__PURE__ */ (0,
|
|
1762
|
-
}), /* @__PURE__ */ (0,
|
|
1763
|
-
/* @__PURE__ */ (0,
|
|
1761
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: r("editor.httpConfigForm.selectMethod") })
|
|
1762
|
+
}), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
|
|
1763
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
1764
1764
|
value: "GET",
|
|
1765
1765
|
children: r("editor.httpConfigForm.methodGet")
|
|
1766
1766
|
}),
|
|
1767
|
-
/* @__PURE__ */ (0,
|
|
1767
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
1768
1768
|
value: "POST",
|
|
1769
1769
|
children: r("editor.httpConfigForm.methodPost")
|
|
1770
1770
|
}),
|
|
1771
|
-
/* @__PURE__ */ (0,
|
|
1771
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
1772
1772
|
value: "PUT",
|
|
1773
1773
|
children: r("editor.httpConfigForm.methodPut")
|
|
1774
1774
|
}),
|
|
1775
|
-
/* @__PURE__ */ (0,
|
|
1775
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
1776
1776
|
value: "DELETE",
|
|
1777
1777
|
children: r("editor.httpConfigForm.methodDelete")
|
|
1778
1778
|
}),
|
|
1779
|
-
/* @__PURE__ */ (0,
|
|
1779
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
1780
1780
|
value: "PATCH",
|
|
1781
1781
|
children: r("editor.httpConfigForm.methodPatch")
|
|
1782
1782
|
})
|
|
1783
1783
|
] })]
|
|
1784
1784
|
})] })
|
|
1785
1785
|
}),
|
|
1786
|
-
/* @__PURE__ */ (0,
|
|
1786
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1787
1787
|
className: "space-y-4",
|
|
1788
|
-
children: [/* @__PURE__ */ (0,
|
|
1788
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
1789
1789
|
className: "font-semibold text-sm",
|
|
1790
1790
|
children: r("editor.httpConfigForm.headers")
|
|
1791
|
-
}), /* @__PURE__ */ (0,
|
|
1791
|
+
}), /* @__PURE__ */ (0, U.jsx)(o, {
|
|
1792
1792
|
name: "headers",
|
|
1793
1793
|
mode: "array",
|
|
1794
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1794
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1795
1795
|
className: "space-y-2",
|
|
1796
1796
|
children: [e.state.value?.map((t, n) => {
|
|
1797
1797
|
let i = `headers[${n}]`;
|
|
1798
|
-
return /* @__PURE__ */ (0,
|
|
1798
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1799
1799
|
className: "flex items-start gap-2",
|
|
1800
1800
|
children: [
|
|
1801
|
-
/* @__PURE__ */ (0,
|
|
1801
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1802
1802
|
name: `headers[${n}].key`,
|
|
1803
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1803
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
1804
1804
|
placeholder: r("editor.httpConfigForm.headerName"),
|
|
1805
1805
|
value: e.state.value || "",
|
|
1806
1806
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
1807
1807
|
})
|
|
1808
1808
|
}),
|
|
1809
|
-
/* @__PURE__ */ (0,
|
|
1809
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1810
1810
|
name: `headers[${n}].value`,
|
|
1811
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1811
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
1812
1812
|
placeholder: r("editor.httpConfigForm.headerValue"),
|
|
1813
1813
|
value: e.state.value || "",
|
|
1814
1814
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
1815
1815
|
})
|
|
1816
1816
|
}),
|
|
1817
|
-
/* @__PURE__ */ (0,
|
|
1817
|
+
/* @__PURE__ */ (0, U.jsx)(m, {
|
|
1818
1818
|
type: "button",
|
|
1819
1819
|
variant: "ghost",
|
|
1820
1820
|
size: "icon",
|
|
1821
1821
|
onClick: () => {
|
|
1822
1822
|
e.removeValue(n);
|
|
1823
1823
|
},
|
|
1824
|
-
children: /* @__PURE__ */ (0,
|
|
1824
|
+
children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
|
|
1825
1825
|
})
|
|
1826
1826
|
]
|
|
1827
1827
|
}, i);
|
|
1828
|
-
}), /* @__PURE__ */ (0,
|
|
1828
|
+
}), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
1829
1829
|
type: "button",
|
|
1830
1830
|
variant: "outline",
|
|
1831
1831
|
size: "sm",
|
|
@@ -1835,64 +1835,64 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1835
1835
|
value: ""
|
|
1836
1836
|
});
|
|
1837
1837
|
},
|
|
1838
|
-
children: [/* @__PURE__ */ (0,
|
|
1838
|
+
children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.addHeader")]
|
|
1839
1839
|
})]
|
|
1840
1840
|
})
|
|
1841
1841
|
})]
|
|
1842
1842
|
}),
|
|
1843
|
-
/* @__PURE__ */ (0,
|
|
1843
|
+
/* @__PURE__ */ (0, U.jsx)(s, {
|
|
1844
1844
|
selector: (e) => ({
|
|
1845
1845
|
method: e.values.method,
|
|
1846
1846
|
sendAllFormValues: e.values.sendAllFormValues
|
|
1847
1847
|
}),
|
|
1848
|
-
children: ({ method: e, sendAllFormValues: t }) => Pn.includes(e || "") && /* @__PURE__ */ (0,
|
|
1848
|
+
children: ({ method: e, sendAllFormValues: t }) => Pn.includes(e || "") && /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1849
1849
|
className: "space-y-4",
|
|
1850
|
-
children: [/* @__PURE__ */ (0,
|
|
1850
|
+
children: [/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1851
1851
|
name: "sendAllFormValues",
|
|
1852
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1852
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1853
1853
|
className: "flex items-center space-x-2",
|
|
1854
|
-
children: [/* @__PURE__ */ (0,
|
|
1854
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
1855
1855
|
id: e.name,
|
|
1856
1856
|
checked: e.state.value,
|
|
1857
1857
|
onCheckedChange: (t) => e.handleChange(t)
|
|
1858
|
-
}), /* @__PURE__ */ (0,
|
|
1858
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
1859
1859
|
htmlFor: e.name,
|
|
1860
1860
|
children: r("editor.httpConfigForm.sendAllFormValues")
|
|
1861
1861
|
})]
|
|
1862
1862
|
})
|
|
1863
|
-
}), /* @__PURE__ */ (0,
|
|
1863
|
+
}), /* @__PURE__ */ (0, U.jsx)(o, {
|
|
1864
1864
|
name: "body",
|
|
1865
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1866
|
-
/* @__PURE__ */ (0,
|
|
1865
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
1866
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1867
1867
|
className: "mb-2 flex items-center justify-between",
|
|
1868
|
-
children: [/* @__PURE__ */ (0,
|
|
1868
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1869
1869
|
htmlFor: e.name,
|
|
1870
1870
|
children: r("editor.httpConfigForm.requestBody")
|
|
1871
|
-
}), /* @__PURE__ */ (0,
|
|
1871
|
+
}), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
1872
1872
|
asChild: !0,
|
|
1873
|
-
children: /* @__PURE__ */ (0,
|
|
1873
|
+
children: /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
1874
1874
|
type: "button",
|
|
1875
1875
|
variant: "ghost",
|
|
1876
1876
|
size: "sm",
|
|
1877
1877
|
disabled: t,
|
|
1878
|
-
children: [/* @__PURE__ */ (0,
|
|
1878
|
+
children: [/* @__PURE__ */ (0, U.jsx)(gt, { className: "mr-2 h-4 w-4" }), r("editor.httpConfigForm.insertVariable")]
|
|
1879
1879
|
})
|
|
1880
|
-
}), /* @__PURE__ */ (0,
|
|
1880
|
+
}), /* @__PURE__ */ (0, U.jsx)(Y, {
|
|
1881
1881
|
align: "end",
|
|
1882
|
-
children: i.length === 0 ? /* @__PURE__ */ (0,
|
|
1882
|
+
children: i.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
|
|
1883
1883
|
disabled: !0,
|
|
1884
1884
|
children: r("editor.httpConfigForm.noFieldsAvailable")
|
|
1885
|
-
}) : i.map((t) => /* @__PURE__ */ (0,
|
|
1885
|
+
}) : i.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
|
|
1886
1886
|
onClick: () => {
|
|
1887
1887
|
let n = `{{${t.nodeId}}}`, r = e.state.value || "";
|
|
1888
1888
|
e.handleChange(r + n), a().then();
|
|
1889
1889
|
},
|
|
1890
|
-
children: /* @__PURE__ */ (0,
|
|
1890
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1891
1891
|
className: "flex flex-col",
|
|
1892
|
-
children: [/* @__PURE__ */ (0,
|
|
1892
|
+
children: [/* @__PURE__ */ (0, U.jsx)("span", {
|
|
1893
1893
|
className: "font-medium",
|
|
1894
1894
|
children: t.label
|
|
1895
|
-
}), /* @__PURE__ */ (0,
|
|
1895
|
+
}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
1896
1896
|
className: "text-muted-foreground text-xs",
|
|
1897
1897
|
children: `{{${t.nodeId}}}`
|
|
1898
1898
|
})]
|
|
@@ -1900,7 +1900,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1900
1900
|
}, t.nodeId))
|
|
1901
1901
|
})] })]
|
|
1902
1902
|
}),
|
|
1903
|
-
/* @__PURE__ */ (0,
|
|
1903
|
+
/* @__PURE__ */ (0, U.jsx)(D, {
|
|
1904
1904
|
id: e.name,
|
|
1905
1905
|
name: e.name,
|
|
1906
1906
|
value: e.state.value,
|
|
@@ -1910,26 +1910,26 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1910
1910
|
rows: 4,
|
|
1911
1911
|
disabled: t
|
|
1912
1912
|
}),
|
|
1913
|
-
/* @__PURE__ */ (0,
|
|
1913
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: r(t ? "editor.httpConfigForm.sendAllFormValuesDesc" : "editor.httpConfigForm.requestBodyDesc") })
|
|
1914
1914
|
] })
|
|
1915
1915
|
})]
|
|
1916
1916
|
})
|
|
1917
1917
|
}),
|
|
1918
|
-
/* @__PURE__ */ (0,
|
|
1918
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1919
1919
|
className: "space-y-4",
|
|
1920
1920
|
children: [
|
|
1921
|
-
/* @__PURE__ */ (0,
|
|
1921
|
+
/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
1922
1922
|
className: "font-semibold text-sm",
|
|
1923
1923
|
children: r("editor.httpConfigForm.responseConfiguration")
|
|
1924
1924
|
}),
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
1925
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1926
1926
|
name: "responsePath",
|
|
1927
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
1927
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
1928
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1929
1929
|
htmlFor: e.name,
|
|
1930
1930
|
children: r("editor.httpConfigForm.responsePath")
|
|
1931
1931
|
}),
|
|
1932
|
-
/* @__PURE__ */ (0,
|
|
1932
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
1933
1933
|
id: e.name,
|
|
1934
1934
|
name: e.name,
|
|
1935
1935
|
value: e.state.value,
|
|
@@ -1937,24 +1937,24 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1937
1937
|
onChange: ({ target: t }) => e.handleChange(t.value),
|
|
1938
1938
|
placeholder: r("editor.httpConfigForm.responsePathPlaceholder")
|
|
1939
1939
|
}),
|
|
1940
|
-
/* @__PURE__ */ (0,
|
|
1940
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.responsePathDesc") })
|
|
1941
1941
|
] })
|
|
1942
1942
|
}),
|
|
1943
|
-
/* @__PURE__ */ (0,
|
|
1943
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
1944
1944
|
className: "space-y-4",
|
|
1945
1945
|
children: [
|
|
1946
|
-
/* @__PURE__ */ (0,
|
|
1946
|
+
/* @__PURE__ */ (0, U.jsx)("h5", {
|
|
1947
1947
|
className: "font-medium text-sm",
|
|
1948
1948
|
children: r("editor.httpConfigForm.mapToOptions")
|
|
1949
1949
|
}),
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
1950
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1951
1951
|
name: "responseMapping.valueField",
|
|
1952
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1953
|
-
/* @__PURE__ */ (0,
|
|
1952
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
1953
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1954
1954
|
htmlFor: e.name,
|
|
1955
1955
|
children: r("editor.httpConfigForm.valueField")
|
|
1956
1956
|
}),
|
|
1957
|
-
/* @__PURE__ */ (0,
|
|
1957
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
1958
1958
|
id: e.name,
|
|
1959
1959
|
name: e.name,
|
|
1960
1960
|
value: e.state.value,
|
|
@@ -1962,17 +1962,17 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1962
1962
|
onChange: ({ target: t }) => e.handleChange(t.value),
|
|
1963
1963
|
placeholder: r("editor.httpConfigForm.valueFieldPlaceholder")
|
|
1964
1964
|
}),
|
|
1965
|
-
/* @__PURE__ */ (0,
|
|
1965
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.valueFieldDesc") })
|
|
1966
1966
|
] })
|
|
1967
1967
|
}),
|
|
1968
|
-
/* @__PURE__ */ (0,
|
|
1968
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1969
1969
|
name: "responseMapping.labelField",
|
|
1970
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1971
|
-
/* @__PURE__ */ (0,
|
|
1970
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
1971
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1972
1972
|
htmlFor: e.name,
|
|
1973
1973
|
children: r("editor.httpConfigForm.labelField")
|
|
1974
1974
|
}),
|
|
1975
|
-
/* @__PURE__ */ (0,
|
|
1975
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
1976
1976
|
id: e.name,
|
|
1977
1977
|
name: e.name,
|
|
1978
1978
|
value: e.state.value,
|
|
@@ -1980,19 +1980,19 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
1980
1980
|
onChange: ({ target: t }) => e.handleChange(t.value),
|
|
1981
1981
|
placeholder: r("editor.httpConfigForm.labelFieldPlaceholder")
|
|
1982
1982
|
}),
|
|
1983
|
-
/* @__PURE__ */ (0,
|
|
1983
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.labelFieldDesc") })
|
|
1984
1984
|
] })
|
|
1985
1985
|
})
|
|
1986
1986
|
]
|
|
1987
1987
|
}),
|
|
1988
|
-
/* @__PURE__ */ (0,
|
|
1988
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
1989
1989
|
name: "searchParam",
|
|
1990
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
1991
|
-
/* @__PURE__ */ (0,
|
|
1990
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
1991
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
1992
1992
|
htmlFor: e.name,
|
|
1993
1993
|
children: r("editor.httpConfigForm.searchParameter")
|
|
1994
1994
|
}),
|
|
1995
|
-
/* @__PURE__ */ (0,
|
|
1995
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
1996
1996
|
id: e.name,
|
|
1997
1997
|
name: e.name,
|
|
1998
1998
|
value: e.state.value,
|
|
@@ -2000,32 +2000,32 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2000
2000
|
onChange: ({ target: t }) => e.handleChange(t.value),
|
|
2001
2001
|
placeholder: r("editor.httpConfigForm.searchParameterPlaceholder")
|
|
2002
2002
|
}),
|
|
2003
|
-
/* @__PURE__ */ (0,
|
|
2003
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: r("editor.httpConfigForm.searchParameterDesc") })
|
|
2004
2004
|
] })
|
|
2005
2005
|
})
|
|
2006
2006
|
]
|
|
2007
2007
|
}),
|
|
2008
|
-
/* @__PURE__ */ (0,
|
|
2008
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2009
2009
|
className: "space-y-4",
|
|
2010
2010
|
children: [
|
|
2011
|
-
/* @__PURE__ */ (0,
|
|
2011
|
+
/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
2012
2012
|
className: "font-semibold text-sm",
|
|
2013
2013
|
children: r("editor.httpConfigForm.behavior")
|
|
2014
2014
|
}),
|
|
2015
|
-
/* @__PURE__ */ (0,
|
|
2015
|
+
/* @__PURE__ */ (0, U.jsx)(s, {
|
|
2016
2016
|
selector: (e) => e.values.searchParam,
|
|
2017
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2017
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(o, {
|
|
2018
2018
|
name: "fetchOnMount",
|
|
2019
2019
|
children: (t) => {
|
|
2020
2020
|
let n = !!e?.trim(), i = n ? t.state.value : !0;
|
|
2021
|
-
return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ (0,
|
|
2021
|
+
return !n && t.state.value !== !0 && t.handleChange(!0), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2022
2022
|
className: "flex items-center space-x-2",
|
|
2023
|
-
children: [/* @__PURE__ */ (0,
|
|
2023
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
2024
2024
|
id: t.name,
|
|
2025
2025
|
checked: i,
|
|
2026
2026
|
disabled: !n,
|
|
2027
2027
|
onCheckedChange: (e) => t.handleChange(e)
|
|
2028
|
-
}), /* @__PURE__ */ (0,
|
|
2028
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
2029
2029
|
htmlFor: t.name,
|
|
2030
2030
|
className: n ? "" : "text-muted-foreground",
|
|
2031
2031
|
children: r("editor.httpConfigForm.fetchOnMount")
|
|
@@ -2034,15 +2034,15 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
})
|
|
2036
2036
|
}),
|
|
2037
|
-
/* @__PURE__ */ (0,
|
|
2037
|
+
/* @__PURE__ */ (0, U.jsx)(o, {
|
|
2038
2038
|
name: "showLoading",
|
|
2039
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2039
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2040
2040
|
className: "flex items-center space-x-2",
|
|
2041
|
-
children: [/* @__PURE__ */ (0,
|
|
2041
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
2042
2042
|
id: e.name,
|
|
2043
2043
|
checked: e.state.value,
|
|
2044
2044
|
onCheckedChange: (t) => e.handleChange(t)
|
|
2045
|
-
}), /* @__PURE__ */ (0,
|
|
2045
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
2046
2046
|
htmlFor: e.name,
|
|
2047
2047
|
children: r("editor.httpConfigForm.showLoadingState")
|
|
2048
2048
|
})]
|
|
@@ -2057,7 +2057,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2057
2057
|
"PUT",
|
|
2058
2058
|
"PATCH"
|
|
2059
2059
|
], Ln = ({ value: e, onChange: t }) => {
|
|
2060
|
-
let [n, r] = F("en"), { selectedNode: i } = $(), a =
|
|
2060
|
+
let [n, r] = F("en"), { selectedNode: i } = $(), a = W(), o = kt(i?.id), { handleSubmit: s, Field: c, Subscribe: d } = I({
|
|
2061
2061
|
defaultValues: {
|
|
2062
2062
|
body: e?.body || "",
|
|
2063
2063
|
errorMessage: e?.errorMessage || { en: "" },
|
|
@@ -2079,19 +2079,19 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2079
2079
|
t(e);
|
|
2080
2080
|
}
|
|
2081
2081
|
});
|
|
2082
|
-
return /* @__PURE__ */ (0,
|
|
2082
|
+
return /* @__PURE__ */ (0, U.jsx)("div", { children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2083
2083
|
className: "grid gap-6",
|
|
2084
2084
|
children: [
|
|
2085
|
-
/* @__PURE__ */ (0,
|
|
2085
|
+
/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2086
2086
|
name: "url",
|
|
2087
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2088
|
-
/* @__PURE__ */ (0,
|
|
2087
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
2088
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2089
2089
|
htmlFor: e.name,
|
|
2090
2090
|
children: a("editor.submitConfigForm.apiUrl")
|
|
2091
2091
|
}),
|
|
2092
|
-
/* @__PURE__ */ (0,
|
|
2092
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2093
2093
|
className: "flex gap-2",
|
|
2094
|
-
children: [/* @__PURE__ */ (0,
|
|
2094
|
+
children: [/* @__PURE__ */ (0, U.jsx)(h, {
|
|
2095
2095
|
id: e.name,
|
|
2096
2096
|
name: e.name,
|
|
2097
2097
|
value: e.state.value,
|
|
@@ -2099,30 +2099,30 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2099
2099
|
onChange: ({ target: t }) => e.handleChange(t.value),
|
|
2100
2100
|
placeholder: a("editor.submitConfigForm.apiUrlPlaceholder"),
|
|
2101
2101
|
className: "flex-1"
|
|
2102
|
-
}), /* @__PURE__ */ (0,
|
|
2102
|
+
}), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
2103
2103
|
asChild: !0,
|
|
2104
|
-
children: /* @__PURE__ */ (0,
|
|
2104
|
+
children: /* @__PURE__ */ (0, U.jsx)(m, {
|
|
2105
2105
|
type: "button",
|
|
2106
2106
|
variant: "outline",
|
|
2107
2107
|
size: "icon",
|
|
2108
|
-
children: /* @__PURE__ */ (0,
|
|
2108
|
+
children: /* @__PURE__ */ (0, U.jsx)(gt, { className: "h-4 w-4" })
|
|
2109
2109
|
})
|
|
2110
|
-
}), /* @__PURE__ */ (0,
|
|
2110
|
+
}), /* @__PURE__ */ (0, U.jsx)(Y, {
|
|
2111
2111
|
align: "end",
|
|
2112
|
-
children: o.length === 0 ? /* @__PURE__ */ (0,
|
|
2112
|
+
children: o.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
|
|
2113
2113
|
disabled: !0,
|
|
2114
2114
|
children: a("editor.submitConfigForm.noFieldsAvailable")
|
|
2115
|
-
}) : o.map((t) => /* @__PURE__ */ (0,
|
|
2115
|
+
}) : o.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
|
|
2116
2116
|
onClick: () => {
|
|
2117
2117
|
let n = `{{${t.nodeId}}}`, r = e.state.value || "";
|
|
2118
2118
|
e.handleChange(r + n);
|
|
2119
2119
|
},
|
|
2120
|
-
children: /* @__PURE__ */ (0,
|
|
2120
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2121
2121
|
className: "flex flex-col",
|
|
2122
|
-
children: [/* @__PURE__ */ (0,
|
|
2122
|
+
children: [/* @__PURE__ */ (0, U.jsx)("span", {
|
|
2123
2123
|
className: "font-medium",
|
|
2124
2124
|
children: t.label
|
|
2125
|
-
}), /* @__PURE__ */ (0,
|
|
2125
|
+
}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2126
2126
|
className: "text-muted-foreground text-xs",
|
|
2127
2127
|
children: `{{${t.nodeId}}}`
|
|
2128
2128
|
})]
|
|
@@ -2130,83 +2130,83 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2130
2130
|
}, t.nodeId))
|
|
2131
2131
|
})] })]
|
|
2132
2132
|
}),
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2133
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.apiUrlDesc") })
|
|
2134
2134
|
] })
|
|
2135
2135
|
}),
|
|
2136
|
-
/* @__PURE__ */ (0,
|
|
2136
|
+
/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2137
2137
|
name: "method",
|
|
2138
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2138
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2139
2139
|
htmlFor: e.name,
|
|
2140
2140
|
children: a("editor.submitConfigForm.httpMethod")
|
|
2141
|
-
}), /* @__PURE__ */ (0,
|
|
2141
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
2142
2142
|
value: e.state.value,
|
|
2143
2143
|
onValueChange: (t) => e.handleChange(t),
|
|
2144
|
-
children: [/* @__PURE__ */ (0,
|
|
2144
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
2145
2145
|
id: e.name,
|
|
2146
|
-
children: /* @__PURE__ */ (0,
|
|
2147
|
-
}), /* @__PURE__ */ (0,
|
|
2148
|
-
/* @__PURE__ */ (0,
|
|
2146
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: a("editor.submitConfigForm.selectMethod") })
|
|
2147
|
+
}), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
|
|
2148
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
2149
2149
|
value: "POST",
|
|
2150
2150
|
children: a("editor.submitConfigForm.methodPost")
|
|
2151
2151
|
}),
|
|
2152
|
-
/* @__PURE__ */ (0,
|
|
2152
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
2153
2153
|
value: "PUT",
|
|
2154
2154
|
children: a("editor.submitConfigForm.methodPut")
|
|
2155
2155
|
}),
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2156
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
2157
2157
|
value: "DELETE",
|
|
2158
2158
|
children: a("editor.submitConfigForm.methodDelete")
|
|
2159
2159
|
}),
|
|
2160
|
-
/* @__PURE__ */ (0,
|
|
2160
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
2161
2161
|
value: "PATCH",
|
|
2162
2162
|
children: a("editor.submitConfigForm.methodPatch")
|
|
2163
2163
|
})
|
|
2164
2164
|
] })]
|
|
2165
2165
|
})] })
|
|
2166
2166
|
}),
|
|
2167
|
-
/* @__PURE__ */ (0,
|
|
2167
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2168
2168
|
className: "space-y-4",
|
|
2169
|
-
children: [/* @__PURE__ */ (0,
|
|
2169
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
2170
2170
|
className: "font-semibold text-sm",
|
|
2171
2171
|
children: a("editor.submitConfigForm.headers")
|
|
2172
|
-
}), /* @__PURE__ */ (0,
|
|
2172
|
+
}), /* @__PURE__ */ (0, U.jsx)(c, {
|
|
2173
2173
|
name: "headers",
|
|
2174
2174
|
mode: "array",
|
|
2175
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2175
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2176
2176
|
className: "space-y-2",
|
|
2177
2177
|
children: [e.state.value?.map((t, n) => {
|
|
2178
2178
|
let r = `headers[${n}]`;
|
|
2179
|
-
return /* @__PURE__ */ (0,
|
|
2179
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2180
2180
|
className: "flex items-start gap-2",
|
|
2181
2181
|
children: [
|
|
2182
|
-
/* @__PURE__ */ (0,
|
|
2182
|
+
/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2183
2183
|
name: `headers[${n}].key`,
|
|
2184
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2184
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2185
2185
|
placeholder: a("editor.submitConfigForm.headerName"),
|
|
2186
2186
|
value: e.state.value || "",
|
|
2187
2187
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
2188
2188
|
})
|
|
2189
2189
|
}),
|
|
2190
|
-
/* @__PURE__ */ (0,
|
|
2190
|
+
/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2191
2191
|
name: `headers[${n}].value`,
|
|
2192
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2192
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2193
2193
|
placeholder: a("editor.submitConfigForm.headerValue"),
|
|
2194
2194
|
value: e.state.value || "",
|
|
2195
2195
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
2196
2196
|
})
|
|
2197
2197
|
}),
|
|
2198
|
-
/* @__PURE__ */ (0,
|
|
2198
|
+
/* @__PURE__ */ (0, U.jsx)(m, {
|
|
2199
2199
|
type: "button",
|
|
2200
2200
|
variant: "ghost",
|
|
2201
2201
|
size: "icon",
|
|
2202
2202
|
onClick: () => {
|
|
2203
2203
|
e.removeValue(n);
|
|
2204
2204
|
},
|
|
2205
|
-
children: /* @__PURE__ */ (0,
|
|
2205
|
+
children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
|
|
2206
2206
|
})
|
|
2207
2207
|
]
|
|
2208
2208
|
}, r);
|
|
2209
|
-
}), /* @__PURE__ */ (0,
|
|
2209
|
+
}), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
2210
2210
|
type: "button",
|
|
2211
2211
|
variant: "outline",
|
|
2212
2212
|
size: "sm",
|
|
@@ -2216,64 +2216,64 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2216
2216
|
value: ""
|
|
2217
2217
|
});
|
|
2218
2218
|
},
|
|
2219
|
-
children: [/* @__PURE__ */ (0,
|
|
2219
|
+
children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.addHeader")]
|
|
2220
2220
|
})]
|
|
2221
2221
|
})
|
|
2222
2222
|
})]
|
|
2223
2223
|
}),
|
|
2224
|
-
/* @__PURE__ */ (0,
|
|
2224
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2225
2225
|
selector: (e) => ({
|
|
2226
2226
|
method: e.values.method,
|
|
2227
2227
|
sendAllFormValues: e.values.sendAllFormValues
|
|
2228
2228
|
}),
|
|
2229
|
-
children: ({ method: e, sendAllFormValues: t }) => In.includes(e || "") && /* @__PURE__ */ (0,
|
|
2229
|
+
children: ({ method: e, sendAllFormValues: t }) => In.includes(e || "") && /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2230
2230
|
className: "space-y-4",
|
|
2231
|
-
children: [/* @__PURE__ */ (0,
|
|
2231
|
+
children: [/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2232
2232
|
name: "sendAllFormValues",
|
|
2233
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2233
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2234
2234
|
className: "flex items-center space-x-2",
|
|
2235
|
-
children: [/* @__PURE__ */ (0,
|
|
2235
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
2236
2236
|
id: e.name,
|
|
2237
2237
|
checked: e.state.value,
|
|
2238
2238
|
onCheckedChange: (t) => e.handleChange(t)
|
|
2239
|
-
}), /* @__PURE__ */ (0,
|
|
2239
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
2240
2240
|
htmlFor: e.name,
|
|
2241
2241
|
children: a("editor.submitConfigForm.sendAllFormValues")
|
|
2242
2242
|
})]
|
|
2243
2243
|
})
|
|
2244
|
-
}), /* @__PURE__ */ (0,
|
|
2244
|
+
}), /* @__PURE__ */ (0, U.jsx)(c, {
|
|
2245
2245
|
name: "body",
|
|
2246
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2247
|
-
/* @__PURE__ */ (0,
|
|
2246
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
2247
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2248
2248
|
className: "mb-2 flex items-center justify-between",
|
|
2249
|
-
children: [/* @__PURE__ */ (0,
|
|
2249
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2250
2250
|
htmlFor: e.name,
|
|
2251
2251
|
children: a("editor.submitConfigForm.requestBody")
|
|
2252
|
-
}), /* @__PURE__ */ (0,
|
|
2252
|
+
}), /* @__PURE__ */ (0, U.jsxs)(q, { children: [/* @__PURE__ */ (0, U.jsx)(J, {
|
|
2253
2253
|
asChild: !0,
|
|
2254
|
-
children: /* @__PURE__ */ (0,
|
|
2254
|
+
children: /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
2255
2255
|
type: "button",
|
|
2256
2256
|
variant: "ghost",
|
|
2257
2257
|
size: "sm",
|
|
2258
2258
|
disabled: t,
|
|
2259
|
-
children: [/* @__PURE__ */ (0,
|
|
2259
|
+
children: [/* @__PURE__ */ (0, U.jsx)(gt, { className: "mr-2 h-4 w-4" }), a("editor.submitConfigForm.insertVariable")]
|
|
2260
2260
|
})
|
|
2261
|
-
}), /* @__PURE__ */ (0,
|
|
2261
|
+
}), /* @__PURE__ */ (0, U.jsx)(Y, {
|
|
2262
2262
|
align: "end",
|
|
2263
|
-
children: o.length === 0 ? /* @__PURE__ */ (0,
|
|
2263
|
+
children: o.length === 0 ? /* @__PURE__ */ (0, U.jsx)(X, {
|
|
2264
2264
|
disabled: !0,
|
|
2265
2265
|
children: a("editor.submitConfigForm.noFieldsAvailable")
|
|
2266
|
-
}) : o.map((t) => /* @__PURE__ */ (0,
|
|
2266
|
+
}) : o.map((t) => /* @__PURE__ */ (0, U.jsx)(X, {
|
|
2267
2267
|
onClick: () => {
|
|
2268
2268
|
let n = `{{${t.nodeId}}}`, r = e.state.value || "";
|
|
2269
2269
|
e.handleChange(r + n), s().then();
|
|
2270
2270
|
},
|
|
2271
|
-
children: /* @__PURE__ */ (0,
|
|
2271
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2272
2272
|
className: "flex flex-col",
|
|
2273
|
-
children: [/* @__PURE__ */ (0,
|
|
2273
|
+
children: [/* @__PURE__ */ (0, U.jsx)("span", {
|
|
2274
2274
|
className: "font-medium",
|
|
2275
2275
|
children: t.label
|
|
2276
|
-
}), /* @__PURE__ */ (0,
|
|
2276
|
+
}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2277
2277
|
className: "text-muted-foreground text-xs",
|
|
2278
2278
|
children: `{{${t.nodeId}}}`
|
|
2279
2279
|
})]
|
|
@@ -2281,7 +2281,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2281
2281
|
}, t.nodeId))
|
|
2282
2282
|
})] })]
|
|
2283
2283
|
}),
|
|
2284
|
-
/* @__PURE__ */ (0,
|
|
2284
|
+
/* @__PURE__ */ (0, U.jsx)(D, {
|
|
2285
2285
|
id: e.name,
|
|
2286
2286
|
name: e.name,
|
|
2287
2287
|
value: e.state.value,
|
|
@@ -2291,26 +2291,26 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2291
2291
|
rows: 4,
|
|
2292
2292
|
disabled: t
|
|
2293
2293
|
}),
|
|
2294
|
-
/* @__PURE__ */ (0,
|
|
2294
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: a(t ? "editor.submitConfigForm.sendAllFormValuesDesc" : "editor.submitConfigForm.requestBodyDesc") })
|
|
2295
2295
|
] })
|
|
2296
2296
|
})]
|
|
2297
2297
|
})
|
|
2298
2298
|
}),
|
|
2299
|
-
/* @__PURE__ */ (0,
|
|
2299
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2300
2300
|
className: "space-y-4",
|
|
2301
2301
|
children: [
|
|
2302
|
-
/* @__PURE__ */ (0,
|
|
2302
|
+
/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
2303
2303
|
className: "font-semibold text-sm",
|
|
2304
2304
|
children: a("editor.submitConfigForm.postSubmission")
|
|
2305
2305
|
}),
|
|
2306
|
-
/* @__PURE__ */ (0,
|
|
2306
|
+
/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2307
2307
|
name: "redirectUrl",
|
|
2308
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2309
|
-
/* @__PURE__ */ (0,
|
|
2308
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
2309
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2310
2310
|
htmlFor: e.name,
|
|
2311
2311
|
children: a("editor.submitConfigForm.redirectUrl")
|
|
2312
2312
|
}),
|
|
2313
|
-
/* @__PURE__ */ (0,
|
|
2313
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
2314
2314
|
id: e.name,
|
|
2315
2315
|
name: e.name,
|
|
2316
2316
|
value: e.state.value,
|
|
@@ -2318,21 +2318,21 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2318
2318
|
onChange: ({ target: t }) => e.handleChange(t.value),
|
|
2319
2319
|
placeholder: a("editor.submitConfigForm.redirectUrlPlaceholder")
|
|
2320
2320
|
}),
|
|
2321
|
-
/* @__PURE__ */ (0,
|
|
2321
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.redirectUrlDesc") })
|
|
2322
2322
|
] })
|
|
2323
2323
|
}),
|
|
2324
|
-
/* @__PURE__ */ (0,
|
|
2324
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2325
2325
|
className: "flex items-center gap-2",
|
|
2326
|
-
children: [/* @__PURE__ */ (0,
|
|
2326
|
+
children: [/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2327
2327
|
name: "successMessage",
|
|
2328
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2328
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
2329
2329
|
className: "flex-1",
|
|
2330
2330
|
children: [
|
|
2331
|
-
/* @__PURE__ */ (0,
|
|
2331
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2332
2332
|
htmlFor: e.name,
|
|
2333
2333
|
children: a("editor.submitConfigForm.successMessage")
|
|
2334
2334
|
}),
|
|
2335
|
-
/* @__PURE__ */ (0,
|
|
2335
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
2336
2336
|
id: e.name,
|
|
2337
2337
|
name: e.name,
|
|
2338
2338
|
value: e.state.value?.[n] || "",
|
|
@@ -2345,26 +2345,26 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2345
2345
|
},
|
|
2346
2346
|
placeholder: a("editor.submitConfigForm.successMessagePlaceholder")
|
|
2347
2347
|
}),
|
|
2348
|
-
/* @__PURE__ */ (0,
|
|
2348
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.successMessageDesc") })
|
|
2349
2349
|
]
|
|
2350
2350
|
})
|
|
2351
|
-
}), /* @__PURE__ */ (0,
|
|
2351
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
2352
2352
|
value: n,
|
|
2353
2353
|
onValueChange: r
|
|
2354
2354
|
})]
|
|
2355
2355
|
}),
|
|
2356
|
-
/* @__PURE__ */ (0,
|
|
2356
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2357
2357
|
className: "flex items-center gap-2",
|
|
2358
|
-
children: [/* @__PURE__ */ (0,
|
|
2358
|
+
children: [/* @__PURE__ */ (0, U.jsx)(c, {
|
|
2359
2359
|
name: "errorMessage",
|
|
2360
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2360
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
2361
2361
|
className: "flex-1",
|
|
2362
2362
|
children: [
|
|
2363
|
-
/* @__PURE__ */ (0,
|
|
2363
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2364
2364
|
htmlFor: e.name,
|
|
2365
2365
|
children: a("editor.submitConfigForm.errorMessage")
|
|
2366
2366
|
}),
|
|
2367
|
-
/* @__PURE__ */ (0,
|
|
2367
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
2368
2368
|
id: e.name,
|
|
2369
2369
|
name: e.name,
|
|
2370
2370
|
value: e.state.value?.[n] || "",
|
|
@@ -2377,30 +2377,30 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2377
2377
|
},
|
|
2378
2378
|
placeholder: a("editor.submitConfigForm.errorMessagePlaceholder")
|
|
2379
2379
|
}),
|
|
2380
|
-
/* @__PURE__ */ (0,
|
|
2380
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: a("editor.submitConfigForm.errorMessageDesc") })
|
|
2381
2381
|
]
|
|
2382
2382
|
})
|
|
2383
|
-
}), /* @__PURE__ */ (0,
|
|
2383
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
2384
2384
|
value: n,
|
|
2385
2385
|
onValueChange: r
|
|
2386
2386
|
})]
|
|
2387
2387
|
})
|
|
2388
2388
|
]
|
|
2389
2389
|
}),
|
|
2390
|
-
/* @__PURE__ */ (0,
|
|
2390
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2391
2391
|
className: "space-y-4",
|
|
2392
|
-
children: [/* @__PURE__ */ (0,
|
|
2392
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
2393
2393
|
className: "font-semibold text-sm",
|
|
2394
2394
|
children: a("editor.submitConfigForm.behavior")
|
|
2395
|
-
}), /* @__PURE__ */ (0,
|
|
2395
|
+
}), /* @__PURE__ */ (0, U.jsx)(c, {
|
|
2396
2396
|
name: "showLoading",
|
|
2397
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2397
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2398
2398
|
className: "flex items-center space-x-2",
|
|
2399
|
-
children: [/* @__PURE__ */ (0,
|
|
2399
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
2400
2400
|
id: e.name,
|
|
2401
2401
|
checked: e.state.value,
|
|
2402
2402
|
onCheckedChange: (t) => e.handleChange(t)
|
|
2403
|
-
}), /* @__PURE__ */ (0,
|
|
2403
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
2404
2404
|
htmlFor: e.name,
|
|
2405
2405
|
children: a("editor.submitConfigForm.showLoadingState")
|
|
2406
2406
|
})]
|
|
@@ -2410,59 +2410,59 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2410
2410
|
]
|
|
2411
2411
|
}) });
|
|
2412
2412
|
}, Rn = ({ options: e, id: t, value: n, onValueChange: r, placeholder: i = "Select...", searchPlaceholder: a = "Search or create...", createLabel: o = (e) => `Use: ${e}`, clearLabel: s = "Clear selection", emptyLabel: c = "No results found", className: l, allowClear: u = !0, allowCreate: p = !0 }) => {
|
|
2413
|
-
let [h, g] = F(!1), [_, y] = F(""), x = (e) => e ?? "", S = (e) => e.trim().toLowerCase(), C = x(n), ee = n !== null && n !== "", te = ee ? e.find((e) => x(e.value) === C) : void 0,
|
|
2413
|
+
let [h, g] = F(!1), [_, y] = F(""), x = (e) => e ?? "", S = (e) => e.trim().toLowerCase(), C = x(n), ee = n !== null && n !== "", te = ee ? e.find((e) => x(e.value) === C) : void 0, w = S(_), T = p && w !== "" && !e.some((e) => S(e.label) === w || S(e.value ?? "") === w), E = (e) => {
|
|
2414
2414
|
e === C ? u && r?.("") : r?.(e), g(!1), y("");
|
|
2415
|
-
}, E = () => {
|
|
2416
|
-
_.trim() && (r?.(_.trim()), g(!1), y(""));
|
|
2417
|
-
}, D = () => {
|
|
2418
|
-
r?.(""), g(!1), y("");
|
|
2419
2415
|
};
|
|
2420
|
-
return /* @__PURE__ */ (0,
|
|
2416
|
+
return /* @__PURE__ */ (0, U.jsxs)(le, {
|
|
2421
2417
|
open: h,
|
|
2422
2418
|
onOpenChange: g,
|
|
2423
|
-
children: [/* @__PURE__ */ (0,
|
|
2419
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2424
2420
|
asChild: !0,
|
|
2425
2421
|
id: t,
|
|
2426
|
-
children: /* @__PURE__ */ (0,
|
|
2422
|
+
children: /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
2427
2423
|
type: "button",
|
|
2428
2424
|
variant: "outline",
|
|
2429
2425
|
role: "combobox",
|
|
2430
2426
|
"aria-expanded": h,
|
|
2431
2427
|
className: f("w-full justify-between font-normal", l),
|
|
2432
|
-
children: [/* @__PURE__ */ (0,
|
|
2428
|
+
children: [/* @__PURE__ */ (0, U.jsx)("span", {
|
|
2433
2429
|
className: "truncate",
|
|
2434
2430
|
children: ee && te ? te.label : i
|
|
2435
|
-
}), /* @__PURE__ */ (0,
|
|
2431
|
+
}), /* @__PURE__ */ (0, U.jsx)(He, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })]
|
|
2436
2432
|
})
|
|
2437
|
-
}), /* @__PURE__ */ (0,
|
|
2433
|
+
}), /* @__PURE__ */ (0, U.jsx)(v, {
|
|
2438
2434
|
className: "w-full p-0",
|
|
2439
2435
|
align: "start",
|
|
2440
|
-
children: /* @__PURE__ */ (0,
|
|
2436
|
+
children: /* @__PURE__ */ (0, U.jsxs)(O, {
|
|
2441
2437
|
shouldFilter: !1,
|
|
2442
|
-
children: [/* @__PURE__ */ (0,
|
|
2438
|
+
children: [/* @__PURE__ */ (0, U.jsx)(b, {
|
|
2443
2439
|
placeholder: a,
|
|
2444
2440
|
value: _,
|
|
2445
2441
|
onValueChange: y
|
|
2446
|
-
}), /* @__PURE__ */ (0,
|
|
2447
|
-
/* @__PURE__ */ (0,
|
|
2448
|
-
u && ee && /* @__PURE__ */ (0,
|
|
2442
|
+
}), /* @__PURE__ */ (0, U.jsxs)(oe, { children: [
|
|
2443
|
+
/* @__PURE__ */ (0, U.jsx)(k, { children: c }),
|
|
2444
|
+
u && ee && /* @__PURE__ */ (0, U.jsx)(ne, { children: /* @__PURE__ */ (0, U.jsxs)(ie, {
|
|
2449
2445
|
value: "__clear__",
|
|
2450
|
-
onSelect:
|
|
2446
|
+
onSelect: () => {
|
|
2447
|
+
r?.(""), g(!1), y("");
|
|
2448
|
+
},
|
|
2451
2449
|
className: "mt-1 text-muted-foreground",
|
|
2452
|
-
children: [/* @__PURE__ */ (0,
|
|
2450
|
+
children: [/* @__PURE__ */ (0, U.jsx)(R, { className: "mr-2 h-4 w-4" }), s]
|
|
2453
2451
|
}) }),
|
|
2454
|
-
/* @__PURE__ */ (0,
|
|
2452
|
+
/* @__PURE__ */ (0, U.jsxs)(ne, { children: [T && /* @__PURE__ */ (0, U.jsxs)(ie, {
|
|
2455
2453
|
value: `__create__${_}`,
|
|
2456
|
-
onSelect:
|
|
2454
|
+
onSelect: () => {
|
|
2455
|
+
_.trim() && (r?.(_.trim()), g(!1), y(""));
|
|
2456
|
+
},
|
|
2457
2457
|
className: "text-primary",
|
|
2458
|
-
children: [/* @__PURE__ */ (0,
|
|
2458
|
+
children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), o(_)]
|
|
2459
2459
|
}), e.filter((e) => {
|
|
2460
2460
|
let t = _.toLowerCase();
|
|
2461
2461
|
return e.label.toLowerCase().includes(t) || (e.value?.toLowerCase() ?? "").includes(t);
|
|
2462
|
-
}).map((e, t) => /* @__PURE__ */ (0,
|
|
2462
|
+
}).map((e, t) => /* @__PURE__ */ (0, U.jsxs)(ie, {
|
|
2463
2463
|
value: e.label,
|
|
2464
|
-
onSelect: () =>
|
|
2465
|
-
children: [/* @__PURE__ */ (0,
|
|
2464
|
+
onSelect: () => E(e?.value || ""),
|
|
2465
|
+
children: [/* @__PURE__ */ (0, U.jsx)(ze, {
|
|
2466
2466
|
"aria-hidden": "true",
|
|
2467
2467
|
className: f("mr-2 h-4 w-4", ee && x(e.value) === C ? "opacity-100" : "opacity-0")
|
|
2468
2468
|
}), e.label]
|
|
@@ -2480,7 +2480,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2480
2480
|
}).map(([e, t]) => ({
|
|
2481
2481
|
label: e.charAt(0).toUpperCase() + e.slice(1).replace(/_/g, " "),
|
|
2482
2482
|
value: t
|
|
2483
|
-
})), Bn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ (0,
|
|
2483
|
+
})), Bn = ({ id: e, value: t, onValueChange: n }) => /* @__PURE__ */ (0, U.jsx)(Rn, {
|
|
2484
2484
|
id: e,
|
|
2485
2485
|
options: P(() => t && !zn.some((e) => e.value === t) ? [...zn, {
|
|
2486
2486
|
label: `Custom: ${t}`,
|
|
@@ -2513,7 +2513,7 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2513
2513
|
return !1;
|
|
2514
2514
|
}
|
|
2515
2515
|
}, qn = ({ value: e, onChange: t }) => {
|
|
2516
|
-
let n = Me(null), r = Me(null), [i, a] = F(!1), [o, s] = F(e && /^https?:\/\//i.test(e) ? e : ""), c =
|
|
2516
|
+
let n = Me(null), r = Me(null), [i, a] = F(!1), [o, s] = F(e && /^https?:\/\//i.test(e) ? e : ""), c = W();
|
|
2517
2517
|
Ae(() => {
|
|
2518
2518
|
i || s(e && /^https?:\/\//i.test(e) ? e : "");
|
|
2519
2519
|
}, [i, e]), Ae(() => () => {
|
|
@@ -2525,71 +2525,71 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2525
2525
|
t(await Wn(r)), a(!1);
|
|
2526
2526
|
} catch (e) {
|
|
2527
2527
|
let t = e.message;
|
|
2528
|
-
t === "too_large" ?
|
|
2528
|
+
t === "too_large" ? V.error(c("editor.inputNodeForm.optionImageTooLarge")) : t === "invalid_type" ? V.error(c("editor.inputNodeForm.optionImageInvalid")) : V.error(c("editor.inputNodeForm.optionImageError"));
|
|
2529
2529
|
} finally {
|
|
2530
2530
|
n.current && (n.current.value = "");
|
|
2531
2531
|
}
|
|
2532
2532
|
}, u = () => {
|
|
2533
2533
|
let e = o.trim();
|
|
2534
2534
|
e && (t(e), a(!1));
|
|
2535
|
-
}, f = (n) => {
|
|
2536
|
-
let i = n.target.value;
|
|
2537
|
-
s(i), r.current && clearTimeout(r.current);
|
|
2538
|
-
let a = i.trim();
|
|
2539
|
-
!Kn(a) || a === e || (r.current = setTimeout(() => {
|
|
2540
|
-
t(a);
|
|
2541
|
-
}, Gn));
|
|
2542
2535
|
};
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
2536
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2544
2537
|
className: "relative",
|
|
2545
2538
|
children: [
|
|
2546
|
-
/* @__PURE__ */ (0,
|
|
2539
|
+
/* @__PURE__ */ (0, U.jsx)("input", {
|
|
2547
2540
|
ref: n,
|
|
2548
2541
|
type: "file",
|
|
2549
2542
|
accept: "image/*",
|
|
2550
2543
|
className: "hidden",
|
|
2551
2544
|
onChange: l
|
|
2552
2545
|
}),
|
|
2553
|
-
/* @__PURE__ */ (0,
|
|
2546
|
+
/* @__PURE__ */ (0, U.jsxs)(le, {
|
|
2554
2547
|
open: i,
|
|
2555
2548
|
onOpenChange: a,
|
|
2556
|
-
children: [/* @__PURE__ */ (0,
|
|
2549
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2557
2550
|
asChild: !0,
|
|
2558
|
-
children: e ? /* @__PURE__ */ (0,
|
|
2551
|
+
children: e ? /* @__PURE__ */ (0, U.jsx)("button", {
|
|
2559
2552
|
type: "button",
|
|
2560
2553
|
className: "h-9 w-9 cursor-pointer overflow-hidden rounded-md border border-input",
|
|
2561
2554
|
"aria-label": c("editor.inputNodeForm.optionImageReplace"),
|
|
2562
|
-
children: /* @__PURE__ */ (0,
|
|
2555
|
+
children: /* @__PURE__ */ (0, U.jsx)("img", {
|
|
2563
2556
|
src: e,
|
|
2564
2557
|
alt: "",
|
|
2565
2558
|
className: "h-full w-full object-cover"
|
|
2566
2559
|
})
|
|
2567
|
-
}) : /* @__PURE__ */ (0,
|
|
2560
|
+
}) : /* @__PURE__ */ (0, U.jsx)(m, {
|
|
2568
2561
|
type: "button",
|
|
2569
2562
|
variant: "outline",
|
|
2570
2563
|
size: "icon",
|
|
2571
2564
|
"aria-label": c("editor.inputNodeForm.optionImageAdd"),
|
|
2572
|
-
children: /* @__PURE__ */ (0,
|
|
2565
|
+
children: /* @__PURE__ */ (0, U.jsx)(Qe, { className: "h-4 w-4" })
|
|
2573
2566
|
})
|
|
2574
|
-
}), /* @__PURE__ */ (0,
|
|
2567
|
+
}), /* @__PURE__ */ (0, U.jsxs)(v, {
|
|
2575
2568
|
align: "start",
|
|
2576
2569
|
className: "w-64 space-y-3 p-3",
|
|
2577
2570
|
children: [
|
|
2578
|
-
/* @__PURE__ */ (0,
|
|
2571
|
+
/* @__PURE__ */ (0, U.jsxs)(m, {
|
|
2579
2572
|
type: "button",
|
|
2580
2573
|
variant: "outline",
|
|
2581
2574
|
size: "sm",
|
|
2582
2575
|
className: "w-full",
|
|
2583
2576
|
onClick: () => n.current?.click(),
|
|
2584
|
-
children: [/* @__PURE__ */ (0,
|
|
2577
|
+
children: [/* @__PURE__ */ (0, U.jsx)(ht, { className: "mr-2 h-4 w-4" }), c("editor.inputNodeForm.optionImageUpload")]
|
|
2585
2578
|
}),
|
|
2586
|
-
/* @__PURE__ */ (0,
|
|
2587
|
-
/* @__PURE__ */ (0,
|
|
2579
|
+
/* @__PURE__ */ (0, U.jsx)(se, {}),
|
|
2580
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2588
2581
|
className: "flex items-center gap-2",
|
|
2589
|
-
children: [/* @__PURE__ */ (0,
|
|
2582
|
+
children: [/* @__PURE__ */ (0, U.jsx)(et, { className: "h-4 w-4 shrink-0 text-muted-foreground" }), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2590
2583
|
placeholder: c("editor.inputNodeForm.optionImageUrlPlaceholder"),
|
|
2591
2584
|
value: o,
|
|
2592
|
-
onChange:
|
|
2585
|
+
onChange: (n) => {
|
|
2586
|
+
let i = n.target.value;
|
|
2587
|
+
s(i), r.current && clearTimeout(r.current);
|
|
2588
|
+
let a = i.trim();
|
|
2589
|
+
!Kn(a) || a === e || (r.current = setTimeout(() => {
|
|
2590
|
+
t(a);
|
|
2591
|
+
}, Gn));
|
|
2592
|
+
},
|
|
2593
2593
|
onKeyDown: (e) => {
|
|
2594
2594
|
e.key === "Enter" && (e.preventDefault(), u());
|
|
2595
2595
|
},
|
|
@@ -2599,52 +2599,52 @@ var On = ({ aiConfig: e, onGenerate: t }) => {
|
|
|
2599
2599
|
]
|
|
2600
2600
|
})]
|
|
2601
2601
|
}),
|
|
2602
|
-
e && /* @__PURE__ */ (0,
|
|
2602
|
+
e && /* @__PURE__ */ (0, U.jsx)("button", {
|
|
2603
2603
|
type: "button",
|
|
2604
2604
|
onClick: (e) => {
|
|
2605
2605
|
e.stopPropagation(), t("");
|
|
2606
2606
|
},
|
|
2607
2607
|
className: "-top-1 -right-1 absolute flex h-4 w-4 cursor-pointer items-center justify-center rounded-full bg-destructive text-destructive-foreground",
|
|
2608
2608
|
"aria-label": c("editor.inputNodeForm.optionImageRemove"),
|
|
2609
|
-
children: /* @__PURE__ */ (0,
|
|
2609
|
+
children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-3 w-3" })
|
|
2610
2610
|
})
|
|
2611
2611
|
]
|
|
2612
2612
|
});
|
|
2613
2613
|
}, Jn = ({ value: e, onValueChange: t }) => {
|
|
2614
|
-
let n =
|
|
2615
|
-
return /* @__PURE__ */ (0,
|
|
2614
|
+
let n = W(), r = je();
|
|
2615
|
+
return /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(ue, {
|
|
2616
2616
|
htmlFor: r,
|
|
2617
2617
|
children: n("editor.selectInputType.type")
|
|
2618
|
-
}), /* @__PURE__ */ (0,
|
|
2618
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
2619
2619
|
value: e,
|
|
2620
2620
|
onValueChange: t,
|
|
2621
|
-
children: [/* @__PURE__ */ (0,
|
|
2621
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
2622
2622
|
id: r,
|
|
2623
2623
|
className: "w-full capitalize",
|
|
2624
|
-
children: /* @__PURE__ */ (0,
|
|
2625
|
-
}), /* @__PURE__ */ (0,
|
|
2624
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: "" })
|
|
2625
|
+
}), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsx)(j, { children: Object.values(G).map((e) => /* @__PURE__ */ (0, U.jsxs)(x, {
|
|
2626
2626
|
value: e,
|
|
2627
2627
|
className: "capitalize",
|
|
2628
|
-
children: [/* @__PURE__ */ (0,
|
|
2628
|
+
children: [/* @__PURE__ */ (0, U.jsx)(un(e), {}), e]
|
|
2629
2629
|
}, e)) }) })]
|
|
2630
2630
|
})] });
|
|
2631
2631
|
};
|
|
2632
2632
|
//#endregion
|
|
2633
2633
|
//#region src/shared/components/ui/collapsible.tsx
|
|
2634
2634
|
function Yn({ ...e }) {
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
2635
|
+
return /* @__PURE__ */ (0, U.jsx)(wt.Root, {
|
|
2636
2636
|
"data-slot": "collapsible",
|
|
2637
2637
|
...e
|
|
2638
2638
|
});
|
|
2639
2639
|
}
|
|
2640
2640
|
function Xn({ ...e }) {
|
|
2641
|
-
return /* @__PURE__ */ (0,
|
|
2641
|
+
return /* @__PURE__ */ (0, U.jsx)(wt.CollapsibleTrigger, {
|
|
2642
2642
|
"data-slot": "collapsible-trigger",
|
|
2643
2643
|
...e
|
|
2644
2644
|
});
|
|
2645
2645
|
}
|
|
2646
2646
|
function Zn({ ...e }) {
|
|
2647
|
-
return /* @__PURE__ */ (0,
|
|
2647
|
+
return /* @__PURE__ */ (0, U.jsx)(wt.CollapsibleContent, {
|
|
2648
2648
|
"data-slot": "collapsible-content",
|
|
2649
2649
|
...e
|
|
2650
2650
|
});
|
|
@@ -2652,12 +2652,12 @@ function Zn({ ...e }) {
|
|
|
2652
2652
|
//#endregion
|
|
2653
2653
|
//#region src/editor/features/TreegeEditor/forms/InputNodeForm.tsx
|
|
2654
2654
|
var Qn = () => {
|
|
2655
|
-
let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } =
|
|
2655
|
+
let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), i = [
|
|
2656
2656
|
"select",
|
|
2657
2657
|
"radio",
|
|
2658
2658
|
"autocomplete",
|
|
2659
2659
|
"checkbox"
|
|
2660
|
-
].includes(n?.data?.type || ""), a =
|
|
2660
|
+
].includes(n?.data?.type || ""), a = kt(n?.id), o = W(), s = n?.data?.type === "submit", { handleSubmit: c, Field: d } = I({
|
|
2661
2661
|
defaultValues: {
|
|
2662
2662
|
defaultValue: n?.data?.defaultValue,
|
|
2663
2663
|
disablePast: n?.data?.disablePast,
|
|
@@ -2685,30 +2685,30 @@ var Qn = () => {
|
|
|
2685
2685
|
r(e);
|
|
2686
2686
|
}
|
|
2687
2687
|
});
|
|
2688
|
-
return /* @__PURE__ */ (0,
|
|
2688
|
+
return /* @__PURE__ */ (0, U.jsx)("form", {
|
|
2689
2689
|
onSubmit: (e) => {
|
|
2690
2690
|
e.preventDefault(), e.stopPropagation();
|
|
2691
2691
|
},
|
|
2692
|
-
children: /* @__PURE__ */ (0,
|
|
2692
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2693
2693
|
className: "grid gap-6",
|
|
2694
2694
|
children: [
|
|
2695
|
-
/* @__PURE__ */ (0,
|
|
2695
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2696
2696
|
name: "type",
|
|
2697
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2697
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsx)(Jn, {
|
|
2698
2698
|
value: e.state.value,
|
|
2699
2699
|
onValueChange: (t) => e.handleChange(t)
|
|
2700
2700
|
}) })
|
|
2701
2701
|
}),
|
|
2702
|
-
/* @__PURE__ */ (0,
|
|
2702
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2703
2703
|
className: "flex items-end gap-2",
|
|
2704
|
-
children: [/* @__PURE__ */ (0,
|
|
2704
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2705
2705
|
name: "label",
|
|
2706
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
2706
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
2707
2707
|
className: "flex-1",
|
|
2708
|
-
children: [/* @__PURE__ */ (0,
|
|
2708
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2709
2709
|
htmlFor: t.name,
|
|
2710
2710
|
children: o("editor.inputNodeForm.label")
|
|
2711
|
-
}), /* @__PURE__ */ (0,
|
|
2711
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2712
2712
|
autoFocus: !0,
|
|
2713
2713
|
id: t.name,
|
|
2714
2714
|
name: t.name,
|
|
@@ -2722,21 +2722,21 @@ var Qn = () => {
|
|
|
2722
2722
|
}
|
|
2723
2723
|
})]
|
|
2724
2724
|
})
|
|
2725
|
-
}), /* @__PURE__ */ (0,
|
|
2725
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
2726
2726
|
value: e,
|
|
2727
2727
|
onValueChange: t
|
|
2728
2728
|
})]
|
|
2729
2729
|
}),
|
|
2730
|
-
!s && n?.data?.type !== "file" && /* @__PURE__ */ (0,
|
|
2730
|
+
!s && n?.data?.type !== "file" && /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2731
2731
|
className: "flex items-end gap-2",
|
|
2732
|
-
children: [/* @__PURE__ */ (0,
|
|
2732
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2733
2733
|
name: "placeholder",
|
|
2734
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
2734
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
2735
2735
|
className: "flex-1",
|
|
2736
|
-
children: [/* @__PURE__ */ (0,
|
|
2736
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2737
2737
|
htmlFor: t.name,
|
|
2738
2738
|
children: o("editor.inputNodeForm.placeholder")
|
|
2739
|
-
}), /* @__PURE__ */ (0,
|
|
2739
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2740
2740
|
id: t.name,
|
|
2741
2741
|
name: t.name,
|
|
2742
2742
|
value: t.state.value?.[e] || "",
|
|
@@ -2749,21 +2749,21 @@ var Qn = () => {
|
|
|
2749
2749
|
}
|
|
2750
2750
|
})]
|
|
2751
2751
|
})
|
|
2752
|
-
}), /* @__PURE__ */ (0,
|
|
2752
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
2753
2753
|
value: e,
|
|
2754
2754
|
onValueChange: t
|
|
2755
2755
|
})]
|
|
2756
2756
|
}),
|
|
2757
|
-
!s && /* @__PURE__ */ (0,
|
|
2757
|
+
!s && /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2758
2758
|
className: "flex items-end gap-2",
|
|
2759
|
-
children: [/* @__PURE__ */ (0,
|
|
2759
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2760
2760
|
name: "helperText",
|
|
2761
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
2761
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
2762
2762
|
className: "flex-1",
|
|
2763
|
-
children: [/* @__PURE__ */ (0,
|
|
2763
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2764
2764
|
htmlFor: t.name,
|
|
2765
2765
|
children: o("editor.inputNodeForm.helperText")
|
|
2766
|
-
}), /* @__PURE__ */ (0,
|
|
2766
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2767
2767
|
id: t.name,
|
|
2768
2768
|
name: t.name,
|
|
2769
2769
|
value: t.state.value?.[e] || "",
|
|
@@ -2776,36 +2776,36 @@ var Qn = () => {
|
|
|
2776
2776
|
}
|
|
2777
2777
|
})]
|
|
2778
2778
|
})
|
|
2779
|
-
}), /* @__PURE__ */ (0,
|
|
2779
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
2780
2780
|
value: e,
|
|
2781
2781
|
onValueChange: t
|
|
2782
2782
|
})]
|
|
2783
2783
|
}),
|
|
2784
|
-
n?.data?.type === "http" && /* @__PURE__ */ (0,
|
|
2784
|
+
n?.data?.type === "http" && /* @__PURE__ */ (0, U.jsxs)(Yn, {
|
|
2785
2785
|
defaultOpen: !0,
|
|
2786
2786
|
className: "flex w-full max-w-[350px] flex-col gap-2",
|
|
2787
|
-
children: [/* @__PURE__ */ (0,
|
|
2787
|
+
children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
|
|
2788
2788
|
asChild: !0,
|
|
2789
|
-
children: /* @__PURE__ */ (0,
|
|
2789
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2790
2790
|
className: "flex items-center justify-between gap-4",
|
|
2791
|
-
children: [/* @__PURE__ */ (0,
|
|
2791
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
2792
2792
|
className: "font-semibold text-sm",
|
|
2793
2793
|
children: o("editor.inputNodeForm.httpConfiguration")
|
|
2794
|
-
}), /* @__PURE__ */ (0,
|
|
2794
|
+
}), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
2795
2795
|
variant: "ghost",
|
|
2796
2796
|
size: "icon",
|
|
2797
2797
|
className: "size-8",
|
|
2798
|
-
children: [/* @__PURE__ */ (0,
|
|
2798
|
+
children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2799
2799
|
className: "sr-only",
|
|
2800
2800
|
children: o("common.toggle")
|
|
2801
2801
|
})]
|
|
2802
2802
|
})]
|
|
2803
2803
|
})
|
|
2804
|
-
}), /* @__PURE__ */ (0,
|
|
2804
|
+
}), /* @__PURE__ */ (0, U.jsx)(Zn, {
|
|
2805
2805
|
className: "flex flex-col gap-4",
|
|
2806
|
-
children: /* @__PURE__ */ (0,
|
|
2806
|
+
children: /* @__PURE__ */ (0, U.jsx)(d, {
|
|
2807
2807
|
name: "httpConfig",
|
|
2808
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2808
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(Fn, {
|
|
2809
2809
|
value: e.state.value,
|
|
2810
2810
|
onChange: (t) => {
|
|
2811
2811
|
e.handleChange(t), c().then();
|
|
@@ -2814,30 +2814,30 @@ var Qn = () => {
|
|
|
2814
2814
|
})
|
|
2815
2815
|
})]
|
|
2816
2816
|
}),
|
|
2817
|
-
s && /* @__PURE__ */ (0,
|
|
2817
|
+
s && /* @__PURE__ */ (0, U.jsxs)(Yn, {
|
|
2818
2818
|
className: "flex w-full max-w-[350px] flex-col gap-2",
|
|
2819
|
-
children: [/* @__PURE__ */ (0,
|
|
2819
|
+
children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
|
|
2820
2820
|
asChild: !0,
|
|
2821
|
-
children: /* @__PURE__ */ (0,
|
|
2821
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2822
2822
|
className: "flex items-center justify-between gap-4",
|
|
2823
|
-
children: [/* @__PURE__ */ (0,
|
|
2823
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
2824
2824
|
className: "font-semibold text-sm",
|
|
2825
2825
|
children: o("editor.inputNodeForm.submitConfiguration")
|
|
2826
|
-
}), /* @__PURE__ */ (0,
|
|
2826
|
+
}), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
2827
2827
|
variant: "ghost",
|
|
2828
2828
|
size: "icon",
|
|
2829
2829
|
className: "size-8",
|
|
2830
|
-
children: [/* @__PURE__ */ (0,
|
|
2830
|
+
children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2831
2831
|
className: "sr-only",
|
|
2832
2832
|
children: o("common.toggle")
|
|
2833
2833
|
})]
|
|
2834
2834
|
})]
|
|
2835
2835
|
})
|
|
2836
|
-
}), /* @__PURE__ */ (0,
|
|
2836
|
+
}), /* @__PURE__ */ (0, U.jsx)(Zn, {
|
|
2837
2837
|
className: "flex flex-col gap-4",
|
|
2838
|
-
children: /* @__PURE__ */ (0,
|
|
2838
|
+
children: /* @__PURE__ */ (0, U.jsx)(d, {
|
|
2839
2839
|
name: "submitConfig",
|
|
2840
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2840
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(Ln, {
|
|
2841
2841
|
value: e.state.value,
|
|
2842
2842
|
onChange: (t) => {
|
|
2843
2843
|
e.handleChange(t), c().then();
|
|
@@ -2846,65 +2846,65 @@ var Qn = () => {
|
|
|
2846
2846
|
})
|
|
2847
2847
|
})]
|
|
2848
2848
|
}),
|
|
2849
|
-
n?.data?.type === "file" && /* @__PURE__ */ (0,
|
|
2849
|
+
n?.data?.type === "file" && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
2850
2850
|
name: "multiple",
|
|
2851
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2851
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2852
2852
|
className: "flex items-center space-x-2",
|
|
2853
|
-
children: [/* @__PURE__ */ (0,
|
|
2853
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
2854
2854
|
id: e.name,
|
|
2855
2855
|
checked: e.state.value,
|
|
2856
2856
|
onCheckedChange: (t) => e.handleChange(t)
|
|
2857
|
-
}), /* @__PURE__ */ (0,
|
|
2857
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
2858
2858
|
htmlFor: e.name,
|
|
2859
2859
|
children: o("editor.inputNodeForm.multipleFiles")
|
|
2860
2860
|
})]
|
|
2861
2861
|
})
|
|
2862
2862
|
}),
|
|
2863
|
-
i && /* @__PURE__ */ (0,
|
|
2863
|
+
i && /* @__PURE__ */ (0, U.jsxs)(Yn, {
|
|
2864
2864
|
defaultOpen: !0,
|
|
2865
2865
|
className: "flex w-full max-w-[350px] flex-col gap-2",
|
|
2866
|
-
children: [/* @__PURE__ */ (0,
|
|
2866
|
+
children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
|
|
2867
2867
|
asChild: !0,
|
|
2868
|
-
children: /* @__PURE__ */ (0,
|
|
2868
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2869
2869
|
className: "flex items-center justify-between gap-4",
|
|
2870
|
-
children: [/* @__PURE__ */ (0,
|
|
2870
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
2871
2871
|
className: "font-semibold text-sm",
|
|
2872
2872
|
children: o("editor.inputNodeForm.options")
|
|
2873
|
-
}), /* @__PURE__ */ (0,
|
|
2873
|
+
}), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
2874
2874
|
variant: "ghost",
|
|
2875
2875
|
size: "icon",
|
|
2876
2876
|
className: "size-8",
|
|
2877
|
-
children: [/* @__PURE__ */ (0,
|
|
2877
|
+
children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
2878
2878
|
className: "sr-only",
|
|
2879
2879
|
children: o("common.toggle")
|
|
2880
2880
|
})]
|
|
2881
2881
|
})]
|
|
2882
2882
|
})
|
|
2883
|
-
}), /* @__PURE__ */ (0,
|
|
2883
|
+
}), /* @__PURE__ */ (0, U.jsxs)(Zn, {
|
|
2884
2884
|
className: "flex flex-col gap-4",
|
|
2885
2885
|
children: [
|
|
2886
|
-
/* @__PURE__ */ (0,
|
|
2886
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2887
2887
|
name: "options",
|
|
2888
2888
|
mode: "array",
|
|
2889
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
2889
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2890
2890
|
className: "space-y-2",
|
|
2891
2891
|
children: [t.state.value?.map((r, i) => {
|
|
2892
2892
|
let a = `options[${i}]`;
|
|
2893
|
-
return /* @__PURE__ */ (0,
|
|
2893
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2894
2894
|
className: "flex flex-col gap-2",
|
|
2895
|
-
children: [/* @__PURE__ */ (0,
|
|
2895
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2896
2896
|
className: "flex items-start gap-2",
|
|
2897
2897
|
children: [
|
|
2898
|
-
n?.data?.type === "radio" && /* @__PURE__ */ (0,
|
|
2898
|
+
n?.data?.type === "radio" && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
2899
2899
|
name: `options[${i}].image`,
|
|
2900
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2900
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(qn, {
|
|
2901
2901
|
value: e.state.value,
|
|
2902
2902
|
onChange: (t) => e.handleChange(t)
|
|
2903
2903
|
})
|
|
2904
2904
|
}),
|
|
2905
|
-
/* @__PURE__ */ (0,
|
|
2905
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2906
2906
|
name: `options[${i}].label`,
|
|
2907
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
2907
|
+
children: (t) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2908
2908
|
placeholder: o("editor.inputNodeForm.optionLabel"),
|
|
2909
2909
|
value: t.state.value?.[e] || "",
|
|
2910
2910
|
onChange: ({ target: n }) => {
|
|
@@ -2915,27 +2915,27 @@ var Qn = () => {
|
|
|
2915
2915
|
}
|
|
2916
2916
|
})
|
|
2917
2917
|
}),
|
|
2918
|
-
/* @__PURE__ */ (0,
|
|
2918
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
2919
2919
|
name: `options[${i}].value`,
|
|
2920
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2920
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2921
2921
|
placeholder: o("editor.inputNodeForm.optionValue"),
|
|
2922
2922
|
value: e.state.value || "",
|
|
2923
2923
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
2924
2924
|
})
|
|
2925
2925
|
}),
|
|
2926
|
-
/* @__PURE__ */ (0,
|
|
2926
|
+
/* @__PURE__ */ (0, U.jsx)(m, {
|
|
2927
2927
|
type: "button",
|
|
2928
2928
|
variant: "ghost",
|
|
2929
2929
|
size: "icon",
|
|
2930
2930
|
onClick: () => {
|
|
2931
2931
|
t.removeValue(i), c().then();
|
|
2932
2932
|
},
|
|
2933
|
-
children: /* @__PURE__ */ (0,
|
|
2933
|
+
children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
|
|
2934
2934
|
})
|
|
2935
2935
|
]
|
|
2936
|
-
}), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ (0,
|
|
2936
|
+
}), (n?.data?.type === "radio" || n?.data?.type === "checkbox") && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
2937
2937
|
name: `options[${i}].description`,
|
|
2938
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
2938
|
+
children: (t) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
2939
2939
|
placeholder: o("editor.inputNodeForm.optionDescription"),
|
|
2940
2940
|
value: t.state.value?.[e] || "",
|
|
2941
2941
|
onChange: ({ target: n }) => {
|
|
@@ -2947,7 +2947,7 @@ var Qn = () => {
|
|
|
2947
2947
|
})
|
|
2948
2948
|
})]
|
|
2949
2949
|
}, a);
|
|
2950
|
-
}), /* @__PURE__ */ (0,
|
|
2950
|
+
}), /* @__PURE__ */ (0, U.jsx)(m, {
|
|
2951
2951
|
type: "button",
|
|
2952
2952
|
variant: "outline",
|
|
2953
2953
|
size: "sm",
|
|
@@ -2961,36 +2961,36 @@ var Qn = () => {
|
|
|
2961
2961
|
})]
|
|
2962
2962
|
})
|
|
2963
2963
|
}),
|
|
2964
|
-
n?.data?.type === "select" && /* @__PURE__ */ (0,
|
|
2964
|
+
n?.data?.type === "select" && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
2965
2965
|
name: "multiple",
|
|
2966
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2966
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
2967
2967
|
className: "flex items-center space-x-2",
|
|
2968
|
-
children: [/* @__PURE__ */ (0,
|
|
2968
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
2969
2969
|
id: e.name,
|
|
2970
2970
|
checked: e.state.value,
|
|
2971
2971
|
onCheckedChange: (t) => e.handleChange(t)
|
|
2972
|
-
}), /* @__PURE__ */ (0,
|
|
2972
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
2973
2973
|
htmlFor: e.name,
|
|
2974
2974
|
children: o("editor.inputNodeForm.multipleSelection")
|
|
2975
2975
|
})]
|
|
2976
2976
|
})
|
|
2977
2977
|
}),
|
|
2978
|
-
n?.data?.type === "radio" && /* @__PURE__ */ (0,
|
|
2978
|
+
n?.data?.type === "radio" && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
2979
2979
|
name: "variant",
|
|
2980
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
2980
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
2981
2981
|
htmlFor: e.name,
|
|
2982
2982
|
children: o("editor.inputNodeForm.variant")
|
|
2983
|
-
}), /* @__PURE__ */ (0,
|
|
2983
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
2984
2984
|
value: e.state.value || "default",
|
|
2985
2985
|
onValueChange: (t) => e.handleChange(t),
|
|
2986
|
-
children: [/* @__PURE__ */ (0,
|
|
2986
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
2987
2987
|
id: e.name,
|
|
2988
2988
|
className: "w-full",
|
|
2989
|
-
children: /* @__PURE__ */ (0,
|
|
2990
|
-
}), /* @__PURE__ */ (0,
|
|
2989
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, {})
|
|
2990
|
+
}), /* @__PURE__ */ (0, U.jsxs)(A, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
|
|
2991
2991
|
value: "default",
|
|
2992
2992
|
children: o("editor.inputNodeForm.variantDefault")
|
|
2993
|
-
}), /* @__PURE__ */ (0,
|
|
2993
|
+
}), /* @__PURE__ */ (0, U.jsx)(x, {
|
|
2994
2994
|
value: "card",
|
|
2995
2995
|
children: o("editor.inputNodeForm.variantCard")
|
|
2996
2996
|
})] })]
|
|
@@ -2999,77 +2999,77 @@ var Qn = () => {
|
|
|
2999
2999
|
]
|
|
3000
3000
|
})]
|
|
3001
3001
|
}),
|
|
3002
|
-
!s && /* @__PURE__ */ (0,
|
|
3002
|
+
!s && /* @__PURE__ */ (0, U.jsxs)(Yn, {
|
|
3003
3003
|
className: "flex w-full max-w-[350px] flex-col gap-2",
|
|
3004
|
-
children: [/* @__PURE__ */ (0,
|
|
3004
|
+
children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
|
|
3005
3005
|
asChild: !0,
|
|
3006
|
-
children: /* @__PURE__ */ (0,
|
|
3006
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3007
3007
|
className: "flex items-center justify-between gap-4",
|
|
3008
|
-
children: [/* @__PURE__ */ (0,
|
|
3008
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
3009
3009
|
className: "font-semibold text-sm",
|
|
3010
3010
|
children: o("editor.inputNodeForm.validation")
|
|
3011
|
-
}), /* @__PURE__ */ (0,
|
|
3011
|
+
}), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
3012
3012
|
variant: "ghost",
|
|
3013
3013
|
size: "icon",
|
|
3014
3014
|
className: "size-8",
|
|
3015
|
-
children: [/* @__PURE__ */ (0,
|
|
3015
|
+
children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
3016
3016
|
className: "sr-only",
|
|
3017
3017
|
children: o("common.toggle")
|
|
3018
3018
|
})]
|
|
3019
3019
|
})]
|
|
3020
3020
|
})
|
|
3021
|
-
}), /* @__PURE__ */ (0,
|
|
3021
|
+
}), /* @__PURE__ */ (0, U.jsxs)(Zn, {
|
|
3022
3022
|
className: "flex flex-col gap-6",
|
|
3023
3023
|
children: [
|
|
3024
|
-
/* @__PURE__ */ (0,
|
|
3024
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3025
3025
|
name: "required",
|
|
3026
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3026
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3027
3027
|
className: "flex items-center space-x-2",
|
|
3028
|
-
children: [/* @__PURE__ */ (0,
|
|
3028
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
3029
3029
|
id: e.name,
|
|
3030
3030
|
checked: e.state.value,
|
|
3031
3031
|
onCheckedChange: (t) => e.handleChange(t)
|
|
3032
|
-
}), /* @__PURE__ */ (0,
|
|
3032
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
3033
3033
|
htmlFor: e.name,
|
|
3034
3034
|
children: o("editor.inputNodeForm.required")
|
|
3035
3035
|
})]
|
|
3036
3036
|
}) })
|
|
3037
3037
|
}),
|
|
3038
|
-
(n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ (0,
|
|
3038
|
+
(n?.data?.type === "date" || n?.data?.type === "daterange") && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
3039
3039
|
name: "disablePast",
|
|
3040
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3040
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3041
3041
|
className: "flex items-center space-x-2",
|
|
3042
|
-
children: [/* @__PURE__ */ (0,
|
|
3042
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
3043
3043
|
id: e.name,
|
|
3044
3044
|
checked: e.state.value,
|
|
3045
3045
|
onCheckedChange: (t) => e.handleChange(t)
|
|
3046
|
-
}), /* @__PURE__ */ (0,
|
|
3046
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
3047
3047
|
htmlFor: e.name,
|
|
3048
3048
|
children: o("editor.inputNodeForm.disablePast")
|
|
3049
3049
|
})]
|
|
3050
3050
|
}) })
|
|
3051
3051
|
}),
|
|
3052
|
-
/* @__PURE__ */ (0,
|
|
3052
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3053
3053
|
name: "pattern",
|
|
3054
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3054
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3055
3055
|
htmlFor: e.name,
|
|
3056
3056
|
children: o("editor.inputNodeForm.pattern")
|
|
3057
|
-
}), /* @__PURE__ */ (0,
|
|
3057
|
+
}), /* @__PURE__ */ (0, U.jsx)(Bn, {
|
|
3058
3058
|
id: e.name,
|
|
3059
3059
|
value: e.state.value,
|
|
3060
3060
|
onValueChange: e.handleChange
|
|
3061
3061
|
})] })
|
|
3062
3062
|
}),
|
|
3063
|
-
/* @__PURE__ */ (0,
|
|
3063
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3064
3064
|
className: "flex items-end gap-2",
|
|
3065
|
-
children: [/* @__PURE__ */ (0,
|
|
3065
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3066
3066
|
name: "errorMessage",
|
|
3067
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
3067
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
3068
3068
|
className: "flex-1",
|
|
3069
|
-
children: [/* @__PURE__ */ (0,
|
|
3069
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3070
3070
|
htmlFor: t.name,
|
|
3071
3071
|
children: o("editor.inputNodeForm.errorMessage")
|
|
3072
|
-
}), /* @__PURE__ */ (0,
|
|
3072
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
3073
3073
|
id: t.name,
|
|
3074
3074
|
name: t.name,
|
|
3075
3075
|
value: t.state.value?.[e] || "",
|
|
@@ -3082,7 +3082,7 @@ var Qn = () => {
|
|
|
3082
3082
|
}
|
|
3083
3083
|
})]
|
|
3084
3084
|
})
|
|
3085
|
-
}), /* @__PURE__ */ (0,
|
|
3085
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
3086
3086
|
value: e,
|
|
3087
3087
|
onValueChange: t
|
|
3088
3088
|
})]
|
|
@@ -3090,80 +3090,80 @@ var Qn = () => {
|
|
|
3090
3090
|
]
|
|
3091
3091
|
})]
|
|
3092
3092
|
}),
|
|
3093
|
-
!s && /* @__PURE__ */ (0,
|
|
3093
|
+
!s && /* @__PURE__ */ (0, U.jsxs)(Yn, {
|
|
3094
3094
|
className: "flex w-full max-w-[350px] flex-col gap-2",
|
|
3095
|
-
children: [/* @__PURE__ */ (0,
|
|
3095
|
+
children: [/* @__PURE__ */ (0, U.jsx)(Xn, {
|
|
3096
3096
|
asChild: !0,
|
|
3097
|
-
children: /* @__PURE__ */ (0,
|
|
3097
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3098
3098
|
className: "flex items-center justify-between gap-4",
|
|
3099
|
-
children: [/* @__PURE__ */ (0,
|
|
3099
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
3100
3100
|
className: "font-semibold text-sm",
|
|
3101
3101
|
children: o("editor.inputNodeForm.advancedConfiguration")
|
|
3102
|
-
}), /* @__PURE__ */ (0,
|
|
3102
|
+
}), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
3103
3103
|
variant: "ghost",
|
|
3104
3104
|
size: "icon",
|
|
3105
3105
|
className: "size-8",
|
|
3106
|
-
children: [/* @__PURE__ */ (0,
|
|
3106
|
+
children: [/* @__PURE__ */ (0, U.jsx)(He, {}), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
3107
3107
|
className: "sr-only",
|
|
3108
3108
|
children: o("common.toggle")
|
|
3109
3109
|
})]
|
|
3110
3110
|
})]
|
|
3111
3111
|
})
|
|
3112
|
-
}), /* @__PURE__ */ (0,
|
|
3112
|
+
}), /* @__PURE__ */ (0, U.jsxs)(Zn, {
|
|
3113
3113
|
className: "flex flex-col gap-6",
|
|
3114
|
-
children: [/* @__PURE__ */ (0,
|
|
3114
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3115
3115
|
name: "name",
|
|
3116
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3117
|
-
/* @__PURE__ */ (0,
|
|
3116
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
3117
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3118
3118
|
htmlFor: e.name,
|
|
3119
3119
|
children: o("editor.inputNodeForm.name")
|
|
3120
3120
|
}),
|
|
3121
|
-
/* @__PURE__ */ (0,
|
|
3121
|
+
/* @__PURE__ */ (0, U.jsx)(h, {
|
|
3122
3122
|
id: e.name,
|
|
3123
3123
|
name: e.name,
|
|
3124
3124
|
value: e.state.value,
|
|
3125
3125
|
onBlur: e.handleBlur,
|
|
3126
3126
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
3127
3127
|
}),
|
|
3128
|
-
/* @__PURE__ */ (0,
|
|
3128
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.nameDescription") })
|
|
3129
3129
|
] })
|
|
3130
|
-
}), /* @__PURE__ */ (0,
|
|
3130
|
+
}), /* @__PURE__ */ (0, U.jsx)(d, {
|
|
3131
3131
|
name: "defaultValue",
|
|
3132
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3133
|
-
/* @__PURE__ */ (0,
|
|
3132
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
3133
|
+
/* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3134
3134
|
htmlFor: e.name,
|
|
3135
3135
|
children: o("editor.inputNodeForm.defaultValueType")
|
|
3136
|
-
}), /* @__PURE__ */ (0,
|
|
3136
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
3137
3137
|
value: e.state.value?.type || "none",
|
|
3138
3138
|
onValueChange: (t) => {
|
|
3139
3139
|
e.handleChange(t === "none" ? null : { type: t });
|
|
3140
3140
|
},
|
|
3141
|
-
children: [/* @__PURE__ */ (0,
|
|
3141
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
3142
3142
|
id: e.name,
|
|
3143
|
-
children: /* @__PURE__ */ (0,
|
|
3144
|
-
}), /* @__PURE__ */ (0,
|
|
3145
|
-
/* @__PURE__ */ (0,
|
|
3143
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: o("editor.inputNodeForm.selectType") })
|
|
3144
|
+
}), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
|
|
3145
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3146
3146
|
value: "none",
|
|
3147
3147
|
children: o("editor.inputNodeForm.defaultValueTypeNone")
|
|
3148
3148
|
}),
|
|
3149
|
-
/* @__PURE__ */ (0,
|
|
3149
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3150
3150
|
value: "static",
|
|
3151
3151
|
children: o("editor.inputNodeForm.defaultValueTypeStatic")
|
|
3152
3152
|
}),
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3153
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3154
3154
|
value: "reference",
|
|
3155
3155
|
children: o("editor.inputNodeForm.defaultValueTypeReference")
|
|
3156
3156
|
})
|
|
3157
3157
|
] })]
|
|
3158
3158
|
})] }),
|
|
3159
|
-
e.state.value?.type === "static" && /* @__PURE__ */ (0,
|
|
3159
|
+
e.state.value?.type === "static" && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
3160
3160
|
name: "defaultValue.staticValue",
|
|
3161
3161
|
children: (e) => {
|
|
3162
3162
|
let t = n?.data?.type;
|
|
3163
|
-
return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ (0,
|
|
3163
|
+
return (t === "select" || t === "checkbox") && n?.data?.multiple ? /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3164
3164
|
htmlFor: e.name,
|
|
3165
3165
|
children: o("editor.inputNodeForm.defaultValuesCommaSeparated")
|
|
3166
|
-
}), /* @__PURE__ */ (0,
|
|
3166
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
3167
3167
|
id: e.name,
|
|
3168
3168
|
placeholder: o("editor.inputNodeForm.defaultValuesPlaceholder"),
|
|
3169
3169
|
value: Array.isArray(e.state.value) ? e.state.value.join(", ") : "",
|
|
@@ -3171,20 +3171,20 @@ var Qn = () => {
|
|
|
3171
3171
|
let n = t.value.split(",").map((e) => e.trim()).filter(Boolean);
|
|
3172
3172
|
e.handleChange(n.length > 0 ? n : null);
|
|
3173
3173
|
}
|
|
3174
|
-
})] }) : t === "checkbox" ? /* @__PURE__ */ (0,
|
|
3174
|
+
})] }) : t === "checkbox" ? /* @__PURE__ */ (0, U.jsx)(T, { children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3175
3175
|
className: "flex items-center space-x-2",
|
|
3176
|
-
children: [/* @__PURE__ */ (0,
|
|
3176
|
+
children: [/* @__PURE__ */ (0, U.jsx)(S, {
|
|
3177
3177
|
id: e.name,
|
|
3178
3178
|
checked: !!e.state.value,
|
|
3179
3179
|
onCheckedChange: (t) => e.handleChange(t)
|
|
3180
|
-
}), /* @__PURE__ */ (0,
|
|
3180
|
+
}), /* @__PURE__ */ (0, U.jsx)(u, {
|
|
3181
3181
|
htmlFor: e.name,
|
|
3182
3182
|
children: o("editor.inputNodeForm.defaultChecked")
|
|
3183
3183
|
})]
|
|
3184
|
-
}) }) : /* @__PURE__ */ (0,
|
|
3184
|
+
}) }) : /* @__PURE__ */ (0, U.jsxs)(T, { children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3185
3185
|
htmlFor: e.name,
|
|
3186
3186
|
children: o("editor.inputNodeForm.staticValue")
|
|
3187
|
-
}), /* @__PURE__ */ (0,
|
|
3187
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
3188
3188
|
id: e.name,
|
|
3189
3189
|
placeholder: o("editor.inputNodeForm.staticValuePlaceholder"),
|
|
3190
3190
|
value: typeof e.state.value == "string" ? e.state.value : "",
|
|
@@ -3192,27 +3192,27 @@ var Qn = () => {
|
|
|
3192
3192
|
})] });
|
|
3193
3193
|
}
|
|
3194
3194
|
}),
|
|
3195
|
-
e.state.value?.type === "reference" && /* @__PURE__ */ (0,
|
|
3196
|
-
/* @__PURE__ */ (0,
|
|
3195
|
+
e.state.value?.type === "reference" && /* @__PURE__ */ (0, U.jsxs)(U.Fragment, { children: [
|
|
3196
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3197
3197
|
name: "defaultValue.referenceField",
|
|
3198
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3199
|
-
/* @__PURE__ */ (0,
|
|
3198
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
3199
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3200
3200
|
htmlFor: e.name,
|
|
3201
3201
|
children: o("editor.inputNodeForm.referenceField")
|
|
3202
3202
|
}),
|
|
3203
|
-
/* @__PURE__ */ (0,
|
|
3203
|
+
/* @__PURE__ */ (0, U.jsxs)(y, {
|
|
3204
3204
|
value: e.state.value || "",
|
|
3205
3205
|
onValueChange: (t) => {
|
|
3206
3206
|
e.handleChange(t);
|
|
3207
3207
|
},
|
|
3208
|
-
children: [/* @__PURE__ */ (0,
|
|
3208
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
3209
3209
|
id: e.name,
|
|
3210
|
-
children: /* @__PURE__ */ (0,
|
|
3211
|
-
}), /* @__PURE__ */ (0,
|
|
3210
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: o("editor.inputNodeForm.selectReferenceField") })
|
|
3211
|
+
}), /* @__PURE__ */ (0, U.jsx)(A, { children: a.length === 0 ? /* @__PURE__ */ (0, U.jsx)(x, {
|
|
3212
3212
|
value: "none",
|
|
3213
3213
|
disabled: !0,
|
|
3214
3214
|
children: o("editor.inputNodeForm.noParentFieldsAvailable")
|
|
3215
|
-
}) : a.map((e) => /* @__PURE__ */ (0,
|
|
3215
|
+
}) : a.map((e) => /* @__PURE__ */ (0, U.jsxs)(x, {
|
|
3216
3216
|
value: e.nodeId,
|
|
3217
3217
|
children: [
|
|
3218
3218
|
e.label,
|
|
@@ -3222,17 +3222,17 @@ var Qn = () => {
|
|
|
3222
3222
|
]
|
|
3223
3223
|
}, e.nodeId)) })]
|
|
3224
3224
|
}),
|
|
3225
|
-
a.length === 0 && /* @__PURE__ */ (0,
|
|
3225
|
+
a.length === 0 && /* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.addInputFieldsBeforeReference") })
|
|
3226
3226
|
] })
|
|
3227
3227
|
}),
|
|
3228
|
-
/* @__PURE__ */ (0,
|
|
3228
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3229
3229
|
name: "defaultValue.transformFunction",
|
|
3230
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
3231
|
-
/* @__PURE__ */ (0,
|
|
3230
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
3231
|
+
/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3232
3232
|
htmlFor: t.name,
|
|
3233
3233
|
children: o("editor.inputNodeForm.transformType")
|
|
3234
3234
|
}),
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3235
|
+
/* @__PURE__ */ (0, U.jsxs)(y, {
|
|
3236
3236
|
value: t.state.value || "none",
|
|
3237
3237
|
onValueChange: (n) => {
|
|
3238
3238
|
let r = n === "none" ? null : n;
|
|
@@ -3244,80 +3244,80 @@ var Qn = () => {
|
|
|
3244
3244
|
});
|
|
3245
3245
|
}
|
|
3246
3246
|
},
|
|
3247
|
-
children: [/* @__PURE__ */ (0,
|
|
3247
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
3248
3248
|
id: t.name,
|
|
3249
|
-
children: /* @__PURE__ */ (0,
|
|
3250
|
-
}), /* @__PURE__ */ (0,
|
|
3251
|
-
/* @__PURE__ */ (0,
|
|
3249
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: o("editor.inputNodeForm.selectTransformation") })
|
|
3250
|
+
}), /* @__PURE__ */ (0, U.jsxs)(A, { children: [
|
|
3251
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3252
3252
|
value: "none",
|
|
3253
3253
|
children: o("editor.inputNodeForm.transformNone")
|
|
3254
3254
|
}),
|
|
3255
|
-
/* @__PURE__ */ (0,
|
|
3255
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3256
3256
|
value: "toString",
|
|
3257
3257
|
children: o("editor.inputNodeForm.transformString")
|
|
3258
3258
|
}),
|
|
3259
|
-
/* @__PURE__ */ (0,
|
|
3259
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3260
3260
|
value: "toNumber",
|
|
3261
3261
|
children: o("editor.inputNodeForm.transformNumber")
|
|
3262
3262
|
}),
|
|
3263
|
-
/* @__PURE__ */ (0,
|
|
3263
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3264
3264
|
value: "toBoolean",
|
|
3265
3265
|
children: o("editor.inputNodeForm.transformBoolean")
|
|
3266
3266
|
}),
|
|
3267
|
-
/* @__PURE__ */ (0,
|
|
3267
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3268
3268
|
value: "toArray",
|
|
3269
3269
|
children: o("editor.inputNodeForm.transformArray")
|
|
3270
3270
|
}),
|
|
3271
|
-
/* @__PURE__ */ (0,
|
|
3271
|
+
/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3272
3272
|
value: "toObject",
|
|
3273
3273
|
children: o("editor.inputNodeForm.transformMapToObject")
|
|
3274
3274
|
})
|
|
3275
3275
|
] })]
|
|
3276
3276
|
}),
|
|
3277
|
-
/* @__PURE__ */ (0,
|
|
3277
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.transformDesc") })
|
|
3278
3278
|
] })
|
|
3279
3279
|
}),
|
|
3280
|
-
e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ (0,
|
|
3280
|
+
e.state.value?.transformFunction === "toObject" && /* @__PURE__ */ (0, U.jsx)(d, {
|
|
3281
3281
|
name: "defaultValue.objectMapping",
|
|
3282
3282
|
mode: "array",
|
|
3283
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3284
|
-
/* @__PURE__ */ (0,
|
|
3285
|
-
/* @__PURE__ */ (0,
|
|
3283
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(T, { children: [
|
|
3284
|
+
/* @__PURE__ */ (0, U.jsx)(u, { children: o("editor.inputNodeForm.objectMapping") }),
|
|
3285
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3286
3286
|
className: "space-y-2",
|
|
3287
|
-
children: [e.state.value?.map((t, n) => /* @__PURE__ */ (0,
|
|
3287
|
+
children: [e.state.value?.map((t, n) => /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3288
3288
|
className: "flex items-center gap-2",
|
|
3289
3289
|
children: [
|
|
3290
|
-
/* @__PURE__ */ (0,
|
|
3290
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3291
3291
|
name: `defaultValue.objectMapping[${n}].sourceKey`,
|
|
3292
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3292
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
3293
3293
|
placeholder: o("editor.inputNodeForm.sourceKey"),
|
|
3294
3294
|
value: e.state.value || "",
|
|
3295
3295
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
3296
3296
|
})
|
|
3297
3297
|
}),
|
|
3298
|
-
/* @__PURE__ */ (0,
|
|
3298
|
+
/* @__PURE__ */ (0, U.jsx)("span", {
|
|
3299
3299
|
className: "text-muted-foreground",
|
|
3300
3300
|
children: "→"
|
|
3301
3301
|
}),
|
|
3302
|
-
/* @__PURE__ */ (0,
|
|
3302
|
+
/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3303
3303
|
name: `defaultValue.objectMapping[${n}].targetKey`,
|
|
3304
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3304
|
+
children: (e) => /* @__PURE__ */ (0, U.jsx)(h, {
|
|
3305
3305
|
placeholder: o("editor.inputNodeForm.targetKey"),
|
|
3306
3306
|
value: e.state.value || "",
|
|
3307
3307
|
onChange: ({ target: t }) => e.handleChange(t.value)
|
|
3308
3308
|
})
|
|
3309
3309
|
}),
|
|
3310
|
-
/* @__PURE__ */ (0,
|
|
3310
|
+
/* @__PURE__ */ (0, U.jsx)(m, {
|
|
3311
3311
|
type: "button",
|
|
3312
3312
|
variant: "ghost",
|
|
3313
3313
|
size: "icon",
|
|
3314
3314
|
onClick: () => {
|
|
3315
3315
|
e.removeValue(n), c().then();
|
|
3316
3316
|
},
|
|
3317
|
-
children: /* @__PURE__ */ (0,
|
|
3317
|
+
children: /* @__PURE__ */ (0, U.jsx)(R, { className: "h-4 w-4" })
|
|
3318
3318
|
})
|
|
3319
3319
|
]
|
|
3320
|
-
}, `mapping-${n}`)), /* @__PURE__ */ (0,
|
|
3320
|
+
}, `mapping-${n}`)), /* @__PURE__ */ (0, U.jsxs)(m, {
|
|
3321
3321
|
type: "button",
|
|
3322
3322
|
variant: "outline",
|
|
3323
3323
|
size: "sm",
|
|
@@ -3328,10 +3328,10 @@ var Qn = () => {
|
|
|
3328
3328
|
targetKey: ""
|
|
3329
3329
|
}), c().then();
|
|
3330
3330
|
},
|
|
3331
|
-
children: [/* @__PURE__ */ (0,
|
|
3331
|
+
children: [/* @__PURE__ */ (0, U.jsx)(L, { className: "mr-2 h-4 w-4" }), o("editor.inputNodeForm.addMapping")]
|
|
3332
3332
|
})]
|
|
3333
3333
|
}),
|
|
3334
|
-
/* @__PURE__ */ (0,
|
|
3334
|
+
/* @__PURE__ */ (0, U.jsx)(E, { children: o("editor.inputNodeForm.objectMappingDesc") })
|
|
3335
3335
|
] })
|
|
3336
3336
|
})
|
|
3337
3337
|
] })
|
|
@@ -3343,7 +3343,7 @@ var Qn = () => {
|
|
|
3343
3343
|
})
|
|
3344
3344
|
});
|
|
3345
3345
|
}, $n = () => {
|
|
3346
|
-
let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } =
|
|
3346
|
+
let [e, t] = F("en"), { selectedNode: n } = $(), { updateSelectedNodeData: r } = K(), { Field: i } = I({
|
|
3347
3347
|
defaultValues: {
|
|
3348
3348
|
label: n?.data?.label || { en: "" },
|
|
3349
3349
|
type: n?.data?.type || ""
|
|
@@ -3358,22 +3358,22 @@ var Qn = () => {
|
|
|
3358
3358
|
r(e);
|
|
3359
3359
|
}
|
|
3360
3360
|
});
|
|
3361
|
-
return /* @__PURE__ */ (0,
|
|
3361
|
+
return /* @__PURE__ */ (0, U.jsx)("form", {
|
|
3362
3362
|
onSubmit: (e) => {
|
|
3363
3363
|
e.preventDefault(), e.stopPropagation();
|
|
3364
3364
|
},
|
|
3365
|
-
children: /* @__PURE__ */ (0,
|
|
3365
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3366
3366
|
className: "grid gap-6",
|
|
3367
|
-
children: [/* @__PURE__ */ (0,
|
|
3367
|
+
children: [/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3368
3368
|
className: "flex items-end gap-2",
|
|
3369
|
-
children: [/* @__PURE__ */ (0,
|
|
3369
|
+
children: [/* @__PURE__ */ (0, U.jsx)(i, {
|
|
3370
3370
|
name: "label",
|
|
3371
|
-
children: (t) => /* @__PURE__ */ (0,
|
|
3371
|
+
children: (t) => /* @__PURE__ */ (0, U.jsxs)(T, {
|
|
3372
3372
|
className: "flex-1",
|
|
3373
|
-
children: [/* @__PURE__ */ (0,
|
|
3373
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3374
3374
|
htmlFor: t.name,
|
|
3375
3375
|
children: "Label"
|
|
3376
|
-
}), /* @__PURE__ */ (0,
|
|
3376
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
3377
3377
|
id: t.name,
|
|
3378
3378
|
name: t.name,
|
|
3379
3379
|
value: t.state.value?.[e] || "",
|
|
@@ -3386,27 +3386,27 @@ var Qn = () => {
|
|
|
3386
3386
|
}
|
|
3387
3387
|
})]
|
|
3388
3388
|
})
|
|
3389
|
-
}), /* @__PURE__ */ (0,
|
|
3389
|
+
}), /* @__PURE__ */ (0, U.jsx)(Q, {
|
|
3390
3390
|
value: e,
|
|
3391
3391
|
onValueChange: t
|
|
3392
3392
|
})]
|
|
3393
|
-
}), /* @__PURE__ */ (0,
|
|
3393
|
+
}), /* @__PURE__ */ (0, U.jsx)(i, {
|
|
3394
3394
|
name: "type",
|
|
3395
|
-
children: (e) => /* @__PURE__ */ (0,
|
|
3395
|
+
children: (e) => /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(ue, {
|
|
3396
3396
|
htmlFor: e.name,
|
|
3397
3397
|
children: "Type"
|
|
3398
|
-
}), /* @__PURE__ */ (0,
|
|
3398
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
3399
3399
|
value: e.state.value,
|
|
3400
3400
|
onValueChange: (t) => e.handleChange(t),
|
|
3401
|
-
children: [/* @__PURE__ */ (0,
|
|
3401
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
3402
3402
|
id: e.name,
|
|
3403
3403
|
className: "w-full",
|
|
3404
|
-
children: /* @__PURE__ */ (0,
|
|
3405
|
-
}), /* @__PURE__ */ (0,
|
|
3406
|
-
value:
|
|
3404
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: "" })
|
|
3405
|
+
}), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3406
|
+
value: Z.title,
|
|
3407
3407
|
children: "Title"
|
|
3408
|
-
}), /* @__PURE__ */ (0,
|
|
3409
|
-
value:
|
|
3408
|
+
}), /* @__PURE__ */ (0, U.jsx)(x, {
|
|
3409
|
+
value: Z.divider,
|
|
3410
3410
|
children: "Divider"
|
|
3411
3411
|
})] }) })]
|
|
3412
3412
|
})] })
|
|
@@ -3414,7 +3414,7 @@ var Qn = () => {
|
|
|
3414
3414
|
})
|
|
3415
3415
|
});
|
|
3416
3416
|
}, er = () => {
|
|
3417
|
-
let [e, t] = F(""), [n, r] = F(!1), { selectedNode: i, groupNodes: o } = $(), { setNodes: s } = M(), c = i?.parentId || "none", f = a(i), p =
|
|
3417
|
+
let [e, t] = F(""), [n, r] = F(!1), { selectedNode: i, groupNodes: o } = $(), { setNodes: s } = M(), c = i?.parentId || "none", f = a(i), p = W(), g = je(), b = je();
|
|
3418
3418
|
if (f) return null;
|
|
3419
3419
|
let S = (e) => {
|
|
3420
3420
|
i && s((t) => e === "none" ? t.map((e) => {
|
|
@@ -3438,10 +3438,10 @@ var Qn = () => {
|
|
|
3438
3438
|
let n = t.data?.label?.en || t.data?.label;
|
|
3439
3439
|
return String(n).toLowerCase() === e.trim().toLowerCase();
|
|
3440
3440
|
})) {
|
|
3441
|
-
|
|
3441
|
+
V.error("This group already exists", { description: "Use the selector to add the node to an existing group." });
|
|
3442
3442
|
return;
|
|
3443
3443
|
}
|
|
3444
|
-
let n =
|
|
3444
|
+
let n = rn();
|
|
3445
3445
|
s((t) => [{
|
|
3446
3446
|
data: { label: { en: e.trim() } },
|
|
3447
3447
|
id: n,
|
|
@@ -3462,63 +3462,63 @@ var Qn = () => {
|
|
|
3462
3462
|
x: 175,
|
|
3463
3463
|
y: 30
|
|
3464
3464
|
}
|
|
3465
|
-
} : e)]), t(""), r(!1),
|
|
3465
|
+
} : e)]), t(""), r(!1), V.success("Group created", { description: `The group "${e.trim()}" has been created successfully.` });
|
|
3466
3466
|
};
|
|
3467
|
-
return /* @__PURE__ */ (0,
|
|
3467
|
+
return /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3468
3468
|
className: "space-y-2",
|
|
3469
|
-
children: [/* @__PURE__ */ (0,
|
|
3469
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3470
3470
|
htmlFor: g,
|
|
3471
3471
|
children: p("editor.selectNodeGroup.group")
|
|
3472
|
-
}), /* @__PURE__ */ (0,
|
|
3472
|
+
}), /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3473
3473
|
className: "flex gap-2",
|
|
3474
|
-
children: [/* @__PURE__ */ (0,
|
|
3474
|
+
children: [/* @__PURE__ */ (0, U.jsxs)(y, {
|
|
3475
3475
|
value: c,
|
|
3476
3476
|
onValueChange: S,
|
|
3477
|
-
children: [/* @__PURE__ */ (0,
|
|
3477
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
3478
3478
|
id: g,
|
|
3479
3479
|
className: "flex-1",
|
|
3480
|
-
children: /* @__PURE__ */ (0,
|
|
3481
|
-
}), /* @__PURE__ */ (0,
|
|
3480
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: p("editor.selectNodeGroup.noGroup") })
|
|
3481
|
+
}), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(x, {
|
|
3482
3482
|
value: "none",
|
|
3483
3483
|
children: p("editor.selectNodeGroup.noGroup")
|
|
3484
|
-
}), o.map((e) => /* @__PURE__ */ (0,
|
|
3484
|
+
}), o.map((e) => /* @__PURE__ */ (0, U.jsx)(x, {
|
|
3485
3485
|
value: e.id,
|
|
3486
3486
|
children: e.data.label?.en ? String(e.data.label?.en) : e.id
|
|
3487
3487
|
}, e.id))] }) })]
|
|
3488
|
-
}), /* @__PURE__ */ (0,
|
|
3488
|
+
}), /* @__PURE__ */ (0, U.jsxs)(le, {
|
|
3489
3489
|
open: n,
|
|
3490
3490
|
onOpenChange: r,
|
|
3491
|
-
children: [/* @__PURE__ */ (0,
|
|
3491
|
+
children: [/* @__PURE__ */ (0, U.jsx)(d, {
|
|
3492
3492
|
asChild: !0,
|
|
3493
|
-
children: /* @__PURE__ */ (0,
|
|
3493
|
+
children: /* @__PURE__ */ (0, U.jsx)(m, {
|
|
3494
3494
|
variant: "outline",
|
|
3495
3495
|
size: "icon",
|
|
3496
3496
|
title: "Create a new group",
|
|
3497
|
-
children: /* @__PURE__ */ (0,
|
|
3497
|
+
children: /* @__PURE__ */ (0, U.jsx)(st, { className: "h-4 w-4" })
|
|
3498
3498
|
})
|
|
3499
|
-
}), /* @__PURE__ */ (0,
|
|
3499
|
+
}), /* @__PURE__ */ (0, U.jsx)(v, {
|
|
3500
3500
|
className: "w-80",
|
|
3501
3501
|
align: "end",
|
|
3502
3502
|
disablePortal: !0,
|
|
3503
|
-
children: /* @__PURE__ */ (0,
|
|
3503
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3504
3504
|
className: "space-y-4",
|
|
3505
3505
|
children: [
|
|
3506
|
-
/* @__PURE__ */ (0,
|
|
3506
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3507
3507
|
className: "space-y-2",
|
|
3508
|
-
children: [/* @__PURE__ */ (0,
|
|
3508
|
+
children: [/* @__PURE__ */ (0, U.jsx)("h4", {
|
|
3509
3509
|
className: "font-medium leading-none",
|
|
3510
3510
|
children: p("editor.selectNodeGroup.newGroup")
|
|
3511
|
-
}), /* @__PURE__ */ (0,
|
|
3511
|
+
}), /* @__PURE__ */ (0, U.jsx)("p", {
|
|
3512
3512
|
className: "text-muted-foreground text-sm",
|
|
3513
3513
|
children: p("editor.selectNodeGroup.newGroupDescription")
|
|
3514
3514
|
})]
|
|
3515
3515
|
}),
|
|
3516
|
-
/* @__PURE__ */ (0,
|
|
3516
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3517
3517
|
className: "space-y-2",
|
|
3518
|
-
children: [/* @__PURE__ */ (0,
|
|
3518
|
+
children: [/* @__PURE__ */ (0, U.jsx)(u, {
|
|
3519
3519
|
htmlFor: b,
|
|
3520
3520
|
children: p("editor.selectNodeGroup.groupName")
|
|
3521
|
-
}), /* @__PURE__ */ (0,
|
|
3521
|
+
}), /* @__PURE__ */ (0, U.jsx)(h, {
|
|
3522
3522
|
autoFocus: !0,
|
|
3523
3523
|
id: b,
|
|
3524
3524
|
value: e,
|
|
@@ -3529,14 +3529,14 @@ var Qn = () => {
|
|
|
3529
3529
|
}
|
|
3530
3530
|
})]
|
|
3531
3531
|
}),
|
|
3532
|
-
/* @__PURE__ */ (0,
|
|
3532
|
+
/* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3533
3533
|
className: "flex justify-end gap-2",
|
|
3534
|
-
children: [/* @__PURE__ */ (0,
|
|
3534
|
+
children: [/* @__PURE__ */ (0, U.jsx)(m, {
|
|
3535
3535
|
variant: "outline",
|
|
3536
3536
|
size: "sm",
|
|
3537
3537
|
onClick: () => r(!1),
|
|
3538
3538
|
children: "Cancel"
|
|
3539
|
-
}), /* @__PURE__ */ (0,
|
|
3539
|
+
}), /* @__PURE__ */ (0, U.jsx)(m, {
|
|
3540
3540
|
size: "sm",
|
|
3541
3541
|
onClick: C,
|
|
3542
3542
|
disabled: !e.trim(),
|
|
@@ -3550,19 +3550,19 @@ var Qn = () => {
|
|
|
3550
3550
|
})]
|
|
3551
3551
|
});
|
|
3552
3552
|
}, tr = () => {
|
|
3553
|
-
let { selectedNode: e } = $(), { updateSelectedNodeType: t } =
|
|
3554
|
-
return /* @__PURE__ */ (0,
|
|
3553
|
+
let { selectedNode: e } = $(), { updateSelectedNodeType: t } = K(), n = e?.type || "", r = a(e), i = W(), o = je();
|
|
3554
|
+
return /* @__PURE__ */ (0, U.jsxs)(j, { children: [/* @__PURE__ */ (0, U.jsx)(ue, {
|
|
3555
3555
|
htmlFor: o,
|
|
3556
3556
|
children: i("editor.selectNodeType.nodeType")
|
|
3557
|
-
}), /* @__PURE__ */ (0,
|
|
3557
|
+
}), /* @__PURE__ */ (0, U.jsxs)(y, {
|
|
3558
3558
|
value: n,
|
|
3559
3559
|
onValueChange: (e) => t(e),
|
|
3560
3560
|
disabled: r,
|
|
3561
|
-
children: [/* @__PURE__ */ (0,
|
|
3561
|
+
children: [/* @__PURE__ */ (0, U.jsx)(_, {
|
|
3562
3562
|
className: "w-full",
|
|
3563
3563
|
id: o,
|
|
3564
|
-
children: /* @__PURE__ */ (0,
|
|
3565
|
-
}), /* @__PURE__ */ (0,
|
|
3564
|
+
children: /* @__PURE__ */ (0, U.jsx)(l, { placeholder: i("editor.selectNodeType.nodeType") })
|
|
3565
|
+
}), /* @__PURE__ */ (0, U.jsx)(A, { children: /* @__PURE__ */ (0, U.jsx)(j, { children: Object.keys(vn).filter((e) => r ? e === "group" : e !== "group").map((e) => /* @__PURE__ */ (0, U.jsx)(x, {
|
|
3566
3566
|
value: e,
|
|
3567
3567
|
children: i(`editor.selectNodeType.options.${e}`)
|
|
3568
3568
|
}, e)) }) })]
|
|
@@ -3571,32 +3571,32 @@ var Qn = () => {
|
|
|
3571
3571
|
//#endregion
|
|
3572
3572
|
//#region src/shared/components/ui/sheet.tsx
|
|
3573
3573
|
function nr({ ...e }) {
|
|
3574
|
-
return /* @__PURE__ */ (0,
|
|
3574
|
+
return /* @__PURE__ */ (0, U.jsx)(H.Root, {
|
|
3575
3575
|
"data-slot": "sheet",
|
|
3576
3576
|
...e
|
|
3577
3577
|
});
|
|
3578
3578
|
}
|
|
3579
3579
|
function rr({ ...e }) {
|
|
3580
|
-
return /* @__PURE__ */ (0,
|
|
3580
|
+
return /* @__PURE__ */ (0, U.jsx)(H.Portal, {
|
|
3581
3581
|
"data-slot": "sheet-portal",
|
|
3582
3582
|
...e
|
|
3583
3583
|
});
|
|
3584
3584
|
}
|
|
3585
3585
|
function ir({ className: e, ...t }) {
|
|
3586
|
-
return /* @__PURE__ */ (0,
|
|
3586
|
+
return /* @__PURE__ */ (0, U.jsx)(H.Overlay, {
|
|
3587
3587
|
"data-slot": "sheet-overlay",
|
|
3588
3588
|
className: f("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", e),
|
|
3589
3589
|
...t
|
|
3590
3590
|
});
|
|
3591
3591
|
}
|
|
3592
3592
|
function ar({ className: e, children: t, side: n = "right", ...r }) {
|
|
3593
|
-
return /* @__PURE__ */ (0,
|
|
3593
|
+
return /* @__PURE__ */ (0, U.jsxs)(rr, { children: [/* @__PURE__ */ (0, U.jsx)(ir, {}), /* @__PURE__ */ (0, U.jsxs)(H.Content, {
|
|
3594
3594
|
"data-slot": "sheet-content",
|
|
3595
3595
|
className: f("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500", n === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm", n === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm", n === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b", n === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t", e),
|
|
3596
3596
|
...r,
|
|
3597
|
-
children: [t, /* @__PURE__ */ (0,
|
|
3597
|
+
children: [t, /* @__PURE__ */ (0, U.jsxs)(H.Close, {
|
|
3598
3598
|
className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
|
|
3599
|
-
children: [/* @__PURE__ */ (0,
|
|
3599
|
+
children: [/* @__PURE__ */ (0, U.jsx)(yt, { className: "size-4" }), /* @__PURE__ */ (0, U.jsx)("span", {
|
|
3600
3600
|
className: "sr-only",
|
|
3601
3601
|
children: "Close"
|
|
3602
3602
|
})]
|
|
@@ -3604,28 +3604,28 @@ function ar({ className: e, children: t, side: n = "right", ...r }) {
|
|
|
3604
3604
|
})] });
|
|
3605
3605
|
}
|
|
3606
3606
|
function or({ className: e, ...t }) {
|
|
3607
|
-
return /* @__PURE__ */ (0,
|
|
3607
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3608
3608
|
"data-slot": "sheet-header",
|
|
3609
3609
|
className: f("flex flex-col gap-1.5 p-4", e),
|
|
3610
3610
|
...t
|
|
3611
3611
|
});
|
|
3612
3612
|
}
|
|
3613
3613
|
function sr({ className: e, ...t }) {
|
|
3614
|
-
return /* @__PURE__ */ (0,
|
|
3614
|
+
return /* @__PURE__ */ (0, U.jsx)("div", {
|
|
3615
3615
|
"data-slot": "sheet-footer",
|
|
3616
3616
|
className: f("mt-auto flex flex-col gap-2 p-4", e),
|
|
3617
3617
|
...t
|
|
3618
3618
|
});
|
|
3619
3619
|
}
|
|
3620
3620
|
function cr({ className: e, ...t }) {
|
|
3621
|
-
return /* @__PURE__ */ (0,
|
|
3621
|
+
return /* @__PURE__ */ (0, U.jsx)(H.Title, {
|
|
3622
3622
|
"data-slot": "sheet-title",
|
|
3623
3623
|
className: f("font-semibold text-foreground", e),
|
|
3624
3624
|
...t
|
|
3625
3625
|
});
|
|
3626
3626
|
}
|
|
3627
3627
|
function lr({ className: e, ...t }) {
|
|
3628
|
-
return /* @__PURE__ */ (0,
|
|
3628
|
+
return /* @__PURE__ */ (0, U.jsx)(H.Description, {
|
|
3629
3629
|
"data-slot": "sheet-description",
|
|
3630
3630
|
className: f("text-muted-foreground text-sm", e),
|
|
3631
3631
|
...t
|
|
@@ -3634,50 +3634,50 @@ function lr({ className: e, ...t }) {
|
|
|
3634
3634
|
//#endregion
|
|
3635
3635
|
//#region src/editor/features/TreegeEditor/sheets/NodeActionsSheet.tsx
|
|
3636
3636
|
var ur = () => {
|
|
3637
|
-
let { selectedNode: e } = $(), { clearSelection: r, deleteSelectedNode: i } =
|
|
3637
|
+
let { selectedNode: e } = $(), { clearSelection: r, deleteSelectedNode: i } = K(), { isNodeSheetOpen: o, setIsNodeSheetOpen: s } = Mt(), l = W(), u = l(e?.data?.label), d = () => {
|
|
3638
3638
|
s(!1), r();
|
|
3639
3639
|
};
|
|
3640
|
-
return /* @__PURE__ */ (0,
|
|
3640
|
+
return /* @__PURE__ */ (0, U.jsx)(nr, {
|
|
3641
3641
|
open: o && !!e,
|
|
3642
3642
|
onOpenChange: (e) => {
|
|
3643
3643
|
e || d();
|
|
3644
3644
|
},
|
|
3645
|
-
children: /* @__PURE__ */ (0,
|
|
3645
|
+
children: /* @__PURE__ */ (0, U.jsxs)(ar, {
|
|
3646
3646
|
className: "flex flex-col gap-0",
|
|
3647
3647
|
children: [
|
|
3648
|
-
/* @__PURE__ */ (0,
|
|
3648
|
+
/* @__PURE__ */ (0, U.jsxs)(or, { children: [/* @__PURE__ */ (0, U.jsxs)(cr, { children: [
|
|
3649
3649
|
l("editor.nodeActionsSheet.editNode"),
|
|
3650
3650
|
" ",
|
|
3651
|
-
/* @__PURE__ */ (0,
|
|
3651
|
+
/* @__PURE__ */ (0, U.jsx)("span", {
|
|
3652
3652
|
className: "font-light text-muted-foreground text-xs",
|
|
3653
3653
|
children: e?.id
|
|
3654
3654
|
})
|
|
3655
|
-
] }), /* @__PURE__ */ (0,
|
|
3656
|
-
/* @__PURE__ */ (0,
|
|
3655
|
+
] }), /* @__PURE__ */ (0, U.jsx)(lr, { children: u || "\xA0" })] }),
|
|
3656
|
+
/* @__PURE__ */ (0, U.jsx)(Nt, {
|
|
3657
3657
|
className: "flex min-h-0 flex-1 flex-col px-4",
|
|
3658
|
-
children: /* @__PURE__ */ (0,
|
|
3658
|
+
children: /* @__PURE__ */ (0, U.jsxs)("div", {
|
|
3659
3659
|
className: "space-y-6 py-4",
|
|
3660
3660
|
children: [
|
|
3661
|
-
/* @__PURE__ */ (0,
|
|
3662
|
-
/* @__PURE__ */ (0,
|
|
3663
|
-
/* @__PURE__ */ (0,
|
|
3664
|
-
c(e) && /* @__PURE__ */ (0,
|
|
3665
|
-
n(e) && /* @__PURE__ */ (0,
|
|
3666
|
-
t(e) && /* @__PURE__ */ (0,
|
|
3667
|
-
a(e) && /* @__PURE__ */ (0,
|
|
3661
|
+
/* @__PURE__ */ (0, U.jsx)(tr, {}),
|
|
3662
|
+
/* @__PURE__ */ (0, U.jsx)(er, {}),
|
|
3663
|
+
/* @__PURE__ */ (0, U.jsx)(se, {}),
|
|
3664
|
+
c(e) && /* @__PURE__ */ (0, U.jsx)(Qn, {}),
|
|
3665
|
+
n(e) && /* @__PURE__ */ (0, U.jsx)($n, {}),
|
|
3666
|
+
t(e) && /* @__PURE__ */ (0, U.jsx)(Mn, {}),
|
|
3667
|
+
a(e) && /* @__PURE__ */ (0, U.jsx)(Nn, {})
|
|
3668
3668
|
]
|
|
3669
3669
|
})
|
|
3670
3670
|
}),
|
|
3671
|
-
/* @__PURE__ */ (0,
|
|
3671
|
+
/* @__PURE__ */ (0, U.jsx)(sr, {
|
|
3672
3672
|
className: "flex items-end border-t",
|
|
3673
|
-
children: /* @__PURE__ */ (0,
|
|
3673
|
+
children: /* @__PURE__ */ (0, U.jsxs)(Rt, { children: [/* @__PURE__ */ (0, U.jsx)(zt, {
|
|
3674
3674
|
asChild: !0,
|
|
3675
|
-
children: /* @__PURE__ */ (0,
|
|
3675
|
+
children: /* @__PURE__ */ (0, U.jsx)(m, {
|
|
3676
3676
|
variant: "ghost",
|
|
3677
3677
|
size: "icon",
|
|
3678
|
-
children: /* @__PURE__ */ (0,
|
|
3678
|
+
children: /* @__PURE__ */ (0, U.jsx)(mt, {})
|
|
3679
3679
|
})
|
|
3680
|
-
}), /* @__PURE__ */ (0,
|
|
3680
|
+
}), /* @__PURE__ */ (0, U.jsxs)(Ht, { children: [/* @__PURE__ */ (0, U.jsxs)(Ut, { children: [/* @__PURE__ */ (0, U.jsx)(Gt, { children: l("editor.nodeActionsSheet.deleteNode") }), /* @__PURE__ */ (0, U.jsx)(Kt, { children: l("editor.nodeActionsSheet.deleteNodeConfirm") })] }), /* @__PURE__ */ (0, U.jsxs)(Wt, { children: [/* @__PURE__ */ (0, U.jsx)(Jt, { children: l("common.cancel") }), /* @__PURE__ */ (0, U.jsx)(qt, {
|
|
3681
3681
|
onClick: () => {
|
|
3682
3682
|
i(), d();
|
|
3683
3683
|
},
|
|
@@ -3688,8 +3688,8 @@ var ur = () => {
|
|
|
3688
3688
|
})
|
|
3689
3689
|
});
|
|
3690
3690
|
}, dr = ({ ...e }) => {
|
|
3691
|
-
let { theme: t = "system" } =
|
|
3692
|
-
return /* @__PURE__ */ (0,
|
|
3691
|
+
let { theme: t = "system" } = Tt();
|
|
3692
|
+
return /* @__PURE__ */ (0, U.jsx)(Ct, {
|
|
3693
3693
|
theme: t,
|
|
3694
3694
|
className: "toaster group",
|
|
3695
3695
|
style: {
|
|
@@ -3700,13 +3700,13 @@ var ur = () => {
|
|
|
3700
3700
|
...e
|
|
3701
3701
|
});
|
|
3702
3702
|
}, fr = ({ flow: e, onExportJson: t, onSave: n, theme: r, className: i }) => {
|
|
3703
|
-
let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } =
|
|
3704
|
-
return /* @__PURE__ */ (0,
|
|
3703
|
+
let { onConnect: a, onConnectEnd: o, onEdgesDelete: s, isValidConnection: c } = on();
|
|
3704
|
+
return /* @__PURE__ */ (0, U.jsxs)(xe, {
|
|
3705
3705
|
fitView: !0,
|
|
3706
3706
|
colorMode: r,
|
|
3707
3707
|
selectNodesOnDrag: !1,
|
|
3708
3708
|
nodeTypes: vn,
|
|
3709
|
-
edgeTypes:
|
|
3709
|
+
edgeTypes: Ft,
|
|
3710
3710
|
defaultEdges: e?.edges || [],
|
|
3711
3711
|
defaultNodes: e?.nodes || [],
|
|
3712
3712
|
onConnect: a,
|
|
@@ -3715,31 +3715,31 @@ var ur = () => {
|
|
|
3715
3715
|
isValidConnection: c,
|
|
3716
3716
|
className: f(i, "treege"),
|
|
3717
3717
|
children: [
|
|
3718
|
-
/* @__PURE__ */ (0,
|
|
3718
|
+
/* @__PURE__ */ (0, U.jsx)(de, {
|
|
3719
3719
|
gap: 10,
|
|
3720
3720
|
variant: fe.Dots
|
|
3721
3721
|
}),
|
|
3722
|
-
/* @__PURE__ */ (0,
|
|
3722
|
+
/* @__PURE__ */ (0, U.jsx)(An, {
|
|
3723
3723
|
onExportJson: t,
|
|
3724
3724
|
onSave: n
|
|
3725
3725
|
}),
|
|
3726
|
-
/* @__PURE__ */ (0,
|
|
3727
|
-
/* @__PURE__ */ (0,
|
|
3728
|
-
/* @__PURE__ */ (0,
|
|
3729
|
-
/* @__PURE__ */ (0,
|
|
3726
|
+
/* @__PURE__ */ (0, U.jsx)(Ot, { theme: r }),
|
|
3727
|
+
/* @__PURE__ */ (0, U.jsx)(_e, {}),
|
|
3728
|
+
/* @__PURE__ */ (0, U.jsx)(me, {}),
|
|
3729
|
+
/* @__PURE__ */ (0, U.jsx)(ur, {})
|
|
3730
3730
|
]
|
|
3731
3731
|
});
|
|
3732
|
-
}, pr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ (0,
|
|
3732
|
+
}, pr = ({ flow: e, onExportJson: t, onSave: n, theme: r = "dark", language: i = "en", aiConfig: a }) => /* @__PURE__ */ (0, U.jsx)(s, {
|
|
3733
3733
|
defaultTheme: r,
|
|
3734
3734
|
storageKey: "treege-editor-theme",
|
|
3735
3735
|
theme: r,
|
|
3736
|
-
children: /* @__PURE__ */ (0,
|
|
3736
|
+
children: /* @__PURE__ */ (0, U.jsxs)(jt, {
|
|
3737
3737
|
value: {
|
|
3738
3738
|
aiConfig: a,
|
|
3739
3739
|
flowId: e?.id,
|
|
3740
3740
|
language: i
|
|
3741
3741
|
},
|
|
3742
|
-
children: [/* @__PURE__ */ (0,
|
|
3742
|
+
children: [/* @__PURE__ */ (0, U.jsx)(dr, { position: "bottom-center" }), /* @__PURE__ */ (0, U.jsx)(Se, { children: /* @__PURE__ */ (0, U.jsx)(fr, {
|
|
3743
3743
|
onExportJson: t,
|
|
3744
3744
|
onSave: n,
|
|
3745
3745
|
flow: e,
|