smartcomply-web-sdk 1.0.76 → 1.0.77

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.
@@ -137,6 +137,15 @@ export declare class SmartComplyFlow {
137
137
  /** Click handler that fires once and disables the button, preventing a double-tap double-dispatch. */
138
138
  private _onceClick;
139
139
  private isDocumentFlow;
140
+ /**
141
+ * True when the SDK Config is set to skip data/document verification
142
+ * entirely and only run the liveness/selfie check — no country picker,
143
+ * no ID-type picker, no ID-number entry or document capture. Unlike
144
+ * isDocumentFlow(), there's no channel-shape fallback to infer this from:
145
+ * a liveness-only config carries no channels at all, so the only signal
146
+ * is verification_type itself.
147
+ */
148
+ private isLivenessOnlyFlow;
140
149
  /**
141
150
  * The "go back one step" target for a given step, if that step is
142
151
  * navigable — shared by the header back button and the browser
@@ -1 +1 @@
1
- {"version":3,"file":"SmartComplyFlow.d.ts","sourceRoot":"","sources":["../../../src/flow/SmartComplyFlow.ts"],"names":[],"mappings":"AACA,OAAO,EAA6B,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIxF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAwC/C,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,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qBAAqB;IAuI7B,OAAO,CAAC,aAAa;IA8GrB,OAAO,CAAC,sBAAsB;IAyB9B,OAAO,CAAC,qBAAqB;IA0C7B;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,UAAU;IA+ClB,OAAO,CAAC,wBAAwB;IAqBhC,OAAO,CAAC,cAAc;IAUtB;;OAEG;YACW,4BAA4B;IAiB1C;;OAEG;YACW,mBAAmB;IA+GjC,OAAO,CAAC,6BAA6B;IA8DrC,OAAO,CAAC,cAAc;IA0GtB,OAAO,CAAC,aAAa;IAsGrB,OAAO,CAAC,YAAY;IAmGpB,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,gBAAgB;IAmDxB,OAAO,CAAC,mBAAmB;IAsB3B,OAAO,CAAC,qBAAqB;IAmB7B,sGAAsG;IACtG,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,cAAc;IAgBtB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAkBtB,OAAO,CAAC,cAAc;IAmFtB,OAAO,CAAC,UAAU;IAUlB,OAAO,CAAC,YAAY;CAiCrB"}
@@ -767,7 +767,8 @@ export class SmartComplyFlow {
767
767
  // ── Welcome ────────────────────────────────────────────────────
768
768
  renderWelcome(container) {
769
769
  container.style.cssText += "display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;";
770
- const isDocFlow = this.isDocumentFlow();
770
+ const isLivenessOnly = this.isLivenessOnlyFlow();
771
+ const isDocFlow = isLivenessOnly ? false : this.isDocumentFlow();
771
772
  // Icon + badge row (side by side to save vertical space)
772
773
  const topRow = document.createElement("div");
773
774
  topRow.style.cssText = "display:flex;flex-direction:column;align-items:center;gap:8px;";
@@ -790,7 +791,9 @@ export class SmartComplyFlow {
790
791
  color:${this.theme.primary};
791
792
  border:1px solid ${this.theme.primary}30;
792
793
  `;
793
- badge.textContent = isDocFlow ? "📄 Document Verification" : "🔍 Data Verification";
794
+ badge.textContent = isLivenessOnly
795
+ ? "🤳 Liveness Check"
796
+ : isDocFlow ? "📄 Document Verification" : "🔍 Data Verification";
794
797
  topRow.appendChild(badge);
795
798
  container.appendChild(topRow);
796
799
  // Title + subtitle (compact)
@@ -812,23 +815,29 @@ export class SmartComplyFlow {
812
815
  color:${this.theme.textSecondary};font-size:13px;line-height:1.5;
813
816
  margin:0 auto;max-width:300px;text-align:center;
814
817
  `;
815
- desc.textContent = isDocFlow
816
- ? "You'll need your document and camera access. This takes about 2 minutes."
817
- : "You'll need your ID number and camera access. This takes about 2 minutes.";
818
+ desc.textContent = isLivenessOnly
819
+ ? "You'll just need camera access. This takes about 30 seconds."
820
+ : isDocFlow
821
+ ? "You'll need your document and camera access. This takes about 2 minutes."
822
+ : "You'll need your ID number and camera access. This takes about 2 minutes.";
818
823
  titleWrap.appendChild(desc);
819
824
  container.appendChild(titleWrap);
820
825
  // Steps preview — compact rows
821
- const steps = isDocFlow
826
+ const steps = isLivenessOnly
822
827
  ? [
823
- { icon: "🪪", text: "Choose your document type", sub: "Passport, National ID, Driver License" },
824
- { icon: "📷", text: "Scan your document", sub: "Upload or capture a photo of your ID" },
825
828
  { icon: "🤳", text: "Face check", sub: "Quick selfie to confirm it's you" },
826
829
  ]
827
- : [
828
- { icon: "🆔", text: "Choose your ID type", sub: "NIN, BVN, Voter's Card and more" },
829
- { icon: "📝", text: "Enter your ID details", sub: "Exactly as shown on your ID" },
830
- { icon: "🤳", text: "Face check", sub: "Quick selfie to confirm it's you" },
831
- ];
830
+ : isDocFlow
831
+ ? [
832
+ { icon: "🪪", text: "Choose your document type", sub: "Passport, National ID, Driver License" },
833
+ { icon: "📷", text: "Scan your document", sub: "Upload or capture a photo of your ID" },
834
+ { icon: "🤳", text: "Face check", sub: "Quick selfie to confirm it's you" },
835
+ ]
836
+ : [
837
+ { icon: "🆔", text: "Choose your ID type", sub: "NIN, BVN, Voter's Card and more" },
838
+ { icon: "📝", text: "Enter your ID details", sub: "Exactly as shown on your ID" },
839
+ { icon: "🤳", text: "Face check", sub: "Quick selfie to confirm it's you" },
840
+ ];
832
841
  const stepsWrap = document.createElement("div");
833
842
  stepsWrap.style.cssText = `
834
843
  width:100%;display:flex;flex-direction:column;gap:0;
@@ -870,7 +879,27 @@ export class SmartComplyFlow {
870
879
  // CTA
871
880
  const btn = this.createPrimaryButton("Get Started →");
872
881
  btn.style.cssText += "margin-top:2px;";
873
- btn.addEventListener("click", () => this.showStep("country"));
882
+ btn.addEventListener("click", () => {
883
+ if (isLivenessOnly) {
884
+ // Liveness-only has no channels at all, so renderCountrySelect's
885
+ // single-country auto-skip (countries.length === 1) never fires for
886
+ // it — going through "country" here would render an empty,
887
+ // dead-end country-picker screen. Go straight to liveness instead.
888
+ //
889
+ // selectedCountry defaults to "" and is otherwise only ever set by
890
+ // renderCountrySelect, which this mode never visits — renderLiveness
891
+ // sends it as a required, non-blank `country` field, so leaving it
892
+ // empty would fail create() validation before the scan even starts.
893
+ // There's no real country to report here (no identity lookup runs
894
+ // in this mode), so this is a neutral placeholder, not a claim
895
+ // about the user's actual location.
896
+ this.selectedCountry = this.selectedCountry || "global";
897
+ this.showStep("liveness");
898
+ }
899
+ else {
900
+ this.showStep("country");
901
+ }
902
+ });
874
903
  container.appendChild(btn);
875
904
  // Plain-language line on what the camera/photo is for and what happens
876
905
  // to it — shown before the "Get Started" tap that leads to the first
@@ -2414,6 +2443,21 @@ export class SmartComplyFlow {
2414
2443
  .flatMap((ch) => ch.fields || []);
2415
2444
  return allFields.some((f) => isUploadFieldType(f.type));
2416
2445
  }
2446
+ /**
2447
+ * True when the SDK Config is set to skip data/document verification
2448
+ * entirely and only run the liveness/selfie check — no country picker,
2449
+ * no ID-type picker, no ID-number entry or document capture. Unlike
2450
+ * isDocumentFlow(), there's no channel-shape fallback to infer this from:
2451
+ * a liveness-only config carries no channels at all, so the only signal
2452
+ * is verification_type itself.
2453
+ */
2454
+ isLivenessOnlyFlow() {
2455
+ const vType = this.sdkConfig?.verification_type;
2456
+ if (!vType)
2457
+ return false;
2458
+ const types = Array.isArray(vType) ? vType : [vType];
2459
+ return types.includes("liveness_only");
2460
+ }
2417
2461
  /**
2418
2462
  * The "go back one step" target for a given step, if that step is
2419
2463
  * navigable — shared by the header back button and the browser
@@ -2430,16 +2474,28 @@ export class SmartComplyFlow {
2430
2474
  document_capture: () => { this.docCapture?.destroy(); this.showStep("id_type"); },
2431
2475
  document_confirm: () => { this.docCapture?.destroy(); this.showStep("document_capture"); },
2432
2476
  };
2477
+ // liveness-only skips straight from welcome to liveness with nothing in
2478
+ // between — deliberately no backTargets["liveness"] entry added here,
2479
+ // so the back button stays hidden on that step in this mode, same as
2480
+ // it already is for every other mode (liveness has no back target for
2481
+ // document/data flows either — nothing to go back to except closing).
2433
2482
  return backTargets[step];
2434
2483
  }
2435
2484
  updateProgress() {
2436
- const isDocFlow = this.isDocumentFlow();
2485
+ const isLivenessOnly = this.isLivenessOnlyFlow();
2486
+ const isDocFlow = isLivenessOnly ? false : this.isDocumentFlow();
2437
2487
  const countries = Object.keys(this.sdkConfig?.channels || {});
2438
2488
  const singleCountry = countries.length <= 1;
2439
- // Two-stage action steps — Stage 1: validate identity, Stage 2: liveness
2440
- const stage1Steps = isDocFlow
2441
- ? ["country", "id_type", "document_capture", "ocr_gate", "document_confirm"].filter(s => !(s === "country" && singleCountry))
2442
- : ["country", "id_type", "id_input", "confirm_identity"].filter(s => !(s === "country" && singleCountry));
2489
+ // Two-stage action steps — Stage 1: validate identity, Stage 2: liveness.
2490
+ // Liveness-only has no Stage 1 at all — welcome goes straight to
2491
+ // liveness so stage1Steps stays empty and the progress bar reflects
2492
+ // a genuinely single-stage flow instead of implying a step that never
2493
+ // happens in this mode.
2494
+ const stage1Steps = isLivenessOnly
2495
+ ? []
2496
+ : isDocFlow
2497
+ ? ["country", "id_type", "document_capture", "ocr_gate", "document_confirm"].filter(s => !(s === "country" && singleCountry))
2498
+ : ["country", "id_type", "id_input", "confirm_identity"].filter(s => !(s === "country" && singleCountry));
2443
2499
  const stage2Steps = ["liveness"];
2444
2500
  const allActionSteps = [...stage1Steps, ...stage2Steps];
2445
2501
  const totalSteps = allActionSteps.length;
@@ -2451,6 +2507,8 @@ export class SmartComplyFlow {
2451
2507
  this.progressBar.style.width = `${pct}%`;
2452
2508
  }
2453
2509
  // Stage label: "Stage 1 of 2: Verify Identity" / "Stage 2 of 2: Face Check"
2510
+ // — liveness-only has no Stage 1, so it just says "Face Check" with no
2511
+ // "of 2" framing, since there's only ever the one stage in this mode.
2454
2512
  if (this.stepLabel) {
2455
2513
  if (this.currentStep === "loading" || this.currentStep === "welcome") {
2456
2514
  this.stepLabel.textContent = "";
@@ -2459,7 +2517,7 @@ export class SmartComplyFlow {
2459
2517
  this.stepLabel.textContent = "Complete ✓";
2460
2518
  }
2461
2519
  else if (stage2Steps.includes(this.currentStep)) {
2462
- this.stepLabel.textContent = "Stage 2 of 2: Face Check";
2520
+ this.stepLabel.textContent = isLivenessOnly ? "Face Check" : "Stage 2 of 2: Face Check";
2463
2521
  }
2464
2522
  else if (stage1Steps.includes(this.currentStep)) {
2465
2523
  this.stepLabel.textContent = isDocFlow ? "Stage 1 of 2: Scan Document" : "Stage 1 of 2: Verify Identity";