@salla.sa/twilight-components 2.11.104 → 2.11.106
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/cjs/{app-globals-8ea9c03d.js → app-globals-b2009a7f.js} +3 -3
- package/dist/cjs/app-globals-b2009a7f.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-add-product-button_40.cjs.entry.js +19 -2
- package/dist/cjs/salla-add-product-button_40.cjs.entry.js.map +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/Helpers/Helper.js +2 -2
- package/dist/collection/Helpers/Helper.js.map +1 -1
- package/dist/collection/components/salla-verify/salla-verify.js +17 -0
- package/dist/collection/components/salla-verify/salla-verify.js.map +1 -1
- package/dist/components/Helper.js +2 -2
- package/dist/components/Helper.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/salla-verify2.js +17 -0
- package/dist/components/salla-verify2.js.map +1 -1
- package/dist/esm/{app-globals-ec9cb360.js → app-globals-f3f69bcf.js} +3 -3
- package/dist/esm/app-globals-f3f69bcf.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/salla-add-product-button_40.entry.js +19 -2
- package/dist/esm/salla-add-product-button_40.entry.js.map +1 -1
- package/dist/esm/twilight.js +1 -1
- package/dist/esm-es5/{app-globals-ec9cb360.js → app-globals-f3f69bcf.js} +3 -3
- package/dist/esm-es5/app-globals-f3f69bcf.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/salla-add-product-button_40.entry.js +1 -1
- package/dist/esm-es5/salla-add-product-button_40.entry.js.map +1 -1
- package/dist/esm-es5/twilight.js +1 -1
- package/dist/twilight/{p-f3e5e2e2.system.js → p-1003008c.system.js} +3 -3
- package/dist/twilight/p-1003008c.system.js.map +1 -0
- package/dist/twilight/{p-19011186.system.entry.js → p-72178dda.system.entry.js} +2 -2
- package/dist/twilight/p-72178dda.system.entry.js.map +1 -0
- package/dist/twilight/{p-2f77c894.entry.js → p-8cdc1bfd.entry.js} +2 -2
- package/dist/twilight/p-8cdc1bfd.entry.js.map +1 -0
- package/dist/twilight/{p-63ddf0e9.system.js → p-93adca89.system.js} +2 -2
- package/dist/twilight/{p-14a2a16d.js → p-dba0eed6.js} +3 -3
- package/dist/twilight/p-dba0eed6.js.map +1 -0
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/twilight/twilight.js +1 -1
- package/dist/types/components/salla-verify/salla-verify.d.ts +1 -0
- package/package.json +3 -3
- package/dist/cjs/app-globals-8ea9c03d.js.map +0 -1
- package/dist/esm/app-globals-ec9cb360.js.map +0 -1
- package/dist/esm-es5/app-globals-ec9cb360.js.map +0 -1
- package/dist/twilight/p-14a2a16d.js.map +0 -1
- package/dist/twilight/p-19011186.system.entry.js.map +0 -1
- package/dist/twilight/p-2f77c894.entry.js.map +0 -1
- package/dist/twilight/p-f3e5e2e2.system.js.map +0 -1
- /package/dist/twilight/{p-63ddf0e9.system.js.map → p-93adca89.system.js.map} +0 -0
package/dist/esm/loader.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { p as promiseResolve, b as bootstrapLazy } from './index-640776f3.js';
|
|
5
5
|
export { s as setNonce } from './index-640776f3.js';
|
|
6
|
-
import { g as globalScripts } from './app-globals-
|
|
6
|
+
import { g as globalScripts } from './app-globals-f3f69bcf.js';
|
|
7
7
|
import './_commonjsHelpers-1415ffd3.js';
|
|
8
8
|
|
|
9
9
|
/*
|
|
@@ -21362,8 +21362,8 @@ const SallaGifting = class {
|
|
|
21362
21362
|
};
|
|
21363
21363
|
SallaGifting.style = sallaGiftingCss;
|
|
21364
21364
|
|
|
21365
|
-
//TODO::
|
|
21366
|
-
salla.event.setMaxListeners(
|
|
21365
|
+
//TODO::reduce it to 10
|
|
21366
|
+
salla.event.setMaxListeners(100);
|
|
21367
21367
|
class Helper {
|
|
21368
21368
|
toggleElementClassIf(element, classes1, classes2, callback) {
|
|
21369
21369
|
classes1 = Array.isArray(classes1) ? classes1 : classes1.split(' ');
|
|
@@ -29452,6 +29452,7 @@ const SallaVerify = class {
|
|
|
29452
29452
|
this.resendAfter = 0;
|
|
29453
29453
|
this.timer.innerHTML = '30 : 00';
|
|
29454
29454
|
});
|
|
29455
|
+
this.otpHandler();
|
|
29455
29456
|
}
|
|
29456
29457
|
handleKeyUp(ev) {
|
|
29457
29458
|
var _a, _b, _c, _d;
|
|
@@ -29567,6 +29568,22 @@ const SallaVerify = class {
|
|
|
29567
29568
|
return this.display == 'inline' ? h(Host, null, this.myBody()) :
|
|
29568
29569
|
h("salla-modal", { width: "xs", class: "s-verify", ref: modal => this.modal = modal, "modal-title": this.title }, h("span", { slot: 'icon', class: "s-verify-header-icon", innerHTML: this.type == "mobile" ? AndroidPhoneIcon : MailIcon }), this.myBody());
|
|
29569
29570
|
}
|
|
29571
|
+
otpHandler() {
|
|
29572
|
+
if (!window.OTPCredential) {
|
|
29573
|
+
return;
|
|
29574
|
+
}
|
|
29575
|
+
const ac = new AbortController();
|
|
29576
|
+
let o = {
|
|
29577
|
+
otp: { transport: ['sms'] },
|
|
29578
|
+
signal: ac.signal
|
|
29579
|
+
};
|
|
29580
|
+
navigator.credentials.get(o)
|
|
29581
|
+
.then(otp => {
|
|
29582
|
+
// @ts-ignore
|
|
29583
|
+
this.otpInputs.forEach((input, index) => input.value = otp.code[index]);
|
|
29584
|
+
return this.submit();
|
|
29585
|
+
});
|
|
29586
|
+
}
|
|
29570
29587
|
myBody() {
|
|
29571
29588
|
return (h("div", { class: "s-verify-body", ref: body => this.body = body }, h("div", { class: "s-verify-message", innerHTML: salla.lang.get('pages.profile.verify_message') }), h("input", { type: "hidden", name: "code", maxlength: "4", required: true, ref: code => this.code = code }), h("div", { class: "s-verify-codes", dir: "ltr" }, [1, 2, 3, 4].map(() => 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 }))), h("div", { slot: "footer", class: "s-verify-footer" }, 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')), h("p", { class: "s-verify-resend-message", ref: el => this.resendMessage = el }, salla.lang.get('blocks.header.resend_after'), h("b", { class: "s-verify-timer", ref: el => this.timer = el })), h("a", { href: "#", class: "s-verify-resend", onClick: () => this.resendCode(), ref: el => this.resend = el }, salla.lang.get('blocks.comments.submit'))), h("slot", { name: "after-footer" })));
|
|
29572
29589
|
}
|