2. Düzenleme

This commit is contained in:
Sedat Öztürk 2025-08-11 00:31:39 +03:00
parent e141709937
commit 63167918a1
8 changed files with 11 additions and 1057 deletions

View file

@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
"revision": "3ca0b8505b4bec776b69afdba2768812" "revision": "3ca0b8505b4bec776b69afdba2768812"
}, { }, {
"url": "index.html", "url": "index.html",
"revision": "0.rrn3ek1qb4g" "revision": "0.op8vjuuull"
}], {}); }], {});
workbox.cleanupOutdatedCaches(); workbox.cleanupOutdatedCaches();
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), { workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {

1044
ui/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -111,9 +111,6 @@
"postcss-cli": "^11.0.0", "postcss-cli": "^11.0.0",
"postcss-nesting": "^12.0.2", "postcss-nesting": "^12.0.2",
"prettier": "^3.1.1", "prettier": "^3.1.1",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-visualizer": "^5.13.1",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
"typescript": "^4.9.3", "typescript": "^4.9.3",
"vite": "^5.4.11", "vite": "^5.4.11",

View file

@ -82,7 +82,7 @@ export const ComponentLibrary: React.FC<ComponentLibraryProps> = ({
.map((cat: any) => ({ .map((cat: any) => ({
id: cat, id: cat,
name: cat, name: cat,
components: filteredComponents.filter((c) => c.category === cat), components: filteredComponents?.filter((c) => c.category === cat),
})) }))
.filter((cat) => cat.components.length > 0); .filter((cat) => cat.components.length > 0);

View file

@ -26,8 +26,8 @@ const ComponentManager: React.FC = () => {
>("all"); >("all");
// Calculate statistics // Calculate statistics
const totalComponents = components.length; const totalComponents = components?.length;
const activeComponents = components.filter((c) => c.isActive).length; const activeComponents = components?.filter((c) => c.isActive).length;
const inactiveComponents = totalComponents - activeComponents; const inactiveComponents = totalComponents - activeComponents;
const { translate } = useLocalization() const { translate } = useLocalization()
@ -55,7 +55,7 @@ const ComponentManager: React.FC = () => {
}, },
]; ];
const filteredComponents = components.filter((component) => { const filteredComponents = components?.filter((component) => {
const matchesSearch = const matchesSearch =
component.name.toLowerCase().includes(searchTerm.toLowerCase()) || component.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
(component.description || "") (component.description || "")
@ -166,7 +166,7 @@ const ComponentManager: React.FC = () => {
</div> </div>
{/* Components List */} {/* Components List */}
{filteredComponents.length > 0 ? ( {filteredComponents?.length > 0 ? (
<div className="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6"> <div className="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6">
{filteredComponents.map((component) => ( {filteredComponents.map((component) => (
<div <div

View file

@ -55,8 +55,8 @@ const Dashboard: React.FC = () => {
}, },
{ {
name: translate('::App.DeveloperKit.Dashboard.Stats.Components'), name: translate('::App.DeveloperKit.Dashboard.Stats.Components'),
value: components.filter((c) => c.isActive).length, value: components?.filter((c) => c.isActive).length,
total: components.length, total: components?.length,
icon: Puzzle, icon: Puzzle,
color: "text-purple-600", color: "text-purple-600",
bgColor: "bg-purple-100", bgColor: "bg-purple-100",

View file

@ -75,7 +75,7 @@ const ComponentRegistryProvider: React.FC<{ children: React.ReactNode }> = ({ ch
try { try {
// Create a bundle of all active components // Create a bundle of all active components
const activeComponents = components.filter(c => c.isActive); const activeComponents = components?.filter(c => c.isActive);
if (!activeComponents.length) { if (!activeComponents.length) {
setCompiledComponents({}); setCompiledComponents({});
@ -441,7 +441,7 @@ const ComponentRegistryProvider: React.FC<{ children: React.ReactNode }> = ({ ch
}, [components]); }, [components]);
const getRegisteredComponents = useCallback(() => { const getRegisteredComponents = useCallback(() => {
return components.filter(c => c.isActive).map(c => c.name); return components?.filter(c => c.isActive).map(c => c.name);
}, [components]); }, [components]);
const getComponentCode = useCallback((name: string) => { const getComponentCode = useCallback((name: string) => {

View file

@ -3,7 +3,6 @@ import react from '@vitejs/plugin-react'
import path from 'path' import path from 'path'
import dynamicImport from 'vite-plugin-dynamic-import' import dynamicImport from 'vite-plugin-dynamic-import'
import { VitePWA } from 'vite-plugin-pwa' import { VitePWA } from 'vite-plugin-pwa'
// import { visualizer } from 'rollup-plugin-visualizer'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({