@dexteel/mesf-core 5.12.0 → 5.12.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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +14 -0
- package/CLAUDE.md +89 -0
- package/dist/index.esm.js +22 -32
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [5.12.1](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v5.12.0...@dexteel/mesf-core-v5.12.1) (2025-09-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **Settings:** rewrite UTLSettingContext to make sure settings are lo… ([3f6c367](https://github.com/dexteel/mesf-core-frontend/commit/3f6c36797ce0e0bed33dc574589347ba0a39f34e))
|
|
9
|
+
* **Settings:** rewrite UTLSettingContext to make sure settings are loaded before application ([eb262d9](https://github.com/dexteel/mesf-core-frontend/commit/eb262d92c51880f3a63349accc8ef259e843de7e))
|
|
10
|
+
|
|
11
|
+
## [5.12.0] - 2025-09-09
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
1
15
|
# Changelog
|
|
2
16
|
|
|
3
17
|
## [5.12.0](https://github.com/dexteel/mesf-core-frontend/compare/@dexteel/mesf-core-v5.11.0...@dexteel/mesf-core-v5.12.0) (2025-09-09)
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Development Commands
|
|
6
|
+
|
|
7
|
+
### Build and Development
|
|
8
|
+
- `npm run build` - Build the library for production using Rollup
|
|
9
|
+
- `npm run watch` or `npm start` - Build in watch mode for development
|
|
10
|
+
- `npm run ci` - Clean build for CI environments
|
|
11
|
+
|
|
12
|
+
### Code Quality
|
|
13
|
+
- `npx @biomejs/biome check --write ./src` - Format and organize imports with Biome
|
|
14
|
+
- Pre-commit hook automatically runs Biome formatting on staged files
|
|
15
|
+
|
|
16
|
+
## Architecture Overview
|
|
17
|
+
|
|
18
|
+
This is `@dexteel/mesf-core`, a React component library built as an NPM package using TypeScript and Rollup. The library provides a comprehensive set of components and utilities for manufacturing execution systems.
|
|
19
|
+
|
|
20
|
+
### Key Architecture Patterns
|
|
21
|
+
|
|
22
|
+
**Library Structure**: The project follows a modular library architecture with clear separation between:
|
|
23
|
+
- Components (UI elements)
|
|
24
|
+
- Context providers (state management)
|
|
25
|
+
- Services (API communication)
|
|
26
|
+
- Configuration modules (settings and user management)
|
|
27
|
+
- Utilities and hooks
|
|
28
|
+
|
|
29
|
+
**Export Strategy**: All public APIs are exported through `src/index.ts` using barrel exports, making the library consumable as a single package.
|
|
30
|
+
|
|
31
|
+
**State Management**: Uses React Context pattern extensively:
|
|
32
|
+
- `UTLSettingContext` - User settings and preferences
|
|
33
|
+
- `userContext` - User authentication and profile data
|
|
34
|
+
- `assetContext` - Asset management state
|
|
35
|
+
- `axiosInstance` - HTTP client configuration with interceptors
|
|
36
|
+
|
|
37
|
+
**Real-time Communication**: Integrates SignalR (`@microsoft/signalr`) for real-time updates via the `useMesfRealtime` hook.
|
|
38
|
+
|
|
39
|
+
### Directory Structure
|
|
40
|
+
|
|
41
|
+
- **src/components/** - Reusable UI components organized by domain
|
|
42
|
+
- `navigation/` - Header, menu components
|
|
43
|
+
- `modals/` - Dialog components
|
|
44
|
+
- `shared/` - Common utility components
|
|
45
|
+
|
|
46
|
+
- **src/configuration/** - Admin and configuration modules
|
|
47
|
+
- Handles user management, system settings
|
|
48
|
+
- Contains pages for administrative functions
|
|
49
|
+
|
|
50
|
+
- **src/context/** - React Context providers
|
|
51
|
+
- Authentication, settings, and shared state management
|
|
52
|
+
- Axios configuration with request/response interceptors
|
|
53
|
+
|
|
54
|
+
- **src/hooks/** - Custom React hooks
|
|
55
|
+
- Real-time data hooks, search utilities
|
|
56
|
+
|
|
57
|
+
- **src/services/** - API communication layer
|
|
58
|
+
- **src/utils/** - Utility functions and helpers
|
|
59
|
+
- **src/controls/** - Form controls and input components
|
|
60
|
+
|
|
61
|
+
### Technology Stack
|
|
62
|
+
|
|
63
|
+
**Core Framework**: React 17 with TypeScript
|
|
64
|
+
**Build Tool**: Rollup with TypeScript plugin
|
|
65
|
+
**Styling**: Material-UI v4 with custom theme support
|
|
66
|
+
**State**: Redux Toolkit for complex state, React Context for simpler state
|
|
67
|
+
**Authentication**: Azure MSAL for Microsoft authentication
|
|
68
|
+
**Data Visualization**: Nivo charts, Chart.js with react-chartjs-2
|
|
69
|
+
**Grid Component**: AG Grid (Enterprise features available)
|
|
70
|
+
**Date Handling**: Moment.js with timezone support
|
|
71
|
+
|
|
72
|
+
### Key Dependencies
|
|
73
|
+
|
|
74
|
+
The library has extensive peer dependencies that consuming applications must provide:
|
|
75
|
+
- Material-UI components and theming
|
|
76
|
+
- AG Grid for data tables
|
|
77
|
+
- Chart libraries (Nivo, Chart.js)
|
|
78
|
+
- React Router DOM for navigation
|
|
79
|
+
- Redux Toolkit for state management
|
|
80
|
+
|
|
81
|
+
### Development Notes
|
|
82
|
+
|
|
83
|
+
**Styling**: Uses Material-UI v4 theming system. Custom theme exports available via `src/css/themeMESF`.
|
|
84
|
+
|
|
85
|
+
**Internationalization**: Components support timezone handling via `moment-timezone` and `date-fns-tz`.
|
|
86
|
+
|
|
87
|
+
**Bundle Optimization**: Rollup configuration externalizes React and Babel runtime to prevent duplication in consuming applications.
|
|
88
|
+
|
|
89
|
+
**Code Quality**: Biome is configured for formatting and import organization, but linting is disabled (see biome.json).
|
package/dist/index.esm.js
CHANGED
|
@@ -14886,30 +14886,6 @@ var Navigation = function (_a) {
|
|
|
14886
14886
|
React__default.createElement(MESFMainContainer, null)));
|
|
14887
14887
|
};
|
|
14888
14888
|
|
|
14889
|
-
var useSearchUTLSettings = function (_a) {
|
|
14890
|
-
var onError = _a.onError;
|
|
14891
|
-
var initSettings = useUTLSettingsContext().actions.initSettings;
|
|
14892
|
-
var searchUTLSettings = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
14893
|
-
var res, settings;
|
|
14894
|
-
return __generator(this, function (_a) {
|
|
14895
|
-
switch (_a.label) {
|
|
14896
|
-
case 0: return [4 /*yield*/, getUTLSettings()];
|
|
14897
|
-
case 1:
|
|
14898
|
-
res = _a.sent();
|
|
14899
|
-
if (res.ok) {
|
|
14900
|
-
settings = get(res, "data.tables[0].rows", []);
|
|
14901
|
-
initSettings(settings);
|
|
14902
|
-
}
|
|
14903
|
-
else {
|
|
14904
|
-
onError(res.message);
|
|
14905
|
-
}
|
|
14906
|
-
return [2 /*return*/];
|
|
14907
|
-
}
|
|
14908
|
-
});
|
|
14909
|
-
}); };
|
|
14910
|
-
return { searchUTLSettings: searchUTLSettings };
|
|
14911
|
-
};
|
|
14912
|
-
|
|
14913
14889
|
var UTLSettingsInitialState = {
|
|
14914
14890
|
serverTimeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
14915
14891
|
settings: {},
|
|
@@ -14929,7 +14905,7 @@ var UTLSettingsReducer = createSlice({
|
|
|
14929
14905
|
initSettings: function (state, _a) {
|
|
14930
14906
|
var payload = _a.payload;
|
|
14931
14907
|
state.settings = payload.reduce(function (acc, cur) {
|
|
14932
|
-
if (cur.SettingName.trim() === "
|
|
14908
|
+
if (cur.SettingName.trim().toLowerCase() === "timezone") {
|
|
14933
14909
|
var timeService = TimeService.getInstance();
|
|
14934
14910
|
timeService.setTimeZone(cur.Value);
|
|
14935
14911
|
}
|
|
@@ -14953,9 +14929,25 @@ var UTLSettingsProvider = function (_a) {
|
|
|
14953
14929
|
reducers: UTLSettingsReducer.caseReducers,
|
|
14954
14930
|
}), state = _b[0], actions = _b[1];
|
|
14955
14931
|
var _c = useState(true), isLoading = _c[0], setIsLoading = _c[1];
|
|
14956
|
-
var searchUTLSettings =
|
|
14957
|
-
|
|
14958
|
-
|
|
14932
|
+
var searchUTLSettings = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
14933
|
+
var res, settings, settingsTrimmed;
|
|
14934
|
+
return __generator(this, function (_a) {
|
|
14935
|
+
switch (_a.label) {
|
|
14936
|
+
case 0: return [4 /*yield*/, getUTLSettings()];
|
|
14937
|
+
case 1:
|
|
14938
|
+
res = _a.sent();
|
|
14939
|
+
if (res.ok) {
|
|
14940
|
+
settings = get(res, "data.tables[0].rows", []);
|
|
14941
|
+
settingsTrimmed = settings.map(function (setting) { return (__assign(__assign({}, setting), { SettingName: setting.SettingName.trim() })); });
|
|
14942
|
+
actions.initSettings(settingsTrimmed);
|
|
14943
|
+
}
|
|
14944
|
+
else {
|
|
14945
|
+
console.error(res.message);
|
|
14946
|
+
}
|
|
14947
|
+
return [2 /*return*/];
|
|
14948
|
+
}
|
|
14949
|
+
});
|
|
14950
|
+
}); };
|
|
14959
14951
|
useEffect(function () {
|
|
14960
14952
|
setIsLoading(true);
|
|
14961
14953
|
searchUTLSettings().then(function () {
|
|
@@ -14965,9 +14957,7 @@ var UTLSettingsProvider = function (_a) {
|
|
|
14965
14957
|
useMesfRealtime({
|
|
14966
14958
|
onReceiveMessage: function (author, message) {
|
|
14967
14959
|
if (message === "UTL.GetSettings") {
|
|
14968
|
-
searchUTLSettings()
|
|
14969
|
-
// setIsLoading(false);
|
|
14970
|
-
});
|
|
14960
|
+
searchUTLSettings();
|
|
14971
14961
|
}
|
|
14972
14962
|
},
|
|
14973
14963
|
});
|
|
@@ -14983,7 +14973,7 @@ var ProvidersLoader = function (_a) {
|
|
|
14983
14973
|
display: "flex",
|
|
14984
14974
|
justifyContent: "center",
|
|
14985
14975
|
alignItems: "center",
|
|
14986
|
-
height: "
|
|
14976
|
+
height: "80vh",
|
|
14987
14977
|
} },
|
|
14988
14978
|
React__default.createElement(CircularProgress, null)));
|
|
14989
14979
|
}
|