@firecms/core 3.0.0-canary.240 → 3.0.0-canary.241
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/index.es.js +14 -9
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +14 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/types/firecms.d.ts +2 -1
- package/dist/types/navigation.d.ts +5 -0
- package/package.json +5 -5
- package/src/core/FireCMS.tsx +7 -1
- package/src/form/field_bindings/MarkdownEditorFieldBinding.tsx +1 -1
- package/src/form/field_bindings/MultiSelectFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ReadOnlyFieldBinding.tsx +1 -1
- package/src/form/field_bindings/ReferenceFieldBinding.tsx +1 -1
- package/src/form/field_bindings/SelectFieldBinding.tsx +1 -1
- package/src/hooks/useBuildNavigationController.tsx +1 -0
- package/src/preview/components/ImagePreview.tsx +2 -2
- package/src/types/firecms.tsx +2 -1
- package/src/types/navigation.ts +6 -0
package/dist/index.umd.js
CHANGED
|
@@ -4924,7 +4924,7 @@
|
|
|
4924
4924
|
}
|
|
4925
4925
|
let t7;
|
|
4926
4926
|
if ($[13] !== url) {
|
|
4927
|
-
t7 = navigator && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { asChild: true, title: "Copy url to clipboard", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { variant: "filled", size: "
|
|
4927
|
+
t7 = navigator && /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { asChild: true, title: "Copy url to clipboard", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { variant: "filled", size: "smallest", onClick: (e) => {
|
|
4928
4928
|
e.stopPropagation();
|
|
4929
4929
|
e.preventDefault();
|
|
4930
4930
|
return navigator.clipboard.writeText(url);
|
|
@@ -4943,7 +4943,7 @@
|
|
|
4943
4943
|
}
|
|
4944
4944
|
let t9;
|
|
4945
4945
|
if ($[16] !== url) {
|
|
4946
|
-
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "
|
|
4946
|
+
t9 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Open image in new tab", side: "bottom", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { className: "invisible group-hover:visible", variant: "filled", component: "a", href: url, rel: "noopener noreferrer", target: "_blank", size: "smallest", onClick: _temp$q, children: t8 }) });
|
|
4947
4947
|
$[16] = url;
|
|
4948
4948
|
$[17] = t9;
|
|
4949
4949
|
} else {
|
|
@@ -14949,7 +14949,7 @@
|
|
|
14949
14949
|
const t10 = property.validation?.required;
|
|
14950
14950
|
let t11;
|
|
14951
14951
|
if ($[13] !== property.name || $[14] !== t10 || $[15] !== t9) {
|
|
14952
|
-
t11 = /* @__PURE__ */ jsxRuntime.jsx(LabelWithIcon, { icon: t9, required: t10, title: property.name, className: "h-
|
|
14952
|
+
t11 = /* @__PURE__ */ jsxRuntime.jsx(LabelWithIcon, { icon: t9, required: t10, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5 my-0" });
|
|
14953
14953
|
$[13] = property.name;
|
|
14954
14954
|
$[14] = t10;
|
|
14955
14955
|
$[15] = t9;
|
|
@@ -15081,7 +15081,7 @@
|
|
|
15081
15081
|
] }, enumKey);
|
|
15082
15082
|
}, [enumValues, setValue, value]);
|
|
15083
15083
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
15084
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { className: "w-full mt-2", size, value: validValue ? value.map((v_0) => v_0.toString()) : [], disabled, modalPopover: true, label: /* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-
|
|
15084
|
+
/* @__PURE__ */ jsxRuntime.jsx(ui.MultiSelect, { className: "w-full mt-2", size, value: validValue ? value.map((v_0) => v_0.toString()) : [], disabled, modalPopover: true, label: /* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" }), onValueChange: (updatedValue) => {
|
|
15085
15085
|
let newValue;
|
|
15086
15086
|
if (of && of?.dataType === "number") {
|
|
15087
15087
|
newValue = updatedValue ? updatedValue.map((e_1) => parseFloat(e_1)) : [];
|
|
@@ -16136,7 +16136,7 @@
|
|
|
16136
16136
|
}
|
|
16137
16137
|
let t1;
|
|
16138
16138
|
if ($[0] !== minimalistView || $[1] !== property || $[2] !== propertyKey) {
|
|
16139
|
-
t1 = !minimalistView && /* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-
|
|
16139
|
+
t1 = !minimalistView && /* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" });
|
|
16140
16140
|
$[0] = minimalistView;
|
|
16141
16141
|
$[1] = property;
|
|
16142
16142
|
$[2] = propertyKey;
|
|
@@ -16258,7 +16258,7 @@
|
|
|
16258
16258
|
referenceDialogController.open();
|
|
16259
16259
|
};
|
|
16260
16260
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16261
|
-
!minimalistView && /* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-
|
|
16261
|
+
!minimalistView && /* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
|
|
16262
16262
|
!collection && /* @__PURE__ */ jsxRuntime.jsx(ErrorView, { error: "The specified collection does not exist. Check console" }),
|
|
16263
16263
|
collection && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
16264
16264
|
value && /* @__PURE__ */ jsxRuntime.jsx(ReferencePreview, { disabled: !property.path, previewProperties: property.previewProperties, hover: !disabled, size, onClick: disabled || isSubmitting ? void 0 : onEntryClick, reference: value, includeEntityLink: property.includeEntityLink, includeId: property.includeId }),
|
|
@@ -17951,7 +17951,7 @@
|
|
|
17951
17951
|
}, ...editorProps });
|
|
17952
17952
|
if (minimalistView) return editor$1;
|
|
17953
17953
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17954
|
-
/* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-
|
|
17954
|
+
/* @__PURE__ */ jsxRuntime.jsx(LabelWithIconAndTooltip, { propertyKey, icon: getIconForProperty(property, "small"), required: property.validation?.required, title: property.name, className: "h-8 text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
|
|
17955
17955
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("rounded-md", ui.fieldBackgroundMixin, disabled ? ui.fieldBackgroundDisabledMixin : ui.fieldBackgroundHoverMixin), children: editor$1 }),
|
|
17956
17956
|
/* @__PURE__ */ jsxRuntime.jsx(FieldHelperText, { includeDescription, showError, error, property })
|
|
17957
17957
|
] });
|
|
@@ -20486,7 +20486,8 @@
|
|
|
20486
20486
|
getParentReferencesFromPath: getAllParentReferencesForPath,
|
|
20487
20487
|
getParentCollectionIds,
|
|
20488
20488
|
convertIdsToPaths,
|
|
20489
|
-
navigate
|
|
20489
|
+
navigate,
|
|
20490
|
+
plugins
|
|
20490
20491
|
};
|
|
20491
20492
|
}
|
|
20492
20493
|
function encodePath(input) {
|
|
@@ -22425,7 +22426,7 @@
|
|
|
22425
22426
|
authController,
|
|
22426
22427
|
storageSource,
|
|
22427
22428
|
dataSourceDelegate,
|
|
22428
|
-
plugins,
|
|
22429
|
+
plugins: pluginsProp,
|
|
22429
22430
|
onAnalyticsEvent,
|
|
22430
22431
|
propertyConfigs,
|
|
22431
22432
|
entityViews,
|
|
@@ -22433,6 +22434,10 @@
|
|
|
22433
22434
|
navigationController,
|
|
22434
22435
|
apiKey
|
|
22435
22436
|
} = props;
|
|
22437
|
+
if (pluginsProp) {
|
|
22438
|
+
console.warn("The `plugins` prop is deprecated in the FireCMS component. You should pass your plugins to `useBuildNavigationController` instead.");
|
|
22439
|
+
}
|
|
22440
|
+
const plugins = navigationController.plugins ?? pluginsProp;
|
|
22436
22441
|
const sideDialogsController = useBuildSideDialogsController();
|
|
22437
22442
|
const sideEntityController = useBuildSideEntityController(navigationController, sideDialogsController, authController);
|
|
22438
22443
|
const pluginsLoading = plugins?.some((p) => p.loading) ?? false;
|