Skip to content

Commit

Permalink
improve code splitting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosant committed Oct 19, 2021
1 parent b4a1520 commit eb5ac44
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 14 deletions.
4 changes: 3 additions & 1 deletion packages/kbn-react-field/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ filegroup(

NPM_MODULE_EXTRA_FILES = [
"package.json",
"README.md"
"README.md",
"field_button/package.json",
"field_icon/package.json",
]

RUNTIME_DEPS = [
Expand Down
5 changes: 5 additions & 0 deletions packages/kbn-react-field/field_button/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "../target_node/field_button/index.js",
"browser": "../target_webpack/field_button/index.js",
"types": "../target_types/field_button/index.d.ts"
}
5 changes: 5 additions & 0 deletions packages/kbn-react-field/field_icon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"main": "../target_node/field_icon/index.js",
"browser": "../target_webpack/field_icon/index.js",
"types": "../target_types/field_icon/index.d.ts"
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import {
import { i18n } from '@kbn/i18n';
import { UiCounterMetricType } from '@kbn/analytics';
import classNames from 'classnames';
import { FieldIcon, FieldButton } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import { FieldButton } from '@kbn/react-field/field_button';
import { DiscoverFieldDetails } from './discover_field_details';
import { FieldDetails } from './types';
import { IndexPatternField, IndexPattern } from '../../../../../../../data/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import './field_name.scss';
import { EuiBadge, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FieldIcon, FieldIconProps } from '@kbn/react-field';
import { FieldIcon, FieldIconProps } from '@kbn/react-field/field_icon';
import { getFieldTypeName } from './field_type_name';
import { IndexPatternField } from '../../../../../data/public';
import { getFieldSubtypeMulti } from '../../../../../data/common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
EuiIconTip,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import classNames from 'classnames';
import { WorkspaceField } from '../../types';
import { iconChoices } from '../../helpers/style_choices';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, { useState, useEffect, ReactNode } from 'react';
import { EuiPopover, EuiSelectable, EuiBadge } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import classNames from 'classnames';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import { WorkspaceField } from '../../types';

export interface FieldPickerProps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
TooltipType,
} from '@elastic/charts';
import { i18n } from '@kbn/i18n';
import { FieldButton } from '@kbn/react-field';
import { FieldButton } from '@kbn/react-field/field_button';
import type { FieldFormatsStart } from 'src/plugins/field_formats/public';
import { EuiHighlight } from '@elastic/eui';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

import React from 'react';
import { FieldIcon, FieldIconProps } from '@kbn/react-field';
import { FieldIcon, FieldIconProps } from '@kbn/react-field/field_icon';
import { DataType } from '../types';
import { normalizeOperationDataType } from './utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
EuiSpacer,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import _ from 'lodash';
import { MVTFieldDescriptor } from '../../../../common/descriptor_types';
import { MVT_FIELD_TYPE } from '../../../../common/constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
EuiFlexItem,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import { FIELD_ORIGIN, VECTOR_STYLES } from '../../../../../common/constants';
import { StyleField } from '../style_fields_helper';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
EuiFlexItem,
EuiToolTip,
} from '@elastic/eui';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import { IndexPatternField } from 'src/plugins/data/public';

function fieldsToOptions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';

export type FieldProps = {
label: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { useHistory } from 'react-router-dom';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import {
KibanaContextProvider,
KibanaReactContextValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import { EuiFlexGroup, EuiFlexItem, EuiBadge, EuiText, EuiToolTip } from '@elastic/eui';
import { isEmpty } from 'lodash';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import * as i18n from '../translations';
import { IndexPatternField } from '../../../../../../../../src/plugins/data/public';
import { getExampleText } from '../helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
EuiFlexGroup,
EuiFlexItem,
} from '@elastic/eui';
import { FieldIcon } from '@kbn/react-field';
import { FieldIcon } from '@kbn/react-field/field_icon';
import { IFieldType } from 'src/plugins/data/public';

function fieldsToOptions(fields?: IFieldType[]): Array<EuiComboBoxOptionOption<IFieldType>> {
Expand Down

0 comments on commit eb5ac44

Please sign in to comment.