@ptcwebops/ptcw-design 3.7.3 → 3.7.5
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/{icon-asset_18.cjs.entry.js → icon-asset_19.cjs.entry.js} +508 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/ptc-breadcrumb_2.cjs.entry.js +1 -1
- package/dist/cjs/ptc-icon-minimize.cjs.entry.js +24 -1
- package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ptcw-design.cjs.js +1 -1
- package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.js +24 -1
- package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +4 -0
- package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.js +1 -1
- package/dist/collection/components/ptc-modal/ptc-modal.css +14 -2
- package/dist/collection/components/ptc-modal/ptc-modal.js +20 -0
- package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +4 -0
- package/dist/custom-elements/index.js +31 -6
- package/dist/esm/{icon-asset_18.entry.js → icon-asset_19.entry.js} +556 -50
- package/dist/esm/loader.js +1 -1
- package/dist/esm/ptc-breadcrumb_2.entry.js +1 -1
- package/dist/esm/ptc-icon-minimize.entry.js +24 -1
- package/dist/esm/ptc-pricing-tabs.entry.js +1 -1
- package/dist/esm/ptcw-design.js +1 -1
- package/dist/ptcw-design/p-132c7242.entry.js +1 -0
- package/dist/ptcw-design/p-45766e13.entry.js +1 -0
- package/dist/ptcw-design/{p-c42d9009.entry.js → p-6cee9fca.entry.js} +1 -1
- package/dist/ptcw-design/{p-95e1c016.entry.js → p-7293bba4.entry.js} +1 -1
- package/dist/ptcw-design/ptcw-design.css +1 -1
- package/dist/ptcw-design/ptcw-design.esm.js +1 -1
- package/dist/types/components/ptc-icon-minimize/ptc-icon-minimize.d.ts +1 -0
- package/dist/types/components/ptc-modal/ptc-modal.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/dist/cjs/ptc-mobile-select.cjs.entry.js +0 -511
- package/dist/esm/ptc-mobile-select.entry.js +0 -507
- package/dist/ptcw-design/p-2f976047.entry.js +0 -1
- package/dist/ptcw-design/p-34e13f1c.entry.js +0 -1
- package/dist/ptcw-design/p-84b50500.entry.js +0 -1
|
@@ -516,7 +516,511 @@ const PtcLink = class {
|
|
|
516
516
|
};
|
|
517
517
|
PtcLink.style = ptcLinkCss;
|
|
518
518
|
|
|
519
|
-
|
|
519
|
+
/*
|
|
520
|
+
* mobile-select v1.4.0
|
|
521
|
+
* Homepage: https://github.com/onlyhom/mobile-select
|
|
522
|
+
* Released under the MIT License.
|
|
523
|
+
* (c) 2017-present
|
|
524
|
+
*/
|
|
525
|
+
var S = Object.defineProperty;
|
|
526
|
+
var D = (g, t, e) => t in g ? S(g, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : g[t] = e;
|
|
527
|
+
var h = (g, t, e) => (D(g, typeof t != "symbol" ? t + "" : t, e), e);
|
|
528
|
+
function w() {
|
|
529
|
+
return !navigator.userAgent.toLowerCase().match(/ipad|iphone os|midp|rv:1.2.3.4|ucweb|android|windows ce|windows mobile/);
|
|
530
|
+
}
|
|
531
|
+
const l = class {
|
|
532
|
+
constructor(t) {
|
|
533
|
+
h(this, "mobileSelect");
|
|
534
|
+
h(this, "trigger");
|
|
535
|
+
h(this, "wheelList");
|
|
536
|
+
h(this, "sliderList");
|
|
537
|
+
h(this, "wheelsContain");
|
|
538
|
+
h(this, "panel");
|
|
539
|
+
h(this, "ensureBtn");
|
|
540
|
+
h(this, "cancelBtn");
|
|
541
|
+
h(this, "grayLayer");
|
|
542
|
+
h(this, "popUp");
|
|
543
|
+
h(this, "initPosition");
|
|
544
|
+
h(this, "initColWidth");
|
|
545
|
+
h(this, "wheelsData");
|
|
546
|
+
h(this, "displayJson");
|
|
547
|
+
h(this, "curValue");
|
|
548
|
+
h(this, "curIndexArr");
|
|
549
|
+
h(this, "isCascade");
|
|
550
|
+
h(this, "isJsonType");
|
|
551
|
+
h(this, "startY");
|
|
552
|
+
h(this, "moveEndY");
|
|
553
|
+
h(this, "moveY");
|
|
554
|
+
h(this, "preMoveY");
|
|
555
|
+
h(this, "offsetY");
|
|
556
|
+
h(this, "offsetSum");
|
|
557
|
+
h(this, "oversizeBorder");
|
|
558
|
+
h(this, "enableClickStatus");
|
|
559
|
+
h(this, "optionHeight");
|
|
560
|
+
h(this, "curDistance");
|
|
561
|
+
h(this, "cascadeJsonData");
|
|
562
|
+
h(this, "eventHandleMap");
|
|
563
|
+
h(this, "initDeepCount");
|
|
564
|
+
h(this, "config");
|
|
565
|
+
!l.checkRequiredConfig(t) || (this.config = Object.assign({}, l.defaultConfig, t), this.wheelsData = t.wheels, this.isJsonType = !1, this.cascadeJsonData = [], this.displayJson = [], this.curValue = [], this.curIndexArr = [], this.isCascade = !1, this.offsetY = 0, this.offsetSum = 0, this.curDistance = [], this.enableClickStatus = !1, this.optionHeight = 0, this.initPosition = t.position || [], this.initColWidth = t.colWidth || [], this.init());
|
|
566
|
+
}
|
|
567
|
+
init() {
|
|
568
|
+
if (!this.checkTriggerAvailable())
|
|
569
|
+
return;
|
|
570
|
+
const { config: t } = this;
|
|
571
|
+
if (this.isJsonType = l.checkDataType(this.wheelsData), this.renderComponent(this.wheelsData), this.wheelList = this.mobileSelect.getElementsByClassName("ms-wheel"), this.sliderList = this.mobileSelect.getElementsByClassName("ms-select-container"), this.panel = this.mobileSelect.querySelector(".ms-panel"), this.wheelsContain = this.mobileSelect.querySelector(".ms-wheels"), this.ensureBtn = this.mobileSelect.querySelector(".ms-ensure"), this.cancelBtn = this.mobileSelect.querySelector(".ms-cancel"), this.grayLayer = this.mobileSelect.querySelector(".ms-gray-layer"), this.popUp = this.mobileSelect.querySelector(".ms-content"), this.optionHeight = this.mobileSelect.querySelector("li").offsetHeight, t.initValue && this.setTriggerInnerText(t.initValue), this.setStyle(t), this.isCascade = this.checkCascade(), this.isCascade && this.initCascade(), t.initValue && (this.initPosition = this.getPositionByInitValue()), this.initPosition.length < this.sliderList.length) {
|
|
572
|
+
const e = this.sliderList.length - this.initPosition.length;
|
|
573
|
+
for (let i = 0; i < e; i++)
|
|
574
|
+
this.initPosition.push(0);
|
|
575
|
+
}
|
|
576
|
+
this.isCascade ? this.initPosition.forEach((e, i) => {
|
|
577
|
+
this.checkRange(i, this.initPosition);
|
|
578
|
+
}) : this.setCurDistance(this.initPosition), this.eventHandleMap = {
|
|
579
|
+
cancelBtn: {
|
|
580
|
+
event: "click",
|
|
581
|
+
fn: () => {
|
|
582
|
+
var e, i, s, n;
|
|
583
|
+
this.hide(), (i = (e = this.config).cancel) == null || i.call(e, this.curIndexArr, this.curValue, this), (n = (s = this.config).onCancel) == null || n.call(s, this.curValue, this.curIndexArr, this);
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
ensureBtn: {
|
|
587
|
+
event: "click",
|
|
588
|
+
fn: () => {
|
|
589
|
+
var e, i, s, n;
|
|
590
|
+
this.hide(), this.optionHeight || (this.optionHeight = this.mobileSelect.querySelector("li").offsetHeight), this.setTriggerInnerText(this.getConnectedString()), this.curIndexArr = this.getIndexArr(), this.curValue = this.getCurValue(), (i = (e = this.config).callback) == null || i.call(e, this.curIndexArr, this.curValue, this), (n = (s = this.config).onChange) == null || n.call(s, this.curValue, this.curIndexArr, this);
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
trigger: {
|
|
594
|
+
event: "click",
|
|
595
|
+
fn: () => {
|
|
596
|
+
this.show();
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
grayLayer: {
|
|
600
|
+
event: "click",
|
|
601
|
+
fn: () => this.hide()
|
|
602
|
+
},
|
|
603
|
+
popUp: {
|
|
604
|
+
event: "click",
|
|
605
|
+
fn: (e) => e.stopPropagation()
|
|
606
|
+
},
|
|
607
|
+
panel: {
|
|
608
|
+
event: ["touchstart", "touchend", "touchmove"],
|
|
609
|
+
fn: (e) => this.touch(e)
|
|
610
|
+
}
|
|
611
|
+
}, w() && (this.eventHandleMap.panel.event = ["mousedown", "mousemove", "mouseup"]), this.registerEvents("add"), this.fixRowStyle(), t.autoFocus && this.show();
|
|
612
|
+
}
|
|
613
|
+
static checkDataType(t) {
|
|
614
|
+
var e, i;
|
|
615
|
+
return typeof ((i = (e = t[0]) == null ? void 0 : e.data) == null ? void 0 : i[0]) == "object";
|
|
616
|
+
}
|
|
617
|
+
static checkRequiredConfig(t) {
|
|
618
|
+
const e = l.REQUIRED_PARAMS;
|
|
619
|
+
if (!t) {
|
|
620
|
+
const i = e.map((s) => `'${s}'`);
|
|
621
|
+
return l.log("error", `missing required param ${i.join(" and ")}.`), !1;
|
|
622
|
+
}
|
|
623
|
+
for (let i = 0; i < e.length; i++) {
|
|
624
|
+
const s = e[i];
|
|
625
|
+
if (!t[s])
|
|
626
|
+
return l.log("error", `missing required param '${s}'.`), !1;
|
|
627
|
+
}
|
|
628
|
+
return !0;
|
|
629
|
+
}
|
|
630
|
+
static log(t, e) {
|
|
631
|
+
var i;
|
|
632
|
+
(i = console[t]) == null || i.call(console, `[mobile-select]: ${e}`);
|
|
633
|
+
}
|
|
634
|
+
checkTriggerAvailable() {
|
|
635
|
+
const { config: t } = this;
|
|
636
|
+
return this.trigger = t.trigger instanceof HTMLElement ? t.trigger : document.querySelector(t.trigger), this.trigger ? !0 : (l.log("error", "trigger HTMLElement does not found on your document."), !1);
|
|
637
|
+
}
|
|
638
|
+
getPositionByInitValue() {
|
|
639
|
+
var n;
|
|
640
|
+
const { keyMap: t, connector: e, initValue: i } = this.config, s = (i == null ? void 0 : i.split(e)) || [];
|
|
641
|
+
if (this.isJsonType) {
|
|
642
|
+
let o = (n = this.wheelsData[0]) == null ? void 0 : n.data;
|
|
643
|
+
return s.reduce((r, c) => {
|
|
644
|
+
var u;
|
|
645
|
+
const a = o == null ? void 0 : o.findIndex((d) => d[t.value] == c);
|
|
646
|
+
return r.push(a < 0 ? 0 : a), o = (u = o[a]) == null ? void 0 : u[t.childs], r;
|
|
647
|
+
}, []);
|
|
648
|
+
}
|
|
649
|
+
return s.reduce((o, r, c) => {
|
|
650
|
+
var u, d;
|
|
651
|
+
const a = (d = (u = this.wheelsData[c]) == null ? void 0 : u.data) == null ? void 0 : d.findIndex((f) => f == r);
|
|
652
|
+
return o.push(a < 0 ? 0 : a), o;
|
|
653
|
+
}, []);
|
|
654
|
+
}
|
|
655
|
+
getConnectedString() {
|
|
656
|
+
let t = "";
|
|
657
|
+
for (let e = 0; e < this.wheelList.length; e++)
|
|
658
|
+
e == this.wheelList.length - 1 ? t += this.getInnerText(e) : t += this.getInnerText(e) + this.config.connector;
|
|
659
|
+
return t;
|
|
660
|
+
}
|
|
661
|
+
setTriggerInnerText(t) {
|
|
662
|
+
this.config.triggerDisplayValue && (this.trigger.textContent = t);
|
|
663
|
+
}
|
|
664
|
+
setValue(t) {
|
|
665
|
+
if (!t || !t.length)
|
|
666
|
+
return;
|
|
667
|
+
if (this.isJsonType && typeof t[0] != "object" || !this.isJsonType && typeof t[0] == "object") {
|
|
668
|
+
l.log("error", `The setValue() input format should be same with getValue(), like: ${JSON.stringify(this.getValue())}`);
|
|
669
|
+
return;
|
|
670
|
+
}
|
|
671
|
+
const { keyMap: e } = this.config;
|
|
672
|
+
t.forEach((i, s) => {
|
|
673
|
+
var r;
|
|
674
|
+
const n = this.isCascade ? this.displayJson[s] : (r = this.wheelsData[s]) == null ? void 0 : r.data, o = n == null ? void 0 : n.findIndex((c) => this.isJsonType ? i[e.id] == c[e.id] || i[e.value] == c[e.value] : i == c);
|
|
675
|
+
this.locatePosition(s, o);
|
|
676
|
+
}), this.setTriggerInnerText(this.getConnectedString());
|
|
677
|
+
}
|
|
678
|
+
setTitle(t) {
|
|
679
|
+
this.mobileSelect.querySelector(".ms-title").innerHTML = t;
|
|
680
|
+
}
|
|
681
|
+
setStyle(t) {
|
|
682
|
+
if (t.ensureBtnColor && (this.ensureBtn.style.color = t.ensureBtnColor), t.cancelBtnColor && (this.cancelBtn.style.color = t.cancelBtnColor), t.titleColor) {
|
|
683
|
+
const e = this.mobileSelect.querySelector(".ms-title");
|
|
684
|
+
e.style.color = t.titleColor;
|
|
685
|
+
}
|
|
686
|
+
if (t.textColor && (this.panel = this.mobileSelect.querySelector(".ms-panel"), this.panel.style.color = t.textColor), t.titleBgColor) {
|
|
687
|
+
const e = this.mobileSelect.querySelector(".ms-btn-bar");
|
|
688
|
+
e.style.backgroundColor = t.titleBgColor;
|
|
689
|
+
}
|
|
690
|
+
if (t.bgColor) {
|
|
691
|
+
this.panel = this.mobileSelect.querySelector(".ms-panel");
|
|
692
|
+
const e = this.mobileSelect.querySelector(".ms-shadow-mask");
|
|
693
|
+
this.panel.style.backgroundColor = t.bgColor, e.style.background = "linear-gradient(to bottom, " + t.bgColor + ", rgba(255, 255, 255, 0), " + t.bgColor + ")";
|
|
694
|
+
}
|
|
695
|
+
if (typeof t.maskOpacity == "number") {
|
|
696
|
+
const e = this.mobileSelect.querySelector(".ms-gray-layer");
|
|
697
|
+
e.style.background = "rgba(0, 0, 0, " + t.maskOpacity + ")";
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
show() {
|
|
701
|
+
var t, e, i;
|
|
702
|
+
this.mobileSelect.classList.add("ms-show"), (t = document.querySelector("body")) == null || t.classList.add("ms-show"), typeof this.config.onShow == "function" && ((i = (e = this.config).onShow) == null || i.call(e, this.curValue, this.curIndexArr, this));
|
|
703
|
+
}
|
|
704
|
+
hide() {
|
|
705
|
+
var t, e, i;
|
|
706
|
+
this.mobileSelect.classList.remove("ms-show"), (t = document.querySelector("body")) == null || t.classList.remove("ms-show"), typeof this.config.onHide == "function" && ((i = (e = this.config).onHide) == null || i.call(e, this.curValue, this.curIndexArr, this));
|
|
707
|
+
}
|
|
708
|
+
registerEvents(t) {
|
|
709
|
+
for (const [e, i] of Object.entries(this.eventHandleMap))
|
|
710
|
+
typeof i.event == "string" ? this[e][`${t}EventListener`](i.event, i.fn, { passive: !1 }) : i.event.forEach((s) => {
|
|
711
|
+
this[e][`${t}EventListener`](s, i.fn, { passive: !1 });
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
destroy() {
|
|
715
|
+
var t, e;
|
|
716
|
+
this.registerEvents("remove"), (e = (t = this.mobileSelect) == null ? void 0 : t.parentNode) == null || e.removeChild(this.mobileSelect);
|
|
717
|
+
}
|
|
718
|
+
getOptionsHtmlStr(t) {
|
|
719
|
+
const { keyMap: e } = this.config;
|
|
720
|
+
let i = "";
|
|
721
|
+
if (this.isJsonType)
|
|
722
|
+
for (let s = 0; s < t.length; s++) {
|
|
723
|
+
const n = t[s][e.id], o = t[s][e.value];
|
|
724
|
+
i += `<li data-id="${n}">${o}</li>`;
|
|
725
|
+
}
|
|
726
|
+
else
|
|
727
|
+
for (let s = 0; s < t.length; s++)
|
|
728
|
+
i += "<li>" + t[s] + "</li>";
|
|
729
|
+
return i;
|
|
730
|
+
}
|
|
731
|
+
renderComponent(t) {
|
|
732
|
+
this.mobileSelect = document.createElement("div"), this.mobileSelect.className = "ms-mobile-select", this.mobileSelect.innerHTML = `<div class="ms-gray-layer"></div>
|
|
733
|
+
<div class="ms-content">
|
|
734
|
+
<div class="ms-btn-bar">
|
|
735
|
+
<div class="ms-fix-width">
|
|
736
|
+
<div class="ms-cancel">${this.config.cancelBtnText}</div>
|
|
737
|
+
<div class="ms-title">${this.config.title || ""}</div>
|
|
738
|
+
<div class="ms-ensure">${this.config.ensureBtnText}</div>
|
|
739
|
+
</div>
|
|
740
|
+
</div>
|
|
741
|
+
<div class="ms-panel">
|
|
742
|
+
<div class="ms-fix-width">
|
|
743
|
+
<div class="ms-wheels"></div>
|
|
744
|
+
<div class="ms-select-line"></div>
|
|
745
|
+
<div class="ms-shadow-mask"></div>
|
|
746
|
+
</div>
|
|
747
|
+
</div>`, document.body.appendChild(this.mobileSelect);
|
|
748
|
+
let e = "";
|
|
749
|
+
for (let i = 0; i < t.length; i++)
|
|
750
|
+
e += `<div class="ms-wheel" data-index="${i}"><ul class="ms-select-container">`, e += this.getOptionsHtmlStr(t[i].data), e += "</ul></div>";
|
|
751
|
+
this.mobileSelect.querySelector(".ms-wheels").innerHTML = e;
|
|
752
|
+
}
|
|
753
|
+
reRenderWheels() {
|
|
754
|
+
const t = this.wheelList.length - this.displayJson.length;
|
|
755
|
+
if (t > 0)
|
|
756
|
+
for (let e = 0; e < t; e++)
|
|
757
|
+
this.wheelsContain.removeChild(this.wheelList[this.wheelList.length - 1]);
|
|
758
|
+
for (let e = 0; e < this.displayJson.length; e++)
|
|
759
|
+
if (this.wheelList[e])
|
|
760
|
+
this.sliderList[e].innerHTML = this.getOptionsHtmlStr(this.displayJson[e]);
|
|
761
|
+
else {
|
|
762
|
+
const i = document.createElement("div");
|
|
763
|
+
i.className = "ms-wheel", i.innerHTML = `<ul class="ms-select-container">${this.getOptionsHtmlStr(this.displayJson[e])}</ul>`, i.setAttribute("data-index", e.toString()), this.wheelsContain.appendChild(i);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
checkCascade() {
|
|
767
|
+
var e;
|
|
768
|
+
const { keyMap: t } = this.config;
|
|
769
|
+
if (this.isJsonType) {
|
|
770
|
+
const i = this.wheelsData[0].data;
|
|
771
|
+
for (let s = 0; s < i.length; s++)
|
|
772
|
+
if (t.childs in i[s] && ((e = i[s][t.childs]) == null ? void 0 : e.length) > 0)
|
|
773
|
+
return this.cascadeJsonData = this.wheelsData[0].data, !0;
|
|
774
|
+
}
|
|
775
|
+
return !1;
|
|
776
|
+
}
|
|
777
|
+
initCascade() {
|
|
778
|
+
this.displayJson.push(this.cascadeJsonData), this.initPosition.length > 0 ? (this.initDeepCount = 0, this.initCheckArrDeep(this.cascadeJsonData[this.initPosition[0]])) : this.checkArrDeep(this.cascadeJsonData[0]), this.reRenderWheels();
|
|
779
|
+
}
|
|
780
|
+
initCheckArrDeep(t) {
|
|
781
|
+
if (t) {
|
|
782
|
+
const { keyMap: e } = this.config;
|
|
783
|
+
if (e.childs in t && t[e.childs].length > 0) {
|
|
784
|
+
this.displayJson.push(t[e.childs]), this.initDeepCount++;
|
|
785
|
+
const i = t[e.childs][this.initPosition[this.initDeepCount]];
|
|
786
|
+
i ? this.initCheckArrDeep(i) : this.checkArrDeep(t[e.childs][0]);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
checkArrDeep(t) {
|
|
791
|
+
if (!t)
|
|
792
|
+
return;
|
|
793
|
+
const { keyMap: e } = this.config;
|
|
794
|
+
e.childs in t && t[e.childs].length > 0 && (this.displayJson.push(t[e.childs]), this.checkArrDeep(t[e.childs][0]));
|
|
795
|
+
}
|
|
796
|
+
checkRange(t, e) {
|
|
797
|
+
var o;
|
|
798
|
+
const i = this.displayJson.length - 1 - t, { keyMap: s } = this.config;
|
|
799
|
+
for (let r = 0; r < i; r++)
|
|
800
|
+
this.displayJson.pop();
|
|
801
|
+
let n;
|
|
802
|
+
for (let r = 0; r <= t; r++)
|
|
803
|
+
n = r == 0 ? this.cascadeJsonData[e[0]] : (o = n == null ? void 0 : n[s.childs]) == null ? void 0 : o[e[r]];
|
|
804
|
+
this.checkArrDeep(n), this.reRenderWheels(), this.fixRowStyle(), this.setCurDistance(this.resetPosition(t, e));
|
|
805
|
+
}
|
|
806
|
+
resetPosition(t, e) {
|
|
807
|
+
const i = [...e];
|
|
808
|
+
let s;
|
|
809
|
+
if (this.sliderList.length > e.length) {
|
|
810
|
+
s = this.sliderList.length - e.length;
|
|
811
|
+
for (let n = 0; n < s; n++)
|
|
812
|
+
i.push(0);
|
|
813
|
+
} else if (this.sliderList.length < e.length) {
|
|
814
|
+
s = e.length - this.sliderList.length;
|
|
815
|
+
for (let n = 0; n < s; n++)
|
|
816
|
+
i.pop();
|
|
817
|
+
}
|
|
818
|
+
for (let n = t + 1; n < i.length; n++)
|
|
819
|
+
i[n] = 0;
|
|
820
|
+
return i;
|
|
821
|
+
}
|
|
822
|
+
updateWheels(t) {
|
|
823
|
+
if (this.isCascade) {
|
|
824
|
+
if (this.cascadeJsonData = t, this.displayJson = [], this.initCascade(), this.initPosition.length < this.sliderList.length) {
|
|
825
|
+
const e = this.sliderList.length - this.initPosition.length;
|
|
826
|
+
for (let i = 0; i < e; i++)
|
|
827
|
+
this.initPosition.push(0);
|
|
828
|
+
}
|
|
829
|
+
this.setCurDistance(this.initPosition), this.fixRowStyle();
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
updateWheel(t, e) {
|
|
833
|
+
if (this.isCascade) {
|
|
834
|
+
l.log("error", "'updateWheel()' not support cascade json data, please use 'updateWheels()' instead to update the whole data source");
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
let i = "";
|
|
838
|
+
i += this.getOptionsHtmlStr(e), this.wheelsData[t] = this.isJsonType ? { data: e } : e, this.sliderList[t].innerHTML = i;
|
|
839
|
+
}
|
|
840
|
+
fixRowStyle() {
|
|
841
|
+
if (this.initColWidth.length && this.initColWidth.length === this.wheelList.length) {
|
|
842
|
+
const e = this.initColWidth.reduce((i, s) => i + s, 0);
|
|
843
|
+
this.initColWidth.forEach((i, s) => {
|
|
844
|
+
this.wheelList[s].style.width = (i / e * 100).toFixed(2) + "%";
|
|
845
|
+
});
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
const t = (100 / this.wheelList.length).toFixed(2);
|
|
849
|
+
for (let e = 0; e < this.wheelList.length; e++)
|
|
850
|
+
this.wheelList[e].style.width = t + "%";
|
|
851
|
+
}
|
|
852
|
+
getIndex(t) {
|
|
853
|
+
return Math.round((2 * this.optionHeight - t) / this.optionHeight);
|
|
854
|
+
}
|
|
855
|
+
getIndexArr() {
|
|
856
|
+
const t = [];
|
|
857
|
+
for (let e = 0; e < this.curDistance.length; e++)
|
|
858
|
+
t.push(this.getIndex(this.curDistance[e]));
|
|
859
|
+
return t;
|
|
860
|
+
}
|
|
861
|
+
getCurValue() {
|
|
862
|
+
const t = [], e = this.getIndexArr(), { keyMap: i } = this.config;
|
|
863
|
+
if (this.isCascade)
|
|
864
|
+
for (let s = 0; s < this.wheelList.length; s++) {
|
|
865
|
+
const n = this.displayJson[s][e[s]];
|
|
866
|
+
n && t.push({
|
|
867
|
+
[i.id]: n[i.id],
|
|
868
|
+
[i.value]: n[i.value]
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
else if (this.isJsonType)
|
|
872
|
+
for (let s = 0; s < this.curDistance.length; s++)
|
|
873
|
+
t.push(this.wheelsData[s].data[this.getIndex(this.curDistance[s])]);
|
|
874
|
+
else
|
|
875
|
+
for (let s = 0; s < this.curDistance.length; s++)
|
|
876
|
+
t.push(this.getInnerText(s));
|
|
877
|
+
return t;
|
|
878
|
+
}
|
|
879
|
+
getValue() {
|
|
880
|
+
return this.getCurValue();
|
|
881
|
+
}
|
|
882
|
+
calcDistance(t) {
|
|
883
|
+
return 2 * this.optionHeight - t * this.optionHeight;
|
|
884
|
+
}
|
|
885
|
+
setCurDistance(t) {
|
|
886
|
+
const e = [];
|
|
887
|
+
for (let i = 0; i < this.sliderList.length; i++)
|
|
888
|
+
e.push(this.calcDistance(t[i])), this.movePosition(this.sliderList[i], e[i]);
|
|
889
|
+
this.curDistance = e;
|
|
890
|
+
}
|
|
891
|
+
fixPosition(t) {
|
|
892
|
+
return -(this.getIndex(t) - 2) * this.optionHeight;
|
|
893
|
+
}
|
|
894
|
+
movePosition(t, e) {
|
|
895
|
+
t.style.transform = "translate3d(0," + e + "px, 0)";
|
|
896
|
+
}
|
|
897
|
+
locatePosition(t, e) {
|
|
898
|
+
t === void 0 || e === void 0 || e < 0 || (this.curDistance[t] = this.calcDistance(e), this.movePosition(this.sliderList[t], this.curDistance[t]), this.isCascade && this.checkRange(t, this.getIndexArr()));
|
|
899
|
+
}
|
|
900
|
+
updateCurDistance(t, e) {
|
|
901
|
+
this.curDistance[e] = parseInt(t.style.transform.split(",")[1]);
|
|
902
|
+
}
|
|
903
|
+
getInnerText(t) {
|
|
904
|
+
var s;
|
|
905
|
+
const e = this.sliderList[t].getElementsByTagName("li").length;
|
|
906
|
+
let i = this.getIndex(this.curDistance[t]);
|
|
907
|
+
return i >= e ? i = e - 1 : i < 0 && (i = 0), ((s = this.sliderList[t].getElementsByTagName("li")[i]) == null ? void 0 : s.textContent) || "";
|
|
908
|
+
}
|
|
909
|
+
touch(t) {
|
|
910
|
+
var o, r, c, a, u, d, f, v;
|
|
911
|
+
const i = (t.composedPath && t.composedPath()).find((m) => {
|
|
912
|
+
var p;
|
|
913
|
+
return (p = m.classList) == null ? void 0 : p.contains("ms-wheel");
|
|
914
|
+
});
|
|
915
|
+
if (!i)
|
|
916
|
+
return;
|
|
917
|
+
const s = i.firstChild, n = parseInt(i.getAttribute("data-index") || "0");
|
|
918
|
+
switch (t.type) {
|
|
919
|
+
case "touchstart":
|
|
920
|
+
case "mousedown":
|
|
921
|
+
s.style.transition = "none 0s ease-out", this.startY = Math.floor(t instanceof TouchEvent ? t.touches[0].clientY : t.clientY), this.preMoveY = this.startY, t.type === "mousedown" && (this.enableClickStatus = !0);
|
|
922
|
+
break;
|
|
923
|
+
case "touchmove":
|
|
924
|
+
case "mousemove":
|
|
925
|
+
if (t.preventDefault(), t.type === "mousemove" && !this.enableClickStatus)
|
|
926
|
+
break;
|
|
927
|
+
this.moveY = Math.floor(t instanceof TouchEvent ? t.touches[0].clientY : t.clientY), this.offsetY = (this.moveY - this.preMoveY) * this.config.scrollSpeed, this.updateCurDistance(s, n), this.curDistance[n] = this.curDistance[n] + this.offsetY, this.movePosition(s, this.curDistance[n]), this.preMoveY = this.moveY;
|
|
928
|
+
break;
|
|
929
|
+
case "touchend":
|
|
930
|
+
case "mouseup":
|
|
931
|
+
if (s.style.transition = "transform 0.18s ease-out", this.moveEndY = Math.floor(t instanceof TouchEvent ? t.changedTouches[0].clientY : t.clientY), this.offsetSum = this.moveEndY - this.startY, this.oversizeBorder = -(s.getElementsByTagName("li").length - 3) * this.optionHeight, this.offsetSum == 0) {
|
|
932
|
+
const m = Math.floor((window.innerHeight - this.moveEndY) / 40);
|
|
933
|
+
if (m != 2) {
|
|
934
|
+
const p = m - 2, C = this.curDistance[n] + p * this.optionHeight;
|
|
935
|
+
C <= 2 * this.optionHeight && C >= this.oversizeBorder && (this.curDistance[n] = C, this.movePosition(s, this.curDistance[n]), (r = (o = this.config).transitionEnd) == null || r.call(o, this.getIndexArr(), this.getCurValue(), this), (a = (c = this.config).onTransitionEnd) == null || a.call(c, this.getCurValue(), this.getIndexArr(), this));
|
|
936
|
+
}
|
|
937
|
+
} else
|
|
938
|
+
this.updateCurDistance(s, n), this.curDistance[n] = this.fixPosition(this.curDistance[n]), this.curDistance[n] > 2 * this.optionHeight ? this.curDistance[n] = 2 * this.optionHeight : this.curDistance[n] < this.oversizeBorder && (this.curDistance[n] = this.oversizeBorder), this.movePosition(s, this.curDistance[n]), (d = (u = this.config).transitionEnd) == null || d.call(u, this.getIndexArr(), this.getCurValue(), this), (v = (f = this.config).onTransitionEnd) == null || v.call(f, this.getCurValue(), this.getIndexArr(), this);
|
|
939
|
+
t.type === "mouseup" && (this.enableClickStatus = !1), this.isCascade && this.checkRange(n, this.getIndexArr());
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
let y = l;
|
|
945
|
+
h(y, "defaultConfig", {
|
|
946
|
+
keyMap: { id: "id", value: "value", childs: "childs" },
|
|
947
|
+
position: [],
|
|
948
|
+
colWidth: [],
|
|
949
|
+
title: "",
|
|
950
|
+
connector: " ",
|
|
951
|
+
ensureBtnText: "\u786E\u8BA4",
|
|
952
|
+
cancelBtnText: "\u53D6\u6D88",
|
|
953
|
+
triggerDisplayValue: !0,
|
|
954
|
+
scrollSpeed: 1
|
|
955
|
+
}), h(y, "REQUIRED_PARAMS", ["trigger", "wheels"]);
|
|
956
|
+
|
|
957
|
+
const ptcMobileSelectCss = ".ms-mobile-select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;opacity:0;visibility:hidden;-webkit-transition:opacity 0.4s, z-index 0.4s;transition:opacity 0.4s, z-index 0.4s;transform:translate(0, 0)}.ms-mobile-select *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.ms-mobile-select .ms-gray-layer{position:fixed;top:0;left:0;bottom:0;right:0;background:rgba(0, 0, 0, 0.7);z-index:888;display:block}.ms-mobile-select .ms-content{width:100%;display:block;position:fixed;z-index:889;color:black;-webkit-transition:all 0.4s;transition:all 0.4s;bottom:-350px;left:0;background:white}.ms-mobile-select .ms-fix-width{width:90%;margin:0 auto;position:relative}.ms-mobile-select .ms-fix-width:after{content:\".\";display:block;height:0;clear:both;visibility:hidden}.ms-mobile-select .ms-btn-bar{border-bottom:1px solid #dcdcdc;font-size:15px;height:45px;position:relative;text-align:center;line-height:45px}.ms-mobile-select .ms-cancel,.ms-mobile-select .ms-ensure{height:45px;width:55px;cursor:pointer;position:absolute;top:0;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.ms-mobile-select .ms-cancel{left:0;color:#666}.ms-mobile-select .ms-ensure{right:0;color:#1e83d3}.ms-mobile-select .ms-title{font-size:15px;padding:0 15%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ms-mobile-select .ms-panel:after{content:\".\";display:block;height:0;clear:both;visibility:hidden}.ms-mobile-select .ms-wheels{width:100%;height:200px;overflow:hidden}.ms-mobile-select .ms-wheel{position:relative;z-index:0;float:left;width:50%;height:200px;overflow:hidden;-webkit-transition:width 0.3s ease;transition:width 0.3s ease}.ms-mobile-select .ms-select-container{display:block;text-align:center}.ms-mobile-select .ms-select-container li{font-size:15px;display:block;height:40px;line-height:40px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.ms-mobile-select .ms-select-line{height:40px;width:100%;position:absolute;top:80px;pointer-events:none;-webkit-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #dcdcdc;border-bottom:1px solid #dcdcdc}.ms-mobile-select .ms-shadow-mask{position:absolute;top:0;width:100%;height:200px;background:linear-gradient(to bottom, #fffffff5, #ffffffcc 25%, #ffffff00 49%, #ffffff00 51%, #ffffffcc 75%, #fffffff5);opacity:0.9;pointer-events:none}.ms-mobile-select.ms-show{opacity:1;z-index:10000;visibility:visible}.ms-mobile-select.ms-show .ms-content{bottom:0}.ms-default-trigger{min-height:1em;color:#888}body.ms-show{overflow-y:hidden}h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}.mobile-select-wrapper{display:block}.mobile-select-wrapper div{display:inline;margin-right:var(--ptc-element-spacing-03);width:100%;font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-regular);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest);color:var(--color-white);height:18px}.mobileSelect .content{top:auto}.mobileSelect .content .btnBar{border-color:var(--color-gray-10)}.mobileSelect .content .btnBar .cancel,.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .title{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest)}.mobileSelect .content .btnBar .ensure,.mobileSelect .content .btnBar .cancel{transform:translateY(12.5px);width:125px}.mobileSelect .content .panel .wheel .selectContainer li{font-family:var(--ptc-font-latin);font-weight:var(--ptc-font-weight-semibold);font-size:var(--ptc-font-size-x-small);line-height:var(--ptc-line-height-densest);height:45px}ptc-responsive-wrapper.xsmall .mobile-select-wrapper,ptc-responsive-wrapper.small .mobile-select-wrapper{display:block}ptc-responsive-wrapper.medium .mobile-select-wrapper,ptc-responsive-wrapper.large .mobile-select-wrapper,ptc-responsive-wrapper.xlarge .mobile-select-wrapper,ptc-responsive-wrapper.xxlarge .mobile-select-wrapper,ptc-responsive-wrapper.large2k .mobile-select-wrapper,ptc-responsive-wrapper.large4k .mobile-select-wrapper{display:none}";
|
|
958
|
+
|
|
959
|
+
const PtcMobileSelect = class {
|
|
960
|
+
constructor(hostRef) {
|
|
961
|
+
index.registerInstance(this, hostRef);
|
|
962
|
+
this.triggerName = undefined;
|
|
963
|
+
this.selectedText = undefined;
|
|
964
|
+
this.wheelData = undefined;
|
|
965
|
+
this.selectedId = '';
|
|
966
|
+
this.ensureBtnText = 'Confirm';
|
|
967
|
+
this.cancelBtnText = 'Cancel';
|
|
968
|
+
this.listTitle = undefined;
|
|
969
|
+
}
|
|
970
|
+
render() {
|
|
971
|
+
return (index.h("div", { class: "mobile-select-wrapper" }, index.h("div", { id: this.triggerName }, this.selectedText, index.h("icon-asset", { type: "ptc", size: "x-small", name: "chevron-down", color: "white", "is-mobile-select": "true", "injected-style": "svg.ismobileselect{transform:translateX(10px);}" }))));
|
|
972
|
+
}
|
|
973
|
+
componentDidRender() {
|
|
974
|
+
let currentId = this.selectedId; //input current lang
|
|
975
|
+
let storeIndex = 0;
|
|
976
|
+
let mySelect = new y({
|
|
977
|
+
trigger: `#${this.triggerName}`,
|
|
978
|
+
title: `${this.listTitle ? this.listTitle : ''}`,
|
|
979
|
+
wheels: this.wheelData ? [{ data: this.wheelData }] : [{ data: ['test1', 'test2'] }],
|
|
980
|
+
position: [0],
|
|
981
|
+
ensureBtnText: this.ensureBtnText,
|
|
982
|
+
cancelBtnText: this.cancelBtnText,
|
|
983
|
+
ensureBtnColor: 'var(--color-gray-12)',
|
|
984
|
+
cancelBtnColor: 'var(--color-gray-12)',
|
|
985
|
+
titleColor: 'var(--color-gray-12)',
|
|
986
|
+
onShow: function (_1, _2, e) {
|
|
987
|
+
if (currentId) {
|
|
988
|
+
let liEle = document.querySelectorAll('.selectContainer li');
|
|
989
|
+
liEle.forEach((currentValue, currentIndex) => {
|
|
990
|
+
if (currentValue.getAttribute('data-id') == currentId) {
|
|
991
|
+
storeIndex = currentIndex;
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
try {
|
|
996
|
+
e.locatePosition(0, storeIndex);
|
|
997
|
+
console.log("storeIndex: " + storeIndex);
|
|
998
|
+
}
|
|
999
|
+
catch (error) {
|
|
1000
|
+
console.log(error);
|
|
1001
|
+
// debugger
|
|
1002
|
+
}
|
|
1003
|
+
//e.locatePosition(0, storeIndex);
|
|
1004
|
+
}
|
|
1005
|
+
else {
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
callback: function (indexArr, data) {
|
|
1010
|
+
if (data[0].id) {
|
|
1011
|
+
window.location.href = data[0].id;
|
|
1012
|
+
}
|
|
1013
|
+
else {
|
|
1014
|
+
console.log('href: ' + data[0].id + '; indexArr: ' + indexArr);
|
|
1015
|
+
}
|
|
1016
|
+
}.bind(this),
|
|
1017
|
+
});
|
|
1018
|
+
mySelect.locatePosition(0, storeIndex);
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
PtcMobileSelect.style = ptcMobileSelectCss;
|
|
1022
|
+
|
|
1023
|
+
const ptcModalCss = "h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{word-break:break-word;hyphens:manual;-webkit-hyphens:manual;-moz-hyphens:manual;-ms-hyphens:manual}@supports (hyphenate-limit-chars: 12 3 3){h1,h2,h3,h4,h5,h6,p,ul,li,ptc-subnav,ptc-tab-list,ptc-link{hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;hyphenate-limit-chars:12 3 3;hyphenate-limit-lines:2;hyphenate-limit-last:always;hyphenate-limit-zone:6%;-webkit-hyphens:auto;-webkit-hyphenate-limit-before:3;-webkit-hyphenate-limit-after:3;-webkit-hyphenate-limit-chars:12 3 3;-webkit-hyphenate-limit-lines:2;-moz-hyphens:auto;-moz-hyphenate-limit-chars:12 3 3;-moz-hyphenate-limit-lines:2;-ms-hyphens:auto;-ms-hyphenate-limit-chars:12 3 3;-ms-hyphenate-limit-lines:2}}:host{display:block}.wrapper{position:absolute;width:100vw;height:100%;top:0;left:0;z-index:500001;display:none}.wrapper.fixed{position:fixed}.wrapper .modal-popup{margin:7.5rem auto 1rem;background-color:var(--color-white);box-shadow:var(--ptc-shadow-large);max-width:22.5625rem;width:80%;display:flex;flex-direction:column;align-items:flex-end;align-content:flex-end;z-index:50020;transform:translateY(-100%)}@media only screen and (min-width: 992px){.wrapper .modal-popup{max-width:29.125rem}}.wrapper .modal-popup.md{max-width:44.125rem}.wrapper .modal-popup.lg{max-width:56.25rem}.wrapper .modal-popup.xl{max-width:64.0625rem}.wrapper .modal-popup.max{width:calc(100% - 4rem);max-width:75rem;height:80vh;margin:auto;overflow:hidden}.wrapper .modal-popup.max .close{margin:var(--ptc-element-spacing-03) var(--ptc-element-spacing-06)}.wrapper .modal-popup.max .modal-body iframe{height:100%}.wrapper .modal-popup .modal-body{width:100%}.wrapper .modal-popup .modal-body iframe{opacity:0;overflow:hidden;width:100%;border:0;transition:opacity var(--ptc-ease-inout) var(--ptc-transition-medium)}.wrapper .modal-popup .modal-body iframe.ready{opacity:1}.wrapper .modal-popup .modal-body.frame{overflow:hidden;overflow-y:hidden;overflow-x:hidden}.wrapper .modal-popup .modal-body.html{overflow:hidden}.wrapper .modal-popup.frame .modal-body{display:flex;flex:1;height:100%}.wrapper .modal-popup .close{margin-right:var(--ptc-element-spacing-03);margin-top:var(--ptc-element-spacing-03)}.wrapper .modal-popup.shadow-scroller{max-height:calc(100vh - 220px)}@media only screen and (min-width: 992px){.wrapper .modal-popup.shadow-scroller{max-height:756px}}.wrapper .modal-popup.shadow-scroller .modal-header{transition:box-shadow ease-in-out 250ms;position:relative;min-height:57px;border-bottom:1px solid var(--color-gray-02);width:100%}.wrapper .modal-popup.shadow-scroller .modal-header .close{position:absolute;top:var(--spacing-md);right:var(--spacing-md);margin:0}.wrapper .modal-popup.shadow-scroller .modal-body{min-height:200px;overflow-x:hidden}.wrapper .modal-popup.shadow-scroller .modal-footer{transition:box-shadow ease-in-out 250ms;width:100%;min-height:60px;border-top:1px solid var(--color-gray-02);padding-top:1rem}.wrapper .modal-popup.shadow-scroller.scroll-top .modal-header{box-shadow:0px 4px 12px rgba(0, 0, 0, 0.12)}.wrapper .modal-popup.shadow-scroller.scroll-bottom .modal-footer{box-shadow:0px -8px 12px rgba(0, 0, 0, 0.12)}.wrapper.show{display:flex;align-items:flex-start}.wrapper.show .modal-popup{transform:translateY(0)}.wrapper.show .modal-popup.rounded{border-radius:var(--ptc-border-radius-standard)}.overlay{width:100vw;height:100vh;position:fixed;top:0;left:0;z-index:50010;display:block;background-color:rgba(0, 0, 0, 0.6)}:host(.standard) .modal-popup{border-radius:var(--ptc-border-radius-standard)}:host(.large) .modal-popup{border-radius:var(--ptc-border-radius-large)}:host(.pill) .modal-popup{border-radius:var(--ptc-border-radius-pill)}:host(.circle) .modal-popup{border-radius:var(--ptc-border-radius-circle)}:host(.enclose-modal) .modal-popup{max-height:calc(100vh - 180px)}:host(.enclose-modal) .modal-popup:not(.frame){overflow-y:auto}:host(.bio-modal) .wrapper.show{align-items:flex-start}@media only screen and (min-width: 768px){:host(.bio-modal) .wrapper.show{align-items:center}}:host(.bio-modal) .modal-popup{padding:30px 15px 30px 0;max-width:1200px;margin:20px auto 0 auto;max-height:calc(100vh - 180px);width:90%;height:100%}:host(.bio-modal) .modal-popup .modal-body{height:100%}@media only screen and (min-width: 768px){:host(.bio-modal) .modal-popup .modal-body{height:auto}}@media (max-height: 450px){:host(.bio-modal) .modal-popup .modal-body{height:100%}}@media only screen and (min-width: 768px){:host(.bio-modal) .modal-popup{max-height:none;width:80%;margin-top:0px;height:auto}}@media only screen and (min-width: 1440px){:host(.bio-modal) .modal-popup{max-width:1400px}}@media (max-height: 450px){:host(.bio-modal) .modal-popup{max-height:calc(100vh - 180px);height:100%}}:host(.bio-modal) .close{position:absolute;margin:0;right:15px;top:30px}:host(.bio-modal) .close svg .cls-1,:host(.bio-modal) .close svg .cls-2{fill:none;stroke-width:2px}:host(.bio-modal) .close svg .cls-1{stroke:#1c2439;stroke-linecap:square}:host(.bio-modal) .close svg .cls-2{stroke:#74c34d}:host(.bio-modal) .close svg path{transition:all ease-in-out 250ms}:host(.bio-modal) .close svg .cls-1:nth-child(1){transform:translate(175.5px, 135.5px)}:host(.bio-modal) .close svg .cls-1:nth-child(2){transform:translate(175.5px, 174.985px)}:host(.bio-modal) .close svg .cls-1:nth-child(3){transform:translate(215.5px, 141.393px)}:host(.bio-modal) .close svg .cls-1:nth-child(4){transform:translate(175.5px, 135.5px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(1){transform:translate(175.5px, 162px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(2){transform:translate(149px, 174.985px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(3){transform:translate(215.5px, 174px)}:host(.bio-modal) .close:hover svg .cls-1:nth-child(4){transform:translate(152.5px, 135.5px)}:host(.no-container) .wrapper .modal-popup.xl{max-width:80rem !important;background:transparent;box-shadow:none}:host(.no-container) .wrapper .modal-popup .close{display:none}";
|
|
520
1024
|
|
|
521
1025
|
const PtcModal = class {
|
|
522
1026
|
constructor(hostRef) {
|
|
@@ -531,6 +1035,7 @@ const PtcModal = class {
|
|
|
531
1035
|
this.keepInViewport = false;
|
|
532
1036
|
this.closeOnBlur = false;
|
|
533
1037
|
this.rounded = false;
|
|
1038
|
+
this.hideContainer = false;
|
|
534
1039
|
this.showHeaderFooter = false;
|
|
535
1040
|
this.overlayHeight = undefined;
|
|
536
1041
|
this.borderRadius = 'standard';
|
|
@@ -675,6 +1180,7 @@ const PtcModal = class {
|
|
|
675
1180
|
}
|
|
676
1181
|
getCssClassMap() {
|
|
677
1182
|
return {
|
|
1183
|
+
["no-container"]: this.hideContainer,
|
|
678
1184
|
["bio-modal"]: this.isBioModal,
|
|
679
1185
|
["enclose-modal"]: !this.isBioModal && this.keepInViewport,
|
|
680
1186
|
[this.borderRadius]: true
|
|
@@ -1317,6 +1823,7 @@ exports.ptc_card = PtcCard;
|
|
|
1317
1823
|
exports.ptc_date = PtcDate;
|
|
1318
1824
|
exports.ptc_img = PtcImg;
|
|
1319
1825
|
exports.ptc_link = PtcLink;
|
|
1826
|
+
exports.ptc_mobile_select = PtcMobileSelect;
|
|
1320
1827
|
exports.ptc_modal = PtcModal;
|
|
1321
1828
|
exports.ptc_para = PtcPara;
|
|
1322
1829
|
exports.ptc_picture = PtcPicture;
|