@elastic/eui 94.1.0 → 94.2.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/dist/eui_theme_dark.css +6 -15
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +6 -15
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.js +1 -25
- package/es/components/accordion/accordion_children/accordion_children.js +3 -7
- package/es/components/basic_table/basic_table.js +8 -5
- package/es/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/es/components/breadcrumbs/breadcrumbs.js +1 -1
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +306 -0
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.styles.js +56 -0
- package/{optimize/es/components/collapsible_nav_beta/collapsible_nav_group → es/components/collapsible_nav_beta/_kibana_solution}/index.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +12 -4
- package/es/components/color_picker/color_picker.js +9 -1
- package/es/components/combo_box/combo_box.js +19 -5
- package/es/components/combo_box/index.js +2 -1
- package/es/components/combo_box/matching_options.js +34 -5
- package/es/components/datagrid/body/cell/data_grid_cell.js +0 -46
- package/es/components/datagrid/body/data_grid_body.js +0 -28
- package/es/components/datagrid/body/data_grid_body_custom.js +0 -28
- package/es/components/datagrid/body/data_grid_body_virtualized.js +0 -28
- package/es/components/datagrid/body/header/column_actions.js +17 -5
- package/es/components/datagrid/body/header/data_grid_header_cell.js +3 -30
- package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +7 -9
- package/es/components/datagrid/controls/column_sorting.js +0 -28
- package/es/components/datagrid/utils/in_memory.js +0 -28
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +6 -3
- package/es/components/date_picker/super_date_picker/super_date_picker.js +2 -84
- package/es/components/date_picker/super_date_picker/super_update_button.js +1 -62
- package/es/components/flex/flex_group.js +21 -35
- package/es/components/flex/flex_item.js +18 -18
- package/es/components/form/field_number/field_number.js +22 -7
- package/es/components/form/field_text/field_text.js +17 -7
- package/es/components/form/form_control_layout/_num_icons.js +7 -2
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/form/range/dual_range.js +2 -1
- package/es/components/form/range/range.js +12 -1
- package/es/components/form/range/range_slider.js +4 -1
- package/es/components/form/range/range_track.js +2 -1
- package/es/components/form/range/range_wrapper.styles.js +4 -4
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +27 -8
- package/es/components/markdown_editor/plugins/markdown_default_plugins/processing_plugins.js +32 -9
- package/es/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.js +17 -2
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/page_template/outer/page_outer.js +2 -1
- package/es/components/page_template/page_template.js +119 -81
- package/es/components/popover/input_popover.js +4 -2
- package/es/components/popover/popover.js +6 -1
- package/es/components/search_bar/filters/field_value_selection_filter.js +3 -5
- package/es/components/search_bar/query/default_syntax.js +2 -2
- package/es/components/selectable/matching_options.js +43 -5
- package/es/components/selectable/selectable.js +55 -13
- package/es/components/selectable/selectable_list/selectable_list.js +15 -6
- package/es/components/selectable/selectable_search/selectable_search.js +9 -3
- package/es/components/steps/step_horizontal.js +1 -0
- package/es/components/table/table_row_cell.styles.js +2 -2
- package/es/components/tour/tour_step.js +1 -1
- package/eui.d.ts +1416 -1177
- package/i18ntokens.json +202 -148
- package/lib/components/accordion/accordion.js +1 -25
- package/lib/components/accordion/accordion_children/accordion_children.js +3 -7
- package/lib/components/basic_table/basic_table.js +8 -5
- package/lib/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +315 -0
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.styles.js +61 -0
- package/lib/components/collapsible_nav_beta/_kibana_solution/index.js +12 -0
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +11 -4
- package/lib/components/color_picker/color_picker.js +9 -1
- package/lib/components/combo_box/combo_box.js +18 -4
- package/lib/components/combo_box/index.js +10 -2
- package/lib/components/combo_box/matching_options.js +37 -7
- package/lib/components/datagrid/body/cell/data_grid_cell.js +0 -46
- package/lib/components/datagrid/body/data_grid_body.js +0 -28
- package/lib/components/datagrid/body/data_grid_body_custom.js +0 -28
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +0 -28
- package/lib/components/datagrid/body/header/column_actions.js +17 -5
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -30
- package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +7 -9
- package/lib/components/datagrid/controls/column_sorting.js +0 -28
- package/lib/components/datagrid/utils/in_memory.js +0 -28
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +6 -3
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +2 -84
- package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -62
- package/lib/components/flex/flex_group.js +22 -37
- package/lib/components/flex/flex_item.js +17 -17
- package/lib/components/form/field_number/field_number.js +20 -6
- package/lib/components/form/field_text/field_text.js +16 -6
- package/lib/components/form/form_control_layout/_num_icons.js +9 -3
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +4 -3
- package/lib/components/form/range/dual_range.js +2 -1
- package/lib/components/form/range/range.js +12 -1
- package/lib/components/form/range/range_slider.js +4 -1
- package/lib/components/form/range/range_track.js +2 -1
- package/lib/components/form/range/range_wrapper.styles.js +4 -4
- package/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +33 -18
- package/lib/components/markdown_editor/plugins/markdown_default_plugins/processing_plugins.js +38 -16
- package/lib/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.js +23 -10
- package/lib/components/page_template/outer/page_outer.js +4 -2
- package/lib/components/page_template/page_template.js +117 -79
- package/lib/components/popover/input_popover.js +4 -2
- package/lib/components/popover/popover.js +6 -1
- package/lib/components/search_bar/filters/field_value_selection_filter.js +3 -5
- package/lib/components/search_bar/query/default_syntax.js +2 -2
- package/lib/components/selectable/matching_options.js +46 -7
- package/lib/components/selectable/selectable.js +54 -12
- package/lib/components/selectable/selectable_list/selectable_list.js +15 -6
- package/lib/components/selectable/selectable_search/selectable_search.js +9 -3
- package/lib/components/steps/step_horizontal.js +1 -0
- package/lib/components/table/table_row_cell.styles.js +1 -1
- package/optimize/es/components/accordion/accordion.js +1 -25
- package/optimize/es/components/accordion/accordion_children/accordion_children.js +2 -5
- package/optimize/es/components/basic_table/basic_table.js +8 -5
- package/optimize/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +173 -0
- package/optimize/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.styles.js +56 -0
- package/{es/components/collapsible_nav_beta/collapsible_nav_group → optimize/es/components/collapsible_nav_beta/_kibana_solution}/index.js +1 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +9 -4
- package/optimize/es/components/color_picker/color_picker.js +9 -1
- package/optimize/es/components/combo_box/combo_box.js +10 -5
- package/optimize/es/components/combo_box/index.js +2 -1
- package/optimize/es/components/combo_box/matching_options.js +34 -5
- package/optimize/es/components/datagrid/body/header/column_actions.js +17 -5
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +3 -2
- package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +7 -9
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +6 -3
- package/optimize/es/components/flex/flex_group.js +22 -22
- package/optimize/es/components/flex/flex_item.js +19 -6
- package/optimize/es/components/form/field_number/field_number.js +13 -6
- package/optimize/es/components/form/field_text/field_text.js +14 -7
- package/optimize/es/components/form/form_control_layout/_num_icons.js +7 -2
- package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/optimize/es/components/form/range/range.js +10 -0
- package/optimize/es/components/form/range/range_slider.js +3 -1
- package/optimize/es/components/form/range/range_wrapper.styles.js +4 -4
- package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +22 -8
- package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/processing_plugins.js +24 -9
- package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.js +12 -2
- package/optimize/es/components/page_template/outer/page_outer.js +1 -0
- package/optimize/es/components/page_template/page_template.js +79 -80
- package/optimize/es/components/popover/input_popover.js +4 -2
- package/optimize/es/components/popover/popover.js +5 -0
- package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +3 -5
- package/optimize/es/components/search_bar/query/default_syntax.js +2 -2
- package/optimize/es/components/selectable/matching_options.js +43 -5
- package/optimize/es/components/selectable/selectable.js +33 -9
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +12 -5
- package/optimize/es/components/selectable/selectable_search/selectable_search.js +9 -3
- package/optimize/es/components/steps/step_horizontal.js +1 -0
- package/optimize/es/components/table/table_row_cell.styles.js +2 -2
- package/optimize/lib/components/accordion/accordion.js +1 -25
- package/optimize/lib/components/accordion/accordion_children/accordion_children.js +2 -5
- package/optimize/lib/components/basic_table/basic_table.js +8 -5
- package/optimize/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +182 -0
- package/optimize/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.styles.js +61 -0
- package/optimize/lib/components/collapsible_nav_beta/_kibana_solution/index.js +12 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +9 -4
- package/optimize/lib/components/color_picker/color_picker.js +9 -1
- package/optimize/lib/components/combo_box/combo_box.js +9 -4
- package/optimize/lib/components/combo_box/index.js +10 -2
- package/optimize/lib/components/combo_box/matching_options.js +37 -7
- package/optimize/lib/components/datagrid/body/header/column_actions.js +17 -5
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +3 -2
- package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +7 -9
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +6 -3
- package/optimize/lib/components/flex/flex_group.js +22 -23
- package/optimize/lib/components/flex/flex_item.js +18 -5
- package/optimize/lib/components/form/field_number/field_number.js +12 -5
- package/optimize/lib/components/form/field_text/field_text.js +13 -6
- package/optimize/lib/components/form/form_control_layout/_num_icons.js +9 -3
- package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +4 -3
- package/optimize/lib/components/form/range/range.js +10 -0
- package/optimize/lib/components/form/range/range_slider.js +3 -1
- package/optimize/lib/components/form/range/range_wrapper.styles.js +4 -4
- package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +22 -8
- package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/processing_plugins.js +30 -18
- package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.js +13 -2
- package/optimize/lib/components/page_template/outer/page_outer.js +3 -1
- package/optimize/lib/components/page_template/page_template.js +77 -78
- package/optimize/lib/components/popover/input_popover.js +4 -2
- package/optimize/lib/components/popover/popover.js +5 -0
- package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +3 -5
- package/optimize/lib/components/search_bar/query/default_syntax.js +2 -2
- package/optimize/lib/components/selectable/matching_options.js +46 -7
- package/optimize/lib/components/selectable/selectable.js +32 -8
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +14 -7
- package/optimize/lib/components/selectable/selectable_search/selectable_search.js +9 -3
- package/optimize/lib/components/steps/step_horizontal.js +1 -0
- package/optimize/lib/components/table/table_row_cell.styles.js +1 -1
- package/package.json +16 -13
- package/src/components/color_picker/_color_picker.scss +0 -16
- package/src/components/date_picker/super_date_picker/date_popover/_date_popover_content.scss +4 -7
- package/test-env/components/accordion/accordion.js +1 -25
- package/test-env/components/accordion/accordion_children/accordion_children.js +3 -7
- package/test-env/components/basic_table/basic_table.js +8 -5
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +1 -1
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +307 -0
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.styles.js +61 -0
- package/test-env/components/collapsible_nav_beta/_kibana_solution/index.js +12 -0
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +9 -4
- package/test-env/components/color_picker/color_picker.js +9 -1
- package/test-env/components/combo_box/combo_box.js +18 -4
- package/test-env/components/combo_box/index.js +10 -2
- package/test-env/components/combo_box/matching_options.js +37 -7
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +0 -46
- package/test-env/components/datagrid/body/data_grid_body.js +0 -28
- package/test-env/components/datagrid/body/data_grid_body_custom.js +0 -28
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +0 -28
- package/test-env/components/datagrid/body/header/column_actions.js +17 -5
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +3 -30
- package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +7 -9
- package/test-env/components/datagrid/controls/column_sorting.js +0 -28
- package/test-env/components/datagrid/utils/in_memory.js +0 -28
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +6 -3
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +2 -84
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -62
- package/test-env/components/flex/flex_group.js +22 -37
- package/test-env/components/flex/flex_item.js +17 -17
- package/test-env/components/form/field_number/field_number.js +18 -6
- package/test-env/components/form/field_text/field_text.js +13 -6
- package/test-env/components/form/form_control_layout/_num_icons.js +9 -3
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +4 -3
- package/test-env/components/form/range/dual_range.js +2 -1
- package/test-env/components/form/range/range.js +12 -1
- package/test-env/components/form/range/range_slider.js +4 -1
- package/test-env/components/form/range/range_track.js +2 -1
- package/test-env/components/form/range/range_wrapper.styles.js +4 -4
- package/test-env/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +22 -8
- package/test-env/components/markdown_editor/plugins/markdown_default_plugins/processing_plugins.js +30 -18
- package/test-env/components/markdown_editor/plugins/markdown_default_plugins/ui_plugins.js +13 -2
- package/test-env/components/page_template/outer/page_outer.js +4 -2
- package/test-env/components/page_template/page_template.js +112 -79
- package/test-env/components/popover/input_popover.js +4 -2
- package/test-env/components/popover/popover.js +6 -1
- package/test-env/components/search_bar/filters/field_value_selection_filter.js +3 -5
- package/test-env/components/search_bar/query/default_syntax.js +2 -2
- package/test-env/components/selectable/matching_options.js +46 -7
- package/test-env/components/selectable/selectable.js +54 -12
- package/test-env/components/selectable/selectable_list/selectable_list.js +17 -7
- package/test-env/components/selectable/selectable_search/selectable_search.js +9 -3
- package/test-env/components/steps/step_horizontal.js +1 -0
- package/test-env/components/table/table_row_cell.styles.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +0 -74
- package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +0 -19
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +0 -84
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +0 -26
- package/lib/components/collapsible_nav_beta/collapsible_nav_group/index.js +0 -12
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +0 -52
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +0 -19
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +0 -62
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +0 -26
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/index.js +0 -12
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +0 -83
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.styles.js +0 -26
- package/test-env/components/collapsible_nav_beta/collapsible_nav_group/index.js +0 -12
|
@@ -125,7 +125,8 @@ EuiRangeTrack.propTypes = {
|
|
|
125
125
|
*/
|
|
126
126
|
ticks: PropTypes.arrayOf(PropTypes.shape({
|
|
127
127
|
value: PropTypes.number.isRequired,
|
|
128
|
-
label: PropTypes.node.isRequired
|
|
128
|
+
label: PropTypes.node.isRequired,
|
|
129
|
+
accessibleLabel: PropTypes.string
|
|
129
130
|
}).isRequired),
|
|
130
131
|
/**
|
|
131
132
|
* Modifies the number of tick marks and at what interval
|
|
@@ -18,11 +18,11 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
18
18
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
19
|
};
|
|
20
20
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
21
|
-
name: "
|
|
22
|
-
styles: "display:flex;align-items:center;>.euiFormControlLayout{inline-size:auto;};label:euiRangeWrapper;"
|
|
21
|
+
name: "9gg6o0-euiRangeWrapper",
|
|
22
|
+
styles: "display:flex;align-items:center;>.euiFormControlLayout{inline-size:auto;max-inline-size:50%;.euiFormControlLayout__childrenWrapper{flex-shrink:0;}.euiFormControlLayout__prepend,.euiFormControlLayout__append{flex-shrink:1;max-inline-size:none;}};label:euiRangeWrapper;"
|
|
23
23
|
} : {
|
|
24
|
-
name: "
|
|
25
|
-
styles: "display:flex;align-items:center;>.euiFormControlLayout{inline-size:auto;};label:euiRangeWrapper;",
|
|
24
|
+
name: "9gg6o0-euiRangeWrapper",
|
|
25
|
+
styles: "display:flex;align-items:center;>.euiFormControlLayout{inline-size:auto;max-inline-size:50%;.euiFormControlLayout__childrenWrapper{flex-shrink:0;}.euiFormControlLayout__prepend,.euiFormControlLayout__append{flex-shrink:1;max-inline-size:none;}};label:euiRangeWrapper;",
|
|
26
26
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
27
|
};
|
|
28
28
|
export var euiRangeWrapperStyles = function euiRangeWrapperStyles(euiThemeContext) {
|
|
@@ -224,7 +224,7 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
224
224
|
/**
|
|
225
225
|
* Minimum distance between the popover and the bounding container;
|
|
226
226
|
* Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`
|
|
227
|
-
*
|
|
227
|
+
* @default 16
|
|
228
228
|
*/
|
|
229
229
|
buffer: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.any.isRequired]),
|
|
230
230
|
/**
|
|
@@ -263,7 +263,7 @@ EuiHeaderLinks.propTypes = {
|
|
|
263
263
|
/**
|
|
264
264
|
* Minimum distance between the popover and the bounding container;
|
|
265
265
|
* Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`
|
|
266
|
-
*
|
|
266
|
+
* @default 16
|
|
267
267
|
*/
|
|
268
268
|
buffer: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.any.isRequired]),
|
|
269
269
|
/**
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
/*
|
|
2
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
9
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -18,17 +24,30 @@ import highlight from '../remark/remark_prismjs';
|
|
|
18
24
|
import * as MarkdownTooltip from '../markdown_tooltip';
|
|
19
25
|
import * as MarkdownCheckbox from '../markdown_checkbox';
|
|
20
26
|
import { euiMarkdownLinkValidator } from '../markdown_link_validator';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
exclude = _ref.exclude;
|
|
24
|
-
var excludeSet = new Set(exclude);
|
|
25
|
-
var parsingPlugins = [[markdown, {}], [highlight, {}], [emoji, {
|
|
27
|
+
var DEFAULT_PARSING_PLUGINS = {
|
|
28
|
+
emoji: [emoji, {
|
|
26
29
|
emoticon: false
|
|
27
|
-
}],
|
|
30
|
+
}],
|
|
31
|
+
lineBreaks: [breaks, {}],
|
|
32
|
+
linkValidator: [euiMarkdownLinkValidator, {
|
|
28
33
|
allowRelative: true,
|
|
29
34
|
allowProtocols: ['https:', 'http:', 'mailto:']
|
|
30
|
-
}],
|
|
31
|
-
|
|
35
|
+
}],
|
|
36
|
+
checkbox: [MarkdownCheckbox.parser, {}],
|
|
37
|
+
tooltip: [MarkdownTooltip.parser, {}]
|
|
38
|
+
};
|
|
39
|
+
export var getDefaultEuiMarkdownParsingPlugins = function getDefaultEuiMarkdownParsingPlugins() {
|
|
40
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
41
|
+
exclude = _ref.exclude;
|
|
42
|
+
var parsingPlugins = [[markdown, {}], [highlight, {}]];
|
|
43
|
+
Object.entries(DEFAULT_PARSING_PLUGINS).forEach(function (_ref2) {
|
|
44
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
45
|
+
pluginName = _ref3[0],
|
|
46
|
+
plugin = _ref3[1];
|
|
47
|
+
if (!(exclude !== null && exclude !== void 0 && exclude.includes(pluginName))) {
|
|
48
|
+
parsingPlugins.push(plugin);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
32
51
|
return parsingPlugins;
|
|
33
52
|
};
|
|
34
53
|
export var defaultParsingPlugins = getDefaultEuiMarkdownParsingPlugins();
|
package/es/components/markdown_editor/plugins/markdown_default_plugins/processing_plugins.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9
|
+
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."); }
|
|
10
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
12
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
13
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2
14
|
/*
|
|
3
15
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
16
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -15,20 +27,33 @@ import React, { Fragment, createElement } from 'react';
|
|
|
15
27
|
import all from 'mdast-util-to-hast/lib/all';
|
|
16
28
|
import rehype2react from 'rehype-react';
|
|
17
29
|
import remark2rehype from 'remark-rehype';
|
|
18
|
-
import * as MarkdownTooltip from '../markdown_tooltip';
|
|
19
|
-
import * as MarkdownCheckbox from '../markdown_checkbox';
|
|
20
|
-
import { FENCED_CLASS } from '../remark/remark_prismjs';
|
|
21
30
|
import { EuiLink } from '../../../link';
|
|
22
31
|
import { EuiCodeBlock, EuiCode } from '../../../code';
|
|
23
32
|
import { EuiHorizontalRule } from '../../../horizontal_rule';
|
|
33
|
+
import { FENCED_CLASS } from '../remark/remark_prismjs';
|
|
34
|
+
import * as MarkdownTooltip from '../markdown_tooltip';
|
|
35
|
+
import * as MarkdownCheckbox from '../markdown_checkbox';
|
|
24
36
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
37
|
var unknownHandler = function unknownHandler(h, node) {
|
|
26
38
|
return h(node, node.type, node, all(h, node));
|
|
27
39
|
};
|
|
40
|
+
var DEFAULT_COMPONENT_RENDERERS = {
|
|
41
|
+
checkbox: MarkdownCheckbox.renderer,
|
|
42
|
+
tooltip: MarkdownTooltip.renderer
|
|
43
|
+
};
|
|
28
44
|
export var getDefaultEuiMarkdownProcessingPlugins = function getDefaultEuiMarkdownProcessingPlugins() {
|
|
29
45
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
30
46
|
exclude = _ref.exclude;
|
|
31
|
-
var
|
|
47
|
+
var componentPluginsWithExclusions = {};
|
|
48
|
+
Object.entries(DEFAULT_COMPONENT_RENDERERS).forEach(function (_ref2) {
|
|
49
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
50
|
+
excludeName = _ref3[0],
|
|
51
|
+
renderer = _ref3[1];
|
|
52
|
+
if (!(exclude !== null && exclude !== void 0 && exclude.includes(excludeName))) {
|
|
53
|
+
var pluginName = "".concat(excludeName, "Plugin");
|
|
54
|
+
componentPluginsWithExclusions[pluginName] = renderer;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
32
57
|
var plugins = [[remark2rehype, {
|
|
33
58
|
allowDangerousHtml: true,
|
|
34
59
|
unknownHandler: unknownHandler,
|
|
@@ -36,7 +61,7 @@ export var getDefaultEuiMarkdownProcessingPlugins = function getDefaultEuiMarkdo
|
|
|
36
61
|
}], [rehype2react, {
|
|
37
62
|
createElement: createElement,
|
|
38
63
|
Fragment: Fragment,
|
|
39
|
-
components: {
|
|
64
|
+
components: _objectSpread({
|
|
40
65
|
a: EuiLink,
|
|
41
66
|
code: function code(props) {
|
|
42
67
|
return (
|
|
@@ -68,11 +93,9 @@ export var getDefaultEuiMarkdownProcessingPlugins = function getDefaultEuiMarkdo
|
|
|
68
93
|
},
|
|
69
94
|
hr: function hr(props) {
|
|
70
95
|
return ___EmotionJSX(EuiHorizontalRule, props);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
}
|
|
96
|
+
}
|
|
97
|
+
}, componentPluginsWithExclusions)
|
|
74
98
|
}]];
|
|
75
|
-
if (!excludeSet.has('tooltip')) plugins[1][1].components.tooltipPlugin = MarkdownTooltip.renderer;
|
|
76
99
|
return plugins;
|
|
77
100
|
};
|
|
78
101
|
export var defaultProcessingPlugins = getDefaultEuiMarkdownProcessingPlugins();
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
1
7
|
/*
|
|
2
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
9
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -7,12 +13,21 @@
|
|
|
7
13
|
*/
|
|
8
14
|
|
|
9
15
|
import * as MarkdownTooltip from '../markdown_tooltip';
|
|
16
|
+
var DEFAULT_UI_PLUGINS = {
|
|
17
|
+
tooltip: MarkdownTooltip.plugin
|
|
18
|
+
};
|
|
10
19
|
export var getDefaultEuiMarkdownUiPlugins = function getDefaultEuiMarkdownUiPlugins() {
|
|
11
20
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
12
21
|
exclude = _ref.exclude;
|
|
13
|
-
var excludeSet = new Set(exclude);
|
|
14
22
|
var uiPlugins = [];
|
|
15
|
-
|
|
23
|
+
Object.entries(DEFAULT_UI_PLUGINS).forEach(function (_ref2) {
|
|
24
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
25
|
+
pluginName = _ref3[0],
|
|
26
|
+
plugin = _ref3[1];
|
|
27
|
+
if (!(exclude !== null && exclude !== void 0 && exclude.includes(pluginName))) {
|
|
28
|
+
uiPlugins.push(plugin);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
16
31
|
return uiPlugins;
|
|
17
32
|
};
|
|
18
33
|
export var defaultUiPlugins = getDefaultEuiMarkdownUiPlugins();
|
|
@@ -438,7 +438,7 @@ EuiPageHeaderContent.propTypes = {
|
|
|
438
438
|
/**
|
|
439
439
|
* Minimum distance between the popover and the bounding container;
|
|
440
440
|
* Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`
|
|
441
|
-
*
|
|
441
|
+
* @default 16
|
|
442
442
|
*/
|
|
443
443
|
buffer: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.any.isRequired]),
|
|
444
444
|
/**
|
|
@@ -15,6 +15,7 @@ import PropTypes from "prop-types";
|
|
|
15
15
|
import { useEuiTheme, useIsWithinBreakpoints } from '../../../services';
|
|
16
16
|
import { euiPageOuterStyles } from './page_outer.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
+
export var PAGE_DIRECTIONS = ['row', 'column'];
|
|
18
19
|
export var _EuiPageOuter = function _EuiPageOuter(_ref) {
|
|
19
20
|
var children = _ref.children,
|
|
20
21
|
_ref$grow = _ref.grow,
|
|
@@ -42,7 +43,7 @@ _EuiPageOuter.propTypes = {
|
|
|
42
43
|
* Changes the `flex-direction` property.
|
|
43
44
|
* Flip to `column` when not including a sidebar.
|
|
44
45
|
*/
|
|
45
|
-
direction: PropTypes.
|
|
46
|
+
direction: PropTypes.any,
|
|
46
47
|
/**
|
|
47
48
|
* When direction is `row`, it will flip to `column` when within these breakpoints.
|
|
48
49
|
*/
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["children", "responsive", "restrictWidth", "paddingSize", "grow", "bottomBorder", "offset", "panelled", "contentBorder", "component", "mainProps", "className", "minHeight"];
|
|
2
|
+
var _excluded = ["children", "responsive", "restrictWidth", "paddingSize", "grow", "bottomBorder", "offset", "panelled", "contentBorder", "component", "mainProps", "className", "minHeight", "style"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
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."); }
|
|
11
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
17
|
/*
|
|
@@ -16,7 +22,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
22
|
* Side Public License, v 1.
|
|
17
23
|
*/
|
|
18
24
|
|
|
19
|
-
import React, { createContext, useContext } from 'react';
|
|
25
|
+
import React, { createContext, useContext, useMemo } from 'react';
|
|
20
26
|
import PropTypes from "prop-types";
|
|
21
27
|
import classNames from 'classnames';
|
|
22
28
|
import { _EuiPageOuter as EuiPageOuter } from './outer';
|
|
@@ -25,9 +31,10 @@ import { _EuiPageBottomBar as EuiPageBottomBar } from './bottom_bar/page_bottom_
|
|
|
25
31
|
import { _EuiPageEmptyPrompt as EuiPageEmptyPrompt } from './empty_prompt/page_empty_prompt';
|
|
26
32
|
import { EuiPageHeader, EuiPageSection, EuiPageSidebar } from '../page';
|
|
27
33
|
import { useGeneratedHtmlId } from '../../services';
|
|
28
|
-
import {
|
|
34
|
+
import { logicalStyles } from '../../global_styling';
|
|
29
35
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
30
36
|
export var TemplateContext = /*#__PURE__*/createContext({
|
|
37
|
+
sidebar: {},
|
|
31
38
|
section: {},
|
|
32
39
|
header: {},
|
|
33
40
|
emptyPrompt: {},
|
|
@@ -56,9 +63,8 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
56
63
|
className = _ref.className,
|
|
57
64
|
_ref$minHeight = _ref.minHeight,
|
|
58
65
|
minHeight = _ref$minHeight === void 0 ? '460px' : _ref$minHeight,
|
|
66
|
+
style = _ref.style,
|
|
59
67
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
60
|
-
var templateContext = useContext(TemplateContext);
|
|
61
|
-
|
|
62
68
|
// Used as a target to insert the bottom bar component
|
|
63
69
|
var pageInnerId = useGeneratedHtmlId({
|
|
64
70
|
prefix: 'EuiPageTemplateInner',
|
|
@@ -66,70 +72,62 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
66
72
|
});
|
|
67
73
|
|
|
68
74
|
// Sections include page header
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} else {
|
|
75
|
-
return sidebar.length ? true : 'extended';
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
var getHeaderProps = function getHeaderProps() {
|
|
79
|
-
return {
|
|
80
|
-
restrictWidth: restrictWidth,
|
|
81
|
-
paddingSize: paddingSize,
|
|
82
|
-
bottomBorder: getBottomBorder()
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
var getSectionProps = function getSectionProps() {
|
|
86
|
-
return {
|
|
87
|
-
restrictWidth: restrictWidth,
|
|
88
|
-
paddingSize: paddingSize,
|
|
89
|
-
color: panelled === false ? 'transparent' : 'plain'
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
var getSideBarProps = function getSideBarProps() {
|
|
93
|
-
return {
|
|
94
|
-
paddingSize: paddingSize,
|
|
95
|
-
responsive: responsive
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
var getBottomBarProps = function getBottomBarProps() {
|
|
99
|
-
return {
|
|
100
|
-
restrictWidth: restrictWidth,
|
|
101
|
-
paddingSize: paddingSize,
|
|
102
|
-
// pageInnerId may contain colons that are parsed as pseudo-elements if not escaped
|
|
103
|
-
parent: "#".concat(pageInnerId.replaceAll(':', '\\:'))
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
var innerPanelled = function innerPanelled() {
|
|
107
|
-
return panelled !== null && panelled !== void 0 ? panelled : Boolean(sidebar.length > 0);
|
|
108
|
-
};
|
|
109
|
-
var innerBordered = function innerBordered() {
|
|
110
|
-
return contentBorder !== undefined ? contentBorder : Boolean(sidebar.length > 0);
|
|
111
|
-
};
|
|
112
|
-
React.Children.toArray(children).forEach(function (child, index) {
|
|
113
|
-
if (! /*#__PURE__*/React.isValidElement(child)) return; // Skip non-components
|
|
75
|
+
var _useMemo = useMemo(function () {
|
|
76
|
+
var sidebar = [];
|
|
77
|
+
var sections = [];
|
|
78
|
+
React.Children.toArray(children).forEach(function (child) {
|
|
79
|
+
if (! /*#__PURE__*/React.isValidElement(child)) return; // Skip non-components
|
|
114
80
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
81
|
+
if (child.type === _EuiPageSidebar || child.props.__EMOTION_TYPE_PLEASE_DO_NOT_USE__ === _EuiPageSidebar) {
|
|
82
|
+
sidebar.push(child);
|
|
83
|
+
} else {
|
|
84
|
+
sections.push(child);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
return [sidebar, sections];
|
|
88
|
+
}, [children]),
|
|
89
|
+
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
90
|
+
sidebar = _useMemo2[0],
|
|
91
|
+
sections = _useMemo2[1];
|
|
124
92
|
var classes = classNames('euiPageTemplate', className);
|
|
125
|
-
var pageStyle =
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
93
|
+
var pageStyle = useMemo(function () {
|
|
94
|
+
return logicalStyles(_objectSpread({
|
|
95
|
+
minHeight: grow ? "max(".concat(minHeight, ", 100vh)") : minHeight,
|
|
96
|
+
paddingTop: offset !== null && offset !== void 0 ? offset : 'var(--euiFixedHeadersOffset, 0)'
|
|
97
|
+
}, style));
|
|
98
|
+
}, [minHeight, grow, offset, style]);
|
|
99
|
+
var innerPanelled = panelled !== null && panelled !== void 0 ? panelled : Boolean(sidebar.length > 0);
|
|
100
|
+
var innerBordered = contentBorder !== null && contentBorder !== void 0 ? contentBorder : Boolean(sidebar.length > 0);
|
|
101
|
+
var headerBottomBorder = bottomBorder !== null && bottomBorder !== void 0 ? bottomBorder : sidebar.length ? true : 'extended';
|
|
102
|
+
var templateContext = useMemo(function () {
|
|
103
|
+
return {
|
|
104
|
+
sidebar: {
|
|
105
|
+
paddingSize: paddingSize,
|
|
106
|
+
responsive: responsive
|
|
107
|
+
},
|
|
108
|
+
header: {
|
|
109
|
+
restrictWidth: restrictWidth,
|
|
110
|
+
paddingSize: paddingSize,
|
|
111
|
+
bottomBorder: headerBottomBorder
|
|
112
|
+
},
|
|
113
|
+
section: {
|
|
114
|
+
restrictWidth: restrictWidth,
|
|
115
|
+
paddingSize: paddingSize,
|
|
116
|
+
color: panelled === false ? 'transparent' : 'plain',
|
|
117
|
+
grow: true
|
|
118
|
+
},
|
|
119
|
+
emptyPrompt: {
|
|
120
|
+
panelled: innerPanelled ? true : panelled,
|
|
121
|
+
grow: true
|
|
122
|
+
},
|
|
123
|
+
bottomBar: {
|
|
124
|
+
restrictWidth: restrictWidth,
|
|
125
|
+
paddingSize: paddingSize,
|
|
126
|
+
// pageInnerId may contain colons that are parsed as pseudo-elements if not escaped
|
|
127
|
+
parent: "#".concat(pageInnerId.replaceAll(':', '\\:'))
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
}, [pageInnerId, restrictWidth, responsive, paddingSize, panelled, innerPanelled, headerBottomBorder]);
|
|
133
131
|
return ___EmotionJSX(TemplateContext.Provider, {
|
|
134
132
|
value: templateContext
|
|
135
133
|
}, ___EmotionJSX(EuiPageOuter, _extends({}, rest, {
|
|
@@ -139,8 +137,8 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
139
137
|
}), sidebar, ___EmotionJSX(EuiPageInner, _extends({}, mainProps, {
|
|
140
138
|
component: component,
|
|
141
139
|
id: pageInnerId,
|
|
142
|
-
border: innerBordered
|
|
143
|
-
panelled: innerPanelled
|
|
140
|
+
border: innerBordered,
|
|
141
|
+
panelled: innerPanelled,
|
|
144
142
|
responsive: responsive
|
|
145
143
|
}), sections)));
|
|
146
144
|
};
|
|
@@ -154,7 +152,7 @@ _EuiPageTemplate.propTypes = {
|
|
|
154
152
|
* Changes the `flex-direction` property.
|
|
155
153
|
* Flip to `column` when not including a sidebar.
|
|
156
154
|
*/
|
|
157
|
-
direction: PropTypes.
|
|
155
|
+
direction: PropTypes.any,
|
|
158
156
|
/**
|
|
159
157
|
* Decides at which point the main content wrapper will be 100vw.
|
|
160
158
|
*/
|
|
@@ -217,11 +215,49 @@ _EuiPageTemplate.propTypes = {
|
|
|
217
215
|
*/
|
|
218
216
|
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired])
|
|
219
217
|
};
|
|
218
|
+
var _EuiPageSidebar = function _EuiPageSidebar(props) {
|
|
219
|
+
var _useContext = useContext(TemplateContext),
|
|
220
|
+
sidebar = _useContext.sidebar;
|
|
221
|
+
return ___EmotionJSX(EuiPageSidebar, _extends({}, sidebar, props));
|
|
222
|
+
};
|
|
223
|
+
_EuiPageSidebar.propTypes = {
|
|
224
|
+
/**
|
|
225
|
+
* Adjust the padding.
|
|
226
|
+
* When using this setting it's best to be consistent throughout all similar usages.
|
|
227
|
+
*/
|
|
228
|
+
paddingSize: PropTypes.any,
|
|
229
|
+
/**
|
|
230
|
+
* Renders a fancy little visual in the top left corner of the side bar
|
|
231
|
+
*/
|
|
232
|
+
hasEmbellish: PropTypes.bool,
|
|
233
|
+
/**
|
|
234
|
+
* Adds `position: sticky` and affords for any fixed position headers.
|
|
235
|
+
*/
|
|
236
|
+
sticky: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.shape({
|
|
237
|
+
/**
|
|
238
|
+
* To account for any fixed elements like headers,
|
|
239
|
+
* pass in the value of the total height of those fixed elements.
|
|
240
|
+
*/
|
|
241
|
+
offset: PropTypes.number
|
|
242
|
+
}).isRequired]),
|
|
243
|
+
/**
|
|
244
|
+
* A minimum width is necessary to maintain size.
|
|
245
|
+
* Be sure to take `paddingSize` into account.
|
|
246
|
+
*/
|
|
247
|
+
minWidth: PropTypes.any,
|
|
248
|
+
/**
|
|
249
|
+
* Sets the `minWidth` to 100% when within these breakpoints.
|
|
250
|
+
*/
|
|
251
|
+
responsive: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
252
|
+
className: PropTypes.string,
|
|
253
|
+
"aria-label": PropTypes.string,
|
|
254
|
+
"data-test-subj": PropTypes.string,
|
|
255
|
+
css: PropTypes.any
|
|
256
|
+
};
|
|
220
257
|
var _EuiPageSection = function _EuiPageSection(props) {
|
|
221
|
-
var
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}, props));
|
|
258
|
+
var _useContext2 = useContext(TemplateContext),
|
|
259
|
+
section = _useContext2.section;
|
|
260
|
+
return ___EmotionJSX(EuiPageSection, _extends({}, section, props));
|
|
225
261
|
};
|
|
226
262
|
_EuiPageSection.propTypes = {
|
|
227
263
|
className: PropTypes.string,
|
|
@@ -268,8 +304,9 @@ _EuiPageSection.propTypes = {
|
|
|
268
304
|
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired])
|
|
269
305
|
};
|
|
270
306
|
var _EuiPageHeader = function _EuiPageHeader(props) {
|
|
271
|
-
var
|
|
272
|
-
|
|
307
|
+
var _useContext3 = useContext(TemplateContext),
|
|
308
|
+
header = _useContext3.header;
|
|
309
|
+
return ___EmotionJSX(EuiPageHeader, _extends({}, header, props));
|
|
273
310
|
};
|
|
274
311
|
_EuiPageHeader.propTypes = {
|
|
275
312
|
/**
|
|
@@ -295,8 +332,9 @@ _EuiPageHeader.propTypes = {
|
|
|
295
332
|
bottomBorder: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.oneOf(["extended"])])
|
|
296
333
|
};
|
|
297
334
|
var _EuiPageEmptyPrompt = function _EuiPageEmptyPrompt(props) {
|
|
298
|
-
var
|
|
299
|
-
|
|
335
|
+
var _useContext4 = useContext(TemplateContext),
|
|
336
|
+
emptyPrompt = _useContext4.emptyPrompt;
|
|
337
|
+
return ___EmotionJSX(EuiPageEmptyPrompt, _extends({}, emptyPrompt, props));
|
|
300
338
|
};
|
|
301
339
|
_EuiPageEmptyPrompt.propTypes = {
|
|
302
340
|
className: PropTypes.string,
|
|
@@ -318,8 +356,8 @@ _EuiPageEmptyPrompt.propTypes = {
|
|
|
318
356
|
panelled: PropTypes.bool
|
|
319
357
|
};
|
|
320
358
|
var _EuiPageBottomBar = function _EuiPageBottomBar(props) {
|
|
321
|
-
var
|
|
322
|
-
bottomBar =
|
|
359
|
+
var _useContext5 = useContext(TemplateContext),
|
|
360
|
+
bottomBar = _useContext5.bottomBar;
|
|
323
361
|
return ___EmotionJSX(EuiPageBottomBar, _extends({}, bottomBar, props));
|
|
324
362
|
};
|
|
325
363
|
_EuiPageBottomBar.propTypes = {
|
|
@@ -337,7 +375,7 @@ _EuiPageBottomBar.propTypes = {
|
|
|
337
375
|
restrictWidth: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.number.isRequired, PropTypes.string.isRequired])
|
|
338
376
|
};
|
|
339
377
|
export var EuiPageTemplate = Object.assign(_EuiPageTemplate, {
|
|
340
|
-
Sidebar:
|
|
378
|
+
Sidebar: _EuiPageSidebar,
|
|
341
379
|
Header: _EuiPageHeader,
|
|
342
380
|
Section: _EuiPageSection,
|
|
343
381
|
BottomBar: _EuiPageBottomBar,
|
|
@@ -127,7 +127,9 @@ export var EuiInputPopover = function EuiInputPopover(_ref) {
|
|
|
127
127
|
panelPropsOnKeyDown === null || panelPropsOnKeyDown === void 0 ? void 0 : panelPropsOnKeyDown(event);
|
|
128
128
|
if (event.key === keys.TAB) {
|
|
129
129
|
if (disableFocusTrap) {
|
|
130
|
-
|
|
130
|
+
if (!ownFocus) {
|
|
131
|
+
closePopover();
|
|
132
|
+
}
|
|
131
133
|
} else {
|
|
132
134
|
var tabbableItems = tabbable(event.currentTarget).filter(function (el) {
|
|
133
135
|
return !el.hasAttribute('data-focus-guard');
|
|
@@ -139,7 +141,7 @@ export var EuiInputPopover = function EuiInputPopover(_ref) {
|
|
|
139
141
|
}
|
|
140
142
|
}
|
|
141
143
|
}
|
|
142
|
-
}, [disableFocusTrap, closePopover, panelPropsOnKeyDown]);
|
|
144
|
+
}, [disableFocusTrap, ownFocus, closePopover, panelPropsOnKeyDown]);
|
|
143
145
|
|
|
144
146
|
/**
|
|
145
147
|
* Optional close on scroll behavior
|
|
@@ -323,6 +323,11 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
323
323
|
this.onOpenPopover();
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
+
// ensure recalculation of panel position on prop updates
|
|
327
|
+
if (this.props.isOpen && (prevProps.anchorPosition !== this.props.anchorPosition || prevProps.buffer !== this.props.buffer || prevProps.offset !== this.props.offset || prevProps.panelPaddingSize !== this.props.panelPaddingSize)) {
|
|
328
|
+
this.positionPopoverFluid();
|
|
329
|
+
}
|
|
330
|
+
|
|
326
331
|
// update scroll listener
|
|
327
332
|
if (prevProps.repositionOnScroll !== this.props.repositionOnScroll) {
|
|
328
333
|
if (this.props.repositionOnScroll) {
|
|
@@ -673,7 +678,7 @@ EuiPopover.propTypes = {
|
|
|
673
678
|
/**
|
|
674
679
|
* Minimum distance between the popover and the bounding container;
|
|
675
680
|
* Pass an array of 4 values to adjust each side differently: `[top, right, bottom, left]`
|
|
676
|
-
*
|
|
681
|
+
* @default 16
|
|
677
682
|
*/
|
|
678
683
|
buffer: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.any.isRequired]),
|
|
679
684
|
/**
|
|
@@ -44,8 +44,6 @@ var defaults = {
|
|
|
44
44
|
config: {
|
|
45
45
|
multiSelect: true,
|
|
46
46
|
filterWith: 'prefix',
|
|
47
|
-
loadingMessage: 'Loading...',
|
|
48
|
-
noOptionsMessage: 'No options found',
|
|
49
47
|
searchThreshold: 10
|
|
50
48
|
}
|
|
51
49
|
};
|
|
@@ -332,10 +330,10 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
|
|
|
332
330
|
return option.view;
|
|
333
331
|
},
|
|
334
332
|
isLoading: isNil(_this5.state.options),
|
|
335
|
-
loadingMessage: config.loadingMessage
|
|
336
|
-
emptyMessage: config.noOptionsMessage
|
|
333
|
+
loadingMessage: config.loadingMessage,
|
|
334
|
+
emptyMessage: config.noOptionsMessage,
|
|
337
335
|
errorMessage: _this5.state.error,
|
|
338
|
-
noMatchesMessage: config.noOptionsMessage
|
|
336
|
+
noMatchesMessage: config.noOptionsMessage,
|
|
339
337
|
listProps: {
|
|
340
338
|
isVirtualized: isOverSearchThreshold || false
|
|
341
339
|
},
|
|
@@ -277,8 +277,8 @@ function () {
|
|
|
277
277
|
}
|
|
278
278
|
return Exp.string(unescapeValue(text()), location());
|
|
279
279
|
},
|
|
280
|
-
peg$c67 = /^[\-_
|
|
281
|
-
peg$c68 = peg$classExpectation(["-", "_", "*", ":", "/"], false, false),
|
|
280
|
+
peg$c67 = /^[\-_*:\/@]/,
|
|
281
|
+
peg$c68 = peg$classExpectation(["-", "_", "*", ":", "/", "@"], false, false),
|
|
282
282
|
peg$c69 = /^[\xC0-\uFFFF]/,
|
|
283
283
|
peg$c70 = peg$classExpectation([["\xC0", "\uFFFF"]], false, false),
|
|
284
284
|
peg$c71 = /^[\-:\\()]/,
|