@arquimedes.co/eureka-forms 2.0.99 → 3.0.0-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 (339) hide show
  1. package/dist/App/App.js +21 -46
  2. package/dist/App/AppFunctions.js +177 -328
  3. package/dist/App/AppFunctions.test.js +638 -0
  4. package/dist/App/AppHooks.js +127 -223
  5. package/dist/App/AppHooks.test.js +154 -0
  6. package/dist/Contexts/CustomContext.js +1 -1
  7. package/dist/Contexts/FormContext.js +3 -2
  8. package/dist/Contexts/SectionContext.js +1 -1
  9. package/dist/Form/ConfirmationDialog/ConfirmationDialog.js +43 -62
  10. package/dist/Form/Form.js +75 -160
  11. package/dist/Form/FormFunctions.js +64 -114
  12. package/dist/Form/FormFunctions.test.js +454 -0
  13. package/dist/Form/FormHooks.js +14 -21
  14. package/dist/Form/FormTypes/ColumnForm/ColumnForm.js +34 -105
  15. package/dist/Form/FormTypes/StepperForm/StepperForm.js +48 -110
  16. package/dist/Form/Section/MaterialSection/MaterialSection.js +10 -23
  17. package/dist/Form/Section/MaterialSection/MaterialSection.module.css +0 -2
  18. package/dist/Form/Section/Section.js +4 -15
  19. package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.js +30 -65
  20. package/dist/Form/Terms/Term/Term.js +2 -13
  21. package/dist/Form/Terms/Terms.js +11 -27
  22. package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.js +36 -106
  23. package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +2 -13
  24. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +12 -40
  25. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +57 -77
  26. package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.js +46 -111
  27. package/dist/FormSteps/AYFStepMapper.js +63 -127
  28. package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.js +2 -13
  29. package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +63 -165
  30. package/dist/FormSteps/CBRStepMapper.js +61 -152
  31. package/dist/FormSteps/CheckBoxStep/CheckBoxStep.js +2 -13
  32. package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +19 -37
  33. package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.js +2 -13
  34. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +47 -80
  35. package/dist/FormSteps/CollapsibleStep/CollapsibleStep.js +3 -26
  36. package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +33 -61
  37. package/dist/FormSteps/CustomStep.js +17 -31
  38. package/dist/FormSteps/DatePickerStep/DatePickerStep.js +2 -13
  39. package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +7 -20
  40. package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.js +2 -13
  41. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.js +16 -32
  42. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +94 -180
  43. package/dist/FormSteps/FileUploadStep/FileUploadStep.js +2 -13
  44. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +33 -95
  45. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.js +3 -0
  46. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +86 -180
  47. package/dist/FormSteps/MapperStep/MapperStep.js +2 -13
  48. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.js +16 -38
  49. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.js +21 -31
  50. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.js +89 -175
  51. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +20 -47
  52. package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.js +81 -117
  53. package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.js +15 -33
  54. package/dist/FormSteps/PhoneInputStep/PhoneInputStep.js +2 -13
  55. package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.js +17 -31
  56. package/dist/FormSteps/RatingStep/RatingStep.js +2 -13
  57. package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +35 -61
  58. package/dist/FormSteps/SelectorStep/SelectorStep.js +2 -13
  59. package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +2 -3
  60. package/dist/FormSteps/SeparatorStep/SeparatorStep.js +2 -13
  61. package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +77 -142
  62. package/dist/FormSteps/SmartSelectStep/SmartSelectStep.js +2 -13
  63. package/dist/FormSteps/Step.js +29 -58
  64. package/dist/FormSteps/StepFunctions.js +149 -204
  65. package/dist/FormSteps/StepFunctions.test.js +695 -0
  66. package/dist/FormSteps/StepHooks.js +94 -146
  67. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.js +38 -74
  68. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +12 -28
  69. package/dist/FormSteps/TextAreaStep/TextAreaStep.js +3 -14
  70. package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +12 -30
  71. package/dist/FormSteps/TextInputStep/TextInputStep.js +2 -13
  72. package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.js +9 -26
  73. package/dist/FormSteps/TimePickerStep/TimePickerStep.js +2 -13
  74. package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +13 -26
  75. package/dist/FormSteps/TitleStep/TitleStep.js +2 -13
  76. package/dist/FormSteps/Utils/@StepFiller/StepFiller.js +14 -26
  77. package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.js +6 -18
  78. package/dist/Icons/ArrowLeftIcon.js +6 -0
  79. package/dist/Icons/ArrowRightIcon.js +6 -0
  80. package/dist/Icons/CalendarIcon.js +3 -14
  81. package/dist/Icons/CheckCircleIcon.js +6 -0
  82. package/dist/Icons/CheckboxCheckedIcon.js +6 -0
  83. package/dist/Icons/CheckboxUncheckedIcon.js +6 -0
  84. package/dist/Icons/ClockIcon.js +6 -0
  85. package/dist/Icons/CloseIcon.js +6 -0
  86. package/dist/Icons/Construction/LeakIcon.js +3 -14
  87. package/dist/Icons/Construction/ProjectIcon.js +3 -14
  88. package/dist/Icons/Construction/PropertyIcon.js +3 -14
  89. package/dist/Icons/Construction/SpaceIcon.js +3 -14
  90. package/dist/Icons/DeleteIcon.js +6 -0
  91. package/dist/Icons/DocumentIcon.js +3 -14
  92. package/dist/Icons/Entities/CheckListIcon.js +3 -14
  93. package/dist/Icons/Entities/GenericEntityIcon.js +4 -15
  94. package/dist/Icons/Entities/HandshakeIcon.js +4 -15
  95. package/dist/Icons/Entities/SupplierIcon.js +4 -15
  96. package/dist/Icons/ErkIcon.module.css +9 -0
  97. package/dist/Icons/ErrorIcon.js +6 -0
  98. package/dist/Icons/ExpandLessIcon.js +6 -0
  99. package/dist/Icons/ExpandMoreIcon.js +6 -0
  100. package/dist/Icons/FileIcon.js +6 -0
  101. package/dist/Icons/InfoIcon.js +6 -0
  102. package/dist/Icons/LocationIcon.js +3 -14
  103. package/dist/Icons/PersonIcon.js +4 -15
  104. package/dist/Icons/Ratings/DislikeIcon.js +6 -0
  105. package/dist/Icons/Ratings/DissatisfiedIcon.js +6 -0
  106. package/dist/Icons/Ratings/LikeIcon.js +6 -0
  107. package/dist/Icons/Ratings/SatisfiedIcon.js +6 -0
  108. package/dist/Icons/Ratings/StarIcon.js +6 -0
  109. package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +6 -0
  110. package/dist/Icons/Ratings/VerySatisfiedIcon.js +6 -0
  111. package/dist/Icons/WarningIcon.js +6 -0
  112. package/dist/Init.js +2 -0
  113. package/dist/Services/FileService.js +29 -86
  114. package/dist/Services/FormService.js +11 -56
  115. package/dist/Services/OrganizationService.js +11 -62
  116. package/dist/Shared/CustomBtn/CustomBtn.js +25 -88
  117. package/dist/Shared/ErkButton/ErkButton.js +31 -0
  118. package/dist/Shared/{RoundedButton/RoundedButton.stories.js → ErkButton/ErkButton.stories.js} +6 -6
  119. package/dist/Shared/ErkCheckbox/ErkCheckBox.js +30 -0
  120. package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.js +37 -0
  121. package/dist/Shared/ErkDatePicker/ErkDatePicker.js +210 -0
  122. package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.js +103 -0
  123. package/dist/Shared/ErkPhoneInput/EkrPhoneInput.js +83 -0
  124. package/dist/Shared/ErkSelect/ErkSelect.js +90 -0
  125. package/dist/Shared/ErkSelect/ErkSelect.stories.js +64 -0
  126. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.js +56 -0
  127. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.js +167 -0
  128. package/dist/Shared/ErkTextField/ErkTextField.js +111 -0
  129. package/dist/Shared/ErkTextField/ErkTextField.stories.js +105 -0
  130. package/dist/Shared/ErkTimePicker/ErkTimePicker.js +131 -0
  131. package/dist/Shared/InputIcon/InputIcon.js +25 -48
  132. package/dist/Shared/Loader/Loader.js +6 -18
  133. package/dist/Shared/Navbar/Navbar.js +2 -14
  134. package/dist/Shared/Navbar/Navbar.stories.js +2 -2
  135. package/dist/Shared/Rating/Rating.js +4 -27
  136. package/dist/Shared/Rating/Rating.stories.js +13 -19
  137. package/dist/Shared/Rating/Ratings/LikeRating.js +19 -33
  138. package/dist/Shared/Rating/Ratings/SatisfactionRating.js +27 -47
  139. package/dist/Shared/Rating/Ratings/ScaleRating.js +23 -54
  140. package/dist/Shared/Toggle/Toggle.js +11 -34
  141. package/dist/States/GlobalSlice.js +6 -17
  142. package/dist/States/SiteSlice.js +58 -76
  143. package/dist/States/WidthStatsSlice.js +8 -9
  144. package/dist/Utils/AxiosAPI.js +3 -3
  145. package/dist/Utils/AxiosWidget.js +4 -4
  146. package/dist/Utils/CBRFunctions.js +29 -30
  147. package/dist/Utils/DraftFunctions.js +102 -143
  148. package/dist/Utils/FormStepFunctions.js +27 -45
  149. package/dist/Utils/LocaleUtils.js +12 -0
  150. package/dist/Utils/MaterialProviders.js +43 -28
  151. package/dist/Utils/MuiClassnameSetup.js +3 -0
  152. package/dist/Utils/PhoneFunctions.js +5 -5
  153. package/dist/Utils/TestUtils.js +22 -51
  154. package/dist/Utils/store.js +10 -65
  155. package/dist/Widget.js +15 -26
  156. package/dist/constants/Files/FileExtensions.js +3 -3
  157. package/dist/constants/Files/FileMaxSize.js +1 -1
  158. package/dist/constants/InternalFormStyle.js +1 -1
  159. package/dist/hooks.js +14 -16
  160. package/dist/index.css +4 -0
  161. package/dist/main.js +22 -0
  162. package/package.json +108 -124
  163. package/dist/@Types/@Types.d.ts +0 -2
  164. package/dist/@Types/AYFFormStep.d.ts +0 -19
  165. package/dist/@Types/Branding.d.ts +0 -13
  166. package/dist/@Types/CBRFormStep.d.ts +0 -74
  167. package/dist/@Types/Condition.d.ts +0 -143
  168. package/dist/@Types/Draft/Draft.d.ts +0 -12
  169. package/dist/@Types/Draft/DraftEntityData.d.ts +0 -54
  170. package/dist/@Types/Entity.d.ts +0 -36
  171. package/dist/@Types/Form.d.ts +0 -75
  172. package/dist/@Types/FormStep.d.ts +0 -219
  173. package/dist/@Types/GenericFormSteps.d.ts +0 -84
  174. package/dist/@Types/MapperElement.d.ts +0 -8
  175. package/dist/@Types/Organization.d.ts +0 -11
  176. package/dist/@Types/Time.d.ts +0 -6
  177. package/dist/@Types/index.d.ts +0 -1
  178. package/dist/App/App.d.ts +0 -59
  179. package/dist/App/AppFunctions.d.ts +0 -23
  180. package/dist/App/AppHooks.d.ts +0 -10
  181. package/dist/Contexts/CustomContext.d.ts +0 -12
  182. package/dist/Contexts/FormContext.d.ts +0 -6
  183. package/dist/Contexts/SectionContext.d.ts +0 -3
  184. package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +0 -12
  185. package/dist/Form/Form.d.ts +0 -40
  186. package/dist/Form/FormFunctions.d.ts +0 -12
  187. package/dist/Form/FormHooks.d.ts +0 -3
  188. package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +0 -4
  189. package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +0 -4
  190. package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +0 -4
  191. package/dist/Form/Section/Section.d.ts +0 -6
  192. package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +0 -4
  193. package/dist/Form/Terms/Term/Term.d.ts +0 -8
  194. package/dist/Form/Terms/Terms.d.ts +0 -3
  195. package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +0 -8
  196. package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +0 -9
  197. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -8
  198. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -11
  199. package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +0 -8
  200. package/dist/FormSteps/AYFStepMapper.d.ts +0 -12
  201. package/dist/FormSteps/ApiSelectorStep/ApiSelectorStep.d.ts +0 -15
  202. package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.d.ts +0 -4
  203. package/dist/FormSteps/CBRStepMapper.d.ts +0 -13
  204. package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +0 -9
  205. package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -4
  206. package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +0 -9
  207. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +0 -4
  208. package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +0 -9
  209. package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -4
  210. package/dist/FormSteps/CustomStep.d.ts +0 -27
  211. package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +0 -11
  212. package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +0 -4
  213. package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +0 -15
  214. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +0 -12
  215. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +0 -4
  216. package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +0 -9
  217. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +0 -14
  218. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -18
  219. package/dist/FormSteps/MapperStep/MapperStep.d.ts +0 -18
  220. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +0 -5
  221. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +0 -15
  222. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +0 -5
  223. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +0 -5
  224. package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -21
  225. package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +0 -4
  226. package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +0 -11
  227. package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -4
  228. package/dist/FormSteps/RatingStep/RatingStep.d.ts +0 -9
  229. package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -4
  230. package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +0 -9
  231. package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -4
  232. package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +0 -9
  233. package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +0 -5
  234. package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +0 -35
  235. package/dist/FormSteps/Step.d.ts +0 -8
  236. package/dist/FormSteps/StepFunctions.d.ts +0 -29
  237. package/dist/FormSteps/StepHooks.d.ts +0 -55
  238. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +0 -10
  239. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +0 -8
  240. package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +0 -10
  241. package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +0 -4
  242. package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +0 -17
  243. package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +0 -4
  244. package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +0 -12
  245. package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -4
  246. package/dist/FormSteps/TitleStep/TitleStep.d.ts +0 -9
  247. package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +0 -9
  248. package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +0 -12
  249. package/dist/Icons/@IconTypes.d.ts +0 -7
  250. package/dist/Icons/CalendarIcon.d.ts +0 -4
  251. package/dist/Icons/Construction/LeakIcon.d.ts +0 -3
  252. package/dist/Icons/Construction/ProjectIcon.d.ts +0 -3
  253. package/dist/Icons/Construction/PropertyIcon.d.ts +0 -3
  254. package/dist/Icons/Construction/SpaceIcon.d.ts +0 -3
  255. package/dist/Icons/DocumentIcon.d.ts +0 -3
  256. package/dist/Icons/Entities/CheckListIcon.d.ts +0 -3
  257. package/dist/Icons/Entities/GenericEntityIcon.d.ts +0 -3
  258. package/dist/Icons/Entities/HandshakeIcon.d.ts +0 -3
  259. package/dist/Icons/Entities/SupplierIcon.d.ts +0 -3
  260. package/dist/Icons/LocationIcon.d.ts +0 -4
  261. package/dist/Icons/PersonIcon.d.ts +0 -4
  262. package/dist/Services/FileService.d.ts +0 -5
  263. package/dist/Services/FormService.d.ts +0 -5
  264. package/dist/Services/OrganizationService.d.ts +0 -2
  265. package/dist/Shared/CustomBtn/CustomBtn.d.ts +0 -18
  266. package/dist/Shared/InputIcon/InputIcon.d.ts +0 -7
  267. package/dist/Shared/Loader/Loader.d.ts +0 -18
  268. package/dist/Shared/Navbar/Navbar.d.ts +0 -9
  269. package/dist/Shared/Navbar/Navbar.stories.d.ts +0 -13
  270. package/dist/Shared/Rating/Rating.d.ts +0 -15
  271. package/dist/Shared/Rating/Rating.stories.d.ts +0 -15
  272. package/dist/Shared/Rating/Ratings/LikeRating.d.ts +0 -4
  273. package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +0 -4
  274. package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +0 -4
  275. package/dist/Shared/RoundedButton/RoundedButton.d.ts +0 -30
  276. package/dist/Shared/RoundedButton/RoundedButton.js +0 -45
  277. package/dist/Shared/RoundedButton/RoundedButton.stories.d.ts +0 -23
  278. package/dist/Shared/RoundedCheckBox/RoundedCheckBox.d.ts +0 -24
  279. package/dist/Shared/RoundedCheckBox/RoundedCheckBox.js +0 -101
  280. package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.d.ts +0 -21
  281. package/dist/Shared/RoundedCheckBox/RoundedCheckBox.stories.js +0 -50
  282. package/dist/Shared/RoundedDatePicker/RoundedDatePicker.d.ts +0 -49
  283. package/dist/Shared/RoundedDatePicker/RoundedDatePicker.js +0 -351
  284. package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.d.ts +0 -36
  285. package/dist/Shared/RoundedDatePicker/RoundedDatePicker.stories.js +0 -223
  286. package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.d.ts +0 -43
  287. package/dist/Shared/RoundedPhoneInput/RoundedPhoneInput.js +0 -226
  288. package/dist/Shared/RoundedSelect/RoundedSelect.d.ts +0 -68
  289. package/dist/Shared/RoundedSelect/RoundedSelect.js +0 -214
  290. package/dist/Shared/RoundedSelect/RoundedSelect.stories.d.ts +0 -28
  291. package/dist/Shared/RoundedSelect/RoundedSelect.stories.js +0 -91
  292. package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +0 -63
  293. package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.js +0 -236
  294. package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.d.ts +0 -36
  295. package/dist/Shared/RoundedSmartSelect/RoundedSmartSelect.stories.js +0 -318
  296. package/dist/Shared/RoundedTextField/RoundedTextField.d.ts +0 -45
  297. package/dist/Shared/RoundedTextField/RoundedTextField.js +0 -175
  298. package/dist/Shared/RoundedTextField/RoundedTextField.stories.d.ts +0 -37
  299. package/dist/Shared/RoundedTextField/RoundedTextField.stories.js +0 -224
  300. package/dist/Shared/RoundedTimePicker/RoundedTimePicker.d.ts +0 -41
  301. package/dist/Shared/RoundedTimePicker/RoundedTimePicker.js +0 -314
  302. package/dist/Shared/Toggle/Toggle.d.ts +0 -18
  303. package/dist/States/GlobalSlice.d.ts +0 -46
  304. package/dist/States/SiteSlice.d.ts +0 -95
  305. package/dist/States/WidthStatsSlice.d.ts +0 -7
  306. package/dist/Utils/AxiosAPI.d.ts +0 -2
  307. package/dist/Utils/AxiosWidget.d.ts +0 -2
  308. package/dist/Utils/CBRFunctions.d.ts +0 -8
  309. package/dist/Utils/DraftFunctions.d.ts +0 -56
  310. package/dist/Utils/FormStepFunctions.d.ts +0 -15
  311. package/dist/Utils/MaterialProviders.d.ts +0 -6
  312. package/dist/Utils/PhoneFunctions.d.ts +0 -2
  313. package/dist/Utils/TestUtils.d.ts +0 -77
  314. package/dist/Utils/store.d.ts +0 -27
  315. package/dist/Widget.d.ts +0 -1
  316. package/dist/__mocks__/axios.d.ts +0 -2
  317. package/dist/__mocks__/axios.js +0 -2
  318. package/dist/constants/AYFFormStepTypes.d.ts +0 -9
  319. package/dist/constants/CBRFormStepTypes.d.ts +0 -21
  320. package/dist/constants/ConditionTypes.d.ts +0 -27
  321. package/dist/constants/Draft/DraftEntityDataTypes.d.ts +0 -11
  322. package/dist/constants/Draft/DraftEntityTypes.d.ts +0 -3
  323. package/dist/constants/Draft/DraftStyleTypes.d.ts +0 -7
  324. package/dist/constants/EntityPropertyTypes.d.ts +0 -10
  325. package/dist/constants/Files/FileExtensions.d.ts +0 -3
  326. package/dist/constants/Files/FileMaxSize.d.ts +0 -2
  327. package/dist/constants/FormStepTypes.d.ts +0 -64
  328. package/dist/constants/IconTypes.d.ts +0 -15
  329. package/dist/constants/InternalFormStyle.d.ts +0 -3
  330. package/dist/constants/MaterialClassNameSeed.d.ts +0 -1
  331. package/dist/constants/MaterialClassNameSeed.js +0 -1
  332. package/dist/constants/TicketPropertyTypes.d.ts +0 -3
  333. package/dist/hooks.d.ts +0 -7
  334. package/dist/index.d.ts +0 -1
  335. package/dist/index.js +0 -31
  336. package/dist/index.lib.d.ts +0 -7
  337. package/dist/setupTests.d.ts +0 -1
  338. /package/dist/Shared/{RoundedTimePicker/RoundedTimePicker.module.css → ErkTimePicker/ErkTimePicker.module.css} +0 -0
  339. /package/dist/{setupTests.js → __tests__/setup.js} +0 -0
package/package.json CHANGED
@@ -1,127 +1,111 @@
1
1
  {
2
- "name": "@arquimedes.co/eureka-forms",
3
- "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "2.0.99",
5
- "scripts": {
6
- "start": "react-scripts start",
7
- "build": "react-scripts build",
8
- "lint": "eslint 'src/**/*.ts'",
9
- "test": "react-scripts test",
10
- "test-ci": "react-scripts test --reporters=default --reporters=jest-junit --coverage --coverageReporters cobertura html",
11
- "tsc-build": "tsc --noEmit false --outDir ./dist --incremental false",
12
- "watch": "tsc -w --noEmit false --outDir ./dist --preserveWatchOutput",
13
- "storybook": "storybook dev -p 6006",
14
- "build-storybook": "storybook build",
15
- "cypress": "DISPLAY=:0 cypress open"
16
- },
17
- "dependencies": {
18
- "@date-io/date-fns": "^1.3.13",
19
- "@material-ui/core": "^4.11.3",
20
- "@material-ui/icons": "^4.11.2",
21
- "@material-ui/lab": "^4.0.0-alpha.57",
22
- "@material-ui/pickers": "^3.3.10",
23
- "@reduxjs/toolkit": "^1.9.7",
24
- "axios": "^1.6.3",
25
- "date-fns": "^2.23.0",
26
- "draft-js": "^0.11.7",
27
- "i18n-iso-countries": "^7.11.3",
28
- "libphonenumber-js": "^1.11.7",
29
- "logrocket": "^2.2.1",
30
- "nanoid": "^3.3.7",
31
- "react-draft-wysiwyg": "^1.15.0",
32
- "react-google-recaptcha": "^3.1.0",
33
- "react-hook-form": "^7.48.2",
34
- "react-international-phone": "^4.3.0",
35
- "react-redux": "^8.1.3",
36
- "typescript": "^4.9.5"
37
- },
38
- "eslintConfig": {
39
- "extends": [
40
- "react-app",
41
- "react-app/jest"
42
- ]
43
- },
44
- "browserslist": {
45
- "production": [
46
- ">0.2%",
47
- "not dead",
48
- "not op_mini all"
49
- ],
50
- "development": [
51
- "last 1 chrome version",
52
- "last 1 firefox version",
53
- "last 1 safari version"
54
- ]
55
- },
56
- "devDependencies": {
57
- "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
58
- "@babel/preset-env": "^7.23.5",
59
- "@babel/preset-react": "^7.23.3",
60
- "@babel/preset-typescript": "^7.23.3",
61
- "@faker-js/faker": "^8.3.1",
62
- "@storybook/addon-coverage": "^1.0.0",
63
- "@storybook/addon-essentials": "^7.6.4",
64
- "@storybook/addon-interactions": "^7.6.4",
65
- "@storybook/addon-links": "^7.6.4",
66
- "@storybook/addon-onboarding": "^1.0.9",
67
- "@storybook/addon-themes": "^7.6.4",
68
- "@storybook/blocks": "^7.6.4",
69
- "@storybook/react": "^7.6.4",
70
- "@storybook/react-webpack5": "^7.6.4",
71
- "@storybook/test": "^7.6.4",
72
- "@storybook/testing-library": "^0.2.2",
73
- "@testing-library/dom": "^9.3.3",
74
- "@testing-library/jest-dom": "^6.1.5",
75
- "@testing-library/react": "^12.1.5",
76
- "@testing-library/react-hooks": "^8.0.1",
77
- "@testing-library/user-event": "^14.5.1",
78
- "@types/draft-js": "^0.11.16",
79
- "@types/jest": "^29.5.10",
80
- "@types/react": "^17.0.71",
81
- "@types/react-dom": "^17.0.25",
82
- "@types/react-draft-wysiwyg": "^1.13.7",
83
- "@types/react-google-recaptcha": "^2.1.8",
84
- "@typescript-eslint/eslint-plugin": "^6.13.1",
85
- "@typescript-eslint/parser": "^6.13.1",
86
- "chromatic": "^10.0.0",
87
- "cypress": "^13.8.1",
88
- "dotenv-webpack": "^8.0.1",
89
- "eslint": "^8.55.0",
90
- "eslint-config-prettier": "^9.1.0",
91
- "eslint-plugin-css-modules": "^2.12.0",
92
- "eslint-plugin-prettier": "^5.0.1",
93
- "eslint-plugin-storybook": "^0.6.15",
94
- "identity-obj-proxy": "^3.0.0",
95
- "jest": "^29.7.0",
96
- "jest-environment-jsdom": "^29.7.0",
97
- "jest-junit": "^16.0.0",
98
- "jest-mock-axios": "^4.7.3",
99
- "prettier": "^3.1.0",
100
- "react-docgen-typescript": "^2.2.2",
101
- "react-refresh": "^0.11.0",
102
- "react-scripts": "5.0.1",
103
- "storybook": "^7.6.4",
104
- "storybook-mock-date-decorator": "^1.0.1",
105
- "ts-jest": "^29.1.1"
106
- },
107
- "peerDependencies": {
108
- "react": "^17.x.x",
109
- "react-dom": "^17.x.x"
110
- },
111
- "publishConfig": {
112
- "access": "public"
113
- },
114
- "main": "./dist/index.lib.js",
115
- "files": [
116
- "/dist"
2
+ "name": "@arquimedes.co/eureka-forms",
3
+ "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
+ "version":"3.0.0-refactor",
5
+ "scripts": {
6
+ "watch": "tsc --noEmit --watch --project tsconfig.app.json",
7
+ "start": "vite",
8
+ "build": "tsc -b && vite build",
9
+ "format": "prettier --write ./src",
10
+ "lint": "eslint ./src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
11
+ "preview": "vite preview",
12
+ "test": "vitest",
13
+ "tsc-build": "tsc --p tsconfig.app.json --noEmit false --outDir ./dist --composite false --allowImportingTsExtensions false",
14
+ "storybook": "storybook dev -p 6006",
15
+ "build-storybook": "storybook build",
16
+ "cypress": "DISPLAY=:0 cypress open"
17
+ },
18
+ "dependencies": {
19
+ "@emotion/react": "^11.13.3",
20
+ "@emotion/styled": "^11.13.0",
21
+ "@mui/material": "^6.1.3",
22
+ "@mui/x-date-pickers": "^7.19.0",
23
+ "@reduxjs/toolkit": "^2.2.8",
24
+ "axios": "^1.7.7",
25
+ "date-fns": "^4.1.0",
26
+ "draft-js": "^0.11.7",
27
+ "i18n-iso-countries": "^7.12.0",
28
+ "libphonenumber-js": "^1.11.11",
29
+ "logrocket": "^9.0.0",
30
+ "nanoid": "^5.0.7",
31
+ "react-draft-wysiwyg": "^1.15.0",
32
+ "react-google-recaptcha": "^3.1.0",
33
+ "react-hook-form": "^7.53.0",
34
+ "react-international-phone": "^4.3.0",
35
+ "react-redux": "^9.1.2",
36
+ "typescript": "^5.6.2"
37
+ },
38
+ "eslintConfig": {},
39
+ "browserslist": {
40
+ "production": [
41
+ ">0.2%",
42
+ "not dead",
43
+ "not op_mini all"
117
44
  ],
118
- "jest": {
119
- "transformIgnorePatterns": [
120
- "node_modules/(?!axios)"
121
- ],
122
- "moduleNameMapper": {
123
- "\\.(scss|sass|css)$": "identity-obj-proxy"
124
- }
125
- },
126
- "proxy": "https://api.forms.capta.co"
45
+ "development": [
46
+ "last 1 chrome version",
47
+ "last 1 firefox version",
48
+ "last 1 safari version"
49
+ ]
50
+ },
51
+ "devDependencies": {
52
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
53
+ "@babel/preset-env": "^7.25.7",
54
+ "@babel/preset-react": "^7.25.7",
55
+ "@babel/preset-typescript": "^7.25.7",
56
+ "@faker-js/faker": "^9.0.3",
57
+ "@storybook/addon-coverage": "^1.0.4",
58
+ "@storybook/addon-essentials": "^8.3.5",
59
+ "@storybook/addon-interactions": "^8.3.5",
60
+ "@storybook/addon-links": "^8.3.5",
61
+ "@storybook/addon-onboarding": "^8.3.5",
62
+ "@storybook/addon-themes": "^8.3.5",
63
+ "@storybook/blocks": "^8.3.5",
64
+ "@storybook/react": "^8.3.5",
65
+ "@storybook/react-webpack5": "^8.3.5",
66
+ "@storybook/test": "^8.3.5",
67
+ "@storybook/testing-library": "^0.2.2",
68
+ "@testing-library/dom": "^10.4.0",
69
+ "@testing-library/jest-dom": "^6.4.8",
70
+ "@testing-library/react": "^16.0.1",
71
+ "@testing-library/user-event": "^14.5.2",
72
+ "@types/draft-js": "^0.11.18",
73
+ "@types/react": "^18.3.11",
74
+ "@types/react-dom": "^18.3.0",
75
+ "@types/react-draft-wysiwyg": "^1.13.8",
76
+ "@types/react-google-recaptcha": "^2.1.9",
77
+ "@typescript-eslint/eslint-plugin": "^8.8.1",
78
+ "@typescript-eslint/parser": "^8.8.1",
79
+ "@vitejs/plugin-react-swc": "^3.7.1",
80
+ "chromatic": "^11.12.5",
81
+ "cypress": "^13.15.0",
82
+ "dotenv-webpack": "^8.1.0",
83
+ "eslint": "^8.57.1",
84
+ "eslint-config-prettier": "^9.1.0",
85
+ "eslint-plugin-react": "^7.37.1",
86
+ "eslint-plugin-react-hooks": "^4.6.2",
87
+ "eslint-plugin-react-refresh": "^0.4.12",
88
+ "eslint-plugin-storybook": "^0.9.0",
89
+ "identity-obj-proxy": "^3.0.0",
90
+ "jsdom": "^25.0.1",
91
+ "prettier": "3.3.3",
92
+ "react-docgen-typescript": "^2.2.2",
93
+ "react-refresh": "^0.14.2",
94
+ "storybook": "^8.3.5",
95
+ "storybook-mock-date-decorator": "^2.0.6",
96
+ "vite": "^5.4.8",
97
+ "vite-plugin-svgr": "^4.2.0",
98
+ "vitest": "^2.1.2"
99
+ },
100
+ "peerDependencies": {
101
+ "react": "^18.x.x",
102
+ "react-dom": "^18.x.x"
103
+ },
104
+ "publishConfig": {
105
+ "access": "public"
106
+ },
107
+ "main": "./dist/index.lib.js",
108
+ "files": [
109
+ "/dist"
110
+ ]
127
111
  }
@@ -1,2 +0,0 @@
1
- export type { Organization } from './Organization';
2
- export type { Form } from './Form';
@@ -1,19 +0,0 @@
1
- import AYFFormStepTypes from '../constants/AYFFormStepTypes';
2
- import { GDatePicker, GSmartSelect, GTextInput } from './GenericFormSteps';
3
- export type AYFFormStep = AYFListStep | AYFBillNumStep | AYFYearStep | AYFCutOffDateStep | AYFCityStep;
4
- export interface AYFListStep extends Omit<GSmartSelect, 'searchable'> {
5
- type: AYFFormStepTypes.AYF_START_MONTH | AYFFormStepTypes.AYF_END_MONTH;
6
- }
7
- export interface AYFBillNumStep extends GTextInput {
8
- type: AYFFormStepTypes.AYF_BILL_NUM;
9
- }
10
- export interface AYFYearStep extends GTextInput {
11
- type: AYFFormStepTypes.AYF_YEAR;
12
- }
13
- export interface AYFCutOffDateStep extends GDatePicker {
14
- type: AYFFormStepTypes.AYF_CUT_OFF_DATE;
15
- }
16
- export interface AYFCityStep extends GSmartSelect {
17
- type: AYFFormStepTypes.AYF_ICA_CITY;
18
- idNitStep: string;
19
- }
@@ -1,13 +0,0 @@
1
- export interface Branding {
2
- name: string;
3
- images: {
4
- logoUrl: string;
5
- iconUrl: string;
6
- };
7
- colors: {
8
- primaryColor: string;
9
- secondaryColor: string;
10
- contrastColor: string;
11
- navbarColor?: string;
12
- };
13
- }
@@ -1,74 +0,0 @@
1
- import Types from '../constants/CBRFormStepTypes';
2
- import { GSmartSelect, GTextArea, GTextInput, GBaseStep } from './GenericFormSteps';
3
- export type CBRFormStep = CBRFirstNameStep | CBRMiddleNameStep | CBRLastNameStep | CBRSecondLastNameStep | PostVentaStep | CBRProjectStep | CBRDocStep | CBRCelStep | CBRPhoneStep | CBRDocTypeStep | CBREmailStep | CBRRequesterTypeStep | CBRPropertyStep | CBRSpaceTypeStep | CBRElementStep | CBRCommentStep | CBRIncidentsStep;
4
- export interface PostVentaStep extends GBaseStep {
5
- type: Types.CBR_POSTVENTA;
6
- }
7
- export interface CBRProjectStep extends GSmartSelect {
8
- type: Types.CBR_PROYECTO | Types.CBR_MACRO_PROYECTO;
9
- steps: string[];
10
- /** Only has maxSize if level === 0 */
11
- maxSize?: number;
12
- }
13
- export interface CBRDocTypeStep extends Omit<GSmartSelect, 'showIcon'> {
14
- type: Types.CBR_TIPO_DOC;
15
- }
16
- export interface CBRRequesterTypeStep extends GSmartSelect {
17
- type: Types.CBR_TIPO_SOLICITANTE;
18
- }
19
- export interface CBRPropertyStep extends GSmartSelect {
20
- type: Types.CBR_INMUEBLE;
21
- validation?: {
22
- maxDays: number;
23
- message: string;
24
- };
25
- }
26
- export interface CBRSpaceTypeStep extends GSmartSelect {
27
- type: Types.CBR_TIPO_ESPACIO;
28
- }
29
- export interface CBRFirstNameStep extends GTextInput {
30
- type: Types.CBR_FIRST_NAME;
31
- }
32
- export interface CBRMiddleNameStep extends GTextInput {
33
- type: Types.CBR_MIDDLE_NAME;
34
- }
35
- export interface CBRLastNameStep extends GTextInput {
36
- type: Types.CBR_LAST_NAME;
37
- }
38
- export interface CBRSecondLastNameStep extends GTextInput {
39
- type: Types.CBR_SECOND_LAST_NAME;
40
- }
41
- export interface CBRDocStep extends GTextInput {
42
- type: Types.CBR_DOC;
43
- showIcon: boolean;
44
- }
45
- export interface CBRCelStep extends GTextInput {
46
- type: Types.CBR_CEL;
47
- }
48
- export interface CBRPhoneStep extends GTextInput {
49
- type: Types.CBR_PHONE;
50
- }
51
- export interface CBREmailStep extends GTextInput {
52
- type: Types.CBR_EMAIL;
53
- }
54
- export interface CBRElementStep extends GSmartSelect {
55
- type: Types.CBR_LOCATIVAS;
56
- subStep: string | null;
57
- }
58
- export interface CBRCommentStep extends Omit<GTextArea, 'hasTextEditor'> {
59
- type: Types.CBR_COMENTARIO;
60
- }
61
- export interface CBRIncidentsStep extends GBaseStep {
62
- type: Types.CBR_INCIDENCIAS;
63
- label: string;
64
- description: string | null;
65
- addBtnLabel: string;
66
- required: boolean;
67
- unitLabel: string;
68
- spaceStep: Omit<CBRSpaceTypeStep, 'id' | 'type'>;
69
- elementStep: IncidentElementStep;
70
- commentStep: Omit<CBRCommentStep, 'id' | 'type'>;
71
- }
72
- export interface IncidentElementStep extends Omit<CBRElementStep, 'id' | 'subStep' | 'type'> {
73
- subStep?: IncidentElementStep;
74
- }
@@ -1,143 +0,0 @@
1
- import ConditionTypes, { ExpressionTypes, OperatorTypes } from '../constants/ConditionTypes';
2
- import EntityPropertyTypes from '../constants/EntityPropertyTypes';
3
- import FormStepTypes from '../constants/FormStepTypes';
4
- import { Time } from './Time';
5
- export type Condition = ExpressionCondition | FormStepCondition | EntityValueCondition;
6
- export interface ExpressionCondition<Type extends Condition = Condition> {
7
- type: ConditionTypes.EXPRESSION;
8
- conditions: (Type | ExpressionCondition)[];
9
- expression: ExpressionTypes;
10
- }
11
- export type FormStepCondition = ExistanceFormStepCondition | CheckBoxFormStepCondition | TimePickerFormStepCondition | ClassifierSelectorFormStepCondition | DatePickerFormStepCondition | EntityValuePickerFormStepCondition | RatingFormStepCondition | SelectorFormStepCondition | TextAreaFormStepCondition | TextInputFormStepCondition;
12
- interface BaseFormStepCondition {
13
- type: ConditionTypes.FORM_STEP;
14
- operator: OperatorTypes;
15
- stepType: FormStepTypes;
16
- idStep: string;
17
- }
18
- export interface ExistanceFormStepCondition extends BaseFormStepCondition {
19
- operator: OperatorTypes.EXISTS | OperatorTypes.NOTEXISTS;
20
- }
21
- export interface CheckBoxFormStepCondition extends BaseFormStepCondition {
22
- stepType: FormStepTypes.CHECKBOX;
23
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
24
- value: boolean;
25
- }
26
- export interface ClassifierSelectorFormStepCondition extends BaseFormStepCondition {
27
- stepType: FormStepTypes.CLASSIFIER_SELECTOR;
28
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
29
- idRoot: string;
30
- idValue: string;
31
- }
32
- export interface DatePickerFormStepCondition extends BaseFormStepCondition {
33
- stepType: FormStepTypes.DATEPICKER;
34
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL | OperatorTypes.LESS | OperatorTypes.MORE;
35
- value: Date;
36
- }
37
- export interface EntityValuePickerFormStepCondition extends BaseFormStepCondition {
38
- stepType: FormStepTypes.ENTITYVALUEPICKER;
39
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
40
- values: string[];
41
- }
42
- export interface RatingFormStepCondition extends BaseFormStepCondition {
43
- stepType: FormStepTypes.RATING;
44
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL | OperatorTypes.LESS | OperatorTypes.MORE;
45
- value: number;
46
- }
47
- export interface SelectorFormStepCondition extends BaseFormStepCondition {
48
- stepType: FormStepTypes.SELECTOR;
49
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
50
- value: string;
51
- }
52
- export interface TextAreaFormStepCondition extends BaseFormStepCondition {
53
- stepType: FormStepTypes.TEXTAREA;
54
- operator: OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
55
- values: string[];
56
- }
57
- export interface TextInputFormStepCondition extends BaseFormStepCondition {
58
- stepType: FormStepTypes.TEXTINPUT;
59
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL | OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
60
- value: string;
61
- }
62
- export type TimePickerFormStepCondition = BaseTimePickerFormStepCondition | WorkingTimePickerFormStepCondition;
63
- export interface BaseTimePickerFormStepCondition extends BaseFormStepCondition {
64
- stepType: FormStepTypes.TIMEPICKER;
65
- operator: OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
66
- property: Omit<keyof Time, 'working'>;
67
- propertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL | OperatorTypes.MORE | OperatorTypes.LESS;
68
- value: number;
69
- }
70
- export interface WorkingTimePickerFormStepCondition extends BaseFormStepCondition {
71
- stepType: FormStepTypes.TIMEPICKER;
72
- operator: OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
73
- property: 'working';
74
- propertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
75
- value: boolean;
76
- }
77
- export type EntityValueCondition = EntityEqualsCondition | EntityPropertyCondition;
78
- export type EntityPropertyCondition = EntityPropertyExistsCondition | EntitySelectorCondition | EntityTextInputCondition | EntityTextAreaCondition | EntityCheckboxCondition | EntityDateCondition | EntityTimeCondition | EntityRelativeDateCondition;
79
- export interface EntityEqualsCondition {
80
- type: ConditionTypes.ENTITYVALUE;
81
- idEntity: string;
82
- operator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
83
- values: string[];
84
- }
85
- export interface EntityPropertyConditionBase {
86
- type: ConditionTypes.ENTITYVALUE;
87
- idEntity: string;
88
- operator: OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
89
- idProperty: string;
90
- }
91
- export interface EntityPropertyExistsCondition extends EntityPropertyConditionBase {
92
- propertyType: EntityPropertyTypes;
93
- propertyOperator: OperatorTypes.EXISTS | OperatorTypes.NOTEXISTS;
94
- }
95
- export interface EntitySelectorCondition extends EntityPropertyConditionBase {
96
- propertyType: EntityPropertyTypes.SELECTOR;
97
- propertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
98
- propertyValue: string;
99
- }
100
- export interface EntityTextInputCondition extends EntityPropertyConditionBase {
101
- propertyType: EntityPropertyTypes.TEXTINPUT | EntityPropertyTypes.NAME;
102
- propertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
103
- propertyValue: string;
104
- }
105
- export interface EntityTextAreaCondition extends EntityPropertyConditionBase {
106
- propertyType: EntityPropertyTypes.TEXTAREA;
107
- propertyOperator: OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
108
- propertyValues: string[];
109
- }
110
- export interface EntityCheckboxCondition extends EntityPropertyConditionBase {
111
- propertyType: EntityPropertyTypes.CHECKBOX;
112
- propertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
113
- propertyValue: boolean;
114
- }
115
- export interface EntityDateCondition extends EntityPropertyConditionBase {
116
- propertyType: EntityPropertyTypes.DATEPICKER;
117
- propertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL | OperatorTypes.LESS | OperatorTypes.MORE;
118
- propertyValue: Date;
119
- }
120
- export interface EntityRelativeDateCondition extends EntityPropertyConditionBase {
121
- propertyType: EntityPropertyTypes.DATEPICKER;
122
- propertyOperator: OperatorTypes.PAST_RELATIVE_LESS | OperatorTypes.PAST_RELATIVE_MORE | OperatorTypes.FUTURE_RELATIVE_LESS | OperatorTypes.FUTURE_RELATIVE_MORE;
123
- days: number;
124
- hours: number;
125
- minutes: number;
126
- working: boolean;
127
- }
128
- export type EntityTimeCondition = BaseEntityTimeCondition | WorkingEntityTimeCondition;
129
- export interface BaseEntityTimeCondition extends EntityPropertyConditionBase {
130
- propertyType: EntityPropertyTypes.TIMEPICKER;
131
- property: Omit<keyof Time, 'working'>;
132
- propertyOperator: OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
133
- timePropertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL | OperatorTypes.MORE | OperatorTypes.LESS;
134
- value: number;
135
- }
136
- export interface WorkingEntityTimeCondition extends EntityPropertyConditionBase {
137
- propertyType: EntityPropertyTypes.TIMEPICKER;
138
- property: 'working';
139
- propertyOperator: OperatorTypes.INCLUDES | OperatorTypes.NOTINCLUDES;
140
- timePropertyOperator: OperatorTypes.EQUAL | OperatorTypes.NOTEQUAL;
141
- value: boolean;
142
- }
143
- export {};
@@ -1,12 +0,0 @@
1
- import { RawDraftContentState } from 'draft-js';
2
- import { DraftEntityTypes } from '../../constants/Draft/DraftEntityTypes';
3
- import { DraftEntityData } from './DraftEntityData';
4
- export interface EurekaDraft extends Omit<RawDraftContentState, 'entityMap'> {
5
- entityMap: DraftEntityMap;
6
- }
7
- export type DraftEntityMap = Record<string, EurekaDraftEntity>;
8
- export interface EurekaDraftEntity {
9
- type: DraftEntityTypes.EUREKA;
10
- mutability: 'IMMUTABLE';
11
- data: DraftEntityData;
12
- }
@@ -1,54 +0,0 @@
1
- import { RawDraftContentBlock } from 'draft-js';
2
- import { DraftEntityDataTypes, DraftEntityDataMappingTypes } from '../../constants/Draft/DraftEntityDataTypes';
3
- import { DraftEntityMap } from './Draft';
4
- import { Condition } from '../Condition';
5
- import { TicketPropertyTypes } from '../../constants/TicketPropertyTypes';
6
- export type DraftEntityData = CompanyDraftEntityData | ConditionMetDraftEntityData | DateDraftEntityData | TicketDraftEntityData | MappableDraftEntityData | FormStepDraftEntityData;
7
- export interface BaseDraftEntityData {
8
- type: DraftEntityDataTypes | DraftEntityDataMappingTypes;
9
- prefix?: string;
10
- suffix?: string;
11
- fallback?: string;
12
- condition?: Condition;
13
- }
14
- interface CompanyDraftEntityData extends BaseDraftEntityData {
15
- type: DraftEntityDataTypes.COMPANY;
16
- idProperty: string;
17
- }
18
- interface ConditionMetDraftEntityData extends BaseDraftEntityData {
19
- type: DraftEntityDataTypes.CONDITION_MET;
20
- condition: Condition;
21
- ifTrue?: string;
22
- ifFalse?: string;
23
- }
24
- export interface DateDraftEntityData extends BaseDraftEntityData {
25
- type: DraftEntityDataTypes.DATE;
26
- days: number;
27
- hours: number;
28
- minutes: number;
29
- working: boolean;
30
- /** date-fns formats */
31
- format?: string;
32
- }
33
- export interface TicketDraftEntityData extends BaseDraftEntityData {
34
- type: DraftEntityDataTypes.TICKET;
35
- property: TicketPropertyTypes.CASENUMBER;
36
- }
37
- export type MappableDraftEntityData = NestedDraftEntityData | EntityValueMappingDraftEntityData;
38
- export interface BaseMappableDraftEntityData extends BaseDraftEntityData {
39
- block: RawDraftContentBlock;
40
- entityMap: DraftEntityMap;
41
- }
42
- export interface NestedDraftEntityData extends BaseMappableDraftEntityData {
43
- type: DraftEntityDataTypes.NESTED;
44
- }
45
- export interface EntityValueMappingDraftEntityData extends BaseDraftEntityData {
46
- type: DraftEntityDataMappingTypes.ENTITYVALUE_MAPPING;
47
- idEntity: string;
48
- idProperty: string;
49
- }
50
- export interface FormStepDraftEntityData extends BaseDraftEntityData {
51
- type: DraftEntityDataTypes.FORM_STEP;
52
- idStep: string;
53
- }
54
- export {};
@@ -1,36 +0,0 @@
1
- import EntityPropertyTypes from '../constants/EntityPropertyTypes';
2
- import { FormSelector } from './FormStep';
3
- import * as GSteps from './GenericFormSteps';
4
- export interface Entity {
5
- _id: string;
6
- name: string;
7
- steps: Record<string, EntityProperty>;
8
- rootSteps: string[];
9
- }
10
- export type EntityProperty = Name | CheckBox | TextArea | TextInput | EntitySelector | DatePicker | TimePicker;
11
- interface BaseProperty {
12
- required: boolean;
13
- }
14
- export interface Name extends Omit<GSteps.GTitle, 'title'>, BaseProperty {
15
- type: EntityPropertyTypes.NAME;
16
- label: string;
17
- }
18
- export interface CheckBox extends GSteps.GCheckBox, BaseProperty {
19
- type: EntityPropertyTypes.CHECKBOX;
20
- }
21
- export interface TextArea extends GSteps.GTextArea, BaseProperty {
22
- type: EntityPropertyTypes.TEXTAREA;
23
- }
24
- export interface TextInput extends GSteps.GTextInput, BaseProperty {
25
- type: EntityPropertyTypes.TEXTINPUT;
26
- }
27
- export interface DatePicker extends GSteps.GDatePicker, BaseProperty {
28
- type: EntityPropertyTypes.DATEPICKER;
29
- }
30
- export interface TimePicker extends GSteps.GTimePicker, BaseProperty {
31
- type: EntityPropertyTypes.TIMEPICKER;
32
- }
33
- export interface EntitySelector extends Omit<FormSelector, 'type'>, BaseProperty {
34
- type: EntityPropertyTypes.SELECTOR;
35
- }
36
- export {};