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

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 (102) hide show
  1. package/dist/@Types/FormStep.d.ts +2 -7
  2. package/dist/@Types/FormStep.js +1 -2
  3. package/dist/FormSteps/Step.js +0 -16
  4. package/dist/FormSteps/StepFunctions.js +0 -14
  5. package/dist/FormSteps/StepFunctions.test.js +0 -54
  6. package/dist/Shared/ErkDatePicker/ErkDatePicker.js +7 -5
  7. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.d.ts +3 -2
  8. package/dist/Shared/ErkDateRangePicker/ErkDateRangePicker.js +5 -4
  9. package/dist/constants/FormStepTypes.d.ts +1 -5
  10. package/dist/constants/FormStepTypes.js +0 -4
  11. package/dist/index.lib.d.ts +2 -4
  12. package/dist/index.lib.js +1 -3
  13. package/package.json +7 -8
  14. package/dist/@Types/AvailabilityFormStep.d.ts +0 -48
  15. package/dist/@Types/AvailabilityFormStep.js +0 -24
  16. package/dist/@Types/BankAccountFormStep.d.ts +0 -67
  17. package/dist/@Types/BankAccountFormStep.js +0 -14
  18. package/dist/@Types/BookingFormStep.d.ts +0 -166
  19. package/dist/@Types/BookingFormStep.js +0 -44
  20. package/dist/@Types/CalendarFormStep.d.ts +0 -192
  21. package/dist/@Types/CalendarFormStep.js +0 -48
  22. package/dist/@Types/CommunicationChannelFormStep.d.ts +0 -51
  23. package/dist/@Types/CommunicationChannelFormStep.js +0 -15
  24. package/dist/@Types/ConsentFormStep.d.ts +0 -36
  25. package/dist/@Types/ConsentFormStep.js +0 -8
  26. package/dist/@Types/EntityFormFormStep.d.ts +0 -66
  27. package/dist/@Types/EntityFormFormStep.js +0 -20
  28. package/dist/@Types/EventFormStep.d.ts +0 -52
  29. package/dist/@Types/EventFormStep.js +0 -13
  30. package/dist/@Types/ExternalReferenceFormStep.d.ts +0 -74
  31. package/dist/@Types/ExternalReferenceFormStep.js +0 -20
  32. package/dist/@Types/LocationFormStep.d.ts +0 -159
  33. package/dist/@Types/LocationFormStep.js +0 -46
  34. package/dist/@Types/NumericFormSteps.d.ts +0 -108
  35. package/dist/@Types/NumericFormSteps.js +0 -20
  36. package/dist/@Types/PredefinedSelectorFormStep.d.ts +0 -51
  37. package/dist/@Types/PredefinedSelectorFormStep.js +0 -39
  38. package/dist/@Types/StepRef.d.ts +0 -135
  39. package/dist/@Types/StepRef.js +0 -49
  40. package/dist/FormSteps/BookingStep/BookingStep.d.ts +0 -17
  41. package/dist/FormSteps/BookingStep/BookingStep.js +0 -14
  42. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.d.ts +0 -7
  43. package/dist/FormSteps/BookingStep/MaterialBookingStep/MaterialBookingStep.js +0 -32
  44. package/dist/FormSteps/CalendarStep/CalendarStep.d.ts +0 -7
  45. package/dist/FormSteps/CalendarStep/CalendarStep.js +0 -14
  46. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.d.ts +0 -7
  47. package/dist/FormSteps/CalendarStep/MaterialCalendarStep/MaterialCalendarStep.js +0 -31
  48. package/dist/FormSteps/LocationStep/LocationStep.d.ts +0 -10
  49. package/dist/FormSteps/LocationStep/LocationStep.js +0 -14
  50. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.d.ts +0 -3
  51. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.js +0 -47
  52. package/dist/FormSteps/LocationStep/MaterialLocationStep/MaterialLocationStep.module.css +0 -18
  53. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.d.ts +0 -3
  54. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.js +0 -168
  55. package/dist/FormSteps/NumberStep/MaterialNumberStep/MaterialNumberStep.module.css +0 -94
  56. package/dist/FormSteps/NumberStep/NumberStep.d.ts +0 -10
  57. package/dist/FormSteps/NumberStep/NumberStep.js +0 -14
  58. package/dist/Icons/AddIcon.d.ts +0 -3
  59. package/dist/Icons/AddIcon.js +0 -7
  60. package/dist/Icons/EditIcon.d.ts +0 -3
  61. package/dist/Icons/EditIcon.js +0 -7
  62. package/dist/Icons/RemoveIcon.d.ts +0 -3
  63. package/dist/Icons/RemoveIcon.js +0 -7
  64. package/dist/Icons/ViewDayIcon.d.ts +0 -3
  65. package/dist/Icons/ViewDayIcon.js +0 -7
  66. package/dist/Icons/ViewWeekIcon.d.ts +0 -3
  67. package/dist/Icons/ViewWeekIcon.js +0 -7
  68. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.d.ts +0 -19
  69. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.js +0 -80
  70. package/dist/Shared/ErkAddressAutocomplete/ErkAddressAutocomplete.module.css +0 -82
  71. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.d.ts +0 -29
  72. package/dist/Shared/ErkAddressAutocomplete/googlePlaces.js +0 -139
  73. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.d.ts +0 -31
  74. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.js +0 -223
  75. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.module.css +0 -608
  76. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.d.ts +0 -28
  77. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.js +0 -117
  78. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.test.d.ts +0 -1
  79. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.stories.test.js +0 -49
  80. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.test.d.ts +0 -1
  81. package/dist/Shared/ErkBookingPicker/ErkBookingPicker.test.js +0 -107
  82. package/dist/Shared/ErkCalendar/CalendarFunctions.d.ts +0 -28
  83. package/dist/Shared/ErkCalendar/CalendarFunctions.js +0 -121
  84. package/dist/Shared/ErkCalendar/CalendarPopovers.d.ts +0 -45
  85. package/dist/Shared/ErkCalendar/CalendarPopovers.js +0 -110
  86. package/dist/Shared/ErkCalendar/ErkCalendar.d.ts +0 -73
  87. package/dist/Shared/ErkCalendar/ErkCalendar.js +0 -293
  88. package/dist/Shared/ErkCalendar/ErkCalendar.module.css +0 -775
  89. package/dist/Shared/ErkCalendar/ErkCalendar.test.d.ts +0 -1
  90. package/dist/Shared/ErkCalendar/ErkCalendar.test.js +0 -171
  91. package/dist/Shared/ErkLocationField/ErkLocationField.d.ts +0 -23
  92. package/dist/Shared/ErkLocationField/ErkLocationField.js +0 -73
  93. package/dist/Shared/ErkLocationField/ErkLocationField.module.css +0 -29
  94. package/dist/Shared/ErkLocationField/addressFields.d.ts +0 -12
  95. package/dist/Shared/ErkLocationField/addressFields.js +0 -34
  96. package/dist/Shared/ErkLocationField/locationRestrictions.d.ts +0 -6
  97. package/dist/Shared/ErkLocationField/locationRestrictions.js +0 -51
  98. package/dist/Shared/ErkLocationInput/ErkLocationInput.d.ts +0 -15
  99. package/dist/Shared/ErkLocationInput/ErkLocationInput.js +0 -502
  100. package/dist/Shared/ErkLocationInput/ErkLocationInput.module.css +0 -115
  101. package/dist/Shared/ErkNumberField/ErkNumberField.d.ts +0 -42
  102. package/dist/Shared/ErkNumberField/ErkNumberField.js +0 -170
@@ -5,13 +5,7 @@ import { EurekaDraft } from './Draft/Draft';
5
5
  import { ErkValue } from './ErkValue';
6
6
  import * as GSteps from './GenericFormSteps';
7
7
  import { Time } from './Time';
8
- import { LocationStep } from './LocationFormStep';
9
- import { NumberStep, NumberStepType } from './NumericFormSteps';
10
- import { BookingStep } from './BookingFormStep';
11
- import { CalendarStep } from './CalendarFormStep';
12
- export type { LocationStep, NumberStep, BookingStep, CalendarStep };
13
- export { NumberStepType };
14
- export type FormStep = Title | TimePicker | Rating | CheckBox | TextArea | TextInput | DatePicker | FileUpload | Separator | FormSelector | ClassifierSelector | Collapsible | EntityValuePicker | ApiSelector | Mapper | DatePickerRange | LocationStep | NumberStep | BookingStep | CalendarStep;
8
+ export type FormStep = Title | TimePicker | Rating | CheckBox | TextArea | TextInput | DatePicker | FileUpload | Separator | FormSelector | ClassifierSelector | Collapsible | EntityValuePicker | ApiSelector | Mapper | DatePickerRange;
15
9
  export interface Title extends GSteps.GBaseStep {
16
10
  type: FormStepTypes.TITLE;
17
11
  title?: EurekaDraft;
@@ -238,3 +232,4 @@ export interface Mapper extends GSteps.GBaseStep {
238
232
  deletable?: boolean;
239
233
  max?: number;
240
234
  }
235
+ export {};
@@ -1,2 +1 @@
1
- import { NumberStepType } from './NumericFormSteps';
2
- export { NumberStepType };
1
+ export {};
@@ -24,10 +24,6 @@ import CustomContext from '../Contexts/CustomContext';
24
24
  import { selectOriginalValue, useCondition } from './StepHooks';
25
25
  import TimePickerStep from './TimePickerStep/TimePickerStep';
26
26
  import PhoneInputStep from './PhoneInputStep/PhoneInputStep';
27
- import LocationStepComponent from './LocationStep/LocationStep';
28
- import NumberStepComponent from './NumberStep/NumberStep';
29
- import BookingStepComponent from './BookingStep/BookingStep';
30
- import CalendarStepComponent from './CalendarStep/CalendarStep';
31
27
  function StepComponent({ step, ...props }) {
32
28
  const { postview, partial } = useAppSelector((state) => state.global);
33
29
  const { customSteps, customClientInfoStep } = useContext(CustomContext);
@@ -78,18 +74,6 @@ function StepComponent({ step, ...props }) {
78
74
  case FormStepTypes.DATEPICKER: {
79
75
  return _jsx(DatePickerStep, { ...props, step: step, editable: editable });
80
76
  }
81
- case FormStepTypes.LOCATION: {
82
- return _jsx(LocationStepComponent, { ...props, step: step, editable: editable });
83
- }
84
- case FormStepTypes.NUMBER: {
85
- return _jsx(NumberStepComponent, { ...props, step: step, editable: editable });
86
- }
87
- case FormStepTypes.BOOKING: {
88
- return _jsx(BookingStepComponent, { ...props, step: step, editable: editable });
89
- }
90
- case FormStepTypes.CALENDAR: {
91
- return _jsx(CalendarStepComponent, { ...props, step: step, editable: editable });
92
- }
93
77
  case FormStepTypes.DATEPICKER_RANGE: {
94
78
  return _jsx(DatePickerRangeStep, { ...props, step: step, editable: editable });
95
79
  }
@@ -1,4 +1,3 @@
1
- import { NumberStepType, } from '../@Types/FormStep';
2
1
  import FormStepTypes, { ApiSelectorOptionTypes, ClassifierOptionTypes, EntityValueDataTypes, EntityValueOptionTypes, OptionTypes, } from '../constants/FormStepTypes';
3
2
  import CBRFormStepTypes from '../constants/CBRFormStepTypes';
4
3
  import AYFFormStepTypes from '../constants/AYFFormStepTypes';
@@ -88,8 +87,6 @@ function recursivelyCheckOpenSize(idStep, steps, values) {
88
87
  return size;
89
88
  }
90
89
  case FormStepTypes.DATEPICKER:
91
- case FormStepTypes.LOCATION:
92
- case FormStepTypes.NUMBER:
93
90
  case FormStepTypes.TEXTINPUT: {
94
91
  return step.size;
95
92
  }
@@ -120,17 +117,6 @@ export const calcDefaultValue = (step) => {
120
117
  return getRawText();
121
118
  else
122
119
  return '';
123
- case FormStepTypes.LOCATION:
124
- return step.defaultValue ?? null;
125
- case FormStepTypes.NUMBER: {
126
- const numStep = step;
127
- if (numStep.numberType === NumberStepType.MONEY ||
128
- numStep.numberType === NumberStepType.MEASURE ||
129
- numStep.numberType === NumberStepType.UNIT_PRICE) {
130
- return numStep.defaultValue ?? null;
131
- }
132
- return numStep.defaultValue ?? '';
133
- }
134
120
  case FormStepTypes.RATING:
135
121
  case FormStepTypes.DATEPICKER:
136
122
  case FormStepTypes.DATEPICKER_RANGE:
@@ -1,4 +1,3 @@
1
- import * as Steps from '../@Types/FormStep';
2
1
  import AYFFormStepTypes from '../constants/AYFFormStepTypes';
3
2
  import CBRFormStepTypes from '../constants/CBRFormStepTypes';
4
3
  import FormStepTypes, { ApiSelectorOptionTypes, ClassifierOptionTypes, EntityValueOptionTypes, OptionTypes, } from '../constants/FormStepTypes';
@@ -497,13 +496,6 @@ describe('StepFunctions', function () {
497
496
  const defaultValue = calcDefaultValue(step);
498
497
  expect(defaultValue).toBe(null);
499
498
  });
500
- test('Location step type', async () => {
501
- const step = {
502
- type: FormStepTypes.LOCATION,
503
- };
504
- const defaultValue = calcDefaultValue(step);
505
- expect(defaultValue).toBe(null);
506
- });
507
499
  test('Mapper, FileUpload, CBRFormStep types', async () => {
508
500
  const step1 = {
509
501
  type: FormStepTypes.MAPPER,
@@ -535,52 +527,6 @@ describe('StepFunctions', function () {
535
527
  const defaultValue = calcDefaultValue(step);
536
528
  expect(defaultValue).toBeUndefined();
537
529
  });
538
- test('Number step type without defaultValue', async () => {
539
- const step1 = {
540
- type: FormStepTypes.NUMBER,
541
- numberType: Steps.NumberStepType.INTEGER,
542
- };
543
- const step2 = {
544
- type: FormStepTypes.NUMBER,
545
- numberType: Steps.NumberStepType.DECIMAL,
546
- };
547
- const step3 = {
548
- type: FormStepTypes.NUMBER,
549
- numberType: Steps.NumberStepType.PERCENTAGE,
550
- };
551
- const step4 = {
552
- type: FormStepTypes.NUMBER,
553
- numberType: Steps.NumberStepType.MONEY,
554
- };
555
- const step5 = {
556
- type: FormStepTypes.NUMBER,
557
- numberType: Steps.NumberStepType.MEASURE,
558
- };
559
- const step6 = {
560
- type: FormStepTypes.NUMBER,
561
- numberType: Steps.NumberStepType.UNIT_PRICE,
562
- };
563
- expect(calcDefaultValue(step1)).toBe('');
564
- expect(calcDefaultValue(step2)).toBe('');
565
- expect(calcDefaultValue(step3)).toBe('');
566
- expect(calcDefaultValue(step4)).toBe(null);
567
- expect(calcDefaultValue(step5)).toBe(null);
568
- expect(calcDefaultValue(step6)).toBe(null);
569
- });
570
- test('Number step type with defaultValue', async () => {
571
- const step1 = {
572
- type: FormStepTypes.NUMBER,
573
- numberType: Steps.NumberStepType.INTEGER,
574
- defaultValue: 42,
575
- };
576
- const step2 = {
577
- type: FormStepTypes.NUMBER,
578
- numberType: Steps.NumberStepType.MONEY,
579
- defaultValue: { value: 100, currency: 'USD' },
580
- };
581
- expect(calcDefaultValue(step1)).toBe(42);
582
- expect(calcDefaultValue(step2)).toEqual({ value: 100, currency: 'USD' });
583
- });
584
530
  });
585
531
  describe('iterateNestedSteps', function () {
586
532
  test('should iterate over nested steps', async () => {
@@ -2,9 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React, { useMemo } from 'react';
3
3
  import { format as dateFnsFormat, isValid } from 'date-fns';
4
4
  import { InputAdornment, styled, Dialog as MuiDialog } from '@mui/material';
5
- import { MobileDatePicker as MuiDatePicker, MobileDateTimePicker as MuiDateTimePicker, DatePickerToolbar as MuiDatePickerToolbar, DateTimePickerToolbar as MuiDateTimePickerToolbar, usePickerContext, PickerDay as MuiPickerDay, renderTimeViewClock, } from '@mui/x-date-pickers';
5
+ import { MobileDatePicker as MuiDatePicker, MobileDateTimePicker as MuiDateTimePicker, DatePickerToolbar as MuiDatePickerToolbar, DateTimePickerToolbar as MuiDateTimePickerToolbar, usePickerContext, } from '@mui/x-date-pickers';
6
+ import { PickerDay as MuiPickerDay } from '@mui/x-date-pickers/PickerDay';
6
7
  import { StyledTextField } from '../ErkTextField/ErkTextField';
7
8
  import CalendarIcon from '../../Icons/CalendarIcon';
9
+ import { renderTimeViewClock } from '@mui/x-date-pickers/timeViewRenderers';
8
10
  const StyledDateTimePicker = styled(MuiDateTimePicker, {
9
11
  shouldForwardProp: (propName) => propName !== 'size',
10
12
  })(({ disabled, readOnly, size }) => ({
@@ -126,10 +128,10 @@ const StyledDay = styled(MuiPickerDay)(({ theme }) => ({
126
128
  fontWeight: 500,
127
129
  fontSize: '0.9rem',
128
130
  lineHeight: 'normal',
129
- '&.Erk-MuiPickersDay-today': {
131
+ '&.Erk-MuiPickerDay-today': {
130
132
  backgroundColor: theme.palette.primary.main + '33',
131
133
  },
132
- '&.Erk-MuiPickersDay-dayOutsideMonth': {
134
+ '&.Erk-MuiPickerDay-dayOutsideMonth': {
133
135
  color: 'rgb(0,0,0,0.4)',
134
136
  '&.Mui-selected': {
135
137
  color: theme.palette.primary.contrastText,
@@ -169,7 +171,7 @@ function CustomDatePicker({ error, required, disabled, readOnly, helperText, siz
169
171
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
170
172
  orientation: _orientation, ...others }) {
171
173
  if (pickTime) {
172
- return (_jsx(StyledDateTimePicker, { ampm: true, size: size, reduceAnimations: true, ...others, label: label, disabled: disabled, readOnly: readOnly, showDaysOutsideCurrentMonth: true, slotProps: {
174
+ return (_jsx(StyledDateTimePicker, { ampm: true, size: size, reduceAnimations: true, orientation: "portrait", ...others, label: label, disabled: disabled, readOnly: readOnly, showDaysOutsideCurrentMonth: true, slotProps: {
173
175
  actionBar: {
174
176
  actions: ['clear', 'accept'],
175
177
  },
@@ -229,7 +231,7 @@ orientation: _orientation, ...others }) {
229
231
  } }));
230
232
  }
231
233
  else {
232
- return (_jsx(StyledDatePicker, { ...others, label: label, size: size, reduceAnimations: true, readOnly: readOnly, disabled: disabled, showDaysOutsideCurrentMonth: true, views: ['year', 'month', 'day'], slotProps: {
234
+ return (_jsx(StyledDatePicker, { ...others, label: label, size: size, reduceAnimations: true, orientation: "portrait", readOnly: readOnly, disabled: disabled, showDaysOutsideCurrentMonth: true, views: ['year', 'month', 'day'], slotProps: {
233
235
  actionBar: {
234
236
  actions: ['clear', 'accept'],
235
237
  },
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { PickersShortcutsItem } from '@mui/x-date-pickers';
3
- import { MobileDateRangePickerProps as MuiDateRangePickerProps, DateRange } from '@mui/x-date-pickers-pro';
2
+ import { MobileDateRangePickerProps as MuiDateRangePickerProps } from '@mui/x-date-pickers-pro/MobileDateRangePicker';
3
+ import { DateRange } from '@mui/x-date-pickers-pro';
4
+ import { PickersShortcutsItem } from '@mui/x-date-pickers/PickersShortcuts';
4
5
  import { ErkTextFieldProps } from '../ErkTextField/ErkTextField';
5
6
  interface ErkDateRangePickerProps extends Omit<MuiDateRangePickerProps, 'ref' | 'onChange' | 'value' | 'slotProps'>, Pick<ErkTextFieldProps, 'error' | 'required' | 'helperText' | 'size'> {
6
7
  onChange?: (dateRange: DateRange<Date>) => void;
@@ -2,7 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React, { useMemo } from 'react';
3
3
  import { InputAdornment, styled, Dialog as MuiDialog } from '@mui/material';
4
4
  import { DatePickerToolbar as MuiDatePickerToolbar, usePickerContext, } from '@mui/x-date-pickers';
5
- import { MobileDateRangePicker as MuiDateRangePicker, DateRangePickerDay as MuiDateRangePickerDay, } from '@mui/x-date-pickers-pro';
5
+ import { MobileDateRangePicker as MuiDateRangePicker, } from '@mui/x-date-pickers-pro/MobileDateRangePicker';
6
+ import { DateRangePickerDay as MuiDateRangePickerDay } from '@mui/x-date-pickers-pro';
6
7
  import { format, isValid } from 'date-fns';
7
8
  import { StyledTextField } from '../ErkTextField/ErkTextField';
8
9
  import CalendarIcon from '../../Icons/CalendarIcon';
@@ -70,10 +71,10 @@ const StyledDay = styled(MuiDateRangePickerDay)(({ theme }) => ({
70
71
  fontWeight: 500,
71
72
  fontSize: '0.9rem',
72
73
  lineHeight: 'normal',
73
- '&.Erk-MuiPickersDay-today:not(.Erk-MuiDateRangePickerDay-rangeIntervalDayHighlight)': {
74
+ '&.Erk-MuiDateRangePickerDay-today:not(.Erk-MuiDateRangePickerDay-rangeIntervalDayHighlight)': {
74
75
  backgroundColor: theme.palette.primary.main + '33',
75
76
  },
76
- '&.Erk-MuiPickersDay-dayOutsideMonth': {
77
+ '&.Erk-MuiDateRangePickerDay-dayOutsideMonth': {
77
78
  color: 'rgb(0,0,0,0.4)',
78
79
  '&.Mui-selected': {
79
80
  color: theme.palette.primary.contrastText,
@@ -83,7 +84,7 @@ const StyledDay = styled(MuiDateRangePickerDay)(({ theme }) => ({
83
84
  backgroundColor: theme.palette.primary.main + '1a',
84
85
  },
85
86
  }));
86
- const CustomRangePickerField = React.forwardRef(function CustomRangePickerField({ error, required, helperText, size = 'small', labelMargin = 5, fullWidth = true, inputRef, }, ref) {
87
+ const CustomRangePickerField = React.forwardRef(function CustomRangePickerField({ error, required, helperText, size = 'small', labelMargin = 5, fullWidth = true, inputRef }, ref) {
87
88
  const { value, fieldFormat, setOpen, disabled, readOnly, label } = usePickerContext();
88
89
  const { displayValue, isInvalid } = useMemo(() => {
89
90
  const [startDate, endDate] = value ?? [null, null];
@@ -21,11 +21,7 @@ export declare enum FormStepTypes {
21
21
  COLLAPSIBLE = "COLLAPSIBLE",
22
22
  MAPPER = "MAPPER",
23
23
  ENTITYVALUEPICKER = "ENTITYVALUEPICKER",
24
- API_SELECTOR = "API_SELECTOR",
25
- LOCATION = "LOCATION",
26
- NUMBER = "NUMBER",
27
- CALENDAR = "CALENDAR",
28
- BOOKING = "BOOKING"
24
+ API_SELECTOR = "API_SELECTOR"
29
25
  }
30
26
  export declare enum OptionTypes {
31
27
  DEFAULT = "DEFAULT",
@@ -25,10 +25,6 @@ export var FormStepTypes;
25
25
  FormStepTypes["MAPPER"] = "MAPPER";
26
26
  FormStepTypes["ENTITYVALUEPICKER"] = "ENTITYVALUEPICKER";
27
27
  FormStepTypes["API_SELECTOR"] = "API_SELECTOR";
28
- FormStepTypes["LOCATION"] = "LOCATION";
29
- FormStepTypes["NUMBER"] = "NUMBER";
30
- FormStepTypes["CALENDAR"] = "CALENDAR";
31
- FormStepTypes["BOOKING"] = "BOOKING";
32
28
  })(FormStepTypes || (FormStepTypes = {}));
33
29
  export var OptionTypes;
34
30
  (function (OptionTypes) {
@@ -1,8 +1,6 @@
1
1
  import EurekaForm, { AppProps as EurekaFormProps } from './App/App';
2
2
  import { StepProps } from './FormSteps/Step';
3
3
  import * as StepFunctions from './FormSteps/StepFunctions';
4
- import ErkCalendar, { BusinessDaysConfig, ErkCalendarProps } from './Shared/ErkCalendar/ErkCalendar';
5
- import ErkBookingPicker, { ErkBookingPickerProps } from './Shared/ErkBookingPicker/ErkBookingPicker';
6
- export type { StepProps, EurekaFormProps, ErkCalendarProps, BusinessDaysConfig, ErkBookingPickerProps };
7
- export { EurekaForm, StepFunctions, ErkCalendar, ErkBookingPicker };
4
+ export type { StepProps, EurekaFormProps };
5
+ export { EurekaForm, StepFunctions };
8
6
  export default EurekaForm;
package/dist/index.lib.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import EurekaForm from './App/App';
2
2
  import * as StepFunctions from './FormSteps/StepFunctions';
3
- import ErkCalendar from './Shared/ErkCalendar/ErkCalendar';
4
- import ErkBookingPicker from './Shared/ErkBookingPicker/ErkBookingPicker';
5
- export { EurekaForm, StepFunctions, ErkCalendar, ErkBookingPicker };
3
+ export { EurekaForm, StepFunctions };
6
4
  export default EurekaForm;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version":"3.0.53-new-steps",
4
+ "version":"3.0.53-test",
5
5
  "scripts": {
6
6
  "watch": "tsgo --noEmit --watch --project tsconfig.app.json",
7
7
  "start": "vite",
@@ -16,7 +16,6 @@
16
16
  "build-storybook": "storybook build"
17
17
  },
18
18
  "dependencies": {
19
- "@base-ui/react": "^1.6.0",
20
19
  "@reduxjs/toolkit": "2.11.2",
21
20
  "axios": "1.16.0",
22
21
  "date-fns": "4.1.0",
@@ -51,10 +50,10 @@
51
50
  "@eslint/eslintrc": "3.3.3",
52
51
  "@eslint/js": "9.39.1",
53
52
  "@faker-js/faker": "10.1.0",
54
- "@mui/material": "^9.0.1",
55
- "@mui/x-data-grid-pro": "^9.3.0",
56
- "@mui/x-date-pickers": "^9.3.0",
57
- "@mui/x-date-pickers-pro": "^9.3.0",
53
+ "@mui/material": "^9.2.0",
54
+ "@mui/x-data-grid-pro": "^9.10.1",
55
+ "@mui/x-date-pickers": "^9.10.1",
56
+ "@mui/x-date-pickers-pro": "^9.10.1",
58
57
  "@storybook/addon-docs": "^10.4.0",
59
58
  "@storybook/addon-onboarding": "^10.4.0",
60
59
  "@storybook/addon-themes": "^10.4.0",
@@ -98,8 +97,8 @@
98
97
  "peerDependencies": {
99
98
  "@emotion/react": "11.x.x",
100
99
  "@emotion/styled": "11.x.x",
101
- "@mui/material": "^9.0.1",
102
- "@mui/x-date-pickers": "^9.3.0",
100
+ "@mui/material": "^9.2.0",
101
+ "@mui/x-date-pickers": "^9.10.1",
103
102
  "react": "18 || 19",
104
103
  "react-dom": "18 || 19"
105
104
  },
@@ -1,48 +0,0 @@
1
- /**
2
- * @deprecated Renombrado a CalendarFormStep.
3
- * Este archivo existe solo para compatibilidad retroactiva.
4
- * Usar `CalendarFormStep.ts` directamente.
5
- */
6
- export type { CalendarStep as AvailabilityStep } from './CalendarFormStep';
7
- export type { CalendarValue as AvailabilityValue } from './CalendarFormStep';
8
- export { CalendarEventCategory as AvailabilityEventCategory } from './CalendarFormStep';
9
- export { CalendarDefaultView } from './CalendarFormStep';
10
- export type { CalendarEventTemplate } from './CalendarFormStep';
11
- export type { CalendarEvent } from './CalendarFormStep';
12
- export declare enum AvailabilityMode {
13
- WEEKLY = "WEEKLY",
14
- SPECIFIC_DATES = "SPECIFIC_DATES",
15
- COMBINED = "COMBINED"
16
- }
17
- export declare enum AvailabilityDayOfWeek {
18
- MONDAY = 1,
19
- TUESDAY = 2,
20
- WEDNESDAY = 3,
21
- THURSDAY = 4,
22
- FRIDAY = 5,
23
- SATURDAY = 6,
24
- SUNDAY = 7
25
- }
26
- export interface AvailabilitySlot {
27
- start: string;
28
- end: string;
29
- }
30
- export interface AvailabilityDay {
31
- day: AvailabilityDayOfWeek;
32
- slots: AvailabilitySlot[];
33
- recurrence?: string;
34
- }
35
- export interface AvailabilitySpecificDate {
36
- date: string;
37
- slots: AvailabilitySlot[];
38
- }
39
- export interface AvailabilityExclusion {
40
- date?: string;
41
- dateRange?: {
42
- start: string;
43
- end: string;
44
- };
45
- dayOfWeek?: AvailabilityDayOfWeek;
46
- slots?: AvailabilitySlot[];
47
- reason?: string;
48
- }
@@ -1,24 +0,0 @@
1
- /**
2
- * @deprecated Renombrado a CalendarFormStep.
3
- * Este archivo existe solo para compatibilidad retroactiva.
4
- * Usar `CalendarFormStep.ts` directamente.
5
- */
6
- export { CalendarEventCategory as AvailabilityEventCategory } from './CalendarFormStep';
7
- export { CalendarDefaultView } from './CalendarFormStep';
8
- // Tipos del draft original mantenidos para no romper código existente.
9
- export var AvailabilityMode;
10
- (function (AvailabilityMode) {
11
- AvailabilityMode["WEEKLY"] = "WEEKLY";
12
- AvailabilityMode["SPECIFIC_DATES"] = "SPECIFIC_DATES";
13
- AvailabilityMode["COMBINED"] = "COMBINED";
14
- })(AvailabilityMode || (AvailabilityMode = {}));
15
- export var AvailabilityDayOfWeek;
16
- (function (AvailabilityDayOfWeek) {
17
- AvailabilityDayOfWeek[AvailabilityDayOfWeek["MONDAY"] = 1] = "MONDAY";
18
- AvailabilityDayOfWeek[AvailabilityDayOfWeek["TUESDAY"] = 2] = "TUESDAY";
19
- AvailabilityDayOfWeek[AvailabilityDayOfWeek["WEDNESDAY"] = 3] = "WEDNESDAY";
20
- AvailabilityDayOfWeek[AvailabilityDayOfWeek["THURSDAY"] = 4] = "THURSDAY";
21
- AvailabilityDayOfWeek[AvailabilityDayOfWeek["FRIDAY"] = 5] = "FRIDAY";
22
- AvailabilityDayOfWeek[AvailabilityDayOfWeek["SATURDAY"] = 6] = "SATURDAY";
23
- AvailabilityDayOfWeek[AvailabilityDayOfWeek["SUNDAY"] = 7] = "SUNDAY";
24
- })(AvailabilityDayOfWeek || (AvailabilityDayOfWeek = {}));
@@ -1,67 +0,0 @@
1
- /**
2
- * DRAFT — BankAccountFormStep types
3
- *
4
- * Paso para capturar información de una cuenta bancaria.
5
- * Incluye banco, tipo de cuenta, número, país, moneda y titular opcional.
6
- */
7
- import { GBaseStep } from './GenericFormSteps';
8
- export declare enum BankAccountType {
9
- SAVINGS = "SAVINGS",
10
- CHECKING = "CHECKING"
11
- }
12
- export interface BankAccountStep extends GBaseStep {
13
- type: 'BANK_ACCOUNT';
14
- label: string;
15
- description: string | null;
16
- required: boolean;
17
- /**
18
- * País predeterminado para filtrar la lista de bancos.
19
- * Código ISO 3166-1 alpha-2 (ej: "CO", "US", "MX").
20
- * El usuario puede cambiarlo si no se restringe.
21
- */
22
- defaultCountry?: string;
23
- /**
24
- * Si se define, solo se muestran bancos de estos países.
25
- * Si no se define, se permite cualquier país.
26
- */
27
- allowedCountries?: string[];
28
- /**
29
- * Si se define, solo se muestran estas monedas.
30
- * Códigos ISO 4217 (ej: ["COP", "USD"]).
31
- */
32
- allowedCurrencies?: string[];
33
- /**
34
- * Si true, se solicita información del titular de la cuenta
35
- * (nombre / identificación).
36
- */
37
- requireHolder: boolean;
38
- size: 1 | 2 | 3 | 4;
39
- }
40
- export interface BankAccountHolder {
41
- /** Nombre completo del titular */
42
- name?: string;
43
- /**
44
- * Referencia a un registro de identidad en Capta.
45
- * Puede ser el id del contacto o el número de documento.
46
- */
47
- identityRef?: string;
48
- }
49
- export interface BankValue {
50
- bank: {
51
- /** Id interno del banco en el catálogo de Capta */
52
- id: string;
53
- /** Nombre display del banco */
54
- label: string;
55
- };
56
- /**
57
- * Tipo de cuenta. Se acepta string para bancos con tipos no estándar
58
- * (ej: "NEQUI", "DAVIPLATA", "CORRIENTE_EXTERIOR").
59
- */
60
- accountType: BankAccountType | string;
61
- accountNumber: string;
62
- /** Código ISO 3166-1 alpha-2 del país */
63
- country: string;
64
- /** Código ISO 4217 de la moneda */
65
- currency: string;
66
- holder?: BankAccountHolder;
67
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * DRAFT — BankAccountFormStep types
3
- *
4
- * Paso para capturar información de una cuenta bancaria.
5
- * Incluye banco, tipo de cuenta, número, país, moneda y titular opcional.
6
- */
7
- // ===========================================================================
8
- // Enums
9
- // ===========================================================================
10
- export var BankAccountType;
11
- (function (BankAccountType) {
12
- BankAccountType["SAVINGS"] = "SAVINGS";
13
- BankAccountType["CHECKING"] = "CHECKING";
14
- })(BankAccountType || (BankAccountType = {}));
@@ -1,166 +0,0 @@
1
- /**
2
- * BookingFormStep — paso de agendamiento (flujo ligero).
3
- *
4
- * Permite que alguien externo agende en el calendario de una o varias personas.
5
- * Flujo: (seleccionar persona) → seleccionar día → seleccionar hora.
6
- *
7
- * A diferencia del paso CALENDAR, este NO usa MUI X Scheduler:
8
- * presenta una UI ligera de date-picker + lista de slots disponibles.
9
- * La disponibilidad real la calcula el backend leyendo los calendarios referenciados.
10
- */
11
- import { GBaseStep } from './GenericFormSteps';
12
- import FormStepTypes from '../constants/FormStepTypes';
13
- import { DynamicRef } from './StepRef';
14
- import { CalendarValue } from './CalendarFormStep';
15
- /**
16
- * Modalidad de la cita.
17
- */
18
- export declare enum BookingMode {
19
- /** Presencial — requiere ubicación física. */
20
- IN_PERSON = "IN_PERSON",
21
- /** Virtual / remota (Meet, Teams, Zoom, etc.). */
22
- VIRTUAL = "VIRTUAL",
23
- /** Híbrida — se acuerda entre las partes. */
24
- HYBRID = "HYBRID"
25
- }
26
- /**
27
- * Cómo se maneja la selección de la persona a agendar.
28
- */
29
- export declare enum PersonSelectionMode {
30
- /**
31
- * Un único calendario destino, sin selector de persona visible.
32
- * El backend asigna automáticamente el slot disponible.
33
- */
34
- NONE = "NONE",
35
- /**
36
- * El usuario puede elegir una persona específica o dejar que el sistema asigne.
37
- */
38
- OPTIONAL = "OPTIONAL",
39
- /**
40
- * El usuario debe elegir una persona antes de ver los horarios disponibles.
41
- */
42
- REQUIRED = "REQUIRED"
43
- }
44
- /**
45
- * Perfil de una persona cuyo calendario se puede agendar.
46
- */
47
- export interface BookablePerson {
48
- /** Identificador único de la persona en el sistema. */
49
- id: string;
50
- /** Nombre visible en la UI de selección. */
51
- name: string;
52
- /** URL del avatar / foto de perfil. */
53
- avatarUrl?: string;
54
- /** Rol o cargo visible al usuario (ej: "Técnico", "Asesor comercial"). */
55
- role?: string;
56
- /** Descripción breve opcional. */
57
- description?: string;
58
- }
59
- /**
60
- * Paso de tipo `BOOKING`.
61
- * UI ligera: persona → día → slot de hora.
62
- */
63
- export interface BookingStep extends GBaseStep {
64
- type: FormStepTypes.BOOKING;
65
- label: string;
66
- description: string | null;
67
- required: boolean;
68
- /** Modalidad de la cita (presencial, virtual, híbrida). */
69
- bookingMode: BookingMode;
70
- /**
71
- * Cómo se presenta la selección de persona al usuario.
72
- * @default PersonSelectionMode.NONE
73
- */
74
- personSelectionMode?: PersonSelectionMode;
75
- /**
76
- * Lista de personas agendables.
77
- * Requerido si `personSelectionMode` es `OPTIONAL` o `REQUIRED`.
78
- */
79
- persons?: BookablePerson[];
80
- /**
81
- * Permite que el formulario sea enviado sin identificar al usuario (agendamiento anónimo).
82
- * El backend genera un token temporal para rastrear la reserva.
83
- * @default false
84
- */
85
- allowAnonymous?: boolean;
86
- /**
87
- * Si el paso recopila datos de contacto (nombre/correo) del que agenda.
88
- * Desactívalo cuando el booking va dentro de un formulario mayor que ya los captura.
89
- * @default false
90
- */
91
- collectContact?: boolean;
92
- /** Duración en minutos de cada slot de cita. */
93
- durationMinutes: number;
94
- /**
95
- * Buffer en minutos entre citas consecutivas.
96
- * @default 0
97
- */
98
- bufferMinutes?: number;
99
- /**
100
- * Mínimo de horas de anticipación para agendar (ej: no se puede agendar con menos de 2h).
101
- * @default 0
102
- */
103
- minNoticeHours?: number;
104
- /**
105
- * Máximo de días hacia el futuro en los que se pueden ver slots disponibles.
106
- * @default 30
107
- */
108
- maxAdvanceDays?: number;
109
- /**
110
- * Minutos que se bloquea el slot mientras el usuario termina el formulario.
111
- * Si no confirma a tiempo, el slot vuelve a estar disponible.
112
- * @default 15
113
- */
114
- temporaryLockMinutes?: number;
115
- /**
116
- * Referencia a un paso `CALENDAR` en el mismo formulario cuya disponibilidad
117
- * se usa para filtrar los slots. Útil cuando el dueño del calendario también
118
- * llena el formulario y define su disponibilidad en el mismo flujo.
119
- */
120
- calendarRef?: DynamicRef<CalendarValue, 'CALENDAR'>;
121
- size: 1 | 2 | 3 | 4;
122
- }
123
- /**
124
- * Un slot de tiempo disponible para agendamiento.
125
- * El backend calcula esto cruzando el calendario del profesional con el horario configurado.
126
- */
127
- export interface BookingSlot {
128
- /** ID único del slot (puede incluir personId, fecha y hora). */
129
- id: string;
130
- /** Hora de inicio en formato 24h `HH:mm`. */
131
- startTime: string;
132
- /** Hora de fin en formato 24h `HH:mm`. */
133
- endTime: string;
134
- /** Si el slot sigue disponible para ser reservado. */
135
- available: boolean;
136
- }
137
- /**
138
- * Valor que se guarda tras completar un paso de tipo `BOOKING`.
139
- */
140
- export interface BookingValue {
141
- type: 'BOOKING_VALUE';
142
- /** ID generado por el backend al bloquear el slot. */
143
- slotId?: string;
144
- /** Fecha de la cita en formato ISO `YYYY-MM-DD`. */
145
- date: string;
146
- /** Hora de inicio en formato 24h `HH:mm`. */
147
- startTime: string;
148
- /** Hora de fin en formato 24h `HH:mm`. */
149
- endTime: string;
150
- /** ID de la persona seleccionada o asignada. */
151
- personId?: string;
152
- /** Nombre de la persona (incluido si `personSelectionMode !== NONE`). */
153
- personName?: string;
154
- /** Nombre de contacto del que agenda (solo si `collectContact`). */
155
- contactName?: string;
156
- /** Correo de contacto del que agenda (solo si `collectContact`). */
157
- contactEmail?: string;
158
- /**
159
- * Estado del slot en el ciclo de vida del formulario.
160
- * - `PENDING`: bloqueado temporalmente, formulario sin enviar.
161
- * - `CONFIRMED`: reserva en firme, formulario enviado.
162
- */
163
- status: 'PENDING' | 'CONFIRMED';
164
- /** Timestamp ISO hasta el que está bloqueado el slot (cuando `status === 'PENDING'`). */
165
- lockedUntil?: string;
166
- }