@solidstarters/solid-core-ui 1.0.2 → 1.1.0
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/SolidForgotPassword.d.ts +3 -0
- package/dist/components/auth/SolidForgotPassword.d.ts.map +1 -0
- package/dist/components/auth/SolidForgotPassword.js +108 -0
- package/dist/components/auth/SolidForgotPassword.js.map +1 -0
- package/dist/components/auth/SolidLogin.d.ts +3 -0
- package/dist/components/auth/SolidLogin.d.ts.map +1 -0
- package/dist/components/auth/SolidLogin.js +115 -0
- package/dist/components/auth/SolidLogin.js.map +1 -0
- package/dist/components/auth/SolidOTPVerify.d.ts +3 -0
- package/dist/components/auth/SolidOTPVerify.d.ts.map +1 -0
- package/dist/components/auth/SolidOTPVerify.js +108 -0
- package/dist/components/auth/SolidOTPVerify.js.map +1 -0
- package/dist/components/auth/SolidRegister.d.ts +3 -0
- package/dist/components/auth/SolidRegister.d.ts.map +1 -0
- package/dist/components/auth/SolidRegister.js +166 -0
- package/dist/components/auth/SolidRegister.js.map +1 -0
- package/dist/components/auth/SolidResetPassword.d.ts +3 -0
- package/dist/components/auth/SolidResetPassword.d.ts.map +1 -0
- package/dist/components/auth/SolidResetPassword.js +119 -0
- package/dist/components/auth/SolidResetPassword.js.map +1 -0
- package/dist/components/core/common/FilterComponent.d.ts +33 -1
- package/dist/components/core/common/FilterComponent.d.ts.map +1 -1
- package/dist/components/core/common/FilterComponent.js +26 -25
- 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 +3 -3
- package/dist/components/core/common/SolidConfigureLayoutElement.js.map +1 -1
- package/dist/components/core/common/SolidCreateButton.js +1 -1
- package/dist/components/core/common/SolidCreateButton.js.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.d.ts.map +1 -1
- package/dist/components/core/common/SolidGlobalSearchElement.js +14 -9
- package/dist/components/core/common/SolidGlobalSearchElement.js.map +1 -1
- package/dist/components/core/common/SolidLayoutViews.d.ts +19 -0
- package/dist/components/core/common/SolidLayoutViews.d.ts.map +1 -0
- package/dist/components/core/common/SolidLayoutViews.js +14 -0
- package/dist/components/core/common/SolidLayoutViews.js.map +1 -0
- package/dist/components/core/common/SolidListViewOptions.d.ts +2 -0
- package/dist/components/core/common/SolidListViewOptions.d.ts.map +1 -0
- package/dist/components/core/common/SolidListViewOptions.js +11 -0
- package/dist/components/core/common/SolidListViewOptions.js.map +1 -0
- package/dist/components/core/filter/SolidManyToOneFilterElement.js +1 -1
- package/dist/components/core/filter/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/filter/columns/SolidBigintField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidBigintField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidBigintField.js +8 -0
- package/dist/components/core/filter/columns/SolidBigintField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidBooleanField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidBooleanField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidBooleanField.js +27 -0
- package/dist/components/core/filter/columns/SolidBooleanField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidComputedField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidComputedField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidComputedField.js +22 -0
- package/dist/components/core/filter/columns/SolidComputedField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidDateField.d.ts +9 -0
- package/dist/components/core/filter/columns/SolidDateField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidDateField.js +35 -0
- package/dist/components/core/filter/columns/SolidDateField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.js +24 -0
- package/dist/components/core/filter/columns/SolidDatetimeField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidDecimalField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidDecimalField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidDecimalField.js +8 -0
- package/dist/components/core/filter/columns/SolidDecimalField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.js +25 -0
- package/dist/components/core/filter/columns/SolidExternalIdField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidFloatField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidFloatField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidFloatField.js +8 -0
- package/dist/components/core/filter/columns/SolidFloatField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidIdField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidIdField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidIdField.js +25 -0
- package/dist/components/core/filter/columns/SolidIdField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidIntField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidIntField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidIntField.js +34 -0
- package/dist/components/core/filter/columns/SolidIntField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidLongTextField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidLongTextField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidLongTextField.js +8 -0
- package/dist/components/core/filter/columns/SolidLongTextField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.js +35 -0
- package/dist/components/core/filter/columns/SolidMediaMultipleField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.js +35 -0
- package/dist/components/core/filter/columns/SolidMediaSingleField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidRelationField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidRelationField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidRelationField.js +12 -0
- package/dist/components/core/filter/columns/SolidRelationField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidRichTextField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidRichTextField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidRichTextField.js +8 -0
- package/dist/components/core/filter/columns/SolidRichTextField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.js +25 -0
- package/dist/components/core/filter/columns/SolidSelectionDynamicField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.js +26 -0
- package/dist/components/core/filter/columns/SolidSelectionStaticField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidShortTextField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidShortTextField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidShortTextField.js +33 -0
- package/dist/components/core/filter/columns/SolidShortTextField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidTimeField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidTimeField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidTimeField.js +24 -0
- package/dist/components/core/filter/columns/SolidTimeField.js.map +1 -0
- package/dist/components/core/filter/columns/SolidUuidField.d.ts +4 -0
- package/dist/components/core/filter/columns/SolidUuidField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/SolidUuidField.js +25 -0
- package/dist/components/core/filter/columns/SolidUuidField.js.map +1 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts +4 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.d.ts.map +1 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js +54 -0
- package/dist/components/core/filter/columns/relations/SolidRelationManyToOneField.js.map +1 -0
- package/dist/components/core/kanban/KanbanBoard.d.ts +1 -1
- package/dist/components/core/kanban/KanbanBoard.d.ts.map +1 -1
- package/dist/components/core/kanban/KanbanBoard.js +11 -11
- package/dist/components/core/kanban/KanbanBoard.js.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.d.ts.map +1 -1
- package/dist/components/core/kanban/SolidKanbanView.js +113 -202
- 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 +312 -62
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/list/SolidManyToOneFilterElement.js +2 -3
- package/dist/components/core/list/SolidManyToOneFilterElement.js.map +1 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js +3 -1
- package/dist/components/core/list/columns/SolidBooleanColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js +3 -1
- package/dist/components/core/list/columns/SolidSelectionStaticColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.d.ts.map +1 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js +5 -1
- package/dist/components/core/list/columns/SolidShortTextColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js +3 -1
- package/dist/components/core/list/columns/SolidTimeColumn.js.map +1 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js +3 -1
- package/dist/components/core/list/columns/SolidUuidColumn.js.map +1 -1
- package/dist/components/layout/AppConfig.d.ts +4 -0
- package/dist/components/layout/AppConfig.d.ts.map +1 -0
- package/dist/components/layout/AppConfig.js +57 -0
- package/dist/components/layout/AppConfig.js.map +1 -0
- package/dist/components/layout/AppSidebar.d.ts +3 -0
- package/dist/components/layout/AppSidebar.d.ts.map +1 -0
- package/dist/components/layout/AppSidebar.js +75 -0
- package/dist/components/layout/AppSidebar.js.map +1 -0
- package/dist/components/layout/CustomPagination.d.ts +0 -6
- package/dist/components/layout/CustomPagination.d.ts.map +1 -1
- package/dist/components/layout/CustomPagination.js +48 -27
- package/dist/components/layout/CustomPagination.js.map +1 -1
- package/dist/components/layout/FilterMenu.d.ts.map +1 -1
- package/dist/components/layout/FilterMenu.js +1 -2
- package/dist/components/layout/FilterMenu.js.map +1 -1
- package/dist/components/layout/context/layoutcontext.d.ts +5 -0
- package/dist/components/layout/context/layoutcontext.d.ts.map +1 -0
- package/dist/components/layout/context/layoutcontext.js +56 -0
- package/dist/components/layout/context/layoutcontext.js.map +1 -0
- package/dist/components/layout/navbar-two-menu.d.ts.map +1 -1
- package/dist/components/layout/navbar-two-menu.js +5 -5
- package/dist/components/layout/navbar-two-menu.js.map +1 -1
- package/dist/components/layout/user-profile-menu.d.ts.map +1 -1
- package/dist/components/layout/user-profile-menu.js +37 -5
- package/dist/components/layout/user-profile-menu.js.map +1 -1
- package/dist/components/modelsComponents/filterIcon.d.ts.map +1 -1
- package/dist/components/modelsComponents/filterIcon.js.map +1 -1
- package/dist/components/tables/ListViewTable.d.ts.map +1 -1
- package/dist/components/tables/ListViewTable.js +2 -1
- package/dist/components/tables/ListViewTable.js.map +1 -1
- package/dist/helpers/helpers.d.ts +1 -1
- package/dist/helpers/helpers.d.ts.map +1 -1
- package/dist/index.d.ts +19 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -32
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/auth/SolidForgotPassword.tsx +124 -0
- package/src/components/auth/SolidLogin.tsx +156 -0
- package/src/components/auth/SolidOTPVerify.tsx +127 -0
- package/src/components/auth/SolidRegister.tsx +221 -0
- package/src/components/auth/SolidResetPassword.tsx +160 -0
- package/src/components/core/common/FilterComponent.tsx +45 -40
- package/src/components/core/common/SolidConfigureLayoutElement.tsx +11 -10
- package/src/components/core/common/SolidCreateButton.tsx +1 -1
- package/src/components/core/common/SolidGlobalSearchElement.tsx +33 -13
- package/src/components/core/common/SolidLayoutViews.tsx +87 -0
- package/src/components/core/common/SolidListViewOptions.tsx +31 -0
- package/src/components/core/filter/SolidManyToOneFilterElement.tsx +1 -1
- package/src/components/core/kanban/KanbanBoard.tsx +7 -4
- package/src/components/core/kanban/SolidKanbanView.tsx +110 -248
- package/src/components/core/list/SolidListView.tsx +421 -96
- package/src/components/core/list/SolidManyToOneFilterElement.tsx +3 -3
- package/src/components/core/list/columns/SolidBooleanColumn.tsx +1 -1
- package/src/components/core/list/columns/SolidSelectionStaticColumn.tsx +1 -1
- package/src/components/core/list/columns/SolidShortTextColumn.tsx +8 -3
- package/src/components/core/list/columns/SolidTimeColumn.tsx +1 -1
- package/src/components/core/list/columns/SolidUuidColumn.tsx +1 -1
- package/src/components/layout/AppConfig.tsx +103 -0
- package/src/components/layout/AppSidebar.tsx +170 -0
- package/src/components/layout/CustomPagination.tsx +55 -55
- package/src/components/layout/FilterMenu.tsx +1 -2
- package/src/components/layout/context/layoutcontext.tsx +52 -0
- package/src/components/layout/navbar-two-menu.tsx +12 -9
- package/src/components/layout/user-profile-menu.tsx +74 -189
- package/src/components/modelsComponents/filterIcon.tsx +0 -1
- package/src/components/tables/ListViewTable.tsx +4 -3
- package/src/index.ts +157 -144
- package/src/types/index.d.ts +26 -0
- package/src/types/layout.d.ts +94 -0
- package/src/types/next-auth.d.ts +0 -0
- package/dist/components/core/kanban/SolidKanbanFilter.d.ts +0 -2
- package/dist/components/core/kanban/SolidKanbanFilter.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts +0 -10
- package/dist/components/core/kanban/SolidKanbanViewSearchColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidManyToOneFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionDynamicFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts +0 -2
- package/dist/components/core/kanban/SolidSelectionStaticFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts +0 -12
- package/dist/components/core/kanban/SolidVarInputsFilterElement.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidBigintColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidBooleanColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidComputedColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidDateColumn.d.ts +0 -9
- package/dist/components/core/kanban/columns/SolidDateColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidDatetimeColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidDecimalColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidExternalIdColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidFloatColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidIdColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidIdColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidIntColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidIntColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidLongTextColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidMediaMultipleColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidMediaSingleColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidRelationColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidRichTextColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidSelectionDynamicColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidSelectionStaticColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidShortTextColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidTimeColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/SolidUuidColumn.d.ts.map +0 -1
- package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts +0 -4
- package/dist/components/core/kanban/columns/relations/SolidRelationManyToOneColumn.d.ts.map +0 -1
- package/src/components/common/FilterComponent.tsx +0 -428
|
@@ -1,214 +1,99 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
// import { useAppSelector } from "@/redux/hooks";
|
|
3
3
|
import { signOut } from "next-auth/react";
|
|
4
|
+
import { PrimeReactContext } from "primereact/api";
|
|
4
5
|
import { OverlayPanel } from "primereact/overlaypanel";
|
|
5
|
-
import { useRef, useState } from "react";
|
|
6
|
-
import { useDispatch } from "react-redux";
|
|
6
|
+
import { useContext, useRef, useState } from "react";
|
|
7
|
+
import { useDispatch, useSelector } from "react-redux";
|
|
8
|
+
import { LayoutContext } from "./context/layoutcontext";
|
|
9
|
+
import { LayoutConfig } from "@/types";
|
|
10
|
+
import { toggleTheme } from "@/redux/features/themeSlice";
|
|
11
|
+
import { InputSwitch } from "primereact/inputswitch";
|
|
12
|
+
import { Button } from "primereact/button";
|
|
7
13
|
|
|
8
14
|
const UserProfileMenu = () => {
|
|
9
15
|
// const { user } = useAppSelector((state) => state.auth);
|
|
10
|
-
const
|
|
16
|
+
const { changeTheme } = useContext(PrimeReactContext);
|
|
17
|
+
const { layoutConfig, setLayoutConfig } = useContext(LayoutContext);
|
|
18
|
+
const { theme } = useSelector((state:any) => state.theme); // Get current theme from Redux
|
|
19
|
+
const { user } = useSelector((state:any) => state.auth);
|
|
20
|
+
const [checked, setChecked] = useState(theme === "dark");
|
|
11
21
|
const dispatch = useDispatch();
|
|
12
22
|
const op = useRef(null);
|
|
13
23
|
const logoutHandler = () => {
|
|
14
24
|
signOut();
|
|
15
25
|
};
|
|
26
|
+
const _changeTheme = (theme: string, colorScheme: string) => {
|
|
27
|
+
changeTheme?.(layoutConfig.theme, theme, 'theme-css', () => {
|
|
28
|
+
setLayoutConfig((prevState: LayoutConfig) => ({ ...prevState, theme, colorScheme }));
|
|
29
|
+
});
|
|
30
|
+
};
|
|
16
31
|
|
|
17
|
-
|
|
32
|
+
const handleThemeToggle = (e: any) => {
|
|
33
|
+
const isDarkMode = e.value;
|
|
34
|
+
setChecked(isDarkMode);
|
|
35
|
+
dispatch(toggleTheme()); // Dispatch Redux action
|
|
36
|
+
_changeTheme(isDarkMode ? "solid-dark-purple" : "solid-light-purple", isDarkMode ? "dark" : "light");
|
|
37
|
+
};
|
|
18
38
|
return (
|
|
19
39
|
<div className="userProfile">
|
|
20
|
-
<div
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
alt="Solid"
|
|
40
|
+
<div
|
|
41
|
+
className="">
|
|
42
|
+
<div
|
|
43
|
+
className="flex align-items-end"
|
|
25
44
|
//@ts-ignore
|
|
26
|
-
onClick={(e:any) => op?.current?.toggle(e)}
|
|
27
|
-
|
|
45
|
+
onClick={(e: any) => op?.current?.toggle(e)}
|
|
46
|
+
>
|
|
47
|
+
<img
|
|
48
|
+
src={`/images/Profile/Avatar.png`}
|
|
49
|
+
alt="Solid"
|
|
50
|
+
className="profile-icon"
|
|
51
|
+
/>
|
|
52
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
|
|
53
|
+
<path d="M7 5.83301L3.5 9.33301H10.5L7 5.83301Z" fill="black" />
|
|
54
|
+
</svg>
|
|
55
|
+
</div>
|
|
28
56
|
<OverlayPanel ref={op} className="user-profile-panel">
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
57
|
+
<div className="flex align-items-center p-3 gap-2 user-profile-title">
|
|
58
|
+
<img
|
|
59
|
+
alt="avatar"
|
|
60
|
+
src={`/images/Profile/Avatar.png`}
|
|
61
|
+
className="w-2rem"
|
|
62
|
+
></img>
|
|
63
|
+
<div className="flex flex-column align">
|
|
64
|
+
<span className="font-bold">{user?.user?.username}</span>
|
|
65
|
+
<span className="mt-1">{user?.user?.email}</span>
|
|
36
66
|
</div>
|
|
37
|
-
|
|
38
|
-
<div className="col-4">
|
|
39
|
-
<img
|
|
40
|
-
style={{ cursor: "pointer" }}
|
|
41
|
-
src={`/images/dark-mode.png`}
|
|
42
|
-
alt="Solid"
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
<div className="col-8">
|
|
46
|
-
<p>Dark Mode</p>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<a onClick={() => signOut()}>Logout</a>
|
|
50
|
-
</div> */}
|
|
51
|
-
<div
|
|
52
|
-
className="w-full md:w-15rem p-menu p-component"
|
|
53
|
-
data-pc-name="menu"
|
|
54
|
-
data-pc-section="root"
|
|
55
|
-
>
|
|
56
|
-
<ul
|
|
57
|
-
className="p-menu-list p-reset"
|
|
58
|
-
id="pr_id_11_list"
|
|
59
|
-
role="menu"
|
|
60
|
-
data-pc-section="menu"
|
|
61
|
-
>
|
|
62
|
-
<li
|
|
63
|
-
className="p-menuitem"
|
|
64
|
-
role="menuitem"
|
|
65
|
-
data-pc-section="menuitem"
|
|
66
|
-
data-p-focused="false"
|
|
67
|
-
data-p-disabled="false"
|
|
68
|
-
>
|
|
69
|
-
<button className="p-menuitem-link w-full p-link flex align-items-center p-2 pl-4 text-color hover:surface-200 border-noround">
|
|
70
|
-
<div
|
|
71
|
-
className="mr-2 p-avatar p-component p-avatar-image p-avatar-circle"
|
|
72
|
-
data-pc-name="avatar"
|
|
73
|
-
data-pc-section="root"
|
|
74
|
-
>
|
|
75
|
-
<img
|
|
76
|
-
alt="avatar"
|
|
77
|
-
src={`/images/profile.png`}
|
|
78
|
-
data-pc-section="image"
|
|
79
|
-
style={{maxWidth:'30px'}}
|
|
80
|
-
></img>
|
|
81
|
-
</div>
|
|
82
|
-
<div className="flex flex-column align">
|
|
83
|
-
<span className="font-bold">User Name</span>
|
|
84
|
-
{/* <span className="text-sm">{user?.username}</span> */}
|
|
85
|
-
</div>
|
|
86
|
-
</button>
|
|
87
|
-
</li>
|
|
88
|
-
|
|
89
|
-
{/* <li
|
|
90
|
-
id="pr_id_11_separator_1"
|
|
91
|
-
className="p-menu-separator"
|
|
92
|
-
role="separator"
|
|
93
|
-
data-pc-section="separator"
|
|
94
|
-
></li>
|
|
95
|
-
<li
|
|
96
|
-
id="pr_id_11_5"
|
|
97
|
-
className="p-menuitem"
|
|
98
|
-
role="menuitem"
|
|
99
|
-
data-pc-section="menuitem"
|
|
100
|
-
data-p-focused="false"
|
|
101
|
-
data-p-disabled="false"
|
|
102
|
-
>
|
|
103
|
-
<div className="p-menuitem-link w-full p-link flex align-items-center justify-content-between p-2 pl-4 text-color hover:surface-200 border-noround">
|
|
104
|
-
<div>
|
|
105
|
-
<span className="pi pi-moon"></span>
|
|
106
|
-
<span className="font-bold mx-2">Dark Mode</span>
|
|
107
|
-
</div>
|
|
108
|
-
<div className="flex flex-column align">
|
|
109
|
-
<InputSwitch
|
|
110
|
-
checked={checked}
|
|
111
|
-
onChange={(e) => {
|
|
112
|
-
setChecked(e.value);
|
|
113
|
-
dispatch(toggleTheme());
|
|
114
|
-
}}
|
|
115
|
-
/>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</li>
|
|
119
|
-
|
|
120
|
-
<li
|
|
121
|
-
className="p-menu-separator"
|
|
122
|
-
role="separator"
|
|
123
|
-
data-pc-section="separator"
|
|
124
|
-
></li>
|
|
125
|
-
<li
|
|
126
|
-
role="none"
|
|
127
|
-
className="p-submenu-header"
|
|
128
|
-
data-pc-section="submenuheader"
|
|
129
|
-
>
|
|
130
|
-
Teams
|
|
131
|
-
</li>
|
|
67
|
+
</div>
|
|
132
68
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<span className="pi pi-moon"></span>
|
|
144
|
-
<span className="mx-2">Design</span>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
</li>
|
|
148
|
-
<li
|
|
149
|
-
role="none"
|
|
150
|
-
className="p-submenu-header"
|
|
151
|
-
data-pc-section="submenuheader"
|
|
152
|
-
>
|
|
153
|
-
Settings
|
|
154
|
-
</li>
|
|
155
|
-
<li
|
|
156
|
-
id="pr_id_11_5"
|
|
157
|
-
className="p-menuitem"
|
|
158
|
-
role="menuitem"
|
|
159
|
-
data-pc-section="menuitem"
|
|
160
|
-
data-p-focused="false"
|
|
161
|
-
data-p-disabled="false"
|
|
162
|
-
>
|
|
163
|
-
<div className="p-menuitem-link w-full p-link flex align-items-center justify-content-between p-2 pl-4 text-color hover:surface-200 border-noround">
|
|
164
|
-
<div>
|
|
165
|
-
<span className="pi pi-cog"></span>
|
|
166
|
-
<span className="mx-2">General Settings</span>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
</li>
|
|
170
|
-
<li
|
|
171
|
-
id="pr_id_11_5"
|
|
172
|
-
className="p-menuitem"
|
|
173
|
-
role="menuitem"
|
|
174
|
-
data-pc-section="menuitem"
|
|
175
|
-
data-p-focused="false"
|
|
176
|
-
data-p-disabled="false"
|
|
177
|
-
>
|
|
178
|
-
<div className="p-menuitem-link w-full p-link flex align-items-center justify-content-between p-2 pl-4 text-color hover:surface-200 border-noround">
|
|
179
|
-
<div>
|
|
180
|
-
<span className="pi pi-question-circle"></span>
|
|
181
|
-
<span className="mx-2">Support</span>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
</li> */}
|
|
69
|
+
{/* */}
|
|
70
|
+
<div className="p-3 flex align-items-center justify-content-between primary-border-bottom">
|
|
71
|
+
<div className="flex align-items-center gap-3">
|
|
72
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
|
|
73
|
+
<path d="M9 18C6.5 18 4.375 17.125 2.625 15.375C0.875 13.625 0 11.5 0 9C0 6.5 0.875 4.375 2.625 2.625C4.375 0.875 6.5 0 9 0C9.23333 0 9.4625 0.00833333 9.6875 0.025C9.9125 0.0416667 10.1333 0.0666667 10.35 0.1C9.66667 0.583333 9.12083 1.2125 8.7125 1.9875C8.30417 2.7625 8.1 3.6 8.1 4.5C8.1 6 8.625 7.275 9.675 8.325C10.725 9.375 12 9.9 13.5 9.9C14.4167 9.9 15.2583 9.69583 16.025 9.2875C16.7917 8.87917 17.4167 8.33333 17.9 7.65C17.9333 7.86667 17.9583 8.0875 17.975 8.3125C17.9917 8.5375 18 8.76667 18 9C18 11.5 17.125 13.625 15.375 15.375C13.625 17.125 11.5 18 9 18ZM9 16C10.4667 16 11.7833 15.5958 12.95 14.7875C14.1167 13.9792 14.9667 12.925 15.5 11.625C15.1667 11.7083 14.8333 11.775 14.5 11.825C14.1667 11.875 13.8333 11.9 13.5 11.9C11.45 11.9 9.70417 11.1792 8.2625 9.7375C6.82083 8.29583 6.1 6.55 6.1 4.5C6.1 4.16667 6.125 3.83333 6.175 3.5C6.225 3.16667 6.29167 2.83333 6.375 2.5C5.075 3.03333 4.02083 3.88333 3.2125 5.05C2.40417 6.21667 2 7.53333 2 9C2 10.9333 2.68333 12.5833 4.05 13.95C5.41667 15.3167 7.06667 16 9 16Z" fill="#1D6CBC" />
|
|
74
|
+
</svg>
|
|
75
|
+
<p className="m-0 font-bold">Dark Mode</p>
|
|
76
|
+
</div>
|
|
77
|
+
<InputSwitch checked={checked} onChange={handleThemeToggle} />
|
|
78
|
+
</div>
|
|
185
79
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
>
|
|
200
|
-
<div className="p-menuitem-content">
|
|
201
|
-
<a className="flex align-items-center p-menuitem-link" onClick={e=> logoutHandler()}>
|
|
202
|
-
<span className="pi pi-sign-out"></span>
|
|
203
|
-
<span className="mx-2">Logout</span>
|
|
204
|
-
</a>
|
|
205
|
-
</div>
|
|
206
|
-
</li>
|
|
207
|
-
</ul>
|
|
80
|
+
<div className="user-profile-body p-3">
|
|
81
|
+
<Button
|
|
82
|
+
text
|
|
83
|
+
severity="secondary"
|
|
84
|
+
className="flex align-items-center gap-2"
|
|
85
|
+
icon={
|
|
86
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none">
|
|
87
|
+
<path d="M3.75 15.75C3.3375 15.75 2.98438 15.6031 2.69063 15.3094C2.39687 15.0156 2.25 14.6625 2.25 14.25V3.75C2.25 3.3375 2.39687 2.98438 2.69063 2.69063C2.98438 2.39687 3.3375 2.25 3.75 2.25H9V3.75H3.75V14.25H9V15.75H3.75ZM12 12.75L10.9688 11.6625L12.8813 9.75H6.75V8.25H12.8813L10.9688 6.3375L12 5.25L15.75 9L12 12.75Z" fill="#F04A4A" />
|
|
88
|
+
</svg>
|
|
89
|
+
}
|
|
90
|
+
onClick={e => logoutHandler()}
|
|
91
|
+
label="Logout"
|
|
92
|
+
/>
|
|
208
93
|
</div>
|
|
209
94
|
</OverlayPanel>
|
|
210
|
-
</div>
|
|
211
|
-
</div>
|
|
95
|
+
</div >
|
|
96
|
+
</div >
|
|
212
97
|
);
|
|
213
98
|
};
|
|
214
99
|
|
|
@@ -7,9 +7,10 @@ import { DataTable, DataTableFilterMeta } from 'primereact/datatable';
|
|
|
7
7
|
import { Dropdown, DropdownChangeEvent } from 'primereact/dropdown';
|
|
8
8
|
import { InputNumber, InputNumberChangeEvent } from 'primereact/inputnumber';
|
|
9
9
|
import React, { useEffect, useState } from 'react';
|
|
10
|
-
import { FilterIcon } from '../modelsComponents/filterIcon';
|
|
11
10
|
import { CustomTag } from '../Tag/CustomTag';
|
|
12
11
|
import { DemoService } from './DemoData';
|
|
12
|
+
import { FilterIcon } from '../modelsComponents/filterIcon';
|
|
13
|
+
FilterIcon
|
|
13
14
|
const defaultFilters: DataTableFilterMeta = {
|
|
14
15
|
global: { value: null, matchMode: FilterMatchMode.CONTAINS },
|
|
15
16
|
name: {
|
|
@@ -118,7 +119,7 @@ export const ListViewTable = () => {
|
|
|
118
119
|
};
|
|
119
120
|
return (
|
|
120
121
|
<div className="">
|
|
121
|
-
|
|
122
|
+
<div className="form-wrapper-title mb-5">All</div>
|
|
122
123
|
<div className='flex gap-3 mb-3'>
|
|
123
124
|
|
|
124
125
|
{selectedProducts?.length ?
|
|
@@ -138,7 +139,7 @@ export const ListViewTable = () => {
|
|
|
138
139
|
emptyMessage="No Product found." onFilter={(e) => setFilters(e.filters)}
|
|
139
140
|
filterIcon={() => <FilterIcon />}
|
|
140
141
|
selectionMode={'checkbox'}
|
|
141
|
-
selection={selectedProducts|| []}
|
|
142
|
+
selection={selectedProducts || []}
|
|
142
143
|
onSelectionChange={(e) => setSelectedProducts(e.value)}
|
|
143
144
|
>
|
|
144
145
|
<Column selectionMode="multiple" headerStyle={{ width: '4rem' }}></Column>
|