react-native-exp-fig 0.1.26 → 0.1.28

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 (221) hide show
  1. package/lib/commonjs/components/activity-timeline/components/activite-row/index.js +130 -0
  2. package/lib/commonjs/components/activity-timeline/components/activite-row/index.js.map +1 -0
  3. package/lib/commonjs/components/activity-timeline/index.js +78 -0
  4. package/lib/commonjs/components/activity-timeline/index.js.map +1 -0
  5. package/lib/commonjs/components/activity-timeline/interface.js +6 -0
  6. package/lib/commonjs/components/activity-timeline/interface.js.map +1 -0
  7. package/lib/commonjs/components/activity-timeline/styles.js +84 -0
  8. package/lib/commonjs/components/activity-timeline/styles.js.map +1 -0
  9. package/lib/commonjs/components/input-text-counter/index.js +66 -0
  10. package/lib/commonjs/components/input-text-counter/index.js.map +1 -0
  11. package/lib/commonjs/components/input-text-counter/interface.d.js.map +1 -0
  12. package/lib/commonjs/components/input-text-counter/styles.js +42 -0
  13. package/lib/commonjs/components/input-text-counter/styles.js.map +1 -0
  14. package/lib/commonjs/components/modal-create-activitie/index.js +202 -0
  15. package/lib/commonjs/components/modal-create-activitie/index.js.map +1 -0
  16. package/lib/commonjs/components/modal-create-activitie/interface.js +2 -0
  17. package/lib/commonjs/components/modal-create-activitie/interface.js.map +1 -0
  18. package/lib/commonjs/components/modal-create-activitie/styles.js +42 -0
  19. package/lib/commonjs/components/modal-create-activitie/styles.js.map +1 -0
  20. package/lib/commonjs/components/modal-journey-rectification/index.js +202 -0
  21. package/lib/commonjs/components/modal-journey-rectification/index.js.map +1 -0
  22. package/lib/commonjs/components/modal-journey-rectification/interface.d.js +2 -0
  23. package/lib/commonjs/components/modal-journey-rectification/interface.d.js.map +1 -0
  24. package/lib/commonjs/components/modal-journey-rectification/styles.js +42 -0
  25. package/lib/commonjs/components/modal-journey-rectification/styles.js.map +1 -0
  26. package/lib/commonjs/components/{modal-activities → modals/modal-activities}/data-activities/index.js +2 -2
  27. package/lib/commonjs/components/modals/modal-activities/data-activities/index.js.map +1 -0
  28. package/lib/commonjs/components/{modal-activities → modals/modal-activities}/index.js +8 -8
  29. package/lib/commonjs/components/modals/modal-activities/index.js.map +1 -0
  30. package/lib/commonjs/components/modals/modal-activities/interface.d.js +6 -0
  31. package/lib/commonjs/components/modals/modal-activities/interface.d.js.map +1 -0
  32. package/lib/commonjs/components/modals/modal-activity-reason/index.js +161 -0
  33. package/lib/commonjs/components/modals/modal-activity-reason/index.js.map +1 -0
  34. package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js +2 -0
  35. package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js.map +1 -0
  36. package/lib/commonjs/components/{modal-change-activity → modals/modal-change-activity}/index.js +7 -7
  37. package/lib/commonjs/components/modals/modal-change-activity/index.js.map +1 -0
  38. package/lib/commonjs/components/selects/select-date-and-hours/index.js +95 -0
  39. package/lib/commonjs/components/selects/select-date-and-hours/index.js.map +1 -0
  40. package/lib/commonjs/components/selects/select-date-and-hours/interface.js +6 -0
  41. package/lib/commonjs/components/selects/select-date-and-hours/interface.js.map +1 -0
  42. package/lib/commonjs/components/selects/select-date-and-hours/styles.js +33 -0
  43. package/lib/commonjs/components/selects/select-date-and-hours/styles.js.map +1 -0
  44. package/lib/commonjs/components/selects/select-option/index.js +41 -39
  45. package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
  46. package/lib/commonjs/components/step-indicator/index.js +7 -7
  47. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  48. package/lib/commonjs/index.js +39 -4
  49. package/lib/commonjs/index.js.map +1 -1
  50. package/lib/commonjs/stories/activity-timeline/activity-timeline.stories.js +82 -0
  51. package/lib/commonjs/stories/activity-timeline/activity-timeline.stories.js.map +1 -0
  52. package/lib/commonjs/stories/input-text-counter/input-text-counter.stories.js +259 -0
  53. package/lib/commonjs/stories/input-text-counter/input-text-counter.stories.js.map +1 -0
  54. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js +1 -1
  55. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js.map +1 -1
  56. package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js +198 -0
  57. package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
  58. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +3 -3
  59. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  60. package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js +86 -0
  61. package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -0
  62. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +172 -0
  63. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
  64. package/lib/commonjs/stories/select-option/select-option.stories.js +3 -2
  65. package/lib/commonjs/stories/select-option/select-option.stories.js.map +1 -1
  66. package/lib/commonjs/styles/theme/theme.js +18 -2
  67. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  68. package/lib/commonjs/utils/options-activity/index.js +27 -0
  69. package/lib/commonjs/utils/options-activity/index.js.map +1 -0
  70. package/lib/commonjs/utils/text-limit/index.js +37 -0
  71. package/lib/commonjs/utils/text-limit/index.js.map +1 -0
  72. package/lib/module/components/activity-timeline/components/activite-row/index.js +123 -0
  73. package/lib/module/components/activity-timeline/components/activite-row/index.js.map +1 -0
  74. package/lib/module/components/activity-timeline/index.js +70 -0
  75. package/lib/module/components/activity-timeline/index.js.map +1 -0
  76. package/lib/module/components/activity-timeline/interface.js +2 -0
  77. package/lib/module/components/activity-timeline/interface.js.map +1 -0
  78. package/lib/module/components/activity-timeline/styles.js +78 -0
  79. package/lib/module/components/activity-timeline/styles.js.map +1 -0
  80. package/lib/module/components/input-text-counter/index.js +63 -0
  81. package/lib/module/components/input-text-counter/index.js.map +1 -0
  82. package/lib/module/components/input-text-counter/interface.d.js.map +1 -0
  83. package/lib/module/components/input-text-counter/styles.js +37 -0
  84. package/lib/module/components/input-text-counter/styles.js.map +1 -0
  85. package/lib/module/components/modal-create-activitie/index.js +192 -0
  86. package/lib/module/components/modal-create-activitie/index.js.map +1 -0
  87. package/lib/module/components/modal-create-activitie/interface.js +2 -0
  88. package/lib/module/components/modal-create-activitie/interface.js.map +1 -0
  89. package/lib/module/components/modal-create-activitie/styles.js +37 -0
  90. package/lib/module/components/modal-create-activitie/styles.js.map +1 -0
  91. package/lib/module/components/modal-journey-rectification/index.js +192 -0
  92. package/lib/module/components/modal-journey-rectification/index.js.map +1 -0
  93. package/lib/module/components/modal-journey-rectification/interface.d.js +2 -0
  94. package/lib/module/components/modal-journey-rectification/interface.d.js.map +1 -0
  95. package/lib/module/components/modal-journey-rectification/styles.js +37 -0
  96. package/lib/module/components/modal-journey-rectification/styles.js.map +1 -0
  97. package/lib/module/components/{modal-activities → modals/modal-activities}/data-activities/index.js +2 -2
  98. package/lib/module/components/modals/modal-activities/data-activities/index.js.map +1 -0
  99. package/lib/module/components/{modal-activities → modals/modal-activities}/index.js +8 -8
  100. package/lib/module/components/modals/modal-activities/index.js.map +1 -0
  101. package/lib/module/components/modals/modal-activities/interface.d.js +2 -0
  102. package/lib/module/components/modals/modal-activities/interface.d.js.map +1 -0
  103. package/lib/module/components/modals/modal-activity-reason/index.js +151 -0
  104. package/lib/module/components/modals/modal-activity-reason/index.js.map +1 -0
  105. package/lib/module/components/modals/modal-activity-reason/interface.d.js +2 -0
  106. package/lib/module/components/modals/modal-activity-reason/interface.d.js.map +1 -0
  107. package/lib/module/components/{modal-change-activity → modals/modal-change-activity}/index.js +6 -6
  108. package/lib/module/components/modals/modal-change-activity/index.js.map +1 -0
  109. package/lib/module/components/selects/select-date-and-hours/index.js +86 -0
  110. package/lib/module/components/selects/select-date-and-hours/index.js.map +1 -0
  111. package/lib/module/components/selects/select-date-and-hours/interface.js +2 -0
  112. package/lib/module/components/selects/select-date-and-hours/interface.js.map +1 -0
  113. package/lib/module/components/selects/select-date-and-hours/styles.js +28 -0
  114. package/lib/module/components/selects/select-date-and-hours/styles.js.map +1 -0
  115. package/lib/module/components/selects/select-option/index.js +41 -42
  116. package/lib/module/components/selects/select-option/index.js.map +1 -1
  117. package/lib/module/components/step-indicator/index.js +7 -7
  118. package/lib/module/components/step-indicator/index.js.map +1 -1
  119. package/lib/module/index.js +10 -5
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/module/stories/activity-timeline/activity-timeline.stories.js +75 -0
  122. package/lib/module/stories/activity-timeline/activity-timeline.stories.js.map +1 -0
  123. package/lib/module/stories/input-text-counter/input-text-counter.stories.js +253 -0
  124. package/lib/module/stories/input-text-counter/input-text-counter.stories.js.map +1 -0
  125. package/lib/module/stories/modal-activities/modal-activities.stories.js +1 -1
  126. package/lib/module/stories/modal-activities/modal-activities.stories.js.map +1 -1
  127. package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js +193 -0
  128. package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
  129. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +3 -3
  130. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  131. package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js +78 -0
  132. package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -0
  133. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +168 -0
  134. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
  135. package/lib/module/stories/select-option/select-option.stories.js +1 -1
  136. package/lib/module/stories/select-option/select-option.stories.js.map +1 -1
  137. package/lib/module/styles/theme/theme.js +18 -2
  138. package/lib/module/styles/theme/theme.js.map +1 -1
  139. package/lib/module/utils/options-activity/index.js +22 -0
  140. package/lib/module/utils/options-activity/index.js.map +1 -0
  141. package/lib/module/utils/text-limit/index.js +30 -0
  142. package/lib/module/utils/text-limit/index.js.map +1 -0
  143. package/lib/typescript/src/components/activity-timeline/components/activite-row/index.d.ts +10 -0
  144. package/lib/typescript/src/components/activity-timeline/index.d.ts +16 -0
  145. package/lib/typescript/src/components/activity-timeline/interface.d.ts +39 -0
  146. package/lib/typescript/src/components/activity-timeline/styles.d.ts +71 -0
  147. package/lib/typescript/src/components/input-text-counter/index.d.ts +33 -0
  148. package/lib/typescript/src/components/input-text-counter/styles.d.ts +34 -0
  149. package/lib/typescript/src/components/modal-create-activitie/index.d.ts +7 -0
  150. package/lib/typescript/src/components/modal-create-activitie/interface.d.ts +18 -0
  151. package/lib/typescript/src/components/modal-create-activitie/styles.d.ts +32 -0
  152. package/lib/typescript/src/components/modal-journey-rectification/index.d.ts +7 -0
  153. package/lib/typescript/src/components/modal-journey-rectification/styles.d.ts +32 -0
  154. package/lib/typescript/src/components/modals/modal-activity-reason/index.d.ts +7 -0
  155. package/lib/typescript/src/components/selects/select-date-and-hours/index.d.ts +12 -0
  156. package/lib/typescript/src/components/selects/select-date-and-hours/interface.d.ts +21 -0
  157. package/lib/typescript/src/components/selects/select-date-and-hours/styles.d.ts +24 -0
  158. package/lib/typescript/src/components/selects/select-option/index.d.ts +3 -6
  159. package/lib/typescript/src/index.d.ts +8 -3
  160. package/lib/typescript/src/stories/activity-timeline/activity-timeline.stories.d.ts +8 -0
  161. package/lib/typescript/src/stories/input-text-counter/input-text-counter.stories.d.ts +17 -0
  162. package/lib/typescript/src/stories/modal-activities/modal-activities.stories.d.ts +1 -1
  163. package/lib/typescript/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts +15 -0
  164. package/lib/typescript/src/stories/modal-change-activity/modal-change-activity.stories.d.ts +1 -1
  165. package/lib/typescript/src/stories/modal-create-activitie/modal-create-activitie.stories.d.ts +12 -0
  166. package/lib/typescript/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +34 -0
  167. package/lib/typescript/src/stories/select-option/select-option.stories.d.ts +1 -1
  168. package/lib/typescript/src/styles/global/theme-provider.d.ts +16 -0
  169. package/lib/typescript/src/styles/theme/theme.d.ts +16 -0
  170. package/lib/typescript/src/utils/options-activity/index.d.ts +20 -0
  171. package/lib/typescript/src/utils/text-limit/index.d.ts +13 -0
  172. package/package.json +1 -1
  173. package/src/components/activity-timeline/components/activite-row/index.tsx +133 -0
  174. package/src/components/activity-timeline/index.tsx +72 -0
  175. package/src/components/activity-timeline/interface.ts +53 -0
  176. package/src/components/activity-timeline/styles.ts +69 -0
  177. package/src/components/input-text-counter/index.tsx +64 -0
  178. package/src/components/input-text-counter/interface.d.ts +41 -0
  179. package/src/components/input-text-counter/styles.ts +38 -0
  180. package/src/components/modal-create-activitie/index.tsx +211 -0
  181. package/src/components/modal-create-activitie/interface.ts +22 -0
  182. package/src/components/modal-create-activitie/styles.ts +24 -0
  183. package/src/components/modal-journey-rectification/index.tsx +211 -0
  184. package/src/components/modal-journey-rectification/interface.d.ts +22 -0
  185. package/src/components/modal-journey-rectification/styles.ts +24 -0
  186. package/src/components/{modal-activities → modals/modal-activities}/data-activities/index.ts +65 -65
  187. package/src/components/{modal-activities → modals/modal-activities}/index.tsx +137 -137
  188. package/src/components/{modal-activities → modals/modal-activities}/interface.d.ts +32 -32
  189. package/src/components/modals/modal-activity-reason/index.tsx +162 -0
  190. package/src/components/modals/modal-activity-reason/interface.d.ts +10 -0
  191. package/src/components/{modal-change-activity → modals/modal-change-activity}/index.tsx +6 -6
  192. package/src/components/selects/select-date-and-hours/index.tsx +97 -0
  193. package/src/components/selects/select-date-and-hours/interface.ts +31 -0
  194. package/src/components/selects/select-date-and-hours/styles.ts +24 -0
  195. package/src/components/selects/select-option/index.tsx +50 -41
  196. package/src/components/step-indicator/index.tsx +235 -235
  197. package/src/index.ts +50 -45
  198. package/src/stories/activity-timeline/activity-timeline.stories.tsx +90 -0
  199. package/src/stories/input-text-counter/input-text-counter.stories.tsx +232 -0
  200. package/src/stories/modal-activities/modal-activities.stories.tsx +64 -64
  201. package/src/stories/modal-activity-reason/modal-activity-reason.stories.tsx +192 -0
  202. package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +49 -49
  203. package/src/stories/modal-create-activitie/modal-create-activitie.stories.tsx +82 -0
  204. package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +161 -0
  205. package/src/stories/select-option/select-option.stories.tsx +1 -1
  206. package/src/styles/theme/theme.ts +17 -0
  207. package/src/utils/options-activity/index.ts +14 -0
  208. package/src/utils/text-limit/index.ts +28 -0
  209. package/lib/commonjs/components/modal-activities/data-activities/index.js.map +0 -1
  210. package/lib/commonjs/components/modal-activities/index.js.map +0 -1
  211. package/lib/commonjs/components/modal-activities/interface.d.js.map +0 -1
  212. package/lib/commonjs/components/modal-change-activity/index.js.map +0 -1
  213. package/lib/module/components/modal-activities/data-activities/index.js.map +0 -1
  214. package/lib/module/components/modal-activities/index.js.map +0 -1
  215. package/lib/module/components/modal-activities/interface.d.js.map +0 -1
  216. package/lib/module/components/modal-change-activity/index.js.map +0 -1
  217. /package/lib/commonjs/components/{modal-activities → input-text-counter}/interface.d.js +0 -0
  218. /package/lib/module/components/{modal-activities → input-text-counter}/interface.d.js +0 -0
  219. /package/lib/typescript/src/components/{modal-activities → modals/modal-activities}/data-activities/index.d.ts +0 -0
  220. /package/lib/typescript/src/components/{modal-activities → modals/modal-activities}/index.d.ts +0 -0
  221. /package/lib/typescript/src/components/{modal-change-activity → modals/modal-change-activity}/index.d.ts +0 -0
@@ -0,0 +1,86 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+ import React, { forwardRef, useState } from "react";
5
+ import { View, TouchableOpacity } from "react-native";
6
+ import DateTimePicker from "@react-native-community/datetimepicker";
7
+
8
+ // seus componentes
9
+ import Box from "../../box";
10
+ import { Typography } from "../../typography";
11
+
12
+ // commons / svg
13
+ import { Icons } from "../../../common/icons-svg";
14
+
15
+ // typings
16
+
17
+ import { asBaseComponent } from "../../../@types/as-base-component";
18
+
19
+ // styles
20
+ import { theme } from "../../../styles/theme/theme";
21
+ import { styles } from "./styles";
22
+ import { formatDate, formHoursMinute } from "../../../utils/format-data";
23
+ const ActivityFields = /*#__PURE__*/forwardRef(({
24
+ value,
25
+ icon,
26
+ onPressConfirm,
27
+ disabled = false
28
+ }, ref) => {
29
+ const [modalVisible, setModalVisible] = useState(false);
30
+ const [pickerDate, setPickerDate] = useState(new Date());
31
+ const isCalendar = (icon !== null && icon !== void 0 ? icon : "CALENDAR") === "CALENDAR";
32
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
33
+ ref: ref,
34
+ activeOpacity: 0.7,
35
+ style: [styles.field, {
36
+ borderColor: theme.colors.gray[700],
37
+ backgroundColor: theme.colors.neutral[300],
38
+ opacity: disabled ? 0.7 : 1
39
+ }],
40
+ onPress: () => setModalVisible(true),
41
+ disabled: disabled
42
+ }, /*#__PURE__*/React.createElement(View, {
43
+ style: styles.row
44
+ }, /*#__PURE__*/React.createElement(Box, {
45
+ width: "10%",
46
+ height: 45,
47
+ flexStyle: {
48
+ alignItems: "center",
49
+ justifyContent: "center"
50
+ }
51
+ }, /*#__PURE__*/React.createElement(Icons, {
52
+ icon: icon ? icon : "CALENDAR",
53
+ color: theme.colors.black[100],
54
+ size: 18
55
+ })), /*#__PURE__*/React.createElement(Box, {
56
+ width: "90%",
57
+ height: 45,
58
+ flexStyle: {
59
+ alignItems: "center",
60
+ justifyContent: "center"
61
+ }
62
+ }, /*#__PURE__*/React.createElement(Typography, {
63
+ text: String(value),
64
+ color: theme.colors.blue[500],
65
+ fontFamily: theme.fonts.inter_medium_500,
66
+ size: theme.fontSizes.md,
67
+ marginRight: 44
68
+ })))), modalVisible && /*#__PURE__*/React.createElement(DateTimePicker, {
69
+ value: pickerDate,
70
+ mode: isCalendar ? "date" : "time",
71
+ is24Hour: true,
72
+ onChange: (event, date) => {
73
+ if ((event === null || event === void 0 ? void 0 : event.type) === "set" && date) {
74
+ setPickerDate(date);
75
+ const seconds = date.getHours() * 3600 + date.getMinutes() * 60;
76
+ const nextValue = isCalendar ? formatDate(date) : formHoursMinute(String(seconds));
77
+ // @ts-ignore genérico aceita string
78
+ onPressConfirm(nextValue);
79
+ }
80
+ setModalVisible(false);
81
+ }
82
+ }));
83
+ });
84
+ ActivityFields.displayName = "ActivityFields";
85
+ export default asBaseComponent(ActivityFields);
86
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","forwardRef","useState","View","TouchableOpacity","DateTimePicker","Box","Typography","Icons","asBaseComponent","theme","styles","formatDate","formHoursMinute","ActivityFields","value","icon","onPressConfirm","disabled","ref","modalVisible","setModalVisible","pickerDate","setPickerDate","Date","isCalendar","createElement","Fragment","activeOpacity","style","field","borderColor","colors","gray","backgroundColor","neutral","opacity","onPress","row","width","height","flexStyle","alignItems","justifyContent","color","black","size","text","String","blue","fontFamily","fonts","inter_medium_500","fontSizes","md","marginRight","mode","is24Hour","onChange","event","date","type","seconds","getHours","getMinutes","nextValue","displayName"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React, { forwardRef, useState } from \"react\";\n\nimport { View, TouchableOpacity } from \"react-native\";\nimport DateTimePicker from \"@react-native-community/datetimepicker\";\n\n// seus componentes\nimport Box from \"../../box\";\nimport { Typography } from \"../../typography\";\n\n// commons / svg\nimport { Icons } from \"../../../common/icons-svg\";\n\n// typings\nimport type { IActivityFieldsProps } from \"./interface\";\nimport { asBaseComponent } from \"../../../@types/as-base-component\";\n\n// styles\nimport { theme } from \"../../../styles/theme/theme\";\nimport { styles } from \"./styles\";\nimport { formatDate, formHoursMinute } from \"../../../utils/format-data\";\n\nconst ActivityFields = forwardRef<any, IActivityFieldsProps<any>>(\n ({ value, icon, onPressConfirm, disabled = false }, ref): React.ReactElement => {\n const [modalVisible, setModalVisible] = useState(false);\n const [pickerDate, setPickerDate] = useState<Date>(new Date());\n\n const isCalendar = (icon ?? \"CALENDAR\") === \"CALENDAR\";\n\n return (\n <>\n <TouchableOpacity\n ref={ref}\n activeOpacity={0.7}\n style={[\n styles.field,\n {\n borderColor: theme.colors.gray[700],\n backgroundColor: theme.colors.neutral[300],\n opacity: disabled ? 0.7 : 1,\n },\n ]}\n onPress={() => setModalVisible(true)}\n disabled={disabled}\n >\n <View style={styles.row}>\n <Box\n width={\"10%\"}\n height={45}\n flexStyle={{ alignItems: \"center\", justifyContent: \"center\" }}\n >\n <Icons icon={icon ? icon : \"CALENDAR\"} color={theme.colors.black[100]} size={18} />\n </Box>\n\n <Box\n width={\"90%\"}\n height={45}\n flexStyle={{ alignItems: \"center\", justifyContent: \"center\" }}\n >\n <Typography\n text={String(value)}\n color={theme.colors.blue[500]}\n fontFamily={theme.fonts.inter_medium_500}\n size={theme.fontSizes.md}\n marginRight={44}\n />\n </Box>\n </View>\n </TouchableOpacity>\n\n {modalVisible && (\n <DateTimePicker\n value={pickerDate}\n mode={isCalendar ? \"date\" : \"time\"}\n is24Hour\n onChange={(event: any, date?: Date) => {\n if (event?.type === \"set\" && date) {\n setPickerDate(date);\n const seconds = date.getHours() * 3600 + date.getMinutes() * 60;\n const nextValue = isCalendar ? formatDate(date) : formHoursMinute(String(seconds));\n // @ts-ignore genérico aceita string\n onPressConfirm(nextValue);\n }\n setModalVisible(false);\n }}\n />\n )}\n </>\n );\n }\n);\n\nActivityFields.displayName = \"ActivityFields\";\n\nexport default asBaseComponent(ActivityFields);\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ,QAAQ,OAAO;AAEnD,SAASC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AACrD,OAAOC,cAAc,MAAM,wCAAwC;;AAEnE;AACA,OAAOC,GAAG,MAAM,WAAW;AAC3B,SAASC,UAAU,QAAQ,kBAAkB;;AAE7C;AACA,SAASC,KAAK,QAAQ,2BAA2B;;AAEjD;;AAEA,SAASC,eAAe,QAAQ,mCAAmC;;AAEnE;AACA,SAASC,KAAK,QAAQ,6BAA6B;AACnD,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,UAAU,EAAEC,eAAe,QAAQ,4BAA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,CAAC;MAC3B;MACA5C,eAAe,CAAC,KAAK,CAAC;IACxB;EAAE,CACH,CAEH,CAAC;AAEP,CACF,CAAC;AAEDP,cAAc,CAACoD,WAAW,GAAG,gBAAgB;AAE7C,eAAezD,eAAe,CAACK,cAAc,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["interface.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\r\n/**\r\n * IMPORTS\r\n */\r\n\r\nimport type { TouchableOpacityProps } from \"react-native\";\r\n\r\n// commons / svg\r\nimport type { SVG_NAME } from \"../../../common/icons-svg/constants\";\r\n\r\ntype IActivityFieldsProps<T> = TouchableOpacityProps & {\r\n /** Valor exibido e retornado no onPressConfirm */\r\n value: T | null;\r\n\r\n /** Ícone à esquerda (padrão: 'CALENDAR') */\r\n icon: keyof typeof SVG_NAME;\r\n\r\n /** Desabilita interação */\r\n disabled?: boolean;\r\n\r\n /** Cor do texto (opcional) */\r\n textColor?: string;\r\n\r\n /** Clique confirma e devolve o value */\r\n onPressConfirm: (value: T) => void;\r\n};\r\n\r\n/**\r\n * EXPORTS\r\n */\r\nexport type { IActivityFieldsProps };\r\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * IMPORTS
3
+ */
4
+
5
+ import { StyleSheet } from "react-native";
6
+ const styles = StyleSheet.create({
7
+ field: {
8
+ width: "100%",
9
+ height: 45,
10
+ borderRadius: 12,
11
+ borderWidth: 1,
12
+ paddingHorizontal: 12,
13
+ justifyContent: "center",
14
+ marginTop: 10,
15
+ marginBottom: 16
16
+ },
17
+ row: {
18
+ flexDirection: "row",
19
+ alignItems: "center",
20
+ justifyContent: "space-around"
21
+ }
22
+ });
23
+
24
+ /**
25
+ * EXPORTS
26
+ */
27
+ export { styles };
28
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","styles","create","field","width","height","borderRadius","borderWidth","paddingHorizontal","justifyContent","marginTop","marginBottom","row","flexDirection","alignItems"],"sources":["styles.ts"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\n\r\nimport { StyleSheet } from \"react-native\";\r\n\r\nconst styles = StyleSheet.create({\r\n field: {\r\n width: \"100%\",\r\n height: 45,\r\n borderRadius: 12,\r\n borderWidth: 1,\r\n paddingHorizontal: 12,\r\n justifyContent: \"center\",\r\n marginTop: 10,\r\n marginBottom: 16,\r\n },\r\n row: { flexDirection: \"row\", alignItems: \"center\", justifyContent: \"space-around\" },\r\n});\r\n\r\n/**\r\n * EXPORTS\r\n */\r\nexport { styles };\r\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,cAAc;AAEzC,MAAMC,MAAM,GAAGD,UAAU,CAACE,MAAM,CAAC;EAC/BC,KAAK,EAAE;IACLC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,CAAC;IACdC,iBAAiB,EAAE,EAAE;IACrBC,cAAc,EAAE,QAAQ;IACxBC,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE;EAChB,CAAC;EACDC,GAAG,EAAE;IAAEC,aAAa,EAAE,KAAK;IAAEC,UAAU,EAAE,QAAQ;IAAEL,cAAc,EAAE;EAAe;AACpF,CAAC,CAAC;;AAEF;AACA;AACA;AACA,SAASR,MAAM","ignoreList":[]}
@@ -1,29 +1,30 @@
1
1
  /**
2
2
  * IMPORTS
3
3
  */
4
- import React from "react";
5
- import { useState } from "react";
4
+ import React, { forwardRef, useState } from "react";
6
5
  import { View, Text, TouchableOpacity, Modal, FlatList } from "react-native";
7
6
 
8
- // typings
7
+ // commons / svg
8
+ import { Icons } from "../../../common/icons-svg";
9
+
10
+ // utils
11
+ import { handleLimitTextdisplayByAmount } from "../../../utils/text-limit";
9
12
 
13
+ // typings
14
+ import { asBaseComponent } from "../../../@types/as-base-component";
10
15
  // styles
11
16
  import { styles } from "./styles";
12
- import { Icons } from "../../../common/icons-svg";
13
17
  import { theme } from "../../../styles/theme/theme";
14
-
15
- /**
16
- * Componente SelectOption para a interação da ui.
17
- */
18
- const SelectOption = ({
19
- dataOption,
20
- handleSelectDown,
21
- titleLabel,
22
- sizeTitleLabel,
23
- colortitleLabel,
24
- backgroundColor
25
- }) => {
18
+ const SelectOption = /*#__PURE__*/forwardRef((props, ref) => {
26
19
  var _dataOption$, _dataOption$find;
20
+ const {
21
+ dataOption,
22
+ handleSelectDown,
23
+ titleLabel,
24
+ sizeTitleLabel,
25
+ colortitleLabel,
26
+ backgroundColor
27
+ } = props;
27
28
  const [selectedValue, setSelectedValue] = useState(((_dataOption$ = dataOption[0]) === null || _dataOption$ === void 0 ? void 0 : _dataOption$.value) || "");
28
29
  const [modalVisible, setModalVisible] = useState(false);
29
30
  const handleSelect = value => {
@@ -40,19 +41,22 @@ const SelectOption = ({
40
41
  backgroundColor
41
42
  };
42
43
  return /*#__PURE__*/React.createElement(View, {
44
+ ref: ref,
43
45
  style: styles(styleProps).container
44
46
  }, /*#__PURE__*/React.createElement(Text, {
45
47
  style: styles(styleProps).label
46
48
  }, `${titleLabel !== null && titleLabel !== void 0 ? titleLabel : "Selecione uma opção"}`, ":"), /*#__PURE__*/React.createElement(TouchableOpacity, {
47
49
  testID: "select-box",
48
- style: [styles(styleProps).selectBox, backgroundColor && {
49
- backgroundColor
50
- }],
50
+ style: styles(styleProps).selectBox,
51
51
  onPress: () => setModalVisible(true)
52
52
  }, /*#__PURE__*/React.createElement(Text, {
53
- style: styles(styleProps).selectedText
54
- }, (_dataOption$find = dataOption.find(item => item.value === selectedValue)) === null || _dataOption$find === void 0 ? void 0 : _dataOption$find.label), /*#__PURE__*/React.createElement(Icons, {
55
- size: theme.fontSizes["md"],
53
+ style: styles(styleProps).selectedText,
54
+ numberOfLines: 1
55
+ }, `${handleLimitTextdisplayByAmount({
56
+ limit: 42,
57
+ text: (_dataOption$find = dataOption.find(item => item.value === selectedValue)) === null || _dataOption$find === void 0 ? void 0 : _dataOption$find.label
58
+ })}`), /*#__PURE__*/React.createElement(Icons, {
59
+ size: theme.fontSizes["xs"],
56
60
  color: theme.colors.blue[500],
57
61
  icon: "ARROW_DROP_DOWN"
58
62
  })), /*#__PURE__*/React.createElement(Modal, {
@@ -63,21 +67,23 @@ const SelectOption = ({
63
67
  }, /*#__PURE__*/React.createElement(View, {
64
68
  style: styles(styleProps).modalOverlay
65
69
  }, /*#__PURE__*/React.createElement(View, {
66
- style: {
67
- width: "90%",
68
- backgroundColor: "#fff",
69
- borderRadius: 8,
70
- padding: 16,
71
- maxHeight: "80%"
72
- }
70
+ style: styles(styleProps).modalContainer
73
71
  }, /*#__PURE__*/React.createElement(View, {
74
72
  style: {
75
73
  width: "100%",
76
- alignItems: "flex-end"
74
+ alignItems: "flex-end",
75
+ height: 40,
76
+ paddingRight: 8
77
77
  }
78
78
  }, /*#__PURE__*/React.createElement(TouchableOpacity, {
79
79
  testID: "close-icon",
80
- onPress: () => setModalVisible(false)
80
+ onPress: () => setModalVisible(false),
81
+ style: {
82
+ width: 40,
83
+ height: 45,
84
+ alignItems: "center",
85
+ justifyContent: "center"
86
+ }
81
87
  }, /*#__PURE__*/React.createElement(Icons, {
82
88
  size: theme.fontSizes["md"],
83
89
  color: theme.colors.blue[500],
@@ -88,23 +94,16 @@ const SelectOption = ({
88
94
  renderItem: ({
89
95
  item
90
96
  }) => /*#__PURE__*/React.createElement(TouchableOpacity, {
91
- style: {
92
- width: "100%",
93
- paddingVertical: 12,
94
- paddingHorizontal: 8,
95
- alignItems: "flex-start",
96
- borderBottomWidth: 1,
97
- borderColor: "#eee"
98
- },
97
+ style: styles(styleProps).option,
99
98
  onPress: () => handleSelect(item.value)
100
99
  }, /*#__PURE__*/React.createElement(Text, {
101
100
  style: styles(styleProps).optionText
102
101
  }, item.label))
103
102
  })))));
104
- };
103
+ });
105
104
 
106
105
  /**
107
- * EXPORTS
106
+ * Componente SelectOption para a interação da ui.
108
107
  */
109
- export { SelectOption };
108
+ export default asBaseComponent(SelectOption);
110
109
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","View","Text","TouchableOpacity","Modal","FlatList","styles","Icons","theme","SelectOption","dataOption","handleSelectDown","titleLabel","sizeTitleLabel","colortitleLabel","backgroundColor","_dataOption$","_dataOption$find","selectedValue","setSelectedValue","value","modalVisible","setModalVisible","handleSelect","styleProps","createElement","style","container","label","testID","selectBox","onPress","selectedText","find","item","size","fontSizes","color","colors","blue","icon","visible","transparent","animationType","modalOverlay","width","borderRadius","padding","maxHeight","alignItems","data","keyExtractor","renderItem","paddingVertical","paddingHorizontal","borderBottomWidth","borderColor","optionText"],"sources":["index.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React from \"react\";\r\nimport { useState } from \"react\";\r\nimport { View, Text, TouchableOpacity, Modal, FlatList } from \"react-native\";\r\n\r\n// typings\r\nimport { ISelectDropDownProps } from \"./interface\";\r\n\r\n// styles\r\nimport { styles } from \"./styles\";\r\nimport { Icons } from \"../../../common/icons-svg\";\r\nimport { theme } from \"../../../styles/theme/theme\";\r\n\r\n/**\r\n * Componente SelectOption para a interação da ui.\r\n */\r\nconst SelectOption: React.FC<ISelectDropDownProps> = ({\r\n dataOption,\r\n handleSelectDown,\r\n titleLabel,\r\n sizeTitleLabel,\r\n colortitleLabel,\r\n backgroundColor,\r\n}: ISelectDropDownProps) => {\r\n const [selectedValue, setSelectedValue] = useState(dataOption[0]?.value || \"\");\r\n const [modalVisible, setModalVisible] = useState(false);\r\n\r\n const handleSelect = (value: string) => {\r\n setSelectedValue(value);\r\n setModalVisible(false);\r\n handleSelectDown(value);\r\n };\r\n\r\n const styleProps = {\r\n dataOption,\r\n handleSelectDown,\r\n titleLabel,\r\n sizeTitleLabel,\r\n colortitleLabel,\r\n backgroundColor,\r\n } as ISelectDropDownProps;\r\n\r\n return (\r\n <View style={styles(styleProps).container}>\r\n {/* Titulo para exibir o label */}\r\n <Text style={styles(styleProps).label}>{`${titleLabel ?? \"Selecione uma opção\"}`}:</Text>\r\n\r\n {/* Botão para abrir o modal */}\r\n <TouchableOpacity\r\n testID=\"select-box\"\r\n style={[styles(styleProps).selectBox, backgroundColor && { backgroundColor },]}\r\n onPress={() => setModalVisible(true)}\r\n >\r\n <Text style={styles(styleProps).selectedText}>\r\n {dataOption.find((item) => item.value === selectedValue)?.label}\r\n </Text>\r\n\r\n <Icons\r\n size={theme.fontSizes[\"md\"]}\r\n color={theme.colors.blue[500]}\r\n icon={\"ARROW_DROP_DOWN\"}\r\n />\r\n </TouchableOpacity>\r\n\r\n {/* Modal para exibir as opções */}\r\n <Modal testID=\"modal-container\" visible={modalVisible} transparent animationType=\"fade\">\r\n <View style={styles(styleProps).modalOverlay}>\r\n <View style={{\r\n width: \"90%\",\r\n backgroundColor: \"#fff\",\r\n borderRadius: 8,\r\n padding: 16,\r\n maxHeight: \"80%\",\r\n }}>\r\n <View style={{ width: \"100%\", alignItems: \"flex-end\" }}>\r\n <TouchableOpacity testID=\"close-icon\" onPress={() => setModalVisible(false)}>\r\n <Icons\r\n size={theme.fontSizes[\"md\"]}\r\n color={theme.colors.blue[500]}\r\n icon={\"CLOSED\"}\r\n />\r\n </TouchableOpacity>\r\n </View>\r\n <FlatList\r\n data={dataOption || []}\r\n keyExtractor={(item) => item.value}\r\n renderItem={({ item }) => (\r\n <TouchableOpacity\r\n style={{\r\n width: \"100%\",\r\n paddingVertical: 12,\r\n paddingHorizontal: 8,\r\n alignItems: \"flex-start\",\r\n borderBottomWidth: 1,\r\n borderColor: \"#eee\",\r\n }}\r\n onPress={() => handleSelect(item.value)}\r\n >\r\n <Text style={styles(styleProps).optionText}>{item.label}</Text>\r\n </TouchableOpacity>\r\n )}\r\n />\r\n </View>\r\n </View>\r\n </Modal>\r\n </View>\r\n );\r\n};\r\n\r\n/**\r\n * EXPORTS\r\n */\r\nexport { SelectO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I;IAACyB,KAAK,EAAE;MAAEmB,KAAK,EAAE,MAAM;MAAEI,UAAU,EAAE;IAAW;EAAE,gBACrDlD,KAAA,CAAA0B,aAAA,CAACtB,gBAAgB;IAAC0B,MAAM,EAAC,YAAY;IAACE,OAAO,EAAEA,CAAA,KAAMT,eAAe,CAAC,KAAK;EAAE,gBAC1EvB,KAAA,CAAA0B,aAAA,CAAClB,KAAK;IACJ4B,IAAI,EAAE3B,KAAK,CAAC4B,SAAS,CAAC,IAAI,CAAE;IAC5BC,KAAK,EAAE7B,KAAK,CAAC8B,MAAM,CAACC,IAAI,CAAC,GAAG,CAAE;IAC9BC,IAAI,EAAE;EAAS,CAChB,CACe,CACd,CAAC,eACPzC,KAAA,CAAA0B,aAAA,CAACpB,QAAQ;IACP6C,IAAI,EAAExC,UAAU,IAAI,EAAG;IACvByC,YAAY,EAAGjB,IAAI,IAAKA,IAAI,CAACd,KAAM;IACnCgC,UAAU,EAAEA,CAAC;MAAElB;IAAK,CAAC,kBACnBnC,KAAA,CAAA0B,aAAA,CAACtB,gBAAgB;MACfuB,KAAK,EAAE;QACLmB,KAAK,EAAE,MAAM;QACbQ,eAAe,EAAE,EAAE;QACnBC,iBAAiB,EAAE,CAAC;QACpBL,UAAU,EAAE,YAAY;QACxBM,iBAAiB,EAAE,CAAC;QACpBC,WAAW,EAAE;MACf,CAAE;MACFzB,OAAO,EAAEA,CAAA,KAAMR,YAAY,CAACW,IAAI,CAACd,KAAK;IAAE,gBAExCrB,KAAA,CAAA0B,aAAA,CAACvB,IAAI;MAACwB,KAAK,EAAEpB,MAAM,CAACkB,UAAU,CAAC,CAACiC;IAAW,GAAEvB,IAAI,CAACN,KAAY,CAC9C;EAClB,CACH,CACG,CACF,CACD,CACH,CAAC;AAEX,CAAC;;AAED;AACA;AACA;AACA,SAASnB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["React","forwardRef","useState","View","Text","TouchableOpacity","Modal","FlatList","Icons","handleLimitTextdisplayByAmount","asBaseComponent","styles","theme","SelectOption","props","ref","_dataOption$","_dataOption$find","dataOption","handleSelectDown","titleLabel","sizeTitleLabel","colortitleLabel","backgroundColor","selectedValue","setSelectedValue","value","modalVisible","setModalVisible","handleSelect","styleProps","createElement","style","container","label","testID","selectBox","onPress","selectedText","numberOfLines","limit","text","find","item","size","fontSizes","color","colors","blue","icon","visible","transparent","animationType","modalOverlay","modalContainer","width","alignItems","height","paddingRight","justifyContent","data","keyExtractor","renderItem","option","optionText"],"sources":["index.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React, { forwardRef, useState } from \"react\";\r\nimport { View, Text, TouchableOpacity, Modal, FlatList } from \"react-native\";\r\n\r\n// commons / svg\r\nimport { Icons } from \"../../../common/icons-svg\";\r\n\r\n// utils\r\nimport { handleLimitTextdisplayByAmount } from \"../../../utils/text-limit\";\r\n\r\n// typings\r\nimport { asBaseComponent } from \"../../../@types/as-base-component\";\r\nimport type { ISelectDropDownProps } from \"./interface\";\r\n\r\n// styles\r\nimport { styles } from \"./styles\";\r\nimport { theme } from \"../../../styles/theme/theme\";\r\n\r\nconst SelectOption = forwardRef<any, ISelectDropDownProps>((props, ref): React.ReactElement => {\r\n const {\r\n dataOption,\r\n handleSelectDown,\r\n titleLabel,\r\n sizeTitleLabel,\r\n colortitleLabel,\r\n backgroundColor,\r\n } = props;\r\n\r\n const [selectedValue, setSelectedValue] = useState(dataOption[0]?.value || \"\");\r\n const [modalVisible, setModalVisible] = useState(false);\r\n\r\n const handleSelect = (value: string) => {\r\n setSelectedValue(value);\r\n setModalVisible(false);\r\n handleSelectDown(value);\r\n };\r\n\r\n const styleProps = {\r\n dataOption,\r\n handleSelectDown,\r\n titleLabel,\r\n sizeTitleLabel,\r\n colortitleLabel,\r\n backgroundColor,\r\n } as ISelectDropDownProps;\r\n return (\r\n <View ref={ref} style={styles(styleProps).container}>\r\n {/* Titulo para exibir o label */}\r\n <Text style={styles(styleProps).label}>{`${titleLabel ?? \"Selecione uma opção\"}`}:</Text>\r\n\r\n {/* Botão para abrir o modal */}\r\n <TouchableOpacity\r\n testID=\"select-box\"\r\n style={styles(styleProps).selectBox}\r\n onPress={() => setModalVisible(true)}\r\n >\r\n <Text style={styles(styleProps).selectedText} numberOfLines={1}>\r\n {`${handleLimitTextdisplayByAmount({\r\n limit: 42,\r\n text: dataOption.find((item) => item.value === selectedValue)?.label!,\r\n })}`}\r\n </Text>\r\n\r\n <Icons\r\n size={theme.fontSizes[\"xs\"]}\r\n color={theme.colors.blue[500]}\r\n icon={\"ARROW_DROP_DOWN\"}\r\n />\r\n </TouchableOpacity>\r\n\r\n {/* Modal para exibir as opções */}\r\n <Modal testID=\"modal-container\" visible={modalVisible} transparent animationType=\"fade\">\r\n <View style={styles(styleProps).modalOverlay}>\r\n <View style={styles(styleProps).modalContainer}>\r\n <View\r\n style={{\r\n width: \"100%\",\r\n alignItems: \"flex-end\",\r\n height: 40,\r\n paddingRight: 8,\r\n }}\r\n >\r\n <TouchableOpacity\r\n testID=\"close-icon\"\r\n onPress={() => setModalVisible(false)}\r\n style={{\r\n width: 40,\r\n height: 45,\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n }}\r\n >\r\n <Icons\r\n size={theme.fontSizes[\"md\"]}\r\n color={theme.colors.blue[500]}\r\n icon={\"CLOSED\"}\r\n />\r\n </TouchableOpacity>\r\n </View>\r\n <FlatList\r\n data={dataOption || []}\r\n keyExtractor={(item) => item.value}\r\n renderItem={({ item }) => (\r\n <TouchableOpacity\r\n style={styles(styleProps).option}\r\n onPress={() => handleSelect(item.value)}\r\n >\r\n <Text style={styles(styleProps).optionText}>{item.label}</Text>\r\n </TouchableOpacity>\r\n )}\r\n />\r\n </View>\r\n </View>\r\n </Modal>\r\n </View>\r\n );\r\n});\r\n\r\n/**\r\n * Componente SelectOption para a interação da ui.\r\n */\r\nexport default asBaseComponent(SelectOption);\r\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,QAAQ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e,CAACG,YAAY,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- /**
2
- * IMPORTS
1
+ /**
2
+ * IMPORTS
3
3
  */
4
4
  import React from "react";
5
5
  import { View, Text, TouchableOpacity } from "react-native";
@@ -16,10 +16,10 @@ import { getIconKeyByValue } from "./helpers/get-icon-by-status";
16
16
  import { styles } from "./styles";
17
17
  import { formHoursMinute } from "../../utils/format-data";
18
18
  import { theme } from "../../styles/theme/theme";
19
- import { ModalChangeActivity } from "../modal-change-activity";
19
+ import { ModalChangeActivity } from "../modals/modal-change-activity";
20
20
 
21
- /**
22
- * Componente StepIndicator para a interação da ui.
21
+ /**
22
+ * Componente StepIndicator para a interação da ui.
23
23
  */
24
24
  const StepIndicator = ({
25
25
  data = [],
@@ -180,8 +180,8 @@ const StepIndicator = ({
180
180
  return /*#__PURE__*/React.createElement(React.Fragment, null, handleRenderComponent(type));
181
181
  };
182
182
 
183
- /**
184
- * EXPORTS
183
+ /**
184
+ * EXPORTS
185
185
  */
186
186
  export default StepIndicator;
187
187
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","Text","TouchableOpacity","Icons","getIconKeyByValue","styles","formHoursMinute","theme","ModalChangeActivity","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","onChangeActivity","StepDefault","isModalVisible","setIsModalVisible","useState","currentStepIndex","setCurrentStepIndex","stepData","setStepData","handleOnPressActivitie","stepItem","index","_stepItem$descricao","_stepItem$descricao$t","desc","descricao","toLowerCase","call","isDescanso","includes","replace","sincronizado","handleConfirmModal","newData","updatedStep","label","referencia","value","ec_tipo_atividade_id","key","newSteps","map","item","createElement","Fragment","length","history","isFirst","isEditableType","tipo","isSynced","canEdit","testID","activeOpacity","id","style","containerIndicator","disabled","onPress","containerBall","width","height","marginTop","position","backgroundColor","colors","blue","orange","titleNumber","containerMain","title","data_inicio","titleDescription","data_fim","duracao_segundos","visible","modalConfirm","onClose","StepCustom","paddingHorizontal","display","flexDirection","step","indexCustom","borderRadius","alignItems","justifyContent","borderWidth","borderColor","icon","top","fontWeight","fontSize","lineHeight","textAlign","color","handleRenderComponent","stepType"],"sources":["index.tsx"],"sourcesContent":["/**\n * IMPORTS\n */\nimport React from \"react\";\nimport { View, Text, TouchableOpacity } from \"react-native\";\n\n// commons / svg\nimport { Icons } from \"../../common/icons-svg\";\n\n// helpers\nimport { getIconKeyByValue } from \"./helpers/get-icon-by-status\";\n\n// typings\nimport type { IStepIndicator } from \"./interface\";\n\n// styles\nimport { styles } from \"./styles\";\nimport { formHoursMinute } from \"../../utils/format-data\";\nimport { theme } from \"../../styles/theme/theme\";\nimport { ModalChangeActivity } from \"../modal-change-activity\";\n\n/**\n * Componente StepIndicator para a interação da ui.\n */\nconst StepIndicator: React.FC<IStepIndicator> = ({\n data = [],\n type,\n textColorDescription,\n titleColor,\n titleNumberColor,\n onChangeActivity,\n}) => {\n const StepDefault = () => {\n const [isModalVisible, setIsModalVisible] = React.useState(false);\n const [currentStepIndex, setCurrentStepIndex] = React.useState<number | null>(null);\n const [stepData, setStepData] = React.useState(data);\n\n const handleOnPressActivitie = (stepItem: any, index: number) => {\n const desc = stepItem?.descricao?.toLowerCase?.();\n if (!desc) return;\n\n const isDescanso = [\"descanso\", \"refeição\", \"repouso_noturno\", \"repouso_semanal\"].includes(\n desc.replace(/\\s+/g, \"_\")\n );\n\n if (isDescanso && stepItem?.sincronizado === true) {\n setCurrentStepIndex(index);\n setIsModalVisible(true);\n }\n };\n\n const handleConfirmModal = (newData: { label: string; value: string; key: number }) => {\n if (currentStepIndex !== null) {\n const updatedStep = {\n ...stepData[currentStepIndex],\n descricao: newData.label,\n referencia: newData.value,\n ec_tipo_atividade_id: newData.key,\n };\n\n const newSteps = stepData.map((item, index) =>\n index === currentStepIndex ? updatedStep : item\n );\n\n setStepData(newSteps as any);\n\n if (onChangeActivity) {\n onChangeActivity(updatedStep);\n }\n }\n\n setIsModalVisible(false);\n setCurrentStepIndex(null);\n };\n\n return (\n <>\n {stepData.length > 0 &&\n stepData.map((history, index) => {\n const isFirst = index === 0;\n const isEditableType = history.tipo === \"descanso\";\n const isSynced = history?.sincronizado === true;\n const canEdit = isFirst && isEditableType && isSynced;\n\n return (\n <TouchableOpacity\n testID=\"step-indicator\"\n activeOpacity={0.7}\n key={history?.id}\n style={styles({}).containerIndicator}\n disabled={!canEdit}\n onPress={() => handleOnPressActivitie(history, index)}\n >\n <View style={styles({ sincronizado: history.sincronizado }).containerBall}>\n {stepData.length > 1 && index < stepData.length - 1 && (\n <View\n style={{\n width: 2,\n height: 84,\n marginTop: 116,\n position: \"relative\",\n backgroundColor: history.sincronizado\n ? theme.colors.blue[500]\n : theme.colors.orange[150],\n }}\n />\n )}\n <Text style={styles({ titleNumberColor }).titleNumber}>\n {stepData.length - index}\n </Text>\n </View>\n\n <View style={styles({}).containerMain}>\n <Text style={styles({ titleColor }).title}>{history?.descricao}</Text>\n\n {history?.data_inicio && (\n <Text style={styles({ textColorDescription }).titleDescription}>\n {`Inicio: ${history.data_inicio} ás ${history.data_fim}`}\n </Text>\n )}\n\n {history.duracao_segundos && (\n <Text style={styles({ textColorDescription }).titleDescription}>\n Duração: {formHoursMinute(history?.duracao_segundos as string)}\n </Text>\n )}\n </View>\n </TouchableOpacity>\n );\n })}\n\n {isModalVisible && (\n <ModalChangeActivity\n visible={isModalVisible}\n modalConfirm={handleConfirmModal}\n descricao=\"\"\n onClose={() => setIsModalVisible(false)}\n />\n )}\n </>\n );\n };\n\n const StepCustom = () => {\n return (\n <View\n style={{\n width: \"100%\",\n height: 84,\n paddingHorizontal: 24,\n display: \"flex\",\n flexDirection: \"row\",\n }}\n >\n {data.map((step, indexCustom) => {\n const descricao = getIconKeyByValue(step.descricao);\n\n return (\n <React.Fragment key={`step-${indexCustom}`}>\n <View\n style={{\n width: 45,\n height: 45,\n backgroundColor: indexCustom <= 3 ? \"orange\" : \"transparent\",\n borderRadius: 50,\n alignItems: \"center\",\n justifyContent: \"center\",\n borderWidth: 1,\n borderColor: \"#fff\",\n }}\n >\n <View\n style={{\n width: 45,\n height: 45,\n backgroundColor: \"transparent\",\n borderRadius: 50,\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {descricao && <Icons icon={descricao} />}\n </View>\n <Text\n style={{\n position: \"absolute\",\n top: 56,\n fontWeight: \"600\",\n fontSize: 10,\n lineHeight: 14,\n textAlign: \"center\",\n color: \"#fff\",\n width: 75,\n }}\n >\n {step.descricao}\n </Text>\n </View>\n\n {data?.length > 1 && indexCustom < data?.length - 1 && (\n <View\n style={{\n width: 35,\n height: 2,\n marginTop: 24,\n position: \"relative\",\n backgroundColor: \"orange\",\n }}\n />\n )}\n </React.Fragment>\n );\n })}\n </View>\n );\n };\n\n const handleRenderComponent = (stepType: \"default\" | \"custom\") => {\n switch (stepType) {\n case \"default\":\n return <StepDefault />;\n case \"custom\":\n return <StepCustom />;\n default:\n return <View />;\n }\n };\n\n return <>{handleRenderComponent(type!)}</>;\n};\n\n/**\n * EXPORTS\n */\nexport default StepIndicator;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;;AAE3D;AACA,SAASC,KAAK,QAAQ,wBAAwB;;AAE9C;AACA,SAASC,iBAAiB,QAAQ,8BAA8B;;AAEhE;;AAGA;AACA,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,KAAK,QAAQ,0BAA0B;AAChD,SAASC,mBAAmB,QAAQ,0BAA0B;;AAE9D;AACA;AACA;AACA,MAAMC,aAAuC,GAAGA,CAAC;EAC/CC,IAAI,GAAG,EAAE;EACTC,IAAI;EACJC,oBAAoB;EACpBC,UAAU;EACVC,gBAAgB;EAChBC;AACF,CAAC,KAAK;EACJ,MAAMC,WAAW,GAAGA,CAAA,KAAM;IACxB,MAAM,CAACC,cAAc,EAAEC,iBAAiB,CAAC,G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AU,MAAE,CAAC;MACvB;QACE,oBAAOpF,KAAA,CAAAiD,aAAA,CAAChD,IAAI,MAAE,CAAC;IACnB;EACF,CAAC;EAED,oBAAOD,KAAA,CAAAiD,aAAA,CAAAjD,KAAA,CAAAkD,QAAA,QAAGoD,qBAAqB,CAAC1F,IAAK,CAAI,CAAC;AAC5C,CAAC;;AAED;AACA;AACA;AACA,eAAeF,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["React","View","Text","TouchableOpacity","Icons","getIconKeyByValue","styles","formHoursMinute","theme","ModalChangeActivity","StepIndicator","data","type","textColorDescription","titleColor","titleNumberColor","onChangeActivity","StepDefault","isModalVisible","setIsModalVisible","useState","currentStepIndex","setCurrentStepIndex","stepData","setStepData","handleOnPressActivitie","stepItem","index","_stepItem$descricao","_stepItem$descricao$t","desc","descricao","toLowerCase","call","isDescanso","includes","replace","sincronizado","handleConfirmModal","newData","updatedStep","label","referencia","value","ec_tipo_atividade_id","key","newSteps","map","item","createElement","Fragment","length","history","isFirst","isEditableType","tipo","isSynced","canEdit","testID","activeOpacity","id","style","containerIndicator","disabled","onPress","containerBall","width","height","marginTop","position","backgroundColor","colors","blue","orange","titleNumber","containerMain","title","data_inicio","titleDescription","data_fim","duracao_segundos","visible","modalConfirm","onClose","StepCustom","paddingHorizontal","display","flexDirection","step","indexCustom","borderRadius","alignItems","justifyContent","borderWidth","borderColor","icon","top","fontWeight","fontSize","lineHeight","textAlign","color","handleRenderComponent","stepType"],"sources":["index.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React from \"react\";\r\nimport { View, Text, TouchableOpacity } from \"react-native\";\r\n\r\n// commons / svg\r\nimport { Icons } from \"../../common/icons-svg\";\r\n\r\n// helpers\r\nimport { getIconKeyByValue } from \"./helpers/get-icon-by-status\";\r\n\r\n// typings\r\nimport type { IStepIndicator } from \"./interface\";\r\n\r\n// styles\r\nimport { styles } from \"./styles\";\r\nimport { formHoursMinute } from \"../../utils/format-data\";\r\nimport { theme } from \"../../styles/theme/theme\";\r\nimport { ModalChangeActivity } from \"../modals/modal-change-activity\";\r\n\r\n/**\r\n * Componente StepIndicator para a interação da ui.\r\n */\r\nconst StepIndicator: React.FC<IStepIndicator> = ({\r\n data = [],\r\n type,\r\n textColorDescription,\r\n titleColor,\r\n titleNumberColor,\r\n onChangeActivity,\r\n}) => {\r\n const StepDefault = () => {\r\n const [isModalVisible, setIsModalVisible] = React.useState(false);\r\n const [currentStepIndex, setCurrentStepIndex] = React.useState<number | null>(null);\r\n const [stepData, setStepData] = React.useState(data);\r\n\r\n const handleOnPressActivitie = (stepItem: any, index: number) => {\r\n const desc = stepItem?.descricao?.toLowerCase?.();\r\n if (!desc) return;\r\n\r\n const isDescanso = [\"descanso\", \"refeição\", \"repouso_noturno\", \"repouso_semanal\"].includes(\r\n desc.replace(/\\s+/g, \"_\")\r\n );\r\n\r\n if (isDescanso && stepItem?.sincronizado === true) {\r\n setCurrentStepIndex(index);\r\n setIsModalVisible(true);\r\n }\r\n };\r\n\r\n const handleConfirmModal = (newData: { label: string; value: string; key: number }) => {\r\n if (currentStepIndex !== null) {\r\n const updatedStep = {\r\n ...stepData[currentStepIndex],\r\n descricao: newData.label,\r\n referencia: newData.value,\r\n ec_tipo_atividade_id: newData.key,\r\n };\r\n\r\n const newSteps = stepData.map((item, index) =>\r\n index === currentStepIndex ? updatedStep : item\r\n );\r\n\r\n setStepData(newSteps as any);\r\n\r\n if (onChangeActivity) {\r\n onChangeActivity(updatedStep);\r\n }\r\n }\r\n\r\n setIsModalVisible(false);\r\n setCurrentStepIndex(null);\r\n };\r\n\r\n return (\r\n <>\r\n {stepData.length > 0 &&\r\n stepData.map((history, index) => {\r\n const isFirst = index === 0;\r\n const isEditableType = history.tipo === \"descanso\";\r\n const isSynced = history?.sincronizado === true;\r\n const canEdit = isFirst && isEditableType && isSynced;\r\n\r\n return (\r\n <TouchableOpacity\r\n testID=\"step-indicator\"\r\n activeOpacity={0.7}\r\n key={history?.id}\r\n style={styles({}).containerIndicator}\r\n disabled={!canEdit}\r\n onPress={() => handleOnPressActivitie(history, index)}\r\n >\r\n <View style={styles({ sincronizado: history.sincronizado }).containerBall}>\r\n {stepData.length > 1 && index < stepData.length - 1 && (\r\n <View\r\n style={{\r\n width: 2,\r\n height: 84,\r\n marginTop: 116,\r\n position: \"relative\",\r\n backgroundColor: history.sincronizado\r\n ? theme.colors.blue[500]\r\n : theme.colors.orange[150],\r\n }}\r\n />\r\n )}\r\n <Text style={styles({ titleNumberColor }).titleNumber}>\r\n {stepData.length - index}\r\n </Text>\r\n </View>\r\n\r\n <View style={styles({}).containerMain}>\r\n <Text style={styles({ titleColor }).title}>{history?.descricao}</Text>\r\n\r\n {history?.data_inicio && (\r\n <Text style={styles({ textColorDescription }).titleDescription}>\r\n {`Inicio: ${history.data_inicio} ás ${history.data_fim}`}\r\n </Text>\r\n )}\r\n\r\n {history.duracao_segundos && (\r\n <Text style={styles({ textColorDescription }).titleDescription}>\r\n Duração: {formHoursMinute(history?.duracao_segundos as string)}\r\n </Text>\r\n )}\r\n </View>\r\n </TouchableOpacity>\r\n );\r\n })}\r\n\r\n {isModalVisible && (\r\n <ModalChangeActivity\r\n visible={isModalVisible}\r\n modalConfirm={handleConfirmModal}\r\n descricao=\"\"\r\n onClose={() => setIsModalVisible(false)}\r\n />\r\n )}\r\n </>\r\n );\r\n };\r\n\r\n const StepCustom = () => {\r\n return (\r\n <View\r\n style={{\r\n width: \"100%\",\r\n height: 84,\r\n paddingHorizontal: 24,\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n }}\r\n >\r\n {data.map((step, indexCustom) => {\r\n const descricao = getIconKeyByValue(step.descricao);\r\n\r\n return (\r\n <React.Fragment key={`step-${indexCustom}`}>\r\n <View\r\n style={{\r\n width: 45,\r\n height: 45,\r\n backgroundColor: indexCustom <= 3 ? \"orange\" : \"transparent\",\r\n borderRadius: 50,\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n borderWidth: 1,\r\n borderColor: \"#fff\",\r\n }}\r\n >\r\n <View\r\n style={{\r\n width: 45,\r\n height: 45,\r\n backgroundColor: \"transparent\",\r\n borderRadius: 50,\r\n alignItems: \"center\",\r\n justifyContent: \"center\",\r\n }}\r\n >\r\n {descricao && <Icons icon={descricao} />}\r\n </View>\r\n <Text\r\n style={{\r\n position: \"absolute\",\r\n top: 56,\r\n fontWeight: \"600\",\r\n fontSize: 10,\r\n lineHeight: 14,\r\n textAlign: \"center\",\r\n color: \"#fff\",\r\n width: 75,\r\n }}\r\n >\r\n {step.descricao}\r\n </Text>\r\n </View>\r\n\r\n {data?.length > 1 && indexCustom < data?.length - 1 && (\r\n <View\r\n style={{\r\n width: 35,\r\n height: 2,\r\n marginTop: 24,\r\n position: \"relative\",\r\n backgroundColor: \"orange\",\r\n }}\r\n />\r\n )}\r\n </React.Fragment>\r\n );\r\n })}\r\n </View>\r\n );\r\n };\r\n\r\n const handleRenderComponent = (stepType: \"default\" | \"custom\") => {\r\n switch (stepType) {\r\n case \"default\":\r\n return <StepDefault />;\r\n case \"custom\":\r\n return <StepCustom />;\r\n default:\r\n return <View />;\r\n }\r\n };\r\n\r\n return <>{handleRenderComponent(type!)}</>;\r\n};\r\n\r\n/**\r\n * EXPORTS\r\n */\r\nexport default StepIndicator;\r\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;;AAE3D;AACA,SAASC,KAAK,QAAQ,wBAAwB;;AAE9C;AACA,SAASC,iBAAiB,QAAQ,8BAA8B;;AAEhE;;AAGA;AACA,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,eAAe,QAAQ,yBAAyB;AACzD,SAASC,KAAK,QAAQ,0BAA0B;AAChD,SAASC,mBAAmB,QAAQ,iCAAiC;;AAErE;AACA;AACA;AACA,MAAMC,aAAuC,GAAGA,CAAC;EAC/CC,IAAI,GAAG,EAAE;EACTC,IAAI;EACJ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AAQ;MACd,KAAK,SAAS;QACZ,oBAAOvG,KAAA,CAAAiD,aAAA,CAAChC,WAAW,MAAE,CAAC;MACxB,KAAK,QAAQ;QACX,oBAAOjB,KAAA,CAAAiD,aAAA,CAACmC,UAAU,MAAE,CAAC;MACvB;QACE,oBAAOpF,KAAA,CAAAiD,aAAA,CAAChD,IAAI,MAAE,CAAC;IACnB;EACF,CAAC;EAED,oBAAOD,KAAA,CAAAiD,aAAA,CAAAjD,KAAA,CAAAkD,QAAA,QAAGoD,qBAAqB,CAAC1F,IAAK,CAAI,CAAC;AAC5C,CAAC;;AAED;AACA;AACA;AACA,eAAeF,aAAa","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- /**
2
- * EXPORTS
1
+ /**
2
+ * EXPORTS
3
3
  */
4
4
 
5
5
  // Components
@@ -10,7 +10,7 @@ export { Typography } from "./components/typography";
10
10
  export { Input } from "./components/input";
11
11
  export { CapturePhoto } from "./components/capture-photo";
12
12
  export { CardHours } from "./components/card-hours";
13
- export { SelectOption } from "./components/selects/select-option";
13
+ export { default as SelectOption } from "./components/selects/select-option";
14
14
  export { Header } from "./components/header-profile";
15
15
  export { ScheduledJourneyIndicators } from "./components/scheduled-journey-indicators";
16
16
  export { CardScheduledJourney } from "./components/card-scheduled-journey";
@@ -33,9 +33,14 @@ export { HistoryDetails } from "./components/history-details";
33
33
  export { ActivitiesDaily } from "./components/activities-daily";
34
34
  export { ActivitiesProgress } from "./components/activities-progress";
35
35
  export { ProfileMenuOption } from "./components/profile-menu-option";
36
- export { ModalActivities } from "./components/modal-activities";
36
+ export { ModalActivities } from "./components/modals/modal-activities";
37
37
  export { HistoryActivitiesCard } from "./components/history-activities-card";
38
- export { ModalChangeActivity } from "./components/modal-change-activity";
38
+ export { ModalChangeActivity } from "./components/modals/modal-change-activity";
39
+ export { default as ModalActivityReason } from "./components/modals/modal-activity-reason";
40
+ export { default as InputTextCounter } from "./components/input-text-counter";
41
+ export { default as ModalCreteActivitie } from "./components/modal-create-activitie";
42
+ export { default as ModalJourneyRectification } from "./components/modal-journey-rectification";
43
+ export { default as ActivityTimeline } from "./components/activity-timeline";
39
44
 
40
45
  // Utilities
41
46
  export { multiply } from "./utils/mutiply";
@@ -1 +1 @@
1
- {"version":3,"names":["default","Box","Button","StepIndicator","Typography","Input","CapturePhoto","CardHours","SelectOption","Header","ScheduledJourneyIndicators","CardScheduledJourney","UserProfile","MenuItem","CardLoading","CardWorkSession","LoadingProgress","NoData","FilterJourney","Coil","FilterDateSelector","CardHistory","NotificationLoading","CheckBox","ImageCaptureWithRemove","LoadingDetails","AvatarProfile","HistoryDetails","ActivitiesDaily","ActivitiesProgress","ProfileMenuOption","ModalActivities","HistoryActivitiesCard","ModalChangeActivity","multiply","formatDate","getLastSevenDays","formHoursMinute","theme"],"sources":["index.ts"],"sourcesContent":["/**\n * EXPORTS\n */\n\n// Components\nexport { default as Box } from \"./components/box\";\nexport { Button } from \"./components/button\";\nexport { default as StepIndicator } from \"./components/step-indicator\";\nexport { Typography } from \"./components/typography\";\nexport { Input } from \"./components/input\";\nexport { CapturePhoto } from \"./components/capture-photo\";\nexport { CardHours } from \"./components/card-hours\";\nexport { SelectOption } from \"./components/selects/select-option\";\nexport { Header } from \"./components/header-profile\";\nexport { ScheduledJourneyIndicators } from \"./components/scheduled-journey-indicators\";\nexport { CardScheduledJourney } from \"./components/card-scheduled-journey\";\nexport { UserProfile } from \"./components/user-profile\";\nexport { MenuItem } from \"./components/menu-item\";\nexport { CardLoading } from \"./components/card-loading\";\nexport { CardWorkSession } from \"./components/card-work-session\";\nexport { LoadingProgress } from \"./components/loading-progress\";\nexport { NoData } from \"./components/no-data\";\nexport { FilterJourney } from \"./components/filter-journey\";\nexport { Coil } from \"./components/coil\";\nexport { FilterDateSelector } from \"./components/filter-date-selector\";\nexport { CardHistory } from \"./components/card-history\";\nexport { NotificationLoading } from \"./components/notification-loading\";\nexport { CheckBox } from \"./components/check-box\";\nexport { ImageCaptureWithRemove } from \"./components/image-capture-with-remove\";\nexport { LoadingDetails } from \"./components/loading-details\";\nexport { AvatarProfile } from \"./components/avatar-profile\";\nexport { HistoryDetails } from \"./components/history-details\";\nexport { ActivitiesDaily } from \"./components/activities-daily\";\nexport { ActivitiesProgress } from \"./components/activities-progress\";\nexport { ProfileMenuOption } from \"./components/profile-menu-option\";\nexport { ModalActivities } from \"./components/modal-activities\";\nexport { HistoryActivitiesCard } from \"./components/history-activities-card\";\nexport { ModalChangeActivity } from \"./components/modal-change-activity\";\n\n// Utilities\nexport { multiply } from \"./utils/mutiply\";\nexport { formatDate, getLastSevenDays, formHoursMinute } from \"./utils/format-data\";\n\n// Styles\nexport { theme } from \"./styles/theme/theme\";\n"],"mappings":"AAAA;AACA;AACA;;AAEA;AACA,SAASA,OAAO,IAAIC,GAAG,QAAQ,kBAAkB;AACjD,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASF,OAAO,IAAIG,aAAa,QAAQ,6BAA6B;AACtE,SAASC,UAAU,QAAQ,yBAAyB;AACpD,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,YAAY,QAAQ,4BAA4B;AACzD,SAASC,SAAS,QAAQ,yBAAyB;AACnD,SAASC,YAAY,QAAQ,oCAAoC;AACjE,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SAASC,0BAA0B,QAAQ,2CAA2C;AACtF,SAASC,oBAAoB,QAAQ,qCAAqC;AAC1E,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,QAAQ,QAAQ,wBAAwB;AACjD,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,eAAe,QAAQ,gCAAgC;AAChE,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,IAAI,QAAQ,mBAAmB;AACxC,SAASC,kBAAkB,QAAQ,mCAAmC;AACtE,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,mBAAmB,QAAQ,mCAAmC;AACvE,SAASC,QAAQ,QAAQ,wBAAwB;AACjD,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,iBAAiB,QAAQ,kCAAkC;AACpE,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,qBAAqB,QAAQ,sCAAsC;AAC5E,SAASC,mBAAmB,QAAQ,oCAAoC;;AAExE;AACA,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,eAAe,QAAQ,qBAAqB;;AAEnF;AACA,SAASC,KAAK,QAAQ,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["default","Box","Button","StepIndicator","Typography","Input","CapturePhoto","CardHours","SelectOption","Header","ScheduledJourneyIndicators","CardScheduledJourney","UserProfile","MenuItem","CardLoading","CardWorkSession","LoadingProgress","NoData","FilterJourney","Coil","FilterDateSelector","CardHistory","NotificationLoading","CheckBox","ImageCaptureWithRemove","LoadingDetails","AvatarProfile","HistoryDetails","ActivitiesDaily","ActivitiesProgress","ProfileMenuOption","ModalActivities","HistoryActivitiesCard","ModalChangeActivity","ModalActivityReason","InputTextCounter","ModalCreteActivitie","ModalJourneyRectification","ActivityTimeline","multiply","formatDate","getLastSevenDays","formHoursMinute","theme"],"sources":["index.ts"],"sourcesContent":["/**\r\n * EXPORTS\r\n */\r\n\r\n// Components\r\nexport { default as Box } from \"./components/box\";\r\nexport { Button } from \"./components/button\";\r\nexport { default as StepIndicator } from \"./components/step-indicator\";\r\nexport { Typography } from \"./components/typography\";\r\nexport { Input } from \"./components/input\";\r\nexport { CapturePhoto } from \"./components/capture-photo\";\r\nexport { CardHours } from \"./components/card-hours\";\r\nexport { default as SelectOption } from \"./components/selects/select-option\";\r\nexport { Header } from \"./components/header-profile\";\r\nexport { ScheduledJourneyIndicators } from \"./components/scheduled-journey-indicators\";\r\nexport { CardScheduledJourney } from \"./components/card-scheduled-journey\";\r\nexport { UserProfile } from \"./components/user-profile\";\r\nexport { MenuItem } from \"./components/menu-item\";\r\nexport { CardLoading } from \"./components/card-loading\";\r\nexport { CardWorkSession } from \"./components/card-work-session\";\r\nexport { LoadingProgress } from \"./components/loading-progress\";\r\nexport { NoData } from \"./components/no-data\";\r\nexport { FilterJourney } from \"./components/filter-journey\";\r\nexport { Coil } from \"./components/coil\";\r\nexport { FilterDateSelector } from \"./components/filter-date-selector\";\r\nexport { CardHistory } from \"./components/card-history\";\r\nexport { NotificationLoading } from \"./components/notification-loading\";\r\nexport { CheckBox } from \"./components/check-box\";\r\nexport { ImageCaptureWithRemove } from \"./components/image-capture-with-remove\";\r\nexport { LoadingDetails } from \"./components/loading-details\";\r\nexport { AvatarProfile } from \"./components/avatar-profile\";\r\nexport { HistoryDetails } from \"./components/history-details\";\r\nexport { ActivitiesDaily } from \"./components/activities-daily\";\r\nexport { ActivitiesProgress } from \"./components/activities-progress\";\r\nexport { ProfileMenuOption } from \"./components/profile-menu-option\";\r\nexport { ModalActivities } from \"./components/modals/modal-activities\";\r\nexport { HistoryActivitiesCard } from \"./components/history-activities-card\";\r\nexport { ModalChangeActivity } from \"./components/modals/modal-change-activity\";\r\nexport { default as ModalActivityReason } from \"./components/modals/modal-activity-reason\";\r\nexport { default as InputTextCounter } from \"./components/input-text-counter\";\r\nexport { default as ModalCreteActivitie } from \"./components/modal-create-activitie\";\r\nexport { default as ModalJourneyRectification } from \"./components/modal-journey-rectification\";\r\nexport { default as ActivityTimeline } from \"./components/activity-timeline\";\r\n\r\n// Utilities\r\nexport { multiply } from \"./utils/mutiply\";\r\nexport { formatDate, getLastSevenDays, formHoursMinute } from \"./utils/format-data\";\r\n\r\n// Styles\r\nexport { theme } from \"./styles/theme/theme\";\r\n"],"mapp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OAAO,IAAIkC,mBAAmB,QAAQ,2CAA2C;AAC1F,SAASlC,OAAO,IAAImC,gBAAgB,QAAQ,iCAAiC;AAC7E,SAASnC,OAAO,IAAIoC,mBAAmB,QAAQ,qCAAqC;AACpF,SAASpC,OAAO,IAAIqC,yBAAyB,QAAQ,0CAA0C;AAC/F,SAASrC,OAAO,IAAIsC,gBAAgB,QAAQ,gCAAgC;;AAE5E;AACA,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,eAAe,QAAQ,qBAAqB;;AAEnF;AACA,SAASC,KAAK,QAAQ,sBAAsB","ignoreList":[]}
@@ -0,0 +1,75 @@
1
+ import ActivityTimeline from "../../components/activity-timeline";
2
+ const sampleData = [{
3
+ id: 1,
4
+ title: "Operação com veículo",
5
+ date: "24/03/2025",
6
+ time: "08:00"
7
+ }, {
8
+ id: 2,
9
+ title: "Refeição",
10
+ date: "24/03/2025",
11
+ time: "12:30"
12
+ }, {
13
+ id: 3,
14
+ title: "Aguardando carga",
15
+ date: "24/03/2025",
16
+ time: "14:00",
17
+ invalid: true
18
+ }, {
19
+ id: 4,
20
+ title: "Descanso",
21
+ date: "24/03/2025",
22
+ time: "18:45"
23
+ }];
24
+ const meta = {
25
+ title: "componente/ActivityTimeline",
26
+ component: ActivityTimeline,
27
+ args: {
28
+ data: sampleData,
29
+ showIndexBadge: true,
30
+ onAdd: item => console.log("onAdd", item),
31
+ onEdit: item => console.log("onEdit", item),
32
+ onDelete: item => console.log("onDelete", item)
33
+ },
34
+ parameters: {
35
+ notes: `
36
+ # ActivityTimeline
37
+
38
+ Lista de atividades com ações de adicionar, editar e excluir.
39
+
40
+ Exemplo de uso:
41
+
42
+ \`\`\`tsx
43
+ <ActivityTimeline
44
+ data={data}
45
+ showIndexBadge
46
+ onAdd={(item) => console.log('onAdd', item)}
47
+ onEdit={(item) => console.log('onEdit', item)}
48
+ onDelete={(item) => console.log('onDelete', item)}
49
+ />
50
+ \`\`\`
51
+ `
52
+ }
53
+ };
54
+ export default meta;
55
+ export const Padrao = {
56
+ name: "activity-timeline-padrao",
57
+ args: {
58
+ data: sampleData,
59
+ showIndexBadge: true
60
+ }
61
+ };
62
+ export const SemBadge = {
63
+ name: "activity-timeline-sem-badge",
64
+ args: {
65
+ data: sampleData,
66
+ showIndexBadge: false
67
+ }
68
+ };
69
+ export const ListaVazia = {
70
+ name: "activity-timeline-lista-vazia",
71
+ args: {
72
+ data: []
73
+ }
74
+ };
75
+ //# sourceMappingURL=activity-timeline.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ActivityTimeline","sampleData","id","title","date","time","invalid","meta","component","args","data","showIndexBadge","onAdd","item","console","log","onEdit","onDelete","parameters","notes","Padrao","name","SemBadge","ListaVazia"],"sources":["activity-timeline.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from \"@storybook/react\";\r\nimport ActivityTimeline from \"../../components/activity-timeline\";\r\n\r\nimport type { ActivityItemModel } from \"../../components/activity-timeline/interface\";\r\n\r\nconst sampleData: ActivityItemModel[] = [\r\n {\r\n id: 1,\r\n title: \"Operação com veículo\",\r\n date: \"24/03/2025\",\r\n time: \"08:00\",\r\n },\r\n {\r\n id: 2,\r\n title: \"Refeição\",\r\n date: \"24/03/2025\",\r\n time: \"12:30\",\r\n },\r\n {\r\n id: 3,\r\n title: \"Aguardando carga\",\r\n date: \"24/03/2025\",\r\n time: \"14:00\",\r\n invalid: true,\r\n },\r\n {\r\n id: 4,\r\n title: \"Descanso\",\r\n date: \"24/03/2025\",\r\n time: \"18:45\",\r\n },\r\n];\r\n\r\nconst meta: Meta<typeof ActivityTimeline> = {\r\n title: \"componente/ActivityTimeline\",\r\n component: ActivityTimeline,\r\n args: {\r\n data: sampleData,\r\n showIndexBadge: true,\r\n onAdd: (item: ActivityItemModel) => console.log(\"onAdd\", item),\r\n onEdit: (item: ActivityItemModel) => console.log(\"onEdit\", item),\r\n onDelete: (item: ActivityItemModel) => console.log(\"onDelete\", item),\r\n },\r\n parameters: {\r\n notes: `\r\n# ActivityTimeline\r\n\r\nLista de atividades com ações de adicionar, editar e excluir.\r\n\r\nExemplo de uso:\r\n\r\n\\`\\`\\`tsx\r\n<ActivityTimeline\r\n data={data}\r\n showIndexBadge\r\n onAdd={(item) => console.log('onAdd', item)}\r\n onEdit={(item) => console.log('onEdit', item)}\r\n onDelete={(item) => console.log('onDelete', item)}\r\n/>\r\n\\`\\`\\`\r\n `,\r\n },\r\n};\r\n\r\nexport default meta;\r\n\r\ntype Story = StoryObj<typeof meta>;\r\n\r\nexport const Padrao: Story = {\r\n name: \"activity-timeline-padrao\",\r\n args: {\r\n data: sampleData,\r\n showIndexBadge: true,\r\n },\r\n};\r\n\r\nexport const SemBadge: Story = {\r\n name: \"activity-timeline-sem-badge\",\r\n args: {\r\n data: sampleData,\r\n showIndexBadge: false,\r\n },\r\n};\r\n\r\nexport const ListaVazia: Story = {\r\n name: \"activity-timeline-lista-vazia\",\r\n args: {\r\n data: [],\r\n },\r\n};"],"mappings":"AACA,OAAOA,gBAAgB,MAAM,oCAAoC;AAIjE,MAAMC,UAA+B,GAAG,CACtC;EACEC,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,sBAAsB;EAC7BC,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE;AACR,CAAC,EACD;EACEH,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE;AACR,CAAC,EACD;EACEH,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,kBAAkB;EACzBC,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE,OAAO;EACbC,OAAO,EAAE;AACX,CAAC,EACD;EACEJ,EAAE,EAAE,CAAC;EACLC,KAAK,EAAE,UAAU;EACjBC,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE;AACR,CAAC,CACF;AAED,MAAME,IAAmC,GAAG;EAC1CJ,KAAK,EAAE,6BAA6B;EACp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