eleven-solutions-common-website-unique-web 20.0.53 → 20.0.54
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.
@@ -308,40 +308,10 @@ const TaxonomyForm = ({ url }) => {
|
|
308
308
|
}
|
309
309
|
});
|
310
310
|
const parentTaxonomies = similarTaxonomies.filter((taxonomy) => !taxonomy.parentId);
|
311
|
-
return (_jsxs("div", { className: `${isEditMode ? "w-full" : "max-w-4xl"} p-6 mx-auto dark:bg-gray-800`, children: [_jsxs("div", { className: `transition duration-300 ${isModalOpen ? "filter blur-sm" : ""}`, children: [_jsx("h1", { className: "text-3xl font-bold text-center text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? "Edit Taxonomy" : "Add Taxonomy" }), _jsx("
|
311
|
+
return (_jsxs("div", { className: `${isEditMode ? "w-full" : "max-w-4xl"} p-6 mx-auto dark:bg-gray-800`, children: [_jsxs("div", { className: `transition duration-300 ${isModalOpen ? "filter blur-sm" : ""}`, children: [_jsx("h1", { className: "text-3xl font-bold text-center text-blue-600 capitalize dark:text-white mb-4", children: isEditMode ? "Edit Taxonomy" : "Add Taxonomy" }), _jsx("h3", { className: "text-gray-900 dark:text-gray-200 font-semibold", children: isEditMode ? `Taxonomy Type: ${type}` : "" }), isSimilarTaxonomyOpen && isEditMode && (_jsxs("div", { className: "flex-grow ml-0 mt-4 w-full", children: [_jsx("div", { className: "overflow-hidden border border-gray-200 dark:border-gray-700 md:rounded-lg mt-6", children: _jsxs("table", { className: "min-w-full divide-y divide-gray-200 dark:divide-gray-700", children: [_jsx("thead", { className: "bg-gray-50 dark:bg-gray-800", children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", style: { width: "200px" }, children: "Actions" }), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Code" }), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Value" })] }) }), _jsx("tbody", { className: "divide-y divide-gray-200", children: parentTaxonomies.map((taxonomy, index) => {
|
312
312
|
const hasChildren = allTaxonomies.some((item) => item.parentId === taxonomy.id);
|
313
313
|
return (_jsxs(React.Fragment, { children: [_jsxs("tr", { children: [_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: taxonomy.isEdit && (_jsxs("div", { className: "flex items-center gap-x-6", children: [_jsx("button", { type: "button", onClick: () => handleDeleteClick(taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-red-600 dark:text-gray-300 hover:text-red-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" }) }) }), _jsx("button", { type: "button", onClick: () => handleEditClick(index, taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-yellow-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" }) }) }), _jsx("button", { type: "button", onClick: () => handleAddSubType(index, taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-blue-500 dark:text-gray-300 hover:text-blue-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) }) }), hasChildren && (_jsx("button", { type: "button", onClick: () => toggleRowExpansion(taxonomy.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-blue-600 dark:text-gray-300 hover:text-blue-500 focus:outline-none", children: expandedRows.indexOf(taxonomy.id) !==
|
314
|
-
-1 ? (
|
315
|
-
// <svg
|
316
|
-
// xmlns="http://www.w3.org/2000/svg"
|
317
|
-
// fill="none"
|
318
|
-
// viewBox="0 0 24 24"
|
319
|
-
// strokeWidth="1.5"
|
320
|
-
// stroke="currentColor"
|
321
|
-
// className="w-5 h-5"
|
322
|
-
// >
|
323
|
-
// <path
|
324
|
-
// strokeLinecap="round"
|
325
|
-
// strokeLinejoin="round"
|
326
|
-
// d="M19.5 8.25l-7.5 7.5-7.5-7.5"
|
327
|
-
// />
|
328
|
-
// </svg>
|
329
|
-
_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 15.75l-7.5-7.5-7.5 7.5" }) })) : (
|
330
|
-
// <svg
|
331
|
-
// xmlns="http://www.w3.org/2000/svg"
|
332
|
-
// fill="none"
|
333
|
-
// viewBox="0 0 24 24"
|
334
|
-
// strokeWidth="1.5"
|
335
|
-
// stroke="currentColor"
|
336
|
-
// className="w-5 h-5"
|
337
|
-
// >
|
338
|
-
// <path
|
339
|
-
// strokeLinecap="round"
|
340
|
-
// strokeLinejoin="round"
|
341
|
-
// d="M19.5 15.75l-7.5-7.5-7.5 7.5"
|
342
|
-
// />
|
343
|
-
// </svg>
|
344
|
-
_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) })) }))] })) }), _jsx("td", { className: "px-4 py-4 text-sm text-gray-500 dark:text-gray-400", children: taxonomy.code }), _jsx("td", { className: "px-4 py-4 text-sm font-medium text-gray-900 dark:text-white", children: _jsx("div", { className: "flex justify-between items-center", children: _jsx("span", { children: taxonomy.value }) }) })] }, index), expandedRows.indexOf(taxonomy.id) !== -1 && (_jsx("tr", { children: _jsx("td", { colSpan: 3, children: _jsxs("table", { className: "min-w-full divide-y ", children: [_jsx("thead", { className: "bg-gray-50 dark:bg-gray-800", children: _jsxs("tr", { children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", style: { width: "200px" }, children: "Actions" })), _jsx("th", { scope: "col", style: { width: "350px" }, className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400 w-[23%]", children: "Code" }), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Value" })] }) }), _jsx("tbody", { children: allTaxonomies
|
314
|
+
-1 ? (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 15.75l-7.5-7.5-7.5 7.5" }) })) : (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" }) })) }))] })) }), _jsx("td", { className: "px-4 py-4 text-sm text-gray-500 dark:text-gray-400", children: taxonomy.code }), _jsx("td", { className: "px-4 py-4 text-sm font-medium text-gray-900 dark:text-white", children: _jsx("div", { className: "flex justify-between items-center", children: _jsx("span", { children: taxonomy.value }) }) })] }, index), expandedRows.indexOf(taxonomy.id) !== -1 && (_jsx("tr", { children: _jsx("td", { colSpan: 3, children: _jsxs("table", { className: "min-w-full divide-y ", children: [_jsx("thead", { className: "bg-gray-50 dark:bg-gray-800", children: _jsxs("tr", { children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("th", { scope: "col", className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", style: { width: "200px" }, children: "Actions" })), _jsx("th", { scope: "col", style: { width: "350px" }, className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400 w-[23%]", children: "Code" }), _jsx("th", { className: "px-4 py-3.5 text-md font-normal text-left rtl:text-right text-gray-500 dark:text-gray-400", children: "Value" })] }) }), _jsx("tbody", { children: allTaxonomies
|
345
315
|
.filter((item) => item.parentId === taxonomy.id)
|
346
316
|
.map((child, key) => (_jsxs("tr", { children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_jsx("td", { className: "px-4 py-4 text-sm whitespace-nowrap", children: _jsxs("div", { className: "flex items-center gap-x-6", children: [_jsx("button", { type: "button", onClick: () => handleDeleteSubTypeClick(child.id), className: "text-gray-500 transition-colors duration-200 dark:hover:text-red-600 dark:text-gray-300 hover:text-red-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" }) }) }), _jsx("button", { onClick: () => handleSubEdit(child), className: "text-gray-500 transition-colors duration-200 dark:hover:text-yellow-500 dark:text-gray-300 hover:text-yellow-500 focus:outline-none", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "w-5 h-5", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" }) }) })] }) })), _jsx("td", { className: "px-4 py-2 text-sm text-gray-500 dark:text-gray-400", children: child.code }), _jsx("td", { className: "px-4 py-4 text-sm font-medium text-gray-900 dark:text-white", children: child.value })] }, key))) })] }) }) }))] }, taxonomy.id));
|
347
317
|
}) })] }) }), similarTaxonomies.some((taxonomy) => taxonomy.isEdit && taxonomy.isMultiple) && (_jsx("div", { className: "flex space-x-4 mt-6 justify-start", children: _jsxs("button", { type: "button", onClick: handleOpenModal, className: "flex items-center justify-center px-6 py-2 font-medium tracking-wide text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-80", children: [_jsx(FaPlus, { className: "mr-2 font-medium" }), "Add Multiple Values"] }) }))] })), _jsxs("div", { className: "flex space-x-4 mt-6 justify-start", children: [similarTaxonomies.some((taxonomy) => taxonomy.isEdit) && (_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 ? "Save " : "Add " })), _jsx("button", { onClick: handleCancelClick, type: "button", 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" })] })] }), _jsx("div", { className: `fixed inset-y-0 right-0 z-50 w-1/3 bg-white dark:bg-gray-800 p-6 shadow-lg transform ${isModalOpen ? "translate-x-0" : "translate-x-full"} transition-transform duration-300`, children: _jsxs("div", { className: "p-6", children: [_jsxs("div", { className: "flex justify-between", children: [_jsx("h2", { className: "text-xl font-bold text-blue-600 mb-4 ", children: isAddingSubType
|
package/package.json
CHANGED
@@ -416,9 +416,12 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
|
|
416
416
|
<h1 className="text-3xl font-bold text-center text-blue-600 capitalize dark:text-white mb-4">
|
417
417
|
{isEditMode ? "Edit Taxonomy" : "Add Taxonomy"}
|
418
418
|
</h1>
|
419
|
-
<h1 className="text-2xl text-blue-600 capitalize dark:text-white mb-4">
|
419
|
+
{/* <h1 className="text-2xl text-blue-600 capitalize dark:text-white mb-4">
|
420
420
|
{isEditMode ? `Taxonomy Type: ${type}` : ""}
|
421
|
-
</h1>
|
421
|
+
</h1> */}
|
422
|
+
<h3 className="text-gray-900 dark:text-gray-200 font-semibold">
|
423
|
+
{isEditMode ? `Taxonomy Type: ${type}` : ""}
|
424
|
+
</h3>
|
422
425
|
|
423
426
|
{/* Table for Displaying Similar Taxonomies */}
|
424
427
|
{isSimilarTaxonomyOpen && isEditMode && (
|
@@ -531,20 +534,6 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
|
|
531
534
|
>
|
532
535
|
{expandedRows.indexOf(taxonomy.id) !==
|
533
536
|
-1 ? (
|
534
|
-
// <svg
|
535
|
-
// xmlns="http://www.w3.org/2000/svg"
|
536
|
-
// fill="none"
|
537
|
-
// viewBox="0 0 24 24"
|
538
|
-
// strokeWidth="1.5"
|
539
|
-
// stroke="currentColor"
|
540
|
-
// className="w-5 h-5"
|
541
|
-
// >
|
542
|
-
// <path
|
543
|
-
// strokeLinecap="round"
|
544
|
-
// strokeLinejoin="round"
|
545
|
-
// d="M19.5 8.25l-7.5 7.5-7.5-7.5"
|
546
|
-
// />
|
547
|
-
// </svg>
|
548
537
|
<svg
|
549
538
|
xmlns="http://www.w3.org/2000/svg"
|
550
539
|
fill="none"
|
@@ -560,20 +549,6 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
|
|
560
549
|
/>
|
561
550
|
</svg>
|
562
551
|
) : (
|
563
|
-
// <svg
|
564
|
-
// xmlns="http://www.w3.org/2000/svg"
|
565
|
-
// fill="none"
|
566
|
-
// viewBox="0 0 24 24"
|
567
|
-
// strokeWidth="1.5"
|
568
|
-
// stroke="currentColor"
|
569
|
-
// className="w-5 h-5"
|
570
|
-
// >
|
571
|
-
// <path
|
572
|
-
// strokeLinecap="round"
|
573
|
-
// strokeLinejoin="round"
|
574
|
-
// d="M19.5 15.75l-7.5-7.5-7.5 7.5"
|
575
|
-
// />
|
576
|
-
// </svg>
|
577
552
|
<svg
|
578
553
|
xmlns="http://www.w3.org/2000/svg"
|
579
554
|
fill="none"
|
@@ -601,47 +576,6 @@ const TaxonomyForm = ({ url }: TaxionomyFormProps) => {
|
|
601
576
|
<td className="px-4 py-4 text-sm font-medium text-gray-900 dark:text-white">
|
602
577
|
<div className="flex justify-between items-center">
|
603
578
|
<span>{taxonomy.value}</span>
|
604
|
-
{/* {hasChildren && (
|
605
|
-
<button
|
606
|
-
type="button"
|
607
|
-
onClick={() =>
|
608
|
-
toggleRowExpansion(taxonomy.id)
|
609
|
-
}
|
610
|
-
className="text-gray-500 transition-colors duration-200 dark:hover:text-blue-600 dark:text-gray-300 hover:text-blue-500 focus:outline-none"
|
611
|
-
>
|
612
|
-
{expandedRows.indexOf(taxonomy.id) !== -1 ? (
|
613
|
-
<svg
|
614
|
-
xmlns="http://www.w3.org/2000/svg"
|
615
|
-
fill="none"
|
616
|
-
viewBox="0 0 24 24"
|
617
|
-
strokeWidth="1.5"
|
618
|
-
stroke="currentColor"
|
619
|
-
className="w-5 h-5"
|
620
|
-
>
|
621
|
-
<path
|
622
|
-
strokeLinecap="round"
|
623
|
-
strokeLinejoin="round"
|
624
|
-
d="M19.5 8.25l-7.5 7.5-7.5-7.5"
|
625
|
-
/>
|
626
|
-
</svg>
|
627
|
-
) : (
|
628
|
-
<svg
|
629
|
-
xmlns="http://www.w3.org/2000/svg"
|
630
|
-
fill="none"
|
631
|
-
viewBox="0 0 24 24"
|
632
|
-
strokeWidth="1.5"
|
633
|
-
stroke="currentColor"
|
634
|
-
className="w-5 h-5"
|
635
|
-
>
|
636
|
-
<path
|
637
|
-
strokeLinecap="round"
|
638
|
-
strokeLinejoin="round"
|
639
|
-
d="M19.5 15.75l-7.5-7.5-7.5 7.5"
|
640
|
-
/>
|
641
|
-
</svg>
|
642
|
-
)}
|
643
|
-
</button>
|
644
|
-
)} */}
|
645
579
|
</div>
|
646
580
|
</td>
|
647
581
|
</tr>
|