@donotdev/ui 0.2.1 → 0.2.2
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/common/TechBento.d.ts +2 -6
- package/dist/components/common/TechBento.d.ts.map +1 -1
- package/dist/components/common/TechBento.js +14 -16
- 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 +13 -57
- package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityFormRenderer.js +2 -2
- package/dist/crud/crudImports.d.ts +1 -0
- package/dist/crud/crudImports.d.ts.map +1 -1
- package/dist/crud/crudImports.js +1 -0
- package/dist/index.js +4 -4
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +6 -22
- package/dist/internal/layout/components/footer/FooterLegalLinks.js +2 -2
- package/dist/internal/layout/components/footer/useLegalLinks.d.ts +0 -2
- package/dist/internal/layout/components/footer/useLegalLinks.d.ts.map +1 -1
- package/dist/internal/layout/components/footer/useLegalLinks.js +0 -2
- package/dist/internal/layout/components/i18nSeoMeta.d.ts +54 -0
- package/dist/internal/layout/components/i18nSeoMeta.d.ts.map +1 -0
- package/dist/internal/layout/components/i18nSeoMeta.js +52 -0
- package/dist/internal/layout/components/index.d.ts +1 -1
- package/dist/internal/layout/components/index.js +1 -1
- package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
- package/dist/providers/NextJsAppProviders.js +0 -1
- package/dist/routing/AuthGuard.d.ts +0 -4
- package/dist/routing/AuthGuard.d.ts.map +1 -1
- package/dist/routing/AuthGuard.js +0 -4
- package/dist/symbol-index.json +1 -1
- package/guidelines/SEO.md +12 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoMetaTags.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/AutoMetaTags.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoMetaTags.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/AutoMetaTags.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AA4M3C;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,EAAE,aA6S1B,CAAC;AAEF;;;GAGG;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -27,6 +27,7 @@ import { AssetResolver } from '@donotdev/ui';
|
|
|
27
27
|
// Platform-specific hooks via conditional exports
|
|
28
28
|
import { useLocation } from '@donotdev/ui/routing/hooks';
|
|
29
29
|
import { HeadTags } from './HeadTags';
|
|
30
|
+
import { readI18nSeoMeta, resolveSeoField } from './i18nSeoMeta';
|
|
30
31
|
/**
|
|
31
32
|
* Match pathname against route path pattern (e.g. /cars/:id or /blog/:slug/comments/:id).
|
|
32
33
|
* Supports arbitrary nesting: any depth, any mix of static and :param segments.
|
|
@@ -48,22 +49,6 @@ function matchRoutePath(pattern, pathname) {
|
|
|
48
49
|
}
|
|
49
50
|
return true;
|
|
50
51
|
}
|
|
51
|
-
/**
|
|
52
|
-
* Resolve SEO field with i18n fallback
|
|
53
|
-
* @description
|
|
54
|
-
* - `undefined` → i18n lookup
|
|
55
|
-
* - `string` → use literal value
|
|
56
|
-
* - `null` → omit (return undefined)
|
|
57
|
-
*/
|
|
58
|
-
function resolveSeoField(seoValue, translationKey, t) {
|
|
59
|
-
if (seoValue === null)
|
|
60
|
-
return undefined; // Explicit null = omit
|
|
61
|
-
if (seoValue !== undefined)
|
|
62
|
-
return seoValue; // Explicit string = use it
|
|
63
|
-
// undefined = i18n lookup
|
|
64
|
-
const translated = t(translationKey);
|
|
65
|
-
return translated !== translationKey ? translated : undefined;
|
|
66
|
-
}
|
|
67
52
|
/**
|
|
68
53
|
* Get route metadata from window object (injected by build system).
|
|
69
54
|
* Resolves dynamic routes by pattern (e.g. /cars/:id) so PageMeta (including namespace) is used for SEO.
|
|
@@ -231,13 +216,13 @@ export const AutoMetaTags = () => {
|
|
|
231
216
|
const metaData = useMemo(() => {
|
|
232
217
|
if (!seoConfig)
|
|
233
218
|
return null;
|
|
234
|
-
const { defaultNamespace = 'home', defaultImage } = seoConfig;
|
|
219
|
+
const { defaultNamespace = 'home', defaultImage = '/og-image.png' } = seoConfig;
|
|
235
220
|
// Construct absolute URL for canonical link
|
|
236
221
|
const currentUrl = `${baseUrl}${location.pathname}`;
|
|
237
222
|
const ns = routeMeta.namespace || defaultNamespace;
|
|
238
223
|
const seo = routeMeta.seo;
|
|
239
|
-
// Get the meta
|
|
240
|
-
const metaObject = t
|
|
224
|
+
// Get the meta fields from i18n (image, type, keywords, author, fullTitle)
|
|
225
|
+
const metaObject = readI18nSeoMeta(t, ns);
|
|
241
226
|
// Title resolution priority:
|
|
242
227
|
// 1. i18n meta.fullTitle → translated, language-aware (wins)
|
|
243
228
|
// 2. seo.fullTitle (static PageMeta) → fallback for non-i18n apps
|
|
@@ -269,9 +254,8 @@ export const AutoMetaTags = () => {
|
|
|
269
254
|
const type = pageType || 'website';
|
|
270
255
|
const keywords = pageKeywords || undefined;
|
|
271
256
|
const author = pageAuthor || undefined;
|
|
272
|
-
//
|
|
273
|
-
|
|
274
|
-
const imagePath = image && image.startsWith('http') ? image : image ? image : undefined;
|
|
257
|
+
// Link-preview crawlers need an absolute URL
|
|
258
|
+
const imagePath = image && !image.startsWith('http') ? `${baseUrl}${image}` : image;
|
|
275
259
|
return {
|
|
276
260
|
title: fullTitle,
|
|
277
261
|
description,
|
|
@@ -11,7 +11,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
11
11
|
import { Stack } from '@donotdev/components';
|
|
12
12
|
import { useTranslation, maybeTranslate, useAppConfig } from '@donotdev/core';
|
|
13
13
|
import { FooterBranding } from './FooterBranding';
|
|
14
|
-
import {
|
|
14
|
+
import { getLegalLinks } from './useLegalLinks';
|
|
15
15
|
import { Link } from '../../../../routing/Link';
|
|
16
16
|
/**
|
|
17
17
|
* FooterLegalLinks - Legal links component
|
|
@@ -28,7 +28,7 @@ export const FooterLegalLinks = ({ app, direction = 'column', gap = 'tight', ali
|
|
|
28
28
|
const { t } = useTranslation('dndev');
|
|
29
29
|
const appConfig = useAppConfig('app');
|
|
30
30
|
const resolvedApp = app || appConfig || {};
|
|
31
|
-
const links =
|
|
31
|
+
const links = getLegalLinks(resolvedApp.footer);
|
|
32
32
|
const linkStyle = {
|
|
33
33
|
transition: 'color var(--dur-fast) ease-out',
|
|
34
34
|
textDecoration: 'underline',
|
|
@@ -10,6 +10,4 @@ export interface FooterLegalLink {
|
|
|
10
10
|
* @remarks Not a hook — no React state or effects. Named with `get` prefix.
|
|
11
11
|
*/
|
|
12
12
|
export declare const getLegalLinks: (footerConfig: AppMetadata["footer"]) => FooterLegalLink[];
|
|
13
|
-
/** @deprecated Use getLegalLinks instead */
|
|
14
|
-
export declare const useLegalLinks: (footerConfig: AppMetadata["footer"]) => FooterLegalLink[];
|
|
15
13
|
//# sourceMappingURL=useLegalLinks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLegalLinks.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/useLegalLinks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAQD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,cAAc,WAAW,CAAC,QAAQ,CAAC,KAClC,eAAe,EAQjB,CAAC
|
|
1
|
+
{"version":3,"file":"useLegalLinks.d.ts","sourceRoot":"","sources":["../../../../../src/internal/layout/components/footer/useLegalLinks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAQD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,cAAc,WAAW,CAAC,QAAQ,CAAC,KAClC,eAAe,EAQjB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview SEO fields from a namespace's `meta` translations
|
|
3
|
+
* @description Reads `<ns>:meta.*` key by key, as the i18n convention requires:
|
|
4
|
+
* `useTranslation` returns strings only, never objects or arrays.
|
|
5
|
+
*
|
|
6
|
+
* @version 0.2.2
|
|
7
|
+
* @since 0.2.2
|
|
8
|
+
* @author AMBROISE PARK Consulting
|
|
9
|
+
*/
|
|
10
|
+
import type { TFunction } from 'i18next';
|
|
11
|
+
/**
|
|
12
|
+
* Resolves a title or description: explicit value, else its translation.
|
|
13
|
+
*
|
|
14
|
+
* @param seoValue - `null` omits the field, a string is used as is, `undefined` looks up the translation
|
|
15
|
+
* @param translationKey - Namespaced key, e.g. `home:description`
|
|
16
|
+
* @param t - Translation function loaded with the key's namespace
|
|
17
|
+
* @returns The resolved text, or undefined when omitted or not translated
|
|
18
|
+
*
|
|
19
|
+
* @version 0.2.2
|
|
20
|
+
* @since 0.2.2
|
|
21
|
+
* @author AMBROISE PARK Consulting
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveSeoField(seoValue: string | null | undefined, translationKey: string, t: TFunction): string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* SEO fields a namespace can define under `meta`.
|
|
26
|
+
*
|
|
27
|
+
* @version 0.2.2
|
|
28
|
+
* @since 0.2.2
|
|
29
|
+
* @author AMBROISE PARK Consulting
|
|
30
|
+
*/
|
|
31
|
+
export interface I18nSeoMeta {
|
|
32
|
+
fullTitle?: string;
|
|
33
|
+
image?: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
keywords?: string[];
|
|
36
|
+
author?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Reads the SEO fields of a namespace from its translations.
|
|
40
|
+
*
|
|
41
|
+
* @param t - Translation function loaded with `ns`
|
|
42
|
+
* @param ns - Namespace holding the `meta` object
|
|
43
|
+
* @returns The defined fields; a missing or empty field is undefined
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* // JSON: { "meta": { "image": "/og.png", "keywords": ["a", "b"] } }
|
|
47
|
+
* readI18nSeoMeta(t, 'home'); // { image: '/og.png', keywords: ['a', 'b'] }
|
|
48
|
+
*
|
|
49
|
+
* @version 0.2.2
|
|
50
|
+
* @since 0.2.2
|
|
51
|
+
* @author AMBROISE PARK Consulting
|
|
52
|
+
*/
|
|
53
|
+
export declare function readI18nSeoMeta(t: TFunction, ns: string): I18nSeoMeta;
|
|
54
|
+
//# sourceMappingURL=i18nSeoMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18nSeoMeta.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/i18nSeoMeta.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAUzC;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,cAAc,EAAE,MAAM,EACtB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,SAAS,CAIpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,WAAW,CAkBrE"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
// packages/ui/src/internal/layout/components/i18nSeoMeta.ts
|
|
2
|
+
import { translateArray } from '@donotdev/core';
|
|
3
|
+
/** Upper bound for translateArray: keywords past it are not emitted. */
|
|
4
|
+
const MAX_KEYWORDS = 20;
|
|
5
|
+
/** An empty default is how a missing key is detected: on a namespaced key, i18next returns the key without its namespace. */
|
|
6
|
+
const EMPTY_WHEN_MISSING = { defaultValue: '' };
|
|
7
|
+
/**
|
|
8
|
+
* Resolves a title or description: explicit value, else its translation.
|
|
9
|
+
*
|
|
10
|
+
* @param seoValue - `null` omits the field, a string is used as is, `undefined` looks up the translation
|
|
11
|
+
* @param translationKey - Namespaced key, e.g. `home:description`
|
|
12
|
+
* @param t - Translation function loaded with the key's namespace
|
|
13
|
+
* @returns The resolved text, or undefined when omitted or not translated
|
|
14
|
+
*
|
|
15
|
+
* @version 0.2.2
|
|
16
|
+
* @since 0.2.2
|
|
17
|
+
* @author AMBROISE PARK Consulting
|
|
18
|
+
*/
|
|
19
|
+
export function resolveSeoField(seoValue, translationKey, t) {
|
|
20
|
+
if (seoValue === null)
|
|
21
|
+
return undefined;
|
|
22
|
+
if (seoValue !== undefined)
|
|
23
|
+
return seoValue;
|
|
24
|
+
return t(translationKey, EMPTY_WHEN_MISSING) || undefined;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Reads the SEO fields of a namespace from its translations.
|
|
28
|
+
*
|
|
29
|
+
* @param t - Translation function loaded with `ns`
|
|
30
|
+
* @param ns - Namespace holding the `meta` object
|
|
31
|
+
* @returns The defined fields; a missing or empty field is undefined
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // JSON: { "meta": { "image": "/og.png", "keywords": ["a", "b"] } }
|
|
35
|
+
* readI18nSeoMeta(t, 'home'); // { image: '/og.png', keywords: ['a', 'b'] }
|
|
36
|
+
*
|
|
37
|
+
* @version 0.2.2
|
|
38
|
+
* @since 0.2.2
|
|
39
|
+
* @author AMBROISE PARK Consulting
|
|
40
|
+
*/
|
|
41
|
+
export function readI18nSeoMeta(t, ns) {
|
|
42
|
+
const translateOrEmpty = ((key) => t(key, EMPTY_WHEN_MISSING));
|
|
43
|
+
const field = (name) => translateOrEmpty(`${ns}:meta.${name}`) || undefined;
|
|
44
|
+
const keywords = translateArray(translateOrEmpty, `${ns}:meta.keywords`, MAX_KEYWORDS);
|
|
45
|
+
return {
|
|
46
|
+
fullTitle: field('fullTitle'),
|
|
47
|
+
image: field('image'),
|
|
48
|
+
type: field('type'),
|
|
49
|
+
keywords: keywords.length > 0 ? keywords : undefined,
|
|
50
|
+
author: field('author'),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
export { FooterCopyright } from './footer/FooterCopyright';
|
|
10
10
|
export { FooterLegalLinks } from './footer/FooterLegalLinks';
|
|
11
11
|
export { FooterBranding } from './footer/FooterBranding';
|
|
12
|
-
export {
|
|
12
|
+
export { getLegalLinks } from './footer/useLegalLinks';
|
|
13
13
|
export type { FooterLegalLink } from './footer/useLegalLinks';
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -10,4 +10,4 @@
|
|
|
10
10
|
export { FooterCopyright } from './footer/FooterCopyright';
|
|
11
11
|
export { FooterLegalLinks } from './footer/FooterLegalLinks';
|
|
12
12
|
export { FooterBranding } from './footer/FooterBranding';
|
|
13
|
-
export {
|
|
13
|
+
export { getLegalLinks } from './footer/useLegalLinks';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextJsAppProviders.d.ts","sourceRoot":"","sources":["../../src/providers/NextJsAppProviders.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"NextJsAppProviders.d.ts","sourceRoot":"","sources":["../../src/providers/NextJsAppProviders.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAuDxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAQD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,+BAuFhE"}
|
|
@@ -16,7 +16,6 @@ import { useConsent } from '@donotdev/core';
|
|
|
16
16
|
import { NextJsStoresInitializer } from '../internal/initializers/NextJsStoresInitializer';
|
|
17
17
|
import FaviconHead from '../internal/layout/components/FaviconHead';
|
|
18
18
|
import PerformanceHints from '../internal/layout/components/PerformanceHints';
|
|
19
|
-
// import NextJsAutoMetaTags from '../internal/layout/components/NextJsAutoMetaTags'; // Deprecated - metadata now server-side
|
|
20
19
|
import { DnDevLayout } from '../internal/layout/DnDevLayout';
|
|
21
20
|
import { SentryInitializer } from '../internal/providers/SentryInitializer';
|
|
22
21
|
import { UIProviders } from '../internal/providers/UIProviders';
|
|
@@ -33,10 +33,6 @@ export declare function AuthGuard({ auth, children, fallback: Fallback, }: AuthG
|
|
|
33
33
|
* @author AMBROISE PARK Consulting
|
|
34
34
|
*/
|
|
35
35
|
export declare function useCanNavigate(auth: PageAuth | false): boolean;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use useCanNavigate instead
|
|
38
|
-
*/
|
|
39
|
-
export declare const useCanAccess: typeof useCanNavigate;
|
|
40
36
|
/**
|
|
41
37
|
* Hook to get current user's role - directly from store
|
|
42
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../src/routing/AuthGuard.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,UAAU,EACV,kBAAkB,EAGnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C;;GAEG;AACH,UAAU,cAAc;IACtB,wCAAwC;IACxC,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAC;IACvB,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAQ,EACR,QAAQ,EAAE,QAAoC,GAC/C,EAAE,cAAc,+BA0ChB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAG9D;AAED
|
|
1
|
+
{"version":3,"file":"AuthGuard.d.ts","sourceRoot":"","sources":["../../src/routing/AuthGuard.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,UAAU,EACV,kBAAkB,EAGnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C;;GAEG;AACH,UAAU,cAAc;IACtB,wCAAwC;IACxC,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAC;IACvB,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAQ,EACR,QAAQ,EAAE,QAAoC,GAC/C,EAAE,cAAc,+BA0ChB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAG9D;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,IACvB,OAAO,UAAU,CAAC,KAAK,GACvB,OAAO,UAAU,CAAC,IAAI,GACtB,OAAO,UAAU,CAAC,KAAK,CAS1B;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,IAAI,EACA,OAAO,UAAU,CAAC,KAAK,GACvB,OAAO,UAAU,CAAC,IAAI,GACtB,OAAO,UAAU,CAAC,KAAK,GAC1B,OAAO,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY;;;;;;EAW3B;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,EACvC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC3B,IAAI,EAAE,QAAQ,GAAG,KAAK,WAEW,CAAC,iCAOnC;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;IAC3B,iCAAiC;kBACrB,KAAK;IAEjB,oCAAoC;oBACtB,QAAQ;IAEtB,yCAAyC;gBAC/B,QAAQ;IAKlB,uDAAuD;iBAC5C,QAAQ;IAKnB,gCAAgC;iBAExB,CAAC,OAAO,kBAAkB,EAAE,MAAM,OAAO,kBAAkB,CAAC,KACjE,QAAQ;IAKX,eAAe;eACN,QAAQ;IAKjB,mBAAmB;mBACN,QAAQ;IAKrB,sCAAsC;oBACxB,QAAQ;IAMtB,wBAAwB;uBACL,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,KAAG,QAAQ;CAItE,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -72,10 +72,6 @@ export function useCanNavigate(auth) {
|
|
|
72
72
|
const can = useAuthSafe('can');
|
|
73
73
|
return can?.navigate(auth) ?? false;
|
|
74
74
|
}
|
|
75
|
-
/**
|
|
76
|
-
* @deprecated Use useCanNavigate instead
|
|
77
|
-
*/
|
|
78
|
-
export const useCanAccess = useCanNavigate;
|
|
79
75
|
/**
|
|
80
76
|
* Hook to get current user's role - directly from store
|
|
81
77
|
*
|