@rebasepro/core 0.3.0 → 0.4.0
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/components/LoginView/LoginView.d.ts +9 -1
- package/dist/components/common/types.d.ts +3 -3
- package/dist/hooks/data/useCollectionFetch.d.ts +12 -1
- package/dist/index.es.js +160 -124
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +160 -124
- package/dist/index.umd.js.map +1 -1
- package/package.json +6 -6
- package/src/components/LoginView/LoginView.tsx +27 -5
- package/src/components/common/types.tsx +3 -3
- package/src/components/common/useDataTableController.tsx +47 -35
- package/src/hooks/data/useCollectionFetch.tsx +27 -4
- package/src/hooks/data/useUserSelector.tsx +1 -1
- package/src/hooks/useResolvedComponent.tsx +3 -3
- package/src/locales/en.ts +2 -2
- package/src/util/previews.ts +9 -1
package/dist/index.umd.js
CHANGED
|
@@ -258,13 +258,15 @@
|
|
|
258
258
|
return React.useContext(RebaseDataContext);
|
|
259
259
|
};
|
|
260
260
|
function useCollectionFetch(t0) {
|
|
261
|
-
const $ = reactCompilerRuntime.c(
|
|
261
|
+
const $ = reactCompilerRuntime.c(30);
|
|
262
262
|
const {
|
|
263
263
|
path,
|
|
264
264
|
collection,
|
|
265
265
|
filterValues,
|
|
266
266
|
sortBy,
|
|
267
267
|
itemCount,
|
|
268
|
+
offset,
|
|
269
|
+
page,
|
|
268
270
|
searchString
|
|
269
271
|
} = t0;
|
|
270
272
|
const dataClient = useData();
|
|
@@ -308,8 +310,9 @@
|
|
|
308
310
|
const [dataLoading, setDataLoading] = React.useState(false);
|
|
309
311
|
const [dataLoadingError, setDataLoadingError] = React.useState();
|
|
310
312
|
const [noMoreToLoad, setNoMoreToLoad] = React.useState(false);
|
|
313
|
+
const [totalCount, setTotalCount] = React.useState();
|
|
311
314
|
let t3;
|
|
312
|
-
if ($[3] !== collection.properties || $[4] !== dataClient || $[5] !== itemCount || $[6] !==
|
|
315
|
+
if ($[3] !== collection.properties || $[4] !== dataClient || $[5] !== itemCount || $[6] !== offset || $[7] !== orderByParams || $[8] !== page || $[9] !== path || $[10] !== searchString || $[11] !== whereParams) {
|
|
313
316
|
t3 = () => {
|
|
314
317
|
setDataLoading(true);
|
|
315
318
|
const onEntitiesUpdate = async (res) => {
|
|
@@ -318,12 +321,14 @@
|
|
|
318
321
|
setDataLoadingError(void 0);
|
|
319
322
|
setData(entities.map(_temp$7));
|
|
320
323
|
setNoMoreToLoad(!res.meta.hasMore);
|
|
324
|
+
setTotalCount(res.meta.total);
|
|
321
325
|
};
|
|
322
326
|
const onError = (error) => {
|
|
323
327
|
console.error("ERROR", error);
|
|
324
328
|
setDataLoading(false);
|
|
325
329
|
setData([]);
|
|
326
330
|
setDataLoadingError(error);
|
|
331
|
+
setTotalCount(void 0);
|
|
327
332
|
};
|
|
328
333
|
const accessor = dataClient.collection(path);
|
|
329
334
|
const hasRelations = collection.properties && Object.values(collection.properties).some(_temp2$4);
|
|
@@ -332,6 +337,8 @@
|
|
|
332
337
|
return accessor.listen({
|
|
333
338
|
where: whereParams,
|
|
334
339
|
limit: itemCount,
|
|
340
|
+
offset,
|
|
341
|
+
page,
|
|
335
342
|
orderBy: orderByParams,
|
|
336
343
|
searchString,
|
|
337
344
|
include: includeParams
|
|
@@ -343,6 +350,8 @@
|
|
|
343
350
|
accessor.find({
|
|
344
351
|
where: whereParams,
|
|
345
352
|
limit: itemCount,
|
|
353
|
+
offset,
|
|
354
|
+
page,
|
|
346
355
|
orderBy: orderByParams,
|
|
347
356
|
searchString,
|
|
348
357
|
include: includeParams
|
|
@@ -356,46 +365,52 @@
|
|
|
356
365
|
$[3] = collection.properties;
|
|
357
366
|
$[4] = dataClient;
|
|
358
367
|
$[5] = itemCount;
|
|
359
|
-
$[6] =
|
|
360
|
-
$[7] =
|
|
361
|
-
$[8] =
|
|
362
|
-
$[9] =
|
|
363
|
-
$[10] =
|
|
368
|
+
$[6] = offset;
|
|
369
|
+
$[7] = orderByParams;
|
|
370
|
+
$[8] = page;
|
|
371
|
+
$[9] = path;
|
|
372
|
+
$[10] = searchString;
|
|
373
|
+
$[11] = whereParams;
|
|
374
|
+
$[12] = t3;
|
|
364
375
|
} else {
|
|
365
|
-
t3 = $[
|
|
376
|
+
t3 = $[12];
|
|
366
377
|
}
|
|
367
378
|
let t4;
|
|
368
|
-
if ($[
|
|
369
|
-
t4 = [path, itemCount, currentSort, sortByProperty, filterValues, searchString, dataClient, collection];
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
|
|
380
|
-
|
|
379
|
+
if ($[13] !== collection || $[14] !== currentSort || $[15] !== dataClient || $[16] !== filterValues || $[17] !== itemCount || $[18] !== offset || $[19] !== page || $[20] !== path || $[21] !== searchString || $[22] !== sortByProperty) {
|
|
380
|
+
t4 = [path, itemCount, offset, page, currentSort, sortByProperty, filterValues, searchString, dataClient, collection];
|
|
381
|
+
$[13] = collection;
|
|
382
|
+
$[14] = currentSort;
|
|
383
|
+
$[15] = dataClient;
|
|
384
|
+
$[16] = filterValues;
|
|
385
|
+
$[17] = itemCount;
|
|
386
|
+
$[18] = offset;
|
|
387
|
+
$[19] = page;
|
|
388
|
+
$[20] = path;
|
|
389
|
+
$[21] = searchString;
|
|
390
|
+
$[22] = sortByProperty;
|
|
391
|
+
$[23] = t4;
|
|
392
|
+
} else {
|
|
393
|
+
t4 = $[23];
|
|
381
394
|
}
|
|
382
395
|
React.useEffect(t3, t4);
|
|
383
396
|
let t5;
|
|
384
397
|
let t6;
|
|
385
|
-
if ($[
|
|
398
|
+
if ($[24] !== data || $[25] !== dataLoading || $[26] !== dataLoadingError || $[27] !== noMoreToLoad || $[28] !== totalCount) {
|
|
386
399
|
t6 = {
|
|
387
400
|
data,
|
|
388
401
|
dataLoading,
|
|
389
402
|
dataLoadingError,
|
|
390
|
-
noMoreToLoad
|
|
403
|
+
noMoreToLoad,
|
|
404
|
+
totalCount
|
|
391
405
|
};
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
406
|
+
$[24] = data;
|
|
407
|
+
$[25] = dataLoading;
|
|
408
|
+
$[26] = dataLoadingError;
|
|
409
|
+
$[27] = noMoreToLoad;
|
|
410
|
+
$[28] = totalCount;
|
|
411
|
+
$[29] = t6;
|
|
397
412
|
} else {
|
|
398
|
-
t6 = $[
|
|
413
|
+
t6 = $[29];
|
|
399
414
|
}
|
|
400
415
|
t5 = t6;
|
|
401
416
|
return t5;
|
|
@@ -873,7 +888,7 @@
|
|
|
873
888
|
};
|
|
874
889
|
}, []);
|
|
875
890
|
const getUser = React.useCallback((uid) => {
|
|
876
|
-
return userManagement?.getUser(uid) ?? null;
|
|
891
|
+
return userManagement?.getUser?.(uid) ?? null;
|
|
877
892
|
}, [userManagement]);
|
|
878
893
|
return React.useMemo(() => ({
|
|
879
894
|
items,
|
|
@@ -2619,15 +2634,18 @@
|
|
|
2619
2634
|
if (filterValues_0) {
|
|
2620
2635
|
Object.entries(filterValues_0).forEach(([key, value]) => {
|
|
2621
2636
|
if (value && Array.isArray(value)) {
|
|
2622
|
-
const [
|
|
2623
|
-
const
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
stringVal
|
|
2627
|
-
|
|
2628
|
-
|
|
2637
|
+
const conditions = Array.isArray(value[0]) ? value : [value];
|
|
2638
|
+
const [op, val] = conditions[0] || [];
|
|
2639
|
+
if (op) {
|
|
2640
|
+
const postgrestOp = op === "==" ? "eq" : op === "!=" ? "neq" : op === ">" ? "gt" : op === ">=" ? "gte" : op === "<" ? "lt" : op === "<=" ? "lte" : op === "in" ? "in" : op === "not-in" ? "nin" : op === "array-contains" ? "cs" : op === "array-contains-any" ? "csa" : "eq";
|
|
2641
|
+
let stringVal;
|
|
2642
|
+
if (Array.isArray(val)) {
|
|
2643
|
+
stringVal = `(${val.join(",")})`;
|
|
2644
|
+
} else {
|
|
2645
|
+
stringVal = String(val);
|
|
2646
|
+
}
|
|
2647
|
+
whereMap[key] = `${postgrestOp}.${stringVal}`;
|
|
2629
2648
|
}
|
|
2630
|
-
whereMap[key] = `${postgrestOp}.${stringVal}`;
|
|
2631
2649
|
}
|
|
2632
2650
|
});
|
|
2633
2651
|
}
|
|
@@ -2729,34 +2747,37 @@
|
|
|
2729
2747
|
if (filterValues) {
|
|
2730
2748
|
Object.entries(filterValues).forEach(([key, value]) => {
|
|
2731
2749
|
if (value) {
|
|
2732
|
-
const [
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2750
|
+
const conditions = Array.isArray(value[0]) ? value : [value];
|
|
2751
|
+
const [op, val] = conditions[0] || [];
|
|
2752
|
+
if (op) {
|
|
2753
|
+
let encodedValue = val;
|
|
2754
|
+
try {
|
|
2755
|
+
if (typeof val === "object") {
|
|
2756
|
+
if (val instanceof Date) {
|
|
2757
|
+
encodedValue = val.toISOString();
|
|
2758
|
+
} else if (Array.isArray(val)) {
|
|
2759
|
+
encodedValue = JSON.stringify(val, (k, v) => {
|
|
2760
|
+
if (v instanceof types.EntityRelation) {
|
|
2761
|
+
return encodeRelation(v);
|
|
2762
|
+
}
|
|
2763
|
+
if (v instanceof types.EntityReference) {
|
|
2764
|
+
return encodeReference(v);
|
|
2765
|
+
}
|
|
2766
|
+
return v;
|
|
2767
|
+
});
|
|
2768
|
+
} else if (val instanceof types.EntityRelation) {
|
|
2769
|
+
encodedValue = encodeRelation(val);
|
|
2770
|
+
} else if (val instanceof types.EntityReference) {
|
|
2771
|
+
encodedValue = encodeReference(val);
|
|
2772
|
+
}
|
|
2752
2773
|
}
|
|
2774
|
+
} catch (e) {
|
|
2775
|
+
encodedValue = val;
|
|
2776
|
+
}
|
|
2777
|
+
if (encodedValue !== void 0) {
|
|
2778
|
+
entries[encodeURIComponent(`${key}_op`)] = encodeURIComponent(op);
|
|
2779
|
+
entries[encodeURIComponent(`${key}_value`)] = encodedValue ? encodeURIComponent(String(encodedValue)) : "null";
|
|
2753
2780
|
}
|
|
2754
|
-
} catch (e) {
|
|
2755
|
-
encodedValue = val;
|
|
2756
|
-
}
|
|
2757
|
-
if (encodedValue !== void 0) {
|
|
2758
|
-
entries[encodeURIComponent(`${key}_op`)] = encodeURIComponent(op);
|
|
2759
|
-
entries[encodeURIComponent(`${key}_value`)] = encodedValue ? encodeURIComponent(String(encodedValue)) : "null";
|
|
2760
2781
|
}
|
|
2761
2782
|
}
|
|
2762
2783
|
});
|
|
@@ -6345,7 +6366,7 @@
|
|
|
6345
6366
|
return t8;
|
|
6346
6367
|
}
|
|
6347
6368
|
function LoginView(t0) {
|
|
6348
|
-
const $ = reactCompilerRuntime.c(
|
|
6369
|
+
const $ = reactCompilerRuntime.c(111);
|
|
6349
6370
|
const {
|
|
6350
6371
|
logo,
|
|
6351
6372
|
authController,
|
|
@@ -6360,7 +6381,9 @@
|
|
|
6360
6381
|
subtitle,
|
|
6361
6382
|
needsSetup,
|
|
6362
6383
|
registrationEnabled,
|
|
6363
|
-
additionalComponent
|
|
6384
|
+
additionalComponent,
|
|
6385
|
+
defaultEmail,
|
|
6386
|
+
defaultPassword
|
|
6364
6387
|
} = t0;
|
|
6365
6388
|
const disableSignupScreen = t1 === void 0 ? false : t1;
|
|
6366
6389
|
const disabled = t2 === void 0 ? false : t2;
|
|
@@ -6737,17 +6760,19 @@
|
|
|
6737
6760
|
t36 = $[69];
|
|
6738
6761
|
}
|
|
6739
6762
|
let t37;
|
|
6740
|
-
if ($[70] !== authController || $[71] !==
|
|
6741
|
-
t37 = isBootstrapMode && !authController.user && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: true, onClose: _temp, onForgotPassword: _temp2, noUserComponent, disableSignupScreen: false, bootstrapMode: true });
|
|
6763
|
+
if ($[70] !== authController || $[71] !== defaultEmail || $[72] !== defaultPassword || $[73] !== isBootstrapMode || $[74] !== noUserComponent) {
|
|
6764
|
+
t37 = isBootstrapMode && !authController.user && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: true, onClose: _temp, onForgotPassword: _temp2, noUserComponent, disableSignupScreen: false, bootstrapMode: true, defaultEmail, defaultPassword });
|
|
6742
6765
|
$[70] = authController;
|
|
6743
|
-
$[71] =
|
|
6744
|
-
$[72] =
|
|
6745
|
-
$[73] =
|
|
6766
|
+
$[71] = defaultEmail;
|
|
6767
|
+
$[72] = defaultPassword;
|
|
6768
|
+
$[73] = isBootstrapMode;
|
|
6769
|
+
$[74] = noUserComponent;
|
|
6770
|
+
$[75] = t37;
|
|
6746
6771
|
} else {
|
|
6747
|
-
t37 = $[
|
|
6772
|
+
t37 = $[75];
|
|
6748
6773
|
}
|
|
6749
6774
|
let t38;
|
|
6750
|
-
if ($[
|
|
6775
|
+
if ($[76] !== authController || $[77] !== defaultEmail || $[78] !== defaultPassword || $[79] !== disableSignupScreen || $[80] !== disabled || $[81] !== githubClientId || $[82] !== googleClientId || $[83] !== hasGitHubLogin || $[84] !== hasGoogleLogin || $[85] !== hasLinkedinLogin || $[86] !== hasPasswordReset || $[87] !== isBootstrapMode || $[88] !== linkedinClientId || $[89] !== mode || $[90] !== noUserComponent || $[91] !== showRegistration || $[92] !== subtitle || $[93] !== title) {
|
|
6751
6776
|
t38 = !isBootstrapMode && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6752
6777
|
mode === "buttons" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-3 mt-2", children: [
|
|
6753
6778
|
(title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-2", children: [
|
|
@@ -6764,53 +6789,55 @@
|
|
|
6764
6789
|
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "font-semibold hover:underline cursor-pointer text-primary-600 dark:text-primary-400", onClick: () => switchMode("register"), children: "Create one" })
|
|
6765
6790
|
] }) })
|
|
6766
6791
|
] }),
|
|
6767
|
-
mode === "login" && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: false, onClose: () => switchMode("buttons"), onForgotPassword: hasPasswordReset ? () => switchMode("forgot") : void 0, noUserComponent, disableSignupScreen, switchToRegister: showRegistration ? () => switchMode("register") : void 0 }),
|
|
6768
|
-
mode === "register" && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: true, onClose: () => switchMode("buttons"), onForgotPassword: hasPasswordReset ? () => switchMode("forgot") : void 0, noUserComponent, disableSignupScreen, switchToLogin: () => switchMode("login") }),
|
|
6792
|
+
mode === "login" && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: false, onClose: () => switchMode("buttons"), onForgotPassword: hasPasswordReset ? () => switchMode("forgot") : void 0, noUserComponent, disableSignupScreen, switchToRegister: showRegistration ? () => switchMode("register") : void 0, defaultEmail, defaultPassword }),
|
|
6793
|
+
mode === "register" && /* @__PURE__ */ jsxRuntime.jsx(LoginForm, { authController, registrationMode: true, onClose: () => switchMode("buttons"), onForgotPassword: hasPasswordReset ? () => switchMode("forgot") : void 0, noUserComponent, disableSignupScreen, switchToLogin: () => switchMode("login"), defaultEmail, defaultPassword }),
|
|
6769
6794
|
mode === "forgot" && authController.forgotPassword && /* @__PURE__ */ jsxRuntime.jsx(ForgotPasswordForm, { authController, onClose: () => switchMode("login") })
|
|
6770
6795
|
] });
|
|
6771
|
-
$[
|
|
6772
|
-
$[
|
|
6773
|
-
$[
|
|
6774
|
-
$[
|
|
6775
|
-
$[
|
|
6776
|
-
$[
|
|
6777
|
-
$[
|
|
6778
|
-
$[
|
|
6779
|
-
$[
|
|
6780
|
-
$[
|
|
6781
|
-
$[
|
|
6782
|
-
$[
|
|
6783
|
-
$[
|
|
6784
|
-
$[
|
|
6785
|
-
$[
|
|
6786
|
-
$[
|
|
6787
|
-
$[
|
|
6788
|
-
|
|
6789
|
-
|
|
6796
|
+
$[76] = authController;
|
|
6797
|
+
$[77] = defaultEmail;
|
|
6798
|
+
$[78] = defaultPassword;
|
|
6799
|
+
$[79] = disableSignupScreen;
|
|
6800
|
+
$[80] = disabled;
|
|
6801
|
+
$[81] = githubClientId;
|
|
6802
|
+
$[82] = googleClientId;
|
|
6803
|
+
$[83] = hasGitHubLogin;
|
|
6804
|
+
$[84] = hasGoogleLogin;
|
|
6805
|
+
$[85] = hasLinkedinLogin;
|
|
6806
|
+
$[86] = hasPasswordReset;
|
|
6807
|
+
$[87] = isBootstrapMode;
|
|
6808
|
+
$[88] = linkedinClientId;
|
|
6809
|
+
$[89] = mode;
|
|
6810
|
+
$[90] = noUserComponent;
|
|
6811
|
+
$[91] = showRegistration;
|
|
6812
|
+
$[92] = subtitle;
|
|
6813
|
+
$[93] = title;
|
|
6814
|
+
$[94] = t38;
|
|
6815
|
+
} else {
|
|
6816
|
+
t38 = $[94];
|
|
6790
6817
|
}
|
|
6791
6818
|
let t39;
|
|
6792
|
-
if ($[
|
|
6819
|
+
if ($[95] !== t36 || $[96] !== t37 || $[97] !== t38) {
|
|
6793
6820
|
t39 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t36, children: [
|
|
6794
6821
|
t37,
|
|
6795
6822
|
t38
|
|
6796
6823
|
] });
|
|
6797
|
-
$[
|
|
6798
|
-
$[
|
|
6799
|
-
$[
|
|
6800
|
-
$[
|
|
6824
|
+
$[95] = t36;
|
|
6825
|
+
$[96] = t37;
|
|
6826
|
+
$[97] = t38;
|
|
6827
|
+
$[98] = t39;
|
|
6801
6828
|
} else {
|
|
6802
|
-
t39 = $[
|
|
6829
|
+
t39 = $[98];
|
|
6803
6830
|
}
|
|
6804
6831
|
let t40;
|
|
6805
|
-
if ($[
|
|
6832
|
+
if ($[99] !== additionalComponent) {
|
|
6806
6833
|
t40 = additionalComponent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: additionalComponent });
|
|
6807
|
-
$[
|
|
6808
|
-
$[
|
|
6834
|
+
$[99] = additionalComponent;
|
|
6835
|
+
$[100] = t40;
|
|
6809
6836
|
} else {
|
|
6810
|
-
t40 = $[
|
|
6837
|
+
t40 = $[100];
|
|
6811
6838
|
}
|
|
6812
6839
|
let t41;
|
|
6813
|
-
if ($[
|
|
6840
|
+
if ($[101] !== t32 || $[102] !== t33 || $[103] !== t34 || $[104] !== t39 || $[105] !== t40) {
|
|
6814
6841
|
t41 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col items-center w-[440px] max-w-full p-8 sm:p-10 bg-white/70 dark:bg-surface-900/60 backdrop-blur-xl border border-surface-200/50 dark:border-surface-800/50 rounded-2xl shadow-2xl z-10 transition-all duration-300 hover:shadow-primary-500/5", children: [
|
|
6815
6842
|
t32,
|
|
6816
6843
|
t33,
|
|
@@ -6818,29 +6845,29 @@
|
|
|
6818
6845
|
t39,
|
|
6819
6846
|
t40
|
|
6820
6847
|
] });
|
|
6821
|
-
$[
|
|
6822
|
-
$[
|
|
6823
|
-
$[
|
|
6824
|
-
$[
|
|
6825
|
-
$[
|
|
6826
|
-
$[
|
|
6848
|
+
$[101] = t32;
|
|
6849
|
+
$[102] = t33;
|
|
6850
|
+
$[103] = t34;
|
|
6851
|
+
$[104] = t39;
|
|
6852
|
+
$[105] = t40;
|
|
6853
|
+
$[106] = t41;
|
|
6827
6854
|
} else {
|
|
6828
|
-
t41 = $[
|
|
6855
|
+
t41 = $[106];
|
|
6829
6856
|
}
|
|
6830
6857
|
let t42;
|
|
6831
|
-
if ($[
|
|
6858
|
+
if ($[107] !== t14 || $[108] !== t31 || $[109] !== t41) {
|
|
6832
6859
|
t42 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: t14, children: [
|
|
6833
6860
|
t15,
|
|
6834
6861
|
t16,
|
|
6835
6862
|
t31,
|
|
6836
6863
|
t41
|
|
6837
6864
|
] });
|
|
6838
|
-
$[
|
|
6839
|
-
$[
|
|
6840
|
-
$[
|
|
6841
|
-
$[
|
|
6865
|
+
$[107] = t14;
|
|
6866
|
+
$[108] = t31;
|
|
6867
|
+
$[109] = t41;
|
|
6868
|
+
$[110] = t42;
|
|
6842
6869
|
} else {
|
|
6843
|
-
t42 = $[
|
|
6870
|
+
t42 = $[110];
|
|
6844
6871
|
}
|
|
6845
6872
|
return t42;
|
|
6846
6873
|
}
|
|
@@ -7104,12 +7131,14 @@
|
|
|
7104
7131
|
noUserComponent,
|
|
7105
7132
|
bootstrapMode: t1,
|
|
7106
7133
|
switchToRegister,
|
|
7107
|
-
switchToLogin
|
|
7134
|
+
switchToLogin,
|
|
7135
|
+
defaultEmail,
|
|
7136
|
+
defaultPassword
|
|
7108
7137
|
} = t0;
|
|
7109
7138
|
const bootstrapMode = t1 === void 0 ? false : t1;
|
|
7110
7139
|
const passwordRef = React.useRef(null);
|
|
7111
|
-
const [email, setEmail] = React.useState();
|
|
7112
|
-
const [password, setPassword] = React.useState();
|
|
7140
|
+
const [email, setEmail] = React.useState(defaultEmail);
|
|
7141
|
+
const [password, setPassword] = React.useState(defaultPassword);
|
|
7113
7142
|
const [displayName, setDisplayName] = React.useState();
|
|
7114
7143
|
let t2;
|
|
7115
7144
|
let t3;
|
|
@@ -8056,14 +8085,14 @@
|
|
|
8056
8085
|
data_imported_successfully: "Data imported successfully",
|
|
8057
8086
|
export: "Export",
|
|
8058
8087
|
export_data: "Export data",
|
|
8059
|
-
download_table_csv: "Download the
|
|
8088
|
+
download_table_csv: "Download the content of this table as a CSV",
|
|
8060
8089
|
csv: "CSV",
|
|
8061
8090
|
json: "JSON",
|
|
8062
8091
|
dates_as_timestamps: "Dates as timestamps",
|
|
8063
8092
|
dates_as_strings: "Dates as strings",
|
|
8064
8093
|
flatten_arrays: "Flatten arrays",
|
|
8065
8094
|
download: "Download",
|
|
8066
|
-
large_number_of_documents: "This
|
|
8095
|
+
large_number_of_documents: "This collection has a large number of documents ({{count}}).",
|
|
8067
8096
|
include_undefined_values: "Include undefined values",
|
|
8068
8097
|
submit: "Submit",
|
|
8069
8098
|
no_filterable_properties: "No filterable properties available",
|
|
@@ -14604,6 +14633,10 @@
|
|
|
14604
14633
|
}
|
|
14605
14634
|
return false;
|
|
14606
14635
|
}
|
|
14636
|
+
function isHiddenProperty(property) {
|
|
14637
|
+
if (!property) return false;
|
|
14638
|
+
return Boolean(property.ui?.hideFromCollection);
|
|
14639
|
+
}
|
|
14607
14640
|
function getEntityPreviewKeys(authController, targetCollection, fields, previewProperties, limit = 3) {
|
|
14608
14641
|
const allProperties = Object.keys(targetCollection.properties);
|
|
14609
14642
|
let listProperties = previewProperties?.filter((p) => allProperties.includes(p));
|
|
@@ -14620,7 +14653,7 @@
|
|
|
14620
14653
|
return !isIdProp && key !== "id";
|
|
14621
14654
|
}).filter((key) => {
|
|
14622
14655
|
const property = targetCollection.properties[key];
|
|
14623
|
-
return property && !common.isPropertyBuilder(property) && !isReferenceProperty(property) && !isRelationProperty(property);
|
|
14656
|
+
return property && !common.isPropertyBuilder(property) && !isReferenceProperty(property) && !isRelationProperty(property) && !isHiddenProperty(property);
|
|
14624
14657
|
}).slice(0, limit);
|
|
14625
14658
|
}
|
|
14626
14659
|
}
|
|
@@ -14634,6 +14667,9 @@
|
|
|
14634
14667
|
const property = collection.properties[key];
|
|
14635
14668
|
if (property && !common.isPropertyBuilder(property)) {
|
|
14636
14669
|
const prop = property;
|
|
14670
|
+
if (isHiddenProperty(prop)) {
|
|
14671
|
+
continue;
|
|
14672
|
+
}
|
|
14637
14673
|
if (prop.type === "string" && !prop.ui?.multiline && !prop.ui?.markdown && !prop.storage && !prop.isId) {
|
|
14638
14674
|
if (!firstStringCandidate) {
|
|
14639
14675
|
firstStringCandidate = key;
|