@abgov/jsonforms-components 2.67.3 → 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 +14 -19
- package/package.json +1 -1
- package/renderer-catalog.json +2 -2
package/index.esm.js
CHANGED
|
@@ -15134,7 +15134,6 @@ let _2 = t => t,
|
|
|
15134
15134
|
_t3,
|
|
15135
15135
|
_t4;
|
|
15136
15136
|
const _excluded$1 = ["data", "path", "handleChange", "uischema"];
|
|
15137
|
-
const DELAY_DELETE_TIMEOUT_MS = 5;
|
|
15138
15137
|
const FileUploaderReview = props => {
|
|
15139
15138
|
return FileUploader(Object.assign({}, props, {
|
|
15140
15139
|
isStepperReview: true
|
|
@@ -15176,6 +15175,7 @@ const FileUploader = _ref => {
|
|
|
15176
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;
|
|
15177
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;
|
|
15178
15177
|
const [deleteHide, setDeleteHide] = useState(false);
|
|
15178
|
+
const [deleteConfirmIndex, setDeleteConfirmIndex] = useState(null);
|
|
15179
15179
|
const fileListLength = fileList && ((_fileList$path = fileList[path]) == null ? void 0 : _fileList$path.length) || 0;
|
|
15180
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;
|
|
15181
15181
|
const isMultiFile = maxFiles > 1;
|
|
@@ -15242,11 +15242,9 @@ const FileUploader = _ref => {
|
|
|
15242
15242
|
}
|
|
15243
15243
|
const helpText = uischema == null || (_uischema$options9 = uischema.options) == null ? void 0 : _uischema$options9.help;
|
|
15244
15244
|
const sentenceCaseLabel = label;
|
|
15245
|
-
const
|
|
15246
|
-
index
|
|
15247
|
-
}) => {
|
|
15245
|
+
const renderFileItem = index => {
|
|
15248
15246
|
var _getFile2;
|
|
15249
|
-
const
|
|
15247
|
+
const showFileDeleteConfirmation = deleteConfirmIndex === index;
|
|
15250
15248
|
return jsx("div", {
|
|
15251
15249
|
children: readOnly ? jsxs(AttachmentBorderDisabled, {
|
|
15252
15250
|
children: [getFileName(index), noDownloadButtonInReview !== true && jsx(GoAContextMenuIcon, {
|
|
@@ -15269,22 +15267,20 @@ const FileUploader = _ref => {
|
|
|
15269
15267
|
title: "Delete",
|
|
15270
15268
|
type: "trash",
|
|
15271
15269
|
onClick: () => {
|
|
15272
|
-
|
|
15270
|
+
setDeleteConfirmIndex(index);
|
|
15273
15271
|
}
|
|
15274
15272
|
})]
|
|
15275
15273
|
}), jsx(DeleteFileModal, {
|
|
15276
15274
|
isOpen: showFileDeleteConfirmation,
|
|
15277
15275
|
title: "Delete file",
|
|
15278
15276
|
content: `Delete file ${(_getFile2 = getFile(index)) == null ? void 0 : _getFile2.filename} ?`,
|
|
15279
|
-
onCancel: () =>
|
|
15277
|
+
onCancel: () => setDeleteConfirmIndex(null),
|
|
15280
15278
|
onDelete: () => {
|
|
15281
|
-
|
|
15279
|
+
setDeleteConfirmIndex(null);
|
|
15282
15280
|
deleteFile(getFile(index));
|
|
15283
|
-
|
|
15284
|
-
|
|
15285
|
-
|
|
15286
|
-
};
|
|
15287
|
-
setTimeout(handleFunction, DELAY_DELETE_TIMEOUT_MS);
|
|
15281
|
+
if (!isMultiFile) {
|
|
15282
|
+
setDeleteHide(true);
|
|
15283
|
+
}
|
|
15288
15284
|
setUploadError(undefined);
|
|
15289
15285
|
}
|
|
15290
15286
|
})]
|
|
@@ -15324,11 +15320,9 @@ const FileUploader = _ref => {
|
|
|
15324
15320
|
})
|
|
15325
15321
|
})
|
|
15326
15322
|
}) : jsx("div", {
|
|
15327
|
-
children: fileList && isMultiFile ? (fileList[path] || []).map((_,
|
|
15328
|
-
|
|
15329
|
-
}, index))
|
|
15330
|
-
index: fileListLength - 1
|
|
15331
|
-
})
|
|
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))
|
|
15332
15326
|
})
|
|
15333
15327
|
})]
|
|
15334
15328
|
})
|
|
@@ -18779,7 +18773,8 @@ const createDefaultAjv = (...schemas) => {
|
|
|
18779
18773
|
verbose: true,
|
|
18780
18774
|
strict: 'log',
|
|
18781
18775
|
strictRequired: false,
|
|
18782
|
-
useDefaults: true
|
|
18776
|
+
useDefaults: true,
|
|
18777
|
+
multipleOfPrecision: 10
|
|
18783
18778
|
});
|
|
18784
18779
|
ajv.addSchema(schemas);
|
|
18785
18780
|
addErrors(ajv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.67.
|
|
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",
|
package/renderer-catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-06-
|
|
4
|
-
"sourceCommit": "
|
|
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": [
|