@donotdev/ui 0.0.31 → 0.1.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/LICENSE.md +3 -3
- package/dist/{GoToDialog-CR4VOVXT.js → GoToDialog-RU5RP7S2.js} +1 -1
- package/dist/chunk-ETE4RC7M.js +1 -0
- package/dist/components/auth/AuthHeader.d.ts +8 -3
- package/dist/components/auth/AuthHeader.d.ts.map +1 -1
- package/dist/components/auth/AuthHeader.js +6 -6
- package/dist/components/auth/AuthMenu.d.ts +2 -2
- package/dist/components/auth/AuthMenu.js +1 -1
- package/dist/components/common/FeatureCard.d.ts +2 -0
- package/dist/components/common/FeatureCard.d.ts.map +1 -1
- package/dist/components/common/FeatureCard.js +1 -1
- package/dist/components/common/FeatureDisabled.d.ts +2 -1
- package/dist/components/common/FeatureDisabled.d.ts.map +1 -1
- package/dist/components/common/FeatureDisabled.js +2 -2
- package/dist/components/common/ProgressBar.d.ts +1 -1
- package/dist/components/common/ProgressBar.js +2 -2
- package/dist/components/common/RedirectOverlay.d.ts +1 -1
- package/dist/components/common/RedirectOverlay.js +2 -2
- package/dist/components/common/Skeleton.d.ts +7 -7
- package/dist/components/common/Skeleton.js +8 -8
- package/dist/components/common/TechBento.d.ts +1 -0
- package/dist/components/common/TechBento.d.ts.map +1 -1
- package/dist/components/common/icon.d.ts +2 -1
- package/dist/components/common/icon.d.ts.map +1 -1
- package/dist/components/common/icon.js +2 -2
- package/dist/components/common/index.d.ts +1 -1
- package/dist/components/common/index.js +1 -1
- package/dist/components/cookie-consent/ConsentBanner.d.ts +1 -1
- package/dist/components/cookie-consent/ConsentBanner.js +2 -2
- package/dist/components/cookie-consent/CookieConsent.d.ts +1 -0
- package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
- package/dist/components/cookie-consent/index.d.ts +1 -1
- package/dist/components/cookie-consent/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/layout/GameContainer.d.ts +1 -1
- package/dist/components/layout/GameContainer.js +2 -2
- package/dist/components/layout/GameFlow.d.ts +2 -2
- package/dist/components/layout/GameFlow.js +2 -2
- package/dist/components/layout/PageConfig.d.ts +25 -0
- package/dist/components/layout/PageConfig.d.ts.map +1 -0
- package/dist/components/layout/PageConfig.js +47 -0
- package/dist/components/layout/PageContainer.d.ts +1 -1
- package/dist/components/layout/PageContainer.js +2 -2
- package/dist/components/layout/components/Breadcrumbs.d.ts +3 -1
- package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/layout/components/Breadcrumbs.js +2 -2
- package/dist/components/layout/components/DropdownNavigation.d.ts +1 -1
- package/dist/components/layout/components/DropdownNavigation.js +2 -2
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts +2 -1
- package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/layout/components/FloatingLanguageSwitcher.js +2 -2
- package/dist/components/layout/components/Notifications.d.ts +4 -4
- package/dist/components/layout/components/Notifications.js +3 -3
- package/dist/components/layout/components/header/AppBranding.d.ts +3 -2
- package/dist/components/layout/components/header/AppBranding.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppBranding.js +2 -2
- package/dist/components/layout/components/header/AppIcon.d.ts +2 -1
- package/dist/components/layout/components/header/AppIcon.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppIcon.js +2 -2
- package/dist/components/layout/components/header/AppTitle.d.ts +2 -1
- package/dist/components/layout/components/header/AppTitle.d.ts.map +1 -1
- package/dist/components/layout/components/header/AppTitle.js +2 -2
- package/dist/components/layout/components/header/CacheSettings.d.ts +1 -1
- package/dist/components/layout/components/header/CacheSettings.js +5 -5
- package/dist/components/layout/components/header/GameTitle.d.ts +2 -1
- package/dist/components/layout/components/header/GameTitle.d.ts.map +1 -1
- package/dist/components/layout/components/header/GameTitle.js +2 -2
- package/dist/components/layout/components/header/HeaderMenu.d.ts +2 -1
- package/dist/components/layout/components/header/HeaderMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderMenu.js +2 -2
- package/dist/components/layout/components/header/HeaderNavigation.d.ts +2 -1
- package/dist/components/layout/components/header/HeaderNavigation.d.ts.map +1 -1
- package/dist/components/layout/components/header/HeaderNavigation.js +2 -2
- package/dist/components/layout/components/header/SettingsMenu.d.ts +2 -1
- package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
- package/dist/components/layout/components/header/SettingsMenu.js +2 -2
- package/dist/components/layout/components/header/ThemeToggle.d.ts +1 -1
- package/dist/components/layout/components/header/ThemeToggle.js +2 -2
- package/dist/components/layout/components/index.d.ts +1 -1
- package/dist/components/layout/components/index.js +1 -1
- package/dist/components/layout/index.d.ts +2 -1
- package/dist/components/layout/index.d.ts.map +1 -1
- package/dist/components/layout/index.js +2 -1
- package/dist/components/license/LicenseWatermark.d.ts +1 -1
- package/dist/components/license/LicenseWatermark.js +2 -2
- package/dist/components/license/watermarkData.js +1 -1
- package/dist/crud/components/CrudCardLink.d.ts +1 -1
- package/dist/crud/components/EntityCardList.d.ts +1 -1
- package/dist/crud/components/EntityCardList.d.ts.map +1 -1
- package/dist/crud/components/EntityCardList.js +33 -22
- package/dist/crud/components/EntityDisplayRenderer.d.ts +1 -1
- package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityDisplayRenderer.js +14 -13
- package/dist/crud/components/EntityFormRenderer.d.ts +1 -1
- package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityFormRenderer.js +18 -20
- package/dist/crud/components/EntityList.d.ts +1 -1
- package/dist/crud/components/EntityList.d.ts.map +1 -1
- package/dist/crud/components/EntityList.js +41 -25
- package/dist/crud/components/EntityRecommendations.d.ts +2 -2
- package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
- package/dist/crud/components/EntityRecommendations.js +6 -6
- package/dist/crud/components/EntityWorkflow.js +1 -1
- package/dist/crud/components/Form.d.ts +10 -10
- package/dist/crud/components/Form.js +12 -12
- package/dist/crud/components/index.d.ts +1 -1
- package/dist/crud/components/index.js +1 -1
- package/dist/crud/crudImports.d.ts +2 -1
- package/dist/crud/crudImports.d.ts.map +1 -1
- package/dist/crud/crudImports.js +2 -1
- package/dist/crud/index.d.ts +1 -1
- package/dist/crud/index.js +1 -1
- package/dist/data/techLogos.d.ts +1 -1
- package/dist/data/techLogos.js +1 -1
- package/dist/dndev-next.css +374 -81
- package/dist/dndev.css +455 -80
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/internal/common/DnDevErrorBoundary.d.ts +2 -2
- package/dist/internal/common/DnDevErrorBoundary.js +2 -2
- package/dist/internal/common/ErrorFallback.d.ts +1 -1
- package/dist/internal/common/ErrorFallback.js +3 -3
- package/dist/internal/common/GlobalErrorFallback.d.ts +1 -1
- package/dist/internal/common/GlobalErrorFallback.js +2 -2
- package/dist/internal/common/RouteErrorFallback.d.ts +1 -1
- package/dist/internal/common/RouteErrorFallback.js +2 -2
- package/dist/internal/devtools/DebugTools.js +2 -2
- package/dist/internal/devtools/components/AuthDebugButton.js +1 -1
- package/dist/internal/devtools/components/ConfigTab.js +1 -1
- package/dist/internal/devtools/components/CookieTab.js +1 -1
- package/dist/internal/devtools/components/DebugDialog.js +1 -1
- package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
- package/dist/internal/devtools/components/DesignTab.js +7 -3
- package/dist/internal/devtools/components/LayoutReset.js +2 -2
- package/dist/internal/devtools/components/MaskedValue.js +1 -1
- package/dist/internal/devtools/components/StoresTab.js +1 -1
- package/dist/internal/devtools/components/index.d.ts +1 -1
- package/dist/internal/devtools/components/index.js +1 -1
- package/dist/internal/devtools/index.d.ts +1 -1
- package/dist/internal/devtools/index.js +1 -1
- package/dist/internal/devtools/types.d.ts +9 -9
- package/dist/internal/devtools/utils/envVarDiscovery.d.ts.map +1 -1
- package/dist/internal/devtools/utils/envVarDiscovery.js +5 -6
- package/dist/internal/devtools/utils/index.d.ts +1 -1
- package/dist/internal/devtools/utils/index.js +1 -1
- package/dist/internal/devtools/utils/maskSensitive.js +1 -1
- package/dist/internal/devtools/utils/virtualModuleInspector.d.ts.map +1 -1
- package/dist/internal/devtools/utils/virtualModuleInspector.js +3 -1
- package/dist/internal/initializers/BaseStoresInitializer.d.ts +3 -3
- package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
- package/dist/internal/initializers/BaseStoresInitializer.js +13 -4
- package/dist/internal/initializers/NextJsStoresInitializer.d.ts +1 -1
- package/dist/internal/initializers/NextJsStoresInitializer.js +2 -2
- package/dist/internal/initializers/ViteStoresInitializer.d.ts +1 -1
- package/dist/internal/initializers/ViteStoresInitializer.js +2 -2
- package/dist/internal/initializers/index.d.ts +1 -1
- package/dist/internal/initializers/index.js +1 -1
- package/dist/internal/layout/DnDevLayout.d.ts +2 -2
- package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
- package/dist/internal/layout/DnDevLayout.js +45 -18
- package/dist/internal/layout/components/AutoMetaTags.d.ts +4 -2
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +193 -57
- package/dist/internal/layout/components/FaviconHead.d.ts +1 -1
- package/dist/internal/layout/components/FaviconHead.js +2 -2
- package/dist/internal/layout/components/FontPreloadLinks.d.ts +1 -1
- package/dist/internal/layout/components/FontPreloadLinks.js +1 -1
- package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts +3 -1
- package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/NextJsAutoMetaTags.js +47 -17
- package/dist/internal/layout/components/PWAUpdateNotification.d.ts +1 -1
- package/dist/internal/layout/components/PWAUpdateNotification.d.ts.map +1 -1
- package/dist/internal/layout/components/PWAUpdateNotification.js +17 -4
- package/dist/internal/layout/components/PerformanceHints.js +1 -1
- package/dist/internal/layout/components/footer/FooterBranding.d.ts +1 -1
- package/dist/internal/layout/components/footer/FooterBranding.js +2 -2
- package/dist/internal/layout/components/footer/FooterCopyright.d.ts +1 -1
- package/dist/internal/layout/components/footer/FooterCopyright.js +2 -2
- package/dist/internal/layout/components/footer/FooterLegalLinks.d.ts +1 -1
- package/dist/internal/layout/components/footer/FooterLegalLinks.js +2 -2
- package/dist/internal/layout/components/index.d.ts +1 -1
- package/dist/internal/layout/components/index.js +1 -1
- package/dist/internal/layout/config/defaults.js +1 -1
- package/dist/internal/layout/config/index.d.ts +1 -1
- package/dist/internal/layout/config/index.js +1 -1
- package/dist/internal/layout/config/presets/admin.d.ts +1 -1
- package/dist/internal/layout/config/presets/blog.d.ts +1 -1
- package/dist/internal/layout/config/presets/docs.js +1 -1
- package/dist/internal/layout/config/presets/game.js +1 -1
- package/dist/internal/layout/config/presets/index.d.ts +1 -1
- package/dist/internal/layout/config/presets/landing.js +1 -1
- package/dist/internal/layout/config/presets/moolti.js +1 -1
- package/dist/internal/layout/config/presets/plain.d.ts +2 -2
- package/dist/internal/layout/config/presets/plain.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/plain.js +12 -1
- package/dist/internal/layout/renderers/index.d.ts +1 -1
- package/dist/internal/layout/renderers/index.js +1 -1
- package/dist/internal/layout/zones/DnDevFooter.d.ts +3 -1
- package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevFooter.js +6 -2
- package/dist/internal/layout/zones/DnDevHeader.d.ts +3 -1
- package/dist/internal/layout/zones/DnDevHeader.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevHeader.js +8 -3
- package/dist/internal/layout/zones/DnDevMergedBar.js +1 -1
- package/dist/internal/layout/zones/DnDevSidebar.d.ts +3 -1
- package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
- package/dist/internal/layout/zones/DnDevSidebar.js +10 -4
- package/dist/internal/layout/zones/index.d.ts +1 -1
- package/dist/internal/layout/zones/index.js +1 -1
- package/dist/internal/providers/NavigationProvider.d.ts +1 -1
- package/dist/internal/providers/NavigationProvider.js +2 -2
- package/dist/internal/providers/SentryInitializer.d.ts +1 -1
- package/dist/internal/providers/SentryInitializer.js +2 -2
- package/dist/internal/providers/UIProviders.d.ts +1 -1
- package/dist/internal/providers/UIProviders.js +3 -3
- package/dist/internal/providers/index.d.ts +1 -1
- package/dist/internal/providers/index.js +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/next.js +1 -1
- package/dist/providers/NextJsAppProviders.d.ts +1 -1
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +5 -3
- package/dist/providers/ViteAppProviders.d.ts +1 -1
- package/dist/providers/ViteAppProviders.js +2 -2
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/routing/404.d.ts +2 -2
- package/dist/routing/404.js +3 -3
- package/dist/routing/AuthGuard.d.ts +14 -29
- package/dist/routing/AuthGuard.d.ts.map +1 -1
- package/dist/routing/AuthGuard.js +27 -72
- package/dist/routing/AuthGuardFallback.d.ts +1 -1
- package/dist/routing/AuthGuardFallback.js +2 -2
- package/dist/routing/AuthReturnTo.d.ts +13 -0
- package/dist/routing/AuthReturnTo.d.ts.map +1 -0
- package/dist/routing/AuthReturnTo.js +61 -0
- package/dist/routing/DnDevNavigationMenu.d.ts +2 -1
- package/dist/routing/DnDevNavigationMenu.d.ts.map +1 -1
- package/dist/routing/DnDevNavigationMenu.js +2 -2
- package/dist/routing/GoTo.d.ts +1 -0
- package/dist/routing/GoTo.d.ts.map +1 -1
- package/dist/routing/GoTo.js +1 -1
- package/dist/routing/GoToDialog.js +1 -1
- package/dist/routing/GoToInput.js +1 -1
- package/dist/routing/GoToWrapper.d.ts +1 -1
- package/dist/routing/GoToWrapper.js +2 -2
- package/dist/routing/Link.d.ts +2 -2
- package/dist/routing/Link.js +2 -2
- package/dist/routing/NavigationItem.d.ts +1 -1
- package/dist/routing/NavigationItem.js +2 -2
- package/dist/routing/hooks/hooks.next.d.ts +1 -1
- package/dist/routing/hooks/hooks.next.js +1 -1
- package/dist/routing/hooks/hooks.vite.d.ts +1 -1
- package/dist/routing/hooks/hooks.vite.js +1 -1
- package/dist/routing/hooks/index.d.ts +1 -1
- package/dist/routing/hooks/index.js +1 -1
- package/dist/routing/hooks/types.d.ts +1 -1
- package/dist/routing/hooks/useLocation.next.js +1 -1
- package/dist/routing/hooks/useLocation.vite.js +1 -1
- package/dist/routing/hooks/useNavigate.next.d.ts +8 -0
- package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.next.js +59 -9
- package/dist/routing/hooks/useNavigate.vite.d.ts +8 -0
- package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useNavigate.vite.js +65 -15
- package/dist/routing/hooks/useQueryParams.next.js +1 -1
- package/dist/routing/hooks/useQueryParams.vite.js +1 -1
- package/dist/routing/hooks/useRedirectGuard.next.d.ts +2 -0
- package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.next.js +12 -28
- package/dist/routing/hooks/useRedirectGuard.vite.d.ts +2 -0
- package/dist/routing/hooks/useRedirectGuard.vite.d.ts.map +1 -1
- package/dist/routing/hooks/useRedirectGuard.vite.js +12 -28
- package/dist/routing/hooks/useRouteParam.next.js +1 -1
- package/dist/routing/hooks/useRouteParam.vite.js +1 -1
- package/dist/routing/index.d.ts +2 -1
- package/dist/routing/index.d.ts.map +1 -1
- package/dist/routing/index.js +2 -1
- package/dist/routing/useGoTo.js +1 -1
- package/dist/routing/useNavigation.d.ts +2 -2
- package/dist/routing/useNavigation.js +3 -3
- package/dist/routing/useRouteDiscovery.d.ts +7 -7
- package/dist/routing/useRouteDiscovery.js +6 -6
- package/dist/styles/index.css +455 -80
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/layoutConstants.d.ts +6 -6
- package/dist/styles/layoutConstants.js +5 -5
- package/dist/symbol-index.json +1 -0
- package/dist/utils/assetResolver.d.ts +5 -5
- package/dist/utils/assetResolver.js +4 -4
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/sanitizeSvg.d.ts +4 -0
- package/dist/utils/sanitizeSvg.d.ts.map +1 -1
- package/dist/utils/sanitizeSvg.js +5 -1
- package/dist/utils/tList.js +1 -1
- package/dist/utils/useAISafe.d.ts +28 -0
- package/dist/utils/useAISafe.d.ts.map +1 -0
- package/dist/utils/useAISafe.js +53 -0
- package/dist/utils/useAuthSafe.d.ts +39 -0
- package/dist/utils/useAuthSafe.d.ts.map +1 -1
- package/dist/utils/useAuthSafe.js +6 -1
- package/dist/utils/useAuthVisibility.d.ts +1 -0
- package/dist/utils/useAuthVisibility.d.ts.map +1 -1
- package/dist/utils/useAuthVisibility.js +1 -1
- package/dist/utils/useBillingVisibility.d.ts +1 -0
- package/dist/utils/useBillingVisibility.d.ts.map +1 -1
- package/dist/utils/useBillingVisibility.js +1 -1
- package/dist/utils/useCrudSafe.js +1 -1
- package/dist/utils/useFormStoreSafe.js +1 -1
- package/dist/utils/useOAuthSafe.d.ts +1 -1
- package/dist/utils/useSeo.d.ts +121 -0
- package/dist/utils/useSeo.d.ts.map +1 -0
- package/dist/utils/useSeo.js +114 -0
- package/dist/utils/useStripeBillingSafe.js +1 -1
- package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
- package/dist/vite-routing/AppRoutes.js +15 -5
- package/dist/vite-routing/RootLayout.d.ts +1 -1
- package/dist/vite-routing/RootLayout.d.ts.map +1 -1
- package/dist/vite-routing/RootLayout.js +11 -9
- package/dist/vite-routing/index.d.ts +1 -1
- package/dist/vite-routing/index.js +1 -1
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +1 -1
- package/guidelines/COMPONENTS.md +136 -0
- package/guidelines/GOTCHAS.md +66 -0
- package/guidelines/LAYOUTS.md +310 -0
- package/guidelines/PAGES.md +205 -0
- package/guidelines/ROUTING.md +499 -0
- package/guidelines/SEO.md +275 -0
- package/package.json +12 -7
- package/dist/chunk-XHGRMKOY.js +0 -1
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
9
9
|
* **Routing:** Convention basePath = `/${collection}`. View/Edit = basePath/:id, Create = basePath/new.
|
|
10
10
|
* Override basePath for nested routes; use onClick(id) to open sheet instead of navigating.
|
|
11
11
|
*
|
|
12
|
-
* @version 0.
|
|
12
|
+
* @version 0.1.0
|
|
13
13
|
* @since 0.0.1
|
|
14
14
|
* @author AMBROISE PARK Consulting
|
|
15
15
|
*/
|
|
@@ -17,7 +17,7 @@ import { RefreshCw, Plus, Trash2, Edit, Search } from 'lucide-react';
|
|
|
17
17
|
import { useMemo, useCallback, useState } from 'react';
|
|
18
18
|
import { DataTable, Button, Stack, ActionButton, Section, Input, } from '@donotdev/components';
|
|
19
19
|
import { useTranslation } from '@donotdev/core';
|
|
20
|
-
import { isCrudModuleAvailable, translateFieldLabel, useCrud, useCrudList, EntityFilters, formatValue, useReferenceResolver, } from '../crudImports';
|
|
20
|
+
import { isCrudModuleAvailable, translateFieldLabel, useCrud, useCrudList, useCrudPageSize, EntityFilters, formatValue, useReferenceResolver, } from '../crudImports';
|
|
21
21
|
import { useNavigate } from '../../routing';
|
|
22
22
|
/**
|
|
23
23
|
* Entity List Component - Table view for admin/internal operations
|
|
@@ -29,32 +29,39 @@ import { useNavigate } from '../../routing';
|
|
|
29
29
|
* - Edit and Delete actions (admin only)
|
|
30
30
|
* - Auto-routing when handlers not provided
|
|
31
31
|
*/
|
|
32
|
-
export function EntityList({ entity, basePath, onClick, hideFilters = false, pagination = 'auto', pageSize: pageSizeProp, queryOptions, exportable = true, }) {
|
|
32
|
+
export function EntityList({ entity, basePath, onClick, hideFilters = false, pagination = 'auto', pageSize: pageSizeProp, queryOptions, exportable = true, preview, tone, }) {
|
|
33
33
|
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
34
34
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
35
|
if (!isCrudModuleAvailable)
|
|
36
36
|
return null;
|
|
37
|
+
const isPreview = !!preview;
|
|
37
38
|
const navigate = useNavigate();
|
|
38
39
|
const base = basePath ?? `/${entity.collection}`;
|
|
39
40
|
// Pre-fetch referenced collections for display resolution
|
|
40
|
-
const referenceData = useReferenceResolver(entity);
|
|
41
|
+
const referenceData = useReferenceResolver(entity, !isPreview);
|
|
41
42
|
// Server-side pagination state (only used when pagination='server')
|
|
42
43
|
const [currentPage, setCurrentPage] = useState(1);
|
|
43
|
-
//
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
// Persisted page size — survives navigation, per collection
|
|
45
|
+
const { pageSize: storedPageSize, setPageSize: setStoredPageSize } = useCrudPageSize({
|
|
46
|
+
collection: entity.collection,
|
|
47
|
+
...(pageSizeProp != null && { defaultPageSize: pageSizeProp }),
|
|
48
|
+
});
|
|
46
49
|
const [searchQuery, setSearchQuery] = useState('');
|
|
47
50
|
// useCrudList now handles client-side filter + search + sort via `processed`
|
|
48
51
|
// effectiveMode tells us if auto-mode switched to server (for DataTable props)
|
|
49
|
-
const { data: listData, items: rawData, processed:
|
|
52
|
+
const { data: listData, items: rawData, processed: fetchedData, loading: fetchLoading, mutate: refreshList, effectiveMode, } = useCrudList(entity, {
|
|
53
|
+
enabled: !isPreview,
|
|
50
54
|
pagination,
|
|
51
55
|
searchQuery,
|
|
52
56
|
...(queryOptions && { queryOptions }),
|
|
53
57
|
...((pagination === 'server' || pagination === 'auto') && {
|
|
54
58
|
page: currentPage,
|
|
55
|
-
pageSize:
|
|
59
|
+
pageSize: storedPageSize,
|
|
56
60
|
}),
|
|
57
61
|
});
|
|
62
|
+
// In preview mode: use preview data, skip loading state
|
|
63
|
+
const filteredData = isPreview ? preview : fetchedData;
|
|
64
|
+
const loading = isPreview ? false : fetchLoading;
|
|
58
65
|
// useCrud -> handles actions (delete)
|
|
59
66
|
const { delete: deleteItem } = useCrud(entity);
|
|
60
67
|
const { t: tCrud } = useTranslation('crud');
|
|
@@ -66,25 +73,33 @@ export function EntityList({ entity, basePath, onClick, hideFilters = false, pag
|
|
|
66
73
|
}, [refreshList]);
|
|
67
74
|
// Edit button: always navigate to basePath/:id
|
|
68
75
|
const handleEdit = useCallback((id) => {
|
|
76
|
+
if (isPreview)
|
|
77
|
+
return;
|
|
69
78
|
navigate(`${base}/${id}`);
|
|
70
|
-
}, [base, navigate]);
|
|
79
|
+
}, [base, navigate, isPreview]);
|
|
71
80
|
// Row click: onClick(id) if provided, else navigate to basePath/:id
|
|
72
81
|
const handleView = useCallback((id) => {
|
|
82
|
+
if (isPreview)
|
|
83
|
+
return;
|
|
73
84
|
if (onClick) {
|
|
74
85
|
onClick(id);
|
|
75
86
|
}
|
|
76
87
|
else {
|
|
77
88
|
navigate(`${base}/${id}`);
|
|
78
89
|
}
|
|
79
|
-
}, [base, navigate, onClick]);
|
|
90
|
+
}, [base, navigate, onClick, isPreview]);
|
|
80
91
|
// Add New: navigate to basePath/new
|
|
81
92
|
const handleCreate = useCallback(() => {
|
|
93
|
+
if (isPreview)
|
|
94
|
+
return;
|
|
82
95
|
navigate(`${base}/new`);
|
|
83
|
-
}, [base, navigate]);
|
|
96
|
+
}, [base, navigate, isPreview]);
|
|
84
97
|
// Delete handler - store handles optimistic removal automatically
|
|
85
98
|
const handleDelete = useCallback(async (itemId) => {
|
|
99
|
+
if (isPreview)
|
|
100
|
+
return;
|
|
86
101
|
await deleteItem(itemId);
|
|
87
|
-
}, [deleteItem]);
|
|
102
|
+
}, [deleteItem, isPreview]);
|
|
88
103
|
// Generate columns from entity.listFields or entity.fields
|
|
89
104
|
const columns = useMemo(() => {
|
|
90
105
|
const fieldsToShow = entity.listFields || Object.keys(entity.fields);
|
|
@@ -101,12 +116,13 @@ export function EntityList({ entity, basePath, onClick, hideFilters = false, pag
|
|
|
101
116
|
key: fieldName,
|
|
102
117
|
title: label,
|
|
103
118
|
dataIndex: fieldName,
|
|
104
|
-
sortable:
|
|
105
|
-
filterable:
|
|
119
|
+
sortable: !isPreview,
|
|
120
|
+
filterable: !isPreview,
|
|
106
121
|
align,
|
|
107
122
|
render: (value, record) => formatValue(value, fieldConfig, t, {
|
|
108
123
|
compact: true,
|
|
109
124
|
referenceData,
|
|
125
|
+
item: record,
|
|
110
126
|
}),
|
|
111
127
|
};
|
|
112
128
|
})
|
|
@@ -119,7 +135,7 @@ export function EntityList({ entity, basePath, onClick, hideFilters = false, pag
|
|
|
119
135
|
sortable: false,
|
|
120
136
|
width: 120,
|
|
121
137
|
align: 'center',
|
|
122
|
-
render: (_, record) => (_jsxs(Stack, { direction: "row", gap: "tight", align: "center", justify: "center", children: [_jsx(Button, { variant: "outline", icon: Edit, onClick: (e) => {
|
|
138
|
+
render: (_, record) => (_jsxs(Stack, { direction: "row", gap: "tight", align: "center", justify: "center", children: [_jsx(Button, { variant: "outline", icon: Edit, disabled: isPreview, onClick: (e) => {
|
|
123
139
|
e.stopPropagation();
|
|
124
140
|
handleEdit(record.id);
|
|
125
141
|
}, "aria-label": tCrud('edit', { defaultValue: 'Edit' }) }), _jsx(ActionButton, { action: async () => {
|
|
@@ -130,12 +146,12 @@ export function EntityList({ entity, basePath, onClick, hideFilters = false, pag
|
|
|
130
146
|
defaultValue: 'Delete Item',
|
|
131
147
|
}), loadingText: tCrud('delete.loading', {
|
|
132
148
|
defaultValue: 'Deleting...',
|
|
133
|
-
}), variant: "destructive", icon: Trash2, "aria-label": tCrud('delete', { defaultValue: 'Delete' }), children: tCrud('delete', { defaultValue: 'Delete' }) })] })),
|
|
149
|
+
}), variant: "destructive", icon: Trash2, disabled: isPreview, "aria-label": tCrud('delete', { defaultValue: 'Delete' }), children: tCrud('delete', { defaultValue: 'Delete' }) })] })),
|
|
134
150
|
});
|
|
135
151
|
return baseColumns;
|
|
136
152
|
// Note: 't' and 'tCrud' are assumed stable across renders (i18next returns the same reference
|
|
137
153
|
// unless the language changes). If i18n language switching causes stale columns, add i18n.language to deps.
|
|
138
|
-
}, [entity, t, tCrud, handleEdit, handleDelete]);
|
|
154
|
+
}, [entity, t, tCrud, handleEdit, handleDelete, isPreview]);
|
|
139
155
|
// Entity name for section title
|
|
140
156
|
const entityName = t('name', { defaultValue: entity.name });
|
|
141
157
|
// Result count
|
|
@@ -144,9 +160,9 @@ export function EntityList({ entity, basePath, onClick, hideFilters = false, pag
|
|
|
144
160
|
return (_jsxs(_Fragment, { children: [_jsx(Section, { title: tCrud('filters.title', {
|
|
145
161
|
entity: entityName,
|
|
146
162
|
defaultValue: `Browse ${entityName} - Filters`,
|
|
147
|
-
}), collapsible: true, defaultOpen: true, children: _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", gap: "tight", align: "center", className: "dndev-w-full", style: { display: 'grid', gridTemplateColumns: '1fr auto auto' }, children: [_jsx(Input, { placeholder: tCrud('search.placeholder', {
|
|
163
|
+
}), collapsible: true, defaultOpen: true, tone: tone, children: _jsxs(Stack, { children: [_jsxs(Stack, { direction: "row", gap: "tight", align: "center", className: "dndev-w-full", style: { display: 'grid', gridTemplateColumns: '1fr auto auto' }, children: [_jsx(Input, { placeholder: tCrud('search.placeholder', {
|
|
148
164
|
defaultValue: 'Search...',
|
|
149
|
-
}), value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), icon: Search, className: "dndev-w-full" }), _jsx(Button, { icon: RefreshCw, variant: "outline", onClick: handleRefresh, disabled: loading, display: "compact", "aria-label": tCrud('refresh', { defaultValue: 'Refresh' }) }), _jsx(Button, { icon: Plus, onClick: handleCreate, display: "compact", children: tCrud('addNew', { defaultValue: 'Add New' }) })] }), !hideFilters && (_jsx(EntityFilters, { entity: entity, data: rawData, fieldsToFilter: entity.listFields }))] }) }), _jsx(Section, { title: loading
|
|
165
|
+
}), value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), icon: Search, className: "dndev-w-full", disabled: isPreview }), _jsx(Button, { icon: RefreshCw, variant: "outline", onClick: handleRefresh, disabled: isPreview || loading, display: "compact", "aria-label": tCrud('refresh', { defaultValue: 'Refresh' }) }), _jsx(Button, { icon: Plus, onClick: handleCreate, display: "compact", disabled: isPreview, children: tCrud('addNew', { defaultValue: 'Add New' }) })] }), !hideFilters && (_jsx(EntityFilters, { entity: entity, data: rawData, fieldsToFilter: entity.listFields }))] }) }), _jsx(Section, { title: loading
|
|
150
166
|
? tCrud('results.title.fetching', {
|
|
151
167
|
defaultValue: 'Fetching...',
|
|
152
168
|
})
|
|
@@ -155,7 +171,7 @@ export function EntityList({ entity, basePath, onClick, hideFilters = false, pag
|
|
|
155
171
|
defaultValue: resultCount === 1
|
|
156
172
|
? 'Found 1 occurrence'
|
|
157
173
|
: `Found ${resultCount} occurrences`,
|
|
158
|
-
}), collapsible: true, defaultOpen: true, children: _jsx(DataTable, { data: filteredData, columns: columns, sortable:
|
|
174
|
+
}), collapsible: true, defaultOpen: true, tone: tone, children: _jsx(DataTable, { data: filteredData, columns: columns, sortable: !isPreview, searchable: false, pagination: true, loading: loading, onRowClick: isPreview ? undefined : (item) => handleView(item.id),
|
|
159
175
|
// Pagination labels (translated)
|
|
160
176
|
showingLabel: tCrud('pagination.showing', {
|
|
161
177
|
defaultValue: 'Showing {{from}} to {{to}} of {{total}} entries',
|
|
@@ -165,13 +181,13 @@ export function EntityList({ entity, basePath, onClick, hideFilters = false, pag
|
|
|
165
181
|
defaultValue: 'Next',
|
|
166
182
|
}), paginationItemsPerPagePlaceholder: tCrud('pagination.itemsPerPagePlaceholder', {
|
|
167
183
|
defaultValue: 'Items per page',
|
|
168
|
-
}),
|
|
184
|
+
}),
|
|
185
|
+
// Persisted page size — always controlled via CrudStore
|
|
186
|
+
pageSize: storedPageSize, onPageSizeChange: setStoredPageSize, ...(!isPreview && effectiveMode === 'server' && {
|
|
169
187
|
currentPage,
|
|
170
|
-
pageSize: serverPageSize,
|
|
171
188
|
total: listData?.total,
|
|
172
189
|
onPageChange: setCurrentPage,
|
|
173
|
-
onPageSizeChange: setServerPageSize,
|
|
174
190
|
}),
|
|
175
191
|
// Export functionality
|
|
176
|
-
exportable: exportable, exportFilename: `${entity.collection}-export`, exportLabel: tCrud('export', { defaultValue: 'Export' }) }) })] }));
|
|
192
|
+
exportable: isPreview ? false : exportable, exportFilename: `${entity.collection}-export`, exportLabel: tCrud('export', { defaultValue: 'Export' }) }) })] }));
|
|
177
193
|
}
|
|
@@ -35,9 +35,9 @@ import type { EntityRecommendationsProps } from '@donotdev/core';
|
|
|
35
35
|
* />
|
|
36
36
|
* ```
|
|
37
37
|
*
|
|
38
|
-
* @version 0.0
|
|
38
|
+
* @version 0.1.0
|
|
39
39
|
* @since 0.0.15
|
|
40
40
|
* @author AMBROISE PARK Consulting
|
|
41
41
|
*/
|
|
42
|
-
export declare function EntityRecommendations({ entity, queryOptions, title, basePath, cols, className, }: EntityRecommendationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
42
|
+
export declare function EntityRecommendations({ entity, queryOptions, title, basePath, cols, tone, className, }: EntityRecommendationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
43
43
|
//# sourceMappingURL=EntityRecommendations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,IAAmB,EACnB,SAAS,GACV,EAAE,0BAA0B,kDA8D5B"}
|
|
1
|
+
{"version":3,"file":"EntityRecommendations.d.ts","sourceRoot":"","sources":["../../../src/crud/components/EntityRecommendations.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAKjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,IAAmB,EACnB,IAAI,EACJ,SAAS,GACV,EAAE,0BAA0B,kDA8D5B"}
|
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
* @description Fetches and displays related entity cards in a grid.
|
|
7
7
|
* Caller defines "related by what" via queryOptions.
|
|
8
8
|
*
|
|
9
|
-
* @version 0.0
|
|
9
|
+
* @version 0.1.0
|
|
10
10
|
* @since 0.0.15
|
|
11
11
|
* @author AMBROISE PARK Consulting
|
|
12
12
|
*/
|
|
@@ -50,11 +50,11 @@ import { CrudCard } from './CrudCardLink';
|
|
|
50
50
|
* />
|
|
51
51
|
* ```
|
|
52
52
|
*
|
|
53
|
-
* @version 0.0
|
|
53
|
+
* @version 0.1.0
|
|
54
54
|
* @since 0.0.15
|
|
55
55
|
* @author AMBROISE PARK Consulting
|
|
56
56
|
*/
|
|
57
|
-
export function EntityRecommendations({ entity, queryOptions, title, basePath, cols = [1, 1, 3, 3], className, }) {
|
|
57
|
+
export function EntityRecommendations({ entity, queryOptions, title, basePath, cols = [1, 1, 3, 3], tone, className, }) {
|
|
58
58
|
// Safe guard: isCrudModuleAvailable is a module-level constant (immutable after load).
|
|
59
59
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
60
60
|
if (!isCrudModuleAvailable)
|
|
@@ -63,13 +63,13 @@ export function EntityRecommendations({ entity, queryOptions, title, basePath, c
|
|
|
63
63
|
const { items, loading } = useCrudCardList(entity, {
|
|
64
64
|
queryOptions,
|
|
65
65
|
});
|
|
66
|
+
// Must be called before any early return to satisfy Rules of Hooks.
|
|
67
|
+
const bp = useBreakpoint('current');
|
|
66
68
|
if (!loading && items.length === 0) {
|
|
67
69
|
return null;
|
|
68
70
|
}
|
|
69
71
|
const resolvedBasePath = basePath ?? `/${entity.collection}`;
|
|
70
72
|
const resolvedTitle = title ?? t('recommendations.title', { defaultValue: 'You may also like' });
|
|
71
|
-
// Breakpoint-aware skeleton count: 3 rows at current breakpoint
|
|
72
|
-
const bp = useBreakpoint('current');
|
|
73
73
|
const bpIndex = {
|
|
74
74
|
mobile: 0,
|
|
75
75
|
tablet: 1,
|
|
@@ -82,7 +82,7 @@ export function EntityRecommendations({ entity, queryOptions, title, basePath, c
|
|
|
82
82
|
? cols
|
|
83
83
|
: 3) ?? 1;
|
|
84
84
|
const skeletonCount = (typeof currentCols === 'number' ? currentCols : 3) * 3;
|
|
85
|
-
return (_jsx(Section, { title: resolvedTitle, gridCols: cols, className: className, children: loading
|
|
85
|
+
return (_jsx(Section, { title: resolvedTitle, gridCols: cols, tone: tone, className: className, children: loading
|
|
86
86
|
? Array.from({ length: skeletonCount }, (_, i) => (_jsx(Card, { title: _jsx(Skeleton, { width: "60%" }), subtitle: _jsx(Skeleton, { width: "40%" }), content: _jsxs(Stack, { direction: "column", gap: "tight", children: [_jsx(Skeleton, { width: "80%" }), _jsx(Skeleton, { width: "50%" })] }), elevated: true }, i)))
|
|
87
87
|
: items.map((item) => (_jsx(CrudCard, { item: item, entity: entity, detailHref: `${resolvedBasePath}/${item.id}` }, item.id))) }));
|
|
88
88
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Form Components
|
|
3
3
|
* @description Form components built on react-hook-form and Radix UI primitives. Provides form context, field management, and validation support.
|
|
4
4
|
*
|
|
5
|
-
* @version 0.0
|
|
5
|
+
* @version 0.1.0
|
|
6
6
|
* @since 0.0.1
|
|
7
7
|
* @author AMBROISE PARK Consulting
|
|
8
8
|
*/
|
|
@@ -12,7 +12,7 @@ import { Label, Slot } from '@donotdev/components';
|
|
|
12
12
|
/**
|
|
13
13
|
* Form provider component
|
|
14
14
|
*
|
|
15
|
-
* @version 0.0
|
|
15
|
+
* @version 0.1.0
|
|
16
16
|
* @since 0.0.1
|
|
17
17
|
* @author AMBROISE PARK Consulting
|
|
18
18
|
*/
|
|
@@ -24,7 +24,7 @@ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransfor
|
|
|
24
24
|
*
|
|
25
25
|
* @param {ControllerProps<TFieldValues, TName>} props - Controller props
|
|
26
26
|
* @returns {JSX.Element} Form field component
|
|
27
|
-
* @version 0.0
|
|
27
|
+
* @version 0.1.0
|
|
28
28
|
* @since 0.0.1
|
|
29
29
|
* @author AMBROISE PARK Consulting
|
|
30
30
|
*/
|
|
@@ -36,7 +36,7 @@ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName
|
|
|
36
36
|
*
|
|
37
37
|
* @param {HTMLAttributes<HTMLDivElement>} props - Component props
|
|
38
38
|
* @returns {JSX.Element} Form item component
|
|
39
|
-
* @version 0.0
|
|
39
|
+
* @version 0.1.0
|
|
40
40
|
* @since 0.0.1
|
|
41
41
|
* @author AMBROISE PARK Consulting
|
|
42
42
|
*/
|
|
@@ -47,7 +47,7 @@ declare const FormItem: ({ className, ...props }: HTMLAttributes<HTMLDivElement>
|
|
|
47
47
|
* Returns form field state and IDs for form components.
|
|
48
48
|
*
|
|
49
49
|
* @returns {Object | null} Form field context with IDs and state
|
|
50
|
-
* @version 0.0
|
|
50
|
+
* @version 0.1.0
|
|
51
51
|
* @since 0.0.1
|
|
52
52
|
* @author AMBROISE PARK Consulting
|
|
53
53
|
*/
|
|
@@ -70,7 +70,7 @@ declare const useFormField: () => {
|
|
|
70
70
|
*
|
|
71
71
|
* @param {ComponentProps<typeof Label>} props - Component props
|
|
72
72
|
* @returns {JSX.Element | null} Form label component
|
|
73
|
-
* @version 0.0
|
|
73
|
+
* @version 0.1.0
|
|
74
74
|
* @since 0.0.1
|
|
75
75
|
* @author AMBROISE PARK Consulting
|
|
76
76
|
*/
|
|
@@ -82,7 +82,7 @@ declare const FormLabel: ({ className, ...props }: ComponentProps<typeof Label>)
|
|
|
82
82
|
*
|
|
83
83
|
* @param {ComponentProps<typeof Slot>} props - Component props
|
|
84
84
|
* @returns {JSX.Element | null} Form control component
|
|
85
|
-
* @version 0.0
|
|
85
|
+
* @version 0.1.0
|
|
86
86
|
* @since 0.0.1
|
|
87
87
|
* @author AMBROISE PARK Consulting
|
|
88
88
|
*/
|
|
@@ -94,7 +94,7 @@ declare const FormControl: ({ ...props }: ComponentProps<typeof Slot>) => import
|
|
|
94
94
|
*
|
|
95
95
|
* @param {HTMLAttributes<HTMLParagraphElement>} props - Component props
|
|
96
96
|
* @returns {JSX.Element | null} Form description component
|
|
97
|
-
* @version 0.0
|
|
97
|
+
* @version 0.1.0
|
|
98
98
|
* @since 0.0.1
|
|
99
99
|
* @author AMBROISE PARK Consulting
|
|
100
100
|
*/
|
|
@@ -106,7 +106,7 @@ declare const FormDescription: ({ className, ...props }: HTMLAttributes<HTMLPara
|
|
|
106
106
|
*
|
|
107
107
|
* @param {HTMLAttributes<HTMLParagraphElement>} props - Component props
|
|
108
108
|
* @returns {JSX.Element | null} Form message component
|
|
109
|
-
* @version 0.0
|
|
109
|
+
* @version 0.1.0
|
|
110
110
|
* @since 0.0.1
|
|
111
111
|
* @author AMBROISE PARK Consulting
|
|
112
112
|
*/
|
|
@@ -114,7 +114,7 @@ declare const FormMessage: ({ className, children, ...props }: HTMLAttributes<HT
|
|
|
114
114
|
/**
|
|
115
115
|
* Form component exports
|
|
116
116
|
*
|
|
117
|
-
* @version 0.0
|
|
117
|
+
* @version 0.1.0
|
|
118
118
|
* @since 0.0.1
|
|
119
119
|
* @author AMBROISE PARK Consulting
|
|
120
120
|
*/
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
4
4
|
* @fileoverview Form Components
|
|
5
5
|
* @description Form components built on react-hook-form and Radix UI primitives. Provides form context, field management, and validation support.
|
|
6
6
|
*
|
|
7
|
-
* @version 0.0
|
|
7
|
+
* @version 0.1.0
|
|
8
8
|
* @since 0.0.1
|
|
9
9
|
* @author AMBROISE PARK Consulting
|
|
10
10
|
*/
|
|
@@ -14,7 +14,7 @@ import { Label, Slot, cn, Stack } from '@donotdev/components';
|
|
|
14
14
|
/**
|
|
15
15
|
* Form provider component
|
|
16
16
|
*
|
|
17
|
-
* @version 0.0
|
|
17
|
+
* @version 0.1.0
|
|
18
18
|
* @since 0.0.1
|
|
19
19
|
* @author AMBROISE PARK Consulting
|
|
20
20
|
*/
|
|
@@ -23,7 +23,7 @@ const Form = FormProvider;
|
|
|
23
23
|
* Form field context for sharing field name
|
|
24
24
|
*
|
|
25
25
|
* @type {React.Context<FormFieldContextValue>}
|
|
26
|
-
* @version 0.0
|
|
26
|
+
* @version 0.1.0
|
|
27
27
|
* @since 0.0.1
|
|
28
28
|
* @author AMBROISE PARK Consulting
|
|
29
29
|
*/
|
|
@@ -35,7 +35,7 @@ const FormFieldContext = createContext({});
|
|
|
35
35
|
*
|
|
36
36
|
* @param {ControllerProps<TFieldValues, TName>} props - Controller props
|
|
37
37
|
* @returns {JSX.Element} Form field component
|
|
38
|
-
* @version 0.0
|
|
38
|
+
* @version 0.1.0
|
|
39
39
|
* @since 0.0.1
|
|
40
40
|
* @author AMBROISE PARK Consulting
|
|
41
41
|
*/
|
|
@@ -46,7 +46,7 @@ const FormField = ({ ...props }) => {
|
|
|
46
46
|
* Form item context for sharing item ID
|
|
47
47
|
*
|
|
48
48
|
* @type {React.Context<{ id: string }>}
|
|
49
|
-
* @version 0.0
|
|
49
|
+
* @version 0.1.0
|
|
50
50
|
* @since 0.0.1
|
|
51
51
|
* @author AMBROISE PARK Consulting
|
|
52
52
|
*/
|
|
@@ -58,7 +58,7 @@ const FormItemContext = createContext({});
|
|
|
58
58
|
*
|
|
59
59
|
* @param {HTMLAttributes<HTMLDivElement>} props - Component props
|
|
60
60
|
* @returns {JSX.Element} Form item component
|
|
61
|
-
* @version 0.0
|
|
61
|
+
* @version 0.1.0
|
|
62
62
|
* @since 0.0.1
|
|
63
63
|
* @author AMBROISE PARK Consulting
|
|
64
64
|
*/
|
|
@@ -72,7 +72,7 @@ const FormItem = ({ className, ...props }) => {
|
|
|
72
72
|
* Returns form field state and IDs for form components.
|
|
73
73
|
*
|
|
74
74
|
* @returns {Object | null} Form field context with IDs and state
|
|
75
|
-
* @version 0.0
|
|
75
|
+
* @version 0.1.0
|
|
76
76
|
* @since 0.0.1
|
|
77
77
|
* @author AMBROISE PARK Consulting
|
|
78
78
|
*/
|
|
@@ -110,7 +110,7 @@ const useFormField = () => {
|
|
|
110
110
|
*
|
|
111
111
|
* @param {ComponentProps<typeof Label>} props - Component props
|
|
112
112
|
* @returns {JSX.Element | null} Form label component
|
|
113
|
-
* @version 0.0
|
|
113
|
+
* @version 0.1.0
|
|
114
114
|
* @since 0.0.1
|
|
115
115
|
* @author AMBROISE PARK Consulting
|
|
116
116
|
*/
|
|
@@ -128,7 +128,7 @@ const FormLabel = ({ className, ...props }) => {
|
|
|
128
128
|
*
|
|
129
129
|
* @param {ComponentProps<typeof Slot>} props - Component props
|
|
130
130
|
* @returns {JSX.Element | null} Form control component
|
|
131
|
-
* @version 0.0
|
|
131
|
+
* @version 0.1.0
|
|
132
132
|
* @since 0.0.1
|
|
133
133
|
* @author AMBROISE PARK Consulting
|
|
134
134
|
*/
|
|
@@ -148,7 +148,7 @@ const FormControl = ({ ...props }) => {
|
|
|
148
148
|
*
|
|
149
149
|
* @param {HTMLAttributes<HTMLParagraphElement>} props - Component props
|
|
150
150
|
* @returns {JSX.Element | null} Form description component
|
|
151
|
-
* @version 0.0
|
|
151
|
+
* @version 0.1.0
|
|
152
152
|
* @since 0.0.1
|
|
153
153
|
* @author AMBROISE PARK Consulting
|
|
154
154
|
*/
|
|
@@ -169,7 +169,7 @@ const FormDescription = ({ className, ...props }) => {
|
|
|
169
169
|
*
|
|
170
170
|
* @param {HTMLAttributes<HTMLParagraphElement>} props - Component props
|
|
171
171
|
* @returns {JSX.Element | null} Form message component
|
|
172
|
-
* @version 0.0
|
|
172
|
+
* @version 0.1.0
|
|
173
173
|
* @since 0.0.1
|
|
174
174
|
* @author AMBROISE PARK Consulting
|
|
175
175
|
*/
|
|
@@ -191,7 +191,7 @@ const FormMessage = ({ className, children, ...props }) => {
|
|
|
191
191
|
/**
|
|
192
192
|
* Form component exports
|
|
193
193
|
*
|
|
194
|
-
* @version 0.0
|
|
194
|
+
* @version 0.1.0
|
|
195
195
|
* @since 0.0.1
|
|
196
196
|
* @author AMBROISE PARK Consulting
|
|
197
197
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Type-only imports (`import type`) can still go directly to '@donotdev/crud'.
|
|
9
9
|
*
|
|
10
10
|
* @see useCrudSafe.ts — same pattern, proven in production
|
|
11
|
-
* @version 0.0
|
|
11
|
+
* @version 0.1.0
|
|
12
12
|
* @since 0.0.25
|
|
13
13
|
* @author AMBROISE PARK Consulting
|
|
14
14
|
*/
|
|
@@ -24,6 +24,7 @@ export declare const useCrudList: typeof crudModule.useCrudList;
|
|
|
24
24
|
export declare const useCrudCardList: typeof crudModule.useCrudCardList;
|
|
25
25
|
export declare const useEntityFavorites: typeof crudModule.useEntityFavorites;
|
|
26
26
|
export declare const useCrudFilters: typeof crudModule.useCrudFilters;
|
|
27
|
+
export declare const useCrudPageSize: typeof crudModule.useCrudPageSize;
|
|
27
28
|
export declare const useEntityWorkflow: typeof crudModule.useEntityWorkflow;
|
|
28
29
|
export declare const useReferenceResolver: typeof crudModule.useReferenceResolver;
|
|
29
30
|
export declare const DisplayFieldRenderer: typeof crudModule.DisplayFieldRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crudImports.d.ts","sourceRoot":"","sources":["../../src/crud/crudImports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"crudImports.d.ts","sourceRoot":"","sources":["../../src/crud/crudImports.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,SAA4C,CAAC;AAG/E,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,wBAAwB,4CAAuC,CAAC;AAC7E,eAAO,MAAM,YAAY,iKAA2B,CAAC;AACrD,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,OAAO,2BAAsB,CAAC;AAC3C,eAAO,MAAM,WAAW,+BAA0B,CAAC;AACnD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,kBAAkB,sCAAiC,CAAC;AACjE,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,eAAe,mCAA8B,CAAC;AAC3D,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AAGrE,eAAO,MAAM,oBAAoB,wCAAmC,CAAC;AACrE,eAAO,MAAM,iBAAiB,qCAAgC,CAAC;AAC/D,eAAO,MAAM,cAAc,kCAA6B,CAAC;AACzD,eAAO,MAAM,aAAa,iCAA4B,CAAC;AACvD,eAAO,MAAM,QAAQ,4BAAuB,CAAC;AAG7C,eAAO,MAAM,mBAAmB,uCAAkC,CAAC;AACnE,eAAO,MAAM,WAAW,+BAA0B,CAAC"}
|
package/dist/crud/crudImports.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Type-only imports (`import type`) can still go directly to '@donotdev/crud'.
|
|
10
10
|
*
|
|
11
11
|
* @see useCrudSafe.ts — same pattern, proven in production
|
|
12
|
-
* @version 0.0
|
|
12
|
+
* @version 0.1.0
|
|
13
13
|
* @since 0.0.25
|
|
14
14
|
* @author AMBROISE PARK Consulting
|
|
15
15
|
*/
|
|
@@ -26,6 +26,7 @@ export const useCrudList = crudModule?.useCrudList;
|
|
|
26
26
|
export const useCrudCardList = crudModule?.useCrudCardList;
|
|
27
27
|
export const useEntityFavorites = crudModule?.useEntityFavorites;
|
|
28
28
|
export const useCrudFilters = crudModule?.useCrudFilters;
|
|
29
|
+
export const useCrudPageSize = crudModule?.useCrudPageSize;
|
|
29
30
|
export const useEntityWorkflow = crudModule?.useEntityWorkflow;
|
|
30
31
|
export const useReferenceResolver = crudModule?.useReferenceResolver;
|
|
31
32
|
// --- Components ---
|
package/dist/crud/index.d.ts
CHANGED
package/dist/crud/index.js
CHANGED
package/dist/data/techLogos.d.ts
CHANGED
package/dist/data/techLogos.js
CHANGED