@abgov/jsonforms-components 2.55.0 → 2.55.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 CHANGED
@@ -7214,7 +7214,7 @@ const GoAInputText = props => {
7214
7214
  });
7215
7215
  };
7216
7216
  const InnerGoAInputText = props => {
7217
- var _ref, _ref2, _uischema$options$com, _uischema$options, _props$uischema, _props$uischema2, _uischema$options2, _uischema$options3, _uischema$options$com2, _uischema$options4, _uischema$options5, _uischema$options6;
7217
+ var _ref, _ref2, _schema$default, _uischema$options$com, _uischema$options, _props$uischema, _props$uischema2, _uischema$options2, _uischema$options3, _uischema$options$com2, _uischema$options4, _uischema$options5, _uischema$options6;
7218
7218
  const {
7219
7219
  data,
7220
7220
  config,
@@ -7230,21 +7230,29 @@ const InnerGoAInputText = props => {
7230
7230
  setIsVisited
7231
7231
  } = props;
7232
7232
  const user = useRegisterUser();
7233
- const initialValue = (_ref = (_ref2 = user && autoPopulateValue(user, props)) != null ? _ref2 : data) != null ? _ref : '';
7233
+ const initialValue = (_ref = (_ref2 = (_schema$default = schema.default) != null ? _schema$default : user && autoPopulateValue(user, props)) != null ? _ref2 : data) != null ? _ref : '';
7234
7234
  const [localValue, setLocalValue] = useState(initialValue);
7235
7235
  const debouncedValue = useDebounce(localValue, 300);
7236
7236
  useEffect(() => {
7237
- setLocalValue(initialValue);
7237
+ setLocalValue(data);
7238
7238
  }, [data]);
7239
7239
  useEffect(() => {
7240
+ if (!user || data) return;
7240
7241
  const autoPopulatedValue = schema.default || user && autoPopulateValue(user, props);
7241
7242
  if (autoPopulatedValue && autoPopulatedValue !== data) {
7242
7243
  handleChange(props.path, autoPopulatedValue);
7243
7244
  }
7244
7245
  // eslint-disable-next-line react-hooks/exhaustive-deps
7245
- }, [schema, data, user]);
7246
+ }, [schema, user]);
7247
+ useEffect(() => {
7248
+ if (typeof handleChange === 'function' && (schema == null ? void 0 : schema.default) !== undefined) {
7249
+ handleChange(props.path, schema.default);
7250
+ }
7251
+ // eslint-disable-next-line react-hooks/exhaustive-deps
7252
+ }, [schema.default]);
7246
7253
  /* istanbul ignore next */
7247
7254
  useEffect(() => {
7255
+ if (debouncedValue === data) return;
7248
7256
  // Only sync if debouncedValue differs from data and is not initial empty state
7249
7257
  if (debouncedValue !== data && (debouncedValue !== '' || data !== undefined)) {
7250
7258
  onChangeForInputControl({
@@ -10166,12 +10174,19 @@ const GoAEmailInput = props => {
10166
10174
  splitErrors[splintIndex] = `${primaryLabel} is required`;
10167
10175
  const finalErrors = splitErrors.join('\n');
10168
10176
  useEffect(() => {
10177
+ if (!user || data) return;
10169
10178
  const autoPopulatedValue = schema.default || user && autoPopulateValue(user, props);
10170
10179
  if (autoPopulatedValue && autoPopulatedValue !== data) {
10171
10180
  handleChange(props.path, autoPopulatedValue);
10172
10181
  }
10173
10182
  // eslint-disable-next-line react-hooks/exhaustive-deps
10174
- }, [schema, data, user]);
10183
+ }, [schema, user]);
10184
+ useEffect(() => {
10185
+ if (typeof handleChange === 'function' && (schema == null ? void 0 : schema.default) !== undefined) {
10186
+ handleChange(props.path, schema.default);
10187
+ }
10188
+ // eslint-disable-next-line react-hooks/exhaustive-deps
10189
+ }, [schema.default]);
10175
10190
  return jsx(Visible, {
10176
10191
  visible: visible,
10177
10192
  children: jsx(JsonFormRegisterProvider, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.55.0",
3
+ "version": "2.55.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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-03-13T21:22:44.360Z",
4
- "sourceCommit": "5047dd40017f2ab1c4c03f0c795313e703317099",
3
+ "generatedAt": "2026-03-16T20:36:57.025Z",
4
+ "sourceCommit": "e0ba3a1eada96011e94c8b3964d421fc77539775",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 32,
7
7
  "renderers": [