diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml
index 97c829cdd..240cc406f 100644
--- a/.github/workflows/validate.yml
+++ b/.github/workflows/validate.yml
@@ -55,6 +55,7 @@ jobs:
matrix:
package:
[
+ atoms,
core,
core-util,
dashboard,
@@ -112,6 +113,7 @@ jobs:
matrix:
package:
[
+ atoms,
core,
core-util,
dashboard,
diff --git a/package-lock.json b/package-lock.json
index db046e169..4e848a2da 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9743,6 +9743,10 @@
"@types/node": ">=18"
}
},
+ "node_modules/@iot-app-kit/atoms": {
+ "resolved": "packages/atoms",
+ "link": true
+ },
"node_modules/@iot-app-kit/charts": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@iot-app-kit/charts/-/charts-2.1.3.tgz",
@@ -36587,6 +36591,45 @@
"url": "https://github.com/sponsors/wooorm"
}
},
+ "packages/atoms": {
+ "name": "@iot-app-kit/atoms",
+ "version": "12.2.1",
+ "dependencies": {
+ "@cloudscape-design/components": "3.0.693"
+ },
+ "devDependencies": {
+ "@iot-app-kit/eslint-config": "*",
+ "@iot-app-kit/ts-config": "*",
+ "@iot-app-kit/vite-config": "*",
+ "@types/node": "^18.16.18",
+ "@types/react": "^18.2.12",
+ "@types/react-dom": "^18.2.5",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "rimraf": "^5.0.1",
+ "tsx": "^4.19.2",
+ "type-fest": "^4.28.1",
+ "typescript": "^5.5.4",
+ "vite": "^5.4.11"
+ },
+ "peerDependencies": {
+ "react": "^18",
+ "react-dom": "^18"
+ }
+ },
+ "packages/atoms/node_modules/type-fest": {
+ "version": "4.30.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.30.0.tgz",
+ "integrity": "sha512-G6zXWS1dLj6eagy6sVhOMQiLtJdxQBHIA9Z6HFUNLOlr6MFOgzV8wvmidtPONfPtEUv0uZsy77XJNzTAfwPDaA==",
+ "dev": true,
+ "license": "(MIT OR CC0-1.0)",
+ "engines": {
+ "node": ">=16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"packages/core": {
"name": "@iot-app-kit/core",
"version": "12.2.1",
@@ -36695,6 +36738,7 @@
"@cloudscape-design/components": "3.0.693",
"@cloudscape-design/design-tokens": "3.0.42",
"@cloudscape-design/global-styles": "1.0.32",
+ "@iot-app-kit/atoms": "*",
"@iot-app-kit/core": "*",
"@iot-app-kit/core-util": "*",
"@iot-app-kit/react-components": "*",
diff --git a/packages/atoms/.eslintignore b/packages/atoms/.eslintignore
new file mode 100644
index 000000000..76add878f
--- /dev/null
+++ b/packages/atoms/.eslintignore
@@ -0,0 +1,2 @@
+node_modules
+dist
\ No newline at end of file
diff --git a/packages/atoms/.eslintrc.cjs b/packages/atoms/.eslintrc.cjs
new file mode 100644
index 000000000..cdfe9aea2
--- /dev/null
+++ b/packages/atoms/.eslintrc.cjs
@@ -0,0 +1,19 @@
+const base = require('@iot-app-kit/eslint-config');
+
+module.exports = {
+ ...base,
+ root: true,
+ settings: {
+ ...base.settings,
+ 'import/resolver': {
+ ...base.settings['import/resolver'],
+ typescript: {
+ ...base.settings['import/resolver'].typescript,
+ project: ['packages/atoms/tsconfig.json'],
+ },
+ node: {
+ project: ['packages/atoms/tsconfig.json'],
+ },
+ },
+ },
+};
diff --git a/packages/atoms/package.json b/packages/atoms/package.json
new file mode 100644
index 000000000..03702714f
--- /dev/null
+++ b/packages/atoms/package.json
@@ -0,0 +1,55 @@
+{
+ "name": "@iot-app-kit/atoms",
+ "version": "12.2.1",
+ "private": true,
+ "type": "module",
+ "main": "./dist/cjs/index.cjs.js",
+ "module": "./dist/esm/index.js",
+ "types": "./dist/esm/index.d.ts",
+ "exports": {
+ ".": {
+ "@iot-app-kit/development": "./src/index.ts",
+ "default": {
+ "types": "./dist/esm/index.d.ts",
+ "require": "./dist/cjs/index.cjs.js",
+ "import": "./dist/esm/index.js",
+ "default": "./dist/esm/index.js"
+ }
+ }
+ },
+ "scripts": {
+ "build": "NODE_OPTIONS='--import tsx/esm' vite build",
+ "postbuild": "iot-postbuild",
+ "clean": "npx rimraf .cache dist",
+ "clean:turbo": "npx rimraf .turbo",
+ "clean:nuke": "npm run clean && npm run clean:turbo && npx rimraf node_modules",
+ "lint": "eslint . --max-warnings=0 --cache --cache-location .cache/eslint/",
+ "fix": "eslint --fix . --cache --cache-location ./cache/eslint/",
+ "test:typescript": "tsc --noEmit"
+ },
+ "peerDependencies": {
+ "react": "^18",
+ "react-dom": "^18"
+ },
+ "devDependencies": {
+ "@iot-app-kit/eslint-config": "*",
+ "@iot-app-kit/ts-config": "*",
+ "@iot-app-kit/vite-config": "*",
+ "@types/node": "^18.16.18",
+ "@types/react": "^18.2.12",
+ "@types/react-dom": "^18.2.5",
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0",
+ "rimraf": "^5.0.1",
+ "tsx": "^4.19.2",
+ "type-fest": "^4.28.1",
+ "typescript": "^5.5.4",
+ "vite": "^5.4.11"
+ },
+ "dependencies": {
+ "@cloudscape-design/components": "3.0.693"
+ },
+ "iotAppKit": {
+ "scope": "protected"
+ }
+}
diff --git a/packages/atoms/src/buttons/button.tsx b/packages/atoms/src/buttons/button.tsx
new file mode 100644
index 000000000..e855833cd
--- /dev/null
+++ b/packages/atoms/src/buttons/button.tsx
@@ -0,0 +1,15 @@
+import CloudscapeButton from '@cloudscape-design/components/button';
+import { memo, type PropsWithChildren } from 'react';
+
+export interface ButtonProps extends PropsWithChildren {
+ type: 'primary';
+ onClick: VoidFunction;
+}
+
+export const Button = memo(({ type, onClick, children }: ButtonProps) => {
+ return (
+
+ {children}
+
+ );
+});
diff --git a/packages/atoms/src/index.ts b/packages/atoms/src/index.ts
new file mode 100644
index 000000000..c34af0ae5
--- /dev/null
+++ b/packages/atoms/src/index.ts
@@ -0,0 +1 @@
+export { Button, type ButtonProps } from './buttons/button';
diff --git a/packages/atoms/tsconfig.json b/packages/atoms/tsconfig.json
new file mode 100644
index 000000000..2ee437d64
--- /dev/null
+++ b/packages/atoms/tsconfig.json
@@ -0,0 +1,5 @@
+{
+ "$schema": "https://json.schemastore.org/tsconfig",
+ "extends": "@iot-app-kit/ts-config/tsconfig.base.json",
+ "include": ["src"]
+}
diff --git a/packages/atoms/vite.config.ts b/packages/atoms/vite.config.ts
new file mode 100644
index 000000000..f3e12cbf6
--- /dev/null
+++ b/packages/atoms/vite.config.ts
@@ -0,0 +1,5 @@
+import { definePackageConfig } from '@iot-app-kit/vite-config/definePackageConfig';
+
+export default definePackageConfig({
+ iotAppKitPackage: { dirname: __dirname },
+});
diff --git a/packages/dashboard/package.json b/packages/dashboard/package.json
index 7cabe8de3..06b14c244 100644
--- a/packages/dashboard/package.json
+++ b/packages/dashboard/package.json
@@ -90,6 +90,7 @@
"@cloudscape-design/components": "3.0.693",
"@cloudscape-design/design-tokens": "3.0.42",
"@cloudscape-design/global-styles": "1.0.32",
+ "@iot-app-kit/atoms": "*",
"@iot-app-kit/core": "*",
"@iot-app-kit/core-util": "*",
"@iot-app-kit/react-components": "*",
diff --git a/packages/dashboard/src/components/actions/index.tsx b/packages/dashboard/src/components/actions/index.tsx
index c2784d65b..28ed9c6fa 100644
--- a/packages/dashboard/src/components/actions/index.tsx
+++ b/packages/dashboard/src/components/actions/index.tsx
@@ -1,10 +1,10 @@
import isEqual from 'lodash-es/isEqual';
-import { useState } from 'react';
+import { memo, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
-
-import { Box, Button, SpaceBetween } from '@cloudscape-design/components';
+import CloudscapeBox from '@cloudscape-design/components/box';
+import CloudscapeButton from '@cloudscape-design/components/button';
+import CloudscapeSpaceBetween from '@cloudscape-design/components/space-between';
import { getPlugin } from '@iot-app-kit/core';
-
import {
colorChartsLineGrid,
spaceScaledXs,
@@ -13,18 +13,17 @@ import {
} from '@cloudscape-design/design-tokens';
import { onSelectWidgetsAction, onToggleReadOnly } from '../../store/actions';
import { type DashboardSave } from '../../types';
-import CustomOrangeButton from '../customOrangeButton';
import { RefreshRateDropDown } from '../refreshRate/refreshRateDropdown';
import DashboardSettings from './settings';
-
import { convertToDashboardConfiguration } from '../../util/convertToDashbaoardConfiguration';
+import { Button } from '@iot-app-kit/atoms';
-export type ActionsProps = {
+export interface ActionsProps {
readOnly: boolean;
defaultToolbar?: boolean;
onSave?: DashboardSave;
editable?: boolean;
-};
+}
const Divider = () => (
(
/>
);
-const Actions: React.FC
= ({
- editable,
- defaultToolbar = true,
- readOnly,
- onSave,
-}) => {
- const mappedDashboardConfiguration = useSelector(
- convertToDashboardConfiguration,
- isEqual
- );
-
- const [dashboardSettingsVisible, setDashboardSettingsVisible] =
- useState(false);
- const dispatch = useDispatch();
-
- const metricsRecorder = getPlugin('metricsRecorder');
-
- const handleOnSave = () => {
- if (!onSave) return;
- onSave(mappedDashboardConfiguration, readOnly ? 'preview' : 'edit');
-
- metricsRecorder?.record({
- metricName: 'DashboardSave',
- metricValue: 1,
- });
- };
-
- const handleOnReadOnly = () => {
- dispatch(onToggleReadOnly());
- dispatch(
- onSelectWidgetsAction({
- widgets: [],
- union: false,
- })
+const Actions = memo(
+ ({ editable, defaultToolbar = true, readOnly, onSave }: ActionsProps) => {
+ const mappedDashboardConfiguration = useSelector(
+ convertToDashboardConfiguration,
+ isEqual
);
- metricsRecorder?.record({
- // When it is readOnly, it is toggled to Edit; Preview otherwise
- metricName: readOnly ? 'DashboardEdit' : 'DashboardPreview',
- metricValue: 1,
- });
- };
-
- const setSettingVisibility = (visibility: boolean) => {
- setDashboardSettingsVisible(visibility);
-
- metricsRecorder?.record({
- metricName: visibility ? 'DashboardSettingOpen' : 'DashboardSettingClose',
- metricValue: 1,
- });
- };
-
- return (
-
-
-
-
- {editable && }
- {onSave && editable && defaultToolbar && (
-
- )}
- {editable && defaultToolbar && (
- {
+ if (!onSave) return;
+ onSave(mappedDashboardConfiguration, readOnly ? 'preview' : 'edit');
+
+ metricsRecorder?.record({
+ metricName: 'DashboardSave',
+ metricValue: 1,
+ });
+ };
+
+ const handleOnReadOnly = () => {
+ dispatch(onToggleReadOnly());
+ dispatch(
+ onSelectWidgetsAction({
+ widgets: [],
+ union: false,
+ })
+ );
+
+ metricsRecorder?.record({
+ // When it is readOnly, it is toggled to Edit; Preview otherwise
+ metricName: readOnly ? 'DashboardEdit' : 'DashboardPreview',
+ metricValue: 1,
+ });
+ };
+
+ const setSettingVisibility = (visibility: boolean) => {
+ setDashboardSettingsVisible(visibility);
+
+ metricsRecorder?.record({
+ metricName: visibility
+ ? 'DashboardSettingOpen'
+ : 'DashboardSettingClose',
+ metricValue: 1,
+ });
+ };
+
+ return (
+
+
+
+
+ {editable && }
+ {onSave && editable && defaultToolbar && (
+ Save
+ )}
+ {editable && defaultToolbar && (
+
+ )}
+ {editable && !readOnly && (
+ setSettingVisibility(true)}
+ iconName='settings'
+ variant='icon'
+ data-testid='dashboard-visibility-button'
+ ariaLabel='Dashboard settings'
+ />
+ )}
+ setSettingVisibility(false)}
/>
- )}
- {editable && !readOnly && (
-
-
- );
-};
+
+
+
+ );
+ }
+);
export default Actions;
diff --git a/packages/dashboard/src/components/confirmDeleteModal/index.spec.tsx b/packages/dashboard/src/components/confirmDeleteModal/index.spec.tsx
index 222de3dcc..d9a1731c0 100644
--- a/packages/dashboard/src/components/confirmDeleteModal/index.spec.tsx
+++ b/packages/dashboard/src/components/confirmDeleteModal/index.spec.tsx
@@ -1,4 +1,4 @@
-import { render, fireEvent } from '@testing-library/react';
+import { render, fireEvent, screen } from '@testing-library/react';
import ConfirmDeleteModal from './index';
describe('Confirm Delete Modal', () => {
@@ -12,15 +12,15 @@ describe('Confirm Delete Modal', () => {
handleCancel: vi.fn(),
handleSubmit: vi.fn(),
};
- const { getByText, getByTestId } = render(
-
- );
+ render();
// Assert that the header, description, cancel button, and submit button are rendered correctly
- expect(getByText('Confirmation')).toBeInTheDocument();
- expect(getByText('Are you sure you want to submit?')).toBeInTheDocument();
- expect(getByText('Cancel')).toBeInTheDocument();
- expect(getByTestId('custom-orange-button')).toBeInTheDocument();
+ expect(screen.getByText('Confirmation')).toBeInTheDocument();
+ expect(
+ screen.getByText('Are you sure you want to submit?')
+ ).toBeInTheDocument();
+ expect(screen.getByText('Cancel')).toBeInTheDocument();
+ expect(screen.getByText('Submit')).toBeInTheDocument();
});
test('calls handleCancel when cancel button is clicked', () => {
@@ -54,8 +54,8 @@ describe('Confirm Delete Modal', () => {
handleCancel: vi.fn(),
handleSubmit,
};
- const { getByTestId } = render();
- const submitButton = getByTestId('custom-orange-button');
+ render();
+ const submitButton = screen.getByText('Submit');
fireEvent.click(submitButton); // Simulate clicking the submit button
diff --git a/packages/dashboard/src/components/confirmDeleteModal/index.tsx b/packages/dashboard/src/components/confirmDeleteModal/index.tsx
index c9ffbc1ef..126390971 100644
--- a/packages/dashboard/src/components/confirmDeleteModal/index.tsx
+++ b/packages/dashboard/src/components/confirmDeleteModal/index.tsx
@@ -1,60 +1,57 @@
-import { type ReactElement } from 'react';
+import { memo, type ReactElement } from 'react';
+import CloudscapeBox from '@cloudscape-design/components/box';
+import CloudscapeButton from '@cloudscape-design/components/button';
+import CloudscapeModal from '@cloudscape-design/components/modal';
+import CloudscapeSpaceBetween from '@cloudscape-design/components/space-between';
+import { Button } from '@iot-app-kit/atoms';
-import {
- Box,
- Button,
- Modal,
- SpaceBetween,
-} from '@cloudscape-design/components';
-
-import CustomOrangeButton from '../customOrangeButton';
-
-interface ConfirmDeleteModalProps {
+export interface ConfirmDeleteModalProps {
headerTitle: string;
cancelTitle?: string;
submitTitle: string;
description: ReactElement | string;
visible: boolean;
- handleDismiss: () => void;
- handleCancel: () => void;
- handleSubmit: () => void;
+ handleDismiss: VoidFunction;
+ handleCancel: VoidFunction;
+ handleSubmit: VoidFunction;
}
-const ConfirmDeleteModal = ({
- headerTitle,
- cancelTitle = 'Cancel',
- submitTitle,
- description,
- visible,
- handleDismiss,
- handleCancel,
- handleSubmit,
-}: ConfirmDeleteModalProps) => {
- return (
-
-
- {cancelTitle && (
-
-
- }
- >
- {description}
-
- );
-};
+
+
+ }
+ >
+ {description}
+
+ );
+ }
+);
export default ConfirmDeleteModal;
diff --git a/packages/dashboard/src/components/customOrangeButton/index.css b/packages/dashboard/src/components/customOrangeButton/index.css
deleted file mode 100644
index 730e2a3b7..000000000
--- a/packages/dashboard/src/components/customOrangeButton/index.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.btn-custom-primary {
- border-color: var(--colors-background-button) !important;
- background-color: var(--colors-background-button) !important;
-}
-
-.btn-custom-primary:hover {
- border-color: var(--colors-button-hover) !important;
- background-color: var(--colors-button-hover) !important;
-}
diff --git a/packages/dashboard/src/components/customOrangeButton/index.spec.tsx b/packages/dashboard/src/components/customOrangeButton/index.spec.tsx
deleted file mode 100644
index 5a7b0b15b..000000000
--- a/packages/dashboard/src/components/customOrangeButton/index.spec.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { render, fireEvent } from '@testing-library/react';
-import CustomOrangeButton from './index';
-
-describe('CustomOrangeButton', () => {
- const title = 'Test Button';
- const handleClick = vi.fn();
-
- test('renders button with correct title', () => {
- const { getByText } = render(
-
- );
- expect(getByText(title)).toBeInTheDocument();
- });
- test('calls handleClick when button is clicked', () => {
- const { getByRole } = render(
-
- );
- const button = getByRole('button');
- fireEvent.click(button);
- expect(handleClick).toHaveBeenCalledTimes(1);
- });
-});
diff --git a/packages/dashboard/src/components/customOrangeButton/index.tsx b/packages/dashboard/src/components/customOrangeButton/index.tsx
deleted file mode 100644
index 942289364..000000000
--- a/packages/dashboard/src/components/customOrangeButton/index.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import { colorBackgroundHomeHeader } from '@cloudscape-design/design-tokens';
-import { Button, type ButtonProps } from '@cloudscape-design/components';
-
-import './index.css';
-
-const CustomOrangeButton = ({
- title,
- handleClick,
- ...rest
-}: { title: string; handleClick?: () => void } & ButtonProps) => {
- return (
-
- {title}
-
- );
-};
-
-export default CustomOrangeButton;
diff --git a/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/assetModelSelected.tsx b/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/assetModelSelected.tsx
index 322ef48d9..4aaf64b1b 100644
--- a/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/assetModelSelected.tsx
+++ b/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/assetModelSelected.tsx
@@ -1,8 +1,6 @@
-import Box from '@cloudscape-design/components/box';
-import Button from '@cloudscape-design/components/button';
-
+import CloudscapeBox from '@cloudscape-design/components/box';
+import CloudscapeButton from '@cloudscape-design/components/button';
import { spaceScaledXxs } from '@cloudscape-design/design-tokens';
-
import { VerticalDivider } from '../../../../../../components/divider/verticalDivider';
import { type SelectedAssetModel } from '../../useSelectedAssetModel';
import { type IoTSiteWise } from '@aws-sdk/client-iotsitewise';
@@ -11,70 +9,72 @@ import {
type SelectedAsset,
type UpdateSelectedAsset,
} from '../../useSelectedAsset';
-
import { useModalVisibility } from '../../../../../../hooks/useModalVisibility';
import { ResetAssetModelModal } from './resetAssetModel/resetAssetModelModal';
-
import { default as assetModelSvg } from './assetModelIcon.svg';
-
import './assetModelSelected.css';
import { useAssetModel } from '../../../../../../hooks/useAssetModel/useAssetModel';
+import { memo } from 'react';
-type AssetModelSelectedOptions = {
+export interface AssetModelSelectedProps {
selectedAssetModel: SelectedAssetModel;
selectedAsset: SelectedAsset;
setSelectedAsset: UpdateSelectedAsset;
- onResetSelectedAssetModel?: () => void;
+ onResetSelectedAssetModel: VoidFunction;
iotSiteWiseClient: IoTSiteWise;
-};
+}
-export const AssetModelSelected = ({
- selectedAsset,
- selectedAssetModel,
- setSelectedAsset,
- onResetSelectedAssetModel,
- iotSiteWiseClient,
-}: AssetModelSelectedOptions) => {
- const { visible, onHide, onShow } = useModalVisibility();
-
- const { assetModel } = useAssetModel({
- assetModelId: selectedAssetModel?.at(0)?.assetModelId,
+export const AssetModelSelected = memo(
+ ({
+ selectedAsset,
+ selectedAssetModel,
+ setSelectedAsset,
+ onResetSelectedAssetModel,
iotSiteWiseClient,
- });
+ }: AssetModelSelectedProps) => {
+ const { visible, onHide, onShow } = useModalVisibility();
- return (
-
-
-
-
-
- Asset model:
-
-
{assetModel?.at(0)?.path?.[0].name}
-
-
Reset
+ const { assetModel } = useAssetModel({
+ assetModelId: selectedAssetModel?.at(0)?.assetModelId,
+ iotSiteWiseClient,
+ });
+
+ return (
+
+
+
+
+
+ Asset model:
+
+
+ {assetModel?.at(0)?.path?.[0].name}
+
+
+ Reset
+
-
-
-
+
+
+
-
-
-
- );
-};
+
+ );
+ }
+);
diff --git a/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/resetAssetModel/resetAssetModelModal.tsx b/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/resetAssetModel/resetAssetModelModal.tsx
index 4264e8612..ec8e7390e 100644
--- a/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/resetAssetModel/resetAssetModelModal.tsx
+++ b/packages/dashboard/src/components/queryEditor/iotSiteWiseQueryEditor/assetModelDataStreamExplorer/assetModelExplorer/assetModelSelection/resetAssetModel/resetAssetModelModal.tsx
@@ -1,44 +1,46 @@
-import Alert from '@cloudscape-design/components/alert';
-import Box from '@cloudscape-design/components/box';
-import Button from '@cloudscape-design/components/button';
-import Modal from '@cloudscape-design/components/modal';
-import SpaceBetween from '@cloudscape-design/components/space-between';
+import CloudscapeAlert from '@cloudscape-design/components/alert';
+import CloudscapeBox from '@cloudscape-design/components/box';
+import CloudscapeButton from '@cloudscape-design/components/button';
+import CloudscapeModal from '@cloudscape-design/components/modal';
+import CloudscapeSpaceBetween from '@cloudscape-design/components/space-between';
+import { Button } from '@iot-app-kit/atoms';
+import { memo } from 'react';
-import CustomOrangeButton from '../../../../../../../components/customOrangeButton';
-
-export const ResetAssetModelModal = ({
- visible,
- onHide,
- onReset,
-}: {
+export interface ResetAssetModelModalProps {
visible: boolean;
- onHide: () => void;
- onReset?: () => void;
-}) => {
- return (
-
-
-
- Cancel
-
-
-
-
- }
- header='Reset asset model'
- >
- {
+ return (
+
+
+
+ Cancel
+
+
+ Reset
+
+
+
+ }
+ header='Reset asset model'
>
- This action cannot be undone. Once reset, you may associate this
- dashboard with a different asset model.
-
-
- );
-};
+
+ This action cannot be undone. Once reset, you may associate this
+ dashboard with a different asset model.
+
+
+ );
+ }
+);
diff --git a/turbo.json b/turbo.json
index f4948b7a9..30546f315 100644
--- a/turbo.json
+++ b/turbo.json
@@ -2,12 +2,12 @@
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
- "dependsOn": ["^build"],
+ "dependsOn": ["^clean", "clean", "^build"],
"outputs": ["dist/**"],
"outputLogs": "new-only"
},
"@iot-app-kit/dev-env#build": {
- "dependsOn": ["^build"],
+ "dependsOn": ["^clean", "clean", "^build"],
"outputs": [],
"outputLogs": "new-only"
},
@@ -39,7 +39,7 @@
"outputLogs": "full"
},
"pack": {
- "dependsOn": ["^clean", "clean", "build"],
+ "dependsOn": ["build"],
"outputs": ["*.tgz"],
"outputLogs": "new-only"
},
@@ -55,6 +55,7 @@
"inputs": [
"$TURBO_DEFAULT$",
"../../configuration/**/*",
+ "../../packages/atoms/**/*",
"../../packages/core/**/*",
"../../packages/core-util/**/*",
"../../packages/dashboard/**/*",
@@ -73,6 +74,22 @@
"!../../packages/**/.turbo/**/*"
]
},
+ "@iot-app-kit/atoms#lint": {
+ "dependsOn": [],
+ "outputs": [".cache/**"],
+ "outputLogs": "new-only",
+ "inputs": [
+ "$TURBO_DEFAULT$",
+ "../../configuration/**/*",
+ "!../../configuration/**/node_modules/**/*",
+ "!../../configuration/**/.cache/**/*",
+ "!../../configuration/**/.turbo/**/*",
+ "!../../packages/**/node_modules/**/*",
+ "!../../packages/**/dist/**/*",
+ "!../../packages/**/.cache/**/*",
+ "!../../packages/**/.turbo/**/*"
+ ]
+ },
"@iot-app-kit/core#lint": {
"dependsOn": [],
"outputs": [".cache/**"],
@@ -115,6 +132,7 @@
"inputs": [
"$TURBO_DEFAULT$",
"../../configuration/**/*",
+ "../../packages/atoms/**/*",
"../../packages/core/**/*",
"../../packages/core-util/**/*",
"../../packages/data-mocked/**/*",
@@ -297,6 +315,7 @@
"inputs": [
"$TURBO_DEFAULT$",
"../../configuration/**/*",
+ "../../packages/atoms/**/*",
"../../packages/core/**/*",
"../../packages/core-util/**/*",
"../../packages/data-mocked/**/*",
@@ -449,6 +468,7 @@
"inputs": [
"$TURBO_DEFAULT$",
"../../configuration/**/*",
+ "../../packages/atoms/**/*",
"../../packages/core/**/*",
"../../packages/core-util/**/*",
"../../packages/dashboard/**/*",