camox 0.66.0 → 0.67.0
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/features/content/components/MissingFromLocale.js +1 -1
- package/dist/features/page/UnplacedLayoutContent.js +141 -0
- package/dist/features/preview/components/ItemFieldsEditor.js +50 -44
- package/dist/features/preview/components/SelectionEditor.js +284 -231
- package/dist/features/preview/components/contentFieldSchema.js +5 -1
- package/dist/features/runtime/pageApp.js +24 -10
- package/dist/features/runtime/runtime.d.ts +13 -0
- package/dist/features/runtime/runtime.js +58 -2
- package/dist/features/studio/components/ContentFindings.js +397 -0
- package/dist/features/studio/components/Patrol.js +52 -34
- package/dist/features/studio/components/ReviewDraftSheet.js +4 -4
- package/dist/features/studio/components/Squareling.js +0 -9
- package/dist/features/studio/findingSentence.js +3 -5
- package/dist/features/studio/patrollerBio.js +0 -1
- package/dist/features/studio/reportSentence.js +0 -5
- package/dist/features/studio/workingSentence.js +0 -4
- package/dist/package.js +1 -1
- package/dist/studio.css +1 -1
- package/package.json +4 -4
|
@@ -11,8 +11,9 @@ import { SelectionViewCount, SidebarStackHeader, SidebarStackView } from "./Side
|
|
|
11
11
|
import { PreviewEditingOwnerContext } from "../previewSelection.js";
|
|
12
12
|
import { entityName } from "../entityName.js";
|
|
13
13
|
import { fieldTypesDictionary } from "../../../core/lib/fieldTypes.js";
|
|
14
|
+
import { ContentFindings, findingsHint, useContentFindings } from "../../studio/components/ContentFindings.js";
|
|
14
15
|
import { usePageRecordPlacer } from "../pageRecord.js";
|
|
15
|
-
import { contentFieldSchema } from "./contentFieldSchema.js";
|
|
16
|
+
import { contentFieldNames, contentFieldSchema } from "./contentFieldSchema.js";
|
|
16
17
|
import { useRepeatableItemActions } from "./useRepeatableItemActions.js";
|
|
17
18
|
import { ItemFieldsEditor, formatFieldName } from "./ItemFieldsEditor.js";
|
|
18
19
|
import { LinkFieldEditor } from "./LinkFieldEditor.js";
|
|
@@ -139,7 +140,7 @@ const SelectionEditor = (t0) => {
|
|
|
139
140
|
return t2;
|
|
140
141
|
};
|
|
141
142
|
const SelectionEditorContent = (t0) => {
|
|
142
|
-
const $ = c(
|
|
143
|
+
const $ = c(138);
|
|
143
144
|
const { owner, pageCrumb } = t0;
|
|
144
145
|
let t1;
|
|
145
146
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -314,131 +315,172 @@ const SelectionEditorContent = (t0) => {
|
|
|
314
315
|
$[43] = t17;
|
|
315
316
|
} else t17 = $[43];
|
|
316
317
|
const { recordView, viewSelection, recordCrumbs } = useRecordView(t17);
|
|
318
|
+
const recordId = recordView?.record.id;
|
|
319
|
+
let t18;
|
|
320
|
+
bb1: {
|
|
321
|
+
if (recordId !== void 0) {
|
|
322
|
+
let t19;
|
|
323
|
+
if ($[44] !== recordId) {
|
|
324
|
+
t19 = {
|
|
325
|
+
entity: "record",
|
|
326
|
+
id: recordId
|
|
327
|
+
};
|
|
328
|
+
$[44] = recordId;
|
|
329
|
+
$[45] = t19;
|
|
330
|
+
} else t19 = $[45];
|
|
331
|
+
t18 = t19;
|
|
332
|
+
break bb1;
|
|
333
|
+
}
|
|
334
|
+
if (currentItemId != null) {
|
|
335
|
+
let t19;
|
|
336
|
+
if ($[46] !== currentItemId) {
|
|
337
|
+
t19 = {
|
|
338
|
+
entity: "repeatableItem",
|
|
339
|
+
id: currentItemId
|
|
340
|
+
};
|
|
341
|
+
$[46] = currentItemId;
|
|
342
|
+
$[47] = t19;
|
|
343
|
+
} else t19 = $[47];
|
|
344
|
+
t18 = t19;
|
|
345
|
+
break bb1;
|
|
346
|
+
}
|
|
347
|
+
let t19;
|
|
348
|
+
if ($[48] !== block) {
|
|
349
|
+
t19 = block ? {
|
|
350
|
+
entity: "block",
|
|
351
|
+
id: block.id
|
|
352
|
+
} : null;
|
|
353
|
+
$[48] = block;
|
|
354
|
+
$[49] = t19;
|
|
355
|
+
} else t19 = $[49];
|
|
356
|
+
t18 = t19;
|
|
357
|
+
}
|
|
358
|
+
const findings = useContentFindings(t18);
|
|
317
359
|
const selectedField = recordView?.selection.type === "record-field" ? {
|
|
318
360
|
fieldName: recordView.selection.recordFieldName,
|
|
319
361
|
fieldType: recordView.selection.recordFieldType
|
|
320
362
|
} : selectionField(viewSelection);
|
|
321
|
-
let t18;
|
|
322
|
-
if ($[44] !== blockDef) {
|
|
323
|
-
t18 = blockDef ? getSettingsFields(blockDef.settingsSchema) : [];
|
|
324
|
-
$[44] = blockDef;
|
|
325
|
-
$[45] = t18;
|
|
326
|
-
} else t18 = $[45];
|
|
327
|
-
const settingsFields = t18;
|
|
328
363
|
let t19;
|
|
329
|
-
|
|
364
|
+
if ($[50] !== blockDef) {
|
|
365
|
+
t19 = blockDef ? getSettingsFields(blockDef.settingsSchema) : [];
|
|
366
|
+
$[50] = blockDef;
|
|
367
|
+
$[51] = t19;
|
|
368
|
+
} else t19 = $[51];
|
|
369
|
+
const settingsFields = t19;
|
|
370
|
+
let t20;
|
|
371
|
+
bb2: {
|
|
330
372
|
if (!blockDef || currentItemId == null) {
|
|
331
|
-
|
|
332
|
-
break
|
|
373
|
+
t20 = null;
|
|
374
|
+
break bb2;
|
|
333
375
|
}
|
|
334
|
-
let
|
|
335
|
-
if ($[
|
|
336
|
-
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
} else
|
|
342
|
-
|
|
376
|
+
let t21;
|
|
377
|
+
if ($[52] !== blockDef.contentSchema || $[53] !== currentItemId || $[54] !== itemsMap) {
|
|
378
|
+
t21 = getArraySchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
|
|
379
|
+
$[52] = blockDef.contentSchema;
|
|
380
|
+
$[53] = currentItemId;
|
|
381
|
+
$[54] = itemsMap;
|
|
382
|
+
$[55] = t21;
|
|
383
|
+
} else t21 = $[55];
|
|
384
|
+
t20 = t21;
|
|
343
385
|
}
|
|
344
|
-
const itemArraySchema =
|
|
345
|
-
const
|
|
346
|
-
let
|
|
347
|
-
if ($[
|
|
348
|
-
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
} else
|
|
352
|
-
const itemSettingsFields =
|
|
386
|
+
const itemArraySchema = t20;
|
|
387
|
+
const t21 = itemArraySchema?.itemSettingsSchema;
|
|
388
|
+
let t22;
|
|
389
|
+
if ($[56] !== t21) {
|
|
390
|
+
t22 = getSettingsFields(t21);
|
|
391
|
+
$[56] = t21;
|
|
392
|
+
$[57] = t22;
|
|
393
|
+
} else t22 = $[57];
|
|
394
|
+
const itemSettingsFields = t22;
|
|
353
395
|
const recordSchema = recordView?.collection.contentSchema;
|
|
354
396
|
const recordInList = recordView?.inList === true;
|
|
355
|
-
let
|
|
356
|
-
|
|
397
|
+
let t23;
|
|
398
|
+
bb3: {
|
|
357
399
|
if (recordSchema) {
|
|
358
|
-
|
|
359
|
-
break
|
|
400
|
+
t23 = recordSchema;
|
|
401
|
+
break bb3;
|
|
360
402
|
}
|
|
361
403
|
if (!blockDef) {
|
|
362
|
-
|
|
363
|
-
break
|
|
404
|
+
t23 = null;
|
|
405
|
+
break bb3;
|
|
364
406
|
}
|
|
365
407
|
if (currentItemId == null) {
|
|
366
|
-
|
|
367
|
-
break
|
|
408
|
+
t23 = blockDef.contentSchema;
|
|
409
|
+
break bb3;
|
|
368
410
|
}
|
|
369
|
-
let
|
|
370
|
-
if ($[
|
|
371
|
-
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
} else
|
|
377
|
-
|
|
411
|
+
let t24;
|
|
412
|
+
if ($[58] !== blockDef.contentSchema || $[59] !== currentItemId || $[60] !== itemsMap) {
|
|
413
|
+
t24 = getSchemaForItem(blockDef.contentSchema, currentItemId, itemsMap);
|
|
414
|
+
$[58] = blockDef.contentSchema;
|
|
415
|
+
$[59] = currentItemId;
|
|
416
|
+
$[60] = itemsMap;
|
|
417
|
+
$[61] = t24;
|
|
418
|
+
} else t24 = $[61];
|
|
419
|
+
t23 = t24;
|
|
378
420
|
}
|
|
379
|
-
const currentSchema =
|
|
380
|
-
let t23;
|
|
381
|
-
if ($[56] !== currentItemId || $[57] !== itemsMap) {
|
|
382
|
-
t23 = currentItemId != null ? itemsMap.get(currentItemId) : null;
|
|
383
|
-
$[56] = currentItemId;
|
|
384
|
-
$[57] = itemsMap;
|
|
385
|
-
$[58] = t23;
|
|
386
|
-
} else t23 = $[58];
|
|
387
|
-
const currentItem = t23;
|
|
388
|
-
const isItemLoading = currentItemId != null && !currentItem;
|
|
421
|
+
const currentSchema = t23;
|
|
389
422
|
let t24;
|
|
390
|
-
|
|
423
|
+
if ($[62] !== currentItemId || $[63] !== itemsMap) {
|
|
424
|
+
t24 = currentItemId != null ? itemsMap.get(currentItemId) : null;
|
|
425
|
+
$[62] = currentItemId;
|
|
426
|
+
$[63] = itemsMap;
|
|
427
|
+
$[64] = t24;
|
|
428
|
+
} else t24 = $[64];
|
|
429
|
+
const currentItem = t24;
|
|
430
|
+
const isItemLoading = currentItemId != null && !currentItem;
|
|
431
|
+
let t25;
|
|
432
|
+
bb4: {
|
|
391
433
|
if (!currentItem) {
|
|
392
|
-
|
|
393
|
-
break
|
|
434
|
+
t25 = 0;
|
|
435
|
+
break bb4;
|
|
394
436
|
}
|
|
395
437
|
let count = 0;
|
|
396
438
|
for (const it of itemsMap.values()) if (it.fieldName === currentItem.fieldName && it.parentItemId === currentItem.parentItemId) count++;
|
|
397
|
-
|
|
439
|
+
t25 = count;
|
|
398
440
|
}
|
|
399
|
-
const siblingCount =
|
|
400
|
-
const
|
|
401
|
-
const
|
|
402
|
-
const
|
|
403
|
-
const
|
|
404
|
-
let
|
|
405
|
-
if ($[
|
|
406
|
-
|
|
407
|
-
blockId:
|
|
408
|
-
fieldName:
|
|
409
|
-
parentItemId:
|
|
410
|
-
arraySchema:
|
|
441
|
+
const siblingCount = t25;
|
|
442
|
+
const t26 = block?.id ?? "";
|
|
443
|
+
const t27 = currentItem?.fieldName ?? "";
|
|
444
|
+
const t28 = currentItem?.parentItemId ?? null;
|
|
445
|
+
const t29 = itemArraySchema;
|
|
446
|
+
let t30;
|
|
447
|
+
if ($[65] !== siblingCount || $[66] !== t26 || $[67] !== t27 || $[68] !== t28 || $[69] !== t29) {
|
|
448
|
+
t30 = {
|
|
449
|
+
blockId: t26,
|
|
450
|
+
fieldName: t27,
|
|
451
|
+
parentItemId: t28,
|
|
452
|
+
arraySchema: t29,
|
|
411
453
|
siblingCount
|
|
412
454
|
};
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
} else
|
|
420
|
-
const { canAdd: canAddSibling, addItem: addSibling, canRemove: canRemoveCurrent, removeItem: removeCurrent } = useRepeatableItemActions(
|
|
455
|
+
$[65] = siblingCount;
|
|
456
|
+
$[66] = t26;
|
|
457
|
+
$[67] = t27;
|
|
458
|
+
$[68] = t28;
|
|
459
|
+
$[69] = t29;
|
|
460
|
+
$[70] = t30;
|
|
461
|
+
} else t30 = $[70];
|
|
462
|
+
const { canAdd: canAddSibling, addItem: addSibling, canRemove: canRemoveCurrent, removeItem: removeCurrent } = useRepeatableItemActions(t30);
|
|
421
463
|
const recordContent = recordView?.record.content;
|
|
422
464
|
const rawCurrentData = currentItem ? currentItem.content : block?.content ?? EMPTY_CONTENT;
|
|
423
|
-
let
|
|
424
|
-
|
|
465
|
+
let t31;
|
|
466
|
+
bb5: {
|
|
425
467
|
if (recordContent) {
|
|
426
|
-
let
|
|
427
|
-
if ($[
|
|
428
|
-
|
|
429
|
-
const [key, value] =
|
|
468
|
+
let t32;
|
|
469
|
+
if ($[71] !== recordContent || $[72] !== recordSchema) {
|
|
470
|
+
t32 = Object.fromEntries(Object.entries(recordContent).map((t33) => {
|
|
471
|
+
const [key, value] = t33;
|
|
430
472
|
return [key, editorAssetField(contentFieldSchema(recordSchema, key)?.fieldType, value)];
|
|
431
473
|
}));
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
} else
|
|
436
|
-
|
|
437
|
-
break
|
|
474
|
+
$[71] = recordContent;
|
|
475
|
+
$[72] = recordSchema;
|
|
476
|
+
$[73] = t32;
|
|
477
|
+
} else t32 = $[73];
|
|
478
|
+
t31 = t32;
|
|
479
|
+
break bb5;
|
|
438
480
|
}
|
|
439
|
-
let
|
|
440
|
-
if ($[
|
|
441
|
-
|
|
481
|
+
let t32;
|
|
482
|
+
if ($[74] !== filesMap) {
|
|
483
|
+
t32 = (marker) => {
|
|
442
484
|
const file = filesMap.get(marker._fileId);
|
|
443
485
|
return file ? {
|
|
444
486
|
url: file.url,
|
|
@@ -453,12 +495,12 @@ const SelectionEditorContent = (t0) => {
|
|
|
453
495
|
mimeType: ""
|
|
454
496
|
};
|
|
455
497
|
};
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
458
|
-
} else
|
|
459
|
-
const resolveFile =
|
|
498
|
+
$[74] = filesMap;
|
|
499
|
+
$[75] = t32;
|
|
500
|
+
} else t32 = $[75];
|
|
501
|
+
const resolveFile = t32;
|
|
460
502
|
let resolved_0;
|
|
461
|
-
if ($[
|
|
503
|
+
if ($[76] !== rawCurrentData || $[77] !== resolveFile) {
|
|
462
504
|
const resolveValue = (value_0) => {
|
|
463
505
|
if (isFileMarker(value_0)) return resolveFile(value_0);
|
|
464
506
|
if (Array.isArray(value_0)) return value_0.map(resolveValue);
|
|
@@ -472,13 +514,13 @@ const SelectionEditorContent = (t0) => {
|
|
|
472
514
|
};
|
|
473
515
|
resolved_0 = {};
|
|
474
516
|
for (const [key_0, value_1] of Object.entries(rawCurrentData)) resolved_0[key_0] = resolveValue(value_1);
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
} else resolved_0 = $[
|
|
479
|
-
|
|
517
|
+
$[76] = rawCurrentData;
|
|
518
|
+
$[77] = resolveFile;
|
|
519
|
+
$[78] = resolved_0;
|
|
520
|
+
} else resolved_0 = $[78];
|
|
521
|
+
t31 = resolved_0;
|
|
480
522
|
}
|
|
481
|
-
const currentData =
|
|
523
|
+
const currentData = t31;
|
|
482
524
|
const fieldInfo = selectedField ? {
|
|
483
525
|
...selectedField,
|
|
484
526
|
fieldType: contentFieldSchema(currentSchema, selectedField.fieldName)?.fieldType ?? selectedField.fieldType
|
|
@@ -499,75 +541,75 @@ const SelectionEditorContent = (t0) => {
|
|
|
499
541
|
const fieldIdPrefix = React.useId();
|
|
500
542
|
const blockIdForWrites = block?.id;
|
|
501
543
|
const recordForWrites = recordView?.record;
|
|
502
|
-
let
|
|
503
|
-
|
|
544
|
+
let t32;
|
|
545
|
+
bb6: {
|
|
504
546
|
if (recordForWrites) {
|
|
505
|
-
let
|
|
506
|
-
if ($[
|
|
507
|
-
|
|
547
|
+
let t33;
|
|
548
|
+
if ($[79] !== recordForWrites) {
|
|
549
|
+
t33 = {
|
|
508
550
|
kind: "record",
|
|
509
551
|
record: recordForWrites
|
|
510
552
|
};
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
} else
|
|
514
|
-
|
|
515
|
-
break
|
|
553
|
+
$[79] = recordForWrites;
|
|
554
|
+
$[80] = t33;
|
|
555
|
+
} else t33 = $[80];
|
|
556
|
+
t32 = t33;
|
|
557
|
+
break bb6;
|
|
516
558
|
}
|
|
517
559
|
if (blockIdForWrites == null) {
|
|
518
|
-
|
|
519
|
-
break
|
|
560
|
+
t32 = null;
|
|
561
|
+
break bb6;
|
|
520
562
|
}
|
|
521
563
|
if (currentItemId == null) {
|
|
522
|
-
let
|
|
523
|
-
if ($[
|
|
524
|
-
|
|
564
|
+
let t33;
|
|
565
|
+
if ($[81] !== blockIdForWrites) {
|
|
566
|
+
t33 = {
|
|
525
567
|
kind: "block",
|
|
526
568
|
blockId: blockIdForWrites
|
|
527
569
|
};
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
} else
|
|
531
|
-
|
|
532
|
-
break
|
|
570
|
+
$[81] = blockIdForWrites;
|
|
571
|
+
$[82] = t33;
|
|
572
|
+
} else t33 = $[82];
|
|
573
|
+
t32 = t33;
|
|
574
|
+
break bb6;
|
|
533
575
|
}
|
|
534
|
-
let
|
|
535
|
-
if ($[
|
|
536
|
-
|
|
576
|
+
let t33;
|
|
577
|
+
if ($[83] !== blockIdForWrites || $[84] !== currentItemId) {
|
|
578
|
+
t33 = {
|
|
537
579
|
kind: "item",
|
|
538
580
|
blockId: blockIdForWrites,
|
|
539
581
|
itemId: currentItemId
|
|
540
582
|
};
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
544
|
-
} else
|
|
545
|
-
|
|
583
|
+
$[83] = blockIdForWrites;
|
|
584
|
+
$[84] = currentItemId;
|
|
585
|
+
$[85] = t33;
|
|
586
|
+
} else t33 = $[85];
|
|
587
|
+
t32 = t33;
|
|
546
588
|
}
|
|
547
|
-
const writeField = useFieldWriter(
|
|
548
|
-
let
|
|
549
|
-
if ($[
|
|
550
|
-
|
|
551
|
-
$[
|
|
552
|
-
$[
|
|
553
|
-
$[
|
|
554
|
-
} else
|
|
555
|
-
const ancestorChain =
|
|
589
|
+
const writeField = useFieldWriter(t32, currentSchema);
|
|
590
|
+
let t33;
|
|
591
|
+
if ($[86] !== currentItemId || $[87] !== itemsMap) {
|
|
592
|
+
t33 = currentItemId != null ? buildAncestorChain(currentItemId, itemsMap) : [];
|
|
593
|
+
$[86] = currentItemId;
|
|
594
|
+
$[87] = itemsMap;
|
|
595
|
+
$[88] = t33;
|
|
596
|
+
} else t33 = $[88];
|
|
597
|
+
const ancestorChain = t33;
|
|
556
598
|
if (!currentSchema || !recordView && (!block || !blockDef)) {
|
|
557
|
-
let
|
|
558
|
-
if ($[
|
|
559
|
-
|
|
599
|
+
let t34;
|
|
600
|
+
if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
|
|
601
|
+
t34 = /* @__PURE__ */ jsxs("div", {
|
|
560
602
|
className: "text-muted-foreground flex flex-1 items-center justify-center px-2 text-sm",
|
|
561
603
|
children: [/* @__PURE__ */ jsx(Spinner, { className: "mr-2 size-3.5" }), " Loading block..."]
|
|
562
604
|
});
|
|
563
|
-
$[
|
|
564
|
-
} else
|
|
565
|
-
return
|
|
605
|
+
$[89] = t34;
|
|
606
|
+
} else t34 = $[89];
|
|
607
|
+
return t34;
|
|
566
608
|
}
|
|
567
609
|
const fieldHasOwnView = fieldInfo ? fieldTypesDictionary[fieldInfo.fieldType].hasOwnView : false;
|
|
568
|
-
let
|
|
569
|
-
if ($[
|
|
570
|
-
|
|
610
|
+
let t34;
|
|
611
|
+
if ($[90] !== ancestorChain || $[91] !== currentItemId || $[92] !== fieldHasOwnView || $[93] !== itemsMap || $[94] !== owner || $[95] !== recordView) {
|
|
612
|
+
t34 = (block_0, blockDef_0) => [{
|
|
571
613
|
key: "block",
|
|
572
614
|
label: blockDef_0.title,
|
|
573
615
|
isCurrent: ancestorChain.length === 0 && !fieldHasOwnView && !recordView,
|
|
@@ -622,15 +664,15 @@ const SelectionEditorContent = (t0) => {
|
|
|
622
664
|
itemId: ancestor.id
|
|
623
665
|
})
|
|
624
666
|
}])];
|
|
625
|
-
$[
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
632
|
-
} else
|
|
633
|
-
const blockCrumbs =
|
|
667
|
+
$[90] = ancestorChain;
|
|
668
|
+
$[91] = currentItemId;
|
|
669
|
+
$[92] = fieldHasOwnView;
|
|
670
|
+
$[93] = itemsMap;
|
|
671
|
+
$[94] = owner;
|
|
672
|
+
$[95] = recordView;
|
|
673
|
+
$[96] = t34;
|
|
674
|
+
} else t34 = $[96];
|
|
675
|
+
const blockCrumbs = t34;
|
|
634
676
|
const navigationItems = [
|
|
635
677
|
{
|
|
636
678
|
key: "page",
|
|
@@ -653,10 +695,10 @@ const SelectionEditorContent = (t0) => {
|
|
|
653
695
|
const firstDepth = pageCrumb ? 1 : 2;
|
|
654
696
|
const front = stackedItems[stackedItems.length - 1];
|
|
655
697
|
const rows = stackRows(stackedItems, pageCrumb ? 1 : 0);
|
|
656
|
-
const
|
|
657
|
-
const
|
|
658
|
-
const
|
|
659
|
-
const
|
|
698
|
+
const t35 = "Selection path";
|
|
699
|
+
const t36 = "shrink-0";
|
|
700
|
+
const t37 = "flex flex-col";
|
|
701
|
+
const t38 = rows.map((row, index) => {
|
|
660
702
|
const distance = rows.length - 1 - index;
|
|
661
703
|
const covered = distance > 0;
|
|
662
704
|
const depth = firstDepth + row.index;
|
|
@@ -695,27 +737,32 @@ const SelectionEditorContent = (t0) => {
|
|
|
695
737
|
})
|
|
696
738
|
}, item_0.key);
|
|
697
739
|
});
|
|
698
|
-
let
|
|
699
|
-
if ($[
|
|
700
|
-
|
|
701
|
-
"aria-label":
|
|
702
|
-
className:
|
|
740
|
+
let t39;
|
|
741
|
+
if ($[97] !== t38) {
|
|
742
|
+
t39 = /* @__PURE__ */ jsx("nav", {
|
|
743
|
+
"aria-label": t35,
|
|
744
|
+
className: t36,
|
|
703
745
|
children: /* @__PURE__ */ jsx("ol", {
|
|
704
|
-
className:
|
|
705
|
-
children:
|
|
746
|
+
className: t37,
|
|
747
|
+
children: t38
|
|
706
748
|
})
|
|
707
749
|
});
|
|
708
|
-
$[
|
|
709
|
-
$[
|
|
710
|
-
} else
|
|
711
|
-
const
|
|
712
|
-
const
|
|
713
|
-
let
|
|
714
|
-
if ($[
|
|
715
|
-
|
|
750
|
+
$[97] = t38;
|
|
751
|
+
$[98] = t39;
|
|
752
|
+
} else t39 = $[98];
|
|
753
|
+
const t40 = `${block?.id ?? "layout"}:${front?.key}`;
|
|
754
|
+
const t41 = firstDepth + stackedItems.length - 1;
|
|
755
|
+
let t42;
|
|
756
|
+
if ($[99] !== addSibling || $[100] !== assetAccept || $[101] !== assetFieldName || $[102] !== assetType || $[103] !== block || $[104] !== blockDef || $[105] !== canAddSibling || $[106] !== canRemoveCurrent || $[107] !== currentData || $[108] !== currentItem || $[109] !== currentItemId || $[110] !== currentSchema || $[111] !== fieldHasOwnView || $[112] !== fieldIdPrefix || $[113] !== fieldInfo || $[114] !== filesMap || $[115] !== findings || $[116] !== isItemLoading || $[117] !== isMultipleAsset || $[118] !== isViewingAsset || $[119] !== isViewingLink || $[120] !== itemArraySchema || $[121] !== itemSettingsFields || $[122] !== itemsMap || $[123] !== linkFieldName || $[124] !== owner || $[125] !== recordInList || $[126] !== recordView || $[127] !== removeCurrent || $[128] !== send || $[129] !== settingsFields || $[130] !== updateRepeatableSettings || $[131] !== updateSettings || $[132] !== writeField) {
|
|
757
|
+
t42 = /* @__PURE__ */ jsx("div", { children: isItemLoading ? /* @__PURE__ */ jsx("div", {
|
|
716
758
|
className: "flex h-full items-center justify-center py-12",
|
|
717
759
|
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
718
760
|
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
761
|
+
!fieldInfo && /* @__PURE__ */ jsx(ContentFindings, {
|
|
762
|
+
view: findings,
|
|
763
|
+
fields: contentFieldNames(currentSchema),
|
|
764
|
+
className: "space-y-2 px-2 pt-4"
|
|
765
|
+
}),
|
|
719
766
|
!fieldHasOwnView && !recordView && currentItemId != null && currentItem && /* @__PURE__ */ jsxs(SidebarSection, {
|
|
720
767
|
divider: "bottom",
|
|
721
768
|
"aria-label": "List actions",
|
|
@@ -915,60 +962,66 @@ const SelectionEditorContent = (t0) => {
|
|
|
915
962
|
itemsMap,
|
|
916
963
|
references: recordView ? recordView.record.references : (currentItem ?? block)?.references,
|
|
917
964
|
placement: recordView ? recordPlacement(recordView.selection) : void 0,
|
|
918
|
-
fieldIdPrefix
|
|
919
|
-
|
|
965
|
+
fieldIdPrefix,
|
|
966
|
+
fieldHint: (name) => findingsHint(findings, name)
|
|
967
|
+
}, `${block?.id ?? "layout"}-${recordView ? `record-${recordView.record.id}` : currentItemId ?? "block"}-${fieldInfo?.fieldName ?? "fields"}`),
|
|
968
|
+
fieldInfo && /* @__PURE__ */ jsx(ContentFindings, {
|
|
969
|
+
view: findings,
|
|
970
|
+
field: fieldInfo.fieldName
|
|
971
|
+
})
|
|
920
972
|
] }) });
|
|
921
|
-
$[
|
|
922
|
-
$[
|
|
923
|
-
$[
|
|
924
|
-
$[
|
|
925
|
-
$[
|
|
926
|
-
$[
|
|
927
|
-
$[
|
|
928
|
-
$[
|
|
929
|
-
$[
|
|
930
|
-
$[
|
|
931
|
-
$[
|
|
932
|
-
$[
|
|
933
|
-
$[
|
|
934
|
-
$[
|
|
935
|
-
$[
|
|
936
|
-
$[
|
|
937
|
-
$[
|
|
938
|
-
$[
|
|
939
|
-
$[
|
|
940
|
-
$[
|
|
941
|
-
$[
|
|
942
|
-
$[
|
|
943
|
-
$[
|
|
944
|
-
$[
|
|
945
|
-
$[
|
|
946
|
-
$[
|
|
947
|
-
$[
|
|
948
|
-
$[
|
|
949
|
-
$[
|
|
950
|
-
$[
|
|
951
|
-
$[
|
|
952
|
-
$[
|
|
953
|
-
$[
|
|
954
|
-
$[
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
973
|
+
$[99] = addSibling;
|
|
974
|
+
$[100] = assetAccept;
|
|
975
|
+
$[101] = assetFieldName;
|
|
976
|
+
$[102] = assetType;
|
|
977
|
+
$[103] = block;
|
|
978
|
+
$[104] = blockDef;
|
|
979
|
+
$[105] = canAddSibling;
|
|
980
|
+
$[106] = canRemoveCurrent;
|
|
981
|
+
$[107] = currentData;
|
|
982
|
+
$[108] = currentItem;
|
|
983
|
+
$[109] = currentItemId;
|
|
984
|
+
$[110] = currentSchema;
|
|
985
|
+
$[111] = fieldHasOwnView;
|
|
986
|
+
$[112] = fieldIdPrefix;
|
|
987
|
+
$[113] = fieldInfo;
|
|
988
|
+
$[114] = filesMap;
|
|
989
|
+
$[115] = findings;
|
|
990
|
+
$[116] = isItemLoading;
|
|
991
|
+
$[117] = isMultipleAsset;
|
|
992
|
+
$[118] = isViewingAsset;
|
|
993
|
+
$[119] = isViewingLink;
|
|
994
|
+
$[120] = itemArraySchema;
|
|
995
|
+
$[121] = itemSettingsFields;
|
|
996
|
+
$[122] = itemsMap;
|
|
997
|
+
$[123] = linkFieldName;
|
|
998
|
+
$[124] = owner;
|
|
999
|
+
$[125] = recordInList;
|
|
1000
|
+
$[126] = recordView;
|
|
1001
|
+
$[127] = removeCurrent;
|
|
1002
|
+
$[128] = send;
|
|
1003
|
+
$[129] = settingsFields;
|
|
1004
|
+
$[130] = updateRepeatableSettings;
|
|
1005
|
+
$[131] = updateSettings;
|
|
1006
|
+
$[132] = writeField;
|
|
1007
|
+
$[133] = t42;
|
|
1008
|
+
} else t42 = $[133];
|
|
1009
|
+
let t43;
|
|
1010
|
+
if ($[134] !== t40 || $[135] !== t41 || $[136] !== t42) {
|
|
1011
|
+
t43 = /* @__PURE__ */ jsx(SidebarStackView, {
|
|
1012
|
+
depth: t41,
|
|
960
1013
|
className: "relative min-w-0 overflow-x-hidden overflow-y-auto",
|
|
961
|
-
children:
|
|
962
|
-
},
|
|
963
|
-
$[
|
|
964
|
-
$[
|
|
965
|
-
$[
|
|
966
|
-
$[
|
|
967
|
-
} else
|
|
1014
|
+
children: t42
|
|
1015
|
+
}, t40);
|
|
1016
|
+
$[134] = t40;
|
|
1017
|
+
$[135] = t41;
|
|
1018
|
+
$[136] = t42;
|
|
1019
|
+
$[137] = t43;
|
|
1020
|
+
} else t43 = $[137];
|
|
968
1021
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
969
1022
|
/* @__PURE__ */ jsx(SelectionViewCount, { count: rows.length }),
|
|
970
|
-
|
|
971
|
-
|
|
1023
|
+
t39,
|
|
1024
|
+
t43
|
|
972
1025
|
] });
|
|
973
1026
|
};
|
|
974
1027
|
function _temp(i) {
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
function contentFieldSchema(schema, fieldName) {
|
|
4
4
|
return schema?.properties?.[fieldName];
|
|
5
5
|
}
|
|
6
|
+
/** The names of a block, repeater item or collection content schema's fields. */
|
|
7
|
+
function contentFieldNames(schema) {
|
|
8
|
+
return Object.keys(schema?.properties ?? {});
|
|
9
|
+
}
|
|
6
10
|
|
|
7
11
|
//#endregion
|
|
8
|
-
export { contentFieldSchema };
|
|
12
|
+
export { contentFieldNames, contentFieldSchema };
|