web-mojo 2.1.148 → 2.1.150

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 (67) hide show
  1. package/dist/admin.cjs.js +1 -1
  2. package/dist/admin.es.js +11 -11
  3. package/dist/auth.cjs.js +1 -1
  4. package/dist/auth.cjs.js.map +1 -1
  5. package/dist/auth.es.js +3 -3
  6. package/dist/auth.es.js.map +1 -1
  7. package/dist/charts.cjs.js +1 -1
  8. package/dist/charts.es.js +2 -2
  9. package/dist/chunks/{ContextMenu-BD2Mq0HO.js → ContextMenu-QF9ZwZrY.js} +2 -2
  10. package/dist/chunks/{ContextMenu-BD2Mq0HO.js.map → ContextMenu-QF9ZwZrY.js.map} +1 -1
  11. package/dist/chunks/{ContextMenu-Kmf5lBFO.js → ContextMenu-XiQkI2dD.js} +2 -2
  12. package/dist/chunks/{ContextMenu-Kmf5lBFO.js.map → ContextMenu-XiQkI2dD.js.map} +1 -1
  13. package/dist/chunks/{DataView-BIhNGfi4.js → DataView-DLwwky88.js} +2 -2
  14. package/dist/chunks/{DataView-BIhNGfi4.js.map → DataView-DLwwky88.js.map} +1 -1
  15. package/dist/chunks/{DataView-CTdUJoOT.js → DataView-MS4cRzLQ.js} +2 -2
  16. package/dist/chunks/{DataView-CTdUJoOT.js.map → DataView-MS4cRzLQ.js.map} +1 -1
  17. package/dist/chunks/{Dialog-ZdL6pkRV.js → Dialog-BXp4_OKF.js} +10 -6
  18. package/dist/chunks/{Dialog-ZdL6pkRV.js.map → Dialog-BXp4_OKF.js.map} +1 -1
  19. package/dist/chunks/{Dialog-BxfPKg0I.js → Dialog-Qec_9opM.js} +2 -2
  20. package/dist/chunks/{Dialog-BxfPKg0I.js.map → Dialog-Qec_9opM.js.map} +1 -1
  21. package/dist/chunks/{FilePreviewView-CKG0cTAb.js → FilePreviewView-BXIfs9s2.js} +2 -2
  22. package/dist/chunks/{FilePreviewView-CKG0cTAb.js.map → FilePreviewView-BXIfs9s2.js.map} +1 -1
  23. package/dist/chunks/{FilePreviewView-BaB9mH6Z.js → FilePreviewView-CMV_GXSo.js} +17 -6
  24. package/dist/chunks/{FilePreviewView-BaB9mH6Z.js.map → FilePreviewView-CMV_GXSo.js.map} +1 -1
  25. package/dist/chunks/FormView-BxJB5CR4.js +2 -0
  26. package/dist/chunks/FormView-BxJB5CR4.js.map +1 -0
  27. package/dist/chunks/{FormView-DWZpiMt-.js → FormView-W8hQ1TSD.js} +65 -2
  28. package/dist/chunks/FormView-W8hQ1TSD.js.map +1 -0
  29. package/dist/chunks/{MetricsChart--dg0dX5p.js → MetricsChart-Cp8yjAov.js} +3 -3
  30. package/dist/chunks/{MetricsChart--dg0dX5p.js.map → MetricsChart-Cp8yjAov.js.map} +1 -1
  31. package/dist/chunks/{MetricsChart-sc1d5n8r.js → MetricsChart-D16WsIML.js} +2 -2
  32. package/dist/chunks/{MetricsChart-sc1d5n8r.js.map → MetricsChart-D16WsIML.js.map} +1 -1
  33. package/dist/chunks/{PDFViewer-BwtpTuNi.js → PDFViewer-DBQedX8U.js} +2 -2
  34. package/dist/chunks/{PDFViewer-BwtpTuNi.js.map → PDFViewer-DBQedX8U.js.map} +1 -1
  35. package/dist/chunks/{PDFViewer-CreSzhQh.js → PDFViewer-DuTWfs3P.js} +3 -3
  36. package/dist/chunks/{PDFViewer-CreSzhQh.js.map → PDFViewer-DuTWfs3P.js.map} +1 -1
  37. package/dist/chunks/{Page-CylN9BT4.js → Page-DiQtAn7T.js} +2 -2
  38. package/dist/chunks/{Page-CylN9BT4.js.map → Page-DiQtAn7T.js.map} +1 -1
  39. package/dist/chunks/{Page-xC4O39VU.js → Page-q5jV9C1F.js} +2 -2
  40. package/dist/chunks/{Page-xC4O39VU.js.map → Page-q5jV9C1F.js.map} +1 -1
  41. package/dist/chunks/{TopNav-DYiaDJhN.js → TopNav-YVTSw6Nr.js} +2 -2
  42. package/dist/chunks/{TopNav-DYiaDJhN.js.map → TopNav-YVTSw6Nr.js.map} +1 -1
  43. package/dist/chunks/{TopNav-CnPSzhmm.js → TopNav-f8K7Hflv.js} +2 -2
  44. package/dist/chunks/{TopNav-CnPSzhmm.js.map → TopNav-f8K7Hflv.js.map} +1 -1
  45. package/dist/chunks/{User-BSjI92_2.js → User-Cg7Ioqxu.js} +2 -2
  46. package/dist/chunks/{User-BSjI92_2.js.map → User-Cg7Ioqxu.js.map} +1 -1
  47. package/dist/chunks/{User-B2ZZnkfJ.js → User-DuqQ4_pt.js} +2 -2
  48. package/dist/chunks/{User-B2ZZnkfJ.js.map → User-DuqQ4_pt.js.map} +1 -1
  49. package/dist/chunks/WebApp-B9-TnsfD.js +2 -0
  50. package/dist/chunks/WebApp-B9-TnsfD.js.map +1 -0
  51. package/dist/chunks/{WebApp-fCAzeIRX.js → WebApp-ORVEEBcu.js} +40 -17
  52. package/dist/chunks/WebApp-ORVEEBcu.js.map +1 -0
  53. package/dist/docit.cjs.js +1 -1
  54. package/dist/docit.es.js +6 -6
  55. package/dist/index.cjs.js +1 -1
  56. package/dist/index.cjs.js.map +1 -1
  57. package/dist/index.es.js +14 -10
  58. package/dist/index.es.js.map +1 -1
  59. package/dist/lightbox.cjs.js +1 -1
  60. package/dist/lightbox.es.js +4 -4
  61. package/package.json +1 -1
  62. package/dist/chunks/FormView-DWZpiMt-.js.map +0 -1
  63. package/dist/chunks/FormView-Dhufnc7l.js +0 -2
  64. package/dist/chunks/FormView-Dhufnc7l.js.map +0 -1
  65. package/dist/chunks/WebApp-3w-NBj8q.js +0 -2
  66. package/dist/chunks/WebApp-3w-NBj8q.js.map +0 -1
  67. package/dist/chunks/WebApp-fCAzeIRX.js.map +0 -1
@@ -1,8 +1,8 @@
1
- const VERSION = "2.1.148";
1
+ const VERSION = "2.1.150";
2
2
  const VERSION_MAJOR = 2;
3
3
  const VERSION_MINOR = 1;
4
- const VERSION_REVISION = 148;
5
- const BUILD_TIME = "2025-09-17T18:42:44.113Z";
4
+ const VERSION_REVISION = 150;
5
+ const BUILD_TIME = "2025-09-17T23:52:02.571Z";
6
6
  const VERSION_INFO = {
7
7
  full: VERSION,
8
8
  major: VERSION_MAJOR,
@@ -882,16 +882,39 @@ class DataFormatter {
882
882
  }
883
883
  /**
884
884
  * Format currency
885
- * @param {*} value - Number value
885
+ * @param {*} value - Number value in cents
886
886
  * @param {string} symbol - Currency symbol
887
887
  * @param {number} decimals - Decimal places
888
888
  * @returns {string} Formatted currency
889
889
  */
890
890
  currency(value, symbol = "$", decimals = 2) {
891
- const num = parseFloat(value);
891
+ const num = parseInt(value);
892
892
  if (isNaN(num)) return String(value);
893
- const formatted = this.number(num, decimals);
894
- return symbol + formatted;
893
+ const centsStr = Math.abs(num).toString();
894
+ const sign = num < 0 ? "-" : "";
895
+ let dollars, cents;
896
+ if (centsStr.length <= 2) {
897
+ dollars = "0";
898
+ cents = centsStr.padStart(2, "0");
899
+ } else {
900
+ dollars = centsStr.slice(0, -2);
901
+ cents = centsStr.slice(-2);
902
+ }
903
+ dollars = dollars.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
904
+ let formatted;
905
+ if (decimals === 0) {
906
+ const totalCents = parseInt(cents);
907
+ if (totalCents >= 50) {
908
+ dollars = (parseInt(dollars.replace(/,/g, "")) + 1).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
909
+ }
910
+ formatted = dollars;
911
+ } else if (decimals === 2) {
912
+ formatted = `${dollars}.${cents}`;
913
+ } else {
914
+ const adjustedCents = cents.slice(0, decimals).padEnd(decimals, "0");
915
+ formatted = `${dollars}.${adjustedCents}`;
916
+ }
917
+ return sign + symbol + formatted;
895
918
  }
896
919
  /**
897
920
  * Format percentage
@@ -1126,7 +1149,7 @@ class DataFormatter {
1126
1149
  inferBadgeType(text) {
1127
1150
  const lowered = text.toLowerCase();
1128
1151
  if (["active", "success", "complete", "completed", "approved", "done", "true", "on", "yes"].includes(lowered)) return "success";
1129
- if (["error", "failed", "rejected", "deleted", "cancelled", "false", "off", "no"].includes(lowered)) return "danger";
1152
+ if (["error", "failed", "rejected", "deleted", "cancelled", "false", "off", "no", "declined"].includes(lowered)) return "danger";
1130
1153
  if (["warning", "pending", "review", "processing", "uploading"].includes(lowered)) return "warning";
1131
1154
  if (["info", "new", "draft"].includes(lowered)) return "info";
1132
1155
  if (["inactive", "disabled", "archived", "suspended"].includes(lowered)) return "secondary";
@@ -4571,7 +4594,7 @@ class WebApp {
4571
4594
  */
4572
4595
  async showError(message) {
4573
4596
  try {
4574
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4597
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4575
4598
  await Dialog.alert(message, "Error", { size: "md", class: "text-danger" });
4576
4599
  } catch (e) {
4577
4600
  this.events.emit("notification", { message, type: "error" });
@@ -4588,7 +4611,7 @@ class WebApp {
4588
4611
  */
4589
4612
  async showSuccess(message) {
4590
4613
  try {
4591
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4614
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4592
4615
  await Dialog.alert(message, "Success", { size: "md", class: "text-success" });
4593
4616
  } catch (e) {
4594
4617
  this.events.emit("notification", { message, type: "success" });
@@ -4605,7 +4628,7 @@ class WebApp {
4605
4628
  */
4606
4629
  async showInfo(message) {
4607
4630
  try {
4608
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4631
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4609
4632
  await Dialog.alert(message, "Information", { size: "md", class: "text-info" });
4610
4633
  } catch (e) {
4611
4634
  this.events.emit("notification", { message, type: "info" });
@@ -4622,7 +4645,7 @@ class WebApp {
4622
4645
  */
4623
4646
  async showWarning(message) {
4624
4647
  try {
4625
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4648
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4626
4649
  await Dialog.alert(message, "Warning", { size: "md", class: "text-warning" });
4627
4650
  } catch (e) {
4628
4651
  this.events.emit("notification", { message, type: "warning" });
@@ -4648,7 +4671,7 @@ class WebApp {
4648
4671
  opts = { message: opts };
4649
4672
  }
4650
4673
  try {
4651
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4674
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4652
4675
  Dialog.showBusy(opts);
4653
4676
  } catch (e) {
4654
4677
  if (typeof window !== "undefined" && window?.console) {
@@ -4662,7 +4685,7 @@ class WebApp {
4662
4685
  */
4663
4686
  async hideLoading() {
4664
4687
  try {
4665
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4688
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4666
4689
  Dialog.hideBusy();
4667
4690
  } catch (e) {
4668
4691
  if (typeof window !== "undefined" && window?.console) {
@@ -4672,7 +4695,7 @@ class WebApp {
4672
4695
  }
4673
4696
  async showModelForm(options = {}) {
4674
4697
  try {
4675
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4698
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4676
4699
  return await Dialog.showModelForm(options);
4677
4700
  } catch (e) {
4678
4701
  if (typeof window !== "undefined" && window?.console) {
@@ -4683,7 +4706,7 @@ class WebApp {
4683
4706
  }
4684
4707
  async showForm(options = {}) {
4685
4708
  try {
4686
- const Dialog = (await import("./Dialog-ZdL6pkRV.js")).default;
4709
+ const Dialog = (await import("./Dialog-BXp4_OKF.js")).default;
4687
4710
  return await Dialog.showForm(options);
4688
4711
  } catch (e) {
4689
4712
  if (typeof window !== "undefined" && window?.console) {
@@ -4899,4 +4922,4 @@ export {
4899
4922
  EventEmitter as i,
4900
4923
  rest as r
4901
4924
  };
4902
- //# sourceMappingURL=WebApp-fCAzeIRX.js.map
4925
+ //# sourceMappingURL=WebApp-ORVEEBcu.js.map