@arquimedes.co/eureka-forms 3.0.48-test → 3.0.49-new-steps

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 (140) hide show
  1. package/dist/@Types/AvailabilityFormStep.d.ts +48 -0
  2. package/dist/@Types/AvailabilityFormStep.js +24 -0
  3. package/dist/@Types/BankAccountFormStep.d.ts +67 -0
  4. package/dist/@Types/BankAccountFormStep.js +14 -0
  5. package/dist/@Types/BookingFormStep.d.ts +156 -0
  6. package/dist/@Types/BookingFormStep.js +44 -0
  7. package/dist/@Types/CalendarFormStep.d.ts +192 -0
  8. package/dist/@Types/CalendarFormStep.js +48 -0
  9. package/dist/@Types/CommunicationChannelFormStep.d.ts +51 -0
  10. package/dist/@Types/CommunicationChannelFormStep.js +15 -0
  11. package/dist/@Types/Condition.d.ts +4 -6
  12. package/dist/@Types/ConsentFormStep.d.ts +36 -0
  13. package/dist/@Types/ConsentFormStep.js +8 -0
  14. package/dist/@Types/EntityFormFormStep.d.ts +66 -0
  15. package/dist/@Types/EntityFormFormStep.js +20 -0
  16. package/dist/@Types/EventFormStep.d.ts +52 -0
  17. package/dist/@Types/EventFormStep.js +13 -0
  18. package/dist/@Types/ExternalReferenceFormStep.d.ts +74 -0
  19. package/dist/@Types/ExternalReferenceFormStep.js +20 -0
  20. package/dist/@Types/Form.d.ts +0 -1
  21. package/dist/@Types/FormStep.d.ts +8 -10
  22. package/dist/@Types/FormStep.js +2 -1
  23. package/dist/@Types/LocationFormStep.d.ts +159 -0
  24. package/dist/@Types/LocationFormStep.js +46 -0
  25. package/dist/@Types/NumericFormSteps.d.ts +108 -0
  26. package/dist/@Types/NumericFormSteps.js +20 -0
  27. package/dist/@Types/PredefinedSelectorFormStep.d.ts +51 -0
  28. package/dist/@Types/PredefinedSelectorFormStep.js +39 -0
  29. package/dist/@Types/StepRef.d.ts +135 -0
  30. package/dist/@Types/StepRef.js +49 -0
  31. package/dist/App/App.js +1 -1
  32. package/dist/App/AppFunctions.js +3 -8
  33. package/dist/App/AppHooks.js +1 -20
  34. package/dist/Form/Form.js +2 -6
  35. package/dist/Form/Form.module.css +39 -48
  36. package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +4 -8
  37. package/dist/FormSteps/BookingStep/BookingStep.d.ts +17 -0
  38. package/dist/FormSteps/BookingStep/BookingStep.js +14 -0
  39. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.d.ts +3 -0
  40. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.js +362 -0
  41. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.module.css +174 -0
  42. package/dist/FormSteps/CBRStepMapper.js +1 -1
  43. package/dist/FormSteps/CalendarStep/CalendarStep.d.ts +7 -0
  44. package/dist/FormSteps/CalendarStep/CalendarStep.js +14 -0
  45. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.d.ts +3 -0
  46. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.js +269 -0
  47. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.module.css +531 -0
  48. package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +2 -2
  49. package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +4 -52
  50. package/dist/FormSteps/LocationStep/LocationStep.d.ts +10 -0
  51. package/dist/FormSteps/LocationStep/LocationStep.js +14 -0
  52. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.d.ts +3 -0
  53. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.js +47 -0
  54. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.module.css +18 -0
  55. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.d.ts +3 -0
  56. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.js +168 -0
  57. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.module.css +94 -0
  58. package/dist/FormSteps/NumberStep/NumberStep.d.ts +10 -0
  59. package/dist/FormSteps/NumberStep/NumberStep.js +14 -0
  60. package/dist/FormSteps/Step.js +16 -0
  61. package/dist/FormSteps/StepFunctions.js +23 -6
  62. package/dist/FormSteps/StepFunctions.test.js +57 -3
  63. package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +1 -2
  64. package/dist/Icons/@ErkIcon.d.ts +2 -2
  65. package/dist/Icons/@ErkIcon.js +2 -2
  66. package/dist/Icons/AddIcon.d.ts +3 -0
  67. package/dist/Icons/AddIcon.js +7 -0
  68. package/dist/Icons/EditIcon.d.ts +3 -0
  69. package/dist/Icons/{EmailIcon.js → EditIcon.js} +3 -3
  70. package/dist/Icons/RemoveIcon.d.ts +3 -0
  71. package/dist/Icons/RemoveIcon.js +7 -0
  72. package/dist/Icons/ViewDayIcon.d.ts +3 -0
  73. package/dist/Icons/ViewDayIcon.js +7 -0
  74. package/dist/Icons/ViewWeekIcon.d.ts +3 -0
  75. package/dist/Icons/ViewWeekIcon.js +7 -0
  76. package/dist/Services/DraftService.js +1 -4
  77. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.d.ts +19 -0
  78. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.js +80 -0
  79. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.module.css +82 -0
  80. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.d.ts +29 -0
  81. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.js +139 -0
  82. package/dist/Shared/ErkDatePicker/ErkDatePicker.js +1 -3
  83. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.d.ts +2 -3
  84. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.js +1 -2
  85. package/dist/Shared/ErkLocationField/ErkLocationField.d.ts +23 -0
  86. package/dist/Shared/ErkLocationField/ErkLocationField.js +73 -0
  87. package/dist/Shared/ErkLocationField/ErkLocationField.module.css +29 -0
  88. package/dist/Shared/ErkLocationField/addressFields.d.ts +12 -0
  89. package/dist/Shared/ErkLocationField/addressFields.js +34 -0
  90. package/dist/Shared/ErkLocationField/locationRestrictions.d.ts +6 -0
  91. package/dist/Shared/ErkLocationField/locationRestrictions.js +51 -0
  92. package/dist/Shared/ErkLocationInput/ErkLocationInput.d.ts +15 -0
  93. package/dist/Shared/ErkLocationInput/ErkLocationInput.js +499 -0
  94. package/dist/Shared/ErkLocationInput/ErkLocationInput.module.css +115 -0
  95. package/dist/Shared/ErkNumberField/ErkNumberField.d.ts +42 -0
  96. package/dist/Shared/ErkNumberField/ErkNumberField.js +170 -0
  97. package/dist/Shared/ErkSelect/ErkSelect.d.ts +2 -2
  98. package/dist/Shared/InputIcon/InputIcon.js +0 -6
  99. package/dist/Shared/Navbar/Navbar.d.ts +1 -2
  100. package/dist/Shared/Navbar/Navbar.js +3 -22
  101. package/dist/Shared/Navbar/Navbar.module.css +8 -22
  102. package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.js +2 -8
  103. package/dist/States/GlobalSlice.d.ts +1 -4
  104. package/dist/States/GlobalSlice.js +1 -8
  105. package/dist/constants/ErkIconTypes.d.ts +1 -3
  106. package/dist/constants/ErkIconTypes.js +0 -2
  107. package/dist/constants/FormStepTypes.d.ts +6 -3
  108. package/dist/constants/FormStepTypes.js +4 -1
  109. package/dist/hooks.d.ts +0 -3
  110. package/dist/hooks.js +1 -17
  111. package/package.json +3 -9
  112. package/dist/@Types/ErkValue.d.ts +0 -16
  113. package/dist/@Types/ErkValue.js +0 -1
  114. package/dist/@Types/User.d.ts +0 -13
  115. package/dist/@Types/User.js +0 -1
  116. package/dist/Icons/EmailIcon.d.ts +0 -3
  117. package/dist/Icons/Entities/SchoolIcon.d.ts +0 -3
  118. package/dist/Icons/Entities/SchoolIcon.js +0 -7
  119. package/dist/Icons/GroupIcon.d.ts +0 -3
  120. package/dist/Icons/GroupIcon.js +0 -7
  121. package/dist/Icons/LockedIcon.d.ts +0 -3
  122. package/dist/Icons/LockedIcon.js +0 -7
  123. package/dist/Login/Login.module.css +0 -135
  124. package/dist/Login/LoginLayout.module.css +0 -68
  125. package/dist/Login/LoginPage.d.ts +0 -10
  126. package/dist/Login/LoginPage.js +0 -101
  127. package/dist/Login/LoginTextField.d.ts +0 -14
  128. package/dist/Login/LoginTextField.js +0 -29
  129. package/dist/Services/ApiSelectorService.d.ts +0 -366
  130. package/dist/Services/ApiSelectorService.js +0 -173
  131. package/dist/Services/ApiSelectorService.test.d.ts +0 -1
  132. package/dist/Services/ApiSelectorService.test.js +0 -87
  133. package/dist/Services/IntegrationService.d.ts +0 -21
  134. package/dist/Services/IntegrationService.js +0 -22
  135. package/dist/Services/UserService.d.ts +0 -10
  136. package/dist/Services/UserService.js +0 -21
  137. package/dist/Shared/SmartDraftRenderer/LinkDecorator.d.ts +0 -14
  138. package/dist/Shared/SmartDraftRenderer/LinkDecorator.js +0 -48
  139. package/dist/constants/ErkValueTypes.d.ts +0 -6
  140. package/dist/constants/ErkValueTypes.js +0 -7
@@ -1,10 +0,0 @@
1
- /**
2
- * Function that handles the app's login
3
- * @param credentials {email, password} of the user
4
- * @returns an array with the users Token and RefreshToken
5
- */
6
- export declare const login: (apiKey: string, credentials: Record<string, string>) => Promise<string>;
7
- /**
8
- * Function that indicates to the server to delete the refresh token
9
- */
10
- export declare const logout: (apiKey: string) => Promise<void>;
@@ -1,21 +0,0 @@
1
- import axiosInstance from '../Utils/AxiosAPI';
2
- /**
3
- * Function that handles the app's login
4
- * @param credentials {email, password} of the user
5
- * @returns an array with the users Token and RefreshToken
6
- */
7
- export const login = async (apiKey, credentials) => {
8
- const response = await axiosInstance.post(`forms/${apiKey}/auth`, credentials);
9
- return response?.data;
10
- };
11
- /**
12
- * Function that indicates to the server to delete the refresh token
13
- */
14
- export const logout = async (apiKey) => {
15
- await axiosInstance.delete(`forms/${apiKey}/auth`, {
16
- headers: {
17
- Authorization: 'Bearer ' + localStorage.getItem('refreshToken'),
18
- },
19
- timeout: 5000,
20
- });
21
- };
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import { ContentBlock, ContentState } from 'draft-js';
3
- export interface LinkComponentProps {
4
- children: React.ReactNode;
5
- contentState: ContentState;
6
- entityKey?: string;
7
- decoratedText: string;
8
- }
9
- export declare function LinkComponent({ children, decoratedText }: LinkComponentProps): JSX.Element;
10
- export declare function findLinkEntities(contentBlock: ContentBlock, callback: (start: number, end: number) => void): void;
11
- export declare const linkDecorator: {
12
- strategy: typeof findLinkEntities;
13
- component: typeof LinkComponent;
14
- };
@@ -1,48 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- export function LinkComponent({ children, decoratedText }) {
3
- // Add protocol if missing
4
- const getHref = (url) => {
5
- if (url.startsWith('http://') || url.startsWith('https://')) {
6
- return url;
7
- }
8
- return `https://${url}`;
9
- };
10
- const handleClick = (e) => {
11
- e.preventDefault();
12
- window.open(getHref(decoratedText), '_blank', 'noopener,noreferrer');
13
- };
14
- return (_jsx("a", { href: getHref(decoratedText), onClick: handleClick, style: {
15
- color: '#1976d2',
16
- textDecoration: 'underline',
17
- cursor: 'pointer',
18
- }, target: "_blank", rel: "noopener noreferrer", children: children }));
19
- }
20
- export function findLinkEntities(contentBlock, callback) {
21
- try {
22
- const text = contentBlock.getText();
23
- // Return early if no text
24
- if (!text)
25
- return;
26
- // Create a new regex instance for each call to avoid state issues
27
- const urlRegex = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/g;
28
- let matchArr;
29
- let start;
30
- while ((matchArr = urlRegex.exec(text)) !== null) {
31
- start = matchArr.index;
32
- callback(start, start + matchArr[0].length);
33
- // Prevent infinite loop if regex doesn't advance
34
- if (matchArr.index === urlRegex.lastIndex) {
35
- urlRegex.lastIndex++;
36
- }
37
- }
38
- }
39
- catch (error) {
40
- // Fail silently to avoid breaking the editor
41
- // eslint-disable-next-line no-console
42
- console.warn('LinkDecorator: Error finding link entities:', error);
43
- }
44
- }
45
- export const linkDecorator = {
46
- strategy: findLinkEntities,
47
- component: LinkComponent,
48
- };
@@ -1,6 +0,0 @@
1
- export declare enum ErkValueTypes {
2
- DRAFT = "DRAFT",
3
- STEP = "STEP",
4
- BOOLEAN = "BOOLEAN"
5
- }
6
- export default ErkValueTypes;
@@ -1,7 +0,0 @@
1
- export var ErkValueTypes;
2
- (function (ErkValueTypes) {
3
- ErkValueTypes["DRAFT"] = "DRAFT";
4
- ErkValueTypes["STEP"] = "STEP";
5
- ErkValueTypes["BOOLEAN"] = "BOOLEAN";
6
- })(ErkValueTypes || (ErkValueTypes = {}));
7
- export default ErkValueTypes;