@salesforce/webapp-template-feature-react-authentication-experimental 1.71.0 → 1.71.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/dist/CHANGELOG.md +8 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/package.json +3 -3
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/components/alerts/status-alert.tsx +49 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/components/layouts/card-layout.tsx +29 -0
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/footers/footer-link.tsx +1 -1
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/forms/auth-form.tsx +3 -3
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/forms/submit-button.tsx +3 -3
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/hooks/form.tsx +3 -3
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/layout/card-skeleton.tsx +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/layout/centered-page-layout.tsx +1 -1
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/layouts/AuthAppLayout.tsx +1 -1
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/pages/ResetPassword.tsx +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/sessionTimeout/SessionTimeoutValidator.tsx +3 -3
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/routes.tsx +10 -10
- package/dist/package.json +1 -1
- package/package.json +2 -2
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/auth/alerts/status-alert.tsx +0 -45
- package/dist/force-app/main/default/webapplications/feature-react-authentication/src/auth/layout/card-layout.tsx +0 -29
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/authHelpers.ts +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/authenticationConfig.ts +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/context/AuthContext.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/hooks/useCountdownTimer.ts +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/hooks/useRetryWithBackoff.ts +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/layouts/authenticationRouteLayout.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/layouts/privateRouteLayout.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/pages/ChangePassword.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/pages/ForgotPassword.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/pages/Login.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/pages/Profile.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/pages/Register.tsx +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/sessionTimeout/sessionTimeService.ts +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/sessionTimeout/sessionTimeoutConfig.ts +0 -0
- /package/dist/force-app/main/default/webapplications/feature-react-authentication/src/{auth → features/authentication}/utils/helpers.ts +0 -0
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.71.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.71.0...v1.71.1) (2026-03-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [1.71.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.70.0...v1.71.0) (2026-03-05)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
package/dist/force-app/main/default/webapplications/feature-react-authentication/package.json
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.71.
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.71.
|
|
18
|
+
"@salesforce/sdk-data": "^1.71.1",
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.71.1",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"@tanstack/react-form": "^1.28.4",
|
|
22
22
|
"class-variance-authority": "^0.7.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
41
41
|
"@graphql-tools/utils": "^11.0.0",
|
|
42
42
|
"@playwright/test": "^1.49.0",
|
|
43
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.71.
|
|
43
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.71.1",
|
|
44
44
|
"@testing-library/jest-dom": "^6.6.3",
|
|
45
45
|
"@testing-library/react": "^16.1.0",
|
|
46
46
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { AlertCircleIcon, CheckCircle2Icon } from 'lucide-react';
|
|
3
|
+
import { Alert, AlertDescription } from '../../components/ui/alert';
|
|
4
|
+
import { useId } from 'react';
|
|
5
|
+
|
|
6
|
+
const statusAlertVariants = cva('', {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
error: '',
|
|
10
|
+
success: '',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
variant: 'error',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
interface StatusAlertProps extends VariantProps<typeof statusAlertVariants> {
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
/** Alert variant type. @default "error" */
|
|
21
|
+
variant?: 'error' | 'success';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Status alert component for displaying error or success messages.
|
|
26
|
+
* Returns null if no children are provided.
|
|
27
|
+
*/
|
|
28
|
+
export function StatusAlert({ children, variant = 'error' }: StatusAlertProps) {
|
|
29
|
+
if (!children) return null;
|
|
30
|
+
|
|
31
|
+
const isError = variant === 'error';
|
|
32
|
+
const descriptionId = useId();
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Alert
|
|
36
|
+
variant={isError ? 'destructive' : 'default'}
|
|
37
|
+
className={statusAlertVariants({ variant })}
|
|
38
|
+
aria-describedby={descriptionId}
|
|
39
|
+
role={isError ? 'alert' : 'status'}
|
|
40
|
+
>
|
|
41
|
+
{isError ? (
|
|
42
|
+
<AlertCircleIcon aria-hidden="true" />
|
|
43
|
+
) : (
|
|
44
|
+
<CheckCircle2Icon aria-hidden="true" />
|
|
45
|
+
)}
|
|
46
|
+
<AlertDescription id={descriptionId}>{children}</AlertDescription>
|
|
47
|
+
</Alert>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CardContent,
|
|
4
|
+
CardDescription,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardTitle,
|
|
7
|
+
} from '../../components/ui/card';
|
|
8
|
+
|
|
9
|
+
interface CardLayoutProps {
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Card layout component for authentication pages.
|
|
17
|
+
* Provides CardHeader with title and optional description, and CardContent.
|
|
18
|
+
*/
|
|
19
|
+
export function CardLayout({ title, description, children }: CardLayoutProps) {
|
|
20
|
+
return (
|
|
21
|
+
<Card>
|
|
22
|
+
<CardHeader>
|
|
23
|
+
<CardTitle className="text-2xl">{title}</CardTitle>
|
|
24
|
+
{description && <CardDescription>{description}</CardDescription>}
|
|
25
|
+
</CardHeader>
|
|
26
|
+
<CardContent>{children}</CardContent>
|
|
27
|
+
</Card>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Link } from "react-router";
|
|
2
|
-
import { cn } from "
|
|
2
|
+
import { cn } from "../../../lib/utils";
|
|
3
3
|
|
|
4
4
|
interface FooterLinkProps extends Omit<React.ComponentProps<typeof Link>, "children"> {
|
|
5
5
|
/** Link text prefix (e.g., "Don't have an account?") */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FieldGroup } from "
|
|
2
|
-
import { StatusAlert } from "
|
|
1
|
+
import { FieldGroup } from "../../../components/ui/field";
|
|
2
|
+
import { StatusAlert } from "../../../components/alerts/status-alert";
|
|
3
3
|
import { FooterLink } from "../footers/footer-link";
|
|
4
4
|
import { SubmitButton } from "./submit-button";
|
|
5
|
-
import { CardLayout } from "
|
|
5
|
+
import { CardLayout } from "../../../components/layouts/card-layout";
|
|
6
6
|
import { useFormContext } from "../hooks/form";
|
|
7
7
|
import { useId } from "react";
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Button } from "
|
|
2
|
-
import { Spinner } from "
|
|
3
|
-
import { cn } from "
|
|
1
|
+
import { Button } from "../../../components/ui/button";
|
|
2
|
+
import { Spinner } from "../../../components/ui/spinner";
|
|
3
|
+
import { cn } from "../../../lib/utils";
|
|
4
4
|
import { useFormContext } from "../hooks/form";
|
|
5
5
|
|
|
6
6
|
interface SubmitButtonProps extends Omit<React.ComponentProps<typeof Button>, "type"> {
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
FieldDescription,
|
|
6
6
|
FieldError,
|
|
7
7
|
FieldLabel,
|
|
8
|
-
} from "
|
|
9
|
-
import { Input } from "
|
|
10
|
-
import { cn } from "
|
|
8
|
+
} from "../../../components/ui/field";
|
|
9
|
+
import { Input } from "../../../components/ui/input";
|
|
10
|
+
import { cn } from "../../../lib/utils";
|
|
11
11
|
import { AUTH_PLACEHOLDERS } from "../authenticationConfig";
|
|
12
12
|
|
|
13
13
|
// Create form hook contexts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CenteredPageLayout } from "./centered-page-layout";
|
|
2
|
-
import { Card, CardContent, CardHeader } from "
|
|
3
|
-
import { Skeleton } from "
|
|
2
|
+
import { Card, CardContent, CardHeader } from "../../../components/ui/card";
|
|
3
|
+
import { Skeleton } from "../../../components/ui/skeleton";
|
|
4
4
|
|
|
5
5
|
interface CardSkeletonProps {
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import SessionTimeoutValidator from "../sessionTimeout/SessionTimeoutValidator";
|
|
2
2
|
import { AuthProvider } from "../context/AuthContext";
|
|
3
|
-
import AppLayout from "
|
|
3
|
+
import AppLayout from "../../../appLayout";
|
|
4
4
|
|
|
5
5
|
export default function AuthAppLayout() {
|
|
6
6
|
return (
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { Link, useSearchParams } from "react-router";
|
|
3
|
-
import { CardLayout } from "
|
|
3
|
+
import { CardLayout } from "../../../components/layouts/card-layout";
|
|
4
4
|
import { CenteredPageLayout } from "../layout/centered-page-layout";
|
|
5
5
|
import { AuthForm } from "../forms/auth-form";
|
|
6
|
-
import { StatusAlert } from "
|
|
6
|
+
import { StatusAlert } from "../../../components/alerts/status-alert";
|
|
7
7
|
import { useAppForm } from "../hooks/form";
|
|
8
8
|
import { getDataSDK } from "@salesforce/sdk-data";
|
|
9
9
|
import { ROUTES, AUTH_PLACEHOLDERS } from "../authenticationConfig";
|
|
@@ -10,8 +10,8 @@ import { useAuth } from "../context/AuthContext";
|
|
|
10
10
|
import { pollSessionTimeServlet, extendSessionTime } from "./sessionTimeService";
|
|
11
11
|
import { useCountdownTimer } from "../hooks/useCountdownTimer";
|
|
12
12
|
import { useRetryWithBackoff } from "../hooks/useRetryWithBackoff";
|
|
13
|
-
import { Alert, AlertTitle, AlertDescription } from "
|
|
14
|
-
import { Button } from "
|
|
13
|
+
import { Alert, AlertTitle, AlertDescription } from "../../../components/ui/alert";
|
|
14
|
+
import { Button } from "../../../components/ui/button";
|
|
15
15
|
import {
|
|
16
16
|
Dialog,
|
|
17
17
|
DialogContent,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
DialogTitle,
|
|
20
20
|
DialogDescription,
|
|
21
21
|
DialogFooter,
|
|
22
|
-
} from "
|
|
22
|
+
} from "../../../components/ui/dialog";
|
|
23
23
|
import {
|
|
24
24
|
STORAGE_KEYS,
|
|
25
25
|
LABELS,
|
package/dist/force-app/main/default/webapplications/feature-react-authentication/src/routes.tsx
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { RouteObject } from 'react-router';
|
|
2
2
|
import Home from './pages/Home';
|
|
3
3
|
import NotFound from './pages/NotFound';
|
|
4
|
-
import AuthAppLayout from "./
|
|
5
|
-
import Login from "./
|
|
6
|
-
import Register from "./
|
|
7
|
-
import ForgotPassword from "./
|
|
8
|
-
import ResetPassword from "./
|
|
9
|
-
import Profile from "./
|
|
10
|
-
import ChangePassword from "./
|
|
11
|
-
import AuthenticationRoute from "./
|
|
12
|
-
import PrivateRoute from "./
|
|
13
|
-
import { ROUTES } from "./
|
|
4
|
+
import AuthAppLayout from "./features/authentication/layouts/AuthAppLayout";
|
|
5
|
+
import Login from "./features/authentication/pages/Login";
|
|
6
|
+
import Register from "./features/authentication/pages/Register";
|
|
7
|
+
import ForgotPassword from "./features/authentication/pages/ForgotPassword";
|
|
8
|
+
import ResetPassword from "./features/authentication/pages/ResetPassword";
|
|
9
|
+
import Profile from "./features/authentication/pages/Profile";
|
|
10
|
+
import ChangePassword from "./features/authentication/pages/ChangePassword";
|
|
11
|
+
import AuthenticationRoute from "./features/authentication/layouts/authenticationRouteLayout";
|
|
12
|
+
import PrivateRoute from "./features/authentication/layouts/privateRouteLayout";
|
|
13
|
+
import { ROUTES } from "./features/authentication/authenticationConfig";
|
|
14
14
|
|
|
15
15
|
export const routes: RouteObject[] = [
|
|
16
16
|
{
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-feature-react-authentication-experimental",
|
|
3
|
-
"version": "1.71.
|
|
3
|
+
"version": "1.71.1",
|
|
4
4
|
"description": "Authentication feature for web applications",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean": "rm -rf dist"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.71.
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.71.1",
|
|
20
20
|
"@tanstack/react-form": "^1.27.7",
|
|
21
21
|
"@types/react": "^19.2.7",
|
|
22
22
|
"@types/react-dom": "^19.2.3",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
2
|
-
import { AlertCircleIcon, CheckCircle2Icon } from "lucide-react";
|
|
3
|
-
import { Alert, AlertDescription } from "../../components/ui/alert";
|
|
4
|
-
import { useId } from "react";
|
|
5
|
-
|
|
6
|
-
const statusAlertVariants = cva("", {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
error: "",
|
|
10
|
-
success: "",
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
defaultVariants: {
|
|
14
|
-
variant: "error",
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
interface StatusAlertProps extends VariantProps<typeof statusAlertVariants> {
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
/** Alert variant type. @default "error" */
|
|
21
|
-
variant?: "error" | "success";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Status alert component for displaying error or success messages.
|
|
26
|
-
* Returns null if no children are provided.
|
|
27
|
-
*/
|
|
28
|
-
export function StatusAlert({ children, variant = "error" }: StatusAlertProps) {
|
|
29
|
-
if (!children) return null;
|
|
30
|
-
|
|
31
|
-
const isError = variant === "error";
|
|
32
|
-
const descriptionId = useId();
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Alert
|
|
36
|
-
variant={isError ? "destructive" : "default"}
|
|
37
|
-
className={statusAlertVariants({ variant })}
|
|
38
|
-
aria-describedby={descriptionId}
|
|
39
|
-
role={isError ? "alert" : "status"}
|
|
40
|
-
>
|
|
41
|
-
{isError ? <AlertCircleIcon aria-hidden="true" /> : <CheckCircle2Icon aria-hidden="true" />}
|
|
42
|
-
<AlertDescription id={descriptionId}>{children}</AlertDescription>
|
|
43
|
-
</Alert>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Card,
|
|
3
|
-
CardContent,
|
|
4
|
-
CardDescription,
|
|
5
|
-
CardHeader,
|
|
6
|
-
CardTitle,
|
|
7
|
-
} from "../../components/ui/card";
|
|
8
|
-
|
|
9
|
-
interface CardLayoutProps {
|
|
10
|
-
title: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Card layout component for authentication pages.
|
|
17
|
-
* Provides CardHeader with title and optional description, and CardContent.
|
|
18
|
-
*/
|
|
19
|
-
export function CardLayout({ title, description, children }: CardLayoutProps) {
|
|
20
|
-
return (
|
|
21
|
-
<Card>
|
|
22
|
-
<CardHeader>
|
|
23
|
-
<CardTitle className="text-2xl">{title}</CardTitle>
|
|
24
|
-
{description && <CardDescription>{description}</CardDescription>}
|
|
25
|
-
</CardHeader>
|
|
26
|
-
<CardContent>{children}</CardContent>
|
|
27
|
-
</Card>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|