@abgov/jsonforms-components 2.67.2 → 2.67.4

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
@@ -12224,6 +12224,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
12224
12224
  return err.instancePath.includes(rowPath);
12225
12225
  })) == null ? void 0 : _errors$filter.length) > 0 : false;
12226
12226
  return jsxs(NonEmptyCellStyle, {
12227
+ "data-testid": `${rowPath}-ObjectListOuterWrapper`,
12227
12228
  children: [!isInReview && (uischema == null || (_uischema$elements = uischema.elements) == null ? void 0 : _uischema$elements.map(element => {
12228
12229
  return jsx(JsonFormsDispatch, {
12229
12230
  "data-testid": `jsonforms-object-list-defined-elements-dispatch`,
@@ -12239,7 +12240,8 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
12239
12240
  style: {
12240
12241
  padding: '0.75rem 0'
12241
12242
  },
12242
- children: range(count || 0).map(i => {
12243
+ "data-testid": `${rowPath}.objectListWrapper`,
12244
+ children: range(count || 0).map((i, key) => {
12243
12245
  const rowData = data && data[i];
12244
12246
  if (!rowData) return null;
12245
12247
  const hasAnyValue = Object.keys(tableKeys).some(key => {
@@ -12252,6 +12254,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
12252
12254
  style: {
12253
12255
  marginBottom: '1.5rem'
12254
12256
  },
12257
+ "data-testid": `${rowPath}.objectList-${key}`,
12255
12258
  children: Object.entries(tableKeys).map(([key, label]) => {
12256
12259
  var _required$includes, _properties$key;
12257
12260
  const value = rowData[key];
@@ -12279,6 +12282,7 @@ const NonEmptyCellComponent = /*#__PURE__*/React.memo(function NonEmptyCellCompo
12279
12282
  marginBottom: '0.5rem',
12280
12283
  alignItems: 'center'
12281
12284
  },
12285
+ "data-testid": `#/properties/${key}-input-${i}-row`,
12282
12286
  children: [jsxs("strong", {
12283
12287
  style: {
12284
12288
  width: '50%',
@@ -15130,7 +15134,6 @@ let _2 = t => t,
15130
15134
  _t3,
15131
15135
  _t4;
15132
15136
  const _excluded$1 = ["data", "path", "handleChange", "uischema"];
15133
- const DELAY_DELETE_TIMEOUT_MS = 5;
15134
15137
  const FileUploaderReview = props => {
15135
15138
  return FileUploader(Object.assign({}, props, {
15136
15139
  isStepperReview: true
@@ -15172,6 +15175,7 @@ const FileUploader = _ref => {
15172
15175
  const noDownloadButtonInReview = uischema == null || (_uischema$options3 = uischema.options) == null || (_uischema$options3 = _uischema$options3.format) == null || (_uischema$options3 = _uischema$options3.review) == null ? void 0 : _uischema$options3.noDownloadButton;
15173
15176
  const noDeleteButton = uischema == null || (_uischema$options4 = uischema.options) == null || (_uischema$options4 = _uischema$options4.format) == null || (_uischema$options4 = _uischema$options4.review) == null ? void 0 : _uischema$options4.noDeleteButton;
15174
15177
  const [deleteHide, setDeleteHide] = useState(false);
15178
+ const [deleteConfirmIndex, setDeleteConfirmIndex] = useState(null);
15175
15179
  const fileListLength = fileList && ((_fileList$path = fileList[path]) == null ? void 0 : _fileList$path.length) || 0;
15176
15180
  const maxFiles = (_uischema$options$com = uischema == null || (_uischema$options5 = uischema.options) == null || (_uischema$options5 = _uischema$options5.componentProps) == null ? void 0 : _uischema$options5.maximum) != null ? _uischema$options$com : 1;
15177
15181
  const isMultiFile = maxFiles > 1;
@@ -15238,11 +15242,9 @@ const FileUploader = _ref => {
15238
15242
  }
15239
15243
  const helpText = uischema == null || (_uischema$options9 = uischema.options) == null ? void 0 : _uischema$options9.help;
15240
15244
  const sentenceCaseLabel = label;
15241
- const DownloadFileWidget = ({
15242
- index
15243
- }) => {
15245
+ const renderFileItem = index => {
15244
15246
  var _getFile2;
15245
- const [showFileDeleteConfirmation, setShowFileDeleteConfirmation] = useState(false);
15247
+ const showFileDeleteConfirmation = deleteConfirmIndex === index;
15246
15248
  return jsx("div", {
15247
15249
  children: readOnly ? jsxs(AttachmentBorderDisabled, {
15248
15250
  children: [getFileName(index), noDownloadButtonInReview !== true && jsx(GoAContextMenuIcon, {
@@ -15265,22 +15267,20 @@ const FileUploader = _ref => {
15265
15267
  title: "Delete",
15266
15268
  type: "trash",
15267
15269
  onClick: () => {
15268
- setShowFileDeleteConfirmation(true);
15270
+ setDeleteConfirmIndex(index);
15269
15271
  }
15270
15272
  })]
15271
15273
  }), jsx(DeleteFileModal, {
15272
15274
  isOpen: showFileDeleteConfirmation,
15273
15275
  title: "Delete file",
15274
15276
  content: `Delete file ${(_getFile2 = getFile(index)) == null ? void 0 : _getFile2.filename} ?`,
15275
- onCancel: () => setShowFileDeleteConfirmation(false),
15277
+ onCancel: () => setDeleteConfirmIndex(null),
15276
15278
  onDelete: () => {
15277
- setShowFileDeleteConfirmation(false);
15279
+ setDeleteConfirmIndex(null);
15278
15280
  deleteFile(getFile(index));
15279
- setDeleteHide(true);
15280
- const handleFunction = () => {
15281
- handleChange(path, undefined);
15282
- };
15283
- setTimeout(handleFunction, DELAY_DELETE_TIMEOUT_MS);
15281
+ if (!isMultiFile) {
15282
+ setDeleteHide(true);
15283
+ }
15284
15284
  setUploadError(undefined);
15285
15285
  }
15286
15286
  })]
@@ -15320,11 +15320,9 @@ const FileUploader = _ref => {
15320
15320
  })
15321
15321
  })
15322
15322
  }) : jsx("div", {
15323
- children: fileList && isMultiFile ? (fileList[path] || []).map((_, index) => jsx(DownloadFileWidget, {
15324
- index: index
15325
- }, index)) : !deleteHide && getFile(fileListLength - 1) && fileListLength >= 0 && jsx(DownloadFileWidget, {
15326
- index: fileListLength - 1
15327
- })
15323
+ children: (fileList && isMultiFile ? (fileList[path] || []).map((_, i) => i) : !deleteHide && getFile(fileListLength - 1) && fileListLength >= 0 ? [fileListLength - 1] : []).map(index => jsx(React.Fragment, {
15324
+ children: renderFileItem(index)
15325
+ }, index))
15328
15326
  })
15329
15327
  })]
15330
15328
  })
@@ -18775,7 +18773,8 @@ const createDefaultAjv = (...schemas) => {
18775
18773
  verbose: true,
18776
18774
  strict: 'log',
18777
18775
  strictRequired: false,
18778
- useDefaults: true
18776
+ useDefaults: true,
18777
+ multipleOfPrecision: 10
18779
18778
  });
18780
18779
  ajv.addSchema(schemas);
18781
18780
  addErrors(ajv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.67.2",
3
+ "version": "2.67.4",
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-06-18T16:41:22.993Z",
4
- "sourceCommit": "935fd9b2672ecf9a0c6019a7163a26a91bdfc5b9",
3
+ "generatedAt": "2026-06-18T23:02:38.773Z",
4
+ "sourceCommit": "a11893a6b14d54431cea0c80f6b76541409ac67b",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 33,
7
7
  "renderers": [