@erpsquad/common 1.7.0 → 1.7.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/CHANGELOG.md CHANGED
@@ -1,301 +1,254 @@
1
- # Changelog
2
-
3
- All notable changes to the ERP UI Library will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.6.2] - 2024-11-17
9
-
10
- ### Added
11
- - **Complete SCSS Export System**: All SCSS files (variables, mixins, utilities, animations) are now properly exported and accessible
12
- - **Centralized Style Bundling**: Created `src/styles/index.ts` that imports all component styles
13
- - **SCSS Export Wrappers**: Added export files for easy importing:
14
- - `@erpsquad/common/styles/variables` - Color palette and design tokens
15
- - `@erpsquad/common/styles/mixins` - Flexbox, transitions, and responsive mixins
16
- - `@erpsquad/common/styles/utils` - Utility classes
17
- - `@erpsquad/common/styles/animations` - Keyframe animations
18
- - `@erpsquad/common/styles/all` - All SCSS features at once
19
- - **Package.json Exports**: Added proper exports configuration for all style resources
20
- - **SCSS Source Files in Package**: Added `src/styles` to the published package files
21
- - **Comprehensive Documentation**:
22
- - `src/styles/README.md` - Complete technical reference
23
- - `STYLES_USAGE.md` - User guide with examples
24
- - `STYLES_MIGRATION.md` - Migration guide
25
- - `STYLES_QUICK_REFERENCE.md` - Quick reference cheat sheet
26
- - `STYLES_TROUBLESHOOTING.md` - Troubleshooting guide
27
- - `STYLES_IMPLEMENTATION_SUMMARY.md` - Technical implementation details
28
-
29
- ### Fixed
30
- - **Bug in Utility Classes**: Fixed `.pl-1` and `.pr-1` which were incorrectly using `margin` instead of `padding`
31
- - **Empty main.scss**: Populated `main.scss` to properly import all shared SCSS files (variables, mixins, utils, animations)
32
- - **Missing SCSS Files**: SCSS source files are now included in the published package, resolving "Can't find stylesheet to import" errors
33
-
34
- ### Changed
35
- - Updated `main.scss` to import normalize.css, reset.css, and all core SCSS files
36
- - Enhanced `README.md` with comprehensive "Styles & SCSS" section
37
- - Updated Vite configuration to include `styles` as an entry point
38
- - Improved build process to bundle all component styles correctly
39
-
40
- ### Documentation
41
- - All styles documentation is now comprehensive and production-ready
42
- - Added usage examples for CSS bundle, SCSS variables, SCSS mixins, and utility classes
43
- - Provided troubleshooting guide for common style-related issues
44
- - Added migration guide showing what changed and how to use new features
45
-
46
- ### Breaking Changes
47
- - None! This update is 100% backward compatible
48
-
49
- ### Notes
50
- - Consumers can now import SCSS variables and mixins in their projects
51
- - Utility classes are fully documented and available via CSS import
52
- - Design tokens ensure consistency across consuming applications
53
- - Responsive breakpoints are available as SCSS mixins
54
-
55
- ## [1.0.0] - 2024-01-15
56
-
57
- ### Added
58
- - Initial release of the ERP UI Library as a standalone npm package
59
- - 80+ UI components extracted from erp-common workspace module
60
- - Comprehensive theming system with light/dark mode support
61
- - RTL/LTR text direction support
62
- - Flexible Redux integration (optional)
63
- - TypeScript definitions for all components and utilities
64
- - Custom hooks for authentication, language, permissions, and more
65
- - Utility functions for date formatting, file size, text manipulation, and colors
66
- - Context providers for auth, language, pages, and permissions
67
- - Enhanced components with flexible Redux/prop-based usage patterns
68
- - Comprehensive documentation and examples
69
- - Migration guide from erp-common workspace module
70
-
71
- ### Components
72
- - **Form Controls**: Button, TextField, Select, DatePicker, Checkbox, Radio, Switch, etc.
73
- - **Data Display**: MaterialTable, Grid, Card, Avatar, Chip, Typography, etc.
74
- - **Navigation**: Sidebar, Breadcrumb, Pagination, Tabs, Menu, etc.
75
- - **Feedback**: Snackbar, Toast, Loader, Alert, Modal, etc.
76
- - **Layout**: Box, Container, Stack, Divider, etc.
77
- - **Enhanced Components**: ShareModalEnhanced, HeaderEnhanced with flexible Redux integration
78
-
79
- ### Hooks
80
- - `useAuth` - Authentication state management
81
- - `useLanguage` - Internationalization and language switching
82
- - `usePermissions` - Role-based access control
83
- - `usePages` - Page state management
84
- - `useDeepMemo` - Deep memoization for complex objects
85
- - `useReduxIntegration` - Unified interface for Redux/prop-based components
86
-
87
- ### Utilities
88
- - `formatDate` - Date formatting with various patterns
89
- - `formatFileSize` - Human-readable file size formatting
90
- - `formatText` / `deformatText` - Text transformation utilities
91
- - `colorUtils` - Color manipulation and conversion utilities
92
-
93
- ### Theme System
94
- - `createLightTheme` - Light theme creation with custom colors
95
- - `createDarkTheme` - Dark theme creation with custom colors
96
- - `ERPUIProvider` - Main provider component with theme, context, and Redux integration
97
- - Support for custom primary colors and Material-UI theme extensions
98
-
99
- ### Redux Integration
100
- - Optional Redux slices for share, header, and reports functionality
101
- - `createLibraryStore` - Helper for creating Redux store with library slices
102
- - `createConfiguredApiClient` - API client configuration helper
103
- - `getLibrarySlices` - Export all library Redux slices
104
- - Flexible component design supporting both Redux and prop-based usage
105
-
106
- ### Breaking Changes from erp-common
107
-
108
- #### Import Path Changes
109
- - **Before**: `import Button from 'erp-common/src/components/button/button'`
110
- - **After**: `import { Button } from '@company/erp-ui-library'`
111
-
112
- #### Provider Requirements
113
- - **Before**: Theme and contexts automatically provided
114
- - **After**: Must wrap app with `ERPUIProvider`
115
-
116
- ```typescript
117
- // Before
118
- function App() {
119
- return <MyComponent />;
120
- }
121
-
122
- // After
123
- import { ERPUIProvider } from '@company/erp-ui-library';
124
-
125
- function App() {
126
- return (
127
- <ERPUIProvider>
128
- <MyComponent />
129
- </ERPUIProvider>
130
- );
131
- }
132
- ```
133
-
134
- #### Redux Integration Changes
135
- - **Before**: Components automatically used Redux
136
- - **After**: Must specify `useRedux` prop for enhanced components
137
-
138
- ```typescript
139
- // Before
140
- <ShareModal open={isOpen} onClose={handleClose} />
141
-
142
- // After - with Redux
143
- <ShareModalEnhanced useRedux={true} open={isOpen} onClose={handleClose} />
144
-
145
- // After - without Redux
146
- <ShareModalEnhanced
147
- useRedux={false}
148
- users={users}
149
- departments={departments}
150
- loading={loading}
151
- onFetchUsersAndDepartments={fetchData}
152
- open={isOpen}
153
- onClose={handleClose}
154
- />
155
- ```
156
-
157
- #### Store Configuration Changes
158
- - **Before**: Redux store automatically configured with all slices
159
- - **After**: Must explicitly configure store with library slices
160
-
161
- ```typescript
162
- // Before
163
- import { store } from 'erp-common/src/redux/store';
164
-
165
- // After
166
- import { configureStore } from '@reduxjs/toolkit';
167
- import { getLibrarySlices } from '@company/erp-ui-library';
168
-
169
- const store = configureStore({
170
- reducer: {
171
- ...getLibrarySlices(),
172
- // your app reducers
173
- }
174
- });
175
- ```
176
-
177
- #### API Client Configuration
178
- - **Before**: API client automatically configured
179
- - **After**: Must explicitly configure API client
180
-
181
- ```typescript
182
- // After
183
- import { createConfiguredApiClient } from '@company/erp-ui-library';
184
-
185
- const apiClient = createConfiguredApiClient(
186
- baseApiClient,
187
- () => ({ authorization: `Bearer ${getToken()}` })
188
- );
189
- ```
190
-
191
- ### Migration Path
192
-
193
- 1. **Install the library**: `npm install @company/erp-ui-library`
194
- 2. **Install peer dependencies**: React, Material-UI, etc.
195
- 3. **Update imports**: Change from workspace paths to npm package imports
196
- 4. **Add ERPUIProvider**: Wrap your app with the provider
197
- 5. **Configure Redux** (if using): Set up store with library slices
198
- 6. **Update enhanced components**: Add `useRedux` prop and handle both patterns
199
- 7. **Test thoroughly**: Ensure all functionality works as expected
200
- 8. **Remove old workspace**: Clean up erp-common workspace module
201
-
202
- ### Documentation
203
- - [README.md](README.md) - Installation and basic usage
204
- - [API.md](API.md) - Comprehensive API documentation
205
- - [EXAMPLES.md](EXAMPLES.md) - Usage examples and patterns
206
- - [MIGRATION.md](MIGRATION.md) - Detailed migration guide from erp-common
207
- - [TROUBLESHOOTING.md](TROUBLESHOOTING.md) - Common issues and solutions
208
-
209
- ### Development
210
- - TypeScript support with strict type checking
211
- - Jest testing framework with React Testing Library
212
- - ESLint configuration for code quality
213
- - Vite build system for fast development and optimized production builds
214
- - Size limit monitoring to prevent bundle bloat
215
- - Comprehensive test coverage for components, hooks, and utilities
216
-
217
- ### Performance
218
- - Tree shaking support for optimal bundle size
219
- - Lazy loading support for large components
220
- - Memoization utilities for expensive calculations
221
- - Optimized Material-UI theme integration
222
- - Minimal runtime overhead for unused features
223
-
224
- ---
225
-
226
- ## Version History
227
-
228
- ### [1.0.0] - 2024-01-15
229
- - Initial release as standalone npm package
230
- - Migration from erp-common workspace module
231
- - Comprehensive component library with 80+ components
232
- - Flexible Redux integration
233
- - Full TypeScript support
234
- - Theming system with light/dark modes
235
- - RTL/LTR support
236
- - Internationalization support
237
- - Complete documentation and migration guide
238
-
239
- ---
240
-
241
- ## Upgrade Guide
242
-
243
- ### From erp-common workspace to 1.0.0
244
-
245
- This is a major migration from a workspace module to an npm package. Please follow the detailed [Migration Guide](MIGRATION.md) for step-by-step instructions.
246
-
247
- **Key Changes:**
248
- 1. Package installation required
249
- 2. Import paths changed
250
- 3. Provider wrapper required
251
- 4. Redux integration made optional and explicit
252
- 5. Enhanced components with flexible usage patterns
253
-
254
- **Estimated Migration Time:** 1-2 weeks depending on application size
255
-
256
- **Support:** See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) for common issues and solutions
257
-
258
- ---
259
-
260
- ## Future Releases
261
-
262
- ### Planned for 1.1.0
263
- - Additional form components (file upload, rich text editor)
264
- - Enhanced data visualization components
265
- - Improved accessibility features
266
- - Performance optimizations
267
- - Additional utility functions
268
-
269
- ### Planned for 1.2.0
270
- - Mobile-responsive component variants
271
- - Advanced theming capabilities
272
- - Component composition utilities
273
- - Enhanced testing utilities
274
-
275
- ### Planned for 2.0.0
276
- - React 19 support
277
- - Material-UI v6 upgrade
278
- - Breaking changes for improved API consistency
279
- - New component architecture patterns
280
-
281
- ---
282
-
283
- ## Contributing
284
-
285
- We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:
286
- - Code style and standards
287
- - Testing requirements
288
- - Documentation standards
289
- - Pull request process
290
- - Issue reporting
291
-
292
- ## License
293
-
294
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
295
-
296
- ## Support
297
-
298
- - **Documentation**: [GitHub Repository](https://github.com/company/erp-ui-library)
299
- - **Issues**: [GitHub Issues](https://github.com/company/erp-ui-library/issues)
300
- - **Discussions**: [GitHub Discussions](https://github.com/company/erp-ui-library/discussions)
1
+ # Changelog
2
+
3
+ All notable changes to the ERP UI Library will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2024-01-15
9
+
10
+ ### Added
11
+ - Initial release of the ERP UI Library as a standalone npm package
12
+ - 80+ UI components extracted from erp-common workspace module
13
+ - Comprehensive theming system with light/dark mode support
14
+ - RTL/LTR text direction support
15
+ - Flexible Redux integration (optional)
16
+ - TypeScript definitions for all components and utilities
17
+ - Custom hooks for authentication, language, permissions, and more
18
+ - Utility functions for date formatting, file size, text manipulation, and colors
19
+ - Context providers for auth, language, pages, and permissions
20
+ - Enhanced components with flexible Redux/prop-based usage patterns
21
+ - Comprehensive documentation and examples
22
+ - Migration guide from erp-common workspace module
23
+
24
+ ### Components
25
+ - **Form Controls**: Button, TextField, Select, DatePicker, Checkbox, Radio, Switch, etc.
26
+ - **Data Display**: MaterialTable, Grid, Card, Avatar, Chip, Typography, etc.
27
+ - **Navigation**: Sidebar, Breadcrumb, Pagination, Tabs, Menu, etc.
28
+ - **Feedback**: Snackbar, Toast, Loader, Alert, Modal, etc.
29
+ - **Layout**: Box, Container, Stack, Divider, etc.
30
+ - **Enhanced Components**: ShareModalEnhanced, HeaderEnhanced with flexible Redux integration
31
+
32
+ ### Hooks
33
+ - `useAuth` - Authentication state management
34
+ - `useLanguage` - Internationalization and language switching
35
+ - `usePermissions` - Role-based access control
36
+ - `usePages` - Page state management
37
+ - `useDeepMemo` - Deep memoization for complex objects
38
+ - `useReduxIntegration` - Unified interface for Redux/prop-based components
39
+
40
+ ### Utilities
41
+ - `formatDate` - Date formatting with various patterns
42
+ - `formatFileSize` - Human-readable file size formatting
43
+ - `formatText` / `deformatText` - Text transformation utilities
44
+ - `colorUtils` - Color manipulation and conversion utilities
45
+
46
+ ### Theme System
47
+ - `createLightTheme` - Light theme creation with custom colors
48
+ - `createDarkTheme` - Dark theme creation with custom colors
49
+ - `ERPUIProvider` - Main provider component with theme, context, and Redux integration
50
+ - Support for custom primary colors and Material-UI theme extensions
51
+
52
+ ### Redux Integration
53
+ - Optional Redux slices for share, header, and reports functionality
54
+ - `createLibraryStore` - Helper for creating Redux store with library slices
55
+ - `createConfiguredApiClient` - API client configuration helper
56
+ - `getLibrarySlices` - Export all library Redux slices
57
+ - Flexible component design supporting both Redux and prop-based usage
58
+
59
+ ### Breaking Changes from erp-common
60
+
61
+ #### Import Path Changes
62
+ - **Before**: `import Button from 'erp-common/src/components/button/button'`
63
+ - **After**: `import { Button } from '@company/erp-ui-library'`
64
+
65
+ #### Provider Requirements
66
+ - **Before**: Theme and contexts automatically provided
67
+ - **After**: Must wrap app with `ERPUIProvider`
68
+
69
+ ```typescript
70
+ // Before
71
+ function App() {
72
+ return <MyComponent />;
73
+ }
74
+
75
+ // After
76
+ import { ERPUIProvider } from '@company/erp-ui-library';
77
+
78
+ function App() {
79
+ return (
80
+ <ERPUIProvider>
81
+ <MyComponent />
82
+ </ERPUIProvider>
83
+ );
84
+ }
85
+ ```
86
+
87
+ #### Redux Integration Changes
88
+ - **Before**: Components automatically used Redux
89
+ - **After**: Must specify `useRedux` prop for enhanced components
90
+
91
+ ```typescript
92
+ // Before
93
+ <ShareModal open={isOpen} onClose={handleClose} />
94
+
95
+ // After - with Redux
96
+ <ShareModalEnhanced useRedux={true} open={isOpen} onClose={handleClose} />
97
+
98
+ // After - without Redux
99
+ <ShareModalEnhanced
100
+ useRedux={false}
101
+ users={users}
102
+ departments={departments}
103
+ loading={loading}
104
+ onFetchUsersAndDepartments={fetchData}
105
+ open={isOpen}
106
+ onClose={handleClose}
107
+ />
108
+ ```
109
+
110
+ #### Store Configuration Changes
111
+ - **Before**: Redux store automatically configured with all slices
112
+ - **After**: Must explicitly configure store with library slices
113
+
114
+ ```typescript
115
+ // Before
116
+ import { store } from 'erp-common/src/redux/store';
117
+
118
+ // After
119
+ import { configureStore } from '@reduxjs/toolkit';
120
+ import { getLibrarySlices } from '@company/erp-ui-library';
121
+
122
+ const store = configureStore({
123
+ reducer: {
124
+ ...getLibrarySlices(),
125
+ // your app reducers
126
+ }
127
+ });
128
+ ```
129
+
130
+ #### API Client Configuration
131
+ - **Before**: API client automatically configured
132
+ - **After**: Must explicitly configure API client
133
+
134
+ ```typescript
135
+ // After
136
+ import { createConfiguredApiClient } from '@company/erp-ui-library';
137
+
138
+ const apiClient = createConfiguredApiClient(
139
+ baseApiClient,
140
+ () => ({ authorization: `Bearer ${getToken()}` })
141
+ );
142
+ ```
143
+
144
+ ### Migration Path
145
+
146
+ 1. **Install the library**: `npm install @company/erp-ui-library`
147
+ 2. **Install peer dependencies**: React, Material-UI, etc.
148
+ 3. **Update imports**: Change from workspace paths to npm package imports
149
+ 4. **Add ERPUIProvider**: Wrap your app with the provider
150
+ 5. **Configure Redux** (if using): Set up store with library slices
151
+ 6. **Update enhanced components**: Add `useRedux` prop and handle both patterns
152
+ 7. **Test thoroughly**: Ensure all functionality works as expected
153
+ 8. **Remove old workspace**: Clean up erp-common workspace module
154
+
155
+ ### Documentation
156
+ - [README.md](README.md) - Installation and basic usage
157
+ - [API.md](API.md) - Comprehensive API documentation
158
+ - [EXAMPLES.md](EXAMPLES.md) - Usage examples and patterns
159
+ - [MIGRATION.md](MIGRATION.md) - Detailed migration guide from erp-common
160
+ - [TROUBLESHOOTING.md](TROUBLESHOOTING.md) - Common issues and solutions
161
+
162
+ ### Development
163
+ - TypeScript support with strict type checking
164
+ - Jest testing framework with React Testing Library
165
+ - ESLint configuration for code quality
166
+ - Vite build system for fast development and optimized production builds
167
+ - Size limit monitoring to prevent bundle bloat
168
+ - Comprehensive test coverage for components, hooks, and utilities
169
+
170
+ ### Performance
171
+ - Tree shaking support for optimal bundle size
172
+ - Lazy loading support for large components
173
+ - Memoization utilities for expensive calculations
174
+ - Optimized Material-UI theme integration
175
+ - Minimal runtime overhead for unused features
176
+
177
+ ---
178
+
179
+ ## Version History
180
+
181
+ ### [1.0.0] - 2024-01-15
182
+ - Initial release as standalone npm package
183
+ - Migration from erp-common workspace module
184
+ - Comprehensive component library with 80+ components
185
+ - Flexible Redux integration
186
+ - Full TypeScript support
187
+ - Theming system with light/dark modes
188
+ - RTL/LTR support
189
+ - Internationalization support
190
+ - Complete documentation and migration guide
191
+
192
+ ---
193
+
194
+ ## Upgrade Guide
195
+
196
+ ### From erp-common workspace to 1.0.0
197
+
198
+ This is a major migration from a workspace module to an npm package. Please follow the detailed [Migration Guide](MIGRATION.md) for step-by-step instructions.
199
+
200
+ **Key Changes:**
201
+ 1. Package installation required
202
+ 2. Import paths changed
203
+ 3. Provider wrapper required
204
+ 4. Redux integration made optional and explicit
205
+ 5. Enhanced components with flexible usage patterns
206
+
207
+ **Estimated Migration Time:** 1-2 weeks depending on application size
208
+
209
+ **Support:** See [TROUBLESHOOTING.md](TROUBLESHOOTING.md) for common issues and solutions
210
+
211
+ ---
212
+
213
+ ## Future Releases
214
+
215
+ ### Planned for 1.1.0
216
+ - Additional form components (file upload, rich text editor)
217
+ - Enhanced data visualization components
218
+ - Improved accessibility features
219
+ - Performance optimizations
220
+ - Additional utility functions
221
+
222
+ ### Planned for 1.2.0
223
+ - Mobile-responsive component variants
224
+ - Advanced theming capabilities
225
+ - Component composition utilities
226
+ - Enhanced testing utilities
227
+
228
+ ### Planned for 2.0.0
229
+ - React 19 support
230
+ - Material-UI v6 upgrade
231
+ - Breaking changes for improved API consistency
232
+ - New component architecture patterns
233
+
234
+ ---
235
+
236
+ ## Contributing
237
+
238
+ We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for details on:
239
+ - Code style and standards
240
+ - Testing requirements
241
+ - Documentation standards
242
+ - Pull request process
243
+ - Issue reporting
244
+
245
+ ## License
246
+
247
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
248
+
249
+ ## Support
250
+
251
+ - **Documentation**: [GitHub Repository](https://github.com/company/erp-ui-library)
252
+ - **Issues**: [GitHub Issues](https://github.com/company/erp-ui-library/issues)
253
+ - **Discussions**: [GitHub Discussions](https://github.com/company/erp-ui-library/discussions)
301
254
  - **Email**: erp-ui-library@company.com
@@ -1,4 +1,4 @@
1
- import { b1 as styled_default } from "./index-Dz5Y7-tW.esm.js";
1
+ import { b1 as styled_default } from "./index-D-LS9re6.esm.js";
2
2
  import * as React from "react";
3
3
  import React__default from "react";
4
4
  import { p as getAugmentedNamespace, q as getDefaultExportFromCjs } from "./DefaultPropsProvider-CbRS6pK4.esm.js";
@@ -46093,4 +46093,4 @@ var article_cell_editor_default = ArticleCellEditor;
46093
46093
  export {
46094
46094
  article_cell_editor_default as default
46095
46095
  };
46096
- //# sourceMappingURL=article-cell-editor-JDI676YI-ql1HEe0N.esm.js.map
46096
+ //# sourceMappingURL=article-cell-editor-JDI676YI-Bgq3iI1C.esm.js.map