@vention/machine-apps-components 0.0.0-dev.4527.a3d343ca7

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.
Files changed (50) hide show
  1. package/README.md +859 -0
  2. package/index.esm.d.ts +1 -0
  3. package/index.esm.js +3658 -0
  4. package/package.json +40 -0
  5. package/src/constants/z-index.d.ts +8 -0
  6. package/src/contexts/i18n-context.d.ts +12 -0
  7. package/src/contexts/i18n-provider.d.ts +13 -0
  8. package/src/hooks/use-auto-scroll-input.d.ts +6 -0
  9. package/src/hooks/use-i18n.d.ts +19 -0
  10. package/src/i18n/config.d.ts +8 -0
  11. package/src/i18n/locales/de.d.ts +131 -0
  12. package/src/i18n/locales/en.d.ts +131 -0
  13. package/src/i18n/locales/es.d.ts +131 -0
  14. package/src/i18n/locales/fr.d.ts +131 -0
  15. package/src/i18n/utils.d.ts +13 -0
  16. package/src/index.d.ts +27 -0
  17. package/src/lib/action-button/action-button.d.ts +14 -0
  18. package/src/lib/action-button/action-button.stories.d.ts +15 -0
  19. package/src/lib/file-upload-panel/file-upload-panel.d.ts +23 -0
  20. package/src/lib/file-upload-panel/file-upload-panel.stories.d.ts +12 -0
  21. package/src/lib/i18n-settings/i18n-settings.d.ts +8 -0
  22. package/src/lib/i18n-settings/i18n-settings.stories.d.ts +7 -0
  23. package/src/lib/logs/log-filter-form.d.ts +9 -0
  24. package/src/lib/logs/logs-pagination.d.ts +8 -0
  25. package/src/lib/logs/logs-panel.d.ts +59 -0
  26. package/src/lib/logs/logs-panel.stories.d.ts +6 -0
  27. package/src/lib/logs/logs-table.d.ts +15 -0
  28. package/src/lib/navigation-bar/navigation-bar-item.d.ts +17 -0
  29. package/src/lib/navigation-bar/navigation-bar.d.ts +20 -0
  30. package/src/lib/navigation-bar/navigation-bar.stories.d.ts +6 -0
  31. package/src/lib/navigation-bar/navigation-confirmation-modal.d.ts +7 -0
  32. package/src/lib/navigation-bar/password-protection-modal.d.ts +8 -0
  33. package/src/lib/navigation-bar/password-protection-modal.stories.d.ts +6 -0
  34. package/src/lib/navigation-bar/time-label.d.ts +6 -0
  35. package/src/lib/product-form-list/product-form-list.d.ts +27 -0
  36. package/src/lib/product-form-list/product-form-list.stories.d.ts +18 -0
  37. package/src/lib/settings-page/settings-page.d.ts +11 -0
  38. package/src/lib/settings-page/settings-page.stories.d.ts +9 -0
  39. package/src/lib/sidebar/sidebar.d.ts +18 -0
  40. package/src/lib/sidebar/sidebar.stories.d.ts +8 -0
  41. package/src/lib/status-top-bar/status-top-bar-button.d.ts +17 -0
  42. package/src/lib/status-top-bar/status-top-bar.d.ts +27 -0
  43. package/src/lib/status-top-bar/status-top-bar.stories.d.ts +10 -0
  44. package/src/lib/step-progress-circle/step-progress-circle.d.ts +14 -0
  45. package/src/lib/step-progress-circle/step-progress-circle.stories.d.ts +16 -0
  46. package/src/lib/utils/api-config-utils.d.ts +34 -0
  47. package/src/lib/utils/device-utils.d.ts +14 -0
  48. package/src/test-setup.d.ts +1 -0
  49. package/src/test-utils.d.ts +13 -0
  50. package/src/types/user-level.d.ts +6 -0
@@ -0,0 +1,15 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { ActionButton } from "./action-button";
3
+ declare const meta: Meta<typeof ActionButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ActionButton>;
6
+ export declare const Home: Story;
7
+ export declare const Start: Story;
8
+ export declare const Stop: Story;
9
+ export declare const CustomDispense: Story;
10
+ export declare const CustomIndexer: Story;
11
+ export declare const Destructive: Story;
12
+ export declare const Disabled: Story;
13
+ export declare const MachineControlExample: Story;
14
+ export declare const SmallSize: Story;
15
+ export declare const LargeSize: Story;
@@ -0,0 +1,23 @@
1
+ export interface UploadedFile {
2
+ id: string;
3
+ name: string;
4
+ size: number;
5
+ state: "indeterminate" | "success" | "error";
6
+ errorMessage?: string;
7
+ }
8
+ export interface FileUploadPanelProps {
9
+ title?: string;
10
+ files: UploadedFile[];
11
+ onFilesSelect: (files: FileList) => string[];
12
+ onFileRemove: (fileId: string) => void;
13
+ onFileRetry?: (fileId: string) => void;
14
+ onFileCancel?: (fileId: string) => void;
15
+ fileCriteriaDescription?: string;
16
+ dropzoneTitle?: string;
17
+ disabled?: boolean;
18
+ maxHeight?: number | string;
19
+ }
20
+ export declare function FileUploadPanel({ title, files, onFilesSelect, onFileRemove, onFileRetry, onFileCancel, fileCriteriaDescription, dropzoneTitle, disabled, maxHeight, }: FileUploadPanelProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare namespace FileUploadPanel {
22
+ var displayName: string;
23
+ }
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { FileUploadPanel } from "./file-upload-panel";
3
+ declare const meta: Meta<typeof FileUploadPanel>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof FileUploadPanel>;
6
+ export declare const Empty: Story;
7
+ export declare const WithFiles: Story;
8
+ export declare const WithUploadingFile: Story;
9
+ export declare const WithError: Story;
10
+ export declare const Disabled: Story;
11
+ export declare const WithMaxHeight: Story;
12
+ export declare const Interactive: Story;
@@ -0,0 +1,8 @@
1
+ export interface I18nSettingsProps {
2
+ className?: string;
3
+ layout?: "stacked" | "horizontal";
4
+ }
5
+ export declare const I18nSettings: {
6
+ ({ className, layout }: I18nSettingsProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { I18nSettings } from "./i18n-settings";
3
+ declare const meta: Meta<typeof I18nSettings>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof I18nSettings>;
6
+ export declare const Default: Story;
7
+ export declare const Horizontal: Story;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { LogFilterFormValues } from "./logs-panel";
3
+ interface LogFilterFormProps {
4
+ onFilterChange?: (filters: LogFilterFormValues) => void;
5
+ onReset?: () => void;
6
+ initialFilters?: Partial<LogFilterFormValues>;
7
+ }
8
+ export declare const LogFilterForm: import("react").MemoExoticComponent<({ onFilterChange, onReset, initialFilters }: LogFilterFormProps) => import("react/jsx-runtime").JSX.Element>;
9
+ export default LogFilterForm;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface LogsPaginationProps {
3
+ currentPage: number;
4
+ totalPages: number;
5
+ onPageChange: (page: number) => void;
6
+ }
7
+ export declare const LogsPagination: import("react").MemoExoticComponent<({ currentPage, totalPages, onPageChange }: LogsPaginationProps) => import("react/jsx-runtime").JSX.Element>;
8
+ export default LogsPagination;
@@ -0,0 +1,59 @@
1
+ import { ReactNode } from "react";
2
+ export type LogType = "error" | "warning" | "info";
3
+ export interface LogEntry {
4
+ id: string;
5
+ date: string;
6
+ level: LogType;
7
+ code: string;
8
+ message: string;
9
+ description: string;
10
+ }
11
+ export type SortOrder = "latest" | "oldest";
12
+ export interface LogFilterFormValues {
13
+ fromDate?: string;
14
+ toDate?: string;
15
+ logType?: LogType;
16
+ sortOrder: SortOrder;
17
+ }
18
+ export declare const formatDateToInput: (date: Date) => string;
19
+ export declare const parseLogDate: (dateStr: string) => number;
20
+ export type PaginationMode = "pagination" | "infinite-scroll" | "none";
21
+ export interface PaginationConfig {
22
+ mode: PaginationMode;
23
+ pageSize?: number;
24
+ initialPage?: number;
25
+ }
26
+ export interface FetchParams {
27
+ filters: LogFilterFormValues;
28
+ page: number;
29
+ pageSize: number;
30
+ }
31
+ export interface FetchResult {
32
+ logs: LogEntry[];
33
+ totalCount: number;
34
+ totalPages: number;
35
+ currentPage: number;
36
+ hasMorePages: boolean;
37
+ }
38
+ export type DataFetcher = (params: FetchParams) => Promise<FetchResult>;
39
+ export interface LogsPanelHandle {
40
+ refresh: () => Promise<void>;
41
+ resetFilters: () => void;
42
+ applyFilters: (filters: Partial<LogFilterFormValues>) => void;
43
+ getCurrentFilters: () => LogFilterFormValues;
44
+ exportLogs: () => LogEntry[];
45
+ }
46
+ interface LogsPanelProps {
47
+ dataFetcher: DataFetcher;
48
+ initialFilters?: Partial<LogFilterFormValues>;
49
+ onError?: (error: unknown) => void;
50
+ pagination?: PaginationConfig;
51
+ onFilterChange?: (filters: LogFilterFormValues) => void;
52
+ onLogClick?: (log: LogEntry) => void;
53
+ className?: string;
54
+ tableHeight?: string | number;
55
+ emptyStateMessage?: string;
56
+ emptyStateIcon?: ReactNode;
57
+ }
58
+ export declare const LogsPanel: import("react").ForwardRefExoticComponent<LogsPanelProps & import("react").RefAttributes<LogsPanelHandle>>;
59
+ export default LogsPanel;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { LogsPanel } from "./logs-panel";
3
+ declare const meta: Meta<typeof LogsPanel>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof LogsPanel>;
6
+ export declare const Default: Story;
@@ -0,0 +1,15 @@
1
+ import type { LogEntry } from "./logs-panel";
2
+ import { ReactNode } from "react";
3
+ interface LogsTableProps {
4
+ logs?: LogEntry[];
5
+ isLoading?: boolean;
6
+ error?: string | null;
7
+ onLoadMoreLogs?: () => void;
8
+ hasMoreLogs?: boolean;
9
+ onLogClick?: (log: LogEntry) => void;
10
+ tableHeight?: string | number;
11
+ emptyStateMessage?: string;
12
+ emptyStateIcon?: ReactNode;
13
+ }
14
+ export declare const LogsTable: import("react").MemoExoticComponent<({ logs, isLoading, error, onLoadMoreLogs, hasMoreLogs, onLogClick, tableHeight, emptyStateMessage, emptyStateIcon, }: LogsTableProps) => import("react/jsx-runtime").JSX.Element>;
15
+ export default LogsTable;
@@ -0,0 +1,17 @@
1
+ import { useLocation } from "react-router-dom";
2
+ import { ReactNode } from "react";
3
+ export interface NavigationItemProps {
4
+ id: string;
5
+ label: string;
6
+ path: string;
7
+ icon: ReactNode;
8
+ iconDisabled?: ReactNode;
9
+ onClick?: () => void;
10
+ password?: string;
11
+ isDisabled?: boolean;
12
+ location?: ReturnType<typeof useLocation>;
13
+ handleNavigate?: (path: string) => void;
14
+ currentPassword?: string | null;
15
+ setPasswordProtectedItem?: (item: NavigationItemProps) => void;
16
+ }
17
+ export declare const NavigationBarItem: (props: NavigationItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from "react";
2
+ import { NavigationItemProps } from "./navigation-bar-item";
3
+ export type NavigationBarVariant = "fixed" | "flex";
4
+ export interface NavigationBarProps {
5
+ children: ReactNode;
6
+ showTimer?: boolean;
7
+ onControlCenterClick?: () => void;
8
+ onSupportClick?: () => void;
9
+ disabledNavigationItems?: string[];
10
+ isControlCenterDisabled?: boolean;
11
+ isSupportDisabled?: boolean;
12
+ showControlCenterButton?: boolean;
13
+ showSupportButton?: boolean;
14
+ /** Layout variant: "fixed" positions the bar fixed to viewport bottom (default), "flex" uses relative positioning for flex layouts */
15
+ variant?: NavigationBarVariant;
16
+ }
17
+ export declare const NavigationBar: ((props: NavigationBarProps) => import("react/jsx-runtime").JSX.Element) & {
18
+ Item: (props: NavigationItemProps) => import("react/jsx-runtime").JSX.Element;
19
+ };
20
+ export default NavigationBar;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { NavigationBar } from "./navigation-bar";
3
+ declare const meta: Meta<typeof NavigationBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof NavigationBar>;
6
+ export declare const Default: Story;
@@ -0,0 +1,7 @@
1
+ interface NavigationConfirmationModalProps {
2
+ isOpen: boolean;
3
+ destination: "controlCenter" | "remoteSupport" | null;
4
+ onClose: () => void;
5
+ }
6
+ export declare const NavigationConfirmationModal: (props: NavigationConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ interface PasswordProtectionModalProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ onSuccess: () => void;
5
+ correctPassword: string;
6
+ }
7
+ export declare const PasswordProtectionModal: (props: PasswordProtectionModalProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { PasswordProtectionModal } from "./password-protection-modal";
3
+ declare const meta: Meta<typeof PasswordProtectionModal>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof PasswordProtectionModal>;
6
+ export declare const Default: Story;
@@ -0,0 +1,6 @@
1
+ export interface TimeLabelProps {
2
+ className?: string;
3
+ color?: string;
4
+ }
5
+ export declare function TimeLabel({ className, color }: TimeLabelProps): import("react/jsx-runtime").JSX.Element;
6
+ export default TimeLabel;
@@ -0,0 +1,27 @@
1
+ type FieldType = "text" | "number" | "select";
2
+ export interface FieldDefinition {
3
+ name: string;
4
+ label: string;
5
+ type: FieldType;
6
+ options?: {
7
+ value: string;
8
+ label: string;
9
+ }[];
10
+ min?: number;
11
+ max?: number;
12
+ }
13
+ export interface ProductFormListProps<T> {
14
+ title?: string;
15
+ items: T[];
16
+ onDelete: (id: string) => Promise<void>;
17
+ onSubmit: (formData: Partial<T>) => Promise<boolean>;
18
+ getItemId: (item: T) => string;
19
+ fields: FieldDefinition[];
20
+ maxHeight?: string | number;
21
+ }
22
+ declare function ProductFormListComponent<T extends Record<string, unknown>>({ title, items, onDelete, onSubmit, getItemId, fields, maxHeight, }: ProductFormListProps<T>): import("react/jsx-runtime").JSX.Element;
23
+ declare namespace ProductFormListComponent {
24
+ var displayName: string;
25
+ }
26
+ export declare const ProductFormList: typeof ProductFormListComponent;
27
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { ProductFormList } from "./product-form-list";
3
+ interface Part {
4
+ [key: string]: unknown;
5
+ id: string;
6
+ partNumber: string;
7
+ description: string;
8
+ quantity: number;
9
+ material: string;
10
+ cycleTime: number;
11
+ }
12
+ declare const meta: Meta<typeof ProductFormList<Part>>;
13
+ export default meta;
14
+ type Story = StoryObj<typeof ProductFormList<Part>>;
15
+ export declare const Default: Story;
16
+ export declare const Empty: Story;
17
+ export declare const WithMaxHeight: Story;
18
+ export declare const Interactive: Story;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ import { SidebarItem } from "../sidebar/sidebar";
3
+ export interface SettingsPageProps {
4
+ sidebarItems: SidebarItem[];
5
+ children: ReactNode;
6
+ sidebarWidth?: number | string;
7
+ }
8
+ export declare const SettingsPage: {
9
+ ({ sidebarItems, children, sidebarWidth }: SettingsPageProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { SettingsPage } from "./settings-page";
3
+ declare const meta: Meta<typeof SettingsPage>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof SettingsPage>;
6
+ export declare const Default: Story;
7
+ export declare const NarrowSidebar: Story;
8
+ export declare const WideSidebar: Story;
9
+ export declare const PercentageWidth: Story;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { type IconType } from "@vention/machine-ui";
3
+ export type SidebarVariant = "card" | "accent";
4
+ export interface SidebarItem {
5
+ id: string;
6
+ title: string;
7
+ subtitle?: string;
8
+ icon?: React.ReactNode;
9
+ iconType?: IconType;
10
+ state: "pending" | "active" | "completed" | "disabled";
11
+ onClick?: () => void;
12
+ }
13
+ export interface SidebarProps {
14
+ items: SidebarItem[];
15
+ /** Style variant: "card" (default) shows full bordered cards, "accent" shows left border accent only */
16
+ variant?: SidebarVariant;
17
+ }
18
+ export declare const Sidebar: (props: SidebarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { Sidebar } from "./sidebar";
3
+ declare const meta: Meta<typeof Sidebar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Sidebar>;
6
+ export declare const Default: Story;
7
+ export declare const CardVariant: Story;
8
+ export declare const AccentVariant: Story;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from "react";
2
+ export interface StatusTopBarButtonProps {
3
+ id: string;
4
+ label: string;
5
+ onClick?: () => void;
6
+ backgroundColor?: string;
7
+ backgroundColorHover?: string;
8
+ borderColor?: string;
9
+ textColor?: string;
10
+ width?: number;
11
+ height?: number;
12
+ icon?: ReactNode;
13
+ iconDisabled?: ReactNode;
14
+ disabled?: boolean;
15
+ visible?: boolean;
16
+ }
17
+ export declare const StatusTopBarButton: (props: StatusTopBarButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from "react";
2
+ export interface ButtonConfig {
3
+ id: string;
4
+ label: string;
5
+ onClick?: () => void;
6
+ visible?: boolean;
7
+ disabled?: boolean;
8
+ backgroundColor?: string;
9
+ backgroundColorHover?: string;
10
+ borderColor?: string;
11
+ textColor?: string;
12
+ width?: number;
13
+ height?: number;
14
+ icon?: ReactNode;
15
+ iconDisabled?: ReactNode;
16
+ }
17
+ export type StatusTopBarVariant = "light" | "dark";
18
+ export interface StatusTopBarProps {
19
+ status?: {
20
+ label: string;
21
+ color: string;
22
+ };
23
+ buttonConfigs?: ButtonConfig[];
24
+ variant?: StatusTopBarVariant;
25
+ }
26
+ export declare const StatusTopBar: (props: StatusTopBarProps) => import("react/jsx-runtime").JSX.Element;
27
+ export default StatusTopBar;
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { StatusTopBar } from "./status-top-bar";
3
+ declare const meta: Meta<typeof StatusTopBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof StatusTopBar>;
6
+ export declare const Default: Story;
7
+ export declare const DarkVariant: Story;
8
+ export declare const DarkVariantRunning: Story;
9
+ export declare const DarkVariantError: Story;
10
+ export declare const Error: Story;
@@ -0,0 +1,14 @@
1
+ export type StepProgressCircleVariant = "default" | "success" | "error" | "warning";
2
+ export interface StepProgressCircleProps {
3
+ currentStep: number;
4
+ totalSteps: number;
5
+ title?: string;
6
+ variant?: StepProgressCircleVariant;
7
+ size?: number;
8
+ strokeWidth?: number;
9
+ showTitle?: boolean;
10
+ }
11
+ export declare function StepProgressCircle({ currentStep, totalSteps, title, variant, size, strokeWidth, showTitle, }: StepProgressCircleProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare namespace StepProgressCircle {
13
+ var displayName: string;
14
+ }
@@ -0,0 +1,16 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { StepProgressCircle } from "./step-progress-circle";
3
+ declare const meta: Meta<typeof StepProgressCircle>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof StepProgressCircle>;
6
+ export declare const Default: Story;
7
+ export declare const InProgress: Story;
8
+ export declare const Complete: Story;
9
+ export declare const WithError: Story;
10
+ export declare const Warning: Story;
11
+ export declare const CustomTitle: Story;
12
+ export declare const NoTitle: Story;
13
+ export declare const SmallSize: Story;
14
+ export declare const LargeSize: Story;
15
+ export declare const AllVariants: Story;
16
+ export declare const ProgressStages: Story;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * This module provides utilities for generating API base URLs for machine apps.
3
+ * It automatically detects the environment and returns the appropriate URL:
4
+ * - Local/Edge: http://hostname:8000
5
+ * - Deployed: Uses passthrough URL for digital twin infrastructure
6
+ */
7
+ interface ApiConfigOptions {
8
+ /**
9
+ * The name of the process/service (e.g., "ai-operator", "my-service")
10
+ */
11
+ processName: string;
12
+ /**
13
+ * Optional custom port for edge/local development (default: 8000)
14
+ */
15
+ edgePort?: number;
16
+ }
17
+ /**
18
+ * Checks if the current environment is running on edge (local controller)
19
+ * @returns true if running on edge, false otherwise
20
+ */
21
+ export declare function isOnEdge(): boolean;
22
+ /**
23
+ * Gets the API base URL for the specified process/service
24
+ * @param options - Configuration options including process name and optional edge port
25
+ * @returns The API base URL for all backend API calls
26
+ * @example
27
+ * ```ts
28
+ * const apiUrl = getApiBaseUrl({ processName: "ai-operator" })
29
+ * // Returns: http://192.168.1.100:8000 (on edge)
30
+ * // or https://digital-twin.../passthrough/.../ai-operator (deployed)
31
+ * ```
32
+ */
33
+ export declare function getApiBaseUrl(options: ApiConfigOptions): string;
34
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Detects if the current device has touch screen capabilities
3
+ * @returns true if the device supports touch events, false otherwise
4
+ */
5
+ export declare const isTouchScreenDevice: () => boolean;
6
+ /**
7
+ * Closes the custom UI by sending a message to the parent window
8
+ */
9
+ export declare const closeCustomUi: () => void;
10
+ /**
11
+ * Navigates to a specific route in the Control Center
12
+ * @param route - The route to navigate to (remoteSupport or controlCenterHomepage)
13
+ */
14
+ export declare const navigateControlCenter: (route: "remoteSupport" | "controlCenterHomepage") => void;
@@ -0,0 +1 @@
1
+ import "@testing-library/jest-dom";
@@ -0,0 +1,13 @@
1
+ import { ReactElement } from "react";
2
+ import { RenderOptions, RenderResult } from "@testing-library/react";
3
+ interface CustomRenderOptions extends Omit<RenderOptions, "wrapper"> {
4
+ initialRoute?: string;
5
+ i18nConfig?: {
6
+ locale?: string;
7
+ unitSystem?: "metric" | "imperial";
8
+ timezone?: string | "auto";
9
+ supportedLanguages?: string[];
10
+ };
11
+ }
12
+ export declare const renderWithProviders: (ui: ReactElement, { initialRoute, i18nConfig, ...renderOptions }?: CustomRenderOptions) => RenderResult;
13
+ export * from "@testing-library/react";
@@ -0,0 +1,6 @@
1
+ export declare enum UserLevel {
2
+ Operator = 1,
3
+ Maintenance = 2,
4
+ Admin = 3
5
+ }
6
+ export declare function hasSufficientLevel(requiredLevel: UserLevel, currentLevel: UserLevel): boolean;