@abgov/jsonforms-components 2.3.1 → 2.3.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
@@ -5438,7 +5438,7 @@ let _$6 = t => t,
5438
5438
  _t17$1,
5439
5439
  _t18$1,
5440
5440
  _t19$1,
5441
- _t20,
5441
+ _t20$1,
5442
5442
  _t21,
5443
5443
  _t22;
5444
5444
  const ReviewItem = styled.div(_t$6 || (_t$6 = _$6`
@@ -5548,7 +5548,7 @@ const CategoryStatus = styled.td(_t18$1 || (_t18$1 = _$6`
5548
5548
  const TocPageRef = styled.td(_t19$1 || (_t19$1 = _$6`
5549
5549
  padding-left: var(--goa-space-xl);
5550
5550
  `));
5551
- const TocTitle = styled.h1(_t20 || (_t20 = _$6`
5551
+ const TocTitle = styled.h1(_t20$1 || (_t20$1 = _$6`
5552
5552
  padding: 0;
5553
5553
  margin: 0;
5554
5554
  padding-left: var(--goa-space-xl);
@@ -7542,7 +7542,8 @@ let _$2 = t => t,
7542
7542
  _t16,
7543
7543
  _t17,
7544
7544
  _t18,
7545
- _t19;
7545
+ _t19,
7546
+ _t20;
7546
7547
  const DeleteDialogContent = styled.div(_t$2 || (_t$2 = _$2`
7547
7548
  margin-bottom: var(--goa-space-m);
7548
7549
  `));
@@ -7618,14 +7619,21 @@ const ObjectArrayWarningIconDiv = styled.div(_t16 || (_t16 = _$2`
7618
7619
  font-size: var(--goa-font-size-2);
7619
7620
  color: var(--goa-color-interactive-error);
7620
7621
  `));
7621
- styled.label(_t17 || (_t17 = _$2`
7622
+ const ListWithDetailWarningIconDiv = styled.div(_t17 || (_t17 = _$2`
7623
+ display: inline-flex;
7624
+ align-items: flex-start;
7625
+ gap: 0.25rem;
7626
+ font-size: var(--goa-font-size-3);
7627
+ color: var(--goa-color-interactive-error);
7628
+ `));
7629
+ styled.label(_t18 || (_t18 = _$2`
7622
7630
  color: var(--goa-color-interactive-error);
7623
7631
  font-weight: var(--goa-font-weight-regular);
7624
7632
  font-size: var(--goa-font-size-3);
7625
7633
  line-height: var(--goa-line-height-1);
7626
7634
  font-style: normal;
7627
7635
  `));
7628
- styled.div(_t18 || (_t18 = _$2`
7636
+ styled.div(_t19 || (_t19 = _$2`
7629
7637
  margin-top: var(--goa-space-m);
7630
7638
  color: var(--goa-color-interactive-error);
7631
7639
  font-weight: var(--goa-font-weight-regular);
@@ -7633,7 +7641,7 @@ styled.div(_t18 || (_t18 = _$2`
7633
7641
  line-height: var(--goa-line-height-1);
7634
7642
  font-style: normal;
7635
7643
  `));
7636
- const HilightCellWarning = styled.div(_t19 || (_t19 = _$2`
7644
+ const HilightCellWarning = styled.div(_t20 || (_t20 = _$2`
7637
7645
  background-color: var(--goa-color-warning-default);
7638
7646
  `));
7639
7647
 
@@ -8263,11 +8271,23 @@ const ObjectArrayControl = props => {
8263
8271
  const controlElement = uischema;
8264
8272
  const listTitle = label || ((_a = uischema.options) === null || _a === void 0 ? void 0 : _a.title);
8265
8273
  const isInReview = isStepperReview === true;
8274
+ const isListWithDetail = controlElement.type === 'ListWithDetail';
8266
8275
  return jsxs(Visible, {
8267
8276
  visible: visible,
8268
8277
  "data-testid": "jsonforms-object-list-wrapper",
8269
8278
  children: [jsxs(ToolBarHeader, {
8270
- children: [isInReview && listTitle && jsxs("b", {
8279
+ children: [isInReview && listTitle && isListWithDetail && additionalProps.required && (data === null || data === undefined) ? jsx("b", {
8280
+ children: jsxs(ListWithDetailWarningIconDiv, {
8281
+ children: [jsx(GoAIcon, {
8282
+ type: "warning",
8283
+ title: "warning",
8284
+ size: "small",
8285
+ theme: "filled",
8286
+ ml: "2xs",
8287
+ mt: "2xs"
8288
+ }), listTitle, " is required."]
8289
+ })
8290
+ }) : jsxs("b", {
8271
8291
  children: [listTitle, " ", jsx("span", {
8272
8292
  children: additionalProps.required && '(required)'
8273
8293
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.3.1",
3
+ "version": "2.3.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",
@@ -15,6 +15,7 @@ export declare const Trash: import("styled-components/dist/types").IStyledCompon
15
15
  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;
16
16
  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;
17
17
  export declare const ObjectArrayWarningIconDiv: 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 ListWithDetailWarningIconDiv: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
18
19
  export declare const ObjectArrayRequiredTextLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never>> & string;
19
20
  export declare const HasErrorLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
20
21
  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;