@firecms/core 3.0.0-rc.3 → 3.0.0-tw4.1

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
@@ -4906,7 +4906,7 @@
4906
4906
  const $ = reactCompilerRuntime.c(1);
4907
4907
  let t0;
4908
4908
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
4909
- t0 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-full bg-surface-200 bg-opacity-30 dark:bg-opacity-20 w-5 h-2 inline-block" });
4909
+ t0 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-full bg-surface-200 bg-opacity-30 bg-surface-200/30 dark:bg-opacity-20 dark:bg-surface-200/20 w-5 h-2 inline-block" });
4910
4910
  $[0] = t0;
4911
4911
  } else {
4912
4912
  t0 = $[0];
@@ -9731,9 +9731,9 @@
9731
9731
  }
9732
9732
  const setOnHoverFalse = t10;
9733
9733
  const borderClass = showError ? "border-red-500" : internalSaved ? "border-green-500" : isSelected ? "border-primary" : "border-transparent";
9734
- const t11 = `flex relative h-full rounded-md p-${p} border border-4 border-opacity-75`;
9734
+ const t11 = `flex relative h-full rounded-md p-${p} border border-4 border-opacity-75`;
9735
9735
  const t12 = onHover && !disabled ? "bg-surface-50 dark:bg-surface-900" : "";
9736
- const t13 = saved ? "bg-surface-100 bg-opacity-75 dark:bg-surface-800 dark:bg-opacity-75" : "";
9736
+ const t13 = saved ? "bg-surface-100/75 dark:bg-surface-800/75" : "";
9737
9737
  const t14 = hideOverflow ? "overflow-hidden" : "";
9738
9738
  const t15 = isSelected ? "bg-surface-50 dark:bg-surface-900" : "";
9739
9739
  let t16;
@@ -9801,7 +9801,7 @@
9801
9801
  }
9802
9802
  let t24;
9803
9803
  if ($[33] !== disabled || $[34] !== disabledTooltip || $[35] !== onHover) {
9804
- t24 = disabled && onHover && disabledTooltip && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: disabledTooltip, children: /* @__PURE__ */ jsxRuntime.jsx(ui.DoNotDisturbOnIcon, { size: "smallest", color: "disabled", className: "text-surface-500" }) }) });
9804
+ t24 = disabled && onHover && disabledTooltip && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 text-xs", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: disabledTooltip, children: /* @__PURE__ */ jsxRuntime.jsx(ui.DoNotDisturbOnIcon, { size: "smallest", color: "disabled", className: "text-text-disabled" }) }) });
9805
9805
  $[33] = disabled;
9806
9806
  $[34] = disabledTooltip;
9807
9807
  $[35] = onHover;
@@ -10271,7 +10271,7 @@
10271
10271
  const enableLocalChangesBackup = collection ? getLocalChangesBackup(collection) : false;
10272
10272
  const hasDraft = enableLocalChangesBackup ? getEntityFromCache(fullPath + "/" + entity.id) : false;
10273
10273
  const iconSize = largeLayout && (size === "m" || size === "l" || size == "xl") ? "medium" : "small";
10274
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("h-full flex items-center justify-center flex-col bg-surface-50 dark:bg-surface-900 bg-opacity-90 dark:bg-opacity-90 z-10", frozen ? "sticky left-0" : ""), onClick: React.useCallback((event) => {
10274
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("h-full flex items-center justify-center flex-col bg-surface-50 dark:bg-surface-900 bg-opacity-90 bg-surface-50/90 dark:bg-opacity-90 dark:bg-surface-900/90 z-10", frozen ? "sticky left-0" : ""), onClick: React.useCallback((event) => {
10275
10275
  event.stopPropagation();
10276
10276
  }, []), style: {
10277
10277
  width,
@@ -10785,7 +10785,7 @@
10785
10785
  const t3 = column.frozen ? "sticky left-0 z-10" : "relative z-0";
10786
10786
  let t4;
10787
10787
  if ($[4] !== t3) {
10788
- t4 = ui.cls("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-surface-50 dark:bg-surface-900", "text-text-secondary hover:text-text-primary dark:text-text-secondary-dark dark:hover:text-text-primary-dark", "hover:bg-surface-100 dark:hover:bg-surface-800 hover:bg-opacity-50 dark:hover:bg-opacity-50", t3);
10788
+ t4 = ui.cls("flex py-0 px-3 h-full text-xs uppercase font-semibold relative select-none items-center bg-surface-50 dark:bg-surface-900", "text-text-secondary hover:text-text-primary dark:text-text-secondary-dark dark:hover:text-text-primary-dark", "hover:bg-surface-100 dark:hover:bg-surface-800 hover:bg-opacity-50 hover:bg-surface-100/50 dark:hover:bg-opacity-50 dark:hover:bg-surface-800/50", t3);
10789
10789
  $[4] = t3;
10790
10790
  $[5] = t4;
10791
10791
  } else {
@@ -11221,7 +11221,7 @@
11221
11221
  const onClick = t1;
11222
11222
  let t2;
11223
11223
  if ($[4] !== hoverRow || $[5] !== onRowClick || $[6] !== rowClassName || $[7] !== rowData) {
11224
- t2 = ui.cls("flex min-w-full text-sm border-b border-surface-200 dark:border-surface-800 border-opacity-40 dark:border-opacity-40", rowClassName ? rowClassName(rowData) : "", {
11224
+ t2 = ui.cls("flex min-w-full text-sm border-b border-surface-200 dark:border-surface-800 border-opacity-40 border-surface-200/40 dark:border-opacity-40 dark:border-surface-800/40", rowClassName ? rowClassName(rowData) : "", {
11225
11225
  "hover:bg-opacity-95": hoverRow,
11226
11226
  "cursor-pointer": onRowClick
11227
11227
  });
@@ -12252,7 +12252,7 @@
12252
12252
  selectedCell
12253
12253
  }), [setPopupCell, select, onValueChange, size, selectedCell]);
12254
12254
  return /* @__PURE__ */ jsxRuntime.jsx(SelectableTableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full w-full flex flex-col bg-white dark:bg-surface-950", ref, children: /* @__PURE__ */ jsxRuntime.jsx(VirtualTable, { data, columns, cellRenderer, onRowClick: inlineEditing ? void 0 : onEntityClick ? onRowClick : void 0, onEndReached: loadNextPage, onResetPagination: resetPagination, error: dataLoadingError, onColumnResize, rowHeight: getRowHeight(size), loading: dataLoading, filter: filterValues, onFilterUpdate: setFilterValues ? onFilterUpdate : void 0, sortBy, onSortByUpdate: setSortBy, hoverRow, initialScroll, onScroll, checkFilterCombination, createFilterField: filterable ? createFilterField : void 0, rowClassName: React.useCallback((entity) => {
12255
- return highlightedRow?.(entity) ? "bg-surface-100 bg-opacity-75 dark:bg-surface-800 dark:bg-opacity-75" : "";
12255
+ return highlightedRow?.(entity) ? "bg-surface-100 bg-opacity-75 bg-surface-100/75 dark:bg-surface-800 dark:bg-opacity-75 dark:bg-surface-800/75" : "";
12256
12256
  }, [highlightedRow]), className: "flex-grow", emptyComponent, endAdornment, AddColumnComponent }) }) });
12257
12257
  };
12258
12258
  function createFilterField({
@@ -16469,7 +16469,7 @@
16469
16469
  /* @__PURE__ */ jsxRuntime.jsx("div", { id: `form_${path}`, className: ui.cls("relative flex flex-row max-w-4xl lg:max-w-3xl xl:max-w-4xl 2xl:max-w-6xl w-full h-fit"), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("flex flex-col w-full pt-12 pb-16 px-4 sm:px-8 md:px-10"), children: [
16470
16470
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-4 self-end sticky top-4 z-10", children: [
16471
16471
  manualApplyLocalChanges && hasLocalChanges && /* @__PURE__ */ jsxRuntime.jsx(LocalChangesMenu, { cacheKey: status === "new" || status === "copy" ? path + "#new" : path + "/" + entityId, properties: resolvedCollection.properties, localChangesData, formex: formex$1, onClearLocalChanges: () => setLocalChangesCleared(true) }),
16472
- formex$1.dirty ? /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "There are local unsaved changes", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { size: "small", className: "py-1", colorScheme: "orangeDarker", children: /* @__PURE__ */ jsxRuntime.jsx(ui.EditIcon, { size: "smallest" }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "The current form is in sync with the database", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { size: "small", className: "py-1", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CheckIcon, { size: "smallest" }) }) })
16472
+ formex$1.dirty ? /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "This form has been modified", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { size: "small", className: "py-1", colorScheme: "orangeDarker", children: /* @__PURE__ */ jsxRuntime.jsx(ui.EditIcon, { size: "smallest" }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "The current form is in sync with the database", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Chip, { size: "small", className: "py-1", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CheckIcon, { size: "smallest" }) }) })
16473
16473
  ] }),
16474
16474
  formView
16475
16475
  ] }) }),
@@ -18634,7 +18634,7 @@
18634
18634
  return false;
18635
18635
  });
18636
18636
  function PropertyFieldBindingInternal(t0) {
18637
- const $ = reactCompilerRuntime.c(18);
18637
+ const $ = reactCompilerRuntime.c(19);
18638
18638
  const {
18639
18639
  propertyKey,
18640
18640
  property,
@@ -18643,6 +18643,7 @@
18643
18643
  underlyingValueHasChanged,
18644
18644
  disabled: disabledProp,
18645
18645
  partOfArray,
18646
+ partOfBlock,
18646
18647
  minimalistView,
18647
18648
  autoFocus,
18648
18649
  index,
@@ -18651,15 +18652,8 @@
18651
18652
  } = t0;
18652
18653
  const authController = useAuthController();
18653
18654
  const customizationController = useCustomizationController();
18654
- if (propertyKey === "created_by") {
18655
- console.log("Rendering field for created_by", {
18656
- propertyKey,
18657
- property,
18658
- context
18659
- });
18660
- }
18661
18655
  let t1;
18662
- if ($[0] !== authController || $[1] !== autoFocus || $[2] !== context || $[3] !== customizationController.propertyConfigs || $[4] !== disabledProp || $[5] !== includeDescription || $[6] !== index || $[7] !== minimalistView || $[8] !== onPropertyChange || $[9] !== partOfArray || $[10] !== property || $[11] !== propertyKey || $[12] !== size || $[13] !== underlyingValueHasChanged) {
18656
+ if ($[0] !== authController || $[1] !== autoFocus || $[2] !== context || $[3] !== customizationController.propertyConfigs || $[4] !== disabledProp || $[5] !== includeDescription || $[6] !== index || $[7] !== minimalistView || $[8] !== onPropertyChange || $[9] !== partOfArray || $[10] !== partOfBlock || $[11] !== property || $[12] !== propertyKey || $[13] !== size || $[14] !== underlyingValueHasChanged) {
18663
18657
  t1 = (fieldProps) => {
18664
18658
  let Component;
18665
18659
  const resolvedProperty = resolveProperty({
@@ -18722,6 +18716,7 @@
18722
18716
  context,
18723
18717
  disabled,
18724
18718
  partOfArray,
18719
+ partOfBlock,
18725
18720
  minimalistView,
18726
18721
  autoFocus,
18727
18722
  size,
@@ -18739,22 +18734,23 @@
18739
18734
  $[7] = minimalistView;
18740
18735
  $[8] = onPropertyChange;
18741
18736
  $[9] = partOfArray;
18742
- $[10] = property;
18743
- $[11] = propertyKey;
18744
- $[12] = size;
18745
- $[13] = underlyingValueHasChanged;
18746
- $[14] = t1;
18737
+ $[10] = partOfBlock;
18738
+ $[11] = property;
18739
+ $[12] = propertyKey;
18740
+ $[13] = size;
18741
+ $[14] = underlyingValueHasChanged;
18742
+ $[15] = t1;
18747
18743
  } else {
18748
- t1 = $[14];
18744
+ t1 = $[15];
18749
18745
  }
18750
18746
  let t2;
18751
- if ($[15] !== propertyKey || $[16] !== t1) {
18747
+ if ($[16] !== propertyKey || $[17] !== t1) {
18752
18748
  t2 = /* @__PURE__ */ jsxRuntime.jsx(formex.Field, { name: propertyKey, children: t1 }, propertyKey);
18753
- $[15] = propertyKey;
18754
- $[16] = t1;
18755
- $[17] = t2;
18749
+ $[16] = propertyKey;
18750
+ $[17] = t1;
18751
+ $[18] = t2;
18756
18752
  } else {
18757
- t2 = $[17];
18753
+ t2 = $[18];
18758
18754
  }
18759
18755
  return t2;
18760
18756
  }
@@ -18766,6 +18762,7 @@
18766
18762
  includeDescription,
18767
18763
  underlyingValueHasChanged,
18768
18764
  partOfArray,
18765
+ partOfBlock,
18769
18766
  minimalistView,
18770
18767
  autoFocus,
18771
18768
  context,
@@ -18815,6 +18812,7 @@
18815
18812
  disabled: disabled ?? false,
18816
18813
  underlyingValueHasChanged: underlyingValueHasChanged ?? false,
18817
18814
  partOfArray: partOfArray ?? false,
18815
+ partOfBlock: partOfBlock ?? false,
18818
18816
  minimalistView: minimalistView ?? false,
18819
18817
  autoFocus: autoFocus ?? false,
18820
18818
  customProps: customFieldProps,
@@ -20126,6 +20124,7 @@
20126
20124
  context,
20127
20125
  autoFocus,
20128
20126
  partOfArray: false,
20127
+ partOfBlock: true,
20129
20128
  minimalistView: true,
20130
20129
  onPropertyChange: storeProps
20131
20130
  } : void 0;
@@ -22051,7 +22050,7 @@
22051
22050
  storedProps,
22052
22051
  updateItemCustomProps
22053
22052
  } = t0;
22054
- const t1 = `relative ${!isDragging ? "hover\\:bg-surface-accent-50 dark\\:hover\\:bg-surface-800 dark\\:hover\\:bg-opacity-20" : ""} rounded-md opacity-100`;
22053
+ const t1 = `relative ${!isDragging ? "hover\\:bg-surface-accent-50 dark\\:hover\\:bg-surface-800 dark\\:hover\\:bg-opacity-20 dark\\:hover\\:bg-surface-800/20" : ""} rounded-md opacity-100`;
22055
22054
  let t2;
22056
22055
  if ($[0] !== internalId || $[1] !== updateItemCustomProps) {
22057
22056
  t2 = (props) => updateItemCustomProps(internalId, props);
@@ -22374,7 +22373,7 @@
22374
22373
  } else if (value?.isEntityReference && value?.isEntityReference()) {
22375
22374
  child = /* @__PURE__ */ jsxRuntime.jsx(ReferencePreview, { reference: value, onClick: onEntryClick, disabled, previewProperties, size, includeId, includeEntityLink });
22376
22375
  }
22377
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("text-sm font-medium", "min-w-80 flex flex-col gap-4", "relative transition-colors duration-200 ease-in rounded font-medium", disabled ? "bg-opacity-50" : "hover:bg-opacity-75", "text-opacity-50 dark:text-white dark:text-opacity-50", className), children: [
22376
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("text-sm font-medium", "min-w-80 flex flex-col gap-4", "relative transition-colors duration-200 ease-in rounded font-medium", disabled ? "bg-opacity-50" : "hover:bg-opacity-75", "text-opacity-50 text-text-primary/50 dark:text-white dark:text-opacity-50 dark:text-white/50", className), children: [
22378
22377
  child,
22379
22378
  !value && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "justify-center text-left", children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "outlined", color: "primary", disabled, onClick: onEntryClick, children: [
22380
22379
  "Edit ",
@@ -25262,7 +25261,7 @@
25262
25261
  const {
25263
25262
  isActive
25264
25263
  } = t52;
25265
- return ui.cls("rounded-lg truncate", "hover:bg-surface-accent-300 hover:bg-opacity-75 dark:hover:bg-surface-accent-800 dark:hover:bg-opacity-75 text-text-primary dark:text-surface-200 hover:text-surface-900 hover:dark:text-white", "flex flex-row items-center mr-8", drawerOpen ? "pl-4 h-10" : "pl-4 h-9", "font-semibold text-xs", isActive ? "bg-surface-accent-200 bg-opacity-60 dark:bg-surface-800 dark:bg-opacity-50" : "");
25264
+ return ui.cls("rounded-lg truncate", "hover:bg-surface-accent-300 hover:bg-opacity-75 hover:bg-surface-accent-300/75 dark:hover:bg-surface-accent-800 dark:hover:bg-opacity-75 dark:hover:bg-surface-accent-800/75 text-text-primary dark:text-surface-200 hover:text-surface-900 hover:dark:text-white hover:bg-surface-accent-300/75 dark:hover:bg-surface-accent-800/75", "flex flex-row items-center mr-8", drawerOpen ? "pl-4 h-10" : "pl-4 h-9", "font-semibold text-xs", isActive ? "bg-surface-accent-200 bg-opacity-60 dark:bg-surface-800 dark:bg-opacity-50 bg-surface-accent-200/60 dark:bg-surface-800/50" : "");
25266
25265
  };
25267
25266
  $[4] = drawerOpen;
25268
25267
  $[5] = t4;
@@ -25272,7 +25271,7 @@
25272
25271
  const t5 = drawerOpen ? "opacity-100" : "opacity-0 hidden";
25273
25272
  let t6;
25274
25273
  if ($[6] !== t5) {
25275
- t6 = ui.cls(t5, "ml-4 font-inherit text-inherit");
25274
+ t6 = ui.cls("text-text-primary dark:text-surface-200", t5, "ml-4 font-inherit");
25276
25275
  $[6] = t5;
25277
25276
  $[7] = t6;
25278
25277
  } else {
@@ -25420,7 +25419,7 @@
25420
25419
  }
25421
25420
  let t10;
25422
25421
  if ($[41] !== adminMenuOpen || $[42] !== buildGroupHeader || $[43] !== drawerOpen || $[44] !== navigationEntries || $[45] !== onClick || $[46] !== tooltipsOpen) {
25423
- t10 = (group_0) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-surface-50 dark:bg-surface-800 dark:bg-opacity-30 my-4 rounded-lg ml-3 mr-1", children: [
25422
+ t10 = (group_0) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-surface-50 dark:bg-surface-800 dark:bg-opacity-30 dark:bg-surface-800/30 bg-surface-50 dark:bg-surface-800/30 my-4 rounded-lg ml-3 mr-1", children: [
25424
25423
  buildGroupHeader(group_0),
25425
25424
  Object.values(navigationEntries).filter((e_0) => e_0.group === group_0).map((view_0) => /* @__PURE__ */ jsxRuntime.jsx(DrawerNavigationItem, { icon: /* @__PURE__ */ jsxRuntime.jsx(IconForView, { collectionOrView: view_0.collection ?? view_0.view, size: "small" }), tooltipsOpen, adminMenuOpen, drawerOpen, onClick: () => onClick(view_0), url: view_0.url, name: view_0.name }, view_0.id))
25426
25425
  ] }, `drawer_group_${group_0}`);
@@ -26928,7 +26927,7 @@
26928
26927
  }
26929
26928
  let t12;
26930
26929
  if ($[24] !== innerDrawer || $[25] !== props.open || $[26] !== props.setDrawerOpen) {
26931
- t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Sheet, { side: "left", transparent: true, open: props.open, onOpenChange: props.setDrawerOpen, title: "Navigation drawer", overlayClassName: "bg-white bg-opacity-80", children: innerDrawer });
26930
+ t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.Sheet, { side: "left", transparent: true, open: props.open, onOpenChange: props.setDrawerOpen, title: "Navigation drawer", overlayClassName: "bg-white bg-opacity-80 bg-white/80", children: innerDrawer });
26932
26931
  $[24] = innerDrawer;
26933
26932
  $[25] = props.open;
26934
26933
  $[26] = props.setDrawerOpen;