Skip to content

Commit

Permalink
Reorganize into src/services and src/ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Oct 12, 2023
1 parent 9e88585 commit 9aab5c4
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 16 deletions.
7 changes: 5 additions & 2 deletions packages/shared-ux/error_boundary/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
* Side Public License, v 1.
*/

export { ErrorBoundary } from './src/error_boundary';
export { ErrorBoundaryKibanaProvider, ErrorBoundaryProvider } from './src/error_boundary_services';
export { ErrorBoundary } from './src/ui/error_boundary';
export {
ErrorBoundaryKibanaProvider,
ErrorBoundaryProvider,
} from './src/services/error_boundary_services';
4 changes: 2 additions & 2 deletions packages/shared-ux/error_boundary/mocks/src/jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* Side Public License, v 1.
*/

import { ErrorService } from '../../src/error_service';
import { ToastsService } from '../../src/toasts_service';
import { ErrorService } from '../../src/services/error_service';
import { ToastsService } from '../../src/services/toasts_service';
import { ErrorBoundaryServices } from '../../types';

export const getServicesMock = (): ErrorBoundaryServices => {
Expand Down
4 changes: 2 additions & 2 deletions packages/shared-ux/error_boundary/mocks/src/storybook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

import { AbstractStorybookMock } from '@kbn/shared-ux-storybook-mock';
import { action } from '@storybook/addon-actions';
import { ErrorService } from '../../src/error_service';
import { ToastsService } from '../../src/toasts_service';
import { ErrorService } from '../../src/services/error_service';
import { ToastsService } from '../../src/services/toasts_service';
import { ErrorBoundaryServices } from '../../types';

// eslint-disable-next-line @typescript-eslint/no-empty-interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React, { FC, useContext } from 'react';
import useObservable from 'react-use/lib/useObservable';
import * as Rx from 'rxjs';

import { ErrorBoundaryKibanaDependencies, ErrorBoundaryServices, Toasts } from '../types';
import { ErrorBoundaryKibanaDependencies, ErrorBoundaryServices, Toasts } from '../../types';
import { ErrorService } from './error_service';
import { ToastsService } from './toasts_service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';

import { ErrorBoundaryUIServices } from '../types';
import { ErrorBoundaryUIServices } from '../../types';

const DATA_TEST_SUBJ_PAGE_REFRESH_BUTTON = 'pageReloadButton';
const DATA_TEST_SUBJ_PAGE_DETAILS_BUTTON = 'showDetailsButton';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import {
import { action } from '@storybook/addon-actions';
import { Meta, Story } from '@storybook/react';
import React, { FC, useState } from 'react';
import { ErrorBoundary, ErrorBoundaryProvider } from '..';
import mdx from '../README.mdx';
import { ErrorBoundaryStorybookMock } from '../mocks/src/storybook';
import { ErrorBoundary, ErrorBoundaryProvider } from '../..';
import mdx from '../../README.mdx';
import { ErrorBoundaryStorybookMock } from '../../mocks/src/storybook';

const storybookMock = new ErrorBoundaryStorybookMock();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import React from 'react';
import useObservable from 'react-use/lib/useObservable';

import { ErrorBoundaryServices, Toasts } from '../types';
import { useErrorBoundary } from './error_boundary_services';
import { ErrorCallout, ErrorInline } from './toasts_service';
import { ErrorBoundaryServices, Toasts } from '../../types';
import { useErrorBoundary } from '../services/error_boundary_services';
import { ErrorCallout, ErrorInline } from '../services/toasts_service';

interface ErrorBoundaryState {
error: null | Error;
Expand Down
4 changes: 2 additions & 2 deletions packages/shared-ux/error_boundary/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/

import { EuiGlobalToastListProps } from '@elastic/eui';
import { ErrorService } from './src/error_service';
import { ToastsService } from './src/toasts_service';
import { ErrorService } from './src/services/error_service';
import { ToastsService } from './src/services/toasts_service';

export interface ErrorBoundaryUIServices {
reloadWindow: () => void;
Expand Down

0 comments on commit 9aab5c4

Please sign in to comment.