Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KOGITO-9540: [SWF Dev UI] Specific imports for kogito apps packages #1810

Merged
merged 4 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ import React, {
useState
} from 'react';
import { Bullseye } from '@patternfly/react-core/dist/js/layouts/Bullseye';
import { componentOuiaProps, OUIAProps } from '@kogito-apps/ouia-tools';
import { KogitoSpinner } from '@kogito-apps/components-common';
import {
componentOuiaProps,
OUIAProps
} from '@kogito-apps/ouia-tools/dist/utils/OuiaUtils';
import { KogitoSpinner } from '@kogito-apps/components-common/dist/components/KogitoSpinner';
import { MessageBusClientApi } from '@kie-tools-core/envelope-bus/dist/api';
import {
CloudEventFormChannelApi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import { Stack, StackItem } from '@patternfly/react-core/dist/js/layouts/Stack';
import { TextInput } from '@patternfly/react-core/dist/js/components/TextInput';
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
import { componentOuiaProps, OUIAProps } from '@kogito-apps/ouia-tools';
import {
componentOuiaProps,
OUIAProps
} from '@kogito-apps/ouia-tools/dist/utils/OuiaUtils';

export interface CloudEventCustomHeadersEditorApi {
reset(): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import React from 'react';
import { CloudEventCustomHeadersEditorApi } from '../CloudEventCustomHeadersEditor';
import { OUIAProps } from '@kogito-apps/ouia-tools';
import { OUIAProps } from '@kogito-apps/ouia-tools/dist/utils/OuiaUtils';

const MockedCloudEventCustomHeadersEditor = React.forwardRef<
CloudEventCustomHeadersEditorApi,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

import React, { useCallback, useEffect, useRef, useState } from 'react';
import { componentOuiaProps, OUIAProps } from '@kogito-apps/ouia-tools';
import {
componentOuiaProps,
OUIAProps
} from '@kogito-apps/ouia-tools/dist/utils/OuiaUtils';
import {
CloudEventFormDefaultValues,
CloudEventFormDriver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ import reduce from 'lodash/reduce';
import isFunction from 'lodash/isFunction';
import uuidv4 from 'uuid';
import jp from 'jsonpath';
import { OUIAProps, componentOuiaProps } from '@kogito-apps/ouia-tools';
import KogitoSpinner from '../KogitoSpinner/KogitoSpinner';
import {
OUIAProps,
componentOuiaProps
} from '@kogito-apps/ouia-tools/dist/utils/OuiaUtils';
import { KogitoSpinner } from '../KogitoSpinner/KogitoSpinner';
import {
KogitoEmptyState,
KogitoEmptyStateType
Expand Down Expand Up @@ -126,7 +129,7 @@ const getRows = (data: any[], columns: ICell[]) => {
return rowList;
};

const DataTable: React.FC<IOwnProps & OUIAProps> = ({
export const DataTable: React.FC<IOwnProps & OUIAProps> = ({
data,
isLoading,
columns,
Expand Down Expand Up @@ -231,5 +234,3 @@ const DataTable: React.FC<IOwnProps & OUIAProps> = ({
</React.Fragment>
);
};

export default DataTable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright 2023 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export * from './DataTable';
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import React from 'react';
import DataTable, { DataTableColumn } from '../DataTable';
import { DataTable, DataTableColumn } from '../DataTable';
import { gql } from 'apollo-boost';
import { MockedProvider } from '@apollo/react-testing';
import { Label } from '@patternfly/react-core/dist/js/components/Label';
Expand All @@ -31,15 +31,15 @@ jest.mock('uuid', () => {
const MockedComponent = (): React.ReactElement => {
return <></>;
};
jest.mock('../../KogitoEmptyState/KogitoEmptyState', () =>
Object.assign(jest.requireActual('../../KogitoEmptyState/KogitoEmptyState'), {
jest.mock('../../KogitoEmptyState', () =>
Object.assign(jest.requireActual('../../KogitoEmptyState'), {
KogitoEmptyState: () => {
return <MockedComponent />;
}
})
);

jest.mock('../../KogitoSpinner/KogitoSpinner');
jest.mock('../../KogitoSpinner');

const data = [
{
Expand Down
Loading