@mtes-mct/monitor-ui 2.3.2 → 2.4.0
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/CHANGELOG.md +7 -0
- package/README.md +30 -6
- package/index.js +1430 -1689
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/Label.d.ts +2 -0
- package/src/elements/Legend.d.ts +2 -1
- package/src/fields/DatePicker/CalendarPicker.d.ts +2 -2
- package/src/fields/DatePicker/index.d.ts +3 -1
- package/src/fields/DateRangePicker/DateInput.d.ts +6 -2
- package/src/fields/DateRangePicker/NumberInput.d.ts +2 -0
- package/src/fields/DateRangePicker/RangeCalendarPicker.d.ts +2 -1
- package/src/fields/DateRangePicker/TimeInput.d.ts +4 -0
- package/src/fields/DateRangePicker/index.d.ts +3 -1
- package/src/fields/DateRangePicker/types.d.ts +1 -1
- package/src/hooks/useForceUpdate.d.ts +3 -3
- package/src/icons/Target.d.ts +2 -0
- package/src/icons/Vms.d.ts +2 -0
- package/src/icons/index.d.ts +3 -1
- package/src/index.d.ts +2 -2
- package/src/utils/capitalizeFirstLetter.d.ts +0 -4
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled, { createGlobalStyle, ThemeProvider as ThemeProvider$1, css } from 'styled-components';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo, useRef, useState, useCallback, useEffect, useReducer, forwardRef, useImperativeHandle } from 'react';
|
|
4
|
-
import { Dropdown as Dropdown$1, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1,
|
|
4
|
+
import { Dropdown as Dropdown$1, AutoComplete as AutoComplete$1, Checkbox as Checkbox$1, DatePicker as DatePicker$1, DateRangePicker as DateRangePicker$1, TagPicker, Radio, Input, SelectPicker } from 'rsuite';
|
|
5
5
|
import { useField, useFormikContext } from 'formik';
|
|
6
6
|
|
|
7
7
|
var Accent;
|
|
@@ -1541,15 +1541,15 @@ const Field$2 = styled.div `
|
|
|
1541
1541
|
`;
|
|
1542
1542
|
|
|
1543
1543
|
const Label = styled.label `
|
|
1544
|
-
color: ${p => p.theme.color.slateGray};
|
|
1544
|
+
color: ${p => (p.isDisabled ? p.theme.color.lightGray : p.theme.color.slateGray)};
|
|
1545
1545
|
display: ${p => (p.isHidden ? 'none' : 'table')};
|
|
1546
1546
|
font-size: 13px;
|
|
1547
1547
|
line-height: 1.4;
|
|
1548
|
-
margin-bottom:
|
|
1548
|
+
margin-bottom: 4px;
|
|
1549
1549
|
`;
|
|
1550
1550
|
|
|
1551
|
-
function Legend({ isHidden = false, ...nativeProps }) {
|
|
1552
|
-
return jsx(StyledLabel, { as: "legend", isHidden: isHidden, ...nativeProps });
|
|
1551
|
+
function Legend({ isDisabled = false, isHidden = false, ...nativeProps }) {
|
|
1552
|
+
return jsx(StyledLabel, { as: "legend", isDisabled: isDisabled, isHidden: isHidden, ...nativeProps });
|
|
1553
1553
|
}
|
|
1554
1554
|
const StyledLabel = styled(Label) `
|
|
1555
1555
|
padding: 0;
|
|
@@ -2788,11 +2788,11 @@ var utc$1 = {exports: {}};
|
|
|
2788
2788
|
|
|
2789
2789
|
var utc = utc$1.exports;
|
|
2790
2790
|
|
|
2791
|
-
var fr
|
|
2791
|
+
var fr = {exports: {}};
|
|
2792
2792
|
|
|
2793
2793
|
(function (module, exports) {
|
|
2794
2794
|
!function(e,n){module.exports=n(requireDayjs_min());}(commonjsGlobal,(function(e){function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(e){return ""+e+(1===e?"er":"")}};return t.default.locale(i,null,!0),i}));
|
|
2795
|
-
} (fr
|
|
2795
|
+
} (fr));
|
|
2796
2796
|
|
|
2797
2797
|
dayjs_minExports.extend(timezone);
|
|
2798
2798
|
dayjs_minExports.extend(utc);
|
|
@@ -2828,1424 +2828,753 @@ function getUtcizedDayjs(localDate) {
|
|
|
2828
2828
|
return dayjs_minExports(definedLocalDate).subtract(timezoneOffsetInMinutes, 'minutes');
|
|
2829
2829
|
}
|
|
2830
2830
|
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
if (onClick) {
|
|
2838
|
-
onClick(event);
|
|
2839
|
-
}
|
|
2840
|
-
}, [onClick]);
|
|
2841
|
-
const handleFocus = useCallback((event) => {
|
|
2842
|
-
inputRef.current.select();
|
|
2843
|
-
if (onFocus) {
|
|
2844
|
-
onFocus(event);
|
|
2845
|
-
}
|
|
2846
|
-
}, [onFocus]);
|
|
2847
|
-
const handleInput = useCallback(() => {
|
|
2848
|
-
onFormatError(false);
|
|
2849
|
-
const { value } = inputRef.current;
|
|
2850
|
-
if (onInput) {
|
|
2851
|
-
onInput(value);
|
|
2852
|
-
}
|
|
2853
|
-
if (value.length !== size) {
|
|
2854
|
-
return;
|
|
2855
|
-
}
|
|
2856
|
-
const valueAsNumber = Number(inputRef.current.value);
|
|
2857
|
-
if (Number.isNaN(valueAsNumber) || valueAsNumber < min || valueAsNumber > max) {
|
|
2858
|
-
onFormatError(true);
|
|
2859
|
-
return;
|
|
2860
|
-
}
|
|
2861
|
-
if (onFilled && value.length === size) {
|
|
2862
|
-
onFilled();
|
|
2863
|
-
}
|
|
2864
|
-
}, [max, min, onFilled, onFormatError, onInput, size]);
|
|
2865
|
-
const handleKeyDown = useCallback((event) => {
|
|
2866
|
-
if (onPrevious &&
|
|
2867
|
-
event.key === 'ArrowLeft' &&
|
|
2868
|
-
inputRef.current.selectionStart === 0 &&
|
|
2869
|
-
// We don't want to call that function when the user is selecting the input text
|
|
2870
|
-
inputRef.current.selectionEnd === inputRef.current.selectionStart) {
|
|
2871
|
-
event.preventDefault();
|
|
2872
|
-
onPrevious();
|
|
2873
|
-
return;
|
|
2874
|
-
}
|
|
2875
|
-
if (onNext &&
|
|
2876
|
-
event.key === 'ArrowRight' &&
|
|
2877
|
-
inputRef.current.selectionStart === inputRef.current.value.length &&
|
|
2878
|
-
// We don't want to call that function when the user is selecting the input text
|
|
2879
|
-
inputRef.current.selectionEnd === inputRef.current.selectionStart) {
|
|
2880
|
-
event.preventDefault();
|
|
2881
|
-
onNext();
|
|
2882
|
-
return;
|
|
2883
|
-
}
|
|
2884
|
-
if (onBack && event.key === 'Backspace' && !inputRef.current.value.length) {
|
|
2885
|
-
event.preventDefault();
|
|
2886
|
-
onBack();
|
|
2887
|
-
}
|
|
2888
|
-
}, [onBack, onNext, onPrevious]);
|
|
2889
|
-
return (jsx(StyledNumberInput, { ref: inputRef, "$size": size, defaultValue: defaultValue, maxLength: size, onClick: handleClick, onFocus: handleFocus, onInput: handleInput, onKeyDown: handleKeyDown, pattern: "\\d*", placeholder: placeholder, type: "text", ...nativeProps }, String(defaultValue)));
|
|
2890
|
-
}
|
|
2891
|
-
const NumberInput$1 = forwardRef(NumberInputWithRef);
|
|
2892
|
-
const StyledNumberInput = styled.input `
|
|
2893
|
-
background-color: transparent;
|
|
2894
|
-
border: 0;
|
|
2895
|
-
font-size: inherit;
|
|
2896
|
-
outline: none;
|
|
2897
|
-
padding: 0;
|
|
2898
|
-
text-align: center;
|
|
2899
|
-
/* 1 digit = 8px */
|
|
2900
|
-
width: ${p => p.$size * 0.5}rem;
|
|
2831
|
+
/**
|
|
2832
|
+
* Internal component used to wrap SVG icon components
|
|
2833
|
+
*/
|
|
2834
|
+
const IconBox = styled.div `
|
|
2835
|
+
display: inline-block;
|
|
2836
|
+
color: ${p => p.$color ?? 'inherit'};
|
|
2901
2837
|
|
|
2902
|
-
|
|
2903
|
-
|
|
2838
|
+
> svg {
|
|
2839
|
+
display: block;
|
|
2840
|
+
height: ${p => p.$size ?? 20}px;
|
|
2841
|
+
width: ${p => p.$size ?? 20}px;
|
|
2904
2842
|
}
|
|
2905
2843
|
`;
|
|
2906
2844
|
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
return String(numberLike).padStart(2, '0');
|
|
2845
|
+
function ActivityFeed({ color, size, ...nativeProps }) {
|
|
2846
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(40 -41)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-22 44) rotate(90)", children: [jsx("rect", { height: "11", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "9", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-25 50) rotate(90)", children: [jsx("rect", { height: "8", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "6", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-23 56) rotate(90)", children: [jsx("rect", { height: "10", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "8", x: "1", y: "1" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-34,51a1.994,1.994,0,0,0-1-1.723V46.723A1.994,1.994,0,0,0-34,45a2,2,0,0,0-2-2,2,2,0,0,0-2,2,1.994,1.994,0,0,0,1,1.723v2.554A1.994,1.994,0,0,0-38,51a1.994,1.994,0,0,0,1,1.723v2.554A1.994,1.994,0,0,0-38,57a2,2,0,0,0,2,2,2,2,0,0,0,2-2,1.994,1.994,0,0,0-1-1.723V52.723A1.994,1.994,0,0,0-34,51Z", stroke: "none" }), jsx("path", { d: "M -36 43 C -34.89500045776367 43 -34 43.89500045776367 -34 45 C -34 45.73799896240234 -34.40499877929688 46.37599945068359 -35 46.72299957275391 L -35 49.27700042724609 C -34.40499877929688 49.62400054931641 -34 50.26200103759766 -34 51 C -34 51.73799896240234 -34.40499877929688 52.37599945068359 -35 52.72299957275391 L -35 55.27700042724609 C -34.40499877929688 55.62400054931641 -34 56.26200103759766 -34 57 C -34 58.10499954223633 -34.89500045776367 59 -36 59 C -37.10499954223633 59 -38 58.10499954223633 -38 57 C -38 56.26200103759766 -37.59500122070313 55.62400054931641 -37 55.27700042724609 L -37 52.72299957275391 C -37.59500122070313 52.37599945068359 -38 51.73799896240234 -38 51 C -38 50.26200103759766 -37.59500122070313 49.62400054931641 -37 49.27700042724609 L -37 46.72299957275391 C -37.59500122070313 46.37599945068359 -38 45.73799896240234 -38 45 C -38 43.89500045776367 -37.10499954223633 43 -36 43 Z", fill: "currentColor", stroke: "none" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-40 41)", width: "20" })] }) }) }));
|
|
2910
2847
|
}
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
const rawDateAsDayjs = dayjs_minExports()
|
|
2915
|
-
.year(Number(year))
|
|
2916
|
-
.month(Number(month) - 1)
|
|
2917
|
-
.date(Number(day))
|
|
2918
|
-
.hour(Number(hour))
|
|
2919
|
-
.minute(Number(minute));
|
|
2920
|
-
return isEnd
|
|
2921
|
-
? rawDateAsDayjs
|
|
2922
|
-
.endOf('minute')
|
|
2923
|
-
// TODO For some reason the API can't handle miliseconds in dates.
|
|
2924
|
-
// That's why we set it to 0 (instead of 999)
|
|
2925
|
-
.millisecond(0)
|
|
2926
|
-
.toDate()
|
|
2927
|
-
: rawDateAsDayjs.startOf('minute').toDate();
|
|
2848
|
+
|
|
2849
|
+
function Alert({ color, size, ...nativeProps }) {
|
|
2850
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-220 -208)", children: [jsx("path", { d: "M295,13V8a5,5,0,0,0-4-4.9V1h-2V3.1A5,5,0,0,0,285,8v5l-2,2v2h4.5a2.5,2.5,0,0,0,5,0H297V15Zm-5,5a1,1,0,0,1-1-1h2A1,1,0,0,1,290,18Zm1.486-3H285l2-2V8a3,3,0,0,1,6,0v5l2,2Z", fill: "currentColor", transform: "translate(-60 208)" }), jsx("rect", { fill: "none", height: "20", transform: "translate(220 208)", width: "20" })] }) }) }));
|
|
2928
2851
|
}
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
}
|
|
2933
|
-
return [
|
|
2934
|
-
String(date.getFullYear()),
|
|
2935
|
-
formatNumberAsDoubleDigit(date.getMonth() + 1),
|
|
2936
|
-
formatNumberAsDoubleDigit(date.getDate())
|
|
2937
|
-
];
|
|
2852
|
+
|
|
2853
|
+
function Anchor({ color, size, ...nativeProps }) {
|
|
2854
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("rect", { fill: "none", height: "20", width: "20" }), jsx("path", { d: "M14.6,12.7l1.395,1.4A7.258,7.258,0,0,1,11,17.128V10h3V8H11V6.816a3,3,0,1,0-2,0V8H6v2H9v7.087A7.2,7.2,0,0,1,4.2,14.1L5.6,12.7,2,10v2.7C2,16.192,6.428,19,10.1,19s8.1-2.808,8.1-6.3V10ZM10,3A1,1,0,1,1,9,4,1,1,0,0,1,10,3Z", fill: "currentColor" })] }) }));
|
|
2938
2855
|
}
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
* @example
|
|
2943
|
-
* ```
|
|
2944
|
-
* (minutesRange = 30) => ([
|
|
2945
|
-
* { label: '00:00', value: ['00', '00'] },
|
|
2946
|
-
* { label: '00:30', value: ['00', '30'] },
|
|
2947
|
-
* { label: '01:00', value: ['01', '00'] },
|
|
2948
|
-
* { label: '01:30', value: ['01', '30'] },
|
|
2949
|
-
* { label: '02:00', value: ['02', '00'] },
|
|
2950
|
-
* ...
|
|
2951
|
-
* ])
|
|
2952
|
-
* ```
|
|
2953
|
-
*/
|
|
2954
|
-
const getRangedTimeOptions = (minutesRange) => {
|
|
2955
|
-
const perHourOptionsLength = 60 / minutesRange;
|
|
2956
|
-
const totalOptionsLength = 24 * perHourOptionsLength;
|
|
2957
|
-
return new Array(totalOptionsLength).fill(undefined).map((_, index) => {
|
|
2958
|
-
const hour = Math.floor(index / perHourOptionsLength);
|
|
2959
|
-
const minute = minutesRange * (index % perHourOptionsLength);
|
|
2960
|
-
const label = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;
|
|
2961
|
-
const value = [formatNumberAsDoubleDigit(hour), formatNumberAsDoubleDigit(minute)];
|
|
2962
|
-
return {
|
|
2963
|
-
label,
|
|
2964
|
-
value
|
|
2965
|
-
};
|
|
2966
|
-
});
|
|
2967
|
-
};
|
|
2968
|
-
function getTimeTupleFromDate(date) {
|
|
2969
|
-
if (!date) {
|
|
2970
|
-
return undefined;
|
|
2971
|
-
}
|
|
2972
|
-
return [formatNumberAsDoubleDigit(date.getHours()), formatNumberAsDoubleDigit(date.getMinutes())];
|
|
2856
|
+
|
|
2857
|
+
function Archive({ color, size, ...nativeProps }) {
|
|
2858
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-120)", children: [jsx("path", { d: "M138,2H122V8h1V18h14V8h1ZM124,4h12V6H124Zm11,12H125V8h10Z", fill: "currentColor" }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(128 10)", children: [jsx("rect", { height: "2", stroke: "none", width: "4" }), jsx("rect", { fill: "none", width: "2", x: "1", y: "1" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(120)", width: "20" })] }) }) }));
|
|
2973
2859
|
}
|
|
2974
2860
|
|
|
2975
|
-
function
|
|
2976
|
-
|
|
2977
|
-
const dayInputRef = useRef();
|
|
2978
|
-
const monthInputRef = useRef();
|
|
2979
|
-
const yearInputRef = useRef();
|
|
2980
|
-
const [hasFormatError, setHasFormatError] = useState(false);
|
|
2981
|
-
const [hasValidationError, setHasValidationError] = useState(false);
|
|
2982
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
2983
|
-
useImperativeHandle(ref, () => ({
|
|
2984
|
-
boxSpan: boxSpanRef.current,
|
|
2985
|
-
focus: (isInLastInputOfTheGroup = false) => {
|
|
2986
|
-
if (isInLastInputOfTheGroup) {
|
|
2987
|
-
yearInputRef.current.focus();
|
|
2988
|
-
}
|
|
2989
|
-
else {
|
|
2990
|
-
dayInputRef.current.focus();
|
|
2991
|
-
}
|
|
2992
|
-
}
|
|
2993
|
-
}));
|
|
2994
|
-
const currentUtcYear = useMemo(() => getUtcizedDayjs().year(), []);
|
|
2995
|
-
const handleBlur = useCallback(() => {
|
|
2996
|
-
setIsFocused(false);
|
|
2997
|
-
}, []);
|
|
2998
|
-
const handleFocus = useCallback(() => {
|
|
2999
|
-
setIsFocused(true);
|
|
3000
|
-
}, []);
|
|
3001
|
-
const handleFormatError = useCallback((hasNextFormatError) => {
|
|
3002
|
-
setHasFormatError(hasNextFormatError);
|
|
3003
|
-
}, []);
|
|
3004
|
-
const submit = useCallback(() => {
|
|
3005
|
-
setHasValidationError(false);
|
|
3006
|
-
switch (window.document.activeElement) {
|
|
3007
|
-
case dayInputRef.current:
|
|
3008
|
-
monthInputRef.current.focus();
|
|
3009
|
-
break;
|
|
3010
|
-
case monthInputRef.current:
|
|
3011
|
-
yearInputRef.current.focus();
|
|
3012
|
-
break;
|
|
3013
|
-
}
|
|
3014
|
-
if (!yearInputRef.current.value.length ||
|
|
3015
|
-
!monthInputRef.current.value.length ||
|
|
3016
|
-
!dayInputRef.current.value.length) {
|
|
3017
|
-
if ((monthInputRef.current.value.length && !dayInputRef.current.value.length) ||
|
|
3018
|
-
(yearInputRef.current.value.length &&
|
|
3019
|
-
(!dayInputRef.current.value.length || !monthInputRef.current.value.length))) {
|
|
3020
|
-
setHasValidationError(true);
|
|
3021
|
-
}
|
|
3022
|
-
return;
|
|
3023
|
-
}
|
|
3024
|
-
const nextDateTuple = [
|
|
3025
|
-
String(yearInputRef.current.value),
|
|
3026
|
-
formatNumberAsDoubleDigit(monthInputRef.current.value),
|
|
3027
|
-
formatNumberAsDoubleDigit(dayInputRef.current.value)
|
|
3028
|
-
];
|
|
3029
|
-
onChange(nextDateTuple);
|
|
3030
|
-
}, [onChange]);
|
|
3031
|
-
return (jsxs(Box$6, { ref: boxSpanRef, "$hasError": hasFormatError || hasValidationError, "$isFocused": isForcedFocused || isFocused, "$isLight": isLight, children: [isStartDate && 'Du ', isEndDate && 'Au ', jsx(NumberInput$1, { ref: dayInputRef, "aria-label": `Jour${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: defaultValue && formatNumberAsDoubleDigit(defaultValue[2]), max: 31, min: 1, onBack: onBack, onBlur: handleBlur, onClick: onClick, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: () => monthInputRef.current.focus(), onPrevious: onPrevious, size: 2 }), "/", jsx(NumberInput$1, { ref: monthInputRef, "aria-label": `Mois${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: defaultValue && formatNumberAsDoubleDigit(defaultValue[1]), max: 12, min: 1, onBack: () => dayInputRef.current.focus(), onBlur: handleBlur, onClick: onClick, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: () => yearInputRef.current.focus(), onPrevious: () => dayInputRef.current.focus(), size: 2 }), "/", jsx(NumberInput$1, { ref: yearInputRef, "aria-label": `Année${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: defaultValue && defaultValue[0], max: currentUtcYear, min: 2020, onBack: () => monthInputRef.current.focus(), onBlur: handleBlur, onClick: onClick, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: onNext, onPrevious: () => monthInputRef.current.focus(), size: 4 })] }));
|
|
2861
|
+
function Attention({ color, size, ...nativeProps }) {
|
|
2862
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(200 -82)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-190,83a9,9,0,0,0-9,9,9,9,0,0,0,9,9,9,9,0,0,0,9-9A9,9,0,0,0-190,83Zm0,16a7,7,0,0,1-7-7,7,7,0,0,1,7-7,7,7,0,0,1,7,7A7,7,0,0,1-190,99Z", stroke: "none" }), jsx("path", { d: "M -190 83 C -185.0290069580078 83 -181 87.02899932861328 -181 92 C -181 96.97100067138672 -185.0290069580078 101 -190 101 C -194.9709930419922 101 -199 96.97100067138672 -199 92 C -199 87.02899932861328 -194.9709930419922 83 -190 83 Z M -190 99 C -186.1340026855469 99 -183 95.86599731445313 -183 92 C -183 88.13400268554688 -186.1340026855469 85 -190 85 C -193.8659973144531 85 -197 88.13400268554688 -197 92 C -197 95.86599731445313 -193.8659973144531 99 -190 99 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-189 93) rotate(180)", children: [jsx("rect", { height: "5", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "3", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-189 96) rotate(180)", children: [jsx("rect", { height: "2", stroke: "none", width: "2" }), jsx("rect", { fill: "none", x: "1", y: "1" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-200 82)", width: "20" })] }) }) }));
|
|
3032
2863
|
}
|
|
3033
|
-
const DateInput = forwardRef(DateInputWithRef);
|
|
3034
|
-
const Box$6 = styled.span `
|
|
3035
|
-
background-color: ${p => (p.$isLight ? p.theme.color.white : p.theme.color.gainsboro)};
|
|
3036
|
-
box-shadow: ${p => p.$hasError || p.$isFocused
|
|
3037
|
-
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100]}`
|
|
3038
|
-
: 'none'};
|
|
3039
|
-
color: ${p => p.theme.color.slateGray};
|
|
3040
|
-
display: inline-block;
|
|
3041
|
-
font-size: inherit;
|
|
3042
|
-
padding: 5px 8px 7px;
|
|
3043
|
-
user-select: none;
|
|
3044
2864
|
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
`;
|
|
2865
|
+
function Calendar({ color, size, ...nativeProps }) {
|
|
2866
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(280 -41)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-266,44V42h-2v2h-4V42h-2v2h-4V59h16V44Zm2,13h-12V50h12Zm0-9h-12V46h12Z", stroke: "none" }), jsx("path", { d: "M -274 42 L -272 42 L -272 44 L -268 44 L -268 42 L -266 42 L -266 44 L -262 44 L -262 59 L -278 59 L -278 44 L -274 44 L -274 42 Z M -264 48 L -264 46 L -276 46 L -276 48 L -264 48 Z M -264 57 L -264 50 L -276 50 L -276 57 L -264 57 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-274 52)", children: [jsx("rect", { height: "3", stroke: "none", width: "4" }), jsx("rect", { fill: "none", height: "1", width: "2", x: "1", y: "1" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-280 41)", width: "20" })] }) }) }));
|
|
2867
|
+
}
|
|
3049
2868
|
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
*/
|
|
3053
|
-
function capitalizeFirstLetter(text) {
|
|
3054
|
-
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
2869
|
+
function Check({ color, size, ...nativeProps }) {
|
|
2870
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(40 -82)", children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-23.99,86.7l-7.778,7.778-4.243-4.243-1.414,1.414,4.243,4.243,1.414,1.414,9.192-9.192Z", stroke: "none" }), jsx("path", { d: "M -23.98955917358398 86.69669342041016 L -22.57537841796875 88.11093139648438 L -31.76775932312012 97.30330657958984 L -37.42462158203125 91.64644622802734 L -36.01044082641602 90.23220825195313 L -31.76775932312012 94.47487640380859 L -23.98955917358398 86.69669342041016 Z", fill: "currentColor", stroke: "none" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-40 82)", width: "20" })] }) }) }));
|
|
3055
2871
|
}
|
|
3056
2872
|
|
|
3057
|
-
function
|
|
3058
|
-
return
|
|
2873
|
+
function Chevron({ color, size, ...nativeProps }) {
|
|
2874
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(0 -82)", children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M16.585,87.293,10,93.878,3.415,87.293,2,88.707l6.585,6.585L10,96.707l1.415-1.415L18,88.707Z", stroke: "none" }), jsx("path", { d: "M 3.414670944213867 87.29266357421875 L 10 93.87799072265625 L 16.58533096313477 87.29266357421875 L 18 88.70733642578125 L 10 96.70733642578125 L 2 88.70733642578125 L 3.414670944213867 87.29266357421875 Z", fill: "currentColor", stroke: "none" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(0 82)", width: "20" })] }) }) }));
|
|
3059
2875
|
}
|
|
3060
2876
|
|
|
3061
|
-
function
|
|
3062
|
-
return
|
|
3063
|
-
.map(date => date.toISOString())
|
|
3064
|
-
.sort()
|
|
3065
|
-
.map(dateAsIsoString => dayjs_minExports(dateAsIsoString).toDate());
|
|
2877
|
+
function Clock({ color, size, ...nativeProps }) {
|
|
2878
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(240 -41)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-230,42a9,9,0,0,0-9,9,9,9,0,0,0,9,9,9,9,0,0,0,9-9A9,9,0,0,0-230,42Zm0,16a7,7,0,0,1-7-7,7,7,0,0,1,7-7,7,7,0,0,1,7,7A7,7,0,0,1-230,58Z", stroke: "none" }), jsx("path", { d: "M -230 42 C -225.0290069580078 42 -221 46.02899932861328 -221 51 C -221 55.97100067138672 -225.0290069580078 60 -230 60 C -234.9709930419922 60 -239 55.97100067138672 -239 51 C -239 46.02899932861328 -234.9709930419922 42 -230 42 Z M -230 58 C -226.1340026855469 58 -223 54.86600112915039 -223 51 C -223 47.13399887084961 -226.1340026855469 44 -230 44 C -233.8659973144531 44 -237 47.13399887084961 -237 51 C -237 54.86600112915039 -233.8659973144531 58 -230 58 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-229,50V46h-2v6h6V50Z", stroke: "none" }), jsx("path", { d: "M -225 52 L -231 52 L -231 46 L -229 46 L -229 50 L -225 50 L -225 52 Z", fill: "currentColor", stroke: "none" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-240 41)", width: "20" })] }) }) }));
|
|
3066
2879
|
}
|
|
3067
2880
|
|
|
3068
|
-
function
|
|
3069
|
-
|
|
2881
|
+
function Close({ color, size, ...nativeProps }) {
|
|
2882
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(160 -82)", children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-142,85.415-143.415,84-150,90.585-156.585,84-158,85.415-151.415,92-158,98.585l1.415,1.415L-150,93.415l6.585,6.585L-142,98.585-148.585,92Z", stroke: "none" }), jsx("path", { d: "M -156.5853271484375 84 L -150 90.5853271484375 L -143.4146728515625 84 L -142 85.4146728515625 L -148.5853271484375 92 L -142 98.5853271484375 L -143.4146728515625 100 L -150 93.4146728515625 L -156.5853271484375 100 L -158 98.5853271484375 L -151.4146728515625 92 L -158 85.4146728515625 L -156.5853271484375 84 Z", fill: "currentColor", stroke: "none" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-160 82)", width: "20" })] }) }) }));
|
|
3070
2883
|
}
|
|
3071
2884
|
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
other: 'moins de {{count}} secondes'
|
|
3076
|
-
},
|
|
3077
|
-
xSeconds: {
|
|
3078
|
-
one: '1 seconde',
|
|
3079
|
-
other: '{{count}} secondes'
|
|
3080
|
-
},
|
|
3081
|
-
halfAMinute: '30 secondes',
|
|
3082
|
-
lessThanXMinutes: {
|
|
3083
|
-
one: 'moins d’une minute',
|
|
3084
|
-
other: 'moins de {{count}} minutes'
|
|
3085
|
-
},
|
|
3086
|
-
xMinutes: {
|
|
3087
|
-
one: '1 minute',
|
|
3088
|
-
other: '{{count}} minutes'
|
|
3089
|
-
},
|
|
3090
|
-
aboutXHours: {
|
|
3091
|
-
one: 'environ 1 heure',
|
|
3092
|
-
other: 'environ {{count}} heures'
|
|
3093
|
-
},
|
|
3094
|
-
xHours: {
|
|
3095
|
-
one: '1 heure',
|
|
3096
|
-
other: '{{count}} heures'
|
|
3097
|
-
},
|
|
3098
|
-
xDays: {
|
|
3099
|
-
one: '1 jour',
|
|
3100
|
-
other: '{{count}} jours'
|
|
3101
|
-
},
|
|
3102
|
-
aboutXWeeks: {
|
|
3103
|
-
one: 'environ 1 semaine',
|
|
3104
|
-
other: 'environ {{count}} semaines'
|
|
3105
|
-
},
|
|
3106
|
-
xWeeks: {
|
|
3107
|
-
one: '1 semaine',
|
|
3108
|
-
other: '{{count}} semaines'
|
|
3109
|
-
},
|
|
3110
|
-
aboutXMonths: {
|
|
3111
|
-
one: 'environ 1 mois',
|
|
3112
|
-
other: 'environ {{count}} mois'
|
|
3113
|
-
},
|
|
3114
|
-
xMonths: {
|
|
3115
|
-
one: '1 mois',
|
|
3116
|
-
other: '{{count}} mois'
|
|
3117
|
-
},
|
|
3118
|
-
aboutXYears: {
|
|
3119
|
-
one: 'environ 1 an',
|
|
3120
|
-
other: 'environ {{count}} ans'
|
|
3121
|
-
},
|
|
3122
|
-
xYears: {
|
|
3123
|
-
one: '1 an',
|
|
3124
|
-
other: '{{count}} ans'
|
|
3125
|
-
},
|
|
3126
|
-
overXYears: {
|
|
3127
|
-
one: 'plus d’un an',
|
|
3128
|
-
other: 'plus de {{count}} ans'
|
|
3129
|
-
},
|
|
3130
|
-
almostXYears: {
|
|
3131
|
-
one: 'presqu’un an',
|
|
3132
|
-
other: 'presque {{count}} ans'
|
|
3133
|
-
}
|
|
3134
|
-
};
|
|
2885
|
+
function Confirm({ color, size, ...nativeProps }) {
|
|
2886
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-40)", children: [jsx("path", { d: "M50,1a9,9,0,1,0,9,9A9,9,0,0,0,50,1Zm0,16a7,7,0,1,1,7-7A7,7,0,0,1,50,17Z", fill: "currentColor" }), jsx("path", { d: "M53.382,6.529l-4.243,4.243L47.018,8.65,45.6,10.064l2.121,2.121h0L49.139,13.6,54.8,7.943Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(40)", width: "20" })] }) }) }));
|
|
2887
|
+
}
|
|
3135
2888
|
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
2889
|
+
function Control({ color, size, ...nativeProps }) {
|
|
2890
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsxs("defs", { children: [jsx("clipPath", { children: jsx("use", {}) }), jsx("clipPath", { children: jsx("use", {}) }), jsx("clipPath", { children: jsx("use", {}) })] }), jsxs("g", { transform: "translate(120 -41)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-104 58) rotate(90)", children: [jsx("rect", { height: "12", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "10", x: "1", y: "1" })] }), jsx("path", { d: "M-107.694,47l1.333,8h-7.277l1.336-8Zm0-2h-4.6a2,2,0,0,0-1.977,1.675L-116,57h12l-1.721-10.325A2,2,0,0,0-107.7,45Z", fill: "currentColor" }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-110.75 41.75)", children: [jsx("rect", { height: "2.25", stroke: "none", width: "1.5" }), jsx("path", { clipPath: "url(#clip)", d: "M0,1h1.5M1,0v2.25M1.5,1.25h-1.5M0.5,2.25v-2.25", fill: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-104.061 43) rotate(45)", children: [jsx("rect", { height: "2.25", stroke: "none", width: "1.5" }), jsx("path", { clipPath: "url(#clip-2)", d: "M0,1h1.5M1,0v2.25M1.5,1.25h-1.5M0.5,2.25v-2.25", fill: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-117 44.061) rotate(-45)", children: [jsx("rect", { height: "2.25", stroke: "none", width: "1.5" }), jsx("path", { clipPath: "url(#clip-3)", d: "M0,1h1.5M1,0v2.25M1.5,1.25h-1.5M0.5,2.25v-2.25", fill: "none" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-120 41)", width: "20" })] })] }) }));
|
|
2891
|
+
}
|
|
3139
2892
|
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
result = form.one;
|
|
3144
|
-
} else {
|
|
3145
|
-
result = form.other.replace('{{count}}', String(count));
|
|
3146
|
-
}
|
|
2893
|
+
function Delete({ color, size, ...nativeProps }) {
|
|
2894
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-23.798 -14.096)", children: [jsxs("g", { children: [jsx("rect", { fill: "currentColor", height: "6", transform: "translate(31.548 22.096)", width: "1.5" }), jsx("rect", { fill: "currentColor", height: "6", transform: "translate(34.548 22.096)", width: "1.5" }), jsx("path", { d: "M41.8,17.6h-4V16.1h-8v1.5h-4v2h1.5V31.1a1,1,0,0,0,1,1h11a1,1,0,0,0,1-1V19.6h1.5ZM38.3,30.1h-9V19.6h9Z", fill: "currentColor" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(23.798 14.096)", width: "20" })] }) }) }));
|
|
2895
|
+
}
|
|
3147
2896
|
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
} else {
|
|
3152
|
-
return 'il y a ' + result;
|
|
3153
|
-
}
|
|
3154
|
-
}
|
|
2897
|
+
function Display({ color, size, ...nativeProps }) {
|
|
2898
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(0 -40)", children: [jsxs("g", { children: [jsx("path", { d: "M10,44a9.674,9.674,0,0,0-9,6,9.674,9.674,0,0,0,9,6,9.674,9.674,0,0,0,9-6A9.674,9.674,0,0,0,10,44Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,10,54Z", fill: "currentColor" }), jsx("circle", { cx: "2.25", cy: "2.25", fill: "currentColor", r: "2.25", transform: "translate(7.75 47.75)" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(0 40)", width: "20" })] }) }) }));
|
|
2899
|
+
}
|
|
3155
2900
|
|
|
3156
|
-
|
|
3157
|
-
};
|
|
2901
|
+
function DoubleChevron({ color, size, ...nativeProps }) {
|
|
2902
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M16.585,3.085,10,9.671,3.415,3.085,2,4.5l6.585,6.585L10,12.5l1.415-1.415L18,4.5Z", stroke: "none" }), jsx("path", { d: "M 3.414670944213867 3.085323333740234 L 10 9.670653343200684 L 16.58533096313477 3.085323333740234 L 18 4.500003814697266 L 10 12.50000381469727 L 2 4.500003814697266 L 3.414670944213867 3.085323333740234 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M16.585,8.085,10,14.671,3.415,8.085,2,9.5l6.585,6.585L10,17.5l1.415-1.415L18,9.5Z", stroke: "none" }), jsx("path", { d: "M 3.414670944213867 8.085323333740234 L 10 14.67065334320068 L 16.58533096313477 8.085323333740234 L 18 9.500003814697266 L 10 17.50000381469727 L 2 9.500003814697266 L 3.414670944213867 8.085323333740234 Z", fill: "currentColor", stroke: "none" })] })] }), jsx("rect", { fill: "none", height: "20", width: "20" })] }) }));
|
|
2903
|
+
}
|
|
3158
2904
|
|
|
3159
|
-
function
|
|
3160
|
-
|
|
3161
|
-
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3162
|
-
// TODO: Remove String()
|
|
3163
|
-
var width = options.width ? String(options.width) : args.defaultWidth;
|
|
3164
|
-
var format = args.formats[width] || args.formats[args.defaultWidth];
|
|
3165
|
-
return format;
|
|
3166
|
-
};
|
|
2905
|
+
function Download({ color, size, ...nativeProps }) {
|
|
2906
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-80)", children: [jsxs("g", { children: [jsx("rect", { fill: "currentColor", height: "2", transform: "translate(84 16)", width: "12" }), jsx("path", { d: "M93,9V2H87V9H84l6,6,6-6Z", fill: "currentColor" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(80)", width: "20" })] }) }) }));
|
|
3167
2907
|
}
|
|
3168
2908
|
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
medium: 'd MMM y',
|
|
3173
|
-
short: 'dd/MM/y'
|
|
3174
|
-
};
|
|
3175
|
-
var timeFormats = {
|
|
3176
|
-
full: 'HH:mm:ss zzzz',
|
|
3177
|
-
long: 'HH:mm:ss z',
|
|
3178
|
-
medium: 'HH:mm:ss',
|
|
3179
|
-
short: 'HH:mm'
|
|
3180
|
-
};
|
|
3181
|
-
var dateTimeFormats = {
|
|
3182
|
-
full: "{{date}} 'à' {{time}}",
|
|
3183
|
-
long: "{{date}} 'à' {{time}}",
|
|
3184
|
-
medium: '{{date}}, {{time}}',
|
|
3185
|
-
short: '{{date}}, {{time}}'
|
|
3186
|
-
};
|
|
3187
|
-
var formatLong = {
|
|
3188
|
-
date: buildFormatLongFn({
|
|
3189
|
-
formats: dateFormats,
|
|
3190
|
-
defaultWidth: 'full'
|
|
3191
|
-
}),
|
|
3192
|
-
time: buildFormatLongFn({
|
|
3193
|
-
formats: timeFormats,
|
|
3194
|
-
defaultWidth: 'full'
|
|
3195
|
-
}),
|
|
3196
|
-
dateTime: buildFormatLongFn({
|
|
3197
|
-
formats: dateTimeFormats,
|
|
3198
|
-
defaultWidth: 'full'
|
|
3199
|
-
})
|
|
3200
|
-
};
|
|
2909
|
+
function Drapeau({ color, size, ...nativeProps }) {
|
|
2910
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("rect", { fill: "#000091", height: "12", transform: "translate(1 4)", width: "6" }), jsx("rect", { fill: "#e1000f", height: "12", transform: "translate(13 4)", width: "6" }), jsx("rect", { fill: "#fff", height: "12", transform: "translate(7 4)", width: "6" }), jsx("rect", { fill: "none", height: "20", width: "20" }), jsx("path", { d: "M19,4V16H1V4H19m1-1H0V17H20V3Z", fill: "#e5e5eb" })] }) }));
|
|
2911
|
+
}
|
|
3201
2912
|
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
today: "'aujourd’hui à' p",
|
|
3206
|
-
tomorrow: "'demain à' p'",
|
|
3207
|
-
nextWeek: "eeee 'prochain à' p",
|
|
3208
|
-
other: 'P'
|
|
3209
|
-
};
|
|
2913
|
+
function Duplicate({ color, size, ...nativeProps }) {
|
|
2914
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M6,2V5H3V18H14V15h3V2Zm6,14H5V7h7Zm3-3H14V5H8V4h7Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", width: "20" })] }) }));
|
|
2915
|
+
}
|
|
3210
2916
|
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
}
|
|
2917
|
+
function Edit({ color, size, ...nativeProps }) {
|
|
2918
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-80)", children: [jsx("path", { d: "M86,11.5V14h2.5l7.372-7.372-2.5-2.5ZM97.805,4.7a.664.664,0,0,0,0-.94l-1.56-1.56a.664.664,0,0,0-.94,0l-1.219,1.22,2.5,2.5Z", fill: "currentColor" }), jsx("path", { d: "M95,9v7H84V5h7V3H82V18H97V9Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(80)", width: "20" })] }) }) }));
|
|
2919
|
+
}
|
|
3214
2920
|
|
|
3215
|
-
function
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
var valuesArray;
|
|
2921
|
+
function EditBis({ color, size, ...nativeProps }) {
|
|
2922
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-80)", children: [jsx("path", { d: "M86,11.5V14h2.5l7.372-7.372-2.5-2.5ZM97.805,4.7a.664.664,0,0,0,0-.94l-1.56-1.56a.664.664,0,0,0-.94,0l-1.219,1.22,2.5,2.5Z", fill: "currentColor" }), jsx("path", { d: "M95,9v7H84V5h7V3H82V18H97V9Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(80)", width: "20" })] }) }) }));
|
|
2923
|
+
}
|
|
3219
2924
|
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
3224
|
-
} else {
|
|
3225
|
-
var _defaultWidth = args.defaultWidth;
|
|
2925
|
+
function Favorite({ color, size, ...nativeProps }) {
|
|
2926
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-300 -208)", children: [jsx("path", { d: "M370,5.015l1.763,3.568,3.936.571-2.848,2.773.673,3.919L370,13.995l-3.524,1.851.673-3.919L364.3,9.154l3.936-.571L370,5.015M370,.5l-3.09,6.254-6.91,1,5,4.869L363.82,19.5,370,16.254l6.18,3.246L375,12.626l5-4.869-6.91-1L370,.5Z", fill: "currentColor", transform: "translate(-60 208)" }), jsx("rect", { fill: "none", height: "20", transform: "translate(300 208)", width: "20" })] }) }) }));
|
|
2927
|
+
}
|
|
3226
2928
|
|
|
3227
|
-
|
|
2929
|
+
function FilledArrow({ color, size, ...nativeProps }) {
|
|
2930
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(320 -41)", children: [jsx("path", { d: "M-313,43V59l8-8Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-320 41)", width: "20" })] }) }) }));
|
|
2931
|
+
}
|
|
3228
2932
|
|
|
3229
|
-
|
|
3230
|
-
}
|
|
2933
|
+
function Filter({ color, size, ...nativeProps }) {
|
|
2934
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-930 -294)", children: [jsx("path", { d: "M2,2V4l5,7.592V18h6V11.592L18,4h0V2Zm9,9v5H9V11H9L4.394,4H15.606Z", fill: "currentColor", transform: "translate(930 294)" }), jsx("rect", { fill: "none", height: "20", transform: "translate(930 294)", width: "20" })] }) }) }));
|
|
2935
|
+
}
|
|
3231
2936
|
|
|
3232
|
-
|
|
2937
|
+
function FilterBis({ color, size, ...nativeProps }) {
|
|
2938
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("g", { children: jsx("rect", { fill: "none", height: "20", width: "20" }) }), jsxs("g", { children: [jsx("path", { d: "M18,3.5H8.789a2.5,2.5,0,0,0-4.578,0H2v2H4.211a2.5,2.5,0,0,0,4.578,0H18ZM6.5,5.5a1,1,0,1,1,1-1A1,1,0,0,1,6.5,5.5Z", fill: "currentColor" }), jsx("path", { d: "M18,9H15.789a2.5,2.5,0,0,0-4.578,0H2v2h9.211a2.5,2.5,0,0,0,4.578,0H18Zm-4.5,2a1,1,0,1,1,1-1A1,1,0,0,1,13.5,11Z", fill: "currentColor" }), jsx("path", { d: "M18,14.5H8.789a2.5,2.5,0,0,0-4.578,0H2v2H4.211a2.5,2.5,0,0,0,4.578,0H18Zm-11.5,2a1,1,0,1,1,1-1A1,1,0,0,1,6.5,16.5Z", fill: "currentColor" })] })] }) }));
|
|
2939
|
+
}
|
|
3233
2940
|
|
|
3234
|
-
|
|
3235
|
-
|
|
2941
|
+
function Fishery({ color, size, ...nativeProps }) {
|
|
2942
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(80 -41)", children: [jsx("g", { children: jsx("circle", { cx: "1.5", cy: "1.5", fill: "currentColor", r: "1.5", transform: "translate(-67 49.5)" }) }), jsx("path", { d: "M-70.092,59a1.713,1.713,0,0,1-.533-.07c-.865-.292-.854-1.258-.846-1.964,0-.141,0-.344,0-.494a18.923,18.923,0,0,1-3.218-2.157l-2.7,2.621a1.682,1.682,0,0,1-2.146-.378,2.072,2.072,0,0,1-.34-2.007l1.225-3.545-1.228-3.555a2.06,2.06,0,0,1,.338-1.99,1.68,1.68,0,0,1,2.152-.384l.174.134L-74.69,47.7a19,19,0,0,1,3.214-2.171c.008-.149.006-.352,0-.492-.008-.706-.019-1.673.844-1.965,1.093-.37,4.183.766,5.6,1.454l.091.045c2.717,1.3,4.323,3.052,4.771,5.193A4.455,4.455,0,0,1-60,51h0a4.7,4.7,0,0,1-.184,1.3c-.433,2.078-2.039,3.825-4.757,5.129l-.09.045A14.905,14.905,0,0,1-70.092,59Zm-4.626-6.671a1.261,1.261,0,0,1,.885.359,17.173,17.173,0,0,0,3.482,2.355c.714.425.7,1.231.7,1.941,0,.064,0,.141,0,.22a16.9,16.9,0,0,0,3.812-1.322l.1-.048c.815-.392,3.295-1.583,3.792-3.953a3.177,3.177,0,0,0,.131-.88,2.962,2.962,0,0,0-.115-.816c-.513-2.434-2.993-3.625-3.808-4.016l-.1-.049a16.147,16.147,0,0,0-3.814-1.305c0,.073,0,.144,0,.2.007.713.016,1.521-.649,1.914a17.441,17.441,0,0,0-3.559,2.416,1.19,1.19,0,0,1-.8.335,1.264,1.264,0,0,1-.9-.32l-2.616-2.577a.3.3,0,0,0,.018.084l1.429,4.136-1.425,4.126a.34.34,0,0,0-.021.092l2.573-2.537A1.271,1.271,0,0,1-74.718,52.329Zm-.339-4.316a.543.543,0,0,0-.081.072Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-80 41)", width: "20" })] }) }) }));
|
|
3236
2943
|
}
|
|
3237
2944
|
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
wide: ['avant Jésus-Christ', 'après Jésus-Christ']
|
|
3242
|
-
};
|
|
3243
|
-
var quarterValues = {
|
|
3244
|
-
narrow: ['T1', 'T2', 'T3', 'T4'],
|
|
3245
|
-
abbreviated: ['1er trim.', '2ème trim.', '3ème trim.', '4ème trim.'],
|
|
3246
|
-
wide: ['1er trimestre', '2ème trimestre', '3ème trimestre', '4ème trimestre']
|
|
3247
|
-
};
|
|
3248
|
-
var monthValues = {
|
|
3249
|
-
narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
|
|
3250
|
-
abbreviated: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
|
|
3251
|
-
wide: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre']
|
|
3252
|
-
};
|
|
3253
|
-
var dayValues = {
|
|
3254
|
-
narrow: ['D', 'L', 'M', 'M', 'J', 'V', 'S'],
|
|
3255
|
-
short: ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'],
|
|
3256
|
-
abbreviated: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
|
|
3257
|
-
wide: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi']
|
|
3258
|
-
};
|
|
3259
|
-
var dayPeriodValues = {
|
|
3260
|
-
narrow: {
|
|
3261
|
-
am: 'AM',
|
|
3262
|
-
pm: 'PM',
|
|
3263
|
-
midnight: 'minuit',
|
|
3264
|
-
noon: 'midi',
|
|
3265
|
-
morning: 'mat.',
|
|
3266
|
-
afternoon: 'ap.m.',
|
|
3267
|
-
evening: 'soir',
|
|
3268
|
-
night: 'mat.'
|
|
3269
|
-
},
|
|
3270
|
-
abbreviated: {
|
|
3271
|
-
am: 'AM',
|
|
3272
|
-
pm: 'PM',
|
|
3273
|
-
midnight: 'minuit',
|
|
3274
|
-
noon: 'midi',
|
|
3275
|
-
morning: 'matin',
|
|
3276
|
-
afternoon: 'après-midi',
|
|
3277
|
-
evening: 'soir',
|
|
3278
|
-
night: 'matin'
|
|
3279
|
-
},
|
|
3280
|
-
wide: {
|
|
3281
|
-
am: 'AM',
|
|
3282
|
-
pm: 'PM',
|
|
3283
|
-
midnight: 'minuit',
|
|
3284
|
-
noon: 'midi',
|
|
3285
|
-
morning: 'du matin',
|
|
3286
|
-
afternoon: 'de l’après-midi',
|
|
3287
|
-
evening: 'du soir',
|
|
3288
|
-
night: 'du matin'
|
|
3289
|
-
}
|
|
3290
|
-
};
|
|
2945
|
+
function FishingEngine({ color, size, ...nativeProps }) {
|
|
2946
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(0 -41)", children: [jsx("path", { d: "M11,53h2v1a3,3,0,0,1-6,0V47.789a2.5,2.5,0,1,0-2,0V54a5,5,0,0,0,10,0V48ZM6,46.5a1,1,0,1,1,1-1A1,1,0,0,1,6,46.5Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(0 41)", width: "20" })] }) }) }));
|
|
2947
|
+
}
|
|
3291
2948
|
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
if (number === 0) return '0';
|
|
3296
|
-
var feminineUnits = ['year', 'week', 'hour', 'minute', 'second'];
|
|
3297
|
-
var suffix;
|
|
2949
|
+
function FleetSegment({ color, size, ...nativeProps }) {
|
|
2950
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(280 -82)", children: [jsx("path", { d: "M-262,92l-2-.5V88a2,2,0,0,0-2-2h-2V84h-4v2h-2a2,2,0,0,0-2,2v3.5l-2,.5,1.5,6H-278v2h1.6a5.963,5.963,0,0,0,3.2-.99,5.776,5.776,0,0,0,6.4,0,5.879,5.879,0,0,0,3.2.99h1.6V98h-1.5Zm-12-4h8v3l-4-1-4,1Zm.8,8.68a5.751,5.751,0,0,1-1.35.875l-1.025-4.1L-270,92.062l5.575,1.393-1.025,4.1a5.751,5.751,0,0,1-1.35-.875A4.633,4.633,0,0,1-273.2,96.68Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-280 82)", width: "20" })] }) }) }));
|
|
2951
|
+
}
|
|
3298
2952
|
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
suffix = 'ème';
|
|
3303
|
-
}
|
|
2953
|
+
function Focus({ color, size, ...nativeProps }) {
|
|
2954
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(320 -82)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-319,83v7h2V85h5V83Z", stroke: "none" }), jsx("path", { d: "M -319 83 L -312 83 L -312 85 L -317 85 L -317 90 L -319 90 L -319 83 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-317,94h-2v7h7V99h-5Z", stroke: "none" }), jsx("path", { d: "M -319 94 L -317 94 L -317 99 L -312 99 L -312 101 L -319 101 L -319 94 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-308,83v2h5v5h2V83Z", stroke: "none" }), jsx("path", { d: "M -308 83 L -301 83 L -301 90 L -303 90 L -303 85 L -308 85 L -308 83 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-303,99h-5v2h7V94h-2Z", stroke: "none" }), jsx("path", { d: "M -301 101 L -308 101 L -308 99 L -303 99 L -303 94 L -301 94 L -301 101 Z", fill: "currentColor", stroke: "none" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-320 82)", width: "20" })] }) }) }));
|
|
2955
|
+
}
|
|
3304
2956
|
|
|
3305
|
-
|
|
3306
|
-
};
|
|
2957
|
+
function FocusVessel({ color, size, ...nativeProps }) {
|
|
2958
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M8.666,14.994a.138.138,0,0,1-.054-.034.142.142,0,0,1-.04-.081l-.4-3.05-3.05-.4a.139.139,0,0,1-.114-.094.137.137,0,0,1,.033-.144L9.3,6.934A.139.139,0,0,1,9.351,6.9l5.463-1.893a.14.14,0,0,1,.178.178L13.1,10.649a.139.139,0,0,1-.033.053L8.809,14.959a.141.141,0,0,1-.1.041A.161.161,0,0,1,8.666,14.994Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", width: "20" }), jsxs("g", { children: [jsx("path", { d: "M1,1V6H3V3H6V1Z", fill: "currentColor" }), jsx("path", { d: "M14,1V3h3V6h2V1Z", fill: "currentColor" }), jsx("path", { d: "M17,17H14v2h5V14H17Z", fill: "currentColor" }), jsx("path", { d: "M3,14H1v5H6V17H3Z", fill: "currentColor" })] })] }) }));
|
|
2959
|
+
}
|
|
3307
2960
|
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
values: eraValues,
|
|
3312
|
-
defaultWidth: 'wide'
|
|
3313
|
-
}),
|
|
3314
|
-
quarter: buildLocalizeFn({
|
|
3315
|
-
values: quarterValues,
|
|
3316
|
-
defaultWidth: 'wide',
|
|
3317
|
-
argumentCallback: function argumentCallback(quarter) {
|
|
3318
|
-
return quarter - 1;
|
|
3319
|
-
}
|
|
3320
|
-
}),
|
|
3321
|
-
month: buildLocalizeFn({
|
|
3322
|
-
values: monthValues,
|
|
3323
|
-
defaultWidth: 'wide'
|
|
3324
|
-
}),
|
|
3325
|
-
day: buildLocalizeFn({
|
|
3326
|
-
values: dayValues,
|
|
3327
|
-
defaultWidth: 'wide'
|
|
3328
|
-
}),
|
|
3329
|
-
dayPeriod: buildLocalizeFn({
|
|
3330
|
-
values: dayPeriodValues,
|
|
3331
|
-
defaultWidth: 'wide'
|
|
3332
|
-
})
|
|
3333
|
-
};
|
|
2961
|
+
function FocusZones({ color, size, ...nativeProps }) {
|
|
2962
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsxs("g", { children: [jsx("path", { d: "M10,5.333A7.524,7.524,0,0,0,3,10a7.583,7.583,0,0,0,14,0A7.524,7.524,0,0,0,10,5.333Zm0,7.778A3.111,3.111,0,1,1,13.111,10,3.111,3.111,0,0,1,10,13.111Z", fill: "currentColor" }), jsx("circle", { cx: "1.75", cy: "1.75", fill: "currentColor", r: "1.75", transform: "translate(8.25 8.25)" })] }), jsx("rect", { fill: "none", height: "20", width: "20" }), jsxs("g", { children: [jsx("path", { d: "M1,1V6H3V3H6V1Z", fill: "currentColor" }), jsx("path", { d: "M14,1V3h3V6h2V1Z", fill: "currentColor" }), jsx("path", { d: "M17,17H14v2h5V14H17Z", fill: "currentColor" }), jsx("path", { d: "M3,14H1v5H6V17H3Z", fill: "currentColor" })] })] }) }));
|
|
2963
|
+
}
|
|
3334
2964
|
|
|
3335
|
-
function
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
var width = options.width;
|
|
3339
|
-
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
3340
|
-
var matchResult = string.match(matchPattern);
|
|
2965
|
+
function Hide({ color, size, ...nativeProps }) {
|
|
2966
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M15.635,5.779l2.143-2.143L16.364,2.222l-2.55,2.55A9.786,9.786,0,0,0,10,4a9.674,9.674,0,0,0-9,6,9.532,9.532,0,0,0,3.365,4.22L2.222,16.364l1.414,1.414,2.55-2.55A9.786,9.786,0,0,0,10,16a9.674,9.674,0,0,0,9-6A9.541,9.541,0,0,0,15.635,5.779ZM6,10a4,4,0,0,1,4-4,3.96,3.96,0,0,1,2.02.566L10.71,7.875A2.225,2.225,0,0,0,10,7.75,2.25,2.25,0,0,0,7.75,10a2.225,2.225,0,0,0,.125.71L6.566,12.02A3.96,3.96,0,0,1,6,10Zm4,4a3.96,3.96,0,0,1-2.02-.566l1.31-1.309a2.225,2.225,0,0,0,.71.125A2.25,2.25,0,0,0,12.25,10a2.225,2.225,0,0,0-.125-.71l1.309-1.31A3.96,3.96,0,0,1,14,10,4,4,0,0,1,10,14Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", width: "20" })] }) }));
|
|
2967
|
+
}
|
|
3341
2968
|
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
2969
|
+
function Info({ color, size, ...nativeProps }) {
|
|
2970
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(240 -82)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-230,83a9,9,0,0,0-9,9,9,9,0,0,0,9,9,9,9,0,0,0,9-9A9,9,0,0,0-230,83Zm0,16a7,7,0,0,1-7-7,7,7,0,0,1,7-7,7,7,0,0,1,7,7A7,7,0,0,1-230,99Z", stroke: "none" }), jsx("path", { d: "M -230 83 C -225.0290069580078 83 -221 87.02899932861328 -221 92 C -221 96.97100067138672 -225.0290069580078 101 -230 101 C -234.9709930419922 101 -239 96.97100067138672 -239 92 C -239 87.02899932861328 -234.9709930419922 83 -230 83 Z M -230 99 C -226.1340026855469 99 -223 95.86599731445313 -223 92 C -223 88.13400268554688 -226.1340026855469 85 -230 85 C -233.8659973144531 85 -237 88.13400268554688 -237 92 C -237 95.86599731445313 -233.8659973144531 99 -230 99 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-231 91)", children: [jsx("rect", { height: "5", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "3", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-231 88)", children: [jsx("rect", { height: "2", stroke: "none", width: "2" }), jsx("rect", { fill: "none", x: "1", y: "1" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-240 82)", width: "20" })] }) }) }));
|
|
2971
|
+
}
|
|
3345
2972
|
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {
|
|
3349
|
-
return pattern.test(matchedString);
|
|
3350
|
-
}) : findKey(parsePatterns, function (pattern) {
|
|
3351
|
-
return pattern.test(matchedString);
|
|
3352
|
-
});
|
|
3353
|
-
var value;
|
|
3354
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
3355
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
3356
|
-
var rest = string.slice(matchedString.length);
|
|
3357
|
-
return {
|
|
3358
|
-
value: value,
|
|
3359
|
-
rest: rest
|
|
3360
|
-
};
|
|
3361
|
-
};
|
|
2973
|
+
function Infringement({ color, size, ...nativeProps }) {
|
|
2974
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(40 -41)", children: [jsx("path", { d: "M-30,42a9,9,0,0,0-9,9,9,9,0,0,0,9,9,9,9,0,0,0,9-9A9,9,0,0,0-30,42Zm7,9a6.962,6.962,0,0,1-1.4,4.186L-34.186,45.4A6.962,6.962,0,0,1-30,44,7,7,0,0,1-23,51Zm-14,0a6.962,6.962,0,0,1,1.4-4.186l9.787,9.787A6.962,6.962,0,0,1-30,58,7,7,0,0,1-37,51Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-40 41)", width: "20" })] }) }) }));
|
|
3362
2975
|
}
|
|
3363
2976
|
|
|
3364
|
-
function
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
return key;
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
2977
|
+
function Landmark({ color, size, ...nativeProps }) {
|
|
2978
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(120 -82)", children: [jsx("rect", { fill: "currentColor", height: "15", transform: "translate(-114 99) rotate(180)", width: "2" }), jsx("path", { d: "M-113,84V94l12-5Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-120 82)", width: "20" })] }) }) }));
|
|
2979
|
+
}
|
|
3370
2980
|
|
|
3371
|
-
|
|
2981
|
+
function List({ color, size, ...nativeProps }) {
|
|
2982
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(160 -41)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-142 45) rotate(90)", children: [jsx("rect", { height: "12", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "10", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-142 50) rotate(90)", children: [jsx("rect", { height: "12", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "10", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-142 55) rotate(90)", children: [jsx("rect", { height: "12", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "10", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-158 44.5)", children: [jsx("circle", { cx: "1.5", cy: "1.5", r: "1.5", stroke: "none" }), jsx("circle", { cx: "1.5", cy: "1.5", fill: "none", r: "0.5" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-158 49.5)", children: [jsx("circle", { cx: "1.5", cy: "1.5", r: "1.5", stroke: "none" }), jsx("circle", { cx: "1.5", cy: "1.5", fill: "none", r: "0.5" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-158 54.5)", children: [jsx("circle", { cx: "1.5", cy: "1.5", r: "1.5", stroke: "none" }), jsx("circle", { cx: "1.5", cy: "1.5", fill: "none", r: "0.5" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-160 41)", width: "20" })] }) }) }));
|
|
3372
2983
|
}
|
|
3373
2984
|
|
|
3374
|
-
function
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
return key;
|
|
3378
|
-
}
|
|
3379
|
-
}
|
|
2985
|
+
function MapLayers({ color, size, ...nativeProps }) {
|
|
2986
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("rect", { fill: "none", height: "20", width: "20" }), jsxs("g", { children: [jsx("path", { d: "M10,2.332,16.113,6,10,9.668,3.887,6,10,2.332M10,0,0,6l10,6L20,6,10,0Z", fill: "currentColor" }), jsx("path", { d: "M1.913,8.815,0,10l10,6,10-6L18.056,8.834,10,13.668Z", fill: "currentColor" }), jsx("path", { d: "M1.913,12.815,0,14l10,6,10-6-1.944-1.166L10,17.668Z", fill: "currentColor" })] })] }) }));
|
|
2987
|
+
}
|
|
3380
2988
|
|
|
3381
|
-
|
|
2989
|
+
function MeasureAngle({ color, size, ...nativeProps }) {
|
|
2990
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(200 -82)", children: [jsxs("g", { children: [jsx("path", { d: "M-183.361,98a14.79,14.79,0,0,0-.559-2.434l-1.9.618A12.726,12.726,0,0,1-185.394,98H-196V87.514a12.554,12.554,0,0,1,2.139.507l.649-1.893A14.771,14.771,0,0,0-196,85.471V84h-2v16h16V98Z", fill: "currentColor" }), jsx("path", { d: "M-186.509,94.491l1.795-.883a14.792,14.792,0,0,0-2.029-3.081l-1.52,1.3A12.726,12.726,0,0,1-186.509,94.491Z", fill: "currentColor" }), jsx("path", { d: "M-188.223,89.024a14.915,14.915,0,0,0-3.048-2.073l-.911,1.781a12.857,12.857,0,0,1,2.638,1.794Z", fill: "currentColor" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-200 82)", width: "20" })] }) }) }));
|
|
3382
2991
|
}
|
|
3383
2992
|
|
|
3384
|
-
function
|
|
3385
|
-
|
|
3386
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3387
|
-
var matchResult = string.match(args.matchPattern);
|
|
3388
|
-
if (!matchResult) return null;
|
|
3389
|
-
var matchedString = matchResult[0];
|
|
3390
|
-
var parseResult = string.match(args.parsePattern);
|
|
3391
|
-
if (!parseResult) return null;
|
|
3392
|
-
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
3393
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
3394
|
-
var rest = string.slice(matchedString.length);
|
|
3395
|
-
return {
|
|
3396
|
-
value: value,
|
|
3397
|
-
rest: rest
|
|
3398
|
-
};
|
|
3399
|
-
};
|
|
2993
|
+
function MeasureBrokenLine({ color, size, ...nativeProps }) {
|
|
2994
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(240 -82)", children: [jsx("path", { d: "M-222.5,87a2,2,0,0,0-2,2,1.978,1.978,0,0,0,.192.842L-227,93.071a1.974,1.974,0,0,0-.5-.071,1.974,1.974,0,0,0-.5.071l-2.691-3.229A1.978,1.978,0,0,0-230.5,89a2,2,0,0,0-2-2,2,2,0,0,0-2,2,1.978,1.978,0,0,0,.192.842L-237,93.071a1.974,1.974,0,0,0-.5-.071,2,2,0,0,0-2,2,2,2,0,0,0,2,2,2,2,0,0,0,2-2,1.978,1.978,0,0,0-.192-.842L-233,90.929a1.974,1.974,0,0,0,.5.071,1.974,1.974,0,0,0,.5-.071l2.691,3.229A1.978,1.978,0,0,0-229.5,95a2,2,0,0,0,2,2,2,2,0,0,0,2-2,1.978,1.978,0,0,0-.192-.842L-223,90.929a1.974,1.974,0,0,0,.5.071,2,2,0,0,0,2-2A2,2,0,0,0-222.5,87Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-240 82)", width: "20" })] }) }) }));
|
|
3400
2995
|
}
|
|
3401
2996
|
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
|
|
3406
|
-
abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
|
|
3407
|
-
wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
|
|
3408
|
-
};
|
|
3409
|
-
var parseEraPatterns = {
|
|
3410
|
-
any: [/^av/i, /^ap/i]
|
|
3411
|
-
};
|
|
3412
|
-
var matchQuarterPatterns = {
|
|
3413
|
-
narrow: /^T?[1234]/i,
|
|
3414
|
-
abbreviated: /^[1234](er|ème|e)? trim\.?/i,
|
|
3415
|
-
wide: /^[1234](er|ème|e)? trimestre/i
|
|
3416
|
-
};
|
|
3417
|
-
var parseQuarterPatterns = {
|
|
3418
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
3419
|
-
};
|
|
3420
|
-
var matchMonthPatterns = {
|
|
3421
|
-
narrow: /^[jfmasond]/i,
|
|
3422
|
-
abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
|
|
3423
|
-
wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
|
|
3424
|
-
};
|
|
3425
|
-
var parseMonthPatterns = {
|
|
3426
|
-
narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i],
|
|
3427
|
-
any: [/^ja/i, /^f/i, /^mar/i, /^av/i, /^ma/i, /^juin/i, /^juil/i, /^ao/i, /^s/i, /^o/i, /^n/i, /^d/i]
|
|
3428
|
-
};
|
|
3429
|
-
var matchDayPatterns = {
|
|
3430
|
-
narrow: /^[lmjvsd]/i,
|
|
3431
|
-
short: /^(di|lu|ma|me|je|ve|sa)/i,
|
|
3432
|
-
abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
|
|
3433
|
-
wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
|
|
3434
|
-
};
|
|
3435
|
-
var parseDayPatterns = {
|
|
3436
|
-
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
3437
|
-
any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
|
|
3438
|
-
};
|
|
3439
|
-
var matchDayPeriodPatterns = {
|
|
3440
|
-
narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
|
|
3441
|
-
any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
|
|
3442
|
-
};
|
|
3443
|
-
var parseDayPeriodPatterns = {
|
|
3444
|
-
any: {
|
|
3445
|
-
am: /^a/i,
|
|
3446
|
-
pm: /^p/i,
|
|
3447
|
-
midnight: /^min/i,
|
|
3448
|
-
noon: /^mid/i,
|
|
3449
|
-
morning: /mat/i,
|
|
3450
|
-
afternoon: /ap/i,
|
|
3451
|
-
evening: /soir/i,
|
|
3452
|
-
night: /nuit/i
|
|
3453
|
-
}
|
|
3454
|
-
};
|
|
3455
|
-
var match = {
|
|
3456
|
-
ordinalNumber: buildMatchPatternFn({
|
|
3457
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
3458
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
3459
|
-
valueCallback: function valueCallback(value) {
|
|
3460
|
-
return parseInt(value);
|
|
3461
|
-
}
|
|
3462
|
-
}),
|
|
3463
|
-
era: buildMatchFn({
|
|
3464
|
-
matchPatterns: matchEraPatterns,
|
|
3465
|
-
defaultMatchWidth: 'wide',
|
|
3466
|
-
parsePatterns: parseEraPatterns,
|
|
3467
|
-
defaultParseWidth: 'any'
|
|
3468
|
-
}),
|
|
3469
|
-
quarter: buildMatchFn({
|
|
3470
|
-
matchPatterns: matchQuarterPatterns,
|
|
3471
|
-
defaultMatchWidth: 'wide',
|
|
3472
|
-
parsePatterns: parseQuarterPatterns,
|
|
3473
|
-
defaultParseWidth: 'any',
|
|
3474
|
-
valueCallback: function valueCallback(index) {
|
|
3475
|
-
return index + 1;
|
|
3476
|
-
}
|
|
3477
|
-
}),
|
|
3478
|
-
month: buildMatchFn({
|
|
3479
|
-
matchPatterns: matchMonthPatterns,
|
|
3480
|
-
defaultMatchWidth: 'wide',
|
|
3481
|
-
parsePatterns: parseMonthPatterns,
|
|
3482
|
-
defaultParseWidth: 'any'
|
|
3483
|
-
}),
|
|
3484
|
-
day: buildMatchFn({
|
|
3485
|
-
matchPatterns: matchDayPatterns,
|
|
3486
|
-
defaultMatchWidth: 'wide',
|
|
3487
|
-
parsePatterns: parseDayPatterns,
|
|
3488
|
-
defaultParseWidth: 'any'
|
|
3489
|
-
}),
|
|
3490
|
-
dayPeriod: buildMatchFn({
|
|
3491
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
3492
|
-
defaultMatchWidth: 'any',
|
|
3493
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
3494
|
-
defaultParseWidth: 'any'
|
|
3495
|
-
})
|
|
3496
|
-
};
|
|
2997
|
+
function MeasureCircle({ color, size, ...nativeProps }) {
|
|
2998
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(160 -82)", children: [jsx("path", { d: "M-150,83a9,9,0,0,0-9,9,9,9,0,0,0,9,9,9,9,0,0,0,9-9A9,9,0,0,0-150,83Zm0,16a7.008,7.008,0,0,1-7-7,7.008,7.008,0,0,1,7-7,6.953,6.953,0,0,1,4.184,1.4l-1.43,1.43A4.964,4.964,0,0,0-150,87a5,5,0,0,0-5,5,5,5,0,0,0,5,5,5,5,0,0,0,5-5,4.964,4.964,0,0,0-.832-2.754l1.43-1.43A6.953,6.953,0,0,1-143,92,7.008,7.008,0,0,1-150,99Zm3-7a3,3,0,0,1-3,3,3,3,0,0,1-3-3,3,3,0,0,1,3-3,2.965,2.965,0,0,1,1.285.3l-1.992,1.992,1.414,1.414,1.992-1.992A2.965,2.965,0,0,1-147,92Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-160 82)", width: "20" })] }) }) }));
|
|
2999
|
+
}
|
|
3497
3000
|
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
* @summary French locale.
|
|
3502
|
-
* @language French
|
|
3503
|
-
* @iso-639-2 fra
|
|
3504
|
-
* @author Jean Dupouy [@izeau]{@link https://github.com/izeau}
|
|
3505
|
-
* @author François B [@fbonzon]{@link https://github.com/fbonzon}
|
|
3506
|
-
*/
|
|
3001
|
+
function MeasureLine({ color, size, ...nativeProps }) {
|
|
3002
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(280 -82)", children: [jsx("path", { d: "M-260,87h-20V97h20Zm-1.818,8.333h-16.363V88.667h1.818V92h1.818V88.667h1.818V92h1.818V88.667h1.819V92h1.818V88.667h1.818V92h1.819V88.667h1.818Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-280 82)", width: "20" })] }) }) }));
|
|
3003
|
+
}
|
|
3507
3004
|
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
formatLong: formatLong,
|
|
3512
|
-
formatRelative: formatRelative,
|
|
3513
|
-
localize: localize,
|
|
3514
|
-
match: match,
|
|
3515
|
-
options: {
|
|
3516
|
-
weekStartsOn: 1
|
|
3517
|
-
/* Monday */
|
|
3518
|
-
,
|
|
3519
|
-
firstWeekContainsDate: 4
|
|
3520
|
-
}
|
|
3521
|
-
};
|
|
3522
|
-
var fr = locale;
|
|
3005
|
+
function Minus({ color, size, ...nativeProps }) {
|
|
3006
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("rect", { fill: "currentColor", height: "14", transform: "translate(3 11) rotate(-90)", width: "2" }), jsx("rect", { fill: "none", height: "20", width: "20" })] }) }));
|
|
3007
|
+
}
|
|
3523
3008
|
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
}));
|
|
3528
|
-
const RSUITE_CALENDAR_LOCALE = {
|
|
3529
|
-
// TODO Why this doesn't work?
|
|
3530
|
-
dateLocale: fr,
|
|
3531
|
-
formattedDayPattern: 'dd/MM/yyyy',
|
|
3532
|
-
formattedMonthPattern: 'MM/yyyy',
|
|
3533
|
-
friday: 'V',
|
|
3534
|
-
hours: 'Heures',
|
|
3535
|
-
minutes: 'Minutes',
|
|
3536
|
-
monday: 'L',
|
|
3537
|
-
ok: 'Valider',
|
|
3538
|
-
saturday: 'S',
|
|
3539
|
-
seconds: 'Secondes',
|
|
3540
|
-
sunday: 'D',
|
|
3541
|
-
thursday: 'J',
|
|
3542
|
-
today: 'Aujourd’hui',
|
|
3543
|
-
tuesday: 'M',
|
|
3544
|
-
wednesday: 'M',
|
|
3545
|
-
yesterday: 'Hier'
|
|
3546
|
-
};
|
|
3547
|
-
var STATUS;
|
|
3548
|
-
(function (STATUS) {
|
|
3549
|
-
STATUS["END_DATE"] = "END_DATE";
|
|
3550
|
-
STATUS["NO_DATE"] = "NO_DATE";
|
|
3551
|
-
STATUS["START_DATE"] = "START_DATE";
|
|
3552
|
-
})(STATUS || (STATUS = {}));
|
|
3009
|
+
function More({ color, size, ...nativeProps }) {
|
|
3010
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(240 -41)", children: [jsxs("g", { children: [jsx("circle", { cx: "2", cy: "2", fill: "currentColor", r: "2", transform: "translate(-232 49)" }), jsx("circle", { cx: "2", cy: "2", fill: "currentColor", r: "2", transform: "translate(-239 49)" }), jsx("circle", { cx: "2", cy: "2", fill: "currentColor", r: "2", transform: "translate(-225 49)" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-240 41)", width: "20" })] }) }) }));
|
|
3011
|
+
}
|
|
3553
3012
|
|
|
3554
|
-
function
|
|
3555
|
-
|
|
3556
|
-
const selectedFirstDate = useRef();
|
|
3557
|
-
const calendarRef = useRef();
|
|
3558
|
-
const [isFirstLoad, setIsFirstLoad] = useState(true);
|
|
3559
|
-
const controlledValue = useMemo(() => (defaultValue ? sortDates(defaultValue) : undefined), [defaultValue]);
|
|
3560
|
-
const utcTodayAsDayjs = useMemo(() => getUtcDayjs().endOf('day'), []);
|
|
3561
|
-
const disabledDate = useMemo(() => (date) => isHistorical ? getUtcizedDayjs(date).isAfter(utcTodayAsDayjs) : false, [isHistorical, utcTodayAsDayjs]);
|
|
3562
|
-
const handleSelect = useCallback((nextDate) => {
|
|
3563
|
-
if (!selectedFirstDate.current) {
|
|
3564
|
-
selectedFirstDate.current = nextDate;
|
|
3565
|
-
return;
|
|
3566
|
-
}
|
|
3567
|
-
const sortedDateRange = sortDates([selectedFirstDate.current, nextDate]);
|
|
3568
|
-
const [startDate, endDate] = sortedDateRange;
|
|
3569
|
-
const startDateTuple = getDateTupleFromDate(startDate);
|
|
3570
|
-
const endDateTuple = getDateTupleFromDate(endDate);
|
|
3571
|
-
const nextDateTupleRange = [startDateTuple, endDateTuple];
|
|
3572
|
-
onChange(nextDateTupleRange);
|
|
3573
|
-
}, [onChange]);
|
|
3574
|
-
const renderTitle = useCallback((date) => capitalizeFirstLetter(dayjs_minExports(date).format('MMMM YYYY')), []);
|
|
3575
|
-
useEffect(() => {
|
|
3576
|
-
// We wait for the <Box /> to render so that `boxRef` is defined
|
|
3577
|
-
// and can be used as a container for <RsuiteDateRangePicker />
|
|
3578
|
-
setIsFirstLoad(false);
|
|
3579
|
-
}, []);
|
|
3580
|
-
return (jsx(Box$5, { ref: boxRef, onClick: stopMouseEventPropagation, children: !isFirstLoad && (jsx(DateRangePicker$1, { ref: calendarRef, container: boxRef.current, disabledDate: disabledDate, format: "yyyy-MM-dd", locale: RSUITE_CALENDAR_LOCALE, onSelect: handleSelect, open: true, ranges: [], renderTitle: renderTitle,
|
|
3581
|
-
// `defaultValue` seems to be immediatly cancelled so we come down to using a controlled `value`
|
|
3582
|
-
value: controlledValue })) }));
|
|
3013
|
+
function Note({ color, size, ...nativeProps }) {
|
|
3014
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M2,2V18H12l6-6V2ZM4,16V4H16v6H10v6Zm8-.828V12h3.172Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", width: "20" })] }) }));
|
|
3583
3015
|
}
|
|
3584
|
-
const Box$5 = styled.div `
|
|
3585
|
-
height: 0;
|
|
3586
|
-
position: relative;
|
|
3587
|
-
user-select: none;
|
|
3588
3016
|
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3017
|
+
function Observation({ color, size, ...nativeProps }) {
|
|
3018
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("rect", { fill: "none", height: "20", width: "20" }), jsxs("g", { fill: "currentColor", strokeMiterlimit: "10", children: [jsx("path", { d: "M 15.5 17 C 13.57009029388428 17 12 15.42990970611572 12 13.5 L 12 12.11200046539307 L 12 11.31332969665527 L 11.22109985351563 11.13675022125244 C 10.82866764068604 11.0477819442749 10.42606067657471 11.0018138885498 10.02403163909912 11.0000524520874 C 10.30024242401123 11.00124073028564 10.57746124267578 11.0228853225708 10.8484001159668 11.06443977355957 L 12 11.24106979370117 L 12 10.07600021362305 L 12 9.093000411987305 L 12 8.244170188903809 L 11.16244983673096 8.106280326843262 C 10.85622978210449 8.055870056152344 10.44736003875732 7.998000144958496 10 7.998000144958496 C 9.552639961242676 7.998000144958496 9.143770217895508 8.055870056152344 8.837550163269043 8.106280326843262 L 8 8.244170188903809 L 8 9.093000411987305 L 8 10.07699966430664 L 8 11.2455997467041 L 9.154560089111328 11.06497955322266 C 9.42243480682373 11.02307319641113 9.698649406433105 11.00124740600586 9.975924491882324 11.0000524520874 C 9.573919296264648 11.0018196105957 9.171308517456055 11.0477876663208 8.778900146484375 11.13675022125244 L 8 11.31332969665527 L 8 12.11200046539307 L 8 13.5 C 8 15.42990970611572 6.429910182952881 17 4.5 17 C 2.570090055465698 17 1 15.42990970611572 1 13.5 C 1 13.03215980529785 1.091449975967407 12.57750988006592 1.27180004119873 12.1486701965332 L 1.28702437877655 12.11246967315674 L 5.101890087127686 3.952510118484497 L 5.178922653198242 3.78773832321167 C 5.439716339111328 3.304912328720093 5.943906784057617 3 6.5 3 C 7.327099800109863 3 8 3.672899961471558 8 4.5 L 8 5.061999797821045 L 8 6.183760166168213 L 9.114399909973145 6.055439949035645 C 9.454680442810059 6.016250133514404 9.736089706420898 5.998000144958496 10 5.998000144958496 C 10.26076984405518 5.998000144958496 10.54312038421631 6.016039848327637 10.88858032226563 6.054769992828369 L 12 6.179389953613281 L 12 5.060999870300293 L 12 4.5 C 12 3.672899961471558 12.67290019989014 3 13.5 3 C 14.06018733978271 3 14.56766128540039 3.309339284896851 14.82675552368164 3.798352241516113 L 14.89809036254883 3.952470064163208 L 18.64599990844727 11.97018814086914 L 18.64599990844727 11.98406982421875 L 18.72974967956543 12.15236186981201 C 18.90907287597656 12.58011913299561 19 13.03350162506104 19 13.5 C 19 15.42990970611572 17.42991065979004 17 15.5 17 Z M 15.5 10.25 C 13.70794010162354 10.25 12.25 11.70794010162354 12.25 13.5 C 12.25 15.29205989837646 13.70794010162354 16.75 15.5 16.75 C 17.29206085205078 16.75 18.75 15.29205989837646 18.75 13.5 C 18.75 11.70794010162354 17.29206085205078 10.25 15.5 10.25 Z M 4.5 10.25 C 2.707940101623535 10.25 1.25 11.70794010162354 1.25 13.5 C 1.25 15.29205989837646 2.707940101623535 16.75 4.5 16.75 C 6.292059898376465 16.75 7.75 15.29205989837646 7.75 13.5 C 7.75 11.70794010162354 6.292059898376465 10.25 4.5 10.25 Z", stroke: "none" }), jsx("path", { d: "M 13 10.06495571136475 C 13.70204067230225 9.552577972412109 14.56627750396729 9.25 15.5 9.25 C 15.77562522888184 9.25 16.04530715942383 9.276392936706543 16.30645370483398 9.326748847961426 L 13.9340877532959 4.251050472259521 C 13.86002540588379 4.125204086303711 13.71336269378662 4 13.5 4 C 13.22430038452148 4 13 4.224299907684326 13 4.5 L 13 7.297770023345947 L 11.10828113555908 7.085675716400146 C 11.18476295471191 7.096925735473633 11.25709533691406 7.108408451080322 11.32489013671875 7.119569778442383 L 13 7.395349979400635 L 13 10.06495571136475 M 7 10.06495571136475 L 7 7.395349979400635 L 8.67510986328125 7.119569778442383 C 8.725531578063965 7.111268520355225 8.778477668762207 7.102787971496582 8.833767890930176 7.094357490539551 L 7 7.305520057678223 L 7 4.5 C 7 4.224299907684326 6.775700092315674 4 6.5 4 C 6.287984848022461 4 6.141829490661621 4.123627662658691 6.067324161529541 4.248665809631348 L 3.69323992729187 9.326807975769043 C 3.954513072967529 9.276401519775391 4.224231719970703 9.25 4.5 9.25 C 5.433722496032715 9.25 6.297959804534912 9.552577972412109 7 10.06495571136475 M 15.5 18 C 13.01500034332275 18 11 15.98499965667725 11 13.5 L 11 12.11200046539307 C 10.67800045013428 12.03899955749512 10.3430004119873 12 10 12 C 9.656000137329102 12 9.321999549865723 12.03899955749512 9 12.11200046539307 L 9 13.5 C 9 15.98499965667725 6.985000133514404 18 4.5 18 C 2.015000104904175 18 0 15.98499965667725 0 13.5 C 0 12.88300037384033 0.125 12.29599952697754 0.3499999940395355 11.76099967956543 L 0.3479999899864197 11.76099967956543 L 0.3540000021457672 11.74699974060059 L 4.196000099182129 3.526999950408936 C 4.576000213623047 2.630000114440918 5.464000225067139 2 6.5 2 C 7.88100004196167 2 9 3.11899995803833 9 4.5 L 9 5.061999797821045 C 9.329999923706055 5.02400016784668 9.661999702453613 4.998000144958496 10 4.998000144958496 C 10.33800029754639 4.998000144958496 10.67000007629395 5.02400016784668 11 5.060999870300293 L 11 4.5 C 11 3.11899995803833 12.11900043487549 2 13.5 2 C 14.53600025177002 2 15.42399978637695 2.630000114440918 15.80399990081787 3.526999950408936 L 15.80399990081787 3.529000043869019 L 19.65200042724609 11.76099967956543 L 19.64999961853027 11.76099967956543 C 19.875 12.29599952697754 20 12.88300037384033 20 13.5 C 20 15.98499965667725 17.98500061035156 18 15.5 18 Z M 15.5 11.25 C 14.25899982452393 11.25 13.25 12.25899982452393 13.25 13.5 C 13.25 14.74100017547607 14.25899982452393 15.75 15.5 15.75 C 16.74099922180176 15.75 17.75 14.74100017547607 17.75 13.5 C 17.75 12.25899982452393 16.74099922180176 11.25 15.5 11.25 Z M 4.5 11.25 C 3.259000062942505 11.25 2.25 12.25899982452393 2.25 13.5 C 2.25 14.74100017547607 3.259000062942505 15.75 4.5 15.75 C 5.741000175476074 15.75 6.75 14.74100017547607 6.75 13.5 C 6.75 12.25899982452393 5.741000175476074 11.25 4.5 11.25 Z M 10 8.998000144958496 C 9.659999847412109 8.998000144958496 9.328000068664551 9.038999557495117 9 9.093000411987305 L 9 10.07699966430664 C 9.326000213623047 10.02600002288818 9.659999847412109 10 10 10 C 10.34000015258789 10 10.67399978637695 10.02600002288818 11 10.07600021362305 L 11 9.093000411987305 C 10.67199993133545 9.038999557495117 10.34000015258789 8.998000144958496 10 8.998000144958496 Z", fill: "currentColor", stroke: "none" })] })] }) }));
|
|
3019
|
+
}
|
|
3592
3020
|
|
|
3593
|
-
|
|
3594
|
-
height:
|
|
3595
|
-
|
|
3021
|
+
function Pin({ color, size, ...nativeProps }) {
|
|
3022
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-240)", children: [jsx("path", { d: "M250.94,2l-1.412,1.412.706.707L246.7,7.65h-2.824l-1.412,1.413,3.518,3.52-3.985,4L243.413,18l3.985-4,3.54,3.542,1.413-1.412V13.3l3.531-3.531.706.706L258,9.064Zm0,9.888v2.825l-5.648-5.651h2.824l3.531-3.531,2.824,2.825Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(240)", width: "20" })] }) }) }));
|
|
3023
|
+
}
|
|
3596
3024
|
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
margin-top: 4px;
|
|
3025
|
+
function Pinpoint({ color, size, ...nativeProps }) {
|
|
3026
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-160)", children: [jsx("path", { d: "M164,8c0,5,6,10,6,10", fill: "currentColor" }), jsx("path", { d: "M170,2a5.961,5.961,0,0,0-5.944,6.777c.016.135.038.27.062.4l.011.055C164.964,13.792,170,18,170,18s5.036-4.208,5.871-8.763l.011-.055c.024-.135.046-.27.062-.4A5.961,5.961,0,0,0,170,2Zm0,9a3,3,0,1,1,3-3A3,3,0,0,1,170,11Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(160)", width: "20" })] }) }) }));
|
|
3027
|
+
}
|
|
3601
3028
|
|
|
3602
|
-
|
|
3603
|
-
.
|
|
3604
|
-
|
|
3605
|
-
display: none;
|
|
3606
|
-
}
|
|
3029
|
+
function PinpointHide({ color, size, ...nativeProps }) {
|
|
3030
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-8.128 -10.447)", children: [jsx("rect", { fill: "none", height: "20", transform: "translate(8.128 10.447)", width: "20" }), jsx("path", { d: "M24.88,13.109l-1.415-1.414L21.6,13.56a5.976,5.976,0,0,0-9.416,5.663c.016.136.038.27.061.405l.012.056a9.7,9.7,0,0,0,.811,2.408l-2.139,2.14,1.414,1.414L14.1,23.893a23.842,23.842,0,0,0,4.032,4.554S23.163,24.239,24,19.684l.011-.056c.024-.135.046-.269.062-.405a5.87,5.87,0,0,0-1.057-4.249Zm-9.752,5.338a2.982,2.982,0,0,1,4.286-2.7l-3.986,3.986A2.969,2.969,0,0,1,15.128,18.447Zm6,0a3,3,0,0,1-3,3,2.965,2.965,0,0,1-1.286-.3l3.986-3.986A2.983,2.983,0,0,1,21.128,18.447Z", fill: "currentColor" })] }) }) }));
|
|
3031
|
+
}
|
|
3607
3032
|
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3033
|
+
function Plane({ color, size, ...nativeProps }) {
|
|
3034
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M18.5,13.6V11.8L11.342,7.3V2.35a1.342,1.342,0,1,0-2.684,0V7.3L1.5,11.8v1.8l7.158-2.25V16.3l-1.79,1.35V19L10,18.1l3.132.9V17.65l-1.79-1.35V11.35Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", width: "20" })] }) }));
|
|
3035
|
+
}
|
|
3611
3036
|
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3037
|
+
function Plus({ color, size, ...nativeProps }) {
|
|
3038
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(120 -82)", children: [jsx("path", { d: "M-102,91h-7V84h-2v7h-7v2h7v7h2V93h7Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(-120 82)", width: "20" })] }) }) }));
|
|
3039
|
+
}
|
|
3615
3040
|
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3041
|
+
function Reject({ color, size, ...nativeProps }) {
|
|
3042
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-80)", children: [jsx("path", { d: "M90,1a9,9,0,1,0,9,9A9,9,0,0,0,90,1Zm0,16a7,7,0,1,1,7-7A7,7,0,0,1,90,17Z", fill: "currentColor" }), jsx("path", { d: "M94,7.455,92.545,6,90,8.545,87.455,6,86,7.455,88.545,10,86,12.545,87.455,14,90,11.455,92.545,14,94,12.545,91.455,10Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(80)", width: "20" })] }) }) }));
|
|
3043
|
+
}
|
|
3619
3044
|
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
display: flex;
|
|
3624
|
-
justify-content: space-between;
|
|
3045
|
+
function Save({ color, size, ...nativeProps }) {
|
|
3046
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M14.444,2H2V18H18V5.556ZM10,16.222a2.667,2.667,0,1,1,2.667-2.667h0a2.663,2.663,0,0,1-2.659,2.667Zm2.667-8.889H3.778V3.778h8.889Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", width: "20" })] }) }));
|
|
3047
|
+
}
|
|
3625
3048
|
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3049
|
+
function Search({ color, size, ...nativeProps }) {
|
|
3050
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(200 -41)", children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-181.262,58.262l-5.111-5.111A6.958,6.958,0,0,0-185,49a7,7,0,0,0-7-7,7,7,0,0,0-7,7,7,7,0,0,0,7,7,6.958,6.958,0,0,0,4.151-1.373l5.111,5.111ZM-197,49a5.006,5.006,0,0,1,5-5,5.006,5.006,0,0,1,5,5,5.006,5.006,0,0,1-5,5A5.006,5.006,0,0,1-197,49Z", stroke: "none" }), jsx("path", { d: "M -182.7380065917969 59.73799896240234 L -187.8489990234375 54.62699890136719 C -189.0110015869141 55.48600006103516 -190.4440002441406 56 -192 56 C -195.8659973144531 56 -199 52.86600112915039 -199 49 C -199 45.13399887084961 -195.8659973144531 42 -192 42 C -188.1340026855469 42 -185 45.13399887084961 -185 49 C -185 50.55599975585938 -185.5140075683594 51.98899841308594 -186.3730010986328 53.1510009765625 L -181.2619934082031 58.26200103759766 L -182.7380065917969 59.73799896240234 Z M -192 44 C -194.7570037841797 44 -197 46.24300003051758 -197 49 C -197 51.75699996948242 -194.7570037841797 54 -192 54 C -189.2429962158203 54 -187 51.75699996948242 -187 49 C -187 46.24300003051758 -189.2429962158203 44 -192 44 Z", fill: "currentColor", stroke: "none" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-200 41)", width: "20" })] }) }) }));
|
|
3051
|
+
}
|
|
3629
3052
|
|
|
3630
|
-
|
|
3631
|
-
color: ${p => p.theme.color.slateGray};
|
|
3053
|
+
function SelectCircle({ color, size, ...nativeProps }) {
|
|
3054
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M0,0H20V20H0Z", fill: "none" }), jsx("path", { d: "M10,0H8.35l-.007,0h-.08l-.012,0H8.142l-.007,0h0l-.012,0H8.094l-.013,0h0l-.008,0H8.065l-.008,0h0l-.014,0h0l-.013,0H8.017L8,.2H8L7.989.2h0L7.98.2h0l-.013,0h0l-.014,0h0l-.008,0H7.936l-.009,0h0l-.014,0h0L7.9.22H7.9l-.008,0h0l-.013,0h0L7.86.23h0l-.024,0h0l-.014,0h0L7.8.243h0l-.014,0h0L7.707.264h0l-.014,0h0A9.947,9.947,0,0,0,5.2,1.222l.961,1.755A8,8,0,0,1,10,2V0ZM3.558,2.351c-.2.172-.4.353-.592.541h0l-.021.021h0l0,0h0l-.015.015h0l-.005,0h0l-.02.02h0l-.005.005h0l-.016.016h0l0,0h0L2.856,3h0l-.005,0v0l0,0h0L2.83,3.03h0l0,0v0l-.014.014h0l0,0h0l0,0h0l-.009.01h0l0,0,0,0,0,0h0L2.762,3.1v0l0,0,0,0-.013.014,0,0,0,0,0,0,0,0,0,0-.007.008h0l0,0,0,0,0,0h0L2.7,3.17l0,0,0,0,0,0,0,0,0,0-.006.006,0,0,0,0,0,0,0,0,0,0-.007.008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,0-.006.006,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0-.006.006,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0L2.484,3.4v0l-.006.006,0,0,0,0,0,0,0,0v0l-.006.006,0,0,0,.005,0,0,0,0,0,0-.006.007h0l0,.007h0l0,.005,0,0,0,.006h0l-.006.007h0l0,.006v0l0,.005h0l-.006.007h0l-.006.006v0l-.005,0v0l-.012.014h0l-.005.006h0l-.006.007h0l-.006.007h0l0,.006v0l0,.006h0l-.012.014h0l0,.006h0l-.012.014h0l0,.006v0l-.018.021h0l0,.007h0l-.012.015h0l-.006.006h0l-.011.015h0l0,.007h0L2.232,3.7h0l-.012.015h0l-.006.007h0L2.2,3.74h0l0,.007h0l-.018.023h0l-.018.023h0L2.153,3.8h0l-.018.022h0l-.018.023h0l-.024.031h0L2.075,3.9h0l-.018.023h0l-.023.031h0A9.981,9.981,0,0,0,.744,6.209h0l-.015.036h0l-.011.027h0L.707,6.3h0l-.014.036h0l-.011.028h0l0,.009h0L2.541,7.1A8.047,8.047,0,0,1,4.847,3.88L3.558,2.351ZM.144,8.3l-.016.1h0V8.4h0l0,.024v.065h0l0,.015h0v.007h0v.007h0l0,.031h0A9.867,9.867,0,0,0,0,9.677H0v.007H0v.031H0v.007H0v.007H0v.024H0v.007H0v.006H0V9.8H0v.023H0V9.87H0v.008H0v.03H0v.008H0V10H0v.072H0V10.1H0v.04H0v.041H0v.023H0v.008H0v.031H0v.039H0v.04H0V10.4h0v.031h0v.04h0v.031h0v.039h0v.039h0v.039h0v.022h0v.008h0v.022h0V10.7h0v.022h0v.008h0v.062h0V10.8h0v.022h0v.016h0v.015h0v.007h0v.007h0v.039h0v.022h0l0,.015v.024h0v.008h0v.022h0v.008h0v.024l0,.015h0v.014h0v.007h0l0,.015h0v.022h0v.008h0v.024l0,.015h0v.014h0l0,.015h0V11.2h0v.014h0v.015h0v.007h0v.007h0l0,.023v.008h0v.007h0l0,.016h0v.007h0v.007h0l0,.023h0v.006h0v.007h0l0,.015h0v.007h0v.007h0V11.4h0l0,.016h0v.006h0v.007h0l0,.015h0v.008h0v.007h0l0,.023h0v.007h0V11.5h0l0,.015h0v.015h0l0,.023h0v.007h0v.007h0l0,.023h0V11.6h0l0,.03h0l.012.069h0l.007.038h0l.005.031h0l.006.031h0l.007.038h0c.011.059.022.118.034.176h0a9.873,9.873,0,0,0,.331,1.217l1.893-.646A7.991,7.991,0,0,1,2,10a8.162,8.162,0,0,1,.115-1.364L.144,8.3Zm2.947,5.738L1.365,15.047h0l.015.025h0l.015.024h0l0,.008h0l.01.017h0l0,.008h0l.01.016h0l0,.007h0l0,.008h0l.005.008h0l0,.008v0l0,.006h0l.009.016v0l0,.006v0l0,.007h0l0,.007v0l0,.006v0l0,.006v0l0,.008h0l0,.006,0,0,0,.005v0l0,.008h0l0,.006v0l0,.005,0,0,0,.005v0l0,.007,0,0,0,0,0,0,0,0,0,0,0,.007,0,0,0,.005,0,0,0,0,0,0,0,.006,0,0,0,.005,0,0,0,0,0,0,0,0v0l0,.007,0,0,0,0,0,0,0,0,0,0,0,.007,0,0,0,0,0,0,0,0,0,0,0,0,0,.008,0,0,0,0,0,0,0,0,0,0,0,.008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.008,0,0,0,.005,0,0,0,0v0l.006.009v0l0,.005,0,0,0,.005v0l.011.016,0,0,0,0v0l.011.016v0l0,0,0,0,0,0h0l.007.011h0l0,.005v0l0,.005h0l.011.017v0l0,.005h0l.011.017h0l0,.005v0l.012.018h0l0,.005h0l.016.024h0l0,.005h0l.013.018h0l0,.006h0l.016.023h0l0,.006h0l.013.018h0l0,.006h0l.017.024h0l.017.024h0l.017.024h0l.022.03h0l.018.024h0L2,15.995H2c.045.06.09.12.137.179h0q.081.1.165.2h0l.019.023h0l.043.052h0l.019.023h0L2.4,16.5h0l.025.028h0l.019.023h0l.044.051h0l.019.022h0l.019.022h0l0,0h0l.014.016h0l0,.005h0l.019.021h0l.005.005h0l.014.016h0l0,0,0,0,.014.015h0l.005.005v0l.019.02v0l0,0h0l.014.015v0l0,0h0l.014.015h0l.005,0h0l.014.015h0l0,.005h0l.005,0h0l.013.014,0,0,0,0v0l.014.014h0l0,.005,0,0,0,0h0l.008.009h0l0,0v0l0,0v0l.013.014,0,0,0,0,0,0,.013.013,0,0,0,0,0,0,0,0,0,0,.008.007,0,0,0,0,0,0,0,0,0,0L2.854,17v0l0,0,0,0,0,0,0,0,.013.013,0,0,0,0,0,0,0,0,0,0,.006.006,0,0,0,0,0,0,0,0,0,0,.005.005,0,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.006.006,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,0,.005h0l.006.006,0,0,0,0,0,0,0,0,0,0,.006.005,0,0,0,0,0,0,0,0,0,0,.006.006h0l.005,0,0,0,0,0,0,0,.005,0h0l.006.006,0,0,0,0,0,0,0,0,0,0,.007.006h0l.005.005,0,0,0,0,0,0,.007.006h0l.006.006,0,0,.005,0,0,0,.006,0h0l.007.006h0l0,.005,0,0,0,0v0l.007.006h0l.005.005,0,0,0,0,0,0,.007,0h0l.006,0,0,0,0,0,0,0,.006.005h0l.006.006,0,0,0,0,0,0,0,.005h0l.007.006h0l.006,0h0l0,0h0l.007.006h0l.006.006,0,0,.005,0,0,0,.007,0h0l.007.006h0l.006,0h0l.006,0h0l.007.006h0l.007.005h0l.006,0h0l.014.012h0l.006.005v0L3.5,17.6h0L3.5,17.6h0l.006,0h0l.014.012h0l.006.005h0l.015.012h0l.007.006h0l.014.012h0l.006.006h0l.007.005h0l.015.013h0l.006.006h0l.014.012h0l.007.006h0l.022.018h0l.022.018h0l.007.006h0l.015.012h0l.007,0h0l.022.018h0l.023.018h0l.007,0h0l.015.012h0l.007.005h0l.022.018h0l.023.018h0l.03.024h0l.023.018h0l.024.018h0l.031.024h0a9.867,9.867,0,0,0,.9.616l1.033-1.713a8.066,8.066,0,0,1-2.784-2.82Zm4.226,3.5-.671,1.885a9.967,9.967,0,0,0,2.273.518h0l.046.005h0l.04,0H9.02l.026,0h.02l.027,0h.021l.019,0h.022l.025,0h.029l.018,0H9.25l.018,0h1.194a10.415,10.415,0,0,0,1.112-.113L11.262,17.9a8.055,8.055,0,0,1-3.945-.362Zm8.736-2.308A8.04,8.04,0,0,1,12.8,17.5l.7,1.874c.1-.04.209-.081.313-.124h0l.036-.015h0l.027-.011h0l.026-.012h0l.008,0h0l.018-.007h0l.008,0h0l.007,0h0l.009,0h0l.008,0h0l.007,0h0L14,19.169h0l.007,0h0l.007,0h0l.008,0h0l.007,0h0l.006,0h0l.008,0h0l.007,0h0l.005,0h0l.005,0h0l.007,0,0,0,.006,0h0l0,0h0l.008,0h0l.006,0,0,0,.005,0h0l.006,0,0,0,.006,0,0,0,.005,0,0,0,0,0,0,0,.008,0,0,0,.005,0h0l0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,.007,0,0,0,0,0h0l0,0,0,0,.016-.008h0l0,0,0,0,0,0h0l.009,0h0l0,0,0,0,0,0h0l.01-.005h0l0,0,0,0,0,0h0L14.361,19h0l.006,0h0l.005,0h0l.012-.006h0l.006,0h0l.005,0h0l.018-.009h0l.006,0h0l.019-.01h0l.006,0h0l.006,0h0l.019-.009h0l.007,0h0l.02-.01h0l.007,0h0l.026-.013h0l.006,0h0l.02-.01h0l.006,0h0l.026-.014h0l.026-.014h0a10.018,10.018,0,0,0,1.446-.923h0l.1-.078h0l.006,0h0l.076-.061h0l.023-.019h0l.022-.018h0l0,0h0l.017-.013h0l0,0h0l.022-.018h0l0,0h0l.016-.013h0l0,0h0l.017-.014h0l.005,0h0l.006,0h0l.016-.013h0l0,0v0l.016-.013h0l.005-.005h0l.016-.013h0l0,0h0l0,0h0l.015-.013,0,0,0,0h0l.015-.013h0l0,0,0,0,0,0,0,0,.009-.008h0l0,0,0,0,0,0h0l.015-.013v0l.005,0,0,0,0,0h0l.009-.009h0l0,0,0,0,0,0,0,0,.01-.009h0l0,0,0,0,0,0,0,0,.014-.012,0,0,0,0,0,0,0,0,0,0,.007-.007,0,0,0,0,0,0,0,0,0,0,.009-.008h0l0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.005,0,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.005,0,0,0,0,0,0,0,0,0,0,.006-.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.006-.006h0l0-.005,0,0,0,0,0,0,.006-.006h0l.005-.005,0,0,0,0,0,0,.005,0v0l.006-.006h0l.005,0,0,0,.005,0v0l.007-.006h0l.005,0,0,0,.005,0v0l.013-.012h0L17,17.143v0l.006-.006h0l.006-.007h0l.006-.005v0l.006-.005h0l.006-.006h0l.006-.006h0l.005-.005h0l.013-.013h0l.005-.006h0l.013-.013h0l.006-.007h0l.006-.006h0l.014-.014h0l.006-.005h0l.013-.014h0L17.137,17h0L17.144,17h0l.013-.013h0l.006-.006h0l.014-.013h0l.006-.006h0l.02-.02h0l.02-.02h0l.007-.006h0l.02-.021h0q.16-.168.313-.345l-1.512-1.309ZM18,10.1a8.007,8.007,0,0,1-1.026,3.821l1.742.983a10.02,10.02,0,0,0,.523-1.072h0l.023-.056h0l.006-.014h0l0-.014h0l0-.007h0l.006-.014h0l0-.007h0l0-.006h0l0-.006h0l0-.006h0l0-.006v0l0-.006h0l0-.006v0l0-.006h0l0-.005v0l0-.006h0l0-.006h0l0-.006h0l0-.006v0l0-.005h0l0-.006v-.007h0l0-.006v0l0-.006h0l0-.005v0l0-.006v0l0,0v0l0-.006v-.006l0,0v-.007l0-.005v0l0,0v0l0-.006v0l0,0v0l0-.005v-.007l0,0v-.006l0-.005V13.5l0,0v-.01l0-.005v0l0,0v0l0,0v0l0,0v0l0,0v0l0-.006v0l0,0h0l0-.006v0l0-.011v0l0-.006V13.4l0-.006v-.007l0-.007v0l0-.006v-.008l0-.006V13.35h0l0-.007v0l0-.007h0v-.006l0-.007h0l0,0v0l0-.006v0l0-.012v0l0-.007h0v-.006l0-.007h0l0-.013h0l0-.008h0v0h0l0-.007v0l0,0h0l0-.009h0l0-.013h0l0-.008h0V13.19h0l0-.008h0l.005-.013h0l0-.008h0v0h0l0-.009h0l0-.014h0l0-.013h0l.007-.023h0l.005-.013h0l0-.013h0l0-.009h0l0-.014h0c.014-.041.027-.083.039-.124h0c.026-.083.05-.167.073-.251h0l0-.014h0l0-.014h0l0-.01h0l.014-.051h0l.023-.09h0l.01-.037h0l.009-.037h0l0-.014h0l0-.023h0l0-.013h0l0-.014h0l0-.009h0l0-.013h0l0-.014h0l0-.009h0v0h0l0-.01h0l0-.014h0l.009-.038h0l0-.014h0l.006-.023h0l0-.013h0l0-.014h0l0-.009h0l0-.014h0l0-.014h0v-.008h0l0-.013v0l0-.013h0l0-.009h0v-.005h0l0-.009h0l0-.013v-.01h0v-.013h0l0-.014h0l0-.014h0v-.009h0v0h0v-.01l0-.013h0l0-.008h0v-.006l0-.007v0l0-.013v-.336h0v-.038h0v-.015h0v-.022h0v-.015h0v-.006h0v-.015h0v-.015h0v-.007h0v-.007h0V11.43h0v-.008h0l0-.014h0V11.4h0v-.007h0v-.008h0l0-.014h0l0-.015h0v-.008h0v-.008h0v-.008h0l0-.015h0l0-.024h0l0-.015h0l0-.039h0A10.3,10.3,0,0,0,20,10.13L18,10.1Zm-.267-6.446L16.186,4.927A7.989,7.989,0,0,1,17.862,8.51l1.965-.37a9.834,9.834,0,0,0-.545-1.867h0l-.011-.027h0l-.014-.036h0l-.015-.036h0l-.054-.126h0l-.011-.026h0l-.027-.062h0l-.015-.035h0L19.122,5.9h0l-.016-.036h0l-.012-.026h0l0-.008h0L19.077,5.8h0l-.012-.026h0l0-.008h0l-.008-.018h0l0-.008h0l-.012-.026h0l0-.009h0l-.012-.026h0L19,5.64h0l-.013-.026h0l0-.008h0l-.009-.018h0l0-.008h0l-.013-.026h0l-.013-.026h0l0-.008h0l-.013-.026h0l0-.008h0l-.009-.017h0l0-.008h0L18.9,5.431h0L18.88,5.4h0l-.014-.025h0l-.018-.035h0l-.013-.025h0l-.019-.034h0l-.032-.059h0l-.014-.026h0l-.019-.033h0l-.019-.033h0L18.718,5.1h0L18.7,5.064h0l-.014-.025h0c-.023-.039-.046-.078-.068-.117h0L18.6,4.889h0a10,10,0,0,0-.865-1.231ZM11.829.167l-.363,1.967A7.982,7.982,0,0,1,15.053,3.8l1.265-1.55a10,10,0,0,0-3.042-1.7h0l-.027-.01h0L13.22.53h0l-.009,0h0L13.183.517h0l-.009,0h0L13.155.508h0l-.008,0h0l-.009,0h0L13.118.5h0l-.008,0h0L13.089.486h0l-.007,0h0l-.008,0h0l-.009,0h0l-.008,0h0l-.007,0h0L13.024.465h0l-.007,0h0l-.007,0h0l-.009,0h0l-.008,0h0l-.007,0h0l-.009,0h0l-.009,0h0l-.007,0h0l-.007,0h0l-.009,0h0l-.007,0h-.012l-.006,0h0l-.008,0h0l-.005,0h0l-.005,0h0l-.009,0h0l-.006,0h-.012l-.006,0h0l-.008,0h0l-.006,0h-.012L12.8.4h0l-.005,0h0l-.005,0h-.013l-.007,0-.005,0h-.017l-.005,0-.006,0h-.013l-.005,0H12.7l-.012,0h0l-.005,0h-.012l-.01,0h-.019l-.005,0h0l-.012,0H12.61l-.006,0h0l-.012,0h-.018l-.019,0h-.018l-.02,0h-.01l-.02-.005h0l-.007,0h0l-.007,0h0L12.447.3h-.008L12.41.292h0l-.03-.007h0q-.273-.068-.55-.118Z", fill: "currentColor" })] }) }));
|
|
3055
|
+
}
|
|
3632
3056
|
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
}
|
|
3637
|
-
}
|
|
3638
|
-
}
|
|
3639
|
-
}
|
|
3057
|
+
function SelectPolygon({ color, size, ...nativeProps }) {
|
|
3058
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(120 -41)", children: [jsxs("g", { children: [jsx("path", { d: "M-114.675,45.646l-1.875-.7,1.113-2.994h3.2v2h-1.8Z", fill: "currentColor" }), jsx("rect", { fill: "currentColor", height: "2", transform: "translate(-117.788 48.28) rotate(-69.601)", width: "2.539" }), jsx("path", { d: "M-116.974,54.383l-2.266-2.192,1.1-2.956,1.875.7-.643,1.731,1.326,1.284Z", fill: "currentColor" }), jsx("rect", { fill: "currentColor", height: "2.664", transform: "matrix(0.695, -0.719, 0.719, 0.695, -116.207, 55.124)", width: "2" }), jsx("path", { d: "M-111.067,60.1l-2.459-2.379,1.391-1.437,1.135,1.1,1.185-1.041,1.32,1.5Z", fill: "currentColor" }), jsx("path", { d: "M-107.521,56.983l-1.318-1.5,1.4-1.174,1.559-.7.822,1.822-1.423.643Z", fill: "currentColor" }), jsx("path", { d: "M-103.869,54.893l-.82-1.824,1.57-.707-.3-1.7,1.971-.346.565,3.229Z", fill: "currentColor" }), jsx("rect", { fill: "currentColor", height: "2.862", transform: "translate(-104.11 46.717) rotate(-9.96)", width: "2.001" }), jsx("path", { d: "M-104.308,45.589l-.287-1.635h-1.66v-2h3.34l.578,3.289Z", fill: "currentColor" }), jsx("rect", { fill: "currentColor", height: "2", transform: "translate(-110.911 41.954)", width: "3.326" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-120 41)", width: "20" })] }) }) }));
|
|
3059
|
+
}
|
|
3640
3060
|
|
|
3641
|
-
|
|
3642
|
-
|
|
3061
|
+
function SelectRectangle({ color, size, ...nativeProps }) {
|
|
3062
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(160 -41)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-152 44) rotate(-90)", children: [jsx("rect", { height: "4", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "2", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-152 60) rotate(-90)", children: [jsx("rect", { height: "4", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "2", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-159 49)", children: [jsx("rect", { height: "4", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "2", x: "1", y: "1" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(-143 49)", children: [jsx("rect", { height: "4", stroke: "none", width: "2" }), jsx("rect", { fill: "none", height: "2", x: "1", y: "1" })] }), jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-159,42v5h2V44h3V42Z", stroke: "none" }), jsx("path", { d: "M -159 42 L -154 42 L -154 44 L -157 44 L -157 47 L -159 47 L -159 42 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-146,42v2h3v3h2V42Z", stroke: "none" }), jsx("path", { d: "M -146 42 L -141 42 L -141 47 L -143 47 L -143 44 L -146 44 L -146 42 Z", fill: "currentColor", stroke: "none" })] })] }), jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-157,55h-2v5h5V58h-3Z", stroke: "none" }), jsx("path", { d: "M -159 55 L -157 55 L -157 58 L -154 58 L -154 60 L -159 60 L -159 55 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M-143,55v3h-3v2h5V55Z", stroke: "none" }), jsx("path", { d: "M -143 55 L -141 55 L -141 60 L -146 60 L -146 58 L -143 58 L -143 55 Z", fill: "currentColor", stroke: "none" })] })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-160 41)", width: "20" })] }) }) }));
|
|
3063
|
+
}
|
|
3643
3064
|
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3065
|
+
function SelectZone({ color, size, ...nativeProps }) {
|
|
3066
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(80 -41)", children: [jsxs("g", { children: [jsxs("g", { children: [jsx("path", { d: "M-74.675,45.646l-1.875-.7,1.113-2.994h3.2v2h-1.8Z", fill: "currentColor" }), jsx("rect", { fill: "currentColor", height: "2", transform: "translate(-77.788 48.28) rotate(-69.601)", width: "2.539" }), jsx("path", { d: "M-77.377,54.526-79.2,52.089l1.06-2.854,1.875.7-.681,1.833,1.172,1.564Z", fill: "currentColor" }), jsx("path", { d: "M-74.679,58.132l-1.9-2.534,1.6-1.2,1.1,1.47,1.779-.445.486,1.939Z", fill: "currentColor" }), jsx("path", { d: "M-62.532,51.889l-1.66-1.115,1.122-1.67-.63-1.91,1.9-.625.935,2.838Z", fill: "currentColor" }), jsx("path", { d: "M-64.211,45.641l-.556-1.687h-1.776v-2h3.224l1.009,3.062Z", fill: "currentColor" }), jsx("rect", { fill: "currentColor", height: "2", transform: "translate(-70.975 41.954)", width: "3.166" })] }), jsx("path", { d: "M-67.806,56.455l2.689,3.869,2.328-1.612-2.687-3.877,2.71-1.872L-72.02,47.9-70.5,58.35Z", fill: "currentColor" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(-80 41)", width: "20" })] }) }) }));
|
|
3067
|
+
}
|
|
3647
3068
|
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
margin-top: 0;
|
|
3652
|
-
}
|
|
3069
|
+
function ShowErsMessages({ color, size, ...nativeProps }) {
|
|
3070
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-40 -41)", children: [jsxs("g", { children: [jsx("path", { d: "M50,42.667a5,5,0,0,0-5,5,4.926,4.926,0,0,0,.047.647c.013.113.031.225.051.337l.01.047C45.8,52.493,50,56,50,56s4.2-3.507,4.892-7.3l.01-.047c.02-.112.038-.224.051-.337A4.926,4.926,0,0,0,55,47.667,5,5,0,0,0,50,42.667Zm0,7.5a2.5,2.5,0,1,1,2.5-2.5A2.5,2.5,0,0,1,50,50.167Z", fill: "currentColor" }), jsxs("g", { fill: "#fff", strokeMiterlimit: "10", children: [jsx("path", { d: "M 50 57.97749710083008 C 49.69147872924805 57.97749710083008 49.38210678100586 57.94551086425781 49.07577133178711 57.88271331787109 C 49.38035202026367 57.93568420410156 49.6889762878418 57.96249771118164 50 57.96249771118164 C 50.3110237121582 57.96249771118164 50.61964797973633 57.93568420410156 50.92422866821289 57.88271331787109 C 50.61789321899414 57.94551086425781 50.30852127075195 57.97749710083008 50 57.97749710083008 Z", stroke: "none" }), jsx("path", { d: "M 46.79999923706055 55.67999649047852 C 48.75200271606445 57.38999557495117 51.24799728393555 57.38999557495117 53.20000076293945 55.67999649047852 C 54.17599868774414 56.52999877929688 55.28799819946289 56.99999618530273 56.40000152587891 56.99999618530273 L 58 56.99999618530273 L 58 58.99999618530273 L 56.40000152587891 58.99999618530273 C 55.29600143432617 58.99999618530273 54.20800018310547 58.65999603271484 53.20000076293945 58.0099983215332 C 51.18400192260742 59.29999923706055 48.81599807739258 59.29999923706055 46.79999923706055 58.0099983215332 C 45.79199981689453 58.64999771118164 44.70399856567383 58.99999618530273 43.59999847412109 58.99999618530273 L 42 58.99999618530273 L 42 56.99999618530273 L 43.59999847412109 56.99999618530273 C 44.71200180053711 56.99999618530273 45.82400131225586 56.52999877929688 46.79999923706055 55.67999649047852 Z", fill: "currentColor", stroke: "none" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(40 41)", width: "20" })] }) }) }));
|
|
3071
|
+
}
|
|
3653
3072
|
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
display: inline-flex;
|
|
3658
|
-
height: 33px;
|
|
3659
|
-
justify-content: center;
|
|
3660
|
-
padding-bottom: 3px;
|
|
3661
|
-
width: 33px;
|
|
3662
|
-
}
|
|
3663
|
-
:hover .rs-calendar-table-cell-content {
|
|
3664
|
-
background-color: ${p => p.theme.color.blueYonder[25]};
|
|
3665
|
-
color: ${p => p.theme.color.blueYonder[100]};
|
|
3666
|
-
}
|
|
3667
|
-
&[role='columnheader'] .rs-calendar-table-cell-content,
|
|
3668
|
-
&[role='columnheader']:hover .rs-calendar-table-cell-content {
|
|
3669
|
-
background-color: transparent;
|
|
3670
|
-
color: ${p => p.theme.color.slateGray};
|
|
3671
|
-
}
|
|
3672
|
-
&.rs-calendar-table-cell-disabled .rs-calendar-table-cell-content {
|
|
3673
|
-
background-color: transparent;
|
|
3674
|
-
color: ${p => p.theme.color.lightGray};
|
|
3675
|
-
}
|
|
3676
|
-
&.rs-calendar-table-cell-selected > .rs-calendar-table-cell-content {
|
|
3677
|
-
background-color: ${p => p.theme.color.blueGray[100]};
|
|
3678
|
-
}
|
|
3679
|
-
}
|
|
3680
|
-
}
|
|
3681
|
-
}
|
|
3682
|
-
}
|
|
3683
|
-
`;
|
|
3073
|
+
function ShowXml({ color, size, ...nativeProps }) {
|
|
3074
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-120)", children: [jsx("path", { d: "M136.646,2H123.354A3.354,3.354,0,0,0,120,5.354v9.292A3.354,3.354,0,0,0,123.354,18h13.292A3.354,3.354,0,0,0,140,14.646V5.354A3.354,3.354,0,0,0,136.646,2ZM125.607,12.863l-1.269-1.98-1.274,1.98h-1.386l1.957-2.988-1.774-2.738h1.352l1.148,1.84,1.125-1.84h1.34l-1.781,2.781L127,12.863Zm7.5,0h-1.074V8.355L130.9,12.863h-1.113l-1.133-4.508v4.508H127.58V7.137h1.731l1.039,3.906,1.027-3.906h1.734Zm5.211,0h-4.031V7.184h1.156V11.9h2.875Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(120)", width: "20" })] }) }) }));
|
|
3075
|
+
}
|
|
3684
3076
|
|
|
3685
|
-
function
|
|
3686
|
-
|
|
3687
|
-
const filteredRangedTimeOptions = useMemo(() => rangedTimeOptions.filter(({ label }) => filter.test(label)), [filter, rangedTimeOptions]);
|
|
3688
|
-
const [selectedOptionIndex, setSelectedOptionIndex] = useState(0);
|
|
3689
|
-
const handleBoxKeyDown = useCallback((event) => {
|
|
3690
|
-
if (event.key === 'ArrowDown') {
|
|
3691
|
-
event.preventDefault();
|
|
3692
|
-
const nextSelectedOptionIndex = selectedOptionIndex < filteredRangedTimeOptions.length - 1 ? selectedOptionIndex + 1 : 0;
|
|
3693
|
-
setSelectedOptionIndex(nextSelectedOptionIndex);
|
|
3694
|
-
window.document.querySelectorAll('.js-ranged-time-picker-option')[nextSelectedOptionIndex]?.scrollIntoView();
|
|
3695
|
-
}
|
|
3696
|
-
if (event.key === 'ArrowUp') {
|
|
3697
|
-
event.preventDefault();
|
|
3698
|
-
const nextSelectedOptionIndex = selectedOptionIndex > 0 ? selectedOptionIndex - 1 : filteredRangedTimeOptions.length - 1;
|
|
3699
|
-
setSelectedOptionIndex(nextSelectedOptionIndex);
|
|
3700
|
-
window.document.querySelectorAll('.js-ranged-time-picker-option')[nextSelectedOptionIndex]?.scrollIntoView();
|
|
3701
|
-
}
|
|
3702
|
-
if (['Enter', 'Space', 'Tab'].includes(event.key)) {
|
|
3703
|
-
const selectedRangedTimeOption = filteredRangedTimeOptions[selectedOptionIndex];
|
|
3704
|
-
if (!selectedRangedTimeOption) {
|
|
3705
|
-
return;
|
|
3706
|
-
}
|
|
3707
|
-
onChange(selectedRangedTimeOption.value);
|
|
3708
|
-
}
|
|
3709
|
-
}, [filteredRangedTimeOptions, selectedOptionIndex, onChange]);
|
|
3710
|
-
useEffect(() => {
|
|
3711
|
-
window.addEventListener('keydown', handleBoxKeyDown, {
|
|
3712
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3713
|
-
once: true
|
|
3714
|
-
});
|
|
3715
|
-
return () => {
|
|
3716
|
-
window.removeEventListener('keydown', handleBoxKeyDown);
|
|
3717
|
-
};
|
|
3718
|
-
}, [handleBoxKeyDown]);
|
|
3719
|
-
useEffect(() => {
|
|
3720
|
-
setSelectedOptionIndex(0);
|
|
3721
|
-
}, [filteredRangedTimeOptions]);
|
|
3722
|
-
if (!filteredRangedTimeOptions.length) {
|
|
3723
|
-
return jsx(Fragment, {});
|
|
3724
|
-
}
|
|
3725
|
-
return (jsx(Box$4, { onClick: stopMouseEventPropagation, role: "listbox", children: filteredRangedTimeOptions.map(({ label, value }, index) => (jsx(Option, { "aria-selected": false, className: "js-ranged-time-picker-option", isSelected: index === selectedOptionIndex, onClick: () => onChange(value), role: "option", tabIndex: -1, children: label }, label))) }));
|
|
3077
|
+
function SortingArrows({ color, size, ...nativeProps }) {
|
|
3078
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-40)", children: [jsxs("g", { children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M57.536,11.636,55,14.172V2H53V14.172l-2.536-2.536L49.05,13.05,54,18l4.95-4.95Z", stroke: "none" }), jsx("path", { d: "M 54 18 L 49.05022811889648 13.05023002624512 L 50.46448135375977 11.6360502243042 L 53 14.17156982421875 L 53 2 L 55 2 L 55 14.17156982421875 L 57.53551864624023 11.6360502243042 L 58.94977188110352 13.05023002624512 L 54 18 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M50.95,6.95,46,2,41.05,6.95l1.414,1.414L45,5.828V18h2V5.828l2.536,2.536Z", stroke: "none" }), jsx("path", { d: "M 46 2 L 50.94977188110352 6.949709892272949 L 49.53551864624023 8.363949775695801 L 47 5.828370094299316 L 47 18 L 45 18 L 45 5.828370094299316 L 42.46448135375977 8.363949775695801 L 41.05022811889648 6.949709892272949 L 46 2 Z", fill: "currentColor", stroke: "none" })] })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(40)", width: "20" })] }) }) }));
|
|
3726
3079
|
}
|
|
3727
|
-
const Box$4 = styled.div `
|
|
3728
|
-
background-color: ${p => p.theme.color.gainsboro};
|
|
3729
|
-
display: flex;
|
|
3730
|
-
flex-direction: column;
|
|
3731
|
-
left: -1px;
|
|
3732
|
-
max-height: 160px;
|
|
3733
|
-
overflow: auto;
|
|
3734
|
-
position: absolute;
|
|
3735
|
-
/* Non-WebKit Firefox Compatibility */
|
|
3736
|
-
scrollbar-color: ${p => p.theme.color.lightGray};
|
|
3737
|
-
scrollbar-width: thin;
|
|
3738
|
-
top: 36px;
|
|
3739
|
-
z-index: 9999;
|
|
3740
3080
|
|
|
3741
|
-
|
|
3742
|
-
-
|
|
3743
|
-
|
|
3744
|
-
::-webkit-scrollbar:vertical {
|
|
3745
|
-
width: 5px;
|
|
3746
|
-
}
|
|
3747
|
-
::-webkit-scrollbar-thumb {
|
|
3748
|
-
border: 0;
|
|
3749
|
-
background-color: ${p => p.theme.color.lightGray};
|
|
3750
|
-
}
|
|
3751
|
-
::-webkit-scrollbar-track {
|
|
3752
|
-
background-color: ${p => p.theme.color.gainsboro};
|
|
3753
|
-
}
|
|
3754
|
-
`;
|
|
3755
|
-
const Option = styled.div `
|
|
3756
|
-
background-color: ${p => (p.isSelected ? p.theme.color.blueGray[100] : 'transparent')};
|
|
3757
|
-
cursor: pointer;
|
|
3758
|
-
line-height: 1;
|
|
3759
|
-
padding: 5px 9px 7px 8px;
|
|
3760
|
-
text-align: center;
|
|
3081
|
+
function Summary({ color, size, ...nativeProps }) {
|
|
3082
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsxs("defs", { children: [jsx("clipPath", { children: jsx("use", {}) }), jsx("clipPath", { children: jsx("use", {}) }), jsx("clipPath", { children: jsx("use", {}) })] }), jsxs("g", { transform: "translate(-200)", children: [jsx("path", { d: "M216,4V16H204V4h12M202,2V18h16V2Z", fill: "currentColor" }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(206 6)", children: [jsx("rect", { height: "1.5", stroke: "none", width: "8" }), jsx("path", { clipPath: "url(#clip)", d: "M0,0.5h8M7,0v1.5M8,1h-8M1,1.5v-1.5", fill: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(206 9.25)", children: [jsx("rect", { height: "1.5", stroke: "none", width: "8" }), jsx("path", { clipPath: "url(#clip-2)", d: "M0,0.5h8M7,0v1.5M8,1h-8M1,1.5v-1.5", fill: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(206 12.5)", children: [jsx("rect", { height: "1.5", stroke: "none", width: "8" }), jsx("path", { clipPath: "url(#clip-3)", d: "M0,0.5h8M7,0v1.5M8,1h-8M1,1.5v-1.5", fill: "none" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(200)", width: "20" })] })] }) }));
|
|
3083
|
+
}
|
|
3761
3084
|
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
`;
|
|
3085
|
+
function Tag({ color, size, ...nativeProps }) {
|
|
3086
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-160)", children: [jsx("path", { d: "M173.063,6l3.334,4-3.334,4H164V6h9.063M174,4H162V16h12l5-6-5-6Z", fill: "currentColor" }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(170.5 8.5)", children: [jsx("circle", { cx: "1.5", cy: "1.5", r: "1.5", stroke: "none" }), jsx("circle", { cx: "1.5", cy: "1.5", fill: "none", r: "0.5" })] }), jsx("rect", { fill: "none", height: "20", transform: "translate(160)", width: "20" })] }) }) }));
|
|
3087
|
+
}
|
|
3766
3088
|
|
|
3767
|
-
function
|
|
3768
|
-
|
|
3769
|
-
const hourInputRef = useRef();
|
|
3770
|
-
const minuteInputRef = useRef();
|
|
3771
|
-
const [controlledDefaultValue, setControlledDefaultValue] = useState(defaultValue);
|
|
3772
|
-
const [hasFormatError, setHasFormatError] = useState(false);
|
|
3773
|
-
const [hasValidationError, setHasValidationError] = useState(false);
|
|
3774
|
-
const [isFocused, setIsFocused] = useState(false);
|
|
3775
|
-
useImperativeHandle(ref, () => ({
|
|
3776
|
-
boxSpan: boxSpanRef.current,
|
|
3777
|
-
focus: (isInLastInputOfTheGroup = false) => {
|
|
3778
|
-
if (isInLastInputOfTheGroup) {
|
|
3779
|
-
minuteInputRef.current.focus();
|
|
3780
|
-
}
|
|
3781
|
-
else {
|
|
3782
|
-
hourInputRef.current.focus();
|
|
3783
|
-
}
|
|
3784
|
-
}
|
|
3785
|
-
}));
|
|
3786
|
-
const isRangedTimePickerOpenRef = useRef(false);
|
|
3787
|
-
const [rangedTimePickerFilter, setRangedTimePickerFilter] = useState(/.*/);
|
|
3788
|
-
const { forceUpdate } = useForceUpdate();
|
|
3789
|
-
const closeRangedTimePicker = useCallback(() => {
|
|
3790
|
-
isRangedTimePickerOpenRef.current = false;
|
|
3791
|
-
forceUpdate();
|
|
3792
|
-
}, [forceUpdate]);
|
|
3793
|
-
const handleBack = useCallback(() => {
|
|
3794
|
-
if (!onBack) {
|
|
3795
|
-
return;
|
|
3796
|
-
}
|
|
3797
|
-
closeRangedTimePicker();
|
|
3798
|
-
onBack();
|
|
3799
|
-
}, [closeRangedTimePicker, onBack]);
|
|
3800
|
-
const handleBlur = useCallback(() => {
|
|
3801
|
-
setIsFocused(false);
|
|
3802
|
-
}, []);
|
|
3803
|
-
const handleClickOutside = useCallback((event) => {
|
|
3804
|
-
const target = event.target;
|
|
3805
|
-
if (hourInputRef.current.contains(target) || minuteInputRef.current.contains(target)) {
|
|
3806
|
-
return;
|
|
3807
|
-
}
|
|
3808
|
-
closeRangedTimePicker();
|
|
3809
|
-
}, [closeRangedTimePicker]);
|
|
3810
|
-
const handleFocus = useCallback(() => {
|
|
3811
|
-
setIsFocused(true);
|
|
3812
|
-
if (onFocus) {
|
|
3813
|
-
onFocus();
|
|
3814
|
-
}
|
|
3815
|
-
}, [onFocus]);
|
|
3816
|
-
const handleFormatError = useCallback((hasNextFormatError) => {
|
|
3817
|
-
setHasFormatError(hasNextFormatError);
|
|
3818
|
-
}, []);
|
|
3819
|
-
const handleRangedTimePickedChange = useCallback((nextTimeTuple) => {
|
|
3820
|
-
closeRangedTimePicker();
|
|
3821
|
-
setControlledDefaultValue(nextTimeTuple);
|
|
3822
|
-
onChange(nextTimeTuple);
|
|
3823
|
-
}, [closeRangedTimePicker, onChange]);
|
|
3824
|
-
const handleHourInput = useCallback((nextValue) => {
|
|
3825
|
-
// eslint-disable-next-line no-nested-ternary
|
|
3826
|
-
const nextRangedTimePickerFilter = nextValue.length ? new RegExp(`^${nextValue}`) : /.*/;
|
|
3827
|
-
setRangedTimePickerFilter(nextRangedTimePickerFilter);
|
|
3828
|
-
}, []);
|
|
3829
|
-
const openRangedTimePicker = useCallback(() => {
|
|
3830
|
-
isRangedTimePickerOpenRef.current = true;
|
|
3831
|
-
forceUpdate();
|
|
3832
|
-
}, [forceUpdate]);
|
|
3833
|
-
useEffect(() => {
|
|
3834
|
-
window.document.addEventListener('click', handleClickOutside);
|
|
3835
|
-
return () => {
|
|
3836
|
-
window.document.removeEventListener('click', handleClickOutside);
|
|
3837
|
-
};
|
|
3838
|
-
}, [handleClickOutside]);
|
|
3839
|
-
const submit = useCallback(() => {
|
|
3840
|
-
setHasValidationError(false);
|
|
3841
|
-
if (window.document.activeElement === hourInputRef.current) {
|
|
3842
|
-
minuteInputRef.current.focus();
|
|
3843
|
-
}
|
|
3844
|
-
if (!hourInputRef.current.value.length || !minuteInputRef.current.value.length) {
|
|
3845
|
-
if (minuteInputRef.current.value.length && !hourInputRef.current.value.length) {
|
|
3846
|
-
setHasValidationError(true);
|
|
3847
|
-
}
|
|
3848
|
-
return;
|
|
3849
|
-
}
|
|
3850
|
-
closeRangedTimePicker();
|
|
3851
|
-
const nextTimeTuple = [hourInputRef.current.value, minuteInputRef.current.value];
|
|
3852
|
-
onChange(nextTimeTuple);
|
|
3853
|
-
}, [closeRangedTimePicker, onChange]);
|
|
3854
|
-
return (jsxs(Box$3, { ref: boxSpanRef, "$hasError": hasFormatError || hasValidationError, "$isFocused": isFocused, "$isLight": isLight, children: [jsxs(Fragment, { children: [jsx(NumberInput$1, { ref: hourInputRef, "aria-label": `Heure${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: controlledDefaultValue && controlledDefaultValue[0], max: 23, min: 0, onBack: handleBack, onBlur: handleBlur, onClick: openRangedTimePicker, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onInput: handleHourInput, onNext: () => minuteInputRef.current.focus(), onPrevious: onPrevious, size: 2 }), ":", jsx(NumberInput$1, { ref: minuteInputRef, "aria-label": `Minute${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: controlledDefaultValue && controlledDefaultValue[1], max: 59, min: 0, onBack: () => hourInputRef.current.focus(), onBlur: handleBlur, onClick: openRangedTimePicker, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: onNext, onPrevious: () => hourInputRef.current.focus(), size: 2 })] }), isRangedTimePickerOpenRef.current && (jsx(RangedTimePicker, { filter: rangedTimePickerFilter, minutesRange: minutesRange, onChange: handleRangedTimePickedChange }))] }));
|
|
3089
|
+
function Target({ color, size, ...nativeProps }) {
|
|
3090
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsxs("g", { fill: "none", strokeMiterlimit: "10", children: [jsx("path", { d: "M20,9H17.931A7.994,7.994,0,0,0,11,2.069V0H9V2.069A7.994,7.994,0,0,0,2.069,9H0v2H2.069A7.994,7.994,0,0,0,9,17.931V20h2V17.931A7.994,7.994,0,0,0,17.931,11H20Zm-9,6.91V14H9v1.91A6.008,6.008,0,0,1,4.09,11H6V9H4.09A6.008,6.008,0,0,1,9,4.09V6h2V4.09A6.008,6.008,0,0,1,15.91,9H14v2h1.91A6.008,6.008,0,0,1,11,15.91Z", stroke: "none" }), jsx("path", { d: "M 9 0 L 11 0 L 11 2.069000244140625 C 14.61700057983398 2.520999908447266 17.47900009155273 5.383000373840332 17.93099975585938 9 L 20 9 L 20 11 L 17.93099975585938 11 C 17.47900009155273 14.61700057983398 14.61700057983398 17.47900009155273 11 17.93099975585938 L 11 20 L 9 20 L 9 17.93099975585938 C 5.383000373840332 17.47900009155273 2.520999908447266 14.61700057983398 2.069000244140625 11 L 0 11 L 0 9 L 2.069000244140625 9 C 2.520999908447266 5.383000373840332 5.383000373840332 2.520999908447266 9 2.069000244140625 L 9 0 Z M 11 6 L 9 6 L 9 4.090000152587891 C 6.493000030517578 4.513999938964844 4.513999938964844 6.493000030517578 4.090000152587891 9 L 6 9 L 6 11 L 4.090000152587891 11 C 4.513999938964844 13.50699996948242 6.493000030517578 15.48600006103516 9 15.90999984741211 L 9 14 L 11 14 L 11 15.90999984741211 C 13.50699996948242 15.48600006103516 15.48600006103516 13.50699996948242 15.90999984741211 11 L 14 11 L 14 9 L 15.90999984741211 9 C 15.48600006103516 6.493000030517578 13.50699996948242 4.513999938964844 11 4.090000152587891 L 11 6 Z", fill: "currentColor", stroke: "none" })] }), jsxs("g", { fill: "none", stroke: "currentColor", strokeMiterlimit: "10", strokeWidth: "2", transform: "translate(8.5 8.5)", children: [jsx("circle", { cx: "1.5", cy: "1.5", r: "1.5", stroke: "none" }), jsx("circle", { cx: "1.5", cy: "1.5", fill: "none", r: "0.5" })] }), jsx("path", { d: "M0,0H20V20H0Z", fill: "none" })] }) }));
|
|
3855
3091
|
}
|
|
3856
|
-
const TimeInput = forwardRef(TimeInputWithRef);
|
|
3857
|
-
const Box$3 = styled.span `
|
|
3858
|
-
background-color: ${p => (p.$isLight ? p.theme.color.white : p.theme.color.gainsboro)};
|
|
3859
|
-
box-shadow: ${p => p.$hasError || p.$isFocused
|
|
3860
|
-
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100]}`
|
|
3861
|
-
: 'none'};
|
|
3862
|
-
color: ${p => p.theme.color.slateGray};
|
|
3863
|
-
display: inline-block;
|
|
3864
|
-
font-size: inherit;
|
|
3865
|
-
padding: 5px 8px 7px;
|
|
3866
|
-
position: relative;
|
|
3867
|
-
user-select: none;
|
|
3868
3092
|
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
`;
|
|
3093
|
+
function Unlock({ color, size, ...nativeProps }) {
|
|
3094
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M0,0H20V20H0Z", fill: "none" }), jsxs("g", { children: [jsx("path", { d: "M0,0H20V20H0Z", fill: "none" }), jsxs("g", { children: [jsx("circle", { cx: "1.5", cy: "1.5", fill: "currentColor", r: "1.5", transform: "translate(8.5 11.5)" }), jsx("path", { d: "M14.471,7V5.456a4.471,4.471,0,0,0-8.942,0H7.765a2.235,2.235,0,1,1,4.47,0V7H3V19H17V7ZM15,17H5V9H15Z", fill: "currentColor" })] })] })] }) }));
|
|
3095
|
+
}
|
|
3873
3096
|
|
|
3874
|
-
|
|
3875
|
-
(
|
|
3876
|
-
|
|
3877
|
-
DateRangePosition["START"] = "START";
|
|
3878
|
-
})(DateRangePosition || (DateRangePosition = {}));
|
|
3097
|
+
function Vessel({ color, size, ...nativeProps }) {
|
|
3098
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-260 -208)", children: [jsx("path", { d: "M327.865,17.99a.226.226,0,0,1-.15-.184l-.64-4.879-4.88-.64a.225.225,0,0,1-.129-.382l6.81-6.811a.222.222,0,0,1,.085-.053L337.7,2.013a.224.224,0,0,1,.285.285l-3.028,8.741a.222.222,0,0,1-.053.085l-6.811,6.81a.225.225,0,0,1-.159.066A.244.244,0,0,1,327.865,17.99Z", fill: "currentColor", transform: "translate(-60 208)" }), jsx("rect", { fill: "none", height: "20", transform: "translate(260 208)", width: "20" })] }) }) }));
|
|
3099
|
+
}
|
|
3879
3100
|
|
|
3880
|
-
function
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3101
|
+
function ViewOnMap({ color, size, ...nativeProps }) {
|
|
3102
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M18.5,1.523l-6,2.4-5-2-6,2.4V18.477l6-2.4,5,2,6-2.4ZM3.5,5.677l3-1.2v9.846l-3,1.2Zm5,8.646V4.477l3,1.2v9.846Zm8,0-3,1.2V5.677l3-1.2Z", fill: "currentColor" }), jsx("rect", { fill: "none", height: "20", transform: "translate(0)", width: "20" })] }) }));
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
function Vms({ color, size, ...nativeProps }) {
|
|
3106
|
+
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M12.5,9A2.5,2.5,0,1,0,9,11.289V19h2V11.289A2.5,2.5,0,0,0,12.5,9Z", fill: "currentColor" }), jsxs("g", { children: [jsx("path", { d: "M12.558,12.049l1.3,1.546a5.994,5.994,0,0,0,0-9.19l-1.3,1.546a3.944,3.944,0,0,1,0,6.1Z", fill: "currentColor", opacity: "0.98" }), jsx("path", { d: "M6.144,13.594l1.3-1.545a3.946,3.946,0,0,1,0-6.095l-1.3-1.543a5.993,5.993,0,0,0,.005,9.183Z", fill: "currentColor", opacity: "0.98" })] }), jsxs("g", { children: [jsx("path", { d: "M4.206,15.9,5.494,14.37A6.983,6.983,0,0,1,5.508,3.66L4.218,2.128A8.992,8.992,0,0,0,4.206,15.9Z", fill: "currentColor", opacity: "0.98" }), jsx("path", { d: "M17,9.021a6.985,6.985,0,0,1-2.494,5.349L15.793,15.9A8.99,8.99,0,0,0,15.772,2.12L14.485,3.654A6.983,6.983,0,0,1,17,9.021Z", fill: "currentColor", opacity: "0.98" })] }), jsx("path", { d: "M0,0H20V20H0Z", fill: "none" })] }) }));
|
|
3107
|
+
}
|
|
3108
|
+
|
|
3109
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
3110
|
+
__proto__: null,
|
|
3111
|
+
ActivityFeed: ActivityFeed,
|
|
3112
|
+
Alert: Alert,
|
|
3113
|
+
Anchor: Anchor,
|
|
3114
|
+
Archive: Archive,
|
|
3115
|
+
Attention: Attention,
|
|
3116
|
+
Calendar: Calendar,
|
|
3117
|
+
Check: Check,
|
|
3118
|
+
Chevron: Chevron,
|
|
3119
|
+
Clock: Clock,
|
|
3120
|
+
Close: Close,
|
|
3121
|
+
Confirm: Confirm,
|
|
3122
|
+
Control: Control,
|
|
3123
|
+
Delete: Delete,
|
|
3124
|
+
Display: Display,
|
|
3125
|
+
DoubleChevron: DoubleChevron,
|
|
3126
|
+
Download: Download,
|
|
3127
|
+
Drapeau: Drapeau,
|
|
3128
|
+
Duplicate: Duplicate,
|
|
3129
|
+
Edit: Edit,
|
|
3130
|
+
EditBis: EditBis,
|
|
3131
|
+
Favorite: Favorite,
|
|
3132
|
+
FilledArrow: FilledArrow,
|
|
3133
|
+
Filter: Filter,
|
|
3134
|
+
FilterBis: FilterBis,
|
|
3135
|
+
Fishery: Fishery,
|
|
3136
|
+
FishingEngine: FishingEngine,
|
|
3137
|
+
FleetSegment: FleetSegment,
|
|
3138
|
+
Focus: Focus,
|
|
3139
|
+
FocusVessel: FocusVessel,
|
|
3140
|
+
FocusZones: FocusZones,
|
|
3141
|
+
Hide: Hide,
|
|
3142
|
+
Info: Info,
|
|
3143
|
+
Infringement: Infringement,
|
|
3144
|
+
Landmark: Landmark,
|
|
3145
|
+
List: List,
|
|
3146
|
+
MapLayers: MapLayers,
|
|
3147
|
+
MeasureAngle: MeasureAngle,
|
|
3148
|
+
MeasureBrokenLine: MeasureBrokenLine,
|
|
3149
|
+
MeasureCircle: MeasureCircle,
|
|
3150
|
+
MeasureLine: MeasureLine,
|
|
3151
|
+
Minus: Minus,
|
|
3152
|
+
More: More,
|
|
3153
|
+
Note: Note,
|
|
3154
|
+
Observation: Observation,
|
|
3155
|
+
Pin: Pin,
|
|
3156
|
+
Pinpoint: Pinpoint,
|
|
3157
|
+
PinpointHide: PinpointHide,
|
|
3158
|
+
Plane: Plane,
|
|
3159
|
+
Plus: Plus,
|
|
3160
|
+
Reject: Reject,
|
|
3161
|
+
Save: Save,
|
|
3162
|
+
Search: Search,
|
|
3163
|
+
SelectCircle: SelectCircle,
|
|
3164
|
+
SelectPolygon: SelectPolygon,
|
|
3165
|
+
SelectRectangle: SelectRectangle,
|
|
3166
|
+
SelectZone: SelectZone,
|
|
3167
|
+
ShowErsMessages: ShowErsMessages,
|
|
3168
|
+
ShowXml: ShowXml,
|
|
3169
|
+
SortingArrows: SortingArrows,
|
|
3170
|
+
Summary: Summary,
|
|
3171
|
+
Tag: Tag,
|
|
3172
|
+
Target: Target,
|
|
3173
|
+
Unlock: Unlock,
|
|
3174
|
+
Vessel: Vessel,
|
|
3175
|
+
ViewOnMap: ViewOnMap,
|
|
3176
|
+
Vms: Vms
|
|
3177
|
+
});
|
|
3178
|
+
|
|
3179
|
+
function NumberInputWithRef({ defaultValue, isLight, max, min, onBack, onClick, onFilled, onFocus, onFormatError, onInput, onNext, onPrevious, size, ...nativeProps }, ref) {
|
|
3180
|
+
const inputRef = useRef();
|
|
3181
|
+
const placeholder = useMemo(() => '-'.repeat(size), [size]);
|
|
3182
|
+
useImperativeHandle(ref, () => inputRef.current);
|
|
3183
|
+
const handleClick = useCallback((event) => {
|
|
3184
|
+
// event.stopPropagation()
|
|
3185
|
+
if (onClick) {
|
|
3186
|
+
onClick(event);
|
|
3924
3187
|
}
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
if (
|
|
3929
|
-
|
|
3930
|
-
return;
|
|
3188
|
+
}, [onClick]);
|
|
3189
|
+
const handleFocus = useCallback((event) => {
|
|
3190
|
+
inputRef.current.select();
|
|
3191
|
+
if (onFocus) {
|
|
3192
|
+
onFocus(event);
|
|
3931
3193
|
}
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3194
|
+
}, [onFocus]);
|
|
3195
|
+
const handleInput = useCallback(() => {
|
|
3196
|
+
onFormatError(false);
|
|
3197
|
+
const { value } = inputRef.current;
|
|
3198
|
+
if (onInput) {
|
|
3199
|
+
onInput(value);
|
|
3938
3200
|
}
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
const handleDateInputFilled = useCallback((position, nextDateTuple) => {
|
|
3942
|
-
if (position === DateRangePosition.START) {
|
|
3943
|
-
selectedStartDateTupleRef.current = nextDateTuple;
|
|
3944
|
-
// If there is no time input or a start time has already been selected,
|
|
3945
|
-
if (!withTime || selectedStartTimeTupleRef.current) {
|
|
3946
|
-
// we must update the selected start date and call onChange()
|
|
3947
|
-
const startTimeTuple = (withTime ? selectedStartTimeTupleRef.current : ['00', '00']);
|
|
3948
|
-
const nextStartDate = getDateFromDateAndTimeTuple(nextDateTuple, startTimeTuple);
|
|
3949
|
-
selectedStartDateRef.current = nextStartDate;
|
|
3950
|
-
submit();
|
|
3951
|
-
}
|
|
3952
|
-
handleStartDateInputNext();
|
|
3201
|
+
if (value.length !== size) {
|
|
3202
|
+
return;
|
|
3953
3203
|
}
|
|
3954
|
-
|
|
3955
|
-
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
// we must update the selected end date and call onChange()
|
|
3959
|
-
const endTimeTuple = (withTime ? selectedEndTimeTupleRef.current : ['23', '59']);
|
|
3960
|
-
const nextEndDate = getDateFromDateAndTimeTuple(nextDateTuple, endTimeTuple, true);
|
|
3961
|
-
selectedEndDateRef.current = nextEndDate;
|
|
3962
|
-
submit();
|
|
3963
|
-
}
|
|
3964
|
-
handleEndDateInputNext();
|
|
3204
|
+
const valueAsNumber = Number(inputRef.current.value);
|
|
3205
|
+
if (Number.isNaN(valueAsNumber) || valueAsNumber < min || valueAsNumber > max) {
|
|
3206
|
+
onFormatError(true);
|
|
3207
|
+
return;
|
|
3965
3208
|
}
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
const [nextStartDateTuple, nextEndDateTuple] = nextDateTupleRange;
|
|
3969
|
-
// If this is a date picker without a time input,
|
|
3970
|
-
if (!withTime) {
|
|
3971
|
-
// we have to fix the start date at the beginning of the day
|
|
3972
|
-
const nextStartDate = getDateFromDateAndTimeTuple(nextStartDateTuple, ['00', '00']);
|
|
3973
|
-
// and the end date at the end of the day
|
|
3974
|
-
const nextEndDate = getDateFromDateAndTimeTuple(nextEndDateTuple, ['23', '59'], true);
|
|
3975
|
-
selectedStartDateRef.current = nextStartDate;
|
|
3976
|
-
selectedEndDateRef.current = nextEndDate;
|
|
3209
|
+
if (onFilled && value.length === size) {
|
|
3210
|
+
onFilled();
|
|
3977
3211
|
}
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
//
|
|
3984
|
-
|
|
3985
|
-
|
|
3212
|
+
}, [max, min, onFilled, onFormatError, onInput, size]);
|
|
3213
|
+
const handleKeyDown = useCallback((event) => {
|
|
3214
|
+
if (onPrevious &&
|
|
3215
|
+
event.key === 'ArrowLeft' &&
|
|
3216
|
+
inputRef.current.selectionStart === 0 &&
|
|
3217
|
+
// We don't want to call that function when the user is selecting the input text
|
|
3218
|
+
inputRef.current.selectionEnd === inputRef.current.selectionStart) {
|
|
3219
|
+
event.preventDefault();
|
|
3220
|
+
onPrevious();
|
|
3221
|
+
return;
|
|
3986
3222
|
}
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
const handleTimeInputFilled = useCallback((position, nextTimeTuple) => {
|
|
3996
|
-
if (position === DateRangePosition.START) {
|
|
3997
|
-
// If a start date has already been selected
|
|
3998
|
-
if (selectedStartDateTupleRef.current) {
|
|
3999
|
-
// we must update the selected start date accordingly and submit it
|
|
4000
|
-
const nextStartDate = getDateFromDateAndTimeTuple(selectedStartDateTupleRef.current, nextTimeTuple);
|
|
4001
|
-
selectedStartDateRef.current = nextStartDate;
|
|
4002
|
-
submit();
|
|
4003
|
-
}
|
|
4004
|
-
selectedStartTimeTupleRef.current = nextTimeTuple;
|
|
4005
|
-
endDateInputRef.current.focus();
|
|
3223
|
+
if (onNext &&
|
|
3224
|
+
event.key === 'ArrowRight' &&
|
|
3225
|
+
inputRef.current.selectionStart === inputRef.current.value.length &&
|
|
3226
|
+
// We don't want to call that function when the user is selecting the input text
|
|
3227
|
+
inputRef.current.selectionEnd === inputRef.current.selectionStart) {
|
|
3228
|
+
event.preventDefault();
|
|
3229
|
+
onNext();
|
|
3230
|
+
return;
|
|
4006
3231
|
}
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
// we must update the selected end date accordingly and submit it
|
|
4011
|
-
const nextEndDate = getDateFromDateAndTimeTuple(selectedEndDateTupleRef.current, nextTimeTuple, true);
|
|
4012
|
-
selectedEndDateRef.current = nextEndDate;
|
|
4013
|
-
submit();
|
|
4014
|
-
}
|
|
4015
|
-
selectedEndTimeTupleRef.current = nextTimeTuple;
|
|
3232
|
+
if (onBack && event.key === 'Backspace' && !inputRef.current.value.length) {
|
|
3233
|
+
event.preventDefault();
|
|
3234
|
+
onBack();
|
|
4016
3235
|
}
|
|
4017
|
-
|
|
4018
|
-
},
|
|
4019
|
-
const openRangeCalendarPicker = useCallback(() => {
|
|
4020
|
-
isRangeCalendarPickerOpenRef.current = true;
|
|
4021
|
-
forceUpdate();
|
|
4022
|
-
}, [forceUpdate]);
|
|
4023
|
-
useEffect(() => {
|
|
4024
|
-
window.document.addEventListener('click', handleClickOutside);
|
|
4025
|
-
return () => {
|
|
4026
|
-
window.document.removeEventListener('click', handleClickOutside);
|
|
4027
|
-
};
|
|
4028
|
-
}, [handleClickOutside]);
|
|
4029
|
-
return (jsxs(Fieldset, { ...nativeProps, children: [jsx(Legend, { isHidden: isLabelHidden, children: label }), jsxs(Box$2, { children: [jsx(Field$1, { children: jsx(DateInput, { ref: startDateInputRef, defaultValue: selectedStartDateTupleRef.current, isForcedFocused: isRangeCalendarPickerOpenRef.current, isLight: isLight, isStartDate: true, onChange: nextDateTuple => handleDateInputFilled(DateRangePosition.START, nextDateTuple), onClick: openRangeCalendarPicker, onNext: handleStartDateInputNext }) }), withTime && (jsx(Field$1, { isTimeField: true, children: jsx(TimeInput, { ref: startTimeInputRef, defaultValue: selectedStartTimeTupleRef.current, isLight: isLight, isStartDate: true, minutesRange: minutesRange, onBack: () => startDateInputRef.current.focus(true), onChange: nextTimeTuple => handleTimeInputFilled(DateRangePosition.START, nextTimeTuple), onFocus: closeRangeCalendarPicker, onNext: () => endDateInputRef.current.focus(), onPrevious: () => startDateInputRef.current.focus(true) }) })), jsx(Field$1, { isEndDateField: true, children: jsx(DateInput, { ref: endDateInputRef, defaultValue: selectedEndDateTupleRef.current, isEndDate: true, isForcedFocused: isRangeCalendarPickerOpenRef.current, isLight: isLight, onBack: handleEndDateInputPrevious, onChange: nextDateTuple => handleDateInputFilled(DateRangePosition.END, nextDateTuple), onClick: openRangeCalendarPicker, onNext: handleEndDateInputNext, onPrevious: handleEndDateInputPrevious }) }), withTime && (jsx(Field$1, { isTimeField: true, children: jsx(TimeInput, { ref: endTimeInputRef, defaultValue: selectedEndTimeTupleRef.current, isEndDate: true, isLight: isLight, minutesRange: minutesRange, onBack: () => endDateInputRef.current.focus(true), onChange: nextTimeTuple => handleTimeInputFilled(DateRangePosition.END, nextTimeTuple), onFocus: closeRangeCalendarPicker, onPrevious: () => endDateInputRef.current.focus(true) }) }))] }), isRangeCalendarPickerOpenRef.current && (jsx(RangeCalendarPicker, { defaultValue: rangeCalendarPickerDefaultValue, isHistorical: isHistorical, onChange: handleRangeCalendarPickerChange }))] }));
|
|
3236
|
+
}, [onBack, onNext, onPrevious]);
|
|
3237
|
+
return (jsx(StyledNumberInput, { ref: inputRef, "$isLight": isLight, "$size": size, defaultValue: defaultValue, maxLength: size, onClick: handleClick, onFocus: handleFocus, onInput: handleInput, onKeyDown: handleKeyDown, pattern: "\\d*", placeholder: placeholder, type: "text", ...nativeProps }, String(defaultValue)));
|
|
4030
3238
|
}
|
|
4031
|
-
const
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
}
|
|
4036
|
-
|
|
3239
|
+
const NumberInput$1 = forwardRef(NumberInputWithRef);
|
|
3240
|
+
const StyledNumberInput = styled.input `
|
|
3241
|
+
background-color: transparent;
|
|
3242
|
+
border: 0;
|
|
4037
3243
|
color: ${p => p.theme.color.gunMetal};
|
|
4038
|
-
font-size: 13px;
|
|
4039
|
-
position: relative;
|
|
4040
|
-
`;
|
|
4041
|
-
const Field$1 = styled.span `
|
|
4042
3244
|
font-size: inherit;
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
3245
|
+
outline: none;
|
|
3246
|
+
padding: 0;
|
|
3247
|
+
text-align: center;
|
|
3248
|
+
/* 1 digit = 8px */
|
|
3249
|
+
width: ${p => p.$size * 8}px;
|
|
3250
|
+
|
|
3251
|
+
::placeholder {
|
|
3252
|
+
color: ${p => (p.$isLight ? p.theme.color.slateGray : p.theme.color.slateGray)};
|
|
3253
|
+
}
|
|
4049
3254
|
`;
|
|
4050
3255
|
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
const handleSelect = useCallback((nextDate) => {
|
|
4055
|
-
const nextDateTuple = getDateTupleFromDate(nextDate);
|
|
4056
|
-
onChange(nextDateTuple);
|
|
4057
|
-
}, [onChange]);
|
|
4058
|
-
return (jsxs(Fragment, { children: [jsx(RsuiteCalendarPickerModalGlobalStyle, {}), jsx(Box$1, { children: jsx(DatePicker$1, { className: "AAAAAAAAA", classPrefix: "mui-picker-", disabledDate: disabledDate, format: "yyyy-MM-dd", locale: RSUITE_CALENDAR_LOCALE, oneTap: true, onSelect: handleSelect, open: true, ranges: [],
|
|
4059
|
-
// `defaultValue` seems to be immediatly cancelled so we come down to using a controlled `value`
|
|
4060
|
-
value: defaultValue }) })] }));
|
|
3256
|
+
// TODO Use `date-fns` instead of `dayjs`.
|
|
3257
|
+
function formatNumberAsDoubleDigit(numberLike) {
|
|
3258
|
+
return String(numberLike).padStart(2, '0');
|
|
4061
3259
|
}
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
3260
|
+
function getDateFromDateAndTimeTuple(dateTuple, timeTuple, isEnd = false) {
|
|
3261
|
+
const [year, month, day] = dateTuple;
|
|
3262
|
+
const [hour, minute] = timeTuple;
|
|
3263
|
+
const rawDateAsDayjs = dayjs_minExports()
|
|
3264
|
+
.year(Number(year))
|
|
3265
|
+
.month(Number(month) - 1)
|
|
3266
|
+
.date(Number(day))
|
|
3267
|
+
.hour(Number(hour))
|
|
3268
|
+
.minute(Number(minute));
|
|
3269
|
+
return isEnd
|
|
3270
|
+
? rawDateAsDayjs
|
|
3271
|
+
.endOf('minute')
|
|
3272
|
+
// TODO For some reason the API can't handle miliseconds in dates.
|
|
3273
|
+
// That's why we set it to 0 (instead of 999)
|
|
3274
|
+
.millisecond(0)
|
|
3275
|
+
.toDate()
|
|
3276
|
+
: rawDateAsDayjs.startOf('minute').toDate();
|
|
3277
|
+
}
|
|
3278
|
+
function getDateTupleFromDate(date) {
|
|
3279
|
+
if (!date) {
|
|
3280
|
+
return undefined;
|
|
4072
3281
|
}
|
|
3282
|
+
return [
|
|
3283
|
+
String(date.getFullYear()),
|
|
3284
|
+
formatNumberAsDoubleDigit(date.getMonth() + 1),
|
|
3285
|
+
formatNumberAsDoubleDigit(date.getDate())
|
|
3286
|
+
];
|
|
3287
|
+
}
|
|
3288
|
+
/**
|
|
3289
|
+
* Generate a list of ranged time options.
|
|
3290
|
+
*
|
|
3291
|
+
* @example
|
|
3292
|
+
* ```
|
|
3293
|
+
* (minutesRange = 30) => ([
|
|
3294
|
+
* { label: '00:00', value: ['00', '00'] },
|
|
3295
|
+
* { label: '00:30', value: ['00', '30'] },
|
|
3296
|
+
* { label: '01:00', value: ['01', '00'] },
|
|
3297
|
+
* { label: '01:30', value: ['01', '30'] },
|
|
3298
|
+
* { label: '02:00', value: ['02', '00'] },
|
|
3299
|
+
* ...
|
|
3300
|
+
* ])
|
|
3301
|
+
* ```
|
|
3302
|
+
*/
|
|
3303
|
+
const getRangedTimeOptions = (minutesRange) => {
|
|
3304
|
+
const perHourOptionsLength = 60 / minutesRange;
|
|
3305
|
+
const totalOptionsLength = 24 * perHourOptionsLength;
|
|
3306
|
+
return new Array(totalOptionsLength).fill(undefined).map((_, index) => {
|
|
3307
|
+
const hour = Math.floor(index / perHourOptionsLength);
|
|
3308
|
+
const minute = minutesRange * (index % perHourOptionsLength);
|
|
3309
|
+
const label = `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;
|
|
3310
|
+
const value = [formatNumberAsDoubleDigit(hour), formatNumberAsDoubleDigit(minute)];
|
|
3311
|
+
return {
|
|
3312
|
+
label,
|
|
3313
|
+
value
|
|
3314
|
+
};
|
|
3315
|
+
});
|
|
3316
|
+
};
|
|
3317
|
+
function getTimeTupleFromDate(date) {
|
|
3318
|
+
if (!date) {
|
|
3319
|
+
return undefined;
|
|
3320
|
+
}
|
|
3321
|
+
return [formatNumberAsDoubleDigit(date.getHours()), formatNumberAsDoubleDigit(date.getMinutes())];
|
|
3322
|
+
}
|
|
4073
3323
|
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
3324
|
+
function DateInputWithRef({ defaultValue,
|
|
3325
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3326
|
+
disabled = false, isCompact, isEndDate = false, isForcedFocused, isLight, isStartDate = false, onBack, onChange, onClick, onNext, onPrevious }, ref) {
|
|
3327
|
+
const boxRef = useRef();
|
|
3328
|
+
const dayInputRef = useRef();
|
|
3329
|
+
const monthInputRef = useRef();
|
|
3330
|
+
const yearInputRef = useRef();
|
|
3331
|
+
const [hasFormatError, setHasFormatError] = useState(false);
|
|
3332
|
+
const [hasValidationError, setHasValidationError] = useState(false);
|
|
3333
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
3334
|
+
useImperativeHandle(ref, () => ({
|
|
3335
|
+
box: boxRef.current,
|
|
3336
|
+
focus: (isInLastInputOfTheGroup = false) => {
|
|
3337
|
+
if (isInLastInputOfTheGroup) {
|
|
3338
|
+
yearInputRef.current.focus();
|
|
3339
|
+
}
|
|
3340
|
+
else {
|
|
3341
|
+
dayInputRef.current.focus();
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
}));
|
|
3345
|
+
const handleBlur = useCallback(() => {
|
|
3346
|
+
setIsFocused(false);
|
|
3347
|
+
}, []);
|
|
3348
|
+
const handleFocus = useCallback(() => {
|
|
3349
|
+
setIsFocused(true);
|
|
3350
|
+
}, []);
|
|
3351
|
+
const handleFormatError = useCallback((hasNextFormatError) => {
|
|
3352
|
+
setHasFormatError(hasNextFormatError);
|
|
3353
|
+
}, []);
|
|
3354
|
+
const submit = useCallback(() => {
|
|
3355
|
+
setHasValidationError(false);
|
|
3356
|
+
const isFilled = window.document.activeElement === yearInputRef.current;
|
|
3357
|
+
switch (window.document.activeElement) {
|
|
3358
|
+
case dayInputRef.current:
|
|
3359
|
+
monthInputRef.current.focus();
|
|
3360
|
+
break;
|
|
3361
|
+
case monthInputRef.current:
|
|
3362
|
+
yearInputRef.current.focus();
|
|
3363
|
+
break;
|
|
3364
|
+
}
|
|
3365
|
+
if (!yearInputRef.current.value.length ||
|
|
3366
|
+
!monthInputRef.current.value.length ||
|
|
3367
|
+
!dayInputRef.current.value.length) {
|
|
3368
|
+
if ((monthInputRef.current.value.length && !dayInputRef.current.value.length) ||
|
|
3369
|
+
(yearInputRef.current.value.length &&
|
|
3370
|
+
(!dayInputRef.current.value.length || !monthInputRef.current.value.length))) {
|
|
3371
|
+
setHasValidationError(true);
|
|
4102
3372
|
}
|
|
4103
|
-
|
|
3373
|
+
return;
|
|
4104
3374
|
}
|
|
4105
|
-
|
|
3375
|
+
const nextDateTuple = [
|
|
3376
|
+
String(yearInputRef.current.value),
|
|
3377
|
+
formatNumberAsDoubleDigit(monthInputRef.current.value),
|
|
3378
|
+
formatNumberAsDoubleDigit(dayInputRef.current.value)
|
|
3379
|
+
];
|
|
3380
|
+
onChange(nextDateTuple, isFilled);
|
|
3381
|
+
}, [onChange]);
|
|
3382
|
+
return (jsxs(Box$6, { ref: boxRef, "$hasError": hasFormatError || hasValidationError, "$isCompact": isCompact, "$isDisabled": disabled, "$isFocused": isForcedFocused || isFocused, "$isLight": isLight, children: [jsxs("div", { children: [isStartDate && jsx("span", { children: "Du " }), isEndDate && jsx("span", { children: "Au " }), jsx(NumberInput$1, { ref: dayInputRef, "aria-label": `Jour${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: defaultValue && formatNumberAsDoubleDigit(defaultValue[2]), disabled: disabled, isLight: isLight, max: 31, min: 1, onBack: onBack, onBlur: handleBlur, onClick: onClick, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: () => monthInputRef.current.focus(), onPrevious: onPrevious, size: 2 }), "/", jsx(NumberInput$1, { ref: monthInputRef, "aria-label": `Mois${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: defaultValue && formatNumberAsDoubleDigit(defaultValue[1]), disabled: disabled, isLight: isLight, max: 12, min: 1, onBack: () => dayInputRef.current.focus(), onBlur: handleBlur, onClick: onClick, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: () => yearInputRef.current.focus(), onPrevious: () => dayInputRef.current.focus(), size: 2 }), "/", jsx(NumberInput$1, { ref: yearInputRef, "aria-label": `Année${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: defaultValue && defaultValue[0], disabled: disabled, isLight: isLight, max: 2030, min: 2020, onBack: () => monthInputRef.current.focus(), onBlur: handleBlur, onClick: onClick, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: onNext, onPrevious: () => monthInputRef.current.focus(), size: 4 })] }), !isCompact && jsx(Calendar, {})] }));
|
|
3383
|
+
}
|
|
3384
|
+
const DateInput = forwardRef(DateInputWithRef);
|
|
3385
|
+
const Box$6 = styled.div `
|
|
3386
|
+
align-items: center;
|
|
3387
|
+
background-color: ${p => (p.$isLight ? p.theme.color.white : p.theme.color.gainsboro)};
|
|
3388
|
+
box-shadow: ${p => p.$hasError || p.$isFocused
|
|
3389
|
+
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100]}`
|
|
3390
|
+
: 'none'};
|
|
3391
|
+
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.slateGray)};
|
|
3392
|
+
display: inline-flex;
|
|
3393
|
+
font-size: inherit;
|
|
3394
|
+
justify-content: space-between;
|
|
3395
|
+
padding: ${p => (p.$isCompact ? '4.5px 8px 7px' : '3px 8px 5px')};
|
|
3396
|
+
user-select: none;
|
|
4106
3397
|
|
|
4107
|
-
|
|
4108
|
-
|
|
3398
|
+
:hover {
|
|
3399
|
+
box-shadow: ${p => `inset 0px 0px 0px 1px ${
|
|
3400
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3401
|
+
p.$isDisabled
|
|
3402
|
+
? p.theme.color.cultured
|
|
3403
|
+
: p.$isFocused
|
|
3404
|
+
? p.theme.color.blueGray[100]
|
|
3405
|
+
: p.theme.color.blueYonder[100]}`};
|
|
3406
|
+
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.blueYonder[100])};
|
|
3407
|
+
}
|
|
4109
3408
|
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
3409
|
+
> div:nth-child(2) {
|
|
3410
|
+
margin: 2px 0 0 16px;
|
|
3411
|
+
}
|
|
3412
|
+
`;
|
|
4113
3413
|
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
margin-top: 0;
|
|
4118
|
-
}
|
|
3414
|
+
function stopMouseEventPropagation(event) {
|
|
3415
|
+
event.stopPropagation();
|
|
3416
|
+
}
|
|
4119
3417
|
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
&[role='columnheader']:hover .rs-calendar-table-cell-content {
|
|
4135
|
-
background-color: transparent;
|
|
4136
|
-
color: ${p => p.theme.color.slateGray};
|
|
4137
|
-
}
|
|
4138
|
-
&.rs-calendar-table-cell-disabled .rs-calendar-table-cell-content {
|
|
4139
|
-
background-color: transparent;
|
|
4140
|
-
color: ${p => p.theme.color.lightGray};
|
|
4141
|
-
}
|
|
4142
|
-
&.rs-calendar-table-cell-selected > .rs-calendar-table-cell-content {
|
|
4143
|
-
background-color: ${p => p.theme.color.blueGray[100]};
|
|
4144
|
-
}
|
|
3418
|
+
function RangedTimePicker({ filter, minutesRange, onChange }) {
|
|
3419
|
+
const [selectedOptionIndex, setSelectedOptionIndex] = useState(0);
|
|
3420
|
+
const rangedTimeOptions = useMemo(() => getRangedTimeOptions(minutesRange), [minutesRange]);
|
|
3421
|
+
const filteredRangedTimeOptions = useMemo(() => rangedTimeOptions.filter(({ label }) => filter.test(label)), [filter, rangedTimeOptions]);
|
|
3422
|
+
const spannedLabels = useMemo(() => filteredRangedTimeOptions.map(({ label }) => {
|
|
3423
|
+
const [hours, minutes] = label.split(':');
|
|
3424
|
+
return (jsxs(Fragment, { children: [' ', jsx("span", { children: hours }), ":", jsx("span", { children: minutes })] }));
|
|
3425
|
+
}), [filteredRangedTimeOptions]);
|
|
3426
|
+
const handleBoxKeyDown = useCallback((event) => {
|
|
3427
|
+
if (event.key === 'ArrowDown') {
|
|
3428
|
+
event.preventDefault();
|
|
3429
|
+
const nextSelectedOptionIndex = selectedOptionIndex < filteredRangedTimeOptions.length - 1 ? selectedOptionIndex + 1 : 0;
|
|
3430
|
+
setSelectedOptionIndex(nextSelectedOptionIndex);
|
|
3431
|
+
window.document.querySelectorAll('.js-ranged-time-picker-option')[nextSelectedOptionIndex]?.scrollIntoView();
|
|
4145
3432
|
}
|
|
4146
|
-
|
|
3433
|
+
if (event.key === 'ArrowUp') {
|
|
3434
|
+
event.preventDefault();
|
|
3435
|
+
const nextSelectedOptionIndex = selectedOptionIndex > 0 ? selectedOptionIndex - 1 : filteredRangedTimeOptions.length - 1;
|
|
3436
|
+
setSelectedOptionIndex(nextSelectedOptionIndex);
|
|
3437
|
+
window.document.querySelectorAll('.js-ranged-time-picker-option')[nextSelectedOptionIndex]?.scrollIntoView();
|
|
3438
|
+
}
|
|
3439
|
+
if (['Enter', 'Space', 'Tab'].includes(event.key)) {
|
|
3440
|
+
const selectedRangedTimeOption = filteredRangedTimeOptions[selectedOptionIndex];
|
|
3441
|
+
if (!selectedRangedTimeOption) {
|
|
3442
|
+
return;
|
|
3443
|
+
}
|
|
3444
|
+
onChange(selectedRangedTimeOption.value);
|
|
3445
|
+
}
|
|
3446
|
+
}, [filteredRangedTimeOptions, selectedOptionIndex, onChange]);
|
|
3447
|
+
useEffect(() => {
|
|
3448
|
+
window.addEventListener('keydown', handleBoxKeyDown, {
|
|
3449
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3450
|
+
once: true
|
|
3451
|
+
});
|
|
3452
|
+
return () => {
|
|
3453
|
+
window.removeEventListener('keydown', handleBoxKeyDown);
|
|
3454
|
+
};
|
|
3455
|
+
}, [handleBoxKeyDown]);
|
|
3456
|
+
useEffect(() => {
|
|
3457
|
+
setSelectedOptionIndex(0);
|
|
3458
|
+
}, [filteredRangedTimeOptions]);
|
|
3459
|
+
if (!filteredRangedTimeOptions.length) {
|
|
3460
|
+
return jsx(Fragment, {});
|
|
4147
3461
|
}
|
|
3462
|
+
return (jsx(Box$5, { onClick: stopMouseEventPropagation, role: "listbox", children: filteredRangedTimeOptions.map(({ label, value }, index) => (jsx(Option, { "aria-selected": false, className: "js-ranged-time-picker-option", isSelected: index === selectedOptionIndex, onClick: () => onChange(value), role: "option", tabIndex: -1, children: spannedLabels[index] }, label))) }));
|
|
3463
|
+
}
|
|
3464
|
+
const Box$5 = styled.div `
|
|
3465
|
+
background-color: ${p => p.theme.color.white};
|
|
3466
|
+
box-shadow: inset 0px 0px 0px 1px ${p => p.theme.color.lightGray};
|
|
3467
|
+
display: flex;
|
|
3468
|
+
flex-direction: column;
|
|
3469
|
+
left: 0;
|
|
3470
|
+
max-height: 160px;
|
|
3471
|
+
overflow: auto;
|
|
3472
|
+
position: absolute;
|
|
3473
|
+
/* Non-WebKit Firefox Compatibility */
|
|
3474
|
+
scrollbar-color: ${p => p.theme.color.lightGray};
|
|
3475
|
+
scrollbar-width: thin;
|
|
3476
|
+
top: 32px;
|
|
3477
|
+
width: 100%;
|
|
3478
|
+
z-index: 9999;
|
|
3479
|
+
|
|
3480
|
+
::-webkit-scrollbar {
|
|
3481
|
+
-webkit-appearance: none;
|
|
3482
|
+
}
|
|
3483
|
+
::-webkit-scrollbar:vertical {
|
|
3484
|
+
width: 5px;
|
|
3485
|
+
}
|
|
3486
|
+
::-webkit-scrollbar-thumb {
|
|
3487
|
+
border: 0;
|
|
3488
|
+
background-color: ${p => p.theme.color.lightGray};
|
|
3489
|
+
}
|
|
3490
|
+
::-webkit-scrollbar-track {
|
|
3491
|
+
background-color: ${p => p.theme.color.gainsboro};
|
|
4148
3492
|
}
|
|
4149
3493
|
`;
|
|
4150
|
-
const
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
3494
|
+
const Option = styled.div `
|
|
3495
|
+
background-color: ${p => (p.isSelected ? p.theme.color.blueGray[100] : 'transparent')};
|
|
3496
|
+
color: ${p => (p.isSelected ? p.theme.color.white : p.theme.color.gunMetal)};
|
|
3497
|
+
cursor: pointer;
|
|
3498
|
+
line-height: 1;
|
|
3499
|
+
padding: 5px 0 7px 6.5px;
|
|
4155
3500
|
|
|
4156
|
-
|
|
4157
|
-
|
|
3501
|
+
:hover {
|
|
3502
|
+
background-color: ${p => (p.isSelected ? p.theme.color.blueGray[100] : p.theme.color.blueYonder[25])};
|
|
4158
3503
|
}
|
|
4159
3504
|
|
|
4160
|
-
|
|
4161
|
-
|
|
3505
|
+
> span {
|
|
3506
|
+
display: inline-flex;
|
|
3507
|
+
justify-content: center;
|
|
3508
|
+
width: 16px;
|
|
4162
3509
|
}
|
|
4163
3510
|
`;
|
|
4164
3511
|
|
|
4165
|
-
function
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
const
|
|
4169
|
-
const
|
|
4170
|
-
const
|
|
4171
|
-
const
|
|
4172
|
-
const
|
|
4173
|
-
const
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
3512
|
+
function TimeInputWithRef({ defaultValue,
|
|
3513
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3514
|
+
disabled = false, isCompact, isEndDate = false, isLight, isStartDate = false, minutesRange = 15, onBack, onChange, onFocus, onNext, onPrevious }, ref) {
|
|
3515
|
+
const boxRef = useRef();
|
|
3516
|
+
const hourInputRef = useRef();
|
|
3517
|
+
const minuteInputRef = useRef();
|
|
3518
|
+
const [controlledDefaultValue, setControlledDefaultValue] = useState(defaultValue);
|
|
3519
|
+
const [hasFormatError, setHasFormatError] = useState(false);
|
|
3520
|
+
const [hasValidationError, setHasValidationError] = useState(false);
|
|
3521
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
3522
|
+
useImperativeHandle(ref, () => ({
|
|
3523
|
+
box: boxRef.current,
|
|
3524
|
+
focus: (isInLastInputOfTheGroup = false) => {
|
|
3525
|
+
if (isInLastInputOfTheGroup) {
|
|
3526
|
+
minuteInputRef.current.focus();
|
|
3527
|
+
}
|
|
3528
|
+
else {
|
|
3529
|
+
hourInputRef.current.focus();
|
|
3530
|
+
}
|
|
4181
3531
|
}
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
const
|
|
4186
|
-
|
|
3532
|
+
}));
|
|
3533
|
+
const isRangedTimePickerOpenRef = useRef(false);
|
|
3534
|
+
const [rangedTimePickerFilter, setRangedTimePickerFilter] = useState(/.*/);
|
|
3535
|
+
const { forceUpdate } = useForceUpdate();
|
|
3536
|
+
const closeRangedTimePicker = useCallback(() => {
|
|
3537
|
+
isRangedTimePickerOpenRef.current = false;
|
|
4187
3538
|
forceUpdate();
|
|
4188
3539
|
}, [forceUpdate]);
|
|
4189
|
-
const
|
|
4190
|
-
|
|
4191
|
-
if (dateInputRef.current.boxSpan.contains(target)) {
|
|
3540
|
+
const handleBack = useCallback(() => {
|
|
3541
|
+
if (!onBack) {
|
|
4192
3542
|
return;
|
|
4193
3543
|
}
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
3544
|
+
closeRangedTimePicker();
|
|
3545
|
+
onBack();
|
|
3546
|
+
}, [closeRangedTimePicker, onBack]);
|
|
3547
|
+
const handleBlur = useCallback(() => {
|
|
3548
|
+
setIsFocused(false);
|
|
3549
|
+
}, []);
|
|
3550
|
+
const handleClickOutside = useCallback((event) => {
|
|
3551
|
+
const target = event.target;
|
|
3552
|
+
if (hourInputRef.current.contains(target) || minuteInputRef.current.contains(target)) {
|
|
4198
3553
|
return;
|
|
4199
3554
|
}
|
|
4200
|
-
|
|
4201
|
-
}, [
|
|
4202
|
-
const
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
// we include the selected time if it exists, set it at the beginning of the day if not
|
|
4224
|
-
const nextDate = getDateFromDateAndTimeTuple(nextDateTuple, selectedTimeTupleRef.current || ['00', '00']);
|
|
4225
|
-
selectedDateRef.current = nextDate;
|
|
4226
|
-
}
|
|
4227
|
-
selectedDateTupleRef.current = nextDateTuple;
|
|
4228
|
-
selectedTimeTupleRef.current = getTimeTupleFromDate(selectedDateRef.current);
|
|
4229
|
-
closeCalendarPicker();
|
|
4230
|
-
forceUpdate();
|
|
4231
|
-
submit();
|
|
4232
|
-
if (withTime && !selectedTimeTupleRef.current) {
|
|
4233
|
-
timeInputRef.current.focus();
|
|
4234
|
-
}
|
|
4235
|
-
}, [closeCalendarPicker, forceUpdate, submit, withTime]);
|
|
4236
|
-
const handleTimeInputFilled = useCallback((nextTimeTuple) => {
|
|
4237
|
-
// If a date has already been selected
|
|
4238
|
-
if (selectedDateTupleRef.current) {
|
|
4239
|
-
// we must update the selected date accordingly and submit it
|
|
4240
|
-
const nextDate = getDateFromDateAndTimeTuple(selectedDateTupleRef.current, nextTimeTuple);
|
|
4241
|
-
selectedDateRef.current = nextDate;
|
|
4242
|
-
submit();
|
|
4243
|
-
}
|
|
4244
|
-
selectedTimeTupleRef.current = nextTimeTuple;
|
|
4245
|
-
submit();
|
|
4246
|
-
}, [submit]);
|
|
4247
|
-
const openCalendarPicker = useCallback(() => {
|
|
4248
|
-
isCalendarPickerOpenRef.current = true;
|
|
3555
|
+
closeRangedTimePicker();
|
|
3556
|
+
}, [closeRangedTimePicker]);
|
|
3557
|
+
const handleFocus = useCallback(() => {
|
|
3558
|
+
setIsFocused(true);
|
|
3559
|
+
if (onFocus) {
|
|
3560
|
+
onFocus();
|
|
3561
|
+
}
|
|
3562
|
+
}, [onFocus]);
|
|
3563
|
+
const handleFormatError = useCallback((hasNextFormatError) => {
|
|
3564
|
+
setHasFormatError(hasNextFormatError);
|
|
3565
|
+
}, []);
|
|
3566
|
+
const handleRangedTimePickedChange = useCallback((nextTimeTuple) => {
|
|
3567
|
+
closeRangedTimePicker();
|
|
3568
|
+
setControlledDefaultValue(nextTimeTuple);
|
|
3569
|
+
onChange(nextTimeTuple);
|
|
3570
|
+
}, [closeRangedTimePicker, onChange]);
|
|
3571
|
+
const handleHourInput = useCallback((nextValue) => {
|
|
3572
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3573
|
+
const nextRangedTimePickerFilter = nextValue.length ? new RegExp(`^${nextValue}`) : /.*/;
|
|
3574
|
+
setRangedTimePickerFilter(nextRangedTimePickerFilter);
|
|
3575
|
+
}, []);
|
|
3576
|
+
const openRangedTimePicker = useCallback(() => {
|
|
3577
|
+
isRangedTimePickerOpenRef.current = true;
|
|
4249
3578
|
forceUpdate();
|
|
4250
3579
|
}, [forceUpdate]);
|
|
4251
3580
|
useEffect(() => {
|
|
@@ -4254,477 +3583,881 @@ function DatePicker({ defaultValue, isHistorical = false, isLabelHidden = false,
|
|
|
4254
3583
|
window.document.removeEventListener('click', handleClickOutside);
|
|
4255
3584
|
};
|
|
4256
3585
|
}, [handleClickOutside]);
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
font-weight: 500;
|
|
4262
|
-
line-height: 1;
|
|
4263
|
-
}
|
|
4264
|
-
|
|
4265
|
-
color: ${p => p.theme.color.gunMetal};
|
|
4266
|
-
font-size: 13px;
|
|
4267
|
-
position: relative;
|
|
4268
|
-
`;
|
|
4269
|
-
const Field = styled.span `
|
|
4270
|
-
font-size: inherit;
|
|
4271
|
-
margin-left: ${p => (p.$isTimeField ? '2px' : 0)};
|
|
4272
|
-
`;
|
|
4273
|
-
|
|
4274
|
-
function MultiCheckbox({ defaultValue = [], isInline = false, isLabelHidden = false, isLight = false, label, name, onChange, options }) {
|
|
4275
|
-
const checkedOptionValues = useRef(defaultValue);
|
|
4276
|
-
const key = useMemo(() => `${name}-${JSON.stringify(defaultValue)}`, [defaultValue, name]);
|
|
4277
|
-
const handleChange = useCallback((nextOptionValue, isChecked) => {
|
|
4278
|
-
const nextCheckedOptionValues = isChecked
|
|
4279
|
-
? [...checkedOptionValues.current, nextOptionValue]
|
|
4280
|
-
: reject(equals(nextOptionValue))(checkedOptionValues.current);
|
|
4281
|
-
checkedOptionValues.current = nextCheckedOptionValues;
|
|
4282
|
-
if (onChange) {
|
|
4283
|
-
const normalizedNextValue = nextCheckedOptionValues.length ? nextCheckedOptionValues : undefined;
|
|
4284
|
-
onChange(normalizedNextValue);
|
|
3586
|
+
const submit = useCallback(() => {
|
|
3587
|
+
setHasValidationError(false);
|
|
3588
|
+
if (window.document.activeElement === hourInputRef.current) {
|
|
3589
|
+
minuteInputRef.current.focus();
|
|
4285
3590
|
}
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
}
|
|
4291
|
-
const ChecboxesBox$1 = styled.div `
|
|
4292
|
-
color: ${p => p.theme.color.gunMetal};
|
|
4293
|
-
display: flex;
|
|
4294
|
-
flex-direction: ${p => (p.$isInline ? 'row' : 'column')};
|
|
4295
|
-
|
|
4296
|
-
${p => !p.$isInline &&
|
|
4297
|
-
css `
|
|
4298
|
-
> .rs-checkbox:not(:first-child) {
|
|
4299
|
-
margin-top: 8px;
|
|
4300
|
-
}
|
|
4301
|
-
`}
|
|
4302
|
-
|
|
4303
|
-
${p => p.$isInline &&
|
|
4304
|
-
css `
|
|
4305
|
-
> .rs-checkbox:not(:first-child) {
|
|
4306
|
-
margin-left: 12px;
|
|
4307
|
-
}
|
|
4308
|
-
`}
|
|
4309
|
-
`;
|
|
4310
|
-
|
|
4311
|
-
function MultiSelect({ fixedWidth = 5, isLabelHidden = false, isLight = false, label, onChange, options,
|
|
4312
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
4313
|
-
searchable = false, ...originalProps }) {
|
|
4314
|
-
const key = useMemo(() => `${originalProps.name}-${JSON.stringify(originalProps.defaultValue)}`, [originalProps.defaultValue, originalProps.name]);
|
|
4315
|
-
const handleChange = useCallback((nextValue) => {
|
|
4316
|
-
if (!onChange) {
|
|
3591
|
+
if (!hourInputRef.current.value.length || !minuteInputRef.current.value.length) {
|
|
3592
|
+
if (minuteInputRef.current.value.length && !hourInputRef.current.value.length) {
|
|
3593
|
+
setHasValidationError(true);
|
|
3594
|
+
}
|
|
4317
3595
|
return;
|
|
4318
3596
|
}
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
3597
|
+
closeRangedTimePicker();
|
|
3598
|
+
const nextTimeTuple = [hourInputRef.current.value, minuteInputRef.current.value];
|
|
3599
|
+
onChange(nextTimeTuple);
|
|
3600
|
+
}, [closeRangedTimePicker, onChange]);
|
|
3601
|
+
return (jsxs(Box$4, { ref: boxRef, "$hasError": hasFormatError || hasValidationError, "$isCompact": isCompact, "$isDisabled": disabled, "$isFocused": isFocused, "$isLight": isLight, children: [jsxs(InputGroup, { children: [jsxs("div", { children: [jsx(NumberInput$1, { ref: hourInputRef, "aria-label": `Heure${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: controlledDefaultValue && controlledDefaultValue[0], disabled: disabled, isLight: isLight, max: 23, min: 0, onBack: handleBack, onBlur: handleBlur, onClick: openRangedTimePicker, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onInput: handleHourInput, onNext: () => minuteInputRef.current.focus(), onPrevious: onPrevious, size: 2 }), ":", jsx(NumberInput$1, { ref: minuteInputRef, "aria-label": `Minute${isStartDate ? ' de début' : ''}${isEndDate ? ' de fin' : ''}`, defaultValue: controlledDefaultValue && controlledDefaultValue[1], disabled: disabled, isLight: isLight, max: 59, min: 0, onBack: () => hourInputRef.current.focus(), onBlur: handleBlur, onClick: openRangedTimePicker, onFilled: submit, onFocus: handleFocus, onFormatError: handleFormatError, onNext: onNext, onPrevious: () => hourInputRef.current.focus(), size: 2 })] }), !isCompact && jsx(Clock, {})] }), isRangedTimePickerOpenRef.current && (jsx(RangedTimePicker, { filter: rangedTimePickerFilter, minutesRange: minutesRange, onChange: handleRangedTimePickedChange }))] }));
|
|
4323
3602
|
}
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
3603
|
+
const TimeInput = forwardRef(TimeInputWithRef);
|
|
3604
|
+
const Box$4 = styled.div `
|
|
3605
|
+
background-color: ${p => (p.$isLight ? p.theme.color.white : p.theme.color.gainsboro)};
|
|
3606
|
+
box-shadow: ${p => p.$hasError || p.$isFocused
|
|
3607
|
+
? `inset 0px 0px 0px 1px ${p.$hasError ? p.theme.color.maximumRed : p.theme.color.blueGray[100]}`
|
|
3608
|
+
: 'none'};
|
|
3609
|
+
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.slateGray)};
|
|
3610
|
+
display: inline-block;
|
|
3611
|
+
font-size: inherit;
|
|
3612
|
+
padding: ${p => (p.$isCompact ? '4.5px 8px 7px' : '3px 8px 5px')};
|
|
3613
|
+
position: relative;
|
|
3614
|
+
user-select: none;
|
|
4330
3615
|
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
3616
|
+
:hover {
|
|
3617
|
+
box-shadow: ${p => `inset 0px 0px 0px 1px ${
|
|
3618
|
+
// eslint-disable-next-line no-nested-ternary
|
|
3619
|
+
p.$isDisabled
|
|
3620
|
+
? p.theme.color.cultured
|
|
3621
|
+
: p.$isFocused
|
|
3622
|
+
? p.theme.color.blueGray[100]
|
|
3623
|
+
: p.theme.color.blueYonder[100]}`};
|
|
3624
|
+
color: ${p => (p.$isFocused ? p.theme.color.blueGray[100] : p.theme.color.blueYonder[100])};
|
|
4334
3625
|
}
|
|
4335
3626
|
`;
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
const [checkedOptionValue, setCheckedOptionValue] = useState(undefined);
|
|
4339
|
-
const key = useMemo(() => `${name}-${String(checkedOptionValue)}}`, [checkedOptionValue, name]);
|
|
4340
|
-
const handleChange = useCallback((nextOptionValue, isChecked) => {
|
|
4341
|
-
const nextCheckedOptionValue = isChecked ? nextOptionValue : undefined;
|
|
4342
|
-
setCheckedOptionValue(nextCheckedOptionValue);
|
|
4343
|
-
if (onChange) {
|
|
4344
|
-
onChange(nextCheckedOptionValue);
|
|
4345
|
-
}
|
|
4346
|
-
}, [onChange]);
|
|
4347
|
-
// TODO There may be a better solution.
|
|
4348
|
-
// A key change is not enough to force radio checked check changes
|
|
4349
|
-
// on `defaultValue` property update (even when appending `defaultValue` to `key`),
|
|
4350
|
-
// we need to force a second re-render in order for the changes to be applied.
|
|
4351
|
-
useEffect(() => {
|
|
4352
|
-
setCheckedOptionValue(defaultValue);
|
|
4353
|
-
}, [defaultValue]);
|
|
4354
|
-
return (jsx(Fieldset, { isHidden: isLabelHidden, isLight: isLight, legend: label, children: jsx(ChecboxesBox, { "$isInline": isInline, children: options.map((option, index) => (jsx(Radio
|
|
4355
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
4356
|
-
, { defaultChecked: option.value === checkedOptionValue, name: name, onChange: (_, isChecked) => handleChange(option.value, isChecked), children: option.label }, `${name}-${index}`))) }) }, key));
|
|
4357
|
-
}
|
|
4358
|
-
const ChecboxesBox = styled.div `
|
|
4359
|
-
color: ${p => p.theme.color.gunMetal};
|
|
3627
|
+
const InputGroup = styled.div `
|
|
3628
|
+
align-items: center;
|
|
4360
3629
|
display: flex;
|
|
4361
|
-
|
|
4362
|
-
font-weight: 500;
|
|
4363
|
-
|
|
4364
|
-
> .rs-radio {
|
|
4365
|
-
> .rs-radio-checker {
|
|
4366
|
-
min-height: 0;
|
|
4367
|
-
padding: 0 0 0 28px;
|
|
4368
|
-
|
|
4369
|
-
.rs-radio-wrapper {
|
|
4370
|
-
left: 2px;
|
|
4371
|
-
top: 3px !important;
|
|
4372
|
-
}
|
|
4373
|
-
}
|
|
4374
|
-
}
|
|
4375
|
-
|
|
4376
|
-
${p => !p.$isInline &&
|
|
4377
|
-
css `
|
|
4378
|
-
> .rs-radio:not(:first-child) {
|
|
4379
|
-
margin-top: 6px;
|
|
4380
|
-
}
|
|
4381
|
-
`}
|
|
4382
|
-
|
|
4383
|
-
${p => p.$isInline &&
|
|
4384
|
-
css `
|
|
4385
|
-
> .rs-radio:not(:first-child) {
|
|
4386
|
-
margin-left: 12px;
|
|
4387
|
-
}
|
|
4388
|
-
`}
|
|
4389
|
-
`;
|
|
4390
|
-
|
|
4391
|
-
/**
|
|
4392
|
-
* Internal component used to wrap SVG icon components
|
|
4393
|
-
*/
|
|
4394
|
-
const IconBox = styled.div `
|
|
4395
|
-
display: inline-block;
|
|
4396
|
-
color: ${p => p.$color ?? 'inherit'};
|
|
3630
|
+
justify-content: space-between;
|
|
4397
3631
|
|
|
4398
|
-
>
|
|
4399
|
-
|
|
4400
|
-
height: ${p => p.$size ?? 16}px;
|
|
4401
|
-
width: ${p => p.$size ?? 16}px;
|
|
3632
|
+
> div:nth-child(2) {
|
|
3633
|
+
margin: 2px 0 0 16px;
|
|
4402
3634
|
}
|
|
4403
3635
|
`;
|
|
4404
3636
|
|
|
4405
|
-
function
|
|
4406
|
-
return (
|
|
4407
|
-
}
|
|
4408
|
-
|
|
4409
|
-
function Alert({ color, size, ...nativeProps }) {
|
|
4410
|
-
return (jsx(IconBox, { "$color": color, "$size": size, children: jsx("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: jsxs("g", { transform: "translate(-220 -208)", children: [jsx("path", { d: "M295,13V8a5,5,0,0,0-4-4.9V1h-2V3.1A5,5,0,0,0,285,8v5l-2,2v2h4.5a2.5,2.5,0,0,0,5,0H297V15Zm-5,5a1,1,0,0,1-1-1h2A1,1,0,0,1,290,18Zm1.486-3H285l2-2V8a3,3,0,0,1,6,0v5l2,2Z", fill: "currentColor", transform: "translate(-60 208)" }), jsx("rect", { fill: "none", height: "20", transform: "translate(220 208)", width: "20" })] }) }) }));
|
|
3637
|
+
function getUtcDayjs() {
|
|
3638
|
+
return dayjs_minExports().utc();
|
|
4411
3639
|
}
|
|
4412
3640
|
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
3641
|
+
new Array(24).fill(undefined).map((_, index) => ({
|
|
3642
|
+
label: String(index).padStart(2, '0'),
|
|
3643
|
+
value: index
|
|
3644
|
+
}));
|
|
3645
|
+
const RSUITE_CALENDAR_LOCALE = {
|
|
3646
|
+
formattedDayPattern: 'dd/MM/yyyy',
|
|
3647
|
+
formattedMonthPattern: 'MMMM yyyy',
|
|
3648
|
+
friday: 'V',
|
|
3649
|
+
hours: 'Heures',
|
|
3650
|
+
minutes: 'Minutes',
|
|
3651
|
+
monday: 'L',
|
|
3652
|
+
ok: 'Valider',
|
|
3653
|
+
saturday: 'S',
|
|
3654
|
+
seconds: 'Secondes',
|
|
3655
|
+
sunday: 'D',
|
|
3656
|
+
thursday: 'J',
|
|
3657
|
+
today: 'Aujourd’hui',
|
|
3658
|
+
tuesday: 'M',
|
|
3659
|
+
wednesday: 'M',
|
|
3660
|
+
yesterday: 'Hier'
|
|
3661
|
+
};
|
|
3662
|
+
var STATUS;
|
|
3663
|
+
(function (STATUS) {
|
|
3664
|
+
STATUS["END_DATE"] = "END_DATE";
|
|
3665
|
+
STATUS["NO_DATE"] = "NO_DATE";
|
|
3666
|
+
STATUS["START_DATE"] = "START_DATE";
|
|
3667
|
+
})(STATUS || (STATUS = {}));
|
|
4416
3668
|
|
|
4417
|
-
function
|
|
4418
|
-
|
|
3669
|
+
function CalendarPicker({ defaultValue, isHistorical, isOpen, onChange }) {
|
|
3670
|
+
const boxRef = useRef();
|
|
3671
|
+
const { forceUpdate } = useForceUpdate();
|
|
3672
|
+
const utcTodayAsDayjs = useMemo(() => getUtcDayjs().endOf('day'), []);
|
|
3673
|
+
const disabledDate = useMemo(() => (date) => date && isHistorical ? getUtcizedDayjs(date).isAfter(utcTodayAsDayjs) : false, [isHistorical, utcTodayAsDayjs]);
|
|
3674
|
+
const handleSelect = useCallback((nextDate) => {
|
|
3675
|
+
const nextDateTuple = getDateTupleFromDate(nextDate);
|
|
3676
|
+
onChange(nextDateTuple);
|
|
3677
|
+
}, [onChange]);
|
|
3678
|
+
useEffect(() => {
|
|
3679
|
+
// We wait for the <Box /> to render so that `boxRef` is defined
|
|
3680
|
+
// and can be used as a container for <RsuiteDatePicker />
|
|
3681
|
+
forceUpdate();
|
|
3682
|
+
}, [forceUpdate]);
|
|
3683
|
+
return (jsx(Box$3, { ref: boxRef, onClick: stopMouseEventPropagation, children: boxRef.current && (jsx(DatePicker$1, { container: boxRef.current, disabledDate: disabledDate, format: "yyyy-MM-dd", locale: RSUITE_CALENDAR_LOCALE, oneTap: true, onSelect: handleSelect, open: isOpen,
|
|
3684
|
+
// `defaultValue` seems to be immediatly cancelled so we come down to using a controlled `value`
|
|
3685
|
+
ranges: [], value: defaultValue })) }));
|
|
4419
3686
|
}
|
|
3687
|
+
const Box$3 = styled.div `
|
|
3688
|
+
height: 0;
|
|
3689
|
+
position: relative;
|
|
3690
|
+
user-select: none;
|
|
4420
3691
|
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
3692
|
+
/*
|
|
3693
|
+
This is a hack to hide .rs-picker-date > .rs-picker-toggle which must exist in DOM
|
|
3694
|
+
since it's used as a ref by Rsuite to calculate .rs-picker-date-menu position
|
|
3695
|
+
*/
|
|
3696
|
+
.rs-picker-date {
|
|
3697
|
+
font-size: 0;
|
|
3698
|
+
position: absolute;
|
|
4424
3699
|
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
3700
|
+
.rs-picker-toggle {
|
|
3701
|
+
border: 0 !important;
|
|
3702
|
+
padding: 0;
|
|
4428
3703
|
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
}
|
|
3704
|
+
* {
|
|
3705
|
+
display: none;
|
|
3706
|
+
}
|
|
3707
|
+
}
|
|
3708
|
+
}
|
|
4432
3709
|
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
3710
|
+
.rs-picker-date-menu {
|
|
3711
|
+
box-shadow: inset 0px 0px 0px 1px ${p => p.theme.color.lightGray};
|
|
3712
|
+
border-radius: 0;
|
|
3713
|
+
margin-top: 2px;
|
|
4436
3714
|
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
3715
|
+
.rs-picker-date-header,
|
|
3716
|
+
.rs-calendar-header-time-toolbar,
|
|
3717
|
+
.rs-picker-toolbar {
|
|
3718
|
+
display: none;
|
|
3719
|
+
}
|
|
4440
3720
|
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
3721
|
+
.rs-calendar {
|
|
3722
|
+
border: 0;
|
|
3723
|
+
font-size: 13px;
|
|
3724
|
+
height: auto !important;
|
|
3725
|
+
line-height: 1.4;
|
|
3726
|
+
padding: 0;
|
|
4444
3727
|
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
3728
|
+
> .rs-calendar-header {
|
|
3729
|
+
border-bottom: solid 1px ${p => p.theme.color.lightGray};
|
|
3730
|
+
padding: 4px 0;
|
|
4448
3731
|
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
}
|
|
3732
|
+
> .rs-calendar-header-month-toolbar {
|
|
3733
|
+
align-items: center;
|
|
3734
|
+
color: ${p => p.theme.color.slateGray};
|
|
3735
|
+
display: flex;
|
|
3736
|
+
justify-content: space-between;
|
|
4452
3737
|
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
}
|
|
3738
|
+
> .rs-calendar-header-backward {
|
|
3739
|
+
color: ${p => p.theme.color.slateGray};
|
|
3740
|
+
}
|
|
4456
3741
|
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
3742
|
+
> .rs-calendar-header-title {
|
|
3743
|
+
color: ${p => p.theme.color.slateGray};
|
|
3744
|
+
font-size: 13px;
|
|
3745
|
+
font-weight: 500;
|
|
3746
|
+
padding: 5px 8px 6px;
|
|
3747
|
+
text-transform: uppercase;
|
|
4460
3748
|
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
}
|
|
3749
|
+
&.rs-calendar-header-error {
|
|
3750
|
+
color: ${p => p.theme.color.slateGray};
|
|
4464
3751
|
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
}
|
|
3752
|
+
&:hover {
|
|
3753
|
+
color: ${p => p.theme.color.slateGray};
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
4468
3757
|
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
}
|
|
3758
|
+
> .rs-calendar-header-forward {
|
|
3759
|
+
color: ${p => p.theme.color.slateGray};
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
4472
3763
|
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
}
|
|
3764
|
+
> .rs-calendar-body {
|
|
3765
|
+
padding: 12px 8px 0;
|
|
4476
3766
|
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
3767
|
+
.rs-calendar-table-cell {
|
|
3768
|
+
padding: 0 0 4px 0;
|
|
3769
|
+
width: 33px;
|
|
4480
3770
|
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
3771
|
+
&.rs-calendar-table-cell-in-range:before {
|
|
3772
|
+
background-color: ${p => p.theme.color.blueGray[25]};
|
|
3773
|
+
height: 33px;
|
|
3774
|
+
margin-top: 0;
|
|
3775
|
+
}
|
|
4484
3776
|
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
3777
|
+
> .rs-calendar-table-cell-content {
|
|
3778
|
+
border-radius: 0 !important;
|
|
3779
|
+
display: inline-flex;
|
|
3780
|
+
height: 33px;
|
|
3781
|
+
justify-content: center;
|
|
3782
|
+
line-height: 1;
|
|
3783
|
+
padding: 7px 0 0;
|
|
3784
|
+
width: 33px;
|
|
3785
|
+
}
|
|
3786
|
+
&:hover .rs-calendar-table-cell-content {
|
|
3787
|
+
background-color: ${p => p.theme.color.blueYonder[25]};
|
|
3788
|
+
color: ${p => p.theme.color.blueYonder[100]};
|
|
3789
|
+
}
|
|
3790
|
+
&[role='columnheader'] .rs-calendar-table-cell-content,
|
|
3791
|
+
&[role='columnheader']:hover .rs-calendar-table-cell-content {
|
|
3792
|
+
background-color: transparent;
|
|
3793
|
+
color: ${p => p.theme.color.slateGray};
|
|
3794
|
+
}
|
|
3795
|
+
&.rs-calendar-table-cell-disabled .rs-calendar-table-cell-content {
|
|
3796
|
+
background-color: transparent;
|
|
3797
|
+
color: ${p => p.theme.color.lightGray};
|
|
3798
|
+
}
|
|
3799
|
+
&.rs-calendar-table-cell-selected > .rs-calendar-table-cell-content {
|
|
3800
|
+
background-color: ${p => p.theme.color.blueGray[100]};
|
|
3801
|
+
}
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
4488
3804
|
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
3805
|
+
> .rs-calendar-month-dropdown {
|
|
3806
|
+
border: 0;
|
|
3807
|
+
margin-top: 3px;
|
|
4492
3808
|
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
}
|
|
3809
|
+
.rs-calendar-month-dropdown-year {
|
|
3810
|
+
color: ${p => p.theme.color.slateGray};
|
|
4496
3811
|
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
}
|
|
3812
|
+
&.rs-calendar-month-dropdown-year-active {
|
|
3813
|
+
color: ${p => p.theme.color.blueYonder[100]};
|
|
3814
|
+
}
|
|
3815
|
+
}
|
|
4500
3816
|
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
3817
|
+
.rs-calendar-month-dropdown-cell {
|
|
3818
|
+
> .rs-calendar-month-dropdown-cell-content {
|
|
3819
|
+
border-radius: 0 !important;
|
|
3820
|
+
color: ${p => p.theme.color.gunMetal};
|
|
3821
|
+
display: inline-flex;
|
|
3822
|
+
height: 33px;
|
|
3823
|
+
justify-content: center;
|
|
3824
|
+
line-height: 1;
|
|
3825
|
+
padding: 8px 0 0;
|
|
3826
|
+
width: 33px;
|
|
3827
|
+
}
|
|
3828
|
+
&:hover > .rs-calendar-month-dropdown-cell-content {
|
|
3829
|
+
background-color: ${p => p.theme.color.blueYonder[25]};
|
|
3830
|
+
color: ${p => p.theme.color.blueYonder[100]};
|
|
3831
|
+
}
|
|
3832
|
+
&.rs-calendar-month-dropdown-cell-active > .rs-calendar-month-dropdown-cell-content {
|
|
3833
|
+
background-color: ${p => p.theme.color.blueGray[100]};
|
|
3834
|
+
color: ${p => p.theme.color.white};
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
3838
|
+
}
|
|
3839
|
+
}
|
|
3840
|
+
`;
|
|
4504
3841
|
|
|
4505
|
-
function
|
|
4506
|
-
|
|
3842
|
+
function DatePicker({ defaultValue,
|
|
3843
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
3844
|
+
disabled = false, isCompact = false, isHistorical = false, isLabelHidden = false, isLight = false, label, minutesRange = 15, onChange, withTime = false, ...nativeProps }) {
|
|
3845
|
+
const boxRef = useRef();
|
|
3846
|
+
const dateInputRef = useRef();
|
|
3847
|
+
const timeInputRef = useRef();
|
|
3848
|
+
const isCalendarPickerOpenRef = useRef(false);
|
|
3849
|
+
const selectedDateRef = useRef(defaultValue ? getLocalizedDayjs(defaultValue).toDate() : undefined);
|
|
3850
|
+
const selectedDateTupleRef = useRef(getDateTupleFromDate(selectedDateRef.current));
|
|
3851
|
+
const selectedTimeTupleRef = useRef(getTimeTupleFromDate(selectedDateRef.current));
|
|
3852
|
+
const { forceUpdate } = useForceUpdate();
|
|
3853
|
+
const rangeCalendarPickerDefaultValue = useMemo(() => selectedDateTupleRef.current
|
|
3854
|
+
? getDateFromDateAndTimeTuple(selectedDateTupleRef.current, ['00', '00'])
|
|
3855
|
+
: undefined,
|
|
3856
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3857
|
+
[selectedDateTupleRef.current]);
|
|
3858
|
+
const submit = useCallback(() => {
|
|
3859
|
+
if (!onChange || !selectedDateRef.current) {
|
|
3860
|
+
return;
|
|
3861
|
+
}
|
|
3862
|
+
const nextDate = getUtcizedDayjs(selectedDateRef.current).toDate();
|
|
3863
|
+
onChange(nextDate);
|
|
3864
|
+
}, [onChange]);
|
|
3865
|
+
const closeCalendarPicker = useCallback(() => {
|
|
3866
|
+
isCalendarPickerOpenRef.current = false;
|
|
3867
|
+
forceUpdate();
|
|
3868
|
+
}, [forceUpdate]);
|
|
3869
|
+
const handleClickOutside = useCallback((event) => {
|
|
3870
|
+
const target = event.target;
|
|
3871
|
+
if (dateInputRef.current.box.contains(target)) {
|
|
3872
|
+
return;
|
|
3873
|
+
}
|
|
3874
|
+
closeCalendarPicker();
|
|
3875
|
+
}, [closeCalendarPicker]);
|
|
3876
|
+
const handleDateInputNext = useCallback(() => {
|
|
3877
|
+
if (!withTime) {
|
|
3878
|
+
return;
|
|
3879
|
+
}
|
|
3880
|
+
timeInputRef.current.focus();
|
|
3881
|
+
}, [withTime]);
|
|
3882
|
+
const handleDateInputChange = useCallback((nextDateTuple, isFilled) => {
|
|
3883
|
+
selectedDateTupleRef.current = nextDateTuple;
|
|
3884
|
+
// If there is no time input or a time has already been selected,
|
|
3885
|
+
if (!withTime || selectedTimeTupleRef.current) {
|
|
3886
|
+
// we must update the selected date and call onChange()
|
|
3887
|
+
const timeTuple = (withTime ? selectedTimeTupleRef.current : ['00', '00']);
|
|
3888
|
+
const nextDate = getDateFromDateAndTimeTuple(nextDateTuple, timeTuple);
|
|
3889
|
+
selectedDateRef.current = nextDate;
|
|
3890
|
+
submit();
|
|
3891
|
+
}
|
|
3892
|
+
if (isFilled) {
|
|
3893
|
+
handleDateInputNext();
|
|
3894
|
+
}
|
|
3895
|
+
}, [handleDateInputNext, submit, withTime]);
|
|
3896
|
+
const handleCalendarPickerChange = useCallback((nextDateTuple) => {
|
|
3897
|
+
// If this is a date picker without a time input,
|
|
3898
|
+
if (!withTime) {
|
|
3899
|
+
// we have to fix the date at the beginning of the day
|
|
3900
|
+
const nextDate = getDateFromDateAndTimeTuple(nextDateTuple, ['00', '00']);
|
|
3901
|
+
selectedDateRef.current = nextDate;
|
|
3902
|
+
}
|
|
3903
|
+
// If this is a date picker with a time input,
|
|
3904
|
+
else {
|
|
3905
|
+
// we include the selected time if it exists, set it at the beginning of the day if not
|
|
3906
|
+
const nextDate = getDateFromDateAndTimeTuple(nextDateTuple, selectedTimeTupleRef.current || ['00', '00']);
|
|
3907
|
+
selectedDateRef.current = nextDate;
|
|
3908
|
+
}
|
|
3909
|
+
selectedDateTupleRef.current = nextDateTuple;
|
|
3910
|
+
selectedTimeTupleRef.current = getTimeTupleFromDate(selectedDateRef.current);
|
|
3911
|
+
closeCalendarPicker();
|
|
3912
|
+
forceUpdate();
|
|
3913
|
+
submit();
|
|
3914
|
+
if (withTime && !selectedTimeTupleRef.current) {
|
|
3915
|
+
timeInputRef.current.focus();
|
|
3916
|
+
}
|
|
3917
|
+
}, [closeCalendarPicker, forceUpdate, submit, withTime]);
|
|
3918
|
+
const handleTimeInputFilled = useCallback((nextTimeTuple) => {
|
|
3919
|
+
// If a date has already been selected
|
|
3920
|
+
if (selectedDateTupleRef.current) {
|
|
3921
|
+
// we must update the selected date accordingly and submit it
|
|
3922
|
+
const nextDate = getDateFromDateAndTimeTuple(selectedDateTupleRef.current, nextTimeTuple);
|
|
3923
|
+
selectedDateRef.current = nextDate;
|
|
3924
|
+
submit();
|
|
3925
|
+
}
|
|
3926
|
+
selectedTimeTupleRef.current = nextTimeTuple;
|
|
3927
|
+
submit();
|
|
3928
|
+
}, [submit]);
|
|
3929
|
+
const openCalendarPicker = useCallback(() => {
|
|
3930
|
+
isCalendarPickerOpenRef.current = true;
|
|
3931
|
+
forceUpdate();
|
|
3932
|
+
}, [forceUpdate]);
|
|
3933
|
+
useEffect(() => {
|
|
3934
|
+
window.document.addEventListener('click', handleClickOutside);
|
|
3935
|
+
return () => {
|
|
3936
|
+
window.document.removeEventListener('click', handleClickOutside);
|
|
3937
|
+
};
|
|
3938
|
+
}, [handleClickOutside]);
|
|
3939
|
+
return (jsxs(Fieldset, { disabled: disabled, ...nativeProps, children: [jsx(Legend, { isDisabled: disabled, isHidden: isLabelHidden, children: label }), jsxs(Box$2, { ref: boxRef, children: [jsx(Field$1, { children: jsx(DateInput, { ref: dateInputRef, defaultValue: selectedDateTupleRef.current, disabled: disabled, isCompact: isCompact, isForcedFocused: isCalendarPickerOpenRef.current, isLight: isLight, onChange: handleDateInputChange, onClick: openCalendarPicker, onNext: handleDateInputNext }) }), withTime && (jsx(Field$1, { "$isTimeField": true, children: jsx(TimeInput, { ref: timeInputRef, defaultValue: selectedTimeTupleRef.current, disabled: disabled, isCompact: isCompact, isLight: isLight, minutesRange: minutesRange, onBack: () => dateInputRef.current.focus(true), onChange: handleTimeInputFilled, onFocus: closeCalendarPicker, onPrevious: () => dateInputRef.current.focus(true) }) }))] }), jsx(CalendarPicker, { defaultValue: rangeCalendarPickerDefaultValue, isHistorical: isHistorical, isOpen: isCalendarPickerOpenRef.current, onChange: handleCalendarPickerChange })] }));
|
|
4507
3940
|
}
|
|
3941
|
+
const Box$2 = styled.div `
|
|
3942
|
+
* {
|
|
3943
|
+
font-weight: 500;
|
|
3944
|
+
line-height: 1;
|
|
3945
|
+
}
|
|
4508
3946
|
|
|
4509
|
-
|
|
4510
|
-
|
|
3947
|
+
color: ${p => p.theme.color.gunMetal};
|
|
3948
|
+
font-size: 13px;
|
|
3949
|
+
position: relative;
|
|
3950
|
+
`;
|
|
3951
|
+
const Field$1 = styled.span `
|
|
3952
|
+
font-size: inherit;
|
|
3953
|
+
margin-left: ${p => (p.$isTimeField ? '2px' : 0)};
|
|
3954
|
+
`;
|
|
3955
|
+
|
|
3956
|
+
function sortDates(dates) {
|
|
3957
|
+
return dates
|
|
3958
|
+
.map(date => date.toISOString())
|
|
3959
|
+
.sort()
|
|
3960
|
+
.map(dateAsIsoString => dayjs_minExports(dateAsIsoString).toDate());
|
|
4511
3961
|
}
|
|
4512
3962
|
|
|
4513
|
-
function
|
|
4514
|
-
|
|
3963
|
+
function RangeCalendarPicker({ defaultValue, isHistorical, isOpen, onChange }) {
|
|
3964
|
+
const boxRef = useRef();
|
|
3965
|
+
const selectedFirstDate = useRef();
|
|
3966
|
+
const { forceUpdate } = useForceUpdate();
|
|
3967
|
+
const controlledValue = useMemo(() => (defaultValue ? sortDates(defaultValue) : undefined), [defaultValue]);
|
|
3968
|
+
const utcTodayAsDayjs = useMemo(() => getUtcDayjs().endOf('day'), []);
|
|
3969
|
+
const disabledDate = useMemo(() => (date) => isHistorical ? getUtcizedDayjs(date).isAfter(utcTodayAsDayjs) : false, [isHistorical, utcTodayAsDayjs]);
|
|
3970
|
+
const handleSelect = useCallback((nextDate) => {
|
|
3971
|
+
if (!selectedFirstDate.current) {
|
|
3972
|
+
selectedFirstDate.current = nextDate;
|
|
3973
|
+
return;
|
|
3974
|
+
}
|
|
3975
|
+
const sortedDateRange = sortDates([selectedFirstDate.current, nextDate]);
|
|
3976
|
+
const [startDate, endDate] = sortedDateRange;
|
|
3977
|
+
const startDateTuple = getDateTupleFromDate(startDate);
|
|
3978
|
+
const endDateTuple = getDateTupleFromDate(endDate);
|
|
3979
|
+
const nextDateTupleRange = [startDateTuple, endDateTuple];
|
|
3980
|
+
onChange(nextDateTupleRange);
|
|
3981
|
+
}, [onChange]);
|
|
3982
|
+
useEffect(() => {
|
|
3983
|
+
// We wait for the <Box /> to render so that `boxRef` is defined
|
|
3984
|
+
// and can be used as a container for <RsuiteDateRangePicker />
|
|
3985
|
+
forceUpdate();
|
|
3986
|
+
}, [forceUpdate]);
|
|
3987
|
+
return (jsx(Box$1, { ref: boxRef, onClick: stopMouseEventPropagation, children: boxRef.current && (jsx(DateRangePicker$1, { container: boxRef.current, disabledDate: disabledDate, format: "yyyy-MM-dd", locale: RSUITE_CALENDAR_LOCALE, onSelect: handleSelect, open: isOpen, ranges: [],
|
|
3988
|
+
// `defaultValue` seems to be immediatly cancelled so we come down to using a controlled `value`
|
|
3989
|
+
value: controlledValue })) }));
|
|
4515
3990
|
}
|
|
3991
|
+
const Box$1 = styled.div `
|
|
3992
|
+
height: 0;
|
|
3993
|
+
position: relative;
|
|
3994
|
+
user-select: none;
|
|
4516
3995
|
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
3996
|
+
/*
|
|
3997
|
+
This is a hack to hide .rs-picker-daterange > .rs-picker-toggle which must exist in DOM
|
|
3998
|
+
since it's used as a ref by Rsuite to calculate .rs-picker-daterange-menu position
|
|
3999
|
+
*/
|
|
4000
|
+
.rs-picker-daterange {
|
|
4001
|
+
font-size: 0;
|
|
4002
|
+
position: absolute;
|
|
4520
4003
|
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4004
|
+
.rs-picker-toggle {
|
|
4005
|
+
border: 0 !important;
|
|
4006
|
+
padding: 0;
|
|
4524
4007
|
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
}
|
|
4008
|
+
* {
|
|
4009
|
+
display: none;
|
|
4010
|
+
}
|
|
4011
|
+
}
|
|
4012
|
+
}
|
|
4528
4013
|
|
|
4529
|
-
|
|
4530
|
-
|
|
4531
|
-
|
|
4014
|
+
.rs-picker-daterange-menu {
|
|
4015
|
+
box-shadow: inset 0px 0px 0px 1px ${p => p.theme.color.lightGray};
|
|
4016
|
+
border-radius: 0;
|
|
4017
|
+
margin-top: 2px;
|
|
4532
4018
|
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4019
|
+
.rs-picker-daterange-header,
|
|
4020
|
+
.rs-calendar-header-time-toolbar,
|
|
4021
|
+
.rs-picker-toolbar {
|
|
4022
|
+
display: none;
|
|
4023
|
+
}
|
|
4536
4024
|
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
}
|
|
4025
|
+
.rs-picker-daterange-calendar-group {
|
|
4026
|
+
height: auto;
|
|
4540
4027
|
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4028
|
+
> .rs-calendar {
|
|
4029
|
+
font-size: 13px;
|
|
4030
|
+
height: auto !important;
|
|
4031
|
+
line-height: 1.4;
|
|
4032
|
+
padding: 0;
|
|
4544
4033
|
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
}
|
|
4034
|
+
&:first-child {
|
|
4035
|
+
border-right: solid 1px ${p => p.theme.color.lightGray};
|
|
4036
|
+
}
|
|
4548
4037
|
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4038
|
+
> .rs-calendar-header {
|
|
4039
|
+
border-bottom: solid 1px ${p => p.theme.color.lightGray};
|
|
4040
|
+
padding: 8px;
|
|
4552
4041
|
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
}
|
|
4042
|
+
> .rs-calendar-header-month-toolbar {
|
|
4043
|
+
align-items: center;
|
|
4044
|
+
color: ${p => p.theme.color.slateGray};
|
|
4045
|
+
display: flex;
|
|
4046
|
+
justify-content: space-between;
|
|
4556
4047
|
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
}
|
|
4048
|
+
> .rs-calendar-header-backward {
|
|
4049
|
+
color: ${p => p.theme.color.slateGray};
|
|
4050
|
+
}
|
|
4560
4051
|
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4052
|
+
> .rs-calendar-header-title {
|
|
4053
|
+
color: ${p => p.theme.color.slateGray};
|
|
4054
|
+
font-size: 13px;
|
|
4055
|
+
font-weight: 500;
|
|
4056
|
+
padding: 5px 8px 6px;
|
|
4057
|
+
text-transform: uppercase;
|
|
4564
4058
|
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
}
|
|
4059
|
+
&.rs-calendar-header-error {
|
|
4060
|
+
color: ${p => p.theme.color.slateGray};
|
|
4568
4061
|
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
}
|
|
4062
|
+
&:hover {
|
|
4063
|
+
color: ${p => p.theme.color.slateGray};
|
|
4064
|
+
}
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4572
4067
|
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
}
|
|
4068
|
+
> .rs-calendar-header-forward {
|
|
4069
|
+
color: ${p => p.theme.color.slateGray};
|
|
4070
|
+
}
|
|
4071
|
+
}
|
|
4072
|
+
}
|
|
4576
4073
|
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
}
|
|
4074
|
+
> .rs-calendar-body {
|
|
4075
|
+
padding: 12px 8px 0;
|
|
4580
4076
|
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4077
|
+
.rs-calendar-table-cell {
|
|
4078
|
+
padding: 0 0 4px 0;
|
|
4079
|
+
width: 33px;
|
|
4584
4080
|
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4081
|
+
&.rs-calendar-table-cell-in-range:before {
|
|
4082
|
+
background-color: ${p => p.theme.color.blueGray[25]};
|
|
4083
|
+
height: 33px;
|
|
4084
|
+
margin-top: 0;
|
|
4085
|
+
}
|
|
4588
4086
|
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4087
|
+
> .rs-calendar-table-cell-content {
|
|
4088
|
+
border-radius: 0 !important;
|
|
4089
|
+
display: inline-flex;
|
|
4090
|
+
height: 33px;
|
|
4091
|
+
justify-content: center;
|
|
4092
|
+
line-height: 1;
|
|
4093
|
+
padding: 7px 0 0;
|
|
4094
|
+
width: 33px;
|
|
4095
|
+
}
|
|
4096
|
+
&:hover .rs-calendar-table-cell-content {
|
|
4097
|
+
background-color: ${p => p.theme.color.blueYonder[25]};
|
|
4098
|
+
color: ${p => p.theme.color.blueYonder[100]};
|
|
4099
|
+
}
|
|
4100
|
+
&[role='columnheader'] .rs-calendar-table-cell-content,
|
|
4101
|
+
&[role='columnheader']:hover .rs-calendar-table-cell-content {
|
|
4102
|
+
background-color: transparent;
|
|
4103
|
+
color: ${p => p.theme.color.slateGray};
|
|
4104
|
+
}
|
|
4105
|
+
&.rs-calendar-table-cell-disabled .rs-calendar-table-cell-content {
|
|
4106
|
+
background-color: transparent;
|
|
4107
|
+
color: ${p => p.theme.color.lightGray};
|
|
4108
|
+
}
|
|
4109
|
+
&.rs-calendar-table-cell-selected > .rs-calendar-table-cell-content {
|
|
4110
|
+
background-color: ${p => p.theme.color.blueGray[100]};
|
|
4111
|
+
}
|
|
4112
|
+
}
|
|
4113
|
+
}
|
|
4592
4114
|
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4115
|
+
> .rs-calendar-month-dropdown {
|
|
4116
|
+
border: 0;
|
|
4117
|
+
margin-top: 3px;
|
|
4596
4118
|
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
}
|
|
4119
|
+
.rs-calendar-month-dropdown-year {
|
|
4120
|
+
color: ${p => p.theme.color.slateGray};
|
|
4600
4121
|
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
}
|
|
4122
|
+
&.rs-calendar-month-dropdown-year-active {
|
|
4123
|
+
color: ${p => p.theme.color.blueYonder[100]};
|
|
4124
|
+
}
|
|
4125
|
+
}
|
|
4604
4126
|
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4127
|
+
.rs-calendar-month-dropdown-cell {
|
|
4128
|
+
> .rs-calendar-month-dropdown-cell-content {
|
|
4129
|
+
border-radius: 0 !important;
|
|
4130
|
+
color: ${p => p.theme.color.gunMetal};
|
|
4131
|
+
display: inline-flex;
|
|
4132
|
+
height: 33px;
|
|
4133
|
+
justify-content: center;
|
|
4134
|
+
line-height: 1;
|
|
4135
|
+
padding: 8px 0 0;
|
|
4136
|
+
width: 33px;
|
|
4137
|
+
}
|
|
4138
|
+
&:hover > .rs-calendar-month-dropdown-cell-content {
|
|
4139
|
+
background-color: ${p => p.theme.color.blueYonder[25]};
|
|
4140
|
+
color: ${p => p.theme.color.blueYonder[100]};
|
|
4141
|
+
}
|
|
4142
|
+
&.rs-calendar-month-dropdown-cell-active > .rs-calendar-month-dropdown-cell-content {
|
|
4143
|
+
background-color: ${p => p.theme.color.blueGray[100]};
|
|
4144
|
+
color: ${p => p.theme.color.white};
|
|
4145
|
+
}
|
|
4146
|
+
}
|
|
4147
|
+
}
|
|
4148
|
+
}
|
|
4149
|
+
}
|
|
4150
|
+
}
|
|
4151
|
+
`;
|
|
4608
4152
|
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4153
|
+
var DateRangePosition;
|
|
4154
|
+
(function (DateRangePosition) {
|
|
4155
|
+
DateRangePosition["END"] = "END";
|
|
4156
|
+
DateRangePosition["START"] = "START";
|
|
4157
|
+
})(DateRangePosition || (DateRangePosition = {}));
|
|
4612
4158
|
|
|
4613
|
-
function
|
|
4614
|
-
return (jsx(IconBox, { "$color": color, "$size": size, children: jsxs("svg", { height: "20", viewBox: "0 0 20 20", width: "20", ...nativeProps, children: [jsx("path", { d: "M0,0H20V20H0Z", fill: "none" }), jsx("path", { d: "M10,0H8.35l-.007,0h-.08l-.012,0H8.142l-.007,0h0l-.012,0H8.094l-.013,0h0l-.008,0H8.065l-.008,0h0l-.014,0h0l-.013,0H8.017L8,.2H8L7.989.2h0L7.98.2h0l-.013,0h0l-.014,0h0l-.008,0H7.936l-.009,0h0l-.014,0h0L7.9.22H7.9l-.008,0h0l-.013,0h0L7.86.23h0l-.024,0h0l-.014,0h0L7.8.243h0l-.014,0h0L7.707.264h0l-.014,0h0A9.947,9.947,0,0,0,5.2,1.222l.961,1.755A8,8,0,0,1,10,2V0ZM3.558,2.351c-.2.172-.4.353-.592.541h0l-.021.021h0l0,0h0l-.015.015h0l-.005,0h0l-.02.02h0l-.005.005h0l-.016.016h0l0,0h0L2.856,3h0l-.005,0v0l0,0h0L2.83,3.03h0l0,0v0l-.014.014h0l0,0h0l0,0h0l-.009.01h0l0,0,0,0,0,0h0L2.762,3.1v0l0,0,0,0-.013.014,0,0,0,0,0,0,0,0,0,0-.007.008h0l0,0,0,0,0,0h0L2.7,3.17l0,0,0,0,0,0,0,0,0,0-.006.006,0,0,0,0,0,0,0,0,0,0-.007.008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,0-.006.006,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0-.006.006,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0L2.484,3.4v0l-.006.006,0,0,0,0,0,0,0,0v0l-.006.006,0,0,0,.005,0,0,0,0,0,0-.006.007h0l0,.007h0l0,.005,0,0,0,.006h0l-.006.007h0l0,.006v0l0,.005h0l-.006.007h0l-.006.006v0l-.005,0v0l-.012.014h0l-.005.006h0l-.006.007h0l-.006.007h0l0,.006v0l0,.006h0l-.012.014h0l0,.006h0l-.012.014h0l0,.006v0l-.018.021h0l0,.007h0l-.012.015h0l-.006.006h0l-.011.015h0l0,.007h0L2.232,3.7h0l-.012.015h0l-.006.007h0L2.2,3.74h0l0,.007h0l-.018.023h0l-.018.023h0L2.153,3.8h0l-.018.022h0l-.018.023h0l-.024.031h0L2.075,3.9h0l-.018.023h0l-.023.031h0A9.981,9.981,0,0,0,.744,6.209h0l-.015.036h0l-.011.027h0L.707,6.3h0l-.014.036h0l-.011.028h0l0,.009h0L2.541,7.1A8.047,8.047,0,0,1,4.847,3.88L3.558,2.351ZM.144,8.3l-.016.1h0V8.4h0l0,.024v.065h0l0,.015h0v.007h0v.007h0l0,.031h0A9.867,9.867,0,0,0,0,9.677H0v.007H0v.031H0v.007H0v.007H0v.024H0v.007H0v.006H0V9.8H0v.023H0V9.87H0v.008H0v.03H0v.008H0V10H0v.072H0V10.1H0v.04H0v.041H0v.023H0v.008H0v.031H0v.039H0v.04H0V10.4h0v.031h0v.04h0v.031h0v.039h0v.039h0v.039h0v.022h0v.008h0v.022h0V10.7h0v.022h0v.008h0v.062h0V10.8h0v.022h0v.016h0v.015h0v.007h0v.007h0v.039h0v.022h0l0,.015v.024h0v.008h0v.022h0v.008h0v.024l0,.015h0v.014h0v.007h0l0,.015h0v.022h0v.008h0v.024l0,.015h0v.014h0l0,.015h0V11.2h0v.014h0v.015h0v.007h0v.007h0l0,.023v.008h0v.007h0l0,.016h0v.007h0v.007h0l0,.023h0v.006h0v.007h0l0,.015h0v.007h0v.007h0V11.4h0l0,.016h0v.006h0v.007h0l0,.015h0v.008h0v.007h0l0,.023h0v.007h0V11.5h0l0,.015h0v.015h0l0,.023h0v.007h0v.007h0l0,.023h0V11.6h0l0,.03h0l.012.069h0l.007.038h0l.005.031h0l.006.031h0l.007.038h0c.011.059.022.118.034.176h0a9.873,9.873,0,0,0,.331,1.217l1.893-.646A7.991,7.991,0,0,1,2,10a8.162,8.162,0,0,1,.115-1.364L.144,8.3Zm2.947,5.738L1.365,15.047h0l.015.025h0l.015.024h0l0,.008h0l.01.017h0l0,.008h0l.01.016h0l0,.007h0l0,.008h0l.005.008h0l0,.008v0l0,.006h0l.009.016v0l0,.006v0l0,.007h0l0,.007v0l0,.006v0l0,.006v0l0,.008h0l0,.006,0,0,0,.005v0l0,.008h0l0,.006v0l0,.005,0,0,0,.005v0l0,.007,0,0,0,0,0,0,0,0,0,0,0,.007,0,0,0,.005,0,0,0,0,0,0,0,.006,0,0,0,.005,0,0,0,0,0,0,0,0v0l0,.007,0,0,0,0,0,0,0,0,0,0,0,.007,0,0,0,0,0,0,0,0,0,0,0,0,0,.008,0,0,0,0,0,0,0,0,0,0,0,.008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.008,0,0,0,.005,0,0,0,0v0l.006.009v0l0,.005,0,0,0,.005v0l.011.016,0,0,0,0v0l.011.016v0l0,0,0,0,0,0h0l.007.011h0l0,.005v0l0,.005h0l.011.017v0l0,.005h0l.011.017h0l0,.005v0l.012.018h0l0,.005h0l.016.024h0l0,.005h0l.013.018h0l0,.006h0l.016.023h0l0,.006h0l.013.018h0l0,.006h0l.017.024h0l.017.024h0l.017.024h0l.022.03h0l.018.024h0L2,15.995H2c.045.06.09.12.137.179h0q.081.1.165.2h0l.019.023h0l.043.052h0l.019.023h0L2.4,16.5h0l.025.028h0l.019.023h0l.044.051h0l.019.022h0l.019.022h0l0,0h0l.014.016h0l0,.005h0l.019.021h0l.005.005h0l.014.016h0l0,0,0,0,.014.015h0l.005.005v0l.019.02v0l0,0h0l.014.015v0l0,0h0l.014.015h0l.005,0h0l.014.015h0l0,.005h0l.005,0h0l.013.014,0,0,0,0v0l.014.014h0l0,.005,0,0,0,0h0l.008.009h0l0,0v0l0,0v0l.013.014,0,0,0,0,0,0,.013.013,0,0,0,0,0,0,0,0,0,0,.008.007,0,0,0,0,0,0,0,0,0,0L2.854,17v0l0,0,0,0,0,0,0,0,.013.013,0,0,0,0,0,0,0,0,0,0,.006.006,0,0,0,0,0,0,0,0,0,0,.005.005,0,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.006.006,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,0,.005h0l.006.006,0,0,0,0,0,0,0,0,0,0,.006.005,0,0,0,0,0,0,0,0,0,0,.006.006h0l.005,0,0,0,0,0,0,0,.005,0h0l.006.006,0,0,0,0,0,0,0,0,0,0,.007.006h0l.005.005,0,0,0,0,0,0,.007.006h0l.006.006,0,0,.005,0,0,0,.006,0h0l.007.006h0l0,.005,0,0,0,0v0l.007.006h0l.005.005,0,0,0,0,0,0,.007,0h0l.006,0,0,0,0,0,0,0,.006.005h0l.006.006,0,0,0,0,0,0,0,.005h0l.007.006h0l.006,0h0l0,0h0l.007.006h0l.006.006,0,0,.005,0,0,0,.007,0h0l.007.006h0l.006,0h0l.006,0h0l.007.006h0l.007.005h0l.006,0h0l.014.012h0l.006.005v0L3.5,17.6h0L3.5,17.6h0l.006,0h0l.014.012h0l.006.005h0l.015.012h0l.007.006h0l.014.012h0l.006.006h0l.007.005h0l.015.013h0l.006.006h0l.014.012h0l.007.006h0l.022.018h0l.022.018h0l.007.006h0l.015.012h0l.007,0h0l.022.018h0l.023.018h0l.007,0h0l.015.012h0l.007.005h0l.022.018h0l.023.018h0l.03.024h0l.023.018h0l.024.018h0l.031.024h0a9.867,9.867,0,0,0,.9.616l1.033-1.713a8.066,8.066,0,0,1-2.784-2.82Zm4.226,3.5-.671,1.885a9.967,9.967,0,0,0,2.273.518h0l.046.005h0l.04,0H9.02l.026,0h.02l.027,0h.021l.019,0h.022l.025,0h.029l.018,0H9.25l.018,0h1.194a10.415,10.415,0,0,0,1.112-.113L11.262,17.9a8.055,8.055,0,0,1-3.945-.362Zm8.736-2.308A8.04,8.04,0,0,1,12.8,17.5l.7,1.874c.1-.04.209-.081.313-.124h0l.036-.015h0l.027-.011h0l.026-.012h0l.008,0h0l.018-.007h0l.008,0h0l.007,0h0l.009,0h0l.008,0h0l.007,0h0L14,19.169h0l.007,0h0l.007,0h0l.008,0h0l.007,0h0l.006,0h0l.008,0h0l.007,0h0l.005,0h0l.005,0h0l.007,0,0,0,.006,0h0l0,0h0l.008,0h0l.006,0,0,0,.005,0h0l.006,0,0,0,.006,0,0,0,.005,0,0,0,0,0,0,0,.008,0,0,0,.005,0h0l0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,.007,0,0,0,0,0h0l0,0,0,0,.016-.008h0l0,0,0,0,0,0h0l.009,0h0l0,0,0,0,0,0h0l.01-.005h0l0,0,0,0,0,0h0L14.361,19h0l.006,0h0l.005,0h0l.012-.006h0l.006,0h0l.005,0h0l.018-.009h0l.006,0h0l.019-.01h0l.006,0h0l.006,0h0l.019-.009h0l.007,0h0l.02-.01h0l.007,0h0l.026-.013h0l.006,0h0l.02-.01h0l.006,0h0l.026-.014h0l.026-.014h0a10.018,10.018,0,0,0,1.446-.923h0l.1-.078h0l.006,0h0l.076-.061h0l.023-.019h0l.022-.018h0l0,0h0l.017-.013h0l0,0h0l.022-.018h0l0,0h0l.016-.013h0l0,0h0l.017-.014h0l.005,0h0l.006,0h0l.016-.013h0l0,0v0l.016-.013h0l.005-.005h0l.016-.013h0l0,0h0l0,0h0l.015-.013,0,0,0,0h0l.015-.013h0l0,0,0,0,0,0,0,0,.009-.008h0l0,0,0,0,0,0h0l.015-.013v0l.005,0,0,0,0,0h0l.009-.009h0l0,0,0,0,0,0,0,0,.01-.009h0l0,0,0,0,0,0,0,0,.014-.012,0,0,0,0,0,0,0,0,0,0,.007-.007,0,0,0,0,0,0,0,0,0,0,.009-.008h0l0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.005,0,0,0,0,0,0,0,0,0,0,0,0,.006,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.005,0,0,0,0,0,0,0,0,0,0,.006-.006,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.006-.006h0l0-.005,0,0,0,0,0,0,.006-.006h0l.005-.005,0,0,0,0,0,0,.005,0v0l.006-.006h0l.005,0,0,0,.005,0v0l.007-.006h0l.005,0,0,0,.005,0v0l.013-.012h0L17,17.143v0l.006-.006h0l.006-.007h0l.006-.005v0l.006-.005h0l.006-.006h0l.006-.006h0l.005-.005h0l.013-.013h0l.005-.006h0l.013-.013h0l.006-.007h0l.006-.006h0l.014-.014h0l.006-.005h0l.013-.014h0L17.137,17h0L17.144,17h0l.013-.013h0l.006-.006h0l.014-.013h0l.006-.006h0l.02-.02h0l.02-.02h0l.007-.006h0l.02-.021h0q.16-.168.313-.345l-1.512-1.309ZM18,10.1a8.007,8.007,0,0,1-1.026,3.821l1.742.983a10.02,10.02,0,0,0,.523-1.072h0l.023-.056h0l.006-.014h0l0-.014h0l0-.007h0l.006-.014h0l0-.007h0l0-.006h0l0-.006h0l0-.006h0l0-.006v0l0-.006h0l0-.006v0l0-.006h0l0-.005v0l0-.006h0l0-.006h0l0-.006h0l0-.006v0l0-.005h0l0-.006v-.007h0l0-.006v0l0-.006h0l0-.005v0l0-.006v0l0,0v0l0-.006v-.006l0,0v-.007l0-.005v0l0,0v0l0-.006v0l0,0v0l0-.005v-.007l0,0v-.006l0-.005V13.5l0,0v-.01l0-.005v0l0,0v0l0,0v0l0,0v0l0,0v0l0-.006v0l0,0h0l0-.006v0l0-.011v0l0-.006V13.4l0-.006v-.007l0-.007v0l0-.006v-.008l0-.006V13.35h0l0-.007v0l0-.007h0v-.006l0-.007h0l0,0v0l0-.006v0l0-.012v0l0-.007h0v-.006l0-.007h0l0-.013h0l0-.008h0v0h0l0-.007v0l0,0h0l0-.009h0l0-.013h0l0-.008h0V13.19h0l0-.008h0l.005-.013h0l0-.008h0v0h0l0-.009h0l0-.014h0l0-.013h0l.007-.023h0l.005-.013h0l0-.013h0l0-.009h0l0-.014h0c.014-.041.027-.083.039-.124h0c.026-.083.05-.167.073-.251h0l0-.014h0l0-.014h0l0-.01h0l.014-.051h0l.023-.09h0l.01-.037h0l.009-.037h0l0-.014h0l0-.023h0l0-.013h0l0-.014h0l0-.009h0l0-.013h0l0-.014h0l0-.009h0v0h0l0-.01h0l0-.014h0l.009-.038h0l0-.014h0l.006-.023h0l0-.013h0l0-.014h0l0-.009h0l0-.014h0l0-.014h0v-.008h0l0-.013v0l0-.013h0l0-.009h0v-.005h0l0-.009h0l0-.013v-.01h0v-.013h0l0-.014h0l0-.014h0v-.009h0v0h0v-.01l0-.013h0l0-.008h0v-.006l0-.007v0l0-.013v-.336h0v-.038h0v-.015h0v-.022h0v-.015h0v-.006h0v-.015h0v-.015h0v-.007h0v-.007h0V11.43h0v-.008h0l0-.014h0V11.4h0v-.007h0v-.008h0l0-.014h0l0-.015h0v-.008h0v-.008h0v-.008h0l0-.015h0l0-.024h0l0-.015h0l0-.039h0A10.3,10.3,0,0,0,20,10.13L18,10.1Zm-.267-6.446L16.186,4.927A7.989,7.989,0,0,1,17.862,8.51l1.965-.37a9.834,9.834,0,0,0-.545-1.867h0l-.011-.027h0l-.014-.036h0l-.015-.036h0l-.054-.126h0l-.011-.026h0l-.027-.062h0l-.015-.035h0L19.122,5.9h0l-.016-.036h0l-.012-.026h0l0-.008h0L19.077,5.8h0l-.012-.026h0l0-.008h0l-.008-.018h0l0-.008h0l-.012-.026h0l0-.009h0l-.012-.026h0L19,5.64h0l-.013-.026h0l0-.008h0l-.009-.018h0l0-.008h0l-.013-.026h0l-.013-.026h0l0-.008h0l-.013-.026h0l0-.008h0l-.009-.017h0l0-.008h0L18.9,5.431h0L18.88,5.4h0l-.014-.025h0l-.018-.035h0l-.013-.025h0l-.019-.034h0l-.032-.059h0l-.014-.026h0l-.019-.033h0l-.019-.033h0L18.718,5.1h0L18.7,5.064h0l-.014-.025h0c-.023-.039-.046-.078-.068-.117h0L18.6,4.889h0a10,10,0,0,0-.865-1.231ZM11.829.167l-.363,1.967A7.982,7.982,0,0,1,15.053,3.8l1.265-1.55a10,10,0,0,0-3.042-1.7h0l-.027-.01h0L13.22.53h0l-.009,0h0L13.183.517h0l-.009,0h0L13.155.508h0l-.008,0h0l-.009,0h0L13.118.5h0l-.008,0h0L13.089.486h0l-.007,0h0l-.008,0h0l-.009,0h0l-.008,0h0l-.007,0h0L13.024.465h0l-.007,0h0l-.007,0h0l-.009,0h0l-.008,0h0l-.007,0h0l-.009,0h0l-.009,0h0l-.007,0h0l-.007,0h0l-.009,0h0l-.007,0h-.012l-.006,0h0l-.008,0h0l-.005,0h0l-.005,0h0l-.009,0h0l-.006,0h-.012l-.006,0h0l-.008,0h0l-.006,0h-.012L12.8.4h0l-.005,0h0l-.005,0h-.013l-.007,0-.005,0h-.017l-.005,0-.006,0h-.013l-.005,0H12.7l-.012,0h0l-.005,0h-.012l-.01,0h-.019l-.005,0h0l-.012,0H12.61l-.006,0h0l-.012,0h-.018l-.019,0h-.018l-.02,0h-.01l-.02-.005h0l-.007,0h0l-.007,0h0L12.447.3h-.008L12.41.292h0l-.03-.007h0q-.273-.068-.55-.118Z", fill: "currentColor" })] }) }));
|
|
4159
|
+
function DateRangePicker({ defaultValue,
|
|
4160
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
4161
|
+
disabled = false, isCompact = false, isHistorical = false, isLabelHidden = false, isLight = false, label, minutesRange = 15, onChange, withTime = false, ...nativeProps }) {
|
|
4162
|
+
const startDateInputRef = useRef();
|
|
4163
|
+
const startTimeInputRef = useRef();
|
|
4164
|
+
const endDateInputRef = useRef();
|
|
4165
|
+
const endTimeInputRef = useRef();
|
|
4166
|
+
const isRangeCalendarPickerOpenRef = useRef(false);
|
|
4167
|
+
const selectedStartDateRef = useRef(defaultValue ? getLocalizedDayjs(defaultValue[0]).toDate() : undefined);
|
|
4168
|
+
const selectedEndDateRef = useRef(defaultValue ? getLocalizedDayjs(defaultValue[1]).toDate() : undefined);
|
|
4169
|
+
const selectedStartDateTupleRef = useRef(getDateTupleFromDate(selectedStartDateRef.current));
|
|
4170
|
+
const selectedEndDateTupleRef = useRef(getDateTupleFromDate(selectedEndDateRef.current));
|
|
4171
|
+
const selectedStartTimeTupleRef = useRef(getTimeTupleFromDate(selectedStartDateRef.current));
|
|
4172
|
+
const selectedEndTimeTupleRef = useRef(getTimeTupleFromDate(selectedEndDateRef.current));
|
|
4173
|
+
const { forceUpdate } = useForceUpdate();
|
|
4174
|
+
const rangeCalendarPickerDefaultValue = useMemo(() => selectedStartDateTupleRef.current && selectedEndDateTupleRef.current
|
|
4175
|
+
? [
|
|
4176
|
+
getDateFromDateAndTimeTuple(selectedStartDateTupleRef.current, ['00', '00']),
|
|
4177
|
+
getDateFromDateAndTimeTuple(selectedEndDateTupleRef.current, ['00', '00'], true)
|
|
4178
|
+
]
|
|
4179
|
+
: undefined,
|
|
4180
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4181
|
+
[selectedEndDateTupleRef.current, selectedStartDateTupleRef.current]);
|
|
4182
|
+
const submit = useCallback(() => {
|
|
4183
|
+
if (!onChange || !selectedStartDateRef.current || !selectedEndDateRef.current) {
|
|
4184
|
+
return;
|
|
4185
|
+
}
|
|
4186
|
+
const utcizedStartDate = getUtcizedDayjs(selectedStartDateRef.current).toDate();
|
|
4187
|
+
const utcizedEndDate = getUtcizedDayjs(selectedEndDateRef.current).toDate();
|
|
4188
|
+
const nextDateRange = [utcizedStartDate, utcizedEndDate];
|
|
4189
|
+
onChange(nextDateRange);
|
|
4190
|
+
}, [onChange]);
|
|
4191
|
+
const closeRangeCalendarPicker = useCallback(() => {
|
|
4192
|
+
isRangeCalendarPickerOpenRef.current = false;
|
|
4193
|
+
forceUpdate();
|
|
4194
|
+
}, [forceUpdate]);
|
|
4195
|
+
const handleClickOutside = useCallback((event) => {
|
|
4196
|
+
const target = event.target;
|
|
4197
|
+
if (startDateInputRef.current.box.contains(target) || endDateInputRef.current.box.contains(target)) {
|
|
4198
|
+
return;
|
|
4199
|
+
}
|
|
4200
|
+
closeRangeCalendarPicker();
|
|
4201
|
+
}, [closeRangeCalendarPicker]);
|
|
4202
|
+
const handleEndDateInputNext = useCallback(() => {
|
|
4203
|
+
if (!withTime) {
|
|
4204
|
+
return;
|
|
4205
|
+
}
|
|
4206
|
+
endTimeInputRef.current.focus();
|
|
4207
|
+
}, [withTime]);
|
|
4208
|
+
const handleEndDateInputPrevious = useCallback(() => {
|
|
4209
|
+
if (withTime) {
|
|
4210
|
+
startTimeInputRef.current.focus(true);
|
|
4211
|
+
return;
|
|
4212
|
+
}
|
|
4213
|
+
startDateInputRef.current.focus(true);
|
|
4214
|
+
}, [withTime]);
|
|
4215
|
+
const handleStartDateInputNext = useCallback(() => {
|
|
4216
|
+
if (withTime) {
|
|
4217
|
+
startTimeInputRef.current.focus();
|
|
4218
|
+
return;
|
|
4219
|
+
}
|
|
4220
|
+
endDateInputRef.current.focus();
|
|
4221
|
+
}, [withTime]);
|
|
4222
|
+
const handleDateInputChange = useCallback((position, nextDateTuple, isFilled) => {
|
|
4223
|
+
if (position === DateRangePosition.START) {
|
|
4224
|
+
selectedStartDateTupleRef.current = nextDateTuple;
|
|
4225
|
+
// If there is no time input or a start time has already been selected,
|
|
4226
|
+
if (!withTime || selectedStartTimeTupleRef.current) {
|
|
4227
|
+
// we must update the selected start date and call onChange()
|
|
4228
|
+
const startTimeTuple = (withTime ? selectedStartTimeTupleRef.current : ['00', '00']);
|
|
4229
|
+
const nextStartDate = getDateFromDateAndTimeTuple(nextDateTuple, startTimeTuple);
|
|
4230
|
+
selectedStartDateRef.current = nextStartDate;
|
|
4231
|
+
submit();
|
|
4232
|
+
}
|
|
4233
|
+
if (isFilled) {
|
|
4234
|
+
handleStartDateInputNext();
|
|
4235
|
+
}
|
|
4236
|
+
}
|
|
4237
|
+
else {
|
|
4238
|
+
selectedEndDateTupleRef.current = nextDateTuple;
|
|
4239
|
+
// If there is no time input or an end time has already been selected,
|
|
4240
|
+
if (!withTime || selectedEndTimeTupleRef.current) {
|
|
4241
|
+
// we must update the selected end date and call onChange()
|
|
4242
|
+
const endTimeTuple = (withTime ? selectedEndTimeTupleRef.current : ['23', '59']);
|
|
4243
|
+
const nextEndDate = getDateFromDateAndTimeTuple(nextDateTuple, endTimeTuple, true);
|
|
4244
|
+
selectedEndDateRef.current = nextEndDate;
|
|
4245
|
+
submit();
|
|
4246
|
+
}
|
|
4247
|
+
if (isFilled) {
|
|
4248
|
+
handleEndDateInputNext();
|
|
4249
|
+
}
|
|
4250
|
+
}
|
|
4251
|
+
}, [handleEndDateInputNext, handleStartDateInputNext, submit, withTime]);
|
|
4252
|
+
const handleRangeCalendarPickerChange = useCallback((nextDateTupleRange) => {
|
|
4253
|
+
const [nextStartDateTuple, nextEndDateTuple] = nextDateTupleRange;
|
|
4254
|
+
// If this is a date picker without a time input,
|
|
4255
|
+
if (!withTime) {
|
|
4256
|
+
// we have to fix the start date at the beginning of the day
|
|
4257
|
+
const nextStartDate = getDateFromDateAndTimeTuple(nextStartDateTuple, ['00', '00']);
|
|
4258
|
+
// and the end date at the end of the day
|
|
4259
|
+
const nextEndDate = getDateFromDateAndTimeTuple(nextEndDateTuple, ['23', '59'], true);
|
|
4260
|
+
selectedStartDateRef.current = nextStartDate;
|
|
4261
|
+
selectedEndDateRef.current = nextEndDate;
|
|
4262
|
+
}
|
|
4263
|
+
// If this is a date picker with a time input,
|
|
4264
|
+
else {
|
|
4265
|
+
// we include the selected start time if it exists, set it at the beginning of the day if not
|
|
4266
|
+
const nextStartDate = getDateFromDateAndTimeTuple(nextStartDateTuple, selectedStartTimeTupleRef.current || ['00', '00']);
|
|
4267
|
+
selectedStartDateRef.current = nextStartDate;
|
|
4268
|
+
// we include the selected end time if it exists, set it at the end of the day if not
|
|
4269
|
+
const nextEndDate = getDateFromDateAndTimeTuple(nextEndDateTuple, selectedEndTimeTupleRef.current || ['23', '59'], true);
|
|
4270
|
+
selectedEndDateRef.current = nextEndDate;
|
|
4271
|
+
}
|
|
4272
|
+
selectedStartDateTupleRef.current = nextStartDateTuple;
|
|
4273
|
+
selectedStartTimeTupleRef.current = getTimeTupleFromDate(selectedStartDateRef.current);
|
|
4274
|
+
selectedEndDateTupleRef.current = nextEndDateTuple;
|
|
4275
|
+
selectedEndTimeTupleRef.current = getTimeTupleFromDate(selectedEndDateRef.current);
|
|
4276
|
+
closeRangeCalendarPicker();
|
|
4277
|
+
forceUpdate();
|
|
4278
|
+
submit();
|
|
4279
|
+
}, [closeRangeCalendarPicker, forceUpdate, submit, withTime]);
|
|
4280
|
+
const handleTimeInputFilled = useCallback((position, nextTimeTuple) => {
|
|
4281
|
+
if (position === DateRangePosition.START) {
|
|
4282
|
+
// If a start date has already been selected
|
|
4283
|
+
if (selectedStartDateTupleRef.current) {
|
|
4284
|
+
// we must update the selected start date accordingly and submit it
|
|
4285
|
+
const nextStartDate = getDateFromDateAndTimeTuple(selectedStartDateTupleRef.current, nextTimeTuple);
|
|
4286
|
+
selectedStartDateRef.current = nextStartDate;
|
|
4287
|
+
submit();
|
|
4288
|
+
}
|
|
4289
|
+
selectedStartTimeTupleRef.current = nextTimeTuple;
|
|
4290
|
+
endDateInputRef.current.focus();
|
|
4291
|
+
}
|
|
4292
|
+
else {
|
|
4293
|
+
// If an end date has already been selected
|
|
4294
|
+
if (selectedEndDateTupleRef.current) {
|
|
4295
|
+
// we must update the selected end date accordingly and submit it
|
|
4296
|
+
const nextEndDate = getDateFromDateAndTimeTuple(selectedEndDateTupleRef.current, nextTimeTuple, true);
|
|
4297
|
+
selectedEndDateRef.current = nextEndDate;
|
|
4298
|
+
submit();
|
|
4299
|
+
}
|
|
4300
|
+
selectedEndTimeTupleRef.current = nextTimeTuple;
|
|
4301
|
+
}
|
|
4302
|
+
submit();
|
|
4303
|
+
}, [submit]);
|
|
4304
|
+
const openRangeCalendarPicker = useCallback(() => {
|
|
4305
|
+
isRangeCalendarPickerOpenRef.current = true;
|
|
4306
|
+
forceUpdate();
|
|
4307
|
+
}, [forceUpdate]);
|
|
4308
|
+
useEffect(() => {
|
|
4309
|
+
window.document.addEventListener('click', handleClickOutside);
|
|
4310
|
+
return () => {
|
|
4311
|
+
window.document.removeEventListener('click', handleClickOutside);
|
|
4312
|
+
};
|
|
4313
|
+
}, [handleClickOutside]);
|
|
4314
|
+
return (jsxs(Fieldset, { ...nativeProps, children: [jsx(Legend, { isDisabled: disabled, isHidden: isLabelHidden, children: label }), jsxs(Box, { isDisabled: disabled, children: [jsx(Field, { children: jsx(DateInput, { ref: startDateInputRef, defaultValue: selectedStartDateTupleRef.current, disabled: disabled, isCompact: isCompact, isForcedFocused: isRangeCalendarPickerOpenRef.current, isLight: isLight, isStartDate: true, onChange: (nextDateTuple, isFilled) => handleDateInputChange(DateRangePosition.START, nextDateTuple, isFilled), onClick: openRangeCalendarPicker, onNext: handleStartDateInputNext }) }), withTime && (jsx(Field, { isTimeField: true, children: jsx(TimeInput, { ref: startTimeInputRef, defaultValue: selectedStartTimeTupleRef.current, disabled: disabled, isCompact: isCompact, isLight: isLight, isStartDate: true, minutesRange: minutesRange, onBack: () => startDateInputRef.current.focus(true), onChange: nextTimeTuple => handleTimeInputFilled(DateRangePosition.START, nextTimeTuple), onFocus: closeRangeCalendarPicker, onNext: () => endDateInputRef.current.focus(), onPrevious: () => startDateInputRef.current.focus(true) }) })), jsx(Field, { isEndDateField: true, children: jsx(DateInput, { ref: endDateInputRef, defaultValue: selectedEndDateTupleRef.current, disabled: disabled, isCompact: isCompact, isEndDate: true, isForcedFocused: isRangeCalendarPickerOpenRef.current, isLight: isLight, onBack: handleEndDateInputPrevious, onChange: (nextDateTuple, isFilled) => handleDateInputChange(DateRangePosition.END, nextDateTuple, isFilled), onClick: openRangeCalendarPicker, onNext: handleEndDateInputNext, onPrevious: handleEndDateInputPrevious }) }), withTime && (jsx(Field, { isTimeField: true, children: jsx(TimeInput, { ref: endTimeInputRef, defaultValue: selectedEndTimeTupleRef.current, disabled: disabled, isCompact: isCompact, isEndDate: true, isLight: isLight, minutesRange: minutesRange, onBack: () => endDateInputRef.current.focus(true), onChange: nextTimeTuple => handleTimeInputFilled(DateRangePosition.END, nextTimeTuple), onFocus: closeRangeCalendarPicker, onPrevious: () => endDateInputRef.current.focus(true) }) }))] }), jsx(RangeCalendarPicker, { defaultValue: rangeCalendarPickerDefaultValue, isHistorical: isHistorical, isOpen: isRangeCalendarPickerOpenRef.current, onChange: handleRangeCalendarPickerChange })] }));
|
|
4615
4315
|
}
|
|
4316
|
+
const Box = styled.div `
|
|
4317
|
+
* {
|
|
4318
|
+
font-weight: 500;
|
|
4319
|
+
line-height: 1;
|
|
4320
|
+
}
|
|
4616
4321
|
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4322
|
+
color: ${p => p.theme.color.gunMetal};
|
|
4323
|
+
font-size: 13px;
|
|
4324
|
+
position: relative;
|
|
4620
4325
|
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4326
|
+
${p => p.isDisabled &&
|
|
4327
|
+
css `
|
|
4328
|
+
* {
|
|
4329
|
+
background-color: ${p.theme.color.cultured} !important;
|
|
4330
|
+
color: ${p.theme.color.lightGray} !important;
|
|
4331
|
+
cursor: not-allowed;
|
|
4332
|
+
}
|
|
4333
|
+
`}
|
|
4334
|
+
`;
|
|
4335
|
+
const Field = styled.span `
|
|
4336
|
+
font-size: inherit;
|
|
4337
|
+
margin-left: ${p => {
|
|
4338
|
+
if (p.isEndDateField) {
|
|
4339
|
+
return '10px';
|
|
4340
|
+
}
|
|
4341
|
+
return p.isTimeField ? '2px' : 0;
|
|
4342
|
+
}};
|
|
4343
|
+
`;
|
|
4624
4344
|
|
|
4625
|
-
function
|
|
4626
|
-
|
|
4345
|
+
function MultiCheckbox({ defaultValue = [], isInline = false, isLabelHidden = false, isLight = false, label, name, onChange, options }) {
|
|
4346
|
+
const checkedOptionValues = useRef(defaultValue);
|
|
4347
|
+
const key = useMemo(() => `${name}-${JSON.stringify(defaultValue)}`, [defaultValue, name]);
|
|
4348
|
+
const handleChange = useCallback((nextOptionValue, isChecked) => {
|
|
4349
|
+
const nextCheckedOptionValues = isChecked
|
|
4350
|
+
? [...checkedOptionValues.current, nextOptionValue]
|
|
4351
|
+
: reject(equals(nextOptionValue))(checkedOptionValues.current);
|
|
4352
|
+
checkedOptionValues.current = nextCheckedOptionValues;
|
|
4353
|
+
if (onChange) {
|
|
4354
|
+
const normalizedNextValue = nextCheckedOptionValues.length ? nextCheckedOptionValues : undefined;
|
|
4355
|
+
onChange(normalizedNextValue);
|
|
4356
|
+
}
|
|
4357
|
+
}, [onChange]);
|
|
4358
|
+
return (jsx(Fieldset, { isHidden: isLabelHidden, isLight: isLight, legend: label, children: jsx(ChecboxesBox$1, { "$isInline": isInline, children: options.map((option, index) => (jsx(Checkbox
|
|
4359
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
4360
|
+
, { defaultChecked: defaultValue.includes(option.value), label: option.label, name: `${name}${index}`, onChange: (isChecked) => handleChange(option.value, isChecked) }, `${name}-${index}`))) }) }, key));
|
|
4627
4361
|
}
|
|
4362
|
+
const ChecboxesBox$1 = styled.div `
|
|
4363
|
+
color: ${p => p.theme.color.gunMetal};
|
|
4364
|
+
display: flex;
|
|
4365
|
+
flex-direction: ${p => (p.$isInline ? 'row' : 'column')};
|
|
4628
4366
|
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4367
|
+
${p => !p.$isInline &&
|
|
4368
|
+
css `
|
|
4369
|
+
> .rs-checkbox:not(:first-child) {
|
|
4370
|
+
margin-top: 8px;
|
|
4371
|
+
}
|
|
4372
|
+
`}
|
|
4632
4373
|
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4374
|
+
${p => p.$isInline &&
|
|
4375
|
+
css `
|
|
4376
|
+
> .rs-checkbox:not(:first-child) {
|
|
4377
|
+
margin-left: 12px;
|
|
4378
|
+
}
|
|
4379
|
+
`}
|
|
4380
|
+
`;
|
|
4636
4381
|
|
|
4637
|
-
function
|
|
4638
|
-
|
|
4382
|
+
function MultiSelect({ fixedWidth = 5, isLabelHidden = false, isLight = false, label, onChange, options,
|
|
4383
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
4384
|
+
searchable = false, ...originalProps }) {
|
|
4385
|
+
const key = useMemo(() => `${originalProps.name}-${JSON.stringify(originalProps.defaultValue)}`, [originalProps.defaultValue, originalProps.name]);
|
|
4386
|
+
const handleChange = useCallback((nextValue) => {
|
|
4387
|
+
if (!onChange) {
|
|
4388
|
+
return;
|
|
4389
|
+
}
|
|
4390
|
+
const normalizedNextValue = !nextValue || !nextValue.length ? undefined : nextValue;
|
|
4391
|
+
onChange(normalizedNextValue);
|
|
4392
|
+
}, [onChange]);
|
|
4393
|
+
return (jsxs(Field$2, { children: [jsx(Label, { htmlFor: originalProps.name, isHidden: isLabelHidden, children: label }), jsx(StyledTagPicker, { "$fixedWidth": fixedWidth, "$isLight": isLight, data: options, id: originalProps.name, onChange: handleChange, searchable: searchable, ...originalProps }, key)] }));
|
|
4639
4394
|
}
|
|
4395
|
+
// TODO A width seems to be mandatory in rsuite which is a very dirty behavior.
|
|
4396
|
+
// We should hack that.
|
|
4397
|
+
const StyledTagPicker = styled(TagPicker) `
|
|
4398
|
+
border: 0;
|
|
4399
|
+
cursor: pointer;
|
|
4400
|
+
width: ${p => p.$fixedWidth}px;
|
|
4640
4401
|
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4402
|
+
> .rs-picker-toggle {
|
|
4403
|
+
background-color: ${p => (p.$isLight ? p.theme.color.white : p.theme.color.gainsboro)} !important;
|
|
4404
|
+
cursor: inherit;
|
|
4405
|
+
}
|
|
4406
|
+
`;
|
|
4644
4407
|
|
|
4645
|
-
function
|
|
4646
|
-
|
|
4408
|
+
function MultiRadio({ defaultValue, isInline = false, isLabelHidden = false, isLight = false, label, name, onChange, options }) {
|
|
4409
|
+
const [checkedOptionValue, setCheckedOptionValue] = useState(undefined);
|
|
4410
|
+
const key = useMemo(() => `${name}-${String(checkedOptionValue)}}`, [checkedOptionValue, name]);
|
|
4411
|
+
const handleChange = useCallback((nextOptionValue, isChecked) => {
|
|
4412
|
+
const nextCheckedOptionValue = isChecked ? nextOptionValue : undefined;
|
|
4413
|
+
setCheckedOptionValue(nextCheckedOptionValue);
|
|
4414
|
+
if (onChange) {
|
|
4415
|
+
onChange(nextCheckedOptionValue);
|
|
4416
|
+
}
|
|
4417
|
+
}, [onChange]);
|
|
4418
|
+
// TODO There may be a better solution.
|
|
4419
|
+
// A key change is not enough to force radio checked check changes
|
|
4420
|
+
// on `defaultValue` property update (even when appending `defaultValue` to `key`),
|
|
4421
|
+
// we need to force a second re-render in order for the changes to be applied.
|
|
4422
|
+
useEffect(() => {
|
|
4423
|
+
setCheckedOptionValue(defaultValue);
|
|
4424
|
+
}, [defaultValue]);
|
|
4425
|
+
return (jsx(Fieldset, { isHidden: isLabelHidden, isLight: isLight, legend: label, children: jsx(ChecboxesBox, { "$isInline": isInline, children: options.map((option, index) => (jsx(Radio
|
|
4426
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
4427
|
+
, { defaultChecked: option.value === checkedOptionValue, name: name, onChange: (_, isChecked) => handleChange(option.value, isChecked), children: option.label }, `${name}-${index}`))) }) }, key));
|
|
4647
4428
|
}
|
|
4429
|
+
const ChecboxesBox = styled.div `
|
|
4430
|
+
color: ${p => p.theme.color.gunMetal};
|
|
4431
|
+
display: flex;
|
|
4432
|
+
flex-direction: ${p => (p.$isInline ? 'row' : 'column')};
|
|
4433
|
+
font-weight: 500;
|
|
4648
4434
|
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4435
|
+
> .rs-radio {
|
|
4436
|
+
> .rs-radio-checker {
|
|
4437
|
+
min-height: 0;
|
|
4438
|
+
padding: 0 0 0 28px;
|
|
4652
4439
|
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4440
|
+
.rs-radio-wrapper {
|
|
4441
|
+
left: 2px;
|
|
4442
|
+
top: 3px !important;
|
|
4443
|
+
}
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4656
4446
|
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4447
|
+
${p => !p.$isInline &&
|
|
4448
|
+
css `
|
|
4449
|
+
> .rs-radio:not(:first-child) {
|
|
4450
|
+
margin-top: 6px;
|
|
4451
|
+
}
|
|
4452
|
+
`}
|
|
4660
4453
|
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
Calendar: Calendar,
|
|
4669
|
-
Check: Check,
|
|
4670
|
-
Chevron: Chevron,
|
|
4671
|
-
Clock: Clock,
|
|
4672
|
-
Close: Close,
|
|
4673
|
-
Confirm: Confirm,
|
|
4674
|
-
Control: Control,
|
|
4675
|
-
Delete: Delete,
|
|
4676
|
-
Display: Display,
|
|
4677
|
-
DoubleChevron: DoubleChevron,
|
|
4678
|
-
Download: Download,
|
|
4679
|
-
Drapeau: Drapeau,
|
|
4680
|
-
Duplicate: Duplicate,
|
|
4681
|
-
Edit: Edit,
|
|
4682
|
-
EditBis: EditBis,
|
|
4683
|
-
Favorite: Favorite,
|
|
4684
|
-
FilledArrow: FilledArrow,
|
|
4685
|
-
Filter: Filter,
|
|
4686
|
-
FilterBis: FilterBis,
|
|
4687
|
-
Fishery: Fishery,
|
|
4688
|
-
FishingEngine: FishingEngine,
|
|
4689
|
-
FleetSegment: FleetSegment,
|
|
4690
|
-
Focus: Focus,
|
|
4691
|
-
FocusVessel: FocusVessel,
|
|
4692
|
-
FocusZones: FocusZones,
|
|
4693
|
-
Hide: Hide,
|
|
4694
|
-
Info: Info,
|
|
4695
|
-
Infringement: Infringement,
|
|
4696
|
-
Landmark: Landmark,
|
|
4697
|
-
List: List,
|
|
4698
|
-
MapLayers: MapLayers,
|
|
4699
|
-
MeasureAngle: MeasureAngle,
|
|
4700
|
-
MeasureBrokenLine: MeasureBrokenLine,
|
|
4701
|
-
MeasureCircle: MeasureCircle,
|
|
4702
|
-
MeasureLine: MeasureLine,
|
|
4703
|
-
Minus: Minus,
|
|
4704
|
-
More: More,
|
|
4705
|
-
Note: Note,
|
|
4706
|
-
Observation: Observation,
|
|
4707
|
-
Pin: Pin,
|
|
4708
|
-
Pinpoint: Pinpoint,
|
|
4709
|
-
PinpointHide: PinpointHide,
|
|
4710
|
-
Plane: Plane,
|
|
4711
|
-
Plus: Plus,
|
|
4712
|
-
Reject: Reject,
|
|
4713
|
-
Save: Save,
|
|
4714
|
-
Search: Search,
|
|
4715
|
-
SelectCircle: SelectCircle,
|
|
4716
|
-
SelectPolygon: SelectPolygon,
|
|
4717
|
-
SelectRectangle: SelectRectangle,
|
|
4718
|
-
SelectZone: SelectZone,
|
|
4719
|
-
ShowErsMessages: ShowErsMessages,
|
|
4720
|
-
ShowXml: ShowXml,
|
|
4721
|
-
SortingArrows: SortingArrows,
|
|
4722
|
-
Summary: Summary,
|
|
4723
|
-
Tag: Tag,
|
|
4724
|
-
Unlock: Unlock,
|
|
4725
|
-
Vessel: Vessel,
|
|
4726
|
-
ViewOnMap: ViewOnMap
|
|
4727
|
-
});
|
|
4454
|
+
${p => p.$isInline &&
|
|
4455
|
+
css `
|
|
4456
|
+
> .rs-radio:not(:first-child) {
|
|
4457
|
+
margin-left: 12px;
|
|
4458
|
+
}
|
|
4459
|
+
`}
|
|
4460
|
+
`;
|
|
4728
4461
|
|
|
4729
4462
|
function MultiZoneEditor({ addButtonLabel, defaultValue = [], initialZone, isLabelHidden = false, isLight = false, label, labelPropName, onAdd, onCenter, onDelete, onEdit }) {
|
|
4730
4463
|
const prevDefaultValueRef = useRef(defaultValue);
|
|
@@ -4846,6 +4579,10 @@ const StyledInput$1 = styled(Input) `
|
|
|
4846
4579
|
font-size: 13px;
|
|
4847
4580
|
padding: 7px 11px;
|
|
4848
4581
|
width: 100%;
|
|
4582
|
+
|
|
4583
|
+
::placeholder {
|
|
4584
|
+
color: ${p => (p.$isLight ? p.theme.color.slateGray : p.theme.color.slateGray)};
|
|
4585
|
+
}
|
|
4849
4586
|
`;
|
|
4850
4587
|
|
|
4851
4588
|
function TextInput({ isLabelHidden = false, isLight = false, label, onChange, ...originalProps }) {
|
|
@@ -4864,6 +4601,10 @@ const StyledInput = styled(Input) `
|
|
|
4864
4601
|
border: 0;
|
|
4865
4602
|
font-size: 13px;
|
|
4866
4603
|
width: 100%;
|
|
4604
|
+
|
|
4605
|
+
::placeholder {
|
|
4606
|
+
color: ${p => (p.$isLight ? p.theme.color.slateGray : p.theme.color.slateGray)};
|
|
4607
|
+
}
|
|
4867
4608
|
`;
|
|
4868
4609
|
|
|
4869
4610
|
function FormikAutoComplete({ name, ...originalProps }) {
|