master-data-management-react 0.0.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +127 -0
  3. package/dist/App.d.ts +6 -0
  4. package/dist/App.d.ts.map +1 -0
  5. package/dist/components/Pagination/Pagination.d.ts +9 -0
  6. package/dist/components/Pagination/Pagination.d.ts.map +1 -0
  7. package/dist/components/Pagination/index.d.ts +2 -0
  8. package/dist/components/Pagination/index.d.ts.map +1 -0
  9. package/dist/components/ServerSideGrid/ServerSideGrid.d.ts +33 -0
  10. package/dist/components/ServerSideGrid/ServerSideGrid.d.ts.map +1 -0
  11. package/dist/components/ServerSideGrid/index.d.ts +3 -0
  12. package/dist/components/ServerSideGrid/index.d.ts.map +1 -0
  13. package/dist/components/ServerSideGrid/styles.d.ts +13 -0
  14. package/dist/components/ServerSideGrid/styles.d.ts.map +1 -0
  15. package/dist/config/index.d.ts +6 -0
  16. package/dist/config/index.d.ts.map +1 -0
  17. package/dist/constants/api.constants.d.ts +59 -0
  18. package/dist/constants/api.constants.d.ts.map +1 -0
  19. package/dist/constants/form.constants.d.ts +73 -0
  20. package/dist/constants/form.constants.d.ts.map +1 -0
  21. package/dist/constants/grid.constants.d.ts +56 -0
  22. package/dist/constants/grid.constants.d.ts.map +1 -0
  23. package/dist/constants/index.d.ts +10 -0
  24. package/dist/constants/index.d.ts.map +1 -0
  25. package/dist/constants/routes.constants.d.ts +32 -0
  26. package/dist/constants/routes.constants.d.ts.map +1 -0
  27. package/dist/constants/ui.constants.d.ts +111 -0
  28. package/dist/constants/ui.constants.d.ts.map +1 -0
  29. package/dist/contexts/MasterDataContext.d.ts +51 -0
  30. package/dist/contexts/MasterDataContext.d.ts.map +1 -0
  31. package/dist/hooks/useApiService.d.ts +8 -0
  32. package/dist/hooks/useApiService.d.ts.map +1 -0
  33. package/dist/index.cjs +11 -0
  34. package/dist/index.d.ts +18 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +3195 -0
  37. package/dist/main.d.ts +2 -0
  38. package/dist/main.d.ts.map +1 -0
  39. package/dist/master-data-management-react.css +1 -0
  40. package/dist/pages/MasterForm/MasterForm.d.ts +4 -0
  41. package/dist/pages/MasterForm/MasterForm.d.ts.map +1 -0
  42. package/dist/pages/MasterView/MasterView.d.ts +4 -0
  43. package/dist/pages/MasterView/MasterView.d.ts.map +1 -0
  44. package/dist/pages/index.d.ts +3 -0
  45. package/dist/pages/index.d.ts.map +1 -0
  46. package/dist/routes/AppRoutes.d.ts +3 -0
  47. package/dist/routes/AppRoutes.d.ts.map +1 -0
  48. package/package.json +65 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Master Data Management
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # Master Data Management React Package
2
+
3
+ A flexible React package for managing master data with dynamic forms, tables, and multi-column sorting.
4
+
5
+ ## Features
6
+
7
+ - 🔄 **Dynamic Entity Management** - Auto-generated forms and grids from metadata
8
+ - 🎯 **Flexible Filtering** - Text, number, date, dropdown, and date-range filters
9
+ - ✅ **Full CRUD** - Create, read, update with auto-generated forms
10
+ - 📊 **Advanced Grid** - AG Grid with pagination, multi-column sorting, export (CSV/Excel)
11
+ - 🎨 **Material-UI** - Built with MUI components and theming
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install master-data-management-react
17
+ ```
18
+
19
+ **Peer Dependencies:**
20
+ ```bash
21
+ npm install react react-dom react-router-dom @mui/material @emotion/react @emotion/styled ag-grid-react ag-grid-community
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ```tsx
27
+ import { MasterDataProvider, AppRoutes } from 'master-data-management-react';
28
+ import 'master-data-management-react/styles';
29
+ import axios from 'axios';
30
+
31
+ const apiClient = axios.create({ baseURL: 'http://localhost:3000/api' });
32
+
33
+ function App() {
34
+ return (
35
+ <MasterDataProvider apiClient={apiClient}>
36
+ <AppRoutes />
37
+ </MasterDataProvider>
38
+ );
39
+ }
40
+ ```
41
+
42
+ ## Configuration
43
+
44
+ ### Custom Endpoints
45
+
46
+ ```tsx
47
+ <MasterDataProvider
48
+ apiClient={apiClient}
49
+ apiEndpoints={{
50
+ entities: '/custom/entities',
51
+ metadata: (entity) => `/custom/${entity}/meta`,
52
+ records: (entity) => `/custom/${entity}/data`,
53
+ }}
54
+ />
55
+ ```
56
+
57
+ ### Custom Routes
58
+
59
+ ```tsx
60
+ <MasterDataProvider
61
+ routes={{ basePath: '/admin/master' }}
62
+ />
63
+ ```
64
+
65
+ ## API Requirements
66
+
67
+ Your backend must implement these endpoints:
68
+
69
+ | Endpoint | Method | Description |
70
+ |----------|--------|-------------|
71
+ | `/master/entities` | GET | List all entities |
72
+ | `/master/:entity/metadata` | GET | Entity metadata (fields, form config) |
73
+ | `/master/:entity/records` | GET | Records with filters/sort/pagination |
74
+ | `/master/:entity/records/:id` | GET | Single record |
75
+ | `/master/:entity/records` | POST | Create record |
76
+ | `/master/:entity/records/:id` | PUT | Update record |
77
+ | `/master/:entity/export/csv` | GET | Export to CSV |
78
+ | `/master/:entity/export/excel` | GET | Export to Excel |
79
+
80
+ ### Multi-Column Sorting
81
+
82
+ Supports comma-separated sorting:
83
+ ```
84
+ GET /master/country/records?sortBy=countryName,isoCode&sortOrder=ASC,DESC
85
+ ```
86
+
87
+ ## Metadata Format
88
+
89
+ ```json
90
+ {
91
+ "parameterList": [
92
+ { "name": "countryName", "label": "Country", "dataType": "string", "options": null },
93
+ { "name": "regionId", "label": "Region", "dataType": "string", "options": [...] }
94
+ ],
95
+ "resultsList": [
96
+ { "name": "countryName", "label": "Country Name", "dataType": "string" },
97
+ { "name": "isoCode", "label": "ISO Code", "dataType": "string" }
98
+ ],
99
+ "formConfig": {
100
+ "Country Name": {
101
+ "fieldName": "countryName",
102
+ "dataType": "string",
103
+ "fieldType": "input",
104
+ "validation": { "max": 100 }
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ ## Routes
111
+
112
+ - `/master` - Grid view with filters
113
+ - `/master/:entity/new` - Create form
114
+ - `/master/:entity/:id` - View form
115
+ - `/master/:entity/:id/edit` - Edit form
116
+
117
+ ## Development
118
+
119
+ ```bash
120
+ npm run dev # Start dev server
121
+ npm run build:lib # Build package
122
+ ```
123
+
124
+ ## License
125
+
126
+ MIT
127
+
package/dist/App.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import './App.css';
2
+ import 'ag-grid-community/styles/ag-grid.css';
3
+ import 'ag-grid-community/styles/ag-theme-alpine.css';
4
+ declare function App(): import("react/jsx-runtime").JSX.Element;
5
+ export default App;
6
+ //# sourceMappingURL=App.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAEA,OAAO,WAAW,CAAA;AAElB,OAAO,sCAAsC,CAAC;AAC9C,OAAO,8CAA8C,CAAC;AAGtD,iBAAS,GAAG,4CAiBX;AAED,eAAe,GAAG,CAAA"}
@@ -0,0 +1,9 @@
1
+ interface PaginationProps {
2
+ totalRecords: number;
3
+ currentPage: number;
4
+ pageSize: number;
5
+ onPageChange: (page: number) => void;
6
+ }
7
+ declare const Pagination: ({ totalRecords, currentPage, pageSize, onPageChange, }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default Pagination;
9
+ //# sourceMappingURL=Pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAEA,UAAU,eAAe;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC;AAED,QAAA,MAAM,UAAU,GAAI,wDAKjB,eAAe,4CAwBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as Pagination } from './Pagination';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { AgGridReactProps } from "ag-grid-react";
2
+ import "ag-grid-community/styles/ag-grid.css";
3
+ import "ag-grid-community/styles/ag-theme-alpine.css";
4
+ import type { ColDef } from "ag-grid-community";
5
+ import { SORT_SETTINGS } from "../../constants/grid.constants";
6
+ interface ServerSideGridProps<T extends object> extends AgGridReactProps<T> {
7
+ totalRecords: number;
8
+ currentPage: number;
9
+ loading: boolean;
10
+ onPageChange: (page: number) => void;
11
+ pageSize: number;
12
+ rows: T[];
13
+ columns: ColDef<T>[];
14
+ height?: number;
15
+ pageSizeOptions: number[];
16
+ onPageSizeChange: (pageSize: number) => void;
17
+ setSort?: React.Dispatch<React.SetStateAction<{
18
+ colId: string;
19
+ sort: typeof SORT_SETTINGS[keyof typeof SORT_SETTINGS];
20
+ }[]>>;
21
+ sortModel?: {
22
+ colId: string;
23
+ sort: typeof SORT_SETTINGS[keyof typeof SORT_SETTINGS];
24
+ }[];
25
+ getRowHeight?: (params: any) => number;
26
+ domLayout?: "normal" | "autoHeight";
27
+ pinnedBottomRowData?: T[];
28
+ showLoader?: boolean;
29
+ emptyDataMessage?: string;
30
+ }
31
+ declare const ServerSideGrid: <T extends object>({ rows, totalRecords, currentPage, loading, onPageChange, columns, pageSize, pageSizeOptions, onPageSizeChange, setSort, sortModel, height, domLayout, getRowHeight, pinnedBottomRowData, showLoader, emptyDataMessage, ...rest }: ServerSideGridProps<T>) => import("react/jsx-runtime").JSX.Element;
32
+ export default ServerSideGrid;
33
+ //# sourceMappingURL=ServerSideGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ServerSideGrid.d.ts","sourceRoot":"","sources":["../../../src/components/ServerSideGrid/ServerSideGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAItD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,8CAA8C,CAAC;AAMtD,OAAO,KAAK,EAAE,MAAM,EAAoB,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAOH,aAAa,EAChB,MAAM,gCAAgC,CAAC;AAKxC,UAAU,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IACvE,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,KAAK,CAAC,QAAQ,CACpB,KAAK,CAAC,cAAc,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;KAAE,EAAE,CAAC,CACpG,CAAC;IACF,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAA;KAAE,EAAE,CAAC;IACxF,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,MAAM,CAAC;IACvC,SAAS,CAAC,EAAE,QAAQ,GAAG,YAAY,CAAC;IACpC,mBAAmB,CAAC,EAAE,CAAC,EAAE,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,EAAE,mOAmBvC,mBAAmB,CAAC,CAAC,CAAC,4CAoGxB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as ServerSideGrid } from './ServerSideGrid';
2
+ export * from './styles';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ServerSideGrid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,cAAc,UAAU,CAAC"}
@@ -0,0 +1,13 @@
1
+ export declare const Wrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
2
+ export declare const GridContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
+ export declare const Loader: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
4
+ export declare const PaginationContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
+ export declare const StyledSelect: import("@emotion/styled").StyledComponent<import("@mui/material").SelectProps<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
6
+ interface StyledAgGridWrapperProps {
7
+ height?: number;
8
+ }
9
+ export declare const StyledAgGridWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & StyledAgGridWrapperProps, {}, {}>;
10
+ export declare const ServerSideGridStyledFormControl: import("@emotion/styled").StyledComponent<import("@mui/material").FormControlOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "style" | "color" | "margin" | "sx" | "className" | "classes" | "disabled" | "error" | "fullWidth" | "required" | "size" | "hiddenLabel" | "focused" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
11
+ export declare const StyledBox: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
12
+ export {};
13
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/ServerSideGrid/styles.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,mXAGjB,CAAC;AAEJ,eAAO,MAAM,aAAa,6NAuCvB,CAAC;AAEJ,eAAO,MAAM,MAAM,mXAQhB,CAAC;AAEJ,eAAO,MAAM,mBAAmB,mXAe7B,CAAC;AAEJ,eAAO,MAAM,YAAY,6KAgBtB,CAAC;AAEJ,UAAU,wBAAwB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,mBAAmB,8YAoC/B,CAAC;AAEF,eAAO,MAAM,+BAA+B,ggBAW3C,CAAC;AAEF,eAAO,MAAM,SAAS,mXAMnB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Configuration exports
3
+ * Re-export all configuration and constants
4
+ */
5
+ export * from '../constants';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,cAAc,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * API Constants
3
+ * Central location for all API-related constants including endpoints, HTTP methods, and headers
4
+ */
5
+ export declare const API_CONFIG: {
6
+ readonly BASE_URL: any;
7
+ readonly TIMEOUT: 30000;
8
+ readonly HEADERS: {
9
+ readonly CONTENT_TYPE: "application/json";
10
+ };
11
+ };
12
+ export declare const API_BASE_PATHS: {
13
+ readonly MASTER: "/master";
14
+ };
15
+ export declare const API_ENDPOINTS: {
16
+ readonly ENTITIES: "/master/entities";
17
+ readonly ENTITY_METADATA: (entity: string) => string;
18
+ readonly ENTITY_RECORDS: (entity: string) => string;
19
+ readonly ENTITY_RECORD_BY_ID: (entity: string, id: string | number) => string;
20
+ readonly ENTITY_OPTIONS: (entity: string) => string;
21
+ readonly EXPORT_CSV: (entity: string) => string;
22
+ readonly EXPORT_EXCEL: (entity: string) => string;
23
+ };
24
+ export declare const HTTP_METHODS: {
25
+ readonly GET: "GET";
26
+ readonly POST: "POST";
27
+ readonly PUT: "PUT";
28
+ readonly DELETE: "DELETE";
29
+ readonly PATCH: "PATCH";
30
+ };
31
+ export declare const QUERY_PARAMS: {
32
+ readonly PAGE: "page";
33
+ readonly LIMIT: "limit";
34
+ readonly SEARCH: "search";
35
+ readonly SEARCH_BY: "searchBy";
36
+ readonly SORT_BY: "sortBy";
37
+ readonly SORT_ORDER: "sortOrder";
38
+ };
39
+ export declare const SORT_ORDER: {
40
+ readonly ASC: "ASC";
41
+ readonly DESC: "DESC";
42
+ };
43
+ export declare const RESPONSE_TYPES: {
44
+ readonly JSON: "json";
45
+ readonly BLOB: "blob";
46
+ readonly TEXT: "text";
47
+ };
48
+ export declare const MIME_TYPES: {
49
+ readonly CSV: "text/csv;charset=utf-8;";
50
+ readonly EXCEL: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
51
+ readonly JSON: "application/json";
52
+ };
53
+ export declare const RESPONSE_KEYS: {
54
+ readonly DATA: "data";
55
+ readonly COUNT: "count";
56
+ readonly MESSAGE: "message";
57
+ readonly ERROR: "error";
58
+ };
59
+ //# sourceMappingURL=api.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.constants.d.ts","sourceRoot":"","sources":["../../src/constants/api.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AAGX,eAAO,MAAM,cAAc;;CAEjB,CAAC;AAGX,eAAO,MAAM,aAAa;;uCAGE,MAAM;sCACP,MAAM;2CACD,MAAM,MAAM,MAAM,GAAG,MAAM;sCAChC,MAAM;kCAGV,MAAM;oCACJ,MAAM;CACrB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAGX,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAGX,eAAO,MAAM,cAAc;;;;CAIjB,CAAC;AAGX,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Form Constants
3
+ * Central location for all form-related constants including field types, data types, and validation
4
+ */
5
+ export declare const FORM_MODES: {
6
+ readonly CREATE: "create";
7
+ readonly EDIT: "edit";
8
+ readonly VIEW: "view";
9
+ };
10
+ export type FormMode = typeof FORM_MODES[keyof typeof FORM_MODES];
11
+ export declare const FIELD_TYPES: {
12
+ readonly TEXT: "text";
13
+ readonly DROPDOWN: "dropdown";
14
+ readonly DATEPICKER: "datepicker";
15
+ readonly NUMBER: "number";
16
+ readonly TEXTAREA: "textarea";
17
+ readonly CHECKBOX: "checkbox";
18
+ readonly RADIO: "radio";
19
+ };
20
+ export declare const DATA_TYPES: {
21
+ readonly STRING: "string";
22
+ readonly NUMBER: "number";
23
+ readonly FLOAT: "float";
24
+ readonly DATE: "date";
25
+ readonly DATERANGE: "daterange";
26
+ readonly BOOLEAN: "boolean";
27
+ readonly ARRAY: "array";
28
+ readonly OBJECT: "object";
29
+ };
30
+ export declare const OPTION_TYPES: {
31
+ readonly API: "API";
32
+ readonly RAW: "Raw";
33
+ readonly STATIC: "Static";
34
+ };
35
+ export declare const FIELD_NAMES: {
36
+ readonly ID: "id";
37
+ readonly NAME: "name";
38
+ readonly LABEL: "label";
39
+ readonly VALUE: "value";
40
+ readonly DISPLAY_NAME: "displayName";
41
+ readonly TABLE_NAME: "tableName";
42
+ };
43
+ export declare const VALIDATION_RULES: {
44
+ readonly REQUIRED: "required";
45
+ readonly MIN: "min";
46
+ readonly MAX: "max";
47
+ readonly MIN_LENGTH: "minLength";
48
+ readonly MAX_LENGTH: "maxLength";
49
+ readonly PATTERN: "pattern";
50
+ readonly EMAIL: "email";
51
+ readonly URL: "url";
52
+ };
53
+ export declare const DATE_RANGE_SUFFIXES: {
54
+ readonly FROM: "From";
55
+ readonly TO: "To";
56
+ };
57
+ export declare const INPUT_TYPES: {
58
+ readonly TEXT: "text";
59
+ readonly NUMBER: "number";
60
+ readonly DATE: "date";
61
+ readonly EMAIL: "email";
62
+ readonly PASSWORD: "password";
63
+ readonly TEL: "tel";
64
+ readonly URL: "url";
65
+ };
66
+ export declare const NUMBER_INPUT: {
67
+ readonly FLOAT_STEP: 0.01;
68
+ readonly INTEGER_STEP: 1;
69
+ };
70
+ export declare const REGEX_PATTERNS: {
71
+ readonly ENTITY_MATCH: RegExp;
72
+ };
73
+ //# sourceMappingURL=form.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form.constants.d.ts","sourceRoot":"","sources":["../../src/constants/form.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAGlE,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AAGX,eAAO,MAAM,UAAU;;;;;;;;;CASb,CAAC;AAGX,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAGX,eAAO,MAAM,WAAW;;;;;;;CAOd,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;;;;;;CASnB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAGX,eAAO,MAAM,WAAW;;;;;;;;CAQd,CAAC;AAGX,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAGX,eAAO,MAAM,cAAc;;CAEjB,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Grid Constants
3
+ * Central location for all grid/table-related constants
4
+ */
5
+ export declare const GRID_SETTINGS: {
6
+ readonly DEFAULT_HEIGHT: 500;
7
+ readonly MIN_HEIGHT: 300;
8
+ readonly MAX_HEIGHT: 800;
9
+ readonly DEFAULT_ROW_HEIGHT: 50;
10
+ };
11
+ export declare const PAGINATION_SETTINGS: {
12
+ readonly DEFAULT_PAGE: 1;
13
+ readonly DEFAULT_PAGE_SIZE: 10;
14
+ readonly PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100];
15
+ readonly MIN_PAGE: 1;
16
+ };
17
+ export declare const SORT_SETTINGS: {
18
+ readonly ASC: "asc";
19
+ readonly DESC: "desc";
20
+ };
21
+ export type SortOrder = typeof SORT_SETTINGS[keyof typeof SORT_SETTINGS];
22
+ export declare const GRID_EVENT_SOURCES: {
23
+ readonly UI_COLUMN_SORTED: "uiColumnSorted";
24
+ readonly API: "api";
25
+ readonly COLUMN_MOVED: "columnMoved";
26
+ };
27
+ export declare const GRID_LAYOUT: {
28
+ readonly NORMAL: "normal";
29
+ readonly AUTO_HEIGHT: "autoHeight";
30
+ };
31
+ export declare const ROW_MODEL_TYPES: {
32
+ readonly CLIENT_SIDE: "clientSide";
33
+ readonly SERVER_SIDE: "serverSide";
34
+ readonly INFINITE: "infinite";
35
+ readonly VIEWPORT: "viewport";
36
+ };
37
+ export declare const COLUMN_PROPERTIES: {
38
+ readonly DEFAULT_FLEX: 1;
39
+ readonly ACTION_COLUMN_WIDTH: 150;
40
+ readonly SORTABLE: true;
41
+ readonly FILTER: false;
42
+ };
43
+ export declare const GRID_MESSAGES: {
44
+ readonly NO_DATA: "N/A";
45
+ readonly LOADING: "Loading...";
46
+ readonly NO_RECORDS: "No records found";
47
+ };
48
+ export declare const GRID_CSS_CLASSES: {
49
+ readonly AG_THEME_ALPINE: "ag-theme-alpine";
50
+ readonly AG_THEME_BALHAM: "ag-theme-balham";
51
+ readonly AG_THEME_MATERIAL: "ag-theme-material";
52
+ };
53
+ export declare const GRID_TIMEOUTS: {
54
+ readonly URL_REVOKE: 100;
55
+ };
56
+ //# sourceMappingURL=grid.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid.constants.d.ts","sourceRoot":"","sources":["../../src/constants/grid.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;;;CAKtB,CAAC;AAGX,eAAO,MAAM,aAAa;;;CAGhB,CAAC;AAEX,MAAM,MAAM,SAAS,GAAG,OAAO,aAAa,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAGzE,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAGX,eAAO,MAAM,WAAW;;;CAGd,CAAC;AAGX,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAGX,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC;AAGX,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAGX,eAAO,MAAM,aAAa;;CAEhB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Constants Index
3
+ * Central export point for all constants
4
+ */
5
+ export * from './api.constants';
6
+ export * from './routes.constants';
7
+ export * from './ui.constants';
8
+ export * from './form.constants';
9
+ export * from './grid.constants';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Routes Constants
3
+ * Central location for all application routes and navigation paths
4
+ */
5
+ export declare const ROUTES: {
6
+ readonly ROOT: "/";
7
+ readonly MASTER: "/master";
8
+ readonly MASTER_ENTITY_NEW: (entity: string) => string;
9
+ readonly MASTER_ENTITY_VIEW: (entity: string, id: string | number) => string;
10
+ readonly MASTER_ENTITY_EDIT: (entity: string, id: string | number) => string;
11
+ };
12
+ export declare const ROUTE_PATTERNS: {
13
+ readonly ROOT: "/";
14
+ readonly MASTER: "/master";
15
+ readonly MASTER_ENTITY_NEW: "/master/:entity/new";
16
+ readonly MASTER_ENTITY_VIEW: "/master/:entity/:id";
17
+ readonly MASTER_ENTITY_EDIT: "/master/:entity/:id/edit";
18
+ };
19
+ export declare const ROUTE_KEYS: {
20
+ readonly NEW: "new";
21
+ readonly EDIT: "edit";
22
+ readonly VIEW: "view";
23
+ };
24
+ export declare const URL_PARAMS: {
25
+ readonly ENTITY: "entity";
26
+ readonly ID: "id";
27
+ };
28
+ export declare const ROUTE_SUFFIXES: {
29
+ readonly NEW: "/new";
30
+ readonly EDIT: "/edit";
31
+ };
32
+ //# sourceMappingURL=routes.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.constants.d.ts","sourceRoot":"","sources":["../../src/constants/routes.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,MAAM;;;yCAGW,MAAM;0CACL,MAAM,MAAM,MAAM,GAAG,MAAM;0CAC3B,MAAM,MAAM,MAAM,GAAG,MAAM;CAChD,CAAC;AAGX,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC;AAGX,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAGX,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAGX,eAAO,MAAM,cAAc;;;CAGjB,CAAC"}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * UI Constants
3
+ * Central location for all UI-related constants including labels, messages, and styling values
4
+ */
5
+ export declare const PAGE_TITLES: {
6
+ readonly MASTER_DATA_MANAGEMENT: "Master Data Management";
7
+ readonly ADD_NEW_RECORD: "Add New Record";
8
+ readonly EDIT_RECORD: "Edit Record";
9
+ readonly VIEW_RECORD: "View Record";
10
+ };
11
+ export declare const BUTTON_LABELS: {
12
+ readonly VIEW: "View";
13
+ readonly ADD_NEW_RECORD: "Add New Record";
14
+ readonly EDIT: "Edit";
15
+ readonly CREATE: "Create";
16
+ readonly UPDATE: "Update";
17
+ readonly CANCEL: "Cancel";
18
+ readonly BACK: "Back";
19
+ readonly EXPORT: "Export";
20
+ };
21
+ export declare const FIELD_LABELS: {
22
+ readonly SELECT_ENTITY: "Select Entity";
23
+ readonly ACTIONS: "Actions";
24
+ readonly FROM: "From";
25
+ readonly TO: "To";
26
+ };
27
+ export declare const PLACEHOLDERS: {
28
+ readonly SELECT_ENTITY: "Select Entity";
29
+ readonly SELECT: (label: string) => string;
30
+ readonly FILTER_BY: (label: string) => string;
31
+ };
32
+ export declare const EXPORT_OPTIONS: {
33
+ readonly CSV: "CSV Format";
34
+ readonly EXCEL: "Excel Format";
35
+ };
36
+ export declare const FILE_EXTENSIONS: {
37
+ readonly CSV: "csv";
38
+ readonly EXCEL: "xlsx";
39
+ };
40
+ export declare const ERROR_MESSAGES: {
41
+ readonly FAILED_LOAD_ENTITIES: "Failed to load entities";
42
+ readonly FAILED_LOAD_METADATA: "Failed to load metadata";
43
+ readonly FAILED_LOAD_RECORD: "Failed to load record";
44
+ readonly FAILED_FETCH_LIST: "Failed to fetch list";
45
+ readonly FAILED_SAVE_RECORD: "Failed to save record. Please try again.";
46
+ readonly FAILED_EXPORT_CSV: "Failed to export CSV";
47
+ readonly FAILED_EXPORT_EXCEL: "Failed to export Excel";
48
+ readonly FAILED_LOAD_OPTIONS: (label: string) => string;
49
+ readonly FAILED_LOAD_FORM_CONFIG: "Failed to load form configuration";
50
+ readonly FIELD_REQUIRED: (label: string) => string;
51
+ readonly FIELD_MIN_VALUE: (label: string, min: number) => string;
52
+ readonly FIELD_MAX_VALUE: (label: string, max: number) => string;
53
+ };
54
+ export declare const SUCCESS_MESSAGES: {
55
+ readonly RECORD_CREATED: "Record created successfully";
56
+ readonly RECORD_UPDATED: "Record updated successfully";
57
+ readonly RECORD_DELETED: "Record deleted successfully";
58
+ };
59
+ export declare const VALIDATION_MESSAGES: {
60
+ readonly REQUIRED: "This field is required";
61
+ readonly INVALID_FORMAT: "Invalid format";
62
+ };
63
+ export declare const EMPTY_STATE_MESSAGES: {
64
+ readonly NO_DATA_AVAILABLE: "N/A";
65
+ readonly NO_RECORDS_FOUND: "No records found";
66
+ };
67
+ export declare const LOADING_MESSAGES: {
68
+ readonly LOADING: "Loading...";
69
+ readonly PLEASE_WAIT: "Please wait...";
70
+ };
71
+ export declare const GRID_TEXT: {
72
+ readonly SHOWING: "Showing";
73
+ readonly OF: "of";
74
+ readonly ENTRIES: "entries";
75
+ };
76
+ export declare const CSS_CLASSES: {
77
+ readonly MASTER_VIEW: "master-view";
78
+ readonly MASTER_FORM: "master-form";
79
+ readonly FILTER_SECTION: "filter-section";
80
+ readonly FORM_SECTION: "form-section";
81
+ readonly FILTERS: "filters";
82
+ readonly FILTER_FIELD: "filter-field";
83
+ readonly FORM_FIELD: "form-field";
84
+ readonly FIELD_LABEL: "field-label";
85
+ readonly FIELD_INPUT: "field-input";
86
+ readonly ACTION_BUTTONS: "action-buttons";
87
+ readonly FORM_FIELDS: "form-fields";
88
+ readonly LOADING_CONTAINER: "loading-container";
89
+ };
90
+ export declare const STYLE_CONSTANTS: {
91
+ readonly DEFAULT_TABLE_HEIGHT: 500;
92
+ readonly DEFAULT_PAGE_SIZE: 10;
93
+ readonly DEFAULT_COLUMN_WIDTH: 150;
94
+ readonly MIN_HEIGHT_LOADING: "400px";
95
+ readonly ACTION_BUTTON_GAP: 1;
96
+ readonly FORM_MARGIN_TOP: 3;
97
+ readonly FORM_MARGIN_BOTTOM: 2;
98
+ };
99
+ export declare const PAGE_SIZE_OPTIONS: readonly [10, 20, 50, 100];
100
+ export declare const REQUIRED_INDICATOR = " *";
101
+ export declare const REQUIRED_INDICATOR_COLOR = "red";
102
+ export declare const DISPLAY_FIELD_SUFFIX = "_display";
103
+ export declare const DATE_FORMATS: {
104
+ readonly ISO_DATE: "YYYY-MM-DD";
105
+ readonly DISPLAY_DATE: "DD/MM/YYYY";
106
+ readonly FILE_DATE: "YYYY-MM-DD";
107
+ };
108
+ export declare const ARIA_LABELS: {
109
+ readonly PAGE_SIZE: "Page size";
110
+ };
111
+ //# sourceMappingURL=ui.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.constants.d.ts","sourceRoot":"","sources":["../../src/constants/ui.constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAC;AAGX,eAAO,MAAM,YAAY;;;;;CAKf,CAAC;AAGX,eAAO,MAAM,YAAY;;6BAEP,MAAM;gCACH,MAAM;CACjB,CAAC;AAGX,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAGX,eAAO,MAAM,eAAe;;;CAGlB,CAAC;AAGX,eAAO,MAAM,cAAc;;;;;;;;0CAQI,MAAM;;qCAEX,MAAM;sCACL,MAAM,OAAO,MAAM;sCACnB,MAAM,OAAO,MAAM;CACpC,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAGX,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAGX,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAGX,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAGX,eAAO,MAAM,SAAS;;;;CAIZ,CAAC;AAGX,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAad,CAAC;AAGX,eAAO,MAAM,eAAe;;;;;;;;CAQlB,CAAC;AAGX,eAAO,MAAM,iBAAiB,4BAA6B,CAAC;AAG5D,eAAO,MAAM,kBAAkB,OAAO,CAAC;AACvC,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAG9C,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAG/C,eAAO,MAAM,YAAY;;;;CAIf,CAAC;AAGX,eAAO,MAAM,WAAW;;CAEd,CAAC"}