@keboola/design 4.3.2 → 5.0.0
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/AGENTS.md +68 -43
- package/COMPONENT-API.md +35 -6
- package/README.md +1 -1
- package/dist/charts.cjs +268 -0
- package/dist/charts.cjs.map +1 -0
- package/dist/charts.d.cts +181 -0
- package/dist/charts.d.ts +181 -0
- package/dist/charts.js +259 -0
- package/dist/charts.js.map +1 -0
- package/dist/editors.cjs +151 -77
- package/dist/editors.cjs.map +1 -1
- package/dist/editors.js +153 -79
- package/dist/editors.js.map +1 -1
- package/dist/index.cjs +2610 -1537
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +486 -467
- package/dist/index.d.ts +486 -467
- package/dist/index.js +2337 -1273
- package/dist/index.js.map +1 -1
- package/dist/markdown-editor.cjs +155 -119
- package/dist/markdown-editor.cjs.map +1 -1
- package/dist/markdown-editor.js +155 -119
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.cjs +62 -36
- package/dist/mermaid.cjs.map +1 -1
- package/dist/mermaid.js +63 -37
- package/dist/mermaid.js.map +1 -1
- package/dist/rjsf.cjs +10294 -0
- package/dist/rjsf.cjs.map +1 -0
- package/dist/rjsf.d.cts +55 -0
- package/dist/rjsf.d.ts +55 -0
- package/dist/rjsf.js +10256 -0
- package/dist/rjsf.js.map +1 -0
- package/dist/styles.css +4 -2
- package/dist/testing.cjs +238 -111
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +6 -0
- package/dist/testing.d.ts +6 -0
- package/dist/testing.js +240 -113
- package/dist/testing.js.map +1 -1
- package/package.json +51 -16
- package/src/styles.css +72 -30
package/dist/rjsf.d.cts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { RegistryWidgetsType, RegistryFieldsType } from '@rjsf/utils';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
type RenderMarkdown = (source: string) => ReactNode;
|
|
6
|
+
|
|
7
|
+
declare const RjsfSchemaEditor: ({ schema, value, onChange, readOnly, inForm, globalConfig, onRegisterValidate, widgets, fields, renderMarkdown, hasProtectedDefaultBranch, }: {
|
|
8
|
+
schema: Record<string, unknown>;
|
|
9
|
+
value: Record<string, unknown>;
|
|
10
|
+
onChange: (value: Record<string, unknown>) => void;
|
|
11
|
+
readOnly: boolean;
|
|
12
|
+
inForm?: boolean;
|
|
13
|
+
/** Pre-filled values from image_parameters.global_config — matching fields are disabled. */
|
|
14
|
+
globalConfig?: Record<string, unknown> | null;
|
|
15
|
+
/** Called with a validate function that triggers RJSF schema validation and shows errors inline.
|
|
16
|
+
* Returns true when valid, false when there are errors. */
|
|
17
|
+
onRegisterValidate?: (validate: () => boolean) => void;
|
|
18
|
+
/** Host-app widgets merged over the built-in registry (e.g. sync-action, async-select). */
|
|
19
|
+
widgets?: RegistryWidgetsType;
|
|
20
|
+
/** Host-app fields merged over the built-in registry (e.g. sshForm). */
|
|
21
|
+
fields?: RegistryFieldsType;
|
|
22
|
+
/** Renders markdown help texts (tooltips, sync-action results). Defaults to plain text. */
|
|
23
|
+
renderMarkdown?: RenderMarkdown;
|
|
24
|
+
/** When true, password fields render as plain text inputs (protected default branch). */
|
|
25
|
+
hasProtectedDefaultBranch?: boolean;
|
|
26
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare const useRootFormData: () => Record<string, unknown>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Shared helpers for RJSF custom fields and widgets.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Resolves a dot-path against an object (e.g. "_metadata_.table.columns").
|
|
36
|
+
*
|
|
37
|
+
* json-editor watch paths may be prefixed with the schema `id` (e.g.
|
|
38
|
+
* "rootschema.endpoints.contact"). The prefix is not a real data key — it
|
|
39
|
+
* identifies the schema root. When the first segment doesn't exist in `data`
|
|
40
|
+
* we retry without it so components using this convention still resolve.
|
|
41
|
+
*/
|
|
42
|
+
declare const resolveByPath: (path: string, data: Record<string, unknown>) => unknown;
|
|
43
|
+
/**
|
|
44
|
+
* Builds select options from watched form data and enumSource config.
|
|
45
|
+
*
|
|
46
|
+
* Supports two json-editor enumSource formats:
|
|
47
|
+
* 1. String: `enumSource: "varName"` — use the watched array directly as string values
|
|
48
|
+
* 2. Array: `enumSource: [{ source, value, title }]` — map items through templates
|
|
49
|
+
*/
|
|
50
|
+
declare const buildDynamicOptions: (watch: Record<string, string>, enumSource: unknown, rootFormData: Record<string, unknown>) => {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}[];
|
|
54
|
+
|
|
55
|
+
export { type RenderMarkdown, RjsfSchemaEditor, buildDynamicOptions, resolveByPath, useRootFormData };
|
package/dist/rjsf.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { RegistryWidgetsType, RegistryFieldsType } from '@rjsf/utils';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
type RenderMarkdown = (source: string) => ReactNode;
|
|
6
|
+
|
|
7
|
+
declare const RjsfSchemaEditor: ({ schema, value, onChange, readOnly, inForm, globalConfig, onRegisterValidate, widgets, fields, renderMarkdown, hasProtectedDefaultBranch, }: {
|
|
8
|
+
schema: Record<string, unknown>;
|
|
9
|
+
value: Record<string, unknown>;
|
|
10
|
+
onChange: (value: Record<string, unknown>) => void;
|
|
11
|
+
readOnly: boolean;
|
|
12
|
+
inForm?: boolean;
|
|
13
|
+
/** Pre-filled values from image_parameters.global_config — matching fields are disabled. */
|
|
14
|
+
globalConfig?: Record<string, unknown> | null;
|
|
15
|
+
/** Called with a validate function that triggers RJSF schema validation and shows errors inline.
|
|
16
|
+
* Returns true when valid, false when there are errors. */
|
|
17
|
+
onRegisterValidate?: (validate: () => boolean) => void;
|
|
18
|
+
/** Host-app widgets merged over the built-in registry (e.g. sync-action, async-select). */
|
|
19
|
+
widgets?: RegistryWidgetsType;
|
|
20
|
+
/** Host-app fields merged over the built-in registry (e.g. sshForm). */
|
|
21
|
+
fields?: RegistryFieldsType;
|
|
22
|
+
/** Renders markdown help texts (tooltips, sync-action results). Defaults to plain text. */
|
|
23
|
+
renderMarkdown?: RenderMarkdown;
|
|
24
|
+
/** When true, password fields render as plain text inputs (protected default branch). */
|
|
25
|
+
hasProtectedDefaultBranch?: boolean;
|
|
26
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
declare const useRootFormData: () => Record<string, unknown>;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Shared helpers for RJSF custom fields and widgets.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Resolves a dot-path against an object (e.g. "_metadata_.table.columns").
|
|
36
|
+
*
|
|
37
|
+
* json-editor watch paths may be prefixed with the schema `id` (e.g.
|
|
38
|
+
* "rootschema.endpoints.contact"). The prefix is not a real data key — it
|
|
39
|
+
* identifies the schema root. When the first segment doesn't exist in `data`
|
|
40
|
+
* we retry without it so components using this convention still resolve.
|
|
41
|
+
*/
|
|
42
|
+
declare const resolveByPath: (path: string, data: Record<string, unknown>) => unknown;
|
|
43
|
+
/**
|
|
44
|
+
* Builds select options from watched form data and enumSource config.
|
|
45
|
+
*
|
|
46
|
+
* Supports two json-editor enumSource formats:
|
|
47
|
+
* 1. String: `enumSource: "varName"` — use the watched array directly as string values
|
|
48
|
+
* 2. Array: `enumSource: [{ source, value, title }]` — map items through templates
|
|
49
|
+
*/
|
|
50
|
+
declare const buildDynamicOptions: (watch: Record<string, string>, enumSource: unknown, rootFormData: Record<string, unknown>) => {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}[];
|
|
54
|
+
|
|
55
|
+
export { type RenderMarkdown, RjsfSchemaEditor, buildDynamicOptions, resolveByPath, useRootFormData };
|