@thecb/components 11.1.0-beta.7 → 11.1.0-beta.8
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 +6 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +6 -10
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/obligation/Obligation.js +1 -5
- package/src/components/molecules/obligation/Obligation.stories.js +4 -9
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +3 -3
package/package.json
CHANGED
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
} from "./modules";
|
|
18
18
|
import { themeComponent } from "../../../util/themeUtils";
|
|
19
19
|
import { fallbackValues } from "./Obligation.theme";
|
|
20
|
-
import { noop } from "../../../util/general";
|
|
21
20
|
|
|
22
21
|
const Obligation = ({
|
|
23
22
|
config,
|
|
@@ -45,8 +44,7 @@ const Obligation = ({
|
|
|
45
44
|
cartEnabled = false,
|
|
46
45
|
cartConfig = undefined,
|
|
47
46
|
multiCartParams = undefined,
|
|
48
|
-
isInCart = false
|
|
49
|
-
openCartSlider = noop
|
|
47
|
+
isInCart = false
|
|
50
48
|
}) => {
|
|
51
49
|
/*
|
|
52
50
|
The value of obligations is always an array. It can contain:
|
|
@@ -154,7 +152,6 @@ const Obligation = ({
|
|
|
154
152
|
cartConfig={cartConfig}
|
|
155
153
|
multiCartParams={multiCartParams}
|
|
156
154
|
isInCart={isInCart}
|
|
157
|
-
openCartSlider={openCartSlider}
|
|
158
155
|
/>
|
|
159
156
|
)}
|
|
160
157
|
</Stack>
|
|
@@ -183,7 +180,6 @@ const Obligation = ({
|
|
|
183
180
|
cartConfig={cartConfig}
|
|
184
181
|
multiCartParams={multiCartParams}
|
|
185
182
|
isInCart={isInCart}
|
|
186
|
-
openCartSlider={openCartSlider}
|
|
187
183
|
/>
|
|
188
184
|
)}
|
|
189
185
|
</Box>
|
|
@@ -2,7 +2,6 @@ import React from "react";
|
|
|
2
2
|
import Obligation from "./Obligation";
|
|
3
3
|
import { fn } from "@storybook/test";
|
|
4
4
|
import { Box } from "../../atoms/layouts";
|
|
5
|
-
import { noop } from "../../../util/general";
|
|
6
5
|
|
|
7
6
|
const meta = {
|
|
8
7
|
title: "Molecules/Obligation",
|
|
@@ -204,14 +203,6 @@ const meta = {
|
|
|
204
203
|
type: { summary: "boolean" },
|
|
205
204
|
defaultValue: { summary: false }
|
|
206
205
|
}
|
|
207
|
-
},
|
|
208
|
-
openCartSlider: {
|
|
209
|
-
description:
|
|
210
|
-
"Function called upon clicking a ButtonWithAction when an obligation is already in the cart. This conveniently opens the cart slider.",
|
|
211
|
-
table: {
|
|
212
|
-
type: { summary: "function" },
|
|
213
|
-
defaultValue: { summary: noop }
|
|
214
|
-
}
|
|
215
206
|
}
|
|
216
207
|
}
|
|
217
208
|
};
|
|
@@ -341,6 +332,7 @@ export const ActiveObligation = {
|
|
|
341
332
|
createPaymentFromProfile: fn(),
|
|
342
333
|
configureMultiCart: fn(),
|
|
343
334
|
addToMultiCart: fn(),
|
|
335
|
+
openCartSlider: fn(),
|
|
344
336
|
setDetailedObligation: fn(),
|
|
345
337
|
navigateToDetailedObligation: fn(),
|
|
346
338
|
deleteObligationAssoc: fn()
|
|
@@ -409,6 +401,7 @@ export const InactiveObligation = {
|
|
|
409
401
|
createPaymentFromProfile: fn(),
|
|
410
402
|
configureMultiCart: fn(),
|
|
411
403
|
addToMultiCart: fn(),
|
|
404
|
+
openCartSlider: fn(),
|
|
412
405
|
setDetailedObligation: fn(),
|
|
413
406
|
navigateToDetailedObligation: fn(),
|
|
414
407
|
deleteObligationAssoc: fn()
|
|
@@ -481,6 +474,7 @@ export const CustomerManagementObligation = {
|
|
|
481
474
|
createPaymentFromProfile: fn(),
|
|
482
475
|
configureMultiCart: fn(),
|
|
483
476
|
addToMultiCart: fn(),
|
|
477
|
+
openCartSlider: fn(),
|
|
484
478
|
setDetailedObligation: fn(),
|
|
485
479
|
navigateToDetailedObligation: fn(),
|
|
486
480
|
deleteObligationAssoc: fn()
|
|
@@ -549,6 +543,7 @@ export const CartEnabledObligation = {
|
|
|
549
543
|
createPaymentFromProfile: fn(),
|
|
550
544
|
configureMultiCart: fn(),
|
|
551
545
|
addToMultiCart: fn(),
|
|
546
|
+
openCartSlider: fn(),
|
|
552
547
|
setDetailedObligation: fn(),
|
|
553
548
|
navigateToDetailedObligation: fn(),
|
|
554
549
|
deleteObligationAssoc: fn()
|
|
@@ -28,8 +28,7 @@ const PaymentDetailsActions = ({
|
|
|
28
28
|
disableActions = false,
|
|
29
29
|
cartEnabled,
|
|
30
30
|
cartConfig,
|
|
31
|
-
isInCart
|
|
32
|
-
openCartSlider
|
|
31
|
+
isInCart
|
|
33
32
|
}) => {
|
|
34
33
|
const planType = isPaymentPlan ? "Payment Plan" : "Autopay";
|
|
35
34
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -40,7 +39,8 @@ const PaymentDetailsActions = ({
|
|
|
40
39
|
configureMultiCart,
|
|
41
40
|
addToMultiCart,
|
|
42
41
|
setDetailedObligation,
|
|
43
|
-
navigateToDetailedObligation
|
|
42
|
+
navigateToDetailedObligation,
|
|
43
|
+
openCartSlider
|
|
44
44
|
} = actions;
|
|
45
45
|
const detailsSlug =
|
|
46
46
|
config.type === "ACCOUNT"
|