@vention/machine-apps-components 0.3.22 → 0.4.0
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 +1573 -171
- package/package.json +7 -1
- package/src/constants/z-index.d.ts +8 -0
- package/src/contexts/i18n-context.d.ts +12 -0
- package/src/contexts/i18n-provider.d.ts +13 -0
- package/src/hooks/use-i18n.d.ts +19 -0
- package/src/i18n/config.d.ts +8 -0
- package/src/i18n/locales/de.d.ts +118 -0
- package/src/i18n/locales/en.d.ts +118 -0
- package/src/i18n/locales/es.d.ts +118 -0
- package/src/i18n/locales/fr.d.ts +118 -0
- package/src/i18n/utils.d.ts +13 -0
- package/src/index.d.ts +13 -0
- package/src/lib/action-button/action-button.d.ts +14 -0
- package/src/lib/action-button/action-button.stories.d.ts +15 -0
- package/src/lib/file-upload-panel/file-upload-panel.d.ts +23 -0
- package/src/lib/file-upload-panel/file-upload-panel.stories.d.ts +12 -0
- package/src/lib/i18n-settings/i18n-settings.d.ts +8 -0
- package/src/lib/i18n-settings/i18n-settings.stories.d.ts +7 -0
- package/src/lib/logs/logs-panel.stories.d.ts +6 -0
- package/src/lib/navigation-bar/navigation-bar.stories.d.ts +6 -0
- package/src/lib/navigation-bar/password-protection-modal.stories.d.ts +6 -0
- package/src/lib/settings-page/settings-page.d.ts +11 -0
- package/src/lib/settings-page/settings-page.stories.d.ts +9 -0
- package/src/lib/sidebar/sidebar.d.ts +1 -1
- package/src/lib/sidebar/sidebar.stories.d.ts +6 -0
- package/src/lib/status-top-bar/status-top-bar.stories.d.ts +7 -0
- package/src/lib/step-progress-circle/step-progress-circle.d.ts +14 -0
- package/src/lib/step-progress-circle/step-progress-circle.stories.d.ts +16 -0
- package/src/test-utils.d.ts +7 -6
- package/src/types/user-level.d.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vention/machine-apps-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/VentionCo/machine-cloud.git"
|
|
@@ -12,6 +12,9 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"dayjs": "1.11.19",
|
|
15
|
+
"i18next": "^23.0.0",
|
|
16
|
+
"i18next-browser-languagedetector": "^8.0.0",
|
|
17
|
+
"react-i18next": "15.0.1",
|
|
15
18
|
"tss-react": "4.9.19"
|
|
16
19
|
},
|
|
17
20
|
"peerDependencies": {
|
|
@@ -22,7 +25,10 @@
|
|
|
22
25
|
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@nx/vite": "21.1.3",
|
|
28
|
+
"@storybook/react": "8.6.14",
|
|
29
|
+
"@tabler/icons-react": "3.35.0",
|
|
25
30
|
"@testing-library/react": "12.1.5",
|
|
31
|
+
"@types/i18next-browser-languagedetector": "^3.0.0",
|
|
26
32
|
"@vitejs/plugin-react": "4.5.2",
|
|
27
33
|
"vite": "6.3.5",
|
|
28
34
|
"vitest": "3.2.4"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type UnitSystem = "metric" | "imperial";
|
|
3
|
+
export interface I18nContextType {
|
|
4
|
+
locale: string;
|
|
5
|
+
unitSystem: UnitSystem;
|
|
6
|
+
timezone: string | "auto";
|
|
7
|
+
supportedLanguages: string[];
|
|
8
|
+
setLocale: (locale: string) => void;
|
|
9
|
+
setUnitSystem: (system: UnitSystem) => void;
|
|
10
|
+
setTimezone: (tz: string | "auto") => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const I18nContext: import("react").Context<I18nContextType>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { UnitSystem } from "./i18n-context";
|
|
3
|
+
export interface I18nProviderProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
defaultLocale?: string;
|
|
6
|
+
defaultUnitSystem?: UnitSystem;
|
|
7
|
+
defaultTimezone?: string | "auto";
|
|
8
|
+
supportedLanguages?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare const I18nProvider: {
|
|
11
|
+
({ children, defaultLocale, defaultUnitSystem, defaultTimezone, supportedLanguages, }: I18nProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UnitSystem } from "../contexts/i18n-context";
|
|
2
|
+
import { FormatLengthOptions } from "../i18n/utils";
|
|
3
|
+
export interface UseI18nReturn {
|
|
4
|
+
t: (key: string, options?: {
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
}) => string;
|
|
7
|
+
formatDate: (utcTimestamp: number, format?: string) => string;
|
|
8
|
+
formatValueToDisplayUnit: (value: number, options?: FormatLengthOptions) => string;
|
|
9
|
+
convertDisplayValueToMm: (value: number) => number;
|
|
10
|
+
getUnitDisplayLabel: () => string;
|
|
11
|
+
locale: string;
|
|
12
|
+
unitSystem: UnitSystem;
|
|
13
|
+
timezone: string | "auto";
|
|
14
|
+
supportedLanguages: string[];
|
|
15
|
+
setLocale: (locale: string) => void;
|
|
16
|
+
setUnitSystem: (system: UnitSystem) => void;
|
|
17
|
+
setTimezone: (tz: string | "auto") => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const useI18n: () => UseI18nReturn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import i18n from "i18next";
|
|
2
|
+
import "dayjs/locale/en";
|
|
3
|
+
import "dayjs/locale/fr";
|
|
4
|
+
import "dayjs/locale/de";
|
|
5
|
+
import "dayjs/locale/es";
|
|
6
|
+
export declare const getSupportedLanguages: () => string[];
|
|
7
|
+
export declare const getLanguageDisplayName: (code: string) => string;
|
|
8
|
+
export default i18n;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
units: {
|
|
4
|
+
mm: string;
|
|
5
|
+
in: string;
|
|
6
|
+
metric: string;
|
|
7
|
+
imperial: string;
|
|
8
|
+
};
|
|
9
|
+
settings: {
|
|
10
|
+
unitSystem: string;
|
|
11
|
+
timezone: string;
|
|
12
|
+
autoDetect: string;
|
|
13
|
+
locale: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
actionButton: {
|
|
17
|
+
home: string;
|
|
18
|
+
start: string;
|
|
19
|
+
stop: string;
|
|
20
|
+
pause: string;
|
|
21
|
+
reset: string;
|
|
22
|
+
clear: string;
|
|
23
|
+
run: string;
|
|
24
|
+
resume: string;
|
|
25
|
+
};
|
|
26
|
+
logs: {
|
|
27
|
+
table: {
|
|
28
|
+
date: string;
|
|
29
|
+
type: string;
|
|
30
|
+
code: string;
|
|
31
|
+
message: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
type: {
|
|
35
|
+
error: string;
|
|
36
|
+
warning: string;
|
|
37
|
+
info: string;
|
|
38
|
+
};
|
|
39
|
+
emptyState: {
|
|
40
|
+
noLogs: string;
|
|
41
|
+
};
|
|
42
|
+
loading: string;
|
|
43
|
+
loadingMore: string;
|
|
44
|
+
noMoreLogs: string;
|
|
45
|
+
error: {
|
|
46
|
+
loading: string;
|
|
47
|
+
};
|
|
48
|
+
filter: {
|
|
49
|
+
from: string;
|
|
50
|
+
to: string;
|
|
51
|
+
type: string;
|
|
52
|
+
sort: string;
|
|
53
|
+
reset: string;
|
|
54
|
+
typeOptions: {
|
|
55
|
+
all: string;
|
|
56
|
+
error: string;
|
|
57
|
+
warning: string;
|
|
58
|
+
info: string;
|
|
59
|
+
};
|
|
60
|
+
sortOptions: {
|
|
61
|
+
latest: string;
|
|
62
|
+
oldest: string;
|
|
63
|
+
};
|
|
64
|
+
chooseType: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
navigation: {
|
|
68
|
+
pages: {
|
|
69
|
+
home: string;
|
|
70
|
+
operation: string;
|
|
71
|
+
logs: string;
|
|
72
|
+
calibration: string;
|
|
73
|
+
settings: string;
|
|
74
|
+
};
|
|
75
|
+
bar: {
|
|
76
|
+
controlCenter: string;
|
|
77
|
+
support: string;
|
|
78
|
+
};
|
|
79
|
+
modal: {
|
|
80
|
+
exit: {
|
|
81
|
+
title: string;
|
|
82
|
+
message: string;
|
|
83
|
+
};
|
|
84
|
+
goToControlCenter: string;
|
|
85
|
+
goToRemoteSupport: string;
|
|
86
|
+
password: {
|
|
87
|
+
title: string;
|
|
88
|
+
label: string;
|
|
89
|
+
error: string;
|
|
90
|
+
confirm: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
pagination: {
|
|
95
|
+
page: string;
|
|
96
|
+
of: string;
|
|
97
|
+
};
|
|
98
|
+
fileUploadPanel: {
|
|
99
|
+
defaultTitle: string;
|
|
100
|
+
dropzoneTitle: string;
|
|
101
|
+
defaultFileCriteria: string;
|
|
102
|
+
};
|
|
103
|
+
stepProgressCircle: {
|
|
104
|
+
title: {
|
|
105
|
+
progress: string;
|
|
106
|
+
manufacturing: string;
|
|
107
|
+
processing: string;
|
|
108
|
+
uploading: string;
|
|
109
|
+
notstarted: string;
|
|
110
|
+
ready: string;
|
|
111
|
+
inprogress: string;
|
|
112
|
+
complete: string;
|
|
113
|
+
loading: string;
|
|
114
|
+
waiting: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export default _default;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
units: {
|
|
4
|
+
mm: string;
|
|
5
|
+
in: string;
|
|
6
|
+
metric: string;
|
|
7
|
+
imperial: string;
|
|
8
|
+
};
|
|
9
|
+
settings: {
|
|
10
|
+
unitSystem: string;
|
|
11
|
+
timezone: string;
|
|
12
|
+
autoDetect: string;
|
|
13
|
+
locale: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
actionButton: {
|
|
17
|
+
home: string;
|
|
18
|
+
start: string;
|
|
19
|
+
stop: string;
|
|
20
|
+
pause: string;
|
|
21
|
+
reset: string;
|
|
22
|
+
clear: string;
|
|
23
|
+
run: string;
|
|
24
|
+
resume: string;
|
|
25
|
+
};
|
|
26
|
+
logs: {
|
|
27
|
+
table: {
|
|
28
|
+
date: string;
|
|
29
|
+
type: string;
|
|
30
|
+
code: string;
|
|
31
|
+
message: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
type: {
|
|
35
|
+
error: string;
|
|
36
|
+
warning: string;
|
|
37
|
+
info: string;
|
|
38
|
+
};
|
|
39
|
+
emptyState: {
|
|
40
|
+
noLogs: string;
|
|
41
|
+
};
|
|
42
|
+
loading: string;
|
|
43
|
+
loadingMore: string;
|
|
44
|
+
noMoreLogs: string;
|
|
45
|
+
error: {
|
|
46
|
+
loading: string;
|
|
47
|
+
};
|
|
48
|
+
filter: {
|
|
49
|
+
from: string;
|
|
50
|
+
to: string;
|
|
51
|
+
type: string;
|
|
52
|
+
sort: string;
|
|
53
|
+
reset: string;
|
|
54
|
+
typeOptions: {
|
|
55
|
+
all: string;
|
|
56
|
+
error: string;
|
|
57
|
+
warning: string;
|
|
58
|
+
info: string;
|
|
59
|
+
};
|
|
60
|
+
sortOptions: {
|
|
61
|
+
latest: string;
|
|
62
|
+
oldest: string;
|
|
63
|
+
};
|
|
64
|
+
chooseType: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
navigation: {
|
|
68
|
+
pages: {
|
|
69
|
+
home: string;
|
|
70
|
+
operation: string;
|
|
71
|
+
logs: string;
|
|
72
|
+
calibration: string;
|
|
73
|
+
settings: string;
|
|
74
|
+
};
|
|
75
|
+
bar: {
|
|
76
|
+
controlCenter: string;
|
|
77
|
+
support: string;
|
|
78
|
+
};
|
|
79
|
+
modal: {
|
|
80
|
+
exit: {
|
|
81
|
+
title: string;
|
|
82
|
+
message: string;
|
|
83
|
+
};
|
|
84
|
+
goToControlCenter: string;
|
|
85
|
+
goToRemoteSupport: string;
|
|
86
|
+
password: {
|
|
87
|
+
title: string;
|
|
88
|
+
label: string;
|
|
89
|
+
error: string;
|
|
90
|
+
confirm: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
pagination: {
|
|
95
|
+
page: string;
|
|
96
|
+
of: string;
|
|
97
|
+
};
|
|
98
|
+
fileUploadPanel: {
|
|
99
|
+
defaultTitle: string;
|
|
100
|
+
dropzoneTitle: string;
|
|
101
|
+
defaultFileCriteria: string;
|
|
102
|
+
};
|
|
103
|
+
stepProgressCircle: {
|
|
104
|
+
title: {
|
|
105
|
+
progress: string;
|
|
106
|
+
manufacturing: string;
|
|
107
|
+
processing: string;
|
|
108
|
+
uploading: string;
|
|
109
|
+
notstarted: string;
|
|
110
|
+
ready: string;
|
|
111
|
+
inprogress: string;
|
|
112
|
+
complete: string;
|
|
113
|
+
loading: string;
|
|
114
|
+
waiting: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export default _default;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
units: {
|
|
4
|
+
mm: string;
|
|
5
|
+
in: string;
|
|
6
|
+
metric: string;
|
|
7
|
+
imperial: string;
|
|
8
|
+
};
|
|
9
|
+
settings: {
|
|
10
|
+
unitSystem: string;
|
|
11
|
+
timezone: string;
|
|
12
|
+
autoDetect: string;
|
|
13
|
+
locale: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
actionButton: {
|
|
17
|
+
home: string;
|
|
18
|
+
start: string;
|
|
19
|
+
stop: string;
|
|
20
|
+
pause: string;
|
|
21
|
+
reset: string;
|
|
22
|
+
clear: string;
|
|
23
|
+
run: string;
|
|
24
|
+
resume: string;
|
|
25
|
+
};
|
|
26
|
+
logs: {
|
|
27
|
+
table: {
|
|
28
|
+
date: string;
|
|
29
|
+
type: string;
|
|
30
|
+
code: string;
|
|
31
|
+
message: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
type: {
|
|
35
|
+
error: string;
|
|
36
|
+
warning: string;
|
|
37
|
+
info: string;
|
|
38
|
+
};
|
|
39
|
+
emptyState: {
|
|
40
|
+
noLogs: string;
|
|
41
|
+
};
|
|
42
|
+
loading: string;
|
|
43
|
+
loadingMore: string;
|
|
44
|
+
noMoreLogs: string;
|
|
45
|
+
error: {
|
|
46
|
+
loading: string;
|
|
47
|
+
};
|
|
48
|
+
filter: {
|
|
49
|
+
from: string;
|
|
50
|
+
to: string;
|
|
51
|
+
type: string;
|
|
52
|
+
sort: string;
|
|
53
|
+
reset: string;
|
|
54
|
+
typeOptions: {
|
|
55
|
+
all: string;
|
|
56
|
+
error: string;
|
|
57
|
+
warning: string;
|
|
58
|
+
info: string;
|
|
59
|
+
};
|
|
60
|
+
sortOptions: {
|
|
61
|
+
latest: string;
|
|
62
|
+
oldest: string;
|
|
63
|
+
};
|
|
64
|
+
chooseType: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
navigation: {
|
|
68
|
+
pages: {
|
|
69
|
+
home: string;
|
|
70
|
+
operation: string;
|
|
71
|
+
logs: string;
|
|
72
|
+
calibration: string;
|
|
73
|
+
settings: string;
|
|
74
|
+
};
|
|
75
|
+
bar: {
|
|
76
|
+
controlCenter: string;
|
|
77
|
+
support: string;
|
|
78
|
+
};
|
|
79
|
+
modal: {
|
|
80
|
+
exit: {
|
|
81
|
+
title: string;
|
|
82
|
+
message: string;
|
|
83
|
+
};
|
|
84
|
+
goToControlCenter: string;
|
|
85
|
+
goToRemoteSupport: string;
|
|
86
|
+
password: {
|
|
87
|
+
title: string;
|
|
88
|
+
label: string;
|
|
89
|
+
error: string;
|
|
90
|
+
confirm: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
pagination: {
|
|
95
|
+
page: string;
|
|
96
|
+
of: string;
|
|
97
|
+
};
|
|
98
|
+
fileUploadPanel: {
|
|
99
|
+
defaultTitle: string;
|
|
100
|
+
dropzoneTitle: string;
|
|
101
|
+
defaultFileCriteria: string;
|
|
102
|
+
};
|
|
103
|
+
stepProgressCircle: {
|
|
104
|
+
title: {
|
|
105
|
+
progress: string;
|
|
106
|
+
manufacturing: string;
|
|
107
|
+
processing: string;
|
|
108
|
+
uploading: string;
|
|
109
|
+
notstarted: string;
|
|
110
|
+
ready: string;
|
|
111
|
+
inprogress: string;
|
|
112
|
+
complete: string;
|
|
113
|
+
loading: string;
|
|
114
|
+
waiting: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export default _default;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
common: {
|
|
3
|
+
units: {
|
|
4
|
+
mm: string;
|
|
5
|
+
in: string;
|
|
6
|
+
metric: string;
|
|
7
|
+
imperial: string;
|
|
8
|
+
};
|
|
9
|
+
settings: {
|
|
10
|
+
unitSystem: string;
|
|
11
|
+
timezone: string;
|
|
12
|
+
autoDetect: string;
|
|
13
|
+
locale: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
actionButton: {
|
|
17
|
+
home: string;
|
|
18
|
+
start: string;
|
|
19
|
+
stop: string;
|
|
20
|
+
pause: string;
|
|
21
|
+
reset: string;
|
|
22
|
+
clear: string;
|
|
23
|
+
run: string;
|
|
24
|
+
resume: string;
|
|
25
|
+
};
|
|
26
|
+
logs: {
|
|
27
|
+
table: {
|
|
28
|
+
date: string;
|
|
29
|
+
type: string;
|
|
30
|
+
code: string;
|
|
31
|
+
message: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
type: {
|
|
35
|
+
error: string;
|
|
36
|
+
warning: string;
|
|
37
|
+
info: string;
|
|
38
|
+
};
|
|
39
|
+
emptyState: {
|
|
40
|
+
noLogs: string;
|
|
41
|
+
};
|
|
42
|
+
loading: string;
|
|
43
|
+
loadingMore: string;
|
|
44
|
+
noMoreLogs: string;
|
|
45
|
+
error: {
|
|
46
|
+
loading: string;
|
|
47
|
+
};
|
|
48
|
+
filter: {
|
|
49
|
+
from: string;
|
|
50
|
+
to: string;
|
|
51
|
+
type: string;
|
|
52
|
+
sort: string;
|
|
53
|
+
reset: string;
|
|
54
|
+
typeOptions: {
|
|
55
|
+
all: string;
|
|
56
|
+
error: string;
|
|
57
|
+
warning: string;
|
|
58
|
+
info: string;
|
|
59
|
+
};
|
|
60
|
+
sortOptions: {
|
|
61
|
+
latest: string;
|
|
62
|
+
oldest: string;
|
|
63
|
+
};
|
|
64
|
+
chooseType: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
navigation: {
|
|
68
|
+
pages: {
|
|
69
|
+
home: string;
|
|
70
|
+
operation: string;
|
|
71
|
+
logs: string;
|
|
72
|
+
calibration: string;
|
|
73
|
+
settings: string;
|
|
74
|
+
};
|
|
75
|
+
bar: {
|
|
76
|
+
controlCenter: string;
|
|
77
|
+
support: string;
|
|
78
|
+
};
|
|
79
|
+
modal: {
|
|
80
|
+
exit: {
|
|
81
|
+
title: string;
|
|
82
|
+
message: string;
|
|
83
|
+
};
|
|
84
|
+
goToControlCenter: string;
|
|
85
|
+
goToRemoteSupport: string;
|
|
86
|
+
password: {
|
|
87
|
+
title: string;
|
|
88
|
+
label: string;
|
|
89
|
+
error: string;
|
|
90
|
+
confirm: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
pagination: {
|
|
95
|
+
page: string;
|
|
96
|
+
of: string;
|
|
97
|
+
};
|
|
98
|
+
fileUploadPanel: {
|
|
99
|
+
defaultTitle: string;
|
|
100
|
+
dropzoneTitle: string;
|
|
101
|
+
defaultFileCriteria: string;
|
|
102
|
+
};
|
|
103
|
+
stepProgressCircle: {
|
|
104
|
+
title: {
|
|
105
|
+
progress: string;
|
|
106
|
+
manufacturing: string;
|
|
107
|
+
processing: string;
|
|
108
|
+
uploading: string;
|
|
109
|
+
notstarted: string;
|
|
110
|
+
ready: string;
|
|
111
|
+
inprogress: string;
|
|
112
|
+
complete: string;
|
|
113
|
+
loading: string;
|
|
114
|
+
waiting: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const MM_TO_INCH = 0.0393701;
|
|
2
|
+
export declare const INCH_TO_MM = 25.4;
|
|
3
|
+
export type UnitSystem = "metric" | "imperial";
|
|
4
|
+
export interface FormatLengthOptions {
|
|
5
|
+
decimals?: number;
|
|
6
|
+
showUnit?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function mmToInches(mm: number): number;
|
|
9
|
+
export declare function inchesToMm(inches: number): number;
|
|
10
|
+
export declare function formatValueToDisplayUnit(value: number, unitSystem: UnitSystem, options?: FormatLengthOptions): string;
|
|
11
|
+
export declare function convertDisplayValueToMm(displayValue: number, unitSystem: UnitSystem): number;
|
|
12
|
+
export declare function getUnitDisplayLabel(unitSystem: UnitSystem): string;
|
|
13
|
+
export declare function getAvailableTimezones(): string[];
|
package/src/index.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export * from "./contexts/i18n-provider";
|
|
2
|
+
export * from "./hooks/use-i18n";
|
|
3
|
+
export * from "./lib/i18n-settings/i18n-settings";
|
|
4
|
+
export { getAvailableTimezones } from "./i18n/utils";
|
|
5
|
+
export { getLanguageDisplayName, getSupportedLanguages } from "./i18n/config";
|
|
1
6
|
export * from "./lib/navigation-bar/navigation-bar";
|
|
2
7
|
export * from "./lib/navigation-bar/navigation-confirmation-modal";
|
|
3
8
|
export * from "./lib/navigation-bar/password-protection-modal";
|
|
@@ -11,5 +16,13 @@ export * from "./lib/logs/log-filter-form";
|
|
|
11
16
|
export * from "./lib/logs/logs-panel";
|
|
12
17
|
export * from "./lib/logs/logs-pagination";
|
|
13
18
|
export type { LogEntry, LogFilterFormValues, SortOrder, LogType, PaginationMode, PaginationConfig, LogsPanelHandle, } from "./lib/logs/logs-panel";
|
|
19
|
+
export * from "./lib/settings-page/settings-page";
|
|
20
|
+
export * from "./lib/file-upload-panel/file-upload-panel";
|
|
21
|
+
export * from "./lib/step-progress-circle/step-progress-circle";
|
|
22
|
+
export type { StepProgressCircleProps, StepProgressCircleVariant } from "./lib/step-progress-circle/step-progress-circle";
|
|
23
|
+
export * from "./lib/action-button/action-button";
|
|
24
|
+
export type { ActionButtonProps, ActionButtonVariant } from "./lib/action-button/action-button";
|
|
25
|
+
export * from "./types/user-level";
|
|
14
26
|
export * from "./lib/utils/api-config-utils";
|
|
15
27
|
export * from "./lib/utils/device-utils";
|
|
28
|
+
export * from "./constants/z-index";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export type ActionButtonVariant = "primary" | "destructive";
|
|
3
|
+
export interface ActionButtonProps {
|
|
4
|
+
variant?: ActionButtonVariant;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
icon: ReactNode;
|
|
8
|
+
label: string;
|
|
9
|
+
size?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const ActionButton: {
|
|
12
|
+
({ variant, onClick, disabled, icon, label, size, }: ActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
@@ -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,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;
|