@columenlabs/lumen-ui-types 0.2.0 → 0.2.2
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/views.d.ts +548 -13
- package/dist/views.js +52 -19
- package/package.json +1 -1
package/dist/views.d.ts
CHANGED
|
@@ -561,6 +561,21 @@ export declare const WIDGET_CONTROL_NAMES: Record<WidgetControl, string>;
|
|
|
561
561
|
export declare const CONTROL_DEFAULTS: Record<ViewCardKind, Partial<Record<WidgetControl, boolean>>>;
|
|
562
562
|
/** Slices an allocation bar shows on its own before the rest fold into Other. */
|
|
563
563
|
export declare const ALLOCATION_MAX = 10;
|
|
564
|
+
/**
|
|
565
|
+
* One connection: the domain `to` and the pairs that match a row to its rows, each a key the
|
|
566
|
+
* rows carry (`symbol`, `account`) or a field of each side. Left out of a card move, `on` is
|
|
567
|
+
* inferred from the keys both domains carry.
|
|
568
|
+
*/
|
|
569
|
+
export declare const viewConnectionSchema: z.ZodObject<{
|
|
570
|
+
to: z.ZodString;
|
|
571
|
+
on: z.ZodArray<z.ZodObject<{
|
|
572
|
+
from: z.ZodString;
|
|
573
|
+
to: z.ZodString;
|
|
574
|
+
}, z.core.$strict>>;
|
|
575
|
+
}, z.core.$strict>;
|
|
576
|
+
export type ViewConnection = z.infer<typeof viewConnectionSchema>;
|
|
577
|
+
/** A widget's own main data: a catalog domain id (`zeus_credits`) or a recipe (`frame:<id>`). */
|
|
578
|
+
export declare const viewSourceSchema: z.ZodString;
|
|
564
579
|
/**
|
|
565
580
|
* A table's own layout (several tables on a layout): the parts of a view
|
|
566
581
|
* config that shape one table. Left out on a table card, it draws the view's own.
|
|
@@ -668,6 +683,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
668
683
|
teal: "teal";
|
|
669
684
|
}>>;
|
|
670
685
|
}, z.core.$strip>>>;
|
|
686
|
+
source: z.ZodOptional<z.ZodString>;
|
|
687
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
688
|
+
to: z.ZodString;
|
|
689
|
+
on: z.ZodArray<z.ZodObject<{
|
|
690
|
+
from: z.ZodString;
|
|
691
|
+
to: z.ZodString;
|
|
692
|
+
}, z.core.$strict>>;
|
|
693
|
+
}, z.core.$strict>>>;
|
|
671
694
|
link: z.ZodOptional<z.ZodEnum<{
|
|
672
695
|
amber: "amber";
|
|
673
696
|
blue: "blue";
|
|
@@ -792,6 +815,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
792
815
|
teal: "teal";
|
|
793
816
|
}>>;
|
|
794
817
|
}, z.core.$strip>>>;
|
|
818
|
+
source: z.ZodOptional<z.ZodString>;
|
|
819
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
820
|
+
to: z.ZodString;
|
|
821
|
+
on: z.ZodArray<z.ZodObject<{
|
|
822
|
+
from: z.ZodString;
|
|
823
|
+
to: z.ZodString;
|
|
824
|
+
}, z.core.$strict>>;
|
|
825
|
+
}, z.core.$strict>>>;
|
|
795
826
|
link: z.ZodOptional<z.ZodEnum<{
|
|
796
827
|
amber: "amber";
|
|
797
828
|
blue: "blue";
|
|
@@ -848,6 +879,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
848
879
|
teal: "teal";
|
|
849
880
|
}>>;
|
|
850
881
|
}, z.core.$strip>>>;
|
|
882
|
+
source: z.ZodOptional<z.ZodString>;
|
|
883
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
884
|
+
to: z.ZodString;
|
|
885
|
+
on: z.ZodArray<z.ZodObject<{
|
|
886
|
+
from: z.ZodString;
|
|
887
|
+
to: z.ZodString;
|
|
888
|
+
}, z.core.$strict>>;
|
|
889
|
+
}, z.core.$strict>>>;
|
|
851
890
|
link: z.ZodOptional<z.ZodEnum<{
|
|
852
891
|
amber: "amber";
|
|
853
892
|
blue: "blue";
|
|
@@ -1001,6 +1040,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1001
1040
|
teal: "teal";
|
|
1002
1041
|
}>>;
|
|
1003
1042
|
}, z.core.$strip>>>;
|
|
1043
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1044
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1045
|
+
to: z.ZodString;
|
|
1046
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1047
|
+
from: z.ZodString;
|
|
1048
|
+
to: z.ZodString;
|
|
1049
|
+
}, z.core.$strict>>;
|
|
1050
|
+
}, z.core.$strict>>>;
|
|
1004
1051
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1005
1052
|
amber: "amber";
|
|
1006
1053
|
blue: "blue";
|
|
@@ -1141,6 +1188,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1141
1188
|
teal: "teal";
|
|
1142
1189
|
}>>;
|
|
1143
1190
|
}, z.core.$strip>>>;
|
|
1191
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1193
|
+
to: z.ZodString;
|
|
1194
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1195
|
+
from: z.ZodString;
|
|
1196
|
+
to: z.ZodString;
|
|
1197
|
+
}, z.core.$strict>>;
|
|
1198
|
+
}, z.core.$strict>>>;
|
|
1144
1199
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1145
1200
|
amber: "amber";
|
|
1146
1201
|
blue: "blue";
|
|
@@ -1212,6 +1267,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1212
1267
|
teal: "teal";
|
|
1213
1268
|
}>>;
|
|
1214
1269
|
}, z.core.$strip>>>;
|
|
1270
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1271
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1272
|
+
to: z.ZodString;
|
|
1273
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1274
|
+
from: z.ZodString;
|
|
1275
|
+
to: z.ZodString;
|
|
1276
|
+
}, z.core.$strict>>;
|
|
1277
|
+
}, z.core.$strict>>>;
|
|
1215
1278
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1216
1279
|
amber: "amber";
|
|
1217
1280
|
blue: "blue";
|
|
@@ -1268,6 +1331,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1268
1331
|
teal: "teal";
|
|
1269
1332
|
}>>;
|
|
1270
1333
|
}, z.core.$strip>>>;
|
|
1334
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1335
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1336
|
+
to: z.ZodString;
|
|
1337
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1338
|
+
from: z.ZodString;
|
|
1339
|
+
to: z.ZodString;
|
|
1340
|
+
}, z.core.$strict>>;
|
|
1341
|
+
}, z.core.$strict>>>;
|
|
1271
1342
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1272
1343
|
amber: "amber";
|
|
1273
1344
|
blue: "blue";
|
|
@@ -1324,6 +1395,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1324
1395
|
teal: "teal";
|
|
1325
1396
|
}>>;
|
|
1326
1397
|
}, z.core.$strip>>>;
|
|
1398
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1399
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1400
|
+
to: z.ZodString;
|
|
1401
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1402
|
+
from: z.ZodString;
|
|
1403
|
+
to: z.ZodString;
|
|
1404
|
+
}, z.core.$strict>>;
|
|
1405
|
+
}, z.core.$strict>>>;
|
|
1327
1406
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1328
1407
|
amber: "amber";
|
|
1329
1408
|
blue: "blue";
|
|
@@ -1383,6 +1462,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1383
1462
|
teal: "teal";
|
|
1384
1463
|
}>>;
|
|
1385
1464
|
}, z.core.$strip>>>;
|
|
1465
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1466
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1467
|
+
to: z.ZodString;
|
|
1468
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1469
|
+
from: z.ZodString;
|
|
1470
|
+
to: z.ZodString;
|
|
1471
|
+
}, z.core.$strict>>;
|
|
1472
|
+
}, z.core.$strict>>>;
|
|
1386
1473
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1387
1474
|
amber: "amber";
|
|
1388
1475
|
blue: "blue";
|
|
@@ -1451,6 +1538,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1451
1538
|
teal: "teal";
|
|
1452
1539
|
}>>;
|
|
1453
1540
|
}, z.core.$strip>>>;
|
|
1541
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1542
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1543
|
+
to: z.ZodString;
|
|
1544
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1545
|
+
from: z.ZodString;
|
|
1546
|
+
to: z.ZodString;
|
|
1547
|
+
}, z.core.$strict>>;
|
|
1548
|
+
}, z.core.$strict>>>;
|
|
1454
1549
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1455
1550
|
amber: "amber";
|
|
1456
1551
|
blue: "blue";
|
|
@@ -1508,6 +1603,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1508
1603
|
teal: "teal";
|
|
1509
1604
|
}>>;
|
|
1510
1605
|
}, z.core.$strip>>>;
|
|
1606
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1607
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1608
|
+
to: z.ZodString;
|
|
1609
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1610
|
+
from: z.ZodString;
|
|
1611
|
+
to: z.ZodString;
|
|
1612
|
+
}, z.core.$strict>>;
|
|
1613
|
+
}, z.core.$strict>>>;
|
|
1511
1614
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1512
1615
|
amber: "amber";
|
|
1513
1616
|
blue: "blue";
|
|
@@ -1566,6 +1669,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1566
1669
|
teal: "teal";
|
|
1567
1670
|
}>>;
|
|
1568
1671
|
}, z.core.$strip>>>;
|
|
1672
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1673
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1674
|
+
to: z.ZodString;
|
|
1675
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1676
|
+
from: z.ZodString;
|
|
1677
|
+
to: z.ZodString;
|
|
1678
|
+
}, z.core.$strict>>;
|
|
1679
|
+
}, z.core.$strict>>>;
|
|
1569
1680
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1570
1681
|
amber: "amber";
|
|
1571
1682
|
blue: "blue";
|
|
@@ -1640,6 +1751,14 @@ declare const cardUnion: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1640
1751
|
teal: "teal";
|
|
1641
1752
|
}>>;
|
|
1642
1753
|
}, z.core.$strip>>>;
|
|
1754
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1755
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1756
|
+
to: z.ZodString;
|
|
1757
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1758
|
+
from: z.ZodString;
|
|
1759
|
+
to: z.ZodString;
|
|
1760
|
+
}, z.core.$strict>>;
|
|
1761
|
+
}, z.core.$strict>>>;
|
|
1643
1762
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1644
1763
|
amber: "amber";
|
|
1645
1764
|
blue: "blue";
|
|
@@ -1694,6 +1813,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
1694
1813
|
teal: "teal";
|
|
1695
1814
|
}>>;
|
|
1696
1815
|
}, z.core.$strip>>>;
|
|
1816
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1817
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1818
|
+
to: z.ZodString;
|
|
1819
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1820
|
+
from: z.ZodString;
|
|
1821
|
+
to: z.ZodString;
|
|
1822
|
+
}, z.core.$strict>>;
|
|
1823
|
+
}, z.core.$strict>>>;
|
|
1697
1824
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1698
1825
|
amber: "amber";
|
|
1699
1826
|
blue: "blue";
|
|
@@ -1818,6 +1945,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
1818
1945
|
teal: "teal";
|
|
1819
1946
|
}>>;
|
|
1820
1947
|
}, z.core.$strip>>>;
|
|
1948
|
+
source: z.ZodOptional<z.ZodString>;
|
|
1949
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1950
|
+
to: z.ZodString;
|
|
1951
|
+
on: z.ZodArray<z.ZodObject<{
|
|
1952
|
+
from: z.ZodString;
|
|
1953
|
+
to: z.ZodString;
|
|
1954
|
+
}, z.core.$strict>>;
|
|
1955
|
+
}, z.core.$strict>>>;
|
|
1821
1956
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1822
1957
|
amber: "amber";
|
|
1823
1958
|
blue: "blue";
|
|
@@ -1874,6 +2009,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
1874
2009
|
teal: "teal";
|
|
1875
2010
|
}>>;
|
|
1876
2011
|
}, z.core.$strip>>>;
|
|
2012
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2013
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2014
|
+
to: z.ZodString;
|
|
2015
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2016
|
+
from: z.ZodString;
|
|
2017
|
+
to: z.ZodString;
|
|
2018
|
+
}, z.core.$strict>>;
|
|
2019
|
+
}, z.core.$strict>>>;
|
|
1877
2020
|
link: z.ZodOptional<z.ZodEnum<{
|
|
1878
2021
|
amber: "amber";
|
|
1879
2022
|
blue: "blue";
|
|
@@ -2027,6 +2170,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2027
2170
|
teal: "teal";
|
|
2028
2171
|
}>>;
|
|
2029
2172
|
}, z.core.$strip>>>;
|
|
2173
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2174
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2175
|
+
to: z.ZodString;
|
|
2176
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2177
|
+
from: z.ZodString;
|
|
2178
|
+
to: z.ZodString;
|
|
2179
|
+
}, z.core.$strict>>;
|
|
2180
|
+
}, z.core.$strict>>>;
|
|
2030
2181
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2031
2182
|
amber: "amber";
|
|
2032
2183
|
blue: "blue";
|
|
@@ -2167,6 +2318,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2167
2318
|
teal: "teal";
|
|
2168
2319
|
}>>;
|
|
2169
2320
|
}, z.core.$strip>>>;
|
|
2321
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2322
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2323
|
+
to: z.ZodString;
|
|
2324
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2325
|
+
from: z.ZodString;
|
|
2326
|
+
to: z.ZodString;
|
|
2327
|
+
}, z.core.$strict>>;
|
|
2328
|
+
}, z.core.$strict>>>;
|
|
2170
2329
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2171
2330
|
amber: "amber";
|
|
2172
2331
|
blue: "blue";
|
|
@@ -2238,6 +2397,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2238
2397
|
teal: "teal";
|
|
2239
2398
|
}>>;
|
|
2240
2399
|
}, z.core.$strip>>>;
|
|
2400
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2401
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2402
|
+
to: z.ZodString;
|
|
2403
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2404
|
+
from: z.ZodString;
|
|
2405
|
+
to: z.ZodString;
|
|
2406
|
+
}, z.core.$strict>>;
|
|
2407
|
+
}, z.core.$strict>>>;
|
|
2241
2408
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2242
2409
|
amber: "amber";
|
|
2243
2410
|
blue: "blue";
|
|
@@ -2294,6 +2461,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2294
2461
|
teal: "teal";
|
|
2295
2462
|
}>>;
|
|
2296
2463
|
}, z.core.$strip>>>;
|
|
2464
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2465
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2466
|
+
to: z.ZodString;
|
|
2467
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2468
|
+
from: z.ZodString;
|
|
2469
|
+
to: z.ZodString;
|
|
2470
|
+
}, z.core.$strict>>;
|
|
2471
|
+
}, z.core.$strict>>>;
|
|
2297
2472
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2298
2473
|
amber: "amber";
|
|
2299
2474
|
blue: "blue";
|
|
@@ -2350,6 +2525,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2350
2525
|
teal: "teal";
|
|
2351
2526
|
}>>;
|
|
2352
2527
|
}, z.core.$strip>>>;
|
|
2528
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2529
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2530
|
+
to: z.ZodString;
|
|
2531
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2532
|
+
from: z.ZodString;
|
|
2533
|
+
to: z.ZodString;
|
|
2534
|
+
}, z.core.$strict>>;
|
|
2535
|
+
}, z.core.$strict>>>;
|
|
2353
2536
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2354
2537
|
amber: "amber";
|
|
2355
2538
|
blue: "blue";
|
|
@@ -2409,6 +2592,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2409
2592
|
teal: "teal";
|
|
2410
2593
|
}>>;
|
|
2411
2594
|
}, z.core.$strip>>>;
|
|
2595
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2596
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2597
|
+
to: z.ZodString;
|
|
2598
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2599
|
+
from: z.ZodString;
|
|
2600
|
+
to: z.ZodString;
|
|
2601
|
+
}, z.core.$strict>>;
|
|
2602
|
+
}, z.core.$strict>>>;
|
|
2412
2603
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2413
2604
|
amber: "amber";
|
|
2414
2605
|
blue: "blue";
|
|
@@ -2477,6 +2668,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2477
2668
|
teal: "teal";
|
|
2478
2669
|
}>>;
|
|
2479
2670
|
}, z.core.$strip>>>;
|
|
2671
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2672
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2673
|
+
to: z.ZodString;
|
|
2674
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2675
|
+
from: z.ZodString;
|
|
2676
|
+
to: z.ZodString;
|
|
2677
|
+
}, z.core.$strict>>;
|
|
2678
|
+
}, z.core.$strict>>>;
|
|
2480
2679
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2481
2680
|
amber: "amber";
|
|
2482
2681
|
blue: "blue";
|
|
@@ -2534,6 +2733,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2534
2733
|
teal: "teal";
|
|
2535
2734
|
}>>;
|
|
2536
2735
|
}, z.core.$strip>>>;
|
|
2736
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2737
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2738
|
+
to: z.ZodString;
|
|
2739
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2740
|
+
from: z.ZodString;
|
|
2741
|
+
to: z.ZodString;
|
|
2742
|
+
}, z.core.$strict>>;
|
|
2743
|
+
}, z.core.$strict>>>;
|
|
2537
2744
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2538
2745
|
amber: "amber";
|
|
2539
2746
|
blue: "blue";
|
|
@@ -2592,6 +2799,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2592
2799
|
teal: "teal";
|
|
2593
2800
|
}>>;
|
|
2594
2801
|
}, z.core.$strip>>>;
|
|
2802
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2803
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2804
|
+
to: z.ZodString;
|
|
2805
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2806
|
+
from: z.ZodString;
|
|
2807
|
+
to: z.ZodString;
|
|
2808
|
+
}, z.core.$strict>>;
|
|
2809
|
+
}, z.core.$strict>>>;
|
|
2595
2810
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2596
2811
|
amber: "amber";
|
|
2597
2812
|
blue: "blue";
|
|
@@ -2666,6 +2881,14 @@ export declare const viewCardSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.
|
|
|
2666
2881
|
teal: "teal";
|
|
2667
2882
|
}>>;
|
|
2668
2883
|
}, z.core.$strip>>>;
|
|
2884
|
+
source: z.ZodOptional<z.ZodString>;
|
|
2885
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2886
|
+
to: z.ZodString;
|
|
2887
|
+
on: z.ZodArray<z.ZodObject<{
|
|
2888
|
+
from: z.ZodString;
|
|
2889
|
+
to: z.ZodString;
|
|
2890
|
+
}, z.core.$strict>>;
|
|
2891
|
+
}, z.core.$strict>>>;
|
|
2669
2892
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2670
2893
|
amber: "amber";
|
|
2671
2894
|
blue: "blue";
|
|
@@ -2785,6 +3008,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
2785
3008
|
teal: "teal";
|
|
2786
3009
|
}>>;
|
|
2787
3010
|
}, z.core.$strip>>>;
|
|
3011
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3012
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3013
|
+
to: z.ZodString;
|
|
3014
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3015
|
+
from: z.ZodString;
|
|
3016
|
+
to: z.ZodString;
|
|
3017
|
+
}, z.core.$strict>>;
|
|
3018
|
+
}, z.core.$strict>>>;
|
|
2788
3019
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2789
3020
|
amber: "amber";
|
|
2790
3021
|
blue: "blue";
|
|
@@ -2909,6 +3140,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
2909
3140
|
teal: "teal";
|
|
2910
3141
|
}>>;
|
|
2911
3142
|
}, z.core.$strip>>>;
|
|
3143
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3144
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3145
|
+
to: z.ZodString;
|
|
3146
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3147
|
+
from: z.ZodString;
|
|
3148
|
+
to: z.ZodString;
|
|
3149
|
+
}, z.core.$strict>>;
|
|
3150
|
+
}, z.core.$strict>>>;
|
|
2912
3151
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2913
3152
|
amber: "amber";
|
|
2914
3153
|
blue: "blue";
|
|
@@ -2965,6 +3204,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
2965
3204
|
teal: "teal";
|
|
2966
3205
|
}>>;
|
|
2967
3206
|
}, z.core.$strip>>>;
|
|
3207
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3208
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3209
|
+
to: z.ZodString;
|
|
3210
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3211
|
+
from: z.ZodString;
|
|
3212
|
+
to: z.ZodString;
|
|
3213
|
+
}, z.core.$strict>>;
|
|
3214
|
+
}, z.core.$strict>>>;
|
|
2968
3215
|
link: z.ZodOptional<z.ZodEnum<{
|
|
2969
3216
|
amber: "amber";
|
|
2970
3217
|
blue: "blue";
|
|
@@ -3118,6 +3365,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3118
3365
|
teal: "teal";
|
|
3119
3366
|
}>>;
|
|
3120
3367
|
}, z.core.$strip>>>;
|
|
3368
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3369
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3370
|
+
to: z.ZodString;
|
|
3371
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3372
|
+
from: z.ZodString;
|
|
3373
|
+
to: z.ZodString;
|
|
3374
|
+
}, z.core.$strict>>;
|
|
3375
|
+
}, z.core.$strict>>>;
|
|
3121
3376
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3122
3377
|
amber: "amber";
|
|
3123
3378
|
blue: "blue";
|
|
@@ -3258,6 +3513,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3258
3513
|
teal: "teal";
|
|
3259
3514
|
}>>;
|
|
3260
3515
|
}, z.core.$strip>>>;
|
|
3516
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3517
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3518
|
+
to: z.ZodString;
|
|
3519
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3520
|
+
from: z.ZodString;
|
|
3521
|
+
to: z.ZodString;
|
|
3522
|
+
}, z.core.$strict>>;
|
|
3523
|
+
}, z.core.$strict>>>;
|
|
3261
3524
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3262
3525
|
amber: "amber";
|
|
3263
3526
|
blue: "blue";
|
|
@@ -3329,6 +3592,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3329
3592
|
teal: "teal";
|
|
3330
3593
|
}>>;
|
|
3331
3594
|
}, z.core.$strip>>>;
|
|
3595
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3596
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3597
|
+
to: z.ZodString;
|
|
3598
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3599
|
+
from: z.ZodString;
|
|
3600
|
+
to: z.ZodString;
|
|
3601
|
+
}, z.core.$strict>>;
|
|
3602
|
+
}, z.core.$strict>>>;
|
|
3332
3603
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3333
3604
|
amber: "amber";
|
|
3334
3605
|
blue: "blue";
|
|
@@ -3385,6 +3656,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3385
3656
|
teal: "teal";
|
|
3386
3657
|
}>>;
|
|
3387
3658
|
}, z.core.$strip>>>;
|
|
3659
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3660
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3661
|
+
to: z.ZodString;
|
|
3662
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3663
|
+
from: z.ZodString;
|
|
3664
|
+
to: z.ZodString;
|
|
3665
|
+
}, z.core.$strict>>;
|
|
3666
|
+
}, z.core.$strict>>>;
|
|
3388
3667
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3389
3668
|
amber: "amber";
|
|
3390
3669
|
blue: "blue";
|
|
@@ -3441,6 +3720,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3441
3720
|
teal: "teal";
|
|
3442
3721
|
}>>;
|
|
3443
3722
|
}, z.core.$strip>>>;
|
|
3723
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3724
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3725
|
+
to: z.ZodString;
|
|
3726
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3727
|
+
from: z.ZodString;
|
|
3728
|
+
to: z.ZodString;
|
|
3729
|
+
}, z.core.$strict>>;
|
|
3730
|
+
}, z.core.$strict>>>;
|
|
3444
3731
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3445
3732
|
amber: "amber";
|
|
3446
3733
|
blue: "blue";
|
|
@@ -3500,6 +3787,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3500
3787
|
teal: "teal";
|
|
3501
3788
|
}>>;
|
|
3502
3789
|
}, z.core.$strip>>>;
|
|
3790
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3791
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3792
|
+
to: z.ZodString;
|
|
3793
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3794
|
+
from: z.ZodString;
|
|
3795
|
+
to: z.ZodString;
|
|
3796
|
+
}, z.core.$strict>>;
|
|
3797
|
+
}, z.core.$strict>>>;
|
|
3503
3798
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3504
3799
|
amber: "amber";
|
|
3505
3800
|
blue: "blue";
|
|
@@ -3568,6 +3863,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3568
3863
|
teal: "teal";
|
|
3569
3864
|
}>>;
|
|
3570
3865
|
}, z.core.$strip>>>;
|
|
3866
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3867
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3868
|
+
to: z.ZodString;
|
|
3869
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3870
|
+
from: z.ZodString;
|
|
3871
|
+
to: z.ZodString;
|
|
3872
|
+
}, z.core.$strict>>;
|
|
3873
|
+
}, z.core.$strict>>>;
|
|
3571
3874
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3572
3875
|
amber: "amber";
|
|
3573
3876
|
blue: "blue";
|
|
@@ -3625,6 +3928,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3625
3928
|
teal: "teal";
|
|
3626
3929
|
}>>;
|
|
3627
3930
|
}, z.core.$strip>>>;
|
|
3931
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3932
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3933
|
+
to: z.ZodString;
|
|
3934
|
+
on: z.ZodArray<z.ZodObject<{
|
|
3935
|
+
from: z.ZodString;
|
|
3936
|
+
to: z.ZodString;
|
|
3937
|
+
}, z.core.$strict>>;
|
|
3938
|
+
}, z.core.$strict>>>;
|
|
3628
3939
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3629
3940
|
amber: "amber";
|
|
3630
3941
|
blue: "blue";
|
|
@@ -3683,6 +3994,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3683
3994
|
teal: "teal";
|
|
3684
3995
|
}>>;
|
|
3685
3996
|
}, z.core.$strip>>>;
|
|
3997
|
+
source: z.ZodOptional<z.ZodString>;
|
|
3998
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3999
|
+
to: z.ZodString;
|
|
4000
|
+
on: z.ZodArray<z.ZodObject<{
|
|
4001
|
+
from: z.ZodString;
|
|
4002
|
+
to: z.ZodString;
|
|
4003
|
+
}, z.core.$strict>>;
|
|
4004
|
+
}, z.core.$strict>>>;
|
|
3686
4005
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3687
4006
|
amber: "amber";
|
|
3688
4007
|
blue: "blue";
|
|
@@ -3757,6 +4076,14 @@ export declare const viewCardsSchema: z.ZodArray<z.ZodPreprocess<z.ZodDiscrimina
|
|
|
3757
4076
|
teal: "teal";
|
|
3758
4077
|
}>>;
|
|
3759
4078
|
}, z.core.$strip>>>;
|
|
4079
|
+
source: z.ZodOptional<z.ZodString>;
|
|
4080
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
4081
|
+
to: z.ZodString;
|
|
4082
|
+
on: z.ZodArray<z.ZodObject<{
|
|
4083
|
+
from: z.ZodString;
|
|
4084
|
+
to: z.ZodString;
|
|
4085
|
+
}, z.core.$strict>>;
|
|
4086
|
+
}, z.core.$strict>>>;
|
|
3760
4087
|
link: z.ZodOptional<z.ZodEnum<{
|
|
3761
4088
|
amber: "amber";
|
|
3762
4089
|
blue: "blue";
|
|
@@ -3804,6 +4131,14 @@ export declare const cardsOf: (c: {
|
|
|
3804
4131
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
3805
4132
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3806
4133
|
}[];
|
|
4134
|
+
source?: string | undefined;
|
|
4135
|
+
connections?: {
|
|
4136
|
+
to: string;
|
|
4137
|
+
on: {
|
|
4138
|
+
from: string;
|
|
4139
|
+
to: string;
|
|
4140
|
+
}[];
|
|
4141
|
+
}[] | undefined;
|
|
3807
4142
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3808
4143
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
3809
4144
|
kind: "table";
|
|
@@ -3859,6 +4194,14 @@ export declare const cardsOf: (c: {
|
|
|
3859
4194
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
3860
4195
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3861
4196
|
}[];
|
|
4197
|
+
source?: string | undefined;
|
|
4198
|
+
connections?: {
|
|
4199
|
+
to: string;
|
|
4200
|
+
on: {
|
|
4201
|
+
from: string;
|
|
4202
|
+
to: string;
|
|
4203
|
+
}[];
|
|
4204
|
+
}[] | undefined;
|
|
3862
4205
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3863
4206
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
3864
4207
|
kind: "table";
|
|
@@ -3886,6 +4229,14 @@ export declare const cardsOf: (c: {
|
|
|
3886
4229
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
3887
4230
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3888
4231
|
}[];
|
|
4232
|
+
source?: string | undefined;
|
|
4233
|
+
connections?: {
|
|
4234
|
+
to: string;
|
|
4235
|
+
on: {
|
|
4236
|
+
from: string;
|
|
4237
|
+
to: string;
|
|
4238
|
+
}[];
|
|
4239
|
+
}[] | undefined;
|
|
3889
4240
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3890
4241
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
3891
4242
|
kind: "metric";
|
|
@@ -3954,6 +4305,14 @@ export declare const cardsOf: (c: {
|
|
|
3954
4305
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
3955
4306
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3956
4307
|
}[];
|
|
4308
|
+
source?: string | undefined;
|
|
4309
|
+
connections?: {
|
|
4310
|
+
to: string;
|
|
4311
|
+
on: {
|
|
4312
|
+
from: string;
|
|
4313
|
+
to: string;
|
|
4314
|
+
}[];
|
|
4315
|
+
}[] | undefined;
|
|
3957
4316
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
3958
4317
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
3959
4318
|
kind: "metric";
|
|
@@ -4016,6 +4375,14 @@ export declare const cardsOf: (c: {
|
|
|
4016
4375
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4017
4376
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4018
4377
|
}[];
|
|
4378
|
+
source?: string | undefined;
|
|
4379
|
+
connections?: {
|
|
4380
|
+
to: string;
|
|
4381
|
+
on: {
|
|
4382
|
+
from: string;
|
|
4383
|
+
to: string;
|
|
4384
|
+
}[];
|
|
4385
|
+
}[] | undefined;
|
|
4019
4386
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4020
4387
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4021
4388
|
w: number;
|
|
@@ -4045,6 +4412,14 @@ export declare const cardsOf: (c: {
|
|
|
4045
4412
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4046
4413
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4047
4414
|
}[];
|
|
4415
|
+
source?: string | undefined;
|
|
4416
|
+
connections?: {
|
|
4417
|
+
to: string;
|
|
4418
|
+
on: {
|
|
4419
|
+
from: string;
|
|
4420
|
+
to: string;
|
|
4421
|
+
}[];
|
|
4422
|
+
}[] | undefined;
|
|
4048
4423
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4049
4424
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4050
4425
|
kind: "allocation";
|
|
@@ -4072,6 +4447,14 @@ export declare const cardsOf: (c: {
|
|
|
4072
4447
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4073
4448
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4074
4449
|
}[];
|
|
4450
|
+
source?: string | undefined;
|
|
4451
|
+
connections?: {
|
|
4452
|
+
to: string;
|
|
4453
|
+
on: {
|
|
4454
|
+
from: string;
|
|
4455
|
+
to: string;
|
|
4456
|
+
}[];
|
|
4457
|
+
}[] | undefined;
|
|
4075
4458
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4076
4459
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4077
4460
|
kind: "allocation";
|
|
@@ -4099,6 +4482,14 @@ export declare const cardsOf: (c: {
|
|
|
4099
4482
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4100
4483
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4101
4484
|
}[];
|
|
4485
|
+
source?: string | undefined;
|
|
4486
|
+
connections?: {
|
|
4487
|
+
to: string;
|
|
4488
|
+
on: {
|
|
4489
|
+
from: string;
|
|
4490
|
+
to: string;
|
|
4491
|
+
}[];
|
|
4492
|
+
}[] | undefined;
|
|
4102
4493
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4103
4494
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4104
4495
|
kind: "allocation";
|
|
@@ -4129,6 +4520,14 @@ export declare const cardsOf: (c: {
|
|
|
4129
4520
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4130
4521
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4131
4522
|
}[];
|
|
4523
|
+
source?: string | undefined;
|
|
4524
|
+
connections?: {
|
|
4525
|
+
to: string;
|
|
4526
|
+
on: {
|
|
4527
|
+
from: string;
|
|
4528
|
+
to: string;
|
|
4529
|
+
}[];
|
|
4530
|
+
}[] | undefined;
|
|
4132
4531
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4133
4532
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4134
4533
|
kind: "chart";
|
|
@@ -4156,6 +4555,14 @@ export declare const cardsOf: (c: {
|
|
|
4156
4555
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4157
4556
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4158
4557
|
}[];
|
|
4558
|
+
source?: string | undefined;
|
|
4559
|
+
connections?: {
|
|
4560
|
+
to: string;
|
|
4561
|
+
on: {
|
|
4562
|
+
from: string;
|
|
4563
|
+
to: string;
|
|
4564
|
+
}[];
|
|
4565
|
+
}[] | undefined;
|
|
4159
4566
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4160
4567
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4161
4568
|
kind: "chart";
|
|
@@ -4181,6 +4588,14 @@ export declare const cardsOf: (c: {
|
|
|
4181
4588
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4182
4589
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4183
4590
|
}[];
|
|
4591
|
+
source?: string | undefined;
|
|
4592
|
+
connections?: {
|
|
4593
|
+
to: string;
|
|
4594
|
+
on: {
|
|
4595
|
+
from: string;
|
|
4596
|
+
to: string;
|
|
4597
|
+
}[];
|
|
4598
|
+
}[] | undefined;
|
|
4184
4599
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4185
4600
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4186
4601
|
kind: "chart";
|
|
@@ -4206,6 +4621,14 @@ export declare const cardsOf: (c: {
|
|
|
4206
4621
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4207
4622
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4208
4623
|
}[];
|
|
4624
|
+
source?: string | undefined;
|
|
4625
|
+
connections?: {
|
|
4626
|
+
to: string;
|
|
4627
|
+
on: {
|
|
4628
|
+
from: string;
|
|
4629
|
+
to: string;
|
|
4630
|
+
}[];
|
|
4631
|
+
}[] | undefined;
|
|
4209
4632
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4210
4633
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4211
4634
|
w: number;
|
|
@@ -4235,6 +4658,14 @@ export declare const cardsOf: (c: {
|
|
|
4235
4658
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4236
4659
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4237
4660
|
}[];
|
|
4661
|
+
source?: string | undefined;
|
|
4662
|
+
connections?: {
|
|
4663
|
+
to: string;
|
|
4664
|
+
on: {
|
|
4665
|
+
from: string;
|
|
4666
|
+
to: string;
|
|
4667
|
+
}[];
|
|
4668
|
+
}[] | undefined;
|
|
4238
4669
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4239
4670
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4240
4671
|
kind: "page";
|
|
@@ -4261,6 +4692,14 @@ export declare const mainTableOf: (cards: ViewCard[]) => {
|
|
|
4261
4692
|
op?: "between" | "eq" | "gt" | "lt" | undefined;
|
|
4262
4693
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4263
4694
|
}[];
|
|
4695
|
+
source?: string | undefined;
|
|
4696
|
+
connections?: {
|
|
4697
|
+
to: string;
|
|
4698
|
+
on: {
|
|
4699
|
+
from: string;
|
|
4700
|
+
to: string;
|
|
4701
|
+
}[];
|
|
4702
|
+
}[] | undefined;
|
|
4264
4703
|
link?: "amber" | "blue" | "lime" | "pink" | "teal" | undefined;
|
|
4265
4704
|
controls?: Partial<Record<"ask" | "columns" | "download" | "filter" | "footer" | "group" | "header" | "legend" | "pager" | "refresh" | "window", boolean>> | undefined;
|
|
4266
4705
|
kind: "table";
|
|
@@ -4324,19 +4763,6 @@ export interface ViewWidgetPreset {
|
|
|
4324
4763
|
export declare const viewWidgetCatalog: Record<string, ViewWidgetPreset[]>;
|
|
4325
4764
|
/** Presets from `[name, note, draft]` triples, each draft filled in by the card schema. */
|
|
4326
4765
|
export declare const widgetPresets: (items: [string, string, ViewWidgetDraft][]) => ViewWidgetPreset[];
|
|
4327
|
-
/**
|
|
4328
|
-
* One connection: the domain `to` and the pairs that match a row to its rows, each a key the
|
|
4329
|
-
* rows carry (`symbol`, `account`) or a field of each side. Left out of a card move, `on` is
|
|
4330
|
-
* inferred from the keys both domains carry.
|
|
4331
|
-
*/
|
|
4332
|
-
export declare const viewConnectionSchema: z.ZodObject<{
|
|
4333
|
-
to: z.ZodString;
|
|
4334
|
-
on: z.ZodArray<z.ZodObject<{
|
|
4335
|
-
from: z.ZodString;
|
|
4336
|
-
to: z.ZodString;
|
|
4337
|
-
}, z.core.$strict>>;
|
|
4338
|
-
}, z.core.$strict>;
|
|
4339
|
-
export type ViewConnection = z.infer<typeof viewConnectionSchema>;
|
|
4340
4766
|
/** A connected field's key on the card: `holdings_quantity`; `holdings_count` counts the rows. */
|
|
4341
4767
|
export declare const connectedKey: (to: string, field: string) => string;
|
|
4342
4768
|
/** A link's name in field keys: the domain id, or `r` and the end of a recipe's frame id. */
|
|
@@ -4597,6 +5023,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
4597
5023
|
teal: "teal";
|
|
4598
5024
|
}>>;
|
|
4599
5025
|
}, z.core.$strip>>>;
|
|
5026
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5027
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5028
|
+
to: z.ZodString;
|
|
5029
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5030
|
+
from: z.ZodString;
|
|
5031
|
+
to: z.ZodString;
|
|
5032
|
+
}, z.core.$strict>>;
|
|
5033
|
+
}, z.core.$strict>>>;
|
|
4600
5034
|
link: z.ZodOptional<z.ZodEnum<{
|
|
4601
5035
|
amber: "amber";
|
|
4602
5036
|
blue: "blue";
|
|
@@ -4721,6 +5155,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
4721
5155
|
teal: "teal";
|
|
4722
5156
|
}>>;
|
|
4723
5157
|
}, z.core.$strip>>>;
|
|
5158
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5159
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5160
|
+
to: z.ZodString;
|
|
5161
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5162
|
+
from: z.ZodString;
|
|
5163
|
+
to: z.ZodString;
|
|
5164
|
+
}, z.core.$strict>>;
|
|
5165
|
+
}, z.core.$strict>>>;
|
|
4724
5166
|
link: z.ZodOptional<z.ZodEnum<{
|
|
4725
5167
|
amber: "amber";
|
|
4726
5168
|
blue: "blue";
|
|
@@ -4777,6 +5219,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
4777
5219
|
teal: "teal";
|
|
4778
5220
|
}>>;
|
|
4779
5221
|
}, z.core.$strip>>>;
|
|
5222
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5223
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5224
|
+
to: z.ZodString;
|
|
5225
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5226
|
+
from: z.ZodString;
|
|
5227
|
+
to: z.ZodString;
|
|
5228
|
+
}, z.core.$strict>>;
|
|
5229
|
+
}, z.core.$strict>>>;
|
|
4780
5230
|
link: z.ZodOptional<z.ZodEnum<{
|
|
4781
5231
|
amber: "amber";
|
|
4782
5232
|
blue: "blue";
|
|
@@ -4930,6 +5380,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
4930
5380
|
teal: "teal";
|
|
4931
5381
|
}>>;
|
|
4932
5382
|
}, z.core.$strip>>>;
|
|
5383
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5384
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5385
|
+
to: z.ZodString;
|
|
5386
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5387
|
+
from: z.ZodString;
|
|
5388
|
+
to: z.ZodString;
|
|
5389
|
+
}, z.core.$strict>>;
|
|
5390
|
+
}, z.core.$strict>>>;
|
|
4933
5391
|
link: z.ZodOptional<z.ZodEnum<{
|
|
4934
5392
|
amber: "amber";
|
|
4935
5393
|
blue: "blue";
|
|
@@ -5070,6 +5528,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5070
5528
|
teal: "teal";
|
|
5071
5529
|
}>>;
|
|
5072
5530
|
}, z.core.$strip>>>;
|
|
5531
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5532
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5533
|
+
to: z.ZodString;
|
|
5534
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5535
|
+
from: z.ZodString;
|
|
5536
|
+
to: z.ZodString;
|
|
5537
|
+
}, z.core.$strict>>;
|
|
5538
|
+
}, z.core.$strict>>>;
|
|
5073
5539
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5074
5540
|
amber: "amber";
|
|
5075
5541
|
blue: "blue";
|
|
@@ -5141,6 +5607,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5141
5607
|
teal: "teal";
|
|
5142
5608
|
}>>;
|
|
5143
5609
|
}, z.core.$strip>>>;
|
|
5610
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5611
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5612
|
+
to: z.ZodString;
|
|
5613
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5614
|
+
from: z.ZodString;
|
|
5615
|
+
to: z.ZodString;
|
|
5616
|
+
}, z.core.$strict>>;
|
|
5617
|
+
}, z.core.$strict>>>;
|
|
5144
5618
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5145
5619
|
amber: "amber";
|
|
5146
5620
|
blue: "blue";
|
|
@@ -5197,6 +5671,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5197
5671
|
teal: "teal";
|
|
5198
5672
|
}>>;
|
|
5199
5673
|
}, z.core.$strip>>>;
|
|
5674
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5675
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5676
|
+
to: z.ZodString;
|
|
5677
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5678
|
+
from: z.ZodString;
|
|
5679
|
+
to: z.ZodString;
|
|
5680
|
+
}, z.core.$strict>>;
|
|
5681
|
+
}, z.core.$strict>>>;
|
|
5200
5682
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5201
5683
|
amber: "amber";
|
|
5202
5684
|
blue: "blue";
|
|
@@ -5253,6 +5735,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5253
5735
|
teal: "teal";
|
|
5254
5736
|
}>>;
|
|
5255
5737
|
}, z.core.$strip>>>;
|
|
5738
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5739
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5740
|
+
to: z.ZodString;
|
|
5741
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5742
|
+
from: z.ZodString;
|
|
5743
|
+
to: z.ZodString;
|
|
5744
|
+
}, z.core.$strict>>;
|
|
5745
|
+
}, z.core.$strict>>>;
|
|
5256
5746
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5257
5747
|
amber: "amber";
|
|
5258
5748
|
blue: "blue";
|
|
@@ -5312,6 +5802,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5312
5802
|
teal: "teal";
|
|
5313
5803
|
}>>;
|
|
5314
5804
|
}, z.core.$strip>>>;
|
|
5805
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5806
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5807
|
+
to: z.ZodString;
|
|
5808
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5809
|
+
from: z.ZodString;
|
|
5810
|
+
to: z.ZodString;
|
|
5811
|
+
}, z.core.$strict>>;
|
|
5812
|
+
}, z.core.$strict>>>;
|
|
5315
5813
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5316
5814
|
amber: "amber";
|
|
5317
5815
|
blue: "blue";
|
|
@@ -5380,6 +5878,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5380
5878
|
teal: "teal";
|
|
5381
5879
|
}>>;
|
|
5382
5880
|
}, z.core.$strip>>>;
|
|
5881
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5882
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5883
|
+
to: z.ZodString;
|
|
5884
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5885
|
+
from: z.ZodString;
|
|
5886
|
+
to: z.ZodString;
|
|
5887
|
+
}, z.core.$strict>>;
|
|
5888
|
+
}, z.core.$strict>>>;
|
|
5383
5889
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5384
5890
|
amber: "amber";
|
|
5385
5891
|
blue: "blue";
|
|
@@ -5437,6 +5943,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5437
5943
|
teal: "teal";
|
|
5438
5944
|
}>>;
|
|
5439
5945
|
}, z.core.$strip>>>;
|
|
5946
|
+
source: z.ZodOptional<z.ZodString>;
|
|
5947
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5948
|
+
to: z.ZodString;
|
|
5949
|
+
on: z.ZodArray<z.ZodObject<{
|
|
5950
|
+
from: z.ZodString;
|
|
5951
|
+
to: z.ZodString;
|
|
5952
|
+
}, z.core.$strict>>;
|
|
5953
|
+
}, z.core.$strict>>>;
|
|
5440
5954
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5441
5955
|
amber: "amber";
|
|
5442
5956
|
blue: "blue";
|
|
@@ -5495,6 +6009,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5495
6009
|
teal: "teal";
|
|
5496
6010
|
}>>;
|
|
5497
6011
|
}, z.core.$strip>>>;
|
|
6012
|
+
source: z.ZodOptional<z.ZodString>;
|
|
6013
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6014
|
+
to: z.ZodString;
|
|
6015
|
+
on: z.ZodArray<z.ZodObject<{
|
|
6016
|
+
from: z.ZodString;
|
|
6017
|
+
to: z.ZodString;
|
|
6018
|
+
}, z.core.$strict>>;
|
|
6019
|
+
}, z.core.$strict>>>;
|
|
5498
6020
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5499
6021
|
amber: "amber";
|
|
5500
6022
|
blue: "blue";
|
|
@@ -5569,6 +6091,14 @@ export declare const customViewConfigSchema: z.ZodObject<{
|
|
|
5569
6091
|
teal: "teal";
|
|
5570
6092
|
}>>;
|
|
5571
6093
|
}, z.core.$strip>>>;
|
|
6094
|
+
source: z.ZodOptional<z.ZodString>;
|
|
6095
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6096
|
+
to: z.ZodString;
|
|
6097
|
+
on: z.ZodArray<z.ZodObject<{
|
|
6098
|
+
from: z.ZodString;
|
|
6099
|
+
to: z.ZodString;
|
|
6100
|
+
}, z.core.$strict>>;
|
|
6101
|
+
}, z.core.$strict>>>;
|
|
5572
6102
|
link: z.ZodOptional<z.ZodEnum<{
|
|
5573
6103
|
amber: "amber";
|
|
5574
6104
|
blue: "blue";
|
|
@@ -5608,6 +6138,11 @@ export declare function tableLayoutOf(c: CustomViewConfig): ViewTableLayout;
|
|
|
5608
6138
|
* page's one table, so the view editor edits it like the main one.
|
|
5609
6139
|
*/
|
|
5610
6140
|
export declare function tableConfigOf(c: CustomViewConfig, card: ViewTableCard): CustomViewConfig;
|
|
6141
|
+
/**
|
|
6142
|
+
* The config a widget with its own `source` draws: its own table layout and links over a fresh
|
|
6143
|
+
* config, nothing of the page's (formulas, links, recipes) carried in.
|
|
6144
|
+
*/
|
|
6145
|
+
export declare function sourceConfigOf(card: ViewWidget, name: string): CustomViewConfig;
|
|
5611
6146
|
/** A custom view's domain: lowercase, like `holdings` or `explorer`. */
|
|
5612
6147
|
export declare const customViewDomainSchema: z.ZodString;
|
|
5613
6148
|
/** The app a saved view belongs to, as the app names it (`trade`). */
|
package/dist/views.js
CHANGED
|
@@ -402,6 +402,25 @@ export const CONTROL_DEFAULTS = {
|
|
|
402
402
|
};
|
|
403
403
|
/** Slices an allocation bar shows on its own before the rest fold into Other. */
|
|
404
404
|
export const ALLOCATION_MAX = 10;
|
|
405
|
+
/**
|
|
406
|
+
* One connection: the domain `to` and the pairs that match a row to its rows, each a key the
|
|
407
|
+
* rows carry (`symbol`, `account`) or a field of each side. Left out of a card move, `on` is
|
|
408
|
+
* inferred from the keys both domains carry.
|
|
409
|
+
*/
|
|
410
|
+
export const viewConnectionSchema = z
|
|
411
|
+
.object({
|
|
412
|
+
// A catalog domain any reader returns, or a recipe `frame:<id>` (`linkIssues`, checked where
|
|
413
|
+
// views are written).
|
|
414
|
+
to: z
|
|
415
|
+
.string()
|
|
416
|
+
.regex(/^(?:frame:[A-Za-z0-9_-]+|[a-z][a-z0-9_]*)$/)
|
|
417
|
+
.max(80),
|
|
418
|
+
// No pairs: added but Not linked yet, unless both sides carry a key.
|
|
419
|
+
on: z.array(z.object({ from: fieldKey, to: fieldKey }).strict()).max(3),
|
|
420
|
+
})
|
|
421
|
+
.strict();
|
|
422
|
+
/** A widget's own main data: a catalog domain id (`zeus_credits`) or a recipe (`frame:<id>`). */
|
|
423
|
+
export const viewSourceSchema = viewConnectionSchema.shape.to;
|
|
405
424
|
const cardBase = {
|
|
406
425
|
id: viewKey,
|
|
407
426
|
/** Null or left out: the style's own title (the catalog's name for a pre-built widget). */
|
|
@@ -421,6 +440,13 @@ const cardBase = {
|
|
|
421
440
|
phone: viewCardPlaceSchema.optional(),
|
|
422
441
|
/** Tokens that narrow the view's rows for this widget only, e.g. kind:Option. */
|
|
423
442
|
filter: z.array(cardToken).max(MAX_FIELDS).default([]),
|
|
443
|
+
/**
|
|
444
|
+
* Its own main data, which gives its rows: a catalog domain id or a recipe (`frame:<id>`). Left
|
|
445
|
+
* out, the page's rows. A widget with a source follows the page's chips only by a key both carry.
|
|
446
|
+
*/
|
|
447
|
+
source: viewSourceSchema.optional(),
|
|
448
|
+
/** What it links to its own source (with `source` only; a page-data widget shares the view's). */
|
|
449
|
+
connections: z.array(viewConnectionSchema).max(4).optional(),
|
|
424
450
|
/** Its link colour: it shares its chips and tapped row with every card of that colour and
|
|
425
451
|
* follows theirs. Left out: none. */
|
|
426
452
|
link: z.enum(viewLinkColors).optional(),
|
|
@@ -840,7 +866,7 @@ export const defaultViewCards = [
|
|
|
840
866
|
];
|
|
841
867
|
export const cardsOf = (c) => c.cards ?? defaultViewCards;
|
|
842
868
|
/** The table that draws the view's own layout: the first table card without its own `table`. */
|
|
843
|
-
export const mainTableOf = (cards) => cards.find((c) => isTableCard(c) && !c.table);
|
|
869
|
+
export const mainTableOf = (cards) => cards.find((c) => isTableCard(c) && !c.table && !c.source);
|
|
844
870
|
/** A row card's numbers: its own, else the view's. */
|
|
845
871
|
export const tilesOfCard = (c, card) => card.tiles ?? c.tiles ?? [];
|
|
846
872
|
/** Every number on the page: the view's, each row's own and each single number. */
|
|
@@ -918,23 +944,6 @@ export const widgetPresets = (items) => items.map(([name, note, b]) => ({
|
|
|
918
944
|
note,
|
|
919
945
|
widget: viewCardSchema.parse({ title: name, ...b }),
|
|
920
946
|
}));
|
|
921
|
-
/**
|
|
922
|
-
* One connection: the domain `to` and the pairs that match a row to its rows, each a key the
|
|
923
|
-
* rows carry (`symbol`, `account`) or a field of each side. Left out of a card move, `on` is
|
|
924
|
-
* inferred from the keys both domains carry.
|
|
925
|
-
*/
|
|
926
|
-
export const viewConnectionSchema = z
|
|
927
|
-
.object({
|
|
928
|
-
// A catalog domain any reader returns, or a recipe `frame:<id>` (`linkIssues`, checked where
|
|
929
|
-
// views are written).
|
|
930
|
-
to: z
|
|
931
|
-
.string()
|
|
932
|
-
.regex(/^(?:frame:[A-Za-z0-9_-]+|[a-z][a-z0-9_]*)$/)
|
|
933
|
-
.max(80),
|
|
934
|
-
// No pairs: added but Not linked yet, unless both sides carry a key.
|
|
935
|
-
on: z.array(z.object({ from: fieldKey, to: fieldKey }).strict()).max(3),
|
|
936
|
-
})
|
|
937
|
-
.strict();
|
|
938
947
|
/** A connected field's key on the card: `holdings_quantity`; `holdings_count` counts the rows. */
|
|
939
948
|
export const connectedKey = (to, field) => `${linkSpace(to)}_${field}`;
|
|
940
949
|
/** A link's name in field keys: the domain id, or `r` and the end of a recipe's frame id. */
|
|
@@ -1098,6 +1107,19 @@ export function tableConfigOf(c, card) {
|
|
|
1098
1107
|
cards: [rest],
|
|
1099
1108
|
};
|
|
1100
1109
|
}
|
|
1110
|
+
/**
|
|
1111
|
+
* The config a widget with its own `source` draws: its own table layout and links over a fresh
|
|
1112
|
+
* config, nothing of the page's (formulas, links, recipes) carried in.
|
|
1113
|
+
*/
|
|
1114
|
+
export function sourceConfigOf(card, name) {
|
|
1115
|
+
const base = {
|
|
1116
|
+
...customViewConfigSchema.parse({ connections: card.connections ?? [] }),
|
|
1117
|
+
name: card.title ?? name,
|
|
1118
|
+
};
|
|
1119
|
+
return isTableCard(card)
|
|
1120
|
+
? tableConfigOf(base, { ...card, table: card.table ?? tableLayoutOf(base) })
|
|
1121
|
+
: base;
|
|
1122
|
+
}
|
|
1101
1123
|
/** A custom view's domain: lowercase, like `holdings` or `explorer`. */
|
|
1102
1124
|
export const customViewDomainSchema = z
|
|
1103
1125
|
.string()
|
|
@@ -1209,7 +1231,18 @@ frames = []) {
|
|
|
1209
1231
|
...issues,
|
|
1210
1232
|
...tileListIssues(config.tiles ?? [], 'tiles'),
|
|
1211
1233
|
...(config.cards ?? []).flatMap((c, i) => isRowCard(c) && c.tiles ? tileListIssues(c.tiles, `cards.${i}.tiles`) : []),
|
|
1212
|
-
...(
|
|
1234
|
+
...(config.cards ?? []).flatMap((c, i) => {
|
|
1235
|
+
// A widget with its own data is checked against that data's fields, not the page's; a
|
|
1236
|
+
// recipe or a domain the view catalog does not list has its rows' fields, known on read.
|
|
1237
|
+
const cols = c.source
|
|
1238
|
+
? customViewFields[c.source]?.columns && [
|
|
1239
|
+
...(customViewFields[c.source]?.columns ?? []),
|
|
1240
|
+
...connectionColumns(c.connections, c),
|
|
1241
|
+
...formulas.map((f) => f.key),
|
|
1242
|
+
]
|
|
1243
|
+
: columns;
|
|
1244
|
+
return cols ? cardIssues([c], cols).map((x) => x.replace(/^cards\.0:/, `cards.${i}:`)) : [];
|
|
1245
|
+
}),
|
|
1213
1246
|
];
|
|
1214
1247
|
}
|
|
1215
1248
|
/**
|