@c-rex/components 0.1.37 → 0.1.39
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/README.md +73 -73
- package/package.json +250 -235
- package/src/article/article-action-bar.tsx +110 -110
- package/src/article/article-content.tsx +18 -46
- package/src/autocomplete.tsx +201 -201
- package/src/breadcrumb.tsx +124 -124
- package/src/carousel/carousel.tsx +353 -352
- package/src/check-article-lang.tsx +47 -43
- package/src/directoryNodes/directory-tree-context.tsx +388 -0
- package/src/directoryNodes/tree-of-content.tsx +68 -67
- package/src/documents/result-list.tsx +124 -127
- package/src/favorites/bookmark-button.tsx +97 -79
- package/src/favorites/favorite-button.tsx +137 -74
- package/src/footer/footer-shell.tsx +52 -0
- package/src/footer/footer.tsx +7 -0
- package/src/footer/legal-links-block.tsx +25 -0
- package/src/footer/organization-contact-block.tsx +94 -0
- package/src/footer/social-links-block.tsx +38 -0
- package/src/footer/types.ts +10 -0
- package/src/footer/vcard-footer.tsx +72 -0
- package/src/generated/client-components.tsx +1366 -1350
- package/src/generated/create-client-request.tsx +116 -113
- package/src/generated/create-server-request.tsx +70 -61
- package/src/generated/create-suggestions-request.tsx +55 -55
- package/src/generated/server-components.tsx +1056 -1056
- package/src/generated/suggestions.tsx +302 -299
- package/src/icons/file-icon.tsx +8 -8
- package/src/icons/flag-icon.tsx +15 -15
- package/src/icons/loading.tsx +11 -11
- package/src/icons/social-icon.tsx +24 -0
- package/src/info/info-card.tsx +43 -0
- package/src/info/{info-table.tsx → information-unit-metadata-grid.tsx} +157 -146
- package/src/info/shared.tsx +49 -25
- package/src/navbar/language-switcher/content-language-switch.tsx +92 -92
- package/src/navbar/language-switcher/shared.tsx +33 -33
- package/src/navbar/language-switcher/ui-language-switch.tsx +37 -38
- package/src/navbar/navbar.tsx +157 -148
- package/src/navbar/settings.tsx +62 -62
- package/src/navbar/sign-in-out-btns.tsx +35 -35
- package/src/navbar/user-menu.tsx +60 -60
- package/src/page-wrapper.tsx +54 -31
- package/src/render-article.module.css +155 -0
- package/src/render-article.tsx +75 -68
- package/src/renditions/file-download.tsx +83 -83
- package/src/renditions/html.tsx +64 -64
- package/src/renditions/image/container.tsx +54 -54
- package/src/renditions/image/rendition.tsx +55 -55
- package/src/restriction-menu/restriction-menu-container.tsx +117 -53
- package/src/restriction-menu/restriction-menu-item.tsx +155 -147
- package/src/restriction-menu/restriction-menu.tsx +341 -157
- package/src/results/dialog-filter.tsx +166 -166
- package/src/results/empty.tsx +15 -15
- package/src/results/filter-navbar.tsx +294 -261
- package/src/results/filter-sidebar/__tests__/utils.test.ts +129 -0
- package/src/results/filter-sidebar/index.tsx +270 -126
- package/src/results/filter-sidebar/utils.ts +196 -164
- package/src/results/generic/table-result-list.tsx +97 -99
- package/src/results/{table-with-images.tsx → information-unit-search-results-card-list.tsx} +125 -127
- package/src/results/{cards.tsx → information-unit-search-results-cards.tsx} +99 -99
- package/src/results/{table.tsx → information-unit-search-results-table.tsx} +104 -104
- package/src/results/pagination.tsx +81 -81
- package/src/results/summary.ts +30 -0
- package/src/results/utils.ts +54 -47
- package/src/search-input.tsx +70 -70
- package/src/share-button.tsx +49 -49
- package/src/stores/favorites-store.ts +88 -88
- package/src/stores/highlight-store.ts +15 -15
- package/src/stores/language-store.ts +14 -43
- package/src/stores/restriction-store.ts +11 -11
- package/src/stores/search-settings-store.ts +68 -64
- package/src/article/article-action-bar.analysis.md +0 -15
- package/src/article/article-action-bar.stories.tsx +0 -15
- package/src/article/article-content.analysis.md +0 -15
- package/src/article/article-content.stories.tsx +0 -21
- package/src/autocomplete.analysis.md +0 -17
- package/src/breadcrumb.analysis.md +0 -15
- package/src/carousel/carousel.analysis.md +0 -17
- package/src/check-article-lang.analysis.md +0 -15
- package/src/directoryNodes/tree-of-content.analysis.md +0 -14
- package/src/directoryNodes/tree-of-content.stories.tsx +0 -22
- package/src/documents/result-list.analysis.md +0 -14
- package/src/documents/result-list.stories.tsx +0 -19
- package/src/favorites/bookmark-button.analysis.md +0 -17
- package/src/favorites/bookmark-button.stories.tsx +0 -19
- package/src/favorites/favorite-button.analysis.md +0 -18
- package/src/favorites/favorite-button.stories.tsx +0 -22
- package/src/icons/file-icon.analysis.md +0 -14
- package/src/icons/file-icon.stories.tsx +0 -19
- package/src/icons/flag-icon.analysis.md +0 -14
- package/src/icons/flag-icon.stories.tsx +0 -25
- package/src/icons/loading.analysis.md +0 -14
- package/src/icons/loading.stories.tsx +0 -21
- package/src/info/info-table.analysis.md +0 -15
- package/src/info/shared.analysis.md +0 -14
- package/src/info/stories/info-table.stories.tsx +0 -31
- package/src/info/stories/shared.stories.tsx +0 -24
- package/src/navbar/language-switcher/content-language-switch.analysis.md +0 -15
- package/src/navbar/language-switcher/shared.analysis.md +0 -14
- package/src/navbar/language-switcher/ui-language-switch.analysis.md +0 -15
- package/src/navbar/navbar.analysis.md +0 -14
- package/src/navbar/settings.analysis.md +0 -14
- package/src/navbar/sign-in-out-btns.analysis.md +0 -14
- package/src/navbar/stories/navbar.stories.tsx +0 -31
- package/src/navbar/stories/settings.stories.tsx +0 -15
- package/src/navbar/stories/sign-in-out-btns.stories.tsx +0 -15
- package/src/navbar/stories/user-menu.stories.tsx +0 -20
- package/src/navbar/user-menu.analysis.md +0 -14
- package/src/page-wrapper.analysis.md +0 -14
- package/src/render-article.analysis.md +0 -15
- package/src/renditions/file-download.analysis.md +0 -14
- package/src/renditions/file-download.stories.tsx +0 -19
- package/src/renditions/html.analysis.md +0 -17
- package/src/renditions/html.stories.tsx +0 -19
- package/src/renditions/image/container.analysis.md +0 -15
- package/src/renditions/image/container.stories.tsx +0 -19
- package/src/renditions/image/rendition.analysis.md +0 -14
- package/src/renditions/image/rendition.stories.tsx +0 -19
- package/src/restriction-menu/restriction-menu-container.analysis.md +0 -14
- package/src/restriction-menu/restriction-menu-item.analysis.md +0 -14
- package/src/restriction-menu/restriction-menu.analysis.md +0 -17
- package/src/results/analysis/cards.analysis.md +0 -14
- package/src/results/analysis/dialog-filter.analysis.md +0 -17
- package/src/results/analysis/empty.analysis.md +0 -14
- package/src/results/analysis/filter-navbar.analysis.md +0 -16
- package/src/results/analysis/pagination.analysis.md +0 -14
- package/src/results/analysis/table-with-images.analysis.md +0 -15
- package/src/results/analysis/table.analysis.md +0 -15
- package/src/results/filter-sidebar/index.analysis.md +0 -14
- package/src/results/generic/table-result-list.analysis.md +0 -15
- package/src/results/generic/table-result-list.stories.tsx +0 -21
- package/src/results/stories/cards.stories.tsx +0 -66
- package/src/results/stories/dialog-filter.stories.tsx +0 -20
- package/src/results/stories/empty.stories.tsx +0 -25
- package/src/results/stories/filter-navbar.stories.tsx +0 -19
- package/src/results/stories/filter-sidebar.stories.tsx +0 -20
- package/src/results/stories/pagination.stories.tsx +0 -24
- package/src/results/stories/table-with-images.stories.tsx +0 -19
- package/src/results/stories/table.stories.tsx +0 -78
- package/src/search-input.analysis.md +0 -15
- package/src/share-button.analysis.md +0 -19
- package/src/stories/autocomplete.stories.tsx +0 -20
- package/src/stories/breadcrumb.stories.tsx +0 -93
- package/src/stories/check-article-lang.stories.tsx +0 -22
- package/src/stories/render-article.stories.tsx +0 -19
- package/src/stories/search-input.stories.tsx +0 -21
- package/src/stories/share-button.stories.tsx +0 -15
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Analysis: check-article-lang
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/check-article-lang.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=yes, effects=yes, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- Effects that update state can add extra renders on mount and dependency changes.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- Access to window/document needs care to avoid hydration mismatch and non-browser runtime issues.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Keep browser-only access inside event handlers or useEffect, not in initial render paths.
|
|
15
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: tree-of-content
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/directoryNodes/tree-of-content.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { TreeOfContent } from './tree-of-content';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof TreeOfContent> = {
|
|
5
|
-
title: 'Components/DirectoryNodes/TreeOfContent',
|
|
6
|
-
component: TreeOfContent,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof TreeOfContent>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
directoryNodes: [
|
|
18
|
-
{ id: '1', label: 'Node 1', active: true, children: [] },
|
|
19
|
-
{ id: '2', label: 'Node 2', active: false, children: [] },
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: result-list
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/documents/result-list.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { DocumentsResultList } from '../result-list';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof DocumentsResultList> = {
|
|
5
|
-
title: 'Components/Documents/ResultList',
|
|
6
|
-
component: DocumentsResultList,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof DocumentsResultList>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
items: [],
|
|
18
|
-
},
|
|
19
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Analysis: bookmark-button
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/favorites/bookmark-button.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=yes, effects=yes, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- Effects that update state can add extra renders on mount and dependency changes.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- Access to window/document needs care to avoid hydration mismatch and non-browser runtime issues.
|
|
12
|
-
- markersList is loaded only on mount/shortId change; later store updates may not refresh the badge.
|
|
13
|
-
|
|
14
|
-
## Recommended improvements
|
|
15
|
-
- Keep browser-only access inside event handlers or useEffect, not in initial render paths.
|
|
16
|
-
- Read documents[shortId]?.topics directly through a Zustand selector to keep UI reactive.
|
|
17
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { BookmarkButton } from '../bookmark-button';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof BookmarkButton> = {
|
|
5
|
-
title: 'Components/Favorites/BookmarkButton',
|
|
6
|
-
component: BookmarkButton,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof BookmarkButton>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
shortId: 'doc-1',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Analysis: favorite-button
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/favorites/favorite-button.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=yes, window/document=no, effects=yes, fetch/call=yes
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- Store subscriptions can re-render this component whenever the selected slice changes.
|
|
9
|
-
- Effects that update state can add extra renders on mount and dependency changes.
|
|
10
|
-
|
|
11
|
-
## Possible bugs/risks
|
|
12
|
-
- Async flows can hit race conditions during fast param/route changes.
|
|
13
|
-
- useEffect with empty deps calls getTopicDocumentData(id) and does not react if id/type changes.
|
|
14
|
-
|
|
15
|
-
## Recommended improvements
|
|
16
|
-
- Consider cancellation guards (isMounted or AbortController) and standardized error handling.
|
|
17
|
-
- Include id and type in effect dependencies and handle fetch cancellation on unmount.
|
|
18
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { FavoriteButton } from '../favorite-button';
|
|
3
|
-
import { RESULT_TYPES } from '@c-rex/constants';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof FavoriteButton> = {
|
|
6
|
-
title: 'Components/Favorites/FavoriteButton',
|
|
7
|
-
component: FavoriteButton,
|
|
8
|
-
parameters: {
|
|
9
|
-
layout: 'centered',
|
|
10
|
-
},
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
type Story = StoryObj<typeof FavoriteButton>;
|
|
15
|
-
|
|
16
|
-
export const Basic: Story = {
|
|
17
|
-
args: {
|
|
18
|
-
id: 'doc-1',
|
|
19
|
-
type: RESULT_TYPES.DOCUMENT,
|
|
20
|
-
label: 'Document 1',
|
|
21
|
-
},
|
|
22
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: file-icon
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/icons/file-icon.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { FileIcon } from '../file-icon';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof FileIcon> = {
|
|
5
|
-
title: 'Components/Icons/FileIcon',
|
|
6
|
-
component: FileIcon,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof FileIcon>;
|
|
14
|
-
|
|
15
|
-
export const PDF: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
extension: 'application/pdf',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: flag-icon
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/icons/flag-icon.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Flag } from '../flag-icon';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof Flag> = {
|
|
5
|
-
title: 'Components/Icons/Flag',
|
|
6
|
-
component: Flag,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof Flag>;
|
|
14
|
-
|
|
15
|
-
export const Brazil: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
countryCode: 'BR',
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export const USA: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
countryCode: 'US',
|
|
24
|
-
},
|
|
25
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: loading
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/icons/loading.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { Loading } from '../loading';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof Loading> = {
|
|
5
|
-
title: 'Components/Icons/Loading',
|
|
6
|
-
component: Loading,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof Loading>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {};
|
|
16
|
-
|
|
17
|
-
export const WithOpacity: Story = {
|
|
18
|
-
args: {
|
|
19
|
-
opacity: true,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Analysis: info-table
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/info/info-table.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- The component renders list-heavy UI; key stability and memoization strongly affect perceived performance.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Review key strategy and extract memoized subcomponents for large-list rendering.
|
|
15
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: shared
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/info/shared.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { InfoTable } from '../info-table';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof InfoTable> = {
|
|
5
|
-
title: 'Components/Info/InfoTable',
|
|
6
|
-
component: InfoTable,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof InfoTable>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
title: 'Info',
|
|
18
|
-
linkPath: 'documents',
|
|
19
|
-
data: {
|
|
20
|
-
id: '1',
|
|
21
|
-
title: 'Sample Document',
|
|
22
|
-
type: 'document',
|
|
23
|
-
language: 'en-US',
|
|
24
|
-
files: {},
|
|
25
|
-
renditions: [],
|
|
26
|
-
directoryNodes: [],
|
|
27
|
-
labels: [{ value: 'Sample Document', language: 'en-US' }],
|
|
28
|
-
languages: ['en-US'],
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { renderValue } from '../shared';
|
|
3
|
-
|
|
4
|
-
const meta: Meta = {
|
|
5
|
-
title: 'Components/Info/RenderValue',
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: 'centered',
|
|
8
|
-
},
|
|
9
|
-
tags: ['autodocs'],
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj;
|
|
13
|
-
|
|
14
|
-
export const DateValue: Story = {
|
|
15
|
-
render: () => <div>{renderValue({ label: 'date', value: '2024-01-01' }, 'en-US')}</div>,
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const LanguageValue: Story = {
|
|
19
|
-
render: () => <div>{renderValue({ label: 'language', value: 'en-US' }, 'en-US')}</div>,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const StringValue: Story = {
|
|
23
|
-
render: () => <div>{renderValue({ label: 'custom', value: 'Some text' }, 'en-US')}</div>,
|
|
24
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Analysis: content-language-switch
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/navbar/language-switcher/content-language-switch.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=yes, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- Access to window/document needs care to avoid hydration mismatch and non-browser runtime issues.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Keep browser-only access inside event handlers or useEffect, not in initial render paths.
|
|
15
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: shared
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/navbar/language-switcher/shared.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Analysis: ui-language-switch
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/navbar/language-switcher/ui-language-switch.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=yes, window/document=yes, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- Store subscriptions can re-render this component whenever the selected slice changes.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- Access to window/document needs care to avoid hydration mismatch and non-browser runtime issues.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Keep browser-only access inside event handlers or useEffect, not in initial render paths.
|
|
15
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: navbar
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/navbar/navbar.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: settings
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/navbar/settings.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: sign-in-out-btns
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/navbar/sign-in-out-btns.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { NavBar } from '../navbar';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof NavBar> = {
|
|
5
|
-
title: 'Components/NavBar',
|
|
6
|
-
component: NavBar,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'padded',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof NavBar>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
title: 'C-Rex',
|
|
18
|
-
showInput: false,
|
|
19
|
-
showPkgFilter: false,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const WithSearch: Story = {
|
|
24
|
-
args: {
|
|
25
|
-
title: 'C-Rex',
|
|
26
|
-
showInput: true,
|
|
27
|
-
showPkgFilter: false,
|
|
28
|
-
autocompleteType: 'default', // ajuste conforme opções reais
|
|
29
|
-
onSelectPath: '/search',
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { SettingsMenu } from '../settings';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof SettingsMenu> = {
|
|
5
|
-
title: 'Components/Navbar/SettingsMenu',
|
|
6
|
-
component: SettingsMenu,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof SettingsMenu>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { SignInBtn } from '../sign-in-out-btns';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof SignInBtn> = {
|
|
5
|
-
title: 'Components/Navbar/SignInBtn',
|
|
6
|
-
component: SignInBtn,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof SignInBtn>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { UserMenu } from '../user-menu';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof UserMenu> = {
|
|
5
|
-
title: 'Components/Navbar/UserMenu',
|
|
6
|
-
component: UserMenu,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof UserMenu>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
session: { user: { name: 'John Doe', email: 'john@doe.com' } },
|
|
18
|
-
OIDCEndPoint: 'https://oidc.example.com/',
|
|
19
|
-
},
|
|
20
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: user-menu
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/navbar/user-menu.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: page-wrapper
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/page-wrapper.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Analysis: render-article
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/render-article.tsx
|
|
4
|
-
- Type: Client component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=yes, window/document=no, effects=yes, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- Store subscriptions can re-render this component whenever the selected slice changes.
|
|
9
|
-
- Effects that update state can add extra renders on mount and dependency changes.
|
|
10
|
-
|
|
11
|
-
## Possible bugs/risks
|
|
12
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
13
|
-
|
|
14
|
-
## Recommended improvements
|
|
15
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Analysis: file-download
|
|
2
|
-
|
|
3
|
-
- Component: packages/components/src/renditions/file-download.tsx
|
|
4
|
-
- Type: Server component
|
|
5
|
-
- Detected signals: useQueryStates=no, stores=no, window/document=no, effects=no, fetch/call=no
|
|
6
|
-
|
|
7
|
-
## Possible re-render causes
|
|
8
|
-
- No obvious excessive re-render trigger beyond normal prop/context updates.
|
|
9
|
-
|
|
10
|
-
## Possible bugs/risks
|
|
11
|
-
- No critical bug is evident in this quick static pass; keep tests for error and loading paths.
|
|
12
|
-
|
|
13
|
-
## Recommended improvements
|
|
14
|
-
- Standardize loading/error handling and add regression tests to prevent divergent behavior across consuming apps.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { FileDownloadDropdown } from '../file-download';
|
|
3
|
-
|
|
4
|
-
const meta: Meta<typeof FileDownloadDropdown> = {
|
|
5
|
-
title: 'Components/Renditions/FileDownloadDropdown',
|
|
6
|
-
component: FileDownloadDropdown,
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
};
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof FileDownloadDropdown>;
|
|
14
|
-
|
|
15
|
-
export const Basic: Story = {
|
|
16
|
-
args: {
|
|
17
|
-
renditions: [],
|
|
18
|
-
},
|
|
19
|
-
};
|