@firecms/collection_editor 3.4.0-canary.cfeed0b → 3.4.0-canary.e2466ba

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.
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
- export declare function StoragePropertyField({ multiple, disabled }: {
2
+ export declare function StoragePropertyField({ multiple, existing, disabled }: {
3
3
  multiple: boolean;
4
+ existing: boolean;
4
5
  disabled: boolean;
5
6
  }): React.JSX.Element;
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@firecms/collection_editor",
3
3
  "type": "module",
4
- "version": "3.4.0-canary.cfeed0b",
4
+ "version": "3.4.0-canary.e2466ba",
5
5
  "main": "./dist/index.umd.js",
6
6
  "module": "./dist/index.es.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "source": "src/index.ts",
9
9
  "dependencies": {
10
- "@firecms/core": "3.4.0-canary.cfeed0b",
11
- "@firecms/data_export": "3.4.0-canary.cfeed0b",
12
- "@firecms/data_import": "3.4.0-canary.cfeed0b",
13
- "@firecms/data_import_export": "3.4.0-canary.cfeed0b",
14
- "@firecms/formex": "3.4.0-canary.cfeed0b",
15
- "@firecms/schema_inference": "3.4.0-canary.cfeed0b",
16
- "@firecms/ui": "3.4.0-canary.cfeed0b",
10
+ "@firecms/core": "3.4.0-canary.e2466ba",
11
+ "@firecms/data_export": "3.4.0-canary.e2466ba",
12
+ "@firecms/data_import": "3.4.0-canary.e2466ba",
13
+ "@firecms/data_import_export": "3.4.0-canary.e2466ba",
14
+ "@firecms/formex": "3.4.0-canary.e2466ba",
15
+ "@firecms/schema_inference": "3.4.0-canary.e2466ba",
16
+ "@firecms/ui": "3.4.0-canary.e2466ba",
17
17
  "json5": "^2.2.3",
18
18
  "prism-react-renderer": "^2.4.1"
19
19
  },
package/src/locales/de.ts CHANGED
@@ -19,9 +19,9 @@ export const collectionEditorTranslationsDe = {
19
19
  storage_placeholder_path: "{path} - Pfad dieser Entität",
20
20
  storage_placeholder_rand: "{rand} - Zufallswert zur Vermeidung von Namenskollisionen",
21
21
  include_bucket_url: "Bucket-URL (gs://...) im gespeicherten Wert einschließen",
22
- include_bucket_url_description: "Aktivieren Sie diese Einstellung, wenn Sie eine vollqualifizierte Speicher-URL (z. B. gs://mein-bucket/pfad/zur/datei) statt nur des Speicherpfads speichern möchten. Eine Änderung wirkt sich nur auf neue Uploads aus: Bereits gespeicherte Werte behalten ihr aktuelles Format.",
22
+ include_bucket_url_description: "Aktivieren Sie diese Einstellung, wenn Sie eine vollqualifizierte Speicher-URL (z. B. gs://mein-bucket/pfad/zur/datei) statt nur des Speicherpfads speichern möchten. Diese Einstellung kann nur bei der Erstellung geändert werden.",
23
23
  save_url_instead_of_path: "URL statt Speicherpfad speichern",
24
- save_url_description: "Aktivieren Sie diese Einstellung, wenn Sie bevorzugen, die Download-URL der hochgeladenen Datei statt des Speicherpfads zu speichern. Eine Änderung wirkt sich nur auf neue Uploads aus: Bereits gespeicherte Werte behalten ihr aktuelles Format.",
24
+ save_url_description: "Aktivieren Sie diese Einstellung, wenn Sie bevorzugen, die Download-URL der hochgeladenen Datei statt des Speicherpfads zu speichern. Diese Einstellung kann nur bei der Erstellung geändert werden.",
25
25
  max_size_bytes: "Maximale Größe (in Bytes)",
26
26
  image_resize_configuration: "Bildgrößenanpassungs-Konfiguration",
27
27
  image_resize_description: "Bilder vor dem Hochladen automatisch anpassen und optimieren (nur JPEG, PNG, WebP)",
package/src/locales/en.ts CHANGED
@@ -20,9 +20,9 @@ export const collectionEditorTranslationsEn = {
20
20
  storage_placeholder_path: "{path} - Path of this entity",
21
21
  storage_placeholder_rand: "{rand} - Random value used to avoid name collisions",
22
22
  include_bucket_url: "Include bucket URL (gs://...) in saved value",
23
- include_bucket_url_description: "Turn this setting on if you want to save a fully-qualified storage URL (e.g. gs://my-bucket/path/to/file) instead of just the storage path. Changing it only affects new uploads: values already saved keep their current format.",
23
+ include_bucket_url_description: "Turn this setting on if you want to save a fully-qualified storage URL (e.g. gs://my-bucket/path/to/file) instead of just the storage path. You can only change this prop upon creation.",
24
24
  save_url_instead_of_path: "Save URL instead of storage path",
25
- save_url_description: "Turn this setting on, if you prefer to save the download URL of the uploaded file instead of the storage path. Changing it only affects new uploads: values already saved keep their current format.",
25
+ save_url_description: "Turn this setting on, if you prefer to save the download URL of the uploaded file instead of the storage path. You can only change this prop upon creation.",
26
26
  max_size_bytes: "Max size (in bytes)",
27
27
  image_resize_configuration: "Image Resize Configuration",
28
28
  image_resize_description: "Automatically resize and optimize images before upload (JPEG, PNG, WebP only)",
package/src/locales/es.ts CHANGED
@@ -19,9 +19,9 @@ export const collectionEditorTranslationsEs = {
19
19
  storage_placeholder_path: "{path} - Ruta de esta entidad",
20
20
  storage_placeholder_rand: "{rand} - Valor aleatorio para evitar colisiones de nombres",
21
21
  include_bucket_url: "Incluir URL del bucket (gs://...) en el valor guardado",
22
- include_bucket_url_description: "Activa esta opción si deseas guardar una URL de almacenamiento completa (ej. gs://mi-bucket/ruta/al/archivo) en lugar de solo la ruta de almacenamiento. Cambiarla solo afecta a las nuevas subidas: los valores ya guardados mantienen su formato actual.",
22
+ include_bucket_url_description: "Activa esta opción si deseas guardar una URL de almacenamiento completa (ej. gs://mi-bucket/ruta/al/archivo) en lugar de solo la ruta de almacenamiento. Solo puedes cambiar esta opción al crear.",
23
23
  save_url_instead_of_path: "Guardar URL en lugar de ruta de almacenamiento",
24
- save_url_description: "Activa esta opción si prefieres guardar la URL de descarga del archivo subido en lugar de la ruta de almacenamiento. Cambiarla solo afecta a las nuevas subidas: los valores ya guardados mantienen su formato actual.",
24
+ save_url_description: "Activa esta opción si prefieres guardar la URL de descarga del archivo subido en lugar de la ruta de almacenamiento. Solo puedes cambiar esta opción al crear.",
25
25
  max_size_bytes: "Tamaño máximo (en bytes)",
26
26
  image_resize_configuration: "Configuración de redimensionamiento de imagen",
27
27
  image_resize_description: "Redimensionar y optimizar imágenes automáticamente antes de subirlas (solo JPEG, PNG, WebP)",
package/src/locales/fr.ts CHANGED
@@ -19,9 +19,9 @@ export const collectionEditorTranslationsFr = {
19
19
  storage_placeholder_path: "{path} - Chemin de cette entité",
20
20
  storage_placeholder_rand: "{rand} - Valeur aléatoire pour éviter les conflits de noms",
21
21
  include_bucket_url: "Inclure l'URL du bucket (gs://...) dans la valeur enregistrée",
22
- include_bucket_url_description: "Activez ce paramètre si vous souhaitez enregistrer une URL de stockage complète (ex. gs://mon-bucket/chemin/vers/fichier) au lieu du simple chemin de stockage. Sa modification n'affecte que les nouveaux envois : les valeurs déjà enregistrées conservent leur format actuel.",
22
+ include_bucket_url_description: "Activez ce paramètre si vous souhaitez enregistrer une URL de stockage complète (ex. gs://mon-bucket/chemin/vers/fichier) au lieu du simple chemin de stockage. Vous ne pouvez modifier ce paramètre qu'à la création.",
23
23
  save_url_instead_of_path: "Enregistrer l'URL au lieu du chemin de stockage",
24
- save_url_description: "Activez ce paramètre si vous préférez enregistrer l'URL de téléchargement du fichier plutôt que le chemin de stockage. Sa modification n'affecte que les nouveaux envois : les valeurs déjà enregistrées conservent leur format actuel.",
24
+ save_url_description: "Activez ce paramètre si vous préférez enregistrer l'URL de téléchargement du fichier plutôt que le chemin de stockage. Vous ne pouvez modifier ce paramètre qu'à la création.",
25
25
  max_size_bytes: "Taille maximale (en octets)",
26
26
  image_resize_configuration: "Configuration du redimensionnement d'image",
27
27
  image_resize_description: "Redimensionner et optimiser automatiquement les images avant le téléchargement (JPEG, PNG, WebP uniquement)",
package/src/locales/hi.ts CHANGED
@@ -19,9 +19,9 @@ export const collectionEditorTranslationsHi = {
19
19
  storage_placeholder_path: "{path} - इस इकाई का पथ",
20
20
  storage_placeholder_rand: "{rand} - नाम टकराव से बचने के लिए यादृच्छिक मूल्य",
21
21
  include_bucket_url: "सहेजे गए मान में बकेट URL (gs://...) शामिल करें",
22
- include_bucket_url_description: "यदि आप केवल स्टोरेज पथ के बजाय पूरी तरह से योग्य स्टोरेज URL (जैसे gs://my-bucket/path/to/file) सहेजना चाहते हैं तो इस सेटिंग को चालू करें। इसे बदलने का असर केवल नए अपलोड पर होता है: पहले से सहेजे गए मान अपने मौजूदा प्रारूप में बने रहते हैं।",
22
+ include_bucket_url_description: "यदि आप केवल स्टोरेज पथ के बजाय पूरी तरह से योग्य स्टोरेज URL (जैसे gs://my-bucket/path/to/file) सहेजना चाहते हैं तो इस सेटिंग को चालू करें। आप इसे केवल निर्माण के समय बदल सकते हैं।",
23
23
  save_url_instead_of_path: "स्टोरेज पथ के बजाय URL सहेजें",
24
- save_url_description: "यदि आप स्टोरेज पथ के बजाय अपलोड की गई फ़ाइल का डाउनलोड URL सहेजना पसंद करते हैं तो इस सेटिंग को चालू करें। इसे बदलने का असर केवल नए अपलोड पर होता है: पहले से सहेजे गए मान अपने मौजूदा प्रारूप में बने रहते हैं।",
24
+ save_url_description: "यदि आप स्टोरेज पथ के बजाय अपलोड की गई फ़ाइल का डाउनलोड URL सहेजना पसंद करते हैं तो इस सेटिंग को चालू करें। आप इसे केवल निर्माण के समय बदल सकते हैं।",
25
25
  max_size_bytes: "अधिकतम आकार (बाइट में)",
26
26
  image_resize_configuration: "छवि आकार बदलने का कॉन्फ़िगरेशन",
27
27
  image_resize_description: "अपलोड से पहले स्वचालित रूप से छवियों का आकार बदलें और अनुकूलित करें (केवल JPEG, PNG, WebP)",
package/src/locales/it.ts CHANGED
@@ -19,9 +19,9 @@ export const collectionEditorTranslationsIt = {
19
19
  storage_placeholder_path: "{path} - Percorso di questa entità",
20
20
  storage_placeholder_rand: "{rand} - Valore casuale per evitare conflitti di nomi",
21
21
  include_bucket_url: "Includi URL del bucket (gs://...) nel valore salvato",
22
- include_bucket_url_description: "Attiva questa impostazione se desideri salvare un URL di archiviazione completo (es. gs://mio-bucket/percorso/al/file) invece del solo percorso di archiviazione. La modifica influisce solo sui nuovi caricamenti: i valori già salvati mantengono il loro formato attuale.",
22
+ include_bucket_url_description: "Attiva questa impostazione se desideri salvare un URL di archiviazione completo (es. gs://mio-bucket/percorso/al/file) invece del solo percorso di archiviazione. Puoi modificare questa impostazione solo alla creazione.",
23
23
  save_url_instead_of_path: "Salva URL invece del percorso di archiviazione",
24
- save_url_description: "Attiva questa impostazione se preferisci salvare l'URL di download del file caricato invece del percorso di archiviazione. La modifica influisce solo sui nuovi caricamenti: i valori già salvati mantengono il loro formato attuale.",
24
+ save_url_description: "Attiva questa impostazione se preferisci salvare l'URL di download del file caricato invece del percorso di archiviazione. Puoi modificare questa impostazione solo alla creazione.",
25
25
  max_size_bytes: "Dimensione massima (in byte)",
26
26
  image_resize_configuration: "Configurazione ridimensionamento immagine",
27
27
  image_resize_description: "Ridimensiona e ottimizza automaticamente le immagini prima del caricamento (solo JPEG, PNG, WebP)",
package/src/locales/pt.ts CHANGED
@@ -19,9 +19,9 @@ export const collectionEditorTranslationsPt = {
19
19
  storage_placeholder_path: "{path} - Caminho desta entidade",
20
20
  storage_placeholder_rand: "{rand} - Valor aleatório para evitar colisões de nomes",
21
21
  include_bucket_url: "Incluir URL do bucket (gs://...) no valor salvo",
22
- include_bucket_url_description: "Ative esta configuração se deseja salvar uma URL de armazenamento completa (ex. gs://meu-bucket/caminho/para/arquivo) em vez de apenas o caminho de armazenamento. Alterá-la afeta apenas os novos envios: os valores já salvos mantêm o formato atual.",
22
+ include_bucket_url_description: "Ative esta configuração se deseja salvar uma URL de armazenamento completa (ex. gs://meu-bucket/caminho/para/arquivo) em vez de apenas o caminho de armazenamento. Você só pode alterar esta configuração na criação.",
23
23
  save_url_instead_of_path: "Salvar URL em vez do caminho de armazenamento",
24
- save_url_description: "Ative esta configuração se preferir salvar a URL de download do arquivo enviado em vez do caminho de armazenamento. Alterá-la afeta apenas os novos envios: os valores já salvos mantêm o formato atual.",
24
+ save_url_description: "Ative esta configuração se preferir salvar a URL de download do arquivo enviado em vez do caminho de armazenamento. Você só pode alterar esta configuração na criação.",
25
25
  max_size_bytes: "Tamanho máximo (em bytes)",
26
26
  image_resize_configuration: "Configuração de redimensionamento de imagem",
27
27
  image_resize_description: "Redimensionar e otimizar imagens automaticamente antes do upload (apenas JPEG, PNG, WebP)",
@@ -498,11 +498,13 @@ function PropertyEditFormFields({
498
498
  showErrors={showErrors} />;
499
499
  } else if (selectedFieldConfigId === "file_upload") {
500
500
  childComponent =
501
- <StoragePropertyField multiple={false}
501
+ <StoragePropertyField existing={existing}
502
+ multiple={false}
502
503
  disabled={disabled} />;
503
504
  } else if (selectedFieldConfigId === "multi_file_upload") {
504
505
  childComponent =
505
- <StoragePropertyField multiple={true}
506
+ <StoragePropertyField existing={existing}
507
+ multiple={true}
506
508
  disabled={disabled} />;
507
509
  } else if (selectedFieldConfigId === "switch") {
508
510
  childComponent = <BooleanPropertyField disabled={disabled} />;
@@ -20,9 +20,11 @@ import { useTranslation } from "@firecms/core";
20
20
 
21
21
  export function StoragePropertyField({
22
22
  multiple,
23
+ existing,
23
24
  disabled
24
25
  }: {
25
26
  multiple: boolean;
27
+ existing: boolean;
26
28
  disabled: boolean;
27
29
  }) {
28
30
 
@@ -177,7 +179,7 @@ export function StoragePropertyField({
177
179
  }: FormexFieldProps) => {
178
180
  return <SwitchControl
179
181
  label={t("include_bucket_url")}
180
- disabled={disabled}
182
+ disabled={existing || disabled}
181
183
  form={form}
182
184
  field={field}/>;
183
185
  }}
@@ -195,7 +197,7 @@ export function StoragePropertyField({
195
197
  }: FormexFieldProps) => {
196
198
  return <SwitchControl
197
199
  label={t("save_url_instead_of_path")}
198
- disabled={disabled}
200
+ disabled={existing || disabled}
199
201
  form={form}
200
202
  field={field}/>;
201
203
  }}