@abgov/jsonforms-components 2.48.0 → 2.48.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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as runtime from 'react/jsx-runtime';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React, { createContext, useContext, useReducer, useMemo, useEffect, useCallback, useRef, useState, useLayoutEffect } from 'react';
|
|
4
|
-
import { GoabFormItem, GoabInput, GoabTextArea, GoabCallout, GoabRadioGroup, GoabRadioItem, GoabCheckbox, GoabIcon, GoabButton, GoabGrid, GoabIconButton, GoabModal, GoabButtonGroup,
|
|
4
|
+
import { GoabFormItem, GoabInput, GoabTextArea, GoabCallout, GoabRadioGroup, GoabRadioItem, GoabCheckbox, GoabIcon, GoabButton, GoabGrid, GoabIconButton, GoabTable, GoabModal, GoabButtonGroup, GoabContainer, GoabDropdown, GoabDropdownItem, GoabDetails, GoabFormStepper, GoabFormStep, GoabPages, GoabBadge, GoabText, GoabFileUploadInput, GoabCircularProgress, GoabSpinner } from '@abgov/react-components';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import get$1 from 'lodash/get';
|
|
8
|
-
import { isVisible, isEnabled, deriveLabelForUISchemaElement, rankWith, isStringControl, and, optionIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, uiTypeIs, isControl as isControl$1, isEnumControl, isBooleanControl, createDefaultValue, Paths,
|
|
8
|
+
import { isVisible, isEnabled, deriveLabelForUISchemaElement, rankWith, isStringControl, and, optionIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, uiTypeIs, isControl as isControl$1, isEnumControl, isBooleanControl, createDefaultValue, Paths, Resolve, toDataPath, schemaMatches, getAjv, or, isObjectArrayControl, isPrimitiveArrayControl, composePaths, schemaTypeIs, formatIs, hasType, isCategorization, isLayout } from '@jsonforms/core';
|
|
9
9
|
import * as _$c from 'lodash';
|
|
10
10
|
import ___default, { isEqual, isObject as isObject$i, isEmpty as isEmpty$1 } from 'lodash';
|
|
11
11
|
import { useJsonForms, withJsonFormsControlProps, withJsonFormsEnumProps, withTranslateProps, JsonFormsDispatch, withJsonFormsAllOfProps, withJsonFormsArrayLayoutProps, withJsonFormsLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
|
|
@@ -8698,7 +8698,9 @@ let _$7 = t => t,
|
|
|
8698
8698
|
_t23$1,
|
|
8699
8699
|
_t24$1,
|
|
8700
8700
|
_t25$1,
|
|
8701
|
-
_t26$1
|
|
8701
|
+
_t26$1,
|
|
8702
|
+
_t27$1,
|
|
8703
|
+
_t28$1;
|
|
8702
8704
|
const DeleteDialogContent = styled.div(_t$8 || (_t$8 = _$7`
|
|
8703
8705
|
margin-bottom: var(--goa-space-m);
|
|
8704
8706
|
`));
|
|
@@ -8730,9 +8732,7 @@ const TextCenter = styled.div(_t7$1 || (_t7$1 = _$7`
|
|
|
8730
8732
|
text-align: center;
|
|
8731
8733
|
`));
|
|
8732
8734
|
const SideMenuItem = styled.div(_t8$1 || (_t8$1 = _$7`
|
|
8733
|
-
|
|
8734
|
-
background: #f1f1f1;
|
|
8735
|
-
}
|
|
8735
|
+
margin-top: 1rem;
|
|
8736
8736
|
`));
|
|
8737
8737
|
const RowFlex = styled.div(_t9$1 || (_t9$1 = _$7`
|
|
8738
8738
|
display: flex;
|
|
@@ -8741,9 +8741,20 @@ const RowFlex = styled.div(_t9$1 || (_t9$1 = _$7`
|
|
|
8741
8741
|
`));
|
|
8742
8742
|
const RowFlexMenu = styled.div(_t0$1 || (_t0$1 = _$7`
|
|
8743
8743
|
display: flex;
|
|
8744
|
-
flex-direction:
|
|
8745
|
-
|
|
8746
|
-
|
|
8744
|
+
flex-direction: column;
|
|
8745
|
+
align-items: stretch;
|
|
8746
|
+
border: 1px solid var(--goa-color-greyscale-300);
|
|
8747
|
+
border-radius: var(--goa-border-radius-m);
|
|
8748
|
+
margin-top: var(--goa-space-xs);
|
|
8749
|
+
background-color: var(--goa-color-greyscale-white);
|
|
8750
|
+
padding: 0;
|
|
8751
|
+
gap: 0;
|
|
8752
|
+
position: relative;
|
|
8753
|
+
overflow: visible;
|
|
8754
|
+
|
|
8755
|
+
&:hover {
|
|
8756
|
+
border-color: var(--goa-color-greyscale-400);
|
|
8757
|
+
}
|
|
8747
8758
|
`));
|
|
8748
8759
|
const FlexTabs = styled.div(_t1$1 || (_t1$1 = _$7`
|
|
8749
8760
|
flex-direction: column;
|
|
@@ -8782,44 +8793,41 @@ const ListContainer = styled.div(_t14$1 || (_t14$1 = _$7`
|
|
|
8782
8793
|
styled.div(_t15$1 || (_t15$1 = _$7`
|
|
8783
8794
|
padding: 0 0 var(--goa-space-l) 0;
|
|
8784
8795
|
`));
|
|
8785
|
-
const
|
|
8786
|
-
padding: 0.9rem 0.5rem 0 0;
|
|
8787
|
-
`));
|
|
8788
|
-
const UpdateListContainer = styled.div(_t17$1 || (_t17$1 = _$7`
|
|
8796
|
+
const UpdateListContainer = styled.div(_t16$1 || (_t16$1 = _$7`
|
|
8789
8797
|
width: 100%;
|
|
8790
8798
|
border: 1px solid #dcdcdc;
|
|
8791
8799
|
padding: var(--goa-space-xl);
|
|
8792
8800
|
`));
|
|
8793
|
-
styled.div(
|
|
8801
|
+
styled.div(_t17$1 || (_t17$1 = _$7`
|
|
8794
8802
|
padding: 0 1.5rem 0 0;
|
|
8795
8803
|
border: 1px solid #dcdcdc;
|
|
8796
8804
|
`));
|
|
8797
|
-
const TableTHHeader = styled.th(
|
|
8805
|
+
const TableTHHeader = styled.th(_t18$1 || (_t18$1 = _$7`
|
|
8798
8806
|
background-color: var(--goa-color-greyscale-100) !important;
|
|
8799
8807
|
vertical-align: top;
|
|
8800
8808
|
`));
|
|
8801
|
-
const ObjectArrayWarningIconDiv = styled.div(
|
|
8809
|
+
const ObjectArrayWarningIconDiv = styled.div(_t19$1 || (_t19$1 = _$7`
|
|
8802
8810
|
display: inline-flex;
|
|
8803
8811
|
align-items: flex-start;
|
|
8804
8812
|
gap: 0.25rem;
|
|
8805
8813
|
font-size: var(--goa-font-size-2);
|
|
8806
8814
|
color: var(--goa-color-interactive-error);
|
|
8807
8815
|
`));
|
|
8808
|
-
const ListWithDetailWarningIconDiv = styled.div(
|
|
8816
|
+
const ListWithDetailWarningIconDiv = styled.div(_t20$1 || (_t20$1 = _$7`
|
|
8809
8817
|
display: inline-flex;
|
|
8810
8818
|
align-items: flex-start;
|
|
8811
8819
|
gap: 0.25rem;
|
|
8812
8820
|
font-size: var(--goa-font-size-3);
|
|
8813
8821
|
color: var(--goa-color-interactive-error);
|
|
8814
8822
|
`));
|
|
8815
|
-
styled.label(
|
|
8823
|
+
styled.label(_t21$1 || (_t21$1 = _$7`
|
|
8816
8824
|
color: var(--goa-color-interactive-error);
|
|
8817
8825
|
font-weight: var(--goa-font-weight-regular);
|
|
8818
8826
|
font-size: var(--goa-font-size-3);
|
|
8819
8827
|
line-height: var(--goa-line-height-1);
|
|
8820
8828
|
font-style: normal;
|
|
8821
8829
|
`));
|
|
8822
|
-
styled.div(
|
|
8830
|
+
styled.div(_t22$1 || (_t22$1 = _$7`
|
|
8823
8831
|
margin-top: var(--goa-space-m);
|
|
8824
8832
|
color: var(--goa-color-interactive-error);
|
|
8825
8833
|
font-weight: var(--goa-font-weight-regular);
|
|
@@ -8827,10 +8835,10 @@ styled.div(_t23$1 || (_t23$1 = _$7`
|
|
|
8827
8835
|
line-height: var(--goa-line-height-1);
|
|
8828
8836
|
font-style: normal;
|
|
8829
8837
|
`));
|
|
8830
|
-
const HilightCellWarning = styled.div(
|
|
8838
|
+
const HilightCellWarning = styled.div(_t23$1 || (_t23$1 = _$7`
|
|
8831
8839
|
background-color: var(--goa-color-warning-default);
|
|
8832
8840
|
`));
|
|
8833
|
-
const FixTableHeaderAlignment = styled.div(
|
|
8841
|
+
const FixTableHeaderAlignment = styled.div(_t24$1 || (_t24$1 = _$7`
|
|
8834
8842
|
table thead th:nth-child(3) {
|
|
8835
8843
|
text-align: center;
|
|
8836
8844
|
}
|
|
@@ -8839,11 +8847,31 @@ const FixTableHeaderAlignment = styled.div(_t25$1 || (_t25$1 = _$7`
|
|
|
8839
8847
|
text-align: center;
|
|
8840
8848
|
}
|
|
8841
8849
|
`));
|
|
8842
|
-
const ListWithDetailsReviewCellDiv = styled.div(
|
|
8850
|
+
const ListWithDetailsReviewCellDiv = styled.div(_t25$1 || (_t25$1 = _$7`
|
|
8843
8851
|
display: 'flex';
|
|
8844
8852
|
flex-direction: 'column';
|
|
8845
8853
|
text-align: 'start';
|
|
8846
8854
|
`));
|
|
8855
|
+
const IconsContainer = styled.div(_t26$1 || (_t26$1 = _$7`
|
|
8856
|
+
display: flex;
|
|
8857
|
+
align-items: center;
|
|
8858
|
+
justify-content: flex-end;
|
|
8859
|
+
gap: var(--goa-space-xs);
|
|
8860
|
+
padding-bottom: var(--goa-space-xs);
|
|
8861
|
+
`));
|
|
8862
|
+
const TableContentContainer = styled.div(_t27$1 || (_t27$1 = _$7`
|
|
8863
|
+
padding: var(--goa-space-l);
|
|
8864
|
+
`));
|
|
8865
|
+
const NoDataMessage = styled.div(_t28$1 || (_t28$1 = _$7`
|
|
8866
|
+
padding: var(--goa-space-xl) var(--goa-space-l);
|
|
8867
|
+
color: var(--goa-color-greyscale-700);
|
|
8868
|
+
font: var(--goa-typography-body-m);
|
|
8869
|
+
text-align: center;
|
|
8870
|
+
display: flex;
|
|
8871
|
+
align-items: center;
|
|
8872
|
+
justify-content: center;
|
|
8873
|
+
min-height: 100px;
|
|
8874
|
+
`));
|
|
8847
8875
|
|
|
8848
8876
|
const ObjectArrayToolBar = /*#__PURE__*/React.memo(function TableToolbar({
|
|
8849
8877
|
data,
|
|
@@ -9125,6 +9153,134 @@ const NonEmptyRowComponent$1 = ({
|
|
|
9125
9153
|
}) : null
|
|
9126
9154
|
}, childPath);
|
|
9127
9155
|
};
|
|
9156
|
+
function isControlElement(element) {
|
|
9157
|
+
return element.type === 'Control';
|
|
9158
|
+
}
|
|
9159
|
+
function isLayoutElement(element) {
|
|
9160
|
+
return 'elements' in element;
|
|
9161
|
+
}
|
|
9162
|
+
function extractPaths(uiSchema) {
|
|
9163
|
+
if (!uiSchema) {
|
|
9164
|
+
return [];
|
|
9165
|
+
}
|
|
9166
|
+
if (isControlElement(uiSchema)) {
|
|
9167
|
+
return uiSchema.scope ? [toDataPath(uiSchema.scope)] : [];
|
|
9168
|
+
}
|
|
9169
|
+
if (isLayoutElement(uiSchema)) {
|
|
9170
|
+
return uiSchema.elements.flatMap(extractPaths);
|
|
9171
|
+
}
|
|
9172
|
+
return [];
|
|
9173
|
+
}
|
|
9174
|
+
function getValue(obj, path) {
|
|
9175
|
+
return path.replace(/^\./, '').split('.').reduce((acc, part) => {
|
|
9176
|
+
if (acc && typeof acc === 'object' && part in acc) {
|
|
9177
|
+
return acc[part];
|
|
9178
|
+
}
|
|
9179
|
+
return undefined;
|
|
9180
|
+
}, obj);
|
|
9181
|
+
}
|
|
9182
|
+
function findLabelForPath(path, uiSchema, schema) {
|
|
9183
|
+
if (!uiSchema) {
|
|
9184
|
+
return path;
|
|
9185
|
+
}
|
|
9186
|
+
if (isControlElement(uiSchema)) {
|
|
9187
|
+
const controlPath = uiSchema.scope ? toDataPath(uiSchema.scope) : '';
|
|
9188
|
+
if (controlPath === path) {
|
|
9189
|
+
const label = uiSchema.label;
|
|
9190
|
+
if (typeof label === 'string') {
|
|
9191
|
+
return label;
|
|
9192
|
+
} else if (typeof label === 'object' && label !== null && 'text' in label) {
|
|
9193
|
+
return label.text || path;
|
|
9194
|
+
}
|
|
9195
|
+
return path;
|
|
9196
|
+
}
|
|
9197
|
+
}
|
|
9198
|
+
if (isLayoutElement(uiSchema)) {
|
|
9199
|
+
for (const element of uiSchema.elements) {
|
|
9200
|
+
const label = findLabelForPath(path, element, schema);
|
|
9201
|
+
if (label !== path) {
|
|
9202
|
+
return label;
|
|
9203
|
+
}
|
|
9204
|
+
}
|
|
9205
|
+
}
|
|
9206
|
+
if (schema != null && schema.properties) {
|
|
9207
|
+
const propertyKey = path.split('.').pop();
|
|
9208
|
+
if (propertyKey && schema.properties[propertyKey]) {
|
|
9209
|
+
const property = schema.properties[propertyKey];
|
|
9210
|
+
if (typeof property === 'object' && 'title' in property) {
|
|
9211
|
+
return String(property.title) || path;
|
|
9212
|
+
}
|
|
9213
|
+
}
|
|
9214
|
+
}
|
|
9215
|
+
return path;
|
|
9216
|
+
}
|
|
9217
|
+
function generateSummaryPairs(rowData, detailUiSchema, schema) {
|
|
9218
|
+
const paths = extractPaths(detailUiSchema);
|
|
9219
|
+
if (paths.length === 0) {
|
|
9220
|
+
return Object.entries(rowData).filter(([, value]) => value !== undefined && value !== null && value !== '').map(([key, value]) => ({
|
|
9221
|
+
label: findLabelForPath(key, detailUiSchema, schema),
|
|
9222
|
+
value
|
|
9223
|
+
}));
|
|
9224
|
+
}
|
|
9225
|
+
return paths.map(path => {
|
|
9226
|
+
const value = getValue(rowData, path);
|
|
9227
|
+
const label = findLabelForPath(path, detailUiSchema, schema);
|
|
9228
|
+
return {
|
|
9229
|
+
label,
|
|
9230
|
+
value
|
|
9231
|
+
};
|
|
9232
|
+
}).filter(({
|
|
9233
|
+
value
|
|
9234
|
+
}) => value !== undefined && value !== null && value !== '');
|
|
9235
|
+
}
|
|
9236
|
+
const SummaryDisplay = ({
|
|
9237
|
+
rowData,
|
|
9238
|
+
uischema,
|
|
9239
|
+
schema
|
|
9240
|
+
}) => {
|
|
9241
|
+
var _uischema$options10;
|
|
9242
|
+
if (!rowData || Object.keys(rowData).length === 0) {
|
|
9243
|
+
return jsx(NoDataMessage, {
|
|
9244
|
+
children: "No data"
|
|
9245
|
+
});
|
|
9246
|
+
}
|
|
9247
|
+
const pairs = generateSummaryPairs(rowData, uischema == null || (_uischema$options10 = uischema.options) == null ? void 0 : _uischema$options10.detail, schema);
|
|
9248
|
+
if (pairs.length === 0) {
|
|
9249
|
+
return jsx(NoDataMessage, {
|
|
9250
|
+
children: "No data"
|
|
9251
|
+
});
|
|
9252
|
+
}
|
|
9253
|
+
return jsx(GoabTable, {
|
|
9254
|
+
width: "100%",
|
|
9255
|
+
mb: "none",
|
|
9256
|
+
variant: "relaxed",
|
|
9257
|
+
children: jsx("tbody", {
|
|
9258
|
+
children: pairs.map((pair, index) => jsxs("tr", {
|
|
9259
|
+
style: {
|
|
9260
|
+
borderBottom: 'none'
|
|
9261
|
+
},
|
|
9262
|
+
children: [jsx("td", {
|
|
9263
|
+
style: {
|
|
9264
|
+
width: '50%',
|
|
9265
|
+
fontWeight: '600',
|
|
9266
|
+
border: 'none',
|
|
9267
|
+
paddingTop: 'var(--goa-space-xs)',
|
|
9268
|
+
paddingBottom: 'var(--goa-space-xs)'
|
|
9269
|
+
},
|
|
9270
|
+
children: pair.label
|
|
9271
|
+
}), jsx("td", {
|
|
9272
|
+
style: {
|
|
9273
|
+
width: '50%',
|
|
9274
|
+
border: 'none',
|
|
9275
|
+
paddingTop: 'var(--goa-space-xs)',
|
|
9276
|
+
paddingBottom: 'var(--goa-space-xs)'
|
|
9277
|
+
},
|
|
9278
|
+
children: String(pair.value)
|
|
9279
|
+
})]
|
|
9280
|
+
}, `${pair.label}-${index}`))
|
|
9281
|
+
})
|
|
9282
|
+
});
|
|
9283
|
+
};
|
|
9128
9284
|
const MainItemComponent = ({
|
|
9129
9285
|
childPath,
|
|
9130
9286
|
rowIndex,
|
|
@@ -9134,10 +9290,12 @@ const MainItemComponent = ({
|
|
|
9134
9290
|
currentTab,
|
|
9135
9291
|
current,
|
|
9136
9292
|
setCurrentListPage,
|
|
9137
|
-
rowData
|
|
9293
|
+
rowData,
|
|
9294
|
+
uischema,
|
|
9295
|
+
schema
|
|
9138
9296
|
}) => {
|
|
9139
9297
|
const displayName = Object.keys(rowData != null ? rowData : {}).length === 0 ? 'No data' : Object.values(rowData || {}).join(', ');
|
|
9140
|
-
return
|
|
9298
|
+
return jsxs(SideMenuItem, {
|
|
9141
9299
|
onClick: () => selectCurrentTab(rowIndex),
|
|
9142
9300
|
onKeyDown: e => {
|
|
9143
9301
|
if (e.key === 'ArrowRight') {
|
|
@@ -9152,62 +9310,32 @@ const MainItemComponent = ({
|
|
|
9152
9310
|
}
|
|
9153
9311
|
}
|
|
9154
9312
|
},
|
|
9155
|
-
children: jsxs(
|
|
9313
|
+
children: [jsxs(IconsContainer, {
|
|
9314
|
+
children: [jsx(GoabIconButton, {
|
|
9315
|
+
disabled: !enabled,
|
|
9316
|
+
icon: "create",
|
|
9317
|
+
title: 'Edit',
|
|
9318
|
+
testId: "edit button",
|
|
9319
|
+
onClick: () => setCurrentListPage(currentTab + 1)
|
|
9320
|
+
}), enabled ? jsx(GoabIconButton, {
|
|
9321
|
+
disabled: !enabled,
|
|
9322
|
+
icon: "trash",
|
|
9323
|
+
title: 'Delete',
|
|
9324
|
+
testId: "delete button",
|
|
9325
|
+
onClick: () => openDeleteDialog(childPath, rowIndex, displayName)
|
|
9326
|
+
}) : null]
|
|
9327
|
+
}), jsx(RowFlexMenu, {
|
|
9156
9328
|
tabIndex: 0,
|
|
9157
|
-
children:
|
|
9158
|
-
children:
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
icon: "trash",
|
|
9163
|
-
title: 'remove',
|
|
9164
|
-
testId: "remove the details",
|
|
9165
|
-
onClick: () => openDeleteDialog(childPath, rowIndex, displayName)
|
|
9166
|
-
})
|
|
9167
|
-
}) : null, jsx(IconPadding, {
|
|
9168
|
-
children: jsx(GoabIconButton, {
|
|
9169
|
-
disabled: !enabled,
|
|
9170
|
-
icon: "create",
|
|
9171
|
-
title: 'edit',
|
|
9172
|
-
testId: "edit button",
|
|
9173
|
-
onClick: () => setCurrentListPage(currentTab + 1)
|
|
9329
|
+
children: jsx(TableContentContainer, {
|
|
9330
|
+
children: jsx(SummaryDisplay, {
|
|
9331
|
+
rowData: rowData,
|
|
9332
|
+
uischema: uischema,
|
|
9333
|
+
schema: schema
|
|
9174
9334
|
})
|
|
9175
|
-
})
|
|
9176
|
-
})
|
|
9335
|
+
})
|
|
9336
|
+
})]
|
|
9177
9337
|
});
|
|
9178
9338
|
};
|
|
9179
|
-
function isControlElement(element) {
|
|
9180
|
-
return element.type === 'Control';
|
|
9181
|
-
}
|
|
9182
|
-
function isLayoutElement(element) {
|
|
9183
|
-
return 'elements' in element;
|
|
9184
|
-
}
|
|
9185
|
-
function extractPaths(uiSchema) {
|
|
9186
|
-
if (!uiSchema) {
|
|
9187
|
-
return [];
|
|
9188
|
-
}
|
|
9189
|
-
if (isControlElement(uiSchema)) {
|
|
9190
|
-
return uiSchema.scope ? [toDataPath(uiSchema.scope)] : [];
|
|
9191
|
-
}
|
|
9192
|
-
if (isLayoutElement(uiSchema)) {
|
|
9193
|
-
return uiSchema.elements.flatMap(extractPaths);
|
|
9194
|
-
}
|
|
9195
|
-
return [];
|
|
9196
|
-
}
|
|
9197
|
-
function getValue(obj, path) {
|
|
9198
|
-
return path.split('.').reduce((acc, key) => acc && typeof acc === 'object' ? acc[key] : undefined, obj);
|
|
9199
|
-
}
|
|
9200
|
-
function orderRowData(rowData, detailUiSchema) {
|
|
9201
|
-
const orderedPaths = extractPaths(detailUiSchema);
|
|
9202
|
-
const ordered = {};
|
|
9203
|
-
for (const path of orderedPaths) {
|
|
9204
|
-
const value = getValue(rowData, path);
|
|
9205
|
-
if (value !== undefined) {
|
|
9206
|
-
ordered[path] = value;
|
|
9207
|
-
}
|
|
9208
|
-
}
|
|
9209
|
-
return ordered;
|
|
9210
|
-
}
|
|
9211
9339
|
function getEffectiveInstancePath(error) {
|
|
9212
9340
|
var _error$params;
|
|
9213
9341
|
if (error.keyword === 'required' && (_error$params = error.params) != null && _error$params.missingProperty) {
|
|
@@ -9350,16 +9478,16 @@ const MainTab = ({
|
|
|
9350
9478
|
currentTab,
|
|
9351
9479
|
current,
|
|
9352
9480
|
setCurrentListPage,
|
|
9353
|
-
uischema
|
|
9481
|
+
uischema,
|
|
9482
|
+
schema
|
|
9354
9483
|
}) => {
|
|
9355
|
-
var
|
|
9484
|
+
var _core$errors;
|
|
9356
9485
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
9357
9486
|
const getDataAtPath = (data, path) => path.replace(/\[(\d+)\]/g, '.$1').split('.').reduce((acc, key) => acc ? acc[key] : undefined, data);
|
|
9358
9487
|
const {
|
|
9359
9488
|
core
|
|
9360
9489
|
} = useJsonForms();
|
|
9361
9490
|
const rowData = getDataAtPath(core == null ? void 0 : core.data, childPath);
|
|
9362
|
-
const orderedRowData = orderRowData(rowData, uischema == null || (_uischema$options10 = uischema.options) == null ? void 0 : _uischema$options10.detail);
|
|
9363
9491
|
function resolveField(e) {
|
|
9364
9492
|
var _e$params;
|
|
9365
9493
|
if (e.keyword === 'required') {
|
|
@@ -9436,7 +9564,7 @@ const MainTab = ({
|
|
|
9436
9564
|
children: errorText ? jsx(GoabFormItem, {
|
|
9437
9565
|
error: errorText,
|
|
9438
9566
|
children: jsx(MainItemComponent, {
|
|
9439
|
-
rowData:
|
|
9567
|
+
rowData: rowData,
|
|
9440
9568
|
childPath: childPath,
|
|
9441
9569
|
rowIndex: rowIndex,
|
|
9442
9570
|
openDeleteDialog: openDeleteDialog,
|
|
@@ -9444,10 +9572,12 @@ const MainTab = ({
|
|
|
9444
9572
|
enabled: enabled,
|
|
9445
9573
|
currentTab: currentTab,
|
|
9446
9574
|
current: current,
|
|
9447
|
-
setCurrentListPage: setCurrentListPage
|
|
9575
|
+
setCurrentListPage: setCurrentListPage,
|
|
9576
|
+
uischema: uischema,
|
|
9577
|
+
schema: schema
|
|
9448
9578
|
})
|
|
9449
9579
|
}) : jsx(MainItemComponent, {
|
|
9450
|
-
rowData:
|
|
9580
|
+
rowData: rowData,
|
|
9451
9581
|
childPath: childPath,
|
|
9452
9582
|
rowIndex: rowIndex,
|
|
9453
9583
|
openDeleteDialog: openDeleteDialog,
|
|
@@ -9455,7 +9585,9 @@ const MainTab = ({
|
|
|
9455
9585
|
enabled: enabled,
|
|
9456
9586
|
currentTab: currentTab,
|
|
9457
9587
|
current: current,
|
|
9458
|
-
setCurrentListPage: setCurrentListPage
|
|
9588
|
+
setCurrentListPage: setCurrentListPage,
|
|
9589
|
+
uischema: uischema,
|
|
9590
|
+
schema: schema
|
|
9459
9591
|
})
|
|
9460
9592
|
}, childPath);
|
|
9461
9593
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abgov/jsonforms-components",
|
|
3
|
-
"version": "2.48.
|
|
3
|
+
"version": "2.48.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",
|
|
@@ -15,7 +15,6 @@ export declare const TabName: import("styled-components/dist/types").IStyledComp
|
|
|
15
15
|
export declare const Trash: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
16
16
|
export declare const ListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
17
17
|
export declare const DetailMargin: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
-
export declare const IconPadding: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
18
|
export declare const UpdateListContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
20
19
|
export declare const CompleteContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
20
|
export declare const TableTHHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, never>> & string;
|
|
@@ -26,3 +25,6 @@ export declare const HasErrorLabel: import("styled-components/dist/types").IStyl
|
|
|
26
25
|
export declare const HilightCellWarning: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
27
26
|
export declare const FixTableHeaderAlignment: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
28
27
|
export declare const ListWithDetailsReviewCellDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
28
|
+
export declare const IconsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
29
|
+
export declare const TableContentContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
30
|
+
export declare const NoDataMessage: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|