2. Düzenleme
This commit is contained in:
parent
e141709937
commit
63167918a1
8 changed files with 11 additions and 1057 deletions
|
|
@ -82,7 +82,7 @@ define(['./workbox-54d0af47'], (function (workbox) { 'use strict';
|
|||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
||||
}, {
|
||||
"url": "index.html",
|
||||
"revision": "0.rrn3ek1qb4g"
|
||||
"revision": "0.op8vjuuull"
|
||||
}], {});
|
||||
workbox.cleanupOutdatedCaches();
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
|
|
|
|||
1044
ui/package-lock.json
generated
1044
ui/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -111,9 +111,6 @@
|
|||
"postcss-cli": "^11.0.0",
|
||||
"postcss-nesting": "^12.0.2",
|
||||
"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",
|
||||
"typescript": "^4.9.3",
|
||||
"vite": "^5.4.11",
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ export const ComponentLibrary: React.FC<ComponentLibraryProps> = ({
|
|||
.map((cat: any) => ({
|
||||
id: cat,
|
||||
name: cat,
|
||||
components: filteredComponents.filter((c) => c.category === cat),
|
||||
components: filteredComponents?.filter((c) => c.category === cat),
|
||||
}))
|
||||
.filter((cat) => cat.components.length > 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ const ComponentManager: React.FC = () => {
|
|||
>("all");
|
||||
|
||||
// Calculate statistics
|
||||
const totalComponents = components.length;
|
||||
const activeComponents = components.filter((c) => c.isActive).length;
|
||||
const totalComponents = components?.length;
|
||||
const activeComponents = components?.filter((c) => c.isActive).length;
|
||||
const inactiveComponents = totalComponents - activeComponents;
|
||||
const { translate } = useLocalization()
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ const ComponentManager: React.FC = () => {
|
|||
},
|
||||
];
|
||||
|
||||
const filteredComponents = components.filter((component) => {
|
||||
const filteredComponents = components?.filter((component) => {
|
||||
const matchesSearch =
|
||||
component.name.toLowerCase().includes(searchTerm.toLowerCase()) ||
|
||||
(component.description || "")
|
||||
|
|
@ -166,7 +166,7 @@ const ComponentManager: React.FC = () => {
|
|||
</div>
|
||||
|
||||
{/* Components List */}
|
||||
{filteredComponents.length > 0 ? (
|
||||
{filteredComponents?.length > 0 ? (
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6">
|
||||
{filteredComponents.map((component) => (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ const Dashboard: React.FC = () => {
|
|||
},
|
||||
{
|
||||
name: translate('::App.DeveloperKit.Dashboard.Stats.Components'),
|
||||
value: components.filter((c) => c.isActive).length,
|
||||
total: components.length,
|
||||
value: components?.filter((c) => c.isActive).length,
|
||||
total: components?.length,
|
||||
icon: Puzzle,
|
||||
color: "text-purple-600",
|
||||
bgColor: "bg-purple-100",
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ const ComponentRegistryProvider: React.FC<{ children: React.ReactNode }> = ({ ch
|
|||
|
||||
try {
|
||||
// Create a bundle of all active components
|
||||
const activeComponents = components.filter(c => c.isActive);
|
||||
const activeComponents = components?.filter(c => c.isActive);
|
||||
|
||||
if (!activeComponents.length) {
|
||||
setCompiledComponents({});
|
||||
|
|
@ -441,7 +441,7 @@ const ComponentRegistryProvider: React.FC<{ children: React.ReactNode }> = ({ ch
|
|||
}, [components]);
|
||||
|
||||
const getRegisteredComponents = useCallback(() => {
|
||||
return components.filter(c => c.isActive).map(c => c.name);
|
||||
return components?.filter(c => c.isActive).map(c => c.name);
|
||||
}, [components]);
|
||||
|
||||
const getComponentCode = useCallback((name: string) => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import react from '@vitejs/plugin-react'
|
|||
import path from 'path'
|
||||
import dynamicImport from 'vite-plugin-dynamic-import'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
// import { visualizer } from 'rollup-plugin-visualizer'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
|
|
|
|||
Loading…
Reference in a new issue