@firecms/core 3.0.0-tw4.1 → 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/hooks/useProjectLog.d.ts +1 -1
- package/dist/index.es.js +23 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +23 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/util/entity_cache.d.ts +0 -1
- package/dist/util/strings.d.ts +1 -0
- package/dist/util/strings.test.d.ts +1 -0
- package/package.json +5 -5
- package/src/core/SideDialogs.tsx +19 -8
- package/src/hooks/useProjectLog.tsx +1 -1
- package/src/util/entity_cache.ts +0 -5
- package/src/util/strings.test.ts +101 -0
- package/src/util/strings.ts +21 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AuthController, DataSourceDelegate, FireCMSPlugin } from "../types";
|
|
2
2
|
export declare const DEFAULT_SERVER_DEV = "https://api-kdoe6pj3qq-ey.a.run.app";
|
|
3
|
-
export declare const DEFAULT_SERVER = "https://api
|
|
3
|
+
export declare const DEFAULT_SERVER = "https://api.firecms.co";
|
|
4
4
|
export type AccessResponse = {
|
|
5
5
|
blocked?: boolean;
|
|
6
6
|
message?: string;
|
package/dist/index.es.js
CHANGED
|
@@ -1127,6 +1127,18 @@ function unslugify(slug) {
|
|
|
1127
1127
|
return slug.trim();
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
+
function prettifyIdentifier(input) {
|
|
1131
|
+
if (!input) return "";
|
|
1132
|
+
let text = input;
|
|
1133
|
+
text = text.replace(/([a-z])([A-Z])|([A-Z])([A-Z][a-z])/g, "$1$3 $2$4");
|
|
1134
|
+
text = text.replace(/[_-]+/g, " ");
|
|
1135
|
+
const s = text.trim().replace(/\b\w/g, (char) => char.toUpperCase());
|
|
1136
|
+
console.log("Prettified identifier:", {
|
|
1137
|
+
input,
|
|
1138
|
+
s
|
|
1139
|
+
});
|
|
1140
|
+
return s;
|
|
1141
|
+
}
|
|
1130
1142
|
const defaultDateFormat = "MMMM dd, yyyy, HH:mm:ss";
|
|
1131
1143
|
const COLLECTION_PATH_SEPARATOR = "::";
|
|
1132
1144
|
function stripCollectionPath(path) {
|
|
@@ -10201,10 +10213,6 @@ function getEntityFromCache(path) {
|
|
|
10201
10213
|
const entityString = localStorage.getItem(key);
|
|
10202
10214
|
if (entityString) {
|
|
10203
10215
|
const entity = JSON.parse(entityString, customReviver);
|
|
10204
|
-
console.log("Loaded entity from localStorage:", {
|
|
10205
|
-
key,
|
|
10206
|
-
entity
|
|
10207
|
-
});
|
|
10208
10216
|
return entity;
|
|
10209
10217
|
}
|
|
10210
10218
|
} catch (error) {
|
|
@@ -23681,7 +23689,15 @@ function SideDialogView({
|
|
|
23681
23689
|
pendingClose,
|
|
23682
23690
|
setPendingClose
|
|
23683
23691
|
}, children: [
|
|
23684
|
-
/* @__PURE__ */ jsxs(Sheet, { open: Boolean(panel), onOpenChange: (open) =>
|
|
23692
|
+
/* @__PURE__ */ jsxs(Sheet, { open: Boolean(panel), onOpenChange: (open) => {
|
|
23693
|
+
if (!open) {
|
|
23694
|
+
const suggestionMenu = document.querySelector('[data-suggestion-menu="true"]');
|
|
23695
|
+
if (suggestionMenu && window.getComputedStyle(suggestionMenu).visibility !== "hidden") {
|
|
23696
|
+
return;
|
|
23697
|
+
}
|
|
23698
|
+
onCloseRequest();
|
|
23699
|
+
}
|
|
23700
|
+
}, title: "Side dialog " + panel?.key, children: [
|
|
23685
23701
|
panel && /* @__PURE__ */ 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: {
|
|
23686
23702
|
width: panel.width,
|
|
23687
23703
|
transform: `translateX(-${offsetPosition * 200}px)`
|
|
@@ -25029,7 +25045,7 @@ function useBuildDataSource({
|
|
|
25029
25045
|
}, [delegate.initTextSearch])
|
|
25030
25046
|
};
|
|
25031
25047
|
}
|
|
25032
|
-
const DEFAULT_SERVER = "https://api
|
|
25048
|
+
const DEFAULT_SERVER = "https://api.firecms.co";
|
|
25033
25049
|
async function makeRequest(authController, dataSourceKey, pluginKeys, apiKey) {
|
|
25034
25050
|
let idToken;
|
|
25035
25051
|
try {
|
|
@@ -27174,6 +27190,7 @@ export {
|
|
|
27174
27190
|
navigateToEntity,
|
|
27175
27191
|
pick,
|
|
27176
27192
|
plural,
|
|
27193
|
+
prettifyIdentifier,
|
|
27177
27194
|
printChanged,
|
|
27178
27195
|
propertiesToColumns,
|
|
27179
27196
|
randomColor,
|