@abgov/jsonforms-components 2.22.3 → 2.23.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
@@ -7097,7 +7097,8 @@ let _$5 = t => t,
7097
7097
  _t20$1,
7098
7098
  _t21,
7099
7099
  _t22,
7100
- _t23;
7100
+ _t23,
7101
+ _t24;
7101
7102
  const ReviewItem = styled.div(_t$5 || (_t$5 = _$5`
7102
7103
  display: flex;
7103
7104
  flex-direction: column;
@@ -7234,6 +7235,10 @@ const SectionHeaderRowTr = styled.tr(_t23 || (_t23 = _$5`
7234
7235
  border-top: none !important;
7235
7236
  }
7236
7237
  `));
7238
+ const SummaryRowLink = styled.a(_t24 || (_t24 = _$5`
7239
+ position: relative;
7240
+ top: var(--goa-space-xs);
7241
+ `));
7237
7242
 
7238
7243
  class ContextProviderClass {
7239
7244
  async addDataByUrl(key, url, processDataFunction, token) {
@@ -8396,7 +8401,7 @@ const SummaryRow = ({
8396
8401
  mt: "none",
8397
8402
  mb: "xl",
8398
8403
  ml: "xl",
8399
- children: jsx("a", {
8404
+ children: jsx(SummaryRowLink, {
8400
8405
  "data-testid": `page-ref-${index}`,
8401
8406
  href: "#",
8402
8407
  onClick: e => {
@@ -8578,6 +8583,7 @@ const BackButtonWrapper = styled.span(_t$4 || (_t$4 = _$4`
8578
8583
  display: inline-block;
8579
8584
  color: #0070c4;
8580
8585
  cursor: pointer;
8586
+ margin-bottom: var(--goa-space-m);
8581
8587
 
8582
8588
  on .goa-icon {
8583
8589
  display: inline-block !important;
@@ -8604,7 +8610,7 @@ const BackButton = ({
8604
8610
  };
8605
8611
 
8606
8612
  const RenderPages = props => {
8607
- var _a, _b;
8613
+ var _a, _b, _c, _d;
8608
8614
  const {
8609
8615
  data,
8610
8616
  schema,
@@ -8629,6 +8635,7 @@ const RenderPages = props => {
8629
8635
  activeId
8630
8636
  } = formStepperCtx.selectStepperState();
8631
8637
  const hideSubmit = (_b = (_a = props.categoryProps.uischema.options) === null || _a === void 0 ? void 0 : _a.hideSubmit) !== null && _b !== void 0 ? _b : false;
8638
+ const toAppOverviewLabel = (_d = (_c = props.categoryProps.uischema.options) === null || _c === void 0 ? void 0 : _c.toAppOverviewLabel) !== null && _d !== void 0 ? _d : 'Back to application overview';
8632
8639
  const submitFormFunction = enumerators === null || enumerators === void 0 ? void 0 : enumerators.submitFunction.get('submit-form');
8633
8640
  const submitForm = submitFormFunction && submitFormFunction();
8634
8641
  const saveFormFunction = enumerators === null || enumerators === void 0 ? void 0 : enumerators.saveFunction.get('save-form');
@@ -8657,7 +8664,7 @@ const RenderPages = props => {
8657
8664
  id: `${path || `goa`}-form-pages`,
8658
8665
  children: jsxs(PageBorder, {
8659
8666
  children: [jsx(BackButton, {
8660
- text: "Back to tasks",
8667
+ text: toAppOverviewLabel,
8661
8668
  link: () => {
8662
8669
  handleSave();
8663
8670
  goToTableOfContext();
@@ -9473,22 +9480,24 @@ const ObjectArrayToolBar = /*#__PURE__*/React.memo(function TableToolbar({
9473
9480
  rootSchema,
9474
9481
  uischema
9475
9482
  }) {
9476
- var _a, _b, _c, _d;
9483
+ var _a, _b, _c, _d, _e;
9477
9484
  const buttonPosition = ((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.addButtonPosition) || 'left';
9485
+ const buttonUIProps = ((_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.addButtonUIProps) || {};
9478
9486
  const arrayLabel = getLabelText(uischema.scope, label);
9479
9487
  return jsx(Fragment, {
9480
9488
  children: jsx("div", {
9481
9489
  style: {
9482
9490
  textAlign: buttonPosition
9483
9491
  },
9484
- children: jsx(GoAButton, {
9492
+ children: jsx(GoAButton, Object.assign({
9485
9493
  disabled: !enabled,
9486
9494
  testId: `object-array-toolbar-${label}`,
9487
9495
  "aria-label": `Add to button to ${(label === null || label === void 0 ? void 0 : label.toLowerCase()) || ''}`,
9488
9496
  onClick: addItem(path, createDefaultValue(schema, rootSchema)),
9489
- type: (_c = (_b = uischema.options) === null || _b === void 0 ? void 0 : _b.addButtonType) !== null && _c !== void 0 ? _c : 'primary',
9490
- children: ((_d = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _d === void 0 ? void 0 : _d.addButtonText) || capitalizeFirstLetter(`Add ${arrayLabel}`)
9491
- })
9497
+ type: (_d = (_c = uischema.options) === null || _c === void 0 ? void 0 : _c.addButtonType) !== null && _d !== void 0 ? _d : 'primary'
9498
+ }, buttonUIProps, {
9499
+ children: ((_e = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _e === void 0 ? void 0 : _e.addButtonText) || capitalizeFirstLetter(`Add ${arrayLabel}`)
9500
+ }))
9492
9501
  })
9493
9502
  });
9494
9503
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.22.3",
3
+ "version": "2.23.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",
@@ -24,4 +24,5 @@ interface PageStepperRowProps {
24
24
  }
25
25
  export declare const PageStepperRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, PageStepperRowProps>> & string;
26
26
  export declare const SectionHeaderRowTr: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, never>> & string;
27
+ export declare const SummaryRowLink: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, never>> & string;
27
28
  export {};