@rebasepro/app 0.9.1-canary.f2f61da → 0.9.1-canary.fd3754b
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/auth/index.d.ts +5 -6
- package/dist/contexts/index.d.ts +0 -1
- package/dist/index.es.js +102 -152
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +17021 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/util/previews.d.ts +0 -9
- package/package.json +17 -12
- package/src/auth/index.ts +5 -6
- package/src/components/LoginView/LoginView.tsx +2 -7
- package/src/components/common/useDataTableController.tsx +2 -8
- package/src/contexts/index.ts +0 -1
- package/src/core/Rebase.tsx +5 -20
- package/src/hooks/data/useCollection.tsx +4 -2
- package/src/hooks/data/useRelationSelector.tsx +3 -10
- package/src/util/previews.ts +0 -20
- package/dist/contexts/CollectionResolverContext.d.ts +0 -23
- package/src/contexts/CollectionResolverContext.tsx +0 -24
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @rebasepro/app
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* React authentication controller for Rebase frontends.
|
|
5
|
+
* Provides the `useRebaseAuthController` hook and API utilities
|
|
6
|
+
* for communicating with a Rebase backend's JWT auth endpoints.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
* controller are in `../components`. Both are re-exported from the package
|
|
9
|
-
* root, which is where applications should import them from.
|
|
8
|
+
* For the generic LoginView and RebaseAuth components, see @rebasepro/app.
|
|
10
9
|
*/
|
|
11
10
|
export type { RebaseAuthController, RebaseAuthControllerProps, AuthTokens, DeviceSession, UserInfo, AuthResponse, RefreshResponse } from "./types";
|
|
12
11
|
export { useRebaseAuthController } from "./useRebaseAuthController";
|
package/dist/contexts/index.d.ts
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -296,24 +296,6 @@ function CollectionScopeProvider({ collection, children }) {
|
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
298
|
//#endregion
|
|
299
|
-
//#region src/contexts/CollectionResolverContext.tsx
|
|
300
|
-
/**
|
|
301
|
-
* Lets the layer that owns the collections hand a resolver *up* to the data
|
|
302
|
-
* layer, which needs a collection's primary keys to give its rows an address.
|
|
303
|
-
*
|
|
304
|
-
* The inversion is forced by the composition: `<Rebase client>` builds the data
|
|
305
|
-
* layer, and `<RebaseAdmin collections>` sits inside it — so the collections are
|
|
306
|
-
* not in scope where the data is created, and `Rebase` cannot take them as a
|
|
307
|
-
* prop without giving every headless BaaS app a collections argument it has no
|
|
308
|
-
* use for.
|
|
309
|
-
*
|
|
310
|
-
* Registration is a ref write, so it is safe to call during render — and it has
|
|
311
|
-
* to be. The views that fetch rows are *below* the registrar, and child effects
|
|
312
|
-
* run before parent effects, so registering in an effect would bind after the
|
|
313
|
-
* first page of rows had already been converted.
|
|
314
|
-
*/
|
|
315
|
-
var CollectionResolverRegistrationContext = React.createContext(() => void 0);
|
|
316
|
-
//#endregion
|
|
317
299
|
//#region src/hooks/data/useData.tsx
|
|
318
300
|
/**
|
|
319
301
|
* Use this hook to access the unified data API.
|
|
@@ -409,94 +391,6 @@ function SchemaDriftBanner({ className }) {
|
|
|
409
391
|
});
|
|
410
392
|
}
|
|
411
393
|
//#endregion
|
|
412
|
-
//#region src/util/previews.ts
|
|
413
|
-
function isReferenceProperty(property) {
|
|
414
|
-
if (!property) return null;
|
|
415
|
-
if (property.type === "reference") return true;
|
|
416
|
-
if (property.type === "array") if (Array.isArray(property.of)) return false;
|
|
417
|
-
else return property.of?.type === "reference";
|
|
418
|
-
return false;
|
|
419
|
-
}
|
|
420
|
-
function isRelationProperty(property) {
|
|
421
|
-
if (!property) return null;
|
|
422
|
-
if (property.type === "relation") return true;
|
|
423
|
-
if (property.type === "array") if (Array.isArray(property.of)) return false;
|
|
424
|
-
else return property.of?.type === "relation";
|
|
425
|
-
return false;
|
|
426
|
-
}
|
|
427
|
-
function isHiddenProperty(property) {
|
|
428
|
-
if (!property) return false;
|
|
429
|
-
return Boolean(property.ui?.hideFromCollection);
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* Returns true when the property holds file-storage content (single image,
|
|
433
|
-
* array of images, generic upload, …). These properties are rendered by the
|
|
434
|
-
* dedicated image-slot and should NOT appear as regular preview columns.
|
|
435
|
-
*/
|
|
436
|
-
function isStorageProperty(property) {
|
|
437
|
-
if (!property) return false;
|
|
438
|
-
if (property.type === "string" && property.storage) return true;
|
|
439
|
-
if (property.type === "string" && property.ui?.url === "image") return true;
|
|
440
|
-
if (property.type === "array" && property.of && !Array.isArray(property.of)) {
|
|
441
|
-
const inner = property.of;
|
|
442
|
-
if (inner.type === "string" && (inner.storage || inner.ui?.url === "image")) return true;
|
|
443
|
-
}
|
|
444
|
-
return false;
|
|
445
|
-
}
|
|
446
|
-
function getEntityPreviewKeys(authController, targetCollection, fields, previewProperties, limit = 3) {
|
|
447
|
-
const allProperties = Object.keys(targetCollection.properties);
|
|
448
|
-
let listProperties = previewProperties?.filter((p) => allProperties.includes(p));
|
|
449
|
-
if (!listProperties && targetCollection.previewProperties) listProperties = targetCollection.previewProperties?.filter((p) => allProperties.includes(p));
|
|
450
|
-
if (listProperties && listProperties.length > 0) return listProperties;
|
|
451
|
-
else {
|
|
452
|
-
listProperties = targetCollection.propertiesOrder || allProperties;
|
|
453
|
-
return listProperties.filter((key) => {
|
|
454
|
-
const prop = targetCollection.properties[key];
|
|
455
|
-
return !(prop && typeof prop === "object" && "isId" in prop && Boolean(prop.isId)) && key !== "id";
|
|
456
|
-
}).filter((key) => {
|
|
457
|
-
const property = targetCollection.properties[key];
|
|
458
|
-
return property && !isPropertyBuilder(property) && !isReferenceProperty(property) && !isRelationProperty(property) && !isHiddenProperty(property) && !isStorageProperty(property);
|
|
459
|
-
}).slice(0, limit);
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
var INCLUDE_ALL_RELATIONS = ["*"];
|
|
463
|
-
/**
|
|
464
|
-
* The `include` params that eager-load a collection's relations in the same
|
|
465
|
-
* request as its rows, so previews never fetch once per relation cell.
|
|
466
|
-
*
|
|
467
|
-
* Only the REST transport reads `include`; the realtime transport embeds
|
|
468
|
-
* relation data unconditionally and ignores it. Passing it either way keeps a
|
|
469
|
-
* realtime-less deployment rendering the same cells as a realtime one.
|
|
470
|
-
*/
|
|
471
|
-
function getRelationIncludeParams(collection) {
|
|
472
|
-
if (!collection.properties) return void 0;
|
|
473
|
-
return Object.values(collection.properties).some((property) => property && !isPropertyBuilder(property) && (isRelationProperty(property) || isReferenceProperty(property))) ? INCLUDE_ALL_RELATIONS : void 0;
|
|
474
|
-
}
|
|
475
|
-
function getEntityTitlePropertyKey(collection, propertyConfigs) {
|
|
476
|
-
if (collection.titleProperty) return collection.titleProperty;
|
|
477
|
-
const orderToSearch = collection.propertiesOrder || Object.keys(collection.properties);
|
|
478
|
-
let firstStringCandidate;
|
|
479
|
-
for (const key of orderToSearch) {
|
|
480
|
-
const property = collection.properties[key];
|
|
481
|
-
if (property && !isPropertyBuilder(property)) {
|
|
482
|
-
const prop = property;
|
|
483
|
-
if (isHiddenProperty(prop)) continue;
|
|
484
|
-
if (prop.type === "string" && !prop.ui?.multiline && !prop.ui?.markdown && !prop.storage && !prop.isId) {
|
|
485
|
-
if (!firstStringCandidate) firstStringCandidate = key;
|
|
486
|
-
const lowerKey = key.toLowerCase();
|
|
487
|
-
if ([
|
|
488
|
-
"name",
|
|
489
|
-
"title",
|
|
490
|
-
"label",
|
|
491
|
-
"displayname",
|
|
492
|
-
"username"
|
|
493
|
-
].includes(lowerKey)) return key;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
return firstStringCandidate;
|
|
498
|
-
}
|
|
499
|
-
//#endregion
|
|
500
394
|
//#region src/hooks/data/useCollection.tsx
|
|
501
395
|
/**
|
|
502
396
|
* This hook is used to fetch collections using a given collection
|
|
@@ -541,7 +435,7 @@ function useCollection({ path, collection, filterValues, sortBy, itemCount, offs
|
|
|
541
435
|
if (isSchemaDriftError(error)) reportSchemaDrift(error.message);
|
|
542
436
|
};
|
|
543
437
|
const accessor = dataClient.collection(path);
|
|
544
|
-
const includeParams =
|
|
438
|
+
const includeParams = collection.properties && Object.values(collection.properties).some((p) => p.type === "relation" || p.type === "reference") ? ["*"] : void 0;
|
|
545
439
|
if (accessor.listen) return accessor.listen({
|
|
546
440
|
where: whereParams,
|
|
547
441
|
limit: itemCount,
|
|
@@ -916,7 +810,6 @@ function useRelationSelector({ path, collection, fixedFilter, pageSize = DEFAULT
|
|
|
916
810
|
unsubscribeRef.current = null;
|
|
917
811
|
}
|
|
918
812
|
}, []);
|
|
919
|
-
const includeParams = getRelationIncludeParams(collection);
|
|
920
813
|
const fetchData = useCallback(() => {
|
|
921
814
|
cleanupSubscription();
|
|
922
815
|
setError(void 0);
|
|
@@ -938,8 +831,7 @@ function useRelationSelector({ path, collection, fixedFilter, pageSize = DEFAULT
|
|
|
938
831
|
where: whereParams,
|
|
939
832
|
limit,
|
|
940
833
|
orderBy: void 0,
|
|
941
|
-
searchString: currentSearch
|
|
942
|
-
include: includeParams
|
|
834
|
+
searchString: currentSearch
|
|
943
835
|
}, (res) => onEntitiesUpdate({
|
|
944
836
|
data: res.data,
|
|
945
837
|
meta: res.meta
|
|
@@ -950,8 +842,7 @@ function useRelationSelector({ path, collection, fixedFilter, pageSize = DEFAULT
|
|
|
950
842
|
limit,
|
|
951
843
|
offset: 0,
|
|
952
844
|
orderBy: void 0,
|
|
953
|
-
searchString: currentSearch
|
|
954
|
-
include: includeParams
|
|
845
|
+
searchString: currentSearch
|
|
955
846
|
}).then((res) => onEntitiesUpdate({
|
|
956
847
|
data: res.data,
|
|
957
848
|
meta: res.meta
|
|
@@ -967,8 +858,7 @@ function useRelationSelector({ path, collection, fixedFilter, pageSize = DEFAULT
|
|
|
967
858
|
currentSearch,
|
|
968
859
|
entityToRelationItem,
|
|
969
860
|
cleanupSubscription,
|
|
970
|
-
setLoading
|
|
971
|
-
includeParams
|
|
861
|
+
setLoading
|
|
972
862
|
]);
|
|
973
863
|
const search = useCallback((searchString) => {
|
|
974
864
|
if (searchTimeoutRef.current) clearTimeout(searchTimeoutRef.current);
|
|
@@ -2457,21 +2347,18 @@ function useDataTableController({ path, collection, scrollRestoration, entitiesD
|
|
|
2457
2347
|
const whereParams = filterValues && Object.keys(filterValues).length > 0 ? filterValues : void 0;
|
|
2458
2348
|
const orderByParams = sortBy ? [String(sortBy[0]), sortBy[1]] : void 0;
|
|
2459
2349
|
let unsubscribe;
|
|
2460
|
-
const includeParams = getRelationIncludeParams(collection);
|
|
2461
2350
|
if (accessor.listen) unsubscribe = accessor.listen({
|
|
2462
2351
|
where: whereParams,
|
|
2463
2352
|
limit: itemCount,
|
|
2464
2353
|
orderBy: orderByParams,
|
|
2465
|
-
searchString
|
|
2466
|
-
include: includeParams
|
|
2354
|
+
searchString
|
|
2467
2355
|
}, (res) => onEntitiesUpdate(res.data), onError);
|
|
2468
2356
|
else {
|
|
2469
2357
|
accessor.find({
|
|
2470
2358
|
where: whereParams,
|
|
2471
2359
|
limit: itemCount,
|
|
2472
2360
|
orderBy: orderByParams,
|
|
2473
|
-
searchString
|
|
2474
|
-
include: includeParams
|
|
2361
|
+
searchString
|
|
2475
2362
|
}).then((res) => onEntitiesUpdate(res.data)).catch(onError);
|
|
2476
2363
|
unsubscribe = () => void 0;
|
|
2477
2364
|
}
|
|
@@ -9193,10 +9080,10 @@ function LoginForm({ onClose, onForgotPassword, authController, registrationMode
|
|
|
9193
9080
|
};
|
|
9194
9081
|
}, [onClose]);
|
|
9195
9082
|
function handleEnterPassword() {
|
|
9196
|
-
if (email && password && authController.emailPasswordLogin)
|
|
9083
|
+
if (email && password && authController.emailPasswordLogin) authController.emailPasswordLogin(email, password);
|
|
9197
9084
|
}
|
|
9198
9085
|
function handleRegistration() {
|
|
9199
|
-
if (email && password && authController.register)
|
|
9086
|
+
if (email && password && authController.register) authController.register(email, password, displayName);
|
|
9200
9087
|
}
|
|
9201
9088
|
const handleSubmit = (event) => {
|
|
9202
9089
|
event.preventDefault();
|
|
@@ -15450,11 +15337,6 @@ function Rebase(props) {
|
|
|
15450
15337
|
const normalizedDataSources = useMemo(() => {
|
|
15451
15338
|
return dataSourcesProp ?? [];
|
|
15452
15339
|
}, [dataSourcesProp]);
|
|
15453
|
-
const collectionResolverRef = useRef(void 0);
|
|
15454
|
-
const registerCollectionResolver = React.useCallback((resolver) => {
|
|
15455
|
-
collectionResolverRef.current = resolver;
|
|
15456
|
-
}, []);
|
|
15457
|
-
const entityDataOptions = useMemo(() => ({ resolveCollection: (slug) => collectionResolverRef.current?.(slug) }), []);
|
|
15458
15340
|
const dataSourcesRef = useRef(null);
|
|
15459
15341
|
const dataSourcesValue = useMemo(() => {
|
|
15460
15342
|
const sig = normalizedDataSources.map((d) => ({
|
|
@@ -15473,7 +15355,7 @@ function Rebase(props) {
|
|
|
15473
15355
|
...definition,
|
|
15474
15356
|
transport: ds.transport ?? (driver ? "direct" : "server")
|
|
15475
15357
|
};
|
|
15476
|
-
if (driver) sources[ds.key] = buildRebaseData(driver
|
|
15358
|
+
if (driver) sources[ds.key] = buildRebaseData(driver);
|
|
15477
15359
|
}
|
|
15478
15360
|
const value = {
|
|
15479
15361
|
registry,
|
|
@@ -15484,20 +15366,16 @@ function Rebase(props) {
|
|
|
15484
15366
|
value
|
|
15485
15367
|
};
|
|
15486
15368
|
return value;
|
|
15487
|
-
}, [normalizedDataSources
|
|
15369
|
+
}, [normalizedDataSources]);
|
|
15488
15370
|
const resolvedData = useMemo(() => {
|
|
15489
15371
|
const registeredDefault = dataSourcesValue.sources[DEFAULT_DATA_SOURCE_KEY];
|
|
15490
15372
|
if (registeredDefault) return registeredDefault;
|
|
15491
|
-
if (client?.data) return wrapAsEntityData(client.data
|
|
15373
|
+
if (client?.data) return wrapAsEntityData(client.data);
|
|
15492
15374
|
const built = Object.values(dataSourcesValue.sources);
|
|
15493
15375
|
if (built.length === 1) return built[0];
|
|
15494
15376
|
if (built.length > 1) throw new Error("[Rebase] Several data sources are registered but none is the default. Pass a `client`, or key one `dataSources` entry \"(default)\".");
|
|
15495
15377
|
throw new Error("Rebase requires either `client` or a `dataSources` entry with a driver to be provided");
|
|
15496
|
-
}, [
|
|
15497
|
-
client,
|
|
15498
|
-
dataSourcesValue,
|
|
15499
|
-
entityDataOptions
|
|
15500
|
-
]);
|
|
15378
|
+
}, [client, dataSourcesValue]);
|
|
15501
15379
|
const resolvedStorage = storageSourceProp ?? client?.storage;
|
|
15502
15380
|
const [remoteStorageSources, setRemoteStorageSources] = useState([]);
|
|
15503
15381
|
const authUser = authController.user;
|
|
@@ -15642,23 +15520,20 @@ function Rebase(props) {
|
|
|
15642
15520
|
value: storageSourcesValue,
|
|
15643
15521
|
children: /* @__PURE__ */ jsx(StorageSourceContext.Provider, {
|
|
15644
15522
|
value: resolvedStorage,
|
|
15645
|
-
children: /* @__PURE__ */ jsx(
|
|
15646
|
-
value:
|
|
15647
|
-
children: /* @__PURE__ */ jsx(
|
|
15648
|
-
value:
|
|
15649
|
-
children: /* @__PURE__ */ jsx(
|
|
15650
|
-
value:
|
|
15651
|
-
children: /* @__PURE__ */ jsx(
|
|
15652
|
-
value:
|
|
15653
|
-
children: /* @__PURE__ */ jsx(
|
|
15654
|
-
value:
|
|
15655
|
-
children: /* @__PURE__ */ jsx(
|
|
15656
|
-
|
|
15657
|
-
children
|
|
15658
|
-
|
|
15659
|
-
children
|
|
15660
|
-
}) }) }) })
|
|
15661
|
-
})
|
|
15523
|
+
children: /* @__PURE__ */ jsx(DataSourcesContext.Provider, {
|
|
15524
|
+
value: dataSourcesValue,
|
|
15525
|
+
children: /* @__PURE__ */ jsx(RebaseDataContext.Provider, {
|
|
15526
|
+
value: resolvedData,
|
|
15527
|
+
children: /* @__PURE__ */ jsx(DatabaseAdminContext.Provider, {
|
|
15528
|
+
value: resolvedDatabaseAdmin,
|
|
15529
|
+
children: /* @__PURE__ */ jsx(AuthControllerContext.Provider, {
|
|
15530
|
+
value: authController,
|
|
15531
|
+
children: /* @__PURE__ */ jsx(EffectiveRoleControllerContext.Provider, {
|
|
15532
|
+
value: activeEffectiveRoleController,
|
|
15533
|
+
children: /* @__PURE__ */ jsx(DialogsProvider, { children: /* @__PURE__ */ jsx(SchemaDriftProvider, { children: /* @__PURE__ */ jsx(RebaseRegistryProvider, { children: /* @__PURE__ */ jsx(RebaseInternal, {
|
|
15534
|
+
loading,
|
|
15535
|
+
children
|
|
15536
|
+
}) }) }) })
|
|
15662
15537
|
})
|
|
15663
15538
|
})
|
|
15664
15539
|
})
|
|
@@ -16595,6 +16470,81 @@ async function resizeImage(file, imageResize) {
|
|
|
16595
16470
|
});
|
|
16596
16471
|
}
|
|
16597
16472
|
//#endregion
|
|
16473
|
+
//#region src/util/previews.ts
|
|
16474
|
+
function isReferenceProperty(property) {
|
|
16475
|
+
if (!property) return null;
|
|
16476
|
+
if (property.type === "reference") return true;
|
|
16477
|
+
if (property.type === "array") if (Array.isArray(property.of)) return false;
|
|
16478
|
+
else return property.of?.type === "reference";
|
|
16479
|
+
return false;
|
|
16480
|
+
}
|
|
16481
|
+
function isRelationProperty(property) {
|
|
16482
|
+
if (!property) return null;
|
|
16483
|
+
if (property.type === "relation") return true;
|
|
16484
|
+
if (property.type === "array") if (Array.isArray(property.of)) return false;
|
|
16485
|
+
else return property.of?.type === "relation";
|
|
16486
|
+
return false;
|
|
16487
|
+
}
|
|
16488
|
+
function isHiddenProperty(property) {
|
|
16489
|
+
if (!property) return false;
|
|
16490
|
+
return Boolean(property.ui?.hideFromCollection);
|
|
16491
|
+
}
|
|
16492
|
+
/**
|
|
16493
|
+
* Returns true when the property holds file-storage content (single image,
|
|
16494
|
+
* array of images, generic upload, …). These properties are rendered by the
|
|
16495
|
+
* dedicated image-slot and should NOT appear as regular preview columns.
|
|
16496
|
+
*/
|
|
16497
|
+
function isStorageProperty(property) {
|
|
16498
|
+
if (!property) return false;
|
|
16499
|
+
if (property.type === "string" && property.storage) return true;
|
|
16500
|
+
if (property.type === "string" && property.ui?.url === "image") return true;
|
|
16501
|
+
if (property.type === "array" && property.of && !Array.isArray(property.of)) {
|
|
16502
|
+
const inner = property.of;
|
|
16503
|
+
if (inner.type === "string" && (inner.storage || inner.ui?.url === "image")) return true;
|
|
16504
|
+
}
|
|
16505
|
+
return false;
|
|
16506
|
+
}
|
|
16507
|
+
function getEntityPreviewKeys(authController, targetCollection, fields, previewProperties, limit = 3) {
|
|
16508
|
+
const allProperties = Object.keys(targetCollection.properties);
|
|
16509
|
+
let listProperties = previewProperties?.filter((p) => allProperties.includes(p));
|
|
16510
|
+
if (!listProperties && targetCollection.previewProperties) listProperties = targetCollection.previewProperties?.filter((p) => allProperties.includes(p));
|
|
16511
|
+
if (listProperties && listProperties.length > 0) return listProperties;
|
|
16512
|
+
else {
|
|
16513
|
+
listProperties = targetCollection.propertiesOrder || allProperties;
|
|
16514
|
+
return listProperties.filter((key) => {
|
|
16515
|
+
const prop = targetCollection.properties[key];
|
|
16516
|
+
return !(prop && typeof prop === "object" && "isId" in prop && Boolean(prop.isId)) && key !== "id";
|
|
16517
|
+
}).filter((key) => {
|
|
16518
|
+
const property = targetCollection.properties[key];
|
|
16519
|
+
return property && !isPropertyBuilder(property) && !isReferenceProperty(property) && !isRelationProperty(property) && !isHiddenProperty(property) && !isStorageProperty(property);
|
|
16520
|
+
}).slice(0, limit);
|
|
16521
|
+
}
|
|
16522
|
+
}
|
|
16523
|
+
function getEntityTitlePropertyKey(collection, propertyConfigs) {
|
|
16524
|
+
if (collection.titleProperty) return collection.titleProperty;
|
|
16525
|
+
const orderToSearch = collection.propertiesOrder || Object.keys(collection.properties);
|
|
16526
|
+
let firstStringCandidate;
|
|
16527
|
+
for (const key of orderToSearch) {
|
|
16528
|
+
const property = collection.properties[key];
|
|
16529
|
+
if (property && !isPropertyBuilder(property)) {
|
|
16530
|
+
const prop = property;
|
|
16531
|
+
if (isHiddenProperty(prop)) continue;
|
|
16532
|
+
if (prop.type === "string" && !prop.ui?.multiline && !prop.ui?.markdown && !prop.storage && !prop.isId) {
|
|
16533
|
+
if (!firstStringCandidate) firstStringCandidate = key;
|
|
16534
|
+
const lowerKey = key.toLowerCase();
|
|
16535
|
+
if ([
|
|
16536
|
+
"name",
|
|
16537
|
+
"title",
|
|
16538
|
+
"label",
|
|
16539
|
+
"displayname",
|
|
16540
|
+
"username"
|
|
16541
|
+
].includes(lowerKey)) return key;
|
|
16542
|
+
}
|
|
16543
|
+
}
|
|
16544
|
+
}
|
|
16545
|
+
return firstStringCandidate;
|
|
16546
|
+
}
|
|
16547
|
+
//#endregion
|
|
16598
16548
|
//#region src/util/enums.ts
|
|
16599
16549
|
function getColorScheme(enumValues, key) {
|
|
16600
16550
|
const labelOrConfig = getLabelOrConfigFrom(enumValues, key);
|
|
@@ -16888,6 +16838,6 @@ function useBridgeRegistration(key, value) {
|
|
|
16888
16838
|
]);
|
|
16889
16839
|
}
|
|
16890
16840
|
//#endregion
|
|
16891
|
-
export { ADDITIONAL_TAB_WIDTH, AIIcon, AIModifiedIndicator, AdminModeControllerContext, AdminModeControllerProvider, AnalyticsContext, ApiConfigProvider, AuthApiError, AuthControllerContext, CONTAINER_FULL_WIDTH, CollectionComponentOverrideProvider,
|
|
16841
|
+
export { ADDITIONAL_TAB_WIDTH, AIIcon, AIModifiedIndicator, AdminModeControllerContext, AdminModeControllerProvider, AnalyticsContext, ApiConfigProvider, AuthApiError, AuthControllerContext, CONTAINER_FULL_WIDTH, CollectionComponentOverrideProvider, CollectionScopeContext, CollectionScopeProvider, ComponentOverrideContext, ConfirmationDialog, CrmDashboardDemo, CustomizationControllerContext, DEFAULT_PAGE_SIZE, DataDriverContext, DataSourcesContext, DialogsControllerContext, DialogsProvider, EffectiveRoleControllerContext, EffectiveRoleControllerProvider, ErrorTooltip, ErrorView, FORM_CONTAINER_WIDTH, GlobalComponentOverrideProvider, IconForView, LanguageToggle, LoginView, ModeControllerContext, ModeControllerProvider, NotFoundPage, PluginProviderStack, REBASE_LOCALE_STORAGE_KEY, Rebase, RebaseAuth, RebaseClientInstanceContext, RebaseDataContext, RebaseI18nProvider, RebaseLogo, RebaseRegistryProvider, RebaseRouter, RebaseRoutes, STUDIO_NAVIGATION_GROUPS, SchemaDriftBanner, SchemaDriftProvider, SnackbarProvider, StorageSourceContext, StorageSourcesContext, StudioBridgeContext, StudioBridgeProvider, StudioBridgeRegistryContext, StudioBridgeRegistryProvider, UIReferenceView, UIStyleGuide, UnsavedChangesDialog, UserConfigurationPersistenceContext, UserDisplay, UserSelectPopover, UserSettingsView, buildCollapsedDefaults, buildEnumLabel, clearAuthConfigCache, clearFetchCache, createAuthConfigCache, createFormexStub, deleteEntityWithCallbacks, en, es, fetchAuthConfig, flattenKeys, getColorScheme, getColumnKeysForProperty, getEntityFromCache, getEntityFromMemoryCache, getEntityPreviewKeys, getEntityTitlePropertyKey, getFormFieldKeys, getIcon, getRowHeight, getSubcollectionColumnId, iconsSearch, isEnumValueDisabled, isSchemaDriftError, populateFetchCache, removeEntityFromCache, removeEntityFromMemoryCache, resolveComponentRef, saveEntityToCache, saveEntityToMemoryCache, saveEntityWithCallbacks, useAdminModeController, useAnalyticsController, useApiConfig, useAuthController, useAuthSubscription, useBackendStorageSource, useBridgeRegistration, useBrowserTitleAndIcon, useBuildAdminModeController, useBuildEffectiveRoleController, useBuildLocalConfigurationPersistence, useBuildModeController, useClipboard, useCollapsedGroups, useCollection, useCollectionScope, useColumnIds, useComponentOverride, useCustomizationController, useData, useDataSources, useDataTableController, useDebouncedData, useDialogsController, useEffectiveRoleController, useFetch, useLargeLayout, useModeController, usePermissions, useRebaseAuthController, useRebaseClient, useRebaseContext, useRebaseRegistry, useRebaseRegistryDispatch, useRelationSelector, useResolvedComponent, useRestoreScroll, useSchemaDriftContext, useScrollRestoration, useSlot, useSnackbarController, useStorageSource, useStorageSources, useStorageUploadController, useStudioBreadcrumbs, useStudioCollectionRegistry, useStudioNavigationState, useStudioSidePanelController, useStudioUrlController, useTranslation, useUnsavedChangesDialog, useUserConfigurationPersistence };
|
|
16892
16842
|
|
|
16893
16843
|
//# sourceMappingURL=index.es.js.map
|