@reformer/core 1.1.0-beta.8 → 2.0.0-beta.10

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 (151) hide show
  1. package/dist/behaviors/compute-from.d.ts +2 -0
  2. package/dist/behaviors/compute-from.js +31 -0
  3. package/dist/behaviors/copy-from.d.ts +2 -0
  4. package/dist/behaviors/copy-from.js +29 -0
  5. package/dist/behaviors/enable-when.d.ts +2 -0
  6. package/dist/behaviors/enable-when.js +25 -0
  7. package/dist/behaviors/reset-when.d.ts +2 -0
  8. package/dist/behaviors/reset-when.js +24 -0
  9. package/dist/behaviors/revalidate-when.d.ts +2 -0
  10. package/dist/behaviors/revalidate-when.js +18 -0
  11. package/dist/behaviors/sync-fields.d.ts +2 -0
  12. package/dist/behaviors/sync-fields.js +41 -0
  13. package/dist/behaviors/transform-value.d.ts +2 -0
  14. package/dist/behaviors/transform-value.js +45 -0
  15. package/dist/behaviors/watch-field.d.ts +2 -0
  16. package/dist/behaviors/watch-field.js +21 -0
  17. package/dist/behaviors.js +27 -20
  18. package/dist/core/behavior/behavior-context.d.ts +27 -13
  19. package/dist/core/behavior/behavior-registry.d.ts +15 -27
  20. package/dist/core/behavior/behaviors/compute-from.d.ts +50 -21
  21. package/dist/core/behavior/behaviors/copy-from.d.ts +39 -14
  22. package/dist/core/behavior/behaviors/enable-when.d.ts +88 -19
  23. package/dist/core/behavior/behaviors/reset-when.d.ts +31 -18
  24. package/dist/core/behavior/behaviors/revalidate-when.d.ts +40 -17
  25. package/dist/core/behavior/behaviors/sync-fields.d.ts +34 -14
  26. package/dist/core/behavior/behaviors/transform-value.d.ts +116 -44
  27. package/dist/core/behavior/behaviors/watch-field.d.ts +66 -21
  28. package/dist/core/behavior/compose-behavior.d.ts +2 -12
  29. package/dist/core/behavior/index.d.ts +0 -1
  30. package/dist/core/behavior/types.d.ts +2 -8
  31. package/dist/core/factories/node-factory.d.ts +6 -29
  32. package/dist/core/nodes/array-node.d.ts +42 -22
  33. package/dist/core/nodes/field-node.d.ts +51 -26
  34. package/dist/core/nodes/form-node.d.ts +18 -20
  35. package/dist/core/nodes/group-node.d.ts +37 -212
  36. package/dist/core/types/deep-schema.d.ts +2 -12
  37. package/dist/core/types/field-path.d.ts +1 -1
  38. package/dist/core/types/form-context.d.ts +27 -27
  39. package/dist/core/types/{group-node-proxy.d.ts → form-proxy.d.ts} +12 -42
  40. package/dist/core/types/index.d.ts +52 -6
  41. package/dist/core/types/validation-schema.d.ts +3 -12
  42. package/dist/core/utils/abstract-registry.d.ts +74 -0
  43. package/dist/core/utils/aggregate-signals.d.ts +71 -0
  44. package/dist/core/utils/create-form.d.ts +3 -20
  45. package/dist/core/utils/error-handler.d.ts +1 -18
  46. package/dist/core/utils/field-path-navigator.d.ts +1 -1
  47. package/dist/core/{validation → utils}/field-path.d.ts +23 -6
  48. package/dist/core/utils/form-observer.d.ts +176 -0
  49. package/dist/core/utils/form-proxy-builder.d.ts +25 -0
  50. package/dist/core/utils/form-submitter.d.ts +121 -0
  51. package/dist/core/utils/index.d.ts +10 -2
  52. package/dist/core/utils/registry-helpers.d.ts +0 -7
  53. package/dist/core/utils/safe-effect.d.ts +73 -0
  54. package/dist/core/utils/status-machine.d.ts +153 -0
  55. package/dist/core/utils/type-guards.d.ts +5 -23
  56. package/dist/core/utils/unique-id.d.ts +53 -0
  57. package/dist/core/validation/core/apply-when.d.ts +3 -9
  58. package/dist/core/validation/core/apply.d.ts +2 -13
  59. package/dist/core/validation/core/validate-async.d.ts +2 -8
  60. package/dist/core/validation/core/validate-tree.d.ts +0 -6
  61. package/dist/core/validation/core/validate.d.ts +1 -7
  62. package/dist/core/validation/index.d.ts +8 -2
  63. package/dist/core/validation/validate-form.d.ts +1 -38
  64. package/dist/core/validation/validation-applicator.d.ts +2 -21
  65. package/dist/core/validation/validation-context.d.ts +67 -28
  66. package/dist/core/validation/validation-registry.d.ts +11 -25
  67. package/dist/core/validation/validators/array-validators.d.ts +2 -12
  68. package/dist/core/validation/validators/date-utils.d.ts +26 -0
  69. package/dist/core/validation/validators/email.d.ts +2 -9
  70. package/dist/core/validation/validators/future-date.d.ts +35 -0
  71. package/dist/core/validation/validators/index.d.ts +7 -1
  72. package/dist/core/validation/validators/is-date.d.ts +36 -0
  73. package/dist/core/validation/validators/max-age.d.ts +36 -0
  74. package/dist/core/validation/validators/max-date.d.ts +36 -0
  75. package/dist/core/validation/validators/max-length.d.ts +3 -10
  76. package/dist/core/validation/validators/max.d.ts +3 -10
  77. package/dist/core/validation/validators/min-age.d.ts +36 -0
  78. package/dist/core/validation/validators/min-date.d.ts +36 -0
  79. package/dist/core/validation/validators/min-length.d.ts +3 -10
  80. package/dist/core/validation/validators/min.d.ts +3 -10
  81. package/dist/core/validation/validators/number.d.ts +2 -9
  82. package/dist/core/validation/validators/past-date.d.ts +35 -0
  83. package/dist/core/validation/validators/pattern.d.ts +2 -9
  84. package/dist/core/validation/validators/phone.d.ts +2 -9
  85. package/dist/core/validation/validators/required.d.ts +2 -9
  86. package/dist/core/validation/validators/url.d.ts +2 -9
  87. package/dist/date-utils-xUWFslTj.js +29 -0
  88. package/dist/field-path-DuKdGcIE.js +66 -0
  89. package/dist/hooks/types.d.ts +328 -0
  90. package/dist/hooks/useArrayLength.d.ts +31 -0
  91. package/dist/hooks/useFormControl.d.ts +15 -39
  92. package/dist/hooks/useFormControlValue.d.ts +167 -0
  93. package/dist/hooks/useHiddenCondition.d.ts +25 -0
  94. package/dist/hooks/useSignalSubscription.d.ts +17 -0
  95. package/dist/index-D25LsbRm.js +73 -0
  96. package/dist/index.d.ts +5 -1
  97. package/dist/index.js +1248 -1357
  98. package/dist/registry-helpers-Bv_BJ1s-.js +615 -0
  99. package/dist/safe-effect-Dh8uw81c.js +20 -0
  100. package/dist/validate-C3XiA_zf.js +10 -0
  101. package/dist/validators/email.d.ts +2 -0
  102. package/dist/validators/email.js +13 -0
  103. package/dist/validators/future-date.d.ts +2 -0
  104. package/dist/validators/future-date.js +20 -0
  105. package/dist/validators/is-date.d.ts +2 -0
  106. package/dist/validators/is-date.js +12 -0
  107. package/dist/validators/max-age.d.ts +2 -0
  108. package/dist/validators/max-age.js +20 -0
  109. package/dist/validators/max-date.d.ts +2 -0
  110. package/dist/validators/max-date.js +20 -0
  111. package/dist/validators/max-length.d.ts +2 -0
  112. package/dist/validators/max-length.js +11 -0
  113. package/dist/validators/max.d.ts +2 -0
  114. package/dist/validators/max.js +11 -0
  115. package/dist/validators/min-age.d.ts +2 -0
  116. package/dist/validators/min-age.js +20 -0
  117. package/dist/validators/min-date.d.ts +2 -0
  118. package/dist/validators/min-date.js +20 -0
  119. package/dist/validators/min-length.d.ts +2 -0
  120. package/dist/validators/min-length.js +11 -0
  121. package/dist/validators/min.d.ts +2 -0
  122. package/dist/validators/min.js +11 -0
  123. package/dist/validators/number.d.ts +2 -0
  124. package/dist/validators/number.js +35 -0
  125. package/dist/validators/past-date.d.ts +2 -0
  126. package/dist/validators/past-date.js +20 -0
  127. package/dist/validators/pattern.d.ts +2 -0
  128. package/dist/validators/pattern.js +11 -0
  129. package/dist/validators/phone.d.ts +2 -0
  130. package/dist/validators/phone.js +35 -0
  131. package/dist/validators/required.d.ts +2 -0
  132. package/dist/validators/required.js +15 -0
  133. package/dist/validators/url.d.ts +2 -0
  134. package/dist/validators/url.js +19 -0
  135. package/dist/validators-BGsNOgT1.js +207 -0
  136. package/dist/validators.js +53 -28
  137. package/llms.txt +8069 -357
  138. package/package.json +87 -8
  139. package/dist/behaviors-BRaiR-UY.js +0 -528
  140. package/dist/core/behavior/behavior-applicator.d.ts +0 -71
  141. package/dist/core/behavior/create-field-path.d.ts +0 -20
  142. package/dist/core/context/form-context-impl.d.ts +0 -29
  143. package/dist/core/nodes/group-node/field-registry.d.ts +0 -191
  144. package/dist/core/nodes/group-node/index.d.ts +0 -11
  145. package/dist/core/nodes/group-node/proxy-builder.d.ts +0 -71
  146. package/dist/core/nodes/group-node/state-manager.d.ts +0 -184
  147. package/dist/core/utils/debounce.d.ts +0 -160
  148. package/dist/core/utils/resources.d.ts +0 -41
  149. package/dist/core/validation/validators/date.d.ts +0 -38
  150. package/dist/registry-helpers-BfCZcMkO.js +0 -426
  151. package/dist/validators-DjXtDVoE.js +0 -455
@@ -1,455 +0,0 @@
1
- import { g as u, V as y } from "./registry-helpers-BfCZcMkO.js";
2
- function o() {
3
- return d("");
4
- }
5
- function d(r) {
6
- return new Proxy({}, {
7
- get(e, t) {
8
- if (typeof t == "symbol")
9
- return;
10
- if (t === "__path")
11
- return r || t;
12
- if (t === "__key") {
13
- const n = r.split(".");
14
- return n[n.length - 1] || t;
15
- }
16
- if (t === "then" || t === "catch" || t === "finally" || t === "constructor" || t === "toString" || t === "valueOf" || t === "toJSON")
17
- return;
18
- const a = r ? `${r}.${t}` : t, s = {
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- __key: t,
21
- __path: a,
22
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
- __formType: void 0,
24
- __fieldType: void 0
25
- };
26
- return new Proxy(s, {
27
- get(n, i) {
28
- if (typeof i != "symbol") {
29
- if (i === "__path") return a;
30
- if (i === "__key") return t;
31
- if (i !== "__formType" && i !== "__fieldType" && !(i === "then" || i === "catch" || i === "finally" || i === "constructor" || i === "toString" || i === "valueOf" || i === "toJSON"))
32
- return d(`${a}.${i}`);
33
- }
34
- }
35
- });
36
- }
37
- });
38
- }
39
- function f(r) {
40
- if (typeof r == "string")
41
- return r;
42
- if (r && typeof r == "object") {
43
- const e = r.__path;
44
- if (typeof e == "string")
45
- return e;
46
- }
47
- throw new Error("Invalid field path node: " + JSON.stringify(r));
48
- }
49
- function _(r) {
50
- const e = f(r);
51
- return d(e);
52
- }
53
- function N(r) {
54
- if (r && typeof r == "object" && "__key" in r)
55
- return r.__key;
56
- if (typeof r == "string") {
57
- const e = r.split(".");
58
- return e[e.length - 1];
59
- }
60
- throw new Error("Invalid field path node");
61
- }
62
- function m(r, e, t) {
63
- if (!r) return;
64
- const a = f(r);
65
- u().registerSync(a, e, t);
66
- }
67
- function b(r, e, t) {
68
- const a = f(r);
69
- u().registerAsync(a, e, t);
70
- }
71
- function D(r, e) {
72
- u().registerTree(r, e);
73
- }
74
- function T(r, e) {
75
- if (!Array.isArray(r) && !Array.isArray(e) && r && !("__key" in r) && !("__path" in r)) {
76
- e(r);
77
- return;
78
- }
79
- const t = (Array.isArray(r) ? r : [r]).filter(
80
- Boolean
81
- ), a = Array.isArray(e) ? e : [e];
82
- for (const s of t) {
83
- const n = _(s);
84
- for (const i of a)
85
- i(n);
86
- }
87
- }
88
- function V(r, e, t) {
89
- const a = f(r);
90
- u().enterCondition(a, e);
91
- try {
92
- const s = o();
93
- t(s);
94
- } finally {
95
- u().exitCondition();
96
- }
97
- }
98
- function R(r, e) {
99
- r && m(r, (t) => t == null || t === "" ? {
100
- code: "required",
101
- message: e?.message || "Поле обязательно для заполнения",
102
- params: e?.params
103
- } : typeof t == "boolean" && t !== !0 ? {
104
- code: "required",
105
- message: e?.message || "Поле обязательно для заполнения",
106
- params: e?.params
107
- } : null);
108
- }
109
- function C(r, e, t) {
110
- r && m(r, (a) => a == null ? null : a < e ? {
111
- code: "min",
112
- message: t?.message || `Минимальное значение: ${e}`,
113
- params: { min: e, actual: a, ...t?.params }
114
- } : null);
115
- }
116
- function F(r, e, t) {
117
- r && m(r, (a) => a == null ? null : a > e ? {
118
- code: "max",
119
- message: t?.message || `Максимальное значение: ${e}`,
120
- params: { max: e, actual: a, ...t?.params }
121
- } : null);
122
- }
123
- function h(r, e, t) {
124
- r && m(r, (a) => a && a.length < e ? {
125
- code: "minLength",
126
- message: t?.message || `Минимальная длина: ${e} символов`,
127
- params: { minLength: e, actualLength: a.length, ...t?.params }
128
- } : null);
129
- }
130
- function L(r, e, t) {
131
- r && m(r, (a) => a && a.length > e ? {
132
- code: "maxLength",
133
- message: t?.message || `Максимальная длина: ${e} символов`,
134
- params: { maxLength: e, actualLength: a.length, ...t?.params }
135
- } : null);
136
- }
137
- function k(r, e) {
138
- if (!r) return;
139
- const t = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
140
- m(r, (a) => a ? t.test(a) ? null : {
141
- code: "email",
142
- message: e?.message || "Неверный формат email",
143
- params: e?.params
144
- } : null);
145
- }
146
- function I(r, e, t) {
147
- r && m(r, (a) => a ? e.test(a) ? null : {
148
- code: "pattern",
149
- message: t?.message || "Значение не соответствует требуемому формату",
150
- params: { pattern: e.source, ...t?.params }
151
- } : null);
152
- }
153
- function S(r, e) {
154
- if (!r) return;
155
- const t = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/i, a = /^https?:\/\/([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/i;
156
- m(r, (s) => s ? (e?.requireProtocol ? a : t).test(s) ? e?.allowedProtocols && e.allowedProtocols.length > 0 && !e.allowedProtocols.some(
157
- (l) => s.toLowerCase().startsWith(`${l}://`)
158
- ) ? {
159
- code: "url_protocol",
160
- message: e?.message || `URL должен использовать один из протоколов: ${e.allowedProtocols.join(", ")}`,
161
- params: { allowedProtocols: e.allowedProtocols, ...e?.params }
162
- } : null : {
163
- code: "url",
164
- message: e?.message || "Неверный формат URL",
165
- params: e?.params
166
- } : null);
167
- }
168
- function j(r, e) {
169
- if (!r) return;
170
- const t = e?.format || "any", a = {
171
- // Международный формат: +1234567890 или +1 234 567 8900
172
- international: /^\+?[1-9]\d{1,14}$/,
173
- // Российский формат: +7 (XXX) XXX-XX-XX, 8 (XXX) XXX-XX-XX, и вариации
174
- ru: /^(\+7|7|8)?[\s\-]?\(?[489][0-9]{2}\)?[\s\-]?[0-9]{3}[\s\-]?[0-9]{2}[\s\-]?[0-9]{2}$/,
175
- // US формат: (123) 456-7890, 123-456-7890, 1234567890
176
- us: /^(\+?1)?[\s\-]?\(?[2-9]\d{2}\)?[\s\-]?\d{3}[\s\-]?\d{4}$/,
177
- // Любой формат: минимум 10 цифр с возможными разделителями
178
- any: /^[\+]?[(]?[0-9]{1,4}[)]?[-\s\.]?[(]?[0-9]{1,4}[)]?[-\s\.]?[0-9]{1,9}$/
179
- };
180
- m(r, (s) => {
181
- if (!s)
182
- return null;
183
- if (!a[t].test(s)) {
184
- const i = {
185
- international: "Введите телефон в международном формате (например, +1234567890)",
186
- ru: "Введите российский номер телефона (например, +7 900 123-45-67)",
187
- us: "Введите американский номер телефона (например, (123) 456-7890)",
188
- any: "Неверный формат телефона"
189
- };
190
- return {
191
- code: "phone",
192
- message: e?.message || i[t],
193
- params: { format: t, ...e?.params }
194
- };
195
- }
196
- return null;
197
- });
198
- }
199
- function p(r, e) {
200
- r && m(r, (t) => t == null ? null : typeof t != "number" || isNaN(t) ? {
201
- code: "number",
202
- message: e?.message || "Значение должно быть числом",
203
- params: e?.params
204
- } : e?.integer && !Number.isInteger(t) ? {
205
- code: "number_integer",
206
- message: e?.message || "Значение должно быть целым числом",
207
- params: e?.params
208
- } : e?.min !== void 0 && t < e.min ? {
209
- code: "number_min",
210
- message: e?.message || `Значение должно быть не менее ${e.min}`,
211
- params: { min: e.min, ...e?.params }
212
- } : e?.max !== void 0 && t > e.max ? {
213
- code: "number_max",
214
- message: e?.message || `Значение должно быть не более ${e.max}`,
215
- params: { max: e.max, ...e?.params }
216
- } : e?.multipleOf !== void 0 && t % e.multipleOf !== 0 ? {
217
- code: "number_multiple",
218
- message: e?.message || `Значение должно быть кратно ${e.multipleOf}`,
219
- params: { multipleOf: e.multipleOf, ...e?.params }
220
- } : e?.allowNegative === !1 && t < 0 ? {
221
- code: "number_negative",
222
- message: e?.message || "Отрицательные числа не допускаются",
223
- params: e?.params
224
- } : e?.allowZero === !1 && t === 0 ? {
225
- code: "number_zero",
226
- message: e?.message || "Ноль не допускается",
227
- params: e?.params
228
- } : null);
229
- }
230
- function z(r, e) {
231
- r && m(r, (t) => {
232
- if (!t)
233
- return null;
234
- let a;
235
- if (t instanceof Date)
236
- a = t;
237
- else if (typeof t == "string")
238
- a = new Date(t);
239
- else
240
- return {
241
- code: "date_invalid",
242
- message: e?.message || "Неверный формат даты",
243
- params: e?.params
244
- };
245
- if (isNaN(a.getTime()))
246
- return {
247
- code: "date_invalid",
248
- message: e?.message || "Неверный формат даты",
249
- params: e?.params
250
- };
251
- const s = /* @__PURE__ */ new Date();
252
- if (s.setHours(0, 0, 0, 0), e?.minDate) {
253
- const n = new Date(e.minDate);
254
- if (n.setHours(0, 0, 0, 0), a < n)
255
- return {
256
- code: "date_min",
257
- message: e?.message || `Дата должна быть не ранее ${n.toLocaleDateString()}`,
258
- params: { minDate: e.minDate, ...e?.params }
259
- };
260
- }
261
- if (e?.maxDate) {
262
- const n = new Date(e.maxDate);
263
- if (n.setHours(0, 0, 0, 0), a > n)
264
- return {
265
- code: "date_max",
266
- message: e?.message || `Дата должна быть не позднее ${n.toLocaleDateString()}`,
267
- params: { maxDate: e.maxDate, ...e?.params }
268
- };
269
- }
270
- if (e?.noFuture && a > s)
271
- return {
272
- code: "date_future",
273
- message: e?.message || "Дата не может быть в будущем",
274
- params: e?.params
275
- };
276
- if (e?.noPast && a < s)
277
- return {
278
- code: "date_past",
279
- message: e?.message || "Дата не может быть в прошлом",
280
- params: e?.params
281
- };
282
- if (e?.minAge !== void 0 || e?.maxAge !== void 0) {
283
- const n = Math.floor(
284
- (s.getTime() - a.getTime()) / 315576e5
285
- );
286
- if (e?.minAge !== void 0 && n < e.minAge)
287
- return {
288
- code: "date_min_age",
289
- message: e?.message || `Минимальный возраст: ${e.minAge} лет`,
290
- params: { minAge: e.minAge, currentAge: n, ...e?.params }
291
- };
292
- if (e?.maxAge !== void 0 && n > e.maxAge)
293
- return {
294
- code: "date_max_age",
295
- message: e?.message || `Максимальный возраст: ${e.maxAge} лет`,
296
- params: { maxAge: e.maxAge, currentAge: n, ...e?.params }
297
- };
298
- }
299
- return null;
300
- });
301
- }
302
- function q(r, e) {
303
- r && h(r, 1, {
304
- message: e?.message || "Массив не должен быть пустым",
305
- params: { minLength: 1, ...e?.params }
306
- });
307
- }
308
- function B(r, e) {
309
- if (!r) return;
310
- const t = f(r);
311
- u().registerArrayItemValidation(t, e);
312
- }
313
- function c(r) {
314
- return r == null ? !1 : typeof r == "object" && "value" in r && "setValue" in r && "getValue" in r && "validate" in r;
315
- }
316
- function x(r) {
317
- return r == null ? !1 : c(r) && "validators" in r && "asyncValidators" in r && // FieldNode имеет markAsTouched метод
318
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
319
- typeof r.markAsTouched == "function" && // У FieldNode нет fields или items
320
- !("fields" in r) && !("items" in r);
321
- }
322
- function A(r) {
323
- return r == null ? !1 : c(r) && "applyValidationSchema" in r && "applyBehaviorSchema" in r && "getFieldByPath" in r && // GroupNode НЕ имеет items/push/removeAt (это ArrayNode)
324
- !("items" in r) && !("push" in r) && !("removeAt" in r);
325
- }
326
- function w(r) {
327
- return r == null ? !1 : c(r) && "items" in r && "length" in r && "push" in r && "removeAt" in r && "at" in r && // eslint-disable-next-line @typescript-eslint/no-explicit-any
328
- typeof r.push == "function" && // eslint-disable-next-line @typescript-eslint/no-explicit-any
329
- typeof r.removeAt == "function";
330
- }
331
- function J(r) {
332
- return x(r) ? "FieldNode" : A(r) ? "GroupNode" : w(r) ? "ArrayNode" : c(r) ? "FormNode" : "Unknown";
333
- }
334
- function g(r) {
335
- return x(r) ? [r] : A(r) ? Array.from(r.getAllFields()).flatMap(g) : w(r) ? r.map((e) => g(e)).flat() : [];
336
- }
337
- async function E(r, e) {
338
- const t = new y();
339
- t.beginRegistration();
340
- let a = [], s = !1;
341
- try {
342
- const n = o();
343
- e(n), a = t.getCurrentContext()?.getValidators() || [], t.cancelRegistration(), s = !0, r.clearErrors();
344
- const l = g(r);
345
- return await Promise.all(l.map(($) => $.validate())), a.length > 0 && await r.applyContextualValidators(a), r.valid.value;
346
- } catch (n) {
347
- throw s || t.cancelRegistration(), n;
348
- }
349
- }
350
- class O {
351
- _form;
352
- control;
353
- /**
354
- * Форма с типизированным Proxy-доступом к полям
355
- */
356
- form;
357
- constructor(e, t, a) {
358
- this._form = e, this.control = a, this.form = e._proxyInstance || e.getProxy();
359
- }
360
- /**
361
- * Получить текущее значение поля (внутренний метод для validation-applicator)
362
- * @internal
363
- */
364
- value() {
365
- return this.control.value.value;
366
- }
367
- /**
368
- * Безопасно установить значение поля по строковому пути
369
- * Автоматически использует emitEvent: false для предотвращения циклов
370
- */
371
- setFieldValue(e, t) {
372
- const a = this._form.getFieldByPath(e);
373
- a && c(a) && a.setValue(t, { emitEvent: !1 });
374
- }
375
- }
376
- class M {
377
- _form;
378
- /**
379
- * Форма с типизированным Proxy-доступом к полям
380
- */
381
- form;
382
- constructor(e) {
383
- this._form = e, this.form = e._proxyInstance || e.getProxy();
384
- }
385
- /**
386
- * Безопасно установить значение поля по строковому пути
387
- * Автоматически использует emitEvent: false для предотвращения циклов
388
- */
389
- setFieldValue(e, t) {
390
- const a = this._form.getFieldByPath(e);
391
- a && c(a) && a.setValue(t, { emitEvent: !1 });
392
- }
393
- }
394
- const U = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
395
- __proto__: null,
396
- TreeValidationContextImpl: M,
397
- ValidationContextImpl: O,
398
- ValidationRegistry: y,
399
- apply: T,
400
- applyWhen: V,
401
- createFieldPath: o,
402
- date: z,
403
- email: k,
404
- extractKey: N,
405
- extractPath: f,
406
- max: F,
407
- maxLength: L,
408
- min: C,
409
- minLength: h,
410
- notEmpty: q,
411
- number: p,
412
- pattern: I,
413
- phone: j,
414
- required: R,
415
- toFieldPath: _,
416
- url: S,
417
- validate: m,
418
- validateAsync: b,
419
- validateForm: E,
420
- validateItems: B,
421
- validateTree: D
422
- }, Symbol.toStringTag, { value: "Module" }));
423
- export {
424
- f as A,
425
- N as B,
426
- _ as C,
427
- M as T,
428
- O as V,
429
- U as a,
430
- c as b,
431
- o as c,
432
- A as d,
433
- w as e,
434
- m as f,
435
- J as g,
436
- b as h,
437
- x as i,
438
- D as j,
439
- T as k,
440
- V as l,
441
- C as m,
442
- F as n,
443
- h as o,
444
- L as p,
445
- k as q,
446
- R as r,
447
- I as s,
448
- j as t,
449
- S as u,
450
- E as v,
451
- p as w,
452
- z as x,
453
- q as y,
454
- B as z
455
- };