@codebit-programando-solucoes/codebit-web-antd 1.1.9 → 1.1.20
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/components/CssTokenBridge.d.ts +10 -0
- package/dist/components/LoggedMainContainer.d.ts +3 -2
- package/dist/components/ThemeToggle.d.ts +4 -5
- package/dist/contexts/CodebitConfigContext.d.ts +55 -59
- package/dist/contexts/CodebitThemeContext.d.ts +26 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/index.cjs +978 -441
- package/dist/index.css +65 -64
- package/dist/index.d.ts +0 -1
- package/dist/public-pages/ChangePassword.d.ts +47 -0
- package/dist/public-pages/ForgotPassword.d.ts +45 -0
- package/dist/public-pages/HandleError.d.ts +2 -3
- package/dist/public-pages/Login.d.ts +48 -10
- package/dist/public-pages/LoginContainer.d.ts +13 -13
- package/dist/public-pages/index.d.ts +1 -0
- package/package.json +16 -14
package/dist/index.css
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
+
.listCard-ISftFd {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.listCard-ISftFd .headerRow-UsZAzP {
|
|
7
|
+
margin-bottom: var(--antd-padding-lg);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.listCard-ISftFd .headerRow-UsZAzP .actions-ig53s2 {
|
|
11
|
+
justify-content: flex-end;
|
|
12
|
+
gap: var(--antd-margin-xs);
|
|
13
|
+
display: flex;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.listCard-ISftFd .headerRow-UsZAzP h4 {
|
|
17
|
+
margin: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.listCard-ISftFd .filtersRow-f3Xk5a {
|
|
21
|
+
margin-bottom: var(--antd-padding-lg);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.listCard-ISftFd .filtersRow-f3Xk5a .ant-col > * {
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.listCard-ISftFd .ant-card-body {
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 100%;
|
|
32
|
+
display: flex;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.listCard-ISftFd .expandArea-czOoFS {
|
|
36
|
+
background-color: var(--antd-color-bg-container);
|
|
37
|
+
flex: 1;
|
|
38
|
+
position: relative;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.listCard-ISftFd .ant-pagination {
|
|
43
|
+
margin: 0 !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.listCard-ISftFd .ant-table-pagination {
|
|
47
|
+
padding-top: var(--antd-padding-lg);
|
|
48
|
+
background: var(--antd-color-bg-container);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.tableContainer-EhNwOm {
|
|
52
|
+
flex: 1;
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.tableContainer-EhNwOm .ant-table-body {
|
|
58
|
+
height: 100vh;
|
|
59
|
+
}
|
|
60
|
+
|
|
1
61
|
.layout-mL5o6I {
|
|
2
62
|
height: 100vh;
|
|
3
63
|
position: fixed;
|
|
@@ -113,72 +173,12 @@
|
|
|
113
173
|
position: relative;
|
|
114
174
|
}
|
|
115
175
|
|
|
116
|
-
.listCard-ISftFd {
|
|
117
|
-
width: 100%;
|
|
118
|
-
height: 100%;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.listCard-ISftFd .headerRow-UsZAzP {
|
|
122
|
-
margin-bottom: var(--antd-padding-lg);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.listCard-ISftFd .headerRow-UsZAzP .actions-ig53s2 {
|
|
126
|
-
justify-content: flex-end;
|
|
127
|
-
gap: var(--antd-margin-xs);
|
|
128
|
-
display: flex;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.listCard-ISftFd .headerRow-UsZAzP h4 {
|
|
132
|
-
margin: 0;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.listCard-ISftFd .filtersRow-f3Xk5a {
|
|
136
|
-
margin-bottom: var(--antd-padding-lg);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.listCard-ISftFd .filtersRow-f3Xk5a .ant-col > * {
|
|
140
|
-
width: 100%;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.listCard-ISftFd .ant-card-body {
|
|
144
|
-
flex-direction: column;
|
|
145
|
-
width: 100%;
|
|
146
|
-
height: 100%;
|
|
147
|
-
display: flex;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.listCard-ISftFd .expandArea-czOoFS {
|
|
151
|
-
background-color: var(--antd-color-bg-container);
|
|
152
|
-
flex: 1;
|
|
153
|
-
position: relative;
|
|
154
|
-
overflow: hidden;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.listCard-ISftFd .ant-pagination {
|
|
158
|
-
margin: 0 !important;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.listCard-ISftFd .ant-table-pagination {
|
|
162
|
-
padding-top: var(--antd-padding-lg);
|
|
163
|
-
background: var(--antd-color-bg-container);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.tableContainer-EhNwOm {
|
|
167
|
-
flex: 1;
|
|
168
|
-
width: 100%;
|
|
169
|
-
height: 100%;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.tableContainer-EhNwOm .ant-table-body {
|
|
173
|
-
height: 100vh;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
176
|
.containerRow-lnjnDt {
|
|
177
177
|
min-height: 100vh;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
.themeRow-ZhL0jS {
|
|
181
|
-
margin-bottom:
|
|
181
|
+
margin-bottom: var(--antd-margin);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
.loginCard-k07Wjb {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
.titleRow-XMkFzo {
|
|
193
|
-
margin-bottom:
|
|
193
|
+
margin-bottom: var(--antd-margin-sm);
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.appTitle-tL41k9 {
|
|
@@ -198,12 +198,13 @@
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
.divider-oJpEKR {
|
|
201
|
-
margin:
|
|
201
|
+
margin: var(--antd-margin-xs) 0;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
.loginHeader-bBGO5B {
|
|
205
205
|
text-align: center;
|
|
206
|
-
margin-
|
|
206
|
+
margin-top: 0;
|
|
207
|
+
margin-bottom: var(--antd-margin);
|
|
207
208
|
font-weight: normal;
|
|
208
209
|
}
|
|
209
210
|
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React = require('react');
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Possible results for password change operations.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Represents the outcome of a password change attempt.
|
|
8
|
+
*/
|
|
9
|
+
export enum LocalLoginChangePasswordResult {
|
|
10
|
+
INVALID_TOKEN = 'INVALID_TOKEN',
|
|
11
|
+
SUCCESS = 'SUCCESS',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Context interface for login flow navigation and parameters.
|
|
16
|
+
*
|
|
17
|
+
* @property navigate - Function to redirect to different routes
|
|
18
|
+
* @property params - URL parameters from React Router
|
|
19
|
+
*/
|
|
20
|
+
export interface LocalLoginConfContext {
|
|
21
|
+
navigate: (to: string) => void;
|
|
22
|
+
params: Record<string, string | undefined>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Props for the ChangePassword component.
|
|
27
|
+
*
|
|
28
|
+
* @property navigateToLogin - Callback to redirect to login screen
|
|
29
|
+
* @property checkToken - Validates the password reset token
|
|
30
|
+
* @property submitChangePassword - Submits new password with token validation
|
|
31
|
+
*/
|
|
32
|
+
export interface ChangePasswordProps {
|
|
33
|
+
navigateToLogin: (context: LocalLoginConfContext) => Promise<void>;
|
|
34
|
+
checkToken: (context: LocalLoginConfContext) => Promise<boolean>;
|
|
35
|
+
submitChangePassword: (
|
|
36
|
+
password: string,
|
|
37
|
+
context: LocalLoginConfContext,
|
|
38
|
+
) => Promise<LocalLoginChangePasswordResult>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Password change interface component.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Handles user password reset with token validation and form submission. Requires implementation of all callback functions for authentication flow.
|
|
46
|
+
*/
|
|
47
|
+
export declare const ChangePassword: React.FC<ChangePasswordProps>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/** Enumeration of possible statuses for password recovery operations. */
|
|
4
|
+
export declare enum LocalLoginRecoveryPasswordResult {
|
|
5
|
+
INVALID_EMAIL = 'INVALID_EMAIL',
|
|
6
|
+
RECAPTCHA_VALIDATION_FAIL = 'RECAPTCHA_VALIDATION_FAIL',
|
|
7
|
+
SUCCESS = 'SUCCESS',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Context object used for navigation within authentication flows. Contains navigation functions to redirect between authentication screens. */
|
|
11
|
+
export interface LocalLoginConfContext {
|
|
12
|
+
/**
|
|
13
|
+
* Redirects to the specified route path.
|
|
14
|
+
*
|
|
15
|
+
* @param path - Target navigation path
|
|
16
|
+
* @param ...args - Additional navigation parameters
|
|
17
|
+
*/
|
|
18
|
+
navigate: (path: string, ...args: any[]) => void;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Properties for the ForgotPassword component. */
|
|
22
|
+
export interface ForgotPasswordProps {
|
|
23
|
+
/**
|
|
24
|
+
* Optional callback to handle navigation back to login screen.
|
|
25
|
+
*
|
|
26
|
+
* @param context - Navigation context for redirects
|
|
27
|
+
* @returns Promise resolving when navigation completes
|
|
28
|
+
*/
|
|
29
|
+
navigateToLogin?: (context: LocalLoginConfContext) => Promise<void>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Submits password recovery request for specified email.
|
|
33
|
+
*
|
|
34
|
+
* @param email - User's email address for recovery
|
|
35
|
+
* @param context - Navigation context for post-submission actions
|
|
36
|
+
* @returns Promise with recovery operation status
|
|
37
|
+
*/
|
|
38
|
+
submitRecoveryPassword: (
|
|
39
|
+
email: string,
|
|
40
|
+
context: LocalLoginConfContext,
|
|
41
|
+
) => Promise<LocalLoginRecoveryPasswordResult>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Renders a password recovery form with email validation and submission handling. Integrates with authentication flows to manage state transitions. */
|
|
45
|
+
export declare const ForgotPassword: React.FC<ForgotPasswordProps>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
/** Props for the HandleError component */
|
|
4
3
|
export interface HandleErrorProps {
|
|
5
|
-
/** Optional title to display above the error message */
|
|
4
|
+
/** Optional title to display above the error message. */
|
|
6
5
|
title?: string;
|
|
7
6
|
}
|
|
8
7
|
|
|
@@ -12,6 +11,6 @@ export interface HandleErrorProps {
|
|
|
12
11
|
* Displays an error page based on the route error status (404, 403, 500, or generic error). Provides a button to navigate back to the home page.
|
|
13
12
|
*
|
|
14
13
|
* @param props - Component props
|
|
15
|
-
* @returns JSX
|
|
14
|
+
* @returns React JSX element representing the error page layout
|
|
16
15
|
*/
|
|
17
16
|
export function HandleError(props: HandleErrorProps): React.JSX.Element;
|
|
@@ -1,19 +1,57 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/** Enumeration of possible authentication result codes. */
|
|
4
|
+
export enum LocalLoginAuthenticationResult {
|
|
5
|
+
INVALID_EMAIL = 'INVALID_EMAIL',
|
|
6
|
+
INVALID_PASSWORD = 'INVALID_PASSWORD',
|
|
7
|
+
INVALID_EMAIL_OR_PASSWORD = 'INVALID_EMAIL_OR_PASSWORD',
|
|
8
|
+
RECAPTCHA_VALIDATION_FAIL = 'RECAPTCHA_VALIDATION_FAIL',
|
|
9
|
+
USER_DISABLED = 'USER_DISABLED',
|
|
10
|
+
SUCCESS = 'SUCCESS',
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Context object passed to navigation and authentication callback functions. */
|
|
14
|
+
export interface LocalLoginConfContext {
|
|
15
|
+
/**
|
|
16
|
+
* Function to navigate to another route.
|
|
17
|
+
*
|
|
18
|
+
* @param path - The path to navigate to.
|
|
19
|
+
*/
|
|
20
|
+
navigate: (path: string) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Props for the Login component. */
|
|
4
24
|
export interface LoginProps {
|
|
5
|
-
/**
|
|
25
|
+
/** Optional title for the login container. */
|
|
6
26
|
title?: string | React.ReactNode;
|
|
27
|
+
/** URL for the OAuth callback when using Google login. */
|
|
28
|
+
oauthCallbackUrl?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Callback function to navigate to password recovery flow.
|
|
31
|
+
*
|
|
32
|
+
* @param context - Navigation context for route handling
|
|
33
|
+
*/
|
|
34
|
+
navigateToForgotPassword?: (
|
|
35
|
+
context: LocalLoginConfContext,
|
|
36
|
+
) => Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Handles local user authentication process.
|
|
39
|
+
*
|
|
40
|
+
* @param email - User's email address
|
|
41
|
+
* @param password - User's password
|
|
42
|
+
* @param context - Navigation context
|
|
43
|
+
* @returns Authentication status result
|
|
44
|
+
*/
|
|
45
|
+
submitAuthenticateLocalUser?: (
|
|
46
|
+
email: string,
|
|
47
|
+
password: string,
|
|
48
|
+
context: LocalLoginConfContext,
|
|
49
|
+
) => Promise<LocalLoginAuthenticationResult>;
|
|
7
50
|
}
|
|
8
51
|
|
|
9
52
|
/**
|
|
10
|
-
* Login component
|
|
11
|
-
*
|
|
12
|
-
* This component displays a login button that redirects to the configured OAuth callback URL. It must be used within a CodebitConfigProvider context to access the OAuth
|
|
13
|
-
* configuration.
|
|
53
|
+
* Login component providing both local and OAuth authentication methods.
|
|
14
54
|
*
|
|
15
|
-
* @param props -
|
|
16
|
-
* @returns Login screen with Google login button
|
|
17
|
-
* @throws Error if used outside CodebitConfigProvider context
|
|
55
|
+
* @param props - Login configuration parameters
|
|
18
56
|
*/
|
|
19
|
-
export
|
|
57
|
+
export declare const Login: React.FunctionComponent<LoginProps>;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
/** Props for the LoginContainer component */
|
|
4
|
-
export interface LoginContainerProps {
|
|
5
|
-
/** Title to display in the login container */
|
|
6
|
-
title: string | React.ReactNode;
|
|
7
|
-
/** Child components to render inside the container */
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
3
|
/**
|
|
12
4
|
* Container component for login screens.
|
|
13
5
|
*
|
|
14
|
-
* Provides a centered card layout with theme toggle and title display.
|
|
6
|
+
* Provides a centered card layout with theme toggle and title display. Must be used within a CodebitConfigProvider context to access theme settings.
|
|
15
7
|
*
|
|
16
|
-
* @param props -
|
|
17
|
-
* @returns JSX
|
|
18
|
-
* @throws Error
|
|
8
|
+
* @param props - Configuration for the login container
|
|
9
|
+
* @returns JSX element for login layout
|
|
10
|
+
* @throws {Error} When used outside of CodebitThemeContext
|
|
19
11
|
*/
|
|
20
|
-
export function LoginContainer(props: LoginContainerProps): React.
|
|
12
|
+
export function LoginContainer(props: LoginContainerProps): React.ReactElement;
|
|
13
|
+
|
|
14
|
+
/** Props interface for LoginContainer component */
|
|
15
|
+
export interface LoginContainerProps {
|
|
16
|
+
/** Title to display in the login container (string or React node) */
|
|
17
|
+
title: string | React.ReactNode;
|
|
18
|
+
/** Child components to render inside the container */
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codebit-programando-solucoes/codebit-web-antd",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"main": "./dist/index.cjs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -20,22 +20,24 @@
|
|
|
20
20
|
"./dist/*.css": "./dist/*.css"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@ant-design/icons": "^6.1.0",
|
|
24
|
-
"@codebit-programando-solucoes/codebit-web": "",
|
|
25
|
-
"@sentry/react": "^10.26.0",
|
|
26
|
-
"antd": "^5.28.1",
|
|
27
23
|
"i18next": "^25.6.2",
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
"react
|
|
33
|
-
"
|
|
24
|
+
"react-i18next": "^16.3.5"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"@codebit-programando-solucoes/codebit-web": ">=1.1.6",
|
|
28
|
+
"react": ">=19.2.0",
|
|
29
|
+
"react-dom": ">=19.2.0",
|
|
30
|
+
"react-router": ">=7.12.0",
|
|
31
|
+
"prop-types": ">=15.8.1",
|
|
32
|
+
"antd": ">=5.29.3",
|
|
33
|
+
"@ant-design/icons": ">=6.1.0",
|
|
34
|
+
"@sentry/react": ">=10.26.0",
|
|
35
|
+
"sass": ">=1.94.0"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
|
-
"@eslint/js": "^9.39.
|
|
37
|
-
"@rsbuild/plugin-react": "
|
|
38
|
-
"@rsbuild/plugin-sass": "
|
|
38
|
+
"@eslint/js": "^9.39.2",
|
|
39
|
+
"@rsbuild/plugin-react": "1.4.3",
|
|
40
|
+
"@rsbuild/plugin-sass": "1.4.1",
|
|
39
41
|
"@rslib/core": "^0.18.0",
|
|
40
42
|
"@swc/core": "^1.13.5",
|
|
41
43
|
"cross-env": "^10.0.0",
|