@salla.sa/twilight-components 2.11.103 → 2.11.105

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.
Files changed (36) hide show
  1. package/dist/cjs/salla-add-product-button_40.cjs.entry.js +17 -0
  2. package/dist/cjs/salla-add-product-button_40.cjs.entry.js.map +1 -1
  3. package/dist/cjs/salla-products-list.cjs.entry.js +4 -3
  4. package/dist/cjs/salla-products-list.cjs.entry.js.map +1 -1
  5. package/dist/collection/components/salla-products-list/salla-products-list.js +4 -3
  6. package/dist/collection/components/salla-products-list/salla-products-list.js.map +1 -1
  7. package/dist/collection/components/salla-verify/salla-verify.js +17 -0
  8. package/dist/collection/components/salla-verify/salla-verify.js.map +1 -1
  9. package/dist/components/salla-products-list.js +4 -3
  10. package/dist/components/salla-products-list.js.map +1 -1
  11. package/dist/components/salla-verify2.js +17 -0
  12. package/dist/components/salla-verify2.js.map +1 -1
  13. package/dist/esm/salla-add-product-button_40.entry.js +17 -0
  14. package/dist/esm/salla-add-product-button_40.entry.js.map +1 -1
  15. package/dist/esm/salla-products-list.entry.js +4 -3
  16. package/dist/esm/salla-products-list.entry.js.map +1 -1
  17. package/dist/esm-es5/salla-add-product-button_40.entry.js +1 -1
  18. package/dist/esm-es5/salla-add-product-button_40.entry.js.map +1 -1
  19. package/dist/esm-es5/salla-products-list.entry.js +1 -1
  20. package/dist/esm-es5/salla-products-list.entry.js.map +1 -1
  21. package/dist/twilight/{p-3f6bca30.entry.js → p-13b40fc0.entry.js} +2 -2
  22. package/dist/twilight/p-13b40fc0.entry.js.map +1 -0
  23. package/dist/twilight/{p-19011186.system.entry.js → p-25536895.system.entry.js} +2 -2
  24. package/dist/twilight/p-25536895.system.entry.js.map +1 -0
  25. package/dist/twilight/p-63ddf0e9.system.js +1 -1
  26. package/dist/twilight/{p-91b4ebaf.system.entry.js → p-6aa3dcd4.system.entry.js} +2 -2
  27. package/dist/twilight/p-6aa3dcd4.system.entry.js.map +1 -0
  28. package/dist/twilight/{p-2f77c894.entry.js → p-774dcb10.entry.js} +2 -2
  29. package/dist/twilight/p-774dcb10.entry.js.map +1 -0
  30. package/dist/twilight/twilight.esm.js +1 -1
  31. package/dist/types/components/salla-verify/salla-verify.d.ts +1 -0
  32. package/package.json +2 -2
  33. package/dist/twilight/p-19011186.system.entry.js.map +0 -1
  34. package/dist/twilight/p-2f77c894.entry.js.map +0 -1
  35. package/dist/twilight/p-3f6bca30.entry.js.map +0 -1
  36. package/dist/twilight/p-91b4ebaf.system.entry.js.map +0 -1
@@ -29456,6 +29456,7 @@ const SallaVerify = class {
29456
29456
  this.resendAfter = 0;
29457
29457
  this.timer.innerHTML = '30 : 00';
29458
29458
  });
29459
+ this.otpHandler();
29459
29460
  }
29460
29461
  handleKeyUp(ev) {
29461
29462
  var _a, _b, _c, _d;
@@ -29571,6 +29572,22 @@ const SallaVerify = class {
29571
29572
  return this.display == 'inline' ? index.h(index.Host, null, this.myBody()) :
29572
29573
  index.h("salla-modal", { width: "xs", class: "s-verify", ref: modal => this.modal = modal, "modal-title": this.title }, index.h("span", { slot: 'icon', class: "s-verify-header-icon", innerHTML: this.type == "mobile" ? AndroidPhoneIcon : MailIcon }), this.myBody());
29573
29574
  }
29575
+ otpHandler() {
29576
+ if (!window.OTPCredential) {
29577
+ return;
29578
+ }
29579
+ const ac = new AbortController();
29580
+ let o = {
29581
+ otp: { transport: ['sms'] },
29582
+ signal: ac.signal
29583
+ };
29584
+ navigator.credentials.get(o)
29585
+ .then(otp => {
29586
+ // @ts-ignore
29587
+ this.otpInputs.forEach((input, index) => input.value = otp.code[index]);
29588
+ return this.submit();
29589
+ });
29590
+ }
29574
29591
  myBody() {
29575
29592
  return (index.h("div", { class: "s-verify-body", ref: body => this.body = body }, index.h("div", { class: "s-verify-message", innerHTML: salla.lang.get('pages.profile.verify_message') }), index.h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }), index.h("div", { class: "s-verify-codes", dir: "ltr" }, [1, 2, 3, 4].map(() => index.h("input", { type: "tel", autocomplete: "one-time-code", pattern: "[0-9]*", inputmode: "numeric", maxlength: "1", class: "s-verify-input", onInput: e => salla.helpers.inputDigitsOnly(e.target), onPaste: e => this.handlePaste(e), onKeyUp: e => this.handleKeyUp(e), required: true }))), index.h("div", { slot: "footer", class: "s-verify-footer" }, index.h("salla-button", { class: "s-verify-submit", "loader-position": 'center', disabled: true, onClick: () => this.submit(), ref: b => this.btn = b }, salla.lang.get('pages.profile.verify')), index.h("p", { class: "s-verify-resend-message", ref: el => this.resendMessage = el }, salla.lang.get('blocks.header.resend_after'), index.h("b", { class: "s-verify-timer", ref: el => this.timer = el })), index.h("a", { href: "#", class: "s-verify-resend", onClick: () => this.resendCode(), ref: el => this.resend = el }, salla.lang.get('blocks.comments.submit'))), index.h("slot", { name: "after-footer" })));
29576
29593
  }