@alfalab/core-components-date-range-input 3.5.27 → 3.5.28-snapshot-1393ffa
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/Component.responsive.js +4 -3
- package/Component.responsive.js.map +1 -0
- package/components/date-range-input/Component.js +26 -27
- package/components/date-range-input/Component.js.map +1 -0
- package/components/date-range-input/index.css +11 -51
- package/components/date-range-input/index.js +3 -2
- package/components/date-range-input/index.js.map +1 -0
- package/components/date-range-input/index.module.css.js +8 -0
- package/components/date-range-input/index.module.css.js.map +1 -0
- package/cssm/Component.responsive.js +6 -5
- package/cssm/Component.responsive.js.map +1 -0
- package/cssm/components/date-range-input/Component.js +24 -23
- package/cssm/components/date-range-input/Component.js.map +1 -0
- package/cssm/components/date-range-input/index.js +3 -2
- package/cssm/components/date-range-input/index.js.map +1 -0
- package/cssm/components/date-range-input/index.module.css +5 -44
- package/cssm/desktop/Component.desktop.js +5 -4
- package/cssm/desktop/Component.desktop.js.map +1 -0
- package/cssm/desktop/index.js +3 -2
- package/cssm/desktop/index.js.map +1 -0
- package/cssm/index.js +1 -0
- package/cssm/index.js.map +1 -0
- package/cssm/mobile/Component.mobile.js +5 -4
- package/cssm/mobile/Component.mobile.js.map +1 -0
- package/cssm/mobile/index.js +3 -2
- package/cssm/mobile/index.js.map +1 -0
- package/cssm/src/Component.responsive.d.ts +19 -0
- package/cssm/{components → src/components}/date-range-input/Component.d.ts +8 -11
- package/cssm/src/components/date-range-input/index.d.ts +1 -0
- package/cssm/src/desktop/Component.desktop.d.ts +8 -0
- package/cssm/src/desktop/index.d.ts +1 -0
- package/cssm/src/index.d.ts +2 -0
- package/cssm/src/mobile/Component.mobile.d.ts +8 -0
- package/cssm/src/mobile/index.d.ts +1 -0
- package/cssm/src/utils/format.d.ts +7 -0
- package/cssm/src/utils/index.d.ts +1 -0
- package/cssm/utils/format.js +1 -0
- package/cssm/utils/format.js.map +1 -0
- package/cssm/utils/index.js +9 -8
- package/cssm/utils/index.js.map +1 -0
- package/desktop/Component.desktop.js +5 -4
- package/desktop/Component.desktop.js.map +1 -0
- package/desktop/index.js +3 -2
- package/desktop/index.js.map +1 -0
- package/esm/Component.responsive.js +1 -0
- package/esm/Component.responsive.js.map +1 -0
- package/esm/components/date-range-input/Component.js +2 -3
- package/esm/components/date-range-input/Component.js.map +1 -0
- package/esm/components/date-range-input/index.css +11 -51
- package/esm/components/date-range-input/index.js +1 -0
- package/esm/components/date-range-input/index.js.map +1 -0
- package/esm/components/date-range-input/index.module.css.js +6 -0
- package/esm/components/date-range-input/index.module.css.js.map +1 -0
- package/esm/desktop/Component.desktop.js +1 -0
- package/esm/desktop/Component.desktop.js.map +1 -0
- package/esm/desktop/index.js +1 -0
- package/esm/desktop/index.js.map +1 -0
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -0
- package/esm/mobile/Component.mobile.js +1 -0
- package/esm/mobile/Component.mobile.js.map +1 -0
- package/esm/mobile/index.js +1 -0
- package/esm/mobile/index.js.map +1 -0
- package/esm/src/Component.responsive.d.ts +19 -0
- package/{components → esm/src/components}/date-range-input/Component.d.ts +8 -11
- package/esm/src/components/date-range-input/index.d.ts +1 -0
- package/esm/src/desktop/Component.desktop.d.ts +8 -0
- package/esm/src/desktop/index.d.ts +1 -0
- package/esm/src/index.d.ts +2 -0
- package/esm/src/mobile/Component.mobile.d.ts +8 -0
- package/esm/src/mobile/index.d.ts +1 -0
- package/esm/src/utils/format.d.ts +7 -0
- package/esm/src/utils/index.d.ts +1 -0
- package/esm/utils/format.js +1 -0
- package/esm/utils/format.js.map +1 -0
- package/esm/utils/index.js +1 -0
- package/esm/utils/index.js.map +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -0
- package/mobile/Component.mobile.js +5 -4
- package/mobile/Component.mobile.js.map +1 -0
- package/mobile/index.js +3 -2
- package/mobile/index.js.map +1 -0
- package/modern/Component.responsive.js +1 -0
- package/modern/Component.responsive.js.map +1 -0
- package/modern/components/date-range-input/Component.js +2 -3
- package/modern/components/date-range-input/Component.js.map +1 -0
- package/modern/components/date-range-input/index.css +11 -51
- package/modern/components/date-range-input/index.js +1 -0
- package/modern/components/date-range-input/index.js.map +1 -0
- package/modern/components/date-range-input/index.module.css.js +6 -0
- package/modern/components/date-range-input/index.module.css.js.map +1 -0
- package/modern/desktop/Component.desktop.js +1 -0
- package/modern/desktop/Component.desktop.js.map +1 -0
- package/modern/desktop/index.js +1 -0
- package/modern/desktop/index.js.map +1 -0
- package/modern/index.js +1 -0
- package/modern/index.js.map +1 -0
- package/modern/mobile/Component.mobile.js +1 -0
- package/modern/mobile/Component.mobile.js.map +1 -0
- package/modern/mobile/index.js +1 -0
- package/modern/mobile/index.js.map +1 -0
- package/modern/src/Component.responsive.d.ts +19 -0
- package/{esm → modern/src}/components/date-range-input/Component.d.ts +8 -11
- package/modern/src/components/date-range-input/index.d.ts +1 -0
- package/modern/src/desktop/Component.desktop.d.ts +8 -0
- package/modern/src/desktop/index.d.ts +1 -0
- package/modern/src/index.d.ts +2 -0
- package/modern/src/mobile/Component.mobile.d.ts +8 -0
- package/modern/src/mobile/index.d.ts +1 -0
- package/modern/src/utils/format.d.ts +7 -0
- package/modern/src/utils/index.d.ts +1 -0
- package/modern/utils/format.js +1 -0
- package/modern/utils/format.js.map +1 -0
- package/modern/utils/index.js +1 -0
- package/modern/utils/index.js.map +1 -0
- package/moderncssm/Component.responsive.js +1 -0
- package/moderncssm/Component.responsive.js.map +1 -0
- package/moderncssm/components/date-range-input/Component.js +1 -0
- package/moderncssm/components/date-range-input/Component.js.map +1 -0
- package/moderncssm/components/date-range-input/index.js +1 -0
- package/moderncssm/components/date-range-input/index.js.map +1 -0
- package/moderncssm/components/date-range-input/index.module.css +0 -21
- package/moderncssm/desktop/Component.desktop.js +1 -0
- package/moderncssm/desktop/Component.desktop.js.map +1 -0
- package/moderncssm/desktop/index.js +1 -0
- package/moderncssm/desktop/index.js.map +1 -0
- package/moderncssm/index.js +1 -0
- package/moderncssm/index.js.map +1 -0
- package/moderncssm/mobile/Component.mobile.js +1 -0
- package/moderncssm/mobile/Component.mobile.js.map +1 -0
- package/moderncssm/mobile/index.js +1 -0
- package/moderncssm/mobile/index.js.map +1 -0
- package/moderncssm/src/Component.responsive.d.ts +19 -0
- package/{modern → moderncssm/src}/components/date-range-input/Component.d.ts +8 -11
- package/moderncssm/src/components/date-range-input/index.d.ts +1 -0
- package/moderncssm/src/desktop/Component.desktop.d.ts +8 -0
- package/moderncssm/src/desktop/index.d.ts +1 -0
- package/moderncssm/src/index.d.ts +2 -0
- package/moderncssm/src/mobile/Component.mobile.d.ts +8 -0
- package/moderncssm/src/mobile/index.d.ts +1 -0
- package/moderncssm/src/utils/format.d.ts +7 -0
- package/moderncssm/src/utils/index.d.ts +1 -0
- package/moderncssm/utils/format.js +1 -0
- package/moderncssm/utils/format.js.map +1 -0
- package/moderncssm/utils/index.js +1 -0
- package/moderncssm/utils/index.js.map +1 -0
- package/package.json +9 -10
- package/src/Component.responsive.d.ts +19 -0
- package/src/components/date-range-input/Component.d.ts +114 -0
- package/src/components/date-range-input/index.d.ts +1 -0
- package/src/desktop/Component.desktop.d.ts +8 -0
- package/src/desktop/index.d.ts +1 -0
- package/src/index.d.ts +2 -0
- package/src/mobile/Component.mobile.d.ts +8 -0
- package/src/mobile/index.d.ts +1 -0
- package/src/utils/format.d.ts +7 -0
- package/src/utils/index.d.ts +1 -0
- package/utils/format.js +1 -0
- package/utils/format.js.map +1 -0
- package/utils/index.js +9 -8
- package/utils/index.js.map +1 -0
- package/Component.responsive.d.ts +0 -21
- package/components/date-range-input/index.d.ts +0 -1
- package/cssm/Component.responsive.d.ts +0 -21
- package/cssm/components/date-range-input/index.d.ts +0 -1
- package/cssm/desktop/Component.desktop.d.ts +0 -10
- package/cssm/desktop/index.d.ts +0 -2
- package/cssm/index.d.ts +0 -3
- package/cssm/mobile/Component.mobile.d.ts +0 -10
- package/cssm/mobile/index.d.ts +0 -2
- package/cssm/utils/format.d.ts +0 -8
- package/cssm/utils/index.d.ts +0 -1
- package/desktop/Component.desktop.d.ts +0 -10
- package/desktop/index.d.ts +0 -2
- package/esm/Component.responsive.d.ts +0 -21
- package/esm/components/date-range-input/index.d.ts +0 -1
- package/esm/desktop/Component.desktop.d.ts +0 -10
- package/esm/desktop/index.d.ts +0 -2
- package/esm/index.d.ts +0 -3
- package/esm/mobile/Component.mobile.d.ts +0 -10
- package/esm/mobile/index.d.ts +0 -2
- package/esm/utils/format.d.ts +0 -8
- package/esm/utils/index.d.ts +0 -1
- package/index.d.ts +0 -3
- package/mobile/Component.mobile.d.ts +0 -10
- package/mobile/index.d.ts +0 -2
- package/modern/Component.responsive.d.ts +0 -21
- package/modern/components/date-range-input/index.d.ts +0 -1
- package/modern/desktop/Component.desktop.d.ts +0 -10
- package/modern/desktop/index.d.ts +0 -2
- package/modern/index.d.ts +0 -3
- package/modern/mobile/Component.mobile.d.ts +0 -10
- package/modern/mobile/index.d.ts +0 -2
- package/modern/utils/format.d.ts +0 -8
- package/modern/utils/index.d.ts +0 -1
- package/moderncssm/Component.responsive.d.ts +0 -21
- package/moderncssm/components/date-range-input/Component.d.ts +0 -117
- package/moderncssm/components/date-range-input/index.d.ts +0 -1
- package/moderncssm/desktop/Component.desktop.d.ts +0 -10
- package/moderncssm/desktop/index.d.ts +0 -2
- package/moderncssm/index.d.ts +0 -3
- package/moderncssm/mobile/Component.mobile.d.ts +0 -10
- package/moderncssm/mobile/index.d.ts +0 -2
- package/moderncssm/utils/format.d.ts +0 -8
- package/moderncssm/utils/index.d.ts +0 -1
- package/utils/format.d.ts +0 -8
- package/utils/index.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './format';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sources":["../../../src/utils/format.ts"],"sourcesContent":["/* eslint-disable no-useless-escape */\n\nimport dateFnsIsValid from 'date-fns/isValid';\nimport parse from 'date-fns/parse';\n\nexport const DATE_FORMAT = 'dd.MM.yyyy';\nexport const DATE_MASK = [\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n ' ',\n '-',\n ' ',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport const isCompleteDateInput = (input: string) => input.length === DATE_MASK.length;\n\nexport const parseDateString = (value: string, dateFormat = DATE_FORMAT) =>\n parse(value, dateFormat, new Date());\n\nexport const isValid = (inputValue: string, dateFrom: string, dateTo: string) =>\n !inputValue ||\n (isCompleteDateInput(inputValue) &&\n dateFnsIsValid(parseDateString(dateFrom)) &&\n dateFnsIsValid(parseDateString(dateTo)));\n\nexport const format = (value: string): string =>\n value\n .replace(/^(\\d\\d)(\\d)$/, '$1.$2') // 121 => 12.1\n .replace(/^(\\d\\d)\\.(\\d\\d)(\\d)$/, '$1.$2.$3') // 12.122 => 12.12.2\n .replace(/^(\\d\\d)\\d\\.(.*)/, '$1.$2') // 123.12.2005 => 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d)\\d\\.(.*)/, '$1.$2') // 12.123.2005 => 12.12.2005\n .replace(/\\.$/, '') // 12. => 12\n .replace(/\\ $/, '') // 1 2 => 12\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)(\\d) - (\\d.*)/, '$1 - $3') // 12.12.20051 - 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) (\\d)- (\\d.*)/, '$1 - $3') // 12.12.2005 1- 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -(\\d) (\\d.*)/, '$1 - $3') // 12.12.2005 -1 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d)(\\d\\d.\\d\\d.\\d\\d\\d)/, '$1 - $3') // 12.12.2005 - 112.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d)(\\d\\d.\\d.\\d\\d\\d\\d)/, '$1 - $3') // 12.12.2005 - 112.1.2001 => 12.12.2005 - 12.1.2001\n .replace(/^(\\d\\d\\.\\d\\d)(\\d\\d\\d\\d)/, '$1.$2') // 12.122005 => 12.12.2005\n .replace(/^(\\d\\d)(\\d\\d\\.\\d\\d\\d\\d)/, '$1.$2') // 1212.2005 => 12.12.2005\n .replace(/^(\\d\\d)(\\d.*)/, '$1.$2') // 1212 => 12.12\n .replace(/^(\\d\\d.\\d\\d)(\\d.*)/, '$1.$2') // 12.122 => 12.12.2\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)(\\d)/, '$1 - $2') // 12.12.20056 => 12.12.2005 - 6\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d\\d)(\\d)/, '$1 - $2.$3') // 12.12.2005 - 123 => 12.12.2005 - 12.3\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d\\d).(\\d\\d)(\\d)/, '$1 - $2.$3.$4') // 12.12.2005 - 12.123 => 12.12.2005 - 12.12.3\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)- (\\d.*)/, '$1 - $2') // 12.12.2005- 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -(\\d.*)/, '$1 - $2') // 12.12.2005 -12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -/, '$1') // 12.12.2005 - => 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) (\\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) {2}(\\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)-/, '$1') // 12.12.2005- => 12.12.2005\n .replace(/^(\\d\\.\\d\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 1.12.2005123123 => 1.12.2005\n .replace(/^(\\d\\d\\.\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005\n .replace(/^(\\d)\\.(\\d\\d)([0-9]*)\\.(\\d\\d\\d\\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005\n .replace(/^(\\d\\.\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005\n .replace(/^()\\.(\\d)\\.(\\d\\d\\d\\d)([0-9]*)/, '$1.$2.$3'); // .2.2005123123 => .2.2005\n\nexport const parseTimestampToDate = (timestamp: number): string => {\n const date = new Date(timestamp);\n const year = date.getFullYear();\n\n let month: number | string = date.getMonth() + 1;\n let day: number | string = date.getDate();\n\n if (month < 10) {\n month = `0${month}`;\n }\n if (day < 10) {\n day = `0${day}`;\n }\n\n return `${day}.${month}.${year}`;\n};\n"],"names":[],"mappings":";;;AAAA;AAKO,MAAM,WAAW,GAAG;AACd,MAAA,SAAS,GAAG;IACrB,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;;AAGK,MAAA,mBAAmB,GAAG,CAAC,KAAa,KAAK,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC;MAEpE,eAAe,G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ources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-date-range-input",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.28-snapshot-1393ffa",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,19 +16,18 @@
|
|
|
16
16
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@alfalab/core-components-input": "
|
|
20
|
-
"@alfalab/core-components-icon-button": "
|
|
21
|
-
"@alfalab/core-components-calendar": "
|
|
22
|
-
"@alfalab/core-components-mq": "
|
|
23
|
-
"@alfalab/core-components-popover": "
|
|
19
|
+
"@alfalab/core-components-input": "15.5.5-snapshot-1393ffa",
|
|
20
|
+
"@alfalab/core-components-icon-button": "6.11.11-snapshot-1393ffa",
|
|
21
|
+
"@alfalab/core-components-calendar": "7.18.3-snapshot-1393ffa",
|
|
22
|
+
"@alfalab/core-components-mq": "5.0.0-snapshot-1393ffa",
|
|
23
|
+
"@alfalab/core-components-popover": "7.0.0-snapshot-1393ffa",
|
|
24
24
|
"@alfalab/hooks": "^1.13.1",
|
|
25
25
|
"@alfalab/icons-glyph": "^2.210.0",
|
|
26
26
|
"classnames": "^2.5.1",
|
|
27
27
|
"date-fns": "^2.16.1",
|
|
28
28
|
"react-merge-refs": "^1.1.0",
|
|
29
|
-
"tslib": "^2.4.0"
|
|
30
|
-
"@alfalab/core-components-shared": "^0.16.0"
|
|
29
|
+
"tslib": "^2.4.0"
|
|
31
30
|
},
|
|
32
|
-
"themesVersion": "
|
|
33
|
-
"varsVersion": "9.20.
|
|
31
|
+
"themesVersion": "14.0.0-snapshot-1393ffa",
|
|
32
|
+
"varsVersion": "9.20.1-snapshot-1393ffa"
|
|
34
33
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConditionalProps, DateRangeInputProps } from './components/date-range-input';
|
|
3
|
+
export declare type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
6
|
+
* @default 1024
|
|
7
|
+
*/
|
|
8
|
+
breakpoint?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
11
|
+
*/
|
|
12
|
+
client?: 'desktop' | 'mobile';
|
|
13
|
+
};
|
|
14
|
+
export declare type DateRangeInputMedia = 'desktop' | 'mobile';
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated
|
|
17
|
+
* use UniversalDateInput instead
|
|
18
|
+
*/
|
|
19
|
+
export declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React, { ChangeEvent, ElementType } from 'react';
|
|
2
|
+
import type { CalendarDesktopProps } from '@alfalab/core-components-calendar/desktop';
|
|
3
|
+
import type { CalendarMobileProps } from '@alfalab/core-components-calendar/mobile';
|
|
4
|
+
import { InputProps } from '@alfalab/core-components-input';
|
|
5
|
+
import { PopoverProps } from '@alfalab/core-components-popover';
|
|
6
|
+
export declare type ConditionalProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Обработчик изменения значения
|
|
9
|
+
*/
|
|
10
|
+
picker: true;
|
|
11
|
+
/**
|
|
12
|
+
* Обработчик закрытия календаря
|
|
13
|
+
*/
|
|
14
|
+
onClose?: () => void;
|
|
15
|
+
} | {
|
|
16
|
+
picker?: false;
|
|
17
|
+
onClose?: never;
|
|
18
|
+
};
|
|
19
|
+
export declare type DateRangeInputProps = Omit<InputProps, 'onChange'> & ConditionalProps & {
|
|
20
|
+
/**
|
|
21
|
+
* Дополнительный класс
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Дополнительный класс для инпута
|
|
26
|
+
*/
|
|
27
|
+
inputClassName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Дополнительный класс для поповера
|
|
30
|
+
*/
|
|
31
|
+
popoverClassName?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Обработчик изменения значения
|
|
34
|
+
*/
|
|
35
|
+
onChange?: (payload: {
|
|
36
|
+
dateFrom?: Date;
|
|
37
|
+
dateTo?: Date;
|
|
38
|
+
value: string;
|
|
39
|
+
}, event?: ChangeEvent<HTMLInputElement>) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Обработчик окончания ввода
|
|
42
|
+
*/
|
|
43
|
+
onComplete?: (payload: {
|
|
44
|
+
dateFrom: Date;
|
|
45
|
+
dateTo: Date;
|
|
46
|
+
value: string;
|
|
47
|
+
}, event?: ChangeEvent<HTMLInputElement>) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Компонент календаря
|
|
50
|
+
*/
|
|
51
|
+
Calendar?: ElementType;
|
|
52
|
+
/**
|
|
53
|
+
* Доп. пропсы для календаря
|
|
54
|
+
*/
|
|
55
|
+
calendarProps?: (CalendarDesktopProps & Record<string, unknown>) | (CalendarMobileProps & Record<string, unknown>);
|
|
56
|
+
/**
|
|
57
|
+
* Месяц в календаре по умолчанию (timestamp)
|
|
58
|
+
*/
|
|
59
|
+
defaultMonth?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Минимальная дата, доступная для выбора (timestamp)
|
|
62
|
+
*/
|
|
63
|
+
minDate?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Максимальная дата, доступная для выбора (timestamp)
|
|
66
|
+
*/
|
|
67
|
+
maxDate?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Список событий
|
|
70
|
+
*/
|
|
71
|
+
events?: Array<Date | number>;
|
|
72
|
+
/**
|
|
73
|
+
* Список выходных
|
|
74
|
+
*/
|
|
75
|
+
offDays?: Array<Date | number>;
|
|
76
|
+
/**
|
|
77
|
+
* Состояние открытия по умолчанию
|
|
78
|
+
*/
|
|
79
|
+
defaultOpen?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Позиционирование поповера с календарем
|
|
82
|
+
*/
|
|
83
|
+
popoverPosition?: PopoverProps['position'];
|
|
84
|
+
/**
|
|
85
|
+
* z-index Popover
|
|
86
|
+
*/
|
|
87
|
+
zIndexPopover?: PopoverProps['zIndex'];
|
|
88
|
+
/**
|
|
89
|
+
* Запрещает поповеру менять свою позицию.
|
|
90
|
+
* Например, если места снизу недостаточно, то он все равно будет показан снизу
|
|
91
|
+
*/
|
|
92
|
+
preventFlip?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Календарь будет принимать ширину инпута
|
|
95
|
+
*/
|
|
96
|
+
useAnchorWidth?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Растягивает компонент на ширину контейнера
|
|
99
|
+
*/
|
|
100
|
+
block?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Отображение компонента в мобильном или десктопном виде
|
|
103
|
+
*/
|
|
104
|
+
view?: 'desktop' | 'mobile';
|
|
105
|
+
/**
|
|
106
|
+
* Компонент инпута
|
|
107
|
+
*/
|
|
108
|
+
InputComponent?: ElementType;
|
|
109
|
+
/**
|
|
110
|
+
* Запретить ввод с клавиатуры
|
|
111
|
+
*/
|
|
112
|
+
disableUserInput?: boolean;
|
|
113
|
+
};
|
|
114
|
+
export declare const DateRangeInput: React.ForwardRefExoticComponent<DateRangeInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Component';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConditionalProps, DateRangeInputProps } from '../components/date-range-input';
|
|
3
|
+
export declare type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
* use UniversalDateInput instead
|
|
7
|
+
*/
|
|
8
|
+
export declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Component.desktop';
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ConditionalProps, DateRangeInputProps } from '../components/date-range-input';
|
|
3
|
+
export declare type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated
|
|
6
|
+
* use UniversalDateInput instead
|
|
7
|
+
*/
|
|
8
|
+
export declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Component.mobile';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const DATE_FORMAT = "dd.MM.yyyy";
|
|
2
|
+
export declare const DATE_MASK: (string | RegExp)[];
|
|
3
|
+
export declare const isCompleteDateInput: (input: string) => boolean;
|
|
4
|
+
export declare const parseDateString: (value: string, dateFormat?: string) => Date;
|
|
5
|
+
export declare const isValid: (inputValue: string, dateFrom: string, dateTo: string) => boolean;
|
|
6
|
+
export declare const format: (value: string) => string;
|
|
7
|
+
export declare const parseTimestampToDate: (timestamp: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './format';
|
package/utils/format.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sources":["../../src/utils/format.ts"],"sourcesContent":["/* eslint-disable no-useless-escape */\n\nimport dateFnsIsValid from 'date-fns/isValid';\nimport parse from 'date-fns/parse';\n\nexport const DATE_FORMAT = 'dd.MM.yyyy';\nexport const DATE_MASK = [\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n ' ',\n '-',\n ' ',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n '.',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/,\n];\n\nexport const isCompleteDateInput = (input: string) => input.length === DATE_MASK.length;\n\nexport const parseDateString = (value: string, dateFormat = DATE_FORMAT) =>\n parse(value, dateFormat, new Date());\n\nexport const isValid = (inputValue: string, dateFrom: string, dateTo: string) =>\n !inputValue ||\n (isCompleteDateInput(inputValue) &&\n dateFnsIsValid(parseDateString(dateFrom)) &&\n dateFnsIsValid(parseDateString(dateTo)));\n\nexport const format = (value: string): string =>\n value\n .replace(/^(\\d\\d)(\\d)$/, '$1.$2') // 121 => 12.1\n .replace(/^(\\d\\d)\\.(\\d\\d)(\\d)$/, '$1.$2.$3') // 12.122 => 12.12.2\n .replace(/^(\\d\\d)\\d\\.(.*)/, '$1.$2') // 123.12.2005 => 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d)\\d\\.(.*)/, '$1.$2') // 12.123.2005 => 12.12.2005\n .replace(/\\.$/, '') // 12. => 12\n .replace(/\\ $/, '') // 1 2 => 12\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)(\\d) - (\\d.*)/, '$1 - $3') // 12.12.20051 - 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) (\\d)- (\\d.*)/, '$1 - $3') // 12.12.2005 1- 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -(\\d) (\\d.*)/, '$1 - $3') // 12.12.2005 -1 12.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d)(\\d\\d.\\d\\d.\\d\\d\\d)/, '$1 - $3') // 12.12.2005 - 112.12.200 => 12.12.2005 - 12.12.200\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d)(\\d\\d.\\d.\\d\\d\\d\\d)/, '$1 - $3') // 12.12.2005 - 112.1.2001 => 12.12.2005 - 12.1.2001\n .replace(/^(\\d\\d\\.\\d\\d)(\\d\\d\\d\\d)/, '$1.$2') // 12.122005 => 12.12.2005\n .replace(/^(\\d\\d)(\\d\\d\\.\\d\\d\\d\\d)/, '$1.$2') // 1212.2005 => 12.12.2005\n .replace(/^(\\d\\d)(\\d.*)/, '$1.$2') // 1212 => 12.12\n .replace(/^(\\d\\d.\\d\\d)(\\d.*)/, '$1.$2') // 12.122 => 12.12.2\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)(\\d)/, '$1 - $2') // 12.12.20056 => 12.12.2005 - 6\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d\\d)(\\d)/, '$1 - $2.$3') // 12.12.2005 - 123 => 12.12.2005 - 12.3\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) - (\\d\\d).(\\d\\d)(\\d)/, '$1 - $2.$3.$4') // 12.12.2005 - 12.123 => 12.12.2005 - 12.12.3\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)- (\\d.*)/, '$1 - $2') // 12.12.2005- 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -(\\d.*)/, '$1 - $2') // 12.12.2005 -12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) -/, '$1') // 12.12.2005 - => 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) (\\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d) {2}(\\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005\n .replace(/^(\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d)-/, '$1') // 12.12.2005- => 12.12.2005\n .replace(/^(\\d\\.\\d\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 1.12.2005123123 => 1.12.2005\n .replace(/^(\\d\\d\\.\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005\n .replace(/^(\\d)\\.(\\d\\d)([0-9]*)\\.(\\d\\d\\d\\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005\n .replace(/^(\\d\\.\\d\\.\\d\\d\\d\\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005\n .replace(/^()\\.(\\d)\\.(\\d\\d\\d\\d)([0-9]*)/, '$1.$2.$3'); // .2.2005123123 => .2.2005\n\nexport const parseTimestampToDate = (timestamp: number): string => {\n const date = new Date(timestamp);\n const year = date.getFullYear();\n\n let month: number | string = date.getMonth() + 1;\n let day: number | string = date.getDate();\n\n if (month < 10) {\n month = `0${month}`;\n }\n if (day < 10) {\n day = `0${day}`;\n }\n\n return `${day}.${month}.${year}`;\n};\n"],"names":["parse","dateFnsIsValid"],"mappings":";;;;;;;;;;;;AAAA;AAKO,IAAM,WAAW,GAAG;AACd,IAAA,SAAS,GAAG;IACrB,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;;AAGK,IAAA,mBAAmB,GAAG,UAAC,KAAa,EAAK,EAAA,OAAA,KAAK,CAAC,M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V,QAAA,GAAG,GAAG,GAAA,CAAA,MAAA,CAAI,GAAG,CAAE;AAClB;AAED,IAAA,OAAO,UAAG,GAAG,EAAA,GAAA,CAAA,CAAA,MAAA,CAAI,KAAK,EAAI,GAAA,CAAA,CAAA,MAAA,CAAA,IAAI,CAAE;AACpC;;;;;;;;;;"}
|
package/utils/index.js
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var format = require('./format.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.DATE_FORMAT =
|
|
10
|
-
exports.DATE_MASK =
|
|
11
|
-
exports.format =
|
|
12
|
-
exports.isCompleteDateInput =
|
|
13
|
-
exports.isValid =
|
|
14
|
-
exports.parseDateString =
|
|
15
|
-
exports.parseTimestampToDate =
|
|
9
|
+
exports.DATE_FORMAT = format.DATE_FORMAT;
|
|
10
|
+
exports.DATE_MASK = format.DATE_MASK;
|
|
11
|
+
exports.format = format.format;
|
|
12
|
+
exports.isCompleteDateInput = format.isCompleteDateInput;
|
|
13
|
+
exports.isValid = format.isValid;
|
|
14
|
+
exports.parseDateString = format.parseDateString;
|
|
15
|
+
exports.parseTimestampToDate = format.parseTimestampToDate;
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "./components/date-range-input/index";
|
|
4
|
-
type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps & {
|
|
5
|
-
/**
|
|
6
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
7
|
-
* @default 1024
|
|
8
|
-
*/
|
|
9
|
-
breakpoint?: number;
|
|
10
|
-
/**
|
|
11
|
-
* Версия, которая будет использоваться при серверном рендеринге
|
|
12
|
-
*/
|
|
13
|
-
client?: 'desktop' | 'mobile';
|
|
14
|
-
};
|
|
15
|
-
type DateRangeInputMedia = 'desktop' | 'mobile';
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated
|
|
18
|
-
* use UniversalDateInput instead
|
|
19
|
-
*/
|
|
20
|
-
declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
|
|
21
|
-
export { DateRangeInputResponsiveProps, DateRangeInputMedia, DateRangeInputResponsive };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Component";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "./components/date-range-input/index";
|
|
4
|
-
type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps & {
|
|
5
|
-
/**
|
|
6
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
7
|
-
* @default 1024
|
|
8
|
-
*/
|
|
9
|
-
breakpoint?: number;
|
|
10
|
-
/**
|
|
11
|
-
* Версия, которая будет использоваться при серверном рендеринге
|
|
12
|
-
*/
|
|
13
|
-
client?: 'desktop' | 'mobile';
|
|
14
|
-
};
|
|
15
|
-
type DateRangeInputMedia = 'desktop' | 'mobile';
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated
|
|
18
|
-
* use UniversalDateInput instead
|
|
19
|
-
*/
|
|
20
|
-
declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
|
|
21
|
-
export { DateRangeInputResponsiveProps, DateRangeInputMedia, DateRangeInputResponsive };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Component";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputDesktopProps, DateRangeInputDesktop };
|
package/cssm/desktop/index.d.ts
DELETED
package/cssm/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputMobileProps, DateRangeInputMobile };
|
package/cssm/mobile/index.d.ts
DELETED
package/cssm/utils/format.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const DATE_FORMAT = "dd.MM.yyyy";
|
|
2
|
-
declare const DATE_MASK: (string | RegExp)[];
|
|
3
|
-
declare const isCompleteDateInput: (input: string) => boolean;
|
|
4
|
-
declare const parseDateString: (value: string, dateFormat?: string) => Date;
|
|
5
|
-
declare const isValid: (inputValue: string, dateFrom: string, dateTo: string) => boolean;
|
|
6
|
-
declare const format: (value: string) => string;
|
|
7
|
-
declare const parseTimestampToDate: (timestamp: number) => string;
|
|
8
|
-
export { DATE_FORMAT, DATE_MASK, isCompleteDateInput, parseDateString, isValid, format, parseTimestampToDate };
|
package/cssm/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./format";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputDesktopProps, DateRangeInputDesktop };
|
package/desktop/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "./components/date-range-input/index";
|
|
4
|
-
type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps & {
|
|
5
|
-
/**
|
|
6
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
7
|
-
* @default 1024
|
|
8
|
-
*/
|
|
9
|
-
breakpoint?: number;
|
|
10
|
-
/**
|
|
11
|
-
* Версия, которая будет использоваться при серверном рендеринге
|
|
12
|
-
*/
|
|
13
|
-
client?: 'desktop' | 'mobile';
|
|
14
|
-
};
|
|
15
|
-
type DateRangeInputMedia = 'desktop' | 'mobile';
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated
|
|
18
|
-
* use UniversalDateInput instead
|
|
19
|
-
*/
|
|
20
|
-
declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
|
|
21
|
-
export { DateRangeInputResponsiveProps, DateRangeInputMedia, DateRangeInputResponsive };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Component";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputDesktopProps, DateRangeInputDesktop };
|
package/esm/desktop/index.d.ts
DELETED
package/esm/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputMobileProps, DateRangeInputMobile };
|
package/esm/mobile/index.d.ts
DELETED
package/esm/utils/format.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const DATE_FORMAT = "dd.MM.yyyy";
|
|
2
|
-
declare const DATE_MASK: (string | RegExp)[];
|
|
3
|
-
declare const isCompleteDateInput: (input: string) => boolean;
|
|
4
|
-
declare const parseDateString: (value: string, dateFormat?: string) => Date;
|
|
5
|
-
declare const isValid: (inputValue: string, dateFrom: string, dateTo: string) => boolean;
|
|
6
|
-
declare const format: (value: string) => string;
|
|
7
|
-
declare const parseTimestampToDate: (timestamp: number) => string;
|
|
8
|
-
export { DATE_FORMAT, DATE_MASK, isCompleteDateInput, parseDateString, isValid, format, parseTimestampToDate };
|
package/esm/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./format";
|
package/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputMobileProps, DateRangeInputMobile };
|
package/mobile/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "./components/date-range-input/index";
|
|
4
|
-
type DateRangeInputResponsiveProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps & {
|
|
5
|
-
/**
|
|
6
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
7
|
-
* @default 1024
|
|
8
|
-
*/
|
|
9
|
-
breakpoint?: number;
|
|
10
|
-
/**
|
|
11
|
-
* Версия, которая будет использоваться при серверном рендеринге
|
|
12
|
-
*/
|
|
13
|
-
client?: 'desktop' | 'mobile';
|
|
14
|
-
};
|
|
15
|
-
type DateRangeInputMedia = 'desktop' | 'mobile';
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated
|
|
18
|
-
* use UniversalDateInput instead
|
|
19
|
-
*/
|
|
20
|
-
declare const DateRangeInputResponsive: React.ForwardRefExoticComponent<DateRangeInputResponsiveProps & React.RefAttributes<HTMLInputElement>>;
|
|
21
|
-
export { DateRangeInputResponsiveProps, DateRangeInputMedia, DateRangeInputResponsive };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Component";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputDesktopProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputDesktop: React.ForwardRefExoticComponent<DateRangeInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputDesktopProps, DateRangeInputDesktop };
|
package/modern/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ConditionalProps, DateRangeInputProps } from "../components/date-range-input/index";
|
|
4
|
-
type DateRangeInputMobileProps = Omit<DateRangeInputProps, 'view' | 'picker' | 'onClose' | 'InputComponent'> & ConditionalProps;
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated
|
|
7
|
-
* use UniversalDateInput instead
|
|
8
|
-
*/
|
|
9
|
-
declare const DateRangeInputMobile: React.ForwardRefExoticComponent<DateRangeInputMobileProps & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export { DateRangeInputMobileProps, DateRangeInputMobile };
|
package/modern/mobile/index.d.ts
DELETED
package/modern/utils/format.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const DATE_FORMAT = "dd.MM.yyyy";
|
|
2
|
-
declare const DATE_MASK: (string | RegExp)[];
|
|
3
|
-
declare const isCompleteDateInput: (input: string) => boolean;
|
|
4
|
-
declare const parseDateString: (value: string, dateFormat?: string) => Date;
|
|
5
|
-
declare const isValid: (inputValue: string, dateFrom: string, dateTo: string) => boolean;
|
|
6
|
-
declare const format: (value: string) => string;
|
|
7
|
-
declare const parseTimestampToDate: (timestamp: number) => string;
|
|
8
|
-
export { DATE_FORMAT, DATE_MASK, isCompleteDateInput, parseDateString, isValid, format, parseTimestampToDate };
|
package/modern/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./format";
|