@panneau/form-inline 4.0.40-alpha.3 → 4.0.45
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/dist/index.d.ts +3 -1
- package/dist/index.js +34 -28
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
2
3
|
import { Field, FormStatus, Button } from '@panneau/core';
|
|
3
4
|
|
|
4
5
|
interface InlineFormProps {
|
|
@@ -11,7 +12,8 @@ interface InlineFormProps {
|
|
|
11
12
|
errors?: Record<string, string[]> | null;
|
|
12
13
|
buttons?: Button[] | null;
|
|
13
14
|
className?: string | null;
|
|
15
|
+
ref?: ForwardedRef<HTMLFormElement> | null;
|
|
14
16
|
}
|
|
15
|
-
declare function InlineForm({ fields, status, value, onChange, className, onSubmit, ...props }: InlineFormProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function InlineForm({ fields, status, value, onChange, className, onSubmit, ref, ...props }: InlineFormProps): react_jsx_runtime.JSX.Element;
|
|
16
18
|
|
|
17
19
|
export { InlineForm as default };
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,11 @@ import Form from '@panneau/element-form';
|
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
function InlineForm(t0) {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(23);
|
|
8
8
|
let fields;
|
|
9
9
|
let onChange;
|
|
10
10
|
let props;
|
|
11
|
+
let ref;
|
|
11
12
|
let t1;
|
|
12
13
|
let t2;
|
|
13
14
|
let t3;
|
|
@@ -20,24 +21,27 @@ function InlineForm(t0) {
|
|
|
20
21
|
onChange,
|
|
21
22
|
className: t3,
|
|
22
23
|
onSubmit: t4,
|
|
24
|
+
ref,
|
|
23
25
|
...props
|
|
24
26
|
} = t0);
|
|
25
27
|
$[0] = t0;
|
|
26
28
|
$[1] = fields;
|
|
27
29
|
$[2] = onChange;
|
|
28
30
|
$[3] = props;
|
|
29
|
-
$[4] =
|
|
30
|
-
$[5] =
|
|
31
|
-
$[6] =
|
|
32
|
-
$[7] =
|
|
31
|
+
$[4] = ref;
|
|
32
|
+
$[5] = t1;
|
|
33
|
+
$[6] = t2;
|
|
34
|
+
$[7] = t3;
|
|
35
|
+
$[8] = t4;
|
|
33
36
|
} else {
|
|
34
37
|
fields = $[1];
|
|
35
38
|
onChange = $[2];
|
|
36
39
|
props = $[3];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
ref = $[4];
|
|
41
|
+
t1 = $[5];
|
|
42
|
+
t2 = $[6];
|
|
43
|
+
t3 = $[7];
|
|
44
|
+
t4 = $[8];
|
|
41
45
|
}
|
|
42
46
|
const status = t1 === undefined ? null : t1;
|
|
43
47
|
const value = t2 === undefined ? null : t2;
|
|
@@ -45,45 +49,47 @@ function InlineForm(t0) {
|
|
|
45
49
|
const onSubmit = t4 === undefined ? null : t4;
|
|
46
50
|
const FieldsComponent = useFieldComponent("fields");
|
|
47
51
|
let t5;
|
|
48
|
-
if ($[
|
|
52
|
+
if ($[9] !== fields) {
|
|
49
53
|
t5 = fields.map(_temp);
|
|
50
|
-
$[
|
|
51
|
-
$[
|
|
54
|
+
$[9] = fields;
|
|
55
|
+
$[10] = t5;
|
|
52
56
|
} else {
|
|
53
|
-
t5 = $[
|
|
57
|
+
t5 = $[10];
|
|
54
58
|
}
|
|
55
59
|
let t6;
|
|
56
|
-
if ($[
|
|
60
|
+
if ($[11] !== FieldsComponent || $[12] !== onChange || $[13] !== t5 || $[14] !== value) {
|
|
57
61
|
t6 = /*#__PURE__*/jsx(FieldsComponent, {
|
|
58
62
|
fields: t5,
|
|
59
63
|
value: value,
|
|
60
64
|
onChange: onChange
|
|
61
65
|
});
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
66
|
+
$[11] = FieldsComponent;
|
|
67
|
+
$[12] = onChange;
|
|
68
|
+
$[13] = t5;
|
|
69
|
+
$[14] = value;
|
|
70
|
+
$[15] = t6;
|
|
67
71
|
} else {
|
|
68
|
-
t6 = $[
|
|
72
|
+
t6 = $[15];
|
|
69
73
|
}
|
|
70
74
|
let t7;
|
|
71
|
-
if ($[
|
|
75
|
+
if ($[16] !== className || $[17] !== onSubmit || $[18] !== props || $[19] !== ref || $[20] !== status || $[21] !== t6) {
|
|
72
76
|
t7 = /*#__PURE__*/jsx(Form, {
|
|
73
77
|
onSubmit: onSubmit,
|
|
74
78
|
className: className,
|
|
75
79
|
status: status,
|
|
80
|
+
ref: ref,
|
|
76
81
|
...props,
|
|
77
82
|
children: t6
|
|
78
83
|
});
|
|
79
|
-
$[
|
|
80
|
-
$[
|
|
81
|
-
$[
|
|
82
|
-
$[
|
|
83
|
-
$[
|
|
84
|
-
$[
|
|
84
|
+
$[16] = className;
|
|
85
|
+
$[17] = onSubmit;
|
|
86
|
+
$[18] = props;
|
|
87
|
+
$[19] = ref;
|
|
88
|
+
$[20] = status;
|
|
89
|
+
$[21] = t6;
|
|
90
|
+
$[22] = t7;
|
|
85
91
|
} else {
|
|
86
|
-
t7 = $[
|
|
92
|
+
t7 = $[22];
|
|
87
93
|
}
|
|
88
94
|
return t7;
|
|
89
95
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/form-inline",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.45",
|
|
4
4
|
"description": "Inline form",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@babel/runtime": "^7.28.6",
|
|
63
|
-
"@panneau/core": "^4.0.
|
|
64
|
-
"@panneau/element-button": "^4.0.
|
|
65
|
-
"@panneau/element-form": "^4.0.
|
|
66
|
-
"@panneau/field-fields": "^4.0.
|
|
63
|
+
"@panneau/core": "^4.0.41",
|
|
64
|
+
"@panneau/element-button": "^4.0.41",
|
|
65
|
+
"@panneau/element-form": "^4.0.45",
|
|
66
|
+
"@panneau/field-fields": "^4.0.41",
|
|
67
67
|
"classnames": "^2.5.1",
|
|
68
68
|
"lodash": "^4.17.21",
|
|
69
69
|
"react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "33c9c717de67f2a018289e91ea16daa2d5925cd2"
|
|
75
75
|
}
|