@zohodesk/components
Version:
In this Package, we Provide Some Basic Components to Build Web App
203 lines • 6.93 kB
JavaScript
import PropTypes from 'prop-types';
import { dataFormatList } from "../dateFormatUtils/dateFormats";
export const CalendarView_propTypes = {
dataId: PropTypes.string,
date: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
month: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
needBorder: PropTypes.bool,
onSelect: PropTypes.func,
year: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
dayNames: PropTypes.array,
dayNamesShort: PropTypes.array,
todayMonth: PropTypes.string,
todayDate: PropTypes.string,
todayYear: PropTypes.string,
weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
holidays: PropTypes.arrayOf(PropTypes.number)
};
export const Span_propTypes = {
dataId: PropTypes.string,
handleSelect: PropTypes.func,
i: PropTypes.number,
incremday: PropTypes.number,
isActive: PropTypes.bool,
tdclass: PropTypes.string,
userSeeMonth: PropTypes.number,
userSeeYear: PropTypes.number,
isToday: PropTypes.bool
};
export const DateTime_propTypes = {
boxSize: PropTypes.string,
className: PropTypes.string,
dataId: PropTypes.string,
dateFormat: PropTypes.string,
// eslint-disable-next-line react/no-unused-prop-types
defaultTime: PropTypes.string,
getMethods: PropTypes.func,
getRef: PropTypes.func,
i18nKeys: PropTypes.shape({
timeText: PropTypes.string.isRequired,
submitText: PropTypes.string.isRequired,
cancelText: PropTypes.string.isRequired,
hourEmptyText: PropTypes.string.isRequired,
minuteEmptyText: PropTypes.string.isRequired,
nextMonthTitleText: PropTypes.string.isRequired,
prevMonthTitleText: PropTypes.string.isRequired
}),
innerClass: PropTypes.string,
isAbsolute: PropTypes.bool,
isActive: PropTypes.bool,
isAnimate: PropTypes.bool,
isDateTimeField: PropTypes.bool,
isPadding: PropTypes.bool,
isReady: PropTypes.bool,
max: PropTypes.string,
maxErrorText: PropTypes.string,
min: PropTypes.string,
minErrorText: PropTypes.string,
// eslint-disable-next-line react/no-unused-prop-types
needAction: PropTypes.bool,
needDefaultTime: PropTypes.bool,
needResponsive: PropTypes.bool,
onChange: PropTypes.func,
onClear: PropTypes.func,
onClick: PropTypes.func,
onDateSelect: PropTypes.func,
onError: PropTypes.func,
onSelect: PropTypes.func,
position: PropTypes.string,
timeZone: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
is24Hour: PropTypes.bool,
isDefaultPosition: PropTypes.bool,
customDateFormat: PropTypes.string,
positionsOffset: PropTypes.array,
targetOffset: PropTypes.string,
isRestrictScroll: PropTypes.bool,
dropBoxPortalId: PropTypes.string,
renderCustomHeader: PropTypes.node,
renderCustomFooter: PropTypes.node,
customProps: PropTypes.object,
weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
holidays: PropTypes.arrayOf(PropTypes.number)
};
export const DateWidget_propTypes = {
borderColor: PropTypes.oneOf(['transparent', 'default']),
cantEditOnPopupOpen: PropTypes.bool,
children: PropTypes.object,
className: PropTypes.string,
closePopupOnly: PropTypes.func,
dataId: PropTypes.string,
dateFormat: PropTypes.oneOf([...dataFormatList]),
defaultPosition: PropTypes.oneOf(['top', 'bottom', 'right', 'left']),
defaultTime: PropTypes.string,
getContainerRef: PropTypes.func,
getMethods: PropTypes.func,
getRef: PropTypes.func,
getTargetRef: PropTypes.func,
i18nKeys: PropTypes.object,
id: PropTypes.string,
isDateTime: PropTypes.bool,
isDisabled: PropTypes.bool,
isEditable: PropTypes.bool,
isPopupCloseOnClick: PropTypes.bool,
isPopupOpen: PropTypes.bool,
isPopupOpenOnClick: PropTypes.bool,
isPopupOpenOnEnter: PropTypes.bool,
isPopupReady: PropTypes.bool,
isReadOnly: PropTypes.bool,
max: PropTypes.string,
maxErrorText: PropTypes.string,
min: PropTypes.string,
minErrorText: PropTypes.string,
needBorder: PropTypes.bool,
needDefaultTime: PropTypes.bool,
needErrorOnBlur: PropTypes.bool,
needResponsive: PropTypes.bool,
onFailValidation: PropTypes.func,
onKeyDown: PropTypes.func,
onPassValidation: PropTypes.func,
onSelect: PropTypes.func,
placeholder: PropTypes.string,
position: PropTypes.string,
removeClose: PropTypes.func,
textBoxSize: PropTypes.string,
textBoxVariant: PropTypes.string,
timeZone: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
togglePopup: PropTypes.func,
validation: PropTypes.shape({
validate: PropTypes.bool,
validateOn: PropTypes.string,
rulesOrder: PropTypes.arrayOf(PropTypes.string),
rules: PropTypes.object,
messages: PropTypes.object
}),
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
htmlId: PropTypes.string,
iconOnHover: PropTypes.bool,
is24Hour: PropTypes.bool,
isHideCurrentYear: PropTypes.bool,
onFocus: PropTypes.func,
onBlur: PropTypes.func,
boxSize: PropTypes.string,
onError: PropTypes.func,
isAbsolutePositioningNeeded: PropTypes.bool,
positionsOffset: PropTypes.array,
targetOffset: PropTypes.array,
isRestrictScroll: PropTypes.bool,
dropBoxPortalId: PropTypes.string,
a11y: PropTypes.object,
getPopupProps: PropTypes.func,
renderCustomHeader: PropTypes.node,
renderCustomFooter: PropTypes.node,
onDropboxClose: PropTypes.func,
customProps: PropTypes.object,
weekStartDay: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),
holidays: PropTypes.arrayOf(PropTypes.number)
};
export const YearView_propTypes = {
onSelectMonth: PropTypes.func,
onSelectYear: PropTypes.func,
viewedYear: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
viewedMonth: PropTypes.string,
monthNamesShort: PropTypes.array,
isMonthOpen: PropTypes.bool
};
export const DateTimePopupFooter_propTypes = {
submitText: PropTypes.string,
onSubmit: PropTypes.func,
cancelText: PropTypes.string,
onCancel: PropTypes.func,
dataId: PropTypes.string
};
export const DateTimePopupHeader_propTypes = {
onOpenYearView: PropTypes.func,
showMonthTxt: PropTypes.string,
isYearView: PropTypes.bool,
prevMonthTitleText: PropTypes.string,
nextMonthTitleText: PropTypes.string,
onModifyCalendar: PropTypes.func
};
export const DaysRow_propTypes = {
dayNames: PropTypes.array,
dayNamesShort: PropTypes.object,
holidays: PropTypes.arrayOf(PropTypes.number)
};
export const Time_propTypes = {
timeText: PropTypes.string,
dataId: PropTypes.string,
hourSuggestions: PropTypes.array,
onHourSelect: PropTypes.func,
hours: PropTypes.string,
hourEmptyText: PropTypes.string,
needResponsive: PropTypes.bool,
minSuggestions: PropTypes.array,
onMinutesSelect: PropTypes.func,
mins: PropTypes.string,
minuteEmptyText: PropTypes.string,
ampmSuggestions: PropTypes.array,
onAmPmSelect: PropTypes.func,
amPm: PropTypes.string,
is24Hour: PropTypes.bool,
customProps: PropTypes.object
};