web-mojo 2.1.443 → 2.1.457

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.
Files changed (62) hide show
  1. package/dist/admin.cjs.js +1 -1
  2. package/dist/admin.cjs.js.map +1 -1
  3. package/dist/admin.es.js +11 -19
  4. package/dist/admin.es.js.map +1 -1
  5. package/dist/auth.cjs.js +1 -1
  6. package/dist/auth.cjs.js.map +1 -1
  7. package/dist/auth.es.js +3 -3
  8. package/dist/auth.es.js.map +1 -1
  9. package/dist/charts.cjs.js +1 -1
  10. package/dist/charts.es.js +2 -2
  11. package/dist/chunks/{ContextMenu-Cao6A-Lu.js → ContextMenu-BMuMohZ9.js} +2 -2
  12. package/dist/chunks/{ContextMenu-Cao6A-Lu.js.map → ContextMenu-BMuMohZ9.js.map} +1 -1
  13. package/dist/chunks/{ContextMenu-TK4-wzDb.js → ContextMenu-pXNFdhbl.js} +2 -2
  14. package/dist/chunks/{ContextMenu-TK4-wzDb.js.map → ContextMenu-pXNFdhbl.js.map} +1 -1
  15. package/dist/chunks/{DataView-Qnk-TnHd.js → DataView-CMd3nckm.js} +2 -2
  16. package/dist/chunks/{DataView-Qnk-TnHd.js.map → DataView-CMd3nckm.js.map} +1 -1
  17. package/dist/chunks/{DataView-CHoPxbYT.js → DataView-D4G05RAV.js} +2 -2
  18. package/dist/chunks/{DataView-CHoPxbYT.js.map → DataView-D4G05RAV.js.map} +1 -1
  19. package/dist/chunks/{Dialog-DbZ2jB_m.js → Dialog-BuNPCIb4.js} +5 -5
  20. package/dist/chunks/{Dialog-DbZ2jB_m.js.map → Dialog-BuNPCIb4.js.map} +1 -1
  21. package/dist/chunks/{Dialog-B_ZJYlVS.js → Dialog-DlEYRkv-.js} +2 -2
  22. package/dist/chunks/{Dialog-B_ZJYlVS.js.map → Dialog-DlEYRkv-.js.map} +1 -1
  23. package/dist/chunks/{FilePreviewView-DeGgRRbW.js → FilePreviewView-BM4SUlOg.js} +2 -2
  24. package/dist/chunks/{FilePreviewView-DeGgRRbW.js.map → FilePreviewView-BM4SUlOg.js.map} +1 -1
  25. package/dist/chunks/{FilePreviewView-nuZku1yG.js → FilePreviewView-Bb0x1dL3.js} +25 -18
  26. package/dist/chunks/{FilePreviewView-nuZku1yG.js.map → FilePreviewView-Bb0x1dL3.js.map} +1 -1
  27. package/dist/chunks/{FormView-BDKrUX1-.js → FormView-CKGDtfCk.js} +68 -14
  28. package/dist/chunks/FormView-CKGDtfCk.js.map +1 -0
  29. package/dist/chunks/{FormView-BZInlDfZ.js → FormView-CSBAU5VK.js} +3 -2
  30. package/dist/chunks/FormView-CSBAU5VK.js.map +1 -0
  31. package/dist/chunks/{MetricsChart-Aqum5Znr.js → MetricsChart-BDNoq2zS.js} +3 -3
  32. package/dist/chunks/{MetricsChart-Aqum5Znr.js.map → MetricsChart-BDNoq2zS.js.map} +1 -1
  33. package/dist/chunks/{MetricsChart-BbaBczOZ.js → MetricsChart-BdO9G_5-.js} +2 -2
  34. package/dist/chunks/{MetricsChart-BbaBczOZ.js.map → MetricsChart-BdO9G_5-.js.map} +1 -1
  35. package/dist/chunks/{PDFViewer-Bq-NM6JH.js → PDFViewer-DdZdueyK.js} +2 -2
  36. package/dist/chunks/{PDFViewer-Bq-NM6JH.js.map → PDFViewer-DdZdueyK.js.map} +1 -1
  37. package/dist/chunks/{PDFViewer-CGj7cZut.js → PDFViewer-Ds8kDWiF.js} +3 -3
  38. package/dist/chunks/{PDFViewer-CGj7cZut.js.map → PDFViewer-Ds8kDWiF.js.map} +1 -1
  39. package/dist/chunks/{Page-QhPYRY-q.js → Page-B-G-nq-K.js} +2 -2
  40. package/dist/chunks/{Page-QhPYRY-q.js.map → Page-B-G-nq-K.js.map} +1 -1
  41. package/dist/chunks/{Page-BkkXMFuP.js → Page-CsFumM60.js} +2 -2
  42. package/dist/chunks/{Page-BkkXMFuP.js.map → Page-CsFumM60.js.map} +1 -1
  43. package/dist/chunks/{TopNav-D6c7gsox.js → TopNav-BwTzAU7I.js} +2 -2
  44. package/dist/chunks/{TopNav-D6c7gsox.js.map → TopNav-BwTzAU7I.js.map} +1 -1
  45. package/dist/chunks/{TopNav-DUwNnOuM.js → TopNav-BzcFnFt0.js} +2 -2
  46. package/dist/chunks/{TopNav-DUwNnOuM.js.map → TopNav-BzcFnFt0.js.map} +1 -1
  47. package/dist/chunks/{WebApp-BPWJVv80.js → WebApp-BXOZii-s.js} +39 -24
  48. package/dist/chunks/WebApp-BXOZii-s.js.map +1 -0
  49. package/dist/chunks/WebApp-BYO0uKSI.js +2 -0
  50. package/dist/chunks/WebApp-BYO0uKSI.js.map +1 -0
  51. package/dist/docit.cjs.js +1 -1
  52. package/dist/docit.es.js +5 -5
  53. package/dist/index.cjs.js +1 -1
  54. package/dist/index.es.js +11 -11
  55. package/dist/lightbox.cjs.js +1 -1
  56. package/dist/lightbox.es.js +4 -4
  57. package/package.json +1 -1
  58. package/dist/chunks/FormView-BDKrUX1-.js.map +0 -1
  59. package/dist/chunks/FormView-BZInlDfZ.js.map +0 -1
  60. package/dist/chunks/WebApp-BPWJVv80.js.map +0 -1
  61. package/dist/chunks/WebApp-CYqazUo5.js +0 -2
  62. 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-BPWJVv80.js";
1
+ import { M as Mustache, h as MOJOUtils, V as View } from "./WebApp-BXOZii-s.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.handleRangeChange(
3785
- start ? this.formatDate(start, this.format) : "",
3786
- end ? this.formatDate(end, this.format) : ""
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
- const d = new Date(date);
3891
- if (isNaN(d.getTime())) return "";
3892
- const year = d.getFullYear();
3893
- const month = String(d.getMonth() + 1).padStart(2, "0");
3894
- const day = String(d.getDate()).padStart(2, "0");
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
- return `${monthNames[d.getMonth()]} ${day}, ${year}`;
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
- if (startInput) startInput.value = this.currentStartDate ? this.formatForOutput(this.currentStartDate) : "";
3989
- if (endInput) endInput.value = this.currentEndDate ? this.formatForOutput(this.currentEndDate) : "";
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-BDKrUX1-.js.map
6008
+ //# sourceMappingURL=FormView-CKGDtfCk.js.map