@abgov/jsonforms-components 1.16.3 → 1.16.5

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
@@ -3789,7 +3789,7 @@ class ContextProviderClass {
3789
3789
  this.enumValues.set(key, () => data);
3790
3790
  };
3791
3791
  this.setup = props => {
3792
- var _a, _b;
3792
+ var _a, _b, _c;
3793
3793
  this.selfProps = props;
3794
3794
  if (props.fileManagement) {
3795
3795
  const {
@@ -3819,9 +3819,10 @@ class ContextProviderClass {
3819
3819
  if (!props.children) {
3820
3820
  return null;
3821
3821
  }
3822
+ this.baseEnumerator.isFormSubmitted = (_b = props.isFormSubmitted) !== null && _b !== void 0 ? _b : false;
3822
3823
  return jsx(JsonFormContext.Provider, {
3823
3824
  value: this.baseEnumerator,
3824
- children: (_b = this.selfProps) === null || _b === void 0 ? void 0 : _b.children
3825
+ children: (_c = this.selfProps) === null || _c === void 0 ? void 0 : _c.children
3825
3826
  });
3826
3827
  };
3827
3828
  this.getContextProvider = () => {
@@ -3907,7 +3908,7 @@ class ContextProviderClass {
3907
3908
  }
3908
3909
  }
3909
3910
  const ContextProviderC = new ContextProviderClass();
3910
- const ContextProvider = ContextProviderC.setup;
3911
+ const ContextProviderFactory = () => new ContextProviderClass().setup;
3911
3912
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3912
3913
  const JsonFormContext = /*#__PURE__*/createContext(null);
3913
3914
 
@@ -5979,4 +5980,4 @@ const GoARenderers = [...GoABaseRenderers, {
5979
5980
  }];
5980
5981
  const GoACells = [...InputCells];
5981
5982
 
5982
- export { ContextProvider, ContextProviderC, GoABaseRenderers, GoACells, GoARenderers, JsonFormContext, ajv };
5983
+ export { ContextProviderC, ContextProviderClass, ContextProviderFactory, GoABaseRenderers, GoACells, GoARenderers, JsonFormContext, ajv };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.16.3",
3
+ "version": "1.16.5",
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",
@@ -12,6 +12,7 @@ export interface enumerators {
12
12
  addDataByUrl: (key: string, url: string, processDataFunction: (data: object) => string[], token?: string) => void;
13
13
  getFormContextData: (key: string) => Record<string, any>;
14
14
  getAllFormContextData: () => AllData;
15
+ isFormSubmitted: boolean;
15
16
  }
16
17
  interface FileManagement {
17
18
  fileList?: any;
@@ -29,7 +30,7 @@ type Props = {
29
30
  isFormSubmitted?: boolean;
30
31
  data?: any;
31
32
  };
32
- declare class ContextProviderClass {
33
+ export declare class ContextProviderClass {
33
34
  selfProps: Props | undefined;
34
35
  enumValues: Map<string, () => Record<string, any>>;
35
36
  enumFunctions: Map<string, () => ((file: File, propertyId: string) => void) | undefined>;
@@ -64,6 +65,6 @@ declare class ContextProviderClass {
64
65
  getAllFormContextData: () => AllData;
65
66
  }
66
67
  export declare const ContextProviderC: ContextProviderClass;
67
- export declare const ContextProvider: (props: Props) => import("react/jsx-runtime").JSX.Element | null;
68
+ export declare const ContextProviderFactory: () => (props: Props) => import("react/jsx-runtime").JSX.Element | null;
68
69
  export declare const JsonFormContext: React.Context<any>;
69
70
  export {};