analytica-frontend-lib 1.2.11 → 1.2.13

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.
Files changed (58) hide show
  1. package/dist/AlertManager/index.css +19114 -0
  2. package/dist/AlertManager/index.css.map +1 -0
  3. package/dist/AlertManager/index.d.mts +12 -0
  4. package/dist/AlertManager/index.d.ts +12 -0
  5. package/dist/AlertManager/index.js +6018 -0
  6. package/dist/AlertManager/index.js.map +1 -0
  7. package/dist/AlertManager/index.mjs +6045 -0
  8. package/dist/AlertManager/index.mjs.map +1 -0
  9. package/dist/AlertManagerView/index.d.mts +25 -0
  10. package/dist/AlertManagerView/index.d.ts +25 -0
  11. package/dist/AlertManagerView/index.js +835 -0
  12. package/dist/AlertManagerView/index.js.map +1 -0
  13. package/dist/AlertManagerView/index.mjs +815 -0
  14. package/dist/AlertManagerView/index.mjs.map +1 -0
  15. package/dist/DropdownMenu/index.js +3 -2
  16. package/dist/DropdownMenu/index.js.map +1 -1
  17. package/dist/DropdownMenu/index.mjs +3 -2
  18. package/dist/DropdownMenu/index.mjs.map +1 -1
  19. package/dist/Modal/index.d.mts +2 -1
  20. package/dist/Modal/index.d.ts +2 -1
  21. package/dist/Modal/index.js +3 -2
  22. package/dist/Modal/index.js.map +1 -1
  23. package/dist/Modal/index.mjs +3 -2
  24. package/dist/Modal/index.mjs.map +1 -1
  25. package/dist/NotificationCard/index.js +3 -2
  26. package/dist/NotificationCard/index.js.map +1 -1
  27. package/dist/NotificationCard/index.mjs +3 -2
  28. package/dist/NotificationCard/index.mjs.map +1 -1
  29. package/dist/Quiz/index.js +3 -2
  30. package/dist/Quiz/index.js.map +1 -1
  31. package/dist/Quiz/index.mjs +3 -2
  32. package/dist/Quiz/index.mjs.map +1 -1
  33. package/dist/Search/index.js +3 -2
  34. package/dist/Search/index.js.map +1 -1
  35. package/dist/Search/index.mjs +3 -2
  36. package/dist/Search/index.mjs.map +1 -1
  37. package/dist/Stepper/index.js +1 -1
  38. package/dist/Stepper/index.js.map +1 -1
  39. package/dist/Stepper/index.mjs +1 -1
  40. package/dist/Stepper/index.mjs.map +1 -1
  41. package/dist/Table/index.d.mts +1 -1
  42. package/dist/Table/index.d.ts +1 -1
  43. package/dist/Table/index.js.map +1 -1
  44. package/dist/Table/index.mjs.map +1 -1
  45. package/dist/index.css +32 -0
  46. package/dist/index.css.map +1 -1
  47. package/dist/index.d.mts +121 -19
  48. package/dist/index.d.ts +121 -19
  49. package/dist/index.js +3341 -2200
  50. package/dist/index.js.map +1 -1
  51. package/dist/index.mjs +3272 -2129
  52. package/dist/index.mjs.map +1 -1
  53. package/dist/notification-TD7ZFRLL.png +0 -0
  54. package/dist/styles.css +32 -0
  55. package/dist/styles.css.map +1 -1
  56. package/dist/types-DMycdI4U.d.mts +88 -0
  57. package/dist/types-DMycdI4U.d.ts +88 -0
  58. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -12,6 +12,10 @@ import * as react from 'react';
12
12
  import react__default, { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
13
13
  import * as zustand from 'zustand';
14
14
  import { StoreApi } from 'zustand';
15
+ import { C as CategoryConfig } from './types-DMycdI4U.mjs';
16
+ export { a as AlertData, A as AlertsConfig, b as CheckboxGroup, I as Item } from './types-DMycdI4U.mjs';
17
+ export { AlertsManager } from './AlertManager/index.mjs';
18
+ export { AlertViewData, AlertsManagerView, RecipientStatus } from './AlertManagerView/index.mjs';
15
19
  export { default as Radio, RadioGroup, RadioGroupItem } from './Radio/index.mjs';
16
20
  export { default as TextArea } from './TextArea/index.mjs';
17
21
  export { default as Toast } from './Toast/index.mjs';
@@ -34,7 +38,7 @@ export { ThemeToggle } from './ThemeToggle/index.mjs';
34
38
  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
39
  export { c as ThemeActions, T as ThemeMode, b as ThemeState, a as ThemeStore, u as useThemeStore } from './themeStore-P2X64zC-.mjs';
36
40
  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';
41
+ export { SortDirection, default as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, UseTableSortOptions, useTableSort } from './Table/index.mjs';
38
42
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.mjs';
39
43
  export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.mjs';
40
44
  export { CardActivitiesResults, CardAudio, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.mjs';
@@ -185,26 +189,11 @@ declare const CheckboxListItem: react.ForwardRefExoticComponent<{
185
189
  className?: string;
186
190
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
187
191
 
188
- type Item = {
192
+ interface RecipientItem {
189
193
  id: string;
190
194
  name: string;
191
195
  [key: string]: unknown;
192
- };
193
- type CategoryConfig = {
194
- key: string;
195
- label: string;
196
- selectedIds?: string[];
197
- dependsOn?: string[];
198
- itens?: Item[];
199
- filteredBy?: {
200
- key: string;
201
- internalField: string;
202
- }[];
203
- };
204
- declare const CheckboxGroup: ({ categories, onCategoriesChange, }: {
205
- categories: CategoryConfig[];
206
- onCategoriesChange: (categories: CategoryConfig[]) => void;
207
- }) => react_jsx_runtime.JSX.Element;
196
+ }
208
197
 
209
198
  /**
210
199
  * Notification store state interface
@@ -454,6 +443,119 @@ declare const createNotificationsHook: (apiClient: NotificationApiClient) => ()
454
443
  }[];
455
444
  };
456
445
 
446
+ type FilterConfig = {
447
+ key: string;
448
+ label: string;
449
+ categories: CategoryConfig[];
450
+ };
451
+ type UseTableFilterOptions = {
452
+ syncWithUrl?: boolean;
453
+ };
454
+ type UseTableFilterReturn = {
455
+ filterConfigs: FilterConfig[];
456
+ activeFilters: Record<string, string[]>;
457
+ hasActiveFilters: boolean;
458
+ updateFilters: (configs: FilterConfig[]) => void;
459
+ applyFilters: () => void;
460
+ clearFilters: () => void;
461
+ };
462
+ /**
463
+ * Hook for managing table filters with URL synchronization
464
+ *
465
+ * @param initialConfigs - Initial filter configurations
466
+ * @param options - Hook options including URL sync
467
+ * @returns Filter state and management functions
468
+ *
469
+ * @example
470
+ * ```tsx
471
+ * const { filterConfigs, activeFilters, updateFilters, applyFilters } = useTableFilter(
472
+ * [
473
+ * {
474
+ * key: 'academic',
475
+ * label: 'Dados Acadêmicos',
476
+ * categories: [...]
477
+ * }
478
+ * ],
479
+ * { syncWithUrl: true }
480
+ * );
481
+ * ```
482
+ */
483
+ declare const useTableFilter: (initialConfigs: FilterConfig[], options?: UseTableFilterOptions) => UseTableFilterReturn;
484
+
485
+ type FilterModalProps = {
486
+ /**
487
+ * Controls modal visibility
488
+ */
489
+ isOpen: boolean;
490
+ /**
491
+ * Callback when modal should close
492
+ */
493
+ onClose: () => void;
494
+ /**
495
+ * Filter configurations with categories
496
+ */
497
+ filterConfigs: FilterConfig[];
498
+ /**
499
+ * Callback when filters change (temporary, before applying)
500
+ */
501
+ onFiltersChange: (configs: FilterConfig[]) => void;
502
+ /**
503
+ * Callback when "Aplicar" button is clicked
504
+ */
505
+ onApply: () => void;
506
+ /**
507
+ * Callback when "Limpar filtros" button is clicked
508
+ */
509
+ onClear: () => void;
510
+ /**
511
+ * Modal title
512
+ * @default "Filtros"
513
+ */
514
+ title?: string;
515
+ /**
516
+ * Modal size
517
+ * @default "md"
518
+ */
519
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
520
+ /**
521
+ * Apply button label
522
+ * @default "Aplicar"
523
+ */
524
+ applyLabel?: string;
525
+ /**
526
+ * Clear button label
527
+ * @default "Limpar filtros"
528
+ */
529
+ clearLabel?: string;
530
+ };
531
+ /**
532
+ * FilterModal component - A modal for table filtering with CheckboxGroup
533
+ *
534
+ * Integrates Modal, CheckboxGroup, and Button components to create a
535
+ * complete filtering interface. Works with useTableFilter hook for URL synchronization.
536
+ *
537
+ * @example
538
+ * ```tsx
539
+ * const { filterConfigs, updateFilters, applyFilters, clearFilters } = useTableFilter(
540
+ * initialConfigs,
541
+ * { syncWithUrl: true }
542
+ * );
543
+ *
544
+ * <FilterModal
545
+ * isOpen={isOpen}
546
+ * onClose={() => setIsOpen(false)}
547
+ * filterConfigs={filterConfigs}
548
+ * onFiltersChange={updateFilters}
549
+ * onApply={() => {
550
+ * applyFilters();
551
+ * setIsOpen(false);
552
+ * }}
553
+ * onClear={clearFilters}
554
+ * />
555
+ * ```
556
+ */
557
+ declare const FilterModal: ({ isOpen, onClose, filterConfigs, onFiltersChange, onApply, onClear, title, size, applyLabel, clearLabel, }: FilterModalProps) => react_jsx_runtime.JSX.Element;
558
+
457
559
  interface AccordionGroupProps extends HTMLAttributes<HTMLDivElement> {
458
560
  type?: 'single' | 'multiple';
459
561
  defaultValue?: string | string[];
@@ -678,4 +780,4 @@ declare const useAppStore: zustand.UseBoundStore<Omit<zustand.StoreApi<AppState>
678
780
  };
679
781
  }>;
680
782
 
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 };
783
+ export { AccordionGroup, type AuthState, CategoryConfig, CheckboxList, CheckboxListItem, FetchNotificationsParams, type FilterConfig, FilterModal, type FilterModalProps, ImageUpload, type ImageUploadProps, 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 RecipientItem, type UseTableFilterOptions, type UseTableFilterReturn, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId, useTableFilter };
package/dist/index.d.ts CHANGED
@@ -12,6 +12,10 @@ import * as react from 'react';
12
12
  import react__default, { ReactNode, HTMLAttributes, InputHTMLAttributes } from 'react';
13
13
  import * as zustand from 'zustand';
14
14
  import { StoreApi } from 'zustand';
15
+ import { C as CategoryConfig } from './types-DMycdI4U.js';
16
+ export { a as AlertData, A as AlertsConfig, b as CheckboxGroup, I as Item } from './types-DMycdI4U.js';
17
+ export { AlertsManager } from './AlertManager/index.js';
18
+ export { AlertViewData, AlertsManagerView, RecipientStatus } from './AlertManagerView/index.js';
15
19
  export { default as Radio, RadioGroup, RadioGroupItem } from './Radio/index.js';
16
20
  export { default as TextArea } from './TextArea/index.js';
17
21
  export { default as Toast } from './Toast/index.js';
@@ -34,7 +38,7 @@ export { ThemeToggle } from './ThemeToggle/index.js';
34
38
  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
39
  export { c as ThemeActions, T as ThemeMode, b as ThemeState, a as ThemeStore, u as useThemeStore } from './themeStore-P2X64zC-.js';
36
40
  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';
41
+ export { SortDirection, default as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, UseTableSortOptions, useTableSort } from './Table/index.js';
38
42
  export { default as Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './Select/index.js';
39
43
  export { default as Menu, MenuContent, MenuItem, MenuOverflow } from './Menu/index.js';
40
44
  export { CardActivitiesResults, CardAudio, CardPerformance, CardProgress, CardQuestions, CardResults, CardSimulado, CardSimulationHistory, CardStatus, CardTest, CardTopic } from './Card/index.js';
@@ -185,26 +189,11 @@ declare const CheckboxListItem: react.ForwardRefExoticComponent<{
185
189
  className?: string;
186
190
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "checked" | "type" | "name" | "onChange"> & react.RefAttributes<HTMLInputElement>>;
187
191
 
188
- type Item = {
192
+ interface RecipientItem {
189
193
  id: string;
190
194
  name: string;
191
195
  [key: string]: unknown;
192
- };
193
- type CategoryConfig = {
194
- key: string;
195
- label: string;
196
- selectedIds?: string[];
197
- dependsOn?: string[];
198
- itens?: Item[];
199
- filteredBy?: {
200
- key: string;
201
- internalField: string;
202
- }[];
203
- };
204
- declare const CheckboxGroup: ({ categories, onCategoriesChange, }: {
205
- categories: CategoryConfig[];
206
- onCategoriesChange: (categories: CategoryConfig[]) => void;
207
- }) => react_jsx_runtime.JSX.Element;
196
+ }
208
197
 
209
198
  /**
210
199
  * Notification store state interface
@@ -454,6 +443,119 @@ declare const createNotificationsHook: (apiClient: NotificationApiClient) => ()
454
443
  }[];
455
444
  };
456
445
 
446
+ type FilterConfig = {
447
+ key: string;
448
+ label: string;
449
+ categories: CategoryConfig[];
450
+ };
451
+ type UseTableFilterOptions = {
452
+ syncWithUrl?: boolean;
453
+ };
454
+ type UseTableFilterReturn = {
455
+ filterConfigs: FilterConfig[];
456
+ activeFilters: Record<string, string[]>;
457
+ hasActiveFilters: boolean;
458
+ updateFilters: (configs: FilterConfig[]) => void;
459
+ applyFilters: () => void;
460
+ clearFilters: () => void;
461
+ };
462
+ /**
463
+ * Hook for managing table filters with URL synchronization
464
+ *
465
+ * @param initialConfigs - Initial filter configurations
466
+ * @param options - Hook options including URL sync
467
+ * @returns Filter state and management functions
468
+ *
469
+ * @example
470
+ * ```tsx
471
+ * const { filterConfigs, activeFilters, updateFilters, applyFilters } = useTableFilter(
472
+ * [
473
+ * {
474
+ * key: 'academic',
475
+ * label: 'Dados Acadêmicos',
476
+ * categories: [...]
477
+ * }
478
+ * ],
479
+ * { syncWithUrl: true }
480
+ * );
481
+ * ```
482
+ */
483
+ declare const useTableFilter: (initialConfigs: FilterConfig[], options?: UseTableFilterOptions) => UseTableFilterReturn;
484
+
485
+ type FilterModalProps = {
486
+ /**
487
+ * Controls modal visibility
488
+ */
489
+ isOpen: boolean;
490
+ /**
491
+ * Callback when modal should close
492
+ */
493
+ onClose: () => void;
494
+ /**
495
+ * Filter configurations with categories
496
+ */
497
+ filterConfigs: FilterConfig[];
498
+ /**
499
+ * Callback when filters change (temporary, before applying)
500
+ */
501
+ onFiltersChange: (configs: FilterConfig[]) => void;
502
+ /**
503
+ * Callback when "Aplicar" button is clicked
504
+ */
505
+ onApply: () => void;
506
+ /**
507
+ * Callback when "Limpar filtros" button is clicked
508
+ */
509
+ onClear: () => void;
510
+ /**
511
+ * Modal title
512
+ * @default "Filtros"
513
+ */
514
+ title?: string;
515
+ /**
516
+ * Modal size
517
+ * @default "md"
518
+ */
519
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
520
+ /**
521
+ * Apply button label
522
+ * @default "Aplicar"
523
+ */
524
+ applyLabel?: string;
525
+ /**
526
+ * Clear button label
527
+ * @default "Limpar filtros"
528
+ */
529
+ clearLabel?: string;
530
+ };
531
+ /**
532
+ * FilterModal component - A modal for table filtering with CheckboxGroup
533
+ *
534
+ * Integrates Modal, CheckboxGroup, and Button components to create a
535
+ * complete filtering interface. Works with useTableFilter hook for URL synchronization.
536
+ *
537
+ * @example
538
+ * ```tsx
539
+ * const { filterConfigs, updateFilters, applyFilters, clearFilters } = useTableFilter(
540
+ * initialConfigs,
541
+ * { syncWithUrl: true }
542
+ * );
543
+ *
544
+ * <FilterModal
545
+ * isOpen={isOpen}
546
+ * onClose={() => setIsOpen(false)}
547
+ * filterConfigs={filterConfigs}
548
+ * onFiltersChange={updateFilters}
549
+ * onApply={() => {
550
+ * applyFilters();
551
+ * setIsOpen(false);
552
+ * }}
553
+ * onClear={clearFilters}
554
+ * />
555
+ * ```
556
+ */
557
+ declare const FilterModal: ({ isOpen, onClose, filterConfigs, onFiltersChange, onApply, onClear, title, size, applyLabel, clearLabel, }: FilterModalProps) => react_jsx_runtime.JSX.Element;
558
+
457
559
  interface AccordionGroupProps extends HTMLAttributes<HTMLDivElement> {
458
560
  type?: 'single' | 'multiple';
459
561
  defaultValue?: string | string[];
@@ -678,4 +780,4 @@ declare const useAppStore: zustand.UseBoundStore<Omit<zustand.StoreApi<AppState>
678
780
  };
679
781
  }>;
680
782
 
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 };
783
+ export { AccordionGroup, type AuthState, CategoryConfig, CheckboxList, CheckboxListItem, FetchNotificationsParams, type FilterConfig, FilterModal, type FilterModalProps, ImageUpload, type ImageUploadProps, 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 RecipientItem, type UseTableFilterOptions, type UseTableFilterReturn, createNotificationStore, createNotificationsHook, createUseNotificationStore, createUseNotifications, formatTimeAgo, getStatusBadge, useAppContent, useAppInitialization, useAppStore, useAuthStore, useInstitutionId, useTableFilter };