@solidstarters/solid-core-ui 1.1.16 → 1.1.18
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/auth/AuthLayout.d.ts +4 -0
- package/dist/components/auth/AuthLayout.d.ts.map +1 -0
- package/dist/components/auth/AuthLayout.js +80 -0
- package/dist/components/auth/AuthLayout.js.map +1 -0
- package/dist/components/auth/ForgotPasswordThankYou.d.ts +2 -0
- package/dist/components/auth/ForgotPasswordThankYou.d.ts.map +1 -0
- package/dist/components/auth/ForgotPasswordThankYou.js +16 -0
- package/dist/components/auth/ForgotPasswordThankYou.js.map +1 -0
- package/dist/components/auth/GoogleAuthChecking.d.ts +2 -0
- package/dist/components/auth/GoogleAuthChecking.d.ts.map +1 -0
- package/dist/components/auth/GoogleAuthChecking.js +99 -0
- package/dist/components/auth/GoogleAuthChecking.js.map +1 -0
- package/dist/components/auth/SolidChangeForcePassword.d.ts.map +1 -1
- package/dist/components/auth/SolidChangeForcePassword.js +44 -39
- package/dist/components/auth/SolidChangeForcePassword.js.map +1 -1
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidForgotPassword.js +1 -2
- package/dist/components/auth/SolidForgotPassword.js.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.d.ts +1 -3
- package/dist/components/auth/SolidInitialLoginOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitialLoginOtp.js +16 -12
- package/dist/components/auth/SolidInitialLoginOtp.js.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.d.ts +1 -3
- package/dist/components/auth/SolidInitiateRegisterOtp.d.ts.map +1 -1
- package/dist/components/auth/SolidInitiateRegisterOtp.js +16 -12
- package/dist/components/auth/SolidInitiateRegisterOtp.js.map +1 -1
- package/dist/components/auth/SolidLogin.d.ts.map +1 -1
- package/dist/components/auth/SolidLogin.js +12 -8
- package/dist/components/auth/SolidLogin.js.map +1 -1
- package/dist/components/auth/SolidRegister.d.ts.map +1 -1
- package/dist/components/auth/SolidRegister.js +13 -9
- package/dist/components/auth/SolidRegister.js.map +1 -1
- package/dist/components/auth/SolidResetPassword.d.ts +1 -4
- package/dist/components/auth/SolidResetPassword.d.ts.map +1 -1
- package/dist/components/auth/SolidResetPassword.js +14 -10
- package/dist/components/auth/SolidResetPassword.js.map +1 -1
- package/dist/components/common/GeneralSettings.d.ts +1 -3
- package/dist/components/common/GeneralSettings.d.ts.map +1 -1
- package/dist/components/common/GeneralSettings.js +21 -18
- package/dist/components/common/GeneralSettings.js.map +1 -1
- package/dist/components/common/NotFound.d.ts +2 -0
- package/dist/components/common/NotFound.d.ts.map +1 -0
- package/dist/components/common/NotFound.js +7 -0
- package/dist/components/common/NotFound.js.map +1 -0
- package/dist/components/common/SingleSelectAutoCompleteField.d.ts.map +1 -1
- package/dist/components/common/SingleSelectAutoCompleteField.js +3 -1
- package/dist/components/common/SingleSelectAutoCompleteField.js.map +1 -1
- package/dist/components/common/SocialMediaLogin.d.ts.map +1 -1
- package/dist/components/common/SocialMediaLogin.js +3 -2
- package/dist/components/common/SocialMediaLogin.js.map +1 -1
- package/dist/components/common/SolidAdmin.d.ts +2 -0
- package/dist/components/common/SolidAdmin.d.ts.map +1 -0
- package/dist/components/common/SolidAdmin.js +5 -0
- package/dist/components/common/SolidAdmin.js.map +1 -0
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +8 -1
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidThemeLink.d.ts +2 -0
- package/dist/components/common/SolidThemeLink.d.ts.map +1 -0
- package/dist/components/common/SolidThemeLink.js +5 -0
- package/dist/components/common/SolidThemeLink.js.map +1 -0
- package/dist/components/common/error.d.ts +9 -0
- package/dist/components/common/error.d.ts.map +1 -0
- package/dist/components/common/error.js +7 -0
- package/dist/components/common/error.js.map +1 -0
- package/dist/components/core/common/FilterComponent.js +7 -7
- package/dist/components/core/common/FilterComponent.js.map +1 -1
- package/dist/components/core/common/SolidConfigureLayoutElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidConfigureLayoutElement.js +4 -3
- package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +38 -18
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/form/SolidFormLayouts.d.ts +3 -0
- package/dist/components/core/form/SolidFormLayouts.d.ts.map +1 -0
- package/dist/components/core/form/SolidFormLayouts.js +57 -0
- package/dist/components/core/form/SolidFormLayouts.js.map +1 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +13 -1
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidBooleanField.js +9 -7
- package/dist/components/core/form/fields/SolidBooleanField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateField.js +7 -5
- package/dist/components/core/form/fields/SolidDateField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDateTimeField.js +7 -5
- package/dist/components/core/form/fields/SolidDateTimeField.js.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidDecimalField.js +9 -7
- package/dist/components/core/form/fields/SolidDecimalField.js.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidIntegerField.js +9 -7
- package/dist/components/core/form/fields/SolidIntegerField.js.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidJsonField.js +6 -4
- package/dist/components/core/form/fields/SolidJsonField.js.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidLongTextField.js +8 -6
- package/dist/components/core/form/fields/SolidLongTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaMultipleField.js +29 -23
- package/dist/components/core/form/fields/SolidMediaMultipleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidMediaSingleField.js +22 -19
- package/dist/components/core/form/fields/SolidMediaSingleField.js.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidRichTextField.js +9 -7
- package/dist/components/core/form/fields/SolidRichTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js +10 -8
- package/dist/components/core/form/fields/SolidSelectionDynamicField.js.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidSelectionStaticField.js +10 -8
- package/dist/components/core/form/fields/SolidSelectionStaticField.js.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidShortTextField.js +8 -6
- package/dist/components/core/form/fields/SolidShortTextField.js.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.d.ts.map +1 -1
- package/dist/components/core/form/fields/SolidTimeField.js +7 -5
- package/dist/components/core/form/fields/SolidTimeField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js +16 -12
- package/dist/components/core/form/fields/relations/SolidRelationManyToManyField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts +1 -0
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js +66 -7
- package/dist/components/core/form/fields/relations/SolidRelationManyToOneField.js.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.d.ts.map +1 -1
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js +12 -10
- package/dist/components/core/form/fields/relations/SolidRelationOneToManyField.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +2 -2
- package/dist/components/core/kanban/SolidKanbanView.js.map +1 -1
- package/dist/components/core/list/SolidListView.d.ts.map +1 -1
- package/dist/components/core/list/SolidListView.js +48 -62
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js +9 -2
- package/dist/components/core/list/columns/SolidMediaMultipleColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js +10 -3
- package/dist/components/core/list/columns/SolidMediaSingleColumn.js.map +1 -1
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +12 -1
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/model/FieldMetaData.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaData.js +55 -2
- package/dist/components/core/model/FieldMetaData.js.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.d.ts +1 -1
- package/dist/components/core/model/FieldMetaDataForm.d.ts.map +1 -1
- package/dist/components/core/model/FieldMetaDataForm.js +128 -61
- package/dist/components/core/model/FieldMetaDataForm.js.map +1 -1
- package/dist/components/core/model/ModelMetaData.js +5 -5
- package/dist/components/core/module/CreateModule.d.ts.map +1 -1
- package/dist/components/core/module/CreateModule.js +7 -3
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/users/CreateUser.js +2 -2
- package/dist/components/layout/AdminLayout.d.ts +4 -0
- package/dist/components/layout/AdminLayout.d.ts.map +1 -0
- package/dist/components/layout/AdminLayout.js +86 -0
- package/dist/components/layout/AdminLayout.js.map +1 -0
- package/dist/components/layout/AppConfig.d.ts.map +1 -1
- package/dist/components/layout/AppConfig.js +4 -9
- package/dist/components/layout/AppConfig.js.map +1 -1
- package/dist/components/layout/user-profile-menu.js +1 -1
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/nextAuth/authProviders.d.ts +4 -0
- package/dist/nextAuth/authProviders.d.ts.map +1 -0
- package/dist/nextAuth/authProviders.js +231 -0
- package/dist/nextAuth/authProviders.js.map +1 -0
- package/dist/nextAuth/refreshAccessToken.d.ts +2 -0
- package/dist/nextAuth/refreshAccessToken.d.ts.map +1 -0
- package/dist/nextAuth/refreshAccessToken.js +76 -0
- package/dist/nextAuth/refreshAccessToken.js.map +1 -0
- package/dist/redux/api/modelApi.d.ts +2 -1
- package/dist/redux/api/modelApi.d.ts.map +1 -1
- package/dist/redux/api/modelApi.js +9 -2
- package/dist/redux/api/modelApi.js.map +1 -1
- package/package.json +1 -1
- package/src/components/auth/AuthLayout.tsx +126 -0
- package/src/components/auth/ForgotPasswordThankYou.tsx +45 -0
- package/src/components/auth/GoogleAuthChecking.tsx +60 -0
- package/src/components/auth/SolidChangeForcePassword.tsx +21 -32
- package/src/components/auth/SolidForgotPassword.tsx +3 -2
- package/src/components/auth/SolidInitialLoginOtp.tsx +16 -8
- package/src/components/auth/SolidInitiateRegisterOtp.tsx +17 -9
- package/src/components/auth/SolidLogin.tsx +16 -10
- package/src/components/auth/SolidRegister.tsx +17 -9
- package/src/components/auth/SolidResetPassword.tsx +13 -6
- package/src/components/common/GeneralSettings.tsx +7 -2
- package/src/components/common/NotFound.tsx +22 -0
- package/src/components/common/SingleSelectAutoCompleteField.tsx +3 -1
- package/src/components/common/SocialMediaLogin.tsx +24 -25
- package/src/components/common/SolidAdmin.tsx +7 -0
- package/src/components/common/SolidFormStepper.tsx +55 -2
- package/src/components/common/SolidThemeLink.tsx +5 -0
- package/src/components/common/error.tsx +30 -0
- package/src/components/core/common/FilterComponent.tsx +70 -70
- package/src/components/core/common/SolidConfigureLayoutElement.tsx +6 -1
- package/src/components/core/common/SolidGlobalSearchElement.tsx +48 -20
- package/src/components/core/form/SolidFormLayouts.tsx +93 -0
- package/src/components/core/form/SolidFormView.tsx +64 -3
- package/src/components/core/form/fields/SolidBooleanField.tsx +6 -3
- package/src/components/core/form/fields/SolidDateField.tsx +6 -3
- package/src/components/core/form/fields/SolidDateTimeField.tsx +6 -3
- package/src/components/core/form/fields/SolidDecimalField.tsx +6 -3
- package/src/components/core/form/fields/SolidIntegerField.tsx +6 -3
- package/src/components/core/form/fields/SolidJsonField.tsx +6 -3
- package/src/components/core/form/fields/SolidLongTextField.tsx +6 -3
- package/src/components/core/form/fields/SolidMediaMultipleField.tsx +20 -12
- package/src/components/core/form/fields/SolidMediaSingleField.tsx +9 -6
- package/src/components/core/form/fields/SolidRichTextField.tsx +7 -3
- package/src/components/core/form/fields/SolidSelectionDynamicField.tsx +6 -3
- package/src/components/core/form/fields/SolidSelectionStaticField.tsx +6 -3
- package/src/components/core/form/fields/SolidShortTextField.tsx +8 -4
- package/src/components/core/form/fields/SolidTimeField.tsx +7 -4
- package/src/components/core/form/fields/relations/SolidRelationManyToManyField.tsx +14 -8
- package/src/components/core/form/fields/relations/SolidRelationManyToOneField.tsx +93 -3
- package/src/components/core/form/fields/relations/SolidRelationOneToManyField.tsx +5 -1
- package/src/components/core/kanban/SolidKanbanView.tsx +4 -4
- package/src/components/core/list/SolidListView.tsx +16 -64
- package/src/components/core/list/columns/SolidMediaMultipleColumn.tsx +18 -0
- package/src/components/core/list/columns/SolidMediaSingleColumn.tsx +21 -0
- package/src/components/core/model/CreateModel.tsx +58 -0
- package/src/components/core/model/FieldMetaData.tsx +27 -1
- package/src/components/core/model/FieldMetaDataForm.tsx +134 -44
- package/src/components/core/model/ModelMetaData.tsx +5 -5
- package/src/components/core/module/CreateModule.tsx +12 -4
- package/src/components/core/users/CreateUser.tsx +2 -2
- package/src/components/layout/AdminLayout.tsx +62 -0
- package/src/components/layout/AppConfig.tsx +4 -3
- package/src/components/layout/user-profile-menu.tsx +1 -1
- package/src/index.ts +17 -1
- package/src/nextAuth/authProviders.tsx +220 -0
- package/src/nextAuth/refreshAccessToken.tsx +27 -0
- package/src/redux/api/modelApi.ts +9 -2
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
|
|
5
|
+
export const NotFound = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<div className="d-flex align-items-center justify-content-center vh-100">
|
|
9
|
+
<div className="text-center">
|
|
10
|
+
<h1 className="display-1 fw-bold">404</h1>
|
|
11
|
+
<p className="fs-3">
|
|
12
|
+
<span className="text-danger">Opps!</span> Page not found.
|
|
13
|
+
</p>
|
|
14
|
+
<p className="lead">The page you are looking for does not exist.</p>
|
|
15
|
+
<Link href="/" className="btn btn-primary">
|
|
16
|
+
Go Home
|
|
17
|
+
</Link>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
@@ -32,7 +32,9 @@ export const SingleSelectAutoCompleteField = ({ disabled, formik, isFormFieldVal
|
|
|
32
32
|
disabled={disabled ? disabled : false}
|
|
33
33
|
value={selectedItem}
|
|
34
34
|
suggestions={filteredItem}
|
|
35
|
-
invalid={(isFormFieldValid(formik, fieldName) || (formErrors[fieldName]))}
|
|
35
|
+
// invalid={(isFormFieldValid(formik, fieldName) || (formErrors[fieldName]))}
|
|
36
|
+
invalid={isFormFieldValid(formik, fieldName)}
|
|
37
|
+
|
|
36
38
|
completeMethod={searchItems}
|
|
37
39
|
virtualScrollerOptions={{ itemSize: 38 }}
|
|
38
40
|
// style={{
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { signIn } from 'next-auth/react'
|
|
3
|
-
import { useRouter } from 'next/navigation';
|
|
3
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
4
4
|
import { Button } from 'primereact/button'
|
|
5
5
|
import React from 'react'
|
|
6
6
|
|
|
7
7
|
export const SocialMediaLogin = () => {
|
|
8
8
|
const router = useRouter();
|
|
9
|
-
|
|
9
|
+
const pathname = usePathname();
|
|
10
10
|
return (
|
|
11
11
|
<div className="flex justify-content-center mt-4 gap-3">
|
|
12
|
-
<Button
|
|
12
|
+
<Button
|
|
13
|
+
className='flex justify-content-center gap-3 w-full google-auth-button'
|
|
14
|
+
outlined
|
|
15
|
+
severity="secondary"
|
|
16
|
+
onClick={() => router.push(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/google/connect`)}
|
|
17
|
+
// onClick={()=>signIn('google', {callbackUrl :'https://uat-api.lm.solidxai.com/api/iam/google/connect'})}
|
|
18
|
+
>
|
|
13
19
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
14
20
|
<g clipPath="url(#clip0_3520_3825)">
|
|
15
21
|
<path d="M23.0938 9.91355L13.3044 9.91309C12.8721 9.91309 12.5217 10.2634 12.5217 10.6957V13.823C12.5217 14.2552 12.8721 14.6056 13.3044 14.6056H18.8171C18.2135 16.1722 17.0868 17.4842 15.6493 18.3178L18 22.387C21.7707 20.2062 24 16.3799 24 12.0965C24 11.4866 23.955 11.0506 23.8651 10.5597C23.7968 10.1867 23.4729 9.91355 23.0938 9.91355Z" fill="#167EE6" />
|
|
@@ -25,30 +31,23 @@ export const SocialMediaLogin = () => {
|
|
|
25
31
|
</clipPath>
|
|
26
32
|
</defs>
|
|
27
33
|
</svg>
|
|
28
|
-
|
|
29
|
-
className='flex gap-3'
|
|
30
|
-
outlined
|
|
31
|
-
severity="secondary"
|
|
32
|
-
label='Sign In with Google'
|
|
33
|
-
onClick={() => router.push(`${process.env.NEXT_PUBLIC_BACKEND_API_URL}/api/iam/google/connect`)}
|
|
34
|
-
// onClick={()=>signIn('google', {callbackUrl :'https://uat-api.lm.solidxai.com/api/iam/google/connect'})}
|
|
35
|
-
>
|
|
34
|
+
{pathname.includes("register") ? "Continue With Google" : "Sign In with Google"}
|
|
36
35
|
</Button>
|
|
37
36
|
{/* <Button icon={() => (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
37
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" xlinkHref="http://www.w3.org/1999/xlink">
|
|
38
|
+
<rect width="24" height="24" fill="url(#pattern0_3520_3835)" />
|
|
39
|
+
<defs>
|
|
40
|
+
<pattern id="pattern0_3520_3835" patternContentUnits="objectBoundingBox" width="1" height="1">
|
|
41
|
+
<use xlinkHref="#image0_3520_3835" transform="scale(0.00195312)" />
|
|
42
|
+
</pattern>
|
|
43
|
+
<image id="image0_3520_3835" width="512" height="512" xlinkHref="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAATcvAAE3LwE2dZYYAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAwBQTFRF////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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Button> */}
|
|
52
51
|
</div>
|
|
53
52
|
)
|
|
54
53
|
}
|
|
@@ -1,12 +1,65 @@
|
|
|
1
|
+
"use client"
|
|
1
2
|
import { Button } from 'primereact/button'
|
|
2
|
-
import
|
|
3
|
+
import { OverlayPanel } from 'primereact/overlaypanel';
|
|
4
|
+
import React, { useRef } from 'react'
|
|
3
5
|
|
|
4
6
|
export const SolidFormStepper = () => {
|
|
7
|
+
const formStepperOverlay = useRef(null);
|
|
8
|
+
|
|
5
9
|
return (
|
|
6
10
|
<div className='flex justify-content-end'>
|
|
7
11
|
<Button type='button' severity='secondary' className='solid-step-button btn-step-first'>Step 1</Button>
|
|
8
12
|
<Button type='button' className='solid-step-button btn-step'>Step 2</Button>
|
|
9
|
-
<Button type='button' className='solid-step-button btn-step-last'>
|
|
13
|
+
<Button type='button' className='solid-step-button btn-step-last relative'>
|
|
14
|
+
Step 3
|
|
15
|
+
<div className='absolute' style={{ right: 8 }}>
|
|
16
|
+
<Button
|
|
17
|
+
type='button'
|
|
18
|
+
icon="pi pi-angle-down"
|
|
19
|
+
text
|
|
20
|
+
size='small'
|
|
21
|
+
style={{ height: 24, width: '1.5rem' }}
|
|
22
|
+
onClick={(e) =>
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
formStepperOverlay.current.toggle(e)
|
|
25
|
+
}
|
|
26
|
+
/>
|
|
27
|
+
<OverlayPanel ref={formStepperOverlay} className="solid-custom-overlay solid-form-stepper-overlay">
|
|
28
|
+
<div className='flex flex-column gap-1 p-1'>
|
|
29
|
+
<Button
|
|
30
|
+
type='button'
|
|
31
|
+
label='Step 01'
|
|
32
|
+
size='small'
|
|
33
|
+
text
|
|
34
|
+
/>
|
|
35
|
+
<Button
|
|
36
|
+
type='button'
|
|
37
|
+
label='Step 02'
|
|
38
|
+
size='small'
|
|
39
|
+
text
|
|
40
|
+
/>
|
|
41
|
+
<Button
|
|
42
|
+
type='button'
|
|
43
|
+
label='Step 03'
|
|
44
|
+
size='small'
|
|
45
|
+
text
|
|
46
|
+
/>
|
|
47
|
+
<Button
|
|
48
|
+
type='button'
|
|
49
|
+
label='Step 04'
|
|
50
|
+
size='small'
|
|
51
|
+
text
|
|
52
|
+
/>
|
|
53
|
+
<Button
|
|
54
|
+
type='button'
|
|
55
|
+
label='Step 05'
|
|
56
|
+
size='small'
|
|
57
|
+
text
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
</OverlayPanel>
|
|
61
|
+
</div>
|
|
62
|
+
</Button>
|
|
10
63
|
</div>
|
|
11
64
|
)
|
|
12
65
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client"; // Error components must be Client Components
|
|
2
|
+
|
|
3
|
+
interface CustomError extends Error {
|
|
4
|
+
errMessage: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default function Error({
|
|
8
|
+
error,
|
|
9
|
+
reset,
|
|
10
|
+
}: {
|
|
11
|
+
error: CustomError;
|
|
12
|
+
reset?: () => void;
|
|
13
|
+
}) {
|
|
14
|
+
return (
|
|
15
|
+
<div>
|
|
16
|
+
<div className="d-flex justify-content-center align-items-center vh-100">
|
|
17
|
+
<div className="text-center">
|
|
18
|
+
<h2 className="display-4 fw-bold">{error?.errMessage}</h2>
|
|
19
|
+
<p className="fs-3">
|
|
20
|
+
<span className="text-danger">Opps!</span> Something went wrong!
|
|
21
|
+
</p>
|
|
22
|
+
<p className="lead">Sorry for inconvience</p>
|
|
23
|
+
<button className="btn btn-primary" onClick={() => reset?.()}>
|
|
24
|
+
Try again
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -94,64 +94,64 @@ const FilterRuleComponent = ({ viewData, fields, rule, onChange, onAddRule, onAd
|
|
|
94
94
|
// <div style={{ marginLeft: (level - 1) * 10 + 'px' }} className="filter-rule">
|
|
95
95
|
|
|
96
96
|
<div className='mt-2'>
|
|
97
|
-
<div className='
|
|
98
|
-
<div className='
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<div className='col-7'>
|
|
114
|
-
<div className='formgrid grid'>
|
|
115
|
-
{rule.fieldName ?
|
|
116
|
-
<SolidFilterFields viewData={viewData} fieldMetadata={viewData.data.solidFieldsMetadata[rule.fieldName]} onChange={onChange} index={rule.id} rule={rule}></SolidFilterFields>
|
|
117
|
-
: <>
|
|
118
|
-
<div className='col-6'>
|
|
119
|
-
<InputText
|
|
120
|
-
disabled
|
|
121
|
-
value={rule.value || ''}
|
|
122
|
-
placeholder="operator"
|
|
123
|
-
className='w-full'
|
|
124
|
-
/>
|
|
125
|
-
</div>
|
|
126
|
-
<div className='col-6'>
|
|
127
|
-
<InputText
|
|
128
|
-
disabled
|
|
129
|
-
value={rule.value || ''}
|
|
130
|
-
placeholder="value"
|
|
131
|
-
className='w-full'
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
</>
|
|
135
|
-
}
|
|
97
|
+
<div className='flex align-items-center gap-3'>
|
|
98
|
+
<div className='formgrid grid w-full'>
|
|
99
|
+
<div className='col-4'>
|
|
100
|
+
<Dropdown
|
|
101
|
+
key={rule.id}
|
|
102
|
+
value={fieldName.value}
|
|
103
|
+
onChange={e => {
|
|
104
|
+
setFieldName({ name: e.value, value: e.value })
|
|
105
|
+
onChange(rule.id, 'fieldName', e.value)
|
|
106
|
+
}}
|
|
107
|
+
options={fields}
|
|
108
|
+
optionLabel='name'
|
|
109
|
+
optionValue='value'
|
|
110
|
+
placeholder="Select Field"
|
|
111
|
+
className='w-full'
|
|
112
|
+
/>
|
|
136
113
|
</div>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
114
|
+
<div className='col-8'>
|
|
115
|
+
<div className='formgrid grid'>
|
|
116
|
+
{rule.fieldName ?
|
|
117
|
+
<SolidFilterFields viewData={viewData} fieldMetadata={viewData.data.solidFieldsMetadata[rule.fieldName]} onChange={onChange} index={rule.id} rule={rule}></SolidFilterFields>
|
|
118
|
+
: <>
|
|
119
|
+
<div className='col-6'>
|
|
120
|
+
<InputText
|
|
121
|
+
disabled
|
|
122
|
+
value={rule.value || ''}
|
|
123
|
+
placeholder="operator"
|
|
124
|
+
className='w-full'
|
|
125
|
+
/>
|
|
126
|
+
</div>
|
|
127
|
+
<div className='col-6'>
|
|
128
|
+
<InputText
|
|
129
|
+
disabled
|
|
130
|
+
value={rule.value || ''}
|
|
131
|
+
placeholder="value"
|
|
132
|
+
className='w-full'
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
</>
|
|
136
|
+
}
|
|
152
137
|
</div>
|
|
153
138
|
</div>
|
|
154
139
|
</div>
|
|
140
|
+
<div className='formgrid grid'>
|
|
141
|
+
<div className='col-4 px-0 flex align-items-center'>
|
|
142
|
+
<Button text severity='secondary' icon="pi pi-plus" size='small' onClick={() => onAddRule(rule.parentRule)} className='solid-filter-action-btn' />
|
|
143
|
+
</div>
|
|
144
|
+
<div className='col-4 px-0 flex align-items-center'>
|
|
145
|
+
<Button text severity='secondary' icon={
|
|
146
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
147
|
+
<path d="M11.6665 13.334H13.3332V11.6673H14.9998V10.0007H13.3332V8.33398H11.6665V10.0007H9.99984V11.6673H11.6665V13.334ZM3.33317 16.6673C2.87484 16.6673 2.48248 16.5041 2.15609 16.1777C1.8297 15.8513 1.6665 15.459 1.6665 15.0007V5.00065C1.6665 4.54232 1.8297 4.14996 2.15609 3.82357C2.48248 3.49718 2.87484 3.33398 3.33317 3.33398H8.33317L9.99984 5.00065H16.6665C17.1248 5.00065 17.5172 5.16385 17.8436 5.49023C18.17 5.81662 18.3332 6.20898 18.3332 6.66732V15.0007C18.3332 15.459 18.17 15.8513 17.8436 16.1777C17.5172 16.5041 17.1248 16.6673 16.6665 16.6673H3.33317ZM3.33317 15.0007H16.6665V6.66732H9.31234L7.64567 5.00065H3.33317V15.0007Z" fill="#4B4D52" />
|
|
148
|
+
</svg>
|
|
149
|
+
} size='small' onClick={() => onAddGroup(rule.id)} className='solid-filter-action-btn p-0' />
|
|
150
|
+
</div>
|
|
151
|
+
<div className='col-4 px-0 flex align-items-center'>
|
|
152
|
+
<Button text severity='secondary' icon="pi pi-trash" size='small' onClick={() => onDelete(rule.id)} className='solid-filter-action-btn' />
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
155
|
</div>
|
|
156
156
|
|
|
157
157
|
{rule.children && rule.children.map(nestedRule => (
|
|
@@ -380,24 +380,24 @@ const FilterComponent = ({ viewData, fields, filterRules, setFilterRules, transf
|
|
|
380
380
|
|
|
381
381
|
return (
|
|
382
382
|
<div className=''>
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
<div className='text-
|
|
383
|
+
{filterRules.map(rule => (
|
|
384
|
+
<FilterGroupComponent
|
|
385
|
+
key={rule.id}
|
|
386
|
+
viewData={viewData}
|
|
387
|
+
fields={fields}
|
|
388
|
+
group={rule}
|
|
389
|
+
onChange={handleChange}
|
|
390
|
+
onAddRule={handleAddRule}
|
|
391
|
+
onAddGroup={handleAddGroup}
|
|
392
|
+
onDelete={handleDeleteRule}
|
|
393
|
+
level={0} // Top-level group
|
|
394
|
+
/>
|
|
395
|
+
))}
|
|
396
|
+
<div className='text-left mt-3'>
|
|
397
397
|
<Button label="Apply" size="small" onClick={() => transformFilterRules(filterRules)} type="submit" className="small-button" />
|
|
398
|
-
|
|
398
|
+
{/*
|
|
399
399
|
<br></br>
|
|
400
|
-
<textarea value={printedState} readOnly rows={20} cols={100} style={{ marginTop: '20px' }} />
|
|
400
|
+
<textarea value={printedState} readOnly rows={20} cols={100} style={{ marginTop: '20px' }} /> */}
|
|
401
401
|
</div>
|
|
402
402
|
</div>
|
|
403
403
|
);
|
|
@@ -16,6 +16,7 @@ export const SolidConfigureLayoutElement = ({ setShowArchived, showArchived, vie
|
|
|
16
16
|
// const [visible, setVisible] = useState<boolean>(false);
|
|
17
17
|
const op = useRef(null);
|
|
18
18
|
const customizeLayout = useRef(null);
|
|
19
|
+
const [isOverlayOpen, setIsOverlayOpen] = useState(true);
|
|
19
20
|
|
|
20
21
|
const categories: FilterColumns[] = [
|
|
21
22
|
{ name: 'ID', key: 'A' },
|
|
@@ -64,6 +65,7 @@ export const SolidConfigureLayoutElement = ({ setShowArchived, showArchived, vie
|
|
|
64
65
|
icon='pi pi-sliders-h'
|
|
65
66
|
label="Customize Layout"
|
|
66
67
|
size="small"
|
|
68
|
+
text={isOverlayOpen}
|
|
67
69
|
className="text-left gap-2 w-13rem"
|
|
68
70
|
// @ts-ignore
|
|
69
71
|
onClick={(e) => customizeLayout.current.toggle(e)}
|
|
@@ -71,7 +73,10 @@ export const SolidConfigureLayoutElement = ({ setShowArchived, showArchived, vie
|
|
|
71
73
|
/>
|
|
72
74
|
<p className="mt-3 mb-1 font-medium" style={{ color: 'var(--gray-400)' }}>Saved Layouts</p>
|
|
73
75
|
<Button text severity="secondary" label="Diet Tracking" icon="pi pi-plus" size="small" />
|
|
74
|
-
<OverlayPanel ref={customizeLayout} className="customize-layout-panel" style={{ minWidth: 250 }}
|
|
76
|
+
<OverlayPanel ref={customizeLayout} className="customize-layout-panel" style={{ minWidth: 250 }}
|
|
77
|
+
onShow={() => setIsOverlayOpen(false)}
|
|
78
|
+
onHide={() => setIsOverlayOpen(true)}
|
|
79
|
+
>
|
|
75
80
|
<div className="solid-layout-accordion">
|
|
76
81
|
<Accordion multiple expandIcon="pi pi-chevron-down" collapseIcon="pi pi-chevron-up">
|
|
77
82
|
<AccordionTab header="Switch Type">
|
|
@@ -149,7 +149,7 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
149
149
|
useEffect(() => {
|
|
150
150
|
if (viewData?.data?.solidFieldsMetadata) {
|
|
151
151
|
const fieldsData = viewData?.data?.solidFieldsMetadata
|
|
152
|
-
const fieldsList = Object.entries(fieldsData).map(([key, value]: any) => ({ name:
|
|
152
|
+
const fieldsList = Object.entries(fieldsData).map(([key, value]: any) => ({ name: value.displayName, value: key }));
|
|
153
153
|
setFields(fieldsList)
|
|
154
154
|
}
|
|
155
155
|
}, [])
|
|
@@ -196,10 +196,8 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
196
196
|
if (inputValue?.trim()) {
|
|
197
197
|
const newChip = { columnName: columnName || firstFilterableFieldName, value: inputValue.trim() };
|
|
198
198
|
|
|
199
|
-
setSearchChips((prevChips) =>
|
|
200
|
-
|
|
201
|
-
return updatedChips
|
|
202
|
-
});
|
|
199
|
+
setSearchChips((prevChips) => [...prevChips, newChip]);
|
|
200
|
+
setInputValue(""); // Clear input value
|
|
203
201
|
}
|
|
204
202
|
}
|
|
205
203
|
|
|
@@ -228,7 +226,7 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
228
226
|
children: searchChips.map((chip) => ({
|
|
229
227
|
children: [],
|
|
230
228
|
fieldName: chip.columnName,
|
|
231
|
-
id:
|
|
229
|
+
id: Date.now() + getRandomInt(1, 500),
|
|
232
230
|
matchMode: "$containsi",
|
|
233
231
|
parentRule: 1,
|
|
234
232
|
type: "rule",
|
|
@@ -256,9 +254,9 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
256
254
|
];
|
|
257
255
|
|
|
258
256
|
|
|
259
|
-
useEffect(() => {
|
|
260
|
-
|
|
261
|
-
}, [chipsToDisplay])
|
|
257
|
+
// useEffect(() => {
|
|
258
|
+
// console.log("Input Value", customChip, "Input Value", searchChips, "Input Value", inputValue);
|
|
259
|
+
// }, [chipsToDisplay])
|
|
262
260
|
|
|
263
261
|
const customChipTemplate = (item: any) => {
|
|
264
262
|
if (item === customChip) {
|
|
@@ -275,9 +273,25 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
275
273
|
return <div className="flex align-items-center gap-2 text-base" dangerouslySetInnerHTML={{ __html: item }}></div>;
|
|
276
274
|
};
|
|
277
275
|
|
|
276
|
+
const handleRemoveChip = (removedChipValue: any) => {
|
|
277
|
+
console.log("Removing chip:", removedChipValue);
|
|
278
|
+
|
|
279
|
+
setSearchChips((prevChips) => {
|
|
280
|
+
const updatedChips = prevChips.filter((chip) => chip.value !== removedChipValue);
|
|
281
|
+
console.log("Updated searchChips after removal:", updatedChips);
|
|
282
|
+
return updatedChips;
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
// Prevent clearing customChip if it is different from the removed chip
|
|
286
|
+
if (customChip === removedChipValue) {
|
|
287
|
+
console.log("Clearing custom chip:", customChip);
|
|
288
|
+
setCustomChip("");
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
|
|
278
292
|
return (
|
|
279
293
|
<div className="flex justify-content-center solid-custom-filter-wrapper">
|
|
280
|
-
<div className="p-inputgroup flex-1"
|
|
294
|
+
<div className="p-inputgroup flex-1 custom-input-group"
|
|
281
295
|
ref={chipsRef}
|
|
282
296
|
onClick={(e) => {
|
|
283
297
|
e.preventDefault();
|
|
@@ -288,11 +302,23 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
288
302
|
>
|
|
289
303
|
<Chips
|
|
290
304
|
value={chipsToDisplay}
|
|
291
|
-
onChange={
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
305
|
+
onChange={(e: any) => {
|
|
306
|
+
// Compare previous and new values to detect removal
|
|
307
|
+
if (e.value.length < searchChips.length) {
|
|
308
|
+
const removedChip = searchChips.find(chip => !e.value.includes(chip.value));
|
|
309
|
+
if (removedChip) {
|
|
310
|
+
handleRemoveChip(removedChip.value);
|
|
311
|
+
}
|
|
312
|
+
} else {
|
|
313
|
+
setSearchChips(e.value.map((val: any) => ({ columnName: firstFilterableFieldName, value: val })));
|
|
314
|
+
}
|
|
315
|
+
}}
|
|
316
|
+
onRemove={(event) => {
|
|
317
|
+
setSearchChips((prevChips) => prevChips.filter((chip) => chip.value !== event.value));
|
|
318
|
+
if (searchChips.length === 1) {
|
|
319
|
+
setCustomChip("");
|
|
320
|
+
clearFilter();
|
|
321
|
+
}
|
|
296
322
|
}}
|
|
297
323
|
itemTemplate={customChipTemplate}
|
|
298
324
|
onKeyDown={handleKeyDown}
|
|
@@ -303,13 +329,15 @@ export const SolidGlobalSearchElement = forwardRef(({ viewData, handleApplyCusto
|
|
|
303
329
|
/>
|
|
304
330
|
<Button
|
|
305
331
|
icon="pi pi-search"
|
|
332
|
+
style={{ fontSize: 10 }}
|
|
306
333
|
severity="secondary"
|
|
307
334
|
outlined size="small"
|
|
308
|
-
onClick={(
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
335
|
+
onClick={() => setShowGlobalSearchElement(true)}
|
|
336
|
+
// onClick={(e) => {
|
|
337
|
+
// if (op.current && e.target) {
|
|
338
|
+
// op.current.toggle(e);
|
|
339
|
+
// }
|
|
340
|
+
// }}
|
|
313
341
|
/>
|
|
314
342
|
</div>
|
|
315
343
|
<OverlayPanel ref={op} className="solid-custom-overlay" style={{ minWidth: 378 }}>
|