@abgov/jsonforms-components 2.30.0 → 2.30.2

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
@@ -7104,6 +7104,8 @@ let _$6 = t => t,
7104
7104
  _t7$1,
7105
7105
  _t8$1,
7106
7106
  _t9$1,
7107
+ _t0$1,
7108
+ _t1$1,
7107
7109
  _t10$1,
7108
7110
  _t11$1,
7109
7111
  _t12$1,
@@ -7113,11 +7115,9 @@ let _$6 = t => t,
7113
7115
  _t16$1,
7114
7116
  _t17$1,
7115
7117
  _t18$1,
7116
- _t19$1,
7117
- _t20$1,
7118
- _t21,
7119
- _t22,
7120
- _t23;
7118
+ _t19,
7119
+ _t20,
7120
+ _t21;
7121
7121
  const ReviewItem = styled.div(_t$6 || (_t$6 = _$6`
7122
7122
  display: flex;
7123
7123
  flex-direction: column;
@@ -7170,7 +7170,7 @@ styled.div(_t8$1 || (_t8$1 = _$6`
7170
7170
  styled.h3(_t9$1 || (_t9$1 = _$6`
7171
7171
  text-transform: capitalize;
7172
7172
  `));
7173
- const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
7173
+ const RightAlignmentDiv = styled.div(_t0$1 || (_t0$1 = _$6`
7174
7174
  @media screen and (max-width: 767px) {
7175
7175
  margin-bottom: var(--goa-space-l);
7176
7176
  }
@@ -7180,62 +7180,71 @@ const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
7180
7180
  margin-bottom: var(--goa-space-l);
7181
7181
  }
7182
7182
  `));
7183
- const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$6`
7183
+ const FormStepperSummaryH3 = styled.h3(_t1$1 || (_t1$1 = _$6`
7184
7184
  flex: 1;
7185
7185
  margin-bottom: var(--goa-space-m);
7186
7186
  font-size: var(--goa-font-size-7);
7187
7187
  line-height: var(--goa-line-height-4);
7188
7188
  font-weight: var(--goa-font-weight-regular);
7189
7189
  `));
7190
- const PageRenderPadding = styled.div(_t12$1 || (_t12$1 = _$6`
7190
+ const PageRenderPadding = styled.div(_t10$1 || (_t10$1 = _$6`
7191
7191
  margin-top: var(--goa-space-2xl);
7192
7192
  `));
7193
- styled.div(_t13$1 || (_t13$1 = _$6`
7193
+ styled.div(_t11$1 || (_t11$1 = _$6`
7194
7194
  margin-bottom: var(--goa-space-2xl);
7195
7195
  `));
7196
- const PageBorder = styled.div(_t14$1 || (_t14$1 = _$6`
7196
+ const PageBorder = styled.div(_t12$1 || (_t12$1 = _$6`
7197
7197
  padding: var(--goa-space-m) var(--goa-space-3xl);
7198
7198
  `));
7199
- const TableReviewItemSection = styled.div(_t15$1 || (_t15$1 = _$6`
7199
+ const TableReviewItemSection = styled.div(_t13$1 || (_t13$1 = _$6`
7200
7200
  .element-style {
7201
7201
  max-width: 1600px;
7202
7202
  }
7203
7203
  `));
7204
- const TableReviewItem = styled.div(_t16$1 || (_t16$1 = _$6`
7204
+ const TableReviewItem = styled.div(_t14$1 || (_t14$1 = _$6`
7205
7205
  padding: var(--goa-space-xl) var(--goa-space-2xl);
7206
7206
  border: 1px solid var(--goa-color-greyscale-300);
7207
7207
  border-radius: var(--goa-border-radius-xl);
7208
7208
  `));
7209
- const TableReviewPageTitleRow = styled.div(_t17$1 || (_t17$1 = _$6`
7209
+ const TableReviewPageTitleRow = styled.div(_t15$1 || (_t15$1 = _$6`
7210
7210
  margin-top: var(--goa-space-xl);
7211
7211
  display: flex;
7212
7212
  justify-content: space-between;
7213
7213
  `));
7214
- const TableReviewCategoryLabel = styled.h3(_t18$1 || (_t18$1 = _$6`
7214
+ const TableReviewCategoryLabel = styled.h3(_t16$1 || (_t16$1 = _$6`
7215
7215
  color: var(--goa-color-text-secondary) !important;
7216
7216
  margin-bottom: var(--goa-space-l);
7217
7217
  `));
7218
- const CategoryStatus = styled.td(_t19$1 || (_t19$1 = _$6`
7218
+ const CategoryStatus = styled.td(_t17$1 || (_t17$1 = _$6`
7219
7219
  width: var(--goa-space-xl);
7220
7220
  padding-right: var(--goa-space-xl);
7221
7221
  align-content: center;
7222
7222
  `));
7223
- const CompletionStatus = styled.div(_t20$1 || (_t20$1 = _$6`
7223
+ const CompletionStatus = styled.div(_t18$1 || (_t18$1 = _$6`
7224
7224
  padding: 0;
7225
7225
  margin: 0;
7226
7226
  margin-bottom: 0 !important;
7227
7227
  `));
7228
- const PageStepperRow = styled.tr(_t21 || (_t21 = _$6`
7228
+ const PageStepperRow = styled.tr(_t19 || (_t19 = _$6`
7229
7229
  ${0}
7230
7230
  `), ({
7231
7231
  disabled
7232
7232
  }) => disabled ? `
7233
- pointer-events: none;
7234
- opacity: 0.5;
7235
- ` : `
7236
- cursor: pointer;
7237
- `);
7238
- const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$6`
7233
+ pointer-events: none;
7234
+ opacity: 0.5;
7235
+ cursor: not-allowed;
7236
+ ` : `
7237
+ cursor: pointer;
7238
+
7239
+ &:hover td {
7240
+ background-color: var(--goa-color-greyscale-100);
7241
+ }
7242
+
7243
+ td {
7244
+ transition: background-color 0.2s ease-in-out;
7245
+ }
7246
+ `);
7247
+ const SectionHeaderRowTr = styled.tr(_t20 || (_t20 = _$6`
7239
7248
  & > td {
7240
7249
  border: 0 !important;
7241
7250
  padding-top: var(--goa-space-l);
@@ -7247,7 +7256,7 @@ const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$6`
7247
7256
  border-top: none !important;
7248
7257
  }
7249
7258
  `));
7250
- const SummaryRowLink = styled.a(_t23 || (_t23 = _$6`
7259
+ const SummaryRowLink = styled.a(_t21 || (_t21 = _$6`
7251
7260
  position: relative;
7252
7261
  top: var(--goa-space-xs);
7253
7262
  `));
@@ -8387,16 +8396,16 @@ const CategoryRow = ({
8387
8396
  }) => {
8388
8397
  return category.visible ? jsxs(PageStepperRow, {
8389
8398
  disabled: !(category === null || category === void 0 ? void 0 : category.isEnabled),
8399
+ role: "button",
8400
+ tabIndex: 0,
8401
+ onClick: e => {
8402
+ e.preventDefault();
8403
+ if (category === null || category === void 0 ? void 0 : category.isEnabled) onClick(index);
8404
+ },
8405
+ onKeyDown: e => e.key === 'Enter' && onClick(index),
8406
+ "data-testid": `page-ref-${index}`,
8390
8407
  children: [jsx("td", {
8391
- children: jsx("a", {
8392
- "data-testid": `page-ref-${index}`,
8393
- href: "#",
8394
- onClick: e => {
8395
- e.preventDefault();
8396
- onClick(index);
8397
- },
8398
- children: category.label
8399
- })
8408
+ children: category.label
8400
8409
  }), jsx(CategoryStatus, {
8401
8410
  children: getCategoryStatusBadge(category)
8402
8411
  })]
@@ -9352,6 +9361,8 @@ let _$3 = t => t,
9352
9361
  _t7,
9353
9362
  _t8,
9354
9363
  _t9,
9364
+ _t0,
9365
+ _t1,
9355
9366
  _t10,
9356
9367
  _t11,
9357
9368
  _t12,
@@ -9360,9 +9371,7 @@ let _$3 = t => t,
9360
9371
  _t15,
9361
9372
  _t16,
9362
9373
  _t17,
9363
- _t18,
9364
- _t19,
9365
- _t20;
9374
+ _t18;
9366
9375
  const DeleteDialogContent = styled.div(_t$3 || (_t$3 = _$3`
9367
9376
  margin-bottom: var(--goa-space-m);
9368
9377
  `));
@@ -9404,55 +9413,55 @@ const RowFlexMenu = styled.div(_t9 || (_t9 = _$3`
9404
9413
  flex-direction: row;
9405
9414
  border-bottom: 1px solid #dcdcdc;
9406
9415
  `));
9407
- const FlexTabs = styled.div(_t10 || (_t10 = _$3`
9416
+ const FlexTabs = styled.div(_t0 || (_t0 = _$3`
9408
9417
  flex-direction: column;
9409
9418
  flex: 1;
9410
9419
  overflow-y: auto !important;
9411
9420
  margin-right: 1.5rem;
9412
9421
  `));
9413
- const FlexForm = styled.div(_t11 || (_t11 = _$3`
9422
+ const FlexForm = styled.div(_t1 || (_t1 = _$3`
9414
9423
  flex-direction: column;
9415
9424
  margin: 1.5rem 0;
9416
9425
  flex: 3;
9417
9426
  `));
9418
- const TabName = styled.div(_t12 || (_t12 = _$3`
9427
+ const TabName = styled.div(_t10 || (_t10 = _$3`
9419
9428
  margin: 1rem 0 1rem 1rem;
9420
9429
  font-weight: 700;
9421
9430
  `));
9422
- const Trash = styled.div(_t13 || (_t13 = _$3`
9431
+ const Trash = styled.div(_t11 || (_t11 = _$3`
9423
9432
  margin: 0.75rem 1.25rem 0.75rem 0.75rem;
9424
9433
  margin-left: auto;
9425
9434
  `));
9426
- const ListContainer = styled.div(_t14 || (_t14 = _$3`
9435
+ const ListContainer = styled.div(_t12 || (_t12 = _$3`
9427
9436
  padding: 0 1.5rem 0 0;
9428
9437
  border: 1px solid #dcdcdc;
9429
9438
  `));
9430
- const TableTHHeader = styled.th(_t15 || (_t15 = _$3`
9439
+ const TableTHHeader = styled.th(_t13 || (_t13 = _$3`
9431
9440
  background-color: var(--goa-color-greyscale-100) !important;
9432
9441
  vertical-align: top;
9433
9442
  `));
9434
- const ObjectArrayWarningIconDiv = styled.div(_t16 || (_t16 = _$3`
9443
+ const ObjectArrayWarningIconDiv = styled.div(_t14 || (_t14 = _$3`
9435
9444
  display: inline-flex;
9436
9445
  align-items: flex-start;
9437
9446
  gap: 0.25rem;
9438
9447
  font-size: var(--goa-font-size-2);
9439
9448
  color: var(--goa-color-interactive-error);
9440
9449
  `));
9441
- const ListWithDetailWarningIconDiv = styled.div(_t17 || (_t17 = _$3`
9450
+ const ListWithDetailWarningIconDiv = styled.div(_t15 || (_t15 = _$3`
9442
9451
  display: inline-flex;
9443
9452
  align-items: flex-start;
9444
9453
  gap: 0.25rem;
9445
9454
  font-size: var(--goa-font-size-3);
9446
9455
  color: var(--goa-color-interactive-error);
9447
9456
  `));
9448
- styled.label(_t18 || (_t18 = _$3`
9457
+ styled.label(_t16 || (_t16 = _$3`
9449
9458
  color: var(--goa-color-interactive-error);
9450
9459
  font-weight: var(--goa-font-weight-regular);
9451
9460
  font-size: var(--goa-font-size-3);
9452
9461
  line-height: var(--goa-line-height-1);
9453
9462
  font-style: normal;
9454
9463
  `));
9455
- styled.div(_t19 || (_t19 = _$3`
9464
+ styled.div(_t17 || (_t17 = _$3`
9456
9465
  margin-top: var(--goa-space-m);
9457
9466
  color: var(--goa-color-interactive-error);
9458
9467
  font-weight: var(--goa-font-weight-regular);
@@ -9460,7 +9469,7 @@ styled.div(_t19 || (_t19 = _$3`
9460
9469
  line-height: var(--goa-line-height-1);
9461
9470
  font-style: normal;
9462
9471
  `));
9463
- const HilightCellWarning = styled.div(_t20 || (_t20 = _$3`
9472
+ const HilightCellWarning = styled.div(_t18 || (_t18 = _$3`
9464
9473
  background-color: var(--goa-color-warning-default);
9465
9474
  `));
9466
9475
 
@@ -9517,7 +9526,6 @@ const ObjectArrayToolBar = /*#__PURE__*/React.memo(function TableToolbar({
9517
9526
  addItem,
9518
9527
  schema,
9519
9528
  enabled,
9520
- translations,
9521
9529
  rootSchema,
9522
9530
  uischema
9523
9531
  }) {
@@ -9660,7 +9668,7 @@ const renderCellColumn = ({
9660
9668
  return null;
9661
9669
  };
9662
9670
 
9663
- const _excluded$2 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "visible", "enabled", "cells", "translations", "data", "config", "isStepperReview", "handleChange", "removeItems"];
9671
+ const _excluded$2 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "visible", "enabled", "cells", "data", "config", "isStepperReview", "handleChange", "removeItems"];
9664
9672
  const GenerateRows$1 = (Cell, schema, rowPath, enabled, openDeleteDialog, handleChange, cells, uischema, isInReview, count, data, errors) => {
9665
9673
  if ((schema === null || schema === void 0 ? void 0 : schema.type) === 'object') {
9666
9674
  const props = {
@@ -9998,7 +10006,6 @@ const ObjectArrayControl = props => {
9998
10006
  visible,
9999
10007
  enabled,
10000
10008
  cells,
10001
- translations,
10002
10009
  data,
10003
10010
  config,
10004
10011
  isStepperReview
@@ -10157,8 +10164,7 @@ const ObjectArrayControl = props => {
10157
10164
  uischema: controlElement,
10158
10165
  schema: schema,
10159
10166
  rootSchema: rootSchema,
10160
- enabled: enabled,
10161
- translations: translations
10167
+ enabled: enabled
10162
10168
  })]
10163
10169
  }), jsxs("div", {
10164
10170
  children: [jsx(ObjectArrayList$1, Object.assign({
@@ -10167,7 +10173,7 @@ const ObjectArrayControl = props => {
10167
10173
  uischema: uischema,
10168
10174
  enabled: enabled,
10169
10175
  openDeleteDialog: openDeleteDialog,
10170
- translations: translations,
10176
+ translations: {},
10171
10177
  count: ((_b = registers.categories[path]) === null || _b === void 0 ? void 0 : _b.count) || Object.keys(data || []).length,
10172
10178
  data: data || ((_c = registers.categories[path]) === null || _c === void 0 ? void 0 : _c.data),
10173
10179
  cells: cells,
@@ -10204,9 +10210,10 @@ const ArrayControlBase = props => {
10204
10210
  } = props;
10205
10211
  return jsx(Visible, {
10206
10212
  visible: visible,
10207
- children: jsx(ArrayControl, Object.assign({}, props, {
10208
- addItem: () => () => {},
10209
- translations: {}
10213
+ children: jsx(ArrayControl, Object.assign({
10214
+ arraySchema: {}
10215
+ }, props, {
10216
+ addItem: () => () => {}
10210
10217
  }))
10211
10218
  });
10212
10219
  };
@@ -10216,9 +10223,10 @@ const ArrayControlReview = props => {
10216
10223
  } = props;
10217
10224
  return jsx(Visible, {
10218
10225
  visible: visible,
10219
- children: jsx(ObjectArrayControl, Object.assign({}, props, {
10226
+ children: jsx(ObjectArrayControl, Object.assign({
10227
+ arraySchema: {}
10228
+ }, props, {
10220
10229
  addItem: () => () => {},
10221
- translations: {},
10222
10230
  isStepperReview: true,
10223
10231
  enabled: true
10224
10232
  }))
@@ -10227,7 +10235,7 @@ const ArrayControlReview = props => {
10227
10235
  const GoAArrayControlRenderer = withJsonFormsControlProps(ArrayControlBase);
10228
10236
  const GoAArrayControlReviewRenderer = withJsonFormsControlProps(ArrayControlReview);
10229
10237
 
10230
- const _excluded$1 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "openDeleteDialog", "visible", "enabled", "cells", "translations", "data", "config"];
10238
+ const _excluded$1 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "openDeleteDialog", "visible", "enabled", "cells", "data", "config"];
10231
10239
  // eslint-disable-next-line
10232
10240
  const extractScopesFromUISchema = uischema => {
10233
10241
  var _a, _b, _c, _d, _e, _f;
@@ -10628,7 +10636,6 @@ class ListWithDetailControl extends React.Component {
10628
10636
  visible,
10629
10637
  enabled,
10630
10638
  cells,
10631
- translations,
10632
10639
  data,
10633
10640
  config
10634
10641
  } = _this$props,
@@ -10661,8 +10668,7 @@ class ListWithDetailControl extends React.Component {
10661
10668
  uischema: controlElement,
10662
10669
  schema: schema,
10663
10670
  rootSchema: rootSchema,
10664
- enabled: enabled,
10665
- translations: translations
10671
+ enabled: enabled
10666
10672
  })]
10667
10673
  }), jsx("div", {
10668
10674
  children: jsx(ObjectArrayList, Object.assign({
@@ -10671,7 +10677,7 @@ class ListWithDetailControl extends React.Component {
10671
10677
  uischema: uischema,
10672
10678
  enabled: enabled,
10673
10679
  openDeleteDialog: openDeleteDialog,
10674
- translations: translations,
10680
+ translations: {},
10675
10681
  data: data,
10676
10682
  cells: cells,
10677
10683
  config: config,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.30.0",
3
+ "version": "2.30.2",
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,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>;