Skip to content

Commit

Permalink
21169: MINOR Added TraineeCreationStepper (#14)
Browse files Browse the repository at this point in the history
- Added TraineeLoadIcon
- Added TraineeDefineIcon
- Added TraineeAnalysisIcon
- Removed '@/' import alias
- @howso/react-tailwind-flowbite-components@^5.5.1
  • Loading branch information
lancegliser authored Sep 3, 2024
1 parent 9a7beb1 commit ac105ed
Show file tree
Hide file tree
Showing 104 changed files with 468 additions and 254 deletions.
3 changes: 0 additions & 3 deletions jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ module.exports = {
],
coverageReporters: ["text", "cobertura"],
moduleFileExtensions: ["js", "ts", "tsx", "json"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/$1",
},
rootDir: "src",
setupFiles: [
"<rootDir>/../jest/setup/i18n.js",
Expand Down
19 changes: 9 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"peerDependencies": {
"@hookform/error-message": "^2.0.1",
"@howso/openapi-client": "^2.0.1",
"@howso/react-tailwind-flowbite-components": "^5.0.1",
"@howso/react-tailwind-flowbite-components": "^5.5.0",
"jotai": "^2.8.3",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand All @@ -54,7 +54,7 @@
"@fontsource/inter": "^5.0.5",
"@hookform/error-message": "^2.0.1",
"@howso/openapi-client": "^2.0.1",
"@howso/react-tailwind-flowbite-components": "^5.0.1",
"@howso/react-tailwind-flowbite-components": "^5.5.1",
"@howso/ui-internationalization-utils": "^1.0.2",
"@rollup/plugin-typescript": "^11.1.6",
"@storybook/addon-a11y": "^8.1.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
getStringsForI18nBundleFromResource,
type I18nBundle,
} from "@howso/ui-internationalization-utils";
import { Languages } from "@/constants";
import { Languages } from "../../../constants";

const namespace = "FeatureAttributeSample";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Meta, StoryObj } from "@storybook/react";
import { getFormProviderDecorator, withPadding } from "@/storybook";
import { FeatureAttributesConfiguration } from "./FeatureAttributesConfiguration";
import { getFormProviderDecorator, withPadding } from "../../../storybook";
import { getFeaturesAttributesContextDecorator } from "../FeaturesAttributesContext/FeaturesAttributesContext.stories.decorators";
import { InferFeatureAttributeFormValues } from "../utils";
import { FeatureAttributesConfiguration } from "./FeatureAttributesConfiguration";

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
const meta: Meta<typeof FeatureAttributesConfiguration> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { formSpacingYDefault } from "@howso/react-tailwind-flowbite-components";
import { type FC, type ReactNode } from "react";
import { twMerge } from "tailwind-merge";
import { useFormValues } from "../../../hooks";
import {
FeatureAttributeTypeField,
FeatureAttributeUniqueField,
FeatureAttributeSubtypeField,
FeatureAttributeDataTypeField,
FeatureAttributeDateTimeFormatField,
FeatureAttributeIdFeatureField,
FeatureAttributeIsSensitiveField,
FeatureAttributeLocaleField,
FeatureAttributeDateTimeFormatField,
FeatureAttributeObservationalErrorField,
FeatureAttributeNullIsDependentField,
FeatureAttributeObservationalErrorField,
FeatureAttributeSubtypeField,
FeatureAttributeTypeField,
FeatureAttributeUniqueField,
} from "../fields";
import {
FeatureAttributesContinuousNumbersGroup,
FeatureAttributesBoundsGroup,
FeatureAttributesContinuousNumbersGroup,
FeatureAttributesProgrammableGroup,
FeatureAttributesTemporalityGroup,
} from "../groups";
import { useFormValues } from "@/hooks/useFormValues";
import { formSpacingYDefault } from "@howso/react-tailwind-flowbite-components";
import { InferFeatureAttributeFormValues } from "../utils";

export type FeatureAttributesConfigurationProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
getStringsForI18nBundleFromResource,
type I18nBundle,
} from "@howso/ui-internationalization-utils";
import { Languages } from "@/constants";
import { Languages } from "../../../constants";

const namespace = "FeatureAttributesConfigurationIssues";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
getStringsForI18nBundleFromResource,
type I18nBundle,
} from "@howso/ui-internationalization-utils";
import { Languages } from "@/constants";
import { Languages } from "../../../constants";

const namespace = "FeaturesAttributesCompact";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { Meta, StoryObj } from "@storybook/react";
import { FeaturesAttributesCompact } from "./FeaturesAttributesCompact";
import { FeatureAttributes } from "@howso/openapi-client";
import type { Meta, StoryObj } from "@storybook/react";
import { withPadding } from "../../../storybook";
import {
getInferFeatureAttributesRunRequiredFields,
getFeatureAttributesActiveFeatureAtom,
getInferFeatureAttributesParamsAtom,
getInferFeatureAttributesParamsTimeFeatureAtom,
getInferFeatureAttributesRunRequiredFields,
} from "../hooks";
import { withPadding } from "@/storybook";
import { FeatureAttributesIndex } from "../types";
import { FeaturesAttributesCompact } from "./FeaturesAttributesCompact";

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
const meta: Meta<typeof FeaturesAttributesCompact> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { fireEvent, render, screen, within } from "@testing-library/react";
import "@testing-library/jest-dom";
import { fireEvent, render, screen, within } from "@testing-library/react";
import { act } from "react";
import { FeaturesAttributesCompact } from "./FeaturesAttributesCompact";
import { FeaturesAttributesCompactI18nBundle as i18n } from "./FeaturesAttributesCompact.i18n";
import { sleep } from "../../../utils";
import { expectFeatureAttributeConfigurationInContainer } from "../FeatureAttributesConfiguration/FeatureAttributesConfiguration.test";
import { getFeatureAttributesAllowNullsFieldInContainer } from "../fields/FeatureAttributeAllowNullsField/FeatureAttributeAllowNullsField.test";
import { getFeatureAttributeObservationalErrorFieldInElement } from "../fields/FeatureAttributeObservationalErrorField/FeatureAttributeObservationalErrorField.test";
import { getFeatureAttributesTemporalityGroup } from "../groups/FeatureAttributesTemporalityGroup/FeatureAttributesTemporalityGroup.test";
import {
getInferFeatureAttributesRunRequiredFields,
getFeatureAttributesActiveFeatureAtom,
getInferFeatureAttributesParamsAtom,
getInferFeatureAttributesParamsTimeFeatureAtom,
getFeatureAttributesActiveFeatureAtom,
getInferFeatureAttributesRunRequiredFields,
} from "../hooks";
import { sleep } from "@/utils";
import { expectFeatureAttributeConfigurationInContainer } from "../FeatureAttributesConfiguration/FeatureAttributesConfiguration.test";
import { getFeatureAttributeObservationalErrorFieldInElement } from "../fields/FeatureAttributeObservationalErrorField/FeatureAttributeObservationalErrorField.test";
import { getFeatureAttributesAllowNullsFieldInContainer } from "../fields/FeatureAttributeAllowNullsField/FeatureAttributeAllowNullsField.test";
import { FeatureAttributesIndex, InferFeatureAttributesParams } from "../types";
import { getFeatureAttributesTemporalityGroup } from "../groups/FeatureAttributesTemporalityGroup/FeatureAttributesTemporalityGroup.test";
import { FeaturesAttributesCompact } from "./FeaturesAttributesCompact";
import { FeaturesAttributesCompactI18nBundle as i18n } from "./FeaturesAttributesCompact.i18n";

/* eslint jest/no-conditional-expect: "off" */

Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
import {
ErrorBoundary,
FieldLabel,
FieldSelect,
FieldStatic,
UpdateIcon,
WarningIcon,
} from "@howso/react-tailwind-flowbite-components";
import { Alert, Button, Checkbox, getTheme, Tooltip } from "flowbite-react";
import { useAtom, useAtomValue, useSetAtom } from "jotai/react";
import {
type Dispatch,
type SetStateAction,
FC,
useState,
useEffect,
useContext,
useEffect,
useState,
} from "react";
import { Button, Alert, getTheme, Checkbox, Tooltip } from "flowbite-react";
import { FormProvider, SubmitHandler, useForm } from "react-hook-form";
import { useAtom, useAtomValue, useSetAtom } from "jotai/react";
import { useTranslation } from "react-i18next";
import { twMerge } from "tailwind-merge";
import { MapDependentFeatureAttributesIcon } from "../../Icons";
import { FeatureAttributeSample } from "../FeatureAttributeSample";
import { FeatureAttributesConfiguration } from "../FeatureAttributesConfiguration";
import { FeatureAttributesConfigurationIssues } from "../FeatureAttributesConfigurationIssues";
import {
ErrorBoundary,
FieldLabel,
FieldSelect,
FieldStatic,
UpdateIcon,
WarningIcon,
} from "@howso/react-tailwind-flowbite-components";
import {
InferFeatureAttributeFormValues,
getFeatureAttributeConfigurationIssues,
getInferFeatureAttributeParamsFormValuesOnSubmit,
shouldInferAgain as shouldInferFeatureAttributesAgain,
} from "../utils";
import { MapDependentFeatureAttributesIcon } from "@/components/Icons";
FeaturesAttributesContext,
FeaturesAttributesContextProvider,
} from "../FeaturesAttributesContext";
import { FeaturesAttributesDependencies } from "../FeaturesAttributesDependencies";
import {
type FeatureAttributesActiveFeatureAtom,
type InferFeatureAttributesParamsAtom,
type InferFeatureAttributesParamsTimeFeatureAtom,
useFeatureAttributesForm,
getFeatureAttributesFormDefaultValues,
InferFeatureAttributesRunRequiredFieldsAtom,
useFeatureAttributesForm,
} from "../hooks";
import { FeaturesAttributesDependencies } from "../FeaturesAttributesDependencies";
import {
FeaturesAttributesContext,
FeaturesAttributesContextProvider,
} from "../FeaturesAttributesContext";
import { FeatureAttributesConfigurationIssues } from "../FeatureAttributesConfigurationIssues";
getFeatureAttributeConfigurationIssues,
getInferFeatureAttributeParamsFormValuesOnSubmit,
InferFeatureAttributeFormValues,
shouldInferAgain as shouldInferFeatureAttributesAgain,
} from "../utils";
import { FeaturesAttributesCompactI18nBundle as i18n } from "./FeaturesAttributesCompact.i18n";
import { useTranslation } from "react-i18next";

export type FeaturesAttributesCompactProps = {
activeFeatureAtom: FeatureAttributesActiveFeatureAtom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
getStringsForI18nBundleFromResource,
type I18nBundle,
} from "@howso/ui-internationalization-utils";
import { Languages } from "@/constants";
import { Languages } from "../../../constants";

const namespace = "FeaturesAttributesDependencies";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
getStringsForI18nBundleFromResource,
type I18nBundle,
} from "@howso/ui-internationalization-utils";
import { Languages } from "@/constants";
import { Languages } from "../../../constants";

const namespace = "FeaturesAttributesRows";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import type { Meta, StoryObj } from "@storybook/react";
import { FeaturesAttributesRows } from "./FeaturesAttributesRows";
import { FeatureAttributes } from "@howso/openapi-client";
import type { Meta, StoryObj } from "@storybook/react";
import { withPadding } from "../../../storybook";
import {
getInferFeatureAttributesRunRequiredFields,
getFeatureAttributesActiveFeatureAtom,
getInferFeatureAttributesParamsAtom,
getFeatureAttributesOptionsAtom,
getInferFeatureAttributesParamsAtom,
getInferFeatureAttributesParamsTimeFeatureAtom,
getInferFeatureAttributesRunRequiredFields,
} from "../hooks";
import { withPadding } from "@/storybook";
import type { FeatureAttributesIndex } from "../types";
import { FeaturesAttributesRows } from "./FeaturesAttributesRows";

// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
const meta: Meta<typeof FeaturesAttributesRows> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { fireEvent, render, screen, within } from "@testing-library/react";
import "@testing-library/jest-dom";
import { FeaturesAttributesRows } from "./FeaturesAttributesRows";
import { FeaturesAttributesRowsI18nBundle as i18n } from "./FeaturesAttributesRows.i18n";
import { fireEvent, render, screen, within } from "@testing-library/react";
import { expectFeatureAttributeConfigurationInContainer } from "../FeatureAttributesConfiguration/FeatureAttributesConfiguration.test";
import {
getInferFeatureAttributesRunRequiredFields,
getInferFeatureAttributesParamsAtom,
getInferFeatureAttributesParamsTimeFeatureAtom,
getFeatureAttributesActiveFeatureAtom,
getFeatureAttributesOptionsAtom,
getInferFeatureAttributesParamsAtom,
getInferFeatureAttributesParamsTimeFeatureAtom,
getInferFeatureAttributesRunRequiredFields,
} from "../hooks";
import { expectFeatureAttributeConfigurationInContainer } from "../FeatureAttributesConfiguration/FeatureAttributesConfiguration.test";
import type {
FeatureAttributesIndex,
InferFeatureAttributesParams,
} from "../types";
import { FeaturesAttributesRows } from "./FeaturesAttributesRows";
import { FeaturesAttributesRowsI18nBundle as i18n } from "./FeaturesAttributesRows.i18n";

describe("FeaturesAttributesRows", () => {
const featuresAttributes: FeatureAttributesIndex = {
Expand Down
Loading

0 comments on commit ac105ed

Please sign in to comment.