@attabot/complaint-app 1.0.1 → 1.0.2
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/dist/complaint-app.js +2424 -2183
- package/dist/complaint-app.js.map +1 -1
- package/dist/complaint-app.umd.js +7 -7
- package/dist/complaint-app.umd.js.map +1 -1
- package/dist/index.d.ts +36 -0
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode, CSSProperties, ChangeEvent, KeyboardEvent, MouseEvent } from 'react';
|
|
2
|
+
import type { EnhancedStore } from '@reduxjs/toolkit';
|
|
2
3
|
|
|
3
4
|
export interface SystemItem {
|
|
4
5
|
id?: string | number;
|
|
@@ -20,6 +21,8 @@ export interface SystemItem {
|
|
|
20
21
|
export interface ComplaintAppProps {
|
|
21
22
|
apiUrl?: string;
|
|
22
23
|
authToken?: string;
|
|
24
|
+
/** Optional host-owned Redux store. Defaults to the package complaint store. */
|
|
25
|
+
store?: EnhancedStore;
|
|
23
26
|
basePath?: string;
|
|
24
27
|
/** Static theme file `{ light, dark }` or flat token overrides. */
|
|
25
28
|
theme?: ThemeFile | ThemeTokens;
|
|
@@ -92,6 +95,39 @@ export declare const ApiProvider: (props: ApiProviderProps) => JSX.Element;
|
|
|
92
95
|
export declare function setBaseUrl(url: string): void;
|
|
93
96
|
export declare function setAuthToken(token: string | null): void;
|
|
94
97
|
export declare const api: import('axios').AxiosInstance;
|
|
98
|
+
export declare const store: EnhancedStore;
|
|
99
|
+
export declare function createComplaintStore(preloadedState?: unknown): EnhancedStore;
|
|
100
|
+
|
|
101
|
+
export interface ComplaintResourceState<T = Record<string, unknown>> {
|
|
102
|
+
data: T[];
|
|
103
|
+
selected: T | null;
|
|
104
|
+
pagination: Record<string, unknown> | null;
|
|
105
|
+
isLoading: boolean;
|
|
106
|
+
isMutating: boolean;
|
|
107
|
+
error: string | null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface ComplaintReduxState {
|
|
111
|
+
complaintAppComplaint: {
|
|
112
|
+
types: ComplaintResourceState;
|
|
113
|
+
departments: ComplaintResourceState;
|
|
114
|
+
priorities: ComplaintResourceState;
|
|
115
|
+
workflows: ComplaintResourceState;
|
|
116
|
+
statuses: ComplaintResourceState;
|
|
117
|
+
departmentTree: Record<string, unknown>[];
|
|
118
|
+
workflowSteps: Record<string, unknown>;
|
|
119
|
+
isLoadingDepartmentTree: boolean;
|
|
120
|
+
isLoadingWorkflowSteps: boolean;
|
|
121
|
+
error: string | null;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export declare const COMPLAINT_ENDPOINTS: Readonly<Record<string, string>>;
|
|
126
|
+
export declare const complaintTypeActions: Record<string, unknown>;
|
|
127
|
+
export declare const complaintDepartmentActions: Record<string, unknown>;
|
|
128
|
+
export declare const complaintPriorityActions: Record<string, unknown>;
|
|
129
|
+
export declare const complaintWorkflowActions: Record<string, unknown>;
|
|
130
|
+
export declare const complaintStatusActions: Record<string, unknown>;
|
|
95
131
|
|
|
96
132
|
export declare const DEMO_SYSTEMS: SystemItem[];
|
|
97
133
|
export declare const DEFAULT_PAGE_DESCRIPTION: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attabot/complaint-app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Complaint Management UI package — atomic React components that run on the parent app's auth and API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/complaint-app.umd.js",
|
|
@@ -34,8 +34,10 @@
|
|
|
34
34
|
"author": "",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"peerDependencies": {
|
|
37
|
+
"@reduxjs/toolkit": ">=1.9",
|
|
37
38
|
"react": "^18.0.0 || ^19.0.0",
|
|
38
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
39
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
40
|
+
"react-redux": ">=8"
|
|
39
41
|
},
|
|
40
42
|
"dependencies": {
|
|
41
43
|
"axios": "^1.13.2",
|
|
@@ -43,6 +45,7 @@
|
|
|
43
45
|
"react-router-dom": "^6.30.2"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
48
|
+
"@reduxjs/toolkit": "^2.8.2",
|
|
46
49
|
"@eslint/js": "^9.39.1",
|
|
47
50
|
"@types/react": "^19.2.5",
|
|
48
51
|
"@types/react-dom": "^19.2.3",
|
|
@@ -54,6 +57,7 @@
|
|
|
54
57
|
"prettier": "^3.7.4",
|
|
55
58
|
"react": "^19.0.0",
|
|
56
59
|
"react-dom": "^19.0.0",
|
|
60
|
+
"react-redux": "^9.2.0",
|
|
57
61
|
"typescript": "^7.0.2",
|
|
58
62
|
"vite": "^7.2.4"
|
|
59
63
|
}
|