@everymatrix/lottery-tipping-page 1.80.16 → 1.80.17
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.
|
@@ -439,6 +439,21 @@ const getTranslations$3 = (data) => {
|
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
441
|
};
|
|
442
|
+
const resolveTranslationUrl$1 = async (translationUrl) => {
|
|
443
|
+
if (translationUrl) {
|
|
444
|
+
try {
|
|
445
|
+
const response = await fetch(translationUrl);
|
|
446
|
+
if (!response.ok) {
|
|
447
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
448
|
+
}
|
|
449
|
+
const translations = await response.json();
|
|
450
|
+
getTranslations$3(translations);
|
|
451
|
+
}
|
|
452
|
+
catch (error) {
|
|
453
|
+
console.error('Failed to fetch or parse translations from URL:', error);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
};
|
|
442
457
|
|
|
443
458
|
const lotteryTippingDialogCss = ".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-dialog-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;min-height:200px;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-dialog-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-gray-300, #333);background:var(--emw--color-gray-400, #fff)}.dialog-footer .cancel-btn:hover{border-color:var(--emw--color-gray-100, #e6e6e6)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-gray-400, #fff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}";
|
|
444
459
|
const LotteryTippingDialogStyle0 = lotteryTippingDialogCss;
|
|
@@ -484,7 +499,7 @@ const LotteryTippingDialog = class {
|
|
|
484
499
|
}
|
|
485
500
|
componentWillLoad() {
|
|
486
501
|
if (this.translationUrl) {
|
|
487
|
-
|
|
502
|
+
resolveTranslationUrl$1(this.translationUrl);
|
|
488
503
|
}
|
|
489
504
|
}
|
|
490
505
|
componentWillUpdate() {
|
|
@@ -498,6 +513,7 @@ const LotteryTippingDialog = class {
|
|
|
498
513
|
}
|
|
499
514
|
disconnectedCallback() {
|
|
500
515
|
this.enableBodyScroll();
|
|
516
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
501
517
|
}
|
|
502
518
|
disableBodyScroll() {
|
|
503
519
|
document.body.style.overflow = 'hidden';
|
|
@@ -506,17 +522,14 @@ const LotteryTippingDialog = class {
|
|
|
506
522
|
document.body.style.overflow = '';
|
|
507
523
|
}
|
|
508
524
|
handleClose() {
|
|
509
|
-
this.visible = false;
|
|
510
525
|
this.cancel.emit();
|
|
511
526
|
}
|
|
512
527
|
handleMaskClick(e) {
|
|
513
528
|
if (this.maskClosable && e.target === this.el.querySelector('.mask')) {
|
|
514
|
-
this.visible = false;
|
|
515
529
|
this.cancel.emit();
|
|
516
530
|
}
|
|
517
531
|
}
|
|
518
532
|
handleConfirm() {
|
|
519
|
-
this.visible = false;
|
|
520
533
|
this.confirm.emit();
|
|
521
534
|
}
|
|
522
535
|
render() {
|
|
@@ -535,7 +548,7 @@ const LotteryTippingDialog = class {
|
|
|
535
548
|
maxHeight: 'calc(100vh - 62px)',
|
|
536
549
|
overflowY: 'auto'
|
|
537
550
|
};
|
|
538
|
-
return (index.h("div", { key: '
|
|
551
|
+
return (index.h("div", { key: '716c6488b86fc5a74bcd8c8c8a4eee1b85f75cb7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, index.h("div", { key: '161d976b5a15f62c63b56555e161b5b29c0a7771', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), index.h("div", { key: 'ebd2c356c169765b06c85997dc9906b74358b450', class: dialogClass, style: dialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, index.h("div", { key: '2a8616c336447b33d3c4b3f22deee3871abd93c9', class: "dialog-header" }, index.h("h2", { key: 'fc4f4f87826620754f8cce73874726cdebcc280e', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (index.h("button", { key: '1626434c0700df7dc094cbf0c96840476ab65da5', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), index.h("div", { key: '44d28c0e477e3e16069749f7700ee70b6a486d07', class: "dialog-content", style: contentStyle }, index.h("slot", { key: '745e1329fc3647247245f7aa96d10a06b6b18329' })), this.showFooter && (index.h("div", { key: 'cc3b19ba0ab16fd485f2c4e81a5793a25cecb98f', class: "dialog-footer" }, index.h("slot", { key: '906adc00a3735e096159002b972804cfe147f42e', name: "footer" }, this.showCancelBtn && (index.h("button", { key: '1fc68b04c7c39ca9b7dfb228836eb38c4368c355', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate$4('cancel', this.language))), index.h("button", { key: '1d054ca93148286249d4989c783a67e1afe33667', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate$4('confirm', this.language))))))));
|
|
539
552
|
}
|
|
540
553
|
get el() { return index.getElement(this); }
|
|
541
554
|
static get watchers() { return {
|
|
@@ -436,6 +436,21 @@ const getTranslations$3 = (data) => {
|
|
|
436
436
|
}
|
|
437
437
|
});
|
|
438
438
|
};
|
|
439
|
+
const resolveTranslationUrl$1 = async (translationUrl) => {
|
|
440
|
+
if (translationUrl) {
|
|
441
|
+
try {
|
|
442
|
+
const response = await fetch(translationUrl);
|
|
443
|
+
if (!response.ok) {
|
|
444
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
445
|
+
}
|
|
446
|
+
const translations = await response.json();
|
|
447
|
+
getTranslations$3(translations);
|
|
448
|
+
}
|
|
449
|
+
catch (error) {
|
|
450
|
+
console.error('Failed to fetch or parse translations from URL:', error);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
};
|
|
439
454
|
|
|
440
455
|
const lotteryTippingDialogCss = ".dialog-wrapper{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;visibility:hidden;opacity:1;z-index:199}.dialog-wrapper-visible{visibility:visible}.mask{position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.5);opacity:0;z-index:1000;transition:opacity var(--duration) linear}.mask-enter{opacity:1}.mask-leave{opacity:0}.dialog{position:relative;background:var(--emw--color-dialog-background, #fff);border-radius:12px;box-shadow:0 4px 32px rgba(0, 0, 0, 0.15);opacity:0;transform:scale(0.9);transition:all var(--duration) linear;width:100%;max-width:100vw;min-height:200px;overflow:hidden;z-index:1000}.dialog-enter{opacity:1;transform:scale(1)}.dialog-leave{opacity:0}.dialog.fullscreen{width:100vw !important;height:100vh;overflow:auto;max-height:none;border-radius:0;overflow:hidden}.dialog-header{padding:16px 16px 0 16px;display:flex;justify-content:space-between;align-items:center}.dialog-header .dialog-title{margin:0;font-size:1.25rem;font-weight:500;color:var(--emw--color-dialog-typography, #000)}.dialog-header .close-btn{background:transparent;border:none;font-size:1.5rem;width:2rem;height:2rem;color:var(--emw--color-gray-150, #6f6f6f);cursor:pointer;border-radius:4px}.dialog-header .close-btn:hover{background:var(--emw--color-gray-50, #f5f5f5);color:var(--emw--color-gray-300, #333)}.dialog-content{padding:24px;font-size:0.95rem;line-height:1.6;color:var(--emw--color-dialog-typography, #000);flex:1;overflow-y:auto;max-height:calc(100vh - 200px)}.dialog.fullscreen .dialog-content{max-height:none}.dialog-footer{padding:0 16px 16px 16px;display:flex;justify-content:center;gap:12px}.dialog-footer .cancel-btn,.dialog-footer .confirm-btn{padding:10px 24px;border-radius:6px;font-size:0.9rem;cursor:pointer;transition:all 0.3s linear}.dialog-footer .cancel-btn{border:var(--emw--button-border, 1px solid rgba(221, 221, 221, 0.8666666667));color:var(--emw--color-gray-300, #333);background:var(--emw--color-gray-400, #fff)}.dialog-footer .cancel-btn:hover{border-color:var(--emw--color-gray-100, #e6e6e6)}.dialog-footer .confirm-btn{border:none;color:var(--emw--color-gray-400, #fff);background:var(--emw--color-primary, #009993)}.dialog-footer .confirm-btn:hover{background:var(--emw--color-primary-variant, #004d4a)}@media screen and (max-width: 480px){.dialog.fullscreen .dialog-content{padding:12px}}";
|
|
441
456
|
const LotteryTippingDialogStyle0 = lotteryTippingDialogCss;
|
|
@@ -481,7 +496,7 @@ const LotteryTippingDialog = class {
|
|
|
481
496
|
}
|
|
482
497
|
componentWillLoad() {
|
|
483
498
|
if (this.translationUrl) {
|
|
484
|
-
|
|
499
|
+
resolveTranslationUrl$1(this.translationUrl);
|
|
485
500
|
}
|
|
486
501
|
}
|
|
487
502
|
componentWillUpdate() {
|
|
@@ -495,6 +510,7 @@ const LotteryTippingDialog = class {
|
|
|
495
510
|
}
|
|
496
511
|
disconnectedCallback() {
|
|
497
512
|
this.enableBodyScroll();
|
|
513
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
498
514
|
}
|
|
499
515
|
disableBodyScroll() {
|
|
500
516
|
document.body.style.overflow = 'hidden';
|
|
@@ -503,17 +519,14 @@ const LotteryTippingDialog = class {
|
|
|
503
519
|
document.body.style.overflow = '';
|
|
504
520
|
}
|
|
505
521
|
handleClose() {
|
|
506
|
-
this.visible = false;
|
|
507
522
|
this.cancel.emit();
|
|
508
523
|
}
|
|
509
524
|
handleMaskClick(e) {
|
|
510
525
|
if (this.maskClosable && e.target === this.el.querySelector('.mask')) {
|
|
511
|
-
this.visible = false;
|
|
512
526
|
this.cancel.emit();
|
|
513
527
|
}
|
|
514
528
|
}
|
|
515
529
|
handleConfirm() {
|
|
516
|
-
this.visible = false;
|
|
517
530
|
this.confirm.emit();
|
|
518
531
|
}
|
|
519
532
|
render() {
|
|
@@ -532,7 +545,7 @@ const LotteryTippingDialog = class {
|
|
|
532
545
|
maxHeight: 'calc(100vh - 62px)',
|
|
533
546
|
overflowY: 'auto'
|
|
534
547
|
};
|
|
535
|
-
return (h("div", { key: '
|
|
548
|
+
return (h("div", { key: '716c6488b86fc5a74bcd8c8c8a4eee1b85f75cb7', class: dialogWrapperClass.join(' '), ref: (el) => (this.stylingContainer = el) }, h("div", { key: '161d976b5a15f62c63b56555e161b5b29c0a7771', class: maskClass.join(' '), onClick: this.handleMaskClick.bind(this) }), h("div", { key: 'ebd2c356c169765b06c85997dc9906b74358b450', class: dialogClass, style: dialogStyle, role: "dialog", "aria-modal": "true", "aria-labelledby": "dialog-title" }, h("div", { key: '2a8616c336447b33d3c4b3f22deee3871abd93c9', class: "dialog-header" }, h("h2", { key: 'fc4f4f87826620754f8cce73874726cdebcc280e', id: "dialog-title", class: "dialog-title" }, this.dialogTitle), this.closable && (h("button", { key: '1626434c0700df7dc094cbf0c96840476ab65da5', class: "close-btn", onClick: this.handleClose.bind(this) }, "x"))), h("div", { key: '44d28c0e477e3e16069749f7700ee70b6a486d07', class: "dialog-content", style: contentStyle }, h("slot", { key: '745e1329fc3647247245f7aa96d10a06b6b18329' })), this.showFooter && (h("div", { key: 'cc3b19ba0ab16fd485f2c4e81a5793a25cecb98f', class: "dialog-footer" }, h("slot", { key: '906adc00a3735e096159002b972804cfe147f42e', name: "footer" }, this.showCancelBtn && (h("button", { key: '1fc68b04c7c39ca9b7dfb228836eb38c4368c355', class: "cancel-btn", onClick: this.handleClose.bind(this) }, translate$4('cancel', this.language))), h("button", { key: '1d054ca93148286249d4989c783a67e1afe33667', class: "confirm-btn", onClick: this.handleConfirm.bind(this) }, translate$4('confirm', this.language))))))));
|
|
536
549
|
}
|
|
537
550
|
get el() { return getElement(this); }
|
|
538
551
|
static get watchers() { return {
|