ngwr 16.5.0 → 16.6.0

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 (287) hide show
  1. package/back-top/styles/_index.scss +6 -0
  2. package/breadcrumbs/styles/_rules.scss +34 -0
  3. package/cascader/styles/_rules.scss +7 -0
  4. package/charts/chart-legend/styles/_index.scss +1 -9
  5. package/counter/styles/_index.scss +1 -8
  6. package/date-picker/styles/_index.scss +15 -9
  7. package/dialog/styles/_index.scss +37 -0
  8. package/editor/styles/_index.scss +1 -8
  9. package/event-calendar/styles/_index.scss +2 -6
  10. package/fesm2022/ngwr-affix.mjs +1 -1
  11. package/fesm2022/ngwr-affix.mjs.map +1 -1
  12. package/fesm2022/ngwr-anchor.mjs +9 -2
  13. package/fesm2022/ngwr-anchor.mjs.map +1 -1
  14. package/fesm2022/ngwr-animations-aurora.mjs.map +1 -1
  15. package/fesm2022/ngwr-animations-blur-reveal.mjs.map +1 -1
  16. package/fesm2022/ngwr-animations-click-sparks.mjs.map +1 -1
  17. package/fesm2022/ngwr-animations-confetti.mjs.map +1 -1
  18. package/fesm2022/ngwr-animations-decode.mjs.map +1 -1
  19. package/fesm2022/ngwr-animations-destruct.mjs.map +1 -1
  20. package/fesm2022/ngwr-animations-dot-grid.mjs.map +1 -1
  21. package/fesm2022/ngwr-animations-falling-letters.mjs.map +1 -1
  22. package/fesm2022/ngwr-animations-flow-lines.mjs.map +1 -1
  23. package/fesm2022/ngwr-animations-fluid-cursor.mjs.map +1 -1
  24. package/fesm2022/ngwr-animations-glitch.mjs.map +1 -1
  25. package/fesm2022/ngwr-animations-glow-border.mjs.map +1 -1
  26. package/fesm2022/ngwr-animations-gradient-flow.mjs.map +1 -1
  27. package/fesm2022/ngwr-animations-marquee.mjs.map +1 -1
  28. package/fesm2022/ngwr-animations-orbit.mjs.map +1 -1
  29. package/fesm2022/ngwr-animations-reveal.mjs.map +1 -1
  30. package/fesm2022/ngwr-animations-ripple-grid.mjs.map +1 -1
  31. package/fesm2022/ngwr-animations-rotate-reveal.mjs.map +1 -1
  32. package/fesm2022/ngwr-animations-shimmer.mjs.map +1 -1
  33. package/fesm2022/ngwr-animations-spotlight.mjs.map +1 -1
  34. package/fesm2022/ngwr-animations-thread-lines.mjs.map +1 -1
  35. package/fesm2022/ngwr-animations-tilt.mjs +20 -13
  36. package/fesm2022/ngwr-animations-tilt.mjs.map +1 -1
  37. package/fesm2022/ngwr-animations-typewriter.mjs.map +1 -1
  38. package/fesm2022/ngwr-breadcrumbs.mjs +40 -7
  39. package/fesm2022/ngwr-breadcrumbs.mjs.map +1 -1
  40. package/fesm2022/ngwr-button.mjs +12 -3
  41. package/fesm2022/ngwr-button.mjs.map +1 -1
  42. package/fesm2022/ngwr-carousel.mjs +8 -2
  43. package/fesm2022/ngwr-carousel.mjs.map +1 -1
  44. package/fesm2022/ngwr-cascader.mjs +24 -4
  45. package/fesm2022/ngwr-cascader.mjs.map +1 -1
  46. package/fesm2022/ngwr-charts-core.mjs +12 -5
  47. package/fesm2022/ngwr-charts-core.mjs.map +1 -1
  48. package/fesm2022/ngwr-charts-meter-group.mjs +4 -2
  49. package/fesm2022/ngwr-charts-meter-group.mjs.map +1 -1
  50. package/fesm2022/ngwr-checkbox.mjs +3 -2
  51. package/fesm2022/ngwr-checkbox.mjs.map +1 -1
  52. package/fesm2022/ngwr-color-picker.mjs +21 -1
  53. package/fesm2022/ngwr-color-picker.mjs.map +1 -1
  54. package/fesm2022/ngwr-context-menu.mjs +4 -5
  55. package/fesm2022/ngwr-context-menu.mjs.map +1 -1
  56. package/fesm2022/ngwr-date-picker-testing.mjs.map +1 -1
  57. package/fesm2022/ngwr-date-picker.mjs +49 -1
  58. package/fesm2022/ngwr-date-picker.mjs.map +1 -1
  59. package/fesm2022/ngwr-dialog.mjs +16 -6
  60. package/fesm2022/ngwr-dialog.mjs.map +1 -1
  61. package/fesm2022/ngwr-directives.mjs +9 -6
  62. package/fesm2022/ngwr-directives.mjs.map +1 -1
  63. package/fesm2022/ngwr-event-calendar.mjs +20 -9
  64. package/fesm2022/ngwr-event-calendar.mjs.map +1 -1
  65. package/fesm2022/ngwr-form.mjs +170 -3
  66. package/fesm2022/ngwr-form.mjs.map +1 -1
  67. package/fesm2022/ngwr-i18n-ar.mjs +15 -0
  68. package/fesm2022/ngwr-i18n-ar.mjs.map +1 -1
  69. package/fesm2022/ngwr-i18n-cs.mjs +15 -0
  70. package/fesm2022/ngwr-i18n-cs.mjs.map +1 -1
  71. package/fesm2022/ngwr-i18n-de.mjs +15 -0
  72. package/fesm2022/ngwr-i18n-de.mjs.map +1 -1
  73. package/fesm2022/ngwr-i18n-en.mjs +15 -0
  74. package/fesm2022/ngwr-i18n-en.mjs.map +1 -1
  75. package/fesm2022/ngwr-i18n-es.mjs +15 -0
  76. package/fesm2022/ngwr-i18n-es.mjs.map +1 -1
  77. package/fesm2022/ngwr-i18n-fr.mjs +15 -0
  78. package/fesm2022/ngwr-i18n-fr.mjs.map +1 -1
  79. package/fesm2022/ngwr-i18n-he.mjs +15 -0
  80. package/fesm2022/ngwr-i18n-he.mjs.map +1 -1
  81. package/fesm2022/ngwr-i18n-hi.mjs +15 -0
  82. package/fesm2022/ngwr-i18n-hi.mjs.map +1 -1
  83. package/fesm2022/ngwr-i18n-id.mjs +15 -0
  84. package/fesm2022/ngwr-i18n-id.mjs.map +1 -1
  85. package/fesm2022/ngwr-i18n-it.mjs +15 -0
  86. package/fesm2022/ngwr-i18n-it.mjs.map +1 -1
  87. package/fesm2022/ngwr-i18n-ja.mjs +15 -0
  88. package/fesm2022/ngwr-i18n-ja.mjs.map +1 -1
  89. package/fesm2022/ngwr-i18n-ko.mjs +15 -0
  90. package/fesm2022/ngwr-i18n-ko.mjs.map +1 -1
  91. package/fesm2022/ngwr-i18n-nl.mjs +15 -0
  92. package/fesm2022/ngwr-i18n-nl.mjs.map +1 -1
  93. package/fesm2022/ngwr-i18n-pl.mjs +15 -0
  94. package/fesm2022/ngwr-i18n-pl.mjs.map +1 -1
  95. package/fesm2022/ngwr-i18n-pt.mjs +15 -0
  96. package/fesm2022/ngwr-i18n-pt.mjs.map +1 -1
  97. package/fesm2022/ngwr-i18n-ru.mjs +15 -0
  98. package/fesm2022/ngwr-i18n-ru.mjs.map +1 -1
  99. package/fesm2022/ngwr-i18n-sv.mjs +15 -0
  100. package/fesm2022/ngwr-i18n-sv.mjs.map +1 -1
  101. package/fesm2022/ngwr-i18n-tr.mjs +15 -0
  102. package/fesm2022/ngwr-i18n-tr.mjs.map +1 -1
  103. package/fesm2022/ngwr-i18n-uk.mjs +15 -0
  104. package/fesm2022/ngwr-i18n-uk.mjs.map +1 -1
  105. package/fesm2022/ngwr-i18n-vi.mjs +15 -0
  106. package/fesm2022/ngwr-i18n-vi.mjs.map +1 -1
  107. package/fesm2022/ngwr-i18n-zh-tw.mjs +15 -0
  108. package/fesm2022/ngwr-i18n-zh-tw.mjs.map +1 -1
  109. package/fesm2022/ngwr-i18n-zh.mjs +15 -0
  110. package/fesm2022/ngwr-i18n-zh.mjs.map +1 -1
  111. package/fesm2022/ngwr-i18n.mjs +82 -11
  112. package/fesm2022/ngwr-i18n.mjs.map +1 -1
  113. package/fesm2022/ngwr-input-number.mjs +24 -1
  114. package/fesm2022/ngwr-input-number.mjs.map +1 -1
  115. package/fesm2022/ngwr-input-otp.mjs +2 -2
  116. package/fesm2022/ngwr-input-otp.mjs.map +1 -1
  117. package/fesm2022/ngwr-input.mjs +10 -2
  118. package/fesm2022/ngwr-input.mjs.map +1 -1
  119. package/fesm2022/ngwr-layout.mjs.map +1 -1
  120. package/fesm2022/ngwr-list.mjs +1 -1
  121. package/fesm2022/ngwr-list.mjs.map +1 -1
  122. package/fesm2022/ngwr-loading-bar-router.mjs.map +1 -1
  123. package/fesm2022/ngwr-loading-bar.mjs +2 -2
  124. package/fesm2022/ngwr-loading-bar.mjs.map +1 -1
  125. package/fesm2022/ngwr-mention.mjs +8 -0
  126. package/fesm2022/ngwr-mention.mjs.map +1 -1
  127. package/fesm2022/ngwr-meta.mjs +9 -6
  128. package/fesm2022/ngwr-meta.mjs.map +1 -1
  129. package/fesm2022/ngwr-page-header.mjs +21 -0
  130. package/fesm2022/ngwr-page-header.mjs.map +1 -1
  131. package/fesm2022/ngwr-pagination.mjs +2 -0
  132. package/fesm2022/ngwr-pagination.mjs.map +1 -1
  133. package/fesm2022/ngwr-pipes.mjs +8 -1
  134. package/fesm2022/ngwr-pipes.mjs.map +1 -1
  135. package/fesm2022/ngwr-popconfirm.mjs +2 -1
  136. package/fesm2022/ngwr-popconfirm.mjs.map +1 -1
  137. package/fesm2022/ngwr-popover.mjs +47 -3
  138. package/fesm2022/ngwr-popover.mjs.map +1 -1
  139. package/fesm2022/ngwr-qr.mjs +6 -2
  140. package/fesm2022/ngwr-qr.mjs.map +1 -1
  141. package/fesm2022/ngwr-radio.mjs +71 -5
  142. package/fesm2022/ngwr-radio.mjs.map +1 -1
  143. package/fesm2022/ngwr-schema-form.mjs +10 -1
  144. package/fesm2022/ngwr-schema-form.mjs.map +1 -1
  145. package/fesm2022/ngwr-scroll.mjs +1 -3
  146. package/fesm2022/ngwr-scroll.mjs.map +1 -1
  147. package/fesm2022/ngwr-segmented.mjs +20 -0
  148. package/fesm2022/ngwr-segmented.mjs.map +1 -1
  149. package/fesm2022/ngwr-select.mjs +80 -9
  150. package/fesm2022/ngwr-select.mjs.map +1 -1
  151. package/fesm2022/ngwr-sortable-list.mjs +16 -4
  152. package/fesm2022/ngwr-sortable-list.mjs.map +1 -1
  153. package/fesm2022/ngwr-storage.mjs +1 -1
  154. package/fesm2022/ngwr-storage.mjs.map +1 -1
  155. package/fesm2022/ngwr-switch.mjs +2 -2
  156. package/fesm2022/ngwr-switch.mjs.map +1 -1
  157. package/fesm2022/ngwr-table.mjs +41 -7
  158. package/fesm2022/ngwr-table.mjs.map +1 -1
  159. package/fesm2022/ngwr-tabs-router.mjs.map +1 -1
  160. package/fesm2022/ngwr-textarea.mjs +2 -2
  161. package/fesm2022/ngwr-textarea.mjs.map +1 -1
  162. package/fesm2022/ngwr-toast.mjs +28 -0
  163. package/fesm2022/ngwr-toast.mjs.map +1 -1
  164. package/fesm2022/ngwr-tour.mjs +2 -2
  165. package/fesm2022/ngwr-tour.mjs.map +1 -1
  166. package/fesm2022/ngwr-typography.mjs +20 -0
  167. package/fesm2022/ngwr-typography.mjs.map +1 -1
  168. package/fesm2022/ngwr-utils-router.mjs.map +1 -1
  169. package/fesm2022/ngwr-utils.mjs +46 -4
  170. package/fesm2022/ngwr-utils.mjs.map +1 -1
  171. package/fesm2022/ngwr-validators.mjs +33 -1
  172. package/fesm2022/ngwr-validators.mjs.map +1 -1
  173. package/fesm2022/ngwr-version.mjs +1 -1
  174. package/fesm2022/ngwr-version.mjs.map +1 -1
  175. package/form/styles/_index.scss +37 -0
  176. package/graph/styles/_index.scss +1 -9
  177. package/i18n/ar.json +15 -0
  178. package/i18n/cs.json +15 -0
  179. package/i18n/de.json +15 -0
  180. package/i18n/en.json +15 -0
  181. package/i18n/es.json +15 -0
  182. package/i18n/fr.json +15 -0
  183. package/i18n/he.json +15 -0
  184. package/i18n/hi.json +15 -0
  185. package/i18n/id.json +15 -0
  186. package/i18n/it.json +15 -0
  187. package/i18n/ja.json +15 -0
  188. package/i18n/ko.json +15 -0
  189. package/i18n/nl.json +15 -0
  190. package/i18n/pl.json +15 -0
  191. package/i18n/pt.json +15 -0
  192. package/i18n/ru.json +15 -0
  193. package/i18n/sv.json +15 -0
  194. package/i18n/tr.json +15 -0
  195. package/i18n/uk.json +15 -0
  196. package/i18n/vi.json +15 -0
  197. package/i18n/zh-TW.json +15 -0
  198. package/i18n/zh.json +15 -0
  199. package/image-cropper/styles/_index.scss +1 -9
  200. package/input-number/styles/_index.scss +7 -0
  201. package/layout/styles/_index.scss +13 -1
  202. package/llms-full.txt +10 -10
  203. package/loading-bar/styles/_rules.scss +6 -0
  204. package/package.json +2 -2
  205. package/page-header/styles/_index.scss +18 -0
  206. package/popover/styles/_index.scss +7 -0
  207. package/schematics/use/symbol-map.json +2 -0
  208. package/segmented/styles/_index.scss +7 -0
  209. package/select/styles/_index.scss +7 -0
  210. package/sidebar/styles/_index.scss +6 -0
  211. package/skills/ngwr/references/catalog.md +1 -1
  212. package/sortable-list/styles/_rules.scss +1 -9
  213. package/speed-dial/styles/_index.scss +6 -0
  214. package/stepper/styles/_index.scss +1 -9
  215. package/table/styles/_index.scss +49 -0
  216. package/theme/_index.scss +12 -1
  217. package/theme/styles/_colors.scss +11 -0
  218. package/theme/styles/_contrast.scss +6 -0
  219. package/theme/styles/_index.scss +1 -0
  220. package/theme/styles/_mixins.scss +45 -0
  221. package/theme/styles/_print.scss +17 -0
  222. package/toast/styles/_index.scss +7 -0
  223. package/tour/styles/_index.scss +8 -0
  224. package/tree/styles/_index.scss +1 -9
  225. package/types/ngwr-anchor.d.ts +3 -0
  226. package/types/ngwr-animations-aurora.d.ts +6 -0
  227. package/types/ngwr-animations-blur-reveal.d.ts +6 -0
  228. package/types/ngwr-animations-click-sparks.d.ts +6 -0
  229. package/types/ngwr-animations-confetti.d.ts +6 -0
  230. package/types/ngwr-animations-decode.d.ts +6 -0
  231. package/types/ngwr-animations-destruct.d.ts +6 -0
  232. package/types/ngwr-animations-dot-grid.d.ts +6 -0
  233. package/types/ngwr-animations-falling-letters.d.ts +6 -0
  234. package/types/ngwr-animations-flow-lines.d.ts +6 -0
  235. package/types/ngwr-animations-fluid-cursor.d.ts +6 -0
  236. package/types/ngwr-animations-glitch.d.ts +6 -0
  237. package/types/ngwr-animations-glow-border.d.ts +6 -0
  238. package/types/ngwr-animations-gradient-flow.d.ts +6 -0
  239. package/types/ngwr-animations-marquee.d.ts +6 -0
  240. package/types/ngwr-animations-orbit.d.ts +6 -0
  241. package/types/ngwr-animations-reveal.d.ts +6 -0
  242. package/types/ngwr-animations-ripple-grid.d.ts +6 -0
  243. package/types/ngwr-animations-rotate-reveal.d.ts +6 -0
  244. package/types/ngwr-animations-shimmer.d.ts +6 -0
  245. package/types/ngwr-animations-spotlight.d.ts +6 -0
  246. package/types/ngwr-animations-thread-lines.d.ts +6 -0
  247. package/types/ngwr-animations-tilt.d.ts +10 -0
  248. package/types/ngwr-animations-typewriter.d.ts +6 -0
  249. package/types/ngwr-breadcrumbs.d.ts +25 -0
  250. package/types/ngwr-button.d.ts +23 -3
  251. package/types/ngwr-carousel.d.ts +2 -0
  252. package/types/ngwr-cascader.d.ts +7 -0
  253. package/types/ngwr-charts-core.d.ts +16 -0
  254. package/types/ngwr-charts-meter-group.d.ts +2 -0
  255. package/types/ngwr-checkbox.d.ts +1 -0
  256. package/types/ngwr-color-picker.d.ts +1 -0
  257. package/types/ngwr-context-menu.d.ts +1 -1
  258. package/types/ngwr-date-picker.d.ts +19 -0
  259. package/types/ngwr-dialog.d.ts +39 -8
  260. package/types/ngwr-directives.d.ts +12 -4
  261. package/types/ngwr-drawer.d.ts +1 -1
  262. package/types/ngwr-dropdown.d.ts +1 -1
  263. package/types/ngwr-event-calendar.d.ts +4 -0
  264. package/types/ngwr-form.d.ts +85 -1
  265. package/types/ngwr-i18n.d.ts +65 -5
  266. package/types/ngwr-input-number.d.ts +8 -0
  267. package/types/ngwr-input.d.ts +7 -0
  268. package/types/ngwr-layout.d.ts +1 -1
  269. package/types/ngwr-loading-bar-router.d.ts +6 -0
  270. package/types/ngwr-page-header.d.ts +23 -1
  271. package/types/ngwr-popconfirm.d.ts +1 -1
  272. package/types/ngwr-popover.d.ts +28 -4
  273. package/types/ngwr-radio.d.ts +47 -5
  274. package/types/ngwr-segmented.d.ts +7 -0
  275. package/types/ngwr-select.d.ts +57 -13
  276. package/types/ngwr-sortable-list.d.ts +20 -7
  277. package/types/ngwr-table.d.ts +58 -5
  278. package/types/ngwr-tabs-router.d.ts +6 -0
  279. package/types/ngwr-toast.d.ts +11 -0
  280. package/types/ngwr-tour.d.ts +0 -1
  281. package/types/ngwr-typography.d.ts +7 -0
  282. package/types/ngwr-utils-router.d.ts +6 -0
  283. package/types/ngwr-utils.d.ts +56 -2
  284. package/types/ngwr-validators.d.ts +49 -1
  285. package/types/ngwr-version.d.ts +1 -1
  286. package/typography/styles/_index.scss +4 -0
  287. package/window/styles/_index.scss +1 -9
@@ -1,5 +1,37 @@
1
1
  import { isDevMode } from "@angular/core";
2
2
  import { wrParseDate } from "ngwr/date";
3
+ import { required, requiredError, validate } from "@angular/forms/signals";
4
+ /**
5
+ * @license
6
+ *
7
+ * Use of this source code is governed by an MIT-style license that can be
8
+ * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
9
+ */
10
+ function messageOf(message, ctx) {
11
+ return typeof message === "function" ? message(ctx) : message;
12
+ }
13
+ function wrMatches(path, otherPath, options) {
14
+ validate(path, (ctx) => {
15
+ const value = ctx.value();
16
+ if (value == null || value === "") return void 0;
17
+ if (options?.when && !options.when(ctx)) return void 0;
18
+ if (value === ctx.valueOf(otherPath)) return void 0;
19
+ return {
20
+ kind: "match",
21
+ target: String(ctx.stateOf(otherPath).keyInParent()),
22
+ message: messageOf(options?.message, ctx)
23
+ };
24
+ });
25
+ }
26
+ function wrNotBlank(path, options) {
27
+ required(path, options);
28
+ validate(path, (ctx) => {
29
+ const value = ctx.value();
30
+ if (typeof value !== "string" || value === "" || value.trim() !== "") return void 0;
31
+ if (options?.when && !options.when(ctx)) return void 0;
32
+ return requiredError({ message: messageOf(options?.message, ctx) });
33
+ });
34
+ }
3
35
  /**
4
36
  * @license
5
37
  *
@@ -191,6 +223,6 @@ const WrValidators = {
191
223
  };
192
224
  }
193
225
  };
194
- export { WrValidators };
226
+ export { WrValidators, wrMatches, wrNotBlank };
195
227
 
196
228
  //# sourceMappingURL=ngwr-validators.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-validators.mjs","names":[],"sources":["../../../projects/lib/validators/wr-validators.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isDevMode } from '@angular/core';\nimport { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\n\nimport { wrParseDate } from 'ngwr/date';\n\nfunction stringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v.trim();\n if (typeof v === 'number' || typeof v === 'boolean') return String(v).trim();\n return '';\n}\n\n/** Like {@link stringValue} but preserves whitespace — for checks that inspect spacing. */\nfunction rawStringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v;\n if (typeof v === 'number' || typeof v === 'boolean') return String(v);\n return '';\n}\n\n/**\n * `localhost` or a dotted name, then a port: a host the user typed without a\n * scheme, not a scheme of that name. A one-label name (`tel:911`) is left a\n * scheme, since nothing in the text tells the two apart; so is `myhost:8080`.\n */\nconst HOST_WITH_PORT = /^(?:localhost|[a-z0-9-]+(?:\\.[a-z0-9-]+)+):\\d+(?:[/?#]|$)/i;\n\n/** Luhn checksum. Returns true when the digit string is a valid card number. */\nfunction luhn(digits: string): boolean {\n let sum = 0;\n let dbl = false;\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits.charCodeAt(i) - 48;\n if (dbl) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n sum += d;\n dbl = !dbl;\n }\n return sum % 10 === 0;\n}\n\n/** ISO 13616 mod-97 check for IBANs. Returns the remainder; valid IBANs yield 1. */\nfunction mod97(iban: string): number {\n // Move first 4 chars to the end + convert letters to digits (A=10..Z=35).\n const rearranged = iban.slice(4) + iban.slice(0, 4);\n let expanded = '';\n for (let i = 0; i < rearranged.length; i++) {\n const code = rearranged.charCodeAt(i);\n if (code >= 65 && code <= 90) expanded += (code - 55).toString();\n else expanded += rearranged.charAt(i);\n }\n // Apply mod 97 in chunks — BigInt isn't necessary.\n let remainder = 0;\n for (let i = 0; i < expanded.length; i += 7) {\n const slice = remainder.toString() + expanded.substring(i, i + 7);\n remainder = Number.parseInt(slice, 10) % 97;\n }\n return remainder;\n}\n\n/**\n * A bound or a value as milliseconds, read as `wrParseDate` reads it. A date-only\n * string (`'2026-01-01'`) is that day's LOCAL midnight, so `minDate('2026-01-01')`\n * accepts the 1 January a date picker emits, in every zone, and a backend's\n * `'2026-01-01 14:30:00'` is the instant its `T` form names.\n */\nfunction toMs(value: unknown): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value !== 'string' && typeof value !== 'number') return Number.NaN;\n return wrParseDate(value)?.getTime() ?? Number.NaN;\n}\n\n/**\n * Bundled `ValidatorFn`s — pure functions, no DOM, no DI. (`matchFields` keeps\n * one bit of per-instance state, a latch so its dev-mode misconfiguration\n * warning fires once rather than on every validation run; it is never read as\n * part of the result.) Mirrors the API shape of Angular's built-in\n * `Validators` so it composes cleanly:\n *\n * ```ts\n * import { Validators } from '@angular/forms';\n * import { WrValidators } from 'ngwr/validators';\n *\n * new FormControl('', [\n * Validators.required,\n * WrValidators.cardNumber,\n * WrValidators.cvc(3),\n * WrValidators.match('password'),\n * WrValidators.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n * ]);\n * ```\n *\n * Each error is keyed under the validator name (e.g. `cardNumber`,\n * `cvc`, `iban`) so consumers can branch in templates.\n *\n * Anything Angular already ships (`required`, `email`, `min`, `max`,\n * `pattern`, …) is deliberately NOT duplicated here.\n *\n * @see https://ngwr.dev/reference/validators\n */\nexport const WrValidators = {\n // String shape\n\n /** No whitespace anywhere in the value. */\n noWhitespace: (control: AbstractControl): ValidationErrors | null => {\n const v = rawStringValue(control);\n if (v === '') return null;\n return /\\s/.test(v) ? { noWhitespace: true } : null;\n },\n\n /** 3, 4, 6, or 8-digit hex colour (`#abc`, `#1a2b3c`, `#1a2b3c4d`). */\n hexColor: (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(v) ? null : { hexColor: true };\n },\n\n // Network / payments\n\n /**\n * Valid URL. Accepts any scheme by default; pass `{ protocols: ['https'] }`\n * to restrict. A scheme is required by default; pass `{ requireProtocol: false }`\n * to also accept bare domains (e.g. `ngwr.dev`), assuming `https`. `localhost`\n * or a dotted name followed by a port (`ngwr.dev:8080`) is a bare domain, not a\n * scheme called `ngwr.dev`.\n */\n url: (options: { readonly protocols?: readonly string[]; readonly requireProtocol?: boolean } = {}): ValidatorFn => {\n const allow = options.protocols?.map(p => p.replace(/:$/, '').toLowerCase());\n const requireProtocol = options.requireProtocol ?? true;\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n // Without a scheme `new URL()` always throws, so this is the input it\n // cannot take — plus a host with a port. `localhost:4200` and\n // `ngwr.dev:443/docs` PARSE, the name before the colon being a legal\n // scheme and the port a legal path, and nobody typing one meant a scheme\n // called `localhost`.\n if (HOST_WITH_PORT.test(v) || !/^[a-z][a-z0-9+.-]*:/i.test(v)) {\n if (requireProtocol) return { url: true };\n // Bare domain support: when protocols aren't required, retry assuming\n // `https://`.\n let retried: URL;\n try {\n retried = new URL(`https://${v}`);\n } catch {\n return { url: true };\n }\n // Unreachable, and kept as a guard rather than deleted. `https` is a\n // WHATWG \"special\" scheme, which may not have an empty host, so\n // `new URL('https://' + v)` either threw above or produced one —\n // there is no `v` that lands here (checked by brute force over\n // two-character ASCII as well as by the spec). It stays because the\n // line above is the only thing making that true, and a future retry\n // through a non-special scheme would need it back.\n if (retried.host === '') {\n return { url: true };\n }\n if (allow && !allow.includes('https')) {\n return { url: { allowed: allow } };\n }\n return null;\n }\n let parsed: URL;\n try {\n parsed = new URL(v);\n } catch {\n return { url: true };\n }\n const protocol = parsed.protocol.replace(/:$/, '').toLowerCase();\n // WHATWG auto-inserts the authority for \"special\" schemes, so `http:host`\n // (missing `//`) still parses. Require the explicit `//` for those.\n const needsAuthority = ['http', 'https', 'ws', 'wss', 'ftp', 'file'].includes(protocol);\n if (needsAuthority && !/^[a-z][a-z0-9+.-]*:\\/\\//i.test(v)) {\n return { url: true };\n }\n if (allow && !allow.includes(protocol)) {\n return { url: { allowed: allow } };\n }\n return null;\n };\n },\n\n /** Credit card number — Luhn check + 13-19 digit length. Spaces and dashes are stripped first. */\n cardNumber: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/[\\s-]/g, '');\n if (raw === '') return null;\n if (!/^\\d{13,19}$/.test(raw)) return { cardNumber: true };\n return luhn(raw) ? null : { cardNumber: true };\n },\n\n /** CVC / CVV — N digits (default 3). Common: 3 for Visa/MC, 4 for Amex. */\n cvc: (length = 3): ValidatorFn => {\n const re = new RegExp(`^\\\\d{${length}}$`);\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return re.test(v) ? null : { cvc: { length } };\n };\n },\n\n /**\n * IBAN — basic structure (CC + 2 digits + up to 30 alphanumerics) +\n * the mod-97 check. Country-length tables not enforced.\n */\n iban: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/\\s/g, '').toUpperCase();\n if (raw === '') return null;\n if (!/^[A-Z]{2}\\d{2}[A-Z0-9]{4,30}$/.test(raw)) return { iban: true };\n return mod97(raw) === 1 ? null : { iban: true };\n },\n\n // Cross-field\n\n /**\n * Value must equal a sibling control's value (e.g. confirm-password).\n * The target lookup uses `control.parent.get(name)`, so it works\n * inside `FormGroup` and nested groups.\n *\n * **It cannot report a mismatch until something revalidates the control.**\n * Angular runs a control's validators inside the control's own constructor,\n * before the control has a parent — so the lookup finds nothing and this\n * returns `null`, and attaching the control to a group does not re-run it.\n *\n * `formControlName` revalidates when it binds, so a group rendered through\n * the reactive-forms directives corrects itself on its first change\n * detection. The window is open for everything that reads validity BEFORE\n * that: a route guard or resolver checking `form.valid`, a form built and\n * submitted from a service, a unit test. Such a group reports itself valid\n * with two values that plainly disagree.\n *\n * Put {@link WrValidators.matchFields} on the group to close it, and keep\n * this one on the child for the per-field message. They do not conflict —\n * different error keys, different hosts.\n *\n * @see WrValidators.matchFields\n */\n match: (targetName: string): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const target = control.parent?.get(targetName);\n if (!target) return null;\n return control.value === target.value ? null : { match: { target: targetName } };\n };\n },\n\n /**\n * Every named control must hold the same value — the group-level counterpart\n * to {@link WrValidators.match}. Attach it to the group that OWNS the fields,\n * not to one of its children.\n *\n * Unlike `match` this has no ordering hole: Angular attaches the children and\n * aggregates their values BEFORE it runs the group's own validators, so a\n * group built from a record whose fields already disagree is invalid the\n * moment it exists — no revalidation step, and nothing that depends on the\n * form having been rendered.\n *\n * Names are `AbstractControl.get()` paths, so `'billing.zip'` reaches into a\n * nested group. `null`, `undefined` and `''` all count as the same empty\n * value; everything else is compared with `===`, so two equal `Date`s are NOT\n * equal — compare a derived primitive instead. **Disabled controls are\n * skipped**, which makes the rule compare exactly what `group.value`\n * contains, and the error names only the controls it actually compared.\n *\n * A name that resolves to nothing, or to a group or an array rather than a\n * leaf control, turns the whole check off and warns once per validator\n * instance in dev — never a partial comparison of the names that did\n * resolve, and never an error the user has no way to satisfy.\n *\n * The error lands on the GROUP, and `<wr-form-field>` only reads the one\n * control projected into it — so pair this with `match` for a per-field\n * message, or render it yourself from `form.hasError('matchFields')`.\n *\n * @example\n * ```ts\n * new FormGroup(\n * {\n * password: new FormControl(''),\n * confirm: new FormControl('', [WrValidators.match('password')]),\n * },\n * { validators: [WrValidators.matchFields('password', 'confirm')] },\n * );\n * ```\n */\n matchFields: (first: string, second: string, ...rest: readonly string[]): ValidatorFn => {\n // Frozen because the payload hands these names out: a consumer who mutated\n // the array would be editing the validator's own configuration, and a\n // `push` of a name that resolves to nothing switches the check OFF — the\n // form then goes valid with two values that plainly disagree.\n const fields: readonly string[] = Object.freeze([first, second, ...rest]);\n\n // Per-instance, never module-level: a shared latch is process-wide state\n // under SSR, where one request's warning would silence every later one.\n let warned = false;\n\n const warn = (message: string): void => {\n if (!isDevMode() || warned) return;\n warned = true;\n // `warn`, not `error`: a prerender worker forwards app console errors as\n // `ERROR …` and `scripts/build/showcase-app.ts` fails the build on them —\n // and adding the control later is a legitimate pattern, not a red build.\n // Reported rather than thrown for the same reason.\n // eslint-disable-next-line no-console -- a silent pass is the very bug this validator removes\n console.warn(`[NGWR] matchFields: ${message} — the check did not run.`);\n };\n\n return (group: AbstractControl): ValidationErrors | null => {\n const compared: string[] = [];\n const values: unknown[] = [];\n\n for (const name of fields) {\n const found = group.get(name);\n if (!found) {\n warn(`no control at \"${name}\". Names are AbstractControl.get() paths, relative to this group`);\n return null;\n }\n\n // A group or an array RESOLVES, so it slips past the check above and\n // would then be compared by reference against another container —\n // never equal, whatever the user types. `'billing'` instead of\n // `'billing.zip'` is the easy mistake, and it makes a form that can\n // never be submitted and says nothing about why.\n if ('controls' in found) {\n warn(`\"${name}\" is a group or an array; name a leaf control, e.g. \"${name}.<field>\"`);\n return null;\n }\n\n // A disabled control is absent from `group.value` and its own\n // validators do not run; blocking a form on a value the user cannot\n // edit is not a rule anyone can satisfy.\n if (found.disabled) continue;\n\n compared.push(name);\n values.push((found.value as unknown) ?? '');\n }\n\n if (values.length < 2) return null;\n // A fresh array, and only the names that actually took part: naming a\n // disabled control would point the reader at something they cannot edit.\n // No control VALUES — this guards passwords, and error objects reach the\n // DOM, logs and error reporters.\n return values.every(v => v === values[0]) ? null : { matchFields: { fields: [...compared] } };\n };\n },\n\n // Choice\n\n /** Value must be one of the allowed entries (strict equality). */\n oneOf: <T>(allowed: readonly T[]): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const v = control.value as T;\n if (v == null || (v as unknown) === '') return null;\n return allowed.includes(v) ? null : { oneOf: { allowed } };\n };\n },\n\n // Date bounds\n\n /**\n * Value (Date | parseable) must be ≥ `min`. A date-only string (`'2026-01-01'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-01-01 14:30:00'` is read as its `T` form.\n */\n minDate: (min: Date | string | number): ValidatorFn => {\n const minMs = toMs(min);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { minDate: { min } };\n return got >= minMs ? null : { minDate: { min } };\n };\n },\n\n /**\n * Value (Date | parseable) must be ≤ `max`. A date-only string (`'2026-12-31'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-12-31 14:30:00'` is read as its `T` form.\n */\n maxDate: (max: Date | string | number): ValidatorFn => {\n const maxMs = toMs(max);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { maxDate: { max } };\n return got <= maxMs ? null : { maxDate: { max } };\n };\n },\n};\n"],"mappings":";;;;;;;;AAYA,SAAS,YAAY,SAAwB;CAC3C,MAAM,IAAa,QAAQ;CAC3B,IAAI,KAAK,MAAM,OAAO;CACtB,IAAI,OAAO,MAAM,UAAU,OAAO,EAAE,KAAI;CACxC,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,WAAW,OAAO,OAAO,CAAC,CAAC,CAAC,KAAI;CAC1E,OAAO;AACT;AAGA,SAAS,eAAe,SAAwB;CAC9C,MAAM,IAAa,QAAQ;CAC3B,IAAI,KAAK,MAAM,OAAO;CACtB,IAAI,OAAO,MAAM,UAAU,OAAO;CAClC,IAAI,OAAO,MAAM,YAAY,OAAO,MAAM,WAAW,OAAO,OAAO,CAAC;CACpE,OAAO;AACT;AAOA,MAAM,iBAAiB;AAGvB,SAAS,KAAK,QAAc;CAC1B,IAAI,MAAM;CACV,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,OAAO,SAAS,GAAG,KAAK,GAAG,KAAK;EAC3C,IAAI,IAAI,OAAO,WAAW,CAAC,IAAI;EAC/B,IAAI,KAAK;GACP,KAAK;GACL,IAAI,IAAI,GAAG,KAAK;EAClB;EACA,OAAO;EACP,MAAM,CAAC;CACT;CACA,OAAO,MAAM,OAAO;AACtB;AAGA,SAAS,MAAM,MAAY;C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AG,OAAO;GAK9B,OAAO,OAAO,OAAM,MAAK,MAAM,OAAO,EAAE,IAAI,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAC,EAAE;EAC7F;CACF;CAKA,QAAW,YAAsC;EAC/C,QAAQ,YAAqD;GAC3D,MAAM,IAAI,QAAQ;GAClB,IAAI,KAAK,QAAS,MAAkB,IAAI,OAAO;GAC/C,OAAO,QAAQ,SAAS,CAAC,IAAI,OAAO,EAAE,OAAO,EAAE,QAAO,EAAE;EAC1D;CACF;CASA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;CAOA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;AACD"}
1
+ {"version":3,"file":"ngwr-validators.mjs","names":[],"sources":["../../../projects/lib/validators/rules.ts","../../../projects/lib/validators/wr-validators.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport {\n type LogicFn,\n type PathKind,\n type SchemaPath,\n type SchemaPathRules,\n required,\n requiredError,\n validate,\n} from '@angular/forms/signals';\n\nfunction messageOf<TContext>(\n message: string | ((ctx: TContext) => string) | undefined,\n ctx: TContext\n): string | undefined {\n return typeof message === 'function' ? message(ctx) : message;\n}\n\n/** What both rules accept, shaped like the options of Angular's own Signal Forms rules. */\nexport interface WrRuleOptions<TValue, TPathKind extends PathKind = PathKind.Root> {\n /** The sentence the error carries. With none, the error has a `kind` only and the app words it. */\n readonly message?: string | LogicFn<TValue, string, TPathKind>;\n /** The rule applies only while this returns `true`. */\n readonly when?: LogicFn<TValue, boolean, TPathKind>;\n}\n\n/**\n * Signal Forms rule: the value at `path` must equal the value at `otherPath`,\n * such as a password confirmation. The counterpart of `WrValidators.match`.\n *\n * The error is `{ kind: 'match', target }`, where `target` is the other field's\n * key, so one `validation.match` entry answers both forms flavours. It is\n * re-evaluated when either value changes.\n *\n * Silent while `path` is empty (`''`, `null` or `undefined`), the way Angular's\n * own `minLength` and `pattern` are: add `required` to refuse an empty value.\n * Values are compared with `===`.\n *\n * @example\n * ```ts\n * form(model, path => {\n * required(path.confirm);\n * wrMatches(path.confirm, path.password);\n * });\n * ```\n */\nexport function wrMatches<TValue, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n otherPath: SchemaPath<NoInfer<TValue>, SchemaPathRules, PathKind.Child>,\n options?: WrRuleOptions<TValue, TPathKind>\n): void {\n validate(path, ctx => {\n const value = ctx.value();\n if (value == null || value === '') return undefined;\n if (options?.when && !options.when(ctx)) return undefined;\n if (value === ctx.valueOf(otherPath)) return undefined;\n\n return {\n kind: 'match',\n target: String(ctx.stateOf(otherPath).keyInParent()),\n message: messageOf(options?.message, ctx),\n };\n });\n}\n\n/**\n * Signal Forms rule: the string at `path` must hold something other than\n * whitespace. It is `required` that also refuses `' '`, so it replaces\n * `required` on the field rather than joining it.\n *\n * The error is Angular's own `{ kind: 'required' }` and the field is marked\n * required, so the copy and the asterisk an app already has for `required`\n * cover it. An empty string, `null` and `undefined` are refused by `required`\n * itself.\n *\n * @example\n * ```ts\n * form(model, path => {\n * wrNotBlank(path.reason, { message: 'Say why.' });\n * });\n * ```\n */\nexport function wrNotBlank<TValue extends string | null | undefined, TPathKind extends PathKind = PathKind.Root>(\n path: SchemaPath<TValue, SchemaPathRules.Supported, TPathKind>,\n options?: WrRuleOptions<TValue, TPathKind>\n): void {\n required(path, options);\n validate(path, ctx => {\n const value = ctx.value();\n // An empty string is `required`'s to report, and reporting it here too would print the message twice.\n if (typeof value !== 'string' || value === '' || value.trim() !== '') return undefined;\n if (options?.when && !options.when(ctx)) return undefined;\n\n return requiredError({ message: messageOf(options?.message, ctx) });\n });\n}\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { isDevMode } from '@angular/core';\nimport { type AbstractControl, type ValidationErrors, type ValidatorFn } from '@angular/forms';\n\nimport { wrParseDate } from 'ngwr/date';\n\nfunction stringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v.trim();\n if (typeof v === 'number' || typeof v === 'boolean') return String(v).trim();\n return '';\n}\n\n/** Like {@link stringValue} but preserves whitespace — for checks that inspect spacing. */\nfunction rawStringValue(control: AbstractControl): string {\n const v: unknown = control.value;\n if (v == null) return '';\n if (typeof v === 'string') return v;\n if (typeof v === 'number' || typeof v === 'boolean') return String(v);\n return '';\n}\n\n/**\n * `localhost` or a dotted name, then a port: a host the user typed without a\n * scheme, not a scheme of that name. A one-label name (`tel:911`) is left a\n * scheme, since nothing in the text tells the two apart; so is `myhost:8080`.\n */\nconst HOST_WITH_PORT = /^(?:localhost|[a-z0-9-]+(?:\\.[a-z0-9-]+)+):\\d+(?:[/?#]|$)/i;\n\n/** Luhn checksum. Returns true when the digit string is a valid card number. */\nfunction luhn(digits: string): boolean {\n let sum = 0;\n let dbl = false;\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits.charCodeAt(i) - 48;\n if (dbl) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n sum += d;\n dbl = !dbl;\n }\n return sum % 10 === 0;\n}\n\n/** ISO 13616 mod-97 check for IBANs. Returns the remainder; valid IBANs yield 1. */\nfunction mod97(iban: string): number {\n // Move first 4 chars to the end + convert letters to digits (A=10..Z=35).\n const rearranged = iban.slice(4) + iban.slice(0, 4);\n let expanded = '';\n for (let i = 0; i < rearranged.length; i++) {\n const code = rearranged.charCodeAt(i);\n if (code >= 65 && code <= 90) expanded += (code - 55).toString();\n else expanded += rearranged.charAt(i);\n }\n // Apply mod 97 in chunks — BigInt isn't necessary.\n let remainder = 0;\n for (let i = 0; i < expanded.length; i += 7) {\n const slice = remainder.toString() + expanded.substring(i, i + 7);\n remainder = Number.parseInt(slice, 10) % 97;\n }\n return remainder;\n}\n\n/**\n * A bound or a value as milliseconds, read as `wrParseDate` reads it. A date-only\n * string (`'2026-01-01'`) is that day's LOCAL midnight, so `minDate('2026-01-01')`\n * accepts the 1 January a date picker emits, in every zone, and a backend's\n * `'2026-01-01 14:30:00'` is the instant its `T` form names.\n */\nfunction toMs(value: unknown): number {\n if (value instanceof Date) return value.getTime();\n if (typeof value !== 'string' && typeof value !== 'number') return Number.NaN;\n return wrParseDate(value)?.getTime() ?? Number.NaN;\n}\n\n/**\n * Bundled `ValidatorFn`s — pure functions, no DOM, no DI. (`matchFields` keeps\n * one bit of per-instance state, a latch so its dev-mode misconfiguration\n * warning fires once rather than on every validation run; it is never read as\n * part of the result.) Mirrors the API shape of Angular's built-in\n * `Validators` so it composes cleanly:\n *\n * ```ts\n * import { Validators } from '@angular/forms';\n * import { WrValidators } from 'ngwr/validators';\n *\n * new FormControl('', [\n * Validators.required,\n * WrValidators.cardNumber,\n * WrValidators.cvc(3),\n * WrValidators.match('password'),\n * WrValidators.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n * ]);\n * ```\n *\n * Each error is keyed under the validator name (e.g. `cardNumber`,\n * `cvc`, `iban`) so consumers can branch in templates.\n *\n * Anything Angular already ships (`required`, `email`, `min`, `max`,\n * `pattern`, …) is deliberately NOT duplicated here.\n *\n * @see https://ngwr.dev/reference/validators\n */\nexport const WrValidators = {\n // String shape\n\n /** No whitespace anywhere in the value. */\n noWhitespace: (control: AbstractControl): ValidationErrors | null => {\n const v = rawStringValue(control);\n if (v === '') return null;\n return /\\s/.test(v) ? { noWhitespace: true } : null;\n },\n\n /** 3, 4, 6, or 8-digit hex colour (`#abc`, `#1a2b3c`, `#1a2b3c4d`). */\n hexColor: (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(v) ? null : { hexColor: true };\n },\n\n // Network / payments\n\n /**\n * Valid URL. Accepts any scheme by default; pass `{ protocols: ['https'] }`\n * to restrict. A scheme is required by default; pass `{ requireProtocol: false }`\n * to also accept bare domains (e.g. `ngwr.dev`), assuming `https`. `localhost`\n * or a dotted name followed by a port (`ngwr.dev:8080`) is a bare domain, not a\n * scheme called `ngwr.dev`.\n */\n url: (options: { readonly protocols?: readonly string[]; readonly requireProtocol?: boolean } = {}): ValidatorFn => {\n const allow = options.protocols?.map(p => p.replace(/:$/, '').toLowerCase());\n const requireProtocol = options.requireProtocol ?? true;\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n // Without a scheme `new URL()` always throws, so this is the input it\n // cannot take — plus a host with a port. `localhost:4200` and\n // `ngwr.dev:443/docs` PARSE, the name before the colon being a legal\n // scheme and the port a legal path, and nobody typing one meant a scheme\n // called `localhost`.\n if (HOST_WITH_PORT.test(v) || !/^[a-z][a-z0-9+.-]*:/i.test(v)) {\n if (requireProtocol) return { url: true };\n // Bare domain support: when protocols aren't required, retry assuming\n // `https://`.\n let retried: URL;\n try {\n retried = new URL(`https://${v}`);\n } catch {\n return { url: true };\n }\n // Unreachable, and kept as a guard rather than deleted. `https` is a\n // WHATWG \"special\" scheme, which may not have an empty host, so\n // `new URL('https://' + v)` either threw above or produced one —\n // there is no `v` that lands here (checked by brute force over\n // two-character ASCII as well as by the spec). It stays because the\n // line above is the only thing making that true, and a future retry\n // through a non-special scheme would need it back.\n if (retried.host === '') {\n return { url: true };\n }\n if (allow && !allow.includes('https')) {\n return { url: { allowed: allow } };\n }\n return null;\n }\n let parsed: URL;\n try {\n parsed = new URL(v);\n } catch {\n return { url: true };\n }\n const protocol = parsed.protocol.replace(/:$/, '').toLowerCase();\n // WHATWG auto-inserts the authority for \"special\" schemes, so `http:host`\n // (missing `//`) still parses. Require the explicit `//` for those.\n const needsAuthority = ['http', 'https', 'ws', 'wss', 'ftp', 'file'].includes(protocol);\n if (needsAuthority && !/^[a-z][a-z0-9+.-]*:\\/\\//i.test(v)) {\n return { url: true };\n }\n if (allow && !allow.includes(protocol)) {\n return { url: { allowed: allow } };\n }\n return null;\n };\n },\n\n /** Credit card number — Luhn check + 13-19 digit length. Spaces and dashes are stripped first. */\n cardNumber: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/[\\s-]/g, '');\n if (raw === '') return null;\n if (!/^\\d{13,19}$/.test(raw)) return { cardNumber: true };\n return luhn(raw) ? null : { cardNumber: true };\n },\n\n /** CVC / CVV — N digits (default 3). Common: 3 for Visa/MC, 4 for Amex. */\n cvc: (length = 3): ValidatorFn => {\n const re = new RegExp(`^\\\\d{${length}}$`);\n return (control: AbstractControl): ValidationErrors | null => {\n const v = stringValue(control);\n if (v === '') return null;\n return re.test(v) ? null : { cvc: { length } };\n };\n },\n\n /**\n * IBAN — basic structure (CC + 2 digits + up to 30 alphanumerics) +\n * the mod-97 check. Country-length tables not enforced.\n */\n iban: (control: AbstractControl): ValidationErrors | null => {\n const raw = stringValue(control).replace(/\\s/g, '').toUpperCase();\n if (raw === '') return null;\n if (!/^[A-Z]{2}\\d{2}[A-Z0-9]{4,30}$/.test(raw)) return { iban: true };\n return mod97(raw) === 1 ? null : { iban: true };\n },\n\n // Cross-field\n\n /**\n * Value must equal a sibling control's value (e.g. confirm-password).\n * The target lookup uses `control.parent.get(name)`, so it works\n * inside `FormGroup` and nested groups.\n *\n * **It cannot report a mismatch until something revalidates the control.**\n * Angular runs a control's validators inside the control's own constructor,\n * before the control has a parent — so the lookup finds nothing and this\n * returns `null`, and attaching the control to a group does not re-run it.\n *\n * `formControlName` revalidates when it binds, so a group rendered through\n * the reactive-forms directives corrects itself on its first change\n * detection. The window is open for everything that reads validity BEFORE\n * that: a route guard or resolver checking `form.valid`, a form built and\n * submitted from a service, a unit test. Such a group reports itself valid\n * with two values that plainly disagree.\n *\n * Put {@link WrValidators.matchFields} on the group to close it, and keep\n * this one on the child for the per-field message. They do not conflict —\n * different error keys, different hosts.\n *\n * @see WrValidators.matchFields\n */\n match: (targetName: string): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const target = control.parent?.get(targetName);\n if (!target) return null;\n return control.value === target.value ? null : { match: { target: targetName } };\n };\n },\n\n /**\n * Every named control must hold the same value — the group-level counterpart\n * to {@link WrValidators.match}. Attach it to the group that OWNS the fields,\n * not to one of its children.\n *\n * Unlike `match` this has no ordering hole: Angular attaches the children and\n * aggregates their values BEFORE it runs the group's own validators, so a\n * group built from a record whose fields already disagree is invalid the\n * moment it exists — no revalidation step, and nothing that depends on the\n * form having been rendered.\n *\n * Names are `AbstractControl.get()` paths, so `'billing.zip'` reaches into a\n * nested group. `null`, `undefined` and `''` all count as the same empty\n * value; everything else is compared with `===`, so two equal `Date`s are NOT\n * equal — compare a derived primitive instead. **Disabled controls are\n * skipped**, which makes the rule compare exactly what `group.value`\n * contains, and the error names only the controls it actually compared.\n *\n * A name that resolves to nothing, or to a group or an array rather than a\n * leaf control, turns the whole check off and warns once per validator\n * instance in dev — never a partial comparison of the names that did\n * resolve, and never an error the user has no way to satisfy.\n *\n * The error lands on the GROUP, and `<wr-form-field>` only reads the one\n * control projected into it — so pair this with `match` for a per-field\n * message, or render it yourself from `form.hasError('matchFields')`.\n *\n * @example\n * ```ts\n * new FormGroup(\n * {\n * password: new FormControl(''),\n * confirm: new FormControl('', [WrValidators.match('password')]),\n * },\n * { validators: [WrValidators.matchFields('password', 'confirm')] },\n * );\n * ```\n */\n matchFields: (first: string, second: string, ...rest: readonly string[]): ValidatorFn => {\n // Frozen because the payload hands these names out: a consumer who mutated\n // the array would be editing the validator's own configuration, and a\n // `push` of a name that resolves to nothing switches the check OFF — the\n // form then goes valid with two values that plainly disagree.\n const fields: readonly string[] = Object.freeze([first, second, ...rest]);\n\n // Per-instance, never module-level: a shared latch is process-wide state\n // under SSR, where one request's warning would silence every later one.\n let warned = false;\n\n const warn = (message: string): void => {\n if (!isDevMode() || warned) return;\n warned = true;\n // `warn`, not `error`: a prerender worker forwards app console errors as\n // `ERROR …` and `scripts/build/showcase-app.ts` fails the build on them —\n // and adding the control later is a legitimate pattern, not a red build.\n // Reported rather than thrown for the same reason.\n // eslint-disable-next-line no-console -- a silent pass is the very bug this validator removes\n console.warn(`[NGWR] matchFields: ${message} — the check did not run.`);\n };\n\n return (group: AbstractControl): ValidationErrors | null => {\n const compared: string[] = [];\n const values: unknown[] = [];\n\n for (const name of fields) {\n const found = group.get(name);\n if (!found) {\n warn(`no control at \"${name}\". Names are AbstractControl.get() paths, relative to this group`);\n return null;\n }\n\n // A group or an array RESOLVES, so it slips past the check above and\n // would then be compared by reference against another container —\n // never equal, whatever the user types. `'billing'` instead of\n // `'billing.zip'` is the easy mistake, and it makes a form that can\n // never be submitted and says nothing about why.\n if ('controls' in found) {\n warn(`\"${name}\" is a group or an array; name a leaf control, e.g. \"${name}.<field>\"`);\n return null;\n }\n\n // A disabled control is absent from `group.value` and its own\n // validators do not run; blocking a form on a value the user cannot\n // edit is not a rule anyone can satisfy.\n if (found.disabled) continue;\n\n compared.push(name);\n values.push((found.value as unknown) ?? '');\n }\n\n if (values.length < 2) return null;\n // A fresh array, and only the names that actually took part: naming a\n // disabled control would point the reader at something they cannot edit.\n // No control VALUES — this guards passwords, and error objects reach the\n // DOM, logs and error reporters.\n return values.every(v => v === values[0]) ? null : { matchFields: { fields: [...compared] } };\n };\n },\n\n // Choice\n\n /** Value must be one of the allowed entries (strict equality). */\n oneOf: <T>(allowed: readonly T[]): ValidatorFn => {\n return (control: AbstractControl): ValidationErrors | null => {\n const v = control.value as T;\n if (v == null || (v as unknown) === '') return null;\n return allowed.includes(v) ? null : { oneOf: { allowed } };\n };\n },\n\n // Date bounds\n\n /**\n * Value (Date | parseable) must be ≥ `min`. A date-only string (`'2026-01-01'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-01-01 14:30:00'` is read as its `T` form.\n */\n minDate: (min: Date | string | number): ValidatorFn => {\n const minMs = toMs(min);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { minDate: { min } };\n return got >= minMs ? null : { minDate: { min } };\n };\n },\n\n /**\n * Value (Date | parseable) must be ≤ `max`. A date-only string (`'2026-12-31'`),\n * as the bound or the value, is that day's LOCAL midnight, and a backend's\n * `'2026-12-31 14:30:00'` is read as its `T` form.\n */\n maxDate: (max: Date | string | number): ValidatorFn => {\n const maxMs = toMs(max);\n return (control: AbstractControl): ValidationErrors | null => {\n const v: unknown = control.value;\n if (v == null || v === '') return null;\n const got = toMs(v);\n if (Number.isNaN(got)) return { maxDate: { max } };\n return got <= maxMs ? null : { maxDate: { max } };\n };\n },\n};\n"],"mappings":";;;;;;;;;AAiBA,SAAS,UACP,SACA,KAAa;CAEb,OAAO,OAAO,YAAY,aAAa,QAAQ,GAAG,IAAI;AACxD;AA8BA,SAAgB,UACd,MACA,WACA,SAA0C;CAE1C,SAAS,OAAM,QAAM;EACnB,MAAM,QAAQ,IAAI,MAAK;EACvB,IAAI,SAAS,QAAQ,UAAU,IAAI,OAAO;EAC1C,IAAI,SAAS,QAAQ,CAAC,Q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,UAAU;IAEpB,SAAS,KAAK,IAAI;IAClB,OAAO,KAAM,MAAM,SAAqB,EAAE;GAC5C;GAEA,IAAI,OAAO,SAAS,GAAG,OAAO;GAK9B,OAAO,OAAO,OAAM,MAAK,MAAM,OAAO,EAAE,IAAI,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAC,EAAE;EAC7F;CACF;CAKA,QAAW,YAAsC;EAC/C,QAAQ,YAAqD;GAC3D,MAAM,IAAI,QAAQ;GAClB,IAAI,KAAK,QAAS,MAAkB,IAAI,OAAO;GAC/C,OAAO,QAAQ,SAAS,CAAC,IAAI,OAAO,EAAE,OAAO,EAAE,QAAO,EAAE;EAC1D;CACF;CASA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;CAOA,UAAU,QAA4C;EACpD,MAAM,QAAQ,KAAK,GAAG;EACtB,QAAQ,YAAqD;GAC3D,MAAM,IAAa,QAAQ;GAC3B,IAAI,KAAK,QAAQ,MAAM,IAAI,OAAO;GAClC,MAAM,MAAM,KAAK,CAAC;GAClB,IAAI,OAAO,MAAM,GAAG,GAAG,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;GAChD,OAAO,OAAO,QAAQ,OAAO,EAAE,SAAS,EAAE,IAAG,EAAE;EACjD;CACF;AACD"}
@@ -5,7 +5,7 @@ import { InjectionToken } from "@angular/core";
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE
7
7
  */
8
- const NGWR_VERSION = "16.5.0";
8
+ const NGWR_VERSION = "16.6.0";
9
9
  /**
10
10
  * @license
11
11
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.5.0';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n"],"mappings":";;;;;;;AAiBA,MAAa,eAAe;;;;;;;ACQ5B,MAAa,qBAAqB,IAAI,eAAuB,sBAAsB;CACjF,YAAY;CACZ,eAAe;AAChB,CAAA"}
1
+ {"version":3,"file":"ngwr-version.mjs","names":[],"sources":["../../../projects/lib/version/version.ts","../../../projects/lib/version/version.token.ts"],"sourcesContent":["/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\n/**\n * The ngwr library version string, kept in sync with\n * `projects/lib/package.json` by `scripts/release/prepare.ts`.\n *\n * Prefer this over reading `package.json` at runtime — that requires a JSON\n * import or `require`, neither of which tree-shakes well in Angular builds.\n *\n * Distinct from `Version` exported by `@angular/core`, which reports the\n * loaded Angular runtime version (e.g. `'22.0.0'`), not ngwr's.\n */\nexport const NGWR_VERSION = '16.6.0';\n","/**\n * @license\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE\n */\n\nimport { InjectionToken } from '@angular/core';\n\nimport { NGWR_VERSION } from './version';\n\n/**\n * Injection token holding the ngwr library version string.\n *\n * Default factory returns {@link NGWR_VERSION}. Override it in tests or in\n * apps that want to surface a custom build identifier.\n *\n * @example\n * ```ts\n * @Component({...})\n * export class FooterComponent {\n * readonly version = inject(NGWR_VERSION_TOKEN);\n * }\n * ```\n */\nexport const NGWR_VERSION_TOKEN = new InjectionToken<string>('NGWR_VERSION_TOKEN', {\n providedIn: 'root',\n factory: () => NGWR_VERSION,\n});\n"],"mappings":";;;;;;;AAiBA,MAAa,eAAe;;;;;;;ACQ5B,MAAa,qBAAqB,IAAI,eAAuB,sBAAsB;CACjF,YAAY;CACZ,eAAe;AAChB,CAAA"}
@@ -1,6 +1,43 @@
1
1
  @use '../../theme/styles' as theme;
2
2
  @include theme.loaded('form');
3
3
 
4
+ .wr-form {
5
+ --wr-form-gap: var(--wr-space-lg);
6
+ --wr-form-columns: 1;
7
+ --wr-form-inline-align: flex-end;
8
+
9
+ display: grid;
10
+ grid-template-columns: repeat(var(--wr-form-columns), minmax(0, 1fr));
11
+ gap: var(--wr-form-gap);
12
+
13
+ &--inline,
14
+ &:where([inline]:not([inline='false'])) {
15
+ display: flex;
16
+ flex-flow: row wrap;
17
+ align-items: var(--wr-form-inline-align);
18
+ }
19
+
20
+ // `inline-size` containment drops the element to no width in a shrink-to-fit
21
+ // parent, so only the mode that queries its width takes it.
22
+ &--columns {
23
+ container: wr-form / inline-size;
24
+ width: 100%;
25
+ }
26
+
27
+ &__span {
28
+ --wr-form-span: 1 / -1;
29
+
30
+ grid-column: var(--wr-form-span);
31
+ }
32
+ }
33
+
34
+ // A container cannot restyle itself, so the fields give up their column instead.
35
+ @container wr-form (max-width: 30rem) {
36
+ .wr-form--columns > * {
37
+ grid-column: 1 / -1;
38
+ }
39
+ }
40
+
4
41
  .wr-form-item {
5
42
  --wr-form-item-gap: var(--wr-space-sm);
6
43
  --wr-form-item-label-font-size: var(--wr-text-sm);
@@ -113,15 +113,7 @@
113
113
 
114
114
  // Each node's parents and children: read out, never drawn.
115
115
  &__sr-only {
116
- position: absolute;
117
- width: 1px;
118
- height: 1px;
119
- padding: 0;
120
- margin: -1px;
121
- overflow: hidden;
122
- clip: rect(0, 0, 0, 0);
123
- white-space: nowrap;
124
- border: 0;
116
+ @include theme.visually-hidden;
125
117
  }
126
118
 
127
119
  // Zoom and pan. The viewport stops scrolling: the stage keeps its layout box,
package/i18n/ar.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "إيقاف مؤقت",
548
548
  "play": "تشغيل"
549
+ },
550
+ "httpError": {
551
+ "400": "لم يقبل الخادم البيانات. تحقق من الحقول.",
552
+ "401": "انتهت جلستك. سجّل الدخول من جديد.",
553
+ "403": "ليست لديك صلاحية لهذا الإجراء.",
554
+ "404": "غير موجود. ربما تم حذفه.",
555
+ "409": "يتعارض هذا مع بيانات موجودة. حدّث الصفحة وحاول مرة أخرى.",
556
+ "413": "البيانات أكبر من أن تُرسل.",
557
+ "422": "بعض البيانات غير صالحة. تحقق من الحقول.",
558
+ "429": "طلبات كثيرة جدًا. حاول مرة أخرى بعد قليل.",
559
+ "503": "الخادم غير متاح. حاول مرة أخرى بعد دقيقة.",
560
+ "network": "لا يوجد اتصال بالخادم. تحقق من الشبكة وحاول مرة أخرى.",
561
+ "4xx": "تم رفض الطلب. رمز الخطأ: {{status}}.",
562
+ "5xx": "حدث خطأ في الخادم. حاول لاحقًا. رمز الخطأ: {{status}}.",
563
+ "unknown": "حدث خطأ ما. حاول لاحقًا."
549
564
  }
550
565
  }
package/i18n/cs.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pozastavit",
548
548
  "play": "Přehrát"
549
+ },
550
+ "httpError": {
551
+ "400": "Server data nepřijal. Zkontrolujte pole.",
552
+ "401": "Relace skončila. Přihlaste se znovu.",
553
+ "403": "K této akci nemáte oprávnění.",
554
+ "404": "Nenalezeno. Záznam mohl být smazán.",
555
+ "409": "Konflikt s existujícími daty. Obnovte stránku a zkuste to znovu.",
556
+ "413": "Data jsou příliš velká k odeslání.",
557
+ "422": "Některá data nejsou platná. Zkontrolujte pole.",
558
+ "429": "Příliš mnoho požadavků. Zkuste to za chvíli znovu.",
559
+ "503": "Server není dostupný. Zkuste to za minutu znovu.",
560
+ "network": "Bez spojení se serverem. Zkontrolujte síť a zkuste to znovu.",
561
+ "4xx": "Požadavek byl odmítnut. Kód chyby: {{status}}.",
562
+ "5xx": "Chyba serveru. Zkuste to později. Kód chyby: {{status}}.",
563
+ "unknown": "Něco se pokazilo. Zkuste to později."
549
564
  }
550
565
  }
package/i18n/de.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pausieren",
548
548
  "play": "Abspielen"
549
+ },
550
+ "httpError": {
551
+ "400": "Der Server hat die Daten nicht angenommen. Bitte die Felder prüfen.",
552
+ "401": "Die Sitzung ist abgelaufen. Bitte erneut anmelden.",
553
+ "403": "Keine Berechtigung für diese Aktion.",
554
+ "404": "Nicht gefunden. Möglicherweise wurde der Eintrag gelöscht.",
555
+ "409": "Konflikt mit vorhandenen Daten. Seite neu laden und erneut versuchen.",
556
+ "413": "Die Daten sind zu groß zum Senden.",
557
+ "422": "Einige Daten sind ungültig. Bitte die Felder prüfen.",
558
+ "429": "Zu viele Anfragen. Bitte gleich noch einmal versuchen.",
559
+ "503": "Der Server ist nicht erreichbar. Bitte in einer Minute erneut versuchen.",
560
+ "network": "Keine Verbindung zum Server. Netzwerk prüfen und erneut versuchen.",
561
+ "4xx": "Die Anfrage wurde abgelehnt. Fehlercode: {{status}}.",
562
+ "5xx": "Serverfehler. Bitte später erneut versuchen. Fehlercode: {{status}}.",
563
+ "unknown": "Etwas ist schiefgelaufen. Bitte später erneut versuchen."
549
564
  }
550
565
  }
package/i18n/en.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pause",
548
548
  "play": "Play"
549
+ },
550
+ "httpError": {
551
+ "400": "The server did not accept the data. Check the fields.",
552
+ "401": "Your session has ended. Sign in again.",
553
+ "403": "You do not have permission for this action.",
554
+ "404": "Not found. It may have been deleted.",
555
+ "409": "This conflicts with existing data. Refresh the page and try again.",
556
+ "413": "The data is too large to send.",
557
+ "422": "Some of the data is not valid. Check the fields.",
558
+ "429": "Too many requests. Try again in a moment.",
559
+ "503": "The server is unavailable. Try again in a minute.",
560
+ "network": "No connection to the server. Check your network and try again.",
561
+ "4xx": "The request was refused. Error code: {{status}}.",
562
+ "5xx": "The server failed. Try again later. Error code: {{status}}.",
563
+ "unknown": "Something went wrong. Try again later."
549
564
  }
550
565
  }
package/i18n/es.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pausar",
548
548
  "play": "Reproducir"
549
+ },
550
+ "httpError": {
551
+ "400": "El servidor no aceptó los datos. Revisa los campos.",
552
+ "401": "Tu sesión ha terminado. Inicia sesión de nuevo.",
553
+ "403": "No tienes permiso para esta acción.",
554
+ "404": "No encontrado. Puede que se haya eliminado.",
555
+ "409": "Hay un conflicto con datos existentes. Actualiza la página e inténtalo de nuevo.",
556
+ "413": "Los datos son demasiado grandes para enviarlos.",
557
+ "422": "Algunos datos no son válidos. Revisa los campos.",
558
+ "429": "Demasiadas solicitudes. Inténtalo de nuevo en un momento.",
559
+ "503": "El servidor no está disponible. Inténtalo de nuevo en un minuto.",
560
+ "network": "Sin conexión con el servidor. Comprueba tu red e inténtalo de nuevo.",
561
+ "4xx": "La solicitud fue rechazada. Código de error: {{status}}.",
562
+ "5xx": "Error del servidor. Inténtalo más tarde. Código de error: {{status}}.",
563
+ "unknown": "Algo salió mal. Inténtalo más tarde."
549
564
  }
550
565
  }
package/i18n/fr.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Mettre en pause",
548
548
  "play": "Lire"
549
+ },
550
+ "httpError": {
551
+ "400": "Le serveur n'a pas accepté les données. Vérifiez les champs.",
552
+ "401": "Votre session a expiré. Reconnectez-vous.",
553
+ "403": "Vous n'avez pas les droits pour cette action.",
554
+ "404": "Introuvable. L'élément a peut-être été supprimé.",
555
+ "409": "Conflit avec des données existantes. Actualisez la page et réessayez.",
556
+ "413": "Les données sont trop volumineuses pour être envoyées.",
557
+ "422": "Certaines données ne sont pas valides. Vérifiez les champs.",
558
+ "429": "Trop de requêtes. Réessayez dans un instant.",
559
+ "503": "Le serveur est indisponible. Réessayez dans une minute.",
560
+ "network": "Pas de connexion au serveur. Vérifiez votre réseau et réessayez.",
561
+ "4xx": "La requête a été refusée. Code d'erreur : {{status}}.",
562
+ "5xx": "Erreur du serveur. Réessayez plus tard. Code d'erreur : {{status}}.",
563
+ "unknown": "Une erreur s'est produite. Réessayez plus tard."
549
564
  }
550
565
  }
package/i18n/he.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "השהיה",
548
548
  "play": "הפעלה"
549
+ },
550
+ "httpError": {
551
+ "400": "השרת לא קיבל את הנתונים. בדקו את השדות.",
552
+ "401": "ההתחברות פגה. התחברו מחדש.",
553
+ "403": "אין לכם הרשאה לפעולה זו.",
554
+ "404": "לא נמצא. ייתכן שהפריט נמחק.",
555
+ "409": "יש התנגשות עם נתונים קיימים. רעננו את הדף ונסו שוב.",
556
+ "413": "הנתונים גדולים מדי לשליחה.",
557
+ "422": "חלק מהנתונים אינם תקינים. בדקו את השדות.",
558
+ "429": "יותר מדי בקשות. נסו שוב בעוד רגע.",
559
+ "503": "השרת אינו זמין. נסו שוב בעוד דקה.",
560
+ "network": "אין חיבור לשרת. בדקו את הרשת ונסו שוב.",
561
+ "4xx": "הבקשה נדחתה. קוד שגיאה: {{status}}.",
562
+ "5xx": "שגיאת שרת. נסו שוב מאוחר יותר. קוד שגיאה: {{status}}.",
563
+ "unknown": "משהו השתבש. נסו שוב מאוחר יותר."
549
564
  }
550
565
  }
package/i18n/hi.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "रोकें",
548
548
  "play": "चलाएँ"
549
+ },
550
+ "httpError": {
551
+ "400": "सर्वर ने डेटा स्वीकार नहीं किया। फ़ील्ड जाँचें।",
552
+ "401": "आपका सत्र समाप्त हो गया है। फिर से साइन इन करें।",
553
+ "403": "आपके पास इस कार्रवाई की अनुमति नहीं है।",
554
+ "404": "नहीं मिला। हो सकता है इसे हटा दिया गया हो।",
555
+ "409": "यह मौजूदा डेटा से टकराता है। पेज रीफ़्रेश करें और फिर से कोशिश करें।",
556
+ "413": "डेटा भेजने के लिए बहुत बड़ा है।",
557
+ "422": "कुछ डेटा मान्य नहीं है। फ़ील्ड जाँचें।",
558
+ "429": "बहुत ज़्यादा अनुरोध। थोड़ी देर में फिर से कोशिश करें।",
559
+ "503": "सर्वर उपलब्ध नहीं है। एक मिनट में फिर से कोशिश करें।",
560
+ "network": "सर्वर से कनेक्शन नहीं है। अपना नेटवर्क जाँचें और फिर से कोशिश करें।",
561
+ "4xx": "अनुरोध अस्वीकार कर दिया गया। त्रुटि कोड: {{status}}।",
562
+ "5xx": "सर्वर में त्रुटि हुई। बाद में फिर से कोशिश करें। त्रुटि कोड: {{status}}।",
563
+ "unknown": "कुछ गड़बड़ हो गई। बाद में फिर से कोशिश करें।"
549
564
  }
550
565
  }
package/i18n/id.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Jeda",
548
548
  "play": "Putar"
549
+ },
550
+ "httpError": {
551
+ "400": "Server tidak menerima data. Periksa kolom isian.",
552
+ "401": "Sesi Anda telah berakhir. Masuk lagi.",
553
+ "403": "Anda tidak memiliki izin untuk tindakan ini.",
554
+ "404": "Tidak ditemukan. Mungkin sudah dihapus.",
555
+ "409": "Bertentangan dengan data yang sudah ada. Muat ulang halaman dan coba lagi.",
556
+ "413": "Data terlalu besar untuk dikirim.",
557
+ "422": "Sebagian data tidak valid. Periksa kolom isian.",
558
+ "429": "Terlalu banyak permintaan. Coba lagi sebentar lagi.",
559
+ "503": "Server tidak tersedia. Coba lagi dalam satu menit.",
560
+ "network": "Tidak ada koneksi ke server. Periksa jaringan Anda dan coba lagi.",
561
+ "4xx": "Permintaan ditolak. Kode kesalahan: {{status}}.",
562
+ "5xx": "Server gagal. Coba lagi nanti. Kode kesalahan: {{status}}.",
563
+ "unknown": "Terjadi kesalahan. Coba lagi nanti."
549
564
  }
550
565
  }
package/i18n/it.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pausa",
548
548
  "play": "Riproduci"
549
+ },
550
+ "httpError": {
551
+ "400": "Il server non ha accettato i dati. Controlla i campi.",
552
+ "401": "La sessione è scaduta. Accedi di nuovo.",
553
+ "403": "Non hai i permessi per questa azione.",
554
+ "404": "Non trovato. Potrebbe essere stato eliminato.",
555
+ "409": "Conflitto con dati esistenti. Aggiorna la pagina e riprova.",
556
+ "413": "I dati sono troppo grandi per essere inviati.",
557
+ "422": "Alcuni dati non sono validi. Controlla i campi.",
558
+ "429": "Troppe richieste. Riprova tra un momento.",
559
+ "503": "Il server non è disponibile. Riprova tra un minuto.",
560
+ "network": "Nessuna connessione al server. Controlla la rete e riprova.",
561
+ "4xx": "La richiesta è stata rifiutata. Codice errore: {{status}}.",
562
+ "5xx": "Errore del server. Riprova più tardi. Codice errore: {{status}}.",
563
+ "unknown": "Qualcosa è andato storto. Riprova più tardi."
549
564
  }
550
565
  }
package/i18n/ja.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "一時停止",
548
548
  "play": "再生"
549
+ },
550
+ "httpError": {
551
+ "400": "サーバーがデータを受け付けませんでした。入力内容を確認してください。",
552
+ "401": "セッションが終了しました。もう一度ログインしてください。",
553
+ "403": "この操作を行う権限がありません。",
554
+ "404": "見つかりません。削除された可能性があります。",
555
+ "409": "既存のデータと競合しています。ページを更新して、もう一度お試しください。",
556
+ "413": "データが大きすぎて送信できません。",
557
+ "422": "一部のデータが正しくありません。入力内容を確認してください。",
558
+ "429": "リクエストが多すぎます。しばらくしてからもう一度お試しください。",
559
+ "503": "サーバーを利用できません。1分後にもう一度お試しください。",
560
+ "network": "サーバーに接続できません。ネットワークを確認して、もう一度お試しください。",
561
+ "4xx": "リクエストは拒否されました。エラーコード: {{status}}",
562
+ "5xx": "サーバーでエラーが発生しました。後でもう一度お試しください。エラーコード: {{status}}",
563
+ "unknown": "問題が発生しました。後でもう一度お試しください。"
549
564
  }
550
565
  }
package/i18n/ko.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "일시정지",
548
548
  "play": "재생"
549
+ },
550
+ "httpError": {
551
+ "400": "서버가 데이터를 받아들이지 않았습니다. 입력란을 확인하세요.",
552
+ "401": "세션이 종료되었습니다. 다시 로그인하세요.",
553
+ "403": "이 작업을 수행할 권한이 없습니다.",
554
+ "404": "찾을 수 없습니다. 삭제되었을 수 있습니다.",
555
+ "409": "기존 데이터와 충돌합니다. 페이지를 새로 고친 후 다시 시도하세요.",
556
+ "413": "데이터가 너무 커서 보낼 수 없습니다.",
557
+ "422": "일부 데이터가 올바르지 않습니다. 입력란을 확인하세요.",
558
+ "429": "요청이 너무 많습니다. 잠시 후 다시 시도하세요.",
559
+ "503": "서버를 사용할 수 없습니다. 1분 후 다시 시도하세요.",
560
+ "network": "서버에 연결할 수 없습니다. 네트워크를 확인하고 다시 시도하세요.",
561
+ "4xx": "요청이 거부되었습니다. 오류 코드: {{status}}.",
562
+ "5xx": "서버 오류가 발생했습니다. 나중에 다시 시도하세요. 오류 코드: {{status}}.",
563
+ "unknown": "문제가 발생했습니다. 나중에 다시 시도하세요."
549
564
  }
550
565
  }
package/i18n/nl.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pauzeren",
548
548
  "play": "Afspelen"
549
+ },
550
+ "httpError": {
551
+ "400": "De server heeft de gegevens niet geaccepteerd. Controleer de velden.",
552
+ "401": "Je sessie is verlopen. Meld je opnieuw aan.",
553
+ "403": "Je hebt geen rechten voor deze actie.",
554
+ "404": "Niet gevonden. Mogelijk is het verwijderd.",
555
+ "409": "Dit botst met bestaande gegevens. Vernieuw de pagina en probeer het opnieuw.",
556
+ "413": "De gegevens zijn te groot om te verzenden.",
557
+ "422": "Sommige gegevens zijn ongeldig. Controleer de velden.",
558
+ "429": "Te veel verzoeken. Probeer het zo meteen opnieuw.",
559
+ "503": "De server is niet beschikbaar. Probeer het over een minuut opnieuw.",
560
+ "network": "Geen verbinding met de server. Controleer je netwerk en probeer het opnieuw.",
561
+ "4xx": "Het verzoek is geweigerd. Foutcode: {{status}}.",
562
+ "5xx": "Serverfout. Probeer het later opnieuw. Foutcode: {{status}}.",
563
+ "unknown": "Er is iets misgegaan. Probeer het later opnieuw."
549
564
  }
550
565
  }
package/i18n/pl.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Wstrzymaj",
548
548
  "play": "Odtwórz"
549
+ },
550
+ "httpError": {
551
+ "400": "Serwer nie przyjął danych. Sprawdź pola.",
552
+ "401": "Sesja wygasła. Zaloguj się ponownie.",
553
+ "403": "Nie masz uprawnień do tej czynności.",
554
+ "404": "Nie znaleziono. Możliwe, że wpis został usunięty.",
555
+ "409": "Konflikt z istniejącymi danymi. Odśwież stronę i spróbuj ponownie.",
556
+ "413": "Dane są zbyt duże, aby je wysłać.",
557
+ "422": "Część danych jest nieprawidłowa. Sprawdź pola.",
558
+ "429": "Zbyt wiele żądań. Spróbuj ponownie za chwilę.",
559
+ "503": "Serwer jest niedostępny. Spróbuj ponownie za minutę.",
560
+ "network": "Brak połączenia z serwerem. Sprawdź sieć i spróbuj ponownie.",
561
+ "4xx": "Żądanie zostało odrzucone. Kod błędu: {{status}}.",
562
+ "5xx": "Błąd serwera. Spróbuj ponownie później. Kod błędu: {{status}}.",
563
+ "unknown": "Coś poszło nie tak. Spróbuj ponownie później."
549
564
  }
550
565
  }
package/i18n/pt.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pausar",
548
548
  "play": "Reproduzir"
549
+ },
550
+ "httpError": {
551
+ "400": "O servidor não aceitou os dados. Verifique os campos.",
552
+ "401": "A sessão terminou. Inicie sessão novamente.",
553
+ "403": "Não tem permissão para esta ação.",
554
+ "404": "Não encontrado. Pode ter sido eliminado.",
555
+ "409": "Conflito com dados existentes. Atualize a página e tente novamente.",
556
+ "413": "Os dados são demasiado grandes para enviar.",
557
+ "422": "Alguns dados não são válidos. Verifique os campos.",
558
+ "429": "Demasiados pedidos. Tente novamente dentro de momentos.",
559
+ "503": "O servidor está indisponível. Tente novamente dentro de um minuto.",
560
+ "network": "Sem ligação ao servidor. Verifique a rede e tente novamente.",
561
+ "4xx": "O pedido foi recusado. Código de erro: {{status}}.",
562
+ "5xx": "Erro do servidor. Tente novamente mais tarde. Código de erro: {{status}}.",
563
+ "unknown": "Algo correu mal. Tente novamente mais tarde."
549
564
  }
550
565
  }
package/i18n/ru.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Пауза",
548
548
  "play": "Воспроизвести"
549
+ },
550
+ "httpError": {
551
+ "400": "Сервер не принял данные. Проверьте поля.",
552
+ "401": "Сессия закончилась. Войдите заново.",
553
+ "403": "Недостаточно прав для этого действия.",
554
+ "404": "Не найдено. Возможно, запись удалили.",
555
+ "409": "Это противоречит уже сохранённым данным. Обновите страницу и повторите.",
556
+ "413": "Данные слишком большие для отправки.",
557
+ "422": "Часть данных заполнена неверно. Проверьте поля.",
558
+ "429": "Слишком много запросов. Повторите чуть позже.",
559
+ "503": "Сервер недоступен. Повторите через минуту.",
560
+ "network": "Нет связи с сервером. Проверьте подключение и повторите.",
561
+ "4xx": "Запрос отклонён. Код ошибки: {{status}}.",
562
+ "5xx": "Ошибка на сервере. Повторите позже. Код ошибки: {{status}}.",
563
+ "unknown": "Что-то пошло не так. Повторите позже."
549
564
  }
550
565
  }
package/i18n/sv.json CHANGED
@@ -546,5 +546,20 @@
546
546
  "marquee": {
547
547
  "pause": "Pausa",
548
548
  "play": "Spela upp"
549
+ },
550
+ "httpError": {
551
+ "400": "Servern godtog inte uppgifterna. Kontrollera fälten.",
552
+ "401": "Sessionen har gått ut. Logga in igen.",
553
+ "403": "Du har inte behörighet för den här åtgärden.",
554
+ "404": "Hittades inte. Posten kan ha tagits bort.",
555
+ "409": "Detta krockar med befintliga uppgifter. Ladda om sidan och försök igen.",
556
+ "413": "Uppgifterna är för stora för att skickas.",
557
+ "422": "Vissa uppgifter är ogiltiga. Kontrollera fälten.",
558
+ "429": "För många förfrågningar. Försök igen om en stund.",
559
+ "503": "Servern är inte tillgänglig. Försök igen om en minut.",
560
+ "network": "Ingen anslutning till servern. Kontrollera nätverket och försök igen.",
561
+ "4xx": "Förfrågan avvisades. Felkod: {{status}}.",
562
+ "5xx": "Serverfel. Försök igen senare. Felkod: {{status}}.",
563
+ "unknown": "Något gick fel. Försök igen senare."
549
564
  }
550
565
  }