@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.esm.js CHANGED
@@ -27086,7 +27086,7 @@ var fallbackValues$n = {
27086
27086
  };
27087
27087
 
27088
27088
  var _excluded$y = ["showErrors", "themeValues"],
27089
- _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired", "errorFieldExtraStyles", "showFieldErrorRow", "labelTextVariant", "errorTextVariant"];
27089
+ _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"];
27090
27090
  var InputField = styled.input.withConfig({
27091
27091
  displayName: "FormInput__InputField",
27092
27092
  componentId: "sc-l094r1-0"
@@ -27149,6 +27149,8 @@ var FormattedInputField = styled(function (_ref8) {
27149
27149
  var FormInput = function FormInput(_ref15) {
27150
27150
  var _ref15$type = _ref15.type,
27151
27151
  type = _ref15$type === void 0 ? "text" : _ref15$type,
27152
+ _ref15$labelDisplayOv = _ref15.labelDisplayOverride,
27153
+ labelDisplayOverride = _ref15$labelDisplayOv === void 0 ? null : _ref15$labelDisplayOv,
27152
27154
  _ref15$labelTextWhenN = _ref15.labelTextWhenNoError,
27153
27155
  labelTextWhenNoError = _ref15$labelTextWhenN === void 0 ? "" : _ref15$labelTextWhenN,
27154
27156
  errorMessages = _ref15.errorMessages,
@@ -27212,7 +27214,7 @@ var FormInput = function FormInput(_ref15) {
27212
27214
  }, helperModal ? /*#__PURE__*/React.createElement(Cluster, {
27213
27215
  justify: "space-between",
27214
27216
  align: "center"
27215
- }, /*#__PURE__*/React.createElement(Text$1, {
27217
+ }, labelDisplayOverride ? labelDisplayOverride : /*#__PURE__*/React.createElement(Text$1, {
27216
27218
  as: "label",
27217
27219
  color: themeValues.labelColor,
27218
27220
  variant: labelTextVariant,
@@ -27225,7 +27227,7 @@ var FormInput = function FormInput(_ref15) {
27225
27227
  }, /*#__PURE__*/React.createElement(Cluster, {
27226
27228
  justify: "space-between",
27227
27229
  align: "center"
27228
- }, /*#__PURE__*/React.createElement(Text$1, {
27230
+ }, labelDisplayOverride ? labelDisplayOverride : /*#__PURE__*/React.createElement(Text$1, {
27229
27231
  as: "label",
27230
27232
  color: themeValues.labelColor,
27231
27233
  variant: labelTextVariant,
@@ -46842,8 +46844,8 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
46842
46844
  onClick = _ref.onClick,
46843
46845
  onKeyPress = _ref.onKeyPress;
46844
46846
  var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
46845
- var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
46846
- var allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
46847
+ var allowsCard = allowedPaymentInstruments === null || allowedPaymentInstruments === void 0 ? void 0 : allowedPaymentInstruments.includes(CC_METHOD);
46848
+ var allowsACH = allowedPaymentInstruments === null || allowedPaymentInstruments === void 0 ? void 0 : allowedPaymentInstruments.includes(ACH_METHOD);
46847
46849
  var methodRequired = allowsCard && !allowsACH ? "debit or credit card payment method" : !allowsCard && allowsACH ? "checking account payment method" : "payment method";
46848
46850
  return "To set up ".concat(planText, " you must have a saved ").concat(methodRequired, " and address. Do you want to save these now?");
46849
46851
  };
@@ -47351,7 +47353,8 @@ var fallbackValues$N = {
47351
47353
  var Obligation = function Obligation(_ref) {
47352
47354
  var _obligations$, _firstObligation$cust;
47353
47355
  var config = _ref.config,
47354
- obligations = _ref.obligations,
47356
+ _ref$obligations = _ref.obligations,
47357
+ obligations = _ref$obligations === void 0 ? [] : _ref$obligations,
47355
47358
  actions = _ref.actions,
47356
47359
  autoPayEnabled = _ref.autoPayEnabled,
47357
47360
  autoPayAvailable = _ref.autoPayAvailable,
@@ -47451,6 +47454,7 @@ var Obligation = function Obligation(_ref) {
47451
47454
  isLoading: true
47452
47455
  }))), !isMobile && /*#__PURE__*/React.createElement(PaymentDetailsActions, {
47453
47456
  obligations: obligations,
47457
+ obligationAssocID: obligationAssocID,
47454
47458
  autoPayEnabled: autoPayEnabled,
47455
47459
  autoPayAvailable: autoPayAvailable,
47456
47460
  handleAutopayAction: handleAutopayAction,
@@ -47471,6 +47475,7 @@ var Obligation = function Obligation(_ref) {
47471
47475
  isContentLoading: true
47472
47476
  }))), isMobile && /*#__PURE__*/React.createElement(PaymentDetailsActions, {
47473
47477
  obligations: obligations,
47478
+ obligationAssocID: obligationAssocID,
47474
47479
  autoPayEnabled: autoPayEnabled,
47475
47480
  autoPayAvailable: autoPayAvailable,
47476
47481
  handleAutopayAction: handleAutopayAction,
@@ -47674,15 +47679,40 @@ var Obligation = function Obligation(_ref) {
47674
47679
  };
47675
47680
  var Obligation$1 = themeComponent(Obligation, "Obligation", fallbackValues$N);
47676
47681
 
47682
+ var weightTitle$1 = {
47683
+ "default": "600",
47684
+ small: "400"
47685
+ };
47686
+ var detailVariant$1 = {
47687
+ "default": "large",
47688
+ small: "small"
47689
+ };
47690
+ var fallbackValues$O = {
47691
+ weightTitle: weightTitle$1,
47692
+ detailVariant: detailVariant$1
47693
+ };
47694
+
47677
47695
  var PartialAmountField = function PartialAmountField(_ref) {
47678
47696
  var lineItem = _ref.lineItem,
47679
47697
  field = _ref.field,
47680
47698
  showErrors = _ref.showErrors,
47681
47699
  errorMessages = _ref.errorMessages,
47682
47700
  moneyFormat = _ref.moneyFormat,
47683
- fieldActions = _ref.fieldActions;
47701
+ fieldActions = _ref.fieldActions,
47702
+ themeValues = _ref.themeValues;
47684
47703
  return /*#__PURE__*/React.createElement(FormInput$1, {
47685
- labelTextWhenNoError: lineItem.description,
47704
+ labelDisplayOverride: /*#__PURE__*/React.createElement(Stack, {
47705
+ childGap: "0px"
47706
+ }, /*#__PURE__*/React.createElement(Detail$1, {
47707
+ as: "h3",
47708
+ variant: themeValues.detailVariant,
47709
+ weight: themeValues.weightTitle
47710
+ }, /*#__PURE__*/React.createElement("span", null, lineItem.description)), /*#__PURE__*/React.createElement(Detail$1, {
47711
+ as: "p",
47712
+ variant: themeValues.detailVariant,
47713
+ weight: "400"
47714
+ }, lineItem.subDescription)),
47715
+ labelTextWhenNoError: "".concat(lineItem.description, " | ").concat(lineItem.subDescription),
47686
47716
  key: lineItem.id,
47687
47717
  field: field,
47688
47718
  fieldActions: fieldActions,
@@ -47705,7 +47735,7 @@ var PartialAmountField = function PartialAmountField(_ref) {
47705
47735
  function arePropsEqual(prevProps, nextProps) {
47706
47736
  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);
47707
47737
  }
47708
- var PartialAmountField$1 = /*#__PURE__*/React.memo(PartialAmountField, arePropsEqual);
47738
+ var PartialAmountField$1 = /*#__PURE__*/React.memo(themeComponent(PartialAmountField, "PartialAmountField", fallbackValues$O, "default"), arePropsEqual);
47709
47739
 
47710
47740
  var PartialAmountForm = function PartialAmountForm(_ref) {
47711
47741
  var _ref$variant = _ref.variant,
@@ -47810,7 +47840,7 @@ var numberColor = MATISSE_BLUE;
47810
47840
  var hoverBackgroundColor$2 = ALABASTER_WHITE;
47811
47841
  var activeBackgroundColor$2 = WHITE;
47812
47842
  var activeColor$9 = MATISSE_BLUE;
47813
- var fallbackValues$O = {
47843
+ var fallbackValues$P = {
47814
47844
  activeColor: activeColor$9,
47815
47845
  activeBackgroundColor: activeBackgroundColor$2,
47816
47846
  arrowColor: arrowColor,
@@ -48004,7 +48034,7 @@ var Pagination = function Pagination(_ref3) {
48004
48034
  buttonWidth: buttonWidth
48005
48035
  }));
48006
48036
  };
48007
- var Pagination$1 = themeComponent(Pagination, "Pagination", fallbackValues$O);
48037
+ var Pagination$1 = themeComponent(Pagination, "Pagination", fallbackValues$P);
48008
48038
 
48009
48039
  var PaymentButtonBar = function PaymentButtonBar(_ref) {
48010
48040
  var _ref$isForwardButtonD = _ref.isForwardButtonDisabled,
@@ -48105,7 +48135,7 @@ var labeledAmountTotal = {
48105
48135
  "default": "large",
48106
48136
  small: "small"
48107
48137
  };
48108
- var fallbackValues$P = {
48138
+ var fallbackValues$Q = {
48109
48139
  backgroundColor: backgroundColor$c,
48110
48140
  lineItem: lineItem,
48111
48141
  labeledAmountSubtotal: labeledAmountSubtotal,
@@ -48474,7 +48504,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
48474
48504
  isError: isError
48475
48505
  });
48476
48506
  };
48477
- var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$P, "default");
48507
+ var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$Q, "default");
48478
48508
 
48479
48509
  var linkColor$4 = {
48480
48510
  "default": "#3176AA"
@@ -48494,7 +48524,7 @@ var modalLinkHoverFocus = {
48494
48524
  var linkTextDecoration = {
48495
48525
  "default": LINK_TEXT_DECORATION
48496
48526
  };
48497
- var fallbackValues$Q = {
48527
+ var fallbackValues$R = {
48498
48528
  linkColor: linkColor$4,
48499
48529
  fontSize: fontSize$a,
48500
48530
  lineHeight: lineHeight$4,
@@ -48558,7 +48588,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
48558
48588
  }, link)
48559
48589
  }));
48560
48590
  };
48561
- var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$Q, "default");
48591
+ var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$R, "default");
48562
48592
 
48563
48593
  var backgroundColor$d = {
48564
48594
  "default": "#ffffff",
@@ -48593,7 +48623,7 @@ var modalLinkTextDecoration = {
48593
48623
  "default": LINK_TEXT_DECORATION,
48594
48624
  footer: "none"
48595
48625
  };
48596
- var fallbackValues$R = {
48626
+ var fallbackValues$S = {
48597
48627
  backgroundColor: backgroundColor$d,
48598
48628
  linkColor: linkColor$5,
48599
48629
  border: border$3,
@@ -48665,7 +48695,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
48665
48695
  className: "modal-trigger"
48666
48696
  }, link));
48667
48697
  };
48668
- var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$R, "default");
48698
+ var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$S, "default");
48669
48699
 
48670
48700
  var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
48671
48701
  var onCheck = _ref.onCheck,
@@ -49437,7 +49467,7 @@ var headingDisabledColor = "".concat(ATHENS_GREY);
49437
49467
  var bodyBackgroundColor$1 = "#eeeeee";
49438
49468
  var borderColor$6 = "".concat(GHOST_GREY);
49439
49469
  var focusStyles = "outline: none;";
49440
- var fallbackValues$S = {
49470
+ var fallbackValues$T = {
49441
49471
  headingBackgroundColor: headingBackgroundColor$1,
49442
49472
  headingDisabledColor: headingDisabledColor,
49443
49473
  bodyBackgroundColor: bodyBackgroundColor$1,
@@ -49740,7 +49770,7 @@ var RadioSection = function RadioSection(_ref) {
49740
49770
  });
49741
49771
  })));
49742
49772
  };
49743
- var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$S);
49773
+ var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$T);
49744
49774
 
49745
49775
  var RegistrationForm = function RegistrationForm(_ref) {
49746
49776
  var clearOnDismount = _ref.clearOnDismount,
@@ -49860,13 +49890,13 @@ RegistrationForm.mapDispatchToProps = mapDispatchToProps$9;
49860
49890
 
49861
49891
  var GRECIAN_GREY$1 = GRECIAN_GREY;
49862
49892
  var bannerBackgroundColor = GRECIAN_GREY$1;
49863
- var fallbackValues$T = {
49893
+ var fallbackValues$U = {
49864
49894
  bannerBackgroundColor: bannerBackgroundColor
49865
49895
  };
49866
49896
 
49867
49897
  var ResetConfirmationForm = function ResetConfirmationForm() {
49868
49898
  var themeContext = useContext(ThemeContext);
49869
- var themeValues = createThemeValues(themeContext, fallbackValues$T, "ResetConfirmationForm");
49899
+ var themeValues = createThemeValues(themeContext, fallbackValues$U, "ResetConfirmationForm");
49870
49900
  var isMobile = themeContext.isMobile;
49871
49901
  return /*#__PURE__*/React.createElement(Box, {
49872
49902
  padding: "0",
@@ -49981,13 +50011,13 @@ ResetPasswordForm.mapDispatchToProps = mapDispatchToProps$a;
49981
50011
 
49982
50012
  var GRECIAN_GREY$2 = GRECIAN_GREY;
49983
50013
  var bannerBackgroundColor$1 = GRECIAN_GREY$2;
49984
- var fallbackValues$U = {
50014
+ var fallbackValues$V = {
49985
50015
  bannerBackgroundColor: bannerBackgroundColor$1
49986
50016
  };
49987
50017
 
49988
50018
  var ResetPasswordSuccess = function ResetPasswordSuccess() {
49989
50019
  var themeContext = useContext(ThemeContext);
49990
- var themeValues = createThemeValues(themeContext, fallbackValues$U, "ResetPasswordSuccess");
50020
+ var themeValues = createThemeValues(themeContext, fallbackValues$V, "ResetPasswordSuccess");
49991
50021
  var isMobile = themeContext.isMobile;
49992
50022
  return /*#__PURE__*/React.createElement(Box, {
49993
50023
  padding: "0",
@@ -50036,7 +50066,7 @@ var ResetPasswordSuccess$1 = withWindowSize(ResetPasswordSuccess);
50036
50066
  var activeTabBackground = "#FFFFFF";
50037
50067
  var activeTabAccent = "#15749D";
50038
50068
  var activeTabHover = "#B8D5E1";
50039
- var fallbackValues$V = {
50069
+ var fallbackValues$W = {
50040
50070
  activeTabBackground: activeTabBackground,
50041
50071
  activeTabAccent: activeTabAccent,
50042
50072
  activeTabHover: activeTabHover
@@ -50104,12 +50134,12 @@ var Tabs = function Tabs(_ref) {
50104
50134
  }, tab.content);
50105
50135
  }))));
50106
50136
  };
50107
- var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$V);
50137
+ var Tabs$1 = themeComponent(Tabs, "NavigationTab", fallbackValues$W);
50108
50138
 
50109
50139
  var activeTabBackground$1 = "#FFFFFF";
50110
50140
  var activeTabAccent$1 = "#15749D";
50111
50141
  var activeTabHover$1 = "#B8D5E1";
50112
- var fallbackValues$W = {
50142
+ var fallbackValues$X = {
50113
50143
  activeTabBackground: activeTabBackground$1,
50114
50144
  activeTabAccent: activeTabAccent$1,
50115
50145
  activeTabHover: activeTabHover$1
@@ -50164,7 +50194,7 @@ var TabSidebar = function TabSidebar(_ref) {
50164
50194
  }, text)))));
50165
50195
  })));
50166
50196
  };
50167
- var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$W);
50197
+ var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$X);
50168
50198
 
50169
50199
  var Timeout = function Timeout(_ref) {
50170
50200
  var onLogout = _ref.onLogout;
@@ -50285,7 +50315,7 @@ var fontColor$1 = WHITE;
50285
50315
  var textAlign$1 = "left";
50286
50316
  var headerBackgroundColor$1 = BRIGHT_GREY;
50287
50317
  var imageBackgroundColor$1 = MATISSE_BLUE;
50288
- var fallbackValues$X = {
50318
+ var fallbackValues$Y = {
50289
50319
  fontWeight: fontWeight$8,
50290
50320
  fontColor: fontColor$1,
50291
50321
  textAlign: textAlign$1,
@@ -50330,7 +50360,7 @@ var WelcomeModule = function WelcomeModule(_ref) {
50330
50360
  src: welcomeImage
50331
50361
  })))));
50332
50362
  };
50333
- var WelcomeModule$1 = /*#__PURE__*/memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$X));
50363
+ var WelcomeModule$1 = /*#__PURE__*/memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$Y));
50334
50364
 
50335
50365
  var WorkflowTile = function WorkflowTile(_ref) {
50336
50366
  var _ref$workflowName = _ref.workflowName,
@@ -50390,7 +50420,7 @@ var menuItemColorDelete = RAZZMATAZZ_RED;
50390
50420
  var menuItemHoverBackgroundColor = CORNFLOWER_BLUE;
50391
50421
  var menuItemHoverBackgroundColorDelete = BLUSH_RED;
50392
50422
  var menuItemHoverColor = ROYAL_BLUE_VIVID;
50393
- var fallbackValues$Y = {
50423
+ var fallbackValues$Z = {
50394
50424
  menuItemBackgroundColor: menuItemBackgroundColor,
50395
50425
  menuItemColor: menuItemColor,
50396
50426
  menuItemColorDelete: menuItemColorDelete,
@@ -50457,13 +50487,13 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
50457
50487
  extraStyles: textExtraStyles
50458
50488
  }, text)));
50459
50489
  };
50460
- var PopupMenuItem$1 = themeComponent(PopupMenuItem, "PopupMenuItem", fallbackValues$Y);
50490
+ var PopupMenuItem$1 = themeComponent(PopupMenuItem, "PopupMenuItem", fallbackValues$Z);
50461
50491
 
50462
50492
  var hoverColor$5 = "#116285";
50463
50493
  var activeColor$a = "#0E506D";
50464
50494
  var menuTriggerColor = "#15749D";
50465
50495
  var backgroundColor$e = "white";
50466
- var fallbackValues$Z = {
50496
+ var fallbackValues$_ = {
50467
50497
  hoverColor: hoverColor$5,
50468
50498
  activeColor: activeColor$a,
50469
50499
  menuTriggerColor: menuTriggerColor,
@@ -50599,13 +50629,13 @@ var PopupMenu = function PopupMenu(_ref) {
50599
50629
  }, item));
50600
50630
  })));
50601
50631
  };
50602
- var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$Z);
50632
+ var PopupMenu$1 = themeComponent(PopupMenu, "PopupMenu", fallbackValues$_);
50603
50633
 
50604
50634
  var primaryColor$1 = WHITE;
50605
50635
  var primaryHoverColor = INFO_BLUE;
50606
50636
  var secondaryColor = MATISSE_BLUE;
50607
50637
  var secondaryHoverColor = "#115D7E";
50608
- var fallbackValues$_ = {
50638
+ var fallbackValues$$ = {
50609
50639
  primaryColor: primaryColor$1,
50610
50640
  primaryHoverColor: primaryHoverColor,
50611
50641
  secondaryColor: secondaryColor,
@@ -50732,7 +50762,8 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
50732
50762
  truncateBtnTextWidth = _ref.truncateBtnTextWidth,
50733
50763
  filterLabel = _ref.filterLabel,
50734
50764
  selectedOptions = _ref.selectedOptions,
50735
- extraStyles = _ref.extraStyles;
50765
+ extraStyles = _ref.extraStyles,
50766
+ dataAppliedOptions = _ref.dataAppliedOptions;
50736
50767
  var btnTextFilterDescription = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? "".concat(filterLabel, ": ") : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "");
50737
50768
  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") : "";
50738
50769
  return /*#__PURE__*/React.createElement(StyledFilterButton, {
@@ -50750,6 +50781,7 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
50750
50781
  dataQa: "".concat(name, "-filter-button"),
50751
50782
  extraStyles: extraStyles,
50752
50783
  "aria-label": "".concat(filterLabel, " Filter: ").concat(btnTextFilterDescription, " ").concat(btnTextItemsDescription),
50784
+ "data-applied-options": dataAppliedOptions,
50753
50785
  contentOverride: true
50754
50786
  }, btnContentOverride ? btnContentOverride : /*#__PURE__*/React.createElement(Center, {
50755
50787
  as: "span",
@@ -50934,6 +50966,19 @@ var selectOption = function selectOption(option, selectedOptions, setSelectedOpt
50934
50966
  setSelectedOptions(moreOptions);
50935
50967
  }
50936
50968
  };
50969
+ var mergeOptions = function mergeOptions(selectedOptions, activeOptions) {
50970
+ if (!activeOptions.length) return selectedOptions;
50971
+ if (!selectedOptions.length) return activeOptions;
50972
+ var mergedOptions = _toConsumableArray(selectedOptions);
50973
+ activeOptions.forEach(function (activeOption) {
50974
+ if (!mergedOptions.some(function (option) {
50975
+ return option.name === activeOption.name;
50976
+ })) {
50977
+ mergedOptions.push(activeOption);
50978
+ }
50979
+ });
50980
+ return mergedOptions;
50981
+ };
50937
50982
 
50938
50983
  var useKeyboardNavigation = function useKeyboardNavigation(_ref) {
50939
50984
  var options = _ref.options,
@@ -51134,41 +51179,75 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51134
51179
  searchable = _ref$searchable === void 0 ? true : _ref$searchable,
51135
51180
  themeValues = _ref.themeValues,
51136
51181
  _ref$truncateBtnTextW = _ref.truncateBtnTextWidth,
51137
- truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW;
51182
+ truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW,
51183
+ activeAppliedOptions = _ref.activeAppliedOptions;
51184
+ // State to manage whether the dropdown is open or closed
51138
51185
  var _useState = useState(false),
51139
51186
  _useState2 = _slicedToArray(_useState, 2),
51140
51187
  opened = _useState2[0],
51141
51188
  setOpened = _useState2[1];
51189
+
51190
+ // State to manage the currently selected options
51142
51191
  var _useState3 = useState([]),
51143
51192
  _useState4 = _slicedToArray(_useState3, 2),
51144
51193
  selectedOptions = _useState4[0],
51145
51194
  setSelectedOptions = _useState4[1];
51146
- var _useState5 = useState([]),
51195
+
51196
+ // State to manage the applied options, initialized with activeAppliedOptions or an empty array
51197
+ var _useState5 = useState(activeAppliedOptions || []),
51147
51198
  _useState6 = _slicedToArray(_useState5, 2),
51148
51199
  appliedOptions = _useState6[0],
51149
51200
  setAppliedOptions = _useState6[1];
51201
+
51202
+ // State to track whether the user has interacted with the component
51203
+ var _useState7 = useState(false),
51204
+ _useState8 = _slicedToArray(_useState7, 2),
51205
+ hasInteracted = _useState8[0],
51206
+ setHasInteracted = _useState8[1];
51207
+
51208
+ // Reference to keep track of the opened state across renders without causing re-renders
51150
51209
  var openedRef = useRef(opened);
51151
- var handleOnClose = function handleOnClose() {
51152
- if (openedRef.current) {
51153
- setOpened(false);
51154
- actions.fields.searchTerm.set("");
51155
- }
51156
- };
51210
+
51211
+ // Hook to detect clicks outside the component and close the dropdown
51157
51212
  var containerRef = useOutsideClickHook(function () {
51158
51213
  return handleOnClose();
51159
51214
  });
51215
+
51216
+ // References to various elements within the component
51160
51217
  var dropdownRef = useRef(null);
51161
51218
  var filterButtonRef = useRef(null);
51162
51219
  var applyFilterButtonRef = useRef(null);
51220
+
51221
+ // IDs for accessibility and identification purposes
51163
51222
  var filterDropdownID = "".concat(name, "-filter-dropdown");
51164
51223
  var listGroupID = "".concat(name, "-list-group");
51224
+ var handleOnClose = function handleOnClose() {
51225
+ if (openedRef.current) {
51226
+ setOpened(false);
51227
+ actions.fields.searchTerm.set("");
51228
+ }
51229
+ };
51165
51230
  useEffect$1(function () {
51166
51231
  openedRef.current = opened;
51167
51232
  if (!opened) {
51168
- onApply(selectedOptions);
51169
- setAppliedOptions(selectedOptions);
51233
+ if (hasInteracted) {
51234
+ onApply(selectedOptions);
51235
+ setAppliedOptions(selectedOptions);
51236
+ }
51237
+ } else {
51238
+ setHasInteracted(true);
51170
51239
  }
51171
51240
  }, [opened]);
51241
+ useEffect$1(function () {
51242
+ // Update the applied options state with the current active applied options,
51243
+ // or an empty array if activeAppliedOptions is undefined or null.
51244
+ // This ensures that the current applied options are in sync with the parent component.
51245
+ setAppliedOptions(activeAppliedOptions || []);
51246
+
51247
+ // Merge the selected options with the active applied options.
51248
+ var mergedSelections = mergeOptions(selectedOptions, activeAppliedOptions);
51249
+ setSelectedOptions(mergedSelections);
51250
+ }, [activeAppliedOptions]);
51172
51251
  useEffect$1(function () {
51173
51252
  var handleKeyDown = function handleKeyDown(event) {
51174
51253
  if (event.key === "Escape") {
@@ -51210,7 +51289,8 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51210
51289
  truncateBtnTextWidth: truncateBtnTextWidth,
51211
51290
  filterLabel: filterLabel,
51212
51291
  selectedOptions: selectedOptions,
51213
- extraStyles: btnExtraStyles
51292
+ extraStyles: btnExtraStyles,
51293
+ dataAppliedOptions: appliedOptions === null || appliedOptions === void 0 ? void 0 : appliedOptions.length
51214
51294
  }), /*#__PURE__*/React.createElement(FilterDropdown, {
51215
51295
  id: filterDropdownID,
51216
51296
  ref: dropdownRef,
@@ -51257,10 +51337,10 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
51257
51337
  ariaLabel: "Apply all filters"
51258
51338
  }))));
51259
51339
  };
51260
- var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$_);
51340
+ var MultipleSelectFilter$1 = themeComponent(MultipleSelectFilter, "MultipleSelectFilter", fallbackValues$$);
51261
51341
 
51262
51342
  var pageBackground = "#FBFCFD";
51263
- var fallbackValues$$ = {
51343
+ var fallbackValues$10 = {
51264
51344
  pageBackground: pageBackground
51265
51345
  };
51266
51346
 
@@ -51308,7 +51388,7 @@ var CenterSingle = function CenterSingle(_ref) {
51308
51388
  padding: "0"
51309
51389
  })));
51310
51390
  };
51311
- var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$$));
51391
+ var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$10));
51312
51392
 
51313
51393
  var CenterStack = function CenterStack(_ref) {
51314
51394
  var header = _ref.header,
@@ -51351,7 +51431,7 @@ var CenterStack = function CenterStack(_ref) {
51351
51431
  padding: "0"
51352
51432
  })));
51353
51433
  };
51354
- var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$$));
51434
+ var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$10));
51355
51435
 
51356
51436
  var CenterSingle$2 = function CenterSingle(_ref) {
51357
51437
  var header = _ref.header,
@@ -51397,7 +51477,7 @@ var CenterSingle$2 = function CenterSingle(_ref) {
51397
51477
  padding: "0"
51398
51478
  })));
51399
51479
  };
51400
- var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$$));
51480
+ var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$10));
51401
51481
 
51402
51482
  var SidebarSingleContent = function SidebarSingleContent(_ref) {
51403
51483
  var header = _ref.header,
@@ -51450,7 +51530,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
51450
51530
  padding: "0"
51451
51531
  })));
51452
51532
  };
51453
- var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$$));
51533
+ var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$10));
51454
51534
 
51455
51535
  var SidebarStackContent = function SidebarStackContent(_ref) {
51456
51536
  var header = _ref.header,
@@ -51520,7 +51600,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
51520
51600
  key: "footer-box"
51521
51601
  })));
51522
51602
  };
51523
- var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$$));
51603
+ var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$10));
51524
51604
 
51525
51605
  var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
51526
51606
  var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};