@bootkit/ng0 0.0.0-alpha.17 → 0.0.0-alpha.19

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/README.md +2 -2
  2. package/common/index.d.ts +60 -4
  3. package/components/list/index.d.ts +127 -0
  4. package/components/select/index.d.ts +120 -0
  5. package/components/table/index.d.ts +66 -10
  6. package/data/index.d.ts +158 -36
  7. package/fesm2022/bootkit-ng0-common.mjs +51 -1
  8. package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
  9. package/fesm2022/bootkit-ng0-components-accordion.mjs +14 -14
  10. package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
  11. package/fesm2022/bootkit-ng0-components-backdrop.mjs +4 -4
  12. package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -1
  13. package/fesm2022/bootkit-ng0-components-button.mjs +11 -11
  14. package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -1
  15. package/fesm2022/bootkit-ng0-components-card.mjs +12 -12
  16. package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -1
  17. package/fesm2022/bootkit-ng0-components-code.mjs +9 -9
  18. package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -1
  19. package/fesm2022/bootkit-ng0-components-collapse.mjs +14 -14
  20. package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
  21. package/fesm2022/bootkit-ng0-components-confirmation.mjs +14 -14
  22. package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
  23. package/fesm2022/bootkit-ng0-components-form-field.mjs +14 -14
  24. package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
  25. package/fesm2022/bootkit-ng0-components-list.mjs +331 -0
  26. package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -0
  27. package/fesm2022/bootkit-ng0-components-modal.mjs +13 -13
  28. package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
  29. package/fesm2022/bootkit-ng0-components-nav.mjs +27 -27
  30. package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
  31. package/fesm2022/bootkit-ng0-components-offcanvas.mjs +9 -9
  32. package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
  33. package/fesm2022/bootkit-ng0-components-overlay.mjs.map +1 -1
  34. package/fesm2022/bootkit-ng0-components-pagination.mjs +15 -15
  35. package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
  36. package/fesm2022/bootkit-ng0-components-popover.mjs +11 -11
  37. package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
  38. package/fesm2022/bootkit-ng0-components-select.mjs +394 -0
  39. package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -0
  40. package/fesm2022/bootkit-ng0-components-sidenav.mjs +21 -21
  41. package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
  42. package/fesm2022/bootkit-ng0-components-stepper.mjs +13 -13
  43. package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
  44. package/fesm2022/bootkit-ng0-components-table.mjs +170 -72
  45. package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
  46. package/fesm2022/bootkit-ng0-components-toast.mjs +7 -7
  47. package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
  48. package/fesm2022/bootkit-ng0-components-tooltip.mjs +9 -9
  49. package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
  50. package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +26 -26
  51. package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -1
  52. package/fesm2022/bootkit-ng0-data.mjs +175 -58
  53. package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
  54. package/fesm2022/bootkit-ng0-date.mjs.map +1 -1
  55. package/fesm2022/bootkit-ng0-file.mjs.map +1 -1
  56. package/fesm2022/bootkit-ng0-form.mjs +148 -126
  57. package/fesm2022/bootkit-ng0-form.mjs.map +1 -1
  58. package/fesm2022/bootkit-ng0-http.mjs +3 -3
  59. package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
  60. package/fesm2022/bootkit-ng0-localization-locales.mjs +20 -0
  61. package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -1
  62. package/fesm2022/bootkit-ng0-localization.mjs +100 -35
  63. package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
  64. package/fesm2022/bootkit-ng0-platform-browser.mjs +7 -7
  65. package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -1
  66. package/fesm2022/bootkit-ng0-script.mjs +3 -3
  67. package/fesm2022/bootkit-ng0-script.mjs.map +1 -1
  68. package/fesm2022/bootkit-ng0-security.mjs +15 -15
  69. package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
  70. package/fesm2022/bootkit-ng0.mjs.map +1 -1
  71. package/form/index.d.ts +46 -27
  72. package/localization/index.d.ts +63 -28
  73. package/package.json +22 -14
@@ -1 +1 @@
1
- {"version":3,"file":"bootkit-ng0-date.mjs","sources":["../../../projects/ng0/date/time-span.ts","../../../projects/ng0/date/bootkit-ng0-date.ts"],"sourcesContent":["const f = Math.floor;\n\n/**\n * Represents a time span in months, days, hours, minutes, seconds, and milliseconds.\n * Provides methods to create a TimeSpan from a total number of milliseconds.\n * @example\n * const span = TimeSpan.fromMilliseconds(123456789);\n * console.log(span); // TimeSpan { months: 0, days: 1, hours: 10, minutes: 17, seconds: 36, milliseconds: 789 }\n */\nexport class TimeSpan {\n /** Milliseconds per second */\n public static readonly msPerSecond = 1000;\n\n /** Milliseconds per minute */\n public static readonly msPerMinute = this.msPerSecond * 60;\n\n /** Milliseconds per hour */\n public static readonly msPerHour = this.msPerMinute * 60;\n\n /** Milliseconds per day */\n public static readonly msPerDay = this.msPerHour * 24;\n\n /** Milliseconds per month */\n public static readonly msPerMonth = this.msPerDay * 30;\n\n constructor(\n public readonly months: number = 0,\n public readonly days: number = 0,\n public readonly hours: number = 0,\n public readonly minutes: number = 0,\n public readonly seconds: number = 0,\n public readonly milliseconds: number = 0) {\n }\n\n /**\n * Creates a TimeSpan from a total number of milliseconds.\n * @param ms The total number of milliseconds.\n * @returns A TimeSpan representing the equivalent time span.\n */\n static fromMilliseconds(ms: number): TimeSpan {\n const months = f(ms / TimeSpan.msPerMonth),\n days = f((ms % TimeSpan.msPerMonth) / TimeSpan.msPerDay),\n hours = f((ms % TimeSpan.msPerDay) / TimeSpan.msPerHour),\n minutes = f((ms % TimeSpan.msPerHour) / TimeSpan.msPerMinute),\n seconds = f((ms % TimeSpan.msPerMinute) / TimeSpan.msPerSecond),\n milliseconds = (ms % TimeSpan.msPerSecond);\n return new TimeSpan(months, days, hours, minutes, seconds, milliseconds);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK;AAEpB;;;;;;AAMG;MACU,QAAQ,CAAA;AAiBD,IAAA,MAAA;AACA,IAAA,IAAA;AACA,IAAA,KAAA;AACA,IAAA,OAAA;AACA,IAAA,OAAA;AACA,IAAA,YAAA;;AApBX,IAAA,OAAgB,WAAW,GAAG,IAAI;;IAGlC,OAAgB,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE;;IAGnD,OAAgB,SAAS,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE;;IAGjD,OAAgB,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,EAAE;;IAG9C,OAAgB,UAAU,GAAG,IAAI,CAAC,QAAQ,GAAG,EAAE;AAEtD,IAAA,WAAA,CACkB,SAAiB,CAAC,EAClB,IAAe,GAAA,CAAC,EAChB,KAAgB,GAAA,CAAC,EACjB,OAAA,GAAkB,CAAC,EACnB,OAAA,GAAkB,CAAC,EACnB,eAAuB,CAAC,EAAA;QALxB,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAK,CAAA,KAAA,GAAL,KAAK;QACL,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAY,CAAA,YAAA,GAAZ,YAAY;;AAG9B;;;;AAIG;IACH,OAAO,gBAAgB,CAAC,EAAU,EAAA;AAChC,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,EACxC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,QAAQ,CAAC,EACxD,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,EACxD,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,WAAW,CAAC,EAC7D,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,EAC/D,YAAY,IAAI,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC;AAC5C,QAAA,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC;;;;AC9C5E;;AAEG;;;;"}
1
+ {"version":3,"file":"bootkit-ng0-date.mjs","sources":["../../../projects/ng0/date/time-span.ts","../../../projects/ng0/date/bootkit-ng0-date.ts"],"sourcesContent":["const f = Math.floor;\r\n\r\n/**\r\n * Represents a time span in months, days, hours, minutes, seconds, and milliseconds.\r\n * Provides methods to create a TimeSpan from a total number of milliseconds.\r\n * @example\r\n * const span = TimeSpan.fromMilliseconds(123456789);\r\n * console.log(span); // TimeSpan { months: 0, days: 1, hours: 10, minutes: 17, seconds: 36, milliseconds: 789 }\r\n */\r\nexport class TimeSpan {\r\n /** Milliseconds per second */\r\n public static readonly msPerSecond = 1000;\r\n\r\n /** Milliseconds per minute */\r\n public static readonly msPerMinute = this.msPerSecond * 60;\r\n\r\n /** Milliseconds per hour */\r\n public static readonly msPerHour = this.msPerMinute * 60;\r\n\r\n /** Milliseconds per day */\r\n public static readonly msPerDay = this.msPerHour * 24;\r\n\r\n /** Milliseconds per month */\r\n public static readonly msPerMonth = this.msPerDay * 30;\r\n\r\n constructor(\r\n public readonly months: number = 0,\r\n public readonly days: number = 0,\r\n public readonly hours: number = 0,\r\n public readonly minutes: number = 0,\r\n public readonly seconds: number = 0,\r\n public readonly milliseconds: number = 0) {\r\n }\r\n\r\n /**\r\n * Creates a TimeSpan from a total number of milliseconds.\r\n * @param ms The total number of milliseconds.\r\n * @returns A TimeSpan representing the equivalent time span.\r\n */\r\n static fromMilliseconds(ms: number): TimeSpan {\r\n const months = f(ms / TimeSpan.msPerMonth),\r\n days = f((ms % TimeSpan.msPerMonth) / TimeSpan.msPerDay),\r\n hours = f((ms % TimeSpan.msPerDay) / TimeSpan.msPerHour),\r\n minutes = f((ms % TimeSpan.msPerHour) / TimeSpan.msPerMinute),\r\n seconds = f((ms % TimeSpan.msPerMinute) / TimeSpan.msPerSecond),\r\n milliseconds = (ms % TimeSpan.msPerSecond);\r\n return new TimeSpan(months, days, hours, minutes, seconds, milliseconds);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK;AAEpB;;;;;;AAMG;MACU,QAAQ,CAAA;AAiBD,IAAA,MAAA;AACA,IAAA,IAAA;AACA,IAAA,KAAA;AACA,IAAA,OAAA;AACA,IAAA,OAAA;AACA,IAAA,YAAA;;AApBX,IAAA,OAAgB,WAAW,GAAG,IAAI;;IAGlC,OAAgB,WAAW,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE;;IAGnD,OAAgB,SAAS,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE;;IAGjD,OAAgB,QAAQ,GAAG,IAAI,CAAC,SAAS,GAAG,EAAE;;IAG9C,OAAgB,UAAU,GAAG,IAAI,CAAC,QAAQ,GAAG,EAAE;AAEtD,IAAA,WAAA,CACkB,SAAiB,CAAC,EAClB,IAAA,GAAe,CAAC,EAChB,KAAA,GAAgB,CAAC,EACjB,OAAA,GAAkB,CAAC,EACnB,OAAA,GAAkB,CAAC,EACnB,eAAuB,CAAC,EAAA;QALxB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,KAAK,GAAL,KAAK;QACL,IAAA,CAAA,OAAO,GAAP,OAAO;QACP,IAAA,CAAA,OAAO,GAAP,OAAO;QACP,IAAA,CAAA,YAAY,GAAZ,YAAY;IAC9B;AAEA;;;;AAIG;IACH,OAAO,gBAAgB,CAAC,EAAU,EAAA;AAChC,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC,EACxC,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,QAAQ,CAAC,EACxD,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,QAAQ,IAAI,QAAQ,CAAC,SAAS,CAAC,EACxD,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,WAAW,CAAC,EAC7D,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,WAAW,CAAC,EAC/D,YAAY,IAAI,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC;AAC5C,QAAA,OAAO,IAAI,QAAQ,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,CAAC;IAC1E;;;AC/CF;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"bootkit-ng0-file.mjs","sources":["../../../projects/ng0/file/utils.ts","../../../projects/ng0/file/bootkit-ng0-file.ts"],"sourcesContent":["\n/**\n * Saves a Blob as a file in the user's browser.\n * This function is only available in browsers that support the Blob API.\n * @param blob \n * @param fileName \n * \n */\nexport function saveBlob(blob: Blob, fileName: string): void {\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement('a');\n a.href = url;\n a.download = fileName;\n document.body.appendChild(a);\n a.click();\n a.remove();\n window.URL.revokeObjectURL(url);\n}\n\n/**\n * Triggers downloading a file from a given URL.\n * @param url \n * @param fileName \n */\nexport function downloadFile(url: string, fileName: string): void {\n const a = document.createElement('a');\n a.href = url;\n a.download = fileName;\n document.body.appendChild(a);\n a.click();\n a.remove();\n}\n\n/**\n * Converts a File object to a Base64 string.\n * @param file The File object to convert.\n * @return A Promise that resolves to the Base64 string representation of the file.\n */\nexport function convertFileToBase64(file: File): Promise<string | ArrayBuffer | null> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => resolve(reader.result);\n reader.onerror = error => reject(error);\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AACA;;;;;;AAMG;AACa,SAAA,QAAQ,CAAC,IAAU,EAAE,QAAgB,EAAA;IACnD,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC;IAC5C,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;AACrC,IAAA,CAAC,CAAC,IAAI,GAAG,GAAG;AACZ,IAAA,CAAC,CAAC,QAAQ,GAAG,QAAQ;AACrB,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,KAAK,EAAE;IACT,CAAC,CAAC,MAAM,EAAE;AACV,IAAA,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC;AACjC;AAEA;;;;AAIG;AACa,SAAA,YAAY,CAAC,GAAW,EAAE,QAAgB,EAAA;IACxD,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;AACrC,IAAA,CAAC,CAAC,IAAI,GAAG,GAAG;AACZ,IAAA,CAAC,CAAC,QAAQ,GAAG,QAAQ;AACrB,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,KAAK,EAAE;IACT,CAAC,CAAC,MAAM,EAAE;AACZ;AAEA;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,IAAU,EAAA;IAC5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,QAAA,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE;AAC/B,QAAA,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC;AAC1B,QAAA,MAAM,CAAC,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;QAC5C,MAAM,CAAC,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC;AACzC,KAAC,CAAC;AACJ;;AC7CA;;AAEG;;;;"}
1
+ {"version":3,"file":"bootkit-ng0-file.mjs","sources":["../../../projects/ng0/file/utils.ts","../../../projects/ng0/file/bootkit-ng0-file.ts"],"sourcesContent":["\r\n/**\r\n * Saves a Blob as a file in the user's browser.\r\n * This function is only available in browsers that support the Blob API.\r\n * @param blob \r\n * @param fileName \r\n * \r\n */\r\nexport function saveBlob(blob: Blob, fileName: string): void {\r\n const url = window.URL.createObjectURL(blob);\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.download = fileName;\r\n document.body.appendChild(a);\r\n a.click();\r\n a.remove();\r\n window.URL.revokeObjectURL(url);\r\n}\r\n\r\n/**\r\n * Triggers downloading a file from a given URL.\r\n * @param url \r\n * @param fileName \r\n */\r\nexport function downloadFile(url: string, fileName: string): void {\r\n const a = document.createElement('a');\r\n a.href = url;\r\n a.download = fileName;\r\n document.body.appendChild(a);\r\n a.click();\r\n a.remove();\r\n}\r\n\r\n/**\r\n * Converts a File object to a Base64 string.\r\n * @param file The File object to convert.\r\n * @return A Promise that resolves to the Base64 string representation of the file.\r\n */\r\nexport function convertFileToBase64(file: File): Promise<string | ArrayBuffer | null> {\r\n return new Promise((resolve, reject) => {\r\n const reader = new FileReader();\r\n reader.readAsDataURL(file);\r\n reader.onload = () => resolve(reader.result);\r\n reader.onerror = error => reject(error);\r\n });\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AACA;;;;;;AAMG;AACG,SAAU,QAAQ,CAAC,IAAU,EAAE,QAAgB,EAAA;IACnD,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC;IAC5C,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;AACrC,IAAA,CAAC,CAAC,IAAI,GAAG,GAAG;AACZ,IAAA,CAAC,CAAC,QAAQ,GAAG,QAAQ;AACrB,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,KAAK,EAAE;IACT,CAAC,CAAC,MAAM,EAAE;AACV,IAAA,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC;AACjC;AAEA;;;;AAIG;AACG,SAAU,YAAY,CAAC,GAAW,EAAE,QAAgB,EAAA;IACxD,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;AACrC,IAAA,CAAC,CAAC,IAAI,GAAG,GAAG;AACZ,IAAA,CAAC,CAAC,QAAQ,GAAG,QAAQ;AACrB,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5B,CAAC,CAAC,KAAK,EAAE;IACT,CAAC,CAAC,MAAM,EAAE;AACZ;AAEA;;;;AAIG;AACG,SAAU,mBAAmB,CAAC,IAAU,EAAA;IAC5C,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;AACrC,QAAA,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE;AAC/B,QAAA,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC;AAC1B,QAAA,MAAM,CAAC,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;QAC5C,MAAM,CAAC,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC;AACzC,IAAA,CAAC,CAAC;AACJ;;AC7CA;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, Directive, input, forwardRef, HostListener, numberAttribute, NgModule } from '@angular/core';
2
+ import { Input, Directive, inject, ElementRef, Renderer2, input, numberAttribute, booleanAttribute, forwardRef, HostListener, NgModule } from '@angular/core';
3
3
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, Validators } from '@angular/forms';
4
4
  import { formatNumber } from '@angular/common';
5
5
 
@@ -30,10 +30,10 @@ class FocusDirective {
30
30
  }
31
31
  }
32
32
  }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: FocusDirective, isStandalone: true, selector: "[ng0Focus]", inputs: { focusOnLoad: "focusOnLoad", focusWhen: "focusWhen" }, exportAs: ["ng0Focus"], usesOnChanges: true, ngImport: i0 });
33
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FocusDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
34
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: FocusDirective, isStandalone: true, selector: "[ng0Focus]", inputs: { focusOnLoad: "focusOnLoad", focusWhen: "focusWhen" }, exportAs: ["ng0Focus"], usesOnChanges: true, ngImport: i0 });
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FocusDirective, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FocusDirective, decorators: [{
37
37
  type: Directive,
38
38
  args: [{
39
39
  selector: '[ng0Focus]',
@@ -58,108 +58,125 @@ const Keys = {
58
58
  home: 'Home',
59
59
  end: 'End'
60
60
  };
61
+ /**
62
+ * Directive to allow only number input in text fields.
63
+ * It supports integer and decimal numbers, negative numbers, min/max values, thousands separator.
64
+ */
61
65
  class NumberDirective {
62
- el;
63
- renderer;
64
- /** */
65
- minFractionDigits = input(3);
66
- maxFractionDigits = input(10);
67
- useGrouping = input(false);
68
- numberType = input('integer');
69
- onChange = (_) => { };
70
- onTouched = () => { };
71
- decimalSeparator;
72
- thousandsSeparator = ',';
73
- selectionStart = 0;
74
- selectionEnd = 0;
75
- isCursorInsideIntegerPart = false;
76
- decimalSeparatorPosition = -1;
77
- value;
78
- setProperty = (prop, value) => this.renderer.setProperty(this.el.nativeElement, prop, value);
79
- constructor(el, renderer) {
80
- this.el = el;
81
- this.renderer = renderer;
82
- }
66
+ _value;
67
+ _decimalSeparator;
68
+ _thousandsSeparator = ',';
69
+ _onChangeCallback;
70
+ _onTouchedCallback;
71
+ _elmRef = inject((ElementRef));
72
+ _renderer = inject(Renderer2);
73
+ /**
74
+ * The minimum number of digits to display after the decimal point.
75
+ * Applied only when 'numberType' is set to 'decimal'.
76
+ * @default 1
77
+ */
78
+ minFractionDigits = input(1, ...(ngDevMode ? [{ debugName: "minFractionDigits", transform: numberAttribute }] : [{ transform: numberAttribute }]));
79
+ /**
80
+ * The maximum number of digits to display after the decimal point.
81
+ * Applied only when 'numberType' is set to 'decimal'.
82
+ * @default 2
83
+ */
84
+ maxFractionDigits = input(2, ...(ngDevMode ? [{ debugName: "maxFractionDigits", transform: numberAttribute }] : [{ transform: numberAttribute }]));
85
+ /**
86
+ * Whether to use grouping separators, such as thousands separators
87
+ * @default false
88
+ */
89
+ useGrouping = input(false, ...(ngDevMode ? [{ debugName: "useGrouping", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
90
+ /**
91
+ * Type of numbers to allow
92
+ * 'decimal' - allow decimal numbers
93
+ * 'integer' - allow integer numbers only
94
+ * @default 'integer'
95
+ */
96
+ numberType = input('integer', ...(ngDevMode ? [{ debugName: "numberType" }] : []));
97
+ constructor() { }
83
98
  ngOnInit() {
84
99
  // Use Intl.NumberFormat to find decimal separator for locale
85
100
  const formatted = formatNumber(1.1, 'en', '1.1-1');
86
- this.decimalSeparator = formatted.replace(/\d/g, '') || '.';
101
+ this._decimalSeparator = formatted.replace(/\d/g, '') || '.';
87
102
  }
88
103
  registerOnChange(fn) {
89
- this.onChange = fn;
104
+ this._onChangeCallback = fn;
90
105
  }
91
106
  registerOnTouched(fn) {
92
- this.onTouched = fn;
107
+ this._onTouchedCallback = fn;
93
108
  }
94
109
  setDisabledState(isDisabled) {
95
- this.setProperty('disabled', isDisabled);
110
+ // this._setProperty('disabled', isDisabled);
96
111
  }
97
112
  writeValue(value) {
98
113
  var inputValue;
99
114
  if (value === undefined || value === null) {
100
115
  inputValue = '';
101
- this.value = undefined;
116
+ this._value = undefined;
102
117
  }
103
118
  else if (typeof value === 'number') {
104
- inputValue = this.formatNumber(value);
105
- this.value = value;
119
+ inputValue = this._formatNumber(value);
120
+ this._value = value;
106
121
  }
107
122
  else if (typeof value === 'string') {
108
- const parsedValue = this.value = Number.parseFloat(value);
109
- inputValue = this.formatNumber(parsedValue);
123
+ const parsedValue = this._value = Number.parseFloat(value);
124
+ inputValue = this._formatNumber(parsedValue);
110
125
  }
111
126
  else {
112
127
  console.error('NumberDirective: Unsupported value type', value);
113
128
  inputValue = 'Invalid';
114
129
  }
115
- this.setProperty('value', inputValue);
130
+ this._setProperty('value', inputValue);
116
131
  }
117
- onKeyDown(event) {
118
- this.updateCursorInfo();
119
- if (!this.isKeyAllowed(event.key)) {
120
- event.preventDefault();
121
- return;
122
- }
132
+ _onKeyDown(event) {
123
133
  const key = event.key;
124
- if (key == Keys.backspace) {
125
- if (this.selectionStart > 1 && (this.selectionStart === this.selectionEnd)) {
126
- let value = this.el.nativeElement.value;
127
- let beforeSelection = value.charAt(this.selectionStart - 1);
128
- if (beforeSelection === ',') {
129
- // If the character before the cursor is a comma, we need to skip it
130
- this.setProperty('selectionStart', this.selectionStart - 2);
134
+ const state = this._getInputState();
135
+ if (this._isAllowedKey(key)) {
136
+ if (key == Keys.backspace) {
137
+ if (state.selectionStart > 1 && (state.selectionStart === state.selectionEnd)) {
138
+ let value = this._elmRef.nativeElement.value;
139
+ let beforeSelection = value.charAt(state.selectionStart - 1);
140
+ if (beforeSelection === ',') {
141
+ // If the character before the cursor is a comma, we need to skip it
142
+ this._setProperty('selectionStart', state.selectionStart - 2);
143
+ }
131
144
  }
132
145
  }
133
146
  }
147
+ else {
148
+ event.preventDefault();
149
+ }
134
150
  }
135
- onInput(s) {
136
- if (s === '') {
137
- this.value = undefined;
138
- this.onChange(undefined);
151
+ _onInput(value) {
152
+ if (value === '') {
153
+ this._value = undefined;
154
+ this._onChangeCallback?.(undefined);
139
155
  return;
140
156
  }
141
- this.updateCursorInfo();
142
- if (this.isCursorInsideIntegerPart) {
143
- this.formatIntegerPart(s);
157
+ const state = this._getInputState();
158
+ if (state.isCursorInsideIntegerPart && this.useGrouping()) {
159
+ this._formatIntegerPart(value);
144
160
  }
145
- var number = Number(removeChar(this.el.nativeElement.value, this.thousandsSeparator));
146
- this.value = isNaN(number) ? undefined : number;
147
- this.onChange(this.value);
161
+ var number = Number(removeChar(this._elmRef.nativeElement.value, this._thousandsSeparator));
162
+ this._value = isNaN(number) ? undefined : number;
163
+ this._onChangeCallback?.(this._value);
148
164
  }
149
- formatIntegerPart(value) {
165
+ _formatIntegerPart(value) {
150
166
  // Format the input value
151
- const integerPart = value.split(this.decimalSeparator)[0];
152
- const decimalPart = value.split(this.decimalSeparator)[1];
167
+ const integerPart = value.split(this._decimalSeparator)[0];
168
+ const decimalPart = value.split(this._decimalSeparator)[1];
153
169
  if (integerPart.length <= 3) {
154
170
  return;
155
171
  }
156
- let normalizedIntegerPart = removeChar(integerPart, this.thousandsSeparator); // Remove commas
172
+ let normalizedIntegerPart = removeChar(integerPart, this._thousandsSeparator); // Remove commas
157
173
  let formattedValue = addThousandsSeparator(normalizedIntegerPart);
158
174
  if (decimalPart !== undefined) {
159
- formattedValue += this.decimalSeparator + decimalPart;
175
+ formattedValue += this._decimalSeparator + decimalPart;
160
176
  }
161
- this.setProperty('value', formattedValue);
177
+ this._setProperty('value', formattedValue);
162
178
  let newSelectionStart;
179
+ let state = this._getInputState();
163
180
  // fix the cursor position after formatting
164
181
  if (value.length == 1) {
165
182
  newSelectionStart = 1;
@@ -167,36 +184,36 @@ class NumberDirective {
167
184
  else {
168
185
  const newValueLength = formattedValue.length;
169
186
  const cursorJump = newValueLength - value.length;
170
- newSelectionStart = Math.max(0, this.selectionStart + cursorJump);
187
+ newSelectionStart = Math.max(0, state.selectionStart + cursorJump);
171
188
  }
172
- this.setProperty('selectionStart', newSelectionStart);
173
- this.setProperty('selectionEnd', newSelectionStart);
189
+ this._setProperty('selectionStart', newSelectionStart);
190
+ this._setProperty('selectionEnd', newSelectionStart);
174
191
  // return formattedValue;
175
192
  }
176
- onBlur() {
177
- if (this.value !== undefined) {
178
- let formattedValue = this.formatNumber(this.value);
179
- this.setProperty('value', formattedValue);
193
+ _onBlur() {
194
+ if (this._value !== undefined) {
195
+ let formattedValue = this._formatNumber(this._value);
196
+ this._setProperty('value', formattedValue);
180
197
  }
181
- this.onTouched();
198
+ this._onTouchedCallback?.();
182
199
  }
183
- onPaste(event) {
200
+ _onPaste(event) {
184
201
  // event.
185
202
  // value = value.trim();
186
203
  }
187
- updateCursorInfo() {
188
- let value = this.el.nativeElement.value;
189
- this.selectionStart = this.el.nativeElement.selectionStart || 0;
190
- this.selectionEnd = this.el.nativeElement.selectionEnd || 0;
191
- this.decimalSeparatorPosition = value.indexOf(this.decimalSeparator);
192
- if (this.decimalSeparatorPosition > -1) {
193
- this.isCursorInsideIntegerPart = (this.selectionStart <= this.decimalSeparatorPosition);
194
- }
195
- else {
196
- this.isCursorInsideIntegerPart = true;
197
- }
204
+ _getInputState() {
205
+ let value = this._elmRef.nativeElement.value;
206
+ let decimalSeparatorPosition = value.indexOf(this._decimalSeparator);
207
+ let selectionStart = this._elmRef.nativeElement.selectionStart || 0;
208
+ let selectionEnd = this._elmRef.nativeElement.selectionEnd || 0;
209
+ return {
210
+ selectionStart,
211
+ selectionEnd,
212
+ decimalSeparatorPosition,
213
+ isCursorInsideIntegerPart: decimalSeparatorPosition > -1 ? (selectionStart <= decimalSeparatorPosition) : true
214
+ };
198
215
  }
199
- formatNumber(n) {
216
+ _formatNumber(n) {
200
217
  var isInteger = this.numberType() == 'integer';
201
218
  return new Intl.NumberFormat('en-US', {
202
219
  useGrouping: this.useGrouping(),
@@ -205,10 +222,11 @@ class NumberDirective {
205
222
  style: 'decimal',
206
223
  }).format(n);
207
224
  }
208
- isKeyAllowed(key) {
225
+ _isAllowedKey(key) {
209
226
  const allowedKeys = [Keys.backspace, Keys.tab, Keys.arrowLeft, Keys.arrowRight, Keys.delete, Keys.home, Keys.end];
210
- const input = this.el.nativeElement;
227
+ const input = this._elmRef.nativeElement;
211
228
  const value = input.value;
229
+ const state = this._getInputState();
212
230
  if (allowedKeys.includes(key)) {
213
231
  return true; // allow control/navigation keys
214
232
  }
@@ -217,31 +235,35 @@ class NumberDirective {
217
235
  return (input.selectionStart === 0 || input.selectionEnd === 0) && value.charAt(0) !== '-';
218
236
  }
219
237
  // Allow one dot for decimal
220
- if (key === this.decimalSeparator) {
238
+ if (key === this._decimalSeparator) {
221
239
  return (this.numberType() == 'decimal') &&
222
- (!value.includes(this.decimalSeparator)) &&
223
- (this.selectionStart == input.value.length);
240
+ (!value.includes(this._decimalSeparator)) &&
241
+ (state.selectionStart == input.value.length);
224
242
  }
225
243
  // Allow numbers only
226
244
  if (/^\d$/.test(key)) {
227
- if (this.isCursorInsideIntegerPart) {
245
+ if (state.isCursorInsideIntegerPart) {
228
246
  return true;
229
247
  }
230
248
  else {
231
- var decimalPart = value.split(this.decimalSeparator)[1];
249
+ var decimalPart = value.split(this._decimalSeparator)[1];
232
250
  var maxFractionDigits = this.maxFractionDigits();
233
251
  if (maxFractionDigits != undefined && decimalPart.length < maxFractionDigits) {
234
252
  return true;
235
253
  }
236
254
  else {
237
- return this.selectionStart !== this.selectionEnd; // allow a new digit if a substring is selected
255
+ return input.selectionStart !== input.selectionEnd; // allow a new digit if a substring is selected
238
256
  }
239
257
  }
240
258
  }
241
259
  return false;
242
260
  }
243
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NumberDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
244
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: NumberDirective, isStandalone: true, selector: "[ng0Number]", inputs: { minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, numberType: { classPropertyName: "numberType", publicName: "numberType", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeyDown($event)", "input": "onInput($event.target.value)", "blur": "onBlur()", "paste": "onPaste($event)" } }, providers: [
261
+ _setProperty(prop, value) {
262
+ this._renderer.setProperty(this._elmRef.nativeElement, prop, value);
263
+ }
264
+ ;
265
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NumberDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
266
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.1", type: NumberDirective, isStandalone: true, selector: "[ng0Number]", inputs: { minFractionDigits: { classPropertyName: "minFractionDigits", publicName: "minFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, maxFractionDigits: { classPropertyName: "maxFractionDigits", publicName: "maxFractionDigits", isSignal: true, isRequired: false, transformFunction: null }, useGrouping: { classPropertyName: "useGrouping", publicName: "useGrouping", isSignal: true, isRequired: false, transformFunction: null }, numberType: { classPropertyName: "numberType", publicName: "numberType", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "_onKeyDown($event)", "input": "_onInput($event.target.value)", "blur": "_onBlur()", "paste": "_onPaste($event)" } }, providers: [
245
267
  {
246
268
  provide: NG_VALUE_ACCESSOR,
247
269
  useExisting: forwardRef(() => NumberDirective),
@@ -249,7 +271,7 @@ class NumberDirective {
249
271
  }
250
272
  ], ngImport: i0 });
251
273
  }
252
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: NumberDirective, decorators: [{
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NumberDirective, decorators: [{
253
275
  type: Directive,
254
276
  args: [{
255
277
  selector: '[ng0Number]',
@@ -261,16 +283,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
261
283
  }
262
284
  ]
263
285
  }]
264
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { onKeyDown: [{
286
+ }], ctorParameters: () => [], propDecorators: { _onKeyDown: [{
265
287
  type: HostListener,
266
288
  args: ['keydown', ['$event']]
267
- }], onInput: [{
289
+ }], _onInput: [{
268
290
  type: HostListener,
269
291
  args: ['input', ['$event.target.value']]
270
- }], onBlur: [{
292
+ }], _onBlur: [{
271
293
  type: HostListener,
272
294
  args: ['blur']
273
- }], onPaste: [{
295
+ }], _onPaste: [{
274
296
  type: HostListener,
275
297
  args: ['paste', ['$event']]
276
298
  }] } });
@@ -296,12 +318,12 @@ class EqualWithValidatorDirective {
296
318
  validate(control) {
297
319
  return equalWithValidator(this.targetValue, this.inequalityMessage)(control);
298
320
  }
299
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: EqualWithValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
300
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: EqualWithValidatorDirective, isStandalone: true, selector: "[ng0EqualWith]", inputs: { targetValue: ["ng0EqualWith", "targetValue"], inequalityMessage: "inequalityMessage" }, providers: [
321
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: EqualWithValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
322
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: EqualWithValidatorDirective, isStandalone: true, selector: "[ng0EqualWith]", inputs: { targetValue: ["ng0EqualWith", "targetValue"], inequalityMessage: "inequalityMessage" }, providers: [
301
323
  { provide: NG_VALIDATORS, useExisting: EqualWithValidatorDirective, multi: true }
302
324
  ], exportAs: ["ng0EqualWith"], ngImport: i0 });
303
325
  }
304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: EqualWithValidatorDirective, decorators: [{
326
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: EqualWithValidatorDirective, decorators: [{
305
327
  type: Directive,
306
328
  args: [{
307
329
  selector: '[ng0EqualWith]',
@@ -341,10 +363,10 @@ class UrlValidatorDirective {
341
363
  validate(control) {
342
364
  return urlValidator()(control);
343
365
  }
344
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: UrlValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
345
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.6", type: UrlValidatorDirective, isStandalone: true, selector: "input[ng0Url]", inputs: { iscUrl: "iscUrl" }, providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }], exportAs: ["ng0Url"], ngImport: i0 });
366
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: UrlValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
367
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: UrlValidatorDirective, isStandalone: true, selector: "input[ng0Url]", inputs: { iscUrl: "iscUrl" }, providers: [{ provide: NG_VALIDATORS, useExisting: UrlValidatorDirective, multi: true }], exportAs: ["ng0Url"], ngImport: i0 });
346
368
  }
347
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: UrlValidatorDirective, decorators: [{
369
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: UrlValidatorDirective, decorators: [{
348
370
  type: Directive,
349
371
  args: [{
350
372
  selector: 'input[ng0Url]',
@@ -357,17 +379,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
357
379
  }] } });
358
380
 
359
381
  class CustomValidatorDirective {
360
- validator = input.required({ alias: 'ng0CustomValidator' });
382
+ validator = input.required(...(ngDevMode ? [{ debugName: "validator", alias: 'ng0CustomValidator' }] : [{ alias: 'ng0CustomValidator' }]));
361
383
  constructor() { }
362
384
  validate(control) {
363
385
  return this.validator()(control);
364
386
  }
365
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
366
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: CustomValidatorDirective, isStandalone: true, selector: "[ng0CustomValidator]", inputs: { validator: { classPropertyName: "validator", publicName: "ng0CustomValidator", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
387
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CustomValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
388
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.1", type: CustomValidatorDirective, isStandalone: true, selector: "[ng0CustomValidator]", inputs: { validator: { classPropertyName: "validator", publicName: "ng0CustomValidator", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
367
389
  { provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true }
368
390
  ], exportAs: ["ng0CustomValidator"], ngImport: i0 });
369
391
  }
370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CustomValidatorDirective, decorators: [{
392
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CustomValidatorDirective, decorators: [{
371
393
  type: Directive,
372
394
  args: [{
373
395
  selector: '[ng0CustomValidator]',
@@ -381,20 +403,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
381
403
 
382
404
  /** Min validator */
383
405
  class MinValidatorDirective {
384
- min = input.required({
385
- transform: numberAttribute,
386
- });
406
+ min = input.required(...(ngDevMode ? [{ debugName: "min", transform: numberAttribute }] : [{
407
+ transform: numberAttribute,
408
+ }]));
387
409
  validate(control) {
388
410
  return Validators.min(this.min())(control);
389
411
  }
390
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MinValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
391
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: MinValidatorDirective, isStandalone: true, selector: "input[type=text][ng0Number][min]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{
412
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MinValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
413
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.1", type: MinValidatorDirective, isStandalone: true, selector: "input[type=text][ng0Number][min]", inputs: { min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{
392
414
  provide: NG_VALIDATORS,
393
415
  useExisting: MinValidatorDirective,
394
416
  multi: true
395
417
  }], exportAs: ["ng0Min"], ngImport: i0 });
396
418
  }
397
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MinValidatorDirective, decorators: [{
419
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MinValidatorDirective, decorators: [{
398
420
  type: Directive,
399
421
  args: [{
400
422
  selector: 'input[type=text][ng0Number][min]',
@@ -410,20 +432,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
410
432
 
411
433
  /** Max validator */
412
434
  class MaxValidatorDirective {
413
- max = input.required({
414
- transform: numberAttribute,
415
- });
435
+ max = input.required(...(ngDevMode ? [{ debugName: "max", transform: numberAttribute }] : [{
436
+ transform: numberAttribute,
437
+ }]));
416
438
  validate(control) {
417
439
  return Validators.max(this.max())(control);
418
440
  }
419
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MaxValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
420
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.6", type: MaxValidatorDirective, isStandalone: true, selector: "input[type=text][ng0Number][max]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{
441
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MaxValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
442
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.1", type: MaxValidatorDirective, isStandalone: true, selector: "input[type=text][ng0Number][max]", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null } }, providers: [{
421
443
  provide: NG_VALIDATORS,
422
444
  useExisting: MaxValidatorDirective,
423
445
  multi: true
424
446
  }], exportAs: ["ng0Max"], ngImport: i0 });
425
447
  }
426
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: MaxValidatorDirective, decorators: [{
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MaxValidatorDirective, decorators: [{
427
449
  type: Directive,
428
450
  args: [{
429
451
  selector: 'input[type=text][ng0Number][max]',
@@ -449,8 +471,8 @@ const items = [
449
471
  CustomValidatorDirective,
450
472
  ];
451
473
  class FormModule {
452
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
453
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.6", ngImport: i0, type: FormModule, imports: [
474
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
475
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: FormModule, imports: [
454
476
  // ErrorDirective,
455
477
  // FirstErrorDirective,
456
478
  NumberDirective,
@@ -469,9 +491,9 @@ class FormModule {
469
491
  EqualWithValidatorDirective,
470
492
  UrlValidatorDirective,
471
493
  CustomValidatorDirective] });
472
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FormModule });
494
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormModule });
473
495
  }
474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FormModule, decorators: [{
496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormModule, decorators: [{
475
497
  type: NgModule,
476
498
  args: [{
477
499
  imports: items,