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,4 +1,4 @@
1
- import { M as Mustache, h as MOJOUtils, V as View } from "./WebApp-fCAzeIRX.js";
1
+ import { M as Mustache, h as MOJOUtils, V as View } from "./WebApp-ORVEEBcu.js";
2
2
  class FormBuilder {
3
3
  constructor(config = {}) {
4
4
  this.fields = config.fields || [];
@@ -469,6 +469,9 @@ class FormBuilder {
469
469
  case "search":
470
470
  fieldHTML = this.renderSearchField(field);
471
471
  break;
472
+ case "hex":
473
+ fieldHTML = this.renderHexField(field);
474
+ break;
472
475
  case "textarea":
473
476
  fieldHTML = this.renderTextareaField(field);
474
477
  break;
@@ -644,6 +647,66 @@ class FormBuilder {
644
647
  };
645
648
  return this.renderInputField(searchField, "search");
646
649
  }
650
+ /**
651
+ * Render hex input field with validation
652
+ * @param {Object} field - Field configuration
653
+ * @returns {string} Field HTML
654
+ */
655
+ renderHexField(field) {
656
+ const {
657
+ hexType = "color",
658
+ // 'color', 'string', 'any'
659
+ allowPrefix = true,
660
+ minLength: originalMinLength,
661
+ maxLength: originalMaxLength,
662
+ ...baseField
663
+ } = field;
664
+ let pattern, minLength, maxLength, placeholder, help;
665
+ switch (hexType) {
666
+ case "color":
667
+ pattern = allowPrefix ? "^#?[0-9A-Fa-f]{6}$" : "^[0-9A-Fa-f]{6}$";
668
+ minLength = allowPrefix ? 6 : 6;
669
+ maxLength = allowPrefix ? 7 : 6;
670
+ placeholder = allowPrefix ? "#FF0000" : "FF0000";
671
+ help = help || "Enter a valid hex color (e.g., " + placeholder + ")";
672
+ break;
673
+ case "color-short":
674
+ pattern = allowPrefix ? "^#?[0-9A-Fa-f]{3}([0-9A-Fa-f]{3})?$" : "^[0-9A-Fa-f]{3}([0-9A-Fa-f]{3})?$";
675
+ minLength = allowPrefix ? 4 : 3;
676
+ maxLength = allowPrefix ? 7 : 6;
677
+ placeholder = allowPrefix ? "#F00 or #FF0000" : "F00 or FF0000";
678
+ help = help || "Enter a valid hex color (3 or 6 digits)";
679
+ break;
680
+ case "string":
681
+ pattern = "^[0-9A-Fa-f]+$";
682
+ minLength = originalMinLength || 1;
683
+ maxLength = originalMaxLength || 64;
684
+ placeholder = "ABCDEF123456";
685
+ help = help || "Only hexadecimal characters (0-9, A-F) allowed";
686
+ break;
687
+ default:
688
+ pattern = allowPrefix ? "^#?[0-9A-Fa-f]+$" : "^[0-9A-Fa-f]+$";
689
+ minLength = originalMinLength || 1;
690
+ maxLength = originalMaxLength || 64;
691
+ placeholder = allowPrefix ? "#ABCDEF or ABCDEF" : "ABCDEF";
692
+ help = help || "Enter hexadecimal characters only";
693
+ }
694
+ const hexField = {
695
+ ...baseField,
696
+ pattern,
697
+ minLength,
698
+ maxLength,
699
+ placeholder: baseField.placeholder || placeholder,
700
+ help: baseField.help || help,
701
+ attributes: {
702
+ "data-hex-type": hexType,
703
+ "data-allow-prefix": allowPrefix,
704
+ "style": "text-transform: uppercase;",
705
+ ...baseField.attributes
706
+ }
707
+ };
708
+ return this.renderInputField(hexField, "text");
709
+ }
647
710
  /**
648
711
  * Render generic input field
649
712
  * @param {Object} field - Field configuration
@@ -5119,4 +5182,4 @@ export {
5119
5182
  applyFileDropMixin as a,
5120
5183
  FormView$1 as b
5121
5184
  };
5122
- //# sourceMappingURL=FormView-DWZpiMt-.js.map
5185
+ //# sourceMappingURL=FormView-W8hQ1TSD.js.map