@elastic/eui 96.0.0 → 97.0.0-backport.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/README.md +19 -1
- package/es/components/button/button_display/_button_display.styles.js +2 -2
- package/es/components/datagrid/body/data_grid_body_custom.js +48 -31
- package/es/components/date_picker/date_picker_range.styles.js +1 -1
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +8 -2
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +8 -2
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +8 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.js +27 -5
- package/es/components/link/external_link_icon.js +10 -8
- package/eui.d.ts +31 -5
- package/i18ntokens.json +64 -64
- package/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/lib/components/datagrid/body/data_grid_body_custom.js +47 -30
- package/lib/components/date_picker/date_picker_range.styles.js +1 -1
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +8 -2
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +8 -2
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +8 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +27 -5
- package/lib/components/link/external_link_icon.js +9 -7
- package/optimize/es/components/button/button_display/_button_display.styles.js +2 -2
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +47 -30
- package/optimize/es/components/date_picker/date_picker_range.styles.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_content.js +6 -2
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +11 -5
- package/optimize/es/components/link/external_link_icon.js +10 -8
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +46 -29
- package/optimize/lib/components/date_picker/date_picker_range.styles.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_content.js +6 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +11 -5
- package/optimize/lib/components/link/external_link_icon.js +9 -7
- package/package.json +3 -2
- package/src/global_styling/mixins/_index.scss +1 -4
- package/src/global_styling/mixins/_tool_tip.scss +0 -7
- package/src/themes/amsterdam/global_styling/mixins/_index.scss +1 -4
- package/test-env/components/button/button_display/_button_display.styles.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body_custom.js +47 -30
- package/test-env/components/date_picker/date_picker_range.styles.js +1 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +8 -2
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +8 -2
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_content.js +8 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +27 -5
- package/test-env/components/link/external_link_icon.js +9 -7
- package/src/global_styling/mixins/_button.scss +0 -149
- package/src/global_styling/mixins/_form.scss +0 -28
- package/src/global_styling/mixins/_panel.scss +0 -55
package/i18ntokens.json
CHANGED
|
@@ -2867,14 +2867,14 @@
|
|
|
2867
2867
|
"highlighting": "string",
|
|
2868
2868
|
"loc": {
|
|
2869
2869
|
"start": {
|
|
2870
|
-
"line":
|
|
2870
|
+
"line": 83,
|
|
2871
2871
|
"column": 28,
|
|
2872
|
-
"index":
|
|
2872
|
+
"index": 2551
|
|
2873
2873
|
},
|
|
2874
2874
|
"end": {
|
|
2875
|
-
"line":
|
|
2875
|
+
"line": 86,
|
|
2876
2876
|
"column": 3,
|
|
2877
|
-
"index":
|
|
2877
|
+
"index": 2627
|
|
2878
2878
|
}
|
|
2879
2879
|
},
|
|
2880
2880
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/absolute_tab.tsx"
|
|
@@ -2885,14 +2885,14 @@
|
|
|
2885
2885
|
"highlighting": "string",
|
|
2886
2886
|
"loc": {
|
|
2887
2887
|
"start": {
|
|
2888
|
-
"line":
|
|
2888
|
+
"line": 87,
|
|
2889
2889
|
"column": 26,
|
|
2890
|
-
"index":
|
|
2890
|
+
"index": 2655
|
|
2891
2891
|
},
|
|
2892
2892
|
"end": {
|
|
2893
|
-
"line":
|
|
2893
|
+
"line": 91,
|
|
2894
2894
|
"column": 3,
|
|
2895
|
-
"index":
|
|
2895
|
+
"index": 2837
|
|
2896
2896
|
}
|
|
2897
2897
|
},
|
|
2898
2898
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/absolute_tab.tsx"
|
|
@@ -2903,14 +2903,14 @@
|
|
|
2903
2903
|
"highlighting": "string",
|
|
2904
2904
|
"loc": {
|
|
2905
2905
|
"start": {
|
|
2906
|
-
"line":
|
|
2906
|
+
"line": 104,
|
|
2907
2907
|
"column": 23,
|
|
2908
|
-
"index":
|
|
2908
|
+
"index": 2906
|
|
2909
2909
|
},
|
|
2910
2910
|
"end": {
|
|
2911
|
-
"line":
|
|
2911
|
+
"line": 108,
|
|
2912
2912
|
"column": 3,
|
|
2913
|
-
"index":
|
|
2913
|
+
"index": 3005
|
|
2914
2914
|
}
|
|
2915
2915
|
},
|
|
2916
2916
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_button.tsx"
|
|
@@ -2921,14 +2921,14 @@
|
|
|
2921
2921
|
"highlighting": "string",
|
|
2922
2922
|
"loc": {
|
|
2923
2923
|
"start": {
|
|
2924
|
-
"line":
|
|
2924
|
+
"line": 109,
|
|
2925
2925
|
"column": 24,
|
|
2926
|
-
"index":
|
|
2926
|
+
"index": 3031
|
|
2927
2927
|
},
|
|
2928
2928
|
"end": {
|
|
2929
|
-
"line":
|
|
2929
|
+
"line": 113,
|
|
2930
2930
|
"column": 3,
|
|
2931
|
-
"index":
|
|
2931
|
+
"index": 3132
|
|
2932
2932
|
}
|
|
2933
2933
|
},
|
|
2934
2934
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_button.tsx"
|
|
@@ -2939,14 +2939,14 @@
|
|
|
2939
2939
|
"highlighting": "string",
|
|
2940
2940
|
"loc": {
|
|
2941
2941
|
"start": {
|
|
2942
|
-
"line":
|
|
2942
|
+
"line": 74,
|
|
2943
2943
|
"column": 25,
|
|
2944
|
-
"index":
|
|
2944
|
+
"index": 2140
|
|
2945
2945
|
},
|
|
2946
2946
|
"end": {
|
|
2947
|
-
"line":
|
|
2947
|
+
"line": 77,
|
|
2948
2948
|
"column": 3,
|
|
2949
|
-
"index":
|
|
2949
|
+
"index": 2216
|
|
2950
2950
|
}
|
|
2951
2951
|
},
|
|
2952
2952
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -2957,14 +2957,14 @@
|
|
|
2957
2957
|
"highlighting": "string",
|
|
2958
2958
|
"loc": {
|
|
2959
2959
|
"start": {
|
|
2960
|
-
"line":
|
|
2960
|
+
"line": 78,
|
|
2961
2961
|
"column": 23,
|
|
2962
|
-
"index":
|
|
2962
|
+
"index": 2241
|
|
2963
2963
|
},
|
|
2964
2964
|
"end": {
|
|
2965
|
-
"line":
|
|
2965
|
+
"line": 81,
|
|
2966
2966
|
"column": 3,
|
|
2967
|
-
"index":
|
|
2967
|
+
"index": 2313
|
|
2968
2968
|
}
|
|
2969
2969
|
},
|
|
2970
2970
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -2975,14 +2975,14 @@
|
|
|
2975
2975
|
"highlighting": "string",
|
|
2976
2976
|
"loc": {
|
|
2977
2977
|
"start": {
|
|
2978
|
-
"line":
|
|
2978
|
+
"line": 84,
|
|
2979
2979
|
"column": 24,
|
|
2980
|
-
"index":
|
|
2980
|
+
"index": 2416
|
|
2981
2981
|
},
|
|
2982
2982
|
"end": {
|
|
2983
|
-
"line":
|
|
2983
|
+
"line": 87,
|
|
2984
2984
|
"column": 3,
|
|
2985
|
-
"index":
|
|
2985
|
+
"index": 2492
|
|
2986
2986
|
}
|
|
2987
2987
|
},
|
|
2988
2988
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -2993,14 +2993,14 @@
|
|
|
2993
2993
|
"highlighting": "string",
|
|
2994
2994
|
"loc": {
|
|
2995
2995
|
"start": {
|
|
2996
|
-
"line":
|
|
2996
|
+
"line": 88,
|
|
2997
2997
|
"column": 24,
|
|
2998
|
-
"index":
|
|
2998
|
+
"index": 2518
|
|
2999
2999
|
},
|
|
3000
3000
|
"end": {
|
|
3001
|
-
"line":
|
|
3001
|
+
"line": 91,
|
|
3002
3002
|
"column": 3,
|
|
3003
|
-
"index":
|
|
3003
|
+
"index": 2594
|
|
3004
3004
|
}
|
|
3005
3005
|
},
|
|
3006
3006
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -3011,14 +3011,14 @@
|
|
|
3011
3011
|
"highlighting": "string",
|
|
3012
3012
|
"loc": {
|
|
3013
3013
|
"start": {
|
|
3014
|
-
"line":
|
|
3014
|
+
"line": 92,
|
|
3015
3015
|
"column": 19,
|
|
3016
|
-
"index":
|
|
3016
|
+
"index": 2615
|
|
3017
3017
|
},
|
|
3018
3018
|
"end": {
|
|
3019
|
-
"line":
|
|
3019
|
+
"line": 92,
|
|
3020
3020
|
"column": 73,
|
|
3021
|
-
"index":
|
|
3021
|
+
"index": 2669
|
|
3022
3022
|
}
|
|
3023
3023
|
},
|
|
3024
3024
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -3029,14 +3029,14 @@
|
|
|
3029
3029
|
"highlighting": "string",
|
|
3030
3030
|
"loc": {
|
|
3031
3031
|
"start": {
|
|
3032
|
-
"line":
|
|
3032
|
+
"line": 140,
|
|
3033
3033
|
"column": 12,
|
|
3034
|
-
"index":
|
|
3034
|
+
"index": 3943
|
|
3035
3035
|
},
|
|
3036
3036
|
"end": {
|
|
3037
|
-
"line":
|
|
3037
|
+
"line": 143,
|
|
3038
3038
|
"column": 14,
|
|
3039
|
-
"index":
|
|
3039
|
+
"index": 4152
|
|
3040
3040
|
}
|
|
3041
3041
|
},
|
|
3042
3042
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -3047,14 +3047,14 @@
|
|
|
3047
3047
|
"highlighting": "string",
|
|
3048
3048
|
"loc": {
|
|
3049
3049
|
"start": {
|
|
3050
|
-
"line":
|
|
3050
|
+
"line": 155,
|
|
3051
3051
|
"column": 14,
|
|
3052
|
-
"index":
|
|
3052
|
+
"index": 4442
|
|
3053
3053
|
},
|
|
3054
3054
|
"end": {
|
|
3055
|
-
"line":
|
|
3055
|
+
"line": 158,
|
|
3056
3056
|
"column": 16,
|
|
3057
|
-
"index":
|
|
3057
|
+
"index": 4588
|
|
3058
3058
|
}
|
|
3059
3059
|
},
|
|
3060
3060
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -3065,14 +3065,14 @@
|
|
|
3065
3065
|
"highlighting": "string",
|
|
3066
3066
|
"loc": {
|
|
3067
3067
|
"start": {
|
|
3068
|
-
"line":
|
|
3068
|
+
"line": 160,
|
|
3069
3069
|
"column": 14,
|
|
3070
|
-
"index":
|
|
3070
|
+
"index": 4621
|
|
3071
3071
|
},
|
|
3072
3072
|
"end": {
|
|
3073
|
-
"line":
|
|
3073
|
+
"line": 163,
|
|
3074
3074
|
"column": 16,
|
|
3075
|
-
"index":
|
|
3075
|
+
"index": 4763
|
|
3076
3076
|
}
|
|
3077
3077
|
},
|
|
3078
3078
|
"filepath": "src/components/date_picker/super_date_picker/date_popover/date_popover_content.tsx"
|
|
@@ -5256,37 +5256,37 @@
|
|
|
5256
5256
|
"filepath": "src/components/inline_edit/inline_edit_form.tsx"
|
|
5257
5257
|
},
|
|
5258
5258
|
{
|
|
5259
|
-
"token": "euiExternalLinkIcon.
|
|
5260
|
-
"defString": "
|
|
5259
|
+
"token": "euiExternalLinkIcon.newTarget.screenReaderOnlyText",
|
|
5260
|
+
"defString": "(external, opens in a new tab or window)",
|
|
5261
5261
|
"highlighting": "string",
|
|
5262
5262
|
"loc": {
|
|
5263
5263
|
"start": {
|
|
5264
|
-
"line":
|
|
5265
|
-
"column":
|
|
5266
|
-
"index":
|
|
5264
|
+
"line": 56,
|
|
5265
|
+
"column": 16,
|
|
5266
|
+
"index": 1824
|
|
5267
5267
|
},
|
|
5268
5268
|
"end": {
|
|
5269
|
-
"line":
|
|
5270
|
-
"column":
|
|
5271
|
-
"index":
|
|
5269
|
+
"line": 59,
|
|
5270
|
+
"column": 18,
|
|
5271
|
+
"index": 1997
|
|
5272
5272
|
}
|
|
5273
5273
|
},
|
|
5274
5274
|
"filepath": "src/components/link/external_link_icon.tsx"
|
|
5275
5275
|
},
|
|
5276
5276
|
{
|
|
5277
|
-
"token": "euiExternalLinkIcon.
|
|
5278
|
-
"defString": "(
|
|
5277
|
+
"token": "euiExternalLinkIcon.externalTarget.screenReaderOnlyText",
|
|
5278
|
+
"defString": "(external)",
|
|
5279
5279
|
"highlighting": "string",
|
|
5280
5280
|
"loc": {
|
|
5281
5281
|
"start": {
|
|
5282
|
-
"line":
|
|
5283
|
-
"column":
|
|
5284
|
-
"index":
|
|
5282
|
+
"line": 66,
|
|
5283
|
+
"column": 18,
|
|
5284
|
+
"index": 2163
|
|
5285
5285
|
},
|
|
5286
5286
|
"end": {
|
|
5287
|
-
"line":
|
|
5288
|
-
"column":
|
|
5289
|
-
"index":
|
|
5287
|
+
"line": 69,
|
|
5288
|
+
"column": 20,
|
|
5289
|
+
"index": 2317
|
|
5290
5290
|
}
|
|
5291
5291
|
},
|
|
5292
5292
|
"filepath": "src/components/link/external_link_icon.tsx"
|
|
@@ -17,7 +17,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
17
17
|
// Provides a solid reset and base for handling sizing layout
|
|
18
18
|
// Does not include any visual styles
|
|
19
19
|
var euiButtonBaseCSS = exports.euiButtonBaseCSS = function euiButtonBaseCSS() {
|
|
20
|
-
return "\n display: inline-block;\n appearance: none;\n cursor: pointer;\n ".concat((0, _global_styling.
|
|
20
|
+
return "\n display: inline-block;\n appearance: none;\n cursor: pointer;\n ".concat((0, _global_styling.logicalTextAlignCSS)('center'), ";\n white-space: nowrap;\n ").concat((0, _global_styling.logicalCSS)('max-width', '100%'), ";\n vertical-align: middle;\n ");
|
|
21
21
|
};
|
|
22
22
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
23
23
|
name: "8595p9-isDisabled",
|
|
@@ -42,7 +42,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
42
42
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
43
43
|
* Side Public License, v 1.
|
|
44
44
|
*/
|
|
45
|
-
var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
45
|
+
var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
46
46
|
var renderCustomGridBody = _ref.renderCustomGridBody,
|
|
47
47
|
renderCellValue = _ref.renderCellValue,
|
|
48
48
|
cellContext = _ref.cellContext,
|
|
@@ -98,27 +98,31 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
98
98
|
}),
|
|
99
99
|
setRowHeight = _useDefaultRowHeight.setRowHeight,
|
|
100
100
|
getRowHeight = _useDefaultRowHeight.getRowHeight;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
* Header & footer
|
|
104
|
-
*/
|
|
105
|
-
var _useDataGridHeader = (0, _header.useDataGridHeader)({
|
|
101
|
+
var headerRowProps = (0, _react.useMemo)(function () {
|
|
102
|
+
return {
|
|
106
103
|
leadingControlColumns: leadingControlColumns,
|
|
107
104
|
trailingControlColumns: trailingControlColumns,
|
|
108
105
|
columns: columns,
|
|
109
106
|
columnWidths: columnWidths,
|
|
110
107
|
defaultColumnWidth: defaultColumnWidth,
|
|
111
108
|
setColumnWidth: setColumnWidth,
|
|
112
|
-
visibleColCount: visibleColCount,
|
|
113
109
|
setVisibleColumns: setVisibleColumns,
|
|
110
|
+
visibleColCount: visibleColCount,
|
|
114
111
|
switchColumnPos: switchColumnPos,
|
|
115
112
|
sorting: sorting,
|
|
116
113
|
schema: schema,
|
|
117
114
|
schemaDetectors: schemaDetectors,
|
|
118
115
|
gridStyles: gridStyles
|
|
119
|
-
}
|
|
116
|
+
};
|
|
117
|
+
}, [leadingControlColumns, trailingControlColumns, columns, columnWidths, defaultColumnWidth, setColumnWidth, visibleColCount, setVisibleColumns, switchColumnPos, sorting, schema, schemaDetectors, gridStyles]);
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Header & footer
|
|
121
|
+
*/
|
|
122
|
+
var _useDataGridHeader = (0, _header.useDataGridHeader)(headerRowProps),
|
|
120
123
|
headerRow = _useDataGridHeader.headerRow;
|
|
121
|
-
var
|
|
124
|
+
var footerRowProps = (0, _react.useMemo)(function () {
|
|
125
|
+
return {
|
|
122
126
|
renderFooterCellValue: renderFooterCellValue,
|
|
123
127
|
renderCellPopover: renderCellPopover,
|
|
124
128
|
rowIndex: visibleRows.visibleRowCount,
|
|
@@ -132,7 +136,9 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
132
136
|
defaultColumnWidth: defaultColumnWidth,
|
|
133
137
|
schema: schema,
|
|
134
138
|
gridStyles: gridStyles
|
|
135
|
-
}
|
|
139
|
+
};
|
|
140
|
+
}, [renderFooterCellValue, renderCellPopover, visibleRows.visibleRowCount, visibleColCount, interactiveCellId, leadingControlColumns, trailingControlColumns, columns, columnWidths, defaultColumnWidth, schema, gridStyles]);
|
|
141
|
+
var _useDataGridFooter = (0, _footer.useDataGridFooter)(footerRowProps),
|
|
136
142
|
footerRow = _useDataGridFooter.footerRow;
|
|
137
143
|
|
|
138
144
|
/**
|
|
@@ -159,19 +165,22 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
159
165
|
gridStyles: gridStyles
|
|
160
166
|
};
|
|
161
167
|
}, [schema, schemaDetectors, pagination, columns, leadingControlColumns, trailingControlColumns, visibleColCount, columnWidths, defaultColumnWidth, renderCellValue, cellContext, renderCellPopover, interactiveCellId, setRowHeight, rowHeightsOptions, rowHeightUtils, gridStyles]);
|
|
162
|
-
var Cell = (0, _react.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
var Cell = (0, _react.useMemo)(function () {
|
|
169
|
+
return function (_ref2) {
|
|
170
|
+
var _rest$rowHeightsOptio;
|
|
171
|
+
var colIndex = _ref2.colIndex,
|
|
172
|
+
visibleRowIndex = _ref2.visibleRowIndex,
|
|
173
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
174
|
+
var style = {
|
|
175
|
+
height: rowHeightUtils.isAutoHeight(visibleRowIndex, (_rest$rowHeightsOptio = rest.rowHeightsOptions) !== null && _rest$rowHeightsOptio !== void 0 ? _rest$rowHeightsOptio : rowHeightsOptions) ? 'auto' : getRowHeight(visibleRowIndex)
|
|
176
|
+
};
|
|
177
|
+
var props = _objectSpread({
|
|
178
|
+
colIndex: colIndex,
|
|
179
|
+
visibleRowIndex: visibleRowIndex,
|
|
180
|
+
style: style
|
|
181
|
+
}, cellProps);
|
|
182
|
+
return (0, _react2.jsx)(_cell.CellWrapper, _extends({}, props, rest));
|
|
168
183
|
};
|
|
169
|
-
var props = _objectSpread({
|
|
170
|
-
colIndex: colIndex,
|
|
171
|
-
visibleRowIndex: visibleRowIndex,
|
|
172
|
-
style: style
|
|
173
|
-
}, cellProps);
|
|
174
|
-
return (0, _react2.jsx)(_cell.CellWrapper, _extends({}, props, rest));
|
|
175
184
|
}, [cellProps, getRowHeight, rowHeightUtils, rowHeightsOptions]);
|
|
176
185
|
|
|
177
186
|
// Allow consumers to pass custom props/attributes/listeners etc. to the wrapping div
|
|
@@ -179,15 +188,22 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
|
|
|
179
188
|
_useState2 = _slicedToArray(_useState, 2),
|
|
180
189
|
customGridBodyProps = _useState2[0],
|
|
181
190
|
setCustomGridBodyProps = _useState2[1];
|
|
191
|
+
var customDataGridBodyProps = (0, _react.useMemo)(function () {
|
|
192
|
+
return {
|
|
193
|
+
gridWidth: gridWidth,
|
|
194
|
+
visibleColumns: visibleColumns,
|
|
195
|
+
visibleRowData: visibleRows,
|
|
196
|
+
Cell: Cell,
|
|
197
|
+
setCustomGridBodyProps: setCustomGridBodyProps,
|
|
198
|
+
headerRow: headerRow,
|
|
199
|
+
footerRow: footerRow
|
|
200
|
+
};
|
|
201
|
+
}, [gridWidth, visibleColumns, visibleRows, Cell, setCustomGridBodyProps, headerRow, footerRow]);
|
|
202
|
+
var BodyElement = renderCustomGridBody;
|
|
182
203
|
return (0, _react2.jsx)("div", _extends({}, customGridBodyProps, {
|
|
183
204
|
className: (0, _classnames.default)('euiDataGrid__customRenderBody', className, customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
|
|
184
|
-
}),
|
|
185
|
-
|
|
186
|
-
visibleRowData: visibleRows,
|
|
187
|
-
Cell: Cell,
|
|
188
|
-
setCustomGridBodyProps: setCustomGridBodyProps
|
|
189
|
-
}), footerRow);
|
|
190
|
-
};
|
|
205
|
+
}), (0, _react2.jsx)(BodyElement, customDataGridBodyProps));
|
|
206
|
+
});
|
|
191
207
|
EuiDataGridBodyCustomRender.propTypes = {
|
|
192
208
|
leadingControlColumns: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
193
209
|
/**
|
|
@@ -808,4 +824,5 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
808
824
|
gridItemsRendered: _propTypes.default.any.isRequired,
|
|
809
825
|
wrapperRef: _propTypes.default.any.isRequired,
|
|
810
826
|
className: _propTypes.default.string
|
|
811
|
-
};
|
|
827
|
+
};
|
|
828
|
+
EuiDataGridBodyCustomRender.displayName = 'EuiDataGridBodyCustomRender';
|
|
@@ -15,7 +15,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
var euiDatePickerRangeStyles = exports.euiDatePickerRangeStyles = {
|
|
18
|
-
euiDatePickerRange: /*#__PURE__*/(0, _react.css)(".euiPopover,.react-datepicker__input-container,.euiDatePicker{", (0, _global_styling.logicalCSS)('height', '100%'), ";};label:euiDatePickerRange;")
|
|
18
|
+
euiDatePickerRange: /*#__PURE__*/(0, _react.css)(".euiPopover,.react-datepicker__input-container,.euiDatePicker{", (0, _global_styling.logicalCSS)('height', '100%'), ";}.euiPopover{flex:1;};label:euiDatePickerRange;")
|
|
19
19
|
};
|
|
20
20
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
21
21
|
name: "bicgs9-noShadow",
|
|
@@ -44,6 +44,8 @@ var EuiAbsoluteTab = exports.EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
|
|
|
44
44
|
locale = _ref.locale,
|
|
45
45
|
roundUp = _ref.roundUp,
|
|
46
46
|
utcOffset = _ref.utcOffset,
|
|
47
|
+
minDate = _ref.minDate,
|
|
48
|
+
maxDate = _ref.maxDate,
|
|
47
49
|
labelPrefix = _ref.labelPrefix;
|
|
48
50
|
var styles = (0, _services.useEuiMemoizedStyles)(_absolute_tab.euiAbsoluteTabDateFormStyles);
|
|
49
51
|
var _useState = (0, _react.useState)(function () {
|
|
@@ -137,7 +139,9 @@ var EuiAbsoluteTab = exports.EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
|
|
|
137
139
|
dateFormat: dateFormat,
|
|
138
140
|
timeFormat: timeFormat,
|
|
139
141
|
locale: locale,
|
|
140
|
-
utcOffset: utcOffset
|
|
142
|
+
utcOffset: utcOffset,
|
|
143
|
+
minDate: minDate,
|
|
144
|
+
maxDate: maxDate
|
|
141
145
|
}), (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
142
146
|
component: "form",
|
|
143
147
|
onSubmit: function onSubmit(e) {
|
|
@@ -182,5 +186,7 @@ EuiAbsoluteTab.propTypes = {
|
|
|
182
186
|
onChange: _propTypes.default.func.isRequired,
|
|
183
187
|
roundUp: _propTypes.default.bool.isRequired,
|
|
184
188
|
labelPrefix: _propTypes.default.string.isRequired,
|
|
185
|
-
utcOffset: _propTypes.default.number
|
|
189
|
+
utcOffset: _propTypes.default.number,
|
|
190
|
+
minDate: _propTypes.default.any,
|
|
191
|
+
maxDate: _propTypes.default.any
|
|
186
192
|
};
|
|
@@ -14,7 +14,7 @@ var _pretty_duration = require("../pretty_duration");
|
|
|
14
14
|
var _date_popover_content = require("./date_popover_content");
|
|
15
15
|
var _date_popover_button = require("./date_popover_button.styles");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
|
-
var _excluded = ["position", "isDisabled", "isInvalid", "needsUpdating", "value", "buttonProps", "canRoundRelativeUnits", "roundUp", "onChange", "locale", "dateFormat", "utcOffset", "timeFormat", "isOpen", "onPopoverToggle", "onPopoverClose", "compressed", "timeOptions"];
|
|
17
|
+
var _excluded = ["position", "isDisabled", "isInvalid", "needsUpdating", "value", "buttonProps", "canRoundRelativeUnits", "roundUp", "onChange", "locale", "dateFormat", "utcOffset", "minDate", "maxDate", "timeFormat", "isOpen", "onPopoverToggle", "onPopoverClose", "compressed", "timeOptions"];
|
|
18
18
|
/*
|
|
19
19
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
20
20
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -40,6 +40,8 @@ var EuiDatePopoverButton = exports.EuiDatePopoverButton = function EuiDatePopove
|
|
|
40
40
|
locale = props.locale,
|
|
41
41
|
dateFormat = props.dateFormat,
|
|
42
42
|
utcOffset = props.utcOffset,
|
|
43
|
+
minDate = props.minDate,
|
|
44
|
+
maxDate = props.maxDate,
|
|
43
45
|
timeFormat = props.timeFormat,
|
|
44
46
|
isOpen = props.isOpen,
|
|
45
47
|
onPopoverToggle = props.onPopoverToggle,
|
|
@@ -100,7 +102,9 @@ var EuiDatePopoverButton = exports.EuiDatePopoverButton = function EuiDatePopove
|
|
|
100
102
|
locale: locale,
|
|
101
103
|
position: position,
|
|
102
104
|
utcOffset: utcOffset,
|
|
103
|
-
timeOptions: timeOptions
|
|
105
|
+
timeOptions: timeOptions,
|
|
106
|
+
minDate: minDate,
|
|
107
|
+
maxDate: maxDate
|
|
104
108
|
}));
|
|
105
109
|
};
|
|
106
110
|
EuiDatePopoverButton.propTypes = {
|
|
@@ -126,6 +130,8 @@ EuiDatePopoverButton.propTypes = {
|
|
|
126
130
|
timeFormat: _propTypes.default.string.isRequired,
|
|
127
131
|
value: _propTypes.default.string.isRequired,
|
|
128
132
|
utcOffset: _propTypes.default.number,
|
|
133
|
+
minDate: _propTypes.default.any,
|
|
134
|
+
maxDate: _propTypes.default.any,
|
|
129
135
|
compressed: _propTypes.default.bool,
|
|
130
136
|
timeOptions: _propTypes.default.shape({
|
|
131
137
|
timeTenseOptions: _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired,
|
|
@@ -38,7 +38,9 @@ var EuiDatePopoverContent = exports.EuiDatePopoverContent = function EuiDatePopo
|
|
|
38
38
|
locale = _ref.locale,
|
|
39
39
|
position = _ref.position,
|
|
40
40
|
utcOffset = _ref.utcOffset,
|
|
41
|
-
timeOptions = _ref.timeOptions
|
|
41
|
+
timeOptions = _ref.timeOptions,
|
|
42
|
+
minDate = _ref.minDate,
|
|
43
|
+
maxDate = _ref.maxDate;
|
|
42
44
|
var styles = (0, _services.useEuiMemoizedStyles)(_date_popover_content.euiDatePopoverContentStyles);
|
|
43
45
|
var onTabClick = function onTabClick(selectedTab) {
|
|
44
46
|
switch (selectedTab.id) {
|
|
@@ -67,7 +69,9 @@ var EuiDatePopoverContent = exports.EuiDatePopoverContent = function EuiDatePopo
|
|
|
67
69
|
onChange: onChange,
|
|
68
70
|
roundUp: roundUp,
|
|
69
71
|
labelPrefix: labelPrefix,
|
|
70
|
-
utcOffset: utcOffset
|
|
72
|
+
utcOffset: utcOffset,
|
|
73
|
+
minDate: minDate,
|
|
74
|
+
maxDate: maxDate
|
|
71
75
|
}),
|
|
72
76
|
'data-test-subj': 'superDatePickerAbsoluteTab',
|
|
73
77
|
'aria-label': "".concat(labelPrefix, ": ").concat(absoluteLabel)
|
|
@@ -137,6 +141,8 @@ EuiDatePopoverContent.propTypes = {
|
|
|
137
141
|
locale: _propTypes.default.any,
|
|
138
142
|
position: _propTypes.default.oneOf(["start", "end"]).isRequired,
|
|
139
143
|
utcOffset: _propTypes.default.number,
|
|
144
|
+
minDate: _propTypes.default.any,
|
|
145
|
+
maxDate: _propTypes.default.any,
|
|
140
146
|
timeOptions: _propTypes.default.shape({
|
|
141
147
|
timeTenseOptions: _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired,
|
|
142
148
|
timeUnitsOptions: _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired,
|
|
@@ -52,7 +52,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
52
52
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
53
53
|
* Side Public License, v 1.
|
|
54
54
|
*/ // eslint-disable-line import/named
|
|
55
|
-
function isRangeInvalid(start, end) {
|
|
55
|
+
function isRangeInvalid(start, end, minDate, maxDate) {
|
|
56
56
|
if (start === 'now' && end === 'now') {
|
|
57
57
|
return true;
|
|
58
58
|
}
|
|
@@ -60,7 +60,7 @@ function isRangeInvalid(start, end) {
|
|
|
60
60
|
var endMoment = _datemath.default.parse(end, {
|
|
61
61
|
roundUp: true
|
|
62
62
|
});
|
|
63
|
-
var isInvalid = !startMoment || !endMoment || !startMoment.isValid() || !endMoment.isValid() || !(0, _moment.default)(startMoment).isValid() || !(0, _moment.default)(endMoment).isValid() || startMoment.isAfter(endMoment);
|
|
63
|
+
var isInvalid = !startMoment || !endMoment || !startMoment.isValid() || !endMoment.isValid() || !(0, _moment.default)(startMoment).isValid() || !(0, _moment.default)(endMoment).isValid() || startMoment.isAfter(endMoment) || endMoment.isBefore(startMoment) || minDate != null && startMoment.isBefore(minDate) || maxDate != null && endMoment.isAfter(maxDate);
|
|
64
64
|
return isInvalid;
|
|
65
65
|
}
|
|
66
66
|
var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
|
|
@@ -79,7 +79,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
79
79
|
},
|
|
80
80
|
start: _this.props.start,
|
|
81
81
|
end: _this.props.end,
|
|
82
|
-
isInvalid: isRangeInvalid(_this.props.start, _this.props.end),
|
|
82
|
+
isInvalid: isRangeInvalid(_this.props.start, _this.props.end, _this.props.minDate, _this.props.maxDate),
|
|
83
83
|
hasChanged: false,
|
|
84
84
|
showPrettyDuration: (0, _pretty_duration.showPrettyDuration)(_this.props.start, _this.props.end, _this.props.commonlyUsedRanges),
|
|
85
85
|
isStartDatePopoverOpen: false,
|
|
@@ -88,7 +88,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
88
88
|
_defineProperty(_this, "setTime", function (_ref) {
|
|
89
89
|
var end = _ref.end,
|
|
90
90
|
start = _ref.start;
|
|
91
|
-
var isInvalid = isRangeInvalid(start, end);
|
|
91
|
+
var isInvalid = isRangeInvalid(start, end, _this.props.minDate, _this.props.maxDate);
|
|
92
92
|
_this.setState({
|
|
93
93
|
start: start,
|
|
94
94
|
end: end,
|
|
@@ -277,6 +277,8 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
277
277
|
locale = _this$props3.locale,
|
|
278
278
|
timeFormat = _this$props3.timeFormat,
|
|
279
279
|
utcOffset = _this$props3.utcOffset,
|
|
280
|
+
minDate = _this$props3.minDate,
|
|
281
|
+
maxDate = _this$props3.maxDate,
|
|
280
282
|
compressed = _this$props3.compressed,
|
|
281
283
|
onFocus = _this$props3.onFocus,
|
|
282
284
|
styles = _this$props3.memoizedStyles;
|
|
@@ -351,6 +353,8 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
351
353
|
utcOffset: utcOffset,
|
|
352
354
|
timeFormat: timeFormat,
|
|
353
355
|
locale: locale || contextLocale,
|
|
356
|
+
minDate: minDate,
|
|
357
|
+
maxDate: maxDate,
|
|
354
358
|
canRoundRelativeUnits: canRoundRelativeUnits,
|
|
355
359
|
isOpen: _this.state.isStartDatePopoverOpen,
|
|
356
360
|
onPopoverToggle: _this.onStartDatePopoverToggle,
|
|
@@ -373,6 +377,8 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
373
377
|
utcOffset: utcOffset,
|
|
374
378
|
timeFormat: timeFormat,
|
|
375
379
|
locale: locale || contextLocale,
|
|
380
|
+
minDate: minDate,
|
|
381
|
+
maxDate: maxDate,
|
|
376
382
|
canRoundRelativeUnits: canRoundRelativeUnits,
|
|
377
383
|
roundUp: true,
|
|
378
384
|
isOpen: _this.state.isEndDatePopoverOpen,
|
|
@@ -478,7 +484,7 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
|
|
|
478
484
|
},
|
|
479
485
|
start: nextProps.start,
|
|
480
486
|
end: nextProps.end,
|
|
481
|
-
isInvalid: isRangeInvalid(nextProps.start, nextProps.end),
|
|
487
|
+
isInvalid: isRangeInvalid(nextProps.start, nextProps.end, nextProps.minDate, nextProps.maxDate),
|
|
482
488
|
hasChanged: false,
|
|
483
489
|
showPrettyDuration: (0, _pretty_duration.showPrettyDuration)(nextProps.start, nextProps.end, nextProps.commonlyUsedRanges)
|
|
484
490
|
};
|
|
@@ -609,6 +615,14 @@ EuiSuperDatePickerInternal.propTypes = {
|
|
|
609
615
|
refreshIntervalUnits: _propTypes.default.any,
|
|
610
616
|
start: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.oneOf(["now"]), _propTypes.default.string.isRequired]), _propTypes.default.oneOfType([_propTypes.default.oneOf(["now"]), _propTypes.default.string.isRequired]).isRequired]),
|
|
611
617
|
end: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.oneOf(["now"]), _propTypes.default.string.isRequired]), _propTypes.default.oneOfType([_propTypes.default.oneOf(["now"]), _propTypes.default.string.isRequired]).isRequired]),
|
|
618
|
+
/**
|
|
619
|
+
* Defines min. date accepted as a selection (in moment format)
|
|
620
|
+
*/
|
|
621
|
+
minDate: _propTypes.default.any,
|
|
622
|
+
/**
|
|
623
|
+
* Defines max. date accepted as a selection (in moment format)
|
|
624
|
+
*/
|
|
625
|
+
maxDate: _propTypes.default.any,
|
|
612
626
|
/**
|
|
613
627
|
* Specifies the formatted used when displaying times
|
|
614
628
|
* @default 'HH:mm'
|
|
@@ -792,6 +806,14 @@ EuiSuperDatePicker.propTypes = {
|
|
|
792
806
|
*/
|
|
793
807
|
start: _propTypes.default.oneOfType([_propTypes.default.oneOf(["now"]), _propTypes.default.string.isRequired]),
|
|
794
808
|
end: _propTypes.default.oneOfType([_propTypes.default.oneOf(["now"]), _propTypes.default.string.isRequired]),
|
|
809
|
+
/**
|
|
810
|
+
* Defines min. date accepted as a selection (in moment format)
|
|
811
|
+
*/
|
|
812
|
+
minDate: _propTypes.default.any,
|
|
813
|
+
/**
|
|
814
|
+
* Defines max. date accepted as a selection (in moment format)
|
|
815
|
+
*/
|
|
816
|
+
maxDate: _propTypes.default.any,
|
|
795
817
|
/**
|
|
796
818
|
* Specifies the formatted used when displaying times
|
|
797
819
|
* @default 'HH:mm'
|
|
@@ -38,16 +38,18 @@ var EuiExternalLinkIcon = exports.EuiExternalLinkIcon = function EuiExternalLink
|
|
|
38
38
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
39
39
|
var iconCssStyle = (0, _services.useEuiMemoizedStyles)(iconStyle);
|
|
40
40
|
var showExternalLinkIcon = target === '_blank' && external !== false || external === true;
|
|
41
|
-
|
|
42
|
-
return (0, _react2.jsx)(_react.default.Fragment, null, showExternalLinkIcon && (0, _react2.jsx)(_icon.EuiIcon, _extends({
|
|
41
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, showExternalLinkIcon && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_icon.EuiIcon, _extends({
|
|
43
42
|
css: iconCssStyle,
|
|
44
|
-
"aria-label": iconAriaLabel,
|
|
45
43
|
size: "s",
|
|
46
|
-
type: "popout"
|
|
47
|
-
|
|
44
|
+
type: "popout",
|
|
45
|
+
role: "presentation"
|
|
46
|
+
}, rest)), target === '_blank' ? (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("span", null, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
48
47
|
token: "euiExternalLinkIcon.newTarget.screenReaderOnlyText",
|
|
49
|
-
default: "(opens in a new tab or window)"
|
|
50
|
-
}))))
|
|
48
|
+
default: "(external, opens in a new tab or window)"
|
|
49
|
+
}))) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("span", null, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
50
|
+
token: "euiExternalLinkIcon.externalTarget.screenReaderOnlyText",
|
|
51
|
+
default: "(external)"
|
|
52
|
+
}))))));
|
|
51
53
|
};
|
|
52
54
|
EuiExternalLinkIcon.propTypes = {
|
|
53
55
|
target: _propTypes.default.any,
|