@vention/machine-apps-components 0.4.0 → 0.4.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/index.esm.js +629 -115
- package/package.json +2 -2
- package/src/hooks/use-auto-scroll-input.d.ts +6 -0
- package/src/i18n/locales/de.d.ts +13 -0
- package/src/i18n/locales/en.d.ts +13 -0
- package/src/i18n/locales/es.d.ts +13 -0
- package/src/i18n/locales/fr.d.ts +13 -0
- package/src/index.d.ts +3 -4
- package/src/lib/navigation-bar/navigation-bar.d.ts +3 -0
- package/src/lib/product-form-list/product-form-list.d.ts +27 -0
- package/src/lib/product-form-list/product-form-list.stories.d.ts +18 -0
- package/src/lib/sidebar/sidebar.d.ts +3 -0
- package/src/lib/sidebar/sidebar.stories.d.ts +2 -0
- package/src/lib/status-top-bar/status-top-bar.d.ts +2 -0
- package/src/lib/status-top-bar/status-top-bar.stories.d.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vention/machine-apps-components",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/VentionCo/machine-cloud.git"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react": "17.0.2",
|
|
22
22
|
"react-router-dom": "^6.0.0",
|
|
23
23
|
"@mui/material": "^5.0.0",
|
|
24
|
-
"@vention/machine-ui": "3.
|
|
24
|
+
"@vention/machine-ui": "3.38.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@nx/vite": "21.1.3",
|
package/src/i18n/locales/de.d.ts
CHANGED
|
@@ -112,7 +112,20 @@ declare const _default: {
|
|
|
112
112
|
complete: string;
|
|
113
113
|
loading: string;
|
|
114
114
|
waiting: string;
|
|
115
|
+
warning: string;
|
|
116
|
+
error: string;
|
|
115
117
|
};
|
|
116
118
|
};
|
|
119
|
+
productFormList: {
|
|
120
|
+
add: string;
|
|
121
|
+
cancel: string;
|
|
122
|
+
save: string;
|
|
123
|
+
create: string;
|
|
124
|
+
modify: string;
|
|
125
|
+
new: string;
|
|
126
|
+
delete: string;
|
|
127
|
+
deleteConfirmation: string;
|
|
128
|
+
emptyState: string;
|
|
129
|
+
};
|
|
117
130
|
};
|
|
118
131
|
export default _default;
|
package/src/i18n/locales/en.d.ts
CHANGED
|
@@ -112,7 +112,20 @@ declare const _default: {
|
|
|
112
112
|
complete: string;
|
|
113
113
|
loading: string;
|
|
114
114
|
waiting: string;
|
|
115
|
+
warning: string;
|
|
116
|
+
error: string;
|
|
115
117
|
};
|
|
116
118
|
};
|
|
119
|
+
productFormList: {
|
|
120
|
+
add: string;
|
|
121
|
+
cancel: string;
|
|
122
|
+
save: string;
|
|
123
|
+
create: string;
|
|
124
|
+
modify: string;
|
|
125
|
+
new: string;
|
|
126
|
+
delete: string;
|
|
127
|
+
deleteConfirmation: string;
|
|
128
|
+
emptyState: string;
|
|
129
|
+
};
|
|
117
130
|
};
|
|
118
131
|
export default _default;
|
package/src/i18n/locales/es.d.ts
CHANGED
|
@@ -112,7 +112,20 @@ declare const _default: {
|
|
|
112
112
|
complete: string;
|
|
113
113
|
loading: string;
|
|
114
114
|
waiting: string;
|
|
115
|
+
warning: string;
|
|
116
|
+
error: string;
|
|
115
117
|
};
|
|
116
118
|
};
|
|
119
|
+
productFormList: {
|
|
120
|
+
add: string;
|
|
121
|
+
cancel: string;
|
|
122
|
+
save: string;
|
|
123
|
+
create: string;
|
|
124
|
+
modify: string;
|
|
125
|
+
new: string;
|
|
126
|
+
delete: string;
|
|
127
|
+
deleteConfirmation: string;
|
|
128
|
+
emptyState: string;
|
|
129
|
+
};
|
|
117
130
|
};
|
|
118
131
|
export default _default;
|
package/src/i18n/locales/fr.d.ts
CHANGED
|
@@ -112,7 +112,20 @@ declare const _default: {
|
|
|
112
112
|
complete: string;
|
|
113
113
|
loading: string;
|
|
114
114
|
waiting: string;
|
|
115
|
+
warning: string;
|
|
116
|
+
error: string;
|
|
115
117
|
};
|
|
116
118
|
};
|
|
119
|
+
productFormList: {
|
|
120
|
+
add: string;
|
|
121
|
+
cancel: string;
|
|
122
|
+
save: string;
|
|
123
|
+
create: string;
|
|
124
|
+
modify: string;
|
|
125
|
+
new: string;
|
|
126
|
+
delete: string;
|
|
127
|
+
deleteConfirmation: string;
|
|
128
|
+
emptyState: string;
|
|
129
|
+
};
|
|
117
130
|
};
|
|
118
131
|
export default _default;
|
package/src/index.d.ts
CHANGED
|
@@ -8,9 +8,8 @@ export * from "./lib/navigation-bar/navigation-confirmation-modal";
|
|
|
8
8
|
export * from "./lib/navigation-bar/password-protection-modal";
|
|
9
9
|
export * from "./lib/navigation-bar/time-label";
|
|
10
10
|
export * from "./lib/status-top-bar/status-top-bar";
|
|
11
|
-
export type { ButtonConfig, StatusTopBarProps } from "./lib/status-top-bar/status-top-bar";
|
|
12
11
|
export * from "./lib/sidebar/sidebar";
|
|
13
|
-
export type { SidebarItem, SidebarProps } from "./lib/sidebar/sidebar";
|
|
12
|
+
export type { SidebarItem, SidebarProps, SidebarVariant } from "./lib/sidebar/sidebar";
|
|
14
13
|
export * from "./lib/logs/logs-table";
|
|
15
14
|
export * from "./lib/logs/log-filter-form";
|
|
16
15
|
export * from "./lib/logs/logs-panel";
|
|
@@ -19,9 +18,9 @@ export type { LogEntry, LogFilterFormValues, SortOrder, LogType, PaginationMode,
|
|
|
19
18
|
export * from "./lib/settings-page/settings-page";
|
|
20
19
|
export * from "./lib/file-upload-panel/file-upload-panel";
|
|
21
20
|
export * from "./lib/step-progress-circle/step-progress-circle";
|
|
22
|
-
export type { StepProgressCircleProps, StepProgressCircleVariant } from "./lib/step-progress-circle/step-progress-circle";
|
|
23
21
|
export * from "./lib/action-button/action-button";
|
|
24
|
-
export
|
|
22
|
+
export * from "./lib/product-form-list/product-form-list";
|
|
23
|
+
export * from "./hooks/use-auto-scroll-input";
|
|
25
24
|
export * from "./types/user-level";
|
|
26
25
|
export * from "./lib/utils/api-config-utils";
|
|
27
26
|
export * from "./lib/utils/device-utils";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { NavigationItemProps } from "./navigation-bar-item";
|
|
3
|
+
export type NavigationBarVariant = "fixed" | "flex";
|
|
3
4
|
export interface NavigationBarProps {
|
|
4
5
|
children: ReactNode;
|
|
5
6
|
showTimer?: boolean;
|
|
@@ -10,6 +11,8 @@ export interface NavigationBarProps {
|
|
|
10
11
|
isSupportDisabled?: boolean;
|
|
11
12
|
showControlCenterButton?: boolean;
|
|
12
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;
|
|
13
16
|
}
|
|
14
17
|
export declare const NavigationBar: ((props: NavigationBarProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
15
18
|
Item: (props: NavigationItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -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;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type IconType } from "@vention/machine-ui";
|
|
3
|
+
export type SidebarVariant = "card" | "accent";
|
|
3
4
|
export interface SidebarItem {
|
|
4
5
|
id: string;
|
|
5
6
|
title: string;
|
|
@@ -11,5 +12,7 @@ export interface SidebarItem {
|
|
|
11
12
|
}
|
|
12
13
|
export interface SidebarProps {
|
|
13
14
|
items: SidebarItem[];
|
|
15
|
+
/** Style variant: "card" (default) shows full bordered cards, "accent" shows left border accent only */
|
|
16
|
+
variant?: SidebarVariant;
|
|
14
17
|
}
|
|
15
18
|
export declare const Sidebar: (props: SidebarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,12 +14,14 @@ export interface ButtonConfig {
|
|
|
14
14
|
icon?: ReactNode;
|
|
15
15
|
iconDisabled?: ReactNode;
|
|
16
16
|
}
|
|
17
|
+
export type StatusTopBarVariant = "light" | "dark";
|
|
17
18
|
export interface StatusTopBarProps {
|
|
18
19
|
status?: {
|
|
19
20
|
label: string;
|
|
20
21
|
color: string;
|
|
21
22
|
};
|
|
22
23
|
buttonConfigs?: ButtonConfig[];
|
|
24
|
+
variant?: StatusTopBarVariant;
|
|
23
25
|
}
|
|
24
26
|
export declare const StatusTopBar: (props: StatusTopBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export default StatusTopBar;
|
|
@@ -4,4 +4,7 @@ declare const meta: Meta<typeof StatusTopBar>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof StatusTopBar>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const DarkVariant: Story;
|
|
8
|
+
export declare const DarkVariantRunning: Story;
|
|
9
|
+
export declare const DarkVariantError: Story;
|
|
7
10
|
export declare const Error: Story;
|