@arquimedes.co/eureka-forms 1.9.7-test → 1.9.8-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.
@@ -1,9 +1,15 @@
1
1
  import AYFFormStepTypes from '../constants/AYFFormStepTypes';
2
- import { GSmartSelect, GTextInput } from './GenericFormSteps';
3
- export declare type AYFFormStep = AYFListStep | AYFBillNumStep;
2
+ import { GDatePicker, GSmartSelect, GTextInput } from './GenericFormSteps';
3
+ export declare type AYFFormStep = AYFListStep | AYFBillNumStep | AYFYearStep | AYFCutOffDateStep;
4
4
  export interface AYFListStep extends Omit<GSmartSelect, 'searchable'> {
5
5
  type: AYFFormStepTypes.AYF_START_MONTH | AYFFormStepTypes.AYF_END_MONTH;
6
6
  }
7
7
  export interface AYFBillNumStep extends GTextInput {
8
- type: AYFFormStepTypes.AYF_BILL_NUM | AYFFormStepTypes.AYF_YEAR | AYFFormStepTypes.AYF_START_YEAR | AYFFormStepTypes.AYF_END_YEAR;
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;
9
15
  }
@@ -7,10 +7,6 @@ export interface Organization {
7
7
  logoUrl: string;
8
8
  /** The organization Favicon url */
9
9
  iconUrl?: string;
10
- /** The organization contact info */
11
- contactInfo?: Array<Record<string, string>>;
12
- /** The organization web page url*/
13
- webUrl: string;
14
10
  styles?: {
15
11
  primaryColor: string;
16
12
  secondaryColor: string;
@@ -51,6 +51,7 @@ import TextInputStep from './TextInputStep/TextInputStep';
51
51
  import SmartSelectStep from './SmartSelectStep/SmartSelectStep';
52
52
  import CalendarTodayRoundedIcon from '@material-ui/icons/CalendarTodayRounded';
53
53
  import DescriptionIcon from '@material-ui/icons/Description';
54
+ import DatePickerStep from './DatePickerStep/DatePickerStep';
54
55
  function AYFStepMapper(props) {
55
56
  var _this = this;
56
57
  var getMonths = function () { return __awaiter(_this, void 0, void 0, function () {
@@ -83,8 +84,6 @@ function AYFStepMapper(props) {
83
84
  marginTop: 2,
84
85
  } }, void 0) }), void 0));
85
86
  case AYFFormStepTypes.AYF_YEAR:
86
- case AYFFormStepTypes.AYF_START_YEAR:
87
- case AYFFormStepTypes.AYF_END_YEAR:
88
87
  return (_jsx(TextInputStep, __assign({}, props, { step: props.step, defaultValue: new Date().getFullYear().toString(), icon: _jsx(CalendarTodayRoundedIcon, { fontSize: "inherit", style: {
89
88
  color: '#757575',
90
89
  fontSize: 20,
@@ -93,6 +92,8 @@ function AYFStepMapper(props) {
93
92
  } }, void 0) }), void 0));
94
93
  case AYFFormStepTypes.AYF_BILL_NUM:
95
94
  return (_jsx(TextInputStep, __assign({}, props, { step: props.step, icon: _jsx(DescriptionIcon, { style: { color: '#757575', fontSize: 23 } }, void 0) }), void 0));
95
+ case AYFFormStepTypes.AYF_CUT_OFF_DATE:
96
+ return (_jsx(DatePickerStep, __assign({}, props, { step: props.step, defaultValue: new Date() }), void 0));
96
97
  default:
97
98
  return _jsx("div", {}, void 0);
98
99
  }
@@ -4,6 +4,8 @@ import { StepProps } from '../Step';
4
4
  export interface DatePickerStepProps extends StepProps {
5
5
  /** The DatePickerStep to display */
6
6
  step: DatePicker;
7
+ /** Default value to display */
8
+ defaultValue?: Date | null;
7
9
  }
8
10
  declare function DatePickerStep(props: DatePickerStepProps): JSX.Element;
9
11
  export default DatePickerStep;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { DatePickerStepProps } from '../DatePickerStep';
3
- declare function DatePickerStep({ step, form, errors, control, editable, postview, formStyle, widthStats, }: DatePickerStepProps): JSX.Element;
3
+ declare function DatePickerStep({ step, form, errors, control, editable, postview, formStyle, widthStats, defaultValue, }: DatePickerStepProps): JSX.Element;
4
4
  export default DatePickerStep;
@@ -15,13 +15,13 @@ import { Controller } from 'react-hook-form';
15
15
  import RoundedDatePicker from '../../../../shared/RoundedDatePicker/RoundedDatePicker';
16
16
  import { calcStepWidth } from '../../StepFunctions';
17
17
  function DatePickerStep(_a) {
18
- var step = _a.step, form = _a.form, errors = _a.errors, control = _a.control, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats;
18
+ var step = _a.step, form = _a.form, errors = _a.errors, control = _a.control, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats, _b = _a.defaultValue, defaultValue = _b === void 0 ? null : _b;
19
19
  return (_jsx("div", __assign({ className: styles.container, style: {
20
20
  width: widthStats.currentBreakPoint <= step.size
21
21
  ? '100%'
22
22
  : calcStepWidth(step.size, form.size),
23
23
  minHeight: step.description || step.required ? '55px' : '43px',
24
- } }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: null, rules: {
24
+ } }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: defaultValue, rules: {
25
25
  required: step.required
26
26
  ? 'Este campo es obligatorio'
27
27
  : undefined,
@@ -3,7 +3,6 @@ export declare enum AYFFormStepTypes {
3
3
  AYF_END_MONTH = "AYF_END_MONTH",
4
4
  AYF_YEAR = "AYF_YEAR",
5
5
  AYF_BILL_NUM = "AYF_BILL_NUM",
6
- AYF_START_YEAR = "AYF_START_YEAR",
7
- AYF_END_YEAR = "AYF_END_YEAR"
6
+ AYF_CUT_OFF_DATE = "AYF_CUT_OFF_DATE"
8
7
  }
9
8
  export default AYFFormStepTypes;
@@ -4,7 +4,6 @@ export var AYFFormStepTypes;
4
4
  AYFFormStepTypes["AYF_END_MONTH"] = "AYF_END_MONTH";
5
5
  AYFFormStepTypes["AYF_YEAR"] = "AYF_YEAR";
6
6
  AYFFormStepTypes["AYF_BILL_NUM"] = "AYF_BILL_NUM";
7
- AYFFormStepTypes["AYF_START_YEAR"] = "AYF_START_YEAR";
8
- AYFFormStepTypes["AYF_END_YEAR"] = "AYF_END_YEAR";
7
+ AYFFormStepTypes["AYF_CUT_OFF_DATE"] = "AYF_CUT_OFF_DATE";
9
8
  })(AYFFormStepTypes || (AYFFormStepTypes = {}));
10
9
  export default AYFFormStepTypes;
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":"1.9.7-test",
4
+ "version":"1.9.8-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",