react-native-exp-fig 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/common/icons-svg/agent/index.js +2 -2
- package/lib/commonjs/common/icons-svg/agent/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/bed/index.js +4 -4
- package/lib/commonjs/common/icons-svg/bed/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/car/index.js +4 -4
- package/lib/commonjs/common/icons-svg/car/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/check-outline/index.js +6 -6
- package/lib/commonjs/common/icons-svg/check-outline/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/coffee/index.js +4 -4
- package/lib/commonjs/common/icons-svg/coffee/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/constants/index.js +2 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/hourglass/index.js +36 -0
- package/lib/commonjs/common/icons-svg/hourglass/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/index.js +8 -1
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/pencil/index.js +4 -4
- package/lib/commonjs/common/icons-svg/pencil/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/refresh-ccw-dot/index.js +2 -2
- package/lib/commonjs/common/icons-svg/refresh-ccw-dot/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/truck-activity/index.js +4 -4
- package/lib/commonjs/common/icons-svg/truck-activity/index.js.map +1 -1
- package/lib/commonjs/components/activities-daily/index.js +4 -4
- package/lib/commonjs/components/activities-daily/index.js.map +1 -1
- package/lib/commonjs/components/activities-daily/interface.d.js.map +1 -1
- package/lib/commonjs/components/activities-progress/index.js +4 -4
- package/lib/commonjs/components/activities-progress/index.js.map +1 -1
- package/lib/commonjs/components/activities-progress/interface.d.js.map +1 -1
- package/lib/commonjs/components/avatar-profile/index.js.map +1 -1
- package/lib/commonjs/components/avatar-profile/interface.d.js.map +1 -1
- package/lib/commonjs/components/button/styles.js +1 -1
- package/lib/commonjs/components/button/styles.js.map +1 -1
- package/lib/commonjs/components/card-history/index.js +62 -12
- package/lib/commonjs/components/card-history/index.js.map +1 -1
- package/lib/commonjs/components/card-history/interface.d.js.map +1 -1
- package/lib/commonjs/components/card-loading/index.js +21 -10
- package/lib/commonjs/components/card-loading/index.js.map +1 -1
- package/lib/commonjs/components/card-work-session/index.js +4 -4
- package/lib/commonjs/components/card-work-session/index.js.map +1 -1
- package/lib/commonjs/components/check-box/index.js +6 -6
- package/lib/commonjs/components/check-box/index.js.map +1 -1
- package/lib/commonjs/components/check-box/interface.d.js.map +1 -1
- package/lib/commonjs/components/coil/index.js +4 -4
- package/lib/commonjs/components/coil/index.js.map +1 -1
- package/lib/commonjs/components/coil/interface.d.js.map +1 -1
- package/lib/commonjs/components/filter-date-selector/index.js +7 -7
- package/lib/commonjs/components/filter-date-selector/index.js.map +1 -1
- package/lib/commonjs/components/history-details/index.js +1 -2
- package/lib/commonjs/components/history-details/index.js.map +1 -1
- package/lib/commonjs/components/history-details/interface.d.js.map +1 -1
- package/lib/commonjs/components/image-capture-with-remove/index.js +11 -10
- package/lib/commonjs/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/commonjs/components/image-capture-with-remove/interface.d.js.map +1 -1
- package/lib/commonjs/components/loading-progress/index.js +3 -1
- package/lib/commonjs/components/loading-progress/index.js.map +1 -1
- package/lib/commonjs/components/modal-activities/index.js +155 -0
- package/lib/commonjs/components/modal-activities/index.js.map +1 -0
- package/lib/commonjs/components/modal-activities/interface.d.js +6 -0
- package/lib/commonjs/components/modal-activities/interface.d.js.map +1 -0
- package/lib/commonjs/components/notification-loading/index.js +9 -2
- package/lib/commonjs/components/notification-loading/index.js.map +1 -1
- package/lib/commonjs/components/notification-loading/interface.d.js.map +1 -1
- package/lib/commonjs/components/profile-menu-option/index.js.map +1 -1
- package/lib/commonjs/components/profile-menu-option/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/index.js +6 -6
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/step-indicator/interface.d.js.map +1 -1
- package/lib/commonjs/components/step-indicator/styles.js +9 -8
- package/lib/commonjs/components/step-indicator/styles.js.map +1 -1
- package/lib/commonjs/components/user-profile/index.js +6 -6
- package/lib/commonjs/components/user-profile/index.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/activities-daily/activities-daily.stories.js.map +1 -1
- package/lib/commonjs/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/commonjs/stories/avatar-profile/avatar-profile.stories.js.map +1 -1
- package/lib/commonjs/stories/card-loading/card-loading.stories.js.map +1 -1
- package/lib/commonjs/stories/check-box/check-box.stories.js.map +1 -1
- package/lib/commonjs/stories/coil/coil.stories.js.map +1 -1
- package/lib/commonjs/stories/filter-date-selector/filter-date-selector.stories.js.map +1 -1
- package/lib/commonjs/stories/history-details/history-details.stories.js.map +1 -1
- package/lib/commonjs/stories/image-capture-with-remove/image-capture-with-remove.stories.js.map +1 -1
- package/lib/commonjs/stories/modal-activities/modal-activities.stories.js +47 -0
- package/lib/commonjs/stories/modal-activities/modal-activities.stories.js.map +1 -0
- package/lib/commonjs/stories/notification-loading/notification-loading.stories.js.map +1 -1
- package/lib/commonjs/stories/profile-menu-option/profile-menu-option.stories.js.map +1 -1
- package/lib/commonjs/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/commonjs/styles/global/interface.d.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +6 -5
- package/lib/commonjs/styles/theme/theme.js.map +1 -1
- package/lib/commonjs/utils/format-data/index.js +11 -11
- package/lib/commonjs/utils/format-data/index.js.map +1 -1
- package/lib/commonjs/utils/status-color/return-color.js +12 -2
- package/lib/commonjs/utils/status-color/return-color.js.map +1 -1
- package/lib/module/common/icons-svg/agent/index.js +2 -2
- package/lib/module/common/icons-svg/agent/index.js.map +1 -1
- package/lib/module/common/icons-svg/bed/index.js +4 -4
- package/lib/module/common/icons-svg/bed/index.js.map +1 -1
- package/lib/module/common/icons-svg/car/index.js +4 -4
- package/lib/module/common/icons-svg/car/index.js.map +1 -1
- package/lib/module/common/icons-svg/check-outline/index.js +6 -6
- package/lib/module/common/icons-svg/check-outline/index.js.map +1 -1
- package/lib/module/common/icons-svg/coffee/index.js +4 -4
- package/lib/module/common/icons-svg/coffee/index.js.map +1 -1
- package/lib/module/common/icons-svg/constants/index.js +2 -1
- package/lib/module/common/icons-svg/constants/index.js.map +1 -1
- package/lib/module/common/icons-svg/hourglass/index.js +28 -0
- package/lib/module/common/icons-svg/hourglass/index.js.map +1 -0
- package/lib/module/common/icons-svg/index.js +11 -4
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/common/icons-svg/pencil/index.js +4 -4
- package/lib/module/common/icons-svg/pencil/index.js.map +1 -1
- package/lib/module/common/icons-svg/refresh-ccw-dot/index.js +2 -2
- package/lib/module/common/icons-svg/refresh-ccw-dot/index.js.map +1 -1
- package/lib/module/common/icons-svg/truck-activity/index.js +4 -4
- package/lib/module/common/icons-svg/truck-activity/index.js.map +1 -1
- package/lib/module/components/activities-daily/index.js +4 -4
- package/lib/module/components/activities-daily/index.js.map +1 -1
- package/lib/module/components/activities-daily/interface.d.js.map +1 -1
- package/lib/module/components/activities-progress/index.js +4 -4
- package/lib/module/components/activities-progress/index.js.map +1 -1
- package/lib/module/components/activities-progress/interface.d.js.map +1 -1
- package/lib/module/components/avatar-profile/index.js.map +1 -1
- package/lib/module/components/avatar-profile/interface.d.js.map +1 -1
- package/lib/module/components/button/styles.js +1 -1
- package/lib/module/components/button/styles.js.map +1 -1
- package/lib/module/components/card-history/index.js +62 -12
- package/lib/module/components/card-history/index.js.map +1 -1
- package/lib/module/components/card-history/interface.d.js.map +1 -1
- package/lib/module/components/card-loading/index.js +22 -11
- package/lib/module/components/card-loading/index.js.map +1 -1
- package/lib/module/components/card-work-session/index.js +4 -4
- package/lib/module/components/card-work-session/index.js.map +1 -1
- package/lib/module/components/check-box/index.js +6 -6
- package/lib/module/components/check-box/index.js.map +1 -1
- package/lib/module/components/check-box/interface.d.js.map +1 -1
- package/lib/module/components/coil/index.js +4 -4
- package/lib/module/components/coil/index.js.map +1 -1
- package/lib/module/components/coil/interface.d.js.map +1 -1
- package/lib/module/components/filter-date-selector/index.js +7 -7
- package/lib/module/components/filter-date-selector/index.js.map +1 -1
- package/lib/module/components/history-details/index.js +1 -2
- package/lib/module/components/history-details/index.js.map +1 -1
- package/lib/module/components/history-details/interface.d.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/index.js +11 -10
- package/lib/module/components/image-capture-with-remove/index.js.map +1 -1
- package/lib/module/components/image-capture-with-remove/interface.d.js.map +1 -1
- package/lib/module/components/loading-progress/index.js +3 -1
- package/lib/module/components/loading-progress/index.js.map +1 -1
- package/lib/module/components/modal-activities/index.js +148 -0
- package/lib/module/components/modal-activities/index.js.map +1 -0
- package/lib/module/components/modal-activities/interface.d.js +2 -0
- package/lib/module/components/modal-activities/interface.d.js.map +1 -0
- package/lib/module/components/notification-loading/index.js +9 -2
- package/lib/module/components/notification-loading/index.js.map +1 -1
- package/lib/module/components/notification-loading/interface.d.js.map +1 -1
- package/lib/module/components/profile-menu-option/index.js.map +1 -1
- package/lib/module/components/profile-menu-option/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/index.js +6 -6
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/step-indicator/interface.d.js.map +1 -1
- package/lib/module/components/step-indicator/styles.js +9 -8
- package/lib/module/components/step-indicator/styles.js.map +1 -1
- package/lib/module/components/user-profile/index.js +6 -6
- package/lib/module/components/user-profile/index.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/activities-daily/activities-daily.stories.js.map +1 -1
- package/lib/module/stories/activities-progress/activities-progress.stories.js.map +1 -1
- package/lib/module/stories/avatar-profile/avatar-profile.stories.js.map +1 -1
- package/lib/module/stories/card-loading/card-loading.stories.js.map +1 -1
- package/lib/module/stories/check-box/check-box.stories.js.map +1 -1
- package/lib/module/stories/coil/coil.stories.js.map +1 -1
- package/lib/module/stories/filter-date-selector/filter-date-selector.stories.js.map +1 -1
- package/lib/module/stories/history-details/history-details.stories.js.map +1 -1
- package/lib/module/stories/image-capture-with-remove/image-capture-with-remove.stories.js.map +1 -1
- package/lib/module/stories/modal-activities/modal-activities.stories.js +41 -0
- package/lib/module/stories/modal-activities/modal-activities.stories.js.map +1 -0
- package/lib/module/stories/notification-loading/notification-loading.stories.js.map +1 -1
- package/lib/module/stories/profile-menu-option/profile-menu-option.stories.js.map +1 -1
- package/lib/module/stories/step-indicator/step-indicator.stories.js.map +1 -1
- package/lib/module/styles/global/interface.d.js.map +1 -1
- package/lib/module/styles/theme/theme.js +6 -5
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/module/utils/format-data/index.js +11 -11
- package/lib/module/utils/format-data/index.js.map +1 -1
- package/lib/module/utils/status-color/return-color.js +12 -3
- package/lib/module/utils/status-color/return-color.js.map +1 -1
- package/lib/typescript/src/common/icons-svg/constants/index.d.ts +1 -0
- package/lib/typescript/src/common/icons-svg/hourglass/index.d.ts +10 -0
- package/lib/typescript/src/components/button/styles.d.ts +2 -3
- package/lib/typescript/src/components/modal-activities/index.d.ts +6 -0
- package/lib/typescript/src/components/step-indicator/styles.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/stories/modal-activities/modal-activities.stories.d.ts +6 -0
- package/lib/typescript/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/src/utils/status-color/return-color.d.ts +2 -1
- package/package.json +221 -221
- package/src/common/icons-svg/agent/index.tsx +40 -40
- package/src/common/icons-svg/bed/index.tsx +41 -41
- package/src/common/icons-svg/car/index.tsx +29 -29
- package/src/common/icons-svg/check-outline/index.tsx +42 -42
- package/src/common/icons-svg/coffee/index.tsx +43 -43
- package/src/common/icons-svg/constants/index.ts +1 -0
- package/src/common/icons-svg/hourglass/index.tsx +28 -0
- package/src/common/icons-svg/index.tsx +8 -4
- package/src/common/icons-svg/pencil/index.tsx +32 -32
- package/src/common/icons-svg/refresh-ccw-dot/index.tsx +32 -32
- package/src/common/icons-svg/truck-activity/index.tsx +29 -29
- package/src/components/activities-daily/index.tsx +116 -116
- package/src/components/activities-daily/interface.d.ts +22 -22
- package/src/components/activities-progress/index.tsx +162 -162
- package/src/components/activities-progress/interface.d.ts +41 -41
- package/src/components/avatar-profile/index.tsx +95 -95
- package/src/components/avatar-profile/interface.d.ts +39 -39
- package/src/components/button/styles.ts +34 -34
- package/src/components/card-history/index.tsx +67 -5
- package/src/components/card-history/interface.d.ts +34 -28
- package/src/components/card-loading/index.tsx +16 -4
- package/src/components/card-work-session/index.tsx +187 -187
- package/src/components/check-box/index.tsx +94 -94
- package/src/components/check-box/interface.d.ts +31 -31
- package/src/components/coil/index.tsx +103 -103
- package/src/components/coil/interface.d.ts +26 -26
- package/src/components/filter-date-selector/index.tsx +101 -101
- package/src/components/history-details/index.tsx +1 -2
- package/src/components/history-details/interface.d.ts +18 -18
- package/src/components/image-capture-with-remove/index.tsx +11 -8
- package/src/components/image-capture-with-remove/interface.d.ts +6 -3
- package/src/components/loading-progress/index.tsx +93 -91
- package/src/components/modal-activities/index.tsx +139 -0
- package/src/components/modal-activities/interface.d.ts +21 -0
- package/src/components/notification-loading/index.tsx +9 -2
- package/src/components/notification-loading/interface.d.ts +35 -35
- package/src/components/profile-menu-option/index.tsx +65 -65
- package/src/components/profile-menu-option/interface.d.ts +42 -42
- package/src/components/step-indicator/index.tsx +164 -164
- package/src/components/step-indicator/interface.d.ts +34 -34
- package/src/components/step-indicator/styles.ts +68 -67
- package/src/components/user-profile/index.tsx +204 -204
- package/src/index.ts +1 -0
- package/src/stories/activities-daily/activities-daily.stories.tsx +40 -40
- package/src/stories/activities-progress/activities-progress.stories.tsx +61 -61
- package/src/stories/avatar-profile/avatar-profile.stories.tsx +32 -32
- package/src/stories/card-history/card-history.stories.tsx +50 -50
- package/src/stories/card-loading/card-loading.stories.tsx +85 -85
- package/src/stories/check-box/check-box.stories.tsx +81 -81
- package/src/stories/coil/coil.stories.tsx +98 -98
- package/src/stories/filter-date-selector/filter-date-selector.stories.tsx +122 -122
- package/src/stories/history-details/history-details.stories.tsx +36 -36
- package/src/stories/image-capture-with-remove/image-capture-with-remove.stories.tsx +57 -57
- package/src/stories/modal-activities/modal-activities.stories.tsx +46 -0
- package/src/stories/notification-loading/notification-loading.stories.tsx +88 -88
- package/src/stories/profile-menu-option/profile-menu-option.stories.tsx +70 -70
- package/src/stories/step-indicator/step-indicator.stories.tsx +124 -124
- package/src/styles/global/interface.d.ts +146 -141
- package/src/styles/theme/theme.ts +1 -0
- package/src/utils/format-data/index.ts +66 -66
- package/src/utils/status-color/return-color.ts +14 -3
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import { TouchableOpacityProps } from "react-native";
|
|
5
|
-
|
|
6
|
-
// typing
|
|
7
|
-
import { IGlobalCss } from "../../styles/global/interface";
|
|
8
|
-
|
|
9
|
-
// svg
|
|
10
|
-
import { SVG_NAME } from "../../common/icons-svg/constants";
|
|
11
|
-
|
|
12
|
-
interface IProfileMenuOption extends TouchableOpacityProps, IGlobalCss {
|
|
13
|
-
/**
|
|
14
|
-
* nome do ícone
|
|
15
|
-
*/
|
|
16
|
-
icon: keyof typeof SVG_NAME;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Propriedade texto do menu
|
|
20
|
-
*/
|
|
21
|
-
text: string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* função de navegação
|
|
25
|
-
*/
|
|
26
|
-
handleNavigation: () => void;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* cor de fundo
|
|
30
|
-
*/
|
|
31
|
-
backgroundColor?: string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* cor do ícone
|
|
35
|
-
*/
|
|
36
|
-
colorIcon?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* EXPORTS
|
|
41
|
-
*/
|
|
42
|
-
export { IProfileMenuOption };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import { TouchableOpacityProps } from "react-native";
|
|
5
|
+
|
|
6
|
+
// typing
|
|
7
|
+
import { IGlobalCss } from "../../styles/global/interface";
|
|
8
|
+
|
|
9
|
+
// svg
|
|
10
|
+
import { SVG_NAME } from "../../common/icons-svg/constants";
|
|
11
|
+
|
|
12
|
+
interface IProfileMenuOption extends TouchableOpacityProps, IGlobalCss {
|
|
13
|
+
/**
|
|
14
|
+
* nome do ícone
|
|
15
|
+
*/
|
|
16
|
+
icon: keyof typeof SVG_NAME;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Propriedade texto do menu
|
|
20
|
+
*/
|
|
21
|
+
text: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* função de navegação
|
|
25
|
+
*/
|
|
26
|
+
handleNavigation: () => void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* cor de fundo
|
|
30
|
+
*/
|
|
31
|
+
backgroundColor?: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* cor do ícone
|
|
35
|
+
*/
|
|
36
|
+
colorIcon?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* EXPORTS
|
|
41
|
+
*/
|
|
42
|
+
export { IProfileMenuOption };
|
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
import React from "react";
|
|
5
|
-
import { View, Text } from "react-native";
|
|
6
|
-
|
|
7
|
-
import { getIconKeyByValue } from "./helpers/get-icon-by-status";
|
|
8
|
-
|
|
9
|
-
// typings
|
|
10
|
-
import { IStepIndicator } from "./interface";
|
|
11
|
-
|
|
12
|
-
// styles
|
|
13
|
-
import { styles } from "./styles";
|
|
14
|
-
import { Icons } from "../../common/icons-svg";
|
|
15
|
-
import { formHoursMinute } from "../../utils/format-data";
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Componente StepIndicator para a interação da ui.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
const StepIndicator: React.FC<IStepIndicator> = ({
|
|
22
|
-
data = [],
|
|
23
|
-
type,
|
|
24
|
-
backgroundColorBall,
|
|
25
|
-
textColorDescription,
|
|
26
|
-
titleColor,
|
|
27
|
-
titleNumberColor,
|
|
28
|
-
}) => {
|
|
29
|
-
const StepDefault = () => {
|
|
30
|
-
return (
|
|
31
|
-
<>
|
|
32
|
-
{data!.length > 0 &&
|
|
33
|
-
data!.map((history, index) => (
|
|
34
|
-
<View testID="step-indicator" style={styles({}).containerIndicator} key={history.id}>
|
|
35
|
-
<View style={styles({ backgroundColorBall }).containerBall}>
|
|
36
|
-
{data!?.length > 1 && index < data!?.length - 1 && (
|
|
37
|
-
<View
|
|
38
|
-
style={{
|
|
39
|
-
width: 2,
|
|
40
|
-
height: 84,
|
|
41
|
-
marginTop: 116,
|
|
42
|
-
position: "relative",
|
|
43
|
-
backgroundColor: "#050022",
|
|
44
|
-
}}
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
<Text style={styles({ titleNumberColor }).titleNumber}>
|
|
48
|
-
{data!?.length - index}
|
|
49
|
-
</Text>
|
|
50
|
-
</View>
|
|
51
|
-
|
|
52
|
-
<View style={styles({}).containerMain}>
|
|
53
|
-
<Text style={styles({ titleColor }).title}>{history?.descricao}</Text>
|
|
54
|
-
|
|
55
|
-
{history?.data_inicio && (
|
|
56
|
-
<Text style={styles({ textColorDescription }).titleDescription}>
|
|
57
|
-
{`Inicio: ${history.data_inicio} ás ${history.data_fim}`}
|
|
58
|
-
</Text>
|
|
59
|
-
)}
|
|
60
|
-
|
|
61
|
-
{history.duracao_segundos && (
|
|
62
|
-
<Text style={styles({ textColorDescription }).titleDescription}>
|
|
63
|
-
Duração: {formHoursMinute(history?.duracao_segundos as string)}
|
|
64
|
-
</Text>
|
|
65
|
-
)}
|
|
66
|
-
</View>
|
|
67
|
-
</View>
|
|
68
|
-
))}
|
|
69
|
-
</>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const StepCustom = () => {
|
|
74
|
-
return (
|
|
75
|
-
<View
|
|
76
|
-
style={{
|
|
77
|
-
width: "100%",
|
|
78
|
-
height: 84,
|
|
79
|
-
paddingHorizontal: 24,
|
|
80
|
-
display: "flex",
|
|
81
|
-
flexDirection: "row",
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
{data.map((step, indexCustom) => {
|
|
85
|
-
const descricao = getIconKeyByValue(step.descricao);
|
|
86
|
-
|
|
87
|
-
return (
|
|
88
|
-
<React.Fragment key={`step-${indexCustom}`}>
|
|
89
|
-
<View
|
|
90
|
-
style={{
|
|
91
|
-
width: 45,
|
|
92
|
-
height: 45,
|
|
93
|
-
backgroundColor: indexCustom <= 3 ? "orange" : "transparent",
|
|
94
|
-
borderRadius: 50,
|
|
95
|
-
alignItems: "center",
|
|
96
|
-
justifyContent: "center",
|
|
97
|
-
borderWidth: 1,
|
|
98
|
-
borderColor: "#fff",
|
|
99
|
-
}}
|
|
100
|
-
>
|
|
101
|
-
<View
|
|
102
|
-
style={{
|
|
103
|
-
width: 45,
|
|
104
|
-
height: 45,
|
|
105
|
-
backgroundColor: "transparent",
|
|
106
|
-
borderRadius: 50,
|
|
107
|
-
alignItems: "center",
|
|
108
|
-
justifyContent: "center",
|
|
109
|
-
}}
|
|
110
|
-
>
|
|
111
|
-
{descricao && <Icons icon={descricao} />}
|
|
112
|
-
</View>
|
|
113
|
-
<Text
|
|
114
|
-
style={{
|
|
115
|
-
position: "absolute",
|
|
116
|
-
top: 56,
|
|
117
|
-
fontWeight: "600",
|
|
118
|
-
fontSize: 10,
|
|
119
|
-
lineHeight: 14,
|
|
120
|
-
textAlign: "center",
|
|
121
|
-
color: "#fff",
|
|
122
|
-
width: 75,
|
|
123
|
-
}}
|
|
124
|
-
>
|
|
125
|
-
{step.descricao}
|
|
126
|
-
</Text>
|
|
127
|
-
</View>
|
|
128
|
-
|
|
129
|
-
{data?.length > 1 && indexCustom < data?.length - 1 && (
|
|
130
|
-
<View
|
|
131
|
-
style={{
|
|
132
|
-
width: 35,
|
|
133
|
-
height: 2,
|
|
134
|
-
marginTop: 24,
|
|
135
|
-
position: "relative",
|
|
136
|
-
backgroundColor: "orange",
|
|
137
|
-
}}
|
|
138
|
-
/>
|
|
139
|
-
)}
|
|
140
|
-
</React.Fragment>
|
|
141
|
-
);
|
|
142
|
-
})}
|
|
143
|
-
</View>
|
|
144
|
-
);
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const handleRenderComponent = (stepType: "default" | "custom") => {
|
|
148
|
-
switch (stepType) {
|
|
149
|
-
case "default":
|
|
150
|
-
return <StepDefault />;
|
|
151
|
-
case "custom":
|
|
152
|
-
return <StepCustom />;
|
|
153
|
-
default:
|
|
154
|
-
return <View />;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
return <>{handleRenderComponent(type!)}</>;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* EXPORTS
|
|
163
|
-
*/
|
|
164
|
-
export { StepIndicator };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { View, Text } from "react-native";
|
|
6
|
+
|
|
7
|
+
import { getIconKeyByValue } from "./helpers/get-icon-by-status";
|
|
8
|
+
|
|
9
|
+
// typings
|
|
10
|
+
import { IStepIndicator } from "./interface";
|
|
11
|
+
|
|
12
|
+
// styles
|
|
13
|
+
import { styles } from "./styles";
|
|
14
|
+
import { Icons } from "../../common/icons-svg";
|
|
15
|
+
import { formHoursMinute } from "../../utils/format-data";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Componente StepIndicator para a interação da ui.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const StepIndicator: React.FC<IStepIndicator> = ({
|
|
22
|
+
data = [],
|
|
23
|
+
type,
|
|
24
|
+
backgroundColorBall,
|
|
25
|
+
textColorDescription,
|
|
26
|
+
titleColor,
|
|
27
|
+
titleNumberColor,
|
|
28
|
+
}) => {
|
|
29
|
+
const StepDefault = () => {
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
{data!.length > 0 &&
|
|
33
|
+
data!.map((history, index) => (
|
|
34
|
+
<View testID="step-indicator" style={styles({}).containerIndicator} key={history.id}>
|
|
35
|
+
<View style={styles({ backgroundColorBall }).containerBall}>
|
|
36
|
+
{data!?.length > 1 && index < data!?.length - 1 && (
|
|
37
|
+
<View
|
|
38
|
+
style={{
|
|
39
|
+
width: 2,
|
|
40
|
+
height: 84,
|
|
41
|
+
marginTop: 116,
|
|
42
|
+
position: "relative",
|
|
43
|
+
backgroundColor: "#050022",
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
)}
|
|
47
|
+
<Text style={styles({ titleNumberColor }).titleNumber}>
|
|
48
|
+
{data!?.length - index}
|
|
49
|
+
</Text>
|
|
50
|
+
</View>
|
|
51
|
+
|
|
52
|
+
<View style={styles({}).containerMain}>
|
|
53
|
+
<Text style={styles({ titleColor }).title}>{history?.descricao}</Text>
|
|
54
|
+
|
|
55
|
+
{history?.data_inicio && (
|
|
56
|
+
<Text style={styles({ textColorDescription }).titleDescription}>
|
|
57
|
+
{`Inicio: ${history.data_inicio} ás ${history.data_fim}`}
|
|
58
|
+
</Text>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
{history.duracao_segundos && (
|
|
62
|
+
<Text style={styles({ textColorDescription }).titleDescription}>
|
|
63
|
+
Duração: {formHoursMinute(history?.duracao_segundos as string)}
|
|
64
|
+
</Text>
|
|
65
|
+
)}
|
|
66
|
+
</View>
|
|
67
|
+
</View>
|
|
68
|
+
))}
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const StepCustom = () => {
|
|
74
|
+
return (
|
|
75
|
+
<View
|
|
76
|
+
style={{
|
|
77
|
+
width: "100%",
|
|
78
|
+
height: 84,
|
|
79
|
+
paddingHorizontal: 24,
|
|
80
|
+
display: "flex",
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
{data.map((step, indexCustom) => {
|
|
85
|
+
const descricao = getIconKeyByValue(step.descricao);
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<React.Fragment key={`step-${indexCustom}`}>
|
|
89
|
+
<View
|
|
90
|
+
style={{
|
|
91
|
+
width: 45,
|
|
92
|
+
height: 45,
|
|
93
|
+
backgroundColor: indexCustom <= 3 ? "orange" : "transparent",
|
|
94
|
+
borderRadius: 50,
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
justifyContent: "center",
|
|
97
|
+
borderWidth: 1,
|
|
98
|
+
borderColor: "#fff",
|
|
99
|
+
}}
|
|
100
|
+
>
|
|
101
|
+
<View
|
|
102
|
+
style={{
|
|
103
|
+
width: 45,
|
|
104
|
+
height: 45,
|
|
105
|
+
backgroundColor: "transparent",
|
|
106
|
+
borderRadius: 50,
|
|
107
|
+
alignItems: "center",
|
|
108
|
+
justifyContent: "center",
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
{descricao && <Icons icon={descricao} />}
|
|
112
|
+
</View>
|
|
113
|
+
<Text
|
|
114
|
+
style={{
|
|
115
|
+
position: "absolute",
|
|
116
|
+
top: 56,
|
|
117
|
+
fontWeight: "600",
|
|
118
|
+
fontSize: 10,
|
|
119
|
+
lineHeight: 14,
|
|
120
|
+
textAlign: "center",
|
|
121
|
+
color: "#fff",
|
|
122
|
+
width: 75,
|
|
123
|
+
}}
|
|
124
|
+
>
|
|
125
|
+
{step.descricao}
|
|
126
|
+
</Text>
|
|
127
|
+
</View>
|
|
128
|
+
|
|
129
|
+
{data?.length > 1 && indexCustom < data?.length - 1 && (
|
|
130
|
+
<View
|
|
131
|
+
style={{
|
|
132
|
+
width: 35,
|
|
133
|
+
height: 2,
|
|
134
|
+
marginTop: 24,
|
|
135
|
+
position: "relative",
|
|
136
|
+
backgroundColor: "orange",
|
|
137
|
+
}}
|
|
138
|
+
/>
|
|
139
|
+
)}
|
|
140
|
+
</React.Fragment>
|
|
141
|
+
);
|
|
142
|
+
})}
|
|
143
|
+
</View>
|
|
144
|
+
);
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const handleRenderComponent = (stepType: "default" | "custom") => {
|
|
148
|
+
switch (stepType) {
|
|
149
|
+
case "default":
|
|
150
|
+
return <StepDefault />;
|
|
151
|
+
case "custom":
|
|
152
|
+
return <StepCustom />;
|
|
153
|
+
default:
|
|
154
|
+
return <View />;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
return <>{handleRenderComponent(type!)}</>;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* EXPORTS
|
|
163
|
+
*/
|
|
164
|
+
export { StepIndicator };
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
type IData = {
|
|
6
|
-
id: number;
|
|
7
|
-
duracao_segundos: string | number;
|
|
8
|
-
data_inicio: string;
|
|
9
|
-
data_fim: string;
|
|
10
|
-
descricao: string;
|
|
11
|
-
};
|
|
12
|
-
interface IStepIndicator {
|
|
13
|
-
/**dados que vão ser renderizados */
|
|
14
|
-
data?: IData[];
|
|
15
|
-
|
|
16
|
-
/**tupo de renderização padrão ou customizada */
|
|
17
|
-
type?: "default" | "custom";
|
|
18
|
-
|
|
19
|
-
/**tamanho do step indicator */
|
|
20
|
-
backgroundColorBall?: string;
|
|
21
|
-
|
|
22
|
-
/**cor do texto */
|
|
23
|
-
titleColor?: string;
|
|
24
|
-
|
|
25
|
-
/**cor do numero do step indicator */
|
|
26
|
-
titleNumberColor?: string;
|
|
27
|
-
|
|
28
|
-
/**cor do texto da descrição */
|
|
29
|
-
textColorDescription?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* EXPORTS
|
|
33
|
-
*/
|
|
34
|
-
export { type IStepIndicator };
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
type IData = {
|
|
6
|
+
id: number;
|
|
7
|
+
duracao_segundos: string | number;
|
|
8
|
+
data_inicio: string;
|
|
9
|
+
data_fim: string;
|
|
10
|
+
descricao: string;
|
|
11
|
+
};
|
|
12
|
+
interface IStepIndicator {
|
|
13
|
+
/**dados que vão ser renderizados */
|
|
14
|
+
data?: IData[];
|
|
15
|
+
|
|
16
|
+
/**tupo de renderização padrão ou customizada */
|
|
17
|
+
type?: "default" | "custom";
|
|
18
|
+
|
|
19
|
+
/**tamanho do step indicator */
|
|
20
|
+
backgroundColorBall?: string;
|
|
21
|
+
|
|
22
|
+
/**cor do texto */
|
|
23
|
+
titleColor?: string;
|
|
24
|
+
|
|
25
|
+
/**cor do numero do step indicator */
|
|
26
|
+
titleNumberColor?: string;
|
|
27
|
+
|
|
28
|
+
/**cor do texto da descrição */
|
|
29
|
+
textColorDescription?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* EXPORTS
|
|
33
|
+
*/
|
|
34
|
+
export { type IStepIndicator };
|
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* IMPORTS
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { StyleSheet } from "react-native";
|
|
6
|
-
|
|
7
|
-
// typings
|
|
8
|
-
import { IStepIndicator } from "./interface";
|
|
9
|
-
|
|
10
|
-
// styles
|
|
11
|
-
import { theme } from "../../styles/theme/theme";
|
|
12
|
-
|
|
13
|
-
const styles = (props: IStepIndicator) =>
|
|
14
|
-
StyleSheet.create({
|
|
15
|
-
containerIndicator: {
|
|
16
|
-
width: "100%",
|
|
17
|
-
height: 86,
|
|
18
|
-
flexDirection: "row",
|
|
19
|
-
justifyContent: "flex-start",
|
|
20
|
-
// backgroundColor: theme.colors.gray[300],
|
|
21
|
-
},
|
|
22
|
-
containerBall: {
|
|
23
|
-
width: 32,
|
|
24
|
-
height: 32,
|
|
25
|
-
backgroundColor: props.backgroundColorBall ?? theme.colors.blue[500],
|
|
26
|
-
flexDirection: "row",
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
justifyContent: "center",
|
|
29
|
-
borderRadius: 16,
|
|
30
|
-
},
|
|
31
|
-
title: {
|
|
32
|
-
color: props.titleColor ?? "black",
|
|
33
|
-
textAlign: "center",
|
|
34
|
-
lineHeight:
|
|
35
|
-
fontSize: theme.fontSizes["sm"],
|
|
36
|
-
fontWeight: "500",
|
|
37
|
-
marginLeft: 8,
|
|
38
|
-
},
|
|
39
|
-
titleNumber: {
|
|
40
|
-
color: props.titleNumberColor ?? theme.colors.neutral[25],
|
|
41
|
-
textAlign: "center",
|
|
42
|
-
lineHeight:
|
|
43
|
-
fontFamily: theme.fonts.inter_regular_400,
|
|
44
|
-
fontSize: theme.fontSizes["xs"],
|
|
45
|
-
position: "absolute",
|
|
46
|
-
},
|
|
47
|
-
titleDescription: {
|
|
48
|
-
color: props.textColorDescription ?? theme.colors.gray[700],
|
|
49
|
-
textAlign: "center",
|
|
50
|
-
lineHeight: 16,
|
|
51
|
-
fontSize:
|
|
52
|
-
fontFamily: theme.fonts.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
/**
|
|
2
|
+
* IMPORTS
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { StyleSheet } from "react-native";
|
|
6
|
+
|
|
7
|
+
// typings
|
|
8
|
+
import { IStepIndicator } from "./interface";
|
|
9
|
+
|
|
10
|
+
// styles
|
|
11
|
+
import { theme } from "../../styles/theme/theme";
|
|
12
|
+
|
|
13
|
+
const styles = (props: IStepIndicator) =>
|
|
14
|
+
StyleSheet.create({
|
|
15
|
+
containerIndicator: {
|
|
16
|
+
width: "100%",
|
|
17
|
+
height: 86,
|
|
18
|
+
flexDirection: "row",
|
|
19
|
+
justifyContent: "flex-start",
|
|
20
|
+
// backgroundColor: theme.colors.gray[300],
|
|
21
|
+
},
|
|
22
|
+
containerBall: {
|
|
23
|
+
width: 32,
|
|
24
|
+
height: 32,
|
|
25
|
+
backgroundColor: props.backgroundColorBall ?? theme.colors.blue[500],
|
|
26
|
+
flexDirection: "row",
|
|
27
|
+
alignItems: "center",
|
|
28
|
+
justifyContent: "center",
|
|
29
|
+
borderRadius: 16,
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
color: props.titleColor ?? "black",
|
|
33
|
+
textAlign: "center",
|
|
34
|
+
lineHeight: 20,
|
|
35
|
+
fontSize: theme.fontSizes["sm"],
|
|
36
|
+
fontWeight: "500",
|
|
37
|
+
marginLeft: 8,
|
|
38
|
+
},
|
|
39
|
+
titleNumber: {
|
|
40
|
+
color: props.titleNumberColor ?? theme.colors.neutral[25],
|
|
41
|
+
textAlign: "center",
|
|
42
|
+
lineHeight: 16,
|
|
43
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
44
|
+
fontSize: theme.fontSizes["xs"],
|
|
45
|
+
position: "absolute",
|
|
46
|
+
},
|
|
47
|
+
titleDescription: {
|
|
48
|
+
color: props.textColorDescription ?? theme.colors.gray[700],
|
|
49
|
+
textAlign: "center",
|
|
50
|
+
lineHeight: 16,
|
|
51
|
+
fontSize: theme.fontSizes["xs"],
|
|
52
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
53
|
+
fontWeight: "400",
|
|
54
|
+
marginLeft: 8,
|
|
55
|
+
},
|
|
56
|
+
containerMain: {
|
|
57
|
+
width: "100%",
|
|
58
|
+
height: 56,
|
|
59
|
+
flexDirection: "column",
|
|
60
|
+
alignItems: "flex-start",
|
|
61
|
+
marginLeft: 2,
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* EXPORTS
|
|
67
|
+
*/
|
|
68
|
+
export { styles };
|