@stigg/react-sdk 4.4.0-beta.2 → 4.4.0-beta.3

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.
@@ -6920,7 +6920,9 @@ function useGoNext() {
6920
6920
 
6921
6921
  function useProgressBarModel() {
6922
6922
  var progressBarState = useProgressBarState();
6923
+ var currentStep = progressBarState.steps[progressBarState.activeStep];
6923
6924
  return {
6925
+ currentStep: currentStep,
6924
6926
  progressBarState: progressBarState,
6925
6927
  isLastStep: progressBarState.activeStep === progressBarState.steps.length - 1,
6926
6928
  isCheckoutComplete: isCheckoutComplete(progressBarState),
@@ -12929,20 +12931,20 @@ var CheckoutPlanStep = function CheckoutPlanStep() {
12929
12931
  }));
12930
12932
  };
12931
12933
 
12932
- var getStepProps = function getStepProps(step) {
12933
- switch (step) {
12934
- case 0:
12934
+ var getStepProps = function getStepProps(currentStep) {
12935
+ switch (currentStep.key) {
12936
+ case CheckoutStepKey.PLAN:
12935
12937
  return {
12936
12938
  allowChangePlan: true,
12937
12939
  content: React__default.createElement(CheckoutPlanStep, null)
12938
12940
  };
12939
12941
 
12940
- case 1:
12942
+ case CheckoutStepKey.ADDONS:
12941
12943
  return {
12942
12944
  content: React__default.createElement(CheckoutAddonsStep, null)
12943
12945
  };
12944
12946
 
12945
- case 2:
12947
+ case CheckoutStepKey.PAYMENT:
12946
12948
  return {
12947
12949
  content: React__default.createElement(PaymentStep, null)
12948
12950
  };
@@ -12969,15 +12971,14 @@ function CheckoutContainer(_ref) {
12969
12971
  widgetState = _useCheckoutContext$.widgetState;
12970
12972
 
12971
12973
  var _useProgressBarModel = useProgressBarModel(),
12972
- progressBarState = _useProgressBarModel.progressBarState;
12974
+ currentStep = _useProgressBarModel.currentStep;
12973
12975
 
12974
- var activeStep = progressBarState.activeStep;
12975
12976
  var isLoadingCheckoutData = widgetState.isLoadingCheckoutData; // uncomment for fun!
12976
12977
  // if (activeStep > 2) {
12977
12978
  // return <SurpriseStep />;
12978
12979
  // }
12979
12980
 
12980
- var _getStepProps = getStepProps(activeStep),
12981
+ var _getStepProps = getStepProps(currentStep),
12981
12982
  content = _getStepProps.content,
12982
12983
  allowChangePlan = _getStepProps.allowChangePlan;
12983
12984