@gravitee/graphene-core 3.43.0 → 3.44.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/USAGE_GUIDE.md +13 -0
- package/dist/CodeEditorField-DiY1yxIw.js +56 -0
- package/dist/{SchemaBanner-B4C-TVbq.js → SchemaBanner-B1K0h90b.js} +7 -2
- package/dist/base/Resizable/Resizable.d.ts +9 -4
- package/dist/base/Resizable/Resizable.d.ts.map +1 -1
- package/dist/base/Sidebar/Sidebar.d.ts +2 -0
- package/dist/base/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts +6 -1
- package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/array/ArrayField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/array/HeadersArrayField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/boolean/BooleanField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/enum/EnumField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/enum/MultiSelectField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/number/NumberField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/oneOf/OneOfField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/resource/ResourceTypeField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/string/StringField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/models/JsonSchemaFormContext.d.ts +2 -0
- package/dist/composed/JsonSchemaForm/models/JsonSchemaFormContext.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/utils/testIds.d.ts +8 -0
- package/dist/composed/JsonSchemaForm/utils/testIds.d.ts.map +1 -0
- package/dist/index.js +7505 -7435
- package/dist/styles/globals.css +1 -1
- package/package.json +1 -1
- package/dist/CodeEditorField-B5QDl5Zv.js +0 -52
package/USAGE_GUIDE.md
CHANGED
|
@@ -1099,6 +1099,19 @@ The components that derive ids from yours. A part exists only when you pass an i
|
|
|
1099
1099
|
| `ElCheatSheetTrigger` | `${id}-copy-<key>` | Copy button of an example: `plan-level`, `path-prefix` or `attribute-lookup` |
|
|
1100
1100
|
| `CodeEditor` | `${id}-loading` | Skeleton, while Monaco loads |
|
|
1101
1101
|
| `CodeEditor` | `${id}-fallback` | Plain textarea, when Monaco fails to load |
|
|
1102
|
+
| `JsonSchemaForm` | `${id}-<path>` | The control of the field at the react-hook-form path, verbatim (`headers.0.name`); a code editor field: its container, with `-loading` while Monaco loads and `-fallback` when it fails |
|
|
1103
|
+
| `JsonSchemaForm` | `${id}-<path>-error` | The field's error, once it has one |
|
|
1104
|
+
| `JsonSchemaForm` | `${id}-<path>-option-<value>` | Select and multi-select items, `String(value)` verbatim; resource items use the resource name |
|
|
1105
|
+
| `JsonSchemaForm` | `${id}-<path>-chip-<value>` | Multi-select chip; its remove button is `-chip-<value>-remove` |
|
|
1106
|
+
| `JsonSchemaForm` | `${id}-<path>-toggle` | Visibility toggle of a `format: 'password'` field |
|
|
1107
|
+
| `JsonSchemaForm` | `${id}-<path>-el` | EL cheat sheet trigger of a `gioConfig.el` field (`-el-content`, `-el-copy-<key>`) |
|
|
1108
|
+
| `JsonSchemaForm` | `${id}-<path>-add` | Array add button |
|
|
1109
|
+
| `JsonSchemaForm` | `${id}-<path>.<i>-remove` | Array item remove button; `<i>` is the item's position |
|
|
1110
|
+
| `JsonSchemaForm` | `${id}-<path>.<i>-toggle` | Array item row toggle, object items only; `<i>` is the item's position |
|
|
1111
|
+
| `JsonSchemaForm` | `${id}-<path>-variant` | `oneOf` / `anyOf` variant selector; its items are `-variant-option-<index>`, by position |
|
|
1112
|
+
| `JsonSchemaForm` | `${id}-schema-error` | The invalid schema alert |
|
|
1113
|
+
|
|
1114
|
+
`JsonSchemaForm` renders no element of its own, so its id is only a prefix. A field at the root path is `${id}`, and its error `${id}-error`.
|
|
1102
1115
|
|
|
1103
1116
|
The `Calendar` day keys are dates as react-day-picker formats them: they assume react-day-picker's default `numerals` (`latn`) and no `dateLib` override (Gregorian calendar); the `locale` doesn't change them. The dropdown keys are positions: navigating or picking a month doesn't change them. A `Calendar` part you replace through `components` gets no id. Replacing `MonthCaption` also drops the `month` and `year` ids, even though the dropdowns still render.
|
|
1104
1117
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { _ as e, c as t, g as n, i as r, m as i, n as a, o, t as s, u as c, y as l } from "./SchemaBanner-B1K0h90b.js";
|
|
2
|
+
import { t as u } from "./CodeEditor-C44Pe2i6.js";
|
|
3
|
+
import { useEffect as d, useRef as f, useState as p } from "react";
|
|
4
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
5
|
+
//#region src/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.tsx
|
|
6
|
+
var g = 250;
|
|
7
|
+
function _(e) {
|
|
8
|
+
if (typeof e != "string" || e.trim() === "") return !1;
|
|
9
|
+
try {
|
|
10
|
+
return JSON.parse(e), !0;
|
|
11
|
+
} catch {
|
|
12
|
+
return !1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function v({ node: v, name: y }) {
|
|
16
|
+
let { control: b, basePath: x, disabled: S, testIdPrefix: C } = t(), { schema: w } = v, T = y ? x ? `${x}.${y}` : y : x, { field: E, fieldState: D } = c({
|
|
17
|
+
control: b,
|
|
18
|
+
name: T
|
|
19
|
+
}), O = r(w, y), k = D.invalid, A = typeof E.value == "string" ? E.value : "", [j] = p(() => A), M = w.gioConfig?.monacoEditorConfig?.language ?? (_(j) ? "json" : "plaintext"), N = f(E.onBlur);
|
|
20
|
+
d(() => {
|
|
21
|
+
N.current = E.onBlur;
|
|
22
|
+
});
|
|
23
|
+
let P = f(null);
|
|
24
|
+
return d(() => () => {
|
|
25
|
+
P.current?.dispose(), P.current = null;
|
|
26
|
+
}, []), /* @__PURE__ */ h(i, {
|
|
27
|
+
"data-invalid": k,
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ m(l, {
|
|
30
|
+
htmlFor: T,
|
|
31
|
+
required: w.isRequired,
|
|
32
|
+
children: O
|
|
33
|
+
}),
|
|
34
|
+
w.gioConfig?.banner && /* @__PURE__ */ m(s, { banner: w.gioConfig.banner }),
|
|
35
|
+
/* @__PURE__ */ m(u, {
|
|
36
|
+
value: A,
|
|
37
|
+
language: M,
|
|
38
|
+
height: w.gioConfig?.monacoEditorConfig?.height ?? g,
|
|
39
|
+
onChange: (e) => E.onChange(e ?? ""),
|
|
40
|
+
readOnly: w.readOnly === !0,
|
|
41
|
+
disabled: S,
|
|
42
|
+
"data-testid": a(C, T),
|
|
43
|
+
onMount: (e) => {
|
|
44
|
+
P.current?.dispose(), P.current = e.onDidBlurEditorText(() => N.current());
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
w.description && /* @__PURE__ */ m(n, { children: w.description }),
|
|
48
|
+
/* @__PURE__ */ m(e, {
|
|
49
|
+
errors: o(D.error),
|
|
50
|
+
"data-testid": a(C, T, "error")
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { v as CodeEditorField };
|
|
@@ -1014,8 +1014,13 @@ function wt(e, t) {
|
|
|
1014
1014
|
return typeof e.title == "string" && e.title.length > 0 ? e.title : St(t);
|
|
1015
1015
|
}
|
|
1016
1016
|
//#endregion
|
|
1017
|
+
//#region src/composed/JsonSchemaForm/utils/testIds.ts
|
|
1018
|
+
function Tt(e, ...t) {
|
|
1019
|
+
if (e) return [e, ...t.filter((e) => e !== void 0 && e !== "")].join("-");
|
|
1020
|
+
}
|
|
1021
|
+
//#endregion
|
|
1017
1022
|
//#region src/composed/JsonSchemaForm/fields/banner/SchemaBanner.tsx
|
|
1018
|
-
function
|
|
1023
|
+
function Et({ banner: e }) {
|
|
1019
1024
|
let t = "title" in e ? e.title : void 0;
|
|
1020
1025
|
return /* @__PURE__ */ u(de, {
|
|
1021
1026
|
role: "note",
|
|
@@ -1034,4 +1039,4 @@ function Tt({ banner: e }) {
|
|
|
1034
1039
|
});
|
|
1035
1040
|
}
|
|
1036
1041
|
//#endregion
|
|
1037
|
-
export {
|
|
1042
|
+
export { le as A, we as C, me as D, de as E, h as F, y as I, p as L, C as M, ee as N, pe as O, g as P, m as R, _e as S, he as T, De as _, xt as a, ve as b, yt as c, _t as d, Re as f, Te as g, Se as h, wt as i, D as j, fe as k, R as l, xe as m, Tt as n, bt as o, He as p, Ct as r, vt as s, Et as t, Ue as u, ye as v, ge as w, Ee as x, Ce as y };
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
interface TestIdProps {
|
|
4
|
+
/** Lands on the part's element, even when an `id` is passed. */
|
|
5
|
+
readonly 'data-testid'?: string;
|
|
6
|
+
}
|
|
7
|
+
declare function ResizablePanelGroup({ className, elementRef, 'data-testid': testId, ...props }: ResizablePrimitive.GroupProps & TestIdProps): React.JSX.Element;
|
|
8
|
+
declare function ResizablePanel({ elementRef, 'data-testid': testId, ...props }: ResizablePrimitive.PanelProps & TestIdProps): React.JSX.Element;
|
|
9
|
+
declare function ResizableHandle({ withHandle, className, elementRef, 'data-testid': testId, ...props }: ResizablePrimitive.SeparatorProps & TestIdProps & {
|
|
5
10
|
readonly withHandle?: boolean;
|
|
6
|
-
}):
|
|
11
|
+
}): React.JSX.Element;
|
|
7
12
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
8
13
|
//# sourceMappingURL=Resizable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../../src/base/Resizable/Resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAG7D,iBAAS,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"Resizable.d.ts","sourceRoot":"","sources":["../../../src/base/Resizable/Resizable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAG7D,UAAU,WAAW;IACnB,gEAAgE;IAChE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AA0CD,iBAAS,mBAAmB,CAAC,EAC3B,SAAS,EACT,UAAU,EACV,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,UAAU,GAAG,WAAW,qBAU7C;AAED,iBAAS,cAAc,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,UAAU,GAAG,WAAW,qBAGnH;AAED,iBAAS,eAAe,CAAC,EACvB,UAAU,EACV,SAAS,EACT,UAAU,EACV,aAAa,EAAE,MAAM,EACrB,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,cAAc,GAClC,WAAW,GAAG;IACZ,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC/B,qBAeF;AAED,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -23,6 +23,8 @@ declare function Sidebar({ side, variant, collapsible, className, children, dir,
|
|
|
23
23
|
side?: 'left' | 'right';
|
|
24
24
|
variant?: 'sidebar' | 'floating' | 'inset';
|
|
25
25
|
collapsible?: 'offcanvas' | 'icon' | 'none';
|
|
26
|
+
/** Lands on the container on desktop, on the root with `collapsible="none"`, and on the sheet content on mobile. */
|
|
27
|
+
'data-testid'?: string;
|
|
26
28
|
}): React.JSX.Element;
|
|
27
29
|
declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): React.JSX.Element;
|
|
28
30
|
declare function SidebarRail({ className, ...props }: React.ComponentProps<'button'>): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/base/Sidebar/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAGnE,OAAO,EAAW,cAAc,EAAmC,MAAM,sCAAsC,CAAC;AAYhH,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,UAAU,GAAG,WAAW,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B,CAAC;AAIF,iBAAS,UAAU,wBAOlB;AAED,iBAAS,eAAe,CAAC,EACvB,WAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,WAAW,EACzB,SAAS,EACT,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,qBA8EA;AAED,iB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nB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,qBAgBA;AAED,OAAO,EACL,OAAO,EACP,cAAc,EACd,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,CAAC"}
|
|
@@ -6,8 +6,13 @@ interface JsonSchemaFormProps {
|
|
|
6
6
|
readonly name?: string;
|
|
7
7
|
readonly disabled?: boolean;
|
|
8
8
|
readonly context?: Record<string, unknown>;
|
|
9
|
+
/**
|
|
10
|
+
* Prefix of the generated ids, on no element of its own. Each control is `${id}-${path}`, with the
|
|
11
|
+
* react-hook-form path verbatim (`${id}-headers.0.name`); its parts follow (`-error`, `-add`, …).
|
|
12
|
+
*/
|
|
13
|
+
readonly 'data-testid'?: string;
|
|
9
14
|
}
|
|
10
|
-
declare function JsonSchemaForm({ schema, control, name, disabled, context }: JsonSchemaFormProps): import("react").JSX.Element;
|
|
15
|
+
declare function JsonSchemaForm({ schema, control, name, disabled, context, 'data-testid': testIdPrefix, }: JsonSchemaFormProps): import("react").JSX.Element;
|
|
11
16
|
export { JsonSchemaForm };
|
|
12
17
|
export type { JsonSchemaFormProps };
|
|
13
18
|
//# sourceMappingURL=JsonSchemaForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonSchemaForm.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/JsonSchemaForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"JsonSchemaForm.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/JsonSchemaForm.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAI7D,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,iBAAS,cAAc,CAAC,EACtB,MAAM,EACN,OAAO,EACP,IAAS,EACT,QAAgB,EAChB,OAAO,EACP,aAAa,EAAE,YAAY,GAC5B,EAAE,mBAAmB,+BAwCrB;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/array/ArrayField.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ArrayField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/array/ArrayField.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAarD,UAAU,eAAe;IACvB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAWD,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,+BAmGzD;AA+ID,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadersArrayField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/array/HeadersArrayField.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"HeadersArrayField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/array/HeadersArrayField.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAYrD,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAKD,iBAAS,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,sBAAsB,+BAmFvE;AA4FD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/boolean/BooleanField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"BooleanField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/boolean/BooleanField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,iBAAiB,+BA4CnE;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeEditorField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"CodeEditorField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/code-editor/CodeEditorField.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAoBD,iBAAS,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,oBAAoB,+BAuD5D;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnumField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/enum/EnumField.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"EnumField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/enum/EnumField.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAQrD,UAAU,cAAc;IACtB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,iBAAS,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,cAAc,+BAuD7D;AAWD,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/enum/MultiSelectField.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"MultiSelectField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/enum/MultiSelectField.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOrD,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,iBAAS,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,qBAAqB,+BA6F9D;AA2BD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/number/NumberField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"NumberField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/number/NumberField.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,iBAAS,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,gBAAgB,+BAiEjE;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OneOfField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/oneOf/OneOfField.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"OneOfField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/oneOf/OneOfField.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD,UAAU,eAAe;IACvB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,eAAe,sCAsHnD;AAiBD,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceTypeField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/resource/ResourceTypeField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"ResourceTypeField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/resource/ResourceTypeField.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOrD,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAqBD,iBAAS,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,sBAAsB,+BAQhE;AAyFD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/string/StringField.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"StringField.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/string/StringField.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAOD,iBAAS,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,gBAAgB,+BA6DjE;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -5,6 +5,8 @@ interface JsonSchemaFormContextValue {
|
|
|
5
5
|
readonly basePath: string;
|
|
6
6
|
readonly disabled: boolean;
|
|
7
7
|
readonly externalContext?: Record<string, unknown>;
|
|
8
|
+
/** The consumer's `data-testid`: each part's id is `${testIdPrefix}-${path}…` (see `formTestId`). */
|
|
9
|
+
readonly testIdPrefix?: string;
|
|
8
10
|
/**
|
|
9
11
|
* Pre-computed index of the form's schema. Field components can query `index.nodeByPath` or
|
|
10
12
|
* call `effectiveSchemaAt(index, path, data)` to get their local schema in O(1), instead of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonSchemaFormContext.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/models/JsonSchemaFormContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,UAAU,0BAA0B;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"JsonSchemaFormContext.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/models/JsonSchemaFormContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,UAAU,0BAA0B;IAClC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnD,qGAAqG;IACrG,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAE/B;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B;AAED,QAAA,MAAM,qBAAqB,4DAAyD,CAAC;AAErF,iBAAS,wBAAwB,IAAI,0BAA0B,CAM9D;AAED,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;AAC3D,YAAY,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The test id of a part of the form: the consumer's prefix, then the segments, joined by `-`. The react-hook-form
|
|
3
|
+
* path is one segment, kept verbatim (`headers.0.name`). Empty segments are dropped, so the root path gives
|
|
4
|
+
* `${prefix}-error`, not `${prefix}--error`. No prefix, no id.
|
|
5
|
+
*/
|
|
6
|
+
declare function formTestId(prefix: string | undefined, ...segments: readonly (string | undefined)[]): string | undefined;
|
|
7
|
+
export { formTestId };
|
|
8
|
+
//# sourceMappingURL=testIds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testIds.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/utils/testIds.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,iBAAS,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,QAAQ,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,GAAG,SAAS,CAGhH;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|