Skip to content

Commit

Permalink
KOGITO-9540: [SWF Dev UI] Specific imports for kogito apps packages (#…
Browse files Browse the repository at this point in the history
…1810)

* KOGITO-9540: [SWF Dev UI] Specific imports for kogito apps

* specific import - components-common

* Specific import consoles-common package

* Specific imports Management-console-shared package
  • Loading branch information
Sara4994 authored Jul 27, 2023
1 parent b74a962 commit 59ed6a1
Show file tree
Hide file tree
Showing 344 changed files with 2,172 additions and 1,601 deletions.
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

0 comments on commit 59ed6a1

Please sign in to comment.