@rebasepro/core 0.1.2 → 0.2.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/LICENSE +1 -1
- package/dist/components/LoginView/LoginView.d.ts +1 -6
- package/dist/contexts/SnackbarProvider.d.ts +1 -1
- package/dist/hooks/data/save.d.ts +2 -2
- package/dist/hooks/data/useEntityFetch.d.ts +5 -0
- package/dist/hooks/useResolvedComponent.d.ts +1 -1
- package/dist/index.es.js +386 -309
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +436 -358
- package/dist/index.umd.js.map +1 -1
- package/package.json +23 -23
- package/src/components/AIIcon.tsx +1 -1
- package/src/components/Debug/UIReferenceView.tsx +52 -3
- package/src/components/Debug/UIStyleGuide.tsx +1 -2
- package/src/components/ErrorView.tsx +1 -2
- package/src/components/LanguageToggle.tsx +1 -9
- package/src/components/LoginView/LoginView.tsx +21 -12
- package/src/components/UserDisplay.tsx +1 -2
- package/src/components/UserSelectPopover.tsx +13 -2
- package/src/components/UserSettingsView.tsx +12 -3
- package/src/components/common/useDataTableController.tsx +2 -2
- package/src/contexts/SnackbarProvider.tsx +2 -1
- package/src/core/PluginLifecycleManager.tsx +0 -1
- package/src/core/Rebase.tsx +1 -1
- package/src/hooks/data/save.ts +4 -4
- package/src/hooks/data/useCollectionFetch.tsx +4 -4
- package/src/hooks/data/useEntityFetch.tsx +13 -3
- package/src/hooks/data/useRelationSelector.tsx +2 -2
- package/src/hooks/useResolvedComponent.tsx +7 -6
- package/src/hooks/useStudioBridge.tsx +0 -1
- package/src/locales/en.ts +8 -0
- package/src/util/icons.tsx +16 -8
- package/src/util/previews.ts +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import React, { useRef, useEffect, useState, useContext, useCallback, useMemo, createContext, lazy, useLayoutEffect } from "react";
|
|
4
|
-
import { ErrorBoundary, Tooltip, Typography, Button, DialogTitle, DialogContent, LoadingButton, DialogActions, Dialog, Paper, IconButton, Container, cls, defaultBorderMixin, iconSize, MenuItem, Menu, Table, TableBody, Chip, CircularProgress, TableRow, TableCell, Checkbox, Avatar, Tabs, Tab, TextField, Select, SelectItem, MultiSelect, MultiSelectItem, BooleanSwitch, SearchBar, Skeleton, Alert, Separator, TableHeader, Popover, CenteredView, iconKeys, coolIconKeys, colorClassesMapping, getColorSchemeForSeed, CHIP_COLORS } from "@rebasepro/ui";
|
|
4
|
+
import { ErrorBoundary, Tooltip, AlertTriangleIcon, Typography, Button, DialogTitle, DialogContent, LoadingButton, DialogActions, Dialog, Wand2Icon, Paper, IconButton, Trash2Icon, Container, cls, defaultBorderMixin, ChevronDownIcon, iconSize, SettingsIcon, ChevronsLeftIcon, FolderIcon, UserIcon, TagIcon, ChevronsRightIcon, MenuItem, MoonIcon, SunIcon, Menu, SunMoonIcon, PlusIcon, Table, TableBody, PencilIcon, Chip, CircularProgress, TableRow, TableCell, Checkbox, Avatar, LogOutIcon, Tabs, Tab, TextField, Select, SelectItem, MultiSelect, MultiSelectItem, BooleanSwitch, SearchBar, Skeleton, Alert, Separator, TableHeader, LanguagesIcon, CheckIcon, Popover, CircleUserIcon, MailIcon, ArrowLeftIcon, CenteredView, iconKeys, coolIconKeys, colorClassesMapping, lucideIcons, getColorSchemeForSeed, CHIP_COLORS } from "@rebasepro/ui";
|
|
5
5
|
import { SnackbarProvider as SnackbarProvider$1, useSnackbar } from "notistack";
|
|
6
6
|
import { EntityRelation, isLazyComponentRef, EntityReference, Vector, GeoPoint } from "@rebasepro/types";
|
|
7
7
|
import { useBlocker, useLocation, Link, createBrowserRouter, RouterProvider, Routes } from "react-router-dom";
|
|
@@ -9,7 +9,6 @@ import { stripCollectionPath, canCreateEntity, canEditEntity, canDeleteEntity, c
|
|
|
9
9
|
import { mergeDeep, slugify, hashString, isObject, isPlainObject, randomString } from "@rebasepro/utils";
|
|
10
10
|
import { deepEqual } from "fast-equals";
|
|
11
11
|
import { useTranslation as useTranslation$1, initReactI18next, I18nextProvider } from "react-i18next";
|
|
12
|
-
import { AlertTriangleIcon, Wand2Icon, Trash2Icon, ChevronDownIcon, SettingsIcon, ChevronsLeftIcon, FolderIcon, UserIcon, TagIcon, ChevronsRightIcon, MoonIcon, SunIcon, SunMoonIcon, PlusIcon, PencilIcon, LogOutIcon, LanguagesIcon, CheckIcon, CircleUserIcon, MailIcon, ArrowLeftIcon, icons } from "lucide-react";
|
|
13
12
|
import i18next from "i18next";
|
|
14
13
|
import Fuse from "fuse.js";
|
|
15
14
|
import Compressor from "compressorjs";
|
|
@@ -22,60 +21,98 @@ function PluginProviderStack({
|
|
|
22
21
|
const providers = plugins.flatMap((p) => p.providers ?? []).filter((p) => p.scope === scope);
|
|
23
22
|
return providers.reduceRight((acc, provider) => /* @__PURE__ */ jsx(provider.Component, { ...provider.props, ...scopeProps, children: acc }), children);
|
|
24
23
|
}
|
|
25
|
-
function PluginLifecycleManager({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
function PluginLifecycleManager(t0) {
|
|
25
|
+
const $ = c(8);
|
|
26
|
+
const {
|
|
27
|
+
plugins,
|
|
28
|
+
context
|
|
29
|
+
} = t0;
|
|
29
30
|
const mountedRef = useRef(false);
|
|
30
31
|
const prevUserRef = useRef(void 0);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
try {
|
|
37
|
-
const result = plugin.lifecycle.onMount(context);
|
|
38
|
-
if (result instanceof Promise) {
|
|
39
|
-
result.catch((err) => console.error(`[Rebase] Plugin "${plugin.key}" onMount error:`, err));
|
|
40
|
-
}
|
|
41
|
-
} catch (err) {
|
|
42
|
-
console.error(`[Rebase] Plugin "${plugin.key}" onMount error:`, err);
|
|
43
|
-
}
|
|
32
|
+
let t1;
|
|
33
|
+
if ($[0] !== context || $[1] !== plugins) {
|
|
34
|
+
t1 = () => {
|
|
35
|
+
if (mountedRef.current) {
|
|
36
|
+
return;
|
|
44
37
|
}
|
|
45
|
-
|
|
46
|
-
return () => {
|
|
47
|
-
mountedRef.current = false;
|
|
38
|
+
mountedRef.current = true;
|
|
48
39
|
for (const plugin of plugins) {
|
|
49
|
-
if (plugin.lifecycle?.
|
|
40
|
+
if (plugin.lifecycle?.onMount) {
|
|
50
41
|
try {
|
|
51
|
-
plugin.lifecycle.
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
const result = plugin.lifecycle.onMount(context);
|
|
43
|
+
if (result instanceof Promise) {
|
|
44
|
+
result.catch((err_0) => console.error(`[Rebase] Plugin "${plugin.key}" onMount error:`, err_0));
|
|
45
|
+
}
|
|
46
|
+
} catch (t22) {
|
|
47
|
+
const err = t22;
|
|
48
|
+
console.error(`[Rebase] Plugin "${plugin.key}" onMount error:`, err);
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
51
|
}
|
|
52
|
+
return () => {
|
|
53
|
+
mountedRef.current = false;
|
|
54
|
+
for (const plugin_0 of plugins) {
|
|
55
|
+
if (plugin_0.lifecycle?.onUnmount) {
|
|
56
|
+
try {
|
|
57
|
+
plugin_0.lifecycle.onUnmount();
|
|
58
|
+
} catch (t32) {
|
|
59
|
+
const err_1 = t32;
|
|
60
|
+
console.error(`[Rebase] Plugin "${plugin_0.key}" onUnmount error:`, err_1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
};
|
|
57
65
|
};
|
|
58
|
-
|
|
66
|
+
$[0] = context;
|
|
67
|
+
$[1] = plugins;
|
|
68
|
+
$[2] = t1;
|
|
69
|
+
} else {
|
|
70
|
+
t1 = $[2];
|
|
71
|
+
}
|
|
72
|
+
let t2;
|
|
73
|
+
if ($[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
74
|
+
t2 = [];
|
|
75
|
+
$[3] = t2;
|
|
76
|
+
} else {
|
|
77
|
+
t2 = $[3];
|
|
78
|
+
}
|
|
79
|
+
useEffect(t1, t2);
|
|
59
80
|
const currentUser = context.authController?.user ?? null;
|
|
60
|
-
|
|
61
|
-
|
|
81
|
+
let t3;
|
|
82
|
+
let t4;
|
|
83
|
+
if ($[4] !== currentUser || $[5] !== plugins) {
|
|
84
|
+
t3 = () => {
|
|
85
|
+
if (prevUserRef.current === void 0) {
|
|
86
|
+
prevUserRef.current = currentUser;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const prevUid = prevUserRef.current?.uid;
|
|
90
|
+
const currUid = currentUser?.uid;
|
|
91
|
+
if (prevUid === currUid) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
62
94
|
prevUserRef.current = currentUser;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
try {
|
|
72
|
-
plugin.lifecycle.onAuthStateChange(currentUser);
|
|
73
|
-
} catch (err) {
|
|
74
|
-
console.error(`[Rebase] Plugin "${plugin.key}" onAuthStateChange error:`, err);
|
|
95
|
+
for (const plugin_1 of plugins) {
|
|
96
|
+
if (plugin_1.lifecycle?.onAuthStateChange) {
|
|
97
|
+
try {
|
|
98
|
+
plugin_1.lifecycle.onAuthStateChange(currentUser);
|
|
99
|
+
} catch (t5) {
|
|
100
|
+
const err_2 = t5;
|
|
101
|
+
console.error(`[Rebase] Plugin "${plugin_1.key}" onAuthStateChange error:`, err_2);
|
|
102
|
+
}
|
|
75
103
|
}
|
|
76
104
|
}
|
|
77
|
-
}
|
|
78
|
-
|
|
105
|
+
};
|
|
106
|
+
t4 = [currentUser, plugins];
|
|
107
|
+
$[4] = currentUser;
|
|
108
|
+
$[5] = plugins;
|
|
109
|
+
$[6] = t3;
|
|
110
|
+
$[7] = t4;
|
|
111
|
+
} else {
|
|
112
|
+
t3 = $[6];
|
|
113
|
+
t4 = $[7];
|
|
114
|
+
}
|
|
115
|
+
useEffect(t3, t4);
|
|
79
116
|
return null;
|
|
80
117
|
}
|
|
81
118
|
const SnackbarProvider = (t0) => {
|
|
@@ -85,7 +122,7 @@ const SnackbarProvider = (t0) => {
|
|
|
85
122
|
} = t0;
|
|
86
123
|
let t1;
|
|
87
124
|
if ($[0] !== children) {
|
|
88
|
-
t1 = /* @__PURE__ */ jsx(SnackbarProvider$1, { maxSnack: 3, autoHideDuration: 3500, children });
|
|
125
|
+
t1 = /* @__PURE__ */ jsx(SnackbarProvider$1, { maxSnack: 3, preventDuplicate: true, autoHideDuration: 3500, children });
|
|
89
126
|
$[0] = children;
|
|
90
127
|
$[1] = t1;
|
|
91
128
|
} else {
|
|
@@ -231,7 +268,7 @@ const useData = () => {
|
|
|
231
268
|
return useContext(RebaseDataContext);
|
|
232
269
|
};
|
|
233
270
|
function useCollectionFetch(t0) {
|
|
234
|
-
const $ = c(
|
|
271
|
+
const $ = c(25);
|
|
235
272
|
const {
|
|
236
273
|
path,
|
|
237
274
|
collection,
|
|
@@ -308,7 +345,10 @@ function useCollectionFetch(t0) {
|
|
|
308
345
|
orderBy: orderByParams,
|
|
309
346
|
searchString,
|
|
310
347
|
include: includeParams
|
|
311
|
-
}, onEntitiesUpdate
|
|
348
|
+
}, (res_0) => onEntitiesUpdate({
|
|
349
|
+
data: res_0.data,
|
|
350
|
+
meta: res_0.meta
|
|
351
|
+
}), onError);
|
|
312
352
|
} else {
|
|
313
353
|
accessor.find({
|
|
314
354
|
where: whereParams,
|
|
@@ -316,7 +356,10 @@ function useCollectionFetch(t0) {
|
|
|
316
356
|
orderBy: orderByParams,
|
|
317
357
|
searchString,
|
|
318
358
|
include: includeParams
|
|
319
|
-
}).then(onEntitiesUpdate
|
|
359
|
+
}).then((res_1) => onEntitiesUpdate({
|
|
360
|
+
data: res_1.data,
|
|
361
|
+
meta: res_1.meta
|
|
362
|
+
})).catch(onError);
|
|
320
363
|
return _temp3$3;
|
|
321
364
|
}
|
|
322
365
|
};
|
|
@@ -332,35 +375,37 @@ function useCollectionFetch(t0) {
|
|
|
332
375
|
t3 = $[10];
|
|
333
376
|
}
|
|
334
377
|
let t4;
|
|
335
|
-
if ($[11] !==
|
|
336
|
-
t4 = [path, itemCount, currentSort, sortByProperty, filterValues, searchString];
|
|
337
|
-
$[11] =
|
|
338
|
-
$[12] =
|
|
339
|
-
$[13] =
|
|
340
|
-
$[14] =
|
|
341
|
-
$[15] =
|
|
342
|
-
$[16] =
|
|
343
|
-
$[17] =
|
|
344
|
-
|
|
345
|
-
|
|
378
|
+
if ($[11] !== collection || $[12] !== currentSort || $[13] !== dataClient || $[14] !== filterValues || $[15] !== itemCount || $[16] !== path || $[17] !== searchString || $[18] !== sortByProperty) {
|
|
379
|
+
t4 = [path, itemCount, currentSort, sortByProperty, filterValues, searchString, dataClient, collection];
|
|
380
|
+
$[11] = collection;
|
|
381
|
+
$[12] = currentSort;
|
|
382
|
+
$[13] = dataClient;
|
|
383
|
+
$[14] = filterValues;
|
|
384
|
+
$[15] = itemCount;
|
|
385
|
+
$[16] = path;
|
|
386
|
+
$[17] = searchString;
|
|
387
|
+
$[18] = sortByProperty;
|
|
388
|
+
$[19] = t4;
|
|
389
|
+
} else {
|
|
390
|
+
t4 = $[19];
|
|
346
391
|
}
|
|
347
392
|
useEffect(t3, t4);
|
|
348
393
|
let t5;
|
|
349
394
|
let t6;
|
|
350
|
-
if ($[
|
|
395
|
+
if ($[20] !== data || $[21] !== dataLoading || $[22] !== dataLoadingError || $[23] !== noMoreToLoad) {
|
|
351
396
|
t6 = {
|
|
352
397
|
data,
|
|
353
398
|
dataLoading,
|
|
354
399
|
dataLoadingError,
|
|
355
400
|
noMoreToLoad
|
|
356
401
|
};
|
|
357
|
-
$[
|
|
358
|
-
$[
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
402
|
+
$[20] = data;
|
|
403
|
+
$[21] = dataLoading;
|
|
404
|
+
$[22] = dataLoadingError;
|
|
405
|
+
$[23] = noMoreToLoad;
|
|
406
|
+
$[24] = t6;
|
|
362
407
|
} else {
|
|
363
|
-
t6 = $[
|
|
408
|
+
t6 = $[24];
|
|
364
409
|
}
|
|
365
410
|
t5 = t6;
|
|
366
411
|
return t5;
|
|
@@ -487,12 +532,18 @@ function populateEntityFetchCache(path, entities) {
|
|
|
487
532
|
CACHE[`${path}/${entity.id}`] = entity;
|
|
488
533
|
}
|
|
489
534
|
}
|
|
535
|
+
function clearEntityFetchCache() {
|
|
536
|
+
for (const key of Object.keys(CACHE)) {
|
|
537
|
+
delete CACHE[key];
|
|
538
|
+
}
|
|
539
|
+
}
|
|
490
540
|
function useEntityFetch(t0) {
|
|
491
|
-
const $ = c(
|
|
541
|
+
const $ = c(17);
|
|
492
542
|
const {
|
|
493
543
|
path,
|
|
494
544
|
entityId,
|
|
495
545
|
collection,
|
|
546
|
+
databaseId,
|
|
496
547
|
useCache: t1
|
|
497
548
|
} = t0;
|
|
498
549
|
const useCache = t1 === void 0 ? false : t1;
|
|
@@ -530,9 +581,9 @@ function useEntityFetch(t0) {
|
|
|
530
581
|
if (entityId && path && collection) {
|
|
531
582
|
const accessor = dataClient.collection(path);
|
|
532
583
|
if (accessor.listenById) {
|
|
533
|
-
return accessor.listenById(entityId, onEntityUpdate, onError);
|
|
584
|
+
return accessor.listenById(entityId, (entity_0) => onEntityUpdate(entity_0), onError);
|
|
534
585
|
} else {
|
|
535
|
-
accessor.findById(entityId).then(onEntityUpdate).catch(onError);
|
|
586
|
+
accessor.findById(entityId).then((entity_1) => onEntityUpdate(entity_1)).catch(onError);
|
|
536
587
|
return _temp2$3;
|
|
537
588
|
}
|
|
538
589
|
} else {
|
|
@@ -551,29 +602,33 @@ function useEntityFetch(t0) {
|
|
|
551
602
|
t2 = $[5];
|
|
552
603
|
}
|
|
553
604
|
let t3;
|
|
554
|
-
if ($[6] !==
|
|
555
|
-
t3 = [entityId, path];
|
|
556
|
-
$[6] =
|
|
557
|
-
$[7] =
|
|
558
|
-
$[8] =
|
|
559
|
-
|
|
560
|
-
|
|
605
|
+
if ($[6] !== collection || $[7] !== dataClient || $[8] !== databaseId || $[9] !== entityId || $[10] !== path || $[11] !== useCache) {
|
|
606
|
+
t3 = [entityId, path, dataClient, collection, useCache, databaseId];
|
|
607
|
+
$[6] = collection;
|
|
608
|
+
$[7] = dataClient;
|
|
609
|
+
$[8] = databaseId;
|
|
610
|
+
$[9] = entityId;
|
|
611
|
+
$[10] = path;
|
|
612
|
+
$[11] = useCache;
|
|
613
|
+
$[12] = t3;
|
|
614
|
+
} else {
|
|
615
|
+
t3 = $[12];
|
|
561
616
|
}
|
|
562
617
|
useEffect(t2, t3);
|
|
563
618
|
let t4;
|
|
564
619
|
let t5;
|
|
565
|
-
if ($[
|
|
620
|
+
if ($[13] !== dataLoading || $[14] !== dataLoadingError || $[15] !== entity) {
|
|
566
621
|
t5 = {
|
|
567
622
|
entity,
|
|
568
623
|
dataLoading,
|
|
569
624
|
dataLoadingError
|
|
570
625
|
};
|
|
571
|
-
$[
|
|
572
|
-
$[
|
|
573
|
-
$[
|
|
574
|
-
$[
|
|
626
|
+
$[13] = dataLoading;
|
|
627
|
+
$[14] = dataLoadingError;
|
|
628
|
+
$[15] = entity;
|
|
629
|
+
$[16] = t5;
|
|
575
630
|
} else {
|
|
576
|
-
t5 = $[
|
|
631
|
+
t5 = $[16];
|
|
577
632
|
}
|
|
578
633
|
t4 = t5;
|
|
579
634
|
return t4;
|
|
@@ -684,7 +739,10 @@ function useRelationSelector({
|
|
|
684
739
|
limit,
|
|
685
740
|
orderBy: void 0,
|
|
686
741
|
searchString: currentSearch
|
|
687
|
-
}, onEntitiesUpdate
|
|
742
|
+
}, (res_0) => onEntitiesUpdate({
|
|
743
|
+
data: res_0.data,
|
|
744
|
+
meta: res_0.meta
|
|
745
|
+
}), onErrorUpdate);
|
|
688
746
|
} else {
|
|
689
747
|
accessor.find({
|
|
690
748
|
where: whereParams,
|
|
@@ -692,7 +750,10 @@ function useRelationSelector({
|
|
|
692
750
|
offset: 0,
|
|
693
751
|
orderBy: void 0,
|
|
694
752
|
searchString: currentSearch
|
|
695
|
-
}).then(onEntitiesUpdate
|
|
753
|
+
}).then((res_1) => onEntitiesUpdate({
|
|
754
|
+
data: res_1.data,
|
|
755
|
+
meta: res_1.meta
|
|
756
|
+
})).catch(onErrorUpdate);
|
|
696
757
|
unsubscribe = () => {
|
|
697
758
|
};
|
|
698
759
|
}
|
|
@@ -2711,14 +2772,14 @@ function useDataTableController({
|
|
|
2711
2772
|
limit: itemCount,
|
|
2712
2773
|
orderBy: orderByParams,
|
|
2713
2774
|
searchString
|
|
2714
|
-
}, (
|
|
2775
|
+
}, (res) => onEntitiesUpdate(res.data), onError);
|
|
2715
2776
|
} else {
|
|
2716
2777
|
accessor.find({
|
|
2717
2778
|
where: whereParams,
|
|
2718
2779
|
limit: itemCount,
|
|
2719
2780
|
orderBy: orderByParams,
|
|
2720
2781
|
searchString
|
|
2721
|
-
}).then((
|
|
2782
|
+
}).then((res_0) => onEntitiesUpdate(res_0.data)).catch(onError);
|
|
2722
2783
|
unsubscribe = () => void 0;
|
|
2723
2784
|
}
|
|
2724
2785
|
return unsubscribe;
|
|
@@ -3688,7 +3749,7 @@ function UIReferenceView() {
|
|
|
3688
3749
|
let t16;
|
|
3689
3750
|
let t17;
|
|
3690
3751
|
if ($[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
3691
|
-
t16 = /* @__PURE__ */ jsx("div", { className: "mt-3 flex-grow overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "my-2 mx-2 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg bg-surface-50 dark:bg-surface-950/30", children: [/* @__PURE__ */ jsx(FolderIcon, { size: iconSize.small }), /* @__PURE__ */ jsx(UserIcon, { size: iconSize.small }), /* @__PURE__ */ jsx(TagIcon, { size: iconSize.small })].map(_temp$1) }) }) });
|
|
3752
|
+
t16 = /* @__PURE__ */ jsx("div", { className: "mt-3 flex-grow overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "my-2 mx-2 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg bg-surface-50 dark:bg-surface-950/30", children: [/* @__PURE__ */ jsx(FolderIcon, { size: iconSize.small }, "folder"), /* @__PURE__ */ jsx(UserIcon, { size: iconSize.small }, "user"), /* @__PURE__ */ jsx(TagIcon, { size: iconSize.small }, "tag")].map(_temp$1) }) }) });
|
|
3692
3753
|
t17 = cls("shrink-0 mt-auto border-t px-2 py-2", defaultBorderMixin);
|
|
3693
3754
|
$[19] = t16;
|
|
3694
3755
|
$[20] = t17;
|
|
@@ -6370,7 +6431,7 @@ function UserDisplay(t0) {
|
|
|
6370
6431
|
return t8;
|
|
6371
6432
|
}
|
|
6372
6433
|
function LoginView(t0) {
|
|
6373
|
-
const $ = c(
|
|
6434
|
+
const $ = c(87);
|
|
6374
6435
|
const {
|
|
6375
6436
|
logo,
|
|
6376
6437
|
authController,
|
|
@@ -6378,7 +6439,6 @@ function LoginView(t0) {
|
|
|
6378
6439
|
disableSignupScreen: t1,
|
|
6379
6440
|
disabled: t2,
|
|
6380
6441
|
notAllowedError,
|
|
6381
|
-
googleEnabled,
|
|
6382
6442
|
googleClientId,
|
|
6383
6443
|
needsSetup,
|
|
6384
6444
|
registrationEnabled
|
|
@@ -6421,27 +6481,37 @@ function LoginView(t0) {
|
|
|
6421
6481
|
const caps = t4;
|
|
6422
6482
|
const isBootstrapMode = needsSetup ?? ("needsSetup" in authController && !!authController.needsSetup) ?? false;
|
|
6423
6483
|
const canRegister = registrationEnabled ?? caps.registration ?? false;
|
|
6424
|
-
|
|
6484
|
+
let t5;
|
|
6485
|
+
if ($[3] !== caps.enabledProviders || $[4] !== caps.googleLogin || $[5] !== googleClientId) {
|
|
6486
|
+
t5 = googleClientId && (caps.enabledProviders?.includes("google") ?? caps.googleLogin ?? false);
|
|
6487
|
+
$[3] = caps.enabledProviders;
|
|
6488
|
+
$[4] = caps.googleLogin;
|
|
6489
|
+
$[5] = googleClientId;
|
|
6490
|
+
$[6] = t5;
|
|
6491
|
+
} else {
|
|
6492
|
+
t5 = $[6];
|
|
6493
|
+
}
|
|
6494
|
+
const hasGoogleLogin = t5;
|
|
6425
6495
|
const hasPasswordReset = caps.passwordReset ?? !!authController.forgotPassword;
|
|
6426
6496
|
const showRegistration = !disableSignupScreen && canRegister;
|
|
6427
|
-
let t5;
|
|
6428
6497
|
let t6;
|
|
6429
|
-
|
|
6430
|
-
|
|
6498
|
+
let t7;
|
|
6499
|
+
if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6500
|
+
t6 = () => {
|
|
6431
6501
|
const timer = setTimeout(() => setFadeIn(true), 50);
|
|
6432
6502
|
return () => clearTimeout(timer);
|
|
6433
6503
|
};
|
|
6434
|
-
|
|
6435
|
-
$[
|
|
6436
|
-
$[
|
|
6504
|
+
t7 = [];
|
|
6505
|
+
$[7] = t6;
|
|
6506
|
+
$[8] = t7;
|
|
6437
6507
|
} else {
|
|
6438
|
-
|
|
6439
|
-
|
|
6508
|
+
t6 = $[7];
|
|
6509
|
+
t7 = $[8];
|
|
6440
6510
|
}
|
|
6441
|
-
useEffect(
|
|
6442
|
-
let
|
|
6443
|
-
if ($[
|
|
6444
|
-
|
|
6511
|
+
useEffect(t6, t7);
|
|
6512
|
+
let t8;
|
|
6513
|
+
if ($[9] !== authController.authProviderError || $[10] !== authController.user) {
|
|
6514
|
+
t8 = function buildErrorView2() {
|
|
6445
6515
|
if (!authController.authProviderError) {
|
|
6446
6516
|
return null;
|
|
6447
6517
|
}
|
|
@@ -6451,44 +6521,44 @@ function LoginView(t0) {
|
|
|
6451
6521
|
const errorMsg = authController.authProviderError instanceof Error ? authController.authProviderError.message : String(authController.authProviderError);
|
|
6452
6522
|
return /* @__PURE__ */ jsx("div", { className: "w-full", children: /* @__PURE__ */ jsx(ErrorView, { error: errorMsg }) });
|
|
6453
6523
|
};
|
|
6454
|
-
$[
|
|
6455
|
-
$[
|
|
6456
|
-
$[
|
|
6524
|
+
$[9] = authController.authProviderError;
|
|
6525
|
+
$[10] = authController.user;
|
|
6526
|
+
$[11] = t8;
|
|
6457
6527
|
} else {
|
|
6458
|
-
|
|
6528
|
+
t8 = $[11];
|
|
6459
6529
|
}
|
|
6460
|
-
const buildErrorView =
|
|
6530
|
+
const buildErrorView = t8;
|
|
6461
6531
|
let logoComponent;
|
|
6462
6532
|
if (logo) {
|
|
6463
|
-
let
|
|
6464
|
-
if ($[
|
|
6465
|
-
|
|
6533
|
+
let t92;
|
|
6534
|
+
if ($[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6535
|
+
t92 = {
|
|
6466
6536
|
height: "100%",
|
|
6467
6537
|
width: "100%",
|
|
6468
6538
|
objectFit: "cover"
|
|
6469
6539
|
};
|
|
6470
|
-
$[
|
|
6540
|
+
$[12] = t92;
|
|
6471
6541
|
} else {
|
|
6472
|
-
|
|
6542
|
+
t92 = $[12];
|
|
6473
6543
|
}
|
|
6474
|
-
let
|
|
6475
|
-
if ($[
|
|
6476
|
-
|
|
6477
|
-
$[
|
|
6478
|
-
$[
|
|
6544
|
+
let t102;
|
|
6545
|
+
if ($[13] !== logo) {
|
|
6546
|
+
t102 = /* @__PURE__ */ jsx("img", { src: logo, style: t92, alt: "Logo" });
|
|
6547
|
+
$[13] = logo;
|
|
6548
|
+
$[14] = t102;
|
|
6479
6549
|
} else {
|
|
6480
|
-
|
|
6550
|
+
t102 = $[14];
|
|
6481
6551
|
}
|
|
6482
|
-
logoComponent =
|
|
6552
|
+
logoComponent = t102;
|
|
6483
6553
|
} else {
|
|
6484
|
-
let
|
|
6485
|
-
if ($[
|
|
6486
|
-
|
|
6487
|
-
$[
|
|
6554
|
+
let t92;
|
|
6555
|
+
if ($[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6556
|
+
t92 = /* @__PURE__ */ jsx(RebaseLogo, {});
|
|
6557
|
+
$[15] = t92;
|
|
6488
6558
|
} else {
|
|
6489
|
-
|
|
6559
|
+
t92 = $[15];
|
|
6490
6560
|
}
|
|
6491
|
-
logoComponent =
|
|
6561
|
+
logoComponent = t92;
|
|
6492
6562
|
}
|
|
6493
6563
|
let notAllowedMessage;
|
|
6494
6564
|
if (notAllowedError) {
|
|
@@ -6502,203 +6572,203 @@ function LoginView(t0) {
|
|
|
6502
6572
|
}
|
|
6503
6573
|
}
|
|
6504
6574
|
}
|
|
6505
|
-
const
|
|
6506
|
-
let t9;
|
|
6507
|
-
if ($[12] !== t8) {
|
|
6508
|
-
t9 = cls("relative flex items-center justify-center h-screen w-screen p-4 transition-opacity duration-500 bg-white dark:bg-surface-900", t8);
|
|
6509
|
-
$[12] = t8;
|
|
6510
|
-
$[13] = t9;
|
|
6511
|
-
} else {
|
|
6512
|
-
t9 = $[13];
|
|
6513
|
-
}
|
|
6575
|
+
const t9 = fadeIn ? "opacity-100" : "opacity-0";
|
|
6514
6576
|
let t10;
|
|
6515
|
-
if ($[
|
|
6516
|
-
t10 =
|
|
6517
|
-
$[
|
|
6577
|
+
if ($[16] !== t9) {
|
|
6578
|
+
t10 = cls("relative flex items-center justify-center h-screen w-screen p-4 transition-opacity duration-500 bg-surface-50 dark:bg-surface-800", t9);
|
|
6579
|
+
$[16] = t9;
|
|
6580
|
+
$[17] = t10;
|
|
6518
6581
|
} else {
|
|
6519
|
-
t10 = $[
|
|
6582
|
+
t10 = $[17];
|
|
6520
6583
|
}
|
|
6521
6584
|
let t11;
|
|
6522
|
-
if ($[
|
|
6523
|
-
t11 = /* @__PURE__ */ jsx(
|
|
6524
|
-
$[
|
|
6525
|
-
$[16] = t11;
|
|
6585
|
+
if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6586
|
+
t11 = /* @__PURE__ */ jsx(LanguageToggle, {});
|
|
6587
|
+
$[18] = t11;
|
|
6526
6588
|
} else {
|
|
6527
|
-
t11 = $[
|
|
6589
|
+
t11 = $[18];
|
|
6528
6590
|
}
|
|
6529
6591
|
let t12;
|
|
6530
|
-
if ($[
|
|
6531
|
-
t12 = (
|
|
6532
|
-
$[
|
|
6533
|
-
$[
|
|
6592
|
+
if ($[19] !== colorMode) {
|
|
6593
|
+
t12 = /* @__PURE__ */ jsx(IconButton, { color: "inherit", "aria-label": "Toggle theme", children: colorMode === "dark" ? /* @__PURE__ */ jsx(MoonIcon, { size: iconSize.small }) : /* @__PURE__ */ jsx(SunIcon, { size: iconSize.small }) });
|
|
6594
|
+
$[19] = colorMode;
|
|
6595
|
+
$[20] = t12;
|
|
6534
6596
|
} else {
|
|
6535
|
-
t12 = $[
|
|
6597
|
+
t12 = $[20];
|
|
6536
6598
|
}
|
|
6537
6599
|
let t13;
|
|
6538
|
-
if ($[
|
|
6539
|
-
t13 =
|
|
6540
|
-
$[
|
|
6600
|
+
if ($[21] !== setColorMode) {
|
|
6601
|
+
t13 = () => setColorMode("dark");
|
|
6602
|
+
$[21] = setColorMode;
|
|
6603
|
+
$[22] = t13;
|
|
6541
6604
|
} else {
|
|
6542
|
-
t13 = $[
|
|
6605
|
+
t13 = $[22];
|
|
6543
6606
|
}
|
|
6544
6607
|
let t14;
|
|
6545
|
-
if ($[
|
|
6546
|
-
t14 =
|
|
6547
|
-
$[
|
|
6548
|
-
$[21] = t14;
|
|
6608
|
+
if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6609
|
+
t14 = /* @__PURE__ */ jsx(MoonIcon, { size: iconSize.smallest });
|
|
6610
|
+
$[23] = t14;
|
|
6549
6611
|
} else {
|
|
6550
|
-
t14 = $[
|
|
6612
|
+
t14 = $[23];
|
|
6551
6613
|
}
|
|
6552
6614
|
let t15;
|
|
6553
|
-
if ($[
|
|
6554
|
-
t15 =
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
t14
|
|
6558
|
-
] });
|
|
6559
|
-
$[22] = t12;
|
|
6560
|
-
$[23] = t14;
|
|
6561
|
-
$[24] = t15;
|
|
6615
|
+
if ($[24] !== t) {
|
|
6616
|
+
t15 = t("dark_mode");
|
|
6617
|
+
$[24] = t;
|
|
6618
|
+
$[25] = t15;
|
|
6562
6619
|
} else {
|
|
6563
|
-
t15 = $[
|
|
6620
|
+
t15 = $[25];
|
|
6564
6621
|
}
|
|
6565
6622
|
let t16;
|
|
6566
|
-
if ($[
|
|
6567
|
-
t16 = (
|
|
6568
|
-
|
|
6569
|
-
|
|
6623
|
+
if ($[26] !== t13 || $[27] !== t15) {
|
|
6624
|
+
t16 = /* @__PURE__ */ jsxs(MenuItem, { onClick: t13, children: [
|
|
6625
|
+
t14,
|
|
6626
|
+
" ",
|
|
6627
|
+
t15
|
|
6628
|
+
] });
|
|
6629
|
+
$[26] = t13;
|
|
6630
|
+
$[27] = t15;
|
|
6631
|
+
$[28] = t16;
|
|
6570
6632
|
} else {
|
|
6571
|
-
t16 = $[
|
|
6633
|
+
t16 = $[28];
|
|
6572
6634
|
}
|
|
6573
6635
|
let t17;
|
|
6574
|
-
if ($[
|
|
6575
|
-
t17 =
|
|
6576
|
-
$[
|
|
6636
|
+
if ($[29] !== setColorMode) {
|
|
6637
|
+
t17 = () => setColorMode("light");
|
|
6638
|
+
$[29] = setColorMode;
|
|
6639
|
+
$[30] = t17;
|
|
6577
6640
|
} else {
|
|
6578
|
-
t17 = $[
|
|
6641
|
+
t17 = $[30];
|
|
6579
6642
|
}
|
|
6580
6643
|
let t18;
|
|
6581
|
-
if ($[
|
|
6582
|
-
t18 =
|
|
6583
|
-
$[
|
|
6584
|
-
$[29] = t18;
|
|
6644
|
+
if ($[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6645
|
+
t18 = /* @__PURE__ */ jsx(SunIcon, { size: iconSize.smallest });
|
|
6646
|
+
$[31] = t18;
|
|
6585
6647
|
} else {
|
|
6586
|
-
t18 = $[
|
|
6648
|
+
t18 = $[31];
|
|
6587
6649
|
}
|
|
6588
6650
|
let t19;
|
|
6589
|
-
if ($[
|
|
6590
|
-
t19 =
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
t18
|
|
6594
|
-
] });
|
|
6595
|
-
$[30] = t16;
|
|
6596
|
-
$[31] = t18;
|
|
6597
|
-
$[32] = t19;
|
|
6651
|
+
if ($[32] !== t) {
|
|
6652
|
+
t19 = t("light_mode");
|
|
6653
|
+
$[32] = t;
|
|
6654
|
+
$[33] = t19;
|
|
6598
6655
|
} else {
|
|
6599
|
-
t19 = $[
|
|
6656
|
+
t19 = $[33];
|
|
6600
6657
|
}
|
|
6601
6658
|
let t20;
|
|
6602
|
-
if ($[
|
|
6603
|
-
t20 = (
|
|
6604
|
-
|
|
6605
|
-
|
|
6659
|
+
if ($[34] !== t17 || $[35] !== t19) {
|
|
6660
|
+
t20 = /* @__PURE__ */ jsxs(MenuItem, { onClick: t17, children: [
|
|
6661
|
+
t18,
|
|
6662
|
+
" ",
|
|
6663
|
+
t19
|
|
6664
|
+
] });
|
|
6665
|
+
$[34] = t17;
|
|
6666
|
+
$[35] = t19;
|
|
6667
|
+
$[36] = t20;
|
|
6606
6668
|
} else {
|
|
6607
|
-
t20 = $[
|
|
6669
|
+
t20 = $[36];
|
|
6608
6670
|
}
|
|
6609
6671
|
let t21;
|
|
6610
|
-
if ($[
|
|
6611
|
-
t21 =
|
|
6612
|
-
$[
|
|
6672
|
+
if ($[37] !== setColorMode) {
|
|
6673
|
+
t21 = () => setColorMode("system");
|
|
6674
|
+
$[37] = setColorMode;
|
|
6675
|
+
$[38] = t21;
|
|
6613
6676
|
} else {
|
|
6614
|
-
t21 = $[
|
|
6677
|
+
t21 = $[38];
|
|
6615
6678
|
}
|
|
6616
6679
|
let t22;
|
|
6617
|
-
if ($[
|
|
6618
|
-
t22 =
|
|
6619
|
-
$[
|
|
6620
|
-
$[37] = t22;
|
|
6680
|
+
if ($[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
6681
|
+
t22 = /* @__PURE__ */ jsx(SunMoonIcon, { size: iconSize.smallest });
|
|
6682
|
+
$[39] = t22;
|
|
6621
6683
|
} else {
|
|
6622
|
-
t22 = $[
|
|
6684
|
+
t22 = $[39];
|
|
6623
6685
|
}
|
|
6624
6686
|
let t23;
|
|
6625
|
-
if ($[
|
|
6626
|
-
t23 =
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
t22
|
|
6630
|
-
] });
|
|
6631
|
-
$[38] = t20;
|
|
6632
|
-
$[39] = t22;
|
|
6633
|
-
$[40] = t23;
|
|
6687
|
+
if ($[40] !== t) {
|
|
6688
|
+
t23 = t("system_mode");
|
|
6689
|
+
$[40] = t;
|
|
6690
|
+
$[41] = t23;
|
|
6634
6691
|
} else {
|
|
6635
|
-
t23 = $[
|
|
6692
|
+
t23 = $[41];
|
|
6636
6693
|
}
|
|
6637
6694
|
let t24;
|
|
6638
|
-
if ($[
|
|
6639
|
-
t24 = /* @__PURE__ */ jsxs(
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
t19,
|
|
6644
|
-
t23
|
|
6645
|
-
] })
|
|
6695
|
+
if ($[42] !== t21 || $[43] !== t23) {
|
|
6696
|
+
t24 = /* @__PURE__ */ jsxs(MenuItem, { onClick: t21, children: [
|
|
6697
|
+
t22,
|
|
6698
|
+
" ",
|
|
6699
|
+
t23
|
|
6646
6700
|
] });
|
|
6647
|
-
$[
|
|
6648
|
-
$[
|
|
6649
|
-
$[
|
|
6650
|
-
$[44] = t23;
|
|
6651
|
-
$[45] = t24;
|
|
6701
|
+
$[42] = t21;
|
|
6702
|
+
$[43] = t23;
|
|
6703
|
+
$[44] = t24;
|
|
6652
6704
|
} else {
|
|
6653
|
-
t24 = $[
|
|
6705
|
+
t24 = $[44];
|
|
6654
6706
|
}
|
|
6655
6707
|
let t25;
|
|
6656
|
-
if ($[46] !==
|
|
6657
|
-
t25 = /* @__PURE__ */
|
|
6658
|
-
|
|
6659
|
-
|
|
6708
|
+
if ($[45] !== t12 || $[46] !== t16 || $[47] !== t20 || $[48] !== t24) {
|
|
6709
|
+
t25 = /* @__PURE__ */ jsxs("div", { className: "absolute top-4 right-4 flex items-center gap-1 z-10", children: [
|
|
6710
|
+
t11,
|
|
6711
|
+
/* @__PURE__ */ jsxs(Menu, { trigger: t12, children: [
|
|
6712
|
+
t16,
|
|
6713
|
+
t20,
|
|
6714
|
+
t24
|
|
6715
|
+
] })
|
|
6716
|
+
] });
|
|
6717
|
+
$[45] = t12;
|
|
6718
|
+
$[46] = t16;
|
|
6719
|
+
$[47] = t20;
|
|
6720
|
+
$[48] = t24;
|
|
6721
|
+
$[49] = t25;
|
|
6660
6722
|
} else {
|
|
6661
|
-
t25 = $[
|
|
6723
|
+
t25 = $[49];
|
|
6662
6724
|
}
|
|
6663
6725
|
let t26;
|
|
6664
|
-
if ($[
|
|
6665
|
-
t26 =
|
|
6666
|
-
$[
|
|
6667
|
-
$[
|
|
6726
|
+
if ($[50] !== logoComponent) {
|
|
6727
|
+
t26 = /* @__PURE__ */ jsx("div", { className: "w-32 h-32 m-2 mb-6", children: logoComponent });
|
|
6728
|
+
$[50] = logoComponent;
|
|
6729
|
+
$[51] = t26;
|
|
6668
6730
|
} else {
|
|
6669
|
-
t26 = $[
|
|
6731
|
+
t26 = $[51];
|
|
6670
6732
|
}
|
|
6671
6733
|
let t27;
|
|
6672
|
-
if ($[
|
|
6673
|
-
t27 =
|
|
6674
|
-
$[
|
|
6675
|
-
$[
|
|
6676
|
-
$[52] = t27;
|
|
6734
|
+
if ($[52] !== notAllowedMessage) {
|
|
6735
|
+
t27 = notAllowedMessage && /* @__PURE__ */ jsx("div", { className: "p-4 w-full", children: /* @__PURE__ */ jsx(ErrorView, { error: notAllowedMessage }) });
|
|
6736
|
+
$[52] = notAllowedMessage;
|
|
6737
|
+
$[53] = t27;
|
|
6677
6738
|
} else {
|
|
6678
|
-
t27 = $[
|
|
6739
|
+
t27 = $[53];
|
|
6679
6740
|
}
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
$[
|
|
6685
|
-
$[
|
|
6741
|
+
let t28;
|
|
6742
|
+
if ($[54] !== buildErrorView || $[55] !== mode) {
|
|
6743
|
+
t28 = mode !== "forgot" && buildErrorView();
|
|
6744
|
+
$[54] = buildErrorView;
|
|
6745
|
+
$[55] = mode;
|
|
6746
|
+
$[56] = t28;
|
|
6686
6747
|
} else {
|
|
6687
|
-
|
|
6748
|
+
t28 = $[56];
|
|
6688
6749
|
}
|
|
6750
|
+
const t29 = viewVisible ? "opacity-100" : "opacity-0";
|
|
6689
6751
|
let t30;
|
|
6690
|
-
if ($[
|
|
6691
|
-
t30 =
|
|
6692
|
-
$[
|
|
6693
|
-
$[56] = isBootstrapMode;
|
|
6694
|
-
$[57] = noUserComponent;
|
|
6752
|
+
if ($[57] !== t29) {
|
|
6753
|
+
t30 = cls("w-full transition-opacity duration-150", t29);
|
|
6754
|
+
$[57] = t29;
|
|
6695
6755
|
$[58] = t30;
|
|
6696
6756
|
} else {
|
|
6697
6757
|
t30 = $[58];
|
|
6698
6758
|
}
|
|
6699
6759
|
let t31;
|
|
6700
|
-
if ($[59] !== authController || $[60] !==
|
|
6701
|
-
t31 =
|
|
6760
|
+
if ($[59] !== authController || $[60] !== isBootstrapMode || $[61] !== noUserComponent) {
|
|
6761
|
+
t31 = isBootstrapMode && !authController.user && /* @__PURE__ */ jsx(LoginForm, { authController, registrationMode: true, onClose: _temp, onForgotPassword: _temp2, noUserComponent, disableSignupScreen: false, bootstrapMode: true });
|
|
6762
|
+
$[59] = authController;
|
|
6763
|
+
$[60] = isBootstrapMode;
|
|
6764
|
+
$[61] = noUserComponent;
|
|
6765
|
+
$[62] = t31;
|
|
6766
|
+
} else {
|
|
6767
|
+
t31 = $[62];
|
|
6768
|
+
}
|
|
6769
|
+
let t32;
|
|
6770
|
+
if ($[63] !== authController || $[64] !== disableSignupScreen || $[65] !== disabled || $[66] !== googleClientId || $[67] !== hasGoogleLogin || $[68] !== hasPasswordReset || $[69] !== isBootstrapMode || $[70] !== mode || $[71] !== noUserComponent || $[72] !== showRegistration) {
|
|
6771
|
+
t32 = !isBootstrapMode && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6702
6772
|
mode === "buttons" && /* @__PURE__ */ jsxs("div", { className: "w-full flex flex-col gap-3 mt-2", children: [
|
|
6703
6773
|
/* @__PURE__ */ jsx(LoginButton, { disabled, text: "Sign in with email", icon: /* @__PURE__ */ jsx(MailIcon, {}), onClick: () => switchMode("login") }),
|
|
6704
6774
|
hasGoogleLogin && googleClientId && /* @__PURE__ */ jsx(GoogleLoginButton, { disabled, googleClientId, authController }),
|
|
@@ -6712,63 +6782,63 @@ function LoginView(t0) {
|
|
|
6712
6782
|
mode === "register" && /* @__PURE__ */ jsx(LoginForm, { authController, registrationMode: true, onClose: () => switchMode("buttons"), onForgotPassword: hasPasswordReset ? () => switchMode("forgot") : void 0, noUserComponent, disableSignupScreen, switchToLogin: () => switchMode("login") }),
|
|
6713
6783
|
mode === "forgot" && authController.forgotPassword && /* @__PURE__ */ jsx(ForgotPasswordForm, { authController, onClose: () => switchMode("login") })
|
|
6714
6784
|
] });
|
|
6715
|
-
$[
|
|
6716
|
-
$[
|
|
6717
|
-
$[
|
|
6718
|
-
$[
|
|
6719
|
-
$[
|
|
6720
|
-
$[
|
|
6721
|
-
$[
|
|
6722
|
-
$[
|
|
6723
|
-
$[
|
|
6724
|
-
$[
|
|
6725
|
-
$[69] = t31;
|
|
6726
|
-
} else {
|
|
6727
|
-
t31 = $[69];
|
|
6728
|
-
}
|
|
6729
|
-
let t32;
|
|
6730
|
-
if ($[70] !== t29 || $[71] !== t30 || $[72] !== t31) {
|
|
6731
|
-
t32 = /* @__PURE__ */ jsxs("div", { className: t29, children: [
|
|
6732
|
-
t30,
|
|
6733
|
-
t31
|
|
6734
|
-
] });
|
|
6735
|
-
$[70] = t29;
|
|
6736
|
-
$[71] = t30;
|
|
6737
|
-
$[72] = t31;
|
|
6785
|
+
$[63] = authController;
|
|
6786
|
+
$[64] = disableSignupScreen;
|
|
6787
|
+
$[65] = disabled;
|
|
6788
|
+
$[66] = googleClientId;
|
|
6789
|
+
$[67] = hasGoogleLogin;
|
|
6790
|
+
$[68] = hasPasswordReset;
|
|
6791
|
+
$[69] = isBootstrapMode;
|
|
6792
|
+
$[70] = mode;
|
|
6793
|
+
$[71] = noUserComponent;
|
|
6794
|
+
$[72] = showRegistration;
|
|
6738
6795
|
$[73] = t32;
|
|
6739
6796
|
} else {
|
|
6740
6797
|
t32 = $[73];
|
|
6741
6798
|
}
|
|
6742
6799
|
let t33;
|
|
6743
|
-
if ($[74] !==
|
|
6744
|
-
t33 = /* @__PURE__ */ jsxs("div", { className:
|
|
6745
|
-
|
|
6746
|
-
t26,
|
|
6747
|
-
t27,
|
|
6800
|
+
if ($[74] !== t30 || $[75] !== t31 || $[76] !== t32) {
|
|
6801
|
+
t33 = /* @__PURE__ */ jsxs("div", { className: t30, children: [
|
|
6802
|
+
t31,
|
|
6748
6803
|
t32
|
|
6749
6804
|
] });
|
|
6750
|
-
$[74] =
|
|
6751
|
-
$[75] =
|
|
6752
|
-
$[76] =
|
|
6753
|
-
$[77] =
|
|
6754
|
-
$[78] = t33;
|
|
6805
|
+
$[74] = t30;
|
|
6806
|
+
$[75] = t31;
|
|
6807
|
+
$[76] = t32;
|
|
6808
|
+
$[77] = t33;
|
|
6755
6809
|
} else {
|
|
6756
|
-
t33 = $[
|
|
6810
|
+
t33 = $[77];
|
|
6757
6811
|
}
|
|
6758
6812
|
let t34;
|
|
6759
|
-
if ($[79] !==
|
|
6760
|
-
t34 = /* @__PURE__ */ jsxs("div", { className:
|
|
6761
|
-
|
|
6813
|
+
if ($[78] !== t26 || $[79] !== t27 || $[80] !== t28 || $[81] !== t33) {
|
|
6814
|
+
t34 = /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center w-[480px] max-w-full p-8 sm:p-10", children: [
|
|
6815
|
+
t26,
|
|
6816
|
+
t27,
|
|
6817
|
+
t28,
|
|
6762
6818
|
t33
|
|
6763
6819
|
] });
|
|
6764
|
-
$[
|
|
6765
|
-
$[
|
|
6766
|
-
$[
|
|
6820
|
+
$[78] = t26;
|
|
6821
|
+
$[79] = t27;
|
|
6822
|
+
$[80] = t28;
|
|
6823
|
+
$[81] = t33;
|
|
6767
6824
|
$[82] = t34;
|
|
6768
6825
|
} else {
|
|
6769
6826
|
t34 = $[82];
|
|
6770
6827
|
}
|
|
6771
|
-
|
|
6828
|
+
let t35;
|
|
6829
|
+
if ($[83] !== t10 || $[84] !== t25 || $[85] !== t34) {
|
|
6830
|
+
t35 = /* @__PURE__ */ jsxs("div", { className: t10, children: [
|
|
6831
|
+
t25,
|
|
6832
|
+
t34
|
|
6833
|
+
] });
|
|
6834
|
+
$[83] = t10;
|
|
6835
|
+
$[84] = t25;
|
|
6836
|
+
$[85] = t34;
|
|
6837
|
+
$[86] = t35;
|
|
6838
|
+
} else {
|
|
6839
|
+
t35 = $[86];
|
|
6840
|
+
}
|
|
6841
|
+
return t35;
|
|
6772
6842
|
}
|
|
6773
6843
|
function _temp2() {
|
|
6774
6844
|
}
|
|
@@ -6949,7 +7019,7 @@ function LoginForm(t0) {
|
|
|
6949
7019
|
return;
|
|
6950
7020
|
}
|
|
6951
7021
|
const escFunction = (event) => {
|
|
6952
|
-
if (event.
|
|
7022
|
+
if (event.key === "Escape") {
|
|
6953
7023
|
onClose();
|
|
6954
7024
|
}
|
|
6955
7025
|
};
|
|
@@ -7224,7 +7294,7 @@ function ForgotPasswordForm(t0) {
|
|
|
7224
7294
|
return;
|
|
7225
7295
|
}
|
|
7226
7296
|
const escFunction = (event) => {
|
|
7227
|
-
if (event.
|
|
7297
|
+
if (event.key === "Escape") {
|
|
7228
7298
|
onClose();
|
|
7229
7299
|
}
|
|
7230
7300
|
};
|
|
@@ -7531,6 +7601,8 @@ const en = {
|
|
|
7531
7601
|
copy: "Copy",
|
|
7532
7602
|
delete: "Delete",
|
|
7533
7603
|
delete_not_allowed: "You have selected at least one entity you cannot delete",
|
|
7604
|
+
edit_entity: "Edit",
|
|
7605
|
+
back_to_detail: "Back to details",
|
|
7534
7606
|
// ─── Delete dialog ───────────────────────────────────────────
|
|
7535
7607
|
delete_confirmation_title: "Delete?",
|
|
7536
7608
|
delete_confirmation_body: "This will delete the entity. Are you sure?",
|
|
@@ -7889,6 +7961,10 @@ const en = {
|
|
|
7889
7961
|
submit: "Submit",
|
|
7890
7962
|
no_filterable_properties: "No filterable properties available",
|
|
7891
7963
|
apply_filters: "Apply filters",
|
|
7964
|
+
// ─── Filter Presets ──────────────────────────────────────────
|
|
7965
|
+
filter_presets: "Presets",
|
|
7966
|
+
filter_preset_apply: "Apply preset",
|
|
7967
|
+
filter_preset_active: "Active: {{label}}",
|
|
7892
7968
|
list: "List",
|
|
7893
7969
|
table_view_mode: "Table",
|
|
7894
7970
|
cards: "Cards",
|
|
@@ -13820,12 +13896,13 @@ function toPascalCase(str) {
|
|
|
13820
13896
|
return str.split(/[-_]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
|
|
13821
13897
|
}
|
|
13822
13898
|
function resolveIcon(iconKey) {
|
|
13823
|
-
|
|
13899
|
+
const iconsMap = lucideIcons;
|
|
13900
|
+
let icon = iconsMap[iconKey];
|
|
13824
13901
|
if (!icon) {
|
|
13825
|
-
icon =
|
|
13902
|
+
icon = iconsMap[toPascalCase(iconKey)];
|
|
13826
13903
|
}
|
|
13827
13904
|
if (!icon) {
|
|
13828
|
-
icon =
|
|
13905
|
+
icon = iconsMap.CircleAlert;
|
|
13829
13906
|
}
|
|
13830
13907
|
return icon ?? null;
|
|
13831
13908
|
}
|
|
@@ -13837,7 +13914,7 @@ function getIcon(iconKey, className, color, size) {
|
|
|
13837
13914
|
if (typeof iconKey === "string") {
|
|
13838
13915
|
const lowerKey = iconKey.toLowerCase();
|
|
13839
13916
|
const slugifiedKey = slugify(iconKey).replace(/-/g, "_");
|
|
13840
|
-
|
|
13917
|
+
const mappedKey = iconKeysMap[iconKey] || iconKeysMap[lowerKey] || iconKeysMap[slugifiedKey];
|
|
13841
13918
|
if (!mappedKey) {
|
|
13842
13919
|
return void 0;
|
|
13843
13920
|
}
|
|
@@ -14784,9 +14861,9 @@ function StudioBridgeRegistryProvider({
|
|
|
14784
14861
|
slicesRef.current[key] = value;
|
|
14785
14862
|
setVersion((v) => v + 1);
|
|
14786
14863
|
}, []);
|
|
14787
|
-
const unregister = useCallback((
|
|
14788
|
-
delete slicesRef.current[
|
|
14789
|
-
setVersion((
|
|
14864
|
+
const unregister = useCallback((key_0) => {
|
|
14865
|
+
delete slicesRef.current[key_0];
|
|
14866
|
+
setVersion((v_0) => v_0 + 1);
|
|
14790
14867
|
}, []);
|
|
14791
14868
|
const registry = useMemo(() => ({
|
|
14792
14869
|
register,
|
|
@@ -14795,7 +14872,6 @@ function StudioBridgeRegistryProvider({
|
|
|
14795
14872
|
const bridgeValue = useMemo(() => ({
|
|
14796
14873
|
...NOOP_BRIDGE,
|
|
14797
14874
|
...slicesRef.current
|
|
14798
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14799
14875
|
}), [version]);
|
|
14800
14876
|
return /* @__PURE__ */ jsx(StudioBridgeRegistryContext.Provider, { value: registry, children: /* @__PURE__ */ jsx(StudioBridgeContext.Provider, { value: bridgeValue, children }) });
|
|
14801
14877
|
}
|
|
@@ -14880,6 +14956,7 @@ export {
|
|
|
14880
14956
|
buildCollapsedDefaults,
|
|
14881
14957
|
buildEnumLabel,
|
|
14882
14958
|
clearEntityCache,
|
|
14959
|
+
clearEntityFetchCache,
|
|
14883
14960
|
createFormexStub,
|
|
14884
14961
|
deleteEntityWithCallbacks,
|
|
14885
14962
|
en,
|