Skip to content
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
  •  
  •  
  •  
7 changes: 0 additions & 7 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
"$schema": "./node_modules/oxlint/configuration_schema.json",
"extends": ["./node_modules/@hitachivantara/uikit-config/oxlint/strict.json"],
"rules": {
"react/function-component-definition": [
"error",
{
"namedComponents": ["arrow-function", "function-declaration"],
"unnamedComponents": "arrow-function"
}
],
"no-restricted-imports": [
Comment thread
zettca marked this conversation as resolved.
"error",
{
Expand Down
4 changes: 2 additions & 2 deletions .storybook/blocks/DocsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { useEffect, useState } from "react";
import { MDXProvider } from "@mdx-js/react";
import {
DocsContainer,
DocsContainerProps,
type DocsContainerProps,
} from "@storybook/addon-docs/blocks";
import { addons } from "storybook/preview-api";
import {
HvProvider,
HvThemeColorMode,
HvTypography,
type HvThemeColorMode,
} from "@hitachivantara/uikit-react-core";

import { getInitialMode } from "../decorators/utils";
Expand Down
2 changes: 1 addition & 1 deletion .storybook/decorators/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef } from "react";
import {
import type {
HvThemeColorMode,
HvThemeStructure,
} from "@hitachivantara/uikit-styles";
Expand Down
2 changes: 1 addition & 1 deletion .storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { create, ThemeVarsPartial } from "storybook/theming";
import { create, type ThemeVarsPartial } from "storybook/theming";
import { pentaho } from "@hitachivantara/uikit-styles";

const { colors } = pentaho;
Expand Down
4 changes: 1 addition & 3 deletions .storybook/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ interface DocsParameters extends Record<string, any> {
// https://github.com/storybookjs/storybook/issues/22860
declare module "@storybook/react-vite" {
interface Parameters
extends StorybookParameters,
A11yParameters,
Record<string, any> {
extends StorybookParameters, A11yParameters, Record<string, any> {
docs?: DocsParameters;
chromatic?: ChromaticParameters;
}
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/components/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { Suspense } from "react";
import {
HvContainer,
HvContainerProps,
theme,
type HvContainerProps,
} from "@hitachivantara/uikit-react-core";

import { useNavigationContext } from "../context/navigation";
import { Loading, LoadingProps } from "./common/Loading";
import { Loading, type LoadingProps } from "./common/Loading";

const useHeaderSpacing = () => {
const { activePath, navigation } = useNavigationContext();
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/pages/Components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useState } from "react";
import {
HvAccordion,
HvActionBar,
HvActionGeneric,
HvAvatar,
HvBannerContent,
HvBreadCrumb,
Expand Down Expand Up @@ -53,11 +52,12 @@ import {
useHvRowSelection,
useHvTable,
useHvTableSticky,
type HvActionGeneric,
} from "@hitachivantara/uikit-react-core";
// eslint-disable-next-line no-restricted-imports
import {
AssetEvent,
makeData,
type AssetEvent,
} from "@hitachivantara/uikit-react-core/src/Table/stories/storiesUtils";
import {
Backwards,
Expand Down
11 changes: 7 additions & 4 deletions apps/app/src/pages/Flow/DashboardPreview/DashboardPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ import {
HvGlobalActions,
HvLoading,
} from "@hitachivantara/uikit-react-core";
import { HvDashboard, HvDashboardProps } from "@hitachivantara/uikit-react-lab";
import {
HvDashboard,
type HvDashboardProps,
} from "@hitachivantara/uikit-react-lab";
import { HvVizProvider } from "@hitachivantara/uikit-react-viz";

import {
DASHBOARDS_STORAGE_KEY,
DashboardSpecs,
DashboardsStorage,
type DashboardSpecs,
type DashboardsStorage,
} from "../types";
import { Renderer, RendererProps } from "./Renderers";
import { Renderer, type RendererProps } from "./Renderers";

interface DashboardConfig extends Pick<HvDashboardProps, "layout" | "cols"> {
items?: RendererProps[] & Record<string, any>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
HvLineChart,
} from "@hitachivantara/uikit-react-viz";

import { NodeData } from "../../types";
import type { NodeData } from "../../types";
import { datasets } from "../../utils";
import { ChartContainer } from "./ChartContainer";
import { Kpi } from "./Kpi";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
HvTable,
HvTableBody,
HvTableCell,
HvTableColumnConfig,
HvTableContainer,
HvTableHead,
HvTableHeader,
Expand All @@ -18,6 +17,7 @@ import {
useHvFilters,
useHvPagination,
useHvSortBy,
type HvTableColumnConfig,
} from "@hitachivantara/uikit-react-core";
import { Ban } from "@hitachivantara/uikit-react-icons";

Expand Down
10 changes: 5 additions & 5 deletions apps/app/src/pages/Flow/Flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import {
} from "@hitachivantara/uikit-react-core";
import { Add, Fail } from "@hitachivantara/uikit-react-icons";
import {
HvDashboardProps,
HvFlow,
HvFlowControls,
HvFlowEmpty,
HvFlowInstance,
HvFlowProps,
HvFlowSidebar,
type HvDashboardProps,
type HvFlowInstance,
type HvFlowProps,
} from "@hitachivantara/uikit-react-lab";

import { edges, nodes, nodeTypes, useNodeGroups } from "./config";
import {
DASHBOARDS_STORAGE_KEY,
DashboardSpecs,
DashboardsStorage,
LAYOUT_COLS,
type DashboardSpecs,
type DashboardsStorage,
} from "./types";
import { buildLayout } from "./utils";

Expand Down
6 changes: 3 additions & 3 deletions apps/app/src/pages/Flow/Nodes/BarChart.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useMemo } from "react";
import {
HvFlowNode,
HvFlowNodeFC,
HvFlowNodeProps,
useFlowInputNodes,
type HvFlowNodeFC,
type HvFlowNodeProps,
} from "@hitachivantara/uikit-react-lab";

import { NodeData } from "../types";
import type { NodeData } from "../types";

export const BarChart: HvFlowNodeFC<NodeData> = (props) => {
const inputNodes = useFlowInputNodes<NodeData>();
Expand Down
10 changes: 5 additions & 5 deletions apps/app/src/pages/Flow/Nodes/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import { Info } from "@hitachivantara/uikit-react-icons";
import {
HvDashboard,
HvFlowNode,
HvFlowNodeFC,
HvFlowNodeInput,
type HvFlowNodeFC,
type HvFlowNodeInput,
} from "@hitachivantara/uikit-react-lab";

import {
DASHBOARDS_STORAGE_KEY,
DashboardSpecs,
DashboardsStorage,
NodeData,
type DashboardSpecs,
type DashboardsStorage,
type NodeData,
} from "../types";
import { toTitleCase } from "../utils";

Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/pages/Flow/Nodes/Dataset.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HvFlowNode, HvFlowNodeFC } from "@hitachivantara/uikit-react-lab";
import { HvFlowNode, type HvFlowNodeFC } from "@hitachivantara/uikit-react-lab";

export const Dataset: HvFlowNodeFC = (props) => {
return (
Expand Down
6 changes: 3 additions & 3 deletions apps/app/src/pages/Flow/Nodes/DonutChart.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useMemo } from "react";
import {
HvFlowNode,
HvFlowNodeFC,
HvFlowNodeProps,
useFlowInputNodes,
type HvFlowNodeFC,
type HvFlowNodeProps,
} from "@hitachivantara/uikit-react-lab";

import { NodeData } from "../types";
import type { NodeData } from "../types";

export const DonutChart: HvFlowNodeFC = (props) => {
const inputNodes = useFlowInputNodes<NodeData>();
Expand Down
6 changes: 3 additions & 3 deletions apps/app/src/pages/Flow/Nodes/Kpi.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useMemo } from "react";
import {
HvFlowNode,
HvFlowNodeFC,
HvFlowNodeProps,
useFlowInputNodes,
type HvFlowNodeFC,
type HvFlowNodeProps,
} from "@hitachivantara/uikit-react-lab";

import { NodeData } from "../types";
import type { NodeData } from "../types";

export const Kpi: HvFlowNodeFC = (props) => {
const inputNodes = useFlowInputNodes<NodeData>();
Expand Down
6 changes: 3 additions & 3 deletions apps/app/src/pages/Flow/Nodes/LineChart.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { useMemo } from "react";
import {
HvFlowNode,
HvFlowNodeFC,
HvFlowNodeProps,
useFlowInputNodes,
type HvFlowNodeFC,
type HvFlowNodeProps,
} from "@hitachivantara/uikit-react-lab";

import { NodeData } from "../types";
import type { NodeData } from "../types";

export const LineChart: HvFlowNodeFC = (props) => {
const inputNodes = useFlowInputNodes<NodeData>();
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/pages/Flow/Nodes/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useMemo } from "react";
import {
HvFlowNode,
HvFlowNodeFC,
HvFlowNodeProps,
type HvFlowNodeFC,
type HvFlowNodeProps,
} from "@hitachivantara/uikit-react-lab";

export const Table: HvFlowNodeFC = (props) => {
Expand Down
7 changes: 5 additions & 2 deletions apps/app/src/pages/Flow/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import {
LineChartAlt,
Storage,
} from "@hitachivantara/uikit-react-icons";
import { HvFlowNodeGroups, HvFlowProps } from "@hitachivantara/uikit-react-lab";
import type {
HvFlowNodeGroups,
HvFlowProps,
} from "@hitachivantara/uikit-react-lab";

import { BarChart } from "./Nodes/BarChart";
import { Dashboard } from "./Nodes/Dashboard";
Expand All @@ -13,7 +16,7 @@ import { DonutChart } from "./Nodes/DonutChart";
import { Kpi } from "./Nodes/Kpi";
import { LineChart } from "./Nodes/LineChart";
import { Table } from "./Nodes/Table";
import { NodeGroup } from "./types";
import type { NodeGroup } from "./types";
import { useDatasets } from "./utils";

/** Node groups */
Expand Down
8 changes: 5 additions & 3 deletions apps/app/src/pages/Flow/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
HvDashboardProps,
HvFlowInstance,
} from "@hitachivantara/uikit-react-lab";
Expand All @@ -12,8 +12,10 @@ export const LAYOUT_COLS = 12;

type Node = NonNullable<ReturnType<HvFlowInstance<NodeData>["getNode"]>>;

export interface DashboardSpecs
extends Pick<HvDashboardProps, "layout" | "cols"> {
export interface DashboardSpecs extends Pick<
HvDashboardProps,
"layout" | "cols"
> {
items: Node[];
}

Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/pages/Flow/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { loadArrow } from "arquero";
import useSWR from "swr";

import { DashboardSpecs, LAYOUT_COLS } from "./types";
import { LAYOUT_COLS, type DashboardSpecs } from "./types";

export const datasets = [
{
Expand Down
8 changes: 4 additions & 4 deletions apps/default-app/src/pages/Notifications/Notifications.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { useState } from "react";
import {
HvAppShellEventNotification,
HvAppShellEventNotificationTrigger,
HvAppShellEventNotificationType,
type HvAppShellEventNotification,
type HvAppShellEventNotificationType,
} from "@hitachivantara/app-shell-events";
import {
HvBannerVariant,
HvButton,
HvCheckBox,
HvGlobalActions,
HvGrid,
HvInput,
HvSnackbarVariant,
HvTypography,
type HvBannerVariant,
type HvSnackbarVariant,
} from "@hitachivantara/uikit-react-core";

const Notifications = () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/default-app/src/pages/ServicesDemo/ServicesDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC, useMemo, useState } from "react";
import { useMemo, useState, type FC } from "react";
import { useService, useServices } from "@hitachivantara/app-shell-services";
import { DynamicHooksEvaluator } from "@hitachivantara/app-shell-shared";
import {
Expand All @@ -12,7 +12,7 @@ import {

import { MainContainer } from "../../components/MainContainer";
import { ServiceDefinitions } from "../../services/serviceDefinition";
import {
import type {
MessageService,
NotificationComponentProps,
SimpleDataService,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC } from "react";
import type { FC } from "react";
import { HvContainer, HvTypography } from "@hitachivantara/uikit-react-core";

const ShouldBeVisible: FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FC } from "react";
import type { FC } from "react";
import { HvContainer, HvTypography } from "@hitachivantara/uikit-react-core";

const ShouldNotBeVisible: FC = () => {
Expand Down
4 changes: 2 additions & 2 deletions apps/default-app/src/pages/Theming/Theming.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import {
HvAppShellEventTheme,
HvAppShellEventThemeTrigger,
type HvAppShellEventTheme,
} from "@hitachivantara/app-shell-events";
import {
HvButton,
HvGlobalActions,
HvGrid,
HvThemeColorMode,
HvTypography,
useTheme,
type HvThemeColorMode,
} from "@hitachivantara/uikit-react-core";

function Button({ colorMode }: { colorMode: HvThemeColorMode }) {
Expand Down
2 changes: 1 addition & 1 deletion apps/default-app/src/providers/AsyncProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PropsWithChildren, useMemo } from "react";
import { useMemo, type PropsWithChildren } from "react";

import { AsyncContext } from "./shared/asyncContext";

Expand Down
Loading
Loading