@firecms/core 3.2.0 → 3.3.0-canary.102f274
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/app/AppBar.d.ts +1 -1
- package/dist/app/Drawer.d.ts +1 -1
- package/dist/components/AIIcon.d.ts +3 -2
- package/dist/components/ArrayContainer.d.ts +3 -3
- package/dist/components/CircularProgressCenter.d.ts +2 -1
- package/dist/components/ClearFilterSortButton.d.ts +1 -1
- package/dist/components/ConfirmationDialog.d.ts +1 -1
- package/dist/components/DeleteEntityDialog.d.ts +2 -1
- package/dist/components/EntityCollectionTable/EntityCollectionRowActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/EntityCollectionTable.d.ts +2 -1
- package/dist/components/EntityCollectionTable/fields/TableReferenceField.d.ts +1 -1
- package/dist/components/EntityCollectionTable/fields/TableStorageUpload.d.ts +2 -2
- package/dist/components/EntityCollectionTable/internal/CollectionTableToolbar.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/EntityTableCellActions.d.ts +1 -1
- package/dist/components/EntityCollectionTable/internal/popup_field/PopupFormField.d.ts +4 -3
- package/dist/components/EntityCollectionView/Board.d.ts +2 -1
- package/dist/components/EntityCollectionView/BoardColumnTitle.d.ts +1 -1
- package/dist/components/EntityCollectionView/BoardSortableList.d.ts +1 -1
- package/dist/components/EntityCollectionView/CollectionDataErrorBanner.d.ts +2 -1
- package/dist/components/EntityCollectionView/EntityBoardCard.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCard.d.ts +2 -1
- package/dist/components/EntityCollectionView/EntityCollectionBoardView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionCardView.d.ts +1 -1
- package/dist/components/EntityCollectionView/EntityCollectionViewActions.d.ts +2 -1
- package/dist/components/EntityCollectionView/EntityCollectionViewStartActions.d.ts +2 -1
- package/dist/components/EntityCollectionView/FiltersDialog.d.ts +2 -1
- package/dist/components/EntityCollectionView/ViewModeToggle.d.ts +2 -1
- package/dist/components/EntityJsonPreview.d.ts +2 -1
- package/dist/components/EntityPreview.d.ts +1 -1
- package/dist/components/EntityView.d.ts +2 -1
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/ErrorTooltip.d.ts +2 -1
- package/dist/components/FieldCaption.d.ts +1 -1
- package/dist/components/FireCMSLogo.d.ts +1 -1
- package/dist/components/HomePage/DefaultHomePage.d.ts +1 -1
- package/dist/components/HomePage/FavouritesView.d.ts +1 -1
- package/dist/components/HomePage/HomePageDnD.d.ts +4 -4
- package/dist/components/HomePage/NavigationCardBinding.d.ts +2 -1
- package/dist/components/HomePage/NavigationGroup.d.ts +2 -2
- package/dist/components/HomePage/RenameGroupDialog.d.ts +2 -1
- package/dist/components/HomePage/SmallNavigationCard.d.ts +1 -1
- package/dist/components/LanguageToggle.d.ts +2 -1
- package/dist/components/NotFoundPage.d.ts +2 -1
- package/dist/components/PropertyCollectionView.d.ts +2 -1
- package/dist/components/PropertyIdCopyTooltip.d.ts +2 -2
- package/dist/components/ReferenceTable/ReferenceSelectionTable.d.ts +1 -1
- package/dist/components/ReferenceWidget.d.ts +2 -1
- package/dist/components/SearchIconsView.d.ts +2 -1
- package/dist/components/SelectableTable/SelectableTable.d.ts +1 -1
- package/dist/components/SelectableTable/filters/BooleanFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/DateTimeFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/ReferenceFilterField.d.ts +2 -1
- package/dist/components/SelectableTable/filters/StringNumberFilterField.d.ts +2 -1
- package/dist/components/UnsavedChangesDialog.d.ts +1 -1
- package/dist/components/UserDisplay.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableHeader.d.ts +1 -0
- package/dist/components/VirtualTable/VirtualTableHeaderRow.d.ts +2 -1
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +6 -1
- package/dist/components/VirtualTable/fields/VirtualTableDateField.d.ts +1 -1
- package/dist/components/VirtualTable/fields/VirtualTableInput.d.ts +2 -1
- package/dist/components/VirtualTable/fields/VirtualTableNumberInput.d.ts +2 -1
- package/dist/components/VirtualTable/fields/VirtualTableSelect.d.ts +1 -1
- package/dist/components/VirtualTable/fields/VirtualTableSwitch.d.ts +2 -1
- package/dist/components/VirtualTable/fields/VirtualTableUserSelect.d.ts +1 -1
- package/dist/components/VirtualTable/types.d.ts +1 -0
- package/dist/core/DefaultAppBar.d.ts +1 -1
- package/dist/core/DefaultDrawer.d.ts +2 -2
- package/dist/core/DrawerNavigationGroup.d.ts +1 -1
- package/dist/core/DrawerNavigationItem.d.ts +1 -1
- package/dist/core/EntityEditView.d.ts +2 -2
- package/dist/core/EntityEditViewFormActions.d.ts +2 -1
- package/dist/core/EntitySidePanel.d.ts +2 -1
- package/dist/core/FireCMS.d.ts +2 -1
- package/dist/core/FireCMSRouter.d.ts +1 -1
- package/dist/core/SideDialogs.d.ts +1 -1
- package/dist/editor/components/SlashCommandMenu.d.ts +2 -1
- package/dist/editor/editor.d.ts +1 -1
- package/dist/editor/selectors/color-selector.d.ts +1 -1
- package/dist/editor/selectors/link-selector.d.ts +1 -1
- package/dist/editor/selectors/node-selector.d.ts +1 -1
- package/dist/editor/selectors/text-buttons.d.ts +1 -1
- package/dist/form/EntityForm.d.ts +1 -1
- package/dist/form/EntityFormActions.d.ts +1 -1
- package/dist/form/components/CustomIdField.d.ts +2 -1
- package/dist/form/components/FieldHelperText.d.ts +1 -1
- package/dist/form/components/FormEntry.d.ts +1 -1
- package/dist/form/components/FormLayout.d.ts +1 -1
- package/dist/form/components/LabelWithIconAndTooltip.d.ts +1 -1
- package/dist/form/components/LocalChangesMenu.d.ts +2 -1
- package/dist/form/components/StorageItemPreview.d.ts +2 -1
- package/dist/form/components/StorageUploadProgress.d.ts +2 -1
- package/dist/form/field_bindings/ArrayCustomShapedFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ArrayOfReferencesFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/BlockFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/DateTimeFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/KeyValueFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MapFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/MarkdownEditorFieldBinding.d.ts +3 -2
- package/dist/form/field_bindings/MultiSelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReadOnlyFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReferenceAsStringFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/ReferenceFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/RepeatFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/SelectFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/StorageUploadFieldBinding.d.ts +3 -2
- package/dist/form/field_bindings/SwitchFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/TextFieldBinding.d.ts +2 -1
- package/dist/form/field_bindings/UserSelectFieldBinding.d.ts +2 -1
- package/dist/i18n/FireCMSi18nProvider.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +24392 -23648
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +23301 -22557
- package/dist/index.umd.js.map +1 -1
- package/dist/preview/components/ArrayEnumPreview.d.ts +2 -1
- package/dist/preview/components/AsyncPreviewComponent.d.ts +1 -1
- package/dist/preview/components/EmptyValue.d.ts +2 -1
- package/dist/preview/components/EnumValuesChip.d.ts +1 -1
- package/dist/preview/components/ImagePreview.d.ts +2 -1
- package/dist/preview/components/ReferencePreview.d.ts +1 -1
- package/dist/preview/components/StorageThumbnail.d.ts +1 -1
- package/dist/preview/components/UserPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOfMapsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOfReferencesPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayOfStorageComponentsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOfStringsPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayOneOfPreview.d.ts +2 -1
- package/dist/preview/property_previews/ArrayPropertyEnumPreview.d.ts +1 -1
- package/dist/preview/property_previews/ArrayPropertyPreview.d.ts +2 -1
- package/dist/preview/property_previews/MapPropertyPreview.d.ts +3 -2
- package/dist/preview/property_previews/SkeletonPropertyComponent.d.ts +5 -4
- package/dist/routes/FireCMSRoute.d.ts +2 -1
- package/dist/types/collections.d.ts +38 -0
- package/dist/types/properties.d.ts +9 -8
- package/dist/types/translations.d.ts +23 -0
- package/dist/util/index.d.ts +1 -0
- package/dist/util/lazy_eager.d.ts +7 -0
- package/dist/util/objects.d.ts +1 -0
- package/dist/util/property_utils.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/EntityCollectionTable/EntityCollectionRowActions.tsx +9 -3
- package/src/components/EntityCollectionTable/internal/common.tsx +2 -2
- package/src/components/EntityCollectionView/EntityCollectionView.tsx +3 -5
- package/src/components/EntityJsonPreview.tsx +2 -1
- package/src/components/ErrorBoundary.tsx +3 -3
- package/src/components/HomePage/NavigationCardBinding.tsx +6 -3
- package/src/components/VirtualTable/VirtualTable.tsx +5 -3
- package/src/components/VirtualTable/VirtualTableHeader.tsx +9 -8
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +8 -3
- package/src/components/VirtualTable/VirtualTableProps.tsx +7 -1
- package/src/components/VirtualTable/types.tsx +1 -0
- package/src/core/DefaultDrawer.tsx +1 -1
- package/src/core/DrawerNavigationGroup.tsx +1 -1
- package/src/core/EntityEditView.tsx +50 -5
- package/src/core/EntitySidePanel.tsx +2 -1
- package/src/core/field_configs.tsx +4 -2
- package/src/editor/editor.tsx +20 -1
- package/src/editor/markdown.ts +89 -1
- package/src/form/EntityForm.tsx +64 -4
- package/src/form/PropertyFieldBinding.tsx +4 -3
- package/src/form/field_bindings/ArrayCustomShapedFieldBinding.tsx +18 -5
- package/src/form/field_bindings/ArrayOfReferencesFieldBinding.tsx +18 -5
- package/src/form/field_bindings/BlockFieldBinding.tsx +21 -7
- package/src/form/field_bindings/DateTimeFieldBinding.tsx +1 -1
- package/src/form/field_bindings/KeyValueFieldBinding.tsx +23 -6
- package/src/form/field_bindings/MapFieldBinding.tsx +23 -8
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +43 -20
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +15 -1
- package/src/form/field_bindings/ReferenceAsStringFieldBinding.tsx +25 -11
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +25 -11
- package/src/form/field_bindings/RepeatFieldBinding.tsx +18 -5
- package/src/form/field_bindings/SelectFieldBinding.tsx +7 -5
- package/src/form/field_bindings/StorageUploadFieldBinding.tsx +24 -7
- package/src/form/field_bindings/SwitchFieldBinding.tsx +31 -14
- package/src/form/field_bindings/TextFieldBinding.tsx +10 -7
- package/src/form/field_bindings/UserSelectFieldBinding.tsx +7 -5
- package/src/index.ts +1 -0
- package/src/internal/useBuildSideEntityController.tsx +1 -1
- package/src/locales/de.ts +28 -1
- package/src/locales/en.ts +27 -0
- package/src/locales/es.ts +28 -1
- package/src/locales/fr.ts +28 -1
- package/src/locales/hi.ts +28 -1
- package/src/locales/it.ts +28 -1
- package/src/locales/pt.ts +28 -1
- package/src/preview/PropertyPreview.tsx +6 -5
- package/src/preview/components/ReferencePreview.tsx +2 -1
- package/src/preview/property_previews/MapPropertyPreview.tsx +49 -27
- package/src/routes/FireCMSRoute.tsx +63 -54
- package/src/types/collections.ts +40 -0
- package/src/types/properties.ts +11 -10
- package/src/types/translations.ts +27 -0
- package/src/util/index.ts +1 -0
- package/src/util/lazy_eager.tsx +33 -0
- package/src/util/objects.ts +15 -0
package/src/types/properties.ts
CHANGED
|
@@ -180,6 +180,17 @@ export interface BaseProperty<T extends CMSType, CustomProps = any> {
|
|
|
180
180
|
* @see https://jsonlogic.com/ for JSON Logic syntax
|
|
181
181
|
*/
|
|
182
182
|
conditions?: PropertyConditions;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Set this property to true to provide the UX to explicitly set the value to `null`.
|
|
186
|
+
* Defaults to `false`.
|
|
187
|
+
*/
|
|
188
|
+
nullable?: boolean;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated Use `nullable` instead.
|
|
192
|
+
*/
|
|
193
|
+
clearable?: boolean;
|
|
183
194
|
}
|
|
184
195
|
|
|
185
196
|
/**
|
|
@@ -620,11 +631,6 @@ export interface NumberProperty extends BaseProperty<number> {
|
|
|
620
631
|
* Rules for validating this property
|
|
621
632
|
*/
|
|
622
633
|
validation?: NumberPropertyValidationSchema,
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* Add an icon to clear the value and set it to `null`. Defaults to `false`
|
|
626
|
-
*/
|
|
627
|
-
clearable?: boolean;
|
|
628
634
|
}
|
|
629
635
|
|
|
630
636
|
/**
|
|
@@ -735,11 +741,6 @@ export interface StringProperty extends BaseProperty<string> {
|
|
|
735
741
|
*/
|
|
736
742
|
validation?: StringPropertyValidationSchema;
|
|
737
743
|
|
|
738
|
-
/**
|
|
739
|
-
* Add an icon to clear the value and set it to `null`. Defaults to `false`
|
|
740
|
-
*/
|
|
741
|
-
clearable?: boolean;
|
|
742
|
-
|
|
743
744
|
/**
|
|
744
745
|
* You can use this property (a string) to behave as a reference to another
|
|
745
746
|
* collection. The stored value is the ID of the entity in the
|
|
@@ -467,6 +467,8 @@ export interface FireCMSTranslations {
|
|
|
467
467
|
cms_users: string;
|
|
468
468
|
roles_menu: string;
|
|
469
469
|
project_settings: string;
|
|
470
|
+
firestore_manager: string;
|
|
471
|
+
manage_your_firestore_data: string;
|
|
470
472
|
|
|
471
473
|
// ─── FireCMS Cloud Login ──────────────────────────────────────
|
|
472
474
|
build_admin_panel_in_minutes: string;
|
|
@@ -722,4 +724,29 @@ export interface FireCMSTranslations {
|
|
|
722
724
|
settings_appcheck_refresh_note: string;
|
|
723
725
|
settings_appcheck_updated: string;
|
|
724
726
|
settings_appcheck_error: string;
|
|
727
|
+
|
|
728
|
+
// --- Permission Error View ---
|
|
729
|
+
missing_firestore_security_rules: string;
|
|
730
|
+
firecms_cloud_requires_security_rule: string;
|
|
731
|
+
cannot_be_accessed_without_it: string;
|
|
732
|
+
required_security_rule: string;
|
|
733
|
+
fix_automatically: string;
|
|
734
|
+
open_firebase_rules: string;
|
|
735
|
+
security_rules_updated_successfully: string;
|
|
736
|
+
sec_rules_fixing: string;
|
|
737
|
+
sec_rules_fixed: string;
|
|
738
|
+
|
|
739
|
+
// ─── GCP Marketplace ─────────────────────────────────────────
|
|
740
|
+
marketplace_managed_by_gcp: string;
|
|
741
|
+
marketplace_billing_note: string;
|
|
742
|
+
marketplace_manage_in_gcp_console: string;
|
|
743
|
+
marketplace_plan_changes_note: string;
|
|
744
|
+
marketplace_welcome_title: string;
|
|
745
|
+
marketplace_welcome_subtitle: string;
|
|
746
|
+
marketplace_select_or_create_project: string;
|
|
747
|
+
marketplace_link_project: string;
|
|
748
|
+
marketplace_linking: string;
|
|
749
|
+
marketplace_link_success: string;
|
|
750
|
+
marketplace_link_error: string;
|
|
751
|
+
marketplace_no_account_id: string;
|
|
725
752
|
}
|
package/src/util/index.ts
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns a React.lazy component that is also preloaded immediately using
|
|
5
|
+
* requestIdleCallback or setTimeout.
|
|
6
|
+
* This ensures that chunks are split, but fetched in the background before they are actually needed.
|
|
7
|
+
*/
|
|
8
|
+
export function lazyEager<T extends React.ComponentType<any>>(
|
|
9
|
+
factory: () => Promise<any>,
|
|
10
|
+
exportName: string = "default"
|
|
11
|
+
): React.LazyExoticComponent<T> {
|
|
12
|
+
let promise: Promise<any> | null = null;
|
|
13
|
+
|
|
14
|
+
const load = () => {
|
|
15
|
+
if (!promise) {
|
|
16
|
+
promise = factory().then((module) => {
|
|
17
|
+
const component = module[exportName] || module.default || module;
|
|
18
|
+
return { default: component };
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return promise;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
if (typeof window !== "undefined") {
|
|
25
|
+
if ("requestIdleCallback" in window) {
|
|
26
|
+
(window as any).requestIdleCallback(load);
|
|
27
|
+
} else {
|
|
28
|
+
setTimeout(load, 500);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return React.lazy(load);
|
|
33
|
+
}
|
package/src/util/objects.ts
CHANGED
|
@@ -279,3 +279,18 @@ export function removePropsIfExisting(source: any, comparison: any) {
|
|
|
279
279
|
|
|
280
280
|
return res;
|
|
281
281
|
}
|
|
282
|
+
|
|
283
|
+
export function jsonStringifyReplacer(key: string, value: any) {
|
|
284
|
+
if (value && typeof value === "object") {
|
|
285
|
+
if (value instanceof Date) {
|
|
286
|
+
return value.toISOString();
|
|
287
|
+
}
|
|
288
|
+
if ("_seconds" in value && "_nanoseconds" in value && typeof value._seconds === "number" && typeof value._nanoseconds === "number") {
|
|
289
|
+
return new Date(value._seconds * 1000 + value._nanoseconds / 1000000).toISOString();
|
|
290
|
+
}
|
|
291
|
+
if ("seconds" in value && "nanoseconds" in value && typeof value.seconds === "number" && typeof value.nanoseconds === "number") {
|
|
292
|
+
return new Date(value.seconds * 1000 + value.nanoseconds / 1000000).toISOString();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return value;
|
|
296
|
+
}
|