@firecms/core 3.0.0-canary.139 → 3.0.0-canary.140

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
@@ -3602,7 +3602,7 @@
3602
3602
  } else {
3603
3603
  updatedValues = values;
3604
3604
  }
3605
- console.log("Saving entity", {
3605
+ console.debug("Saving entity", {
3606
3606
  entityId,
3607
3607
  updatedValues,
3608
3608
  collection
@@ -13533,7 +13533,7 @@
13533
13533
  "div",
13534
13534
  {
13535
13535
  className: "flex-grow w-[calc(100%-48px)] text-text-primary dark:text-text-primary-dark",
13536
- children: buildEntry(index, internalId)
13536
+ children: buildEntry(index, internalId, isDragging)
13537
13537
  }
13538
13538
  ),
13539
13539
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -15117,7 +15117,7 @@
15117
15117
  context,
15118
15118
  includeDescription,
15119
15119
  underlyingValueHasChanged,
15120
- disabled,
15120
+ disabled: disabledProp,
15121
15121
  partOfArray,
15122
15122
  minimalistView,
15123
15123
  autoFocus,
@@ -15140,6 +15140,7 @@
15140
15140
  propertyConfigs: customizationController.propertyConfigs,
15141
15141
  index
15142
15142
  });
15143
+ const disabled = disabledProp || isReadOnly(resolvedProperty) || Boolean(resolvedProperty?.disabled);
15143
15144
  if (resolvedProperty === null || isHidden(resolvedProperty)) {
15144
15145
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
15145
15146
  } else if (isReadOnly(resolvedProperty)) {
@@ -15348,9 +15349,10 @@
15348
15349
  }
15349
15350
  const mapFormView = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-1 flex flex-col space-y-2", children: Object.entries(mapProperties).filter(([_, property2]) => !isHidden(property2)).map(
15350
15351
  ([entryKey, childProperty], index) => {
15352
+ const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.disabled);
15351
15353
  const fieldBindingProps = {
15352
15354
  propertyKey: `${propertyKey}.${entryKey}`,
15353
- disabled,
15355
+ disabled: disabled || thisDisabled,
15354
15356
  property: childProperty,
15355
15357
  includeDescription,
15356
15358
  underlyingValueHasChanged,
@@ -16153,7 +16155,7 @@
16153
16155
  setValue
16154
16156
  });
16155
16157
  const [lastAddedId, setLastAddedId] = React.useState();
16156
- const buildEntry = React.useCallback((index, internalId) => {
16158
+ const buildEntry = React.useCallback((index, internalId, isDragging) => {
16157
16159
  return /* @__PURE__ */ jsxRuntime.jsx(
16158
16160
  BlockEntry,
16159
16161
  {
@@ -16166,7 +16168,7 @@
16166
16168
  autoFocus: internalId === lastAddedId,
16167
16169
  context
16168
16170
  },
16169
- `array_one_of_${index}`
16171
+ `array_one_of_${internalId}`
16170
16172
  );
16171
16173
  }, [context, lastAddedId, property.oneOf, propertyKey, value]);
16172
16174
  const title = /* @__PURE__ */ jsxRuntime.jsx(
@@ -16181,17 +16183,17 @@
16181
16183
  );
16182
16184
  const firstOneOfKey = Object.keys(property.oneOf.properties)[0];
16183
16185
  const body = /* @__PURE__ */ jsxRuntime.jsx(
16184
- FormikArrayContainer,
16186
+ ArrayContainer,
16185
16187
  {
16186
16188
  value,
16187
16189
  className: "flex flex-col gap-3",
16188
- name: propertyKey,
16190
+ droppableId: propertyKey,
16189
16191
  addLabel: property.name ? "Add entry to " + property.name : "Add entry",
16190
16192
  buildEntry,
16191
16193
  onInternalIdAdded: setLastAddedId,
16192
16194
  disabled: isSubmitting || Boolean(property.disabled),
16193
16195
  includeAddButton: !property.disabled,
16194
- setFieldValue,
16196
+ onValueChange: (value2) => setFieldValue(propertyKey, value2),
16195
16197
  newDefaultEntry: {
16196
16198
  [property.oneOf.typeField ?? DEFAULT_ONE_OF_TYPE]: firstOneOfKey,
16197
16199
  [property.oneOf.valueField ?? DEFAULT_ONE_OF_VALUE]: getDefaultValueFor(property.oneOf.properties[firstOneOfKey])
@@ -16494,9 +16496,10 @@
16494
16496
  ] })
16495
16497
  ] });
16496
16498
  const body = resolvedProperties.map((childProperty, index) => {
16499
+ const thisDisabled = isReadOnly(childProperty) || Boolean(childProperty.disabled);
16497
16500
  const fieldProps = {
16498
16501
  propertyKey: `${propertyKey}[${index}]`,
16499
- disabled,
16502
+ disabled: disabled || thisDisabled,
16500
16503
  property: childProperty,
16501
16504
  includeDescription,
16502
16505
  underlyingValueHasChanged,
@@ -18030,7 +18033,7 @@
18030
18033
  children: pluginActions
18031
18034
  }
18032
18035
  ),
18033
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-12 pb-16 pl-4 sm:px-8 md:px-10", children: [
18036
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-12 pb-16 pl-4 sm:px-8 md:px-10", children: [
18034
18037
  /* @__PURE__ */ jsxRuntime.jsxs(
18035
18038
  "div",
18036
18039
  {
@@ -18078,7 +18081,7 @@
18078
18081
  ),
18079
18082
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-14" })
18080
18083
  ] })
18081
- ] }) })
18084
+ ] })
18082
18085
  ] });
18083
18086
  if (plugins) {
18084
18087
  plugins.forEach((plugin) => {
@@ -18147,11 +18150,11 @@
18147
18150
  if (entityId && onIdChange)
18148
18151
  onIdChange(entityId);
18149
18152
  }, [entityId, onIdChange]);
18150
- return /* @__PURE__ */ jsxRuntime.jsx(formex.Formex, { value: formex$1, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full w-full transition-width duration-250 ease-in-out", children: [
18153
+ return /* @__PURE__ */ jsxRuntime.jsx(formex.Formex, { value: formex$1, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full w-full", children: [
18151
18154
  /* @__PURE__ */ jsxRuntime.jsxs(
18152
18155
  "div",
18153
18156
  {
18154
- className: ui.cls(ui.defaultBorderMixin, "no-scrollbar border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),
18157
+ className: ui.cls(ui.defaultBorderMixin, "no-scrollbar h-16 border-b pl-2 pr-2 pt-1 flex items-end overflow-scroll bg-gray-50 dark:bg-gray-950"),
18155
18158
  children: [
18156
18159
  /* @__PURE__ */ jsxRuntime.jsx(
18157
18160
  "div",