@panneau/form-two-pane 4.0.41 → 4.0.46

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 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(51);
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] = t1;
39
- $[3] = t10;
40
- $[4] = t11;
41
- $[5] = t2;
42
- $[6] = t3;
43
- $[7] = t4;
44
- $[8] = t5;
45
- $[9] = t6;
46
- $[10] = t7;
47
- $[11] = t8;
48
- $[12] = t9;
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
- t1 = $[2];
52
- t10 = $[3];
53
- t11 = $[4];
54
- t2 = $[5];
55
- t3 = $[6];
56
- t4 = $[7];
57
- t5 = $[8];
58
- t6 = $[9];
59
- t7 = $[10];
60
- t8 = $[11];
61
- t9 = $[12];
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 ($[13] !== resource) {
79
+ if ($[14] !== resource) {
76
80
  t12 = resource || {};
77
- $[13] = resource;
78
- $[14] = t12;
81
+ $[14] = resource;
82
+ $[15] = t12;
79
83
  } else {
80
- t12 = $[14];
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 ($[15] !== className || $[16] !== t14 || $[17] !== t15 || $[18] !== t16 || $[19] !== t17) {
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
- $[15] = className;
101
- $[16] = t14;
102
- $[17] = t15;
103
- $[18] = t16;
104
- $[19] = t17;
105
- $[20] = t18;
104
+ $[16] = className;
105
+ $[17] = t14;
106
+ $[18] = t15;
107
+ $[19] = t16;
108
+ $[20] = t17;
109
+ $[21] = t18;
106
110
  } else {
107
- t18 = $[20];
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 ($[21] !== t19 || $[22] !== t20 || $[23] !== t21) {
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
- $[21] = t19;
121
- $[22] = t20;
122
- $[23] = t21;
123
- $[24] = t22;
124
+ $[22] = t19;
125
+ $[23] = t20;
126
+ $[24] = t21;
127
+ $[25] = t22;
124
128
  } else {
125
- t22 = $[24];
129
+ t22 = $[25];
126
130
  }
127
131
  const previewClassName = t22;
128
132
  let t23;
129
- if ($[25] !== FieldsComponent || $[26] !== errors || $[27] !== fields || $[28] !== onChange || $[29] !== value) {
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
- $[25] = FieldsComponent;
137
- $[26] = errors;
138
- $[27] = fields;
139
- $[28] = onChange;
140
- $[29] = value;
141
- $[30] = t23;
140
+ $[26] = FieldsComponent;
141
+ $[27] = errors;
142
+ $[28] = fields;
143
+ $[29] = onChange;
144
+ $[30] = value;
145
+ $[31] = t23;
142
146
  } else {
143
- t23 = $[30];
147
+ t23 = $[31];
144
148
  }
145
149
  let t24;
146
- if ($[31] !== buttons || $[32] !== errors || $[33] !== formClassName || $[34] !== onSubmit || $[35] !== props || $[36] !== resource || $[37] !== status || $[38] !== t23) {
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
- $[31] = buttons;
158
- $[32] = errors;
159
- $[33] = formClassName;
160
- $[34] = onSubmit;
161
- $[35] = props;
162
- $[36] = resource;
163
- $[37] = status;
164
- $[38] = t23;
165
- $[39] = t24;
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 = $[39];
171
+ t24 = $[40];
168
172
  }
169
173
  let t25;
170
- if ($[40] !== PreviewComponent || $[41] !== children || $[42] !== resource || $[43] !== value) {
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
- $[40] = PreviewComponent;
176
- $[41] = children;
177
- $[42] = resource;
178
- $[43] = value;
179
- $[44] = t25;
179
+ $[41] = PreviewComponent;
180
+ $[42] = children;
181
+ $[43] = resource;
182
+ $[44] = value;
183
+ $[45] = t25;
180
184
  } else {
181
- t25 = $[44];
185
+ t25 = $[45];
182
186
  }
183
187
  let t26;
184
- if ($[45] !== previewClassName || $[46] !== t25) {
188
+ if ($[46] !== previewClassName || $[47] !== t25) {
185
189
  t26 = /*#__PURE__*/jsx("div", {
186
190
  className: previewClassName,
187
191
  children: t25
188
192
  });
189
- $[45] = previewClassName;
190
- $[46] = t25;
191
- $[47] = t26;
193
+ $[46] = previewClassName;
194
+ $[47] = t25;
195
+ $[48] = t26;
192
196
  } else {
193
- t26 = $[47];
197
+ t26 = $[48];
194
198
  }
195
199
  let t27;
196
- if ($[48] !== t24 || $[49] !== t26) {
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
- $[48] = t24;
202
- $[49] = t26;
203
- $[50] = t27;
205
+ $[49] = t24;
206
+ $[50] = t26;
207
+ $[51] = t27;
204
208
  } else {
205
- t27 = $[50];
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.41",
3
+ "version": "4.0.46",
4
4
  "description": "Two-pane resource forms",
5
5
  "keywords": [
6
6
  "javascript"
@@ -61,9 +61,9 @@
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.28.6",
63
63
  "@panneau/core": "^4.0.41",
64
- "@panneau/data": "^4.0.41",
64
+ "@panneau/data": "^4.0.45",
65
65
  "@panneau/element-button": "^4.0.41",
66
- "@panneau/element-form": "^4.0.41",
66
+ "@panneau/element-form": "^4.0.46",
67
67
  "@panneau/field-fields": "^4.0.41",
68
68
  "@panneau/themes": "^4.0.41",
69
69
  "classnames": "^2.5.1",
@@ -73,5 +73,5 @@
73
73
  "publishConfig": {
74
74
  "access": "public"
75
75
  },
76
- "gitHead": "a61617e40bef47e494f069697896191ce578a909"
76
+ "gitHead": "00e376490c55e23491b76afd11d0fe64cdb7ee05"
77
77
  }