@vpdev2/metakyc-sdk 1.0.107 → 1.0.108

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.js CHANGED
@@ -1420,83 +1420,30 @@ function We(e, t) {
1420
1420
  }
1421
1421
  function Dr() {
1422
1422
  const e = We("--metakyc-primary", "#2563eb"), t = We("--metakyc-primary-hover", "#1d4ed8"), n = We("--metakyc-background", "#ffffff"), a = We("--metakyc-surface", "#f9fafb"), i = We("--metakyc-text-primary", "#111827"), o = We("--metakyc-text-secondary", "#6b7280"), c = We("--metakyc-text-muted", "#9ca3af"), d = We("--metakyc-border", "#e5e7eb");
1423
- return [
1424
- `body, html { font-family: ${We(
1425
- "--metakyc-font-family",
1426
- "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
1427
- )} !important; background-color: ${n} !important; }`,
1428
- `p, span, label, div { color: ${i}; }`,
1429
- `h1, h2, h3, h4 { color: ${i}; }`,
1430
- `.step-desc { color: ${o}; }`,
1431
- "section.content {",
1432
- ` background-color: ${a};`,
1433
- ` color: ${i};`,
1434
- " padding: 32px 32px 16px;",
1435
- " box-shadow: none;",
1436
- " border-radius: 10px;",
1437
- ` border: 1px solid ${d};`,
1438
- "}",
1439
- "input {",
1440
- ` color: ${i};`,
1441
- " font-weight: 500;",
1442
- " outline: none;",
1443
- ` background-color: ${n};`,
1444
- ` border: 1px solid ${d};`,
1445
- " border-radius: 6px;",
1446
- "}",
1447
- "input:focus {",
1448
- ` border-color: ${e};`,
1449
- ` box-shadow: 0 0 0 2px ${e}33;`,
1450
- "}",
1451
- "button.submit, button.back {",
1452
- " border-radius: 8px;",
1453
- " height: 44px;",
1454
- " padding: 0 24px;",
1455
- " font-size: 14px;",
1456
- " font-weight: 600;",
1457
- " background-image: none !important;",
1458
- " transform: none !important;",
1459
- " box-shadow: none !important;",
1460
- " transition: all 0.15s ease;",
1461
- " cursor: pointer;",
1462
- "}",
1463
- "button.submit {",
1464
- " min-width: 120px;",
1465
- " background: none;",
1466
- ` background-color: ${e};`,
1467
- " color: #ffffff;",
1468
- " border: none;",
1469
- "}",
1470
- "button.submit:hover {",
1471
- ` background-color: ${t};`,
1472
- "}",
1473
- "button.back {",
1474
- " background: none;",
1475
- ` background-color: ${n};`,
1476
- ` border: 1px solid ${d};`,
1477
- ` color: ${i};`,
1478
- "}",
1479
- "button.back:hover {",
1480
- ` background-color: ${a};`,
1481
- "}",
1482
- ".round-icon {",
1483
- ` background-color: ${e} !important;`,
1484
- " background-image: none !important;",
1485
- "}",
1486
- ".upload-item, .document-status {",
1487
- ` border-color: ${d} !important;`,
1488
- "}",
1489
- "select {",
1490
- ` background-color: ${n};`,
1491
- ` color: ${i};`,
1492
- ` border: 1px solid ${d};`,
1493
- " border-radius: 6px;",
1494
- "}",
1495
- `.description { color: ${o}; }`,
1496
- `.subtitle { color: ${c}; }`,
1497
- `a { color: ${e}; }`,
1498
- `a:hover { color: ${t}; }`
1499
- ].join(" ");
1423
+ return `
1424
+ body, html { font-family: ${We(
1425
+ "--metakyc-font-family",
1426
+ "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
1427
+ )} !important; background-color: ${n} !important; }
1428
+ p, span, label, div { color: ${i}; }
1429
+ h1, h2, h3, h4 { color: ${i}; }
1430
+ .step-desc { color: ${o}; }
1431
+ section.content { background-color: ${a}; color: ${i}; padding: 32px 32px 16px; box-shadow: none; border-radius: 10px; border: 1px solid ${d}; }
1432
+ input { color: ${i}; font-weight: 500; outline: none; background-color: ${n}; border: 1px solid ${d}; border-radius: 6px; }
1433
+ input:focus { border-color: ${e}; box-shadow: 0 0 0 2px ${e}33; }
1434
+ button.submit, button.back { border-radius: 8px; height: 44px; padding: 0 24px; font-size: 14px; font-weight: 600; background-image: none !important; transform: none !important; box-shadow: none !important; transition: all 0.15s ease; cursor: pointer; }
1435
+ button.submit { min-width: 120px; background: none; background-color: ${e}; color: #ffffff; border: none; }
1436
+ button.submit:hover { background-color: ${t}; }
1437
+ button.back { background: none; background-color: ${n}; border: 1px solid ${d}; color: ${i}; }
1438
+ button.back:hover { background-color: ${a}; }
1439
+ .round-icon { background-color: ${e} !important; background-image: none !important; }
1440
+ .upload-item, .document-status { border-color: ${d} !important; }
1441
+ select { background-color: ${n}; color: ${i}; border: 1px solid ${d}; border-radius: 6px; }
1442
+ .description { color: ${o}; }
1443
+ .subtitle { color: ${c}; }
1444
+ a { color: ${e}; }
1445
+ a:hover { color: ${t}; }
1446
+ `.trim();
1500
1447
  }
1501
1448
  class Mr {
1502
1449
  constructor(t) {
@@ -1512,18 +1459,17 @@ class Mr {
1512
1459
  }
1513
1460
  async initialize(t) {
1514
1461
  await this.loadSDK();
1515
- const n = {};
1516
- this.config.customCss && (n.customCss = this.config.customCss), n.customCssStr = Dr();
1462
+ const n = {
1463
+ lang: this.config.lang || "en"
1464
+ };
1465
+ if (this.config.applicantEmail && (n.email = this.config.applicantEmail), this.config.applicantPhone && (n.phone = this.config.applicantPhone), this.config.theme && (n.theme = this.config.theme), this.config.customizationName && (n.customizationName = this.config.customizationName), !this.config.customizationName) {
1466
+ const i = {};
1467
+ this.config.customCss && (i.customCss = this.config.customCss), this.config.customCssStr && (i.customCssStr = this.config.customCssStr), i.customCssStr || (i.customCssStr = Dr()), n.uiConf = i;
1468
+ }
1517
1469
  const a = window.snsWebSdk.init(
1518
1470
  this.config.accessToken,
1519
1471
  () => this.config.onTokenRefresh()
1520
- ).withConf({
1521
- lang: this.config.lang || "en",
1522
- ...this.config.applicantEmail ? { email: this.config.applicantEmail } : {},
1523
- ...this.config.applicantPhone ? { phone: this.config.applicantPhone } : {},
1524
- ...this.config.theme ? { theme: this.config.theme } : {},
1525
- uiConf: n
1526
- }).withOptions({
1472
+ ).withConf(n).withOptions({
1527
1473
  addViewportTag: !1,
1528
1474
  adaptIframeHeight: this.config.adaptIframeHeight !== !1
1529
1475
  }).on("idCheck.onStepCompleted", (i) => {
@@ -1797,6 +1743,7 @@ class Ge {
1797
1743
  externalUserId: n.externalUserId,
1798
1744
  lang: c.lang || n.lang || "en",
1799
1745
  theme: c.theme,
1746
+ customizationName: c.customizationName,
1800
1747
  customCss: c.customCss,
1801
1748
  adaptIframeHeight: c.adaptIframeHeight
1802
1749
  };