@squiz/dx-page-contents-lib 1.70.2 → 1.70.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/lib/layouts/custom-layout.d.ts +694 -0
- package/lib/layouts/custom-layout.js +32 -0
- package/lib/layouts/custom-layout.js.map +1 -0
- package/lib/layouts/index.d.ts +654 -0
- package/lib/layouts/index.js +4 -1
- package/lib/layouts/index.js.map +1 -1
- package/lib/mocks/PageContentsHelpers.d.ts +837 -0
- package/lib/mocks/PageContentsHelpers.js +40 -1
- package/lib/mocks/PageContentsHelpers.js.map +1 -1
- package/lib/page-contents-lib.js +43 -6
- package/lib/page-contents-lib.js.map +1 -1
- package/lib/page-contents-lib.spec.js +52 -0
- package/lib/page-contents-lib.spec.js.map +1 -1
- package/lib/resolvers/create-variant-resolver.js +54 -41
- package/lib/resolvers/create-variant-resolver.js.map +1 -1
- package/lib/resolvers/create-variant-resolver.spec.js +33 -0
- package/lib/resolvers/create-variant-resolver.spec.js.map +1 -1
- package/package.json +2 -1
|
@@ -2355,6 +2355,657 @@ declare const PageContentsResolved: z.ZodObject<{
|
|
|
2355
2355
|
})[];
|
|
2356
2356
|
};
|
|
2357
2357
|
name: "two-column";
|
|
2358
|
+
}>, z.ZodObject<{
|
|
2359
|
+
name: z.ZodLiteral<"custom-layout">;
|
|
2360
|
+
config: z.ZodObject<{
|
|
2361
|
+
rootWrapper: z.ZodObject<{
|
|
2362
|
+
tag: z.ZodString;
|
|
2363
|
+
classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2364
|
+
}, "strip", z.ZodTypeAny, {
|
|
2365
|
+
tag: string;
|
|
2366
|
+
classes?: string[] | undefined;
|
|
2367
|
+
}, {
|
|
2368
|
+
tag: string;
|
|
2369
|
+
classes?: string[] | undefined;
|
|
2370
|
+
}>;
|
|
2371
|
+
nodeWrapper: z.ZodOptional<z.ZodObject<{
|
|
2372
|
+
tag: z.ZodString;
|
|
2373
|
+
classes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2374
|
+
}, "strip", z.ZodTypeAny, {
|
|
2375
|
+
tag: string;
|
|
2376
|
+
classes?: string[] | undefined;
|
|
2377
|
+
}, {
|
|
2378
|
+
tag: string;
|
|
2379
|
+
classes?: string[] | undefined;
|
|
2380
|
+
}>>;
|
|
2381
|
+
}, "strip", z.ZodTypeAny, {
|
|
2382
|
+
rootWrapper: {
|
|
2383
|
+
tag: string;
|
|
2384
|
+
classes?: string[] | undefined;
|
|
2385
|
+
};
|
|
2386
|
+
nodeWrapper?: {
|
|
2387
|
+
tag: string;
|
|
2388
|
+
classes?: string[] | undefined;
|
|
2389
|
+
} | undefined;
|
|
2390
|
+
}, {
|
|
2391
|
+
rootWrapper: {
|
|
2392
|
+
tag: string;
|
|
2393
|
+
classes?: string[] | undefined;
|
|
2394
|
+
};
|
|
2395
|
+
nodeWrapper?: {
|
|
2396
|
+
tag: string;
|
|
2397
|
+
classes?: string[] | undefined;
|
|
2398
|
+
} | undefined;
|
|
2399
|
+
}>;
|
|
2400
|
+
content: z.ZodObject<{
|
|
2401
|
+
main: z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodType<{
|
|
2402
|
+
value: string;
|
|
2403
|
+
type: "text";
|
|
2404
|
+
} | {
|
|
2405
|
+
type: "matrix-image";
|
|
2406
|
+
matrixDomain: string;
|
|
2407
|
+
matrixAssetId: string;
|
|
2408
|
+
attributes?: (Record<string, string> & {
|
|
2409
|
+
src?: undefined;
|
|
2410
|
+
}) | undefined;
|
|
2411
|
+
formattingOptions?: {
|
|
2412
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2413
|
+
} | undefined;
|
|
2414
|
+
matrixIdentifier?: string | undefined;
|
|
2415
|
+
} | {
|
|
2416
|
+
type: "dam-image";
|
|
2417
|
+
damSystemType: "bynder";
|
|
2418
|
+
damSystemIdentifier: string;
|
|
2419
|
+
damObjectId: string;
|
|
2420
|
+
attributes?: (Record<string, string> & {
|
|
2421
|
+
src?: undefined;
|
|
2422
|
+
}) | undefined;
|
|
2423
|
+
formattingOptions?: {
|
|
2424
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2425
|
+
} | undefined;
|
|
2426
|
+
damAdditional?: {
|
|
2427
|
+
variant?: string | undefined;
|
|
2428
|
+
} | undefined;
|
|
2429
|
+
} | {
|
|
2430
|
+
type: "component";
|
|
2431
|
+
componentId: string;
|
|
2432
|
+
componentSet: string;
|
|
2433
|
+
componentType?: "server" | "edge" | undefined;
|
|
2434
|
+
contentItem?: {
|
|
2435
|
+
id: string;
|
|
2436
|
+
} | {
|
|
2437
|
+
content: Record<string, unknown>;
|
|
2438
|
+
schemaName: string;
|
|
2439
|
+
} | undefined;
|
|
2440
|
+
} | (({
|
|
2441
|
+
type: "tag";
|
|
2442
|
+
tag: string;
|
|
2443
|
+
attributes?: Record<string, string> | undefined;
|
|
2444
|
+
font?: {
|
|
2445
|
+
bold?: boolean | undefined;
|
|
2446
|
+
italics?: boolean | undefined;
|
|
2447
|
+
underline?: boolean | undefined;
|
|
2448
|
+
color?: string | undefined;
|
|
2449
|
+
size?: string | undefined;
|
|
2450
|
+
fontFamily?: string | undefined;
|
|
2451
|
+
} | undefined;
|
|
2452
|
+
formattingOptions?: {
|
|
2453
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2454
|
+
} | undefined;
|
|
2455
|
+
} | {
|
|
2456
|
+
type: "fragment";
|
|
2457
|
+
} | {
|
|
2458
|
+
type: "link-to-matrix-asset";
|
|
2459
|
+
matrixDomain: string;
|
|
2460
|
+
matrixAssetId: string;
|
|
2461
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2462
|
+
attributes?: (Record<string, string> & {
|
|
2463
|
+
target?: undefined;
|
|
2464
|
+
href?: undefined;
|
|
2465
|
+
}) | undefined;
|
|
2466
|
+
formattingOptions?: {
|
|
2467
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2468
|
+
} | undefined;
|
|
2469
|
+
matrixIdentifier?: string | undefined;
|
|
2470
|
+
}) & {
|
|
2471
|
+
children: LayoutContentNodes[];
|
|
2472
|
+
}), z.ZodTypeDef, {
|
|
2473
|
+
value: string;
|
|
2474
|
+
type: "text";
|
|
2475
|
+
} | {
|
|
2476
|
+
type: "tag";
|
|
2477
|
+
tag: string;
|
|
2478
|
+
attributes?: Record<string, string> | undefined;
|
|
2479
|
+
font?: {
|
|
2480
|
+
bold?: boolean | undefined;
|
|
2481
|
+
italics?: boolean | undefined;
|
|
2482
|
+
underline?: boolean | undefined;
|
|
2483
|
+
color?: string | undefined;
|
|
2484
|
+
size?: string | undefined;
|
|
2485
|
+
fontFamily?: string | undefined;
|
|
2486
|
+
} | undefined;
|
|
2487
|
+
formattingOptions?: {
|
|
2488
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2489
|
+
} | undefined;
|
|
2490
|
+
} | {
|
|
2491
|
+
type: "fragment";
|
|
2492
|
+
} | {
|
|
2493
|
+
type: "link-to-matrix-asset";
|
|
2494
|
+
matrixDomain: string;
|
|
2495
|
+
matrixAssetId: string;
|
|
2496
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2497
|
+
attributes?: (Record<string, string> & {
|
|
2498
|
+
target?: undefined;
|
|
2499
|
+
href?: undefined;
|
|
2500
|
+
}) | undefined;
|
|
2501
|
+
formattingOptions?: {
|
|
2502
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2503
|
+
} | undefined;
|
|
2504
|
+
matrixIdentifier?: string | undefined;
|
|
2505
|
+
} | {
|
|
2506
|
+
type: "matrix-image";
|
|
2507
|
+
matrixDomain: string;
|
|
2508
|
+
matrixAssetId: string;
|
|
2509
|
+
attributes?: (Record<string, string> & {
|
|
2510
|
+
src?: undefined;
|
|
2511
|
+
}) | undefined;
|
|
2512
|
+
formattingOptions?: {
|
|
2513
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2514
|
+
} | undefined;
|
|
2515
|
+
matrixIdentifier?: string | undefined;
|
|
2516
|
+
} | {
|
|
2517
|
+
type: "dam-image";
|
|
2518
|
+
damSystemType: "bynder";
|
|
2519
|
+
damSystemIdentifier: string;
|
|
2520
|
+
damObjectId: string;
|
|
2521
|
+
attributes?: (Record<string, string> & {
|
|
2522
|
+
src?: undefined;
|
|
2523
|
+
}) | undefined;
|
|
2524
|
+
formattingOptions?: {
|
|
2525
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2526
|
+
} | undefined;
|
|
2527
|
+
damAdditional?: {
|
|
2528
|
+
variant?: string | undefined;
|
|
2529
|
+
} | undefined;
|
|
2530
|
+
} | {
|
|
2531
|
+
type: "component";
|
|
2532
|
+
componentId: string;
|
|
2533
|
+
componentSet: string;
|
|
2534
|
+
componentType?: "server" | "edge" | undefined;
|
|
2535
|
+
contentItem?: {
|
|
2536
|
+
id: string;
|
|
2537
|
+
} | {
|
|
2538
|
+
content: Record<string, unknown>;
|
|
2539
|
+
schemaName: string;
|
|
2540
|
+
} | undefined;
|
|
2541
|
+
}>, z.ZodType<LayoutVariationNode, z.ZodTypeDef, {
|
|
2542
|
+
type: "variation";
|
|
2543
|
+
default: {};
|
|
2544
|
+
}>]>, "many">, (LayoutVariationNode | ({
|
|
2545
|
+
value: string;
|
|
2546
|
+
type: "text";
|
|
2547
|
+
} | {
|
|
2548
|
+
type: "matrix-image";
|
|
2549
|
+
matrixDomain: string;
|
|
2550
|
+
matrixAssetId: string;
|
|
2551
|
+
attributes?: (Record<string, string> & {
|
|
2552
|
+
src?: undefined;
|
|
2553
|
+
}) | undefined;
|
|
2554
|
+
formattingOptions?: {
|
|
2555
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2556
|
+
} | undefined;
|
|
2557
|
+
matrixIdentifier?: string | undefined;
|
|
2558
|
+
} | {
|
|
2559
|
+
type: "dam-image";
|
|
2560
|
+
damSystemType: "bynder";
|
|
2561
|
+
damSystemIdentifier: string;
|
|
2562
|
+
damObjectId: string;
|
|
2563
|
+
attributes?: (Record<string, string> & {
|
|
2564
|
+
src?: undefined;
|
|
2565
|
+
}) | undefined;
|
|
2566
|
+
formattingOptions?: {
|
|
2567
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2568
|
+
} | undefined;
|
|
2569
|
+
damAdditional?: {
|
|
2570
|
+
variant?: string | undefined;
|
|
2571
|
+
} | undefined;
|
|
2572
|
+
} | {
|
|
2573
|
+
type: "component";
|
|
2574
|
+
componentId: string;
|
|
2575
|
+
componentSet: string;
|
|
2576
|
+
componentType?: "server" | "edge" | undefined;
|
|
2577
|
+
contentItem?: {
|
|
2578
|
+
id: string;
|
|
2579
|
+
} | {
|
|
2580
|
+
content: Record<string, unknown>;
|
|
2581
|
+
schemaName: string;
|
|
2582
|
+
} | undefined;
|
|
2583
|
+
} | (({
|
|
2584
|
+
type: "tag";
|
|
2585
|
+
tag: string;
|
|
2586
|
+
attributes?: Record<string, string> | undefined;
|
|
2587
|
+
font?: {
|
|
2588
|
+
bold?: boolean | undefined;
|
|
2589
|
+
italics?: boolean | undefined;
|
|
2590
|
+
underline?: boolean | undefined;
|
|
2591
|
+
color?: string | undefined;
|
|
2592
|
+
size?: string | undefined;
|
|
2593
|
+
fontFamily?: string | undefined;
|
|
2594
|
+
} | undefined;
|
|
2595
|
+
formattingOptions?: {
|
|
2596
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2597
|
+
} | undefined;
|
|
2598
|
+
} | {
|
|
2599
|
+
type: "fragment";
|
|
2600
|
+
} | {
|
|
2601
|
+
type: "link-to-matrix-asset";
|
|
2602
|
+
matrixDomain: string;
|
|
2603
|
+
matrixAssetId: string;
|
|
2604
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2605
|
+
attributes?: (Record<string, string> & {
|
|
2606
|
+
target?: undefined;
|
|
2607
|
+
href?: undefined;
|
|
2608
|
+
}) | undefined;
|
|
2609
|
+
formattingOptions?: {
|
|
2610
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2611
|
+
} | undefined;
|
|
2612
|
+
matrixIdentifier?: string | undefined;
|
|
2613
|
+
}) & {
|
|
2614
|
+
children: LayoutContentNodes[];
|
|
2615
|
+
})))[], ({
|
|
2616
|
+
value: string;
|
|
2617
|
+
type: "text";
|
|
2618
|
+
} | {
|
|
2619
|
+
type: "tag";
|
|
2620
|
+
tag: string;
|
|
2621
|
+
attributes?: Record<string, string> | undefined;
|
|
2622
|
+
font?: {
|
|
2623
|
+
bold?: boolean | undefined;
|
|
2624
|
+
italics?: boolean | undefined;
|
|
2625
|
+
underline?: boolean | undefined;
|
|
2626
|
+
color?: string | undefined;
|
|
2627
|
+
size?: string | undefined;
|
|
2628
|
+
fontFamily?: string | undefined;
|
|
2629
|
+
} | undefined;
|
|
2630
|
+
formattingOptions?: {
|
|
2631
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2632
|
+
} | undefined;
|
|
2633
|
+
} | {
|
|
2634
|
+
type: "fragment";
|
|
2635
|
+
} | {
|
|
2636
|
+
type: "link-to-matrix-asset";
|
|
2637
|
+
matrixDomain: string;
|
|
2638
|
+
matrixAssetId: string;
|
|
2639
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2640
|
+
attributes?: (Record<string, string> & {
|
|
2641
|
+
target?: undefined;
|
|
2642
|
+
href?: undefined;
|
|
2643
|
+
}) | undefined;
|
|
2644
|
+
formattingOptions?: {
|
|
2645
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2646
|
+
} | undefined;
|
|
2647
|
+
matrixIdentifier?: string | undefined;
|
|
2648
|
+
} | {
|
|
2649
|
+
type: "matrix-image";
|
|
2650
|
+
matrixDomain: string;
|
|
2651
|
+
matrixAssetId: string;
|
|
2652
|
+
attributes?: (Record<string, string> & {
|
|
2653
|
+
src?: undefined;
|
|
2654
|
+
}) | undefined;
|
|
2655
|
+
formattingOptions?: {
|
|
2656
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2657
|
+
} | undefined;
|
|
2658
|
+
matrixIdentifier?: string | undefined;
|
|
2659
|
+
} | {
|
|
2660
|
+
type: "dam-image";
|
|
2661
|
+
damSystemType: "bynder";
|
|
2662
|
+
damSystemIdentifier: string;
|
|
2663
|
+
damObjectId: string;
|
|
2664
|
+
attributes?: (Record<string, string> & {
|
|
2665
|
+
src?: undefined;
|
|
2666
|
+
}) | undefined;
|
|
2667
|
+
formattingOptions?: {
|
|
2668
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2669
|
+
} | undefined;
|
|
2670
|
+
damAdditional?: {
|
|
2671
|
+
variant?: string | undefined;
|
|
2672
|
+
} | undefined;
|
|
2673
|
+
} | {
|
|
2674
|
+
type: "component";
|
|
2675
|
+
componentId: string;
|
|
2676
|
+
componentSet: string;
|
|
2677
|
+
componentType?: "server" | "edge" | undefined;
|
|
2678
|
+
contentItem?: {
|
|
2679
|
+
id: string;
|
|
2680
|
+
} | {
|
|
2681
|
+
content: Record<string, unknown>;
|
|
2682
|
+
schemaName: string;
|
|
2683
|
+
} | undefined;
|
|
2684
|
+
} | {
|
|
2685
|
+
type: "variation";
|
|
2686
|
+
default: {};
|
|
2687
|
+
})[]>;
|
|
2688
|
+
}, "strip", z.ZodTypeAny, {
|
|
2689
|
+
main: (LayoutVariationNode | ({
|
|
2690
|
+
value: string;
|
|
2691
|
+
type: "text";
|
|
2692
|
+
} | {
|
|
2693
|
+
type: "matrix-image";
|
|
2694
|
+
matrixDomain: string;
|
|
2695
|
+
matrixAssetId: string;
|
|
2696
|
+
attributes?: (Record<string, string> & {
|
|
2697
|
+
src?: undefined;
|
|
2698
|
+
}) | undefined;
|
|
2699
|
+
formattingOptions?: {
|
|
2700
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2701
|
+
} | undefined;
|
|
2702
|
+
matrixIdentifier?: string | undefined;
|
|
2703
|
+
} | {
|
|
2704
|
+
type: "dam-image";
|
|
2705
|
+
damSystemType: "bynder";
|
|
2706
|
+
damSystemIdentifier: string;
|
|
2707
|
+
damObjectId: string;
|
|
2708
|
+
attributes?: (Record<string, string> & {
|
|
2709
|
+
src?: undefined;
|
|
2710
|
+
}) | undefined;
|
|
2711
|
+
formattingOptions?: {
|
|
2712
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2713
|
+
} | undefined;
|
|
2714
|
+
damAdditional?: {
|
|
2715
|
+
variant?: string | undefined;
|
|
2716
|
+
} | undefined;
|
|
2717
|
+
} | {
|
|
2718
|
+
type: "component";
|
|
2719
|
+
componentId: string;
|
|
2720
|
+
componentSet: string;
|
|
2721
|
+
componentType?: "server" | "edge" | undefined;
|
|
2722
|
+
contentItem?: {
|
|
2723
|
+
id: string;
|
|
2724
|
+
} | {
|
|
2725
|
+
content: Record<string, unknown>;
|
|
2726
|
+
schemaName: string;
|
|
2727
|
+
} | undefined;
|
|
2728
|
+
} | (({
|
|
2729
|
+
type: "tag";
|
|
2730
|
+
tag: string;
|
|
2731
|
+
attributes?: Record<string, string> | undefined;
|
|
2732
|
+
font?: {
|
|
2733
|
+
bold?: boolean | undefined;
|
|
2734
|
+
italics?: boolean | undefined;
|
|
2735
|
+
underline?: boolean | undefined;
|
|
2736
|
+
color?: string | undefined;
|
|
2737
|
+
size?: string | undefined;
|
|
2738
|
+
fontFamily?: string | undefined;
|
|
2739
|
+
} | undefined;
|
|
2740
|
+
formattingOptions?: {
|
|
2741
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2742
|
+
} | undefined;
|
|
2743
|
+
} | {
|
|
2744
|
+
type: "fragment";
|
|
2745
|
+
} | {
|
|
2746
|
+
type: "link-to-matrix-asset";
|
|
2747
|
+
matrixDomain: string;
|
|
2748
|
+
matrixAssetId: string;
|
|
2749
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2750
|
+
attributes?: (Record<string, string> & {
|
|
2751
|
+
target?: undefined;
|
|
2752
|
+
href?: undefined;
|
|
2753
|
+
}) | undefined;
|
|
2754
|
+
formattingOptions?: {
|
|
2755
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2756
|
+
} | undefined;
|
|
2757
|
+
matrixIdentifier?: string | undefined;
|
|
2758
|
+
}) & {
|
|
2759
|
+
children: LayoutContentNodes[];
|
|
2760
|
+
})))[];
|
|
2761
|
+
}, {
|
|
2762
|
+
main: ({
|
|
2763
|
+
value: string;
|
|
2764
|
+
type: "text";
|
|
2765
|
+
} | {
|
|
2766
|
+
type: "tag";
|
|
2767
|
+
tag: string;
|
|
2768
|
+
attributes?: Record<string, string> | undefined;
|
|
2769
|
+
font?: {
|
|
2770
|
+
bold?: boolean | undefined;
|
|
2771
|
+
italics?: boolean | undefined;
|
|
2772
|
+
underline?: boolean | undefined;
|
|
2773
|
+
color?: string | undefined;
|
|
2774
|
+
size?: string | undefined;
|
|
2775
|
+
fontFamily?: string | undefined;
|
|
2776
|
+
} | undefined;
|
|
2777
|
+
formattingOptions?: {
|
|
2778
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2779
|
+
} | undefined;
|
|
2780
|
+
} | {
|
|
2781
|
+
type: "fragment";
|
|
2782
|
+
} | {
|
|
2783
|
+
type: "link-to-matrix-asset";
|
|
2784
|
+
matrixDomain: string;
|
|
2785
|
+
matrixAssetId: string;
|
|
2786
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2787
|
+
attributes?: (Record<string, string> & {
|
|
2788
|
+
target?: undefined;
|
|
2789
|
+
href?: undefined;
|
|
2790
|
+
}) | undefined;
|
|
2791
|
+
formattingOptions?: {
|
|
2792
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2793
|
+
} | undefined;
|
|
2794
|
+
matrixIdentifier?: string | undefined;
|
|
2795
|
+
} | {
|
|
2796
|
+
type: "matrix-image";
|
|
2797
|
+
matrixDomain: string;
|
|
2798
|
+
matrixAssetId: string;
|
|
2799
|
+
attributes?: (Record<string, string> & {
|
|
2800
|
+
src?: undefined;
|
|
2801
|
+
}) | undefined;
|
|
2802
|
+
formattingOptions?: {
|
|
2803
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2804
|
+
} | undefined;
|
|
2805
|
+
matrixIdentifier?: string | undefined;
|
|
2806
|
+
} | {
|
|
2807
|
+
type: "dam-image";
|
|
2808
|
+
damSystemType: "bynder";
|
|
2809
|
+
damSystemIdentifier: string;
|
|
2810
|
+
damObjectId: string;
|
|
2811
|
+
attributes?: (Record<string, string> & {
|
|
2812
|
+
src?: undefined;
|
|
2813
|
+
}) | undefined;
|
|
2814
|
+
formattingOptions?: {
|
|
2815
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2816
|
+
} | undefined;
|
|
2817
|
+
damAdditional?: {
|
|
2818
|
+
variant?: string | undefined;
|
|
2819
|
+
} | undefined;
|
|
2820
|
+
} | {
|
|
2821
|
+
type: "component";
|
|
2822
|
+
componentId: string;
|
|
2823
|
+
componentSet: string;
|
|
2824
|
+
componentType?: "server" | "edge" | undefined;
|
|
2825
|
+
contentItem?: {
|
|
2826
|
+
id: string;
|
|
2827
|
+
} | {
|
|
2828
|
+
content: Record<string, unknown>;
|
|
2829
|
+
schemaName: string;
|
|
2830
|
+
} | undefined;
|
|
2831
|
+
} | {
|
|
2832
|
+
type: "variation";
|
|
2833
|
+
default: {};
|
|
2834
|
+
})[];
|
|
2835
|
+
}>;
|
|
2836
|
+
}, "strip", z.ZodTypeAny, {
|
|
2837
|
+
content: {
|
|
2838
|
+
main: (LayoutVariationNode | ({
|
|
2839
|
+
value: string;
|
|
2840
|
+
type: "text";
|
|
2841
|
+
} | {
|
|
2842
|
+
type: "matrix-image";
|
|
2843
|
+
matrixDomain: string;
|
|
2844
|
+
matrixAssetId: string;
|
|
2845
|
+
attributes?: (Record<string, string> & {
|
|
2846
|
+
src?: undefined;
|
|
2847
|
+
}) | undefined;
|
|
2848
|
+
formattingOptions?: {
|
|
2849
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2850
|
+
} | undefined;
|
|
2851
|
+
matrixIdentifier?: string | undefined;
|
|
2852
|
+
} | {
|
|
2853
|
+
type: "dam-image";
|
|
2854
|
+
damSystemType: "bynder";
|
|
2855
|
+
damSystemIdentifier: string;
|
|
2856
|
+
damObjectId: string;
|
|
2857
|
+
attributes?: (Record<string, string> & {
|
|
2858
|
+
src?: undefined;
|
|
2859
|
+
}) | undefined;
|
|
2860
|
+
formattingOptions?: {
|
|
2861
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2862
|
+
} | undefined;
|
|
2863
|
+
damAdditional?: {
|
|
2864
|
+
variant?: string | undefined;
|
|
2865
|
+
} | undefined;
|
|
2866
|
+
} | {
|
|
2867
|
+
type: "component";
|
|
2868
|
+
componentId: string;
|
|
2869
|
+
componentSet: string;
|
|
2870
|
+
componentType?: "server" | "edge" | undefined;
|
|
2871
|
+
contentItem?: {
|
|
2872
|
+
id: string;
|
|
2873
|
+
} | {
|
|
2874
|
+
content: Record<string, unknown>;
|
|
2875
|
+
schemaName: string;
|
|
2876
|
+
} | undefined;
|
|
2877
|
+
} | (({
|
|
2878
|
+
type: "tag";
|
|
2879
|
+
tag: string;
|
|
2880
|
+
attributes?: Record<string, string> | undefined;
|
|
2881
|
+
font?: {
|
|
2882
|
+
bold?: boolean | undefined;
|
|
2883
|
+
italics?: boolean | undefined;
|
|
2884
|
+
underline?: boolean | undefined;
|
|
2885
|
+
color?: string | undefined;
|
|
2886
|
+
size?: string | undefined;
|
|
2887
|
+
fontFamily?: string | undefined;
|
|
2888
|
+
} | undefined;
|
|
2889
|
+
formattingOptions?: {
|
|
2890
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2891
|
+
} | undefined;
|
|
2892
|
+
} | {
|
|
2893
|
+
type: "fragment";
|
|
2894
|
+
} | {
|
|
2895
|
+
type: "link-to-matrix-asset";
|
|
2896
|
+
matrixDomain: string;
|
|
2897
|
+
matrixAssetId: string;
|
|
2898
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2899
|
+
attributes?: (Record<string, string> & {
|
|
2900
|
+
target?: undefined;
|
|
2901
|
+
href?: undefined;
|
|
2902
|
+
}) | undefined;
|
|
2903
|
+
formattingOptions?: {
|
|
2904
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2905
|
+
} | undefined;
|
|
2906
|
+
matrixIdentifier?: string | undefined;
|
|
2907
|
+
}) & {
|
|
2908
|
+
children: LayoutContentNodes[];
|
|
2909
|
+
})))[];
|
|
2910
|
+
};
|
|
2911
|
+
name: "custom-layout";
|
|
2912
|
+
config: {
|
|
2913
|
+
rootWrapper: {
|
|
2914
|
+
tag: string;
|
|
2915
|
+
classes?: string[] | undefined;
|
|
2916
|
+
};
|
|
2917
|
+
nodeWrapper?: {
|
|
2918
|
+
tag: string;
|
|
2919
|
+
classes?: string[] | undefined;
|
|
2920
|
+
} | undefined;
|
|
2921
|
+
};
|
|
2922
|
+
}, {
|
|
2923
|
+
content: {
|
|
2924
|
+
main: ({
|
|
2925
|
+
value: string;
|
|
2926
|
+
type: "text";
|
|
2927
|
+
} | {
|
|
2928
|
+
type: "tag";
|
|
2929
|
+
tag: string;
|
|
2930
|
+
attributes?: Record<string, string> | undefined;
|
|
2931
|
+
font?: {
|
|
2932
|
+
bold?: boolean | undefined;
|
|
2933
|
+
italics?: boolean | undefined;
|
|
2934
|
+
underline?: boolean | undefined;
|
|
2935
|
+
color?: string | undefined;
|
|
2936
|
+
size?: string | undefined;
|
|
2937
|
+
fontFamily?: string | undefined;
|
|
2938
|
+
} | undefined;
|
|
2939
|
+
formattingOptions?: {
|
|
2940
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2941
|
+
} | undefined;
|
|
2942
|
+
} | {
|
|
2943
|
+
type: "fragment";
|
|
2944
|
+
} | {
|
|
2945
|
+
type: "link-to-matrix-asset";
|
|
2946
|
+
matrixDomain: string;
|
|
2947
|
+
matrixAssetId: string;
|
|
2948
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
2949
|
+
attributes?: (Record<string, string> & {
|
|
2950
|
+
target?: undefined;
|
|
2951
|
+
href?: undefined;
|
|
2952
|
+
}) | undefined;
|
|
2953
|
+
formattingOptions?: {
|
|
2954
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2955
|
+
} | undefined;
|
|
2956
|
+
matrixIdentifier?: string | undefined;
|
|
2957
|
+
} | {
|
|
2958
|
+
type: "matrix-image";
|
|
2959
|
+
matrixDomain: string;
|
|
2960
|
+
matrixAssetId: string;
|
|
2961
|
+
attributes?: (Record<string, string> & {
|
|
2962
|
+
src?: undefined;
|
|
2963
|
+
}) | undefined;
|
|
2964
|
+
formattingOptions?: {
|
|
2965
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2966
|
+
} | undefined;
|
|
2967
|
+
matrixIdentifier?: string | undefined;
|
|
2968
|
+
} | {
|
|
2969
|
+
type: "dam-image";
|
|
2970
|
+
damSystemType: "bynder";
|
|
2971
|
+
damSystemIdentifier: string;
|
|
2972
|
+
damObjectId: string;
|
|
2973
|
+
attributes?: (Record<string, string> & {
|
|
2974
|
+
src?: undefined;
|
|
2975
|
+
}) | undefined;
|
|
2976
|
+
formattingOptions?: {
|
|
2977
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
2978
|
+
} | undefined;
|
|
2979
|
+
damAdditional?: {
|
|
2980
|
+
variant?: string | undefined;
|
|
2981
|
+
} | undefined;
|
|
2982
|
+
} | {
|
|
2983
|
+
type: "component";
|
|
2984
|
+
componentId: string;
|
|
2985
|
+
componentSet: string;
|
|
2986
|
+
componentType?: "server" | "edge" | undefined;
|
|
2987
|
+
contentItem?: {
|
|
2988
|
+
id: string;
|
|
2989
|
+
} | {
|
|
2990
|
+
content: Record<string, unknown>;
|
|
2991
|
+
schemaName: string;
|
|
2992
|
+
} | undefined;
|
|
2993
|
+
} | {
|
|
2994
|
+
type: "variation";
|
|
2995
|
+
default: {};
|
|
2996
|
+
})[];
|
|
2997
|
+
};
|
|
2998
|
+
name: "custom-layout";
|
|
2999
|
+
config: {
|
|
3000
|
+
rootWrapper: {
|
|
3001
|
+
tag: string;
|
|
3002
|
+
classes?: string[] | undefined;
|
|
3003
|
+
};
|
|
3004
|
+
nodeWrapper?: {
|
|
3005
|
+
tag: string;
|
|
3006
|
+
classes?: string[] | undefined;
|
|
3007
|
+
} | undefined;
|
|
3008
|
+
};
|
|
2358
3009
|
}>]>, "many">;
|
|
2359
3010
|
}, "strip", z.ZodTypeAny, {
|
|
2360
3011
|
id: string;
|
|
@@ -2659,6 +3310,92 @@ declare const PageContentsResolved: z.ZodObject<{
|
|
|
2659
3310
|
})))[];
|
|
2660
3311
|
};
|
|
2661
3312
|
name: "two-column";
|
|
3313
|
+
} | {
|
|
3314
|
+
content: {
|
|
3315
|
+
main: (LayoutVariationNode | ({
|
|
3316
|
+
value: string;
|
|
3317
|
+
type: "text";
|
|
3318
|
+
} | {
|
|
3319
|
+
type: "matrix-image";
|
|
3320
|
+
matrixDomain: string;
|
|
3321
|
+
matrixAssetId: string;
|
|
3322
|
+
attributes?: (Record<string, string> & {
|
|
3323
|
+
src?: undefined;
|
|
3324
|
+
}) | undefined;
|
|
3325
|
+
formattingOptions?: {
|
|
3326
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3327
|
+
} | undefined;
|
|
3328
|
+
matrixIdentifier?: string | undefined;
|
|
3329
|
+
} | {
|
|
3330
|
+
type: "dam-image";
|
|
3331
|
+
damSystemType: "bynder";
|
|
3332
|
+
damSystemIdentifier: string;
|
|
3333
|
+
damObjectId: string;
|
|
3334
|
+
attributes?: (Record<string, string> & {
|
|
3335
|
+
src?: undefined;
|
|
3336
|
+
}) | undefined;
|
|
3337
|
+
formattingOptions?: {
|
|
3338
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3339
|
+
} | undefined;
|
|
3340
|
+
damAdditional?: {
|
|
3341
|
+
variant?: string | undefined;
|
|
3342
|
+
} | undefined;
|
|
3343
|
+
} | {
|
|
3344
|
+
type: "component";
|
|
3345
|
+
componentId: string;
|
|
3346
|
+
componentSet: string;
|
|
3347
|
+
componentType?: "server" | "edge" | undefined;
|
|
3348
|
+
contentItem?: {
|
|
3349
|
+
id: string;
|
|
3350
|
+
} | {
|
|
3351
|
+
content: Record<string, unknown>;
|
|
3352
|
+
schemaName: string;
|
|
3353
|
+
} | undefined;
|
|
3354
|
+
} | (({
|
|
3355
|
+
type: "tag";
|
|
3356
|
+
tag: string;
|
|
3357
|
+
attributes?: Record<string, string> | undefined;
|
|
3358
|
+
font?: {
|
|
3359
|
+
bold?: boolean | undefined;
|
|
3360
|
+
italics?: boolean | undefined;
|
|
3361
|
+
underline?: boolean | undefined;
|
|
3362
|
+
color?: string | undefined;
|
|
3363
|
+
size?: string | undefined;
|
|
3364
|
+
fontFamily?: string | undefined;
|
|
3365
|
+
} | undefined;
|
|
3366
|
+
formattingOptions?: {
|
|
3367
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3368
|
+
} | undefined;
|
|
3369
|
+
} | {
|
|
3370
|
+
type: "fragment";
|
|
3371
|
+
} | {
|
|
3372
|
+
type: "link-to-matrix-asset";
|
|
3373
|
+
matrixDomain: string;
|
|
3374
|
+
matrixAssetId: string;
|
|
3375
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
3376
|
+
attributes?: (Record<string, string> & {
|
|
3377
|
+
target?: undefined;
|
|
3378
|
+
href?: undefined;
|
|
3379
|
+
}) | undefined;
|
|
3380
|
+
formattingOptions?: {
|
|
3381
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3382
|
+
} | undefined;
|
|
3383
|
+
matrixIdentifier?: string | undefined;
|
|
3384
|
+
}) & {
|
|
3385
|
+
children: LayoutContentNodes[];
|
|
3386
|
+
})))[];
|
|
3387
|
+
};
|
|
3388
|
+
name: "custom-layout";
|
|
3389
|
+
config: {
|
|
3390
|
+
rootWrapper: {
|
|
3391
|
+
tag: string;
|
|
3392
|
+
classes?: string[] | undefined;
|
|
3393
|
+
};
|
|
3394
|
+
nodeWrapper?: {
|
|
3395
|
+
tag: string;
|
|
3396
|
+
classes?: string[] | undefined;
|
|
3397
|
+
} | undefined;
|
|
3398
|
+
};
|
|
2662
3399
|
})[];
|
|
2663
3400
|
}, {
|
|
2664
3401
|
id: string;
|
|
@@ -2967,9 +3704,101 @@ declare const PageContentsResolved: z.ZodObject<{
|
|
|
2967
3704
|
})[];
|
|
2968
3705
|
};
|
|
2969
3706
|
name: "two-column";
|
|
3707
|
+
} | {
|
|
3708
|
+
content: {
|
|
3709
|
+
main: ({
|
|
3710
|
+
value: string;
|
|
3711
|
+
type: "text";
|
|
3712
|
+
} | {
|
|
3713
|
+
type: "tag";
|
|
3714
|
+
tag: string;
|
|
3715
|
+
attributes?: Record<string, string> | undefined;
|
|
3716
|
+
font?: {
|
|
3717
|
+
bold?: boolean | undefined;
|
|
3718
|
+
italics?: boolean | undefined;
|
|
3719
|
+
underline?: boolean | undefined;
|
|
3720
|
+
color?: string | undefined;
|
|
3721
|
+
size?: string | undefined;
|
|
3722
|
+
fontFamily?: string | undefined;
|
|
3723
|
+
} | undefined;
|
|
3724
|
+
formattingOptions?: {
|
|
3725
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3726
|
+
} | undefined;
|
|
3727
|
+
} | {
|
|
3728
|
+
type: "fragment";
|
|
3729
|
+
} | {
|
|
3730
|
+
type: "link-to-matrix-asset";
|
|
3731
|
+
matrixDomain: string;
|
|
3732
|
+
matrixAssetId: string;
|
|
3733
|
+
target: "_blank" | "_self" | "_parent" | "_top";
|
|
3734
|
+
attributes?: (Record<string, string> & {
|
|
3735
|
+
target?: undefined;
|
|
3736
|
+
href?: undefined;
|
|
3737
|
+
}) | undefined;
|
|
3738
|
+
formattingOptions?: {
|
|
3739
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3740
|
+
} | undefined;
|
|
3741
|
+
matrixIdentifier?: string | undefined;
|
|
3742
|
+
} | {
|
|
3743
|
+
type: "matrix-image";
|
|
3744
|
+
matrixDomain: string;
|
|
3745
|
+
matrixAssetId: string;
|
|
3746
|
+
attributes?: (Record<string, string> & {
|
|
3747
|
+
src?: undefined;
|
|
3748
|
+
}) | undefined;
|
|
3749
|
+
formattingOptions?: {
|
|
3750
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3751
|
+
} | undefined;
|
|
3752
|
+
matrixIdentifier?: string | undefined;
|
|
3753
|
+
} | {
|
|
3754
|
+
type: "dam-image";
|
|
3755
|
+
damSystemType: "bynder";
|
|
3756
|
+
damSystemIdentifier: string;
|
|
3757
|
+
damObjectId: string;
|
|
3758
|
+
attributes?: (Record<string, string> & {
|
|
3759
|
+
src?: undefined;
|
|
3760
|
+
}) | undefined;
|
|
3761
|
+
formattingOptions?: {
|
|
3762
|
+
alignment: "left" | "center" | "right" | "justify";
|
|
3763
|
+
} | undefined;
|
|
3764
|
+
damAdditional?: {
|
|
3765
|
+
variant?: string | undefined;
|
|
3766
|
+
} | undefined;
|
|
3767
|
+
} | {
|
|
3768
|
+
type: "component";
|
|
3769
|
+
componentId: string;
|
|
3770
|
+
componentSet: string;
|
|
3771
|
+
componentType?: "server" | "edge" | undefined;
|
|
3772
|
+
contentItem?: {
|
|
3773
|
+
id: string;
|
|
3774
|
+
} | {
|
|
3775
|
+
content: Record<string, unknown>;
|
|
3776
|
+
schemaName: string;
|
|
3777
|
+
} | undefined;
|
|
3778
|
+
} | {
|
|
3779
|
+
type: "variation";
|
|
3780
|
+
default: {};
|
|
3781
|
+
})[];
|
|
3782
|
+
};
|
|
3783
|
+
name: "custom-layout";
|
|
3784
|
+
config: {
|
|
3785
|
+
rootWrapper: {
|
|
3786
|
+
tag: string;
|
|
3787
|
+
classes?: string[] | undefined;
|
|
3788
|
+
};
|
|
3789
|
+
nodeWrapper?: {
|
|
3790
|
+
tag: string;
|
|
3791
|
+
classes?: string[] | undefined;
|
|
3792
|
+
} | undefined;
|
|
3793
|
+
};
|
|
2970
3794
|
})[];
|
|
2971
3795
|
}>;
|
|
2972
3796
|
type MockPageContentsResolved = z.infer<typeof PageContentsResolved>;
|
|
3797
|
+
type ExtractColumnType<T extends PageLayout['name']> = Extract<PageLayout, {
|
|
3798
|
+
name: T;
|
|
3799
|
+
}>;
|
|
3800
|
+
type CustomLayout = ExtractColumnType<'custom-layout'>;
|
|
3801
|
+
type CustomLayoutConfig = CustomLayout['config'];
|
|
2973
3802
|
/**
|
|
2974
3803
|
* Use this builder for creating mock raw layouts for tests.
|
|
2975
3804
|
* @export
|
|
@@ -2992,6 +3821,13 @@ export declare class PageSingleColumLayoutBuilder {
|
|
|
2992
3821
|
reset(): PageSingleColumLayoutBuilder;
|
|
2993
3822
|
build(): PageLayout;
|
|
2994
3823
|
}
|
|
3824
|
+
export declare class CustomLayoutBuilder {
|
|
3825
|
+
private layout;
|
|
3826
|
+
constructor(config: CustomLayoutConfig);
|
|
3827
|
+
addNode(node: LayoutContentNodes): CustomLayoutBuilder;
|
|
3828
|
+
reset(): CustomLayoutBuilder;
|
|
3829
|
+
build(): PageLayout;
|
|
3830
|
+
}
|
|
2995
3831
|
/**
|
|
2996
3832
|
* Use this builder for creating mock resolved page contents for tests.
|
|
2997
3833
|
* @export
|
|
@@ -3005,6 +3841,7 @@ export declare class PageContentResolvedMockBuilder {
|
|
|
3005
3841
|
setName(name: string): PageContentResolvedMockBuilder;
|
|
3006
3842
|
setLayouts(layouts: PageLayout[]): PageContentResolvedMockBuilder;
|
|
3007
3843
|
createLayout(): PageRawLayoutBuilder;
|
|
3844
|
+
createCustomLayout(config: CustomLayoutConfig): CustomLayoutBuilder;
|
|
3008
3845
|
addLayout(layout: PageLayout): PageContentResolvedMockBuilder;
|
|
3009
3846
|
nodeFactory(): MockNodeFactory;
|
|
3010
3847
|
reset(): PageContentResolvedMockBuilder;
|