@firecms/core 3.0.0-canary.240 → 3.0.0-canary.242

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.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: "small", onClick: (e) => {
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: "small", onClick: _temp$q, children: t8 }) });
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 {
@@ -5702,7 +5702,7 @@
5702
5702
  let t1;
5703
5703
  if ($[17] !== size || $[18] !== value) {
5704
5704
  const lines = value.split("\n");
5705
- t1 = value && value.includes("\n") ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("overflow-x-scroll", size === "small" ? "text-sm" : ""), children: lines.map((str, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
5705
+ t1 = value && value.includes("\n") ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("overflow-x-scroll overflow-hidden", size === "small" ? "text-sm" : ""), children: lines.map((str, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
5706
5706
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: str }),
5707
5707
  index !== lines.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("br", {})
5708
5708
  ] }, `string_preview_${index}`)) }) : size === "small" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: value }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: value });
@@ -7268,7 +7268,6 @@
7268
7268
  width: "100%",
7269
7269
  color: "unset",
7270
7270
  fontWeight: "unset",
7271
- lineHeight: 1.7142857,
7272
7271
  fontSize: "unset",
7273
7272
  fontFamily: "unset",
7274
7273
  background: "unset",
@@ -10622,7 +10621,10 @@
10622
10621
  const debouncedScroll = useDebounceCallback(onScrollProp, 200);
10623
10622
  React.useEffect(() => {
10624
10623
  if (tableRef.current && initialScroll) {
10625
- tableRef.current.scrollTo(0, initialScroll);
10624
+ const {
10625
+ scrollLeft
10626
+ } = tableRef.current;
10627
+ tableRef.current.scrollTo(scrollLeft, initialScroll);
10626
10628
  }
10627
10629
  }, [tableRef, initialScroll]);
10628
10630
  React.useEffect(() => {
@@ -14949,7 +14951,7 @@
14949
14951
  const t10 = property.validation?.required;
14950
14952
  let t11;
14951
14953
  if ($[13] !== property.name || $[14] !== t10 || $[15] !== t9) {
14952
- t11 = /* @__PURE__ */ jsxRuntime.jsx(LabelWithIcon, { icon: t9, required: t10, title: property.name, className: "h-6 text-text-secondary dark:text-text-secondary-dark ml-3.5 my-0" });
14954
+ 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
14955
  $[13] = property.name;
14954
14956
  $[14] = t10;
14955
14957
  $[15] = t9;
@@ -14968,7 +14970,7 @@
14968
14970
  }
14969
14971
  let t13;
14970
14972
  if ($[20] !== disabled || $[21] !== handleClearClick || $[22] !== property.clearable) {
14971
- t13 = property.clearable && !disabled && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: handleClearClick, children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, {}) });
14973
+ t13 = property.clearable && !disabled && /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { size: "small", onClick: handleClearClick, children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" }) });
14972
14974
  $[20] = disabled;
14973
14975
  $[21] = handleClearClick;
14974
14976
  $[22] = property.clearable;
@@ -15081,7 +15083,7 @@
15081
15083
  ] }, enumKey);
15082
15084
  }, [enumValues, setValue, value]);
15083
15085
  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-6 text-text-secondary dark:text-text-secondary-dark ml-3.5" }), onValueChange: (updatedValue) => {
15086
+ /* @__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
15087
  let newValue;
15086
15088
  if (of && of?.dataType === "number") {
15087
15089
  newValue = updatedValue ? updatedValue.map((e_1) => parseFloat(e_1)) : [];
@@ -16136,7 +16138,7 @@
16136
16138
  }
16137
16139
  let t1;
16138
16140
  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-6 text-text-secondary dark:text-text-secondary-dark ml-3.5" });
16141
+ 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
16142
  $[0] = minimalistView;
16141
16143
  $[1] = property;
16142
16144
  $[2] = propertyKey;
@@ -16258,7 +16260,7 @@
16258
16260
  referenceDialogController.open();
16259
16261
  };
16260
16262
  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-6 text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
16263
+ !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
16264
  !collection && /* @__PURE__ */ jsxRuntime.jsx(ErrorView, { error: "The specified collection does not exist. Check console" }),
16263
16265
  collection && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
16264
16266
  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 +17953,7 @@
17951
17953
  }, ...editorProps });
17952
17954
  if (minimalistView) return editor$1;
17953
17955
  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-6 text-text-secondary dark:text-text-secondary-dark ml-3.5" }),
17956
+ /* @__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
17957
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls("rounded-md", ui.fieldBackgroundMixin, disabled ? ui.fieldBackgroundDisabledMixin : ui.fieldBackgroundHoverMixin), children: editor$1 }),
17956
17958
  /* @__PURE__ */ jsxRuntime.jsx(FieldHelperText, { includeDescription, showError, error, property })
17957
17959
  ] });
@@ -18919,7 +18921,7 @@
18919
18921
  deleteEntityClicked && /* @__PURE__ */ jsxRuntime.jsx(DeleteEntityDialog, { entityOrEntitiesToDelete: deleteEntityClicked, path: fullPath, collection, callbacks: collection.callbacks, open: Boolean(deleteEntityClicked), onEntityDelete: internalOnEntityDelete, onMultipleEntitiesDelete: internalOnMultipleEntitiesDelete, onClose: () => setDeleteEntityClicked(void 0) })
18920
18922
  ] });
18921
18923
  }, (a, b) => {
18922
- return equal(a.path, b.path) && equal(a.parentCollectionIds, b.parentCollectionIds) && equal(a.isSubCollection, b.isSubCollection) && equal(a.className, b.className) && equal(a.properties, b.properties) && equal(a.propertiesOrder, b.propertiesOrder) && equal(a.hideIdFromCollection, b.hideIdFromCollection) && equal(a.inlineEditing, b.inlineEditing) && equal(a.selectionEnabled, b.selectionEnabled) && equal(a.selectionController, b.selectionController) && equal(a.Actions, b.Actions) && equal(a.defaultSize, b.defaultSize) && equal(a.initialFilter, b.initialFilter) && equal(a.initialSort, b.initialSort) && equal(a.textSearchEnabled, b.textSearchEnabled) && equal(a.additionalFields, b.additionalFields) && equal(a.sideDialogWidth, b.sideDialogWidth) && equal(a.openEntityMode, b.openEntityMode) && equal(a.exportable, b.exportable) && equal(a.history, b.history) && equal(a.forceFilter, b.forceFilter);
18924
+ return equal(a.path, b.path) && equal(a.parentCollectionIds, b.parentCollectionIds) && equal(a.isSubCollection, b.isSubCollection) && equal(a.className, b.className) && equal(a.properties, b.properties) && equal(a.propertiesOrder, b.propertiesOrder) && equal(a.hideIdFromCollection, b.hideIdFromCollection) && equal(a.inlineEditing, b.inlineEditing) && equal(a.selectionEnabled, b.selectionEnabled) && equal(a.selectionController, b.selectionController) && equal(a.Actions, b.Actions) && equal(a.defaultSize, b.defaultSize) && equal(a.initialFilter, b.initialFilter) && equal(a.initialSort, b.initialSort) && equal(a.includeJsonView, b.includeJsonView) && equal(a.textSearchEnabled, b.textSearchEnabled) && equal(a.additionalFields, b.additionalFields) && equal(a.sideDialogWidth, b.sideDialogWidth) && equal(a.openEntityMode, b.openEntityMode) && equal(a.exportable, b.exportable) && equal(a.history, b.history) && equal(a.forceFilter, b.forceFilter);
18923
18925
  });
18924
18926
  function EntitiesCount({
18925
18927
  fullPath,
@@ -20486,7 +20488,8 @@
20486
20488
  getParentReferencesFromPath: getAllParentReferencesForPath,
20487
20489
  getParentCollectionIds,
20488
20490
  convertIdsToPaths,
20489
- navigate
20491
+ navigate,
20492
+ plugins
20490
20493
  };
20491
20494
  }
20492
20495
  function encodePath(input) {
@@ -22425,7 +22428,7 @@
22425
22428
  authController,
22426
22429
  storageSource,
22427
22430
  dataSourceDelegate,
22428
- plugins,
22431
+ plugins: pluginsProp,
22429
22432
  onAnalyticsEvent,
22430
22433
  propertyConfigs,
22431
22434
  entityViews,
@@ -22433,6 +22436,10 @@
22433
22436
  navigationController,
22434
22437
  apiKey
22435
22438
  } = props;
22439
+ if (pluginsProp) {
22440
+ console.warn("The `plugins` prop is deprecated in the FireCMS component. You should pass your plugins to `useBuildNavigationController` instead.");
22441
+ }
22442
+ const plugins = navigationController.plugins ?? pluginsProp;
22436
22443
  const sideDialogsController = useBuildSideDialogsController();
22437
22444
  const sideEntityController = useBuildSideEntityController(navigationController, sideDialogsController, authController);
22438
22445
  const pluginsLoading = plugins?.some((p) => p.loading) ?? false;