@axinom/mosaic-ui 0.39.0-rc.4 → 0.39.1-feat-gs.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/dist/components/FormStation/Create/Create.d.ts +1 -1
- package/dist/components/FormStation/Create/Create.d.ts.map +1 -1
- package/dist/components/FormStation/Details/Details.d.ts +2 -2
- package/dist/components/FormStation/Details/Details.d.ts.map +1 -1
- package/dist/components/FormStation/FormContentWrapper/FormContentWrapper.d.ts +11 -0
- package/dist/components/FormStation/FormContentWrapper/FormContentWrapper.d.ts.map +1 -0
- package/dist/components/FormStation/FormStation.d.ts +8 -15
- package/dist/components/FormStation/FormStation.d.ts.map +1 -1
- package/dist/components/FormStation/FormStation.models.d.ts +17 -3
- package/dist/components/FormStation/FormStation.models.d.ts.map +1 -1
- package/dist/components/FormStation/FormStationActions/FormStationActions.d.ts +21 -0
- package/dist/components/FormStation/FormStationActions/FormStationActions.d.ts.map +1 -0
- package/dist/components/FormStation/FormStationContext/FormStationContext.d.ts +13 -0
- package/dist/components/FormStation/FormStationContext/FormStationContext.d.ts.map +1 -0
- package/dist/components/FormStation/FormStationContext/FormStationContextProvider.d.ts +10 -0
- package/dist/components/FormStation/FormStationContext/FormStationContextProvider.d.ts.map +1 -0
- package/dist/components/FormStation/FormStationHeader/FormStationHeader.d.ts +12 -0
- package/dist/components/FormStation/FormStationHeader/FormStationHeader.d.ts.map +1 -0
- package/dist/components/FormStation/helpers/mergeData.d.ts +7 -0
- package/dist/components/FormStation/helpers/mergeData.d.ts.map +1 -0
- package/dist/components/FormStation/helpers/useChangeSets.d.ts +12 -0
- package/dist/components/FormStation/helpers/useChangeSets.d.ts.map +1 -0
- package/dist/components/FormStation/helpers/useDataProvider.d.ts +14 -0
- package/dist/components/FormStation/helpers/useDataProvider.d.ts.map +1 -0
- package/dist/components/FormStation/helpers/useDebouncedFormikValues.d.ts +7 -0
- package/dist/components/FormStation/helpers/useDebouncedFormikValues.d.ts.map +1 -0
- package/dist/components/FormStation/helpers/useUndo.d.ts +6 -0
- package/dist/components/FormStation/helpers/useUndo.d.ts.map +1 -0
- package/dist/components/FormStation/{useValidationError.d.ts → helpers/useValidationError.d.ts} +1 -1
- package/dist/components/FormStation/helpers/useValidationError.d.ts.map +1 -0
- package/dist/components/FormStation/index.d.ts +1 -1
- package/dist/components/FormStation/index.d.ts.map +1 -1
- package/dist/components/Utils/Postgraphile/getArrayDiff.d.ts.map +1 -1
- package/dist/components/Utils/Postgraphile/getFormDiff.d.ts.map +1 -1
- package/dist/helpers/testing.d.ts +4 -1
- package/dist/helpers/testing.d.ts.map +1 -1
- package/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/src/components/Actions/Action/Action.scss +1 -0
- package/src/components/FormElements/Tags/Tags.tsx +3 -3
- package/src/components/FormStation/Create/Create.stories.tsx +1 -9
- package/src/components/FormStation/Create/Create.tsx +4 -1
- package/src/components/FormStation/Details/Details.tsx +5 -2
- package/src/components/FormStation/FormContentWrapper/FormContentWrapper.scss +66 -0
- package/src/components/FormStation/FormContentWrapper/FormContentWrapper.tsx +77 -0
- package/src/components/FormStation/FormStation.models.ts +29 -3
- package/src/components/FormStation/FormStation.scss +0 -70
- package/src/components/FormStation/FormStation.spec.tsx +2 -1
- package/src/components/FormStation/FormStation.stories.tsx +20 -1
- package/src/components/FormStation/FormStation.tsx +68 -403
- package/src/components/FormStation/FormStationActions/FormStationActions.tsx +132 -0
- package/src/components/FormStation/FormStationContext/FormStationContext.ts +22 -0
- package/src/components/FormStation/FormStationContext/FormStationContextProvider.tsx +86 -0
- package/src/components/FormStation/FormStationHeader/FormStationHeader.tsx +85 -0
- package/src/components/FormStation/helpers/mergeData.ts +26 -0
- package/src/components/FormStation/helpers/useChangeSets.ts +70 -0
- package/src/components/FormStation/helpers/useDataProvider.ts +169 -0
- package/src/components/FormStation/helpers/useDebouncedFormikValues.ts +22 -0
- package/src/components/FormStation/helpers/useUndo.ts +43 -0
- package/src/components/FormStation/{useValidationError.tsx → helpers/useValidationError.tsx} +1 -1
- package/src/components/FormStation/index.ts +1 -5
- package/src/components/Utils/Postgraphile/getArrayDiff.ts +7 -6
- package/src/components/Utils/Postgraphile/getFormDiff.ts +2 -1
- package/dist/components/FormStation/StationErrorStateType.d.ts +0 -5
- package/dist/components/FormStation/StationErrorStateType.d.ts.map +0 -1
- package/dist/components/FormStation/useValidationError.d.ts.map +0 -1
- package/src/components/FormStation/StationErrorStateType.tsx +0 -5
|
@@ -2,7 +2,7 @@ import React, { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { Data } from '../../../types/data';
|
|
3
3
|
import { FormStationProps } from '../FormStation';
|
|
4
4
|
import { ActionHandler } from '../FormStation.models';
|
|
5
|
-
export type CreateProps<TValues extends Data, TSubmitResponse = unknown> = Omit<FormStationProps<TValues, TSubmitResponse>, 'actions' | 'onActionSelected' | 'alwaysShowActionsPanel' | 'defaultTitle' | 'titleProperty' | 'alwaysSubmitBeforeAction'> & {
|
|
5
|
+
export type CreateProps<TValues extends Data, TSubmitResponse = unknown> = Omit<FormStationProps<TValues, TSubmitResponse>, 'actions' | 'onActionSelected' | 'alwaysShowActionsPanel' | 'defaultTitle' | 'titleProperty' | 'alwaysSubmitBeforeAction' | 'autosave'> & {
|
|
6
6
|
/** The title of the station */
|
|
7
7
|
title: string;
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/Create/Create.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,MAAM,WAAW,CAAC,OAAO,SAAS,IAAI,EAAE,eAAe,GAAG,OAAO,IAAI,IAAI,CAC7E,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,EACxC,SAAS,GACT,kBAAkB,GAClB,wBAAwB,GACxB,cAAc,GACd,eAAe,GACf,0BAA0B,
|
|
1
|
+
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/Create/Create.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,MAAM,WAAW,CAAC,OAAO,SAAS,IAAI,EAAE,eAAe,GAAG,OAAO,IAAI,IAAI,CAC7E,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,EACxC,SAAS,GACT,kBAAkB,GAClB,wBAAwB,GACxB,cAAc,GACd,eAAe,GACf,0BAA0B,GAC1B,UAAU,CACb,GAAG;IACF,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,SAAS,EAAE,aAAa,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IAEnD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,8HAEhB,WAiCF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Data } from '../../../types/data';
|
|
3
3
|
import { FormStationProps } from '../FormStation';
|
|
4
|
-
export type DetailsProps<TValues extends Data, TSubmitResponse =
|
|
4
|
+
export type DetailsProps<TValues extends Data, TSubmitResponse = Partial<TValues>> = Omit<FormStationProps<TValues, TSubmitResponse>, 'cancelNavigationUrl' | 'alwaysSubmitBeforeAction'>;
|
|
5
5
|
/**
|
|
6
6
|
* This component is the basic building block for 'details' stations in the CMS.
|
|
7
7
|
*
|
|
@@ -15,5 +15,5 @@ export type DetailsProps<TValues extends Data, TSubmitResponse = unknown> = Omit
|
|
|
15
15
|
* In addition, it allows the definition of `actions`, which will be presented to the user in the appropriate panel.
|
|
16
16
|
* The component uses the `onActionSelected` callback to notify the application when an action needs to be executed by the application.
|
|
17
17
|
*/
|
|
18
|
-
export declare const Details: <TValues extends Data, TSubmitResponse =
|
|
18
|
+
export declare const Details: <TValues extends Data, TSubmitResponse = Partial<TValues>>(props: React.PropsWithChildren<DetailsProps<TValues, TSubmitResponse>>) => JSX.Element;
|
|
19
19
|
//# sourceMappingURL=Details.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/Details/Details.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,MAAM,YAAY,CACtB,OAAO,SAAS,IAAI,EACpB,eAAe,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/Details/Details.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,MAAM,YAAY,CACtB,OAAO,SAAS,IAAI,EACpB,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,IAChC,IAAI,CACN,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,EAC1C,qBAAqB,GAAG,0BAA0B,CACnD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,OAAO,wIAKjB,WAMF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Data } from '../../../types';
|
|
3
|
+
import type { FormStationProps } from '../FormStation';
|
|
4
|
+
import type { StationErrorStateType } from '../FormStation.models';
|
|
5
|
+
interface FormContentWrapperProps extends Pick<FormStationProps<Data>, 'stationMessage' | 'edgeToEdgeContent' | 'infoPanel' | 'initialData'> {
|
|
6
|
+
stationError?: StationErrorStateType;
|
|
7
|
+
setStationError: React.Dispatch<React.SetStateAction<StationErrorStateType | undefined>>;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormContentWrapper: React.FC<FormContentWrapperProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=FormContentWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormContentWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormContentWrapper/FormContentWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAGnE,UAAU,uBACR,SAAQ,IAAI,CACV,gBAAgB,CAAC,IAAI,CAAC,EACtB,gBAAgB,GAAG,mBAAmB,GAAG,WAAW,GAAG,aAAa,CACrE;IACD,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,eAAe,EAAE,KAAK,CAAC,QAAQ,CAC7B,KAAK,CAAC,cAAc,CAAC,qBAAqB,GAAG,SAAS,CAAC,CACxD,CAAC;CACH;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwDhE,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormikValues } from 'formik';
|
|
2
2
|
import React, { PropsWithChildren } from 'react';
|
|
3
3
|
import { OptionalObjectSchema } from 'yup/lib/object';
|
|
4
|
-
import { Data } from '../../types/data';
|
|
5
|
-
import { StationMessage } from '../models';
|
|
6
|
-
import { FormActionData, InitialFormData } from './FormStation.models';
|
|
7
|
-
export type ObjectSchemaDefinition<T extends Data | null = any> = {
|
|
8
|
-
[field in keyof T]: any;
|
|
9
|
-
};
|
|
4
|
+
import type { Data } from '../../types/data';
|
|
5
|
+
import type { StationMessage } from '../models';
|
|
6
|
+
import type { FormActionData, InitialFormData, ObjectSchemaDefinition, SaveDataFunction } from './FormStation.models';
|
|
10
7
|
export interface FormStationProps<TValues extends Data = FormikValues, TSubmitResponse = unknown> {
|
|
11
8
|
/** name of the property on the form that holds the title */
|
|
12
9
|
titleProperty?: keyof TValues;
|
|
@@ -45,15 +42,11 @@ export interface FormStationProps<TValues extends Data = FormikValues, TSubmitRe
|
|
|
45
42
|
* Called whenever the form needs to be saved.
|
|
46
43
|
* This method needs to throw an exception in case the saving did not succeed.
|
|
47
44
|
*/
|
|
48
|
-
saveData:
|
|
49
|
-
/** The current values of the form */
|
|
50
|
-
values: TValues,
|
|
51
|
-
/** The initial values of the form */
|
|
52
|
-
initialData: InitialFormData<TValues>,
|
|
53
|
-
/** The Formik state helpers */
|
|
54
|
-
formikHelpers: FormikHelpers<TValues>) => Promise<TSubmitResponse> | void;
|
|
45
|
+
saveData: SaveDataFunction<TValues, TSubmitResponse>;
|
|
55
46
|
/** CSS Class name for additional styles */
|
|
56
47
|
className?: string;
|
|
48
|
+
/** Periodically calls saveData when the form values change */
|
|
49
|
+
autosave?: boolean;
|
|
57
50
|
}
|
|
58
|
-
export declare const FormStation: <TValues extends Data, TSubmitResponse = unknown>({ titleProperty, defaultTitle, subtitle, children, alwaysShowActionsPanel, actions, actionsWidth, cancelNavigationUrl, initialData, saveData, validationSchema, infoPanel, edgeToEdgeContent, alwaysSubmitBeforeAction, stationMessage, className, }: React.PropsWithChildren<FormStationProps<TValues, TSubmitResponse>>) => JSX.Element;
|
|
51
|
+
export declare const FormStation: <TValues extends Data, TSubmitResponse = unknown>({ titleProperty, defaultTitle, subtitle, children, alwaysShowActionsPanel, actions, actionsWidth, cancelNavigationUrl, initialData, saveData, validationSchema, infoPanel, edgeToEdgeContent, alwaysSubmitBeforeAction, stationMessage, className, autosave, }: React.PropsWithChildren<FormStationProps<TValues, TSubmitResponse>>) => JSX.Element;
|
|
59
52
|
//# sourceMappingURL=FormStation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormStation.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/FormStation.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"FormStation.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/FormStation.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAS9B,MAAM,WAAW,gBAAgB,CAC/B,OAAO,SAAS,IAAI,GAAG,YAAY,EACnC,eAAe,GAAG,OAAO;IAEzB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC;IAC9B,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,OAAO,CAAC,EAAE,cAAc,CAAC,OAAO,EAAE,eAAe,CAAC,EAAE,CAAC;IACrD,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;IACzE,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sDAAsD;IACtD,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACxB,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,QAAQ,EAAE,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACrD,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAGD,eAAO,MAAM,WAAW,4XAoBpB,WA+EH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FormikValues } from 'formik';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { FormikHelpers, FormikValues } from 'formik';
|
|
2
|
+
import type { Data } from '../../types';
|
|
3
|
+
import type { ActionData } from '../Actions';
|
|
4
|
+
import type { ErrorType, StationError } from '../models';
|
|
4
5
|
export interface InitialFormData<T> {
|
|
5
6
|
/** Indicates whether the data is still loading or not */
|
|
6
7
|
loading: boolean;
|
|
@@ -20,6 +21,13 @@ export interface InitialFormData<T> {
|
|
|
20
21
|
*/
|
|
21
22
|
error?: ErrorType;
|
|
22
23
|
}
|
|
24
|
+
export type SaveDataFunction<TValues, TSubmitResponse> = (
|
|
25
|
+
/** The current values of the form */
|
|
26
|
+
values: TValues,
|
|
27
|
+
/** The initial values of the form */
|
|
28
|
+
initialData: InitialFormData<TValues>,
|
|
29
|
+
/** The Formik state helpers */
|
|
30
|
+
formikHelpers: FormikHelpers<TValues>) => Promise<TSubmitResponse | void> | void;
|
|
23
31
|
/**
|
|
24
32
|
* A function to handle an action execution on a FormStation.
|
|
25
33
|
* If action can not be performed, an error can be thrown which will then be displayed by the FormStation.
|
|
@@ -31,4 +39,10 @@ export type ActionHandler<TValues = FormikValues, TSubmitResponse = unknown> = (
|
|
|
31
39
|
submitResponse: TSubmitResponse | undefined;
|
|
32
40
|
}) => Promise<ErrorType | undefined | void> | ErrorType | undefined | void;
|
|
33
41
|
export type FormActionData<TValues = FormikValues, TSubmitResponse = unknown> = ActionData<ActionHandler<TValues, TSubmitResponse>>;
|
|
42
|
+
export type ObjectSchemaDefinition<T extends Data | null = any> = {
|
|
43
|
+
[field in keyof T]: any;
|
|
44
|
+
};
|
|
45
|
+
export interface StationErrorStateType extends StationError {
|
|
46
|
+
type?: string;
|
|
47
|
+
}
|
|
34
48
|
//# sourceMappingURL=FormStation.models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormStation.models.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/FormStation.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"FormStation.models.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/FormStation.models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzD,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IAChB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,MAAM,gBAAgB,CAAC,OAAO,EAAE,eAAe,IAAI;AACvD,qCAAqC;AACrC,MAAM,EAAE,OAAO;AACf,qCAAqC;AACrC,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC;AACrC,+BAA+B;AAC/B,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC,KAClC,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,CACvB,OAAO,GAAG,YAAY,EACtB,eAAe,GAAG,OAAO,IACvB,CAAC,WAAW,EAAE;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,eAAe,GAAG,SAAS,CAAC;CAC7C,KAAK,OAAO,CAAC,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AAE3E,MAAM,MAAM,cAAc,CACxB,OAAO,GAAG,YAAY,EACtB,eAAe,GAAG,OAAO,IACvB,UAAU,CAAC,aAAa,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;AAExD,MAAM,MAAM,sBAAsB,CAEhC,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,GAAG,IACzB;KAMD,KAAK,IAAI,MAAM,CAAC,GAAG,GAAG;CACxB,CAAC;AAEF,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { OptionalObjectSchema } from 'yup/lib/object';
|
|
3
|
+
import { ActionsProps } from '../../Actions';
|
|
4
|
+
import { StationError } from '../../models';
|
|
5
|
+
import { FormActionData, ObjectSchemaDefinition } from '../FormStation.models';
|
|
6
|
+
interface FormActionProps<T, Y> extends Omit<ActionsProps, 'actions'> {
|
|
7
|
+
validationSchema?: OptionalObjectSchema<ObjectSchemaDefinition<any>>;
|
|
8
|
+
actions?: FormActionData<T, Y>[];
|
|
9
|
+
setStationError: (error: StationError) => void;
|
|
10
|
+
setValidationError: () => void;
|
|
11
|
+
submitResponse?: React.MutableRefObject<Y | undefined>;
|
|
12
|
+
alwaysSubmitBeforeAction?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
isFormSubmitting?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Saves the form before the action is performed.
|
|
18
|
+
*/
|
|
19
|
+
export declare const FormStationActions: <T, Y>(props: React.PropsWithChildren<FormActionProps<T, Y>>) => JSX.Element;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=FormStationActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormStationActions.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationActions/FormStationActions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAW,YAAY,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAa,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/E,UAAU,eAAe,CAAC,CAAC,EAAE,CAAC,CAAE,SAAQ,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC;IAEnE,gBAAgB,CAAC,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC;IACrE,OAAO,CAAC,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,cAAc,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACvD,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,mEAE5B,WAyGF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FormikValues } from 'formik';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ChangeSet } from '../helpers/useChangeSets';
|
|
4
|
+
export interface FormStationContextType {
|
|
5
|
+
changeSets: ChangeSet<FormikValues>[];
|
|
6
|
+
pushChangeSet: (value: never) => void;
|
|
7
|
+
popChangeSet: () => ChangeSet<FormikValues> | undefined;
|
|
8
|
+
clearChangeSets: () => FormikValues;
|
|
9
|
+
lastUndoneValue: React.MutableRefObject<FormikValues>;
|
|
10
|
+
autosave: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const FormStationContext: React.Context<FormStationContextType>;
|
|
13
|
+
//# sourceMappingURL=FormStationContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormStationContext.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationContext/FormStationContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;IACtC,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,MAAM,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC;IACxD,eAAe,EAAE,MAAM,YAAY,CAAC;IACpC,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACtD,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,kBAAkB,uCAO7B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { Data } from '../../../types';
|
|
3
|
+
interface FormStationContextProviderProps<TValues extends Data> {
|
|
4
|
+
autosave?: boolean;
|
|
5
|
+
autosaveDelay?: number;
|
|
6
|
+
currentValuesRef?: React.MutableRefObject<Partial<TValues>>;
|
|
7
|
+
}
|
|
8
|
+
export declare const FormStationContextProvider: <TValues extends Data>({ children, autosave, autosaveDelay, currentValuesRef, }: React.PropsWithChildren<FormStationContextProviderProps<TValues>>) => JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=FormStationContextProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormStationContextProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationContext/FormStationContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAMtC,UAAU,+BAA+B,CAAC,OAAO,SAAS,IAAI;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;CAC7D;AAED,eAAO,MAAM,0BAA0B,yJAOnC,WAiEH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PageHeaderProps } from '../../PageHeader';
|
|
3
|
+
/**
|
|
4
|
+
* Handles showRefresh and cancel buttons based on form states
|
|
5
|
+
*/
|
|
6
|
+
export declare const FormStationHeader: React.FC<Omit<PageHeaderProps, 'title'> & {
|
|
7
|
+
titleProperty?: string;
|
|
8
|
+
defaultTitle?: string;
|
|
9
|
+
cancelNavigationUrl?: string;
|
|
10
|
+
isFormSubmitting?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=FormStationHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormStationHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationHeader/FormStationHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAGL,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAG1B;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CACtC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAgEF,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Data } from '../../../types';
|
|
2
|
+
export declare const mergeData: <TValues extends Data>(initialValues: TValues, currentValues: TValues, updatedValues?: Partial<TValues> | undefined) => {
|
|
3
|
+
newInitialValues: TValues;
|
|
4
|
+
newCurrentValues: TValues;
|
|
5
|
+
shouldUpdateCurrentValues: boolean;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=mergeData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeData.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/helpers/mergeData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGtC,eAAO,MAAM,SAAS;;;+BAOO,OAAO;CAenC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ChangeSet<T> {
|
|
2
|
+
prev: Partial<T>;
|
|
3
|
+
next: Partial<T>;
|
|
4
|
+
}
|
|
5
|
+
export declare const useChangeSets: <T>(initialValues: T) => {
|
|
6
|
+
changeSets: ChangeSet<T>[];
|
|
7
|
+
push: (value: ChangeSet<T>) => number;
|
|
8
|
+
pop: () => ChangeSet<T> | undefined;
|
|
9
|
+
clear: () => Partial<T>;
|
|
10
|
+
getAggregatedChanges: () => T;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=useChangeSets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChangeSets.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/helpers/useChangeSets.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;CAClB;AAED,eAAO,MAAM,aAAa;;mCAIO,MAAM;;;;CA0DtC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormikHelpers } from 'formik';
|
|
2
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
+
import { Data } from '../../../types';
|
|
4
|
+
import type { InitialFormData, SaveDataFunction, StationErrorStateType } from '../FormStation.models';
|
|
5
|
+
export type FormStationDataProvider = <TValues extends Data, TSubmitResponse>(initialData: InitialFormData<TValues>, saveData: SaveDataFunction<TValues, TSubmitResponse>, currentDataRef: React.MutableRefObject<TValues>) => {
|
|
6
|
+
onSubmit: (values: TValues, formikHelpers: FormikHelpers<TValues>, initialFormData?: InitialFormData<TValues>) => Promise<TSubmitResponse> | void;
|
|
7
|
+
stationError?: StationErrorStateType;
|
|
8
|
+
setStationError: Dispatch<SetStateAction<StationErrorStateType | undefined>>;
|
|
9
|
+
isFormSubmitting: boolean;
|
|
10
|
+
lastSubmittedResponse: React.MutableRefObject<TSubmitResponse | undefined>;
|
|
11
|
+
initialValues: TValues | null | undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare const useDataProvider: FormStationDataProvider;
|
|
14
|
+
//# sourceMappingURL=useDataProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDataProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/helpers/useDataProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EACL,QAAQ,EACR,cAAc,EAKf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAItC,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAG/B,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,SAAS,IAAI,EAAE,eAAe,EAC1E,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,EACrC,QAAQ,EAAE,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,EACpD,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAC5C;IACH,QAAQ,EAAE,CACR,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC,EACrC,eAAe,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,KACvC,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IACrC,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAAC,CAAC;IAC7E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,qBAAqB,EAAE,KAAK,CAAC,gBAAgB,CAAC,eAAe,GAAG,SAAS,CAAC,CAAC;IAC3E,aAAa,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,uBAkI7B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormikContextType } from 'formik';
|
|
2
|
+
export declare const useDebouncedFormikValues: <TValues>(autosaveDelay?: number) => {
|
|
3
|
+
debouncedValues: TValues;
|
|
4
|
+
} & import("formik").FormikSharedConfig<{}> & import("formik").FormikState<TValues> & import("formik").FormikHelpers<TValues> & import("formik").FormikHandlers & import("formik").FormikComputedProps<TValues> & import("formik").FormikRegistration & {
|
|
5
|
+
submitForm: () => Promise<any>;
|
|
6
|
+
} & Pick<import("formik").FormikConfig<TValues>, "validate" | "validationSchema">;
|
|
7
|
+
//# sourceMappingURL=useDebouncedFormikValues.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebouncedFormikValues.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/helpers/useDebouncedFormikValues.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,QAAQ,CAAC;AAI7D,eAAO,MAAM,wBAAwB,4BACnB,MAAM;;;;iFAgBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUndo.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/helpers/useUndo.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO;cACR,MAAM,IAAI;aACX,MAAM,IAAI;cACT,OAAO;CAmClB,CAAC"}
|
package/dist/components/FormStation/{useValidationError.d.ts → helpers/useValidationError.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StationErrorStateType } from '
|
|
2
|
+
import type { StationErrorStateType } from '../FormStation.models';
|
|
3
3
|
/**
|
|
4
4
|
* Cares for showing (and removing) validation errors.
|
|
5
5
|
* @param stationError the currently showing error
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useValidationError.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/helpers/useValidationError.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAenE;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,qBAAqB,GAAG,SAAS,EAC/C,eAAe,EAAE,KAAK,CAAC,QAAQ,CAC7B,KAAK,CAAC,cAAc,CAAC,qBAAqB,GAAG,SAAS,CAAC,CACxD,GACA;IACD,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,iBAAiB,EAAE,GAAG,CAAC,OAAO,CAAC;CAChC,CAyBA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Create, CreateProps } from './Create/Create';
|
|
2
2
|
export { Details, DetailsProps } from './Details/Details';
|
|
3
|
-
export { FormStation, FormStationProps
|
|
3
|
+
export { FormStation, FormStationProps } from './FormStation';
|
|
4
4
|
export * from './FormStation.models';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,cAAc,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getArrayDiff.d.ts","sourceRoot":"","sources":["../../../../src/components/Utils/Postgraphile/getArrayDiff.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getArrayDiff.d.ts","sourceRoot":"","sources":["../../../../src/components/Utils/Postgraphile/getArrayDiff.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EAC/B,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,GAC9B;IACD,gCAAgC;IAChC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,kCAAkC;IAClC,OAAO,EAAE,CAAC,EAAE,CAAC;CACd,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EAC/B,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,GAAG,SAAS,EAC/B,GAAG,CAAC,EAAE,MAAM,CAAC,GACZ;IACD,gCAAgC;IAChC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,kCAAkC;IAClC,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,kCAAkC;IAClC,OAAO,EAAE,CAAC,EAAE,CAAC;CACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormDiff.d.ts","sourceRoot":"","sources":["../../../../src/components/Utils/Postgraphile/getFormDiff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"getFormDiff.d.ts","sourceRoot":"","sources":["../../../../src/components/Utils/Postgraphile/getFormDiff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,YAAY,EAChD,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,GACjB,OAAO,CAAC,CAAC,CAAC,CAUZ"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
/// <reference types="jest-expect-message" />
|
|
3
|
+
/// <reference types="testing-library__jest-dom" />
|
|
1
4
|
import { ShallowWrapper } from 'enzyme';
|
|
2
5
|
/**
|
|
3
6
|
* Executes the given callback in an `setImmediate` call and returns a Promise that resolves after the call is finished.
|
|
@@ -35,5 +38,5 @@ export declare function actWithReturn<T>(render: () => T | Promise<T>): Promise<
|
|
|
35
38
|
* This helper will not mock any thing. It's just converting Typescript types!
|
|
36
39
|
* @param f the mocked function
|
|
37
40
|
*/
|
|
38
|
-
export declare const asSpy: <T>(fn: (...args: any) => T) => jest.SpyInstance<Partial<T
|
|
41
|
+
export declare const asSpy: <T>(fn: (...args: any) => T) => jest.SpyInstance<Partial<T>, any, any>;
|
|
39
42
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/helpers/testing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAOxC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAClB,CAAC,MAAM,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,KAC7C,QAAQ,IAAI,CAWd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kCAAkC;;
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../src/helpers/testing.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAOxC;;;GAGG;AACH,eAAO,MAAM,iBAAiB,aAClB,CAAC,MAAM,QAAQ,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,KAC7C,QAAQ,IAAI,CAWd,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kCAAkC;;gBAGpC,eAAe,GAAG,CAAC,QACtB,MAAM,iBACG,MAAM,GAAG,SAAS,KAC9B,IA6BJ,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAAsB,aAAa,CAAC,CAAC,EACnC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAC3B,OAAO,CAAC,CAAC,CAAC,CAQZ;AAED;;;;GAIG;AACH,eAAO,MAAM,KAAK,oBACF,GAAG,iDAGlB,CAAC"}
|