@abgov/jsonforms-components 1.11.0 → 1.13.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.
package/index.esm.js CHANGED
@@ -1,4 +1,3 @@
1
- import { withAjvProps, materialSliderControlTester, MaterialSliderControl, materialObjectControlTester, MaterialObjectRenderer, materialAllOfControlTester, MaterialAllOfRenderer, materialAnyOfControlTester, MaterialAnyOfRenderer, materialOneOfControlTester, MaterialOneOfRenderer, materialOneOfRadioGroupControlTester, MaterialOneOfRadioGroupControl, materialOneOfEnumControlTester, MaterialOneOfEnumControl, materialHorizontalLayoutTester, materialVerticalLayoutTester, materialArrayLayoutTester, MaterialArrayLayout, materialAnyOfStringOrEnumControlTester, MaterialAnyOfStringOrEnumControl, materialEnumArrayRendererTester, MaterialEnumArrayRenderer, materialBooleanCellTester, MaterialBooleanCell, materialBooleanToggleCellTester, MaterialBooleanToggleCell, materialEnumCellTester, MaterialEnumCell, materialOneOfEnumCellTester, MaterialOneOfEnumCell } from '@jsonforms/material-renderers';
2
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
2
  import React, { createContext, useContext, useEffect, useMemo, useState, useCallback } from 'react';
4
3
  import { GoACallout, GoAInputDate, GoAFormItem, GoAInput, GoATextArea, GoAInputDateTime, GoAInputTime, GoADropdown, GoADropdownItem, GoARadioGroup, GoARadioItem, GoACheckbox, GoAFormStepper, GoAFormStep, GoAPages, GoAGrid, GoAButton, GoAModal, GoAButtonGroup, GoAIconButton, GoAFileUploadInput, GoACircularProgress, GoAContainer, GoADetails } from '@abgov/react-components';
@@ -7,6 +6,7 @@ import { rankWith, uiTypeIs, isDateControl, isStringControl, and, optionIs, isNu
7
6
  import { withJsonFormsRendererProps, withJsonFormsControlProps, withJsonFormsEnumProps, withTranslateProps, JsonFormsDispatch, withJsonFormsLayoutProps, useJsonForms, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
8
7
  import merge from 'lodash/merge';
9
8
  import axios from 'axios';
9
+ import { withAjvProps } from '@jsonforms/material-renderers';
10
10
  import isEmpty$1 from 'lodash/isEmpty';
11
11
  import range from 'lodash/range';
12
12
  import Ajv from 'ajv';
@@ -4318,8 +4318,8 @@ let _$2 = t => t,
4318
4318
  _t$2,
4319
4319
  _t2$1,
4320
4320
  _t3$1;
4321
- const DELAY_UPLOAD_TIMEOUT_MS = 200;
4322
- const DELAY_DELETE_TIMEOUT_MS = 80;
4321
+ const DELAY_UPLOAD_TIMEOUT_MS = 5;
4322
+ const DELAY_DELETE_TIMEOUT_MS = 5;
4323
4323
  const FileUploader = _a => {
4324
4324
  var _b, _c, _d, _e;
4325
4325
  var {
@@ -4964,7 +4964,7 @@ const LayoutRenderer = ({
4964
4964
  }
4965
4965
  };
4966
4966
 
4967
- rankWith(2, uiTypeIs('HorizontalLayout'));
4967
+ const GoAHorizontalLayoutTester = rankWith(2, uiTypeIs('HorizontalLayout'));
4968
4968
  const GoAHorizontalLayoutComponent = ({
4969
4969
  uischema,
4970
4970
  renderers,
@@ -5013,6 +5013,7 @@ const GoAVerticalLayoutComponent = ({
5013
5013
  cells: cells
5014
5014
  }));
5015
5015
  };
5016
+ const GoAlVerticalLayoutTester = rankWith(1, uiTypeIs('VerticalLayout'));
5016
5017
  const GoAVerticalLayout = withJsonFormsLayoutProps(GoAVerticalLayoutComponent, true);
5017
5018
 
5018
5019
  const groupTester = rankWith(1, uiTypeIs('Group'));
@@ -5366,21 +5367,6 @@ const GoABaseRenderers = [
5366
5367
  }, {
5367
5368
  tester: GoACalloutControlTester,
5368
5369
  renderer: GoACalloutControl
5369
- }, {
5370
- tester: materialSliderControlTester,
5371
- renderer: MaterialSliderControl
5372
- }, {
5373
- tester: materialObjectControlTester,
5374
- renderer: MaterialObjectRenderer
5375
- }, {
5376
- tester: materialAllOfControlTester,
5377
- renderer: MaterialAllOfRenderer
5378
- }, {
5379
- tester: materialAnyOfControlTester,
5380
- renderer: MaterialAnyOfRenderer
5381
- }, {
5382
- tester: materialOneOfControlTester,
5383
- renderer: MaterialOneOfRenderer
5384
5370
  }, {
5385
5371
  tester: GoARadioGroupControlTester,
5386
5372
  renderer: GoAEnumRadioGroupControl
@@ -5396,40 +5382,22 @@ const GoABaseRenderers = [
5396
5382
  }, {
5397
5383
  tester: GoAListWithDetailsTester,
5398
5384
  renderer: GoAArrayControlRenderer
5399
- }, {
5400
- tester: materialOneOfRadioGroupControlTester,
5401
- renderer: MaterialOneOfRadioGroupControl
5402
- }, {
5403
- tester: materialOneOfEnumControlTester,
5404
- renderer: MaterialOneOfEnumControl
5405
5385
  },
5406
5386
  // layouts
5407
5387
  {
5408
5388
  tester: GoAGroupLayoutTester,
5409
5389
  renderer: GoAGroupControl
5410
5390
  }, {
5411
- tester: materialHorizontalLayoutTester,
5391
+ tester: GoAHorizontalLayoutTester,
5412
5392
  renderer: GoAHorizontalLayout
5413
5393
  }, {
5414
- tester: materialVerticalLayoutTester,
5394
+ tester: GoAlVerticalLayoutTester,
5415
5395
  renderer: GoAVerticalLayout
5416
- }, {
5417
- tester: materialArrayLayoutTester,
5418
- renderer: MaterialArrayLayout
5419
5396
  },
5420
5397
  // additional
5421
5398
  {
5422
5399
  tester: GoAErrorControlTester,
5423
5400
  renderer: GoAErrorControl
5424
- }, {
5425
- tester: materialAnyOfStringOrEnumControlTester,
5426
- renderer: MaterialAnyOfStringOrEnumControl
5427
- }, {
5428
- tester: materialEnumArrayRendererTester,
5429
- renderer: MaterialEnumArrayRenderer
5430
- }, {
5431
- tester: materialEnumArrayRendererTester,
5432
- renderer: MaterialEnumArrayRenderer
5433
5401
  }, {
5434
5402
  tester: MultiLineTextControlTester,
5435
5403
  renderer: MultiLineTextControl
@@ -5444,18 +5412,6 @@ const GoARenderers = [...GoABaseRenderers, {
5444
5412
  tester: FileUploaderTester,
5445
5413
  renderer: withJsonFormsControlProps(FileUploader)
5446
5414
  }];
5447
- const GoACells = [{
5448
- tester: materialBooleanCellTester,
5449
- cell: MaterialBooleanCell
5450
- }, {
5451
- tester: materialBooleanToggleCellTester,
5452
- cell: MaterialBooleanToggleCell
5453
- }, {
5454
- tester: materialEnumCellTester,
5455
- cell: MaterialEnumCell
5456
- }, {
5457
- tester: materialOneOfEnumCellTester,
5458
- cell: MaterialOneOfEnumCell
5459
- }, ...InputCells];
5415
+ const GoACells = [...InputCells];
5460
5416
 
5461
5417
  export { ContextProvider, GoABaseRenderers, GoACells, GoARenderers, JsonFormContext, addData, addDataByOptions, addDataByUrl, ajv, getAllData, getData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.11.0",
3
+ "version": "1.13.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",
@@ -11,7 +11,8 @@
11
11
  "@jsonforms/react": "^3.1.0",
12
12
  "@mui/material": "^5.15.10",
13
13
  "react": "^18.0.0",
14
- "ajv": "^6.12.6"
14
+ "ajv": "^6.12.6",
15
+ "ajv8": "npm:ajv@^8.6.1"
15
16
  },
16
17
  "dependencies": {
17
18
  "axios": "^1.6.7",
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { LayoutProps, RankedTester } from '@jsonforms/core';
3
- export declare const materialHorizontalLayoutTester: RankedTester;
3
+ export declare const GoAHorizontalLayoutTester: RankedTester;
4
4
  export declare const GoAHorizontalLayoutComponent: ({ uischema, renderers, cells, schema, path, enabled, visible, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const GoAHorizontalLayout: React.ComponentType<LayoutProps & import("@jsonforms/core").OwnPropsOfLayout>;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
- import { LayoutProps } from '@jsonforms/core';
2
+ import { LayoutProps, RankedTester } from '@jsonforms/core';
3
3
  export declare const GoAVerticalLayoutComponent: ({ uischema, schema, path, enabled, renderers, cells, visible, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const GoAlVerticalLayoutTester: RankedTester;
4
5
  export declare const GoAVerticalLayout: React.ComponentType<LayoutProps & import("@jsonforms/core").OwnPropsOfLayout>;
@@ -1,8 +1,13 @@
1
1
  import type { UISchemaElement } from '@jsonforms/core';
2
2
  import { JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry, JsonSchema, OwnPropsOfRenderer } from '@jsonforms/core';
3
+ import Ajv from 'ajv8';
4
+ export type Ajv8 = Ajv;
3
5
  export declare const renderLayoutElements: (elements: UISchemaElement[], schema?: JsonSchema, path?: string, enabled?: boolean, renderers?: JsonFormsRendererRegistryEntry[], cells?: JsonFormsCellRendererRegistryEntry[]) => import("react/jsx-runtime").JSX.Element[];
4
6
  export interface LayoutRendererProps extends OwnPropsOfRenderer {
5
7
  elements: UISchemaElement[];
6
8
  direction: 'row' | 'column';
7
9
  }
10
+ export interface AjvProps {
11
+ ajv: Ajv;
12
+ }
8
13
  export declare const LayoutRenderer: ({ elements, schema, path, enabled, direction, renderers, cells, visible, }: LayoutRendererProps) => import("react/jsx-runtime").JSX.Element | null;