@arquimedes.co/eureka-forms 3.0.0-refactor → 3.0.2-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 (230) 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/AppHooks.d.ts +10 -0
  19. package/dist/App/AppHooks.test.d.ts +1 -0
  20. package/dist/Contexts/CustomContext.d.ts +11 -0
  21. package/dist/Contexts/FormContext.d.ts +6 -0
  22. package/dist/Contexts/SectionContext.d.ts +2 -0
  23. package/dist/Form/ConfirmationDialog/ConfirmationDialog.d.ts +11 -0
  24. package/dist/Form/Form.d.ts +39 -0
  25. package/dist/Form/FormFunctions.d.ts +12 -0
  26. package/dist/Form/FormFunctions.test.d.ts +1 -0
  27. package/dist/Form/FormHooks.d.ts +2 -0
  28. package/dist/Form/FormTypes/ColumnForm/ColumnForm.d.ts +3 -0
  29. package/dist/Form/FormTypes/StepperForm/StepperForm.d.ts +3 -0
  30. package/dist/Form/Section/MaterialSection/MaterialSection.d.ts +3 -0
  31. package/dist/Form/Section/Section.d.ts +5 -0
  32. package/dist/Form/Terms/Term/MaterialTerm/MaterialTerm.d.ts +3 -0
  33. package/dist/Form/Terms/Term/Term.d.ts +7 -0
  34. package/dist/Form/Terms/Terms.d.ts +2 -0
  35. package/dist/FormSteps/@Construction/CBRElementStep/CBRElementStep.d.ts +7 -0
  36. package/dist/FormSteps/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +8 -0
  37. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +7 -0
  38. package/dist/FormSteps/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +10 -0
  39. package/dist/FormSteps/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +7 -0
  40. package/dist/FormSteps/AYFStepMapper.d.ts +11 -0
  41. package/dist/FormSteps/AYFStepMapper.js +2 -12
  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/CBRStepMapper.js +1 -7
  46. package/dist/FormSteps/CheckBoxStep/CheckBoxStep.d.ts +8 -0
  47. package/dist/FormSteps/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +3 -0
  48. package/dist/FormSteps/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +8 -0
  49. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +3 -0
  50. package/dist/FormSteps/CollapsibleStep/CollapsibleStep.d.ts +8 -0
  51. package/dist/FormSteps/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +3 -0
  52. package/dist/FormSteps/CustomStep.d.ts +26 -0
  53. package/dist/FormSteps/DatePickerStep/DatePickerStep.d.ts +10 -0
  54. package/dist/FormSteps/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +3 -0
  55. package/dist/FormSteps/EntityValueStep/EntityValuePickerStep.d.ts +14 -0
  56. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValueDialog/MaterialEntityValueDialog.d.ts +11 -0
  57. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +3 -0
  58. package/dist/FormSteps/FileUploadStep/FileUploadStep.d.ts +8 -0
  59. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
  60. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/FileFunctions.d.ts +2 -0
  61. package/dist/FormSteps/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +16 -0
  62. package/dist/FormSteps/MapperStep/MapperStep.d.ts +17 -0
  63. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/ListMapperElement/ListMapperElement.d.ts +4 -0
  64. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/MapperElementComponent.d.ts +15 -0
  65. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PagedMapperElement/PagedMapperElement.d.ts +4 -0
  66. package/dist/FormSteps/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +4 -0
  67. package/dist/FormSteps/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +20 -0
  68. package/dist/FormSteps/PhoneInputStep/MaterialTextInputStep/MaterialPhoneInputStep.d.ts +3 -0
  69. package/dist/FormSteps/PhoneInputStep/PhoneInputStep.d.ts +10 -0
  70. package/dist/FormSteps/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +3 -0
  71. package/dist/FormSteps/RatingStep/RatingStep.d.ts +8 -0
  72. package/dist/FormSteps/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +3 -0
  73. package/dist/FormSteps/SelectorStep/SelectorStep.d.ts +8 -0
  74. package/dist/FormSteps/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +3 -0
  75. package/dist/FormSteps/SeparatorStep/SeparatorStep.d.ts +8 -0
  76. package/dist/FormSteps/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +4 -0
  77. package/dist/FormSteps/SmartSelectStep/SmartSelectStep.d.ts +35 -0
  78. package/dist/FormSteps/Step.d.ts +7 -0
  79. package/dist/FormSteps/StepFunctions.d.ts +27 -0
  80. package/dist/FormSteps/StepFunctions.test.d.ts +1 -0
  81. package/dist/FormSteps/StepHooks.d.ts +109 -0
  82. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaEditorStep.d.ts +9 -0
  83. package/dist/FormSteps/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +7 -0
  84. package/dist/FormSteps/TextAreaStep/TextAreaStep.d.ts +9 -0
  85. package/dist/FormSteps/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +3 -0
  86. package/dist/FormSteps/TextInputStep/TextInputStep.d.ts +16 -0
  87. package/dist/FormSteps/TimePickerStep/MaterialTimePickerStep/MaterialTimePickerStep.d.ts +3 -0
  88. package/dist/FormSteps/TimePickerStep/TimePickerStep.d.ts +11 -0
  89. package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +3 -0
  90. package/dist/FormSteps/TitleStep/TitleStep.d.ts +8 -0
  91. package/dist/FormSteps/Utils/@StepFiller/StepFiller.d.ts +9 -0
  92. package/dist/FormSteps/Utils/MaterialInputContainer/MaterialInputContainer.d.ts +11 -0
  93. package/dist/Icons/@ErkIcon.d.ts +14 -0
  94. package/dist/Icons/@ErkIcon.js +10 -0
  95. package/dist/Icons/ArrowLeftIcon.d.ts +3 -0
  96. package/dist/Icons/ArrowLeftIcon.js +4 -3
  97. package/dist/Icons/ArrowRightIcon.d.ts +3 -0
  98. package/dist/Icons/ArrowRightIcon.js +4 -3
  99. package/dist/Icons/CalendarIcon.d.ts +3 -0
  100. package/dist/Icons/CalendarIcon.js +4 -3
  101. package/dist/Icons/CheckCircleIcon.d.ts +3 -0
  102. package/dist/Icons/CheckCircleIcon.js +4 -3
  103. package/dist/Icons/CheckboxCheckedIcon.d.ts +3 -0
  104. package/dist/Icons/CheckboxCheckedIcon.js +4 -3
  105. package/dist/Icons/CheckboxUncheckedIcon.d.ts +3 -0
  106. package/dist/Icons/CheckboxUncheckedIcon.js +4 -3
  107. package/dist/Icons/ClockIcon.d.ts +3 -0
  108. package/dist/Icons/ClockIcon.js +4 -3
  109. package/dist/Icons/CloseIcon.d.ts +3 -0
  110. package/dist/Icons/CloseIcon.js +4 -3
  111. package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
  112. package/dist/Icons/Construction/LeakIcon.js +4 -3
  113. package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
  114. package/dist/Icons/Construction/ProjectIcon.js +4 -3
  115. package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
  116. package/dist/Icons/Construction/PropertyIcon.js +5 -4
  117. package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
  118. package/dist/Icons/Construction/SpaceIcon.js +4 -3
  119. package/dist/Icons/DeleteIcon.d.ts +3 -0
  120. package/dist/Icons/DeleteIcon.js +4 -3
  121. package/dist/Icons/DocumentIcon.d.ts +3 -0
  122. package/dist/Icons/DocumentIcon.js +4 -3
  123. package/dist/Icons/Entities/CheckListIcon.d.ts +3 -0
  124. package/dist/Icons/Entities/CheckListIcon.js +4 -3
  125. package/dist/Icons/Entities/GenericEntityIcon.d.ts +3 -0
  126. package/dist/Icons/Entities/GenericEntityIcon.js +4 -3
  127. package/dist/Icons/Entities/HandshakeIcon.d.ts +3 -0
  128. package/dist/Icons/Entities/HandshakeIcon.js +4 -3
  129. package/dist/Icons/Entities/SupplierIcon.d.ts +3 -0
  130. package/dist/Icons/Entities/SupplierIcon.js +4 -3
  131. package/dist/Icons/ErrorIcon.d.ts +3 -0
  132. package/dist/Icons/ErrorIcon.js +4 -3
  133. package/dist/Icons/ExpandLessIcon.d.ts +3 -0
  134. package/dist/Icons/ExpandLessIcon.js +4 -3
  135. package/dist/Icons/ExpandMoreIcon.d.ts +3 -0
  136. package/dist/Icons/ExpandMoreIcon.js +4 -3
  137. package/dist/Icons/FileIcon.d.ts +3 -0
  138. package/dist/Icons/FileIcon.js +4 -3
  139. package/dist/Icons/InfoIcon.d.ts +3 -0
  140. package/dist/Icons/InfoIcon.js +4 -3
  141. package/dist/Icons/LocationIcon.d.ts +3 -0
  142. package/dist/Icons/LocationIcon.js +4 -3
  143. package/dist/Icons/PersonIcon.d.ts +3 -0
  144. package/dist/Icons/PersonIcon.js +5 -4
  145. package/dist/Icons/Ratings/DislikeIcon.d.ts +3 -0
  146. package/dist/Icons/Ratings/DislikeIcon.js +4 -3
  147. package/dist/Icons/Ratings/DissatisfiedIcon.d.ts +3 -0
  148. package/dist/Icons/Ratings/DissatisfiedIcon.js +4 -3
  149. package/dist/Icons/Ratings/LikeIcon.d.ts +3 -0
  150. package/dist/Icons/Ratings/LikeIcon.js +4 -3
  151. package/dist/Icons/Ratings/SatisfiedIcon.d.ts +3 -0
  152. package/dist/Icons/Ratings/SatisfiedIcon.js +4 -3
  153. package/dist/Icons/Ratings/StarIcon.d.ts +3 -0
  154. package/dist/Icons/Ratings/StarIcon.js +4 -3
  155. package/dist/Icons/Ratings/VeryDissatisfiedIcon.d.ts +3 -0
  156. package/dist/Icons/Ratings/VeryDissatisfiedIcon.js +4 -3
  157. package/dist/Icons/Ratings/VerySatisfiedIcon.d.ts +3 -0
  158. package/dist/Icons/Ratings/VerySatisfiedIcon.js +4 -3
  159. package/dist/Icons/WarningIcon.d.ts +3 -0
  160. package/dist/Icons/WarningIcon.js +4 -3
  161. package/dist/Init.d.ts +1 -0
  162. package/dist/Services/FileService.d.ts +5 -0
  163. package/dist/Services/FormService.d.ts +5 -0
  164. package/dist/Services/OrganizationService.d.ts +2 -0
  165. package/dist/Shared/CustomBtn/CustomBtn.d.ts +17 -0
  166. package/dist/Shared/ErkButton/ErkButton.d.ts +31 -0
  167. package/dist/Shared/ErkButton/ErkButton.stories.d.ts +23 -0
  168. package/dist/Shared/ErkCheckbox/ErkCheckBox.d.ts +19 -0
  169. package/dist/Shared/ErkCheckbox/ErkCheckBox.stories.d.ts +16 -0
  170. package/dist/Shared/ErkDatePicker/ErkDatePicker.d.ts +16 -0
  171. package/dist/Shared/ErkDatePicker/ErkDatePicker.js +3 -9
  172. package/dist/Shared/ErkDatePicker/ErkDatePicker.stories.d.ts +23 -0
  173. package/dist/Shared/ErkPhoneInput/EkrPhoneInput.d.ts +16 -0
  174. package/dist/Shared/ErkSelect/ErkSelect.d.ts +39 -0
  175. package/dist/Shared/ErkSelect/ErkSelect.stories.d.ts +18 -0
  176. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.d.ts +28 -0
  177. package/dist/Shared/ErkSmartSelect/ErkSmartSelect.stories.d.ts +26 -0
  178. package/dist/Shared/ErkTextField/ErkTextField.d.ts +26 -0
  179. package/dist/Shared/ErkTextField/ErkTextField.js +1 -0
  180. package/dist/Shared/ErkTextField/ErkTextField.stories.d.ts +24 -0
  181. package/dist/Shared/ErkTimePicker/ErkTimePicker.d.ts +31 -0
  182. package/dist/Shared/InputIcon/InputIcon.d.ts +7 -0
  183. package/dist/Shared/InputIcon/InputIcon.js +2 -10
  184. package/dist/Shared/Loader/Loader.d.ts +17 -0
  185. package/dist/Shared/Navbar/Navbar.d.ts +8 -0
  186. package/dist/Shared/Navbar/Navbar.stories.d.ts +13 -0
  187. package/dist/Shared/Rating/Rating.d.ts +13 -0
  188. package/dist/Shared/Rating/Rating.stories.d.ts +15 -0
  189. package/dist/Shared/Rating/Ratings/LikeRating.d.ts +3 -0
  190. package/dist/Shared/Rating/Ratings/SatisfactionRating.d.ts +3 -0
  191. package/dist/Shared/Rating/Ratings/ScaleRating.d.ts +3 -0
  192. package/dist/Shared/Toggle/Toggle.d.ts +8 -0
  193. package/dist/States/GlobalSlice.d.ts +46 -0
  194. package/dist/States/SiteSlice.d.ts +77 -0
  195. package/dist/States/WidthStatsSlice.d.ts +7 -0
  196. package/dist/Utils/AxiosAPI.d.ts +2 -0
  197. package/dist/Utils/AxiosWidget.d.ts +2 -0
  198. package/dist/Utils/CBRFunctions.d.ts +8 -0
  199. package/dist/Utils/DraftFunctions.d.ts +56 -0
  200. package/dist/Utils/FormStepFunctions.d.ts +15 -0
  201. package/dist/Utils/LocaleUtils.d.ts +2 -0
  202. package/dist/Utils/MaterialProviders.d.ts +24 -0
  203. package/dist/Utils/MaterialProviders.js +0 -1
  204. package/dist/Utils/MuiClassnameSetup.d.ts +1 -0
  205. package/dist/Utils/PhoneFunctions.d.ts +2 -0
  206. package/dist/Utils/TestUtils.d.ts +70 -0
  207. package/dist/Utils/store.d.ts +29 -0
  208. package/dist/Widget.d.ts +1 -0
  209. package/dist/Widget.js +1 -0
  210. package/dist/__tests__/setup.d.ts +1 -0
  211. package/dist/constants/AYFFormStepTypes.d.ts +9 -0
  212. package/dist/constants/CBRFormStepTypes.d.ts +21 -0
  213. package/dist/constants/ConditionTypes.d.ts +27 -0
  214. package/dist/constants/Draft/DraftEntityDataTypes.d.ts +11 -0
  215. package/dist/constants/Draft/DraftEntityTypes.d.ts +3 -0
  216. package/dist/constants/Draft/DraftStyleTypes.d.ts +7 -0
  217. package/dist/constants/EntityPropertyTypes.d.ts +10 -0
  218. package/dist/constants/Files/FileExtensions.d.ts +3 -0
  219. package/dist/constants/Files/FileMaxSize.d.ts +2 -0
  220. package/dist/constants/FormStepTypes.d.ts +64 -0
  221. package/dist/constants/IconTypes.d.ts +15 -0
  222. package/dist/constants/InternalFormStyle.d.ts +3 -0
  223. package/dist/constants/TicketPropertyTypes.d.ts +3 -0
  224. package/dist/hooks.d.ts +7 -0
  225. package/dist/index.lib.d.ts +7 -0
  226. package/dist/main.d.ts +3 -0
  227. package/dist/main.js +2 -1
  228. package/package.json +27 -27
  229. package/dist/{Icons/@IconTypes.js → App/AppFunctions.test.d.ts} +0 -0
  230. package/dist/Icons/{ErkIcon.module.css → @ErkIcon.css} +1 -1
@@ -0,0 +1,2 @@
1
+ export type { Organization } from './Organization';
2
+ export type { Form } from './Form';
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,74 @@
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
+ }
@@ -0,0 +1,143 @@
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 {};
@@ -0,0 +1,12 @@
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
+ }
@@ -0,0 +1,54 @@
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 {};
@@ -0,0 +1,36 @@
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 {};
@@ -0,0 +1,75 @@
1
+ import { FormStyleTypes, FormTypes } from '../constants/FormStepTypes';
2
+ import { Branding } from './Branding';
3
+ import { FormStep } from './FormStep';
4
+ import { Entity } from './Entity';
5
+ import { EurekaDraft } from './Draft/Draft';
6
+ export interface Form {
7
+ apiKey?: string;
8
+ name?: string;
9
+ sections: Record<string, Section>;
10
+ steps: Record<string, FormStep>;
11
+ size: FormSize;
12
+ firstSection: string;
13
+ type?: FormTypes;
14
+ hasCaptcha?: boolean;
15
+ isStandAlone?: boolean;
16
+ style?: FormStyle;
17
+ branding?: Branding;
18
+ classifiers?: Record<string, Classifier>;
19
+ entities?: Record<string, Entity>;
20
+ terms?: Term[];
21
+ hiddenSteps?: string[];
22
+ confirmationMessage?: EurekaDraft;
23
+ showLink?: boolean;
24
+ nextSectionLabel?: string;
25
+ prevSectionLabel?: string;
26
+ }
27
+ export interface FormSize {
28
+ blockNum: 1 | 2 | 3 | 4;
29
+ blockSize: number;
30
+ spacingSize: number;
31
+ }
32
+ export interface Term {
33
+ id: string;
34
+ message: string;
35
+ clickEffect?: TermDialog | TermLink;
36
+ }
37
+ interface TermDialog {
38
+ type: 'DIALOG';
39
+ title: string;
40
+ text: string;
41
+ }
42
+ interface TermLink {
43
+ type: 'LINK';
44
+ url: string;
45
+ }
46
+ export interface Classifier {
47
+ _id: string;
48
+ name: string;
49
+ clientName?: string;
50
+ children: string[];
51
+ }
52
+ export type FormStyle = MaterialStyle;
53
+ export type StyleKeys = keyof Omit<FormStyle, 'type'>;
54
+ export interface MaterialStyle {
55
+ type: FormStyleTypes.MATERIAL;
56
+ standAloneBackgroundColor: string;
57
+ backgroundColor: string;
58
+ primaryColor: string;
59
+ secondaryColor: string;
60
+ errorColor: string;
61
+ primaryContrastColor: string;
62
+ secondaryContrastColor: string;
63
+ textColor: string;
64
+ outlineColor: string;
65
+ stepBackgroundColor: string;
66
+ descriptionTextColor: string;
67
+ }
68
+ export interface Section {
69
+ id: string;
70
+ name: string | null;
71
+ title?: string;
72
+ steps: string[];
73
+ nextSection: string | null;
74
+ }
75
+ export {};
@@ -0,0 +1,219 @@
1
+ import FormStepTypes, { ClassifierOptionTypes, OptionTypes, RatingTypes, MapperStyleTypes, EntityValueOptionTypes, EntityValueDataTypes, ApiSelectorOptionTypes, ApiSelectorParamTypes } from '../constants/FormStepTypes';
2
+ import IconTypes from '../constants/IconTypes';
3
+ import { Condition } from './Condition';
4
+ import { EurekaDraft } from './Draft/Draft';
5
+ import * as GSteps from './GenericFormSteps';
6
+ import { Time } from './Time';
7
+ export type FormStep = Title | TimePicker | Rating | CheckBox | TextArea | TextInput | DatePicker | FileUpload | Separator | FormSelector | ClassifierSelector | Collapsible | EntityValuePicker | ApiSelector | Mapper;
8
+ export interface Title extends GSteps.GBaseStep {
9
+ type: FormStepTypes.TITLE;
10
+ title: string;
11
+ description: string | null;
12
+ size?: 1 | 2 | 3 | 4;
13
+ }
14
+ export interface TimePicker extends GSteps.GTimePicker {
15
+ type: FormStepTypes.TIMEPICKER;
16
+ defaultValue?: Time;
17
+ }
18
+ export interface CheckBox extends GSteps.GCheckBox {
19
+ type: FormStepTypes.CHECKBOX;
20
+ steps?: string[];
21
+ uncheckedSteps?: string[];
22
+ maxSize?: number;
23
+ defaultValue?: boolean;
24
+ }
25
+ export interface Rating extends GSteps.GBaseStep {
26
+ type: FormStepTypes.RATING;
27
+ label: string;
28
+ description: string;
29
+ required: boolean;
30
+ ratingType: RatingTypes;
31
+ nestedSteps: string[][] | null;
32
+ }
33
+ export interface FileUpload extends GSteps.GBaseStep {
34
+ type: FormStepTypes.FILEUPLOAD;
35
+ label: string;
36
+ description: string | null;
37
+ required: boolean;
38
+ }
39
+ export interface Separator extends GSteps.GSeparator {
40
+ type: FormStepTypes.SEPARATOR;
41
+ }
42
+ export interface TextArea extends GSteps.GTextArea {
43
+ type: FormStepTypes.TEXTAREA;
44
+ }
45
+ export interface TextInput extends GSteps.GTextInput {
46
+ type: FormStepTypes.TEXTINPUT;
47
+ }
48
+ export interface DatePicker extends GSteps.GDatePicker {
49
+ type: FormStepTypes.DATEPICKER;
50
+ }
51
+ export interface Collapsible extends GSteps.GBaseStep {
52
+ type: FormStepTypes.COLLAPSIBLE;
53
+ label: string;
54
+ steps: string[];
55
+ defaultValue?: boolean;
56
+ }
57
+ export interface FormSelector extends GSteps.GBaseStep {
58
+ type: FormStepTypes.SELECTOR;
59
+ label: string;
60
+ description: string;
61
+ required: boolean;
62
+ searchable: boolean;
63
+ options: FormSelectorOption[];
64
+ size: 1 | 2 | 3 | 4;
65
+ maxSize?: number;
66
+ defaultValue?: string;
67
+ }
68
+ export type FormSelectorOption = DefaultFormSelectorOption | NestedStepOption;
69
+ interface DefaultFormSelectorOption {
70
+ label: string;
71
+ value: string;
72
+ type: OptionTypes.DEFAULT;
73
+ condition?: Condition;
74
+ }
75
+ export interface NestedStepOption {
76
+ label: string;
77
+ value: string;
78
+ type: OptionTypes.NESTED;
79
+ steps: string[];
80
+ condition?: Condition;
81
+ }
82
+ export interface ClassifierSelector extends GSteps.GBaseStep {
83
+ type: FormStepTypes.CLASSIFIER_SELECTOR;
84
+ idClassifier: string | null;
85
+ label: string;
86
+ description: string;
87
+ searchable: boolean;
88
+ options: Record<string, FormClassifierSelectorOption>;
89
+ required: boolean;
90
+ size: 1 | 2 | 3 | 4;
91
+ maxSize?: number;
92
+ }
93
+ export type FormClassifierSelectorOption = DefaultClassifierOption | NestedStepClassifierOption | HideValueOption;
94
+ interface DefaultClassifierOption {
95
+ type: ClassifierOptionTypes.DEFAULT;
96
+ idClassifier: string;
97
+ condition?: Condition;
98
+ }
99
+ interface NestedStepClassifierOption {
100
+ type: ClassifierOptionTypes.NESTED;
101
+ idClassifier: string;
102
+ steps: string[];
103
+ condition?: Condition;
104
+ }
105
+ interface HideValueOption {
106
+ type: ClassifierOptionTypes.HIDE;
107
+ idClassifier: string;
108
+ }
109
+ export interface EntityValuePicker extends GSteps.GSmartSelect {
110
+ type: FormStepTypes.ENTITYVALUEPICKER;
111
+ idEntity: string;
112
+ icon: IconTypes;
113
+ filters: EntityValuePickerFilter[];
114
+ path: EntityValuePickerPath[];
115
+ options: Record<string, FormEntityValuePickerOption>;
116
+ maxSize?: number;
117
+ dialogs?: EntityValuePickerDialog[];
118
+ }
119
+ export type FormEntityValuePickerOption = DefaultEntityValuePickerOption | NestedEntityValuePickerOption | HideFormEntityValuePickerOption;
120
+ export interface EntityValuePickerDialog {
121
+ type: 'WARNING' | 'INFO';
122
+ message: EurekaDraft;
123
+ condition?: Condition;
124
+ }
125
+ interface DefaultEntityValuePickerOption {
126
+ type: EntityValueOptionTypes.DEFAULT;
127
+ condition?: Condition;
128
+ }
129
+ interface NestedEntityValuePickerOption {
130
+ type: EntityValueOptionTypes.NESTED;
131
+ steps: string[];
132
+ condition?: Condition;
133
+ }
134
+ interface HideFormEntityValuePickerOption {
135
+ type: EntityValueOptionTypes.HIDE;
136
+ }
137
+ export type EntityValuePickerPath = StepEntityValuePickerPath | ValueEntityValuePickerPath;
138
+ export interface StepEntityValuePickerPath {
139
+ idEntity: string;
140
+ type: EntityValueDataTypes.STEP;
141
+ idStep: string;
142
+ any: boolean;
143
+ }
144
+ export interface ValueEntityValuePickerPath {
145
+ idEntity: string;
146
+ type: EntityValueDataTypes.VALUE;
147
+ idEntityValue: string | null;
148
+ }
149
+ export type EntityValuePickerFilter = StepEntityValuePickerFilter | ValueEntityValuePickerFilter;
150
+ export interface StepEntityValuePickerFilter {
151
+ idProperty: string;
152
+ type: EntityValueDataTypes.STEP;
153
+ idStep: string;
154
+ any: boolean;
155
+ required: boolean;
156
+ }
157
+ export interface ValueEntityValuePickerFilter {
158
+ idProperty: string;
159
+ type: EntityValueDataTypes.VALUE;
160
+ value: any;
161
+ }
162
+ export interface ApiSelector extends GSteps.GSmartSelect {
163
+ type: FormStepTypes.API_SELECTOR;
164
+ icon?: IconTypes;
165
+ url: string;
166
+ pathParams: ApiSelectorParam[];
167
+ queryParams: ApiSelectorParam[];
168
+ /** Headers? Body, etc?? */
169
+ labelAttribute: string;
170
+ idAttribute: string;
171
+ /** Only has maxSize if level === 0 */
172
+ maxSize?: number;
173
+ options: Record<string, ApiSelectorOption>;
174
+ defaultValue?: any;
175
+ }
176
+ export type ApiSelectorOption = DefaultApiSelectorOption | NestedApiSelectorOption | HideApiSelectorOption;
177
+ interface DefaultApiSelectorOption {
178
+ type: ApiSelectorOptionTypes.DEFAULT;
179
+ condition?: Condition;
180
+ }
181
+ interface NestedApiSelectorOption {
182
+ type: ApiSelectorOptionTypes.NESTED;
183
+ steps: string[];
184
+ condition?: Condition;
185
+ }
186
+ interface HideApiSelectorOption {
187
+ type: ApiSelectorOptionTypes.HIDE;
188
+ idOption: string;
189
+ }
190
+ export type ApiSelectorParam = StepApiSelectorParam | ValueApiSelectorParam;
191
+ export interface StepApiSelectorParam {
192
+ type: ApiSelectorParamTypes.STEP;
193
+ key: string;
194
+ idStep: string;
195
+ required: boolean;
196
+ }
197
+ export interface ValueApiSelectorParam {
198
+ type: ApiSelectorParamTypes.VALUE;
199
+ key: string;
200
+ value: string;
201
+ }
202
+ export interface Mapper extends GSteps.GBaseStep {
203
+ type: FormStepTypes.MAPPER;
204
+ style: {
205
+ type: MapperStyleTypes;
206
+ size?: number;
207
+ };
208
+ label: string;
209
+ description: string | null;
210
+ addBtnLabel: string;
211
+ rootSteps: string[];
212
+ steps: Record<string, FormStep>;
213
+ required: boolean;
214
+ unitLabel: string;
215
+ creatable?: boolean;
216
+ deletable?: boolean;
217
+ max?: number;
218
+ }
219
+ export {};