@orchestrator-ui/orchestrator-ui-components 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
6
  "build": "tsup src/index.ts --format esm --dts",
7
- "dev": "yarn build -- --watch",
8
- "lint": "eslint \"**/*.ts*\""
9
- },
7
+ "tsc": "tsc --noEmit",
8
+ "lint": "eslint \"src/**/*.ts*\"",
9
+ "dev": "yarn build -- --watch"
10
+ },
10
11
  "dependencies": {
11
- "@graphql-typed-document-node/core": "3.2.0",
12
- "moment": "2.29.4",
13
- "use-query-params": "2.2.1"
12
+ "@graphql-typed-document-node/core": "3.2.0",
13
+ "moment": "2.29.4",
14
+ "use-query-params": "2.2.1"
14
15
  },
15
16
  "peerDependencies": {
16
- "@elastic/eui": "77.2.2",
17
- "@emotion/css": "^11.11.2",
18
- "@emotion/react": "^11.11.1",
19
- "graphql-request": "5.2.0",
20
- "next": "^13.4.1",
21
- "next-intl": "2.19.0",
22
- "next-query-params": "4.2.2",
23
- "react": "^18.2.0",
24
- "react-query": "3.39.3"
17
+ "@elastic/eui": "77.2.2",
18
+ "@emotion/css": "^11.11.2",
19
+ "@emotion/react": "^11.11.1",
20
+ "graphql-request": "5.2.0",
21
+ "next": "^13.4.1",
22
+ "next-intl": "2.19.0",
23
+ "next-query-params": "4.2.2",
24
+ "react": "^18.2.0",
25
+ "react-query": "3.39.3"
25
26
  },
26
27
  "devDependencies": {
27
28
  "tsup": "^7.1.0",
28
- "@elastic/eui": "77.2.2",
29
- "@emotion/react": "11.11.1"
29
+ "@orchestrator-ui/eslint-config-custom": "*"
30
30
  },
31
31
  "type": "module",
32
32
  "main": "./dist/index.js",
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import { EuiBadge, EuiBadgeProps, EuiText } from '@elastic/eui';
3
3
  import { FC, ReactNode } from 'react';
4
4
  import { TextColor } from '@elastic/eui/src/components/text/text_color';
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
3
  import { EngineStatusBadge } from './EngineStatusBadge';
4
4
 
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import { useOrchestratorTheme } from '../../../hooks/useOrchestratorTheme';
3
3
  import { HeaderBadge } from '../HeaderBadge';
4
4
  import { useEngineStatusQuery } from '../../../hooks/useEngineStatusQuery';
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
3
  import { EnvironmentBadge } from './EnvironmentBadge';
4
4
 
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import { EuiToolTip } from '@elastic/eui';
3
3
  import { useOrchestratorTheme } from '../../../hooks/useOrchestratorTheme';
4
4
  import { HeaderBadge } from '../HeaderBadge';
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
3
  import { HeaderBadge } from './HeaderBadge';
4
4
 
@@ -1,2 +1,2 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  export const Loading = () => <h1>Loading...</h1>;
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
3
  import { OrchestratorSidebar } from './OrchestratorSidebar';
4
4
 
@@ -1,4 +1,3 @@
1
-
2
1
  import React from 'react';
3
2
  import {
4
3
  EuiFormRow,
@@ -53,7 +53,10 @@ export const FlushSettings: FunctionComponent = () => {
53
53
  color: 'success',
54
54
  iconType: 'check',
55
55
  text: (
56
- <p>Cache for cache key "{cacheKey}" flushed successfully</p>
56
+ <p>
57
+ Cache for cache key &quot;{cacheKey}&quot; flushed
58
+ successfully
59
+ </p>
57
60
  ),
58
61
  });
59
62
  });
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import type { Meta } from '@storybook/react';
3
3
  import ListStartPage from './ListStartPage';
4
4
 
@@ -122,7 +122,7 @@ export const ProductBlock = (resourceTypes: ResourceTypeBase, id: number) => {
122
122
  </td>
123
123
  </tr>
124
124
  ) : (
125
- <tr>
125
+ <tr key={i}>
126
126
  <td
127
127
  colSpan={3}
128
128
  style={{
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import {
3
3
  EuiDataGrid,
4
4
  EuiDataGridCellValueElementProps,
@@ -1,5 +1,4 @@
1
-
2
- import React from 'react'
1
+ import React from 'react';
3
2
  import { EuiBasicTable, EuiBasicTableColumn, Pagination } from '@elastic/eui';
4
3
  import { Criteria } from '@elastic/eui/src/components/basic_table/basic_table';
5
4
  import { TableHeaderCell } from './TableHeaderCell';
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import { createContext, FC, ReactNode } from 'react';
3
3
  import {
4
4
  OrchestratorConfig,
@@ -50,7 +50,7 @@ export const useProcessesAttention = () => {
50
50
  );
51
51
  const initialData: ItemsList = {
52
52
  type: 'process',
53
- title: 'Processes that need attention 123',
53
+ title: 'Processes that need attention',
54
54
  items: [],
55
55
  buttonName: 'Show all active processes',
56
56
  };
@@ -1,4 +1,4 @@
1
- import React from 'react'
1
+ import React from 'react';
2
2
  import { FC } from 'react';
3
3
  import { IconProps } from './IconProps';
4
4
 
package/tsconfig.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
- "extends": "tsconfig/base.json",
2
+ "extends": "@orchestrator-ui/tsconfig/base.json",
3
3
  "compilerOptions": {
4
- "jsx": "preserve",
4
+ "strictNullChecks": true
5
5
  },
6
- "include": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "next-env.d.ts"],
6
+ "include": ["**/*.ts", "**/*.tsx"],
7
7
  "exclude": [
8
8
  "node_modules",
9
- "jest.config.ts",
10
- "src/**/*.spec.ts",
11
- "src/**/*.test.ts"
9
+ "**/*.stories.ts",
10
+ "**/*.stories.js",
11
+ "**/*.stories.jsx",
12
+ "**/*.stories.tsx"
12
13
  ]
13
14
  }
package/react-shim.js DELETED
@@ -1,3 +0,0 @@
1
- // Explanation for why this is required: https://esbuild.github.io/content-types/#auto-import-for-jsx
2
- import React from 'react'
3
- export { React }
@@ -1,11 +0,0 @@
1
- import React from 'react'
2
- import { render } from '@testing-library/react';
3
-
4
- import { CustomButton } from './custom-button';
5
-
6
- describe('CustomButton', () => {
7
- it('should render successfully', () => {
8
- const { baseElement } = render(<CustomButton buttonText="testText" />);
9
- expect(baseElement).toBeTruthy();
10
- });
11
- });
@@ -1,24 +0,0 @@
1
- import React, { FC } from 'react';
2
- import { css, SerializedStyles } from '@emotion/react';
3
-
4
- export interface CustomButtonProps {
5
- buttonText: string;
6
- }
7
-
8
- export const CustomButton: FC<CustomButtonProps> = ({ buttonText }) => {
9
- const contentStyles: SerializedStyles = css({
10
- height: '300px',
11
- width: '300px',
12
- backgroundColor: 'lightgrey',
13
- });
14
-
15
- const buttonStyles = css({
16
- backgroundColor: 'grey',
17
- });
18
-
19
- return (
20
- <div css={contentStyles}>
21
- <button css={buttonStyles}>{buttonText}</button>
22
- </div>
23
- );
24
- };