@elastic/eui 104.1.0-amsterdam.0 → 104.4.0-amsterdam.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_borealis_dark.json +1 -3
- package/dist/eui_theme_borealis_dark.json.d.ts +1 -3
- package/dist/eui_theme_borealis_light.json +1 -3
- package/dist/eui_theme_borealis_light.json.d.ts +1 -3
- package/es/components/basic_table/in_memory_table.js +2 -18
- package/es/components/code/code.styles.js +1 -1
- package/es/components/code/code_syntax.styles.js +0 -1
- package/es/components/datagrid/controls/column_selector.js +32 -3
- package/es/components/date_picker/date_picker.js +1 -2
- package/es/components/date_picker/date_picker_range.js +16 -18
- package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -5
- package/es/components/form/form_control_layout/form_control_layout_delimited.js +4 -4
- package/es/themes/amsterdam/global_styling/variables/_components.js +310 -315
- package/es/themes/json/eui_theme_borealis_dark.json +1 -3
- package/es/themes/json/eui_theme_borealis_light.json +1 -3
- package/eui.d.ts +7 -20
- package/lib/components/basic_table/in_memory_table.js +2 -18
- package/lib/components/code/code.styles.js +1 -1
- package/lib/components/code/code_syntax.styles.js +0 -1
- package/lib/components/datagrid/controls/column_selector.js +32 -3
- package/lib/components/date_picker/date_picker.js +1 -2
- package/lib/components/date_picker/date_picker_range.js +16 -18
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -5
- package/lib/components/form/form_control_layout/form_control_layout_delimited.js +4 -4
- package/lib/themes/amsterdam/global_styling/variables/_components.js +310 -315
- package/lib/themes/json/eui_theme_borealis_dark.json +1 -3
- package/lib/themes/json/eui_theme_borealis_light.json +1 -3
- package/optimize/es/components/basic_table/in_memory_table.js +2 -3
- package/optimize/es/components/code/code.styles.js +1 -1
- package/optimize/es/components/code/code_syntax.styles.js +0 -1
- package/optimize/es/components/datagrid/controls/column_selector.js +34 -3
- package/optimize/es/components/date_picker/date_picker.js +1 -2
- package/optimize/es/components/date_picker/date_picker_range.js +14 -16
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +9 -5
- package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.js +2 -2
- package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +310 -315
- package/optimize/es/themes/json/eui_theme_borealis_dark.json +1 -3
- package/optimize/es/themes/json/eui_theme_borealis_light.json +1 -3
- package/optimize/lib/components/basic_table/in_memory_table.js +2 -3
- package/optimize/lib/components/code/code.styles.js +1 -1
- package/optimize/lib/components/code/code_syntax.styles.js +0 -1
- package/optimize/lib/components/datagrid/controls/column_selector.js +34 -5
- package/optimize/lib/components/date_picker/date_picker.js +1 -2
- package/optimize/lib/components/date_picker/date_picker_range.js +14 -16
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -5
- package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.js +2 -2
- package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +310 -315
- package/optimize/lib/themes/json/eui_theme_borealis_dark.json +1 -3
- package/optimize/lib/themes/json/eui_theme_borealis_light.json +1 -3
- package/package.json +4 -4
- package/test-env/components/basic_table/in_memory_table.js +2 -18
- package/test-env/components/code/code.styles.js +1 -1
- package/test-env/components/code/code_syntax.styles.js +0 -1
- package/test-env/components/datagrid/controls/column_selector.js +34 -5
- package/test-env/components/date_picker/date_picker.js +1 -2
- package/test-env/components/date_picker/date_picker_range.js +16 -18
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -5
- package/test-env/components/form/form_control_layout/form_control_layout_delimited.js +4 -4
- package/test-env/themes/amsterdam/global_styling/variables/_components.js +310 -315
- package/test-env/themes/json/eui_theme_borealis_dark.json +1 -3
- package/test-env/themes/json/eui_theme_borealis_light.json +1 -3
|
@@ -377,7 +377,6 @@
|
|
|
377
377
|
"euiColorBackgroundBaseFormsControlDisabled": "#2B394F",
|
|
378
378
|
"euiColorBackgroundBaseInteractiveHover": "rgba(255,255,255, 0.08)",
|
|
379
379
|
"euiColorBackgroundBaseInteractiveSelect": "#0D2F5E",
|
|
380
|
-
"euiColorBackgroundBaseInteractiveSelectHover": "#123778",
|
|
381
380
|
"euiColorBackgroundBaseInteractiveOverlay": "rgba(43,57,79, 0.7)",
|
|
382
381
|
"euiColorBackgroundBaseSkeletonEdge": "rgba(255,255,255, 0.16)",
|
|
383
382
|
"euiColorBackgroundBaseSkeletonMiddle": "rgba(255,255,255, 0.08)",
|
|
@@ -420,6 +419,5 @@
|
|
|
420
419
|
"euiColorBorderStrongSuccess": "#24C292",
|
|
421
420
|
"euiColorBorderStrongWarning": "#FACB3D",
|
|
422
421
|
"euiColorBorderStrongRisk": "#FC8544",
|
|
423
|
-
"euiColorBorderStrongDanger": "#F6726A"
|
|
424
|
-
"euiColorBorderStrongText": "#8E9FBC"
|
|
422
|
+
"euiColorBorderStrongDanger": "#F6726A"
|
|
425
423
|
}
|
|
@@ -377,7 +377,6 @@
|
|
|
377
377
|
"euiColorBackgroundBaseFormsControlDisabled": "#CAD3E2",
|
|
378
378
|
"euiColorBackgroundBaseInteractiveHover": "rgba(23,80,186, 0.04)",
|
|
379
379
|
"euiColorBackgroundBaseInteractiveSelect": "#E8F1FF",
|
|
380
|
-
"euiColorBackgroundBaseInteractiveSelectHover": "#D9E8FF",
|
|
381
380
|
"euiColorBackgroundBaseInteractiveOverlay": "rgba(72,89,117, 0.7)",
|
|
382
381
|
"euiColorBackgroundBaseSkeletonEdge": "rgba(72,89,117, 0.16)",
|
|
383
382
|
"euiColorBackgroundBaseSkeletonMiddle": "rgba(72,89,117, 0.04)",
|
|
@@ -420,6 +419,5 @@
|
|
|
420
419
|
"euiColorBorderStrongSuccess": "#09724D",
|
|
421
420
|
"euiColorBorderStrongWarning": "#825803",
|
|
422
421
|
"euiColorBorderStrongRisk": "#9E3A16",
|
|
423
|
-
"euiColorBorderStrongDanger": "#A71627"
|
|
424
|
-
"euiColorBorderStrongText": "#5A6D8C"
|
|
422
|
+
"euiColorBorderStrongDanger": "#A71627"
|
|
425
423
|
}
|
package/eui.d.ts
CHANGED
|
@@ -1523,7 +1523,6 @@ declare module '@elastic/eui/src/components/code/code_syntax.styles' {
|
|
|
1523
1523
|
export const euiCodeSyntaxVariables: (euiThemeContext: UseEuiTheme) => {
|
|
1524
1524
|
backgroundColor: string;
|
|
1525
1525
|
color: string;
|
|
1526
|
-
inlineBackgroundColor: string;
|
|
1527
1526
|
inlineCodeColor: string;
|
|
1528
1527
|
selectedBackgroundColor: string;
|
|
1529
1528
|
commentColor: string;
|
|
@@ -6460,11 +6459,11 @@ declare module '@elastic/eui/src/components/form/form_control_layout/form_contro
|
|
|
6460
6459
|
/**
|
|
6461
6460
|
* Left side control
|
|
6462
6461
|
*/
|
|
6463
|
-
startControl
|
|
6462
|
+
startControl: ReactElement;
|
|
6464
6463
|
/**
|
|
6465
6464
|
* Right side control
|
|
6466
6465
|
*/
|
|
6467
|
-
endControl
|
|
6466
|
+
endControl: ReactElement;
|
|
6468
6467
|
/**
|
|
6469
6468
|
* The center content. Accepts a string to be wrapped in a subdued EuiText
|
|
6470
6469
|
* or a single ReactElement
|
|
@@ -18335,7 +18334,7 @@ declare module '@elastic/eui/src/components/date_picker/date_picker_range' {
|
|
|
18335
18334
|
import { IconType } from '@elastic/eui/src/components/icon';
|
|
18336
18335
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
18337
18336
|
import { EuiDatePickerProps } from '@elastic/eui/src/components/date_picker/date_picker';
|
|
18338
|
-
export type EuiDatePickerRangeProps = CommonProps & Pick<EuiFormControlLayoutDelimitedProps, 'isLoading' | 'isInvalid' | 'readOnly' | 'fullWidth' | 'compressed' | 'prepend' | 'append'
|
|
18337
|
+
export type EuiDatePickerRangeProps = CommonProps & Pick<EuiFormControlLayoutDelimitedProps, 'isLoading' | 'isInvalid' | 'readOnly' | 'fullWidth' | 'compressed' | 'prepend' | 'append'> & {
|
|
18339
18338
|
/**
|
|
18340
18339
|
* Including any children will replace all innards with the provided children
|
|
18341
18340
|
*/
|
|
@@ -18343,11 +18342,11 @@ declare module '@elastic/eui/src/components/date_picker/date_picker_range' {
|
|
|
18343
18342
|
/**
|
|
18344
18343
|
* The end date `EuiDatePicker` element
|
|
18345
18344
|
*/
|
|
18346
|
-
endDateControl
|
|
18345
|
+
endDateControl: ReactElement;
|
|
18347
18346
|
/**
|
|
18348
18347
|
* The start date `EuiDatePicker` element
|
|
18349
18348
|
*/
|
|
18350
|
-
startDateControl
|
|
18349
|
+
startDateControl: ReactElement;
|
|
18351
18350
|
/**
|
|
18352
18351
|
* Pass either an icon type or set to `false` to remove icon entirely
|
|
18353
18352
|
*/
|
|
@@ -25049,15 +25048,7 @@ declare module '@elastic/eui/src/components/basic_table/in_memory_table' {
|
|
|
25049
25048
|
}
|
|
25050
25049
|
type Sorting = boolean | SortingOptions;
|
|
25051
25050
|
type InMemoryTableProps<T extends object> = Omit<EuiBasicTableProps<T>, 'pagination' | 'sorting' | 'noItemsMessage' | 'onChange'> & {
|
|
25052
|
-
/**
|
|
25053
|
-
* Message to display if table is empty
|
|
25054
|
-
* @deprecated Use `noItemsMessage` instead.
|
|
25055
|
-
*/
|
|
25056
25051
|
message?: ReactNode;
|
|
25057
|
-
/**
|
|
25058
|
-
* Message to display if table is empty
|
|
25059
|
-
*/
|
|
25060
|
-
noItemsMessage?: ReactNode;
|
|
25061
25052
|
/**
|
|
25062
25053
|
* Configures {@link Search}.
|
|
25063
25054
|
*/
|
|
@@ -32372,7 +32363,7 @@ declare module '@elastic/eui/dist/eui_theme_amsterdam_light.json' {
|
|
|
32372
32363
|
};
|
|
32373
32364
|
export default sassVariables;
|
|
32374
32365
|
}
|
|
32375
|
-
declare module '@elastic/eui/
|
|
32366
|
+
declare module '@elastic/eui-theme-borealis/lib/eui_theme_borealis_dark.json' {
|
|
32376
32367
|
const sassVariables: {
|
|
32377
32368
|
euiZDataGrid: number;
|
|
32378
32369
|
euiZHeaderBelowDataGrid: number;
|
|
@@ -32752,7 +32743,6 @@ declare module '@elastic/eui/dist/eui_theme_borealis_dark.json' {
|
|
|
32752
32743
|
euiColorBackgroundBaseFormsControlDisabled: string;
|
|
32753
32744
|
euiColorBackgroundBaseInteractiveHover: string;
|
|
32754
32745
|
euiColorBackgroundBaseInteractiveSelect: string;
|
|
32755
|
-
euiColorBackgroundBaseInteractiveSelectHover: string;
|
|
32756
32746
|
euiColorBackgroundBaseInteractiveOverlay: string;
|
|
32757
32747
|
euiColorBackgroundBaseSkeletonEdge: string;
|
|
32758
32748
|
euiColorBackgroundBaseSkeletonMiddle: string;
|
|
@@ -32796,11 +32786,10 @@ declare module '@elastic/eui/dist/eui_theme_borealis_dark.json' {
|
|
|
32796
32786
|
euiColorBorderStrongWarning: string;
|
|
32797
32787
|
euiColorBorderStrongRisk: string;
|
|
32798
32788
|
euiColorBorderStrongDanger: string;
|
|
32799
|
-
euiColorBorderStrongText: string;
|
|
32800
32789
|
};
|
|
32801
32790
|
export default sassVariables;
|
|
32802
32791
|
}
|
|
32803
|
-
declare module '@elastic/eui/
|
|
32792
|
+
declare module '@elastic/eui-theme-borealis/lib/eui_theme_borealis_light.json' {
|
|
32804
32793
|
const sassVariables: {
|
|
32805
32794
|
euiZDataGrid: number;
|
|
32806
32795
|
euiZHeaderBelowDataGrid: number;
|
|
@@ -33180,7 +33169,6 @@ declare module '@elastic/eui/dist/eui_theme_borealis_light.json' {
|
|
|
33180
33169
|
euiColorBackgroundBaseFormsControlDisabled: string;
|
|
33181
33170
|
euiColorBackgroundBaseInteractiveHover: string;
|
|
33182
33171
|
euiColorBackgroundBaseInteractiveSelect: string;
|
|
33183
|
-
euiColorBackgroundBaseInteractiveSelectHover: string;
|
|
33184
33172
|
euiColorBackgroundBaseInteractiveOverlay: string;
|
|
33185
33173
|
euiColorBackgroundBaseSkeletonEdge: string;
|
|
33186
33174
|
euiColorBackgroundBaseSkeletonMiddle: string;
|
|
@@ -33224,7 +33212,6 @@ declare module '@elastic/eui/dist/eui_theme_borealis_light.json' {
|
|
|
33224
33212
|
euiColorBorderStrongWarning: string;
|
|
33225
33213
|
euiColorBorderStrongRisk: string;
|
|
33226
33214
|
euiColorBorderStrongDanger: string;
|
|
33227
|
-
euiColorBorderStrongText: string;
|
|
33228
33215
|
};
|
|
33229
33216
|
export default sassVariables;
|
|
33230
33217
|
}
|
|
@@ -17,7 +17,7 @@ var _component_defaults = require("../provider/component_defaults");
|
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["schema"],
|
|
19
19
|
_excluded2 = ["onChange"],
|
|
20
|
-
_excluded3 = ["columns", "loading", "message", "
|
|
20
|
+
_excluded3 = ["columns", "loading", "message", "error", "selection", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -381,7 +381,6 @@ var EuiInMemoryTable = exports.EuiInMemoryTable = /*#__PURE__*/function (_Compon
|
|
|
381
381
|
columns = _this$props2.columns,
|
|
382
382
|
loading = _this$props2.loading,
|
|
383
383
|
message = _this$props2.message,
|
|
384
|
-
noItemsMessage = _this$props2.noItemsMessage,
|
|
385
384
|
error = _this$props2.error,
|
|
386
385
|
selection = _this$props2.selection,
|
|
387
386
|
compressed = _this$props2.compressed,
|
|
@@ -443,7 +442,7 @@ var EuiInMemoryTable = exports.EuiInMemoryTable = /*#__PURE__*/function (_Compon
|
|
|
443
442
|
onChange: this.onTableChange,
|
|
444
443
|
error: error,
|
|
445
444
|
loading: loading,
|
|
446
|
-
noItemsMessage:
|
|
445
|
+
noItemsMessage: message,
|
|
447
446
|
tableLayout: tableLayout,
|
|
448
447
|
compressed: compressed,
|
|
449
448
|
itemIdToExpandedRowMap: itemIdToExpandedRowMap
|
|
@@ -978,22 +977,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
978
977
|
* Sets the table-layout CSS property. Note that auto tableLayout prevents truncateText from working properly.
|
|
979
978
|
*/
|
|
980
979
|
tableLayout: _propTypes.default.oneOf(["fixed", "auto"]),
|
|
981
|
-
/**
|
|
982
|
-
* Message to display if table is empty
|
|
983
|
-
* @deprecated Use `noItemsMessage` instead.
|
|
984
|
-
*/
|
|
985
|
-
/**
|
|
986
|
-
* Message to display if table is empty
|
|
987
|
-
* @deprecated Use `noItemsMessage` instead.
|
|
988
|
-
*/
|
|
989
980
|
message: _propTypes.default.node,
|
|
990
|
-
/**
|
|
991
|
-
* Message to display if table is empty
|
|
992
|
-
*/
|
|
993
|
-
/**
|
|
994
|
-
* Message to display if table is empty
|
|
995
|
-
*/
|
|
996
|
-
noItemsMessage: _propTypes.default.node,
|
|
997
981
|
/**
|
|
998
982
|
* Configures {@link Search}.
|
|
999
983
|
*/
|
|
@@ -29,7 +29,7 @@ var euiCodeStyles = exports.euiCodeStyles = function euiCodeStyles(euiThemeConte
|
|
|
29
29
|
/*
|
|
30
30
|
* 1. Size the code against the text its embedded within.
|
|
31
31
|
*/
|
|
32
|
-
euiCode: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", (0, _global_styling.logicalShorthandCSS)('padding', '0.2em 0.5em'), "background-color:", codeSyntaxVariables.
|
|
32
|
+
euiCode: /*#__PURE__*/(0, _react.css)("font-family:", euiTheme.font.familyCode, ";font-size:0.9em;", (0, _global_styling.logicalShorthandCSS)('padding', '0.2em 0.5em'), "background-color:", codeSyntaxVariables.backgroundColor, ";", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
33
33
|
forced: "\n border: ".concat(euiTheme.border.thin, ";\n ")
|
|
34
34
|
}), " border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.bold, ";color:", codeSyntaxVariables.inlineCodeColor, ";", codeSyntaxVariables.tokensCss, " .token.atrule .token.rule,.token.keyword{color:", codeSyntaxVariables.inlineCodeKeywordColor, ";};label:euiCode;"),
|
|
35
35
|
transparentBackground: _ref
|
|
@@ -32,7 +32,6 @@ var euiCodeSyntaxVariables = exports.euiCodeSyntaxVariables = function euiCodeSy
|
|
|
32
32
|
return {
|
|
33
33
|
backgroundColor: backgroundColor,
|
|
34
34
|
color: color,
|
|
35
|
-
inlineBackgroundColor: euiTheme.components.codeInlineBackground,
|
|
36
35
|
inlineCodeColor: euiTheme.components.codeInlineColor,
|
|
37
36
|
selectedBackgroundColor: euiTheme.components.codeBackgroundSelected,
|
|
38
37
|
commentColor: euiTheme.components.codeCommentColor,
|
|
@@ -28,6 +28,7 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread n
|
|
|
28
28
|
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
29
29
|
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
30
30
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
31
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
31
32
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
32
33
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
33
34
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
@@ -43,17 +44,45 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /*
|
|
|
43
44
|
var useDataGridColumnSelector = exports.useDataGridColumnSelector = function useDataGridColumnSelector(availableColumns, columnVisibility, showColumnSelector, displayValues) {
|
|
44
45
|
var allowColumnHiding = (0, _data_grid_toolbar.getNestedObjectOptions)(showColumnSelector, 'allowHide');
|
|
45
46
|
var allowColumnReorder = (0, _data_grid_toolbar.getNestedObjectOptions)(showColumnSelector, 'allowReorder');
|
|
47
|
+
var visibleColumns = columnVisibility.visibleColumns,
|
|
48
|
+
setVisibleColumns = columnVisibility.setVisibleColumns;
|
|
46
49
|
var _useDependentState = (0, _services.useDependentState)(function () {
|
|
47
|
-
|
|
50
|
+
var availableColumnIds = availableColumns.map(function (_ref) {
|
|
48
51
|
var id = _ref.id;
|
|
49
52
|
return id;
|
|
50
53
|
});
|
|
54
|
+
var availableSet = new Set(availableColumnIds);
|
|
55
|
+
// Filter visibleColumns to only include existing columns
|
|
56
|
+
var validVisibleColumns = visibleColumns.filter(function (id) {
|
|
57
|
+
return availableSet.has(id);
|
|
58
|
+
});
|
|
59
|
+
var visibleSet = new Set(validVisibleColumns);
|
|
60
|
+
var result = [];
|
|
61
|
+
var visibleIndex = 0;
|
|
62
|
+
var _iterator = _createForOfIteratorHelper(availableColumnIds),
|
|
63
|
+
_step;
|
|
64
|
+
try {
|
|
65
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
66
|
+
var columnId = _step.value;
|
|
67
|
+
if (visibleSet.has(columnId)) {
|
|
68
|
+
// Replace with next visible column in order
|
|
69
|
+
result.push(validVisibleColumns[visibleIndex++]);
|
|
70
|
+
} else {
|
|
71
|
+
// Keep hidden column in original position
|
|
72
|
+
result.push(columnId);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
} catch (err) {
|
|
76
|
+
_iterator.e(err);
|
|
77
|
+
} finally {
|
|
78
|
+
_iterator.f();
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
// doesn't depend on visibleColumns on purpose to keep it an initial state
|
|
51
82
|
}, [availableColumns]),
|
|
52
83
|
_useDependentState2 = _slicedToArray(_useDependentState, 2),
|
|
53
84
|
sortedColumns = _useDependentState2[0],
|
|
54
85
|
setSortedColumns = _useDependentState2[1];
|
|
55
|
-
var visibleColumns = columnVisibility.visibleColumns,
|
|
56
|
-
setVisibleColumns = columnVisibility.setVisibleColumns;
|
|
57
86
|
var visibleColumnIds = (0, _react.useMemo)(function () {
|
|
58
87
|
return new Set(visibleColumns);
|
|
59
88
|
}, [visibleColumns]);
|
|
@@ -71,7 +71,6 @@ var unsupportedProps = [
|
|
|
71
71
|
// An internal EUI styling concern that consumers shouldn't need to access
|
|
72
72
|
'defaultInputProps'];
|
|
73
73
|
var EuiDatePicker = exports.EuiDatePicker = function EuiDatePicker(_ref) {
|
|
74
|
-
var _selected$isValid;
|
|
75
74
|
var _ref$adjustDateOnChan = _ref.adjustDateOnChange,
|
|
76
75
|
adjustDateOnChange = _ref$adjustDateOnChan === void 0 ? true : _ref$adjustDateOnChan,
|
|
77
76
|
append = _ref.append,
|
|
@@ -123,7 +122,7 @@ var EuiDatePicker = exports.EuiDatePicker = function EuiDatePicker(_ref) {
|
|
|
123
122
|
utcOffset = _ref.utcOffset,
|
|
124
123
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
125
124
|
// Check for whether the passed `selected` moment date is valid
|
|
126
|
-
var isInvalid = _isInvalid || ((selected === null || selected === void 0
|
|
125
|
+
var isInvalid = _isInvalid || ((selected === null || selected === void 0 ? void 0 : selected.isValid()) === false ? true : undefined);
|
|
127
126
|
var styles = (0, _services.useEuiMemoizedStyles)(_date_picker.euiDatePickerStyles);
|
|
128
127
|
var cssStyles = [styles.euiDatePicker].concat(_toConsumableArray(inline ? [styles.inline.inline, isInvalid && !(disabled || readOnly) && styles.inline.invalid, shadow ? styles.inline.shadow : styles.inline.noShadow, disabled && styles.inline.disabled, readOnly && styles.inline.readOnly] : []));
|
|
129
128
|
var calendarStyles = (0, _services.useEuiMemoizedStyles)(_react_date_picker.euiReactDatePickerStyles);
|
|
@@ -12,7 +12,7 @@ var _form = require("../form");
|
|
|
12
12
|
var _services = require("../../services");
|
|
13
13
|
var _date_picker_range = require("./date_picker_range.styles");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
|
-
var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "inline", "shadow", "fullWidth", "compressed", "isCustom", "readOnly", "isLoading", "isInvalid", "disabled", "onFocus", "onBlur", "append", "prepend"
|
|
15
|
+
var _excluded = ["children", "className", "startDateControl", "endDateControl", "iconType", "inline", "shadow", "fullWidth", "compressed", "isCustom", "readOnly", "isLoading", "isInvalid", "disabled", "onFocus", "onBlur", "append", "prepend"];
|
|
16
16
|
/*
|
|
17
17
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
18
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -47,7 +47,6 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
47
47
|
_onBlur = _ref.onBlur,
|
|
48
48
|
append = _ref.append,
|
|
49
49
|
prepend = _ref.prepend,
|
|
50
|
-
delimiter = _ref.delimiter,
|
|
51
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
52
51
|
// `fullWidth` and `compressed` should not affect inline datepickers (matches non-range behavior)
|
|
53
52
|
var fullWidth = _fullWidth && !inline;
|
|
@@ -56,50 +55,50 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
56
55
|
var inlineStyles = (0, _services.useEuiMemoizedStyles)(_date_picker_range.euiDatePickerRangeInlineStyles);
|
|
57
56
|
var cssStyles = !inline ? _date_picker_range.euiDatePickerRangeStyles.euiDatePickerRange : [inlineStyles.euiDatePickerRangeInline,
|
|
58
57
|
// Determine the inline container query to use based on the width of the react-datepicker
|
|
59
|
-
startDateControl
|
|
58
|
+
startDateControl.props.showTimeSelect || endDateControl.props.showTimeSelect ? inlineStyles.responsiveWithTimeSelect : inlineStyles.responsive, shadow && inlineStyles.shadow];
|
|
60
59
|
var startControl = startDateControl;
|
|
61
60
|
var endControl = endDateControl;
|
|
62
61
|
if (!isCustom) {
|
|
63
|
-
startControl =
|
|
62
|
+
startControl = /*#__PURE__*/(0, _react.cloneElement)(startDateControl, {
|
|
64
63
|
controlOnly: true,
|
|
65
64
|
showIcon: false,
|
|
66
65
|
inline: inline,
|
|
67
66
|
compressed: compressed,
|
|
68
67
|
fullWidth: fullWidth,
|
|
69
68
|
readOnly: readOnly,
|
|
70
|
-
disabled: disabled ||
|
|
71
|
-
isInvalid: isInvalid ||
|
|
72
|
-
className: (0, _classnames.default)('euiDatePickerRange__start', startDateControl
|
|
69
|
+
disabled: disabled || startDateControl.props.disabled,
|
|
70
|
+
isInvalid: isInvalid || startDateControl.props.isInvalid,
|
|
71
|
+
className: (0, _classnames.default)('euiDatePickerRange__start', startDateControl.props.className),
|
|
73
72
|
onBlur: function onBlur(event) {
|
|
74
73
|
var _startDateControl$pro, _startDateControl$pro2;
|
|
75
|
-
|
|
74
|
+
(_startDateControl$pro = startDateControl.props) === null || _startDateControl$pro === void 0 || (_startDateControl$pro2 = _startDateControl$pro.onBlur) === null || _startDateControl$pro2 === void 0 || _startDateControl$pro2.call(_startDateControl$pro, event);
|
|
76
75
|
_onBlur === null || _onBlur === void 0 || _onBlur(event);
|
|
77
76
|
},
|
|
78
77
|
onFocus: function onFocus(event) {
|
|
79
78
|
var _startDateControl$pro3, _startDateControl$pro4;
|
|
80
|
-
|
|
79
|
+
(_startDateControl$pro3 = startDateControl.props) === null || _startDateControl$pro3 === void 0 || (_startDateControl$pro4 = _startDateControl$pro3.onFocus) === null || _startDateControl$pro4 === void 0 || _startDateControl$pro4.call(_startDateControl$pro3, event);
|
|
81
80
|
_onFocus === null || _onFocus === void 0 || _onFocus(event);
|
|
82
81
|
}
|
|
83
82
|
});
|
|
84
|
-
endControl =
|
|
83
|
+
endControl = /*#__PURE__*/(0, _react.cloneElement)(endDateControl, {
|
|
85
84
|
controlOnly: true,
|
|
86
85
|
showIcon: false,
|
|
87
86
|
inline: inline,
|
|
88
87
|
compressed: compressed,
|
|
89
88
|
fullWidth: fullWidth,
|
|
90
89
|
readOnly: readOnly,
|
|
91
|
-
disabled: disabled ||
|
|
92
|
-
isInvalid: isInvalid ||
|
|
90
|
+
disabled: disabled || endDateControl.props.disabled,
|
|
91
|
+
isInvalid: isInvalid || endDateControl.props.isInvalid,
|
|
93
92
|
popoverPlacement: 'downRight',
|
|
94
|
-
className: (0, _classnames.default)('euiDatePickerRange__end', endDateControl
|
|
93
|
+
className: (0, _classnames.default)('euiDatePickerRange__end', endDateControl.props.className),
|
|
95
94
|
onBlur: function onBlur(event) {
|
|
96
95
|
var _endDateControl$props, _endDateControl$props2;
|
|
97
|
-
|
|
96
|
+
(_endDateControl$props = endDateControl.props) === null || _endDateControl$props === void 0 || (_endDateControl$props2 = _endDateControl$props.onBlur) === null || _endDateControl$props2 === void 0 || _endDateControl$props2.call(_endDateControl$props, event);
|
|
98
97
|
_onBlur === null || _onBlur === void 0 || _onBlur(event);
|
|
99
98
|
},
|
|
100
99
|
onFocus: function onFocus(event) {
|
|
101
100
|
var _endDateControl$props3, _endDateControl$props4;
|
|
102
|
-
|
|
101
|
+
(_endDateControl$props3 = endDateControl.props) === null || _endDateControl$props3 === void 0 || (_endDateControl$props4 = _endDateControl$props3.onFocus) === null || _endDateControl$props4 === void 0 || _endDateControl$props4.call(_endDateControl$props3, event);
|
|
103
102
|
_onFocus === null || _onFocus === void 0 || _onFocus(event);
|
|
104
103
|
}
|
|
105
104
|
});
|
|
@@ -114,7 +113,6 @@ var EuiDatePickerRange = exports.EuiDatePickerRange = function EuiDatePickerRang
|
|
|
114
113
|
className: classes,
|
|
115
114
|
css: cssStyles
|
|
116
115
|
}, rest), (0, _react2.jsx)(_form.EuiFormControlLayoutDelimited, {
|
|
117
|
-
delimiter: delimiter,
|
|
118
116
|
icon: icon,
|
|
119
117
|
startControl: startControl,
|
|
120
118
|
endControl: endControl,
|
|
@@ -141,11 +139,11 @@ EuiDatePickerRange.propTypes = {
|
|
|
141
139
|
/**
|
|
142
140
|
* The end date `EuiDatePicker` element
|
|
143
141
|
*/
|
|
144
|
-
endDateControl: _propTypes.default.element,
|
|
142
|
+
endDateControl: _propTypes.default.element.isRequired,
|
|
145
143
|
/**
|
|
146
144
|
* The start date `EuiDatePicker` element
|
|
147
145
|
*/
|
|
148
|
-
startDateControl: _propTypes.default.element,
|
|
146
|
+
startDateControl: _propTypes.default.element.isRequired,
|
|
149
147
|
/**
|
|
150
148
|
* Pass either an icon type or set to `false` to remove icon entirely
|
|
151
149
|
*/
|
|
@@ -28,11 +28,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
28
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
29
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
30
30
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
31
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
32
31
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
33
32
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
34
33
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
35
34
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
35
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
36
36
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
37
37
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
38
38
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -303,9 +303,14 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
303
303
|
fullWidth: true,
|
|
304
304
|
css: [styles.states.euiSuperDatePicker__formControlLayout, isDisabled ? styles.states.disabled : isInvalid ? styles.states.invalid : hasChanged ? styles.states.needsUpdating : styles.states.default]
|
|
305
305
|
};
|
|
306
|
+
if (isQuickSelectOnly) {
|
|
307
|
+
return (0, _react2.jsx)(_form.EuiFormControlLayout, _extends({
|
|
308
|
+
iconsPosition: "static"
|
|
309
|
+
}, formControlLayoutProps));
|
|
310
|
+
}
|
|
306
311
|
var isDisabledDisplay = (0, _predicate.isObject)(isDisabled) && (isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled.display);
|
|
307
312
|
if (isDisabledDisplay || showPrettyDuration && !isStartDatePopoverOpen && !isEndDatePopoverOpen) {
|
|
308
|
-
return (0, _react2.jsx)(_form.EuiFormControlLayout, formControlLayoutProps,
|
|
313
|
+
return (0, _react2.jsx)(_form.EuiFormControlLayout, formControlLayoutProps, (0, _react2.jsx)("button", {
|
|
309
314
|
type: "button",
|
|
310
315
|
css: styles.euiSuperDatePicker__prettyFormat,
|
|
311
316
|
className: (0, _classnames.default)('euiSuperDatePicker__prettyFormat', {
|
|
@@ -336,8 +341,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
336
341
|
css: rangeCssStyles,
|
|
337
342
|
isCustom: true,
|
|
338
343
|
iconType: false,
|
|
339
|
-
|
|
340
|
-
startDateControl: isQuickSelectOnly ? undefined : (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
|
|
344
|
+
startDateControl: (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
|
|
341
345
|
css: styles.euiSuperDatePicker__rangeInput,
|
|
342
346
|
className: "euiSuperDatePicker__startPopoverButton",
|
|
343
347
|
compressed: compressed,
|
|
@@ -362,7 +366,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
362
366
|
onFocus: onFocus
|
|
363
367
|
}
|
|
364
368
|
}),
|
|
365
|
-
endDateControl:
|
|
369
|
+
endDateControl: (0, _react2.jsx)(_date_popover_button.EuiDatePopoverButton, {
|
|
366
370
|
css: styles.euiSuperDatePicker__rangeInput,
|
|
367
371
|
position: "end",
|
|
368
372
|
compressed: compressed,
|
|
@@ -68,20 +68,20 @@ var EuiFormControlLayoutDelimited = exports.EuiFormControlLayoutDelimited = func
|
|
|
68
68
|
value: {
|
|
69
69
|
defaultFullWidth: fullWidth
|
|
70
70
|
}
|
|
71
|
-
},
|
|
71
|
+
}, addClassesToControl(startControl), (0, _react2.jsx)(EuiFormControlDelimiter, {
|
|
72
72
|
delimiter: delimiter,
|
|
73
73
|
isInvalid: showInvalidState
|
|
74
|
-
}),
|
|
74
|
+
}), addClassesToControl(endControl)));
|
|
75
75
|
};
|
|
76
76
|
EuiFormControlLayoutDelimited.propTypes = {
|
|
77
77
|
/**
|
|
78
78
|
* Left side control
|
|
79
79
|
*/
|
|
80
|
-
startControl: _propTypes.default.element,
|
|
80
|
+
startControl: _propTypes.default.element.isRequired,
|
|
81
81
|
/**
|
|
82
82
|
* Right side control
|
|
83
83
|
*/
|
|
84
|
-
endControl: _propTypes.default.element,
|
|
84
|
+
endControl: _propTypes.default.element.isRequired,
|
|
85
85
|
/**
|
|
86
86
|
* The center content. Accepts a string to be wrapped in a subdued EuiText
|
|
87
87
|
* or a single ReactElement
|