@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.
- package/dist/@Types/AvailabilityFormStep.d.ts +48 -0
- package/dist/@Types/AvailabilityFormStep.js +24 -0
- package/dist/@Types/BankAccountFormStep.d.ts +67 -0
- package/dist/@Types/BankAccountFormStep.js +14 -0
- package/dist/@Types/BookingFormStep.d.ts +156 -0
- package/dist/@Types/BookingFormStep.js +44 -0
- package/dist/@Types/CalendarFormStep.d.ts +192 -0
- package/dist/@Types/CalendarFormStep.js +48 -0
- package/dist/@Types/CommunicationChannelFormStep.d.ts +51 -0
- package/dist/@Types/CommunicationChannelFormStep.js +15 -0
- package/dist/@Types/Condition.d.ts +4 -6
- package/dist/@Types/ConsentFormStep.d.ts +36 -0
- package/dist/@Types/ConsentFormStep.js +8 -0
- package/dist/@Types/EntityFormFormStep.d.ts +66 -0
- package/dist/@Types/EntityFormFormStep.js +20 -0
- package/dist/@Types/EventFormStep.d.ts +52 -0
- package/dist/@Types/EventFormStep.js +13 -0
- package/dist/@Types/ExternalReferenceFormStep.d.ts +74 -0
- package/dist/@Types/ExternalReferenceFormStep.js +20 -0
- package/dist/@Types/Form.d.ts +0 -1
- package/dist/@Types/FormStep.d.ts +8 -10
- package/dist/@Types/FormStep.js +2 -1
- package/dist/@Types/LocationFormStep.d.ts +159 -0
- package/dist/@Types/LocationFormStep.js +46 -0
- package/dist/@Types/NumericFormSteps.d.ts +108 -0
- package/dist/@Types/NumericFormSteps.js +20 -0
- package/dist/@Types/PredefinedSelectorFormStep.d.ts +51 -0
- package/dist/@Types/PredefinedSelectorFormStep.js +39 -0
- package/dist/@Types/StepRef.d.ts +135 -0
- package/dist/@Types/StepRef.js +49 -0
- package/dist/App/App.js +1 -1
- package/dist/App/AppFunctions.js +3 -8
- package/dist/App/AppHooks.js +1 -20
- package/dist/Form/Form.js +2 -6
- package/dist/Form/Form.module.css +39 -48
- package/dist/FormSteps/ApiSelectorStep/MaterialApiSelectorStep/MaterialApiSelectorStep.js +4 -8
- package/dist/FormSteps/BookingStep/BookingStep.d.ts +17 -0
- package/dist/FormSteps/BookingStep/BookingStep.js +14 -0
- package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.d.ts +3 -0
- package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.js +362 -0
- package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.module.css +174 -0
- package/dist/FormSteps/CBRStepMapper.js +1 -1
- package/dist/FormSteps/CalendarStep/CalendarStep.d.ts +7 -0
- package/dist/FormSteps/CalendarStep/CalendarStep.js +14 -0
- package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.d.ts +3 -0
- package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.js +269 -0
- package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.module.css +531 -0
- package/dist/FormSteps/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +2 -2
- package/dist/FormSteps/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +4 -52
- package/dist/FormSteps/LocationStep/LocationStep.d.ts +10 -0
- package/dist/FormSteps/LocationStep/LocationStep.js +14 -0
- package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.d.ts +3 -0
- package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.js +47 -0
- package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.module.css +18 -0
- package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.d.ts +3 -0
- package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.js +168 -0
- package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.module.css +94 -0
- package/dist/FormSteps/NumberStep/NumberStep.d.ts +10 -0
- package/dist/FormSteps/NumberStep/NumberStep.js +14 -0
- package/dist/FormSteps/Step.js +16 -0
- package/dist/FormSteps/StepFunctions.js +23 -6
- package/dist/FormSteps/StepFunctions.test.js +57 -3
- package/dist/FormSteps/TitleStep/MaterialTitleStep/MaterialTitleStep.js +1 -2
- package/dist/Icons/@ErkIcon.d.ts +2 -2
- package/dist/Icons/@ErkIcon.js +2 -2
- package/dist/Icons/AddIcon.d.ts +3 -0
- package/dist/Icons/AddIcon.js +7 -0
- package/dist/Icons/EditIcon.d.ts +3 -0
- package/dist/Icons/{EmailIcon.js → EditIcon.js} +3 -3
- package/dist/Icons/RemoveIcon.d.ts +3 -0
- package/dist/Icons/RemoveIcon.js +7 -0
- package/dist/Icons/ViewDayIcon.d.ts +3 -0
- package/dist/Icons/ViewDayIcon.js +7 -0
- package/dist/Icons/ViewWeekIcon.d.ts +3 -0
- package/dist/Icons/ViewWeekIcon.js +7 -0
- package/dist/Services/DraftService.js +1 -4
- package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.d.ts +19 -0
- package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.js +80 -0
- package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.module.css +82 -0
- package/dist/Shared/ErkAddressAutocomplete/googlePlaces.d.ts +29 -0
- package/dist/Shared/ErkAddressAutocomplete/googlePlaces.js +139 -0
- package/dist/Shared/ErkDatePicker/ErkDatePicker.js +1 -3
- package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.d.ts +2 -3
- package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.js +1 -2
- package/dist/Shared/ErkLocationField/ErkLocationField.d.ts +23 -0
- package/dist/Shared/ErkLocationField/ErkLocationField.js +73 -0
- package/dist/Shared/ErkLocationField/ErkLocationField.module.css +29 -0
- package/dist/Shared/ErkLocationField/addressFields.d.ts +12 -0
- package/dist/Shared/ErkLocationField/addressFields.js +34 -0
- package/dist/Shared/ErkLocationField/locationRestrictions.d.ts +6 -0
- package/dist/Shared/ErkLocationField/locationRestrictions.js +51 -0
- package/dist/Shared/ErkLocationInput/ErkLocationInput.d.ts +15 -0
- package/dist/Shared/ErkLocationInput/ErkLocationInput.js +499 -0
- package/dist/Shared/ErkLocationInput/ErkLocationInput.module.css +115 -0
- package/dist/Shared/ErkNumberField/ErkNumberField.d.ts +42 -0
- package/dist/Shared/ErkNumberField/ErkNumberField.js +170 -0
- package/dist/Shared/ErkSelect/ErkSelect.d.ts +2 -2
- package/dist/Shared/InputIcon/InputIcon.js +0 -6
- package/dist/Shared/Navbar/Navbar.d.ts +1 -2
- package/dist/Shared/Navbar/Navbar.js +3 -22
- package/dist/Shared/Navbar/Navbar.module.css +8 -22
- package/dist/Shared/SmartDraftRenderer/SmartDraftRenderer.js +2 -8
- package/dist/States/GlobalSlice.d.ts +1 -4
- package/dist/States/GlobalSlice.js +1 -8
- package/dist/constants/ErkIconTypes.d.ts +1 -3
- package/dist/constants/ErkIconTypes.js +0 -2
- package/dist/constants/FormStepTypes.d.ts +6 -3
- package/dist/constants/FormStepTypes.js +4 -1
- package/dist/hooks.d.ts +0 -3
- package/dist/hooks.js +1 -17
- package/package.json +3 -9
- package/dist/@Types/ErkValue.d.ts +0 -16
- package/dist/@Types/ErkValue.js +0 -1
- package/dist/@Types/User.d.ts +0 -13
- package/dist/@Types/User.js +0 -1
- package/dist/Icons/EmailIcon.d.ts +0 -3
- package/dist/Icons/Entities/SchoolIcon.d.ts +0 -3
- package/dist/Icons/Entities/SchoolIcon.js +0 -7
- package/dist/Icons/GroupIcon.d.ts +0 -3
- package/dist/Icons/GroupIcon.js +0 -7
- package/dist/Icons/LockedIcon.d.ts +0 -3
- package/dist/Icons/LockedIcon.js +0 -7
- package/dist/Login/Login.module.css +0 -135
- package/dist/Login/LoginLayout.module.css +0 -68
- package/dist/Login/LoginPage.d.ts +0 -10
- package/dist/Login/LoginPage.js +0 -101
- package/dist/Login/LoginTextField.d.ts +0 -14
- package/dist/Login/LoginTextField.js +0 -29
- package/dist/Services/ApiSelectorService.d.ts +0 -366
- package/dist/Services/ApiSelectorService.js +0 -173
- package/dist/Services/ApiSelectorService.test.d.ts +0 -1
- package/dist/Services/ApiSelectorService.test.js +0 -87
- package/dist/Services/IntegrationService.d.ts +0 -21
- package/dist/Services/IntegrationService.js +0 -22
- package/dist/Services/UserService.d.ts +0 -10
- package/dist/Services/UserService.js +0 -21
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.d.ts +0 -14
- package/dist/Shared/SmartDraftRenderer/LinkDecorator.js +0 -48
- package/dist/constants/ErkValueTypes.d.ts +0 -6
- 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
|
-
};
|