web-mojo 2.1.443 → 2.1.458
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/admin.cjs.js +1 -1
- package/dist/admin.cjs.js.map +1 -1
- package/dist/admin.es.js +11 -19
- package/dist/admin.es.js.map +1 -1
- package/dist/auth.cjs.js +1 -1
- package/dist/auth.cjs.js.map +1 -1
- package/dist/auth.es.js +3 -3
- package/dist/auth.es.js.map +1 -1
- package/dist/charts.cjs.js +1 -1
- package/dist/charts.es.js +2 -2
- package/dist/chunks/{ContextMenu-Cao6A-Lu.js → ContextMenu-BjQymcpo.js} +2 -2
- package/dist/chunks/{ContextMenu-Cao6A-Lu.js.map → ContextMenu-BjQymcpo.js.map} +1 -1
- package/dist/chunks/{ContextMenu-TK4-wzDb.js → ContextMenu-C0sdb9u5.js} +2 -2
- package/dist/chunks/{ContextMenu-TK4-wzDb.js.map → ContextMenu-C0sdb9u5.js.map} +1 -1
- package/dist/chunks/{DataView-CHoPxbYT.js → DataView-Cl4kRP-W.js} +2 -2
- package/dist/chunks/{DataView-CHoPxbYT.js.map → DataView-Cl4kRP-W.js.map} +1 -1
- package/dist/chunks/{DataView-Qnk-TnHd.js → DataView-DDe4NgiH.js} +2 -2
- package/dist/chunks/{DataView-Qnk-TnHd.js.map → DataView-DDe4NgiH.js.map} +1 -1
- package/dist/chunks/{Dialog-B_ZJYlVS.js → Dialog-DAQdjRci.js} +2 -2
- package/dist/chunks/{Dialog-B_ZJYlVS.js.map → Dialog-DAQdjRci.js.map} +1 -1
- package/dist/chunks/{Dialog-DbZ2jB_m.js → Dialog-upGYwvdZ.js} +5 -5
- package/dist/chunks/{Dialog-DbZ2jB_m.js.map → Dialog-upGYwvdZ.js.map} +1 -1
- package/dist/chunks/{FilePreviewView-DeGgRRbW.js → FilePreviewView-7-RBir4g.js} +2 -2
- package/dist/chunks/{FilePreviewView-DeGgRRbW.js.map → FilePreviewView-7-RBir4g.js.map} +1 -1
- package/dist/chunks/{FilePreviewView-nuZku1yG.js → FilePreviewView-CehLQVJa.js} +25 -18
- package/dist/chunks/{FilePreviewView-nuZku1yG.js.map → FilePreviewView-CehLQVJa.js.map} +1 -1
- package/dist/chunks/{FormView-BZInlDfZ.js → FormView-B7pwdxqX.js} +3 -2
- package/dist/chunks/FormView-B7pwdxqX.js.map +1 -0
- package/dist/chunks/{FormView-BDKrUX1-.js → FormView-C9PgTIH2.js} +68 -14
- package/dist/chunks/FormView-C9PgTIH2.js.map +1 -0
- package/dist/chunks/{MetricsChart-BbaBczOZ.js → MetricsChart-TwtfTNEA.js} +2 -2
- package/dist/chunks/{MetricsChart-BbaBczOZ.js.map → MetricsChart-TwtfTNEA.js.map} +1 -1
- package/dist/chunks/{MetricsChart-Aqum5Znr.js → MetricsChart-x15UvXRk.js} +3 -3
- package/dist/chunks/{MetricsChart-Aqum5Znr.js.map → MetricsChart-x15UvXRk.js.map} +1 -1
- package/dist/chunks/{PDFViewer-CGj7cZut.js → PDFViewer---ebUwfT.js} +3 -3
- package/dist/chunks/{PDFViewer-CGj7cZut.js.map → PDFViewer---ebUwfT.js.map} +1 -1
- package/dist/chunks/{PDFViewer-Bq-NM6JH.js → PDFViewer-tK1fntDR.js} +2 -2
- package/dist/chunks/{PDFViewer-Bq-NM6JH.js.map → PDFViewer-tK1fntDR.js.map} +1 -1
- package/dist/chunks/{Page-BkkXMFuP.js → Page-BUXs6-fN.js} +2 -2
- package/dist/chunks/{Page-BkkXMFuP.js.map → Page-BUXs6-fN.js.map} +1 -1
- package/dist/chunks/{Page-QhPYRY-q.js → Page-q5Gme_r0.js} +2 -2
- package/dist/chunks/{Page-QhPYRY-q.js.map → Page-q5Gme_r0.js.map} +1 -1
- package/dist/chunks/{TopNav-DUwNnOuM.js → TopNav-BOMPjms6.js} +2 -2
- package/dist/chunks/{TopNav-DUwNnOuM.js.map → TopNav-BOMPjms6.js.map} +1 -1
- package/dist/chunks/{TopNav-D6c7gsox.js → TopNav-os-U9FQP.js} +2 -2
- package/dist/chunks/{TopNav-D6c7gsox.js.map → TopNav-os-U9FQP.js.map} +1 -1
- package/dist/chunks/{WebApp-BPWJVv80.js → WebApp-BONphh_h.js} +53 -24
- package/dist/chunks/WebApp-BONphh_h.js.map +1 -0
- package/dist/chunks/WebApp-DUxotRc-.js +2 -0
- package/dist/chunks/WebApp-DUxotRc-.js.map +1 -0
- package/dist/docit.cjs.js +1 -1
- package/dist/docit.es.js +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +11 -11
- package/dist/lightbox.cjs.js +1 -1
- package/dist/lightbox.es.js +4 -4
- package/package.json +1 -1
- package/dist/chunks/FormView-BDKrUX1-.js.map +0 -1
- package/dist/chunks/FormView-BZInlDfZ.js.map +0 -1
- package/dist/chunks/WebApp-BPWJVv80.js.map +0 -1
- package/dist/chunks/WebApp-CYqazUo5.js +0 -2
- package/dist/chunks/WebApp-CYqazUo5.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as Mustache, h as MOJOUtils, V as View } from "./WebApp-
|
|
1
|
+
import { M as Mustache, h as MOJOUtils, V as View } from "./WebApp-BONphh_h.js";
|
|
2
2
|
class FormBuilder {
|
|
3
3
|
constructor(config = {}) {
|
|
4
4
|
this.fields = config.fields || [];
|
|
@@ -3781,10 +3781,9 @@ class DateRangePicker extends View {
|
|
|
3781
3781
|
config.setup = (picker) => {
|
|
3782
3782
|
picker.on("select", (e) => {
|
|
3783
3783
|
const { start, end } = e.detail;
|
|
3784
|
-
this.
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
);
|
|
3784
|
+
const startDate = start ? this.normalizeDateFromPicker(start) : "";
|
|
3785
|
+
const endDate = end ? this.normalizeDateFromPicker(end) : "";
|
|
3786
|
+
this.handleRangeChange(startDate, endDate);
|
|
3788
3787
|
});
|
|
3789
3788
|
picker.on("clear", () => {
|
|
3790
3789
|
this.handleRangeChange("", "");
|
|
@@ -3882,16 +3881,55 @@ class DateRangePicker extends View {
|
|
|
3882
3881
|
// ========================================
|
|
3883
3882
|
// Utility Methods
|
|
3884
3883
|
// ========================================
|
|
3884
|
+
/**
|
|
3885
|
+
* Normalize date from Easepick DateTime object
|
|
3886
|
+
* Easepick DateTime objects may have timezone issues, so extract the date components directly
|
|
3887
|
+
*/
|
|
3888
|
+
normalizeDateFromPicker(dateObj) {
|
|
3889
|
+
if (!dateObj) return "";
|
|
3890
|
+
if (typeof dateObj.toJSDate === "function") {
|
|
3891
|
+
const jsDate = dateObj.toJSDate();
|
|
3892
|
+
return this.formatDate(jsDate, this.format);
|
|
3893
|
+
}
|
|
3894
|
+
if (typeof dateObj.getFullYear === "function") {
|
|
3895
|
+
const year = dateObj.getFullYear();
|
|
3896
|
+
const month = String(dateObj.getMonth() + 1).padStart(2, "0");
|
|
3897
|
+
const day = String(dateObj.getDate()).padStart(2, "0");
|
|
3898
|
+
switch (this.format) {
|
|
3899
|
+
case "YYYY-MM-DD":
|
|
3900
|
+
return `${year}-${month}-${day}`;
|
|
3901
|
+
case "MM/DD/YYYY":
|
|
3902
|
+
return `${month}/${day}/${year}`;
|
|
3903
|
+
case "DD/MM/YYYY":
|
|
3904
|
+
return `${day}/${month}/${year}`;
|
|
3905
|
+
default:
|
|
3906
|
+
return `${year}-${month}-${day}`;
|
|
3907
|
+
}
|
|
3908
|
+
}
|
|
3909
|
+
return this.formatDate(dateObj, this.format);
|
|
3910
|
+
}
|
|
3885
3911
|
/**
|
|
3886
3912
|
* Format date for different contexts
|
|
3887
3913
|
*/
|
|
3888
3914
|
formatDate(date, format = this.format) {
|
|
3889
3915
|
if (!date) return "";
|
|
3890
|
-
|
|
3891
|
-
if (
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3916
|
+
let year, month, day, d;
|
|
3917
|
+
if (typeof date === "string" && /^\d{4}-\d{2}-\d{2}$/.test(date)) {
|
|
3918
|
+
const parts = date.split("-");
|
|
3919
|
+
year = parseInt(parts[0]);
|
|
3920
|
+
month = String(parseInt(parts[1])).padStart(2, "0");
|
|
3921
|
+
day = String(parseInt(parts[2])).padStart(2, "0");
|
|
3922
|
+
} else {
|
|
3923
|
+
if (date instanceof Date) {
|
|
3924
|
+
d = date;
|
|
3925
|
+
} else {
|
|
3926
|
+
d = new Date(date);
|
|
3927
|
+
}
|
|
3928
|
+
if (isNaN(d.getTime())) return "";
|
|
3929
|
+
year = d.getFullYear();
|
|
3930
|
+
month = String(d.getMonth() + 1).padStart(2, "0");
|
|
3931
|
+
day = String(d.getDate()).padStart(2, "0");
|
|
3932
|
+
}
|
|
3895
3933
|
switch (format) {
|
|
3896
3934
|
case "YYYY-MM-DD":
|
|
3897
3935
|
return `${year}-${month}-${day}`;
|
|
@@ -3914,7 +3952,8 @@ class DateRangePicker extends View {
|
|
|
3914
3952
|
"Nov",
|
|
3915
3953
|
"Dec"
|
|
3916
3954
|
];
|
|
3917
|
-
|
|
3955
|
+
const monthIndex = parseInt(month) - 1;
|
|
3956
|
+
return `${monthNames[monthIndex]} ${day}, ${year}`;
|
|
3918
3957
|
}
|
|
3919
3958
|
default:
|
|
3920
3959
|
return `${year}-${month}-${day}`;
|
|
@@ -3925,6 +3964,19 @@ class DateRangePicker extends View {
|
|
|
3925
3964
|
*/
|
|
3926
3965
|
formatForOutput(date) {
|
|
3927
3966
|
if (!date) return "";
|
|
3967
|
+
if (typeof date === "string" && /^\d{4}-\d{2}-\d{2}$/.test(date)) {
|
|
3968
|
+
switch (this.outputFormat) {
|
|
3969
|
+
case "epoch":
|
|
3970
|
+
const parts = date.split("-");
|
|
3971
|
+
const d2 = new Date(parseInt(parts[0]), parseInt(parts[1]) - 1, parseInt(parts[2]));
|
|
3972
|
+
return Math.floor(d2.getTime() / 1e3).toString();
|
|
3973
|
+
case "iso":
|
|
3974
|
+
return (/* @__PURE__ */ new Date(date + "T00:00:00")).toISOString();
|
|
3975
|
+
case "date":
|
|
3976
|
+
default:
|
|
3977
|
+
return date;
|
|
3978
|
+
}
|
|
3979
|
+
}
|
|
3928
3980
|
const d = new Date(date);
|
|
3929
3981
|
if (isNaN(d.getTime())) return "";
|
|
3930
3982
|
switch (this.outputFormat) {
|
|
@@ -3985,8 +4037,10 @@ class DateRangePicker extends View {
|
|
|
3985
4037
|
const endInput = endFieldName ? this.element?.querySelector(`[name="${endFieldName}"]`) : null;
|
|
3986
4038
|
const combinedInput = this.name ? this.element?.querySelector(`[name="${this.name}"]`) : null;
|
|
3987
4039
|
const fieldNameInput = this.fieldName ? this.element?.querySelector(`[name="${this.fieldName}"]`) : null;
|
|
3988
|
-
|
|
3989
|
-
|
|
4040
|
+
const startValue = this.currentStartDate ? this.formatForOutput(this.currentStartDate) : "";
|
|
4041
|
+
const endValue = this.currentEndDate ? this.formatForOutput(this.currentEndDate) : "";
|
|
4042
|
+
if (startInput) startInput.value = startValue;
|
|
4043
|
+
if (endInput) endInput.value = endValue;
|
|
3990
4044
|
if (combinedInput) combinedInput.value = this.getDisplayValue();
|
|
3991
4045
|
if (fieldNameInput) fieldNameInput.value = this.name || "";
|
|
3992
4046
|
}
|
|
@@ -5951,4 +6005,4 @@ export {
|
|
|
5951
6005
|
applyFileDropMixin as a,
|
|
5952
6006
|
FormView$1 as b
|
|
5953
6007
|
};
|
|
5954
|
-
//# sourceMappingURL=FormView-
|
|
6008
|
+
//# sourceMappingURL=FormView-C9PgTIH2.js.map
|