[kbn/rule-data-utils] add submodules and require public use them (#117963)

* [kbn/rule-data-utils] add submodules and require public use them

* fix lint errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Spencer 2021-11-15 14:23:52 -08:00 committed by GitHub
parent 7c8b6b6f9e
commit 0f68fcf5af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 146 additions and 253 deletions

View file

@ -11,7 +11,7 @@ import { TestProviders, mockGetAllCasesSelectorModal } from '../../../../mock';
import { AddToCaseAction } from './add_to_case_action';
import { SECURITY_SOLUTION_OWNER } from '../../../../../../cases/common';
import { AddToCaseActionButton } from './add_to_case_action_button';
import { ALERT_RULE_UUID } from '@kbn/rule-data-utils';
import { ALERT_RULE_UUID } from '@kbn/rule-data-utils/technical_field_names';
jest.mock('react-router-dom', () => ({
useLocation: () => ({

View file

@ -5,7 +5,10 @@
* 2.0.
*/
import { ALERT_RULE_CONSUMER, ALERT_RULE_PRODUCER } from '@kbn/rule-data-utils';
import {
ALERT_RULE_CONSUMER,
ALERT_RULE_PRODUCER,
} from '@kbn/rule-data-utils/technical_field_names';
import { isEmpty } from 'lodash/fp';
import { EuiDataGridCellValueElementProps } from '@elastic/eui';

View file

@ -32,7 +32,10 @@ import React, {
import { connect, ConnectedProps, useDispatch } from 'react-redux';
import styled, { ThemeContext } from 'styled-components';
import { ALERT_RULE_CONSUMER, ALERT_RULE_PRODUCER } from '@kbn/rule-data-utils';
import {
ALERT_RULE_CONSUMER,
ALERT_RULE_PRODUCER,
} from '@kbn/rule-data-utils/technical_field_names';
import {
TGridCellAction,
BulkActionsProp,

View file

@ -15,7 +15,7 @@ import {
EuiHorizontalRule,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { ALERT_RULE_NAME } from '@kbn/rule-data-utils';
import { ALERT_RULE_NAME } from '@kbn/rule-data-utils/technical_field_names';
import { get } from 'lodash';
import moment from 'moment';
import React, { ComponentType, useCallback, useMemo } from 'react';

View file

@ -5,9 +5,7 @@
* 2.0.
*/
import type { AlertConsumers as AlertConsumersTyped } from '@kbn/rule-data-utils';
// @ts-expect-error
import { AlertConsumers as AlertConsumersNonTyped } from '@kbn/rule-data-utils/target_node/alerts_as_data_rbac';
import { AlertConsumers } from '@kbn/rule-data-utils/alerts_as_data_rbac';
import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui';
import { isEmpty } from 'lodash/fp';
import React, { useEffect, useMemo, useRef, useState } from 'react';
@ -50,8 +48,6 @@ import { InspectButton, InspectButtonContainer } from '../../inspect';
import { SummaryViewSelector, ViewSelection } from '../event_rendered_view/selector';
import { TGridLoading, TGridEmpty, TimelineContext } from '../shared';
const AlertConsumers: typeof AlertConsumersTyped = AlertConsumersNonTyped;
const TitleText = styled.span`
margin-right: 12px;
`;

View file

@ -5,7 +5,7 @@
* 2.0.
*/
import type { AlertConsumers } from '@kbn/rule-data-utils';
import type { AlertConsumers } from '@kbn/rule-data-utils/alerts_as_data_rbac';
import deepEqual from 'fast-deep-equal';
import { isEmpty, isString, noop } from 'lodash/fp';
import { useCallback, useEffect, useRef, useState } from 'react';

View file

@ -6,7 +6,7 @@
*/
import { normalizedEventFields } from './use_add_to_case';
import { ALERT_RULE_NAME, ALERT_RULE_UUID } from '@kbn/rule-data-utils';
import { ALERT_RULE_NAME, ALERT_RULE_UUID } from '@kbn/rule-data-utils/technical_field_names';
import { merge } from 'lodash';
const defaultArgs = {

View file

@ -8,7 +8,7 @@ import { get, isEmpty } from 'lodash/fp';
import { useState, useCallback, useMemo, SyntheticEvent } from 'react';
import { useLocation } from 'react-router-dom';
import { useDispatch } from 'react-redux';
import { ALERT_RULE_NAME, ALERT_RULE_UUID } from '@kbn/rule-data-utils';
import { ALERT_RULE_NAME, ALERT_RULE_UUID } from '@kbn/rule-data-utils/technical_field_names';
import { useKibana } from '../../../../../src/plugins/kibana_react/public';
import { Case, SubCase } from '../../../cases/common';
import { TimelinesStartServices } from '../types';

View file

@ -6,7 +6,7 @@
*/
import React from 'react';
import { ALERT_START, ALERT_STATUS } from '@kbn/rule-data-utils';
import { ALERT_START, ALERT_STATUS } from '@kbn/rule-data-utils/technical_field_names';
import { TGridIntegratedProps } from '../components/t_grid/integrated';
import { mockBrowserFields, mockDocValueFields, mockRuntimeMappings } from './browser_fields';
import { mockDataProviders } from './mock_data_providers';