@mtes-mct/monitor-ui 1.2.0 → 1.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/.yarn/cache/dayjs-npm-1.11.5-a825142dc5-e3bbaa7b48.zip/node_modules/dayjs/dayjs.min.js +16 -0
- package/.yarn/cache/dayjs-npm-1.11.5-a825142dc5-e3bbaa7b48.zip/node_modules/dayjs/dayjs.min.js.map +1 -0
- package/.yarn/cache/dayjs-npm-1.11.5-a825142dc5-e3bbaa7b48.zip/node_modules/dayjs/locale/fr.js +2 -2
- package/.yarn/cache/dayjs-npm-1.11.5-a825142dc5-e3bbaa7b48.zip/node_modules/dayjs/locale/fr.js.map +1 -1
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_curry1.js +23 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_curry1.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_curry2.js +35 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_curry2.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_curry3.js +53 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_curry3.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_has.js +6 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_has.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_isObject.js +6 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_isObject.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_isPlaceholder.js +6 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/internal/_isPlaceholder.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/mergeDeepRight.js +35 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/mergeDeepRight.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/mergeDeepWithKey.js +47 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/mergeDeepWithKey.js.map +1 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/mergeWithKey.js +52 -0
- package/.yarn/cache/ramda-npm-0.28.0-6a5fe8f6cc-44ea6e5010.zip/node_modules/ramda/es/mergeWithKey.js.map +1 -0
- package/CHANGELOG.md +20 -0
- package/README.md +2 -0
- package/_virtual/dayjs.min.js +4 -0
- package/_virtual/dayjs.min.js.map +1 -0
- package/_virtual/dayjs.min2.js +6 -0
- package/_virtual/dayjs.min2.js.map +1 -0
- package/assets/rsuite-override.css +708 -0
- package/fields/Checkbox.d.ts +8 -0
- package/fields/DatePicker/index.d.ts +1 -1
- package/fields/DateRangePicker/NumberInput.d.ts +1 -1
- package/fields/DateRangePicker/index.d.ts +1 -1
- package/fields/Select.d.ts +13 -6
- package/formiks/FormikCheckbox.d.ts +5 -0
- package/formiks/FormikSelect.d.ts +1 -1
- package/index.d.ts +4 -0
- package/package.json +3 -8
- package/src/ThemeProvider.js +1 -1
- package/src/fields/Checkbox.js +17 -0
- package/src/fields/Checkbox.js.map +1 -0
- package/src/fields/DatePicker/index.js +1 -1
- package/src/fields/DatePicker/index.js.map +1 -1
- package/src/fields/DateRangePicker/RangeCalendarPicker.js +2 -2
- package/src/fields/DateRangePicker/RangeCalendarPicker.js.map +1 -1
- package/src/fields/DateRangePicker/index.js +1 -1
- package/src/fields/DateRangePicker/index.js.map +1 -1
- package/src/fields/DateRangePicker/utils.js +2 -2
- package/src/fields/DateRangePicker/utils.js.map +1 -1
- package/src/fields/Select.js +5 -4
- package/src/fields/Select.js.map +1 -1
- package/src/formiks/FormikCheckbox.js +20 -0
- package/src/formiks/FormikCheckbox.js.map +1 -0
- package/src/formiks/FormikSelect.js.map +1 -1
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/utils/dayjs.js +6 -6
- package/src/utils/dayjs.js.map +1 -1
- package/src/utils/getLocalizedDayjs.js +2 -2
- package/src/utils/getLocalizedDayjs.js.map +1 -1
- package/src/utils/getUtcDayjs.js +2 -2
- package/src/utils/getUtcDayjs.js.map +1 -1
- package/src/utils/getUtcizedDayjs.js +2 -2
- package/src/utils/getUtcizedDayjs.js.map +1 -1
- package/src/utils/sortDates.js +2 -2
- package/src/utils/sortDates.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocalizedDayjs.js","sources":["../../../src/utils/getLocalizedDayjs.ts"],"sourcesContent":["// TODO Use `date-fns` instead of `dayjs`.\n\nimport { dayjs } from './dayjs'\n\nimport type { Dayjs } from 'dayjs'\n\n/**\n * Get a Dayjs instance of a UTC date treated as if it was a locally timezoned one\n *\n * @example\n * `2022-01-02T03:04:05.006Z` => `2022-01-02T03:04:05.006+01:00` (or `+02:00` during DST) in Europe/Paris timezone.\n */\nexport function getLocalizedDayjs(utcDate: Date): Dayjs {\n // The number of minutes returned by getTimezoneOffset() is positive if the local time zone is behind UTC,\n // and negative if the local time zone is ahead of UTC. For example, for UTC+10, -600 will be returned.\n const timezoneOffsetInMinutes = utcDate.getTimezoneOffset()\n\n return dayjs(utcDate).add(timezoneOffsetInMinutes, 'minutes')\n}\n"],"names":[],"mappings":";;;AAAA;AAMA;;;;;AAKG;AACG,SAAU,iBAAiB,CAAC,OAAa,EAAA;;;AAG7C,IAAA,MAAM,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAA;IAE3D,
|
|
1
|
+
{"version":3,"file":"getLocalizedDayjs.js","sources":["../../../src/utils/getLocalizedDayjs.ts"],"sourcesContent":["// TODO Use `date-fns` instead of `dayjs`.\n\nimport { dayjs } from './dayjs'\n\nimport type { Dayjs } from 'dayjs'\n\n/**\n * Get a Dayjs instance of a UTC date treated as if it was a locally timezoned one\n *\n * @example\n * `2022-01-02T03:04:05.006Z` => `2022-01-02T03:04:05.006+01:00` (or `+02:00` during DST) in Europe/Paris timezone.\n */\nexport function getLocalizedDayjs(utcDate: Date): Dayjs {\n // The number of minutes returned by getTimezoneOffset() is positive if the local time zone is behind UTC,\n // and negative if the local time zone is ahead of UTC. For example, for UTC+10, -600 will be returned.\n const timezoneOffsetInMinutes = utcDate.getTimezoneOffset()\n\n return dayjs(utcDate).add(timezoneOffsetInMinutes, 'minutes')\n}\n"],"names":["dayjs"],"mappings":";;;AAAA;AAMA;;;;;AAKG;AACG,SAAU,iBAAiB,CAAC,OAAa,EAAA;;;AAG7C,IAAA,MAAM,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAA;IAE3D,OAAOA,gBAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAA;AAC/D;;;;"}
|
package/src/utils/getUtcDayjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUtcDayjs.js","sources":["../../../src/utils/getUtcDayjs.ts"],"sourcesContent":["import { dayjs } from './dayjs'\n\nimport type { Dayjs } from 'dayjs'\n\nexport function getUtcDayjs(): Dayjs {\n return dayjs().utc()\n}\n"],"names":[],"mappings":";;;SAIgB,WAAW,GAAA;AACzB,IAAA,
|
|
1
|
+
{"version":3,"file":"getUtcDayjs.js","sources":["../../../src/utils/getUtcDayjs.ts"],"sourcesContent":["import { dayjs } from './dayjs'\n\nimport type { Dayjs } from 'dayjs'\n\nexport function getUtcDayjs(): Dayjs {\n return dayjs().utc()\n}\n"],"names":["dayjs"],"mappings":";;;SAIgB,WAAW,GAAA;AACzB,IAAA,OAAOA,gBAAK,EAAE,CAAC,GAAG,EAAE,CAAA;AACtB;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './dayjs.js';
|
|
2
|
-
import
|
|
2
|
+
import dayjs_minExports from '../../_virtual/dayjs.min2.js';
|
|
3
3
|
|
|
4
4
|
// TODO Use `date-fns` instead of `dayjs`.
|
|
5
5
|
/**
|
|
@@ -13,7 +13,7 @@ function getUtcizedDayjs(localDate) {
|
|
|
13
13
|
// The number of minutes returned by getTimezoneOffset() is positive if the local time zone is behind UTC,
|
|
14
14
|
// and negative if the local time zone is ahead of UTC. For example, for UTC+10, -600 will be returned.
|
|
15
15
|
const timezoneOffsetInMinutes = definedLocalDate.getTimezoneOffset();
|
|
16
|
-
return
|
|
16
|
+
return dayjs_minExports(definedLocalDate).subtract(timezoneOffsetInMinutes, 'minutes');
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export { getUtcizedDayjs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUtcizedDayjs.js","sources":["../../../src/utils/getUtcizedDayjs.ts"],"sourcesContent":["// TODO Use `date-fns` instead of `dayjs`.\n\nimport { dayjs } from './dayjs'\n\nimport type { Dayjs } from 'dayjs'\n\n/**\n * Get a Dayjs instance of a locally timezoned date treated as if it was a UTC one\n *\n * @example\n * `2022-01-02T03:04:05.006+01:00` => `2022-01-02T03:04:05.006Z`.\n */\nexport function getUtcizedDayjs(localDate?: Date): Dayjs {\n const definedLocalDate = localDate || new Date()\n // The number of minutes returned by getTimezoneOffset() is positive if the local time zone is behind UTC,\n // and negative if the local time zone is ahead of UTC. For example, for UTC+10, -600 will be returned.\n const timezoneOffsetInMinutes = definedLocalDate.getTimezoneOffset()\n\n return dayjs(definedLocalDate).subtract(timezoneOffsetInMinutes, 'minutes')\n}\n"],"names":[],"mappings":";;;AAAA;AAMA;;;;;AAKG;AACG,SAAU,eAAe,CAAC,SAAgB,EAAA;AAC9C,IAAA,MAAM,gBAAgB,GAAG,SAAS,IAAI,IAAI,IAAI,EAAE,CAAA;;;AAGhD,IAAA,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAA;IAEpE,
|
|
1
|
+
{"version":3,"file":"getUtcizedDayjs.js","sources":["../../../src/utils/getUtcizedDayjs.ts"],"sourcesContent":["// TODO Use `date-fns` instead of `dayjs`.\n\nimport { dayjs } from './dayjs'\n\nimport type { Dayjs } from 'dayjs'\n\n/**\n * Get a Dayjs instance of a locally timezoned date treated as if it was a UTC one\n *\n * @example\n * `2022-01-02T03:04:05.006+01:00` => `2022-01-02T03:04:05.006Z`.\n */\nexport function getUtcizedDayjs(localDate?: Date): Dayjs {\n const definedLocalDate = localDate || new Date()\n // The number of minutes returned by getTimezoneOffset() is positive if the local time zone is behind UTC,\n // and negative if the local time zone is ahead of UTC. For example, for UTC+10, -600 will be returned.\n const timezoneOffsetInMinutes = definedLocalDate.getTimezoneOffset()\n\n return dayjs(definedLocalDate).subtract(timezoneOffsetInMinutes, 'minutes')\n}\n"],"names":["dayjs"],"mappings":";;;AAAA;AAMA;;;;;AAKG;AACG,SAAU,eAAe,CAAC,SAAgB,EAAA;AAC9C,IAAA,MAAM,gBAAgB,GAAG,SAAS,IAAI,IAAI,IAAI,EAAE,CAAA;;;AAGhD,IAAA,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,iBAAiB,EAAE,CAAA;IAEpE,OAAOA,gBAAK,CAAC,gBAAgB,CAAC,CAAC,QAAQ,CAAC,uBAAuB,EAAE,SAAS,CAAC,CAAA;AAC7E;;;;"}
|
package/src/utils/sortDates.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './dayjs.js';
|
|
2
|
-
import
|
|
2
|
+
import dayjs_minExports from '../../_virtual/dayjs.min2.js';
|
|
3
3
|
|
|
4
4
|
function sortDates(dates) {
|
|
5
5
|
return dates
|
|
6
6
|
.map(date => date.toISOString())
|
|
7
7
|
.sort()
|
|
8
|
-
.map(dateAsIsoString =>
|
|
8
|
+
.map(dateAsIsoString => dayjs_minExports(dateAsIsoString).toDate());
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { sortDates };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortDates.js","sources":["../../../src/utils/sortDates.ts"],"sourcesContent":["import { dayjs } from './dayjs'\n\nexport function sortDates(dates: Date[]): Date[] {\n return dates\n .map(date => date.toISOString())\n .sort()\n .map(dateAsIsoString => dayjs(dateAsIsoString).toDate())\n}\n"],"names":[],"mappings":";;;AAEM,SAAU,SAAS,CAAC,KAAa,EAAA;AACrC,IAAA,OAAO,KAAK;SACT,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;AAC/B,SAAA,IAAI,EAAE;AACN,SAAA,GAAG,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"sortDates.js","sources":["../../../src/utils/sortDates.ts"],"sourcesContent":["import { dayjs } from './dayjs'\n\nexport function sortDates(dates: Date[]): Date[] {\n return dates\n .map(date => date.toISOString())\n .sort()\n .map(dateAsIsoString => dayjs(dateAsIsoString).toDate())\n}\n"],"names":["dayjs"],"mappings":";;;AAEM,SAAU,SAAS,CAAC,KAAa,EAAA;AACrC,IAAA,OAAO,KAAK;SACT,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;AAC/B,SAAA,IAAI,EAAE;AACN,SAAA,GAAG,CAAC,eAAe,IAAIA,gBAAK,CAAC,eAAe,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;AAC5D;;;;"}
|