@thecb/components 5.8.0-beta.0 → 5.8.1-beta.1
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/dist/index.cjs.js +1159 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1159 -47
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/heading/Heading.js +2 -2
- package/src/components/atoms/paragraph/Paragraph.js +1 -1
- package/src/components/molecules/obligation/Obligation.js +3 -3
- package/src/components/molecules/obligation/modules/AmountModule.js +1 -0
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +43 -21
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +2 -2
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
2
|
+
03/30/2022
|
|
3
3
|
|
|
4
|
-
For new pages/applications, please us <Title /> and <Detail /> atoms
|
|
4
|
+
For new pages/applications, please us <Title /> and <Detail /> atoms (specify "as" prop with value of h1/h2/h3/h4/h5/h6/p)
|
|
5
5
|
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
@@ -25,7 +25,7 @@ const Obligation = ({
|
|
|
25
25
|
isPaymentPlan,
|
|
26
26
|
nextAutopayDate,
|
|
27
27
|
obligationAssocID,
|
|
28
|
-
|
|
28
|
+
inactive = false,
|
|
29
29
|
inactiveLookupTitle = "",
|
|
30
30
|
inactiveLookupInput = "Account",
|
|
31
31
|
inactiveLookupValue = ""
|
|
@@ -145,7 +145,7 @@ const Obligation = ({
|
|
|
145
145
|
nowrap
|
|
146
146
|
>
|
|
147
147
|
<Box padding="0">
|
|
148
|
-
<Cluster justify="flex-start" align="center">
|
|
148
|
+
<Cluster justify="flex-start" align="center" nowrap>
|
|
149
149
|
<IconModule
|
|
150
150
|
icon={config.icon}
|
|
151
151
|
iconDefault={config.iconDefault}
|
|
@@ -197,7 +197,7 @@ const Obligation = ({
|
|
|
197
197
|
</Box>
|
|
198
198
|
);
|
|
199
199
|
|
|
200
|
-
return
|
|
200
|
+
return inactive ? inactiveObligation : activeObligation;
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
export default Obligation;
|
|
@@ -7,6 +7,7 @@ import { Box, Cluster } from "../../../atoms/layouts";
|
|
|
7
7
|
import { SEA_GREEN } from "../../../../constants/colors";
|
|
8
8
|
import { fallbackValues } from "./AutopayModalModule.theme";
|
|
9
9
|
import { themeComponent } from "../../../../util/themeUtils";
|
|
10
|
+
import { render } from "react-dom/cjs/react-dom.production.min";
|
|
10
11
|
|
|
11
12
|
const AutopayModal = ({
|
|
12
13
|
autoPayActive,
|
|
@@ -16,7 +17,7 @@ const AutopayModal = ({
|
|
|
16
17
|
modalOpen,
|
|
17
18
|
deactivatePaymentSchedule,
|
|
18
19
|
navigateToSettings,
|
|
19
|
-
|
|
20
|
+
controlType = "tertiary",
|
|
20
21
|
isMobile,
|
|
21
22
|
themeValues,
|
|
22
23
|
isPaymentPlan,
|
|
@@ -62,24 +63,35 @@ const AutopayModal = ({
|
|
|
62
63
|
const defaultStyles = `
|
|
63
64
|
.autopayIcon { fill: ${themeValues.color}; text-decoration: underline; }
|
|
64
65
|
`;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
const renderAutoPayControl = () => {
|
|
67
|
+
switch (controlType) {
|
|
68
|
+
case "secondary": {
|
|
69
|
+
return (
|
|
70
|
+
<ButtonWithAction
|
|
71
|
+
text={autoPayActive ? `Turn off ${planType}` : `Set Up ${planType}`}
|
|
72
|
+
variant="secondary"
|
|
73
|
+
action={() => {
|
|
74
|
+
toggleModal(true);
|
|
75
|
+
}}
|
|
76
|
+
dataQa="Turn off Autopay"
|
|
77
|
+
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
case "tertiary": {
|
|
82
|
+
return (
|
|
83
|
+
<ButtonWithAction
|
|
84
|
+
text={autoPayActive ? `Manage ${planType}` : `Set Up ${planType}`}
|
|
85
|
+
variant="tertiary"
|
|
86
|
+
action={() => {
|
|
87
|
+
toggleModal(true);
|
|
88
|
+
}}
|
|
89
|
+
dataQa="Manage Autopay"
|
|
90
|
+
extraStyles={isMobile && `flex-grow: 1; width: 100%;`}
|
|
91
|
+
/>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
case "link": {
|
|
83
95
|
<Box
|
|
84
96
|
padding="0"
|
|
85
97
|
onClick={() => {
|
|
@@ -111,8 +123,18 @@ const AutopayModal = ({
|
|
|
111
123
|
{`${planType} ${nextAutopayDate}`}
|
|
112
124
|
</Text>
|
|
113
125
|
</Cluster>
|
|
114
|
-
</Box
|
|
115
|
-
|
|
126
|
+
</Box>;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return (
|
|
131
|
+
<Modal
|
|
132
|
+
showModal={() => toggleModal(true)}
|
|
133
|
+
hideModal={() => toggleModal(false)}
|
|
134
|
+
modalOpen={modalOpen}
|
|
135
|
+
{...modalExtraProps}
|
|
136
|
+
>
|
|
137
|
+
{renderAutoPayControl()}
|
|
116
138
|
</Modal>
|
|
117
139
|
);
|
|
118
140
|
};
|
|
@@ -35,18 +35,18 @@ const InactiveControlsModule = ({
|
|
|
35
35
|
modalOpen={modalOpen}
|
|
36
36
|
navigateToSettings={navigateToSettings}
|
|
37
37
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
38
|
-
buttonLinkType
|
|
39
38
|
isMobile={isMobile}
|
|
40
39
|
paymentPlanSchedule={paymentPlanSchedule}
|
|
41
40
|
isPaymentPlan={isPaymentPlan}
|
|
42
41
|
nextAutopayDate={nextAutopayDate}
|
|
43
42
|
obligationAssocID={obligationAssocID}
|
|
43
|
+
controlType="secondary"
|
|
44
44
|
/>
|
|
45
45
|
</Box>
|
|
46
46
|
)}
|
|
47
47
|
<Box padding="0" extraStyles={`flex-grow: 1;`}>
|
|
48
48
|
<ButtonWithAction
|
|
49
|
-
variant="
|
|
49
|
+
variant="secondary"
|
|
50
50
|
text="Remove"
|
|
51
51
|
action={handleRemoveAccount}
|
|
52
52
|
dataQa="Remove Account"
|
|
@@ -120,7 +120,7 @@ const PaymentDetailsActions = ({
|
|
|
120
120
|
modalOpen={modalOpen}
|
|
121
121
|
navigateToSettings={navigateToSettings}
|
|
122
122
|
deactivatePaymentSchedule={deactivatePaymentSchedule}
|
|
123
|
-
|
|
123
|
+
controlType="tertiary"
|
|
124
124
|
isMobile={isMobile}
|
|
125
125
|
paymentPlanSchedule={paymentPlanSchedule}
|
|
126
126
|
isPaymentPlan={isPaymentPlan}
|