analytica-frontend-lib 1.2.11 → 1.2.12
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/CheckBox/index.d.mts +1 -1
- package/dist/CheckBox/index.d.ts +1 -1
- package/dist/Radio/index.d.mts +2 -2
- package/dist/Radio/index.d.ts +2 -2
- package/dist/Search/index.d.mts +1 -1
- package/dist/Search/index.d.ts +1 -1
- package/dist/Table/index.d.mts +1 -1
- package/dist/Table/index.d.ts +1 -1
- package/dist/Table/index.js.map +1 -1
- package/dist/Table/index.mjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +116 -3
- package/dist/index.d.ts +116 -3
- package/dist/index.js +1057 -788
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +978 -711
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -34,7 +34,7 @@ export { ThemeToggle } from './ThemeToggle/index.mjs';
|
|
|
34
34
|
export { d as SubjectData, e as SubjectEnum, I as SubjectIconProps, S as SubjectInfo, b as getSubjectColorClass, a as getSubjectIcon, g as getSubjectInfo, c as getSubjectName } from './SubjectInfo-Dvt0OodP.mjs';
|
|
35
35
|
export { c as ThemeActions, T as ThemeMode, b as ThemeState, a as ThemeStore, u as useThemeStore } from './themeStore-P2X64zC-.mjs';
|
|
36
36
|
export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger, ProfileToggleTheme } from './DropdownMenu/index.mjs';
|
|
37
|
-
export { default as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, useTableSort } from './Table/index.mjs';
|
|
37
|
+
export { SortDirection, default as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, UseTableSortOptions, useTableSort } from './Table/index.mjs';
|
|
38
38
|
export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
|
|
39
39
|
export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.mjs';
|
|
40
40
|
export { CardActivitiesResults, CardAudio, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.mjs';
|
|
@@ -183,7 +183,7 @@ declare const CheckboxListItem: react.ForwardRefExoticComponent<{
|
|
|
183
183
|
state?: CheckboxListState;
|
|
184
184
|
/** Additional CSS classes */
|
|
185
185
|
className?: string;
|
|
186
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
186
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "name" | "type" | "size" | "value" | "checked"> & react.RefAttributes<HTMLInputElement>>;
|
|
187
187
|
|
|
188
188
|
type Item = {
|
|
189
189
|
id: string;
|
|
@@ -454,6 +454,119 @@ declare const createNotificationsHook: (apiClient: NotificationApiClient) => ()
|
|
|
454
454
|
}[];
|
|
455
455
|
};
|
|
456
456
|
|
|
457
|
+
type FilterConfig = {
|
|
458
|
+
key: string;
|
|
459
|
+
label: string;
|
|
460
|
+
categories: CategoryConfig[];
|
|
461
|
+
};
|
|
462
|
+
type UseTableFilterOptions = {
|
|
463
|
+
syncWithUrl?: boolean;
|
|
464
|
+
};
|
|
465
|
+
type UseTableFilterReturn = {
|
|
466
|
+
filterConfigs: FilterConfig[];
|
|
467
|
+
activeFilters: Record<string, string[]>;
|
|
468
|
+
hasActiveFilters: boolean;
|
|
469
|
+
updateFilters: (configs: FilterConfig[]) => void;
|
|
470
|
+
applyFilters: () => void;
|
|
471
|
+
clearFilters: () => void;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* Hook for managing table filters with URL synchronization
|
|
475
|
+
*
|
|
476
|
+
* @param initialConfigs - Initial filter configurations
|
|
477
|
+
* @param options - Hook options including URL sync
|
|
478
|
+
* @returns Filter state and management functions
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```tsx
|
|
482
|
+
* const { filterConfigs, activeFilters, updateFilters, applyFilters } = useTableFilter(
|
|
483
|
+
* [
|
|
484
|
+
* {
|
|
485
|
+
* key: 'academic',
|
|
486
|
+
* label: 'Dados Acadêmicos',
|
|
487
|
+
* categories: [...]
|
|
488
|
+
* }
|
|
489
|
+
* ],
|
|
490
|
+
* { syncWithUrl: true }
|
|
491
|
+
* );
|
|
492
|
+
* ```
|
|
493
|
+
*/
|
|
494
|
+
declare const useTableFilter: (initialConfigs: FilterConfig[], options?: UseTableFilterOptions) => UseTableFilterReturn;
|
|
495
|
+
|
|
496
|
+
type FilterModalProps = {
|
|
497
|
+
/**
|
|
498
|
+
* Controls modal visibility
|
|
499
|
+
*/
|
|
500
|
+
isOpen: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Callback when modal should close
|
|
503
|
+
*/
|
|
504
|
+
onClose: () => void;
|
|
505
|
+
/**
|
|
506
|
+
* Filter configurations with categories
|
|
507
|
+
*/
|
|
508
|
+
filterConfigs: FilterConfig[];
|
|
509
|
+
/**
|
|
510
|
+
* Callback when filters change (temporary, before applying)
|
|
511
|
+
*/
|
|
512
|
+
onFiltersChange: (configs: FilterConfig[]) => void;
|
|
513
|
+
/**
|
|
514
|
+
* Callback when "Aplicar" button is clicked
|
|
515
|
+
*/
|
|
516
|
+
onApply: () => void;
|
|
517
|
+
/**
|
|
518
|
+
* Callback when "Limpar filtros" button is clicked
|
|
519
|
+
*/
|
|
520
|
+
onClear: () => void;
|
|
521
|
+
/**
|
|
522
|
+
* Modal title
|
|
523
|
+
* @default "Filtros"
|
|
524
|
+
*/
|
|
525
|
+
title?: string;
|
|
526
|
+
/**
|
|
527
|
+
* Modal size
|
|
528
|
+
* @default "md"
|
|
529
|
+
*/
|
|
530
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
531
|
+
/**
|
|
532
|
+
* Apply button label
|
|
533
|
+
* @default "Aplicar"
|
|
534
|
+
*/
|
|
535
|
+
applyLabel?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Clear button label
|
|
538
|
+
* @default "Limpar filtros"
|
|
539
|
+
*/
|
|
540
|
+
clearLabel?: string;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* FilterModal component - A modal for table filtering with CheckboxGroup
|
|
544
|
+
*
|
|
545
|
+
* Integrates Modal, CheckboxGroup, and Button components to create a
|
|
546
|
+
* complete filtering interface. Works with useTableFilter hook for URL synchronization.
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* ```tsx
|
|
550
|
+
* const { filterConfigs, updateFilters, applyFilters, clearFilters } = useTableFilter(
|
|
551
|
+
* initialConfigs,
|
|
552
|
+
* { syncWithUrl: true }
|
|
553
|
+
* );
|
|
554
|
+
*
|
|
555
|
+
* <FilterModal
|
|
556
|
+
* isOpen={isOpen}
|
|
557
|
+
* onClose={() => setIsOpen(false)}
|
|
558
|
+
* filterConfigs={filterConfigs}
|
|
559
|
+
* onFiltersChange={updateFilters}
|
|
560
|
+
* onApply={() => {
|
|
561
|
+
* applyFilters();
|
|
562
|
+
* setIsOpen(false);
|
|
563
|
+
* }}
|
|
564
|
+
* onClear={clearFilters}
|
|
565
|
+
* />
|
|
566
|
+
* ```
|
|
567
|
+
*/
|
|
568
|
+
declare const FilterModal: ({ isOpen, onClose, filterConfigs, onFiltersChange, onApply, onClear, title, size, applyLabel, clearLabel, }: FilterModalProps) => react_jsx_runtime.JSX.Element;
|
|
569
|
+
|
|
457
570
|
interface AccordionGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
458
571
|
type?: 'single' | 'multiple';
|
|
459
572
|
defaultValue?: string | string[];
|
|
@@ -678,4 +791,4 @@ declare const useAppStore: zustand.UseBoundStore<Omit<zustand.StoreApi<AppState>
|
|
|
678
791
|
};
|
|
679
792
|
}>;
|
|
680
793
|
|
|
681
|
-
export { AccordionGroup, type AuthState, type CategoryConfig, CheckboxGroup, CheckboxList, CheckboxListItem, FetchNotificationsParams, ImageUpload, type ImageUploadProps, type Item, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId };
|
|
794
|
+
export { AccordionGroup, type AuthState, type CategoryConfig, CheckboxGroup, CheckboxList, CheckboxListItem, FetchNotificationsParams, type FilterConfig, FilterModal, type FilterModalProps, ImageUpload, type ImageUploadProps, type Item, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, type UseTableFilterOptions, type UseTableFilterReturn, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId, useTableFilter };
|
package/dist/index.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ export { ThemeToggle } from './ThemeToggle/index.js';
|
|
|
34
34
|
export { d as SubjectData, e as SubjectEnum, I as SubjectIconProps, S as SubjectInfo, b as getSubjectColorClass, a as getSubjectIcon, g as getSubjectInfo, c as getSubjectName } from './SubjectInfo-Dvt0OodP.js';
|
|
35
35
|
export { c as ThemeActions, T as ThemeMode, b as ThemeState, a as ThemeStore, u as useThemeStore } from './themeStore-P2X64zC-.js';
|
|
36
36
|
export { default as DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, MenuLabel, ProfileMenuFooter, ProfileMenuHeader, ProfileMenuSection, ProfileMenuTrigger, ProfileToggleTheme } from './DropdownMenu/index.js';
|
|
37
|
-
export { default as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, useTableSort } from './Table/index.js';
|
|
37
|
+
export { SortDirection, default as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, UseTableSortOptions, useTableSort } from './Table/index.js';
|
|
38
38
|
export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
|
|
39
39
|
export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.js';
|
|
40
40
|
export { CardActivitiesResults, CardAudio, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.js';
|
|
@@ -183,7 +183,7 @@ declare const CheckboxListItem: react.ForwardRefExoticComponent<{
|
|
|
183
183
|
state?: CheckboxListState;
|
|
184
184
|
/** Additional CSS classes */
|
|
185
185
|
className?: string;
|
|
186
|
-
} & Omit<InputHTMLAttributes<HTMLInputElement>, "
|
|
186
|
+
} & Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "name" | "type" | "size" | "value" | "checked"> & react.RefAttributes<HTMLInputElement>>;
|
|
187
187
|
|
|
188
188
|
type Item = {
|
|
189
189
|
id: string;
|
|
@@ -454,6 +454,119 @@ declare const createNotificationsHook: (apiClient: NotificationApiClient) => ()
|
|
|
454
454
|
}[];
|
|
455
455
|
};
|
|
456
456
|
|
|
457
|
+
type FilterConfig = {
|
|
458
|
+
key: string;
|
|
459
|
+
label: string;
|
|
460
|
+
categories: CategoryConfig[];
|
|
461
|
+
};
|
|
462
|
+
type UseTableFilterOptions = {
|
|
463
|
+
syncWithUrl?: boolean;
|
|
464
|
+
};
|
|
465
|
+
type UseTableFilterReturn = {
|
|
466
|
+
filterConfigs: FilterConfig[];
|
|
467
|
+
activeFilters: Record<string, string[]>;
|
|
468
|
+
hasActiveFilters: boolean;
|
|
469
|
+
updateFilters: (configs: FilterConfig[]) => void;
|
|
470
|
+
applyFilters: () => void;
|
|
471
|
+
clearFilters: () => void;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* Hook for managing table filters with URL synchronization
|
|
475
|
+
*
|
|
476
|
+
* @param initialConfigs - Initial filter configurations
|
|
477
|
+
* @param options - Hook options including URL sync
|
|
478
|
+
* @returns Filter state and management functions
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```tsx
|
|
482
|
+
* const { filterConfigs, activeFilters, updateFilters, applyFilters } = useTableFilter(
|
|
483
|
+
* [
|
|
484
|
+
* {
|
|
485
|
+
* key: 'academic',
|
|
486
|
+
* label: 'Dados Acadêmicos',
|
|
487
|
+
* categories: [...]
|
|
488
|
+
* }
|
|
489
|
+
* ],
|
|
490
|
+
* { syncWithUrl: true }
|
|
491
|
+
* );
|
|
492
|
+
* ```
|
|
493
|
+
*/
|
|
494
|
+
declare const useTableFilter: (initialConfigs: FilterConfig[], options?: UseTableFilterOptions) => UseTableFilterReturn;
|
|
495
|
+
|
|
496
|
+
type FilterModalProps = {
|
|
497
|
+
/**
|
|
498
|
+
* Controls modal visibility
|
|
499
|
+
*/
|
|
500
|
+
isOpen: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Callback when modal should close
|
|
503
|
+
*/
|
|
504
|
+
onClose: () => void;
|
|
505
|
+
/**
|
|
506
|
+
* Filter configurations with categories
|
|
507
|
+
*/
|
|
508
|
+
filterConfigs: FilterConfig[];
|
|
509
|
+
/**
|
|
510
|
+
* Callback when filters change (temporary, before applying)
|
|
511
|
+
*/
|
|
512
|
+
onFiltersChange: (configs: FilterConfig[]) => void;
|
|
513
|
+
/**
|
|
514
|
+
* Callback when "Aplicar" button is clicked
|
|
515
|
+
*/
|
|
516
|
+
onApply: () => void;
|
|
517
|
+
/**
|
|
518
|
+
* Callback when "Limpar filtros" button is clicked
|
|
519
|
+
*/
|
|
520
|
+
onClear: () => void;
|
|
521
|
+
/**
|
|
522
|
+
* Modal title
|
|
523
|
+
* @default "Filtros"
|
|
524
|
+
*/
|
|
525
|
+
title?: string;
|
|
526
|
+
/**
|
|
527
|
+
* Modal size
|
|
528
|
+
* @default "md"
|
|
529
|
+
*/
|
|
530
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
531
|
+
/**
|
|
532
|
+
* Apply button label
|
|
533
|
+
* @default "Aplicar"
|
|
534
|
+
*/
|
|
535
|
+
applyLabel?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Clear button label
|
|
538
|
+
* @default "Limpar filtros"
|
|
539
|
+
*/
|
|
540
|
+
clearLabel?: string;
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* FilterModal component - A modal for table filtering with CheckboxGroup
|
|
544
|
+
*
|
|
545
|
+
* Integrates Modal, CheckboxGroup, and Button components to create a
|
|
546
|
+
* complete filtering interface. Works with useTableFilter hook for URL synchronization.
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* ```tsx
|
|
550
|
+
* const { filterConfigs, updateFilters, applyFilters, clearFilters } = useTableFilter(
|
|
551
|
+
* initialConfigs,
|
|
552
|
+
* { syncWithUrl: true }
|
|
553
|
+
* );
|
|
554
|
+
*
|
|
555
|
+
* <FilterModal
|
|
556
|
+
* isOpen={isOpen}
|
|
557
|
+
* onClose={() => setIsOpen(false)}
|
|
558
|
+
* filterConfigs={filterConfigs}
|
|
559
|
+
* onFiltersChange={updateFilters}
|
|
560
|
+
* onApply={() => {
|
|
561
|
+
* applyFilters();
|
|
562
|
+
* setIsOpen(false);
|
|
563
|
+
* }}
|
|
564
|
+
* onClear={clearFilters}
|
|
565
|
+
* />
|
|
566
|
+
* ```
|
|
567
|
+
*/
|
|
568
|
+
declare const FilterModal: ({ isOpen, onClose, filterConfigs, onFiltersChange, onApply, onClear, title, size, applyLabel, clearLabel, }: FilterModalProps) => react_jsx_runtime.JSX.Element;
|
|
569
|
+
|
|
457
570
|
interface AccordionGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
458
571
|
type?: 'single' | 'multiple';
|
|
459
572
|
defaultValue?: string | string[];
|
|
@@ -678,4 +791,4 @@ declare const useAppStore: zustand.UseBoundStore<Omit<zustand.StoreApi<AppState>
|
|
|
678
791
|
};
|
|
679
792
|
}>;
|
|
680
793
|
|
|
681
|
-
export { AccordionGroup, type AuthState, type CategoryConfig, CheckboxGroup, CheckboxList, CheckboxListItem, FetchNotificationsParams, ImageUpload, type ImageUploadProps, type Item, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId };
|
|
794
|
+
export { AccordionGroup, type AuthState, type CategoryConfig, CheckboxGroup, CheckboxList, CheckboxListItem, FetchNotificationsParams, type FilterConfig, FilterModal, type FilterModalProps, ImageUpload, type ImageUploadProps, type Item, Notification, type NotificationActions, NotificationApiClient, NotificationEntityType, NotificationGroup, type NotificationState, type NotificationStore, NotificationType, Question, QuizAlternative, QuizConnectDots, QuizDissertative, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTrueOrFalse, type UseTableFilterOptions, type UseTableFilterReturn, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId, useTableFilter };
|