react-native-exp-fig 0.1.25 → 0.1.27

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 (199) hide show
  1. package/lib/commonjs/components/input-text-counter/index.js +66 -0
  2. package/lib/commonjs/components/input-text-counter/index.js.map +1 -0
  3. package/lib/commonjs/components/input-text-counter/interface.d.js.map +1 -0
  4. package/lib/commonjs/components/input-text-counter/styles.js +42 -0
  5. package/lib/commonjs/components/input-text-counter/styles.js.map +1 -0
  6. package/lib/commonjs/components/modal-create-activitie/index.js +202 -0
  7. package/lib/commonjs/components/modal-create-activitie/index.js.map +1 -0
  8. package/lib/commonjs/components/modal-create-activitie/interface.js +2 -0
  9. package/lib/commonjs/components/modal-create-activitie/interface.js.map +1 -0
  10. package/lib/commonjs/components/modal-create-activitie/styles.js +42 -0
  11. package/lib/commonjs/components/modal-create-activitie/styles.js.map +1 -0
  12. package/lib/commonjs/components/modal-journey-rectification/index.js +202 -0
  13. package/lib/commonjs/components/modal-journey-rectification/index.js.map +1 -0
  14. package/lib/commonjs/components/modal-journey-rectification/interface.d.js +2 -0
  15. package/lib/commonjs/components/modal-journey-rectification/interface.d.js.map +1 -0
  16. package/lib/commonjs/components/modal-journey-rectification/styles.js +42 -0
  17. package/lib/commonjs/components/modal-journey-rectification/styles.js.map +1 -0
  18. package/lib/commonjs/components/{modal-activities → modals/modal-activities}/data-activities/index.js +2 -2
  19. package/lib/commonjs/components/modals/modal-activities/data-activities/index.js.map +1 -0
  20. package/lib/commonjs/components/{modal-activities → modals/modal-activities}/index.js +8 -8
  21. package/lib/commonjs/components/modals/modal-activities/index.js.map +1 -0
  22. package/lib/commonjs/components/modals/modal-activities/interface.d.js +6 -0
  23. package/lib/commonjs/components/modals/modal-activities/interface.d.js.map +1 -0
  24. package/lib/commonjs/components/modals/modal-activity-reason/index.js +161 -0
  25. package/lib/commonjs/components/modals/modal-activity-reason/index.js.map +1 -0
  26. package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js +2 -0
  27. package/lib/commonjs/components/modals/modal-activity-reason/interface.d.js.map +1 -0
  28. package/lib/commonjs/components/{modal-change-activity → modals/modal-change-activity}/index.js +7 -7
  29. package/lib/commonjs/components/modals/modal-change-activity/index.js.map +1 -0
  30. package/lib/commonjs/components/selects/select-date-and-hours/index.js +95 -0
  31. package/lib/commonjs/components/selects/select-date-and-hours/index.js.map +1 -0
  32. package/lib/commonjs/components/selects/select-date-and-hours/interface.js +6 -0
  33. package/lib/commonjs/components/selects/select-date-and-hours/interface.js.map +1 -0
  34. package/lib/commonjs/components/selects/select-date-and-hours/styles.js +33 -0
  35. package/lib/commonjs/components/selects/select-date-and-hours/styles.js.map +1 -0
  36. package/lib/commonjs/components/selects/select-option/index.js +41 -39
  37. package/lib/commonjs/components/selects/select-option/index.js.map +1 -1
  38. package/lib/commonjs/components/step-indicator/index.js +10 -10
  39. package/lib/commonjs/components/step-indicator/index.js.map +1 -1
  40. package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
  41. package/lib/commonjs/index.js +32 -4
  42. package/lib/commonjs/index.js.map +1 -1
  43. package/lib/commonjs/stories/input-text-counter/input-text-counter.stories.js +259 -0
  44. package/lib/commonjs/stories/input-text-counter/input-text-counter.stories.js.map +1 -0
  45. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js +1 -1
  46. package/lib/commonjs/stories/modal-activities/modal-activities.stories.js.map +1 -1
  47. package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js +198 -0
  48. package/lib/commonjs/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
  49. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js +3 -3
  50. package/lib/commonjs/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  51. package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js +86 -0
  52. package/lib/commonjs/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -0
  53. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +172 -0
  54. package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
  55. package/lib/commonjs/stories/select-option/select-option.stories.js +3 -2
  56. package/lib/commonjs/stories/select-option/select-option.stories.js.map +1 -1
  57. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js +2 -1
  58. package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
  59. package/lib/commonjs/styles/theme/theme.js +18 -2
  60. package/lib/commonjs/styles/theme/theme.js.map +1 -1
  61. package/lib/commonjs/utils/options-activity/index.js +27 -0
  62. package/lib/commonjs/utils/options-activity/index.js.map +1 -0
  63. package/lib/commonjs/utils/text-limit/index.js +37 -0
  64. package/lib/commonjs/utils/text-limit/index.js.map +1 -0
  65. package/lib/module/components/input-text-counter/index.js +63 -0
  66. package/lib/module/components/input-text-counter/index.js.map +1 -0
  67. package/lib/module/components/input-text-counter/interface.d.js.map +1 -0
  68. package/lib/module/components/input-text-counter/styles.js +37 -0
  69. package/lib/module/components/input-text-counter/styles.js.map +1 -0
  70. package/lib/module/components/modal-create-activitie/index.js +192 -0
  71. package/lib/module/components/modal-create-activitie/index.js.map +1 -0
  72. package/lib/module/components/modal-create-activitie/interface.js +2 -0
  73. package/lib/module/components/modal-create-activitie/interface.js.map +1 -0
  74. package/lib/module/components/modal-create-activitie/styles.js +37 -0
  75. package/lib/module/components/modal-create-activitie/styles.js.map +1 -0
  76. package/lib/module/components/modal-journey-rectification/index.js +192 -0
  77. package/lib/module/components/modal-journey-rectification/index.js.map +1 -0
  78. package/lib/module/components/modal-journey-rectification/interface.d.js +2 -0
  79. package/lib/module/components/modal-journey-rectification/interface.d.js.map +1 -0
  80. package/lib/module/components/modal-journey-rectification/styles.js +37 -0
  81. package/lib/module/components/modal-journey-rectification/styles.js.map +1 -0
  82. package/lib/module/components/{modal-activities → modals/modal-activities}/data-activities/index.js +2 -2
  83. package/lib/module/components/modals/modal-activities/data-activities/index.js.map +1 -0
  84. package/lib/module/components/{modal-activities → modals/modal-activities}/index.js +8 -8
  85. package/lib/module/components/modals/modal-activities/index.js.map +1 -0
  86. package/lib/module/components/modals/modal-activities/interface.d.js +2 -0
  87. package/lib/module/components/modals/modal-activities/interface.d.js.map +1 -0
  88. package/lib/module/components/modals/modal-activity-reason/index.js +151 -0
  89. package/lib/module/components/modals/modal-activity-reason/index.js.map +1 -0
  90. package/lib/module/components/modals/modal-activity-reason/interface.d.js +2 -0
  91. package/lib/module/components/modals/modal-activity-reason/interface.d.js.map +1 -0
  92. package/lib/module/components/{modal-change-activity → modals/modal-change-activity}/index.js +6 -6
  93. package/lib/module/components/modals/modal-change-activity/index.js.map +1 -0
  94. package/lib/module/components/selects/select-date-and-hours/index.js +86 -0
  95. package/lib/module/components/selects/select-date-and-hours/index.js.map +1 -0
  96. package/lib/module/components/selects/select-date-and-hours/interface.js +2 -0
  97. package/lib/module/components/selects/select-date-and-hours/interface.js.map +1 -0
  98. package/lib/module/components/selects/select-date-and-hours/styles.js +28 -0
  99. package/lib/module/components/selects/select-date-and-hours/styles.js.map +1 -0
  100. package/lib/module/components/selects/select-option/index.js +41 -42
  101. package/lib/module/components/selects/select-option/index.js.map +1 -1
  102. package/lib/module/components/step-indicator/index.js +10 -10
  103. package/lib/module/components/step-indicator/index.js.map +1 -1
  104. package/lib/module/components/step-indicator/interface.d.js.map +1 -1
  105. package/lib/module/index.js +9 -5
  106. package/lib/module/index.js.map +1 -1
  107. package/lib/module/stories/input-text-counter/input-text-counter.stories.js +253 -0
  108. package/lib/module/stories/input-text-counter/input-text-counter.stories.js.map +1 -0
  109. package/lib/module/stories/modal-activities/modal-activities.stories.js +1 -1
  110. package/lib/module/stories/modal-activities/modal-activities.stories.js.map +1 -1
  111. package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js +193 -0
  112. package/lib/module/stories/modal-activity-reason/modal-activity-reason.stories.js.map +1 -0
  113. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js +3 -3
  114. package/lib/module/stories/modal-change-activity/modal-change-activity.stories.js.map +1 -1
  115. package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js +78 -0
  116. package/lib/module/stories/modal-create-activitie/modal-create-activitie.stories.js.map +1 -0
  117. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +168 -0
  118. package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -0
  119. package/lib/module/stories/select-option/select-option.stories.js +1 -1
  120. package/lib/module/stories/select-option/select-option.stories.js.map +1 -1
  121. package/lib/module/stories/step-indicator/step-indicator.stories.js +2 -1
  122. package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
  123. package/lib/module/styles/theme/theme.js +18 -2
  124. package/lib/module/styles/theme/theme.js.map +1 -1
  125. package/lib/module/utils/options-activity/index.js +22 -0
  126. package/lib/module/utils/options-activity/index.js.map +1 -0
  127. package/lib/module/utils/text-limit/index.js +30 -0
  128. package/lib/module/utils/text-limit/index.js.map +1 -0
  129. package/lib/typescript/src/components/input-text-counter/index.d.ts +33 -0
  130. package/lib/typescript/src/components/input-text-counter/styles.d.ts +34 -0
  131. package/lib/typescript/src/components/modal-create-activitie/index.d.ts +7 -0
  132. package/lib/typescript/src/components/modal-create-activitie/interface.d.ts +18 -0
  133. package/lib/typescript/src/components/modal-create-activitie/styles.d.ts +32 -0
  134. package/lib/typescript/src/components/modal-journey-rectification/index.d.ts +7 -0
  135. package/lib/typescript/src/components/modal-journey-rectification/styles.d.ts +32 -0
  136. package/lib/typescript/src/components/modals/modal-activity-reason/index.d.ts +7 -0
  137. package/lib/typescript/src/components/selects/select-date-and-hours/index.d.ts +12 -0
  138. package/lib/typescript/src/components/selects/select-date-and-hours/interface.d.ts +21 -0
  139. package/lib/typescript/src/components/selects/select-date-and-hours/styles.d.ts +24 -0
  140. package/lib/typescript/src/components/selects/select-option/index.d.ts +3 -6
  141. package/lib/typescript/src/index.d.ts +7 -3
  142. package/lib/typescript/src/stories/input-text-counter/input-text-counter.stories.d.ts +17 -0
  143. package/lib/typescript/src/stories/modal-activities/modal-activities.stories.d.ts +1 -1
  144. package/lib/typescript/src/stories/modal-activity-reason/modal-activity-reason.stories.d.ts +15 -0
  145. package/lib/typescript/src/stories/modal-change-activity/modal-change-activity.stories.d.ts +1 -1
  146. package/lib/typescript/src/stories/modal-create-activitie/modal-create-activitie.stories.d.ts +12 -0
  147. package/lib/typescript/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +34 -0
  148. package/lib/typescript/src/stories/select-option/select-option.stories.d.ts +1 -1
  149. package/lib/typescript/src/styles/global/theme-provider.d.ts +16 -0
  150. package/lib/typescript/src/styles/theme/theme.d.ts +16 -0
  151. package/lib/typescript/src/utils/options-activity/index.d.ts +20 -0
  152. package/lib/typescript/src/utils/text-limit/index.d.ts +13 -0
  153. package/package.json +1 -1
  154. package/src/components/input-text-counter/index.tsx +64 -0
  155. package/src/components/input-text-counter/interface.d.ts +41 -0
  156. package/src/components/input-text-counter/styles.ts +38 -0
  157. package/src/components/modal-create-activitie/index.tsx +211 -0
  158. package/src/components/modal-create-activitie/interface.ts +22 -0
  159. package/src/components/modal-create-activitie/styles.ts +24 -0
  160. package/src/components/modal-journey-rectification/index.tsx +211 -0
  161. package/src/components/modal-journey-rectification/interface.d.ts +22 -0
  162. package/src/components/modal-journey-rectification/styles.ts +24 -0
  163. package/src/components/{modal-activities → modals/modal-activities}/data-activities/index.ts +65 -65
  164. package/src/components/{modal-activities → modals/modal-activities}/index.tsx +137 -137
  165. package/src/components/{modal-activities → modals/modal-activities}/interface.d.ts +32 -32
  166. package/src/components/modals/modal-activity-reason/index.tsx +162 -0
  167. package/src/components/modals/modal-activity-reason/interface.d.ts +10 -0
  168. package/src/components/{modal-change-activity → modals/modal-change-activity}/index.tsx +6 -6
  169. package/src/components/selects/select-date-and-hours/index.tsx +97 -0
  170. package/src/components/selects/select-date-and-hours/interface.ts +31 -0
  171. package/src/components/selects/select-date-and-hours/styles.ts +24 -0
  172. package/src/components/selects/select-option/index.tsx +50 -41
  173. package/src/components/step-indicator/index.tsx +235 -235
  174. package/src/components/step-indicator/interface.d.ts +2 -2
  175. package/src/index.ts +49 -45
  176. package/src/stories/input-text-counter/input-text-counter.stories.tsx +232 -0
  177. package/src/stories/modal-activities/modal-activities.stories.tsx +64 -64
  178. package/src/stories/modal-activity-reason/modal-activity-reason.stories.tsx +192 -0
  179. package/src/stories/modal-change-activity/modal-change-activity.stories.tsx +49 -49
  180. package/src/stories/modal-create-activitie/modal-create-activitie.stories.tsx +82 -0
  181. package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +161 -0
  182. package/src/stories/select-option/select-option.stories.tsx +1 -1
  183. package/src/stories/step-indicator/step-indicator.stories.tsx +2 -1
  184. package/src/styles/theme/theme.ts +17 -0
  185. package/src/utils/options-activity/index.ts +14 -0
  186. package/src/utils/text-limit/index.ts +28 -0
  187. package/lib/commonjs/components/modal-activities/data-activities/index.js.map +0 -1
  188. package/lib/commonjs/components/modal-activities/index.js.map +0 -1
  189. package/lib/commonjs/components/modal-activities/interface.d.js.map +0 -1
  190. package/lib/commonjs/components/modal-change-activity/index.js.map +0 -1
  191. package/lib/module/components/modal-activities/data-activities/index.js.map +0 -1
  192. package/lib/module/components/modal-activities/index.js.map +0 -1
  193. package/lib/module/components/modal-activities/interface.d.js.map +0 -1
  194. package/lib/module/components/modal-change-activity/index.js.map +0 -1
  195. /package/lib/commonjs/components/{modal-activities → input-text-counter}/interface.d.js +0 -0
  196. /package/lib/module/components/{modal-activities → input-text-counter}/interface.d.js +0 -0
  197. /package/lib/typescript/src/components/{modal-activities → modals/modal-activities}/data-activities/index.d.ts +0 -0
  198. /package/lib/typescript/src/components/{modal-activities → modals/modal-activities}/index.d.ts +0 -0
  199. /package/lib/typescript/src/components/{modal-change-activity → modals/modal-change-activity}/index.d.ts +0 -0
@@ -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","tipo_atividade","value","identificador","key","newSteps","map","item","createElement","Fragment","length","history","isFirst","isEditableType","tipo","isSynced","canEdit","testID","activeOpacity","jr_tipo_atividade_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 tipo_atividade: newData.value,\n identificador: 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.jr_tipo_atividade_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,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C,MAAM,IAAG,CAAC,iBACjDnD,KAAA,CAAAiD,aAAA,CAAChD,IAAI;QACH4D,KAAK,EAAE;UACLK,KAAK,EAAE,EAAE;UACTC,MAAM,EAAE,CAAC;UACTC,SAAS,EAAE,EAAE;UACbC,QAAQ,EAAE,UAAU;UACpBC,eAAe,EAAE;QACnB;MAAE,CACH,CAEW,CAAC;IAErB,CAAC,CACG,CAAC;EAEX,CAAC;EAED,MAAMgC,qBAAqB,GAAIC,QAA8B,IAAK;IAChE,QAAQA,QAAQ;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
+ {"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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CAAC,EAEN,CAAApB,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEwC,MAAM,IAAG,CAAC,IAAIsC,WAAW,GAAG,CAAA9E,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEwC,MAAM,IAAG,CAAC,iBACjDnD,KAAA,CAAAiD,aAAA,CAAChD,IAAI;QACH4D,KAAK,EAAE;UACLK,KAAK,EAAE,EAAE;UACTC,MAAM,EAAE,CAAC;UACTC,SAAS,EAAE,EAAE;UACbC,QAAQ,EAAE,UAAU;UACpBC,eAAe,EAAE;QACnB;MAAE,CACH,CAEW,CAAC;IAErB,CAAC,CACG,CAAC;EAEX,CAAC;EAED,MAAMgC,qBAAqB,GAAIC,QAA8B,IAAK;IAChE,QAAQA,QAAQ;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 +1 @@
1
- {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\n\ntype IData = {\n id?: number;\n jr_tipo_atividade_id?: number;\n duracao_segundos: string | number;\n data_inicio: string;\n data_fim: string;\n descricao: string;\n sincronizado;\n tipo: string;\n referencia: string;\n};\n\ntype IStyleProps = {\n sincronizado?: boolean;\n titleColor?: string;\n titleNumberColor?: string;\n textColorDescription?: string;\n};\n\ninterface IStepIndicator {\n /**dados que vão ser renderizados */\n data?: IData[];\n\n /**tupo de renderização padrão ou customizada */\n type?: \"default\" | \"custom\";\n\n /**cor do texto */\n titleColor?: string;\n\n /**cor do numero do step indicator */\n titleNumberColor?: string;\n\n /**cor do texto da descrição */\n textColorDescription?: string;\n\n /**params para lidar com selecionamento de atividade única */\n onChangeActivity?: (activity: any) => void;\n}\n/**\n * EXPORTS\n */\nexport { type IStepIndicator, IStyleProps };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["interface.d.ts"],"sourcesContent":["/* eslint-disable no-unused-vars */\n/**\n * IMPORTS\n */\n\ntype IData = {\n id?: number | string;\n ec_tipo_atividade_id?: number;\n duracao_segundos: string | number;\n data_inicio: string;\n data_fim: string;\n descricao: string;\n sincronizado;\n tipo: string;\n referencia: string;\n};\n\ntype IStyleProps = {\n sincronizado?: boolean;\n titleColor?: string;\n titleNumberColor?: string;\n textColorDescription?: string;\n};\n\ninterface IStepIndicator {\n /**dados que vão ser renderizados */\n data?: IData[];\n\n /**tupo de renderização padrão ou customizada */\n type?: \"default\" | \"custom\";\n\n /**cor do texto */\n titleColor?: string;\n\n /**cor do numero do step indicator */\n titleNumberColor?: string;\n\n /**cor do texto da descrição */\n textColorDescription?: string;\n\n /**params para lidar com selecionamento de atividade única */\n onChangeActivity?: (activity: any) => void;\n}\n/**\n * EXPORTS\n */\nexport { type IStepIndicator, IStyleProps };\n"],"mappings":"","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,13 @@ 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";
39
43
 
40
44
  // Utilities
41
45
  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","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\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"],"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,SAASP,OAAO,IAAIQ,YAAY,QAAQ,oCAAoC;AAC5E,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,sCAAsC;AACtE,SAASC,qBAAqB,QAAQ,sCAAsC;AAC5E,SAASC,mBAAmB,QAAQ,2CAA2C;AAC/E,SAASjC,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;;AAE/F;AACA,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,eAAe,QAAQ,qBAAqB;;AAEnF;AACA,SAASC,KAAK,QAAQ,sBAAsB","ignoreList":[]}
@@ -0,0 +1,253 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ /**
3
+ * IMPORTS
4
+ */
5
+ import React, { useState } from "react";
6
+ import { View, Text } from "react-native";
7
+
8
+ // components
9
+ import InputTextCounter from "../../components/input-text-counter";
10
+ /**
11
+ * META
12
+ */
13
+ const meta = {
14
+ title: "componente/InputTextCounter",
15
+ component: InputTextCounter,
16
+ tags: ["autodocs"],
17
+ args: {
18
+ label: "Descreva o problema encontrado",
19
+ placeholder: "Ex: O caminhão apresentou falha no freio durante o trajeto...",
20
+ // props comuns de TextInput (assumindo que o componente as repasse):
21
+ maxLength: 150,
22
+ multiline: true
23
+ },
24
+ argTypes: {
25
+ label: {
26
+ control: {
27
+ type: "text"
28
+ },
29
+ description: "Rótulo exibido acima do campo.",
30
+ table: {
31
+ category: "Aparência"
32
+ }
33
+ },
34
+ placeholder: {
35
+ control: {
36
+ type: "text"
37
+ },
38
+ description: "Texto de dica quando o campo está vazio.",
39
+ table: {
40
+ category: "Aparência"
41
+ }
42
+ },
43
+ maxLength: {
44
+ control: {
45
+ type: "number",
46
+ min: 50,
47
+ max: 500,
48
+ step: 10
49
+ },
50
+ description: "Limite máximo de caracteres (ex.: 150).",
51
+ table: {
52
+ category: "Comportamento"
53
+ }
54
+ },
55
+ multiline: {
56
+ control: {
57
+ type: "boolean"
58
+ },
59
+ description: "Habilita múltiplas linhas para textos longos.",
60
+ table: {
61
+ category: "Comportamento"
62
+ }
63
+ },
64
+ editable: {
65
+ control: {
66
+ type: "boolean"
67
+ },
68
+ description: "Se falso, o campo fica somente leitura (desabilitado).",
69
+ table: {
70
+ category: "Comportamento"
71
+ }
72
+ },
73
+ defaultValue: {
74
+ control: {
75
+ type: "text"
76
+ },
77
+ description: "Valor inicial não controlado (apenas na montagem).",
78
+ table: {
79
+ category: "Valor"
80
+ }
81
+ },
82
+ value: {
83
+ control: {
84
+ type: "text"
85
+ },
86
+ description: "Valor controlado do campo. Use junto de `onChangeText` (controlado).",
87
+ table: {
88
+ category: "Valor"
89
+ }
90
+ },
91
+ onChangeText: {
92
+ action: "onChangeText",
93
+ description: "Callback disparado a cada alteração de texto.",
94
+ table: {
95
+ category: "Eventos"
96
+ }
97
+ }
98
+ },
99
+ parameters: {
100
+ controls: {
101
+ expanded: true
102
+ },
103
+ layout: "centered",
104
+ notes: `
105
+ # InputTextCounter
106
+
107
+ Campo de texto **multilinha** para descrição de manutenção com **contador de caracteres** e estilo seguindo o Figma.
108
+
109
+ ## ✅ Recursos
110
+ - **Contador dinâmico** (ex.: \`85/150\`)
111
+ - **Limite configurável** via \`maxLength\` (padrão: 150)
112
+ - **Multilinha** para textos longos
113
+ - **Placeholder** claro com exemplo de preenchimento
114
+
115
+ ## 🔧 Props principais
116
+ - \`label: string\` — título acima do campo
117
+ - \`placeholder: string\` — dica de preenchimento
118
+ - \`maxLength?: number\` — limite de caracteres (ex.: 150)
119
+ - \`multiline?: boolean\` — permite múltiplas linhas
120
+ - \`editable?: boolean\` — desabilita/ativa edição
121
+ - \`defaultValue?: string\` — valor inicial (não controlado)
122
+ - \`value?: string\`, \`onChangeText?: (t: string) => void\` — modo controlado
123
+
124
+ > Observação: se o componente estende \`TextInputProps\`, essas props já são suportadas.
125
+
126
+ ## 🧩 Padrões de UX
127
+ - Mostre o **contador** sempre que houver \`maxLength\`.
128
+ - Use \`placeholder\` com **exemplo concreto** (melhora taxa de preenchimento).
129
+ - Em formulários longos, mantenha o campo **multilinha** com altura inicial confortável.
130
+
131
+ ## 🧪 Testes (ideias)
132
+ - Renderiza label e placeholder corretos
133
+ - Respeita \`maxLength\` e exibe contador
134
+ - Dispara \`onChangeText\` ao digitar
135
+ - \`editable=false\` impede edição
136
+
137
+ ## 💡 Uso básico
138
+ \`\`\`tsx
139
+ <InputTextCounter
140
+ label="Descreva o problema encontrado"
141
+ placeholder="Ex: O caminhão apresentou falha no freio durante o trajeto..."
142
+ maxLength={150}
143
+ multiline
144
+ />
145
+ \`\`\`
146
+ `
147
+ },
148
+ decorators: [Story => /*#__PURE__*/React.createElement(View, {
149
+ style: {
150
+ width: 360,
151
+ padding: 16,
152
+ backgroundColor: "#F7F7F7",
153
+ borderRadius: 12
154
+ }
155
+ }, /*#__PURE__*/React.createElement(Story, null))]
156
+ };
157
+ export default meta;
158
+ /**
159
+ * STORIES
160
+ */
161
+
162
+ // 1) Padrão
163
+ export const InputDefault = {
164
+ name: "input-descricao-default",
165
+ args: {
166
+ label: "Descrição da manutenção",
167
+ placeholder: "Ex: Vazamento de óleo no motor.",
168
+ maxLength: 150,
169
+ multiline: true
170
+ }
171
+ };
172
+
173
+ // 2) Valor inicial (não controlado)
174
+ export const ComValorInicial = {
175
+ name: "com-valor-inicial",
176
+ args: {
177
+ defaultValue: "Durante o trajeto na BR-262, notei ruído metálico vindo da roda traseira direita."
178
+ }
179
+ };
180
+
181
+ // 3) Perto do limite (simula campo quase cheio)
182
+ export const PertoDoLimite = {
183
+ name: "perto-do-limite",
184
+ args: {
185
+ maxLength: 100,
186
+ defaultValue: "Barulho intermitente na transmissão ao reduzir de 4ª para 3ª em descida."
187
+ }
188
+ };
189
+
190
+ // 4) Desabilitado / Somente leitura
191
+ export const Desabilitado = {
192
+ name: "desabilitado",
193
+ args: {
194
+ editable: false,
195
+ placeholder: "Campo indisponível no momento"
196
+ },
197
+ parameters: {
198
+ docs: {
199
+ description: {
200
+ story: "Use `editable={false}` para estados de checklist revisado ou quando a OS estiver bloqueada."
201
+ }
202
+ }
203
+ }
204
+ };
205
+
206
+ // 5) Interativo controlado (demonstração de value + onChangeText)
207
+ export const ControladoInterativo = {
208
+ name: "controlado-interativo",
209
+ render: args => {
210
+ const Wrapper = () => {
211
+ var _args$label, _args$maxLength;
212
+ const [text, setText] = useState("Inicial: ruído ao frear levemente após 20min de uso.");
213
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(InputTextCounter, _extends({}, args, {
214
+ label: (_args$label = args.label) !== null && _args$label !== void 0 ? _args$label : "Descrição",
215
+ value: text,
216
+ onChangeText: t => {
217
+ var _args$onChangeText;
218
+ setText(t);
219
+ // Storybook action:
220
+ // @ts-ignore - vincula ao painel de ações se existir
221
+ args === null || args === void 0 || (_args$onChangeText = args.onChangeText) === null || _args$onChangeText === void 0 || _args$onChangeText.call(args, t);
222
+ }
223
+ })), /*#__PURE__*/React.createElement(Text, {
224
+ style: {
225
+ marginTop: 8,
226
+ fontSize: 12,
227
+ color: "#666"
228
+ }
229
+ }, text.length, "/", (_args$maxLength = args.maxLength) !== null && _args$maxLength !== void 0 ? _args$maxLength : 150, " caracteres"));
230
+ };
231
+ return /*#__PURE__*/React.createElement(Wrapper, null);
232
+ },
233
+ args: {
234
+ maxLength: 200,
235
+ multiline: true
236
+ },
237
+ parameters: {
238
+ docs: {
239
+ description: {
240
+ story: "Exemplo **controlado**: o estado vive no Story e é atualizado via `onChangeText`."
241
+ }
242
+ }
243
+ }
244
+ };
245
+
246
+ // 6) Placeholder extenso (orientação contextual)
247
+ export const PlaceholderOrientativo = {
248
+ name: "placeholder-orientativo",
249
+ args: {
250
+ placeholder: "Descreva quando ocorreu, o local no veículo e se o problema é constante ou intermitente."
251
+ }
252
+ };
253
+ //# sourceMappingURL=input-text-counter.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","View","Text","InputTextCounter","meta","title","component","tags","args","label","placeholder","maxLength","multiline","argTypes","control","type","description","table","category","min","max","step","editable","defaultValue","value","onChangeText","action","parameters","controls","expanded","layout","notes","decorators","Story","createElement","style","width","padding","backgroundColor","borderRadius","InputDefault","name","ComValorInicial","PertoDoLimite","Desabilitado","docs","story","ControladoInterativo","render","Wrapper","_args$label","_args$maxLength","text","setText","_extends","t","_args$onChangeText","call","marginTop","fontSize","color","length","PlaceholderOrientativo"],"sources":["input-text-counter.stories.tsx"],"sourcesContent":["/**\r\n * IMPORTS\r\n */\r\nimport React, { useState } from \"react\";\r\nimport { View, Text } from \"react-native\";\r\n\r\n// components\r\nimport InputTextCounter from \"../../components/input-text-counter\";\r\n\r\nimport type { Meta, StoryObj } from \"@storybook/react\";\r\n\r\n/**\r\n * META\r\n */\r\nconst meta: Meta<typeof InputTextCounter> = {\r\n title: \"componente/InputTextCounter\",\r\n component: InputTextCounter as React.FC,\r\n tags: [\"autodocs\"],\r\n args: {\r\n label: \"Descreva o problema encontrado\",\r\n placeholder: \"Ex: O caminhão apresentou falha no freio durante o trajeto...\",\r\n // props comuns de TextInput (assumindo que o componente as repasse):\r\n maxLength: 150,\r\n multiline: true,\r\n },\r\n argTypes: {\r\n label: {\r\n control: { type: \"text\" },\r\n description: \"Rótulo exibido acima do campo.\",\r\n table: { category: \"Aparência\" },\r\n },\r\n placeholder: {\r\n control: { type: \"text\" },\r\n description: \"Texto de dica quando o campo está vazio.\",\r\n table: { category: \"Aparência\" },\r\n },\r\n maxLength: {\r\n control: { type: \"number\", min: 50, max: 500, step: 10 },\r\n description: \"Limite máximo de caracteres (ex.: 150).\",\r\n table: { category: \"Comportamento\" },\r\n },\r\n multiline: {\r\n control: { type: \"boolean\" },\r\n description: \"Habilita múltiplas linhas para textos longos.\",\r\n table: { category: \"Comportamento\" },\r\n },\r\n editable: {\r\n control: { type: \"boolean\" },\r\n description: \"Se falso, o campo fica somente leitura (desabilitado).\",\r\n table: { category: \"Comportamento\" },\r\n },\r\n defaultValue: {\r\n control: { type: \"text\" },\r\n description: \"Valor inicial não controlado (apenas na montagem).\",\r\n table: { category: \"Valor\" },\r\n },\r\n value: {\r\n control: { type: \"text\" },\r\n description: \"Valor controlado do campo. Use junto de `onChangeText` (controlado).\",\r\n table: { category: \"Valor\" },\r\n },\r\n onChangeText: {\r\n action: \"onChangeText\",\r\n description: \"Callback disparado a cada alteração de texto.\",\r\n table: { category: \"Eventos\" },\r\n },\r\n },\r\n parameters: {\r\n controls: { expanded: true },\r\n layout: \"centered\",\r\n notes: `\r\n# InputTextCounter\r\n\r\nCampo de texto **multilinha** para descrição de manutenção com **contador de caracteres** e estilo seguindo o Figma.\r\n\r\n## ✅ Recursos\r\n- **Contador dinâmico** (ex.: \\`85/150\\`)\r\n- **Limite configurável** via \\`maxLength\\` (padrão: 150)\r\n- **Multilinha** para textos longos\r\n- **Placeholder** claro com exemplo de preenchimento\r\n\r\n## 🔧 Props principais\r\n- \\`label: string\\` — título acima do campo\r\n- \\`placeholder: string\\` — dica de preenchimento\r\n- \\`maxLength?: number\\` — limite de caracteres (ex.: 150)\r\n- \\`multiline?: boolean\\` — permite múltiplas linhas\r\n- \\`editable?: boolean\\` — desabilita/ativa edição\r\n- \\`defaultValue?: string\\` — valor inicial (não controlado)\r\n- \\`value?: string\\`, \\`onChangeText?: (t: string) => void\\` — modo controlado\r\n\r\n> Observação: se o componente estende \\`TextInputProps\\`, essas props já são suportadas.\r\n\r\n## 🧩 Padrões de UX\r\n- Mostre o **contador** sempre que houver \\`maxLength\\`.\r\n- Use \\`placeholder\\` com **exemplo concreto** (melhora taxa de preenchimento).\r\n- Em formulários longos, mantenha o campo **multilinha** com altura inicial confortável.\r\n\r\n## 🧪 Testes (ideias)\r\n- Renderiza label e placeholder corretos\r\n- Respeita \\`maxLength\\` e exibe contador\r\n- Dispara \\`onChangeText\\` ao digitar\r\n- \\`editable=false\\` impede edição\r\n\r\n## 💡 Uso básico\r\n\\`\\`\\`tsx\r\n<InputTextCounter\r\n label=\"Descreva o problema encontrado\"\r\n placeholder=\"Ex: O caminhão apresentou falha no freio durante o trajeto...\"\r\n maxLength={150}\r\n multiline\r\n/>\r\n\\`\\`\\`\r\n`,\r\n },\r\n decorators: [\r\n (Story) => (\r\n <View\r\n style={{\r\n width: 360,\r\n padding: 16,\r\n backgroundColor: \"#F7F7F7\",\r\n borderRadius: 12,\r\n }}\r\n >\r\n <Story />\r\n </View>\r\n ),\r\n ],\r\n};\r\n\r\nexport default meta;\r\n\r\ntype Story = StoryObj<typeof meta>;\r\n\r\n/**\r\n * STORIES\r\n */\r\n\r\n// 1) Padrão\r\nexport const InputDefault: Story = {\r\n name: \"input-descricao-default\",\r\n args: {\r\n label: \"Descrição da manutenção\",\r\n placeholder: \"Ex: Vazamento de óleo no motor.\",\r\n maxLength: 150,\r\n multiline: true,\r\n },\r\n};\r\n\r\n// 2) Valor inicial (não controlado)\r\nexport const ComValorInicial: Story = {\r\n name: \"com-valor-inicial\",\r\n args: {\r\n defaultValue:\r\n \"Durante o trajeto na BR-262, notei ruído metálico vindo da roda traseira direita.\",\r\n },\r\n};\r\n\r\n// 3) Perto do limite (simula campo quase cheio)\r\nexport const PertoDoLimite: Story = {\r\n name: \"perto-do-limite\",\r\n args: {\r\n maxLength: 100,\r\n defaultValue: \"Barulho intermitente na transmissão ao reduzir de 4ª para 3ª em descida.\",\r\n },\r\n};\r\n\r\n// 4) Desabilitado / Somente leitura\r\nexport const Desabilitado: Story = {\r\n name: \"desabilitado\",\r\n args: {\r\n editable: false,\r\n placeholder: \"Campo indisponível no momento\",\r\n },\r\n parameters: {\r\n docs: {\r\n description: {\r\n story:\r\n \"Use `editable={false}` para estados de checklist revisado ou quando a OS estiver bloqueada.\",\r\n },\r\n },\r\n },\r\n};\r\n\r\n// 5) Interativo controlado (demonstração de value + onChangeText)\r\nexport const ControladoInterativo: Story = {\r\n name: \"controlado-interativo\",\r\n render: (args) => {\r\n const Wrapper = () => {\r\n const [text, setText] = useState(\"Inicial: ruído ao frear levemente após 20min de uso.\");\r\n return (\r\n <View>\r\n <InputTextCounter\r\n {...args}\r\n label={args.label ?? \"Descrição\"}\r\n value={text}\r\n onChangeText={(t: string) => {\r\n setText(t);\r\n // Storybook action:\r\n // @ts-ignore - vincula ao painel de ações se existir\r\n args?.onChangeText?.(t);\r\n }}\r\n />\r\n <Text style={{ marginTop: 8, fontSize: 12, color: \"#666\" }}>\r\n {text.length}/{args.maxLength ?? 150} caracteres\r\n </Text>\r\n </View>\r\n );\r\n };\r\n return <Wrapper />;\r\n },\r\n args: {\r\n maxLength: 200,\r\n multiline: true,\r\n },\r\n parameters: {\r\n docs: {\r\n description: {\r\n story: \"Exemplo **controlado**: o estado vive no Story e é atualizado via `onChangeText`.\",\r\n },\r\n },\r\n },\r\n};\r\n\r\n// 6) Placeholder extenso (orientação contextual)\r\nexport const PlaceholderOrientativo: Story = {\r\n name: \"placeholder-orientativo\",\r\n args: {\r\n placeholder:\r\n \"Descreva quando ocorreu, o local no veículo e se o problema é constante ou intermitente.\",\r\n },\r\n};\r\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;;AAEzC;AACA,OAAOC,gBAAgB,MAAM,qCAAqC;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ACFxD,KAAA,CAAAmC,aAAA,CAAChC,IAAI;QAACiC,KAAK,EAAE;UAAEuB,SAAS,EAAE,CAAC;UAAEC,QAAQ,EAAE,EAAE;UAAEC,KAAK,EAAE;QAAO;MAAE,GACxDR,IAAI,CAACS,MAAM,EAAC,GAAC,GAAAV,eAAA,GAAC3C,IAAI,CAACG,SAAS,cAAAwC,eAAA,cAAAA,eAAA,GAAI,GAAG,EAAC,aACjC,CACF,CAAC;IAEX,CAAC;IACD,oBAAOpD,KAAA,CAAAmC,aAAA,CAACe,OAAO,MAAE,CAAC;EACpB,CAAC;EACDzC,IAAI,EAAE;IACJG,SAAS,EAAE,GAAG;IACdC,SAAS,EAAE;EACb,CAAC;EACDe,UAAU,EAAE;IACVkB,IAAI,EAAE;MACJ7B,WAAW,EAAE;QACX8B,KAAK,EAAE;MACT;IACF;EACF;AACF,CAAC;;AAED;AACA,OAAO,MAAMgB,sBAA6B,GAAG;EAC3CrB,IAAI,EAAE,yBAAyB;EAC/BjC,IAAI,EAAE;IACJE,WAAW,EACT;EACJ;AACF,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { ModalActivities } from "../../components/modal-activities";
1
+ import { ModalActivities } from "../../components/modals/modal-activities";
2
2
  const meta = {
3
3
  title: "componente/ModalActivities",
4
4
  component: ModalActivities,
@@ -1 +1 @@
1
- {"version":3,"names":["ModalActivities","meta","title","component","args","width","onClose","activityType","isLoading","handleActivity","activity","parameters","notes","DefaultWork","name","DefaultRest","style","marginLeft"],"sources":["modal-activities.stories.tsx"],"sourcesContent":["import { StoryObj, Meta } from \"@storybook/react\";\nimport { ModalActivities } from \"../../components/modal-activities\";\nimport { IActivity } from \"../../components/modal-activities/interface\";\n\nconst meta: Meta<typeof ModalActivities> = {\n title: \"componente/ModalActivities\",\n component: ModalActivities,\n args: {\n width: 120,\n onClose: () => {},\n activityType: \"trabalho\",\n isLoading: false,\n handleActivity: (activity: IActivity) => {\n return activity;\n },\n },\n parameters: {\n notes: `\n# MenuItem\n\nEste é um componente de MenuItem de menu.\nVocê usa assim:\n\\`\\`\\`tsx\n <ModalActivities\n {...args}\n activityType={activity?.tipo || \"trabalho\"}\n onClose={() => setIsVisible(false)}\n handleActivity={handleActivity}\n />\n\\`\\`\\`\n`,\n },\n};\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const DefaultWork: Story = {\n name: \"modal-activities-work\",\n args: {\n isLoading: false,\n activityType: \"trabalho\",\n onClose: () => {},\n handleActivity: (activity: IActivity) => () => {\n return activity;\n },\n },\n};\n\nexport const DefaultRest: Story = {\n name: \"modal-activities-rest\",\n args: {\n isLoading: false,\n activityType: \"descanso\",\n style: {\n marginLeft: 0,\n },\n onClose: () => {},\n handleActivity: (activity: IActivity) => () => {\n return activity;\n },\n },\n};\n"],"mappings":"AACA,SAASA,eAAe,QAAQ,mCAAmC;AAGnE,MAAMC,IAAkC,GAAG;EACzCC,KAAK,EAAE,4BAA4B;EACnCC,SAAS,EAAEH,eAAe;EAC1BI,IAAI,EAAE;IACJC,KAAK,EAAE,GAAG;IACVC,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;IACjBC,YAAY,EAAE,UAAU;IACxBC,SAAS,EAAE,KAAK;IAChBC,cAAc,EAAGC,QAAmB,IAAK;MACvC,OAAOA,QAAQ;IACjB;EACF,CAAC;EACDC,UAAU,EAAE;IACVC,KAAK,EAAE;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE;AACF,CAAC;AAED,eAAeX,IAAI;AAInB,OAAO,MAAMY,WAAkB,GAAG;EAChCC,IAAI,EAAE,uBAAuB;EAC7BV,IAAI,EAAE;IACJI,SAAS,EAAE,KAAK;IAChBD,YAAY,EAAE,UAAU;IACxBD,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;IACjBG,cAAc,EAAGC,QAAmB,IAAK,MAAM;MAC7C,OAAOA,QAAQ;IACjB;EACF;AACF,CAAC;AAED,OAAO,MAAMK,WAAkB,GAAG;EAChCD,IAAI,EAAE,uBAAuB;EAC7BV,IAAI,EAAE;IACJI,SAAS,EAAE,KAAK;IAChBD,YAAY,EAAE,UAAU;IACxBS,KAAK,EAAE;MACLC,UAAU,EAAE;IACd,CAAC;IACDX,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;IACjBG,cAAc,EAAGC,QAAmB,IAAK,MAAM;MAC7C,OAAOA,QAAQ;IACjB;EACF;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["ModalActivities","meta","title","component","args","width","onClose","activityType","isLoading","handleActivity","activity","parameters","notes","DefaultWork","name","DefaultRest","style","marginLeft"],"sources":["modal-activities.stories.tsx"],"sourcesContent":["import { StoryObj, Meta } from \"@storybook/react\";\r\nimport { ModalActivities } from \"../../components/modals/modal-activities\";\r\nimport { IActivity } from \"../../components/modals/modal-activities/interface\";\r\n\r\nconst meta: Meta<typeof ModalActivities> = {\r\n title: \"componente/ModalActivities\",\r\n component: ModalActivities,\r\n args: {\r\n width: 120,\r\n onClose: () => {},\r\n activityType: \"trabalho\",\r\n isLoading: false,\r\n handleActivity: (activity: IActivity) => {\r\n return activity;\r\n },\r\n },\r\n parameters: {\r\n notes: `\r\n# MenuItem\r\n\r\nEste é um componente de MenuItem de menu.\r\nVocê usa assim:\r\n\\`\\`\\`tsx\r\n <ModalActivities\r\n {...args}\r\n activityType={activity?.tipo || \"trabalho\"}\r\n onClose={() => setIsVisible(false)}\r\n handleActivity={handleActivity}\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 DefaultWork: Story = {\r\n name: \"modal-activities-work\",\r\n args: {\r\n isLoading: false,\r\n activityType: \"trabalho\",\r\n onClose: () => {},\r\n handleActivity: (activity: IActivity) => () => {\r\n return activity;\r\n },\r\n },\r\n};\r\n\r\nexport const DefaultRest: Story = {\r\n name: \"modal-activities-rest\",\r\n args: {\r\n isLoading: false,\r\n activityType: \"descanso\",\r\n style: {\r\n marginLeft: 0,\r\n },\r\n onClose: () => {},\r\n handleActivity: (activity: IActivity) => () => {\r\n return activity;\r\n },\r\n },\r\n};\r\n"],"mappings":"AACA,SAASA,eAAe,QAAQ,0CAA0C;AAG1E,MAAMC,IAAkC,GAAG;EACzCC,KAAK,EAAE,4BAA4B;EACnCC,SAAS,EAAEH,eAAe;EAC1BI,IAAI,EAAE;IACJC,KAAK,EAAE,GAAG;IACVC,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;IACjBC,YAAY,EAAE,UAAU;IACxBC,SAAS,EAAE,KAAK;IAChBC,cAAc,EAAGC,QAAmB,IAAK;MACvC,OAAOA,QAAQ;IACjB;EACF,CAAC;EACDC,UAAU,EAAE;IACVC,KAAK,EAAE;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE;AACF,CAAC;AAED,eAAeX,IAAI;AAInB,OAAO,MAAMY,WAAkB,GAAG;EAChCC,IAAI,EAAE,uBAAuB;EAC7BV,IAAI,EAAE;IACJI,SAAS,EAAE,KAAK;IAChBD,YAAY,EAAE,UAAU;IACxBD,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;IACjBG,cAAc,EAAGC,QAAmB,IAAK,MAAM;MAC7C,OAAOA,QAAQ;IACjB;EACF;AACF,CAAC;AAED,OAAO,MAAMK,WAAkB,GAAG;EAChCD,IAAI,EAAE,uBAAuB;EAC7BV,IAAI,EAAE;IACJI,SAAS,EAAE,KAAK;IAChBD,YAAY,EAAE,UAAU;IACxBS,KAAK,EAAE;MACLC,UAAU,EAAE;IACd,CAAC;IACDX,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC;IACjBG,cAAc,EAAGC,QAAmB,IAAK,MAAM;MAC7C,OAAOA,QAAQ;IACjB;EACF;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,193 @@
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ /**
3
+ * IMPORTS
4
+ */
5
+ import React, { useState } from "react";
6
+ import { View, Text, Button } from "react-native";
7
+
8
+ // components
9
+ import ModalActivityReason from "../../components/modals/modal-activity-reason";
10
+
11
+ /**
12
+ * META
13
+ */
14
+ const meta = {
15
+ title: "componente/ModalActivityReason",
16
+ component: ModalActivityReason,
17
+ tags: ["autodocs"],
18
+ args: {
19
+ visible: false,
20
+ textTitle: undefined
21
+ },
22
+ argTypes: {
23
+ visible: {
24
+ control: {
25
+ type: "boolean"
26
+ },
27
+ description: "Controla a visibilidade do modal.",
28
+ table: {
29
+ category: "Comportamento"
30
+ }
31
+ },
32
+ textTitle: {
33
+ control: {
34
+ type: "text"
35
+ },
36
+ description: "Título exibido no cabeçalho do modal. Se não informado, usa 'Motivo da exclusão'.",
37
+ table: {
38
+ category: "Aparência"
39
+ }
40
+ },
41
+ onClose: {
42
+ action: "onClose",
43
+ description: "Chamado ao fechar/cancelar o modal. Deve alternar `visible` para `false` no uso controlado.",
44
+ table: {
45
+ category: "Eventos"
46
+ }
47
+ },
48
+ modalConfirm: {
49
+ action: "modalConfirm",
50
+ description: "Chamado ao confirmar a ação. Por padrão, o componente chama `modalConfirm(true)` e em seguida `onClose()`.",
51
+ table: {
52
+ category: "Eventos"
53
+ }
54
+ }
55
+ },
56
+ parameters: {
57
+ controls: {
58
+ expanded: true
59
+ },
60
+ layout: "centered",
61
+ docs: {
62
+ description: {
63
+ component: `
64
+ ### ModalActivityReason
65
+
66
+ Modal para solicitar **motivo/justificativa** antes de executar uma ação crítica (ex.: excluir atividade).
67
+
68
+ #### Recursos
69
+ - Título personalizável via \`textTitle\`
70
+ - Campo de texto (interno) para descrição do motivo
71
+ - Botões **CANCELAR** e **CONFIRMAR**
72
+ - Dispara \`onClose\` e \`modalConfirm\` conforme interação do usuário
73
+
74
+ #### Props
75
+ - \`visible: boolean\` — controla abertura/fechamento do modal
76
+ - \`onClose: () => void\` — chamado ao cancelar/fechar
77
+ - \`modalConfirm: (ok?: boolean) => void\` — chamado ao confirmar; o componente invoca \`modalConfirm(true)\` e depois \`onClose()\`
78
+ - \`textTitle?: string\` — título opcional do cabeçalho
79
+
80
+ > Caso \`textTitle\` não seja informado, o título padrão é **"Motivo da exclusão"**.
81
+
82
+ #### Padrão de Uso (controlado)
83
+ No consumo real, gerencie o estado \`visible\` fora do componente e passe callbacks:
84
+ \`\`\`tsx
85
+ const [open, setOpen] = useState(false);
86
+
87
+ <ModalActivityReason
88
+ visible={open}
89
+ onClose={() => setOpen(false)}
90
+ modalConfirm={() => {
91
+ // enviar justificativa para API (se o componente expuser)
92
+ setOpen(false);
93
+ }}
94
+ textTitle="Motivo da exclusão"
95
+ />
96
+ \`\`\`
97
+
98
+ #### Testes (ideias)
99
+ - Renderiza com \`visible=true\`
100
+ - Exibe título padrão e título customizado
101
+ - Dispara \`onClose\` ao cancelar
102
+ - Dispara \`modalConfirm\` ao confirmar (e fecha em seguida)
103
+ `
104
+ }
105
+ }
106
+ },
107
+ decorators: [Story => /*#__PURE__*/React.createElement(View, {
108
+ style: {
109
+ width: 360,
110
+ padding: 16,
111
+ backgroundColor: "#F7F7F7",
112
+ borderRadius: 12
113
+ }
114
+ }, /*#__PURE__*/React.createElement(Story, null))]
115
+ };
116
+ export default meta;
117
+ /**
118
+ * STORIES
119
+ */
120
+
121
+ // 1) Aberto (básico)
122
+ export const AbertoBasico = {
123
+ name: "aberto-basico",
124
+ args: {
125
+ visible: true
126
+ }
127
+ };
128
+
129
+ // 2) Fechado (estado inicial comum)
130
+ export const Fechado = {
131
+ name: "fechado",
132
+ args: {
133
+ visible: false
134
+ }
135
+ };
136
+
137
+ // 3) Com título personalizado
138
+ export const TituloPersonalizado = {
139
+ name: "titulo-personalizado",
140
+ args: {
141
+ visible: true,
142
+ textTitle: "Justifique a alteração da atividade"
143
+ }
144
+ };
145
+
146
+ // 4) Interativo (controlado) — demonstra fluxo completo
147
+ export const ControladoInterativo = {
148
+ name: "controlado-interativo",
149
+ render: args => {
150
+ const Wrapper = () => {
151
+ var _args$textTitle;
152
+ const [open, setOpen] = useState(false);
153
+ return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(Button, {
154
+ title: "Abrir modal",
155
+ onPress: () => setOpen(true)
156
+ }), /*#__PURE__*/React.createElement(Text, {
157
+ style: {
158
+ marginTop: 12,
159
+ fontSize: 12,
160
+ color: "#666"
161
+ }
162
+ }, "Clique para abrir e testar CANCELAR/CONFIRMAR."), /*#__PURE__*/React.createElement(ModalActivityReason, _extends({}, args, {
163
+ visible: open,
164
+ onClose: () => {
165
+ var _args$onClose;
166
+ // aciona painel de ações do Storybook
167
+ // @ts-ignore
168
+ args === null || args === void 0 || (_args$onClose = args.onClose) === null || _args$onClose === void 0 || _args$onClose.call(args);
169
+ setOpen(false);
170
+ },
171
+ modalConfirm: ok => {
172
+ var _args$modalConfirm;
173
+ // @ts-ignore
174
+ args === null || args === void 0 || (_args$modalConfirm = args.modalConfirm) === null || _args$modalConfirm === void 0 || _args$modalConfirm.call(args, ok);
175
+ setOpen(false);
176
+ },
177
+ textTitle: (_args$textTitle = args.textTitle) !== null && _args$textTitle !== void 0 ? _args$textTitle : "Motivo da exclusão"
178
+ })));
179
+ };
180
+ return /*#__PURE__*/React.createElement(Wrapper, null);
181
+ },
182
+ args: {
183
+ visible: false
184
+ },
185
+ parameters: {
186
+ docs: {
187
+ description: {
188
+ story: "Exemplo **controlado**: o estado `visible` é gerenciado no Story para simular uso real."
189
+ }
190
+ }
191
+ }
192
+ };
193
+ //# sourceMappingURL=modal-activity-reason.stories.js.map