@abgov/jsonforms-components 2.30.1 → 2.31.0

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
@@ -5088,16 +5088,6 @@ const JsonFormRegisterProvider = ({
5088
5088
  return 'The element does not exist';
5089
5089
  }
5090
5090
  }
5091
- if (registers === null || registers === void 0 ? void 0 : registers.nonAnonymous) {
5092
- const matchFound = registers === null || registers === void 0 ? void 0 : registers.nonAnonymous.some(nonAnon => {
5093
- var _a;
5094
- if ((_a = criteria === null || criteria === void 0 ? void 0 : criteria.urn) === null || _a === void 0 ? void 0 : _a.toString().includes(nonAnon)) {
5095
- return true;
5096
- }
5097
- return false;
5098
- });
5099
- return matchFound ? 'The element does not allow anonymous reading' : '';
5100
- }
5101
5091
  }
5102
5092
  return '';
5103
5093
  },
@@ -7104,6 +7094,8 @@ let _$6 = t => t,
7104
7094
  _t7$1,
7105
7095
  _t8$1,
7106
7096
  _t9$1,
7097
+ _t0$1,
7098
+ _t1$1,
7107
7099
  _t10$1,
7108
7100
  _t11$1,
7109
7101
  _t12$1,
@@ -7113,11 +7105,9 @@ let _$6 = t => t,
7113
7105
  _t16$1,
7114
7106
  _t17$1,
7115
7107
  _t18$1,
7116
- _t19$1,
7117
- _t20$1,
7118
- _t21,
7119
- _t22,
7120
- _t23;
7108
+ _t19,
7109
+ _t20,
7110
+ _t21;
7121
7111
  const ReviewItem = styled.div(_t$6 || (_t$6 = _$6`
7122
7112
  display: flex;
7123
7113
  flex-direction: column;
@@ -7170,7 +7160,7 @@ styled.div(_t8$1 || (_t8$1 = _$6`
7170
7160
  styled.h3(_t9$1 || (_t9$1 = _$6`
7171
7161
  text-transform: capitalize;
7172
7162
  `));
7173
- const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
7163
+ const RightAlignmentDiv = styled.div(_t0$1 || (_t0$1 = _$6`
7174
7164
  @media screen and (max-width: 767px) {
7175
7165
  margin-bottom: var(--goa-space-l);
7176
7166
  }
@@ -7180,52 +7170,52 @@ const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
7180
7170
  margin-bottom: var(--goa-space-l);
7181
7171
  }
7182
7172
  `));
7183
- const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$6`
7173
+ const FormStepperSummaryH3 = styled.h3(_t1$1 || (_t1$1 = _$6`
7184
7174
  flex: 1;
7185
7175
  margin-bottom: var(--goa-space-m);
7186
7176
  font-size: var(--goa-font-size-7);
7187
7177
  line-height: var(--goa-line-height-4);
7188
7178
  font-weight: var(--goa-font-weight-regular);
7189
7179
  `));
7190
- const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$6`
7180
+ const PageRenderPadding = styled.div(_t10$1 || (_t10$1 = _$6`
7191
7181
  margin-top: var(--goa-space-2xl);
7192
7182
  `));
7193
- styled.div(_t13$1 || (_t13$1 = _$6`
7183
+ styled.div(_t11$1 || (_t11$1 = _$6`
7194
7184
  margin-bottom: var(--goa-space-2xl);
7195
7185
  `));
7196
- const PageBorder = styled.div(_t14$1 || (_t14$1 = _$6`
7186
+ const PageBorder = styled.div(_t12$1 || (_t12$1 = _$6`
7197
7187
  padding: var(--goa-space-m) var(--goa-space-3xl);
7198
7188
  `));
7199
- const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$6`
7189
+ const TableReviewItemSection = styled.div(_t13$1 || (_t13$1 = _$6`
7200
7190
  .element-style {
7201
7191
  max-width: 1600px;
7202
7192
  }
7203
7193
  `));
7204
- const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$6`
7194
+ const TableReviewItem = styled.div(_t14$1 || (_t14$1 = _$6`
7205
7195
  padding: var(--goa-space-xl) var(--goa-space-2xl);
7206
7196
  border: 1px solid var(--goa-color-greyscale-300);
7207
7197
  border-radius: var(--goa-border-radius-xl);
7208
7198
  `));
7209
- const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$6`
7199
+ const TableReviewPageTitleRow = styled.div(_t15$1 || (_t15$1 = _$6`
7210
7200
  margin-top: var(--goa-space-xl);
7211
7201
  display: flex;
7212
7202
  justify-content: space-between;
7213
7203
  `));
7214
- const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$6`
7204
+ const TableReviewCategoryLabel = styled.h3(_t16$1 || (_t16$1 = _$6`
7215
7205
  color: var(--goa-color-text-secondary) !important;
7216
7206
  margin-bottom: var(--goa-space-l);
7217
7207
  `));
7218
- const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$6`
7208
+ const CategoryStatus = styled.td(_t17$1 || (_t17$1 = _$6`
7219
7209
  width: var(--goa-space-xl);
7220
7210
  padding-right: var(--goa-space-xl);
7221
7211
  align-content: center;
7222
7212
  `));
7223
- const CompletionStatus = styled.div(_t20$1 || (_t20$1 = _$6`
7213
+ const CompletionStatus = styled.div(_t18$1 || (_t18$1 = _$6`
7224
7214
  padding: 0;
7225
7215
  margin: 0;
7226
7216
  margin-bottom: 0 !important;
7227
7217
  `));
7228
- const PageStepperRow = styled.tr(_t21 || (_t21 = _$6`
7218
+ const PageStepperRow = styled.tr(_t19 || (_t19 = _$6`
7229
7219
  ${0}
7230
7220
  `), ({
7231
7221
  disabled
@@ -7244,7 +7234,7 @@ const PageStepperRow = styled.tr(_t21 || (_t21 = _$6`
7244
7234
  transition: background-color 0.2s ease-in-out;
7245
7235
  }
7246
7236
  `);
7247
- const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$6`
7237
+ const SectionHeaderRowTr = styled.tr(_t20 || (_t20 = _$6`
7248
7238
  & > td {
7249
7239
  border: 0 !important;
7250
7240
  padding-top: var(--goa-space-l);
@@ -7256,7 +7246,7 @@ const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$6`
7256
7246
  border-top: none !important;
7257
7247
  }
7258
7248
  `));
7259
- const SummaryRowLink = styled.a(_t23 || (_t23 = _$6`
7249
+ const SummaryRowLink = styled.a(_t21 || (_t21 = _$6`
7260
7250
  position: relative;
7261
7251
  top: var(--goa-space-xs);
7262
7252
  `));
@@ -9361,6 +9351,8 @@ let _$3 = t => t,
9361
9351
  _t7,
9362
9352
  _t8,
9363
9353
  _t9,
9354
+ _t0,
9355
+ _t1,
9364
9356
  _t10,
9365
9357
  _t11,
9366
9358
  _t12,
@@ -9369,9 +9361,7 @@ let _$3 = t => t,
9369
9361
  _t15,
9370
9362
  _t16,
9371
9363
  _t17,
9372
- _t18,
9373
- _t19,
9374
- _t20;
9364
+ _t18;
9375
9365
  const DeleteDialogContent = styled.div(_t$3 || (_t$3 = _$3`
9376
9366
  margin-bottom: var(--goa-space-m);
9377
9367
  `));
@@ -9413,55 +9403,55 @@ const RowFlexMenu = styled.div(_t9 || (_t9 = _$3`
9413
9403
  flex-direction: row;
9414
9404
  border-bottom: 1px solid #dcdcdc;
9415
9405
  `));
9416
- const FlexTabs = styled.div(_t10 || (_t10 = _$3`
9406
+ const FlexTabs = styled.div(_t0 || (_t0 = _$3`
9417
9407
  flex-direction: column;
9418
9408
  flex: 1;
9419
9409
  overflow-y: auto !important;
9420
9410
  margin-right: 1.5rem;
9421
9411
  `));
9422
- const FlexForm = styled.div(_t11 || (_t11 = _$3`
9412
+ const FlexForm = styled.div(_t1 || (_t1 = _$3`
9423
9413
  flex-direction: column;
9424
9414
  margin: 1.5rem 0;
9425
9415
  flex: 3;
9426
9416
  `));
9427
- const TabName = styled.div(_t12 || (_t12 = _$3`
9417
+ const TabName = styled.div(_t10 || (_t10 = _$3`
9428
9418
  margin: 1rem 0 1rem 1rem;
9429
9419
  font-weight: 700;
9430
9420
  `));
9431
- const Trash = styled.div(_t13 || (_t13 = _$3`
9421
+ const Trash = styled.div(_t11 || (_t11 = _$3`
9432
9422
  margin: 0.75rem 1.25rem 0.75rem 0.75rem;
9433
9423
  margin-left: auto;
9434
9424
  `));
9435
- const ListContainer = styled.div(_t14 || (_t14 = _$3`
9425
+ const ListContainer = styled.div(_t12 || (_t12 = _$3`
9436
9426
  padding: 0 1.5rem 0 0;
9437
9427
  border: 1px solid #dcdcdc;
9438
9428
  `));
9439
- const TableTHHeader = styled.th(_t15 || (_t15 = _$3`
9429
+ const TableTHHeader = styled.th(_t13 || (_t13 = _$3`
9440
9430
  background-color: var(--goa-color-greyscale-100) !important;
9441
9431
  vertical-align: top;
9442
9432
  `));
9443
- const ObjectArrayWarningIconDiv = styled.div(_t16 || (_t16 = _$3`
9433
+ const ObjectArrayWarningIconDiv = styled.div(_t14 || (_t14 = _$3`
9444
9434
  display: inline-flex;
9445
9435
  align-items: flex-start;
9446
9436
  gap: 0.25rem;
9447
9437
  font-size: var(--goa-font-size-2);
9448
9438
  color: var(--goa-color-interactive-error);
9449
9439
  `));
9450
- const ListWithDetailWarningIconDiv = styled.div(_t17 || (_t17 = _$3`
9440
+ const ListWithDetailWarningIconDiv = styled.div(_t15 || (_t15 = _$3`
9451
9441
  display: inline-flex;
9452
9442
  align-items: flex-start;
9453
9443
  gap: 0.25rem;
9454
9444
  font-size: var(--goa-font-size-3);
9455
9445
  color: var(--goa-color-interactive-error);
9456
9446
  `));
9457
- styled.label(_t18 || (_t18 = _$3`
9447
+ styled.label(_t16 || (_t16 = _$3`
9458
9448
  color: var(--goa-color-interactive-error);
9459
9449
  font-weight: var(--goa-font-weight-regular);
9460
9450
  font-size: var(--goa-font-size-3);
9461
9451
  line-height: var(--goa-line-height-1);
9462
9452
  font-style: normal;
9463
9453
  `));
9464
- styled.div(_t19 || (_t19 = _$3`
9454
+ styled.div(_t17 || (_t17 = _$3`
9465
9455
  margin-top: var(--goa-space-m);
9466
9456
  color: var(--goa-color-interactive-error);
9467
9457
  font-weight: var(--goa-font-weight-regular);
@@ -9469,7 +9459,7 @@ styled.div(_t19 || (_t19 = _$3`
9469
9459
  line-height: var(--goa-line-height-1);
9470
9460
  font-style: normal;
9471
9461
  `));
9472
- const HilightCellWarning = styled.div(_t20 || (_t20 = _$3`
9462
+ const HilightCellWarning = styled.div(_t18 || (_t18 = _$3`
9473
9463
  background-color: var(--goa-color-warning-default);
9474
9464
  `));
9475
9465
 
@@ -9526,7 +9516,6 @@ const ObjectArrayToolBar = /*#__PURE__*/React.memo(function TableToolbar({
9526
9516
  addItem,
9527
9517
  schema,
9528
9518
  enabled,
9529
- translations,
9530
9519
  rootSchema,
9531
9520
  uischema
9532
9521
  }) {
@@ -9669,7 +9658,7 @@ const renderCellColumn = ({
9669
9658
  return null;
9670
9659
  };
9671
9660
 
9672
- const _excluded$2 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "visible", "enabled", "cells", "translations", "data", "config", "isStepperReview", "handleChange", "removeItems"];
9661
+ const _excluded$2 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "visible", "enabled", "cells", "data", "config", "isStepperReview", "handleChange", "removeItems"];
9673
9662
  const GenerateRows$1 = (Cell, schema, rowPath, enabled, openDeleteDialog, handleChange, cells, uischema, isInReview, count, data, errors) => {
9674
9663
  if ((schema === null || schema === void 0 ? void 0 : schema.type) === 'object') {
9675
9664
  const props = {
@@ -10007,7 +9996,6 @@ const ObjectArrayControl = props => {
10007
9996
  visible,
10008
9997
  enabled,
10009
9998
  cells,
10010
- translations,
10011
9999
  data,
10012
10000
  config,
10013
10001
  isStepperReview
@@ -10166,8 +10154,7 @@ const ObjectArrayControl = props => {
10166
10154
  uischema: controlElement,
10167
10155
  schema: schema,
10168
10156
  rootSchema: rootSchema,
10169
- enabled: enabled,
10170
- translations: translations
10157
+ enabled: enabled
10171
10158
  })]
10172
10159
  }), jsxs("div", {
10173
10160
  children: [jsx(ObjectArrayList$1, Object.assign({
@@ -10176,7 +10163,7 @@ const ObjectArrayControl = props => {
10176
10163
  uischema: uischema,
10177
10164
  enabled: enabled,
10178
10165
  openDeleteDialog: openDeleteDialog,
10179
- translations: translations,
10166
+ translations: {},
10180
10167
  count: ((_b = registers.categories[path]) === null || _b === void 0 ? void 0 : _b.count) || Object.keys(data || []).length,
10181
10168
  data: data || ((_c = registers.categories[path]) === null || _c === void 0 ? void 0 : _c.data),
10182
10169
  cells: cells,
@@ -10213,9 +10200,10 @@ const ArrayControlBase = props => {
10213
10200
  } = props;
10214
10201
  return jsx(Visible, {
10215
10202
  visible: visible,
10216
- children: jsx(ArrayControl, Object.assign({}, props, {
10217
- addItem: () => () => {},
10218
- translations: {}
10203
+ children: jsx(ArrayControl, Object.assign({
10204
+ arraySchema: {}
10205
+ }, props, {
10206
+ addItem: () => () => {}
10219
10207
  }))
10220
10208
  });
10221
10209
  };
@@ -10225,9 +10213,10 @@ const ArrayControlReview = props => {
10225
10213
  } = props;
10226
10214
  return jsx(Visible, {
10227
10215
  visible: visible,
10228
- children: jsx(ObjectArrayControl, Object.assign({}, props, {
10216
+ children: jsx(ObjectArrayControl, Object.assign({
10217
+ arraySchema: {}
10218
+ }, props, {
10229
10219
  addItem: () => () => {},
10230
- translations: {},
10231
10220
  isStepperReview: true,
10232
10221
  enabled: true
10233
10222
  }))
@@ -10236,7 +10225,7 @@ const ArrayControlReview = props => {
10236
10225
  const GoAArrayControlRenderer = withJsonFormsControlProps(ArrayControlBase);
10237
10226
  const GoAArrayControlReviewRenderer = withJsonFormsControlProps(ArrayControlReview);
10238
10227
 
10239
- const _excluded$1 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "openDeleteDialog", "visible", "enabled", "cells", "translations", "data", "config"];
10228
+ const _excluded$1 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "openDeleteDialog", "visible", "enabled", "cells", "data", "config"];
10240
10229
  // eslint-disable-next-line
10241
10230
  const extractScopesFromUISchema = uischema => {
10242
10231
  var _a, _b, _c, _d, _e, _f;
@@ -10637,7 +10626,6 @@ class ListWithDetailControl extends React.Component {
10637
10626
  visible,
10638
10627
  enabled,
10639
10628
  cells,
10640
- translations,
10641
10629
  data,
10642
10630
  config
10643
10631
  } = _this$props,
@@ -10670,8 +10658,7 @@ class ListWithDetailControl extends React.Component {
10670
10658
  uischema: controlElement,
10671
10659
  schema: schema,
10672
10660
  rootSchema: rootSchema,
10673
- enabled: enabled,
10674
- translations: translations
10661
+ enabled: enabled
10675
10662
  })]
10676
10663
  }), jsx("div", {
10677
10664
  children: jsx(ObjectArrayList, Object.assign({
@@ -10680,7 +10667,7 @@ class ListWithDetailControl extends React.Component {
10680
10667
  uischema: uischema,
10681
10668
  enabled: enabled,
10682
10669
  openDeleteDialog: openDeleteDialog,
10683
- translations: translations,
10670
+ translations: {},
10684
10671
  data: data,
10685
10672
  cells: cells,
10686
10673
  config: config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.30.1",
3
+ "version": "2.31.0",
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",
@@ -20,7 +20,7 @@ export interface Errors {
20
20
  url: string;
21
21
  message: string;
22
22
  }
23
- export type RegisterDataType = string[] | LabelValueRegisterData[];
23
+ export type RegisterDataType = string[] | LabelValueRegisterData[] | Record<string, unknown>[];
24
24
  export interface RegisterConfigData extends RegisterConfig {
25
25
  data?: RegisterDataType;
26
26
  errors?: Record<string, Errors>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ControlElement, JsonSchema, ArrayTranslations } from '@jsonforms/core';
2
+ import { ControlElement, JsonSchema } from '@jsonforms/core';
3
3
  export interface ObjectArrayToolbarProps {
4
4
  numColumns: number;
5
5
  errors: string;
@@ -9,7 +9,6 @@ export interface ObjectArrayToolbarProps {
9
9
  schema: JsonSchema;
10
10
  rootSchema: JsonSchema;
11
11
  enabled: boolean;
12
- translations: ArrayTranslations;
13
12
  addItem(path: string, value: any): () => void;
14
13
  }
15
14
  declare const ObjectArrayToolBar: React.NamedExoticComponent<ObjectArrayToolbarProps>;