@orion-studios/payload-admin-components 0.2.0-beta.10 → 0.2.0-beta.11
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.
|
@@ -464,7 +464,7 @@ function OrionBlockRow(props) {
|
|
|
464
464
|
}
|
|
465
465
|
);
|
|
466
466
|
}
|
|
467
|
-
var
|
|
467
|
+
var OrionBlocksFieldConnected = (props) => {
|
|
468
468
|
const { i18n, t } = useTranslation2();
|
|
469
469
|
const fieldFromProps = props.field;
|
|
470
470
|
const {
|
|
@@ -891,6 +891,13 @@ var OrionBlocksFieldComponent = (props) => {
|
|
|
891
891
|
}
|
|
892
892
|
);
|
|
893
893
|
};
|
|
894
|
+
var OrionBlocksFieldComponent = (props) => {
|
|
895
|
+
const configContext = useConfig();
|
|
896
|
+
if (!configContext?.config) {
|
|
897
|
+
return null;
|
|
898
|
+
}
|
|
899
|
+
return /* @__PURE__ */ jsx2(OrionBlocksFieldConnected, { ...props });
|
|
900
|
+
};
|
|
894
901
|
var OrionBlocksFieldImpl = withCondition(OrionBlocksFieldComponent);
|
|
895
902
|
export {
|
|
896
903
|
OrionBlocksFieldImpl
|
package/dist/client.js
CHANGED
|
@@ -675,7 +675,7 @@ function OrionBlockRow(props) {
|
|
|
675
675
|
}
|
|
676
676
|
);
|
|
677
677
|
}
|
|
678
|
-
var import_translations2, import_ui2, import_ArrayAction, import_Banner, import_Button, import_ClipboardAction, import_Collapsible, import_DraggableSortable, import_DraggableSortableItem, import_Drawer, import_ErrorPill, import_Pill, import_RenderCustomComponent, import_ShimmerEffect, import_Form, import_NullifyField, import_RenderFields, import_RowLabel, import_useField, import_withCondition, import_FieldDescription, import_FieldError, import_FieldLabel, import_useThrottledValue, import_Config, import_DocumentInfo, import_Locale, import_Translation, import_scrollToID, import_react8, import_sonner, import_jsx_runtime11, baseClass, localStorageClipboardKey, OrionBlocksFieldComponent, OrionBlocksFieldImpl;
|
|
678
|
+
var import_translations2, import_ui2, import_ArrayAction, import_Banner, import_Button, import_ClipboardAction, import_Collapsible, import_DraggableSortable, import_DraggableSortableItem, import_Drawer, import_ErrorPill, import_Pill, import_RenderCustomComponent, import_ShimmerEffect, import_Form, import_NullifyField, import_RenderFields, import_RowLabel, import_useField, import_withCondition, import_FieldDescription, import_FieldError, import_FieldLabel, import_useThrottledValue, import_Config, import_DocumentInfo, import_Locale, import_Translation, import_scrollToID, import_react8, import_sonner, import_jsx_runtime11, baseClass, localStorageClipboardKey, OrionBlocksFieldConnected, OrionBlocksFieldComponent, OrionBlocksFieldImpl;
|
|
679
679
|
var init_OrionBlocksFieldImpl = __esm({
|
|
680
680
|
"src/components/OrionBlocksFieldImpl.tsx"() {
|
|
681
681
|
"use strict";
|
|
@@ -715,7 +715,7 @@ var init_OrionBlocksFieldImpl = __esm({
|
|
|
715
715
|
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
716
716
|
baseClass = "blocks-field";
|
|
717
717
|
localStorageClipboardKey = "_payloadClipboard";
|
|
718
|
-
|
|
718
|
+
OrionBlocksFieldConnected = (props) => {
|
|
719
719
|
const { i18n, t } = (0, import_Translation.useTranslation)();
|
|
720
720
|
const fieldFromProps = props.field;
|
|
721
721
|
const {
|
|
@@ -1142,6 +1142,13 @@ var init_OrionBlocksFieldImpl = __esm({
|
|
|
1142
1142
|
}
|
|
1143
1143
|
);
|
|
1144
1144
|
};
|
|
1145
|
+
OrionBlocksFieldComponent = (props) => {
|
|
1146
|
+
const configContext = (0, import_Config.useConfig)();
|
|
1147
|
+
if (!configContext?.config) {
|
|
1148
|
+
return null;
|
|
1149
|
+
}
|
|
1150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(OrionBlocksFieldConnected, { ...props });
|
|
1151
|
+
};
|
|
1145
1152
|
OrionBlocksFieldImpl = (0, import_withCondition.withCondition)(OrionBlocksFieldComponent);
|
|
1146
1153
|
}
|
|
1147
1154
|
});
|
package/dist/client.mjs
CHANGED
|
@@ -898,7 +898,7 @@ function EmptyState({
|
|
|
898
898
|
import { lazy, Suspense } from "react";
|
|
899
899
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
900
900
|
var OrionBlocksFieldImpl = lazy(async () => {
|
|
901
|
-
const mod = await import("./OrionBlocksFieldImpl-
|
|
901
|
+
const mod = await import("./OrionBlocksFieldImpl-N563554E.mjs");
|
|
902
902
|
return { default: mod.OrionBlocksFieldImpl };
|
|
903
903
|
});
|
|
904
904
|
function OrionBlocksField(props) {
|
package/package.json
CHANGED
|
@@ -498,7 +498,7 @@ function OrionBlockRow(props: OrionBlockRowProps) {
|
|
|
498
498
|
)
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
-
const
|
|
501
|
+
const OrionBlocksFieldConnected: React.FC<Record<string, unknown>> = (props) => {
|
|
502
502
|
const { i18n, t } = useTranslation()
|
|
503
503
|
|
|
504
504
|
const fieldFromProps = props.field as {
|
|
@@ -1040,4 +1040,14 @@ const OrionBlocksFieldComponent: React.FC<Record<string, unknown>> = (props) =>
|
|
|
1040
1040
|
)
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
|
+
const OrionBlocksFieldComponent: React.FC<Record<string, unknown>> = (props) => {
|
|
1044
|
+
const configContext = useConfig() as { config?: Record<string, unknown> } | undefined
|
|
1045
|
+
|
|
1046
|
+
if (!configContext?.config) {
|
|
1047
|
+
return null
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
return <OrionBlocksFieldConnected {...props} />
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1043
1053
|
export const OrionBlocksFieldImpl = withCondition(OrionBlocksFieldComponent)
|