@genesislcap/foundation-forms 15.23.1-FUI-0.4 → 15.23.1-agent-rules.1
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/custom-elements.json +0 -104
- package/dist/dts/jsonforms/renderers/CategorizationWrapperRenderer.d.ts +0 -11
- package/dist/dts/jsonforms/renderers/CategorizationWrapperRenderer.d.ts.map +1 -1
- package/dist/esm/jsonforms/renderers/CategorizationWrapperRenderer.js +5 -25
- package/package.json +14 -14
|
@@ -2817,31 +2817,6 @@
|
|
|
2817
2817
|
"default": "false",
|
|
2818
2818
|
"description": "`control` is rebuilt from scratch on every JSONForms state change (every\nkeystroke, validation pass, async default-data update), so `controlChanged`\nfires repeatedly throughout the form's life — not just on first paint.\nApplying `activeCategory` each time would yank the user back to the\nconfigured tab mid-edit (and unmount the open panel). This flag ensures the\ninitial tab is applied once; thereafter the user's own navigation wins."
|
|
2819
2819
|
},
|
|
2820
|
-
{
|
|
2821
|
-
"kind": "field",
|
|
2822
|
-
"name": "lastErrors",
|
|
2823
|
-
"type": {
|
|
2824
|
-
"text": "ErrorObject[] | undefined"
|
|
2825
|
-
},
|
|
2826
|
-
"privacy": "private"
|
|
2827
|
-
},
|
|
2828
|
-
{
|
|
2829
|
-
"kind": "field",
|
|
2830
|
-
"name": "lastAdditionalErrors",
|
|
2831
|
-
"type": {
|
|
2832
|
-
"text": "ErrorObject[] | undefined"
|
|
2833
|
-
},
|
|
2834
|
-
"privacy": "private"
|
|
2835
|
-
},
|
|
2836
|
-
{
|
|
2837
|
-
"kind": "field",
|
|
2838
|
-
"name": "cachedErrorScopes",
|
|
2839
|
-
"type": {
|
|
2840
|
-
"text": "string[]"
|
|
2841
|
-
},
|
|
2842
|
-
"privacy": "private",
|
|
2843
|
-
"default": "[]"
|
|
2844
|
-
},
|
|
2845
2820
|
{
|
|
2846
2821
|
"kind": "method",
|
|
2847
2822
|
"name": "controlChanged"
|
|
@@ -2891,25 +2866,6 @@
|
|
|
2891
2866
|
}
|
|
2892
2867
|
}
|
|
2893
2868
|
]
|
|
2894
|
-
},
|
|
2895
|
-
{
|
|
2896
|
-
"kind": "method",
|
|
2897
|
-
"name": "getErrorScopes",
|
|
2898
|
-
"privacy": "private",
|
|
2899
|
-
"return": {
|
|
2900
|
-
"type": {
|
|
2901
|
-
"text": "string[]"
|
|
2902
|
-
}
|
|
2903
|
-
},
|
|
2904
|
-
"parameters": [
|
|
2905
|
-
{
|
|
2906
|
-
"name": "core",
|
|
2907
|
-
"type": {
|
|
2908
|
-
"text": "JsonFormsCore"
|
|
2909
|
-
}
|
|
2910
|
-
}
|
|
2911
|
-
],
|
|
2912
|
-
"description": "`hasCategoryError` is called once per tab per render pass, so recomputing\nscopes N times would repeat the same array-merge + regex work. JSONForms\nkeeps the `errors`/`additionalErrors` array references stable across\nrenders unless validation actually re-runs, so reference-equality caching\nis enough to collapse the per-render cost to a single computation."
|
|
2913
2869
|
}
|
|
2914
2870
|
],
|
|
2915
2871
|
"superclass": {
|
|
@@ -4912,43 +4868,6 @@
|
|
|
4912
4868
|
"module": "src/jsonforms/renderers/CategorizationWrapperRenderer.ts"
|
|
4913
4869
|
}
|
|
4914
4870
|
},
|
|
4915
|
-
{
|
|
4916
|
-
"kind": "field",
|
|
4917
|
-
"name": "lastErrors",
|
|
4918
|
-
"type": {
|
|
4919
|
-
"text": "ErrorObject[] | undefined"
|
|
4920
|
-
},
|
|
4921
|
-
"privacy": "private",
|
|
4922
|
-
"inheritedFrom": {
|
|
4923
|
-
"name": "CategorizationWrapper",
|
|
4924
|
-
"module": "src/jsonforms/renderers/CategorizationWrapperRenderer.ts"
|
|
4925
|
-
}
|
|
4926
|
-
},
|
|
4927
|
-
{
|
|
4928
|
-
"kind": "field",
|
|
4929
|
-
"name": "lastAdditionalErrors",
|
|
4930
|
-
"type": {
|
|
4931
|
-
"text": "ErrorObject[] | undefined"
|
|
4932
|
-
},
|
|
4933
|
-
"privacy": "private",
|
|
4934
|
-
"inheritedFrom": {
|
|
4935
|
-
"name": "CategorizationWrapper",
|
|
4936
|
-
"module": "src/jsonforms/renderers/CategorizationWrapperRenderer.ts"
|
|
4937
|
-
}
|
|
4938
|
-
},
|
|
4939
|
-
{
|
|
4940
|
-
"kind": "field",
|
|
4941
|
-
"name": "cachedErrorScopes",
|
|
4942
|
-
"type": {
|
|
4943
|
-
"text": "string[]"
|
|
4944
|
-
},
|
|
4945
|
-
"privacy": "private",
|
|
4946
|
-
"default": "[]",
|
|
4947
|
-
"inheritedFrom": {
|
|
4948
|
-
"name": "CategorizationWrapper",
|
|
4949
|
-
"module": "src/jsonforms/renderers/CategorizationWrapperRenderer.ts"
|
|
4950
|
-
}
|
|
4951
|
-
},
|
|
4952
4871
|
{
|
|
4953
4872
|
"kind": "method",
|
|
4954
4873
|
"name": "controlChanged",
|
|
@@ -5014,29 +4933,6 @@
|
|
|
5014
4933
|
"name": "CategorizationWrapper",
|
|
5015
4934
|
"module": "src/jsonforms/renderers/CategorizationWrapperRenderer.ts"
|
|
5016
4935
|
}
|
|
5017
|
-
},
|
|
5018
|
-
{
|
|
5019
|
-
"kind": "method",
|
|
5020
|
-
"name": "getErrorScopes",
|
|
5021
|
-
"privacy": "private",
|
|
5022
|
-
"return": {
|
|
5023
|
-
"type": {
|
|
5024
|
-
"text": "string[]"
|
|
5025
|
-
}
|
|
5026
|
-
},
|
|
5027
|
-
"parameters": [
|
|
5028
|
-
{
|
|
5029
|
-
"name": "core",
|
|
5030
|
-
"type": {
|
|
5031
|
-
"text": "JsonFormsCore"
|
|
5032
|
-
}
|
|
5033
|
-
}
|
|
5034
|
-
],
|
|
5035
|
-
"description": "`hasCategoryError` is called once per tab per render pass, so recomputing\nscopes N times would repeat the same array-merge + regex work. JSONForms\nkeeps the `errors`/`additionalErrors` array references stable across\nrenders unless validation actually re-runs, so reference-equality caching\nis enough to collapse the per-render cost to a single computation.",
|
|
5036
|
-
"inheritedFrom": {
|
|
5037
|
-
"name": "CategorizationWrapper",
|
|
5038
|
-
"module": "src/jsonforms/renderers/CategorizationWrapperRenderer.ts"
|
|
5039
|
-
}
|
|
5040
4936
|
}
|
|
5041
4937
|
],
|
|
5042
4938
|
"attributes": [
|
|
@@ -26,20 +26,9 @@ export declare class CategorizationWrapper extends FASTElement {
|
|
|
26
26
|
* initial tab is applied once; thereafter the user's own navigation wins.
|
|
27
27
|
*/
|
|
28
28
|
private hasAppliedActiveCategory;
|
|
29
|
-
private lastErrors?;
|
|
30
|
-
private lastAdditionalErrors?;
|
|
31
|
-
private cachedErrorScopes;
|
|
32
29
|
controlChanged(): void;
|
|
33
30
|
isMounted(index: number): boolean;
|
|
34
31
|
handleTabChange(event: Event): void;
|
|
35
32
|
hasCategoryError(categoryIndex: number): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* `hasCategoryError` is called once per tab per render pass, so recomputing
|
|
38
|
-
* scopes N times would repeat the same array-merge + regex work. JSONForms
|
|
39
|
-
* keeps the `errors`/`additionalErrors` array references stable across
|
|
40
|
-
* renders unless validation actually re-runs, so reference-equality caching
|
|
41
|
-
* is enough to collapse the per-render cost to a single computation.
|
|
42
|
-
*/
|
|
43
|
-
private getErrorScopes;
|
|
44
33
|
}
|
|
45
34
|
//# sourceMappingURL=CategorizationWrapperRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategorizationWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/CategorizationWrapperRenderer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CategorizationWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/CategorizationWrapperRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,WAAW,EAIZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,QAAQ,EAAE,eAAe,EAAE,GAC1B,MAAM,CAKR;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,GAAG,MAAM,CAMrF;AAED,eAAO,MAAM,oBAAoB,iDAKhC,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAChD,eAAe,+EA6DhB,CAAC;AAkBF,qBAQa,qBAAsB,SAAQ,WAAW;IACxC,IAAI,MAAC;IACL,OAAO,MAAC;IACR,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAgB;IACxC,cAAc,EAAE,MAAM,CAAK;IAEvC;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB,CAAS;IAEzC,cAAc;IAUd,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIjC,eAAe,CAAC,KAAK,EAAE,KAAK;IAQ5B,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;CAQjD"}
|
|
@@ -103,7 +103,6 @@ let CategorizationWrapper = class CategorizationWrapper extends FASTElement {
|
|
|
103
103
|
* initial tab is applied once; thereafter the user's own navigation wins.
|
|
104
104
|
*/
|
|
105
105
|
this.hasAppliedActiveCategory = false;
|
|
106
|
-
this.cachedErrorScopes = [];
|
|
107
106
|
}
|
|
108
107
|
controlChanged() {
|
|
109
108
|
var _a, _b;
|
|
@@ -130,32 +129,13 @@ let CategorizationWrapper = class CategorizationWrapper extends FASTElement {
|
|
|
130
129
|
this.mountedTabs = new Set(this.mountedTabs).add(index);
|
|
131
130
|
}
|
|
132
131
|
hasCategoryError(categoryIndex) {
|
|
133
|
-
var _a, _b, _c, _d;
|
|
134
|
-
|
|
135
|
-
if (!elements)
|
|
132
|
+
var _a, _b, _c, _d, _e;
|
|
133
|
+
if (!((_c = (_b = (_a = this.form) === null || _a === void 0 ? void 0 : _a.jsonforms) === null || _b === void 0 ? void 0 : _b.core) === null || _c === void 0 ? void 0 : _c.errors) || !((_e = (_d = this.control) === null || _d === void 0 ? void 0 : _d.uischema) === null || _e === void 0 ? void 0 : _e.elements)) {
|
|
136
134
|
return false;
|
|
137
|
-
const errorScopes = this.getErrorScopes((_d = (_c = this.form) === null || _c === void 0 ? void 0 : _c.jsonforms) === null || _d === void 0 ? void 0 : _d.core);
|
|
138
|
-
if (errorScopes.length === 0)
|
|
139
|
-
return false;
|
|
140
|
-
return uiSchemaHasAnyError(elements[categoryIndex], errorScopes);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* `hasCategoryError` is called once per tab per render pass, so recomputing
|
|
144
|
-
* scopes N times would repeat the same array-merge + regex work. JSONForms
|
|
145
|
-
* keeps the `errors`/`additionalErrors` array references stable across
|
|
146
|
-
* renders unless validation actually re-runs, so reference-equality caching
|
|
147
|
-
* is enough to collapse the per-render cost to a single computation.
|
|
148
|
-
*/
|
|
149
|
-
getErrorScopes(core) {
|
|
150
|
-
const errors = core === null || core === void 0 ? void 0 : core.errors;
|
|
151
|
-
const additionalErrors = core === null || core === void 0 ? void 0 : core.additionalErrors;
|
|
152
|
-
if (errors === this.lastErrors && additionalErrors === this.lastAdditionalErrors) {
|
|
153
|
-
return this.cachedErrorScopes;
|
|
154
135
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
return this.cachedErrorScopes;
|
|
136
|
+
const category = this.control.uischema.elements[categoryIndex];
|
|
137
|
+
const errorScopes = extractErrorScopes(this.form.jsonforms.core.errors);
|
|
138
|
+
return uiSchemaHasAnyError(category, errorScopes);
|
|
159
139
|
}
|
|
160
140
|
};
|
|
161
141
|
__decorate([
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-forms",
|
|
3
3
|
"description": "Genesis Foundation Forms",
|
|
4
|
-
"version": "15.23.1-
|
|
4
|
+
"version": "15.23.1-agent-rules.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@genesislcap/foundation-testing": "15.23.1-
|
|
63
|
-
"@genesislcap/genx": "15.23.1-
|
|
64
|
-
"@genesislcap/rollup-builder": "15.23.1-
|
|
65
|
-
"@genesislcap/ts-builder": "15.23.1-
|
|
66
|
-
"@genesislcap/uvu-playwright-builder": "15.23.1-
|
|
67
|
-
"@genesislcap/vite-builder": "15.23.1-
|
|
68
|
-
"@genesislcap/webpack-builder": "15.23.1-
|
|
62
|
+
"@genesislcap/foundation-testing": "15.23.1-agent-rules.1",
|
|
63
|
+
"@genesislcap/genx": "15.23.1-agent-rules.1",
|
|
64
|
+
"@genesislcap/rollup-builder": "15.23.1-agent-rules.1",
|
|
65
|
+
"@genesislcap/ts-builder": "15.23.1-agent-rules.1",
|
|
66
|
+
"@genesislcap/uvu-playwright-builder": "15.23.1-agent-rules.1",
|
|
67
|
+
"@genesislcap/vite-builder": "15.23.1-agent-rules.1",
|
|
68
|
+
"@genesislcap/webpack-builder": "15.23.1-agent-rules.1",
|
|
69
69
|
"@types/json-schema": "^7.0.11",
|
|
70
70
|
"@types/papaparse": "^5.3.14"
|
|
71
71
|
},
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@genesislcap/foundation-comms": "15.23.1-
|
|
86
|
-
"@genesislcap/foundation-criteria": "15.23.1-
|
|
87
|
-
"@genesislcap/foundation-logger": "15.23.1-
|
|
88
|
-
"@genesislcap/foundation-notifications": "15.23.1-
|
|
89
|
-
"@genesislcap/foundation-ui": "15.23.1-
|
|
90
|
-
"@genesislcap/foundation-utils": "15.23.1-
|
|
85
|
+
"@genesislcap/foundation-comms": "15.23.1-agent-rules.1",
|
|
86
|
+
"@genesislcap/foundation-criteria": "15.23.1-agent-rules.1",
|
|
87
|
+
"@genesislcap/foundation-logger": "15.23.1-agent-rules.1",
|
|
88
|
+
"@genesislcap/foundation-notifications": "15.23.1-agent-rules.1",
|
|
89
|
+
"@genesislcap/foundation-ui": "15.23.1-agent-rules.1",
|
|
90
|
+
"@genesislcap/foundation-utils": "15.23.1-agent-rules.1",
|
|
91
91
|
"@json-schema-tools/dereferencer": "^1.6.1",
|
|
92
92
|
"@jsonforms/core": "^3.2.1",
|
|
93
93
|
"@microsoft/fast-components": "2.30.6",
|