@gravitee/graphene-core 3.53.0-fix-found-460-validation-scope.93c7f36 → 3.53.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.
Files changed (31) hide show
  1. package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts +1 -21
  2. package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
  3. package/dist/composed/JsonSchemaForm/conditional/concretizePath.d.ts +1 -1
  4. package/dist/composed/JsonSchemaForm/fields/oneOf/OneOfField.d.ts.map +1 -1
  5. package/dist/composed/JsonSchemaForm/form-bindings/extractDefaults.d.ts.map +1 -1
  6. package/dist/composed/JsonSchemaForm/form-bindings/jsonSchemaResolver.d.ts.map +1 -1
  7. package/dist/composed/JsonSchemaForm/form-bindings/pruneHiddenValues.d.ts +3 -4
  8. package/dist/composed/JsonSchemaForm/form-bindings/pruneHiddenValues.d.ts.map +1 -1
  9. package/dist/composed/JsonSchemaForm/form-bindings/resolveAt.d.ts +5 -11
  10. package/dist/composed/JsonSchemaForm/form-bindings/resolveAt.d.ts.map +1 -1
  11. package/dist/composed/JsonSchemaForm/index.d.ts +0 -2
  12. package/dist/composed/JsonSchemaForm/index.d.ts.map +1 -1
  13. package/dist/composed/JsonSchemaForm/models/JsonSchemaFormContext.d.ts +3 -7
  14. package/dist/composed/JsonSchemaForm/models/JsonSchemaFormContext.d.ts.map +1 -1
  15. package/dist/composed/JsonSchemaForm/models/jsonSchemaResolver.types.d.ts +0 -2
  16. package/dist/composed/JsonSchemaForm/models/jsonSchemaResolver.types.d.ts.map +1 -1
  17. package/dist/composed/JsonSchemaForm/schema/buildIndex.d.ts.map +1 -1
  18. package/dist/composed/JsonSchemaForm/schema/types.d.ts +5 -6
  19. package/dist/composed/JsonSchemaForm/schema/types.d.ts.map +1 -1
  20. package/dist/composed/JsonSchemaForm/schema/visibleFields.d.ts +0 -2
  21. package/dist/composed/JsonSchemaForm/schema/visibleFields.d.ts.map +1 -1
  22. package/dist/composed/JsonSchemaForm/utils/readPath.d.ts +2 -1
  23. package/dist/composed/JsonSchemaForm/utils/readPath.d.ts.map +1 -1
  24. package/dist/index.js +439 -1298
  25. package/package.json +1 -2
  26. package/dist/composed/JsonSchemaForm/fields/__test-utils__/errorVisibility.d.ts +0 -39
  27. package/dist/composed/JsonSchemaForm/fields/__test-utils__/errorVisibility.d.ts.map +0 -1
  28. package/dist/composed/JsonSchemaForm/form-bindings/hiddenFormErrors.d.ts +0 -38
  29. package/dist/composed/JsonSchemaForm/form-bindings/hiddenFormErrors.d.ts.map +0 -1
  30. package/dist/composed/JsonSchemaForm/schema/displayedErrorPaths.d.ts +0 -21
  31. package/dist/composed/JsonSchemaForm/schema/displayedErrorPaths.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/graphene-core",
3
- "version": "3.53.0-fix-found-460-validation-scope.93c7f36",
3
+ "version": "3.53.0",
4
4
  "type": "module",
5
5
  "description": "Gravitee's Graphene design system: accessible React components, design tokens, icons, and shared ESLint/TypeScript configs. Built on shadcn/ui and Tailwind.",
6
6
  "keywords": [
@@ -103,7 +103,6 @@
103
103
  },
104
104
  "peerDependencies": {
105
105
  "@fontsource/dm-sans": ">=5.0.0",
106
- "@gravitee/graphene-core": "3.53.0-fix-found-460-validation-scope.93c7f36",
107
106
  "@monaco-editor/react": "^4.7.0",
108
107
  "@tanstack/react-table": "^8.0.0",
109
108
  "@testing-library/dom": ">=10.0.0",
@@ -1,39 +0,0 @@
1
- import { FieldValues, Resolver } from 'react-hook-form';
2
- import { JsonSchema } from '../../models/json-schema.types';
3
- interface ErrorVisibilityCase {
4
- readonly schema: JsonSchema;
5
- /** The values the form is mounted with. */
6
- readonly values: Record<string, unknown>;
7
- readonly resolver: Resolver<FieldValues>;
8
- readonly context?: Record<string, unknown>;
9
- /** The form's `variantPicks` Map, which `resolver` reads too. */
10
- readonly variantPicks?: Map<string, number>;
11
- /** What the user does once the form is mounted, before it is submitted: pick a variant, type. */
12
- readonly interact?: () => Promise<void>;
13
- }
14
- interface ErrorVisibilityReport {
15
- /** How many errors the resolver returned once the form was mounted and submitted. */
16
- readonly errorCount: number;
17
- /** How many of them `hiddenFormErrors` lists. */
18
- readonly hiddenCount: number;
19
- /** One line per error message neither a field nor the summary shows. Empty when all is well. */
20
- readonly notShown: readonly string[];
21
- /**
22
- * One line per error message `hiddenFormErrors` lists that a field shows too: the user would read
23
- * it twice. Empty when all is well.
24
- */
25
- readonly shownTwice: readonly string[];
26
- }
27
- declare function checkErrorVisibility({ schema, values, resolver, context, variantPicks, interact, }: ErrorVisibilityCase): Promise<ErrorVisibilityReport>;
28
- /**
29
- * Configurations that break `schema` everywhere, built from the schema alone so that a new fixture
30
- * is covered as soon as it exists: `{}` (the required fields), every field with a value of the
31
- * wrong type (and every discriminator off its variant), every field blank (`''`, `[]`, a very
32
- * small number).
33
- */
34
- declare function invalidConfigurations(schema: JsonSchema): Readonly<Record<string, Record<string, unknown>>>;
35
- /** The exports of a fixture module that are JSON schemas of an object. */
36
- declare function schemaExports(module: Readonly<Record<string, unknown>>): [string, JsonSchema][];
37
- export { checkErrorVisibility, invalidConfigurations, schemaExports };
38
- export type { ErrorVisibilityCase, ErrorVisibilityReport };
39
- //# sourceMappingURL=errorVisibility.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorVisibility.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/__test-utils__/errorVisibility.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,QAAQ,EAA+B,MAAM,iBAAiB,CAAC;AAI/F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAWjE,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO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1,38 +0,0 @@
1
- import { JsonSchema } from '../models/json-schema.types';
2
- /** An error the form has no place to show. */
3
- interface HiddenFormError {
4
- /** The error's path in the form values, `''` for the root. */
5
- readonly path: string;
6
- /**
7
- * The path in words, one entry per segment: the field titles (or capitalized keys) and the array
8
- * items as the form names them ("Header 2"). Empty for the root.
9
- */
10
- readonly labels: readonly string[];
11
- /** Every message for the path (all of `types` with `criteriaMode: 'all'`). */
12
- readonly messages: readonly string[];
13
- }
14
- /**
15
- * The errors in `errors` (a `jsonSchemaResolver` result) that `<JsonSchemaForm>` shows nowhere:
16
- * every error whose path is not in `displayedErrorPaths`, in the order the resolver gave them. A
17
- * host lists them next to the form so that every error that blocks the form is on screen.
18
- *
19
- * Pass the values the resolver validated, the form's `context`, and the Map of its `variantPicks`
20
- * prop when the host gives it one: the fields on screen are the ones of the variants the user
21
- * picked. A schema the form cannot index hides every error.
22
- *
23
- * @internal Exported for `@gravitee/graphene-policy-studio` only. Not part of the public API: it
24
- * can change or be removed in a minor release.
25
- */
26
- declare function hiddenFormErrors(schema: JsonSchema, values: Readonly<Record<string, unknown>>, errors: object, context?: Readonly<Record<string, unknown>>, variantPicks?: ReadonlyMap<string, number>): readonly HiddenFormError[];
27
- /**
28
- * Every error in an RHF `errors` tree with its path, parents first. A `root` key is where RHF puts the
29
- * error of the object it is in (the form's own at the top), unless `declaresRoot` says the schema
30
- * has a property named `root` at that path: the resolver writes the error of that property there too.
31
- */
32
- declare function flattenErrors(errors: unknown, declaresRoot?: (path: string) => boolean, path?: string): {
33
- readonly path: string;
34
- readonly messages: readonly string[];
35
- }[];
36
- export { flattenErrors, hiddenFormErrors };
37
- export type { HiddenFormError };
38
- //# sourceMappingURL=hiddenFormErrors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hiddenFormErrors.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/form-bindings/hiddenFormErrors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAO9D,8CAA8C;AAC9C,UAAU,eAAe;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,8EAA8E;IAC9E,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAKD;;;;;;;;;;;GAWG;AACH,iBAAS,gBAAgB,CACvB,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAEzC,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC3C,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,SAAS,eAAe,EAAE,CAY5B;AAED;;;;GAIG;AACH,iBAAS,aAAa,CACpB,MAAM,EAAE,OAAO,EACf,YAAY,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAqB,EACrD,IAAI,SAAK,GACR;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,EAAE,CAgBnE;AAmED,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -1,21 +0,0 @@
1
- import { JsonSchema } from '../models/json-schema.types';
2
- /**
3
- * The paths at which `<JsonSchemaForm>` shows an error message, for `values`: the fields it mounts
4
- * whose component renders the error of its own path (inputs, selects, switches, code editors,
5
- * arrays). An error anywhere else blocks the form with nothing on screen:
6
- * - an object path (`ObjectField` and `OneOfField` render no error), a `oneOf` / `anyOf`
7
- * aggregate, a root error;
8
- * - a field the form has no renderer for (`SchemaField` omits it), a `null` field, a deprecated
9
- * field;
10
- * - the discriminator of the active variant, which `OneOfField` binds without an input;
11
- * - a value inside a multi-select, a headers array or a code editor, which only show the error of
12
- * their own path;
13
- * - a field the form hides (`viewObject`).
14
- *
15
- * The active variant is the one that fits the data best, as in the resolver: a host that has the
16
- * form's own picks passes them in `variantPicks`. `context` is the form's `context` prop. A schema
17
- * the form cannot index returns an empty set. Internal: `hiddenFormErrors` reads it.
18
- */
19
- declare function displayedErrorPaths(schema: JsonSchema, values: Readonly<Record<string, unknown>>, context?: Readonly<Record<string, unknown>>, variantPicks?: ReadonlyMap<string, number>): ReadonlySet<string>;
20
- export { displayedErrorPaths };
21
- //# sourceMappingURL=displayedErrorPaths.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"displayedErrorPaths.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/schema/displayedErrorPaths.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK9D;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,mBAAmB,CAC1B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACzC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAC3C,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,WAAW,CAAC,MAAM,CAAC,CAKrB;AAsCD,OAAO,EAAE,mBAAmB,EAAE,CAAC"}