@granto-umbrella/umbrella-components 3.0.55 → 3.0.57

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