@panneau/forms 5.0.0-alpha.27 → 5.0.0-alpha.29
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/Form.css +28 -21
- package/dist/Form.module.js +7 -7
- package/dist/Form.module.js.map +1 -1
- package/dist/FormSkeleton.d.ts.map +1 -1
- package/dist/FormSkeleton.js +68 -71
- package/dist/FormSkeleton.js.map +1 -1
- package/dist/FormView.d.ts +13 -1
- package/dist/FormView.d.ts.map +1 -1
- package/dist/FormView.js +221 -204
- package/dist/FormView.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/layout/Layout.d.ts +13 -0
- package/dist/layout/Layout.d.ts.map +1 -1
- package/dist/layout/Layout.js +163 -2
- package/dist/layout/Layout.js.map +1 -1
- package/dist/panels/SaveControls.d.ts +27 -0
- package/dist/panels/SaveControls.d.ts.map +1 -0
- package/dist/panels/SaveControls.js +87 -0
- package/dist/panels/SaveControls.js.map +1 -0
- package/dist/panels/panels.d.ts +34 -0
- package/dist/panels/panels.d.ts.map +1 -0
- package/dist/panels/panels.js +61 -0
- package/dist/panels/panels.js.map +1 -0
- package/dist/publication/Publication.d.ts +25 -1
- package/dist/publication/Publication.d.ts.map +1 -1
- package/dist/publication/Publication.js +337 -128
- package/dist/publication/Publication.js.map +1 -1
- package/dist/publication/index.d.ts +2 -1
- package/dist/publication/index.d.ts.map +1 -1
- package/dist/publication/index.js +1 -1
- package/package.json +8 -8
package/dist/FormView.js
CHANGED
|
@@ -6,13 +6,14 @@ import { ErrorSectionsContext, FormContext, RevealContext, createRevealRegistry
|
|
|
6
6
|
import { FormBinding } from "./FormBinding.js";
|
|
7
7
|
import { cx } from "./cx.js";
|
|
8
8
|
import { FormSkeleton } from "./FormSkeleton.js";
|
|
9
|
-
import {
|
|
9
|
+
import { SaveContext, SaveControls, SummaryContext } from "./panels/SaveControls.js";
|
|
10
|
+
import { PanelsContext, builtInPanels } from "./panels/panels.js";
|
|
11
|
+
import { FieldFlow, LayoutNodes, SidebarNode } from "./layout/Layout.js";
|
|
10
12
|
import { useBeforeUnloadGuard, useLeaveConfirmation } from "./unsaved.js";
|
|
11
13
|
import { c } from "react/compiler-runtime";
|
|
12
14
|
import { getLayoutFieldNames, getProblem, resolveFields, selectVisible, useLeaveGuard, usePanneau, usePlugins } from "@panneau/core";
|
|
13
|
-
import { Alert,
|
|
14
|
-
import {
|
|
15
|
-
import { CircleCheck } from "lucide-react";
|
|
15
|
+
import { Alert, Aside, AsideLayout, Button, isApplePlatform, usePanneauIntl, useToast, useToastOffset } from "@panneau/ui";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
17
|
import { useRef, useState } from "react";
|
|
17
18
|
import { FieldsProvider, builtInFields } from "@panneau/fields";
|
|
18
19
|
//#region src/FormView.tsx
|
|
@@ -62,8 +63,8 @@ function isSaveShortcut(event, apple) {
|
|
|
62
63
|
* collapsed section that holds an error opens, and the first error is focused.
|
|
63
64
|
*/
|
|
64
65
|
function FormView(t0) {
|
|
65
|
-
const $ = c(
|
|
66
|
-
const { form, fields, layout: t1, locales, relationSource, uploadSource, checkSource, components, submitLabel, actions, onSubmitted, onReload, guardUnsavedChanges: t2, showSavedToast: t3, saved: t4, isLoading: t5, id, "aria-label": ariaLabel, className, layoutClassName, sidebarClassName, footerClassName, summaryClassName } = t0;
|
|
66
|
+
const $ = c(48);
|
|
67
|
+
const { form, fields, layout: t1, locales, relationSource, uploadSource, checkSource, components, panels, submitLabel, actions, onSubmitted, onReload, guardUnsavedChanges: t2, showSavedToast: t3, saved: t4, isLoading: t5, id, "aria-label": ariaLabel, className, layoutClassName, sidebarClassName, sidebarStorageKey, footerClassName, summaryClassName } = t0;
|
|
67
68
|
const layout = t1 === void 0 ? [] : t1;
|
|
68
69
|
const guardUnsavedChanges = t2 === void 0 ? true : t2;
|
|
69
70
|
const showSavedToast = t3 === void 0 ? true : t3;
|
|
@@ -104,24 +105,49 @@ function FormView(t0) {
|
|
|
104
105
|
const sidebar = resolved.layout.filter(t6);
|
|
105
106
|
const order = [...getLayoutFieldNames(main), ...getLayoutFieldNames(sidebar.flatMap(_temp2))];
|
|
106
107
|
let t7;
|
|
107
|
-
if ($[2]
|
|
108
|
-
t7 = Object.
|
|
109
|
-
$[2] =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const t8 = t7;
|
|
108
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
109
|
+
t7 = Object.entries(builtInPanels);
|
|
110
|
+
$[2] = t7;
|
|
111
|
+
} else t7 = $[2];
|
|
112
|
+
const t8 = plugins.panels;
|
|
113
113
|
let t9;
|
|
114
|
-
if ($[
|
|
115
|
-
t9 = {
|
|
116
|
-
|
|
114
|
+
if ($[3] !== panels) {
|
|
115
|
+
t9 = Object.entries(panels ?? {});
|
|
116
|
+
$[3] = panels;
|
|
117
|
+
$[4] = t9;
|
|
118
|
+
} else t9 = $[4];
|
|
119
|
+
let t10;
|
|
120
|
+
if ($[5] !== t8 || $[6] !== t9) {
|
|
121
|
+
t10 = new Map([
|
|
122
|
+
...t7,
|
|
117
123
|
...t8,
|
|
118
|
-
...
|
|
119
|
-
|
|
120
|
-
$[4] = components;
|
|
124
|
+
...t9
|
|
125
|
+
]);
|
|
121
126
|
$[5] = t8;
|
|
122
127
|
$[6] = t9;
|
|
123
|
-
|
|
124
|
-
|
|
128
|
+
$[7] = t10;
|
|
129
|
+
} else t10 = $[7];
|
|
130
|
+
const panelEntries = t10;
|
|
131
|
+
const hasPanel = (name) => sidebar.some((node_2) => node_2.panel === name);
|
|
132
|
+
let t11;
|
|
133
|
+
if ($[8] !== plugins.fields) {
|
|
134
|
+
t11 = Object.fromEntries(plugins.fields);
|
|
135
|
+
$[8] = plugins.fields;
|
|
136
|
+
$[9] = t11;
|
|
137
|
+
} else t11 = $[9];
|
|
138
|
+
const t12 = t11;
|
|
139
|
+
let t13;
|
|
140
|
+
if ($[10] !== components || $[11] !== t12) {
|
|
141
|
+
t13 = {
|
|
142
|
+
...builtInFields,
|
|
143
|
+
...t12,
|
|
144
|
+
...components
|
|
145
|
+
};
|
|
146
|
+
$[10] = components;
|
|
147
|
+
$[11] = t12;
|
|
148
|
+
$[12] = t13;
|
|
149
|
+
} else t13 = $[12];
|
|
150
|
+
const entries = t13;
|
|
125
151
|
const goTo = (path) => {
|
|
126
152
|
registry.reveal(path);
|
|
127
153
|
const show = (frames) => {
|
|
@@ -163,33 +189,52 @@ function FormView(t0) {
|
|
|
163
189
|
setResolving(true);
|
|
164
190
|
await form.resolveConflict(choice).then(handle).finally(() => setResolving(false));
|
|
165
191
|
};
|
|
166
|
-
let
|
|
167
|
-
if ($[
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
} else t10 = $[7];
|
|
171
|
-
const apple = t10;
|
|
172
|
-
let t11;
|
|
173
|
-
if ($[8] !== apple) {
|
|
174
|
-
t11 = (event) => {
|
|
192
|
+
let t14;
|
|
193
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
194
|
+
const apple = isApplePlatform();
|
|
195
|
+
t14 = (event) => {
|
|
175
196
|
if (!isSaveShortcut(event, apple) || !(event.target instanceof Node) || !event.currentTarget.contains(event.target)) return;
|
|
176
197
|
event.preventDefault();
|
|
177
198
|
event.currentTarget.requestSubmit();
|
|
178
199
|
};
|
|
179
|
-
$[
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const problem = t12;
|
|
200
|
+
$[13] = t14;
|
|
201
|
+
} else t14 = $[13];
|
|
202
|
+
const onKeyDown = t14;
|
|
203
|
+
let t15;
|
|
204
|
+
if ($[14] !== state.error || $[15] !== state.status) {
|
|
205
|
+
t15 = state.status === "error" ? getProblem(state.error) : null;
|
|
206
|
+
$[14] = state.error;
|
|
207
|
+
$[15] = state.status;
|
|
208
|
+
$[16] = t15;
|
|
209
|
+
} else t15 = $[16];
|
|
210
|
+
const problem = t15;
|
|
191
211
|
const errorDetail = problem?.detail ?? (problem === null && state.error instanceof Error ? state.error.message : void 0);
|
|
192
212
|
const showSummary = state.status === "invalid" && state.submitCount > 0;
|
|
213
|
+
const orderedErrors = showSummary ? orderErrors(order, state.errors, formLocales) : {};
|
|
214
|
+
const t16 = state.status === "error" ? "error" : state.dirty ? "unsaved" : savedShown && state.status !== "submitting" ? "saved" : null;
|
|
215
|
+
const t17 = state.status === "submitting";
|
|
216
|
+
let t18;
|
|
217
|
+
if ($[17] !== intl || $[18] !== submitLabel) {
|
|
218
|
+
t18 = submitLabel === void 0 ? intl.formatMessage(messages.save) : submitLabel;
|
|
219
|
+
$[17] = intl;
|
|
220
|
+
$[18] = submitLabel;
|
|
221
|
+
$[19] = t18;
|
|
222
|
+
} else t18 = $[19];
|
|
223
|
+
let t19;
|
|
224
|
+
if ($[20] !== actions || $[21] !== t16 || $[22] !== t17 || $[23] !== t18) {
|
|
225
|
+
t19 = {
|
|
226
|
+
status: t16,
|
|
227
|
+
isSubmitting: t17,
|
|
228
|
+
actions,
|
|
229
|
+
submitLabel: t18
|
|
230
|
+
};
|
|
231
|
+
$[20] = actions;
|
|
232
|
+
$[21] = t16;
|
|
233
|
+
$[22] = t17;
|
|
234
|
+
$[23] = t18;
|
|
235
|
+
$[24] = t19;
|
|
236
|
+
} else t19 = $[24];
|
|
237
|
+
const save = t19;
|
|
193
238
|
if (isLoading) return /* @__PURE__ */ jsx(FormSkeleton, {
|
|
194
239
|
main: laidOut,
|
|
195
240
|
flow,
|
|
@@ -201,33 +246,33 @@ function FormView(t0) {
|
|
|
201
246
|
sidebarClassName,
|
|
202
247
|
footerClassName
|
|
203
248
|
});
|
|
204
|
-
let
|
|
205
|
-
if ($[
|
|
206
|
-
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
} else
|
|
210
|
-
let
|
|
211
|
-
if ($[
|
|
212
|
-
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
} else
|
|
216
|
-
let
|
|
217
|
-
if ($[
|
|
218
|
-
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
} else
|
|
222
|
-
let
|
|
223
|
-
if ($[
|
|
224
|
-
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
} else
|
|
228
|
-
let
|
|
229
|
-
if ($[
|
|
230
|
-
|
|
249
|
+
let t20;
|
|
250
|
+
if ($[25] !== relationSource) {
|
|
251
|
+
t20 = relationSource !== void 0 ? { relationSource } : {};
|
|
252
|
+
$[25] = relationSource;
|
|
253
|
+
$[26] = t20;
|
|
254
|
+
} else t20 = $[26];
|
|
255
|
+
let t21;
|
|
256
|
+
if ($[27] !== uploadSource) {
|
|
257
|
+
t21 = uploadSource !== void 0 ? { uploadSource } : {};
|
|
258
|
+
$[27] = uploadSource;
|
|
259
|
+
$[28] = t21;
|
|
260
|
+
} else t21 = $[28];
|
|
261
|
+
let t22;
|
|
262
|
+
if ($[29] !== checkSource) {
|
|
263
|
+
t22 = checkSource !== void 0 ? { checkSource } : {};
|
|
264
|
+
$[29] = checkSource;
|
|
265
|
+
$[30] = t22;
|
|
266
|
+
} else t22 = $[30];
|
|
267
|
+
let t23;
|
|
268
|
+
if ($[31] !== className) {
|
|
269
|
+
t23 = cx(Form_module_default.form, className);
|
|
270
|
+
$[31] = className;
|
|
271
|
+
$[32] = t23;
|
|
272
|
+
} else t23 = $[32];
|
|
273
|
+
let t24;
|
|
274
|
+
if ($[33] !== errorDetail || $[34] !== intl || $[35] !== state.status) {
|
|
275
|
+
t24 = state.status === "error" ? /* @__PURE__ */ jsx(Alert, {
|
|
231
276
|
tone: "danger",
|
|
232
277
|
role: "alert",
|
|
233
278
|
title: intl.formatMessage(messages.saveFailed),
|
|
@@ -238,156 +283,128 @@ function FormView(t0) {
|
|
|
238
283
|
}),
|
|
239
284
|
children: errorDetail
|
|
240
285
|
}) : null;
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[23] = state.status;
|
|
244
|
-
$[24] = t17;
|
|
245
|
-
} else t17 = $[24];
|
|
246
|
-
const t18 = sidebar.length > 0 && Form_module_default.withSidebar;
|
|
247
|
-
let t19;
|
|
248
|
-
if ($[25] !== layoutClassName || $[26] !== t18) {
|
|
249
|
-
t19 = cx(Form_module_default.layout, t18, layoutClassName);
|
|
250
|
-
$[25] = layoutClassName;
|
|
251
|
-
$[26] = t18;
|
|
252
|
-
$[27] = t19;
|
|
253
|
-
} else t19 = $[27];
|
|
254
|
-
let t20;
|
|
255
|
-
if ($[28] !== actions || $[29] !== apple || $[30] !== footerClassName || $[31] !== hasFooter || $[32] !== intl || $[33] !== savedShown || $[34] !== state.dirty || $[35] !== state.status || $[36] !== submitLabel) {
|
|
256
|
-
t20 = hasFooter ? /* @__PURE__ */ jsxs("div", {
|
|
257
|
-
ref: footer,
|
|
258
|
-
className: cx(Form_module_default.footer, footerClassName),
|
|
259
|
-
children: [
|
|
260
|
-
/* @__PURE__ */ jsx("span", {
|
|
261
|
-
className: cx(Form_module_default.status, state.status === "error" && Form_module_default.statusError),
|
|
262
|
-
role: "status",
|
|
263
|
-
children: state.status === "error" ? intl.formatMessage(messages.saveFailed) : state.dirty ? intl.formatMessage(messages.unsaved) : savedShown && state.status !== "submitting" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, { icon: CircleCheck }), intl.formatMessage(messages.saved)] }) : null
|
|
264
|
-
}),
|
|
265
|
-
actions,
|
|
266
|
-
submitLabel !== null ? /* @__PURE__ */ jsx(Tooltip, {
|
|
267
|
-
content: intl.formatMessage(messages.saveShortcut, { modifier: apple ? "⌘" : "Ctrl" }),
|
|
268
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
269
|
-
type: "submit",
|
|
270
|
-
variant: "primary",
|
|
271
|
-
isPending: state.status === "submitting",
|
|
272
|
-
"aria-keyshortcuts": apple ? "Meta+Enter" : "Control+Enter",
|
|
273
|
-
children: submitLabel ?? intl.formatMessage(messages.save)
|
|
274
|
-
})
|
|
275
|
-
}) : null
|
|
276
|
-
]
|
|
277
|
-
}) : null;
|
|
278
|
-
$[28] = actions;
|
|
279
|
-
$[29] = apple;
|
|
280
|
-
$[30] = footerClassName;
|
|
281
|
-
$[31] = hasFooter;
|
|
282
|
-
$[32] = intl;
|
|
283
|
-
$[33] = savedShown;
|
|
284
|
-
$[34] = state.dirty;
|
|
286
|
+
$[33] = errorDetail;
|
|
287
|
+
$[34] = intl;
|
|
285
288
|
$[35] = state.status;
|
|
286
|
-
$[36] =
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
let
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
$[38] =
|
|
297
|
-
$[39] =
|
|
298
|
-
$[40] = t24;
|
|
289
|
+
$[36] = t24;
|
|
290
|
+
} else t24 = $[36];
|
|
291
|
+
const t25 = state.status === "conflict" || resolving;
|
|
292
|
+
const t26 = state.conflict?.current ?? null;
|
|
293
|
+
let t27;
|
|
294
|
+
let t28;
|
|
295
|
+
if ($[37] !== resolve) {
|
|
296
|
+
t27 = () => void resolve("reload");
|
|
297
|
+
t28 = () => void resolve("overwrite");
|
|
298
|
+
$[37] = resolve;
|
|
299
|
+
$[38] = t27;
|
|
300
|
+
$[39] = t28;
|
|
299
301
|
} else {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
+
t27 = $[38];
|
|
303
|
+
t28 = $[39];
|
|
302
304
|
}
|
|
303
|
-
let
|
|
304
|
-
if ($[
|
|
305
|
-
|
|
306
|
-
isOpen:
|
|
305
|
+
let t29;
|
|
306
|
+
if ($[40] !== resolved.fields || $[41] !== resolving || $[42] !== state.values || $[43] !== t25 || $[44] !== t26 || $[45] !== t27 || $[46] !== t28) {
|
|
307
|
+
t29 = /* @__PURE__ */ jsx(ConflictDialog, {
|
|
308
|
+
isOpen: t25,
|
|
307
309
|
fields: resolved.fields,
|
|
308
310
|
values: state.values,
|
|
309
|
-
current:
|
|
311
|
+
current: t26,
|
|
310
312
|
isPending: resolving,
|
|
311
|
-
onReload:
|
|
312
|
-
onOverwrite:
|
|
313
|
+
onReload: t27,
|
|
314
|
+
onOverwrite: t28
|
|
313
315
|
});
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
} else
|
|
316
|
+
$[40] = resolved.fields;
|
|
317
|
+
$[41] = resolving;
|
|
318
|
+
$[42] = state.values;
|
|
319
|
+
$[43] = t25;
|
|
320
|
+
$[44] = t26;
|
|
321
|
+
$[45] = t27;
|
|
322
|
+
$[46] = t28;
|
|
323
|
+
$[47] = t29;
|
|
324
|
+
} else t29 = $[47];
|
|
323
325
|
return /* @__PURE__ */ jsx(FormContext, {
|
|
324
326
|
value: form,
|
|
325
|
-
children: /* @__PURE__ */ jsx(
|
|
326
|
-
value:
|
|
327
|
-
children: /* @__PURE__ */ jsx(
|
|
328
|
-
value:
|
|
329
|
-
children: /* @__PURE__ */
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
/* @__PURE__ */
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
327
|
+
children: /* @__PURE__ */ jsx(PanelsContext, {
|
|
328
|
+
value: panelEntries,
|
|
329
|
+
children: /* @__PURE__ */ jsx(SaveContext, {
|
|
330
|
+
value: save,
|
|
331
|
+
children: /* @__PURE__ */ jsx(SummaryContext, {
|
|
332
|
+
value: {
|
|
333
|
+
errors: orderedErrors,
|
|
334
|
+
fields: resolved.fields,
|
|
335
|
+
onSelect: goTo
|
|
336
|
+
},
|
|
337
|
+
children: /* @__PURE__ */ jsx(RevealContext, {
|
|
338
|
+
value: registry,
|
|
339
|
+
children: /* @__PURE__ */ jsx(ErrorSectionsContext, {
|
|
340
|
+
value: errorSections,
|
|
341
|
+
children: /* @__PURE__ */ jsxs(FieldsProvider, {
|
|
342
|
+
components: entries,
|
|
343
|
+
locales: formLocales,
|
|
344
|
+
...t20,
|
|
345
|
+
...t21,
|
|
346
|
+
...t22,
|
|
347
|
+
binding: FormBinding,
|
|
348
|
+
children: [
|
|
349
|
+
/* @__PURE__ */ jsxs("form", {
|
|
350
|
+
ref: root,
|
|
351
|
+
id,
|
|
352
|
+
"aria-label": ariaLabel,
|
|
353
|
+
noValidate: true,
|
|
354
|
+
className: t23,
|
|
355
|
+
onSubmit: (event_0) => {
|
|
356
|
+
event_0.preventDefault();
|
|
357
|
+
form.submit().then(handle);
|
|
358
|
+
},
|
|
359
|
+
onKeyDown,
|
|
360
|
+
children: [
|
|
361
|
+
showSummary ? /* @__PURE__ */ jsx(ErrorSummary, {
|
|
362
|
+
errors: orderedErrors,
|
|
363
|
+
fields: resolved.fields,
|
|
364
|
+
onSelect: goTo,
|
|
365
|
+
className: cx(summaryClassName ?? Form_module_default.summary, hasPanel("errors") && Form_module_default.besideAsideHidden)
|
|
366
|
+
}) : null,
|
|
367
|
+
t24,
|
|
368
|
+
/* @__PURE__ */ jsxs(AsideLayout, {
|
|
369
|
+
className: layoutClassName,
|
|
370
|
+
mainClassName: Form_module_default.stack,
|
|
371
|
+
aside: sidebar.length > 0 ? /* @__PURE__ */ jsx(Aside, {
|
|
372
|
+
label: intl.formatMessage(messages.sidebar),
|
|
373
|
+
className: sidebarClassName,
|
|
374
|
+
children: sidebar.map((node_4, index) => /* @__PURE__ */ jsx(SidebarNode, {
|
|
375
|
+
node: node_4,
|
|
376
|
+
fields: resolved.fieldsByName,
|
|
377
|
+
storageKey: sidebarStorageKey
|
|
378
|
+
}, index))
|
|
379
|
+
}) : null,
|
|
380
|
+
children: [/* @__PURE__ */ jsx(LayoutNodes, {
|
|
381
|
+
nodes: laidOut,
|
|
382
|
+
fields: resolved.fieldsByName
|
|
383
|
+
}), flow.length > 0 ? /* @__PURE__ */ jsx(FieldFlow, {
|
|
384
|
+
nodes: flow,
|
|
385
|
+
fields: resolved.fieldsByName
|
|
386
|
+
}) : null]
|
|
387
|
+
}),
|
|
388
|
+
hasFooter ? /* @__PURE__ */ jsx("div", {
|
|
389
|
+
ref: footer,
|
|
390
|
+
className: cx(Form_module_default.footer, hasPanel("save") && Form_module_default.besideAsideHidden, footerClassName),
|
|
391
|
+
children: /* @__PURE__ */ jsx(SaveControls, { ...save })
|
|
392
|
+
}) : null
|
|
393
|
+
]
|
|
394
|
+
}),
|
|
395
|
+
t29,
|
|
396
|
+
leave.dialog
|
|
397
|
+
]
|
|
398
|
+
})
|
|
399
|
+
})
|
|
400
|
+
})
|
|
384
401
|
})
|
|
385
402
|
})
|
|
386
403
|
})
|
|
387
404
|
});
|
|
388
405
|
}
|
|
389
|
-
function _temp3(
|
|
390
|
-
return
|
|
406
|
+
function _temp3(node_3) {
|
|
407
|
+
return node_3.type === "sidebar";
|
|
391
408
|
}
|
|
392
409
|
function _temp2(node_1) {
|
|
393
410
|
return node_1.children ?? [];
|