@arquimedes.co/eureka-forms 3.0.0-refactor → 3.0.1-refactor

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 (188) hide show
  1. package/dist/@Types/@Types.d.ts +2 -0
  2. package/dist/@Types/AYFFormStep.d.ts +19 -0
  3. package/dist/@Types/Branding.d.ts +13 -0
  4. package/dist/@Types/CBRFormStep.d.ts +74 -0
  5. package/dist/@Types/Condition.d.ts +143 -0
  6. package/dist/@Types/Draft/Draft.d.ts +12 -0
  7. package/dist/@Types/Draft/DraftEntityData.d.ts +54 -0
  8. package/dist/@Types/Entity.d.ts +36 -0
  9. package/dist/@Types/Form.d.ts +75 -0
  10. package/dist/@Types/FormStep.d.ts +219 -0
  11. package/dist/@Types/GenericFormSteps.d.ts +84 -0
  12. package/dist/@Types/MapperElement.d.ts +8 -0
  13. package/dist/@Types/Organization.d.ts +11 -0
  14. package/dist/@Types/Time.d.ts +6 -0
  15. package/dist/@Types/index.d.ts +1 -0
  16. package/dist/App/App.d.ts +57 -0
  17. package/dist/App/AppFunctions.d.ts +23 -0
  18. package/dist/App/AppFunctions.test.d.ts +1 -0
  19. package/dist/App/AppHooks.d.ts +10 -0
  20. package/dist/App/AppHooks.test.d.ts +1 -0
  21. package/dist/Contexts/CustomContext.d.ts +11 -0
  22. package/dist/Contexts/FormContext.d.ts +6 -0
  23. package/dist/Contexts/SectionContext.d.ts +2 -0
  24. package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +11 -0
  25. package/dist/Form/Form.d.ts +39 -0
  26. package/dist/Form/FormFunctions.d.ts +12 -0
  27. package/dist/Form/FormFunctions.test.d.ts +1 -0
  28. package/dist/Form/FormHooks.d.ts +2 -0
  29. package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +3 -0
  30. package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +3 -0
  31. package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +3 -0
  32. package/dist/Form/Section/Section.d.ts +5 -0
  33. package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +3 -0
  34. package/dist/Form/Terms/Term/Term.d.ts +7 -0
  35. package/dist/Form/Terms/Terms.d.ts +2 -0
  36. package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +7 -0
  37. package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +8 -0
  38. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +7 -0
  39. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +10 -0
  40. package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +7 -0
  41. package/dist/FormSteps/AYFStepMapper.d.ts +11 -0
  42. package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +14 -0
  43. package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +3 -0
  44. package/dist/FormSteps/CBRStepMapper.d.ts +12 -0
  45. package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +8 -0
  46. package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +3 -0
  47. package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +8 -0
  48. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +3 -0
  49. package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +8 -0
  50. package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +3 -0
  51. package/dist/FormSteps/CustomStep.d.ts +26 -0
  52. package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +10 -0
  53. package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +3 -0
  54. package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +14 -0
  55. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +11 -0
  56. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +3 -0
  57. package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +8 -0
  58. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
  59. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +2 -0
  60. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +16 -0
  61. package/dist/FormSteps/MapperStep/MapperStep.d.ts +17 -0
  62. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +4 -0
  63. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +15 -0
  64. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +4 -0
  65. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +4 -0
  66. package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +20 -0
  67. package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +3 -0
  68. package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +10 -0
  69. package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +3 -0
  70. package/dist/FormSteps/RatingStep/RatingStep.d.ts +8 -0
  71. package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +3 -0
  72. package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +8 -0
  73. package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +3 -0
  74. package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +8 -0
  75. package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +4 -0
  76. package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +35 -0
  77. package/dist/FormSteps/Step.d.ts +7 -0
  78. package/dist/FormSteps/StepFunctions.d.ts +27 -0
  79. package/dist/FormSteps/StepFunctions.test.d.ts +1 -0
  80. package/dist/FormSteps/StepHooks.d.ts +109 -0
  81. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +9 -0
  82. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +7 -0
  83. package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +9 -0
  84. package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +3 -0
  85. package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +16 -0
  86. package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +3 -0
  87. package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +11 -0
  88. package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +3 -0
  89. package/dist/FormSteps/TitleStep/TitleStep.d.ts +8 -0
  90. package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +9 -0
  91. package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +11 -0
  92. package/dist/Icons/@IconTypes.d.ts +6 -0
  93. package/dist/Icons/ArrowLeftIcon.d.ts +3 -0
  94. package/dist/Icons/ArrowRightIcon.d.ts +3 -0
  95. package/dist/Icons/CalendarIcon.d.ts +3 -0
  96. package/dist/Icons/CheckCircleIcon.d.ts +3 -0
  97. package/dist/Icons/CheckboxCheckedIcon.d.ts +3 -0
  98. package/dist/Icons/CheckboxUncheckedIcon.d.ts +3 -0
  99. package/dist/Icons/ClockIcon.d.ts +3 -0
  100. package/dist/Icons/CloseIcon.d.ts +3 -0
  101. package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
  102. package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
  103. package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
  104. package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
  105. package/dist/Icons/DeleteIcon.d.ts +3 -0
  106. package/dist/Icons/DocumentIcon.d.ts +3 -0
  107. package/dist/Icons/Entities/CheckListIcon.d.ts +3 -0
  108. package/dist/Icons/Entities/GenericEntityIcon.d.ts +3 -0
  109. package/dist/Icons/Entities/HandshakeIcon.d.ts +3 -0
  110. package/dist/Icons/Entities/SupplierIcon.d.ts +3 -0
  111. package/dist/Icons/ErrorIcon.d.ts +3 -0
  112. package/dist/Icons/ExpandLessIcon.d.ts +3 -0
  113. package/dist/Icons/ExpandMoreIcon.d.ts +3 -0
  114. package/dist/Icons/FileIcon.d.ts +3 -0
  115. package/dist/Icons/InfoIcon.d.ts +3 -0
  116. package/dist/Icons/LocationIcon.d.ts +3 -0
  117. package/dist/Icons/PersonIcon.d.ts +3 -0
  118. package/dist/Icons/Ratings/DislikeIcon.d.ts +3 -0
  119. package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +3 -0
  120. package/dist/Icons/Ratings/LikeIcon.d.ts +3 -0
  121. package/dist/Icons/Ratings/SatisfiedIcon.d.ts +3 -0
  122. package/dist/Icons/Ratings/StarIcon.d.ts +3 -0
  123. package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +3 -0
  124. package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +3 -0
  125. package/dist/Icons/WarningIcon.d.ts +3 -0
  126. package/dist/Init.d.ts +1 -0
  127. package/dist/Services/FileService.d.ts +5 -0
  128. package/dist/Services/FormService.d.ts +5 -0
  129. package/dist/Services/OrganizationService.d.ts +2 -0
  130. package/dist/Shared/CustomBtn/CustomBtn.d.ts +17 -0
  131. package/dist/Shared/ErkButton/ErkButton.d.ts +31 -0
  132. package/dist/Shared/ErkButton/ErkButton.stories.d.ts +23 -0
  133. package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +19 -0
  134. package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +16 -0
  135. package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +16 -0
  136. package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +23 -0
  137. package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +16 -0
  138. package/dist/Shared/ErkSelect/ErkSelect.d.ts +39 -0
  139. package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +18 -0
  140. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +28 -0
  141. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.d.ts +26 -0
  142. package/dist/Shared/ErkTextField/ErkTextField.d.ts +26 -0
  143. package/dist/Shared/ErkTextField/ErkTextField.stories.d.ts +24 -0
  144. package/dist/Shared/ErkTimePicker/ErkTimePicker.d.ts +31 -0
  145. package/dist/Shared/InputIcon/InputIcon.d.ts +7 -0
  146. package/dist/Shared/Loader/Loader.d.ts +17 -0
  147. package/dist/Shared/Navbar/Navbar.d.ts +8 -0
  148. package/dist/Shared/Navbar/Navbar.stories.d.ts +13 -0
  149. package/dist/Shared/Rating/Rating.d.ts +13 -0
  150. package/dist/Shared/Rating/Rating.stories.d.ts +15 -0
  151. package/dist/Shared/Rating/Ratings/LikeRating.d.ts +3 -0
  152. package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +3 -0
  153. package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +3 -0
  154. package/dist/Shared/Toggle/Toggle.d.ts +8 -0
  155. package/dist/States/GlobalSlice.d.ts +46 -0
  156. package/dist/States/SiteSlice.d.ts +77 -0
  157. package/dist/States/WidthStatsSlice.d.ts +7 -0
  158. package/dist/Utils/AxiosAPI.d.ts +2 -0
  159. package/dist/Utils/AxiosWidget.d.ts +2 -0
  160. package/dist/Utils/CBRFunctions.d.ts +8 -0
  161. package/dist/Utils/DraftFunctions.d.ts +56 -0
  162. package/dist/Utils/FormStepFunctions.d.ts +15 -0
  163. package/dist/Utils/LocaleUtils.d.ts +2 -0
  164. package/dist/Utils/MaterialProviders.d.ts +25 -0
  165. package/dist/Utils/MuiClassnameSetup.d.ts +1 -0
  166. package/dist/Utils/PhoneFunctions.d.ts +2 -0
  167. package/dist/Utils/TestUtils.d.ts +70 -0
  168. package/dist/Utils/store.d.ts +29 -0
  169. package/dist/Widget.d.ts +1 -0
  170. package/dist/__tests__/setup.d.ts +1 -0
  171. package/dist/constants/AYFFormStepTypes.d.ts +9 -0
  172. package/dist/constants/CBRFormStepTypes.d.ts +21 -0
  173. package/dist/constants/ConditionTypes.d.ts +27 -0
  174. package/dist/constants/Draft/DraftEntityDataTypes.d.ts +11 -0
  175. package/dist/constants/Draft/DraftEntityTypes.d.ts +3 -0
  176. package/dist/constants/Draft/DraftStyleTypes.d.ts +7 -0
  177. package/dist/constants/EntityPropertyTypes.d.ts +10 -0
  178. package/dist/constants/Files/FileExtensions.d.ts +3 -0
  179. package/dist/constants/Files/FileMaxSize.d.ts +2 -0
  180. package/dist/constants/FormStepTypes.d.ts +64 -0
  181. package/dist/constants/IconTypes.d.ts +15 -0
  182. package/dist/constants/InternalFormStyle.d.ts +3 -0
  183. package/dist/constants/TicketPropertyTypes.d.ts +3 -0
  184. package/dist/hooks.d.ts +7 -0
  185. package/dist/index.lib.d.ts +7 -0
  186. package/dist/main.d.ts +2 -0
  187. package/dist/main.js +1 -1
  188. package/package.json +2 -2
@@ -0,0 +1,17 @@
1
+ import { Mapper } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ import { MapperElement } from '../../@Types/MapperElement';
4
+ interface CustomMapperElementModifiers<Type> {
5
+ calcName?: (element: MapperElement<Type>) => string;
6
+ isDeleted?: (element: MapperElement<Type>) => boolean;
7
+ }
8
+ export interface MapperStepProps<Type> extends StepProps {
9
+ /** The MapperStep to display */
10
+ step: Mapper;
11
+ customAdd?: (ref: React.RefObject<HTMLDivElement>, disabled: boolean, handleAddElement: (value?: any) => void) => JSX.Element;
12
+ customElementRender?: (element: MapperElement<Type>, index: number, renderElement: (renderElementButtons?: (element: MapperElement<any>) => JSX.Element) => JSX.Element) => JSX.Element;
13
+ customElementModifiers?: CustomMapperElementModifiers<Type>;
14
+ calcCustomStepProps?: (element: MapperElement<Type>, customStepProps: Record<string, any>) => Record<string, any>;
15
+ }
16
+ declare function MapperStep<Type>(props: MapperStepProps<Type>): JSX.Element;
17
+ export default MapperStep;
@@ -0,0 +1,4 @@
1
+ import { MapperStepProps } from '../../../MapperStep';
2
+ import { MapperElementComponentProps } from '../MapperElementComponent';
3
+ declare function ListMapperElement<Type = any>({ step, num, loading, element, children, editable, handleDelete, customElementModifiers, }: MapperStepProps<Type> & MapperElementComponentProps<Type>): JSX.Element;
4
+ export default ListMapperElement;
@@ -0,0 +1,15 @@
1
+ import { MapperStepProps } from '../../MapperStep';
2
+ import React from 'react';
3
+ import { MapperElement } from '../../../../@Types/MapperElement';
4
+ import { MapperValue } from '../MaterialMapperStep';
5
+ export interface MapperElementComponentProps<Type> {
6
+ num: number;
7
+ loading?: boolean;
8
+ element: MapperElement<Type>;
9
+ onChange: (value: MapperValue<Type>) => void;
10
+ value: MapperValue<Type>;
11
+ handleDelete: () => void;
12
+ children?: React.ReactNode;
13
+ }
14
+ declare function MapperElementComponent<Type = any>(props: MapperStepProps<Type> & MapperElementComponentProps<Type>): JSX.Element;
15
+ export default MapperElementComponent;
@@ -0,0 +1,4 @@
1
+ import { MapperStepProps } from '../../../MapperStep';
2
+ import { MapperElementComponentProps } from '../MapperElementComponent';
3
+ declare function PagedMapperElement<Type = any>({ step, num, loading, element, children, editable, onChange, value, handleDelete, customElementModifiers, customElementRender, }: MapperStepProps<Type> & MapperElementComponentProps<Type>): JSX.Element;
4
+ export default PagedMapperElement;
@@ -0,0 +1,4 @@
1
+ import { MapperStepProps } from '../../../MapperStep';
2
+ import { MapperElementComponentProps } from '../MapperElementComponent';
3
+ declare function PillMapperElement<Type = any>({ step, num, loading, element, children, editable, handleDelete, customElementModifiers, customElementRender, }: MapperStepProps<Type> & MapperElementComponentProps<Type>): JSX.Element;
4
+ export default PillMapperElement;
@@ -0,0 +1,20 @@
1
+ import { MapperStepProps } from '../MapperStep';
2
+ import { FieldError } from 'react-hook-form';
3
+ import { MapperElement } from '../../../@Types/MapperElement';
4
+ import { Form } from '../../../@Types';
5
+ export interface MapperValue<Type> {
6
+ elements: MapperElement<Type>[];
7
+ page: number;
8
+ }
9
+ export interface MapperComponentProps<Type> extends MapperStepProps<Type> {
10
+ form: Form;
11
+ loading?: boolean;
12
+ error: FieldError | undefined;
13
+ onChange: (value: MapperValue<Type>) => void;
14
+ handleAddElement: (elementValue?: Type) => void;
15
+ value: MapperValue<Type>;
16
+ inputRef: any;
17
+ }
18
+ declare function MapperStep<Type>(props: MapperStepProps<Type>): JSX.Element;
19
+ export declare function CustomMapperStep<Type>(props: Omit<MapperComponentProps<Type>, 'form' | 'handleAddElement'>): JSX.Element;
20
+ export default MapperStep;
@@ -0,0 +1,3 @@
1
+ import { PhoneInputStepProps } from '../PhoneInputStep';
2
+ declare function PhoneInputStep({ step, editable, defaultValue }: PhoneInputStepProps): JSX.Element;
3
+ export default PhoneInputStep;
@@ -0,0 +1,10 @@
1
+ import { TextInput } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface PhoneInputStepProps extends StepProps {
4
+ /** The TextInputStep to display */
5
+ step: TextInput;
6
+ /** Default value to display */
7
+ defaultValue?: string;
8
+ }
9
+ declare function PhoneInputStep(props: PhoneInputStepProps): JSX.Element;
10
+ export default PhoneInputStep;
@@ -0,0 +1,3 @@
1
+ import { RatingStepProps } from '../RatingStep';
2
+ declare function RatingStep({ step, editable }: RatingStepProps): JSX.Element;
3
+ export default RatingStep;
@@ -0,0 +1,8 @@
1
+ import { Rating } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface RatingStepProps extends StepProps {
4
+ /** The RatingStep to display */
5
+ step: Rating;
6
+ }
7
+ declare function RatingStep(props: RatingStepProps): JSX.Element;
8
+ export default RatingStep;
@@ -0,0 +1,3 @@
1
+ import { SelectorStepProps } from '../SelectorStep';
2
+ declare function SelectorStepContainer(props: SelectorStepProps): JSX.Element;
3
+ export default SelectorStepContainer;
@@ -0,0 +1,8 @@
1
+ import { FormSelector } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface SelectorStepProps extends StepProps {
4
+ /** The SelectorStep to display */
5
+ step: FormSelector;
6
+ }
7
+ declare function SelectorStep(props: SelectorStepProps): JSX.Element;
8
+ export default SelectorStep;
@@ -0,0 +1,3 @@
1
+ import { SeparatorStepProps } from '../SeparatorStep';
2
+ declare function SeparatorStep({ step }: SeparatorStepProps): JSX.Element;
3
+ export default SeparatorStep;
@@ -0,0 +1,8 @@
1
+ import { Separator } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface SeparatorStepProps extends StepProps {
4
+ /** The TitleStep to display */
5
+ step: Separator;
6
+ }
7
+ declare function SeparatorStep(props: SeparatorStepProps): JSX.Element;
8
+ export default SeparatorStep;
@@ -0,0 +1,4 @@
1
+ import { SmartSelectStepProps } from '../SmartSelectStep';
2
+ import { GSmartSelect } from '../../../@Types/GenericFormSteps';
3
+ declare function SmartSelectStep<StepType extends GSmartSelect>({ step, editable, getOptions, calcDepError, defaultValue, filterOptions, IconComponent, valueOverwrite, getValueString, changeListener, getValueWarning, getOptionSelected, getOptionsConditionsIdSteps, renderNestedSteps, }: SmartSelectStepProps<StepType>): JSX.Element;
4
+ export default SmartSelectStep;
@@ -0,0 +1,35 @@
1
+ import { StepProps } from '../Step';
2
+ import { GSmartSelect } from '../../@Types/GenericFormSteps';
3
+ import { FormStep } from '../../@Types/FormStep';
4
+ import { DependencyStore } from '../../Form/Form';
5
+ import React from 'react';
6
+ export interface SmartSelectStepProps<StepType extends GSmartSelect = GSmartSelect> extends Omit<StepProps, 'step'> {
7
+ /** The SmartSelectStep to display */
8
+ step: StepType;
9
+ /** The icon to display */
10
+ IconComponent?: React.ElementType;
11
+ /** Function to call to get the options of the selector, return null if dependency is not met */
12
+ getOptions: (idOrganization: string | undefined, step: StepType, dependencyStore: DependencyStore) => Promise<any[] | null>;
13
+ /** Function to call to filter the options of the selector */
14
+ filterOptions?: (options: any[], dependencyStore: DependencyStore) => any[];
15
+ /** Function to determine the currently selected option */
16
+ getOptionSelected: (option: any, value: any) => boolean;
17
+ /** Function to determine the current value in string format */
18
+ getValueString: (value: any) => string;
19
+ /** Function to if currently selected option has warning */
20
+ getValueWarning?: (value: any) => string | null;
21
+ /** Function called to get the idSteps of the step's conditions for better refreshing */
22
+ getOptionsConditionsIdSteps?: (step: StepType) => string[];
23
+ /** Function that returns the error message based on the steps of the missing Dependencies, undefined if no error msg */
24
+ calcDepError?: (steps: FormStep[]) => string | undefined;
25
+ /** Function that overwrites the value before setting it */
26
+ valueOverwrite?: (value: any) => any;
27
+ /** Function called on each value change */
28
+ changeListener?: (value: any) => void;
29
+ /** default Value to select */
30
+ defaultValue?: any;
31
+ /** function called to render nested elements when selected */
32
+ renderNestedSteps?: (value: any) => JSX.Element;
33
+ }
34
+ declare function SmartSelectStep(props: SmartSelectStepProps): JSX.Element;
35
+ export default SmartSelectStep;
@@ -0,0 +1,7 @@
1
+ import { FormStep } from '../@Types/FormStep';
2
+ export interface StepProps {
3
+ step: FormStep;
4
+ editable: boolean;
5
+ }
6
+ declare function StepComponent({ step, ...props }: StepProps): JSX.Element;
7
+ export default StepComponent;
@@ -0,0 +1,27 @@
1
+ import { FormSize } from '../@Types/Form';
2
+ import { ApiSelector, CheckBox, ClassifierSelector, EntityValuePicker, FormSelector, FormStep } from '../@Types/FormStep';
3
+ import { AYFFormStep } from '../@Types/AYFFormStep';
4
+ import { CBRFormStep } from '../@Types/CBRFormStep';
5
+ import { Condition } from '../@Types/Condition';
6
+ import { DependencyStore } from '../Form/Form';
7
+ import { Entity } from '../@Types/Entity';
8
+ export type FillerSteps = FormSelector | ClassifierSelector | EntityValuePicker | ApiSelector | CheckBox;
9
+ export declare function calcFillerSize(step: FillerSteps, steps: Record<string, FormStep>, values: Record<string, unknown>, size: FormSize): number;
10
+ export declare const calcStepWidth: (stepSize: 1 | 2 | 3 | 4, size: FormSize) => number;
11
+ export declare const calcDefaultValue: (step: FormStep | CBRFormStep) => any;
12
+ export declare const iterateNestedSteps: (idStep: string, steps: Record<string, FormStep>, iteration: (step: FormStep) => void) => void;
13
+ /**
14
+ * Utility function to calc the substeps of a step
15
+ * @param step step to calc the substeps
16
+ * @param idModifier optional modifier for the ids of the substeps and all other properties
17
+ * @returns list of the ids of the substeps of the step, if modifier returns modified steps
18
+ */
19
+ export declare const calcSubSteps: (idStep: string, allSteps: Record<string, FormStep | CBRFormStep | AYFFormStep>, idModifier?: (idSubStep: string) => string) => string[];
20
+ export declare const evaluateCondition: (condition: Condition, dependencies: DependencyStore, entityValue?: {
21
+ entity?: Entity;
22
+ entityValue: {
23
+ _id: string;
24
+ value: string;
25
+ } & Record<string, any>;
26
+ }) => boolean;
27
+ export declare function getRelativeDate(nDays?: number, nHours?: number, nMinutes?: number, subtract?: boolean, date?: Date): Date;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,109 @@
1
+ import { GBaseStep } from '../@Types/GenericFormSteps';
2
+ import { ValuesStore } from '../States/SiteSlice';
3
+ import { RootState } from '../Utils/store';
4
+ import { Form } from '../@Types';
5
+ import { DependencyStore } from '../Form/Form';
6
+ import { FormStep } from '../@Types/FormStep';
7
+ import { FieldError, RefCallBack, UseControllerProps, useController } from 'react-hook-form';
8
+ import { Condition } from '../@Types/Condition';
9
+ import { CBRFormStep } from '../@Types/CBRFormStep';
10
+ export declare const selectOriginalValue: ((state: RootState, step: GBaseStep) => any) & {
11
+ clearCache: () => void;
12
+ resultsCount: () => number;
13
+ resetResultsCount: () => void;
14
+ } & {
15
+ resultFunc: (resultFuncArgs_0: ValuesStore, resultFuncArgs_1: GBaseStep) => any;
16
+ memoizedResultFunc: ((resultFuncArgs_0: ValuesStore, resultFuncArgs_1: GBaseStep) => any) & {
17
+ clearCache: () => void;
18
+ resultsCount: () => number;
19
+ resetResultsCount: () => void;
20
+ };
21
+ lastResult: () => any;
22
+ dependencies: [(state: RootState) => ValuesStore, (_state: RootState, step: GBaseStep) => GBaseStep];
23
+ recomputations: () => number;
24
+ resetRecomputations: () => void;
25
+ dependencyRecomputations: () => number;
26
+ resetDependencyRecomputations: () => void;
27
+ } & {
28
+ memoize: typeof import("reselect").weakMapMemoize;
29
+ argsMemoize: typeof import("reselect").weakMapMemoize;
30
+ };
31
+ export interface StepDependency {
32
+ originalValue: any;
33
+ isDependency: boolean;
34
+ handleStepDep: (value: any) => void;
35
+ }
36
+ export declare const useStepDependency: (step: GBaseStep, defaultValue?: any) => StepDependency;
37
+ export declare const selectStepDependencies: ((state: RootState, _step: GBaseStep, form: Form) => {
38
+ invalids: string[];
39
+ emptyDep: boolean;
40
+ }) & {
41
+ clearCache: () => void;
42
+ resultsCount: () => number;
43
+ resetResultsCount: () => void;
44
+ } & {
45
+ resultFunc: (resultFuncArgs_0: DependencyStore, resultFuncArgs_1: GBaseStep, resultFuncArgs_2: Form) => {
46
+ invalids: string[];
47
+ emptyDep: boolean;
48
+ };
49
+ memoizedResultFunc: ((resultFuncArgs_0: DependencyStore, resultFuncArgs_1: GBaseStep, resultFuncArgs_2: Form) => {
50
+ invalids: string[];
51
+ emptyDep: boolean;
52
+ }) & {
53
+ clearCache: () => void;
54
+ resultsCount: () => number;
55
+ resetResultsCount: () => void;
56
+ };
57
+ lastResult: () => {
58
+ invalids: string[];
59
+ emptyDep: boolean;
60
+ };
61
+ dependencies: [(state: RootState) => DependencyStore, (_state: RootState, step: GBaseStep) => GBaseStep, (_state: RootState, _step: GBaseStep, form: Form) => Form];
62
+ recomputations: () => number;
63
+ resetRecomputations: () => void;
64
+ dependencyRecomputations: () => number;
65
+ resetDependencyRecomputations: () => void;
66
+ } & {
67
+ memoize: typeof import("reselect").weakMapMemoize;
68
+ argsMemoize: typeof import("reselect").weakMapMemoize;
69
+ };
70
+ export interface UseFormStepOptions<ValueType> {
71
+ defaultValue: ValueType;
72
+ /** If true, will not trigger onChange until the user has finished typing */
73
+ debounce?: boolean;
74
+ rules?: UseControllerProps['rules'];
75
+ /** If the step should trigger a filler(root StepFiller) size change */
76
+ sizeChange?: boolean;
77
+ }
78
+ export interface FormStepFunctions<ValueType = unknown> {
79
+ value: ValueType;
80
+ ref: RefCallBack;
81
+ onChange: (value: ValueType) => void;
82
+ error: FieldError | undefined;
83
+ field: Omit<ReturnType<typeof useController>['field'], 'ref' | 'value' | 'onChange'>;
84
+ }
85
+ export declare const useFormStep: <ValueType = unknown>(step: GBaseStep, { rules, debounce, sizeChange, defaultValue }: UseFormStepOptions<ValueType>) => FormStepFunctions<ValueType>;
86
+ export declare const selectDependencies: ((state: RootState, idDeps: string[] | undefined) => DependencyStore) & {
87
+ clearCache: () => void;
88
+ resultsCount: () => number;
89
+ resetResultsCount: () => void;
90
+ } & {
91
+ resultFunc: (resultFuncArgs_0: DependencyStore, resultFuncArgs_1: string[]) => DependencyStore;
92
+ memoizedResultFunc: ((resultFuncArgs_0: DependencyStore, resultFuncArgs_1: string[]) => DependencyStore) & {
93
+ clearCache: () => void;
94
+ resultsCount: () => number;
95
+ resetResultsCount: () => void;
96
+ };
97
+ lastResult: () => DependencyStore;
98
+ dependencies: [(state: RootState) => DependencyStore, (_state: RootState, idDeps: string[] | undefined) => string[]];
99
+ recomputations: () => number;
100
+ resetRecomputations: () => void;
101
+ dependencyRecomputations: () => number;
102
+ resetDependencyRecomputations: () => void;
103
+ } & {
104
+ memoize: typeof import("reselect").weakMapMemoize;
105
+ argsMemoize: typeof import("reselect").weakMapMemoize;
106
+ };
107
+ export declare const useCondition: (condition?: Condition) => boolean;
108
+ export declare const calcStepDeps: (step: FormStep | CBRFormStep) => string[];
109
+ export declare const recursivelyCalcConditionSteps: (condition: Condition | undefined) => string[];
@@ -0,0 +1,9 @@
1
+ import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
2
+ import './DraftEditor.css';
3
+ import { TextAreaStepProps } from '../TextAreaStep';
4
+ export interface Payload {
5
+ text: string;
6
+ draft: any;
7
+ }
8
+ declare function TextAreaStep({ step, editable }: TextAreaStepProps): JSX.Element;
9
+ export default TextAreaStep;
@@ -0,0 +1,7 @@
1
+ import { TextAreaStepProps } from '../TextAreaStep';
2
+ export interface Payload {
3
+ text: string;
4
+ draft: any;
5
+ }
6
+ declare function TextAreaStep({ step, editable, maxLength }: TextAreaStepProps): JSX.Element;
7
+ export default TextAreaStep;
@@ -0,0 +1,9 @@
1
+ import { TextArea } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface TextAreaStepProps extends StepProps {
4
+ /** The TextAreaStep to display */
5
+ step: TextArea;
6
+ maxLength?: number;
7
+ }
8
+ declare function TextAreaStep(props: TextAreaStepProps): JSX.Element;
9
+ export default TextAreaStep;
@@ -0,0 +1,3 @@
1
+ import { TextInputStepProps } from '../TextInputStep';
2
+ declare function TextInputStep({ step, editable, maxLength, IconComponent, defaultValue, validation, }: TextInputStepProps): JSX.Element;
3
+ export default TextInputStep;
@@ -0,0 +1,16 @@
1
+ import { TextInput } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface TextInputStepProps extends StepProps {
4
+ /** The TextInputStep to display */
5
+ step: TextInput;
6
+ /** The icon to display */
7
+ IconComponent?: React.ElementType;
8
+ /** Default value to display */
9
+ defaultValue?: string;
10
+ /** Custom Validation to display */
11
+ validation?: TextInput['validation'];
12
+ /** Custom step Max char length */
13
+ maxLength?: number;
14
+ }
15
+ declare function TextInputStep(props: TextInputStepProps): JSX.Element;
16
+ export default TextInputStep;
@@ -0,0 +1,3 @@
1
+ import { TimePickerStepProps } from '../TimePickerStep';
2
+ declare function TimePickerStep({ step, editable, defaultValue }: TimePickerStepProps): JSX.Element;
3
+ export default TimePickerStep;
@@ -0,0 +1,11 @@
1
+ import { TimePicker } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ import { Time } from '../../@Types/Time';
4
+ export interface TimePickerStepProps extends StepProps {
5
+ /** The TimePickerStep to display */
6
+ step: TimePicker;
7
+ /** Default value to display */
8
+ defaultValue?: Time;
9
+ }
10
+ declare function TimePickerStep(props: TimePickerStepProps): JSX.Element;
11
+ export default TimePickerStep;
@@ -0,0 +1,3 @@
1
+ import { TitleStepProps } from '../TitleStep';
2
+ declare function TitleStep({ step }: TitleStepProps): JSX.Element;
3
+ export default TitleStep;
@@ -0,0 +1,8 @@
1
+ import { Title } from '../../@Types/FormStep';
2
+ import { StepProps } from '../Step';
3
+ export interface TitleStepProps extends StepProps {
4
+ /** The TitleStep to display */
5
+ step: Title;
6
+ }
7
+ declare function TitleStep(props: TitleStepProps): JSX.Element;
8
+ export default TitleStep;
@@ -0,0 +1,9 @@
1
+ import { FillerSteps } from '../../StepFunctions';
2
+ import React from 'react';
3
+ export declare const SizeChangeContext: React.Context<(() => void) | undefined>;
4
+ export interface StepFillerContainerProps {
5
+ step: FillerSteps;
6
+ children: React.ReactNode;
7
+ }
8
+ declare function StepFillerContainer({ step, children }: StepFillerContainerProps): JSX.Element;
9
+ export default StepFillerContainer;
@@ -0,0 +1,11 @@
1
+ import { GSmartSelect } from '../../../@Types/GenericFormSteps';
2
+ import { CheckBox, DatePicker, ClassifierSelector, FormSelector, TimePicker } from '../../../@Types/FormStep';
3
+ interface MaterialInputProps {
4
+ step: GSmartSelect | CheckBox | ClassifierSelector | DatePicker | TimePicker | FormSelector;
5
+ editable: boolean;
6
+ onClick?: () => void;
7
+ children: React.ReactNode;
8
+ maxHeight?: boolean;
9
+ }
10
+ declare function MaterialInputContainer({ step, editable, children, onClick, maxHeight, }: MaterialInputProps): JSX.Element;
11
+ export default MaterialInputContainer;
@@ -0,0 +1,6 @@
1
+ export interface IconProps {
2
+ fill?: string;
3
+ contrast?: string;
4
+ style?: React.CSSProperties;
5
+ className?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function ArrowLeftIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default ArrowLeftIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function ArrowRightIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default ArrowRightIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function CalendarIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default CalendarIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function CheckCircleIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default CheckCircleIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function CheckboxCheckedIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default CheckboxCheckedIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function CheckboxUncheckedIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default CheckboxUncheckedIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function ClockIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default ClockIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function CloseIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default CloseIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function LeakIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default LeakIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function ProjectIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default ProjectIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function PropertyIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default PropertyIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function SpaceIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default SpaceIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function DeleteIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default DeleteIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function DocumentIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default DocumentIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function CheckListIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default CheckListIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function GenericEntityIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default GenericEntityIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function HandShakeIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default HandShakeIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function SupplierIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default SupplierIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function ErrorIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default ErrorIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function ExpandLessIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default ExpandLessIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function ExpandMoreIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default ExpandMoreIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function FileIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default FileIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function InfoIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default InfoIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function LocationIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default LocationIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function PersonIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default PersonIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function DislikeIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default DislikeIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function DissatisfiedIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default DissatisfiedIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function LikeIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default LikeIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function SatisfiedIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default SatisfiedIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function StarIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default StarIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function VeryDissatisfiedIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default VeryDissatisfiedIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from '../@IconTypes';
2
+ declare function VerySatisfiedIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default VerySatisfiedIcon;
@@ -0,0 +1,3 @@
1
+ import { IconProps } from './@IconTypes';
2
+ declare function WarningIcon({ className, ...props }: IconProps): JSX.Element;
3
+ export default WarningIcon;