@axinom/mosaic-ui 0.43.0-rc.0 → 0.43.0-rc.2

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.
Files changed (52) hide show
  1. package/dist/components/FormStation/FormGrid/FormGrid.d.ts +7 -0
  2. package/dist/components/FormStation/FormGrid/FormGrid.d.ts.map +1 -0
  3. package/dist/components/FormStation/FormGrid/index.d.ts +2 -0
  4. package/dist/components/FormStation/FormGrid/index.d.ts.map +1 -0
  5. package/dist/components/FormStation/FormStation.d.ts +3 -12
  6. package/dist/components/FormStation/FormStation.d.ts.map +1 -1
  7. package/dist/components/FormStation/FormStation.models.d.ts +16 -2
  8. package/dist/components/FormStation/FormStation.models.d.ts.map +1 -1
  9. package/dist/components/FormStation/FormStationActions/FormStationActions.d.ts +21 -0
  10. package/dist/components/FormStation/FormStationActions/FormStationActions.d.ts.map +1 -0
  11. package/dist/components/FormStation/FormStationActions/index.d.ts +2 -0
  12. package/dist/components/FormStation/FormStationActions/index.d.ts.map +1 -0
  13. package/dist/components/FormStation/FormStationContentWrapper/FormStationContentWrapper.d.ts +11 -0
  14. package/dist/components/FormStation/FormStationContentWrapper/FormStationContentWrapper.d.ts.map +1 -0
  15. package/dist/components/FormStation/FormStationContentWrapper/index.d.ts +2 -0
  16. package/dist/components/FormStation/FormStationContentWrapper/index.d.ts.map +1 -0
  17. package/dist/components/FormStation/FormStationHeader/FormStationHeader.d.ts +11 -0
  18. package/dist/components/FormStation/FormStationHeader/FormStationHeader.d.ts.map +1 -0
  19. package/dist/components/FormStation/FormStationHeader/index.d.ts +2 -0
  20. package/dist/components/FormStation/FormStationHeader/index.d.ts.map +1 -0
  21. package/dist/components/FormStation/helpers/useDataProvider.d.ts +14 -0
  22. package/dist/components/FormStation/helpers/useDataProvider.d.ts.map +1 -0
  23. package/dist/components/FormStation/{useValidationError.d.ts → helpers/useValidationError.d.ts} +1 -1
  24. package/dist/components/FormStation/helpers/useValidationError.d.ts.map +1 -0
  25. package/dist/components/FormStation/index.d.ts +2 -1
  26. package/dist/components/FormStation/index.d.ts.map +1 -1
  27. package/dist/index.es.js +4 -4
  28. package/dist/index.es.js.map +1 -1
  29. package/dist/index.js +4 -4
  30. package/dist/index.js.map +1 -1
  31. package/package.json +3 -3
  32. package/src/components/FormStation/FormGrid/FormGrid.scss +10 -0
  33. package/src/components/FormStation/FormGrid/FormGrid.tsx +25 -0
  34. package/src/components/FormStation/FormGrid/index.ts +1 -0
  35. package/src/components/FormStation/FormStation.models.ts +28 -2
  36. package/src/components/FormStation/FormStation.scss +1 -117
  37. package/src/components/FormStation/FormStation.stories.tsx +4 -11
  38. package/src/components/FormStation/FormStation.tsx +39 -388
  39. package/src/components/FormStation/FormStationActions/FormStationActions.tsx +130 -0
  40. package/src/components/FormStation/FormStationActions/index.ts +1 -0
  41. package/src/components/FormStation/FormStationContentWrapper/FormStationContentWrapper.scss +66 -0
  42. package/src/components/FormStation/FormStationContentWrapper/FormStationContentWrapper.tsx +76 -0
  43. package/src/components/FormStation/FormStationContentWrapper/index.ts +1 -0
  44. package/src/components/FormStation/FormStationHeader/FormStationHeader.tsx +88 -0
  45. package/src/components/FormStation/FormStationHeader/index.ts +1 -0
  46. package/src/components/FormStation/helpers/useDataProvider.ts +124 -0
  47. package/src/components/FormStation/{useValidationError.tsx → helpers/useValidationError.tsx} +2 -1
  48. package/src/components/FormStation/index.ts +2 -5
  49. package/dist/components/FormStation/StationErrorStateType.d.ts +0 -5
  50. package/dist/components/FormStation/StationErrorStateType.d.ts.map +0 -1
  51. package/dist/components/FormStation/useValidationError.d.ts.map +0 -1
  52. package/src/components/FormStation/StationErrorStateType.tsx +0 -5
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface FormGridProps {
3
+ edgeToEdgeContent?: boolean;
4
+ }
5
+ export declare const FormGrid: React.FC<FormGridProps>;
6
+ export {};
7
+ //# sourceMappingURL=FormGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormGrid.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormGrid/FormGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,aAAa;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAgB5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FormGrid';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormGrid/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,12 +1,9 @@
1
- import { FormikHelpers, FormikValues } from 'formik';
1
+ import { FormikValues } from 'formik';
2
2
  import React, { PropsWithChildren } from 'react';
3
3
  import { OptionalObjectSchema } from 'yup/lib/object';
4
4
  import { Data } from '../../types/data';
5
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
- };
6
+ import { 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,13 +42,7 @@ 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;
57
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FormStation.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/FormStation.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,aAAa,EACb,YAAY,EAEb,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,EAAE,EACZ,iBAAiB,EAMlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAWxC,OAAO,EAAa,cAAc,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAMvE,MAAM,MAAM,sBAAsB,CAEhC,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,GAAG,IACzB;KAMD,KAAK,IAAI,MAAM,CAAC,GAAG,GAAG;CACxB,CAAC;AAEF,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;IACR,qCAAqC;IACrC,MAAM,EAAE,OAAO;IACf,qCAAqC;IACrC,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC;IACrC,+BAA+B;IAC/B,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC,KAClC,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IACrC,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAeD,eAAO,MAAM,WAAW,kXAmBpB,WA0LH,CAAC"}
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,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,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;CACpB;AAED,eAAO,MAAM,WAAW,kXAmBpB,WAsEH,CAAC"}
@@ -1,6 +1,7 @@
1
- import { FormikValues } from 'formik';
1
+ import { FormikHelpers, FormikValues } from 'formik';
2
+ import { Data } from '../../types';
2
3
  import { ActionData } from '../Actions';
3
- import { ErrorType } from '../models';
4
+ import { 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;
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;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,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;;;;;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"}
1
+ {"version":3,"file":"FormStation.models.d.ts","sourceRoot":"","sources":["../../../src/components/FormStation/FormStation.models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEpD,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,CAAC,GAAG,IAAI,CAAC;AAErC;;;;;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 { ObjectSchemaDefinition } from '..';
4
+ import { ActionsProps } from '../../Actions';
5
+ import { FormActionData, StationErrorStateType } 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: StationErrorStateType) => 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 FormStationAction: <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;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,IAAI,CAAC;AAE5C,OAAO,EAAW,YAAY,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9E,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,qBAAqB,KAAK,IAAI,CAAC;IACxD,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,iBAAiB,mEAE3B,WAsGF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FormStationActions';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationActions/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { Data } from '../../../types';
3
+ import { FormStationProps } from '../FormStation';
4
+ import { StationErrorStateType } from '../FormStation.models';
5
+ interface FormStationContentWrapperProps extends Pick<FormStationProps<Data>, 'stationMessage' | 'edgeToEdgeContent' | 'infoPanel' | 'initialData'> {
6
+ stationError?: StationErrorStateType;
7
+ setStationError: React.Dispatch<React.SetStateAction<StationErrorStateType | undefined>>;
8
+ }
9
+ export declare const FormStationContentWrapper: React.FC<FormStationContentWrapperProps>;
10
+ export {};
11
+ //# sourceMappingURL=FormStationContentWrapper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormStationContentWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationContentWrapper/FormStationContentWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAGtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,UAAU,8BACR,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,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAC9C,8BAA8B,CAqD/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FormStationContentWrapper';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationContentWrapper/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,11 @@
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
+ }>;
11
+ //# 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,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAGL,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAE1B;;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;CAC9B,CAoEF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './FormStationHeader';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/FormStation/FormStationHeader/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { FormikHelpers } from 'formik';
2
+ import { Dispatch, SetStateAction } from 'react';
3
+ import { Data } from '../../../types';
4
+ import { InitialFormData, SaveDataFunction, StationErrorStateType } from '../FormStation.models';
5
+ export type FormStationDataProvider = <TValues extends Data, TSubmitResponse>(initialData: InitialFormData<TValues>, saveData: SaveDataFunction<TValues, TSubmitResponse>) => {
6
+ onSubmit: (values: TValues, formikHelpers: FormikHelpers<TValues>) => Promise<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;AAGtC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAE/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,KACjD;IACH,QAAQ,EAAE,CACR,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC,KAClC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,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,uBAyF7B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { StationErrorStateType } from './StationErrorStateType';
2
+ import { 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,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAgB9D;;;;;;;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,6 @@
1
1
  export { Create, CreateProps } from './Create/Create';
2
2
  export { Details, DetailsProps } from './Details/Details';
3
- export { FormStation, FormStationProps, ObjectSchemaDefinition, } from './FormStation';
3
+ export { FormGrid } from './FormGrid';
4
+ export { FormStation, FormStationProps } from './FormStation';
4
5
  export * from './FormStation.models';
5
6
  //# 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,EACL,WAAW,EACX,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,cAAc,sBAAsB,CAAC"}
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,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,cAAc,sBAAsB,CAAC"}