@firecms/core 3.0.0-tw4.2 → 3.0.0-tw4.3

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
@@ -1125,6 +1125,18 @@
1125
1125
  return slug.trim();
1126
1126
  }
1127
1127
  }
1128
+ function prettifyIdentifier(input) {
1129
+ if (!input) return "";
1130
+ let text = input;
1131
+ text = text.replace(/([a-z])([A-Z])|([A-Z])([A-Z][a-z])/g, "$1$3 $2$4");
1132
+ text = text.replace(/[_-]+/g, " ");
1133
+ const s = text.trim().replace(/\b\w/g, (char) => char.toUpperCase());
1134
+ console.log("Prettified identifier:", {
1135
+ input,
1136
+ s
1137
+ });
1138
+ return s;
1139
+ }
1128
1140
  const defaultDateFormat = "MMMM dd, yyyy, HH:mm:ss";
1129
1141
  const COLLECTION_PATH_SEPARATOR = "::";
1130
1142
  function stripCollectionPath(path) {
@@ -10199,10 +10211,6 @@
10199
10211
  const entityString = localStorage.getItem(key);
10200
10212
  if (entityString) {
10201
10213
  const entity = JSON.parse(entityString, customReviver);
10202
- console.log("Loaded entity from localStorage:", {
10203
- key,
10204
- entity
10205
- });
10206
10214
  return entity;
10207
10215
  }
10208
10216
  } catch (error) {
@@ -23679,7 +23687,15 @@
23679
23687
  pendingClose,
23680
23688
  setPendingClose
23681
23689
  }, children: [
23682
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Sheet, { open: Boolean(panel), onOpenChange: (open) => !open && onCloseRequest(), title: "Side dialog " + panel?.key, children: [
23690
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.Sheet, { open: Boolean(panel), onOpenChange: (open) => {
23691
+ if (!open) {
23692
+ const suggestionMenu = document.querySelector('[data-suggestion-menu="true"]');
23693
+ if (suggestionMenu && window.getComputedStyle(suggestionMenu).visibility !== "hidden") {
23694
+ return;
23695
+ }
23696
+ onCloseRequest();
23697
+ }
23698
+ }, title: "Side dialog " + panel?.key, children: [
23683
23699
  panel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "transform max-w-[100vw] lg:max-w-[95vw] flex flex-col h-full transition-all duration-250 ease-in-out bg-white dark:bg-surface-900 ", style: {
23684
23700
  width: panel.width,
23685
23701
  transform: `translateX(-${offsetPosition * 200}px)`
@@ -25027,7 +25043,7 @@
25027
25043
  }, [delegate.initTextSearch])
25028
25044
  };
25029
25045
  }
25030
- const DEFAULT_SERVER = "https://api-drplyi3b6q-ey.a.run.app";
25046
+ const DEFAULT_SERVER = "https://api.firecms.co";
25031
25047
  async function makeRequest(authController, dataSourceKey, pluginKeys, apiKey) {
25032
25048
  let idToken;
25033
25049
  try {
@@ -27171,6 +27187,7 @@
27171
27187
  exports2.navigateToEntity = navigateToEntity;
27172
27188
  exports2.pick = pick;
27173
27189
  exports2.plural = plural;
27190
+ exports2.prettifyIdentifier = prettifyIdentifier;
27174
27191
  exports2.printChanged = printChanged;
27175
27192
  exports2.propertiesToColumns = propertiesToColumns;
27176
27193
  exports2.randomColor = randomColor;