@gravitee/graphene-core 2.50.0 → 2.51.0-feat-layout-content-width-tiers.a685e30
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 +39 -13
- package/dist/__stories__/fixtures/json-schema-form/disableIf.fixture.d.ts.map +1 -1
- package/dist/__stories__/fixtures/json-schema-form/displayIf.fixture.d.ts.map +1 -1
- package/dist/composed/AppLayout/AppLayout.d.ts +5 -4
- package/dist/composed/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/conditional/ConditionalGate.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/conditional/concretizeCondition.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/conditional/evalCondition.d.ts +6 -6
- package/dist/composed/JsonSchemaForm/conditional/evalCondition.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/fields/__test-utils__/setupJsonSchemaForm.d.ts +1 -0
- package/dist/composed/JsonSchemaForm/fields/__test-utils__/setupJsonSchemaForm.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/form-bindings/resolveAt.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/schema/buildIndex.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/schema/types.d.ts +3 -1
- package/dist/composed/JsonSchemaForm/schema/types.d.ts.map +1 -1
- package/dist/composed/JsonSchemaForm/utils/readPath.d.ts +12 -0
- package/dist/composed/JsonSchemaForm/utils/readPath.d.ts.map +1 -0
- package/dist/composed/LayoutSlots/LayoutSlotsContext.d.ts +1 -1
- package/dist/composed/LayoutSlots/LayoutSlotsContext.d.ts.map +1 -1
- package/dist/index.js +478 -461
- package/dist/styles/globals.css +1 -1
- package/dist/styles/tailwind-theme.css +1 -0
- package/dist/tokens/component.css +1 -0
- package/package.json +2 -1
- package/snippets/context-sidebar-detail-page.tsx +10 -1
- package/snippets/data-table-list-page.tsx +7 -0
- package/snippets/json-schema-form-simple.tsx +20 -2
- package/snippets/json-schema-form-with-meta.tsx +18 -3
package/USAGE_GUIDE.md
CHANGED
|
@@ -141,9 +141,19 @@ Scale: `0`, `0.5`, `1`, `1.5`, `2`, `2.5`, `3`, `3.5`, `4`, `5`, `6`, `7`, `8`,
|
|
|
141
141
|
|
|
142
142
|
`rounded-sm`, `rounded-md`, `rounded-lg`, `rounded-xl` (mapped to semantic `--radius`).
|
|
143
143
|
|
|
144
|
-
### Layout
|
|
144
|
+
### Layout — content width tiers
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
Content width is controlled by `contentVariant` on `AppLayout` (or via `useLayoutConfig`). Three tiers:
|
|
147
|
+
|
|
148
|
+
| Tier | Token | Rem | Tailwind class | When to use |
|
|
149
|
+
|------|-------|-----|----------------|-------------|
|
|
150
|
+
| Default | `--content-max-width` | `80rem` | `max-w-content` | Most pages: detail views, edit forms, settings, overviews, home dashboards |
|
|
151
|
+
| Wide | `--content-wide-max-width` | `100rem` | `max-w-wide` | DataTable list pages, entity tables |
|
|
152
|
+
| Full-bleed | N/A | none | N/A | Tool layouts (Policy Studio), observability pages (dashboards, log/trace explorers) |
|
|
153
|
+
|
|
154
|
+
**Decision rule:** Is the page's primary content a DataTable? Use `wide`. Is it a workspace/tool layout or observability page? Use `full-bleed`. Everything else uses `default`.
|
|
155
|
+
|
|
156
|
+
All values are defined in `rem` so they scale with user font-size preferences and browser zoom. Consumers do not set `max-w-*` classes directly — `AppLayout` applies the correct max-width based on the `contentVariant` value.
|
|
147
157
|
|
|
148
158
|
## Styling
|
|
149
159
|
|
|
@@ -293,27 +303,43 @@ If you have not migrated to `AppContextBar` yet, keeping the app name as the fir
|
|
|
293
303
|
|
|
294
304
|
**Linear breadcrumbs:** When each step maps to a **path string** and React Router’s `navigate`, use **`buildLinearBreadcrumbs(navigate, segments)`** so `ContentHeader` / `useLayoutConfig` get consistent `BreadcrumbEntry[]` without copying the same `onClick` wiring. If the first crumb is a **custom action** (e.g. “back” that is not `navigate('/path')`), build that entry by hand or mix with `buildLinearBreadcrumbs`—see Storybook **Composed/ContentHeader → Linear breadcrumbs from builder** for the canonical route-based pattern. API edge cases are covered in `packages/core/src/lib/breadcrumbs/buildLinearBreadcrumbs.test.ts`.
|
|
295
305
|
|
|
296
|
-
### `contentVariant` —
|
|
306
|
+
### `contentVariant` — content width tiers
|
|
297
307
|
|
|
298
|
-
`AppLayout` accepts `contentVariant` to control content area padding:
|
|
308
|
+
`AppLayout` accepts `contentVariant` to control content area width and padding:
|
|
299
309
|
|
|
300
|
-
- `"default"` (default) — standard padding
|
|
301
|
-
- `"
|
|
302
|
-
|
|
303
|
-
Use `full-bleed` for embedded components that manage their own layout grid (Policy Studio, dashboards, full-screen editors):
|
|
310
|
+
- `"default"` (default) — `max-w-content` (80rem) with standard padding. Most pages.
|
|
311
|
+
- `"wide"` — `max-w-wide` (100rem) with standard padding. DataTable list pages.
|
|
312
|
+
- `"full-bleed"` — no max-width, no padding; content spans edge-to-edge. Tool layouts and observability pages.
|
|
304
313
|
|
|
305
314
|
```tsx
|
|
306
|
-
|
|
307
|
-
|
|
315
|
+
// Default (80rem) — no change needed, AppLayout applies it automatically
|
|
316
|
+
<AppLayout>
|
|
317
|
+
<DetailPage />
|
|
308
318
|
</AppLayout>
|
|
309
|
-
```
|
|
310
319
|
|
|
311
|
-
|
|
320
|
+
// Wide (100rem) — for DataTable list pages, add one line
|
|
321
|
+
useLayoutConfig({ contentVariant: 'wide' }, []);
|
|
312
322
|
|
|
313
|
-
|
|
323
|
+
// Full-bleed — for tool layouts and observability pages
|
|
314
324
|
useLayoutConfig({ contentVariant: 'full-bleed' }, []);
|
|
315
325
|
```
|
|
316
326
|
|
|
327
|
+
With `useLayoutConfig` (module federation), a nested page can set `contentVariant` without affecting other layout slots owned by parent components. Each hook only resets the keys it owns on unmount.
|
|
328
|
+
|
|
329
|
+
### Adopting content width tiers in consumer modules
|
|
330
|
+
|
|
331
|
+
Follow these steps to apply the layout tier system to an existing consumer module:
|
|
332
|
+
|
|
333
|
+
1. **Identify all pages** in your module that render inside `AppLayout`.
|
|
334
|
+
2. **Categorize each page:**
|
|
335
|
+
- **Default** — detail views, edit forms, overviews, settings, creation wizards. No change needed; `AppLayout` applies `max-w-content` (80rem) automatically.
|
|
336
|
+
- **Wide** — any page whose primary content is a `DataTable`. Add `useLayoutConfig({ contentVariant: 'wide' }, [])` at the top of the component.
|
|
337
|
+
- **Full-bleed** — tool layouts (Policy Studio) or observability pages (dashboards, explorers). Add `useLayoutConfig({ contentVariant: 'full-bleed' }, [])` if not already set.
|
|
338
|
+
3. **Remove ad-hoc width constraints** — delete any `max-w-*` classes on page-level wrapper divs. The design system owns content width.
|
|
339
|
+
4. **Verify** — resize the browser to confirm content centers correctly on wide viewports and doesn't clip on narrow ones.
|
|
340
|
+
|
|
341
|
+
See `packages/core/snippets/data-table-list-page.tsx` for a complete list-page example with `useLayoutConfig`.
|
|
342
|
+
|
|
317
343
|
### Data table (entity list pages)
|
|
318
344
|
|
|
319
345
|
Use `DataTable` for any entity list — whether the data is fetched page-by-page from an API or loaded in full on the client. The component provides sorting, filtering, pagination, column visibility, row selection, and bulk actions through a composable slot API.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disableIf.fixture.d.ts","sourceRoot":"","sources":["../../../../src/__stories__/fixtures/json-schema-form/disableIf.fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAMlF,eAAO,MAAM,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"disableIf.fixture.d.ts","sourceRoot":"","sources":["../../../../src/__stories__/fixtures/json-schema-form/disableIf.fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAMlF,eAAO,MAAM,6BAA6B,EAAE,UA6I3C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayIf.fixture.d.ts","sourceRoot":"","sources":["../../../../src/__stories__/fixtures/json-schema-form/displayIf.fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAKlF,eAAO,MAAM,6BAA6B,EAAE,
|
|
1
|
+
{"version":3,"file":"displayIf.fixture.d.ts","sourceRoot":"","sources":["../../../../src/__stories__/fixtures/json-schema-form/displayIf.fixture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAKlF,eAAO,MAAM,6BAA6B,EAAE,UAwJ3C,CAAC"}
|
|
@@ -18,11 +18,12 @@ interface AppLayoutProps {
|
|
|
18
18
|
/** Optional callback when context expansion state changes. */
|
|
19
19
|
readonly onContextExpandedChange?: (expanded: boolean) => void;
|
|
20
20
|
/**
|
|
21
|
-
* Controls content area padding.
|
|
22
|
-
* - `"default"` —
|
|
23
|
-
* - `"
|
|
21
|
+
* Controls content area width and padding.
|
|
22
|
+
* - `"default"` — `max-w-content` (80rem) with standard padding (the default).
|
|
23
|
+
* - `"wide"` — `max-w-wide` (100rem) with standard padding. For DataTable list pages.
|
|
24
|
+
* - `"full-bleed"` — no max-width, no padding; content spans edge-to-edge.
|
|
24
25
|
*/
|
|
25
|
-
readonly contentVariant?: 'default' | 'full-bleed';
|
|
26
|
+
readonly contentVariant?: 'default' | 'wide' | 'full-bleed';
|
|
26
27
|
/**
|
|
27
28
|
* When true the layout spans the full viewport height.
|
|
28
29
|
* Defaults to `true` (sidebar-dominant shell).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/composed/AppLayout/AppLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAGtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8CAA8C,CAAC;AA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AC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC5C;AAED,iBAAS,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAS,EAAE,QAAgB,EAAE,OAAO,EAAE,EAAE,mBAAmB,+
|
|
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;AAG7D,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;CAC5C;AAED,iBAAS,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAS,EAAE,QAAgB,EAAE,OAAO,EAAE,EAAE,mBAAmB,+BAuCrG;AAED,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionalGate.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/conditional/ConditionalGate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC;6FACyF;IACzF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"ConditionalGate.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/conditional/ConditionalGate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC;6FACyF;IACzF,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,oBAAoB,sCAwBvF;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concretizeCondition.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/conditional/concretizeCondition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,GAAG,iBAAiB,
|
|
1
|
+
{"version":3,"file":"concretizeCondition.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/conditional/concretizeCondition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD;;;;;;GAMG;AACH,iBAAS,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAI9F;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ResolvedCondition } from '../schema/types';
|
|
2
2
|
/**
|
|
3
|
-
* Evaluate a `ResolvedCondition` against
|
|
4
|
-
* `$eq` is satisfied when every (path → expected) pair matches; an array expected matches if the
|
|
5
|
-
* live value is `===` to any entry (poor man's `$in`). Empty `$eq` matches everything.
|
|
3
|
+
* Evaluate a `ResolvedCondition` against live form values + the form's external `context`.
|
|
6
4
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* `$eq` keys are looked up in `values` (the absolute RHF paths the gate watched via `useWatch`);
|
|
6
|
+
* `$eqContext` keys are read from `externalContext` by dot-path. Every pair must match; an array
|
|
7
|
+
* expected matches if the actual is `===` to any entry (poor man's `$in`). No constraints (empty
|
|
8
|
+
* `$eq` and no `$eqContext`) ⇒ matches everything.
|
|
9
9
|
*/
|
|
10
|
-
declare function evalCondition(condition: ResolvedCondition, values: ReadonlyMap<string, unknown>): boolean;
|
|
10
|
+
declare function evalCondition(condition: ResolvedCondition, values: ReadonlyMap<string, unknown>, externalContext?: Record<string, unknown>): boolean;
|
|
11
11
|
export { evalCondition };
|
|
12
12
|
//# sourceMappingURL=evalCondition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evalCondition.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/conditional/evalCondition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"evalCondition.d.ts","sourceRoot":"","sources":["../../../../src/composed/JsonSchemaForm/conditional/evalCondition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD;;;;;;;GAOG;AACH,iBAAS,aAAa,CACpB,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACxC,OAAO,CAUT;AAQD,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -6,6 +6,7 @@ declare function setupJsonSchemaForm(options: {
|
|
|
6
6
|
readonly schema: JsonSchema;
|
|
7
7
|
readonly defaultValues?: Record<string, unknown>;
|
|
8
8
|
readonly disabled?: boolean;
|
|
9
|
+
readonly context?: Record<string, unknown>;
|
|
9
10
|
readonly render: (rootNode: SchemaNode) => ReactElement;
|
|
10
11
|
}): {
|
|
11
12
|
form: UseFormReturn<FieldValues>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupJsonSchemaForm.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/__test-utils__/setupJsonSchemaForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,WAAW,EAAW,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,iBAAS,mBAAmB,CAAC,OAAO,EAAE;IACpC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,KAAK,YAAY,CAAC;CACzD,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAAC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"setupJsonSchemaForm.d.ts","sourceRoot":"","sources":["../../../../../src/composed/JsonSchemaForm/fields/__test-utils__/setupJsonSchemaForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,WAAW,EAAW,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,iBAAS,mBAAmB,CAAC,OAAO,EAAE;IACpC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,UAAU,KAAK,YAAY,CAAC;CACzD,GAAG;IAAE,IAAI,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAAC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CA6B5E;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -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 +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;AAgBpG,iBAAS,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,SAAK,GAAG,WAAW,CAKpE;
|
|
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;AAkPD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -81,10 +81,12 @@ interface DepBranch {
|
|
|
81
81
|
* { $eq: { '<rhfPath>': value | value[] } }
|
|
82
82
|
*
|
|
83
83
|
* Values are matched with `===`; an array value matches if the data is any one of the entries
|
|
84
|
-
* (poor man's `$in`).
|
|
84
|
+
* (poor man's `$in`). An empty condition matches everything. `context.X` keys are split out into
|
|
85
|
+
* `$eqContext` (read from the external `context` prop, not RHF state).
|
|
85
86
|
*/
|
|
86
87
|
interface ResolvedCondition {
|
|
87
88
|
readonly $eq: ReadonlyMap<string, unknown>;
|
|
89
|
+
readonly $eqContext?: ReadonlyMap<string, unknown>;
|
|
88
90
|
}
|
|
89
91
|
interface SchemaIndex {
|
|
90
92
|
readonly root: SchemaNode;
|
|
@@ -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,MAAM,yBAAyB,CAAC;AAE1D;;;;;;;;;;;;;;GAcG;AACH,UAAU,UAAU;IAClB,gFAAgF;IAChF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACtD,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IAC7C;iFAC6E;IAC7E,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IACvC;;qGAEiG;IACjG,QAAQ,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAC;IACvC;;iDAE6C;IAC7C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;CACpD;AAED,UAAU,aAAa;IACrB,sFAAsF;IACtF,QAAQ,CAAC,KAAK,CAAC,EAAE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,IAAI,EAAE,UAAU,CAAC;IAC1B;;0FAEsF;IACtF,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACrD;;;;uEAImE;IACnE,QAAQ,CAAC,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C;AAED,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read a dot-separated path (`a.b.c`) out of a nested value. Returns `undefined` as soon as a
|
|
3
|
+
* segment is missing or an intermediate value is not a non-null object. An empty path reads the
|
|
4
|
+
* root value itself.
|
|
5
|
+
*
|
|
6
|
+
* Shared by the conditional gates (`evalCondition`, reading `$eqContext` from the external
|
|
7
|
+
* `context`) and the resolver (`resolveAt`'s `showIfMatches`, reading a discriminator value from
|
|
8
|
+
* the form data).
|
|
9
|
+
*/
|
|
10
|
+
declare function readPath(source: unknown, path: string): unknown;
|
|
11
|
+
export { readPath };
|
|
12
|
+
//# sourceMappingURL=readPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -8,7 +8,7 @@ interface LayoutSlots {
|
|
|
8
8
|
readonly leading: ReactNode;
|
|
9
9
|
readonly viewMode: 'global' | 'context';
|
|
10
10
|
readonly contextExpanded: boolean;
|
|
11
|
-
readonly contentVariant: 'default' | 'full-bleed';
|
|
11
|
+
readonly contentVariant: 'default' | 'wide' | 'full-bleed';
|
|
12
12
|
}
|
|
13
13
|
interface LayoutSlotsContextValue {
|
|
14
14
|
readonly slots: LayoutSlots;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutSlotsContext.d.ts","sourceRoot":"","sources":["../../../src/composed/LayoutSlots/LayoutSlotsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEtF,UAAU,WAAW;IACnB,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,SAAS,GAAG,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"LayoutSlotsContext.d.ts","sourceRoot":"","sources":["../../../src/composed/LayoutSlots/LayoutSlotsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEtF,UAAU,WAAW;IACnB,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,QAAQ,C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