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