jornada-ui 0.4.4 → 0.4.6

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 (122) hide show
  1. package/lib/commonjs/components/capture-photo/index.js +4 -4
  2. package/lib/commonjs/components/card-report/index.js +139 -127
  3. package/lib/commonjs/components/card-report/index.js.map +1 -1
  4. package/lib/commonjs/components/card-with-draw-coil/index.js +5 -5
  5. package/lib/commonjs/components/card-with-draw-coil/index.js.map +1 -1
  6. package/lib/commonjs/components/coil-removel-code/index.js +5 -5
  7. package/lib/commonjs/components/coil-removel-code/index.js.map +1 -1
  8. package/lib/commonjs/components/history-activities-card/index.js +15 -18
  9. package/lib/commonjs/components/history-activities-card/index.js.map +1 -1
  10. package/lib/commonjs/components/resume-raking/index.js +79 -0
  11. package/lib/commonjs/components/resume-raking/index.js.map +1 -0
  12. package/lib/commonjs/components/resume-raking/interface.js +2 -0
  13. package/lib/commonjs/components/resume-raking/interface.js.map +1 -0
  14. package/lib/commonjs/components/resume-raking/styles.js +2 -0
  15. package/lib/commonjs/components/resume-raking/styles.js.map +1 -0
  16. package/lib/commonjs/components/travel-history/index.js +248 -237
  17. package/lib/commonjs/components/travel-history/index.js.map +1 -1
  18. package/lib/commonjs/components/user-profile/index.js +1 -1
  19. package/lib/commonjs/components/user-profile/index.js.map +1 -1
  20. package/lib/commonjs/components/weekly-table/helpers/calcular-total-horas.js +48 -10
  21. package/lib/commonjs/components/weekly-table/helpers/calcular-total-horas.js.map +1 -1
  22. package/lib/commonjs/components/weekly-table/index.js +9 -10
  23. package/lib/commonjs/components/weekly-table/index.js.map +1 -1
  24. package/lib/commonjs/index.js +11 -4
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/styles/theme/theme.js +1 -0
  27. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  28. package/lib/module/components/capture-photo/index.js +4 -4
  29. package/lib/module/components/card-report/index.js +139 -127
  30. package/lib/module/components/card-report/index.js.map +1 -1
  31. package/lib/module/components/card-with-draw-coil/index.js +5 -5
  32. package/lib/module/components/card-with-draw-coil/index.js.map +1 -1
  33. package/lib/module/components/coil-removel-code/index.js +5 -5
  34. package/lib/module/components/coil-removel-code/index.js.map +1 -1
  35. package/lib/module/components/history-activities-card/index.js +13 -16
  36. package/lib/module/components/history-activities-card/index.js.map +1 -1
  37. package/lib/module/components/resume-raking/index.js +72 -0
  38. package/lib/module/components/resume-raking/index.js.map +1 -0
  39. package/lib/module/components/resume-raking/interface.js +2 -0
  40. package/lib/module/components/resume-raking/interface.js.map +1 -0
  41. package/lib/module/components/resume-raking/styles.js +2 -0
  42. package/lib/module/components/resume-raking/styles.js.map +1 -0
  43. package/lib/module/components/travel-history/index.js +248 -237
  44. package/lib/module/components/travel-history/index.js.map +1 -1
  45. package/lib/module/components/user-profile/index.js +1 -1
  46. package/lib/module/components/user-profile/index.js.map +1 -1
  47. package/lib/module/components/weekly-table/helpers/calcular-total-horas.js +46 -9
  48. package/lib/module/components/weekly-table/helpers/calcular-total-horas.js.map +1 -1
  49. package/lib/module/components/weekly-table/index.js +10 -11
  50. package/lib/module/components/weekly-table/index.js.map +1 -1
  51. package/lib/module/index.js +1 -0
  52. package/lib/module/index.js.map +1 -1
  53. package/lib/module/styles/theme/theme.js +1 -0
  54. package/lib/module/styles/theme/theme.js.map +1 -1
  55. package/lib/typescript/commonjs/src/components/capture-photo/index.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/src/components/card-report/index.d.ts +1 -0
  57. package/lib/typescript/commonjs/src/components/card-report/index.d.ts.map +1 -1
  58. package/lib/typescript/commonjs/src/components/card-with-draw-coil/index.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/src/components/history-activities-card/index.d.ts +1 -0
  60. package/lib/typescript/commonjs/src/components/history-activities-card/index.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/src/components/history-activities-card/interface.d.ts +2 -0
  62. package/lib/typescript/commonjs/src/components/history-activities-card/interface.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts +8 -0
  64. package/lib/typescript/commonjs/src/components/resume-raking/index.d.ts.map +1 -0
  65. package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts +13 -0
  66. package/lib/typescript/commonjs/src/components/resume-raking/interface.d.ts.map +1 -0
  67. package/lib/typescript/commonjs/src/components/resume-raking/styles.d.ts +1 -0
  68. package/lib/typescript/commonjs/src/components/resume-raking/styles.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/src/components/travel-history/index.d.ts +1 -0
  70. package/lib/typescript/commonjs/src/components/travel-history/index.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/components/weekly-table/helpers/calcular-total-horas.d.ts +2 -1
  72. package/lib/typescript/commonjs/src/components/weekly-table/helpers/calcular-total-horas.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/components/weekly-table/index.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/src/index.d.ts +1 -0
  75. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
  77. package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
  79. package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
  80. package/lib/typescript/module/src/components/capture-photo/index.d.ts.map +1 -1
  81. package/lib/typescript/module/src/components/card-report/index.d.ts +1 -0
  82. package/lib/typescript/module/src/components/card-report/index.d.ts.map +1 -1
  83. package/lib/typescript/module/src/components/card-with-draw-coil/index.d.ts.map +1 -1
  84. package/lib/typescript/module/src/components/history-activities-card/index.d.ts +1 -0
  85. package/lib/typescript/module/src/components/history-activities-card/index.d.ts.map +1 -1
  86. package/lib/typescript/module/src/components/history-activities-card/interface.d.ts +2 -0
  87. package/lib/typescript/module/src/components/history-activities-card/interface.d.ts.map +1 -1
  88. package/lib/typescript/module/src/components/resume-raking/index.d.ts +8 -0
  89. package/lib/typescript/module/src/components/resume-raking/index.d.ts.map +1 -0
  90. package/lib/typescript/module/src/components/resume-raking/interface.d.ts +13 -0
  91. package/lib/typescript/module/src/components/resume-raking/interface.d.ts.map +1 -0
  92. package/lib/typescript/module/src/components/resume-raking/styles.d.ts +1 -0
  93. package/lib/typescript/module/src/components/resume-raking/styles.d.ts.map +1 -0
  94. package/lib/typescript/module/src/components/travel-history/index.d.ts +1 -0
  95. package/lib/typescript/module/src/components/travel-history/index.d.ts.map +1 -1
  96. package/lib/typescript/module/src/components/weekly-table/helpers/calcular-total-horas.d.ts +2 -1
  97. package/lib/typescript/module/src/components/weekly-table/helpers/calcular-total-horas.d.ts.map +1 -1
  98. package/lib/typescript/module/src/components/weekly-table/index.d.ts.map +1 -1
  99. package/lib/typescript/module/src/index.d.ts +1 -0
  100. package/lib/typescript/module/src/index.d.ts.map +1 -1
  101. package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
  102. package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
  103. package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
  104. package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
  105. package/package.json +1 -1
  106. package/src/components/capture-photo/index.tsx +133 -133
  107. package/src/components/card-report/index.tsx +175 -168
  108. package/src/components/card-report/interface.d.ts +140 -136
  109. package/src/components/card-with-draw-coil/index.tsx +165 -165
  110. package/src/components/coil-removel-code/index.tsx +50 -50
  111. package/src/components/history-activities-card/index.tsx +211 -209
  112. package/src/components/history-activities-card/interface.ts +147 -145
  113. package/src/components/resume-raking/index.tsx +75 -0
  114. package/src/components/resume-raking/interface.ts +14 -0
  115. package/src/components/resume-raking/styles.ts +0 -0
  116. package/src/components/travel-history/index.tsx +330 -314
  117. package/src/components/travel-history/interface.d.ts +153 -149
  118. package/src/components/user-profile/index.tsx +1 -1
  119. package/src/components/weekly-table/helpers/calcular-total-horas.ts +89 -50
  120. package/src/components/weekly-table/index.tsx +138 -142
  121. package/src/index.tsx +1 -0
  122. package/src/styles/theme/theme.ts +1 -0
@@ -1,209 +1,211 @@
1
- /**
2
- * IMPORTS
3
- */
4
- import React, { forwardRef } from "react";
5
- import { Image } from "react-native";
6
-
7
- // components
8
- import Box from "../box";
9
- import Typography from "../typography";
10
-
11
- //commons/ icons
12
- import { Icons } from "../../common/icons-svg";
13
- import { IMAGES } from "../../common/constants";
14
-
15
- // typings
16
- import type { ICardActivitiesWeek } from "./interface";
17
- import { asBaseComponent } from "../../@types/as-base-component";
18
-
19
- // styles
20
- import { theme } from "../../styles/theme/theme";
21
-
22
- const HistoryActivitiesCard = forwardRef<any, ICardActivitiesWeek>(
23
- (props, ref): React.ReactElement => {
24
- const {
25
- testID,
26
- backgroundColor,
27
- idAtividade,
28
- name_activitie,
29
- type_activitie,
30
- data_start,
31
- data_end,
32
- duration,
33
- avatar,
34
- } = props;
35
- return (
36
- <Box
37
- ref={ref}
38
- testID={testID}
39
- width={"100%"}
40
- backgroundColor={theme.colors.neutral[25]}
41
- borderStyled={{
42
- borderRadius: theme.borderWidths.thick_medium,
43
- }}
44
- marginStyle={{
45
- marginBottom: theme.margins["2xs"],
46
- }}
47
- >
48
- <Box
49
- width={"100%"}
50
- height={30}
51
- backgroundColor={backgroundColor ?? theme.colors.green[400]}
52
- borderStyled={{
53
- borderTopLeftRadius: theme.borderWidths.thin_bold,
54
- borderTopRightRadius: theme.borderWidths.thin_bold,
55
- borderColor: theme.colors.blue[400],
56
- }}
57
- flexStyle={{
58
- justifyContent: "center",
59
- }}
60
- >
61
- <Typography
62
- text={`ATIVIDADE ${!data_end ? "EM ANDAMENTO" : ""} #${idAtividade}`}
63
- color={theme.colors.neutral[25]}
64
- size={theme.fontSizes.sm}
65
- fontFamily={theme.fonts.inter_semi_bold_600}
66
- fontWeight={"500"}
67
- lineHeight={theme.fontSizes.lg}
68
- marginLeft={theme.margins["2xs"]}
69
- />
70
- </Box>
71
- <Box
72
- width={"100%"}
73
- flexStyle={{
74
- flexDirection: "row",
75
- justifyContent: "space-between",
76
- }}
77
- paddingStyle={{
78
- padding: theme.paddings["2xs"],
79
- }}
80
- >
81
- <Box width={"100%"}>
82
- <Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
83
- <Image
84
- style={{
85
- width: 45,
86
- height: 45,
87
- borderRadius: 10,
88
- marginRight: 10,
89
- }}
90
- source={{ uri: avatar ?? IMAGES.IMAGE_ANONIMA }}
91
- />
92
-
93
- <Box width={"100%"}>
94
- <Box
95
- width={"84%"}
96
- flexStyle={{
97
- flexDirection: "row",
98
- flexWrap: "wrap",
99
- }}
100
- >
101
- <Typography
102
- style={{ flexShrink: 1 }}
103
- text={`Início: `}
104
- size={theme.fontSizes.xs}
105
- color={theme.colors.black[10]}
106
- fontFamily={theme.fonts.inter_medium_500}
107
- />
108
- <Typography
109
- text={`${data_start} ás ${data_end ?? "00/00/0000 00:00"}`}
110
- size={11}
111
- color={theme.colors.black[180]}
112
- fontFamily={theme.fonts.inter_regular_400}
113
- />
114
- </Box>
115
-
116
- <Box
117
- flexStyle={{
118
- flexDirection: "row",
119
- justifyContent: "space-between",
120
- }}
121
- width={"84%"}
122
- >
123
- <Box flexStyle={{ flexDirection: "row" }}>
124
- <Typography
125
- text={`Duração: `}
126
- size={theme.fontSizes.xs}
127
- color={theme.colors.black[10]}
128
- fontFamily={theme.fonts.inter_medium_500}
129
- />
130
-
131
- <Typography
132
- text={`${duration ?? "00:00"}`}
133
- size={theme.fontSizes.xs}
134
- color={theme.colors.black[180]}
135
- fontFamily={theme.fonts.inter_light_300}
136
- />
137
- </Box>
138
- <Icons icon={"TRUCK_ACTIVITY"} color={backgroundColor} size={24} />
139
- </Box>
140
- </Box>
141
- </Box>
142
- </Box>
143
- </Box>
144
-
145
- <Box
146
- width={"100%"}
147
- flexStyle={{
148
- flexDirection: "row",
149
- justifyContent: "space-between",
150
- alignItems: "center",
151
- }}
152
- paddingStyle={{
153
- padding: theme.paddings["2xs"],
154
- }}
155
- borderStyled={{
156
- borderTopWidth: theme.borderWidths.thin_medium,
157
- borderTopColor: theme.colors.neutral[200],
158
- }}
159
- >
160
- <Box marginStyle={{ marginRight: 2 }}>
161
- <Typography
162
- text={`Atividade:`}
163
- size={theme.fontSizes.xs}
164
- color={theme.colors.black[180]}
165
- fontFamily={theme.fonts.inter_regular_400}
166
- />
167
-
168
- <Typography
169
- text={`${name_activitie ?? "Sem informação"}`}
170
- size={theme.fontSizes.sm}
171
- color={theme.colors.black[100]}
172
- fontFamily={theme.fonts.inter_semi_bold_600}
173
- />
174
- </Box>
175
-
176
- <Box
177
- flexStyle={{
178
- flexDirection: "column",
179
- alignItems: "flex-end",
180
- justifyContent: "center",
181
- }}
182
- >
183
- <Typography
184
- text={`Tipo atividade: `}
185
- size={theme.fontSizes.xs}
186
- color={theme.colors.black[180]}
187
- fontFamily={theme.fonts.inter_light_300}
188
- />
189
-
190
- <Typography
191
- text={`${type_activitie}`}
192
- size={theme.fontSizes.sm}
193
- color={theme.colors.black[100]}
194
- fontFamily={theme.fonts.inter_semi_bold_600}
195
- marginLeft={4}
196
- />
197
- </Box>
198
- </Box>
199
- </Box>
200
- );
201
- }
202
- );
203
-
204
- HistoryActivitiesCard.displayName = "HistoryActivitiesCard";
205
-
206
- /**
207
- * Componente Box para a interação da ui.
208
- */
209
- export default asBaseComponent(HistoryActivitiesCard);
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React, { forwardRef } from "react";
5
+ import { Image } from "react-native";
6
+
7
+ // components
8
+ import Box from "../box";
9
+ import Typography from "../typography";
10
+
11
+ //commons/ icons
12
+ import { IMAGES } from "../../common/constants";
13
+
14
+ // typings
15
+ import type { ICardActivitiesWeek } from "./interface";
16
+ import { asBaseComponent } from "../../@types/as-base-component";
17
+
18
+ // styles
19
+ import { theme } from "../../styles/theme/theme";
20
+ import { getIconByProperty } from "../../utils/get-icon-by-property";
21
+
22
+ const HistoryActivitiesCard = forwardRef<any, ICardActivitiesWeek>(
23
+ (props, ref): React.ReactElement => {
24
+ const {
25
+ testID,
26
+ backgroundColor,
27
+ idAtividade,
28
+ name_activitie,
29
+ referencia,
30
+ type_activitie,
31
+ data_start,
32
+ data_end,
33
+ duration,
34
+ avatar,
35
+ } = props;
36
+ return (
37
+ <Box
38
+ ref={ref}
39
+ testID={testID}
40
+ width={"100%"}
41
+ backgroundColor={theme.colors.neutral[25]}
42
+ borderStyled={{
43
+ borderRadius: theme.borderWidths.thick_medium,
44
+ }}
45
+ marginStyle={{
46
+ marginBottom: theme.margins["2xs"],
47
+ }}
48
+ >
49
+ <Box
50
+ width={"100%"}
51
+ height={30}
52
+ backgroundColor={backgroundColor ?? theme.colors.green[400]}
53
+ borderStyled={{
54
+ borderTopLeftRadius: theme.borderWidths.thin_bold,
55
+ borderTopRightRadius: theme.borderWidths.thin_bold,
56
+ borderColor: theme.colors.blue[400],
57
+ }}
58
+ flexStyle={{
59
+ justifyContent: "center",
60
+ }}
61
+ >
62
+ <Typography
63
+ text={`ATIVIDADE ${!data_end ? "EM ANDAMENTO" : ""} #${idAtividade}`}
64
+ color={theme.colors.neutral[25]}
65
+ size={theme.fontSizes.xs}
66
+ fontFamily={theme.fonts.inter_semi_bold_600}
67
+ fontWeight={"500"}
68
+ lineHeight={theme.fontSizes.lg}
69
+ marginLeft={theme.margins["2xs"]}
70
+ />
71
+ </Box>
72
+ <Box
73
+ width={"100%"}
74
+ flexStyle={{
75
+ flexDirection: "row",
76
+ justifyContent: "space-between",
77
+ }}
78
+ paddingStyle={{
79
+ padding: theme.paddings["2xs"],
80
+ }}
81
+ >
82
+ <Box width={"100%"}>
83
+ <Box flexStyle={{ flexDirection: "row", alignItems: "center" }}>
84
+ <Image
85
+ style={{
86
+ width: 45,
87
+ height: 45,
88
+ borderRadius: 10,
89
+ marginRight: 10,
90
+ }}
91
+ source={{ uri: avatar ?? IMAGES.IMAGE_ANONIMA }}
92
+ />
93
+
94
+ <Box width={"100%"}>
95
+ <Box
96
+ width={"84%"}
97
+ flexStyle={{
98
+ flexDirection: "row",
99
+ flexWrap: "wrap",
100
+ }}
101
+ >
102
+ <Typography
103
+ style={{ flexShrink: 1 }}
104
+ text={`Início: `}
105
+ size={theme.fontSizes.xs}
106
+ color={theme.colors.black[10]}
107
+ fontFamily={theme.fonts.inter_semi_bold_600}
108
+ />
109
+ <Typography
110
+ text={`${data_start} ás ${data_end ?? "00/00/0000 00:00"}`}
111
+ size={11}
112
+ color={theme.colors.black[180]}
113
+ fontFamily={theme.fonts.inter_regular_400}
114
+ />
115
+ </Box>
116
+
117
+ <Box
118
+ flexStyle={{
119
+ flexDirection: "row",
120
+ justifyContent: "space-between",
121
+ }}
122
+ width={"84%"}
123
+ >
124
+ <Box flexStyle={{ flexDirection: "row" }}>
125
+ <Typography
126
+ text={`Duração: `}
127
+ size={theme.fontSizes.xs}
128
+ color={theme.colors.black[10]}
129
+ fontFamily={theme.fonts.inter_semi_bold_600}
130
+ />
131
+
132
+ <Typography
133
+ text={`${duration ?? "00:00"}`}
134
+ size={theme.fontSizes.xs}
135
+ color={theme.colors.black[180]}
136
+ fontFamily={theme.fonts.inter_light_300}
137
+ />
138
+ </Box>
139
+
140
+ {getIconByProperty(referencia, backgroundColor)}
141
+ </Box>
142
+ </Box>
143
+ </Box>
144
+ </Box>
145
+ </Box>
146
+
147
+ <Box
148
+ width={"100%"}
149
+ flexStyle={{
150
+ flexDirection: "row",
151
+ justifyContent: "space-between",
152
+ alignItems: "center",
153
+ }}
154
+ paddingStyle={{
155
+ padding: theme.paddings["2xs"],
156
+ }}
157
+ borderStyled={{
158
+ borderTopWidth: theme.borderWidths.thin_medium,
159
+ borderTopColor: theme.colors.neutral[200],
160
+ }}
161
+ >
162
+ <Box marginStyle={{ marginRight: 2 }}>
163
+ <Typography
164
+ text={`Atividade:`}
165
+ size={theme.fontSizes.xs}
166
+ color={theme.colors.gray[700]}
167
+ fontFamily={theme.fonts.inter_regular_400}
168
+ />
169
+
170
+ <Typography
171
+ text={`${name_activitie ?? "Sem informação"}`}
172
+ size={theme.fontSizes.sm}
173
+ color={theme.colors.black[100]}
174
+ fontFamily={theme.fonts.inter_semi_bold_600}
175
+ />
176
+ </Box>
177
+
178
+ <Box
179
+ flexStyle={{
180
+ flexDirection: "column",
181
+ alignItems: "flex-end",
182
+ justifyContent: "center",
183
+ }}
184
+ >
185
+ <Typography
186
+ text={`Tipo atividade: `}
187
+ size={theme.fontSizes.xs}
188
+ color={theme.colors.gray[700]}
189
+ fontFamily={theme.fonts.inter_regular_400}
190
+ />
191
+
192
+ <Typography
193
+ text={`${type_activitie}`}
194
+ size={theme.fontSizes.sm}
195
+ color={theme.colors.black[100]}
196
+ fontFamily={theme.fonts.inter_semi_bold_600}
197
+ marginLeft={4}
198
+ />
199
+ </Box>
200
+ </Box>
201
+ </Box>
202
+ );
203
+ }
204
+ );
205
+
206
+ HistoryActivitiesCard.displayName = "HistoryActivitiesCard";
207
+
208
+ /**
209
+ * Componente Box para a interação da ui.
210
+ */
211
+ export default asBaseComponent(HistoryActivitiesCard);