treege 3.0.0-beta.60 → 3.0.0-beta.61
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/README.md +46 -46
- package/dist/DefaultInputs-DamDWb5R.js +1988 -0
- package/dist/{ThemeContext-Ddk_Y-Dz.js → ThemeContext-cGSTk24y.js} +121 -126
- package/dist/editor/context/TreegeEditorRuntimeProvider.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/dialogs/AuthorizeDialog.d.ts +3 -3
- package/dist/editor/features/TreegeEditor/dialogs/HeadersDialog.d.ts +3 -3
- package/dist/editor/features/TreegeEditor/forms/OptionsMappingFields.d.ts +3 -3
- package/dist/editor/features/TreegeEditor/forms/SensitiveHeaderWarning.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +4 -4
- package/dist/editor/hooks/useKeyValueRows.d.ts +15 -0
- package/dist/editor/types/editor.d.ts +4 -10
- package/dist/editor/utils/sensitiveHeaders.d.ts +8 -3
- package/dist/{editor-D2pBjE7E.js → editor-DtAQNPJm.js} +1350 -1324
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/context/TreegeRenderRuntimeProvider.d.ts +3 -3
- package/dist/renderer/features/TreegeRenderer/native/components/OptionItemContent.d.ts +17 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/OptionItemContent.d.ts +17 -0
- package/dist/renderer/hooks/useSubmitHandler.d.ts +2 -2
- package/dist/renderer/types/renderer.d.ts +5 -2
- package/dist/renderer/utils/http.d.ts +14 -5
- package/dist/renderer/utils/submit.d.ts +2 -2
- package/dist/renderer-native.js +1114 -1080
- package/dist/renderer.js +3 -3
- package/dist/shared/components/ui/item.d.ts +23 -0
- package/dist/shared/components/ui/popover.d.ts +7 -1
- package/dist/shared/context/PortalContainerContext.d.ts +5 -0
- package/dist/shared/types/node.d.ts +26 -26
- package/dist/shared/utils/httpRecord.d.ts +20 -0
- package/package.json +1 -1
- package/dist/DefaultInputs-nRQc9BHG.js +0 -1881
package/dist/renderer.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as x, E as S, S as C, T as w, _ as T, a as E, b as D, d as O, f as k, i as A, l as j, m as M, n as N, p as P, r as F, s as I, t as L, u as R, v as z, w as B, x as V, y as H } from "./DefaultInputs-
|
|
3
|
-
export { S as DefaultAddressInput, w as DefaultAutocompleteInput, B as DefaultCheckboxInput, x as DefaultDateInput, C as DefaultDateRangeInput, V as DefaultFileInput, D as DefaultHiddenInput, H as DefaultHttpInput, z as DefaultNumberInput, T as DefaultPasswordInput, M as DefaultRadioInput, P as DefaultSelectInput, I as DefaultSwitchInput, E as DefaultTextAreaInput, A as DefaultTextInput, F as DefaultTimeInput, N as DefaultTimeRangeInput, R as Divider,
|
|
1
|
+
import { B as e, M as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, j as u, l as d, m as f, n as p, o as m, p as h, s as g, t as _, u as v, x as y, y as b } from "./ThemeContext-cGSTk24y.js";
|
|
2
|
+
import { C as x, E as S, S as C, T as w, _ as T, a as E, b as D, d as O, f as k, i as A, l as j, m as M, n as N, p as P, r as F, s as I, t as L, u as R, v as z, w as B, x as V, y as H } from "./DefaultInputs-DamDWb5R.js";
|
|
3
|
+
export { S as DefaultAddressInput, w as DefaultAutocompleteInput, B as DefaultCheckboxInput, x as DefaultDateInput, C as DefaultDateRangeInput, V as DefaultFileInput, D as DefaultHiddenInput, H as DefaultHttpInput, z as DefaultNumberInput, T as DefaultPasswordInput, M as DefaultRadioInput, P as DefaultSelectInput, I as DefaultSwitchInput, E as DefaultTextAreaInput, A as DefaultTextInput, F as DefaultTimeInput, N as DefaultTimeRangeInput, R as Divider, _ as ThemeProvider, O as Title, j as TreegeRenderer, v as TreegeRendererProvider, o as applyReferenceTransformation, h as calculateReferenceFieldUpdates, f as checkFormFieldHasValue, c as convertFormValuesToNamedFormat, L as defaultInputRenderers, k as defaultUI, i as evaluateCondition, d as evaluateConditions, b as fileToSerializable, r as filesToSerializable, n as findStartNode, m as getFlowRenderState, e as getTranslatedText, s as isFieldEmpty, g as isStartNode, u as sanitize, t as sanitizeHttpResponse, y as serializableToFile, p as useTheme, l as useTreegeRenderer, a as useTreegeRendererConfig };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Separator } from './separator';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const itemVariants: (props?: ({
|
|
7
|
+
size?: "default" | "sm" | null | undefined;
|
|
8
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const itemMediaVariants: (props?: ({
|
|
14
|
+
variant?: "default" | "image" | "icon" | null | undefined;
|
|
15
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
16
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
@@ -2,8 +2,14 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function PopoverContent({ className, align, sideOffset, disablePortal, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, disablePortal, container, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
6
6
|
disablePortal?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Element to portal the content into. Defaults to the nearest
|
|
9
|
+
* `PortalContainerProvider` (the editor root, or an enclosing Sheet/Dialog),
|
|
10
|
+
* falling back to `document.body`. Ignored when `disablePortal` is set.
|
|
11
|
+
*/
|
|
12
|
+
container?: HTMLElement | null;
|
|
7
13
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
14
|
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
9
15
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare const usePortalContainer: () => HTMLElement | null;
|
|
3
|
+
export declare const PortalContainerProvider: ({ container, children }: PropsWithChildren<{
|
|
4
|
+
container: HTMLElement | null;
|
|
5
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -44,26 +44,18 @@ export type GroupNodeData = BaseNodeData & {
|
|
|
44
44
|
*/
|
|
45
45
|
label: Translatable;
|
|
46
46
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
* The query parameter key (e.g., "limit", "page", "sort")
|
|
60
|
-
*/
|
|
61
|
-
key: string;
|
|
62
|
-
/**
|
|
63
|
-
* The query parameter value (supports template variables like {{fieldId}})
|
|
64
|
-
*/
|
|
65
|
-
value: string;
|
|
66
|
-
};
|
|
47
|
+
/**
|
|
48
|
+
* HTTP headers as a plain object keyed by header name, e.g.
|
|
49
|
+
* `{ Authorization: "Bearer xyz", "Content-Type": "application/json" }`.
|
|
50
|
+
* Values support template variables like `{{fieldId}}`.
|
|
51
|
+
*/
|
|
52
|
+
export type HttpHeaders = Record<string, string>;
|
|
53
|
+
/**
|
|
54
|
+
* Query parameters as a plain object keyed by parameter name, e.g.
|
|
55
|
+
* `{ limit: "10", sort: "asc" }`. Values support template variables like
|
|
56
|
+
* `{{fieldId}}`.
|
|
57
|
+
*/
|
|
58
|
+
export type QueryParams = Record<string, string>;
|
|
67
59
|
export type HttpConfig = {
|
|
68
60
|
/**
|
|
69
61
|
* The HTTP method to use
|
|
@@ -76,11 +68,11 @@ export type HttpConfig = {
|
|
|
76
68
|
/**
|
|
77
69
|
* Custom headers for the HTTP request
|
|
78
70
|
*/
|
|
79
|
-
headers?:
|
|
71
|
+
headers?: HttpHeaders;
|
|
80
72
|
/**
|
|
81
73
|
* Query parameters appended to the URL (supports template variables like {{fieldId}})
|
|
82
74
|
*/
|
|
83
|
-
queryParams?:
|
|
75
|
+
queryParams?: QueryParams;
|
|
84
76
|
/**
|
|
85
77
|
* Request body (for POST/PUT/PATCH methods)
|
|
86
78
|
*/
|
|
@@ -106,6 +98,14 @@ export type HttpConfig = {
|
|
|
106
98
|
* Path to the label field in response items
|
|
107
99
|
*/
|
|
108
100
|
labelField?: string;
|
|
101
|
+
/**
|
|
102
|
+
* Path to the field used as the option description (optional)
|
|
103
|
+
*/
|
|
104
|
+
descriptionField?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Path to the field used as the option image — base64 data URL or remote URL (optional)
|
|
107
|
+
*/
|
|
108
|
+
imageField?: string;
|
|
109
109
|
};
|
|
110
110
|
/**
|
|
111
111
|
* Query parameter name for search (enables combobox with search)
|
|
@@ -146,9 +146,9 @@ export type OptionsSource = {
|
|
|
146
146
|
/** HTTP method */
|
|
147
147
|
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
148
148
|
/** Custom headers (merged with global headers; field-level wins) */
|
|
149
|
-
headers?:
|
|
149
|
+
headers?: HttpHeaders;
|
|
150
150
|
/** Query parameters appended to the URL (supports template variables like {{fieldId}}) */
|
|
151
|
-
queryParams?:
|
|
151
|
+
queryParams?: QueryParams;
|
|
152
152
|
/** Request body (for POST/PUT/PATCH; supports template variables) */
|
|
153
153
|
body?: string;
|
|
154
154
|
/** JSONPath to extract the array from the response (e.g., "data.users") */
|
|
@@ -168,11 +168,11 @@ export type SubmitConfig = {
|
|
|
168
168
|
/**
|
|
169
169
|
* Custom headers for the HTTP request
|
|
170
170
|
*/
|
|
171
|
-
headers?:
|
|
171
|
+
headers?: HttpHeaders;
|
|
172
172
|
/**
|
|
173
173
|
* Query parameters appended to the URL (supports template variables like {{fieldId}})
|
|
174
174
|
*/
|
|
175
|
-
queryParams?:
|
|
175
|
+
queryParams?: QueryParams;
|
|
176
176
|
/**
|
|
177
177
|
* Request body (for POST/PUT/PATCH methods, supports template variables like {{fieldId}})
|
|
178
178
|
* Strings are automatically quoted, use: {"name": {{userName}}}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single editable key/value row. Editor forms work on lists of these while
|
|
3
|
+
* the user types (they tolerate transient empty keys), then serialize back to
|
|
4
|
+
* the persisted `Record<string, string>` form via `entriesToRecord`.
|
|
5
|
+
*/
|
|
6
|
+
export type KeyValueEntry = {
|
|
7
|
+
key: string;
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Expand a `{ key: value }` record into editor rows, preserving insertion
|
|
12
|
+
* order. Returns an empty list for `undefined`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const recordToEntries: (record?: Record<string, string>) => KeyValueEntry[];
|
|
15
|
+
/**
|
|
16
|
+
* Collapse editor rows back into a `{ key: value }` record. Rows with an empty
|
|
17
|
+
* key are dropped (they're transient editing artifacts), and on duplicate keys
|
|
18
|
+
* the last occurrence wins.
|
|
19
|
+
*/
|
|
20
|
+
export declare const entriesToRecord: (entries?: KeyValueEntry[]) => Record<string, string>;
|