@abgov/jsonforms-components 2.39.0 → 2.40.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.
Files changed (2) hide show
  1. package/index.esm.js +10 -5
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -9079,14 +9079,12 @@ const TaskList = ({
9079
9079
  "data-testid": testid,
9080
9080
  children: [title && jsx(GoAText, {
9081
9081
  size: "heading-xl",
9082
- ml: "xl",
9083
9082
  mb: "xl",
9084
9083
  children: title
9085
9084
  }), subtitle && jsx(GoAText, {
9086
9085
  size: "heading-l",
9087
9086
  mt: "none",
9088
9087
  mb: "xl",
9089
- ml: "xl",
9090
9088
  children: subtitle
9091
9089
  }), jsx(ApplicationStatus, {
9092
9090
  completedGroups: completedPages,
@@ -11062,6 +11060,13 @@ $$1({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
11062
11060
  });
11063
11061
 
11064
11062
  const _excluded$1 = ["label", "path", "schema", "rootSchema", "uischema", "errors", "openDeleteDialog", "visible", "enabled", "cells", "data", "config"];
11063
+ const getItemsTitle = schema => {
11064
+ const items = schema === null || schema === void 0 ? void 0 : schema.items;
11065
+ if (items && !Array.isArray(items) && typeof items === 'object') {
11066
+ return items.title;
11067
+ }
11068
+ return undefined;
11069
+ };
11065
11070
  // eslint-disable-next-line
11066
11071
  const extractScopesFromUISchema = uischema => {
11067
11072
  var _a, _b, _c, _d, _e, _f;
@@ -11486,7 +11491,7 @@ const ObjectArrayList = ({
11486
11491
  ref: rightRef,
11487
11492
  tabIndex: -1,
11488
11493
  children: [jsx(ObjectArrayTitle, {
11489
- children: pluralize.singular(listTitle || '')
11494
+ children: listTitle
11490
11495
  }), jsx(NonEmptyList, {
11491
11496
  childPath: Paths.compose(path, `${currentIndex}`),
11492
11497
  rowIndex: currentIndex,
@@ -11551,7 +11556,7 @@ class ListWithDetailControl extends React.Component {
11551
11556
  };
11552
11557
  }
11553
11558
  render() {
11554
- var _a;
11559
+ var _a, _b, _c, _d, _e;
11555
11560
  const _this$props = this.props,
11556
11561
  {
11557
11562
  label,
@@ -11570,7 +11575,7 @@ class ListWithDetailControl extends React.Component {
11570
11575
  additionalProps = _objectWithoutPropertiesLoose(_this$props, _excluded$1);
11571
11576
  const controlElement = uischema;
11572
11577
  // eslint-disable-next-line
11573
- const listTitle = label || ((_a = uischema.options) === null || _a === void 0 ? void 0 : _a.title);
11578
+ const listTitle = (_e = (_d = (_c = (_a = uischema === null || uischema === void 0 ? void 0 : uischema.label) !== null && _a !== void 0 ? _a : (_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : getItemsTitle(schema)) !== null && _d !== void 0 ? _d : schema === null || schema === void 0 ? void 0 : schema.title) !== null && _e !== void 0 ? _e : label;
11574
11579
  return jsxs(Visible, {
11575
11580
  visible: visible,
11576
11581
  "data-testid": "jsonforms-object-list-wrapper",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.39.0",
3
+ "version": "2.40.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",