@thecb/components 11.1.11-beta.1 → 11.1.12-beta.0
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 +133 -53
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +133 -53
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/form-layouts/FormInput.js +29 -20
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +49 -10
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +3 -1
- package/src/components/molecules/multiple-select-filter/__private__/util.js +13 -0
- package/src/components/molecules/obligation/Obligation.js +3 -1
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +2 -2
- package/src/components/molecules/partial-amount-form/PartialAmountField.js +29 -5
- package/src/components/molecules/partial-amount-form/PartialAmountField.theme.js +7 -0
package/dist/index.cjs.js
CHANGED
|
@@ -27094,7 +27094,7 @@ var fallbackValues$n = {
|
|
|
27094
27094
|
};
|
|
27095
27095
|
|
|
27096
27096
|
var _excluded$y = ["showErrors", "themeValues"],
|
|
27097
|
-
_excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
|
|
27097
|
+
_excluded2 = ["type", "labelDisplayOverride", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
|
|
27098
27098
|
var InputField = styled__default.input.withConfig({
|
|
27099
27099
|
displayName: "FormInput__InputField",
|
|
27100
27100
|
componentId: "sc-l094r1-0"
|
|
@@ -27157,6 +27157,8 @@ var FormattedInputField = styled__default(function (_ref8) {
|
|
|
27157
27157
|
var FormInput = function FormInput(_ref15) {
|
|
27158
27158
|
var _ref15$type = _ref15.type,
|
|
27159
27159
|
type = _ref15$type === void 0 ? "text" : _ref15$type,
|
|
27160
|
+
_ref15$labelDisplayOv = _ref15.labelDisplayOverride,
|
|
27161
|
+
labelDisplayOverride = _ref15$labelDisplayOv === void 0 ? null : _ref15$labelDisplayOv,
|
|
27160
27162
|
_ref15$labelTextWhenN = _ref15.labelTextWhenNoError,
|
|
27161
27163
|
labelTextWhenNoError = _ref15$labelTextWhenN === void 0 ? "" : _ref15$labelTextWhenN,
|
|
27162
27164
|
errorMessages = _ref15.errorMessages,
|
|
@@ -27220,7 +27222,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27220
27222
|
}, helperModal ? /*#__PURE__*/React__default.createElement(Cluster, {
|
|
27221
27223
|
justify: "space-between",
|
|
27222
27224
|
align: "center"
|
|
27223
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27225
|
+
}, labelDisplayOverride ? labelDisplayOverride : /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27224
27226
|
as: "label",
|
|
27225
27227
|
color: themeValues.labelColor,
|
|
27226
27228
|
variant: labelTextVariant,
|
|
@@ -27233,7 +27235,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
27233
27235
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
27234
27236
|
justify: "space-between",
|
|
27235
27237
|
align: "center"
|
|
27236
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27238
|
+
}, labelDisplayOverride ? labelDisplayOverride : /*#__PURE__*/React__default.createElement(Text$1, {
|
|
27237
27239
|
as: "label",
|
|
27238
27240
|
color: themeValues.labelColor,
|
|
27239
27241
|
variant: labelTextVariant,
|
|
@@ -46850,8 +46852,8 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
|
|
|
46850
46852
|
onClick = _ref.onClick,
|
|
46851
46853
|
onKeyPress = _ref.onKeyPress;
|
|
46852
46854
|
var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
|
|
46853
|
-
var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
|
|
46854
|
-
var allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
|
|
46855
|
+
var allowsCard = allowedPaymentInstruments === null || allowedPaymentInstruments === void 0 ? void 0 : allowedPaymentInstruments.includes(CC_METHOD);
|
|
46856
|
+
var allowsACH = allowedPaymentInstruments === null || allowedPaymentInstruments === void 0 ? void 0 : allowedPaymentInstruments.includes(ACH_METHOD);
|
|
46855
46857
|
var methodRequired = allowsCard && !allowsACH ? "debit or credit card payment method" : !allowsCard && allowsACH ? "checking account payment method" : "payment method";
|
|
46856
46858
|
return "To set up ".concat(planText, " you must have a saved ").concat(methodRequired, " and address. Do you want to save these now?");
|
|
46857
46859
|
};
|
|
@@ -47359,7 +47361,8 @@ var fallbackValues$N = {
|
|
|
47359
47361
|
var Obligation = function Obligation(_ref) {
|
|
47360
47362
|
var _obligations$, _firstObligation$cust;
|
|
47361
47363
|
var config = _ref.config,
|
|
47362
|
-
obligations = _ref.obligations,
|
|
47364
|
+
_ref$obligations = _ref.obligations,
|
|
47365
|
+
obligations = _ref$obligations === void 0 ? [] : _ref$obligations,
|
|
47363
47366
|
actions = _ref.actions,
|
|
47364
47367
|
autoPayEnabled = _ref.autoPayEnabled,
|
|
47365
47368
|
autoPayAvailable = _ref.autoPayAvailable,
|
|
@@ -47459,6 +47462,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47459
47462
|
isLoading: true
|
|
47460
47463
|
}))), !isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
|
|
47461
47464
|
obligations: obligations,
|
|
47465
|
+
obligationAssocID: obligationAssocID,
|
|
47462
47466
|
autoPayEnabled: autoPayEnabled,
|
|
47463
47467
|
autoPayAvailable: autoPayAvailable,
|
|
47464
47468
|
handleAutopayAction: handleAutopayAction,
|
|
@@ -47479,6 +47483,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47479
47483
|
isContentLoading: true
|
|
47480
47484
|
}))), isMobile && /*#__PURE__*/React__default.createElement(PaymentDetailsActions, {
|
|
47481
47485
|
obligations: obligations,
|
|
47486
|
+
obligationAssocID: obligationAssocID,
|
|
47482
47487
|
autoPayEnabled: autoPayEnabled,
|
|
47483
47488
|
autoPayAvailable: autoPayAvailable,
|
|
47484
47489
|
handleAutopayAction: handleAutopayAction,
|
|
@@ -47682,15 +47687,40 @@ var Obligation = function Obligation(_ref) {
|
|
|
47682
47687
|
};
|
|
47683
47688
|
var Obligation$1 = themeComponent(Obligation, "Obligation", fallbackValues$N);
|
|
47684
47689
|
|
|
47690
|
+
var weightTitle$1 = {
|
|
47691
|
+
"default": "600",
|
|
47692
|
+
small: "400"
|
|
47693
|
+
};
|
|
47694
|
+
var detailVariant$1 = {
|
|
47695
|
+
"default": "large",
|
|
47696
|
+
small: "small"
|
|
47697
|
+
};
|
|
47698
|
+
var fallbackValues$O = {
|
|
47699
|
+
weightTitle: weightTitle$1,
|
|
47700
|
+
detailVariant: detailVariant$1
|
|
47701
|
+
};
|
|
47702
|
+
|
|
47685
47703
|
var PartialAmountField = function PartialAmountField(_ref) {
|
|
47686
47704
|
var lineItem = _ref.lineItem,
|
|
47687
47705
|
field = _ref.field,
|
|
47688
47706
|
showErrors = _ref.showErrors,
|
|
47689
47707
|
errorMessages = _ref.errorMessages,
|
|
47690
47708
|
moneyFormat = _ref.moneyFormat,
|
|
47691
|
-
fieldActions = _ref.fieldActions
|
|
47709
|
+
fieldActions = _ref.fieldActions,
|
|
47710
|
+
themeValues = _ref.themeValues;
|
|
47692
47711
|
return /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
47693
|
-
|
|
47712
|
+
labelDisplayOverride: /*#__PURE__*/React__default.createElement(Stack, {
|
|
47713
|
+
childGap: "0px"
|
|
47714
|
+
}, /*#__PURE__*/React__default.createElement(Detail$1, {
|
|
47715
|
+
as: "h3",
|
|
47716
|
+
variant: themeValues.detailVariant,
|
|
47717
|
+
weight: themeValues.weightTitle
|
|
47718
|
+
}, /*#__PURE__*/React__default.createElement("span", null, lineItem.description)), /*#__PURE__*/React__default.createElement(Detail$1, {
|
|
47719
|
+
as: "p",
|
|
47720
|
+
variant: themeValues.detailVariant,
|
|
47721
|
+
weight: "400"
|
|
47722
|
+
}, lineItem.subDescription)),
|
|
47723
|
+
labelTextWhenNoError: "".concat(lineItem.description, " | ").concat(lineItem.subDescription),
|
|
47694
47724
|
key: lineItem.id,
|
|
47695
47725
|
field: field,
|
|
47696
47726
|
fieldActions: fieldActions,
|
|
@@ -47713,7 +47743,7 @@ var PartialAmountField = function PartialAmountField(_ref) {
|
|
|
47713
47743
|
function arePropsEqual(prevProps, nextProps) {
|
|
47714
47744
|
return equals(prevProps.errorMessages, nextProps.errorMessages) && equals(prevProps.field, nextProps.field) && equals(prevProps.showErrors, nextProps.showErrors) && equals(prevProps.moneyFormat, nextProps.moneyFormat) && equals(prevProps.lineItem, nextProps.lineItem);
|
|
47715
47745
|
}
|
|
47716
|
-
var PartialAmountField$1 = /*#__PURE__*/React__default.memo(PartialAmountField, arePropsEqual);
|
|
47746
|
+
var PartialAmountField$1 = /*#__PURE__*/React__default.memo(themeComponent(PartialAmountField, "PartialAmountField", fallbackValues$O, "default"), arePropsEqual);
|
|
47717
47747
|
|
|
47718
47748
|
var PartialAmountForm = function PartialAmountForm(_ref) {
|
|
47719
47749
|
var _ref$variant = _ref.variant,
|
|
@@ -47818,7 +47848,7 @@ var numberColor = MATISSE_BLUE;
|
|
|
47818
47848
|
var hoverBackgroundColor$2 = ALABASTER_WHITE;
|
|
47819
47849
|
var activeBackgroundColor$2 = WHITE;
|
|
47820
47850
|
var activeColor$9 = MATISSE_BLUE;
|
|
47821
|
-
var fallbackValues$
|
|
47851
|
+
var fallbackValues$P = {
|
|
47822
47852
|
activeColor: activeColor$9,
|
|
47823
47853
|
activeBackgroundColor: activeBackgroundColor$2,
|
|
47824
47854
|
arrowColor: arrowColor,
|
|
@@ -48012,7 +48042,7 @@ var Pagination = function Pagination(_ref3) {
|
|
|
48012
48042
|
buttonWidth: buttonWidth
|
|
48013
48043
|
}));
|
|
48014
48044
|
};
|
|
48015
|
-
var Pagination$1 = themeComponent(Pagination, "Pagination", fallbackValues$
|
|
48045
|
+
var Pagination$1 = themeComponent(Pagination, "Pagination", fallbackValues$P);
|
|
48016
48046
|
|
|
48017
48047
|
var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
48018
48048
|
var _ref$isForwardButtonD = _ref.isForwardButtonDisabled,
|
|
@@ -48113,7 +48143,7 @@ var labeledAmountTotal = {
|
|
|
48113
48143
|
"default": "large",
|
|
48114
48144
|
small: "small"
|
|
48115
48145
|
};
|
|
48116
|
-
var fallbackValues$
|
|
48146
|
+
var fallbackValues$Q = {
|
|
48117
48147
|
backgroundColor: backgroundColor$c,
|
|
48118
48148
|
lineItem: lineItem,
|
|
48119
48149
|
labeledAmountSubtotal: labeledAmountSubtotal,
|
|
@@ -48482,7 +48512,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48482
48512
|
isError: isError
|
|
48483
48513
|
});
|
|
48484
48514
|
};
|
|
48485
|
-
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$
|
|
48515
|
+
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$Q, "default");
|
|
48486
48516
|
|
|
48487
48517
|
var linkColor$4 = {
|
|
48488
48518
|
"default": "#3176AA"
|
|
@@ -48502,7 +48532,7 @@ var modalLinkHoverFocus = {
|
|
|
48502
48532
|
var linkTextDecoration = {
|
|
48503
48533
|
"default": LINK_TEXT_DECORATION
|
|
48504
48534
|
};
|
|
48505
|
-
var fallbackValues$
|
|
48535
|
+
var fallbackValues$R = {
|
|
48506
48536
|
linkColor: linkColor$4,
|
|
48507
48537
|
fontSize: fontSize$a,
|
|
48508
48538
|
lineHeight: lineHeight$4,
|
|
@@ -48566,7 +48596,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
|
|
|
48566
48596
|
}, link)
|
|
48567
48597
|
}));
|
|
48568
48598
|
};
|
|
48569
|
-
var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$
|
|
48599
|
+
var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$R, "default");
|
|
48570
48600
|
|
|
48571
48601
|
var backgroundColor$d = {
|
|
48572
48602
|
"default": "#ffffff",
|
|
@@ -48601,7 +48631,7 @@ var modalLinkTextDecoration = {
|
|
|
48601
48631
|
"default": LINK_TEXT_DECORATION,
|
|
48602
48632
|
footer: "none"
|
|
48603
48633
|
};
|
|
48604
|
-
var fallbackValues$
|
|
48634
|
+
var fallbackValues$S = {
|
|
48605
48635
|
backgroundColor: backgroundColor$d,
|
|
48606
48636
|
linkColor: linkColor$5,
|
|
48607
48637
|
border: border$3,
|
|
@@ -48673,7 +48703,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
48673
48703
|
className: "modal-trigger"
|
|
48674
48704
|
}, link));
|
|
48675
48705
|
};
|
|
48676
|
-
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$
|
|
48706
|
+
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$S, "default");
|
|
48677
48707
|
|
|
48678
48708
|
var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
48679
48709
|
var onCheck = _ref.onCheck,
|
|
@@ -49445,7 +49475,7 @@ var headingDisabledColor = "".concat(ATHENS_GREY);
|
|
|
49445
49475
|
var bodyBackgroundColor$1 = "#eeeeee";
|
|
49446
49476
|
var borderColor$6 = "".concat(GHOST_GREY);
|
|
49447
49477
|
var focusStyles = "outline: none;";
|
|
49448
|
-
var fallbackValues$
|
|
49478
|
+
var fallbackValues$T = {
|
|
49449
49479
|
headingBackgroundColor: headingBackgroundColor$1,
|
|
49450
49480
|
headingDisabledColor: headingDisabledColor,
|
|
49451
49481
|
bodyBackgroundColor: bodyBackgroundColor$1,
|
|
@@ -49748,7 +49778,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
49748
49778
|
});
|
|
49749
49779
|
})));
|
|
49750
49780
|
};
|
|
49751
|
-
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$
|
|
49781
|
+
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$T);
|
|
49752
49782
|
|
|
49753
49783
|
var RegistrationForm = function RegistrationForm(_ref) {
|
|
49754
49784
|
var clearOnDismount = _ref.clearOnDismount,
|
|
@@ -49868,13 +49898,13 @@ RegistrationForm.mapDispatchToProps = mapDispatchToProps$9;
|
|
|
49868
49898
|
|
|
49869
49899
|
var GRECIAN_GREY$1 = GRECIAN_GREY;
|
|
49870
49900
|
var bannerBackgroundColor = GRECIAN_GREY$1;
|
|
49871
|
-
var fallbackValues$
|
|
49901
|
+
var fallbackValues$U = {
|
|
49872
49902
|
bannerBackgroundColor: bannerBackgroundColor
|
|
49873
49903
|
};
|
|
49874
49904
|
|
|
49875
49905
|
var ResetConfirmationForm = function ResetConfirmationForm() {
|
|
49876
49906
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
49877
|
-
var themeValues = createThemeValues(themeContext, fallbackValues$
|
|
49907
|
+
var themeValues = createThemeValues(themeContext, fallbackValues$U, "ResetConfirmationForm");
|
|
49878
49908
|
var isMobile = themeContext.isMobile;
|
|
49879
49909
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
49880
49910
|
padding: "0",
|
|
@@ -49989,13 +50019,13 @@ ResetPasswordForm.mapDispatchToProps = mapDispatchToProps$a;
|
|
|
49989
50019
|
|
|
49990
50020
|
var GRECIAN_GREY$2 = GRECIAN_GREY;
|
|
49991
50021
|
var bannerBackgroundColor$1 = GRECIAN_GREY$2;
|
|
49992
|
-
var fallbackValues$
|
|
50022
|
+
var fallbackValues$V = {
|
|
49993
50023
|
bannerBackgroundColor: bannerBackgroundColor$1
|
|
49994
50024
|
};
|
|
49995
50025
|
|
|
49996
50026
|
var ResetPasswordSuccess = function ResetPasswordSuccess() {
|
|
49997
50027
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
49998
|
-
var themeValues = createThemeValues(themeContext, fallbackValues$
|
|
50028
|
+
var themeValues = createThemeValues(themeContext, fallbackValues$V, "ResetPasswordSuccess");
|
|
49999
50029
|
var isMobile = themeContext.isMobile;
|
|
50000
50030
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
50001
50031
|
padding: "0",
|
|
@@ -50044,7 +50074,7 @@ var ResetPasswordSuccess$1 = withWindowSize(ResetPasswordSuccess);
|
|
|
50044
50074
|
var activeTabBackground = "#FFFFFF";
|
|
50045
50075
|
var activeTabAccent = "#15749D";
|
|
50046
50076
|
var activeTabHover = "#B8D5E1";
|
|
50047
|
-
var fallbackValues$
|
|
50077
|
+
var fallbackValues$W = {
|
|
50048
50078
|
activeTabBackground: activeTabBackground,
|
|
50049
50079
|
activeTabAccent: activeTabAccent,
|
|
50050
50080
|
activeTabHover: activeTabHover
|
|
@@ -50112,12 +50142,12 @@ var Tabs = function Tabs(_ref) {
|
|
|
50112
50142
|
}, tab.content);
|
|
50113
50143
|
}))));
|
|
50114
50144
|
};
|
|
50115
|
-
var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$
|
|
50145
|
+
var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$W);
|
|
50116
50146
|
|
|
50117
50147
|
var activeTabBackground$1 = "#FFFFFF";
|
|
50118
50148
|
var activeTabAccent$1 = "#15749D";
|
|
50119
50149
|
var activeTabHover$1 = "#B8D5E1";
|
|
50120
|
-
var fallbackValues$
|
|
50150
|
+
var fallbackValues$X = {
|
|
50121
50151
|
activeTabBackground: activeTabBackground$1,
|
|
50122
50152
|
activeTabAccent: activeTabAccent$1,
|
|
50123
50153
|
activeTabHover: activeTabHover$1
|
|
@@ -50172,7 +50202,7 @@ var TabSidebar = function TabSidebar(_ref) {
|
|
|
50172
50202
|
}, text)))));
|
|
50173
50203
|
})));
|
|
50174
50204
|
};
|
|
50175
|
-
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$
|
|
50205
|
+
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$X);
|
|
50176
50206
|
|
|
50177
50207
|
var Timeout = function Timeout(_ref) {
|
|
50178
50208
|
var onLogout = _ref.onLogout;
|
|
@@ -50293,7 +50323,7 @@ var fontColor$1 = WHITE;
|
|
|
50293
50323
|
var textAlign$1 = "left";
|
|
50294
50324
|
var headerBackgroundColor$1 = BRIGHT_GREY;
|
|
50295
50325
|
var imageBackgroundColor$1 = MATISSE_BLUE;
|
|
50296
|
-
var fallbackValues$
|
|
50326
|
+
var fallbackValues$Y = {
|
|
50297
50327
|
fontWeight: fontWeight$8,
|
|
50298
50328
|
fontColor: fontColor$1,
|
|
50299
50329
|
textAlign: textAlign$1,
|
|
@@ -50338,7 +50368,7 @@ var WelcomeModule = function WelcomeModule(_ref) {
|
|
|
50338
50368
|
src: welcomeImage
|
|
50339
50369
|
})))));
|
|
50340
50370
|
};
|
|
50341
|
-
var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$
|
|
50371
|
+
var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$Y));
|
|
50342
50372
|
|
|
50343
50373
|
var WorkflowTile = function WorkflowTile(_ref) {
|
|
50344
50374
|
var _ref$workflowName = _ref.workflowName,
|
|
@@ -50398,7 +50428,7 @@ var menuItemColorDelete = RAZZMATAZZ_RED;
|
|
|
50398
50428
|
var menuItemHoverBackgroundColor = CORNFLOWER_BLUE;
|
|
50399
50429
|
var menuItemHoverBackgroundColorDelete = BLUSH_RED;
|
|
50400
50430
|
var menuItemHoverColor = ROYAL_BLUE_VIVID;
|
|
50401
|
-
var fallbackValues$
|
|
50431
|
+
var fallbackValues$Z = {
|
|
50402
50432
|
menuItemBackgroundColor: menuItemBackgroundColor,
|
|
50403
50433
|
menuItemColor: menuItemColor,
|
|
50404
50434
|
menuItemColorDelete: menuItemColorDelete,
|
|
@@ -50465,13 +50495,13 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
|
|
|
50465
50495
|
extraStyles: textExtraStyles
|
|
50466
50496
|
}, text)));
|
|
50467
50497
|
};
|
|
50468
|
-
var PopupMenuItem$1 = themeComponent(PopupMenuItem, "PopupMenuItem", fallbackValues$
|
|
50498
|
+
var PopupMenuItem$1 = themeComponent(PopupMenuItem, "PopupMenuItem", fallbackValues$Z);
|
|
50469
50499
|
|
|
50470
50500
|
var hoverColor$5 = "#116285";
|
|
50471
50501
|
var activeColor$a = "#0E506D";
|
|
50472
50502
|
var menuTriggerColor = "#15749D";
|
|
50473
50503
|
var backgroundColor$e = "white";
|
|
50474
|
-
var fallbackValues$
|
|
50504
|
+
var fallbackValues$_ = {
|
|
50475
50505
|
hoverColor: hoverColor$5,
|
|
50476
50506
|
activeColor: activeColor$a,
|
|
50477
50507
|
menuTriggerColor: menuTriggerColor,
|
|
@@ -50607,13 +50637,13 @@ var PopupMenu = function PopupMenu(_ref) {
|
|
|
50607
50637
|
}, item));
|
|
50608
50638
|
})));
|
|
50609
50639
|
};
|
|
50610
|
-
var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$
|
|
50640
|
+
var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$_);
|
|
50611
50641
|
|
|
50612
50642
|
var primaryColor$1 = WHITE;
|
|
50613
50643
|
var primaryHoverColor = INFO_BLUE;
|
|
50614
50644
|
var secondaryColor = MATISSE_BLUE;
|
|
50615
50645
|
var secondaryHoverColor = "#115D7E";
|
|
50616
|
-
var fallbackValues
|
|
50646
|
+
var fallbackValues$$ = {
|
|
50617
50647
|
primaryColor: primaryColor$1,
|
|
50618
50648
|
primaryHoverColor: primaryHoverColor,
|
|
50619
50649
|
secondaryColor: secondaryColor,
|
|
@@ -50740,7 +50770,8 @@ var FilterButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
50740
50770
|
truncateBtnTextWidth = _ref.truncateBtnTextWidth,
|
|
50741
50771
|
filterLabel = _ref.filterLabel,
|
|
50742
50772
|
selectedOptions = _ref.selectedOptions,
|
|
50743
|
-
extraStyles = _ref.extraStyles
|
|
50773
|
+
extraStyles = _ref.extraStyles,
|
|
50774
|
+
dataAppliedOptions = _ref.dataAppliedOptions;
|
|
50744
50775
|
var btnTextFilterDescription = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? "".concat(filterLabel, ": ") : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "");
|
|
50745
50776
|
var btnTextItemsDescription = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length && (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 1 ? ", +".concat((selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) - 1, " More") : "";
|
|
50746
50777
|
return /*#__PURE__*/React__default.createElement(StyledFilterButton, {
|
|
@@ -50758,6 +50789,7 @@ var FilterButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
50758
50789
|
dataQa: "".concat(name, "-filter-button"),
|
|
50759
50790
|
extraStyles: extraStyles,
|
|
50760
50791
|
"aria-label": "".concat(filterLabel, " Filter: ").concat(btnTextFilterDescription, " ").concat(btnTextItemsDescription),
|
|
50792
|
+
"data-applied-options": dataAppliedOptions,
|
|
50761
50793
|
contentOverride: true
|
|
50762
50794
|
}, btnContentOverride ? btnContentOverride : /*#__PURE__*/React__default.createElement(Center, {
|
|
50763
50795
|
as: "span",
|
|
@@ -50942,6 +50974,19 @@ var selectOption = function selectOption(option, selectedOptions, setSelectedOpt
|
|
|
50942
50974
|
setSelectedOptions(moreOptions);
|
|
50943
50975
|
}
|
|
50944
50976
|
};
|
|
50977
|
+
var mergeOptions = function mergeOptions(selectedOptions, activeOptions) {
|
|
50978
|
+
if (!activeOptions.length) return selectedOptions;
|
|
50979
|
+
if (!selectedOptions.length) return activeOptions;
|
|
50980
|
+
var mergedOptions = _toConsumableArray(selectedOptions);
|
|
50981
|
+
activeOptions.forEach(function (activeOption) {
|
|
50982
|
+
if (!mergedOptions.some(function (option) {
|
|
50983
|
+
return option.name === activeOption.name;
|
|
50984
|
+
})) {
|
|
50985
|
+
mergedOptions.push(activeOption);
|
|
50986
|
+
}
|
|
50987
|
+
});
|
|
50988
|
+
return mergedOptions;
|
|
50989
|
+
};
|
|
50945
50990
|
|
|
50946
50991
|
var useKeyboardNavigation = function useKeyboardNavigation(_ref) {
|
|
50947
50992
|
var options = _ref.options,
|
|
@@ -51142,41 +51187,75 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
51142
51187
|
searchable = _ref$searchable === void 0 ? true : _ref$searchable,
|
|
51143
51188
|
themeValues = _ref.themeValues,
|
|
51144
51189
|
_ref$truncateBtnTextW = _ref.truncateBtnTextWidth,
|
|
51145
|
-
truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW
|
|
51190
|
+
truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW,
|
|
51191
|
+
activeAppliedOptions = _ref.activeAppliedOptions;
|
|
51192
|
+
// State to manage whether the dropdown is open or closed
|
|
51146
51193
|
var _useState = React.useState(false),
|
|
51147
51194
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51148
51195
|
opened = _useState2[0],
|
|
51149
51196
|
setOpened = _useState2[1];
|
|
51197
|
+
|
|
51198
|
+
// State to manage the currently selected options
|
|
51150
51199
|
var _useState3 = React.useState([]),
|
|
51151
51200
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
51152
51201
|
selectedOptions = _useState4[0],
|
|
51153
51202
|
setSelectedOptions = _useState4[1];
|
|
51154
|
-
|
|
51203
|
+
|
|
51204
|
+
// State to manage the applied options, initialized with activeAppliedOptions or an empty array
|
|
51205
|
+
var _useState5 = React.useState(activeAppliedOptions || []),
|
|
51155
51206
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
51156
51207
|
appliedOptions = _useState6[0],
|
|
51157
51208
|
setAppliedOptions = _useState6[1];
|
|
51209
|
+
|
|
51210
|
+
// State to track whether the user has interacted with the component
|
|
51211
|
+
var _useState7 = React.useState(false),
|
|
51212
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
51213
|
+
hasInteracted = _useState8[0],
|
|
51214
|
+
setHasInteracted = _useState8[1];
|
|
51215
|
+
|
|
51216
|
+
// Reference to keep track of the opened state across renders without causing re-renders
|
|
51158
51217
|
var openedRef = React.useRef(opened);
|
|
51159
|
-
|
|
51160
|
-
|
|
51161
|
-
setOpened(false);
|
|
51162
|
-
actions.fields.searchTerm.set("");
|
|
51163
|
-
}
|
|
51164
|
-
};
|
|
51218
|
+
|
|
51219
|
+
// Hook to detect clicks outside the component and close the dropdown
|
|
51165
51220
|
var containerRef = useOutsideClickHook(function () {
|
|
51166
51221
|
return handleOnClose();
|
|
51167
51222
|
});
|
|
51223
|
+
|
|
51224
|
+
// References to various elements within the component
|
|
51168
51225
|
var dropdownRef = React.useRef(null);
|
|
51169
51226
|
var filterButtonRef = React.useRef(null);
|
|
51170
51227
|
var applyFilterButtonRef = React.useRef(null);
|
|
51228
|
+
|
|
51229
|
+
// IDs for accessibility and identification purposes
|
|
51171
51230
|
var filterDropdownID = "".concat(name, "-filter-dropdown");
|
|
51172
51231
|
var listGroupID = "".concat(name, "-list-group");
|
|
51232
|
+
var handleOnClose = function handleOnClose() {
|
|
51233
|
+
if (openedRef.current) {
|
|
51234
|
+
setOpened(false);
|
|
51235
|
+
actions.fields.searchTerm.set("");
|
|
51236
|
+
}
|
|
51237
|
+
};
|
|
51173
51238
|
React.useEffect(function () {
|
|
51174
51239
|
openedRef.current = opened;
|
|
51175
51240
|
if (!opened) {
|
|
51176
|
-
|
|
51177
|
-
|
|
51241
|
+
if (hasInteracted) {
|
|
51242
|
+
onApply(selectedOptions);
|
|
51243
|
+
setAppliedOptions(selectedOptions);
|
|
51244
|
+
}
|
|
51245
|
+
} else {
|
|
51246
|
+
setHasInteracted(true);
|
|
51178
51247
|
}
|
|
51179
51248
|
}, [opened]);
|
|
51249
|
+
React.useEffect(function () {
|
|
51250
|
+
// Update the applied options state with the current active applied options,
|
|
51251
|
+
// or an empty array if activeAppliedOptions is undefined or null.
|
|
51252
|
+
// This ensures that the current applied options are in sync with the parent component.
|
|
51253
|
+
setAppliedOptions(activeAppliedOptions || []);
|
|
51254
|
+
|
|
51255
|
+
// Merge the selected options with the active applied options.
|
|
51256
|
+
var mergedSelections = mergeOptions(selectedOptions, activeAppliedOptions);
|
|
51257
|
+
setSelectedOptions(mergedSelections);
|
|
51258
|
+
}, [activeAppliedOptions]);
|
|
51180
51259
|
React.useEffect(function () {
|
|
51181
51260
|
var handleKeyDown = function handleKeyDown(event) {
|
|
51182
51261
|
if (event.key === "Escape") {
|
|
@@ -51218,7 +51297,8 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
51218
51297
|
truncateBtnTextWidth: truncateBtnTextWidth,
|
|
51219
51298
|
filterLabel: filterLabel,
|
|
51220
51299
|
selectedOptions: selectedOptions,
|
|
51221
|
-
extraStyles: btnExtraStyles
|
|
51300
|
+
extraStyles: btnExtraStyles,
|
|
51301
|
+
dataAppliedOptions: appliedOptions === null || appliedOptions === void 0 ? void 0 : appliedOptions.length
|
|
51222
51302
|
}), /*#__PURE__*/React__default.createElement(FilterDropdown, {
|
|
51223
51303
|
id: filterDropdownID,
|
|
51224
51304
|
ref: dropdownRef,
|
|
@@ -51265,10 +51345,10 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
51265
51345
|
ariaLabel: "Apply all filters"
|
|
51266
51346
|
}))));
|
|
51267
51347
|
};
|
|
51268
|
-
var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues
|
|
51348
|
+
var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$$);
|
|
51269
51349
|
|
|
51270
51350
|
var pageBackground = "#FBFCFD";
|
|
51271
|
-
var fallbackValues
|
|
51351
|
+
var fallbackValues$10 = {
|
|
51272
51352
|
pageBackground: pageBackground
|
|
51273
51353
|
};
|
|
51274
51354
|
|
|
@@ -51316,7 +51396,7 @@ var CenterSingle = function CenterSingle(_ref) {
|
|
|
51316
51396
|
padding: "0"
|
|
51317
51397
|
})));
|
|
51318
51398
|
};
|
|
51319
|
-
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues
|
|
51399
|
+
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$10));
|
|
51320
51400
|
|
|
51321
51401
|
var CenterStack = function CenterStack(_ref) {
|
|
51322
51402
|
var header = _ref.header,
|
|
@@ -51359,7 +51439,7 @@ var CenterStack = function CenterStack(_ref) {
|
|
|
51359
51439
|
padding: "0"
|
|
51360
51440
|
})));
|
|
51361
51441
|
};
|
|
51362
|
-
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues
|
|
51442
|
+
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$10));
|
|
51363
51443
|
|
|
51364
51444
|
var CenterSingle$2 = function CenterSingle(_ref) {
|
|
51365
51445
|
var header = _ref.header,
|
|
@@ -51405,7 +51485,7 @@ var CenterSingle$2 = function CenterSingle(_ref) {
|
|
|
51405
51485
|
padding: "0"
|
|
51406
51486
|
})));
|
|
51407
51487
|
};
|
|
51408
|
-
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues
|
|
51488
|
+
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$10));
|
|
51409
51489
|
|
|
51410
51490
|
var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
51411
51491
|
var header = _ref.header,
|
|
@@ -51458,7 +51538,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
|
51458
51538
|
padding: "0"
|
|
51459
51539
|
})));
|
|
51460
51540
|
};
|
|
51461
|
-
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues
|
|
51541
|
+
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$10));
|
|
51462
51542
|
|
|
51463
51543
|
var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
51464
51544
|
var header = _ref.header,
|
|
@@ -51528,7 +51608,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
51528
51608
|
key: "footer-box"
|
|
51529
51609
|
})));
|
|
51530
51610
|
};
|
|
51531
|
-
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues
|
|
51611
|
+
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$10));
|
|
51532
51612
|
|
|
51533
51613
|
var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
|
|
51534
51614
|
var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|