@granto-umbrella/umbrella-components 3.0.55 → 3.0.56

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.
@@ -1,124 +1,65 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
1
  export type TimelineVariant =
3
- | 'accepted'
4
2
  | 'continued'
3
+ | 'accepted'
5
4
  | 'rejected'
6
- | 'download'
7
5
  | 'issue'
8
- | 'order';
6
+ | 'order'
7
+ | 'created'
8
+ | 'updated'
9
+ | 'download'
10
+ | 'deleted'
11
+ | 'info';
12
+
13
+ export type ActorType = 'user' | 'app';
9
14
 
10
- export enum EventType {
11
- PartnerSubscribe = 'subscription:partner_subscribe',
12
- PartnerQuote = 'subscription:partner_quote',
13
- ProposalRefused = 'order:proposal_refused',
14
- PartnerIssue = 'issue:partner_issue',
15
- PartnerOrder = 'order:partner_order',
15
+ export interface TimelineActor {
16
+ id: string;
17
+ displayName: string;
18
+ type: ActorType;
16
19
  }
17
20
 
18
21
  export interface TimelineItem {
19
22
  id: string;
20
23
  timestamp: string;
21
- type: string;
24
+ type: TimelineVariant;
22
25
  title: string;
23
26
  description?: string;
24
- actor?: TimelineActor;
25
- origin?: string;
27
+ actor: TimelineActor;
28
+ origin: string;
26
29
  correlationId?: string;
27
- metadata?: TimelineMetadata;
30
+ metadata?: Record<string, unknown>;
28
31
  }
29
32
 
30
- export type TimelineProps = {
31
- items: TimelineItem[];
32
- loading?: boolean;
33
- onRetry?: () => void;
34
- emptyLabel?: string;
35
- skeletonItems?: number;
36
- };
33
+ export type EventIdKey = `${number}`;
37
34
 
38
- export interface TimelineActor {
39
- id: string;
40
- displayName: string;
41
- type: string;
35
+ export interface RemoteUser {
36
+ id: number;
37
+ username: string;
38
+ name: string;
42
39
  }
43
40
 
44
- export interface TimelineMetadata {
45
- from?: string;
46
- to?: string;
47
- [key: string]: any;
48
- }
41
+ export interface RemoteEvent {
42
+ id: string;
43
+ eventType: string;
44
+ eventId: number | string;
45
+ isPublic: boolean;
49
46
 
50
- export type RemoteEventType =
51
- | 'subscription:partner_quote'
52
- | 'subscription:partner_subscribe'
53
- | 'order:proposal_refused'
54
- | 'issue:partner_issue'
55
- | 'order:partner_order'
56
- | string;
47
+ startDate: string;
48
+ endDate?: string;
49
+ duration?: number;
57
50
 
58
- export interface RemoteEventActor {
59
- id: number | string;
60
- name: string;
61
- type: 'app' | 'user' | string;
62
- }
51
+ user?: RemoteUser;
63
52
 
64
- export interface RemoteEventData {
65
- orderId?: string | null;
66
- title?: string | number | null;
67
- insuranceId?: string | null;
68
- subscription?: {
69
- branch?: number;
70
- sumInsuredRatio?: number;
71
- sumContract?: number;
72
- hasExclusivity?: boolean;
73
- hasContinuity?: boolean;
74
- retroactive?: number;
75
- coverages?: Array<unknown>;
76
- insured?: {
77
- name?: string;
78
- type?: string;
79
- document?: string;
80
- address?: {
81
- cep?: string;
82
- street?: string;
83
- number?: number | string;
84
- locale?: string;
85
- city?: string;
86
- uf?: string;
87
- complement?: string | null;
88
- };
89
- };
90
- contract?: {
91
- edital?: string | null;
92
- number?: string | null;
93
- title?: string | null;
94
- addition?: string | null;
95
- object?: string | null;
96
- process?: string | null;
97
- signedOn?: string | null;
98
- };
99
- event?: unknown;
100
- startAt?: string | null;
101
- endAt?: string | null;
102
- period?: number | null;
103
- sumInsured?: number | null;
104
- endosso?: unknown;
105
- underwriter?: unknown;
106
- details?: unknown;
107
- } | null;
108
- offers?: Array<{ insurerId: number; insurerName: string }> | null;
109
- upn?: number;
110
- isApp?: boolean;
111
- }
53
+ data?: Record<string, unknown>;
112
54
 
113
- export interface RemoteEvent {
114
- eventType: RemoteEventType;
115
- isPublic: boolean;
116
- startAt: string; // ISO
117
- endAt?: string; // ISO
118
- duration?: number; // ms
119
- correlationId: string;
120
- parentCorrelationId?: string;
121
- parentEventType?: string;
122
- actor: RemoteEventActor;
123
- data: RemoteEventData;
55
+ parentId?: string | null;
56
+ parentType?: string | null;
124
57
  }
58
+
59
+ export type TimelineProps = {
60
+ items: TimelineItem[];
61
+ loading?: boolean;
62
+ onRetry?: () => void;
63
+ emptyLabel?: string;
64
+ skeletonItems?: number;
65
+ };
package/src/index.ts CHANGED
@@ -1,159 +1,159 @@
1
- import { Form } from 'react-hook-form';
2
-
3
- import {
4
- Dialog,
5
- DialogContent,
6
- DialogDescription,
7
- DialogPortal,
8
- DialogTitle,
9
- DialogTrigger,
10
- } from '@radix-ui/react-dialog';
11
-
12
- import Badge from './components/atoms/Badge/Badge';
13
- import Breadcrumb from './components/atoms/Breadcrumb/Breadcrumb';
14
- import Button from './components/atoms/Button';
15
- import { Checkbox } from './components/atoms/Checkbox/Checkbox';
16
- import CodeInput from './components/atoms/CodeInput/CodeInput';
17
- import { DatePickerInput } from './components/atoms/DatePickerInput/DatePickerInput';
18
- import { DropdownMenu } from './components/atoms/DropDownMenu/DropdownMenu';
19
- import ErrorMessage from './components/atoms/ErrorMessage';
20
- import Footer from './components/atoms/Footer/Footer';
21
- import { GenericContainer } from './components/atoms/GenericContainer';
22
- import Icon from './components/atoms/Icon';
23
- import Input from './components/atoms/Input';
24
- import { Label } from './components/atoms/Label/Label';
25
- import Loading from './components/atoms/Loading';
26
- import { LogoContainer } from './components/atoms/LogoContainer';
27
- import { ModalAviso } from './components/atoms/ModalAviso';
28
- import { MultiSelect } from './components/atoms/MultiSelect';
29
- import Pill from './components/atoms/Pill/Pill';
30
- import RadioButton from './components/atoms/RadioButton/RadioButton';
31
- import { ResendLink } from './components/atoms/ResendLink';
32
- import Select from './components/atoms/Select';
33
- import { Subtitle } from './components/atoms/Subtitle';
34
- import Switch from './components/atoms/Switch/Switch';
35
- import { TabBar } from './components/atoms/TabBar';
36
- import Text from './components/atoms/Text';
37
- import Textarea from './components/atoms/Textarea/Textarea';
38
- import { Title } from './components/atoms/Title';
39
- import { BannerAjuda } from './components/molecules/BannerAjuda';
40
- import ButtonGroup from './components/molecules/ButtonGroup/ButtonGroup';
41
- import { Calendar } from './components/molecules/Calendar/Calendar';
42
- import { CodeInputContainer } from './components/molecules/CodeInputContainer';
43
- import FieldSelector from './components/molecules/FieldSelector/FieldSelector';
44
- import { HighlightsCard } from './components/molecules/HighlightsCard/HighlightsCard';
45
- import { InsuranceCard } from './components/molecules/InsuranceCard/InsuranceCard';
46
- import { PieChartComponent } from './components/molecules/PieChartComponent/PieChartComponent';
47
- import {
48
- Popover,
49
- PopoverContent,
50
- PopoverTrigger,
51
- } from './components/molecules/Popover/Popover';
52
- import RadioGroup from './components/molecules/RadioBoxGroup/RadioBoxGroup';
53
- import { RadioGroupField } from './components/molecules/RadioGroupField';
54
- import { TabToggle } from './components/molecules/TabToggle/TabToggle';
55
- import { Timeline } from './components/molecules/TimeLine/TimeLine';
56
- import AlertDialog from './components/organisms/AlertDialog/AlertDialog';
57
- import {
58
- DialogFooter,
59
- DialogHeader,
60
- } from './components/organisms/Dialog/Dialog';
61
- import {
62
- StyledDialogClose,
63
- StyledDialogOverlay,
64
- } from './components/organisms/Dialog/Dialog.styles';
65
- import DonutEmissionsChart from './components/organisms/DonutEmissionsChart';
66
- import { ExportExcelModal } from './components/organisms/ExportExcelModal/ExportExcelModal';
67
- import {
68
- FormControl,
69
- FormDescription,
70
- FormField,
71
- FormItem,
72
- FormLabel,
73
- FormMessage,
74
- useFormField,
75
- } from './components/organisms/Form/Form';
76
- import { ListagemUltimasEmissoes } from './components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes';
77
- import NavbarContainer from './components/organisms/Navbar/Navbar';
78
- import { TimelineModal } from './components/organisms/TimelineModal/TimelineModal';
79
- import Tooltip from './components/atoms/Tooltip/Tooltip';
80
-
81
- export {
82
- InsuranceCard,
83
- DonutEmissionsChart,
84
- RadioGroupField,
85
- PieChartComponent,
86
- AlertDialog,
87
- FieldSelector,
88
- BannerAjuda,
89
- Badge,
90
- ExportExcelModal,
91
- Breadcrumb,
92
- Button,
93
- ButtonGroup,
94
- Calendar,
95
- CodeInput,
96
- CodeInputContainer,
97
- Checkbox,
98
- DatePickerInput,
99
- Dialog,
100
- DialogContent,
101
- DialogDescription,
102
- ListagemUltimasEmissoes,
103
- DialogFooter,
104
- DialogHeader,
105
- DialogPortal,
106
- DialogTitle,
107
- DialogTrigger,
108
- DropdownMenu,
109
- ErrorMessage,
110
- HighlightsCard,
111
- Footer,
112
- Form,
113
- FormControl,
114
- FormDescription,
115
- FormField,
116
- FormItem,
117
- FormLabel,
118
- FormMessage,
119
- GenericContainer,
120
- Loading,
121
- LogoContainer,
122
- ModalAviso,
123
- MultiSelect,
124
- Icon,
125
- Input,
126
- Label,
127
- Pill,
128
- Popover,
129
- PopoverContent,
130
- PopoverTrigger,
131
- RadioButton,
132
- RadioGroup,
133
- ResendLink,
134
- Select,
135
- Subtitle,
136
- StyledDialogClose,
137
- StyledDialogOverlay,
138
- Switch,
139
- TabBar,
140
- TabToggle,
141
- Text,
142
- Textarea,
143
- Title,
144
- useFormField,
145
- Timeline,
146
- TimelineModal,
147
- NavbarContainer,
148
- Tooltip,
149
- };
150
-
151
- export { primitiveBorders, semanticBorders } from './styles/tokens/borders';
152
- export { primitiveColors, semanticColors } from './styles/tokens/colors';
153
- export { primitiveRadius, semanticRadius } from './styles/tokens/radius';
154
- export { primitiveShadows, semanticShadows } from './styles/tokens/shadows';
155
- export { primitiveSizes, semanticSizes } from './styles/tokens/sizes';
156
- export { typographyTokens } from './styles/tokens/typography';
157
-
158
- export type { Radius } from './types/radius.types';
159
- export type { Shadows } from './types/shadows.types';
1
+ import { Form } from 'react-hook-form';
2
+
3
+ import {
4
+ Dialog,
5
+ DialogContent,
6
+ DialogDescription,
7
+ DialogPortal,
8
+ DialogTitle,
9
+ DialogTrigger,
10
+ } from '@radix-ui/react-dialog';
11
+
12
+ import Badge from './components/atoms/Badge/Badge';
13
+ import Breadcrumb from './components/atoms/Breadcrumb/Breadcrumb';
14
+ import Button from './components/atoms/Button';
15
+ import { Checkbox } from './components/atoms/Checkbox/Checkbox';
16
+ import CodeInput from './components/atoms/CodeInput/CodeInput';
17
+ import { DatePickerInput } from './components/atoms/DatePickerInput/DatePickerInput';
18
+ import { DropdownMenu } from './components/atoms/DropDownMenu/DropdownMenu';
19
+ import ErrorMessage from './components/atoms/ErrorMessage';
20
+ import Footer from './components/atoms/Footer/Footer';
21
+ import { GenericContainer } from './components/atoms/GenericContainer';
22
+ import Icon from './components/atoms/Icon';
23
+ import Input from './components/atoms/Input';
24
+ import { Label } from './components/atoms/Label/Label';
25
+ import Loading from './components/atoms/Loading';
26
+ import { LogoContainer } from './components/atoms/LogoContainer';
27
+ import { ModalAviso } from './components/atoms/ModalAviso';
28
+ import { MultiSelect } from './components/atoms/MultiSelect';
29
+ import Pill from './components/atoms/Pill/Pill';
30
+ import RadioButton from './components/atoms/RadioButton/RadioButton';
31
+ import { ResendLink } from './components/atoms/ResendLink';
32
+ import Select from './components/atoms/Select';
33
+ import { Subtitle } from './components/atoms/Subtitle';
34
+ import Switch from './components/atoms/Switch/Switch';
35
+ import { TabBar } from './components/atoms/TabBar';
36
+ import Text from './components/atoms/Text';
37
+ import Textarea from './components/atoms/Textarea/Textarea';
38
+ import { Title } from './components/atoms/Title';
39
+ import { BannerAjuda } from './components/molecules/BannerAjuda';
40
+ import ButtonGroup from './components/molecules/ButtonGroup/ButtonGroup';
41
+ import { Calendar } from './components/molecules/Calendar/Calendar';
42
+ import { CodeInputContainer } from './components/molecules/CodeInputContainer';
43
+ import FieldSelector from './components/molecules/FieldSelector/FieldSelector';
44
+ import { HighlightsCard } from './components/molecules/HighlightsCard/HighlightsCard';
45
+ import { InsuranceCard } from './components/molecules/InsuranceCard/InsuranceCard';
46
+ import { PieChartComponent } from './components/molecules/PieChartComponent/PieChartComponent';
47
+ import {
48
+ Popover,
49
+ PopoverContent,
50
+ PopoverTrigger,
51
+ } from './components/molecules/Popover/Popover';
52
+ import RadioGroup from './components/molecules/RadioBoxGroup/RadioBoxGroup';
53
+ import { RadioGroupField } from './components/molecules/RadioGroupField';
54
+ import { TabToggle } from './components/molecules/TabToggle/TabToggle';
55
+ import { Timeline } from './components/molecules/TimeLine/TimeLine';
56
+ import AlertDialog from './components/organisms/AlertDialog/AlertDialog';
57
+ import {
58
+ DialogFooter,
59
+ DialogHeader,
60
+ } from './components/organisms/Dialog/Dialog';
61
+ import {
62
+ StyledDialogClose,
63
+ StyledDialogOverlay,
64
+ } from './components/organisms/Dialog/Dialog.styles';
65
+ import DonutEmissionsChart from './components/organisms/DonutEmissionsChart';
66
+ import { ExportExcelModal } from './components/organisms/ExportExcelModal/ExportExcelModal';
67
+ import {
68
+ FormControl,
69
+ FormDescription,
70
+ FormField,
71
+ FormItem,
72
+ FormLabel,
73
+ FormMessage,
74
+ useFormField,
75
+ } from './components/organisms/Form/Form';
76
+ import { ListagemUltimasEmissoes } from './components/organisms/ListagemUltimasEmissoes/ListagemUltimasEmissoes';
77
+ import NavbarContainer from './components/organisms/Navbar/Navbar';
78
+ import { TimelineModal } from './components/organisms/TimelineModal/TimelineModal';
79
+ import Tooltip from './components/atoms/Tooltip/Tooltip';
80
+
81
+ export {
82
+ InsuranceCard,
83
+ DonutEmissionsChart,
84
+ RadioGroupField,
85
+ PieChartComponent,
86
+ AlertDialog,
87
+ FieldSelector,
88
+ BannerAjuda,
89
+ Badge,
90
+ ExportExcelModal,
91
+ Breadcrumb,
92
+ Button,
93
+ ButtonGroup,
94
+ Calendar,
95
+ CodeInput,
96
+ CodeInputContainer,
97
+ Checkbox,
98
+ DatePickerInput,
99
+ Dialog,
100
+ DialogContent,
101
+ DialogDescription,
102
+ ListagemUltimasEmissoes,
103
+ DialogFooter,
104
+ DialogHeader,
105
+ DialogPortal,
106
+ DialogTitle,
107
+ DialogTrigger,
108
+ DropdownMenu,
109
+ ErrorMessage,
110
+ HighlightsCard,
111
+ Footer,
112
+ Form,
113
+ FormControl,
114
+ FormDescription,
115
+ FormField,
116
+ FormItem,
117
+ FormLabel,
118
+ FormMessage,
119
+ GenericContainer,
120
+ Loading,
121
+ LogoContainer,
122
+ ModalAviso,
123
+ MultiSelect,
124
+ Icon,
125
+ Input,
126
+ Label,
127
+ Pill,
128
+ Popover,
129
+ PopoverContent,
130
+ PopoverTrigger,
131
+ RadioButton,
132
+ RadioGroup,
133
+ ResendLink,
134
+ Select,
135
+ Subtitle,
136
+ StyledDialogClose,
137
+ StyledDialogOverlay,
138
+ Switch,
139
+ TabBar,
140
+ TabToggle,
141
+ Text,
142
+ Textarea,
143
+ Title,
144
+ useFormField,
145
+ Timeline,
146
+ TimelineModal,
147
+ NavbarContainer,
148
+ Tooltip,
149
+ };
150
+
151
+ export { primitiveBorders, semanticBorders } from './styles/tokens/borders';
152
+ export { primitiveColors, semanticColors } from './styles/tokens/colors';
153
+ export { primitiveRadius, semanticRadius } from './styles/tokens/radius';
154
+ export { primitiveShadows, semanticShadows } from './styles/tokens/shadows';
155
+ export { primitiveSizes, semanticSizes } from './styles/tokens/sizes';
156
+ export { typographyTokens } from './styles/tokens/typography';
157
+
158
+ export type { Radius } from './types/radius.types';
159
+ export type { Shadows } from './types/shadows.types';