@firecms/collection_editor 3.0.0-canary.250 → 3.0.0-canary.252

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react-compiler-runtime";
3
- import { SearchIconsView, toSnakeCase, singular, IconForView, FieldCaption, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, unslugify, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, isValidRegExp, ConfirmationDialog, isEmptyObject, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
3
+ import { toSnakeCase, singular, IconForView, FieldCaption, SearchIconsView, ArrayContainer, serializeRegExp, useSnackbarController, resolveEnumValues, isPropertyBuilder, useCustomizationController, getFieldConfig, ErrorBoundary, PropertyConfigBadge, unslugify, useNavigationController, mergeDeep, DEFAULT_FIELD_CONFIGS, getFieldId, isValidRegExp, ConfirmationDialog, isEmptyObject, useLargeLayout, makePropertiesEditable, resolveEntityView, useAuthController, useSelectionController, CircularProgressCenter, EntityCollectionTable, slugify, randomString, removeUndefined, ErrorView, removeInitialAndTrailingSlashes, getDefaultPropertiesOrder, joinCollectionLists } from "@firecms/core";
4
4
  import * as React from "react";
5
5
  import React__default, { useContext, useState, useEffect, useMemo, useRef, useDeferredValue } from "react";
6
6
  import equal from "react-fast-compare";
@@ -946,51 +946,52 @@ function CollectionDetailsForm(t0) {
946
946
  } else {
947
947
  t106 = $[179];
948
948
  }
949
- let t107;
949
+ const t107 = typeof values.icon === "string" ? values.icon : void 0;
950
+ let t108;
950
951
  if ($[180] !== setFieldValue) {
951
- t107 = (icon) => {
952
+ t108 = (icon) => {
952
953
  setIconDialogOpen(false);
953
954
  setFieldValue("icon", icon);
954
955
  };
955
956
  $[180] = setFieldValue;
956
- $[181] = t107;
957
+ $[181] = t108;
957
958
  } else {
958
- t107 = $[181];
959
+ t108 = $[181];
959
960
  }
960
- let t108;
961
- if ($[182] !== t107 || $[183] !== values.icon) {
962
- t108 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: values.icon, onIconSelected: t107 }) });
961
+ let t109;
962
+ if ($[182] !== t107 || $[183] !== t108) {
963
+ t109 = /* @__PURE__ */ jsx("div", { className: "p-4 overflow-auto min-h-[200px]", children: /* @__PURE__ */ jsx(SearchIconsView, { selectedIcon: t107, onIconSelected: t108 }) });
963
964
  $[182] = t107;
964
- $[183] = values.icon;
965
- $[184] = t108;
965
+ $[183] = t108;
966
+ $[184] = t109;
966
967
  } else {
967
- t108 = $[184];
968
+ t109 = $[184];
968
969
  }
969
- let t109;
970
- if ($[185] !== iconDialogOpen || $[186] !== t108) {
971
- t109 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t108 });
970
+ let t110;
971
+ if ($[185] !== iconDialogOpen || $[186] !== t109) {
972
+ t110 = /* @__PURE__ */ jsx(Dialog, { open: iconDialogOpen, onOpenChange: setIconDialogOpen, maxWidth: "xl", fullWidth: true, children: t109 });
972
973
  $[185] = iconDialogOpen;
973
- $[186] = t108;
974
- $[187] = t109;
974
+ $[186] = t109;
975
+ $[187] = t110;
975
976
  } else {
976
- t109 = $[187];
977
+ t110 = $[187];
977
978
  }
978
- let t110;
979
- if ($[188] !== t105 || $[189] !== t109 || $[190] !== t15) {
980
- t110 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
979
+ let t111;
980
+ if ($[188] !== t105 || $[189] !== t110 || $[190] !== t15) {
981
+ t111 = /* @__PURE__ */ jsx("div", { className: "overflow-auto my-auto", children: /* @__PURE__ */ jsxs(Container, { maxWidth: "4xl", className: "flex flex-col gap-4 p-8 m-auto", children: [
981
982
  t15,
982
983
  t105,
983
984
  t106,
984
- t109
985
+ t110
985
986
  ] }) });
986
987
  $[188] = t105;
987
- $[189] = t109;
988
+ $[189] = t110;
988
989
  $[190] = t15;
989
- $[191] = t110;
990
+ $[191] = t111;
990
991
  } else {
991
- t110 = $[191];
992
+ t111 = $[191];
992
993
  }
993
- return t110;
994
+ return t111;
994
995
  }
995
996
  function _temp3$4(value_3) {
996
997
  if (value_3 === "code_defined") {