@panneau/form-two-pane 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 -2
- package/dist/index.js +82 -78
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, ForwardedRef } from 'react';
|
|
3
3
|
import { Resource, FormStatus, Button } from '@panneau/core';
|
|
4
4
|
|
|
5
5
|
interface TwoPaneFormProps {
|
|
@@ -15,7 +15,8 @@ interface TwoPaneFormProps {
|
|
|
15
15
|
buttons?: Button[] | null;
|
|
16
16
|
children?: ReactNode | null;
|
|
17
17
|
className?: string | null;
|
|
18
|
+
ref?: ForwardedRef<HTMLFormElement> | null;
|
|
18
19
|
}
|
|
19
|
-
declare function TwoPaneForm({ resource, fields, size, status, value, onChange, onSubmit, errors, buttons, children, className, ...props }: TwoPaneFormProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function TwoPaneForm({ resource, fields, size, status, value, onChange, onSubmit, errors, buttons, children, className, ref, ...props }: TwoPaneFormProps): react_jsx_runtime.JSX.Element;
|
|
20
21
|
|
|
21
22
|
export { TwoPaneForm as default };
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,9 @@ import Form from '@panneau/element-form';
|
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
function TwoPaneForm(t0) {
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(52);
|
|
9
9
|
let props;
|
|
10
|
+
let ref;
|
|
10
11
|
let t1;
|
|
11
12
|
let t10;
|
|
12
13
|
let t11;
|
|
@@ -31,34 +32,37 @@ function TwoPaneForm(t0) {
|
|
|
31
32
|
buttons: t9,
|
|
32
33
|
children: t10,
|
|
33
34
|
className: t11,
|
|
35
|
+
ref,
|
|
34
36
|
...props
|
|
35
37
|
} = t0);
|
|
36
38
|
$[0] = t0;
|
|
37
39
|
$[1] = props;
|
|
38
|
-
$[2] =
|
|
39
|
-
$[3] =
|
|
40
|
-
$[4] =
|
|
41
|
-
$[5] =
|
|
42
|
-
$[6] =
|
|
43
|
-
$[7] =
|
|
44
|
-
$[8] =
|
|
45
|
-
$[9] =
|
|
46
|
-
$[10] =
|
|
47
|
-
$[11] =
|
|
48
|
-
$[12] =
|
|
40
|
+
$[2] = ref;
|
|
41
|
+
$[3] = t1;
|
|
42
|
+
$[4] = t10;
|
|
43
|
+
$[5] = t11;
|
|
44
|
+
$[6] = t2;
|
|
45
|
+
$[7] = t3;
|
|
46
|
+
$[8] = t4;
|
|
47
|
+
$[9] = t5;
|
|
48
|
+
$[10] = t6;
|
|
49
|
+
$[11] = t7;
|
|
50
|
+
$[12] = t8;
|
|
51
|
+
$[13] = t9;
|
|
49
52
|
} else {
|
|
50
53
|
props = $[1];
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
ref = $[2];
|
|
55
|
+
t1 = $[3];
|
|
56
|
+
t10 = $[4];
|
|
57
|
+
t11 = $[5];
|
|
58
|
+
t2 = $[6];
|
|
59
|
+
t3 = $[7];
|
|
60
|
+
t4 = $[8];
|
|
61
|
+
t5 = $[9];
|
|
62
|
+
t6 = $[10];
|
|
63
|
+
t7 = $[11];
|
|
64
|
+
t8 = $[12];
|
|
65
|
+
t9 = $[13];
|
|
62
66
|
}
|
|
63
67
|
const resource = t1 === undefined ? null : t1;
|
|
64
68
|
const fields = t2 === undefined ? null : t2;
|
|
@@ -72,12 +76,12 @@ function TwoPaneForm(t0) {
|
|
|
72
76
|
const children = t10 === undefined ? null : t10;
|
|
73
77
|
const className = t11 === undefined ? null : t11;
|
|
74
78
|
let t12;
|
|
75
|
-
if ($[
|
|
79
|
+
if ($[14] !== resource) {
|
|
76
80
|
t12 = resource || {};
|
|
77
|
-
$[
|
|
78
|
-
$[
|
|
81
|
+
$[14] = resource;
|
|
82
|
+
$[15] = t12;
|
|
79
83
|
} else {
|
|
80
|
-
t12 = $[
|
|
84
|
+
t12 = $[15];
|
|
81
85
|
}
|
|
82
86
|
const {
|
|
83
87
|
id: t13
|
|
@@ -90,119 +94,119 @@ function TwoPaneForm(t0) {
|
|
|
90
94
|
const t16 = size === "large";
|
|
91
95
|
const t17 = className !== null;
|
|
92
96
|
let t18;
|
|
93
|
-
if ($[
|
|
97
|
+
if ($[16] !== className || $[17] !== t14 || $[18] !== t15 || $[19] !== t16 || $[20] !== t17) {
|
|
94
98
|
t18 = classNames(["form", "col-12", {
|
|
95
99
|
"col-lg-6": t14,
|
|
96
100
|
"col-lg-5": t15,
|
|
97
101
|
"col-lg-4": t16,
|
|
98
102
|
[className]: t17
|
|
99
103
|
}]);
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
104
|
+
$[16] = className;
|
|
105
|
+
$[17] = t14;
|
|
106
|
+
$[18] = t15;
|
|
107
|
+
$[19] = t16;
|
|
108
|
+
$[20] = t17;
|
|
109
|
+
$[21] = t18;
|
|
106
110
|
} else {
|
|
107
|
-
t18 = $[
|
|
111
|
+
t18 = $[21];
|
|
108
112
|
}
|
|
109
113
|
const formClassName = t18;
|
|
110
114
|
const t19 = size === "half";
|
|
111
115
|
const t20 = size === "medium";
|
|
112
116
|
const t21 = size === "large";
|
|
113
117
|
let t22;
|
|
114
|
-
if ($[
|
|
118
|
+
if ($[22] !== t19 || $[23] !== t20 || $[24] !== t21) {
|
|
115
119
|
t22 = classNames(["preview", "col-12", {
|
|
116
120
|
"col-lg-6": t19,
|
|
117
121
|
"col-lg-7": t20,
|
|
118
122
|
"col-lg-8": t21
|
|
119
123
|
}]);
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
+
$[22] = t19;
|
|
125
|
+
$[23] = t20;
|
|
126
|
+
$[24] = t21;
|
|
127
|
+
$[25] = t22;
|
|
124
128
|
} else {
|
|
125
|
-
t22 = $[
|
|
129
|
+
t22 = $[25];
|
|
126
130
|
}
|
|
127
131
|
const previewClassName = t22;
|
|
128
132
|
let t23;
|
|
129
|
-
if ($[
|
|
133
|
+
if ($[26] !== FieldsComponent || $[27] !== errors || $[28] !== fields || $[29] !== onChange || $[30] !== value) {
|
|
130
134
|
t23 = /*#__PURE__*/jsx(FieldsComponent, {
|
|
131
135
|
fields: fields,
|
|
132
136
|
value: value,
|
|
133
137
|
onChange: onChange,
|
|
134
138
|
errors: errors
|
|
135
139
|
});
|
|
136
|
-
$[
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
140
|
+
$[26] = FieldsComponent;
|
|
141
|
+
$[27] = errors;
|
|
142
|
+
$[28] = fields;
|
|
143
|
+
$[29] = onChange;
|
|
144
|
+
$[30] = value;
|
|
145
|
+
$[31] = t23;
|
|
142
146
|
} else {
|
|
143
|
-
t23 = $[
|
|
147
|
+
t23 = $[31];
|
|
144
148
|
}
|
|
145
149
|
let t24;
|
|
146
|
-
if ($[
|
|
150
|
+
if ($[32] !== buttons || $[33] !== errors || $[34] !== formClassName || $[35] !== onSubmit || $[36] !== props || $[37] !== ref || $[38] !== status || $[39] !== t23) {
|
|
147
151
|
t24 = /*#__PURE__*/jsx(Form, {
|
|
148
152
|
className: formClassName,
|
|
149
|
-
resource: resource,
|
|
150
153
|
status: status,
|
|
151
154
|
buttons: buttons,
|
|
152
155
|
onSubmit: onSubmit,
|
|
153
156
|
errors: errors,
|
|
157
|
+
ref: ref,
|
|
154
158
|
...props,
|
|
155
159
|
children: t23
|
|
156
160
|
});
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
161
|
+
$[32] = buttons;
|
|
162
|
+
$[33] = errors;
|
|
163
|
+
$[34] = formClassName;
|
|
164
|
+
$[35] = onSubmit;
|
|
165
|
+
$[36] = props;
|
|
166
|
+
$[37] = ref;
|
|
167
|
+
$[38] = status;
|
|
168
|
+
$[39] = t23;
|
|
169
|
+
$[40] = t24;
|
|
166
170
|
} else {
|
|
167
|
-
t24 = $[
|
|
171
|
+
t24 = $[40];
|
|
168
172
|
}
|
|
169
173
|
let t25;
|
|
170
|
-
if ($[
|
|
174
|
+
if ($[41] !== PreviewComponent || $[42] !== children || $[43] !== resource || $[44] !== value) {
|
|
171
175
|
t25 = PreviewComponent !== null ? /*#__PURE__*/jsx(PreviewComponent, {
|
|
172
176
|
resource: resource,
|
|
173
177
|
value: value
|
|
174
178
|
}) : children;
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
179
|
+
$[41] = PreviewComponent;
|
|
180
|
+
$[42] = children;
|
|
181
|
+
$[43] = resource;
|
|
182
|
+
$[44] = value;
|
|
183
|
+
$[45] = t25;
|
|
180
184
|
} else {
|
|
181
|
-
t25 = $[
|
|
185
|
+
t25 = $[45];
|
|
182
186
|
}
|
|
183
187
|
let t26;
|
|
184
|
-
if ($[
|
|
188
|
+
if ($[46] !== previewClassName || $[47] !== t25) {
|
|
185
189
|
t26 = /*#__PURE__*/jsx("div", {
|
|
186
190
|
className: previewClassName,
|
|
187
191
|
children: t25
|
|
188
192
|
});
|
|
189
|
-
$[
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
193
|
+
$[46] = previewClassName;
|
|
194
|
+
$[47] = t25;
|
|
195
|
+
$[48] = t26;
|
|
192
196
|
} else {
|
|
193
|
-
t26 = $[
|
|
197
|
+
t26 = $[48];
|
|
194
198
|
}
|
|
195
199
|
let t27;
|
|
196
|
-
if ($[
|
|
200
|
+
if ($[49] !== t24 || $[50] !== t26) {
|
|
197
201
|
t27 = /*#__PURE__*/jsxs("div", {
|
|
198
202
|
className: "container-fluid row gx-4",
|
|
199
203
|
children: [t24, t26]
|
|
200
204
|
});
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
205
|
+
$[49] = t24;
|
|
206
|
+
$[50] = t26;
|
|
207
|
+
$[51] = t27;
|
|
204
208
|
} else {
|
|
205
|
-
t27 = $[
|
|
209
|
+
t27 = $[51];
|
|
206
210
|
}
|
|
207
211
|
return t27;
|
|
208
212
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/form-two-pane",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.45",
|
|
4
4
|
"description": "Two-pane resource forms",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@babel/runtime": "^7.28.6",
|
|
63
|
-
"@panneau/core": "^4.0.
|
|
64
|
-
"@panneau/data": "^4.0.
|
|
65
|
-
"@panneau/element-button": "^4.0.
|
|
66
|
-
"@panneau/element-form": "^4.0.
|
|
67
|
-
"@panneau/field-fields": "^4.0.
|
|
68
|
-
"@panneau/themes": "^4.0.
|
|
63
|
+
"@panneau/core": "^4.0.41",
|
|
64
|
+
"@panneau/data": "^4.0.45",
|
|
65
|
+
"@panneau/element-button": "^4.0.41",
|
|
66
|
+
"@panneau/element-form": "^4.0.45",
|
|
67
|
+
"@panneau/field-fields": "^4.0.41",
|
|
68
|
+
"@panneau/themes": "^4.0.41",
|
|
69
69
|
"classnames": "^2.5.1",
|
|
70
70
|
"lodash": "^4.17.21",
|
|
71
71
|
"react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "33c9c717de67f2a018289e91ea16daa2d5925cd2"
|
|
77
77
|
}
|