eleven-solutions-common-website-unique-web 8.0.25 → 9.0.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/components/admin/TaxonomyForm.js +1 -1
- package/dist/components/admin/Template.d.ts +2 -0
- package/dist/components/admin/Template.js +5 -0
- package/dist/components/admin/UserForm.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/login/Header.js +2 -2
- package/package.json +1 -1
- package/src/components/admin/TaxonomyForm.tsx +1 -2
- package/src/components/admin/Template.tsx +58 -0
- package/src/components/admin/UserForm.tsx +1 -1
- package/src/components/index.ts +2 -0
- package/src/components/login/Header.tsx +17 -17
|
@@ -18,6 +18,7 @@ const TaxonomyForm = () => {
|
|
|
18
18
|
const [code, setCode] = useState("");
|
|
19
19
|
const [value, setValue] = useState("");
|
|
20
20
|
const [isEditMode, setIsEditMode] = useState(false);
|
|
21
|
+
const [isMultiple, setIsMultiple] = useState(false);
|
|
21
22
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
22
23
|
const [newCode, setNewCode] = useState("");
|
|
23
24
|
const [newValue, setNewValue] = useState("");
|
|
@@ -67,7 +68,6 @@ const TaxonomyForm = () => {
|
|
|
67
68
|
const [editTaxonomyItem, setEditTaxonomyItem] = useState(null);
|
|
68
69
|
const [editTempTaxonomyItem, setEditTempTaxonomyItem] = useState(null);
|
|
69
70
|
const [selectedTaxonomyId, setSelectedTaxonomyId] = useState("");
|
|
70
|
-
const [isMultiple, setIsMultiple] = useState(false);
|
|
71
71
|
const validateForm = () => {
|
|
72
72
|
if (!inputType || !code || !value) {
|
|
73
73
|
alert("Please fill in all required fields: Type, Code, and Value.");
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
const Template = () => {
|
|
3
|
+
return (_jsxs("div", { className: "container px-4 mx-auto mt-6 h-full", children: [_jsx("div", { className: "w-3/4", children: _jsx("h1", { className: "text-3xl font-bold text-blue-600 mb-5", children: "Template" }) }), _jsx("div", { className: "flex-grow ml-0 w-full mt-10", children: _jsxs("form", { className: "w-full ", children: [_jsx("label", { htmlFor: "default-search", className: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white", children: "Search" }), _jsxs("div", { className: "relative w-full", children: [_jsx("div", { className: "absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none", children: _jsx("svg", { className: "w-4 h-4 text-gray-500 dark:text-gray-400", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 20 20", children: _jsx("path", { stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z" }) }) }), _jsx("input", { type: "search", id: "default-search", className: "inline-block min-w-full p-3 ps-10 outline-none text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500", placeholder: "Search Templates", required: true }), _jsx("button", { type: "submit", className: "text-white absolute end-1.5 bottom-1.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800", children: "Search" })] })] }) }), _jsx("div", { className: "flex-grow ml-0 w-3/4", children: _jsx("form", { className: "w-auto" }) })] }));
|
|
4
|
+
};
|
|
5
|
+
export default Template;
|
|
@@ -79,6 +79,6 @@ const UserForm = () => {
|
|
|
79
79
|
window.history.pushState({}, "", "/admin/users");
|
|
80
80
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
81
81
|
};
|
|
82
|
-
return (_jsx("div", { className: "max-w-4xl p-6 mx-auto dark:bg-gray-800", children: _jsx("div", { children: _jsxs("form", { children: [_jsx("h1", { className: "text-3xl font-bold text-center text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? "Edit User" : "Add User" }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["User Name ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: userName, onChange: (e) => setUserName(e.target.value), type: "text", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter User Name" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Email ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: email, onChange: (e) => setEmail(e.target.value), type: "email", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter Email", disabled: isEditMode })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "
|
|
82
|
+
return (_jsx("div", { className: "max-w-4xl p-6 mx-auto dark:bg-gray-800", children: _jsx("div", { children: _jsxs("form", { children: [_jsx("h1", { className: "text-3xl font-bold text-center text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? "Edit User" : "Add User" }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["User Name ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: userName, onChange: (e) => setUserName(e.target.value), type: "text", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter User Name" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Email ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsx("input", { required: true, value: email, onChange: (e) => setEmail(e.target.value), type: "email", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter Email", disabled: isEditMode })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Mobile Number" }), _jsx("input", { required: true, value: mobile, onChange: (e) => setMobile(e.target.value), type: "number", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Enter Mobile Number" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsx("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: "Address" }), _jsx("input", { required: true, value: address, onChange: (e) => setAddress(e.target.value), type: "text", className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", placeholder: "Address" })] }), _jsxs("div", { className: "mb-6 w-full", children: [_jsxs("label", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: ["Role Type ", _jsx("span", { className: "text-red-500", children: "*" })] }), _jsxs("select", { required: true, value: roleType, onChange: (e) => setRoleType(e.target.value), className: "w-full px-4 py-2 mt-2 text-gray-800 bg-white border border-gray-400 rounded-md dark:bg-gray-800 dark:text-gray-300 dark:border-gray-800 focus:border-blue-400 focus:ring-blue-300 focus:ring-opacity-40 dark:focus:border-blue-300 focus:outline-none focus:ring", children: [_jsx("option", { value: "", children: "Select a Role Type" }), _jsx("option", { value: "1", children: "Guest" }), _jsx("option", { value: "2", children: "Admin" })] })] }), _jsxs("div", { className: "flex space-x-4 mt-6 justify-end", children: [_jsx("button", { type: "submit", onClick: handleSubmit, className: "px-8 py-2.5 leading-5 text-white transition-colors duration-300 transform bg-blue-600 rounded-md hover:bg-blue-500 focus:outline-none focus:bg-gray-600", children: isEditMode ? "Edit" : "Add" }), _jsx("button", { type: "button", onClick: handleCancelClick, className: "px-8 py-2.5 leading-5 text-white transition-colors duration-300 transform bg-blue-600 rounded-md hover:bg-blue-500 focus:outline-none focus:bg-gray-600", children: "Cancel" })] })] }) }) }));
|
|
83
83
|
};
|
|
84
84
|
export default UserForm;
|
|
@@ -8,6 +8,7 @@ export { default as Users } from "./admin/Users";
|
|
|
8
8
|
export { default as UserForm } from "./admin/UserForm";
|
|
9
9
|
export { default as Taxionomies } from "./admin/Taxionomies";
|
|
10
10
|
export { default as TaxonomyForm } from "./admin/TaxonomyForm";
|
|
11
|
+
export { default as Template } from "./admin/Template";
|
|
11
12
|
export { default as AdminSideBar } from "./admin/Sidebar";
|
|
12
13
|
export { default as Dashboard } from "./admin/Dashboard";
|
|
13
14
|
export { registerApi, loginApi } from "./api/api";
|
package/dist/components/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { default as Users } from "./admin/Users";
|
|
|
9
9
|
export { default as UserForm } from "./admin/UserForm";
|
|
10
10
|
export { default as Taxionomies } from "./admin/Taxionomies";
|
|
11
11
|
export { default as TaxonomyForm } from "./admin/TaxonomyForm";
|
|
12
|
+
export { default as Template } from "./admin/Template";
|
|
12
13
|
export { default as AdminSideBar } from "./admin/Sidebar";
|
|
13
14
|
export { default as Dashboard } from "./admin/Dashboard";
|
|
14
15
|
export { registerApi, loginApi } from "./api/api";
|
|
@@ -67,12 +67,12 @@ const Header = ({ toggleTheme, isDarkMode, userLogedin, userType, url, img, name
|
|
|
67
67
|
? "text-white hover:bg-gray-600"
|
|
68
68
|
: "text-black hover:bg-gray-200"}`, children: "Contact Us" }), userLogedin ? (_jsxs("div", { className: "relative", children: [_jsx("div", { className: `px-3 py-1 h-20 rounded-md md:flex items-center ${isDarkMode ? "text-white" : "text-black"} hidden `, onMouseEnter: () => setShowUserCard(true), children: _jsx("div", { className: "w-6 h-6 flex items-center justify-center", children: _jsx(IconWrapper, { style: { width: "50px", height: "20px" } }) }) }), showUserCard && (_jsxs("div", { className: `absolute top-16 right-0 p-2 w-52 shadow-lg rounded-lg border border-gray-200 hidden sm:block ${isDarkMode
|
|
69
69
|
? "bg-[#2e2e2e] border-gray-700"
|
|
70
|
-
: "bg-[#ffff] border-gray-200"}`, onMouseEnter: () => setShowUserCard(true), onMouseLeave: () => setShowUserCard(false), children: [
|
|
70
|
+
: "bg-[#ffff] border-gray-200"}`, onMouseEnter: () => setShowUserCard(true), onMouseLeave: () => setShowUserCard(false), children: [_jsx("p", { onClick: (event) => {
|
|
71
71
|
handleNavigation(event, "/admin");
|
|
72
72
|
event.currentTarget.parentElement.classList.add("hidden");
|
|
73
73
|
}, className: `cursor-pointer block px-4 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
|
|
74
74
|
? "text-white hover:bg-gray-600"
|
|
75
|
-
: "text-black hover:bg-gray-200"}`, children: "Admin" })
|
|
75
|
+
: "text-black hover:bg-gray-200"}`, children: "Admin" }), _jsx("p", { onClick: (event) => {
|
|
76
76
|
setusermodalopen(true);
|
|
77
77
|
event.currentTarget.parentElement.classList.add("hidden");
|
|
78
78
|
}, className: `cursor-pointer block px-4 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${isDarkMode
|
package/package.json
CHANGED
|
@@ -19,6 +19,7 @@ const TaxonomyForm = () => {
|
|
|
19
19
|
const [value, setValue] = useState<string>("");
|
|
20
20
|
|
|
21
21
|
const [isEditMode, setIsEditMode] = useState<boolean>(false);
|
|
22
|
+
const [isMultiple, setIsMultiple] = useState(false);
|
|
22
23
|
|
|
23
24
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
24
25
|
|
|
@@ -94,8 +95,6 @@ const TaxonomyForm = () => {
|
|
|
94
95
|
|
|
95
96
|
const [selectedTaxonomyId, setSelectedTaxonomyId] = useState<string>("");
|
|
96
97
|
|
|
97
|
-
const [isMultiple, setIsMultiple] = useState(false);
|
|
98
|
-
|
|
99
98
|
const validateForm = () => {
|
|
100
99
|
if (!inputType || !code || !value) {
|
|
101
100
|
alert("Please fill in all required fields: Type, Code, and Value.");
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const Template = () => {
|
|
4
|
+
return (
|
|
5
|
+
<div className="container px-4 mx-auto mt-6 h-full">
|
|
6
|
+
<div className="w-3/4">
|
|
7
|
+
<h1 className="text-3xl font-bold text-blue-600 mb-5">Template</h1>
|
|
8
|
+
</div>
|
|
9
|
+
<div className="flex-grow ml-0 w-full mt-10">
|
|
10
|
+
<form className="w-full ">
|
|
11
|
+
<label
|
|
12
|
+
htmlFor="default-search"
|
|
13
|
+
className="mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
|
|
14
|
+
>
|
|
15
|
+
Search
|
|
16
|
+
</label>
|
|
17
|
+
<div className="relative w-full">
|
|
18
|
+
<div className="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none">
|
|
19
|
+
<svg
|
|
20
|
+
className="w-4 h-4 text-gray-500 dark:text-gray-400"
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
fill="none"
|
|
24
|
+
viewBox="0 0 20 20"
|
|
25
|
+
>
|
|
26
|
+
<path
|
|
27
|
+
stroke="currentColor"
|
|
28
|
+
stroke-linecap="round"
|
|
29
|
+
stroke-linejoin="round"
|
|
30
|
+
stroke-width="2"
|
|
31
|
+
d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
|
|
32
|
+
/>
|
|
33
|
+
</svg>
|
|
34
|
+
</div>
|
|
35
|
+
<input
|
|
36
|
+
type="search"
|
|
37
|
+
id="default-search"
|
|
38
|
+
className="inline-block min-w-full p-3 ps-10 outline-none text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
|
39
|
+
placeholder="Search Templates"
|
|
40
|
+
required
|
|
41
|
+
/>
|
|
42
|
+
<button
|
|
43
|
+
type="submit"
|
|
44
|
+
className="text-white absolute end-1.5 bottom-1.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
45
|
+
>
|
|
46
|
+
Search
|
|
47
|
+
</button>
|
|
48
|
+
</div>
|
|
49
|
+
</form>
|
|
50
|
+
</div>
|
|
51
|
+
<div className="flex-grow ml-0 w-3/4">
|
|
52
|
+
<form className="w-auto">{/* Search Form */}</form>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default Template;
|
package/src/components/index.ts
CHANGED
|
@@ -9,6 +9,8 @@ export { default as Users } from "./admin/Users";
|
|
|
9
9
|
export { default as UserForm } from "./admin/UserForm";
|
|
10
10
|
export { default as Taxionomies } from "./admin/Taxionomies";
|
|
11
11
|
export { default as TaxonomyForm } from "./admin/TaxonomyForm";
|
|
12
|
+
export { default as Template } from "./admin/Template";
|
|
13
|
+
|
|
12
14
|
export { default as AdminSideBar } from "./admin/Sidebar";
|
|
13
15
|
export { default as Dashboard } from "./admin/Dashboard";
|
|
14
16
|
export { registerApi, loginApi } from "./api/api";
|
|
@@ -210,23 +210,23 @@ const Header = ({
|
|
|
210
210
|
onMouseEnter={() => setShowUserCard(true)}
|
|
211
211
|
onMouseLeave={() => setShowUserCard(false)}
|
|
212
212
|
>
|
|
213
|
-
{userType === 2 && (
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
)}
|
|
213
|
+
{/* {userType === 2 && ( */}
|
|
214
|
+
<p
|
|
215
|
+
onClick={(event) => {
|
|
216
|
+
handleNavigation(event, "/admin");
|
|
217
|
+
event.currentTarget.parentElement.classList.add(
|
|
218
|
+
"hidden"
|
|
219
|
+
);
|
|
220
|
+
}}
|
|
221
|
+
className={`cursor-pointer block px-4 py-2 rounded-md hover:bg-blue-400 transition-colors duration-200 ${
|
|
222
|
+
isDarkMode
|
|
223
|
+
? "text-white hover:bg-gray-600"
|
|
224
|
+
: "text-black hover:bg-gray-200"
|
|
225
|
+
}`}
|
|
226
|
+
>
|
|
227
|
+
Admin
|
|
228
|
+
</p>
|
|
229
|
+
{/* )} */}
|
|
230
230
|
<p
|
|
231
231
|
onClick={(event) => {
|
|
232
232
|
setusermodalopen(true);
|