@gravitee/graphene-core 3.52.0-fix-found-460-validation-scope.dfd2452 → 3.52.0-fix-copyable-text-clipboard-fallback.85361ce
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/composed/CopyableText/CopyableText.d.ts +4 -2
- package/dist/composed/CopyableText/CopyableText.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts +1 -21
- package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/SchemaField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/conditional/concretizePath.d.ts +1 -1
- package/dist/composed/JsonSchemaForm/fields/oneOf/OneOfField.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/form-bindings/extractDefaults.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/form-bindings/jsonSchemaResolver.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/form-bindings/pruneHiddenValues.d.ts +3 -5
- package/dist/composed/JsonSchemaForm/form-bindings/pruneHiddenValues.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/form-bindings/resolveAt.d.ts +5 -11
- package/dist/composed/JsonSchemaForm/form-bindings/resolveAt.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/index.d.ts +0 -3
- package/dist/composed/JsonSchemaForm/index.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/models/JsonSchemaFormContext.d.ts +3 -7
- package/dist/composed/JsonSchemaForm/models/JsonSchemaFormContext.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/models/jsonSchemaResolver.types.d.ts +0 -2
- package/dist/composed/JsonSchemaForm/models/jsonSchemaResolver.types.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/schema/buildIndex.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/schema/types.d.ts +5 -6
- package/dist/composed/JsonSchemaForm/schema/types.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/utils/pickActiveVariant.d.ts +3 -3
- package/dist/composed/JsonSchemaForm/utils/pickActiveVariant.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/utils/readPath.d.ts +2 -1
- package/dist/composed/JsonSchemaForm/utils/readPath.d.ts.map +1 -1
- package/dist/index.js +1157 -2197
- package/package.json +2 -2
- package/dist/composed/JsonSchemaForm/fields/__test-utils__/errorVisibility.d.ts +0 -39
- package/dist/composed/JsonSchemaForm/fields/__test-utils__/errorVisibility.d.ts.map +0 -1
- package/dist/composed/JsonSchemaForm/form-bindings/applyVisibleDefaults.d.ts +0 -49
- package/dist/composed/JsonSchemaForm/form-bindings/applyVisibleDefaults.d.ts.map +0 -1
- package/dist/composed/JsonSchemaForm/form-bindings/hiddenFormErrors.d.ts +0 -38
- package/dist/composed/JsonSchemaForm/form-bindings/hiddenFormErrors.d.ts.map +0 -1
- package/dist/composed/JsonSchemaForm/form-bindings/indexSchemaRoot.d.ts +0 -6
- package/dist/composed/JsonSchemaForm/form-bindings/indexSchemaRoot.d.ts.map +0 -1
- package/dist/composed/JsonSchemaForm/schema/displayedErrorPaths.d.ts +0 -21
- package/dist/composed/JsonSchemaForm/schema/displayedErrorPaths.d.ts.map +0 -1
- package/dist/composed/JsonSchemaForm/schema/visibleFields.d.ts +0 -73
- package/dist/composed/JsonSchemaForm/schema/visibleFields.d.ts.map +0 -1
- package/dist/composed/JsonSchemaForm/utils/fieldKind.d.ts +0 -18
- package/dist/composed/JsonSchemaForm/utils/fieldKind.d.ts.map +0 -1
|
@@ -8,8 +8,10 @@ interface CopyableTextProps {
|
|
|
8
8
|
/** Milliseconds to keep the "copied" state. Defaults to 1500. */
|
|
9
9
|
readonly resetDelayMs?: number;
|
|
10
10
|
/**
|
|
11
|
-
* Called
|
|
12
|
-
*
|
|
11
|
+
* Called when the copy fails: the Clipboard API is unavailable or refuses the
|
|
12
|
+
* write, and the `document.execCommand('copy')` fallback fails too. Receives the
|
|
13
|
+
* Clipboard API's rejection, or an Error when the API is missing. Without it,
|
|
14
|
+
* failures are silent.
|
|
13
15
|
*/
|
|
14
16
|
readonly onCopyError?: (error: unknown) => void;
|
|
15
17
|
/** Test id of the copy button; `${id}-value` and `${id}-tooltip` derive from it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyableText.d.ts","sourceRoot":"","sources":["../../../src/composed/CopyableText/CopyableText.tsx"],"names":[],"mappings":"AAMA,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B
|
|
1
|
+
{"version":3,"file":"CopyableText.d.ts","sourceRoot":"","sources":["../../../src/composed/CopyableText/CopyableText.tsx"],"names":[],"mappings":"AAMA,UAAU,iBAAiB;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,oFAAoF;IACpF,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AA4BD,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,SAA2B,EAC3B,WAAuB,EACvB,YAAmB,EACnB,WAAW,EACX,aAAa,EAAE,MAAM,GACtB,EAAE,iBAAiB,+BA+DnB;kBAvEQ,YAAY;;;AA2ErB,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -5,34 +5,14 @@ interface JsonSchemaFormProps {
|
|
|
5
5
|
readonly control: Control<FieldValues>;
|
|
6
6
|
readonly name?: string;
|
|
7
7
|
readonly disabled?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* The values `context.X` conditions (`gioConfig.displayIf`) read. A host that passes `context` to
|
|
10
|
-
* the form must pass the same object to `jsonSchemaResolver({ context })`: without it, the
|
|
11
|
-
* resolver reads every `context.X` condition as false, and does not check the fields those
|
|
12
|
-
* conditions show as the form shows them.
|
|
13
|
-
*/
|
|
14
8
|
readonly context?: Record<string, unknown>;
|
|
15
9
|
/**
|
|
16
10
|
* Prefix of the generated ids, on no element of its own. Each control is `${id}-${path}`, with the
|
|
17
11
|
* react-hook-form path verbatim (`${id}-headers.0.name`); its parts follow (`-error`, `-add`, …).
|
|
18
12
|
*/
|
|
19
13
|
readonly 'data-testid'?: string;
|
|
20
|
-
/**
|
|
21
|
-
* A Map the form writes the user's `oneOf` / `anyOf` picks in, by object path relative to
|
|
22
|
-
* `name` (`''` for the form's own object). Give the same Map to `jsonSchemaResolver`
|
|
23
|
-
* (`variantPicks`) so that it validates the variant on screen: the data alone cannot tell apart
|
|
24
|
-
* variants without a discriminator, or that share one. One Map per form. Without it, the form
|
|
25
|
-
* keeps its picks to itself.
|
|
26
|
-
*/
|
|
27
|
-
readonly variantPicks?: Map<string, number>;
|
|
28
|
-
/**
|
|
29
|
-
* Called once the user has picked another variant and its fields are mounted, with the path of
|
|
30
|
-
* the object (as in `variantPicks`) and the variant's index. A host that shows every error of
|
|
31
|
-
* the form validates it again here: the errors of the new variant's fields are then on screen.
|
|
32
|
-
*/
|
|
33
|
-
readonly onVariantChange?: (path: string, index: number) => void;
|
|
34
14
|
}
|
|
35
|
-
declare function JsonSchemaForm({ schema, control, name, disabled, context, 'data-testid': testIdPrefix,
|
|
15
|
+
declare function JsonSchemaForm({ schema, control, name, disabled, context, 'data-testid': testIdPrefix, }: JsonSchemaFormProps): import("react").JSX.Element;
|
|
36
16
|
export { JsonSchemaForm };
|
|
37
17
|
export type { JsonSchemaFormProps };
|
|
38
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;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
|
|
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":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/SchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAiBhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"SchemaField.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/SchemaField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,SAAS,EAAqB,MAAM,OAAO,CAAC;AAiBhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAejD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAG1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAGxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAQD,iBAAS,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAS,EAAE,WAAW,EAAE,EAAE,gBAAgB,+TAgC5E;AA0FD,OAAO,EAAE,WAAW,EAAE,CAAC;AACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Non-`*` segments and positions where the runtime segment is absent or non-numeric are left
|
|
4
4
|
* as-is.
|
|
5
5
|
*
|
|
6
|
-
* Used by
|
|
6
|
+
* Used by both the renderer (`concretizeCondition`) and the resolver (`resolveAt`) to align
|
|
7
7
|
* array-item template paths (`arr.*.show`) with live indices (`arr.2.show`).
|
|
8
8
|
*/
|
|
9
9
|
declare function concretizePath(templatePath: string, runtimeSegs: readonly string[]): string;
|
|
@@ -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;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,
|
|
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":"extractDefaults.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/extractDefaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAM9D,iBAAS,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAYpD;
|
|
1
|
+
{"version":3,"file":"extractDefaults.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/extractDefaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAM9D,iBAAS,eAAe,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAYpD;AAkFD,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonSchemaResolver.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/jsonSchemaResolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsonSchemaResolver.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/jsonSchemaResolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA2B,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AA4BpF,iBAAS,kBAAkB,CAAC,YAAY,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChG,MAAM,EAAE,UAAU,EAClB,OAAO,GAAE,yBAA8B,GACtC,QAAQ,CAAC,YAAY,CAAC,CA+DxB;AA2LD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -8,10 +8,8 @@ import { JsonSchema } from '../models/json-schema.types';
|
|
|
8
8
|
*
|
|
9
9
|
* Looks in object properties, the properties of the active `oneOf` / `anyOf` variant and of the
|
|
10
10
|
* active `dependencies` branches, at any depth and inside array items. It does nothing else the
|
|
11
|
-
* form does on mount: the properties of an inactive variant stay
|
|
12
|
-
*
|
|
13
|
-
* prop, read by `context.X` conditions. `variantPicks` is the Map of the form's `variantPicks`
|
|
14
|
-
* prop, when the host gives it one: the active variant is then the one on screen.
|
|
11
|
+
* form does on mount: the properties of an inactive variant stay. `context` is the form's
|
|
12
|
+
* `context` prop, read by `context.X` conditions.
|
|
15
13
|
*
|
|
16
14
|
* Returns a copy: `values` is left untouched. A schema the form cannot index (cyclic `$ref`)
|
|
17
15
|
* returns `values` as is.
|
|
@@ -19,6 +17,6 @@ import { JsonSchema } from '../models/json-schema.types';
|
|
|
19
17
|
* @internal Exported for `@gravitee/graphene-policy-studio` only. Not part of the public API: it
|
|
20
18
|
* can change or be removed in a minor release.
|
|
21
19
|
*/
|
|
22
|
-
declare function pruneHiddenValues<TValues extends Record<string, unknown>>(schema: JsonSchema, values: TValues, context?: Readonly<Record<string, unknown
|
|
20
|
+
declare function pruneHiddenValues<TValues extends Record<string, unknown>>(schema: JsonSchema, values: TValues, context?: Readonly<Record<string, unknown>>): TValues;
|
|
23
21
|
export { pruneHiddenValues };
|
|
24
22
|
//# sourceMappingURL=pruneHiddenValues.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pruneHiddenValues.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/pruneHiddenValues.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pruneHiddenValues.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/pruneHiddenValues.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AA0B9D;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,iBAAiB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC1C,OAAO,CAWT;AA8FD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { SchemaIndex, SchemaNode } from '../schema/types';
|
|
2
|
-
import { WalkEnv } from '../schema/visibleFields';
|
|
3
|
-
/** What `resolveAt` reads besides the index and the data: the form's `context` and the user's variant picks. */
|
|
4
|
-
type ResolveEnv = Omit<WalkEnv, 'root'>;
|
|
5
2
|
/**
|
|
6
3
|
* Walk `runtimePath` through the index (and the data, when provided) in parallel:
|
|
7
4
|
* - the **effective `SchemaNode`** at that position, with `displayIf` paths concretized
|
|
8
5
|
* (`*` placeholders → live indices from `runtimePath`),
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* - the live `value` at the path when `data` is supplied
|
|
13
|
-
* - the keys a `displayIf` hides at that position (`hiddenByDisplayIf`), out of `properties`.
|
|
6
|
+
* - the active `oneOf`/`anyOf` variant + active `dependencies.X.oneOf` branches folded into
|
|
7
|
+
* `properties` **when `data` is supplied** (lets the resolver's noise filter know which keys
|
|
8
|
+
* the active variant + dep branches declare),
|
|
9
|
+
* - the live `value` at the path when `data` is supplied.
|
|
14
10
|
*/
|
|
15
|
-
declare function resolveAt(index: SchemaIndex, runtimePath: string, data?: unknown
|
|
11
|
+
declare function resolveAt(index: SchemaIndex, runtimePath: string, data?: unknown): {
|
|
16
12
|
node?: SchemaNode;
|
|
17
13
|
value: unknown;
|
|
18
|
-
hiddenByDisplayIf?: ReadonlySet<string>;
|
|
19
14
|
};
|
|
20
15
|
export { resolveAt };
|
|
21
|
-
export type { ResolveEnv };
|
|
22
16
|
//# sourceMappingURL=resolveAt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAt.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/resolveAt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveAt.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/resolveAt.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAiB,MAAM,iBAAiB,CAAC;AAG9E;;;;;;;;GAQG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG;IAAE,IAAI,CAAC,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAsBjH;AAgED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
export { JsonSchemaForm } from './JsonSchemaForm';
|
|
2
2
|
export type { JsonSchemaFormProps } from './JsonSchemaForm';
|
|
3
|
-
export { applyVisibleDefaults } from './form-bindings/applyVisibleDefaults';
|
|
4
3
|
export { composeResolvers } from './form-bindings/composeResolvers';
|
|
5
4
|
export { extractDefaults } from './form-bindings/extractDefaults';
|
|
6
5
|
export { jsonSchemaResolver } from './form-bindings/jsonSchemaResolver';
|
|
7
|
-
export { hiddenFormErrors } from './form-bindings/hiddenFormErrors';
|
|
8
|
-
export type { HiddenFormError } from './form-bindings/hiddenFormErrors';
|
|
9
6
|
export { pruneHiddenValues } from './form-bindings/pruneHiddenValues';
|
|
10
7
|
export type { GioBannerConfig, GioConfig, GioIfConfig, JsonSchema } from './models/json-schema.types';
|
|
11
8
|
export type { JsonSchemaResolverOptions } from './models/jsonSchemaResolver.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/JsonSchemaForm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACtG,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -7,16 +7,12 @@ interface JsonSchemaFormContextValue {
|
|
|
7
7
|
readonly externalContext?: Record<string, unknown>;
|
|
8
8
|
/** The consumer's `data-testid`: each part's id is `${testIdPrefix}-${path}…` (see `formTestId`). */
|
|
9
9
|
readonly testIdPrefix?: string;
|
|
10
|
-
/** The form's `name` prop: `OneOfField` records its picks by path relative to it. */
|
|
11
|
-
readonly name?: string;
|
|
12
|
-
/** The form's `onVariantChange` prop. */
|
|
13
|
-
readonly onVariantChange?: (path: string, index: number) => void;
|
|
14
10
|
/**
|
|
15
11
|
* Pre-computed index of the form's schema. Field components can query `index.nodeByPath` or
|
|
16
12
|
* call `effectiveSchemaAt(index, path, data)` to get their local schema in O(1), instead of
|
|
17
|
-
* receiving a `schema` prop and re-deriving on every render.
|
|
18
|
-
*
|
|
19
|
-
* Map
|
|
13
|
+
* receiving a `schema` prop and re-deriving on every render. Shared with `jsonSchemaResolver`
|
|
14
|
+
* via a WeakMap on `schema` so both sides see the same instance. The `index.variantIndices`
|
|
15
|
+
* Map carries the user's `OneOfField` picks and is shared end-to-end the same way.
|
|
20
16
|
*/
|
|
21
17
|
readonly index: SchemaIndex;
|
|
22
18
|
}
|
|
@@ -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;IACnD,qGAAqG;IACrG,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,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"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
interface JsonSchemaResolverOptions {
|
|
2
2
|
readonly basePath?: string;
|
|
3
|
-
readonly context?: Readonly<Record<string, unknown>>;
|
|
4
|
-
readonly variantPicks?: ReadonlyMap<string, number>;
|
|
5
3
|
}
|
|
6
4
|
export type { JsonSchemaResolverOptions };
|
|
7
5
|
//# sourceMappingURL=jsonSchemaResolver.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonSchemaResolver.types.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/models/jsonSchemaResolver.types.ts"],"names":[],"mappings":"AAAA,UAAU,yBAAyB;IAKjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"jsonSchemaResolver.types.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/models/jsonSchemaResolver.types.ts"],"names":[],"mappings":"AAAA,UAAU,yBAAyB;IAKjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildIndex.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/schema/buildIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK3E,OAAO,KAAK,EAAgC,WAAW,EAA6B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"buildIndex.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/schema/buildIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK3E,OAAO,KAAK,EAAgC,WAAW,EAA6B,MAAM,SAAS,CAAC;AAgBpG,iBAAS,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,SAAK,GAAG,WAAW,CAKpE;AA2GD;;;yDAGyD;AACzD,iBAAS,0BAA0B,CAAC,GAAG,EAAE,UAAU,GAAG;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAInF;AA8HD,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -94,12 +94,11 @@ interface SchemaIndex {
|
|
|
94
94
|
* `variants[i].properties.get(key)` instead — two variants can declare the same key with
|
|
95
95
|
* different schemas, so there is no unambiguous static answer for the global map. */
|
|
96
96
|
readonly nodeByPath: ReadonlyMap<string, SchemaNode>;
|
|
97
|
-
/** Per-instance `
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* "JKS with content") or have none. */
|
|
97
|
+
/** Per-instance `basePath → active-variant-index` Map. Written by `OneOfField` when the
|
|
98
|
+
* user picks a variant. Read by the same `OneOfField` for its `selectedIndex` init. The
|
|
99
|
+
* resolver builds its own SchemaIndex (so its `variantIndices` is independent) and falls
|
|
100
|
+
* back to data-shape ranking in `pickActiveVariantIndex` — for Gravitee plugin schemas
|
|
101
|
+
* with `const` / `pattern` discriminators, this is equivalent. */
|
|
103
102
|
readonly variantIndices: Map<string, number>;
|
|
104
103
|
}
|
|
105
104
|
export type { DepBranch, ResolvedCondition, SchemaIndex, SchemaNode, SchemaVariant };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/schema/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,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AAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -4,9 +4,9 @@ import { JsonSchema } from '../models/json-schema.types';
|
|
|
4
4
|
*
|
|
5
5
|
* The shared `variantIndices` Map holds explicit user picks (written by the renderer when the
|
|
6
6
|
* user changes variant). If its entry is still consistent with the data, we return it.
|
|
7
|
-
* Otherwise we rank variants by data-shape fit (Formly / RJSF style: `const`
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Otherwise we rank variants by data-shape fit (Formly / RJSF style: `const` equality required,
|
|
8
|
+
* then `required` presence, then property-presence count) and return the best match — falling
|
|
9
|
+
* back to index 0 when no variant scores positively.
|
|
10
10
|
*
|
|
11
11
|
* Caller supplies `getValue(key)` — `control._getWatch` for the renderer, raw `data[key]` for
|
|
12
12
|
* the resolver — so this stays render-engine agnostic.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pickActiveVariant.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/utils/pickActiveVariant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,iBAAS,sBAAsB,CAC7B,QAAQ,EAAE,SAAS,UAAU,EAAE,EAC/B,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACvD,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GACjC,MAAM,CAQR;
|
|
1
|
+
{"version":3,"file":"pickActiveVariant.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/utils/pickActiveVariant.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,iBAAS,sBAAsB,CAC7B,QAAQ,EAAE,SAAS,UAAU,EAAE,EAC/B,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EACvD,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,GACjC,MAAM,CAQR;AAgDD,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* root value itself.
|
|
5
5
|
*
|
|
6
6
|
* Shared by the conditional gates (`evalCondition`, reading `$eqContext` from the external
|
|
7
|
-
* `context`) and the
|
|
7
|
+
* `context`) and the resolver (`resolveAt`'s `showIfMatches`, reading a discriminator value from
|
|
8
|
+
* the form data).
|
|
8
9
|
*/
|
|
9
10
|
declare function readPath(source: unknown, path: string): unknown;
|
|
10
11
|
export { readPath };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readPath.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/utils/readPath.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"readPath.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/utils/readPath.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,iBAAS,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAQxD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|