@codebards/ik-embeddable-form 0.0.2726025383-qa → 0.0.2726880419-qa

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/embed.js CHANGED
@@ -1365,9 +1365,7 @@ var IKEmbeddableFormBundle = function(exports) {
1365
1365
  return null;
1366
1366
  }
1367
1367
  function isIndiaEmbedConfig(openConfig) {
1368
- const site = String(openConfig.site ?? "").trim().toLowerCase();
1369
- if (site === "in" || site === "india") return true;
1370
- return String(openConfig.variant ?? "").trim().toLowerCase().startsWith("india");
1368
+ return String(openConfig.site ?? "").trim().toLowerCase() === "india";
1371
1369
  }
1372
1370
  function geoBusinessCountry(countryName, countryCode) {
1373
1371
  if ((countryName == null ? void 0 : countryName.trim()) === "India") return "IN";
@@ -15624,6 +15622,7 @@ var IKEmbeddableFormBundle = function(exports) {
15624
15622
  {
15625
15623
  groups: progressGroups,
15626
15624
  activeGroupIndex,
15625
+ currentStepId,
15627
15626
  panelId
15628
15627
  }
15629
15628
  )
@@ -15763,6 +15762,7 @@ var IKEmbeddableFormBundle = function(exports) {
15763
15762
  function VerticalProgressTracker({
15764
15763
  groups,
15765
15764
  activeGroupIndex,
15765
+ currentStepId,
15766
15766
  panelId
15767
15767
  }) {
15768
15768
  return /* @__PURE__ */ u$1(
@@ -15772,11 +15772,15 @@ var IKEmbeddableFormBundle = function(exports) {
15772
15772
  "data-testid": leftPanelTestId(panelId, "progress-tracker"),
15773
15773
  "aria-label": "Registration progress groups",
15774
15774
  children: groups.map((group, idx) => {
15775
+ var _a;
15775
15776
  const isActive = idx === activeGroupIndex;
15776
- const isComplete = idx < activeGroupIndex;
15777
- const isUpcoming = !isActive && !isComplete;
15777
+ const isPassed = idx < activeGroupIndex;
15778
+ const isPending = isPassed && !!((_a = group.pendingOnStepIds) == null ? void 0 : _a.includes(currentStepId));
15779
+ const isComplete = isPassed && !isPending;
15780
+ const isUpcoming = !isActive && !isComplete && !isPending;
15778
15781
  const isLast = idx === groups.length - 1;
15779
- const isHighlighted = isActive || isComplete;
15782
+ const isHighlighted = isActive || isComplete || isPending;
15783
+ const isInProgress = isActive || isPending;
15780
15784
  return /* @__PURE__ */ u$1(
15781
15785
  "li",
15782
15786
  {
@@ -15802,9 +15806,9 @@ var IKEmbeddableFormBundle = function(exports) {
15802
15806
  class: [
15803
15807
  "relative flex shrink-0 items-center justify-center overflow-hidden rounded-[30px]",
15804
15808
  isHighlighted ? "size-10" : "size-8",
15805
- isActive ? "shadow-[0px_4px_12px_0px_rgba(3,131,248,0.37)]" : ""
15809
+ isInProgress ? "shadow-[0px_4px_12px_0px_rgba(3,131,248,0.37)]" : ""
15806
15810
  ].join(" "),
15807
- style: isComplete ? { backgroundImage: COMPLETED_STEP_GRADIENT } : isActive ? { backgroundImage: ACTIVE_STEP_GRADIENT } : void 0,
15811
+ style: isComplete ? { backgroundImage: COMPLETED_STEP_GRADIENT } : isInProgress ? { backgroundImage: ACTIVE_STEP_GRADIENT } : void 0,
15808
15812
  role: "presentation",
15809
15813
  children: [
15810
15814
  isUpcoming && /* @__PURE__ */ u$1(
@@ -15829,7 +15833,7 @@ var IKEmbeddableFormBundle = function(exports) {
15829
15833
  "data-testid": leftPanelTestId(panelId, `progress-group-${group.number}-number`),
15830
15834
  class: [
15831
15835
  "relative text-center font-semibold leading-[1.48]",
15832
- isActive ? "text-[16px] text-white" : "text-[14px] text-[#667085]"
15836
+ isInProgress ? "text-[16px] text-white" : "text-[14px] text-[#667085]"
15833
15837
  ].join(" "),
15834
15838
  children: group.number
15835
15839
  }
@@ -15861,7 +15865,7 @@ var IKEmbeddableFormBundle = function(exports) {
15861
15865
  "data-testid": leftPanelTestId(panelId, `progress-group-${group.number}-title`),
15862
15866
  class: [
15863
15867
  "font-semibold leading-[1.48]",
15864
- isComplete ? "text-[14px] text-[#027a48]" : isActive ? "text-[14px] text-[#0a3483]" : "text-[12px] text-[#98a2b3]"
15868
+ isComplete ? "text-[14px] text-[#027a48]" : isInProgress ? "text-[14px] text-[#0a3483]" : "text-[12px] text-[#98a2b3]"
15865
15869
  ].join(" "),
15866
15870
  children: group.title
15867
15871
  }
@@ -20814,7 +20818,10 @@ var IKEmbeddableFormBundle = function(exports) {
20814
20818
  {
20815
20819
  number: 1,
20816
20820
  title: "Webinar Registration",
20817
- stepIds: ["contact-details", "slot-selection"]
20821
+ stepIds: ["contact-details", "slot-selection"],
20822
+ // India skips goals-details, so this group stays blue through
20823
+ // profile-details and only completes on the expert-insights step.
20824
+ pendingOnStepIds: ["profile-details"]
20818
20825
  },
20819
20826
  {
20820
20827
  number: 2,