@kong-ui-public/freeform 0.8.7-pr.4056.2b18d5bdd.0 → 0.9.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/README.md +17 -0
- package/dist/filler/cypress/index.js +1 -1
- package/dist/filler/{field-walker-ucrOA4Km.js → field-walker-CZT99qon.js} +3938 -3803
- package/dist/filler/packages/core/freeform/src/composables/field.d.ts +2 -0
- package/dist/filler/packages/core/freeform/src/composables/field.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/form-context.d.ts +12 -0
- package/dist/filler/packages/core/freeform/src/composables/form-context.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/index.d.ts +1 -0
- package/dist/filler/packages/core/freeform/src/composables/index.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/composables/reveal.d.ts +52 -0
- package/dist/filler/packages/core/freeform/src/composables/reveal.d.ts.map +1 -0
- package/dist/filler/packages/core/freeform/src/composables/useMapField.d.ts +2 -0
- package/dist/filler/packages/core/freeform/src/composables/useMapField.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/constants.d.ts +5 -7
- package/dist/filler/packages/core/freeform/src/constants.d.ts.map +1 -1
- package/dist/filler/packages/core/freeform/src/utils.d.ts +19 -0
- package/dist/filler/packages/core/freeform/src/utils.d.ts.map +1 -1
- package/dist/filler/playwright/index.js +1 -1
- package/dist/freeform.es.js +1666 -1553
- package/dist/freeform.umd.js +5 -5
- package/dist/style.css +1 -1
- package/dist/types/components/ArrayField.vue.d.ts.map +1 -1
- package/dist/types/components/ExpressionEditor.vue.d.ts.map +1 -1
- package/dist/types/components/Form.vue.d.ts +1 -0
- package/dist/types/components/Form.vue.d.ts.map +1 -1
- package/dist/types/components/ObjectField.vue.d.ts.map +1 -1
- package/dist/types/composables/field.d.ts +2 -0
- package/dist/types/composables/field.d.ts.map +1 -1
- package/dist/types/composables/form-context.d.ts +12 -0
- package/dist/types/composables/form-context.d.ts.map +1 -1
- package/dist/types/composables/index.d.ts +1 -0
- package/dist/types/composables/index.d.ts.map +1 -1
- package/dist/types/composables/reveal.d.ts +52 -0
- package/dist/types/composables/reveal.d.ts.map +1 -0
- package/dist/types/composables/useMapField.d.ts +2 -0
- package/dist/types/composables/useMapField.d.ts.map +1 -1
- package/dist/types/constants.d.ts +5 -7
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils.d.ts +19 -0
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/components/CelField.vue.d.ts +0 -31
- package/dist/types/components/CelField.vue.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -334,6 +334,23 @@ Register it against a field path with `FieldRenderer`, or place it directly insi
|
|
|
334
334
|
|
|
335
335
|
When the field needs to write an "empty" value (the user clears it, or a mode switch blanks it), use `emptyValue` from `useField()` instead of hardcoding `null` — see [Empty Field Values](#empty-field-values).
|
|
336
336
|
|
|
337
|
+
### Field Navigation
|
|
338
|
+
|
|
339
|
+
`Form` exposes `reveal(path)`, which brings the field at a data path into view and focuses it, even when it sits in a collapsed record or an inactive array tab. Try it in the sandbox's **Field navigation** page.
|
|
340
|
+
|
|
341
|
+
```ts
|
|
342
|
+
const result = await formRef.value?.reveal('config.redis.host')
|
|
343
|
+
// { path: 'config.redis.host', exact: true }
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
| Rule | Detail |
|
|
347
|
+
|---|---|
|
|
348
|
+
| Path format | Real map keys, dot separated, array indexes as `.1`. A segment with `.`, `[`, `]` or `"` in it (or an empty key) is a quoted bracket segment: `config.headers["x.y"]`. `parseDataPath`/`formatDataPath` convert between a path and its segments; `limits[1]` is also accepted |
|
|
349
|
+
| Only view state changes | Records expand and array tabs switch. A record that is switched off is not switched on, and a field hidden by a render rule stays hidden: the reveal stops at the nearest visible ancestor and returns it with `exact: false` |
|
|
350
|
+
| Result | `null` when nothing on the path is visible, the path is malformed, or a later `reveal` call took over |
|
|
351
|
+
|
|
352
|
+
A custom container opens itself for a reveal through `useField(name).revealTarget`: the path being revealed while it is the field itself or inside it, `null` otherwise. Containers that are not field paths (custom tabs and sections) are not supported yet.
|
|
353
|
+
|
|
337
354
|
## Filler (test utilities)
|
|
338
355
|
|
|
339
356
|
Auto-fill utilities for Cypress and Playwright tests. A framework-agnostic core with framework-specific adapters — depends only on `form-schema.ts` and other generic primitives, no plugin/layout knowledge.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as l, i as w, c as S, g as k, E as A, w as v, a as x, b as E, d as I } from "../field-walker-
|
|
1
|
+
import { s as l, i as w, c as S, g as k, E as A, w as v, a as x, b as E, d as I } from "../field-walker-CZT99qon.js";
|
|
2
2
|
import "lodash-es";
|
|
3
3
|
const a = { scrollBehavior: "center" };
|
|
4
4
|
function m(o) {
|