@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,8 @@
1
+ import { Form } from '../@Types';
2
+ export interface Incident {
3
+ idSpaceStep: string;
4
+ idElementStep: string;
5
+ idCommentStep: string;
6
+ num: number;
7
+ }
8
+ export declare const calcCbrForm: (form: Form, formValues: Record<string, any>) => Form;
@@ -0,0 +1,56 @@
1
+ import { RawDraftContentBlock, RawDraftContentState } from 'draft-js';
2
+ import { EurekaDraft } from '../@Types/Draft/Draft';
3
+ import { DraftEntityData } from '../@Types/Draft/DraftEntityData';
4
+ import { DependencyStore } from '../Form/Form';
5
+ import { FormStep } from '../@Types/FormStep';
6
+ import { Form } from '../@Types';
7
+ interface FormCache {
8
+ form: Form;
9
+ dependencies: DependencyStore;
10
+ ticket?: {
11
+ caseNumber: string;
12
+ };
13
+ entityValue?: {
14
+ _id: string;
15
+ label: string;
16
+ [key: string]: any;
17
+ };
18
+ company?: {
19
+ _id: string;
20
+ label: string;
21
+ [key: string]: any;
22
+ };
23
+ entity?: Record<string, any>;
24
+ }
25
+ export declare function stringToDraft(text: string): RawDraftContentState;
26
+ export declare const getRawText: (draft?: RawDraftContentState, text?: string) => RawDraftContentState;
27
+ export declare function mapDraftEntities(cache: FormCache, draft: EurekaDraft, mapToId?: boolean): RawDraftContentState;
28
+ interface MappedBlock {
29
+ text: string;
30
+ inlineStyleRanges?: RawDraftContentBlock['inlineStyleRanges'];
31
+ }
32
+ export declare const draftEntityMapper: (cache: FormCache, entityData: DraftEntityData, mapToId?: boolean) => MappedBlock;
33
+ type DraftBlock = EurekaDraft['blocks'][0];
34
+ /**
35
+ * The function will generate text for given draftjs editorContent.
36
+ */
37
+ export declare function draftToString(cache: FormCache, draft: EurekaDraft, mapToId?: boolean): string;
38
+ /**
39
+ * Function to check if a block is of type list.
40
+ */
41
+ export declare function isList(blockType: DraftBlock['type']): boolean;
42
+ /**
43
+ * Function will return text for Entity.
44
+ */
45
+ export declare function getEntityText(entityMap: EurekaDraft['entityMap'], entityKey: number, blockText: string): string;
46
+ /**
47
+ * Function to check if the block is an atomic entity block.
48
+ */
49
+ export declare function isAtomicBlock(block: DraftBlock): boolean;
50
+ /**
51
+ * The function returns true if the string passed to it has no content.
52
+ */
53
+ export declare function isEmptyString(str: string): boolean;
54
+ export declare function getDepthPadding(depth: number): string;
55
+ export declare function formStepToString(step: FormStep, value: any, mapToId?: boolean): string | null;
56
+ export {};
@@ -0,0 +1,15 @@
1
+ import { AYFFormStep } from '../@Types/AYFFormStep';
2
+ import { CBRFormStep } from '../@Types/CBRFormStep';
3
+ import { Condition } from '../@Types/Condition';
4
+ import { FormStep } from '../@Types/FormStep';
5
+ import { MapperElement } from '../@Types/MapperElement';
6
+ import { CustomStep } from '../FormSteps/CustomStep';
7
+ export declare function calcRecursiveData<Type>(element: Readonly<MapperElement<Type>>, newSteps: Record<string, FormStep>, customSteps: Record<string, CustomStep>): void;
8
+ export declare const calcRecursiveCondition: (condition: Condition, ids: Record<string, string>) => void;
9
+ /**
10
+ * Utility function to calc the substeps of a step
11
+ * @param step step to calc the substeps
12
+ * @param idModifier optional modifier for the ids of the substeps and all other properties
13
+ * @returns list of the ids of the substeps of the step, if modifier returns modified steps
14
+ */
15
+ export declare const calcSubSteps: (idStep: string, allSteps: Record<string, FormStep | CBRFormStep | AYFFormStep>, idModifier?: (idSubStep: string) => string) => string[];
@@ -0,0 +1,2 @@
1
+ import { Locale } from 'date-fns';
2
+ export declare const getLocale: () => Locale;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import '../Utils/MuiClassnameSetup';
3
+ import { FormStyle } from '../@Types/Form';
4
+ import { Palette, PaletteColor } from '@mui/material/styles/createPalette';
5
+ declare module '@mui/material/styles' {
6
+ interface Palette {
7
+ outline: Palette['primary'];
8
+ helperText: Palette['text'];
9
+ stepBackgroundColor: Palette['background'];
10
+ }
11
+ interface PaletteOptions {
12
+ outline: PaletteOptions['primary'];
13
+ helperText: PaletteOptions['text'];
14
+ stepBackgroundColor: PaletteOptions['background'];
15
+ }
16
+ }
17
+ export type PaletteKey = keyof {
18
+ [Key in keyof Palette as Palette[Key] extends PaletteColor ? Key : never]: true;
19
+ };
20
+ interface MaterialProvidersProps {
21
+ children: React.ReactNode;
22
+ formStyle: FormStyle;
23
+ }
24
+ declare function MaterialProviders({ children, formStyle }: MaterialProvidersProps): JSX.Element;
25
+ export default MaterialProviders;
@@ -0,0 +1 @@
1
+ export declare const SEED = "EF";
@@ -0,0 +1,2 @@
1
+ export declare function isValidPhoneNumber(phone: string): boolean;
2
+ export declare function isEmptyPhoneNumber(phone: string): boolean;
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+ import type { RenderHookOptions, RenderHookResult, RenderOptions } from '@testing-library/react';
3
+ import { AppStore } from './store';
4
+ interface ExtendedRenderOptions extends Omit<RenderOptions, 'queries'> {
5
+ store?: AppStore;
6
+ }
7
+ export declare function renderWithProviders(ui: React.ReactElement, { store, ...renderOptions }?: ExtendedRenderOptions): {
8
+ container: HTMLElement;
9
+ baseElement: HTMLElement;
10
+ debug: (baseElement?: import("react-dom/client").Container | (Document | Element) | Array<import("react-dom/client").Container | (Document | Element)> | undefined, maxLength?: number | undefined, options?: import("pretty-format").OptionsReceived | undefined) => void;
11
+ rerender: (ui: React.ReactNode) => void;
12
+ unmount: () => void;
13
+ asFragment: () => DocumentFragment;
14
+ getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
15
+ getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
16
+ queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
17
+ queryAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
18
+ findByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
19
+ findAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
20
+ getByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
21
+ getAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
22
+ queryByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
23
+ queryAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
24
+ findByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
25
+ findAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
26
+ getByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
27
+ getAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
28
+ queryByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
29
+ queryAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
30
+ findByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
31
+ findAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
32
+ getByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
33
+ getAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
34
+ queryByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
35
+ queryAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
36
+ findByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
37
+ findAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
38
+ getByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
39
+ getAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
40
+ queryByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
41
+ queryAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
42
+ findByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
43
+ findAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
44
+ getByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
45
+ getAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
46
+ queryByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
47
+ queryAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
48
+ findByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
49
+ findAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
50
+ getByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement;
51
+ getAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
52
+ queryByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement | null;
53
+ queryAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
54
+ findByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
55
+ findAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
56
+ getByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
57
+ getAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
58
+ queryByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
59
+ queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
60
+ findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
61
+ findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
62
+ store: import("@reduxjs/toolkit").EnhancedStore<import("./store").EurekaFormsState, import("redux").AnyAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
63
+ dispatch: import("redux-thunk").ThunkDispatch<import("./store").EurekaFormsState, undefined, import("redux").UnknownAction>;
64
+ }>, import("redux").StoreEnhancer]>>;
65
+ };
66
+ interface ExtendedRenderHookOptions<TProps> extends Omit<RenderHookOptions<TProps>, 'wrapper'> {
67
+ store?: AppStore;
68
+ }
69
+ export declare function renderHookWithProviders<TProps, TResult>(callback: (props: TProps) => TResult, { store, ...renderHookOptions }?: ExtendedRenderHookOptions<TProps>): RenderHookResult<TResult, TProps>;
70
+ export {};
@@ -0,0 +1,29 @@
1
+ import { AnyAction } from '@reduxjs/toolkit';
2
+ import { GlobalState } from '../States/GlobalSlice';
3
+ import { SiteState } from '../States/SiteSlice';
4
+ import { WidthStats } from '../Form/Form';
5
+ export interface RootState {
6
+ global: GlobalState;
7
+ site: SiteState;
8
+ widthStats: WidthStats;
9
+ }
10
+ export declare const defaultRootState: RootState;
11
+ export type EurekaFormsState = Record<string, RootState>;
12
+ export declare function EurekaFormsReducer(state: EurekaFormsState | undefined, action: AnyAction): EurekaFormsState;
13
+ export declare const store: import("@reduxjs/toolkit").EnhancedStore<EurekaFormsState, AnyAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
14
+ dispatch: import("redux-thunk").ThunkDispatch<EurekaFormsState, undefined, import("redux").UnknownAction>;
15
+ }>, import("redux").StoreEnhancer]>>;
16
+ export type AppDispatch = typeof store.dispatch;
17
+ export type AppStore = typeof store;
18
+ export declare const getAppState: import("@reduxjs/toolkit").AsyncThunk<RootState, {
19
+ idForm: string;
20
+ }, {
21
+ state?: unknown;
22
+ dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
23
+ extra?: unknown;
24
+ rejectValue?: unknown;
25
+ serializedErrorType?: unknown;
26
+ pendingMeta?: unknown;
27
+ fulfilledMeta?: unknown;
28
+ rejectedMeta?: unknown;
29
+ }>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -0,0 +1,9 @@
1
+ export declare enum AYFFormStepTypes {
2
+ AYF_START_MONTH = "AYF_START_MONTH",
3
+ AYF_END_MONTH = "AYF_END_MONTH",
4
+ AYF_YEAR = "AYF_YEAR",
5
+ AYF_BILL_NUM = "AYF_BILL_NUM",
6
+ AYF_CUT_OFF_DATE = "AYF_CUT_OFF_DATE",
7
+ AYF_ICA_CITY = "AYF_ICA_CITY"
8
+ }
9
+ export default AYFFormStepTypes;
@@ -0,0 +1,21 @@
1
+ declare enum CBRFormStepTypes {
2
+ CBR_MACRO_PROYECTO = "CBR_MACRO_PROYECTO",
3
+ CBR_POSTVENTA = "CBR_POSTVENTA",
4
+ CBR_FIRST_NAME = "CBR_FIRST_NAME",
5
+ CBR_MIDDLE_NAME = "CBR_MIDDLE_NAME",
6
+ CBR_LAST_NAME = "CBR_LAST_NAME",
7
+ CBR_SECOND_LAST_NAME = "CBR_SECOND_LAST_NAME",
8
+ CBR_DOC = "CBR_DOC",
9
+ CBR_CEL = "CBR_CEL",
10
+ CBR_PHONE = "CBR_PHONE",
11
+ CBR_EMAIL = "CBR_EMAIL",
12
+ CBR_PROYECTO = "CBR_PROYECTO",
13
+ CBR_TIPO_DOC = "CBR_TIPO_DOC",
14
+ CBR_TIPO_SOLICITANTE = "CBR_TIPO_SOLICITANTE",
15
+ CBR_INMUEBLE = "CBR_INMUEBLE",
16
+ CBR_TIPO_ESPACIO = "CBR_TIPO_ESPACIO",
17
+ CBR_LOCATIVAS = "CBR_LOCATIVAS",
18
+ CBR_INCIDENCIAS = "CBR_INCIDENCIAS",
19
+ CBR_COMENTARIO = "CBR_COMENTARIO"
20
+ }
21
+ export default CBRFormStepTypes;
@@ -0,0 +1,27 @@
1
+ export declare enum ConditionTypes {
2
+ EXPRESSION = "EXPRESSION",
3
+ FORM_STEP = "FORM_STEP",
4
+ ENTITYVALUE = "ENTITYVALUE"
5
+ }
6
+ export default ConditionTypes;
7
+ export declare enum ExpressionTypes {
8
+ 'OR' = "OR",
9
+ 'AND' = "AND"
10
+ }
11
+ /**
12
+ * Operators available to all conditions
13
+ */
14
+ export declare enum OperatorTypes {
15
+ EQUAL = "EQUAL",
16
+ NOTEQUAL = "NOTEQUAL",
17
+ INCLUDES = "INCLUDES",
18
+ NOTINCLUDES = "NOTINCLUDES",
19
+ LESS = "LESS",
20
+ MORE = "MORE",
21
+ PAST_RELATIVE_LESS = "PAST_RELATIVE_LESS",
22
+ PAST_RELATIVE_MORE = "PAST_RELATIVE_MORE",
23
+ FUTURE_RELATIVE_LESS = "FUTURE_RELATIVE_LESS",
24
+ FUTURE_RELATIVE_MORE = "FUTURE_RELATIVE_MORE",
25
+ EXISTS = "EXISTS",
26
+ NOTEXISTS = "NOTEXISTS"
27
+ }
@@ -0,0 +1,11 @@
1
+ export declare enum DraftEntityDataTypes {
2
+ DATE = "DATE",//Utils
3
+ NESTED = "NESTED",// Toca renderizar un subdraft
4
+ TICKET = "TICKET",
5
+ COMPANY = "COMPANY",
6
+ CONDITION_MET = "CONDITION_MET",//Utils
7
+ FORM_STEP = "FORM_STEP"
8
+ }
9
+ export declare enum DraftEntityDataMappingTypes {
10
+ ENTITYVALUE_MAPPING = "ENTITYVALUE_MAPPING"
11
+ }
@@ -0,0 +1,3 @@
1
+ export declare enum DraftEntityTypes {
2
+ EUREKA = "EUREKA"
3
+ }
@@ -0,0 +1,7 @@
1
+ export declare enum DraftStyleTypes {
2
+ BOLD = "BOLD",
3
+ ITALIC = "ITALIC",
4
+ UNDERLINE = "UNDERLINE",
5
+ STRIKETHROUGH = "STRIKETHROUGH",
6
+ NESTED = "NESTED"
7
+ }
@@ -0,0 +1,10 @@
1
+ export declare enum EntityPropertyTypes {
2
+ NAME = "NAME",
3
+ TEXTAREA = "TEXTAREA",
4
+ DATEPICKER = "DATEPICKER",
5
+ TIMEPICKER = "TIMEPICKER",
6
+ TEXTINPUT = "TEXTINPUT",
7
+ SELECTOR = "SELECTOR",
8
+ CHECKBOX = "CHECKBOX"
9
+ }
10
+ export default EntityPropertyTypes;
@@ -0,0 +1,3 @@
1
+ export declare const getAcceptedExtensions: () => string;
2
+ declare const extensions: string[];
3
+ export default extensions;
@@ -0,0 +1,2 @@
1
+ declare const maxSize = 31457280;
2
+ export default maxSize;
@@ -0,0 +1,64 @@
1
+ export declare enum FormTypes {
2
+ STEPPER = "STEPPER",
3
+ COLUMN = "COLUMN"
4
+ }
5
+ export declare enum FormStyleTypes {
6
+ MATERIAL = "MATERIAL"
7
+ }
8
+ export declare enum FormStepTypes {
9
+ TIMEPICKER = "TIMEPICKER",
10
+ TITLE = "TITLE",
11
+ RATING = "RATING",
12
+ CHECKBOX = "CHECKBOX",
13
+ TEXTAREA = "TEXTAREA",
14
+ DATEPICKER = "DATEPICKER",
15
+ FILEUPLOAD = "FILEUPLOAD",
16
+ TEXTINPUT = "TEXTINPUT",
17
+ SEPARATOR = "SEPARATOR",
18
+ SELECTOR = "SELECTOR",
19
+ CLASSIFIER_SELECTOR = "CLASSIFIER_SELECTOR",
20
+ COLLAPSIBLE = "COLLAPSIBLE",
21
+ MAPPER = "MAPPER",
22
+ ENTITYVALUEPICKER = "ENTITYVALUEPICKER",
23
+ API_SELECTOR = "API_SELECTOR"
24
+ }
25
+ export declare enum OptionTypes {
26
+ DEFAULT = "DEFAULT",
27
+ NESTED = "NESTED",
28
+ ADD_SECTION = "ADD_SECTION"
29
+ }
30
+ export declare enum ClassifierOptionTypes {
31
+ DEFAULT = "CLASSIFIER_DEFAULT",
32
+ HIDE = "CLASSIFIER_HIDE",
33
+ NESTED = "CLASSIFIER_NESTED"
34
+ }
35
+ export declare enum EntityValueOptionTypes {
36
+ DEFAULT = "ENTITY_VALUE_DEFAULT",
37
+ HIDE = "ENTITY_VALUE_HIDE",
38
+ NESTED = "ENTITY_VALUE_NESTED"
39
+ }
40
+ export declare enum ApiSelectorOptionTypes {
41
+ DEFAULT = "API_SELECTOR_DEFAULT",
42
+ HIDE = "API_SELECTOR_HIDE",
43
+ NESTED = "API_SELECTOR_NESTED"
44
+ }
45
+ export declare enum RatingTypes {
46
+ SCALE = "SCALE",
47
+ SATISFACTION = "SATISFACTION",
48
+ LIKE = "LIKE"
49
+ }
50
+ export default FormStepTypes;
51
+ export declare enum MapperStyleTypes {
52
+ PILL = "PILL",
53
+ LIST = "LIST",
54
+ PAGED = "PAGED",
55
+ INLINE = "INLINE"
56
+ }
57
+ export declare enum EntityValueDataTypes {
58
+ STEP = "STEP",
59
+ VALUE = "VALUE"
60
+ }
61
+ export declare enum ApiSelectorParamTypes {
62
+ STEP = "STEP",
63
+ VALUE = "VALUE"
64
+ }
@@ -0,0 +1,15 @@
1
+ export declare enum IconTypes {
2
+ PROJECT = "PROJECT",
3
+ PROPERTY = "PROPERTY",
4
+ SPACE = "SPACE",
5
+ LEAK = "LEAK",
6
+ PERSON = "PERSON",
7
+ DOCUMENT = "DOCUMENT",
8
+ HANDSHAKE = "HANDSHAKE",
9
+ CHECKLIST = "CHECKLIST",
10
+ SUPPLIER = "SUPPLIER",
11
+ GENERIC = "GENERIC",
12
+ LOCATION = "LOCATION",
13
+ CALENDAR = "CALENDAR"
14
+ }
15
+ export default IconTypes;
@@ -0,0 +1,3 @@
1
+ import { MaterialStyle } from '../@Types/Form';
2
+ declare const InternalFormStyle: MaterialStyle;
3
+ export default InternalFormStyle;
@@ -0,0 +1,3 @@
1
+ export declare enum TicketPropertyTypes {
2
+ CASENUMBER = "CASENUMBER"
3
+ }
@@ -0,0 +1,7 @@
1
+ import type { TypedUseSelectorHook } from 'react-redux';
2
+ import { type RootState, type AppDispatch } from './Utils/store';
3
+ import React from 'react';
4
+ export declare const StoreContext: React.Context<any>;
5
+ export declare const useAppDispatch: () => AppDispatch;
6
+ export declare const useAppSelector: TypedUseSelectorHook<RootState>;
7
+ export declare const selectBreakPoint: (state: RootState) => number;
@@ -0,0 +1,7 @@
1
+ import EurekaForm, { AppProps as EurekaFormProps } from './App/App';
2
+ import { StepProps } from './FormSteps/Step';
3
+ import * as StepFunctions from './FormSteps/StepFunctions';
4
+ export type { StepProps, EurekaFormProps };
5
+ export { EurekaForm, StepFunctions };
6
+ export default EurekaForm;
7
+ export { default as ReactFromModule } from 'react';
package/dist/main.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import './Init.ts';
2
+ import './index.css';
package/dist/main.js CHANGED
@@ -15,7 +15,7 @@ if (values) {
15
15
  console.error('Invalid data-values JSON', error);
16
16
  }
17
17
  }
18
- ReactDOM.createRoot(document.getElementById('eureka-root')).render(_jsx("div", { className: styles.eurekaForm, children: _jsx(App, { isWidget: false, apiKey: window.location.pathname.replace('/', ''), valuesData: dataValues, scrollToTop: () => {
18
+ ReactDOM.createRoot(document.getElementById('eureka-root')).render(_jsx("div", { className: styles.eurekaForm, children: _jsx(App, { isWidget: false, idOrganization: urlParams.get('idOrganization') ?? undefined, apiKey: window.location.pathname.replace('/', ''), valuesData: dataValues, scrollToTop: () => {
19
19
  location.href = '#';
20
20
  location.href = '#eureka-root';
21
21
  location.href = '#';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version":"3.0.0-refactor",
4
+ "version":"3.0.1-refactor",
5
5
  "scripts": {
6
6
  "watch": "tsc --noEmit --watch --project tsconfig.app.json",
7
7
  "start": "vite",
@@ -10,7 +10,7 @@
10
10
  "lint": "eslint ./src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
11
11
  "preview": "vite preview",
12
12
  "test": "vitest",
13
- "tsc-build": "tsc --p tsconfig.app.json --noEmit false --outDir ./dist --composite false --allowImportingTsExtensions false",
13
+ "tsc-build": "tsc --p tsconfig.app.json --noEmit false --outDir ./dist --composite false --declaration true --allowImportingTsExtensions false",
14
14
  "storybook": "storybook dev -p 6006",
15
15
  "build-storybook": "storybook build",
16
16
  "cypress": "DISPLAY=:0 cypress open"