@firecms/core 3.0.0-canary.50 → 3.0.0-canary.52
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/components/{EntityCollectionTable/internal → common}/default_entity_actions.d.ts +1 -1
- package/dist/components/common/index.d.ts +1 -0
- package/dist/core/Drawer.d.ts +5 -12
- package/dist/core/DrawerNavigationItem.d.ts +9 -0
- package/dist/core/Scaffold.d.ts +6 -9
- package/dist/core/index.d.ts +3 -4
- package/dist/hooks/index.d.ts +1 -0
- package/dist/index.es.js +3102 -3129
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/types/navigation.d.ts +2 -2
- package/dist/util/icon_synonyms.d.ts +0 -93
- package/dist/util/resolutions.d.ts +8 -4
- package/package.json +4 -4
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +3 -7
- package/src/components/EntityView.tsx +1 -1
- package/src/components/PropertyIdCopyTooltipContent.tsx +2 -3
- package/src/components/ReferenceWidget.tsx +1 -1
- package/src/components/{EntityCollectionTable/internal → common}/default_entity_actions.tsx +2 -2
- package/src/components/common/index.ts +1 -0
- package/src/components/common/types.tsx +1 -1
- package/src/components/common/useColumnsIds.tsx +10 -2
- package/src/core/Drawer.tsx +14 -66
- package/src/core/DrawerNavigationItem.tsx +62 -0
- package/src/core/EntitySidePanel.tsx +1 -1
- package/src/core/FireCMS.tsx +3 -4
- package/src/core/Scaffold.tsx +75 -61
- package/src/core/index.tsx +3 -4
- package/src/form/EntityForm.tsx +2 -2
- package/src/form/field_bindings/SelectFieldBinding.tsx +4 -1
- package/src/hooks/index.tsx +1 -0
- package/src/hooks/useBuildNavigationController.tsx +0 -1
- package/src/hooks/useResolvedNavigationFrom.tsx +1 -1
- package/src/internal/useBuildSideEntityController.tsx +3 -2
- package/src/preview/components/EnumValuesChip.tsx +1 -1
- package/src/preview/property_previews/NumberPropertyPreview.tsx +1 -0
- package/src/types/navigation.ts +1 -2
- package/src/types/storage.ts +1 -1
- package/src/util/enums.ts +1 -1
- package/src/util/icon_synonyms.ts +2 -95
- package/src/util/resolutions.ts +26 -7
- package/dist/internal/useBuildCustomizationController.d.ts +0 -2
- package/src/internal/useBuildCustomizationController.tsx +0 -5
|
@@ -47,9 +47,9 @@ export type NavigationController<EC extends EntityCollection = EntityCollection<
|
|
|
47
47
|
* Get the collection configuration for a given path.
|
|
48
48
|
* The collection is resolved from the given path or alias.
|
|
49
49
|
*/
|
|
50
|
-
getCollection: (pathOrId: string,
|
|
50
|
+
getCollection: (pathOrId: string, includeUserOverride?: boolean) => EC | undefined;
|
|
51
51
|
/**
|
|
52
|
-
* Get the collection configuration from its parent
|
|
52
|
+
* Get the collection configuration from its parent ids.
|
|
53
53
|
*/
|
|
54
54
|
getCollectionFromIds: (ids: string[]) => EC | undefined;
|
|
55
55
|
/**
|
|
@@ -280,7 +280,6 @@ export declare const iconSynonyms: {
|
|
|
280
280
|
cast: string;
|
|
281
281
|
cast_connected: string;
|
|
282
282
|
cast_for_education: string;
|
|
283
|
-
catching_pokemon: string;
|
|
284
283
|
category: string;
|
|
285
284
|
celebration: string;
|
|
286
285
|
cell_tower: string;
|
|
@@ -381,10 +380,6 @@ export declare const iconSynonyms: {
|
|
|
381
380
|
credit_score: string;
|
|
382
381
|
crib: string;
|
|
383
382
|
crop: string;
|
|
384
|
-
crop_169: string;
|
|
385
|
-
crop_32: string;
|
|
386
|
-
crop_54: string;
|
|
387
|
-
crop_75: string;
|
|
388
383
|
crop_din: string;
|
|
389
384
|
crop_free: string;
|
|
390
385
|
crop_landscape: string;
|
|
@@ -419,7 +414,6 @@ export declare const iconSynonyms: {
|
|
|
419
414
|
delete_forever: string;
|
|
420
415
|
delete_outline: string;
|
|
421
416
|
delete_sweep: string;
|
|
422
|
-
delivery_dining: string;
|
|
423
417
|
density_large: string;
|
|
424
418
|
density_medium: string;
|
|
425
419
|
density_small: string;
|
|
@@ -524,10 +518,6 @@ export declare const iconSynonyms: {
|
|
|
524
518
|
edit_road: string;
|
|
525
519
|
egg: string;
|
|
526
520
|
egg_alt: string;
|
|
527
|
-
eighteen_mp: string;
|
|
528
|
-
eight_k: string;
|
|
529
|
-
eight_mp: string;
|
|
530
|
-
eightteen_mp: string;
|
|
531
521
|
eject: string;
|
|
532
522
|
elderly: string;
|
|
533
523
|
elderly_woman: string;
|
|
@@ -540,7 +530,6 @@ export declare const iconSynonyms: {
|
|
|
540
530
|
electric_rickshaw: string;
|
|
541
531
|
electric_scooter: string;
|
|
542
532
|
elevator: string;
|
|
543
|
-
eleven_mp: string;
|
|
544
533
|
email: string;
|
|
545
534
|
e_mobiledata: string;
|
|
546
535
|
emoji_emotions: string;
|
|
@@ -580,7 +569,6 @@ export declare const iconSynonyms: {
|
|
|
580
569
|
extension: string;
|
|
581
570
|
extension_off: string;
|
|
582
571
|
face: string;
|
|
583
|
-
facebook: string;
|
|
584
572
|
face_retouching_natural: string;
|
|
585
573
|
face_retouching_off: string;
|
|
586
574
|
fact_check: string;
|
|
@@ -604,7 +592,6 @@ export declare const iconSynonyms: {
|
|
|
604
592
|
fiber_new: string;
|
|
605
593
|
fiber_pin: string;
|
|
606
594
|
fiber_smart_record: string;
|
|
607
|
-
fifteen_mp: string;
|
|
608
595
|
file_copy: string;
|
|
609
596
|
file_download: string;
|
|
610
597
|
file_download_done: string;
|
|
@@ -641,14 +628,8 @@ export declare const iconSynonyms: {
|
|
|
641
628
|
fire_extinguisher: string;
|
|
642
629
|
fireplace: string;
|
|
643
630
|
first_page: string;
|
|
644
|
-
fitbit: string;
|
|
645
631
|
fitness_center: string;
|
|
646
632
|
fit_screen: string;
|
|
647
|
-
five_g: string;
|
|
648
|
-
five_k: string;
|
|
649
|
-
five_k_plus: string;
|
|
650
|
-
five_mp: string;
|
|
651
|
-
fivteen_mp: string;
|
|
652
633
|
flag: string;
|
|
653
634
|
flag_circle: string;
|
|
654
635
|
flaky: string;
|
|
@@ -717,11 +698,6 @@ export declare const iconSynonyms: {
|
|
|
717
698
|
forward_5: string;
|
|
718
699
|
forward_to_inbox: string;
|
|
719
700
|
foundation: string;
|
|
720
|
-
four_g_mobiledata: string;
|
|
721
|
-
four_g_plus_mobiledata: string;
|
|
722
|
-
four_k: string;
|
|
723
|
-
four_mp: string;
|
|
724
|
-
fourteen_mp: string;
|
|
725
701
|
free_breakfast: string;
|
|
726
702
|
fullscreen: string;
|
|
727
703
|
fullscreen_exit: string;
|
|
@@ -737,10 +713,8 @@ export declare const iconSynonyms: {
|
|
|
737
713
|
gif_box: string;
|
|
738
714
|
girl: string;
|
|
739
715
|
gite: string;
|
|
740
|
-
git_hub: string;
|
|
741
716
|
g_mobiledata: string;
|
|
742
717
|
golf_course: string;
|
|
743
|
-
google: string;
|
|
744
718
|
gpp_bad: string;
|
|
745
719
|
gpp_good: string;
|
|
746
720
|
gpp_maybe: string;
|
|
@@ -753,8 +727,6 @@ export declare const iconSynonyms: {
|
|
|
753
727
|
grain: string;
|
|
754
728
|
graphic_eq: string;
|
|
755
729
|
grass: string;
|
|
756
|
-
grid3x3: string;
|
|
757
|
-
grid4x4: string;
|
|
758
730
|
grid_goldenratio: string;
|
|
759
731
|
grid_off: string;
|
|
760
732
|
grid_on: string;
|
|
@@ -799,7 +771,6 @@ export declare const iconSynonyms: {
|
|
|
799
771
|
hide_image: string;
|
|
800
772
|
hide_source: string;
|
|
801
773
|
highlight: string;
|
|
802
|
-
highlight_alt: string;
|
|
803
774
|
highlight_off: string;
|
|
804
775
|
high_quality: string;
|
|
805
776
|
hiking: string;
|
|
@@ -859,14 +830,12 @@ export declare const iconSynonyms: {
|
|
|
859
830
|
insert_page_break: string;
|
|
860
831
|
insert_photo: string;
|
|
861
832
|
insights: string;
|
|
862
|
-
instagram: string;
|
|
863
833
|
install_desktop: string;
|
|
864
834
|
install_mobile: string;
|
|
865
835
|
integration_instructions: string;
|
|
866
836
|
interests: string;
|
|
867
837
|
interpreter_mode: string;
|
|
868
838
|
inventory: string;
|
|
869
|
-
inventory2: string;
|
|
870
839
|
invert_colors: string;
|
|
871
840
|
invert_colors_off: string;
|
|
872
841
|
ios_share: string;
|
|
@@ -936,7 +905,6 @@ export declare const iconSynonyms: {
|
|
|
936
905
|
line_weight: string;
|
|
937
906
|
link: string;
|
|
938
907
|
linked_camera: string;
|
|
939
|
-
linked_in: string;
|
|
940
908
|
link_off: string;
|
|
941
909
|
liquor: string;
|
|
942
910
|
list: string;
|
|
@@ -1065,7 +1033,6 @@ export declare const iconSynonyms: {
|
|
|
1065
1033
|
monochrome_photos: string;
|
|
1066
1034
|
mood: string;
|
|
1067
1035
|
mood_bad: string;
|
|
1068
|
-
moped: string;
|
|
1069
1036
|
more: string;
|
|
1070
1037
|
more_horiz: string;
|
|
1071
1038
|
more_time: string;
|
|
@@ -1113,13 +1080,8 @@ export declare const iconSynonyms: {
|
|
|
1113
1080
|
nightlight_round: string;
|
|
1114
1081
|
night_shelter: string;
|
|
1115
1082
|
nights_stay: string;
|
|
1116
|
-
nine_k: string;
|
|
1117
|
-
nine_k_plus: string;
|
|
1118
|
-
nine_mp: string;
|
|
1119
|
-
nineteen_mp: string;
|
|
1120
1083
|
no_accounts: string;
|
|
1121
1084
|
no_backpack: string;
|
|
1122
|
-
no_cell: string;
|
|
1123
1085
|
no_drinks: string;
|
|
1124
1086
|
no_encryption: string;
|
|
1125
1087
|
no_encryption_gmailerrorred: string;
|
|
@@ -1157,9 +1119,6 @@ export declare const iconSynonyms: {
|
|
|
1157
1119
|
oil_barrel: string;
|
|
1158
1120
|
ondemand_video: string;
|
|
1159
1121
|
on_device_training: string;
|
|
1160
|
-
one_k: string;
|
|
1161
|
-
one_kk: string;
|
|
1162
|
-
one_k_plus: string;
|
|
1163
1122
|
online_prediction: string;
|
|
1164
1123
|
opacity: string;
|
|
1165
1124
|
open_in_browser: string;
|
|
@@ -1181,13 +1140,9 @@ export declare const iconSynonyms: {
|
|
|
1181
1140
|
panorama: string;
|
|
1182
1141
|
panorama_fish_eye: string;
|
|
1183
1142
|
panorama_horizontal: string;
|
|
1184
|
-
panorama_horizontal_select: string;
|
|
1185
1143
|
panorama_photosphere: string;
|
|
1186
|
-
panorama_photosphere_select: string;
|
|
1187
1144
|
panorama_vertical: string;
|
|
1188
|
-
panorama_vertical_select: string;
|
|
1189
1145
|
panorama_wide_angle: string;
|
|
1190
|
-
panorama_wide_angle_select: string;
|
|
1191
1146
|
pan_tool: string;
|
|
1192
1147
|
paragliding: string;
|
|
1193
1148
|
park: string;
|
|
@@ -1271,16 +1226,11 @@ export declare const iconSynonyms: {
|
|
|
1271
1226
|
pin: string;
|
|
1272
1227
|
pinch: string;
|
|
1273
1228
|
pin_drop: string;
|
|
1274
|
-
pinterest: string;
|
|
1275
1229
|
pivot_table_chart: string;
|
|
1276
|
-
pix: string;
|
|
1277
1230
|
place: string;
|
|
1278
1231
|
plagiarism: string;
|
|
1279
1232
|
play_arrow: string;
|
|
1280
1233
|
play_circle: string;
|
|
1281
|
-
play_circle_filled: string;
|
|
1282
|
-
play_circle_filled_white: string;
|
|
1283
|
-
play_circle_outline: string;
|
|
1284
1234
|
play_disabled: string;
|
|
1285
1235
|
play_for_work: string;
|
|
1286
1236
|
play_lesson: string;
|
|
@@ -1353,7 +1303,6 @@ export declare const iconSynonyms: {
|
|
|
1353
1303
|
recommend: string;
|
|
1354
1304
|
record_voice_over: string;
|
|
1355
1305
|
rectangle: string;
|
|
1356
|
-
reddit: string;
|
|
1357
1306
|
redeem: string;
|
|
1358
1307
|
redo: string;
|
|
1359
1308
|
reduce_capacity: string;
|
|
@@ -1496,10 +1445,6 @@ export declare const iconSynonyms: {
|
|
|
1496
1445
|
settings_suggest: string;
|
|
1497
1446
|
settings_system_daydream: string;
|
|
1498
1447
|
settings_voice: string;
|
|
1499
|
-
seven_k: string;
|
|
1500
|
-
seven_k_plus: string;
|
|
1501
|
-
seven_mp: string;
|
|
1502
|
-
seventeen_mp: string;
|
|
1503
1448
|
share: string;
|
|
1504
1449
|
share_location: string;
|
|
1505
1450
|
shield: string;
|
|
@@ -1522,19 +1467,13 @@ export declare const iconSynonyms: {
|
|
|
1522
1467
|
signal_cellular_4_bar: string;
|
|
1523
1468
|
signal_cellular_alt: string;
|
|
1524
1469
|
signal_cellular_connected_no_internet_0_bar: string;
|
|
1525
|
-
signal_cellular_connected_no_internet_1_bar: string;
|
|
1526
|
-
signal_cellular_connected_no_internet_2_bar: string;
|
|
1527
|
-
signal_cellular_connected_no_internet_3_bar: string;
|
|
1528
1470
|
signal_cellular_connected_no_internet_4_bar: string;
|
|
1529
1471
|
signal_cellular_nodata: string;
|
|
1530
1472
|
signal_cellular_no_sim: string;
|
|
1531
1473
|
signal_cellular_null: string;
|
|
1532
1474
|
signal_cellular_off: string;
|
|
1533
1475
|
signal_wifi_bad: string;
|
|
1534
|
-
signal_wifi_connected_no_internet4: string;
|
|
1535
1476
|
signal_wifi_off: string;
|
|
1536
|
-
signal_wifi_statusbar4_bar: string;
|
|
1537
|
-
signal_wifi_statusbar_connected_no_internet4: string;
|
|
1538
1477
|
signal_wifi_statusbar_null: string;
|
|
1539
1478
|
signpost: string;
|
|
1540
1479
|
sim_card: string;
|
|
@@ -1542,12 +1481,6 @@ export declare const iconSynonyms: {
|
|
|
1542
1481
|
sim_card_download: string;
|
|
1543
1482
|
single_bed: string;
|
|
1544
1483
|
sip: string;
|
|
1545
|
-
six_k: string;
|
|
1546
|
-
six_k_plus: string;
|
|
1547
|
-
six_mp: string;
|
|
1548
|
-
sixteen_mp: string;
|
|
1549
|
-
sixty_fps: string;
|
|
1550
|
-
sixty_fps_select: string;
|
|
1551
1484
|
skateboarding: string;
|
|
1552
1485
|
skip_next: string;
|
|
1553
1486
|
skip_previous: string;
|
|
@@ -1618,10 +1551,8 @@ export declare const iconSynonyms: {
|
|
|
1618
1551
|
stairs: string;
|
|
1619
1552
|
star: string;
|
|
1620
1553
|
star_border: string;
|
|
1621
|
-
star_border_purple_500: string;
|
|
1622
1554
|
star_half: string;
|
|
1623
1555
|
star_outline: string;
|
|
1624
|
-
star_purple_500: string;
|
|
1625
1556
|
star_rate: string;
|
|
1626
1557
|
stars: string;
|
|
1627
1558
|
start: string;
|
|
@@ -1709,8 +1640,6 @@ export declare const iconSynonyms: {
|
|
|
1709
1640
|
task: string;
|
|
1710
1641
|
task_alt: string;
|
|
1711
1642
|
taxi_alert: string;
|
|
1712
|
-
telegram: string;
|
|
1713
|
-
ten_mp: string;
|
|
1714
1643
|
terminal: string;
|
|
1715
1644
|
terrain: string;
|
|
1716
1645
|
text_decrease: string;
|
|
@@ -1730,16 +1659,6 @@ export declare const iconSynonyms: {
|
|
|
1730
1659
|
theaters: string;
|
|
1731
1660
|
thermostat: string;
|
|
1732
1661
|
thermostat_auto: string;
|
|
1733
|
-
thirteen_mp: string;
|
|
1734
|
-
thirty_fps: string;
|
|
1735
|
-
thirty_fps_select: string;
|
|
1736
|
-
three_d_rotation: string;
|
|
1737
|
-
three_g_mobiledata: string;
|
|
1738
|
-
three_k: string;
|
|
1739
|
-
three_k_plus: string;
|
|
1740
|
-
three_mp: string;
|
|
1741
|
-
three_p: string;
|
|
1742
|
-
three_sixty: string;
|
|
1743
1662
|
thumb_down: string;
|
|
1744
1663
|
thumb_down_alt: string;
|
|
1745
1664
|
thumb_down_off_alt: string;
|
|
@@ -1755,7 +1674,6 @@ export declare const iconSynonyms: {
|
|
|
1755
1674
|
timer_3: string;
|
|
1756
1675
|
timer_3_select: string;
|
|
1757
1676
|
timer_off: string;
|
|
1758
|
-
times_one_mobiledata: string;
|
|
1759
1677
|
time_to_leave: string;
|
|
1760
1678
|
tips_and_updates: string;
|
|
1761
1679
|
title: string;
|
|
@@ -1799,16 +1717,6 @@ export declare const iconSynonyms: {
|
|
|
1799
1717
|
turn_slight_right: string;
|
|
1800
1718
|
tv: string;
|
|
1801
1719
|
tv_off: string;
|
|
1802
|
-
twelve_mp: string;
|
|
1803
|
-
twenty_four_mp: string;
|
|
1804
|
-
twenty_one_mp: string;
|
|
1805
|
-
twenty_three_mp: string;
|
|
1806
|
-
twenty_two_mp: string;
|
|
1807
|
-
twenty_zero_mp: string;
|
|
1808
|
-
twitter: string;
|
|
1809
|
-
two_k: string;
|
|
1810
|
-
two_k_plus: string;
|
|
1811
|
-
two_mp: string;
|
|
1812
1720
|
two_wheeler: string;
|
|
1813
1721
|
umbrella: string;
|
|
1814
1722
|
unarchive: string;
|
|
@@ -1938,7 +1846,6 @@ export declare const iconSynonyms: {
|
|
|
1938
1846
|
wrong_location: string;
|
|
1939
1847
|
wysiwyg: string;
|
|
1940
1848
|
yard: string;
|
|
1941
|
-
you_tube: string;
|
|
1942
1849
|
youtube_searched_for: string;
|
|
1943
1850
|
zoom_in: string;
|
|
1944
1851
|
zoom_in_map: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArrayProperty, CMSType, EntityCollection, EntityCustomView, EntityValues, EnumValueConfig, EnumValues, NumberProperty, PropertiesOrBuilders, PropertyConfig, PropertyOrBuilder, ResolvedArrayProperty, ResolvedEntityCollection, ResolvedNumberProperty, ResolvedProperties, ResolvedProperty, ResolvedStringProperty, StringProperty, UserConfigurationPersistence } from "../types";
|
|
2
|
-
export declare const resolveCollection: <M extends Record<string, any>>({ collection, path, entityId, values, previousValues, userConfigPersistence, fields }: {
|
|
2
|
+
export declare const resolveCollection: <M extends Record<string, any>>({ collection, path, entityId, values, previousValues, userConfigPersistence, fields, ignoreMissingFields }: {
|
|
3
3
|
collection: EntityCollection<M> | ResolvedEntityCollection<M>;
|
|
4
4
|
path: string;
|
|
5
5
|
entityId?: string;
|
|
@@ -7,13 +7,14 @@ export declare const resolveCollection: <M extends Record<string, any>>({ collec
|
|
|
7
7
|
previousValues?: Partial<EntityValues<M>>;
|
|
8
8
|
userConfigPersistence?: UserConfigurationPersistence;
|
|
9
9
|
fields?: Record<string, PropertyConfig>;
|
|
10
|
+
ignoreMissingFields?: boolean;
|
|
10
11
|
}) => ResolvedEntityCollection<M>;
|
|
11
12
|
/**
|
|
12
13
|
* Resolve property builders, enums and arrays.
|
|
13
14
|
* @param propertyOrBuilder
|
|
14
15
|
* @param propertyValue
|
|
15
16
|
*/
|
|
16
|
-
export declare function resolveProperty<T extends CMSType = CMSType, M extends Record<string, any> = any>({ propertyOrBuilder, fromBuilder, ...props }: {
|
|
17
|
+
export declare function resolveProperty<T extends CMSType = CMSType, M extends Record<string, any> = any>({ propertyOrBuilder, fromBuilder, ignoreMissingFields, ...props }: {
|
|
17
18
|
propertyKey?: string;
|
|
18
19
|
propertyOrBuilder: PropertyOrBuilder<T, M> | ResolvedProperty<T>;
|
|
19
20
|
values?: Partial<M>;
|
|
@@ -23,8 +24,9 @@ export declare function resolveProperty<T extends CMSType = CMSType, M extends R
|
|
|
23
24
|
index?: number;
|
|
24
25
|
fromBuilder?: boolean;
|
|
25
26
|
fields?: Record<string, PropertyConfig<any>>;
|
|
27
|
+
ignoreMissingFields?: boolean;
|
|
26
28
|
}): ResolvedProperty<T> | null;
|
|
27
|
-
export declare function resolveArrayProperty<T extends any[], M>({ propertyKey, property, ...props }: {
|
|
29
|
+
export declare function resolveArrayProperty<T extends any[], M>({ propertyKey, property, ignoreMissingFields, ...props }: {
|
|
28
30
|
propertyKey?: string;
|
|
29
31
|
property: ArrayProperty<T> | ResolvedArrayProperty<T>;
|
|
30
32
|
values?: Partial<M>;
|
|
@@ -34,13 +36,14 @@ export declare function resolveArrayProperty<T extends any[], M>({ propertyKey,
|
|
|
34
36
|
index?: number;
|
|
35
37
|
fromBuilder?: boolean;
|
|
36
38
|
fields?: Record<string, PropertyConfig>;
|
|
39
|
+
ignoreMissingFields?: boolean;
|
|
37
40
|
}): ResolvedArrayProperty;
|
|
38
41
|
/**
|
|
39
42
|
* Resolve enums and arrays for properties
|
|
40
43
|
* @param properties
|
|
41
44
|
* @param value
|
|
42
45
|
*/
|
|
43
|
-
export declare function resolveProperties<M extends Record<string, any>>({ properties, ...props }: {
|
|
46
|
+
export declare function resolveProperties<M extends Record<string, any>>({ properties, ignoreMissingFields, ...props }: {
|
|
44
47
|
properties: PropertiesOrBuilders<M>;
|
|
45
48
|
values?: Partial<M>;
|
|
46
49
|
previousValues?: Partial<M>;
|
|
@@ -49,6 +52,7 @@ export declare function resolveProperties<M extends Record<string, any>>({ prope
|
|
|
49
52
|
index?: number;
|
|
50
53
|
fromBuilder?: boolean;
|
|
51
54
|
fields?: Record<string, PropertyConfig>;
|
|
55
|
+
ignoreMissingFields?: boolean;
|
|
52
56
|
}): ResolvedProperties<M>;
|
|
53
57
|
/**
|
|
54
58
|
* Resolve enum aliases for a string or number property
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firecms/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-canary.
|
|
4
|
+
"version": "3.0.0-canary.52",
|
|
5
5
|
"description": "Awesome Firebase/Firestore-based headless open-source CMS",
|
|
6
6
|
"funding": {
|
|
7
7
|
"url": "https://github.com/sponsors/firecmsco"
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"./package.json": "./package.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@firecms/formex": "^3.0.0-canary.
|
|
50
|
-
"@firecms/ui": "^3.0.0-canary.
|
|
49
|
+
"@firecms/formex": "^3.0.0-canary.52",
|
|
50
|
+
"@firecms/ui": "^3.0.0-canary.52",
|
|
51
51
|
"@fontsource/jetbrains-mono": "^5.0.20",
|
|
52
52
|
"@hello-pangea/dnd": "^16.6.0",
|
|
53
53
|
"@radix-ui/react-portal": "^1.0.4",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"dist",
|
|
112
112
|
"src"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "f48ab87b5a5ad7f68ee4093aa1d624b0bddd7589",
|
|
115
115
|
"publishConfig": {
|
|
116
116
|
"access": "public"
|
|
117
117
|
},
|
|
@@ -66,11 +66,7 @@ import {
|
|
|
66
66
|
} from "../common";
|
|
67
67
|
import { PopupFormField } from "../EntityCollectionTable/internal/popup_field/PopupFormField";
|
|
68
68
|
import { GetPropertyForProps } from "../EntityCollectionTable/EntityCollectionTableProps";
|
|
69
|
-
import {
|
|
70
|
-
copyEntityAction,
|
|
71
|
-
deleteEntityAction,
|
|
72
|
-
editEntityAction
|
|
73
|
-
} from "../EntityCollectionTable/internal/default_entity_actions";
|
|
69
|
+
import { copyEntityAction, deleteEntityAction, editEntityAction } from "../common/default_entity_actions";
|
|
74
70
|
import { DeleteEntityDialog } from "../DeleteEntityDialog";
|
|
75
71
|
import { useAnalyticsController } from "../../hooks/useAnalyticsController";
|
|
76
72
|
import { useSelectionController } from "./useSelectionController";
|
|
@@ -417,7 +413,7 @@ export const EntityCollectionView = React.memo(
|
|
|
417
413
|
Builder: ({ entity }) => {
|
|
418
414
|
const collectionsWithPath = navigation.getParentReferencesFromPath(entity.path);
|
|
419
415
|
return (
|
|
420
|
-
|
|
416
|
+
<div className={"flex flex-col gap-2 w-full"}>
|
|
421
417
|
{collectionsWithPath.map((reference) => {
|
|
422
418
|
return (
|
|
423
419
|
<ReferencePreview
|
|
@@ -426,7 +422,7 @@ export const EntityCollectionView = React.memo(
|
|
|
426
422
|
size={"tiny"}/>
|
|
427
423
|
);
|
|
428
424
|
})}
|
|
429
|
-
|
|
425
|
+
</div>
|
|
430
426
|
);
|
|
431
427
|
}
|
|
432
428
|
}]
|
|
@@ -31,7 +31,7 @@ export function EntityView<M extends Record<string, any>>(
|
|
|
31
31
|
entityId: entity.id,
|
|
32
32
|
values: entity.values,
|
|
33
33
|
fields: customizationController.propertyConfigs
|
|
34
|
-
}), [collection, path, entity]);
|
|
34
|
+
}), [collection, path, entity, customizationController.propertyConfigs]);
|
|
35
35
|
|
|
36
36
|
const properties: ResolvedProperties = resolvedCollection.properties;
|
|
37
37
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ContentCopyIcon, IconButton, Typography } from "@firecms/ui";
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
|
|
4
4
|
export function PropertyIdCopyTooltipContent({ propertyId }: { propertyId: string }) {
|
|
@@ -12,9 +12,8 @@ export function PropertyIdCopyTooltipContent({ propertyId }: { propertyId: strin
|
|
|
12
12
|
color={"disabled"}>{copied ? "Copied" : "Property ID"}</Typography>
|
|
13
13
|
<Typography variant={"caption"} className={"text-white"}><code>{propertyId}</code></Typography>
|
|
14
14
|
</div>
|
|
15
|
-
{/* Copy to clipboard button*/}
|
|
16
15
|
<IconButton size={"small"}>
|
|
17
|
-
<
|
|
16
|
+
<ContentCopyIcon size={"smallest"}
|
|
18
17
|
className={"text-white"}
|
|
19
18
|
onClick={useCallback(() => {
|
|
20
19
|
navigator.clipboard.writeText(propertyId);
|
|
@@ -122,7 +122,7 @@ export function ReferenceWidget<M extends Record<string, any>>({
|
|
|
122
122
|
size={size}/>
|
|
123
123
|
|
|
124
124
|
}
|
|
125
|
-
return <div className={cn("text-sm font-medium
|
|
125
|
+
return <div className={cn("text-sm font-medium",
|
|
126
126
|
"min-w-80 flex flex-col gap-4",
|
|
127
127
|
"relative transition-colors duration-200 ease-in rounded font-medium",
|
|
128
128
|
disabled ? "bg-opacity-50" : "hover:bg-opacity-75",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EntityAction } from "../../../types";
|
|
2
1
|
import { ArchiveIcon, DeleteIcon, FileCopyIcon, KeyboardTabIcon, OpenInNewIcon } from "@firecms/ui";
|
|
3
|
-
import {
|
|
2
|
+
import { EntityAction } from "../../types";
|
|
3
|
+
import { DeleteEntityDialog } from "../DeleteEntityDialog";
|
|
4
4
|
|
|
5
5
|
export const editEntityAction: EntityAction = {
|
|
6
6
|
icon: <KeyboardTabIcon/>,
|
|
@@ -7,8 +7,16 @@ const COLLECTION_GROUP_PARENT_ID = "collectionGroupParent";
|
|
|
7
7
|
|
|
8
8
|
export function useColumnIds<M extends Record<string, any>>(collection: ResolvedEntityCollection<M>, includeSubcollections: boolean): PropertyColumnConfig[] {
|
|
9
9
|
return useMemo(() => {
|
|
10
|
-
if (collection.propertiesOrder)
|
|
11
|
-
|
|
10
|
+
if (collection.propertiesOrder) {
|
|
11
|
+
const propertyColumnConfigs = hideAndExpandKeys(collection, collection.propertiesOrder);
|
|
12
|
+
if (collection.collectionGroup) {
|
|
13
|
+
propertyColumnConfigs.push({
|
|
14
|
+
key: COLLECTION_GROUP_PARENT_ID,
|
|
15
|
+
disabled: true
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return propertyColumnConfigs;
|
|
19
|
+
}
|
|
12
20
|
return getDefaultColumnKeys(collection, includeSubcollections);
|
|
13
21
|
}, [collection, includeSubcollections]);
|
|
14
22
|
}
|
package/src/core/Drawer.tsx
CHANGED
|
@@ -2,31 +2,37 @@ import React, { useCallback } from "react";
|
|
|
2
2
|
|
|
3
3
|
import { useLargeLayout, useNavigationController } from "../hooks";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { useNavigate } from "react-router-dom";
|
|
6
6
|
import { CMSAnalyticsEvent, TopNavigationEntry, TopNavigationResult } from "../types";
|
|
7
7
|
import { IconForView } from "../util";
|
|
8
8
|
import { cn, IconButton, Menu, MenuItem, MoreVertIcon, Tooltip, Typography } from "@firecms/ui";
|
|
9
9
|
import { useAnalyticsController } from "../hooks/useAnalyticsController";
|
|
10
|
+
import { useDrawer } from "./Scaffold";
|
|
11
|
+
import { DrawerNavigationItem } from "./DrawerNavigationItem";
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Props used in case you need to override the default drawer
|
|
13
15
|
* @group Core
|
|
14
16
|
*/
|
|
15
|
-
export type DrawerProps
|
|
17
|
+
export type DrawerProps = {
|
|
16
18
|
hovered: boolean,
|
|
17
19
|
drawerOpen: boolean,
|
|
18
|
-
|
|
20
|
+
openDrawer: () => void,
|
|
21
|
+
closeDrawer: () => void,
|
|
22
|
+
autoOpenDrawer?: boolean
|
|
19
23
|
}
|
|
20
24
|
|
|
21
25
|
/**
|
|
22
26
|
* Default drawer used in the CMS
|
|
23
27
|
* @group Core
|
|
24
28
|
*/
|
|
25
|
-
export function Drawer({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
export function Drawer() {
|
|
30
|
+
|
|
31
|
+
const {
|
|
32
|
+
hovered,
|
|
33
|
+
drawerOpen,
|
|
34
|
+
closeDrawer,
|
|
35
|
+
} = useDrawer();
|
|
30
36
|
|
|
31
37
|
const analyticsController = useAnalyticsController();
|
|
32
38
|
const navigation = useNavigationController();
|
|
@@ -131,61 +137,3 @@ export function Drawer({
|
|
|
131
137
|
</>
|
|
132
138
|
);
|
|
133
139
|
}
|
|
134
|
-
|
|
135
|
-
export function DrawerNavigationItem({
|
|
136
|
-
name,
|
|
137
|
-
icon,
|
|
138
|
-
drawerOpen,
|
|
139
|
-
tooltipsOpen,
|
|
140
|
-
url,
|
|
141
|
-
onClick
|
|
142
|
-
}: {
|
|
143
|
-
icon: React.ReactElement,
|
|
144
|
-
name: string,
|
|
145
|
-
tooltipsOpen: boolean,
|
|
146
|
-
drawerOpen: boolean,
|
|
147
|
-
url: string,
|
|
148
|
-
onClick?: () => void,
|
|
149
|
-
}) {
|
|
150
|
-
|
|
151
|
-
const iconWrap = <div
|
|
152
|
-
className={"text-gray-600 dark:text-gray-500"}>
|
|
153
|
-
{icon}
|
|
154
|
-
</div>;
|
|
155
|
-
|
|
156
|
-
const listItem = <NavLink
|
|
157
|
-
onClick={onClick}
|
|
158
|
-
style={{
|
|
159
|
-
width: !drawerOpen ? "72px" : "280px",
|
|
160
|
-
transition: drawerOpen ? "width 150ms ease-in" : undefined
|
|
161
|
-
}}
|
|
162
|
-
className={({ isActive }: any) => cn("rounded-r-xl truncate",
|
|
163
|
-
"hover:bg-slate-300 hover:bg-opacity-75 dark:hover:bg-gray-700 dark:hover:bg-opacity-75 text-gray-800 dark:text-gray-200 hover:text-gray-900 hover:dark:text-white",
|
|
164
|
-
"flex flex-row items-center mr-8",
|
|
165
|
-
// "transition-all ease-in-out delay-100 duration-300",
|
|
166
|
-
// drawerOpen ? "w-full" : "w-18",
|
|
167
|
-
drawerOpen ? "pl-8 h-12" : "pl-6 h-11",
|
|
168
|
-
"font-medium text-sm",
|
|
169
|
-
isActive ? "bg-slate-200 bg-opacity-75 dark:bg-gray-800" : ""
|
|
170
|
-
)}
|
|
171
|
-
to={url}
|
|
172
|
-
>
|
|
173
|
-
|
|
174
|
-
{iconWrap}
|
|
175
|
-
|
|
176
|
-
<div
|
|
177
|
-
className={cn(
|
|
178
|
-
drawerOpen ? "opacity-100" : "opacity-0 hidden",
|
|
179
|
-
"ml-4 font-inherit text-inherit"
|
|
180
|
-
)}>
|
|
181
|
-
{name.toUpperCase()}
|
|
182
|
-
</div>
|
|
183
|
-
</NavLink>;
|
|
184
|
-
|
|
185
|
-
return <Tooltip
|
|
186
|
-
open={drawerOpen ? false : tooltipsOpen}
|
|
187
|
-
side="right"
|
|
188
|
-
title={name}>
|
|
189
|
-
{listItem}
|
|
190
|
-
</Tooltip>;
|
|
191
|
-
}
|