@rebasepro/app 0.12.1-canary.gf5f1d39 → 0.13.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/README.md +1 -1
- package/dist/auth/api.d.ts +3 -8
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/types.d.ts +1 -5
- package/dist/collections/form-layout.d.ts +107 -0
- package/dist/collections/index.d.ts +1 -0
- package/dist/collections/title-property.d.ts +22 -0
- package/dist/components/Debug/collection-views/sample_data.d.ts +3 -2
- package/dist/hooks/ApiConfigContext.d.ts +36 -2
- package/dist/hooks/useBackendStorageSource.d.ts +6 -1
- package/dist/hooks/useNavigationBlocker.d.ts +1 -1
- package/dist/hooks/useSnackbarController.d.ts +2 -1
- package/dist/hooks/useStudioBridge.d.ts +27 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +681 -186
- package/dist/index.es.js.map +1 -1
- package/dist/internal/common.d.ts +14 -2
- package/package.json +29 -25
- package/src/auth/api.ts +8 -9
- package/src/auth/index.ts +2 -2
- package/src/auth/types.ts +5 -6
- package/src/collections/form-layout.ts +386 -0
- package/src/collections/index.ts +1 -0
- package/src/collections/title-property.ts +41 -0
- package/src/components/Debug/UIReferenceView.tsx +9 -1
- package/src/components/Debug/collection-views/sample_data.ts +4 -2
- package/src/components/NotFoundPage.tsx +1 -1
- package/src/components/common/useDataTableController.tsx +1 -1
- package/src/core/Rebase.tsx +5 -1
- package/src/core/RebaseRouter.tsx +2 -1
- package/src/core/RebaseRoutes.tsx +1 -1
- package/src/hooks/ApiConfigContext.tsx +45 -3
- package/src/hooks/useAuthSubscription.ts +29 -3
- package/src/hooks/useBackendStorageSource.ts +8 -1
- package/src/hooks/useNavigationBlocker.tsx +1 -1
- package/src/hooks/useSnackbarController.tsx +34 -6
- package/src/hooks/useStudioBridge.tsx +50 -2
- package/src/index.ts +1 -1
- package/src/internal/common.tsx +15 -3
- package/src/internal/useRestoreScroll.tsx +1 -1
- package/src/locales/de.ts +23 -2
- package/src/locales/en.ts +23 -1
- package/src/locales/es.ts +23 -1
- package/src/locales/fr.ts +23 -1
- package/src/locales/hi.ts +23 -1
- package/src/locales/it.ts +23 -1
- package/src/locales/pt.ts +23 -1
- package/src/util/enums.ts +4 -2
- package/src/util/useStorageUploadController.tsx +5 -1
package/src/locales/hi.ts
CHANGED
|
@@ -41,6 +41,8 @@ export const hi: RebaseTranslations = {
|
|
|
41
41
|
clear_filter: "फ़िल्टर साफ़ करें",
|
|
42
42
|
clear_filter_sort: "फ़िल्टर/सॉर्ट साफ़ करें",
|
|
43
43
|
clear_sort: "सॉर्ट साफ़ करें",
|
|
44
|
+
sort: "क्रमबद्ध करें",
|
|
45
|
+
sort_by: "इसके अनुसार क्रमबद्ध करें",
|
|
44
46
|
clear_all: "सभी साफ़ करें",
|
|
45
47
|
no_items: "कोई आइटम नहीं",
|
|
46
48
|
no_entries_found: "कोई प्रविष्टि नहीं मिली",
|
|
@@ -74,6 +76,7 @@ export const hi: RebaseTranslations = {
|
|
|
74
76
|
log_out: "लॉग आउट",
|
|
75
77
|
column_cannot_be_edited: "इस कॉलम को सीधे संपादित नहीं किया जा सकता",
|
|
76
78
|
close: "बंद करें",
|
|
79
|
+
hide_list: "सूची छिपाएँ",
|
|
77
80
|
unsaved_local_changes: "सहेजे नहीं गए स्थानीय परिवर्तन",
|
|
78
81
|
unsaved_local_changes_description: "इस दस्तावेज़ को स्थानीय स्तर पर संपादित किया गया था और इसमें सहेजे नहीं गए परिवर्तन हैं। यदि आप इन्हें लागू नहीं करते हैं तो ये स्थानीय परिवर्तन खो जाएंगे।",
|
|
79
82
|
preview_changes: "परिवर्तनों का पूर्वावलोकन करें",
|
|
@@ -902,5 +905,24 @@ no_filter: "No filter",
|
|
|
902
905
|
// ─── Markdown property ──────────────────────────────────────
|
|
903
906
|
markdown_paste_behavior: "पेस्ट व्यवहार",
|
|
904
907
|
markdown_strip_html: "पेस्ट करते समय HTML हटाएं",
|
|
905
|
-
markdown_convert_pasted: "पेस्ट किए गए टेक्स्ट को मार्कडाउन में बदलें"
|
|
908
|
+
markdown_convert_pasted: "पेस्ट किए गए टेक्स्ट को मार्कडाउन में बदलें",
|
|
909
|
+
|
|
910
|
+
// ─── Entity identity bar and inspector ──────────────────────
|
|
911
|
+
entity_saved: "सहेजा गया",
|
|
912
|
+
more_actions: "अधिक क्रियाएँ",
|
|
913
|
+
record_history: "इतिहास",
|
|
914
|
+
inspect_record: "रिकॉर्ड जाँचें",
|
|
915
|
+
inspect: "जाँचें",
|
|
916
|
+
close_inspector: "इंस्पेक्टर बंद करें",
|
|
917
|
+
|
|
918
|
+
// ─── Revision history ───────────────────────────────────────
|
|
919
|
+
history_revert: "इस संस्करण पर लौटें",
|
|
920
|
+
history_revert_title: "डेटा को इस संस्करण पर लौटाएँ?",
|
|
921
|
+
history_reverted: "चयनित संस्करण पर लौटा दिया गया",
|
|
922
|
+
history_revert_error: "रिकॉर्ड लौटाने में त्रुटि",
|
|
923
|
+
history_revert_dirty: "लौटाने से पहले अपने बदलाव सहेजें या रद्द करें",
|
|
924
|
+
history_empty: "कोई इतिहास उपलब्ध नहीं",
|
|
925
|
+
history_empty_description: "रिकॉर्ड सहेजने पर एक नया संस्करण बनता है और इतिहास में रखा जाता है।",
|
|
926
|
+
history_new_entity: "इतिहास केवल मौजूदा रिकॉर्ड के लिए उपलब्ध है",
|
|
927
|
+
history_no_more: "और इतिहास नहीं"
|
|
906
928
|
};
|
package/src/locales/it.ts
CHANGED
|
@@ -41,6 +41,8 @@ export const it: RebaseTranslations = {
|
|
|
41
41
|
clear_filter: "Cancella filtro",
|
|
42
42
|
clear_filter_sort: "Cancella filtro/ordinamento",
|
|
43
43
|
clear_sort: "Cancella ordinamento",
|
|
44
|
+
sort: "Ordina",
|
|
45
|
+
sort_by: "Ordina per",
|
|
44
46
|
clear_all: "Cancella tutto",
|
|
45
47
|
no_items: "Nessun elemento",
|
|
46
48
|
no_entries_found: "Nessuna voce trovata",
|
|
@@ -74,6 +76,7 @@ export const it: RebaseTranslations = {
|
|
|
74
76
|
log_out: "Esci",
|
|
75
77
|
column_cannot_be_edited: "Questa colonna non può essere modificata direttamente",
|
|
76
78
|
close: "Chiudi",
|
|
79
|
+
hide_list: "Nascondi elenco",
|
|
77
80
|
unsaved_local_changes: "Modifiche locali non salvate",
|
|
78
81
|
unsaved_local_changes_description: "Questo documento è stato modificato localmente e ha modifiche non salvate. Queste modifiche locali andranno perse se non le applichi.",
|
|
79
82
|
preview_changes: "Anteprima modifiche",
|
|
@@ -902,5 +905,24 @@ no_filter: "No filter",
|
|
|
902
905
|
// ─── Markdown property ──────────────────────────────────────
|
|
903
906
|
markdown_paste_behavior: "Comportamento incolla",
|
|
904
907
|
markdown_strip_html: "Rimuovi HTML all'incolla",
|
|
905
|
-
markdown_convert_pasted: "Converti testo incollato in markdown"
|
|
908
|
+
markdown_convert_pasted: "Converti testo incollato in markdown",
|
|
909
|
+
|
|
910
|
+
// ─── Entity identity bar and inspector ──────────────────────
|
|
911
|
+
entity_saved: "Salvato",
|
|
912
|
+
more_actions: "Altre azioni",
|
|
913
|
+
record_history: "Cronologia",
|
|
914
|
+
inspect_record: "Ispeziona record",
|
|
915
|
+
inspect: "Ispeziona",
|
|
916
|
+
close_inspector: "Chiudi l'ispettore",
|
|
917
|
+
|
|
918
|
+
// ─── Revision history ───────────────────────────────────────
|
|
919
|
+
history_revert: "Torna a questa versione",
|
|
920
|
+
history_revert_title: "Ripristinare i dati a questa versione?",
|
|
921
|
+
history_reverted: "Ripristinata la versione selezionata",
|
|
922
|
+
history_revert_error: "Errore durante il ripristino del record",
|
|
923
|
+
history_revert_dirty: "Salva o annulla le modifiche prima di ripristinare",
|
|
924
|
+
history_empty: "Nessuna cronologia disponibile",
|
|
925
|
+
history_empty_description: "Quando salvi un record viene creata una nuova versione e conservata nella cronologia.",
|
|
926
|
+
history_new_entity: "La cronologia è disponibile solo per i record esistenti",
|
|
927
|
+
history_no_more: "Nessun'altra cronologia"
|
|
906
928
|
};
|
package/src/locales/pt.ts
CHANGED
|
@@ -46,6 +46,8 @@ export const pt: RebaseTranslations = {
|
|
|
46
46
|
clear_filter: "Limpar filtro",
|
|
47
47
|
clear_filter_sort: "Limpar filtro/ordenação",
|
|
48
48
|
clear_sort: "Limpar ordenação",
|
|
49
|
+
sort: "Ordenar",
|
|
50
|
+
sort_by: "Ordenar por",
|
|
49
51
|
clear_all: "Limpar tudo",
|
|
50
52
|
no_items: "Sem itens",
|
|
51
53
|
no_entries_found: "Nenhum registo encontrado",
|
|
@@ -79,6 +81,7 @@ export const pt: RebaseTranslations = {
|
|
|
79
81
|
log_out: "Terminar sessão",
|
|
80
82
|
column_cannot_be_edited: "Esta coluna não pode ser editada diretamente",
|
|
81
83
|
close: "Fechar",
|
|
84
|
+
hide_list: "Ocultar lista",
|
|
82
85
|
unsaved_local_changes: "Alterações locais não guardadas",
|
|
83
86
|
unsaved_local_changes_description: "Este documento foi editado localmente e tem alterações não guardadas. Estas alterações locais serão perdidas se não as aplicar.",
|
|
84
87
|
preview_changes: "Pré-visualizar alterações",
|
|
@@ -910,5 +913,24 @@ no_filter: "No filter",
|
|
|
910
913
|
// ─── Markdown property ──────────────────────────────────────
|
|
911
914
|
markdown_paste_behavior: "Comportamento ao colar",
|
|
912
915
|
markdown_strip_html: "Remover HTML ao colar",
|
|
913
|
-
markdown_convert_pasted: "Converter texto colado para markdown"
|
|
916
|
+
markdown_convert_pasted: "Converter texto colado para markdown",
|
|
917
|
+
|
|
918
|
+
// ─── Entity identity bar and inspector ──────────────────────
|
|
919
|
+
entity_saved: "Guardado",
|
|
920
|
+
more_actions: "Mais ações",
|
|
921
|
+
record_history: "Histórico",
|
|
922
|
+
inspect_record: "Inspecionar registo",
|
|
923
|
+
inspect: "Inspecionar",
|
|
924
|
+
close_inspector: "Fechar o inspetor",
|
|
925
|
+
|
|
926
|
+
// ─── Revision history ───────────────────────────────────────
|
|
927
|
+
history_revert: "Voltar a esta versão",
|
|
928
|
+
history_revert_title: "Reverter os dados para esta versão?",
|
|
929
|
+
history_reverted: "Revertido para a versão selecionada",
|
|
930
|
+
history_revert_error: "Erro ao reverter o registo",
|
|
931
|
+
history_revert_dirty: "Guarde ou descarte as suas alterações antes de reverter",
|
|
932
|
+
history_empty: "Nenhum histórico disponível",
|
|
933
|
+
history_empty_description: "Ao guardar um registo é criada uma nova versão, guardada no histórico.",
|
|
934
|
+
history_new_entity: "O histórico só está disponível para registos existentes",
|
|
935
|
+
history_no_more: "Sem mais histórico"
|
|
914
936
|
};
|
package/src/util/enums.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumValueConfig } from "@rebasepro/types";
|
|
2
|
-
import {
|
|
2
|
+
import { ChipColorScheme, getColorSchemeForKey, getColorSchemeForSeed } from "@rebasepro/ui";
|
|
3
3
|
import { getLabelOrConfigFrom } from "@rebasepro/common";
|
|
4
4
|
|
|
5
5
|
export function getColorScheme(enumValues: EnumValueConfig[], key: string | number): ChipColorScheme | undefined {
|
|
@@ -8,7 +8,9 @@ export function getColorScheme(enumValues: EnumValueConfig[], key: string | numb
|
|
|
8
8
|
return getColorSchemeForSeed(key.toString());
|
|
9
9
|
if (typeof labelOrConfig === "object" && "color" in labelOrConfig) {
|
|
10
10
|
if (typeof labelOrConfig.color === "string")
|
|
11
|
-
|
|
11
|
+
// Not a raw table lookup: a config naming a colour this build does
|
|
12
|
+
// not have still deserves a colour rather than `undefined`.
|
|
13
|
+
return getColorSchemeForKey(labelOrConfig.color);
|
|
12
14
|
if (typeof labelOrConfig.color === "object")
|
|
13
15
|
return labelOrConfig.color;
|
|
14
16
|
}
|
|
@@ -79,7 +79,11 @@ export function useStorageUploadController<M extends Record<string, unknown>>({
|
|
|
79
79
|
const processFile = storage?.processFile;
|
|
80
80
|
|
|
81
81
|
const metadata: Record<string, unknown> | undefined = storage?.metadata;
|
|
82
|
-
|
|
82
|
+
// One preview size. A single-file field asked for "large" (a 220px
|
|
83
|
+
// thumbnail) while a multi-file field asked for "medium" (118px), so two
|
|
84
|
+
// upload fields in the same form reserved wildly different heights and
|
|
85
|
+
// neither matched its own empty state.
|
|
86
|
+
const size = "medium";
|
|
83
87
|
|
|
84
88
|
const imageResize = storage?.imageResize;
|
|
85
89
|
|