mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
* [7.0] Updates EUI to include date picker types (#31937) * Fixed a simple argument bug and removed infra date picker EUI types * Fixes for EUI date picker types * Updates EUI to 6.10.4 to bring in date picker types, adds react-datepicker types as a necessary peer dep * Updates moment imports to import from moment-timezone to avoid type collisions * Syncs version for react-datepicker types between x-pack and kibana root * Fixes query bar type issue with eui super date picker
This commit is contained in:
parent
9434669200
commit
8e398bda98
9 changed files with 18 additions and 65 deletions
|
@ -110,7 +110,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@elastic/datemath": "5.0.2",
|
||||
"@elastic/eui": "6.10.3",
|
||||
"@elastic/eui": "6.10.4",
|
||||
"@elastic/filesaver": "1.1.2",
|
||||
"@elastic/good": "8.1.1-kibana2",
|
||||
"@elastic/numeral": "2.3.2",
|
||||
|
@ -289,7 +289,6 @@
|
|||
"@types/eslint": "^4.16.2",
|
||||
"@types/execa": "^0.9.0",
|
||||
"@types/fetch-mock": "7.2.1",
|
||||
"@types/json5": "^0.0.30",
|
||||
"@types/getopts": "^2.0.0",
|
||||
"@types/glob": "^5.0.35",
|
||||
"@types/globby": "^8.0.0",
|
||||
|
@ -302,6 +301,7 @@
|
|||
"@types/joi": "^13.4.2",
|
||||
"@types/jquery": "^3.3.6",
|
||||
"@types/js-yaml": "^3.11.1",
|
||||
"@types/json5": "^0.0.30",
|
||||
"@types/listr": "^0.13.0",
|
||||
"@types/lodash": "^3.10.1",
|
||||
"@types/minimatch": "^2.0.29",
|
||||
|
@ -313,6 +313,7 @@
|
|||
"@types/prop-types": "^15.5.3",
|
||||
"@types/puppeteer-core": "^1.9.0",
|
||||
"@types/react": "16.3.14",
|
||||
"@types/react-datepicker": "1.8.0",
|
||||
"@types/react-dom": "^16.0.5",
|
||||
"@types/react-redux": "^6.0.6",
|
||||
"@types/react-router-dom": "^4.3.1",
|
||||
|
|
|
@ -84,7 +84,7 @@ interface Props {
|
|||
dateRangeTo?: string;
|
||||
isRefreshPaused?: boolean;
|
||||
refreshInterval?: number;
|
||||
onRefreshChange?: (isPaused: boolean, refreshInterval: number) => void;
|
||||
onRefreshChange?: (options: { isPaused: boolean; refreshInterval: number }) => void;
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
"@types/pngjs": "^3.3.1",
|
||||
"@types/prop-types": "^15.5.3",
|
||||
"@types/react": "16.3.14",
|
||||
"@types/react-datepicker": "^1.1.5",
|
||||
"@types/react-datepicker": "1.8.0",
|
||||
"@types/react-dom": "^16.0.5",
|
||||
"@types/react-redux": "^6.0.6",
|
||||
"@types/react-router-dom": "^4.3.1",
|
||||
|
@ -119,7 +119,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@elastic/datemath": "5.0.2",
|
||||
"@elastic/eui": "6.10.3",
|
||||
"@elastic/eui": "6.10.4",
|
||||
"@elastic/node-crypto": "0.1.2",
|
||||
"@elastic/node-phantom-simple": "2.2.4",
|
||||
"@elastic/numeral": "2.3.2",
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { EuiDatePicker, EuiFilterButton, EuiFilterGroup } from '@elastic/eui';
|
||||
import { FormattedMessage, InjectedIntl, injectI18n } from '@kbn/i18n/react';
|
||||
import moment, { Moment } from 'moment';
|
||||
import moment, { Moment } from 'moment-timezone';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import moment, { Moment } from 'moment';
|
||||
import moment, { Moment } from 'moment-timezone';
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { FormattedMessage, InjectedIntl, injectI18n } from '@kbn/i18n/react';
|
||||
import { find, get } from 'lodash';
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import {
|
||||
|
@ -274,7 +274,6 @@ export const RangeDatePicker = injectI18n(
|
|||
<EuiDatePickerRange
|
||||
className="euiDatePickerRange--inGroup"
|
||||
iconType={false}
|
||||
disabled={disabled}
|
||||
fullWidth
|
||||
startDateControl={
|
||||
<EuiDatePicker
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
import { EuiButtonEmpty, EuiDatePicker, EuiFormControlLayout } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import moment, { Moment } from 'moment';
|
||||
import moment, { Moment } from 'moment-timezone';
|
||||
import React from 'react';
|
||||
|
||||
interface WaffleTimeControlsProps {
|
||||
|
|
47
x-pack/plugins/infra/types/eui.d.ts
vendored
47
x-pack/plugins/infra/types/eui.d.ts
vendored
|
@ -46,41 +46,6 @@ declare module '@elastic/eui' {
|
|||
type EuiHeaderBreadcrumbsProps = EuiBreadcrumbsProps;
|
||||
export const EuiHeaderBreadcrumbs: React.SFC<EuiHeaderBreadcrumbsProps>;
|
||||
|
||||
type EuiDatePickerProps = CommonProps &
|
||||
Pick<
|
||||
ReactDatePickerProps,
|
||||
Exclude<
|
||||
keyof ReactDatePickerProps,
|
||||
| 'monthsShown'
|
||||
| 'showWeekNumbers'
|
||||
| 'fixedHeight'
|
||||
| 'dropdownMode'
|
||||
| 'useShortMonthInDropdown'
|
||||
| 'todayButton'
|
||||
| 'timeCaption'
|
||||
| 'disabledKeyboardNavigation'
|
||||
| 'isClearable'
|
||||
| 'withPortal'
|
||||
| 'ref'
|
||||
| 'placeholderText'
|
||||
| 'selected'
|
||||
>
|
||||
> & {
|
||||
fullWidth?: boolean;
|
||||
inputRef?: Ref<Element | ReactType>;
|
||||
injectTimes?: moment.Moment[];
|
||||
isInvalid?: boolean;
|
||||
isLoading?: boolean;
|
||||
selected?: moment.Moment | null | undefined;
|
||||
placeholder?: string;
|
||||
shadow?: boolean;
|
||||
calendarContainer?: React.ReactNode;
|
||||
onChange?: (date: moment.Moment | null) => void;
|
||||
startDate?: moment.Moment | undefined;
|
||||
endDate?: moment.Moment | undefined;
|
||||
};
|
||||
export const EuiDatePicker: React.SFC<EuiDatePickerProps>;
|
||||
|
||||
type EuiFilterGroupProps = CommonProps;
|
||||
export const EuiFilterGroup: React.SFC<EuiFilterGroupProps>;
|
||||
|
||||
|
@ -159,18 +124,6 @@ declare module '@elastic/eui' {
|
|||
|
||||
export const EuiShowFor: React.SFC<EuiResponsiveProps>;
|
||||
|
||||
type EuiDatePickerRangeProps = CommonProps & {
|
||||
startDateControl: React.ReactNode;
|
||||
endDateControl: React.ReactNode;
|
||||
iconType?: IconType | boolean;
|
||||
fullWidth?: boolean;
|
||||
disabled?: boolean;
|
||||
isLoading?: boolean;
|
||||
dateFormat?: string;
|
||||
};
|
||||
|
||||
export const EuiDatePickerRange: React.SFC<EuiDatePickerRangeProps>;
|
||||
|
||||
type EuiInMemoryTableProps = CommonProps & {
|
||||
items?: any;
|
||||
columns?: any;
|
||||
|
|
16
yarn.lock
16
yarn.lock
|
@ -1087,10 +1087,10 @@
|
|||
tabbable "^1.1.0"
|
||||
uuid "^3.1.0"
|
||||
|
||||
"@elastic/eui@6.10.3":
|
||||
version "6.10.3"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-6.10.3.tgz#dc5387e43def26004cbf95398ea7e96187f60b29"
|
||||
integrity sha512-UN/cm+RVZxaln+jazQFfbJG4K8Wlv1xZTRY3LwiXu4mS9aHNo3WxrXYrsMg5HWtuWL23QsRhj34BIjRWipi9NA==
|
||||
"@elastic/eui@6.10.4":
|
||||
version "6.10.4"
|
||||
resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-6.10.4.tgz#666474e88d00ac9a5a9ab922e181170ce74a09ca"
|
||||
integrity sha512-TFT3TAQgh8d8OkYsS3HI4g6YSOWw/LZBSDxoba494wbchTGtRhvOurgYFDLAnjNOvbkiSj5lH0OzpYRa/K0pEw==
|
||||
dependencies:
|
||||
"@types/lodash" "^4.14.116"
|
||||
"@types/numeral" "^0.0.25"
|
||||
|
@ -1970,10 +1970,10 @@
|
|||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/react-datepicker@^1.1.5":
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-datepicker/-/react-datepicker-1.1.5.tgz#2070d5ab86eacf69f5e9573b1d69af9982841c02"
|
||||
integrity sha512-ngVoBPI60NIzqCl8PeJ292MjPkIvHNrRW0krjsW9IEC4TANaAeFjW+ql9bnmPQW8MdhxB6OGU5P0EcNceEL91g==
|
||||
"@types/react-datepicker@1.8.0":
|
||||
version "1.8.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-datepicker/-/react-datepicker-1.8.0.tgz#b8b4f69d3e5398500c136f5338e0746ed98d46e8"
|
||||
integrity sha512-QyHMOFCOFIkcyDCXUGnL7OyM+Gj2aG95d3t18wgrLTxQJseVQXeQFTVnUeXmmF2cZxeWtGTfRl1uYPTr3/rAFg==
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
moment ">=2.14.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue