@abgov/jsonforms-components 2.29.0 → 2.30.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
@@ -7230,11 +7230,20 @@ const PageStepperRow = styled.tr(_t21 || (_t21 = _$6`
7230
7230
  `), ({
7231
7231
  disabled
7232
7232
  }) => disabled ? `
7233
- pointer-events: none;
7234
- opacity: 0.5;
7235
- ` : `
7236
- cursor: pointer;
7237
- `);
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
+ `);
7238
7247
  const SectionHeaderRowTr = styled.tr(_t22 || (_t22 = _$6`
7239
7248
  & > td {
7240
7249
  border: 0 !important;
@@ -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
  })]
@@ -13102,7 +13111,9 @@ const errMalformedScope = scope => `Scope ${scope} must be prefixed with '#/'.`;
13102
13111
  const errUnknownScope = scope => `Failed to render: unknown scope ${scope}`;
13103
13112
  const errMissingType = 'UI schema element must have a type';
13104
13113
  const errUnknownType = type => `Unknown schema type: ${type}. (Names are case sensitive)`;
13114
+ const errMissingRegister = 'Register configuration is missing in the UISchema options';
13105
13115
  const getUISchemaErrors = (uiSchema, schema) => {
13116
+ var _a, _b;
13106
13117
  // Sometimes the UISchema is null. Ignore those cases, as all checks are done on the UIschema.
13107
13118
  if (isNullSchema(uiSchema)) {
13108
13119
  return null;
@@ -13111,6 +13122,9 @@ const getUISchemaErrors = (uiSchema, schema) => {
13111
13122
  if (isEmptyObject(uiSchema)) {
13112
13123
  return '';
13113
13124
  }
13125
+ if (isControl(uiSchema) && (schema === null || schema === void 0 ? void 0 : schema.type) === 'object' && ((_a = uiSchema === null || uiSchema === void 0 ? void 0 : uiSchema.options) === null || _a === void 0 ? void 0 : _a.format) === 'enum' && ((_b = uiSchema === null || uiSchema === void 0 ? void 0 : uiSchema.options) === null || _b === void 0 ? void 0 : _b.register) === undefined) {
13126
+ return errMissingRegister;
13127
+ }
13114
13128
  // Check control elements
13115
13129
  if (isControl(uiSchema) && hasType(uiSchema, 'Control')) {
13116
13130
  if (!isScopedPrefixed(uiSchema.scope)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.29.0",
3
+ "version": "2.30.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",
@@ -7,4 +7,5 @@ export declare const errMalformedScope: (scope: string) => string;
7
7
  export declare const errUnknownScope: (scope: string) => string;
8
8
  export declare const errMissingType = "UI schema element must have a type";
9
9
  export declare const errUnknownType: (type: string) => string;
10
+ export declare const errMissingRegister = "Register configuration is missing in the UISchema options";
10
11
  export declare const getUISchemaErrors: (uiSchema: UISchemaElement, schema: JsonSchema) => string | null;