react-native-exp-fig 0.1.21 → 0.1.23
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/lib/commonjs/@types/as-base-component.js +12 -0
- package/lib/commonjs/@types/as-base-component.js.map +1 -0
- package/lib/commonjs/common/icons-svg/constants/index.js +2 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/eclamation-triangle/index.js +33 -0
- package/lib/commonjs/common/icons-svg/eclamation-triangle/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/index.js +8 -0
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/truck/index.js +2 -2
- package/lib/commonjs/common/icons-svg/truck/index.js.map +1 -1
- package/lib/commonjs/components/activities-daily/index.js +9 -9
- package/lib/commonjs/components/activities-daily/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/index.js +14 -14
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/avatar-profile/index.js +4 -4
- package/lib/commonjs/components/avatar-profile/index.js.map +1 -1
- package/lib/commonjs/components/box/index.js +27 -22
- package/lib/commonjs/components/box/index.js.map +1 -1
- package/lib/commonjs/components/box/interface.d.js.map +1 -1
- package/lib/commonjs/components/box/styles.js.map +1 -1
- package/lib/commonjs/components/card-history/index.js +16 -16
- package/lib/commonjs/components/card-history/index.js.map +1 -1
- package/lib/commonjs/components/card-hours/index.js +3 -3
- package/lib/commonjs/components/card-hours/index.js.map +1 -1
- package/lib/commonjs/components/card-loading/index.js +13 -13
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/card-scheduled-journey/index.js +6 -6
- package/lib/commonjs/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +12 -12
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/components/check-box/index.js +5 -5
- package/lib/commonjs/components/check-box/index.js.map +1 -1
- package/lib/commonjs/components/coil/index.js +5 -5
- package/lib/commonjs/components/coil/index.js.map +1 -1
- package/lib/commonjs/components/filter-date-selector/index.js +2 -2
- package/lib/commonjs/components/filter-date-selector/index.js.map +1 -1
- package/lib/commonjs/components/header-profile/index.js +8 -8
- package/lib/commonjs/components/header-profile/index.js.map +1 -1
- package/lib/commonjs/components/history-activities-card/index.js +198 -0
- package/lib/commonjs/components/history-activities-card/index.js.map +1 -0
- package/lib/commonjs/components/history-activities-card/interface.js +6 -0
- package/lib/commonjs/components/history-activities-card/interface.js.map +1 -0
- package/lib/commonjs/components/history-details/index.js +5 -5
- package/lib/commonjs/components/history-details/index.js.map +1 -1
- package/lib/commonjs/components/image-capture-with-remove/index.js +2 -2
- package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/commonjs/components/input/index.js +11 -11
- package/lib/commonjs/components/input/index.js.map +1 -1
- package/lib/commonjs/components/loading-details/index.js +10 -10
- package/lib/commonjs/components/loading-details/index.js.map +1 -1
- package/lib/commonjs/components/loading-progress/index.js +5 -5
- package/lib/commonjs/components/loading-progress/index.js.map +1 -1
- package/lib/commonjs/components/menu-item/index.js +3 -3
- package/lib/commonjs/components/menu-item/index.js.map +1 -1
- package/lib/commonjs/components/modal-activities/index.js +5 -5
- package/lib/commonjs/components/modal-activities/index.js.map +1 -1
- package/lib/commonjs/components/modal-change-activity/index.js +217 -0
- package/lib/commonjs/components/modal-change-activity/index.js.map +1 -0
- package/lib/commonjs/components/no-data/index.js +2 -2
- package/lib/commonjs/components/no-data/index.js.map +1 -1
- package/lib/commonjs/components/notification-loading/index.js +12 -12
- package/lib/commonjs/components/notification-loading/index.js.map +1 -1
- package/lib/commonjs/components/profile-menu-option/index.js +3 -3
- package/lib/commonjs/components/profile-menu-option/index.js.map +1 -1
- package/lib/commonjs/components/scheduled-journey-indicators/index.js +4 -4
- package/lib/commonjs/components/scheduled-journey-indicators/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/index.js +28 -11
- package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
- package/lib/commonjs/components/selects/select-option/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +45 -7
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +9 -9
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/helpers/text-utils.js +21 -0
- package/lib/commonjs/helpers/text-utils.js.map +1 -0
- package/lib/commonjs/index.js +17 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/box/box.stories.js +2 -2
- package/lib/commonjs/stories/box/box.stories.js.map +1 -1
- package/lib/commonjs/stories/history-activities-card/history-activities-card.stories.js +104 -0
- package/lib/commonjs/stories/history-activities-card/history-activities-card.stories.js.map +1 -0
- package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +52 -0
- package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -0
- package/lib/commonjs/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/module/@types/as-base-component.js +6 -0
- package/lib/module/@types/as-base-component.js.map +1 -0
- package/lib/module/common/icons-svg/constants/index.js +2 -1
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/eclamation-triangle/index.js +25 -0
- package/lib/module/common/icons-svg/eclamation-triangle/index.js.map +1 -0
- package/lib/module/common/icons-svg/index.js +8 -0
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/common/icons-svg/truck/index.js +2 -2
- package/lib/module/common/icons-svg/truck/index.js.map +1 -1
- package/lib/module/components/activities-daily/index.js +5 -5
- package/lib/module/components/activities-daily/index.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +5 -5
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/avatar-profile/index.js +1 -1
- package/lib/module/components/avatar-profile/index.js.map +1 -1
- package/lib/module/components/box/index.js +24 -21
- package/lib/module/components/box/index.js.map +1 -1
- package/lib/module/components/box/interface.d.js.map +1 -1
- package/lib/module/components/box/styles.js.map +1 -1
- package/lib/module/components/card-history/index.js +8 -8
- package/lib/module/components/card-history/index.js.map +1 -1
- package/lib/module/components/card-hours/index.js +1 -1
- package/lib/module/components/card-hours/index.js.map +1 -1
- package/lib/module/components/card-loading/index.js +1 -1
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/card-scheduled-journey/index.js +1 -1
- package/lib/module/components/card-scheduled-journey/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +1 -1
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/components/check-box/index.js +1 -1
- package/lib/module/components/check-box/index.js.map +1 -1
- package/lib/module/components/coil/index.js +1 -1
- package/lib/module/components/coil/index.js.map +1 -1
- package/lib/module/components/filter-date-selector/index.js +1 -1
- package/lib/module/components/filter-date-selector/index.js.map +1 -1
- package/lib/module/components/header-profile/index.js +1 -1
- package/lib/module/components/header-profile/index.js.map +1 -1
- package/lib/module/components/history-activities-card/index.js +190 -0
- package/lib/module/components/history-activities-card/index.js.map +1 -0
- package/lib/module/components/history-activities-card/interface.js +2 -0
- package/lib/module/components/history-activities-card/interface.js.map +1 -0
- package/lib/module/components/history-details/index.js +1 -1
- package/lib/module/components/history-details/index.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/index.js +1 -1
- package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/module/components/input/index.js +1 -1
- package/lib/module/components/input/index.js.map +1 -1
- package/lib/module/components/loading-details/index.js +5 -5
- package/lib/module/components/loading-details/index.js.map +1 -1
- package/lib/module/components/loading-progress/index.js +1 -1
- package/lib/module/components/loading-progress/index.js.map +1 -1
- package/lib/module/components/menu-item/index.js +1 -1
- package/lib/module/components/menu-item/index.js.map +1 -1
- package/lib/module/components/modal-activities/index.js +1 -1
- package/lib/module/components/modal-activities/index.js.map +1 -1
- package/lib/module/components/modal-change-activity/index.js +208 -0
- package/lib/module/components/modal-change-activity/index.js.map +1 -0
- package/lib/module/components/no-data/index.js +1 -1
- package/lib/module/components/no-data/index.js.map +1 -1
- package/lib/module/components/notification-loading/index.js +5 -5
- package/lib/module/components/notification-loading/index.js.map +1 -1
- package/lib/module/components/profile-menu-option/index.js +1 -1
- package/lib/module/components/profile-menu-option/index.js.map +1 -1
- package/lib/module/components/scheduled-journey-indicators/index.js +1 -1
- package/lib/module/components/scheduled-journey-indicators/index.js.map +1 -1
- package/lib/module/components/selects/select-option/index.js +28 -11
- package/lib/module/components/selects/select-option/index.js.map +1 -1
- package/lib/module/components/selects/select-option/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +45 -7
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/user-profile/index.js +1 -1
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/helpers/text-utils.js +14 -0
- package/lib/module/helpers/text-utils.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/box/box.stories.js +1 -1
- package/lib/module/stories/box/box.stories.js.map +1 -1
- package/lib/module/stories/history-activities-card/history-activities-card.stories.js +97 -0
- package/lib/module/stories/history-activities-card/history-activities-card.stories.js.map +1 -0
- package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +45 -0
- package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -0
- package/lib/module/utils/get-icon-by-property/index.js +0 -1
- package/lib/module/utils/get-icon-by-property/index.js.map +1 -1
- package/lib/typescript/src/@types/as-base-component.d.ts +2 -0
- package/lib/typescript/src/common/icons-svg/constants/index.d.ts +1 -0
- package/lib/typescript/src/common/icons-svg/eclamation-triangle/index.d.ts +4 -0
- package/lib/typescript/src/components/box/index.d.ts +4 -3
- package/lib/typescript/src/components/box/styles.d.ts +2 -2
- package/lib/typescript/src/components/history-activities-card/index.d.ts +76 -0
- package/lib/typescript/src/components/history-activities-card/interface.d.ts +120 -0
- package/lib/typescript/src/components/modal-change-activity/index.d.ts +24 -0
- package/lib/typescript/src/helpers/text-utils.d.ts +7 -0
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/stories/box/box.stories.d.ts +1 -1
- package/lib/typescript/src/stories/history-activities-card/history-activities-card.stories.d.ts +10 -0
- package/lib/typescript/src/stories/modal-change-activity/modal-change-activity.stories.d.ts +9 -0
- package/lib/typescript/src/utils/get-icon-by-property/index.d.ts +2 -1
- package/package.json +11 -8
- package/src/@types/as-base-component.ts +9 -0
- package/src/common/icons-svg/constants/index.ts +1 -0
- package/src/common/icons-svg/eclamation-triangle/index.tsx +46 -0
- package/src/common/icons-svg/index.tsx +5 -1
- package/src/common/icons-svg/truck/index.tsx +2 -2
- package/src/components/activities-daily/index.tsx +116 -116
- package/src/components/activities-progress/index.tsx +170 -170
- package/src/components/avatar-profile/index.tsx +1 -1
- package/src/components/box/index.tsx +28 -22
- package/src/components/box/interface.d.ts +2 -2
- package/src/components/box/styles.ts +2 -2
- package/src/components/card-history/index.tsx +221 -221
- package/src/components/card-hours/index.tsx +2 -1
- package/src/components/card-loading/index.tsx +1 -1
- package/src/components/card-scheduled-journey/index.tsx +1 -1
- package/src/components/card-work-session/index.tsx +1 -1
- package/src/components/check-box/index.tsx +1 -1
- package/src/components/coil/index.tsx +1 -1
- package/src/components/filter-date-selector/index.tsx +1 -1
- package/src/components/header-profile/index.tsx +1 -1
- package/src/components/history-activities-card/index.tsx +217 -0
- package/src/components/history-activities-card/interface.ts +147 -0
- package/src/components/history-details/index.tsx +1 -1
- package/src/components/image-capture-with-remove/index.tsx +1 -1
- package/src/components/input/index.tsx +1 -1
- package/src/components/loading-details/index.tsx +156 -156
- package/src/components/loading-progress/index.tsx +1 -1
- package/src/components/menu-item/index.tsx +1 -1
- package/src/components/modal-activities/index.tsx +1 -1
- package/src/components/modal-change-activity/index.tsx +200 -0
- package/src/components/no-data/index.tsx +1 -1
- package/src/components/notification-loading/index.tsx +157 -157
- package/src/components/profile-menu-option/index.tsx +1 -1
- package/src/components/scheduled-journey-indicators/index.tsx +1 -1
- package/src/components/selects/select-option/index.tsx +115 -100
- package/src/components/selects/select-option/interface.d.ts +18 -18
- package/src/components/step-indicator/index.tsx +63 -7
- package/src/components/user-profile/index.tsx +1 -1
- package/src/helpers/text-utils.ts +15 -0
- package/src/index.ts +3 -1
- package/src/stories/box/box.stories.tsx +1 -1
- package/src/stories/history-activities-card/history-activities-card.stories.tsx +107 -0
- package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +51 -0
- package/src/utils/get-icon-by-property/index.tsx +13 -1
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { TouchableOpacity } from "react-native";
|
|
6
|
-
|
|
7
|
-
// components
|
|
8
|
-
import
|
|
9
|
-
import { Typography } from "../typography";
|
|
10
|
-
|
|
11
|
-
// icons
|
|
12
|
-
import { Icons } from "../../common/icons-svg";
|
|
13
|
-
|
|
14
|
-
// theme
|
|
15
|
-
import { theme } from "../../styles/theme/theme";
|
|
16
|
-
|
|
17
|
-
import { INotificationLoading } from "./interface";
|
|
18
|
-
import { getStatusColor, StatusType } from "../../utils/status-color/return-color";
|
|
19
|
-
|
|
20
|
-
const NotificationLoading: React.FC<INotificationLoading> = ({
|
|
21
|
-
handleNavigation,
|
|
22
|
-
title,
|
|
23
|
-
testID,
|
|
24
|
-
statusNotify,
|
|
25
|
-
date,
|
|
26
|
-
notification,
|
|
27
|
-
dataStart,
|
|
28
|
-
style,
|
|
29
|
-
readonly,
|
|
30
|
-
}) => {
|
|
31
|
-
return (
|
|
32
|
-
<TouchableOpacity activeOpacity={0.7} testID={testID} onPress={handleNavigation}>
|
|
33
|
-
<Box
|
|
34
|
-
width={"100%"}
|
|
35
|
-
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
36
|
-
backgroundColor={readonly ? theme.colors.blue[40050] : theme.colors.blue[400]}
|
|
37
|
-
borderStyled={{
|
|
38
|
-
borderWidth: theme.borderWidths.thin,
|
|
39
|
-
borderRadius: theme.borderWidths.thick_medium,
|
|
40
|
-
borderColor: readonly ? theme.colors.blue[40050] : theme.colors.blue[400],
|
|
41
|
-
}}
|
|
42
|
-
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
43
|
-
style={style}
|
|
44
|
-
>
|
|
45
|
-
<Box width={"9%"}>
|
|
46
|
-
<Icons icon={"BELL"} size={32} color={theme.colors.neutral[25]} />
|
|
47
|
-
</Box>
|
|
48
|
-
|
|
49
|
-
<Box
|
|
50
|
-
flexStyle={{ flexDirection: "column" }}
|
|
51
|
-
width={"91%"}
|
|
52
|
-
paddingStyle={{ paddingLeft: 7 }}
|
|
53
|
-
>
|
|
54
|
-
{/* Carregamento identificação */}
|
|
55
|
-
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
56
|
-
<Typography
|
|
57
|
-
text={"Carregamento - "}
|
|
58
|
-
size={theme.fontSizes.sm}
|
|
59
|
-
lineHeight={theme.fontSizes.lg}
|
|
60
|
-
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
61
|
-
fontWeight="600"
|
|
62
|
-
color={theme.colors.neutral[25]}
|
|
63
|
-
letterSpacing={"regular"}
|
|
64
|
-
/>
|
|
65
|
-
<Typography
|
|
66
|
-
text={title}
|
|
67
|
-
size={theme.fontSizes.xs}
|
|
68
|
-
lineHeight={theme.fontSizes.md}
|
|
69
|
-
fontFamily={theme.fonts.inter_bold_700}
|
|
70
|
-
fontWeight="700"
|
|
71
|
-
color={theme.colors.neutral[25]}
|
|
72
|
-
letterSpacing={"regular"}
|
|
73
|
-
/>
|
|
74
|
-
</Box>
|
|
75
|
-
|
|
76
|
-
{/* Data do carregamento */}
|
|
77
|
-
<Box
|
|
78
|
-
flexStyle={{
|
|
79
|
-
flexDirection: "row",
|
|
80
|
-
alignItems: "center",
|
|
81
|
-
justifyContent: "space-between",
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
<Box
|
|
85
|
-
flexStyle={{
|
|
86
|
-
flexDirection: "row",
|
|
87
|
-
alignItems: "center",
|
|
88
|
-
}}
|
|
89
|
-
>
|
|
90
|
-
<Typography
|
|
91
|
-
text={"Data - "}
|
|
92
|
-
size={theme.fontSizes.sm}
|
|
93
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
94
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
95
|
-
fontWeight="500"
|
|
96
|
-
color={theme.colors.neutral[25]}
|
|
97
|
-
letterSpacing={"regular"}
|
|
98
|
-
/>
|
|
99
|
-
<Typography
|
|
100
|
-
text={String(date)}
|
|
101
|
-
size={theme.fontSizes.sm}
|
|
102
|
-
lineHeight={theme.fontSizes.lg ?? 18}
|
|
103
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
104
|
-
fontWeight="500"
|
|
105
|
-
color={theme.colors.neutral[25]}
|
|
106
|
-
letterSpacing={"regular"}
|
|
107
|
-
/>
|
|
108
|
-
</Box>
|
|
109
|
-
<Box
|
|
110
|
-
flexStyle={{
|
|
111
|
-
flexDirection: "row",
|
|
112
|
-
alignItems: "center",
|
|
113
|
-
}}
|
|
114
|
-
>
|
|
115
|
-
<Typography
|
|
116
|
-
text={String(dataStart)}
|
|
117
|
-
size={theme.fontSizes["2xs"]}
|
|
118
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
119
|
-
fontWeight="500"
|
|
120
|
-
lineHeight={theme.fontSizes.sm}
|
|
121
|
-
color={theme.colors.neutral[25]}
|
|
122
|
-
letterSpacing={"regular"}
|
|
123
|
-
marginRight={8}
|
|
124
|
-
/>
|
|
125
|
-
|
|
126
|
-
<Icons
|
|
127
|
-
icon={"ELLIPSE"}
|
|
128
|
-
color={
|
|
129
|
-
readonly ? theme.colors.neutral[25] : getStatusColor(statusNotify as StatusType)
|
|
130
|
-
}
|
|
131
|
-
size={9}
|
|
132
|
-
/>
|
|
133
|
-
</Box>
|
|
134
|
-
</Box>
|
|
135
|
-
|
|
136
|
-
{/* Mensagem de notificação do carregamento */}
|
|
137
|
-
<Typography
|
|
138
|
-
text={notification}
|
|
139
|
-
size={theme.fontSizes["2xs"]}
|
|
140
|
-
fontFamily={theme.fonts.inter_medium_500}
|
|
141
|
-
fontWeight="500"
|
|
142
|
-
lineHeight={theme.fontSizes.sm ?? 14}
|
|
143
|
-
color={theme.colors.neutral[25]}
|
|
144
|
-
letterSpacing={"regular"}
|
|
145
|
-
ellipsizeMode="tail"
|
|
146
|
-
numberOfLines={1}
|
|
147
|
-
/>
|
|
148
|
-
</Box>
|
|
149
|
-
</Box>
|
|
150
|
-
</TouchableOpacity>
|
|
151
|
-
);
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* EXPORTS
|
|
156
|
-
*/
|
|
157
|
-
export { NotificationLoading };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { TouchableOpacity } from "react-native";
|
|
6
|
+
|
|
7
|
+
// components
|
|
8
|
+
import Box from "../box";
|
|
9
|
+
import { Typography } from "../typography";
|
|
10
|
+
|
|
11
|
+
// icons
|
|
12
|
+
import { Icons } from "../../common/icons-svg";
|
|
13
|
+
|
|
14
|
+
// theme
|
|
15
|
+
import { theme } from "../../styles/theme/theme";
|
|
16
|
+
|
|
17
|
+
import { INotificationLoading } from "./interface";
|
|
18
|
+
import { getStatusColor, StatusType } from "../../utils/status-color/return-color";
|
|
19
|
+
|
|
20
|
+
const NotificationLoading: React.FC<INotificationLoading> = ({
|
|
21
|
+
handleNavigation,
|
|
22
|
+
title,
|
|
23
|
+
testID,
|
|
24
|
+
statusNotify,
|
|
25
|
+
date,
|
|
26
|
+
notification,
|
|
27
|
+
dataStart,
|
|
28
|
+
style,
|
|
29
|
+
readonly,
|
|
30
|
+
}) => {
|
|
31
|
+
return (
|
|
32
|
+
<TouchableOpacity activeOpacity={0.7} testID={testID} onPress={handleNavigation}>
|
|
33
|
+
<Box
|
|
34
|
+
width={"100%"}
|
|
35
|
+
flexStyle={{ flexDirection: "row", alignItems: "center" }}
|
|
36
|
+
backgroundColor={readonly ? theme.colors.blue[40050] : theme.colors.blue[400]}
|
|
37
|
+
borderStyled={{
|
|
38
|
+
borderWidth: theme.borderWidths.thin,
|
|
39
|
+
borderRadius: theme.borderWidths.thick_medium,
|
|
40
|
+
borderColor: readonly ? theme.colors.blue[40050] : theme.colors.blue[400],
|
|
41
|
+
}}
|
|
42
|
+
paddingStyle={{ padding: theme.paddings["2xs"] }}
|
|
43
|
+
style={style}
|
|
44
|
+
>
|
|
45
|
+
<Box width={"9%"}>
|
|
46
|
+
<Icons icon={"BELL"} size={32} color={theme.colors.neutral[25]} />
|
|
47
|
+
</Box>
|
|
48
|
+
|
|
49
|
+
<Box
|
|
50
|
+
flexStyle={{ flexDirection: "column" }}
|
|
51
|
+
width={"91%"}
|
|
52
|
+
paddingStyle={{ paddingLeft: 7 }}
|
|
53
|
+
>
|
|
54
|
+
{/* Carregamento identificação */}
|
|
55
|
+
<Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
|
|
56
|
+
<Typography
|
|
57
|
+
text={"Carregamento - "}
|
|
58
|
+
size={theme.fontSizes.sm}
|
|
59
|
+
lineHeight={theme.fontSizes.lg}
|
|
60
|
+
fontFamily={theme.fonts.inter_semi_bold_600}
|
|
61
|
+
fontWeight="600"
|
|
62
|
+
color={theme.colors.neutral[25]}
|
|
63
|
+
letterSpacing={"regular"}
|
|
64
|
+
/>
|
|
65
|
+
<Typography
|
|
66
|
+
text={title}
|
|
67
|
+
size={theme.fontSizes.xs}
|
|
68
|
+
lineHeight={theme.fontSizes.md}
|
|
69
|
+
fontFamily={theme.fonts.inter_bold_700}
|
|
70
|
+
fontWeight="700"
|
|
71
|
+
color={theme.colors.neutral[25]}
|
|
72
|
+
letterSpacing={"regular"}
|
|
73
|
+
/>
|
|
74
|
+
</Box>
|
|
75
|
+
|
|
76
|
+
{/* Data do carregamento */}
|
|
77
|
+
<Box
|
|
78
|
+
flexStyle={{
|
|
79
|
+
flexDirection: "row",
|
|
80
|
+
alignItems: "center",
|
|
81
|
+
justifyContent: "space-between",
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
<Box
|
|
85
|
+
flexStyle={{
|
|
86
|
+
flexDirection: "row",
|
|
87
|
+
alignItems: "center",
|
|
88
|
+
}}
|
|
89
|
+
>
|
|
90
|
+
<Typography
|
|
91
|
+
text={"Data - "}
|
|
92
|
+
size={theme.fontSizes.sm}
|
|
93
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
94
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
95
|
+
fontWeight="500"
|
|
96
|
+
color={theme.colors.neutral[25]}
|
|
97
|
+
letterSpacing={"regular"}
|
|
98
|
+
/>
|
|
99
|
+
<Typography
|
|
100
|
+
text={String(date)}
|
|
101
|
+
size={theme.fontSizes.sm}
|
|
102
|
+
lineHeight={theme.fontSizes.lg ?? 18}
|
|
103
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
104
|
+
fontWeight="500"
|
|
105
|
+
color={theme.colors.neutral[25]}
|
|
106
|
+
letterSpacing={"regular"}
|
|
107
|
+
/>
|
|
108
|
+
</Box>
|
|
109
|
+
<Box
|
|
110
|
+
flexStyle={{
|
|
111
|
+
flexDirection: "row",
|
|
112
|
+
alignItems: "center",
|
|
113
|
+
}}
|
|
114
|
+
>
|
|
115
|
+
<Typography
|
|
116
|
+
text={String(dataStart)}
|
|
117
|
+
size={theme.fontSizes["2xs"]}
|
|
118
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
119
|
+
fontWeight="500"
|
|
120
|
+
lineHeight={theme.fontSizes.sm}
|
|
121
|
+
color={theme.colors.neutral[25]}
|
|
122
|
+
letterSpacing={"regular"}
|
|
123
|
+
marginRight={8}
|
|
124
|
+
/>
|
|
125
|
+
|
|
126
|
+
<Icons
|
|
127
|
+
icon={"ELLIPSE"}
|
|
128
|
+
color={
|
|
129
|
+
readonly ? theme.colors.neutral[25] : getStatusColor(statusNotify as StatusType)
|
|
130
|
+
}
|
|
131
|
+
size={9}
|
|
132
|
+
/>
|
|
133
|
+
</Box>
|
|
134
|
+
</Box>
|
|
135
|
+
|
|
136
|
+
{/* Mensagem de notificação do carregamento */}
|
|
137
|
+
<Typography
|
|
138
|
+
text={notification}
|
|
139
|
+
size={theme.fontSizes["2xs"]}
|
|
140
|
+
fontFamily={theme.fonts.inter_medium_500}
|
|
141
|
+
fontWeight="500"
|
|
142
|
+
lineHeight={theme.fontSizes.sm ?? 14}
|
|
143
|
+
color={theme.colors.neutral[25]}
|
|
144
|
+
letterSpacing={"regular"}
|
|
145
|
+
ellipsizeMode="tail"
|
|
146
|
+
numberOfLines={1}
|
|
147
|
+
/>
|
|
148
|
+
</Box>
|
|
149
|
+
</Box>
|
|
150
|
+
</TouchableOpacity>
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* EXPORTS
|
|
156
|
+
*/
|
|
157
|
+
export { NotificationLoading };
|
|
@@ -1,100 +1,115 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { useState } from "react";
|
|
6
|
-
import { View, Text, TouchableOpacity, Modal, FlatList } from "react-native";
|
|
7
|
-
|
|
8
|
-
// typings
|
|
9
|
-
import { ISelectDropDownProps } from "./interface";
|
|
10
|
-
|
|
11
|
-
// styles
|
|
12
|
-
import { styles } from "./styles";
|
|
13
|
-
import { Icons } from "../../../common/icons-svg";
|
|
14
|
-
import { theme } from "../../../styles/theme/theme";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Componente SelectOption para a interação da ui.
|
|
18
|
-
*/
|
|
19
|
-
const SelectOption: React.FC<ISelectDropDownProps> = ({
|
|
20
|
-
dataOption,
|
|
21
|
-
handleSelectDown,
|
|
22
|
-
titleLabel,
|
|
23
|
-
sizeTitleLabel,
|
|
24
|
-
colortitleLabel,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
{
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
)}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { View, Text, TouchableOpacity, Modal, FlatList } from "react-native";
|
|
7
|
+
|
|
8
|
+
// typings
|
|
9
|
+
import { ISelectDropDownProps } from "./interface";
|
|
10
|
+
|
|
11
|
+
// styles
|
|
12
|
+
import { styles } from "./styles";
|
|
13
|
+
import { Icons } from "../../../common/icons-svg";
|
|
14
|
+
import { theme } from "../../../styles/theme/theme";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Componente SelectOption para a interação da ui.
|
|
18
|
+
*/
|
|
19
|
+
const SelectOption: React.FC<ISelectDropDownProps> = ({
|
|
20
|
+
dataOption,
|
|
21
|
+
handleSelectDown,
|
|
22
|
+
titleLabel,
|
|
23
|
+
sizeTitleLabel,
|
|
24
|
+
colortitleLabel,
|
|
25
|
+
backgroundColor,
|
|
26
|
+
}: ISelectDropDownProps) => {
|
|
27
|
+
const [selectedValue, setSelectedValue] = useState(dataOption[0]?.value || "");
|
|
28
|
+
const [modalVisible, setModalVisible] = useState(false);
|
|
29
|
+
|
|
30
|
+
const handleSelect = (value: string) => {
|
|
31
|
+
setSelectedValue(value);
|
|
32
|
+
setModalVisible(false);
|
|
33
|
+
handleSelectDown(value);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const styleProps = {
|
|
37
|
+
dataOption,
|
|
38
|
+
handleSelectDown,
|
|
39
|
+
titleLabel,
|
|
40
|
+
sizeTitleLabel,
|
|
41
|
+
colortitleLabel,
|
|
42
|
+
backgroundColor,
|
|
43
|
+
} as ISelectDropDownProps;
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<View style={styles(styleProps).container}>
|
|
47
|
+
{/* Titulo para exibir o label */}
|
|
48
|
+
<Text style={styles(styleProps).label}>{`${titleLabel ?? "Selecione uma opção"}`}:</Text>
|
|
49
|
+
|
|
50
|
+
{/* Botão para abrir o modal */}
|
|
51
|
+
<TouchableOpacity
|
|
52
|
+
testID="select-box"
|
|
53
|
+
style={[styles(styleProps).selectBox, backgroundColor && { backgroundColor },]}
|
|
54
|
+
onPress={() => setModalVisible(true)}
|
|
55
|
+
>
|
|
56
|
+
<Text style={styles(styleProps).selectedText}>
|
|
57
|
+
{dataOption.find((item) => item.value === selectedValue)?.label}
|
|
58
|
+
</Text>
|
|
59
|
+
|
|
60
|
+
<Icons
|
|
61
|
+
size={theme.fontSizes["md"]}
|
|
62
|
+
color={theme.colors.blue[500]}
|
|
63
|
+
icon={"ARROW_DROP_DOWN"}
|
|
64
|
+
/>
|
|
65
|
+
</TouchableOpacity>
|
|
66
|
+
|
|
67
|
+
{/* Modal para exibir as opções */}
|
|
68
|
+
<Modal testID="modal-container" visible={modalVisible} transparent animationType="fade">
|
|
69
|
+
<View style={styles(styleProps).modalOverlay}>
|
|
70
|
+
<View style={{
|
|
71
|
+
width: "90%",
|
|
72
|
+
backgroundColor: "#fff",
|
|
73
|
+
borderRadius: 8,
|
|
74
|
+
padding: 16,
|
|
75
|
+
maxHeight: "80%",
|
|
76
|
+
}}>
|
|
77
|
+
<View style={{ width: "100%", alignItems: "flex-end" }}>
|
|
78
|
+
<TouchableOpacity testID="close-icon" onPress={() => setModalVisible(false)}>
|
|
79
|
+
<Icons
|
|
80
|
+
size={theme.fontSizes["md"]}
|
|
81
|
+
color={theme.colors.blue[500]}
|
|
82
|
+
icon={"CLOSED"}
|
|
83
|
+
/>
|
|
84
|
+
</TouchableOpacity>
|
|
85
|
+
</View>
|
|
86
|
+
<FlatList
|
|
87
|
+
data={dataOption || []}
|
|
88
|
+
keyExtractor={(item) => item.value}
|
|
89
|
+
renderItem={({ item }) => (
|
|
90
|
+
<TouchableOpacity
|
|
91
|
+
style={{
|
|
92
|
+
width: "100%",
|
|
93
|
+
paddingVertical: 12,
|
|
94
|
+
paddingHorizontal: 8,
|
|
95
|
+
alignItems: "flex-start",
|
|
96
|
+
borderBottomWidth: 1,
|
|
97
|
+
borderColor: "#eee",
|
|
98
|
+
}}
|
|
99
|
+
onPress={() => handleSelect(item.value)}
|
|
100
|
+
>
|
|
101
|
+
<Text style={styles(styleProps).optionText}>{item.label}</Text>
|
|
102
|
+
</TouchableOpacity>
|
|
103
|
+
)}
|
|
104
|
+
/>
|
|
105
|
+
</View>
|
|
106
|
+
</View>
|
|
107
|
+
</Modal>
|
|
108
|
+
</View>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* EXPORTS
|
|
114
|
+
*/
|
|
115
|
+
export { SelectOption };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
type ISelectDropDownProps = {
|
|
5
|
-
dataOption: any[];
|
|
6
|
-
titleLabel: string;
|
|
7
|
-
sizeTitleLabel?: number;
|
|
8
|
-
colortitleLabel?: string;
|
|
9
|
-
|
|
10
|
-
/**retorna o valor selecionado */
|
|
11
|
-
// eslint-disable-next-line no-unused-vars
|
|
12
|
-
handleSelectDown: (value: string) => void;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* EXPORTS
|
|
17
|
-
*/
|
|
18
|
-
export { ISelectDropDownProps };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
type ISelectDropDownProps = {
|
|
5
|
+
dataOption: any[];
|
|
6
|
+
titleLabel: string;
|
|
7
|
+
sizeTitleLabel?: number;
|
|
8
|
+
colortitleLabel?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
10
|
+
/**retorna o valor selecionado */
|
|
11
|
+
// eslint-disable-next-line no-unused-vars
|
|
12
|
+
handleSelectDown: (value: string) => void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* EXPORTS
|
|
17
|
+
*/
|
|
18
|
+
export { ISelectDropDownProps };
|