genus-ui 1.90.20 → 1.91.20
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.es.js +192 -196
- package/dist/index.umd.js +51 -51
- package/package.json +1 -1
- package/types/genus-chart/index.d.ts +3 -3
- package/types/genus-checkbox/index.d.ts +1 -1
- package/types/genus-dropdown-select/genus-dropdown.d.ts +2 -3
- package/types/genus-file-upload/index.d.ts +1 -1
- package/types/genus-step-wizard/genus-step-wizard.d.ts +6 -11
- package/types/genus-table/genus-table.d.ts +10 -10
- package/types/genus-tabs/genus-tab-container.d.ts +6 -7
- package/types/genus-textarea/index.d.ts +1 -1
- package/types/genus-textbox/index.d.ts +9 -9
- package/types/genus-toast-message/index.d.ts +1 -1
package/dist/index.es.js
CHANGED
|
@@ -428,30 +428,30 @@ var Ra = Object.defineProperty, ja = Object.getOwnPropertyDescriptor, _ = (i, t,
|
|
|
428
428
|
};
|
|
429
429
|
let K = class extends tt {
|
|
430
430
|
constructor() {
|
|
431
|
-
super(), this.labelText = "", this.inputValue = "", this.inputType = "text", this.inputName = "", this.inputIcon = "", this.placeholderText = "", this.withoutIcon = !1, this.withoutLabel = !1, this.withoutLabelIcon = !1, this.readOnly = !1, this.displayPosition = "bottom", this.getInputValue = (i) => {
|
|
431
|
+
super(), this.labelText = "", this.inputValue = "", this.inputType = "text", this.inputName = "", this.inputIcon = "", this.placeholderText = "", this.withoutIcon = !1, this.withoutLabel = !1, this.withoutLabelIcon = !1, this.readOnly = !1, this.displayPosition = "bottom", this._monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], this._currentMonth = (/* @__PURE__ */ new Date()).getMonth(), this._currentYear = (/* @__PURE__ */ new Date()).getFullYear(), this._currentDate = /* @__PURE__ */ new Date(), this._targetInput = null, this._showMonthsCssClass = "", this._showCalenderCssClass = "", this.getInputValue = (i) => {
|
|
432
432
|
this._targetInput === null && (this._targetInput = i.target), this.inputValue = this._targetInput.value, this._internals.setFormValue(this._targetInput.value), this.dispatchEvent(new CustomEvent("typed", { detail: i.target.value }));
|
|
433
|
-
}, this.
|
|
433
|
+
}, this.isLeapYear = (i) => i % 4 === 0 && i % 100 !== 0 && i % 400 !== 0 || i % 100 === 0 && i % 400 === 0, this.getFebDays = (i) => this.isLeapYear(i) ? 29 : 28, this.toggleCalendar = () => {
|
|
434
434
|
this._showCalenderCssClass = this._showCalenderCssClass ? "" : `calendar-${this.displayPosition}--show`;
|
|
435
|
-
}, this.
|
|
435
|
+
}, this.selectDate = (i) => {
|
|
436
436
|
let t = new Date(this._currentYear, this._currentMonth, Number(i));
|
|
437
437
|
this.inputValue = `${t.toLocaleString("default", { weekday: "long" })}, ${i} ${this._monthNames[t.getMonth()]} ${this._currentYear}`, this._internals.setFormValue(t.toString()), this.dispatchEvent(new CustomEvent("selected", { detail: { chosenDate: t, formattedDate: this.inputValue } })), this._showCalenderCssClass = "";
|
|
438
|
-
}, this.
|
|
439
|
-
const e = [31, this.
|
|
438
|
+
}, this.generateDays = (i, t) => {
|
|
439
|
+
const e = [31, this.getFebDays(t), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
440
440
|
let s = new Date(t, i, 1), n = document.createElement("div");
|
|
441
441
|
n.classList.add("dates");
|
|
442
442
|
for (let o = 0; o <= e[i] + s.getDay() - 1; o++) {
|
|
443
443
|
let a = document.createElement("div");
|
|
444
444
|
o >= s.getDay() && (a.classList.add("date"), a.innerHTML = (o - s.getDay() + 1).toString(), o - s.getDay() + 1 === this._currentDate.getDate() && t === this._currentDate.getFullYear() && i === this._currentDate.getMonth() && a.classList.add("current-date")), a.addEventListener("click", (r) => {
|
|
445
|
-
this.
|
|
445
|
+
this.selectDate(r.target.innerHTML), r.target.classList.add("date--selected");
|
|
446
446
|
}), n.appendChild(a);
|
|
447
447
|
}
|
|
448
448
|
return n;
|
|
449
|
-
}, this.
|
|
450
|
-
this._currentMonth = i, this._showMonthsCssClass = "", this.
|
|
451
|
-
}, this.
|
|
452
|
-
--this._currentYear, this.
|
|
453
|
-
}, this.
|
|
454
|
-
++this._currentYear, this.
|
|
449
|
+
}, this.setMonth = (i) => {
|
|
450
|
+
this._currentMonth = i, this._showMonthsCssClass = "", this.generateDays(this._currentMonth, this._currentYear);
|
|
451
|
+
}, this.previousYear = () => {
|
|
452
|
+
--this._currentYear, this.generateDays(this._currentMonth, this._currentYear);
|
|
453
|
+
}, this.nextYear = () => {
|
|
454
|
+
++this._currentYear, this.generateDays(this._currentMonth, this._currentYear);
|
|
455
455
|
}, this.renderInputControl = (i) => ({
|
|
456
456
|
text: () => {
|
|
457
457
|
let e;
|
|
@@ -550,7 +550,7 @@ let K = class extends tt {
|
|
|
550
550
|
return this.withoutLabel ? e = B`
|
|
551
551
|
<div class='date-picker'>
|
|
552
552
|
<div class='form-field form-field--without-label'>
|
|
553
|
-
<input class='input-control date-control' type='text' @click=${this.
|
|
553
|
+
<input class='input-control date-control' type='text' @click=${this.toggleCalendar} value=${this.inputValue} placeholder=${this.placeholderText} readonly />
|
|
554
554
|
<div class='icon-container'>
|
|
555
555
|
<img class="component-icon" src='${this.inputIcon || Hs}' />
|
|
556
556
|
</div>
|
|
@@ -561,11 +561,11 @@ let K = class extends tt {
|
|
|
561
561
|
this._showMonthsCssClass = "month-list--show";
|
|
562
562
|
}}>${this._monthNames[this._currentMonth]}</span>
|
|
563
563
|
<div class="year-picker">
|
|
564
|
-
<span class='year-navigation-button' @click=${this.
|
|
564
|
+
<span class='year-navigation-button' @click=${this.previousYear}>
|
|
565
565
|
<img class="component-icon year-change-icon prev-year-icon" src='${Ns}' />
|
|
566
566
|
</span>
|
|
567
567
|
<span class="year">${this._currentYear}</span>
|
|
568
|
-
<span class='year-navigation-button' @click=${this.
|
|
568
|
+
<span class='year-navigation-button' @click=${this.nextYear}>
|
|
569
569
|
<img class="component-icon year-change-icon next-year-icon" src='${Vs}' />
|
|
570
570
|
</span>
|
|
571
571
|
</div>
|
|
@@ -580,11 +580,11 @@ let K = class extends tt {
|
|
|
580
580
|
<span>Fri</span>
|
|
581
581
|
<span>Sat</span>
|
|
582
582
|
</div>
|
|
583
|
-
${this.
|
|
583
|
+
${this.generateDays(this._currentMonth, this._currentYear)}
|
|
584
584
|
</div>
|
|
585
585
|
<div class='month-list ${this._showMonthsCssClass}'>
|
|
586
586
|
${this._monthNames.map((s, n) => B`<span class="month" @click=${() => {
|
|
587
|
-
this.
|
|
587
|
+
this.setMonth(n);
|
|
588
588
|
}}>${s}</span>`)}
|
|
589
589
|
</div>
|
|
590
590
|
</div>
|
|
@@ -593,7 +593,7 @@ let K = class extends tt {
|
|
|
593
593
|
<div class='date-picker'>
|
|
594
594
|
<div class='form-field'>
|
|
595
595
|
<label class='input-label'>${this.labelText}</label>
|
|
596
|
-
<input class='input-control date-control' type='text' @click=${this.
|
|
596
|
+
<input class='input-control date-control' type='text' @click=${this.toggleCalendar} value=${this.inputValue} placeholder=${this.placeholderText} readonly />
|
|
597
597
|
<div class='icon-container'>
|
|
598
598
|
<img class="component-icon" src='${this.inputIcon || Hs}' />
|
|
599
599
|
</div>
|
|
@@ -604,11 +604,11 @@ let K = class extends tt {
|
|
|
604
604
|
this._showMonthsCssClass = "month-list--show";
|
|
605
605
|
}}>${this._monthNames[this._currentMonth]}</span>
|
|
606
606
|
<div class="year-picker">
|
|
607
|
-
<span class='year-navigation-button' @click=${this.
|
|
607
|
+
<span class='year-navigation-button' @click=${this.previousYear}>
|
|
608
608
|
<img class="component-icon year-change-icon prev-year-icon" src='${Ns}' />
|
|
609
609
|
</span>
|
|
610
610
|
<span class="year">${this._currentYear}</span>
|
|
611
|
-
<span class='year-navigation-button' @click=${this.
|
|
611
|
+
<span class='year-navigation-button' @click=${this.nextYear}>
|
|
612
612
|
<img class="component-icon year-change-icon next-year-icon" src='${Vs}' />
|
|
613
613
|
</span>
|
|
614
614
|
</div>
|
|
@@ -623,11 +623,11 @@ let K = class extends tt {
|
|
|
623
623
|
<span>Fri</span>
|
|
624
624
|
<span>Sat</span>
|
|
625
625
|
</div>
|
|
626
|
-
${this.
|
|
626
|
+
${this.generateDays(this._currentMonth, this._currentYear)}
|
|
627
627
|
</div>
|
|
628
628
|
<div class='month-list ${this._showMonthsCssClass}'>
|
|
629
629
|
${this._monthNames.map((s, n) => B`<span class="month" @click=${() => {
|
|
630
|
-
this.
|
|
630
|
+
this.setMonth(n);
|
|
631
631
|
}}>${s}</span>`)}
|
|
632
632
|
</div>
|
|
633
633
|
</div>
|
|
@@ -698,7 +698,7 @@ _([
|
|
|
698
698
|
], K.prototype, "_showCalenderCssClass", 2);
|
|
699
699
|
_([
|
|
700
700
|
J()
|
|
701
|
-
], K.prototype, "
|
|
701
|
+
], K.prototype, "generateDays", 2);
|
|
702
702
|
K = _([
|
|
703
703
|
et("genus-textbox")
|
|
704
704
|
], K);
|
|
@@ -791,32 +791,31 @@ var Ka = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, Be = (i, t
|
|
|
791
791
|
};
|
|
792
792
|
let zt = class extends tt {
|
|
793
793
|
constructor() {
|
|
794
|
-
super(...arguments), this.
|
|
794
|
+
super(...arguments), this.tabNames = [], this.withBorderBottom = !1, this._numberOfTabs = 0, this._tabsTemplate = [], this.hideCurrentContent = () => {
|
|
795
795
|
this._tabContents.forEach((i) => {
|
|
796
796
|
i.classList.contains("show-content") && i.classList.remove("show-content");
|
|
797
797
|
});
|
|
798
|
-
}, this.
|
|
799
|
-
this.
|
|
800
|
-
}, this.
|
|
801
|
-
this._tabNames = this.tabNames;
|
|
798
|
+
}, this.showContent = (i) => {
|
|
799
|
+
this.hideCurrentContent(), this._tabContents[i].classList.add("show-content");
|
|
800
|
+
}, this.generateTabs = () => {
|
|
802
801
|
for (let i = 0; i < this._numberOfTabs; i++)
|
|
803
802
|
i === 0 ? this._tabsTemplate.push(B`
|
|
804
|
-
<input class="tab-radio" id=${this.
|
|
805
|
-
this.
|
|
803
|
+
<input class="tab-radio" id=${this.tabNames[i]} type="radio" name="tabGroup" @change=${() => {
|
|
804
|
+
this.showContent(i);
|
|
806
805
|
}} checked/>
|
|
807
|
-
<label class="tab ${this.
|
|
806
|
+
<label class="tab ${this.tabNames[i]}-tab" for=${this.tabNames[i]}>${this.tabNames[i] = this.tabNames[i].replace(/-/g, " ")}</label>
|
|
808
807
|
`) : this._tabsTemplate.push(B`
|
|
809
|
-
<input class="tab-radio" id=${this.
|
|
810
|
-
this.
|
|
808
|
+
<input class="tab-radio" id=${this.tabNames[i]} type="radio" name="tabGroup" @change=${() => {
|
|
809
|
+
this.showContent(i);
|
|
811
810
|
}}/>
|
|
812
|
-
<label class="tab ${this.
|
|
811
|
+
<label class="tab ${this.tabNames[i]}-tab" for=${this.tabNames[i]}>${this.tabNames[i] = this.tabNames[i].replace(/-/g, " ")}</label>
|
|
813
812
|
`);
|
|
814
813
|
};
|
|
815
814
|
}
|
|
816
815
|
firstUpdated() {
|
|
817
816
|
this._tabContents.forEach((i) => {
|
|
818
817
|
i.classList.add("hide-content");
|
|
819
|
-
}), this._tabContents[0].classList.add("show-content"), this._numberOfTabs = this._tabContents.length, this.
|
|
818
|
+
}), this._tabContents[0].classList.add("show-content"), this._numberOfTabs = this._tabContents.length, this.generateTabs();
|
|
820
819
|
}
|
|
821
820
|
render() {
|
|
822
821
|
return B`
|
|
@@ -830,6 +829,12 @@ let zt = class extends tt {
|
|
|
830
829
|
}
|
|
831
830
|
};
|
|
832
831
|
zt.styles = [Ha, Na, Fa, Va, Wa, Za];
|
|
832
|
+
Be([
|
|
833
|
+
G({ attribute: "tab-names", type: Array })
|
|
834
|
+
], zt.prototype, "tabNames", 2);
|
|
835
|
+
Be([
|
|
836
|
+
G({ attribute: "with-border-bottom", type: Boolean })
|
|
837
|
+
], zt.prototype, "withBorderBottom", 2);
|
|
833
838
|
Be([
|
|
834
839
|
wo()
|
|
835
840
|
], zt.prototype, "_tabContents", 2);
|
|
@@ -839,12 +844,6 @@ Be([
|
|
|
839
844
|
Be([
|
|
840
845
|
J()
|
|
841
846
|
], zt.prototype, "_tabsTemplate", 2);
|
|
842
|
-
Be([
|
|
843
|
-
G({ attribute: "tab-names", type: Array })
|
|
844
|
-
], zt.prototype, "tabNames", 2);
|
|
845
|
-
Be([
|
|
846
|
-
G({ attribute: "with-border-bottom", type: Boolean })
|
|
847
|
-
], zt.prototype, "withBorderBottom", 2);
|
|
848
847
|
zt = Be([
|
|
849
848
|
et("genus-tab-container")
|
|
850
849
|
], zt);
|
|
@@ -1007,20 +1006,20 @@ var tr = Object.defineProperty, er = Object.getOwnPropertyDescriptor, xt = (i, t
|
|
|
1007
1006
|
};
|
|
1008
1007
|
let gt = class extends tt {
|
|
1009
1008
|
constructor() {
|
|
1010
|
-
super(...arguments), this.currentStep = 0, this.displayMode = "mobile", this.titles = [], this.direction = "", this.
|
|
1011
|
-
this.
|
|
1009
|
+
super(...arguments), this.currentStep = 0, this.displayMode = "mobile", this.titles = [], this.direction = "", this._progressBarsTemplate = [], this._steps = 0, this._circumference = 0, this._titlesRef = [], this.hideCurrentContent = () => {
|
|
1010
|
+
this._stepContents.forEach((i) => {
|
|
1012
1011
|
i.classList.contains("show-content") && i.classList.remove("show-content");
|
|
1013
1012
|
});
|
|
1014
1013
|
}, this.changeStep = () => {
|
|
1015
|
-
this.hideCurrentContent(), this.
|
|
1014
|
+
this.hideCurrentContent(), this._stepContents[this.currentStep].classList.add("show-content"), this.displayMode === "mobile" && this.setProgress((this.currentStep + 1) * (100 / this._steps));
|
|
1016
1015
|
}, this.setProgressBar = () => {
|
|
1017
1016
|
let i = 0;
|
|
1018
|
-
i = this.
|
|
1017
|
+
i = this._circularProgressBar.r.baseVal.value, this._circumference = 2 * Math.PI * i, this._circularProgressBar.style.strokeDasharray = this._circumference.toString();
|
|
1019
1018
|
}, this.setProgress = (i) => {
|
|
1020
|
-
this.
|
|
1019
|
+
this._circularProgressBar.style.strokeDashoffset = (this._circumference - i / 100 * this._circumference).toString();
|
|
1021
1020
|
}, this.generateProgressBars = (i) => {
|
|
1022
|
-
for (let t = 0; t < this.
|
|
1023
|
-
this.
|
|
1021
|
+
for (let t = 0; t < this._steps; t++)
|
|
1022
|
+
this._progressBarsTemplate.push(
|
|
1024
1023
|
B`
|
|
1025
1024
|
<div class='progress-bar-wrapper'>
|
|
1026
1025
|
<div class='progress-bar'>
|
|
@@ -1029,7 +1028,7 @@ let gt = class extends tt {
|
|
|
1029
1028
|
</div>
|
|
1030
1029
|
`
|
|
1031
1030
|
);
|
|
1032
|
-
this.
|
|
1031
|
+
this._progressBarsTemplate.length > 0 && (this._progressBarsTemplate[this.currentStep] = B`
|
|
1033
1032
|
<div class='progress-bar-wrapper'>
|
|
1034
1033
|
<div class='progress-bar current'>
|
|
1035
1034
|
<h4 class="step-title">${i[this.currentStep].stepTitle}</h4>
|
|
@@ -1039,31 +1038,31 @@ let gt = class extends tt {
|
|
|
1039
1038
|
};
|
|
1040
1039
|
}
|
|
1041
1040
|
firstUpdated() {
|
|
1042
|
-
this.
|
|
1041
|
+
this._stepContents.forEach((i) => {
|
|
1043
1042
|
i.classList.add("hide-content");
|
|
1044
|
-
}), this.
|
|
1043
|
+
}), this._stepContents[this.currentStep].classList.add("show-content"), this._steps = this._stepContents.length, this.displayMode === "mobile" && (this.setProgressBar(), this.setProgress((this.currentStep + 1) * (100 / this._steps))), this.displayMode === "web" && this.generateProgressBars(this._titlesRef);
|
|
1045
1044
|
}
|
|
1046
1045
|
updated() {
|
|
1047
1046
|
this.changeStep();
|
|
1048
1047
|
}
|
|
1049
1048
|
render() {
|
|
1050
|
-
return this.direction === "next" && (this.
|
|
1049
|
+
return this.direction === "next" && (this._progressBarsTemplate[this.currentStep] = B`
|
|
1051
1050
|
<div class='progress-bar-wrapper'>
|
|
1052
1051
|
<div class='progress-bar current'>
|
|
1053
|
-
<h4 class="step-title">${this.
|
|
1052
|
+
<h4 class="step-title">${this._titlesRef[this.currentStep].stepTitle}</h4>
|
|
1054
1053
|
</div>
|
|
1055
1054
|
</div>
|
|
1056
|
-
`), this.direction === "prev" && (this.
|
|
1055
|
+
`), this.direction === "prev" && (this._progressBarsTemplate[this.currentStep + 1] = B`
|
|
1057
1056
|
<div class='progress-bar-wrapper'>
|
|
1058
1057
|
<div class='progress-bar'>
|
|
1059
|
-
<h4 class="step-title">${this.
|
|
1058
|
+
<h4 class="step-title">${this._titlesRef[this.currentStep + 1].stepTitle}</h4>
|
|
1060
1059
|
</div>
|
|
1061
1060
|
</div>
|
|
1062
1061
|
`), B`
|
|
1063
|
-
<div class='
|
|
1062
|
+
<div class='_steps-container'>
|
|
1064
1063
|
${ee(
|
|
1065
1064
|
this.displayMode === "mobile",
|
|
1066
|
-
() => (this.
|
|
1065
|
+
() => (this._titlesRef = this.titles, B`
|
|
1067
1066
|
<div class="progress-container progress-container--mobile">
|
|
1068
1067
|
<div class="progress-content">
|
|
1069
1068
|
<svg class="progress-svg">
|
|
@@ -1071,19 +1070,19 @@ let gt = class extends tt {
|
|
|
1071
1070
|
<circle class="circular-progress-bar" r="30" cx="34" cy="34"></circle>
|
|
1072
1071
|
</svg>
|
|
1073
1072
|
<div class="progress-info">
|
|
1074
|
-
<p class="step-number"><span>${this.currentStep + 1} </span>of <span class="total-
|
|
1073
|
+
<p class="step-number"><span>${this.currentStep + 1} </span>of <span class="total-_steps">${this._steps}</span></p>
|
|
1075
1074
|
</div>
|
|
1076
1075
|
</div>
|
|
1077
1076
|
|
|
1078
1077
|
<div class="step-info">
|
|
1079
|
-
<h4 class="step-title">${this.
|
|
1080
|
-
<p class="step-description">${this.
|
|
1078
|
+
<h4 class="step-title">${this._titlesRef[this.currentStep].stepTitle}</h4>
|
|
1079
|
+
<p class="step-description">${this._titlesRef[this.currentStep].stepSubtitle}</p>
|
|
1081
1080
|
</div>
|
|
1082
1081
|
</div>
|
|
1083
1082
|
`),
|
|
1084
|
-
() => (this.
|
|
1083
|
+
() => (this._titlesRef = this.titles, B`
|
|
1085
1084
|
<div class="progress-container progress-container--web">
|
|
1086
|
-
<div class='progress-bars'>${this.
|
|
1085
|
+
<div class='progress-bars'>${this._progressBarsTemplate}</div>
|
|
1087
1086
|
<svg style="visibility: hidden; position: absolute;" width="0" height="0" xmlns="http://www.w3.org/2000/svg" version="1.1">
|
|
1088
1087
|
<defs>
|
|
1089
1088
|
<filter id="goo">
|
|
@@ -1121,19 +1120,19 @@ xt([
|
|
|
1121
1120
|
], gt.prototype, "direction", 2);
|
|
1122
1121
|
xt([
|
|
1123
1122
|
wo()
|
|
1124
|
-
], gt.prototype, "
|
|
1123
|
+
], gt.prototype, "_stepContents", 2);
|
|
1125
1124
|
xt([
|
|
1126
1125
|
J()
|
|
1127
|
-
], gt.prototype, "
|
|
1126
|
+
], gt.prototype, "_progressBarsTemplate", 2);
|
|
1128
1127
|
xt([
|
|
1129
1128
|
J()
|
|
1130
|
-
], gt.prototype, "
|
|
1129
|
+
], gt.prototype, "_steps", 2);
|
|
1131
1130
|
xt([
|
|
1132
1131
|
J()
|
|
1133
|
-
], gt.prototype, "
|
|
1132
|
+
], gt.prototype, "_circumference", 2);
|
|
1134
1133
|
xt([
|
|
1135
1134
|
Ti(".circular-progress-bar")
|
|
1136
|
-
], gt.prototype, "
|
|
1135
|
+
], gt.prototype, "_circularProgressBar", 2);
|
|
1137
1136
|
gt = xt([
|
|
1138
1137
|
et("genus-step-wizard")
|
|
1139
1138
|
], gt);
|
|
@@ -1274,7 +1273,7 @@ var ur = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, Zt = (i, t
|
|
|
1274
1273
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
1275
1274
|
return s && n && ur(t, e, n), n;
|
|
1276
1275
|
};
|
|
1277
|
-
let
|
|
1276
|
+
let mt = class extends tt {
|
|
1278
1277
|
constructor() {
|
|
1279
1278
|
super(), this.labelText = "", this.options = [], this.inputName = "", this.selectedOption = "", this.checkedRadioIcon = "", this.uncheckedRadioIcon = "", this.withoutIcon = !1, this.getCheckedValue = (i) => {
|
|
1280
1279
|
let t = i.target;
|
|
@@ -1310,32 +1309,32 @@ let Mt = class extends tt {
|
|
|
1310
1309
|
`;
|
|
1311
1310
|
}
|
|
1312
1311
|
};
|
|
1313
|
-
|
|
1314
|
-
|
|
1312
|
+
mt.styles = [or, ar, lr, rr, Ar, hr, cr];
|
|
1313
|
+
mt.formAssociated = !0;
|
|
1315
1314
|
Zt([
|
|
1316
1315
|
G({ attribute: "label-text" })
|
|
1317
|
-
],
|
|
1316
|
+
], mt.prototype, "labelText", 2);
|
|
1318
1317
|
Zt([
|
|
1319
1318
|
G({ attribute: "options", type: Array })
|
|
1320
|
-
],
|
|
1319
|
+
], mt.prototype, "options", 2);
|
|
1321
1320
|
Zt([
|
|
1322
1321
|
G({ attribute: "name", reflect: !0 })
|
|
1323
|
-
],
|
|
1322
|
+
], mt.prototype, "inputName", 2);
|
|
1324
1323
|
Zt([
|
|
1325
1324
|
G({ attribute: "selected-option" })
|
|
1326
|
-
],
|
|
1325
|
+
], mt.prototype, "selectedOption", 2);
|
|
1327
1326
|
Zt([
|
|
1328
1327
|
G({ attribute: "checked-radio-icon" })
|
|
1329
|
-
],
|
|
1328
|
+
], mt.prototype, "checkedRadioIcon", 2);
|
|
1330
1329
|
Zt([
|
|
1331
1330
|
G({ attribute: "unchecked-radio-icon" })
|
|
1332
|
-
],
|
|
1331
|
+
], mt.prototype, "uncheckedRadioIcon", 2);
|
|
1333
1332
|
Zt([
|
|
1334
1333
|
G({ attribute: "without-icon", type: Boolean })
|
|
1335
|
-
],
|
|
1336
|
-
|
|
1334
|
+
], mt.prototype, "withoutIcon", 2);
|
|
1335
|
+
mt = Zt([
|
|
1337
1336
|
et("genus-radiobtn-group")
|
|
1338
|
-
],
|
|
1337
|
+
], mt);
|
|
1339
1338
|
const pr = x`
|
|
1340
1339
|
*
|
|
1341
1340
|
{
|
|
@@ -1952,14 +1951,14 @@ const jr = x`
|
|
|
1952
1951
|
justify-content: center;
|
|
1953
1952
|
}
|
|
1954
1953
|
`, ni = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIconly/Light/Arrow%20-%20Down%202%3c/title%3e%3cg%20id='Iconly/Light/Arrow---Down-2'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cg%20id='Arrow---Down-2'%20transform='translate(5.000000,%208.500000)'%20stroke='%23203e70'%20stroke-width='1.25'%3e%3cpolyline%20id='Stroke-1'%20points='14%200%207%207%200%200'%3e%3c/polyline%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
1955
|
-
var Zr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor,
|
|
1954
|
+
var Zr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, Dt = (i, t, e, s) => {
|
|
1956
1955
|
for (var n = s > 1 ? void 0 : s ? Kr(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
1957
1956
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
1958
1957
|
return s && n && Zr(t, e, n), n;
|
|
1959
1958
|
};
|
|
1960
|
-
let
|
|
1959
|
+
let rt = class extends tt {
|
|
1961
1960
|
constructor() {
|
|
1962
|
-
super(), this.labelText = "", this.inputValue = "", this.inputName = "", this.placeholderText = "", this.searchPlaceholderText = "", this.
|
|
1961
|
+
super(), this.labelText = "", this.inputValue = "", this.inputName = "", this.placeholderText = "", this.searchPlaceholderText = "", this.withoutLabel = !1, this.withFilter = !1, this.displayPosition = "bottom", this.inputIconSrc = "", this._showOptionsCSS = "", this.selectOption = (i) => {
|
|
1963
1962
|
let t = i.target.getAttribute("option-value");
|
|
1964
1963
|
this._showOptionsCSS = "", this.inputValue = t, this._internals.setFormValue(t), this.dispatchEvent(new CustomEvent("selected", { detail: t }));
|
|
1965
1964
|
}, this.getInputValue = (i) => {
|
|
@@ -1969,7 +1968,7 @@ let at = class extends tt {
|
|
|
1969
1968
|
return this.withoutLabel ? this.withFilter ? i = B`
|
|
1970
1969
|
<div class='drop-down'>
|
|
1971
1970
|
<div class='form-field form-field--without-label'>
|
|
1972
|
-
<input class='input-control select-control' type='text' @click=${this.
|
|
1971
|
+
<input class='input-control select-control' type='text' @click=${this.toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} name=${this.inputName} readonly />
|
|
1973
1972
|
<div class='icon-container'>
|
|
1974
1973
|
<img class="component-icon" src='${this.inputIconSrc || ni}' />
|
|
1975
1974
|
</div>
|
|
@@ -1985,7 +1984,7 @@ let at = class extends tt {
|
|
|
1985
1984
|
</div>` : i = B`
|
|
1986
1985
|
<div class='drop-down'>
|
|
1987
1986
|
<div class='form-field form-field--without-label'>
|
|
1988
|
-
<input class='input-control select-control' type='text' @click=${this.
|
|
1987
|
+
<input class='input-control select-control' type='text' @click=${this.toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} name=${this.inputName} readonly />
|
|
1989
1988
|
<div class='icon-container'>
|
|
1990
1989
|
<img class="component-icon" src='${this.inputIconSrc || ni}' />
|
|
1991
1990
|
</div>
|
|
@@ -1997,7 +1996,7 @@ let at = class extends tt {
|
|
|
1997
1996
|
<div class='drop-down drop-down--with-filter'>
|
|
1998
1997
|
<div class='form-field'>
|
|
1999
1998
|
<label class='input-label'>${this.labelText}</label>
|
|
2000
|
-
<input class='input-control select-control' type='text' @click=${this.
|
|
1999
|
+
<input class='input-control select-control' type='text' @click=${this.toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} name=${this.inputName} readonly />
|
|
2001
2000
|
<div class='icon-container'>
|
|
2002
2001
|
<img class="component-icon" src='${this.inputIconSrc || ni}' />
|
|
2003
2002
|
</div>
|
|
@@ -2014,7 +2013,7 @@ let at = class extends tt {
|
|
|
2014
2013
|
<div class='drop-down'>
|
|
2015
2014
|
<div class='form-field'>
|
|
2016
2015
|
<label class='input-label'>${this.labelText}</label>
|
|
2017
|
-
<input class='input-control select-control' type='text' @click=${this.
|
|
2016
|
+
<input class='input-control select-control' type='text' @click=${this.toggleOptions} placeholder=${this.placeholderText} value=${this.inputValue} name=${this.inputName} readonly />
|
|
2018
2017
|
<div class='icon-container'>
|
|
2019
2018
|
<img class="component-icon" src='${this.inputIconSrc || ni}' />
|
|
2020
2019
|
</div>
|
|
@@ -2023,7 +2022,7 @@ let at = class extends tt {
|
|
|
2023
2022
|
<slot></slot>
|
|
2024
2023
|
</ul>
|
|
2025
2024
|
</div>`, i;
|
|
2026
|
-
}, this.
|
|
2025
|
+
}, this.toggleOptions = () => {
|
|
2027
2026
|
this.withFilter ? this._showOptionsCSS = this._showOptionsCSS ? "" : `filter-container-${this.displayPosition}--show` : this._showOptionsCSS = this._showOptionsCSS ? "" : `options-${this.displayPosition}--show`;
|
|
2028
2027
|
}, this._internals = this.attachInternals();
|
|
2029
2028
|
}
|
|
@@ -2031,44 +2030,41 @@ let at = class extends tt {
|
|
|
2031
2030
|
return this.renderDropDownControl();
|
|
2032
2031
|
}
|
|
2033
2032
|
};
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2033
|
+
rt.styles = [jr, Hr, Fr, Go, Nr, Yo, Vr, Wr];
|
|
2034
|
+
rt.formAssociated = !0;
|
|
2035
|
+
Dt([
|
|
2037
2036
|
G({ attribute: "label-text" })
|
|
2038
|
-
],
|
|
2039
|
-
|
|
2037
|
+
], rt.prototype, "labelText", 2);
|
|
2038
|
+
Dt([
|
|
2040
2039
|
G({ attribute: "input-value" })
|
|
2041
|
-
],
|
|
2042
|
-
|
|
2040
|
+
], rt.prototype, "inputValue", 2);
|
|
2041
|
+
Dt([
|
|
2043
2042
|
G({ attribute: "name", reflect: !0 })
|
|
2044
|
-
],
|
|
2045
|
-
|
|
2043
|
+
], rt.prototype, "inputName", 2);
|
|
2044
|
+
Dt([
|
|
2046
2045
|
G({ attribute: "placeholder-text" })
|
|
2047
|
-
],
|
|
2048
|
-
|
|
2046
|
+
], rt.prototype, "placeholderText", 2);
|
|
2047
|
+
Dt([
|
|
2049
2048
|
G({ attribute: "search-placeholder-text" })
|
|
2050
|
-
],
|
|
2051
|
-
|
|
2052
|
-
G({ attribute: "options", type: Array })
|
|
2053
|
-
], at.prototype, "options", 2);
|
|
2054
|
-
ft([
|
|
2049
|
+
], rt.prototype, "searchPlaceholderText", 2);
|
|
2050
|
+
Dt([
|
|
2055
2051
|
G({ attribute: "without-label", type: Boolean })
|
|
2056
|
-
],
|
|
2057
|
-
|
|
2052
|
+
], rt.prototype, "withoutLabel", 2);
|
|
2053
|
+
Dt([
|
|
2058
2054
|
G({ attribute: "with-filter", type: Boolean })
|
|
2059
|
-
],
|
|
2060
|
-
|
|
2055
|
+
], rt.prototype, "withFilter", 2);
|
|
2056
|
+
Dt([
|
|
2061
2057
|
G({ attribute: "display-position" })
|
|
2062
|
-
],
|
|
2063
|
-
|
|
2058
|
+
], rt.prototype, "displayPosition", 2);
|
|
2059
|
+
Dt([
|
|
2064
2060
|
G({ attribute: "dropdown-icon" })
|
|
2065
|
-
],
|
|
2066
|
-
|
|
2061
|
+
], rt.prototype, "inputIconSrc", 2);
|
|
2062
|
+
Dt([
|
|
2067
2063
|
J()
|
|
2068
|
-
],
|
|
2069
|
-
|
|
2064
|
+
], rt.prototype, "_showOptionsCSS", 2);
|
|
2065
|
+
rt = Dt([
|
|
2070
2066
|
et("genus-dropdown")
|
|
2071
|
-
],
|
|
2067
|
+
], rt);
|
|
2072
2068
|
var Ur = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, xo = (i, t, e, s) => {
|
|
2073
2069
|
for (var n = s > 1 ? void 0 : s ? Xr(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
2074
2070
|
(a = i[o]) && (n = (s ? a(t, e, n) : a(n)) || n);
|
|
@@ -2096,7 +2092,7 @@ We = xo([
|
|
|
2096
2092
|
const Jg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2097
2093
|
__proto__: null,
|
|
2098
2094
|
get GenusDropDown() {
|
|
2099
|
-
return
|
|
2095
|
+
return rt;
|
|
2100
2096
|
},
|
|
2101
2097
|
get GenusDropDownOption() {
|
|
2102
2098
|
return We;
|
|
@@ -2755,7 +2751,7 @@ function ko(i, t, e) {
|
|
|
2755
2751
|
for (s = 0, n = i.length; s < n; s++)
|
|
2756
2752
|
o = i[s][e], isNaN(o) || (t.min = Math.min(t.min, o), t.max = Math.max(t.max, o));
|
|
2757
2753
|
}
|
|
2758
|
-
function
|
|
2754
|
+
function pt(i) {
|
|
2759
2755
|
return i * (F / 180);
|
|
2760
2756
|
}
|
|
2761
2757
|
function xs(i) {
|
|
@@ -3436,7 +3432,7 @@ function se(i) {
|
|
|
3436
3432
|
"bottomRight"
|
|
3437
3433
|
]);
|
|
3438
3434
|
}
|
|
3439
|
-
function
|
|
3435
|
+
function at(i) {
|
|
3440
3436
|
const t = Ho(i);
|
|
3441
3437
|
return t.width = t.left + t.right, t.height = t.top + t.bottom, t;
|
|
3442
3438
|
}
|
|
@@ -4530,7 +4526,7 @@ const Xi = (i) => i === "reset" || i === "none", Dn = (i, t) => t ? i : Object.a
|
|
|
4530
4526
|
keys: ea(e, !0),
|
|
4531
4527
|
values: null
|
|
4532
4528
|
};
|
|
4533
|
-
class
|
|
4529
|
+
class wt {
|
|
4534
4530
|
constructor(t, e) {
|
|
4535
4531
|
this.chart = t, this._ctx = t.ctx, this.index = e, this._cachedDataOpts = {}, this._cachedMeta = this.getMeta(), this._type = this._cachedMeta.type, this.options = void 0, this._parsing = !1, this._data = void 0, this._objectData = void 0, this._sharedOptions = void 0, this._drawStart = void 0, this._drawCount = void 0, this.enableOptionSharing = !1, this.supportsDecimation = !1, this.$context = void 0, this._syncList = [], this.datasetElementType = new.target.datasetElementType, this.dataElementType = new.target.dataElementType, this.initialize();
|
|
4536
4532
|
}
|
|
@@ -4885,7 +4881,7 @@ class mt {
|
|
|
4885
4881
|
]);
|
|
4886
4882
|
}
|
|
4887
4883
|
}
|
|
4888
|
-
Y(
|
|
4884
|
+
Y(wt, "defaults", {}), Y(wt, "datasetElementType", null), Y(wt, "dataElementType", null);
|
|
4889
4885
|
function _l(i, t) {
|
|
4890
4886
|
if (!i._cache.$bar) {
|
|
4891
4887
|
const e = i.getMatchingVisibleMetas(t);
|
|
@@ -4998,7 +4994,7 @@ function Gn(i, t, e) {
|
|
|
4998
4994
|
function rc(i, { inflateAmount: t }, e) {
|
|
4999
4995
|
i.inflateAmount = t === "auto" ? e === 1 ? 0.33 : 0 : t;
|
|
5000
4996
|
}
|
|
5001
|
-
class Mi extends
|
|
4997
|
+
class Mi extends wt {
|
|
5002
4998
|
parsePrimitiveData(t, e, s, n) {
|
|
5003
4999
|
return bn(t, e, s, n);
|
|
5004
5000
|
}
|
|
@@ -5168,7 +5164,7 @@ Y(Mi, "id", "bar"), Y(Mi, "defaults", {
|
|
|
5168
5164
|
}
|
|
5169
5165
|
}
|
|
5170
5166
|
});
|
|
5171
|
-
class Di extends
|
|
5167
|
+
class Di extends wt {
|
|
5172
5168
|
initialize() {
|
|
5173
5169
|
this.enableOptionSharing = !0, super.initialize();
|
|
5174
5170
|
}
|
|
@@ -5266,7 +5262,7 @@ function Ac(i, t, e) {
|
|
|
5266
5262
|
offsetY: a
|
|
5267
5263
|
};
|
|
5268
5264
|
}
|
|
5269
|
-
class ie extends
|
|
5265
|
+
class ie extends wt {
|
|
5270
5266
|
constructor(t, e) {
|
|
5271
5267
|
super(t, e), this.enableOptionSharing = !0, this.innerRadius = void 0, this.outerRadius = void 0, this.offsetX = void 0, this.offsetY = void 0;
|
|
5272
5268
|
}
|
|
@@ -5288,10 +5284,10 @@ class ie extends mt {
|
|
|
5288
5284
|
}
|
|
5289
5285
|
}
|
|
5290
5286
|
_getRotation() {
|
|
5291
|
-
return
|
|
5287
|
+
return pt(this.options.rotation - 90);
|
|
5292
5288
|
}
|
|
5293
5289
|
_getCircumference() {
|
|
5294
|
-
return
|
|
5290
|
+
return pt(this.options.circumference);
|
|
5295
5291
|
}
|
|
5296
5292
|
_getRotationExtents() {
|
|
5297
5293
|
let t = H, e = -H;
|
|
@@ -5454,7 +5450,7 @@ Y(ie, "id", "doughnut"), Y(ie, "defaults", {
|
|
|
5454
5450
|
}
|
|
5455
5451
|
}
|
|
5456
5452
|
});
|
|
5457
|
-
class bi extends
|
|
5453
|
+
class bi extends wt {
|
|
5458
5454
|
initialize() {
|
|
5459
5455
|
this.enableOptionSharing = !0, this.supportsDecimation = !0, super.initialize();
|
|
5460
5456
|
}
|
|
@@ -5508,7 +5504,7 @@ Y(bi, "id", "line"), Y(bi, "defaults", {
|
|
|
5508
5504
|
}
|
|
5509
5505
|
}
|
|
5510
5506
|
});
|
|
5511
|
-
class Ne extends
|
|
5507
|
+
class Ne extends wt {
|
|
5512
5508
|
constructor(t, e) {
|
|
5513
5509
|
super(t, e), this.innerRadius = void 0, this.outerRadius = void 0;
|
|
5514
5510
|
}
|
|
@@ -5570,7 +5566,7 @@ class Ne extends mt {
|
|
|
5570
5566
|
}), e;
|
|
5571
5567
|
}
|
|
5572
5568
|
_computeAngle(t, e, s) {
|
|
5573
|
-
return this.chart.getDataVisibility(t) ?
|
|
5569
|
+
return this.chart.getDataVisibility(t) ? pt(this.resolveDataElementOptions(t, e).angle || s) : 0;
|
|
5574
5570
|
}
|
|
5575
5571
|
}
|
|
5576
5572
|
Y(Ne, "id", "polarArea"), Y(Ne, "defaults", {
|
|
@@ -5650,7 +5646,7 @@ Y(As, "id", "pie"), Y(As, "defaults", {
|
|
|
5650
5646
|
circumference: 360,
|
|
5651
5647
|
radius: "100%"
|
|
5652
5648
|
});
|
|
5653
|
-
class Bi extends
|
|
5649
|
+
class Bi extends wt {
|
|
5654
5650
|
getLabelAndValue(t) {
|
|
5655
5651
|
const e = this._cachedMeta.vScale, s = this.getParsed(t);
|
|
5656
5652
|
return {
|
|
@@ -5707,7 +5703,7 @@ Y(Bi, "id", "radar"), Y(Bi, "defaults", {
|
|
|
5707
5703
|
}
|
|
5708
5704
|
}
|
|
5709
5705
|
});
|
|
5710
|
-
class Gi extends
|
|
5706
|
+
class Gi extends wt {
|
|
5711
5707
|
getLabelAndValue(t) {
|
|
5712
5708
|
const e = this._cachedMeta, s = this.chart.data.labels || [], { xScale: n, yScale: o } = e, a = this.getParsed(t), r = n.getLabelForValue(a.x), A = o.getLabelForValue(a.y);
|
|
5713
5709
|
return {
|
|
@@ -6172,7 +6168,7 @@ var ot = {
|
|
|
6172
6168
|
update(i, t, e, s) {
|
|
6173
6169
|
if (!i)
|
|
6174
6170
|
return;
|
|
6175
|
-
const n =
|
|
6171
|
+
const n = at(i.options.layout.padding), o = Math.max(t - n.width, 0), a = Math.max(e - n.height, 0), r = Mc(i.boxes), A = r.vertical, l = r.horizontal;
|
|
6176
6172
|
L(i.boxes, (f) => {
|
|
6177
6173
|
typeof f.beforeLayout == "function" && f.beforeLayout();
|
|
6178
6174
|
});
|
|
@@ -6185,7 +6181,7 @@ var ot = {
|
|
|
6185
6181
|
vBoxMaxWidth: o / 2 / c,
|
|
6186
6182
|
hBoxMaxHeight: a / 2
|
|
6187
6183
|
}), d = Object.assign({}, n);
|
|
6188
|
-
na(d,
|
|
6184
|
+
na(d, at(s));
|
|
6189
6185
|
const g = Object.assign({
|
|
6190
6186
|
maxPadding: d,
|
|
6191
6187
|
w: o,
|
|
@@ -6419,7 +6415,7 @@ class zc extends oa {
|
|
|
6419
6415
|
function Lc(i) {
|
|
6420
6416
|
return !Uo() || typeof OffscreenCanvas < "u" && i instanceof OffscreenCanvas ? Gc : zc;
|
|
6421
6417
|
}
|
|
6422
|
-
class
|
|
6418
|
+
class Mt {
|
|
6423
6419
|
constructor() {
|
|
6424
6420
|
Y(this, "x");
|
|
6425
6421
|
Y(this, "y");
|
|
@@ -6450,7 +6446,7 @@ class Dt {
|
|
|
6450
6446
|
}), n;
|
|
6451
6447
|
}
|
|
6452
6448
|
}
|
|
6453
|
-
Y(
|
|
6449
|
+
Y(Mt, "defaults", {}), Y(Mt, "defaultRoutes");
|
|
6454
6450
|
function Tc(i, t) {
|
|
6455
6451
|
const e = i.options.ticks, s = Sc(i), n = Math.min(e.maxTicksLimit || s, s), o = e.major.enabled ? jc(t) : [], a = o.length, r = o[0], A = o[a - 1], l = [];
|
|
6456
6452
|
if (a > n)
|
|
@@ -6542,7 +6538,7 @@ function ke(i) {
|
|
|
6542
6538
|
function Pn(i, t) {
|
|
6543
6539
|
if (!i.display)
|
|
6544
6540
|
return 0;
|
|
6545
|
-
const e = q(i.font, t), s =
|
|
6541
|
+
const e = q(i.font, t), s = at(i.padding);
|
|
6546
6542
|
return (j(i.text) ? i.text.length : 1) * e.lineHeight + s.height;
|
|
6547
6543
|
}
|
|
6548
6544
|
function Zc(i, t) {
|
|
@@ -6588,7 +6584,7 @@ function Xc(i, t, e, s) {
|
|
|
6588
6584
|
rotation: h
|
|
6589
6585
|
};
|
|
6590
6586
|
}
|
|
6591
|
-
class Ae extends
|
|
6587
|
+
class Ae extends Mt {
|
|
6592
6588
|
constructor(t) {
|
|
6593
6589
|
super(), this.id = t.id, this.type = t.type, this.options = void 0, this.ctx = t.ctx, this.chart = t.chart, this.top = void 0, this.bottom = void 0, this.left = void 0, this.right = void 0, this.width = void 0, this.height = void 0, this._margins = {
|
|
6594
6590
|
left: 0,
|
|
@@ -6763,7 +6759,7 @@ class Ae extends Dt {
|
|
|
6763
6759
|
if (a) {
|
|
6764
6760
|
const A = Pn(n, e.options.font);
|
|
6765
6761
|
if (r ? (t.width = this.maxWidth, t.height = ke(o) + A) : (t.height = this.maxHeight, t.width = ke(o) + A), s.display && this.ticks.length) {
|
|
6766
|
-
const { first: l, last: c, widest: h, highest: d } = this._getLabelSizes(), g = s.padding * 2, u =
|
|
6762
|
+
const { first: l, last: c, widest: h, highest: d } = this._getLabelSizes(), g = s.padding * 2, u = pt(this.labelRotation), f = Math.cos(u), p = Math.sin(u);
|
|
6767
6763
|
if (r) {
|
|
6768
6764
|
const w = s.mirror ? 0 : p * h.width + f * d.height;
|
|
6769
6765
|
t.height = Math.min(this.maxHeight, t.height + w + g);
|
|
@@ -6883,7 +6879,7 @@ class Ae extends Dt {
|
|
|
6883
6879
|
return this.$context || (this.$context = Zc(this.chart.getContext(), this));
|
|
6884
6880
|
}
|
|
6885
6881
|
_tickSize() {
|
|
6886
|
-
const t = this.options.ticks, e =
|
|
6882
|
+
const t = this.options.ticks, e = pt(this.labelRotation), s = Math.abs(Math.cos(e)), n = Math.abs(Math.sin(e)), o = this._getLabelSizes(), a = t.autoSkipPadding || 0, r = o ? o.widest.width + a : 0, A = o ? o.highest.height + a : 0;
|
|
6887
6883
|
return this.isHorizontal() ? A * s > r * n ? r / s : A / n : A * n < r * s ? A / s : r / n;
|
|
6888
6884
|
}
|
|
6889
6885
|
_isVisible() {
|
|
@@ -6922,7 +6918,7 @@ class Ae extends Dt {
|
|
|
6922
6918
|
}
|
|
6923
6919
|
const ct = E(n.ticks.maxTicksLimit, h), T = Math.max(1, Math.ceil(h / ct));
|
|
6924
6920
|
for (b = 0; b < h; b += T) {
|
|
6925
|
-
const N = this.getContext(b), U = o.setContext(N),
|
|
6921
|
+
const N = this.getContext(b), U = o.setContext(N), ft = r.setContext(N), st = U.lineWidth, he = U.color, si = ft.dash || [], de = ft.dashOffset, Ye = U.tickWidth, xe = U.tickColor, Ce = U.tickBorderDash || [], ye = U.tickBorderDashOffset;
|
|
6926
6922
|
D = Vc(this, b, A), D !== void 0 && (M = Jt(s, D, st), l ? C = v = k = O = M : y = I = Q = it = M, g.push({
|
|
6927
6923
|
tx1: C,
|
|
6928
6924
|
ty1: y,
|
|
@@ -6945,7 +6941,7 @@ class Ae extends Dt {
|
|
|
6945
6941
|
return this._ticksLength = h, this._borderValue = m, g;
|
|
6946
6942
|
}
|
|
6947
6943
|
_computeLabelItems(t) {
|
|
6948
|
-
const e = this.axis, s = this.options, { position: n, ticks: o } = s, a = this.isHorizontal(), r = this.ticks, { align: A, crossAlign: l, padding: c, mirror: h } = o, d = ke(s.grid), g = d + c, u = h ? -c : g, f = -
|
|
6944
|
+
const e = this.axis, s = this.options, { position: n, ticks: o } = s, a = this.isHorizontal(), r = this.ticks, { align: A, crossAlign: l, padding: c, mirror: h } = o, d = ke(s.grid), g = d + c, u = h ? -c : g, f = -pt(this.labelRotation), p = [];
|
|
6949
6945
|
let w, m, b, D, M, C, y, v, I, k, Q, O, it = "middle";
|
|
6950
6946
|
if (n === "top")
|
|
6951
6947
|
C = this.bottom - u, y = this._getXAxisLabelAlignment();
|
|
@@ -6980,12 +6976,12 @@ class Ae extends Dt {
|
|
|
6980
6976
|
b = r[w], D = b.label;
|
|
6981
6977
|
const T = o.setContext(this.getContext(w));
|
|
6982
6978
|
v = this.getPixelForTick(w) + o.labelOffset, I = this._resolveTickFontOptions(w), k = I.lineHeight, Q = j(D) ? D.length : 1;
|
|
6983
|
-
const N = Q / 2, U = T.color,
|
|
6979
|
+
const N = Q / 2, U = T.color, ft = T.textStrokeColor, st = T.textStrokeWidth;
|
|
6984
6980
|
let he = y;
|
|
6985
6981
|
a ? (M = v, y === "inner" && (w === m - 1 ? he = this.options.reverse ? "left" : "right" : w === 0 ? he = this.options.reverse ? "right" : "left" : he = "center"), n === "top" ? l === "near" || f !== 0 ? O = -Q * k + k / 2 : l === "center" ? O = -ct.highest.height / 2 - N * k + k : O = -ct.highest.height + k / 2 : l === "near" || f !== 0 ? O = k / 2 : l === "center" ? O = ct.highest.height / 2 - N * k : O = ct.highest.height - Q * k, h && (O *= -1), f !== 0 && !T.showLabelBackdrop && (M += k / 2 * Math.sin(f))) : (C = v, O = (1 - Q) * k / 2);
|
|
6986
6982
|
let si;
|
|
6987
6983
|
if (T.showLabelBackdrop) {
|
|
6988
|
-
const de =
|
|
6984
|
+
const de = at(T.backdropPadding), Ye = ct.heights[w], xe = ct.widths[w];
|
|
6989
6985
|
let Ce = O - de.top, ye = 0 - de.left;
|
|
6990
6986
|
switch (it) {
|
|
6991
6987
|
case "middle":
|
|
@@ -7018,7 +7014,7 @@ class Ae extends Dt {
|
|
|
7018
7014
|
options: {
|
|
7019
7015
|
rotation: f,
|
|
7020
7016
|
color: U,
|
|
7021
|
-
strokeColor:
|
|
7017
|
+
strokeColor: ft,
|
|
7022
7018
|
strokeWidth: st,
|
|
7023
7019
|
textAlign: he,
|
|
7024
7020
|
textBaseline: it,
|
|
@@ -7034,7 +7030,7 @@ class Ae extends Dt {
|
|
|
7034
7030
|
}
|
|
7035
7031
|
_getXAxisLabelAlignment() {
|
|
7036
7032
|
const { position: t, ticks: e } = this.options;
|
|
7037
|
-
if (-
|
|
7033
|
+
if (-pt(this.labelRotation))
|
|
7038
7034
|
return t === "top" ? "left" : "right";
|
|
7039
7035
|
let n = "center";
|
|
7040
7036
|
return e.align === "start" ? n = "left" : e.align === "end" ? n = "right" : e.align === "inner" && (n = "inner"), n;
|
|
@@ -7130,7 +7126,7 @@ class Ae extends Dt {
|
|
|
7130
7126
|
const { ctx: t, options: { position: e, title: s, reverse: n } } = this;
|
|
7131
7127
|
if (!s.display)
|
|
7132
7128
|
return;
|
|
7133
|
-
const o = q(s.font), a =
|
|
7129
|
+
const o = q(s.font), a = at(s.padding), r = s.align;
|
|
7134
7130
|
let A = o.lineHeight / 2;
|
|
7135
7131
|
e === "bottom" || e === "center" || P(e) ? (A += a.bottom, j(s.text) && (A += o.lineHeight * (s.text.length - 1))) : A += a.top;
|
|
7136
7132
|
const { titleX: l, titleY: c, maxWidth: h, rotation: d } = Xc(this, A, e, r);
|
|
@@ -7242,7 +7238,7 @@ function _c(i) {
|
|
|
7242
7238
|
}
|
|
7243
7239
|
class $c {
|
|
7244
7240
|
constructor() {
|
|
7245
|
-
this.controllers = new gi(
|
|
7241
|
+
this.controllers = new gi(wt, "datasets", !0), this.elements = new gi(Mt, "elements"), this.plugins = new gi(Object, "plugins"), this.scales = new gi(Ae, "scales"), this._typedRegistries = [
|
|
7246
7242
|
this.controllers,
|
|
7247
7243
|
this.scales,
|
|
7248
7244
|
this.elements
|
|
@@ -8231,8 +8227,8 @@ function zi(i, t, e, s, n, o) {
|
|
|
8231
8227
|
let g = 0;
|
|
8232
8228
|
const u = n - A;
|
|
8233
8229
|
if (s) {
|
|
8234
|
-
const T = c > 0 ? c - s : 0, N = h > 0 ? h - s : 0, U = (T + N) / 2,
|
|
8235
|
-
g = (u -
|
|
8230
|
+
const T = c > 0 ? c - s : 0, N = h > 0 ? h - s : 0, U = (T + N) / 2, ft = U !== 0 ? u * U / (U + s) : u;
|
|
8231
|
+
g = (u - ft) / 2;
|
|
8236
8232
|
}
|
|
8237
8233
|
const f = Math.max(1e-3, u * h - e / F) / h, p = (u - f) / 2, w = A + p + g, m = n - p - g, { outerStart: b, outerEnd: D, innerStart: M, innerEnd: C } = Bh(t, d, h, m - w), y = h - b, v = h - D, I = w + b / y, k = m - D / v, Q = d + M, O = d + C, it = w + M / Q, ct = m - C / O;
|
|
8238
8234
|
if (i.beginPath(), o) {
|
|
@@ -8251,8 +8247,8 @@ function zi(i, t, e, s, n, o) {
|
|
|
8251
8247
|
const st = ue(Q, it, a, r);
|
|
8252
8248
|
i.arc(st.x, st.y, M, it + Math.PI, w - X);
|
|
8253
8249
|
}
|
|
8254
|
-
const
|
|
8255
|
-
if (i.lineTo(
|
|
8250
|
+
const ft = ue(y, w, a, r);
|
|
8251
|
+
if (i.lineTo(ft.x, ft.y), b > 0) {
|
|
8256
8252
|
const st = ue(y, I, a, r);
|
|
8257
8253
|
i.arc(st.x, st.y, b, w - X, I);
|
|
8258
8254
|
}
|
|
@@ -8260,8 +8256,8 @@ function zi(i, t, e, s, n, o) {
|
|
|
8260
8256
|
i.moveTo(a, r);
|
|
8261
8257
|
const T = Math.cos(I) * h + a, N = Math.sin(I) * h + r;
|
|
8262
8258
|
i.lineTo(T, N);
|
|
8263
|
-
const U = Math.cos(k) * h + a,
|
|
8264
|
-
i.lineTo(U,
|
|
8259
|
+
const U = Math.cos(k) * h + a, ft = Math.sin(k) * h + r;
|
|
8260
|
+
i.lineTo(U, ft);
|
|
8265
8261
|
}
|
|
8266
8262
|
i.closePath();
|
|
8267
8263
|
}
|
|
@@ -8290,7 +8286,7 @@ function Yh(i, t, e, s, n) {
|
|
|
8290
8286
|
}
|
|
8291
8287
|
g && Dh(i, t, u), o || (zi(i, t, e, s, u, n), i.stroke());
|
|
8292
8288
|
}
|
|
8293
|
-
class Le extends
|
|
8289
|
+
class Le extends Mt {
|
|
8294
8290
|
constructor(e) {
|
|
8295
8291
|
super();
|
|
8296
8292
|
Y(this, "circumference");
|
|
@@ -8426,7 +8422,7 @@ const Qh = typeof Path2D == "function";
|
|
|
8426
8422
|
function Ph(i, t, e, s) {
|
|
8427
8423
|
Qh && !t.options.segment ? Eh(i, t, e, s) : kh(i, t, e, s);
|
|
8428
8424
|
}
|
|
8429
|
-
class jt extends
|
|
8425
|
+
class jt extends Mt {
|
|
8430
8426
|
constructor(t) {
|
|
8431
8427
|
super(), this.animated = !0, this.options = void 0, this._chart = void 0, this._loop = void 0, this._fullLoop = void 0, this._path = void 0, this._points = void 0, this._segments = void 0, this._decimated = !1, this._pointsUpdated = !1, this._datasetIndex = void 0, t && Object.assign(this, t);
|
|
8432
8428
|
}
|
|
@@ -8519,7 +8515,7 @@ function Nn(i, t, e, s) {
|
|
|
8519
8515
|
], s);
|
|
8520
8516
|
return Math.abs(t - o) < n.radius + n.hitRadius;
|
|
8521
8517
|
}
|
|
8522
|
-
class Ci extends
|
|
8518
|
+
class Ci extends Mt {
|
|
8523
8519
|
constructor(e) {
|
|
8524
8520
|
super();
|
|
8525
8521
|
Y(this, "parsed");
|
|
@@ -8667,7 +8663,7 @@ function es(i, t, e = {}) {
|
|
|
8667
8663
|
radius: i.radius
|
|
8668
8664
|
};
|
|
8669
8665
|
}
|
|
8670
|
-
class yi extends
|
|
8666
|
+
class yi extends Mt {
|
|
8671
8667
|
constructor(t) {
|
|
8672
8668
|
super(), this.options = void 0, this.horizontal = void 0, this.base = void 0, this.width = void 0, this.height = void 0, this.inflateAmount = void 0, t && Object.assign(this, t);
|
|
8673
8669
|
}
|
|
@@ -9276,7 +9272,7 @@ const _n = (i, t) => {
|
|
|
9276
9272
|
itemHeight: Math.max(t, e)
|
|
9277
9273
|
};
|
|
9278
9274
|
}, pd = (i, t) => i !== null && t !== null && i.datasetIndex === t.datasetIndex && i.index === t.index;
|
|
9279
|
-
class $n extends
|
|
9275
|
+
class $n extends Mt {
|
|
9280
9276
|
constructor(t) {
|
|
9281
9277
|
super(), this._added = !1, this.legendHitBoxes = [], this._hoveredItem = null, this.doughnutMode = !1, this.chart = t.chart, this.options = t.options, this.ctx = t.ctx, this.legendItems = void 0, this.columnSizes = void 0, this.lineWidths = void 0, this.maxHeight = void 0, this.maxWidth = void 0, this.top = void 0, this.bottom = void 0, this.left = void 0, this.right = void 0, this.height = void 0, this.width = void 0, this._margins = void 0, this.position = void 0, this.weight = void 0, this.fullSize = void 0;
|
|
9282
9278
|
}
|
|
@@ -9424,7 +9420,7 @@ class $n extends Dt {
|
|
|
9424
9420
|
}), Jo(this.ctx, t.textDirection);
|
|
9425
9421
|
}
|
|
9426
9422
|
drawTitle() {
|
|
9427
|
-
const t = this.options, e = t.title, s = q(e.font), n =
|
|
9423
|
+
const t = this.options, e = t.title, s = q(e.font), n = at(e.padding);
|
|
9428
9424
|
if (!e.display)
|
|
9429
9425
|
return;
|
|
9430
9426
|
const o = fe(t.rtl, this.left, this.width), a = this.ctx, r = e.position, A = s.size / 2, l = n.top + A;
|
|
@@ -9439,7 +9435,7 @@ class $n extends Dt {
|
|
|
9439
9435
|
a.textAlign = o.textAlign(ys(r)), a.textBaseline = "middle", a.strokeStyle = e.color, a.fillStyle = e.color, a.font = s.string, ae(a, e.text, g, c, s);
|
|
9440
9436
|
}
|
|
9441
9437
|
_computeTitleHeight() {
|
|
9442
|
-
const t = this.options.title, e = q(t.font), s =
|
|
9438
|
+
const t = this.options.title, e = q(t.font), s = at(t.padding);
|
|
9443
9439
|
return t.display ? e.lineHeight + s.height : 0;
|
|
9444
9440
|
}
|
|
9445
9441
|
_getLegendItemAt(t, e) {
|
|
@@ -9542,7 +9538,7 @@ var bd = {
|
|
|
9542
9538
|
generateLabels(i) {
|
|
9543
9539
|
const t = i.data.datasets, { labels: { usePointStyle: e, pointStyle: s, textAlign: n, color: o, useBorderRadius: a, borderRadius: r } } = i.legend.options;
|
|
9544
9540
|
return i._getSortedDatasetMetas().map((A) => {
|
|
9545
|
-
const l = A.controller.getStyle(e ? 0 : void 0), c =
|
|
9541
|
+
const l = A.controller.getStyle(e ? 0 : void 0), c = at(l.borderWidth);
|
|
9546
9542
|
return {
|
|
9547
9543
|
text: t[A.index].label,
|
|
9548
9544
|
fillStyle: l.backgroundColor,
|
|
@@ -9581,7 +9577,7 @@ var bd = {
|
|
|
9581
9577
|
}
|
|
9582
9578
|
}
|
|
9583
9579
|
};
|
|
9584
|
-
class Ls extends
|
|
9580
|
+
class Ls extends Mt {
|
|
9585
9581
|
constructor(t) {
|
|
9586
9582
|
super(), this.chart = t.chart, this.options = t.options, this.ctx = t.ctx, this._padding = void 0, this.top = void 0, this.bottom = void 0, this.left = void 0, this.right = void 0, this.width = void 0, this.height = void 0, this.position = void 0, this.weight = void 0, this.fullSize = void 0;
|
|
9587
9583
|
}
|
|
@@ -9593,7 +9589,7 @@ class Ls extends Dt {
|
|
|
9593
9589
|
}
|
|
9594
9590
|
this.width = this.right = t, this.height = this.bottom = e;
|
|
9595
9591
|
const n = j(s.text) ? s.text.length : 1;
|
|
9596
|
-
this._padding =
|
|
9592
|
+
this._padding = at(s.padding);
|
|
9597
9593
|
const o = n * q(s.font).lineHeight + this._padding.height;
|
|
9598
9594
|
this.isHorizontal() ? this.height = o : this.width = o;
|
|
9599
9595
|
}
|
|
@@ -9770,7 +9766,7 @@ function xd(i, t) {
|
|
|
9770
9766
|
};
|
|
9771
9767
|
}
|
|
9772
9768
|
function to(i, t) {
|
|
9773
|
-
const e = i.chart.ctx, { body: s, footer: n, title: o } = i, { boxWidth: a, boxHeight: r } = t, A = q(t.bodyFont), l = q(t.titleFont), c = q(t.footerFont), h = o.length, d = n.length, g = s.length, u =
|
|
9769
|
+
const e = i.chart.ctx, { body: s, footer: n, title: o } = i, { boxWidth: a, boxHeight: r } = t, A = q(t.bodyFont), l = q(t.titleFont), c = q(t.footerFont), h = o.length, d = n.length, g = s.length, u = at(t.padding);
|
|
9774
9770
|
let f = u.height, p = 0, w = s.reduce((D, M) => D + M.before.length + M.lines.length + M.after.length, 0);
|
|
9775
9771
|
if (w += i.beforeBody.length + i.afterBody.length, h && (f += h * l.lineHeight + (h - 1) * t.titleSpacing + t.titleMarginBottom), w) {
|
|
9776
9772
|
const D = t.displayColors ? Math.max(r, A.lineHeight) : A.lineHeight;
|
|
@@ -9827,7 +9823,7 @@ function io(i, t, e, s) {
|
|
|
9827
9823
|
};
|
|
9828
9824
|
}
|
|
9829
9825
|
function wi(i, t, e) {
|
|
9830
|
-
const s =
|
|
9826
|
+
const s = at(e.padding);
|
|
9831
9827
|
return t === "center" ? i.x + i.width / 2 : t === "right" ? i.x + i.width - s.right : i.x + s.left;
|
|
9832
9828
|
}
|
|
9833
9829
|
function so(i) {
|
|
@@ -9900,7 +9896,7 @@ function At(i, t, e, s) {
|
|
|
9900
9896
|
const n = i[t].call(e, s);
|
|
9901
9897
|
return typeof n > "u" ? ba[t].call(e, s) : n;
|
|
9902
9898
|
}
|
|
9903
|
-
class us extends
|
|
9899
|
+
class us extends Mt {
|
|
9904
9900
|
constructor(t) {
|
|
9905
9901
|
super(), this.opacity = 0, this._active = [], this._eventPosition = void 0, this._size = void 0, this._cachedAnimations = void 0, this._tooltipItems = [], this.$animations = void 0, this.$context = void 0, this.chart = t.chart, this.options = t.options, this.dataPoints = void 0, this.title = void 0, this.beforeBody = void 0, this.body = void 0, this.afterBody = void 0, this.footer = void 0, this.xAlign = void 0, this.yAlign = void 0, this.x = void 0, this.y = void 0, this.height = void 0, this.width = void 0, this.caretX = void 0, this.caretY = void 0, this.labelColors = void 0, this.labelPointStyles = void 0, this.labelTextColors = void 0;
|
|
9906
9902
|
}
|
|
@@ -10089,7 +10085,7 @@ class us extends Dt {
|
|
|
10089
10085
|
y: this.y
|
|
10090
10086
|
};
|
|
10091
10087
|
s = Math.abs(s) < 1e-3 ? 0 : s;
|
|
10092
|
-
const a =
|
|
10088
|
+
const a = at(e.padding), r = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
|
|
10093
10089
|
e.enabled && r && (t.save(), t.globalAlpha = s, this.drawBackground(o, t, n, e), Xo(t, e.textDirection), o.y += a.top, this.drawTitle(o, t, e), this.drawBody(o, t, e), this.drawFooter(o, t, e), Jo(t, e.textDirection), t.restore());
|
|
10094
10090
|
}
|
|
10095
10091
|
getActiveElements() {
|
|
@@ -10367,7 +10363,7 @@ function Td(i, t) {
|
|
|
10367
10363
|
}), e;
|
|
10368
10364
|
}
|
|
10369
10365
|
function ao(i, t, { horizontal: e, minRotation: s }) {
|
|
10370
|
-
const n =
|
|
10366
|
+
const n = pt(s), o = (e ? Math.sin(n) : Math.cos(n)) || 1e-3, a = 0.75 * t * ("" + i).length;
|
|
10371
10367
|
return Math.min(t / o, a);
|
|
10372
10368
|
}
|
|
10373
10369
|
class Li extends Ae {
|
|
@@ -10437,7 +10433,7 @@ class ps extends Li {
|
|
|
10437
10433
|
this.min = W(t) ? t : 0, this.max = W(e) ? e : 1, this.handleTickRangeOptions();
|
|
10438
10434
|
}
|
|
10439
10435
|
computeTickLimit() {
|
|
10440
|
-
const t = this.isHorizontal(), e = t ? this.width : this.height, s =
|
|
10436
|
+
const t = this.isHorizontal(), e = t ? this.width : this.height, s = pt(this.options.ticks.minRotation), n = (t ? Math.sin(s) : Math.cos(s)) || 1e-3, o = this._resolveTickFontOptions(0);
|
|
10441
10437
|
return Math.ceil(e / Math.min(40, o.lineHeight / n));
|
|
10442
10438
|
}
|
|
10443
10439
|
getPixelForValue(t) {
|
|
@@ -10546,7 +10542,7 @@ Y(ws, "id", "logarithmic"), Y(ws, "defaults", {
|
|
|
10546
10542
|
function ms(i) {
|
|
10547
10543
|
const t = i.ticks;
|
|
10548
10544
|
if (t.display && i.display) {
|
|
10549
|
-
const e =
|
|
10545
|
+
const e = at(t.backdropPadding);
|
|
10550
10546
|
return E(t.font && t.font.size, Z.font.size) + e.height;
|
|
10551
10547
|
}
|
|
10552
10548
|
return 0;
|
|
@@ -10649,7 +10645,7 @@ function Ud(i, t, e) {
|
|
|
10649
10645
|
function Xd(i, t, e) {
|
|
10650
10646
|
const { left: s, top: n, right: o, bottom: a } = e, { backdropColor: r } = t;
|
|
10651
10647
|
if (!z(r)) {
|
|
10652
|
-
const A = se(t.borderRadius), l =
|
|
10648
|
+
const A = se(t.borderRadius), l = at(t.backdropPadding);
|
|
10653
10649
|
i.fillStyle = r;
|
|
10654
10650
|
const c = s - l.left, h = n - l.top, d = o - s + l.width, g = a - n + l.height;
|
|
10655
10651
|
Object.values(A).some((u) => u !== 0) ? (i.beginPath(), Je(i, {
|
|
@@ -10704,7 +10700,7 @@ class Se extends Li {
|
|
|
10704
10700
|
super(t), this.xCenter = void 0, this.yCenter = void 0, this.drawingArea = void 0, this._pointLabels = [], this._pointLabelItems = [];
|
|
10705
10701
|
}
|
|
10706
10702
|
setDimensions() {
|
|
10707
|
-
const t = this._padding =
|
|
10703
|
+
const t = this._padding = at(ms(this.options) / 2), e = this.width = this.maxWidth - t.width, s = this.height = this.maxHeight - t.height;
|
|
10708
10704
|
this.xCenter = Math.floor(this.left + e / 2 + t.left), this.yCenter = Math.floor(this.top + s / 2 + t.top), this.drawingArea = Math.floor(Math.min(e, s) / 2);
|
|
10709
10705
|
}
|
|
10710
10706
|
determineDataLimits() {
|
|
@@ -10732,7 +10728,7 @@ class Se extends Li {
|
|
|
10732
10728
|
}
|
|
10733
10729
|
getIndexAngle(t) {
|
|
10734
10730
|
const e = H / (this._pointLabels.length || 1), s = this.options.startAngle || 0;
|
|
10735
|
-
return dt(t * e +
|
|
10731
|
+
return dt(t * e + pt(s));
|
|
10736
10732
|
}
|
|
10737
10733
|
getDistanceFromCenterForValue(t) {
|
|
10738
10734
|
if (z(t))
|
|
@@ -10814,7 +10810,7 @@ class Se extends Li {
|
|
|
10814
10810
|
const l = s.setContext(this.getContext(A)), c = q(l.font);
|
|
10815
10811
|
if (o = this.getDistanceFromCenterForValue(this.ticks[A].value), l.showLabelBackdrop) {
|
|
10816
10812
|
t.font = c.string, a = t.measureText(r.label).width, t.fillStyle = l.backdropColor;
|
|
10817
|
-
const h =
|
|
10813
|
+
const h = at(l.backdropPadding);
|
|
10818
10814
|
t.fillRect(-a / 2 - h.left, -o - c.size / 2 - h.top, a + h.width, c.size + h.height);
|
|
10819
10815
|
}
|
|
10820
10816
|
ae(t, r.label, 0, -o, c, {
|
|
@@ -11077,7 +11073,7 @@ class $e extends Ae {
|
|
|
11077
11073
|
return this.min + s * (this.max - this.min);
|
|
11078
11074
|
}
|
|
11079
11075
|
_getLabelSize(t) {
|
|
11080
|
-
const e = this.options.ticks, s = this.ctx.measureText(t).width, n =
|
|
11076
|
+
const e = this.options.ticks, s = this.ctx.measureText(t).width, n = pt(this.isHorizontal() ? e.maxRotation : e.minRotation), o = Math.cos(n), a = Math.sin(n), r = this._resolveTickFontOptions(0).size;
|
|
11081
11077
|
return {
|
|
11082
11078
|
w: s * o + r * a,
|
|
11083
11079
|
h: s * a + r * o
|
|
@@ -11214,7 +11210,7 @@ var ng = Object.defineProperty, og = Object.getOwnPropertyDescriptor, Ut = (i, t
|
|
|
11214
11210
|
};
|
|
11215
11211
|
let Yt = class extends tt {
|
|
11216
11212
|
constructor() {
|
|
11217
|
-
super(...arguments), this.chartTitle = "", this.chartType = "", this.chartLabels = [], this.chartDataSets = [], this.chartOptions = {}, this.
|
|
11213
|
+
super(...arguments), this.chartTitle = "", this.chartType = "", this.chartLabels = [], this.chartDataSets = [], this.chartOptions = {}, this.createChart = () => {
|
|
11218
11214
|
this._chart = new Et(
|
|
11219
11215
|
this._chartCanvas,
|
|
11220
11216
|
{
|
|
@@ -11229,7 +11225,7 @@ let Yt = class extends tt {
|
|
|
11229
11225
|
};
|
|
11230
11226
|
}
|
|
11231
11227
|
firstUpdated() {
|
|
11232
|
-
this.
|
|
11228
|
+
this.createChart();
|
|
11233
11229
|
}
|
|
11234
11230
|
updated() {
|
|
11235
11231
|
this._chart.data.labels = [...this.chartLabels], this._chart.data.datasets = [...this.chartDataSets], this._chart.update();
|
|
@@ -11569,7 +11565,7 @@ var pg = Object.defineProperty, wg = Object.getOwnPropertyDescriptor, V = (i, t,
|
|
|
11569
11565
|
};
|
|
11570
11566
|
let R = class extends tt {
|
|
11571
11567
|
constructor() {
|
|
11572
|
-
super(...arguments), this.tableHeaders = [], this.tableTitle = "", this.dataSource = [], this.objectProperties = [], this.readonly = !1, this.withPagination = !1, this.resultsPerPage = 10, this.previousSvgSrc = "", this.nextSvgSrc = "", this.key = "", this.anchorAttrValue = "", this.emptyStateIllustration = "", this.rowActions = [], this.viewSvgIcon = "", this.editSvgIcon = "", this.deleteSvgIcon = "", this.
|
|
11568
|
+
super(...arguments), this.tableHeaders = [], this.tableTitle = "", this.dataSource = [], this.objectProperties = [], this.readonly = !1, this.withPagination = !1, this.resultsPerPage = 10, this.previousSvgSrc = "", this.nextSvgSrc = "", this.key = "", this.anchorAttrValue = "", this.emptyStateIllustration = "", this.rowActions = [], this.viewSvgIcon = "", this.editSvgIcon = "", this.deleteSvgIcon = "", this._currentPage = 1, this._totalPages = 0, this._paginatedArray = [], this._isDialogVisible = !1, this.containsHTML = (i) => /<[a-z][\s\S]*>/i.test(i), this.generateTableHeadColumns = () => {
|
|
11573
11569
|
let i = [];
|
|
11574
11570
|
for (let t of this.tableHeaders)
|
|
11575
11571
|
i.push(B`<th>${t}</th>`);
|
|
@@ -11584,27 +11580,27 @@ let R = class extends tt {
|
|
|
11584
11580
|
this.containsHTML(e) ? t.push(B`<td>${Ts(e)}</td>`) : t.push(B`<td>${e}</td>`);
|
|
11585
11581
|
return t;
|
|
11586
11582
|
}, this.getInputValue = (i) => {
|
|
11587
|
-
let t = this.
|
|
11588
|
-
this.
|
|
11583
|
+
let t = this._targetInput.value;
|
|
11584
|
+
this._targetInput.value && (Number(t) > this._totalPages ? (this._targetInput.value = this._totalPages.toString(), this._currentPage = this._totalPages) : Number(t) === 0 ? this._targetInput.value = this._currentPage.toString() : this._currentPage = Number(i.target.value), this._paginatedArray = this.paginateArray(this.dataSource, this._currentPage));
|
|
11589
11585
|
}, this.allowOnlyNumbers = (i) => {
|
|
11590
11586
|
isNaN(Number(i.key)) && i.key !== "Backspace" && i.preventDefault();
|
|
11591
11587
|
}, this.paginateArray = (i, t, e = this.resultsPerPage) => {
|
|
11592
11588
|
let s = (t - 1) * e, n = t * e;
|
|
11593
11589
|
return i.slice(s, n);
|
|
11594
11590
|
}, this.nextPage = () => {
|
|
11595
|
-
this.
|
|
11591
|
+
this._currentPage !== this._totalPages && (this._currentPage++, this._targetInput.value && (this._targetInput.value = this._currentPage.toString()), this._paginatedArray = this.paginateArray(this.dataSource, this._currentPage));
|
|
11596
11592
|
}, this.previousPage = () => {
|
|
11597
|
-
this.
|
|
11593
|
+
this._currentPage !== 1 && (this._currentPage--, this._targetInput.value && (this._targetInput.value = this._currentPage.toString()), this._paginatedArray = this.paginateArray(this.dataSource, this._currentPage));
|
|
11598
11594
|
}, this.displayConfirmationDialog = (i) => {
|
|
11599
|
-
this.
|
|
11595
|
+
this._isDialogVisible = !0, this._dataKey = i.target.getAttribute("data-key");
|
|
11600
11596
|
}, this.closeConfirmDialog = () => {
|
|
11601
|
-
this.
|
|
11597
|
+
this._isDialogVisible = !1;
|
|
11602
11598
|
}, this.deleteRecord = () => {
|
|
11603
|
-
this.dispatchEvent(new CustomEvent("clicked", { detail: this.
|
|
11599
|
+
this.dispatchEvent(new CustomEvent("clicked", { detail: this._dataKey })), this._isDialogVisible = !1;
|
|
11604
11600
|
};
|
|
11605
11601
|
}
|
|
11606
11602
|
willUpdate(i) {
|
|
11607
|
-
i.has("dataSource") && this.withPagination && (this.
|
|
11603
|
+
i.has("dataSource") && this.withPagination && (this._currentPage > 1 && (this._currentPage = 1, this._targetInput.value = this._currentPage.toString()), this._paginatedArray = this.paginateArray(this.dataSource, this._currentPage, this.resultsPerPage), this._totalPages = Math.ceil(this.dataSource.length / this.resultsPerPage));
|
|
11608
11604
|
}
|
|
11609
11605
|
render() {
|
|
11610
11606
|
return B`
|
|
@@ -11621,7 +11617,7 @@ let R = class extends tt {
|
|
|
11621
11617
|
<tbody>
|
|
11622
11618
|
${this.dataSource.length > 0 ? ee(
|
|
11623
11619
|
this.withPagination,
|
|
11624
|
-
() => this.
|
|
11620
|
+
() => this._paginatedArray.map((i) => B`
|
|
11625
11621
|
<tr>
|
|
11626
11622
|
${this.generateDataColumns(i)}
|
|
11627
11623
|
${ee(
|
|
@@ -11704,8 +11700,8 @@ let R = class extends tt {
|
|
|
11704
11700
|
</button>
|
|
11705
11701
|
|
|
11706
11702
|
<p>
|
|
11707
|
-
<input type='text' class='current-page-input' value=${this.
|
|
11708
|
-
<span> of ${this.
|
|
11703
|
+
<input type='text' class='current-page-input' value=${this._currentPage} @input=${this.getInputValue} @keydown=${this.allowOnlyNumbers} />
|
|
11704
|
+
<span> of ${this._totalPages}</span>
|
|
11709
11705
|
</p>
|
|
11710
11706
|
|
|
11711
11707
|
<button class='button navigation-button' @click=${this.nextPage}>
|
|
@@ -11718,8 +11714,8 @@ let R = class extends tt {
|
|
|
11718
11714
|
)}
|
|
11719
11715
|
</div>
|
|
11720
11716
|
</div>
|
|
11721
|
-
<div class='overlay ${this.
|
|
11722
|
-
<div class='dialog ${this.
|
|
11717
|
+
<div class='overlay ${this._isDialogVisible && "overlay--visible"}'>
|
|
11718
|
+
<div class='dialog ${this._isDialogVisible && "dialog--visible"}'>
|
|
11723
11719
|
<h4 class='dialog-title'>Confirm to delete</h4>
|
|
11724
11720
|
<p class='dialog-message'>Are you sure you want to delete this record ?</p>
|
|
11725
11721
|
<p class='dialog-message'>This action cannot be undone</p>
|
|
@@ -11784,22 +11780,22 @@ V([
|
|
|
11784
11780
|
], R.prototype, "deleteSvgIcon", 2);
|
|
11785
11781
|
V([
|
|
11786
11782
|
J()
|
|
11787
|
-
], R.prototype, "
|
|
11783
|
+
], R.prototype, "_currentPage", 2);
|
|
11788
11784
|
V([
|
|
11789
11785
|
J()
|
|
11790
|
-
], R.prototype, "
|
|
11786
|
+
], R.prototype, "_totalPages", 2);
|
|
11791
11787
|
V([
|
|
11792
11788
|
J()
|
|
11793
|
-
], R.prototype, "
|
|
11789
|
+
], R.prototype, "_paginatedArray", 2);
|
|
11794
11790
|
V([
|
|
11795
11791
|
J()
|
|
11796
|
-
], R.prototype, "
|
|
11792
|
+
], R.prototype, "_dataKey", 2);
|
|
11797
11793
|
V([
|
|
11798
11794
|
Ti(".current-page-input")
|
|
11799
|
-
], R.prototype, "
|
|
11795
|
+
], R.prototype, "_targetInput", 2);
|
|
11800
11796
|
V([
|
|
11801
11797
|
J()
|
|
11802
|
-
], R.prototype, "
|
|
11798
|
+
], R.prototype, "_isDialogVisible", 2);
|
|
11803
11799
|
R = V([
|
|
11804
11800
|
et("genus-table")
|
|
11805
11801
|
], R);
|
|
@@ -12281,7 +12277,7 @@ export {
|
|
|
12281
12277
|
qg as GenusDataTable,
|
|
12282
12278
|
Jg as GenusDropDownSelect,
|
|
12283
12279
|
Tt as GenusFileUpload,
|
|
12284
|
-
|
|
12280
|
+
mt as GenusRadioBtnGroup,
|
|
12285
12281
|
Kg as GenusTabs,
|
|
12286
12282
|
Ot as GenusTextArea,
|
|
12287
12283
|
K as GenusTextBox,
|