@progress/kendo-react-form 7.2.4-develop.3 → 7.2.4-develop.4
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.
- package/Field.js +8 -0
- package/Field.mjs +71 -0
- package/FieldArray.js +8 -0
- package/FieldArray.mjs +74 -0
- package/FieldWrapper.js +8 -0
- package/FieldWrapper.mjs +24 -0
- package/Form.js +8 -0
- package/Form.mjs +247 -0
- package/FormContext.js +8 -0
- package/FormContext.mjs +13 -0
- package/FormElement.js +8 -0
- package/FormElement.mjs +42 -0
- package/dist/cdn/js/kendo-react-form.js +8 -5
- package/index.d.mts +724 -5
- package/index.d.ts +724 -22
- package/index.js +8 -5
- package/index.mjs +21 -412
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +2 -2
- package/Field.d.ts +0 -14
- package/FieldArray.d.ts +0 -11
- package/FieldWrapper.d.ts +0 -32
- package/Form.d.ts +0 -272
- package/FormContext.d.ts +0 -54
- package/FormElement.d.ts +0 -56
- package/interfaces/FieldArrayProps.d.ts +0 -32
- package/interfaces/FieldArrayRenderProps.d.ts +0 -93
- package/interfaces/FieldProps.d.ts +0 -43
- package/interfaces/FieldRenderProps.d.ts +0 -10
- package/interfaces/FieldValidator.d.ts +0 -18
- package/interfaces/FormProps.d.ts +0 -56
- package/interfaces/FormRenderProps.d.ts +0 -78
- package/interfaces/FormSubmitClickEvent.d.ts +0 -27
- package/interfaces/FormValidator.d.ts +0 -14
- package/interfaces/KeyValue.d.ts +0 -10
- package/package-metadata.d.ts +0 -9
package/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./Field.js"),e=require("./Form.js"),i=require("./FieldArray.js"),t=require("./FieldWrapper.js"),F=require("./FormElement.js"),l=require("@progress/kendo-react-common"),r=l.withIdHOC(e.Form);r.displayName="KendoReactForm";exports.Field=o.Field;exports.FormClassComponent=e.Form;exports.FieldArray=i.FieldArray;exports.FieldWrapper=t.FieldWrapper;exports.FormElement=F.FormElement;exports.Form=r;
|
package/index.mjs
CHANGED
|
@@ -1,415 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
5
8
|
"use client";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
);
|
|
15
|
-
const c = n.useCallback(
|
|
16
|
-
(u) => {
|
|
17
|
-
const g = u && (u.value !== void 0 ? u.value : u.target ? u.target.value : u.target);
|
|
18
|
-
s.onChange(e, { value: g }), r && r.call(void 0, u);
|
|
19
|
-
},
|
|
20
|
-
[e, a, r]
|
|
21
|
-
), m = n.useCallback(
|
|
22
|
-
(u) => s.onChange(e, { value: u.target.value }),
|
|
23
|
-
[e, a]
|
|
24
|
-
), f = n.useCallback(
|
|
25
|
-
() => s.onBlur(e),
|
|
26
|
-
[e, a]
|
|
27
|
-
), v = n.useCallback(
|
|
28
|
-
() => s.onFocus(e),
|
|
29
|
-
[e, a]
|
|
30
|
-
);
|
|
31
|
-
if (!s)
|
|
32
|
-
return null;
|
|
33
|
-
const F = s.valueGetter(e);
|
|
34
|
-
return typeof t == "string" ? n.createElement(t, {
|
|
35
|
-
onChange: m,
|
|
36
|
-
onBlur: f,
|
|
37
|
-
onFocus: v,
|
|
38
|
-
value: F,
|
|
39
|
-
children: o,
|
|
40
|
-
...d
|
|
41
|
-
}) : n.createElement(
|
|
42
|
-
t,
|
|
43
|
-
{
|
|
44
|
-
children: o,
|
|
45
|
-
...d,
|
|
46
|
-
// input
|
|
47
|
-
onChange: c,
|
|
48
|
-
onBlur: f,
|
|
49
|
-
onFocus: v,
|
|
50
|
-
value: F,
|
|
51
|
-
// meta
|
|
52
|
-
validationMessage: s.errors[e],
|
|
53
|
-
touched: s.touched[e],
|
|
54
|
-
modified: s.modified[e],
|
|
55
|
-
visited: s.visited[e],
|
|
56
|
-
// Our `valid` implementation requires double submit to show html5 validation errors,
|
|
57
|
-
// however it's NOT recommended to show html5 validation errors at all as:
|
|
58
|
-
// - There is no standard way to change validation look and feel with CSS.
|
|
59
|
-
// - Look different in each browser / OS
|
|
60
|
-
// - You can have a page in one language but an error message displayed in another language (not localizable)
|
|
61
|
-
valid: !(s.errors[e] && s.touched[e]),
|
|
62
|
-
name: e
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
M.displayName = "KendoReactField";
|
|
67
|
-
const I = {
|
|
68
|
-
name: "@progress/kendo-react-form",
|
|
69
|
-
productName: "KendoReact",
|
|
70
|
-
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
71
|
-
publishDate: 1709631883,
|
|
72
|
-
version: "",
|
|
73
|
-
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
74
|
-
}, P = 0;
|
|
75
|
-
let C = class extends n.Component {
|
|
76
|
-
/**
|
|
77
|
-
* @hidden
|
|
78
|
-
*/
|
|
79
|
-
constructor(e) {
|
|
80
|
-
super(e), this._touched = {}, this._visited = {}, this._modified = {}, this._validatorsByField = {}, this._values = {}, this._fields = {}, this._unmounted = !1, this._submitted = !1, this.isValid = () => this.isFormValid(this.errors), this.accumulatedForceUpdate = () => {
|
|
81
|
-
this._accumulatorTimeout && clearTimeout(this._accumulatorTimeout), this._accumulatorTimeout = window.setTimeout(
|
|
82
|
-
() => {
|
|
83
|
-
this._accumulatorTimeout = void 0, this.forceUpdate();
|
|
84
|
-
},
|
|
85
|
-
P
|
|
86
|
-
);
|
|
87
|
-
}, this.resetForm = () => {
|
|
88
|
-
this.values = _(this.props.initialValues), this._key = R(), this._touched = {}, this._visited = {}, this._modified = {}, this._validatorsByField = {}, this._fields = {}, this._submitted = !1, this.forceUpdate();
|
|
89
|
-
}, this.onReset = () => this.resetForm(), this.addField = (t) => {
|
|
90
|
-
this._fields[t] = !0;
|
|
91
|
-
}, this.onSubmit = (t) => {
|
|
92
|
-
const i = {}, o = this.fields;
|
|
93
|
-
t && (typeof t.preventDefault == "function" && t.preventDefault(), typeof t.stopPropagation == "function" && t.stopPropagation()), o.forEach((a) => {
|
|
94
|
-
i[a] = !0;
|
|
95
|
-
}), this.visited = { ...i }, this.touched = { ...i };
|
|
96
|
-
const r = this.values, d = this.isFormValid(this.errors), s = this.isFormModified(this.modified, o);
|
|
97
|
-
this.props.onSubmitClick && this.props.onSubmitClick.call(void 0, {
|
|
98
|
-
values: r,
|
|
99
|
-
isValid: d,
|
|
100
|
-
isModified: s,
|
|
101
|
-
event: t
|
|
102
|
-
}), d && (this.props.ignoreModified || s) && this.props.onSubmit && (this._submitted = !0, this.props.onSubmit.call(void 0, r, t)), this.forceUpdate();
|
|
103
|
-
}, this.onChange = (t, i) => {
|
|
104
|
-
const { value: o } = i;
|
|
105
|
-
this.addField(t), this.modified[t] || (this.modified = { ...this.modified, [t]: !0 }), this.valueSetter(t, o), this.forceUpdate();
|
|
106
|
-
}, this.onFocus = (t, i) => {
|
|
107
|
-
this.visited[t] || (this.visited = { ...this.visited, [t]: !0 }, i || this.forceUpdate());
|
|
108
|
-
}, this.onBlur = (t, i) => {
|
|
109
|
-
this.touched[t] || (this.onFocus(t, i), this.touched = { ...this.touched, [t]: !0 }, i || this.forceUpdate());
|
|
110
|
-
}, this.onFieldRegister = (t, i) => {
|
|
111
|
-
this.addField(t);
|
|
112
|
-
const o = this.validatorsByField[t] || [], r = o.length;
|
|
113
|
-
return this.validatorsByField = { ...this.validatorsByField, [t]: [...o, i] }, this.accumulatedForceUpdate(), () => {
|
|
114
|
-
if (this._unmounted)
|
|
115
|
-
return;
|
|
116
|
-
const d = [...this.validatorsByField[t] || []], s = !!d[r];
|
|
117
|
-
d[r] = void 0, this.validatorsByField = { ...this.validatorsByField, [t]: d }, s && this.accumulatedForceUpdate();
|
|
118
|
-
};
|
|
119
|
-
}, this.isFormValid = (t) => !Object.keys(t).some((i) => !!t[i]), this.isFormModified = (t, i) => i.some((o) => t[o]), this.isFormHasNotTouched = (t, i) => i.some((o) => !t[o]), this.isFormTouched = (t, i) => i.some((o) => t[o]), this.isFormVisited = (t, i) => i.some((o) => t[o]), this.valueGetter = (t) => A(t)(this.values), this.valueSetter = (t, i) => U(t)(this.values, i), this.onArrayAction = (t) => {
|
|
120
|
-
this.addField(t), this.modified[t] || (this.modified = { ...this.modified, [t]: !0 }), this.onBlur(t, !0);
|
|
121
|
-
}, this.onInsert = (t, i) => {
|
|
122
|
-
this.onArrayAction(t);
|
|
123
|
-
const o = [...this.valueGetter(t) || []];
|
|
124
|
-
o.splice(i.index, 0, i.value), this.valueSetter(t, o), this.forceUpdate();
|
|
125
|
-
}, this.onUnshift = (t, i) => {
|
|
126
|
-
this.onInsert(t, {
|
|
127
|
-
value: i.value,
|
|
128
|
-
index: 0
|
|
129
|
-
});
|
|
130
|
-
}, this.onPush = (t, i) => {
|
|
131
|
-
this.onArrayAction(t);
|
|
132
|
-
const o = [...this.valueGetter(t) || [], i.value];
|
|
133
|
-
this.valueSetter(t, o), this.forceUpdate();
|
|
134
|
-
}, this.onPop = (t) => {
|
|
135
|
-
this.onArrayAction(t);
|
|
136
|
-
const i = [...this.valueGetter(t) || []], o = i.pop();
|
|
137
|
-
return this.valueSetter(t, i), this.forceUpdate(), o;
|
|
138
|
-
}, this.onRemove = (t, i) => {
|
|
139
|
-
this.onArrayAction(t);
|
|
140
|
-
const o = [...this.valueGetter(t) || []], r = o.splice(i.index, 1);
|
|
141
|
-
return this.valueSetter(t, o), this.forceUpdate(), r;
|
|
142
|
-
}, this.onReplace = (t, i) => {
|
|
143
|
-
this.onArrayAction(t);
|
|
144
|
-
const o = [...this.valueGetter(t) || []];
|
|
145
|
-
o.splice(i.index, 1, i.value), this.valueSetter(t, o), this.forceUpdate();
|
|
146
|
-
}, this.onMove = (t, i) => {
|
|
147
|
-
this.onArrayAction(t);
|
|
148
|
-
const o = [...this.valueGetter(t) || []], r = o[i.prevIndex];
|
|
149
|
-
o.splice(i.prevIndex, 1), o.splice(i.nextIndex, 0, r), this.valueSetter(t, o), this.forceUpdate();
|
|
150
|
-
}, B(I), this.values = _(e.initialValues);
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* @hidden
|
|
154
|
-
*/
|
|
155
|
-
get touched() {
|
|
156
|
-
return this._touched;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* @hidden
|
|
160
|
-
*/
|
|
161
|
-
set touched(e) {
|
|
162
|
-
this._touched = e;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* @hidden
|
|
166
|
-
*/
|
|
167
|
-
get visited() {
|
|
168
|
-
return this._visited;
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* @hidden
|
|
172
|
-
*/
|
|
173
|
-
set visited(e) {
|
|
174
|
-
this._visited = e;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @hidden
|
|
178
|
-
*/
|
|
179
|
-
get modified() {
|
|
180
|
-
return this._modified;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* @hidden
|
|
184
|
-
*/
|
|
185
|
-
set modified(e) {
|
|
186
|
-
this._modified = e;
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* @hidden
|
|
190
|
-
*/
|
|
191
|
-
get validatorsByField() {
|
|
192
|
-
return this._validatorsByField;
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* @hidden
|
|
196
|
-
*/
|
|
197
|
-
set validatorsByField(e) {
|
|
198
|
-
this._validatorsByField = e;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* @hidden
|
|
202
|
-
*/
|
|
203
|
-
get values() {
|
|
204
|
-
return this._values;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* @hidden
|
|
208
|
-
*/
|
|
209
|
-
set values(e) {
|
|
210
|
-
this._values = e;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* @hidden
|
|
214
|
-
*/
|
|
215
|
-
get fields() {
|
|
216
|
-
return Object.keys(this._fields);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* @hidden
|
|
220
|
-
*/
|
|
221
|
-
get formErrors() {
|
|
222
|
-
if (this.props.validator)
|
|
223
|
-
return this.props.validator(this.values, this.valueGetter);
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* @hidden
|
|
227
|
-
*/
|
|
228
|
-
get errors() {
|
|
229
|
-
const e = {}, t = this.fields, i = this.validatorsByField;
|
|
230
|
-
return t.forEach((r) => {
|
|
231
|
-
if (e[r] = "", i[r]) {
|
|
232
|
-
const d = [];
|
|
233
|
-
i[r].forEach((s) => {
|
|
234
|
-
Array.isArray(s) ? d.push(...s) : d.push(s);
|
|
235
|
-
}), d.find((s) => {
|
|
236
|
-
if (s) {
|
|
237
|
-
const a = s(this.valueGetter(r), this.valueGetter, { name: r });
|
|
238
|
-
if (a)
|
|
239
|
-
return e[r] = a, !0;
|
|
240
|
-
}
|
|
241
|
-
return !1;
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
}), this.formErrors && E(this.formErrors, e), e;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* @hidden
|
|
248
|
-
*/
|
|
249
|
-
componentWillUnmount() {
|
|
250
|
-
this._unmounted = !0, this._accumulatorTimeout && clearTimeout(this._accumulatorTimeout);
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* @hidden
|
|
254
|
-
*/
|
|
255
|
-
render() {
|
|
256
|
-
const { render: e } = this.props, t = this.touched, i = this.visited, o = this.modified, r = this.fields, d = this.errors, s = this.isFormValid(d), a = this.isFormModified(o, r), c = this.isFormTouched(t, r), m = this.isFormVisited(i, r), v = this.isFormHasNotTouched(t, r) && !s || s && (this.props.ignoreModified || a);
|
|
257
|
-
return /* @__PURE__ */ n.createElement(
|
|
258
|
-
y.Provider,
|
|
259
|
-
{
|
|
260
|
-
key: this._key || this.props.id,
|
|
261
|
-
value: {
|
|
262
|
-
id: this.props.id,
|
|
263
|
-
valueGetter: this.valueGetter,
|
|
264
|
-
errors: d,
|
|
265
|
-
modified: o,
|
|
266
|
-
touched: t,
|
|
267
|
-
visited: i,
|
|
268
|
-
registerField: this.onFieldRegister,
|
|
269
|
-
onSubmit: this.onSubmit,
|
|
270
|
-
onChange: this.onChange,
|
|
271
|
-
onFocus: this.onFocus,
|
|
272
|
-
onBlur: this.onBlur,
|
|
273
|
-
onUnshift: this.onUnshift,
|
|
274
|
-
onPush: this.onPush,
|
|
275
|
-
onInsert: this.onInsert,
|
|
276
|
-
onPop: this.onPop,
|
|
277
|
-
onRemove: this.onRemove,
|
|
278
|
-
onReplace: this.onReplace,
|
|
279
|
-
onMove: this.onMove
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
e({
|
|
283
|
-
valid: s,
|
|
284
|
-
modified: a,
|
|
285
|
-
touched: c,
|
|
286
|
-
visited: m,
|
|
287
|
-
submitted: this._submitted,
|
|
288
|
-
valueGetter: this.valueGetter,
|
|
289
|
-
errors: d,
|
|
290
|
-
allowSubmit: v,
|
|
291
|
-
onChange: this.onChange,
|
|
292
|
-
onSubmit: this.onSubmit,
|
|
293
|
-
onFormReset: this.resetForm
|
|
294
|
-
})
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
C.displayName = "KendoReactForm";
|
|
299
|
-
C.propTypes = {
|
|
300
|
-
initialValues: p.any,
|
|
301
|
-
onSubmit: p.func,
|
|
302
|
-
onSubmitClick: p.func,
|
|
303
|
-
render: p.func.isRequired,
|
|
304
|
-
id: p.string
|
|
305
|
-
};
|
|
306
|
-
const x = (l) => {
|
|
307
|
-
const { name: e, component: t, validator: i, type: o, children: r, ...d } = l, s = n.useContext(y), a = s ? s.id : "";
|
|
308
|
-
n.useEffect(
|
|
309
|
-
() => s ? s.registerField(e, i) : void 0,
|
|
310
|
-
[e, a, i]
|
|
311
|
-
);
|
|
312
|
-
const c = n.useCallback(
|
|
313
|
-
(h) => s.onUnshift(e, h),
|
|
314
|
-
[e, a]
|
|
315
|
-
), m = n.useCallback(
|
|
316
|
-
(h) => s.onPush(e, h),
|
|
317
|
-
[e, a]
|
|
318
|
-
), f = n.useCallback(
|
|
319
|
-
(h) => s.onInsert(e, h),
|
|
320
|
-
[e, a]
|
|
321
|
-
), v = n.useCallback(
|
|
322
|
-
() => s.onPop(e),
|
|
323
|
-
[e, a]
|
|
324
|
-
), F = n.useCallback(
|
|
325
|
-
(h) => s.onRemove(e, h),
|
|
326
|
-
[e, a]
|
|
327
|
-
), u = n.useCallback(
|
|
328
|
-
(h) => s.onReplace(e, h),
|
|
329
|
-
[e, a]
|
|
330
|
-
), g = n.useCallback(
|
|
331
|
-
(h) => s.onMove(e, h),
|
|
332
|
-
[e, a]
|
|
333
|
-
);
|
|
334
|
-
if (!s)
|
|
335
|
-
return null;
|
|
336
|
-
const k = s.valueGetter(e);
|
|
337
|
-
return n.createElement(
|
|
338
|
-
t,
|
|
339
|
-
{
|
|
340
|
-
// input
|
|
341
|
-
value: k,
|
|
342
|
-
// meta
|
|
343
|
-
validationMessage: s.errors[e],
|
|
344
|
-
touched: s.touched[e],
|
|
345
|
-
modified: s.modified[e],
|
|
346
|
-
visited: s.visited[e],
|
|
347
|
-
// Our `valid` implementation requires double submit to show html5 validation errors,
|
|
348
|
-
// however it's NOT recommended to show html5 validation errors at all as:
|
|
349
|
-
// - There is no standard way to change validation look and feel with CSS.
|
|
350
|
-
// - Look different in each browser / OS
|
|
351
|
-
// - You can have a page in one language but an error message displayed in another language (not localizable)
|
|
352
|
-
valid: !(s.errors[e] && s.touched[e]),
|
|
353
|
-
onUnshift: c,
|
|
354
|
-
onPush: m,
|
|
355
|
-
onInsert: f,
|
|
356
|
-
onPop: v,
|
|
357
|
-
onRemove: F,
|
|
358
|
-
onReplace: u,
|
|
359
|
-
onMove: g,
|
|
360
|
-
children: r,
|
|
361
|
-
name: e,
|
|
362
|
-
...d
|
|
363
|
-
}
|
|
364
|
-
);
|
|
365
|
-
};
|
|
366
|
-
x.displayName = "KendoReactFieldArray";
|
|
367
|
-
const V = (l) => {
|
|
368
|
-
const e = b(
|
|
369
|
-
{
|
|
370
|
-
"k-form-field": !0,
|
|
371
|
-
"k-rtl": l.dir === "rtl"
|
|
372
|
-
},
|
|
373
|
-
l.className
|
|
374
|
-
);
|
|
375
|
-
return /* @__PURE__ */ n.createElement("div", { className: e, style: l.style }, l.children);
|
|
376
|
-
};
|
|
377
|
-
V.displayName = "KendoReactFieldWrapper";
|
|
378
|
-
const w = n.forwardRef((l, e) => {
|
|
379
|
-
const t = {
|
|
380
|
-
size: "medium",
|
|
381
|
-
...l
|
|
382
|
-
}, i = n.useRef(null), o = n.useRef(null);
|
|
383
|
-
n.useImperativeHandle(o, () => ({ element: i.current, props: t })), n.useImperativeHandle(e, () => o.current);
|
|
384
|
-
const r = n.useContext(y), { className: d, style: s, horizontal: a, size: c, ...m } = t, f = b(
|
|
385
|
-
{
|
|
386
|
-
"k-form": !0,
|
|
387
|
-
[`k-form-${T.sizeMap[c] || c}`]: c,
|
|
388
|
-
"k-form-horizontal": a === !0
|
|
389
|
-
},
|
|
390
|
-
d
|
|
391
|
-
);
|
|
392
|
-
return /* @__PURE__ */ n.createElement(
|
|
393
|
-
"form",
|
|
394
|
-
{
|
|
395
|
-
ref: i,
|
|
396
|
-
...m,
|
|
397
|
-
id: r ? r.id : void 0,
|
|
398
|
-
style: l.style,
|
|
399
|
-
className: f,
|
|
400
|
-
onSubmit: r ? r.onSubmit : void 0
|
|
401
|
-
},
|
|
402
|
-
l.children
|
|
403
|
-
);
|
|
404
|
-
});
|
|
405
|
-
w.displayName = "KendoReactFormElement";
|
|
406
|
-
const G = S(C);
|
|
407
|
-
G.displayName = "KendoReactForm";
|
|
9
|
+
import { Field as a } from "./Field.mjs";
|
|
10
|
+
import { Form as o } from "./Form.mjs";
|
|
11
|
+
import { FieldArray as l } from "./FieldArray.mjs";
|
|
12
|
+
import { FieldWrapper as d } from "./FieldWrapper.mjs";
|
|
13
|
+
import { FormElement as n } from "./FormElement.mjs";
|
|
14
|
+
import { withIdHOC as r } from "@progress/kendo-react-common";
|
|
15
|
+
const e = r(o);
|
|
16
|
+
e.displayName = "KendoReactForm";
|
|
408
17
|
export {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
18
|
+
a as Field,
|
|
19
|
+
l as FieldArray,
|
|
20
|
+
d as FieldWrapper,
|
|
21
|
+
e as Form,
|
|
22
|
+
o as FormClassComponent,
|
|
23
|
+
n as FormElement
|
|
415
24
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-form",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
const e = {
|
|
10
|
+
name: "@progress/kendo-react-form",
|
|
11
|
+
productName: "KendoReact",
|
|
12
|
+
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
+
publishDate: 1709714092,
|
|
14
|
+
version: "",
|
|
15
|
+
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as packageMetadata
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-form",
|
|
3
|
-
"version": "7.2.4-develop.
|
|
3
|
+
"version": "7.2.4-develop.4",
|
|
4
4
|
"description": "React Form is a small and fast package for form state management with zero dependencies. KendoReact Form package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"sideEffects": false,
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@progress/kendo-licensing": "^1.3.4",
|
|
26
|
-
"@progress/kendo-react-common": "7.2.4-develop.
|
|
26
|
+
"@progress/kendo-react-common": "7.2.4-develop.4",
|
|
27
27
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
|
28
28
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
|
|
29
29
|
},
|
package/Field.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { FieldProps } from './interfaces/FieldProps';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the Field component that is used inside the KendoReact Form component.
|
|
9
|
-
* It uses `name` property to access field value and meta information from Form state.
|
|
10
|
-
*/
|
|
11
|
-
export declare const Field: {
|
|
12
|
-
(props: FieldProps): React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
13
|
-
displayName: string;
|
|
14
|
-
};
|
package/FieldArray.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
import { FieldArrayProps } from './interfaces/FieldArrayProps';
|
|
7
|
-
/**
|
|
8
|
-
* Represents the FieldArray component that is used inside the KendoReact Form component.
|
|
9
|
-
* It provides methods via render props for common array manipulations.
|
|
10
|
-
*/
|
|
11
|
-
export declare const FieldArray: React.FunctionComponent<FieldArrayProps>;
|
package/FieldWrapper.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the props of the KendoReact FieldWrapper component.
|
|
8
|
-
*/
|
|
9
|
-
export interface FieldWrapperProps {
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
*/
|
|
13
|
-
children: any;
|
|
14
|
-
/**
|
|
15
|
-
* The styles that are applied to the FieldWrapper.
|
|
16
|
-
*/
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
/**
|
|
19
|
-
* Sets a class of the FieldWrapper DOM element.
|
|
20
|
-
*/
|
|
21
|
-
className?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Specifies the direction of the content.
|
|
24
|
-
*/
|
|
25
|
-
dir?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Represents the KendoReact FieldWrapper component.
|
|
29
|
-
* It's designed to wrap the field editor, Label, Hint and Error components.
|
|
30
|
-
* The FieldWrapper supports only single editor inside it.
|
|
31
|
-
*/
|
|
32
|
-
export declare const FieldWrapper: React.FunctionComponent<FieldWrapperProps>;
|