@abgov/jsonforms-components 2.74.0 → 2.74.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/index.esm.js +24 -8
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -8325,6 +8325,12 @@ const createAutoPopulateMiddleware = (uischema, user) => (state, action, default
|
|
|
8325
8325
|
*/
|
|
8326
8326
|
const autoPopulatePropertiesMonaco = [];
|
|
8327
8327
|
|
|
8328
|
+
// clean-code-ignore: RULE-19 — see the file-header note; ./context.spec.tsx covers this.
|
|
8329
|
+
// A shared empty default: a fresh [] on every render would read as a change and hand consumers a
|
|
8330
|
+
// new context value for nothing.
|
|
8331
|
+
const NO_AUTO_POPULATED_DATA = [];
|
|
8332
|
+
// The props a host can change after mount. See the note where they are applied.
|
|
8333
|
+
const HOST_CONTROLLED_KEYS = ['formUrl', 'isFormSubmitted', 'showChangeButtons', 'autoPopulatedData', 'formId', 'navigationTarget', 'onNavigationChange'];
|
|
8328
8334
|
class ContextProviderClass {
|
|
8329
8335
|
async addDataByUrl(key, url, processDataFunction, token) {
|
|
8330
8336
|
let header = {};
|
|
@@ -8393,15 +8399,25 @@ class ContextProviderClass {
|
|
|
8393
8399
|
if (!props.children) {
|
|
8394
8400
|
return null;
|
|
8395
8401
|
}
|
|
8396
|
-
|
|
8397
|
-
|
|
8402
|
+
// Everything below is a value a host can change while the form is mounted, so it is applied by
|
|
8403
|
+
// replacing the enumerator rather than by writing into it. The consumers all sit behind
|
|
8404
|
+
// JsonForms' memoised renderers, which re-render only when the form's own state changes — React
|
|
8405
|
+
// reaches past that memoisation for a context consumer, but only when the provider's value is a
|
|
8406
|
+
// different object. Mutating the enumerator in place left every one of these stale until
|
|
8407
|
+
// something else happened to re-render the form: a navigation target a host set on a Change
|
|
8408
|
+
// click was simply never seen.
|
|
8409
|
+
const next = Object.assign({}, this.baseEnumerator, {
|
|
8410
|
+
formUrl: props.formUrl || this.baseEnumerator.formUrl,
|
|
8411
|
+
isFormSubmitted: (_props$isFormSubmitte = props.isFormSubmitted) != null ? _props$isFormSubmitte : false,
|
|
8412
|
+
showChangeButtons: (_props$showChangeButt = props.showChangeButtons) != null ? _props$showChangeButt : true,
|
|
8413
|
+
autoPopulatedData: (_props$autoPopulatedD = props.autoPopulatedData) != null ? _props$autoPopulatedD : NO_AUTO_POPULATED_DATA,
|
|
8414
|
+
formId: props.formId,
|
|
8415
|
+
navigationTarget: props.navigationTarget,
|
|
8416
|
+
onNavigationChange: props.onNavigationChange
|
|
8417
|
+
});
|
|
8418
|
+
if (HOST_CONTROLLED_KEYS.some(key => next[key] !== this.baseEnumerator[key])) {
|
|
8419
|
+
this.baseEnumerator = next;
|
|
8398
8420
|
}
|
|
8399
|
-
this.baseEnumerator.isFormSubmitted = (_props$isFormSubmitte = props.isFormSubmitted) != null ? _props$isFormSubmitte : false;
|
|
8400
|
-
this.baseEnumerator.showChangeButtons = (_props$showChangeButt = props.showChangeButtons) != null ? _props$showChangeButt : true;
|
|
8401
|
-
this.baseEnumerator.autoPopulatedData = (_props$autoPopulatedD = props.autoPopulatedData) != null ? _props$autoPopulatedD : [];
|
|
8402
|
-
this.baseEnumerator.formId = props.formId;
|
|
8403
|
-
this.baseEnumerator.navigationTarget = props.navigationTarget;
|
|
8404
|
-
this.baseEnumerator.onNavigationChange = props.onNavigationChange;
|
|
8405
8421
|
return jsx(JsonFormContext.Provider, {
|
|
8406
8422
|
value: this.baseEnumerator,
|
|
8407
8423
|
children: (_this$selfProps = this.selfProps) == null ? void 0 : _this$selfProps.children
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.74.
|
|
3
|
+
"version": "2.74.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
|
|
6
6
|
"repository": "https://github.com/GovAlta/adsp-monorepo",
|
package/renderer-catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-09-
|
|
4
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-09-03T22:56:39.161Z",
|
|
4
|
+
"sourceCommit": "169c6d54a69229f169a5ceae66539c141522e350",
|
|
5
5
|
"sourcePath": "libs/jsonforms-components/src/index.ts",
|
|
6
6
|
"rendererCount": 33,
|
|
7
7
|
"renderers": [
|