@npm_leadtech/legal-lib-components 5.14.6 → 5.14.8
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/src/components/atoms/DatePickerCustom/DatePickerCustom.js +2 -22
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustom.tsx +0 -24
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustomProps.types.d.ts +0 -1
- package/dist/src/components/atoms/DatePickerCustom/DatePickerCustomProps.types.ts +0 -1
- package/dist/src/components/atoms/DatePickerCustom/index.js.map +4 -4
- package/dist/src/components/atoms/TagRatafiaItem/TagRatafiaItem.styled.js +2 -0
- package/dist/src/components/atoms/TagRatafiaItem/TagRatafiaItem.styled.ts +2 -0
- package/dist/src/components/molecules/TagsRatafiaList/TagsRatafiaList.styled.js +2 -1
- package/dist/src/components/molecules/TagsRatafiaList/TagsRatafiaList.styled.ts +2 -1
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.d.ts +4 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.js +11 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.styled.d.ts +1 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.styled.js +75 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.styled.ts +76 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSection.tsx +56 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSectionProps.types.d.ts +10 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSectionProps.types.js +1 -0
- package/dist/src/components/sections/LayoutRatafiaSection/LayoutRatafiaSectionProps.types.ts +11 -0
- package/dist/src/components/sections/LayoutRatafiaSection/index.d.ts +2 -0
- package/dist/src/components/sections/LayoutRatafiaSection/index.js +1 -0
- package/dist/src/components/sections/LayoutRatafiaSection/index.ts +2 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -5,8 +5,7 @@ import { de } from 'date-fns/locale';
|
|
|
5
5
|
import { DatePickerCustomStyled } from './DatePickerCustom.styled';
|
|
6
6
|
// import './DatepickerPlugin.scss'
|
|
7
7
|
registerLocale('de', de);
|
|
8
|
-
const DatePickerCustom = ({ class: className, dateFormat = 'MM/dd/yyyy', isStartDate = false, isValidGroup = false, label, locale = 'en', name, onChange, relatedDate,
|
|
9
|
-
const [event, setEvent] = useState();
|
|
8
|
+
const DatePickerCustom = ({ class: className, dateFormat = 'MM/dd/yyyy', isStartDate = false, isValidGroup = false, label, locale = 'en', name, onChange, relatedDate, tooltip, type, validate = false, value }) => {
|
|
10
9
|
const [date, setDate] = useState(() => {
|
|
11
10
|
return typeof value === 'string' && value !== '' ? new Date(value) : null;
|
|
12
11
|
});
|
|
@@ -58,26 +57,7 @@ const DatePickerCustom = ({ class: className, dateFormat = 'MM/dd/yyyy', isStart
|
|
|
58
57
|
monthName
|
|
59
58
|
};
|
|
60
59
|
});
|
|
61
|
-
|
|
62
|
-
if (isMobile) {
|
|
63
|
-
propsForMobileDevices = {
|
|
64
|
-
portalId: 'root-portal',
|
|
65
|
-
withPortal: true,
|
|
66
|
-
onFocus: (event) => {
|
|
67
|
-
setEvent(event);
|
|
68
|
-
event.target.blur();
|
|
69
|
-
},
|
|
70
|
-
onCalendarClose: () => {
|
|
71
|
-
if (event) {
|
|
72
|
-
const timmerID = setTimeout(() => {
|
|
73
|
-
event.target.blur();
|
|
74
|
-
clearTimeout(timmerID);
|
|
75
|
-
}, 1);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
return (_jsxs(DatePickerCustomStyled, { className: classStyle, "data-qa": name, children: [TooltipObject, _jsx(DatePicker, { ...propsForMobileDevices, locale: locale, dateFormat: dateFormat, renderCustomHeader: ({ date, changeYear, changeMonth, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled }) => (_jsxs("div", { style: {
|
|
60
|
+
return (_jsxs(DatePickerCustomStyled, { className: classStyle, "data-qa": name, children: [TooltipObject, _jsx(DatePicker, { locale: locale, dateFormat: dateFormat, renderCustomHeader: ({ date, changeYear, changeMonth, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled }) => (_jsxs("div", { style: {
|
|
81
61
|
margin: 10,
|
|
82
62
|
display: 'flex',
|
|
83
63
|
justifyContent: 'center'
|
|
@@ -18,13 +18,11 @@ const DatePickerCustom: FC<DatePickerCustomProps> = ({
|
|
|
18
18
|
name,
|
|
19
19
|
onChange,
|
|
20
20
|
relatedDate,
|
|
21
|
-
isMobile,
|
|
22
21
|
tooltip,
|
|
23
22
|
type,
|
|
24
23
|
validate = false,
|
|
25
24
|
value
|
|
26
25
|
}): React.JSX.Element => {
|
|
27
|
-
const [event, setEvent] = useState<React.ChangeEvent<HTMLInputElement>>()
|
|
28
26
|
const [date, setDate] = useState(() => {
|
|
29
27
|
return typeof value === 'string' && value !== '' ? new Date(value) : null
|
|
30
28
|
})
|
|
@@ -92,32 +90,10 @@ const DatePickerCustom: FC<DatePickerCustomProps> = ({
|
|
|
92
90
|
}
|
|
93
91
|
})
|
|
94
92
|
|
|
95
|
-
let propsForMobileDevices = {}
|
|
96
|
-
|
|
97
|
-
if (isMobile) {
|
|
98
|
-
propsForMobileDevices = {
|
|
99
|
-
portalId: 'root-portal',
|
|
100
|
-
withPortal: true,
|
|
101
|
-
onFocus: (event) => {
|
|
102
|
-
setEvent(event)
|
|
103
|
-
event.target.blur()
|
|
104
|
-
},
|
|
105
|
-
onCalendarClose: () => {
|
|
106
|
-
if (event) {
|
|
107
|
-
const timmerID = setTimeout(() => {
|
|
108
|
-
event.target.blur()
|
|
109
|
-
clearTimeout(timmerID)
|
|
110
|
-
}, 1)
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
93
|
return (
|
|
117
94
|
<DatePickerCustomStyled className={classStyle} data-qa={name}>
|
|
118
95
|
{TooltipObject}
|
|
119
96
|
<DatePicker
|
|
120
|
-
{...propsForMobileDevices}
|
|
121
97
|
locale={locale}
|
|
122
98
|
dateFormat={dateFormat}
|
|
123
99
|
renderCustomHeader={({
|