jornada-ui 0.4.15 → 0.4.17
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/constants/index.js +2 -1
- package/lib/commonjs/common/icons-svg/constants/index.js.map +1 -1
- package/lib/commonjs/common/icons-svg/download/index.js +53 -0
- package/lib/commonjs/common/icons-svg/download/index.js.map +1 -0
- package/lib/commonjs/common/icons-svg/index.js +7 -0
- package/lib/commonjs/common/icons-svg/index.js.map +1 -1
- package/lib/commonjs/components/inputs/input-date-time/index.js +11 -9
- package/lib/commonjs/components/inputs/input-date-time/index.js.map +1 -1
- package/lib/commonjs/components/inputs/input-date-time/styles.js +6 -3
- package/lib/commonjs/components/inputs/input-date-time/styles.js.map +1 -1
- package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js +35 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js +203 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js +6 -0
- package/lib/commonjs/components/modals/modal-change-activitie-history/interface.js.map +1 -0
- package/lib/commonjs/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.js +71 -65
- package/lib/commonjs/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
- package/lib/commonjs/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
- package/lib/commonjs/components/notification-card/index.js +142 -0
- package/lib/commonjs/components/notification-card/index.js.map +1 -0
- package/lib/commonjs/components/notification-card/interface.js +6 -0
- package/lib/commonjs/components/notification-card/interface.js.map +1 -0
- package/lib/commonjs/components/notification-details-card/index.js +181 -0
- package/lib/commonjs/components/notification-details-card/index.js.map +1 -0
- package/lib/commonjs/components/notification-details-card/interface.js +6 -0
- package/lib/commonjs/components/notification-details-card/interface.js.map +1 -0
- package/lib/commonjs/components/step-indicator/index.js +131 -68
- package/lib/commonjs/components/step-indicator/index.js.map +1 -1
- package/lib/commonjs/components/user-journey-work-card/index.js +44 -4
- package/lib/commonjs/components/user-journey-work-card/index.js.map +1 -1
- package/lib/commonjs/index.js +19 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stories/button/button.stories.js +0 -2
- package/lib/commonjs/stories/button/button.stories.js.map +1 -1
- package/lib/commonjs/stories/capture-photo/capture-photo.stories.js +0 -1
- package/lib/commonjs/stories/capture-photo/capture-photo.stories.js.map +1 -1
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
- package/lib/commonjs/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
- package/lib/commonjs/stories/notification-card/notification-card.stories.js +100 -0
- package/lib/commonjs/stories/notification-card/notification-card.stories.js.map +1 -0
- package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js +112 -0
- package/lib/commonjs/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
- package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
- package/lib/commonjs/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
- package/lib/commonjs/styles/theme/theme.js +2 -1
- package/lib/commonjs/styles/theme/theme.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/download/index.js +47 -0
- package/lib/module/common/icons-svg/download/index.js.map +1 -0
- package/lib/module/common/icons-svg/index.js +7 -0
- package/lib/module/common/icons-svg/index.js.map +1 -1
- package/lib/module/components/inputs/input-date-time/index.js +11 -9
- package/lib/module/components/inputs/input-date-time/index.js.map +1 -1
- package/lib/module/components/inputs/input-date-time/styles.js +6 -3
- package/lib/module/components/inputs/input-date-time/styles.js.map +1 -1
- package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js +32 -0
- package/lib/module/components/modals/modal-change-activitie-history/helpers/index.js.map +1 -0
- package/lib/module/components/modals/modal-change-activitie-history/index.js +196 -0
- package/lib/module/components/modals/modal-change-activitie-history/index.js.map +1 -0
- package/lib/module/components/modals/modal-change-activitie-history/interface.js +4 -0
- package/lib/module/components/modals/modal-change-activitie-history/interface.js.map +1 -0
- package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.js +69 -63
- package/lib/module/components/modals/modal-edite-journey-rectification/index.js.map +1 -0
- package/lib/module/components/modals/modal-edite-journey-rectification/interface.d.js.map +1 -0
- package/lib/module/components/notification-card/index.js +135 -0
- package/lib/module/components/notification-card/index.js.map +1 -0
- package/lib/module/components/notification-card/interface.js +4 -0
- package/lib/module/components/notification-card/interface.js.map +1 -0
- package/lib/module/components/notification-details-card/index.js +183 -0
- package/lib/module/components/notification-details-card/index.js.map +1 -0
- package/lib/module/components/notification-details-card/interface.js +4 -0
- package/lib/module/components/notification-details-card/interface.js.map +1 -0
- package/lib/module/components/step-indicator/index.js +129 -65
- package/lib/module/components/step-indicator/index.js.map +1 -1
- package/lib/module/components/user-journey-work-card/index.js +44 -4
- package/lib/module/components/user-journey-work-card/index.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/stories/button/button.stories.js +0 -1
- package/lib/module/stories/button/button.stories.js.map +1 -1
- package/lib/module/stories/capture-photo/capture-photo.stories.js +0 -1
- package/lib/module/stories/capture-photo/capture-photo.stories.js.map +1 -1
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js +3 -3
- package/lib/module/stories/modal-journey-rectification/modal-journey-rectification.stories.js.map +1 -1
- package/lib/module/stories/notification-card/notification-card.stories.js +95 -0
- package/lib/module/stories/notification-card/notification-card.stories.js.map +1 -0
- package/lib/module/stories/notification-details-card/notification-details-card.stories.js +107 -0
- package/lib/module/stories/notification-details-card/notification-details-card.stories.js.map +1 -0
- package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js +12 -4
- package/lib/module/stories/user-journey-work-card/user-journey-work-card.stories.js.map +1 -1
- package/lib/module/styles/theme/theme.js +2 -1
- package/lib/module/styles/theme/theme.js.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/common/icons-svg/download/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-report/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/card-scheduled-journey/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts +2 -1
- package/lib/typescript/commonjs/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
- package/lib/typescript/commonjs/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-card/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification-card/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts +17 -0
- package/lib/typescript/commonjs/src/components/notification-card/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts +15 -0
- package/lib/typescript/commonjs/src/components/notification-details-card/interface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/components/selects/select-date-and-hours/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts +3 -9
- package/lib/typescript/commonjs/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/travel-history/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +3 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
- package/lib/typescript/commonjs/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts +14 -0
- package/lib/typescript/commonjs/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
- package/lib/typescript/commonjs/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stories/user-journey-work-card/user-journey-work-card.stories.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/commonjs/src/styles/theme/theme.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts +1 -0
- package/lib/typescript/module/src/common/icons-svg/constants/index.d.ts.map +1 -1
- package/lib/typescript/module/src/common/icons-svg/download/index.d.ts +11 -0
- package/lib/typescript/module/src/common/icons-svg/download/index.d.ts.map +1 -0
- package/lib/typescript/module/src/common/icons-svg/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-report/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/card-scheduled-journey/index.d.ts +1 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts +2 -1
- package/lib/typescript/module/src/components/inputs/input-date-time/styles.d.ts.map +1 -1
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts +13 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/helpers/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts +10 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts +18 -0
- package/lib/typescript/module/src/components/modals/modal-change-activitie-history/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.d.ts +3 -0
- package/lib/typescript/module/src/components/modals/modal-edite-journey-rectification/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-card/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification-card/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-card/interface.d.ts +17 -0
- package/lib/typescript/module/src/components/notification-card/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-details-card/index.d.ts +11 -0
- package/lib/typescript/module/src/components/notification-details-card/index.d.ts.map +1 -0
- package/lib/typescript/module/src/components/notification-details-card/interface.d.ts +15 -0
- package/lib/typescript/module/src/components/notification-details-card/interface.d.ts.map +1 -0
- package/lib/typescript/module/src/components/selects/select-date-and-hours/index.d.ts +1 -1
- package/lib/typescript/module/src/components/step-indicator/index.d.ts +3 -9
- package/lib/typescript/module/src/components/step-indicator/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/travel-history/index.d.ts.map +1 -1
- package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts +2 -0
- package/lib/typescript/module/src/components/user-journey-work-card/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +3 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts +1 -1
- package/lib/typescript/module/src/stories/modal-journey-rectification/modal-journey-rectification.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts +14 -0
- package/lib/typescript/module/src/stories/notification-card/notification-card.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts +16 -0
- package/lib/typescript/module/src/stories/notification-details-card/notification-details-card.stories.d.ts.map +1 -0
- package/lib/typescript/module/src/stories/user-journey-work-card/user-journey-work-card.stories.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts +1 -0
- package/lib/typescript/module/src/styles/global/theme-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/styles/theme/theme.d.ts +1 -0
- package/lib/typescript/module/src/styles/theme/theme.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/icons-svg/constants/index.ts +1 -0
- package/src/common/icons-svg/download/index.tsx +52 -0
- package/src/common/icons-svg/index.tsx +4 -0
- package/src/components/card-report/interface.d.ts +1 -1
- package/src/components/inputs/input-date-time/index.tsx +13 -12
- package/src/components/inputs/input-date-time/styles.ts +64 -63
- package/src/components/modals/modal-change-activitie-history/helpers/index.ts +15 -0
- package/src/components/modals/modal-change-activitie-history/index.tsx +189 -0
- package/src/components/modals/modal-change-activitie-history/interface.ts +16 -0
- package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/index.tsx +78 -67
- package/src/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.ts +10 -10
- package/src/components/monthly-summary-table/interface.d.ts +1 -1
- package/src/components/notification-card/index.tsx +123 -0
- package/src/components/notification-card/interface.ts +18 -0
- package/src/components/notification-details-card/index.tsx +180 -0
- package/src/components/notification-details-card/interface.ts +16 -0
- package/src/components/step-indicator/index.tsx +226 -155
- package/src/components/step-indicator/interface.d.ts +3 -2
- package/src/components/travel-history/interface.d.ts +1 -1
- package/src/components/user-journey-work-card/index.tsx +28 -1
- package/src/components/user-journey-work-card/interface.d.ts +149 -145
- package/src/index.tsx +3 -1
- package/src/stories/button/button.stories.tsx +1 -1
- package/src/stories/capture-photo/capture-photo.stories.tsx +1 -1
- package/src/stories/modal-journey-rectification/modal-journey-rectification.stories.tsx +60 -60
- package/src/stories/notification-card/notification-card.stories.tsx +93 -0
- package/src/stories/notification-details-card/notification-details-card.stories.tsx +109 -0
- package/src/stories/user-journey-work-card/user-journey-work-card.stories.tsx +71 -63
- package/src/styles/theme/theme.ts +1 -0
- package/lib/commonjs/components/modals/modal-journey-rectification/index.js.map +0 -1
- package/lib/commonjs/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
- package/lib/module/components/modals/modal-journey-rectification/index.js.map +0 -1
- package/lib/module/components/modals/modal-journey-rectification/interface.d.js.map +0 -1
- package/lib/typescript/commonjs/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
- package/lib/typescript/module/src/components/modals/modal-journey-rectification/index.d.ts.map +0 -1
- /package/lib/commonjs/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
- /package/lib/module/components/modals/{modal-journey-rectification → modal-edite-journey-rectification}/interface.d.js +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CONSTANTS
|
|
5
|
+
*/
|
|
6
|
+
const optionsActivities = [{
|
|
7
|
+
label: "Selecione atividade",
|
|
8
|
+
value: "none",
|
|
9
|
+
key: 0
|
|
10
|
+
}, {
|
|
11
|
+
label: "Descanso",
|
|
12
|
+
value: "descanso",
|
|
13
|
+
key: 9
|
|
14
|
+
}, {
|
|
15
|
+
label: "Repouso Noturno",
|
|
16
|
+
value: "repouso_noturno",
|
|
17
|
+
key: 6
|
|
18
|
+
}, {
|
|
19
|
+
label: "Refeição",
|
|
20
|
+
value: "refeição",
|
|
21
|
+
key: 7
|
|
22
|
+
}, {
|
|
23
|
+
label: "Repouso Semanal",
|
|
24
|
+
value: "repouso_semanal",
|
|
25
|
+
key: 5
|
|
26
|
+
}];
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* EXPORTS
|
|
30
|
+
*/
|
|
31
|
+
export { optionsActivities };
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["optionsActivities","label","value","key"],"sourceRoot":"..\\..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/helpers/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA,MAAMA,iBAAiB,GAAG,CACxB;EAAEC,KAAK,EAAE,qBAAqB;EAAEC,KAAK,EAAE,MAAM;EAAEC,GAAG,EAAE;AAAE,CAAC,EACvD;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,EAC9D;EAAEF,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE,UAAU;EAAEC,GAAG,EAAE;AAAE,CAAC,EAChD;EAAEF,KAAK,EAAE,iBAAiB;EAAEC,KAAK,EAAE,iBAAiB;EAAEC,GAAG,EAAE;AAAE,CAAC,CAC/D;;AAED;AACA;AACA;AACA,SAASH,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* IMPORTS
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
// libs RN
|
|
8
|
+
import { Modal, View } from "react-native";
|
|
9
|
+
|
|
10
|
+
// componentes
|
|
11
|
+
import Box from "../../box/index.js";
|
|
12
|
+
import Button from "../../button/index.js";
|
|
13
|
+
import Typography from "../../typography/index.js";
|
|
14
|
+
import SelectOption from "../../selects/select-option/index.js";
|
|
15
|
+
|
|
16
|
+
// assets / icons
|
|
17
|
+
import { Icons } from "../../../common/icons-svg/index.js";
|
|
18
|
+
|
|
19
|
+
// helpers / data
|
|
20
|
+
import { optionsActivities } from "./helpers/index.js";
|
|
21
|
+
|
|
22
|
+
// typings
|
|
23
|
+
|
|
24
|
+
// styles / theme
|
|
25
|
+
import { theme } from "../../../styles/theme/theme.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Componente Modal para alteração de atividade.
|
|
29
|
+
*/
|
|
30
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
|
+
export const ModalChangeActivity = ({
|
|
32
|
+
visible,
|
|
33
|
+
onClose,
|
|
34
|
+
modalConfirm,
|
|
35
|
+
descricao
|
|
36
|
+
}) => {
|
|
37
|
+
const [isLoading] = React.useState(false);
|
|
38
|
+
const initial = (descricao ?? "").toLowerCase().replace(/\s+/g, "_");
|
|
39
|
+
const [selectedOption, setSelectedOption] = React.useState(initial || "none");
|
|
40
|
+
const handleConfirm = () => {
|
|
41
|
+
const selected = optionsActivities?.find(activity => activity.value === selectedOption);
|
|
42
|
+
if (selected && selected.value !== "none") {
|
|
43
|
+
modalConfirm({
|
|
44
|
+
label: selected.label,
|
|
45
|
+
value: selected.value,
|
|
46
|
+
key: selected.key
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// sempre fechar o modal
|
|
51
|
+
onClose();
|
|
52
|
+
};
|
|
53
|
+
const handleSelectDown = activity => {
|
|
54
|
+
const option = optionsActivities.find(o => o.label === activity || o.value === activity);
|
|
55
|
+
if (option) setSelectedOption(option.value);
|
|
56
|
+
};
|
|
57
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
58
|
+
animationType: "fade",
|
|
59
|
+
transparent: true,
|
|
60
|
+
visible: visible,
|
|
61
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
62
|
+
style: {
|
|
63
|
+
flex: 1,
|
|
64
|
+
justifyContent: "center",
|
|
65
|
+
alignItems: "center",
|
|
66
|
+
backgroundColor: "rgba(0,0,0,0.6)"
|
|
67
|
+
},
|
|
68
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
69
|
+
width: 346,
|
|
70
|
+
backgroundColor: theme.colors.orange[500],
|
|
71
|
+
borderStyled: {
|
|
72
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
73
|
+
},
|
|
74
|
+
paddingStyle: {
|
|
75
|
+
paddingLeft: theme.paddings["2xs"],
|
|
76
|
+
paddingRight: theme.paddings["2xs"],
|
|
77
|
+
paddingTop: theme.paddings.sm,
|
|
78
|
+
paddingBottom: theme.paddings.sm
|
|
79
|
+
},
|
|
80
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
81
|
+
marginStyle: {
|
|
82
|
+
marginBottom: theme.margins["2xs"],
|
|
83
|
+
marginLeft: theme.margins["1xs"]
|
|
84
|
+
},
|
|
85
|
+
flexStyle: {
|
|
86
|
+
flexDirection: "row",
|
|
87
|
+
alignItems: "center"
|
|
88
|
+
},
|
|
89
|
+
children: [/*#__PURE__*/_jsx(Icons, {
|
|
90
|
+
icon: "EXCLAMATION_TRIANGLE",
|
|
91
|
+
color: theme.colors.black[10],
|
|
92
|
+
background: theme.colors.yellow[50],
|
|
93
|
+
size: theme.fontSizes["2xl"]
|
|
94
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
95
|
+
text: "Alterar Atividade",
|
|
96
|
+
color: "#fff",
|
|
97
|
+
marginLeft: theme.margins["2xs"],
|
|
98
|
+
fontFamily: theme.fonts.inter_bold_700,
|
|
99
|
+
size: theme.fontSizes.md
|
|
100
|
+
})]
|
|
101
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
102
|
+
backgroundColor: theme.colors.neutral[300],
|
|
103
|
+
paddingStyle: {
|
|
104
|
+
padding: theme.paddings.xs
|
|
105
|
+
},
|
|
106
|
+
borderStyled: {
|
|
107
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
108
|
+
},
|
|
109
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
110
|
+
flexStyle: {
|
|
111
|
+
flexDirection: "row",
|
|
112
|
+
justifyContent: "flex-start"
|
|
113
|
+
},
|
|
114
|
+
width: "100%",
|
|
115
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
116
|
+
text: `Deseja realmente alterar sua atividade?`,
|
|
117
|
+
color: theme.colors.black[25],
|
|
118
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
119
|
+
size: theme.fontSizes.xs,
|
|
120
|
+
style: {
|
|
121
|
+
flexWrap: "wrap",
|
|
122
|
+
maxWidth: "100%"
|
|
123
|
+
}
|
|
124
|
+
})
|
|
125
|
+
}), /*#__PURE__*/_jsx(SelectOption, {
|
|
126
|
+
titleLabel: "Selecione atividade",
|
|
127
|
+
sizeTitleLabel: theme.fontSizes.xs,
|
|
128
|
+
dataOption: optionsActivities,
|
|
129
|
+
handleSelectDown: handleSelectDown,
|
|
130
|
+
backgroundColor: theme.colors.neutral[300]
|
|
131
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
132
|
+
marginStyle: {
|
|
133
|
+
marginTop: theme.margins["1xs"]
|
|
134
|
+
},
|
|
135
|
+
flexStyle: {
|
|
136
|
+
flexDirection: "row",
|
|
137
|
+
justifyContent: "space-between"
|
|
138
|
+
},
|
|
139
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
140
|
+
title: "CANCELAR",
|
|
141
|
+
onPress: onClose,
|
|
142
|
+
width: "48%",
|
|
143
|
+
height: 36,
|
|
144
|
+
isLoading: isLoading,
|
|
145
|
+
disabled: isLoading,
|
|
146
|
+
backgroundColor: theme.colors.neutral[300],
|
|
147
|
+
buttonTextStyle: {
|
|
148
|
+
color: theme.colors.blue[100],
|
|
149
|
+
fontFamily: "Inter-Medium",
|
|
150
|
+
fontSize: theme.fontSizes.xs,
|
|
151
|
+
fontWeight: "500"
|
|
152
|
+
},
|
|
153
|
+
flexStyle: {
|
|
154
|
+
flexDirection: "row",
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
justifyContent: "center",
|
|
157
|
+
textAlign: "center"
|
|
158
|
+
},
|
|
159
|
+
borderStyled: {
|
|
160
|
+
borderWidth: theme.borderWidths.thin,
|
|
161
|
+
borderColor: theme.colors.blue[100],
|
|
162
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
163
|
+
}
|
|
164
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
165
|
+
title: "CONFIRMAR",
|
|
166
|
+
onPress: handleConfirm,
|
|
167
|
+
width: "48%",
|
|
168
|
+
height: 36,
|
|
169
|
+
isLoading: isLoading,
|
|
170
|
+
disabled: isLoading,
|
|
171
|
+
backgroundColor: theme.colors.blue[100],
|
|
172
|
+
buttonTextStyle: {
|
|
173
|
+
color: "#fff",
|
|
174
|
+
fontFamily: "Inter-Medium",
|
|
175
|
+
fontSize: theme.fontSizes.xs,
|
|
176
|
+
fontWeight: "500"
|
|
177
|
+
},
|
|
178
|
+
flexStyle: {
|
|
179
|
+
flexDirection: "row",
|
|
180
|
+
alignItems: "center",
|
|
181
|
+
justifyContent: "center",
|
|
182
|
+
textAlign: "center"
|
|
183
|
+
},
|
|
184
|
+
borderStyled: {
|
|
185
|
+
borderWidth: theme.borderWidths.thin,
|
|
186
|
+
borderColor: theme.colors.blue[100],
|
|
187
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
188
|
+
}
|
|
189
|
+
})]
|
|
190
|
+
})]
|
|
191
|
+
})]
|
|
192
|
+
})
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Modal","View","Box","Button","Typography","SelectOption","Icons","optionsActivities","theme","jsx","_jsx","jsxs","_jsxs","ModalChangeActivity","visible","onClose","modalConfirm","descricao","isLoading","useState","initial","toLowerCase","replace","selectedOption","setSelectedOption","handleConfirm","selected","find","activity","value","label","key","handleSelectDown","option","o","animationType","transparent","children","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","margins","marginLeft","flexStyle","flexDirection","icon","color","black","background","yellow","size","fontSizes","text","fontFamily","fonts","inter_bold_700","md","neutral","padding","xs","inter_medium_500","flexWrap","maxWidth","titleLabel","sizeTitleLabel","dataOption","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","fontSize","fontWeight","textAlign","borderWidth","thin","borderColor"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB;AACA,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,oBAAW;AAC3B,OAAOC,MAAM,MAAM,uBAAc;AACjC,OAAOC,UAAU,MAAM,2BAAkB;AACzC,OAAOC,YAAY,MAAM,sCAA6B;;AAEtD;AACA,SAASC,KAAK,QAAQ,oCAA2B;;AAEjD;AACA,SAASC,iBAAiB,QAAQ,oBAAW;;AAE7C;;AAGA;AACA,SAASC,KAAK,QAAQ,gCAA6B;;AAEnD;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGA,OAAO,MAAMC,mBAAwD,GAAGA,CAAC;EACvEC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC;AACF,CAA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gBACbO,UAAU,EAAE,cAAc;gBAC1BoB,QAAQ,EAAEnF,KAAK,CAAC6D,SAAS,CAACQ,EAAE;gBAC5Be,UAAU,EAAE;cACd,CAAE;cACF/B,SAAS,EAAE;gBACTC,aAAa,EAAE,KAAK;gBACpBrB,UAAU,EAAE,QAAQ;gBACpBD,cAAc,EAAE,QAAQ;gBACxBqD,SAAS,EAAE;cACb,CAAE;cACF/C,YAAY,EAAE;gBACZgD,WAAW,EAAEtF,KAAK,CAACwC,YAAY,CAAC+C,IAAI;gBACpCC,WAAW,EAAExF,KAAK,CAACoC,MAAM,CAAC8C,IAAI,CAAC,GAAG,CAAC;gBACnC3C,YAAY,EAAEvC,KAAK,CAACwC,YAAY,CAACC;cACnC;YAAE,CACH,CAAC;UAAA,CACC,CAAC;QAAA,CACH,CAAC;MAAA,CACH;IAAC,CACF;EAAC,CACF,CAAC;AAEZ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-change-activitie-history/interface.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -12,6 +12,7 @@ import Typography from "../../typography/index.js";
|
|
|
12
12
|
import Button from "../../button/index.js";
|
|
13
13
|
import SelectOption from "../../selects/select-option/index.js";
|
|
14
14
|
import InputDateTime from "../../inputs/input-date-time/index.js";
|
|
15
|
+
import MaintenanceDescriptionInput from "../../maintenance-description-input/index.js";
|
|
15
16
|
|
|
16
17
|
// commons / svg
|
|
17
18
|
import { Icons } from "../../../common/icons-svg/index.js";
|
|
@@ -25,46 +26,53 @@ import { theme } from "../../../styles/theme/theme.js";
|
|
|
25
26
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
27
|
const options = [{
|
|
27
28
|
label: "Disp com veículo parado",
|
|
28
|
-
value: "
|
|
29
|
+
value: "8"
|
|
29
30
|
}, {
|
|
30
31
|
label: "Operação com veículo",
|
|
31
|
-
value: "
|
|
32
|
+
value: "1"
|
|
32
33
|
}, {
|
|
33
34
|
label: "Em carga",
|
|
34
|
-
value: "
|
|
35
|
+
value: "2"
|
|
35
36
|
}, {
|
|
36
37
|
label: "Em descarga",
|
|
37
|
-
value: "
|
|
38
|
+
value: "3"
|
|
38
39
|
}];
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Componente modal para edição de atividade para interação do usuário.
|
|
43
|
+
*/
|
|
39
44
|
const ModalJourneyRectification = ({
|
|
40
45
|
visible,
|
|
41
46
|
onClose,
|
|
42
47
|
modalConfirm,
|
|
43
|
-
textTitle
|
|
48
|
+
textTitle,
|
|
49
|
+
isLoading
|
|
44
50
|
}) => {
|
|
45
|
-
const [isLoading] = React.useState(false);
|
|
46
|
-
|
|
47
|
-
// *** DEFAULTS: já começa com um motivo, data e hora atuais
|
|
48
51
|
const defaultReason = options[0]?.value ?? null;
|
|
49
|
-
const [selectedReason, setSelectedReason] = useState(defaultReason);
|
|
50
|
-
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
51
|
-
const [selectedTime, setSelectedTime] = useState(new Date());
|
|
52
|
+
const [selectedReason, setSelectedReason] = useState(defaultReason);
|
|
53
|
+
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
54
|
+
const [selectedTime, setSelectedTime] = useState(new Date());
|
|
55
|
+
|
|
56
|
+
// motivo digitado pelo usuário
|
|
57
|
+
const [editReason, setEditReason] = useState("");
|
|
58
|
+
const [errorReason, setErrorReason] = useState("");
|
|
52
59
|
|
|
53
|
-
// helpers
|
|
60
|
+
// helpers
|
|
54
61
|
const fmtDate = d => `${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
|
|
55
62
|
const fmtTime = d => `${String(d.getHours()).padStart(2, "0")}:${String(d.getMinutes()).padStart(2, "0")}`;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const out = new Date(date);
|
|
61
|
-
if (time) {
|
|
62
|
-
out.setHours(time.getHours());
|
|
63
|
-
out.setMinutes(time.getMinutes());
|
|
64
|
-
out.setSeconds(0);
|
|
65
|
-
out.setMilliseconds(0);
|
|
63
|
+
const handleConfirm = () => {
|
|
64
|
+
if (!editReason.trim()) {
|
|
65
|
+
setErrorReason("Informe o motivo da edição!");
|
|
66
|
+
return;
|
|
66
67
|
}
|
|
67
|
-
|
|
68
|
+
const payload = {
|
|
69
|
+
jr_tipo_atividade_id: selectedReason,
|
|
70
|
+
description: options.find(o => o.value === selectedReason)?.label ?? null,
|
|
71
|
+
date_start: selectedDate ? fmtDate(selectedDate) : null,
|
|
72
|
+
hours_start: selectedTime ? fmtTime(selectedTime) : null,
|
|
73
|
+
edit_reason: editReason.trim()
|
|
74
|
+
};
|
|
75
|
+
modalConfirm(payload);
|
|
68
76
|
};
|
|
69
77
|
return /*#__PURE__*/_jsx(Modal, {
|
|
70
78
|
animationType: "fade",
|
|
@@ -104,10 +112,11 @@ const ModalJourneyRectification = ({
|
|
|
104
112
|
background: theme.colors.neutral[300],
|
|
105
113
|
size: 22
|
|
106
114
|
}), /*#__PURE__*/_jsx(Typography, {
|
|
107
|
-
text:
|
|
115
|
+
text: textTitle ?? "Editar atividade",
|
|
108
116
|
color: theme.colors.neutral[25],
|
|
109
117
|
marginLeft: theme.margins["2xs"],
|
|
110
|
-
fontFamily: theme.fonts.
|
|
118
|
+
fontFamily: theme.fonts.inter_bold,
|
|
119
|
+
fontWeight: "700",
|
|
111
120
|
size: theme.fontSizes.lg
|
|
112
121
|
})]
|
|
113
122
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
@@ -119,42 +128,46 @@ const ModalJourneyRectification = ({
|
|
|
119
128
|
borderRadius: theme.borderWidths.thick_medium
|
|
120
129
|
},
|
|
121
130
|
children: [/*#__PURE__*/_jsx(Typography, {
|
|
122
|
-
text: "Confirme as
|
|
123
|
-
color: theme.colors.black[
|
|
131
|
+
text: "Confirme as altera\xE7\xF5es antes de salvar.",
|
|
132
|
+
color: theme.colors.black[100],
|
|
124
133
|
fontFamily: theme.fonts.inter_regular_400,
|
|
125
|
-
|
|
134
|
+
fontWeight: "400",
|
|
135
|
+
lineHeight: theme.lineHeight["2xl"],
|
|
136
|
+
size: theme.fontSizes.sm,
|
|
126
137
|
marginBottom: 16
|
|
127
138
|
}), /*#__PURE__*/_jsx(SelectOption, {
|
|
128
139
|
titleLabel: "Selecione atividade",
|
|
129
140
|
sizeTitleLabel: 18,
|
|
130
|
-
dataOption: options
|
|
131
|
-
|
|
132
|
-
,
|
|
133
|
-
handleSelectDown: value => setSelectedReason(value) // ***
|
|
134
|
-
,
|
|
141
|
+
dataOption: options,
|
|
142
|
+
handleSelectDown: value => setSelectedReason(value),
|
|
135
143
|
backgroundColor: theme.colors.neutral[300]
|
|
136
144
|
}), /*#__PURE__*/_jsx(InputDateTime, {
|
|
137
145
|
mode: "date",
|
|
138
|
-
titleLabel: "Data"
|
|
139
|
-
|
|
140
|
-
,
|
|
141
|
-
value: selectedDate // *** controlado
|
|
142
|
-
,
|
|
143
|
-
onChange: d => setSelectedDate(d) // ***
|
|
144
|
-
,
|
|
146
|
+
titleLabel: "Data",
|
|
147
|
+
value: selectedDate,
|
|
148
|
+
onChange: d => setSelectedDate(d),
|
|
145
149
|
backgroundColor: "#f5f5f5",
|
|
146
150
|
colortitleLabel: "#333"
|
|
147
151
|
}), /*#__PURE__*/_jsx(InputDateTime, {
|
|
148
152
|
mode: "time",
|
|
149
|
-
titleLabel: "Hor\xE1rio"
|
|
150
|
-
|
|
151
|
-
,
|
|
152
|
-
value: selectedTime // *** controlado
|
|
153
|
-
,
|
|
154
|
-
onChange: d => setSelectedTime(d) // ***
|
|
155
|
-
,
|
|
153
|
+
titleLabel: "Hor\xE1rio",
|
|
154
|
+
value: selectedTime,
|
|
155
|
+
onChange: d => setSelectedTime(d),
|
|
156
156
|
backgroundColor: "#f5f5f5",
|
|
157
157
|
colortitleLabel: "#333"
|
|
158
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
159
|
+
width: "100%",
|
|
160
|
+
children: /*#__PURE__*/_jsx(MaintenanceDescriptionInput, {
|
|
161
|
+
label: "Motivo da edi\xE7\xE3o",
|
|
162
|
+
placeholderTextColor: theme.colors.gray[700],
|
|
163
|
+
placeholder: "Informe o motivo da edi\xE7\xE3o",
|
|
164
|
+
value: editReason,
|
|
165
|
+
onChangeText: text => {
|
|
166
|
+
setEditReason(text);
|
|
167
|
+
if (text.trim()) setErrorReason("");
|
|
168
|
+
},
|
|
169
|
+
error: errorReason
|
|
170
|
+
})
|
|
158
171
|
}), /*#__PURE__*/_jsxs(Box, {
|
|
159
172
|
marginStyle: {
|
|
160
173
|
marginTop: 4
|
|
@@ -172,8 +185,8 @@ const ModalJourneyRectification = ({
|
|
|
172
185
|
disabled: isLoading,
|
|
173
186
|
backgroundColor: theme.colors.neutral[300],
|
|
174
187
|
buttonTextStyle: {
|
|
175
|
-
color: theme.colors.blue[
|
|
176
|
-
fontFamily:
|
|
188
|
+
color: theme.colors.blue[500],
|
|
189
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
177
190
|
fontSize: theme.fontSizes.xs,
|
|
178
191
|
fontWeight: "500"
|
|
179
192
|
},
|
|
@@ -189,19 +202,8 @@ const ModalJourneyRectification = ({
|
|
|
189
202
|
borderRadius: theme.borderWidths.thick_medium
|
|
190
203
|
}
|
|
191
204
|
}), /*#__PURE__*/_jsx(Button, {
|
|
192
|
-
title: "
|
|
193
|
-
onPress:
|
|
194
|
-
const merged = mergeDateTime(selectedDate, selectedTime);
|
|
195
|
-
const payload = {
|
|
196
|
-
reasonValue: selectedReason,
|
|
197
|
-
reasonLabel: options.find(o => o.value === selectedReason)?.label ?? null,
|
|
198
|
-
date: selectedDate ? fmtDate(selectedDate) : null,
|
|
199
|
-
time: selectedTime ? fmtTime(selectedTime) : null,
|
|
200
|
-
dateTimeISO: merged ? merged.toISOString() : null
|
|
201
|
-
};
|
|
202
|
-
modalConfirm(payload);
|
|
203
|
-
onClose();
|
|
204
|
-
},
|
|
205
|
+
title: "ALTERAR",
|
|
206
|
+
onPress: handleConfirm,
|
|
205
207
|
width: "48%",
|
|
206
208
|
height: 40,
|
|
207
209
|
isLoading: isLoading,
|
|
@@ -209,7 +211,7 @@ const ModalJourneyRectification = ({
|
|
|
209
211
|
backgroundColor: theme.colors.blue[500],
|
|
210
212
|
buttonTextStyle: {
|
|
211
213
|
color: theme.colors.neutral[25],
|
|
212
|
-
fontFamily:
|
|
214
|
+
fontFamily: theme.fonts.inter_medium_500,
|
|
213
215
|
fontSize: theme.fontSizes.xs,
|
|
214
216
|
fontWeight: "500"
|
|
215
217
|
},
|
|
@@ -232,5 +234,9 @@ const ModalJourneyRectification = ({
|
|
|
232
234
|
});
|
|
233
235
|
};
|
|
234
236
|
ModalJourneyRectification.displayName = "ModalJourneyRectification";
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* EXPORTS
|
|
240
|
+
*/
|
|
235
241
|
export default asBaseComponent(ModalJourneyRectification);
|
|
236
242
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","Modal","View","Box","Typography","Button","SelectOption","InputDateTime","MaintenanceDescriptionInput","Icons","asBaseComponent","theme","jsx","_jsx","jsxs","_jsxs","options","label","value","ModalJourneyRectification","visible","onClose","modalConfirm","textTitle","isLoading","defaultReason","selectedReason","setSelectedReason","selectedDate","setSelectedDate","Date","selectedTime","setSelectedTime","editReason","setEditReason","errorReason","setErrorReason","fmtDate","d","String","getDate","padStart","getMonth","getFullYear","fmtTime","getHours","getMinutes","handleConfirm","trim","payload","jr_tipo_atividade_id","description","find","o","date_start","hours_start","edit_reason","animationType","transparent","children","style","flex","justifyContent","alignItems","backgroundColor","width","colors","orange","borderStyled","borderRadius","borderWidths","thick_medium","paddingStyle","paddingLeft","paddings","paddingRight","paddingTop","sm","paddingBottom","marginStyle","marginBottom","marginLeft","flexStyle","flexDirection","icon","color","background","neutral","size","text","margins","fontFamily","fonts","inter_bold","fontWeight","fontSizes","lg","padding","xs","black","inter_regular_400","lineHeight","titleLabel","sizeTitleLabel","dataOption","handleSelectDown","mode","onChange","colortitleLabel","placeholderTextColor","gray","placeholder","onChangeText","error","marginTop","title","onPress","height","disabled","buttonTextStyle","blue","inter_medium_500","fontSize","textAlign","borderWidth","thin","borderColor","displayName"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-edite-journey-rectification/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,KAAK,EAAEC,IAAI,QAAQ,cAAc;;AAE1C;AACA,OAAOC,GAAG,MAAM,oBAAW;AAC3B,OAAOC,UAAU,MAAM,2BAAkB;AACzC,OAAOC,MAAM,MAAM,uBAAc;AACjC,OAAOC,YAAY,MAAM,sCAA6B;AACtD,OAAOC,aAAa,MAAM,uCAA8B;AACxD,OAAOC,2BAA2B,MAAM,8CAAqC;;AAE7E;AACA,SAASC,KAAK,QAAQ,oCAA2B;;AAEjD;;AAEA,SAASC,eAAe,QAAQ,sCAAmC;;AAEnE;AACA,SAASC,KAAK,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpD,MAAMC,OAAO,GAAG,CACd;EAAEC,KAAK,EAAE,yBAAyB;EAAEC,KAAK,EAAE;AAAI,CAAC,EAChD;EAAED,KAAK,EAAE,sBAAsB;EAAEC,KAAK,EAAE;AAAI,CAAC,EAC7C;EAAED,KAAK,EAAE,UAAU;EAAEC,KAAK,EAAE;AAAI,CAAC,EACjC;EAAED,KAAK,EAAE,aAAa;EAAEC,KAAK,EAAE;AAAI,CAAC,CACrC;;AAED;AACA;AACA;AACA,MAAMC,yBAAoE,GAAGA,CAAC;EAC5EC,OAAO;EACPC,OAAO;EACPC,YAAY;EACZC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ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AM,EAAE,EAAG;cACX7F,SAAS,EAAEA,SAAW;cACtB8F,QAAQ,EAAE9F,SAAU;cACpBwC,eAAe,EAAErD,KAAK,CAACuD,MAAM,CAACsD,IAAI,CAAC,GAAG,CAAE;cACxCD,eAAe,EAAE;gBACflC,KAAK,EAAE1E,KAAK,CAACuD,MAAM,CAACqB,OAAO,CAAC,EAAE,CAAC;gBAC/BI,UAAU,EAAEhF,KAAK,CAACiF,KAAK,CAAC6B,gBAAgB;gBACxCC,QAAQ,EAAE/G,KAAK,CAACoF,SAAS,CAACG,EAAE;gBAC5BJ,UAAU,EAAE;cACd,CAAE;cACFZ,SAAS,EAAE;gBACTC,aAAa,EAAE,KAAK;gBACpBpB,UAAU,EAAE,QAAQ;gBACpBD,cAAc,EAAE,QAAQ;gBACxB6D,SAAS,EAAE;cACb,CAAE;cACFvD,YAAY,EAAE;gBACZwD,WAAW,EAAEjH,KAAK,CAAC2D,YAAY,CAACuD,IAAI;gBACpCC,WAAW,EAAEnH,KAAK,CAACuD,MAAM,CAACsD,IAAI,CAAC,GAAG,CAAC;gBACnCnD,YAAY,EAAE1D,KAAK,CAAC2D,YAAY,CAACC;cACnC;YAAE,CACH,CAAC;UAAA,CACC,CAAC;QAAA,CACH,CAAC;MAAA,CACH;IAAC,CACF;EAAC,CACF,CAAC;AAEZ,CAAC;AAEDpD,yBAAyB,CAAC4G,WAAW,GAAG,2BAA2B;;AAEnE;AACA;AACA;AACA,eAAerH,eAAe,CAACS,yBAAyB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/modals/modal-edite-journey-rectification/interface.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* IMPORTS
|
|
5
|
+
*/
|
|
6
|
+
import React, { forwardRef } from "react";
|
|
7
|
+
import { TouchableOpacity } from "react-native";
|
|
8
|
+
|
|
9
|
+
// commons / icons
|
|
10
|
+
import { Icons } from "../../common/icons-svg/index.js";
|
|
11
|
+
|
|
12
|
+
// components
|
|
13
|
+
import Box from "../box/index.js";
|
|
14
|
+
import Typography from "../typography/index.js";
|
|
15
|
+
import Button from "../button/index.js";
|
|
16
|
+
|
|
17
|
+
// styles / theme
|
|
18
|
+
import { theme } from "../../styles/theme/theme.js";
|
|
19
|
+
|
|
20
|
+
// typings
|
|
21
|
+
import { asBaseComponent } from "../../@types/as-base-component.js";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
|
+
/**
|
|
24
|
+
* Componente NotificationCard
|
|
25
|
+
*/
|
|
26
|
+
const NotificationCard = /*#__PURE__*/forwardRef(({
|
|
27
|
+
variant = "read",
|
|
28
|
+
title,
|
|
29
|
+
description,
|
|
30
|
+
actionLabel,
|
|
31
|
+
onPress,
|
|
32
|
+
onPressAction,
|
|
33
|
+
testID
|
|
34
|
+
}, ref) => {
|
|
35
|
+
const isWarning = variant === "unread";
|
|
36
|
+
|
|
37
|
+
// cor da borda lateral
|
|
38
|
+
const borderColor = isWarning ? theme.colors.orange[150] : theme.colors.blue[525];
|
|
39
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
activeOpacity: 0.7,
|
|
42
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
43
|
+
ref: ref,
|
|
44
|
+
testID: testID ?? "notification-card",
|
|
45
|
+
flexStyle: {
|
|
46
|
+
flexDirection: "row"
|
|
47
|
+
},
|
|
48
|
+
borderStyled: {
|
|
49
|
+
borderWidth: 1,
|
|
50
|
+
borderColor: isWarning ? theme.colors.orange[150] : theme.colors.neutral[200],
|
|
51
|
+
borderRadius: theme.borderWidths.thick_medium
|
|
52
|
+
},
|
|
53
|
+
marginStyle: {
|
|
54
|
+
marginBottom: 12
|
|
55
|
+
},
|
|
56
|
+
backgroundColor: isWarning ? theme.colors.neutral[500] : theme.colors.neutral[25],
|
|
57
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
58
|
+
width: 8,
|
|
59
|
+
backgroundColor: borderColor,
|
|
60
|
+
borderStyled: {
|
|
61
|
+
borderTopLeftRadius: theme.borderWidths.thick_medium,
|
|
62
|
+
borderBottomLeftRadius: theme.borderWidths.thick_medium
|
|
63
|
+
}
|
|
64
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
65
|
+
flexStyle: {
|
|
66
|
+
flex: 1
|
|
67
|
+
},
|
|
68
|
+
paddingStyle: {
|
|
69
|
+
padding: theme.paddings.sm
|
|
70
|
+
},
|
|
71
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
72
|
+
flexStyle: {
|
|
73
|
+
flexDirection: "row",
|
|
74
|
+
alignItems: "center"
|
|
75
|
+
},
|
|
76
|
+
marginStyle: {
|
|
77
|
+
marginBottom: 6
|
|
78
|
+
},
|
|
79
|
+
children: [/*#__PURE__*/_jsx(Icons, {
|
|
80
|
+
icon: "BELL",
|
|
81
|
+
color: borderColor,
|
|
82
|
+
size: 20
|
|
83
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
84
|
+
text: title,
|
|
85
|
+
fontFamily: theme.fonts.inter_bold,
|
|
86
|
+
fontWeight: "700",
|
|
87
|
+
size: theme.fontSizes.md,
|
|
88
|
+
color: theme.colors.black[100],
|
|
89
|
+
marginLeft: 8
|
|
90
|
+
})]
|
|
91
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
92
|
+
text: description,
|
|
93
|
+
numberOfLines: isWarning ? 2 : 4,
|
|
94
|
+
ellipsizeMode: "tail",
|
|
95
|
+
size: theme.fontSizes.sm,
|
|
96
|
+
lineHeight: theme.lineHeight.md,
|
|
97
|
+
fontFamily: theme.fonts.inter_regular_400,
|
|
98
|
+
color: theme.colors.gray[700],
|
|
99
|
+
marginBottom: isWarning && actionLabel ? 12 : 0
|
|
100
|
+
}), actionLabel && onPressAction && /*#__PURE__*/_jsx(Button, {
|
|
101
|
+
isLoading: false,
|
|
102
|
+
title: actionLabel,
|
|
103
|
+
onPress: onPressAction,
|
|
104
|
+
backgroundColor: theme.colors.neutral[25],
|
|
105
|
+
borderStyled: {
|
|
106
|
+
borderWidth: 1,
|
|
107
|
+
borderColor: theme.colors.red[500],
|
|
108
|
+
borderRadius: 12
|
|
109
|
+
},
|
|
110
|
+
buttonTextStyle: {
|
|
111
|
+
color: theme.colors.red[500],
|
|
112
|
+
fontSize: theme.fontSizes.sm,
|
|
113
|
+
fontFamily: theme.fonts.inter_medium_500
|
|
114
|
+
},
|
|
115
|
+
flexStyle: {
|
|
116
|
+
flexDirection: "row",
|
|
117
|
+
alignItems: "center",
|
|
118
|
+
justifyContent: "center"
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
alignSelf: "flex-start",
|
|
122
|
+
paddingHorizontal: 12
|
|
123
|
+
}
|
|
124
|
+
})]
|
|
125
|
+
})]
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
NotificationCard.displayName = "NotificationCard";
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* EXPORTS
|
|
133
|
+
*/
|
|
134
|
+
export default asBaseComponent(NotificationCard);
|
|
135
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","forwardRef","TouchableOpacity","Icons","Box","Typography","Button","theme","asBaseComponent","jsx","_jsx","jsxs","_jsxs","NotificationCard","variant","title","description","actionLabel","onPress","onPressAction","testID","ref","isWarning","borderColor","colors","orange","blue","activeOpacity","children","flexStyle","flexDirection","borderStyled","borderWidth","neutral","borderRadius","borderWidths","thick_medium","marginStyle","marginBottom","backgroundColor","width","borderTopLeftRadius","borderBottomLeftRadius","flex","paddingStyle","padding","paddings","sm","alignItems","icon","color","size","text","fontFamily","fonts","inter_bold","fontWeight","fontSizes","md","black","marginLeft","numberOfLines","ellipsizeMode","lineHeight","inter_regular_400","gray","isLoading","red","buttonTextStyle","fontSize","inter_medium_500","justifyContent","style","alignSelf","paddingHorizontal","displayName"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-card/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,gBAAgB,QAAc,cAAc;;AAErD;AACA,SAASC,KAAK,QAAQ,iCAAwB;;AAE9C;AACA,OAAOC,GAAG,MAAM,iBAAQ;AACxB,OAAOC,UAAU,MAAM,wBAAe;AACtC,OAAOC,MAAM,MAAM,oBAAW;;AAE9B;AACA,SAASC,KAAK,QAAQ,6BAA0B;;AAEhD;AACA,SAASC,eAAe,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGjE;AACA;AACA;AACA,MAAMC,gBAAkD,gBAAGZ,UAAU,CACnE,CAAC;EAAEa,OAAO,GAAG,MAAM;EAAEC,KAAK;EAAEC,WAAW;EAAEC,WAAW;EAAEC,OAAO;EAAEC,aAAa;EAAEC;AAAO,CAAC,EAAEC,GAAG,KAAK;EAC9F,MAAMC,SAAS,GAAGR,OAAO,KAAK,QAAQ;;EAEtC;EACA,MAAMS,WAAW,GAAGD,SAAS,GAAGf,KAAK,CAACiB,MAAM,CAACC,MAAM,CAAC,GAAG,CAAC,GAAGlB,KAAK,CAACiB,MAAM,CAACE,IAAI,CAAC,GAAG,CAAC;EAEjF,oBACEhB,IAAA,CAACR,gBAAgB;IAACgB,OAAO,EAAEA,OAAQ;IAACS,aAAa,EAAE,GAAI;IAAAC,QAAA,eACrDhB,KAAA,CAACR,GAAG;MACFiB,GAAG,EAAEA,GAAI;MACTD,MAAM,EAAEA,MAAM,IAAI,mBAAoB;MACtCS,SAAS,EAAE;QAAEC,aAAa,EAAE;MAAM,CAAE;MACpCC,YAAY,EAAE;QACZC,WAAW,EAAE,CAAC;QACd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pBkB,UAAU,EAAE,QAAQ;YACpBuB,cAAc,EAAE;UAClB,CAAE;UACFC,KAAK,EAAE;YAAEC,SAAS,EAAE,YAAY;YAAEC,iBAAiB,EAAE;UAAG;QAAE,CAC3D,CACF;MAAA,CACE,CAAC;IAAA,CACH;EAAC,CACU,CAAC;AAEvB,CACF,CAAC;AAED7D,gBAAgB,CAAC8D,WAAW,GAAG,kBAAkB;;AAEjD;AACA;AACA;AACA,eAAenE,eAAe,CAACK,gBAAgB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/notification-card/interface.ts"],"mappings":"","ignoreList":[]}
|