@questpie/admin 3.2.0 → 3.2.1
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/client/blocks/block-renderer.d.mts +12 -2
- package/dist/client/blocks/block-renderer.mjs +357 -49
- package/dist/client/components/blocks/block-editor-context.mjs +11 -1
- package/dist/client/components/blocks/block-editor-provider.mjs +68 -26
- package/dist/client/components/blocks/block-item.mjs +181 -170
- package/dist/client/components/blocks/utils/tree-utils.mjs +13 -1
- package/dist/client/components/fields/array-field.mjs +177 -118
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +305 -310
- package/dist/client/components/filter-builder/filters-tab.mjs +1 -1
- package/dist/client/components/history-sidebar.mjs +121 -114
- package/dist/client/components/preview/live-preview-mode.mjs +140 -114
- package/dist/client/components/preview/preview-pane.mjs +288 -333
- package/dist/client/components/primitives/option-label.mjs +44 -0
- package/dist/client/components/primitives/select-multi.mjs +408 -383
- package/dist/client/components/primitives/select-single.mjs +387 -357
- package/dist/client/components/widgets/chart-widget.mjs +168 -143
- package/dist/client/contexts/focus-context.d.mts +11 -0
- package/dist/client/contexts/focus-context.mjs +51 -34
- package/dist/client/hooks/use-brand.mjs +2 -1
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/block-scope-context.mjs +10 -20
- package/dist/client/preview/index.d.mts +1 -1
- package/dist/client/preview/patch.mjs +100 -0
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-field.d.mts +34 -5
- package/dist/client/preview/preview-field.mjs +385 -118
- package/dist/client/preview/types.d.mts +82 -3
- package/dist/client/preview/types.mjs +85 -6
- package/dist/client/preview/use-collection-preview.d.mts +19 -1
- package/dist/client/preview/use-collection-preview.mjs +182 -58
- package/dist/client/runtime/index.d.mts +2 -2
- package/dist/client/runtime/index.mjs +2 -2
- package/dist/client/runtime/provider.d.mts +5 -5
- package/dist/client/utils/build-field-definitions-from-schema.mjs +8 -3
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/bulk-action-toolbar.mjs +23 -25
- package/dist/client/views/collection/cells/primitive-cells.mjs +63 -13
- package/dist/client/views/collection/columns/build-columns.mjs +1 -0
- package/dist/client/views/collection/form-view.mjs +262 -33
- package/dist/client/views/collection/table-view.mjs +16 -11
- package/dist/client/views/layout/admin-layout-provider.d.mts +5 -5
- package/dist/client/views/layout/admin-layout-provider.mjs +107 -16
- package/dist/client.d.mts +2 -2
- package/dist/client.mjs +1 -1
- package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/server/augmentation/common.d.mts +8 -4
- package/dist/server/augmentation/form-layout.d.mts +1 -1
- package/dist/server/i18n/messages/cs.mjs +11 -0
- package/dist/server/i18n/messages/de.mjs +11 -0
- package/dist/server/i18n/messages/en.mjs +11 -0
- package/dist/server/i18n/messages/es.mjs +11 -0
- package/dist/server/i18n/messages/fr.mjs +11 -0
- package/dist/server/i18n/messages/pl.mjs +11 -0
- package/dist/server/i18n/messages/pt.mjs +11 -0
- package/dist/server/i18n/messages/sk.mjs +11 -0
- package/dist/server/modules/admin/block/block-builder.d.mts +7 -10
- package/dist/server/modules/admin/block/block-builder.mjs +7 -10
- package/dist/server/modules/admin/collections/account.d.mts +50 -50
- package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
- package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
- package/dist/server/modules/admin/collections/assets.d.mts +57 -20
- package/dist/server/modules/admin/collections/session.d.mts +42 -42
- package/dist/server/modules/admin/collections/user.d.mts +100 -34
- package/dist/server/modules/admin/collections/user.mjs +4 -4
- package/dist/server/modules/admin/collections/verification.d.mts +32 -32
- package/dist/server/modules/admin/index.d.mts +3 -3
- package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +9 -12
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/locales.d.mts +2 -2
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/setup.d.mts +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/translations.mjs +1 -1
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin-preferences/collections/admin-preferences.mjs +4 -6
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +31 -33
- package/dist/server/modules/admin-preferences/collections/saved-views.mjs +4 -6
- package/package.json +3 -3
|
@@ -4,8 +4,8 @@ import { useTranslation } from "../../i18n/hooks.mjs";
|
|
|
4
4
|
import { cn } from "../../lib/utils.mjs";
|
|
5
5
|
import { Button } from "../ui/button.mjs";
|
|
6
6
|
import { Tabs, TabsList, TabsTrigger } from "../ui/tabs.mjs";
|
|
7
|
-
import { useIsMobile } from "../../hooks/use-media-query.mjs";
|
|
8
7
|
import { FocusProvider, parsePreviewFieldPath, scrollFieldIntoView, useFocus } from "../../contexts/focus-context.mjs";
|
|
8
|
+
import { useIsMobile } from "../../hooks/use-media-query.mjs";
|
|
9
9
|
import { PreviewPane } from "./preview-pane.mjs";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
11
11
|
import { Icon } from "@iconify/react";
|
|
@@ -126,8 +126,8 @@ function useLivePreviewRenderTelemetry(t0) {
|
|
|
126
126
|
React.useEffect(t1);
|
|
127
127
|
}
|
|
128
128
|
function LivePreviewContent(t0) {
|
|
129
|
-
const $ = c(
|
|
130
|
-
const { open,
|
|
129
|
+
const $ = c(77);
|
|
130
|
+
const { open, children, previewUrl, previewRef, onFieldValueEdited, onPatchApplied, onResyncRequest, defaultSize: t1, minSize: t2 } = t0;
|
|
131
131
|
const defaultSize = t1 === void 0 ? 50 : t1;
|
|
132
132
|
const minSize = t2 === void 0 ? 30 : t2;
|
|
133
133
|
const { t } = useTranslation();
|
|
@@ -255,10 +255,19 @@ function LivePreviewContent(t0) {
|
|
|
255
255
|
$[20] = t11;
|
|
256
256
|
} else t11 = $[20];
|
|
257
257
|
const handlePreviewBlockClick = t11;
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
let t12;
|
|
259
|
+
if ($[21] !== focusContext) {
|
|
260
|
+
t12 = (message) => {
|
|
261
|
+
focusContext.requestBlockInsert(message.position, message.referenceBlockId);
|
|
262
|
+
};
|
|
263
|
+
$[21] = focusContext;
|
|
264
|
+
$[22] = t12;
|
|
265
|
+
} else t12 = $[22];
|
|
266
|
+
const handlePreviewBlockInsertRequest = t12;
|
|
267
|
+
const t13 = open ? "bg-background fixed inset-0 z-50 flex flex-col" : "w-full";
|
|
268
|
+
let t14;
|
|
269
|
+
if ($[23] !== activeTab || $[24] !== isMobile || $[25] !== open || $[26] !== t) {
|
|
270
|
+
t14 = open && /* @__PURE__ */ jsxs("div", {
|
|
262
271
|
className: "flex shrink-0 items-center justify-between border-b px-4 py-2",
|
|
263
272
|
children: [
|
|
264
273
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -288,9 +297,9 @@ function LivePreviewContent(t0) {
|
|
|
288
297
|
})]
|
|
289
298
|
})
|
|
290
299
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ jsx("div", {
|
|
292
301
|
className: "flex items-center gap-1",
|
|
293
|
-
children:
|
|
302
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
294
303
|
variant: "ghost",
|
|
295
304
|
size: "sm",
|
|
296
305
|
onClick: handleExitPreview,
|
|
@@ -303,68 +312,60 @@ function LivePreviewContent(t0) {
|
|
|
303
312
|
className: "hidden sm:inline",
|
|
304
313
|
children: t("preview.exitPreview")
|
|
305
314
|
})]
|
|
306
|
-
})
|
|
307
|
-
variant: "ghost",
|
|
308
|
-
size: "icon",
|
|
309
|
-
onClick: onClose,
|
|
310
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
311
|
-
icon: "ph:x",
|
|
312
|
-
className: "h-4 w-4"
|
|
313
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
314
|
-
className: "sr-only",
|
|
315
|
-
children: t("common.close")
|
|
316
|
-
})]
|
|
317
|
-
})]
|
|
315
|
+
})
|
|
318
316
|
})
|
|
319
317
|
]
|
|
320
318
|
});
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
$[
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const
|
|
329
|
-
const t15 = open ? isMobile ? "min-h-0 flex-1" : "flex min-h-0 flex-1" : "w-full";
|
|
330
|
-
let t16;
|
|
331
|
-
if ($[27] !== activeTab || $[28] !== isMobile || $[29] !== open) {
|
|
332
|
-
t16 = open ? isMobile ? cn("h-full overflow-y-auto p-6", activeTab !== "form" && "hidden") : "bg-background h-full overflow-y-auto border-r p-6" : "w-full";
|
|
333
|
-
$[27] = activeTab;
|
|
334
|
-
$[28] = isMobile;
|
|
335
|
-
$[29] = open;
|
|
336
|
-
$[30] = t16;
|
|
337
|
-
} else t16 = $[30];
|
|
319
|
+
$[23] = activeTab;
|
|
320
|
+
$[24] = isMobile;
|
|
321
|
+
$[25] = open;
|
|
322
|
+
$[26] = t;
|
|
323
|
+
$[27] = t14;
|
|
324
|
+
} else t14 = $[27];
|
|
325
|
+
const t15 = open && !isMobile ? containerRef : void 0;
|
|
326
|
+
const t16 = open ? isMobile ? "min-h-0 flex-1" : "flex min-h-0 flex-1" : "w-full";
|
|
338
327
|
let t17;
|
|
339
|
-
if ($[
|
|
340
|
-
t17 = open
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
} else t17 = $[
|
|
328
|
+
if ($[28] !== activeTab || $[29] !== isMobile || $[30] !== open) {
|
|
329
|
+
t17 = open ? isMobile ? cn("h-full overflow-y-auto p-6", activeTab !== "form" && "hidden") : "bg-background h-full overflow-y-auto border-r p-6" : "w-full";
|
|
330
|
+
$[28] = activeTab;
|
|
331
|
+
$[29] = isMobile;
|
|
332
|
+
$[30] = open;
|
|
333
|
+
$[31] = t17;
|
|
334
|
+
} else t17 = $[31];
|
|
346
335
|
let t18;
|
|
347
|
-
if ($[
|
|
348
|
-
t18 =
|
|
336
|
+
if ($[32] !== isMobile || $[33] !== open || $[34] !== previewPercent) {
|
|
337
|
+
t18 = open && !isMobile ? { width: `${100 - previewPercent}%` } : void 0;
|
|
338
|
+
$[32] = isMobile;
|
|
339
|
+
$[33] = open;
|
|
340
|
+
$[34] = previewPercent;
|
|
341
|
+
$[35] = t18;
|
|
342
|
+
} else t18 = $[35];
|
|
343
|
+
let t19;
|
|
344
|
+
if ($[36] !== children || $[37] !== t17 || $[38] !== t18) {
|
|
345
|
+
t19 = /* @__PURE__ */ jsx("div", {
|
|
349
346
|
"data-preview-form-scope": true,
|
|
350
|
-
className:
|
|
351
|
-
style:
|
|
347
|
+
className: t17,
|
|
348
|
+
style: t18,
|
|
352
349
|
children
|
|
353
350
|
});
|
|
354
|
-
$[
|
|
355
|
-
$[36] = t16;
|
|
351
|
+
$[36] = children;
|
|
356
352
|
$[37] = t17;
|
|
357
353
|
$[38] = t18;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
354
|
+
$[39] = t19;
|
|
355
|
+
} else t19 = $[39];
|
|
356
|
+
let t20;
|
|
357
|
+
if ($[40] !== activeTab || $[41] !== handlePreviewBlockClick || $[42] !== handlePreviewBlockInsertRequest || $[43] !== handlePreviewFieldClick || $[44] !== isMobile || $[45] !== onFieldValueEdited || $[46] !== onPatchApplied || $[47] !== onResyncRequest || $[48] !== open || $[49] !== previewRef || $[50] !== previewUrl || $[51] !== t) {
|
|
358
|
+
t20 = open && isMobile && /* @__PURE__ */ jsx("div", {
|
|
362
359
|
className: activeTab === "preview" ? "h-full" : "hidden",
|
|
363
360
|
children: previewUrl ? /* @__PURE__ */ jsx(PreviewPane, {
|
|
364
361
|
ref: previewRef,
|
|
365
362
|
url: previewUrl,
|
|
366
363
|
onFieldClick: handlePreviewFieldClick,
|
|
367
|
-
onBlockClick: handlePreviewBlockClick
|
|
364
|
+
onBlockClick: handlePreviewBlockClick,
|
|
365
|
+
onBlockInsertRequest: handlePreviewBlockInsertRequest,
|
|
366
|
+
onFieldValueEdited,
|
|
367
|
+
onPatchApplied,
|
|
368
|
+
onResyncRequest
|
|
368
369
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
369
370
|
className: "flex h-full items-center justify-center",
|
|
370
371
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -376,19 +377,23 @@ function LivePreviewContent(t0) {
|
|
|
376
377
|
})]
|
|
377
378
|
})
|
|
378
379
|
});
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
380
|
+
$[40] = activeTab;
|
|
381
|
+
$[41] = handlePreviewBlockClick;
|
|
382
|
+
$[42] = handlePreviewBlockInsertRequest;
|
|
383
|
+
$[43] = handlePreviewFieldClick;
|
|
384
|
+
$[44] = isMobile;
|
|
385
|
+
$[45] = onFieldValueEdited;
|
|
386
|
+
$[46] = onPatchApplied;
|
|
387
|
+
$[47] = onResyncRequest;
|
|
388
|
+
$[48] = open;
|
|
389
|
+
$[49] = previewRef;
|
|
390
|
+
$[50] = previewUrl;
|
|
391
|
+
$[51] = t;
|
|
392
|
+
$[52] = t20;
|
|
393
|
+
} else t20 = $[52];
|
|
394
|
+
let t21;
|
|
395
|
+
if ($[53] !== handleMouseDown || $[54] !== handlePreviewBlockClick || $[55] !== handlePreviewBlockInsertRequest || $[56] !== handlePreviewFieldClick || $[57] !== isMobile || $[58] !== onFieldValueEdited || $[59] !== onPatchApplied || $[60] !== onResyncRequest || $[61] !== open || $[62] !== previewPercent || $[63] !== previewRef || $[64] !== previewUrl || $[65] !== t) {
|
|
396
|
+
t21 = open && !isMobile && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("button", {
|
|
392
397
|
type: "button",
|
|
393
398
|
"aria-label": "Resize preview pane",
|
|
394
399
|
onMouseDown: handleMouseDown,
|
|
@@ -401,7 +406,11 @@ function LivePreviewContent(t0) {
|
|
|
401
406
|
ref: previewRef,
|
|
402
407
|
url: previewUrl,
|
|
403
408
|
onFieldClick: handlePreviewFieldClick,
|
|
404
|
-
onBlockClick: handlePreviewBlockClick
|
|
409
|
+
onBlockClick: handlePreviewBlockClick,
|
|
410
|
+
onBlockInsertRequest: handlePreviewBlockInsertRequest,
|
|
411
|
+
onFieldValueEdited,
|
|
412
|
+
onPatchApplied,
|
|
413
|
+
onResyncRequest
|
|
405
414
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
406
415
|
className: "flex h-full items-center justify-center",
|
|
407
416
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -413,47 +422,51 @@ function LivePreviewContent(t0) {
|
|
|
413
422
|
})]
|
|
414
423
|
})
|
|
415
424
|
})] });
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
$[
|
|
422
|
-
$[
|
|
423
|
-
$[
|
|
424
|
-
$[
|
|
425
|
-
$[
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
425
|
+
$[53] = handleMouseDown;
|
|
426
|
+
$[54] = handlePreviewBlockClick;
|
|
427
|
+
$[55] = handlePreviewBlockInsertRequest;
|
|
428
|
+
$[56] = handlePreviewFieldClick;
|
|
429
|
+
$[57] = isMobile;
|
|
430
|
+
$[58] = onFieldValueEdited;
|
|
431
|
+
$[59] = onPatchApplied;
|
|
432
|
+
$[60] = onResyncRequest;
|
|
433
|
+
$[61] = open;
|
|
434
|
+
$[62] = previewPercent;
|
|
435
|
+
$[63] = previewRef;
|
|
436
|
+
$[64] = previewUrl;
|
|
437
|
+
$[65] = t;
|
|
438
|
+
$[66] = t21;
|
|
439
|
+
} else t21 = $[66];
|
|
440
|
+
let t22;
|
|
441
|
+
if ($[67] !== t15 || $[68] !== t16 || $[69] !== t19 || $[70] !== t20 || $[71] !== t21) {
|
|
442
|
+
t22 = /* @__PURE__ */ jsxs("div", {
|
|
443
|
+
ref: t15,
|
|
444
|
+
className: t16,
|
|
432
445
|
children: [
|
|
433
|
-
t18,
|
|
434
446
|
t19,
|
|
435
|
-
t20
|
|
447
|
+
t20,
|
|
448
|
+
t21
|
|
436
449
|
]
|
|
437
450
|
});
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
} else
|
|
445
|
-
let
|
|
446
|
-
if ($[
|
|
447
|
-
|
|
448
|
-
className:
|
|
449
|
-
children: [
|
|
451
|
+
$[67] = t15;
|
|
452
|
+
$[68] = t16;
|
|
453
|
+
$[69] = t19;
|
|
454
|
+
$[70] = t20;
|
|
455
|
+
$[71] = t21;
|
|
456
|
+
$[72] = t22;
|
|
457
|
+
} else t22 = $[72];
|
|
458
|
+
let t23;
|
|
459
|
+
if ($[73] !== t13 || $[74] !== t14 || $[75] !== t22) {
|
|
460
|
+
t23 = /* @__PURE__ */ jsxs("div", {
|
|
461
|
+
className: t13,
|
|
462
|
+
children: [t14, t22]
|
|
450
463
|
});
|
|
451
|
-
$[
|
|
452
|
-
$[
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
} else
|
|
456
|
-
return
|
|
464
|
+
$[73] = t13;
|
|
465
|
+
$[74] = t14;
|
|
466
|
+
$[75] = t22;
|
|
467
|
+
$[76] = t23;
|
|
468
|
+
} else t23 = $[76];
|
|
469
|
+
return t23;
|
|
457
470
|
}
|
|
458
471
|
function _temp2(e_0) {
|
|
459
472
|
return e_0.preventDefault();
|
|
@@ -462,13 +475,13 @@ function _temp() {
|
|
|
462
475
|
window.location.href = "/api/preview?disable=true";
|
|
463
476
|
}
|
|
464
477
|
function LivePreviewMode(t0) {
|
|
465
|
-
const $ = c(
|
|
466
|
-
const { open, onClose, children, previewUrl, previewRef: previewRefProp, defaultSize, minSize } = t0;
|
|
478
|
+
const $ = c(11);
|
|
479
|
+
const { open, onClose, children, previewUrl, previewRef: previewRefProp, onFieldValueEdited, onPatchApplied, onResyncRequest, defaultSize, minSize } = t0;
|
|
467
480
|
const fallbackPreviewRef = React.useRef(null);
|
|
468
481
|
const previewRef = previewRefProp ?? fallbackPreviewRef;
|
|
469
482
|
const handleFocusChange = _temp3;
|
|
470
483
|
let t1;
|
|
471
|
-
if ($[0] !== children || $[1] !== defaultSize || $[2] !== minSize || $[3] !== onClose || $[4] !==
|
|
484
|
+
if ($[0] !== children || $[1] !== defaultSize || $[2] !== minSize || $[3] !== onClose || $[4] !== onFieldValueEdited || $[5] !== onPatchApplied || $[6] !== onResyncRequest || $[7] !== open || $[8] !== previewRef || $[9] !== previewUrl) {
|
|
472
485
|
t1 = /* @__PURE__ */ jsx(FocusProvider, {
|
|
473
486
|
onFocusChange: handleFocusChange,
|
|
474
487
|
children: /* @__PURE__ */ jsx(LivePreviewContent, {
|
|
@@ -476,6 +489,9 @@ function LivePreviewMode(t0) {
|
|
|
476
489
|
onClose,
|
|
477
490
|
previewUrl,
|
|
478
491
|
previewRef,
|
|
492
|
+
onFieldValueEdited,
|
|
493
|
+
onPatchApplied,
|
|
494
|
+
onResyncRequest,
|
|
479
495
|
defaultSize,
|
|
480
496
|
minSize,
|
|
481
497
|
children
|
|
@@ -485,11 +501,14 @@ function LivePreviewMode(t0) {
|
|
|
485
501
|
$[1] = defaultSize;
|
|
486
502
|
$[2] = minSize;
|
|
487
503
|
$[3] = onClose;
|
|
488
|
-
$[4] =
|
|
489
|
-
$[5] =
|
|
490
|
-
$[6] =
|
|
491
|
-
$[7] =
|
|
492
|
-
|
|
504
|
+
$[4] = onFieldValueEdited;
|
|
505
|
+
$[5] = onPatchApplied;
|
|
506
|
+
$[6] = onResyncRequest;
|
|
507
|
+
$[7] = open;
|
|
508
|
+
$[8] = previewRef;
|
|
509
|
+
$[9] = previewUrl;
|
|
510
|
+
$[10] = t1;
|
|
511
|
+
} else t1 = $[10];
|
|
493
512
|
return t1;
|
|
494
513
|
}
|
|
495
514
|
function _temp3(state) {
|
|
@@ -497,6 +516,13 @@ function _temp3(state) {
|
|
|
497
516
|
else if (state.type === "block") setTimeout(() => {
|
|
498
517
|
scrollFieldIntoView(state.fieldPath ? `content._values.${state.blockId}.${state.fieldPath}` : `content._values.${state.blockId}`);
|
|
499
518
|
}, 150);
|
|
519
|
+
else if (state.type === "block-insert") {
|
|
520
|
+
const targetBlockId = state.referenceBlockId ?? state.position.parentId;
|
|
521
|
+
if (!targetBlockId) return;
|
|
522
|
+
setTimeout(() => {
|
|
523
|
+
scrollFieldIntoView(`content._values.${targetBlockId}`);
|
|
524
|
+
}, 150);
|
|
525
|
+
}
|
|
500
526
|
}
|
|
501
527
|
|
|
502
528
|
//#endregion
|