web-mojo 2.1.278 → 2.1.293

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 (73) 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 +50 -24
  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 +4 -4
  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-BGyC31Bb.js → ContextMenu-BjVloqhO.js} +2 -2
  12. package/dist/chunks/{ContextMenu-BGyC31Bb.js.map → ContextMenu-BjVloqhO.js.map} +1 -1
  13. package/dist/chunks/{ContextMenu-B5-M-xk4.js → ContextMenu-Bq3Sk63z.js} +2 -2
  14. package/dist/chunks/{ContextMenu-B5-M-xk4.js.map → ContextMenu-Bq3Sk63z.js.map} +1 -1
  15. package/dist/chunks/{DataView-D5GAnAwy.js → DataView-DSffeJPt.js} +2 -2
  16. package/dist/chunks/{DataView-D5GAnAwy.js.map → DataView-DSffeJPt.js.map} +1 -1
  17. package/dist/chunks/{DataView-b_MvCVHp.js → DataView-DpN6nZyx.js} +2 -2
  18. package/dist/chunks/{DataView-b_MvCVHp.js.map → DataView-DpN6nZyx.js.map} +1 -1
  19. package/dist/chunks/{Dialog-Cb3hStew.js → Dialog-B-xeiWoZ.js} +2 -2
  20. package/dist/chunks/{Dialog-Cb3hStew.js.map → Dialog-B-xeiWoZ.js.map} +1 -1
  21. package/dist/chunks/{Dialog-DL2qXPTj.js → Dialog-DABzZgHE.js} +5 -5
  22. package/dist/chunks/{Dialog-DL2qXPTj.js.map → Dialog-DABzZgHE.js.map} +1 -1
  23. package/dist/chunks/{FilePreviewView-BrrJorTn.js → FilePreviewView-DAylqNlT.js} +43 -22
  24. package/dist/chunks/FilePreviewView-DAylqNlT.js.map +1 -0
  25. package/dist/chunks/FilePreviewView-ao338Cc-.js +2 -0
  26. package/dist/chunks/FilePreviewView-ao338Cc-.js.map +1 -0
  27. package/dist/chunks/{FormView-BCnSXvaY.js → FormView-CqMNFJH3.js} +2 -2
  28. package/dist/chunks/{FormView-BCnSXvaY.js.map → FormView-CqMNFJH3.js.map} +1 -1
  29. package/dist/chunks/{FormView-FTVjKzXh.js → FormView-D6AaJFST.js} +2 -2
  30. package/dist/chunks/{FormView-FTVjKzXh.js.map → FormView-D6AaJFST.js.map} +1 -1
  31. package/dist/chunks/{MetricsChart-DFNBNWw7.js → MetricsChart-BK8_oDa0.js} +2 -2
  32. package/dist/chunks/{MetricsChart-DFNBNWw7.js.map → MetricsChart-BK8_oDa0.js.map} +1 -1
  33. package/dist/chunks/{MetricsChart-B0YqU0CD.js → MetricsChart-DBMCRgRZ.js} +3 -3
  34. package/dist/chunks/{MetricsChart-B0YqU0CD.js.map → MetricsChart-DBMCRgRZ.js.map} +1 -1
  35. package/dist/chunks/{PDFViewer-B9OppITV.js → PDFViewer-B5S4w9kW.js} +3 -3
  36. package/dist/chunks/{PDFViewer-B9OppITV.js.map → PDFViewer-B5S4w9kW.js.map} +1 -1
  37. package/dist/chunks/{PDFViewer-uSCAzgto.js → PDFViewer-CxhCI5DT.js} +2 -2
  38. package/dist/chunks/{PDFViewer-uSCAzgto.js.map → PDFViewer-CxhCI5DT.js.map} +1 -1
  39. package/dist/chunks/{Page-BnWHjjZe.js → Page-BPTrSC_6.js} +2 -2
  40. package/dist/chunks/{Page-BnWHjjZe.js.map → Page-BPTrSC_6.js.map} +1 -1
  41. package/dist/chunks/{Page-lvFkx9ma.js → Page-y3_msZfw.js} +2 -2
  42. package/dist/chunks/{Page-lvFkx9ma.js.map → Page-y3_msZfw.js.map} +1 -1
  43. package/dist/chunks/{TokenManager-gp1JKXNd.js → TokenManager-Bv9T1Pxb.js} +2 -2
  44. package/dist/chunks/TokenManager-Bv9T1Pxb.js.map +1 -0
  45. package/dist/chunks/{TokenManager-5HHjYzTo.js → TokenManager-Fjt083wv.js} +1 -2
  46. package/dist/chunks/TokenManager-Fjt083wv.js.map +1 -0
  47. package/dist/chunks/{TopNav-8K9q8FgL.js → TopNav-Dr1D1dJk.js} +2 -2
  48. package/dist/chunks/{TopNav-8K9q8FgL.js.map → TopNav-Dr1D1dJk.js.map} +1 -1
  49. package/dist/chunks/{TopNav-C86aDfet.js → TopNav-pjxxDjab.js} +2 -2
  50. package/dist/chunks/{TopNav-C86aDfet.js.map → TopNav-pjxxDjab.js.map} +1 -1
  51. package/dist/chunks/{User-DbeMvd6x.js → User-Fxvta-V-.js} +2 -2
  52. package/dist/chunks/{User-DbeMvd6x.js.map → User-Fxvta-V-.js.map} +1 -1
  53. package/dist/chunks/{User-DIhA4ryO.js → User-rCm0wiQR.js} +2 -2
  54. package/dist/chunks/{User-DIhA4ryO.js.map → User-rCm0wiQR.js.map} +1 -1
  55. package/dist/chunks/WebApp-DArUlwqG.js +2 -0
  56. package/dist/chunks/WebApp-DArUlwqG.js.map +1 -0
  57. package/dist/chunks/{WebApp-_cIASgB0.js → WebApp-RFk2FBx5.js} +136 -13
  58. package/dist/chunks/WebApp-RFk2FBx5.js.map +1 -0
  59. package/dist/docit.cjs.js +1 -1
  60. package/dist/docit.es.js +7 -7
  61. package/dist/index.cjs.js +1 -1
  62. package/dist/index.es.js +12 -12
  63. package/dist/lightbox.cjs.js +1 -1
  64. package/dist/lightbox.es.js +4 -4
  65. package/package.json +1 -1
  66. package/dist/chunks/FilePreviewView-BrrJorTn.js.map +0 -1
  67. package/dist/chunks/FilePreviewView-DfSMNOwF.js +0 -2
  68. package/dist/chunks/FilePreviewView-DfSMNOwF.js.map +0 -1
  69. package/dist/chunks/TokenManager-5HHjYzTo.js.map +0 -1
  70. package/dist/chunks/TokenManager-gp1JKXNd.js.map +0 -1
  71. package/dist/chunks/WebApp-BIxs8_cJ.js +0 -2
  72. package/dist/chunks/WebApp-BIxs8_cJ.js.map +0 -1
  73. package/dist/chunks/WebApp-_cIASgB0.js.map +0 -1
@@ -1,8 +1,8 @@
1
- const VERSION = "2.1.278";
1
+ const VERSION = "2.1.293";
2
2
  const VERSION_MAJOR = 2;
3
3
  const VERSION_MINOR = 1;
4
- const VERSION_REVISION = 278;
5
- const BUILD_TIME = "2025-09-25T21:11:04.603Z";
4
+ const VERSION_REVISION = 293;
5
+ const BUILD_TIME = "2025-09-26T13:04:43.978Z";
6
6
  const VERSION_INFO = {
7
7
  full: VERSION,
8
8
  major: VERSION_MAJOR,
@@ -510,6 +510,8 @@ class DataFormatter {
510
510
  this.register("date", this.date.bind(this));
511
511
  this.register("time", this.time.bind(this));
512
512
  this.register("datetime", this.datetime.bind(this));
513
+ this.register("datetime_tz", this.datetime_tz.bind(this));
514
+ this.register("datatime_tz", this.datetime_tz.bind(this));
513
515
  this.register("relative", this.relative.bind(this));
514
516
  this.register("fromNow", this.relative.bind(this));
515
517
  this.register("iso", this.iso.bind(this));
@@ -786,12 +788,133 @@ class DataFormatter {
786
788
  * @param {string} timeFormat - Time format
787
789
  * @returns {string} Formatted datetime
788
790
  */
789
- datetime(value, dateFormat = "MM/DD/YYYY", timeFormat = "HH:mm") {
791
+ datetime(value, dateFormat = "MM/DD/YYYY", timeFormat = "HH:mm:ss") {
790
792
  value = this.normalizeEpoch(value);
791
793
  const dateStr = this.date(value, dateFormat);
792
794
  const timeStr = this.time(value, timeFormat);
793
795
  return dateStr && timeStr ? `${dateStr} ${timeStr}` : "";
794
796
  }
797
+ /**
798
+ * Format date and time with short timezone abbreviation (e.g., EST, PDT)
799
+ * @param {*} value - DateTime value
800
+ * @param {string} dateFormat - Date format
801
+ * @param {string} timeFormat - Time format
802
+ * @param {Object} options - Options: { timeZone?: string, locale?: string }
803
+ * @returns {string} Formatted datetime with timezone abbreviation
804
+ */
805
+ datetime_tz(value, dateFormat = "MM/DD/YYYY", timeFormat = "HH:mm:ss", options = {}) {
806
+ if (!value) return "";
807
+ value = this.normalizeEpoch(value);
808
+ const date = value instanceof Date ? value : new Date(value);
809
+ if (isNaN(date.getTime())) return String(value);
810
+ const locale = options && options.locale || "en-US";
811
+ const timeZone = options && options.timeZone ? options.timeZone : void 0;
812
+ const getTzAbbr = () => {
813
+ let abbr2 = "";
814
+ try {
815
+ const parts2 = new Intl.DateTimeFormat(locale, {
816
+ hour: "2-digit",
817
+ minute: "2-digit",
818
+ timeZoneName: "short",
819
+ ...timeZone ? { timeZone } : {}
820
+ }).formatToParts(date);
821
+ const tzPart = parts2.find((p) => p.type === "timeZoneName");
822
+ abbr2 = tzPart ? tzPart.value : "";
823
+ if (abbr2 && /^GMT[+-]/i.test(abbr2)) {
824
+ try {
825
+ const parts22 = new Intl.DateTimeFormat(locale, {
826
+ timeStyle: "short",
827
+ timeZoneName: "short",
828
+ ...timeZone ? { timeZone } : {}
829
+ }).formatToParts(date);
830
+ const tz2 = parts22.find((p) => p.type === "timeZoneName");
831
+ if (tz2 && tz2.value && !/^GMT[+-]/i.test(tz2.value)) {
832
+ abbr2 = tz2.value;
833
+ }
834
+ } catch (e) {
835
+ }
836
+ }
837
+ if (abbr2 && /\s/.test(abbr2)) {
838
+ const initials = abbr2.split(/\s+/).map((w) => w[0]).join("").toUpperCase();
839
+ if (initials.length >= 2 && initials.length <= 4) {
840
+ abbr2 = initials;
841
+ }
842
+ }
843
+ } catch (e) {
844
+ abbr2 = "";
845
+ }
846
+ return abbr2;
847
+ };
848
+ if (!timeZone) {
849
+ const dateStr2 = this.date(date, dateFormat);
850
+ const timeStr2 = this.time(date, timeFormat);
851
+ const abbr2 = getTzAbbr();
852
+ return dateStr2 && timeStr2 ? `${dateStr2} ${timeStr2} ${abbr2}`.trim() : "";
853
+ }
854
+ const parts = new Intl.DateTimeFormat(locale, {
855
+ timeZone,
856
+ year: "numeric",
857
+ month: "2-digit",
858
+ day: "2-digit",
859
+ hour: "2-digit",
860
+ minute: "2-digit",
861
+ second: "2-digit",
862
+ hourCycle: "h23"
863
+ }).formatToParts(date);
864
+ const get = (type) => {
865
+ const p = parts.find((pt) => pt.type === type);
866
+ return p ? p.value : "";
867
+ };
868
+ const y4 = get("year");
869
+ const M2 = get("month");
870
+ const D2 = get("day");
871
+ const H2 = get("hour");
872
+ const m2 = get("minute");
873
+ const s2 = get("second");
874
+ const M = M2 ? String(parseInt(M2, 10)) : "";
875
+ const D = D2 ? String(parseInt(D2, 10)) : "";
876
+ const H = H2 ? String(parseInt(H2, 10)) : "";
877
+ const hNum = H2 ? parseInt(H2, 10) % 12 || 12 : "";
878
+ const A = H2 ? parseInt(H2, 10) >= 12 ? "PM" : "AM" : "";
879
+ const a = A ? A.toLowerCase() : "";
880
+ const monthLong = new Intl.DateTimeFormat(locale, { timeZone, month: "long" }).format(date);
881
+ const monthShort = new Intl.DateTimeFormat(locale, { timeZone, month: "short" }).format(date);
882
+ const weekdayLong = new Intl.DateTimeFormat(locale, { timeZone, weekday: "long" }).format(date);
883
+ const weekdayShort = new Intl.DateTimeFormat(locale, { timeZone, weekday: "short" }).format(date);
884
+ const dateTokens = {
885
+ "YYYY": y4,
886
+ "YY": y4 ? y4.slice(-2) : "",
887
+ "MMMM": monthLong,
888
+ "MMM": monthShort,
889
+ "MM": M2,
890
+ "M": M,
891
+ "dddd": weekdayLong,
892
+ "ddd": weekdayShort,
893
+ "DD": D2,
894
+ "D": D
895
+ };
896
+ const timeTokens = {
897
+ "HH": H2,
898
+ "H": H,
899
+ "hh": hNum !== "" ? String(hNum).padStart(2, "0") : "",
900
+ "h": hNum !== "" ? String(hNum) : "",
901
+ "mm": m2,
902
+ "m": m2 ? String(parseInt(m2, 10)) : "",
903
+ "ss": s2,
904
+ "s": s2 ? String(parseInt(s2, 10)) : "",
905
+ "A": A,
906
+ "a": a
907
+ };
908
+ const replaceTokens = (fmt, tokens) => {
909
+ if (!fmt) return "";
910
+ const pattern = new RegExp(`(${Object.keys(tokens).sort((a2, b) => b.length - a2.length).join("|")})`, "g");
911
+ return fmt.replace(pattern, (match) => tokens[match] ?? match);
912
+ };
913
+ const dateStr = replaceTokens(dateFormat, dateTokens);
914
+ const timeStr = replaceTokens(timeFormat, timeTokens);
915
+ const abbr = getTzAbbr();
916
+ return dateStr && timeStr ? `${dateStr} ${timeStr} ${abbr}`.trim() : "";
917
+ }
795
918
  normalizeEpoch(value) {
796
919
  if (typeof value !== "number") value = Number(value);
797
920
  if (isNaN(value)) return "";
@@ -4606,7 +4729,7 @@ class WebApp {
4606
4729
  */
4607
4730
  async showError(message) {
4608
4731
  try {
4609
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4732
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4610
4733
  await Dialog.alert(message, "Error", { size: "md", class: "text-danger" });
4611
4734
  } catch (e) {
4612
4735
  this.events.emit("notification", { message, type: "error" });
@@ -4623,7 +4746,7 @@ class WebApp {
4623
4746
  */
4624
4747
  async showSuccess(message) {
4625
4748
  try {
4626
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4749
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4627
4750
  await Dialog.alert(message, "Success", { size: "md", class: "text-success" });
4628
4751
  } catch (e) {
4629
4752
  this.events.emit("notification", { message, type: "success" });
@@ -4640,7 +4763,7 @@ class WebApp {
4640
4763
  */
4641
4764
  async showInfo(message) {
4642
4765
  try {
4643
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4766
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4644
4767
  await Dialog.alert(message, "Information", { size: "md", class: "text-info" });
4645
4768
  } catch (e) {
4646
4769
  this.events.emit("notification", { message, type: "info" });
@@ -4657,7 +4780,7 @@ class WebApp {
4657
4780
  */
4658
4781
  async showWarning(message) {
4659
4782
  try {
4660
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4783
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4661
4784
  await Dialog.alert(message, "Warning", { size: "md", class: "text-warning" });
4662
4785
  } catch (e) {
4663
4786
  this.events.emit("notification", { message, type: "warning" });
@@ -4683,7 +4806,7 @@ class WebApp {
4683
4806
  opts = { message: opts };
4684
4807
  }
4685
4808
  try {
4686
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4809
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4687
4810
  Dialog.showBusy(opts);
4688
4811
  } catch (e) {
4689
4812
  if (typeof window !== "undefined" && window?.console) {
@@ -4697,7 +4820,7 @@ class WebApp {
4697
4820
  */
4698
4821
  async hideLoading() {
4699
4822
  try {
4700
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4823
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4701
4824
  Dialog.hideBusy();
4702
4825
  } catch (e) {
4703
4826
  if (typeof window !== "undefined" && window?.console) {
@@ -4707,7 +4830,7 @@ class WebApp {
4707
4830
  }
4708
4831
  async showModelForm(options = {}) {
4709
4832
  try {
4710
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4833
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4711
4834
  return await Dialog.showModelForm(options);
4712
4835
  } catch (e) {
4713
4836
  if (typeof window !== "undefined" && window?.console) {
@@ -4718,7 +4841,7 @@ class WebApp {
4718
4841
  }
4719
4842
  async showForm(options = {}) {
4720
4843
  try {
4721
- const Dialog = (await import("./Dialog-DL2qXPTj.js")).default;
4844
+ const Dialog = (await import("./Dialog-DABzZgHE.js")).default;
4722
4845
  return await Dialog.showForm(options);
4723
4846
  } catch (e) {
4724
4847
  if (typeof window !== "undefined" && window?.console) {
@@ -4981,4 +5104,4 @@ export {
4981
5104
  EventEmitter as i,
4982
5105
  rest as r
4983
5106
  };
4984
- //# sourceMappingURL=WebApp-_cIASgB0.js.map
5107
+ //# sourceMappingURL=WebApp-RFk2FBx5.js.map