jupiter-dynamic-forms 1.20.8 → 1.20.9
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/core/confirm-dialog.d.ts +28 -0
- package/dist/core/confirm-dialog.d.ts.map +1 -0
- package/dist/core/dynamic-form.d.ts +9 -1
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/core/form-section.d.ts +8 -0
- package/dist/core/form-section.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +252 -138
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +704 -268
- package/dist/index.mjs.map +1 -1
- package/dist/utils/role-resolver.d.ts +39 -0
- package/dist/utils/role-resolver.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FormSection } from '../schema/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* JDF-087: resolve a caller-supplied role hint (as passed to `scrollToConcept`'s `role`
|
|
5
|
+
* parameter) to the FormSection(s) it most plausibly refers to, best match first.
|
|
6
|
+
*
|
|
7
|
+
* Callers rarely pass the exact stored value: `FormSection.id`/`metadata.roleURI` are full
|
|
8
|
+
* URNs (`urn:kvk:linkrole:notes-consolidated-average-number-of-employees-segment-specification`)
|
|
9
|
+
* while host apps typically pass just the local name, or a human-readable label. KVK roles also
|
|
10
|
+
* come in prefix-sibling families (`...-employees`, `...-employees-breakdown`,
|
|
11
|
+
* `...-employees-segment-specification`), so loose matches are ranked by tightness rather than
|
|
12
|
+
* by iteration order — "first found wins" is exactly the bug this exists to eliminate.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ROLE_MATCH_TIER: {
|
|
15
|
+
/** Full `id`/`roleURI` equals the query. */
|
|
16
|
+
readonly EXACT_ID: 1;
|
|
17
|
+
/** Local name (segment after the last `:`, `/` or `#`) of `id`/`roleURI` equals the query's. */
|
|
18
|
+
readonly EXACT_LOCAL_NAME: 2;
|
|
19
|
+
/** `title`/`description`/`metadata.originalRole` equals the query. */
|
|
20
|
+
readonly EXACT_LABEL: 3;
|
|
21
|
+
/** Contiguous substring match, in either direction, against a local name or label. */
|
|
22
|
+
readonly SUBSTRING: 4;
|
|
23
|
+
/** Every word of the query appears in a local name or label, in any order. */
|
|
24
|
+
readonly TOKEN_SUBSET: 5;
|
|
25
|
+
};
|
|
26
|
+
export type RoleMatchTier = typeof ROLE_MATCH_TIER[keyof typeof ROLE_MATCH_TIER];
|
|
27
|
+
export interface RoleMatch {
|
|
28
|
+
section: FormSection;
|
|
29
|
+
tier: RoleMatchTier;
|
|
30
|
+
}
|
|
31
|
+
/** `urn:kvk:linkrole:notes-x` → `notes-x`; `http://example.com/role/notes-x` → `notes-x`. */
|
|
32
|
+
export declare function roleLocalName(value: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Rank every section the query plausibly refers to, best first: by tier, then (within a fuzzy
|
|
35
|
+
* tier) by tightness, then by the input order of `sections`. Returns `[]` for an empty query or
|
|
36
|
+
* when nothing matches.
|
|
37
|
+
*/
|
|
38
|
+
export declare function rankMatchingSections(roleQuery: string, sections: FormSection[]): RoleMatch[];
|
|
39
|
+
//# sourceMappingURL=role-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-resolver.d.ts","sourceRoot":"","sources":["../../src/utils/role-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,eAAe;IAC1B,4CAA4C;;IAE5C,gGAAgG;;IAEhG,sEAAsE;;IAEtE,sFAAsF;;IAEtF,8EAA8E;;CAEtE,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEjF,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,aAAa,CAAC;CACrB;AAMD,6FAA6F;AAC7F,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAInD;AA8CD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,CAS5F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupiter-dynamic-forms",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.9",
|
|
4
4
|
"description": "Framework-agnostic dynamic form builder for XBRL entrypoints using Web Components. Supports Angular 14+, React, Vue, and vanilla HTML.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|